@agentage/components 0.0.0-stage → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +24 -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 +51 -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 @@
|
|
|
1
|
+
{"version":3,"file":"card-state.d.ts","sourceRoot":"","sources":["../../src/components/card-state.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAIvE,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1E,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,kFAAkF;AAClF,MAAM,WAAW,YAAY;IAC3B,sDAAsD;IACtD,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wDAAwD;IACxD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,gEAAgE;IAChE,KAAK,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IACpC,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;IACrC,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB;AAaD,2FAA2F;AAC3F,eAAO,MAAM,aAAa,GAAI,qBAA0B,kBAAkB,sBAyBzE,CAAC;AA6BF,2FAA2F;AAC3F,eAAO,MAAM,YAAY,GAAI,kBAAkB;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,SAclF,CAAC;AAiBF,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,2CAA2C;IAC3C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,6FAA6F;AAC7F,eAAO,MAAM,QAAQ,GAAI,qDAAqD,aAAa,sBA+B1F,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useAnnounce as e } from "../lib/use-announce.js";
|
|
3
|
+
import { cn as t } from "../lib/utils.js";
|
|
4
|
+
import { Badge as n } from "./badge.js";
|
|
5
|
+
import { Button as r } from "./button.js";
|
|
6
|
+
import { CopyButton as i } from "./copy-button.js";
|
|
7
|
+
import { EmptyState as a } from "./empty-state.js";
|
|
8
|
+
import { IconButton as o } from "./icon-button.js";
|
|
9
|
+
import { RelativeTime as s } from "./relative-time.js";
|
|
10
|
+
import { Skeleton as c } from "./skeleton.js";
|
|
11
|
+
import { StatusGlyph as l } from "./status-glyph.js";
|
|
12
|
+
import * as u from "react";
|
|
13
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
14
|
+
// src/components/card-state.tsx
|
|
15
|
+
var m = (e) => typeof e == "object" && !!e && "message" in e && !u.isValidElement(e), h = () => /* @__PURE__ */ p("div", {
|
|
16
|
+
className: "flex flex-col gap-2 py-1",
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ f(c, { className: "h-6 w-24 bg-foreground/10" }),
|
|
19
|
+
/* @__PURE__ */ f(c, {
|
|
20
|
+
variant: "text",
|
|
21
|
+
className: "w-11/12 bg-foreground/10"
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ f(c, {
|
|
24
|
+
variant: "text",
|
|
25
|
+
className: "w-2/3 bg-foreground/10"
|
|
26
|
+
})
|
|
27
|
+
]
|
|
28
|
+
}), g = ({ state: e, fallback: t = {} }) => {
|
|
29
|
+
let { loading: n, empty: o, error: s, onRetry: c } = t;
|
|
30
|
+
if (e === "loading") return /* @__PURE__ */ f(d, { children: n ?? /* @__PURE__ */ f(h, {}) });
|
|
31
|
+
if (e === "empty") return /* @__PURE__ */ f(d, { children: o ?? /* @__PURE__ */ f(a, {
|
|
32
|
+
title: "No data for this period",
|
|
33
|
+
className: "py-4"
|
|
34
|
+
}) });
|
|
35
|
+
let u = m(s) ? s : { message: s ?? "Could not load this data." };
|
|
36
|
+
return /* @__PURE__ */ p("div", {
|
|
37
|
+
className: "flex flex-col items-start gap-2 py-1 text-ui",
|
|
38
|
+
"data-slot": "card-error",
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ p("span", {
|
|
41
|
+
className: "flex items-center gap-2 font-medium",
|
|
42
|
+
children: [/* @__PURE__ */ f(l, {
|
|
43
|
+
shape: "alert",
|
|
44
|
+
tone: "destructive"
|
|
45
|
+
}), u.message]
|
|
46
|
+
}),
|
|
47
|
+
u.reference && /* @__PURE__ */ p("span", {
|
|
48
|
+
className: "flex items-center gap-1 text-xs text-muted-foreground",
|
|
49
|
+
children: [
|
|
50
|
+
"Reference ",
|
|
51
|
+
/* @__PURE__ */ f("code", {
|
|
52
|
+
className: "font-mono text-foreground",
|
|
53
|
+
children: u.reference
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ f(i, {
|
|
56
|
+
text: u.reference,
|
|
57
|
+
label: "Copy reference",
|
|
58
|
+
iconOnly: !0,
|
|
59
|
+
variant: "ghost"
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
}),
|
|
63
|
+
c && /* @__PURE__ */ f(r, {
|
|
64
|
+
size: "sm",
|
|
65
|
+
variant: "outline",
|
|
66
|
+
onClick: c,
|
|
67
|
+
children: "Retry"
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
});
|
|
71
|
+
}, _ = {
|
|
72
|
+
ready: "Loaded",
|
|
73
|
+
loading: "Loading",
|
|
74
|
+
empty: "No data",
|
|
75
|
+
error: "Failed to load",
|
|
76
|
+
stale: "Showing stale data"
|
|
77
|
+
}, v = 150, y = /* @__PURE__ */ new Map(), b = null, x = (e) => {
|
|
78
|
+
let t = /* @__PURE__ */ new Map();
|
|
79
|
+
y.forEach(({ label: e, state: n }) => t.set(n, [...t.get(n) ?? [], e ?? ""])), y.clear(), b = null;
|
|
80
|
+
let n = [...t].map(([e, t]) => {
|
|
81
|
+
let n = t.filter(Boolean);
|
|
82
|
+
return n.length ? `${n.join(", ")}: ${_[e]}` : _[e];
|
|
83
|
+
});
|
|
84
|
+
n.length && e(n.join(". "));
|
|
85
|
+
}, S = ({ state: t, label: n }) => {
|
|
86
|
+
let r = e(), i = u.useId(), a = u.useRef(t);
|
|
87
|
+
return u.useEffect(() => () => void y.delete(i), [i]), u.useEffect(() => {
|
|
88
|
+
a.current !== t && (a.current = t, y.set(i, {
|
|
89
|
+
label: n,
|
|
90
|
+
state: t
|
|
91
|
+
}), b && clearTimeout(b), b = setTimeout(() => x(r), v));
|
|
92
|
+
}, [
|
|
93
|
+
t,
|
|
94
|
+
n,
|
|
95
|
+
r,
|
|
96
|
+
i
|
|
97
|
+
]), null;
|
|
98
|
+
}, C = () => /* @__PURE__ */ p("svg", {
|
|
99
|
+
viewBox: "0 0 24 24",
|
|
100
|
+
fill: "none",
|
|
101
|
+
stroke: "currentColor",
|
|
102
|
+
strokeWidth: "2",
|
|
103
|
+
strokeLinecap: "round",
|
|
104
|
+
strokeLinejoin: "round",
|
|
105
|
+
"aria-hidden": "true",
|
|
106
|
+
children: [/* @__PURE__ */ f("path", { d: "M21 12a9 9 0 1 1-3-6.7L21 8" }), /* @__PURE__ */ f("path", { d: "M21 3v5h-5" })]
|
|
107
|
+
}), w = ({ source: e, updatedAt: r, stale: i, onRefresh: a, refreshing: c }) => /* @__PURE__ */ p("div", {
|
|
108
|
+
className: "flex h-6 w-full min-w-0 items-center gap-2 text-xs text-muted-foreground",
|
|
109
|
+
"data-slot": "card-meta",
|
|
110
|
+
children: [
|
|
111
|
+
e && /* @__PURE__ */ f("span", {
|
|
112
|
+
className: "min-w-0 truncate",
|
|
113
|
+
children: e
|
|
114
|
+
}),
|
|
115
|
+
r !== void 0 && /* @__PURE__ */ p("span", {
|
|
116
|
+
className: "shrink-0",
|
|
117
|
+
children: ["Updated ", /* @__PURE__ */ f(s, { value: r })]
|
|
118
|
+
}),
|
|
119
|
+
i && /* @__PURE__ */ f(n, {
|
|
120
|
+
variant: "outline-muted",
|
|
121
|
+
"data-slot": "card-stale",
|
|
122
|
+
children: "Stale"
|
|
123
|
+
}),
|
|
124
|
+
a && /* @__PURE__ */ f(o, {
|
|
125
|
+
size: "sm",
|
|
126
|
+
icon: /* @__PURE__ */ f(C, {}),
|
|
127
|
+
"aria-label": "Refresh",
|
|
128
|
+
"aria-disabled": c || void 0,
|
|
129
|
+
"aria-busy": c || void 0,
|
|
130
|
+
onClick: () => {
|
|
131
|
+
c || a();
|
|
132
|
+
},
|
|
133
|
+
className: t("ml-auto", c && "[&_svg]:motion-safe:animate-spin")
|
|
134
|
+
})
|
|
135
|
+
]
|
|
136
|
+
});
|
|
137
|
+
export { S as CardAnnounce, w as CardMeta, g as CardStateBody };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CardFallback, CardState } from './card-state.js';
|
|
2
|
+
import { CardProps } from './card.parts.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export type { CardError, CardFallback, CardMetaProps, CardState } from './card-state.js';
|
|
5
|
+
export { CardMeta } from './card-state.js';
|
|
6
|
+
export { CardAction, CardDescription, CardHeader, CardTitle } from './card.parts.js';
|
|
7
|
+
export type { CardProps } from './card.parts.js';
|
|
8
|
+
export interface CardRootProps extends CardProps {
|
|
9
|
+
/** `sm` 12/14 padding (default), `md` 16/20 for a card that leads a page. */
|
|
10
|
+
padding?: 'sm' | 'md';
|
|
11
|
+
/** Hover border and a focus ring that follows a `[data-card-activator]` inside. */
|
|
12
|
+
interactive?: boolean;
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
/** `loading`, `empty` and `error` swap the body of a direct CardContent child; `stale` badges the footer. */
|
|
15
|
+
state?: CardState;
|
|
16
|
+
/** Bodies for those states: loading placeholder, empty body, error with Retry. */
|
|
17
|
+
fallback?: CardFallback;
|
|
18
|
+
/** Reserved height, so switching state never moves the layout. */
|
|
19
|
+
minHeight?: number | string;
|
|
20
|
+
}
|
|
21
|
+
export declare const Card: React.ForwardRefExoticComponent<CardRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export declare const CardContent: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
/** Bottom row; put a `CardMeta` inside for source, last update, stale and refresh. */
|
|
24
|
+
export declare const CardFooter: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAClF,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,6EAA6E;IAC7E,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,mFAAmF;IACnF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6GAA6G;IAC7G,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;AAwDD,eAAO,MAAM,IAAI,sFAmChB,CAAC;AAGF,eAAO,MAAM,WAAW,kFAMvB,CAAC;AAGF,sFAAsF;AACtF,eAAO,MAAM,UAAU,kFAWtB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import { cardSurface as t } from "./card-base.js";
|
|
3
|
+
import { CardAnnounce as n, CardMeta as r, CardStateBody as i } from "./card-state.js";
|
|
4
|
+
import { CardAction as a, CardDescription as o, CardHeader as s, CardTitle as c } from "./card.parts.js";
|
|
5
|
+
import * as l from "react";
|
|
6
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
7
|
+
// src/components/card.tsx
|
|
8
|
+
var p = (e) => l.isValidElement(e), m = (e) => {
|
|
9
|
+
for (let t of l.Children.toArray(e)) {
|
|
10
|
+
if (!p(t)) continue;
|
|
11
|
+
if (t.type === c && typeof t.props.children == "string") return t.props.children;
|
|
12
|
+
let e = m(t.props.children);
|
|
13
|
+
if (e) return e;
|
|
14
|
+
}
|
|
15
|
+
}, h = (e) => {
|
|
16
|
+
let t = !1, n = l.Children.map(e.props.children, (e) => !p(e) || e.type !== r ? e : (t = !0, l.cloneElement(e, { stale: !0 })));
|
|
17
|
+
return l.cloneElement(e, {}, n, t ? null : /* @__PURE__ */ d(r, { stale: !0 }));
|
|
18
|
+
}, g = (e, t, n) => {
|
|
19
|
+
let a = t === "loading" || t === "empty" || t === "error" ? /* @__PURE__ */ d(i, {
|
|
20
|
+
state: t,
|
|
21
|
+
fallback: n
|
|
22
|
+
}) : null, o = !1, s = !1, c = l.Children.map(e, (e) => p(e) ? e.type === v && a ? (o = !0, l.cloneElement(e, { children: a })) : e.type === y && t === "stale" ? (s = !0, h(e)) : e : e);
|
|
23
|
+
return /* @__PURE__ */ f(u, { children: [
|
|
24
|
+
c,
|
|
25
|
+
a && !o && a,
|
|
26
|
+
t === "stale" && !s && /* @__PURE__ */ d(r, { stale: !0 })
|
|
27
|
+
] });
|
|
28
|
+
}, _ = l.forwardRef(({ className: r, children: i, padding: a = "sm", interactive: o = !1, selected: s = !1, state: c, fallback: l, minHeight: u, style: p, ...h }, _) => /* @__PURE__ */ f("div", {
|
|
29
|
+
ref: _,
|
|
30
|
+
"data-slot": "card",
|
|
31
|
+
"data-selected": s || void 0,
|
|
32
|
+
"data-state": c,
|
|
33
|
+
"aria-busy": c === "loading" || void 0,
|
|
34
|
+
style: u === void 0 ? p : {
|
|
35
|
+
minHeight: u,
|
|
36
|
+
...p
|
|
37
|
+
},
|
|
38
|
+
className: e(t({ padding: a }), o && "cursor-pointer transition-colors duration-fast hover:border-muted-foreground focus-ring has-[[data-card-activator]:focus-visible]:outline-2 has-[[data-card-activator]:focus-visible]:outline-ring has-[[data-card-activator]:focus-visible]:-outline-offset-2", s && "border-primary hover:border-primary", r),
|
|
39
|
+
...h,
|
|
40
|
+
children: [c === void 0 ? i : g(i, c, l), c !== void 0 && /* @__PURE__ */ d(n, {
|
|
41
|
+
state: c,
|
|
42
|
+
label: m(i)
|
|
43
|
+
})]
|
|
44
|
+
}));
|
|
45
|
+
_.displayName = "Card";
|
|
46
|
+
var v = l.forwardRef(({ className: t, children: n, ...r }, i) => /* @__PURE__ */ d("div", {
|
|
47
|
+
ref: i,
|
|
48
|
+
"data-slot": "card-content",
|
|
49
|
+
className: e("flex-1 text-ui", t),
|
|
50
|
+
...r,
|
|
51
|
+
children: n
|
|
52
|
+
}));
|
|
53
|
+
v.displayName = "CardContent";
|
|
54
|
+
var y = l.forwardRef(({ className: t, children: n, ...r }, i) => /* @__PURE__ */ d("div", {
|
|
55
|
+
ref: i,
|
|
56
|
+
"data-slot": "card-footer",
|
|
57
|
+
className: e("flex flex-col items-start gap-1.5", t),
|
|
58
|
+
...r,
|
|
59
|
+
children: n
|
|
60
|
+
}));
|
|
61
|
+
y.displayName = "CardFooter";
|
|
62
|
+
export { _ as Card, a as CardAction, v as CardContent, o as CardDescription, y as CardFooter, s as CardHeader, r as CardMeta, c as CardTitle };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare const CardHeader: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export declare const CardTitle: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export declare const CardDescription: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export declare const CardAction: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
//# sourceMappingURL=card.parts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.parts.d.ts","sourceRoot":"","sources":["../../src/components/card.parts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACrE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,UAAU,kFAWtB,CAAC;AAGF,eAAO,MAAM,SAAS,kFAWrB,CAAC;AAGF,eAAO,MAAM,eAAe,kFAW3B,CAAC;AAGF,eAAO,MAAM,UAAU,kFAWtB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
// src/components/card.parts.tsx
|
|
5
|
+
var r = t.forwardRef(({ className: t, children: r, ...i }, a) => /* @__PURE__ */ n("div", {
|
|
6
|
+
ref: a,
|
|
7
|
+
"data-slot": "card-header",
|
|
8
|
+
className: e("grid auto-rows-min grid-cols-[1fr_auto] items-start gap-1", t),
|
|
9
|
+
...i,
|
|
10
|
+
children: r
|
|
11
|
+
}));
|
|
12
|
+
r.displayName = "CardHeader";
|
|
13
|
+
var i = t.forwardRef(({ className: t, children: r, ...i }, a) => /* @__PURE__ */ n("div", {
|
|
14
|
+
ref: a,
|
|
15
|
+
"data-slot": "card-title",
|
|
16
|
+
className: e("text-ui leading-5 font-semibold", t),
|
|
17
|
+
...i,
|
|
18
|
+
children: r
|
|
19
|
+
}));
|
|
20
|
+
i.displayName = "CardTitle";
|
|
21
|
+
var a = t.forwardRef(({ className: t, children: r, ...i }, a) => /* @__PURE__ */ n("div", {
|
|
22
|
+
ref: a,
|
|
23
|
+
"data-slot": "card-description",
|
|
24
|
+
className: e("text-xs text-muted-foreground", t),
|
|
25
|
+
...i,
|
|
26
|
+
children: r
|
|
27
|
+
}));
|
|
28
|
+
a.displayName = "CardDescription";
|
|
29
|
+
var o = t.forwardRef(({ className: t, children: r, ...i }, a) => /* @__PURE__ */ n("div", {
|
|
30
|
+
ref: a,
|
|
31
|
+
"data-slot": "card-action",
|
|
32
|
+
className: e("col-start-2 row-span-2 row-start-1 self-start justify-self-end", t),
|
|
33
|
+
...i,
|
|
34
|
+
children: r
|
|
35
|
+
}));
|
|
36
|
+
o.displayName = "CardAction";
|
|
37
|
+
export { o as CardAction, a as CardDescription, r as CardHeader, i as CardTitle };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CheckStatus } from './check-list.parts.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type { CheckStatus } from './check-list.parts.js';
|
|
4
|
+
export { checkSummary } from './status-glyph.status.js';
|
|
5
|
+
export interface CheckListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
6
|
+
/** Header row title, for example "Checks". */
|
|
7
|
+
title?: React.ReactNode;
|
|
8
|
+
/** Header summary; `true` (default) counts the rows: "6 of 6 passed", or "1 of 3" for checkboxes. */
|
|
9
|
+
summary?: React.ReactNode | true;
|
|
10
|
+
/** `card` (default): bordered card with a 36 px header. `plain`: rows under a small label. */
|
|
11
|
+
variant?: 'card' | 'plain';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A list of checks: 36 px status rows (glyph, label, quiet value) or, when the items carry
|
|
15
|
+
* `onCheckedChange`, 28 px checkbox rows that strike through when done.
|
|
16
|
+
*/
|
|
17
|
+
export declare const CheckList: React.ForwardRefExoticComponent<CheckListProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export interface CheckItemProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, 'value'> {
|
|
19
|
+
label: React.ReactNode;
|
|
20
|
+
status?: CheckStatus;
|
|
21
|
+
/** Right-aligned muted text: "fixed", "2 min 04 s", "41 of 41". */
|
|
22
|
+
value?: React.ReactNode;
|
|
23
|
+
/** With `onCheckedChange` the row is a 28 px checkbox row instead of a status row. */
|
|
24
|
+
checked?: boolean;
|
|
25
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** One row of a CheckList; children become a detail that expands under the row. */
|
|
29
|
+
export declare const CheckItem: React.ForwardRefExoticComponent<CheckItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
30
|
+
//# sourceMappingURL=check-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-list.d.ts","sourceRoot":"","sources":["../../src/components/check-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAmC,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGvF,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzF,8CAA8C;IAC9C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,qGAAqG;IACrG,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IACjC,8FAA8F;IAC9F,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,uFAuCrB,CAAC;AAGF,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAC1F,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,mEAAmE;IACnE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAID,mFAAmF;AACnF,eAAO,MAAM,SAAS,sFAwFrB,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { Disclosure as t, DisclosureChevron as n } from "./disclosure.js";
|
|
4
|
+
import { StatusGlyph as r } from "./status-glyph.js";
|
|
5
|
+
import { CheckboxRow as i, glyphOf as a, summaryOf as o } from "./check-list.parts.js";
|
|
6
|
+
import { checkSummary as s, normalizeRowStatus as c } from "./status-glyph.status.js";
|
|
7
|
+
import * as l from "react";
|
|
8
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
|
+
// src/components/check-list.tsx
|
|
10
|
+
var p = l.forwardRef(({ title: t, summary: n = !0, variant: r = "card", className: i, children: a, ...s }, c) => {
|
|
11
|
+
let l = n === !0 ? o(a) : n, u = r === "plain";
|
|
12
|
+
return /* @__PURE__ */ f("div", {
|
|
13
|
+
ref: c,
|
|
14
|
+
className: e("flex min-w-0 flex-col", r === "card" && "overflow-hidden rounded-lg border border-border bg-card", i),
|
|
15
|
+
"data-slot": "check-list",
|
|
16
|
+
...s,
|
|
17
|
+
children: [t !== void 0 && /* @__PURE__ */ f("div", {
|
|
18
|
+
className: u ? "mb-1 flex h-5 items-center gap-1.5 text-2xs font-semibold uppercase tracking-wider text-muted-foreground" : "flex h-9 items-center gap-2 border-b border-border px-3 text-ui",
|
|
19
|
+
"data-slot": "check-list-head",
|
|
20
|
+
children: [/* @__PURE__ */ d("span", {
|
|
21
|
+
className: u ? void 0 : "font-semibold",
|
|
22
|
+
children: t
|
|
23
|
+
}), /* @__PURE__ */ d("span", {
|
|
24
|
+
className: u ? void 0 : "ml-auto text-xs text-muted-foreground",
|
|
25
|
+
children: l
|
|
26
|
+
})]
|
|
27
|
+
}), /* @__PURE__ */ d("ul", {
|
|
28
|
+
className: e("m-0 flex list-none flex-col p-0", !u && "divide-y divide-border"),
|
|
29
|
+
"aria-label": typeof t == "string" ? t : void 0,
|
|
30
|
+
children: a
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
p.displayName = "CheckList";
|
|
35
|
+
var m = "flex min-h-9 w-full items-center gap-2.5 px-3 py-1.5 text-left text-ui", h = l.forwardRef(({ label: o, status: s = "ok", value: p, checked: h, onCheckedChange: g, disabled: _, className: v, children: y, ...b }, x) => {
|
|
36
|
+
let [S, C] = l.useState(!1), w = l.useId(), T = y != null && y !== !1;
|
|
37
|
+
if (g) return /* @__PURE__ */ d("li", {
|
|
38
|
+
ref: x,
|
|
39
|
+
className: e("min-w-0", v),
|
|
40
|
+
"data-slot": "check-item",
|
|
41
|
+
"data-state": h ? "checked" : "unchecked",
|
|
42
|
+
...b,
|
|
43
|
+
children: /* @__PURE__ */ d(i, {
|
|
44
|
+
label: o,
|
|
45
|
+
checked: h,
|
|
46
|
+
onCheckedChange: g,
|
|
47
|
+
disabled: _
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
let E = /* @__PURE__ */ f(u, { children: [
|
|
51
|
+
/* @__PURE__ */ d(r, { ...a(s) }),
|
|
52
|
+
/* @__PURE__ */ d("span", {
|
|
53
|
+
className: e("min-w-0 flex-1 truncate", s === "skipped" && "text-muted-foreground"),
|
|
54
|
+
children: o
|
|
55
|
+
}),
|
|
56
|
+
p !== void 0 && /* @__PURE__ */ d("span", {
|
|
57
|
+
className: "shrink-0 text-xs text-muted-foreground",
|
|
58
|
+
"data-slot": "check-item-value",
|
|
59
|
+
children: p
|
|
60
|
+
}),
|
|
61
|
+
T && /* @__PURE__ */ d(n, { open: S })
|
|
62
|
+
] });
|
|
63
|
+
return /* @__PURE__ */ f("li", {
|
|
64
|
+
ref: x,
|
|
65
|
+
className: e("min-w-0", v),
|
|
66
|
+
"data-slot": "check-item",
|
|
67
|
+
"data-status": c(s),
|
|
68
|
+
...b,
|
|
69
|
+
children: [T ? /* @__PURE__ */ d("button", {
|
|
70
|
+
type: "button",
|
|
71
|
+
className: e(m, "transition-colors duration-fast hover:bg-accent focus-ring", "hover:[--color-muted-foreground:color-mix(in_oklab,var(--color-foreground)_72%,var(--color-accent))]"),
|
|
72
|
+
"aria-expanded": S,
|
|
73
|
+
"aria-controls": w,
|
|
74
|
+
onClick: () => C(!S),
|
|
75
|
+
children: E
|
|
76
|
+
}) : /* @__PURE__ */ d("div", {
|
|
77
|
+
className: m,
|
|
78
|
+
children: E
|
|
79
|
+
}), T && /* @__PURE__ */ d(t, {
|
|
80
|
+
id: w,
|
|
81
|
+
open: S,
|
|
82
|
+
className: "px-3 pb-2.5 pl-[36px] text-xs text-muted-foreground wrap-anywhere",
|
|
83
|
+
children: y
|
|
84
|
+
})]
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
h.displayName = "CheckItem";
|
|
88
|
+
export { h as CheckItem, p as CheckList, s as checkSummary };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StatusGlyphProps } from './status-glyph.js';
|
|
2
|
+
import { RowStatus, RowStatusAlias } from './status-glyph.status.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
/** Status of a CheckItem; the shared row vocabulary plus its aliases. */
|
|
5
|
+
export type CheckStatus = RowStatus | RowStatusAlias;
|
|
6
|
+
export declare const glyphOf: (status: CheckStatus) => StatusGlyphProps;
|
|
7
|
+
/** Status rows count "6 of 6 passed"; checkbox rows count "1 of 3". */
|
|
8
|
+
export declare const summaryOf: (children: React.ReactNode) => string;
|
|
9
|
+
export interface CheckboxRowProps {
|
|
10
|
+
label: React.ReactNode;
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** 28 px checkbox row; a done row is muted and struck through. */
|
|
16
|
+
export declare const CheckboxRow: ({ label, checked, onCheckedChange, disabled, }: CheckboxRowProps) => React.JSX.Element;
|
|
17
|
+
//# sourceMappingURL=check-list.parts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-list.parts.d.ts","sourceRoot":"","sources":["../../src/components/check-list.parts.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAE/B,yEAAyE;AACzE,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,cAAc,CAAC;AAUrD,eAAO,MAAM,OAAO,GAAI,QAAQ,WAAW,KAAG,gBAG7C,CAAC;AASF,uEAAuE;AACvE,eAAO,MAAM,SAAS,GAAI,UAAU,KAAK,CAAC,SAAS,KAAG,MAKrD,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,kEAAkE;AAClE,eAAO,MAAM,WAAW,GAAI,gDAKzB,gBAAgB,sBAsBlB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { Checkbox as t } from "./checkbox.js";
|
|
4
|
+
import { ROW_STATUS_GLYPH as n, checkSummary as r, normalizeRowStatus as i } from "./status-glyph.status.js";
|
|
5
|
+
import * as a from "react";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
// src/components/check-list.parts.tsx
|
|
8
|
+
var c = {
|
|
9
|
+
ok: "Passed",
|
|
10
|
+
error: "Failed",
|
|
11
|
+
pending: "Pending",
|
|
12
|
+
running: "Running",
|
|
13
|
+
skipped: "Skipped"
|
|
14
|
+
}, l = (e) => {
|
|
15
|
+
let t = i(e);
|
|
16
|
+
return {
|
|
17
|
+
...n[t],
|
|
18
|
+
label: c[t]
|
|
19
|
+
};
|
|
20
|
+
}, u = (e) => a.Children.toArray(e).filter(a.isValidElement).map((e) => e.props), d = (e) => {
|
|
21
|
+
let t = u(e);
|
|
22
|
+
return t.some((e) => e.onCheckedChange !== void 0) ? `${String(t.filter((e) => e.checked).length)} of ${String(t.length)}` : r(t.map((e) => e.status ?? "ok"));
|
|
23
|
+
}, f = ({ label: n, checked: r = !1, onCheckedChange: i, disabled: c }) => {
|
|
24
|
+
let l = a.useId();
|
|
25
|
+
return /* @__PURE__ */ s("div", {
|
|
26
|
+
className: "flex h-7 items-center gap-2 text-ui",
|
|
27
|
+
children: [/* @__PURE__ */ o(t, {
|
|
28
|
+
id: l,
|
|
29
|
+
size: "sm",
|
|
30
|
+
checked: r,
|
|
31
|
+
onCheckedChange: (e) => i?.(e),
|
|
32
|
+
disabled: c
|
|
33
|
+
}), /* @__PURE__ */ o("label", {
|
|
34
|
+
htmlFor: l,
|
|
35
|
+
className: e("min-w-0 flex-1 cursor-pointer select-none truncate transition-colors duration-fast", r && "text-muted-foreground line-through"),
|
|
36
|
+
children: n
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
export { f as CheckboxRow, l as glyphOf, d as summaryOf };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const checkboxVariants: (props?: ({
|
|
3
|
+
marked?: boolean | null | undefined;
|
|
4
|
+
error?: boolean | null | undefined;
|
|
5
|
+
disabled?: boolean | null | undefined;
|
|
6
|
+
size?: "sm" | "md" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
export interface CheckboxProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'value'> {
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
/** Uncontrolled start state. */
|
|
11
|
+
defaultChecked?: boolean;
|
|
12
|
+
/** Renders the mixed state (`aria-checked="mixed"`) and sets it on the hidden native input. */
|
|
13
|
+
indeterminate?: boolean;
|
|
14
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
15
|
+
/** Submitted with the surrounding form via a hidden native input. */
|
|
16
|
+
name?: string;
|
|
17
|
+
value?: string;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
error?: boolean;
|
|
20
|
+
/** `md` (default) 16 px; `sm` 13 px for dense rows and checklists. */
|
|
21
|
+
size?: 'sm' | 'md';
|
|
22
|
+
}
|
|
23
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
24
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,gBAAgB;;;;;8EAqB5B,CAAC;AAEF,MAAM,WAAW,aAAc,SAAQ,IAAI,CACzC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,UAAU,GAAG,OAAO,CACrB;IACC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gCAAgC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,+FAA+F;IAC/F,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,qEAAqE;IACrE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sEAAsE;IACtE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAiCD,eAAO,MAAM,QAAQ,yFAiFnB,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useControlled as e } from "../lib/use-controlled.js";
|
|
3
|
+
import { cn as t } from "../lib/utils.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import { cva as r } from "class-variance-authority";
|
|
6
|
+
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
// src/components/checkbox.tsx
|
|
8
|
+
var s = r(["flex size-4 shrink-0 items-center justify-center rounded border transition-colors", "focus-ring"], {
|
|
9
|
+
variants: {
|
|
10
|
+
marked: {
|
|
11
|
+
true: "border-primary bg-primary text-primary-foreground",
|
|
12
|
+
false: "border-muted-foreground/50 bg-background hover:border-muted-foreground"
|
|
13
|
+
},
|
|
14
|
+
error: {
|
|
15
|
+
true: "border-destructive",
|
|
16
|
+
false: ""
|
|
17
|
+
},
|
|
18
|
+
disabled: {
|
|
19
|
+
true: "cursor-not-allowed opacity-50",
|
|
20
|
+
false: ""
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
md: "",
|
|
24
|
+
sm: "size-[13px] rounded-[3px] [&_svg]:size-[9px]"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
marked: !1,
|
|
29
|
+
error: !1,
|
|
30
|
+
disabled: !1,
|
|
31
|
+
size: "md"
|
|
32
|
+
}
|
|
33
|
+
}), c = () => /* @__PURE__ */ a("svg", {
|
|
34
|
+
width: "12",
|
|
35
|
+
height: "12",
|
|
36
|
+
viewBox: "0 0 24 24",
|
|
37
|
+
fill: "none",
|
|
38
|
+
stroke: "currentColor",
|
|
39
|
+
strokeWidth: "3",
|
|
40
|
+
strokeLinecap: "round",
|
|
41
|
+
strokeLinejoin: "round",
|
|
42
|
+
"aria-hidden": "true",
|
|
43
|
+
children: /* @__PURE__ */ a("polyline", { points: "20 6 9 17 4 12" })
|
|
44
|
+
}), l = () => /* @__PURE__ */ a("svg", {
|
|
45
|
+
width: "12",
|
|
46
|
+
height: "12",
|
|
47
|
+
viewBox: "0 0 24 24",
|
|
48
|
+
fill: "none",
|
|
49
|
+
stroke: "currentColor",
|
|
50
|
+
strokeWidth: "3",
|
|
51
|
+
strokeLinecap: "round",
|
|
52
|
+
"aria-hidden": "true",
|
|
53
|
+
children: /* @__PURE__ */ a("line", {
|
|
54
|
+
x1: "5",
|
|
55
|
+
y1: "12",
|
|
56
|
+
x2: "19",
|
|
57
|
+
y2: "12"
|
|
58
|
+
})
|
|
59
|
+
}), u = n.forwardRef((r, u) => {
|
|
60
|
+
let { checked: d, defaultChecked: f = !1, indeterminate: p = !1, onCheckedChange: m, disabled: h = !1, error: g = !1, size: _ = "md", className: v, name: y, value: b = "on", required: x, onClick: S, onKeyDown: C, ...w } = r, T = Object.prototype.hasOwnProperty.call(r, "checked"), E = n.useRef(null), [D, O] = e(T ? d ?? !1 : void 0, f, m);
|
|
61
|
+
return n.useEffect(() => {
|
|
62
|
+
E.current && (E.current.indeterminate = p);
|
|
63
|
+
}, [p]), /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a("button", {
|
|
64
|
+
ref: u,
|
|
65
|
+
type: "button",
|
|
66
|
+
role: "checkbox",
|
|
67
|
+
"aria-checked": p ? "mixed" : D,
|
|
68
|
+
"aria-required": x,
|
|
69
|
+
"aria-invalid": g || void 0,
|
|
70
|
+
disabled: h,
|
|
71
|
+
onClick: (e) => {
|
|
72
|
+
S?.(e), h || O(!D);
|
|
73
|
+
},
|
|
74
|
+
onKeyDown: (e) => {
|
|
75
|
+
C?.(e), (e.key === " " || e.key === "Enter") && (e.preventDefault(), h || O(!D));
|
|
76
|
+
},
|
|
77
|
+
"data-slot": "checkbox",
|
|
78
|
+
"data-state": p ? "indeterminate" : D ? "checked" : "unchecked",
|
|
79
|
+
className: t(s({
|
|
80
|
+
marked: D || p,
|
|
81
|
+
error: g,
|
|
82
|
+
disabled: h,
|
|
83
|
+
size: _,
|
|
84
|
+
className: v
|
|
85
|
+
})),
|
|
86
|
+
...w,
|
|
87
|
+
children: p ? /* @__PURE__ */ a(l, {}) : D && /* @__PURE__ */ a(c, {})
|
|
88
|
+
}), y && /* @__PURE__ */ a("input", {
|
|
89
|
+
ref: E,
|
|
90
|
+
type: "checkbox",
|
|
91
|
+
name: y,
|
|
92
|
+
value: b,
|
|
93
|
+
checked: D,
|
|
94
|
+
required: x,
|
|
95
|
+
disabled: h,
|
|
96
|
+
readOnly: !0,
|
|
97
|
+
tabIndex: -1,
|
|
98
|
+
"aria-hidden": "true",
|
|
99
|
+
className: "sr-only pointer-events-none absolute"
|
|
100
|
+
})] });
|
|
101
|
+
});
|
|
102
|
+
u.displayName = "Checkbox";
|
|
103
|
+
export { u as Checkbox, s as checkboxVariants };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const chipVariants: (props?: ({
|
|
4
|
+
variant?: "success" | "warning" | "destructive" | "info" | "default" | "secondary" | "outline" | null | undefined;
|
|
5
|
+
size?: "sm" | "md" | null | undefined;
|
|
6
|
+
pressed?: boolean | null | undefined;
|
|
7
|
+
interactive?: boolean | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export interface ChipProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'onClick'>, Omit<VariantProps<typeof chipVariants>, 'pressed' | 'interactive'> {
|
|
10
|
+
/** Makes the chip a toggle button (`aria-pressed`), for example "Needs you". */
|
|
11
|
+
pressed?: boolean;
|
|
12
|
+
onRemove?: () => void;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
removeLabel?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLSpanElement>>;
|
|
17
|
+
//# sourceMappingURL=chip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../src/components/chip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,eAAO,MAAM,YAAY;;;;;8EA4CxB,CAAC;AAiBF,MAAM,WAAW,SACf,SACE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC,EACtD,IAAI,CAAC,YAAY,CAAC,OAAO,YAAY,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IACpE,gFAAgF;IAChF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,IAAI,mFA0EhB,CAAC"}
|