@nadicodeai/ui 12.1.96 → 12.1.97
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/AGENTS.md +5 -1
- package/dist/components/accordion.d.ts +13 -0
- package/dist/components/accordion.d.ts.map +1 -1
- package/dist/components/accordion.js +13 -0
- package/dist/components/account-menu.d.ts +62 -18
- package/dist/components/account-menu.d.ts.map +1 -1
- package/dist/components/account-menu.js +32 -8
- package/dist/components/action-menu.d.ts +61 -5
- package/dist/components/action-menu.d.ts.map +1 -1
- package/dist/components/action-menu.js +31 -2
- package/dist/components/action-status.d.ts +13 -3
- package/dist/components/action-status.d.ts.map +1 -1
- package/dist/components/action-status.js +13 -3
- package/dist/components/activity-calendar.d.ts +14 -0
- package/dist/components/activity-calendar.d.ts.map +1 -1
- package/dist/components/activity-calendar.js +14 -0
- package/dist/components/activity-feed.d.ts +62 -0
- package/dist/components/activity-feed.d.ts.map +1 -0
- package/dist/components/activity-feed.js +54 -0
- package/dist/components/agent-card.d.ts +15 -0
- package/dist/components/agent-card.d.ts.map +1 -1
- package/dist/components/agent-card.js +15 -0
- package/dist/components/agent-list-row.d.ts +11 -7
- package/dist/components/agent-list-row.d.ts.map +1 -1
- package/dist/components/agent-list-row.js +10 -8
- package/dist/components/agent-orb.d.ts +16 -0
- package/dist/components/agent-orb.d.ts.map +1 -1
- package/dist/components/agent-orb.js +16 -0
- package/dist/components/agent-profile.d.ts +39 -10
- package/dist/components/agent-profile.d.ts.map +1 -1
- package/dist/components/agent-profile.js +39 -10
- package/dist/components/alert-dialog.d.ts +14 -0
- package/dist/components/alert-dialog.d.ts.map +1 -1
- package/dist/components/alert-dialog.js +14 -0
- package/dist/components/alert.d.ts +14 -0
- package/dist/components/alert.d.ts.map +1 -1
- package/dist/components/alert.js +14 -0
- package/dist/components/app-mark.d.ts +14 -4
- package/dist/components/app-mark.d.ts.map +1 -1
- package/dist/components/app-mark.js +13 -3
- package/dist/components/approval-row.d.ts +15 -2
- package/dist/components/approval-row.d.ts.map +1 -1
- package/dist/components/approval-row.js +15 -2
- package/dist/components/aspect-ratio.d.ts +10 -0
- package/dist/components/aspect-ratio.d.ts.map +1 -1
- package/dist/components/aspect-ratio.js +10 -0
- package/dist/components/avatar.d.ts +15 -0
- package/dist/components/avatar.d.ts.map +1 -1
- package/dist/components/avatar.js +15 -0
- package/dist/components/badge.d.ts +11 -1
- package/dist/components/badge.d.ts.map +1 -1
- package/dist/components/badge.js +10 -5
- package/dist/components/brand-field.d.ts +10 -0
- package/dist/components/brand-field.d.ts.map +1 -1
- package/dist/components/brand-field.js +10 -0
- package/dist/components/brand.d.ts +14 -0
- package/dist/components/brand.d.ts.map +1 -1
- package/dist/components/brand.js +14 -0
- package/dist/components/breadcrumb.d.ts +20 -2
- package/dist/components/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb.js +13 -3
- package/dist/components/button-group.d.ts +21 -0
- package/dist/components/button-group.d.ts.map +1 -1
- package/dist/components/button-group.js +21 -0
- package/dist/components/button.d.ts +20 -0
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +20 -0
- package/dist/components/calendar.d.ts +15 -0
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +15 -0
- package/dist/components/card-row.d.ts +15 -5
- package/dist/components/card-row.d.ts.map +1 -1
- package/dist/components/card-row.js +15 -5
- package/dist/components/card.d.ts +16 -0
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +16 -0
- package/dist/components/carousel.d.ts +12 -0
- package/dist/components/carousel.d.ts.map +1 -1
- package/dist/components/carousel.js +12 -0
- package/dist/components/catalog-drawer.d.ts +29 -0
- package/dist/components/catalog-drawer.d.ts.map +1 -0
- package/dist/components/catalog-drawer.js +31 -0
- package/dist/components/catalog-entry.d.ts +49 -26
- package/dist/components/catalog-entry.d.ts.map +1 -1
- package/dist/components/catalog-entry.js +5 -27
- package/dist/components/channel-view.d.ts +23 -0
- package/dist/components/channel-view.d.ts.map +1 -1
- package/dist/components/channel-view.js +13 -4
- package/dist/components/chart-area-stacked.d.ts +11 -1
- package/dist/components/chart-area-stacked.d.ts.map +1 -1
- package/dist/components/chart-area-stacked.js +12 -2
- package/dist/components/chart-bar-horizontal.d.ts +11 -1
- package/dist/components/chart-bar-horizontal.d.ts.map +1 -1
- package/dist/components/chart-bar-horizontal.js +12 -2
- package/dist/components/chart-bar-multiple.d.ts +9 -4
- package/dist/components/chart-bar-multiple.d.ts.map +1 -1
- package/dist/components/chart-bar-multiple.js +10 -5
- package/dist/components/chart-bar-stacked.d.ts +11 -1
- package/dist/components/chart-bar-stacked.d.ts.map +1 -1
- package/dist/components/chart-bar-stacked.js +12 -2
- package/dist/components/chart-card.d.ts +33 -20
- package/dist/components/chart-card.d.ts.map +1 -1
- package/dist/components/chart-card.js +18 -4
- package/dist/components/chart-date-range-control.d.ts +15 -10
- package/dist/components/chart-date-range-control.d.ts.map +1 -1
- package/dist/components/chart-date-range-control.js +14 -10
- package/dist/components/chart-date-range.d.ts.map +1 -1
- package/dist/components/chart-entity-colors.d.ts +7 -0
- package/dist/components/chart-entity-colors.d.ts.map +1 -1
- package/dist/components/chart-entity-colors.js +7 -0
- package/dist/components/chart-sparkline.d.ts +10 -0
- package/dist/components/chart-sparkline.d.ts.map +1 -1
- package/dist/components/chart-sparkline.js +8 -7
- package/dist/components/chart.d.ts +10 -0
- package/dist/components/chart.d.ts.map +1 -1
- package/dist/components/chart.js +10 -0
- package/dist/components/checkbox.d.ts +15 -0
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +15 -0
- package/dist/components/code-block.d.ts +15 -0
- package/dist/components/code-block.d.ts.map +1 -1
- package/dist/components/code-block.js +15 -0
- package/dist/components/collapsible.d.ts +12 -0
- package/dist/components/collapsible.d.ts.map +1 -1
- package/dist/components/collapsible.js +12 -0
- package/dist/components/collection-filters.d.ts +15 -2
- package/dist/components/collection-filters.d.ts.map +1 -1
- package/dist/components/collection-filters.js +13 -1
- package/dist/components/collection-page.d.ts +29 -115
- package/dist/components/collection-page.d.ts.map +1 -1
- package/dist/components/collection-page.js +24 -140
- package/dist/components/collection-search.d.ts +14 -0
- package/dist/components/collection-search.d.ts.map +1 -1
- package/dist/components/collection-search.js +14 -0
- package/dist/components/collection-sort.d.ts +13 -3
- package/dist/components/collection-sort.d.ts.map +1 -1
- package/dist/components/collection-sort.js +13 -3
- package/dist/components/collection-toolbar.d.ts +13 -0
- package/dist/components/collection-toolbar.d.ts.map +1 -1
- package/dist/components/collection-toolbar.js +13 -0
- package/dist/components/combobox.d.ts +17 -0
- package/dist/components/combobox.d.ts.map +1 -1
- package/dist/components/combobox.js +17 -0
- package/dist/components/command.d.ts +16 -0
- package/dist/components/command.d.ts.map +1 -1
- package/dist/components/command.js +16 -0
- package/dist/components/company-card.d.ts +16 -4
- package/dist/components/company-card.d.ts.map +1 -1
- package/dist/components/company-card.js +16 -4
- package/dist/components/confirm-dialog.d.ts +24 -14
- package/dist/components/confirm-dialog.d.ts.map +1 -1
- package/dist/components/confirm-dialog.js +16 -10
- package/dist/components/context-menu.d.ts +10 -0
- package/dist/components/context-menu.d.ts.map +1 -1
- package/dist/components/context-menu.js +10 -0
- package/dist/components/copy-button.d.ts +10 -0
- package/dist/components/copy-button.d.ts.map +1 -1
- package/dist/components/copy-button.js +10 -0
- package/dist/components/dashboard-shell.d.ts +14 -0
- package/dist/components/dashboard-shell.d.ts.map +1 -1
- package/dist/components/dashboard-shell.js +14 -0
- package/dist/components/data-table.d.ts +20 -0
- package/dist/components/data-table.d.ts.map +1 -1
- package/dist/components/data-table.js +23 -2
- package/dist/components/desktop-shell.d.ts +15 -0
- package/dist/components/desktop-shell.d.ts.map +1 -1
- package/dist/components/desktop-shell.js +15 -0
- package/dist/components/dialog.d.ts +16 -0
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +16 -0
- package/dist/components/diff-count.d.ts +11 -0
- package/dist/components/diff-count.d.ts.map +1 -1
- package/dist/components/diff-count.js +11 -0
- package/dist/components/disclosure-row.d.ts +12 -0
- package/dist/components/disclosure-row.d.ts.map +1 -1
- package/dist/components/disclosure-row.js +12 -0
- package/dist/components/disclosure.d.ts +15 -5
- package/dist/components/disclosure.d.ts.map +1 -1
- package/dist/components/disclosure.js +15 -5
- package/dist/components/drawer.d.ts +13 -0
- package/dist/components/drawer.d.ts.map +1 -1
- package/dist/components/drawer.js +13 -0
- package/dist/components/dropdown-menu.d.ts +17 -5
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +20 -7
- package/dist/components/empty-art.d.ts +1 -1
- package/dist/components/empty-art.d.ts.map +1 -1
- package/dist/components/empty-art.js +6 -0
- package/dist/components/empty-state.d.ts +24 -10
- package/dist/components/empty-state.d.ts.map +1 -1
- package/dist/components/empty-state.js +23 -1
- package/dist/components/entry-scene.d.ts +33 -20
- package/dist/components/entry-scene.d.ts.map +1 -1
- package/dist/components/entry-scene.js +34 -7
- package/dist/components/expandable-block.d.ts +10 -0
- package/dist/components/expandable-block.d.ts.map +1 -1
- package/dist/components/expandable-block.js +10 -0
- package/dist/components/field.d.ts +17 -0
- package/dist/components/field.d.ts.map +1 -1
- package/dist/components/field.js +17 -0
- package/dist/components/file-diff.d.ts +12 -0
- package/dist/components/file-diff.d.ts.map +1 -1
- package/dist/components/file-diff.js +12 -0
- package/dist/components/file-type-icon.d.ts +12 -0
- package/dist/components/file-type-icon.d.ts.map +1 -1
- package/dist/components/file-type-icon.js +12 -0
- package/dist/components/footer.d.ts +14 -0
- package/dist/components/footer.d.ts.map +1 -1
- package/dist/components/footer.js +14 -0
- package/dist/components/form-dialog.d.ts +10 -0
- package/dist/components/form-dialog.d.ts.map +1 -1
- package/dist/components/form-dialog.js +10 -0
- package/dist/components/form-drawer.d.ts +24 -11
- package/dist/components/form-drawer.d.ts.map +1 -1
- package/dist/components/form-drawer.js +13 -3
- package/dist/components/form.d.ts +17 -0
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/form.js +17 -0
- package/dist/components/glass-control.d.ts +13 -0
- package/dist/components/glass-control.d.ts.map +1 -1
- package/dist/components/glass-control.js +13 -0
- package/dist/components/hive-scene.d.ts +14 -0
- package/dist/components/hive-scene.d.ts.map +1 -1
- package/dist/components/hive-scene.js +14 -0
- package/dist/components/house-icons.d.ts +15 -0
- package/dist/components/house-icons.d.ts.map +1 -1
- package/dist/components/house-icons.js +15 -0
- package/dist/components/hover-card.d.ts +15 -0
- package/dist/components/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card.js +15 -0
- package/dist/components/identity-mark.d.ts +55 -0
- package/dist/components/identity-mark.d.ts.map +1 -0
- package/dist/components/identity-mark.js +66 -0
- package/dist/components/input-group.d.ts +16 -0
- package/dist/components/input-group.d.ts.map +1 -1
- package/dist/components/input-group.js +16 -0
- package/dist/components/input-otp.d.ts +15 -0
- package/dist/components/input-otp.d.ts.map +1 -1
- package/dist/components/input-otp.js +15 -0
- package/dist/components/input.d.ts +15 -0
- package/dist/components/input.d.ts.map +1 -1
- package/dist/components/input.js +15 -0
- package/dist/components/item.d.ts +16 -0
- package/dist/components/item.d.ts.map +1 -1
- package/dist/components/item.js +16 -0
- package/dist/components/kbd.d.ts +14 -0
- package/dist/components/kbd.d.ts.map +1 -1
- package/dist/components/kbd.js +14 -0
- package/dist/components/kpi-card.d.ts +21 -13
- package/dist/components/kpi-card.d.ts.map +1 -1
- package/dist/components/kpi-card.js +14 -3
- package/dist/components/label-system.d.ts +12 -0
- package/dist/components/label-system.d.ts.map +1 -1
- package/dist/components/label-system.js +12 -0
- package/dist/components/label.d.ts +15 -0
- package/dist/components/label.d.ts.map +1 -1
- package/dist/components/label.js +15 -0
- package/dist/components/library-shelf.d.ts +35 -0
- package/dist/components/library-shelf.d.ts.map +1 -0
- package/dist/components/library-shelf.js +40 -0
- package/dist/components/memory-item.d.ts +12 -0
- package/dist/components/memory-item.d.ts.map +1 -1
- package/dist/components/memory-item.js +12 -0
- package/dist/components/menu-choice-row.d.ts +13 -5
- package/dist/components/menu-choice-row.d.ts.map +1 -1
- package/dist/components/menu-choice-row.js +12 -6
- package/dist/components/menubar.d.ts +13 -0
- package/dist/components/menubar.d.ts.map +1 -1
- package/dist/components/menubar.js +13 -0
- package/dist/components/message-notice.d.ts +16 -0
- package/dist/components/message-notice.d.ts.map +1 -1
- package/dist/components/message-notice.js +18 -2
- package/dist/components/model-identity.d.ts +16 -3
- package/dist/components/model-identity.d.ts.map +1 -1
- package/dist/components/model-identity.js +16 -3
- package/dist/components/model-mark.d.ts +15 -2
- package/dist/components/model-mark.d.ts.map +1 -1
- package/dist/components/model-mark.js +15 -2
- package/dist/components/nadia-presence.d.ts +10 -4
- package/dist/components/nadia-presence.d.ts.map +1 -1
- package/dist/components/nadia-presence.js +10 -4
- package/dist/components/native-select.d.ts +16 -0
- package/dist/components/native-select.d.ts.map +1 -1
- package/dist/components/native-select.js +16 -0
- package/dist/components/navigation-menu.d.ts +14 -0
- package/dist/components/navigation-menu.d.ts.map +1 -1
- package/dist/components/navigation-menu.js +14 -0
- package/dist/components/notice-banner.d.ts +10 -3
- package/dist/components/notice-banner.d.ts.map +1 -1
- package/dist/components/notice-banner.js +9 -3
- package/dist/components/numbered-steps.d.ts +33 -0
- package/dist/components/numbered-steps.d.ts.map +1 -0
- package/dist/components/numbered-steps.js +23 -0
- package/dist/components/object-page.d.ts +37 -0
- package/dist/components/object-page.d.ts.map +1 -0
- package/dist/components/object-page.js +19 -0
- package/dist/components/object-workspace.d.ts +26 -36
- package/dist/components/object-workspace.d.ts.map +1 -1
- package/dist/components/object-workspace.js +27 -24
- package/dist/components/overview-page.d.ts +24 -0
- package/dist/components/overview-page.d.ts.map +1 -0
- package/dist/components/overview-page.js +26 -0
- package/dist/components/page-actions.d.ts +28 -23
- package/dist/components/page-actions.d.ts.map +1 -1
- package/dist/components/page-actions.js +20 -14
- package/dist/components/page-header.d.ts +11 -5
- package/dist/components/page-header.d.ts.map +1 -1
- package/dist/components/page-header.js +11 -5
- package/dist/components/pagination.d.ts +15 -0
- package/dist/components/pagination.d.ts.map +1 -1
- package/dist/components/pagination.js +15 -0
- package/dist/components/pairing-code.d.ts +15 -4
- package/dist/components/pairing-code.d.ts.map +1 -1
- package/dist/components/pairing-code.js +15 -4
- package/dist/components/pending-label.d.ts +12 -4
- package/dist/components/pending-label.d.ts.map +1 -1
- package/dist/components/pending-label.js +12 -4
- package/dist/components/picture-label.d.ts +15 -7
- package/dist/components/picture-label.d.ts.map +1 -1
- package/dist/components/picture-label.js +15 -7
- package/dist/components/platform-mark.d.ts +12 -3
- package/dist/components/platform-mark.d.ts.map +1 -1
- package/dist/components/platform-mark.js +12 -3
- package/dist/components/plugin-slot-boundary.d.ts +15 -0
- package/dist/components/plugin-slot-boundary.d.ts.map +1 -1
- package/dist/components/plugin-slot-boundary.js +15 -0
- package/dist/components/popover.d.ts +15 -0
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/popover.js +15 -0
- package/dist/components/portal-sidebar-frame.d.ts +26 -12
- package/dist/components/portal-sidebar-frame.d.ts.map +1 -1
- package/dist/components/portal-sidebar-frame.js +26 -0
- package/dist/components/progress.d.ts +10 -8
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/progress.js +11 -9
- package/dist/components/qr-code.d.ts +9 -3
- package/dist/components/qr-code.d.ts.map +1 -1
- package/dist/components/qr-code.js +9 -3
- package/dist/components/radio-group.d.ts +15 -0
- package/dist/components/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group.js +15 -0
- package/dist/components/reading-column.d.ts +11 -0
- package/dist/components/reading-column.d.ts.map +1 -1
- package/dist/components/reading-column.js +11 -0
- package/dist/components/record-identity.d.ts +12 -7
- package/dist/components/record-identity.d.ts.map +1 -1
- package/dist/components/record-identity.js +11 -7
- package/dist/components/record-list.d.ts +119 -0
- package/dist/components/record-list.d.ts.map +1 -0
- package/dist/components/record-list.js +161 -0
- package/dist/components/record-sheet.d.ts +36 -0
- package/dist/components/record-sheet.d.ts.map +1 -0
- package/dist/components/record-sheet.js +19 -0
- package/dist/components/record-time.d.ts +27 -11
- package/dist/components/record-time.d.ts.map +1 -1
- package/dist/components/record-time.js +34 -12
- package/dist/components/resizable.d.ts +10 -0
- package/dist/components/resizable.d.ts.map +1 -1
- package/dist/components/resizable.js +10 -0
- package/dist/components/row-edit-form.d.ts +8 -5
- package/dist/components/row-edit-form.d.ts.map +1 -1
- package/dist/components/row-edit-form.js +8 -5
- package/dist/components/run-timeline.d.ts +24 -11
- package/dist/components/run-timeline.d.ts.map +1 -1
- package/dist/components/run-timeline.js +13 -6
- package/dist/components/scope-switcher.d.ts +11 -0
- package/dist/components/scope-switcher.d.ts.map +1 -1
- package/dist/components/scope-switcher.js +20 -9
- package/dist/components/scroll-area.d.ts +12 -0
- package/dist/components/scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-area.js +12 -0
- package/dist/components/select.d.ts +16 -0
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/select.js +16 -0
- package/dist/components/separator.d.ts +11 -0
- package/dist/components/separator.d.ts.map +1 -1
- package/dist/components/separator.js +11 -0
- package/dist/components/settings-facts.d.ts +18 -1
- package/dist/components/settings-facts.d.ts.map +1 -1
- package/dist/components/settings-facts.js +20 -1
- package/dist/components/settings-page.d.ts +20 -0
- package/dist/components/settings-page.d.ts.map +1 -0
- package/dist/components/settings-page.js +16 -0
- package/dist/components/settings-section.d.ts +38 -8
- package/dist/components/settings-section.d.ts.map +1 -1
- package/dist/components/settings-section.js +33 -7
- package/dist/components/sheet.d.ts +16 -0
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +16 -0
- package/dist/components/sidebar-sections.d.ts +40 -0
- package/dist/components/sidebar-sections.d.ts.map +1 -0
- package/dist/components/sidebar-sections.js +35 -0
- package/dist/components/sidebar.d.ts +14 -1
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +13 -2
- package/dist/components/skeleton.d.ts +10 -0
- package/dist/components/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton.js +11 -1
- package/dist/components/slider.d.ts +14 -0
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +14 -0
- package/dist/components/sonner.d.ts +18 -0
- package/dist/components/sonner.d.ts.map +1 -1
- package/dist/components/sonner.js +18 -0
- package/dist/components/status-badge.d.ts +13 -2
- package/dist/components/status-badge.d.ts.map +1 -1
- package/dist/components/status-badge.js +21 -9
- package/dist/components/status-dot.d.ts +12 -0
- package/dist/components/status-dot.d.ts.map +1 -1
- package/dist/components/status-dot.js +12 -0
- package/dist/components/status-row.d.ts +14 -0
- package/dist/components/status-row.d.ts.map +1 -1
- package/dist/components/status-row.js +14 -0
- package/dist/components/switch.d.ts +15 -0
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/switch.js +15 -0
- package/dist/components/table-card.d.ts +16 -3
- package/dist/components/table-card.d.ts.map +1 -1
- package/dist/components/table-card.js +16 -3
- package/dist/components/table-value.d.ts +24 -2
- package/dist/components/table-value.d.ts.map +1 -1
- package/dist/components/table-value.js +25 -3
- package/dist/components/table.d.ts +16 -0
- package/dist/components/table.d.ts.map +1 -1
- package/dist/components/table.js +17 -1
- package/dist/components/tabs.d.ts +27 -0
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +27 -0
- package/dist/components/tag.d.ts +12 -2
- package/dist/components/tag.d.ts.map +1 -1
- package/dist/components/tag.js +12 -2
- package/dist/components/text-link.d.ts +17 -0
- package/dist/components/text-link.d.ts.map +1 -1
- package/dist/components/text-link.js +17 -0
- package/dist/components/textarea.d.ts +14 -0
- package/dist/components/textarea.d.ts.map +1 -1
- package/dist/components/textarea.js +14 -0
- package/dist/components/theme-mode-switcher.d.ts +21 -0
- package/dist/components/theme-mode-switcher.d.ts.map +1 -1
- package/dist/components/theme-mode-switcher.js +23 -1
- package/dist/components/toggle-group.d.ts +13 -0
- package/dist/components/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group.js +13 -0
- package/dist/components/toggle.d.ts +14 -0
- package/dist/components/toggle.d.ts.map +1 -1
- package/dist/components/toggle.js +14 -0
- package/dist/components/tool-icon.d.ts +14 -4
- package/dist/components/tool-icon.d.ts.map +1 -1
- package/dist/components/tool-icon.js +27 -42
- package/dist/components/tooltip.d.ts +15 -0
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +15 -0
- package/dist/components/trend-badge.d.ts +16 -1
- package/dist/components/trend-badge.d.ts.map +1 -1
- package/dist/components/trend-badge.js +16 -7
- package/dist/components/update-card.d.ts +36 -0
- package/dist/components/update-card.d.ts.map +1 -0
- package/dist/components/update-card.js +28 -0
- package/dist/components/usage-meter.d.ts +15 -0
- package/dist/components/usage-meter.d.ts.map +1 -1
- package/dist/components/usage-meter.js +15 -0
- package/dist/components/waiting-line.d.ts +13 -10
- package/dist/components/waiting-line.d.ts.map +1 -1
- package/dist/components/waiting-line.js +13 -10
- package/dist/eslint/index.js +8 -0
- package/dist/eslint/rules/empty-state-owner.js +145 -0
- package/dist/eslint/rules/menu-owner.js +75 -0
- package/dist/eslint/rules/no-decorative-icon.js +164 -0
- package/dist/eslint/rules/page-composition.js +232 -0
- package/dist/eslint/rules/rendered-import.js +121 -0
- package/dist/eslint/strict-design-system.js +1 -1
- package/dist/hooks/use-hydrated.d.ts +2 -0
- package/dist/hooks/use-hydrated.d.ts.map +1 -0
- package/dist/hooks/use-hydrated.js +7 -0
- package/dist/index.d.ts +15 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -10
- package/dist/internal/catalog-list.d.ts +14 -0
- package/dist/internal/catalog-list.d.ts.map +1 -0
- package/dist/internal/catalog-list.js +53 -0
- package/dist/internal/empty.d.ts +6 -9
- package/dist/internal/empty.d.ts.map +1 -1
- package/dist/internal/empty.js +24 -22
- package/dist/internal/footer-strip.d.ts +0 -4
- package/dist/internal/footer-strip.d.ts.map +1 -1
- package/dist/internal/footer-strip.js +0 -4
- package/dist/internal/record-menu-items.d.ts +19 -0
- package/dist/internal/record-menu-items.d.ts.map +1 -0
- package/dist/internal/record-menu-items.js +20 -0
- package/dist/internal/settings-save.d.ts +43 -0
- package/dist/internal/settings-save.d.ts.map +1 -0
- package/dist/internal/settings-save.js +147 -0
- package/dist/lib/theme-mode.d.ts +1 -1
- package/dist/lib/theme-mode.js +1 -1
- package/dist/showcase/assets.d.ts +8 -0
- package/dist/showcase/assets.d.ts.map +1 -0
- package/dist/showcase/assets.js +13 -0
- package/dist/showcase/foundations.d.ts +2 -0
- package/dist/showcase/foundations.d.ts.map +1 -0
- package/dist/showcase/foundations.js +61 -0
- package/dist/showcase/samples.d.ts +21 -0
- package/dist/showcase/samples.d.ts.map +1 -0
- package/dist/showcase/samples.js +48 -0
- package/dist/showcase/showcase.d.ts +10 -0
- package/dist/showcase/showcase.d.ts.map +1 -0
- package/dist/showcase/showcase.js +44 -0
- package/dist/showcase/specimens/actions.d.ts +7 -0
- package/dist/showcase/specimens/actions.d.ts.map +1 -0
- package/dist/showcase/specimens/actions.js +15 -0
- package/dist/showcase/specimens/charts.d.ts +17 -0
- package/dist/showcase/specimens/charts.d.ts.map +1 -0
- package/dist/showcase/specimens/charts.js +104 -0
- package/dist/showcase/specimens/choices.d.ts +21 -0
- package/dist/showcase/specimens/choices.d.ts.map +1 -0
- package/dist/showcase/specimens/choices.js +68 -0
- package/dist/showcase/specimens/compositions.d.ts +39 -0
- package/dist/showcase/specimens/compositions.d.ts.map +1 -0
- package/dist/showcase/specimens/compositions.js +270 -0
- package/dist/showcase/specimens/data.d.ts +31 -0
- package/dist/showcase/specimens/data.d.ts.map +1 -0
- package/dist/showcase/specimens/data.js +111 -0
- package/dist/showcase/specimens/feedback.d.ts +23 -0
- package/dist/showcase/specimens/feedback.d.ts.map +1 -0
- package/dist/showcase/specimens/feedback.js +64 -0
- package/dist/showcase/specimens/index.d.ts +164 -0
- package/dist/showcase/specimens/index.d.ts.map +1 -0
- package/dist/showcase/specimens/index.js +24 -0
- package/dist/showcase/specimens/inputs.d.ts +22 -0
- package/dist/showcase/specimens/inputs.d.ts.map +1 -0
- package/dist/showcase/specimens/inputs.js +60 -0
- package/dist/showcase/specimens/menus.d.ts +20 -0
- package/dist/showcase/specimens/menus.d.ts.map +1 -0
- package/dist/showcase/specimens/menus.js +65 -0
- package/dist/showcase/specimens/navigation.d.ts +22 -0
- package/dist/showcase/specimens/navigation.d.ts.map +1 -0
- package/dist/showcase/specimens/navigation.js +103 -0
- package/dist/showcase/specimens/other.d.ts +26 -0
- package/dist/showcase/specimens/other.d.ts.map +1 -0
- package/dist/showcase/specimens/other.js +73 -0
- package/dist/showcase/specimens/specimen.d.ts +5 -0
- package/dist/showcase/specimens/specimen.d.ts.map +1 -0
- package/dist/showcase/specimens/specimen.js +1 -0
- package/dist/showcase/specimens/status.d.ts +22 -0
- package/dist/showcase/specimens/status.d.ts.map +1 -0
- package/dist/showcase/specimens/status.js +44 -0
- package/dist/showcase/usage.generated.d.ts +16 -0
- package/dist/showcase/usage.generated.d.ts.map +1 -0
- package/dist/showcase/usage.generated.js +1788 -0
- package/dist/standalone/index.js +1 -1
- package/dist/styles/components.css +21 -0
- package/package.json +8 -3
- package/dist/components/automation-section.d.ts +0 -78
- package/dist/components/automation-section.d.ts.map +0 -1
- package/dist/components/automation-section.js +0 -75
- package/dist/components/catalog-tile.d.ts +0 -19
- package/dist/components/catalog-tile.d.ts.map +0 -1
- package/dist/components/catalog-tile.js +0 -13
- package/dist/components/feedback-state.d.ts +0 -14
- package/dist/components/feedback-state.d.ts.map +0 -1
- package/dist/components/feedback-state.js +0 -65
- package/dist/components/installer-shell.d.ts +0 -25
- package/dist/components/installer-shell.d.ts.map +0 -1
- package/dist/components/installer-shell.js +0 -32
- package/dist/components/settings-form.d.ts +0 -9
- package/dist/components/settings-form.d.ts.map +0 -1
- package/dist/components/settings-form.js +0 -83
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon, PlusIcon } from "lucide-react";
|
|
4
|
+
import { useId } from "react";
|
|
5
|
+
import { ActionMenu } from "../components/action-menu.js";
|
|
6
|
+
import { IdentityMark } from "../components/identity-mark.js";
|
|
7
|
+
import { PageCommandButton } from "../components/page-actions.js";
|
|
8
|
+
import { Skeleton } from "../components/skeleton.js";
|
|
9
|
+
import { textLinkVariants } from "../components/text-link.js";
|
|
10
|
+
import { soleMenuButton } from "./record-menu-items.js";
|
|
11
|
+
import { RowMessageActions, RowMessageLine } from "./row-message.js";
|
|
12
|
+
import { cn } from "../lib/utils.js";
|
|
13
|
+
const ENTRY_FRAME = "flex min-w-0 items-start gap-3.5 rounded-sm bg-card p-4 nc-elevation-resting";
|
|
14
|
+
function EntryName({ link, name }) {
|
|
15
|
+
if (!link)
|
|
16
|
+
return name;
|
|
17
|
+
const anchor = {
|
|
18
|
+
href: link.href,
|
|
19
|
+
children: name,
|
|
20
|
+
className: textLinkVariants({ kind: "plain" }),
|
|
21
|
+
};
|
|
22
|
+
return link.renderLink ? link.renderLink(anchor) : _jsx("a", { ...anchor });
|
|
23
|
+
}
|
|
24
|
+
function EntryAdd({ add }) {
|
|
25
|
+
const { added, ...command } = add;
|
|
26
|
+
if (added) {
|
|
27
|
+
return (_jsxs("span", { className: "flex h-control-height items-center gap-1.5 px-1 text-sm text-muted-foreground", children: [_jsx(CheckIcon, { "aria-hidden": "true", className: "size-4" }), added.label] }));
|
|
28
|
+
}
|
|
29
|
+
return (_jsx(PageCommandButton, { command: { ...command, icon: _jsx(PlusIcon, { "aria-hidden": "true" }) }, variant: "outline" }));
|
|
30
|
+
}
|
|
31
|
+
function CatalogEntry({ add, description, fact, link, mark, menu, name, state, }) {
|
|
32
|
+
const menuButton = add || !menu ? undefined : soleMenuButton(menu.commands);
|
|
33
|
+
return (_jsxs("li", { className: ENTRY_FRAME, "data-slot": "catalog-entry", children: [_jsx(IdentityMark, { ...mark, size: 40 }), _jsxs("div", { className: "grid min-w-0 flex-1 gap-0.5", children: [_jsx("span", { className: "truncate text-sm font-medium text-foreground", children: _jsx(EntryName, { link: link, name: name }) }), _jsx("p", { className: cn("text-body-sm text-muted-foreground", !state && "line-clamp-1"), children: state ? _jsx(RowMessageLine, { state: state }) : description })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [fact, state ? _jsx(RowMessageActions, { state: state }) : null, add ? _jsx(EntryAdd, { add: add }) : null, menuButton ? _jsx(PageCommandButton, { command: menuButton, variant: "outline" }) : null, menu && !menuButton ? (_jsx(ActionMenu, { commands: menu.commands, label: menu.label, record: name })) : null] })] }));
|
|
34
|
+
}
|
|
35
|
+
function EntryList({ columns, entries, }) {
|
|
36
|
+
return (_jsx("ul", { className: cn("grid gap-3", columns === 2 && "md:grid-cols-2"), children: entries.map((entry) => (_jsx(CatalogEntry, { ...entry }, entry.id))) }));
|
|
37
|
+
}
|
|
38
|
+
function TitledSection({ columns, entries, headingLevel, title, }) {
|
|
39
|
+
const headingId = useId();
|
|
40
|
+
const Heading = headingLevel === 2 ? "h2" : "h3";
|
|
41
|
+
return (_jsxs("section", { "aria-labelledby": headingId, className: "grid min-w-0 gap-3", children: [_jsx(Heading, { className: "text-heading-sm text-foreground", id: headingId, children: title }), _jsx(EntryList, { columns: columns, entries: entries })] }));
|
|
42
|
+
}
|
|
43
|
+
export function CatalogList({ columns, headingLevel = 3, sections, }) {
|
|
44
|
+
return (_jsx("div", { className: "grid min-w-0 gap-8", children: sections
|
|
45
|
+
.filter((section) => section.entries.length > 0)
|
|
46
|
+
.map(({ id, title, entries }) => title ? (_jsx(TitledSection, { columns: columns, entries: entries, headingLevel: headingLevel, id: id, title: title }, id)) : (_jsx(EntryList, { columns: columns, entries: entries }, id))) }));
|
|
47
|
+
}
|
|
48
|
+
export function CatalogSkeleton({ columns, label }) {
|
|
49
|
+
return (_jsx("div", { "aria-busy": "true", "aria-label": label, className: cn("grid gap-3", columns === 2 && "md:grid-cols-2"), role: "status", children: Array.from({ length: columns * 3 }, (_, index) => (_jsxs("div", { "aria-hidden": "true", className: ENTRY_FRAME, children: [_jsx(Skeleton, { className: "size-10 shrink-0" }), _jsxs("div", { className: "grid flex-1 gap-1.5 pt-0.5", children: [_jsx(Skeleton, { className: "h-4 w-32" }), _jsx(Skeleton, { className: "h-3.5 w-full" })] }), _jsx(Skeleton, { className: "h-control-height w-16 shrink-0" })] }, index))) }));
|
|
50
|
+
}
|
|
51
|
+
export function catalogIsEmpty(sections) {
|
|
52
|
+
return sections.every((section) => section.entries.length === 0);
|
|
53
|
+
}
|
package/dist/internal/empty.d.ts
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import { type VariantProps } from "class-variance-authority";
|
|
2
1
|
type EmptyScope = "page" | "region" | "card";
|
|
3
|
-
declare function Empty({ className, scope,
|
|
2
|
+
declare function Empty({ className, scope, ...props }: React.ComponentProps<"div"> & {
|
|
4
3
|
scope?: EmptyScope;
|
|
5
|
-
presentation?: "plain" | "illustrated";
|
|
6
4
|
}): import("react").JSX.Element;
|
|
7
5
|
declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
8
|
-
declare
|
|
9
|
-
variant
|
|
10
|
-
}
|
|
11
|
-
declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): import("react").JSX.Element;
|
|
6
|
+
declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & {
|
|
7
|
+
variant: "picture" | "warning";
|
|
8
|
+
}): import("react").JSX.Element;
|
|
12
9
|
type EmptyPictureSize = "page" | "card";
|
|
13
10
|
declare function EmptyPicture({ size, src }: {
|
|
14
|
-
size
|
|
11
|
+
size: EmptyPictureSize;
|
|
15
12
|
src: string;
|
|
16
13
|
}): import("react").JSX.Element;
|
|
17
14
|
declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
18
|
-
declare function EmptyDescription({ className, ...props }: React.ComponentProps<"
|
|
15
|
+
declare function EmptyDescription({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
19
16
|
declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
20
17
|
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, EmptyPicture, type EmptyPictureSize, type EmptyScope, };
|
|
21
18
|
//# sourceMappingURL=empty.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../src/internal/empty.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../src/internal/empty.tsx"],"names":[],"mappings":"AAIA,KAAK,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE7C,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,KAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,UAAU,CAAA;CAAE,+BActD;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQxE;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,OAAO,EAAE,SAAS,GAAG,SAAS,CAAA;CAAE,+BAelE;AAED,KAAK,gBAAgB,GAAG,MAAM,GAAG,MAAM,CAAC;AAExC,iBAAS,YAAY,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,+BA0B3E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQvE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAW7E;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQzE;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,KAAK,gBAAgB,EACrB,KAAK,UAAU,GAChB,CAAC"}
|
package/dist/internal/empty.js
CHANGED
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useCallback, useState } from "react";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
|
-
function Empty({ className, scope = "region",
|
|
5
|
-
return (_jsx("div", { "data-slot": "empty", className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center
|
|
4
|
+
function Empty({ className, scope = "region", ...props }) {
|
|
5
|
+
return (_jsx("div", { "data-slot": "empty", className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center text-center", scope === "page" ? "px-6 pt-10 pb-11" : "px-5 py-7", scope !== "card" && "rounded-sm bg-card nc-elevation-resting", className), ...props, "data-scope": scope }));
|
|
6
6
|
}
|
|
7
7
|
function EmptyHeader({ className, ...props }) {
|
|
8
|
-
return (_jsx("div", { "data-slot": "empty-header", className: cn("flex max-w-sm flex-col items-center gap-
|
|
8
|
+
return (_jsx("div", { "data-slot": "empty-header", className: cn("flex max-w-sm min-w-0 flex-col items-center gap-4", className), ...props }));
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
default: "bg-transparent",
|
|
14
|
-
icon: "flex size-control-height shrink-0 items-center justify-center rounded-sm border border-border bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4",
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
defaultVariants: {
|
|
18
|
-
variant: "default",
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
function EmptyMedia({ className, variant = "default", ...props }) {
|
|
22
|
-
return (_jsx("div", { "data-slot": "empty-icon", "data-variant": variant, className: cn(emptyMediaVariants({ variant, className })), ...props }));
|
|
10
|
+
function EmptyMedia({ className, variant, ...props }) {
|
|
11
|
+
return (_jsx("div", { "data-slot": "empty-icon", "data-variant": variant, className: cn("flex shrink-0 justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", variant === "warning" &&
|
|
12
|
+
"size-9 items-center rounded-md bg-destructive-soft text-destructive [&_svg:not([class*='size-'])]:size-4", variant === "picture" && "items-end", className), ...props }));
|
|
23
13
|
}
|
|
24
|
-
function EmptyPicture({ size
|
|
25
|
-
|
|
14
|
+
function EmptyPicture({ size, src }) {
|
|
15
|
+
const [loaded, setLoaded] = useState(false);
|
|
16
|
+
const arriveOnLoad = useCallback((img) => {
|
|
17
|
+
if (!img)
|
|
18
|
+
return;
|
|
19
|
+
if (img.complete && img.naturalWidth > 0) {
|
|
20
|
+
setLoaded(true);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const show = () => setLoaded(true);
|
|
24
|
+
img.addEventListener("load", show, { once: true });
|
|
25
|
+
return () => img.removeEventListener("load", show);
|
|
26
|
+
}, []);
|
|
27
|
+
return (_jsx(EmptyMedia, { className: size === "page" ? "h-44 w-60" : "h-36 w-50", variant: "picture", children: _jsx("img", { alt: "", className: "max-h-full max-w-full object-contain object-bottom select-none", "data-loaded": loaded ? "" : undefined, "data-size": size, "data-slot": "empty-picture", draggable: false, ref: arriveOnLoad, src: src }) }));
|
|
26
28
|
}
|
|
27
29
|
function EmptyTitle({ className, ...props }) {
|
|
28
|
-
return _jsx("div", { "data-slot": "empty-title", className: cn("text-heading-xs", className), ...props });
|
|
30
|
+
return (_jsx("div", { "data-slot": "empty-title", className: cn("text-heading-xs text-foreground", className), ...props }));
|
|
29
31
|
}
|
|
30
32
|
function EmptyDescription({ className, ...props }) {
|
|
31
|
-
return (_jsx("div", { "data-slot": "empty-description", className: cn("text-body-sm text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className), ...props }));
|
|
33
|
+
return (_jsx("div", { "data-slot": "empty-description", className: cn("max-w-[38ch] text-body-sm text-balance text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className), ...props }));
|
|
32
34
|
}
|
|
33
35
|
function EmptyContent({ className, ...props }) {
|
|
34
|
-
return (_jsx("div", { "data-slot": "empty-content", className: cn("flex
|
|
36
|
+
return (_jsx("div", { "data-slot": "empty-content", className: cn("flex min-w-0 flex-wrap items-center justify-center gap-2", className), ...props }));
|
|
35
37
|
}
|
|
36
38
|
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, EmptyPicture, };
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* The strip a settings section and a table card close with (DESIGN.md "Settings cards"), drawn once so the two never
|
|
4
|
-
* drift apart.
|
|
5
|
-
*/
|
|
6
2
|
declare function FooterStrip({ hint, hintSlot, children, }: {
|
|
7
3
|
hint?: React.ReactNode;
|
|
8
4
|
hintSlot: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer-strip.d.ts","sourceRoot":"","sources":["../../src/internal/footer-strip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B
|
|
1
|
+
{"version":3,"file":"footer-strip.d.ts","sourceRoot":"","sources":["../../src/internal/footer-strip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,WAAW,CAAC,EACnB,IAAI,EACJ,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,4BAeA;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { CardFooter } from "../components/card.js";
|
|
3
|
-
/**
|
|
4
|
-
* The strip a settings section and a table card close with (DESIGN.md "Settings cards"), drawn once so the two never
|
|
5
|
-
* drift apart.
|
|
6
|
-
*/
|
|
7
3
|
function FooterStrip({ hint, hintSlot, children, }) {
|
|
8
4
|
if (!hint && !children) {
|
|
9
5
|
return null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { MenuCommand, RecordMenu } from "../components/action-menu.js";
|
|
3
|
+
import type { PageCommandAction } from "../components/page-actions.js";
|
|
4
|
+
export declare function menuItemAction(action: PageCommandAction): {
|
|
5
|
+
render: import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
6
|
+
nativeButton: boolean;
|
|
7
|
+
onClick?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
onClick: (event: import("react").MouseEvent<HTMLElement>) => void;
|
|
10
|
+
render?: undefined;
|
|
11
|
+
nativeButton?: undefined;
|
|
12
|
+
};
|
|
13
|
+
export declare function MenuCommandRow({ command, value }: {
|
|
14
|
+
command: MenuCommand;
|
|
15
|
+
value?: ReactNode;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
export declare function soleMenuButton(commands: readonly MenuCommand[]): MenuCommand | undefined;
|
|
18
|
+
export declare function RecordMenuItems({ record, commands }: Omit<RecordMenu, "label">): import("react").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=record-menu-items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-menu-items.d.ts","sourceRoot":"","sources":["../../src/internal/record-menu-items.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAQxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,wBAAgB,cAAc,CAAC,MAAM,EAAE,iBAAiB;;;;;;;;EAIvD;AAED,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,+BAqB7F;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,WAAW,GAAG,SAAS,CAGxF;AAED,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,+BAe9E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { DropdownMenuCommand, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, } from "../components/dropdown-menu.js";
|
|
4
|
+
export function menuItemAction(action) {
|
|
5
|
+
return action.render
|
|
6
|
+
? { render: action.render, nativeButton: action.render.type === "button" }
|
|
7
|
+
: { onClick: action.onClick };
|
|
8
|
+
}
|
|
9
|
+
export function MenuCommandRow({ command, value }) {
|
|
10
|
+
return (_jsx(DropdownMenuCommand, { "aria-label": command.accessibleName, disabled: command.disabled, icon: command.icon, detail: command.detail, reason: command.reason, variant: command.destructive ? "destructive" : "default", ...menuItemAction(command), children: value === undefined ? (command.label) : (_jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { className: "min-w-0 flex-1", children: command.label }), " ", _jsx(DropdownMenuShortcut, { children: value })] })) }));
|
|
11
|
+
}
|
|
12
|
+
export function soleMenuButton(commands) {
|
|
13
|
+
const [only] = commands;
|
|
14
|
+
return commands.length === 1 && only && !only.destructive ? only : undefined;
|
|
15
|
+
}
|
|
16
|
+
export function RecordMenuItems({ record, commands }) {
|
|
17
|
+
const kept = commands.filter((command) => !command.destructive);
|
|
18
|
+
const destructive = commands.filter((command) => command.destructive);
|
|
19
|
+
return (_jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { children: record }), kept.map((command) => (_jsx(MenuCommandRow, { command: command }, command.label))), kept.length > 0 && destructive.length > 0 ? _jsx(DropdownMenuSeparator, {}) : null, destructive.map((command) => (_jsx(MenuCommandRow, { command: command }, command.label)))] }));
|
|
20
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type ResolvedMessage } from "../components/product-message.js";
|
|
3
|
+
export type SettingsSaveFailure = {
|
|
4
|
+
message: ResolvedMessage;
|
|
5
|
+
/** The SettingsField id the failure is about: shown under it. Absent: above the footer. */
|
|
6
|
+
field?: string;
|
|
7
|
+
};
|
|
8
|
+
export type SettingsSave = {
|
|
9
|
+
/** Saves the section's fields; resolves to null once saved. */
|
|
10
|
+
action: (formData: FormData) => Promise<SettingsSaveFailure | null>;
|
|
11
|
+
/** "Save" */
|
|
12
|
+
label: string;
|
|
13
|
+
/** "Saving" */
|
|
14
|
+
pendingLabel: string;
|
|
15
|
+
/** "Saved" */
|
|
16
|
+
savedLabel: string;
|
|
17
|
+
/** The footer's left side until a save: "Saved for every device you sign in on." */
|
|
18
|
+
hint?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* An in-place edit of an object's section closes without saving. A cancel that runs work of its own, such as
|
|
21
|
+
* undoing a half-done setup on a server, says `pendingLabel` while `pending`.
|
|
22
|
+
*/
|
|
23
|
+
cancel?: {
|
|
24
|
+
label: string;
|
|
25
|
+
onCancel: () => void;
|
|
26
|
+
pending?: boolean;
|
|
27
|
+
pendingLabel?: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Whether the fields differ from what is saved, for a section whose fields are controlled.
|
|
31
|
+
* Left out, the section compares its named, uncontrolled fields with their defaults.
|
|
32
|
+
*/
|
|
33
|
+
changed?: boolean;
|
|
34
|
+
};
|
|
35
|
+
export declare function SettingsSaveForm({ save, titleId, children, }: {
|
|
36
|
+
save: SettingsSave;
|
|
37
|
+
titleId: string;
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
40
|
+
export declare function SettingsFieldFailure({ id }: {
|
|
41
|
+
id: string;
|
|
42
|
+
}): import("react").JSX.Element | null;
|
|
43
|
+
//# sourceMappingURL=settings-save.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-save.d.ts","sourceRoot":"","sources":["../../src/internal/settings-save.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAOf,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAOtF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,eAAe,CAAC;IACzB,2FAA2F;IAC3F,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,+DAA+D;IAC/D,MAAM,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACpE,aAAa;IACb,KAAK,EAAE,MAAM,CAAC;IACd,eAAe;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3F;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAsHF,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,OAAO,EACP,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAoFA;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,EAAE,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,sCA2B1D"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CircleCheck } from "lucide-react";
|
|
4
|
+
import { createContext, use, useCallback, useEffect, useRef, useState, } from "react";
|
|
5
|
+
import { useFormStatus } from "react-dom";
|
|
6
|
+
import { Button } from "../components/button.js";
|
|
7
|
+
import { FieldError } from "../components/field.js";
|
|
8
|
+
import { MessageNotice } from "../components/message-notice.js";
|
|
9
|
+
import { PendingLabel } from "../components/pending-label.js";
|
|
10
|
+
import { messageSentences } from "../components/product-message.js";
|
|
11
|
+
import { CardContent } from "../components/card.js";
|
|
12
|
+
import { WaitingLine } from "../components/waiting-line.js";
|
|
13
|
+
import { useHydrated } from "../hooks/use-hydrated.js";
|
|
14
|
+
import { FooterStrip } from "./footer-strip.js";
|
|
15
|
+
import { FormSubmitButton } from "./form-submit.js";
|
|
16
|
+
const SettingsSaveContext = createContext(null);
|
|
17
|
+
function editableControls(form) {
|
|
18
|
+
return Array.from(form.elements).filter((control) => {
|
|
19
|
+
if (control instanceof HTMLInputElement) {
|
|
20
|
+
return (Boolean(control.name) &&
|
|
21
|
+
!control.disabled &&
|
|
22
|
+
!control.readOnly &&
|
|
23
|
+
!["hidden", "submit", "reset", "button"].includes(control.type));
|
|
24
|
+
}
|
|
25
|
+
if (control instanceof HTMLTextAreaElement) {
|
|
26
|
+
return Boolean(control.name) && !control.disabled && !control.readOnly;
|
|
27
|
+
}
|
|
28
|
+
return control instanceof HTMLSelectElement && Boolean(control.name) && !control.disabled;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function hasChangedFields(form) {
|
|
32
|
+
return editableControls(form).some((control) => {
|
|
33
|
+
if (control instanceof HTMLInputElement) {
|
|
34
|
+
if (control.type === "checkbox" || control.type === "radio") {
|
|
35
|
+
return control.checked !== control.defaultChecked;
|
|
36
|
+
}
|
|
37
|
+
return control.value !== control.defaultValue;
|
|
38
|
+
}
|
|
39
|
+
if (control instanceof HTMLTextAreaElement) {
|
|
40
|
+
return control.value !== control.defaultValue;
|
|
41
|
+
}
|
|
42
|
+
const options = Array.from(control.options);
|
|
43
|
+
const hasDefault = options.some((option) => option.defaultSelected);
|
|
44
|
+
const fallback = options.findIndex((option) => !option.disabled);
|
|
45
|
+
return options.some((option, index) => option.selected !==
|
|
46
|
+
(option.defaultSelected || (!control.multiple && !hasDefault && index === fallback)));
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function editableValues(form) {
|
|
50
|
+
const names = new Set(editableControls(form).map((control) => control.name));
|
|
51
|
+
return JSON.stringify(Array.from(new FormData(form))
|
|
52
|
+
.filter(([name]) => names.has(name))
|
|
53
|
+
.map(([name, value]) => value instanceof File
|
|
54
|
+
? [name, [value.name, value.size, value.type, value.lastModified]]
|
|
55
|
+
: [name, value]));
|
|
56
|
+
}
|
|
57
|
+
function SaveFooter({ save, changed, saved, }) {
|
|
58
|
+
const { pending } = useFormStatus();
|
|
59
|
+
return (_jsxs(FooterStrip, { hint: _jsx("div", { role: "status", children: saved ? (_jsxs("span", { className: "inline-flex items-center gap-1.5 text-success", children: [_jsx(CircleCheck, { "aria-hidden": "true", className: "size-4" }), save.savedLabel] })) : (save.hint) }), hintSlot: "settings-section-hint", children: [save.cancel ? (_jsx(Button, { "aria-busy": save.cancel.pending || undefined, disabled: pending || save.cancel.pending, onClick: save.cancel.onCancel, type: "button", variant: "outline", children: _jsx(PendingLabel, { pending: save.cancel.pending ?? false, pendingLabel: save.cancel.pendingLabel ?? save.cancel.label, children: save.cancel.label }) })) : null, _jsx(FormSubmitButton, { submit: {
|
|
60
|
+
label: save.label,
|
|
61
|
+
pendingLabel: save.pendingLabel,
|
|
62
|
+
pending,
|
|
63
|
+
disabled: !changed,
|
|
64
|
+
} }), pending ? _jsx(WaitingLine, { className: "basis-full", decorative: true }) : null] }));
|
|
65
|
+
}
|
|
66
|
+
export function SettingsSaveForm({ save, titleId, children, }) {
|
|
67
|
+
const [fieldsChanged, setFieldsChanged] = useState(false);
|
|
68
|
+
const [failure, setFailure] = useState(null);
|
|
69
|
+
const [saved, setSaved] = useState(false);
|
|
70
|
+
const [claimedFields, setClaimedFields] = useState(() => new Set());
|
|
71
|
+
const submittedValues = useRef(null);
|
|
72
|
+
const keepValuesOnReset = useRef(false);
|
|
73
|
+
const form = useRef(null);
|
|
74
|
+
const controlled = save.changed !== undefined;
|
|
75
|
+
const hydrated = useHydrated();
|
|
76
|
+
const claim = useCallback((field) => {
|
|
77
|
+
setClaimedFields((current) => new Set(current).add(field));
|
|
78
|
+
return () => setClaimedFields((current) => {
|
|
79
|
+
const next = new Set(current);
|
|
80
|
+
next.delete(field);
|
|
81
|
+
return next;
|
|
82
|
+
});
|
|
83
|
+
}, []);
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
const element = form.current;
|
|
86
|
+
if (!element)
|
|
87
|
+
return;
|
|
88
|
+
const onReset = (event) => {
|
|
89
|
+
const editedWhileSaving = submittedValues.current !== null && editableValues(element) !== submittedValues.current;
|
|
90
|
+
if (keepValuesOnReset.current || editedWhileSaving || controlled) {
|
|
91
|
+
event.preventDefault();
|
|
92
|
+
}
|
|
93
|
+
keepValuesOnReset.current = false;
|
|
94
|
+
submittedValues.current = null;
|
|
95
|
+
setFieldsChanged(event.defaultPrevented ? hasChangedFields(element) : false);
|
|
96
|
+
};
|
|
97
|
+
element.addEventListener("reset", onReset);
|
|
98
|
+
return () => element.removeEventListener("reset", onReset);
|
|
99
|
+
}, [controlled]);
|
|
100
|
+
const changed = save.changed ?? fieldsChanged;
|
|
101
|
+
const sectionFailure = failure && (failure.field === undefined || !claimedFields.has(failure.field)) ? failure : null;
|
|
102
|
+
return (_jsx(SettingsSaveContext, { value: { failure, claim }, children: _jsxs("form", { ref: form, "aria-labelledby": titleId, className: "contents", "data-slot": "settings-section-form", action: async (formData) => {
|
|
103
|
+
const result = await save.action(formData);
|
|
104
|
+
keepValuesOnReset.current = result !== null;
|
|
105
|
+
setFailure(result);
|
|
106
|
+
setSaved(result === null);
|
|
107
|
+
}, onChange: (event) => {
|
|
108
|
+
const edited = event.target;
|
|
109
|
+
if (edited instanceof Element &&
|
|
110
|
+
failure?.field !== undefined &&
|
|
111
|
+
edited.id === failure.field)
|
|
112
|
+
setFailure(null);
|
|
113
|
+
setSaved(false);
|
|
114
|
+
setFieldsChanged(hasChangedFields(event.currentTarget));
|
|
115
|
+
}, onSubmit: (event) => {
|
|
116
|
+
setFailure(null);
|
|
117
|
+
keepValuesOnReset.current = false;
|
|
118
|
+
submittedValues.current = editableValues(event.currentTarget);
|
|
119
|
+
}, children: [_jsx("fieldset", { className: "contents", disabled: !hydrated, children: children }), sectionFailure ? (_jsx(CardContent, { children: _jsx(MessageNotice, { message: sectionFailure.message, placement: "action" }) })) : null, _jsx(SaveFooter, { changed: changed, save: save, saved: saved && !changed })] }) }));
|
|
120
|
+
}
|
|
121
|
+
export function SettingsFieldFailure({ id }) {
|
|
122
|
+
const context = use(SettingsSaveContext);
|
|
123
|
+
const claim = context?.claim;
|
|
124
|
+
useEffect(() => claim?.(id), [claim, id]);
|
|
125
|
+
const message = context?.failure?.field === id ? context.failure.message : null;
|
|
126
|
+
const failureId = `${id}-failure`;
|
|
127
|
+
useEffect(() => {
|
|
128
|
+
const control = message ? document.getElementById(id) : null;
|
|
129
|
+
if (!control)
|
|
130
|
+
return;
|
|
131
|
+
const describedBy = control.getAttribute("aria-describedby");
|
|
132
|
+
const invalid = control.getAttribute("aria-invalid");
|
|
133
|
+
control.setAttribute("aria-invalid", "true");
|
|
134
|
+
control.setAttribute("aria-describedby", describedBy ? `${describedBy} ${failureId}` : failureId);
|
|
135
|
+
return () => {
|
|
136
|
+
if (invalid === null)
|
|
137
|
+
control.removeAttribute("aria-invalid");
|
|
138
|
+
else
|
|
139
|
+
control.setAttribute("aria-invalid", invalid);
|
|
140
|
+
if (describedBy === null)
|
|
141
|
+
control.removeAttribute("aria-describedby");
|
|
142
|
+
else
|
|
143
|
+
control.setAttribute("aria-describedby", describedBy);
|
|
144
|
+
};
|
|
145
|
+
}, [id, failureId, message]);
|
|
146
|
+
return message ? _jsx(FieldError, { id: failureId, children: messageSentences(message) }) : null;
|
|
147
|
+
}
|
package/dist/lib/theme-mode.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const themeModes: readonly ["
|
|
1
|
+
export declare const themeModes: readonly ["system", "light", "dark"];
|
|
2
2
|
export type ThemeMode = (typeof themeModes)[number];
|
|
3
3
|
export declare function isThemeMode(value: string | undefined): value is ThemeMode;
|
|
4
4
|
//# sourceMappingURL=theme-mode.d.ts.map
|
package/dist/lib/theme-mode.js
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { EmptyArt, EmptyArtName } from "../components/empty-art.js";
|
|
3
|
+
export declare function EmptyArtProvider({ art, children, }: {
|
|
4
|
+
art: Record<EmptyArtName, EmptyArt>;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export declare function useEmptyArt(): Record<EmptyArtName, EmptyArt>;
|
|
8
|
+
//# sourceMappingURL=assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/showcase/assets.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,SAAS,EAAO,MAAM,OAAO,CAAC;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAIrE,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,QAAQ,GACT,EAAE;IACD,GAAG,EAAE,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAEA;AAED,wBAAgB,WAAW,IAAI,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,CAI5D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, use } from "react";
|
|
4
|
+
const EmptyArtContext = createContext(null);
|
|
5
|
+
export function EmptyArtProvider({ art, children, }) {
|
|
6
|
+
return _jsx(EmptyArtContext, { value: art, children: children });
|
|
7
|
+
}
|
|
8
|
+
export function useEmptyArt() {
|
|
9
|
+
const art = use(EmptyArtContext);
|
|
10
|
+
if (!art)
|
|
11
|
+
throw new Error("A specimen with a picture renders inside Showcase");
|
|
12
|
+
return art;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foundations.d.ts","sourceRoot":"","sources":["../../src/showcase/foundations.tsx"],"names":[],"mappings":"AAgFA,wBAAgB,WAAW,gCAwH1B"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Search } from "lucide-react";
|
|
4
|
+
import { AgentOrb } from "../components/agent-orb.js";
|
|
5
|
+
import { Alert, AlertDescription, AlertTitle } from "../components/alert.js";
|
|
6
|
+
import { BrandField } from "../components/brand-field.js";
|
|
7
|
+
import { Button } from "../components/button.js";
|
|
8
|
+
import { Card, CardDescription, CardHeader, CardTitle } from "../components/card.js";
|
|
9
|
+
import { CardRow } from "../components/card-row.js";
|
|
10
|
+
import { GlassControl } from "../components/glass-control.js";
|
|
11
|
+
import { InputGroup, InputGroupAddon, InputGroupInput } from "../components/input-group.js";
|
|
12
|
+
import { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, } from "../components/popover.js";
|
|
13
|
+
import { ARANCIO, COBALTO, VERDE } from "./samples.js";
|
|
14
|
+
const NEUTRAL_ROLES = [
|
|
15
|
+
["background", "bg-background"],
|
|
16
|
+
["card", "bg-card"],
|
|
17
|
+
["muted", "bg-muted"],
|
|
18
|
+
["accent", "bg-accent"],
|
|
19
|
+
["primary", "bg-primary"],
|
|
20
|
+
["sidebar", "bg-sidebar"],
|
|
21
|
+
];
|
|
22
|
+
const EDGE_ROLES = [
|
|
23
|
+
["border", "border-border"],
|
|
24
|
+
["input", "border-input"],
|
|
25
|
+
["ring", "border-ring"],
|
|
26
|
+
];
|
|
27
|
+
const CHART_ROLES = [
|
|
28
|
+
["chart-1", "bg-chart-1"],
|
|
29
|
+
["chart-2", "bg-chart-2"],
|
|
30
|
+
["chart-3", "bg-chart-3"],
|
|
31
|
+
["chart-4", "bg-chart-4"],
|
|
32
|
+
["chart-5", "bg-chart-5"],
|
|
33
|
+
];
|
|
34
|
+
const TYPE_TOKENS = [
|
|
35
|
+
["display-xl", "nc-type-display-xl", "Agents that do the work"],
|
|
36
|
+
["display-lg", "nc-type-display-lg", "Agents that do the work"],
|
|
37
|
+
["display-md", "nc-type-display-md", "A section heading"],
|
|
38
|
+
["heading-lg", "nc-type-heading-lg", "A section title inside a page"],
|
|
39
|
+
["heading-md", "nc-type-heading-md", "A page or object title"],
|
|
40
|
+
["heading-sm", "nc-type-heading-sm", "A card or settings title"],
|
|
41
|
+
["heading-xs", "nc-type-heading-xs", "A compact card title"],
|
|
42
|
+
["button", "nc-type-button", "Save changes"],
|
|
43
|
+
["label-md", "nc-type-label-md", "Item title"],
|
|
44
|
+
["label", "nc-type-label", "Field label"],
|
|
45
|
+
["label-sm", "nc-type-label-sm", "Secondary metadata"],
|
|
46
|
+
["label-mono", "nc-type-label-mono", "AGT-0042"],
|
|
47
|
+
["body-lg", "nc-type-body-lg", "A lead paragraph that opens a page."],
|
|
48
|
+
["body-md", "nc-type-body-md", "Dialog copy and entry instructions."],
|
|
49
|
+
["body-sm", "nc-type-body-sm", "Default product descriptions that can wrap."],
|
|
50
|
+
["caption", "nc-type-caption", "Badges, compact chrome labels, footer lines."],
|
|
51
|
+
["code", "nc-type-code", "tool.call(invoice.draft, { month: 'september' })"],
|
|
52
|
+
];
|
|
53
|
+
function Name({ children }) {
|
|
54
|
+
return _jsx("code", { className: "font-mono text-xs text-muted-foreground", children: children });
|
|
55
|
+
}
|
|
56
|
+
function Group({ title, children }) {
|
|
57
|
+
return (_jsxs("section", { "aria-label": title, className: "grid gap-4", children: [_jsx("h3", { className: "text-sm font-semibold", children: title }), children] }));
|
|
58
|
+
}
|
|
59
|
+
export function Foundations() {
|
|
60
|
+
return (_jsxs("div", { className: "grid gap-12", children: [_jsxs(Group, { title: "Colour", children: [_jsxs("div", { className: "grid gap-3 sm:grid-cols-3 lg:grid-cols-6", children: [NEUTRAL_ROLES.map(([role, fill]) => (_jsxs("div", { className: "grid gap-2", children: [_jsx("div", { className: `h-16 rounded-md border border-border ${fill}` }), _jsx(Name, { children: role })] }, role))), EDGE_ROLES.map(([role, edge]) => (_jsxs("div", { className: "grid gap-2", children: [_jsx("div", { className: `h-16 rounded-md border-2 bg-background ${edge}` }), _jsx(Name, { children: role })] }, role)))] }), _jsx("div", { className: "grid gap-3 sm:grid-cols-5", children: CHART_ROLES.map(([role, fill]) => (_jsxs("div", { className: "grid gap-2", children: [_jsx("div", { className: `h-16 rounded-md ${fill}` }), _jsx(Name, { children: role })] }, role))) }), _jsxs("div", { className: "grid gap-3 md:grid-cols-3", children: [_jsxs(Alert, { variant: "info", children: [_jsx(AlertTitle, { children: "Info" }), _jsx(AlertDescription, { children: _jsx(Name, { children: "info-soft" }) })] }), _jsxs(Alert, { variant: "warning", children: [_jsx(AlertTitle, { children: "Warning" }), _jsx(AlertDescription, { children: _jsx(Name, { children: "warning-soft" }) })] }), _jsxs(Alert, { variant: "destructive", children: [_jsx(AlertTitle, { children: "Error" }), _jsx(AlertDescription, { children: _jsx(Name, { children: "destructive-soft" }) })] })] })] }), _jsx(Group, { title: "Type", children: _jsx("div", { className: "grid gap-4", children: TYPE_TOKENS.map(([token, typeClass, sample]) => (_jsxs("div", { className: "grid gap-1 border-b border-border pb-4 last:border-0", children: [_jsx(Name, { children: token }), _jsx("p", { className: `m-0 ${typeClass}`, children: sample })] }, token))) }) }), _jsx(Group, { title: "Heights", children: _jsxs(CardRow, { columns: 3, from: "md", children: [["resting", "raised", "outlined", "plain"].map((surface) => (_jsx(Card, { surface: surface, children: _jsxs(CardHeader, { children: [_jsx(CardTitle, { className: "capitalize", children: surface }), _jsx(CardDescription, { children: _jsx(Name, { children: `Card surface="${surface}"` }) })] }) }, surface))), ["floating", "modal"].map((height) => (_jsxs("div", { className: `nc-elevation-${height} grid gap-1 rounded-md bg-popover p-6 text-popover-foreground`, children: [_jsx("p", { className: "text-base font-semibold capitalize", children: height }), _jsx(Name, { children: `nc-elevation-${height}` })] }, height)))] }) }), _jsx(Group, { title: "Glass", children: _jsx("div", { className: "overflow-hidden rounded-md", children: _jsxs(BrandField, { className: "relative isolate grid min-h-80 content-center p-6 sm:p-10", children: [_jsxs("div", { "aria-hidden": "true", className: "pointer-events-none absolute inset-0 -z-10 flex items-center justify-around", children: [_jsx(AgentOrb, { color: COBALTO, decorative: true, form: "globe", motion: "ambient", size: 160 }), _jsx(AgentOrb, { color: VERDE, decorative: true, form: "network", motion: "ambient", size: 96 }), _jsx(AgentOrb, { color: ARANCIO, decorative: true, form: "morph", motion: "ambient", size: 160 })] }), _jsxs(GlassControl, { className: "mx-auto flex w-full max-w-3xl flex-wrap gap-2 p-2", children: [_jsx("div", { className: "min-w-48 flex-1", children: _jsxs(InputGroup, { children: [_jsx(InputGroupAddon, { children: _jsx(Search, { "aria-hidden": "true" }) }), _jsx(InputGroupInput, { "aria-label": "Find", placeholder: "Find an Agent" })] }) }), _jsxs(Popover, { children: [_jsx(PopoverTrigger, { render: _jsx(Button, { variant: "outline", children: "Popover" }) }), _jsx(PopoverContent, { align: "end", children: _jsxs(PopoverHeader, { children: [_jsx(PopoverTitle, { children: "Glass over colour" }), _jsx(PopoverDescription, { children: "The stage and the moving Agents show through." })] }) })] })] })] }) }) })] }));
|
|
61
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { MenuCommand } from "../components/action-menu.js";
|
|
2
|
+
import type { PageCommand, PageMenu } from "../components/page-actions.js";
|
|
3
|
+
import { type ResolvedMessage } from "../components/product-message.js";
|
|
4
|
+
export declare const nothing: () => undefined;
|
|
5
|
+
export declare const COBALTO: string;
|
|
6
|
+
export declare const VERDE: string;
|
|
7
|
+
export declare const ARANCIO: string;
|
|
8
|
+
export declare const sampleMessage: (title: string, body?: string, actions?: PageCommand[]) => ResolvedMessage;
|
|
9
|
+
export declare const FAILED_READ: ResolvedMessage;
|
|
10
|
+
export declare const RECORD_COMMANDS: readonly MenuCommand[];
|
|
11
|
+
export declare const PAGE_MENU: PageMenu;
|
|
12
|
+
export type Mailbox = {
|
|
13
|
+
id: string;
|
|
14
|
+
address: string;
|
|
15
|
+
owner: string;
|
|
16
|
+
status: "connected" | "failed";
|
|
17
|
+
checked: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const MAILBOXES: readonly Mailbox[];
|
|
20
|
+
export declare const NOW: number;
|
|
21
|
+
//# sourceMappingURL=samples.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"samples.d.ts","sourceRoot":"","sources":["../../src/showcase/samples.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,KAAK,eAAe,EAAe,MAAM,8BAA8B,CAAC;AAEjF,eAAO,MAAM,OAAO,iBAAkB,CAAC;AAEvC,eAAO,MAAM,OAAO,QAA8B,CAAC;AACnD,eAAO,MAAM,KAAK,QAA4B,CAAC;AAC/C,eAAO,MAAM,OAAO,QAA8B,CAAC;AAEnD,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,EAAE,aAAS,EAAE,UAAS,WAAW,EAAO,oBACnB,CAAC;AAEjE,eAAO,MAAM,WAAW,EAAE,eAIzB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,SAAS,WAAW,EAIjD,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,QAOvB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,SAAS,OAAO,EAsBvC,CAAC;AAEF,eAAO,MAAM,GAAG,QAAqC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Copy, Pencil, Trash2 } from "lucide-react";
|
|
3
|
+
import { agentOrbColorTokens } from "../components/agent-orb-appearance.js";
|
|
4
|
+
// eslint-disable-next-line product-message/imports -- the showcase words its own sample messages, which no product shows
|
|
5
|
+
import { wordMessage } from "../components/product-message.js";
|
|
6
|
+
export const nothing = () => undefined;
|
|
7
|
+
export const COBALTO = agentOrbColorTokens.cobalto;
|
|
8
|
+
export const VERDE = agentOrbColorTokens.verde;
|
|
9
|
+
export const ARANCIO = agentOrbColorTokens.arancio;
|
|
10
|
+
export const sampleMessage = (title, body = "", actions = []) => wordMessage({ code: "showcase.sample", title, body, actions });
|
|
11
|
+
export const FAILED_READ = sampleMessage("Couldn't load the mailboxes", "Check your connection, then try again.", [{ label: "Try again", onClick: nothing }]);
|
|
12
|
+
export const RECORD_COMMANDS = [
|
|
13
|
+
{ label: "Rename mailbox", icon: _jsx(Pencil, {}), onClick: nothing },
|
|
14
|
+
{ label: "Copy address", icon: _jsx(Copy, {}), onClick: nothing },
|
|
15
|
+
{ label: "Remove mailbox", icon: _jsx(Trash2, {}), destructive: true, onClick: nothing },
|
|
16
|
+
];
|
|
17
|
+
export const PAGE_MENU = {
|
|
18
|
+
label: "More for Customers",
|
|
19
|
+
record: "Customers",
|
|
20
|
+
commands: [
|
|
21
|
+
{ label: "Export customers", icon: _jsx(Copy, {}), onClick: nothing },
|
|
22
|
+
{ label: "Rename list", icon: _jsx(Pencil, {}), onClick: nothing },
|
|
23
|
+
],
|
|
24
|
+
};
|
|
25
|
+
export const MAILBOXES = [
|
|
26
|
+
{
|
|
27
|
+
id: "pec",
|
|
28
|
+
address: "pec@acme.it",
|
|
29
|
+
owner: "Invoices",
|
|
30
|
+
status: "connected",
|
|
31
|
+
checked: "2026-10-14T07:30:00Z",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "orders",
|
|
35
|
+
address: "orders@acme.it",
|
|
36
|
+
owner: "Orders",
|
|
37
|
+
status: "failed",
|
|
38
|
+
checked: "2026-10-13T16:05:00Z",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "support",
|
|
42
|
+
address: "support@acme.it",
|
|
43
|
+
owner: "Support",
|
|
44
|
+
status: "connected",
|
|
45
|
+
checked: "2026-10-12T09:12:00Z",
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
export const NOW = Date.parse("2026-10-14T10:00:00Z");
|