@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,117 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { Button as t } from "./button.js";
|
|
4
|
+
import { Kbd as n } from "./kbd.js";
|
|
5
|
+
import * as r from "react";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
// src/components/action-bar.parts.tsx
|
|
8
|
+
var o = {
|
|
9
|
+
primary: {
|
|
10
|
+
variant: "default",
|
|
11
|
+
className: ""
|
|
12
|
+
},
|
|
13
|
+
default: {
|
|
14
|
+
variant: "outline",
|
|
15
|
+
className: ""
|
|
16
|
+
},
|
|
17
|
+
destructive: {
|
|
18
|
+
variant: "outline",
|
|
19
|
+
className: "text-destructive hover:text-destructive"
|
|
20
|
+
},
|
|
21
|
+
ghost: {
|
|
22
|
+
variant: "ghost",
|
|
23
|
+
className: "text-muted-foreground hover:text-foreground"
|
|
24
|
+
}
|
|
25
|
+
}, s = r.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ i(n, {
|
|
26
|
+
ref: a,
|
|
27
|
+
"aria-hidden": "true",
|
|
28
|
+
className: e("border-current/35 bg-transparent text-current opacity-80", t),
|
|
29
|
+
...r
|
|
30
|
+
}));
|
|
31
|
+
s.displayName = "ActionKbd";
|
|
32
|
+
var c = r.forwardRef(({ action: n, hotkeys: r = !1, className: c, ...l }, u) => {
|
|
33
|
+
let d = r ? n.kbd : void 0, f = o[n.variant ?? "default"];
|
|
34
|
+
return /* @__PURE__ */ a(t, {
|
|
35
|
+
ref: u,
|
|
36
|
+
variant: f.variant,
|
|
37
|
+
disabled: n.disabled,
|
|
38
|
+
"aria-keyshortcuts": d,
|
|
39
|
+
onClick: n.onSelect,
|
|
40
|
+
className: e("flex-none", f.className, c),
|
|
41
|
+
"data-slot": "action-bar-button",
|
|
42
|
+
"data-action": n.id,
|
|
43
|
+
...l,
|
|
44
|
+
children: [
|
|
45
|
+
n.icon,
|
|
46
|
+
n.label,
|
|
47
|
+
d && /* @__PURE__ */ i(s, { children: d })
|
|
48
|
+
]
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
c.displayName = "ActionButton";
|
|
52
|
+
var l = (e) => {
|
|
53
|
+
let t = getComputedStyle(e), n = Array.from(e.children), r = parseFloat(t.columnGap) || 0;
|
|
54
|
+
return (parseFloat(t.paddingLeft) || 0) + (parseFloat(t.paddingRight) || 0) + n.reduce((e, t) => e + t.offsetWidth, 0) + r * Math.max(0, n.length - 1);
|
|
55
|
+
}, u = (e, t) => {
|
|
56
|
+
let [n, i] = r.useState({
|
|
57
|
+
key: t,
|
|
58
|
+
level: 0
|
|
59
|
+
});
|
|
60
|
+
n.key !== t && i({
|
|
61
|
+
key: t,
|
|
62
|
+
level: 0
|
|
63
|
+
});
|
|
64
|
+
let a = n.key === t ? n.level : 0, o = r.useRef({});
|
|
65
|
+
return r.useLayoutEffect(() => {
|
|
66
|
+
let n = e.current;
|
|
67
|
+
if (!n) return;
|
|
68
|
+
let r = l(n);
|
|
69
|
+
o.current[`${t}:${String(a)}`] = r, r > n.clientWidth + 1 && a < 3 && i({
|
|
70
|
+
key: t,
|
|
71
|
+
level: a + 1
|
|
72
|
+
});
|
|
73
|
+
}, [
|
|
74
|
+
e,
|
|
75
|
+
a,
|
|
76
|
+
t
|
|
77
|
+
]), r.useEffect(() => {
|
|
78
|
+
let n = e.current;
|
|
79
|
+
if (!n || typeof ResizeObserver > "u") return;
|
|
80
|
+
let r = new ResizeObserver(() => {
|
|
81
|
+
let e = n.clientWidth, r = [
|
|
82
|
+
0,
|
|
83
|
+
1,
|
|
84
|
+
2,
|
|
85
|
+
3
|
|
86
|
+
].filter((e) => o.current[`${t}:${String(e)}`] !== void 0), a = r.find((n) => o.current[`${t}:${String(n)}`] <= e + 1);
|
|
87
|
+
i({
|
|
88
|
+
key: t,
|
|
89
|
+
level: a ?? Math.min(3, (r.at(-1) ?? -1) + 1)
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
return r.observe(n), () => r.disconnect();
|
|
93
|
+
}, [e, t]), a;
|
|
94
|
+
}, d = (e) => e instanceof HTMLElement && (e.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)), f = (e, t) => {
|
|
95
|
+
if (!(e instanceof Element)) return !1;
|
|
96
|
+
if (e.closest("[role=\"menu\"], [role=\"listbox\"], [role=\"combobox\"]")) return !0;
|
|
97
|
+
let n = e.closest("[role=\"dialog\"], [role=\"alertdialog\"]");
|
|
98
|
+
return n !== null && !(t && n.contains(t));
|
|
99
|
+
}, p = (e, t, n, i) => {
|
|
100
|
+
let a = r.useRef(t);
|
|
101
|
+
r.useLayoutEffect(() => {
|
|
102
|
+
a.current = t;
|
|
103
|
+
}), r.useEffect(() => {
|
|
104
|
+
if (!e) return;
|
|
105
|
+
let t = (e) => {
|
|
106
|
+
if (e.metaKey || e.ctrlKey || e.altKey || e.repeat || d(e.target) || f(e.target, i?.current ?? null)) return;
|
|
107
|
+
let t = a.current.find((t) => t.kbd?.toLowerCase() === e.key.toLowerCase());
|
|
108
|
+
t && !t.disabled && (e.preventDefault(), t.onSelect?.());
|
|
109
|
+
}, r = n?.current ?? document;
|
|
110
|
+
return r.addEventListener("keydown", t), () => r.removeEventListener("keydown", t);
|
|
111
|
+
}, [
|
|
112
|
+
e,
|
|
113
|
+
n,
|
|
114
|
+
i
|
|
115
|
+
]);
|
|
116
|
+
};
|
|
117
|
+
export { c as ActionButton, s as ActionKbd, u as useFitLevel, p as useHotkeys };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "primary" | "success" | "warning" | "destructive" | "info" | "default" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>, VariantProps<typeof alertVariants> {
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
/** Bold first line; accent-coloured in the primary variant. */
|
|
9
|
+
title?: React.ReactNode;
|
|
10
|
+
/** A row of buttons under the message, 8 px apart. */
|
|
11
|
+
actions?: React.ReactNode;
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
closeLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Announces at once (`role="alert"`); pass `role="status"` or `role="note"` for a callout that is there on load. */
|
|
16
|
+
export declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/components/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,eAAO,MAAM,aAAa;;8EAkBzB,CAAC;AAkBF,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;IAC/F,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,sDAAsD;IACtD,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qHAAqH;AACrH,eAAO,MAAM,KAAK,mFAsDjB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { cva as n } from "class-variance-authority";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
// src/components/alert.tsx
|
|
6
|
+
var a = n("flex gap-2.5 rounded-lg border p-3 text-ui [&>svg]:mt-0.5 [&>svg]:size-4 [&>svg]:shrink-0", {
|
|
7
|
+
variants: { variant: {
|
|
8
|
+
default: "border-border bg-card text-card-foreground",
|
|
9
|
+
primary: "border-primary/55 bg-primary/8 text-foreground",
|
|
10
|
+
destructive: "border-destructive/30 bg-destructive/10 text-destructive",
|
|
11
|
+
success: "border-success/30 bg-success/10 text-success",
|
|
12
|
+
warning: "border-warning/30 bg-warning/10 text-warning",
|
|
13
|
+
info: "border-info/30 bg-info/10 text-info"
|
|
14
|
+
} },
|
|
15
|
+
defaultVariants: { variant: "default" }
|
|
16
|
+
}), o = () => /* @__PURE__ */ i("svg", {
|
|
17
|
+
width: "14",
|
|
18
|
+
height: "14",
|
|
19
|
+
viewBox: "0 0 24 24",
|
|
20
|
+
fill: "none",
|
|
21
|
+
stroke: "currentColor",
|
|
22
|
+
strokeWidth: "2",
|
|
23
|
+
strokeLinecap: "round",
|
|
24
|
+
strokeLinejoin: "round",
|
|
25
|
+
children: [/* @__PURE__ */ r("line", {
|
|
26
|
+
x1: "18",
|
|
27
|
+
y1: "6",
|
|
28
|
+
x2: "6",
|
|
29
|
+
y2: "18"
|
|
30
|
+
}), /* @__PURE__ */ r("line", {
|
|
31
|
+
x1: "6",
|
|
32
|
+
y1: "6",
|
|
33
|
+
x2: "18",
|
|
34
|
+
y2: "18"
|
|
35
|
+
})]
|
|
36
|
+
}), s = t.forwardRef(({ className: t, variant: n, icon: s, title: c, actions: l, onClose: u, closeLabel: d = "Dismiss", children: f, ...p }, m) => /* @__PURE__ */ i("div", {
|
|
37
|
+
ref: m,
|
|
38
|
+
role: "alert",
|
|
39
|
+
"data-slot": "alert",
|
|
40
|
+
className: e(a({
|
|
41
|
+
variant: n,
|
|
42
|
+
className: t
|
|
43
|
+
})),
|
|
44
|
+
...p,
|
|
45
|
+
children: [
|
|
46
|
+
s,
|
|
47
|
+
/* @__PURE__ */ i("div", {
|
|
48
|
+
className: "min-w-0 flex-1",
|
|
49
|
+
children: [
|
|
50
|
+
c && /* @__PURE__ */ r("div", {
|
|
51
|
+
className: e("mb-1 font-semibold", n === "primary" && "text-primary-emphasis"),
|
|
52
|
+
"data-slot": "alert-title",
|
|
53
|
+
children: c
|
|
54
|
+
}),
|
|
55
|
+
f,
|
|
56
|
+
l && /* @__PURE__ */ r("div", {
|
|
57
|
+
className: "mt-2.5 flex flex-wrap items-center gap-2",
|
|
58
|
+
"data-slot": "alert-actions",
|
|
59
|
+
children: l
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
}),
|
|
63
|
+
u && /* @__PURE__ */ r("button", {
|
|
64
|
+
type: "button",
|
|
65
|
+
onClick: u,
|
|
66
|
+
className: e("shrink-0 rounded-sm p-0.5 opacity-60 hover:opacity-100 transition-opacity cursor-pointer", "focus-ring"),
|
|
67
|
+
"aria-label": d,
|
|
68
|
+
children: /* @__PURE__ */ r(o, {})
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
}));
|
|
72
|
+
s.displayName = "Alert";
|
|
73
|
+
export { s as Alert, a as alertVariants };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type AvatarSize = '2xs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
name?: string;
|
|
5
|
+
src?: string;
|
|
6
|
+
alt?: string;
|
|
7
|
+
/** Default `sm` (28 px); `2xs` 18, `xs` 22, `md` 40, `lg` 48 px. */
|
|
8
|
+
size?: AvatarSize;
|
|
9
|
+
/** `muted` and `primary` colour initials; the meaning tones tint a square icon tile. */
|
|
10
|
+
tone?: 'muted' | 'primary' | 'success' | 'warning' | 'destructive' | 'info';
|
|
11
|
+
/** `square`: a rounded square, for services, teams and other non-people. */
|
|
12
|
+
shape?: 'circle' | 'square';
|
|
13
|
+
/** Glyph drawn instead of the initials, sized to 62% of the avatar. */
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare const avatarVariants: (props?: ({
|
|
17
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
18
|
+
tone?: "muted" | "primary" | "success" | "warning" | "destructive" | "info" | null | undefined;
|
|
19
|
+
shape?: "circle" | "square" | null | undefined;
|
|
20
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
21
|
+
export declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/components/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3D,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACvE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,wFAAwF;IACxF,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,GAAG,MAAM,CAAC;IAC5E,4EAA4E;IAC5E,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B,uEAAuE;IACvE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,eAAO,MAAM,cAAc;;;;8EA0C1B,CAAC;AAQF,eAAO,MAAM,MAAM,oFAyDlB,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
6
|
+
// src/components/avatar.tsx
|
|
7
|
+
var i = n(["relative inline-flex shrink-0 items-center justify-center overflow-hidden", "font-semibold leading-none"], {
|
|
8
|
+
variants: {
|
|
9
|
+
size: {
|
|
10
|
+
"2xs": "size-[18px] text-2xs",
|
|
11
|
+
xs: "size-[22px] text-2xs",
|
|
12
|
+
sm: "size-7 text-xs",
|
|
13
|
+
md: "size-10 text-sm",
|
|
14
|
+
lg: "size-12 text-base"
|
|
15
|
+
},
|
|
16
|
+
tone: {
|
|
17
|
+
muted: "bg-muted text-muted-foreground",
|
|
18
|
+
primary: "bg-primary text-primary-foreground font-bold",
|
|
19
|
+
success: "bg-success/10 text-success",
|
|
20
|
+
warning: "bg-warning/10 text-warning",
|
|
21
|
+
destructive: "bg-destructive/10 text-destructive",
|
|
22
|
+
info: "bg-info/10 text-info"
|
|
23
|
+
},
|
|
24
|
+
shape: {
|
|
25
|
+
circle: "rounded-full",
|
|
26
|
+
square: "rounded-md border border-border"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
compoundVariants: [{
|
|
30
|
+
shape: "square",
|
|
31
|
+
tone: [
|
|
32
|
+
"success",
|
|
33
|
+
"warning",
|
|
34
|
+
"destructive",
|
|
35
|
+
"info"
|
|
36
|
+
],
|
|
37
|
+
className: "border-transparent"
|
|
38
|
+
}],
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
size: "sm",
|
|
41
|
+
tone: "muted",
|
|
42
|
+
shape: "circle"
|
|
43
|
+
}
|
|
44
|
+
}), a = (e) => {
|
|
45
|
+
let t = e.trim().split(/\s+/);
|
|
46
|
+
return t.length === 1 ? t[0].charAt(0).toUpperCase() : (t[0].charAt(0) + t[t.length - 1].charAt(0)).toUpperCase();
|
|
47
|
+
}, o = t.forwardRef(({ name: n, src: o, alt: s, size: c = "sm", tone: l, shape: u, icon: d, className: f, "aria-label": p, ...m }, h) => {
|
|
48
|
+
let [g, _] = t.useState(!1), v = t.useRef(null), y = o && !g;
|
|
49
|
+
t.useLayoutEffect(() => {
|
|
50
|
+
let e = v.current;
|
|
51
|
+
e?.complete && e.naturalWidth === 0 && _(!0);
|
|
52
|
+
}, [o]);
|
|
53
|
+
let b = n ? a(n) : "?";
|
|
54
|
+
return /* @__PURE__ */ r("div", {
|
|
55
|
+
ref: h,
|
|
56
|
+
"data-slot": "avatar",
|
|
57
|
+
"aria-label": y ? p : p ?? n,
|
|
58
|
+
role: !y && (p ?? n) ? "img" : m.role,
|
|
59
|
+
className: e(i({
|
|
60
|
+
size: c,
|
|
61
|
+
tone: l,
|
|
62
|
+
shape: u
|
|
63
|
+
}), f),
|
|
64
|
+
"data-shape": u ?? "circle",
|
|
65
|
+
...m,
|
|
66
|
+
children: y ? /* @__PURE__ */ r("img", {
|
|
67
|
+
ref: v,
|
|
68
|
+
src: o,
|
|
69
|
+
alt: s ?? n ?? "Avatar",
|
|
70
|
+
className: "size-full object-cover",
|
|
71
|
+
onError: () => {
|
|
72
|
+
_(!0);
|
|
73
|
+
}
|
|
74
|
+
}) : d ? /* @__PURE__ */ r("span", {
|
|
75
|
+
className: "flex size-[62%] [&_svg]:size-full",
|
|
76
|
+
"aria-hidden": "true",
|
|
77
|
+
children: d
|
|
78
|
+
}) : /* @__PURE__ */ r("span", { children: b })
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
o.displayName = "Avatar";
|
|
82
|
+
export { o as Avatar, i as avatarVariants };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "success" | "warning" | "destructive" | "info" | "default" | "secondary" | "outline" | "solid" | "outline-success" | "outline-primary" | "outline-destructive" | "outline-warning" | "outline-info" | "outline-muted" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & VariantProps<typeof badgeVariants> & {
|
|
7
|
+
/** Count badge: renders the number (solid by default) and nothing at 0. */
|
|
8
|
+
count?: number;
|
|
9
|
+
/** Shows `max+` above this number; default 99. */
|
|
10
|
+
max?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const Badge: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & VariantProps<(props?: ({
|
|
13
|
+
variant?: "success" | "warning" | "destructive" | "info" | "default" | "secondary" | "outline" | "solid" | "outline-success" | "outline-primary" | "outline-destructive" | "outline-warning" | "outline-info" | "outline-muted" | null | undefined;
|
|
14
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & {
|
|
15
|
+
/** Count badge: renders the number (solid by default) and nothing at 0. */
|
|
16
|
+
count?: number;
|
|
17
|
+
/** Shows `max+` above this number; default 99. */
|
|
18
|
+
max?: number;
|
|
19
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
|
20
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/components/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,eAAO,MAAM,aAAa;;8EA4BzB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,GAC5D,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IACnC,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEJ,eAAO,MAAM,KAAK;;;IANd,2EAA2E;YACnE,MAAM;IACd,kDAAkD;UAC5C,MAAM;yCAoBf,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { cva as n } from "class-variance-authority";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
// src/components/badge.tsx
|
|
6
|
+
var i = "gap-1 rounded-full border bg-transparent px-2 font-normal", a = n("inline-flex h-5 items-center whitespace-nowrap rounded-md px-1.5 text-xs leading-none font-medium transition-colors", {
|
|
7
|
+
variants: { variant: {
|
|
8
|
+
default: "bg-primary/10 text-primary-emphasis border border-primary/20",
|
|
9
|
+
secondary: "bg-secondary text-secondary-foreground border border-border",
|
|
10
|
+
destructive: "bg-destructive/10 text-destructive border border-destructive/20",
|
|
11
|
+
success: "bg-success/10 text-success border border-success/20",
|
|
12
|
+
warning: "bg-warning/10 text-warning border border-warning/20",
|
|
13
|
+
info: "bg-info/10 text-info border border-info/20",
|
|
14
|
+
outline: "border border-border text-foreground",
|
|
15
|
+
solid: "min-w-5 justify-center rounded-full border border-transparent bg-primary font-bold text-primary-foreground",
|
|
16
|
+
"outline-success": `${i} border-success/45 text-success`,
|
|
17
|
+
"outline-primary": `${i} border-primary/50 text-primary-emphasis`,
|
|
18
|
+
"outline-destructive": `${i} border-destructive/50 text-destructive`,
|
|
19
|
+
"outline-warning": `${i} border-warning/50 text-warning`,
|
|
20
|
+
"outline-info": `${i} border-info/50 text-info`,
|
|
21
|
+
"outline-muted": `${i} border-border text-muted-foreground`
|
|
22
|
+
} },
|
|
23
|
+
defaultVariants: { variant: "default" }
|
|
24
|
+
}), o = t.forwardRef(({ className: t, variant: n, count: i, max: o = 99, children: s, ...c }, l) => i !== void 0 && i <= 0 ? null : /* @__PURE__ */ r("span", {
|
|
25
|
+
ref: l,
|
|
26
|
+
className: e(a({ variant: n ?? (i === void 0 ? void 0 : "solid") }), t),
|
|
27
|
+
"data-slot": "badge",
|
|
28
|
+
...c,
|
|
29
|
+
children: i === void 0 ? s : i > o ? `${String(o)}+` : i
|
|
30
|
+
}));
|
|
31
|
+
o.displayName = "Badge";
|
|
32
|
+
export { o as Badge, a as badgeVariants };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface BreadcrumbProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
|
+
/** path: monospace segments with slash separators that scroll sideways without a scrollbar. */
|
|
4
|
+
variant?: 'default' | 'path';
|
|
5
|
+
}
|
|
6
|
+
export declare const Breadcrumb: React.ForwardRefExoticComponent<BreadcrumbProps & React.RefAttributes<HTMLElement>>;
|
|
7
|
+
export declare const BreadcrumbList: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLOListElement> & React.RefAttributes<HTMLOListElement>>;
|
|
8
|
+
export declare const BreadcrumbItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLLIElement> & React.RefAttributes<HTMLLIElement>>;
|
|
9
|
+
export declare const BreadcrumbLink: React.ForwardRefExoticComponent<React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement>>;
|
|
10
|
+
export declare const BreadcrumbPage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
export declare const BreadcrumbSeparator: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLLIElement> & React.RefAttributes<HTMLLIElement>>;
|
|
12
|
+
//# sourceMappingURL=breadcrumb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/components/breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACxE,+FAA+F;IAC/F,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC9B;AAGD,eAAO,MAAM,UAAU,qFAWtB,CAAC;AAGF,eAAO,MAAM,cAAc,iHAczB,CAAC;AAGH,eAAO,MAAM,cAAc,2GAS1B,CAAC;AAGF,eAAO,MAAM,cAAc,yHAiBzB,CAAC;AAGH,eAAO,MAAM,cAAc,+GAezB,CAAC;AAGH,eAAO,MAAM,mBAAmB,2GAwB9B,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
// src/components/breadcrumb.tsx
|
|
5
|
+
var a = () => /* @__PURE__ */ r("svg", {
|
|
6
|
+
width: "14",
|
|
7
|
+
height: "14",
|
|
8
|
+
viewBox: "0 0 24 24",
|
|
9
|
+
fill: "none",
|
|
10
|
+
stroke: "currentColor",
|
|
11
|
+
strokeWidth: "2",
|
|
12
|
+
strokeLinecap: "round",
|
|
13
|
+
strokeLinejoin: "round",
|
|
14
|
+
children: /* @__PURE__ */ r("path", { d: "m9 18 6-6-6-6" })
|
|
15
|
+
}), o = t.forwardRef(({ className: t, variant: n = "default", ...i }, a) => /* @__PURE__ */ r("nav", {
|
|
16
|
+
ref: a,
|
|
17
|
+
"aria-label": "Breadcrumb",
|
|
18
|
+
className: e("group/crumb min-w-0", t),
|
|
19
|
+
"data-slot": "breadcrumb",
|
|
20
|
+
"data-variant": n,
|
|
21
|
+
...i
|
|
22
|
+
}));
|
|
23
|
+
o.displayName = "Breadcrumb";
|
|
24
|
+
var s = t.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r("ol", {
|
|
25
|
+
ref: i,
|
|
26
|
+
className: e("flex items-center gap-1.5 text-ui text-muted-foreground", "group-data-[variant=path]/crumb:gap-0.5 group-data-[variant=path]/crumb:overflow-x-auto group-data-[variant=path]/crumb:whitespace-nowrap group-data-[variant=path]/crumb:font-mono group-data-[variant=path]/crumb:[scrollbar-width:none] group-data-[variant=path]/crumb:[&::-webkit-scrollbar]:hidden", t),
|
|
27
|
+
"data-slot": "breadcrumb-list",
|
|
28
|
+
...n
|
|
29
|
+
}));
|
|
30
|
+
s.displayName = "BreadcrumbList";
|
|
31
|
+
var c = t.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r("li", {
|
|
32
|
+
ref: i,
|
|
33
|
+
className: e("inline-flex shrink-0 items-center gap-1.5", t),
|
|
34
|
+
"data-slot": "breadcrumb-item",
|
|
35
|
+
...n
|
|
36
|
+
}));
|
|
37
|
+
c.displayName = "BreadcrumbItem";
|
|
38
|
+
var l = t.forwardRef(({ className: t, children: n, ...i }, a) => /* @__PURE__ */ r("a", {
|
|
39
|
+
ref: a,
|
|
40
|
+
className: e("rounded-md transition-colors hover:text-foreground", "focus-ring", "group-data-[variant=path]/crumb:inline-flex group-data-[variant=path]/crumb:h-7 group-data-[variant=path]/crumb:items-center group-data-[variant=path]/crumb:px-1.5 group-data-[variant=path]/crumb:hover:bg-accent", t),
|
|
41
|
+
"data-slot": "breadcrumb-link",
|
|
42
|
+
...i,
|
|
43
|
+
children: n
|
|
44
|
+
}));
|
|
45
|
+
l.displayName = "BreadcrumbLink";
|
|
46
|
+
var u = t.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r("span", {
|
|
47
|
+
ref: i,
|
|
48
|
+
"aria-current": "page",
|
|
49
|
+
className: e("font-medium text-foreground", "group-data-[variant=path]/crumb:px-1.5 group-data-[variant=path]/crumb:font-normal", t),
|
|
50
|
+
"data-slot": "breadcrumb-page",
|
|
51
|
+
...n
|
|
52
|
+
}));
|
|
53
|
+
u.displayName = "BreadcrumbPage";
|
|
54
|
+
var d = t.forwardRef(({ className: t, children: o, ...s }, c) => /* @__PURE__ */ r("li", {
|
|
55
|
+
ref: c,
|
|
56
|
+
role: "presentation",
|
|
57
|
+
"aria-hidden": "true",
|
|
58
|
+
className: e("shrink-0 text-muted-foreground group-data-[variant=path]/crumb:opacity-60", t),
|
|
59
|
+
"data-slot": "breadcrumb-separator",
|
|
60
|
+
...s,
|
|
61
|
+
children: o ?? /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("span", {
|
|
62
|
+
className: "inline-flex group-data-[variant=path]/crumb:hidden",
|
|
63
|
+
children: /* @__PURE__ */ r(a, {})
|
|
64
|
+
}), /* @__PURE__ */ r("span", {
|
|
65
|
+
className: "hidden group-data-[variant=path]/crumb:inline",
|
|
66
|
+
children: "/"
|
|
67
|
+
})] })
|
|
68
|
+
}));
|
|
69
|
+
d.displayName = "BreadcrumbSeparator";
|
|
70
|
+
export { o as Breadcrumb, c as BreadcrumbItem, l as BreadcrumbLink, s as BreadcrumbList, u as BreadcrumbPage, d as BreadcrumbSeparator };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { buttonVariants } from './button.variants.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export { buttonVariants } from './button.variants.js';
|
|
5
|
+
export type ButtonSize = NonNullable<VariantProps<typeof buttonVariants>['size']>;
|
|
6
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Omit<VariantProps<typeof buttonVariants>, 'size'> {
|
|
7
|
+
/** md 28 px (default), sm 24 px; `icon` 28 and `icon-sm` 24 px squares. */
|
|
8
|
+
size?: 'sm' | 'md' | 'icon' | 'icon-sm' | null;
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Work in flight: keeps focus (`aria-disabled`, clicks and submits blocked), sets `aria-busy`
|
|
12
|
+
* and draws a spinner over the label, so the width never changes. Default false.
|
|
13
|
+
*/
|
|
14
|
+
pending?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAElF,MAAM,WAAW,WACf,SACE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,IAAI,CAAC,YAAY,CAAC,OAAO,cAAc,CAAC,EAAE,MAAM,CAAC;IACnD,2EAA2E;IAC3E,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAaD,eAAO,MAAM,MAAM,uFAmDlB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import { buttonVariants as t } from "./button.variants.js";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import { Slot as o } from "@radix-ui/react-slot";
|
|
6
|
+
// src/components/button.tsx
|
|
7
|
+
var s = () => /* @__PURE__ */ i("svg", {
|
|
8
|
+
viewBox: "0 0 24 24",
|
|
9
|
+
className: "animate-spin fill-none stroke-current stroke-2 motion-reduce:animate-none",
|
|
10
|
+
"aria-hidden": "true",
|
|
11
|
+
"data-slot": "button-spinner",
|
|
12
|
+
children: /* @__PURE__ */ i("path", {
|
|
13
|
+
d: "M12 3a9 9 0 1 0 9 9",
|
|
14
|
+
strokeLinecap: "round"
|
|
15
|
+
})
|
|
16
|
+
}), c = n.forwardRef(({ className: n, variant: c = "default", size: l = "md", asChild: u = !1, pending: d = !1, disabled: f, type: p, onClick: m, children: h, ...g }, _) => {
|
|
17
|
+
let v = u ? o : "button", y = u ? {} : { type: d ? "button" : p ?? "button" };
|
|
18
|
+
return /* @__PURE__ */ i(v, {
|
|
19
|
+
ref: _,
|
|
20
|
+
"data-slot": "button",
|
|
21
|
+
"data-variant": c,
|
|
22
|
+
"data-size": l,
|
|
23
|
+
className: e(t({
|
|
24
|
+
variant: c,
|
|
25
|
+
size: l
|
|
26
|
+
}), d && "relative cursor-default", n),
|
|
27
|
+
disabled: f || void 0,
|
|
28
|
+
"aria-disabled": d || void 0,
|
|
29
|
+
"aria-busy": d || void 0,
|
|
30
|
+
...g,
|
|
31
|
+
...y,
|
|
32
|
+
onClick: d ? void 0 : m,
|
|
33
|
+
children: u || !d ? h : /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i("span", {
|
|
34
|
+
className: "inline-flex items-center gap-[inherit] opacity-0",
|
|
35
|
+
children: h
|
|
36
|
+
}), /* @__PURE__ */ i("span", {
|
|
37
|
+
className: "absolute inset-0 grid place-items-center",
|
|
38
|
+
children: /* @__PURE__ */ i(s, {})
|
|
39
|
+
})] })
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
c.displayName = "Button";
|
|
43
|
+
export { c as Button, t as buttonVariants };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const buttonVariants: (props?: ({
|
|
2
|
+
variant?: "destructive" | "link" | "default" | "secondary" | "outline" | "outline-primary" | "ghost" | null | undefined;
|
|
3
|
+
size?: "sm" | "md" | "icon" | "icon-sm" | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
//# sourceMappingURL=button.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.variants.d.ts","sourceRoot":"","sources":["../../src/components/button.variants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;8EA4B1B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cva as e } from "class-variance-authority";
|
|
2
|
+
// src/components/button.variants.ts
|
|
3
|
+
var t = e("inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-lg text-xs font-medium transition-colors duration-fast disabled:pointer-events-none disabled:opacity-50 aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*=\"size-\"])]:size-4 shrink-0 [&_svg]:shrink-0 focus-ring", {
|
|
4
|
+
variants: {
|
|
5
|
+
variant: {
|
|
6
|
+
default: "bg-primary font-semibold text-primary-foreground hover:bg-primary/90",
|
|
7
|
+
"outline-primary": "border border-primary bg-transparent font-semibold text-primary-emphasis hover:border-primary-hover hover:bg-accent hover:text-primary-hover",
|
|
8
|
+
destructive: "bg-destructive-solid text-on-solid hover:bg-destructive-solid/90",
|
|
9
|
+
outline: "border border-border bg-background hover:bg-accent hover:text-accent-foreground",
|
|
10
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
11
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
12
|
+
link: "text-primary-emphasis underline-offset-4 hover:underline"
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
sm: "h-6 gap-1 px-2 text-xs [&_svg:not([class*=\"size-\"])]:size-3.5",
|
|
16
|
+
md: "h-7 px-2.5 text-ui",
|
|
17
|
+
icon: "size-7",
|
|
18
|
+
"icon-sm": "size-6"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
variant: "default",
|
|
23
|
+
size: "md"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export { t as buttonVariants };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The one card surface: bg-card, 1 px border, radius 8, no shadow, 12/14 padding. */
|
|
2
|
+
export declare const CARD_SURFACE = "flex min-w-0 flex-col gap-2 rounded-lg border border-border bg-card px-3.5 py-3 text-card-foreground";
|
|
3
|
+
/** `md` is the larger 16/20 padding for a card that leads a page. */
|
|
4
|
+
export declare const cardSurface: (props?: ({
|
|
5
|
+
padding?: "sm" | "md" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
/** Hover border and focus ring for a clickable card; the ring follows a `[data-card-activator]`. */
|
|
8
|
+
export declare const CARD_INTERACTIVE = "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";
|
|
9
|
+
export declare const CARD_SELECTED = "border-primary hover:border-primary";
|
|
10
|
+
//# sourceMappingURL=card-base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-base.d.ts","sourceRoot":"","sources":["../../src/components/card-base.ts"],"names":[],"mappings":"AAEA,sFAAsF;AACtF,eAAO,MAAM,YAAY,yGAC+E,CAAC;AAEzG,qEAAqE;AACrE,eAAO,MAAM,WAAW;;8EAGtB,CAAC;AAEH,oGAAoG;AACpG,eAAO,MAAM,gBAAgB,mQACqO,CAAC;AAEnQ,eAAO,MAAM,aAAa,wCAAwC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { cva as e } from "class-variance-authority";
|
|
2
|
+
// src/components/card-base.ts
|
|
3
|
+
var t = "flex min-w-0 flex-col gap-2 rounded-lg border border-border bg-card px-3.5 py-3 text-card-foreground", n = e(t, {
|
|
4
|
+
variants: { padding: {
|
|
5
|
+
sm: "",
|
|
6
|
+
md: "gap-3 px-5 py-4"
|
|
7
|
+
} },
|
|
8
|
+
defaultVariants: { padding: "sm" }
|
|
9
|
+
}), r = "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", i = "border-primary hover:border-primary";
|
|
10
|
+
export { r as CARD_INTERACTIVE, i as CARD_SELECTED, t as CARD_SURFACE, n as cardSurface };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { RelativeTimeValue } from './relative-time.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type CardState = 'ready' | 'loading' | 'empty' | 'error' | 'stale';
|
|
4
|
+
export interface CardError {
|
|
5
|
+
message: React.ReactNode;
|
|
6
|
+
/** Support reference such as a request id; shown mono with a copy button. */
|
|
7
|
+
reference?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Bodies a card shows in place of its content while loading, empty or failed. */
|
|
10
|
+
export interface CardFallback {
|
|
11
|
+
/** Loading placeholder; skeleton bones by default. */
|
|
12
|
+
loading?: React.ReactNode;
|
|
13
|
+
/** Empty body; "No data for this period" by default. */
|
|
14
|
+
empty?: React.ReactNode;
|
|
15
|
+
/** Error body: a message and an optional copyable reference. */
|
|
16
|
+
error?: CardError | React.ReactNode;
|
|
17
|
+
/** Shows Retry in the error body. */
|
|
18
|
+
onRetry?: () => void;
|
|
19
|
+
}
|
|
20
|
+
export interface CardStateBodyProps {
|
|
21
|
+
state: 'loading' | 'empty' | 'error';
|
|
22
|
+
fallback?: CardFallback;
|
|
23
|
+
}
|
|
24
|
+
/** The body a card shows while loading, empty or failed; the frame around it stays put. */
|
|
25
|
+
export declare const CardStateBody: ({ state, fallback }: CardStateBodyProps) => React.JSX.Element;
|
|
26
|
+
/** Announces state changes politely, merged across cards; the first render stays quiet. */
|
|
27
|
+
export declare const CardAnnounce: ({ state, label }: {
|
|
28
|
+
state: CardState;
|
|
29
|
+
label?: string;
|
|
30
|
+
}) => null;
|
|
31
|
+
export interface CardMetaProps {
|
|
32
|
+
/** Where the figures come from, for example a region or a feed. */
|
|
33
|
+
source?: React.ReactNode;
|
|
34
|
+
/** Time of the last update, shown as "Updated 2 min ago". */
|
|
35
|
+
updatedAt?: RelativeTimeValue;
|
|
36
|
+
/** Adds a Stale badge to the meta line. */
|
|
37
|
+
stale?: boolean;
|
|
38
|
+
/** Shows a refresh button at the end of the meta line. */
|
|
39
|
+
onRefresh?: () => void;
|
|
40
|
+
/** Spins the refresh button and ignores presses while true. */
|
|
41
|
+
refreshing?: boolean;
|
|
42
|
+
}
|
|
43
|
+
/** The footer meta line: source, "updated n min ago", a stale badge and a refresh button. */
|
|
44
|
+
export declare const CardMeta: ({ source, updatedAt, stale, onRefresh, refreshing }: CardMetaProps) => React.JSX.Element;
|
|
45
|
+
//# sourceMappingURL=card-state.d.ts.map
|