From 4d6c56db68be04052bc708f0e611941bb84cc2d4 Mon Sep 17 00:00:00 2001
From: Konstantinos Kostarellis
Date: Thu, 31 Aug 2023 20:44:22 +0200
Subject: [PATCH 01/45] chore: removes config to tailwindcss-animate in docs
(#237)
---
apps/www/package.json | 1 -
apps/www/pnpm-lock.yaml | 11 -----------
apps/www/src/content/installation.md | 3 +--
.../docs/theme-customizer/customizer.svelte | 3 +--
apps/www/tailwind.config.js | 4 +---
5 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/apps/www/package.json b/apps/www/package.json
index 92642a331..0fe6c3d30 100644
--- a/apps/www/package.json
+++ b/apps/www/package.json
@@ -56,7 +56,6 @@
"svelte": "^4.0.5",
"svelte-check": "^3.4.3",
"tailwindcss": "^3.3.3",
- "tailwindcss-animate": "^1.0.6",
"tslib": "^2.4.1",
"tsx": "^3.12.7",
"typescript": "^5.1.6",
diff --git a/apps/www/pnpm-lock.yaml b/apps/www/pnpm-lock.yaml
index 00f0f5339..8d8b23062 100644
--- a/apps/www/pnpm-lock.yaml
+++ b/apps/www/pnpm-lock.yaml
@@ -150,9 +150,6 @@ devDependencies:
tailwindcss:
specifier: ^3.3.3
version: 3.3.3
- tailwindcss-animate:
- specifier: ^1.0.6
- version: 1.0.6(tailwindcss@3.3.3)
tslib:
specifier: ^2.4.1
version: 2.6.1
@@ -5059,14 +5056,6 @@ packages:
tailwindcss: 3.3.3
dev: false
- /tailwindcss-animate@1.0.6(tailwindcss@3.3.3):
- resolution: {integrity: sha512-4WigSGMvbl3gCCact62ZvOngA+PRqhAn7si3TQ3/ZuPuQZcIEtVap+ENSXbzWhpojKB8CpvnIsrwBu8/RnHtuw==}
- peerDependencies:
- tailwindcss: '>=3.0.0 || insiders'
- dependencies:
- tailwindcss: 3.3.3
- dev: true
-
/tailwindcss@3.3.3:
resolution: {integrity: sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==}
engines: {node: '>=14.0.0'}
diff --git a/apps/www/src/content/installation.md b/apps/www/src/content/installation.md
index 7a10b1642..29cc242e0 100644
--- a/apps/www/src/content/installation.md
+++ b/apps/www/src/content/installation.md
@@ -123,7 +123,7 @@ npx svelte-add@latest tailwindcss
Add the following dependencies to your project:
```bash
-npm install tailwindcss-animate tailwind-variants clsx tailwind-merge
+npm install tailwind-variants clsx tailwind-merge
```
### Configure tailwind.config.js
@@ -132,7 +132,6 @@ This is what this project's `tailwind.config.js` file looks like:
```javascript title="tailwind.config.js"
import { fontFamily } from "tailwindcss/defaultTheme";
-import tailwindcssAnimate from "tailwindcss-animate";
/** @type {import('tailwindcss').Config} */
const config = {
diff --git a/apps/www/src/lib/components/docs/theme-customizer/customizer.svelte b/apps/www/src/lib/components/docs/theme-customizer/customizer.svelte
index facebfbec..d66a15e9e 100644
--- a/apps/www/src/lib/components/docs/theme-customizer/customizer.svelte
+++ b/apps/www/src/lib/components/docs/theme-customizer/customizer.svelte
@@ -61,8 +61,7 @@
The Default style has
- larger inputs, uses lucide-react for icons and tailwindcss-animate
- for animations.
+ larger inputs, uses lucide-react for icons.
The New York style ships
diff --git a/apps/www/tailwind.config.js b/apps/www/tailwind.config.js
index 3614c1f60..dda0c40eb 100644
--- a/apps/www/tailwind.config.js
+++ b/apps/www/tailwind.config.js
@@ -1,5 +1,4 @@
import { fontFamily } from "tailwindcss/defaultTheme";
-import tailwindcssAnimate from "tailwindcss-animate";
/** @type {import('tailwindcss').Config} */
const config = {
@@ -58,8 +57,7 @@ const config = {
sans: ["Inter", ...fontFamily.sans]
}
}
- },
- plugins: [tailwindcssAnimate]
+ }
};
export default config;
From 6de52594bef57a255d6d6b0c482a2058d2cbf5ba Mon Sep 17 00:00:00 2001
From: Hunter Johnston <64506580+huntabyte@users.noreply.github.com>
Date: Thu, 31 Aug 2023 14:57:29 -0400
Subject: [PATCH 02/45] fix: table cell and head types (#238)
---
apps/www/src/lib/registry/default/ui/table/table-cell.svelte | 4 ++--
apps/www/src/lib/registry/default/ui/table/table-head.svelte | 4 ++--
apps/www/src/lib/registry/new-york/ui/table/table-cell.svelte | 4 ++--
apps/www/src/lib/registry/new-york/ui/table/table-head.svelte | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/apps/www/src/lib/registry/default/ui/table/table-cell.svelte b/apps/www/src/lib/registry/default/ui/table/table-cell.svelte
index 9e9d8dd1b..4655f2bb3 100644
--- a/apps/www/src/lib/registry/default/ui/table/table-cell.svelte
+++ b/apps/www/src/lib/registry/default/ui/table/table-cell.svelte
@@ -1,8 +1,8 @@
diff --git a/apps/www/src/lib/registry/new-york/ui/sheet/sheet-overlay.svelte b/apps/www/src/lib/registry/new-york/ui/sheet/sheet-overlay.svelte
index c03b51b04..2c9bbd827 100644
--- a/apps/www/src/lib/registry/new-york/ui/sheet/sheet-overlay.svelte
+++ b/apps/www/src/lib/registry/new-york/ui/sheet/sheet-overlay.svelte
@@ -1,16 +1,23 @@
\n\timport { Checkbox as CheckboxPrimitive } from \"bits-ui\";\n\timport { Check, Minus } from \"lucide-svelte\";\n\timport { cn } from \"$lib/utils\";\n\n\ttype $$Props = CheckboxPrimitive.Props;\n\ttype $$Events = CheckboxPrimitive.Events;\n\n\tlet className: $$Props[\"class\"] = undefined;\n\texport let checked: $$Props[\"checked\"] = false;\n\texport { className as class };\n\n\n\n\t\n\t\t{#if isChecked}\n\t\t\t \n\t\t{:else if isIndeterminate}\n\t\t\t \n\t\t{/if}\n\t \n \n"
+ "content": "\n\n\n\t\n\t\t{#if isChecked}\n\t\t\t \n\t\t{:else if isIndeterminate}\n\t\t\t \n\t\t{/if}\n\t \n \n"
},
{
"name": "index.ts",
diff --git a/apps/www/static/registry/styles/default/menubar.json b/apps/www/static/registry/styles/default/menubar.json
index b8b9c3f57..dd7615862 100644
--- a/apps/www/static/registry/styles/default/menubar.json
+++ b/apps/www/static/registry/styles/default/menubar.json
@@ -11,7 +11,7 @@
},
{
"name": "menubar-checkbox-item.svelte",
- "content": "\n\n\n\t\n\t\t\n\t\t\t \n\t\t \n\t \n\t \n \n"
+ "content": "\n\n\n\t\n\t\t\n\t\t\t \n\t\t \n\t \n\t \n \n"
},
{
"name": "menubar-content.svelte",
@@ -19,7 +19,7 @@
},
{
"name": "menubar-item.svelte",
- "content": "\n\n\n\t \n \n"
+ "content": "\n\n\n\t \n \n"
},
{
"name": "menubar-label.svelte",
@@ -27,7 +27,7 @@
},
{
"name": "menubar-radio-item.svelte",
- "content": "\n\n\n\t\n\t\t\n\t\t\t \n\t\t \n\t \n\t \n \n"
+ "content": "\n\n\n\t\n\t\t\n\t\t\t \n\t\t \n\t \n\t \n \n"
},
{
"name": "menubar-separator.svelte",
diff --git a/apps/www/static/registry/styles/default/table.json b/apps/www/static/registry/styles/default/table.json
index 150cd9017..27efa4f75 100644
--- a/apps/www/static/registry/styles/default/table.json
+++ b/apps/www/static/registry/styles/default/table.json
@@ -17,7 +17,7 @@
},
{
"name": "table-cell.svelte",
- "content": "\n\n\n\t \n \n"
+ "content": "\n\n\n\t \n \n"
},
{
"name": "table-footer.svelte",
@@ -25,7 +25,7 @@
},
{
"name": "table-head.svelte",
- "content": "\n\n\n\t \n \n"
+ "content": "\n\n\n\t \n \n"
},
{
"name": "table-header.svelte",
diff --git a/apps/www/static/registry/styles/new-york/checkbox.json b/apps/www/static/registry/styles/new-york/checkbox.json
index 01c4e9d3f..dac89395a 100644
--- a/apps/www/static/registry/styles/new-york/checkbox.json
+++ b/apps/www/static/registry/styles/new-york/checkbox.json
@@ -7,7 +7,7 @@
"files": [
{
"name": "checkbox.svelte",
- "content": "\n\n\n\t\n\t\t{#if isIndeterminate}\n\t\t\t \n\t\t{:else}\n\t\t\t \n\t\t{/if}\n\t \n \n"
+ "content": "\n\n\n\t\n\t\t{#if isIndeterminate}\n\t\t\t \n\t\t{:else}\n\t\t\t \n\t\t{/if}\n\t \n \n"
},
{
"name": "index.ts",
diff --git a/apps/www/static/registry/styles/new-york/menubar.json b/apps/www/static/registry/styles/new-york/menubar.json
index 3f3a3653b..89a83982e 100644
--- a/apps/www/static/registry/styles/new-york/menubar.json
+++ b/apps/www/static/registry/styles/new-york/menubar.json
@@ -11,7 +11,7 @@
},
{
"name": "menubar-checkbox-item.svelte",
- "content": "\n\n\n\t\n\t\t\n\t\t\t \n\t\t \n\t \n\t \n \n"
+ "content": "\n\n\n\t\n\t\t\n\t\t\t \n\t\t \n\t \n\t \n \n"
},
{
"name": "menubar-content.svelte",
@@ -19,7 +19,7 @@
},
{
"name": "menubar-item.svelte",
- "content": "\n\n\n\t \n \n"
+ "content": "\n\n\n\t \n \n"
},
{
"name": "menubar-label.svelte",
@@ -27,7 +27,7 @@
},
{
"name": "menubar-radio-item.svelte",
- "content": "\n\n\n\t\n\t\t\n\t\t\t \n\t\t \n\t \n\t \n \n"
+ "content": "\n\n\n\t\n\t\t\n\t\t\t \n\t\t \n\t \n\t \n \n"
},
{
"name": "menubar-separator.svelte",
diff --git a/apps/www/static/registry/styles/new-york/sheet.json b/apps/www/static/registry/styles/new-york/sheet.json
index 46b2ea007..16cb9dbe7 100644
--- a/apps/www/static/registry/styles/new-york/sheet.json
+++ b/apps/www/static/registry/styles/new-york/sheet.json
@@ -7,7 +7,7 @@
"files": [
{
"name": "index.ts",
- "content": "import { Dialog as SheetPrimitive } from \"bits-ui\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport Portal from \"./sheet-portal.svelte\";\nimport Overlay from \"./sheet-overlay.svelte\";\nimport Content from \"./sheet-content.svelte\";\nimport Header from \"./sheet-header.svelte\";\nimport Footer from \"./sheet-footer.svelte\";\nimport Title from \"./sheet-title.svelte\";\nimport Description from \"./sheet-description.svelte\";\n\nconst Root = SheetPrimitive.Root;\nconst Close = SheetPrimitive.Close;\nconst Trigger = SheetPrimitive.Trigger;\n\nexport {\n\tRoot,\n\tClose,\n\tTrigger,\n\tPortal,\n\tOverlay,\n\tContent,\n\tHeader,\n\tFooter,\n\tTitle,\n\tDescription,\n\t//\n\tRoot as Sheet,\n\tClose as SheetClose,\n\tTrigger as SheetTrigger,\n\tPortal as SheetPortal,\n\tOverlay as SheetOverlay,\n\tContent as SheetContent,\n\tHeader as SheetHeader,\n\tFooter as SheetFooter,\n\tTitle as SheetTitle,\n\tDescription as SheetDescription\n};\n\nexport const sheetVariants = tv({\n\tbase: \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\n\tvariants: {\n\t\tside: {\n\t\t\ttop: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n\t\t\tbottom: \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n\t\t\tleft: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n\t\t\tright: \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tside: \"right\"\n\t}\n});\n\nexport type Side = VariantProps[\"side\"];\n"
+ "content": "import { Dialog as SheetPrimitive } from \"bits-ui\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport Portal from \"./sheet-portal.svelte\";\nimport Overlay from \"./sheet-overlay.svelte\";\nimport Content from \"./sheet-content.svelte\";\nimport Header from \"./sheet-header.svelte\";\nimport Footer from \"./sheet-footer.svelte\";\nimport Title from \"./sheet-title.svelte\";\nimport Description from \"./sheet-description.svelte\";\n\nconst Root = SheetPrimitive.Root;\nconst Close = SheetPrimitive.Close;\nconst Trigger = SheetPrimitive.Trigger;\n\nexport {\n\tRoot,\n\tClose,\n\tTrigger,\n\tPortal,\n\tOverlay,\n\tContent,\n\tHeader,\n\tFooter,\n\tTitle,\n\tDescription,\n\t//\n\tRoot as Sheet,\n\tClose as SheetClose,\n\tTrigger as SheetTrigger,\n\tPortal as SheetPortal,\n\tOverlay as SheetOverlay,\n\tContent as SheetContent,\n\tHeader as SheetHeader,\n\tFooter as SheetFooter,\n\tTitle as SheetTitle,\n\tDescription as SheetDescription\n};\n\nexport const sheetVariants = tv({\n\tbase: \"fixed z-50 gap-4 bg-background p-6 shadow-lg\",\n\tvariants: {\n\t\tside: {\n\t\t\ttop: \"inset-x-0 top-0 border-b \",\n\t\t\tbottom: \"inset-x-0 bottom-0 border-t\",\n\t\t\tleft: \"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm\",\n\t\t\tright: \"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tside: \"right\"\n\t}\n});\n\nexport type Side = VariantProps[\"side\"];\n"
},
{
"name": "sheet-content.svelte",
diff --git a/apps/www/static/registry/styles/new-york/table.json b/apps/www/static/registry/styles/new-york/table.json
index 1ef66806c..8fffb9b80 100644
--- a/apps/www/static/registry/styles/new-york/table.json
+++ b/apps/www/static/registry/styles/new-york/table.json
@@ -17,7 +17,7 @@
},
{
"name": "table-cell.svelte",
- "content": "\n\n[role=checkbox]]:translate-y-[2px]\",\n\t\tclassName\n\t)}\n\t{...$$restProps}\n>\n\t \n \n"
+ "content": "\n\n[role=checkbox]]:translate-y-[2px]\",\n\t\tclassName\n\t)}\n\t{...$$restProps}\n>\n\t \n \n"
},
{
"name": "table-footer.svelte",
@@ -25,7 +25,7 @@
},
{
"name": "table-head.svelte",
- "content": "\n\n[role=checkbox]]:translate-y-[2px]\",\n\t\tclassName\n\t)}\n\t{...$$restProps}\n>\n\t \n \n"
+ "content": "\n\n[role=checkbox]]:translate-y-[2px]\",\n\t\tclassName\n\t)}\n\t{...$$restProps}\n>\n\t \n \n"
},
{
"name": "table-header.svelte",
From df9c47d8d211a2084ca311b0ec1e35ed8ce47d15 Mon Sep 17 00:00:00 2001
From: Hunter Johnston <64506580+huntabyte@users.noreply.github.com>
Date: Thu, 31 Aug 2023 17:07:57 -0400
Subject: [PATCH 06/45] update bits to latest (#242)
---
apps/www/package.json | 2 +-
apps/www/pnpm-lock.yaml | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/apps/www/package.json b/apps/www/package.json
index 0fe6c3d30..d4f2d6fc2 100644
--- a/apps/www/package.json
+++ b/apps/www/package.json
@@ -70,7 +70,7 @@
"dependencies": {
"@unovis/svelte": "^1.2.1",
"@unovis/ts": "^1.2.1",
- "bits-ui": "^0.5.1",
+ "bits-ui": "^0.5.3",
"clsx": "^2.0.0",
"d3-scale": "^4.0.2",
"esm-env": "^1.0.0",
diff --git a/apps/www/pnpm-lock.yaml b/apps/www/pnpm-lock.yaml
index 8d8b23062..e5b1facba 100644
--- a/apps/www/pnpm-lock.yaml
+++ b/apps/www/pnpm-lock.yaml
@@ -17,8 +17,8 @@ dependencies:
specifier: ^1.2.1
version: 1.2.1
bits-ui:
- specifier: ^0.5.1
- version: 0.5.1(svelte@4.2.0)
+ specifier: ^0.5.3
+ version: 0.5.3(svelte@4.2.0)
clsx:
specifier: ^2.0.0
version: 2.0.0
@@ -882,8 +882,8 @@ packages:
engines: {node: '>=6.0.0'}
dev: false
- /@melt-ui/svelte@0.39.1(svelte@4.2.0):
- resolution: {integrity: sha512-jrMmhm201fWP1GlStanj6U7ib1JMjm0hScCQpe/B2L7sDUDZtShyONtQQzCrYssAz986tF4D3Ty8d9oZNBVmtg==}
+ /@melt-ui/svelte@0.39.3(svelte@4.2.0):
+ resolution: {integrity: sha512-PJKo4CUDfr4bnONOuz9hLdBCo0Fz4XT8oFEdFbFCFUTqbXfEeVMN60ZHmJrolPob5mpkbp1BWg+Uy+eoEDbxig==}
peerDependencies:
svelte: '>=3 <5'
dependencies:
@@ -1788,12 +1788,12 @@ packages:
file-uri-to-path: 1.0.0
dev: true
- /bits-ui@0.5.1(svelte@4.2.0):
- resolution: {integrity: sha512-AdMJvrPRx8/77fnH/GAH7+lXWNbWcs3NbNVq+fwJpwf7oyz1ttuqTE4pffDXyAIsSioNaUmudb3/P0tHrsjJEw==}
+ /bits-ui@0.5.3(svelte@4.2.0):
+ resolution: {integrity: sha512-rDYYACFwiRkPEjUmNX0m59o7dyU5stKC9dLy/XXqGEeu8WAzFCY/I5JtlcXC4nHi9QHyvPBsN901+jNw/5c2Ew==}
peerDependencies:
svelte: ^4.0.0
dependencies:
- '@melt-ui/svelte': 0.39.1(svelte@4.2.0)
+ '@melt-ui/svelte': 0.39.3(svelte@4.2.0)
nanoid: 4.0.2
svelte: 4.2.0
dev: false
From cf4fec33c8aa6a988c6e524611d76b71592b48bb Mon Sep 17 00:00:00 2001
From: Hunter Johnston <64506580+huntabyte@users.noreply.github.com>
Date: Thu, 31 Aug 2023 19:42:12 -0400
Subject: [PATCH 07/45] Update sheet transitions (#243)
---
apps/www/package.json | 2 +-
apps/www/pnpm-lock.yaml | 329 +-----------------
.../lib/registry/default/ui/sheet/index.ts | 52 ++-
.../default/ui/sheet/sheet-content.svelte | 15 +-
.../lib/registry/new-york/ui/sheet/index.ts | 52 ++-
.../new-york/ui/sheet/sheet-content.svelte | 15 +-
6 files changed, 109 insertions(+), 356 deletions(-)
diff --git a/apps/www/package.json b/apps/www/package.json
index d4f2d6fc2..535999c0b 100644
--- a/apps/www/package.json
+++ b/apps/www/package.json
@@ -70,7 +70,7 @@
"dependencies": {
"@unovis/svelte": "^1.2.1",
"@unovis/ts": "^1.2.1",
- "bits-ui": "^0.5.3",
+ "bits-ui": "^0.5.5",
"clsx": "^2.0.0",
"d3-scale": "^4.0.2",
"esm-env": "^1.0.0",
diff --git a/apps/www/pnpm-lock.yaml b/apps/www/pnpm-lock.yaml
index e5b1facba..acc1d2fb1 100644
--- a/apps/www/pnpm-lock.yaml
+++ b/apps/www/pnpm-lock.yaml
@@ -17,8 +17,8 @@ dependencies:
specifier: ^1.2.1
version: 1.2.1
bits-ui:
- specifier: ^0.5.3
- version: 0.5.3(svelte@4.2.0)
+ specifier: ^0.5.5
+ version: 0.5.5(svelte@4.2.0)
clsx:
specifier: ^2.0.0
version: 2.0.0
@@ -882,14 +882,14 @@ packages:
engines: {node: '>=6.0.0'}
dev: false
- /@melt-ui/svelte@0.39.3(svelte@4.2.0):
- resolution: {integrity: sha512-PJKo4CUDfr4bnONOuz9hLdBCo0Fz4XT8oFEdFbFCFUTqbXfEeVMN60ZHmJrolPob5mpkbp1BWg+Uy+eoEDbxig==}
+ /@melt-ui/svelte@0.40.0(svelte@4.2.0):
+ resolution: {integrity: sha512-kVW8ISLlUTpqvRbVXqwWIiS7YuvKAKqbBgCV7BCmbfricvW8M3VqpIOezlu/FRZH30Oqm/nBzeJAgLXc+Y+s3A==}
peerDependencies:
svelte: '>=3 <5'
dependencies:
'@floating-ui/core': 1.4.1
'@floating-ui/dom': 1.5.1
- deep-equal: 2.2.2
+ dequal: 2.0.3
focus-trap: 7.5.2
nanoid: 4.0.2
svelte: 4.2.0
@@ -1716,13 +1716,6 @@ packages:
dependencies:
dequal: 2.0.3
- /array-buffer-byte-length@1.0.0:
- resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==}
- dependencies:
- call-bind: 1.0.2
- is-array-buffer: 3.0.2
- dev: false
-
/array-union@2.1.0:
resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==}
engines: {node: '>=8'}
@@ -1752,11 +1745,6 @@ packages:
postcss-value-parser: 4.2.0
dev: true
- /available-typed-arrays@1.0.5:
- resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==}
- engines: {node: '>= 0.4'}
- dev: false
-
/axobject-query@3.2.1:
resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==}
dependencies:
@@ -1788,12 +1776,12 @@ packages:
file-uri-to-path: 1.0.0
dev: true
- /bits-ui@0.5.3(svelte@4.2.0):
- resolution: {integrity: sha512-rDYYACFwiRkPEjUmNX0m59o7dyU5stKC9dLy/XXqGEeu8WAzFCY/I5JtlcXC4nHi9QHyvPBsN901+jNw/5c2Ew==}
+ /bits-ui@0.5.5(svelte@4.2.0):
+ resolution: {integrity: sha512-2OCYPgvFa3JepywlqNtzeGLRmVfYkpM7Yfiqeh8jugi5iIafXBtRLZPw+snHw3RliHAhGX2ya4iY+gdHl7UekA==}
peerDependencies:
svelte: ^4.0.0
dependencies:
- '@melt-ui/svelte': 0.39.3(svelte@4.2.0)
+ '@melt-ui/svelte': 0.40.0(svelte@4.2.0)
nanoid: 4.0.2
svelte: 4.2.0
dev: false
@@ -1846,13 +1834,6 @@ packages:
engines: {node: '>=8'}
dev: true
- /call-bind@1.0.2:
- resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==}
- dependencies:
- function-bind: 1.1.1
- get-intrinsic: 1.2.1
- dev: false
-
/callsites@3.1.0:
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
engines: {node: '>=6'}
@@ -2363,29 +2344,6 @@ packages:
type-detect: 4.0.8
dev: true
- /deep-equal@2.2.2:
- resolution: {integrity: sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA==}
- dependencies:
- array-buffer-byte-length: 1.0.0
- call-bind: 1.0.2
- es-get-iterator: 1.1.3
- get-intrinsic: 1.2.1
- is-arguments: 1.1.1
- is-array-buffer: 3.0.2
- is-date-object: 1.0.5
- is-regex: 1.1.4
- is-shared-array-buffer: 1.0.2
- isarray: 2.0.5
- object-is: 1.1.5
- object-keys: 1.1.1
- object.assign: 4.1.4
- regexp.prototype.flags: 1.5.0
- side-channel: 1.0.4
- which-boxed-primitive: 1.0.2
- which-collection: 1.0.1
- which-typed-array: 1.1.11
- dev: false
-
/deep-is@0.1.4:
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
dev: true
@@ -2394,14 +2352,6 @@ packages:
resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
engines: {node: '>=0.10.0'}
- /define-properties@1.2.0:
- resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==}
- engines: {node: '>= 0.4'}
- dependencies:
- has-property-descriptors: 1.0.0
- object-keys: 1.1.1
- dev: false
-
/delaunator@5.0.0:
resolution: {integrity: sha512-AyLvtyJdbv/U1GkiS6gUUzclRoAY4Gs75qkMygJJhU75LW4DNuSF2RMzpxs9jw9Oz1BobHjTdkG3zdP55VxAqw==}
dependencies:
@@ -2481,20 +2431,6 @@ packages:
is-arrayish: 0.2.1
dev: false
- /es-get-iterator@1.1.3:
- resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==}
- dependencies:
- call-bind: 1.0.2
- get-intrinsic: 1.2.1
- has-symbols: 1.0.3
- is-arguments: 1.1.1
- is-map: 2.0.2
- is-set: 2.0.2
- is-string: 1.0.7
- isarray: 2.0.5
- stop-iteration-iterator: 1.0.0
- dev: false
-
/es6-promise@3.3.1:
resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==}
dev: true
@@ -2805,12 +2741,6 @@ packages:
tabbable: 6.2.0
dev: false
- /for-each@0.3.3:
- resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==}
- dependencies:
- is-callable: 1.2.7
- dev: false
-
/fraction.js@4.2.0:
resolution: {integrity: sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==}
dev: true
@@ -2835,10 +2765,6 @@ packages:
/function-bind@1.1.1:
resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==}
- /functions-have-names@1.2.3:
- resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==}
- dev: false
-
/gauge@3.0.2:
resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==}
engines: {node: '>=10'}
@@ -2867,15 +2793,6 @@ packages:
resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==}
dev: true
- /get-intrinsic@1.2.1:
- resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==}
- dependencies:
- function-bind: 1.1.1
- has: 1.0.3
- has-proto: 1.0.1
- has-symbols: 1.0.3
- dev: false
-
/get-stream@6.0.1:
resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==}
engines: {node: '>=10'}
@@ -2964,12 +2881,6 @@ packages:
slash: 3.0.0
dev: true
- /gopd@1.0.1:
- resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
- dependencies:
- get-intrinsic: 1.2.1
- dev: false
-
/graceful-fs@4.2.11:
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
dev: true
@@ -2978,10 +2889,6 @@ packages:
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
dev: true
- /has-bigints@1.0.2:
- resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==}
- dev: false
-
/has-flag@3.0.0:
resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==}
engines: {node: '>=4'}
@@ -2992,29 +2899,6 @@ packages:
engines: {node: '>=8'}
dev: true
- /has-property-descriptors@1.0.0:
- resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==}
- dependencies:
- get-intrinsic: 1.2.1
- dev: false
-
- /has-proto@1.0.1:
- resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==}
- engines: {node: '>= 0.4'}
- dev: false
-
- /has-symbols@1.0.3:
- resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==}
- engines: {node: '>= 0.4'}
- dev: false
-
- /has-tostringtag@1.0.0:
- resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==}
- engines: {node: '>= 0.4'}
- dependencies:
- has-symbols: 1.0.3
- dev: false
-
/has-unicode@2.0.1:
resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==}
dev: true
@@ -3180,15 +3064,6 @@ packages:
resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==}
dev: false
- /internal-slot@1.0.5:
- resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==}
- engines: {node: '>= 0.4'}
- dependencies:
- get-intrinsic: 1.2.1
- has: 1.0.3
- side-channel: 1.0.4
- dev: false
-
/internmap@1.0.1:
resolution: {integrity: sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==}
dev: false
@@ -3198,68 +3073,26 @@ packages:
engines: {node: '>=12'}
dev: false
- /is-arguments@1.1.1:
- resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- has-tostringtag: 1.0.0
- dev: false
-
- /is-array-buffer@3.0.2:
- resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==}
- dependencies:
- call-bind: 1.0.2
- get-intrinsic: 1.2.1
- is-typed-array: 1.1.12
- dev: false
-
/is-arrayish@0.2.1:
resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==}
dev: false
- /is-bigint@1.0.4:
- resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==}
- dependencies:
- has-bigints: 1.0.2
- dev: false
-
/is-binary-path@2.1.0:
resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
engines: {node: '>=8'}
dependencies:
binary-extensions: 2.2.0
- /is-boolean-object@1.1.2:
- resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- has-tostringtag: 1.0.0
- dev: false
-
/is-buffer@2.0.5:
resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==}
engines: {node: '>=4'}
dev: true
- /is-callable@1.2.7:
- resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==}
- engines: {node: '>= 0.4'}
- dev: false
-
/is-core-module@2.12.0:
resolution: {integrity: sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==}
dependencies:
has: 1.0.3
- /is-date-object@1.0.5:
- resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==}
- engines: {node: '>= 0.4'}
- dependencies:
- has-tostringtag: 1.0.0
- dev: false
-
/is-extglob@2.1.1:
resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
engines: {node: '>=0.10.0'}
@@ -3275,17 +3108,6 @@ packages:
dependencies:
is-extglob: 2.1.1
- /is-map@2.0.2:
- resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==}
- dev: false
-
- /is-number-object@1.0.7:
- resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==}
- engines: {node: '>= 0.4'}
- dependencies:
- has-tostringtag: 1.0.0
- dev: false
-
/is-number@7.0.0:
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
engines: {node: '>=0.12.0'}
@@ -3310,60 +3132,6 @@ packages:
dependencies:
'@types/estree': 1.0.1
- /is-regex@1.1.4:
- resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- has-tostringtag: 1.0.0
- dev: false
-
- /is-set@2.0.2:
- resolution: {integrity: sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==}
- dev: false
-
- /is-shared-array-buffer@1.0.2:
- resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==}
- dependencies:
- call-bind: 1.0.2
- dev: false
-
- /is-string@1.0.7:
- resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==}
- engines: {node: '>= 0.4'}
- dependencies:
- has-tostringtag: 1.0.0
- dev: false
-
- /is-symbol@1.0.4:
- resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==}
- engines: {node: '>= 0.4'}
- dependencies:
- has-symbols: 1.0.3
- dev: false
-
- /is-typed-array@1.1.12:
- resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==}
- engines: {node: '>= 0.4'}
- dependencies:
- which-typed-array: 1.1.11
- dev: false
-
- /is-weakmap@2.0.1:
- resolution: {integrity: sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==}
- dev: false
-
- /is-weakset@2.0.2:
- resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==}
- dependencies:
- call-bind: 1.0.2
- get-intrinsic: 1.2.1
- dev: false
-
- /isarray@2.0.5:
- resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==}
- dev: false
-
/isexe@2.0.0:
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
@@ -4107,33 +3875,6 @@ packages:
resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==}
engines: {node: '>= 6'}
- /object-inspect@1.12.3:
- resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==}
- dev: false
-
- /object-is@1.1.5:
- resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- dev: false
-
- /object-keys@1.1.1:
- resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==}
- engines: {node: '>= 0.4'}
- dev: false
-
- /object.assign@4.1.4:
- resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- has-symbols: 1.0.3
- object-keys: 1.1.1
- dev: false
-
/once@1.4.0:
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
dependencies:
@@ -4477,15 +4218,6 @@ packages:
resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==}
dev: false
- /regexp.prototype.flags@1.5.0:
- resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- functions-have-names: 1.2.3
- dev: false
-
/rehype-pretty-code@0.9.6(shiki@0.14.3):
resolution: {integrity: sha512-l94QKT6w00AIJp1FsbVnbKmcEckKdYkJQfstgiSI4GTt/hSdDrnQRz6rP8r01x1rXNFC2exMG4WY0X7fOpVQGw==}
engines: {node: ^12.16.0 || >=13.2.0}
@@ -4662,14 +4394,6 @@ packages:
vscode-textmate: 8.0.0
dev: true
- /side-channel@1.0.4:
- resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==}
- dependencies:
- call-bind: 1.0.2
- get-intrinsic: 1.2.1
- object-inspect: 1.12.3
- dev: false
-
/siginfo@2.0.0:
resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==}
dev: true
@@ -4741,13 +4465,6 @@ packages:
resolution: {integrity: sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==}
dev: true
- /stop-iteration-iterator@1.0.0:
- resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==}
- engines: {node: '>= 0.4'}
- dependencies:
- internal-slot: 1.0.5
- dev: false
-
/streamsearch@1.1.0:
resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
engines: {node: '>=10.0.0'}
@@ -5543,36 +5260,6 @@ packages:
webidl-conversions: 3.0.1
dev: true
- /which-boxed-primitive@1.0.2:
- resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==}
- dependencies:
- is-bigint: 1.0.4
- is-boolean-object: 1.1.2
- is-number-object: 1.0.7
- is-string: 1.0.7
- is-symbol: 1.0.4
- dev: false
-
- /which-collection@1.0.1:
- resolution: {integrity: sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==}
- dependencies:
- is-map: 2.0.2
- is-set: 2.0.2
- is-weakmap: 2.0.1
- is-weakset: 2.0.2
- dev: false
-
- /which-typed-array@1.1.11:
- resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==}
- engines: {node: '>= 0.4'}
- dependencies:
- available-typed-arrays: 1.0.5
- call-bind: 1.0.2
- for-each: 0.3.3
- gopd: 1.0.1
- has-tostringtag: 1.0.0
- dev: false
-
/which@1.3.1:
resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==}
hasBin: true
diff --git a/apps/www/src/lib/registry/default/ui/sheet/index.ts b/apps/www/src/lib/registry/default/ui/sheet/index.ts
index 7439340bf..a156219bf 100644
--- a/apps/www/src/lib/registry/default/ui/sheet/index.ts
+++ b/apps/www/src/lib/registry/default/ui/sheet/index.ts
@@ -54,24 +54,52 @@ export const sheetVariants = tv({
export const sheetTransitions = {
top: {
- y: "-100%",
- duration: 500,
- opacity: 1
+ in: {
+ y: "-100%",
+ duration: 500,
+ opacity: 1
+ },
+ out: {
+ y: "-100%",
+ duration: 300,
+ opacity: 1
+ }
},
bottom: {
- y: "100%",
- duration: 500,
- opacity: 1
+ in: {
+ y: "100%",
+ duration: 500,
+ opacity: 1
+ },
+ out: {
+ y: "100%",
+ duration: 300,
+ opacity: 1
+ }
},
left: {
- x: "-100%",
- duration: 500,
- opacity: 1
+ in: {
+ x: "-100%",
+ duration: 500,
+ opacity: 1
+ },
+ out: {
+ x: "-100%",
+ duration: 300,
+ opacity: 1
+ }
},
right: {
- x: "100%",
- duration: 500,
- opacity: 1
+ in: {
+ x: "100%",
+ duration: 500,
+ opacity: 1
+ },
+ out: {
+ x: "100%",
+ duration: 300,
+ opacity: 1
+ }
}
};
diff --git a/apps/www/src/lib/registry/default/ui/sheet/sheet-content.svelte b/apps/www/src/lib/registry/default/ui/sheet/sheet-content.svelte
index 119e9bd59..4e51692d6 100644
--- a/apps/www/src/lib/registry/default/ui/sheet/sheet-content.svelte
+++ b/apps/www/src/lib/registry/default/ui/sheet/sheet-content.svelte
@@ -17,17 +17,22 @@
let className: $$Props["class"] = undefined;
export let side: $$Props["side"] = "right";
- export let transition: $$Props["transition"] = fly;
- export let transitionConfig: $$Props["transitionConfig"] =
- sheetTransitions[side ? side : "right"];
export { className as class };
+ export let inTransition: $$Props["inTransition"] = fly;
+ export let inTransitionConfig: $$Props["inTransitionConfig"] =
+ sheetTransitions[side ? side : "right"]["in"];
+ export let outTransition: $$Props["outTransition"] = fly;
+ export let outTransitionConfig: $$Props["outTransitionConfig"] =
+ sheetTransitions[side ? side : "right"]["out"];
diff --git a/apps/www/src/lib/registry/new-york/ui/sheet/index.ts b/apps/www/src/lib/registry/new-york/ui/sheet/index.ts
index 9b7b285f1..b77b56b83 100644
--- a/apps/www/src/lib/registry/new-york/ui/sheet/index.ts
+++ b/apps/www/src/lib/registry/new-york/ui/sheet/index.ts
@@ -54,24 +54,52 @@ export const sheetVariants = tv({
export const sheetTransitions = {
top: {
- y: "-100%",
- duration: 500,
- opacity: 1
+ in: {
+ y: "-100%",
+ duration: 500,
+ opacity: 1
+ },
+ out: {
+ y: "-100%",
+ duration: 300,
+ opacity: 1
+ }
},
bottom: {
- y: "100%",
- duration: 500,
- opacity: 1
+ in: {
+ y: "100%",
+ duration: 500,
+ opacity: 1
+ },
+ out: {
+ y: "100%",
+ duration: 300,
+ opacity: 1
+ }
},
left: {
- x: "-100%",
- duration: 500,
- opacity: 1
+ in: {
+ x: "-100%",
+ duration: 500,
+ opacity: 1
+ },
+ out: {
+ x: "-100%",
+ duration: 300,
+ opacity: 1
+ }
},
right: {
- x: "100%",
- duration: 500,
- opacity: 1
+ in: {
+ x: "100%",
+ duration: 500,
+ opacity: 1
+ },
+ out: {
+ x: "100%",
+ duration: 300,
+ opacity: 1
+ }
}
};
diff --git a/apps/www/src/lib/registry/new-york/ui/sheet/sheet-content.svelte b/apps/www/src/lib/registry/new-york/ui/sheet/sheet-content.svelte
index f1b76d94a..b7c68daaf 100644
--- a/apps/www/src/lib/registry/new-york/ui/sheet/sheet-content.svelte
+++ b/apps/www/src/lib/registry/new-york/ui/sheet/sheet-content.svelte
@@ -18,16 +18,21 @@
let className: $$Props["class"] = undefined;
export let side: $$Props["side"] = "right";
export { className as class };
- export let transition: $$Props["transition"] = fly;
- export let transitionConfig: $$Props["transitionConfig"] =
- sheetTransitions[side ? side : "right"];
+ export let inTransition: $$Props["inTransition"] = fly;
+ export let inTransitionConfig: $$Props["inTransitionConfig"] =
+ sheetTransitions[side ? side : "right"]["in"];
+ export let outTransition: $$Props["outTransition"] = fly;
+ export let outTransitionConfig: $$Props["outTransitionConfig"] =
+ sheetTransitions[side ? side : "right"]["out"];
From 0f71932a3a3913dfe5cfcd4d31e85ffb9d133e8a Mon Sep 17 00:00:00 2001
From: Hunter Johnston <64506580+huntabyte@users.noreply.github.com>
Date: Fri, 1 Sep 2023 14:54:05 -0400
Subject: [PATCH 08/45] update deps (#247)
---
apps/www/package.json | 2 +-
apps/www/pnpm-lock.yaml | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/apps/www/package.json b/apps/www/package.json
index 535999c0b..2c3ad5ce9 100644
--- a/apps/www/package.json
+++ b/apps/www/package.json
@@ -70,7 +70,7 @@
"dependencies": {
"@unovis/svelte": "^1.2.1",
"@unovis/ts": "^1.2.1",
- "bits-ui": "^0.5.5",
+ "bits-ui": "^0.5.6",
"clsx": "^2.0.0",
"d3-scale": "^4.0.2",
"esm-env": "^1.0.0",
diff --git a/apps/www/pnpm-lock.yaml b/apps/www/pnpm-lock.yaml
index acc1d2fb1..9fe08bd5b 100644
--- a/apps/www/pnpm-lock.yaml
+++ b/apps/www/pnpm-lock.yaml
@@ -17,8 +17,8 @@ dependencies:
specifier: ^1.2.1
version: 1.2.1
bits-ui:
- specifier: ^0.5.5
- version: 0.5.5(svelte@4.2.0)
+ specifier: ^0.5.6
+ version: 0.5.6(svelte@4.2.0)
clsx:
specifier: ^2.0.0
version: 2.0.0
@@ -882,8 +882,8 @@ packages:
engines: {node: '>=6.0.0'}
dev: false
- /@melt-ui/svelte@0.40.0(svelte@4.2.0):
- resolution: {integrity: sha512-kVW8ISLlUTpqvRbVXqwWIiS7YuvKAKqbBgCV7BCmbfricvW8M3VqpIOezlu/FRZH30Oqm/nBzeJAgLXc+Y+s3A==}
+ /@melt-ui/svelte@0.41.2(svelte@4.2.0):
+ resolution: {integrity: sha512-B1cNv2kZpu+0aySYk0mWk1xyQ3qgBPEaA5D2/K+iQHC2kVhsFkAShylF57kkHEzBdIuD2SDILwS4l14jMVPQ6w==}
peerDependencies:
svelte: '>=3 <5'
dependencies:
@@ -1776,12 +1776,12 @@ packages:
file-uri-to-path: 1.0.0
dev: true
- /bits-ui@0.5.5(svelte@4.2.0):
- resolution: {integrity: sha512-2OCYPgvFa3JepywlqNtzeGLRmVfYkpM7Yfiqeh8jugi5iIafXBtRLZPw+snHw3RliHAhGX2ya4iY+gdHl7UekA==}
+ /bits-ui@0.5.6(svelte@4.2.0):
+ resolution: {integrity: sha512-qBhozVmS/Gxgtcg3isll74/N9SVDVQQjAknHe3Lh4w1h40oQgx1saOWQjoR6+6FTOLcEv5OohSVfGyob0nLd/A==}
peerDependencies:
svelte: ^4.0.0
dependencies:
- '@melt-ui/svelte': 0.40.0(svelte@4.2.0)
+ '@melt-ui/svelte': 0.41.2(svelte@4.2.0)
nanoid: 4.0.2
svelte: 4.2.0
dev: false
From 47b70080608a8b6a104821e56af8bdfe257f76ab Mon Sep 17 00:00:00 2001
From: Hunter Johnston <64506580+huntabyte@users.noreply.github.com>
Date: Fri, 1 Sep 2023 15:28:12 -0400
Subject: [PATCH 09/45] Strip unicode characters from CLI input (#248)
---
.changeset/healthy-jokes-explain.md | 5 +++++
packages/cli/src/utils/get-config.ts | 8 ++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
create mode 100644 .changeset/healthy-jokes-explain.md
diff --git a/.changeset/healthy-jokes-explain.md b/.changeset/healthy-jokes-explain.md
new file mode 100644
index 000000000..702d3c963
--- /dev/null
+++ b/.changeset/healthy-jokes-explain.md
@@ -0,0 +1,5 @@
+---
+"shadcn-svelte": patch
+---
+
+- Strip unicode characters from CLI input
diff --git a/packages/cli/src/utils/get-config.ts b/packages/cli/src/utils/get-config.ts
index faf387b87..24d6c1900 100644
--- a/packages/cli/src/utils/get-config.ts
+++ b/packages/cli/src/utils/get-config.ts
@@ -25,8 +25,12 @@ export const rawConfigSchema = z
// cssVariables: z.boolean().default(true)
}),
aliases: z.object({
- components: z.string(),
- utils: z.string()
+ components: z
+ .string()
+ .transform((v) => v.replace(/[\u{0080}-\u{FFFF}]/gu, "")),
+ utils: z
+ .string()
+ .transform((v) => v.replace(/[\u{0080}-\u{FFFF}]/gu, ""))
})
})
.strict();
From 2878ad633aa4008a81654a1210953e02d0cbf33b Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Fri, 1 Sep 2023 15:31:25 -0400
Subject: [PATCH 10/45] chore(release): version package (#249)
Co-authored-by: github-actions[bot]
---
.changeset/healthy-jokes-explain.md | 5 -----
packages/cli/CHANGELOG.md | 6 ++++++
packages/cli/package.json | 2 +-
3 files changed, 7 insertions(+), 6 deletions(-)
delete mode 100644 .changeset/healthy-jokes-explain.md
diff --git a/.changeset/healthy-jokes-explain.md b/.changeset/healthy-jokes-explain.md
deleted file mode 100644
index 702d3c963..000000000
--- a/.changeset/healthy-jokes-explain.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"shadcn-svelte": patch
----
-
-- Strip unicode characters from CLI input
diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md
index 69c898e94..53b115f4e 100644
--- a/packages/cli/CHANGELOG.md
+++ b/packages/cli/CHANGELOG.md
@@ -1,5 +1,11 @@
# shadcn-svelte
+## 0.3.2
+
+### Patch Changes
+
+- 47b7008: - Strip unicode characters from CLI input
+
## 0.3.1
### Patch Changes
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 1d8f2208f..af14f5c0b 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -1,6 +1,6 @@
{
"name": "shadcn-svelte",
- "version": "0.3.1",
+ "version": "0.3.2",
"description": "Add components to your apps.",
"publishConfig": {
"access": "public"
From 69cc35ff20ffb25380e2430476ea21806d623d05 Mon Sep 17 00:00:00 2001
From: Stefano Labianca
Date: Sat, 2 Sep 2023 22:34:31 +0200
Subject: [PATCH 11/45] Input layout fix (#253)
---
.../src/lib/registry/default/example/input-with-label.svelte | 2 +-
.../www/src/lib/registry/default/example/input-with-text.svelte | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/www/src/lib/registry/default/example/input-with-label.svelte b/apps/www/src/lib/registry/default/example/input-with-label.svelte
index 3ed27bcaf..7665a8cc2 100644
--- a/apps/www/src/lib/registry/default/example/input-with-label.svelte
+++ b/apps/www/src/lib/registry/default/example/input-with-label.svelte
@@ -3,7 +3,7 @@
import { Label } from "@/registry/default/ui/label";
-
+
Email
diff --git a/apps/www/src/lib/registry/default/example/input-with-text.svelte b/apps/www/src/lib/registry/default/example/input-with-text.svelte
index 96970f8c7..90d9c6e7e 100644
--- a/apps/www/src/lib/registry/default/example/input-with-text.svelte
+++ b/apps/www/src/lib/registry/default/example/input-with-text.svelte
@@ -3,7 +3,7 @@
import { Label } from "@/registry/default/ui/label";
-
+
Email
Enter your email address.
From 8f3382c04154d76a7be234c4827b43fd76d4b92b Mon Sep 17 00:00:00 2001
From: Sebastian Andersson <57641199+HubbeDev@users.noreply.github.com>
Date: Sat, 2 Sep 2023 22:34:47 +0200
Subject: [PATCH 12/45] Updated example 'View code' links for Playground and
Music (#255)
---
apps/www/src/lib/config/docs.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/www/src/lib/config/docs.ts b/apps/www/src/lib/config/docs.ts
index 6a07663bd..f6c3db966 100644
--- a/apps/www/src/lib/config/docs.ts
+++ b/apps/www/src/lib/config/docs.ts
@@ -330,12 +330,12 @@ export const examples: Example[] = [
{
name: "Playground",
href: "/examples/playground",
- code: "https://github.com/huntabyte/shadcn-svelte/tree/main/apps/www/apps/www/app/examples/playground"
+ code: "https://github.com/huntabyte/shadcn-svelte/tree/main/apps/www/src/routes/examples/playground"
},
{
name: "Music",
href: "/examples/music",
- code: "https://github.com/huntabyte/shadcn-svelte/tree/main/apps/www/apps/www/app/examples/music"
+ code: "https://github.com/huntabyte/shadcn-svelte/tree/main/apps/www/src/routes/examples/music"
},
{
name: "Authentication",
From 17284821d961517da9b98f4bf4ea34498d0ad1d4 Mon Sep 17 00:00:00 2001
From: Gautam <93448885+gautam8404@users.noreply.github.com>
Date: Sun, 3 Sep 2023 02:04:56 +0530
Subject: [PATCH 13/45] changed "radix-svelte" to "bits-ui" in collapsible.md
(#254)
---
apps/www/src/content/components/collapsible.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/www/src/content/components/collapsible.md b/apps/www/src/content/components/collapsible.md
index 34f642fd1..d0eba24af 100644
--- a/apps/www/src/content/components/collapsible.md
+++ b/apps/www/src/content/components/collapsible.md
@@ -25,10 +25,10 @@ npx shadcn-svelte@latest add collapsible
-1. Install `radix-svelte`:
+1. Install `bits-ui`:
```bash
-npm install radix-svelte
+npm install bits-ui
```
2. Copy and paste the component source files linked at the top of this page into your project.
From 83311aa0e58a04fbe61b4f0ca2b6c92415165172 Mon Sep 17 00:00:00 2001
From: Jonathan Perchoc
Date: Tue, 5 Sep 2023 00:10:22 +0200
Subject: [PATCH 14/45] fix: data table source link (#258)
---
apps/www/src/content/components/data-table.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/www/src/content/components/data-table.md b/apps/www/src/content/components/data-table.md
index 37132dd2b..99a0b2192 100644
--- a/apps/www/src/content/components/data-table.md
+++ b/apps/www/src/content/components/data-table.md
@@ -2,7 +2,7 @@
title: Data Table
description: Powerful table and datagrids built using Svelte Headless Table.
component: true
-source: https://github.com/huntabyte/shadcn-svelte/tree/main/apps/www/src/lib/registry/default/examples/data-table-demo.svelte
+source: https://github.com/huntabyte/shadcn-svelte/tree/main/apps/www/src/lib/registry/default/example/data-table-demo.svelte
---
+
+Forms are tricky. They are one of the most common things you'll build in a web application, but also one of the most complex.
+
+Well-designed HTML forms are:
+
+- Well-structured and semantically correct.
+- Easy to use and navigate (keyboard).
+- Accessible with ARIA attributes and proper labels.
+- Has support for client and server side validation.
+- Well-styled and consistent with the rest of the application.
+
+In this guide, we will take a look at building forms with [formsnap](https://formsnap.dev), [sveltekit-superforms](https://superforms.rocks) and [zod](https://zod.dev).
+
+## Features
+
+The `Form` components offered by `shadcn-svelte` are wrappers around `formsnap` &`sveltekit-superforms` which provide a few things:
+
+- Composable components for building forms.
+- A ` ` component for building controlled form fields.
+- Form validation using `zod`.
+- Applies the correct `aria` attributes to form fields based on states.
+- Enables you to easily use various components like [Select](/docs/components/select), [RadioGroup](/docs/components/radio-group), [Switch](/docs/components/switch), [Checkbox](/docs/components/checkbox) and other form components as form fields.
+- Provides an optional native ` ` & ` ` with out of the box functionality if you prefer to use native form elements rather than the `bits-ui` components.
+
+If you aren't familiar with [Superforms](https://superforms.rocks) & [Formsnap](https://formsnap.dev), you should check out their documentation first, as this guide assumes you have a basic understanding of how they work together.
+
+## Anatomy
+
+```svelte
+
+
+
+
+
+
+
+
+
+
+```
+
+## Example
+
+```svelte
+
+
+
+
+
+
+
+
+
+
+```
+
+## Installation
+
+```bash
+npx shadcn-svelte@latest add form
+```
+
+## Usage
+
+
+
+### Create a form schema
+
+Define the shape of your form using a Zod schema. You can read more about using Zod in the [Zod documentation](https://zod.dev). We're going to define it in a file called `schema.ts` in the same directly as our page component, but you can put it anywhere you like.
+
+```ts title="src/routes/settings/schema.ts" showLineNumbers
+import { z } from "zod";
+
+export const formSchema = z.object({
+ username: z.string().min(2).max(50)
+});
+
+export type FormSchema = typeof formSchema;
+```
+
+### Return the form the route's load function
+
+```ts title="src/routes/settings/+page.server.ts" showLineNumbers
+import type { PageServerLoad } from "./$types";
+import { superValidate } from "sveltekit-superforms/server";
+import { formSchema } from "./schema";
+
+export const load: PageServerLoad = () => {
+ return {
+ form: superValidate(formSchema)
+ };
+};
+```
+
+### Create a form component
+
+For this example, we'll be passing the `form` returned from the load function as a prop to this component. To ensure it's typed properly, we'll use the `SuperValidated` type from `sveltekit-superforms`, and pass in the type of our form schema.
+
+```svelte title="src/routes/settings/settings-form.svelte" showLineNumbers
+
+
+
+
+
+ Username
+
+ This is your public display name.
+
+
+
+ Submit
+
+```
+
+The `name`, `value`, and all accessibility attributes will be automatically applied to the input thanks to [Formsnap](https://formsnap.dev).
+
+### Create a page component that uses the form
+
+We'll pass the `form` from the data returned from the load function to the form component we created above.
+
+```svelte title="src/routes/settings/+page.svelte" showLineNumbers
+
+
+
+```
+
+### Create an Action that handles the form submission
+
+```ts title="src/routes/settings/+page.server.ts" showLineNumbers {1-2,12-24}
+import type { PageServerLoad, Actions } from "./$types";
+import { fail } from "@sveltejs/kit";
+import { superValidate } from "sveltekit-superforms/server";
+import { formSchema } from "./schema";
+
+export const load: PageServerLoad = () => {
+ return {
+ form: superValidate(formSchema)
+ };
+};
+
+export const actions: Actions = {
+ default: async (event) => {
+ const form = await superValidate(event, formSchema);
+ if (!form.valid) {
+ return fail(400, {
+ form
+ });
+ }
+ return {
+ form
+ };
+ }
+};
+```
+
+### Done
+
+That's it. You now have a fully accessible form that is type-safe and has client & server side validation.
+
+
+
+
+
+## Examples
+
+See the following links for more examples on how to use the other `Form` components:
+
+- [Checkbox](/docs/components/checkbox#form)
+- [Input](/docs/components/input#form)
+- [Radio Group](/docs/components/radio-group#form)
+- [Select](/docs/components/select#form)
+- [Switch](/docs/components/switch#form)
+- [Textarea](/docs/components/textarea#form)
diff --git a/apps/www/src/content/components/input.md b/apps/www/src/content/components/input.md
index 364447418..c816cdbd2 100644
--- a/apps/www/src/content/components/input.md
+++ b/apps/www/src/content/components/input.md
@@ -47,8 +47,6 @@ npx shadcn-svelte@latest add input
----
-
### Disabled
@@ -57,8 +55,6 @@ npx shadcn-svelte@latest add input
----
-
### With Label
@@ -67,8 +63,6 @@ npx shadcn-svelte@latest add input
----
-
### With Text
@@ -77,8 +71,6 @@ npx shadcn-svelte@latest add input
----
-
### With Button
@@ -87,8 +79,6 @@ npx shadcn-svelte@latest add input
----
-
### File
@@ -96,3 +86,13 @@ npx shadcn-svelte@latest add input
+
+### Form
+
+When using the input within a form, you'll want to use the ` ` component instead. This is a wrapper around your existing ` ` component with some additional functionality for forms.
+
+
+
+
+
+
diff --git a/apps/www/src/content/components/radio-group.md b/apps/www/src/content/components/radio-group.md
index edc3a07f9..ef313a1a1 100644
--- a/apps/www/src/content/components/radio-group.md
+++ b/apps/www/src/content/components/radio-group.md
@@ -53,3 +53,15 @@ npm install bits-ui
```
+
+## Examples
+
+### Form
+
+When using a radio group with a form, you'll want to use the `
` and `
` components, which are wrappers around your existing radio group components that nicely handle the form state for you.
+
+
+
+
+
+
diff --git a/apps/www/src/content/components/select.md b/apps/www/src/content/components/select.md
index c965ed816..f25dc4f8c 100644
--- a/apps/www/src/content/components/select.md
+++ b/apps/www/src/content/components/select.md
@@ -52,3 +52,15 @@ npm install bits-ui
```
+
+## Examples
+
+### Form
+
+When using the select component in a form, you'll want to use the `
` component, which is a wrapper around your existing `
` component that makes it seamlessly integrate with forms.
+
+
+
+
+
+
diff --git a/apps/www/src/content/components/switch.md b/apps/www/src/content/components/switch.md
index 29a6ec3b9..f1ac4e473 100644
--- a/apps/www/src/content/components/switch.md
+++ b/apps/www/src/content/components/switch.md
@@ -43,3 +43,15 @@ npm install bits-ui
```
+
+## Examples
+
+### Form
+
+When using the switch component in a form, you'll want to use the `
` component, which is a wrapper around your existing `
` component that makes it seamlessly integrate with forms.
+
+
+
+
+
+
diff --git a/apps/www/src/content/components/textarea.md b/apps/www/src/content/components/textarea.md
index 42dbe0e34..5d6807d76 100644
--- a/apps/www/src/content/components/textarea.md
+++ b/apps/www/src/content/components/textarea.md
@@ -49,8 +49,6 @@ npx shadcn-svelte@latest add textarea
----
-
### Disabled
@@ -59,8 +57,6 @@ npx shadcn-svelte@latest add textarea
----
-
### With Label
@@ -69,8 +65,6 @@ npx shadcn-svelte@latest add textarea
----
-
### With Text
@@ -79,8 +73,6 @@ npx shadcn-svelte@latest add textarea
----
-
### With Button
@@ -88,3 +80,13 @@ npx shadcn-svelte@latest add textarea
+
+### Form
+
+When using the textarea in a form, you'll want to use the `
` component, which is a wrapper around your existing `
` with some additional functionality for seamless form integration.
+
+
+
+
+
+
diff --git a/apps/www/src/content/forms/superforms.md b/apps/www/src/content/forms/superforms.md
deleted file mode 100644
index 35aac366f..000000000
--- a/apps/www/src/content/forms/superforms.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: Superforms
-description: Building forms with Superforms and Zod.
----
diff --git a/apps/www/src/lib/components/docs/component-preview-manual.svelte b/apps/www/src/lib/components/docs/component-preview-manual.svelte
new file mode 100644
index 000000000..c071fda5b
--- /dev/null
+++ b/apps/www/src/lib/components/docs/component-preview-manual.svelte
@@ -0,0 +1,36 @@
+
+
+
diff --git a/apps/www/src/lib/components/docs/component-preview.svelte b/apps/www/src/lib/components/docs/component-preview.svelte
index 4a1a5755a..67b761afb 100644
--- a/apps/www/src/lib/components/docs/component-preview.svelte
+++ b/apps/www/src/lib/components/docs/component-preview.svelte
@@ -17,6 +17,9 @@
export { className as class };
$: component = Index[$config.style][name]?.component();
+
+ /* eslint-disable @typescript-eslint/no-explicit-any */
+ export let form: any;
{:then Component}
-
+
{:catch}
Component{" "}
diff --git a/apps/www/src/lib/components/docs/forms/form-preview.svelte b/apps/www/src/lib/components/docs/forms/form-preview.svelte
new file mode 100644
index 000000000..4fa777811
--- /dev/null
+++ b/apps/www/src/lib/components/docs/forms/form-preview.svelte
@@ -0,0 +1,18 @@
+
+
+
+ {#if $config.style === "new-york"}
+
+ {:else}
+
+ {/if}
+
diff --git a/apps/www/src/lib/components/docs/forms/index.ts b/apps/www/src/lib/components/docs/forms/index.ts
new file mode 100644
index 000000000..70e697022
--- /dev/null
+++ b/apps/www/src/lib/components/docs/forms/index.ts
@@ -0,0 +1 @@
+export { default as FormPreview } from "./form-preview.svelte";
diff --git a/apps/www/src/lib/components/docs/index.ts b/apps/www/src/lib/components/docs/index.ts
index 07e7dca09..64def720d 100644
--- a/apps/www/src/lib/components/docs/index.ts
+++ b/apps/www/src/lib/components/docs/index.ts
@@ -17,6 +17,7 @@ export { default as TableOfContents } from "./table-of-contents.svelte";
export { default as ThemeWrapper } from "./theme-wrapper.svelte";
export { default as Tree } from "./tree.svelte";
export { default as TailwindIndicator } from "./tailwind-indicator.svelte";
+export { default as ComponentPreviewManual } from "./component-preview-manual.svelte";
export * from "./icons";
export * from "./page-header";
@@ -25,3 +26,4 @@ export * from "./examples-nav";
export * from "./dashboard";
export * from "./light-switch";
export * from "./theme-customizer";
+export * from "./forms";
diff --git a/apps/www/src/lib/config/docs.ts b/apps/www/src/lib/config/docs.ts
index f6c3db966..6b466932d 100644
--- a/apps/www/src/lib/config/docs.ts
+++ b/apps/www/src/lib/config/docs.ts
@@ -183,9 +183,8 @@ export const docsConfig: DocsConfig = {
},
{
title: "Form",
- href: "#",
- label: "Soon",
- disabled: true,
+ href: "/docs/components/form",
+ label: "Preview",
items: []
},
{
diff --git a/apps/www/src/lib/registry/default/example/checkbox-form-single.svelte b/apps/www/src/lib/registry/default/example/checkbox-form-single.svelte
new file mode 100644
index 000000000..f24c444e9
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/checkbox-form-single.svelte
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
Use different settings for my mobile devices
+
+ You can manage your mobile notifications in the mobile settings page.
+
+
+
+
+ Submit
+
diff --git a/apps/www/src/lib/registry/default/example/form-demo.svelte b/apps/www/src/lib/registry/default/example/form-demo.svelte
new file mode 100644
index 000000000..1b94464c9
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/form-demo.svelte
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+ Username
+
+ This is your public display name.
+
+
+
+ Submit
+
diff --git a/apps/www/src/lib/registry/default/example/radio-group-form.svelte b/apps/www/src/lib/registry/default/example/radio-group-form.svelte
new file mode 100644
index 000000000..832b13ff3
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/radio-group-form.svelte
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+ Notify me about...
+
+
+
+ All new messages
+
+
+
+ Direct messages and mentions
+
+
+
+ Nothing
+
+
+
+
+
+ Submit
+
diff --git a/apps/www/src/lib/registry/default/example/select-form.svelte b/apps/www/src/lib/registry/default/example/select-form.svelte
new file mode 100644
index 000000000..e789cb86c
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/select-form.svelte
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+ Email
+
+
+
+ m@example.com
+ m@google.com
+ m@support.com
+
+
+
+ You can manage email address in your email settings .
+
+
+
+
+ Submit
+
diff --git a/apps/www/src/lib/registry/default/example/switch-form.svelte b/apps/www/src/lib/registry/default/example/switch-form.svelte
new file mode 100644
index 000000000..e49205bc3
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/switch-form.svelte
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+ Email Notifications
+
+
+
+
+
Marketing emails
+
+ Receive emails about new products, features, and
+ more.
+
+
+
+
+
+
+
+
+
Security emails
+
+ Receive emails about your account security.
+
+
+
+
+
+
+
+ Submit
+
diff --git a/apps/www/src/lib/registry/default/example/textarea-form.svelte b/apps/www/src/lib/registry/default/example/textarea-form.svelte
new file mode 100644
index 000000000..0e8d04fb3
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/textarea-form.svelte
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ Bio
+
+
+ You can @mention other users and organizations.
+
+
+
+
+ Submit
+
diff --git a/apps/www/src/lib/registry/default/ui/button/button.svelte b/apps/www/src/lib/registry/default/ui/button/button.svelte
index ee4f0df0b..53018f528 100644
--- a/apps/www/src/lib/registry/default/ui/button/button.svelte
+++ b/apps/www/src/lib/registry/default/ui/button/button.svelte
@@ -1,13 +1,10 @@
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/form/form-checkbox.svelte b/apps/www/src/lib/registry/default/ui/form/form-checkbox.svelte
new file mode 100644
index 000000000..08c30b4f9
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/form/form-checkbox.svelte
@@ -0,0 +1,25 @@
+
+
+
{
+ onCheckedChange?.(v);
+ setValue(v);
+ }}
+ {...$$restProps}
+ on:click
+ on:keydown
+/>
+
diff --git a/apps/www/src/lib/registry/default/ui/form/form-description.svelte b/apps/www/src/lib/registry/default/ui/form/form-description.svelte
new file mode 100644
index 000000000..248c50352
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/form/form-description.svelte
@@ -0,0 +1,16 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/form/form-input.svelte b/apps/www/src/lib/registry/default/ui/form/form-input.svelte
new file mode 100644
index 000000000..58a970d59
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/form/form-input.svelte
@@ -0,0 +1,28 @@
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/form/form-item.svelte b/apps/www/src/lib/registry/default/ui/form/form-item.svelte
new file mode 100644
index 000000000..fb520ac4d
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/form/form-item.svelte
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/form/form-label.svelte b/apps/www/src/lib/registry/default/ui/form/form-label.svelte
new file mode 100644
index 000000000..c3fd650c5
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/form/form-label.svelte
@@ -0,0 +1,21 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/form/form-native-select.svelte b/apps/www/src/lib/registry/default/ui/form/form-native-select.svelte
new file mode 100644
index 000000000..34afa3ea3
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/form/form-native-select.svelte
@@ -0,0 +1,24 @@
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/form/form-radio-group.svelte b/apps/www/src/lib/registry/default/ui/form/form-radio-group.svelte
new file mode 100644
index 000000000..e18b82881
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/form/form-radio-group.svelte
@@ -0,0 +1,22 @@
+
+
+ {
+ onValueChange?.(v);
+ setValue(v);
+ }}
+ {...$$restProps}
+>
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/form/form-select-trigger.svelte b/apps/www/src/lib/registry/default/ui/form/form-select-trigger.svelte
new file mode 100644
index 000000000..897687fba
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/form/form-select-trigger.svelte
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/form/form-select.svelte b/apps/www/src/lib/registry/default/ui/form/form-select.svelte
new file mode 100644
index 000000000..a5dcb2c45
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/form/form-select.svelte
@@ -0,0 +1,20 @@
+
+
+ {
+ onSelectedChange?.(v);
+ setValue(v ? v.value : undefined);
+ }}
+ {...$$restProps}
+>
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/form/form-switch.svelte b/apps/www/src/lib/registry/default/ui/form/form-switch.svelte
new file mode 100644
index 000000000..d7b9676e6
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/form/form-switch.svelte
@@ -0,0 +1,24 @@
+
+
+ {
+ onCheckedChange?.(v);
+ setValue(v);
+ }}
+ {...$$restProps}
+ on:click
+ on:keydown
+/>
+
diff --git a/apps/www/src/lib/registry/default/ui/form/form-textarea.svelte b/apps/www/src/lib/registry/default/ui/form/form-textarea.svelte
new file mode 100644
index 000000000..ad2545d97
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/form/form-textarea.svelte
@@ -0,0 +1,32 @@
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/form/form-validation.svelte b/apps/www/src/lib/registry/default/ui/form/form-validation.svelte
new file mode 100644
index 000000000..bca5fd48d
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/form/form-validation.svelte
@@ -0,0 +1,14 @@
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/form/index.ts b/apps/www/src/lib/registry/default/ui/form/index.ts
new file mode 100644
index 000000000..67acda7ff
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/form/index.ts
@@ -0,0 +1,82 @@
+import { Form as FormPrimitive, getFormField } from "formsnap";
+import * as RadioGroupComp from "@/registry/default/ui/radio-group";
+import * as SelectComp from "@/registry/default/ui/select";
+import type { Writable } from "svelte/store";
+import Item from "./form-item.svelte";
+import Input from "./form-input.svelte";
+import Textarea from "./form-textarea.svelte";
+import Description from "./form-description.svelte";
+import Label from "./form-label.svelte";
+import Validation from "./form-validation.svelte";
+import Checkbox from "./form-checkbox.svelte";
+import Switch from "./form-switch.svelte";
+import NativeSelect from "./form-native-select.svelte";
+import RadioGroup from "./form-radio-group.svelte";
+import Select from "./form-select.svelte";
+import SelectTrigger from "./form-select-trigger.svelte";
+import Button from "./form-button.svelte";
+
+const Root = FormPrimitive.Root;
+const Field = FormPrimitive.Field;
+const RadioItem = RadioGroupComp.Item;
+const NativeRadio = FormPrimitive.Radio;
+const SelectContent = SelectComp.Content;
+const SelectLabel = SelectComp.Label;
+const SelectGroup = SelectComp.Group;
+const SelectItem = SelectComp.Item;
+const SelectSeparator = SelectComp.Separator;
+
+export type TextareaGetFormField = Omit<
+ ReturnType,
+ "value"
+> & {
+ value: Writable;
+};
+
+export {
+ Root,
+ Field,
+ Item,
+ Input,
+ Label,
+ Button,
+ Switch,
+ Select,
+ Checkbox,
+ Textarea,
+ Validation,
+ RadioGroup,
+ RadioItem,
+ Description,
+ SelectContent,
+ SelectLabel,
+ SelectGroup,
+ SelectItem,
+ SelectSeparator,
+ SelectTrigger,
+ NativeSelect,
+ NativeRadio,
+ //
+ Root as Form,
+ Field as FormField,
+ Item as FormItem,
+ Input as FormInput,
+ Textarea as FormTextarea,
+ Description as FormDescription,
+ Label as FormLabel,
+ Validation as FormValidation,
+ NativeSelect as FormNativeSelect,
+ NativeRadio as FormNativeRadio,
+ Checkbox as FormCheckbox,
+ Switch as FormSwitch,
+ RadioGroup as FormRadioGroup,
+ RadioItem as FormRadioItem,
+ Select as FormSelect,
+ SelectContent as FormSelectContent,
+ SelectLabel as FormSelectLabel,
+ SelectGroup as FormSelectGroup,
+ SelectItem as FormSelectItem,
+ SelectSeparator as FormSelectSeparator,
+ SelectTrigger as FormSelectTrigger,
+ Button as FormButton
+};
diff --git a/apps/www/src/lib/registry/default/ui/textarea/index.ts b/apps/www/src/lib/registry/default/ui/textarea/index.ts
index 99752e957..eb0f7beb4 100644
--- a/apps/www/src/lib/registry/default/ui/textarea/index.ts
+++ b/apps/www/src/lib/registry/default/ui/textarea/index.ts
@@ -1,7 +1,28 @@
import Root from "./textarea.svelte";
+type FormTextareaEvent = T & {
+ currentTarget: EventTarget & HTMLTextAreaElement;
+};
+
+type TextareaEvents = {
+ blur: FormTextareaEvent;
+ change: FormTextareaEvent;
+ click: FormTextareaEvent;
+ focus: FormTextareaEvent;
+ keydown: FormTextareaEvent;
+ keypress: FormTextareaEvent;
+ keyup: FormTextareaEvent;
+ mouseover: FormTextareaEvent;
+ mouseenter: FormTextareaEvent;
+ mouseleave: FormTextareaEvent;
+ paste: FormTextareaEvent;
+ input: FormTextareaEvent;
+};
+
export {
Root,
//
- Root as Textarea
+ Root as Textarea,
+ type TextareaEvents,
+ type FormTextareaEvent
};
diff --git a/apps/www/src/lib/registry/new-york/example/checkbox-form-single.svelte b/apps/www/src/lib/registry/new-york/example/checkbox-form-single.svelte
new file mode 100644
index 000000000..fc52e9d54
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/checkbox-form-single.svelte
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
Use different settings for my mobile devices
+
+ You can manage your mobile notifications in the mobile settings page.
+
+
+
+
+ Submit
+
diff --git a/apps/www/src/lib/registry/new-york/example/form-demo.svelte b/apps/www/src/lib/registry/new-york/example/form-demo.svelte
new file mode 100644
index 000000000..fceb1de61
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/form-demo.svelte
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+ Username
+
+ This is your public display name.
+
+
+
+ Submit
+
diff --git a/apps/www/src/lib/registry/new-york/example/radio-group-form.svelte b/apps/www/src/lib/registry/new-york/example/radio-group-form.svelte
new file mode 100644
index 000000000..939c8094d
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/radio-group-form.svelte
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+ Notify me about...
+
+
+
+ All new messages
+
+
+
+ Direct messages and mentions
+
+
+
+ Nothing
+
+
+
+
+
+ Submit
+
diff --git a/apps/www/src/lib/registry/new-york/example/select-form.svelte b/apps/www/src/lib/registry/new-york/example/select-form.svelte
new file mode 100644
index 000000000..6ac7ffa05
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/select-form.svelte
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+ Email
+
+
+
+ m@example.com
+ m@google.com
+ m@support.com
+
+
+
+ You can manage email address in your email settings .
+
+
+
+
+ Submit
+
diff --git a/apps/www/src/lib/registry/new-york/example/switch-form.svelte b/apps/www/src/lib/registry/new-york/example/switch-form.svelte
new file mode 100644
index 000000000..bbf49edfe
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/switch-form.svelte
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+ Email Notifications
+
+
+
+
+
Marketing emails
+
+ Receive emails about new products, features, and
+ more.
+
+
+
+
+
+
+
+
+
Security emails
+
+ Receive emails about your account security.
+
+
+
+
+
+
+
+ Submit
+
diff --git a/apps/www/src/lib/registry/new-york/example/textarea-form.svelte b/apps/www/src/lib/registry/new-york/example/textarea-form.svelte
new file mode 100644
index 000000000..dda459b4d
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/textarea-form.svelte
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ Bio
+
+
+ You can @mention other users and organizations.
+
+
+
+
+ Submit
+
diff --git a/apps/www/src/lib/registry/new-york/ui/button/button.svelte b/apps/www/src/lib/registry/new-york/ui/button/button.svelte
index 8e5040d04..53018f528 100644
--- a/apps/www/src/lib/registry/new-york/ui/button/button.svelte
+++ b/apps/www/src/lib/registry/new-york/ui/button/button.svelte
@@ -1,14 +1,10 @@
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/form/form-checkbox.svelte b/apps/www/src/lib/registry/new-york/ui/form/form-checkbox.svelte
new file mode 100644
index 000000000..56a6cd788
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/form/form-checkbox.svelte
@@ -0,0 +1,25 @@
+
+
+ {
+ onCheckedChange?.(v);
+ setValue(v);
+ }}
+ {...$$restProps}
+ on:click
+ on:keydown
+/>
+
diff --git a/apps/www/src/lib/registry/new-york/ui/form/form-description.svelte b/apps/www/src/lib/registry/new-york/ui/form/form-description.svelte
new file mode 100644
index 000000000..3714bca3b
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/form/form-description.svelte
@@ -0,0 +1,16 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/form/form-input.svelte b/apps/www/src/lib/registry/new-york/ui/form/form-input.svelte
new file mode 100644
index 000000000..6fdc733fc
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/form/form-input.svelte
@@ -0,0 +1,28 @@
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/form/form-item.svelte b/apps/www/src/lib/registry/new-york/ui/form/form-item.svelte
new file mode 100644
index 000000000..fb520ac4d
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/form/form-item.svelte
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/form/form-label.svelte b/apps/www/src/lib/registry/new-york/ui/form/form-label.svelte
new file mode 100644
index 000000000..4ae7cbbc6
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/form/form-label.svelte
@@ -0,0 +1,21 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/form/form-native-select.svelte b/apps/www/src/lib/registry/new-york/ui/form/form-native-select.svelte
new file mode 100644
index 000000000..25dd6de34
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/form/form-native-select.svelte
@@ -0,0 +1,24 @@
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/form/form-radio-group.svelte b/apps/www/src/lib/registry/new-york/ui/form/form-radio-group.svelte
new file mode 100644
index 000000000..07e382df2
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/form/form-radio-group.svelte
@@ -0,0 +1,22 @@
+
+
+ {
+ onValueChange?.(v);
+ setValue(v);
+ }}
+ {...$$restProps}
+>
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/form/form-select-trigger.svelte b/apps/www/src/lib/registry/new-york/ui/form/form-select-trigger.svelte
new file mode 100644
index 000000000..92a138d5a
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/form/form-select-trigger.svelte
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/form/form-select.svelte b/apps/www/src/lib/registry/new-york/ui/form/form-select.svelte
new file mode 100644
index 000000000..a18683c5a
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/form/form-select.svelte
@@ -0,0 +1,20 @@
+
+
+ {
+ onSelectedChange?.(v);
+ setValue(v ? v.value : undefined);
+ }}
+ {...$$restProps}
+>
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/form/form-switch.svelte b/apps/www/src/lib/registry/new-york/ui/form/form-switch.svelte
new file mode 100644
index 000000000..7ae8b33d2
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/form/form-switch.svelte
@@ -0,0 +1,24 @@
+
+
+ {
+ onCheckedChange?.(v);
+ setValue(v);
+ }}
+ {...$$restProps}
+ on:click
+ on:keydown
+/>
+
diff --git a/apps/www/src/lib/registry/new-york/ui/form/form-textarea.svelte b/apps/www/src/lib/registry/new-york/ui/form/form-textarea.svelte
new file mode 100644
index 000000000..1f7adecfa
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/form/form-textarea.svelte
@@ -0,0 +1,32 @@
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/form/form-validation.svelte b/apps/www/src/lib/registry/new-york/ui/form/form-validation.svelte
new file mode 100644
index 000000000..41aed7ce7
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/form/form-validation.svelte
@@ -0,0 +1,14 @@
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/form/index.ts b/apps/www/src/lib/registry/new-york/ui/form/index.ts
new file mode 100644
index 000000000..2b902ee0d
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/form/index.ts
@@ -0,0 +1,82 @@
+import { Form as FormPrimitive, getFormField } from "formsnap";
+import type { Writable } from "svelte/store";
+import * as RadioGroupComp from "@/registry/new-york/ui/radio-group";
+import * as SelectComp from "@/registry/new-york/ui/select";
+import Item from "./form-item.svelte";
+import Input from "./form-input.svelte";
+import Textarea from "./form-textarea.svelte";
+import Description from "./form-description.svelte";
+import Label from "./form-label.svelte";
+import Validation from "./form-validation.svelte";
+import Checkbox from "./form-checkbox.svelte";
+import Switch from "./form-switch.svelte";
+import NativeSelect from "./form-native-select.svelte";
+import RadioGroup from "./form-radio-group.svelte";
+import Select from "./form-select.svelte";
+import SelectTrigger from "./form-select-trigger.svelte";
+import Button from "./form-button.svelte";
+
+const Root = FormPrimitive.Root;
+const Field = FormPrimitive.Field;
+const RadioItem = RadioGroupComp.Item;
+const NativeRadio = FormPrimitive.Radio;
+const SelectContent = SelectComp.Content;
+const SelectLabel = SelectComp.Label;
+const SelectGroup = SelectComp.Group;
+const SelectItem = SelectComp.Item;
+const SelectSeparator = SelectComp.Separator;
+
+export type TextareaGetFormField = Omit<
+ ReturnType,
+ "value"
+> & {
+ value: Writable;
+};
+
+export {
+ Root,
+ Field,
+ Item,
+ Input,
+ Label,
+ Button,
+ Switch,
+ Select,
+ Checkbox,
+ Textarea,
+ Validation,
+ RadioGroup,
+ RadioItem,
+ Description,
+ SelectContent,
+ SelectLabel,
+ SelectGroup,
+ SelectItem,
+ SelectSeparator,
+ SelectTrigger,
+ NativeSelect,
+ NativeRadio,
+ //
+ Root as Form,
+ Field as FormField,
+ Item as FormItem,
+ Input as FormInput,
+ Textarea as FormTextarea,
+ Description as FormDescription,
+ Label as FormLabel,
+ Validation as FormValidation,
+ NativeSelect as FormNativeSelect,
+ NativeRadio as FormNativeRadio,
+ Checkbox as FormCheckbox,
+ Switch as FormSwitch,
+ RadioGroup as FormRadioGroup,
+ RadioItem as FormRadioItem,
+ Select as FormSelect,
+ SelectContent as FormSelectContent,
+ SelectLabel as FormSelectLabel,
+ SelectGroup as FormSelectGroup,
+ SelectItem as FormSelectItem,
+ SelectSeparator as FormSelectSeparator,
+ SelectTrigger as FormSelectTrigger,
+ Button as FormButton
+};
diff --git a/apps/www/src/lib/registry/new-york/ui/textarea/index.ts b/apps/www/src/lib/registry/new-york/ui/textarea/index.ts
index ea5b0fbcf..eb0f7beb4 100644
--- a/apps/www/src/lib/registry/new-york/ui/textarea/index.ts
+++ b/apps/www/src/lib/registry/new-york/ui/textarea/index.ts
@@ -1,11 +1,28 @@
import Root from "./textarea.svelte";
-export type FormTextareaEvent = T & {
+type FormTextareaEvent = T & {
currentTarget: EventTarget & HTMLTextAreaElement;
};
+type TextareaEvents = {
+ blur: FormTextareaEvent;
+ change: FormTextareaEvent;
+ click: FormTextareaEvent;
+ focus: FormTextareaEvent;
+ keydown: FormTextareaEvent;
+ keypress: FormTextareaEvent;
+ keyup: FormTextareaEvent;
+ mouseover: FormTextareaEvent;
+ mouseenter: FormTextareaEvent;
+ mouseleave: FormTextareaEvent;
+ paste: FormTextareaEvent;
+ input: FormTextareaEvent;
+};
+
export {
Root,
//
- Root as Textarea
+ Root as Textarea,
+ type TextareaEvents,
+ type FormTextareaEvent
};
diff --git a/apps/www/src/lib/registry/new-york/ui/textarea/textarea.svelte b/apps/www/src/lib/registry/new-york/ui/textarea/textarea.svelte
index 52feb1678..833f7458e 100644
--- a/apps/www/src/lib/registry/new-york/ui/textarea/textarea.svelte
+++ b/apps/www/src/lib/registry/new-york/ui/textarea/textarea.svelte
@@ -1,23 +1,10 @@
-
- Name
-
-
- This is the name that will be displayed on your profile and in
- emails.
-
-
-
-
- Language
-
-
-
-
-
-
- {#each languages as language}
-
- {language.label}
-
- {/each}
-
-
-
- This is the language that will be used in the dashboard.
-
-
-
- Update account
+
+
+ Name
+
+
+ This is the name that will be displayed on your profile and in
+ emails.
+
+
+
+
+
+
+ {@const { value } = attrs.input}
+ Language
+
+
+
+ {#each Object.entries(languages) as [value, lang]}
+
+ {lang}
+
+ {/each}
+
+
+
+ This is the language that will be used in the dashboard.
+
+
+
+
+ Update account
diff --git a/apps/www/src/routes/examples/forms/appearance/+page.server.ts b/apps/www/src/routes/examples/forms/appearance/+page.server.ts
index e8cbfbae6..6408191be 100644
--- a/apps/www/src/routes/examples/forms/appearance/+page.server.ts
+++ b/apps/www/src/routes/examples/forms/appearance/+page.server.ts
@@ -1,9 +1,24 @@
import { superValidate } from "sveltekit-superforms/server";
import type { PageServerLoad } from "../$types";
import { appearanceFormSchema } from "./appearance-form.svelte";
+import { fail, type Actions } from "@sveltejs/kit";
export const load: PageServerLoad = async () => {
return {
form: superValidate(appearanceFormSchema)
};
};
+
+export const actions: Actions = {
+ default: async (event) => {
+ const form = await superValidate(event, appearanceFormSchema);
+ if (!form.valid) {
+ return fail(400, {
+ form
+ });
+ }
+ return {
+ form
+ };
+ }
+};
diff --git a/apps/www/src/routes/examples/forms/appearance/appearance-form.svelte b/apps/www/src/routes/examples/forms/appearance/appearance-form.svelte
index 960ed52c7..67be74dbe 100644
--- a/apps/www/src/routes/examples/forms/appearance/appearance-form.svelte
+++ b/apps/www/src/routes/examples/forms/appearance/appearance-form.svelte
@@ -13,134 +13,141 @@
});
export type AppearanceFormSchema = typeof appearanceFormSchema;
- export type AppearanceFormValues = z.infer;
-
- Font
-
-
+
+ Font
+
+
+ Inter
+ Manrope
+ System
+
+
+
+ Set the font you want to use in the dashboard.
+
+
+
+
+
+
+ Theme
+ Select the theme for the dashboard.
- Inter
- Manrope
- System
-
-
-
-
-
- Theme
- Select the theme for the dashboard.
-
-
-
-
+
-
-
-
-
-
+
+
+
-
-
+ class="space-y-2 rounded-md bg-white p-2 shadow-sm"
+ >
+
+
+
-
-
-
+ class="flex items-center space-x-2 rounded-md bg-white p-2 shadow-sm"
+ >
+
+
+
+ class="flex items-center space-x-2 rounded-md bg-white p-2 shadow-sm"
+ >
+
+
+
-
-
- Light
-
-
-
-
-
+ Light
+
+
+
-
-
-
+
+
+
-
-
+ class="space-y-2 rounded-md bg-slate-800 p-2 shadow-sm"
+ >
+
+
+
-
-
-
+ class="flex items-center space-x-2 rounded-md bg-slate-800 p-2 shadow-sm"
+ >
+
+
+
+ class="flex items-center space-x-2 rounded-md bg-slate-800 p-2 shadow-sm"
+ >
+
+
+
-
-
- Dark
-
-
-
-
-
-
Update preferences
+
+ Dark
+
+
+
+
+
+
Update preferences
diff --git a/apps/www/src/routes/examples/forms/notifications/+page.server.ts b/apps/www/src/routes/examples/forms/notifications/+page.server.ts
index fa56ac5c7..614788edd 100644
--- a/apps/www/src/routes/examples/forms/notifications/+page.server.ts
+++ b/apps/www/src/routes/examples/forms/notifications/+page.server.ts
@@ -1,9 +1,24 @@
import { superValidate } from "sveltekit-superforms/server";
import type { PageServerLoad } from "../$types";
import { notificationsFormSchema } from "./notifications-form.svelte";
+import { fail, type Actions } from "@sveltejs/kit";
export const load: PageServerLoad = async () => {
return {
form: superValidate(notificationsFormSchema)
};
};
+
+export const actions: Actions = {
+ default: async (event) => {
+ const form = await superValidate(event, notificationsFormSchema);
+ if (!form.valid) {
+ return fail(400, {
+ form
+ });
+ }
+ return {
+ form
+ };
+ }
+};
diff --git a/apps/www/src/routes/examples/forms/notifications/notifications-form.svelte b/apps/www/src/routes/examples/forms/notifications/notifications-form.svelte
index 50d18a887..7d982a153 100644
--- a/apps/www/src/routes/examples/forms/notifications/notifications-form.svelte
+++ b/apps/www/src/routes/examples/forms/notifications/notifications-form.svelte
@@ -15,155 +15,121 @@
-
- Notify me about...
-
-
-
-
- All new messages
-
-
-
- Direct messages and mentions
-
-
-
- Nothing
-
-
-
+
+
+ Notify me about...
+
+
+
+ All new messages
+
+
+
+ Direct messages and mentions
+
+
+
+ Nothing
+
+
+
+
Email Notifications
-
-
-
Communication emails
-
- Receive emails about your accoutn activity.
-
-
- {@const { value, name, ...rest } = field.attrs}
-
-
+
+
+
+
Communication emails
+
+ Receive emails about your accoutn activity.
+
+
+
+
-
-
-
Marketing emails
-
- Receive emails about new products, features, and more.
-
-
- {@const { value, name, ...rest } = field.attrs}
-
-
+
+
+
+
Marketing emails
+
+ Receive emails about new products, features, and
+ more.
+
+
+
+
-
-
-
Social emails
-
- Receive emails for friend requests, follows, and more.
-
-
- {@const { value, name, ...rest } = field.attrs}
-
-
+
+
+
+
Social emails
+
+ Receive emails for friend requests, follows, and
+ more.
+
+
+
+
-
-
-
Security emails
-
- Receive emails about your account activity and security.
-
-
- {@const { value, name, ...rest } = field.attrs}
-
-
+
+
+
+
Security emails
+
+ Receive emails about your account activity and
+ security.
+
+
+
+
-
- {@const { name, value, ...rest } = field.attrs}
-
-
-
-
Use different settings for my mobile devices
-
- You can manage your mobile notifications in the{" "}mobile settings page.
-
-
+
+
+
+
+
Use different settings for my mobile devices
+
+ You can manage your mobile notifications in the{" "}mobile settings page.
+
+
+
- Update notifications
+ Update notifications
diff --git a/apps/www/src/routes/examples/forms/profile-form.svelte b/apps/www/src/routes/examples/forms/profile-form.svelte
index 142e334e2..f36e82011 100644
--- a/apps/www/src/routes/examples/forms/profile-form.svelte
+++ b/apps/www/src/routes/examples/forms/profile-form.svelte
@@ -9,120 +9,90 @@
.string({ required_error: "Please select an email to display" })
.email(),
bio: z.string().min(4).max(160).default("I own a computer."),
- urls: z
- .array(z.string().url({ message: "Please enter a valid URL." }))
- .optional()
- .default(["https://shadcn.com", "https://x.com/shadcn"])
+ website: z
+ .string()
+ .url({ message: "Please enter a valid URL." })
+ .default("https://shadcn-svelte.com")
});
export type ProfileFormSchema = typeof profileFormSchema;
- export type ProfileFormValues = z.infer
;
-
- Username
-
-
- This is your public display name. It can be your real name or a
- pseudonym. You can only change this once every 30 days.
-
-
-
-
- Email
-
-
-
+
+ Username
+
+
+ This is your public display name. It can be your real name or a
+ pseudonym. You can only change this once every 30 days.
+
+
+
+
+
+
+ Email
+
+
-
-
-
- m@example.com
-
- m@google.com
-
- m@support.com
-
-
-
-
- You can manage verified email addresses in your{" "}email settings .
-
-
-
-
- Bio
-
-
- You can @mention other users and organizations to link to
- them.
-
-
-
-
- {#each formValues.urls as _, i}
-
- URLs
-
- Add links to your website, blog, or social media profiles.
-
-
-
-
- {/each}
- {
- formStore.update((prev) => {
- const urls = prev.urls;
- urls.push("");
- return {
- ...prev,
- urls
- };
- });
- }}
- >
- Add URL
-
-
- Update profile
+
+ m@example.com
+
+ m@google.com
+
+ m@support.com
+
+
+
+
+ You can manage verified email addresses in your email settings .
+
+
+
+
+
+
+ Bio
+
+
+ You can @mention other users and organizations to link
+ to them.
+
+
+
+
+
+
+ Website
+
+
+ Your personal website, blog, or portfolio.
+
+
+
+
+ Update profile
diff --git a/apps/www/src/styles/globals.css b/apps/www/src/styles/globals.css
index 58047b80d..fbc3c2ce3 100644
--- a/apps/www/src/styles/globals.css
+++ b/apps/www/src/styles/globals.css
@@ -229,3 +229,32 @@
[data-rehype-pretty-code-title] + pre {
@apply mt-2;
}
+
+.super-debug {
+ @apply bg-zinc-950 dark:bg-zinc-900 text-[#FFF8] !important;
+}
+
+.super-debug--pre {
+ @apply !bg-transparent !text-[#FFF8];
+}
+
+.super-debug--code {
+ @apply !bg-transparent;
+}
+
+.super-debug--code .key {
+ @apply text-white !important;
+}
+
+.super-debug--code .undefined {
+ @apply !text-[#FFF8];
+}
+.super-debug--code .string {
+ @apply !text-[#FFF8];
+}
+.super-debug--code .number {
+ @apply !text-[#FFF8];
+}
+.super-debug--code .boolean {
+ @apply !text-[#FFF8];
+}
diff --git a/apps/www/static/registry/index.json b/apps/www/static/registry/index.json
index c35a3a700..01b344d3b 100644
--- a/apps/www/static/registry/index.json
+++ b/apps/www/static/registry/index.json
@@ -194,6 +194,40 @@
],
"type": "components:ui"
},
+ {
+ "name": "form",
+ "dependencies": [
+ "formsnap"
+ ],
+ "registryDependencies": [
+ "button",
+ "checkbox",
+ "utils",
+ "input",
+ "label",
+ "radio-group",
+ "select",
+ "switch",
+ "textarea"
+ ],
+ "files": [
+ "ui/form/form-button.svelte",
+ "ui/form/form-checkbox.svelte",
+ "ui/form/form-description.svelte",
+ "ui/form/form-input.svelte",
+ "ui/form/form-item.svelte",
+ "ui/form/form-label.svelte",
+ "ui/form/form-native-select.svelte",
+ "ui/form/form-radio-group.svelte",
+ "ui/form/form-select-trigger.svelte",
+ "ui/form/form-select.svelte",
+ "ui/form/form-switch.svelte",
+ "ui/form/form-textarea.svelte",
+ "ui/form/form-validation.svelte",
+ "ui/form/index.ts"
+ ],
+ "type": "components:ui"
+ },
{
"name": "hover-card",
"dependencies": [
diff --git a/apps/www/static/registry/styles/default/button.json b/apps/www/static/registry/styles/default/button.json
index b6cad6a15..737503990 100644
--- a/apps/www/static/registry/styles/default/button.json
+++ b/apps/www/static/registry/styles/default/button.json
@@ -7,11 +7,11 @@
"files": [
{
"name": "button.svelte",
- "content": "\n\n\n\t \n \n"
+ "content": "\n\n\n\t \n \n"
},
{
"name": "index.ts",
- "content": "import Root from \"./button.svelte\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const buttonVariants = tv({\n\tbase: \"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n\t\t\tdestructive:\n\t\t\t\t\"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n\t\t\toutline:\n\t\t\t\t\"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n\t\t\tsecondary:\n\t\t\t\t\"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n\t\t\tghost: \"hover:bg-accent hover:text-accent-foreground\",\n\t\t\tlink: \"text-primary underline-offset-4 hover:underline\"\n\t\t},\n\t\tsize: {\n\t\t\tdefault: \"h-10 px-4 py-2\",\n\t\t\tsm: \"h-9 rounded-md px-3\",\n\t\t\tlg: \"h-11 rounded-md px-8\",\n\t\t\ticon: \"h-10 w-10\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"default\",\n\t\tsize: \"default\"\n\t}\n});\n\nexport type Variant = VariantProps[\"variant\"];\nexport type Size = VariantProps[\"size\"];\n\nexport {\n\tRoot,\n\t//\n\tRoot as Button\n};\n"
+ "content": "import Root from \"./button.svelte\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport type { Button as ButtonPrimitive } from \"bits-ui\";\n\nconst buttonVariants = tv({\n\tbase: \"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n\t\t\tdestructive:\n\t\t\t\t\"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n\t\t\toutline:\n\t\t\t\t\"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n\t\t\tsecondary:\n\t\t\t\t\"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n\t\t\tghost: \"hover:bg-accent hover:text-accent-foreground\",\n\t\t\tlink: \"text-primary underline-offset-4 hover:underline\"\n\t\t},\n\t\tsize: {\n\t\t\tdefault: \"h-10 px-4 py-2\",\n\t\t\tsm: \"h-9 rounded-md px-3\",\n\t\t\tlg: \"h-11 rounded-md px-8\",\n\t\t\ticon: \"h-10 w-10\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"default\",\n\t\tsize: \"default\"\n\t}\n});\n\ntype Variant = VariantProps[\"variant\"];\ntype Size = VariantProps[\"size\"];\n\ntype Props = ButtonPrimitive.Props & {\n\tvariant?: Variant;\n\tsize?: Size;\n};\n\ntype Events = ButtonPrimitive.Events;\n\nexport {\n\tRoot,\n\ttype Props,\n\ttype Events,\n\t//\n\tRoot as Button,\n\ttype Props as ButtonProps,\n\ttype Events as ButtonEvents,\n\tbuttonVariants\n};\n"
}
],
"type": "components:ui"
diff --git a/apps/www/static/registry/styles/default/form.json b/apps/www/static/registry/styles/default/form.json
index af5d91979..213a10c3c 100644
--- a/apps/www/static/registry/styles/default/form.json
+++ b/apps/www/static/registry/styles/default/form.json
@@ -1,30 +1,75 @@
{
"name": "form",
- "dependencies": [],
+ "dependencies": [
+ "formsnap"
+ ],
"registryDependencies": [
+ "button",
+ "checkbox",
"utils",
- "label"
+ "input",
+ "label",
+ "radio-group",
+ "select",
+ "switch",
+ "textarea"
],
"files": [
+ {
+ "name": "form-button.svelte",
+ "content": "\n\n\n\t \n \n"
+ },
+ {
+ "name": "form-checkbox.svelte",
+ "content": "\n\n {\n\t\tonCheckedChange?.(v);\n\t\tsetValue(v);\n\t}}\n\t{...$$restProps}\n\ton:click\n\ton:keydown\n/>\n \n"
+ },
{
"name": "form-description.svelte",
- "content": "\n\n\n\t \n
\n"
+ "content": "\n\n\n\t \n \n"
},
{
- "name": "form-field.svelte",
- "content": "\n\n\n\t \n
\n"
+ "name": "form-input.svelte",
+ "content": "\n\n \n"
+ },
+ {
+ "name": "form-item.svelte",
+ "content": "\n\n\n\t \n
\n"
},
{
"name": "form-label.svelte",
- "content": "\n\n\n\t \n \n"
+ "content": "\n\n\n\t \n \n"
+ },
+ {
+ "name": "form-native-select.svelte",
+ "content": "\n\n\n\t \n \n \n"
+ },
+ {
+ "name": "form-radio-group.svelte",
+ "content": "\n\n {\n\t\tonValueChange?.(v);\n\t\tsetValue(v);\n\t}}\n\t{...$$restProps}\n>\n\t \n\t \n \n"
+ },
+ {
+ "name": "form-select-trigger.svelte",
+ "content": "\n\n\n\t \n\t \n \n"
+ },
+ {
+ "name": "form-select.svelte",
+ "content": "\n\n {\n\t\tonSelectedChange?.(v);\n\t\tsetValue(v ? v.value : undefined);\n\t}}\n\t{...$$restProps}\n>\n\t \n\t \n \n"
+ },
+ {
+ "name": "form-switch.svelte",
+ "content": "\n\n {\n\t\tonCheckedChange?.(v);\n\t\tsetValue(v);\n\t}}\n\t{...$$restProps}\n\ton:click\n\ton:keydown\n/>\n \n"
+ },
+ {
+ "name": "form-textarea.svelte",
+ "content": "\n\n\n"
},
{
- "name": "form-message.svelte",
- "content": "\n\n{#if $errors}\n\t\n\t\t{$errors}\n\t
\n{/if}\n"
+ "name": "form-validation.svelte",
+ "content": "\n\n \n"
},
{
"name": "index.ts",
- "content": "import type { Writable } from \"svelte/store\";\nimport Description from \"./form-description.svelte\";\nimport Field from \"./form-field.svelte\";\nimport Label from \"./form-label.svelte\";\nimport Message from \"./form-message.svelte\";\n\nexport type FormFieldContext = {\n\tname: string;\n\tformItemId: string;\n\tformDescriptionId: string;\n\tformMessageId: string;\n\terrors: Writable;\n};\n\nexport {\n\tField,\n\tDescription,\n\tLabel,\n\tMessage,\n\t//\n\tField as FormField,\n\tDescription as FormDescription,\n\tLabel as FormLabel,\n\tMessage as FormMessage\n};\n"
+ "content": "import { Form as FormPrimitive, getFormField } from \"formsnap\";\nimport * as RadioGroupComp from \"@/registry/default/ui/radio-group\";\nimport * as SelectComp from \"@/registry/default/ui/select\";\nimport type { Writable } from \"svelte/store\";\nimport Item from \"./form-item.svelte\";\nimport Input from \"./form-input.svelte\";\nimport Textarea from \"./form-textarea.svelte\";\nimport Description from \"./form-description.svelte\";\nimport Label from \"./form-label.svelte\";\nimport Validation from \"./form-validation.svelte\";\nimport Checkbox from \"./form-checkbox.svelte\";\nimport Switch from \"./form-switch.svelte\";\nimport NativeSelect from \"./form-native-select.svelte\";\nimport RadioGroup from \"./form-radio-group.svelte\";\nimport Select from \"./form-select.svelte\";\nimport SelectTrigger from \"./form-select-trigger.svelte\";\nimport Button from \"./form-button.svelte\";\n\nconst Root = FormPrimitive.Root;\nconst Field = FormPrimitive.Field;\nconst RadioItem = RadioGroupComp.Item;\nconst NativeRadio = FormPrimitive.Radio;\nconst SelectContent = SelectComp.Content;\nconst SelectLabel = SelectComp.Label;\nconst SelectGroup = SelectComp.Group;\nconst SelectItem = SelectComp.Item;\nconst SelectSeparator = SelectComp.Separator;\n\nexport type TextareaGetFormField = Omit<\n\tReturnType,\n\t\"value\"\n> & {\n\tvalue: Writable;\n};\n\nexport {\n\tRoot,\n\tField,\n\tItem,\n\tInput,\n\tLabel,\n\tButton,\n\tSwitch,\n\tSelect,\n\tCheckbox,\n\tTextarea,\n\tValidation,\n\tRadioGroup,\n\tRadioItem,\n\tDescription,\n\tSelectContent,\n\tSelectLabel,\n\tSelectGroup,\n\tSelectItem,\n\tSelectSeparator,\n\tSelectTrigger,\n\tNativeSelect,\n\tNativeRadio,\n\t//\n\tRoot as Form,\n\tField as FormField,\n\tItem as FormItem,\n\tInput as FormInput,\n\tTextarea as FormTextarea,\n\tDescription as FormDescription,\n\tLabel as FormLabel,\n\tValidation as FormValidation,\n\tNativeSelect as FormNativeSelect,\n\tNativeRadio as FormNativeRadio,\n\tCheckbox as FormCheckbox,\n\tSwitch as FormSwitch,\n\tRadioGroup as FormRadioGroup,\n\tRadioItem as FormRadioItem,\n\tSelect as FormSelect,\n\tSelectContent as FormSelectContent,\n\tSelectLabel as FormSelectLabel,\n\tSelectGroup as FormSelectGroup,\n\tSelectItem as FormSelectItem,\n\tSelectSeparator as FormSelectSeparator,\n\tSelectTrigger as FormSelectTrigger,\n\tButton as FormButton\n};\n"
}
],
"type": "components:ui"
diff --git a/apps/www/static/registry/styles/default/sheet.json b/apps/www/static/registry/styles/default/sheet.json
index ed292621c..55dcc03e7 100644
--- a/apps/www/static/registry/styles/default/sheet.json
+++ b/apps/www/static/registry/styles/default/sheet.json
@@ -7,11 +7,11 @@
"files": [
{
"name": "index.ts",
- "content": "import { Dialog as SheetPrimitive } from \"bits-ui\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport Portal from \"./sheet-portal.svelte\";\nimport Overlay from \"./sheet-overlay.svelte\";\nimport Content from \"./sheet-content.svelte\";\nimport Header from \"./sheet-header.svelte\";\nimport Footer from \"./sheet-footer.svelte\";\nimport Title from \"./sheet-title.svelte\";\nimport Description from \"./sheet-description.svelte\";\n\nconst Root = SheetPrimitive.Root;\nconst Close = SheetPrimitive.Close;\nconst Trigger = SheetPrimitive.Trigger;\n\nexport {\n\tRoot,\n\tClose,\n\tTrigger,\n\tPortal,\n\tOverlay,\n\tContent,\n\tHeader,\n\tFooter,\n\tTitle,\n\tDescription,\n\t//\n\tRoot as Sheet,\n\tClose as SheetClose,\n\tTrigger as SheetTrigger,\n\tPortal as SheetPortal,\n\tOverlay as SheetOverlay,\n\tContent as SheetContent,\n\tHeader as SheetHeader,\n\tFooter as SheetFooter,\n\tTitle as SheetTitle,\n\tDescription as SheetDescription\n};\n\nexport const sheetVariants = tv({\n\tbase: \"fixed z-50 gap-4 bg-background p-6 shadow-lg\",\n\tvariants: {\n\t\tside: {\n\t\t\ttop: \"inset-x-0 top-0 border-b\",\n\t\t\tbottom: \"inset-x-0 bottom-0 border-t\",\n\t\t\tleft: \"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm\",\n\t\t\tright: \"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tside: \"right\"\n\t}\n});\n\nexport const sheetTransitions = {\n\ttop: {\n\t\ty: \"-100%\",\n\t\tduration: 500,\n\t\topacity: 1\n\t},\n\tbottom: {\n\t\ty: \"100%\",\n\t\tduration: 500,\n\t\topacity: 1\n\t},\n\tleft: {\n\t\tx: \"-100%\",\n\t\tduration: 500,\n\t\topacity: 1\n\t},\n\tright: {\n\t\tx: \"100%\",\n\t\tduration: 500,\n\t\topacity: 1\n\t}\n};\n\nexport type Side = VariantProps[\"side\"];\n"
+ "content": "import { Dialog as SheetPrimitive } from \"bits-ui\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport Portal from \"./sheet-portal.svelte\";\nimport Overlay from \"./sheet-overlay.svelte\";\nimport Content from \"./sheet-content.svelte\";\nimport Header from \"./sheet-header.svelte\";\nimport Footer from \"./sheet-footer.svelte\";\nimport Title from \"./sheet-title.svelte\";\nimport Description from \"./sheet-description.svelte\";\n\nconst Root = SheetPrimitive.Root;\nconst Close = SheetPrimitive.Close;\nconst Trigger = SheetPrimitive.Trigger;\n\nexport {\n\tRoot,\n\tClose,\n\tTrigger,\n\tPortal,\n\tOverlay,\n\tContent,\n\tHeader,\n\tFooter,\n\tTitle,\n\tDescription,\n\t//\n\tRoot as Sheet,\n\tClose as SheetClose,\n\tTrigger as SheetTrigger,\n\tPortal as SheetPortal,\n\tOverlay as SheetOverlay,\n\tContent as SheetContent,\n\tHeader as SheetHeader,\n\tFooter as SheetFooter,\n\tTitle as SheetTitle,\n\tDescription as SheetDescription\n};\n\nexport const sheetVariants = tv({\n\tbase: \"fixed z-50 gap-4 bg-background p-6 shadow-lg\",\n\tvariants: {\n\t\tside: {\n\t\t\ttop: \"inset-x-0 top-0 border-b\",\n\t\t\tbottom: \"inset-x-0 bottom-0 border-t\",\n\t\t\tleft: \"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm\",\n\t\t\tright: \"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tside: \"right\"\n\t}\n});\n\nexport const sheetTransitions = {\n\ttop: {\n\t\tin: {\n\t\t\ty: \"-100%\",\n\t\t\tduration: 500,\n\t\t\topacity: 1\n\t\t},\n\t\tout: {\n\t\t\ty: \"-100%\",\n\t\t\tduration: 300,\n\t\t\topacity: 1\n\t\t}\n\t},\n\tbottom: {\n\t\tin: {\n\t\t\ty: \"100%\",\n\t\t\tduration: 500,\n\t\t\topacity: 1\n\t\t},\n\t\tout: {\n\t\t\ty: \"100%\",\n\t\t\tduration: 300,\n\t\t\topacity: 1\n\t\t}\n\t},\n\tleft: {\n\t\tin: {\n\t\t\tx: \"-100%\",\n\t\t\tduration: 500,\n\t\t\topacity: 1\n\t\t},\n\t\tout: {\n\t\t\tx: \"-100%\",\n\t\t\tduration: 300,\n\t\t\topacity: 1\n\t\t}\n\t},\n\tright: {\n\t\tin: {\n\t\t\tx: \"100%\",\n\t\t\tduration: 500,\n\t\t\topacity: 1\n\t\t},\n\t\tout: {\n\t\t\tx: \"100%\",\n\t\t\tduration: 300,\n\t\t\topacity: 1\n\t\t}\n\t}\n};\n\nexport type Side = VariantProps[\"side\"];\n"
},
{
"name": "sheet-content.svelte",
- "content": "\n\n\n\t \n\t\n\t\t \n\t\t\n\t\t\t \n\t\t\tClose \n\t\t \n\t \n \n"
+ "content": "\n\n\n\t \n\t\n\t\t \n\t\t\n\t\t\t \n\t\t\tClose \n\t\t \n\t \n \n"
},
{
"name": "sheet-description.svelte",
diff --git a/apps/www/static/registry/styles/default/textarea.json b/apps/www/static/registry/styles/default/textarea.json
index 1305eaea5..b5d8b44d9 100644
--- a/apps/www/static/registry/styles/default/textarea.json
+++ b/apps/www/static/registry/styles/default/textarea.json
@@ -5,7 +5,7 @@
"files": [
{
"name": "index.ts",
- "content": "import Root from \"./textarea.svelte\";\n\nexport {\n\tRoot,\n\t//\n\tRoot as Textarea\n};\n"
+ "content": "import Root from \"./textarea.svelte\";\n\ntype FormTextareaEvent = T & {\n\tcurrentTarget: EventTarget & HTMLTextAreaElement;\n};\n\ntype TextareaEvents = {\n\tblur: FormTextareaEvent;\n\tchange: FormTextareaEvent;\n\tclick: FormTextareaEvent;\n\tfocus: FormTextareaEvent;\n\tkeydown: FormTextareaEvent;\n\tkeypress: FormTextareaEvent;\n\tkeyup: FormTextareaEvent;\n\tmouseover: FormTextareaEvent;\n\tmouseenter: FormTextareaEvent;\n\tmouseleave: FormTextareaEvent;\n\tpaste: FormTextareaEvent;\n\tinput: FormTextareaEvent;\n};\n\nexport {\n\tRoot,\n\t//\n\tRoot as Textarea,\n\ttype TextareaEvents,\n\ttype FormTextareaEvent\n};\n"
},
{
"name": "textarea.svelte",
diff --git a/apps/www/static/registry/styles/new-york/button.json b/apps/www/static/registry/styles/new-york/button.json
index 5a55f5e03..37859598a 100644
--- a/apps/www/static/registry/styles/new-york/button.json
+++ b/apps/www/static/registry/styles/new-york/button.json
@@ -7,11 +7,11 @@
"files": [
{
"name": "button.svelte",
- "content": "\n\n\n\t \n \n"
+ "content": "\n\n\n\t \n \n"
},
{
"name": "index.ts",
- "content": "import type { Button as ButtonPrimitive } from \"bits-ui\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport Root from \"./button.svelte\";\n\nconst buttonVariants = tv({\n\tbase: \"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault:\n\t\t\t\t\"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n\t\t\tdestructive:\n\t\t\t\t\"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n\t\t\toutline:\n\t\t\t\t\"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground\",\n\t\t\tsecondary:\n\t\t\t\t\"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n\t\t\tghost: \"hover:bg-accent hover:text-accent-foreground\",\n\t\t\tlink: \"text-primary underline-offset-4 hover:underline\"\n\t\t},\n\t\tsize: {\n\t\t\tdefault: \"h-9 px-4 py-2\",\n\t\t\tsm: \"h-8 rounded-md px-3 text-xs\",\n\t\t\tlg: \"h-10 rounded-md px-8\",\n\t\t\ticon: \"h-9 w-9\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"default\",\n\t\tsize: \"default\"\n\t}\n});\n\ntype Variant = VariantProps[\"variant\"];\ntype Size = VariantProps[\"size\"];\n\ntype Props = ButtonPrimitive.Props & {\n\tvariant?: Variant;\n\tsize?: Size;\n};\n\nexport {\n\tRoot,\n\tRoot as Button,\n\t//\n\ttype Props,\n\ttype Props as ButtonProps,\n\t//\n\tbuttonVariants,\n\ttype Variant as ButtonVariant,\n\ttype Size as ButtonSize\n};\n"
+ "content": "import type { Button as ButtonPrimitive } from \"bits-ui\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport Root from \"./button.svelte\";\n\nconst buttonVariants = tv({\n\tbase: \"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault:\n\t\t\t\t\"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n\t\t\tdestructive:\n\t\t\t\t\"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n\t\t\toutline:\n\t\t\t\t\"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground\",\n\t\t\tsecondary:\n\t\t\t\t\"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n\t\t\tghost: \"hover:bg-accent hover:text-accent-foreground\",\n\t\t\tlink: \"text-primary underline-offset-4 hover:underline\"\n\t\t},\n\t\tsize: {\n\t\t\tdefault: \"h-9 px-4 py-2\",\n\t\t\tsm: \"h-8 rounded-md px-3 text-xs\",\n\t\t\tlg: \"h-10 rounded-md px-8\",\n\t\t\ticon: \"h-9 w-9\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"default\",\n\t\tsize: \"default\"\n\t}\n});\n\ntype Variant = VariantProps[\"variant\"];\ntype Size = VariantProps[\"size\"];\n\ntype Props = ButtonPrimitive.Props & {\n\tvariant?: Variant;\n\tsize?: Size;\n};\n\ntype Events = ButtonPrimitive.Events;\n\nexport {\n\tRoot,\n\ttype Props,\n\ttype Events,\n\t//\n\tRoot as Button,\n\ttype Props as ButtonProps,\n\ttype Events as ButtonEvents,\n\tbuttonVariants\n};\n"
}
],
"type": "components:ui"
diff --git a/apps/www/static/registry/styles/new-york/form.json b/apps/www/static/registry/styles/new-york/form.json
index 3719c6fb6..4285362ac 100644
--- a/apps/www/static/registry/styles/new-york/form.json
+++ b/apps/www/static/registry/styles/new-york/form.json
@@ -1,30 +1,75 @@
{
"name": "form",
- "dependencies": [],
+ "dependencies": [
+ "formsnap"
+ ],
"registryDependencies": [
+ "button",
+ "checkbox",
"utils",
- "label"
+ "input",
+ "label",
+ "radio-group",
+ "select",
+ "switch",
+ "textarea"
],
"files": [
+ {
+ "name": "form-button.svelte",
+ "content": "\n\n\n\t \n \n"
+ },
+ {
+ "name": "form-checkbox.svelte",
+ "content": "\n\n {\n\t\tonCheckedChange?.(v);\n\t\tsetValue(v);\n\t}}\n\t{...$$restProps}\n\ton:click\n\ton:keydown\n/>\n \n"
+ },
{
"name": "form-description.svelte",
- "content": "\n\n\n\t \n
\n"
+ "content": "\n\n\n\t \n \n"
},
{
- "name": "form-field.svelte",
- "content": "\n\n\n\t \n
\n"
+ "name": "form-input.svelte",
+ "content": "\n\n \n"
+ },
+ {
+ "name": "form-item.svelte",
+ "content": "\n\n\n\t \n
\n"
},
{
"name": "form-label.svelte",
- "content": "\n\n\n\t \n \n"
+ "content": "\n\n\n\t \n \n"
+ },
+ {
+ "name": "form-native-select.svelte",
+ "content": "\n\n\n\t \n \n \n"
+ },
+ {
+ "name": "form-radio-group.svelte",
+ "content": "\n\n {\n\t\tonValueChange?.(v);\n\t\tsetValue(v);\n\t}}\n\t{...$$restProps}\n>\n\t \n\t \n \n"
+ },
+ {
+ "name": "form-select-trigger.svelte",
+ "content": "\n\n\n\t \n\t \n \n"
+ },
+ {
+ "name": "form-select.svelte",
+ "content": "\n\n {\n\t\tonSelectedChange?.(v);\n\t\tsetValue(v ? v.value : undefined);\n\t}}\n\t{...$$restProps}\n>\n\t \n\t \n \n"
+ },
+ {
+ "name": "form-switch.svelte",
+ "content": "\n\n {\n\t\tonCheckedChange?.(v);\n\t\tsetValue(v);\n\t}}\n\t{...$$restProps}\n\ton:click\n\ton:keydown\n/>\n \n"
+ },
+ {
+ "name": "form-textarea.svelte",
+ "content": "\n\n\n"
},
{
- "name": "form-message.svelte",
- "content": "\n\n{#if $errors}\n\t\n\t\t{$errors}\n\t
\n{/if}\n"
+ "name": "form-validation.svelte",
+ "content": "\n\n \n"
},
{
"name": "index.ts",
- "content": "import type { Writable } from \"svelte/store\";\nimport Description from \"./form-description.svelte\";\nimport Field from \"./form-field.svelte\";\nimport Label from \"./form-label.svelte\";\nimport Message from \"./form-message.svelte\";\n\nexport type FormFieldContext = {\n\tname: string;\n\tformItemId: string;\n\tformDescriptionId: string;\n\tformMessageId: string;\n\terrors: Writable;\n};\n\nexport {\n\tField,\n\tDescription,\n\tLabel,\n\tMessage,\n\t//\n\tField as FormField,\n\tDescription as FormDescription,\n\tLabel as FormLabel,\n\tMessage as FormMessage\n};\n"
+ "content": "import { Form as FormPrimitive, getFormField } from \"formsnap\";\nimport type { Writable } from \"svelte/store\";\nimport * as RadioGroupComp from \"@/registry/new-york/ui/radio-group\";\nimport * as SelectComp from \"@/registry/new-york/ui/select\";\nimport Item from \"./form-item.svelte\";\nimport Input from \"./form-input.svelte\";\nimport Textarea from \"./form-textarea.svelte\";\nimport Description from \"./form-description.svelte\";\nimport Label from \"./form-label.svelte\";\nimport Validation from \"./form-validation.svelte\";\nimport Checkbox from \"./form-checkbox.svelte\";\nimport Switch from \"./form-switch.svelte\";\nimport NativeSelect from \"./form-native-select.svelte\";\nimport RadioGroup from \"./form-radio-group.svelte\";\nimport Select from \"./form-select.svelte\";\nimport SelectTrigger from \"./form-select-trigger.svelte\";\nimport Button from \"./form-button.svelte\";\n\nconst Root = FormPrimitive.Root;\nconst Field = FormPrimitive.Field;\nconst RadioItem = RadioGroupComp.Item;\nconst NativeRadio = FormPrimitive.Radio;\nconst SelectContent = SelectComp.Content;\nconst SelectLabel = SelectComp.Label;\nconst SelectGroup = SelectComp.Group;\nconst SelectItem = SelectComp.Item;\nconst SelectSeparator = SelectComp.Separator;\n\nexport type TextareaGetFormField = Omit<\n\tReturnType,\n\t\"value\"\n> & {\n\tvalue: Writable;\n};\n\nexport {\n\tRoot,\n\tField,\n\tItem,\n\tInput,\n\tLabel,\n\tButton,\n\tSwitch,\n\tSelect,\n\tCheckbox,\n\tTextarea,\n\tValidation,\n\tRadioGroup,\n\tRadioItem,\n\tDescription,\n\tSelectContent,\n\tSelectLabel,\n\tSelectGroup,\n\tSelectItem,\n\tSelectSeparator,\n\tSelectTrigger,\n\tNativeSelect,\n\tNativeRadio,\n\t//\n\tRoot as Form,\n\tField as FormField,\n\tItem as FormItem,\n\tInput as FormInput,\n\tTextarea as FormTextarea,\n\tDescription as FormDescription,\n\tLabel as FormLabel,\n\tValidation as FormValidation,\n\tNativeSelect as FormNativeSelect,\n\tNativeRadio as FormNativeRadio,\n\tCheckbox as FormCheckbox,\n\tSwitch as FormSwitch,\n\tRadioGroup as FormRadioGroup,\n\tRadioItem as FormRadioItem,\n\tSelect as FormSelect,\n\tSelectContent as FormSelectContent,\n\tSelectLabel as FormSelectLabel,\n\tSelectGroup as FormSelectGroup,\n\tSelectItem as FormSelectItem,\n\tSelectSeparator as FormSelectSeparator,\n\tSelectTrigger as FormSelectTrigger,\n\tButton as FormButton\n};\n"
}
],
"type": "components:ui"
diff --git a/apps/www/static/registry/styles/new-york/sheet.json b/apps/www/static/registry/styles/new-york/sheet.json
index 16cb9dbe7..37d4b30dd 100644
--- a/apps/www/static/registry/styles/new-york/sheet.json
+++ b/apps/www/static/registry/styles/new-york/sheet.json
@@ -7,11 +7,11 @@
"files": [
{
"name": "index.ts",
- "content": "import { Dialog as SheetPrimitive } from \"bits-ui\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport Portal from \"./sheet-portal.svelte\";\nimport Overlay from \"./sheet-overlay.svelte\";\nimport Content from \"./sheet-content.svelte\";\nimport Header from \"./sheet-header.svelte\";\nimport Footer from \"./sheet-footer.svelte\";\nimport Title from \"./sheet-title.svelte\";\nimport Description from \"./sheet-description.svelte\";\n\nconst Root = SheetPrimitive.Root;\nconst Close = SheetPrimitive.Close;\nconst Trigger = SheetPrimitive.Trigger;\n\nexport {\n\tRoot,\n\tClose,\n\tTrigger,\n\tPortal,\n\tOverlay,\n\tContent,\n\tHeader,\n\tFooter,\n\tTitle,\n\tDescription,\n\t//\n\tRoot as Sheet,\n\tClose as SheetClose,\n\tTrigger as SheetTrigger,\n\tPortal as SheetPortal,\n\tOverlay as SheetOverlay,\n\tContent as SheetContent,\n\tHeader as SheetHeader,\n\tFooter as SheetFooter,\n\tTitle as SheetTitle,\n\tDescription as SheetDescription\n};\n\nexport const sheetVariants = tv({\n\tbase: \"fixed z-50 gap-4 bg-background p-6 shadow-lg\",\n\tvariants: {\n\t\tside: {\n\t\t\ttop: \"inset-x-0 top-0 border-b \",\n\t\t\tbottom: \"inset-x-0 bottom-0 border-t\",\n\t\t\tleft: \"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm\",\n\t\t\tright: \"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tside: \"right\"\n\t}\n});\n\nexport type Side = VariantProps[\"side\"];\n"
+ "content": "import { Dialog as SheetPrimitive } from \"bits-ui\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport Portal from \"./sheet-portal.svelte\";\nimport Overlay from \"./sheet-overlay.svelte\";\nimport Content from \"./sheet-content.svelte\";\nimport Header from \"./sheet-header.svelte\";\nimport Footer from \"./sheet-footer.svelte\";\nimport Title from \"./sheet-title.svelte\";\nimport Description from \"./sheet-description.svelte\";\n\nconst Root = SheetPrimitive.Root;\nconst Close = SheetPrimitive.Close;\nconst Trigger = SheetPrimitive.Trigger;\n\nexport {\n\tRoot,\n\tClose,\n\tTrigger,\n\tPortal,\n\tOverlay,\n\tContent,\n\tHeader,\n\tFooter,\n\tTitle,\n\tDescription,\n\t//\n\tRoot as Sheet,\n\tClose as SheetClose,\n\tTrigger as SheetTrigger,\n\tPortal as SheetPortal,\n\tOverlay as SheetOverlay,\n\tContent as SheetContent,\n\tHeader as SheetHeader,\n\tFooter as SheetFooter,\n\tTitle as SheetTitle,\n\tDescription as SheetDescription\n};\n\nexport const sheetVariants = tv({\n\tbase: \"fixed z-50 gap-4 bg-background p-6 shadow-lg\",\n\tvariants: {\n\t\tside: {\n\t\t\ttop: \"inset-x-0 top-0 border-b \",\n\t\t\tbottom: \"inset-x-0 bottom-0 border-t\",\n\t\t\tleft: \"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm\",\n\t\t\tright: \"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tside: \"right\"\n\t}\n});\n\nexport const sheetTransitions = {\n\ttop: {\n\t\tin: {\n\t\t\ty: \"-100%\",\n\t\t\tduration: 500,\n\t\t\topacity: 1\n\t\t},\n\t\tout: {\n\t\t\ty: \"-100%\",\n\t\t\tduration: 300,\n\t\t\topacity: 1\n\t\t}\n\t},\n\tbottom: {\n\t\tin: {\n\t\t\ty: \"100%\",\n\t\t\tduration: 500,\n\t\t\topacity: 1\n\t\t},\n\t\tout: {\n\t\t\ty: \"100%\",\n\t\t\tduration: 300,\n\t\t\topacity: 1\n\t\t}\n\t},\n\tleft: {\n\t\tin: {\n\t\t\tx: \"-100%\",\n\t\t\tduration: 500,\n\t\t\topacity: 1\n\t\t},\n\t\tout: {\n\t\t\tx: \"-100%\",\n\t\t\tduration: 300,\n\t\t\topacity: 1\n\t\t}\n\t},\n\tright: {\n\t\tin: {\n\t\t\tx: \"100%\",\n\t\t\tduration: 500,\n\t\t\topacity: 1\n\t\t},\n\t\tout: {\n\t\t\tx: \"100%\",\n\t\t\tduration: 300,\n\t\t\topacity: 1\n\t\t}\n\t}\n};\n\nexport type Side = VariantProps[\"side\"];\n"
},
{
"name": "sheet-content.svelte",
- "content": "\n\n\n\t \n\t\n\t\t \n\t\t\n\t\t\t \n\t\t\tClose \n\t\t \n\t \n \n"
+ "content": "\n\n\n\t \n\t\n\t\t \n\t\t\n\t\t\t \n\t\t\tClose \n\t\t \n\t \n \n"
},
{
"name": "sheet-description.svelte",
@@ -27,7 +27,7 @@
},
{
"name": "sheet-overlay.svelte",
- "content": "\n\n \n"
+ "content": "\n\n \n"
},
{
"name": "sheet-portal.svelte",
diff --git a/apps/www/static/registry/styles/new-york/textarea.json b/apps/www/static/registry/styles/new-york/textarea.json
index 647dea033..dfb471111 100644
--- a/apps/www/static/registry/styles/new-york/textarea.json
+++ b/apps/www/static/registry/styles/new-york/textarea.json
@@ -5,11 +5,11 @@
"files": [
{
"name": "index.ts",
- "content": "import Root from \"./textarea.svelte\";\n\nexport type FormTextareaEvent = T & {\n\tcurrentTarget: EventTarget & HTMLTextAreaElement;\n};\n\nexport {\n\tRoot,\n\t//\n\tRoot as Textarea\n};\n"
+ "content": "import Root from \"./textarea.svelte\";\n\ntype FormTextareaEvent = T & {\n\tcurrentTarget: EventTarget & HTMLTextAreaElement;\n};\n\ntype TextareaEvents = {\n\tblur: FormTextareaEvent;\n\tchange: FormTextareaEvent;\n\tclick: FormTextareaEvent;\n\tfocus: FormTextareaEvent;\n\tkeydown: FormTextareaEvent;\n\tkeypress: FormTextareaEvent;\n\tkeyup: FormTextareaEvent;\n\tmouseover: FormTextareaEvent;\n\tmouseenter: FormTextareaEvent;\n\tmouseleave: FormTextareaEvent;\n\tpaste: FormTextareaEvent;\n\tinput: FormTextareaEvent;\n};\n\nexport {\n\tRoot,\n\t//\n\tRoot as Textarea,\n\ttype TextareaEvents,\n\ttype FormTextareaEvent\n};\n"
},
{
"name": "textarea.svelte",
- "content": "\n\n\n"
+ "content": "\n\n\n"
}
],
"type": "components:ui"
diff --git a/package.json b/package.json
index dd07e0671..74b5f7fef 100644
--- a/package.json
+++ b/package.json
@@ -29,7 +29,6 @@
"pub:beta": "cd packages/cli && pnpm pub:beta",
"pub:release": "cd packages/cli && pnpm pub:release"
},
- "packageManager": "pnpm@8.5.1",
"engines": {
"pnpm": ">=8"
},
From df332a37352bc2144c5e87e0ca2459a1240ef9dc Mon Sep 17 00:00:00 2001
From: Hunter Johnston <64506580+huntabyte@users.noreply.github.com>
Date: Tue, 5 Sep 2023 16:42:23 -0400
Subject: [PATCH 16/45] Add form announcement (#262)
---
apps/www/src/routes/+page.svelte | 6 +++---
apps/www/static/registry/index.json | 4 +++-
apps/www/static/registry/styles/default/form.json | 4 +++-
apps/www/static/registry/styles/new-york/form.json | 4 +++-
4 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/apps/www/src/routes/+page.svelte b/apps/www/src/routes/+page.svelte
index 446f8e9c9..80edbb5bb 100644
--- a/apps/www/src/routes/+page.svelte
+++ b/apps/www/src/routes/+page.svelte
@@ -14,10 +14,10 @@
- 🎉 New CLI, Styles,
- Themes, & Components!
+ 🎉 Form components,
+ now in preview!
Build your component library.
diff --git a/apps/www/static/registry/index.json b/apps/www/static/registry/index.json
index 01b344d3b..864d6d311 100644
--- a/apps/www/static/registry/index.json
+++ b/apps/www/static/registry/index.json
@@ -197,7 +197,9 @@
{
"name": "form",
"dependencies": [
- "formsnap"
+ "formsnap",
+ "zod",
+ "sveltekit-superforms"
],
"registryDependencies": [
"button",
diff --git a/apps/www/static/registry/styles/default/form.json b/apps/www/static/registry/styles/default/form.json
index 213a10c3c..a7bf11a6c 100644
--- a/apps/www/static/registry/styles/default/form.json
+++ b/apps/www/static/registry/styles/default/form.json
@@ -1,7 +1,9 @@
{
"name": "form",
"dependencies": [
- "formsnap"
+ "formsnap",
+ "zod",
+ "sveltekit-superforms"
],
"registryDependencies": [
"button",
diff --git a/apps/www/static/registry/styles/new-york/form.json b/apps/www/static/registry/styles/new-york/form.json
index 4285362ac..e9095495a 100644
--- a/apps/www/static/registry/styles/new-york/form.json
+++ b/apps/www/static/registry/styles/new-york/form.json
@@ -1,7 +1,9 @@
{
"name": "form",
"dependencies": [
- "formsnap"
+ "formsnap",
+ "zod",
+ "sveltekit-superforms"
],
"registryDependencies": [
"button",
From 5c128f228dd54451d4628b0f22eea472a47f3a73 Mon Sep 17 00:00:00 2001
From: CokaKoala <31664583+AdrianGonz97@users.noreply.github.com>
Date: Tue, 5 Sep 2023 18:01:51 -0400
Subject: [PATCH 17/45] Fixed the import path for `utils` (#264)
---
.../src/lib/registry/default/ui/form/form-description.svelte | 2 +-
apps/www/src/lib/registry/default/ui/form/form-item.svelte | 2 +-
apps/www/src/lib/registry/default/ui/form/form-label.svelte | 2 +-
.../src/lib/registry/default/ui/form/form-native-select.svelte | 2 +-
.../www/src/lib/registry/default/ui/form/form-validation.svelte | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/apps/www/src/lib/registry/default/ui/form/form-description.svelte b/apps/www/src/lib/registry/default/ui/form/form-description.svelte
index 248c50352..6efa0e5b6 100644
--- a/apps/www/src/lib/registry/default/ui/form/form-description.svelte
+++ b/apps/www/src/lib/registry/default/ui/form/form-description.svelte
@@ -1,6 +1,6 @@
\n\n\n\t \n \n"
+ "content": "\n\n\n\t \n \n"
},
{
"name": "alert-dialog-cancel.svelte",
- "content": "\n\n\n\t \n \n"
+ "content": "\n\n\n\t \n \n"
},
{
"name": "alert-dialog-content.svelte",
diff --git a/apps/www/static/registry/styles/default/button.json b/apps/www/static/registry/styles/default/button.json
index 737503990..2a3c3edb6 100644
--- a/apps/www/static/registry/styles/default/button.json
+++ b/apps/www/static/registry/styles/default/button.json
@@ -11,7 +11,7 @@
},
{
"name": "index.ts",
- "content": "import Root from \"./button.svelte\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport type { Button as ButtonPrimitive } from \"bits-ui\";\n\nconst buttonVariants = tv({\n\tbase: \"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n\t\t\tdestructive:\n\t\t\t\t\"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n\t\t\toutline:\n\t\t\t\t\"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n\t\t\tsecondary:\n\t\t\t\t\"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n\t\t\tghost: \"hover:bg-accent hover:text-accent-foreground\",\n\t\t\tlink: \"text-primary underline-offset-4 hover:underline\"\n\t\t},\n\t\tsize: {\n\t\t\tdefault: \"h-10 px-4 py-2\",\n\t\t\tsm: \"h-9 rounded-md px-3\",\n\t\t\tlg: \"h-11 rounded-md px-8\",\n\t\t\ticon: \"h-10 w-10\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"default\",\n\t\tsize: \"default\"\n\t}\n});\n\ntype Variant = VariantProps[\"variant\"];\ntype Size = VariantProps[\"size\"];\n\ntype Props = ButtonPrimitive.Props & {\n\tvariant?: Variant;\n\tsize?: Size;\n};\n\ntype Events = ButtonPrimitive.Events;\n\nexport {\n\tRoot,\n\ttype Props,\n\ttype Events,\n\t//\n\tRoot as Button,\n\ttype Props as ButtonProps,\n\ttype Events as ButtonEvents,\n\tbuttonVariants\n};\n"
+ "content": "import Root from \"./button.svelte\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport type { Button as ButtonPrimitive } from \"bits-ui\";\n\nconst buttonVariants = tv({\n\tbase: \"inline-flex items-center justify-center rounded-md text-sm font-medium whitespace-nowrap ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n\t\t\tdestructive:\n\t\t\t\t\"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n\t\t\toutline:\n\t\t\t\t\"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n\t\t\tsecondary:\n\t\t\t\t\"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n\t\t\tghost: \"hover:bg-accent hover:text-accent-foreground\",\n\t\t\tlink: \"text-primary underline-offset-4 hover:underline\"\n\t\t},\n\t\tsize: {\n\t\t\tdefault: \"h-10 px-4 py-2\",\n\t\t\tsm: \"h-9 rounded-md px-3\",\n\t\t\tlg: \"h-11 rounded-md px-8\",\n\t\t\ticon: \"h-10 w-10\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"default\",\n\t\tsize: \"default\"\n\t}\n});\n\ntype Variant = VariantProps[\"variant\"];\ntype Size = VariantProps[\"size\"];\n\ntype Props = ButtonPrimitive.Props & {\n\tvariant?: Variant;\n\tsize?: Size;\n};\n\ntype Events = ButtonPrimitive.Events;\n\nexport {\n\tRoot,\n\ttype Props,\n\ttype Events,\n\t//\n\tRoot as Button,\n\ttype Props as ButtonProps,\n\ttype Events as ButtonEvents,\n\tbuttonVariants\n};\n"
}
],
"type": "components:ui"
diff --git a/apps/www/static/registry/styles/default/form.json b/apps/www/static/registry/styles/default/form.json
index a7bf11a6c..9ae13d87a 100644
--- a/apps/www/static/registry/styles/default/form.json
+++ b/apps/www/static/registry/styles/default/form.json
@@ -8,7 +8,6 @@
"registryDependencies": [
"button",
"checkbox",
- "utils",
"input",
"label",
"radio-group",
@@ -27,7 +26,7 @@
},
{
"name": "form-description.svelte",
- "content": "\n\n\n\t \n \n"
+ "content": "\n\n\n\t \n \n"
},
{
"name": "form-input.svelte",
@@ -35,15 +34,15 @@
},
{
"name": "form-item.svelte",
- "content": "\n\n\n\t \n
\n"
+ "content": "\n\n\n\t \n
\n"
},
{
"name": "form-label.svelte",
- "content": "\n\n\n\t \n \n"
+ "content": "\n\n\n\t \n \n"
},
{
"name": "form-native-select.svelte",
- "content": "\n\n\n\t \n \n \n"
+ "content": "\n\n\n\t \n \n \n"
},
{
"name": "form-radio-group.svelte",
@@ -67,7 +66,7 @@
},
{
"name": "form-validation.svelte",
- "content": "\n\n \n"
+ "content": "\n\n \n"
},
{
"name": "index.ts",
diff --git a/apps/www/static/registry/styles/new-york/button.json b/apps/www/static/registry/styles/new-york/button.json
index 37859598a..3497d3521 100644
--- a/apps/www/static/registry/styles/new-york/button.json
+++ b/apps/www/static/registry/styles/new-york/button.json
@@ -11,7 +11,7 @@
},
{
"name": "index.ts",
- "content": "import type { Button as ButtonPrimitive } from \"bits-ui\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport Root from \"./button.svelte\";\n\nconst buttonVariants = tv({\n\tbase: \"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault:\n\t\t\t\t\"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n\t\t\tdestructive:\n\t\t\t\t\"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n\t\t\toutline:\n\t\t\t\t\"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground\",\n\t\t\tsecondary:\n\t\t\t\t\"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n\t\t\tghost: \"hover:bg-accent hover:text-accent-foreground\",\n\t\t\tlink: \"text-primary underline-offset-4 hover:underline\"\n\t\t},\n\t\tsize: {\n\t\t\tdefault: \"h-9 px-4 py-2\",\n\t\t\tsm: \"h-8 rounded-md px-3 text-xs\",\n\t\t\tlg: \"h-10 rounded-md px-8\",\n\t\t\ticon: \"h-9 w-9\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"default\",\n\t\tsize: \"default\"\n\t}\n});\n\ntype Variant = VariantProps[\"variant\"];\ntype Size = VariantProps[\"size\"];\n\ntype Props = ButtonPrimitive.Props & {\n\tvariant?: Variant;\n\tsize?: Size;\n};\n\ntype Events = ButtonPrimitive.Events;\n\nexport {\n\tRoot,\n\ttype Props,\n\ttype Events,\n\t//\n\tRoot as Button,\n\ttype Props as ButtonProps,\n\ttype Events as ButtonEvents,\n\tbuttonVariants\n};\n"
+ "content": "import type { Button as ButtonPrimitive } from \"bits-ui\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport Root from \"./button.svelte\";\n\nconst buttonVariants = tv({\n\tbase: \"inline-flex items-center justify-center rounded-md text-sm font-medium whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault:\n\t\t\t\t\"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n\t\t\tdestructive:\n\t\t\t\t\"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n\t\t\toutline:\n\t\t\t\t\"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground\",\n\t\t\tsecondary:\n\t\t\t\t\"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n\t\t\tghost: \"hover:bg-accent hover:text-accent-foreground\",\n\t\t\tlink: \"text-primary underline-offset-4 hover:underline\"\n\t\t},\n\t\tsize: {\n\t\t\tdefault: \"h-9 px-4 py-2\",\n\t\t\tsm: \"h-8 rounded-md px-3 text-xs\",\n\t\t\tlg: \"h-10 rounded-md px-8\",\n\t\t\ticon: \"h-9 w-9\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"default\",\n\t\tsize: \"default\"\n\t}\n});\n\ntype Variant = VariantProps[\"variant\"];\ntype Size = VariantProps[\"size\"];\n\ntype Props = ButtonPrimitive.Props & {\n\tvariant?: Variant;\n\tsize?: Size;\n};\n\ntype Events = ButtonPrimitive.Events;\n\nexport {\n\tRoot,\n\ttype Props,\n\ttype Events,\n\t//\n\tRoot as Button,\n\ttype Props as ButtonProps,\n\ttype Events as ButtonEvents,\n\tbuttonVariants\n};\n"
}
],
"type": "components:ui"
diff --git a/apps/www/static/registry/styles/new-york/form.json b/apps/www/static/registry/styles/new-york/form.json
index e9095495a..3598a7f40 100644
--- a/apps/www/static/registry/styles/new-york/form.json
+++ b/apps/www/static/registry/styles/new-york/form.json
@@ -8,7 +8,6 @@
"registryDependencies": [
"button",
"checkbox",
- "utils",
"input",
"label",
"radio-group",
From 0b8cbb92c1840d51003ef9e05a92b29e348a1df2 Mon Sep 17 00:00:00 2001
From: CokaKoala <31664583+AdrianGonz97@users.noreply.github.com>
Date: Fri, 8 Sep 2023 17:46:38 -0400
Subject: [PATCH 22/45] fixed `utils` import for the new york style (#280)
---
.../registry/new-york/ui/form/form-description.svelte | 2 +-
.../src/lib/registry/new-york/ui/form/form-item.svelte | 2 +-
.../lib/registry/new-york/ui/form/form-label.svelte | 2 +-
.../new-york/ui/form/form-native-select.svelte | 2 +-
.../registry/new-york/ui/form/form-validation.svelte | 2 +-
apps/www/static/registry/styles/new-york/form.json | 10 +++++-----
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/apps/www/src/lib/registry/new-york/ui/form/form-description.svelte b/apps/www/src/lib/registry/new-york/ui/form/form-description.svelte
index 3714bca3b..9f450083b 100644
--- a/apps/www/src/lib/registry/new-york/ui/form/form-description.svelte
+++ b/apps/www/src/lib/registry/new-york/ui/form/form-description.svelte
@@ -1,6 +1,6 @@
\n\n\n\t \n \n"
+ "content": "\n\n\n\t \n \n"
},
{
"name": "form-input.svelte",
@@ -34,15 +34,15 @@
},
{
"name": "form-item.svelte",
- "content": "\n\n\n\t \n
\n"
+ "content": "\n\n\n\t \n
\n"
},
{
"name": "form-label.svelte",
- "content": "\n\n\n\t \n \n"
+ "content": "\n\n\n\t \n \n"
},
{
"name": "form-native-select.svelte",
- "content": "\n\n\n\t \n \n \n"
+ "content": "\n\n\n\t \n \n \n"
},
{
"name": "form-radio-group.svelte",
@@ -66,7 +66,7 @@
},
{
"name": "form-validation.svelte",
- "content": "\n\n \n"
+ "content": "\n\n \n"
},
{
"name": "index.ts",
From 691e8b5c2f7926afc3816ad1e89ee6adf0c640e6 Mon Sep 17 00:00:00 2001
From: Hunter Johnston <64506580+huntabyte@users.noreply.github.com>
Date: Fri, 8 Sep 2023 18:10:31 -0400
Subject: [PATCH 23/45] add fathom (#281)
---
apps/www/.env.example | 2 ++
apps/www/package.json | 1 +
apps/www/pnpm-lock.yaml | 7 +++++++
apps/www/src/routes/+layout.svelte | 14 +++++++++++++-
4 files changed, 23 insertions(+), 1 deletion(-)
create mode 100644 apps/www/.env.example
diff --git a/apps/www/.env.example b/apps/www/.env.example
new file mode 100644
index 000000000..ed875cfc8
--- /dev/null
+++ b/apps/www/.env.example
@@ -0,0 +1,2 @@
+PUBLIC_FATHOM_URL=""
+PUBLIC_FATHOM_ID=""
\ No newline at end of file
diff --git a/apps/www/package.json b/apps/www/package.json
index 8bb76c03d..e3cadc0a7 100644
--- a/apps/www/package.json
+++ b/apps/www/package.json
@@ -40,6 +40,7 @@
"eslint": "^8.47.0",
"eslint-config-prettier": "^8.9.0",
"eslint-plugin-svelte": "^2.33.0",
+ "fathom-client": "^3.5.0",
"hast-util-to-html": "^8.0.4",
"lodash.template": "^4.5.0",
"mdsvex": "0.10.6",
diff --git a/apps/www/pnpm-lock.yaml b/apps/www/pnpm-lock.yaml
index bc649b942..fa222eefc 100644
--- a/apps/www/pnpm-lock.yaml
+++ b/apps/www/pnpm-lock.yaml
@@ -105,6 +105,9 @@ devDependencies:
eslint-plugin-svelte:
specifier: ^2.33.0
version: 2.33.0(eslint@8.47.0)(svelte@4.2.0)
+ fathom-client:
+ specifier: ^3.5.0
+ version: 3.5.0
hast-util-to-html:
specifier: ^8.0.4
version: 8.0.4
@@ -2698,6 +2701,10 @@ packages:
dependencies:
reusify: 1.0.4
+ /fathom-client@3.5.0:
+ resolution: {integrity: sha512-BiRDS9Q9a8Zma0H717FWC5cvf545K/CsxBpxKT22TcSl1EbRhhlHWIJgrdeiQUfdorBK2ppy09TwMOhRsbos/A==}
+ dev: true
+
/file-entry-cache@6.0.1:
resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==}
engines: {node: ^10.12.0 || >=12.0.0}
diff --git a/apps/www/src/routes/+layout.svelte b/apps/www/src/routes/+layout.svelte
index 1087b7d5d..68f2f21f0 100644
--- a/apps/www/src/routes/+layout.svelte
+++ b/apps/www/src/routes/+layout.svelte
@@ -1,6 +1,7 @@
From 02b9d2637acad388a26c283c1333e16e04281876 Mon Sep 17 00:00:00 2001
From: Hunter Johnston <64506580+huntabyte@users.noreply.github.com>
Date: Sat, 9 Sep 2023 14:51:26 -0400
Subject: [PATCH 24/45] fix: slider docs typo (#282)
---
apps/www/src/content/components/slider.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/www/src/content/components/slider.md b/apps/www/src/content/components/slider.md
index b41f851a5..d8e627efd 100644
--- a/apps/www/src/content/components/slider.md
+++ b/apps/www/src/content/components/slider.md
@@ -41,5 +41,5 @@ npm install bits-ui
import { Slider } from "$lib/components/ui/slider";
-
+
```
From c2cc375fea5b5271cd6a3a5c4351ce663675e6f4 Mon Sep 17 00:00:00 2001
From: Jason <50032291+jasongitmail@users.noreply.github.com>
Date: Thu, 14 Sep 2023 15:48:04 -0400
Subject: [PATCH 25/45] Remove unneeded SvelteKit alias (#284)
---
apps/www/src/content/installation.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/apps/www/src/content/installation.md b/apps/www/src/content/installation.md
index 29cc242e0..7157deafb 100644
--- a/apps/www/src/content/installation.md
+++ b/apps/www/src/content/installation.md
@@ -89,8 +89,7 @@ const config = {
kit: {
// ... other config
alias: {
- $lib: "./src/lib",
- "$lib/*": "./src/lib/*"
+ $lib: "./src/lib"
}
}
};
From b1ebb76c846cf2af1829362d4b0f52bd4c8da88d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Emirhan=20G=C3=BCm=C3=BC=C5=9F?=
Date: Fri, 15 Sep 2023 20:46:14 +0300
Subject: [PATCH 26/45] fixing the typo (#296)
---
.../src/lib/components/docs/theme-customizer/customizer.svelte | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/www/src/lib/components/docs/theme-customizer/customizer.svelte b/apps/www/src/lib/components/docs/theme-customizer/customizer.svelte
index d66a15e9e..5b9325d85 100644
--- a/apps/www/src/lib/components/docs/theme-customizer/customizer.svelte
+++ b/apps/www/src/lib/components/docs/theme-customizer/customizer.svelte
@@ -61,7 +61,7 @@
The Default style has
- larger inputs, uses lucide-react for icons.
+ larger inputs, uses lucide-svelte for icons.
The New York style ships
From 2b970e1394a325e0d83f4b127fbf000d2db40431 Mon Sep 17 00:00:00 2001
From: Yurii
Date: Tue, 19 Sep 2023 00:40:31 +0300
Subject: [PATCH 27/45] chore: remove tailwindcssAnimate from docs (#299)
---
apps/www/src/content/installation.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/apps/www/src/content/installation.md b/apps/www/src/content/installation.md
index 7157deafb..82a0b468e 100644
--- a/apps/www/src/content/installation.md
+++ b/apps/www/src/content/installation.md
@@ -189,8 +189,7 @@ const config = {
sans: ["Inter", ...fontFamily.sans]
}
}
- },
- plugins: [tailwindcssAnimate]
+ }
};
export default config;
From 95a2d6b7e7b396d6eee98e9294e583d341acaa8f Mon Sep 17 00:00:00 2001
From: Vivian Ludrick <116781909+vivalchemy@users.noreply.github.com>
Date: Tue, 19 Sep 2023 23:28:35 +0530
Subject: [PATCH 28/45] Docs: Change CardTitle -> Card.Title (#303)
---
apps/www/src/content/components/card.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/apps/www/src/content/components/card.md b/apps/www/src/content/components/card.md
index a1e9b09bf..2b81e31ff 100644
--- a/apps/www/src/content/components/card.md
+++ b/apps/www/src/content/components/card.md
@@ -50,20 +50,20 @@ npx shadcn-svelte@latest add card
### Modify the heading level
-By default, the `` component renders an `` element. You can change this by passing a `tag` prop to the component.
+By default, the `` component renders an `` element. You can change this by passing a `tag` prop to the component.
For example:
```svelte
-This will render an H2
+This will render an H2
```
```svelte
-This will render an H5
+This will render an H5
```
```svelte
-This will render a P tag
+This will render a P tag
```
## Examples
From 73a4caf8a4d19051b0d958c5e984dd50ab1cb0f9 Mon Sep 17 00:00:00 2001
From: Charlie Coppinger
Date: Sat, 23 Sep 2023 12:49:42 +1200
Subject: [PATCH 29/45] fix: slate theme missing % character from ring color
value (#314)
---
apps/www/src/lib/registry/themes.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/www/src/lib/registry/themes.ts b/apps/www/src/lib/registry/themes.ts
index 3987fd438..548c142c1 100644
--- a/apps/www/src/lib/registry/themes.ts
+++ b/apps/www/src/lib/registry/themes.ts
@@ -101,7 +101,7 @@ export const themes = [
"destructive-foreground": "210 40% 98%",
border: "217.2 32.6% 17.5%",
input: "217.2 32.6% 17.5%",
- ring: "212.7 26.8% 83.9"
+ ring: "212.7 26.8% 83.9%"
}
}
},
From 9c271ca84db775c412528e1b27700005564593ff Mon Sep 17 00:00:00 2001
From: Hunter Johnston <64506580+huntabyte@users.noreply.github.com>
Date: Sat, 23 Sep 2023 10:55:41 -0400
Subject: [PATCH 30/45] fix toggle doc code snippets (#316)
---
apps/www/src/content/components/toggle.md | 36 ++++++++++++++++-------
apps/www/static/registry/themes.css | 2 +-
2 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/apps/www/src/content/components/toggle.md b/apps/www/src/content/components/toggle.md
index ed9cc1116..9978a5558 100644
--- a/apps/www/src/content/components/toggle.md
+++ b/apps/www/src/content/components/toggle.md
@@ -48,34 +48,48 @@ npm install bits-ui
### Default
-
+
----
+
+
+
### Outline
-
+
----
+
+
+
### With Text
-
+
----
+
+
+
### Small
-
+
----
+
+
+
### Large
-
+
----
+
+
+
### Disabled
-
+
+
+
+
+
diff --git a/apps/www/static/registry/themes.css b/apps/www/static/registry/themes.css
index c34546925..1ef0619d9 100644
--- a/apps/www/static/registry/themes.css
+++ b/apps/www/static/registry/themes.css
@@ -124,7 +124,7 @@
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 210 40% 98%;
- --ring: 212.7 26.8% 83.9;
+ --ring: 212.7 26.8% 83.9%;
}
.theme-stone {
From cbbea4f1551852773cb65e703a70b475fc3632ce Mon Sep 17 00:00:00 2001
From: tmadge
Date: Sun, 24 Sep 2023 22:34:41 -0400
Subject: [PATCH 31/45] Fix disabled checkbox styles (#307)
---
.../src/lib/registry/default/example/checkbox-disabled.svelte | 2 +-
apps/www/src/lib/registry/default/ui/checkbox/checkbox.svelte | 4 ++--
.../lib/registry/new-york/example/checkbox-disabled.svelte | 2 +-
.../www/src/lib/registry/new-york/ui/checkbox/checkbox.svelte | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/apps/www/src/lib/registry/default/example/checkbox-disabled.svelte b/apps/www/src/lib/registry/default/example/checkbox-disabled.svelte
index ccb1569c8..b98d223cb 100644
--- a/apps/www/src/lib/registry/default/example/checkbox-disabled.svelte
+++ b/apps/www/src/lib/registry/default/example/checkbox-disabled.svelte
@@ -7,7 +7,7 @@
Accept terms and conditions
diff --git a/apps/www/src/lib/registry/default/ui/checkbox/checkbox.svelte b/apps/www/src/lib/registry/default/ui/checkbox/checkbox.svelte
index 3258320ed..8a1163b01 100644
--- a/apps/www/src/lib/registry/default/ui/checkbox/checkbox.svelte
+++ b/apps/www/src/lib/registry/default/ui/checkbox/checkbox.svelte
@@ -12,11 +12,11 @@
diff --git a/apps/www/src/lib/registry/new-york/example/checkbox-disabled.svelte b/apps/www/src/lib/registry/new-york/example/checkbox-disabled.svelte
index d318e0918..5f7001cc5 100644
--- a/apps/www/src/lib/registry/new-york/example/checkbox-disabled.svelte
+++ b/apps/www/src/lib/registry/new-york/example/checkbox-disabled.svelte
@@ -7,7 +7,7 @@
Accept terms and conditions
diff --git a/apps/www/src/lib/registry/new-york/ui/checkbox/checkbox.svelte b/apps/www/src/lib/registry/new-york/ui/checkbox/checkbox.svelte
index c97581639..19b5e0352 100644
--- a/apps/www/src/lib/registry/new-york/ui/checkbox/checkbox.svelte
+++ b/apps/www/src/lib/registry/new-york/ui/checkbox/checkbox.svelte
@@ -13,7 +13,7 @@
Date: Fri, 29 Sep 2023 14:16:07 -0400
Subject: [PATCH 32/45] Fixes `build:registry` script (#327)
---
apps/www/scripts/registry.ts | 4 ++--
apps/www/static/registry/styles/default/checkbox.json | 2 +-
apps/www/static/registry/styles/new-york/checkbox.json | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/apps/www/scripts/registry.ts b/apps/www/scripts/registry.ts
index 9c7c6c1d3..485dea725 100644
--- a/apps/www/scripts/registry.ts
+++ b/apps/www/scripts/registry.ts
@@ -47,7 +47,7 @@ async function crawlExample(rootPath: string) {
const type = "components:example";
const dir = await readdir(rootPath, {
- recursive: true,
+ // recursive: true, // ignoring examples with directories for now...
withFileTypes: true
});
@@ -56,7 +56,7 @@ async function crawlExample(rootPath: string) {
for (const dirent of dir) {
if (dirent.name === "index.ts") continue;
- if (dirent.isFile()) {
+ if (dirent.isFile() && dirent.name.endsWith(".svelte")) {
const [name] = dirent.name.split(".svelte");
const file_path = join("example", dirent.name);
const { dependencies, registryDependencies } =
diff --git a/apps/www/static/registry/styles/default/checkbox.json b/apps/www/static/registry/styles/default/checkbox.json
index c20889970..533d25538 100644
--- a/apps/www/static/registry/styles/default/checkbox.json
+++ b/apps/www/static/registry/styles/default/checkbox.json
@@ -7,7 +7,7 @@
"files": [
{
"name": "checkbox.svelte",
- "content": "\n\n\n\t\n\t\t{#if isChecked}\n\t\t\t \n\t\t{:else if isIndeterminate}\n\t\t\t \n\t\t{/if}\n\t \n \n"
+ "content": "\n\n\n\t\n\t\t{#if isChecked}\n\t\t\t \n\t\t{:else if isIndeterminate}\n\t\t\t \n\t\t{/if}\n\t \n \n"
},
{
"name": "index.ts",
diff --git a/apps/www/static/registry/styles/new-york/checkbox.json b/apps/www/static/registry/styles/new-york/checkbox.json
index dac89395a..d7d2d746b 100644
--- a/apps/www/static/registry/styles/new-york/checkbox.json
+++ b/apps/www/static/registry/styles/new-york/checkbox.json
@@ -7,7 +7,7 @@
"files": [
{
"name": "checkbox.svelte",
- "content": "\n\n\n\t\n\t\t{#if isIndeterminate}\n\t\t\t \n\t\t{:else}\n\t\t\t \n\t\t{/if}\n\t \n \n"
+ "content": "\n\n\n\t\n\t\t{#if isIndeterminate}\n\t\t\t \n\t\t{:else}\n\t\t\t \n\t\t{/if}\n\t \n \n"
},
{
"name": "index.ts",
From 02cc530c8936280125031977b0f656b6315fd268 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olle=20M=C3=A5nsson?=
<31876997+ollema@users.noreply.github.com>
Date: Sat, 30 Sep 2023 03:22:01 +0200
Subject: [PATCH 33/45] Fix support rule (#326)
---
apps/www/src/lib/components/docs/site-header.svelte | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/www/src/lib/components/docs/site-header.svelte b/apps/www/src/lib/components/docs/site-header.svelte
index 6b01494d2..4f0e5e0ed 100644
--- a/apps/www/src/lib/components/docs/site-header.svelte
+++ b/apps/www/src/lib/components/docs/site-header.svelte
@@ -6,7 +6,7 @@
From 0ae66ea5736cb0841f5cff5e8b570e274cc3bc70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olle=20M=C3=A5nsson?=
<31876997+ollema@users.noreply.github.com>
Date: Tue, 3 Oct 2023 18:08:08 +0200
Subject: [PATCH 34/45] Use regular click event (#328)
---
apps/www/src/content/components/data-table.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/www/src/content/components/data-table.md b/apps/www/src/content/components/data-table.md
index 99a0b2192..6edae140d 100644
--- a/apps/www/src/content/components/data-table.md
+++ b/apps/www/src/content/components/data-table.md
@@ -464,7 +464,7 @@ We'll start by creating a new component called `data-table-actions.svelte` which
Actions
- navigator.clipboard.writeText(id)}>
+ navigator.clipboard.writeText(id)}>
Copy payment ID
From 3a02c0302e7f075849ff890c596fbe72951e396a Mon Sep 17 00:00:00 2001
From: Gabriel <59345467+Lakelimbo@users.noreply.github.com>
Date: Mon, 9 Oct 2023 15:56:38 -0300
Subject: [PATCH 35/45] Footer no longer has a border (#339)
---
apps/www/src/lib/components/docs/site-footer.svelte | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/www/src/lib/components/docs/site-footer.svelte b/apps/www/src/lib/components/docs/site-footer.svelte
index b8ab7659d..d9159e41f 100644
--- a/apps/www/src/lib/components/docs/site-footer.svelte
+++ b/apps/www/src/lib/components/docs/site-footer.svelte
@@ -3,7 +3,7 @@
import { Icons } from "./icons";
-