@health-samurai/react-components 0.0.0-alpha.4 → 0.0.0-alpha.6
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/dist/bundle.css +1375 -484
- package/dist/src/components/code-editor/http/grammar/http.d.ts +3 -0
- package/dist/src/components/code-editor/http/grammar/http.d.ts.map +1 -0
- package/dist/src/components/code-editor/http/grammar/http.grammar +74 -0
- package/dist/src/components/code-editor/http/grammar/http.js +38 -0
- package/dist/src/components/code-editor/http/grammar/http.js.map +1 -0
- package/dist/src/components/code-editor/http/grammar/http.terms.d.ts +2 -0
- package/dist/src/components/code-editor/http/grammar/http.terms.d.ts.map +1 -0
- package/dist/src/components/code-editor/http/grammar/http.terms.js +4 -0
- package/dist/src/components/code-editor/http/grammar/http.terms.js.map +1 -0
- package/dist/src/components/code-editor/http/grammar/http.test.d.ts +2 -0
- package/dist/src/components/code-editor/http/grammar/http.test.d.ts.map +1 -0
- package/dist/src/components/code-editor/http/grammar/http.test.js +80 -0
- package/dist/src/components/code-editor/http/grammar/http.test.js.map +1 -0
- package/dist/src/components/code-editor/http/index.d.ts +4 -0
- package/dist/src/components/code-editor/http/index.d.ts.map +1 -0
- package/dist/src/components/code-editor/http/index.js +66 -0
- package/dist/src/components/code-editor/http/index.js.map +1 -0
- package/dist/src/components/code-editor/index.d.ts +14 -2
- package/dist/src/components/code-editor/index.d.ts.map +1 -1
- package/dist/src/components/code-editor/index.js +309 -20
- package/dist/src/components/code-editor/index.js.map +1 -1
- package/dist/src/components/code-editor.stories.d.ts +1 -0
- package/dist/src/components/code-editor.stories.d.ts.map +1 -1
- package/dist/src/components/code-editor.stories.js +255 -2
- package/dist/src/components/code-editor.stories.js.map +1 -1
- package/dist/src/components/copy-icon.d.ts +5 -1
- package/dist/src/components/copy-icon.d.ts.map +1 -1
- package/dist/src/components/copy-icon.js +41 -3
- package/dist/src/components/copy-icon.js.map +1 -1
- package/dist/src/components/data-table.d.ts +8 -0
- package/dist/src/components/data-table.d.ts.map +1 -0
- package/dist/src/components/data-table.js +65 -0
- package/dist/src/components/data-table.js.map +1 -0
- package/dist/src/components/data-table.stories.d.ts +7 -0
- package/dist/src/components/data-table.stories.d.ts.map +1 -0
- package/dist/src/components/data-table.stories.js +44 -0
- package/dist/src/components/data-table.stories.js.map +1 -0
- package/dist/src/components/fhir-structure-view.d.ts +34 -0
- package/dist/src/components/fhir-structure-view.d.ts.map +1 -0
- package/dist/src/components/fhir-structure-view.js +229 -0
- package/dist/src/components/fhir-structure-view.js.map +1 -0
- package/dist/src/components/fhir-structure-view.stories.d.ts +7 -0
- package/dist/src/components/fhir-structure-view.stories.d.ts.map +1 -0
- package/dist/src/components/fhir-structure-view.stories.js +447 -0
- package/dist/src/components/fhir-structure-view.stories.js.map +1 -0
- package/dist/src/components/patient-table.d.ts +73 -0
- package/dist/src/components/patient-table.d.ts.map +1 -0
- package/dist/src/components/patient-table.js +921 -0
- package/dist/src/components/patient-table.js.map +1 -0
- package/dist/src/components/patient-table.stories.d.ts +111 -0
- package/dist/src/components/patient-table.stories.d.ts.map +1 -0
- package/dist/src/components/patient-table.stories.js +172 -0
- package/dist/src/components/patient-table.stories.js.map +1 -0
- package/dist/src/components/request-line-editor.d.ts +13 -35
- package/dist/src/components/request-line-editor.d.ts.map +1 -1
- package/dist/src/components/request-line-editor.js +72 -49
- package/dist/src/components/request-line-editor.js.map +1 -1
- package/dist/src/components/request-line-editor.stories.d.ts.map +1 -1
- package/dist/src/components/request-line-editor.stories.js +17 -53
- package/dist/src/components/request-line-editor.stories.js.map +1 -1
- package/dist/src/components/segment-control.d.ts +16 -0
- package/dist/src/components/segment-control.d.ts.map +1 -0
- package/dist/src/components/segment-control.js +48 -0
- package/dist/src/components/segment-control.js.map +1 -0
- package/dist/src/components/segment-control.stories.d.ts +15 -0
- package/dist/src/components/segment-control.stories.d.ts.map +1 -0
- package/dist/src/components/segment-control.stories.js +33 -0
- package/dist/src/components/segment-control.stories.js.map +1 -0
- package/dist/src/components/split-button.d.ts +5 -0
- package/dist/src/components/split-button.d.ts.map +1 -0
- package/dist/src/components/split-button.js +12 -0
- package/dist/src/components/split-button.js.map +1 -0
- package/dist/src/components/split-button.stories.d.ts +7 -0
- package/dist/src/components/split-button.stories.d.ts.map +1 -0
- package/dist/src/components/split-button.stories.js +57 -0
- package/dist/src/components/split-button.stories.js.map +1 -0
- package/dist/src/components/tree-view.d.ts +22 -0
- package/dist/src/components/tree-view.d.ts.map +1 -0
- package/dist/src/components/tree-view.js +101 -0
- package/dist/src/components/tree-view.js.map +1 -0
- package/dist/src/components/tree-view.stories.d.ts +13 -0
- package/dist/src/components/tree-view.stories.d.ts.map +1 -0
- package/dist/src/components/tree-view.stories.js +274 -0
- package/dist/src/components/tree-view.stories.js.map +1 -0
- package/dist/src/icons.d.ts +9 -0
- package/dist/src/icons.d.ts.map +1 -0
- package/dist/src/icons.js +279 -0
- package/dist/src/icons.js.map +1 -0
- package/dist/src/index.css +42 -3
- package/dist/src/index.d.ts +9 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +9 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/shadcn/components/ui/accordion.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/accordion.js +23 -5
- package/dist/src/shadcn/components/ui/accordion.js.map +1 -1
- package/dist/src/shadcn/components/ui/alert-dialog.d.ts +3 -1
- package/dist/src/shadcn/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/alert-dialog.js +5 -2
- package/dist/src/shadcn/components/ui/alert-dialog.js.map +1 -1
- package/dist/src/shadcn/components/ui/alert.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/alert.js +12 -5
- package/dist/src/shadcn/components/ui/alert.js.map +1 -1
- package/dist/src/shadcn/components/ui/avatar.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/avatar.js +4 -3
- package/dist/src/shadcn/components/ui/avatar.js.map +1 -1
- package/dist/src/shadcn/components/ui/badge.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/badge.js +16 -5
- package/dist/src/shadcn/components/ui/badge.js.map +1 -1
- package/dist/src/shadcn/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/breadcrumb.js +6 -6
- package/dist/src/shadcn/components/ui/breadcrumb.js.map +1 -1
- package/dist/src/shadcn/components/ui/button.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/button.js +19 -11
- package/dist/src/shadcn/components/ui/button.js.map +1 -1
- package/dist/src/shadcn/components/ui/card.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/card.js +14 -6
- package/dist/src/shadcn/components/ui/card.js.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.js +20 -5
- package/dist/src/shadcn/components/ui/checkbox.js.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.stories.js +44 -35
- package/dist/src/shadcn/components/ui/checkbox.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/combobox.d.ts +18 -0
- package/dist/src/shadcn/components/ui/combobox.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/combobox.js +121 -0
- package/dist/src/shadcn/components/ui/combobox.js.map +1 -0
- package/dist/src/shadcn/components/ui/combobox.stories.d.ts +11 -0
- package/dist/src/shadcn/components/ui/combobox.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/combobox.stories.js +16 -0
- package/dist/src/shadcn/components/ui/combobox.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/command.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/command.js +73 -12
- package/dist/src/shadcn/components/ui/command.js.map +1 -1
- package/dist/src/shadcn/components/ui/command.stories.js +0 -1
- package/dist/src/shadcn/components/ui/command.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/dialog.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/dialog.js +35 -7
- package/dist/src/shadcn/components/ui/dialog.js.map +1 -1
- package/dist/src/shadcn/components/ui/drawer.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/drawer.js +26 -5
- package/dist/src/shadcn/components/ui/drawer.js.map +1 -1
- package/dist/src/shadcn/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/dropdown-menu.js +12 -1
- package/dist/src/shadcn/components/ui/dropdown-menu.js.map +1 -1
- package/dist/src/shadcn/components/ui/form.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/form.js +12 -4
- package/dist/src/shadcn/components/ui/form.js.map +1 -1
- package/dist/src/shadcn/components/ui/input.d.ts +3 -1
- package/dist/src/shadcn/components/ui/input.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/input.js +126 -17
- package/dist/src/shadcn/components/ui/input.js.map +1 -1
- package/dist/src/shadcn/components/ui/label.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/label.js +8 -1
- package/dist/src/shadcn/components/ui/label.js.map +1 -1
- package/dist/src/shadcn/components/ui/menubar.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/menubar.js +35 -13
- package/dist/src/shadcn/components/ui/menubar.js.map +1 -1
- package/dist/src/shadcn/components/ui/pagination.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/pagination.js +6 -6
- package/dist/src/shadcn/components/ui/pagination.js.map +1 -1
- package/dist/src/shadcn/components/ui/popover.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/popover.js +12 -1
- package/dist/src/shadcn/components/ui/popover.js.map +1 -1
- package/dist/src/shadcn/components/ui/progress.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/progress.js +6 -2
- package/dist/src/shadcn/components/ui/progress.js.map +1 -1
- package/dist/src/shadcn/components/ui/radio-group.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/radio-group.js +11 -6
- package/dist/src/shadcn/components/ui/radio-group.js.map +1 -1
- package/dist/src/shadcn/components/ui/radio-group.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/radio-group.stories.js +57 -34
- package/dist/src/shadcn/components/ui/radio-group.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/scroll-area.js +9 -3
- package/dist/src/shadcn/components/ui/scroll-area.js.map +1 -1
- package/dist/src/shadcn/components/ui/select.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/select.js +49 -14
- package/dist/src/shadcn/components/ui/select.js.map +1 -1
- package/dist/src/shadcn/components/ui/select.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/select.stories.js +1 -4
- package/dist/src/shadcn/components/ui/select.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/separator.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/separator.js +7 -1
- package/dist/src/shadcn/components/ui/separator.js.map +1 -1
- package/dist/src/shadcn/components/ui/sidebar.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/sidebar.js +20 -6
- package/dist/src/shadcn/components/ui/sidebar.js.map +1 -1
- package/dist/src/shadcn/components/ui/skeleton.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/skeleton.js +3 -1
- package/dist/src/shadcn/components/ui/skeleton.js.map +1 -1
- package/dist/src/shadcn/components/ui/slider.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/slider.js +34 -4
- package/dist/src/shadcn/components/ui/slider.js.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.d.ts +16 -1
- package/dist/src/shadcn/components/ui/sonner.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.js +23 -3
- package/dist/src/shadcn/components/ui/sonner.js.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.stories.js +19 -11
- package/dist/src/shadcn/components/ui/sonner.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/switch.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/switch.js +18 -2
- package/dist/src/shadcn/components/ui/switch.js.map +1 -1
- package/dist/src/shadcn/components/ui/table.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/table.js +12 -8
- package/dist/src/shadcn/components/ui/table.js.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.d.ts +21 -3
- package/dist/src/shadcn/components/ui/tabs.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.js +315 -9
- package/dist/src/shadcn/components/ui/tabs.js.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.stories.js +50 -1
- package/dist/src/shadcn/components/ui/tabs.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/textarea.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/textarea.js +15 -1
- package/dist/src/shadcn/components/ui/textarea.js.map +1 -1
- package/dist/src/shadcn/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/toggle-group.js +6 -2
- package/dist/src/shadcn/components/ui/toggle-group.js.map +1 -1
- package/dist/src/shadcn/components/ui/toggle.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/toggle.js +18 -6
- package/dist/src/shadcn/components/ui/toggle.js.map +1 -1
- package/dist/src/shadcn/components/ui/tooltip.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/tooltip.js +11 -1
- package/dist/src/shadcn/components/ui/tooltip.js.map +1 -1
- package/dist/src/shadcn/components/ui/tree.d.ts +28 -0
- package/dist/src/shadcn/components/ui/tree.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/tree.js +122 -0
- package/dist/src/shadcn/components/ui/tree.js.map +1 -0
- package/dist/src/typography.css +12 -0
- package/package.json +13 -2
- package/src/components/code-editor/http/grammar/http.grammar +74 -0
- package/src/components/code-editor/http/grammar/http.terms.ts +9 -0
- package/src/components/code-editor/http/grammar/http.test.ts +110 -0
- package/src/components/code-editor/http/grammar/http.ts +21 -0
- package/src/components/code-editor/http/index.ts +87 -0
- package/src/components/code-editor/index.tsx +307 -21
- package/src/components/code-editor.stories.tsx +295 -1
- package/src/components/copy-icon.tsx +57 -3
- package/src/components/data-table.stories.tsx +38 -0
- package/src/components/data-table.tsx +117 -0
- package/src/components/fhir-structure-view.stories.tsx +439 -0
- package/src/components/fhir-structure-view.tsx +231 -0
- package/src/components/patient-table.stories.tsx +111 -0
- package/src/components/patient-table.tsx +1301 -0
- package/src/components/request-line-editor.stories.tsx +17 -27
- package/src/components/request-line-editor.tsx +98 -61
- package/src/components/segment-control.stories.tsx +29 -0
- package/src/components/segment-control.tsx +80 -0
- package/src/components/split-button.stories.tsx +49 -0
- package/src/components/split-button.tsx +17 -0
- package/src/components/tree-view.stories.tsx +259 -0
- package/src/components/tree-view.tsx +172 -0
- package/src/icons.tsx +287 -0
- package/src/index.css +42 -3
- package/src/index.tsx +9 -2
- package/src/shadcn/components/ui/accordion.tsx +66 -8
- package/src/shadcn/components/ui/alert-dialog.tsx +6 -2
- package/src/shadcn/components/ui/alert.tsx +53 -15
- package/src/shadcn/components/ui/avatar.tsx +17 -6
- package/src/shadcn/components/ui/badge.tsx +67 -18
- package/src/shadcn/components/ui/breadcrumb.tsx +35 -7
- package/src/shadcn/components/ui/button.tsx +118 -57
- package/src/shadcn/components/ui/card.tsx +44 -13
- package/src/shadcn/components/ui/checkbox.stories.tsx +20 -24
- package/src/shadcn/components/ui/checkbox.tsx +45 -4
- package/src/shadcn/components/ui/combobox.stories.tsx +19 -0
- package/src/shadcn/components/ui/combobox.tsx +142 -0
- package/src/shadcn/components/ui/command.stories.tsx +1 -1
- package/src/shadcn/components/ui/command.tsx +192 -36
- package/src/shadcn/components/ui/dialog.tsx +101 -13
- package/src/shadcn/components/ui/drawer.tsx +93 -18
- package/src/shadcn/components/ui/dropdown-menu.tsx +37 -9
- package/src/shadcn/components/ui/form.tsx +16 -4
- package/src/shadcn/components/ui/input.tsx +400 -29
- package/src/shadcn/components/ui/label.tsx +21 -4
- package/src/shadcn/components/ui/menubar.tsx +188 -43
- package/src/shadcn/components/ui/pagination.tsx +12 -6
- package/src/shadcn/components/ui/popover.tsx +35 -4
- package/src/shadcn/components/ui/progress.tsx +21 -5
- package/src/shadcn/components/ui/radio-group.stories.tsx +22 -14
- package/src/shadcn/components/ui/radio-group.tsx +42 -5
- package/src/shadcn/components/ui/scroll-area.tsx +33 -5
- package/src/shadcn/components/ui/select.stories.tsx +0 -2
- package/src/shadcn/components/ui/select.tsx +184 -33
- package/src/shadcn/components/ui/separator.tsx +15 -5
- package/src/shadcn/components/ui/sidebar.tsx +68 -26
- package/src/shadcn/components/ui/skeleton.tsx +4 -1
- package/src/shadcn/components/ui/slider.tsx +82 -11
- package/src/shadcn/components/ui/sonner.stories.tsx +19 -15
- package/src/shadcn/components/ui/sonner.tsx +53 -3
- package/src/shadcn/components/ui/switch.tsx +53 -7
- package/src/shadcn/components/ui/table.tsx +38 -11
- package/src/shadcn/components/ui/tabs.stories.tsx +32 -0
- package/src/shadcn/components/ui/tabs.tsx +456 -17
- package/src/shadcn/components/ui/textarea.tsx +42 -4
- package/src/shadcn/components/ui/toggle-group.tsx +27 -5
- package/src/shadcn/components/ui/toggle.tsx +59 -18
- package/src/shadcn/components/ui/tooltip.tsx +33 -8
- package/src/shadcn/components/ui/tree.tsx +233 -0
- package/src/typography.css +12 -0
|
@@ -4,6 +4,94 @@ import { Drawer as DrawerPrimitive } from "vaul";
|
|
|
4
4
|
|
|
5
5
|
import { cn } from "#shadcn/lib/utils";
|
|
6
6
|
|
|
7
|
+
// Drawer overlay styles
|
|
8
|
+
const drawerOverlayStyles = cn(
|
|
9
|
+
// Layout
|
|
10
|
+
"fixed",
|
|
11
|
+
"inset-0",
|
|
12
|
+
"z-50",
|
|
13
|
+
// Background
|
|
14
|
+
"bg-black/50",
|
|
15
|
+
// Animations - open
|
|
16
|
+
"data-[state=open]:animate-in",
|
|
17
|
+
"data-[state=open]:fade-in-0",
|
|
18
|
+
// Animations - closed
|
|
19
|
+
"data-[state=closed]:animate-out",
|
|
20
|
+
"data-[state=closed]:fade-out-0",
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
// Drawer content styles
|
|
24
|
+
const drawerContentStyles = cn(
|
|
25
|
+
// Group
|
|
26
|
+
"group/drawer-content",
|
|
27
|
+
// Background
|
|
28
|
+
"bg-bg-primary",
|
|
29
|
+
// Layout
|
|
30
|
+
"fixed",
|
|
31
|
+
"z-50",
|
|
32
|
+
"flex",
|
|
33
|
+
"h-auto",
|
|
34
|
+
"flex-col",
|
|
35
|
+
// Top direction
|
|
36
|
+
"data-[vaul-drawer-direction=top]:inset-x-0",
|
|
37
|
+
"data-[vaul-drawer-direction=top]:top-0",
|
|
38
|
+
"data-[vaul-drawer-direction=top]:mb-24",
|
|
39
|
+
"data-[vaul-drawer-direction=top]:max-h-[80vh]",
|
|
40
|
+
"data-[vaul-drawer-direction=top]:rounded-b-lg",
|
|
41
|
+
"data-[vaul-drawer-direction=top]:border-b",
|
|
42
|
+
"data-[vaul-drawer-direction=top]:border-border-primary",
|
|
43
|
+
// Bottom direction
|
|
44
|
+
"data-[vaul-drawer-direction=bottom]:inset-x-0",
|
|
45
|
+
"data-[vaul-drawer-direction=bottom]:bottom-0",
|
|
46
|
+
"data-[vaul-drawer-direction=bottom]:mt-24",
|
|
47
|
+
"data-[vaul-drawer-direction=bottom]:max-h-[80vh]",
|
|
48
|
+
"data-[vaul-drawer-direction=bottom]:rounded-t-lg",
|
|
49
|
+
"data-[vaul-drawer-direction=bottom]:border-t",
|
|
50
|
+
"data-[vaul-drawer-direction=bottom]:border-border-primary",
|
|
51
|
+
// Right direction
|
|
52
|
+
"data-[vaul-drawer-direction=right]:inset-y-0",
|
|
53
|
+
"data-[vaul-drawer-direction=right]:right-0",
|
|
54
|
+
"data-[vaul-drawer-direction=right]:w-3/4",
|
|
55
|
+
"data-[vaul-drawer-direction=right]:border-l",
|
|
56
|
+
"data-[vaul-drawer-direction=right]:border-border-primary",
|
|
57
|
+
"data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
58
|
+
// Left direction
|
|
59
|
+
"data-[vaul-drawer-direction=left]:inset-y-0",
|
|
60
|
+
"data-[vaul-drawer-direction=left]:left-0",
|
|
61
|
+
"data-[vaul-drawer-direction=left]:w-3/4",
|
|
62
|
+
"data-[vaul-drawer-direction=left]:border-r",
|
|
63
|
+
"data-[vaul-drawer-direction=left]:border-border-primary",
|
|
64
|
+
"data-[vaul-drawer-direction=left]:sm:max-w-sm",
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
// Drawer handle styles
|
|
68
|
+
const drawerHandleStyles = cn(
|
|
69
|
+
"bg-bg-tertiary",
|
|
70
|
+
"mx-auto",
|
|
71
|
+
"mt-4",
|
|
72
|
+
"hidden",
|
|
73
|
+
"h-2",
|
|
74
|
+
"w-[100px]",
|
|
75
|
+
"shrink-0",
|
|
76
|
+
"rounded-full",
|
|
77
|
+
"group-data-[vaul-drawer-direction=bottom]/drawer-content:block",
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
// Drawer header styles
|
|
81
|
+
const drawerHeaderStyles = cn(
|
|
82
|
+
"flex",
|
|
83
|
+
"flex-col",
|
|
84
|
+
"gap-0.5",
|
|
85
|
+
"p-4",
|
|
86
|
+
"group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center",
|
|
87
|
+
"group-data-[vaul-drawer-direction=top]/drawer-content:text-center",
|
|
88
|
+
"md:gap-1.5",
|
|
89
|
+
"md:text-left",
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
// Drawer footer styles
|
|
93
|
+
const drawerFooterStyles = cn("mt-auto", "flex", "flex-col", "gap-2", "p-4");
|
|
94
|
+
|
|
7
95
|
function Drawer({
|
|
8
96
|
...props
|
|
9
97
|
}: React.ComponentProps<typeof DrawerPrimitive.Root>) {
|
|
@@ -35,10 +123,7 @@ function DrawerOverlay({
|
|
|
35
123
|
return (
|
|
36
124
|
<DrawerPrimitive.Overlay
|
|
37
125
|
data-slot="drawer-overlay"
|
|
38
|
-
className={cn(
|
|
39
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
40
|
-
className,
|
|
41
|
-
)}
|
|
126
|
+
className={cn(drawerOverlayStyles, className)}
|
|
42
127
|
{...props}
|
|
43
128
|
/>
|
|
44
129
|
);
|
|
@@ -54,17 +139,10 @@ function DrawerContent({
|
|
|
54
139
|
<DrawerOverlay />
|
|
55
140
|
<DrawerPrimitive.Content
|
|
56
141
|
data-slot="drawer-content"
|
|
57
|
-
className={cn(
|
|
58
|
-
"group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
|
|
59
|
-
"data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
|
|
60
|
-
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
|
|
61
|
-
"data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
62
|
-
"data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
|
|
63
|
-
className,
|
|
64
|
-
)}
|
|
142
|
+
className={cn(drawerContentStyles, className)}
|
|
65
143
|
{...props}
|
|
66
144
|
>
|
|
67
|
-
<div className=
|
|
145
|
+
<div className={drawerHandleStyles} />
|
|
68
146
|
{children}
|
|
69
147
|
</DrawerPrimitive.Content>
|
|
70
148
|
</DrawerPortal>
|
|
@@ -75,10 +153,7 @@ function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
75
153
|
return (
|
|
76
154
|
<div
|
|
77
155
|
data-slot="drawer-header"
|
|
78
|
-
className={cn(
|
|
79
|
-
"flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",
|
|
80
|
-
className,
|
|
81
|
-
)}
|
|
156
|
+
className={cn(drawerHeaderStyles, className)}
|
|
82
157
|
{...props}
|
|
83
158
|
/>
|
|
84
159
|
);
|
|
@@ -88,7 +163,7 @@ function DrawerFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
88
163
|
return (
|
|
89
164
|
<div
|
|
90
165
|
data-slot="drawer-footer"
|
|
91
|
-
className={cn(
|
|
166
|
+
className={cn(drawerFooterStyles, className)}
|
|
92
167
|
{...props}
|
|
93
168
|
/>
|
|
94
169
|
);
|
|
@@ -4,6 +4,42 @@ import type * as React from "react";
|
|
|
4
4
|
|
|
5
5
|
import { cn } from "#shadcn/lib/utils";
|
|
6
6
|
|
|
7
|
+
// Dropdown menu content styles
|
|
8
|
+
const dropdownMenuContentStyles = cn(
|
|
9
|
+
// Background
|
|
10
|
+
"bg-bg-primary",
|
|
11
|
+
// Layout
|
|
12
|
+
"z-50",
|
|
13
|
+
"max-h-(--radix-dropdown-menu-content-available-height)",
|
|
14
|
+
"min-w-[8rem]",
|
|
15
|
+
"origin-(--radix-dropdown-menu-content-transform-origin)",
|
|
16
|
+
"overflow-x-hidden",
|
|
17
|
+
"overflow-y-auto",
|
|
18
|
+
// Shape
|
|
19
|
+
"rounded-md",
|
|
20
|
+
// Borders
|
|
21
|
+
"border",
|
|
22
|
+
"border-border-separator",
|
|
23
|
+
// Spacing
|
|
24
|
+
"p-2",
|
|
25
|
+
"space-y-0.5",
|
|
26
|
+
// Shadow
|
|
27
|
+
"shadow-lg",
|
|
28
|
+
// Animations - open
|
|
29
|
+
"data-[state=open]:animate-in",
|
|
30
|
+
"data-[state=open]:fade-in-0",
|
|
31
|
+
"data-[state=open]:zoom-in-95",
|
|
32
|
+
// Animations - closed
|
|
33
|
+
"data-[state=closed]:animate-out",
|
|
34
|
+
"data-[state=closed]:fade-out-0",
|
|
35
|
+
"data-[state=closed]:zoom-out-95",
|
|
36
|
+
// Slide animations
|
|
37
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
38
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
39
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
40
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
41
|
+
);
|
|
42
|
+
|
|
7
43
|
function DropdownMenu({
|
|
8
44
|
...props
|
|
9
45
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
@@ -39,15 +75,7 @@ function DropdownMenuContent({
|
|
|
39
75
|
<DropdownMenuPrimitive.Content
|
|
40
76
|
data-slot="dropdown-menu-content"
|
|
41
77
|
sideOffset={sideOffset}
|
|
42
|
-
className={cn(
|
|
43
|
-
"bg-bg-primary data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
44
|
-
"data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
45
|
-
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
46
|
-
"data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height)",
|
|
47
|
-
"min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin)",
|
|
48
|
-
"overflow-x-hidden overflow-y-auto rounded-md border border-border-separator px-2 py-3 shadow-lg space-y-0.5",
|
|
49
|
-
className,
|
|
50
|
-
)}
|
|
78
|
+
className={cn(dropdownMenuContentStyles, className)}
|
|
51
79
|
{...props}
|
|
52
80
|
/>
|
|
53
81
|
</DropdownMenuPrimitive.Portal>
|
|
@@ -14,6 +14,18 @@ import {
|
|
|
14
14
|
import { Label } from "#shadcn/components/ui/label";
|
|
15
15
|
import { cn } from "#shadcn/lib/utils";
|
|
16
16
|
|
|
17
|
+
// Form item styles
|
|
18
|
+
const formItemStyles = cn("grid", "gap-2");
|
|
19
|
+
|
|
20
|
+
// Form label error styles
|
|
21
|
+
const formLabelErrorStyles = cn("data-[error=true]:text-text-error-primary");
|
|
22
|
+
|
|
23
|
+
// Form description styles
|
|
24
|
+
const formDescriptionStyles = cn("text-text-secondary", "text-sm");
|
|
25
|
+
|
|
26
|
+
// Form message styles
|
|
27
|
+
const formMessageStyles = cn("text-text-error-primary", "text-sm");
|
|
28
|
+
|
|
17
29
|
const Form = FormProvider;
|
|
18
30
|
|
|
19
31
|
type FormFieldContextValue<
|
|
@@ -78,7 +90,7 @@ function FormItem({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
78
90
|
<FormItemContext.Provider value={{ id }}>
|
|
79
91
|
<div
|
|
80
92
|
data-slot="form-item"
|
|
81
|
-
className={cn(
|
|
93
|
+
className={cn(formItemStyles, className)}
|
|
82
94
|
{...props}
|
|
83
95
|
/>
|
|
84
96
|
</FormItemContext.Provider>
|
|
@@ -95,7 +107,7 @@ function FormLabel({
|
|
|
95
107
|
<Label
|
|
96
108
|
data-slot="form-label"
|
|
97
109
|
data-error={!!error}
|
|
98
|
-
className={cn(
|
|
110
|
+
className={cn(formLabelErrorStyles, className)}
|
|
99
111
|
htmlFor={formItemId}
|
|
100
112
|
{...props}
|
|
101
113
|
/>
|
|
@@ -128,7 +140,7 @@ function FormDescription({ className, ...props }: React.ComponentProps<"p">) {
|
|
|
128
140
|
<p
|
|
129
141
|
data-slot="form-description"
|
|
130
142
|
id={formDescriptionId}
|
|
131
|
-
className={cn(
|
|
143
|
+
className={cn(formDescriptionStyles, className)}
|
|
132
144
|
{...props}
|
|
133
145
|
/>
|
|
134
146
|
);
|
|
@@ -146,7 +158,7 @@ function FormMessage({ className, ...props }: React.ComponentProps<"p">) {
|
|
|
146
158
|
<p
|
|
147
159
|
data-slot="form-message"
|
|
148
160
|
id={formMessageId}
|
|
149
|
-
className={cn(
|
|
161
|
+
className={cn(formMessageStyles, className)}
|
|
150
162
|
{...props}
|
|
151
163
|
>
|
|
152
164
|
{body}
|