@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,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import type * as LabelPrimitive from "@radix-ui/react-label";
|
|
2
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
4
|
import * as React from "react";
|
|
@@ -13,6 +14,18 @@ import {
|
|
|
13
14
|
import { Label } from "#shadcn/components/ui/label";
|
|
14
15
|
import { cn } from "#shadcn/lib/utils";
|
|
15
16
|
|
|
17
|
+
// Form item styles
|
|
18
|
+
const formItemStyles = cn("grid", "gap-2");
|
|
19
|
+
|
|
20
|
+
// Form label error styles
|
|
21
|
+
const formLabelErrorStyles = cn("data-[error=true]:text-text-error-primary");
|
|
22
|
+
|
|
23
|
+
// Form description styles
|
|
24
|
+
const formDescriptionStyles = cn("text-text-secondary", "text-sm");
|
|
25
|
+
|
|
26
|
+
// Form message styles
|
|
27
|
+
const formMessageStyles = cn("text-text-error-primary", "text-sm");
|
|
28
|
+
|
|
16
29
|
const Form = FormProvider;
|
|
17
30
|
|
|
18
31
|
type FormFieldContextValue<
|
|
@@ -26,20 +39,18 @@ const FormFieldContext = React.createContext<FormFieldContextValue>(
|
|
|
26
39
|
{} as FormFieldContextValue,
|
|
27
40
|
);
|
|
28
41
|
|
|
29
|
-
|
|
42
|
+
function FormField<
|
|
30
43
|
TFieldValues extends FieldValues = FieldValues,
|
|
31
44
|
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
32
|
-
>({
|
|
33
|
-
...props
|
|
34
|
-
}: ControllerProps<TFieldValues, TName>) => {
|
|
45
|
+
>({ ...props }: ControllerProps<TFieldValues, TName>) {
|
|
35
46
|
return (
|
|
36
47
|
<FormFieldContext.Provider value={{ name: props.name }}>
|
|
37
48
|
<Controller {...props} />
|
|
38
49
|
</FormFieldContext.Provider>
|
|
39
50
|
);
|
|
40
|
-
}
|
|
51
|
+
}
|
|
41
52
|
|
|
42
|
-
|
|
53
|
+
function useFormField() {
|
|
43
54
|
const fieldContext = React.useContext(FormFieldContext);
|
|
44
55
|
const itemContext = React.useContext(FormItemContext);
|
|
45
56
|
const { getFieldState } = useFormContext();
|
|
@@ -60,7 +71,7 @@ const useFormField = () => {
|
|
|
60
71
|
formMessageId: `${id}-form-item-message`,
|
|
61
72
|
...fieldState,
|
|
62
73
|
};
|
|
63
|
-
}
|
|
74
|
+
}
|
|
64
75
|
|
|
65
76
|
type FormItemContextValue = {
|
|
66
77
|
id: string;
|
|
@@ -77,7 +88,7 @@ function FormItem({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
77
88
|
<FormItemContext.Provider value={{ id }}>
|
|
78
89
|
<div
|
|
79
90
|
data-slot="form-item"
|
|
80
|
-
className={cn(
|
|
91
|
+
className={cn(formItemStyles, className)}
|
|
81
92
|
{...props}
|
|
82
93
|
/>
|
|
83
94
|
</FormItemContext.Provider>
|
|
@@ -94,7 +105,7 @@ function FormLabel({
|
|
|
94
105
|
<Label
|
|
95
106
|
data-slot="form-label"
|
|
96
107
|
data-error={!!error}
|
|
97
|
-
className={cn(
|
|
108
|
+
className={cn(formLabelErrorStyles, className)}
|
|
98
109
|
htmlFor={formItemId}
|
|
99
110
|
{...props}
|
|
100
111
|
/>
|
|
@@ -127,7 +138,7 @@ function FormDescription({ className, ...props }: React.ComponentProps<"p">) {
|
|
|
127
138
|
<p
|
|
128
139
|
data-slot="form-description"
|
|
129
140
|
id={formDescriptionId}
|
|
130
|
-
className={cn(
|
|
141
|
+
className={cn(formDescriptionStyles, className)}
|
|
131
142
|
{...props}
|
|
132
143
|
/>
|
|
133
144
|
);
|
|
@@ -145,7 +156,7 @@ function FormMessage({ className, ...props }: React.ComponentProps<"p">) {
|
|
|
145
156
|
<p
|
|
146
157
|
data-slot="form-message"
|
|
147
158
|
id={formMessageId}
|
|
148
|
-
className={cn(
|
|
159
|
+
className={cn(formMessageStyles, className)}
|
|
149
160
|
{...props}
|
|
150
161
|
>
|
|
151
162
|
{body}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
2
3
|
import type * as React from "react";
|
|
3
4
|
|
|
@@ -30,7 +31,7 @@ function HoverCardContent({
|
|
|
30
31
|
align={align}
|
|
31
32
|
sideOffset={sideOffset}
|
|
32
33
|
className={cn(
|
|
33
|
-
"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-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow
|
|
34
|
+
"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-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 dropdown-menu-shadow outline-hidden",
|
|
34
35
|
className,
|
|
35
36
|
)}
|
|
36
37
|
{...props}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { Controls, Primary, Title } from "@storybook/addon-docs/blocks";
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
3
|
import { CircleX, Copy, Mail } from "lucide-react";
|
|
3
4
|
import { Badge } from "#shadcn/components/ui/badge";
|
|
4
5
|
import { Input } from "#shadcn/components/ui/input";
|
|
5
6
|
import { Label } from "#shadcn/components/ui/label";
|
|
7
|
+
import { IconButton } from "../../../components/icon-button";
|
|
6
8
|
|
|
7
9
|
interface InputWithLabelProps {
|
|
8
10
|
label?: string;
|
|
@@ -43,7 +45,7 @@ function InputWithLabel({
|
|
|
43
45
|
invalid={invalid}
|
|
44
46
|
disabled={disabled}
|
|
45
47
|
/>
|
|
46
|
-
<p className={`typo-body ${descriptionColor}`}>{description}</p>
|
|
48
|
+
<p className={`typo-body-xs ${descriptionColor}`}>{description}</p>
|
|
47
49
|
</div>
|
|
48
50
|
</div>
|
|
49
51
|
);
|
|
@@ -52,21 +54,72 @@ function InputWithLabel({
|
|
|
52
54
|
const meta = {
|
|
53
55
|
title: "Component/Input",
|
|
54
56
|
component: Input,
|
|
57
|
+
parameters: {
|
|
58
|
+
docs: {
|
|
59
|
+
page: () => (
|
|
60
|
+
<>
|
|
61
|
+
<Title />
|
|
62
|
+
<Primary />
|
|
63
|
+
<Controls />
|
|
64
|
+
</>
|
|
65
|
+
),
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
argTypes: {
|
|
69
|
+
type: {
|
|
70
|
+
control: "select",
|
|
71
|
+
options: ["text", "password"],
|
|
72
|
+
},
|
|
73
|
+
placeholder: {
|
|
74
|
+
control: "text",
|
|
75
|
+
},
|
|
76
|
+
invalid: {
|
|
77
|
+
control: "boolean",
|
|
78
|
+
},
|
|
79
|
+
disabled: {
|
|
80
|
+
control: "boolean",
|
|
81
|
+
},
|
|
82
|
+
hasPrefix: {
|
|
83
|
+
control: "boolean",
|
|
84
|
+
name: "hasPrefix",
|
|
85
|
+
},
|
|
86
|
+
hasSuffix: {
|
|
87
|
+
control: "boolean",
|
|
88
|
+
name: "hasSuffix",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
args: {
|
|
92
|
+
type: "text",
|
|
93
|
+
placeholder: "Placeholder",
|
|
94
|
+
invalid: false,
|
|
95
|
+
disabled: false,
|
|
96
|
+
hasPrefix: false,
|
|
97
|
+
hasSuffix: false,
|
|
98
|
+
},
|
|
55
99
|
} satisfies Meta<typeof Input>;
|
|
56
100
|
export default meta;
|
|
57
101
|
|
|
58
102
|
type Story = StoryObj<typeof meta>;
|
|
59
103
|
|
|
60
104
|
export const Default = {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
105
|
+
tags: ["!dev"],
|
|
106
|
+
render: (args) => {
|
|
107
|
+
const { hasPrefix, hasSuffix, ...rest } = args as typeof args & {
|
|
108
|
+
hasPrefix?: boolean;
|
|
109
|
+
hasSuffix?: boolean;
|
|
110
|
+
};
|
|
111
|
+
return (
|
|
112
|
+
<Input
|
|
113
|
+
{...rest}
|
|
114
|
+
{...(hasPrefix && { prefixValue: "https://" })}
|
|
115
|
+
{...(hasSuffix && { suffix: ".com" })}
|
|
116
|
+
/>
|
|
117
|
+
);
|
|
66
118
|
},
|
|
67
119
|
} satisfies Story;
|
|
68
120
|
|
|
69
121
|
export const Demo = {
|
|
122
|
+
tags: ["!autodocs"],
|
|
70
123
|
render: () => (
|
|
71
124
|
<div className="p-6 min-h-screen flex justify-center items-center">
|
|
72
125
|
<div className="rounded-lg p-6 shadow-sm w-280">
|
|
@@ -126,14 +179,26 @@ export const Demo = {
|
|
|
126
179
|
{variant === "right" && (
|
|
127
180
|
<Input
|
|
128
181
|
placeholder="Placeholder"
|
|
129
|
-
rightSlot={
|
|
182
|
+
rightSlot={
|
|
183
|
+
<IconButton
|
|
184
|
+
icon={<CircleX />}
|
|
185
|
+
aria-label="Clear"
|
|
186
|
+
variant="link"
|
|
187
|
+
/>
|
|
188
|
+
}
|
|
130
189
|
/>
|
|
131
190
|
)}
|
|
132
191
|
{variant === "both" && (
|
|
133
192
|
<Input
|
|
134
193
|
placeholder="Placeholder"
|
|
135
194
|
leftSlot={<Mail />}
|
|
136
|
-
rightSlot={
|
|
195
|
+
rightSlot={
|
|
196
|
+
<IconButton
|
|
197
|
+
icon={<CircleX />}
|
|
198
|
+
aria-label="Clear"
|
|
199
|
+
variant="link"
|
|
200
|
+
/>
|
|
201
|
+
}
|
|
137
202
|
/>
|
|
138
203
|
)}
|
|
139
204
|
{variant === "left-double-right" && (
|
|
@@ -142,10 +207,18 @@ export const Demo = {
|
|
|
142
207
|
className="pr-15"
|
|
143
208
|
leftSlot={<Mail />}
|
|
144
209
|
rightSlot={
|
|
145
|
-
|
|
146
|
-
<
|
|
147
|
-
|
|
148
|
-
|
|
210
|
+
<>
|
|
211
|
+
<IconButton
|
|
212
|
+
icon={<CircleX />}
|
|
213
|
+
aria-label="Clear"
|
|
214
|
+
variant="link"
|
|
215
|
+
/>
|
|
216
|
+
<IconButton
|
|
217
|
+
icon={<Copy />}
|
|
218
|
+
aria-label="Copy"
|
|
219
|
+
variant="link"
|
|
220
|
+
/>
|
|
221
|
+
</>
|
|
149
222
|
}
|
|
150
223
|
suffix="milliseconds"
|
|
151
224
|
/>
|
|
@@ -167,7 +240,13 @@ export const Demo = {
|
|
|
167
240
|
{variant === "right" && (
|
|
168
241
|
<Input
|
|
169
242
|
placeholder="Placeholder"
|
|
170
|
-
rightSlot={
|
|
243
|
+
rightSlot={
|
|
244
|
+
<IconButton
|
|
245
|
+
icon={<CircleX />}
|
|
246
|
+
aria-label="Clear"
|
|
247
|
+
variant="link"
|
|
248
|
+
/>
|
|
249
|
+
}
|
|
171
250
|
invalid
|
|
172
251
|
/>
|
|
173
252
|
)}
|
|
@@ -175,15 +254,35 @@ export const Demo = {
|
|
|
175
254
|
<Input
|
|
176
255
|
placeholder="Placeholder"
|
|
177
256
|
leftSlot={<Mail />}
|
|
178
|
-
rightSlot={
|
|
257
|
+
rightSlot={
|
|
258
|
+
<IconButton
|
|
259
|
+
icon={<CircleX />}
|
|
260
|
+
aria-label="Clear"
|
|
261
|
+
variant="link"
|
|
262
|
+
/>
|
|
263
|
+
}
|
|
179
264
|
invalid
|
|
180
265
|
/>
|
|
181
266
|
)}
|
|
182
267
|
{variant === "left-double-right" && (
|
|
183
268
|
<Input
|
|
184
269
|
placeholder="Placeholder"
|
|
270
|
+
className="pr-15"
|
|
185
271
|
leftSlot={<Mail />}
|
|
186
|
-
rightSlot={
|
|
272
|
+
rightSlot={
|
|
273
|
+
<>
|
|
274
|
+
<IconButton
|
|
275
|
+
icon={<CircleX />}
|
|
276
|
+
aria-label="Clear"
|
|
277
|
+
variant="link"
|
|
278
|
+
/>
|
|
279
|
+
<IconButton
|
|
280
|
+
icon={<Copy />}
|
|
281
|
+
aria-label="Copy"
|
|
282
|
+
variant="link"
|
|
283
|
+
/>
|
|
284
|
+
</>
|
|
285
|
+
}
|
|
187
286
|
suffix="milliseconds"
|
|
188
287
|
invalid
|
|
189
288
|
/>
|
|
@@ -205,7 +304,14 @@ export const Demo = {
|
|
|
205
304
|
{variant === "right" && (
|
|
206
305
|
<Input
|
|
207
306
|
placeholder="Aidbox"
|
|
208
|
-
rightSlot={
|
|
307
|
+
rightSlot={
|
|
308
|
+
<IconButton
|
|
309
|
+
icon={<CircleX />}
|
|
310
|
+
aria-label="Clear"
|
|
311
|
+
variant="link"
|
|
312
|
+
disabled
|
|
313
|
+
/>
|
|
314
|
+
}
|
|
209
315
|
disabled
|
|
210
316
|
/>
|
|
211
317
|
)}
|
|
@@ -213,15 +319,38 @@ export const Demo = {
|
|
|
213
319
|
<Input
|
|
214
320
|
placeholder="Aidbox"
|
|
215
321
|
leftSlot={<Mail />}
|
|
216
|
-
rightSlot={
|
|
322
|
+
rightSlot={
|
|
323
|
+
<IconButton
|
|
324
|
+
icon={<CircleX />}
|
|
325
|
+
aria-label="Clear"
|
|
326
|
+
variant="link"
|
|
327
|
+
disabled
|
|
328
|
+
/>
|
|
329
|
+
}
|
|
217
330
|
disabled
|
|
218
331
|
/>
|
|
219
332
|
)}
|
|
220
333
|
{variant === "left-double-right" && (
|
|
221
334
|
<Input
|
|
222
335
|
placeholder="Aidbox"
|
|
336
|
+
className="pr-15"
|
|
223
337
|
leftSlot={<Mail />}
|
|
224
|
-
rightSlot={
|
|
338
|
+
rightSlot={
|
|
339
|
+
<>
|
|
340
|
+
<IconButton
|
|
341
|
+
icon={<CircleX />}
|
|
342
|
+
aria-label="Clear"
|
|
343
|
+
variant="link"
|
|
344
|
+
disabled
|
|
345
|
+
/>
|
|
346
|
+
<IconButton
|
|
347
|
+
icon={<Copy />}
|
|
348
|
+
aria-label="Copy"
|
|
349
|
+
variant="link"
|
|
350
|
+
disabled
|
|
351
|
+
/>
|
|
352
|
+
</>
|
|
353
|
+
}
|
|
225
354
|
suffix="milliseconds"
|
|
226
355
|
disabled
|
|
227
356
|
/>
|
|
@@ -288,21 +417,46 @@ export const Demo = {
|
|
|
288
417
|
{variant === "right" && (
|
|
289
418
|
<InputWithLabel
|
|
290
419
|
placeholder="Placeholder"
|
|
291
|
-
rightSlot={
|
|
420
|
+
rightSlot={
|
|
421
|
+
<IconButton
|
|
422
|
+
icon={<CircleX />}
|
|
423
|
+
aria-label="Clear"
|
|
424
|
+
variant="link"
|
|
425
|
+
/>
|
|
426
|
+
}
|
|
292
427
|
/>
|
|
293
428
|
)}
|
|
294
429
|
{variant === "both" && (
|
|
295
430
|
<InputWithLabel
|
|
296
431
|
placeholder="Placeholder"
|
|
297
432
|
leftSlot={<Mail />}
|
|
298
|
-
rightSlot={
|
|
433
|
+
rightSlot={
|
|
434
|
+
<IconButton
|
|
435
|
+
icon={<CircleX />}
|
|
436
|
+
aria-label="Clear"
|
|
437
|
+
variant="link"
|
|
438
|
+
/>
|
|
439
|
+
}
|
|
299
440
|
/>
|
|
300
441
|
)}
|
|
301
442
|
{variant === "left-double-right" && (
|
|
302
443
|
<InputWithLabel
|
|
303
444
|
placeholder="Placeholder"
|
|
304
445
|
leftSlot={<Mail />}
|
|
305
|
-
rightSlot={
|
|
446
|
+
rightSlot={
|
|
447
|
+
<>
|
|
448
|
+
<IconButton
|
|
449
|
+
icon={<CircleX />}
|
|
450
|
+
aria-label="Clear"
|
|
451
|
+
variant="link"
|
|
452
|
+
/>
|
|
453
|
+
<IconButton
|
|
454
|
+
icon={<Copy />}
|
|
455
|
+
aria-label="Copy"
|
|
456
|
+
variant="link"
|
|
457
|
+
/>
|
|
458
|
+
</>
|
|
459
|
+
}
|
|
306
460
|
suffix="milliseconds"
|
|
307
461
|
/>
|
|
308
462
|
)}
|
|
@@ -323,7 +477,13 @@ export const Demo = {
|
|
|
323
477
|
{variant === "right" && (
|
|
324
478
|
<InputWithLabel
|
|
325
479
|
placeholder="Placeholder"
|
|
326
|
-
rightSlot={
|
|
480
|
+
rightSlot={
|
|
481
|
+
<IconButton
|
|
482
|
+
icon={<CircleX />}
|
|
483
|
+
aria-label="Clear"
|
|
484
|
+
variant="link"
|
|
485
|
+
/>
|
|
486
|
+
}
|
|
327
487
|
invalid
|
|
328
488
|
/>
|
|
329
489
|
)}
|
|
@@ -331,7 +491,13 @@ export const Demo = {
|
|
|
331
491
|
<InputWithLabel
|
|
332
492
|
placeholder="Placeholder"
|
|
333
493
|
leftSlot={<Mail />}
|
|
334
|
-
rightSlot={
|
|
494
|
+
rightSlot={
|
|
495
|
+
<IconButton
|
|
496
|
+
icon={<CircleX />}
|
|
497
|
+
aria-label="Clear"
|
|
498
|
+
variant="link"
|
|
499
|
+
/>
|
|
500
|
+
}
|
|
335
501
|
invalid
|
|
336
502
|
/>
|
|
337
503
|
)}
|
|
@@ -339,7 +505,20 @@ export const Demo = {
|
|
|
339
505
|
<InputWithLabel
|
|
340
506
|
placeholder="Placeholder"
|
|
341
507
|
leftSlot={<Mail />}
|
|
342
|
-
rightSlot={
|
|
508
|
+
rightSlot={
|
|
509
|
+
<>
|
|
510
|
+
<IconButton
|
|
511
|
+
icon={<CircleX />}
|
|
512
|
+
aria-label="Clear"
|
|
513
|
+
variant="link"
|
|
514
|
+
/>
|
|
515
|
+
<IconButton
|
|
516
|
+
icon={<Copy />}
|
|
517
|
+
aria-label="Copy"
|
|
518
|
+
variant="link"
|
|
519
|
+
/>
|
|
520
|
+
</>
|
|
521
|
+
}
|
|
343
522
|
suffix="milliseconds"
|
|
344
523
|
invalid
|
|
345
524
|
/>
|
|
@@ -361,7 +540,14 @@ export const Demo = {
|
|
|
361
540
|
{variant === "right" && (
|
|
362
541
|
<InputWithLabel
|
|
363
542
|
placeholder="Aidbox"
|
|
364
|
-
rightSlot={
|
|
543
|
+
rightSlot={
|
|
544
|
+
<IconButton
|
|
545
|
+
icon={<CircleX />}
|
|
546
|
+
aria-label="Clear"
|
|
547
|
+
variant="link"
|
|
548
|
+
disabled
|
|
549
|
+
/>
|
|
550
|
+
}
|
|
365
551
|
disabled
|
|
366
552
|
/>
|
|
367
553
|
)}
|
|
@@ -369,7 +555,14 @@ export const Demo = {
|
|
|
369
555
|
<InputWithLabel
|
|
370
556
|
placeholder="Aidbox"
|
|
371
557
|
leftSlot={<Mail />}
|
|
372
|
-
rightSlot={
|
|
558
|
+
rightSlot={
|
|
559
|
+
<IconButton
|
|
560
|
+
icon={<CircleX />}
|
|
561
|
+
aria-label="Clear"
|
|
562
|
+
variant="link"
|
|
563
|
+
disabled
|
|
564
|
+
/>
|
|
565
|
+
}
|
|
373
566
|
disabled
|
|
374
567
|
/>
|
|
375
568
|
)}
|
|
@@ -377,7 +570,22 @@ export const Demo = {
|
|
|
377
570
|
<InputWithLabel
|
|
378
571
|
placeholder="Aidbox"
|
|
379
572
|
leftSlot={<Mail />}
|
|
380
|
-
rightSlot={
|
|
573
|
+
rightSlot={
|
|
574
|
+
<>
|
|
575
|
+
<IconButton
|
|
576
|
+
icon={<CircleX />}
|
|
577
|
+
aria-label="Clear"
|
|
578
|
+
variant="link"
|
|
579
|
+
disabled
|
|
580
|
+
/>
|
|
581
|
+
<IconButton
|
|
582
|
+
icon={<Copy />}
|
|
583
|
+
aria-label="Copy"
|
|
584
|
+
variant="link"
|
|
585
|
+
disabled
|
|
586
|
+
/>
|
|
587
|
+
</>
|
|
588
|
+
}
|
|
381
589
|
suffix="milliseconds"
|
|
382
590
|
disabled
|
|
383
591
|
/>
|