@health-samurai/react-components 0.0.0-alpha.4 → 0.0.0-alpha.6
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/dist/bundle.css +1375 -484
- 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.d.ts +2 -0
- package/dist/src/components/code-editor/http/grammar/http.test.d.ts.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 +4 -0
- package/dist/src/components/code-editor/http/index.d.ts.map +1 -0
- package/dist/src/components/code-editor/http/index.js +66 -0
- package/dist/src/components/code-editor/http/index.js.map +1 -0
- package/dist/src/components/code-editor/index.d.ts +14 -2
- package/dist/src/components/code-editor/index.d.ts.map +1 -1
- package/dist/src/components/code-editor/index.js +309 -20
- package/dist/src/components/code-editor/index.js.map +1 -1
- package/dist/src/components/code-editor.stories.d.ts +1 -0
- package/dist/src/components/code-editor.stories.d.ts.map +1 -1
- package/dist/src/components/code-editor.stories.js +255 -2
- 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 +8 -0
- package/dist/src/components/data-table.d.ts.map +1 -0
- package/dist/src/components/data-table.js +65 -0
- package/dist/src/components/data-table.js.map +1 -0
- package/dist/src/components/data-table.stories.d.ts +7 -0
- package/dist/src/components/data-table.stories.d.ts.map +1 -0
- package/dist/src/components/data-table.stories.js +44 -0
- package/dist/src/components/data-table.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 +229 -0
- package/dist/src/components/fhir-structure-view.js.map +1 -0
- package/dist/src/components/fhir-structure-view.stories.d.ts +7 -0
- package/dist/src/components/fhir-structure-view.stories.d.ts.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/patient-table.d.ts +73 -0
- package/dist/src/components/patient-table.d.ts.map +1 -0
- package/dist/src/components/patient-table.js +921 -0
- package/dist/src/components/patient-table.js.map +1 -0
- package/dist/src/components/patient-table.stories.d.ts +111 -0
- package/dist/src/components/patient-table.stories.d.ts.map +1 -0
- package/dist/src/components/patient-table.stories.js +172 -0
- package/dist/src/components/patient-table.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 +72 -49
- package/dist/src/components/request-line-editor.js.map +1 -1
- package/dist/src/components/request-line-editor.stories.d.ts.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/segment-control.d.ts +16 -0
- package/dist/src/components/segment-control.d.ts.map +1 -0
- package/dist/src/components/segment-control.js +48 -0
- package/dist/src/components/segment-control.js.map +1 -0
- package/dist/src/components/segment-control.stories.d.ts +15 -0
- package/dist/src/components/segment-control.stories.d.ts.map +1 -0
- package/dist/src/components/segment-control.stories.js +33 -0
- package/dist/src/components/segment-control.stories.js.map +1 -0
- package/dist/src/components/split-button.d.ts +5 -0
- package/dist/src/components/split-button.d.ts.map +1 -0
- package/dist/src/components/split-button.js +12 -0
- package/dist/src/components/split-button.js.map +1 -0
- package/dist/src/components/split-button.stories.d.ts +7 -0
- package/dist/src/components/split-button.stories.d.ts.map +1 -0
- package/dist/src/components/split-button.stories.js +57 -0
- package/dist/src/components/split-button.stories.js.map +1 -0
- package/dist/src/components/tree-view.d.ts +22 -0
- package/dist/src/components/tree-view.d.ts.map +1 -0
- package/dist/src/components/tree-view.js +101 -0
- package/dist/src/components/tree-view.js.map +1 -0
- package/dist/src/components/tree-view.stories.d.ts +13 -0
- package/dist/src/components/tree-view.stories.d.ts.map +1 -0
- package/dist/src/components/tree-view.stories.js +274 -0
- package/dist/src/components/tree-view.stories.js.map +1 -0
- package/dist/src/icons.d.ts +9 -0
- package/dist/src/icons.d.ts.map +1 -0
- package/dist/src/icons.js +279 -0
- package/dist/src/icons.js.map +1 -0
- package/dist/src/index.css +42 -3
- package/dist/src/index.d.ts +9 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +9 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/shadcn/components/ui/accordion.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/accordion.js +23 -5
- package/dist/src/shadcn/components/ui/accordion.js.map +1 -1
- package/dist/src/shadcn/components/ui/alert-dialog.d.ts +3 -1
- package/dist/src/shadcn/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/alert-dialog.js +5 -2
- package/dist/src/shadcn/components/ui/alert-dialog.js.map +1 -1
- package/dist/src/shadcn/components/ui/alert.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/alert.js +12 -5
- package/dist/src/shadcn/components/ui/alert.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/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.map +1 -1
- package/dist/src/shadcn/components/ui/breadcrumb.js +6 -6
- package/dist/src/shadcn/components/ui/breadcrumb.js.map +1 -1
- package/dist/src/shadcn/components/ui/button.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/button.js +19 -11
- package/dist/src/shadcn/components/ui/button.js.map +1 -1
- package/dist/src/shadcn/components/ui/card.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/card.js +14 -6
- package/dist/src/shadcn/components/ui/card.js.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.js +20 -5
- package/dist/src/shadcn/components/ui/checkbox.js.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.stories.js +44 -35
- package/dist/src/shadcn/components/ui/checkbox.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/combobox.d.ts +18 -0
- package/dist/src/shadcn/components/ui/combobox.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/combobox.js +121 -0
- package/dist/src/shadcn/components/ui/combobox.js.map +1 -0
- package/dist/src/shadcn/components/ui/combobox.stories.d.ts +11 -0
- package/dist/src/shadcn/components/ui/combobox.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/combobox.stories.js +16 -0
- package/dist/src/shadcn/components/ui/combobox.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/command.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/command.js +73 -12
- package/dist/src/shadcn/components/ui/command.js.map +1 -1
- package/dist/src/shadcn/components/ui/command.stories.js +0 -1
- package/dist/src/shadcn/components/ui/command.stories.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 +26 -5
- package/dist/src/shadcn/components/ui/drawer.js.map +1 -1
- package/dist/src/shadcn/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/dropdown-menu.js +12 -1
- package/dist/src/shadcn/components/ui/dropdown-menu.js.map +1 -1
- package/dist/src/shadcn/components/ui/form.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/form.js +12 -4
- package/dist/src/shadcn/components/ui/form.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/label.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/label.js +8 -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.map +1 -1
- package/dist/src/shadcn/components/ui/pagination.js +6 -6
- package/dist/src/shadcn/components/ui/pagination.js.map +1 -1
- package/dist/src/shadcn/components/ui/popover.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/popover.js +12 -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-group.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/radio-group.js +11 -6
- package/dist/src/shadcn/components/ui/radio-group.js.map +1 -1
- package/dist/src/shadcn/components/ui/radio-group.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/radio-group.stories.js +57 -34
- package/dist/src/shadcn/components/ui/radio-group.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 +9 -3
- package/dist/src/shadcn/components/ui/scroll-area.js.map +1 -1
- package/dist/src/shadcn/components/ui/select.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/select.js +49 -14
- package/dist/src/shadcn/components/ui/select.js.map +1 -1
- package/dist/src/shadcn/components/ui/select.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/select.stories.js +1 -4
- 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 +7 -1
- package/dist/src/shadcn/components/ui/separator.js.map +1 -1
- package/dist/src/shadcn/components/ui/sidebar.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/sidebar.js +20 -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 +34 -4
- package/dist/src/shadcn/components/ui/slider.js.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.d.ts +16 -1
- package/dist/src/shadcn/components/ui/sonner.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.js +23 -3
- package/dist/src/shadcn/components/ui/sonner.js.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.stories.js +19 -11
- package/dist/src/shadcn/components/ui/sonner.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/switch.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/switch.js +18 -2
- package/dist/src/shadcn/components/ui/switch.js.map +1 -1
- package/dist/src/shadcn/components/ui/table.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/table.js +12 -8
- package/dist/src/shadcn/components/ui/table.js.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.d.ts +21 -3
- package/dist/src/shadcn/components/ui/tabs.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.js +315 -9
- package/dist/src/shadcn/components/ui/tabs.js.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.stories.js +50 -1
- package/dist/src/shadcn/components/ui/tabs.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/textarea.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/textarea.js +15 -1
- package/dist/src/shadcn/components/ui/textarea.js.map +1 -1
- package/dist/src/shadcn/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/toggle-group.js +6 -2
- package/dist/src/shadcn/components/ui/toggle-group.js.map +1 -1
- package/dist/src/shadcn/components/ui/toggle.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/toggle.js +18 -6
- package/dist/src/shadcn/components/ui/toggle.js.map +1 -1
- package/dist/src/shadcn/components/ui/tooltip.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/tooltip.js +11 -1
- package/dist/src/shadcn/components/ui/tooltip.js.map +1 -1
- package/dist/src/shadcn/components/ui/tree.d.ts +28 -0
- package/dist/src/shadcn/components/ui/tree.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/tree.js +122 -0
- package/dist/src/shadcn/components/ui/tree.js.map +1 -0
- package/dist/src/typography.css +12 -0
- package/package.json +13 -2
- 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 +87 -0
- package/src/components/code-editor/index.tsx +307 -21
- package/src/components/code-editor.stories.tsx +295 -1
- package/src/components/copy-icon.tsx +57 -3
- package/src/components/data-table.stories.tsx +38 -0
- package/src/components/data-table.tsx +117 -0
- package/src/components/fhir-structure-view.stories.tsx +439 -0
- package/src/components/fhir-structure-view.tsx +231 -0
- package/src/components/patient-table.stories.tsx +111 -0
- package/src/components/patient-table.tsx +1301 -0
- package/src/components/request-line-editor.stories.tsx +17 -27
- package/src/components/request-line-editor.tsx +98 -61
- package/src/components/segment-control.stories.tsx +29 -0
- package/src/components/segment-control.tsx +80 -0
- package/src/components/split-button.stories.tsx +49 -0
- package/src/components/split-button.tsx +17 -0
- package/src/components/tree-view.stories.tsx +259 -0
- package/src/components/tree-view.tsx +172 -0
- package/src/icons.tsx +287 -0
- package/src/index.css +42 -3
- package/src/index.tsx +9 -2
- package/src/shadcn/components/ui/accordion.tsx +66 -8
- package/src/shadcn/components/ui/alert-dialog.tsx +6 -2
- package/src/shadcn/components/ui/alert.tsx +53 -15
- package/src/shadcn/components/ui/avatar.tsx +17 -6
- package/src/shadcn/components/ui/badge.tsx +67 -18
- package/src/shadcn/components/ui/breadcrumb.tsx +35 -7
- package/src/shadcn/components/ui/button.tsx +118 -57
- package/src/shadcn/components/ui/card.tsx +44 -13
- package/src/shadcn/components/ui/checkbox.stories.tsx +20 -24
- package/src/shadcn/components/ui/checkbox.tsx +45 -4
- package/src/shadcn/components/ui/combobox.stories.tsx +19 -0
- package/src/shadcn/components/ui/combobox.tsx +142 -0
- package/src/shadcn/components/ui/command.stories.tsx +1 -1
- package/src/shadcn/components/ui/command.tsx +192 -36
- package/src/shadcn/components/ui/dialog.tsx +101 -13
- package/src/shadcn/components/ui/drawer.tsx +93 -18
- package/src/shadcn/components/ui/dropdown-menu.tsx +37 -9
- package/src/shadcn/components/ui/form.tsx +16 -4
- package/src/shadcn/components/ui/input.tsx +400 -29
- package/src/shadcn/components/ui/label.tsx +21 -4
- package/src/shadcn/components/ui/menubar.tsx +188 -43
- package/src/shadcn/components/ui/pagination.tsx +12 -6
- package/src/shadcn/components/ui/popover.tsx +35 -4
- package/src/shadcn/components/ui/progress.tsx +21 -5
- package/src/shadcn/components/ui/radio-group.stories.tsx +22 -14
- package/src/shadcn/components/ui/radio-group.tsx +42 -5
- package/src/shadcn/components/ui/scroll-area.tsx +33 -5
- package/src/shadcn/components/ui/select.stories.tsx +0 -2
- package/src/shadcn/components/ui/select.tsx +184 -33
- package/src/shadcn/components/ui/separator.tsx +15 -5
- package/src/shadcn/components/ui/sidebar.tsx +68 -26
- package/src/shadcn/components/ui/skeleton.tsx +4 -1
- package/src/shadcn/components/ui/slider.tsx +82 -11
- package/src/shadcn/components/ui/sonner.stories.tsx +19 -15
- package/src/shadcn/components/ui/sonner.tsx +53 -3
- package/src/shadcn/components/ui/switch.tsx +53 -7
- package/src/shadcn/components/ui/table.tsx +38 -11
- package/src/shadcn/components/ui/tabs.stories.tsx +32 -0
- package/src/shadcn/components/ui/tabs.tsx +456 -17
- package/src/shadcn/components/ui/textarea.tsx +42 -4
- package/src/shadcn/components/ui/toggle-group.tsx +27 -5
- package/src/shadcn/components/ui/toggle.tsx +59 -18
- package/src/shadcn/components/ui/tooltip.tsx +33 -8
- package/src/shadcn/components/ui/tree.tsx +233 -0
- package/src/typography.css +12 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-view.d.ts","sourceRoot":"","sources":["../../../src/components/tree-view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,YAAY,EAEZ,YAAY,EAEZ,MAAM,qBAAqB,CAAC;AAQ7B,OAAO,KAAoB,MAAM,OAAO,CAAC;AAsBzC,UAAU,YAAY,CAAC,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,CAAC,CAAC;CACT;AAuBD,iBAAS,QAAQ,CAAC,CAAC,EAAE,EACpB,UAAU,EACV,KAAK,EACL,cAAc,EACd,eAAe,EACf,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,eAAe,EACf,WAAW,GACX,EAAE;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC7D,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACvC,cAAc,CAAC,EAAE,CAChB,IAAI,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EACnC,IAAI,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,KAC/B,KAAK,CAAC,SAAS,CAAC;IACrB,QAAQ,CAAC,EACN,CAAC,CAAC,IAAI,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC,GAC9D,SAAS,CAAC;IACb,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,2CA6EA;AAED,OAAO,EAAE,QAAQ,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { hotkeysCoreFeature, renamingFeature, selectionFeature, syncDataLoaderFeature } from "@headless-tree/core";
|
|
3
|
+
import { useTree } from "@headless-tree/react";
|
|
4
|
+
import React, { useEffect } from "react";
|
|
5
|
+
import { Tree, TreeItem, TreeItemLabel } from "../shadcn/components/ui/tree.js";
|
|
6
|
+
import { cn } from "../shadcn/lib/utils.js";
|
|
7
|
+
// Styles
|
|
8
|
+
const treeItemStyle = cn("relative", "before:absolute", "before:inset-0", "before:-ms-1", "before:bg-[repeating-linear-gradient(to_right,transparent_0,transparent_calc(var(--tree-indent)-1px),var(--border)_calc(var(--tree-indent)-1px),var(--border)_calc(var(--tree-indent)))]");
|
|
9
|
+
const treeItemLabelStyle = cn("before:bg-background", "relative", "before:absolute", "before:inset-x-0", "before:-inset-y-0", "before:-z-10");
|
|
10
|
+
const customClickBehavior = {
|
|
11
|
+
itemInstance: {
|
|
12
|
+
getProps: ({ tree, item, prev })=>({
|
|
13
|
+
...prev?.(),
|
|
14
|
+
onClick: ()=>{
|
|
15
|
+
item.primaryAction();
|
|
16
|
+
if (item.isExpanded()) {
|
|
17
|
+
item.collapse();
|
|
18
|
+
} else {
|
|
19
|
+
item.expand();
|
|
20
|
+
}
|
|
21
|
+
if (!item.isFolder()) {
|
|
22
|
+
tree.setSelectedItems([
|
|
23
|
+
item.getItemMeta().itemId
|
|
24
|
+
]);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const indent = 24;
|
|
31
|
+
function TreeView({ rootItemId, items, selectedItemId, expandedItemIds, onSelectItem, customItemView, onRename, disableHover, zebra, horizontalLines, hideChevron }) {
|
|
32
|
+
const [state, setState] = React.useState({});
|
|
33
|
+
const treeConfig = {
|
|
34
|
+
initialState: {
|
|
35
|
+
selectedItems: selectedItemId ? [
|
|
36
|
+
selectedItemId
|
|
37
|
+
] : [],
|
|
38
|
+
expandedItems: expandedItemIds ?? []
|
|
39
|
+
},
|
|
40
|
+
state,
|
|
41
|
+
setState,
|
|
42
|
+
indent,
|
|
43
|
+
rootItemId: rootItemId,
|
|
44
|
+
isItemFolder: (item)=>item.getItemData()?.children !== undefined,
|
|
45
|
+
getItemName: (item)=>item.getItemData()?.name,
|
|
46
|
+
dataLoader: {
|
|
47
|
+
getItem: (itemId)=>items[itemId] ?? {},
|
|
48
|
+
getChildren: (itemId)=>items[itemId]?.children ?? []
|
|
49
|
+
},
|
|
50
|
+
...onRename ? {
|
|
51
|
+
onRename: onRename
|
|
52
|
+
} : {},
|
|
53
|
+
features: [
|
|
54
|
+
syncDataLoaderFeature,
|
|
55
|
+
hotkeysCoreFeature,
|
|
56
|
+
selectionFeature,
|
|
57
|
+
customClickBehavior,
|
|
58
|
+
renamingFeature
|
|
59
|
+
]
|
|
60
|
+
};
|
|
61
|
+
const tree = useTree(treeConfig);
|
|
62
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: We must have explicit sync here
|
|
63
|
+
useEffect(()=>{
|
|
64
|
+
tree.rebuildTree();
|
|
65
|
+
}, [
|
|
66
|
+
items
|
|
67
|
+
]);
|
|
68
|
+
useEffect(()=>{
|
|
69
|
+
setState((currentState)=>{
|
|
70
|
+
return {
|
|
71
|
+
...currentState,
|
|
72
|
+
selectedItems: selectedItemId ? [
|
|
73
|
+
selectedItemId
|
|
74
|
+
] : []
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
}, [
|
|
78
|
+
selectedItemId
|
|
79
|
+
]);
|
|
80
|
+
return /*#__PURE__*/ _jsx(Tree, {
|
|
81
|
+
tree: tree,
|
|
82
|
+
indent: indent,
|
|
83
|
+
children: tree.getItems().map((item)=>{
|
|
84
|
+
return /*#__PURE__*/ _jsx(TreeItem, {
|
|
85
|
+
item: item,
|
|
86
|
+
className: cn(treeItemStyle, zebra ? "even:bg-bg-secondary even:[&_[data-slot=tree-item-label]]:bg-bg-secondary" : ""),
|
|
87
|
+
children: /*#__PURE__*/ _jsx(TreeItemLabel, {
|
|
88
|
+
hideChevron: hideChevron ?? false,
|
|
89
|
+
disableHover: disableHover ?? false,
|
|
90
|
+
className: treeItemLabelStyle,
|
|
91
|
+
onClick: ()=>onSelectItem?.(item),
|
|
92
|
+
horizontalLines: horizontalLines ?? false,
|
|
93
|
+
children: customItemView ? customItemView(item, tree) : item.getItemData()?.name
|
|
94
|
+
})
|
|
95
|
+
}, item.getId());
|
|
96
|
+
})
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
export { TreeView };
|
|
100
|
+
|
|
101
|
+
//# sourceMappingURL=tree-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/tree-view.tsx"],"sourcesContent":["import type {\n\tFeatureImplementation,\n\tItemInstance,\n\tTreeConfig,\n\tTreeInstance,\n\tTreeState,\n} from \"@headless-tree/core\";\nimport {\n\thotkeysCoreFeature,\n\trenamingFeature,\n\tselectionFeature,\n\tsyncDataLoaderFeature,\n} from \"@headless-tree/core\";\nimport { useTree } from \"@headless-tree/react\";\nimport React, { useEffect } from \"react\";\nimport { Tree, TreeItem, TreeItemLabel } from \"#shadcn/components/ui/tree\";\nimport { cn } from \"#shadcn/lib/utils.js\";\n\n// Styles\nconst treeItemStyle = cn(\n\t\"relative\",\n\t\"before:absolute\",\n\t\"before:inset-0\",\n\t\"before:-ms-1\",\n\t\"before:bg-[repeating-linear-gradient(to_right,transparent_0,transparent_calc(var(--tree-indent)-1px),var(--border)_calc(var(--tree-indent)-1px),var(--border)_calc(var(--tree-indent)))]\",\n);\n\nconst treeItemLabelStyle = cn(\n\t\"before:bg-background\",\n\t\"relative\",\n\t\"before:absolute\",\n\t\"before:inset-x-0\",\n\t\"before:-inset-y-0\",\n\t\"before:-z-10\",\n);\n\ninterface TreeViewItem<T> {\n\tname: string;\n\tchildren?: string[];\n\tmeta?: T;\n}\n\nconst customClickBehavior: FeatureImplementation = {\n\titemInstance: {\n\t\tgetProps: ({ tree, item, prev }) => ({\n\t\t\t...prev?.(),\n\t\t\tonClick: () => {\n\t\t\t\titem.primaryAction();\n\t\t\t\tif (item.isExpanded()) {\n\t\t\t\t\titem.collapse();\n\t\t\t\t} else {\n\t\t\t\t\titem.expand();\n\t\t\t\t}\n\t\t\t\tif (!item.isFolder()) {\n\t\t\t\t\ttree.setSelectedItems([item.getItemMeta().itemId]);\n\t\t\t\t}\n\t\t\t},\n\t\t}),\n\t},\n};\n\nconst indent = 24;\n\nfunction TreeView<T>({\n\trootItemId,\n\titems,\n\tselectedItemId,\n\texpandedItemIds,\n\tonSelectItem,\n\tcustomItemView,\n\tonRename,\n\tdisableHover,\n\tzebra,\n\thorizontalLines,\n\thideChevron,\n}: {\n\trootItemId: string;\n\tselectedItemId?: string;\n\texpandedItemIds?: string[];\n\tonSelectItem?: (item: ItemInstance<TreeViewItem<T>>) => void;\n\titems: Record<string, TreeViewItem<T>>;\n\tcustomItemView?: (\n\t\titem: ItemInstance<TreeViewItem<T>>,\n\t\ttree: TreeInstance<TreeViewItem<T>>,\n\t) => React.ReactNode;\n\tonRename?:\n\t\t| ((item: ItemInstance<TreeViewItem<T>>, value: string) => void)\n\t\t| undefined;\n\tdisableHover?: boolean;\n\tzebra?: boolean;\n\thorizontalLines?: boolean;\n\thideChevron?: boolean;\n}) {\n\tconst [state, setState] = React.useState<Partial<TreeState<TreeViewItem<T>>>>(\n\t\t{},\n\t);\n\tconst treeConfig: TreeConfig<TreeViewItem<T>> = {\n\t\tinitialState: {\n\t\t\tselectedItems: selectedItemId ? [selectedItemId] : [],\n\t\t\texpandedItems: expandedItemIds ?? [],\n\t\t},\n\t\tstate,\n\t\tsetState,\n\t\tindent,\n\t\trootItemId: rootItemId,\n\t\tisItemFolder: (item: ItemInstance<TreeViewItem<T>>) =>\n\t\t\titem.getItemData()?.children !== undefined,\n\t\tgetItemName: (item: ItemInstance<TreeViewItem<T>>) =>\n\t\t\titem.getItemData()?.name,\n\t\tdataLoader: {\n\t\t\tgetItem: (itemId) => (items[itemId] as TreeViewItem<T>) ?? {},\n\t\t\tgetChildren: (itemId) => items[itemId]?.children ?? [],\n\t\t},\n\t\t...(onRename ? { onRename: onRename } : {}),\n\t\tfeatures: [\n\t\t\tsyncDataLoaderFeature,\n\t\t\thotkeysCoreFeature,\n\t\t\tselectionFeature,\n\t\t\tcustomClickBehavior,\n\t\t\trenamingFeature,\n\t\t],\n\t};\n\n\tconst tree = useTree<TreeViewItem<T>>(treeConfig);\n\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: We must have explicit sync here\n\tuseEffect(() => {\n\t\ttree.rebuildTree();\n\t}, [items]);\n\n\tuseEffect(() => {\n\t\tsetState((currentState) => {\n\t\t\treturn {\n\t\t\t\t...currentState,\n\t\t\t\tselectedItems: selectedItemId ? [selectedItemId] : [],\n\t\t\t};\n\t\t});\n\t}, [selectedItemId]);\n\n\treturn (\n\t\t<Tree tree={tree} indent={indent}>\n\t\t\t{tree.getItems().map((item) => {\n\t\t\t\treturn (\n\t\t\t\t\t<TreeItem\n\t\t\t\t\t\tkey={item.getId()}\n\t\t\t\t\t\titem={item}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\ttreeItemStyle,\n\t\t\t\t\t\t\tzebra\n\t\t\t\t\t\t\t\t? \"even:bg-bg-secondary even:[&_[data-slot=tree-item-label]]:bg-bg-secondary\"\n\t\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\t\t<TreeItemLabel\n\t\t\t\t\t\t\thideChevron={hideChevron ?? false}\n\t\t\t\t\t\t\tdisableHover={disableHover ?? false}\n\t\t\t\t\t\t\tclassName={treeItemLabelStyle}\n\t\t\t\t\t\t\tonClick={() => onSelectItem?.(item)}\n\t\t\t\t\t\t\thorizontalLines={horizontalLines ?? false}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{customItemView\n\t\t\t\t\t\t\t\t? customItemView(item, tree)\n\t\t\t\t\t\t\t\t: item.getItemData()?.name}\n\t\t\t\t\t\t</TreeItemLabel>\n\t\t\t\t\t</TreeItem>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Tree>\n\t);\n}\n\nexport { TreeView, type TreeViewItem, type TreeInstance };\n"],"names":["hotkeysCoreFeature","renamingFeature","selectionFeature","syncDataLoaderFeature","useTree","React","useEffect","Tree","TreeItem","TreeItemLabel","cn","treeItemStyle","treeItemLabelStyle","customClickBehavior","itemInstance","getProps","tree","item","prev","onClick","primaryAction","isExpanded","collapse","expand","isFolder","setSelectedItems","getItemMeta","itemId","indent","TreeView","rootItemId","items","selectedItemId","expandedItemIds","onSelectItem","customItemView","onRename","disableHover","zebra","horizontalLines","hideChevron","state","setState","useState","treeConfig","initialState","selectedItems","expandedItems","isItemFolder","getItemData","children","undefined","getItemName","name","dataLoader","getItem","getChildren","features","rebuildTree","currentState","getItems","map","className","getId"],"mappings":";AAOA,SACCA,kBAAkB,EAClBC,eAAe,EACfC,gBAAgB,EAChBC,qBAAqB,QACf,sBAAsB;AAC7B,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,OAAOC,SAASC,SAAS,QAAQ,QAAQ;AACzC,SAASC,IAAI,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,kCAA6B;AAC3E,SAASC,EAAE,QAAQ,yBAAuB;AAE1C,SAAS;AACT,MAAMC,gBAAgBD,GACrB,YACA,mBACA,kBACA,gBACA;AAGD,MAAME,qBAAqBF,GAC1B,wBACA,YACA,mBACA,oBACA,qBACA;AASD,MAAMG,sBAA6C;IAClDC,cAAc;QACbC,UAAU,CAAC,EAAEC,IAAI,EAAEC,IAAI,EAAEC,IAAI,EAAE,GAAM,CAAA;gBACpC,GAAGA,QAAQ;gBACXC,SAAS;oBACRF,KAAKG,aAAa;oBAClB,IAAIH,KAAKI,UAAU,IAAI;wBACtBJ,KAAKK,QAAQ;oBACd,OAAO;wBACNL,KAAKM,MAAM;oBACZ;oBACA,IAAI,CAACN,KAAKO,QAAQ,IAAI;wBACrBR,KAAKS,gBAAgB,CAAC;4BAACR,KAAKS,WAAW,GAAGC,MAAM;yBAAC;oBAClD;gBACD;YACD,CAAA;IACD;AACD;AAEA,MAAMC,SAAS;AAEf,SAASC,SAAY,EACpBC,UAAU,EACVC,KAAK,EACLC,cAAc,EACdC,eAAe,EACfC,YAAY,EACZC,cAAc,EACdC,QAAQ,EACRC,YAAY,EACZC,KAAK,EACLC,eAAe,EACfC,WAAW,EAkBX;IACA,MAAM,CAACC,OAAOC,SAAS,GAAGrC,MAAMsC,QAAQ,CACvC,CAAC;IAEF,MAAMC,aAA0C;QAC/CC,cAAc;YACbC,eAAed,iBAAiB;gBAACA;aAAe,GAAG,EAAE;YACrDe,eAAed,mBAAmB,EAAE;QACrC;QACAQ;QACAC;QACAd;QACAE,YAAYA;QACZkB,cAAc,CAAC/B,OACdA,KAAKgC,WAAW,IAAIC,aAAaC;QAClCC,aAAa,CAACnC,OACbA,KAAKgC,WAAW,IAAII;QACrBC,YAAY;YACXC,SAAS,CAAC5B,SAAW,AAACI,KAAK,CAACJ,OAAO,IAAwB,CAAC;YAC5D6B,aAAa,CAAC7B,SAAWI,KAAK,CAACJ,OAAO,EAAEuB,YAAY,EAAE;QACvD;QACA,GAAId,WAAW;YAAEA,UAAUA;QAAS,IAAI,CAAC,CAAC;QAC1CqB,UAAU;YACTtD;YACAH;YACAE;YACAW;YACAZ;SACA;IACF;IAEA,MAAMe,OAAOZ,QAAyBwC;IAEtC,2FAA2F;IAC3FtC,UAAU;QACTU,KAAK0C,WAAW;IACjB,GAAG;QAAC3B;KAAM;IAEVzB,UAAU;QACToC,SAAS,CAACiB;YACT,OAAO;gBACN,GAAGA,YAAY;gBACfb,eAAed,iBAAiB;oBAACA;iBAAe,GAAG,EAAE;YACtD;QACD;IACD,GAAG;QAACA;KAAe;IAEnB,qBACC,KAACzB;QAAKS,MAAMA;QAAMY,QAAQA;kBACxBZ,KAAK4C,QAAQ,GAAGC,GAAG,CAAC,CAAC5C;YACrB,qBACC,KAACT;gBAEAS,MAAMA;gBACN6C,WAAWpD,GACVC,eACA2B,QACG,8EACA;0BAGJ,cAAA,KAAC7B;oBACA+B,aAAaA,eAAe;oBAC5BH,cAAcA,gBAAgB;oBAC9ByB,WAAWlD;oBACXO,SAAS,IAAMe,eAAejB;oBAC9BsB,iBAAiBA,mBAAmB;8BAEnCJ,iBACEA,eAAelB,MAAMD,QACrBC,KAAKgC,WAAW,IAAII;;eAlBnBpC,KAAK8C,KAAK;QAsBlB;;AAGH;AAEA,SAASlC,QAAQ,GAAyC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { TreeView } from "./tree-view";
|
|
3
|
+
declare const meta: Meta<typeof TreeView>;
|
|
4
|
+
type ItemMeta = {
|
|
5
|
+
pinned?: boolean;
|
|
6
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
7
|
+
path?: string;
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
type Story = StoryObj<typeof TreeView<ItemMeta>>;
|
|
11
|
+
export declare const Default: Story;
|
|
12
|
+
export declare const CustomItemView: Story;
|
|
13
|
+
//# sourceMappingURL=tree-view.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-view.stories.d.ts","sourceRoot":"","sources":["../../../src/components/tree-view.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAO5D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAO/B,CAAC;AACF,KAAK,QAAQ,GAAG;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;AAqIjD,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAiFF,eAAO,MAAM,cAAc,EAAE,KAU5B,CAAC"}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Ellipsis, Pin, Plus } from "lucide-react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { action } from "storybook/actions";
|
|
5
|
+
import { Button } from "../shadcn/components/ui/button.js";
|
|
6
|
+
import { PinIcon } from "../icons.js";
|
|
7
|
+
import { TreeView } from "./tree-view.js";
|
|
8
|
+
const meta = {
|
|
9
|
+
title: "Component/Tree view",
|
|
10
|
+
component: TreeView,
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: "fullscreen"
|
|
13
|
+
},
|
|
14
|
+
tags: [
|
|
15
|
+
"autodocs"
|
|
16
|
+
]
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
const items = {
|
|
20
|
+
root: {
|
|
21
|
+
name: "Root",
|
|
22
|
+
children: [
|
|
23
|
+
"collection1",
|
|
24
|
+
"collection2",
|
|
25
|
+
"collection3"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
collection1: {
|
|
29
|
+
name: "Collection 1",
|
|
30
|
+
children: [
|
|
31
|
+
"request1",
|
|
32
|
+
"request2",
|
|
33
|
+
"request3"
|
|
34
|
+
],
|
|
35
|
+
meta: {
|
|
36
|
+
pinned: true
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
collection2: {
|
|
40
|
+
name: "Collection 2",
|
|
41
|
+
children: [
|
|
42
|
+
"request4",
|
|
43
|
+
"request5",
|
|
44
|
+
"request6"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
collection3: {
|
|
48
|
+
name: "New Collection",
|
|
49
|
+
children: [
|
|
50
|
+
"request7",
|
|
51
|
+
"request8",
|
|
52
|
+
"request9",
|
|
53
|
+
"request10",
|
|
54
|
+
"request11",
|
|
55
|
+
"collection4"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
collection4: {
|
|
59
|
+
name: "New Collection",
|
|
60
|
+
children: [
|
|
61
|
+
"request12",
|
|
62
|
+
"request13",
|
|
63
|
+
"request14"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
request1: {
|
|
67
|
+
meta: {
|
|
68
|
+
method: "GET",
|
|
69
|
+
path: "/request1"
|
|
70
|
+
},
|
|
71
|
+
name: "Request 1"
|
|
72
|
+
},
|
|
73
|
+
request2: {
|
|
74
|
+
meta: {
|
|
75
|
+
method: "POST",
|
|
76
|
+
path: "/request2"
|
|
77
|
+
},
|
|
78
|
+
name: "Request 2"
|
|
79
|
+
},
|
|
80
|
+
request3: {
|
|
81
|
+
meta: {
|
|
82
|
+
method: "PUT",
|
|
83
|
+
path: "/request3"
|
|
84
|
+
},
|
|
85
|
+
name: "Request 3"
|
|
86
|
+
},
|
|
87
|
+
request4: {
|
|
88
|
+
meta: {
|
|
89
|
+
method: "DELETE",
|
|
90
|
+
path: "/request4"
|
|
91
|
+
},
|
|
92
|
+
name: "Request 4"
|
|
93
|
+
},
|
|
94
|
+
request5: {
|
|
95
|
+
meta: {
|
|
96
|
+
method: "PATCH",
|
|
97
|
+
path: "/request5"
|
|
98
|
+
},
|
|
99
|
+
name: "Request 5"
|
|
100
|
+
},
|
|
101
|
+
request6: {
|
|
102
|
+
meta: {
|
|
103
|
+
method: "GET",
|
|
104
|
+
path: "/request6"
|
|
105
|
+
},
|
|
106
|
+
name: "Request 6"
|
|
107
|
+
},
|
|
108
|
+
request7: {
|
|
109
|
+
meta: {
|
|
110
|
+
method: "PATCH",
|
|
111
|
+
path: "/fhir/Patient/123"
|
|
112
|
+
},
|
|
113
|
+
name: "Request 7"
|
|
114
|
+
},
|
|
115
|
+
request8: {
|
|
116
|
+
meta: {
|
|
117
|
+
method: "DELETE",
|
|
118
|
+
path: "/fhir/Patient/123"
|
|
119
|
+
},
|
|
120
|
+
name: "Request 8"
|
|
121
|
+
},
|
|
122
|
+
request9: {
|
|
123
|
+
meta: {
|
|
124
|
+
method: "PUT",
|
|
125
|
+
path: "/fhir/Patient/123"
|
|
126
|
+
},
|
|
127
|
+
name: "Request 9"
|
|
128
|
+
},
|
|
129
|
+
request10: {
|
|
130
|
+
meta: {
|
|
131
|
+
method: "POST",
|
|
132
|
+
path: "/fhir/Patient/123"
|
|
133
|
+
},
|
|
134
|
+
name: "Request 10"
|
|
135
|
+
},
|
|
136
|
+
request11: {
|
|
137
|
+
meta: {
|
|
138
|
+
method: "GET",
|
|
139
|
+
path: "/fhir/Patient/123"
|
|
140
|
+
},
|
|
141
|
+
name: "Request 11"
|
|
142
|
+
},
|
|
143
|
+
request12: {
|
|
144
|
+
meta: {
|
|
145
|
+
method: "PUT",
|
|
146
|
+
path: "/fhir/Patient/123"
|
|
147
|
+
},
|
|
148
|
+
name: "Request 12"
|
|
149
|
+
},
|
|
150
|
+
request13: {
|
|
151
|
+
meta: {
|
|
152
|
+
method: "PUT",
|
|
153
|
+
path: "/fhir/Patient/123"
|
|
154
|
+
},
|
|
155
|
+
name: "Request 13"
|
|
156
|
+
},
|
|
157
|
+
request14: {
|
|
158
|
+
meta: {
|
|
159
|
+
method: "PUT",
|
|
160
|
+
path: "/fhir/Patient/123"
|
|
161
|
+
},
|
|
162
|
+
name: "Request 14"
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
export const Default = {
|
|
166
|
+
args: {
|
|
167
|
+
items: items,
|
|
168
|
+
rootItemId: "root",
|
|
169
|
+
selectedItemId: "request9",
|
|
170
|
+
expandedItemIds: [
|
|
171
|
+
"collection3"
|
|
172
|
+
],
|
|
173
|
+
onSelectItem: (a)=>action("onSelectItem")(a)
|
|
174
|
+
},
|
|
175
|
+
render: (args)=>/*#__PURE__*/ _jsx(TreeView, {
|
|
176
|
+
...args
|
|
177
|
+
})
|
|
178
|
+
};
|
|
179
|
+
const customItemView = (item)=>{
|
|
180
|
+
const isRootLevel = item.getItemMeta().level === 0;
|
|
181
|
+
const hasChildren = item.getItemData()?.children !== undefined;
|
|
182
|
+
const requestMethhod = item.getItemData()?.meta?.method;
|
|
183
|
+
const requestPath = item.getItemData()?.meta?.path;
|
|
184
|
+
const itemName = item.getItemData()?.name;
|
|
185
|
+
const requestMethodView = ()=>{
|
|
186
|
+
switch(requestMethhod){
|
|
187
|
+
case "GET":
|
|
188
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
189
|
+
className: "opacity-50 group-hover/tree-item-label:opacity-100 in-data-[selected=true]:opacity-100 font-medium min-w-13 w-13 text-utility-green text-left",
|
|
190
|
+
children: "GET"
|
|
191
|
+
});
|
|
192
|
+
case "POST":
|
|
193
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
194
|
+
className: "opacity-50 group-hover/tree-item-label:opacity-100 in-data-[selected=true]:opacity-100 font-medium min-w-13 w-13 text-utility-yellow text-left",
|
|
195
|
+
children: "POST"
|
|
196
|
+
});
|
|
197
|
+
case "PUT":
|
|
198
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
199
|
+
className: "opacity-50 group-hover/tree-item-label:opacity-100 in-data-[selected=true]:opacity-100 font-medium min-w-13 w-13 text-utility-blue text-left",
|
|
200
|
+
children: "PUT"
|
|
201
|
+
});
|
|
202
|
+
case "PATCH":
|
|
203
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
204
|
+
className: "opacity-50 group-hover/tree-item-label:opacity-100 in-data-[selected=true]:opacity-100 font-medium min-w-13 w-13 text-utility-violet text-left",
|
|
205
|
+
children: "PATCH"
|
|
206
|
+
});
|
|
207
|
+
case "DELETE":
|
|
208
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
209
|
+
className: "opacity-50 group-hover/tree-item-label:opacity-100 in-data-[selected=true]:opacity-100 font-medium min-w-13 w-13 text-utility-red text-left",
|
|
210
|
+
children: "DELETE"
|
|
211
|
+
});
|
|
212
|
+
default:
|
|
213
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
214
|
+
className: "opacity-50 group-hover/tree-item-label:opacity-100 in-data-[selected=true]:opacity-100 font-medium min-w-13 w-13 text-utility-gray text-left",
|
|
215
|
+
children: "Unknown"
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
220
|
+
className: "w-full flex justify-between gap-2",
|
|
221
|
+
children: [
|
|
222
|
+
/*#__PURE__*/ _jsx("div", {
|
|
223
|
+
className: "flex items-center gap-2 truncate",
|
|
224
|
+
children: hasChildren ? itemName : /*#__PURE__*/ _jsxs(React.Fragment, {
|
|
225
|
+
children: [
|
|
226
|
+
requestMethodView(),
|
|
227
|
+
requestPath
|
|
228
|
+
]
|
|
229
|
+
})
|
|
230
|
+
}),
|
|
231
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
232
|
+
className: "gap-2 hidden group-hover/tree-item-label:flex items-center",
|
|
233
|
+
children: [
|
|
234
|
+
isRootLevel && /*#__PURE__*/ _jsx(Button, {
|
|
235
|
+
variant: "link",
|
|
236
|
+
size: "small",
|
|
237
|
+
className: "p-0 h-4",
|
|
238
|
+
children: item.getItemData()?.meta?.pinned ? /*#__PURE__*/ _jsx(PinIcon, {}) : /*#__PURE__*/ _jsx(Pin, {})
|
|
239
|
+
}),
|
|
240
|
+
hasChildren && /*#__PURE__*/ _jsx(Button, {
|
|
241
|
+
variant: "link",
|
|
242
|
+
size: "small",
|
|
243
|
+
className: "p-0 h-4",
|
|
244
|
+
children: /*#__PURE__*/ _jsx(Plus, {})
|
|
245
|
+
}),
|
|
246
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
247
|
+
variant: "link",
|
|
248
|
+
size: "small",
|
|
249
|
+
className: "p-0 h-4",
|
|
250
|
+
children: /*#__PURE__*/ _jsx(Ellipsis, {})
|
|
251
|
+
})
|
|
252
|
+
]
|
|
253
|
+
})
|
|
254
|
+
]
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
export const CustomItemView = {
|
|
258
|
+
args: {
|
|
259
|
+
items: items,
|
|
260
|
+
rootItemId: "root",
|
|
261
|
+
selectedItemId: "request11",
|
|
262
|
+
expandedItemIds: [
|
|
263
|
+
"collection3",
|
|
264
|
+
"collection4"
|
|
265
|
+
],
|
|
266
|
+
onSelectItem: (a)=>action("onSelectItem")(a.getItemData()?.name),
|
|
267
|
+
customItemView: customItemView
|
|
268
|
+
},
|
|
269
|
+
render: (args)=>/*#__PURE__*/ _jsx(TreeView, {
|
|
270
|
+
...args
|
|
271
|
+
})
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
//# sourceMappingURL=tree-view.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/tree-view.stories.tsx"],"sourcesContent":["import type { ItemInstance } from \"@headless-tree/core\";\nimport type { Meta, StoryObj } from \"@storybook/react-vite\";\nimport { Ellipsis, Pin, Plus } from \"lucide-react\";\nimport React from \"react\";\nimport { action } from \"storybook/actions\";\nimport { Button } from \"#shadcn/components/ui/button.js\";\nimport { PinIcon } from \"../icons\";\nimport type { TreeViewItem } from \"./tree-view\";\nimport { TreeView } from \"./tree-view\";\n\nconst meta: Meta<typeof TreeView> = {\n\ttitle: \"Component/Tree view\",\n\tcomponent: TreeView,\n\tparameters: {\n\t\tlayout: \"fullscreen\",\n\t},\n\ttags: [\"autodocs\"],\n};\ntype ItemMeta = {\n\tpinned?: boolean;\n\tmethod?: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"PATCH\";\n\tpath?: string;\n};\n\nexport default meta;\ntype Story = StoryObj<typeof TreeView<ItemMeta>>;\n\nconst items: Record<string, TreeViewItem<ItemMeta>> = {\n\troot: {\n\t\tname: \"Root\",\n\t\tchildren: [\"collection1\", \"collection2\", \"collection3\"],\n\t},\n\tcollection1: {\n\t\tname: \"Collection 1\",\n\t\tchildren: [\"request1\", \"request2\", \"request3\"],\n\t\tmeta: {\n\t\t\tpinned: true,\n\t\t},\n\t},\n\tcollection2: {\n\t\tname: \"Collection 2\",\n\t\tchildren: [\"request4\", \"request5\", \"request6\"],\n\t},\n\tcollection3: {\n\t\tname: \"New Collection\",\n\t\tchildren: [\n\t\t\t\"request7\",\n\t\t\t\"request8\",\n\t\t\t\"request9\",\n\t\t\t\"request10\",\n\t\t\t\"request11\",\n\t\t\t\"collection4\",\n\t\t],\n\t},\n\tcollection4: {\n\t\tname: \"New Collection\",\n\t\tchildren: [\"request12\", \"request13\", \"request14\"],\n\t},\n\trequest1: {\n\t\tmeta: {\n\t\t\tmethod: \"GET\",\n\t\t\tpath: \"/request1\",\n\t\t},\n\t\tname: \"Request 1\",\n\t},\n\trequest2: {\n\t\tmeta: {\n\t\t\tmethod: \"POST\",\n\t\t\tpath: \"/request2\",\n\t\t},\n\t\tname: \"Request 2\",\n\t},\n\trequest3: {\n\t\tmeta: {\n\t\t\tmethod: \"PUT\",\n\t\t\tpath: \"/request3\",\n\t\t},\n\t\tname: \"Request 3\",\n\t},\n\trequest4: {\n\t\tmeta: {\n\t\t\tmethod: \"DELETE\",\n\t\t\tpath: \"/request4\",\n\t\t},\n\t\tname: \"Request 4\",\n\t},\n\trequest5: {\n\t\tmeta: {\n\t\t\tmethod: \"PATCH\",\n\t\t\tpath: \"/request5\",\n\t\t},\n\t\tname: \"Request 5\",\n\t},\n\trequest6: {\n\t\tmeta: {\n\t\t\tmethod: \"GET\",\n\t\t\tpath: \"/request6\",\n\t\t},\n\t\tname: \"Request 6\",\n\t},\n\trequest7: {\n\t\tmeta: {\n\t\t\tmethod: \"PATCH\",\n\t\t\tpath: \"/fhir/Patient/123\",\n\t\t},\n\t\tname: \"Request 7\",\n\t},\n\trequest8: {\n\t\tmeta: {\n\t\t\tmethod: \"DELETE\",\n\t\t\tpath: \"/fhir/Patient/123\",\n\t\t},\n\t\tname: \"Request 8\",\n\t},\n\trequest9: {\n\t\tmeta: {\n\t\t\tmethod: \"PUT\",\n\t\t\tpath: \"/fhir/Patient/123\",\n\t\t},\n\t\tname: \"Request 9\",\n\t},\n\trequest10: {\n\t\tmeta: {\n\t\t\tmethod: \"POST\",\n\t\t\tpath: \"/fhir/Patient/123\",\n\t\t},\n\t\tname: \"Request 10\",\n\t},\n\trequest11: {\n\t\tmeta: {\n\t\t\tmethod: \"GET\",\n\t\t\tpath: \"/fhir/Patient/123\",\n\t\t},\n\t\tname: \"Request 11\",\n\t},\n\trequest12: {\n\t\tmeta: {\n\t\t\tmethod: \"PUT\",\n\t\t\tpath: \"/fhir/Patient/123\",\n\t\t},\n\t\tname: \"Request 12\",\n\t},\n\trequest13: {\n\t\tmeta: {\n\t\t\tmethod: \"PUT\",\n\t\t\tpath: \"/fhir/Patient/123\",\n\t\t},\n\t\tname: \"Request 13\",\n\t},\n\trequest14: {\n\t\tmeta: {\n\t\t\tmethod: \"PUT\",\n\t\t\tpath: \"/fhir/Patient/123\",\n\t\t},\n\t\tname: \"Request 14\",\n\t},\n};\n\nexport const Default: Story = {\n\targs: {\n\t\titems: items,\n\t\trootItemId: \"root\",\n\t\tselectedItemId: \"request9\",\n\t\texpandedItemIds: [\"collection3\"],\n\t\tonSelectItem: (a) => action(\"onSelectItem\")(a),\n\t},\n\trender: (args) => <TreeView {...args} />,\n};\n\nconst customItemView = (item: ItemInstance<TreeViewItem<ItemMeta>>) => {\n\tconst isRootLevel = item.getItemMeta().level === 0;\n\tconst hasChildren = item.getItemData()?.children !== undefined;\n\tconst requestMethhod = item.getItemData()?.meta?.method;\n\tconst requestPath = item.getItemData()?.meta?.path;\n\tconst itemName = item.getItemData()?.name;\n\n\tconst requestMethodView = () => {\n\t\tswitch (requestMethhod) {\n\t\t\tcase \"GET\":\n\t\t\t\treturn (\n\t\t\t\t\t<div className=\"opacity-50 group-hover/tree-item-label:opacity-100 in-data-[selected=true]:opacity-100 font-medium min-w-13 w-13 text-utility-green text-left\">\n\t\t\t\t\t\tGET\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\tcase \"POST\":\n\t\t\t\treturn (\n\t\t\t\t\t<div className=\"opacity-50 group-hover/tree-item-label:opacity-100 in-data-[selected=true]:opacity-100 font-medium min-w-13 w-13 text-utility-yellow text-left\">\n\t\t\t\t\t\tPOST\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\tcase \"PUT\":\n\t\t\t\treturn (\n\t\t\t\t\t<div className=\"opacity-50 group-hover/tree-item-label:opacity-100 in-data-[selected=true]:opacity-100 font-medium min-w-13 w-13 text-utility-blue text-left\">\n\t\t\t\t\t\tPUT\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\tcase \"PATCH\":\n\t\t\t\treturn (\n\t\t\t\t\t<div className=\"opacity-50 group-hover/tree-item-label:opacity-100 in-data-[selected=true]:opacity-100 font-medium min-w-13 w-13 text-utility-violet text-left\">\n\t\t\t\t\t\tPATCH\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\tcase \"DELETE\":\n\t\t\t\treturn (\n\t\t\t\t\t<div className=\"opacity-50 group-hover/tree-item-label:opacity-100 in-data-[selected=true]:opacity-100 font-medium min-w-13 w-13 text-utility-red text-left\">\n\t\t\t\t\t\tDELETE\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\tdefault:\n\t\t\t\treturn (\n\t\t\t\t\t<div className=\"opacity-50 group-hover/tree-item-label:opacity-100 in-data-[selected=true]:opacity-100 font-medium min-w-13 w-13 text-utility-gray text-left\">\n\t\t\t\t\t\tUnknown\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"w-full flex justify-between gap-2\">\n\t\t\t<div className=\"flex items-center gap-2 truncate\">\n\t\t\t\t{hasChildren ? (\n\t\t\t\t\titemName\n\t\t\t\t) : (\n\t\t\t\t\t<React.Fragment>\n\t\t\t\t\t\t{requestMethodView()}\n\t\t\t\t\t\t{requestPath}\n\t\t\t\t\t</React.Fragment>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t<div className=\"gap-2 hidden group-hover/tree-item-label:flex items-center\">\n\t\t\t\t{isRootLevel && (\n\t\t\t\t\t<Button variant=\"link\" size=\"small\" className=\"p-0 h-4\">\n\t\t\t\t\t\t{item.getItemData()?.meta?.pinned ? <PinIcon /> : <Pin />}\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t\t{hasChildren && (\n\t\t\t\t\t<Button variant=\"link\" size=\"small\" className=\"p-0 h-4\">\n\t\t\t\t\t\t<Plus />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t\t<Button variant=\"link\" size=\"small\" className=\"p-0 h-4\">\n\t\t\t\t\t<Ellipsis />\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport const CustomItemView: Story = {\n\targs: {\n\t\titems: items,\n\t\trootItemId: \"root\",\n\t\tselectedItemId: \"request11\",\n\t\texpandedItemIds: [\"collection3\", \"collection4\"],\n\t\tonSelectItem: (a) => action(\"onSelectItem\")(a.getItemData()?.name),\n\t\tcustomItemView: customItemView,\n\t},\n\trender: (args) => <TreeView {...args} />,\n};\n"],"names":["Ellipsis","Pin","Plus","React","action","Button","PinIcon","TreeView","meta","title","component","parameters","layout","tags","items","root","name","children","collection1","pinned","collection2","collection3","collection4","request1","method","path","request2","request3","request4","request5","request6","request7","request8","request9","request10","request11","request12","request13","request14","Default","args","rootItemId","selectedItemId","expandedItemIds","onSelectItem","a","render","customItemView","item","isRootLevel","getItemMeta","level","hasChildren","getItemData","undefined","requestMethhod","requestPath","itemName","requestMethodView","div","className","Fragment","variant","size","CustomItemView"],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const PlayIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const PinIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const ResourceIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const BackoneElementIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const TypCodeIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const ReferenceIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const ComplexTypeIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const UnionIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/icons.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,+CAkBpB,CAAC;AAEF,eAAO,MAAM,OAAO,+CAwBnB,CAAC;AAEF,eAAO,MAAM,YAAY,+CAgDxB,CAAC;AAEF,eAAO,MAAM,kBAAkB,+CAoB9B,CAAC;AAEF,eAAO,MAAM,WAAW,+CAgDvB,CAAC;AAEF,eAAO,MAAM,aAAa,+CAkCzB,CAAC;AAEF,eAAO,MAAM,eAAe,+CA8C3B,CAAC;AAEF,eAAO,MAAM,SAAS,+CAkCrB,CAAC"}
|