@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,9 +1,308 @@
|
|
|
1
1
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-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 contextMenuContentBaseStyles = cn(
|
|
10
|
+
// Background
|
|
11
|
+
"bg-bg-primary",
|
|
12
|
+
// Layout
|
|
13
|
+
"z-50",
|
|
14
|
+
"max-h-(--radix-context-menu-content-available-height)",
|
|
15
|
+
"min-w-[8rem]",
|
|
16
|
+
"origin-(--radix-context-menu-content-transform-origin)",
|
|
17
|
+
"overflow-x-hidden",
|
|
18
|
+
"overflow-y-auto",
|
|
19
|
+
// Shape
|
|
20
|
+
"rounded-md",
|
|
21
|
+
// Border
|
|
22
|
+
"border",
|
|
23
|
+
"border-border-separator",
|
|
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 contextMenuItemBaseStyles = cn(
|
|
47
|
+
// Layout
|
|
48
|
+
"flex",
|
|
49
|
+
"items-center",
|
|
50
|
+
"justify-between",
|
|
51
|
+
"gap-2",
|
|
52
|
+
"h-7",
|
|
53
|
+
// Spacing
|
|
54
|
+
"px-3",
|
|
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 contextMenuItemVariants = cva(contextMenuItemBaseStyles, {
|
|
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 contextMenuCheckboxItemBaseStyles = 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 contextMenuCheckboxIndicatorStyles = 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 contextMenuRadioItemBaseStyles = 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
|
+
"pl-8",
|
|
155
|
+
// Shape
|
|
156
|
+
"rounded",
|
|
157
|
+
// Typography
|
|
158
|
+
"typo-body",
|
|
159
|
+
// Colors
|
|
160
|
+
"text-text-primary",
|
|
161
|
+
// Interaction
|
|
162
|
+
"cursor-pointer",
|
|
163
|
+
"outline-hidden",
|
|
164
|
+
"select-none",
|
|
165
|
+
// Focus states
|
|
166
|
+
"focus:bg-bg-secondary",
|
|
167
|
+
"focus:text-text-primary",
|
|
168
|
+
// Disabled states
|
|
169
|
+
"data-[disabled]:pointer-events-none",
|
|
170
|
+
"data-[disabled]:opacity-50",
|
|
171
|
+
// SVG
|
|
172
|
+
"[&_svg]:pointer-events-none",
|
|
173
|
+
"[&_svg]:shrink-0",
|
|
174
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
const contextMenuRadioIndicatorStyles = cn(
|
|
178
|
+
// Layout
|
|
179
|
+
"pointer-events-none",
|
|
180
|
+
"absolute",
|
|
181
|
+
"left-2",
|
|
182
|
+
"flex",
|
|
183
|
+
"size-3.5",
|
|
184
|
+
"items-center",
|
|
185
|
+
"justify-center",
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
const contextMenuLabelBaseStyles = cn(
|
|
189
|
+
// Layout
|
|
190
|
+
"flex",
|
|
191
|
+
"items-center",
|
|
192
|
+
"h-7",
|
|
193
|
+
// Spacing
|
|
194
|
+
"px-3",
|
|
195
|
+
"py-0",
|
|
196
|
+
"data-[inset]:pl-10",
|
|
197
|
+
// Typography
|
|
198
|
+
"typo-label-tiny",
|
|
199
|
+
// Colors
|
|
200
|
+
"text-text-secondary",
|
|
201
|
+
);
|
|
202
|
+
|
|
203
|
+
const contextMenuSeparatorBaseStyles = cn(
|
|
204
|
+
// Border
|
|
205
|
+
"border-t",
|
|
206
|
+
"border-border-separator",
|
|
207
|
+
// Spacing
|
|
208
|
+
"-mx-1",
|
|
209
|
+
"my-1",
|
|
210
|
+
// Size
|
|
211
|
+
"h-1",
|
|
212
|
+
);
|
|
213
|
+
|
|
214
|
+
const contextMenuShortcutBaseStyles = cn(
|
|
215
|
+
// Typography
|
|
216
|
+
"text-xs",
|
|
217
|
+
"tracking-widest",
|
|
218
|
+
// Colors
|
|
219
|
+
"text-text-secondary",
|
|
220
|
+
// Spacing
|
|
221
|
+
"ml-auto",
|
|
222
|
+
);
|
|
223
|
+
|
|
224
|
+
const contextMenuIconBaseStyles = cn(
|
|
225
|
+
// Layout
|
|
226
|
+
"flex",
|
|
227
|
+
"items-center",
|
|
228
|
+
"justify-center",
|
|
229
|
+
// Size
|
|
230
|
+
"size-6",
|
|
231
|
+
// Spacing
|
|
232
|
+
"p-1",
|
|
233
|
+
// SVG
|
|
234
|
+
"[&_svg]:pointer-events-none",
|
|
235
|
+
"[&_svg]:shrink-0",
|
|
236
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
237
|
+
"[&_svg:not([class*='text-'])]:text-fg-tertiary",
|
|
238
|
+
// Hover states
|
|
239
|
+
"hover:[&_svg:not([class*='text-'])]:text-fg-tertiary_hover",
|
|
240
|
+
);
|
|
241
|
+
|
|
242
|
+
const contextMenuSubTriggerBaseStyles = cn(
|
|
243
|
+
// Layout
|
|
244
|
+
"flex",
|
|
245
|
+
"items-center",
|
|
246
|
+
"h-7",
|
|
247
|
+
// Spacing
|
|
248
|
+
"px-3",
|
|
249
|
+
"py-0",
|
|
250
|
+
"data-[inset]:pl-8",
|
|
251
|
+
// Shape
|
|
252
|
+
"rounded",
|
|
253
|
+
// Typography
|
|
254
|
+
"typo-body",
|
|
255
|
+
// Colors
|
|
256
|
+
"text-text-primary",
|
|
257
|
+
// Interaction
|
|
258
|
+
"cursor-default",
|
|
259
|
+
"outline-hidden",
|
|
260
|
+
"select-none",
|
|
261
|
+
// Focus states
|
|
262
|
+
"focus:bg-bg-secondary",
|
|
263
|
+
"focus:text-text-primary",
|
|
264
|
+
"data-[state=open]:bg-bg-secondary",
|
|
265
|
+
"data-[state=open]:text-text-primary",
|
|
266
|
+
);
|
|
267
|
+
|
|
268
|
+
const contextMenuSubContentBaseStyles = cn(
|
|
269
|
+
// Background
|
|
270
|
+
"bg-bg-primary",
|
|
271
|
+
// Layout
|
|
272
|
+
"z-50",
|
|
273
|
+
"min-w-[8rem]",
|
|
274
|
+
"origin-(--radix-context-menu-content-transform-origin)",
|
|
275
|
+
"overflow-hidden",
|
|
276
|
+
// Shape
|
|
277
|
+
"rounded-md",
|
|
278
|
+
// Border
|
|
279
|
+
"border",
|
|
280
|
+
"border-border-separator",
|
|
281
|
+
// Spacing
|
|
282
|
+
"p-2",
|
|
283
|
+
"gap-1",
|
|
284
|
+
"flex",
|
|
285
|
+
"flex-col",
|
|
286
|
+
// Colors
|
|
287
|
+
"text-text-primary",
|
|
288
|
+
// Shadow
|
|
289
|
+
"dropdown-menu-shadow",
|
|
290
|
+
// Animations - open
|
|
291
|
+
"data-[state=open]:animate-in",
|
|
292
|
+
"data-[state=open]:fade-in-0",
|
|
293
|
+
"data-[state=open]:zoom-in-95",
|
|
294
|
+
// Animations - closed
|
|
295
|
+
"data-[state=closed]:animate-out",
|
|
296
|
+
"data-[state=closed]:fade-out-0",
|
|
297
|
+
"data-[state=closed]:zoom-out-95",
|
|
298
|
+
// Slide animations
|
|
299
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
300
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
301
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
302
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
303
|
+
);
|
|
304
|
+
|
|
305
|
+
// Components
|
|
7
306
|
function ContextMenu({
|
|
8
307
|
...props
|
|
9
308
|
}: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {
|
|
@@ -63,14 +362,11 @@ function ContextMenuSubTrigger({
|
|
|
63
362
|
<ContextMenuPrimitive.SubTrigger
|
|
64
363
|
data-slot="context-menu-sub-trigger"
|
|
65
364
|
data-inset={inset}
|
|
66
|
-
className={cn(
|
|
67
|
-
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
68
|
-
className,
|
|
69
|
-
)}
|
|
365
|
+
className={cn(contextMenuSubTriggerBaseStyles, className)}
|
|
70
366
|
{...props}
|
|
71
367
|
>
|
|
72
368
|
{children}
|
|
73
|
-
<ChevronRightIcon className="ml-auto" />
|
|
369
|
+
<ChevronRightIcon className="ml-auto size-4" />
|
|
74
370
|
</ContextMenuPrimitive.SubTrigger>
|
|
75
371
|
);
|
|
76
372
|
}
|
|
@@ -82,10 +378,7 @@ function ContextMenuSubContent({
|
|
|
82
378
|
return (
|
|
83
379
|
<ContextMenuPrimitive.SubContent
|
|
84
380
|
data-slot="context-menu-sub-content"
|
|
85
|
-
className={cn(
|
|
86
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 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 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 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
87
|
-
className,
|
|
88
|
-
)}
|
|
381
|
+
className={cn(contextMenuSubContentBaseStyles, className)}
|
|
89
382
|
{...props}
|
|
90
383
|
/>
|
|
91
384
|
);
|
|
@@ -99,10 +392,7 @@ function ContextMenuContent({
|
|
|
99
392
|
<ContextMenuPrimitive.Portal>
|
|
100
393
|
<ContextMenuPrimitive.Content
|
|
101
394
|
data-slot="context-menu-content"
|
|
102
|
-
className={cn(
|
|
103
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 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 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 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
104
|
-
className,
|
|
105
|
-
)}
|
|
395
|
+
className={cn(contextMenuContentBaseStyles, className)}
|
|
106
396
|
{...props}
|
|
107
397
|
/>
|
|
108
398
|
</ContextMenuPrimitive.Portal>
|
|
@@ -114,19 +404,16 @@ function ContextMenuItem({
|
|
|
114
404
|
inset,
|
|
115
405
|
variant = "default",
|
|
116
406
|
...props
|
|
117
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.Item> &
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}) {
|
|
407
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.Item> &
|
|
408
|
+
VariantProps<typeof contextMenuItemVariants> & {
|
|
409
|
+
inset?: boolean;
|
|
410
|
+
}) {
|
|
121
411
|
return (
|
|
122
412
|
<ContextMenuPrimitive.Item
|
|
123
413
|
data-slot="context-menu-item"
|
|
124
414
|
data-inset={inset}
|
|
125
415
|
data-variant={variant}
|
|
126
|
-
className={cn(
|
|
127
|
-
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
128
|
-
className,
|
|
129
|
-
)}
|
|
416
|
+
className={cn(contextMenuItemVariants({ variant }), className)}
|
|
130
417
|
{...props}
|
|
131
418
|
/>
|
|
132
419
|
);
|
|
@@ -140,13 +427,10 @@ function ContextMenuCheckboxItem({
|
|
|
140
427
|
return (
|
|
141
428
|
<ContextMenuPrimitive.CheckboxItem
|
|
142
429
|
data-slot="context-menu-checkbox-item"
|
|
143
|
-
className={cn(
|
|
144
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
145
|
-
className,
|
|
146
|
-
)}
|
|
430
|
+
className={cn(contextMenuCheckboxItemBaseStyles, className)}
|
|
147
431
|
{...props}
|
|
148
432
|
>
|
|
149
|
-
<span className=
|
|
433
|
+
<span className={contextMenuCheckboxIndicatorStyles}>
|
|
150
434
|
<ContextMenuPrimitive.ItemIndicator>
|
|
151
435
|
<CheckIcon className="size-4" />
|
|
152
436
|
</ContextMenuPrimitive.ItemIndicator>
|
|
@@ -164,13 +448,10 @@ function ContextMenuRadioItem({
|
|
|
164
448
|
return (
|
|
165
449
|
<ContextMenuPrimitive.RadioItem
|
|
166
450
|
data-slot="context-menu-radio-item"
|
|
167
|
-
className={cn(
|
|
168
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
169
|
-
className,
|
|
170
|
-
)}
|
|
451
|
+
className={cn(contextMenuRadioItemBaseStyles, className)}
|
|
171
452
|
{...props}
|
|
172
453
|
>
|
|
173
|
-
<span className=
|
|
454
|
+
<span className={contextMenuRadioIndicatorStyles}>
|
|
174
455
|
<ContextMenuPrimitive.ItemIndicator>
|
|
175
456
|
<CircleIcon className="size-2 fill-current" />
|
|
176
457
|
</ContextMenuPrimitive.ItemIndicator>
|
|
@@ -191,10 +472,7 @@ function ContextMenuLabel({
|
|
|
191
472
|
<ContextMenuPrimitive.Label
|
|
192
473
|
data-slot="context-menu-label"
|
|
193
474
|
data-inset={inset}
|
|
194
|
-
className={cn(
|
|
195
|
-
"text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
196
|
-
className,
|
|
197
|
-
)}
|
|
475
|
+
className={cn(contextMenuLabelBaseStyles, className)}
|
|
198
476
|
{...props}
|
|
199
477
|
/>
|
|
200
478
|
);
|
|
@@ -207,7 +485,7 @@ function ContextMenuSeparator({
|
|
|
207
485
|
return (
|
|
208
486
|
<ContextMenuPrimitive.Separator
|
|
209
487
|
data-slot="context-menu-separator"
|
|
210
|
-
className={cn(
|
|
488
|
+
className={cn(contextMenuSeparatorBaseStyles, className)}
|
|
211
489
|
{...props}
|
|
212
490
|
/>
|
|
213
491
|
);
|
|
@@ -220,25 +498,40 @@ function ContextMenuShortcut({
|
|
|
220
498
|
return (
|
|
221
499
|
<span
|
|
222
500
|
data-slot="context-menu-shortcut"
|
|
223
|
-
className={cn(
|
|
224
|
-
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
225
|
-
className,
|
|
226
|
-
)}
|
|
501
|
+
className={cn(contextMenuShortcutBaseStyles, className)}
|
|
227
502
|
{...props}
|
|
228
503
|
/>
|
|
229
504
|
);
|
|
230
505
|
}
|
|
231
506
|
|
|
507
|
+
function ContextMenuIcon({
|
|
508
|
+
className,
|
|
509
|
+
children,
|
|
510
|
+
...props
|
|
511
|
+
}: React.ComponentProps<"span">) {
|
|
512
|
+
return (
|
|
513
|
+
<span
|
|
514
|
+
data-slot="context-menu-icon"
|
|
515
|
+
className={cn(contextMenuIconBaseStyles, className)}
|
|
516
|
+
{...props}
|
|
517
|
+
>
|
|
518
|
+
{children}
|
|
519
|
+
</span>
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
|
+
|
|
232
523
|
export {
|
|
233
524
|
ContextMenu,
|
|
234
525
|
ContextMenuTrigger,
|
|
235
526
|
ContextMenuContent,
|
|
236
527
|
ContextMenuItem,
|
|
528
|
+
contextMenuItemVariants,
|
|
237
529
|
ContextMenuCheckboxItem,
|
|
238
530
|
ContextMenuRadioItem,
|
|
239
531
|
ContextMenuLabel,
|
|
240
532
|
ContextMenuSeparator,
|
|
241
533
|
ContextMenuShortcut,
|
|
534
|
+
ContextMenuIcon,
|
|
242
535
|
ContextMenuGroup,
|
|
243
536
|
ContextMenuPortal,
|
|
244
537
|
ContextMenuSub,
|
|
@@ -4,6 +4,89 @@ import type * as React from "react";
|
|
|
4
4
|
|
|
5
5
|
import { cn } from "#shadcn/lib/utils";
|
|
6
6
|
|
|
7
|
+
// Dialog overlay styles
|
|
8
|
+
const dialogOverlayStyles = 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
|
+
// Dialog content styles
|
|
24
|
+
const dialogContentStyles = cn(
|
|
25
|
+
// Layout
|
|
26
|
+
"fixed",
|
|
27
|
+
"top-[50%]",
|
|
28
|
+
"left-[50%]",
|
|
29
|
+
"z-50",
|
|
30
|
+
"grid",
|
|
31
|
+
"w-full",
|
|
32
|
+
"max-w-[calc(100%-2rem)]",
|
|
33
|
+
"translate-x-[-50%]",
|
|
34
|
+
"translate-y-[-50%]",
|
|
35
|
+
"gap-4",
|
|
36
|
+
// Shape
|
|
37
|
+
"rounded-lg",
|
|
38
|
+
// Borders
|
|
39
|
+
"border",
|
|
40
|
+
"border-border-primary",
|
|
41
|
+
// Background & Colors
|
|
42
|
+
"bg-bg-primary",
|
|
43
|
+
// Spacing
|
|
44
|
+
"p-6",
|
|
45
|
+
// Shadow
|
|
46
|
+
"dropdown-menu-shadow",
|
|
47
|
+
// Animation duration
|
|
48
|
+
"duration-200",
|
|
49
|
+
// Responsive
|
|
50
|
+
"sm:max-w-lg",
|
|
51
|
+
// Animations - open
|
|
52
|
+
"data-[state=open]:animate-in",
|
|
53
|
+
"data-[state=open]:fade-in-0",
|
|
54
|
+
"data-[state=open]:zoom-in-95",
|
|
55
|
+
// Animations - closed
|
|
56
|
+
"data-[state=closed]:animate-out",
|
|
57
|
+
"data-[state=closed]:fade-out-0",
|
|
58
|
+
"data-[state=closed]:zoom-out-95",
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
// Dialog close button styles
|
|
62
|
+
const dialogCloseButtonStyles = cn(
|
|
63
|
+
// Layout
|
|
64
|
+
"absolute",
|
|
65
|
+
"top-4",
|
|
66
|
+
"right-4",
|
|
67
|
+
// Shape
|
|
68
|
+
"rounded-xs",
|
|
69
|
+
// Opacity
|
|
70
|
+
"opacity-70",
|
|
71
|
+
"hover:opacity-100",
|
|
72
|
+
// Transitions
|
|
73
|
+
"transition-opacity",
|
|
74
|
+
// Focus
|
|
75
|
+
"focus:ring-2",
|
|
76
|
+
"focus:ring-utility-blue/70",
|
|
77
|
+
"focus:ring-offset-2",
|
|
78
|
+
"focus:outline-hidden",
|
|
79
|
+
// Disabled
|
|
80
|
+
"disabled:pointer-events-none",
|
|
81
|
+
// SVG styles
|
|
82
|
+
"[&_svg]:pointer-events-none",
|
|
83
|
+
"[&_svg]:shrink-0",
|
|
84
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
85
|
+
// States
|
|
86
|
+
"data-[state=open]:bg-bg-secondary",
|
|
87
|
+
"data-[state=open]:text-text-secondary",
|
|
88
|
+
);
|
|
89
|
+
|
|
7
90
|
function Dialog({
|
|
8
91
|
...props
|
|
9
92
|
}: React.ComponentProps<typeof DialogPrimitive.Root>) {
|
|
@@ -35,10 +118,7 @@ function DialogOverlay({
|
|
|
35
118
|
return (
|
|
36
119
|
<DialogPrimitive.Overlay
|
|
37
120
|
data-slot="dialog-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
|
-
)}
|
|
121
|
+
className={cn(dialogOverlayStyles, className)}
|
|
42
122
|
{...props}
|
|
43
123
|
/>
|
|
44
124
|
);
|
|
@@ -57,17 +137,14 @@ function DialogContent({
|
|
|
57
137
|
<DialogOverlay />
|
|
58
138
|
<DialogPrimitive.Content
|
|
59
139
|
data-slot="dialog-content"
|
|
60
|
-
className={cn(
|
|
61
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
62
|
-
className,
|
|
63
|
-
)}
|
|
140
|
+
className={cn(dialogContentStyles, className)}
|
|
64
141
|
{...props}
|
|
65
142
|
>
|
|
66
143
|
{children}
|
|
67
144
|
{showCloseButton && (
|
|
68
145
|
<DialogPrimitive.Close
|
|
69
146
|
data-slot="dialog-close"
|
|
70
|
-
className=
|
|
147
|
+
className={dialogCloseButtonStyles}
|
|
71
148
|
>
|
|
72
149
|
<XIcon />
|
|
73
150
|
<span className="sr-only">Close</span>
|
|
@@ -82,7 +159,14 @@ function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
82
159
|
return (
|
|
83
160
|
<div
|
|
84
161
|
data-slot="dialog-header"
|
|
85
|
-
className={cn(
|
|
162
|
+
className={cn(
|
|
163
|
+
"flex",
|
|
164
|
+
"flex-col",
|
|
165
|
+
"gap-2",
|
|
166
|
+
"text-center",
|
|
167
|
+
"sm:text-left",
|
|
168
|
+
className,
|
|
169
|
+
)}
|
|
86
170
|
{...props}
|
|
87
171
|
/>
|
|
88
172
|
);
|
|
@@ -93,7 +177,11 @@ function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
93
177
|
<div
|
|
94
178
|
data-slot="dialog-footer"
|
|
95
179
|
className={cn(
|
|
96
|
-
"flex
|
|
180
|
+
"flex",
|
|
181
|
+
"flex-col-reverse",
|
|
182
|
+
"gap-2",
|
|
183
|
+
"sm:flex-row",
|
|
184
|
+
"sm:justify-end",
|
|
97
185
|
className,
|
|
98
186
|
)}
|
|
99
187
|
{...props}
|
|
@@ -108,7 +196,7 @@ function DialogTitle({
|
|
|
108
196
|
return (
|
|
109
197
|
<DialogPrimitive.Title
|
|
110
198
|
data-slot="dialog-title"
|
|
111
|
-
className={cn("text-lg leading-none font-semibold", className)}
|
|
199
|
+
className={cn("text-lg", "leading-none", "font-semibold", className)}
|
|
112
200
|
{...props}
|
|
113
201
|
/>
|
|
114
202
|
);
|
|
@@ -121,7 +209,7 @@ function DialogDescription({
|
|
|
121
209
|
return (
|
|
122
210
|
<DialogPrimitive.Description
|
|
123
211
|
data-slot="dialog-description"
|
|
124
|
-
className={cn("text-
|
|
212
|
+
className={cn("text-text-secondary", "text-sm", className)}
|
|
125
213
|
{...props}
|
|
126
214
|
/>
|
|
127
215
|
);
|