@hanzo/ui 8.27.91 → 8.29.0
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/NOTICE +25 -0
- package/README.md +1 -1
- package/dist/backends/gui/alert-dialog.cjs +24 -6
- package/dist/backends/gui/alert-dialog.d.ts +11 -3
- package/dist/backends/gui/alert-dialog.d.ts.map +1 -1
- package/dist/backends/gui/alert-dialog.js +24 -6
- package/dist/backends/gui/alert-dialog.js.map +1 -1
- package/dist/backends/gui/alert.cjs +32 -1
- package/dist/backends/gui/alert.d.ts +36 -3
- package/dist/backends/gui/alert.d.ts.map +1 -1
- package/dist/backends/gui/alert.js +32 -2
- package/dist/backends/gui/alert.js.map +1 -1
- package/dist/backends/gui/avatar-group.cjs +28 -0
- package/dist/backends/gui/avatar-group.d.ts +33 -0
- package/dist/backends/gui/avatar-group.d.ts.map +1 -0
- package/dist/backends/gui/avatar-group.js +26 -0
- package/dist/backends/gui/avatar-group.js.map +1 -0
- package/dist/backends/gui/avatar.cjs +53 -3
- package/dist/backends/gui/avatar.d.ts +46 -4
- package/dist/backends/gui/avatar.d.ts.map +1 -1
- package/dist/backends/gui/avatar.js +52 -3
- package/dist/backends/gui/avatar.js.map +1 -1
- package/dist/backends/gui/badge.cjs +40 -2
- package/dist/backends/gui/badge.d.ts +7 -2
- package/dist/backends/gui/badge.d.ts.map +1 -1
- package/dist/backends/gui/badge.js +40 -2
- package/dist/backends/gui/badge.js.map +1 -1
- package/dist/backends/gui/banner.cjs +40 -1
- package/dist/backends/gui/banner.d.ts +36 -3
- package/dist/backends/gui/banner.d.ts.map +1 -1
- package/dist/backends/gui/banner.js +42 -4
- package/dist/backends/gui/banner.js.map +1 -1
- package/dist/backends/gui/breadcrumb.cjs +28 -10
- package/dist/backends/gui/breadcrumb.d.ts +20 -11
- package/dist/backends/gui/breadcrumb.d.ts.map +1 -1
- package/dist/backends/gui/breadcrumb.js +28 -10
- package/dist/backends/gui/breadcrumb.js.map +1 -1
- package/dist/backends/gui/button-group.cjs +43 -0
- package/dist/backends/gui/button-group.d.ts +48 -0
- package/dist/backends/gui/button-group.d.ts.map +1 -0
- package/dist/backends/gui/button-group.js +40 -0
- package/dist/backends/gui/button-group.js.map +1 -0
- package/dist/backends/gui/button.cjs +177 -4
- package/dist/backends/gui/button.d.ts +69 -4
- package/dist/backends/gui/button.d.ts.map +1 -1
- package/dist/backends/gui/button.js +179 -6
- package/dist/backends/gui/button.js.map +1 -1
- package/dist/backends/gui/card.cjs +50 -21
- package/dist/backends/gui/card.d.ts +16 -7
- package/dist/backends/gui/card.d.ts.map +1 -1
- package/dist/backends/gui/card.js +50 -21
- package/dist/backends/gui/card.js.map +1 -1
- package/dist/backends/gui/checkbox.cjs +86 -14
- package/dist/backends/gui/checkbox.d.ts +30 -2
- package/dist/backends/gui/checkbox.d.ts.map +1 -1
- package/dist/backends/gui/checkbox.js +87 -15
- package/dist/backends/gui/checkbox.js.map +1 -1
- package/dist/backends/gui/chip.cjs +51 -0
- package/dist/backends/gui/chip.d.ts +47 -0
- package/dist/backends/gui/chip.d.ts.map +1 -0
- package/dist/backends/gui/chip.js +49 -0
- package/dist/backends/gui/chip.js.map +1 -0
- package/dist/backends/gui/choice.cjs +18 -3
- package/dist/backends/gui/choice.d.ts +10 -2
- package/dist/backends/gui/choice.d.ts.map +1 -1
- package/dist/backends/gui/choice.js +19 -4
- package/dist/backends/gui/choice.js.map +1 -1
- package/dist/backends/gui/code-editor.cjs +16 -5
- package/dist/backends/gui/code-editor.d.ts +18 -1
- package/dist/backends/gui/code-editor.d.ts.map +1 -1
- package/dist/backends/gui/code-editor.js +16 -5
- package/dist/backends/gui/code-editor.js.map +1 -1
- package/dist/backends/gui/color-sample.cjs +24 -0
- package/dist/backends/gui/color-sample.d.ts +23 -0
- package/dist/backends/gui/color-sample.d.ts.map +1 -0
- package/dist/backends/gui/color-sample.js +22 -0
- package/dist/backends/gui/color-sample.js.map +1 -0
- package/dist/backends/gui/control.cjs +5 -3
- package/dist/backends/gui/control.d.ts +13 -3
- package/dist/backends/gui/control.d.ts.map +1 -1
- package/dist/backends/gui/control.js +5 -3
- package/dist/backends/gui/control.js.map +1 -1
- package/dist/backends/gui/country-select.cjs +69 -0
- package/dist/backends/gui/country-select.d.ts +30 -0
- package/dist/backends/gui/country-select.d.ts.map +1 -0
- package/dist/backends/gui/country-select.js +67 -0
- package/dist/backends/gui/country-select.js.map +1 -0
- package/dist/backends/gui/currency-picker.cjs +48 -0
- package/dist/backends/gui/currency-picker.d.ts +37 -0
- package/dist/backends/gui/currency-picker.d.ts.map +1 -0
- package/dist/backends/gui/currency-picker.js +46 -0
- package/dist/backends/gui/currency-picker.js.map +1 -0
- package/dist/backends/gui/density.cjs +32 -0
- package/dist/backends/gui/density.d.ts +27 -0
- package/dist/backends/gui/density.d.ts.map +1 -0
- package/dist/backends/gui/density.js +27 -0
- package/dist/backends/gui/density.js.map +1 -0
- package/dist/backends/gui/dialog.cjs +65 -7
- package/dist/backends/gui/dialog.d.ts +68 -3
- package/dist/backends/gui/dialog.d.ts.map +1 -1
- package/dist/backends/gui/dialog.js +63 -7
- package/dist/backends/gui/dialog.js.map +1 -1
- package/dist/backends/gui/dropdown-menu.cjs +361 -31
- package/dist/backends/gui/dropdown-menu.d.ts +151 -15
- package/dist/backends/gui/dropdown-menu.d.ts.map +1 -1
- package/dist/backends/gui/dropdown-menu.js +353 -34
- package/dist/backends/gui/dropdown-menu.js.map +1 -1
- package/dist/backends/gui/feedback.cjs +78 -0
- package/dist/backends/gui/feedback.d.ts +46 -0
- package/dist/backends/gui/feedback.d.ts.map +1 -0
- package/dist/backends/gui/feedback.js +74 -0
- package/dist/backends/gui/feedback.js.map +1 -0
- package/dist/backends/gui/field.cjs +71 -14
- package/dist/backends/gui/field.d.ts +43 -3
- package/dist/backends/gui/field.d.ts.map +1 -1
- package/dist/backends/gui/field.js +69 -14
- package/dist/backends/gui/field.js.map +1 -1
- package/dist/backends/gui/flag.cjs +17 -0
- package/dist/backends/gui/flag.d.ts +9 -0
- package/dist/backends/gui/flag.d.ts.map +1 -0
- package/dist/backends/gui/flag.js +14 -0
- package/dist/backends/gui/flag.js.map +1 -0
- package/dist/backends/gui/grip.cjs +35 -3
- package/dist/backends/gui/grip.d.ts +16 -1
- package/dist/backends/gui/grip.d.ts.map +1 -1
- package/dist/backends/gui/grip.js +35 -3
- package/dist/backends/gui/grip.js.map +1 -1
- package/dist/backends/gui/heading.cjs +27 -0
- package/dist/backends/gui/heading.d.ts +8 -0
- package/dist/backends/gui/heading.d.ts.map +1 -0
- package/dist/backends/gui/heading.js +25 -0
- package/dist/backends/gui/heading.js.map +1 -0
- package/dist/backends/gui/hue.cjs +49 -0
- package/dist/backends/gui/hue.d.ts +18 -0
- package/dist/backends/gui/hue.d.ts.map +1 -0
- package/dist/backends/gui/hue.js +43 -0
- package/dist/backends/gui/hue.js.map +1 -0
- package/dist/backends/gui/icon-picker.cjs +194 -0
- package/dist/backends/gui/icon-picker.d.ts +51 -0
- package/dist/backends/gui/icon-picker.d.ts.map +1 -0
- package/dist/backends/gui/icon-picker.js +155 -0
- package/dist/backends/gui/icon-picker.js.map +1 -0
- package/dist/backends/gui/icon-tile.cjs +36 -0
- package/dist/backends/gui/icon-tile.d.ts +26 -0
- package/dist/backends/gui/icon-tile.d.ts.map +1 -0
- package/dist/backends/gui/icon-tile.js +32 -0
- package/dist/backends/gui/icon-tile.js.map +1 -0
- package/dist/backends/gui/icons.cjs +381 -0
- package/dist/backends/gui/icons.d.ts +53 -0
- package/dist/backends/gui/icons.d.ts.map +1 -0
- package/dist/backends/gui/icons.js +377 -0
- package/dist/backends/gui/icons.js.map +1 -0
- package/dist/backends/gui/image-input.cjs +78 -0
- package/dist/backends/gui/image-input.d.ts +32 -0
- package/dist/backends/gui/image-input.d.ts.map +1 -0
- package/dist/backends/gui/image-input.js +74 -0
- package/dist/backends/gui/image-input.js.map +1 -0
- package/dist/backends/gui/index.cjs +105 -7
- package/dist/backends/gui/index.d.ts +47 -2
- package/dist/backends/gui/index.d.ts.map +1 -1
- package/dist/backends/gui/index.js +37 -1
- package/dist/backends/gui/index.js.map +1 -1
- package/dist/backends/gui/input-group.cjs +49 -0
- package/dist/backends/gui/input-group.d.ts +46 -0
- package/dist/backends/gui/input-group.d.ts.map +1 -0
- package/dist/backends/gui/input-group.js +46 -0
- package/dist/backends/gui/input-group.js.map +1 -0
- package/dist/backends/gui/input.cjs +32 -4
- package/dist/backends/gui/input.d.ts +5 -1
- package/dist/backends/gui/input.d.ts.map +1 -1
- package/dist/backends/gui/input.js +33 -5
- package/dist/backends/gui/input.js.map +1 -1
- package/dist/backends/gui/item.cjs +34 -2
- package/dist/backends/gui/item.d.ts +21 -5
- package/dist/backends/gui/item.d.ts.map +1 -1
- package/dist/backends/gui/item.js +35 -3
- package/dist/backends/gui/item.js.map +1 -1
- package/dist/backends/gui/json-tree.cjs +103 -15
- package/dist/backends/gui/json-tree.d.ts +39 -3
- package/dist/backends/gui/json-tree.d.ts.map +1 -1
- package/dist/backends/gui/json-tree.js +104 -16
- package/dist/backends/gui/json-tree.js.map +1 -1
- package/dist/backends/gui/kbd.cjs +18 -2
- package/dist/backends/gui/kbd.d.ts +5 -2
- package/dist/backends/gui/kbd.d.ts.map +1 -1
- package/dist/backends/gui/kbd.js +18 -2
- package/dist/backends/gui/kbd.js.map +1 -1
- package/dist/backends/gui/label.cjs +14 -3
- package/dist/backends/gui/label.d.ts +12 -3
- package/dist/backends/gui/label.d.ts.map +1 -1
- package/dist/backends/gui/label.js +14 -3
- package/dist/backends/gui/label.js.map +1 -1
- package/dist/backends/gui/layout.cjs +5 -1
- package/dist/backends/gui/layout.d.ts +1 -1
- package/dist/backends/gui/layout.d.ts.map +1 -1
- package/dist/backends/gui/layout.js +5 -1
- package/dist/backends/gui/layout.js.map +1 -1
- package/dist/backends/gui/number-field.cjs +163 -0
- package/dist/backends/gui/number-field.d.ts +34 -0
- package/dist/backends/gui/number-field.d.ts.map +1 -0
- package/dist/backends/gui/number-field.js +160 -0
- package/dist/backends/gui/number-field.js.map +1 -0
- package/dist/backends/gui/overflowing-list.cjs +79 -0
- package/dist/backends/gui/overflowing-list.d.ts +42 -0
- package/dist/backends/gui/overflowing-list.d.ts.map +1 -0
- package/dist/backends/gui/overflowing-list.js +76 -0
- package/dist/backends/gui/overflowing-list.js.map +1 -0
- package/dist/backends/gui/phone-country-picker.cjs +60 -0
- package/dist/backends/gui/phone-country-picker.d.ts +34 -0
- package/dist/backends/gui/phone-country-picker.d.ts.map +1 -0
- package/dist/backends/gui/phone-country-picker.js +57 -0
- package/dist/backends/gui/phone-country-picker.js.map +1 -0
- package/dist/backends/gui/popover.cjs +20 -4
- package/dist/backends/gui/popover.d.ts +12 -1
- package/dist/backends/gui/popover.d.ts.map +1 -1
- package/dist/backends/gui/popover.js +21 -5
- package/dist/backends/gui/popover.js.map +1 -1
- package/dist/backends/gui/progress-ring.cjs +38 -0
- package/dist/backends/gui/progress-ring.d.ts +37 -0
- package/dist/backends/gui/progress-ring.d.ts.map +1 -0
- package/dist/backends/gui/progress-ring.js +36 -0
- package/dist/backends/gui/progress-ring.js.map +1 -0
- package/dist/backends/gui/progress.cjs +31 -7
- package/dist/backends/gui/progress.d.ts +25 -3
- package/dist/backends/gui/progress.d.ts.map +1 -1
- package/dist/backends/gui/progress.js +32 -8
- package/dist/backends/gui/progress.js.map +1 -1
- package/dist/backends/gui/radio-group.cjs +28 -2
- package/dist/backends/gui/radio-group.d.ts +20 -2
- package/dist/backends/gui/radio-group.d.ts.map +1 -1
- package/dist/backends/gui/radio-group.js +28 -2
- package/dist/backends/gui/radio-group.js.map +1 -1
- package/dist/backends/gui/search-list.cjs +62 -0
- package/dist/backends/gui/search-list.d.ts +65 -0
- package/dist/backends/gui/search-list.d.ts.map +1 -0
- package/dist/backends/gui/search-list.js +58 -0
- package/dist/backends/gui/search-list.js.map +1 -0
- package/dist/backends/gui/select.cjs +50 -16
- package/dist/backends/gui/select.d.ts +12 -3
- package/dist/backends/gui/select.d.ts.map +1 -1
- package/dist/backends/gui/select.js +51 -17
- package/dist/backends/gui/select.js.map +1 -1
- package/dist/backends/gui/shortcut.cjs +122 -0
- package/dist/backends/gui/shortcut.d.ts +58 -0
- package/dist/backends/gui/shortcut.d.ts.map +1 -0
- package/dist/backends/gui/shortcut.js +115 -0
- package/dist/backends/gui/shortcut.js.map +1 -0
- package/dist/backends/gui/skeleton.cjs +41 -10
- package/dist/backends/gui/skeleton.d.ts +46 -8
- package/dist/backends/gui/skeleton.d.ts.map +1 -1
- package/dist/backends/gui/skeleton.js +39 -8
- package/dist/backends/gui/skeleton.js.map +1 -1
- package/dist/backends/gui/snippet.cjs +12 -1
- package/dist/backends/gui/snippet.d.ts +4 -2
- package/dist/backends/gui/snippet.d.ts.map +1 -1
- package/dist/backends/gui/snippet.js +12 -1
- package/dist/backends/gui/snippet.js.map +1 -1
- package/dist/backends/gui/spinner.cjs +8 -1
- package/dist/backends/gui/spinner.d.ts +11 -2
- package/dist/backends/gui/spinner.d.ts.map +1 -1
- package/dist/backends/gui/spinner.js +9 -2
- package/dist/backends/gui/spinner.js.map +1 -1
- package/dist/backends/gui/stack-icon.cjs +17 -0
- package/dist/backends/gui/stack-icon.d.ts +15 -0
- package/dist/backends/gui/stack-icon.d.ts.map +1 -0
- package/dist/backends/gui/stack-icon.js +15 -0
- package/dist/backends/gui/stack-icon.js.map +1 -0
- package/dist/backends/gui/status.cjs +38 -1
- package/dist/backends/gui/status.d.ts +16 -2
- package/dist/backends/gui/status.d.ts.map +1 -1
- package/dist/backends/gui/status.js +38 -2
- package/dist/backends/gui/status.js.map +1 -1
- package/dist/backends/gui/stepper.cjs +73 -3
- package/dist/backends/gui/stepper.d.ts +25 -1
- package/dist/backends/gui/stepper.d.ts.map +1 -1
- package/dist/backends/gui/stepper.js +71 -5
- package/dist/backends/gui/stepper.js.map +1 -1
- package/dist/backends/gui/switch.cjs +35 -20
- package/dist/backends/gui/switch.d.ts +12 -2
- package/dist/backends/gui/switch.d.ts.map +1 -1
- package/dist/backends/gui/switch.js +35 -20
- package/dist/backends/gui/switch.js.map +1 -1
- package/dist/backends/gui/tabs.cjs +63 -17
- package/dist/backends/gui/tabs.d.ts +35 -6
- package/dist/backends/gui/tabs.d.ts.map +1 -1
- package/dist/backends/gui/tabs.js +65 -19
- package/dist/backends/gui/tabs.js.map +1 -1
- package/dist/backends/gui/tag.cjs +48 -0
- package/dist/backends/gui/tag.d.ts +53 -0
- package/dist/backends/gui/tag.d.ts.map +1 -0
- package/dist/backends/gui/tag.js +46 -0
- package/dist/backends/gui/tag.js.map +1 -0
- package/dist/backends/gui/tags.cjs +9 -2
- package/dist/backends/gui/tags.d.ts +6 -5
- package/dist/backends/gui/tags.d.ts.map +1 -1
- package/dist/backends/gui/tags.js +9 -2
- package/dist/backends/gui/tags.js.map +1 -1
- package/dist/backends/gui/textarea.cjs +22 -6
- package/dist/backends/gui/textarea.d.ts +10 -1
- package/dist/backends/gui/textarea.d.ts.map +1 -1
- package/dist/backends/gui/textarea.js +22 -6
- package/dist/backends/gui/textarea.js.map +1 -1
- package/dist/backends/gui/toaster.cjs +167 -3
- package/dist/backends/gui/toaster.d.ts +28 -2
- package/dist/backends/gui/toaster.d.ts.map +1 -1
- package/dist/backends/gui/toaster.js +167 -5
- package/dist/backends/gui/toaster.js.map +1 -1
- package/dist/backends/gui/toggle-group.cjs +13 -0
- package/dist/backends/gui/toggle-group.d.ts +7 -1
- package/dist/backends/gui/toggle-group.d.ts.map +1 -1
- package/dist/backends/gui/toggle-group.js +13 -0
- package/dist/backends/gui/toggle-group.js.map +1 -1
- package/dist/backends/gui/tooltip.cjs +29 -6
- package/dist/backends/gui/tooltip.d.ts +23 -4
- package/dist/backends/gui/tooltip.d.ts.map +1 -1
- package/dist/backends/gui/tooltip.js +31 -8
- package/dist/backends/gui/tooltip.js.map +1 -1
- package/dist/backends/gui/truncated-text.cjs +102 -0
- package/dist/backends/gui/truncated-text.d.ts +55 -0
- package/dist/backends/gui/truncated-text.d.ts.map +1 -0
- package/dist/backends/gui/truncated-text.js +97 -0
- package/dist/backends/gui/truncated-text.js.map +1 -0
- package/dist/gallery/compound.cjs +60 -0
- package/dist/gallery/compound.d.ts +2 -0
- package/dist/gallery/compound.d.ts.map +1 -0
- package/dist/gallery/compound.js +58 -0
- package/dist/gallery/compound.js.map +1 -0
- package/dist/gallery/display.cjs +47 -0
- package/dist/gallery/display.d.ts +3 -0
- package/dist/gallery/display.d.ts.map +1 -0
- package/dist/gallery/display.js +45 -0
- package/dist/gallery/display.js.map +1 -0
- package/dist/gallery/feedback.cjs +38 -0
- package/dist/gallery/feedback.d.ts +2 -0
- package/dist/gallery/feedback.d.ts.map +1 -0
- package/dist/gallery/feedback.js +36 -0
- package/dist/gallery/feedback.js.map +1 -0
- package/dist/gallery/fields.cjs +53 -0
- package/dist/gallery/fields.d.ts +2 -0
- package/dist/gallery/fields.d.ts.map +1 -0
- package/dist/gallery/fields.js +51 -0
- package/dist/gallery/fields.js.map +1 -0
- package/dist/gallery/frames.cjs +47 -0
- package/dist/gallery/frames.d.ts +2 -0
- package/dist/gallery/frames.d.ts.map +1 -0
- package/dist/gallery/frames.js +45 -0
- package/dist/gallery/frames.js.map +1 -0
- package/dist/gallery/icons.cjs +19 -0
- package/dist/gallery/icons.d.ts +2 -0
- package/dist/gallery/icons.d.ts.map +1 -0
- package/dist/gallery/icons.js +17 -0
- package/dist/gallery/icons.js.map +1 -0
- package/dist/gallery/menus.cjs +64 -0
- package/dist/gallery/menus.d.ts +15 -0
- package/dist/gallery/menus.d.ts.map +1 -0
- package/dist/gallery/menus.js +58 -0
- package/dist/gallery/menus.js.map +1 -0
- package/dist/gallery/records.cjs +34 -0
- package/dist/gallery/records.d.ts +2 -0
- package/dist/gallery/records.d.ts.map +1 -0
- package/dist/gallery/records.js +32 -0
- package/dist/gallery/records.js.map +1 -0
- package/dist/gallery/section.cjs +17 -0
- package/dist/gallery/section.d.ts +10 -0
- package/dist/gallery/section.d.ts.map +1 -0
- package/dist/gallery/section.js +14 -0
- package/dist/gallery/section.js.map +1 -0
- package/dist/gallery.cjs +8 -14
- package/dist/gallery.d.ts.map +1 -1
- package/dist/gallery.html +1594 -256
- package/dist/gallery.js +3 -9
- package/dist/gallery.js.map +1 -1
- package/dist/gui-config.cjs +33 -4
- package/dist/gui-config.d.ts +11 -3
- package/dist/gui-config.d.ts.map +1 -1
- package/dist/gui-config.js +33 -4
- package/dist/gui-config.js.map +1 -1
- package/dist/index.cjs +73 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/index.node.cjs +73 -2
- package/dist/index.node.js +10 -1
- package/dist/motion.cjs +25 -1
- package/dist/motion.d.ts +16 -1
- package/dist/motion.d.ts.map +1 -1
- package/dist/motion.js +24 -1
- package/dist/motion.js.map +1 -1
- package/dist/primitives/AvatarGroup.cjs +8 -0
- package/dist/primitives/AvatarGroup.d.ts +2 -0
- package/dist/primitives/AvatarGroup.d.ts.map +1 -0
- package/dist/primitives/AvatarGroup.js +5 -0
- package/dist/primitives/AvatarGroup.js.map +1 -0
- package/dist/primitives/BannerAction.cjs +8 -0
- package/dist/primitives/BannerAction.d.ts +2 -0
- package/dist/primitives/BannerAction.d.ts.map +1 -0
- package/dist/primitives/BannerAction.js +5 -0
- package/dist/primitives/BannerAction.js.map +1 -0
- package/dist/primitives/ButtonGroup.cjs +8 -0
- package/dist/primitives/ButtonGroup.d.ts +2 -0
- package/dist/primitives/ButtonGroup.d.ts.map +1 -0
- package/dist/primitives/ButtonGroup.js +5 -0
- package/dist/primitives/ButtonGroup.js.map +1 -0
- package/dist/primitives/ButtonGroupContext.cjs +8 -0
- package/dist/primitives/ButtonGroupContext.d.ts +2 -0
- package/dist/primitives/ButtonGroupContext.d.ts.map +1 -0
- package/dist/primitives/ButtonGroupContext.js +5 -0
- package/dist/primitives/ButtonGroupContext.js.map +1 -0
- package/dist/primitives/CONCEPTS.cjs +8 -0
- package/dist/primitives/CONCEPTS.d.ts +2 -0
- package/dist/primitives/CONCEPTS.d.ts.map +1 -0
- package/dist/primitives/CONCEPTS.js +5 -0
- package/dist/primitives/CONCEPTS.js.map +1 -0
- package/dist/primitives/CalloutAction.cjs +8 -0
- package/dist/primitives/CalloutAction.d.ts +2 -0
- package/dist/primitives/CalloutAction.d.ts.map +1 -0
- package/dist/primitives/CalloutAction.js +5 -0
- package/dist/primitives/CalloutAction.js.map +1 -0
- package/dist/primitives/Chip.cjs +8 -0
- package/dist/primitives/Chip.d.ts +2 -0
- package/dist/primitives/Chip.d.ts.map +1 -0
- package/dist/primitives/Chip.js +5 -0
- package/dist/primitives/Chip.js.map +1 -0
- package/dist/primitives/ColorSample.cjs +8 -0
- package/dist/primitives/ColorSample.d.ts +2 -0
- package/dist/primitives/ColorSample.d.ts.map +1 -0
- package/dist/primitives/ColorSample.js +5 -0
- package/dist/primitives/ColorSample.js.map +1 -0
- package/dist/primitives/CountrySelect.cjs +8 -0
- package/dist/primitives/CountrySelect.d.ts +2 -0
- package/dist/primitives/CountrySelect.d.ts.map +1 -0
- package/dist/primitives/CountrySelect.js +5 -0
- package/dist/primitives/CountrySelect.js.map +1 -0
- package/dist/primitives/CurrencyPicker.cjs +8 -0
- package/dist/primitives/CurrencyPicker.d.ts +2 -0
- package/dist/primitives/CurrencyPicker.d.ts.map +1 -0
- package/dist/primitives/CurrencyPicker.js +5 -0
- package/dist/primitives/CurrencyPicker.js.map +1 -0
- package/dist/primitives/Density.cjs +8 -0
- package/dist/primitives/Density.d.ts +2 -0
- package/dist/primitives/Density.d.ts.map +1 -0
- package/dist/primitives/Density.js +5 -0
- package/dist/primitives/Density.js.map +1 -0
- package/dist/primitives/DialogBody.cjs +8 -0
- package/dist/primitives/DialogBody.d.ts +2 -0
- package/dist/primitives/DialogBody.d.ts.map +1 -0
- package/dist/primitives/DialogBody.js +5 -0
- package/dist/primitives/DialogBody.js.map +1 -0
- package/dist/primitives/DropdownMenuBack.cjs +8 -0
- package/dist/primitives/DropdownMenuBack.d.ts +2 -0
- package/dist/primitives/DropdownMenuBack.d.ts.map +1 -0
- package/dist/primitives/DropdownMenuBack.js +5 -0
- package/dist/primitives/DropdownMenuBack.js.map +1 -0
- package/dist/primitives/DropdownMenuClose.cjs +8 -0
- package/dist/primitives/DropdownMenuClose.d.ts +2 -0
- package/dist/primitives/DropdownMenuClose.d.ts.map +1 -0
- package/dist/primitives/DropdownMenuClose.js +5 -0
- package/dist/primitives/DropdownMenuClose.js.map +1 -0
- package/dist/primitives/DropdownMenuEmpty.cjs +8 -0
- package/dist/primitives/DropdownMenuEmpty.d.ts +2 -0
- package/dist/primitives/DropdownMenuEmpty.d.ts.map +1 -0
- package/dist/primitives/DropdownMenuEmpty.js +5 -0
- package/dist/primitives/DropdownMenuEmpty.js.map +1 -0
- package/dist/primitives/DropdownMenuHeader.cjs +8 -0
- package/dist/primitives/DropdownMenuHeader.d.ts +2 -0
- package/dist/primitives/DropdownMenuHeader.d.ts.map +1 -0
- package/dist/primitives/DropdownMenuHeader.js +5 -0
- package/dist/primitives/DropdownMenuHeader.js.map +1 -0
- package/dist/primitives/DropdownMenuLoading.cjs +8 -0
- package/dist/primitives/DropdownMenuLoading.d.ts +2 -0
- package/dist/primitives/DropdownMenuLoading.d.ts.map +1 -0
- package/dist/primitives/DropdownMenuLoading.js +5 -0
- package/dist/primitives/DropdownMenuLoading.js.map +1 -0
- package/dist/primitives/DropdownMenuOptionItem.cjs +8 -0
- package/dist/primitives/DropdownMenuOptionItem.d.ts +2 -0
- package/dist/primitives/DropdownMenuOptionItem.d.ts.map +1 -0
- package/dist/primitives/DropdownMenuOptionItem.js +5 -0
- package/dist/primitives/DropdownMenuOptionItem.js.map +1 -0
- package/dist/primitives/DropdownMenuPage.cjs +8 -0
- package/dist/primitives/DropdownMenuPage.d.ts +2 -0
- package/dist/primitives/DropdownMenuPage.d.ts.map +1 -0
- package/dist/primitives/DropdownMenuPage.js +5 -0
- package/dist/primitives/DropdownMenuPage.js.map +1 -0
- package/dist/primitives/DropdownMenuSearch.cjs +8 -0
- package/dist/primitives/DropdownMenuSearch.d.ts +2 -0
- package/dist/primitives/DropdownMenuSearch.d.ts.map +1 -0
- package/dist/primitives/DropdownMenuSearch.js +5 -0
- package/dist/primitives/DropdownMenuSearch.js.map +1 -0
- package/dist/primitives/DropdownMenuSection.cjs +8 -0
- package/dist/primitives/DropdownMenuSection.d.ts +2 -0
- package/dist/primitives/DropdownMenuSection.d.ts.map +1 -0
- package/dist/primitives/DropdownMenuSection.js +5 -0
- package/dist/primitives/DropdownMenuSection.js.map +1 -0
- package/dist/primitives/DropdownMenuSelectionGroup.cjs +8 -0
- package/dist/primitives/DropdownMenuSelectionGroup.d.ts +2 -0
- package/dist/primitives/DropdownMenuSelectionGroup.d.ts.map +1 -0
- package/dist/primitives/DropdownMenuSelectionGroup.js +5 -0
- package/dist/primitives/DropdownMenuSelectionGroup.js.map +1 -0
- package/dist/primitives/DropdownMenuTitle.cjs +8 -0
- package/dist/primitives/DropdownMenuTitle.d.ts +2 -0
- package/dist/primitives/DropdownMenuTitle.d.ts.map +1 -0
- package/dist/primitives/DropdownMenuTitle.js +5 -0
- package/dist/primitives/DropdownMenuTitle.js.map +1 -0
- package/dist/primitives/FIELD_ICONS.cjs +8 -0
- package/dist/primitives/FIELD_ICONS.d.ts +2 -0
- package/dist/primitives/FIELD_ICONS.d.ts.map +1 -0
- package/dist/primitives/FIELD_ICONS.js +5 -0
- package/dist/primitives/FIELD_ICONS.js.map +1 -0
- package/dist/primitives/Glyph.cjs +8 -0
- package/dist/primitives/Glyph.d.ts +2 -0
- package/dist/primitives/Glyph.d.ts.map +1 -0
- package/dist/primitives/Glyph.js +5 -0
- package/dist/primitives/Glyph.js.map +1 -0
- package/dist/primitives/Heading.cjs +2 -2
- package/dist/primitives/Heading.d.ts +1 -1
- package/dist/primitives/Heading.d.ts.map +1 -1
- package/dist/primitives/Heading.js +1 -1
- package/dist/primitives/Heading.js.map +1 -1
- package/dist/primitives/IconPicker.cjs +8 -0
- package/dist/primitives/IconPicker.d.ts +2 -0
- package/dist/primitives/IconPicker.d.ts.map +1 -0
- package/dist/primitives/IconPicker.js +5 -0
- package/dist/primitives/IconPicker.js.map +1 -0
- package/dist/primitives/IconTile.cjs +8 -0
- package/dist/primitives/IconTile.d.ts +2 -0
- package/dist/primitives/IconTile.d.ts.map +1 -0
- package/dist/primitives/IconTile.js +5 -0
- package/dist/primitives/IconTile.js.map +1 -0
- package/dist/primitives/ImageInput.cjs +8 -0
- package/dist/primitives/ImageInput.d.ts +2 -0
- package/dist/primitives/ImageInput.d.ts.map +1 -0
- package/dist/primitives/ImageInput.js +5 -0
- package/dist/primitives/ImageInput.js.map +1 -0
- package/dist/primitives/InputGroup.cjs +8 -0
- package/dist/primitives/InputGroup.d.ts +2 -0
- package/dist/primitives/InputGroup.d.ts.map +1 -0
- package/dist/primitives/InputGroup.js +5 -0
- package/dist/primitives/InputGroup.js.map +1 -0
- package/dist/primitives/NumberField.cjs +8 -0
- package/dist/primitives/NumberField.d.ts +2 -0
- package/dist/primitives/NumberField.d.ts.map +1 -0
- package/dist/primitives/NumberField.js +5 -0
- package/dist/primitives/NumberField.js.map +1 -0
- package/dist/primitives/OverflowingList.cjs +8 -0
- package/dist/primitives/OverflowingList.d.ts +2 -0
- package/dist/primitives/OverflowingList.d.ts.map +1 -0
- package/dist/primitives/OverflowingList.js +5 -0
- package/dist/primitives/OverflowingList.js.map +1 -0
- package/dist/primitives/PhoneCountryPicker.cjs +8 -0
- package/dist/primitives/PhoneCountryPicker.d.ts +2 -0
- package/dist/primitives/PhoneCountryPicker.d.ts.map +1 -0
- package/dist/primitives/PhoneCountryPicker.js +5 -0
- package/dist/primitives/PhoneCountryPicker.js.map +1 -0
- package/dist/primitives/ProgressRing.cjs +8 -0
- package/dist/primitives/ProgressRing.d.ts +2 -0
- package/dist/primitives/ProgressRing.d.ts.map +1 -0
- package/dist/primitives/ProgressRing.js +5 -0
- package/dist/primitives/ProgressRing.js.map +1 -0
- package/dist/primitives/RadioCircle.cjs +8 -0
- package/dist/primitives/RadioCircle.d.ts +2 -0
- package/dist/primitives/RadioCircle.d.ts.map +1 -0
- package/dist/primitives/RadioCircle.js +5 -0
- package/dist/primitives/RadioCircle.js.map +1 -0
- package/dist/primitives/SKELETON_HEIGHT.cjs +8 -0
- package/dist/primitives/SKELETON_HEIGHT.d.ts +2 -0
- package/dist/primitives/SKELETON_HEIGHT.d.ts.map +1 -0
- package/dist/primitives/SKELETON_HEIGHT.js +5 -0
- package/dist/primitives/SKELETON_HEIGHT.js.map +1 -0
- package/dist/primitives/STATUS_COLOR.cjs +8 -0
- package/dist/primitives/STATUS_COLOR.d.ts +2 -0
- package/dist/primitives/STATUS_COLOR.d.ts.map +1 -0
- package/dist/primitives/STATUS_COLOR.js +5 -0
- package/dist/primitives/STATUS_COLOR.js.map +1 -0
- package/dist/primitives/STATUS_HUE.cjs +8 -0
- package/dist/primitives/STATUS_HUE.d.ts +2 -0
- package/dist/primitives/STATUS_HUE.d.ts.map +1 -0
- package/dist/primitives/STATUS_HUE.js +5 -0
- package/dist/primitives/STATUS_HUE.js.map +1 -0
- package/dist/primitives/STATUS_PAINT.cjs +8 -0
- package/dist/primitives/STATUS_PAINT.d.ts +2 -0
- package/dist/primitives/STATUS_PAINT.d.ts.map +1 -0
- package/dist/primitives/STATUS_PAINT.js +5 -0
- package/dist/primitives/STATUS_PAINT.js.map +1 -0
- package/dist/primitives/Shortcut.cjs +8 -0
- package/dist/primitives/Shortcut.d.ts +2 -0
- package/dist/primitives/Shortcut.d.ts.map +1 -0
- package/dist/primitives/Shortcut.js +5 -0
- package/dist/primitives/Shortcut.js.map +1 -0
- package/dist/primitives/StackIcon.cjs +8 -0
- package/dist/primitives/StackIcon.d.ts +2 -0
- package/dist/primitives/StackIcon.d.ts.map +1 -0
- package/dist/primitives/StackIcon.js +5 -0
- package/dist/primitives/StackIcon.js.map +1 -0
- package/dist/primitives/TABLER.cjs +8 -0
- package/dist/primitives/TABLER.d.ts +2 -0
- package/dist/primitives/TABLER.d.ts.map +1 -0
- package/dist/primitives/TABLER.js +5 -0
- package/dist/primitives/TABLER.js.map +1 -0
- package/dist/primitives/TOAST_DURATION.cjs +8 -0
- package/dist/primitives/TOAST_DURATION.d.ts +2 -0
- package/dist/primitives/TOAST_DURATION.d.ts.map +1 -0
- package/dist/primitives/TOAST_DURATION.js +5 -0
- package/dist/primitives/TOAST_DURATION.js.map +1 -0
- package/dist/primitives/Tag.cjs +8 -0
- package/dist/primitives/Tag.d.ts +2 -0
- package/dist/primitives/Tag.d.ts.map +1 -0
- package/dist/primitives/Tag.js +5 -0
- package/dist/primitives/Tag.js.map +1 -0
- package/dist/primitives/ToastCard.cjs +8 -0
- package/dist/primitives/ToastCard.d.ts +2 -0
- package/dist/primitives/ToastCard.d.ts.map +1 -0
- package/dist/primitives/ToastCard.js +5 -0
- package/dist/primitives/ToastCard.js.map +1 -0
- package/dist/primitives/ToastFace.cjs +8 -0
- package/dist/primitives/ToastFace.d.ts +2 -0
- package/dist/primitives/ToastFace.d.ts.map +1 -0
- package/dist/primitives/ToastFace.js +5 -0
- package/dist/primitives/ToastFace.js.map +1 -0
- package/dist/primitives/TruncatedText.cjs +8 -0
- package/dist/primitives/TruncatedText.d.ts +2 -0
- package/dist/primitives/TruncatedText.d.ts.map +1 -0
- package/dist/primitives/TruncatedText.js +5 -0
- package/dist/primitives/TruncatedText.js.map +1 -0
- package/dist/primitives/TruncatedTextProvider.cjs +8 -0
- package/dist/primitives/TruncatedTextProvider.d.ts +2 -0
- package/dist/primitives/TruncatedTextProvider.d.ts.map +1 -0
- package/dist/primitives/TruncatedTextProvider.js +5 -0
- package/dist/primitives/TruncatedTextProvider.js.map +1 -0
- package/dist/primitives/VisuallyHidden.cjs +8 -0
- package/dist/primitives/VisuallyHidden.d.ts +2 -0
- package/dist/primitives/VisuallyHidden.d.ts.map +1 -0
- package/dist/primitives/VisuallyHidden.js +5 -0
- package/dist/primitives/VisuallyHidden.js.map +1 -0
- package/dist/primitives/fieldSize.cjs +8 -0
- package/dist/primitives/fieldSize.d.ts +2 -0
- package/dist/primitives/fieldSize.d.ts.map +1 -0
- package/dist/primitives/fieldSize.js +5 -0
- package/dist/primitives/fieldSize.js.map +1 -0
- package/dist/primitives/flag.cjs +8 -0
- package/dist/primitives/flag.d.ts +2 -0
- package/dist/primitives/flag.d.ts.map +1 -0
- package/dist/primitives/flag.js +5 -0
- package/dist/primitives/flag.js.map +1 -0
- package/dist/primitives/formatShortcut.cjs +8 -0
- package/dist/primitives/formatShortcut.d.ts +2 -0
- package/dist/primitives/formatShortcut.d.ts.map +1 -0
- package/dist/primitives/formatShortcut.js +5 -0
- package/dist/primitives/formatShortcut.js.map +1 -0
- package/dist/primitives/iconWords.cjs +8 -0
- package/dist/primitives/iconWords.d.ts +2 -0
- package/dist/primitives/iconWords.d.ts.map +1 -0
- package/dist/primitives/iconWords.js +5 -0
- package/dist/primitives/iconWords.js.map +1 -0
- package/dist/primitives/initialOf.cjs +8 -0
- package/dist/primitives/initialOf.d.ts +2 -0
- package/dist/primitives/initialOf.d.ts.map +1 -0
- package/dist/primitives/initialOf.js +5 -0
- package/dist/primitives/initialOf.js.map +1 -0
- package/dist/primitives/loadIcons.cjs +8 -0
- package/dist/primitives/loadIcons.d.ts +2 -0
- package/dist/primitives/loadIcons.d.ts.map +1 -0
- package/dist/primitives/loadIcons.js +5 -0
- package/dist/primitives/loadIcons.js.map +1 -0
- package/dist/primitives/parseNumber.cjs +8 -0
- package/dist/primitives/parseNumber.d.ts +2 -0
- package/dist/primitives/parseNumber.d.ts.map +1 -0
- package/dist/primitives/parseNumber.js +5 -0
- package/dist/primitives/parseNumber.js.map +1 -0
- package/dist/primitives/resolveIcon.cjs +8 -0
- package/dist/primitives/resolveIcon.d.ts +2 -0
- package/dist/primitives/resolveIcon.d.ts.map +1 -0
- package/dist/primitives/resolveIcon.js +5 -0
- package/dist/primitives/resolveIcon.js.map +1 -0
- package/dist/primitives/speakShortcut.cjs +8 -0
- package/dist/primitives/speakShortcut.d.ts +2 -0
- package/dist/primitives/speakShortcut.d.ts.map +1 -0
- package/dist/primitives/speakShortcut.js +5 -0
- package/dist/primitives/speakShortcut.js.map +1 -0
- package/dist/primitives/tileTones.cjs +8 -0
- package/dist/primitives/tileTones.d.ts +2 -0
- package/dist/primitives/tileTones.d.ts.map +1 -0
- package/dist/primitives/tileTones.js +5 -0
- package/dist/primitives/tileTones.js.map +1 -0
- package/dist/primitives/useDensity.cjs +8 -0
- package/dist/primitives/useDensity.d.ts +2 -0
- package/dist/primitives/useDensity.d.ts.map +1 -0
- package/dist/primitives/useDensity.js +5 -0
- package/dist/primitives/useDensity.js.map +1 -0
- package/dist/primitives/useField.cjs +8 -0
- package/dist/primitives/useField.d.ts +2 -0
- package/dist/primitives/useField.d.ts.map +1 -0
- package/dist/primitives/useField.js +5 -0
- package/dist/primitives/useField.js.map +1 -0
- package/dist/primitives/useIcons.cjs +8 -0
- package/dist/primitives/useIcons.d.ts +2 -0
- package/dist/primitives/useIcons.d.ts.map +1 -0
- package/dist/primitives/useIcons.js +5 -0
- package/dist/primitives/useIcons.js.map +1 -0
- package/dist/product/ComboBox.cjs +25 -7
- package/dist/product/ComboBox.d.ts +3 -1
- package/dist/product/ComboBox.d.ts.map +1 -1
- package/dist/product/ComboBox.js +25 -7
- package/dist/product/ComboBox.js.map +1 -1
- package/dist/product/CommandMenu.cjs +137 -0
- package/dist/product/CommandMenu.d.ts +77 -0
- package/dist/product/CommandMenu.d.ts.map +1 -0
- package/dist/product/CommandMenu.js +134 -0
- package/dist/product/CommandMenu.js.map +1 -0
- package/dist/product/DetailPane.cjs +154 -12
- package/dist/product/DetailPane.d.ts +80 -2
- package/dist/product/DetailPane.d.ts.map +1 -1
- package/dist/product/DetailPane.js +153 -16
- package/dist/product/DetailPane.js.map +1 -1
- package/dist/product/Fact.cjs +6 -1
- package/dist/product/Fact.d.ts +16 -1
- package/dist/product/Fact.d.ts.map +1 -1
- package/dist/product/Fact.js +6 -1
- package/dist/product/Fact.js.map +1 -1
- package/dist/product/Field.cjs +14 -2
- package/dist/product/Field.d.ts +16 -1
- package/dist/product/Field.d.ts.map +1 -1
- package/dist/product/Field.js +14 -2
- package/dist/product/Field.js.map +1 -1
- package/dist/product/Filters.cjs +61 -9
- package/dist/product/Filters.d.ts +37 -6
- package/dist/product/Filters.d.ts.map +1 -1
- package/dist/product/Filters.js +62 -10
- package/dist/product/Filters.js.map +1 -1
- package/dist/product/MenuRow.cjs +81 -2
- package/dist/product/MenuRow.d.ts +76 -6
- package/dist/product/MenuRow.d.ts.map +1 -1
- package/dist/product/MenuRow.js +81 -4
- package/dist/product/MenuRow.js.map +1 -1
- package/dist/product/PrimaryButton.cjs +5 -1
- package/dist/product/PrimaryButton.d.ts +8 -0
- package/dist/product/PrimaryButton.d.ts.map +1 -1
- package/dist/product/PrimaryButton.js +5 -1
- package/dist/product/PrimaryButton.js.map +1 -1
- package/dist/product/Skeleton.cjs +7 -6
- package/dist/product/Skeleton.d.ts +3 -20
- package/dist/product/Skeleton.d.ts.map +1 -1
- package/dist/product/Skeleton.js +8 -7
- package/dist/product/Skeleton.js.map +1 -1
- package/dist/product/index.cjs +2 -0
- package/dist/product/index.d.ts +1 -0
- package/dist/product/index.d.ts.map +1 -1
- package/dist/product/index.js +2 -0
- package/dist/product/index.js.map +1 -1
- package/dist/settings/Section.cjs +11 -2
- package/dist/settings/Section.d.ts +8 -1
- package/dist/settings/Section.d.ts.map +1 -1
- package/dist/settings/Section.js +11 -2
- package/dist/settings/Section.js.map +1 -1
- package/dist/styles/motion.css +70 -0
- package/dist/styles.css +1460 -127
- package/dist/theme.css +944 -0
- package/package.json +2 -1
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
'use client';"use strict";
|
|
2
2
|
'use client';
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PANE = exports.usePane = void 0;
|
|
4
5
|
exports.useDetailPane = useDetailPane;
|
|
5
6
|
exports.DetailPane = DetailPane;
|
|
7
|
+
exports.PaneBar = PaneBar;
|
|
8
|
+
exports.PaneBody = PaneBody;
|
|
9
|
+
exports.PaneFoot = PaneFoot;
|
|
6
10
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
11
|
/**
|
|
8
12
|
* DetailPane — the ONE reusable right-side pane for viewing or editing the
|
|
@@ -19,28 +23,166 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
19
23
|
* The last descriptor stays mounted through the close transition, so the exit
|
|
20
24
|
* animates with its content (no flash of empty pane). Opening a new
|
|
21
25
|
* descriptor replaces it.
|
|
26
|
+
*
|
|
27
|
+
* A pane is a STACK of pages. `open` starts a new stack, `push` lays a page on
|
|
28
|
+
* top (a relation opened from a record, a step of a flow), `back` takes it off;
|
|
29
|
+
* the top bar shows a back button while there is a page under the current one.
|
|
30
|
+
*
|
|
31
|
+
* Two modes, chosen by the shell:
|
|
32
|
+
*
|
|
33
|
+
* overlay (default) the SlideOver above the page, with its scrim — the
|
|
34
|
+
* console's contract, unchanged.
|
|
35
|
+
* docked a column in the layout row beside the page content: no scrim, the
|
|
36
|
+
* content narrows. 400 wide, resizable 320–600 from its leading edge
|
|
37
|
+
* by the kit's one resizer (Grip), the width kept per person
|
|
38
|
+
* (useSpan). The width animates 0 ↔ W while the page inside keeps the
|
|
39
|
+
* target width, so it never reflows mid-slide. Below lg it is the
|
|
40
|
+
* overlay again, full screen.
|
|
41
|
+
*
|
|
42
|
+
* A docked pane — or any pane under `<Density value="compact">` — draws the
|
|
43
|
+
* record frame (twenty-ui's side panel, MIT, NOTICE): a 48px top bar on the
|
|
44
|
+
* panel ground (back · icon + title · page actions · expand · close), a body
|
|
45
|
+
* that scrolls without chaining, and a footer on the panel ground with its
|
|
46
|
+
* actions at the end. An overlay pane at regular density keeps the header it
|
|
47
|
+
* always had. A page that draws itself (`bare`, a command menu, a search)
|
|
48
|
+
* composes the same frame from `PaneBar`, `PaneBody` and `PaneFoot`.
|
|
49
|
+
*
|
|
50
|
+
* Escape closes a docked pane while focus is inside it (the overlay's
|
|
51
|
+
* SlideOver already does); ⌘/Ctrl+Enter runs the page's `onExpand`.
|
|
22
52
|
*/
|
|
23
53
|
const react_1 = require("react");
|
|
24
54
|
const gui_1 = require("@hanzo/gui");
|
|
25
55
|
const lucide_icons_2_1 = require("@hanzogui/lucide-icons-2");
|
|
26
56
|
const SlideOver_1 = require("./SlideOver.cjs");
|
|
27
57
|
const color_1 = require("./color.cjs");
|
|
28
|
-
const
|
|
58
|
+
const button_1 = require("../backends/gui/button.cjs");
|
|
59
|
+
const tooltip_1 = require("../backends/gui/tooltip.cjs");
|
|
60
|
+
const grip_1 = require("../backends/gui/grip.cjs");
|
|
61
|
+
const span_1 = require("../backends/gui/span.cjs");
|
|
62
|
+
const density_1 = require("../backends/gui/density.cjs");
|
|
63
|
+
const slot_1 = require("../backends/gui/slot.cjs");
|
|
64
|
+
const Ctx = /* @__PURE__ */ (0, react_1.createContext)(null);
|
|
65
|
+
/** The page being drawn, for the bar a bare page composes. */
|
|
66
|
+
const PageCtx = /* @__PURE__ */ (0, react_1.createContext)(null);
|
|
67
|
+
/** The pane this sits in, or null outside one — for a page that adapts to being in a pane. */
|
|
68
|
+
const usePane = () => (0, react_1.useContext)(Ctx);
|
|
69
|
+
exports.usePane = usePane;
|
|
29
70
|
function useDetailPane() {
|
|
30
71
|
const ctx = (0, react_1.useContext)(Ctx);
|
|
31
72
|
if (!ctx)
|
|
32
73
|
throw new Error('useDetailPane must be used within <DetailPane>');
|
|
33
74
|
return ctx;
|
|
34
75
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
|
|
76
|
+
/** The record frame's measures (twenty-ui's side panel, MIT). */
|
|
77
|
+
exports.PANE = { w: 400, min: 320, max: 600, bar: 48, icon: 16 };
|
|
78
|
+
function DetailPane({ children, zIndex, mode = 'overlay', store = 'hanzo.pane' }) {
|
|
79
|
+
// One state, so every transition is one pure update: whether it is open, and
|
|
80
|
+
// the pages it holds (kept through a close, so the exit animates with them).
|
|
81
|
+
const [state, setState] = (0, react_1.useState)({ open: false, stack: [] });
|
|
82
|
+
const { open: isOpen, stack } = state;
|
|
83
|
+
const density = (0, density_1.useDensity)();
|
|
84
|
+
const media = (0, gui_1.useMedia)();
|
|
85
|
+
const docked = mode === 'docked' && !!media.lg;
|
|
86
|
+
const record = mode === 'docked' || density === 'compact';
|
|
87
|
+
const open = (0, react_1.useCallback)((descriptor) => setState({ open: true, stack: [descriptor] }), []);
|
|
88
|
+
const push = (0, react_1.useCallback)((descriptor) => setState((s) => ({ open: true, stack: s.open ? [...s.stack, descriptor] : [descriptor] })), []);
|
|
89
|
+
const close = (0, react_1.useCallback)(() => setState((s) => ({ ...s, open: false })), []);
|
|
90
|
+
const back = (0, react_1.useCallback)(() => setState((s) => (s.stack.length > 1 ? { ...s, stack: s.stack.slice(0, -1) } : { ...s, open: false })), []);
|
|
91
|
+
const depth = isOpen ? stack.length : 0;
|
|
92
|
+
const api = (0, react_1.useMemo)(() => ({ open, push, back, close, isOpen, depth }), [open, push, back, close, isOpen, depth]);
|
|
93
|
+
const desc = stack[stack.length - 1] ?? null;
|
|
94
|
+
const title = typeof desc?.title === 'string' ? desc.title : 'Details';
|
|
95
|
+
const page = desc ? ((0, jsx_runtime_1.jsx)(PageCtx.Provider, { value: desc, children: record || desc.bare ? (0, jsx_runtime_1.jsx)(RecordPage, { desc: desc }) : (0, jsx_runtime_1.jsx)(SheetPage, { desc: desc, close: close }) })) : null;
|
|
96
|
+
if (docked)
|
|
97
|
+
return ((0, jsx_runtime_1.jsx)(Ctx.Provider, { value: api, children: (0, jsx_runtime_1.jsxs)(gui_1.XStack, { ...(0, slot_1.slot)('detail-pane-row'), flex: 1, minW: 0, minH: 0, self: "stretch", children: [(0, jsx_runtime_1.jsx)(gui_1.YStack, { flex: 1, minW: 0, minH: 0, children: children }), (0, jsx_runtime_1.jsx)(Dock, { open: isOpen, title: title, store: store, onClose: close, onExpand: desc?.onExpand, children: page })] }) }));
|
|
98
|
+
return ((0, jsx_runtime_1.jsxs)(Ctx.Provider, { value: api, children: [children, (0, jsx_runtime_1.jsx)(SlideOver_1.SlideOver, { open: isOpen, onClose: close, side: "right", size: desc?.size ?? (record ? exports.PANE.w : 460), ariaLabel: title, zIndex: zIndex, children: record && desc ? ((0, jsx_runtime_1.jsx)(gui_1.YStack, { flex: 1, minH: 0, bg: "$background", onKeyDown: expandKey(desc.onExpand), children: page })) : (page) })] }));
|
|
99
|
+
}
|
|
100
|
+
/** ⌘/Ctrl+Enter runs `onExpand`, from anywhere inside the pane. */
|
|
101
|
+
const expandKey = (onExpand) => (e) => {
|
|
102
|
+
if (!onExpand || e.key !== 'Enter' || !(e.metaKey || e.ctrlKey))
|
|
103
|
+
return;
|
|
104
|
+
e.preventDefault?.();
|
|
105
|
+
onExpand();
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* The docked column. The OUTER box is what animates and what the Grip measures
|
|
109
|
+
* (its width is the pane's); the INNER box holds the target width throughout, so
|
|
110
|
+
* the page slides in already laid out.
|
|
111
|
+
*/
|
|
112
|
+
function Dock({ open, title, store, onClose, onExpand, children, }) {
|
|
113
|
+
const span = (0, span_1.useSpan)(store, exports.PANE.w, exports.PANE.min, exports.PANE.max);
|
|
114
|
+
const node = (0, react_1.useRef)(null);
|
|
115
|
+
const opener = (0, react_1.useRef)(null);
|
|
116
|
+
// Focus moves in when the pane opens and back to what opened it when it shuts:
|
|
117
|
+
// a docked pane is not modal, but a keyboard has to be able to reach it.
|
|
118
|
+
(0, react_1.useEffect)(() => {
|
|
119
|
+
if (!open || typeof document === 'undefined')
|
|
120
|
+
return;
|
|
121
|
+
opener.current = document.activeElement;
|
|
122
|
+
const t = window.setTimeout(() => node.current?.focus?.(), 0);
|
|
123
|
+
return () => {
|
|
124
|
+
window.clearTimeout(t);
|
|
125
|
+
const back = opener.current;
|
|
126
|
+
if (back instanceof HTMLElement && node.current?.contains(document.activeElement))
|
|
127
|
+
back.focus();
|
|
128
|
+
};
|
|
129
|
+
}, [open]);
|
|
130
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.YStack, { ref: ((el) => {
|
|
131
|
+
span.ref(el);
|
|
132
|
+
node.current = el instanceof HTMLElement ? el : null;
|
|
133
|
+
}), ...(0, slot_1.slot)('detail-pane'), "data-mode": "docked", "data-open": open ? '' : undefined, role: "complementary", "aria-label": title, "aria-hidden": !open, ...(!open ? { inert: true } : null), tabIndex: -1, position: "relative", shrink: 0, self: "stretch", overflow: "hidden", outlineWidth: 0, onKeyDown: ((e) => {
|
|
134
|
+
if (e.key === 'Escape' && !e.defaultPrevented) {
|
|
135
|
+
e.preventDefault?.();
|
|
136
|
+
onClose();
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
expandKey(onExpand)(e);
|
|
140
|
+
}), style: {
|
|
141
|
+
...span.style,
|
|
142
|
+
width: open ? 'var(--span)' : 0,
|
|
143
|
+
transition: 'width var(--duration-base, 300ms) var(--ease-out, ease)',
|
|
144
|
+
}, children: [(0, jsx_runtime_1.jsx)(gui_1.YStack, { width: "var(--span)", flex: 1, minH: 0, bg: "$background", borderLeftWidth: 1, borderColor: "$borderColor", children: children }), open ? ((0, jsx_runtime_1.jsx)(grip_1.Grip, { side: "right", span: span.span, floor: exports.PANE.min, ceil: exports.PANE.max, reset: exports.PANE.w, bar: "edge", label: "Resize side panel", onSpan: span.move, onKeep: span.keep, onShut: onClose })) : null] }));
|
|
145
|
+
}
|
|
146
|
+
/** The record frame of one page: the bar, the scrolling body, the footer. */
|
|
147
|
+
function RecordPage({ desc }) {
|
|
148
|
+
if (desc.bare)
|
|
149
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: desc.content });
|
|
150
|
+
const Icon = desc.icon;
|
|
151
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(PaneBar, { actions: desc.actions, children: [Icon ? (0, jsx_runtime_1.jsx)(Icon, { size: exports.PANE.icon, color: desc.iconColor ? (0, color_1.asColor)(desc.iconColor) : '$aside' }) : null, (0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$2", fontWeight: "500", color: "$ink", numberOfLines: 1, shrink: 1, minW: 0, children: desc.title }), desc.subtitle !== undefined ? ((0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$2", color: "$hint", numberOfLines: 1, shrink: 1, minW: 0, children: desc.subtitle })) : null] }), (0, jsx_runtime_1.jsx)(PaneBody, { children: desc.content }), desc.footer !== undefined ? (0, jsx_runtime_1.jsx)(PaneFoot, { children: desc.footer }) : null] }));
|
|
152
|
+
}
|
|
153
|
+
/** The overlay sheet's own page, as it always was: the 56px header and the body. */
|
|
154
|
+
function SheetPage({ desc, close }) {
|
|
155
|
+
const Icon = desc.icon;
|
|
156
|
+
const pane = (0, react_1.useContext)(Ctx);
|
|
157
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(gui_1.XStack, { items: "center", gap: "$2.5", px: "$4", height: 56, borderBottomWidth: 1, borderColor: "$borderColor", children: [pane && pane.depth > 1 ? ((0, jsx_runtime_1.jsx)(gui_1.Button, { size: "$2", chromeless: true, icon: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.ChevronLeft, { size: 18 }), onPress: pane.back, "aria-label": "Back" })) : null, Icon ? (0, jsx_runtime_1.jsx)(Icon, { size: 18, color: desc.iconColor ? (0, color_1.asColor)(desc.iconColor) : undefined }) : null, (0, jsx_runtime_1.jsxs)(gui_1.YStack, { flex: 1, minW: 0, children: [(0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$5", fontWeight: "700", color: "$color12", numberOfLines: 1, children: desc.title }), desc.subtitle !== undefined ? ((0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$2", color: "$color10", numberOfLines: 1, children: desc.subtitle })) : null] }), (0, jsx_runtime_1.jsx)(gui_1.Button, { size: "$2", chromeless: true, icon: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.X, { size: 18 }), onPress: close, "aria-label": "Close" })] }), (0, jsx_runtime_1.jsx)(gui_1.ScrollView, { flex: 1, minH: 0, children: (0, jsx_runtime_1.jsx)(gui_1.YStack, { p: "$4", gap: "$3", children: desc.content }) }), desc.footer !== undefined ? ((0, jsx_runtime_1.jsx)(gui_1.XStack, { px: "$4", py: "$3", gap: "$2", borderTopWidth: 1, borderColor: "$borderColor", bg: "$color1", children: desc.footer })) : null] }));
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* The record frame's top bar: 48 high on the panel ground, a hairline under
|
|
161
|
+
* it, 8 in from each side, its two clusters 16 apart and their parts 4 apart.
|
|
162
|
+
* Inside a pane it adds back (while there is a page under this one), expand
|
|
163
|
+
* (when the page can open on the main surface) and close; outside one it is the
|
|
164
|
+
* bar alone.
|
|
165
|
+
*/
|
|
166
|
+
function PaneBar({ children, actions }) {
|
|
167
|
+
const pane = (0, react_1.useContext)(Ctx);
|
|
168
|
+
const page = (0, react_1.useContext)(PageCtx);
|
|
169
|
+
const expand = page?.onExpand;
|
|
170
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.XStack, { ...(0, slot_1.slot)('pane-bar'), height: exports.PANE.bar, shrink: 0, items: "center", justify: "space-between", gap: "$4", px: "$2", bg: "$panel", borderBottomWidth: 1, borderColor: "$borderColor", children: [(0, jsx_runtime_1.jsxs)(gui_1.XStack, { flex: 1, minW: 0, items: "center", gap: "$1", children: [pane && pane.depth > 1 ? ((0, jsx_runtime_1.jsx)(Tool, { tip: "Back", onPress: pane.back, children: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.ChevronLeft, {}) })) : null, children] }), (0, jsx_runtime_1.jsxs)(gui_1.XStack, { shrink: 0, items: "center", gap: "$1", children: [actions, expand ? ((0, jsx_runtime_1.jsx)(Tool, { tip: page?.expandLabel ?? 'Open', onPress: expand, children: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.Maximize2, {}) })) : null, pane ? ((0, jsx_runtime_1.jsx)(Tool, { tip: "Close side panel", onPress: pane.close, children: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.X, {}) })) : null] })] }));
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* The bar's quiet 24px icon button, named by its tooltip. The tooltip's trigger
|
|
174
|
+
* IS the button (`asChild`): wrapped in a box, the trigger's `aria-expanded`
|
|
175
|
+
* lands on a div, which axe refuses (`aria-allowed-attr`), and a button may
|
|
176
|
+
* carry it.
|
|
177
|
+
*/
|
|
178
|
+
function Tool({ tip, children, ...props }) {
|
|
179
|
+
return ((0, jsx_runtime_1.jsxs)(tooltip_1.Tooltip, { delay: 1000, placement: "bottom", children: [(0, jsx_runtime_1.jsx)(tooltip_1.TooltipTrigger, { asChild: true, children: (0, jsx_runtime_1.jsx)(button_1.Button, { size: "icon-xs", variant: "ghost", emphasis: "subtle", "aria-label": tip, ...props, children: children }) }), (0, jsx_runtime_1.jsx)(tooltip_1.TooltipContent, { children: tip })] }));
|
|
180
|
+
}
|
|
181
|
+
/** The record frame's body: it takes what the bar and footer leave, and scrolls without chaining to the page. */
|
|
182
|
+
function PaneBody({ children, padded = true }) {
|
|
183
|
+
return ((0, jsx_runtime_1.jsx)(gui_1.ScrollView, { ...(0, slot_1.slot)('pane-body'), flex: 1, minH: 0, style: { overscrollBehavior: 'contain' }, children: (0, jsx_runtime_1.jsx)(gui_1.YStack, { ...(padded ? { p: '$2' } : null), gap: "$2", children: children }) }));
|
|
184
|
+
}
|
|
185
|
+
/** The record frame's footer: the panel ground, a hairline above, its actions at the end, 8 apart. */
|
|
186
|
+
function PaneFoot({ children }) {
|
|
187
|
+
return ((0, jsx_runtime_1.jsx)(gui_1.XStack, { ...(0, slot_1.slot)('pane-foot'), shrink: 0, items: "center", justify: "flex-end", gap: "$2", px: "$3", py: "$2", bg: "$panel", borderTopWidth: 1, borderColor: "$borderColor", children: children }));
|
|
46
188
|
}
|
|
@@ -13,6 +13,32 @@
|
|
|
13
13
|
* The last descriptor stays mounted through the close transition, so the exit
|
|
14
14
|
* animates with its content (no flash of empty pane). Opening a new
|
|
15
15
|
* descriptor replaces it.
|
|
16
|
+
*
|
|
17
|
+
* A pane is a STACK of pages. `open` starts a new stack, `push` lays a page on
|
|
18
|
+
* top (a relation opened from a record, a step of a flow), `back` takes it off;
|
|
19
|
+
* the top bar shows a back button while there is a page under the current one.
|
|
20
|
+
*
|
|
21
|
+
* Two modes, chosen by the shell:
|
|
22
|
+
*
|
|
23
|
+
* overlay (default) the SlideOver above the page, with its scrim — the
|
|
24
|
+
* console's contract, unchanged.
|
|
25
|
+
* docked a column in the layout row beside the page content: no scrim, the
|
|
26
|
+
* content narrows. 400 wide, resizable 320–600 from its leading edge
|
|
27
|
+
* by the kit's one resizer (Grip), the width kept per person
|
|
28
|
+
* (useSpan). The width animates 0 ↔ W while the page inside keeps the
|
|
29
|
+
* target width, so it never reflows mid-slide. Below lg it is the
|
|
30
|
+
* overlay again, full screen.
|
|
31
|
+
*
|
|
32
|
+
* A docked pane — or any pane under `<Density value="compact">` — draws the
|
|
33
|
+
* record frame (twenty-ui's side panel, MIT, NOTICE): a 48px top bar on the
|
|
34
|
+
* panel ground (back · icon + title · page actions · expand · close), a body
|
|
35
|
+
* that scrolls without chaining, and a footer on the panel ground with its
|
|
36
|
+
* actions at the end. An overlay pane at regular density keeps the header it
|
|
37
|
+
* always had. A page that draws itself (`bare`, a command menu, a search)
|
|
38
|
+
* composes the same frame from `PaneBar`, `PaneBody` and `PaneFoot`.
|
|
39
|
+
*
|
|
40
|
+
* Escape closes a docked pane while focus is inside it (the overlay's
|
|
41
|
+
* SlideOver already does); ⌘/Ctrl+Enter runs the page's `onExpand`.
|
|
16
42
|
*/
|
|
17
43
|
import { type ReactNode } from 'react';
|
|
18
44
|
import { type IconLike } from './color.js';
|
|
@@ -24,24 +50,76 @@ export type DetailDescriptor = {
|
|
|
24
50
|
/** Optional title icon, tinted with `iconColor`. */
|
|
25
51
|
icon?: IconLike;
|
|
26
52
|
iconColor?: string;
|
|
27
|
-
/** Desktop pane width (px). Mobile is always full-screen. Default 460. */
|
|
53
|
+
/** Desktop pane width (px), overlay mode. Mobile is always full-screen. Default 460 (400 in the record frame). */
|
|
28
54
|
size?: number;
|
|
29
55
|
/** The body — the detail view or edit form for the item. */
|
|
30
56
|
content: ReactNode;
|
|
31
57
|
/** Optional sticky footer (primary actions), pinned below the scroll body. */
|
|
32
58
|
footer?: ReactNode;
|
|
59
|
+
/** The page's own actions, in the top bar before expand and close (record frame). */
|
|
60
|
+
actions?: ReactNode;
|
|
61
|
+
/** Opens the page on the main surface: shows the expand button and binds ⌘/Ctrl+Enter. */
|
|
62
|
+
onExpand?: () => void;
|
|
63
|
+
/** The expand button's tooltip. Default "Open". */
|
|
64
|
+
expandLabel?: string;
|
|
65
|
+
/** The page draws its own frame from `PaneBar` / `PaneBody` / `PaneFoot` (a command menu, a search). */
|
|
66
|
+
bare?: boolean;
|
|
33
67
|
};
|
|
34
68
|
export type DetailPaneApi = {
|
|
69
|
+
/** A new stack, holding this page. */
|
|
35
70
|
open: (descriptor: DetailDescriptor) => void;
|
|
71
|
+
/** This page over the current one. Opens the pane when it is shut. */
|
|
72
|
+
push: (descriptor: DetailDescriptor) => void;
|
|
73
|
+
/** Off the top: the page under it shows. On the last page, the pane closes. */
|
|
74
|
+
back: () => void;
|
|
36
75
|
close: () => void;
|
|
37
76
|
isOpen: boolean;
|
|
77
|
+
/** How many pages the stack holds; a back button shows while it is more than one. */
|
|
78
|
+
depth: number;
|
|
38
79
|
};
|
|
80
|
+
/** The pane this sits in, or null outside one — for a page that adapts to being in a pane. */
|
|
81
|
+
export declare const usePane: () => DetailPaneApi | null;
|
|
39
82
|
export declare function useDetailPane(): DetailPaneApi;
|
|
40
83
|
export type DetailPaneProps = {
|
|
41
84
|
children: ReactNode;
|
|
42
85
|
/** z-index for stacking — a pane opened over another overlay passes a
|
|
43
86
|
* higher value. Left to `SlideOver`'s own default otherwise. */
|
|
44
87
|
zIndex?: number;
|
|
88
|
+
/** `overlay` (default) floats above the page; `docked` is a column in the layout beside it. */
|
|
89
|
+
mode?: 'overlay' | 'docked';
|
|
90
|
+
/** Where a docked pane keeps the width a person chose (localStorage key). */
|
|
91
|
+
store?: string;
|
|
45
92
|
};
|
|
46
|
-
|
|
93
|
+
/** The record frame's measures (twenty-ui's side panel, MIT). */
|
|
94
|
+
export declare const PANE: {
|
|
95
|
+
readonly w: 400;
|
|
96
|
+
readonly min: 320;
|
|
97
|
+
readonly max: 600;
|
|
98
|
+
readonly bar: 48;
|
|
99
|
+
readonly icon: 16;
|
|
100
|
+
};
|
|
101
|
+
export declare function DetailPane({ children, zIndex, mode, store }: DetailPaneProps): import("react").JSX.Element;
|
|
102
|
+
export type PaneBarProps = {
|
|
103
|
+
/** The leading cluster after the back button: an icon and a title, or a search field. */
|
|
104
|
+
children?: ReactNode;
|
|
105
|
+
/** The page's own actions, before expand and close. */
|
|
106
|
+
actions?: ReactNode;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* The record frame's top bar: 48 high on the panel ground, a hairline under
|
|
110
|
+
* it, 8 in from each side, its two clusters 16 apart and their parts 4 apart.
|
|
111
|
+
* Inside a pane it adds back (while there is a page under this one), expand
|
|
112
|
+
* (when the page can open on the main surface) and close; outside one it is the
|
|
113
|
+
* bar alone.
|
|
114
|
+
*/
|
|
115
|
+
export declare function PaneBar({ children, actions }: PaneBarProps): import("react").JSX.Element;
|
|
116
|
+
/** The record frame's body: it takes what the bar and footer leave, and scrolls without chaining to the page. */
|
|
117
|
+
export declare function PaneBody({ children, padded }: {
|
|
118
|
+
children?: ReactNode;
|
|
119
|
+
padded?: boolean;
|
|
120
|
+
}): import("react").JSX.Element;
|
|
121
|
+
/** The record frame's footer: the panel ground, a hairline above, its actions at the end, 8 apart. */
|
|
122
|
+
export declare function PaneFoot({ children }: {
|
|
123
|
+
children?: ReactNode;
|
|
124
|
+
}): import("react").JSX.Element;
|
|
47
125
|
//# sourceMappingURL=DetailPane.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailPane.d.ts","sourceRoot":"","sources":["../../src/product/DetailPane.tsx"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"DetailPane.d.ts","sourceRoot":"","sources":["../../src/product/DetailPane.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAKd,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;AAQhD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,oCAAoC;IACpC,KAAK,EAAE,SAAS,CAAA;IAChB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,oDAAoD;IACpD,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kHAAkH;IAClH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,4DAA4D;IAC5D,OAAO,EAAE,SAAS,CAAA;IAClB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,qFAAqF;IACrF,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wGAAwG;IACxG,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,sCAAsC;IACtC,IAAI,EAAE,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,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AS,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,+BAQ/F;AAED,sGAAsG;AACtG,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,+BAiB9D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
4
|
* DetailPane — the ONE reusable right-side pane for viewing or editing the
|
|
5
5
|
* details of an item. A product does NOT build its own pane: it writes a
|
|
@@ -15,29 +15,166 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
15
15
|
* The last descriptor stays mounted through the close transition, so the exit
|
|
16
16
|
* animates with its content (no flash of empty pane). Opening a new
|
|
17
17
|
* descriptor replaces it.
|
|
18
|
+
*
|
|
19
|
+
* A pane is a STACK of pages. `open` starts a new stack, `push` lays a page on
|
|
20
|
+
* top (a relation opened from a record, a step of a flow), `back` takes it off;
|
|
21
|
+
* the top bar shows a back button while there is a page under the current one.
|
|
22
|
+
*
|
|
23
|
+
* Two modes, chosen by the shell:
|
|
24
|
+
*
|
|
25
|
+
* overlay (default) the SlideOver above the page, with its scrim — the
|
|
26
|
+
* console's contract, unchanged.
|
|
27
|
+
* docked a column in the layout row beside the page content: no scrim, the
|
|
28
|
+
* content narrows. 400 wide, resizable 320–600 from its leading edge
|
|
29
|
+
* by the kit's one resizer (Grip), the width kept per person
|
|
30
|
+
* (useSpan). The width animates 0 ↔ W while the page inside keeps the
|
|
31
|
+
* target width, so it never reflows mid-slide. Below lg it is the
|
|
32
|
+
* overlay again, full screen.
|
|
33
|
+
*
|
|
34
|
+
* A docked pane — or any pane under `<Density value="compact">` — draws the
|
|
35
|
+
* record frame (twenty-ui's side panel, MIT, NOTICE): a 48px top bar on the
|
|
36
|
+
* panel ground (back · icon + title · page actions · expand · close), a body
|
|
37
|
+
* that scrolls without chaining, and a footer on the panel ground with its
|
|
38
|
+
* actions at the end. An overlay pane at regular density keeps the header it
|
|
39
|
+
* always had. A page that draws itself (`bare`, a command menu, a search)
|
|
40
|
+
* composes the same frame from `PaneBar`, `PaneBody` and `PaneFoot`.
|
|
41
|
+
*
|
|
42
|
+
* Escape closes a docked pane while focus is inside it (the overlay's
|
|
43
|
+
* SlideOver already does); ⌘/Ctrl+Enter runs the page's `onExpand`.
|
|
18
44
|
*/
|
|
19
|
-
import { createContext, useCallback, useContext, useMemo, useState, } from 'react';
|
|
20
|
-
import { Button, ScrollView, Text, XStack, YStack } from '@hanzo/gui';
|
|
21
|
-
import { X } from '@hanzogui/lucide-icons-2';
|
|
45
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, } from 'react';
|
|
46
|
+
import { Button as GuiButton, ScrollView, Text, XStack, YStack, useMedia } from '@hanzo/gui';
|
|
47
|
+
import { ChevronLeft, Maximize2, X } from '@hanzogui/lucide-icons-2';
|
|
22
48
|
import { SlideOver } from './SlideOver.js';
|
|
23
49
|
import { asColor } from './color.js';
|
|
24
|
-
|
|
50
|
+
import { Button } from '../backends/gui/button.js';
|
|
51
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from '../backends/gui/tooltip.js';
|
|
52
|
+
import { Grip } from '../backends/gui/grip.js';
|
|
53
|
+
import { useSpan } from '../backends/gui/span.js';
|
|
54
|
+
import { useDensity } from '../backends/gui/density.js';
|
|
55
|
+
import { slot } from '../backends/gui/slot.js';
|
|
56
|
+
const Ctx = /* @__PURE__ */ createContext(null);
|
|
57
|
+
/** The page being drawn, for the bar a bare page composes. */
|
|
58
|
+
const PageCtx = /* @__PURE__ */ createContext(null);
|
|
59
|
+
/** The pane this sits in, or null outside one — for a page that adapts to being in a pane. */
|
|
60
|
+
export const usePane = () => useContext(Ctx);
|
|
25
61
|
export function useDetailPane() {
|
|
26
62
|
const ctx = useContext(Ctx);
|
|
27
63
|
if (!ctx)
|
|
28
64
|
throw new Error('useDetailPane must be used within <DetailPane>');
|
|
29
65
|
return ctx;
|
|
30
66
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
|
|
67
|
+
/** The record frame's measures (twenty-ui's side panel, MIT). */
|
|
68
|
+
export const PANE = { w: 400, min: 320, max: 600, bar: 48, icon: 16 };
|
|
69
|
+
export function DetailPane({ children, zIndex, mode = 'overlay', store = 'hanzo.pane' }) {
|
|
70
|
+
// One state, so every transition is one pure update: whether it is open, and
|
|
71
|
+
// the pages it holds (kept through a close, so the exit animates with them).
|
|
72
|
+
const [state, setState] = useState({ open: false, stack: [] });
|
|
73
|
+
const { open: isOpen, stack } = state;
|
|
74
|
+
const density = useDensity();
|
|
75
|
+
const media = useMedia();
|
|
76
|
+
const docked = mode === 'docked' && !!media.lg;
|
|
77
|
+
const record = mode === 'docked' || density === 'compact';
|
|
78
|
+
const open = useCallback((descriptor) => setState({ open: true, stack: [descriptor] }), []);
|
|
79
|
+
const push = useCallback((descriptor) => setState((s) => ({ open: true, stack: s.open ? [...s.stack, descriptor] : [descriptor] })), []);
|
|
80
|
+
const close = useCallback(() => setState((s) => ({ ...s, open: false })), []);
|
|
81
|
+
const back = useCallback(() => setState((s) => (s.stack.length > 1 ? { ...s, stack: s.stack.slice(0, -1) } : { ...s, open: false })), []);
|
|
82
|
+
const depth = isOpen ? stack.length : 0;
|
|
83
|
+
const api = useMemo(() => ({ open, push, back, close, isOpen, depth }), [open, push, back, close, isOpen, depth]);
|
|
84
|
+
const desc = stack[stack.length - 1] ?? null;
|
|
85
|
+
const title = typeof desc?.title === 'string' ? desc.title : 'Details';
|
|
86
|
+
const page = desc ? (_jsx(PageCtx.Provider, { value: desc, children: record || desc.bare ? _jsx(RecordPage, { desc: desc }) : _jsx(SheetPage, { desc: desc, close: close }) })) : null;
|
|
87
|
+
if (docked)
|
|
88
|
+
return (_jsx(Ctx.Provider, { value: api, children: _jsxs(XStack, { ...slot('detail-pane-row'), flex: 1, minW: 0, minH: 0, self: "stretch", children: [_jsx(YStack, { flex: 1, minW: 0, minH: 0, children: children }), _jsx(Dock, { open: isOpen, title: title, store: store, onClose: close, onExpand: desc?.onExpand, children: page })] }) }));
|
|
89
|
+
return (_jsxs(Ctx.Provider, { value: api, children: [children, _jsx(SlideOver, { open: isOpen, onClose: close, side: "right", size: desc?.size ?? (record ? PANE.w : 460), ariaLabel: title, zIndex: zIndex, children: record && desc ? (_jsx(YStack, { flex: 1, minH: 0, bg: "$background", onKeyDown: expandKey(desc.onExpand), children: page })) : (page) })] }));
|
|
90
|
+
}
|
|
91
|
+
/** ⌘/Ctrl+Enter runs `onExpand`, from anywhere inside the pane. */
|
|
92
|
+
const expandKey = (onExpand) => (e) => {
|
|
93
|
+
if (!onExpand || e.key !== 'Enter' || !(e.metaKey || e.ctrlKey))
|
|
94
|
+
return;
|
|
95
|
+
e.preventDefault?.();
|
|
96
|
+
onExpand();
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* The docked column. The OUTER box is what animates and what the Grip measures
|
|
100
|
+
* (its width is the pane's); the INNER box holds the target width throughout, so
|
|
101
|
+
* the page slides in already laid out.
|
|
102
|
+
*/
|
|
103
|
+
function Dock({ open, title, store, onClose, onExpand, children, }) {
|
|
104
|
+
const span = useSpan(store, PANE.w, PANE.min, PANE.max);
|
|
105
|
+
const node = useRef(null);
|
|
106
|
+
const opener = useRef(null);
|
|
107
|
+
// Focus moves in when the pane opens and back to what opened it when it shuts:
|
|
108
|
+
// a docked pane is not modal, but a keyboard has to be able to reach it.
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
if (!open || typeof document === 'undefined')
|
|
111
|
+
return;
|
|
112
|
+
opener.current = document.activeElement;
|
|
113
|
+
const t = window.setTimeout(() => node.current?.focus?.(), 0);
|
|
114
|
+
return () => {
|
|
115
|
+
window.clearTimeout(t);
|
|
116
|
+
const back = opener.current;
|
|
117
|
+
if (back instanceof HTMLElement && node.current?.contains(document.activeElement))
|
|
118
|
+
back.focus();
|
|
119
|
+
};
|
|
120
|
+
}, [open]);
|
|
121
|
+
return (_jsxs(YStack, { ref: ((el) => {
|
|
122
|
+
span.ref(el);
|
|
123
|
+
node.current = el instanceof HTMLElement ? el : null;
|
|
124
|
+
}), ...slot('detail-pane'), "data-mode": "docked", "data-open": open ? '' : undefined, role: "complementary", "aria-label": title, "aria-hidden": !open, ...(!open ? { inert: true } : null), tabIndex: -1, position: "relative", shrink: 0, self: "stretch", overflow: "hidden", outlineWidth: 0, onKeyDown: ((e) => {
|
|
125
|
+
if (e.key === 'Escape' && !e.defaultPrevented) {
|
|
126
|
+
e.preventDefault?.();
|
|
127
|
+
onClose();
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
expandKey(onExpand)(e);
|
|
131
|
+
}), style: {
|
|
132
|
+
...span.style,
|
|
133
|
+
width: open ? 'var(--span)' : 0,
|
|
134
|
+
transition: 'width var(--duration-base, 300ms) var(--ease-out, ease)',
|
|
135
|
+
}, children: [_jsx(YStack, { width: "var(--span)", flex: 1, minH: 0, bg: "$background", borderLeftWidth: 1, borderColor: "$borderColor", children: children }), open ? (_jsx(Grip, { side: "right", span: span.span, floor: PANE.min, ceil: PANE.max, reset: PANE.w, bar: "edge", label: "Resize side panel", onSpan: span.move, onKeep: span.keep, onShut: onClose })) : null] }));
|
|
136
|
+
}
|
|
137
|
+
/** The record frame of one page: the bar, the scrolling body, the footer. */
|
|
138
|
+
function RecordPage({ desc }) {
|
|
139
|
+
if (desc.bare)
|
|
140
|
+
return _jsx(_Fragment, { children: desc.content });
|
|
141
|
+
const Icon = desc.icon;
|
|
142
|
+
return (_jsxs(_Fragment, { children: [_jsxs(PaneBar, { actions: desc.actions, children: [Icon ? _jsx(Icon, { size: PANE.icon, color: desc.iconColor ? asColor(desc.iconColor) : '$aside' }) : null, _jsx(Text, { fontSize: "$2", fontWeight: "500", color: "$ink", numberOfLines: 1, shrink: 1, minW: 0, children: desc.title }), desc.subtitle !== undefined ? (_jsx(Text, { fontSize: "$2", color: "$hint", numberOfLines: 1, shrink: 1, minW: 0, children: desc.subtitle })) : null] }), _jsx(PaneBody, { children: desc.content }), desc.footer !== undefined ? _jsx(PaneFoot, { children: desc.footer }) : null] }));
|
|
143
|
+
}
|
|
144
|
+
/** The overlay sheet's own page, as it always was: the 56px header and the body. */
|
|
145
|
+
function SheetPage({ desc, close }) {
|
|
146
|
+
const Icon = desc.icon;
|
|
147
|
+
const pane = useContext(Ctx);
|
|
148
|
+
return (_jsxs(_Fragment, { children: [_jsxs(XStack, { items: "center", gap: "$2.5", px: "$4", height: 56, borderBottomWidth: 1, borderColor: "$borderColor", children: [pane && pane.depth > 1 ? (_jsx(GuiButton, { size: "$2", chromeless: true, icon: _jsx(ChevronLeft, { size: 18 }), onPress: pane.back, "aria-label": "Back" })) : null, Icon ? _jsx(Icon, { size: 18, color: desc.iconColor ? asColor(desc.iconColor) : undefined }) : null, _jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(Text, { fontSize: "$5", fontWeight: "700", color: "$color12", numberOfLines: 1, children: desc.title }), desc.subtitle !== undefined ? (_jsx(Text, { fontSize: "$2", color: "$color10", numberOfLines: 1, children: desc.subtitle })) : null] }), _jsx(GuiButton, { size: "$2", chromeless: true, icon: _jsx(X, { size: 18 }), onPress: close, "aria-label": "Close" })] }), _jsx(ScrollView, { flex: 1, minH: 0, children: _jsx(YStack, { p: "$4", gap: "$3", children: desc.content }) }), desc.footer !== undefined ? (_jsx(XStack, { px: "$4", py: "$3", gap: "$2", borderTopWidth: 1, borderColor: "$borderColor", bg: "$color1", children: desc.footer })) : null] }));
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* The record frame's top bar: 48 high on the panel ground, a hairline under
|
|
152
|
+
* it, 8 in from each side, its two clusters 16 apart and their parts 4 apart.
|
|
153
|
+
* Inside a pane it adds back (while there is a page under this one), expand
|
|
154
|
+
* (when the page can open on the main surface) and close; outside one it is the
|
|
155
|
+
* bar alone.
|
|
156
|
+
*/
|
|
157
|
+
export function PaneBar({ children, actions }) {
|
|
158
|
+
const pane = useContext(Ctx);
|
|
159
|
+
const page = useContext(PageCtx);
|
|
160
|
+
const expand = page?.onExpand;
|
|
161
|
+
return (_jsxs(XStack, { ...slot('pane-bar'), height: PANE.bar, shrink: 0, items: "center", justify: "space-between", gap: "$4", px: "$2", bg: "$panel", borderBottomWidth: 1, borderColor: "$borderColor", children: [_jsxs(XStack, { flex: 1, minW: 0, items: "center", gap: "$1", children: [pane && pane.depth > 1 ? (_jsx(Tool, { tip: "Back", onPress: pane.back, children: _jsx(ChevronLeft, {}) })) : null, children] }), _jsxs(XStack, { shrink: 0, items: "center", gap: "$1", children: [actions, expand ? (_jsx(Tool, { tip: page?.expandLabel ?? 'Open', onPress: expand, children: _jsx(Maximize2, {}) })) : null, pane ? (_jsx(Tool, { tip: "Close side panel", onPress: pane.close, children: _jsx(X, {}) })) : null] })] }));
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* The bar's quiet 24px icon button, named by its tooltip. The tooltip's trigger
|
|
165
|
+
* IS the button (`asChild`): wrapped in a box, the trigger's `aria-expanded`
|
|
166
|
+
* lands on a div, which axe refuses (`aria-allowed-attr`), and a button may
|
|
167
|
+
* carry it.
|
|
168
|
+
*/
|
|
169
|
+
function Tool({ tip, children, ...props }) {
|
|
170
|
+
return (_jsxs(Tooltip, { delay: 1000, placement: "bottom", children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { size: "icon-xs", variant: "ghost", emphasis: "subtle", "aria-label": tip, ...props, children: children }) }), _jsx(TooltipContent, { children: tip })] }));
|
|
171
|
+
}
|
|
172
|
+
/** The record frame's body: it takes what the bar and footer leave, and scrolls without chaining to the page. */
|
|
173
|
+
export function PaneBody({ children, padded = true }) {
|
|
174
|
+
return (_jsx(ScrollView, { ...slot('pane-body'), flex: 1, minH: 0, style: { overscrollBehavior: 'contain' }, children: _jsx(YStack, { ...(padded ? { p: '$2' } : null), gap: "$2", children: children }) }));
|
|
175
|
+
}
|
|
176
|
+
/** The record frame's footer: the panel ground, a hairline above, its actions at the end, 8 apart. */
|
|
177
|
+
export function PaneFoot({ children }) {
|
|
178
|
+
return (_jsx(XStack, { ...slot('pane-foot'), shrink: 0, items: "center", justify: "flex-end", gap: "$2", px: "$3", py: "$2", bg: "$panel", borderTopWidth: 1, borderColor: "$borderColor", children: children }));
|
|
42
179
|
}
|
|
43
180
|
//# sourceMappingURL=DetailPane.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailPane.js","sourceRoot":"","sources":["../../src/product/DetailPane.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,OAAO,EACP,QAAQ,GAET,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACrE,OAAO,EAAE,CAAC,EAAE,MAAM,0BAA0B,CAAA;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,OAAO,EAAiB,MAAM,SAAS,CAAA;AAwBhD,MAAM,GAAG,GAAG,aAAa,CAAuB,IAAI,CAAC,CAAA;AAErD,MAAM,UAAU,aAAa;IAC3B,MAAM,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,CAAA;IAC3B,IAAI,CAAC,GAAG;QAAE,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;IAC3E,OAAO,GAAG,CAAA;AACZ,CAAC;AASD,MAAM,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,MAA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KAAK,EAAC,QAAQ,EACd,OAAO,EAAC,UAAU,EAClB,GAAG,EAAC,IAAI,EACR,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,QAAQ,EACX,cAAc,EAAE,CAAC,EACjB,WAAW,EAAC,cAAc,YAEzB,QAAQ,GACF,CACV,CAAA;AACH,CAAC"}
|
package/dist/product/Fact.cjs
CHANGED
|
@@ -4,6 +4,7 @@ exports.Fact = Fact;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const gui_1 = require("@hanzo/gui");
|
|
6
6
|
const fonts_1 = require("../core/fonts.cjs");
|
|
7
|
+
const progress_ring_1 = require("../backends/gui/progress-ring.cjs");
|
|
7
8
|
/**
|
|
8
9
|
* Fact — one row of a property list: a label on the left, a value on the
|
|
9
10
|
* right, a hairline separator beneath. The read-only counterpart to `Field`'s
|
|
@@ -14,6 +15,10 @@ const fonts_1 = require("../core/fonts.cjs");
|
|
|
14
15
|
* either could find the other. This is the one definition; the wider of the
|
|
15
16
|
* two shapes won (a non-string `value` renders as given, not stringified).
|
|
16
17
|
*/
|
|
17
|
-
function Fact({ label, value, mono }) {
|
|
18
|
+
function Fact({ label, value, mono, variant = 'row', startIcon, progress, progressColor, progressValueText }) {
|
|
19
|
+
if (variant === 'metric') {
|
|
20
|
+
const shown = typeof value === 'string' || typeof value === 'number' ? ((0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$1", fontWeight: "500", color: "$ink", numberOfLines: 1, style: mono ? { fontFamily: fonts_1.fontMono } : undefined, children: value })) : (value);
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.XStack, { "data-slot": "fact", "data-variant": "metric", items: "center", gap: "$2", minH: 24, children: [(0, jsx_runtime_1.jsxs)(gui_1.XStack, { flex: 1, minW: 0, items: "center", gap: "$1", children: [startIcon, (0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$1", fontWeight: "500", color: "$hint", numberOfLines: 1, children: label })] }), progress !== undefined ? ((0, jsx_runtime_1.jsx)(progress_ring_1.ProgressRing, { value: progress, size: "sm", ...(progressColor ? { barColor: progressColor } : null), "aria-label": `${label}${progressValueText ? `: ${progressValueText}` : ''}`, children: shown })) : (shown)] }));
|
|
22
|
+
}
|
|
18
23
|
return ((0, jsx_runtime_1.jsxs)(gui_1.XStack, { justify: "space-between", items: "center", py: "$1.5", borderBottomWidth: 1, borderColor: "$borderColor", gap: "$3", children: [(0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$2", color: "$color11", children: label }), typeof value === 'string' ? ((0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$2", color: "$color12", fontWeight: "600", numberOfLines: 1, style: mono ? { fontFamily: fonts_1.fontMono } : undefined, children: value })) : (value)] }));
|
|
19
24
|
}
|
package/dist/product/Fact.d.ts
CHANGED
|
@@ -8,6 +8,21 @@ export type FactProps = {
|
|
|
8
8
|
value: ReactNode;
|
|
9
9
|
/** Render a string value in the monospace face — an id, a hash, a path. */
|
|
10
10
|
mono?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* `row` (default) is the property-list row. `metric` is the record kit's
|
|
13
|
+
* metric row (twenty-ui's MetricRow, MIT — NOTICE): no rule, a 24px floor,
|
|
14
|
+
* 12px medium, the label quiet beside an optional icon, the value at the end,
|
|
15
|
+
* and an optional progress ring that the value labels.
|
|
16
|
+
*/
|
|
17
|
+
variant?: 'row' | 'metric';
|
|
18
|
+
/** `metric`: an icon before the label. */
|
|
19
|
+
startIcon?: ReactNode;
|
|
20
|
+
/** `metric`: a 14px ring at the end, 0–100 or `null` for indeterminate. */
|
|
21
|
+
progress?: number | null;
|
|
22
|
+
/** `metric`: the ring's colour. */
|
|
23
|
+
progressColor?: string;
|
|
24
|
+
/** `metric`: the ring's accessible value, when the value text is not it. */
|
|
25
|
+
progressValueText?: string;
|
|
11
26
|
};
|
|
12
27
|
/**
|
|
13
28
|
* Fact — one row of a property list: a label on the left, a value on the
|
|
@@ -19,5 +34,5 @@ export type FactProps = {
|
|
|
19
34
|
* either could find the other. This is the one definition; the wider of the
|
|
20
35
|
* two shapes won (a non-string `value` renders as given, not stringified).
|
|
21
36
|
*/
|
|
22
|
-
export declare function Fact({ label, value, mono }: FactProps): import("react").JSX.Element;
|
|
37
|
+
export declare function Fact({ label, value, mono, variant, startIcon, progress, progressColor, progressValueText }: FactProps): import("react").JSX.Element;
|
|
23
38
|
//# sourceMappingURL=Fact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fact.d.ts","sourceRoot":"","sources":["../../src/product/Fact.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Fact.d.ts","sourceRoot":"","sources":["../../src/product/Fact.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMtC,MAAM,MAAM,SAAS,GAAG;IACtB,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAA;IACb;;iBAEa;IACb,KAAK,EAAE,SAAS,CAAA;IAChB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;;;;OAKG;IACH,OAAO,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IAC1B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,CAAA;AAED;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,iBAAiB,EAAE,EAAE,SAAS,+BA4D7H"}
|