@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,109 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { copyText as e } from "../lib/copy-text.js";
|
|
3
|
+
import { cn as t } from "../lib/utils.js";
|
|
4
|
+
import { CopyButton as n } from "./copy-button.js";
|
|
5
|
+
import { formatScalar as r, valueText as i } from "./data-tree.model.js";
|
|
6
|
+
import { highlightText as a } from "./highlight.js";
|
|
7
|
+
import { NavRow as o } from "./nav-tree.js";
|
|
8
|
+
import * as s from "react";
|
|
9
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
|
+
// src/components/data-tree.row.tsx
|
|
11
|
+
var d = {
|
|
12
|
+
string: "text-success",
|
|
13
|
+
number: "text-info",
|
|
14
|
+
boolean: "text-warning",
|
|
15
|
+
null: "text-muted-foreground italic",
|
|
16
|
+
object: "text-muted-foreground",
|
|
17
|
+
array: "text-muted-foreground",
|
|
18
|
+
other: "text-muted-foreground"
|
|
19
|
+
}, f = (e) => e.kind === "array" ? `[${String(e.size)}]` : e.kind === "object" ? `{${String(e.size)}}` : r(e.value, e.kind), p = (e) => (e.metaKey || e.ctrlKey) && e.code === "KeyC" && (typeof window > "u" || window.getSelection()?.isCollapsed !== !1), m = ({ get: t, label: r, className: i }) => {
|
|
20
|
+
let [a, o] = s.useState(null), c = () => o(t());
|
|
21
|
+
return /* @__PURE__ */ l(n, {
|
|
22
|
+
text: a ?? "",
|
|
23
|
+
label: r,
|
|
24
|
+
iconOnly: !0,
|
|
25
|
+
variant: "ghost",
|
|
26
|
+
tabIndex: -1,
|
|
27
|
+
className: i,
|
|
28
|
+
onPointerEnter: c,
|
|
29
|
+
onFocus: c,
|
|
30
|
+
onClick: (n) => {
|
|
31
|
+
n.stopPropagation(), a === null && (n.preventDefault(), e(t()));
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}, h = ({ node: n, depth: r, open: h, highlight: g, matched: _, maxStringLength: v, onToggle: y }) => {
|
|
35
|
+
let [b, x] = s.useState(!1), S = n.kind === "object" || n.kind === "array", C = f(n), w = n.kind === "string" && C.length > v, T = w ? `${C.slice(0, v)}...` : C, E = s.useId();
|
|
36
|
+
return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(o, {
|
|
37
|
+
depth: r,
|
|
38
|
+
expanded: S ? h : void 0,
|
|
39
|
+
onToggle: y,
|
|
40
|
+
onClick: S ? y : void 0,
|
|
41
|
+
onKeyDown: (t) => {
|
|
42
|
+
t.target === t.currentTarget && (p(t) ? e(t.altKey ? n.path : i(n.value)) : w && (t.key === " " || t.key === (b ? "ArrowLeft" : "ArrowRight")) && (t.preventDefault(), x((e) => !e)));
|
|
43
|
+
},
|
|
44
|
+
"aria-labelledby": [
|
|
45
|
+
n.key === null ? "" : `${E}-k`,
|
|
46
|
+
`${E}-v`,
|
|
47
|
+
w ? `${E}-more` : ""
|
|
48
|
+
].filter(Boolean).join(" "),
|
|
49
|
+
"data-path": n.path,
|
|
50
|
+
"data-kind": n.kind,
|
|
51
|
+
"data-match": _ || void 0,
|
|
52
|
+
className: "group/data",
|
|
53
|
+
children: /* @__PURE__ */ u("span", {
|
|
54
|
+
className: "flex min-w-0 items-baseline gap-1.5",
|
|
55
|
+
children: [
|
|
56
|
+
n.key !== null && /* @__PURE__ */ u("span", {
|
|
57
|
+
id: `${E}-k`,
|
|
58
|
+
className: "shrink-0 text-ui text-foreground",
|
|
59
|
+
children: [a(String(n.key), g), /* @__PURE__ */ l("span", {
|
|
60
|
+
className: "text-muted-foreground",
|
|
61
|
+
children: ":"
|
|
62
|
+
})]
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ l("span", {
|
|
65
|
+
id: `${E}-v`,
|
|
66
|
+
className: t("min-w-0 truncate font-mono text-xs", d[n.kind]),
|
|
67
|
+
children: S ? T : a(T, g)
|
|
68
|
+
}),
|
|
69
|
+
w && /* @__PURE__ */ l("button", {
|
|
70
|
+
id: `${E}-more`,
|
|
71
|
+
type: "button",
|
|
72
|
+
tabIndex: -1,
|
|
73
|
+
"aria-expanded": b,
|
|
74
|
+
"aria-controls": `${E}-full`,
|
|
75
|
+
onClick: (e) => {
|
|
76
|
+
e.stopPropagation(), x((e) => !e);
|
|
77
|
+
},
|
|
78
|
+
className: "shrink-0 rounded-md px-1 text-2xs text-muted-foreground hover:bg-background hover:text-foreground",
|
|
79
|
+
children: b ? "Less" : /* @__PURE__ */ u(c, { children: [
|
|
80
|
+
"+",
|
|
81
|
+
String(C.length - v),
|
|
82
|
+
" ",
|
|
83
|
+
/* @__PURE__ */ l("span", {
|
|
84
|
+
className: "sr-only",
|
|
85
|
+
children: "more characters"
|
|
86
|
+
})
|
|
87
|
+
] })
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ u("span", {
|
|
90
|
+
className: "ml-auto flex shrink-0 gap-0.5 self-center opacity-0 transition-opacity duration-fast group-hover/data:opacity-100 group-focus/data:opacity-100 motion-reduce:transition-none",
|
|
91
|
+
children: [/* @__PURE__ */ l(m, {
|
|
92
|
+
get: () => n.path,
|
|
93
|
+
label: "Copy path"
|
|
94
|
+
}), /* @__PURE__ */ l(m, {
|
|
95
|
+
get: () => i(n.value),
|
|
96
|
+
label: "Copy value"
|
|
97
|
+
})]
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
})
|
|
101
|
+
}), w && b && /* @__PURE__ */ l("div", {
|
|
102
|
+
id: `${E}-full`,
|
|
103
|
+
className: "ml-8 mr-2 mb-1 rounded-md bg-muted/40 px-2 py-1 font-mono text-xs break-all whitespace-pre-wrap text-success",
|
|
104
|
+
style: { marginLeft: `${String(2 + r * .875)}rem` },
|
|
105
|
+
"data-slot": "data-tree-full",
|
|
106
|
+
children: a(n.value, g)
|
|
107
|
+
})] });
|
|
108
|
+
};
|
|
109
|
+
export { h as DataTreeRow, m as LazyCopy, p as isCopyKey };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DataViewColumn } from './data-view.config.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface BoardCardProps<T> {
|
|
4
|
+
row: T;
|
|
5
|
+
/** Visible columns; their `cardSlot` places them on the card. */
|
|
6
|
+
columns: DataViewColumn<T>[];
|
|
7
|
+
onOpen?: () => void;
|
|
8
|
+
/** DropdownMenu items; the trigger shows on hover and focus. */
|
|
9
|
+
menu?: React.ReactNode;
|
|
10
|
+
menuLabel?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Compact board card from column slots. Line 1: `id` (mono), `meta` glyphs and `end` at the
|
|
14
|
+
* right; line 2: `title`, up to two lines; line 3: `chip` cells. Without slots the first
|
|
15
|
+
* growing (or first) column is the title.
|
|
16
|
+
*/
|
|
17
|
+
export declare const BoardCard: <T>({ row, columns, onOpen, menu, menuLabel }: BoardCardProps<T>) => React.JSX.Element;
|
|
18
|
+
//# sourceMappingURL=data-view.board-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-view.board-card.d.ts","sourceRoot":"","sources":["../../src/components/data-view.board-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAElE,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,GAAG,EAAE,CAAC,CAAC;IACP,iEAAiE;IACjE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gEAAgE;IAChE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAcD;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,EAAG,2CAA2C,cAAc,CAAC,CAAC,CAAC,sBAoEzF,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { RowMenu as t } from "./data-table.menu.js";
|
|
4
|
+
import { valueOf as n } from "./data-view.config.js";
|
|
5
|
+
import * as r from "react";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
// src/components/data-view.board-card.tsx
|
|
8
|
+
var o = (e, t) => {
|
|
9
|
+
if (e.cell) return e.cell(t);
|
|
10
|
+
let r = n(e, t);
|
|
11
|
+
return r == null ? null : String(r);
|
|
12
|
+
}, s = (e, t) => {
|
|
13
|
+
let r = n(e, t);
|
|
14
|
+
return typeof r == "string" || typeof r == "number" ? String(r) : o(e, t);
|
|
15
|
+
}, c = ({ row: n, columns: c, onOpen: l, menu: u, menuLabel: d }) => {
|
|
16
|
+
let f = (e) => c.filter((t) => t.cardSlot === e), p = f("title")[0] ?? c.find((e) => e.grow) ?? c[0], m = f("id"), h = [
|
|
17
|
+
...m,
|
|
18
|
+
...f("meta"),
|
|
19
|
+
...f("end")
|
|
20
|
+
], g = f("chip"), _ = p ? s(p, n) : null;
|
|
21
|
+
return /* @__PURE__ */ a("div", {
|
|
22
|
+
className: e("group/card relative flex min-w-0 flex-col gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-ui text-foreground", l && "cursor-pointer transition-colors duration-fast hover:bg-accent has-[[data-card-activator]:focus-visible]:outline-2 has-[[data-card-activator]:focus-visible]:-outline-offset-2 has-[[data-card-activator]:focus-visible]:outline-ring"),
|
|
23
|
+
"data-slot": "board-card-body",
|
|
24
|
+
children: [
|
|
25
|
+
h.length > 0 && /* @__PURE__ */ a("div", {
|
|
26
|
+
className: "flex h-[18px] min-w-0 items-center gap-1.5",
|
|
27
|
+
"data-slot": "board-card-head",
|
|
28
|
+
children: [
|
|
29
|
+
m.map((e) => /* @__PURE__ */ i("span", {
|
|
30
|
+
className: "shrink-0 font-mono text-xs text-muted-foreground",
|
|
31
|
+
children: o(e, n)
|
|
32
|
+
}, e.key)),
|
|
33
|
+
f("meta").map((e) => /* @__PURE__ */ i("span", {
|
|
34
|
+
className: "flex shrink-0 items-center [&_svg]:size-3.5",
|
|
35
|
+
children: o(e, n)
|
|
36
|
+
}, e.key)),
|
|
37
|
+
/* @__PURE__ */ i("span", { className: "flex-1" }),
|
|
38
|
+
f("end").map((e) => /* @__PURE__ */ i("span", {
|
|
39
|
+
className: "flex shrink-0 items-center",
|
|
40
|
+
children: o(e, n)
|
|
41
|
+
}, e.key))
|
|
42
|
+
]
|
|
43
|
+
}),
|
|
44
|
+
l ? /* @__PURE__ */ i("button", {
|
|
45
|
+
type: "button",
|
|
46
|
+
onClick: l,
|
|
47
|
+
className: "block min-w-0 text-left leading-[1.4] outline-none after:absolute after:inset-0",
|
|
48
|
+
"data-card-activator": "",
|
|
49
|
+
"data-slot": "board-card-title",
|
|
50
|
+
children: /* @__PURE__ */ i("span", {
|
|
51
|
+
className: "line-clamp-2",
|
|
52
|
+
children: _
|
|
53
|
+
})
|
|
54
|
+
}) : /* @__PURE__ */ i("span", {
|
|
55
|
+
className: "line-clamp-2 leading-[1.4]",
|
|
56
|
+
"data-slot": "board-card-title",
|
|
57
|
+
children: _
|
|
58
|
+
}),
|
|
59
|
+
g.length > 0 && /* @__PURE__ */ i("div", {
|
|
60
|
+
className: "relative flex min-w-0 flex-wrap items-center gap-1 text-xs text-muted-foreground",
|
|
61
|
+
"data-slot": "board-card-chips",
|
|
62
|
+
children: g.map((e) => /* @__PURE__ */ i(r.Fragment, { children: o(e, n) }, e.key))
|
|
63
|
+
}),
|
|
64
|
+
u && /* @__PURE__ */ i("span", {
|
|
65
|
+
className: "absolute right-2 top-2 rounded-md bg-accent opacity-0 group-hover/card:opacity-100 group-focus-within/card:opacity-100 has-[[aria-expanded=true]]:opacity-100",
|
|
66
|
+
children: /* @__PURE__ */ i(t, {
|
|
67
|
+
label: d ?? "Actions",
|
|
68
|
+
children: u
|
|
69
|
+
})
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
export { c as BoardCard };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BoardGroup } from './data-view.board.js';
|
|
2
|
+
export interface BoardColumnHeadProps {
|
|
3
|
+
column: BoardGroup;
|
|
4
|
+
index: number;
|
|
5
|
+
count: number;
|
|
6
|
+
collapsed: boolean;
|
|
7
|
+
/** Grid line after the last card row, so a folded strip spans the full height. */
|
|
8
|
+
rowEnd: number;
|
|
9
|
+
onToggle: () => void;
|
|
10
|
+
onAdd?: (key: string) => void;
|
|
11
|
+
}
|
|
12
|
+
/** A column header: a GroupHeader with count and add, or a 40 px vertical strip when collapsed. */
|
|
13
|
+
export declare const BoardColumnHead: ({ column, index, count, collapsed, rowEnd, onToggle, onAdd, }: BoardColumnHeadProps) => import('react').JSX.Element;
|
|
14
|
+
//# sourceMappingURL=data-view.board-head.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-view.board-head.d.ts","sourceRoot":"","sources":["../../src/components/data-view.board-head.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAepD,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,kFAAkF;IAClF,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAKD,mGAAmG;AACnG,eAAO,MAAM,eAAe,GAAI,+DAQ7B,oBAAoB,gCA2CtB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Count as e } from "./count.js";
|
|
3
|
+
import { DisclosureChevron as t } from "./disclosure.js";
|
|
4
|
+
import { GroupHeader as n } from "./group-header.js";
|
|
5
|
+
import { IconButton as r } from "./icon-button.js";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
// src/components/data-view.board-head.tsx
|
|
8
|
+
var o = () => /* @__PURE__ */ i("svg", {
|
|
9
|
+
viewBox: "0 0 24 24",
|
|
10
|
+
fill: "none",
|
|
11
|
+
stroke: "currentColor",
|
|
12
|
+
strokeWidth: "2",
|
|
13
|
+
strokeLinecap: "round",
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
children: /* @__PURE__ */ i("path", { d: "M12 5v14M5 12h14" })
|
|
16
|
+
}), s = "sticky top-0 z-10 flex flex-col items-center gap-2 rounded-lg bg-muted/40 py-2 text-ui font-semibold transition-colors duration-fast hover:bg-accent focus-ring", c = ({ column: c, index: l, count: u, collapsed: d, rowEnd: f, onToggle: p, onAdd: m }) => {
|
|
17
|
+
let h = typeof c.label == "string" ? c.label : c.key;
|
|
18
|
+
return d ? /* @__PURE__ */ a("button", {
|
|
19
|
+
type: "button",
|
|
20
|
+
"aria-expanded": !1,
|
|
21
|
+
"aria-label": `${h}, ${String(u)}, expand column`,
|
|
22
|
+
onClick: p,
|
|
23
|
+
className: s,
|
|
24
|
+
style: {
|
|
25
|
+
gridColumn: l + 1,
|
|
26
|
+
gridRow: `1 / ${String(f)}`
|
|
27
|
+
},
|
|
28
|
+
"data-slot": "board-strip",
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ i(t, { open: !1 }),
|
|
31
|
+
c.icon && /* @__PURE__ */ i("span", {
|
|
32
|
+
className: "flex text-muted-foreground [&_svg]:size-3.5",
|
|
33
|
+
children: c.icon
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ i("span", {
|
|
36
|
+
className: "[writing-mode:vertical-rl]",
|
|
37
|
+
children: c.label
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ i(e, { children: u })
|
|
40
|
+
]
|
|
41
|
+
}) : /* @__PURE__ */ i(n, {
|
|
42
|
+
label: c.label,
|
|
43
|
+
icon: c.icon,
|
|
44
|
+
count: u,
|
|
45
|
+
open: !0,
|
|
46
|
+
onOpenChange: p,
|
|
47
|
+
level: 3,
|
|
48
|
+
className: "sticky top-0 z-10 rounded-lg border-0 bg-background",
|
|
49
|
+
style: {
|
|
50
|
+
gridColumn: l + 1,
|
|
51
|
+
gridRow: 1
|
|
52
|
+
},
|
|
53
|
+
actions: m && /* @__PURE__ */ i(r, {
|
|
54
|
+
size: "sm",
|
|
55
|
+
icon: /* @__PURE__ */ i(o, {}),
|
|
56
|
+
"aria-label": `Add to ${h}`,
|
|
57
|
+
onClick: () => m(c.key)
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
export { c as BoardColumnHead };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DragMove } from '../lib/use-drag-reorder.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface BoardGroup {
|
|
4
|
+
key: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface BoardViewProps<T> {
|
|
9
|
+
rows: T[];
|
|
10
|
+
getRowId: (row: T) => string;
|
|
11
|
+
renderCard: (row: T) => React.ReactNode;
|
|
12
|
+
/** Columns in order, empty ones included. */
|
|
13
|
+
columns: BoardGroup[];
|
|
14
|
+
columnOf: (row: T) => string;
|
|
15
|
+
/** Swimlanes in order; one lane without a header when absent. */
|
|
16
|
+
lanes?: BoardGroup[];
|
|
17
|
+
laneOf?: (row: T) => string;
|
|
18
|
+
collapsed: string[];
|
|
19
|
+
onCollapsedChange: (keys: string[]) => void;
|
|
20
|
+
/** Empty columns stay open; otherwise they collapse to a strip. */
|
|
21
|
+
showEmpty?: boolean;
|
|
22
|
+
onMove?: (move: DragMove) => void;
|
|
23
|
+
onAdd?: (columnKey: string) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Columns by the Group by field; every card is a child of one grid, so a move between
|
|
27
|
+
* columns only changes its grid cell and the card keeps its DOM node. Cards of a cell share it
|
|
28
|
+
* and stack by their top margin.
|
|
29
|
+
*/
|
|
30
|
+
export declare const BoardView: <T>(p: BoardViewProps<T>) => React.JSX.Element;
|
|
31
|
+
//# sourceMappingURL=data-view.board.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-view.board.d.ts","sourceRoot":"","sources":["../../src/components/data-view.board.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAkC,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAOxF,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;IAC7B,UAAU,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IACxC,6CAA6C;IAC7C,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;IAC7B,iEAAiE;IACjE,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;IAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5C,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAUD;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,EAAG,GAAG,cAAc,CAAC,CAAC,CAAC,sBA6JjD,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useDragReorder as e } from "../lib/use-drag-reorder.js";
|
|
3
|
+
import { useCellStack as t } from "../lib/use-cell-stack.js";
|
|
4
|
+
import { useFlip as n } from "../lib/use-flip.js";
|
|
5
|
+
import { useKeepFocus as r } from "../lib/use-keep-focus.js";
|
|
6
|
+
import { cn as i } from "../lib/utils.js";
|
|
7
|
+
import { BoardColumnHead as a } from "./data-view.board-head.js";
|
|
8
|
+
import * as o from "react";
|
|
9
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
10
|
+
// src/components/data-view.board.tsx
|
|
11
|
+
var l = 280, u = 40, d = 8, f = 6, p = 98, m = {
|
|
12
|
+
key: "",
|
|
13
|
+
label: ""
|
|
14
|
+
}, h = "Alt with an arrow key moves the card.", g = (g) => {
|
|
15
|
+
let _ = o.useRef(null), v = o.useRef(null), y = `${o.useId()}-hint`, [b, x] = o.useState([]), S = g.lanes && g.laneOf ? g.lanes : [m], C = g.lanes && g.laneOf ? g.laneOf : () => "", w = /* @__PURE__ */ new Map();
|
|
16
|
+
for (let e of g.rows) {
|
|
17
|
+
let t = `${g.columnOf(e)}\u0000${C(e)}`;
|
|
18
|
+
w.set(t, [...w.get(t) ?? [], e]);
|
|
19
|
+
}
|
|
20
|
+
let T = (e, t) => w.get(`${e}\u0000${t}`) ?? [], E = (e) => S.reduce((t, n) => t + T(e, n.key).length, 0), D = (e) => !g.showEmpty && E(e) === 0, O = (e) => D(e) ? !b.includes(e) : g.collapsed.includes(e), k = () => S.flatMap((e) => g.columns.map((t) => ({
|
|
21
|
+
key: t.key,
|
|
22
|
+
row: e.key || void 0,
|
|
23
|
+
ids: T(t.key, e.key).map(g.getRowId)
|
|
24
|
+
}))), A = (e) => {
|
|
25
|
+
let t = g.columns.find((t) => t.key === e);
|
|
26
|
+
return typeof t?.label == "string" ? t.label : e;
|
|
27
|
+
}, j = e({
|
|
28
|
+
rootRef: _,
|
|
29
|
+
scrollRef: v,
|
|
30
|
+
layout: k,
|
|
31
|
+
onMove: g.onMove,
|
|
32
|
+
describe: (e, t) => `Moved to ${A(e.toGroup)}, position ${String(e.toIndex + 1)} of ${String(t)}`
|
|
33
|
+
});
|
|
34
|
+
t(_, d, f), r(_);
|
|
35
|
+
let M = g.rows.map((e) => `${g.getRowId(e)}:${g.columnOf(e)}:${C(e)}`).join("|"), N = g.columns.map((e) => O(e.key) ? "0" : "1").join("");
|
|
36
|
+
n(_, "[data-drag-id]", "data-drag-id", 180, `${M}#${N}`);
|
|
37
|
+
let P = S.reduce((e, t) => {
|
|
38
|
+
let n = e[e.length - 1], r = n ? n.start + 1 : 2, i = t === m ? null : r;
|
|
39
|
+
return [...e, {
|
|
40
|
+
lane: t,
|
|
41
|
+
head: i,
|
|
42
|
+
start: i === null ? r : r + 1
|
|
43
|
+
}];
|
|
44
|
+
}, []), F = (e, t) => e.includes(t) ? e.filter((e) => e !== t) : [...e, t], I = (e) => D(e) ? x((t) => F(t, e)) : g.onCollapsedChange(F(g.collapsed, e)), L = P[P.length - 1], R = L ? L.start + 1 : 2;
|
|
45
|
+
return /* @__PURE__ */ s("div", {
|
|
46
|
+
ref: v,
|
|
47
|
+
className: "h-full overflow-auto p-4",
|
|
48
|
+
"data-slot": "data-view-board",
|
|
49
|
+
children: /* @__PURE__ */ c("div", {
|
|
50
|
+
ref: _,
|
|
51
|
+
className: "relative grid w-max auto-rows-min gap-x-2 gap-y-2",
|
|
52
|
+
style: { gridTemplateColumns: g.columns.map((e) => `${String(O(e.key) ? u : l)}px`).join(" ") },
|
|
53
|
+
children: [
|
|
54
|
+
g.columns.map((e, t) => /* @__PURE__ */ s(a, {
|
|
55
|
+
column: e,
|
|
56
|
+
index: t,
|
|
57
|
+
count: E(e.key),
|
|
58
|
+
collapsed: O(e.key),
|
|
59
|
+
rowEnd: R,
|
|
60
|
+
onToggle: () => I(e.key),
|
|
61
|
+
onAdd: g.onAdd
|
|
62
|
+
}, e.key)),
|
|
63
|
+
P.map(({ lane: e, head: t, start: n }) => /* @__PURE__ */ c(o.Fragment, { children: [t !== null && /* @__PURE__ */ c("div", {
|
|
64
|
+
className: "sticky left-0 flex h-8 w-max items-center gap-2 pt-2 text-ui font-semibold",
|
|
65
|
+
style: {
|
|
66
|
+
gridColumn: "1 / -1",
|
|
67
|
+
gridRow: t
|
|
68
|
+
},
|
|
69
|
+
"data-slot": "board-lane",
|
|
70
|
+
children: [
|
|
71
|
+
e.icon,
|
|
72
|
+
e.label,
|
|
73
|
+
/* @__PURE__ */ s("span", {
|
|
74
|
+
className: "text-xs font-normal tabular-nums text-muted-foreground",
|
|
75
|
+
children: g.columns.reduce((t, n) => t + T(n.key, e.key).length, 0)
|
|
76
|
+
})
|
|
77
|
+
]
|
|
78
|
+
}), g.columns.map((t, r) => /* @__PURE__ */ s("div", {
|
|
79
|
+
className: "rounded-lg bg-muted/40",
|
|
80
|
+
style: {
|
|
81
|
+
gridColumn: r + 1,
|
|
82
|
+
gridRow: n
|
|
83
|
+
},
|
|
84
|
+
"data-drop-group": t.key,
|
|
85
|
+
"data-drop-row": e.key,
|
|
86
|
+
"aria-hidden": "true"
|
|
87
|
+
}, t.key))] }, `lane:${e.key}`)),
|
|
88
|
+
P.flatMap(({ lane: e }) => g.columns.flatMap((t) => T(t.key, e.key))).map((e) => {
|
|
89
|
+
let t = g.getRowId(e), n = g.columnOf(e), r = g.columns.findIndex((e) => e.key === n), a = P.find((t) => t.lane.key === C(e)), o = T(n, C(e)), c = o.indexOf(e);
|
|
90
|
+
return r < 0 || !a ? null : /* @__PURE__ */ s("div", {
|
|
91
|
+
...j.itemProps(t),
|
|
92
|
+
role: "group",
|
|
93
|
+
"aria-label": `${A(n)}, ${String(c + 1)} of ${String(o.length)}`,
|
|
94
|
+
"aria-describedby": g.onMove ? y : void 0,
|
|
95
|
+
className: i("relative z-10 mx-1.5 mb-1.5 min-w-0 self-start data-[dragging]:opacity-40", O(n) && "hidden"),
|
|
96
|
+
style: {
|
|
97
|
+
gridColumn: r + 1,
|
|
98
|
+
gridRow: a.start,
|
|
99
|
+
marginTop: f + c * p
|
|
100
|
+
},
|
|
101
|
+
"data-stack-cell": JSON.stringify([n, C(e)]),
|
|
102
|
+
"data-slot": "board-card",
|
|
103
|
+
children: g.renderCard(e)
|
|
104
|
+
}, t);
|
|
105
|
+
}),
|
|
106
|
+
g.onMove && /* @__PURE__ */ s("span", {
|
|
107
|
+
id: y,
|
|
108
|
+
hidden: !0,
|
|
109
|
+
children: h
|
|
110
|
+
}),
|
|
111
|
+
j.target && /* @__PURE__ */ s("div", {
|
|
112
|
+
className: "pointer-events-none absolute z-20 h-0.5 rounded-full bg-primary",
|
|
113
|
+
style: j.target.line,
|
|
114
|
+
"data-slot": "board-drop-line"
|
|
115
|
+
})
|
|
116
|
+
]
|
|
117
|
+
})
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
export { g as BoardView };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ListApplyConfig, ListControlsState } from '../lib/list-controls.js';
|
|
2
|
+
import { DataTableColumn } from './data-table.js';
|
|
3
|
+
import { ListFilterGroup } from './list-toolbar.js';
|
|
4
|
+
import type * as React from 'react';
|
|
5
|
+
export type DataViewValue = string | number | boolean | null | undefined;
|
|
6
|
+
export interface DataViewColumn<T> extends DataTableColumn<T> {
|
|
7
|
+
/** `multi`: a multi-select group in the Filter menu; `toggle`: a quick toggle (truthy rows). */
|
|
8
|
+
filter?: 'multi' | 'toggle' | false;
|
|
9
|
+
/** Matched by the search box; when no column sets it, every column is searched. */
|
|
10
|
+
searchable?: boolean;
|
|
11
|
+
/** `optional`: hidden until switched on in Display; `none`: only filters, sorts, groups or searches. */
|
|
12
|
+
visibility?: 'shown' | 'optional' | 'none';
|
|
13
|
+
/** The cell renders two lines (a name over a muted description); rows grow to 52 px. */
|
|
14
|
+
twoLine?: boolean;
|
|
15
|
+
/** Offered in Display, Group by. */
|
|
16
|
+
groupable?: boolean;
|
|
17
|
+
/** Group order by value when grouped by this column; unknown values follow. */
|
|
18
|
+
groupOrder?: string[];
|
|
19
|
+
/** Value used to filter, group, sort and search; defaults to `row[key]`. */
|
|
20
|
+
value?: (row: T) => DataViewValue;
|
|
21
|
+
/** Label of one value in filter menus, chips and group headers. */
|
|
22
|
+
formatValue?: (value: string) => string;
|
|
23
|
+
/** Leading glyph of one value in the Filter menu, for example a StatusGlyph. */
|
|
24
|
+
valueIcon?: (value: string) => React.ReactNode;
|
|
25
|
+
/** Plain-text header for menus when `header` is not a string. */
|
|
26
|
+
label?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Place on a board card: `id` (mono) and `meta` glyphs lead line 1, `end` closes it;
|
|
29
|
+
* `title` is line 2 (two lines at most); `chip` cells fill line 3. Unset: not on the card.
|
|
30
|
+
*/
|
|
31
|
+
cardSlot?: 'id' | 'meta' | 'end' | 'title' | 'chip';
|
|
32
|
+
}
|
|
33
|
+
export declare const SHOW_EMPTY = "emptyGroups";
|
|
34
|
+
export declare const toggleFlag: (key: string) => string;
|
|
35
|
+
export declare const columnFlag: (key: string) => string;
|
|
36
|
+
export declare const valueOf: <T>(column: DataViewColumn<T>, row: T) => DataViewValue;
|
|
37
|
+
export declare const labelOf: <T>(column: DataViewColumn<T>) => string;
|
|
38
|
+
export declare const formatOf: <T>(column: DataViewColumn<T>, key: string) => string;
|
|
39
|
+
/** Distinct values of a column over all rows, in first-seen order. */
|
|
40
|
+
export declare const domainOf: <T>(column: DataViewColumn<T>, rows: T[]) => string[];
|
|
41
|
+
export declare const isShown: <T>(column: DataViewColumn<T>, flags: Record<string, boolean>) => boolean;
|
|
42
|
+
export declare const buildConfig: <T>(columns: DataViewColumn<T>[]) => ListApplyConfig<T>;
|
|
43
|
+
/** Filter groups with faceted counts: each value counts rows that pass every other control. */
|
|
44
|
+
export declare const filterGroups: <T>(columns: DataViewColumn<T>[], rows: T[], state: ListControlsState, config: ListApplyConfig<T>) => ListFilterGroup[];
|
|
45
|
+
/** Every group of the active Group by column, so empty ones can still show a header. */
|
|
46
|
+
export declare const allGroups: <T>(column: DataViewColumn<T> | undefined, rows: T[]) => {
|
|
47
|
+
key: string;
|
|
48
|
+
label: React.ReactNode;
|
|
49
|
+
}[];
|
|
50
|
+
/** Board columns from the Group by column (one "All" column without it) and optional lanes. */
|
|
51
|
+
export declare const boardAxes: <T>(groupCol: DataViewColumn<T> | undefined, laneCol: DataViewColumn<T> | undefined, all: T[], shown: T[]) => {
|
|
52
|
+
columns: {
|
|
53
|
+
icon: React.ReactNode;
|
|
54
|
+
key: string;
|
|
55
|
+
label: React.ReactNode;
|
|
56
|
+
}[] | {
|
|
57
|
+
key: string;
|
|
58
|
+
label: string;
|
|
59
|
+
}[];
|
|
60
|
+
columnOf: (row: T) => string;
|
|
61
|
+
lanes: {
|
|
62
|
+
icon: React.ReactNode;
|
|
63
|
+
key: string;
|
|
64
|
+
label: React.ReactNode;
|
|
65
|
+
}[] | undefined;
|
|
66
|
+
laneOf: ((row: T) => string) | undefined;
|
|
67
|
+
};
|
|
68
|
+
/** A table column that shows and sorts by `value` when it has no `cell` or `sortValue`. */
|
|
69
|
+
export declare const tableColumn: <T>(col: DataViewColumn<T>) => DataViewColumn<T>;
|
|
70
|
+
//# sourceMappingURL=data-view.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-view.config.d.ts","sourceRoot":"","sources":["../../src/components/data-view.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EAEvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;AAEzE,MAAM,WAAW,cAAc,CAAC,CAAC,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IAC3D,gGAAgG;IAChG,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACpC,mFAAmF;IACnF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wGAAwG;IACxG,UAAU,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IAC3C,wFAAwF;IACxF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oCAAoC;IACpC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,aAAa,CAAC;IAClC,mEAAmE;IACnE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,gFAAgF;IAChF,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC/C,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC;CACrD;AAED,eAAO,MAAM,UAAU,gBAAgB,CAAC;AACxC,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,MAAyB,CAAC;AACnE,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,MAAuB,CAAC;AAEjE,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,QAAQ,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAG,aACwB,CAAC;AAIxF,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,QAAQ,cAAc,CAAC,CAAC,CAAC,KAAG,MAC2B,CAAC;AAEnF,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,QAAQ,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,MAAM,KAAG,MACP,CAAC;AAE/D,sEAAsE;AACtE,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,QAAQ,cAAc,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,KAAG,MAAM,EAExE,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,QAAQ,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,OAElB,CAAC;AAEtE,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,SAAS,cAAc,CAAC,CAAC,CAAC,EAAE,KAAG,eAAe,CAAC,CAAC,CA0B9E,CAAC;AAEF,+FAA+F;AAC/F,eAAO,MAAM,YAAY,GAAI,CAAC,EAC5B,SAAS,cAAc,CAAC,CAAC,CAAC,EAAE,EAC5B,MAAM,CAAC,EAAE,EACT,OAAO,iBAAiB,EACxB,QAAQ,eAAe,CAAC,CAAC,CAAC,KACzB,eAAe,EAsBZ,CAAC;AAEP,wFAAwF;AACxF,eAAO,MAAM,SAAS,GAAI,CAAC,EACzB,QAAQ,cAAc,CAAC,CAAC,CAAC,GAAG,SAAS,EACrC,MAAM,CAAC,EAAE,KACR;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,EAMlC,CAAC;AAET,+FAA+F;AAC/F,eAAO,MAAM,SAAS,GAAI,CAAC,EACzB,UAAU,cAAc,CAAC,CAAC,CAAC,GAAG,SAAS,EACvC,SAAS,cAAc,CAAC,CAAC,CAAC,GAAG,SAAS,EACtC,KAAK,CAAC,EAAE,EACR,OAAO,CAAC,EAAE;;;aAbF,MAAM;eAAS,KAAK,CAAC,SAAS;;;;;oBAmBpB,CAAC;;;aAnBX,MAAM;eAAS,KAAK,CAAC,SAAS;;mBAqBZ,CAAC;CAE5B,CAAC;AAEF,2FAA2F;AAC3F,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,KAAK,cAAc,CAAC,CAAC,CAAC,KAAG,cAAc,CAAC,CAAC,CAQvE,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { applyListControls as e } from "../lib/list-controls.js";
|
|
2
|
+
// src/components/data-view.config.ts
|
|
3
|
+
var t = "emptyGroups", n = (e) => `toggle:${e}`, r = (e) => `show:${e}`, i = (e, t) => e.value ? e.value(t) : t[e.key], a = (e) => e == null ? "" : String(e), o = (e) => e.label ?? (typeof e.header == "string" ? e.header : e.key), s = (e, t) => e.formatValue ? e.formatValue(t) : t || "None", c = (e, t) => [...new Set(t.map((t) => a(i(e, t))))], l = (e, t) => e.visibility !== "none" && (t[r(e.key)] ?? e.visibility !== "optional"), u = (e) => {
|
|
4
|
+
let t = e.filter((e) => e.searchable), r = t.length > 0 ? t : e, o = {
|
|
5
|
+
search: (e) => r.map((t) => a(i(t, e))).join(" "),
|
|
6
|
+
filters: {},
|
|
7
|
+
flags: {},
|
|
8
|
+
sorts: {},
|
|
9
|
+
groups: {},
|
|
10
|
+
groupOrder: {}
|
|
11
|
+
};
|
|
12
|
+
for (let t of e) t.filter === "multi" && (o.filters[t.key] = (e) => a(i(t, e))), t.filter === "toggle" && (o.flags[n(t.key)] = (e) => !!i(t, e)), t.sortable && (o.sorts[t.key] = t.compare ? { compare: t.compare } : (e) => t.sortValue ? t.sortValue(e) : i(t, e)), t.groupOrder && (o.groupOrder[t.key] = t.groupOrder), t.groupable && (o.groups[t.key] = (e) => {
|
|
13
|
+
let n = a(i(t, e));
|
|
14
|
+
return {
|
|
15
|
+
key: n,
|
|
16
|
+
label: s(t, n)
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
return o;
|
|
20
|
+
}, d = (t, n, r, l) => t.filter((e) => e.filter === "multi").map((t) => {
|
|
21
|
+
let u = {
|
|
22
|
+
...r,
|
|
23
|
+
groupBy: null,
|
|
24
|
+
filters: {
|
|
25
|
+
...r.filters,
|
|
26
|
+
[t.key]: []
|
|
27
|
+
}
|
|
28
|
+
}, d = e(n, u, l).rows, f = /* @__PURE__ */ new Map();
|
|
29
|
+
for (let e of d) {
|
|
30
|
+
let n = a(i(t, e));
|
|
31
|
+
f.set(n, (f.get(n) ?? 0) + 1);
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
id: t.key,
|
|
35
|
+
label: o(t),
|
|
36
|
+
options: [.../* @__PURE__ */ new Set([...c(t, n), ...r.filters[t.key] ?? []])].map((e) => ({
|
|
37
|
+
value: e,
|
|
38
|
+
label: s(t, e),
|
|
39
|
+
icon: t.valueIcon?.(e),
|
|
40
|
+
count: f.get(e) ?? 0
|
|
41
|
+
}))
|
|
42
|
+
};
|
|
43
|
+
}), f = (e, t) => e ? [.../* @__PURE__ */ new Set([...e.groupOrder ?? [], ...c(e, t)])].map((t) => ({
|
|
44
|
+
key: t,
|
|
45
|
+
label: s(e, t)
|
|
46
|
+
})) : [], p = (e, t, n, r) => {
|
|
47
|
+
let o = (e, t) => f(e, t).map((t) => ({
|
|
48
|
+
...t,
|
|
49
|
+
icon: e.valueIcon?.(t.key)
|
|
50
|
+
}));
|
|
51
|
+
return {
|
|
52
|
+
columns: e ? o(e, n) : [{
|
|
53
|
+
key: "all",
|
|
54
|
+
label: "All"
|
|
55
|
+
}],
|
|
56
|
+
columnOf: (t) => e ? a(i(e, t)) : "all",
|
|
57
|
+
lanes: t ? o(t, r) : void 0,
|
|
58
|
+
laneOf: t ? (e) => a(i(t, e)) : void 0
|
|
59
|
+
};
|
|
60
|
+
}, m = (e) => {
|
|
61
|
+
let t = e.value;
|
|
62
|
+
return t ? {
|
|
63
|
+
...e,
|
|
64
|
+
cell: e.cell ?? ((e) => String(t(e) ?? "")),
|
|
65
|
+
sortValue: e.sortValue ?? ((e) => t(e))
|
|
66
|
+
} : e;
|
|
67
|
+
};
|
|
68
|
+
export { t as SHOW_EMPTY, f as allGroups, p as boardAxes, u as buildConfig, r as columnFlag, c as domainOf, d as filterGroups, s as formatOf, l as isShown, o as labelOf, m as tableColumn, n as toggleFlag, i as valueOf };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DataViewProps } from './data-view.types.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type { DataViewColumn, DataViewValue } from './data-view.config.js';
|
|
4
|
+
export type { DataViewActions, DataViewDefault, DataViewKind, DataViewProps, DataViewState, } from './data-view.types.js';
|
|
5
|
+
/**
|
|
6
|
+
* The default list: ListToolbar (search, Filter with counts, chips, toggles, views, Display)
|
|
7
|
+
* over a dense, groupable table, a card grid or a board. Everything comes from the columns.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DataView: <T>(props: DataViewProps<T>) => React.JSX.Element;
|
|
10
|
+
//# sourceMappingURL=data-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-view.d.ts","sourceRoot":"","sources":["../../src/components/data-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOrE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxE,YAAY,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,GACd,MAAM,mBAAmB,CAAC;AAa3B;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAG,OAAO,aAAa,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,GAAG,CAAC,OAwHhE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ListControls } from '../lib/use-list-controls.js';
|
|
2
|
+
import { DataViewDefault, DataViewState } from './data-view.types.js';
|
|
3
|
+
export interface StateSeed {
|
|
4
|
+
views: string[];
|
|
5
|
+
columns: {
|
|
6
|
+
key: string;
|
|
7
|
+
groupable?: boolean;
|
|
8
|
+
sortable?: boolean;
|
|
9
|
+
}[];
|
|
10
|
+
state?: Partial<DataViewState>;
|
|
11
|
+
defaultState?: DataViewDefault;
|
|
12
|
+
onStateChange?: (state: DataViewState) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface DataViewControls {
|
|
15
|
+
c: ListControls;
|
|
16
|
+
state: DataViewState;
|
|
17
|
+
setSelection: (ids: string[]) => void;
|
|
18
|
+
setCollapsed: (keys: string[]) => void;
|
|
19
|
+
restoring: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** One state object: each key given in `state` is controlled, the rest is kept here. */
|
|
22
|
+
export declare const useDataViewState: (seed: StateSeed) => DataViewControls;
|
|
23
|
+
//# sourceMappingURL=data-view.hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-view.hooks.d.ts","sourceRoot":"","sources":["../../src/components/data-view.hooks.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE9E,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAExE,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;IACpE,KAAK,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAC/B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAChD;AAoFD,MAAM,WAAW,gBAAgB;IAC/B,CAAC,EAAE,YAAY,CAAC;IAChB,KAAK,EAAE,aAAa,CAAC;IACrB,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACtC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wFAAwF;AACxF,eAAO,MAAM,gBAAgB,GAAI,MAAM,SAAS,KAAG,gBAoClD,CAAC"}
|