From 25cfd691f95ed0d5bcf1b155652dab9030fae673 Mon Sep 17 00:00:00 2001 From: Davis SHYAKA <87414827+davis-shyaka@users.noreply.github.com> Date: Sat, 5 Oct 2024 11:19:18 +0200 Subject: [PATCH] choicebox draft --- package.json | 2 +- pnpm-lock.yaml | 10 +-- .../ui/choicebox/choicebox-checkbox.svelte | 70 ++++++++++++++++++ .../ui/choicebox/choicebox-radio.svelte | 73 +++++++++++++++++++ .../components/ui/choicebox/choicebox.svelte | 57 +++++++++++++++ src/lib/components/ui/choicebox/index.ts | 12 +++ src/lib/components/ui/radio/radio-item.svelte | 1 - src/lib/config/sitemap.ts | 2 +- src/routes/choicebox/+page.svelte | 27 ++++++- src/routes/choicebox/+page.ts | 22 ++++++ src/routes/choicebox/disabled.svelte | 26 +++++++ src/routes/choicebox/multi-select.svelte | 8 ++ src/routes/choicebox/single-select.svelte | 8 ++ 13 files changed, 309 insertions(+), 9 deletions(-) create mode 100644 src/lib/components/ui/choicebox/choicebox-checkbox.svelte create mode 100644 src/lib/components/ui/choicebox/choicebox-radio.svelte create mode 100644 src/lib/components/ui/choicebox/choicebox.svelte create mode 100644 src/lib/components/ui/choicebox/index.ts create mode 100644 src/routes/choicebox/+page.ts create mode 100644 src/routes/choicebox/disabled.svelte create mode 100644 src/routes/choicebox/multi-select.svelte create mode 100644 src/routes/choicebox/single-select.svelte diff --git a/package.json b/package.json index 5c07ae0..0565fc3 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ }, "type": "module", "dependencies": { - "bits-ui": "1.0.0-next.8", + "bits-ui": "1.0.0-next.9", "clsx": "^2.1.1", "runed": "^0.15.3", "tailwind-merge": "^2.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d14a7fd..6ea5b04 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: bits-ui: - specifier: 1.0.0-next.8 - version: 1.0.0-next.8(svelte@5.0.0-next.260) + specifier: 1.0.0-next.9 + version: 1.0.0-next.9(svelte@5.0.0-next.260) clsx: specifier: ^2.1.1 version: 2.1.1 @@ -541,8 +541,8 @@ packages: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} - bits-ui@1.0.0-next.8: - resolution: {integrity: sha512-3/uViRov9U3joTXBfUVZL+mvOfJTxAszj1kbt2uFqO3jZHbXurL0ZytM8Fxd3kcUzR981FX70vVDQfSSg70K5Q==} + bits-ui@1.0.0-next.9: + resolution: {integrity: sha512-ZFg7PVCY8rf29Mk0pPJ/uRMY6Iz+SJIIsXSw/f5RLTwvv1JHQwDgPoxc4ow26I94X6STNK38l6g3PcN95/f/ig==} engines: {node: '>=18', pnpm: '>=8.7.0'} peerDependencies: svelte: ^5.0.0-next.1 @@ -1872,7 +1872,7 @@ snapshots: binary-extensions@2.3.0: {} - bits-ui@1.0.0-next.8(svelte@5.0.0-next.260): + bits-ui@1.0.0-next.9(svelte@5.0.0-next.260): dependencies: '@floating-ui/core': 1.6.8 '@floating-ui/dom': 1.6.11 diff --git a/src/lib/components/ui/choicebox/choicebox-checkbox.svelte b/src/lib/components/ui/choicebox/choicebox-checkbox.svelte new file mode 100644 index 0000000..10cf46f --- /dev/null +++ b/src/lib/components/ui/choicebox/choicebox-checkbox.svelte @@ -0,0 +1,70 @@ + + + diff --git a/src/lib/components/ui/choicebox/choicebox-radio.svelte b/src/lib/components/ui/choicebox/choicebox-radio.svelte new file mode 100644 index 0000000..259b6b1 --- /dev/null +++ b/src/lib/components/ui/choicebox/choicebox-radio.svelte @@ -0,0 +1,73 @@ + + + + + + diff --git a/src/lib/components/ui/choicebox/choicebox.svelte b/src/lib/components/ui/choicebox/choicebox.svelte new file mode 100644 index 0000000..28646d9 --- /dev/null +++ b/src/lib/components/ui/choicebox/choicebox.svelte @@ -0,0 +1,57 @@ + + +