@health-samurai/react-components 0.0.0-alpha.2 → 0.0.0-alpha.21
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/LICENSE +21 -0
- package/README.md +102 -1
- package/dist/bundle.css +2349 -754
- package/dist/src/components/button-dropdown.d.ts +10 -0
- package/dist/src/components/button-dropdown.d.ts.map +1 -0
- package/dist/src/components/button-dropdown.js +70 -0
- package/dist/src/components/button-dropdown.js.map +1 -0
- package/dist/src/components/button-dropdown.stories.js +48 -0
- package/dist/src/components/button-dropdown.stories.js.map +1 -0
- package/dist/src/components/code-editor/fhir-autocomplete.d.ts +70 -0
- package/dist/src/components/code-editor/fhir-autocomplete.d.ts.map +1 -0
- package/dist/src/components/code-editor/fhir-autocomplete.js +1850 -0
- package/dist/src/components/code-editor/fhir-autocomplete.js.map +1 -0
- package/dist/src/components/code-editor/fhir-autocomplete.test.js +1099 -0
- package/dist/src/components/code-editor/fhir-autocomplete.test.js.map +1 -0
- 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.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 +12 -0
- package/dist/src/components/code-editor/http/index.d.ts.map +1 -0
- package/dist/src/components/code-editor/http/index.js +486 -0
- package/dist/src/components/code-editor/http/index.js.map +1 -0
- package/dist/src/components/code-editor/index.d.ts +39 -1
- package/dist/src/components/code-editor/index.d.ts.map +1 -1
- package/dist/src/components/code-editor/index.js +1792 -45
- package/dist/src/components/code-editor/index.js.map +1 -1
- package/dist/src/components/code-editor/json-ast.d.ts +46 -0
- package/dist/src/components/code-editor/json-ast.d.ts.map +1 -0
- package/dist/src/components/code-editor/json-ast.js +465 -0
- package/dist/src/components/code-editor/json-ast.js.map +1 -0
- package/dist/src/components/code-editor/json-ast.test.js +206 -0
- package/dist/src/components/code-editor/json-ast.test.js.map +1 -0
- package/dist/src/components/code-editor/sql-completion.d.ts +22 -0
- package/dist/src/components/code-editor/sql-completion.d.ts.map +1 -0
- package/dist/src/components/code-editor/sql-completion.js +897 -0
- package/dist/src/components/code-editor/sql-completion.js.map +1 -0
- package/dist/src/components/code-editor.stories.js +280 -3
- 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 +9 -0
- package/dist/src/components/data-table.d.ts.map +1 -0
- package/dist/src/components/data-table.js +66 -0
- package/dist/src/components/data-table.js.map +1 -0
- package/dist/src/components/data-table.stories.js +240 -0
- package/dist/src/components/data-table.stories.js.map +1 -0
- package/dist/src/components/date-picker-input.d.ts +10 -0
- package/dist/src/components/date-picker-input.d.ts.map +1 -0
- package/dist/src/components/date-picker-input.js +90 -0
- package/dist/src/components/date-picker-input.js.map +1 -0
- package/dist/src/components/date-picker-input.stories.js +76 -0
- package/dist/src/components/date-picker-input.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 +230 -0
- package/dist/src/components/fhir-structure-view.js.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/icon-button.d.ts +12 -0
- package/dist/src/components/icon-button.d.ts.map +1 -0
- package/dist/src/components/icon-button.js +41 -0
- package/dist/src/components/icon-button.js.map +1 -0
- package/dist/src/components/icon-button.stories.js +157 -0
- package/dist/src/components/icon-button.stories.js.map +1 -0
- package/dist/src/components/operation-outcome-view.d.ts +27 -0
- package/dist/src/components/operation-outcome-view.d.ts.map +1 -0
- package/dist/src/components/operation-outcome-view.js +198 -0
- package/dist/src/components/operation-outcome-view.js.map +1 -0
- package/dist/src/components/operation-outcome-view.stories.js +207 -0
- package/dist/src/components/operation-outcome-view.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 +73 -49
- package/dist/src/components/request-line-editor.js.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/sandbox.d.ts +13 -0
- package/dist/src/components/sandbox.d.ts.map +1 -0
- package/dist/src/components/sandbox.js +107 -0
- package/dist/src/components/sandbox.js.map +1 -0
- package/dist/src/components/sandbox.stories.js +126 -0
- package/dist/src/components/sandbox.stories.js.map +1 -0
- package/dist/src/components/segment-control.d.ts +13 -0
- package/dist/src/components/segment-control.d.ts.map +1 -0
- package/dist/src/components/segment-control.js +33 -0
- package/dist/src/components/segment-control.js.map +1 -0
- package/dist/src/components/segment-control.stories.js +68 -0
- package/dist/src/components/segment-control.stories.js.map +1 -0
- package/dist/src/components/split-button.d.ts +12 -0
- package/dist/src/components/split-button.d.ts.map +1 -0
- package/dist/src/components/split-button.js +33 -0
- package/dist/src/components/split-button.js.map +1 -0
- package/dist/src/components/split-button.stories.js +84 -0
- package/dist/src/components/split-button.stories.js.map +1 -0
- package/dist/src/components/tag.d.ts +16 -0
- package/dist/src/components/tag.d.ts.map +1 -0
- package/dist/src/components/tag.js +198 -0
- package/dist/src/components/tag.js.map +1 -0
- package/dist/src/components/tag.stories.js +459 -0
- package/dist/src/components/tag.stories.js.map +1 -0
- package/dist/src/components/tile.d.ts +15 -0
- package/dist/src/components/tile.d.ts.map +1 -0
- package/dist/src/components/tile.js +76 -0
- package/dist/src/components/tile.js.map +1 -0
- package/dist/src/components/tile.stories.js +167 -0
- package/dist/src/components/tile.stories.js.map +1 -0
- package/dist/src/components/toolbar.d.ts +18 -0
- package/dist/src/components/toolbar.d.ts.map +1 -0
- package/dist/src/components/toolbar.js +61 -0
- package/dist/src/components/toolbar.js.map +1 -0
- package/dist/src/components/toolbar.stories.js +69 -0
- package/dist/src/components/toolbar.stories.js.map +1 -0
- package/dist/src/components/tree-view.d.ts +47 -0
- package/dist/src/components/tree-view.d.ts.map +1 -0
- package/dist/src/components/tree-view.js +122 -0
- package/dist/src/components/tree-view.js.map +1 -0
- package/dist/src/components/tree-view.stories.js +283 -0
- package/dist/src/components/tree-view.stories.js.map +1 -0
- package/dist/src/icons.d.ts +11 -0
- package/dist/src/icons.d.ts.map +1 -0
- package/dist/src/icons.js +328 -0
- package/dist/src/icons.js.map +1 -0
- package/dist/src/index.css +358 -74
- package/dist/src/index.d.ts +17 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +17 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/shadcn/components/ui/accordion.d.ts +2 -2
- package/dist/src/shadcn/components/ui/accordion.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/accordion.js +35 -9
- package/dist/src/shadcn/components/ui/accordion.js.map +1 -1
- package/dist/src/shadcn/components/ui/alert-dialog.d.ts +12 -4
- package/dist/src/shadcn/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/alert-dialog.js +128 -18
- package/dist/src/shadcn/components/ui/alert-dialog.js.map +1 -1
- package/dist/src/shadcn/components/ui/alert-dialog.stories.js +269 -19
- package/dist/src/shadcn/components/ui/alert-dialog.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/alert.d.ts +29 -6
- package/dist/src/shadcn/components/ui/alert.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/alert.js +50 -19
- package/dist/src/shadcn/components/ui/alert.js.map +1 -1
- package/dist/src/shadcn/components/ui/alert.stories.js +140 -36
- package/dist/src/shadcn/components/ui/alert.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/aspect-ratio.js +1 -0
- package/dist/src/shadcn/components/ui/aspect-ratio.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/avatar.stories.js +68 -2
- package/dist/src/shadcn/components/ui/avatar.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/badge.d.ts +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 +5 -2
- package/dist/src/shadcn/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/breadcrumb.js +98 -13
- package/dist/src/shadcn/components/ui/breadcrumb.js.map +1 -1
- package/dist/src/shadcn/components/ui/breadcrumb.stories.js +205 -45
- package/dist/src/shadcn/components/ui/breadcrumb.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/button.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/button.js +65 -11
- package/dist/src/shadcn/components/ui/button.js.map +1 -1
- package/dist/src/shadcn/components/ui/button.stories.js +99 -17
- package/dist/src/shadcn/components/ui/button.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/calendar.d.ts +1 -1
- package/dist/src/shadcn/components/ui/calendar.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/calendar.js +1 -0
- package/dist/src/shadcn/components/ui/calendar.js.map +1 -1
- package/dist/src/shadcn/components/ui/card.d.ts +5 -1
- package/dist/src/shadcn/components/ui/card.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/card.js +28 -7
- package/dist/src/shadcn/components/ui/card.js.map +1 -1
- package/dist/src/shadcn/components/ui/card.stories.js +23 -2
- package/dist/src/shadcn/components/ui/card.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/carousel.d.ts +1 -1
- package/dist/src/shadcn/components/ui/carousel.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/carousel.js +1 -0
- package/dist/src/shadcn/components/ui/carousel.js.map +1 -1
- package/dist/src/shadcn/components/ui/chart.d.ts +5 -5
- package/dist/src/shadcn/components/ui/chart.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/chart.js +4 -3
- package/dist/src/shadcn/components/ui/chart.js.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.d.ts +5 -1
- package/dist/src/shadcn/components/ui/checkbox.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.js +46 -6
- package/dist/src/shadcn/components/ui/checkbox.js.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.stories.js +156 -46
- package/dist/src/shadcn/components/ui/checkbox.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/combobox.d.ts +29 -0
- package/dist/src/shadcn/components/ui/combobox.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/combobox.js +226 -0
- package/dist/src/shadcn/components/ui/combobox.js.map +1 -0
- package/dist/src/shadcn/components/ui/combobox.stories.js +167 -0
- package/dist/src/shadcn/components/ui/combobox.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/command.d.ts +4 -2
- package/dist/src/shadcn/components/ui/command.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/command.js +75 -13
- package/dist/src/shadcn/components/ui/command.js.map +1 -1
- package/dist/src/shadcn/components/ui/command.stories.js +277 -57
- package/dist/src/shadcn/components/ui/command.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/context-menu.d.ts +7 -3
- package/dist/src/shadcn/components/ui/context-menu.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/context-menu.js +120 -13
- package/dist/src/shadcn/components/ui/context-menu.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 +27 -5
- package/dist/src/shadcn/components/ui/drawer.js.map +1 -1
- package/dist/src/shadcn/components/ui/dropdown-menu.d.ts +7 -3
- package/dist/src/shadcn/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/dropdown-menu.js +122 -14
- package/dist/src/shadcn/components/ui/dropdown-menu.js.map +1 -1
- package/dist/src/shadcn/components/ui/dropdown-menu.stories.js +22 -5
- package/dist/src/shadcn/components/ui/dropdown-menu.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/form.d.ts +2 -2
- package/dist/src/shadcn/components/ui/form.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/form.js +17 -8
- package/dist/src/shadcn/components/ui/form.js.map +1 -1
- package/dist/src/shadcn/components/ui/hover-card.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/hover-card.js +2 -1
- package/dist/src/shadcn/components/ui/hover-card.js.map +1 -1
- package/dist/src/shadcn/components/ui/input-otp.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/input-otp.js +1 -0
- package/dist/src/shadcn/components/ui/input-otp.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/input.stories.js +218 -29
- package/dist/src/shadcn/components/ui/input.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/label.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/label.js +9 -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 +9 -2
- package/dist/src/shadcn/components/ui/pagination.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/pagination.js +41 -24
- package/dist/src/shadcn/components/ui/pagination.js.map +1 -1
- package/dist/src/shadcn/components/ui/pagination.stories.js +44 -37
- package/dist/src/shadcn/components/ui/pagination.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/popover.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/popover.js +13 -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-button-group.d.ts +21 -0
- package/dist/src/shadcn/components/ui/radio-button-group.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/radio-button-group.js +148 -0
- package/dist/src/shadcn/components/ui/radio-button-group.js.map +1 -0
- package/dist/src/shadcn/components/ui/radio-button-group.stories.js +283 -0
- package/dist/src/shadcn/components/ui/radio-button-group.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/radio-group.d.ts +5 -1
- package/dist/src/shadcn/components/ui/radio-group.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/radio-group.js +40 -7
- package/dist/src/shadcn/components/ui/radio-group.js.map +1 -1
- package/dist/src/shadcn/components/ui/radio-group.stories.js +107 -32
- package/dist/src/shadcn/components/ui/radio-group.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/resizable.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/resizable.js +2 -1
- package/dist/src/shadcn/components/ui/resizable.js.map +1 -1
- package/dist/src/shadcn/components/ui/resizable.stories.js +2 -2
- package/dist/src/shadcn/components/ui/resizable.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 +10 -3
- package/dist/src/shadcn/components/ui/scroll-area.js.map +1 -1
- package/dist/src/shadcn/components/ui/select.d.ts +1 -2
- package/dist/src/shadcn/components/ui/select.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/select.js +49 -19
- package/dist/src/shadcn/components/ui/select.js.map +1 -1
- package/dist/src/shadcn/components/ui/select.stories.js +193 -70
- 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 +8 -1
- package/dist/src/shadcn/components/ui/separator.js.map +1 -1
- package/dist/src/shadcn/components/ui/sheet.js +1 -1
- package/dist/src/shadcn/components/ui/sheet.js.map +1 -1
- package/dist/src/shadcn/components/ui/sidebar.d.ts +4 -4
- package/dist/src/shadcn/components/ui/sidebar.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/sidebar.js +21 -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 +35 -4
- package/dist/src/shadcn/components/ui/slider.js.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.d.ts +24 -2
- package/dist/src/shadcn/components/ui/sonner.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.js +127 -9
- package/dist/src/shadcn/components/ui/sonner.js.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.stories.js +251 -12
- package/dist/src/shadcn/components/ui/sonner.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/switch.d.ts +7 -1
- package/dist/src/shadcn/components/ui/switch.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/switch.js +55 -3
- package/dist/src/shadcn/components/ui/switch.js.map +1 -1
- package/dist/src/shadcn/components/ui/switch.stories.js +84 -9
- package/dist/src/shadcn/components/ui/switch.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/table.d.ts +23 -6
- package/dist/src/shadcn/components/ui/table.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/table.js +65 -20
- package/dist/src/shadcn/components/ui/table.js.map +1 -1
- package/dist/src/shadcn/components/ui/table.stories.js +217 -97
- package/dist/src/shadcn/components/ui/table.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.d.ts +30 -5
- package/dist/src/shadcn/components/ui/tabs.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.js +470 -23
- package/dist/src/shadcn/components/ui/tabs.js.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.stories.js +405 -181
- package/dist/src/shadcn/components/ui/tabs.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/textarea.d.ts +8 -1
- package/dist/src/shadcn/components/ui/textarea.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/textarea.js +30 -2
- package/dist/src/shadcn/components/ui/textarea.js.map +1 -1
- package/dist/src/shadcn/components/ui/textarea.stories.js +85 -4
- package/dist/src/shadcn/components/ui/textarea.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/toggle-group.d.ts +3 -3
- package/dist/src/shadcn/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/toggle-group.js +14 -12
- package/dist/src/shadcn/components/ui/toggle-group.js.map +1 -1
- package/dist/src/shadcn/components/ui/toggle.d.ts +3 -4
- package/dist/src/shadcn/components/ui/toggle.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/toggle.js +44 -16
- package/dist/src/shadcn/components/ui/toggle.js.map +1 -1
- package/dist/src/shadcn/components/ui/toggle.stories.js +130 -7
- package/dist/src/shadcn/components/ui/toggle.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/tooltip.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/tooltip.js +12 -1
- package/dist/src/shadcn/components/ui/tooltip.js.map +1 -1
- package/dist/src/shadcn/components/ui/tree.d.ts +29 -0
- package/dist/src/shadcn/components/ui/tree.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/tree.js +135 -0
- package/dist/src/shadcn/components/ui/tree.js.map +1 -0
- package/dist/src/shadcn/shadcn.css +4 -4
- package/dist/src/tokens.css +50 -20
- package/dist/src/typography.css +78 -15
- package/package.json +84 -64
- package/src/components/button-dropdown.stories.tsx +41 -0
- package/src/components/button-dropdown.tsx +97 -0
- package/src/components/code-editor/fhir-autocomplete.test.ts +993 -0
- package/src/components/code-editor/fhir-autocomplete.ts +2322 -0
- 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 +424 -0
- package/src/components/code-editor/index.tsx +1944 -42
- package/src/components/code-editor/json-ast.test.ts +230 -0
- package/src/components/code-editor/json-ast.ts +590 -0
- package/src/components/code-editor/sql-completion.ts +1112 -0
- package/src/components/code-editor.stories.tsx +325 -2
- package/src/components/copy-icon.tsx +57 -3
- package/src/components/data-table.stories.tsx +91 -0
- package/src/components/data-table.tsx +126 -0
- package/src/components/date-picker-input.stories.tsx +79 -0
- package/src/components/date-picker-input.tsx +104 -0
- package/src/components/fhir-structure-view.stories.tsx +439 -0
- package/src/components/fhir-structure-view.tsx +233 -0
- package/src/components/icon-button.stories.tsx +86 -0
- package/src/components/icon-button.tsx +57 -0
- package/src/components/operation-outcome-view.stories.tsx +163 -0
- package/src/components/operation-outcome-view.tsx +254 -0
- package/src/components/request-line-editor.stories.tsx +17 -27
- package/src/components/request-line-editor.tsx +103 -61
- package/src/components/sandbox.stories.tsx +131 -0
- package/src/components/sandbox.tsx +191 -0
- package/src/components/segment-control.stories.tsx +61 -0
- package/src/components/segment-control.tsx +83 -0
- package/src/components/split-button.stories.tsx +68 -0
- package/src/components/split-button.tsx +74 -0
- package/src/components/tag.stories.tsx +371 -0
- package/src/components/tag.tsx +236 -0
- package/src/components/tile.stories.tsx +149 -0
- package/src/components/tile.tsx +105 -0
- package/src/components/toolbar.stories.tsx +64 -0
- package/src/components/toolbar.tsx +98 -0
- package/src/components/tree-view.stories.tsx +265 -0
- package/src/components/tree-view.tsx +246 -0
- package/src/icons.tsx +331 -0
- package/src/index.css +358 -74
- package/src/index.tsx +17 -3
- package/src/shadcn/components/ui/accordion.tsx +91 -10
- package/src/shadcn/components/ui/alert-dialog.stories.tsx +209 -15
- package/src/shadcn/components/ui/alert-dialog.tsx +236 -26
- package/src/shadcn/components/ui/alert.stories.tsx +120 -21
- package/src/shadcn/components/ui/alert.tsx +125 -28
- package/src/shadcn/components/ui/aspect-ratio.tsx +1 -0
- package/src/shadcn/components/ui/avatar.stories.tsx +74 -1
- package/src/shadcn/components/ui/avatar.tsx +22 -6
- package/src/shadcn/components/ui/badge.tsx +67 -18
- package/src/shadcn/components/ui/breadcrumb.stories.tsx +161 -41
- package/src/shadcn/components/ui/breadcrumb.tsx +172 -23
- package/src/shadcn/components/ui/button.stories.tsx +106 -18
- package/src/shadcn/components/ui/button.tsx +151 -55
- package/src/shadcn/components/ui/calendar.tsx +1 -0
- package/src/shadcn/components/ui/card.stories.tsx +17 -3
- package/src/shadcn/components/ui/card.tsx +89 -14
- package/src/shadcn/components/ui/carousel.tsx +1 -0
- package/src/shadcn/components/ui/chart.tsx +9 -5
- package/src/shadcn/components/ui/checkbox.stories.tsx +78 -30
- package/src/shadcn/components/ui/checkbox.tsx +91 -8
- package/src/shadcn/components/ui/combobox.stories.tsx +148 -0
- package/src/shadcn/components/ui/combobox.tsx +324 -0
- package/src/shadcn/components/ui/command.stories.tsx +184 -39
- package/src/shadcn/components/ui/command.tsx +218 -37
- package/src/shadcn/components/ui/context-menu.tsx +333 -40
- package/src/shadcn/components/ui/dialog.tsx +101 -13
- package/src/shadcn/components/ui/drawer.tsx +94 -18
- package/src/shadcn/components/ui/dropdown-menu.stories.tsx +18 -2
- package/src/shadcn/components/ui/dropdown-menu.tsx +334 -68
- package/src/shadcn/components/ui/form.tsx +22 -11
- package/src/shadcn/components/ui/hover-card.tsx +2 -1
- package/src/shadcn/components/ui/input-otp.tsx +1 -0
- package/src/shadcn/components/ui/input.stories.tsx +235 -27
- package/src/shadcn/components/ui/input.tsx +400 -29
- package/src/shadcn/components/ui/label.tsx +22 -4
- package/src/shadcn/components/ui/menubar.tsx +188 -43
- package/src/shadcn/components/ui/pagination.stories.tsx +8 -2
- package/src/shadcn/components/ui/pagination.tsx +65 -8
- package/src/shadcn/components/ui/popover.tsx +36 -4
- package/src/shadcn/components/ui/progress.tsx +21 -5
- package/src/shadcn/components/ui/radio-button-group.stories.tsx +247 -0
- package/src/shadcn/components/ui/radio-button-group.tsx +188 -0
- package/src/shadcn/components/ui/radio-group.stories.tsx +70 -14
- package/src/shadcn/components/ui/radio-group.tsx +85 -9
- package/src/shadcn/components/ui/resizable.stories.tsx +2 -2
- package/src/shadcn/components/ui/resizable.tsx +2 -1
- package/src/shadcn/components/ui/scroll-area.tsx +34 -5
- package/src/shadcn/components/ui/select.stories.tsx +108 -32
- package/src/shadcn/components/ui/select.tsx +182 -36
- package/src/shadcn/components/ui/separator.tsx +16 -5
- package/src/shadcn/components/ui/sheet.tsx +1 -1
- package/src/shadcn/components/ui/sidebar.tsx +69 -26
- package/src/shadcn/components/ui/skeleton.tsx +4 -1
- package/src/shadcn/components/ui/slider.tsx +83 -11
- package/src/shadcn/components/ui/sonner.stories.tsx +238 -17
- package/src/shadcn/components/ui/sonner.tsx +254 -11
- package/src/shadcn/components/ui/switch.stories.tsx +52 -5
- package/src/shadcn/components/ui/switch.tsx +92 -7
- package/src/shadcn/components/ui/table.stories.tsx +252 -72
- package/src/shadcn/components/ui/table.tsx +204 -26
- package/src/shadcn/components/ui/tabs.stories.tsx +235 -123
- package/src/shadcn/components/ui/tabs.tsx +694 -36
- package/src/shadcn/components/ui/textarea.stories.tsx +94 -2
- package/src/shadcn/components/ui/textarea.tsx +70 -5
- package/src/shadcn/components/ui/toggle-group.tsx +35 -13
- package/src/shadcn/components/ui/toggle.stories.tsx +92 -5
- package/src/shadcn/components/ui/toggle.tsx +96 -23
- package/src/shadcn/components/ui/tooltip.tsx +34 -8
- package/src/shadcn/components/ui/tree.tsx +257 -0
- package/src/shadcn/shadcn.css +4 -4
- package/src/tokens.css +50 -20
- package/src/typography.css +78 -15
- package/dist/src/components/code-editor.stories.d.ts +0 -7
- package/dist/src/components/code-editor.stories.d.ts.map +0 -1
- package/dist/src/components/request-line-editor.stories.d.ts +0 -11
- package/dist/src/components/request-line-editor.stories.d.ts.map +0 -1
- package/dist/src/index.stories.d.ts +0 -14
- package/dist/src/index.stories.d.ts.map +0 -1
- package/dist/src/index.stories.js +0 -19
- package/dist/src/index.stories.js.map +0 -1
- package/dist/src/shadcn/components/ui/accordion.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/accordion.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/alert-dialog.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/alert-dialog.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/alert.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/alert.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/aspect-ratio.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/aspect-ratio.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/avatar.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/avatar.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/badge.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/badge.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/breadcrumb.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/breadcrumb.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/button.stories.d.ts +0 -23
- package/dist/src/shadcn/components/ui/button.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/calendar.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/calendar.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/card.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/card.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/carousel.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/carousel.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/chart.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/chart.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/checkbox.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/checkbox.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/collapsible.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/collapsible.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/command.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/command.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/context-menu.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/context-menu.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/dialog.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/dialog.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/drawer.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/drawer.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/dropdown-menu.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/dropdown-menu.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/form.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/form.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/hover-card.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/hover-card.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/input-otp.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/input-otp.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/input.stories.d.ts +0 -18
- package/dist/src/shadcn/components/ui/input.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/label.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/label.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/menubar.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/menubar.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/navigation-menu.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/navigation-menu.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/pagination.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/pagination.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/popover.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/popover.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/progress.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/progress.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/radio-group.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/radio-group.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/resizable.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/resizable.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/scroll-area.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/scroll-area.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/select.stories.d.ts +0 -11
- package/dist/src/shadcn/components/ui/select.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/separator.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/separator.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/sheet.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/sheet.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/sidebar.stories.d.ts +0 -11
- package/dist/src/shadcn/components/ui/sidebar.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/skeleton.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/skeleton.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/slider.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/slider.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/sonner.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/sonner.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/switch.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/switch.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/table.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/table.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/tabs.stories.d.ts +0 -32
- package/dist/src/shadcn/components/ui/tabs.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/textarea.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/textarea.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/toggle-group.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/toggle-group.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/toggle.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/toggle.stories.d.ts.map +0 -1
- package/dist/src/shadcn/components/ui/tooltip.stories.d.ts +0 -8
- package/dist/src/shadcn/components/ui/tooltip.stories.d.ts.map +0 -1
- package/src/index.stories.tsx +0 -21
|
@@ -1,8 +1,97 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import type * as React from "react";
|
|
2
3
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
3
4
|
|
|
4
5
|
import { cn } from "#shadcn/lib/utils";
|
|
5
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
|
+
|
|
6
95
|
function Drawer({
|
|
7
96
|
...props
|
|
8
97
|
}: React.ComponentProps<typeof DrawerPrimitive.Root>) {
|
|
@@ -34,10 +123,7 @@ function DrawerOverlay({
|
|
|
34
123
|
return (
|
|
35
124
|
<DrawerPrimitive.Overlay
|
|
36
125
|
data-slot="drawer-overlay"
|
|
37
|
-
className={cn(
|
|
38
|
-
"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",
|
|
39
|
-
className,
|
|
40
|
-
)}
|
|
126
|
+
className={cn(drawerOverlayStyles, className)}
|
|
41
127
|
{...props}
|
|
42
128
|
/>
|
|
43
129
|
);
|
|
@@ -53,17 +139,10 @@ function DrawerContent({
|
|
|
53
139
|
<DrawerOverlay />
|
|
54
140
|
<DrawerPrimitive.Content
|
|
55
141
|
data-slot="drawer-content"
|
|
56
|
-
className={cn(
|
|
57
|
-
"group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
|
|
58
|
-
"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",
|
|
59
|
-
"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",
|
|
60
|
-
"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",
|
|
61
|
-
"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",
|
|
62
|
-
className,
|
|
63
|
-
)}
|
|
142
|
+
className={cn(drawerContentStyles, className)}
|
|
64
143
|
{...props}
|
|
65
144
|
>
|
|
66
|
-
<div className=
|
|
145
|
+
<div className={drawerHandleStyles} />
|
|
67
146
|
{children}
|
|
68
147
|
</DrawerPrimitive.Content>
|
|
69
148
|
</DrawerPortal>
|
|
@@ -74,10 +153,7 @@ function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
74
153
|
return (
|
|
75
154
|
<div
|
|
76
155
|
data-slot="drawer-header"
|
|
77
|
-
className={cn(
|
|
78
|
-
"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",
|
|
79
|
-
className,
|
|
80
|
-
)}
|
|
156
|
+
className={cn(drawerHeaderStyles, className)}
|
|
81
157
|
{...props}
|
|
82
158
|
/>
|
|
83
159
|
);
|
|
@@ -87,7 +163,7 @@ function DrawerFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
87
163
|
return (
|
|
88
164
|
<div
|
|
89
165
|
data-slot="drawer-footer"
|
|
90
|
-
className={cn(
|
|
166
|
+
className={cn(drawerFooterStyles, className)}
|
|
91
167
|
{...props}
|
|
92
168
|
/>
|
|
93
169
|
);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Edit, Trash2 } from "lucide-react";
|
|
2
3
|
import { Button } from "#shadcn/components/ui/button";
|
|
3
4
|
import {
|
|
4
5
|
DropdownMenu,
|
|
5
6
|
DropdownMenuContent,
|
|
6
7
|
DropdownMenuGroup,
|
|
8
|
+
DropdownMenuIcon,
|
|
7
9
|
DropdownMenuItem,
|
|
8
10
|
DropdownMenuLabel,
|
|
9
11
|
DropdownMenuPortal,
|
|
@@ -30,6 +32,7 @@ export const Demo = {
|
|
|
30
32
|
</DropdownMenuTrigger>
|
|
31
33
|
<DropdownMenuContent className="w-56" align="start">
|
|
32
34
|
<DropdownMenuLabel>My Account</DropdownMenuLabel>
|
|
35
|
+
<DropdownMenuSeparator />
|
|
33
36
|
<DropdownMenuGroup>
|
|
34
37
|
<DropdownMenuItem>
|
|
35
38
|
Profile
|
|
@@ -37,7 +40,9 @@ export const Demo = {
|
|
|
37
40
|
</DropdownMenuItem>
|
|
38
41
|
<DropdownMenuItem>
|
|
39
42
|
Billing
|
|
40
|
-
<
|
|
43
|
+
<div>
|
|
44
|
+
<DropdownMenuShortcut>⌘B</DropdownMenuShortcut>
|
|
45
|
+
</div>
|
|
41
46
|
</DropdownMenuItem>
|
|
42
47
|
<DropdownMenuItem>
|
|
43
48
|
Settings
|
|
@@ -68,7 +73,18 @@ export const Demo = {
|
|
|
68
73
|
</DropdownMenuItem>
|
|
69
74
|
</DropdownMenuGroup>
|
|
70
75
|
<DropdownMenuSeparator />
|
|
71
|
-
<DropdownMenuItem>
|
|
76
|
+
<DropdownMenuItem>
|
|
77
|
+
GitHub
|
|
78
|
+
<div className="ml-auto flex items-center gap-0.5">
|
|
79
|
+
<DropdownMenuIcon>
|
|
80
|
+
<Edit />
|
|
81
|
+
</DropdownMenuIcon>
|
|
82
|
+
<DropdownMenuIcon>
|
|
83
|
+
<Trash2 />
|
|
84
|
+
</DropdownMenuIcon>
|
|
85
|
+
</div>
|
|
86
|
+
</DropdownMenuItem>
|
|
87
|
+
|
|
72
88
|
<DropdownMenuItem>Support</DropdownMenuItem>
|
|
73
89
|
<DropdownMenuItem disabled>API</DropdownMenuItem>
|
|
74
90
|
<DropdownMenuSeparator />
|
|
@@ -1,9 +1,307 @@
|
|
|
1
1
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
2
3
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
3
4
|
import type * as React from "react";
|
|
4
5
|
|
|
5
6
|
import { cn } from "#shadcn/lib/utils";
|
|
6
7
|
|
|
8
|
+
// Styles
|
|
9
|
+
const dropdownMenuContentBaseStyles = cn(
|
|
10
|
+
// Background
|
|
11
|
+
"bg-bg-primary",
|
|
12
|
+
// Layout
|
|
13
|
+
"z-50",
|
|
14
|
+
"max-h-(--radix-dropdown-menu-content-available-height)",
|
|
15
|
+
"min-w-[8rem]",
|
|
16
|
+
"origin-(--radix-dropdown-menu-content-transform-origin)",
|
|
17
|
+
"overflow-x-hidden",
|
|
18
|
+
"overflow-y-auto",
|
|
19
|
+
// Shape
|
|
20
|
+
"rounded-md",
|
|
21
|
+
// Border
|
|
22
|
+
"border",
|
|
23
|
+
"border-border-primary",
|
|
24
|
+
// Spacing
|
|
25
|
+
"p-2",
|
|
26
|
+
"gap-1",
|
|
27
|
+
"flex",
|
|
28
|
+
"flex-col",
|
|
29
|
+
// Shadow
|
|
30
|
+
"dropdown-menu-shadow",
|
|
31
|
+
// Animations - open
|
|
32
|
+
"data-[state=open]:animate-in",
|
|
33
|
+
"data-[state=open]:fade-in-0",
|
|
34
|
+
"data-[state=open]:zoom-in-95",
|
|
35
|
+
// Animations - closed
|
|
36
|
+
"data-[state=closed]:animate-out",
|
|
37
|
+
"data-[state=closed]:fade-out-0",
|
|
38
|
+
"data-[state=closed]:zoom-out-95",
|
|
39
|
+
// Slide animations
|
|
40
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
41
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
42
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
43
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const dropdownMenuItemBaseStyles = cn(
|
|
47
|
+
// Layout
|
|
48
|
+
"flex",
|
|
49
|
+
"items-center",
|
|
50
|
+
"justify-between",
|
|
51
|
+
"gap-2",
|
|
52
|
+
"h-7",
|
|
53
|
+
// Spacing
|
|
54
|
+
"px-2",
|
|
55
|
+
"py-0",
|
|
56
|
+
// Shape
|
|
57
|
+
"rounded",
|
|
58
|
+
// Typography
|
|
59
|
+
"typo-body",
|
|
60
|
+
// Colors
|
|
61
|
+
"text-text-primary",
|
|
62
|
+
// Interaction
|
|
63
|
+
"cursor-pointer",
|
|
64
|
+
"outline-hidden",
|
|
65
|
+
"select-none",
|
|
66
|
+
// Focus states
|
|
67
|
+
"focus:bg-bg-tertiary",
|
|
68
|
+
"focus:text-text-primary",
|
|
69
|
+
"focus:rounded",
|
|
70
|
+
// Disabled states
|
|
71
|
+
"data-[disabled]:pointer-events-none",
|
|
72
|
+
"data-[disabled]:opacity-50",
|
|
73
|
+
// Inset spacing
|
|
74
|
+
"data-[inset]:pl-8",
|
|
75
|
+
// SVG
|
|
76
|
+
"[&_svg]:pointer-events-none",
|
|
77
|
+
"[&_svg]:shrink-0",
|
|
78
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
79
|
+
"[&_svg:not([class*='text-'])]:text-fg-secondary",
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
const dropdownMenuItemVariants = cva(dropdownMenuItemBaseStyles, {
|
|
83
|
+
variants: {
|
|
84
|
+
variant: {
|
|
85
|
+
default: "",
|
|
86
|
+
destructive: cn(
|
|
87
|
+
"data-[variant=destructive]:text-text-error-primary",
|
|
88
|
+
"data-[variant=destructive]:focus:bg-bg-error-tertiary",
|
|
89
|
+
"data-[variant=destructive]:focus:text-text-error-primary",
|
|
90
|
+
"data-[variant=destructive]:*:[svg]:!text-text-error-primary",
|
|
91
|
+
),
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
defaultVariants: {
|
|
95
|
+
variant: "default",
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const dropdownMenuCheckboxItemBaseStyles = cn(
|
|
100
|
+
// Layout
|
|
101
|
+
"relative",
|
|
102
|
+
"flex",
|
|
103
|
+
"items-center",
|
|
104
|
+
"gap-2",
|
|
105
|
+
"h-7",
|
|
106
|
+
// Spacing
|
|
107
|
+
"py-0",
|
|
108
|
+
"pr-2",
|
|
109
|
+
"pl-9",
|
|
110
|
+
// Shape
|
|
111
|
+
"rounded",
|
|
112
|
+
// Typography
|
|
113
|
+
"typo-body",
|
|
114
|
+
// Colors
|
|
115
|
+
"text-text-primary",
|
|
116
|
+
// Interaction
|
|
117
|
+
"cursor-default",
|
|
118
|
+
"outline-hidden",
|
|
119
|
+
"select-none",
|
|
120
|
+
// Focus states
|
|
121
|
+
"focus:bg-bg-secondary",
|
|
122
|
+
"focus:text-text-primary",
|
|
123
|
+
// Disabled states
|
|
124
|
+
"data-[disabled]:pointer-events-none",
|
|
125
|
+
"data-[disabled]:opacity-50",
|
|
126
|
+
// SVG
|
|
127
|
+
"[&_svg]:pointer-events-none",
|
|
128
|
+
"[&_svg]:shrink-0",
|
|
129
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
130
|
+
"[&_svg]:text-text-link",
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
const dropdownMenuCheckboxIndicatorStyles = cn(
|
|
134
|
+
// Layout
|
|
135
|
+
"pointer-events-none",
|
|
136
|
+
"absolute",
|
|
137
|
+
"left-3",
|
|
138
|
+
"flex",
|
|
139
|
+
"size-3.5",
|
|
140
|
+
"items-center",
|
|
141
|
+
"justify-center",
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
const dropdownMenuRadioItemBaseStyles = cn(
|
|
145
|
+
// Layout
|
|
146
|
+
"relative",
|
|
147
|
+
"flex",
|
|
148
|
+
"items-center",
|
|
149
|
+
"gap-2",
|
|
150
|
+
"h-7",
|
|
151
|
+
// Spacing
|
|
152
|
+
"py-0",
|
|
153
|
+
"pr-2",
|
|
154
|
+
// Shape
|
|
155
|
+
"rounded",
|
|
156
|
+
// Typography
|
|
157
|
+
"typo-body",
|
|
158
|
+
// Colors
|
|
159
|
+
"text-text-primary",
|
|
160
|
+
// Interaction
|
|
161
|
+
"cursor-pointer",
|
|
162
|
+
"outline-hidden",
|
|
163
|
+
"select-none",
|
|
164
|
+
// Focus states
|
|
165
|
+
"focus:bg-bg-secondary",
|
|
166
|
+
"focus:text-text-primary",
|
|
167
|
+
// Disabled states
|
|
168
|
+
"data-[disabled]:pointer-events-none",
|
|
169
|
+
"data-[disabled]:opacity-50",
|
|
170
|
+
// SVG
|
|
171
|
+
"[&_svg]:pointer-events-none",
|
|
172
|
+
"[&_svg]:shrink-0",
|
|
173
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
174
|
+
);
|
|
175
|
+
|
|
176
|
+
const dropdownMenuRadioIndicatorStyles = cn(
|
|
177
|
+
// Layout
|
|
178
|
+
"pointer-events-none",
|
|
179
|
+
"absolute",
|
|
180
|
+
"left-2",
|
|
181
|
+
"flex",
|
|
182
|
+
"size-3.5",
|
|
183
|
+
"items-center",
|
|
184
|
+
"justify-center",
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
const dropdownMenuLabelBaseStyles = cn(
|
|
188
|
+
// Layout
|
|
189
|
+
"flex",
|
|
190
|
+
"items-center",
|
|
191
|
+
"h-7",
|
|
192
|
+
// Spacing
|
|
193
|
+
"px-2",
|
|
194
|
+
"py-0",
|
|
195
|
+
"data-[inset]:pl-10",
|
|
196
|
+
// Typography
|
|
197
|
+
"typo-label-tiny",
|
|
198
|
+
// Colors
|
|
199
|
+
"text-text-secondary",
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
const dropdownMenuSeparatorBaseStyles = cn(
|
|
203
|
+
// Border
|
|
204
|
+
"border-t",
|
|
205
|
+
"border-border-separator",
|
|
206
|
+
// Spacing
|
|
207
|
+
"-mx-1",
|
|
208
|
+
"my-1",
|
|
209
|
+
// Size
|
|
210
|
+
"h-1",
|
|
211
|
+
);
|
|
212
|
+
|
|
213
|
+
const dropdownMenuShortcutBaseStyles = cn(
|
|
214
|
+
// Typography
|
|
215
|
+
"text-xs",
|
|
216
|
+
"tracking-widest",
|
|
217
|
+
// Colors
|
|
218
|
+
"text-text-secondary",
|
|
219
|
+
// Spacing
|
|
220
|
+
"ml-auto",
|
|
221
|
+
);
|
|
222
|
+
|
|
223
|
+
const dropdownMenuIconBaseStyles = cn(
|
|
224
|
+
// Layout
|
|
225
|
+
"flex",
|
|
226
|
+
"items-center",
|
|
227
|
+
"justify-center",
|
|
228
|
+
// Size
|
|
229
|
+
"size-6",
|
|
230
|
+
// Spacing
|
|
231
|
+
"p-1",
|
|
232
|
+
// SVG
|
|
233
|
+
"[&_svg]:pointer-events-none",
|
|
234
|
+
"[&_svg]:shrink-0",
|
|
235
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
236
|
+
"[&_svg:not([class*='text-'])]:text-fg-tertiary",
|
|
237
|
+
// Hover states
|
|
238
|
+
"hover:[&_svg:not([class*='text-'])]:text-fg-tertiary_hover",
|
|
239
|
+
);
|
|
240
|
+
|
|
241
|
+
const dropdownMenuSubTriggerBaseStyles = cn(
|
|
242
|
+
// Layout
|
|
243
|
+
"flex",
|
|
244
|
+
"items-center",
|
|
245
|
+
"h-7",
|
|
246
|
+
// Spacing
|
|
247
|
+
"px-2",
|
|
248
|
+
"py-0",
|
|
249
|
+
"data-[inset]:pl-8",
|
|
250
|
+
// Shape
|
|
251
|
+
"rounded",
|
|
252
|
+
// Typography
|
|
253
|
+
"typo-body",
|
|
254
|
+
// Colors
|
|
255
|
+
"text-text-primary",
|
|
256
|
+
// Interaction
|
|
257
|
+
"cursor-default",
|
|
258
|
+
"outline-hidden",
|
|
259
|
+
"select-none",
|
|
260
|
+
// Focus states
|
|
261
|
+
"focus:bg-bg-secondary",
|
|
262
|
+
"focus:text-text-primary",
|
|
263
|
+
"data-[state=open]:bg-accent",
|
|
264
|
+
"data-[state=open]:text-accent-foreground",
|
|
265
|
+
);
|
|
266
|
+
|
|
267
|
+
const dropdownMenuSubContentBaseStyles = cn(
|
|
268
|
+
// Background
|
|
269
|
+
"bg-bg-primary",
|
|
270
|
+
// Layout
|
|
271
|
+
"z-50",
|
|
272
|
+
"min-w-[8rem]",
|
|
273
|
+
"origin-(--radix-dropdown-menu-content-transform-origin)",
|
|
274
|
+
"overflow-hidden",
|
|
275
|
+
// Shape
|
|
276
|
+
"rounded-md",
|
|
277
|
+
// Border
|
|
278
|
+
"border",
|
|
279
|
+
"border-border-primary",
|
|
280
|
+
// Spacing
|
|
281
|
+
"p-2",
|
|
282
|
+
"gap-1",
|
|
283
|
+
"flex",
|
|
284
|
+
"flex-col",
|
|
285
|
+
// Colors
|
|
286
|
+
"text-text-primary",
|
|
287
|
+
// Shadow
|
|
288
|
+
"dropdown-menu-shadow",
|
|
289
|
+
// Animations - open
|
|
290
|
+
"data-[state=open]:animate-in",
|
|
291
|
+
"data-[state=open]:fade-in-0",
|
|
292
|
+
"data-[state=open]:zoom-in-95",
|
|
293
|
+
// Animations - closed
|
|
294
|
+
"data-[state=closed]:animate-out",
|
|
295
|
+
"data-[state=closed]:fade-out-0",
|
|
296
|
+
"data-[state=closed]:zoom-out-95",
|
|
297
|
+
// Slide animations
|
|
298
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
299
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
300
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
301
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
302
|
+
);
|
|
303
|
+
|
|
304
|
+
// Components
|
|
7
305
|
function DropdownMenu({
|
|
8
306
|
...props
|
|
9
307
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
@@ -39,15 +337,7 @@ function DropdownMenuContent({
|
|
|
39
337
|
<DropdownMenuPrimitive.Content
|
|
40
338
|
data-slot="dropdown-menu-content"
|
|
41
339
|
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
|
-
)}
|
|
340
|
+
className={cn(dropdownMenuContentBaseStyles, className)}
|
|
51
341
|
{...props}
|
|
52
342
|
/>
|
|
53
343
|
</DropdownMenuPrimitive.Portal>
|
|
@@ -67,33 +357,16 @@ function DropdownMenuItem({
|
|
|
67
357
|
inset,
|
|
68
358
|
variant = "default",
|
|
69
359
|
...props
|
|
70
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> &
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}) {
|
|
360
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> &
|
|
361
|
+
VariantProps<typeof dropdownMenuItemVariants> & {
|
|
362
|
+
inset?: boolean;
|
|
363
|
+
}) {
|
|
74
364
|
return (
|
|
75
365
|
<DropdownMenuPrimitive.Item
|
|
76
366
|
data-slot="dropdown-menu-item"
|
|
77
367
|
data-inset={inset}
|
|
78
368
|
data-variant={variant}
|
|
79
|
-
className={cn(
|
|
80
|
-
"cursor-pointer items-center flex gap-2 h-8 px-3 py-1.5 relativerounded-md",
|
|
81
|
-
"outline-hidden select-none typo-body text-text-secondary",
|
|
82
|
-
"focus:bg-bg-secondary focus:text-text-primary",
|
|
83
|
-
"data-[variant=destructive]:text-text-error-primary",
|
|
84
|
-
"data-[variant=destructive]:focus:bg-bg-error-tertiary",
|
|
85
|
-
"dark:data-[variant=destructive]:focus:bg-bg-error-tertiary",
|
|
86
|
-
"data-[variant=destructive]:focus:text-text-error-primary",
|
|
87
|
-
"data-[variant=destructive]:*:[svg]:!text-text-error-primary",
|
|
88
|
-
"[&_svg:not([class*='text-'])]:fg-fg-secondary",
|
|
89
|
-
"data-[disabled]:pointer-events-none",
|
|
90
|
-
"data-[disabled]:opacity-50",
|
|
91
|
-
"data-[inset]:pl-8",
|
|
92
|
-
"[&_svg]:pointer-events-none",
|
|
93
|
-
"[&_svg]:shrink-0",
|
|
94
|
-
"[&_svg:not([class*='size-'])]:size-4",
|
|
95
|
-
className,
|
|
96
|
-
)}
|
|
369
|
+
className={cn(dropdownMenuItemVariants({ variant }), className)}
|
|
97
370
|
{...props}
|
|
98
371
|
/>
|
|
99
372
|
);
|
|
@@ -107,15 +380,10 @@ function DropdownMenuCheckboxItem({
|
|
|
107
380
|
return (
|
|
108
381
|
<DropdownMenuPrimitive.CheckboxItem
|
|
109
382
|
data-slot="dropdown-menu-checkbox-item"
|
|
110
|
-
className={cn(
|
|
111
|
-
"focus:bg-bg-secondary focus:text-text-primary relative flex cursor-default items-center gap-2 rounded-lg py-1 pr-2 pl-9",
|
|
112
|
-
"outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none",
|
|
113
|
-
"[&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg]:text-text-link h-8 typo-body text-text-secondary",
|
|
114
|
-
className,
|
|
115
|
-
)}
|
|
383
|
+
className={cn(dropdownMenuCheckboxItemBaseStyles, className)}
|
|
116
384
|
{...props}
|
|
117
385
|
>
|
|
118
|
-
<span className=
|
|
386
|
+
<span className={dropdownMenuCheckboxIndicatorStyles}>
|
|
119
387
|
<DropdownMenuPrimitive.ItemIndicator>
|
|
120
388
|
<CheckIcon className="size-4" />
|
|
121
389
|
</DropdownMenuPrimitive.ItemIndicator>
|
|
@@ -144,15 +412,10 @@ function DropdownMenuRadioItem({
|
|
|
144
412
|
return (
|
|
145
413
|
<DropdownMenuPrimitive.RadioItem
|
|
146
414
|
data-slot="dropdown-menu-radio-item"
|
|
147
|
-
className={cn(
|
|
148
|
-
"focus:bg-bg-secondary focus:text-text-primary relative flex cursor-pointer items-center gap-2 rounded-md py-1.5 pr-2",
|
|
149
|
-
"outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none",
|
|
150
|
-
"[&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 h-8 typo-body text-text-secondary",
|
|
151
|
-
className,
|
|
152
|
-
)}
|
|
415
|
+
className={cn(dropdownMenuRadioItemBaseStyles, className)}
|
|
153
416
|
{...props}
|
|
154
417
|
>
|
|
155
|
-
<span className=
|
|
418
|
+
<span className={dropdownMenuRadioIndicatorStyles}>
|
|
156
419
|
<DropdownMenuPrimitive.ItemIndicator>
|
|
157
420
|
<CircleIcon className="size-2 fill-current" />
|
|
158
421
|
</DropdownMenuPrimitive.ItemIndicator>
|
|
@@ -173,10 +436,7 @@ function DropdownMenuLabel({
|
|
|
173
436
|
<DropdownMenuPrimitive.Label
|
|
174
437
|
data-slot="dropdown-menu-label"
|
|
175
438
|
data-inset={inset}
|
|
176
|
-
className={cn(
|
|
177
|
-
"px-3 py-1.5 data-[inset]:pl-10 typo-body text-text-secondary",
|
|
178
|
-
className,
|
|
179
|
-
)}
|
|
439
|
+
className={cn(dropdownMenuLabelBaseStyles, className)}
|
|
180
440
|
{...props}
|
|
181
441
|
/>
|
|
182
442
|
);
|
|
@@ -189,7 +449,7 @@ function DropdownMenuSeparator({
|
|
|
189
449
|
return (
|
|
190
450
|
<DropdownMenuPrimitive.Separator
|
|
191
451
|
data-slot="dropdown-menu-separator"
|
|
192
|
-
className={cn(
|
|
452
|
+
className={cn(dropdownMenuSeparatorBaseStyles, className)}
|
|
193
453
|
{...props}
|
|
194
454
|
/>
|
|
195
455
|
);
|
|
@@ -202,15 +462,28 @@ function DropdownMenuShortcut({
|
|
|
202
462
|
return (
|
|
203
463
|
<span
|
|
204
464
|
data-slot="dropdown-menu-shortcut"
|
|
205
|
-
className={cn(
|
|
206
|
-
"text-text-secondary ml-auto text-xs tracking-widest",
|
|
207
|
-
className,
|
|
208
|
-
)}
|
|
465
|
+
className={cn(dropdownMenuShortcutBaseStyles, className)}
|
|
209
466
|
{...props}
|
|
210
467
|
/>
|
|
211
468
|
);
|
|
212
469
|
}
|
|
213
470
|
|
|
471
|
+
function DropdownMenuIcon({
|
|
472
|
+
className,
|
|
473
|
+
children,
|
|
474
|
+
...props
|
|
475
|
+
}: React.ComponentProps<"span">) {
|
|
476
|
+
return (
|
|
477
|
+
<span
|
|
478
|
+
data-slot="dropdown-menu-icon"
|
|
479
|
+
className={cn(dropdownMenuIconBaseStyles, className)}
|
|
480
|
+
{...props}
|
|
481
|
+
>
|
|
482
|
+
{children}
|
|
483
|
+
</span>
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
|
|
214
487
|
function DropdownMenuSub({
|
|
215
488
|
...props
|
|
216
489
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
|
@@ -229,15 +502,13 @@ function DropdownMenuSubTrigger({
|
|
|
229
502
|
<DropdownMenuPrimitive.SubTrigger
|
|
230
503
|
data-slot="dropdown-menu-sub-trigger"
|
|
231
504
|
data-inset={inset}
|
|
232
|
-
className={cn(
|
|
233
|
-
"focus:bg-bg-secondary focus:text-text-primary data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex",
|
|
234
|
-
"cursor-default items-center rounded-md px-3 py-1.5 outline-hidden select-none data-[inset]:pl-8 h-8 typo-body text-text-secondary",
|
|
235
|
-
className,
|
|
236
|
-
)}
|
|
505
|
+
className={cn(dropdownMenuSubTriggerBaseStyles, className)}
|
|
237
506
|
{...props}
|
|
238
507
|
>
|
|
239
508
|
{children}
|
|
240
|
-
<
|
|
509
|
+
<DropdownMenuIcon className="ml-auto">
|
|
510
|
+
<ChevronRightIcon />
|
|
511
|
+
</DropdownMenuIcon>
|
|
241
512
|
</DropdownMenuPrimitive.SubTrigger>
|
|
242
513
|
);
|
|
243
514
|
}
|
|
@@ -249,14 +520,7 @@ function DropdownMenuSubContent({
|
|
|
249
520
|
return (
|
|
250
521
|
<DropdownMenuPrimitive.SubContent
|
|
251
522
|
data-slot="dropdown-menu-sub-content"
|
|
252
|
-
className={cn(
|
|
253
|
-
"bg-bg-primary text-text-primary data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
254
|
-
"data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2",
|
|
255
|
-
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50",
|
|
256
|
-
"min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border border-border-separator",
|
|
257
|
-
"p-2 shadow-lg",
|
|
258
|
-
className,
|
|
259
|
-
)}
|
|
523
|
+
className={cn(dropdownMenuSubContentBaseStyles, className)}
|
|
260
524
|
{...props}
|
|
261
525
|
/>
|
|
262
526
|
);
|
|
@@ -270,11 +534,13 @@ export {
|
|
|
270
534
|
DropdownMenuGroup,
|
|
271
535
|
DropdownMenuLabel,
|
|
272
536
|
DropdownMenuItem,
|
|
537
|
+
dropdownMenuItemVariants,
|
|
273
538
|
DropdownMenuCheckboxItem,
|
|
274
539
|
DropdownMenuRadioGroup,
|
|
275
540
|
DropdownMenuRadioItem,
|
|
276
541
|
DropdownMenuSeparator,
|
|
277
542
|
DropdownMenuShortcut,
|
|
543
|
+
DropdownMenuIcon,
|
|
278
544
|
DropdownMenuSub,
|
|
279
545
|
DropdownMenuSubTrigger,
|
|
280
546
|
DropdownMenuSubContent,
|