@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
|
@@ -4,6 +4,181 @@ import type * as React from "react";
|
|
|
4
4
|
|
|
5
5
|
import { cn } from "#shadcn/lib/utils";
|
|
6
6
|
|
|
7
|
+
// Menubar styles
|
|
8
|
+
const menubarStyles = cn(
|
|
9
|
+
"bg-background",
|
|
10
|
+
"flex",
|
|
11
|
+
"h-9",
|
|
12
|
+
"items-center",
|
|
13
|
+
"gap-1",
|
|
14
|
+
"rounded-md",
|
|
15
|
+
"border",
|
|
16
|
+
"p-1",
|
|
17
|
+
"shadow-xs",
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
// Menubar trigger styles
|
|
21
|
+
const menubarTriggerStyles = cn(
|
|
22
|
+
"focus:bg-accent",
|
|
23
|
+
"focus:text-accent-foreground",
|
|
24
|
+
"data-[state=open]:bg-accent",
|
|
25
|
+
"data-[state=open]:text-accent-foreground",
|
|
26
|
+
"flex",
|
|
27
|
+
"items-center",
|
|
28
|
+
"rounded-sm",
|
|
29
|
+
"px-2",
|
|
30
|
+
"py-1",
|
|
31
|
+
"text-sm",
|
|
32
|
+
"font-medium",
|
|
33
|
+
"outline-hidden",
|
|
34
|
+
"select-none",
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
// Menubar content styles
|
|
38
|
+
const menubarContentStyles = cn(
|
|
39
|
+
"bg-popover",
|
|
40
|
+
"text-popover-foreground",
|
|
41
|
+
"data-[state=open]:animate-in",
|
|
42
|
+
"data-[state=closed]:fade-out-0",
|
|
43
|
+
"data-[state=open]:fade-in-0",
|
|
44
|
+
"data-[state=closed]:zoom-out-95",
|
|
45
|
+
"data-[state=open]:zoom-in-95",
|
|
46
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
47
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
48
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
49
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
50
|
+
"z-50",
|
|
51
|
+
"min-w-[12rem]",
|
|
52
|
+
"origin-(--radix-menubar-content-transform-origin)",
|
|
53
|
+
"overflow-hidden",
|
|
54
|
+
"rounded-md",
|
|
55
|
+
"border",
|
|
56
|
+
"p-1",
|
|
57
|
+
"shadow-md",
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
// Menubar item styles
|
|
61
|
+
const menubarItemStyles = cn(
|
|
62
|
+
"focus:bg-accent",
|
|
63
|
+
"focus:text-accent-foreground",
|
|
64
|
+
"data-[variant=destructive]:text-destructive",
|
|
65
|
+
"data-[variant=destructive]:focus:bg-destructive/10",
|
|
66
|
+
"dark:data-[variant=destructive]:focus:bg-destructive/20",
|
|
67
|
+
"data-[variant=destructive]:focus:text-destructive",
|
|
68
|
+
"data-[variant=destructive]:*:[svg]:!text-destructive",
|
|
69
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
70
|
+
"relative",
|
|
71
|
+
"flex",
|
|
72
|
+
"cursor-default",
|
|
73
|
+
"items-center",
|
|
74
|
+
"gap-2",
|
|
75
|
+
"rounded-sm",
|
|
76
|
+
"px-2",
|
|
77
|
+
"py-1.5",
|
|
78
|
+
"text-sm",
|
|
79
|
+
"outline-hidden",
|
|
80
|
+
"select-none",
|
|
81
|
+
"data-[disabled]:pointer-events-none",
|
|
82
|
+
"data-[disabled]:opacity-50",
|
|
83
|
+
"data-[inset]:pl-8",
|
|
84
|
+
"[&_svg]:pointer-events-none",
|
|
85
|
+
"[&_svg]:shrink-0",
|
|
86
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
// Menubar checkbox/radio item styles
|
|
90
|
+
const menubarCheckboxRadioItemStyles = cn(
|
|
91
|
+
"focus:bg-accent",
|
|
92
|
+
"focus:text-accent-foreground",
|
|
93
|
+
"relative",
|
|
94
|
+
"flex",
|
|
95
|
+
"cursor-default",
|
|
96
|
+
"items-center",
|
|
97
|
+
"gap-2",
|
|
98
|
+
"rounded-xs",
|
|
99
|
+
"py-1.5",
|
|
100
|
+
"pr-2",
|
|
101
|
+
"pl-8",
|
|
102
|
+
"text-sm",
|
|
103
|
+
"outline-hidden",
|
|
104
|
+
"select-none",
|
|
105
|
+
"data-[disabled]:pointer-events-none",
|
|
106
|
+
"data-[disabled]:opacity-50",
|
|
107
|
+
"[&_svg]:pointer-events-none",
|
|
108
|
+
"[&_svg]:shrink-0",
|
|
109
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
// Menubar indicator styles
|
|
113
|
+
const menubarIndicatorStyles = cn(
|
|
114
|
+
"pointer-events-none",
|
|
115
|
+
"absolute",
|
|
116
|
+
"left-2",
|
|
117
|
+
"flex",
|
|
118
|
+
"size-3.5",
|
|
119
|
+
"items-center",
|
|
120
|
+
"justify-center",
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
// Menubar label styles
|
|
124
|
+
const menubarLabelStyles = cn(
|
|
125
|
+
"px-2",
|
|
126
|
+
"py-1.5",
|
|
127
|
+
"text-sm",
|
|
128
|
+
"font-medium",
|
|
129
|
+
"data-[inset]:pl-8",
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
// Menubar separator styles
|
|
133
|
+
const menubarSeparatorStyles = cn("bg-border", "-mx-1", "my-1", "h-px");
|
|
134
|
+
|
|
135
|
+
// Menubar shortcut styles
|
|
136
|
+
const menubarShortcutStyles = cn(
|
|
137
|
+
"text-muted-foreground",
|
|
138
|
+
"ml-auto",
|
|
139
|
+
"text-xs",
|
|
140
|
+
"tracking-widest",
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
// Menubar sub trigger styles
|
|
144
|
+
const menubarSubTriggerStyles = cn(
|
|
145
|
+
"focus:bg-(--color-surface-1)",
|
|
146
|
+
"data-[state=open]:bg-(--color-surface-1)",
|
|
147
|
+
"flex",
|
|
148
|
+
"items-center",
|
|
149
|
+
"rounded-sm",
|
|
150
|
+
"px-2",
|
|
151
|
+
"py-1",
|
|
152
|
+
"text-sm",
|
|
153
|
+
"font-medium",
|
|
154
|
+
"outline-hidden",
|
|
155
|
+
"select-none",
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
// Menubar sub content styles
|
|
159
|
+
const menubarSubContentStyles = cn(
|
|
160
|
+
"bg-popover",
|
|
161
|
+
"text-popover-foreground",
|
|
162
|
+
"data-[state=open]:animate-in",
|
|
163
|
+
"data-[state=closed]:animate-out",
|
|
164
|
+
"data-[state=closed]:fade-out-0",
|
|
165
|
+
"data-[state=open]:fade-in-0",
|
|
166
|
+
"data-[state=closed]:zoom-out-95",
|
|
167
|
+
"data-[state=open]:zoom-in-95",
|
|
168
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
169
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
170
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
171
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
172
|
+
"z-50",
|
|
173
|
+
"min-w-[8rem]",
|
|
174
|
+
"origin-(--radix-menubar-content-transform-origin)",
|
|
175
|
+
"overflow-hidden",
|
|
176
|
+
"rounded-md",
|
|
177
|
+
"border",
|
|
178
|
+
"p-1",
|
|
179
|
+
"shadow-lg",
|
|
180
|
+
);
|
|
181
|
+
|
|
7
182
|
function Menubar({
|
|
8
183
|
className,
|
|
9
184
|
...props
|
|
@@ -11,10 +186,7 @@ function Menubar({
|
|
|
11
186
|
return (
|
|
12
187
|
<MenubarPrimitive.Root
|
|
13
188
|
data-slot="menubar"
|
|
14
|
-
className={cn(
|
|
15
|
-
"bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
|
|
16
|
-
className,
|
|
17
|
-
)}
|
|
189
|
+
className={cn(menubarStyles, className)}
|
|
18
190
|
{...props}
|
|
19
191
|
/>
|
|
20
192
|
);
|
|
@@ -53,10 +225,7 @@ function MenubarTrigger({
|
|
|
53
225
|
return (
|
|
54
226
|
<MenubarPrimitive.Trigger
|
|
55
227
|
data-slot="menubar-trigger"
|
|
56
|
-
className={cn(
|
|
57
|
-
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
|
|
58
|
-
className,
|
|
59
|
-
)}
|
|
228
|
+
className={cn(menubarTriggerStyles, className)}
|
|
60
229
|
{...props}
|
|
61
230
|
/>
|
|
62
231
|
);
|
|
@@ -76,10 +245,7 @@ function MenubarContent({
|
|
|
76
245
|
align={align}
|
|
77
246
|
alignOffset={alignOffset}
|
|
78
247
|
sideOffset={sideOffset}
|
|
79
|
-
className={cn(
|
|
80
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in 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-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",
|
|
81
|
-
className,
|
|
82
|
-
)}
|
|
248
|
+
className={cn(menubarContentStyles, className)}
|
|
83
249
|
{...props}
|
|
84
250
|
/>
|
|
85
251
|
</MenubarPortal>
|
|
@@ -100,10 +266,7 @@ function MenubarItem({
|
|
|
100
266
|
data-slot="menubar-item"
|
|
101
267
|
data-inset={inset}
|
|
102
268
|
data-variant={variant}
|
|
103
|
-
className={cn(
|
|
104
|
-
"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",
|
|
105
|
-
className,
|
|
106
|
-
)}
|
|
269
|
+
className={cn(menubarItemStyles, className)}
|
|
107
270
|
{...props}
|
|
108
271
|
/>
|
|
109
272
|
);
|
|
@@ -117,13 +280,10 @@ function MenubarCheckboxItem({
|
|
|
117
280
|
return (
|
|
118
281
|
<MenubarPrimitive.CheckboxItem
|
|
119
282
|
data-slot="menubar-checkbox-item"
|
|
120
|
-
className={cn(
|
|
121
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs 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",
|
|
122
|
-
className,
|
|
123
|
-
)}
|
|
283
|
+
className={cn(menubarCheckboxRadioItemStyles, className)}
|
|
124
284
|
{...props}
|
|
125
285
|
>
|
|
126
|
-
<span className=
|
|
286
|
+
<span className={menubarIndicatorStyles}>
|
|
127
287
|
<MenubarPrimitive.ItemIndicator>
|
|
128
288
|
<CheckIcon className="size-4" />
|
|
129
289
|
</MenubarPrimitive.ItemIndicator>
|
|
@@ -141,13 +301,10 @@ function MenubarRadioItem({
|
|
|
141
301
|
return (
|
|
142
302
|
<MenubarPrimitive.RadioItem
|
|
143
303
|
data-slot="menubar-radio-item"
|
|
144
|
-
className={cn(
|
|
145
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs 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",
|
|
146
|
-
className,
|
|
147
|
-
)}
|
|
304
|
+
className={cn(menubarCheckboxRadioItemStyles, className)}
|
|
148
305
|
{...props}
|
|
149
306
|
>
|
|
150
|
-
<span className=
|
|
307
|
+
<span className={menubarIndicatorStyles}>
|
|
151
308
|
<MenubarPrimitive.ItemIndicator>
|
|
152
309
|
<CircleIcon className="size-2 fill-current" />
|
|
153
310
|
</MenubarPrimitive.ItemIndicator>
|
|
@@ -168,10 +325,7 @@ function MenubarLabel({
|
|
|
168
325
|
<MenubarPrimitive.Label
|
|
169
326
|
data-slot="menubar-label"
|
|
170
327
|
data-inset={inset}
|
|
171
|
-
className={cn(
|
|
172
|
-
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
173
|
-
className,
|
|
174
|
-
)}
|
|
328
|
+
className={cn(menubarLabelStyles, className)}
|
|
175
329
|
{...props}
|
|
176
330
|
/>
|
|
177
331
|
);
|
|
@@ -184,7 +338,7 @@ function MenubarSeparator({
|
|
|
184
338
|
return (
|
|
185
339
|
<MenubarPrimitive.Separator
|
|
186
340
|
data-slot="menubar-separator"
|
|
187
|
-
className={cn(
|
|
341
|
+
className={cn(menubarSeparatorStyles, className)}
|
|
188
342
|
{...props}
|
|
189
343
|
/>
|
|
190
344
|
);
|
|
@@ -197,10 +351,7 @@ function MenubarShortcut({
|
|
|
197
351
|
return (
|
|
198
352
|
<span
|
|
199
353
|
data-slot="menubar-shortcut"
|
|
200
|
-
className={cn(
|
|
201
|
-
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
202
|
-
className,
|
|
203
|
-
)}
|
|
354
|
+
className={cn(menubarShortcutStyles, className)}
|
|
204
355
|
{...props}
|
|
205
356
|
/>
|
|
206
357
|
);
|
|
@@ -224,10 +375,7 @@ function MenubarSubTrigger({
|
|
|
224
375
|
<MenubarPrimitive.SubTrigger
|
|
225
376
|
data-slot="menubar-sub-trigger"
|
|
226
377
|
data-inset={inset}
|
|
227
|
-
className={cn(
|
|
228
|
-
"focus:bg-(--color-surface-1) data-[state=open]:bg-(--color-surface-1) flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
|
|
229
|
-
className,
|
|
230
|
-
)}
|
|
378
|
+
className={cn(menubarSubTriggerStyles, className)}
|
|
231
379
|
{...props}
|
|
232
380
|
>
|
|
233
381
|
{children}
|
|
@@ -243,10 +391,7 @@ function MenubarSubContent({
|
|
|
243
391
|
return (
|
|
244
392
|
<MenubarPrimitive.SubContent
|
|
245
393
|
data-slot="menubar-sub-content"
|
|
246
|
-
className={cn(
|
|
247
|
-
"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-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
248
|
-
className,
|
|
249
|
-
)}
|
|
394
|
+
className={cn(menubarSubContentStyles, className)}
|
|
250
395
|
{...props}
|
|
251
396
|
/>
|
|
252
397
|
);
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
PaginationItem,
|
|
8
8
|
PaginationLink,
|
|
9
9
|
PaginationNext,
|
|
10
|
+
PaginationPageSizeSelector,
|
|
10
11
|
PaginationPrevious,
|
|
11
12
|
} from "#shadcn/components/ui/pagination";
|
|
12
13
|
|
|
@@ -20,6 +21,11 @@ type Story = StoryObj<typeof meta>;
|
|
|
20
21
|
export const Demo = {
|
|
21
22
|
render: () => (
|
|
22
23
|
<Pagination>
|
|
24
|
+
<PaginationPageSizeSelector
|
|
25
|
+
pageSize={10}
|
|
26
|
+
onPageSizeChange={(_: number) => {}}
|
|
27
|
+
className="p-2"
|
|
28
|
+
/>
|
|
23
29
|
<PaginationContent>
|
|
24
30
|
<PaginationItem>
|
|
25
31
|
<PaginationPrevious href="#" />
|
|
@@ -33,10 +39,10 @@ export const Demo = {
|
|
|
33
39
|
</PaginationLink>
|
|
34
40
|
</PaginationItem>
|
|
35
41
|
<PaginationItem>
|
|
36
|
-
<
|
|
42
|
+
<PaginationEllipsis />
|
|
37
43
|
</PaginationItem>
|
|
38
44
|
<PaginationItem>
|
|
39
|
-
<
|
|
45
|
+
<PaginationLink href="#">3</PaginationLink>
|
|
40
46
|
</PaginationItem>
|
|
41
47
|
<PaginationItem>
|
|
42
48
|
<PaginationNext href="#" />
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ChevronDownIcon,
|
|
2
3
|
ChevronLeftIcon,
|
|
3
4
|
ChevronRightIcon,
|
|
4
5
|
MoreHorizontalIcon,
|
|
5
6
|
} from "lucide-react";
|
|
6
7
|
import type * as React from "react";
|
|
7
8
|
import { type Button, buttonVariants } from "#shadcn/components/ui/button";
|
|
9
|
+
import {
|
|
10
|
+
DropdownMenu,
|
|
11
|
+
DropdownMenuContent,
|
|
12
|
+
DropdownMenuItem,
|
|
13
|
+
DropdownMenuTrigger,
|
|
14
|
+
} from "#shadcn/components/ui/dropdown-menu";
|
|
8
15
|
import { cn } from "#shadcn/lib/utils";
|
|
9
16
|
|
|
10
17
|
function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
|
|
@@ -15,7 +22,7 @@ function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
|
|
|
15
22
|
role="navigation"
|
|
16
23
|
aria-label="pagination"
|
|
17
24
|
data-slot="pagination"
|
|
18
|
-
className={cn("
|
|
25
|
+
className={cn("flex", "justify-center", className)}
|
|
19
26
|
{...props}
|
|
20
27
|
/>
|
|
21
28
|
);
|
|
@@ -28,7 +35,7 @@ function PaginationContent({
|
|
|
28
35
|
return (
|
|
29
36
|
<ul
|
|
30
37
|
data-slot="pagination-content"
|
|
31
|
-
className={cn("flex flex-row items-center gap-1", className)}
|
|
38
|
+
className={cn("flex", "flex-row", "items-center", "gap-1", className)}
|
|
32
39
|
{...props}
|
|
33
40
|
/>
|
|
34
41
|
);
|
|
@@ -37,7 +44,7 @@ function PaginationContent({
|
|
|
37
44
|
function PaginationItem({ ...props }: React.ComponentProps<"li">) {
|
|
38
45
|
return (
|
|
39
46
|
<li
|
|
40
|
-
className="hover:bg-
|
|
47
|
+
className={cn("hover:bg-bg-secondary", "rounded-md")}
|
|
41
48
|
data-slot="pagination-item"
|
|
42
49
|
{...props}
|
|
43
50
|
/>
|
|
@@ -80,11 +87,10 @@ function PaginationPrevious({
|
|
|
80
87
|
<PaginationLink
|
|
81
88
|
aria-label="Go to previous page"
|
|
82
89
|
size="small"
|
|
83
|
-
className={cn("gap-1 px-2.5 sm:pl-2.5", className)}
|
|
90
|
+
className={cn("gap-1", "px-2.5", "sm:pl-2.5", className)}
|
|
84
91
|
{...props}
|
|
85
92
|
>
|
|
86
93
|
<ChevronLeftIcon />
|
|
87
|
-
<span className="hidden sm:block">Previous</span>
|
|
88
94
|
</PaginationLink>
|
|
89
95
|
);
|
|
90
96
|
}
|
|
@@ -97,10 +103,9 @@ function PaginationNext({
|
|
|
97
103
|
<PaginationLink
|
|
98
104
|
aria-label="Go to next page"
|
|
99
105
|
size="regular"
|
|
100
|
-
className={cn("gap-1 px-2.5 sm:pr-2.5", className)}
|
|
106
|
+
className={cn("gap-1", "px-2.5", "sm:pr-2.5", className)}
|
|
101
107
|
{...props}
|
|
102
108
|
>
|
|
103
|
-
<span className="hidden sm:block">Next</span>
|
|
104
109
|
<ChevronRightIcon />
|
|
105
110
|
</PaginationLink>
|
|
106
111
|
);
|
|
@@ -114,7 +119,13 @@ function PaginationEllipsis({
|
|
|
114
119
|
<span
|
|
115
120
|
aria-hidden
|
|
116
121
|
data-slot="pagination-ellipsis"
|
|
117
|
-
className={cn(
|
|
122
|
+
className={cn(
|
|
123
|
+
"flex",
|
|
124
|
+
"size-9",
|
|
125
|
+
"items-center",
|
|
126
|
+
"justify-center",
|
|
127
|
+
className,
|
|
128
|
+
)}
|
|
118
129
|
{...props}
|
|
119
130
|
>
|
|
120
131
|
<MoreHorizontalIcon className="size-4" />
|
|
@@ -123,6 +134,51 @@ function PaginationEllipsis({
|
|
|
123
134
|
);
|
|
124
135
|
}
|
|
125
136
|
|
|
137
|
+
type PaginationPageSizeSelectorProps = {
|
|
138
|
+
pageSize: number;
|
|
139
|
+
onPageSizeChange: (pageSize: number) => void;
|
|
140
|
+
pageSizeOptions?: number[];
|
|
141
|
+
className?: string;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
function PaginationPageSizeSelector({
|
|
145
|
+
pageSize,
|
|
146
|
+
onPageSizeChange,
|
|
147
|
+
pageSizeOptions = [10, 20, 50, 100],
|
|
148
|
+
className,
|
|
149
|
+
}: PaginationPageSizeSelectorProps) {
|
|
150
|
+
return (
|
|
151
|
+
<DropdownMenu>
|
|
152
|
+
<DropdownMenuTrigger
|
|
153
|
+
className={cn(
|
|
154
|
+
"flex",
|
|
155
|
+
"items-center",
|
|
156
|
+
"gap-1",
|
|
157
|
+
"text-sm",
|
|
158
|
+
"text-text-secondary",
|
|
159
|
+
"hover:text-text-primary",
|
|
160
|
+
"outline-none",
|
|
161
|
+
className,
|
|
162
|
+
)}
|
|
163
|
+
data-slot="pagination-page-size-selector"
|
|
164
|
+
>
|
|
165
|
+
{pageSize} / Page
|
|
166
|
+
<ChevronDownIcon className="size-4" />
|
|
167
|
+
</DropdownMenuTrigger>
|
|
168
|
+
<DropdownMenuContent>
|
|
169
|
+
{pageSizeOptions.map((option) => (
|
|
170
|
+
<DropdownMenuItem
|
|
171
|
+
key={option}
|
|
172
|
+
onClick={() => onPageSizeChange(option)}
|
|
173
|
+
>
|
|
174
|
+
{option}
|
|
175
|
+
</DropdownMenuItem>
|
|
176
|
+
))}
|
|
177
|
+
</DropdownMenuContent>
|
|
178
|
+
</DropdownMenu>
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
126
182
|
export {
|
|
127
183
|
Pagination,
|
|
128
184
|
PaginationContent,
|
|
@@ -131,4 +187,5 @@ export {
|
|
|
131
187
|
PaginationPrevious,
|
|
132
188
|
PaginationNext,
|
|
133
189
|
PaginationEllipsis,
|
|
190
|
+
PaginationPageSizeSelector,
|
|
134
191
|
};
|
|
@@ -1,8 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
2
3
|
import type * as React from "react";
|
|
3
4
|
|
|
4
5
|
import { cn } from "#shadcn/lib/utils";
|
|
5
6
|
|
|
7
|
+
// Popover content styles
|
|
8
|
+
const popoverContentStyles = cn(
|
|
9
|
+
// Layout
|
|
10
|
+
"z-50",
|
|
11
|
+
"w-72",
|
|
12
|
+
"origin-(--radix-popover-content-transform-origin)",
|
|
13
|
+
"outline-hidden",
|
|
14
|
+
// Shape
|
|
15
|
+
"rounded-md",
|
|
16
|
+
// Borders
|
|
17
|
+
"border",
|
|
18
|
+
"border-border-primary",
|
|
19
|
+
// Background & Colors
|
|
20
|
+
"bg-bg-primary",
|
|
21
|
+
"text-text-primary",
|
|
22
|
+
// Spacing
|
|
23
|
+
"p-4",
|
|
24
|
+
// Shadow
|
|
25
|
+
"dropdown-menu-shadow",
|
|
26
|
+
// Animations - open
|
|
27
|
+
"data-[state=open]:animate-in",
|
|
28
|
+
"data-[state=open]:fade-in-0",
|
|
29
|
+
"data-[state=open]:zoom-in-95",
|
|
30
|
+
// Animations - closed
|
|
31
|
+
"data-[state=closed]:animate-out",
|
|
32
|
+
"data-[state=closed]:fade-out-0",
|
|
33
|
+
"data-[state=closed]:zoom-out-95",
|
|
34
|
+
// Slide animations
|
|
35
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
36
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
37
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
38
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
39
|
+
);
|
|
40
|
+
|
|
6
41
|
function Popover({
|
|
7
42
|
...props
|
|
8
43
|
}: React.ComponentProps<typeof PopoverPrimitive.Root>) {
|
|
@@ -27,10 +62,7 @@ function PopoverContent({
|
|
|
27
62
|
data-slot="popover-content"
|
|
28
63
|
align={align}
|
|
29
64
|
sideOffset={sideOffset}
|
|
30
|
-
className={cn(
|
|
31
|
-
"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 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
32
|
-
className,
|
|
33
|
-
)}
|
|
65
|
+
className={cn(popoverContentStyles, className)}
|
|
34
66
|
{...props}
|
|
35
67
|
/>
|
|
36
68
|
</PopoverPrimitive.Portal>
|
|
@@ -3,6 +3,25 @@ import type * as React from "react";
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "#shadcn/lib/utils";
|
|
5
5
|
|
|
6
|
+
// Progress root styles
|
|
7
|
+
const progressRootStyles = cn(
|
|
8
|
+
"relative",
|
|
9
|
+
"h-2",
|
|
10
|
+
"w-full",
|
|
11
|
+
"overflow-hidden",
|
|
12
|
+
"rounded-full",
|
|
13
|
+
"bg-bg-quaternary",
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
// Progress indicator styles
|
|
17
|
+
const progressIndicatorStyles = cn(
|
|
18
|
+
"bg-bg-link",
|
|
19
|
+
"h-full",
|
|
20
|
+
"w-full",
|
|
21
|
+
"flex-1",
|
|
22
|
+
"transition-all",
|
|
23
|
+
);
|
|
24
|
+
|
|
6
25
|
function Progress({
|
|
7
26
|
className,
|
|
8
27
|
value,
|
|
@@ -11,15 +30,12 @@ function Progress({
|
|
|
11
30
|
return (
|
|
12
31
|
<ProgressPrimitive.Root
|
|
13
32
|
data-slot="progress"
|
|
14
|
-
className={cn(
|
|
15
|
-
"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
|
|
16
|
-
className,
|
|
17
|
-
)}
|
|
33
|
+
className={cn(progressRootStyles, className)}
|
|
18
34
|
{...props}
|
|
19
35
|
>
|
|
20
36
|
<ProgressPrimitive.Indicator
|
|
21
37
|
data-slot="progress-indicator"
|
|
22
|
-
className=
|
|
38
|
+
className={progressIndicatorStyles}
|
|
23
39
|
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
24
40
|
/>
|
|
25
41
|
</ProgressPrimitive.Root>
|