@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,93 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { cva as n } from "class-variance-authority";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
// src/components/chip.tsx
|
|
7
|
+
var a = n("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors duration-fast", {
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-primary/10 text-primary-emphasis border border-primary/20",
|
|
11
|
+
secondary: "bg-secondary text-secondary-foreground border border-border",
|
|
12
|
+
outline: "border border-border text-foreground bg-transparent",
|
|
13
|
+
success: "bg-success/10 text-success border border-success/20",
|
|
14
|
+
warning: "bg-warning/10 text-warning border border-warning/20",
|
|
15
|
+
destructive: "bg-destructive/10 text-destructive border border-destructive/20",
|
|
16
|
+
info: "bg-info/10 text-info border border-info/20"
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
md: "h-6 px-2.5",
|
|
20
|
+
sm: "h-5 px-2 font-normal"
|
|
21
|
+
},
|
|
22
|
+
pressed: {
|
|
23
|
+
true: "border-primary text-primary-emphasis",
|
|
24
|
+
false: ""
|
|
25
|
+
},
|
|
26
|
+
interactive: {
|
|
27
|
+
true: "cursor-pointer hover:bg-accent has-[[data-slot=chip-body]:focus-visible]:outline-2 has-[[data-slot=chip-body]:focus-visible]:-outline-offset-2 has-[[data-slot=chip-body]:focus-visible]:outline-ring",
|
|
28
|
+
false: ""
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
compoundVariants: [{
|
|
32
|
+
size: "sm",
|
|
33
|
+
variant: "outline",
|
|
34
|
+
pressed: !1,
|
|
35
|
+
class: "text-muted-foreground"
|
|
36
|
+
}, {
|
|
37
|
+
size: "sm",
|
|
38
|
+
interactive: !0,
|
|
39
|
+
pressed: !1,
|
|
40
|
+
class: "hover:bg-transparent hover:border-muted-foreground hover:text-foreground"
|
|
41
|
+
}],
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
variant: "outline",
|
|
44
|
+
size: "md",
|
|
45
|
+
interactive: !1
|
|
46
|
+
}
|
|
47
|
+
}), o = ({ size: e = 10 }) => /* @__PURE__ */ r("svg", {
|
|
48
|
+
width: e,
|
|
49
|
+
height: e,
|
|
50
|
+
viewBox: "0 0 24 24",
|
|
51
|
+
fill: "none",
|
|
52
|
+
stroke: "currentColor",
|
|
53
|
+
strokeWidth: "3",
|
|
54
|
+
strokeLinecap: "round",
|
|
55
|
+
strokeLinejoin: "round",
|
|
56
|
+
children: /* @__PURE__ */ r("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
57
|
+
}), s = t.forwardRef(({ className: t, variant: n, size: s, pressed: c, children: l, onRemove: u, onClick: d, onKeyDown: f, removeLabel: p = "Remove", ...m }, h) => {
|
|
58
|
+
let g = !!d, _ = (e) => {
|
|
59
|
+
f?.(e), g && !e.defaultPrevented && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), d?.());
|
|
60
|
+
};
|
|
61
|
+
return /* @__PURE__ */ i("span", {
|
|
62
|
+
ref: h,
|
|
63
|
+
className: e(a({
|
|
64
|
+
variant: n,
|
|
65
|
+
size: s,
|
|
66
|
+
pressed: c ?? !1,
|
|
67
|
+
interactive: g,
|
|
68
|
+
className: t
|
|
69
|
+
}), g && "relative"),
|
|
70
|
+
onKeyDown: g ? void 0 : f,
|
|
71
|
+
"data-slot": "chip",
|
|
72
|
+
...m,
|
|
73
|
+
children: [/* @__PURE__ */ r("span", {
|
|
74
|
+
"data-slot": "chip-body",
|
|
75
|
+
role: g ? "button" : void 0,
|
|
76
|
+
tabIndex: g ? 0 : void 0,
|
|
77
|
+
"aria-pressed": g && c !== void 0 ? c : void 0,
|
|
78
|
+
onClick: g ? d : void 0,
|
|
79
|
+
onKeyDown: g ? _ : void 0,
|
|
80
|
+
className: g ? "outline-none after:absolute after:inset-0" : void 0,
|
|
81
|
+
children: l
|
|
82
|
+
}), u && /* @__PURE__ */ r("button", {
|
|
83
|
+
type: "button",
|
|
84
|
+
onClick: u,
|
|
85
|
+
"aria-label": p,
|
|
86
|
+
"data-slot": "chip-remove",
|
|
87
|
+
className: e("relative z-10 -mr-1 rounded-full p-0.5 transition-colors duration-fast hover:bg-accent focus-ring", s === "sm" && "-mr-1.5 p-px opacity-70 hover:opacity-100"),
|
|
88
|
+
children: /* @__PURE__ */ r(o, { size: s === "sm" ? 12 : 10 })
|
|
89
|
+
})]
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
s.displayName = "Chip";
|
|
93
|
+
export { s as Chip, a as chipVariants };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const codeBlockCopyVariants: (props?: ({
|
|
3
|
+
withHeader?: boolean | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
export interface CodeBlockProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
code: string;
|
|
7
|
+
language?: string;
|
|
8
|
+
showCopy?: boolean;
|
|
9
|
+
/** Pre-tokenized markup (highlight.js / shiki) rendered instead of the raw `code` text. */
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const CodeBlock: React.ForwardRefExoticComponent<CodeBlockProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export type InlineCodeProps = React.HTMLAttributes<HTMLElement>;
|
|
14
|
+
export declare const InlineCode: React.ForwardRefExoticComponent<InlineCodeProps & React.RefAttributes<HTMLElement>>;
|
|
15
|
+
//# sourceMappingURL=code-block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../src/components/code-block.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,qBAAqB;;8EAmBjC,CAAC;AAEF,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAiCD,eAAO,MAAM,SAAS,uFAsCrB,CAAC;AAGF,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;AAEhE,eAAO,MAAM,UAAU,qFAStB,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { useState 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/code-block.tsx
|
|
8
|
+
var o = r([
|
|
9
|
+
"absolute right-2 top-2 grid size-6 place-items-center rounded-lg transition-colors duration-fast [&_svg]:size-3.5",
|
|
10
|
+
"text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
11
|
+
"opacity-0 group-hover:opacity-100 focus:opacity-100",
|
|
12
|
+
"focus-ring"
|
|
13
|
+
], {
|
|
14
|
+
variants: { withHeader: {
|
|
15
|
+
true: "top-10",
|
|
16
|
+
false: ""
|
|
17
|
+
} },
|
|
18
|
+
defaultVariants: { withHeader: !1 }
|
|
19
|
+
}), s = () => /* @__PURE__ */ a("svg", {
|
|
20
|
+
width: "14",
|
|
21
|
+
height: "14",
|
|
22
|
+
viewBox: "0 0 24 24",
|
|
23
|
+
fill: "none",
|
|
24
|
+
stroke: "currentColor",
|
|
25
|
+
strokeWidth: "2",
|
|
26
|
+
strokeLinecap: "round",
|
|
27
|
+
strokeLinejoin: "round",
|
|
28
|
+
children: [/* @__PURE__ */ i("rect", {
|
|
29
|
+
width: "14",
|
|
30
|
+
height: "14",
|
|
31
|
+
x: "8",
|
|
32
|
+
y: "8",
|
|
33
|
+
rx: "2"
|
|
34
|
+
}), /* @__PURE__ */ i("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })]
|
|
35
|
+
}), c = () => /* @__PURE__ */ i("svg", {
|
|
36
|
+
width: "14",
|
|
37
|
+
height: "14",
|
|
38
|
+
viewBox: "0 0 24 24",
|
|
39
|
+
fill: "none",
|
|
40
|
+
stroke: "currentColor",
|
|
41
|
+
strokeWidth: "2",
|
|
42
|
+
strokeLinecap: "round",
|
|
43
|
+
strokeLinejoin: "round",
|
|
44
|
+
children: /* @__PURE__ */ i("polyline", { points: "20 6 9 17 4 12" })
|
|
45
|
+
}), l = t.forwardRef(({ code: t, language: r, showCopy: l = !0, className: u, children: d, ...f }, p) => {
|
|
46
|
+
let [m, h] = n(!1), g = async () => {
|
|
47
|
+
await navigator.clipboard.writeText(t), h(!0), setTimeout(() => h(!1), 2e3);
|
|
48
|
+
};
|
|
49
|
+
return /* @__PURE__ */ a("div", {
|
|
50
|
+
ref: p,
|
|
51
|
+
className: e("relative group rounded-lg border border-border bg-card", u),
|
|
52
|
+
"data-slot": "code-block",
|
|
53
|
+
...f,
|
|
54
|
+
children: [
|
|
55
|
+
r && /* @__PURE__ */ i("div", {
|
|
56
|
+
className: "flex h-8 items-center justify-between border-b border-border px-3",
|
|
57
|
+
children: /* @__PURE__ */ i("span", {
|
|
58
|
+
className: "text-xs text-muted-foreground font-mono",
|
|
59
|
+
children: r
|
|
60
|
+
})
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ i("pre", {
|
|
63
|
+
className: "overflow-x-auto px-3 py-2.5 text-xs leading-relaxed",
|
|
64
|
+
children: d ?? /* @__PURE__ */ i("code", {
|
|
65
|
+
className: "font-mono text-foreground",
|
|
66
|
+
children: t
|
|
67
|
+
})
|
|
68
|
+
}),
|
|
69
|
+
l && /* @__PURE__ */ i("button", {
|
|
70
|
+
type: "button",
|
|
71
|
+
onClick: () => void g(),
|
|
72
|
+
className: e(o({ withHeader: !!r })),
|
|
73
|
+
"aria-label": m ? "Copied" : "Copy code",
|
|
74
|
+
children: i(m ? c : s, {})
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
l.displayName = "CodeBlock";
|
|
80
|
+
var u = t.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ i("code", {
|
|
81
|
+
ref: r,
|
|
82
|
+
className: e("rounded-sm bg-muted px-1 py-px font-mono text-xs text-foreground", t),
|
|
83
|
+
"data-slot": "inline-code",
|
|
84
|
+
...n
|
|
85
|
+
}));
|
|
86
|
+
u.displayName = "InlineCode";
|
|
87
|
+
export { l as CodeBlock, u as InlineCode, o as codeBlockCopyVariants };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface CollapsibleContextValue {
|
|
4
|
+
open: boolean;
|
|
5
|
+
toggle: () => void;
|
|
6
|
+
triggerId: string;
|
|
7
|
+
contentId: string;
|
|
8
|
+
}
|
|
9
|
+
export interface CollapsibleProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
10
|
+
open?: boolean;
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
onOpenChange?: (open: boolean) => void;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const Collapsible: React.ForwardRefExoticComponent<CollapsibleProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export interface CollapsibleTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
18
|
+
asChild?: boolean;
|
|
19
|
+
/** Leading chevron that turns when open. Default true (not drawn with asChild). */
|
|
20
|
+
chevron?: boolean;
|
|
21
|
+
/** Quiet trailing count, for example the number of items inside. */
|
|
22
|
+
count?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export declare const CollapsibleTrigger: React.ForwardRefExoticComponent<CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
25
|
+
export type CollapsibleContentProps = React.HTMLAttributes<HTMLDivElement>;
|
|
26
|
+
export declare const CollapsibleContent: React.ForwardRefExoticComponent<CollapsibleContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
//# sourceMappingURL=collapsible.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../src/components/collapsible.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAA8C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKnF,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AASD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC9F,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,yFAyCvB,CAAC;AAGF,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAC5F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mFAAmF;IACnF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oEAAoE;IACpE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB;AAED,eAAO,MAAM,kBAAkB,mGAuC9B,CAAC;AAGF,MAAM,MAAM,uBAAuB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAE3E,eAAO,MAAM,kBAAkB,gGAmB9B,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { Count as t } from "./count.js";
|
|
4
|
+
import { Disclosure as n, DisclosureChevron as r } from "./disclosure.js";
|
|
5
|
+
import * as i from "react";
|
|
6
|
+
import { createContext as a, useContext as o, useId as s, useState as c } from "react";
|
|
7
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
|
+
import { Slot as f } from "@radix-ui/react-slot";
|
|
9
|
+
// src/components/collapsible.tsx
|
|
10
|
+
var p = a({
|
|
11
|
+
open: !0,
|
|
12
|
+
toggle: () => {},
|
|
13
|
+
triggerId: "",
|
|
14
|
+
contentId: ""
|
|
15
|
+
}), m = i.forwardRef(({ open: e, defaultOpen: t = !1, onOpenChange: n, children: r, className: i, ...a }, o) => {
|
|
16
|
+
let [l, d] = c(t), f = e ?? l, m = s(), h = () => {
|
|
17
|
+
let e = !f;
|
|
18
|
+
d(e), n?.(e);
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ u(p.Provider, {
|
|
21
|
+
value: {
|
|
22
|
+
open: f,
|
|
23
|
+
toggle: h,
|
|
24
|
+
triggerId: `${m}-trigger`,
|
|
25
|
+
contentId: `${m}-content`
|
|
26
|
+
},
|
|
27
|
+
children: /* @__PURE__ */ u("div", {
|
|
28
|
+
ref: o,
|
|
29
|
+
className: i,
|
|
30
|
+
"data-slot": "collapsible",
|
|
31
|
+
"data-state": f ? "open" : "closed",
|
|
32
|
+
...a,
|
|
33
|
+
children: typeof r == "function" ? r({
|
|
34
|
+
open: f,
|
|
35
|
+
toggle: h
|
|
36
|
+
}) : r
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
m.displayName = "Collapsible";
|
|
41
|
+
var h = i.forwardRef(({ asChild: n = !1, chevron: i = !0, count: a, className: s, children: c, onClick: m, ...h }, g) => {
|
|
42
|
+
let { open: _, toggle: v, triggerId: y, contentId: b } = o(p), x = n ? f : "button", S = (e) => {
|
|
43
|
+
m?.(e), e.defaultPrevented || v();
|
|
44
|
+
};
|
|
45
|
+
return /* @__PURE__ */ u(x, {
|
|
46
|
+
ref: g,
|
|
47
|
+
...n ? {} : { type: "button" },
|
|
48
|
+
id: y || void 0,
|
|
49
|
+
"aria-expanded": _,
|
|
50
|
+
"aria-controls": b || void 0,
|
|
51
|
+
onClick: S,
|
|
52
|
+
className: e("flex h-7 w-full items-center gap-2 rounded-md px-2 text-ui font-medium transition-colors duration-fast", "text-foreground hover:bg-accent", "focus-ring", s),
|
|
53
|
+
"data-slot": "collapsible-trigger",
|
|
54
|
+
...h,
|
|
55
|
+
children: n ? c : /* @__PURE__ */ d(l, { children: [
|
|
56
|
+
i && /* @__PURE__ */ u(r, { open: _ }),
|
|
57
|
+
/* @__PURE__ */ u("span", {
|
|
58
|
+
className: "min-w-0 truncate text-left",
|
|
59
|
+
children: c
|
|
60
|
+
}),
|
|
61
|
+
a !== void 0 && /* @__PURE__ */ u(t, { children: a })
|
|
62
|
+
] })
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
h.displayName = "CollapsibleTrigger";
|
|
66
|
+
var g = i.forwardRef(({ className: e, children: t, ...r }, i) => {
|
|
67
|
+
let { open: a, triggerId: s, contentId: c } = o(p);
|
|
68
|
+
return /* @__PURE__ */ u(n, {
|
|
69
|
+
ref: i,
|
|
70
|
+
open: a,
|
|
71
|
+
id: c || void 0,
|
|
72
|
+
role: "region",
|
|
73
|
+
"aria-labelledby": s || void 0,
|
|
74
|
+
className: e,
|
|
75
|
+
"data-slot": "collapsible-content",
|
|
76
|
+
...r,
|
|
77
|
+
children: t
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
g.displayName = "CollapsibleContent";
|
|
81
|
+
export { m as Collapsible, g as CollapsibleContent, h as CollapsibleTrigger };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface CommandContextValue {
|
|
3
|
+
/** Current query, lowercased + trimmed. */
|
|
4
|
+
query: string;
|
|
5
|
+
activeId: string | null;
|
|
6
|
+
setActiveId: (id: string | null) => void;
|
|
7
|
+
matchCount: number;
|
|
8
|
+
/** True once the root has collected its items - keeps the empty state from flashing. */
|
|
9
|
+
ready: boolean;
|
|
10
|
+
isMatch: (id: string) => boolean;
|
|
11
|
+
register: (id: string, text: string) => () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const CommandContext: import('react').Context<CommandContextValue>;
|
|
14
|
+
/** Flattens a node tree to its plain text so items are searchable without a `value` prop. */
|
|
15
|
+
export declare const nodeText: (node: ReactNode) => string;
|
|
16
|
+
//# sourceMappingURL=command.context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.context.d.ts","sourceRoot":"","sources":["../../src/components/command.context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtE,MAAM,WAAW,mBAAmB;IAClC,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,wFAAwF;IACxF,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IACjC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC;CACpD;AAED,eAAO,MAAM,cAAc,8CAQzB,CAAC;AAEH,6FAA6F;AAC7F,eAAO,MAAM,QAAQ,GAAI,MAAM,SAAS,KAAG,MAK1C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext as e, isValidElement as t } from "react";
|
|
3
|
+
// src/components/command.context.ts
|
|
4
|
+
var n = e({
|
|
5
|
+
query: "",
|
|
6
|
+
activeId: null,
|
|
7
|
+
setActiveId: () => {},
|
|
8
|
+
matchCount: 0,
|
|
9
|
+
ready: !0,
|
|
10
|
+
isMatch: () => !0,
|
|
11
|
+
register: () => () => {}
|
|
12
|
+
}), r = (e) => typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(r).join(" ") : t(e) ? r(e.props.children) : "";
|
|
13
|
+
export { n as CommandContext, r as nodeText };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface CommandProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** Accessible name for the search input. */
|
|
8
|
+
'aria-label'?: string;
|
|
9
|
+
/** Accessible name for the palette dialog. */
|
|
10
|
+
dialogLabel?: string;
|
|
11
|
+
/** Spread onto the search input - id, data-testid, autoComplete, etc. */
|
|
12
|
+
inputProps?: Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'type' | 'role'>;
|
|
13
|
+
/** Ref to the search input. */
|
|
14
|
+
inputRef?: React.Ref<HTMLInputElement>;
|
|
15
|
+
}
|
|
16
|
+
export declare const Command: ({ open, onOpenChange, placeholder, children, className, "aria-label": ariaLabel, dialogLabel, inputProps, inputRef: externalInputRef, ...props }: CommandProps) => React.JSX.Element | null;
|
|
17
|
+
export { CommandEmpty, CommandGroup, CommandItem, CommandSeparator } from './command.parts.js';
|
|
18
|
+
export type { CommandGroupProps, CommandItemProps } from './command.parts.js';
|
|
19
|
+
//# sourceMappingURL=command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/components/command.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AA2BxF,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACxE,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,UAAU,CAAC,EAAE,IAAI,CACf,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CACvC,CAAC;IACF,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,OAAO,GAAI,kJAWrB,YAAY,KAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAgIrC,CAAC;AACF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC5F,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { DialogBackdrop as t, DialogPortal as n, useDialogShell as r } from "./dialog-shell.js";
|
|
4
|
+
import { OverlayLayerProvider as i } from "../lib/overlay-layer.js";
|
|
5
|
+
import { Kbd as a } from "./kbd.js";
|
|
6
|
+
import { CommandContext as o } from "./command.context.js";
|
|
7
|
+
import { commandContentVariants as s } from "./command.variants.js";
|
|
8
|
+
import { CommandEmpty as c, CommandGroup as l, CommandItem as u, CommandSeparator as d } from "./command.parts.js";
|
|
9
|
+
import { useCallback as f, useEffect as p, useId as m, useRef as h, useState as g } from "react";
|
|
10
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
11
|
+
// src/components/command.tsx
|
|
12
|
+
var y = () => /* @__PURE__ */ v("svg", {
|
|
13
|
+
width: "16",
|
|
14
|
+
height: "16",
|
|
15
|
+
viewBox: "0 0 24 24",
|
|
16
|
+
fill: "none",
|
|
17
|
+
stroke: "currentColor",
|
|
18
|
+
strokeWidth: "2",
|
|
19
|
+
strokeLinecap: "round",
|
|
20
|
+
strokeLinejoin: "round",
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
"data-slot": "command-search-icon",
|
|
23
|
+
className: "command-search-icon shrink-0 text-muted-foreground",
|
|
24
|
+
children: [/* @__PURE__ */ _("circle", {
|
|
25
|
+
cx: "11",
|
|
26
|
+
cy: "11",
|
|
27
|
+
r: "8"
|
|
28
|
+
}), /* @__PURE__ */ _("path", { d: "m21 21-4.3-4.3" })]
|
|
29
|
+
}), b = ({ open: c, onOpenChange: l, placeholder: u = "Type a command or search...", children: d, className: b, "aria-label": x = "Search", dialogLabel: S = "Command palette", inputProps: C, inputRef: w, ...T }) => {
|
|
30
|
+
let [E, D] = g(""), [O, k] = g([]), [A, j] = g(null), [M, N] = g(!1), P = h(null), F = `${m()}-list`, I = f(() => l(!1), [l]), { mounted: L, layer: R } = r(P, c, I), z = f((e, t) => (k((n) => [...n.filter((t) => t.id !== e), {
|
|
31
|
+
id: e,
|
|
32
|
+
text: t
|
|
33
|
+
}]), () => {
|
|
34
|
+
k((t) => t.filter((t) => t.id !== e));
|
|
35
|
+
}), []), B = E.trim().toLowerCase(), V = O.filter((e) => e.text.includes(B)).map((e) => e.id), H = () => [...V].sort((e, t) => {
|
|
36
|
+
let n = document.getElementById(e), r = document.getElementById(t);
|
|
37
|
+
return !n || !r ? 0 : n.compareDocumentPosition(r) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
38
|
+
});
|
|
39
|
+
p(() => {
|
|
40
|
+
c && D("");
|
|
41
|
+
}, [c]), p(() => N(!0), []), p(() => {
|
|
42
|
+
A && V.includes(A) || j(H()[0] ?? null);
|
|
43
|
+
}, [A, V]), p(() => {
|
|
44
|
+
A && document.getElementById(A)?.scrollIntoView?.({ block: "nearest" });
|
|
45
|
+
}, [A]);
|
|
46
|
+
let U = (e) => {
|
|
47
|
+
let t = H();
|
|
48
|
+
if (t.length === 0) return;
|
|
49
|
+
let n = A ? t.indexOf(A) : -1;
|
|
50
|
+
j(t[(n + e + t.length) % t.length]);
|
|
51
|
+
}, W = (e) => {
|
|
52
|
+
if (e.key === "ArrowDown") U(1);
|
|
53
|
+
else if (e.key === "ArrowUp") U(-1);
|
|
54
|
+
else if (e.key === "Home") j(H()[0] ?? null);
|
|
55
|
+
else if (e.key === "End") j(H().at(-1) ?? null);
|
|
56
|
+
else if (e.key === "Enter" && A && !e.nativeEvent.isComposing) document.getElementById(A)?.click();
|
|
57
|
+
else return;
|
|
58
|
+
e.preventDefault();
|
|
59
|
+
};
|
|
60
|
+
return !c || !L ? null : /* @__PURE__ */ _(n, { children: /* @__PURE__ */ _(o.Provider, {
|
|
61
|
+
value: {
|
|
62
|
+
query: B,
|
|
63
|
+
activeId: A,
|
|
64
|
+
setActiveId: j,
|
|
65
|
+
matchCount: V.length,
|
|
66
|
+
ready: M,
|
|
67
|
+
isMatch: (e) => V.includes(e),
|
|
68
|
+
register: z
|
|
69
|
+
},
|
|
70
|
+
children: /* @__PURE__ */ _(i, {
|
|
71
|
+
layer: R,
|
|
72
|
+
children: /* @__PURE__ */ v("div", {
|
|
73
|
+
className: "fixed inset-0 z-[var(--z-overlay,50)] flex items-start justify-center pt-[20vh]",
|
|
74
|
+
"data-slot": "command",
|
|
75
|
+
children: [/* @__PURE__ */ _(t, {
|
|
76
|
+
layer: R,
|
|
77
|
+
onClick: I
|
|
78
|
+
}), /* @__PURE__ */ v("div", {
|
|
79
|
+
ref: P,
|
|
80
|
+
role: "dialog",
|
|
81
|
+
"aria-modal": "true",
|
|
82
|
+
"aria-label": S,
|
|
83
|
+
className: e(s(), b),
|
|
84
|
+
"data-slot": "command-content",
|
|
85
|
+
...T,
|
|
86
|
+
children: [/* @__PURE__ */ v("div", {
|
|
87
|
+
className: "flex h-10 items-center gap-2 border-b border-border px-3",
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ _(y, {}),
|
|
90
|
+
/* @__PURE__ */ _("input", {
|
|
91
|
+
...C,
|
|
92
|
+
ref: w,
|
|
93
|
+
type: "text",
|
|
94
|
+
role: "combobox",
|
|
95
|
+
"aria-label": x,
|
|
96
|
+
"aria-expanded": !0,
|
|
97
|
+
"aria-autocomplete": "list",
|
|
98
|
+
"aria-controls": F,
|
|
99
|
+
"aria-activedescendant": A ?? void 0,
|
|
100
|
+
value: E,
|
|
101
|
+
onChange: (e) => D(e.target.value),
|
|
102
|
+
onKeyDown: (e) => {
|
|
103
|
+
C?.onKeyDown?.(e), e.defaultPrevented || W(e);
|
|
104
|
+
},
|
|
105
|
+
placeholder: C?.placeholder ?? u,
|
|
106
|
+
"data-slot": "command-input",
|
|
107
|
+
className: e("h-7.5 min-w-0 flex-1 bg-transparent text-ui text-foreground outline-none placeholder:text-muted-foreground", C?.className)
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ _(a, {
|
|
110
|
+
className: "hidden sm:inline-flex",
|
|
111
|
+
children: "Esc"
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
}), /* @__PURE__ */ _("div", {
|
|
115
|
+
id: F,
|
|
116
|
+
role: "listbox",
|
|
117
|
+
className: "max-h-80 overflow-y-auto p-1.5",
|
|
118
|
+
children: d
|
|
119
|
+
})]
|
|
120
|
+
})]
|
|
121
|
+
})
|
|
122
|
+
})
|
|
123
|
+
}) });
|
|
124
|
+
};
|
|
125
|
+
export { b as Command, c as CommandEmpty, l as CommandGroup, u as CommandItem, d as CommandSeparator };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface CommandGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
heading?: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const CommandGroup: ({ heading, children, className, ...props }: CommandGroupProps) => React.JSX.Element;
|
|
7
|
+
export interface CommandItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
shortcut?: string;
|
|
10
|
+
/** Overrides the text matched against the query (defaults to the item's own text). */
|
|
11
|
+
value?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const CommandItem: ({ icon, shortcut, value, className, children, id: providedId, ...props }: CommandItemProps) => React.JSX.Element;
|
|
14
|
+
export declare const CommandSeparator: () => React.JSX.Element | null;
|
|
15
|
+
export declare const CommandEmpty: ({ children }: {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}) => React.JSX.Element | null;
|
|
18
|
+
//# sourceMappingURL=command.parts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.parts.d.ts","sourceRoot":"","sources":["../../src/components/command.parts.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvF,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,GAAI,4CAK1B,iBAAiB,KAAG,KAAK,CAAC,GAAG,CAAC,OAyBhC,CAAC;AAEF,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,WAAW,GAAI,0EAQzB,gBAAgB,KAAG,KAAK,CAAC,GAAG,CAAC,OA6B/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAO,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAIvD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,KAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAQxF,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { Kbd as t } from "./kbd.js";
|
|
4
|
+
import { CommandContext as n, nodeText as r } from "./command.context.js";
|
|
5
|
+
import { commandItemVariants as i } from "./command.variants.js";
|
|
6
|
+
import { useContext as a, useEffect as o, useId as s, useRef as c, useState as l } from "react";
|
|
7
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
|
+
// src/components/command.parts.tsx
|
|
9
|
+
var f = ({ heading: t, children: r, className: i, ...s }) => {
|
|
10
|
+
let { query: f, matchCount: p } = a(n), m = c(null), [h, g] = l(!1);
|
|
11
|
+
return o(() => {
|
|
12
|
+
g(!m.current?.querySelector("[data-slot=\"command-item\"]:not([hidden])"));
|
|
13
|
+
}, [f, p]), /* @__PURE__ */ d("div", {
|
|
14
|
+
ref: m,
|
|
15
|
+
role: "group",
|
|
16
|
+
"aria-label": t,
|
|
17
|
+
"data-slot": "command-group",
|
|
18
|
+
hidden: h,
|
|
19
|
+
className: e("py-1", h && "hidden", i),
|
|
20
|
+
...s,
|
|
21
|
+
children: [t && /* @__PURE__ */ u("div", {
|
|
22
|
+
className: "px-2 pt-1.5 pb-1 text-xs font-medium text-muted-foreground",
|
|
23
|
+
children: t
|
|
24
|
+
}), r]
|
|
25
|
+
});
|
|
26
|
+
}, p = ({ icon: c, shortcut: l, value: f, className: p, children: m, id: h, ...g }) => {
|
|
27
|
+
let { activeId: _, setActiveId: v, isMatch: y, register: b } = a(n), x = s(), S = h ?? x, C = (f ?? r(m)).trim().toLowerCase();
|
|
28
|
+
o(() => b(S, C), [
|
|
29
|
+
b,
|
|
30
|
+
S,
|
|
31
|
+
C
|
|
32
|
+
]);
|
|
33
|
+
let w = y(S), T = _ === S;
|
|
34
|
+
return /* @__PURE__ */ d("button", {
|
|
35
|
+
type: "button",
|
|
36
|
+
id: S,
|
|
37
|
+
role: "option",
|
|
38
|
+
"aria-selected": T,
|
|
39
|
+
tabIndex: -1,
|
|
40
|
+
hidden: !w,
|
|
41
|
+
onMouseEnter: () => v(S),
|
|
42
|
+
className: e(i({
|
|
43
|
+
active: T,
|
|
44
|
+
hidden: !w
|
|
45
|
+
}), p),
|
|
46
|
+
"data-slot": "command-item",
|
|
47
|
+
...g,
|
|
48
|
+
children: [
|
|
49
|
+
c && /* @__PURE__ */ u("span", {
|
|
50
|
+
className: "shrink-0 text-muted-foreground [&_svg]:size-4",
|
|
51
|
+
children: c
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ u("span", {
|
|
54
|
+
className: "flex-1 truncate text-left",
|
|
55
|
+
children: m
|
|
56
|
+
}),
|
|
57
|
+
l && /* @__PURE__ */ u(t, {
|
|
58
|
+
className: "ml-auto",
|
|
59
|
+
children: l
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
});
|
|
63
|
+
}, m = () => {
|
|
64
|
+
let { matchCount: e, ready: t } = a(n);
|
|
65
|
+
return t && e === 0 ? null : /* @__PURE__ */ u("div", {
|
|
66
|
+
className: "-mx-1.5 my-1 h-px bg-border",
|
|
67
|
+
"data-slot": "command-separator"
|
|
68
|
+
});
|
|
69
|
+
}, h = ({ children: e }) => {
|
|
70
|
+
let { matchCount: t, ready: r } = a(n);
|
|
71
|
+
return !r || t > 0 ? null : /* @__PURE__ */ u("div", {
|
|
72
|
+
className: "py-6 text-center text-ui text-muted-foreground",
|
|
73
|
+
"data-slot": "command-empty",
|
|
74
|
+
children: e
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
export { h as CommandEmpty, f as CommandGroup, p as CommandItem, m as CommandSeparator };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const commandContentVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
2
|
+
export declare const commandItemVariants: (props?: ({
|
|
3
|
+
active?: boolean | null | undefined;
|
|
4
|
+
hidden?: boolean | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
//# sourceMappingURL=command.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.variants.d.ts","sourceRoot":"","sources":["../../src/components/command.variants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,oFAElC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;8EAsB/B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cva as e } from "class-variance-authority";
|
|
2
|
+
// src/components/command.variants.ts
|
|
3
|
+
var t = e("relative z-10 w-full max-w-lg overflow-hidden rounded-lg border border-border bg-popover shadow-[var(--shadow-popover)]"), n = e([
|
|
4
|
+
"flex h-7 w-full items-center gap-2.5 rounded-md px-2 text-ui transition-colors duration-fast",
|
|
5
|
+
"text-popover-foreground hover:bg-accent hover:text-accent-foreground",
|
|
6
|
+
"focus-ring focus:bg-accent focus:text-accent-foreground"
|
|
7
|
+
], {
|
|
8
|
+
variants: {
|
|
9
|
+
active: {
|
|
10
|
+
true: "bg-accent text-accent-foreground",
|
|
11
|
+
false: ""
|
|
12
|
+
},
|
|
13
|
+
hidden: {
|
|
14
|
+
true: "hidden",
|
|
15
|
+
false: ""
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
active: !1,
|
|
20
|
+
hidden: !1
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export { t as commandContentVariants, n as commandItemVariants };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ContentBlockSource {
|
|
3
|
+
href: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ContentBlockProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
/** Quiet header text: "6 of 6 passed", "+12 -3". */
|
|
10
|
+
summary?: React.ReactNode;
|
|
11
|
+
/** Header link to where the block came from, opened as a 24 px icon button. */
|
|
12
|
+
source?: ContentBlockSource;
|
|
13
|
+
/** Text the header copy button puts on the clipboard. */
|
|
14
|
+
copyText?: string;
|
|
15
|
+
/** The header toggles the body; open by default. */
|
|
16
|
+
defaultOpen?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Card frame of one content block: a 32 px header (toggle, icon, title, summary, link, copy). */
|
|
19
|
+
export declare const ContentBlock: React.ForwardRefExoticComponent<ContentBlockProps & React.RefAttributes<HTMLElement>>;
|
|
20
|
+
/** Prose with `inline code` spans from backticks. */
|
|
21
|
+
export declare const InlineText: ({ text }: {
|
|
22
|
+
text: string;
|
|
23
|
+
}) => React.JSX.Element;
|
|
24
|
+
//# sourceMappingURL=content-block.d.ts.map
|