@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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/shadcn/components/ui/command.tsx"],"sourcesContent":["import { Command as CommandPrimitive } from \"cmdk\";\nimport { SearchIcon } from \"lucide-react\";\nimport type * as React from \"react\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n} from \"#shadcn/components/ui/dialog\";\nimport { cn } from \"#shadcn/lib/utils\";\n\nfunction Command({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n\treturn (\n\t\t<CommandPrimitive\n\t\t\tdata-slot=\"command\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CommandDialog({\n\ttitle = \"Command Palette\",\n\tdescription = \"Search for a command to run...\",\n\tchildren,\n\tclassName,\n\tshowCloseButton = true,\n\t...props\n}: React.ComponentProps<typeof Dialog> & {\n\ttitle?: string;\n\tdescription?: string;\n\tclassName?: string;\n\tshowCloseButton?: boolean;\n}) {\n\treturn (\n\t\t<Dialog {...props}>\n\t\t\t<DialogHeader className=\"sr-only\">\n\t\t\t\t<DialogTitle>{title}</DialogTitle>\n\t\t\t\t<DialogDescription>{description}</DialogDescription>\n\t\t\t</DialogHeader>\n\t\t\t<DialogContent\n\t\t\t\tclassName={cn(\"overflow-hidden p-0\", className)}\n\t\t\t\tshowCloseButton={showCloseButton}\n\t\t\t>\n\t\t\t\t<Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n\t\t\t\t\t{children}\n\t\t\t\t</Command>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n}\n\nfunction CommandInput({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"command-input-wrapper\"\n\t\t\tclassName=\"flex h-9 items-center gap-2 border-b px-3\"\n\t\t>\n\t\t\t<SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n\t\t\t<CommandPrimitive.Input\n\t\t\t\tdata-slot=\"command-input\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nfunction CommandList({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n\treturn (\n\t\t<CommandPrimitive.List\n\t\t\tdata-slot=\"command-list\"\n\t\t\tclassName={cn(\n\t\t\t\t\"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CommandEmpty({\n\t...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n\treturn (\n\t\t<CommandPrimitive.Empty\n\t\t\tdata-slot=\"command-empty\"\n\t\t\tclassName=\"py-6 text-center text-sm\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CommandGroup({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n\treturn (\n\t\t<CommandPrimitive.Group\n\t\t\tdata-slot=\"command-group\"\n\t\t\tclassName={cn(\n\t\t\t\t\"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CommandSeparator({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n\treturn (\n\t\t<CommandPrimitive.Separator\n\t\t\tdata-slot=\"command-separator\"\n\t\t\tclassName={cn(\"bg-border -mx-1 h-px\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CommandItem({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n\treturn (\n\t\t<CommandPrimitive.Item\n\t\t\tdata-slot=\"command-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"data-[selected=true]:bg-(--color-surface-1) text-(--color-elements-assistive)\",\n\t\t\t\t\"data-[selected=true]:text-(--color-elements-readable) [&_svg:not([class*='text-'])]:text-muted-foreground\",\n\t\t\t\t\"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none\",\n\t\t\t\t\"data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none\",\n\t\t\t\t\"[&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CommandShortcut({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"command-shortcut\"\n\t\t\tclassName={cn(\n\t\t\t\t\"text-muted-foreground ml-auto text-xs tracking-widest\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tCommand,\n\tCommandDialog,\n\tCommandInput,\n\tCommandList,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandItem,\n\tCommandShortcut,\n\tCommandSeparator,\n};\n"],"names":["Command","CommandPrimitive","SearchIcon","Dialog","DialogContent","DialogDescription","DialogHeader","DialogTitle","cn","className","props","data-slot","CommandDialog","title","description","children","showCloseButton","CommandInput","div","Input","CommandList","List","CommandEmpty","Empty","CommandGroup","Group","CommandSeparator","Separator","CommandItem","Item","CommandShortcut","span"],"mappings":";AAAA,SAASA,WAAWC,gBAAgB,QAAQ,OAAO;AACnD,SAASC,UAAU,QAAQ,eAAe;AAE1C,SACCC,MAAM,EACNC,aAAa,EACbC,iBAAiB,EACjBC,YAAY,EACZC,WAAW,QACL,cAA+B;AACtC,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,SAASR,QAAQ,EAChBS,SAAS,EACT,GAAGC,OAC4C;IAC/C,qBACC,KAACT;QACAU,aAAU;QACVF,WAAWD,GACV,6FACAC;QAEA,GAAGC,KAAK;;AAGZ;AAEA,SAASE,cAAc,EACtBC,QAAQ,iBAAiB,EACzBC,cAAc,gCAAgC,EAC9CC,QAAQ,EACRN,SAAS,EACTO,kBAAkB,IAAI,EACtB,GAAGN,OAMH;IACA,qBACC,MAACP;QAAQ,GAAGO,KAAK;;0BAChB,MAACJ;gBAAaG,WAAU;;kCACvB,KAACF;kCAAaM;;kCACd,KAACR;kCAAmBS;;;;0BAErB,KAACV;gBACAK,WAAWD,GAAG,uBAAuBC;gBACrCO,iBAAiBA;0BAEjB,cAAA,KAAChB;oBAAQS,WAAU;8BACjBM;;;;;AAKN;AAEA,SAASE,aAAa,EACrBR,SAAS,EACT,GAAGC,OACkD;IACrD,qBACC,MAACQ;QACAP,aAAU;QACVF,WAAU;;0BAEV,KAACP;gBAAWO,WAAU;;0BACtB,KAACR,iBAAiBkB,KAAK;gBACtBR,aAAU;gBACVF,WAAWD,GACV,4JACAC;gBAEA,GAAGC,KAAK;;;;AAIb;AAEA,SAASU,YAAY,EACpBX,SAAS,EACT,GAAGC,OACiD;IACpD,qBACC,KAACT,iBAAiBoB,IAAI;QACrBV,aAAU;QACVF,WAAWD,GACV,+DACAC;QAEA,GAAGC,KAAK;;AAGZ;AAEA,SAASY,aAAa,EACrB,GAAGZ,OACkD;IACrD,qBACC,KAACT,iBAAiBsB,KAAK;QACtBZ,aAAU;QACVF,WAAU;QACT,GAAGC,KAAK;;AAGZ;AAEA,SAASc,aAAa,EACrBf,SAAS,EACT,GAAGC,OACkD;IACrD,qBACC,KAACT,iBAAiBwB,KAAK;QACtBd,aAAU;QACVF,WAAWD,GACV,0NACAC;QAEA,GAAGC,KAAK;;AAGZ;AAEA,SAASgB,iBAAiB,EACzBjB,SAAS,EACT,GAAGC,OACsD;IACzD,qBACC,KAACT,iBAAiB0B,SAAS;QAC1BhB,aAAU;QACVF,WAAWD,GAAG,wBAAwBC;QACrC,GAAGC,KAAK;;AAGZ;AAEA,SAASkB,YAAY,EACpBnB,SAAS,EACT,GAAGC,OACiD;IACpD,qBACC,KAACT,iBAAiB4B,IAAI;QACrBlB,aAAU;QACVF,WAAWD,GACV,iFACA,6GACA,6GACA,wGACA,yDACAC;QAEA,GAAGC,KAAK;;AAGZ;AAEA,SAASoB,gBAAgB,EACxBrB,SAAS,EACT,GAAGC,OAC2B;IAC9B,qBACC,KAACqB;QACApB,aAAU;QACVF,WAAWD,GACV,yDACAC;QAEA,GAAGC,KAAK;;AAGZ;AAEA,SACCV,OAAO,EACPY,aAAa,EACbK,YAAY,EACZG,WAAW,EACXE,YAAY,EACZE,YAAY,EACZI,WAAW,EACXE,eAAe,EACfJ,gBAAgB,GACf"}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/shadcn/components/ui/command.tsx"],"sourcesContent":["import { Command as CommandPrimitive } from \"cmdk\";\nimport { SearchIcon } from \"lucide-react\";\nimport type * as React from \"react\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n} from \"#shadcn/components/ui/dialog\";\nimport { cn } from \"#shadcn/lib/utils\";\n\n// Command Root\nconst commandStyles = cn(\n\t// Layout\n\t\"flex\",\n\t\"h-full\",\n\t\"w-full\",\n\t\"flex-col\",\n\t\"overflow-hidden\",\n\t\"rounded-md\",\n\t// Colors\n\t\"bg-bg-primary\",\n\t\"text-text-primary\",\n\t// Group heading styles\n\t\"[&_*[cmdk-group-heading]]:flex\",\n\t\"[&_*[cmdk-group-heading]]:items-center\",\n\t\"[&_*[cmdk-group-heading]]:h-7\",\n\t\"[&_*[cmdk-group-heading]]:px-3\",\n\t\"[&_*[cmdk-group-heading]]:py-0\",\n\t\"[&_*[cmdk-group-heading]]:typo-label-tiny\",\n\t\"[&_*[cmdk-group-heading]]:text-[color:var(--color-text-secondary)]\",\n);\n\n// Command Dialog\nconst commandDialogContentStyles = cn(\n\t// Layout\n\t\"overflow-hidden\",\n\t\"p-0\",\n);\n\nconst commandDialogCommandStyles = cn(\n\t// Group headings\n\t\"[&_[cmdk-group-heading]]:flex\",\n\t\"[&_[cmdk-group-heading]]:items-center\",\n\t\"[&_[cmdk-group-heading]]:h-7\",\n\t\"[&_[cmdk-group-heading]]:px-3\",\n\t\"[&_[cmdk-group-heading]]:py-0\",\n\t\"[&_[cmdk-group-heading]]:typo-label-tiny\",\n\t\"[&_[cmdk-group-heading]]:text-text-secondary\",\n\t// Groups\n\t\"[&_[cmdk-group]]:p-2\",\n\t\"[&_[cmdk-group]]:gap-1\",\n\t\"[&_[cmdk-group]]:flex\",\n\t\"[&_[cmdk-group]]:flex-col\",\n\t\"[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0\",\n\t// Input wrapper\n\t\"[&_[cmdk-input-wrapper]]:h-12\",\n\t\"**:data-[slot=command-input-wrapper]:h-12\",\n\t// Input wrapper SVG\n\t\"[&_[cmdk-input-wrapper]_svg]:h-5\",\n\t\"[&_[cmdk-input-wrapper]_svg]:w-5\",\n\t// Input\n\t\"[&_[cmdk-input]]:h-12\",\n\t// Items\n\t\"[&_[cmdk-item]]:px-2\",\n\t\"[&_[cmdk-item]]:py-3\",\n\t// Item SVG\n\t\"[&_[cmdk-item]_svg]:h-5\",\n\t\"[&_[cmdk-item]_svg]:w-5\",\n);\n\n// Command Input Wrapper\nconst commandInputWrapperStyles = cn(\n\t// Layout\n\t\"flex\",\n\t\"h-9\",\n\t\"items-center\",\n\t\"gap-2\",\n\t\"px-3\",\n\t// Border\n\t\"border-b\",\n\t\"border-border-separator\",\n\t// Animation\n\t\"transition-colors\",\n\t\"duration-300\",\n);\n\n// Command Input Icon\nconst commandInputIconStyles = cn(\n\t// Size\n\t\"size-4\",\n\t\"shrink-0\",\n\t// Colors\n\t\"text-text-tertiary\",\n);\n\n// Command Input\nconst commandInputStyles = cn(\n\t// Layout\n\t\"flex\",\n\t\"h-10\",\n\t\"w-full\",\n\t\"rounded-md\",\n\t\"py-3\",\n\t// Background\n\t\"bg-transparent\",\n\t// Typography\n\t\"typo-body\",\n\t// Colors\n\t\"text-text-primary\",\n\t\"placeholder:text-text-quternary\",\n\t\"file:text-text-primary\",\n\t// States\n\t\"outline-hidden\",\n\t\"disabled:cursor-not-allowed\",\n\t\"disabled:opacity-50\",\n);\n\n// Command List\nconst commandListStyles = cn(\n\t// Layout\n\t\"max-h-[300px]\",\n\t\"scroll-py-1\",\n\t// Overflow\n\t\"overflow-x-hidden\",\n\t\"overflow-y-auto\",\n\t\"p-2\",\n);\n\n// Command Empty\nconst commandEmptyStyles = cn(\n\t// Layout\n\t\"py-6\",\n\t\"text-center\",\n\t// Typography\n\t\"typo-body\",\n\t// Colors\n\t\"text-text-tertiary\",\n);\n\n// Command Group\nconst commandGroupStyles = cn(\n\t// Layout\n\t\"overflow-hidden\",\n\t\"p-2\",\n\t\"gap-1\",\n\t\"flex\",\n\t\"flex-col\",\n\t\"group\",\n\t// Colors\n\t\"text-text-tertiary\",\n\t// Group heading styles\n\t\"[&_*[cmdk-group-heading]]:flex\",\n\t\"[&_*[cmdk-group-heading]]:items-center\",\n\t\"[&_*[cmdk-group-heading]]:h-7\",\n\t\"[&_*[cmdk-group-heading]]:px-3\",\n\t\"[&_*[cmdk-group-heading]]:py-0\",\n\t\"[&_*[cmdk-group-heading]]:typo-label-tiny\",\n\t\"[&_*[cmdk-group-heading]]:text-[var(--color-text-secondary)]\",\n);\n\n// Command Separator\nconst commandSeparatorStyles = cn(\n\t// Layout\n\t\"-mx-1\",\n\t\"h-px\",\n\t// Colors\n\t\"bg-border-separator\",\n);\n\n// Command Item\nconst commandItemStyles = cn(\n\t// Layout\n\t\"relative\",\n\t\"flex\",\n\t\"cursor-pointer\",\n\t\"items-center\",\n\t\"gap-2\",\n\t\"rounded\",\n\t\"px-2\",\n\t\"py-1.5\",\n\t\"select-none\",\n\t// Typography\n\t\"typo-body\",\n\t// Colors\n\t\"text-text-primary\",\n\t// States\n\t\"outline-hidden\",\n\t\"data-[state=checked]:bg-bg-tertiary\",\n\t\"data-[state=checked]:hover:bg-bg-secondary\",\n\t\"hover:bg-bg-secondary\",\n\t\"hover:text-text-primary\",\n\t\"data-[state=checked]:text-text-primary\",\n\t\"data-[disabled=true]:pointer-events-none\",\n\t\"data-[disabled=true]:opacity-50\",\n\t// SVG styles\n\t\"[&_svg:not([class*='text-'])]:text-text-quaternary\",\n\t\"[&_svg]:pointer-events-none\",\n\t\"[&_svg]:shrink-0\",\n\t\"[&_svg:not([class*='size-'])]:size-4\",\n);\n\n// Command Shortcut\nconst commandShortcutStyles = cn(\n\t// Layout\n\t\"ml-auto\",\n\t// Typography\n\t\"typo-body\",\n\t\"tracking-widest\",\n\t// Colors\n\t\"text-text-quaternary\",\n);\n\nfunction Command({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n\treturn (\n\t\t<CommandPrimitive\n\t\t\tdata-slot=\"command\"\n\t\t\tclassName={cn(commandStyles, className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CommandDialog({\n\ttitle = \"Command Palette\",\n\tdescription = \"Search for a command to run...\",\n\tchildren,\n\tclassName,\n\tshowCloseButton = true,\n\t...props\n}: React.ComponentProps<typeof Dialog> & {\n\ttitle?: string;\n\tdescription?: string;\n\tclassName?: string;\n\tshowCloseButton?: boolean;\n}) {\n\treturn (\n\t\t<Dialog {...props}>\n\t\t\t<DialogHeader className=\"sr-only\">\n\t\t\t\t<DialogTitle>{title}</DialogTitle>\n\t\t\t\t<DialogDescription>{description}</DialogDescription>\n\t\t\t</DialogHeader>\n\t\t\t<DialogContent\n\t\t\t\tclassName={cn(commandDialogContentStyles, className)}\n\t\t\t\tshowCloseButton={showCloseButton}\n\t\t\t>\n\t\t\t\t<Command className={commandDialogCommandStyles}>{children}</Command>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n}\n\nfunction CommandInput({\n\tclassName,\n\twrapperClassName,\n\t...props\n}: React.ComponentProps<typeof CommandPrimitive.Input> & {\n\twrapperClassName?: string;\n}) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"command-input-wrapper\"\n\t\t\tclassName={cn(commandInputWrapperStyles, wrapperClassName)}\n\t\t>\n\t\t\t<SearchIcon className={commandInputIconStyles} />\n\t\t\t<CommandPrimitive.Input\n\t\t\t\tdata-slot=\"command-input\"\n\t\t\t\tclassName={cn(commandInputStyles, className)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nfunction CommandList({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n\treturn (\n\t\t<CommandPrimitive.List\n\t\t\tdata-slot=\"command-list\"\n\t\t\tclassName={cn(commandListStyles, className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CommandEmpty({\n\t...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n\treturn (\n\t\t<CommandPrimitive.Empty\n\t\t\tdata-slot=\"command-empty\"\n\t\t\tclassName={commandEmptyStyles}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CommandGroup({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n\treturn (\n\t\t<CommandPrimitive.Group\n\t\t\tdata-slot=\"command-group\"\n\t\t\tclassName={cn(commandGroupStyles, className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CommandSeparator({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n\treturn (\n\t\t<CommandPrimitive.Separator\n\t\t\tdata-slot=\"command-separator\"\n\t\t\tclassName={cn(commandSeparatorStyles, className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CommandItem({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n\treturn (\n\t\t<CommandPrimitive.Item\n\t\t\tdata-slot=\"command-item\"\n\t\t\tclassName={cn(commandItemStyles, className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction CommandShortcut({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"command-shortcut\"\n\t\t\tclassName={cn(commandShortcutStyles, className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tCommand,\n\tCommandDialog,\n\tCommandInput,\n\tCommandList,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandItem,\n\tCommandShortcut,\n\tCommandSeparator,\n};\n"],"names":["Command","CommandPrimitive","SearchIcon","Dialog","DialogContent","DialogDescription","DialogHeader","DialogTitle","cn","commandStyles","commandDialogContentStyles","commandDialogCommandStyles","commandInputWrapperStyles","commandInputIconStyles","commandInputStyles","commandListStyles","commandEmptyStyles","commandGroupStyles","commandSeparatorStyles","commandItemStyles","commandShortcutStyles","className","props","data-slot","CommandDialog","title","description","children","showCloseButton","CommandInput","wrapperClassName","div","Input","CommandList","List","CommandEmpty","Empty","CommandGroup","Group","CommandSeparator","Separator","CommandItem","Item","CommandShortcut","span"],"mappings":";AAAA,SAASA,WAAWC,gBAAgB,QAAQ,OAAO;AACnD,SAASC,UAAU,QAAQ,eAAe;AAE1C,SACCC,MAAM,EACNC,aAAa,EACbC,iBAAiB,EACjBC,YAAY,EACZC,WAAW,QACL,cAA+B;AACtC,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,eAAe;AACf,MAAMC,gBAAgBD,GACrB,SAAS;AACT,QACA,UACA,UACA,YACA,mBACA,cACA,SAAS;AACT,iBACA,qBACA,uBAAuB;AACvB,kCACA,0CACA,iCACA,kCACA,kCACA,6CACA;AAGD,iBAAiB;AACjB,MAAME,6BAA6BF,GAClC,SAAS;AACT,mBACA;AAGD,MAAMG,6BAA6BH,GAClC,iBAAiB;AACjB,iCACA,yCACA,gCACA,iCACA,iCACA,4CACA,gDACA,SAAS;AACT,wBACA,0BACA,yBACA,6BACA,qDACA,gBAAgB;AAChB,iCACA,6CACA,oBAAoB;AACpB,oCACA,oCACA,QAAQ;AACR,yBACA,QAAQ;AACR,wBACA,wBACA,WAAW;AACX,2BACA;AAGD,wBAAwB;AACxB,MAAMI,4BAA4BJ,GACjC,SAAS;AACT,QACA,OACA,gBACA,SACA,QACA,SAAS;AACT,YACA,2BACA,YAAY;AACZ,qBACA;AAGD,qBAAqB;AACrB,MAAMK,yBAAyBL,GAC9B,OAAO;AACP,UACA,YACA,SAAS;AACT;AAGD,gBAAgB;AAChB,MAAMM,qBAAqBN,GAC1B,SAAS;AACT,QACA,QACA,UACA,cACA,QACA,aAAa;AACb,kBACA,aAAa;AACb,aACA,SAAS;AACT,qBACA,mCACA,0BACA,SAAS;AACT,kBACA,+BACA;AAGD,eAAe;AACf,MAAMO,oBAAoBP,GACzB,SAAS;AACT,iBACA,eACA,WAAW;AACX,qBACA,mBACA;AAGD,gBAAgB;AAChB,MAAMQ,qBAAqBR,GAC1B,SAAS;AACT,QACA,eACA,aAAa;AACb,aACA,SAAS;AACT;AAGD,gBAAgB;AAChB,MAAMS,qBAAqBT,GAC1B,SAAS;AACT,mBACA,OACA,SACA,QACA,YACA,SACA,SAAS;AACT,sBACA,uBAAuB;AACvB,kCACA,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"}
|
|
@@ -1,86 +1,306 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Controls, Primary, Title } from "@storybook/addon-docs/blocks";
|
|
2
3
|
import { Calculator, Calendar, CreditCard, Settings, Smile, User } from "lucide-react";
|
|
3
4
|
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "./command.js";
|
|
5
|
+
function CommandWrapper({ leftIcons = true, rightIcons = true, groups = true }) {
|
|
6
|
+
const items1 = [
|
|
7
|
+
{
|
|
8
|
+
icon: Calendar,
|
|
9
|
+
label: "Calendar",
|
|
10
|
+
shortcut: "⌘C"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
icon: Smile,
|
|
14
|
+
label: "Search Emoji",
|
|
15
|
+
shortcut: "⌘E"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
icon: Calculator,
|
|
19
|
+
label: "Calculator",
|
|
20
|
+
shortcut: "⌘K"
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
const items2 = [
|
|
24
|
+
{
|
|
25
|
+
icon: User,
|
|
26
|
+
label: "Profile",
|
|
27
|
+
shortcut: "⌘P"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
icon: CreditCard,
|
|
31
|
+
label: "Billing",
|
|
32
|
+
shortcut: "⌘B"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
icon: Settings,
|
|
36
|
+
label: "Settings",
|
|
37
|
+
shortcut: "⌘S"
|
|
38
|
+
}
|
|
39
|
+
];
|
|
40
|
+
const renderItem = (item)=>/*#__PURE__*/ _jsxs(CommandItem, {
|
|
41
|
+
children: [
|
|
42
|
+
leftIcons && /*#__PURE__*/ _jsx(item.icon, {}),
|
|
43
|
+
/*#__PURE__*/ _jsx("span", {
|
|
44
|
+
children: item.label
|
|
45
|
+
}),
|
|
46
|
+
rightIcons && /*#__PURE__*/ _jsx(CommandShortcut, {
|
|
47
|
+
children: item.shortcut
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
}, item.label);
|
|
51
|
+
return /*#__PURE__*/ _jsxs(Command, {
|
|
52
|
+
className: "w-[450px] rounded-lg border",
|
|
53
|
+
children: [
|
|
54
|
+
/*#__PURE__*/ _jsx(CommandInput, {
|
|
55
|
+
placeholder: "Type a command or search..."
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ _jsxs(CommandList, {
|
|
58
|
+
children: [
|
|
59
|
+
/*#__PURE__*/ _jsx(CommandEmpty, {
|
|
60
|
+
children: "No results found."
|
|
61
|
+
}),
|
|
62
|
+
groups ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
63
|
+
children: [
|
|
64
|
+
/*#__PURE__*/ _jsx(CommandGroup, {
|
|
65
|
+
heading: "Suggestions",
|
|
66
|
+
children: items1.map(renderItem)
|
|
67
|
+
}),
|
|
68
|
+
/*#__PURE__*/ _jsx(CommandSeparator, {}),
|
|
69
|
+
/*#__PURE__*/ _jsx(CommandGroup, {
|
|
70
|
+
heading: "Settings",
|
|
71
|
+
children: items2.map(renderItem)
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
}) : [
|
|
75
|
+
...items1,
|
|
76
|
+
...items2
|
|
77
|
+
].map(renderItem)
|
|
78
|
+
]
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
});
|
|
82
|
+
}
|
|
4
83
|
const meta = {
|
|
5
|
-
title: "Component/Command"
|
|
84
|
+
title: "Component/Command",
|
|
85
|
+
component: CommandWrapper,
|
|
86
|
+
parameters: {
|
|
87
|
+
layout: "centered",
|
|
88
|
+
docs: {
|
|
89
|
+
page: ()=>/*#__PURE__*/ _jsxs(_Fragment, {
|
|
90
|
+
children: [
|
|
91
|
+
/*#__PURE__*/ _jsx(Title, {}),
|
|
92
|
+
/*#__PURE__*/ _jsxs("p", {
|
|
93
|
+
className: "sbdocs-p",
|
|
94
|
+
children: [
|
|
95
|
+
"Command is a composable command menu component. It is also used internally by the ",
|
|
96
|
+
/*#__PURE__*/ _jsx("strong", {
|
|
97
|
+
children: "Combobox"
|
|
98
|
+
}),
|
|
99
|
+
" component for the dropdown content."
|
|
100
|
+
]
|
|
101
|
+
}),
|
|
102
|
+
/*#__PURE__*/ _jsx(Primary, {}),
|
|
103
|
+
/*#__PURE__*/ _jsx(Controls, {})
|
|
104
|
+
]
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
argTypes: {
|
|
109
|
+
leftIcons: {
|
|
110
|
+
control: "boolean"
|
|
111
|
+
},
|
|
112
|
+
rightIcons: {
|
|
113
|
+
control: "boolean"
|
|
114
|
+
},
|
|
115
|
+
groups: {
|
|
116
|
+
control: "boolean"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
args: {
|
|
120
|
+
leftIcons: true,
|
|
121
|
+
rightIcons: true,
|
|
122
|
+
groups: true
|
|
123
|
+
}
|
|
6
124
|
};
|
|
7
125
|
export default meta;
|
|
126
|
+
export const Default = {
|
|
127
|
+
tags: [
|
|
128
|
+
"!dev"
|
|
129
|
+
],
|
|
130
|
+
render: ({ leftIcons = true, rightIcons = true, groups = true })=>/*#__PURE__*/ _jsx(CommandWrapper, {
|
|
131
|
+
leftIcons: leftIcons,
|
|
132
|
+
rightIcons: rightIcons,
|
|
133
|
+
groups: groups
|
|
134
|
+
})
|
|
135
|
+
};
|
|
8
136
|
export const Demo = {
|
|
9
|
-
|
|
10
|
-
|
|
137
|
+
tags: [
|
|
138
|
+
"!autodocs"
|
|
139
|
+
],
|
|
140
|
+
render: ()=>/*#__PURE__*/ _jsxs("div", {
|
|
141
|
+
className: "space-y-8",
|
|
11
142
|
children: [
|
|
12
|
-
/*#__PURE__*/
|
|
13
|
-
placeholder: "Type a command or search..."
|
|
14
|
-
}),
|
|
15
|
-
/*#__PURE__*/ _jsxs(CommandList, {
|
|
143
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
16
144
|
children: [
|
|
17
|
-
/*#__PURE__*/ _jsx(
|
|
18
|
-
|
|
145
|
+
/*#__PURE__*/ _jsx("h3", {
|
|
146
|
+
className: "typo-label mb-4",
|
|
147
|
+
children: "With icons and groups"
|
|
19
148
|
}),
|
|
20
|
-
/*#__PURE__*/ _jsxs(
|
|
21
|
-
|
|
149
|
+
/*#__PURE__*/ _jsxs(Command, {
|
|
150
|
+
className: "w-[450px] rounded-lg border",
|
|
22
151
|
children: [
|
|
23
|
-
/*#__PURE__*/
|
|
24
|
-
|
|
25
|
-
/*#__PURE__*/ _jsx(Calendar, {}),
|
|
26
|
-
/*#__PURE__*/ _jsx("span", {
|
|
27
|
-
children: "Calendar"
|
|
28
|
-
})
|
|
29
|
-
]
|
|
30
|
-
}),
|
|
31
|
-
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
32
|
-
children: [
|
|
33
|
-
/*#__PURE__*/ _jsx(Smile, {}),
|
|
34
|
-
/*#__PURE__*/ _jsx("span", {
|
|
35
|
-
children: "Search Emoji"
|
|
36
|
-
})
|
|
37
|
-
]
|
|
152
|
+
/*#__PURE__*/ _jsx(CommandInput, {
|
|
153
|
+
placeholder: "Type a command or search..."
|
|
38
154
|
}),
|
|
39
|
-
/*#__PURE__*/ _jsxs(
|
|
40
|
-
disabled: true,
|
|
155
|
+
/*#__PURE__*/ _jsxs(CommandList, {
|
|
41
156
|
children: [
|
|
42
|
-
/*#__PURE__*/ _jsx(
|
|
43
|
-
|
|
44
|
-
|
|
157
|
+
/*#__PURE__*/ _jsx(CommandEmpty, {
|
|
158
|
+
children: "No results found."
|
|
159
|
+
}),
|
|
160
|
+
/*#__PURE__*/ _jsxs(CommandGroup, {
|
|
161
|
+
heading: "Suggestions",
|
|
162
|
+
children: [
|
|
163
|
+
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
164
|
+
children: [
|
|
165
|
+
/*#__PURE__*/ _jsx(Calendar, {}),
|
|
166
|
+
/*#__PURE__*/ _jsx("span", {
|
|
167
|
+
children: "Calendar"
|
|
168
|
+
}),
|
|
169
|
+
/*#__PURE__*/ _jsx(CommandShortcut, {
|
|
170
|
+
children: "⌘C"
|
|
171
|
+
})
|
|
172
|
+
]
|
|
173
|
+
}),
|
|
174
|
+
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
175
|
+
children: [
|
|
176
|
+
/*#__PURE__*/ _jsx(Smile, {}),
|
|
177
|
+
/*#__PURE__*/ _jsx("span", {
|
|
178
|
+
children: "Search Emoji"
|
|
179
|
+
}),
|
|
180
|
+
/*#__PURE__*/ _jsx(CommandShortcut, {
|
|
181
|
+
children: "⌘E"
|
|
182
|
+
})
|
|
183
|
+
]
|
|
184
|
+
})
|
|
185
|
+
]
|
|
186
|
+
}),
|
|
187
|
+
/*#__PURE__*/ _jsx(CommandSeparator, {}),
|
|
188
|
+
/*#__PURE__*/ _jsxs(CommandGroup, {
|
|
189
|
+
heading: "Settings",
|
|
190
|
+
children: [
|
|
191
|
+
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
192
|
+
children: [
|
|
193
|
+
/*#__PURE__*/ _jsx(User, {}),
|
|
194
|
+
/*#__PURE__*/ _jsx("span", {
|
|
195
|
+
children: "Profile"
|
|
196
|
+
}),
|
|
197
|
+
/*#__PURE__*/ _jsx(CommandShortcut, {
|
|
198
|
+
children: "⌘P"
|
|
199
|
+
})
|
|
200
|
+
]
|
|
201
|
+
}),
|
|
202
|
+
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
203
|
+
children: [
|
|
204
|
+
/*#__PURE__*/ _jsx(Settings, {}),
|
|
205
|
+
/*#__PURE__*/ _jsx("span", {
|
|
206
|
+
children: "Settings"
|
|
207
|
+
}),
|
|
208
|
+
/*#__PURE__*/ _jsx(CommandShortcut, {
|
|
209
|
+
children: "⌘S"
|
|
210
|
+
})
|
|
211
|
+
]
|
|
212
|
+
})
|
|
213
|
+
]
|
|
45
214
|
})
|
|
46
215
|
]
|
|
47
216
|
})
|
|
48
217
|
]
|
|
218
|
+
})
|
|
219
|
+
]
|
|
220
|
+
}),
|
|
221
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
222
|
+
children: [
|
|
223
|
+
/*#__PURE__*/ _jsx("h3", {
|
|
224
|
+
className: "typo-label mb-4",
|
|
225
|
+
children: "Without groups"
|
|
49
226
|
}),
|
|
50
|
-
/*#__PURE__*/
|
|
51
|
-
|
|
52
|
-
heading: "Settings",
|
|
227
|
+
/*#__PURE__*/ _jsxs(Command, {
|
|
228
|
+
className: "w-[450px] rounded-lg border",
|
|
53
229
|
children: [
|
|
54
|
-
/*#__PURE__*/
|
|
55
|
-
|
|
56
|
-
/*#__PURE__*/ _jsx(User, {}),
|
|
57
|
-
/*#__PURE__*/ _jsx("span", {
|
|
58
|
-
children: "Profile"
|
|
59
|
-
}),
|
|
60
|
-
/*#__PURE__*/ _jsx(CommandShortcut, {
|
|
61
|
-
children: "⌘P"
|
|
62
|
-
})
|
|
63
|
-
]
|
|
230
|
+
/*#__PURE__*/ _jsx(CommandInput, {
|
|
231
|
+
placeholder: "Type a command or search..."
|
|
64
232
|
}),
|
|
65
|
-
/*#__PURE__*/ _jsxs(
|
|
233
|
+
/*#__PURE__*/ _jsxs(CommandList, {
|
|
66
234
|
children: [
|
|
67
|
-
/*#__PURE__*/ _jsx(
|
|
68
|
-
|
|
69
|
-
children: "Billing"
|
|
235
|
+
/*#__PURE__*/ _jsx(CommandEmpty, {
|
|
236
|
+
children: "No results found."
|
|
70
237
|
}),
|
|
71
|
-
/*#__PURE__*/
|
|
72
|
-
children:
|
|
238
|
+
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
239
|
+
children: [
|
|
240
|
+
/*#__PURE__*/ _jsx(Calendar, {}),
|
|
241
|
+
/*#__PURE__*/ _jsx("span", {
|
|
242
|
+
children: "Calendar"
|
|
243
|
+
})
|
|
244
|
+
]
|
|
245
|
+
}),
|
|
246
|
+
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
247
|
+
children: [
|
|
248
|
+
/*#__PURE__*/ _jsx(User, {}),
|
|
249
|
+
/*#__PURE__*/ _jsx("span", {
|
|
250
|
+
children: "Profile"
|
|
251
|
+
})
|
|
252
|
+
]
|
|
253
|
+
}),
|
|
254
|
+
/*#__PURE__*/ _jsxs(CommandItem, {
|
|
255
|
+
children: [
|
|
256
|
+
/*#__PURE__*/ _jsx(Settings, {}),
|
|
257
|
+
/*#__PURE__*/ _jsx("span", {
|
|
258
|
+
children: "Settings"
|
|
259
|
+
})
|
|
260
|
+
]
|
|
73
261
|
})
|
|
74
262
|
]
|
|
263
|
+
})
|
|
264
|
+
]
|
|
265
|
+
})
|
|
266
|
+
]
|
|
267
|
+
}),
|
|
268
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
269
|
+
children: [
|
|
270
|
+
/*#__PURE__*/ _jsx("h3", {
|
|
271
|
+
className: "typo-label mb-4",
|
|
272
|
+
children: "Without icons"
|
|
273
|
+
}),
|
|
274
|
+
/*#__PURE__*/ _jsxs(Command, {
|
|
275
|
+
className: "w-[450px] rounded-lg border",
|
|
276
|
+
children: [
|
|
277
|
+
/*#__PURE__*/ _jsx(CommandInput, {
|
|
278
|
+
placeholder: "Type a command or search..."
|
|
75
279
|
}),
|
|
76
|
-
/*#__PURE__*/ _jsxs(
|
|
280
|
+
/*#__PURE__*/ _jsxs(CommandList, {
|
|
77
281
|
children: [
|
|
78
|
-
/*#__PURE__*/ _jsx(
|
|
79
|
-
|
|
80
|
-
children: "Settings"
|
|
282
|
+
/*#__PURE__*/ _jsx(CommandEmpty, {
|
|
283
|
+
children: "No results found."
|
|
81
284
|
}),
|
|
82
|
-
/*#__PURE__*/
|
|
83
|
-
|
|
285
|
+
/*#__PURE__*/ _jsxs(CommandGroup, {
|
|
286
|
+
heading: "Actions",
|
|
287
|
+
children: [
|
|
288
|
+
/*#__PURE__*/ _jsx(CommandItem, {
|
|
289
|
+
children: /*#__PURE__*/ _jsx("span", {
|
|
290
|
+
children: "Calendar"
|
|
291
|
+
})
|
|
292
|
+
}),
|
|
293
|
+
/*#__PURE__*/ _jsx(CommandItem, {
|
|
294
|
+
children: /*#__PURE__*/ _jsx("span", {
|
|
295
|
+
children: "Profile"
|
|
296
|
+
})
|
|
297
|
+
}),
|
|
298
|
+
/*#__PURE__*/ _jsx(CommandItem, {
|
|
299
|
+
children: /*#__PURE__*/ _jsx("span", {
|
|
300
|
+
children: "Settings"
|
|
301
|
+
})
|
|
302
|
+
})
|
|
303
|
+
]
|
|
84
304
|
})
|
|
85
305
|
]
|
|
86
306
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/shadcn/components/ui/command.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react-vite\";\nimport {\n\tCalculator,\n\tCalendar,\n\tCreditCard,\n\tSettings,\n\tSmile,\n\tUser,\n} from \"lucide-react\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n\tCommandSeparator,\n\tCommandShortcut,\n} from \"#shadcn/components/ui/command\";\n\nconst meta = {\n\ttitle: \"Component/Command\",\n} satisfies Meta
|
|
1
|
+
{"version":3,"sources":["../../../../../src/shadcn/components/ui/command.stories.tsx"],"sourcesContent":["import { Controls, Primary, Title } from \"@storybook/addon-docs/blocks\";\nimport type { Meta, StoryObj } from \"@storybook/react-vite\";\nimport {\n\tCalculator,\n\tCalendar,\n\tCreditCard,\n\tSettings,\n\tSmile,\n\tUser,\n} from \"lucide-react\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n\tCommandSeparator,\n\tCommandShortcut,\n} from \"#shadcn/components/ui/command\";\n\ninterface CommandWrapperProps {\n\tleftIcons?: boolean;\n\trightIcons?: boolean;\n\tgroups?: boolean;\n}\n\nfunction CommandWrapper({\n\tleftIcons = true,\n\trightIcons = true,\n\tgroups = true,\n}: CommandWrapperProps) {\n\tconst items1 = [\n\t\t{ icon: Calendar, label: \"Calendar\", shortcut: \"⌘C\" },\n\t\t{ icon: Smile, label: \"Search Emoji\", shortcut: \"⌘E\" },\n\t\t{ icon: Calculator, label: \"Calculator\", shortcut: \"⌘K\" },\n\t];\n\n\tconst items2 = [\n\t\t{ icon: User, label: \"Profile\", shortcut: \"⌘P\" },\n\t\t{ icon: CreditCard, label: \"Billing\", shortcut: \"⌘B\" },\n\t\t{ icon: Settings, label: \"Settings\", shortcut: \"⌘S\" },\n\t];\n\n\tconst renderItem = (item: (typeof items1)[0]) => (\n\t\t<CommandItem key={item.label}>\n\t\t\t{leftIcons && <item.icon />}\n\t\t\t<span>{item.label}</span>\n\t\t\t{rightIcons && <CommandShortcut>{item.shortcut}</CommandShortcut>}\n\t\t</CommandItem>\n\t);\n\n\treturn (\n\t\t<Command className=\"w-[450px] rounded-lg border\">\n\t\t\t<CommandInput placeholder=\"Type a command or search...\" />\n\t\t\t<CommandList>\n\t\t\t\t<CommandEmpty>No results found.</CommandEmpty>\n\t\t\t\t{groups ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<CommandGroup heading=\"Suggestions\">\n\t\t\t\t\t\t\t{items1.map(renderItem)}\n\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t<CommandSeparator />\n\t\t\t\t\t\t<CommandGroup heading=\"Settings\">\n\t\t\t\t\t\t\t{items2.map(renderItem)}\n\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t[...items1, ...items2].map(renderItem)\n\t\t\t\t)}\n\t\t\t</CommandList>\n\t\t</Command>\n\t);\n}\n\nconst meta = {\n\ttitle: \"Component/Command\",\n\tcomponent: CommandWrapper,\n\tparameters: {\n\t\tlayout: \"centered\",\n\t\tdocs: {\n\t\t\tpage: () => (\n\t\t\t\t<>\n\t\t\t\t\t<Title />\n\t\t\t\t\t<p className=\"sbdocs-p\">\n\t\t\t\t\t\tCommand is a composable command menu component. It is also used\n\t\t\t\t\t\tinternally by the <strong>Combobox</strong> component for the\n\t\t\t\t\t\tdropdown content.\n\t\t\t\t\t</p>\n\t\t\t\t\t<Primary />\n\t\t\t\t\t<Controls />\n\t\t\t\t</>\n\t\t\t),\n\t\t},\n\t},\n\targTypes: {\n\t\tleftIcons: {\n\t\t\tcontrol: \"boolean\",\n\t\t},\n\t\trightIcons: {\n\t\t\tcontrol: \"boolean\",\n\t\t},\n\t\tgroups: {\n\t\t\tcontrol: \"boolean\",\n\t\t},\n\t},\n\targs: {\n\t\tleftIcons: true,\n\t\trightIcons: true,\n\t\tgroups: true,\n\t},\n} satisfies Meta<typeof CommandWrapper>;\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Default = {\n\ttags: [\"!dev\"],\n\trender: ({ leftIcons = true, rightIcons = true, groups = true }) => (\n\t\t<CommandWrapper\n\t\t\tleftIcons={leftIcons}\n\t\t\trightIcons={rightIcons}\n\t\t\tgroups={groups}\n\t\t/>\n\t),\n} satisfies Story;\n\nexport const Demo = {\n\ttags: [\"!autodocs\"],\n\trender: () => (\n\t\t<div className=\"space-y-8\">\n\t\t\t{/* Full */}\n\t\t\t<div>\n\t\t\t\t<h3 className=\"typo-label mb-4\">With icons and groups</h3>\n\t\t\t\t<Command className=\"w-[450px] rounded-lg border\">\n\t\t\t\t\t<CommandInput placeholder=\"Type a command or search...\" />\n\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t<CommandEmpty>No results found.</CommandEmpty>\n\t\t\t\t\t\t<CommandGroup heading=\"Suggestions\">\n\t\t\t\t\t\t\t<CommandItem>\n\t\t\t\t\t\t\t\t<Calendar />\n\t\t\t\t\t\t\t\t<span>Calendar</span>\n\t\t\t\t\t\t\t\t<CommandShortcut>⌘C</CommandShortcut>\n\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t<CommandItem>\n\t\t\t\t\t\t\t\t<Smile />\n\t\t\t\t\t\t\t\t<span>Search Emoji</span>\n\t\t\t\t\t\t\t\t<CommandShortcut>⌘E</CommandShortcut>\n\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t<CommandSeparator />\n\t\t\t\t\t\t<CommandGroup heading=\"Settings\">\n\t\t\t\t\t\t\t<CommandItem>\n\t\t\t\t\t\t\t\t<User />\n\t\t\t\t\t\t\t\t<span>Profile</span>\n\t\t\t\t\t\t\t\t<CommandShortcut>⌘P</CommandShortcut>\n\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t<CommandItem>\n\t\t\t\t\t\t\t\t<Settings />\n\t\t\t\t\t\t\t\t<span>Settings</span>\n\t\t\t\t\t\t\t\t<CommandShortcut>⌘S</CommandShortcut>\n\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t</CommandList>\n\t\t\t\t</Command>\n\t\t\t</div>\n\n\t\t\t{/* Without groups */}\n\t\t\t<div>\n\t\t\t\t<h3 className=\"typo-label mb-4\">Without groups</h3>\n\t\t\t\t<Command className=\"w-[450px] rounded-lg border\">\n\t\t\t\t\t<CommandInput placeholder=\"Type a command or search...\" />\n\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t<CommandEmpty>No results found.</CommandEmpty>\n\t\t\t\t\t\t<CommandItem>\n\t\t\t\t\t\t\t<Calendar />\n\t\t\t\t\t\t\t<span>Calendar</span>\n\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t<CommandItem>\n\t\t\t\t\t\t\t<User />\n\t\t\t\t\t\t\t<span>Profile</span>\n\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t<CommandItem>\n\t\t\t\t\t\t\t<Settings />\n\t\t\t\t\t\t\t<span>Settings</span>\n\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t</CommandList>\n\t\t\t\t</Command>\n\t\t\t</div>\n\n\t\t\t{/* Without icons */}\n\t\t\t<div>\n\t\t\t\t<h3 className=\"typo-label mb-4\">Without icons</h3>\n\t\t\t\t<Command className=\"w-[450px] rounded-lg border\">\n\t\t\t\t\t<CommandInput placeholder=\"Type a command or search...\" />\n\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t<CommandEmpty>No results found.</CommandEmpty>\n\t\t\t\t\t\t<CommandGroup heading=\"Actions\">\n\t\t\t\t\t\t\t<CommandItem>\n\t\t\t\t\t\t\t\t<span>Calendar</span>\n\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t<CommandItem>\n\t\t\t\t\t\t\t\t<span>Profile</span>\n\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t<CommandItem>\n\t\t\t\t\t\t\t\t<span>Settings</span>\n\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t</CommandList>\n\t\t\t\t</Command>\n\t\t\t</div>\n\t\t</div>\n\t),\n} satisfies Story;\n"],"names":["Controls","Primary","Title","Calculator","Calendar","CreditCard","Settings","Smile","User","Command","CommandEmpty","CommandGroup","CommandInput","CommandItem","CommandList","CommandSeparator","CommandShortcut","CommandWrapper","leftIcons","rightIcons","groups","items1","icon","label","shortcut","items2","renderItem","item","span","className","placeholder","heading","map","meta","title","component","parameters","layout","docs","page","p","strong","argTypes","control","args","Default","tags","render","Demo","div","h3"],"mappings":"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"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
3
|
import type * as React from "react";
|
|
4
|
+
declare const contextMenuItemVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
3
7
|
declare function ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
8
|
declare function ContextMenuTrigger({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
9
|
declare function ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,9 +15,8 @@ declare function ContextMenuSubTrigger({ className, inset, children, ...props }:
|
|
|
11
15
|
}): import("react/jsx-runtime").JSX.Element;
|
|
12
16
|
declare function ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
13
17
|
declare function ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
declare function ContextMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
|
|
18
|
+
declare function ContextMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & VariantProps<typeof contextMenuItemVariants> & {
|
|
15
19
|
inset?: boolean;
|
|
16
|
-
variant?: "default" | "destructive";
|
|
17
20
|
}): import("react/jsx-runtime").JSX.Element;
|
|
18
21
|
declare function ContextMenuCheckboxItem({ className, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
|
|
19
22
|
declare function ContextMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,5 +25,6 @@ declare function ContextMenuLabel({ className, inset, ...props }: React.Componen
|
|
|
22
25
|
}): import("react/jsx-runtime").JSX.Element;
|
|
23
26
|
declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
24
27
|
declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
|
|
28
|
+
declare function ContextMenuIcon({ className, children, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, contextMenuItemVariants, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuIcon, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
|
|
26
30
|
//# sourceMappingURL=context-menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/context-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/context-menu.tsx"],"names":[],"mappings":"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"}
|