@agentage/components 0.0.0-stage → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +207 -2
- package/dist/components/accordion.context.d.ts +17 -0
- package/dist/components/accordion.context.d.ts.map +1 -0
- package/dist/components/accordion.context.js +14 -0
- package/dist/components/accordion.d.ts +27 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +90 -0
- package/dist/components/accordion.trigger.d.ts +11 -0
- package/dist/components/accordion.trigger.d.ts.map +1 -0
- package/dist/components/accordion.trigger.js +57 -0
- package/dist/components/action-bar.d.ts +29 -0
- package/dist/components/action-bar.d.ts.map +1 -0
- package/dist/components/action-bar.js +119 -0
- package/dist/components/action-bar.parts.d.ts +23 -0
- package/dist/components/action-bar.parts.d.ts.map +1 -0
- package/dist/components/action-bar.parts.js +117 -0
- package/dist/components/alert.d.ts +17 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +73 -0
- package/dist/components/avatar.d.ts +22 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +82 -0
- package/dist/components/badge.d.ts +20 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +32 -0
- package/dist/components/breadcrumb.d.ts +12 -0
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +70 -0
- package/dist/components/button.d.ts +17 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +43 -0
- package/dist/components/button.variants.d.ts +5 -0
- package/dist/components/button.variants.d.ts.map +1 -0
- package/dist/components/button.variants.js +26 -0
- package/dist/components/card-base.d.ts +10 -0
- package/dist/components/card-base.d.ts.map +1 -0
- package/dist/components/card-base.js +10 -0
- package/dist/components/card-state.d.ts +45 -0
- package/dist/components/card-state.d.ts.map +1 -0
- package/dist/components/card-state.js +137 -0
- package/dist/components/card.d.ts +25 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +62 -0
- package/dist/components/card.parts.d.ts +9 -0
- package/dist/components/card.parts.d.ts.map +1 -0
- package/dist/components/card.parts.js +37 -0
- package/dist/components/check-list.d.ts +30 -0
- package/dist/components/check-list.d.ts.map +1 -0
- package/dist/components/check-list.js +88 -0
- package/dist/components/check-list.parts.d.ts +17 -0
- package/dist/components/check-list.parts.d.ts.map +1 -0
- package/dist/components/check-list.parts.js +40 -0
- package/dist/components/checkbox.d.ts +24 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +103 -0
- package/dist/components/chip.d.ts +17 -0
- package/dist/components/chip.d.ts.map +1 -0
- package/dist/components/chip.js +93 -0
- package/dist/components/code-block.d.ts +15 -0
- package/dist/components/code-block.d.ts.map +1 -0
- package/dist/components/code-block.js +87 -0
- package/dist/components/collapsible.d.ts +27 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +81 -0
- package/dist/components/command.context.d.ts +16 -0
- package/dist/components/command.context.d.ts.map +1 -0
- package/dist/components/command.context.js +13 -0
- package/dist/components/command.d.ts +19 -0
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +125 -0
- package/dist/components/command.parts.d.ts +18 -0
- package/dist/components/command.parts.d.ts.map +1 -0
- package/dist/components/command.parts.js +77 -0
- package/dist/components/command.variants.d.ts +6 -0
- package/dist/components/command.variants.d.ts.map +1 -0
- package/dist/components/command.variants.js +23 -0
- package/dist/components/content-block.d.ts +24 -0
- package/dist/components/content-block.d.ts.map +1 -0
- package/dist/components/content-block.diff.d.ts +26 -0
- package/dist/components/content-block.diff.d.ts.map +1 -0
- package/dist/components/content-block.diff.js +110 -0
- package/dist/components/content-block.js +61 -0
- package/dist/components/content-block.parts.d.ts +12 -0
- package/dist/components/content-block.parts.d.ts.map +1 -0
- package/dist/components/content-block.parts.js +52 -0
- package/dist/components/content-blocks.d.ts +61 -0
- package/dist/components/content-blocks.d.ts.map +1 -0
- package/dist/components/content-blocks.js +99 -0
- package/dist/components/content-blocks.meta.d.ts +21 -0
- package/dist/components/content-blocks.meta.d.ts.map +1 -0
- package/dist/components/content-blocks.meta.js +56 -0
- package/dist/components/control.variants.d.ts +10 -0
- package/dist/components/control.variants.d.ts.map +1 -0
- package/dist/components/control.variants.js +25 -0
- package/dist/components/copy-button.d.ts +15 -0
- package/dist/components/copy-button.d.ts.map +1 -0
- package/dist/components/copy-button.js +96 -0
- package/dist/components/count.d.ts +5 -0
- package/dist/components/count.d.ts.map +1 -0
- package/dist/components/count.js +12 -0
- package/dist/components/data-table.body.d.ts +36 -0
- package/dist/components/data-table.body.d.ts.map +1 -0
- package/dist/components/data-table.body.js +112 -0
- package/dist/components/data-table.d.ts +14 -0
- package/dist/components/data-table.d.ts.map +1 -0
- package/dist/components/data-table.group-head.d.ts +17 -0
- package/dist/components/data-table.group-head.d.ts.map +1 -0
- package/dist/components/data-table.group-head.js +40 -0
- package/dist/components/data-table.group.d.ts +27 -0
- package/dist/components/data-table.group.d.ts.map +1 -0
- package/dist/components/data-table.group.js +32 -0
- package/dist/components/data-table.js +115 -0
- package/dist/components/data-table.menu.d.ts +12 -0
- package/dist/components/data-table.menu.d.ts.map +1 -0
- package/dist/components/data-table.menu.js +39 -0
- package/dist/components/data-table.parts.d.ts +28 -0
- package/dist/components/data-table.parts.d.ts.map +1 -0
- package/dist/components/data-table.parts.js +54 -0
- package/dist/components/data-table.selection.d.ts +27 -0
- package/dist/components/data-table.selection.d.ts.map +1 -0
- package/dist/components/data-table.selection.js +42 -0
- package/dist/components/data-table.state.d.ts +8 -0
- package/dist/components/data-table.state.d.ts.map +1 -0
- package/dist/components/data-table.state.js +11 -0
- package/dist/components/data-table.types.d.ts +71 -0
- package/dist/components/data-table.types.d.ts.map +1 -0
- package/dist/components/data-table.types.js +0 -0
- package/dist/components/data-table.variants.d.ts +22 -0
- package/dist/components/data-table.variants.d.ts.map +1 -0
- package/dist/components/data-table.variants.js +91 -0
- package/dist/components/data-tree.d.ts +20 -0
- package/dist/components/data-tree.d.ts.map +1 -0
- package/dist/components/data-tree.js +75 -0
- package/dist/components/data-tree.model.d.ts +35 -0
- package/dist/components/data-tree.model.d.ts.map +1 -0
- package/dist/components/data-tree.model.js +70 -0
- package/dist/components/data-tree.row.d.ts +23 -0
- package/dist/components/data-tree.row.d.ts.map +1 -0
- package/dist/components/data-tree.row.js +109 -0
- package/dist/components/data-view.board-card.d.ts +18 -0
- package/dist/components/data-view.board-card.d.ts.map +1 -0
- package/dist/components/data-view.board-card.js +74 -0
- package/dist/components/data-view.board-head.d.ts +14 -0
- package/dist/components/data-view.board-head.d.ts.map +1 -0
- package/dist/components/data-view.board-head.js +61 -0
- package/dist/components/data-view.board.d.ts +31 -0
- package/dist/components/data-view.board.d.ts.map +1 -0
- package/dist/components/data-view.board.js +120 -0
- package/dist/components/data-view.config.d.ts +70 -0
- package/dist/components/data-view.config.d.ts.map +1 -0
- package/dist/components/data-view.config.js +68 -0
- package/dist/components/data-view.d.ts +10 -0
- package/dist/components/data-view.d.ts.map +1 -0
- package/dist/components/data-view.hooks.d.ts +23 -0
- package/dist/components/data-view.hooks.d.ts.map +1 -0
- package/dist/components/data-view.hooks.js +104 -0
- package/dist/components/data-view.js +117 -0
- package/dist/components/data-view.parts.d.ts +22 -0
- package/dist/components/data-view.parts.d.ts.map +1 -0
- package/dist/components/data-view.parts.js +29 -0
- package/dist/components/data-view.toolbar.d.ts +34 -0
- package/dist/components/data-view.toolbar.d.ts.map +1 -0
- package/dist/components/data-view.toolbar.js +134 -0
- package/dist/components/data-view.types.d.ts +53 -0
- package/dist/components/data-view.types.d.ts.map +1 -0
- package/dist/components/data-view.types.js +0 -0
- package/dist/components/date-picker.d.ts +27 -0
- package/dist/components/date-picker.d.ts.map +1 -0
- package/dist/components/date-picker.js +123 -0
- package/dist/components/date-picker.range.d.ts +18 -0
- package/dist/components/date-picker.range.d.ts.map +1 -0
- package/dist/components/date-picker.range.js +97 -0
- package/dist/components/date-picker.range.parts.d.ts +12 -0
- package/dist/components/date-picker.range.parts.d.ts.map +1 -0
- package/dist/components/date-picker.range.parts.js +80 -0
- package/dist/components/description-list.d.ts +33 -0
- package/dist/components/description-list.d.ts.map +1 -0
- package/dist/components/description-list.js +75 -0
- package/dist/components/description-list.property.d.ts +25 -0
- package/dist/components/description-list.property.d.ts.map +1 -0
- package/dist/components/description-list.property.js +36 -0
- package/dist/components/description-list.variants.d.ts +8 -0
- package/dist/components/description-list.variants.d.ts.map +1 -0
- package/dist/components/description-list.variants.js +74 -0
- package/dist/components/dialog-shell.d.ts +36 -0
- package/dist/components/dialog-shell.d.ts.map +1 -0
- package/dist/components/dialog-shell.js +69 -0
- package/dist/components/dialog.confirm.d.ts +8 -0
- package/dist/components/dialog.confirm.d.ts.map +1 -0
- package/dist/components/dialog.confirm.js +91 -0
- package/dist/components/dialog.d.ts +27 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +53 -0
- package/dist/components/dialog.phrase.d.ts +9 -0
- package/dist/components/dialog.phrase.d.ts.map +1 -0
- package/dist/components/dialog.phrase.js +43 -0
- package/dist/components/dirty-bar.d.ts +30 -0
- package/dist/components/dirty-bar.d.ts.map +1 -0
- package/dist/components/dirty-bar.js +109 -0
- package/dist/components/disclosure.d.ts +24 -0
- package/dist/components/disclosure.d.ts.map +1 -0
- package/dist/components/disclosure.js +34 -0
- package/dist/components/dropdown-menu.d.ts +16 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.items.d.ts +15 -0
- package/dist/components/dropdown-menu.items.d.ts.map +1 -0
- package/dist/components/dropdown-menu.items.js +25 -0
- package/dist/components/dropdown-menu.js +80 -0
- package/dist/components/dropdown-menu.variants.d.ts +2 -0
- package/dist/components/dropdown-menu.variants.d.ts.map +1 -0
- package/dist/components/dropdown-menu.variants.js +1 -0
- package/dist/components/empty-state.d.ts +11 -0
- package/dist/components/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state.js +33 -0
- package/dist/components/entity-card.d.ts +34 -0
- package/dist/components/entity-card.d.ts.map +1 -0
- package/dist/components/entity-card.js +87 -0
- package/dist/components/entity-list.d.ts +30 -0
- package/dist/components/entity-list.d.ts.map +1 -0
- package/dist/components/entity-list.items.d.ts +20 -0
- package/dist/components/entity-list.items.d.ts.map +1 -0
- package/dist/components/entity-list.items.js +59 -0
- package/dist/components/entity-list.js +61 -0
- package/dist/components/entity-list.parts.d.ts +35 -0
- package/dist/components/entity-list.parts.d.ts.map +1 -0
- package/dist/components/entity-list.parts.js +86 -0
- package/dist/components/entity-list.row.d.ts +14 -0
- package/dist/components/entity-list.row.d.ts.map +1 -0
- package/dist/components/entity-list.row.js +58 -0
- package/dist/components/form-field.d.ts +13 -0
- package/dist/components/form-field.d.ts.map +1 -0
- package/dist/components/form-field.js +65 -0
- package/dist/components/form-field.live.d.ts +6 -0
- package/dist/components/form-field.live.d.ts.map +1 -0
- package/dist/components/form-field.live.js +19 -0
- package/dist/components/group-header.d.ts +23 -0
- package/dist/components/group-header.d.ts.map +1 -0
- package/dist/components/group-header.js +81 -0
- package/dist/components/highlight.d.ts +4 -0
- package/dist/components/highlight.d.ts.map +1 -0
- package/dist/components/highlight.js +14 -0
- package/dist/components/icon-button.d.ts +15 -0
- package/dist/components/icon-button.d.ts.map +1 -0
- package/dist/components/icon-button.js +25 -0
- package/dist/components/index.d.ts +155 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +95 -0
- package/dist/components/inline-edit.d.ts +24 -0
- package/dist/components/inline-edit.d.ts.map +1 -0
- package/dist/components/inline-edit.js +68 -0
- package/dist/components/input.d.ts +35 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +101 -0
- package/dist/components/kbd.d.ts +5 -0
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +12 -0
- package/dist/components/label.d.ts +5 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +16 -0
- package/dist/components/list-toolbar.d.ts +37 -0
- package/dist/components/list-toolbar.d.ts.map +1 -0
- package/dist/components/list-toolbar.filter.d.ts +13 -0
- package/dist/components/list-toolbar.filter.d.ts.map +1 -0
- package/dist/components/list-toolbar.filter.js +65 -0
- package/dist/components/list-toolbar.fit.d.ts +24 -0
- package/dist/components/list-toolbar.fit.d.ts.map +1 -0
- package/dist/components/list-toolbar.fit.js +69 -0
- package/dist/components/list-toolbar.icons.d.ts +10 -0
- package/dist/components/list-toolbar.icons.d.ts.map +1 -0
- package/dist/components/list-toolbar.icons.js +21 -0
- package/dist/components/list-toolbar.js +68 -0
- package/dist/components/list-toolbar.menus.d.ts +26 -0
- package/dist/components/list-toolbar.menus.d.ts.map +1 -0
- package/dist/components/list-toolbar.menus.js +98 -0
- package/dist/components/list-toolbar.parts.d.ts +25 -0
- package/dist/components/list-toolbar.parts.d.ts.map +1 -0
- package/dist/components/list-toolbar.parts.js +72 -0
- package/dist/components/list-toolbar.search.d.ts +8 -0
- package/dist/components/list-toolbar.search.d.ts.map +1 -0
- package/dist/components/list-toolbar.search.js +54 -0
- package/dist/components/list-toolbar.variants.d.ts +11 -0
- package/dist/components/list-toolbar.variants.d.ts.map +1 -0
- package/dist/components/list-toolbar.variants.js +9 -0
- package/dist/components/log-view.d.ts +25 -0
- package/dist/components/log-view.d.ts.map +1 -0
- package/dist/components/log-view.hooks.d.ts +40 -0
- package/dist/components/log-view.hooks.d.ts.map +1 -0
- package/dist/components/log-view.hooks.js +87 -0
- package/dist/components/log-view.js +110 -0
- package/dist/components/log-view.model.d.ts +35 -0
- package/dist/components/log-view.model.d.ts.map +1 -0
- package/dist/components/log-view.model.js +56 -0
- package/dist/components/log-view.row.d.ts +31 -0
- package/dist/components/log-view.row.d.ts.map +1 -0
- package/dist/components/log-view.row.js +127 -0
- package/dist/components/menu.parts.d.ts +26 -0
- package/dist/components/menu.parts.d.ts.map +1 -0
- package/dist/components/menu.parts.js +59 -0
- package/dist/components/menu.selectable.d.ts +24 -0
- package/dist/components/menu.selectable.d.ts.map +1 -0
- package/dist/components/menu.selectable.js +66 -0
- package/dist/components/menu.variants.d.ts +9 -0
- package/dist/components/menu.variants.d.ts.map +1 -0
- package/dist/components/menu.variants.js +16 -0
- package/dist/components/nav-tree.d.ts +22 -0
- package/dist/components/nav-tree.d.ts.map +1 -0
- package/dist/components/nav-tree.js +95 -0
- package/dist/components/nav-tree.variants.d.ts +13 -0
- package/dist/components/nav-tree.variants.d.ts.map +1 -0
- package/dist/components/nav-tree.variants.js +9 -0
- package/dist/components/page-header.d.ts +34 -0
- package/dist/components/page-header.d.ts.map +1 -0
- package/dist/components/page-header.js +115 -0
- package/dist/components/pagination.d.ts +13 -0
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +114 -0
- package/dist/components/popover.d.ts +18 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +64 -0
- package/dist/components/priority-glyph.d.ts +11 -0
- package/dist/components/priority-glyph.d.ts.map +1 -0
- package/dist/components/priority-glyph.js +75 -0
- package/dist/components/progress.d.ts +30 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +87 -0
- package/dist/components/progress.meter.d.ts +36 -0
- package/dist/components/progress.meter.d.ts.map +1 -0
- package/dist/components/progress.meter.js +64 -0
- package/dist/components/progress.segments.d.ts +28 -0
- package/dist/components/progress.segments.d.ts.map +1 -0
- package/dist/components/progress.segments.js +59 -0
- package/dist/components/property-date.d.ts +11 -0
- package/dist/components/property-date.d.ts.map +1 -0
- package/dist/components/property-date.format.d.ts +3 -0
- package/dist/components/property-date.format.d.ts.map +1 -0
- package/dist/components/property-date.format.js +7 -0
- package/dist/components/property-date.js +142 -0
- package/dist/components/property-select.d.ts +28 -0
- package/dist/components/property-select.d.ts.map +1 -0
- package/dist/components/property-select.js +68 -0
- package/dist/components/prose.d.ts +6 -0
- package/dist/components/prose.d.ts.map +1 -0
- package/dist/components/prose.js +13 -0
- package/dist/components/radio-group.d.ts +23 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +116 -0
- package/dist/components/relative-time.d.ts +12 -0
- package/dist/components/relative-time.d.ts.map +1 -0
- package/dist/components/relative-time.js +30 -0
- package/dist/components/resizable-split-prepaint.d.ts +12 -0
- package/dist/components/resizable-split-prepaint.d.ts.map +1 -0
- package/dist/components/resizable-split-prepaint.js +5 -0
- package/dist/components/resizable-split.context.d.ts +11 -0
- package/dist/components/resizable-split.context.d.ts.map +1 -0
- package/dist/components/resizable-split.context.js +9 -0
- package/dist/components/resizable-split.d.ts +30 -0
- package/dist/components/resizable-split.d.ts.map +1 -0
- package/dist/components/resizable-split.js +85 -0
- package/dist/components/resizable.d.ts +21 -0
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +90 -0
- package/dist/components/resizable.model.d.ts +18 -0
- package/dist/components/resizable.model.d.ts.map +1 -0
- package/dist/components/resizable.model.js +11 -0
- package/dist/components/resizable.parts.d.ts +20 -0
- package/dist/components/resizable.parts.d.ts.map +1 -0
- package/dist/components/resizable.parts.js +36 -0
- package/dist/components/resizable.variants.d.ts +16 -0
- package/dist/components/resizable.variants.d.ts.map +1 -0
- package/dist/components/resizable.variants.js +41 -0
- package/dist/components/row.variants.d.ts +10 -0
- package/dist/components/row.variants.d.ts.map +1 -0
- package/dist/components/row.variants.js +36 -0
- package/dist/components/secret-input.d.ts +20 -0
- package/dist/components/secret-input.d.ts.map +1 -0
- package/dist/components/secret-input.js +94 -0
- package/dist/components/section-index.d.ts +23 -0
- package/dist/components/section-index.d.ts.map +1 -0
- package/dist/components/section-index.js +51 -0
- package/dist/components/section.d.ts +19 -0
- package/dist/components/section.d.ts.map +1 -0
- package/dist/components/section.js +42 -0
- package/dist/components/select.d.ts +28 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +120 -0
- package/dist/components/select.keys.d.ts +6 -0
- package/dist/components/select.keys.d.ts.map +1 -0
- package/dist/components/select.keys.js +20 -0
- package/dist/components/select.list.d.ts +26 -0
- package/dist/components/select.list.d.ts.map +1 -0
- package/dist/components/select.list.js +50 -0
- package/dist/components/select.parts.d.ts +53 -0
- package/dist/components/select.parts.d.ts.map +1 -0
- package/dist/components/select.parts.js +95 -0
- package/dist/components/select.variants.d.ts +13 -0
- package/dist/components/select.variants.d.ts.map +1 -0
- package/dist/components/select.variants.js +54 -0
- package/dist/components/sheet.d.ts +27 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.docked.d.ts +8 -0
- package/dist/components/sheet.docked.d.ts.map +1 -0
- package/dist/components/sheet.docked.js +106 -0
- package/dist/components/sheet.js +61 -0
- package/dist/components/sheet.narrow.d.ts +3 -0
- package/dist/components/sheet.narrow.d.ts.map +1 -0
- package/dist/components/sheet.narrow.js +9 -0
- package/dist/components/sidebar.d.ts +14 -0
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +48 -0
- package/dist/components/skeleton.d.ts +10 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +21 -0
- package/dist/components/sparkline.d.ts +26 -0
- package/dist/components/sparkline.d.ts.map +1 -0
- package/dist/components/sparkline.js +83 -0
- package/dist/components/spinner.d.ts +10 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +38 -0
- package/dist/components/stat-card.d.ts +9 -0
- package/dist/components/stat-card.d.ts.map +1 -0
- package/dist/components/stat-card.header.d.ts +19 -0
- package/dist/components/stat-card.header.d.ts.map +1 -0
- package/dist/components/stat-card.header.js +43 -0
- package/dist/components/stat-card.js +84 -0
- package/dist/components/stat-card.parts.d.ts +10 -0
- package/dist/components/stat-card.parts.d.ts.map +1 -0
- package/dist/components/stat-card.parts.js +35 -0
- package/dist/components/stat-card.state.d.ts +9 -0
- package/dist/components/stat-card.state.d.ts.map +1 -0
- package/dist/components/stat-card.state.js +51 -0
- package/dist/components/stat-card.types.d.ts +28 -0
- package/dist/components/stat-card.types.d.ts.map +1 -0
- package/dist/components/stat-card.types.js +0 -0
- package/dist/components/status-bar.d.ts +32 -0
- package/dist/components/status-bar.d.ts.map +1 -0
- package/dist/components/status-bar.js +114 -0
- package/dist/components/status-bar.variants.d.ts +12 -0
- package/dist/components/status-bar.variants.d.ts.map +1 -0
- package/dist/components/status-bar.variants.js +63 -0
- package/dist/components/status-glyph.d.ts +15 -0
- package/dist/components/status-glyph.d.ts.map +1 -0
- package/dist/components/status-glyph.js +118 -0
- package/dist/components/status-glyph.status.d.ts +11 -0
- package/dist/components/status-glyph.status.d.ts.map +1 -0
- package/dist/components/status-glyph.status.js +33 -0
- package/dist/components/step-list.d.ts +28 -0
- package/dist/components/step-list.d.ts.map +1 -0
- package/dist/components/step-list.js +70 -0
- package/dist/components/step-list.parts.d.ts +34 -0
- package/dist/components/step-list.parts.d.ts.map +1 -0
- package/dist/components/step-list.parts.js +74 -0
- package/dist/components/switch.d.ts +22 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +93 -0
- package/dist/components/table.d.ts +19 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +73 -0
- package/dist/components/tabs.context.d.ts +19 -0
- package/dist/components/tabs.context.d.ts.map +1 -0
- package/dist/components/tabs.context.js +15 -0
- package/dist/components/tabs.d.ts +23 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +61 -0
- package/dist/components/tabs.trigger.d.ts +12 -0
- package/dist/components/tabs.trigger.d.ts.map +1 -0
- package/dist/components/tabs.trigger.js +69 -0
- package/dist/components/tabs.variants.d.ts +10 -0
- package/dist/components/tabs.variants.d.ts.map +1 -0
- package/dist/components/tabs.variants.js +33 -0
- package/dist/components/toast.d.ts +21 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +125 -0
- package/dist/components/toggle-group.d.ts +36 -0
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.js +68 -0
- package/dist/components/toggle-group.variants.d.ts +13 -0
- package/dist/components/toggle-group.variants.d.ts.map +1 -0
- package/dist/components/toggle-group.variants.js +71 -0
- package/dist/components/tooltip.d.ts +10 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +49 -0
- package/dist/components/tree-select.d.ts +26 -0
- package/dist/components/tree-select.d.ts.map +1 -0
- package/dist/components/tree-select.js +102 -0
- package/dist/components/tree-select.model.d.ts +30 -0
- package/dist/components/tree-select.model.d.ts.map +1 -0
- package/dist/components/tree-select.model.js +33 -0
- package/dist/components/tree-select.rows.d.ts +18 -0
- package/dist/components/tree-select.rows.d.ts.map +1 -0
- package/dist/components/tree-select.rows.js +39 -0
- package/dist/components/truncate.d.ts +9 -0
- package/dist/components/truncate.d.ts.map +1 -0
- package/dist/components/truncate.js +31 -0
- package/dist/components/use-split-state.d.ts +17 -0
- package/dist/components/use-split-state.d.ts.map +1 -0
- package/dist/components/use-split-state.js +51 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +96 -0
- package/dist/lib/aria.d.ts +4 -0
- package/dist/lib/aria.d.ts.map +1 -0
- package/dist/lib/aria.js +4 -0
- package/dist/lib/copy-text.d.ts +3 -0
- package/dist/lib/copy-text.d.ts.map +1 -0
- package/dist/lib/copy-text.js +20 -0
- package/dist/lib/cron.d.ts +13 -0
- package/dist/lib/cron.d.ts.map +1 -0
- package/dist/lib/cron.js +131 -0
- package/dist/lib/cron.next.d.ts +9 -0
- package/dist/lib/cron.next.d.ts.map +1 -0
- package/dist/lib/cron.next.js +49 -0
- package/dist/lib/cron.text.d.ts +3 -0
- package/dist/lib/cron.text.d.ts.map +1 -0
- package/dist/lib/cron.text.js +61 -0
- package/dist/lib/drag-reorder.d.ts +33 -0
- package/dist/lib/drag-reorder.d.ts.map +1 -0
- package/dist/lib/drag-reorder.js +61 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +1 -0
- package/dist/lib/list-controls-storage.d.ts +7 -0
- package/dist/lib/list-controls-storage.d.ts.map +1 -0
- package/dist/lib/list-controls-storage.js +25 -0
- package/dist/lib/list-controls.d.ts +49 -0
- package/dist/lib/list-controls.d.ts.map +1 -0
- package/dist/lib/list-controls.js +44 -0
- package/dist/lib/list-navigation.d.ts +3 -0
- package/dist/lib/list-navigation.d.ts.map +1 -0
- package/dist/lib/list-navigation.js +7 -0
- package/dist/lib/overlay-layer.d.ts +32 -0
- package/dist/lib/overlay-layer.d.ts.map +1 -0
- package/dist/lib/overlay-layer.js +37 -0
- package/dist/lib/panel-sizes.d.ts +18 -0
- package/dist/lib/panel-sizes.d.ts.map +1 -0
- package/dist/lib/panel-sizes.js +25 -0
- package/dist/lib/relative-range.d.ts +23 -0
- package/dist/lib/relative-range.d.ts.map +1 -0
- package/dist/lib/relative-range.js +130 -0
- package/dist/lib/relative-time-format.d.ts +6 -0
- package/dist/lib/relative-time-format.d.ts.map +1 -0
- package/dist/lib/relative-time-format.js +21 -0
- package/dist/lib/split-px.d.ts +23 -0
- package/dist/lib/split-px.d.ts.map +1 -0
- package/dist/lib/split-px.js +30 -0
- package/dist/lib/table-sort.d.ts +11 -0
- package/dist/lib/table-sort.d.ts.map +1 -0
- package/dist/lib/table-sort.js +17 -0
- package/dist/lib/usage-level.d.ts +13 -0
- package/dist/lib/usage-level.d.ts.map +1 -0
- package/dist/lib/usage-level.js +12 -0
- package/dist/lib/use-anchor-position.d.ts +22 -0
- package/dist/lib/use-anchor-position.d.ts.map +1 -0
- package/dist/lib/use-anchor-position.js +41 -0
- package/dist/lib/use-announce.d.ts +6 -0
- package/dist/lib/use-announce.d.ts.map +1 -0
- package/dist/lib/use-announce.js +20 -0
- package/dist/lib/use-cell-stack.d.ts +8 -0
- package/dist/lib/use-cell-stack.d.ts.map +1 -0
- package/dist/lib/use-cell-stack.js +23 -0
- package/dist/lib/use-controlled.d.ts +8 -0
- package/dist/lib/use-controlled.d.ts.map +1 -0
- package/dist/lib/use-controlled.js +22 -0
- package/dist/lib/use-drag-reorder.d.ts +28 -0
- package/dist/lib/use-drag-reorder.d.ts.map +1 -0
- package/dist/lib/use-drag-reorder.js +100 -0
- package/dist/lib/use-flip.d.ts +8 -0
- package/dist/lib/use-flip.d.ts.map +1 -0
- package/dist/lib/use-flip.js +28 -0
- package/dist/lib/use-focus-origin.d.ts +9 -0
- package/dist/lib/use-focus-origin.d.ts.map +1 -0
- package/dist/lib/use-focus-origin.js +15 -0
- package/dist/lib/use-focus-restore.d.ts +7 -0
- package/dist/lib/use-focus-restore.d.ts.map +1 -0
- package/dist/lib/use-focus-restore.js +15 -0
- package/dist/lib/use-focus-trap.d.ts +5 -0
- package/dist/lib/use-focus-trap.d.ts.map +1 -0
- package/dist/lib/use-focus-trap.js +32 -0
- package/dist/lib/use-keep-focus.d.ts +4 -0
- package/dist/lib/use-keep-focus.d.ts.map +1 -0
- package/dist/lib/use-keep-focus.js +20 -0
- package/dist/lib/use-list-controls.d.ts +28 -0
- package/dist/lib/use-list-controls.d.ts.map +1 -0
- package/dist/lib/use-list-controls.js +72 -0
- package/dist/lib/use-mounted.d.ts +3 -0
- package/dist/lib/use-mounted.d.ts.map +1 -0
- package/dist/lib/use-mounted.js +8 -0
- package/dist/lib/use-persisted-state.d.ts +21 -0
- package/dist/lib/use-persisted-state.d.ts.map +1 -0
- package/dist/lib/use-persisted-state.js +52 -0
- package/dist/lib/use-roving-focus.d.ts +14 -0
- package/dist/lib/use-roving-focus.d.ts.map +1 -0
- package/dist/lib/use-roving-focus.js +36 -0
- package/dist/lib/use-scroll-lock.d.ts +6 -0
- package/dist/lib/use-scroll-lock.d.ts.map +1 -0
- package/dist/lib/use-scroll-lock.js +23 -0
- package/dist/lib/use-scroll-spy.d.ts +12 -0
- package/dist/lib/use-scroll-spy.d.ts.map +1 -0
- package/dist/lib/use-scroll-spy.js +34 -0
- package/dist/lib/utils.d.ts +12 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +9 -0
- package/package.json +457 -4
- package/src/styles/base.css +98 -0
- package/src/styles/primitives.css +143 -0
- package/src/styles/theme.css +10 -0
- package/src/styles/tokens.css +344 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// src/components/property-date.format.ts
|
|
2
|
+
var e = (e, t = /* @__PURE__ */ new Date()) => e.toLocaleDateString("en-US", {
|
|
3
|
+
month: "short",
|
|
4
|
+
day: "numeric",
|
|
5
|
+
...e.getFullYear() === t.getFullYear() ? {} : { year: "numeric" }
|
|
6
|
+
});
|
|
7
|
+
export { e as formatPropertyDate };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMounted as e } from "../lib/use-mounted.js";
|
|
3
|
+
import { useRovingFocus as t } from "../lib/use-roving-focus.js";
|
|
4
|
+
import { cn as n } from "../lib/utils.js";
|
|
5
|
+
import { fieldVariants as r } from "./control.variants.js";
|
|
6
|
+
import { menuItemVariants as i, menuLabelVariants as a } from "./menu.variants.js";
|
|
7
|
+
import { Popover as o } from "./popover.js";
|
|
8
|
+
import { formatPropertyDate as s } from "./property-date.format.js";
|
|
9
|
+
import { PropertyValue as c, usePropertyLabel as l } from "./description-list.property.js";
|
|
10
|
+
import * as u from "react";
|
|
11
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
+
// src/components/property-date.tsx
|
|
13
|
+
var p = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), m = (e, t) => new Date(e.getFullYear(), e.getMonth(), e.getDate() + t), h = (e) => `${String(e.getFullYear())}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, g = [
|
|
14
|
+
{
|
|
15
|
+
label: "Today",
|
|
16
|
+
days: 0
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: "Tomorrow",
|
|
20
|
+
days: 1
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: "Next week",
|
|
24
|
+
days: 7
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: "In two weeks",
|
|
28
|
+
days: 14
|
|
29
|
+
}
|
|
30
|
+
], _ = n(i(), "justify-between text-left focus-visible:bg-accent"), v = "[data-slot=\"property-date-option\"]", y = (e, t) => {
|
|
31
|
+
let [n, r, i] = e.split("-").map(Number);
|
|
32
|
+
return n > 999 && r && i && e !== (t ? h(t) : "") ? new Date(n, r - 1, i) : null;
|
|
33
|
+
}, b = ({ label: e, today: i, value: o, onPick: c, onCommit: l }) => {
|
|
34
|
+
let p = u.useRef(!1), b = (e) => {
|
|
35
|
+
p.current = !0, c(e);
|
|
36
|
+
}, x = u.useRef(null), [S, C] = u.useState(o ? h(o) : ""), w = () => {
|
|
37
|
+
let e = y(S, o);
|
|
38
|
+
e && b(e);
|
|
39
|
+
}, T = u.useRef(() => {});
|
|
40
|
+
return u.useLayoutEffect(() => {
|
|
41
|
+
T.current = () => {
|
|
42
|
+
let e = y(S, o);
|
|
43
|
+
e && l(e);
|
|
44
|
+
};
|
|
45
|
+
}), u.useEffect(() => () => {
|
|
46
|
+
p.current || T.current();
|
|
47
|
+
}, []), t(x, {
|
|
48
|
+
selector: v,
|
|
49
|
+
loop: !0
|
|
50
|
+
}), u.useEffect(() => {
|
|
51
|
+
x.current?.querySelector(v)?.focus();
|
|
52
|
+
}, []), /* @__PURE__ */ f("div", {
|
|
53
|
+
ref: x,
|
|
54
|
+
className: "flex flex-col",
|
|
55
|
+
children: [
|
|
56
|
+
e && /* @__PURE__ */ d("div", {
|
|
57
|
+
className: a(),
|
|
58
|
+
children: e
|
|
59
|
+
}),
|
|
60
|
+
g.map((e) => {
|
|
61
|
+
let t = m(i, e.days);
|
|
62
|
+
return /* @__PURE__ */ f("button", {
|
|
63
|
+
type: "button",
|
|
64
|
+
className: _,
|
|
65
|
+
onClick: () => b(t),
|
|
66
|
+
"data-slot": "property-date-option",
|
|
67
|
+
children: [/* @__PURE__ */ d("span", { children: e.label }), /* @__PURE__ */ d("span", {
|
|
68
|
+
className: "text-xs text-muted-foreground",
|
|
69
|
+
children: s(t, i)
|
|
70
|
+
})]
|
|
71
|
+
}, e.label);
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ d("button", {
|
|
74
|
+
type: "button",
|
|
75
|
+
className: _,
|
|
76
|
+
onClick: () => b(null),
|
|
77
|
+
"data-slot": "property-date-option",
|
|
78
|
+
children: "No date"
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ d("div", {
|
|
81
|
+
className: "my-1 h-px bg-border",
|
|
82
|
+
role: "separator"
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ d("input", {
|
|
85
|
+
type: "date",
|
|
86
|
+
"aria-label": `${e || "Date"}, pick a day`,
|
|
87
|
+
value: S,
|
|
88
|
+
onChange: (e) => C(e.target.value),
|
|
89
|
+
onBlur: (e) => {
|
|
90
|
+
x.current?.contains(e.relatedTarget) || w();
|
|
91
|
+
},
|
|
92
|
+
onKeyDown: (e) => {
|
|
93
|
+
e.key === "Enter" && (e.preventDefault(), w());
|
|
94
|
+
},
|
|
95
|
+
className: n(r({ size: "sm" }), "bg-background text-foreground")
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
});
|
|
99
|
+
}, x = u.forwardRef(({ value: t, onValueChange: r, today: i, className: a }, f) => {
|
|
100
|
+
let m = l(), [h, g] = u.useState(!1), _ = u.useRef(null);
|
|
101
|
+
u.useImperativeHandle(f, () => _.current);
|
|
102
|
+
let v = e(), y = p(i ?? /* @__PURE__ */ new Date()), x = v || i !== void 0, S = x && t !== null && p(t) < y, C = t ? x ? s(t, y) : t.toLocaleDateString("en-US", {
|
|
103
|
+
month: "short",
|
|
104
|
+
day: "numeric",
|
|
105
|
+
timeZone: "UTC"
|
|
106
|
+
}) : "Set date", w = () => {
|
|
107
|
+
g(!1), _.current?.focus();
|
|
108
|
+
};
|
|
109
|
+
return /* @__PURE__ */ d(o, {
|
|
110
|
+
open: h,
|
|
111
|
+
onOpenChange: () => g(!1),
|
|
112
|
+
side: "bottom",
|
|
113
|
+
"aria-label": m || "Date",
|
|
114
|
+
className: "w-55 min-w-0 p-1",
|
|
115
|
+
onKeyDown: (e) => {
|
|
116
|
+
e.key === "Escape" && (e.stopPropagation(), e.nativeEvent.stopImmediatePropagation(), w());
|
|
117
|
+
},
|
|
118
|
+
trigger: /* @__PURE__ */ d(c, {
|
|
119
|
+
ref: _,
|
|
120
|
+
valueText: `${C}${S ? ", overdue" : ""}`,
|
|
121
|
+
"aria-haspopup": "dialog",
|
|
122
|
+
"aria-expanded": h,
|
|
123
|
+
onClick: () => g(!h),
|
|
124
|
+
className: n(!t && "text-muted-foreground", S && "text-destructive", a),
|
|
125
|
+
children: /* @__PURE__ */ d("span", {
|
|
126
|
+
className: n(!x && t && "invisible"),
|
|
127
|
+
children: C
|
|
128
|
+
})
|
|
129
|
+
}),
|
|
130
|
+
content: /* @__PURE__ */ d(b, {
|
|
131
|
+
label: m,
|
|
132
|
+
today: y,
|
|
133
|
+
value: t,
|
|
134
|
+
onPick: (e) => {
|
|
135
|
+
r(e), w();
|
|
136
|
+
},
|
|
137
|
+
onCommit: r
|
|
138
|
+
})
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
x.displayName = "PropertyDate";
|
|
142
|
+
export { x as PropertyDate };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface PropertyOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** Glyph, icon, avatar or colour dot shown before the label, in the menu and the value. */
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface PropertySelectProps {
|
|
9
|
+
value: string;
|
|
10
|
+
onValueChange: (value: string) => void;
|
|
11
|
+
options: PropertyOption[];
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Classes of the value button. */
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/** Single choice: a menu of options with a check on the current one; closes on pick. */
|
|
17
|
+
export declare const PropertySelect: React.ForwardRefExoticComponent<PropertySelectProps & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
export interface PropertyMultiSelectProps {
|
|
19
|
+
value: string[];
|
|
20
|
+
onValueChange: (value: string[]) => void;
|
|
21
|
+
options: PropertyOption[];
|
|
22
|
+
/** Shown when nothing is picked, for example "Add label". */
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
/** Several choices: checkbox items that keep the menu open; the value shows as 20 px chips. */
|
|
27
|
+
export declare const PropertyMultiSelect: React.ForwardRefExoticComponent<PropertyMultiSelectProps & React.RefAttributes<HTMLButtonElement>>;
|
|
28
|
+
//# sourceMappingURL=property-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-select.d.ts","sourceRoot":"","sources":["../../src/components/property-select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,wFAAwF;AACxF,eAAO,MAAM,cAAc,+FAgC1B,CAAC;AAGF,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzC,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,+FAA+F;AAC/F,eAAO,MAAM,mBAAmB,oGA+C/B,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { Badge as t } from "./badge.js";
|
|
4
|
+
import { DropdownMenuCheckboxItem as n, DropdownMenuLabel as r, DropdownMenuRadioGroup as i, DropdownMenuRadioItem as a } from "./dropdown-menu.items.js";
|
|
5
|
+
import { DropdownMenu as o } from "./dropdown-menu.js";
|
|
6
|
+
import { PropertyValue as s, usePropertyLabel as c } from "./description-list.property.js";
|
|
7
|
+
import * as l from "react";
|
|
8
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
// src/components/property-select.tsx
|
|
10
|
+
var f = "max-h-[min(420px,70vh)] overflow-auto", p = l.forwardRef(({ value: e, onValueChange: t, options: n, disabled: l, className: p }, m) => {
|
|
11
|
+
let h = c(), g = n.find((t) => t.value === e);
|
|
12
|
+
return /* @__PURE__ */ d(o, {
|
|
13
|
+
align: "start",
|
|
14
|
+
"aria-label": h,
|
|
15
|
+
className: f,
|
|
16
|
+
trigger: /* @__PURE__ */ d(s, {
|
|
17
|
+
ref: m,
|
|
18
|
+
valueText: g?.label ?? "None",
|
|
19
|
+
disabled: l,
|
|
20
|
+
className: p,
|
|
21
|
+
children: [g?.icon, /* @__PURE__ */ u("span", {
|
|
22
|
+
className: "truncate",
|
|
23
|
+
children: g?.label ?? "None"
|
|
24
|
+
})]
|
|
25
|
+
}),
|
|
26
|
+
children: [h && /* @__PURE__ */ u(r, { children: h }), /* @__PURE__ */ u(i, {
|
|
27
|
+
value: e,
|
|
28
|
+
onValueChange: t,
|
|
29
|
+
children: n.map((e) => /* @__PURE__ */ u(a, {
|
|
30
|
+
value: e.value,
|
|
31
|
+
icon: e.icon,
|
|
32
|
+
closeOnClick: !0,
|
|
33
|
+
children: e.label
|
|
34
|
+
}, e.value))
|
|
35
|
+
})]
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
p.displayName = "PropertySelect";
|
|
39
|
+
var m = l.forwardRef(({ value: i, onValueChange: a, options: l, placeholder: p = "Add", className: m }, h) => {
|
|
40
|
+
let g = c(), _ = l.filter((e) => i.includes(e.value)), v = _.length ? _.map((e) => e.label).join(", ") : "none";
|
|
41
|
+
return /* @__PURE__ */ d(o, {
|
|
42
|
+
align: "start",
|
|
43
|
+
"aria-label": g,
|
|
44
|
+
className: f,
|
|
45
|
+
trigger: /* @__PURE__ */ d(s, {
|
|
46
|
+
ref: h,
|
|
47
|
+
valueText: v,
|
|
48
|
+
className: e("h-auto min-h-6 flex-wrap py-0.5", m),
|
|
49
|
+
children: [_.length === 0 && /* @__PURE__ */ u("span", {
|
|
50
|
+
className: "text-muted-foreground",
|
|
51
|
+
children: p
|
|
52
|
+
}), _.map((e) => /* @__PURE__ */ d(t, {
|
|
53
|
+
variant: "outline-muted",
|
|
54
|
+
className: "[&_svg]:size-3",
|
|
55
|
+
"data-slot": "property-chip",
|
|
56
|
+
children: [e.icon, e.label]
|
|
57
|
+
}, e.value))]
|
|
58
|
+
}),
|
|
59
|
+
children: [g && /* @__PURE__ */ u(r, { children: g }), l.map((e) => /* @__PURE__ */ u(n, {
|
|
60
|
+
icon: e.icon,
|
|
61
|
+
checked: i.includes(e.value),
|
|
62
|
+
onCheckedChange: (t) => a(t ? [...i, e.value] : i.filter((t) => t !== e.value)),
|
|
63
|
+
children: e.label
|
|
64
|
+
}, e.value))]
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
m.displayName = "PropertyMultiSelect";
|
|
68
|
+
export { m as PropertyMultiSelect, p as PropertySelect };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface ProseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
/** md: 14 px reading text (default); sm: 13 px with tighter rhythm, for panes and cards. */
|
|
3
|
+
size?: 'sm' | 'md';
|
|
4
|
+
}
|
|
5
|
+
export declare const Prose: ({ className, size, ...props }: ProseProps) => React.JSX.Element;
|
|
6
|
+
//# sourceMappingURL=prose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prose.d.ts","sourceRoot":"","sources":["../../src/components/prose.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACtE,4FAA4F;IAC5F,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAOD,eAAO,MAAM,KAAK,GAAI,+BAAsC,UAAU,KAAG,KAAK,CAAC,GAAG,CAAC,OAyBlF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
// src/components/prose.tsx
|
|
4
|
+
var n = {
|
|
5
|
+
md: "text-sm leading-relaxed [&_p+p]:mt-4 [&_h2]:text-lg [&_h2]:mt-6 [&_h3]:text-base [&_h3]:mt-4",
|
|
6
|
+
sm: "text-ui leading-normal [&_p+p]:mt-2.5 [&_h2]:text-sm [&_h2]:mt-4 [&_h3]:text-ui [&_h3]:mt-3"
|
|
7
|
+
}, r = ({ className: r, size: i = "md", ...a }) => /* @__PURE__ */ t("div", {
|
|
8
|
+
className: e("text-muted-foreground", n[i], "[&_a]:text-primary-emphasis [&_a]:underline [&_a]:underline-offset-4 [&_a:hover]:text-foreground [&_a]:rounded-sm [&_a]:focus-ring", "[&_strong]:font-semibold [&_strong]:text-foreground", "[&_ul]:list-disc [&_ul]:pl-6 [&_ul]:mt-2", "[&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:mt-2", "[&_li]:mt-1", "[&_h2]:font-semibold [&_h2]:text-foreground [&_h2]:mb-2", "[&_h3]:font-semibold [&_h3]:text-foreground [&_h3]:mb-1", "[&_code]:rounded-sm [&_code]:bg-muted [&_code]:px-1 [&_code]:py-px [&_code]:font-mono [&_code]:text-xs", "[&_pre]:my-3 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:border [&_pre]:border-border [&_pre]:bg-muted/40 [&_pre]:px-3 [&_pre]:py-2 [&_pre]:text-xs [&_pre]:leading-relaxed [&_pre]:text-foreground", "[&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:text-[length:inherit]", "[&_table]:my-3 [&_table]:w-full [&_table]:border-collapse [&_table]:text-ui", "[&_th]:h-8 [&_th]:border-b [&_th]:border-border [&_th]:px-3 [&_th]:text-left [&_th]:text-xs [&_th]:font-normal", "[&_td]:h-9 [&_td]:border-b [&_td]:border-border [&_td]:px-3 [&_td]:text-foreground", "[&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-4 [&_blockquote]:italic", r),
|
|
9
|
+
"data-slot": "prose",
|
|
10
|
+
"data-size": i,
|
|
11
|
+
...a
|
|
12
|
+
});
|
|
13
|
+
export { r as Prose };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const radioGroupItemVariants: (props?: ({
|
|
3
|
+
disabled?: boolean | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
export declare const radioGroupIndicatorVariants: (props?: ({
|
|
6
|
+
selected?: boolean | null | undefined;
|
|
7
|
+
error?: boolean | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export interface RadioGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
onValueChange?: (value: string) => void;
|
|
13
|
+
name?: string;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
error?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export interface RadioGroupItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'value'> {
|
|
19
|
+
value: string;
|
|
20
|
+
error?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
23
|
+
//# sourceMappingURL=radio-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,eAAO,MAAM,sBAAsB;;8EAKjC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;8EAevC,CAAC;AAcF,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,wFAuCtB,CAAC;AAGF,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,OAAO,CACR;IACC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,cAAc,+FAgF1B,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { nextListIndex as e } from "../lib/list-navigation.js";
|
|
3
|
+
import { cn as t } from "../lib/utils.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import { cva as r } from "class-variance-authority";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
// src/components/radio-group.tsx
|
|
8
|
+
var o = "[data-slot=\"radio-group\"]", s = "[data-slot=\"radio-group-item\"]", c = r("flex items-center gap-2 text-ui", {
|
|
9
|
+
variants: { disabled: {
|
|
10
|
+
true: "opacity-50 cursor-not-allowed",
|
|
11
|
+
false: "cursor-pointer"
|
|
12
|
+
} },
|
|
13
|
+
defaultVariants: { disabled: !1 }
|
|
14
|
+
}), l = r(["flex size-4 shrink-0 items-center justify-center rounded-full border transition-colors", "focus-ring"], {
|
|
15
|
+
variants: {
|
|
16
|
+
selected: {
|
|
17
|
+
true: "border-primary bg-primary",
|
|
18
|
+
false: "border-muted-foreground/50 hover:border-muted-foreground"
|
|
19
|
+
},
|
|
20
|
+
error: {
|
|
21
|
+
true: "border-destructive",
|
|
22
|
+
false: ""
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
selected: !1,
|
|
27
|
+
error: !1
|
|
28
|
+
}
|
|
29
|
+
}), u = n.createContext({
|
|
30
|
+
value: "",
|
|
31
|
+
onValueChange: () => {},
|
|
32
|
+
name: ""
|
|
33
|
+
}), d = n.forwardRef(({ value: e, defaultValue: r = "", onValueChange: a, name: o, error: s = !1, className: c, children: l, ...d }, f) => {
|
|
34
|
+
let [p, m] = n.useState(r), h = n.useId(), g = e ?? p, _ = o ?? h;
|
|
35
|
+
return /* @__PURE__ */ i(u.Provider, {
|
|
36
|
+
value: {
|
|
37
|
+
value: g,
|
|
38
|
+
onValueChange: (e) => {
|
|
39
|
+
m(e), a?.(e);
|
|
40
|
+
},
|
|
41
|
+
name: _
|
|
42
|
+
},
|
|
43
|
+
children: /* @__PURE__ */ i("div", {
|
|
44
|
+
ref: f,
|
|
45
|
+
role: "radiogroup",
|
|
46
|
+
"aria-invalid": s || void 0,
|
|
47
|
+
className: t("grid gap-2", c),
|
|
48
|
+
"data-slot": "radio-group",
|
|
49
|
+
...d,
|
|
50
|
+
children: l
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
d.displayName = "RadioGroup";
|
|
55
|
+
var f = n.forwardRef(({ value: r, id: d, disabled: f = !1, error: p = !1, className: m, children: h, ...g }, _) => {
|
|
56
|
+
let { value: v, onValueChange: y, name: b } = n.useContext(u), x = n.useRef(null), S = n.useId(), [C, w] = n.useState(!1), T = v === r, E = (e) => {
|
|
57
|
+
x.current = e, typeof _ == "function" ? _(e) : _ && (_.current = e);
|
|
58
|
+
};
|
|
59
|
+
n.useEffect(() => {
|
|
60
|
+
let e = x.current, t = e?.closest(o);
|
|
61
|
+
if (!e || !t) return;
|
|
62
|
+
let n = Array.from(t.querySelectorAll(s)), r = t.querySelector(`${s}[aria-checked="true"]`);
|
|
63
|
+
w(!r && n.find((e) => !e.disabled) === e);
|
|
64
|
+
}, [v, f]);
|
|
65
|
+
let D = (t) => {
|
|
66
|
+
g.onKeyDown?.(t);
|
|
67
|
+
let n = t.currentTarget.closest(o);
|
|
68
|
+
if (!n) return;
|
|
69
|
+
let r = Array.from(n.querySelectorAll(s)).filter((e) => !e.disabled), i = e(t.key, r.indexOf(t.currentTarget), r.length);
|
|
70
|
+
i !== null && (t.preventDefault(), r[i].focus(), r[i].click());
|
|
71
|
+
};
|
|
72
|
+
return /* @__PURE__ */ a("label", {
|
|
73
|
+
id: S,
|
|
74
|
+
className: t(c({
|
|
75
|
+
disabled: f,
|
|
76
|
+
className: m
|
|
77
|
+
})),
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ i("button", {
|
|
80
|
+
ref: E,
|
|
81
|
+
type: "button",
|
|
82
|
+
role: "radio",
|
|
83
|
+
"aria-checked": T,
|
|
84
|
+
"aria-labelledby": h ? S : void 0,
|
|
85
|
+
id: d,
|
|
86
|
+
disabled: f,
|
|
87
|
+
tabIndex: T || C ? 0 : -1,
|
|
88
|
+
...g,
|
|
89
|
+
onClick: (e) => {
|
|
90
|
+
g.onClick?.(e), f || y(r);
|
|
91
|
+
},
|
|
92
|
+
onKeyDown: D,
|
|
93
|
+
className: t(l({
|
|
94
|
+
selected: T,
|
|
95
|
+
error: p
|
|
96
|
+
})),
|
|
97
|
+
"data-slot": "radio-group-item",
|
|
98
|
+
children: T && /* @__PURE__ */ i("span", { className: "size-1.5 rounded-full bg-primary-foreground" })
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ i("input", {
|
|
101
|
+
type: "radio",
|
|
102
|
+
name: b,
|
|
103
|
+
value: r,
|
|
104
|
+
checked: T,
|
|
105
|
+
disabled: f,
|
|
106
|
+
onChange: () => y(r),
|
|
107
|
+
tabIndex: -1,
|
|
108
|
+
"aria-hidden": "true",
|
|
109
|
+
className: "sr-only"
|
|
110
|
+
}),
|
|
111
|
+
h
|
|
112
|
+
]
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
f.displayName = "RadioGroupItem";
|
|
116
|
+
export { d as RadioGroup, f as RadioGroupItem, l as radioGroupIndicatorVariants, c as radioGroupItemVariants };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RelativeTimeValue } from '../lib/relative-time-format.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export { formatRelativeTime } from '../lib/relative-time-format.js';
|
|
4
|
+
export type { RelativeTimeValue } from '../lib/relative-time-format.js';
|
|
5
|
+
export interface RelativeTimeProps extends Omit<React.TimeHTMLAttributes<HTMLElement>, 'children'> {
|
|
6
|
+
value: RelativeTimeValue;
|
|
7
|
+
/** `relative` (default) or `absolute` mono time such as `14:03:22`. */
|
|
8
|
+
format?: 'relative' | 'absolute';
|
|
9
|
+
}
|
|
10
|
+
/** A `<time>` that keeps itself current on one shared timer; the exact time is in the title. */
|
|
11
|
+
export declare const RelativeTime: React.ForwardRefExoticComponent<RelativeTimeProps & React.RefAttributes<HTMLTimeElement>>;
|
|
12
|
+
//# sourceMappingURL=relative-time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relative-time.d.ts","sourceRoot":"","sources":["../../src/components/relative-time.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAA8B,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEjG,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAuCrE,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IAChG,KAAK,EAAE,iBAAiB,CAAC;IACzB,uEAAuE;IACvE,MAAM,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;CAClC;AAOD,gGAAgG;AAChG,eAAO,MAAM,YAAY,2FA8BxB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { formatRelativeTime as t, toDate as n } from "../lib/relative-time-format.js";
|
|
4
|
+
import * as r from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
// src/components/relative-time.tsx
|
|
7
|
+
var a = 15e3, o = /* @__PURE__ */ new Set(), s, c = Date.now(), l = (e) => (o.add(e), s ||= (c = Date.now(), setInterval(() => {
|
|
8
|
+
c = Date.now(), o.forEach((e) => e());
|
|
9
|
+
}, a)), () => {
|
|
10
|
+
o.delete(e), o.size === 0 && (clearInterval(s), s = void 0);
|
|
11
|
+
}), u = () => s ? c : c = Math.floor(Date.now() / 1e3) * 1e3, d = () => () => void 0, f = () => null, p = (e) => r.useSyncExternalStore(e ? l : d, u, f), m = (e) => e.toLocaleString(void 0, {
|
|
12
|
+
dateStyle: "medium",
|
|
13
|
+
timeStyle: "medium"
|
|
14
|
+
}), h = (e) => e.toLocaleTimeString(void 0, { hour12: !1 }), g = r.forwardRef(({ value: r, format: a = "relative", className: o, ...s }, c) => {
|
|
15
|
+
let l = p(a === "relative"), u = n(r), d = !Number.isNaN(u.getTime()), f = l !== null && d;
|
|
16
|
+
return /* @__PURE__ */ i("time", {
|
|
17
|
+
ref: c,
|
|
18
|
+
dateTime: d ? u.toISOString() : void 0,
|
|
19
|
+
title: f ? m(u) : void 0,
|
|
20
|
+
className: e("cursor-default whitespace-nowrap tabular-nums", a === "absolute" && "font-mono", o),
|
|
21
|
+
"data-slot": "relative-time",
|
|
22
|
+
...s,
|
|
23
|
+
children: f ? a === "absolute" ? h(u) : t(u, l) : d && /* @__PURE__ */ i("span", {
|
|
24
|
+
className: "invisible",
|
|
25
|
+
children: a === "absolute" ? "00:00:00" : "00 min ago"
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
g.displayName = "RelativeTime";
|
|
30
|
+
export { g as RelativeTime, t as formatRelativeTime };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { resizableSplitPrepaint } from '../lib/split-px.js';
|
|
2
|
+
export interface ResizableSplitPrepaintProps {
|
|
3
|
+
/** Storage keys of every `ResizableSplit` and `ResizablePanelGroup` on the page. */
|
|
4
|
+
storageKeys: string[];
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Server-safe (no `'use client'`): render it from a server component in `<head>` so the stored
|
|
8
|
+
* sizes apply before first paint. Rendering it in a client tree can make React 19 warn about
|
|
9
|
+
* a script tag; use `resizableSplitPrepaint` with your own inline script there.
|
|
10
|
+
*/
|
|
11
|
+
export declare const ResizableSplitPrepaint: ({ storageKeys, }: ResizableSplitPrepaintProps) => React.JSX.Element;
|
|
12
|
+
//# sourceMappingURL=resizable-split-prepaint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable-split-prepaint.d.ts","sourceRoot":"","sources":["../../src/components/resizable-split-prepaint.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,MAAM,WAAW,2BAA2B;IAC1C,oFAAoF;IACpF,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,kBAEpC,2BAA2B,KAAG,KAAK,CAAC,GAAG,CAAC,OAE1C,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { resizableSplitPrepaint as e } from "../lib/split-px.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
// src/components/resizable-split-prepaint.tsx
|
|
4
|
+
var n = ({ storageKeys: n }) => /* @__PURE__ */ t("script", { dangerouslySetInnerHTML: { __html: e(n) } });
|
|
5
|
+
export { n as ResizableSplitPrepaint, e as resizableSplitPrepaint };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ResizableSplitApi {
|
|
2
|
+
collapsed: boolean;
|
|
3
|
+
width: number;
|
|
4
|
+
toggle: () => void;
|
|
5
|
+
collapse: () => void;
|
|
6
|
+
expand: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const SplitContext: import('react').Context<ResizableSplitApi | null>;
|
|
9
|
+
/** Collapse state and toggle of the nearest `ResizableSplit`, for a button in either pane. */
|
|
10
|
+
export declare const useResizableSplit: () => ResizableSplitApi;
|
|
11
|
+
//# sourceMappingURL=resizable-split.context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable-split.context.d.ts","sourceRoot":"","sources":["../../src/components/resizable-split.context.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,mDAAgD,CAAC;AAE1E,8FAA8F;AAC9F,eAAO,MAAM,iBAAiB,QAAO,iBAIpC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext as e, useContext as t } from "react";
|
|
3
|
+
// src/components/resizable-split.context.tsx
|
|
4
|
+
var n = e(null), r = () => {
|
|
5
|
+
let e = t(n);
|
|
6
|
+
if (!e) throw Error("useResizableSplit must be used inside ResizableSplit");
|
|
7
|
+
return e;
|
|
8
|
+
};
|
|
9
|
+
export { n as SplitContext, r as useResizableSplit };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode, Ref } from 'react';
|
|
2
|
+
import { SplitOrientation } from '../lib/split-px.js';
|
|
3
|
+
import { ResizableSplitApi } from './resizable-split.context.js';
|
|
4
|
+
export { useResizableSplit, type ResizableSplitApi } from './resizable-split.context.js';
|
|
5
|
+
export { resizableSplitCollapsedVar, resizableSplitVar } from '../lib/split-px.js';
|
|
6
|
+
export interface ResizableSplitProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
7
|
+
/** `localStorage` key of the sized pane; also names the CSS variables. `[A-Za-z0-9._:-]`, max 64. */
|
|
8
|
+
storageKey: string;
|
|
9
|
+
/** Sized pane size in px before any stored value exists. */
|
|
10
|
+
init: number;
|
|
11
|
+
min: number;
|
|
12
|
+
max: number;
|
|
13
|
+
/** `horizontal`: first pane is sized, left to right. `vertical`: last pane (bottom) is sized. */
|
|
14
|
+
orientation?: SplitOrientation;
|
|
15
|
+
/** Lets the sized pane collapse to 0px; the state is stored under `<storageKey>.collapsed`. */
|
|
16
|
+
collapsible?: boolean;
|
|
17
|
+
/** Accessible name of the separator. */
|
|
18
|
+
label?: string;
|
|
19
|
+
/** Imperative toggle for a control outside the split. */
|
|
20
|
+
apiRef?: Ref<ResizableSplitApi>;
|
|
21
|
+
/** Two panes in visual order: start/end (horizontal) or top/bottom (vertical). */
|
|
22
|
+
children: [ReactNode, ReactNode];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Two panes, one sized in px. The size and collapsed flag are read from CSS variables that
|
|
26
|
+
* `resizableSplitPrepaint` sets before first paint, so a reload never shifts the layout; without
|
|
27
|
+
* it the mount effect applies the stored values (one shift, never a silent desync).
|
|
28
|
+
*/
|
|
29
|
+
export declare const ResizableSplit: ({ storageKey, init, min, max, orientation, collapsible, label, apiRef, children, className, style, ...props }: ResizableSplitProps) => React.JSX.Element;
|
|
30
|
+
//# sourceMappingURL=resizable-split.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable-split.d.ts","sourceRoot":"","sources":["../../src/components/resizable-split.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA8B,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEjF,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEtF,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAKhF,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,UAAU,CACX;IACC,qGAAqG;IACrG,UAAU,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,iGAAiG;IACjG,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,+FAA+F;IAC/F,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,MAAM,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAChC,kFAAkF;IAClF,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;CAClC;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,+GAa5B,mBAAmB,KAAG,KAAK,CAAC,GAAG,CAAC,OA0GlC,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { assertStorageKey as e, resizableSplitCollapsedVar as t, resizableSplitVar as n } from "../lib/split-px.js";
|
|
3
|
+
import { ResizableHandle as r } from "./resizable.parts.js";
|
|
4
|
+
import { useSplitState as i } from "./use-split-state.js";
|
|
5
|
+
import { SplitContext as a, useResizableSplit as o } from "./resizable-split.context.js";
|
|
6
|
+
import { useRef as s } from "react";
|
|
7
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
// src/components/resizable-split.tsx
|
|
9
|
+
var u = 16, d = 64, f = ({ storageKey: o, init: f, min: p, max: m, orientation: h = "horizontal", collapsible: g = !1, label: _ = "Resize panes", apiRef: v, children: y, className: b, style: x, ...S }) => {
|
|
10
|
+
e(o);
|
|
11
|
+
let C = n(o), w = t(o), T = h === "vertical", E = s(null), D = s(null), { api: O, set: k } = i({
|
|
12
|
+
storageKey: o,
|
|
13
|
+
init: f,
|
|
14
|
+
min: p,
|
|
15
|
+
max: m,
|
|
16
|
+
collapsible: g,
|
|
17
|
+
apiRef: v
|
|
18
|
+
}), { width: A, collapsed: j } = O, M = () => E.current?.closest("[dir]")?.getAttribute("dir") === "rtl", N = (e) => {
|
|
19
|
+
let t = E.current?.getBoundingClientRect();
|
|
20
|
+
return t ? T ? t.bottom - e.clientY : M() ? t.right - e.clientX : e.clientX - t.left : A;
|
|
21
|
+
}, P = (e) => {
|
|
22
|
+
let t = e.shiftKey ? d : u, n = T ? "ArrowUp" : M() ? "ArrowLeft" : "ArrowRight", r = T ? "ArrowDown" : M() ? "ArrowRight" : "ArrowLeft";
|
|
23
|
+
if (e.key === "Home") k(p);
|
|
24
|
+
else if (e.key === "End") k(m);
|
|
25
|
+
else if (e.key === n) k(A + t);
|
|
26
|
+
else if (e.key === r) k(A - t);
|
|
27
|
+
else if (e.key === "Enter" && g) O.toggle();
|
|
28
|
+
else return;
|
|
29
|
+
e.preventDefault();
|
|
30
|
+
}, F = `clamp(${String(p)}px, var(${C}, ${String(f)}px), ${String(m)}px)`, I = g ? `var(${w}, ${F})` : F, L = T ? `minmax(0, 1fr) 1px ${I}` : `${I} 1px minmax(0, 1fr)`, R = (e) => {
|
|
31
|
+
let t = j && e === 1 === T;
|
|
32
|
+
return /* @__PURE__ */ c("div", {
|
|
33
|
+
"data-slot": e === 0 ? "resizable-split-start" : "resizable-split-end",
|
|
34
|
+
className: "min-h-0 min-w-0 overflow-auto",
|
|
35
|
+
style: t ? {
|
|
36
|
+
visibility: "hidden",
|
|
37
|
+
overflow: "hidden"
|
|
38
|
+
} : void 0,
|
|
39
|
+
"aria-hidden": t || void 0,
|
|
40
|
+
children: y[e]
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
return /* @__PURE__ */ c(a.Provider, {
|
|
44
|
+
value: O,
|
|
45
|
+
children: /* @__PURE__ */ l("div", {
|
|
46
|
+
ref: E,
|
|
47
|
+
"data-slot": "resizable-split",
|
|
48
|
+
"data-orientation": h,
|
|
49
|
+
"data-collapsed": j || void 0,
|
|
50
|
+
className: ["grid h-full min-h-0 w-full overflow-hidden", b].filter(Boolean).join(" "),
|
|
51
|
+
style: {
|
|
52
|
+
...x,
|
|
53
|
+
[T ? "gridTemplateRows" : "gridTemplateColumns"]: L
|
|
54
|
+
},
|
|
55
|
+
...S,
|
|
56
|
+
children: [
|
|
57
|
+
R(0),
|
|
58
|
+
/* @__PURE__ */ c(r, {
|
|
59
|
+
direction: T ? "vertical" : "horizontal",
|
|
60
|
+
"aria-label": _,
|
|
61
|
+
"aria-valuenow": A,
|
|
62
|
+
"aria-valuemin": p,
|
|
63
|
+
"aria-valuemax": m,
|
|
64
|
+
"aria-valuetext": j ? "collapsed" : `${String(A)}px`,
|
|
65
|
+
className: "touch-none",
|
|
66
|
+
onPointerDown: (e) => {
|
|
67
|
+
e.preventDefault(), e.currentTarget.focus(), D.current = N(e) - (j ? 0 : A), e.currentTarget.setPointerCapture?.(e.pointerId);
|
|
68
|
+
},
|
|
69
|
+
onPointerMove: (e) => {
|
|
70
|
+
D.current !== null && k(N(e) - D.current);
|
|
71
|
+
},
|
|
72
|
+
onPointerUp: () => {
|
|
73
|
+
D.current = null;
|
|
74
|
+
},
|
|
75
|
+
onPointerCancel: () => {
|
|
76
|
+
D.current = null;
|
|
77
|
+
},
|
|
78
|
+
onKeyDown: P
|
|
79
|
+
}),
|
|
80
|
+
R(1)
|
|
81
|
+
]
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
export { f as ResizableSplit, t as resizableSplitCollapsedVar, n as resizableSplitVar, o as useResizableSplit };
|