@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,91 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { OverlayLayerProvider as t } from "../lib/overlay-layer.js";
|
|
4
|
+
import { Button as n } from "./button.js";
|
|
5
|
+
import { DialogBackdrop as r, DialogPortal as i, useDialogShell as a } from "./dialog-shell.js";
|
|
6
|
+
import { DialogPhrase as o } from "./dialog.phrase.js";
|
|
7
|
+
import { useCallback as s, useEffect as c, useId as l, useRef as u, useState as d } from "react";
|
|
8
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
9
|
+
// src/components/dialog.confirm.tsx
|
|
10
|
+
var m = ({ open: m, onOpenChange: h, title: g, description: _, onConfirm: v, confirmLabel: y = "Confirm", tone: b = "default", confirmText: x, pending: S = !1, children: C, className: w, ...T }) => {
|
|
11
|
+
let E = u(null), D = l(), O = `${D}-title`, k = `${D}-desc`, A = s(() => h(!1), [h]), [j, M] = d(!1), [N, P] = d(""), [F, I] = d(m);
|
|
12
|
+
m !== F && (I(m), m || P(""));
|
|
13
|
+
let L = async () => {
|
|
14
|
+
let e = v();
|
|
15
|
+
if (!e || typeof e.then != "function") h(!1);
|
|
16
|
+
else {
|
|
17
|
+
M(!0);
|
|
18
|
+
try {
|
|
19
|
+
await e, h(!1);
|
|
20
|
+
} catch {} finally {
|
|
21
|
+
M(!1);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}, { mounted: R, layer: z } = a(E, m, A);
|
|
25
|
+
return c(() => {
|
|
26
|
+
m && R && E.current?.querySelector("[data-cancel]")?.focus();
|
|
27
|
+
}, [m, R]), !m || !R ? null : /* @__PURE__ */ f(i, { children: /* @__PURE__ */ f(t, {
|
|
28
|
+
layer: z,
|
|
29
|
+
children: /* @__PURE__ */ p("div", {
|
|
30
|
+
className: "fixed inset-0 z-[var(--z-overlay,50)] flex items-center justify-center p-4",
|
|
31
|
+
"data-slot": "dialog",
|
|
32
|
+
children: [/* @__PURE__ */ f(r, {
|
|
33
|
+
layer: z,
|
|
34
|
+
onClick: A
|
|
35
|
+
}), /* @__PURE__ */ p("div", {
|
|
36
|
+
ref: E,
|
|
37
|
+
role: "alertdialog",
|
|
38
|
+
"aria-modal": "true",
|
|
39
|
+
"aria-labelledby": g == null ? void 0 : O,
|
|
40
|
+
"aria-describedby": _ == null ? void 0 : k,
|
|
41
|
+
className: e("relative z-10 w-full max-w-md rounded-lg border border-border bg-background p-4 shadow-[var(--shadow-popover)]", w),
|
|
42
|
+
"data-slot": "dialog-content",
|
|
43
|
+
...T,
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ f("h2", {
|
|
46
|
+
id: O,
|
|
47
|
+
className: "m-0 text-sm font-semibold text-foreground",
|
|
48
|
+
children: g
|
|
49
|
+
}),
|
|
50
|
+
_ != null && /* @__PURE__ */ f("p", {
|
|
51
|
+
id: k,
|
|
52
|
+
className: "mt-1.5 text-ui text-muted-foreground",
|
|
53
|
+
children: _
|
|
54
|
+
}),
|
|
55
|
+
C != null && /* @__PURE__ */ f("div", {
|
|
56
|
+
className: "mt-4",
|
|
57
|
+
children: C
|
|
58
|
+
}),
|
|
59
|
+
x != null && /* @__PURE__ */ f("div", {
|
|
60
|
+
className: "mt-4",
|
|
61
|
+
children: /* @__PURE__ */ f(o, {
|
|
62
|
+
phrase: x,
|
|
63
|
+
value: N,
|
|
64
|
+
onChange: P,
|
|
65
|
+
confirmLabel: y
|
|
66
|
+
})
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ p("div", {
|
|
69
|
+
className: "mt-4 flex justify-end gap-2",
|
|
70
|
+
children: [/* @__PURE__ */ f(n, {
|
|
71
|
+
type: "button",
|
|
72
|
+
variant: "outline",
|
|
73
|
+
"data-cancel": !0,
|
|
74
|
+
onClick: A,
|
|
75
|
+
children: "Cancel"
|
|
76
|
+
}), /* @__PURE__ */ f(n, {
|
|
77
|
+
type: "button",
|
|
78
|
+
variant: b === "destructive" ? "destructive" : "default",
|
|
79
|
+
disabled: x != null && N !== x,
|
|
80
|
+
pending: S || j,
|
|
81
|
+
"data-slot": "dialog-confirm",
|
|
82
|
+
onClick: () => void L(),
|
|
83
|
+
children: y
|
|
84
|
+
})]
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
})]
|
|
88
|
+
})
|
|
89
|
+
}) });
|
|
90
|
+
};
|
|
91
|
+
export { m as ConfirmDialog };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface DialogProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
title?: ReactNode;
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Makes it a confirm dialog with Cancel and Confirm. A returned promise keeps it open with a
|
|
9
|
+
* pending confirm; it closes on resolve only.
|
|
10
|
+
*/
|
|
11
|
+
onConfirm?: () => void | Promise<unknown>;
|
|
12
|
+
/** Confirm button text. Default `Confirm`. */
|
|
13
|
+
confirmLabel?: string;
|
|
14
|
+
/** Colour of the confirm button. */
|
|
15
|
+
tone?: 'default' | 'destructive';
|
|
16
|
+
/** A phrase the user must retype before Confirm is enabled, usually the resource name. */
|
|
17
|
+
confirmText?: string;
|
|
18
|
+
/** Confirm in flight from the caller's own state. */
|
|
19
|
+
pending?: boolean;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/** A centred modal dialog; with `onConfirm` it is a confirm dialog with a safe default. */
|
|
23
|
+
export declare const Dialog: (props: DialogProps) => React.JSX.Element | null;
|
|
24
|
+
export type DialogFooterProps = React.HTMLAttributes<HTMLDivElement>;
|
|
25
|
+
/** Action row at the bottom of a plain dialog body, bleeding to the panel edges. */
|
|
26
|
+
export declare const DialogFooter: ({ className, ...props }: DialogFooterProps) => React.JSX.Element;
|
|
27
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA8B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAYnE,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IACtF,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1C,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,IAAI,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IACjC,0FAA0F;IAC1F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,2FAA2F;AAC3F,eAAO,MAAM,MAAM,GAAI,OAAO,WAAW,KAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAK7D,CAAC;AA8DJ,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAErE,oFAAoF;AACpF,eAAO,MAAM,YAAY,GAAI,yBAAyB,iBAAiB,KAAG,KAAK,CAAC,GAAG,CAAC,OASnF,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { OverlayLayerProvider as t } from "../lib/overlay-layer.js";
|
|
4
|
+
import { DialogBackdrop as n, DialogClose as r, DialogPortal as i, DialogTitleBar as a, useDialogShell as o } from "./dialog-shell.js";
|
|
5
|
+
import { ConfirmDialog as s } from "./dialog.confirm.js";
|
|
6
|
+
import { useCallback as c, useId as l, useRef as u } from "react";
|
|
7
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
+
// src/components/dialog.tsx
|
|
9
|
+
var p = (e) => e.onConfirm ? /* @__PURE__ */ d(s, {
|
|
10
|
+
...e,
|
|
11
|
+
onConfirm: e.onConfirm
|
|
12
|
+
}) : /* @__PURE__ */ d(m, { ...e }), m = ({ open: s, onOpenChange: p, title: m, description: h, onConfirm: g, confirmLabel: _, tone: v, confirmText: y, pending: b, children: x, className: S, ...C }) => {
|
|
13
|
+
let w = c(() => p(!1), [p]), T = u(null), E = l(), D = `${E}-title`, O = `${E}-desc`, { mounted: k, layer: A } = o(T, s, w);
|
|
14
|
+
return !s || !k ? null : /* @__PURE__ */ d(i, { children: /* @__PURE__ */ d(t, {
|
|
15
|
+
layer: A,
|
|
16
|
+
children: /* @__PURE__ */ f("div", {
|
|
17
|
+
className: "fixed inset-0 z-[var(--z-overlay,50)] flex items-center justify-center p-4",
|
|
18
|
+
"data-slot": "dialog",
|
|
19
|
+
children: [/* @__PURE__ */ d(n, {
|
|
20
|
+
layer: A,
|
|
21
|
+
onClick: w
|
|
22
|
+
}), /* @__PURE__ */ f("div", {
|
|
23
|
+
ref: T,
|
|
24
|
+
role: "dialog",
|
|
25
|
+
"aria-modal": "true",
|
|
26
|
+
"aria-labelledby": m == null ? void 0 : D,
|
|
27
|
+
"aria-describedby": h == null ? void 0 : O,
|
|
28
|
+
tabIndex: -1,
|
|
29
|
+
className: e("relative z-10 w-full rounded-lg border border-border bg-background shadow-[var(--shadow-popover)] outline-none max-w-md", S),
|
|
30
|
+
"data-slot": "dialog-content",
|
|
31
|
+
...C,
|
|
32
|
+
children: [/* @__PURE__ */ d(a, {
|
|
33
|
+
titleId: D,
|
|
34
|
+
title: m,
|
|
35
|
+
descriptionId: O,
|
|
36
|
+
description: h,
|
|
37
|
+
close: /* @__PURE__ */ d(r, {
|
|
38
|
+
label: "Close dialog",
|
|
39
|
+
onClick: w
|
|
40
|
+
})
|
|
41
|
+
}), /* @__PURE__ */ d("div", {
|
|
42
|
+
className: "p-4",
|
|
43
|
+
children: x
|
|
44
|
+
})]
|
|
45
|
+
})]
|
|
46
|
+
})
|
|
47
|
+
}) });
|
|
48
|
+
}, h = ({ className: t, ...n }) => /* @__PURE__ */ d("div", {
|
|
49
|
+
"data-slot": "dialog-footer",
|
|
50
|
+
className: e("flex items-center justify-end gap-2 border-t border-border -mx-4 -mb-4 mt-4 px-4 py-3 bg-muted/30 rounded-b-lg", t),
|
|
51
|
+
...n
|
|
52
|
+
});
|
|
53
|
+
export { p as Dialog, h as DialogFooter };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface DialogPhraseProps {
|
|
2
|
+
phrase: string;
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
confirmLabel: string;
|
|
6
|
+
}
|
|
7
|
+
/** The retype-to-confirm field of a confirm dialog, with a live match hint. */
|
|
8
|
+
export declare const DialogPhrase: ({ phrase, value, onChange, confirmLabel }: DialogPhraseProps) => import('react').JSX.Element;
|
|
9
|
+
//# sourceMappingURL=dialog.phrase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.phrase.d.ts","sourceRoot":"","sources":["../../src/components/dialog.phrase.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,+EAA+E;AAC/E,eAAO,MAAM,YAAY,GAAI,2CAA2C,iBAAiB,gCA8BxF,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { Input as t } from "./input.js";
|
|
4
|
+
import { Label as n } from "./label.js";
|
|
5
|
+
import { useId as r } from "react";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
// src/components/dialog.phrase.tsx
|
|
8
|
+
var o = ({ phrase: o, value: s, onChange: c, confirmLabel: l }) => {
|
|
9
|
+
let u = r(), d = `${u}-confirm-input`, f = `${u}-confirm-hint`, p = s === o;
|
|
10
|
+
return /* @__PURE__ */ a("div", {
|
|
11
|
+
"data-slot": "dialog-phrase",
|
|
12
|
+
className: "space-y-2",
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ a(n, {
|
|
15
|
+
htmlFor: d,
|
|
16
|
+
children: [
|
|
17
|
+
"Type ",
|
|
18
|
+
/* @__PURE__ */ i("span", {
|
|
19
|
+
className: "font-mono font-semibold text-foreground",
|
|
20
|
+
children: o
|
|
21
|
+
}),
|
|
22
|
+
" to confirm"
|
|
23
|
+
]
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ i(t, {
|
|
26
|
+
id: d,
|
|
27
|
+
value: s,
|
|
28
|
+
onChange: (e) => c(e.target.value),
|
|
29
|
+
autoComplete: "off",
|
|
30
|
+
spellCheck: !1,
|
|
31
|
+
"aria-describedby": f,
|
|
32
|
+
"data-slot": "dialog-phrase-input"
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ i("p", {
|
|
35
|
+
id: f,
|
|
36
|
+
"aria-live": "polite",
|
|
37
|
+
className: e("text-xs", p ? "text-success" : "text-muted-foreground"),
|
|
38
|
+
children: p ? `Phrase matches - ${l} is enabled.` : `Enter the exact phrase to enable ${l}.`
|
|
39
|
+
})
|
|
40
|
+
]
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
export { o as DialogPhrase };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface DirtyBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
3
|
+
/** Shows the bar. It overlays the bottom of the nearest positioned ancestor. */
|
|
4
|
+
dirty: boolean;
|
|
5
|
+
/** Save is in flight: actions are blocked but keep focus, and Save is announced as `labels.pending`. */
|
|
6
|
+
pending?: boolean;
|
|
7
|
+
onSave: () => void;
|
|
8
|
+
onDiscard: () => void;
|
|
9
|
+
/** Second mode: the user tried to leave with unsaved changes. Focus moves to Stay. */
|
|
10
|
+
leaving?: boolean;
|
|
11
|
+
onStay?: () => void;
|
|
12
|
+
/** Leave and drop the changes. */
|
|
13
|
+
onLeave?: () => void;
|
|
14
|
+
/** Copy overrides, for example a translation. */
|
|
15
|
+
labels?: Partial<DirtyBarLabels>;
|
|
16
|
+
}
|
|
17
|
+
export interface DirtyBarLabels {
|
|
18
|
+
message: React.ReactNode;
|
|
19
|
+
leaveMessage: React.ReactNode;
|
|
20
|
+
save: string;
|
|
21
|
+
discard: string;
|
|
22
|
+
pending: string;
|
|
23
|
+
stay: string;
|
|
24
|
+
leave: string;
|
|
25
|
+
/** Save in leave mode; it calls `onSave` and the caller continues the navigation. */
|
|
26
|
+
saveAndLeave: string;
|
|
27
|
+
}
|
|
28
|
+
/** Floating "Unsaved changes" bar with Save and Discard, plus a leave-confirm mode. */
|
|
29
|
+
export declare const DirtyBar: React.ForwardRefExoticComponent<DirtyBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
//# sourceMappingURL=dirty-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dirty-bar.d.ts","sourceRoot":"","sources":["../../src/components/dirty-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC3F,gFAAgF;IAChF,KAAK,EAAE,OAAO,CAAC;IACf,wGAAwG;IACxG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,iDAAiD;IACjD,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,qFAAqF;IACrF,YAAY,EAAE,MAAM,CAAC;CACtB;AA4DD,uFAAuF;AACvF,eAAO,MAAM,QAAQ,sFAmGpB,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { Button as t } from "./button.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
// src/components/dirty-bar.tsx
|
|
7
|
+
var o = {
|
|
8
|
+
message: "Unsaved changes",
|
|
9
|
+
leaveMessage: "Leave without saving?",
|
|
10
|
+
save: "Save",
|
|
11
|
+
discard: "Discard",
|
|
12
|
+
pending: "Saving",
|
|
13
|
+
stay: "Stay",
|
|
14
|
+
leave: "Discard and leave",
|
|
15
|
+
saveAndLeave: "Save and leave"
|
|
16
|
+
}, s = "translate-y-0 opacity-100 [transition:opacity_160ms,translate_160ms]", c = "invisible translate-y-3 opacity-0 [transition:opacity_160ms,translate_160ms,visibility_0s_160ms]", l = "bg-transparent shadow-none hover:bg-foreground/5 dark:bg-transparent dark:hover:bg-foreground/5", u = (e) => {
|
|
17
|
+
let t = n.useRef(null);
|
|
18
|
+
return n.useEffect(() => {
|
|
19
|
+
e && t.current?.focus({ preventScroll: !0 });
|
|
20
|
+
}, [e]), t;
|
|
21
|
+
}, d = (e, t) => {
|
|
22
|
+
let r = n.useRef(null), i = n.useRef(null), a = n.useRef(null), o = n.useRef(!1);
|
|
23
|
+
return n.useLayoutEffect(() => {
|
|
24
|
+
if (!o.current) return;
|
|
25
|
+
let t = document.activeElement, n = !t || t === document.body || !r.current?.contains(t);
|
|
26
|
+
e && n && i.current?.focus({ preventScroll: !0 }), e || (o.current = !1, a.current?.isConnected && a.current.focus({ preventScroll: !0 }));
|
|
27
|
+
}, [e, t]), {
|
|
28
|
+
bar: r,
|
|
29
|
+
save: i,
|
|
30
|
+
handlers: {
|
|
31
|
+
onFocus: (e) => {
|
|
32
|
+
let t = e.relatedTarget;
|
|
33
|
+
t && !r.current?.contains(t) && (a.current = t), o.current = !0;
|
|
34
|
+
},
|
|
35
|
+
onBlur: (e) => {
|
|
36
|
+
let t = e.relatedTarget;
|
|
37
|
+
t && !r.current?.contains(t) && (o.current = !1);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}, f = n.forwardRef(({ dirty: f, pending: p = !1, onSave: m, onDiscard: h, leaving: g = !1, onStay: _, onLeave: v, labels: y, className: b, "aria-label": x, ...S }, C) => {
|
|
42
|
+
let w = f || g, T = {
|
|
43
|
+
...o,
|
|
44
|
+
...y
|
|
45
|
+
}, E = u(g), { bar: D, save: O, handlers: k } = d(w, g);
|
|
46
|
+
return n.useImperativeHandle(C, () => D.current), /* @__PURE__ */ a("div", {
|
|
47
|
+
ref: D,
|
|
48
|
+
role: "region",
|
|
49
|
+
"aria-label": x ?? "Unsaved changes",
|
|
50
|
+
"aria-hidden": !w || void 0,
|
|
51
|
+
"aria-busy": p || void 0,
|
|
52
|
+
inert: !w,
|
|
53
|
+
className: e("absolute bottom-3.5 left-1/2 z-[var(--z-sticky,40)] flex min-h-11 w-[min(560px,calc(100%-24px))] -translate-x-1/2 flex-wrap items-center gap-2.5", "rounded-lg border border-l-3 border-border border-l-primary bg-accent py-1.5 pl-3.5 pr-2 text-ui text-foreground shadow-[var(--shadow-popover)]", "motion-reduce:transition-none", w ? s : c, b),
|
|
54
|
+
"data-slot": "dirty-bar",
|
|
55
|
+
"data-state": g ? "leaving" : w ? "dirty" : "clean",
|
|
56
|
+
...S,
|
|
57
|
+
onFocus: k.onFocus,
|
|
58
|
+
onBlur: k.onBlur,
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ i("span", {
|
|
61
|
+
className: "size-2 shrink-0 rounded-full bg-primary",
|
|
62
|
+
"aria-hidden": "true"
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ i("span", {
|
|
65
|
+
className: e("min-w-0 flex-1", g && "font-semibold"),
|
|
66
|
+
children: g ? T.leaveMessage : T.message
|
|
67
|
+
}),
|
|
68
|
+
g ? /* @__PURE__ */ a(r, { children: [
|
|
69
|
+
/* @__PURE__ */ i(t, {
|
|
70
|
+
ref: E,
|
|
71
|
+
variant: "outline",
|
|
72
|
+
size: "md",
|
|
73
|
+
onClick: _,
|
|
74
|
+
children: T.stay
|
|
75
|
+
}, "stay"),
|
|
76
|
+
/* @__PURE__ */ i(t, {
|
|
77
|
+
variant: "outline",
|
|
78
|
+
size: "md",
|
|
79
|
+
onClick: p ? void 0 : v,
|
|
80
|
+
"aria-disabled": p || void 0,
|
|
81
|
+
children: T.leave
|
|
82
|
+
}, "leave"),
|
|
83
|
+
/* @__PURE__ */ i(t, {
|
|
84
|
+
size: "md",
|
|
85
|
+
onClick: m,
|
|
86
|
+
pending: p,
|
|
87
|
+
"aria-label": p ? T.pending : void 0,
|
|
88
|
+
children: T.saveAndLeave
|
|
89
|
+
}, "save-leave")
|
|
90
|
+
] }) : /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(t, {
|
|
91
|
+
variant: "outline",
|
|
92
|
+
size: "md",
|
|
93
|
+
className: l,
|
|
94
|
+
onClick: p ? void 0 : h,
|
|
95
|
+
"aria-disabled": p || void 0,
|
|
96
|
+
children: T.discard
|
|
97
|
+
}, "discard"), /* @__PURE__ */ i(t, {
|
|
98
|
+
ref: O,
|
|
99
|
+
size: "md",
|
|
100
|
+
onClick: m,
|
|
101
|
+
pending: p,
|
|
102
|
+
"aria-label": p ? T.pending : void 0,
|
|
103
|
+
children: T.save
|
|
104
|
+
}, "save")] })
|
|
105
|
+
]
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
f.displayName = "DirtyBar";
|
|
109
|
+
export { f as DirtyBar };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** Height animates through grid rows 0fr to 1fr; instant under reduced motion. */
|
|
3
|
+
export declare const DISCLOSURE_BODY = "grid transition-[grid-template-rows,opacity,visibility] duration-normal ease-out motion-reduce:transition-none data-[state=closed]:invisible data-[state=closed]:grid-rows-[0fr] data-[state=open]:grid-rows-[1fr]";
|
|
4
|
+
export interface DisclosureProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
open: boolean;
|
|
6
|
+
/** Also fades the content out while it shuts. */
|
|
7
|
+
fade?: boolean;
|
|
8
|
+
/** Lets the body shrink below its content, for example inside a table cell. */
|
|
9
|
+
shrink?: boolean;
|
|
10
|
+
/** Classes of the outer animated box; `className` styles the content box. */
|
|
11
|
+
bodyClassName?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Animated collapse body: always mounted, so nodes and focus targets keep their identity;
|
|
15
|
+
* `inert` keeps a shut body out of the tab order and the accessibility tree; `visibility` flips
|
|
16
|
+
* hidden once the height transition ends, so the clipped content is not painted or hit-tested.
|
|
17
|
+
*/
|
|
18
|
+
export declare const Disclosure: React.ForwardRefExoticComponent<DisclosureProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
export interface DisclosureChevronProps extends React.SVGAttributes<SVGSVGElement> {
|
|
20
|
+
open: boolean;
|
|
21
|
+
}
|
|
22
|
+
/** 12 px chevron that points right when shut and down when open. */
|
|
23
|
+
export declare const DisclosureChevron: ({ open, className, ...props }: DisclosureChevronProps) => React.JSX.Element;
|
|
24
|
+
//# sourceMappingURL=disclosure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disclosure.d.ts","sourceRoot":"","sources":["../../src/components/disclosure.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,kFAAkF;AAClF,eAAO,MAAM,eAAe,uNAC0L,CAAC;AAEvN,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,IAAI,EAAE,OAAO,CAAC;IACd,iDAAiD;IACjD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,+EAA+E;IAC/E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,wFAqBtB,CAAC;AAGF,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC;IAChF,IAAI,EAAE,OAAO,CAAC;CACf;AAED,oEAAoE;AACpE,eAAO,MAAM,iBAAiB,GAAI,+BAA+B,sBAAsB,sBAmBtF,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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/disclosure.tsx
|
|
5
|
+
var r = "grid transition-[grid-template-rows,opacity,visibility] duration-normal ease-out motion-reduce:transition-none data-[state=closed]:invisible data-[state=closed]:grid-rows-[0fr] data-[state=open]:grid-rows-[1fr]", i = t.forwardRef(({ open: t, fade: i = !1, shrink: a = !1, bodyClassName: o, className: s, children: c, ...l }, u) => /* @__PURE__ */ n("div", {
|
|
6
|
+
ref: u,
|
|
7
|
+
"data-state": t ? "open" : "closed",
|
|
8
|
+
inert: !t,
|
|
9
|
+
className: e(r, i && "data-[state=closed]:opacity-0", a && "grid-cols-[minmax(0,1fr)]", o),
|
|
10
|
+
"data-slot": "disclosure",
|
|
11
|
+
...l,
|
|
12
|
+
children: /* @__PURE__ */ n("div", {
|
|
13
|
+
className: "min-h-0 overflow-clip",
|
|
14
|
+
children: /* @__PURE__ */ n("div", {
|
|
15
|
+
className: s,
|
|
16
|
+
children: c
|
|
17
|
+
})
|
|
18
|
+
})
|
|
19
|
+
}));
|
|
20
|
+
i.displayName = "Disclosure";
|
|
21
|
+
var a = ({ open: t, className: r, ...i }) => /* @__PURE__ */ n("svg", {
|
|
22
|
+
viewBox: "0 0 24 24",
|
|
23
|
+
fill: "none",
|
|
24
|
+
stroke: "currentColor",
|
|
25
|
+
strokeWidth: "2",
|
|
26
|
+
strokeLinecap: "round",
|
|
27
|
+
strokeLinejoin: "round",
|
|
28
|
+
"aria-hidden": "true",
|
|
29
|
+
className: e("size-3 shrink-0 text-muted-foreground transition-transform duration-fast motion-reduce:transition-none", t && "rotate-90", r),
|
|
30
|
+
"data-slot": "disclosure-chevron",
|
|
31
|
+
...i,
|
|
32
|
+
children: /* @__PURE__ */ n("path", { d: "m9 18 6-6-6-6" })
|
|
33
|
+
});
|
|
34
|
+
export { r as DISCLOSURE_BODY, i as Disclosure, a as DisclosureChevron };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface DropdownMenuProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
trigger: ReactNode;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
align?: 'start' | 'center' | 'end';
|
|
6
|
+
side?: 'bottom' | 'top';
|
|
7
|
+
/** Plain items close the menu on click; checkbox and radio items never do by default. */
|
|
8
|
+
closeOnSelect?: boolean;
|
|
9
|
+
open?: boolean;
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const DropdownMenu: ({ trigger, children, align, side, closeOnSelect, open: openProp, defaultOpen, onOpenChange, className, ...props }: DropdownMenuProps) => React.JSX.Element;
|
|
14
|
+
export { DropdownMenuCheckboxItem, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, } from './dropdown-menu.items.js';
|
|
15
|
+
export type { DropdownMenuCheckboxItemProps, DropdownMenuItemProps, DropdownMenuLabelProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuSeparatorProps, } from './dropdown-menu.items.js';
|
|
16
|
+
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../src/components/dropdown-menu.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAyD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAc9F,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC7E,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACnC,IAAI,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IACxB,yFAAyF;IACzF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED,eAAO,MAAM,YAAY,GAAI,mHAW1B,iBAAiB,KAAG,KAAK,CAAC,GAAG,CAAC,OAwGhC,CAAC;AAEF,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,6BAA6B,EAC7B,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MenuItemProps, MenuLabelProps, MenuSeparatorProps } from './menu.parts.js';
|
|
2
|
+
import { MenuCheckboxItemProps, MenuRadioGroupProps, MenuRadioItemProps } from './menu.selectable.js';
|
|
3
|
+
export type DropdownMenuItemProps = MenuItemProps;
|
|
4
|
+
export declare const DropdownMenuItem: (props: DropdownMenuItemProps) => React.JSX.Element;
|
|
5
|
+
export type DropdownMenuSeparatorProps = MenuSeparatorProps;
|
|
6
|
+
export declare const DropdownMenuSeparator: (props: DropdownMenuSeparatorProps) => React.JSX.Element;
|
|
7
|
+
export type DropdownMenuLabelProps = MenuLabelProps;
|
|
8
|
+
export declare const DropdownMenuLabel: (props: DropdownMenuLabelProps) => React.JSX.Element;
|
|
9
|
+
export type DropdownMenuCheckboxItemProps = MenuCheckboxItemProps;
|
|
10
|
+
export declare const DropdownMenuCheckboxItem: (props: DropdownMenuCheckboxItemProps) => React.JSX.Element;
|
|
11
|
+
export type DropdownMenuRadioGroupProps = MenuRadioGroupProps;
|
|
12
|
+
export declare const DropdownMenuRadioGroup: (props: DropdownMenuRadioGroupProps) => React.JSX.Element;
|
|
13
|
+
export type DropdownMenuRadioItemProps = MenuRadioItemProps;
|
|
14
|
+
export declare const DropdownMenuRadioItem: (props: DropdownMenuRadioItemProps) => React.JSX.Element;
|
|
15
|
+
//# sourceMappingURL=dropdown-menu.items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.items.d.ts","sourceRoot":"","sources":["../../src/components/dropdown-menu.items.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC;AAElD,eAAO,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,KAAG,KAAK,CAAC,GAAG,CAAC,OAEzE,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,kBAAkB,CAAC;AAE5D,eAAO,MAAM,qBAAqB,GAAI,OAAO,0BAA0B,KAAG,KAAK,CAAC,GAAG,CAAC,OAEnF,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC;AAEpD,eAAO,MAAM,iBAAiB,GAAI,OAAO,sBAAsB,KAAG,KAAK,CAAC,GAAG,CAAC,OAE3E,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,qBAAqB,CAAC;AAElE,eAAO,MAAM,wBAAwB,GACnC,OAAO,6BAA6B,KACnC,KAAK,CAAC,GAAG,CAAC,OAAkF,CAAC;AAEhG,MAAM,MAAM,2BAA2B,GAAG,mBAAmB,CAAC;AAE9D,eAAO,MAAM,sBAAsB,GAAI,OAAO,2BAA2B,KAAG,KAAK,CAAC,GAAG,CAAC,OAErF,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,kBAAkB,CAAC;AAE5D,eAAO,MAAM,qBAAqB,GAAI,OAAO,0BAA0B,KAAG,KAAK,CAAC,GAAG,CAAC,OAEnF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { MenuItem as e, MenuLabel as t, MenuSeparator as n } from "./menu.parts.js";
|
|
3
|
+
import { MenuCheckboxItem as r, MenuRadioGroup as i, MenuRadioItem as a } from "./menu.selectable.js";
|
|
4
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
5
|
+
// src/components/dropdown-menu.items.tsx
|
|
6
|
+
var s = (t) => /* @__PURE__ */ o(e, {
|
|
7
|
+
"data-slot": "dropdown-menu-item",
|
|
8
|
+
...t
|
|
9
|
+
}), c = (e) => /* @__PURE__ */ o(n, {
|
|
10
|
+
"data-slot": "dropdown-menu-separator",
|
|
11
|
+
...e
|
|
12
|
+
}), l = (e) => /* @__PURE__ */ o(t, {
|
|
13
|
+
"data-slot": "dropdown-menu-label",
|
|
14
|
+
...e
|
|
15
|
+
}), u = (e) => /* @__PURE__ */ o(r, {
|
|
16
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
17
|
+
...e
|
|
18
|
+
}), d = (e) => /* @__PURE__ */ o(i, {
|
|
19
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
20
|
+
...e
|
|
21
|
+
}), f = (e) => /* @__PURE__ */ o(a, {
|
|
22
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
23
|
+
...e
|
|
24
|
+
});
|
|
25
|
+
export { u as DropdownMenuCheckboxItem, s as DropdownMenuItem, l as DropdownMenuLabel, d as DropdownMenuRadioGroup, f as DropdownMenuRadioItem, c as DropdownMenuSeparator };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { OverlayLayerProvider as e, isTopLayer as t, useOverlayLayer as n } from "../lib/overlay-layer.js";
|
|
3
|
+
import { useAnchorPosition as r } from "../lib/use-anchor-position.js";
|
|
4
|
+
import { useControlled as i } from "../lib/use-controlled.js";
|
|
5
|
+
import { useMounted as a } from "../lib/use-mounted.js";
|
|
6
|
+
import { cn as o } from "../lib/utils.js";
|
|
7
|
+
import { menuContentVariants as s } from "./menu.variants.js";
|
|
8
|
+
import { MenuCloseContext as c, focusMenuItem as l, handleMenuKeyDown as u } from "./menu.parts.js";
|
|
9
|
+
import { DropdownMenuCheckboxItem as d, DropdownMenuItem as f, DropdownMenuLabel as p, DropdownMenuRadioGroup as m, DropdownMenuRadioItem as h, DropdownMenuSeparator as g } from "./dropdown-menu.items.js";
|
|
10
|
+
import { isValidElement as _, useCallback as v, useEffect as y, useId as b, useRef as x } from "react";
|
|
11
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
12
|
+
import { Slot as w } from "@radix-ui/react-slot";
|
|
13
|
+
import { createPortal as T } from "react-dom";
|
|
14
|
+
// src/components/dropdown-menu.tsx
|
|
15
|
+
var E = (e) => typeof e.type != "string" || e.type === "button" || e.type === "a", D = ({ trigger: d, children: f, align: p = "end", side: m = "bottom", closeOnSelect: h = !0, open: g, defaultOpen: D = !1, onOpenChange: O, className: k, ...A }) => {
|
|
16
|
+
let [j, M] = i(g, D, O), N = x(null), P = x(null), F = x(null), I = a(), L = `${b()}-menu`, R = j && I, { top: z, left: B } = r(N, P, R, {
|
|
17
|
+
side: m,
|
|
18
|
+
align: p,
|
|
19
|
+
offset: 6,
|
|
20
|
+
margin: 4
|
|
21
|
+
}), V = v((e = !0) => {
|
|
22
|
+
M(!1), e && (F.current ?? N.current?.querySelector("[data-slot=\"dropdown-menu-trigger\"]"))?.focus();
|
|
23
|
+
}, [M]), H = n(R, {
|
|
24
|
+
refs: [N, P],
|
|
25
|
+
onEscape: V,
|
|
26
|
+
onOutside: () => V(!1)
|
|
27
|
+
}), U = () => {
|
|
28
|
+
F.current = N.current?.querySelector("[data-slot=\"dropdown-menu-trigger\"]") ?? document.activeElement, M(!0);
|
|
29
|
+
};
|
|
30
|
+
y(() => {
|
|
31
|
+
if (!R) return;
|
|
32
|
+
let e = P.current?.querySelector("[aria-checked=\"true\"]");
|
|
33
|
+
e ? e.focus() : l(P.current, 0);
|
|
34
|
+
}, [R]);
|
|
35
|
+
let W = (e) => {
|
|
36
|
+
e.key === "ArrowDown" || !j && (e.key === "Enter" || e.key === " ") ? (e.preventDefault(), j ? l(P.current, 0) : U()) : e.key === "Escape" && j && t(H) && (e.preventDefault(), e.stopPropagation(), V());
|
|
37
|
+
}, G = _(d) && E(d), K = G ? w : "button";
|
|
38
|
+
return /* @__PURE__ */ S(c.Provider, {
|
|
39
|
+
value: {
|
|
40
|
+
close: V,
|
|
41
|
+
closeOnSelect: h
|
|
42
|
+
},
|
|
43
|
+
children: /* @__PURE__ */ C("div", {
|
|
44
|
+
ref: N,
|
|
45
|
+
className: "relative inline-flex",
|
|
46
|
+
"data-slot": "dropdown-menu",
|
|
47
|
+
children: [/* @__PURE__ */ S(K, {
|
|
48
|
+
...G ? {} : { type: "button" },
|
|
49
|
+
"aria-haspopup": "menu",
|
|
50
|
+
"aria-expanded": j,
|
|
51
|
+
"aria-controls": j ? L : void 0,
|
|
52
|
+
"data-slot": "dropdown-menu-trigger",
|
|
53
|
+
onClick: () => {
|
|
54
|
+
j ? V(!1) : U();
|
|
55
|
+
},
|
|
56
|
+
onKeyDown: W,
|
|
57
|
+
children: d
|
|
58
|
+
}), R && T(/* @__PURE__ */ S(e, {
|
|
59
|
+
layer: H,
|
|
60
|
+
children: /* @__PURE__ */ S("div", {
|
|
61
|
+
ref: P,
|
|
62
|
+
id: L,
|
|
63
|
+
role: "menu",
|
|
64
|
+
tabIndex: -1,
|
|
65
|
+
onKeyDown: (e) => u(e, V, H),
|
|
66
|
+
style: {
|
|
67
|
+
position: "fixed",
|
|
68
|
+
top: z,
|
|
69
|
+
left: B
|
|
70
|
+
},
|
|
71
|
+
className: o(s(), k),
|
|
72
|
+
"data-slot": "dropdown-menu-content",
|
|
73
|
+
...A,
|
|
74
|
+
children: f
|
|
75
|
+
})
|
|
76
|
+
}), document.body)]
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
export { D as DropdownMenu, d as DropdownMenuCheckboxItem, f as DropdownMenuItem, p as DropdownMenuLabel, m as DropdownMenuRadioGroup, h as DropdownMenuRadioItem, g as DropdownMenuSeparator };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.variants.d.ts","sourceRoot":"","sources":["../../src/components/dropdown-menu.variants.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,IAAI,2BAA2B,EAClD,gBAAgB,IAAI,wBAAwB,GAC7C,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { menuContentVariants as dropdownMenuContentVariants, menuItemVariants as dropdownMenuItemVariants } from "./menu.variants.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface EmptyStateProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'children'> {
|
|
3
|
+
icon?: React.ReactNode;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
action?: React.ReactNode;
|
|
7
|
+
/** center (default) for a whole surface; start for a compact, left-aligned block in a list. */
|
|
8
|
+
align?: 'center' | 'start';
|
|
9
|
+
}
|
|
10
|
+
export declare const EmptyState: React.ForwardRefExoticComponent<EmptyStateProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
//# sourceMappingURL=empty-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../src/components/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,OAAO,GAAG,UAAU,CACrB;IACC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,+FAA+F;IAC/F,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,UAAU,wFAyCtB,CAAC"}
|