@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/tabs.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react-vite\";\nimport { action } from \"storybook/internal/actions\";\nimport { Button } from \"#shadcn/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardTitle,\n} from \"#shadcn/components/ui/card\";\nimport { Input } from \"#shadcn/components/ui/input\";\nimport { Label } from \"#shadcn/components/ui/label\";\nimport {\n\tTabs,\n\tTabsAddButton,\n\tTabsContent,\n\tTabsList,\n\tTabsTrigger,\n} from \"#shadcn/components/ui/tabs\";\n\nconst meta = {\n\ttitle: \"Component/Tabs\",\n\targTypes: {\n\t\tvariant: {\n\t\t\toptions: [\"button\", \"dashed\"],\n\t\t\tcontrol: { type: \"select\" },\n\t\t},\n\t},\n} satisfies Meta;\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Demo = {\n\trender: (props) => (\n\t\t<div className=\"flex w-full max-w-sm flex-col gap-6\">\n\t\t\t<Tabs defaultValue=\"account\" {...props}>\n\t\t\t\t<TabsList>\n\t\t\t\t\t<TabsTrigger value=\"account\">Account</TabsTrigger>\n\t\t\t\t\t<TabsTrigger value=\"password\">Password</TabsTrigger>\n\t\t\t\t</TabsList>\n\t\t\t\t<TabsContent value=\"account\">\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t<CardTitle>Account</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tMake changes to your account here. Click save when you're\n\t\t\t\t\t\t\t\tdone.\n\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent className=\"grid gap-6\">\n\t\t\t\t\t\t\t<div className=\"grid gap-3\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"tabs-demo-name\">Name</Label>\n\t\t\t\t\t\t\t\t<Input id=\"tabs-demo-name\" defaultValue=\"Pedro Duarte\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"grid gap-3\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"tabs-demo-username\">Username</Label>\n\t\t\t\t\t\t\t\t<Input id=\"tabs-demo-username\" defaultValue=\"@peduarte\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t<CardFooter>\n\t\t\t\t\t\t\t<Button>Save changes</Button>\n\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t</Card>\n\t\t\t\t</TabsContent>\n\t\t\t\t<TabsContent value=\"password\">\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t<CardTitle>Password</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tChange your password here. After saving, you'll be logged\n\t\t\t\t\t\t\t\tout.\n\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent className=\"grid gap-6\">\n\t\t\t\t\t\t\t<div className=\"grid gap-3\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"tabs-demo-current\">Current password</Label>\n\t\t\t\t\t\t\t\t<Input id=\"tabs-demo-current\" type=\"password\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"grid gap-3\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"tabs-demo-new\">New password</Label>\n\t\t\t\t\t\t\t\t<Input id=\"tabs-demo-new\" type=\"password\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t<CardFooter>\n\t\t\t\t\t\t\t<Button>Save password</Button>\n\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t</Card>\n\t\t\t\t</TabsContent>\n\t\t\t</Tabs>\n\t\t</div>\n\t),\n} satisfies Story;\n\nfunction BrowserTabOnClose(value: string) {\n\taction(\"onClose\")(value);\n}\n\nfunction BrowserTabOnClick() {\n\taction(\"onClick\")();\n}\n\nfunction BrowserTabOnAdd() {\n\taction(\"onAdd\")();\n}\n\nexport const Browser = {\n\tparameters: {\n\t\tlayout: \"fullscreen\",\n\t},\n\trender: () => (\n\t\t<Tabs defaultValue=\"first\" variant=\"browser\">\n\t\t\t<TabsList>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue=\"first\"\n\t\t\t\t\tonClick={BrowserTabOnClick}\n\t\t\t\t\tonClose={BrowserTabOnClose}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t<span className=\"text-utility-green\">GET</span>\n\t\t\t\t\t\t<span>/fhir/Patient</span>\n\t\t\t\t\t</span>\n\t\t\t\t</TabsTrigger>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue=\"second\"\n\t\t\t\t\tonClick={BrowserTabOnClick}\n\t\t\t\t\tonClose={BrowserTabOnClose}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t<span className=\"text-utility-yellow\">POST</span>\n\t\t\t\t\t\t<span>/fhir</span>\n\t\t\t\t\t</span>\n\t\t\t\t</TabsTrigger>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue=\"third\"\n\t\t\t\t\tonClick={BrowserTabOnClick}\n\t\t\t\t\tonClose={BrowserTabOnClose}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t<span className=\"text-utility-yellow\">POST</span>\n\t\t\t\t\t\t<span>/$graphql</span>\n\t\t\t\t\t</span>\n\t\t\t\t</TabsTrigger>\n\t\t\t</TabsList>\n\t\t\t<TabsAddButton onClick={BrowserTabOnAdd} />\n\t\t</Tabs>\n\t),\n} satisfies Story;\n"],"names":["action","Button","Card","CardContent","CardDescription","CardFooter","CardHeader","CardTitle","Input","Label","Tabs","TabsAddButton","TabsContent","TabsList","TabsTrigger","meta","title","argTypes","variant","options","control","type","Demo","render","props","div","className","defaultValue","value","htmlFor","id","BrowserTabOnClose","BrowserTabOnClick","BrowserTabOnAdd","Browser","parameters","layout","onClick","onClose","span"],"mappings":";AACA,SAASA,MAAM,QAAQ,6BAA6B;AACpD,SAASC,MAAM,QAAQ,cAA+B;AACtD,SACCC,IAAI,EACJC,WAAW,EACXC,eAAe,EACfC,UAAU,EACVC,UAAU,EACVC,SAAS,QACH,YAA6B;AACpC,SAASC,KAAK,QAAQ,aAA8B;AACpD,SAASC,KAAK,QAAQ,aAA8B;AACpD,SACCC,IAAI,EACJC,aAAa,EACbC,WAAW,EACXC,QAAQ,EACRC,WAAW,QACL,YAA6B;AAEpC,MAAMC,OAAO;IACZC,OAAO;IACPC,UAAU;QACTC,SAAS;YACRC,SAAS;gBAAC;gBAAU;aAAS;YAC7BC,SAAS;gBAAEC,MAAM;YAAS;QAC3B;IACD;AACD;AACA,eAAeN,KAAK;AAIpB,OAAO,MAAMO,OAAO;IACnBC,QAAQ,CAACC,sBACR,KAACC;YAAIC,WAAU;sBACd,cAAA,MAAChB;gBAAKiB,cAAa;gBAAW,GAAGH,KAAK;;kCACrC,MAACX;;0CACA,KAACC;gCAAYc,OAAM;0CAAU;;0CAC7B,KAACd;gCAAYc,OAAM;0CAAW;;;;kCAE/B,KAAChB;wBAAYgB,OAAM;kCAClB,cAAA,MAAC1B;;8CACA,MAACI;;sDACA,KAACC;sDAAU;;sDACX,KAACH;sDAAgB;;;;8CAKlB,MAACD;oCAAYuB,WAAU;;sDACtB,MAACD;4CAAIC,WAAU;;8DACd,KAACjB;oDAAMoB,SAAQ;8DAAiB;;8DAChC,KAACrB;oDAAMsB,IAAG;oDAAiBH,cAAa;;;;sDAEzC,MAACF;4CAAIC,WAAU;;8DACd,KAACjB;oDAAMoB,SAAQ;8DAAqB;;8DACpC,KAACrB;oDAAMsB,IAAG;oDAAqBH,cAAa;;;;;;8CAG9C,KAACtB;8CACA,cAAA,KAACJ;kDAAO;;;;;;kCAIX,KAACW;wBAAYgB,OAAM;kCAClB,cAAA,MAAC1B;;8CACA,MAACI;;sDACA,KAACC;sDAAU;;sDACX,KAACH;sDAAgB;;;;8CAKlB,MAACD;oCAAYuB,WAAU;;sDACtB,MAACD;4CAAIC,WAAU;;8DACd,KAACjB;oDAAMoB,SAAQ;8DAAoB;;8DACnC,KAACrB;oDAAMsB,IAAG;oDAAoBT,MAAK;;;;sDAEpC,MAACI;4CAAIC,WAAU;;8DACd,KAACjB;oDAAMoB,SAAQ;8DAAgB;;8DAC/B,KAACrB;oDAAMsB,IAAG;oDAAgBT,MAAK;;;;;;8CAGjC,KAAChB;8CACA,cAAA,KAACJ;kDAAO;;;;;;;;;AAOf,EAAkB;AAElB,SAAS8B,kBAAkBH,KAAa;IACvC5B,OAAO,WAAW4B;AACnB;AAEA,SAASI;IACRhC,OAAO;AACR;AAEA,SAASiC;IACRjC,OAAO;AACR;AAEA,OAAO,MAAMkC,UAAU;IACtBC,YAAY;QACXC,QAAQ;IACT;IACAb,QAAQ,kBACP,MAACb;YAAKiB,cAAa;YAAQT,SAAQ;;8BAClC,MAACL;;sCACA,KAACC;4BACAc,OAAM;4BACNS,SAASL;4BACTM,SAASP;sCAET,cAAA,MAACQ;gCAAKb,WAAU;;kDACf,KAACa;wCAAKb,WAAU;kDAAqB;;kDACrC,KAACa;kDAAK;;;;;sCAGR,KAACzB;4BACAc,OAAM;4BACNS,SAASL;4BACTM,SAASP;sCAET,cAAA,MAACQ;gCAAKb,WAAU;;kDACf,KAACa;wCAAKb,WAAU;kDAAsB;;kDACtC,KAACa;kDAAK;;;;;sCAGR,KAACzB;4BACAc,OAAM;4BACNS,SAASL;4BACTM,SAASP;sCAET,cAAA,MAACQ;gCAAKb,WAAU;;kDACf,KAACa;wCAAKb,WAAU;kDAAsB;;kDACtC,KAACa;kDAAK;;;;;;;8BAIT,KAAC5B;oBAAc0B,SAASJ;;;;AAG3B,EAAkB"}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/shadcn/components/ui/tabs.stories.tsx"],"sourcesContent":["import { Controls, Primary, Title } from \"@storybook/addon-docs/blocks\";\nimport type { Meta, StoryObj } from \"@storybook/react-vite\";\nimport { action } from \"storybook/actions\";\nimport {\n\tTabs,\n\tTabsAddButton,\n\tTabsContent,\n\tTabsList,\n\tTabsListDropdown,\n\tTabsTrigger,\n} from \"#shadcn/components/ui/tabs\";\n\ninterface TabsWrapperProps {\n\tvariant?: \"default\" | \"browser\" | \"secondary\" | \"tertiary\";\n}\n\nfunction TabsWrapper({ variant = \"default\" }: TabsWrapperProps) {\n\tif (variant === \"browser\") {\n\t\treturn (\n\t\t\t<Tabs defaultValue=\"first\" variant=\"browser\">\n\t\t\t\t<TabsList>\n\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\tvalue=\"first\"\n\t\t\t\t\t\tonClick={() => action(\"onClick\")()}\n\t\t\t\t\t\tonClose={(v) => action(\"onClose\")(v)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t<span className=\"text-utility-green\">GET</span>\n\t\t\t\t\t\t\t<span>/fhir/Patient</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\tvalue=\"second\"\n\t\t\t\t\t\tonClick={() => action(\"onClick\")()}\n\t\t\t\t\t\tonClose={(v) => action(\"onClose\")(v)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t<span className=\"text-utility-yellow\">POST</span>\n\t\t\t\t\t\t\t<span>/fhir</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</TabsTrigger>\n\t\t\t\t</TabsList>\n\t\t\t\t<TabsAddButton onClick={() => action(\"onAdd\")()} />\n\t\t\t\t<TabsContent value=\"first\">\n\t\t\t\t\t<div className=\"p-4\">GET /fhir/Patient content</div>\n\t\t\t\t</TabsContent>\n\t\t\t\t<TabsContent value=\"second\">\n\t\t\t\t\t<div className=\"p-4\">POST /fhir content</div>\n\t\t\t\t</TabsContent>\n\t\t\t</Tabs>\n\t\t);\n\t}\n\n\tif (variant === \"secondary\") {\n\t\treturn (\n\t\t\t<Tabs defaultValue=\"tab1\" variant=\"secondary\">\n\t\t\t\t<TabsList>\n\t\t\t\t\t<TabsTrigger value=\"tab1\">Tab 1</TabsTrigger>\n\t\t\t\t\t<TabsTrigger value=\"tab2\">Tab 2</TabsTrigger>\n\t\t\t\t\t<TabsTrigger value=\"tab3\">Tab 3</TabsTrigger>\n\t\t\t\t</TabsList>\n\t\t\t\t<TabsContent value=\"tab1\">\n\t\t\t\t\t<div className=\"p-4\">Tab 1 content</div>\n\t\t\t\t</TabsContent>\n\t\t\t\t<TabsContent value=\"tab2\">\n\t\t\t\t\t<div className=\"p-4\">Tab 2 content</div>\n\t\t\t\t</TabsContent>\n\t\t\t\t<TabsContent value=\"tab3\">\n\t\t\t\t\t<div className=\"p-4\">Tab 3 content</div>\n\t\t\t\t</TabsContent>\n\t\t\t</Tabs>\n\t\t);\n\t}\n\n\tif (variant === \"tertiary\") {\n\t\treturn (\n\t\t\t<Tabs defaultValue=\"tab1\" variant=\"tertiary\">\n\t\t\t\t<TabsList>\n\t\t\t\t\t<TabsTrigger value=\"tab1\">Tab 1</TabsTrigger>\n\t\t\t\t\t<TabsTrigger value=\"tab2\">Tab 2</TabsTrigger>\n\t\t\t\t\t<TabsTrigger value=\"tab3\">Tab 3</TabsTrigger>\n\t\t\t\t</TabsList>\n\t\t\t\t<TabsContent value=\"tab1\">\n\t\t\t\t\t<div className=\"p-4\">Tab 1 content</div>\n\t\t\t\t</TabsContent>\n\t\t\t\t<TabsContent value=\"tab2\">\n\t\t\t\t\t<div className=\"p-4\">Tab 2 content</div>\n\t\t\t\t</TabsContent>\n\t\t\t\t<TabsContent value=\"tab3\">\n\t\t\t\t\t<div className=\"p-4\">Tab 3 content</div>\n\t\t\t\t</TabsContent>\n\t\t\t</Tabs>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Tabs defaultValue=\"tab1\">\n\t\t\t<TabsList>\n\t\t\t\t<TabsTrigger value=\"tab1\">Tab 1</TabsTrigger>\n\t\t\t\t<TabsTrigger value=\"tab2\">Tab 2</TabsTrigger>\n\t\t\t\t<TabsTrigger value=\"tab3\">Tab 3</TabsTrigger>\n\t\t\t</TabsList>\n\t\t\t<TabsContent value=\"tab1\">\n\t\t\t\t<div className=\"p-4\">Tab 1 content</div>\n\t\t\t</TabsContent>\n\t\t\t<TabsContent value=\"tab2\">\n\t\t\t\t<div className=\"p-4\">Tab 2 content</div>\n\t\t\t</TabsContent>\n\t\t\t<TabsContent value=\"tab3\">\n\t\t\t\t<div className=\"p-4\">Tab 3 content</div>\n\t\t\t</TabsContent>\n\t\t</Tabs>\n\t);\n}\n\nconst meta = {\n\ttitle: \"Component/Tabs\",\n\tcomponent: TabsWrapper,\n\tparameters: {\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<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\tvariant: {\n\t\t\tcontrol: \"select\",\n\t\t\toptions: [\"default\", \"browser\", \"secondary\", \"tertiary\"],\n\t\t},\n\t},\n\targs: {\n\t\tvariant: \"default\",\n\t},\n} satisfies Meta<typeof TabsWrapper>;\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Default = {\n\ttags: [\"!dev\"],\n\trender: ({ variant = \"default\" }) => <TabsWrapper variant={variant} />,\n} satisfies Story;\n\nexport const Demo = {\n\ttags: [\"!autodocs\"],\n\trender: () => (\n\t\t<div className=\"space-y-8\">\n\t\t\t{/* Default variant */}\n\t\t\t<div>\n\t\t\t\t<h3 className=\"typo-label mb-4\">Default</h3>\n\t\t\t\t<Tabs defaultValue=\"tab1\">\n\t\t\t\t\t<TabsList>\n\t\t\t\t\t\t<TabsTrigger value=\"tab1\">Tab 1</TabsTrigger>\n\t\t\t\t\t\t<TabsTrigger value=\"tab2\">Tab 2</TabsTrigger>\n\t\t\t\t\t\t<TabsTrigger value=\"tab3\">Tab 3</TabsTrigger>\n\t\t\t\t\t</TabsList>\n\t\t\t\t</Tabs>\n\t\t\t</div>\n\n\t\t\t{/* Secondary variant */}\n\t\t\t<div>\n\t\t\t\t<h3 className=\"typo-label mb-4\">Secondary</h3>\n\t\t\t\t<Tabs defaultValue=\"tab1\" variant=\"secondary\">\n\t\t\t\t\t<TabsList>\n\t\t\t\t\t\t<TabsTrigger value=\"tab1\">Tab 1</TabsTrigger>\n\t\t\t\t\t\t<TabsTrigger value=\"tab2\">Tab 2</TabsTrigger>\n\t\t\t\t\t\t<TabsTrigger value=\"tab3\">Tab 3</TabsTrigger>\n\t\t\t\t\t</TabsList>\n\t\t\t\t</Tabs>\n\t\t\t</div>\n\n\t\t\t{/* Tertiary variant */}\n\t\t\t<div>\n\t\t\t\t<h3 className=\"typo-label mb-4\">Tertiary</h3>\n\t\t\t\t<Tabs defaultValue=\"tab1\" variant=\"tertiary\">\n\t\t\t\t\t<TabsList>\n\t\t\t\t\t\t<TabsTrigger value=\"tab1\">Tab 1</TabsTrigger>\n\t\t\t\t\t\t<TabsTrigger value=\"tab2\">Tab 2</TabsTrigger>\n\t\t\t\t\t\t<TabsTrigger value=\"tab3\">Tab 3</TabsTrigger>\n\t\t\t\t\t</TabsList>\n\t\t\t\t</Tabs>\n\t\t\t</div>\n\n\t\t\t{/* Browser variant */}\n\t\t\t<div>\n\t\t\t\t<h3 className=\"typo-label mb-4\">Browser</h3>\n\t\t\t\t<Tabs defaultValue=\"first\" variant=\"browser\">\n\t\t\t\t\t<TabsList>\n\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\tvalue=\"first\"\n\t\t\t\t\t\t\tonClick={() => action(\"onClick\")()}\n\t\t\t\t\t\t\tonClose={(v) => action(\"onClose\")(v)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t<span className=\"text-utility-green\">GET</span>\n\t\t\t\t\t\t\t\t<span>/fhir/Patient</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\tvalue=\"second\"\n\t\t\t\t\t\t\tonClick={() => action(\"onClick\")()}\n\t\t\t\t\t\t\tonClose={(v) => action(\"onClose\")(v)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t<span className=\"text-utility-yellow\">POST</span>\n\t\t\t\t\t\t\t\t<span>/fhir</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\tvalue=\"third\"\n\t\t\t\t\t\t\tonClick={() => action(\"onClick\")()}\n\t\t\t\t\t\t\tonClose={(v) => action(\"onClose\")(v)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t<span className=\"text-utility-yellow\">POST</span>\n\t\t\t\t\t\t\t\t<span>/$graphql</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t</TabsList>\n\t\t\t\t\t<TabsAddButton onClick={() => action(\"onAdd\")()} />\n\t\t\t\t\t<TabsListDropdown\n\t\t\t\t\t\ttabs={[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tid: \"first\",\n\t\t\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-utility-green\">GET</span>\n\t\t\t\t\t\t\t\t\t\t<span>/fhir/Patient</span>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tid: \"second\",\n\t\t\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-utility-yellow\">POST</span>\n\t\t\t\t\t\t\t\t\t\t<span>/fhir</span>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tid: \"third\",\n\t\t\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-utility-yellow\">POST</span>\n\t\t\t\t\t\t\t\t\t\t<span>/$graphql</span>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs>\n\t\t\t</div>\n\t\t</div>\n\t),\n} satisfies Story;\n"],"names":["Controls","Primary","Title","action","Tabs","TabsAddButton","TabsContent","TabsList","TabsListDropdown","TabsTrigger","TabsWrapper","variant","defaultValue","value","onClick","onClose","v","span","className","div","meta","title","component","parameters","docs","page","argTypes","control","options","args","Default","tags","render","Demo","h3","tabs","id","content"],"mappings":"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"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
1
2
|
import type * as React from "react";
|
|
2
|
-
declare
|
|
3
|
+
declare const textareaVariants: (props?: ({
|
|
4
|
+
invalid?: boolean | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
interface TextareaProps extends React.ComponentProps<"textarea">, VariantProps<typeof textareaVariants> {
|
|
7
|
+
invalid?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function Textarea({ className, invalid, ...props }: TextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
3
10
|
export { Textarea };
|
|
4
11
|
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,QAAA,MAAM,gBAAgB;;8EA0DrB,CAAC;AAEF,UAAU,aACT,SAAQ,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,EACvC,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CAShE;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,9 +1,37 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
2
3
|
import { cn } from "../../lib/utils.js";
|
|
3
|
-
|
|
4
|
+
const textareaVariants = cva(cn(// Layout
|
|
5
|
+
"flex", "w-full", "min-h-16", "field-sizing-content", // Shape
|
|
6
|
+
"rounded-md", // Borders
|
|
7
|
+
"border", "border-border-primary", // Background & Colors
|
|
8
|
+
"bg-transparent", "text-base", // Spacing
|
|
9
|
+
"px-3", "py-2", // Typography
|
|
10
|
+
"md:text-sm", // Placeholder
|
|
11
|
+
"placeholder:text-text-tertiary", // Transitions
|
|
12
|
+
"transition-all", "duration-300", "outline-none", // Hover
|
|
13
|
+
"hover:border-border-primary_hover", // Focus
|
|
14
|
+
"focus-visible:border-border-link", // Disabled
|
|
15
|
+
"disabled:cursor-not-allowed", "disabled:bg-bg-secondary", "disabled:border-border-primary", "disabled:text-text-disabled", "disabled:placeholder:text-text-disabled"), {
|
|
16
|
+
variants: {
|
|
17
|
+
invalid: {
|
|
18
|
+
true: cn(// Invalid border colors
|
|
19
|
+
"border-border-error", "hover:border-border-error_inverse", // Invalid focus states
|
|
20
|
+
"focus-visible:ring-4", "focus-visible:ring-ring-red", "focus-visible:border-border-error", // Transitions
|
|
21
|
+
"transition-all", "duration-300")
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
invalid: false
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
function Textarea({ className, invalid, ...props }) {
|
|
4
29
|
return /*#__PURE__*/ _jsx("textarea", {
|
|
5
30
|
"data-slot": "textarea",
|
|
6
|
-
className: cn(
|
|
31
|
+
className: cn(textareaVariants({
|
|
32
|
+
invalid
|
|
33
|
+
}), className),
|
|
34
|
+
"aria-invalid": invalid,
|
|
7
35
|
...props
|
|
8
36
|
});
|
|
9
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/shadcn/components/ui/textarea.tsx"],"sourcesContent":["import type * as React from \"react\";\n\nimport { cn } from \"#shadcn/lib/utils\";\n\
|
|
1
|
+
{"version":3,"sources":["../../../../../src/shadcn/components/ui/textarea.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"#shadcn/lib/utils\";\n\nconst textareaVariants = cva(\n\tcn(\n\t\t// Layout\n\t\t\"flex\",\n\t\t\"w-full\",\n\t\t\"min-h-16\",\n\t\t\"field-sizing-content\",\n\t\t// Shape\n\t\t\"rounded-md\",\n\t\t// Borders\n\t\t\"border\",\n\t\t\"border-border-primary\",\n\t\t// Background & Colors\n\t\t\"bg-transparent\",\n\t\t\"text-base\",\n\t\t// Spacing\n\t\t\"px-3\",\n\t\t\"py-2\",\n\t\t// Typography\n\t\t\"md:text-sm\",\n\t\t// Placeholder\n\t\t\"placeholder:text-text-tertiary\",\n\t\t// Transitions\n\t\t\"transition-all\",\n\t\t\"duration-300\",\n\t\t\"outline-none\",\n\t\t// Hover\n\t\t\"hover:border-border-primary_hover\",\n\t\t// Focus\n\t\t\"focus-visible:border-border-link\",\n\t\t// Disabled\n\t\t\"disabled:cursor-not-allowed\",\n\t\t\"disabled:bg-bg-secondary\",\n\t\t\"disabled:border-border-primary\",\n\t\t\"disabled:text-text-disabled\",\n\t\t\"disabled:placeholder:text-text-disabled\",\n\t),\n\t{\n\t\tvariants: {\n\t\t\tinvalid: {\n\t\t\t\ttrue: cn(\n\t\t\t\t\t// Invalid border colors\n\t\t\t\t\t\"border-border-error\",\n\t\t\t\t\t\"hover:border-border-error_inverse\",\n\t\t\t\t\t// Invalid focus states\n\t\t\t\t\t\"focus-visible:ring-4\",\n\t\t\t\t\t\"focus-visible:ring-ring-red\",\n\t\t\t\t\t\"focus-visible:border-border-error\",\n\t\t\t\t\t// Transitions\n\t\t\t\t\t\"transition-all\",\n\t\t\t\t\t\"duration-300\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tinvalid: false,\n\t\t},\n\t},\n);\n\ninterface TextareaProps\n\textends React.ComponentProps<\"textarea\">,\n\t\tVariantProps<typeof textareaVariants> {\n\tinvalid?: boolean;\n}\n\nfunction Textarea({ className, invalid, ...props }: TextareaProps) {\n\treturn (\n\t\t<textarea\n\t\t\tdata-slot=\"textarea\"\n\t\t\tclassName={cn(textareaVariants({ invalid }), className)}\n\t\t\taria-invalid={invalid}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Textarea };\n"],"names":["cva","cn","textareaVariants","variants","invalid","true","defaultVariants","Textarea","className","props","textarea","data-slot","aria-invalid"],"mappings":";AAAA,SAASA,GAAG,QAA2B,2BAA2B;AAGlE,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,MAAMC,mBAAmBF,IACxBC,GACC,SAAS;AACT,QACA,UACA,YACA,wBACA,QAAQ;AACR,cACA,UAAU;AACV,UACA,yBACA,sBAAsB;AACtB,kBACA,aACA,UAAU;AACV,QACA,QACA,aAAa;AACb,cACA,cAAc;AACd,kCACA,cAAc;AACd,kBACA,gBACA,gBACA,QAAQ;AACR,qCACA,QAAQ;AACR,oCACA,WAAW;AACX,+BACA,4BACA,kCACA,+BACA,4CAED;IACCE,UAAU;QACTC,SAAS;YACRC,MAAMJ,GACL,wBAAwB;YACxB,uBACA,qCACA,uBAAuB;YACvB,wBACA,+BACA,qCACA,cAAc;YACd,kBACA;QAEF;IACD;IACAK,iBAAiB;QAChBF,SAAS;IACV;AACD;AASD,SAASG,SAAS,EAAEC,SAAS,EAAEJ,OAAO,EAAE,GAAGK,OAAsB;IAChE,qBACC,KAACC;QACAC,aAAU;QACVH,WAAWP,GAAGC,iBAAiB;YAAEE;QAAQ,IAAII;QAC7CI,gBAAcR;QACb,GAAGK,KAAK;;AAGZ;AAEA,SAASF,QAAQ,GAAG"}
|
|
@@ -1,12 +1,93 @@
|
|
|
1
|
-
import { jsx as _jsx } 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";
|
|
3
|
+
import { Label } from "./label.js";
|
|
2
4
|
import { Textarea } from "./textarea.js";
|
|
5
|
+
function TextareaWithLabel({ label = "Description", description = "This is a hint text to help user.", invalid = false, disabled = false, placeholder = "Enter a description...", focused = false }) {
|
|
6
|
+
const descriptionColor = invalid ? "text-text-error-primary" : disabled ? "text-text-disabled" : "text-text-secondary";
|
|
7
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
8
|
+
className: "flex w-full",
|
|
9
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
10
|
+
className: "space-y-2 w-full",
|
|
11
|
+
children: [
|
|
12
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
13
|
+
children: label
|
|
14
|
+
}),
|
|
15
|
+
/*#__PURE__*/ _jsx(Textarea, {
|
|
16
|
+
placeholder: placeholder,
|
|
17
|
+
invalid: invalid,
|
|
18
|
+
disabled: disabled,
|
|
19
|
+
autoFocus: focused
|
|
20
|
+
}),
|
|
21
|
+
/*#__PURE__*/ _jsx("p", {
|
|
22
|
+
className: `typo-body-xs ${descriptionColor}`,
|
|
23
|
+
children: description
|
|
24
|
+
})
|
|
25
|
+
]
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
}
|
|
3
29
|
const meta = {
|
|
4
|
-
title: "Component/Textarea"
|
|
30
|
+
title: "Component/Textarea",
|
|
31
|
+
component: Textarea,
|
|
32
|
+
parameters: {
|
|
33
|
+
docs: {
|
|
34
|
+
page: ()=>/*#__PURE__*/ _jsxs(_Fragment, {
|
|
35
|
+
children: [
|
|
36
|
+
/*#__PURE__*/ _jsx(Title, {}),
|
|
37
|
+
/*#__PURE__*/ _jsx(Primary, {}),
|
|
38
|
+
/*#__PURE__*/ _jsx(Controls, {})
|
|
39
|
+
]
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
argTypes: {
|
|
44
|
+
placeholder: {
|
|
45
|
+
control: "text"
|
|
46
|
+
},
|
|
47
|
+
invalid: {
|
|
48
|
+
control: "boolean"
|
|
49
|
+
},
|
|
50
|
+
disabled: {
|
|
51
|
+
control: "boolean"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
args: {
|
|
55
|
+
placeholder: "Enter a description...",
|
|
56
|
+
invalid: false,
|
|
57
|
+
disabled: false
|
|
58
|
+
}
|
|
5
59
|
};
|
|
6
60
|
export default meta;
|
|
61
|
+
export const Default = {
|
|
62
|
+
tags: [
|
|
63
|
+
"!dev"
|
|
64
|
+
],
|
|
65
|
+
render: (args)=>/*#__PURE__*/ _jsx(Textarea, {
|
|
66
|
+
...args
|
|
67
|
+
})
|
|
68
|
+
};
|
|
7
69
|
export const Demo = {
|
|
8
|
-
|
|
9
|
-
|
|
70
|
+
tags: [
|
|
71
|
+
"!autodocs"
|
|
72
|
+
],
|
|
73
|
+
render: ()=>/*#__PURE__*/ _jsxs("div", {
|
|
74
|
+
className: "p-6 space-y-6",
|
|
75
|
+
children: [
|
|
76
|
+
/*#__PURE__*/ _jsx(TextareaWithLabel, {}),
|
|
77
|
+
/*#__PURE__*/ _jsx(TextareaWithLabel, {
|
|
78
|
+
focused: true
|
|
79
|
+
}),
|
|
80
|
+
/*#__PURE__*/ _jsx(TextareaWithLabel, {
|
|
81
|
+
disabled: true
|
|
82
|
+
}),
|
|
83
|
+
/*#__PURE__*/ _jsx(TextareaWithLabel, {
|
|
84
|
+
invalid: true
|
|
85
|
+
}),
|
|
86
|
+
/*#__PURE__*/ _jsx(TextareaWithLabel, {
|
|
87
|
+
invalid: true,
|
|
88
|
+
focused: true
|
|
89
|
+
})
|
|
90
|
+
]
|
|
10
91
|
})
|
|
11
92
|
};
|
|
12
93
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/shadcn/components/ui/textarea.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react-vite\";\nimport { Textarea } from \"#shadcn/components/ui/textarea\";\n\nconst meta = {\n\ttitle: \"Component/Textarea\",\n} satisfies Meta
|
|
1
|
+
{"version":3,"sources":["../../../../../src/shadcn/components/ui/textarea.stories.tsx"],"sourcesContent":["import { Controls, Primary, Title } from \"@storybook/addon-docs/blocks\";\nimport type { Meta, StoryObj } from \"@storybook/react-vite\";\nimport { Label } from \"#shadcn/components/ui/label\";\nimport { Textarea } from \"#shadcn/components/ui/textarea\";\n\ninterface TextareaWithLabelProps {\n\tlabel?: string;\n\tdescription?: string;\n\tinvalid?: boolean;\n\tdisabled?: boolean;\n\tplaceholder?: string;\n\tfocused?: boolean;\n}\n\nfunction TextareaWithLabel({\n\tlabel = \"Description\",\n\tdescription = \"This is a hint text to help user.\",\n\tinvalid = false,\n\tdisabled = false,\n\tplaceholder = \"Enter a description...\",\n\tfocused = false,\n}: TextareaWithLabelProps) {\n\tconst descriptionColor = invalid\n\t\t? \"text-text-error-primary\"\n\t\t: disabled\n\t\t\t? \"text-text-disabled\"\n\t\t\t: \"text-text-secondary\";\n\n\treturn (\n\t\t<div className=\"flex w-full\">\n\t\t\t<div className=\"space-y-2 w-full\">\n\t\t\t\t<Label>{label}</Label>\n\t\t\t\t<Textarea\n\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\tinvalid={invalid}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tautoFocus={focused}\n\t\t\t\t/>\n\t\t\t\t<p className={`typo-body-xs ${descriptionColor}`}>{description}</p>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nconst meta = {\n\ttitle: \"Component/Textarea\",\n\tcomponent: Textarea,\n\tparameters: {\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<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\tplaceholder: {\n\t\t\tcontrol: \"text\",\n\t\t},\n\t\tinvalid: {\n\t\t\tcontrol: \"boolean\",\n\t\t},\n\t\tdisabled: {\n\t\t\tcontrol: \"boolean\",\n\t\t},\n\t},\n\targs: {\n\t\tplaceholder: \"Enter a description...\",\n\t\tinvalid: false,\n\t\tdisabled: false,\n\t},\n} satisfies Meta<typeof Textarea>;\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Default = {\n\ttags: [\"!dev\"],\n\trender: (args) => <Textarea {...args} />,\n} satisfies Story;\n\nexport const Demo = {\n\ttags: [\"!autodocs\"],\n\trender: () => (\n\t\t<div className=\"p-6 space-y-6\">\n\t\t\t{/* Default */}\n\t\t\t<TextareaWithLabel />\n\n\t\t\t{/* Focused */}\n\t\t\t<TextareaWithLabel focused />\n\n\t\t\t{/* Disabled */}\n\t\t\t<TextareaWithLabel disabled />\n\n\t\t\t{/* Error */}\n\t\t\t<TextareaWithLabel invalid />\n\n\t\t\t{/* Error + Focused */}\n\t\t\t<TextareaWithLabel invalid focused />\n\t\t</div>\n\t),\n} satisfies Story;\n"],"names":["Controls","Primary","Title","Label","Textarea","TextareaWithLabel","label","description","invalid","disabled","placeholder","focused","descriptionColor","div","className","autoFocus","p","meta","title","component","parameters","docs","page","argTypes","control","args","Default","tags","render","Demo"],"mappings":";AAAA,SAASA,QAAQ,EAAEC,OAAO,EAAEC,KAAK,QAAQ,+BAA+B;AAExE,SAASC,KAAK,QAAQ,aAA8B;AACpD,SAASC,QAAQ,QAAQ,gBAAiC;AAW1D,SAASC,kBAAkB,EAC1BC,QAAQ,aAAa,EACrBC,cAAc,mCAAmC,EACjDC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,cAAc,wBAAwB,EACtCC,UAAU,KAAK,EACS;IACxB,MAAMC,mBAAmBJ,UACtB,4BACAC,WACC,uBACA;IAEJ,qBACC,KAACI;QAAIC,WAAU;kBACd,cAAA,MAACD;YAAIC,WAAU;;8BACd,KAACX;8BAAOG;;8BACR,KAACF;oBACAM,aAAaA;oBACbF,SAASA;oBACTC,UAAUA;oBACVM,WAAWJ;;8BAEZ,KAACK;oBAAEF,WAAW,CAAC,aAAa,EAAEF,kBAAkB;8BAAGL;;;;;AAIvD;AAEA,MAAMU,OAAO;IACZC,OAAO;IACPC,WAAWf;IACXgB,YAAY;QACXC,MAAM;YACLC,MAAM,kBACL;;sCACC,KAACpB;sCACD,KAACD;sCACD,KAACD;;;QAGJ;IACD;IACAuB,UAAU;QACTb,aAAa;YACZc,SAAS;QACV;QACAhB,SAAS;YACRgB,SAAS;QACV;QACAf,UAAU;YACTe,SAAS;QACV;IACD;IACAC,MAAM;QACLf,aAAa;QACbF,SAAS;QACTC,UAAU;IACX;AACD;AACA,eAAeQ,KAAK;AAIpB,OAAO,MAAMS,UAAU;IACtBC,MAAM;QAAC;KAAO;IACdC,QAAQ,CAACH,qBAAS,KAACrB;YAAU,GAAGqB,IAAI;;AACrC,EAAkB;AAElB,OAAO,MAAMI,OAAO;IACnBF,MAAM;QAAC;KAAY;IACnBC,QAAQ,kBACP,MAACf;YAAIC,WAAU;;8BAEd,KAACT;8BAGD,KAACA;oBAAkBM,OAAO;;8BAG1B,KAACN;oBAAkBI,QAAQ;;8BAG3B,KAACJ;oBAAkBG,OAAO;;8BAG1B,KAACH;oBAAkBG,OAAO;oBAACG,OAAO;;;;AAGrC,EAAkB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
2
2
|
import type { VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { toggleVariants } from "
|
|
5
|
-
declare function ToggleGroup({ className, variant,
|
|
6
|
-
declare function ToggleGroupItem({ className, children, variant,
|
|
4
|
+
import { toggleVariants } from "../../components/ui/toggle";
|
|
5
|
+
declare function ToggleGroup({ className, variant, children, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function ToggleGroupItem({ className, children, variant, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export { ToggleGroup, ToggleGroupItem };
|
|
8
8
|
//# sourceMappingURL=toggle-group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/toggle-group.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/toggle-group.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAuC9D,iBAAS,WAAW,CAAC,EACpB,SAAS,EACT,OAAO,EACP,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GACxD,YAAY,CAAC,OAAO,cAAc,CAAC,2CAanC;AAED,iBAAS,eAAe,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GACxD,YAAY,CAAC,OAAO,cAAc,CAAC,2CAmBnC;AAED,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,38 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import { toggleVariants } from "./toggle.js";
|
|
5
6
|
import { cn } from "../../lib/utils.js";
|
|
7
|
+
// Toggle group styles
|
|
8
|
+
const toggleGroupStyles = cn("group/toggle-group", "flex", "w-fit", "items-center", "rounded-md", "bg-bg-primary", "border", "border-border-primary");
|
|
9
|
+
// Toggle group item styles
|
|
10
|
+
const toggleGroupItemStyles = cn("min-w-0", "flex-1", "shrink-0", "rounded-none", "shadow-none", "first:rounded-l-md", "last:rounded-r-md", "focus:z-10", "focus-visible:z-10", // Убираем все границы у элементов внутри группы
|
|
11
|
+
"data-[variant=outline]:border-0", // Добавляем правую границу как разделитель (кроме последнего элемента)
|
|
12
|
+
"data-[variant=outline]:[&:not(:last-child)]:border-r", "data-[variant=outline]:[&:not(:last-child)]:border-r-border-primary");
|
|
6
13
|
const ToggleGroupContext = /*#__PURE__*/ React.createContext({
|
|
7
|
-
|
|
8
|
-
variant: "default"
|
|
14
|
+
variant: "filled"
|
|
9
15
|
});
|
|
10
|
-
function ToggleGroup({ className, variant,
|
|
16
|
+
function ToggleGroup({ className, variant, children, ...props }) {
|
|
11
17
|
return /*#__PURE__*/ _jsx(ToggleGroupPrimitive.Root, {
|
|
12
18
|
"data-slot": "toggle-group",
|
|
13
19
|
"data-variant": variant,
|
|
14
|
-
|
|
15
|
-
className: cn("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs", className),
|
|
20
|
+
className: cn(toggleGroupStyles, className),
|
|
16
21
|
...props,
|
|
17
22
|
children: /*#__PURE__*/ _jsx(ToggleGroupContext.Provider, {
|
|
18
23
|
value: {
|
|
19
|
-
variant
|
|
20
|
-
size
|
|
24
|
+
variant
|
|
21
25
|
},
|
|
22
26
|
children: children
|
|
23
27
|
})
|
|
24
28
|
});
|
|
25
29
|
}
|
|
26
|
-
function ToggleGroupItem({ className, children, variant,
|
|
30
|
+
function ToggleGroupItem({ className, children, variant, ...props }) {
|
|
27
31
|
const context = React.useContext(ToggleGroupContext);
|
|
28
32
|
return /*#__PURE__*/ _jsx(ToggleGroupPrimitive.Item, {
|
|
29
33
|
"data-slot": "toggle-group-item",
|
|
30
34
|
"data-variant": context.variant || variant,
|
|
31
|
-
"data-size": context.size || size,
|
|
32
35
|
className: cn(toggleVariants({
|
|
33
|
-
variant: context.variant || variant
|
|
34
|
-
|
|
35
|
-
}), "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l", className),
|
|
36
|
+
variant: context.variant || variant
|
|
37
|
+
}), toggleGroupItemStyles, className),
|
|
36
38
|
...props,
|
|
37
39
|
children: children
|
|
38
40
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/shadcn/components/ui/toggle-group.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../../../src/shadcn/components/ui/toggle-group.tsx"],"sourcesContent":["\"use client\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport type { VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { toggleVariants } from \"#shadcn/components/ui/toggle\";\nimport { cn } from \"#shadcn/lib/utils\";\n\n// Toggle group styles\nconst toggleGroupStyles = cn(\n\t\"group/toggle-group\",\n\t\"flex\",\n\t\"w-fit\",\n\t\"items-center\",\n\t\"rounded-md\",\n\t\"bg-bg-primary\",\n\t\"border\",\n\t\"border-border-primary\",\n);\n\n// Toggle group item styles\nconst toggleGroupItemStyles = cn(\n\t\"min-w-0\",\n\t\"flex-1\",\n\t\"shrink-0\",\n\t\"rounded-none\",\n\t\"shadow-none\",\n\t\"first:rounded-l-md\",\n\t\"last:rounded-r-md\",\n\t\"focus:z-10\",\n\t\"focus-visible:z-10\",\n\t// Убираем все границы у элементов внутри группы\n\t\"data-[variant=outline]:border-0\",\n\t// Добавляем правую границу как разделитель (кроме последнего элемента)\n\t\"data-[variant=outline]:[&:not(:last-child)]:border-r\",\n\t\"data-[variant=outline]:[&:not(:last-child)]:border-r-border-primary\",\n);\n\nconst ToggleGroupContext = React.createContext<\n\tVariantProps<typeof toggleVariants>\n>({\n\tvariant: \"filled\",\n});\n\nfunction ToggleGroup({\n\tclassName,\n\tvariant,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &\n\tVariantProps<typeof toggleVariants>) {\n\treturn (\n\t\t<ToggleGroupPrimitive.Root\n\t\t\tdata-slot=\"toggle-group\"\n\t\t\tdata-variant={variant}\n\t\t\tclassName={cn(toggleGroupStyles, className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ToggleGroupContext.Provider value={{ variant }}>\n\t\t\t\t{children}\n\t\t\t</ToggleGroupContext.Provider>\n\t\t</ToggleGroupPrimitive.Root>\n\t);\n}\n\nfunction ToggleGroupItem({\n\tclassName,\n\tchildren,\n\tvariant,\n\t...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Item> &\n\tVariantProps<typeof toggleVariants>) {\n\tconst context = React.useContext(ToggleGroupContext);\n\n\treturn (\n\t\t<ToggleGroupPrimitive.Item\n\t\t\tdata-slot=\"toggle-group-item\"\n\t\t\tdata-variant={context.variant || variant}\n\t\t\tclassName={cn(\n\t\t\t\ttoggleVariants({\n\t\t\t\t\tvariant: context.variant || variant,\n\t\t\t\t}),\n\t\t\t\ttoggleGroupItemStyles,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</ToggleGroupPrimitive.Item>\n\t);\n}\n\nexport { ToggleGroup, ToggleGroupItem };\n"],"names":["ToggleGroupPrimitive","React","toggleVariants","cn","toggleGroupStyles","toggleGroupItemStyles","ToggleGroupContext","createContext","variant","ToggleGroup","className","children","props","Root","data-slot","data-variant","Provider","value","ToggleGroupItem","context","useContext","Item"],"mappings":"AAAA;;AACA,YAAYA,0BAA0B,+BAA+B;AAErE,YAAYC,WAAW,QAAQ;AAC/B,SAASC,cAAc,QAAQ,cAA+B;AAC9D,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,sBAAsB;AACtB,MAAMC,oBAAoBD,GACzB,sBACA,QACA,SACA,gBACA,cACA,iBACA,UACA;AAGD,2BAA2B;AAC3B,MAAME,wBAAwBF,GAC7B,WACA,UACA,YACA,gBACA,eACA,sBACA,qBACA,cACA,sBACA,gDAAgD;AAChD,mCACA,uEAAuE;AACvE,wDACA;AAGD,MAAMG,mCAAqBL,MAAMM,aAAa,CAE5C;IACDC,SAAS;AACV;AAEA,SAASC,YAAY,EACpBC,SAAS,EACTF,OAAO,EACPG,QAAQ,EACR,GAAGC,OAEgC;IACnC,qBACC,KAACZ,qBAAqBa,IAAI;QACzBC,aAAU;QACVC,gBAAcP;QACdE,WAAWP,GAAGC,mBAAmBM;QAChC,GAAGE,KAAK;kBAET,cAAA,KAACN,mBAAmBU,QAAQ;YAACC,OAAO;gBAAET;YAAQ;sBAC5CG;;;AAIL;AAEA,SAASO,gBAAgB,EACxBR,SAAS,EACTC,QAAQ,EACRH,OAAO,EACP,GAAGI,OAEgC;IACnC,MAAMO,UAAUlB,MAAMmB,UAAU,CAACd;IAEjC,qBACC,KAACN,qBAAqBqB,IAAI;QACzBP,aAAU;QACVC,gBAAcI,QAAQX,OAAO,IAAIA;QACjCE,WAAWP,GACVD,eAAe;YACdM,SAASW,QAAQX,OAAO,IAAIA;QAC7B,IACAH,uBACAK;QAEA,GAAGE,KAAK;kBAERD;;AAGJ;AAEA,SAASF,WAAW,EAAES,eAAe,GAAG"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
|
-
import
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
declare const toggleVariants: (props?: ({
|
|
5
|
-
variant?: "outline" | "
|
|
6
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
5
|
+
variant?: "outline" | "filled" | null | undefined;
|
|
7
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
-
declare function Toggle({ className, variant,
|
|
7
|
+
declare function Toggle({ className, variant, children, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export { Toggle, toggleVariants };
|
|
10
9
|
//# sourceMappingURL=toggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA8C/B,QAAA,MAAM,cAAc;;8EAalB,CAAC;AA+BH,iBAAS,MAAM,CAAC,EACf,SAAS,EACT,OAAO,EACP,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GACnD,YAAY,CAAC,OAAO,cAAc,CAAC,2CAiBnC;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,33 +1,61 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
|
+
import * as React from "react";
|
|
4
5
|
import { cn } from "../../lib/utils.js";
|
|
5
|
-
|
|
6
|
+
// Base toggle styles
|
|
7
|
+
const baseToggleStyles = cn(// Layout
|
|
8
|
+
"inline-flex", "items-center", "justify-center", "gap-2", "whitespace-nowrap", // Shape
|
|
9
|
+
"rounded", "h-6", "px-2", "border", "border-transparent", // Typography
|
|
10
|
+
"typo-body", // Colors
|
|
11
|
+
"bg-bg-primary", "text-text-secondary", // Interaction
|
|
12
|
+
"outline-none", "transition-colors", "cursor-pointer", // Hover
|
|
13
|
+
"hover:bg-bg-secondary", // SVG icons
|
|
14
|
+
"[&_svg]:pointer-events-none", "[&_svg:not([class*='size-'])]:size-4", "[&_svg]:shrink-0", "[&_svg]:text-text-secondary", "data-[state=on]:[&_svg]:text-text-primary", // Disabled
|
|
15
|
+
"disabled:pointer-events-none", "disabled:opacity-50", // Focus
|
|
16
|
+
"focus-visible:ring-2", "focus-visible:ring-utility-blue/70", // Invalid
|
|
17
|
+
"aria-invalid:ring-2", "aria-invalid:ring-utility-red/70");
|
|
18
|
+
const toggleVariants = cva(baseToggleStyles, {
|
|
6
19
|
variants: {
|
|
7
20
|
variant: {
|
|
8
|
-
|
|
9
|
-
outline: "border
|
|
10
|
-
},
|
|
11
|
-
size: {
|
|
12
|
-
default: "h-9 px-2 min-w-9",
|
|
13
|
-
sm: "h-8 px-1.5 min-w-8",
|
|
14
|
-
lg: "h-10 px-2.5 min-w-10"
|
|
21
|
+
filled: cn("data-[state=on]:bg-bg-tertiary"),
|
|
22
|
+
outline: cn("data-[state=on]:border-border-separator", "data-[state=on]:bg-bg-secondary")
|
|
15
23
|
}
|
|
16
24
|
},
|
|
17
25
|
defaultVariants: {
|
|
18
|
-
variant: "
|
|
19
|
-
size: "default"
|
|
26
|
+
variant: "filled"
|
|
20
27
|
}
|
|
21
28
|
});
|
|
22
|
-
|
|
29
|
+
// Рекурсивно проверяем наличие текста в children
|
|
30
|
+
function hasTextContent(children) {
|
|
31
|
+
const childArray = React.Children.toArray(children);
|
|
32
|
+
for (const child of childArray){
|
|
33
|
+
// Проверяем строки и числа
|
|
34
|
+
if (typeof child === "string" || typeof child === "number") {
|
|
35
|
+
// Игнорируем пустые строки и пробелы
|
|
36
|
+
if (String(child).trim()) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
// Проверяем React элементы (включая фрагменты)
|
|
41
|
+
if (/*#__PURE__*/ React.isValidElement(child) && child.props && typeof child.props === "object" && "children" in child.props) {
|
|
42
|
+
if (hasTextContent(child.props.children)) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
function Toggle({ className, variant, children, ...props }) {
|
|
50
|
+
// Автоматически определяем, есть ли текст помимо иконки
|
|
51
|
+
const hasText = hasTextContent(children);
|
|
23
52
|
return /*#__PURE__*/ _jsx(TogglePrimitive.Root, {
|
|
24
53
|
"data-slot": "toggle",
|
|
25
54
|
className: cn(toggleVariants({
|
|
26
|
-
variant
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
...props
|
|
55
|
+
variant
|
|
56
|
+
}), !hasText && "w-6 p-1", className),
|
|
57
|
+
...props,
|
|
58
|
+
children: children
|
|
31
59
|
});
|
|
32
60
|
}
|
|
33
61
|
export { Toggle, toggleVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/shadcn/components/ui/toggle.tsx"],"sourcesContent":["import * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport
|
|
1
|
+
{"version":3,"sources":["../../../../../src/shadcn/components/ui/toggle.tsx"],"sourcesContent":["import * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"#shadcn/lib/utils\";\n\n// Base toggle styles\nconst baseToggleStyles = cn(\n\t// Layout\n\t\"inline-flex\",\n\t\"items-center\",\n\t\"justify-center\",\n\t\"gap-2\",\n\t\"whitespace-nowrap\",\n\t// Shape\n\t\"rounded\",\n\t\"h-6\",\n\t\"px-2\",\n\t\"border\",\n\t\"border-transparent\",\n\t// Typography\n\t\"typo-body\",\n\t// Colors\n\t\"bg-bg-primary\",\n\t\"text-text-secondary\",\n\t// Interaction\n\t\"outline-none\",\n\t\"transition-colors\",\n\t\"cursor-pointer\",\n\t// Hover\n\t\"hover:bg-bg-secondary\",\n\t// SVG icons\n\t\"[&_svg]:pointer-events-none\",\n\t\"[&_svg:not([class*='size-'])]:size-4\",\n\t\"[&_svg]:shrink-0\",\n\t\"[&_svg]:text-text-secondary\",\n\t\"data-[state=on]:[&_svg]:text-text-primary\",\n\t// Disabled\n\t\"disabled:pointer-events-none\",\n\t\"disabled:opacity-50\",\n\t// Focus\n\t\"focus-visible:ring-2\",\n\t\"focus-visible:ring-utility-blue/70\",\n\t// Invalid\n\t\"aria-invalid:ring-2\",\n\t\"aria-invalid:ring-utility-red/70\",\n);\n\nconst toggleVariants = cva(baseToggleStyles, {\n\tvariants: {\n\t\tvariant: {\n\t\t\tfilled: cn(\"data-[state=on]:bg-bg-tertiary\"),\n\t\t\toutline: cn(\n\t\t\t\t\"data-[state=on]:border-border-separator\",\n\t\t\t\t\"data-[state=on]:bg-bg-secondary\",\n\t\t\t),\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"filled\",\n\t},\n});\n\n// Рекурсивно проверяем наличие текста в children\nfunction hasTextContent(children: React.ReactNode): boolean {\n\tconst childArray = React.Children.toArray(children);\n\n\tfor (const child of childArray) {\n\t\t// Проверяем строки и числа\n\t\tif (typeof child === \"string\" || typeof child === \"number\") {\n\t\t\t// Игнорируем пустые строки и пробелы\n\t\t\tif (String(child).trim()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Проверяем React элементы (включая фрагменты)\n\t\tif (\n\t\t\tReact.isValidElement(child) &&\n\t\t\tchild.props &&\n\t\t\ttypeof child.props === \"object\" &&\n\t\t\t\"children\" in child.props\n\t\t) {\n\t\t\tif (hasTextContent(child.props.children as React.ReactNode)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n}\n\nfunction Toggle({\n\tclassName,\n\tvariant,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof TogglePrimitive.Root> &\n\tVariantProps<typeof toggleVariants>) {\n\t// Автоматически определяем, есть ли текст помимо иконки\n\tconst hasText = hasTextContent(children);\n\n\treturn (\n\t\t<TogglePrimitive.Root\n\t\t\tdata-slot=\"toggle\"\n\t\t\tclassName={cn(\n\t\t\t\ttoggleVariants({ variant }),\n\t\t\t\t!hasText && \"w-6 p-1\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</TogglePrimitive.Root>\n\t);\n}\n\nexport { Toggle, toggleVariants };\n"],"names":["TogglePrimitive","cva","React","cn","baseToggleStyles","toggleVariants","variants","variant","filled","outline","defaultVariants","hasTextContent","children","childArray","Children","toArray","child","String","trim","isValidElement","props","Toggle","className","hasText","Root","data-slot"],"mappings":";AAAA,YAAYA,qBAAqB,yBAAyB;AAC1D,SAASC,GAAG,QAA2B,2BAA2B;AAClE,YAAYC,WAAW,QAAQ;AAE/B,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,qBAAqB;AACrB,MAAMC,mBAAmBD,GACxB,SAAS;AACT,eACA,gBACA,kBACA,SACA,qBACA,QAAQ;AACR,WACA,OACA,QACA,UACA,sBACA,aAAa;AACb,aACA,SAAS;AACT,iBACA,uBACA,cAAc;AACd,gBACA,qBACA,kBACA,QAAQ;AACR,yBACA,YAAY;AACZ,+BACA,wCACA,oBACA,+BACA,6CACA,WAAW;AACX,gCACA,uBACA,QAAQ;AACR,wBACA,sCACA,UAAU;AACV,uBACA;AAGD,MAAME,iBAAiBJ,IAAIG,kBAAkB;IAC5CE,UAAU;QACTC,SAAS;YACRC,QAAQL,GAAG;YACXM,SAASN,GACR,2CACA;QAEF;IACD;IACAO,iBAAiB;QAChBH,SAAS;IACV;AACD;AAEA,iDAAiD;AACjD,SAASI,eAAeC,QAAyB;IAChD,MAAMC,aAAaX,MAAMY,QAAQ,CAACC,OAAO,CAACH;IAE1C,KAAK,MAAMI,SAASH,WAAY;QAC/B,2BAA2B;QAC3B,IAAI,OAAOG,UAAU,YAAY,OAAOA,UAAU,UAAU;YAC3D,qCAAqC;YACrC,IAAIC,OAAOD,OAAOE,IAAI,IAAI;gBACzB,OAAO;YACR;QACD;QAEA,+CAA+C;QAC/C,kBACChB,MAAMiB,cAAc,CAACH,UACrBA,MAAMI,KAAK,IACX,OAAOJ,MAAMI,KAAK,KAAK,YACvB,cAAcJ,MAAMI,KAAK,EACxB;YACD,IAAIT,eAAeK,MAAMI,KAAK,CAACR,QAAQ,GAAsB;gBAC5D,OAAO;YACR;QACD;IACD;IAEA,OAAO;AACR;AAEA,SAASS,OAAO,EACfC,SAAS,EACTf,OAAO,EACPK,QAAQ,EACR,GAAGQ,OAEgC;IACnC,wDAAwD;IACxD,MAAMG,UAAUZ,eAAeC;IAE/B,qBACC,KAACZ,gBAAgBwB,IAAI;QACpBC,aAAU;QACVH,WAAWnB,GACVE,eAAe;YAAEE;QAAQ,IACzB,CAACgB,WAAW,WACZD;QAEA,GAAGF,KAAK;kBAERR;;AAGJ;AAEA,SAASS,MAAM,EAAEhB,cAAc,GAAG"}
|