@sqlrooms/ui 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +8 -0
- package/.turbo/turbo-lint.log +10 -0
- package/CHANGELOG.md +8 -0
- package/LICENSE.md +9 -0
- package/components.json +21 -0
- package/dist/components/DefaultErrorBoundary.d.ts +2 -0
- package/dist/components/DefaultErrorBoundary.d.ts.map +1 -0
- package/dist/components/DefaultErrorBoundary.js +1 -0
- package/dist/components/ProgressModal.d.ts +10 -0
- package/dist/components/ProgressModal.d.ts.map +1 -0
- package/dist/components/ProgressModal.js +7 -0
- package/dist/components/accordion.d.ts +8 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +13 -0
- package/dist/components/alert.d.ts +9 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +22 -0
- package/dist/components/badge.d.ts +10 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +20 -0
- package/dist/components/breadcrumb.d.ts +20 -0
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +23 -0
- package/dist/components/button.d.ts +12 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +33 -0
- package/dist/components/card.d.ts +9 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +16 -0
- package/dist/components/checkbox.d.ts +5 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +8 -0
- package/dist/components/dialog.d.ts +20 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +22 -0
- package/dist/components/dropdown-menu.d.ts +28 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +35 -0
- package/dist/components/editable-text.d.ts +53 -0
- package/dist/components/editable-text.d.ts.map +1 -0
- package/dist/components/editable-text.js +87 -0
- package/dist/components/error-boundary.d.ts +19 -0
- package/dist/components/error-boundary.d.ts.map +1 -0
- package/dist/components/error-boundary.js +26 -0
- package/dist/components/error-pane.d.ts +13 -0
- package/dist/components/error-pane.d.ts.map +1 -0
- package/dist/components/error-pane.js +12 -0
- package/dist/components/form.d.ts +24 -0
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.js +62 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/input.d.ts +4 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +8 -0
- package/dist/components/label.d.ts +6 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +9 -0
- package/dist/components/popover.d.ts +8 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +10 -0
- package/dist/components/progress-modal.d.ts +10 -0
- package/dist/components/progress-modal.d.ts.map +1 -0
- package/dist/components/progress-modal.js +8 -0
- package/dist/components/progress.d.ts +5 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +7 -0
- package/dist/components/resizable.d.ts +24 -0
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +8 -0
- package/dist/components/select.d.ts +14 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +26 -0
- package/dist/components/skeleton-pane.d.ts +10 -0
- package/dist/components/skeleton-pane.d.ts.map +1 -0
- package/dist/components/skeleton-pane.js +17 -0
- package/dist/components/skeleton.d.ts +3 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +6 -0
- package/dist/components/spinner-pane.d.ts +10 -0
- package/dist/components/spinner-pane.d.ts.map +1 -0
- package/dist/components/spinner-pane.js +17 -0
- package/dist/components/spinner.d.ts +8 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +9 -0
- package/dist/components/switch.d.ts +5 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +7 -0
- package/dist/components/table.d.ts +20 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +20 -0
- package/dist/components/tabs.d.ts +8 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +12 -0
- package/dist/components/textarea.d.ts +4 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +8 -0
- package/dist/components/toast.d.ts +16 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +33 -0
- package/dist/components/toaster.d.ts +2 -0
- package/dist/components/toaster.d.ts.map +1 -0
- package/dist/components/toaster.js +9 -0
- package/dist/components/tooltip.d.ts +8 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +10 -0
- package/dist/hooks/use-toast.d.ts +45 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/use-toast.js +128 -0
- package/dist/hooks/useDisclosure.d.ts +9 -0
- package/dist/hooks/useDisclosure.d.ts.map +1 -0
- package/dist/hooks/useDisclosure.js +14 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +5 -0
- package/dist/tailwind-preset.css +68 -0
- package/dist/tailwind-preset.d.ts +5 -0
- package/dist/tailwind-preset.d.ts.map +1 -0
- package/dist/tailwind-preset.js +50 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/eslint.config.js +4 -0
- package/package.json +59 -0
- package/src/components/accordion.tsx +55 -0
- package/src/components/alert.tsx +59 -0
- package/src/components/badge.tsx +34 -0
- package/src/components/breadcrumb.tsx +115 -0
- package/src/components/button.tsx +55 -0
- package/src/components/card.tsx +76 -0
- package/src/components/checkbox.tsx +28 -0
- package/src/components/dialog.tsx +120 -0
- package/src/components/dropdown-menu.tsx +199 -0
- package/src/components/editable-text.tsx +199 -0
- package/src/components/error-boundary.tsx +48 -0
- package/src/components/error-pane.tsx +81 -0
- package/src/components/form.tsx +176 -0
- package/src/components/input.tsx +22 -0
- package/src/components/label.tsx +24 -0
- package/src/components/popover.tsx +31 -0
- package/src/components/progress-modal.tsx +33 -0
- package/src/components/progress.tsx +26 -0
- package/src/components/resizable.tsx +43 -0
- package/src/components/select.tsx +157 -0
- package/src/components/skeleton-pane.tsx +45 -0
- package/src/components/skeleton.tsx +12 -0
- package/src/components/spinner-pane.tsx +44 -0
- package/src/components/spinner.tsx +16 -0
- package/src/components/switch.tsx +27 -0
- package/src/components/table.tsx +136 -0
- package/src/components/tabs.tsx +53 -0
- package/src/components/textarea.tsx +21 -0
- package/src/components/toast.tsx +127 -0
- package/src/components/toaster.tsx +33 -0
- package/src/components/tooltip.tsx +29 -0
- package/src/hooks/use-toast.ts +191 -0
- package/src/hooks/useDisclosure.ts +26 -0
- package/src/index.ts +35 -0
- package/src/lib/utils.ts +6 -0
- package/src/tailwind-preset.css +68 -0
- package/src/tailwind-preset.ts +55 -0
- package/tsconfig.json +12 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import tailwindAnimate from 'tailwindcss-animate';
|
|
2
|
+
export const sqlroomsTailwindPreset = ({ prefix = '', }) => ({
|
|
3
|
+
prefix,
|
|
4
|
+
darkMode: ['class'],
|
|
5
|
+
theme: {
|
|
6
|
+
extend: {
|
|
7
|
+
colors: {
|
|
8
|
+
border: 'hsl(var(--border))',
|
|
9
|
+
input: 'hsl(var(--input))',
|
|
10
|
+
ring: 'hsl(var(--ring))',
|
|
11
|
+
background: 'hsl(var(--background))',
|
|
12
|
+
foreground: 'hsl(var(--foreground))',
|
|
13
|
+
primary: {
|
|
14
|
+
DEFAULT: 'hsl(var(--primary))',
|
|
15
|
+
foreground: 'hsl(var(--primary-foreground))',
|
|
16
|
+
},
|
|
17
|
+
secondary: {
|
|
18
|
+
DEFAULT: 'hsl(var(--secondary))',
|
|
19
|
+
foreground: 'hsl(var(--secondary-foreground))',
|
|
20
|
+
},
|
|
21
|
+
destructive: {
|
|
22
|
+
DEFAULT: 'hsl(var(--destructive))',
|
|
23
|
+
foreground: 'hsl(var(--destructive-foreground))',
|
|
24
|
+
},
|
|
25
|
+
muted: {
|
|
26
|
+
DEFAULT: 'hsl(var(--muted))',
|
|
27
|
+
foreground: 'hsl(var(--muted-foreground))',
|
|
28
|
+
},
|
|
29
|
+
accent: {
|
|
30
|
+
DEFAULT: 'hsl(var(--accent))',
|
|
31
|
+
foreground: 'hsl(var(--accent-foreground))',
|
|
32
|
+
},
|
|
33
|
+
popover: {
|
|
34
|
+
DEFAULT: 'hsl(var(--popover))',
|
|
35
|
+
foreground: 'hsl(var(--popover-foreground))',
|
|
36
|
+
},
|
|
37
|
+
card: {
|
|
38
|
+
DEFAULT: 'hsl(var(--card))',
|
|
39
|
+
foreground: 'hsl(var(--card-foreground))',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
borderRadius: {
|
|
43
|
+
lg: `var(--radius)`,
|
|
44
|
+
md: `calc(var(--radius) - 2px)`,
|
|
45
|
+
sm: 'calc(var(--radius) - 4px)',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
plugins: [tailwindAnimate],
|
|
50
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/global.d.ts","../../../node_modules/.pnpm/csstype@3.1.3/node_modules/csstype/index.d.ts","../../../node_modules/.pnpm/@types+prop-types@15.7.14/node_modules/@types/prop-types/index.d.ts","../../../node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","../../../node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/jsx-runtime.d.ts","../../../node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/source-map.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/previous-map.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/input.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/css-syntax-error.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/declaration.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/root.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/warning.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/lazy-result.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/no-work-result.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/processor.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/result.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/document.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/rule.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/node.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/comment.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/container.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/at-rule.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/list.d.ts","../../../node_modules/.pnpm/postcss@8.4.49/node_modules/postcss/lib/postcss.d.ts","../../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/types/generated/corepluginlist.d.ts","../../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/types/generated/colors.d.ts","../../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/types/config.d.ts","../../../node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/types/index.d.ts","../../../node_modules/.pnpm/tailwindcss-animate@1.0.7_tailwindcss@3.4.17/node_modules/tailwindcss-animate/index.d.ts","../src/tailwind-preset.ts","../../../node_modules/.pnpm/@types+react@19.0.4/node_modules/@types/react/global.d.ts","../../../node_modules/.pnpm/@types+react@19.0.4/node_modules/@types/react/index.d.ts","../../../node_modules/.pnpm/@types+react@19.0.4/node_modules/@types/react/jsx-runtime.d.ts","../../../node_modules/.pnpm/@radix-ui+react-slot@1.1.1_@types+react@19.0.4_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.d.ts","../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/clsx.d.ts","../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/types.d.ts","../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.d.ts","../src/components/button.tsx","../../../node_modules/.pnpm/tailwind-merge@2.6.0/node_modules/tailwind-merge/dist/types.d.ts","../src/lib/utils.ts","../../../node_modules/.pnpm/@jest+expect-utils@29.7.0/node_modules/@jest/expect-utils/build/index.d.ts","../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts","../../../node_modules/.pnpm/@sinclair+typebox@0.27.8/node_modules/@sinclair/typebox/typebox.d.ts","../../../node_modules/.pnpm/@jest+schemas@29.6.3/node_modules/@jest/schemas/build/index.d.ts","../../../node_modules/.pnpm/pretty-format@29.7.0/node_modules/pretty-format/build/index.d.ts","../../../node_modules/.pnpm/jest-diff@29.7.0/node_modules/jest-diff/build/index.d.ts","../../../node_modules/.pnpm/jest-matcher-utils@29.7.0/node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/.pnpm/expect@29.7.0/node_modules/expect/build/index.d.ts","../../../node_modules/.pnpm/@types+jest@29.5.14/node_modules/@types/jest/index.d.ts","../../../node_modules/.pnpm/@types+mocha@10.0.10/node_modules/@types/mocha/index.d.ts","../../../node_modules/.pnpm/@types+react-dom@18.3.5_@types+react@18.3.18/node_modules/@types/react-dom/index.d.ts"],"fileIdsList":[[61],[50,51],[63,66],[22],[19,20,21],[20,49],[50],[53,54],[53],[59,65],[63],[60,64],[39],[37,39],[28,36,37,38,40],[26],[29,34,39,42],[25,42],[29,30,33,34,35,42],[29,30,31,33,34,42],[26,27,28,29,30,34,35,36,38,39,40,42],[24,26,27,28,29,30,31,33,34,35,36,37,38,39,40,41],[24,42],[29,31,32,34,35,42],[33,42],[34,35,39,42],[27,37],[62],[43,44],[42,45],[22,23,52,55],[23,53,57],[23,46,47]],"fileInfos":[{"version":"e41c290ef7dd7dab3493e6cbe5909e0148edf4a8dad0271be08edec368a0f7b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"4fd3f3422b2d2a3dfd5cdd0f387b3a8ec45f006c6ea896a4cb41264c2100bb2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"69e65d976bf166ce4a9e6f6c18f94d2424bf116e90837ace179610dbccad9b42","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"62bb211266ee48b2d0edf0d8d1b191f0c24fc379a82bd4c1692a082c540bc6b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"65ff5a0aefd7817a03c1ad04fee85c9cdd3ec415cc3c9efec85d8008d4d5e4ee","impliedFormat":1},{"version":"b89c2ddec6bd955e8721d41e24ca667de06882338d88b183c2cdc1f41f4c5a34","affectsGlobalScope":true,"impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"402e5c534fb2b85fa771170595db3ac0dd532112c8fa44fc23f233bc6967488b","impliedFormat":1},{"version":"8885cf05f3e2abf117590bbb951dcf6359e3e5ac462af1c901cfd24c6a6472e2","impliedFormat":1},{"version":"4d979e3c12ffb6497d2b1dc5613130196d986fff764c4526360c0716a162e7e7","impliedFormat":1},{"version":"e61df3640a38d535fd4bc9f4a53aef17c296b58dc4b6394fd576b808dd2fe5e6","impliedFormat":1},{"version":"80781460eca408fe8d2937d9fdbbb780d6aac35f549621e6200c9bee1da5b8fe","impliedFormat":1},{"version":"4719c209b9c00b579553859407a7e5dcfaa1c472994bd62aa5dd3cc0757eb077","impliedFormat":1},{"version":"7ec359bbc29b69d4063fe7dad0baaf35f1856f914db16b3f4f6e3e1bca4099fa","impliedFormat":1},{"version":"b9261ac3e9944d3d72c5ee4cf888ad35d9743a5563405c6963c4e43ee3708ca4","impliedFormat":1},{"version":"c84fd54e8400def0d1ef1569cafd02e9f39a622df9fa69b57ccc82128856b916","impliedFormat":1},{"version":"a022503e75d6953d0e82c2c564508a5c7f8556fad5d7f971372d2d40479e4034","impliedFormat":1},{"version":"2ed6489ef46eb61442d067c08e87e3db501c0bfb2837eee4041a27bf3e792bb0","impliedFormat":1},{"version":"644491cde678bd462bb922c1d0cfab8f17d626b195ccb7f008612dc31f445d2d","impliedFormat":1},{"version":"d60fe6d59d4e19ecc65359490b8535e359ca4b760d2cdb56897ca75d09d41ba3","impliedFormat":1},{"version":"f45a2a8b1777ecb50ed65e1a04bb899d4b676529b7921bd5d69b08573a00c832","impliedFormat":1},{"version":"774b783046ba3d473948132d28a69f52a295b2f378f2939304118ba571b1355e","impliedFormat":1},{"version":"b5734e05c787a40e4f9efe71f16683c5f7dc3bdb0de7c04440c855bd000f8fa7","impliedFormat":1},{"version":"14ba97f0907144771331e1349fdccb5a13526eba0647e6b447e572376d811b6f","impliedFormat":1},{"version":"2a771d907aebf9391ac1f50e4ad37952943515eeea0dcc7e78aa08f508294668","impliedFormat":1},{"version":"7165050eddaed878c2d2cd3cafcaf171072ac39e586a048c0603712b5555f536","impliedFormat":1},{"version":"b558c9a18ea4e6e4157124465c3ef1063e64640da139e67be5edb22f534f2f08","impliedFormat":1},{"version":"01374379f82be05d25c08d2f30779fa4a4c41895a18b93b33f14aeef51768692","impliedFormat":1},{"version":"b0dee183d4e65cf938242efaf3d833c6b645afb35039d058496965014f158141","impliedFormat":1},{"version":"c0bbbf84d3fbd85dd60d040c81e8964cc00e38124a52e9c5dcdedf45fea3f213","impliedFormat":1},{"version":"9688c89e52b4dc1fb91afed9017d78610f3363bef61904c6c17e49afb969fe7a","impliedFormat":1},"6ae2ad62a46bdbfc1ed773bc6c1a6bf9e4d0a02da44e6e40ec541d0f0e7572e4",{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"da172a28c35d5f298bf5f0361725cc80f45e89e803a353c56e1aa347e10f572d","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"a80b7bc4eda856374c26a56f6f25297f4c393309d4c4548002a5238cd57b2b66","impliedFormat":1},{"version":"ef73bcfef9907c8b772a30e5a64a6bd86a5669cba3d210fcdcc6b625e3312459","impliedFormat":1},{"version":"2fbe402f0ee5aa8ab55367f88030f79d46211c0a0f342becaa9f648bf8534e9d","impliedFormat":1},{"version":"b94258ef37e67474ac5522e9c519489a55dcb3d4a8f645e335fc68ea2215fe88","impliedFormat":1},"278d964fe2a6e321a2531a80e54fd09c2b141f2076da0d29bd6f2588103f008a",{"version":"26c57c9f839e6d2048d6c25e81f805ba0ca32a28fd4d824399fd5456c9b0575b","impliedFormat":1},"7c8c3dfc0cdd370d44932828eb067ef771c8fe7996693221d5d4b90af6d54f2d",{"version":"cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","impliedFormat":1},{"version":"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","impliedFormat":1},{"version":"c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","impliedFormat":1},{"version":"f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","impliedFormat":1},{"version":"5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","impliedFormat":1},{"version":"3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","impliedFormat":1},{"version":"ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","impliedFormat":1},{"version":"d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec","impliedFormat":1},{"version":"f8db4fea512ab759b2223b90ecbbe7dae919c02f8ce95ec03f7fb1cf757cfbeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"29f72ec1289ae3aeda78bf14b38086d3d803262ac13904b400422941a26a3636","affectsGlobalScope":true,"impliedFormat":1},{"version":"17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","impliedFormat":1}],"root":[48,56,58],"options":{"allowJs":true,"downlevelIteration":true,"esModuleInterop":true,"jsx":4,"module":99,"noImplicitAny":true,"outDir":"./","skipLibCheck":true,"strict":true,"target":99},"referencedMap":[[62,1],[52,2],[67,3],[69,4],[22,5],[23,4],[50,6],[51,7],[55,8],[54,9],[66,10],[64,11],[65,12],[40,13],[38,14],[39,15],[27,16],[28,14],[35,17],[26,18],[31,19],[32,20],[37,21],[42,22],[25,23],[33,24],[34,25],[29,26],[36,13],[30,27],[63,28],[45,29],[46,30],[56,31],[58,32],[48,33]],"semanticDiagnosticsPerFile":[[56,[{"start":161,"length":25,"messageText":"Cannot find module '@workspace/ui/lib/utils' or its corresponding type declarations.","category":1,"code":2307},{"start":1716,"length":4,"code":2322,"category":1,"messageText":{"messageText":"Type '{ disabled?: boolean | undefined; form?: string | undefined; formAction?: string | undefined; formEncType?: string | undefined; formMethod?: string | undefined; formNoValidate?: boolean | undefined; ... 268 more ...; ref: ForwardedRef<...>; }' is not assignable to type 'SlotProps'.","category":1,"code":2322,"next":[{"messageText":"Types of property 'children' are incompatible.","category":1,"code":2326,"next":[{"messageText":"Type 'React.ReactNode' is not assignable to type 'import(\"/Users/ilya/Workspace/sqlrooms/node_modules/.pnpm/@types+react@19.0.4/node_modules/@types/react/index\").ReactNode'.","category":1,"code":2322,"next":[{"messageText":"Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode'.","category":1,"code":2322,"next":[{"messageText":"Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'.","category":1,"code":2741,"canonicalHead":{"code":2322,"messageText":"Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactPortal'."}}]}],"canonicalHead":{"code":2322,"messageText":"Type '{ disabled?: boolean | undefined; form?: string | undefined; formAction?: string | undefined; formEncType?: string | undefined; formMethod?: string | undefined; formNoValidate?: boolean | undefined; ... 268 more ...; ref: ForwardedRef<...>; }' is not assignable to type 'SlotProps'."}}]}]},"relatedInformation":[{"file":"../../../node_modules/.pnpm/@types+react@19.0.4/node_modules/@types/react/index.d.ts","start":12728,"length":8,"messageText":"'children' is declared here.","category":3,"code":2728}]},{"start":1716,"length":4,"code":2786,"category":1,"messageText":{"messageText":"'Comp' cannot be used as a JSX component.","category":1,"code":2786,"next":[{"messageText":"Its type 'ForwardRefExoticComponent<SlotProps & RefAttributes<HTMLElement>> | \"button\"' is not a valid JSX element type.","category":1,"code":18053,"next":[{"messageText":"Type 'ForwardRefExoticComponent<SlotProps & RefAttributes<HTMLElement>>' is not assignable to type 'ElementType'.","category":1,"code":2322,"next":[{"messageText":"Type 'ForwardRefExoticComponent<SlotProps & RefAttributes<HTMLElement>>' is not assignable to type '(props: any, deprecatedLegacyContext?: any) => ReactNode'.","category":1,"code":2322,"next":[{"messageText":"Type 'import(\"/Users/ilya/Workspace/sqlrooms/node_modules/.pnpm/@types+react@19.0.4/node_modules/@types/react/index\").ReactNode' is not assignable to type 'React.ReactNode'.","category":1,"code":2322,"next":[{"messageText":"Type 'bigint' is not assignable to type 'ReactNode'.","category":1,"code":2322}],"canonicalHead":{"code":2322,"messageText":"Type 'ForwardRefExoticComponent<SlotProps & RefAttributes<HTMLElement>>' is not assignable to type '(props: any, deprecatedLegacyContext?: any) => ReactNode'."}}]}]}]}]}}]]],"version":"5.7.3"}
|
package/eslint.config.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sqlrooms/ui",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": false,
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"types": "src/index.ts",
|
|
11
|
+
"module": "dist/index.js",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./src/index.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./lib/*": "./src/lib/*.ts",
|
|
18
|
+
"./tailwind-preset.css": "./dist/tailwind-preset.css",
|
|
19
|
+
"./components/*": "./src/components/*.tsx",
|
|
20
|
+
"./hooks/*": "./src/hooks/*.ts"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"dev": "npm run copy-tailwind-preset && tsc -w",
|
|
24
|
+
"build": "tsc && npm run copy-tailwind-preset",
|
|
25
|
+
"copy-tailwind-preset": "cp src/tailwind-preset.css dist/tailwind-preset.css",
|
|
26
|
+
"lint": "eslint ."
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@hookform/resolvers": "^3.10.0",
|
|
30
|
+
"@radix-ui/react-accordion": "^1.2.2",
|
|
31
|
+
"@radix-ui/react-checkbox": "^1.1.3",
|
|
32
|
+
"@radix-ui/react-dialog": "^1.1.4",
|
|
33
|
+
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
34
|
+
"@radix-ui/react-label": "^2.1.1",
|
|
35
|
+
"@radix-ui/react-popover": "^1.1.4",
|
|
36
|
+
"@radix-ui/react-progress": "^1.1.1",
|
|
37
|
+
"@radix-ui/react-select": "^2.1.4",
|
|
38
|
+
"@radix-ui/react-slot": "^1.1.1",
|
|
39
|
+
"@radix-ui/react-switch": "^1.1.2",
|
|
40
|
+
"@radix-ui/react-tabs": "^1.1.2",
|
|
41
|
+
"@radix-ui/react-toast": "^1.2.5",
|
|
42
|
+
"@radix-ui/react-tooltip": "^1.1.6",
|
|
43
|
+
"class-variance-authority": "^0.7.1",
|
|
44
|
+
"clsx": "^2.1.1",
|
|
45
|
+
"lucide-react": "^0.473.0",
|
|
46
|
+
"react-hook-form": "^7.54.2",
|
|
47
|
+
"react-resizable-panels": "^2.1.7",
|
|
48
|
+
"tailwind-merge": "^2.6.0",
|
|
49
|
+
"tailwindcss-animate": "^1.0.7",
|
|
50
|
+
"zod": "^3.24.1"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"autoprefixer": "^10.4.20"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"tailwindcss": "^3.4.17"
|
|
57
|
+
},
|
|
58
|
+
"gitHead": "4b0c709542475e4f95db0b2a8405ecadcf2ec186"
|
|
59
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
3
|
+
import {ChevronDown} from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
import {cn} from '../lib/utils';
|
|
6
|
+
|
|
7
|
+
const Accordion = AccordionPrimitive.Root;
|
|
8
|
+
|
|
9
|
+
const AccordionItem = React.forwardRef<
|
|
10
|
+
React.ElementRef<typeof AccordionPrimitive.Item>,
|
|
11
|
+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
|
|
12
|
+
>(({className, ...props}, ref) => (
|
|
13
|
+
<AccordionPrimitive.Item
|
|
14
|
+
ref={ref}
|
|
15
|
+
className={cn('border-b', className)}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
));
|
|
19
|
+
AccordionItem.displayName = 'AccordionItem';
|
|
20
|
+
|
|
21
|
+
const AccordionTrigger = React.forwardRef<
|
|
22
|
+
React.ElementRef<typeof AccordionPrimitive.Trigger>,
|
|
23
|
+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
|
|
24
|
+
>(({className, children, ...props}, ref) => (
|
|
25
|
+
<AccordionPrimitive.Header className="flex">
|
|
26
|
+
<AccordionPrimitive.Trigger
|
|
27
|
+
ref={ref}
|
|
28
|
+
className={cn(
|
|
29
|
+
'flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180',
|
|
30
|
+
className,
|
|
31
|
+
)}
|
|
32
|
+
{...props}
|
|
33
|
+
>
|
|
34
|
+
{children}
|
|
35
|
+
<ChevronDown className="h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" />
|
|
36
|
+
</AccordionPrimitive.Trigger>
|
|
37
|
+
</AccordionPrimitive.Header>
|
|
38
|
+
));
|
|
39
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
40
|
+
|
|
41
|
+
const AccordionContent = React.forwardRef<
|
|
42
|
+
React.ElementRef<typeof AccordionPrimitive.Content>,
|
|
43
|
+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
|
|
44
|
+
>(({className, children, ...props}, ref) => (
|
|
45
|
+
<AccordionPrimitive.Content
|
|
46
|
+
ref={ref}
|
|
47
|
+
className="overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
48
|
+
{...props}
|
|
49
|
+
>
|
|
50
|
+
<div className={cn('pb-4 pt-0', className)}>{children}</div>
|
|
51
|
+
</AccordionPrimitive.Content>
|
|
52
|
+
));
|
|
53
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
54
|
+
|
|
55
|
+
export {Accordion, AccordionItem, AccordionTrigger, AccordionContent};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {cva, type VariantProps} from 'class-variance-authority';
|
|
3
|
+
|
|
4
|
+
import {cn} from '../lib/utils';
|
|
5
|
+
|
|
6
|
+
const alertVariants = cva(
|
|
7
|
+
'relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7',
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: 'bg-background text-foreground',
|
|
12
|
+
destructive:
|
|
13
|
+
'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
variant: 'default',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
const Alert = React.forwardRef<
|
|
23
|
+
HTMLDivElement,
|
|
24
|
+
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
|
|
25
|
+
>(({className, variant, ...props}, ref) => (
|
|
26
|
+
<div
|
|
27
|
+
ref={ref}
|
|
28
|
+
role="alert"
|
|
29
|
+
className={cn(alertVariants({variant}), className)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
));
|
|
33
|
+
Alert.displayName = 'Alert';
|
|
34
|
+
|
|
35
|
+
const AlertTitle = React.forwardRef<
|
|
36
|
+
HTMLParagraphElement,
|
|
37
|
+
React.HTMLAttributes<HTMLHeadingElement>
|
|
38
|
+
>(({className, ...props}, ref) => (
|
|
39
|
+
<h5
|
|
40
|
+
ref={ref}
|
|
41
|
+
className={cn('mb-1 font-medium leading-none tracking-tight', className)}
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
));
|
|
45
|
+
AlertTitle.displayName = 'AlertTitle';
|
|
46
|
+
|
|
47
|
+
const AlertDescription = React.forwardRef<
|
|
48
|
+
HTMLParagraphElement,
|
|
49
|
+
React.HTMLAttributes<HTMLParagraphElement>
|
|
50
|
+
>(({className, ...props}, ref) => (
|
|
51
|
+
<div
|
|
52
|
+
ref={ref}
|
|
53
|
+
className={cn('text-sm [&_p]:leading-relaxed', className)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
));
|
|
57
|
+
AlertDescription.displayName = 'AlertDescription';
|
|
58
|
+
|
|
59
|
+
export {Alert, AlertTitle, AlertDescription};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {cva, type VariantProps} from 'class-variance-authority';
|
|
3
|
+
|
|
4
|
+
import {cn} from '../lib/utils';
|
|
5
|
+
|
|
6
|
+
const badgeVariants = cva(
|
|
7
|
+
'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default:
|
|
12
|
+
'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',
|
|
13
|
+
secondary:
|
|
14
|
+
'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
15
|
+
destructive:
|
|
16
|
+
'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',
|
|
17
|
+
outline: 'text-foreground',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: 'default',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export interface BadgeProps
|
|
27
|
+
extends React.HTMLAttributes<HTMLDivElement>,
|
|
28
|
+
VariantProps<typeof badgeVariants> {}
|
|
29
|
+
|
|
30
|
+
function Badge({className, variant, ...props}: BadgeProps) {
|
|
31
|
+
return <div className={cn(badgeVariants({variant}), className)} {...props} />;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export {Badge, badgeVariants};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {Slot} from '@radix-ui/react-slot';
|
|
3
|
+
import {ChevronRight, MoreHorizontal} from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
import {cn} from '../lib/utils';
|
|
6
|
+
|
|
7
|
+
const Breadcrumb = React.forwardRef<
|
|
8
|
+
HTMLElement,
|
|
9
|
+
React.ComponentPropsWithoutRef<'nav'> & {
|
|
10
|
+
separator?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
>(({...props}, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />);
|
|
13
|
+
Breadcrumb.displayName = 'Breadcrumb';
|
|
14
|
+
|
|
15
|
+
const BreadcrumbList = React.forwardRef<
|
|
16
|
+
HTMLOListElement,
|
|
17
|
+
React.ComponentPropsWithoutRef<'ol'>
|
|
18
|
+
>(({className, ...props}, ref) => (
|
|
19
|
+
<ol
|
|
20
|
+
ref={ref}
|
|
21
|
+
className={cn(
|
|
22
|
+
'flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5',
|
|
23
|
+
className,
|
|
24
|
+
)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
));
|
|
28
|
+
BreadcrumbList.displayName = 'BreadcrumbList';
|
|
29
|
+
|
|
30
|
+
const BreadcrumbItem = React.forwardRef<
|
|
31
|
+
HTMLLIElement,
|
|
32
|
+
React.ComponentPropsWithoutRef<'li'>
|
|
33
|
+
>(({className, ...props}, ref) => (
|
|
34
|
+
<li
|
|
35
|
+
ref={ref}
|
|
36
|
+
className={cn('inline-flex items-center gap-1.5', className)}
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
));
|
|
40
|
+
BreadcrumbItem.displayName = 'BreadcrumbItem';
|
|
41
|
+
|
|
42
|
+
const BreadcrumbLink = React.forwardRef<
|
|
43
|
+
HTMLAnchorElement,
|
|
44
|
+
React.ComponentPropsWithoutRef<'a'> & {
|
|
45
|
+
asChild?: boolean;
|
|
46
|
+
}
|
|
47
|
+
>(({asChild, className, ...props}, ref) => {
|
|
48
|
+
const Comp = asChild ? Slot : 'a';
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<Comp
|
|
52
|
+
ref={ref}
|
|
53
|
+
className={cn('transition-colors hover:text-foreground', className)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
BreadcrumbLink.displayName = 'BreadcrumbLink';
|
|
59
|
+
|
|
60
|
+
const BreadcrumbPage = React.forwardRef<
|
|
61
|
+
HTMLSpanElement,
|
|
62
|
+
React.ComponentPropsWithoutRef<'span'>
|
|
63
|
+
>(({className, ...props}, ref) => (
|
|
64
|
+
<span
|
|
65
|
+
ref={ref}
|
|
66
|
+
role="link"
|
|
67
|
+
aria-disabled="true"
|
|
68
|
+
aria-current="page"
|
|
69
|
+
className={cn('font-normal text-foreground', className)}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
));
|
|
73
|
+
BreadcrumbPage.displayName = 'BreadcrumbPage';
|
|
74
|
+
|
|
75
|
+
const BreadcrumbSeparator = ({
|
|
76
|
+
children,
|
|
77
|
+
className,
|
|
78
|
+
...props
|
|
79
|
+
}: React.ComponentProps<'li'>) => (
|
|
80
|
+
<li
|
|
81
|
+
role="presentation"
|
|
82
|
+
aria-hidden="true"
|
|
83
|
+
className={cn('[&>svg]:w-3.5 [&>svg]:h-3.5', className)}
|
|
84
|
+
{...props}
|
|
85
|
+
>
|
|
86
|
+
{children ?? <ChevronRight />}
|
|
87
|
+
</li>
|
|
88
|
+
);
|
|
89
|
+
BreadcrumbSeparator.displayName = 'BreadcrumbSeparator';
|
|
90
|
+
|
|
91
|
+
const BreadcrumbEllipsis = ({
|
|
92
|
+
className,
|
|
93
|
+
...props
|
|
94
|
+
}: React.ComponentProps<'span'>) => (
|
|
95
|
+
<span
|
|
96
|
+
role="presentation"
|
|
97
|
+
aria-hidden="true"
|
|
98
|
+
className={cn('flex h-9 w-9 items-center justify-center', className)}
|
|
99
|
+
{...props}
|
|
100
|
+
>
|
|
101
|
+
<MoreHorizontal className="h-4 w-4" />
|
|
102
|
+
<span className="sr-only">More</span>
|
|
103
|
+
</span>
|
|
104
|
+
);
|
|
105
|
+
BreadcrumbEllipsis.displayName = 'BreadcrumbElipssis';
|
|
106
|
+
|
|
107
|
+
export {
|
|
108
|
+
Breadcrumb,
|
|
109
|
+
BreadcrumbList,
|
|
110
|
+
BreadcrumbItem,
|
|
111
|
+
BreadcrumbLink,
|
|
112
|
+
BreadcrumbPage,
|
|
113
|
+
BreadcrumbSeparator,
|
|
114
|
+
BreadcrumbEllipsis,
|
|
115
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {Slot} from '@radix-ui/react-slot';
|
|
3
|
+
import {cva, type VariantProps} from 'class-variance-authority';
|
|
4
|
+
import {cn} from '../lib/utils';
|
|
5
|
+
|
|
6
|
+
const buttonVariants = cva(
|
|
7
|
+
'inline-flex items-center justify-center gap-2 whitespace-nowrap 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 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
12
|
+
destructive:
|
|
13
|
+
'bg-destructive text-destructive-foreground hover:bg-destructive/90',
|
|
14
|
+
outline:
|
|
15
|
+
'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
|
|
16
|
+
secondary:
|
|
17
|
+
'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
18
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
|
19
|
+
link: 'text-primary underline-offset-4 hover:underline',
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
default: 'h-10 px-4 py-2',
|
|
23
|
+
sm: 'h-9 rounded-md px-3',
|
|
24
|
+
lg: 'h-11 rounded-md px-8',
|
|
25
|
+
icon: 'h-10 w-10',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
variant: 'default',
|
|
30
|
+
size: 'default',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
export interface ButtonProps
|
|
36
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
37
|
+
VariantProps<typeof buttonVariants> {
|
|
38
|
+
asChild?: boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
42
|
+
({className, variant, size, asChild = false, ...props}, ref) => {
|
|
43
|
+
const Comp = asChild ? Slot : 'button';
|
|
44
|
+
return (
|
|
45
|
+
<Comp
|
|
46
|
+
className={cn(buttonVariants({variant, size, className}))}
|
|
47
|
+
ref={ref}
|
|
48
|
+
{...props}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
},
|
|
52
|
+
);
|
|
53
|
+
Button.displayName = 'Button_';
|
|
54
|
+
|
|
55
|
+
export {Button, buttonVariants};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import {cn} from '../lib/utils';
|
|
4
|
+
|
|
5
|
+
const Card = React.forwardRef<
|
|
6
|
+
HTMLDivElement,
|
|
7
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
8
|
+
>(({className, ...props}, ref) => (
|
|
9
|
+
<div
|
|
10
|
+
ref={ref}
|
|
11
|
+
className={cn(
|
|
12
|
+
'rounded-xl border bg-card text-card-foreground shadow',
|
|
13
|
+
className,
|
|
14
|
+
)}
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
));
|
|
18
|
+
Card.displayName = 'Card';
|
|
19
|
+
|
|
20
|
+
const CardHeader = React.forwardRef<
|
|
21
|
+
HTMLDivElement,
|
|
22
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
23
|
+
>(({className, ...props}, ref) => (
|
|
24
|
+
<div
|
|
25
|
+
ref={ref}
|
|
26
|
+
className={cn('flex flex-col space-y-1.5 p-6', className)}
|
|
27
|
+
{...props}
|
|
28
|
+
/>
|
|
29
|
+
));
|
|
30
|
+
CardHeader.displayName = 'CardHeader';
|
|
31
|
+
|
|
32
|
+
const CardTitle = React.forwardRef<
|
|
33
|
+
HTMLDivElement,
|
|
34
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
35
|
+
>(({className, ...props}, ref) => (
|
|
36
|
+
<div
|
|
37
|
+
ref={ref}
|
|
38
|
+
className={cn('font-semibold leading-none tracking-tight', className)}
|
|
39
|
+
{...props}
|
|
40
|
+
/>
|
|
41
|
+
));
|
|
42
|
+
CardTitle.displayName = 'CardTitle';
|
|
43
|
+
|
|
44
|
+
const CardDescription = React.forwardRef<
|
|
45
|
+
HTMLDivElement,
|
|
46
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
47
|
+
>(({className, ...props}, ref) => (
|
|
48
|
+
<div
|
|
49
|
+
ref={ref}
|
|
50
|
+
className={cn('text-sm text-muted-foreground', className)}
|
|
51
|
+
{...props}
|
|
52
|
+
/>
|
|
53
|
+
));
|
|
54
|
+
CardDescription.displayName = 'CardDescription';
|
|
55
|
+
|
|
56
|
+
const CardContent = React.forwardRef<
|
|
57
|
+
HTMLDivElement,
|
|
58
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
59
|
+
>(({className, ...props}, ref) => (
|
|
60
|
+
<div ref={ref} className={cn('p-6 pt-0', className)} {...props} />
|
|
61
|
+
));
|
|
62
|
+
CardContent.displayName = 'CardContent';
|
|
63
|
+
|
|
64
|
+
const CardFooter = React.forwardRef<
|
|
65
|
+
HTMLDivElement,
|
|
66
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
67
|
+
>(({className, ...props}, ref) => (
|
|
68
|
+
<div
|
|
69
|
+
ref={ref}
|
|
70
|
+
className={cn('flex items-center p-6 pt-0', className)}
|
|
71
|
+
{...props}
|
|
72
|
+
/>
|
|
73
|
+
));
|
|
74
|
+
CardFooter.displayName = 'CardFooter';
|
|
75
|
+
|
|
76
|
+
export {Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
import {Check} from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
import {cn} from '../lib/utils';
|
|
6
|
+
|
|
7
|
+
const Checkbox = React.forwardRef<
|
|
8
|
+
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
9
|
+
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
|
|
10
|
+
>(({className, ...props}, ref) => (
|
|
11
|
+
<CheckboxPrimitive.Root
|
|
12
|
+
ref={ref}
|
|
13
|
+
className={cn(
|
|
14
|
+
'peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',
|
|
15
|
+
className,
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
>
|
|
19
|
+
<CheckboxPrimitive.Indicator
|
|
20
|
+
className={cn('flex items-center justify-center text-current')}
|
|
21
|
+
>
|
|
22
|
+
<Check className="h-4 w-4" />
|
|
23
|
+
</CheckboxPrimitive.Indicator>
|
|
24
|
+
</CheckboxPrimitive.Root>
|
|
25
|
+
));
|
|
26
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
27
|
+
|
|
28
|
+
export {Checkbox};
|