Update and implemeting checkbox.

This commit is contained in:
Bradley Shellnut 2022-05-09 10:11:02 -07:00
parent c159270dbd
commit 36d829c1a6
4 changed files with 320 additions and 122 deletions

View file

@ -15,19 +15,19 @@
"@playwright/test": "^1.21.1",
"@rgossiaux/svelte-headlessui": "1.0.0-beta.12",
"@sveltejs/adapter-auto": "next",
"@sveltejs/kit": "next",
"@sveltejs/kit": "1.0.0-next.326",
"@types/cookie": "^0.5.1",
"@types/node": "^17.0.31",
"@typescript-eslint/eslint-plugin": "^5.21.0",
"@typescript-eslint/parser": "^5.21.0",
"carbon-components-svelte": "^0.63.4",
"@typescript-eslint/eslint-plugin": "^5.22.0",
"@typescript-eslint/parser": "^5.22.0",
"carbon-components-svelte": "^0.63.8",
"carbon-icons-svelte": "^11.0.1",
"eslint": "^8.14.0",
"eslint": "^8.15.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte3": "^3.4.1",
"prettier": "^2.6.2",
"prettier-plugin-svelte": "^2.7.0",
"svelte": "^3.47.0",
"svelte": "^3.48.0",
"svelte-check": "^2.7.0",
"svelte-preprocess": "^4.10.6",
"tslib": "^2.4.0",
@ -39,6 +39,6 @@
"@lukeed/uuid": "^2.0.0",
"cookie": "^0.5.0",
"node-sass": "^7.0.1",
"zod": "^3.14.4"
"zod": "^3.15.1"
}
}

View file

@ -6,53 +6,53 @@ specifiers:
'@playwright/test': ^1.21.1
'@rgossiaux/svelte-headlessui': 1.0.0-beta.12
'@sveltejs/adapter-auto': next
'@sveltejs/kit': next
'@sveltejs/kit': 1.0.0-next.326
'@types/cookie': ^0.5.1
'@types/node': ^17.0.31
'@typescript-eslint/eslint-plugin': ^5.21.0
'@typescript-eslint/parser': ^5.21.0
carbon-components-svelte: ^0.63.4
'@typescript-eslint/eslint-plugin': ^5.22.0
'@typescript-eslint/parser': ^5.22.0
carbon-components-svelte: ^0.63.8
carbon-icons-svelte: ^11.0.1
cookie: ^0.5.0
eslint: ^8.14.0
eslint: ^8.15.0
eslint-config-prettier: ^8.5.0
eslint-plugin-svelte3: ^3.4.1
node-sass: ^7.0.1
prettier: ^2.6.2
prettier-plugin-svelte: ^2.7.0
svelte: ^3.47.0
svelte: ^3.48.0
svelte-check: ^2.7.0
svelte-preprocess: ^4.10.6
tslib: ^2.4.0
typescript: ^4.6.4
zod: ^3.14.4
zod: ^3.15.1
dependencies:
'@fontsource/fira-mono': 4.5.8
'@lukeed/uuid': 2.0.0
cookie: 0.5.0
node-sass: 7.0.1
zod: 3.14.4
zod: 3.15.1
devDependencies:
'@playwright/test': 1.21.1
'@rgossiaux/svelte-headlessui': 1.0.0-beta.12_svelte@3.47.0
'@rgossiaux/svelte-headlessui': 1.0.0-beta.12_svelte@3.48.0
'@sveltejs/adapter-auto': 1.0.0-next.40
'@sveltejs/kit': 1.0.0-next.324_svelte@3.47.0
'@sveltejs/kit': 1.0.0-next.326_svelte@3.48.0
'@types/cookie': 0.5.1
'@types/node': 17.0.31
'@typescript-eslint/eslint-plugin': 5.21.0_vxtfsxfxxyksjzzdyas4bgfolu
'@typescript-eslint/parser': 5.21.0_t725usgvqspm5woeqpaxbfp2qu
carbon-components-svelte: 0.63.4
'@typescript-eslint/eslint-plugin': 5.22.0_tal4xlmvnofklupd3hwjtzfb4q
'@typescript-eslint/parser': 5.22.0_hcfsmds2fshutdssjqluwm76uu
carbon-components-svelte: 0.63.8
carbon-icons-svelte: 11.0.1
eslint: 8.14.0
eslint-config-prettier: 8.5.0_eslint@8.14.0
eslint-plugin-svelte3: 3.4.1_2vfxa6cecroc3y2fsbrsrarodq
eslint: 8.15.0
eslint-config-prettier: 8.5.0_eslint@8.15.0
eslint-plugin-svelte3: 3.4.1_usjo443ynfgvutifl4ot2fkxzy
prettier: 2.6.2
prettier-plugin-svelte: 2.7.0_sqtt6dzjlskmywoml5ykunxlce
svelte: 3.47.0
svelte-check: 2.7.0_lgzwtoliaicje3e6dvqpmnwjny
svelte-preprocess: 4.10.6_fuy7harqzjw53n7m5icw4afneq
prettier-plugin-svelte: 2.7.0_kkjbqzpydplecjtkxrgomroeru
svelte: 3.48.0
svelte-check: 2.7.0_7na7m37n4dmvcpiduxi3duce4e
svelte-preprocess: 4.10.6_dge32yyqljm6qqfihfn6ebwd44
tslib: 2.4.0
typescript: 4.6.4
@ -567,13 +567,13 @@ packages:
to-fast-properties: 2.0.0
dev: true
/@eslint/eslintrc/1.2.2:
resolution: {integrity: sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==}
/@eslint/eslintrc/1.2.3:
resolution: {integrity: sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
ajv: 6.12.6
debug: 4.3.4
espree: 9.3.1
espree: 9.3.2
globals: 13.13.0
ignore: 5.2.0
import-fresh: 3.3.0
@ -715,12 +715,12 @@ packages:
- utf-8-validate
dev: true
/@rgossiaux/svelte-headlessui/1.0.0-beta.12_svelte@3.47.0:
/@rgossiaux/svelte-headlessui/1.0.0-beta.12_svelte@3.48.0:
resolution: {integrity: sha512-UgLV9PwlwkJYObYSzxm5kh5HbyEps3oMbihL1BY7CpZ26j0q6O6WaG4d95eiMilhzyHfRYRm/VLyNPJISBFqAA==}
peerDependencies:
svelte: ^3.44.0
dependencies:
svelte: 3.47.0
svelte: 3.48.0
dev: true
/@rollup/pluginutils/4.2.1:
@ -760,18 +760,18 @@ packages:
esbuild: 0.14.38
dev: true
/@sveltejs/kit/1.0.0-next.324_svelte@3.47.0:
resolution: {integrity: sha512-/CGW9rQpHQLBb2EcMw08yelD/C9hTsypymctUWdhryMTI8n1VWb0gkUcSHsz8n8oAAbKLXqwyHqeLATfcIMg2w==}
/@sveltejs/kit/1.0.0-next.326_svelte@3.48.0:
resolution: {integrity: sha512-prJqmXZ2H1wmFfnMw7wDujfbkcA8vuubuqUkpVVmXhfh2+SEzQscPTNwxoE5EJxb5sywtLWEvYx3hv1gPS4Lvg==}
engines: {node: '>=14.13'}
hasBin: true
peerDependencies:
svelte: ^3.44.0
dependencies:
'@sveltejs/vite-plugin-svelte': 1.0.0-next.42_svelte@3.47.0+vite@2.9.6
'@sveltejs/vite-plugin-svelte': 1.0.0-next.43_svelte@3.48.0+vite@2.9.8
chokidar: 3.5.3
sade: 1.8.1
svelte: 3.47.0
vite: 2.9.6
svelte: 3.48.0
vite: 2.9.8
transitivePeerDependencies:
- diff-match-patch
- less
@ -780,8 +780,8 @@ packages:
- supports-color
dev: true
/@sveltejs/vite-plugin-svelte/1.0.0-next.42_svelte@3.47.0+vite@2.9.6:
resolution: {integrity: sha512-I8ILzfjVQuOkl6eDHif6/QJhOEBnsA40u6/0RDWK0mujwOr+MfWCWEZEnrTKqa6YIVMO+uktfoknu61chbAIeg==}
/@sveltejs/vite-plugin-svelte/1.0.0-next.43_svelte@3.48.0+vite@2.9.8:
resolution: {integrity: sha512-MzeczqGrnDmbAldw/LfXV/dhpLC2bdUzuMhcx0C2j79V2uNzQERHDinxXnG2AVTCTjSpbQxzQwMMmYflnI7W1g==}
engines: {node: ^14.13.1 || >= 16}
peerDependencies:
diff-match-patch: ^1.0.5
@ -793,11 +793,12 @@ packages:
dependencies:
'@rollup/pluginutils': 4.2.1
debug: 4.3.4
deepmerge: 4.2.2
kleur: 4.1.4
magic-string: 0.26.1
svelte: 3.47.0
svelte-hmr: 0.14.11_svelte@3.47.0
vite: 2.9.6
svelte: 3.48.0
svelte-hmr: 0.14.11_svelte@3.48.0
vite: 2.9.8
transitivePeerDependencies:
- supports-color
dev: true
@ -875,8 +876,8 @@ packages:
dev: true
optional: true
/@typescript-eslint/eslint-plugin/5.21.0_vxtfsxfxxyksjzzdyas4bgfolu:
resolution: {integrity: sha512-fTU85q8v5ZLpoZEyn/u1S2qrFOhi33Edo2CZ0+q1gDaWWm0JuPh3bgOyU8lM0edIEYgKLDkPFiZX2MOupgjlyg==}
/@typescript-eslint/eslint-plugin/5.22.0_tal4xlmvnofklupd3hwjtzfb4q:
resolution: {integrity: sha512-YCiy5PUzpAeOPGQ7VSGDEY2NeYUV1B0swde2e0HzokRsHBYjSdF6DZ51OuRZxVPHx0032lXGLvOMls91D8FXlg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
'@typescript-eslint/parser': ^5.0.0
@ -886,12 +887,12 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/parser': 5.21.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/scope-manager': 5.21.0
'@typescript-eslint/type-utils': 5.21.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/utils': 5.21.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/parser': 5.22.0_hcfsmds2fshutdssjqluwm76uu
'@typescript-eslint/scope-manager': 5.22.0
'@typescript-eslint/type-utils': 5.22.0_hcfsmds2fshutdssjqluwm76uu
'@typescript-eslint/utils': 5.22.0_hcfsmds2fshutdssjqluwm76uu
debug: 4.3.4
eslint: 8.14.0
eslint: 8.15.0
functional-red-black-tree: 1.0.1
ignore: 5.2.0
regexpp: 3.2.0
@ -902,8 +903,8 @@ packages:
- supports-color
dev: true
/@typescript-eslint/parser/5.21.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-8RUwTO77hstXUr3pZoWZbRQUxXcSXafZ8/5gpnQCfXvgmP9gpNlRGlWzvfbEQ14TLjmtU8eGnONkff8U2ui2Eg==}
/@typescript-eslint/parser/5.22.0_hcfsmds2fshutdssjqluwm76uu:
resolution: {integrity: sha512-piwC4krUpRDqPaPbFaycN70KCP87+PC5WZmrWs+DlVOxxmF+zI6b6hETv7Quy4s9wbkV16ikMeZgXsvzwI3icQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
@ -912,26 +913,26 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': 5.21.0
'@typescript-eslint/types': 5.21.0
'@typescript-eslint/typescript-estree': 5.21.0_typescript@4.6.4
'@typescript-eslint/scope-manager': 5.22.0
'@typescript-eslint/types': 5.22.0
'@typescript-eslint/typescript-estree': 5.22.0_typescript@4.6.4
debug: 4.3.4
eslint: 8.14.0
eslint: 8.15.0
typescript: 4.6.4
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/scope-manager/5.21.0:
resolution: {integrity: sha512-XTX0g0IhvzcH/e3393SvjRCfYQxgxtYzL3UREteUneo72EFlt7UNoiYnikUtmGVobTbhUDByhJ4xRBNe+34kOQ==}
/@typescript-eslint/scope-manager/5.22.0:
resolution: {integrity: sha512-yA9G5NJgV5esANJCO0oF15MkBO20mIskbZ8ijfmlKIvQKg0ynVKfHZ15/nhAJN5m8Jn3X5qkwriQCiUntC9AbA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.21.0
'@typescript-eslint/visitor-keys': 5.21.0
'@typescript-eslint/types': 5.22.0
'@typescript-eslint/visitor-keys': 5.22.0
dev: true
/@typescript-eslint/type-utils/5.21.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-MxmLZj0tkGlkcZCSE17ORaHl8Th3JQwBzyXL/uvC6sNmu128LsgjTX0NIzy+wdH2J7Pd02GN8FaoudJntFvSOw==}
/@typescript-eslint/type-utils/5.22.0_hcfsmds2fshutdssjqluwm76uu:
resolution: {integrity: sha512-iqfLZIsZhK2OEJ4cQ01xOq3NaCuG5FQRKyHicA3xhZxMgaxQazLUHbH/B2k9y5i7l3+o+B5ND9Mf1AWETeMISA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: '*'
@ -940,22 +941,22 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/utils': 5.21.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/utils': 5.22.0_hcfsmds2fshutdssjqluwm76uu
debug: 4.3.4
eslint: 8.14.0
eslint: 8.15.0
tsutils: 3.21.0_typescript@4.6.4
typescript: 4.6.4
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/types/5.21.0:
resolution: {integrity: sha512-XnOOo5Wc2cBlq8Lh5WNvAgHzpjnEzxn4CJBwGkcau7b/tZ556qrWXQz4DJyChYg8JZAD06kczrdgFPpEQZfDsA==}
/@typescript-eslint/types/5.22.0:
resolution: {integrity: sha512-T7owcXW4l0v7NTijmjGWwWf/1JqdlWiBzPqzAWhobxft0SiEvMJB56QXmeCQjrPuM8zEfGUKyPQr/L8+cFUBLw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/@typescript-eslint/typescript-estree/5.21.0_typescript@4.6.4:
resolution: {integrity: sha512-Y8Y2T2FNvm08qlcoSMoNchh9y2Uj3QmjtwNMdRQkcFG7Muz//wfJBGBxh8R7HAGQFpgYpdHqUpEoPQk+q9Kjfg==}
/@typescript-eslint/typescript-estree/5.22.0_typescript@4.6.4:
resolution: {integrity: sha512-EyBEQxvNjg80yinGE2xdhpDYm41so/1kOItl0qrjIiJ1kX/L/L8WWGmJg8ni6eG3DwqmOzDqOhe6763bF92nOw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
typescript: '*'
@ -963,8 +964,8 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/types': 5.21.0
'@typescript-eslint/visitor-keys': 5.21.0
'@typescript-eslint/types': 5.22.0
'@typescript-eslint/visitor-keys': 5.22.0
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
@ -975,29 +976,29 @@ packages:
- supports-color
dev: true
/@typescript-eslint/utils/5.21.0_t725usgvqspm5woeqpaxbfp2qu:
resolution: {integrity: sha512-q/emogbND9wry7zxy7VYri+7ydawo2HDZhRZ5k6yggIvXa7PvBbAAZ4PFH/oZLem72ezC4Pr63rJvDK/sTlL8Q==}
/@typescript-eslint/utils/5.22.0_hcfsmds2fshutdssjqluwm76uu:
resolution: {integrity: sha512-HodsGb037iobrWSUMS7QH6Hl1kppikjA1ELiJlNSTYf/UdMEwzgj0WIp+lBNb6WZ3zTwb0tEz51j0Wee3iJ3wQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
'@types/json-schema': 7.0.11
'@typescript-eslint/scope-manager': 5.21.0
'@typescript-eslint/types': 5.21.0
'@typescript-eslint/typescript-estree': 5.21.0_typescript@4.6.4
eslint: 8.14.0
'@typescript-eslint/scope-manager': 5.22.0
'@typescript-eslint/types': 5.22.0
'@typescript-eslint/typescript-estree': 5.22.0_typescript@4.6.4
eslint: 8.15.0
eslint-scope: 5.1.1
eslint-utils: 3.0.0_eslint@8.14.0
eslint-utils: 3.0.0_eslint@8.15.0
transitivePeerDependencies:
- supports-color
- typescript
dev: true
/@typescript-eslint/visitor-keys/5.21.0:
resolution: {integrity: sha512-SX8jNN+iHqAF0riZQMkm7e8+POXa/fXw5cxL+gjpyP+FI+JVNhii53EmQgDAfDcBpFekYSlO0fGytMQwRiMQCA==}
/@typescript-eslint/visitor-keys/5.22.0:
resolution: {integrity: sha512-DbgTqn2Dv5RFWluG88tn0pP6Ex0ROF+dpDO1TNNZdRtLjUr6bdznjA6f/qNqJLjd2PgguAES2Zgxh/JzwzETDg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.21.0
'@typescript-eslint/types': 5.22.0
eslint-visitor-keys: 3.3.0
dev: true
@ -1005,16 +1006,16 @@ packages:
resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==}
dev: false
/acorn-jsx/5.3.2_acorn@8.7.0:
/acorn-jsx/5.3.2_acorn@8.7.1:
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
peerDependencies:
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
acorn: 8.7.0
acorn: 8.7.1
dev: true
/acorn/8.7.0:
resolution: {integrity: sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==}
/acorn/8.7.1:
resolution: {integrity: sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==}
engines: {node: '>=0.4.0'}
hasBin: true
dev: true
@ -1247,8 +1248,8 @@ packages:
resolution: {integrity: sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw==}
dev: true
/carbon-components-svelte/0.63.4:
resolution: {integrity: sha512-ZDEgPF6XJzHOMt10JDmzvu78gy5TapHXPBg3jA38HD6acfRG5AWYcGAH55/qIxPkBd7VTBixOst2DQ1sMH0kwA==}
/carbon-components-svelte/0.63.8:
resolution: {integrity: sha512-uefgSnHqnrI8OJGdxLc20N0Zpr5ZXLBuFRUXsdReHBdvMMs4FRdbvwsC2nfMGrmXy2ZgbKyE19CXGUVSKLDxtA==}
dependencies:
flatpickr: 4.6.9
dev: true
@ -1429,6 +1430,11 @@ packages:
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
dev: true
/deepmerge/4.2.2:
resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==}
engines: {node: '>=0.10.0'}
dev: true
/define-lazy-prop/2.0.0:
resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==}
engines: {node: '>=8'}
@ -1754,24 +1760,24 @@ packages:
engines: {node: '>=10'}
dev: true
/eslint-config-prettier/8.5.0_eslint@8.14.0:
/eslint-config-prettier/8.5.0_eslint@8.15.0:
resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==}
hasBin: true
peerDependencies:
eslint: '>=7.0.0'
dependencies:
eslint: 8.14.0
eslint: 8.15.0
dev: true
/eslint-plugin-svelte3/3.4.1_2vfxa6cecroc3y2fsbrsrarodq:
/eslint-plugin-svelte3/3.4.1_usjo443ynfgvutifl4ot2fkxzy:
resolution: {integrity: sha512-7p59WG8qV8L6wLdl4d/c3mdjkgVglQCdv5XOTk/iNPBKXuuV+Q0eFP5Wa6iJd/G2M1qR3BkLPEzaANOqKAZczw==}
engines: {node: '>=10'}
peerDependencies:
eslint: '>=6.0.0'
svelte: ^3.2.0
dependencies:
eslint: 8.14.0
svelte: 3.47.0
eslint: 8.15.0
svelte: 3.48.0
dev: true
/eslint-scope/5.1.1:
@ -1790,13 +1796,13 @@ packages:
estraverse: 5.3.0
dev: true
/eslint-utils/3.0.0_eslint@8.14.0:
/eslint-utils/3.0.0_eslint@8.15.0:
resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==}
engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0}
peerDependencies:
eslint: '>=5'
dependencies:
eslint: 8.14.0
eslint: 8.15.0
eslint-visitor-keys: 2.1.0
dev: true
@ -1810,12 +1816,12 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/eslint/8.14.0:
resolution: {integrity: sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==}
/eslint/8.15.0:
resolution: {integrity: sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
hasBin: true
dependencies:
'@eslint/eslintrc': 1.2.2
'@eslint/eslintrc': 1.2.3
'@humanwhocodes/config-array': 0.9.5
ajv: 6.12.6
chalk: 4.1.2
@ -1824,9 +1830,9 @@ packages:
doctrine: 3.0.0
escape-string-regexp: 4.0.0
eslint-scope: 7.1.1
eslint-utils: 3.0.0_eslint@8.14.0
eslint-utils: 3.0.0_eslint@8.15.0
eslint-visitor-keys: 3.3.0
espree: 9.3.1
espree: 9.3.2
esquery: 1.4.0
esutils: 2.0.3
fast-deep-equal: 3.1.3
@ -1854,12 +1860,12 @@ packages:
- supports-color
dev: true
/espree/9.3.1:
resolution: {integrity: sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==}
/espree/9.3.2:
resolution: {integrity: sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
acorn: 8.7.0
acorn-jsx: 5.3.2_acorn@8.7.0
acorn: 8.7.1
acorn-jsx: 5.3.2_acorn@8.7.1
eslint-visitor-keys: 3.3.0
dev: true
@ -2778,8 +2784,8 @@ packages:
resolution: {integrity: sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==}
dev: false
/nanoid/3.3.3:
resolution: {integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==}
/nanoid/3.3.4:
resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
dev: true
@ -3078,7 +3084,7 @@ packages:
resolution: {integrity: sha512-jtL6eTBrza5MPzy8oJLFuUscHDXTV5KcLlqAWHl5q5WYRfnNRGSmOZmOZ1T6Gy7A99mOZfqungmZMpMmCVJ8ZA==}
engines: {node: ^10 || ^12 || >=14}
dependencies:
nanoid: 3.3.3
nanoid: 3.3.4
picocolors: 1.0.0
source-map-js: 1.0.2
dev: true
@ -3088,14 +3094,14 @@ packages:
engines: {node: '>= 0.8.0'}
dev: true
/prettier-plugin-svelte/2.7.0_sqtt6dzjlskmywoml5ykunxlce:
/prettier-plugin-svelte/2.7.0_kkjbqzpydplecjtkxrgomroeru:
resolution: {integrity: sha512-fQhhZICprZot2IqEyoiUYLTRdumULGRvw0o4dzl5jt0jfzVWdGqeYW27QTWAeXhoupEZJULmNoH3ueJwUWFLIA==}
peerDependencies:
prettier: ^1.16.4 || ^2.0.0
svelte: ^3.2.0
dependencies:
prettier: 2.6.2
svelte: 3.47.0
svelte: 3.48.0
dev: true
/prettier/2.6.2:
@ -3311,8 +3317,8 @@ packages:
dependencies:
glob: 7.2.0
/rollup/2.71.1:
resolution: {integrity: sha512-lMZk3XfUBGjrrZQpvPSoXcZSfKcJ2Bgn+Z0L1MoW2V8Wh7BVM+LOBJTPo16yul2MwL59cXedzW1ruq3rCjSRgw==}
/rollup/2.72.1:
resolution: {integrity: sha512-NTc5UGy/NWFGpSqF1lFY8z9Adri6uhyMLI6LvPAXdBKoPRFhIIiBUpt+Qg2awixqO3xvzSijjhnb4+QEZwJmxA==}
engines: {node: '>=10.0.0'}
hasBin: true
optionalDependencies:
@ -3576,7 +3582,7 @@ packages:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'}
/svelte-check/2.7.0_lgzwtoliaicje3e6dvqpmnwjny:
/svelte-check/2.7.0_7na7m37n4dmvcpiduxi3duce4e:
resolution: {integrity: sha512-GrvG24j0+i8AOm0k0KyJ6Dqc+TAR2yzB7rtS4nljHStunVxCTr/1KYlv4EsOeoqtHLzeWMOd5D2O6nDdP/yw4A==}
hasBin: true
peerDependencies:
@ -3588,8 +3594,8 @@ packages:
picocolors: 1.0.0
sade: 1.8.1
source-map: 0.7.3
svelte: 3.47.0
svelte-preprocess: 4.10.6_fuy7harqzjw53n7m5icw4afneq
svelte: 3.48.0
svelte-preprocess: 4.10.6_dge32yyqljm6qqfihfn6ebwd44
typescript: 4.6.4
transitivePeerDependencies:
- '@babel/core'
@ -3604,16 +3610,16 @@ packages:
- sugarss
dev: true
/svelte-hmr/0.14.11_svelte@3.47.0:
/svelte-hmr/0.14.11_svelte@3.48.0:
resolution: {integrity: sha512-R9CVfX6DXxW1Kn45Jtmx+yUe+sPhrbYSUp7TkzbW0jI5fVPn6lsNG9NEs5dFg5qRhFNAoVdRw5qQDLALNKhwbQ==}
engines: {node: ^12.20 || ^14.13.1 || >= 16}
peerDependencies:
svelte: '>=3.19.0'
dependencies:
svelte: 3.47.0
svelte: 3.48.0
dev: true
/svelte-preprocess/4.10.6_fuy7harqzjw53n7m5icw4afneq:
/svelte-preprocess/4.10.6_dge32yyqljm6qqfihfn6ebwd44:
resolution: {integrity: sha512-I2SV1w/AveMvgIQlUF/ZOO3PYVnhxfcpNyGt8pxpUVhPfyfL/CZBkkw/KPfuFix5FJ9TnnNYMhACK3DtSaYVVQ==}
engines: {node: '>= 9.11.2'}
requiresBuild: true
@ -3661,12 +3667,12 @@ packages:
node-sass: 7.0.1
sorcery: 0.10.0
strip-indent: 3.0.0
svelte: 3.47.0
svelte: 3.48.0
typescript: 4.6.4
dev: true
/svelte/3.47.0:
resolution: {integrity: sha512-4JaJp3HEoTCGARRWZQIZDUanhYv0iyoHikklVHVLH9xFE9db22g4TDv7CPeNA8HD1JgjXI1vlhR1JZvvhaTu2Q==}
/svelte/3.48.0:
resolution: {integrity: sha512-fN2YRm/bGumvjUpu6yI3BpvZnpIm9I6A7HR4oUNYd7ggYyIwSA/BX7DJ+UXXffLp6XNcUijyLvttbPVCYa/3xQ==}
engines: {node: '>= 8'}
dev: true
@ -3832,8 +3838,8 @@ packages:
extsprintf: 1.3.0
dev: false
/vite/2.9.6:
resolution: {integrity: sha512-3IffdrByHW95Yjv0a13TQOQfJs7L5dVlSPuTt432XLbRMriWbThqJN2k/IS6kXn5WY4xBLhK9XoaWay1B8VzUw==}
/vite/2.9.8:
resolution: {integrity: sha512-zsBGwn5UT3YS0NLSJ7hnR54+vUKfgzMUh/Z9CxF1YKEBVIe213+63jrFLmZphgGI5zXwQCSmqIdbPuE8NJywPw==}
engines: {node: '>=12.2.0'}
hasBin: true
peerDependencies:
@ -3851,7 +3857,7 @@ packages:
esbuild: 0.14.38
postcss: 8.4.13
resolve: 1.22.0
rollup: 2.71.1
rollup: 2.72.1
optionalDependencies:
fsevents: 2.3.2
dev: true
@ -3951,6 +3957,6 @@ packages:
buffer-crc32: 0.2.13
dev: true
/zod/3.14.4:
resolution: {integrity: sha512-U9BFLb2GO34Sfo9IUYp0w3wJLlmcyGoMd75qU9yf+DrdGA4kEx6e+l9KOkAlyUO0PSQzZCa3TR4qVlcmwqSDuw==}
/zod/3.15.1:
resolution: {integrity: sha512-WAdjcoOxa4S9oc/u7fTbC3CC7uVqptLLU0LKqS8RDBOrCXp2t5avM8BUfgNVZJymGWAx6SEUYxWPPoYuQ5rgwQ==}
dev: false

View file

@ -0,0 +1,80 @@
<script lang="ts">
export let labelText: string;
export let showLabel: boolean;
</script>
<label htmlFor={`${guest.id}`} className="checkbox">
<span class="checkbox__input">
<input
id={`${guest.id}`}
name={`${guest.id}`}
checked={inputs[`${guest.id}`].plusOne}
onChange={onChangePlusOne}
type="checkbox"
/>
<span class="checkbox__control">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
aria-hidden="true"
focusable="false"
>
<path
fill="none"
stroke="currentColor"
strokeWidth="3"
d="M1.73 12.91l6.37 6.37L22.79 4.59"
/>
</svg>
</span>
</span>
<span class="checkbox__label">Plus one? </span>
</label>
<style lang="scss">
.checkbox {
display: grid;
grid-template-columns: min-content auto;
align-items: center;
align-content: center;
gap: 0.5rem;
font-size: 2rem;
.checkbox__input {
display: grid;
grid-template-areas: 'checkbox';
> * {
grid-area: checkbox;
}
}
.checkbox__input input:checked + .checkbox__control svg {
transform: scale(1);
}
.checkbox__input input:focus + .checkbox__control {
box-shadow: var(--level-2-primary);
}
.checkbox__control {
display: inline-grid;
width: 1em;
height: 1em;
border-radius: 0.1em;
border: 0.1em solid var(--lightViolet);
svg {
transition: transform 0.1s ease-in 25ms;
transform: scale(0);
transform-origin: bottom left;
}
}
input[type='checkbox'] {
opacity: 0;
width: 1em;
height: 1em;
}
}
</style>

View file

@ -0,0 +1,112 @@
<script>
/**
* @event {boolean} check
*/
/**
* Specify the value of the checkbox
* @type {any}
*/
export let value = '';
/** Specify whether the checkbox is checked */
export let checked = false;
/**
* Specify the bound group
* @type {any[]}
*/
export let group = undefined;
/** Specify whether the checkbox is indeterminate */
export let indeterminate = false;
/** Set to `true` to display the skeleton state */
export let skeleton = false;
/** Set to `true` to mark the field as required */
export let required = false;
/** Set to `true` for the checkbox to be read-only */
export let readonly = false;
/** Set to `true` to disable the checkbox */
export let disabled = false;
/** Specify the label text */
export let labelText = '';
/** Set to `true` to visually hide the label text */
export let hideLabel = false;
/** Set a name for the input element */
export let name = '';
/**
* Specify the title attribute for the label element
* @type {string}
*/
export let title = undefined;
/** Set an id for the input label */
export let id = 'ccs-' + Math.random().toString(36);
/** Obtain a reference to the input HTML element */
export let ref = null;
import { createEventDispatcher } from 'svelte';
import CheckboxSkeleton from './CheckboxSkeleton.svelte';
const dispatch = createEventDispatcher();
$: useGroup = Array.isArray(group);
$: checked = useGroup ? group.includes(value) : checked;
$: dispatch('check', checked);
</script>
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
{#if skeleton}
<CheckboxSkeleton {...$$restProps} on:click on:mouseover on:mouseenter on:mouseleave />
{:else}
<div
class:bx--form-item={true}
class:bx--checkbox-wrapper={true}
{...$$restProps}
on:click
on:mouseover
on:mouseenter
on:mouseleave
>
<input
bind:this={ref}
type="checkbox"
{value}
{checked}
{disabled}
{id}
{indeterminate}
{name}
{required}
{readonly}
class:bx--checkbox={true}
on:change={() => {
if (useGroup) {
group = group.includes(value)
? group.filter((_value) => _value !== value)
: [...group, value];
} else {
checked = !checked;
}
}}
on:change
on:blur
/>
<label for={id} {title} class:bx--checkbox-label={true}>
<span class:bx--checkbox-label-text={true} class:bx--visually-hidden={hideLabel}>
<slot name="labelText">
{labelText}
</slot>
</span>
</label>
</div>
{/if}