@nadicodeai/ui 12.1.96 → 12.1.98
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 +16 -2
- 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 +18 -1
- 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 +11 -1
- 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 +18 -2
- 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 +21 -8
- 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 +16 -1
- 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 +16 -1
- 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 +17 -1
- 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 +18 -2
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI3E,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,WAA0B,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,KAAK,+BAY/F;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI3E;;;;;;;;;;GAUG;AACH,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,WAA0B,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,KAAK,+BAY/F;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
|
+
/**
|
|
5
|
+
* A 1 px line between groups.
|
|
6
|
+
*
|
|
7
|
+
* @family Other
|
|
8
|
+
* @when Separating groups inside one surface: menu sections, a card's header from its toolbar.
|
|
9
|
+
* @instead A card's footer draws its own seam; a list in a card is a `divided` `ItemGroup`. Never a
|
|
10
|
+
* border around a region.
|
|
11
|
+
* @behaviour Horizontal or vertical, in the line colour.
|
|
12
|
+
* @words None.
|
|
13
|
+
* @access A `separator` from Base UI with no name of its own.
|
|
14
|
+
*/
|
|
4
15
|
function Separator({ className, orientation = "horizontal", ...props }) {
|
|
5
16
|
return (_jsx(SeparatorPrimitive, { "data-slot": "separator", orientation: orientation, className: cn("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch", className), ...props }));
|
|
6
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
2
|
import { Card, type CardSurface } from "./card.js";
|
|
3
3
|
export type SettingsFact = {
|
|
4
4
|
/**
|
|
@@ -30,5 +30,22 @@ export type SettingsFactsSectionProps = Omit<ComponentPropsWithoutRef<"section">
|
|
|
30
30
|
*/
|
|
31
31
|
size?: ComponentPropsWithoutRef<typeof Card>["size"];
|
|
32
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* Read-only facts about one object, framed as a card with a title and one action.
|
|
35
|
+
*
|
|
36
|
+
* @family Data
|
|
37
|
+
* @when Read-only facts about one object: who it is, where it belongs, its identifiers.
|
|
38
|
+
* `SettingsFactsSection` frames them as a card with a title and one action; `ObjectFacts` is the
|
|
39
|
+
* list alone.
|
|
40
|
+
* @instead Facts a person changes are a `SettingsSection` with its own Save. Facts compared across
|
|
41
|
+
* records are a table. A relation is its identity or a `Tag`, never its own card.
|
|
42
|
+
* @behaviour Label above value, two equal columns, one column on a phone. Every label stays when
|
|
43
|
+
* its value is missing, as *—*. A long value spans both columns. No fact gets a box of its own. In
|
|
44
|
+
* a side column, `presentation="summary"` drops the card.
|
|
45
|
+
* @words Labels are nouns, sentence case, no colon: *VAT number*. Values are exact: identifiers in
|
|
46
|
+
* mono with a copy button, dates in the person's locale.
|
|
47
|
+
* @access A `dl` of `dt` and `dd`, each value named by its label. The section is labelled by its heading, which also takes focus
|
|
48
|
+
* when an editor closes. A dash carries screen-reader text.
|
|
49
|
+
*/
|
|
33
50
|
export declare function SettingsFactsSection({ action, presentation, description, facts, footer, missingValueLabel, headingId, title, surface, size, ...props }: SettingsFactsSectionProps): import("react").JSX.Element;
|
|
34
51
|
//# sourceMappingURL=settings-facts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-facts.d.ts","sourceRoot":"","sources":["../../src/components/settings-facts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"settings-facts.d.ts","sourceRoot":"","sources":["../../src/components/settings-facts.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAK7E,OAAO,EACL,IAAI,EAOJ,KAAK,WAAW,EACjB,MAAM,QAAQ,CAAC;AAEhB,MAAM,MAAM,YAAY,GAAG;IACzB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,wBAAwB,CAAC,SAAS,CAAC,EACnC,UAAU,GAAG,WAAW,CACzB,GAAG;IACF,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAC/B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,wBAAwB,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;CACtD,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,YAAqB,EACrB,WAAW,EACX,KAAK,EACL,MAAM,EACN,iBAAiB,EACjB,SAAS,EACT,KAAK,EACL,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,yBAAyB,+BA+D3B"}
|
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
2
3
|
import { ObjectFacts } from "./object-workspace.js";
|
|
3
4
|
import { TableValue } from "./table-value.js";
|
|
4
5
|
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "./card.js";
|
|
6
|
+
/**
|
|
7
|
+
* Read-only facts about one object, framed as a card with a title and one action.
|
|
8
|
+
*
|
|
9
|
+
* @family Data
|
|
10
|
+
* @when Read-only facts about one object: who it is, where it belongs, its identifiers.
|
|
11
|
+
* `SettingsFactsSection` frames them as a card with a title and one action; `ObjectFacts` is the
|
|
12
|
+
* list alone.
|
|
13
|
+
* @instead Facts a person changes are a `SettingsSection` with its own Save. Facts compared across
|
|
14
|
+
* records are a table. A relation is its identity or a `Tag`, never its own card.
|
|
15
|
+
* @behaviour Label above value, two equal columns, one column on a phone. Every label stays when
|
|
16
|
+
* its value is missing, as *—*. A long value spans both columns. No fact gets a box of its own. In
|
|
17
|
+
* a side column, `presentation="summary"` drops the card.
|
|
18
|
+
* @words Labels are nouns, sentence case, no colon: *VAT number*. Values are exact: identifiers in
|
|
19
|
+
* mono with a copy button, dates in the person's locale.
|
|
20
|
+
* @access A `dl` of `dt` and `dd`, each value named by its label. The section is labelled by its heading, which also takes focus
|
|
21
|
+
* when an editor closes. A dash carries screen-reader text.
|
|
22
|
+
*/
|
|
5
23
|
export function SettingsFactsSection({ action, presentation = "card", description, facts, footer, missingValueLabel, headingId, title, surface = "resting", size = "default", ...props }) {
|
|
24
|
+
const termId = useId();
|
|
6
25
|
if (presentation === "summary") {
|
|
7
|
-
return (_jsxs("section", { ...props, "aria-labelledby": headingId, className: "grid min-w-0 gap-3", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [_jsx("h2", { id: headingId, tabIndex: -1, className: "text-sm font-medium", children: title }), action] }), description ? _jsx("p", { className: "text-sm text-muted-foreground", children: description }) : null, _jsx("dl", { className: "flex flex-wrap items-start gap-x-6 gap-y-3", children: facts.map((fact) => (_jsxs("div", { className: "grid gap-1", children: [_jsx("dt", { className: "text-xs text-muted-foreground", children: fact.label }), _jsx("dd", { className: "text-sm", children: fact.value ?? _jsx(TableValue, { missingLabel: missingValueLabel, value: null }) })] }, fact.label))) }), footer] }));
|
|
26
|
+
return (_jsxs("section", { ...props, "aria-labelledby": headingId, className: "grid min-w-0 gap-3", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [_jsx("h2", { id: headingId, tabIndex: -1, className: "text-sm font-medium", children: title }), action] }), description ? _jsx("p", { className: "text-sm text-muted-foreground", children: description }) : null, _jsx("dl", { className: "flex flex-wrap items-start gap-x-6 gap-y-3", children: facts.map((fact, index) => (_jsxs("div", { className: "grid gap-1", children: [_jsx("dt", { className: "text-xs text-muted-foreground", id: `${termId}-${index}`, children: fact.label }), _jsx("dd", { "aria-labelledby": `${termId}-${index}`, className: "text-sm", children: fact.value ?? _jsx(TableValue, { missingLabel: missingValueLabel, value: null }) })] }, fact.label))) }), footer] }));
|
|
8
27
|
}
|
|
9
28
|
return (_jsxs(Card, { render: _jsx("section", {}), ...props, "aria-labelledby": headingId, surface: surface, size: size, className: "min-w-0", children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: _jsx("h2", { id: headingId, tabIndex: -1, children: title }) }), description ? _jsx(CardDescription, { children: description }) : null, action ? _jsx(CardAction, { children: action }) : null] }), _jsx(CardContent, { children: _jsx(ObjectFacts, { facts: facts.map((fact) => ({
|
|
10
29
|
label: fact.label,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ComponentProps, ReactElement, ReactNode } from "react";
|
|
2
|
+
export type SettingsPageProps = {
|
|
3
|
+
/** A screen-reader h1, where the product's chrome does not draw one: the path already names the place. */
|
|
4
|
+
title?: string;
|
|
5
|
+
headingProps?: Omit<ComponentProps<"h1">, "children">;
|
|
6
|
+
/** The section cards, in order: SettingsSection, SettingsFactsSection. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* A page of settings: a centred column of section cards, each saving its own values.
|
|
11
|
+
*
|
|
12
|
+
* @family Compositions
|
|
13
|
+
* @when A place whose job is changing how something behaves: an account's profile, a company's identity, Nadia's notifications.
|
|
14
|
+
* @instead One object's page with a settings card among its sections is an ObjectPage; Theme and Language, which apply on change, stay in the account menu.
|
|
15
|
+
* @behaviour The sections stack 20 apart in a centred column at most 56rem wide. The page draws no header and no save of its own: each SettingsSection saves from its footer.
|
|
16
|
+
* @words `title` names the place as the navigation does ("Profile"); the sections' titles and lines carry the rest.
|
|
17
|
+
* @access `title` becomes a visually hidden h1 for a product whose chrome shows the place without a heading; leave it out where the chrome already draws the h1.
|
|
18
|
+
*/
|
|
19
|
+
export declare function SettingsPage({ title, headingProps, children }: SettingsPageProps): ReactElement;
|
|
20
|
+
//# sourceMappingURL=settings-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-page.d.ts","sourceRoot":"","sources":["../../src/components/settings-page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKrE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,0GAA0G;IAC1G,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;IACtD,0EAA0E;IAC1E,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,iBAAiB,GAAG,YAAY,CAW/F"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
import { ReadingColumn } from "./reading-column.js";
|
|
4
|
+
/**
|
|
5
|
+
* A page of settings: a centred column of section cards, each saving its own values.
|
|
6
|
+
*
|
|
7
|
+
* @family Compositions
|
|
8
|
+
* @when A place whose job is changing how something behaves: an account's profile, a company's identity, Nadia's notifications.
|
|
9
|
+
* @instead One object's page with a settings card among its sections is an ObjectPage; Theme and Language, which apply on change, stay in the account menu.
|
|
10
|
+
* @behaviour The sections stack 20 apart in a centred column at most 56rem wide. The page draws no header and no save of its own: each SettingsSection saves from its footer.
|
|
11
|
+
* @words `title` names the place as the navigation does ("Profile"); the sections' titles and lines carry the rest.
|
|
12
|
+
* @access `title` becomes a visually hidden h1 for a product whose chrome shows the place without a heading; leave it out where the chrome already draws the h1.
|
|
13
|
+
*/
|
|
14
|
+
export function SettingsPage({ title, headingProps, children }) {
|
|
15
|
+
return (_jsxs(ReadingColumn, { className: "gap-5", width: "configuration", children: [title ? (_jsx("h1", { ...headingProps, className: cn("sr-only", headingProps?.className), children: title })) : null, children] }));
|
|
16
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { type
|
|
2
|
+
import { type SettingsSave } from "../internal/settings-save.js";
|
|
3
3
|
import { Field } from "./field.js";
|
|
4
|
+
export type { SettingsSave, SettingsSaveFailure } from "../internal/settings-save.js";
|
|
4
5
|
export type SettingsFieldControlProps = {
|
|
5
6
|
id: string;
|
|
6
7
|
"aria-invalid"?: true;
|
|
@@ -8,16 +9,45 @@ export type SettingsFieldControlProps = {
|
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
required?: boolean;
|
|
10
11
|
};
|
|
11
|
-
|
|
12
|
-
title
|
|
13
|
-
|
|
12
|
+
export type SettingsSectionProps = Omit<React.ComponentProps<"section">, "title" | "children"> & {
|
|
13
|
+
title: string;
|
|
14
|
+
/** One line saying what changing it does. */
|
|
15
|
+
description: string;
|
|
16
|
+
/** A control on the section's own header: an avatar's upload, a state. */
|
|
14
17
|
actions?: React.ReactNode;
|
|
18
|
+
/** Two columns where related fields fit. */
|
|
19
|
+
columns?: 1 | 2;
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
} & ({
|
|
22
|
+
save: SettingsSave;
|
|
23
|
+
footer?: never;
|
|
24
|
+
footerHint?: never;
|
|
25
|
+
} | {
|
|
26
|
+
save?: never;
|
|
15
27
|
footer?: React.ReactNode;
|
|
16
28
|
footerHint?: React.ReactNode;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* A card of related settings that says what changing them does and saves them from its own footer.
|
|
32
|
+
*
|
|
33
|
+
* @family Compositions
|
|
34
|
+
* @when A few related values a person changes and saves together, on a SettingsPage or as a section of an ObjectPage: Personal details, Company identity, Notifications.
|
|
35
|
+
* @instead Read-only values are a SettingsFactsSection; Theme and Language, which apply on change, live in the account menu; a record's edit in a list is a RowEditForm.
|
|
36
|
+
* @behaviour With `save`: Save stays disabled until a field differs from what is saved, says `pendingLabel` while saving with Cancel held beside it, then the footer shows the ok check and `savedLabel` until the next change. A failure keeps every value and shows under its field until that field changes, or above the footer until the next save. A `cancel` that runs work of its own says its `pendingLabel` while `pending`. Without `save`, the footer holds `footerHint` and `footer`, and is left out when both are.
|
|
37
|
+
* @words The title names the values ("Personal details"); the description says what changing them does, in one line; the hint says where the save applies ("Saved for every device you sign in on."); Save, Saving and Saved come from the product's catalogue.
|
|
38
|
+
* @access The title is the section's h2 and names the form that saves it. The footer's hint and saved line are one status, announced politely; a failure under a field marks the control invalid and describes it.
|
|
39
|
+
*/
|
|
40
|
+
declare function SettingsSection({ title, description, actions, columns, children, className, save, footer, footerHint, ...props }: SettingsSectionProps): React.JSX.Element;
|
|
41
|
+
/**
|
|
42
|
+
* One setting: its label and help above its control, and what went wrong under it.
|
|
43
|
+
*
|
|
44
|
+
* @family Inputs
|
|
45
|
+
* @when A value inside a SettingsSection: a name, an address, a choice, a switch.
|
|
46
|
+
* @instead A field of a drawer's or a dialog's form is a Field from the form's own owner; a read-only value is a fact in a SettingsFactsSection.
|
|
47
|
+
* @behaviour The control is 20rem wide under its label and help by default; a switch row passes `orientation="horizontal"` and sits at the end of its label's row at its own width. A validation `error`, or a failed save about this field, shows under the control and marks it invalid.
|
|
48
|
+
* @words The label is a noun for the value ("Display name"); the help is one line saying what it is for or where it shows; an error says what to do next.
|
|
49
|
+
* @access The control receives its id, `aria-invalid` and `aria-describedby` through `controlProps`, so the label, help and error are read with it.
|
|
50
|
+
*/
|
|
21
51
|
declare function SettingsField({ id, label, description, error, invalid, disabled, required, orientation, children, className, contentClassName, controlClassName, controlWidth, ...props }: Omit<React.ComponentProps<typeof Field>, "children"> & {
|
|
22
52
|
id: string;
|
|
23
53
|
label: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../src/components/settings-section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,
|
|
1
|
+
{"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../src/components/settings-section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,KAAK,EAMN,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAElF,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE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S,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,YAAY,EAAE,yBAAyB,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IAClF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;CAChD,qBAyDA;AAED,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,12 +1,36 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
2
3
|
import { cn } from "../lib/utils.js";
|
|
3
4
|
import { FooterStrip } from "../internal/footer-strip.js";
|
|
4
|
-
import {
|
|
5
|
+
import { SettingsFieldFailure, SettingsSaveForm, } from "../internal/settings-save.js";
|
|
6
|
+
import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "./card.js";
|
|
5
7
|
import { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, } from "./field.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* A card of related settings that says what changing them does and saves them from its own footer.
|
|
10
|
+
*
|
|
11
|
+
* @family Compositions
|
|
12
|
+
* @when A few related values a person changes and saves together, on a SettingsPage or as a section of an ObjectPage: Personal details, Company identity, Notifications.
|
|
13
|
+
* @instead Read-only values are a SettingsFactsSection; Theme and Language, which apply on change, live in the account menu; a record's edit in a list is a RowEditForm.
|
|
14
|
+
* @behaviour With `save`: Save stays disabled until a field differs from what is saved, says `pendingLabel` while saving with Cancel held beside it, then the footer shows the ok check and `savedLabel` until the next change. A failure keeps every value and shows under its field until that field changes, or above the footer until the next save. A `cancel` that runs work of its own says its `pendingLabel` while `pending`. Without `save`, the footer holds `footerHint` and `footer`, and is left out when both are.
|
|
15
|
+
* @words The title names the values ("Personal details"); the description says what changing them does, in one line; the hint says where the save applies ("Saved for every device you sign in on."); Save, Saving and Saved come from the product's catalogue.
|
|
16
|
+
* @access The title is the section's h2 and names the form that saves it. The footer's hint and saved line are one status, announced politely; a failure under a field marks the control invalid and describes it.
|
|
17
|
+
*/
|
|
18
|
+
function SettingsSection({ title, description, actions, columns = 1, children, className, save, footer, footerHint, ...props }) {
|
|
19
|
+
const titleId = React.useId();
|
|
20
|
+
const fields = children != null ? (_jsx(CardContent, { children: _jsx(FieldGroup, { "data-slot": "settings-section-fields", className: cn("gap-4.5", columns === 2 && "grid @2xl/settings-section:grid-cols-2"), children: children }) })) : null;
|
|
21
|
+
return (_jsxs(Card, { render: _jsx("section", { ...props, "data-slot": "settings-section" }), className: cn("@container/settings-section min-w-0", className), children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: _jsx("h2", { id: titleId, children: title }) }), _jsx(CardDescription, { children: description }), actions ? _jsx(CardAction, { children: actions }) : null] }), save ? (_jsx(SettingsSaveForm, { save: save, titleId: titleId, children: fields })) : (_jsxs(_Fragment, { children: [fields, _jsx(FooterStrip, { hint: footerHint, hintSlot: "settings-section-hint", children: footer })] }))] }));
|
|
8
22
|
}
|
|
9
|
-
|
|
23
|
+
/**
|
|
24
|
+
* One setting: its label and help above its control, and what went wrong under it.
|
|
25
|
+
*
|
|
26
|
+
* @family Inputs
|
|
27
|
+
* @when A value inside a SettingsSection: a name, an address, a choice, a switch.
|
|
28
|
+
* @instead A field of a drawer's or a dialog's form is a Field from the form's own owner; a read-only value is a fact in a SettingsFactsSection.
|
|
29
|
+
* @behaviour The control is 20rem wide under its label and help by default; a switch row passes `orientation="horizontal"` and sits at the end of its label's row at its own width. A validation `error`, or a failed save about this field, shows under the control and marks it invalid.
|
|
30
|
+
* @words The label is a noun for the value ("Display name"); the help is one line saying what it is for or where it shows; an error says what to do next.
|
|
31
|
+
* @access The control receives its id, `aria-invalid` and `aria-describedby` through `controlProps`, so the label, help and error are read with it.
|
|
32
|
+
*/
|
|
33
|
+
function SettingsField({ id, label, description, error, invalid = Boolean(error), disabled, required, orientation = "vertical", children, className, contentClassName, controlClassName, controlWidth = orientation === "horizontal" ? "natural" : "standard", ...props }) {
|
|
10
34
|
const descriptionId = description ? `${id}-description` : undefined;
|
|
11
35
|
const errorId = error ? `${id}-error` : undefined;
|
|
12
36
|
const describedBy = [descriptionId, errorId].filter(Boolean).join(" ");
|
|
@@ -17,7 +41,9 @@ function SettingsField({ id, label, description, error, invalid = Boolean(error)
|
|
|
17
41
|
"aria-invalid": invalid ? true : undefined,
|
|
18
42
|
"aria-describedby": describedBy || undefined,
|
|
19
43
|
};
|
|
20
|
-
|
|
44
|
+
const errors = (_jsxs(_Fragment, { children: [error ? _jsx(FieldError, { id: errorId, children: error }) : null, _jsx(SettingsFieldFailure, { id: id })] }));
|
|
45
|
+
const errorsUnderControl = orientation === "vertical";
|
|
46
|
+
return (_jsx("div", { "data-slot": "settings-field", "data-invalid": invalid ? true : undefined, className: "contents", children: _jsxs(Field, { "data-invalid": invalid ? true : undefined, "data-disabled": disabled ? true : undefined, orientation: orientation, className: cn("items-start", className), ...props, children: [_jsxs(FieldContent, { className: contentClassName, children: [_jsx(FieldLabel, { htmlFor: id, children: label }), description ? (_jsx(FieldDescription, { id: descriptionId, children: description })) : null, errorsUnderControl ? null : errors] }), _jsx("div", { "data-slot": "settings-field-control", className: cn("flex min-w-0", controlWidth === "standard"
|
|
21
47
|
? "w-full max-w-80 justify-start [&>:not([role=checkbox],[role=switch],[role=radio])]:w-full"
|
|
22
48
|
: controlWidth === "full"
|
|
23
49
|
? "w-full justify-start [&>:not([role=checkbox],[role=switch],[role=radio])]:w-full"
|
|
@@ -25,6 +51,6 @@ function SettingsField({ id, label, description, error, invalid = Boolean(error)
|
|
|
25
51
|
? "w-full justify-start"
|
|
26
52
|
: orientation === "horizontal"
|
|
27
53
|
? "shrink-0 justify-end"
|
|
28
|
-
: "w-full justify-start @md/field-group:w-auto @md/field-group:min-w-64 @md/field-group:justify-end", controlClassName), children: children({ controlProps }) })] }) }));
|
|
54
|
+
: "w-full justify-start @md/field-group:w-auto @md/field-group:min-w-64 @md/field-group:justify-end", controlClassName), children: children({ controlProps }) }), errorsUnderControl ? errors : null] }) }));
|
|
29
55
|
}
|
|
30
56
|
export { SettingsField, SettingsSection };
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
3
|
+
/**
|
|
4
|
+
* A panel beside a record, or the navigation on a narrow window.
|
|
5
|
+
*
|
|
6
|
+
* @family Menus
|
|
7
|
+
* @when Context that belongs beside a record: inspecting a row's details. And the product's
|
|
8
|
+
* navigation when the window is too narrow for the sidebar.
|
|
9
|
+
* @instead For a catalogue or steps use `FormDrawer` (built on this). For editing use the row or
|
|
10
|
+
* the record's page. For a blocking decision use `ConfirmDialog`.
|
|
11
|
+
* @behaviour From any side, 12 px from the edges, 12 px corners all round, modal over the scrim.
|
|
12
|
+
* Default 3/4 of the window up to 384 px; navigation 288 px. Header 24 px padding; body scrolls;
|
|
13
|
+
* footer recessed.
|
|
14
|
+
* @words Title is the record's name, never the page's heading again. A footer link names where it
|
|
15
|
+
* goes: *Open Rossi Ottica*.
|
|
16
|
+
* @access A modal dialog named by its title with a named close. Focus returns to the row it
|
|
17
|
+
* inspects, or to the navigation button.
|
|
18
|
+
*/
|
|
3
19
|
declare function Sheet({ ...props }: SheetPrimitive.Root.Props): React.JSX.Element;
|
|
4
20
|
declare function SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props): React.JSX.Element;
|
|
5
21
|
declare function SheetClose({ ...props }: SheetPrimitive.Close.Props): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/components/sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAOjE,iBAAS,KAAK,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,KAAK,qBAErD;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,CAAC,KAAK,qBAE/D;AAED,iBAAS,UAAU,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,KAAK,qBAE3D;
|
|
1
|
+
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/components/sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAOjE;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,KAAK,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,KAAK,qBAErD;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,CAAC,KAAK,qBAE/D;AAED,iBAAS,UAAU,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,KAAK,qBAE3D;AAqBD,KAAK,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,KAAK,GAAG;IACpD,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B,CAAC;AAEF,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,QAAQ,EACR,IAAc,EACd,eAAsB,EACtB,UAAoB,EACpB,GAAG,KAAK,EACT,EAAE,iBAAiB,qBAiCnB;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQxE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,KAAK,qBAQtE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,WAAW,CAAC,KAAK,qBAQlF;AAED,OAAO,EACL,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,GACjB,CAAC"}
|
package/dist/components/sheet.js
CHANGED
|
@@ -5,6 +5,22 @@ import { cn } from "../lib/utils.js";
|
|
|
5
5
|
import { overlayBackdropMotion } from "../lib/motion.js";
|
|
6
6
|
import { Button } from "./button.js";
|
|
7
7
|
import { XIcon } from "lucide-react";
|
|
8
|
+
/**
|
|
9
|
+
* A panel beside a record, or the navigation on a narrow window.
|
|
10
|
+
*
|
|
11
|
+
* @family Menus
|
|
12
|
+
* @when Context that belongs beside a record: inspecting a row's details. And the product's
|
|
13
|
+
* navigation when the window is too narrow for the sidebar.
|
|
14
|
+
* @instead For a catalogue or steps use `FormDrawer` (built on this). For editing use the row or
|
|
15
|
+
* the record's page. For a blocking decision use `ConfirmDialog`.
|
|
16
|
+
* @behaviour From any side, 12 px from the edges, 12 px corners all round, modal over the scrim.
|
|
17
|
+
* Default 3/4 of the window up to 384 px; navigation 288 px. Header 24 px padding; body scrolls;
|
|
18
|
+
* footer recessed.
|
|
19
|
+
* @words Title is the record's name, never the page's heading again. A footer link names where it
|
|
20
|
+
* goes: *Open Rossi Ottica*.
|
|
21
|
+
* @access A modal dialog named by its title with a named close. Focus returns to the row it
|
|
22
|
+
* inspects, or to the navigation button.
|
|
23
|
+
*/
|
|
8
24
|
function Sheet({ ...props }) {
|
|
9
25
|
return _jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
10
26
|
}
|
|
@@ -18,10 +34,10 @@ function SheetPortal({ ...props }) {
|
|
|
18
34
|
return _jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
19
35
|
}
|
|
20
36
|
function SheetOverlay({ className, ...props }) {
|
|
21
|
-
return (_jsx(SheetPrimitive.Backdrop, { "data-slot": "sheet-overlay", className: cn("fixed inset-0 z-50 bg-scrim/scrim", overlayBackdropMotion, className), ...props }));
|
|
37
|
+
return (_jsx(SheetPrimitive.Backdrop, { "data-slot": "sheet-overlay", className: cn("pointer-events-auto", "fixed inset-0 z-50 bg-scrim/scrim", overlayBackdropMotion, className), ...props }));
|
|
22
38
|
}
|
|
23
39
|
function SheetContent({ className, children, side = "right", showCloseButton = true, closeLabel = "Close", ...props }) {
|
|
24
|
-
return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Popup, { "data-slot": "sheet-content", "data-side": side, className: cn("fixed z-50 flex max-h-[calc(100%-var(--nc-lg))] flex-col gap-nadicode-md rounded-lg border-0 bg-popover bg-clip-padding text-sm text-popover-foreground nc-elevation-modal transition-[opacity,translate] duration-[var(--nc-duration-close)] ease-[var(--nc-ease-out-strong)] data-open:duration-[var(--nc-duration-open)] data-ending-style:opacity-0 data-starting-style:opacity-0 motion-reduce:transition-opacity data-[side=bottom]:inset-x-nadicode-sm data-[side=bottom]:bottom-nadicode-sm data-[side=bottom]:h-auto data-[side=bottom]:data-ending-style:translate-y-nadicode-md data-[side=bottom]:data-starting-style:translate-y-nadicode-md motion-reduce:data-[side=bottom]:data-ending-style:translate-none motion-reduce:data-[side=bottom]:data-starting-style:translate-none data-[side=left]:inset-y-nadicode-sm data-[side=left]:left-nadicode-sm data-[side=left]:w-3/4 data-[side=left]:data-ending-style:-translate-x-nadicode-md data-[side=left]:data-starting-style:-translate-x-nadicode-md motion-reduce:data-[side=left]:data-ending-style:translate-none motion-reduce:data-[side=left]:data-starting-style:translate-none data-[side=right]:inset-y-nadicode-sm data-[side=right]:right-nadicode-sm data-[side=right]:w-3/4 data-[side=right]:data-ending-style:translate-x-nadicode-md data-[side=right]:data-starting-style:translate-x-nadicode-md motion-reduce:data-[side=right]:data-ending-style:translate-none motion-reduce:data-[side=right]:data-starting-style:translate-none data-[side=top]:inset-x-nadicode-sm data-[side=top]:top-nadicode-sm data-[side=top]:h-auto data-[side=top]:data-ending-style:-translate-y-nadicode-md data-[side=top]:data-starting-style:-translate-y-nadicode-md motion-reduce:data-[side=top]:data-ending-style:translate-none motion-reduce:data-[side=top]:data-starting-style:translate-none data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className), ...props, children: [children, showCloseButton && (_jsxs(SheetPrimitive.Close, { "data-slot": "sheet-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-nadicode-md right-nadicode-md", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: closeLabel })] }))] })] }));
|
|
40
|
+
return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Popup, { "data-slot": "sheet-content", "data-side": side, className: cn("pointer-events-auto", "fixed z-50 flex max-h-[calc(100%-var(--nc-lg))] flex-col gap-nadicode-md rounded-lg border-0 bg-popover bg-clip-padding text-sm text-popover-foreground nc-elevation-modal transition-[opacity,translate] duration-[var(--nc-duration-close)] ease-[var(--nc-ease-out-strong)] data-open:duration-[var(--nc-duration-open)] data-ending-style:opacity-0 data-starting-style:opacity-0 motion-reduce:transition-opacity data-[side=bottom]:inset-x-nadicode-sm data-[side=bottom]:bottom-nadicode-sm data-[side=bottom]:h-auto data-[side=bottom]:data-ending-style:translate-y-nadicode-md data-[side=bottom]:data-starting-style:translate-y-nadicode-md motion-reduce:data-[side=bottom]:data-ending-style:translate-none motion-reduce:data-[side=bottom]:data-starting-style:translate-none data-[side=left]:inset-y-nadicode-sm data-[side=left]:left-nadicode-sm data-[side=left]:w-3/4 data-[side=left]:data-ending-style:-translate-x-nadicode-md data-[side=left]:data-starting-style:-translate-x-nadicode-md motion-reduce:data-[side=left]:data-ending-style:translate-none motion-reduce:data-[side=left]:data-starting-style:translate-none data-[side=right]:inset-y-nadicode-sm data-[side=right]:right-nadicode-sm data-[side=right]:w-3/4 data-[side=right]:data-ending-style:translate-x-nadicode-md data-[side=right]:data-starting-style:translate-x-nadicode-md motion-reduce:data-[side=right]:data-ending-style:translate-none motion-reduce:data-[side=right]:data-starting-style:translate-none data-[side=top]:inset-x-nadicode-sm data-[side=top]:top-nadicode-sm data-[side=top]:h-auto data-[side=top]:data-ending-style:-translate-y-nadicode-md data-[side=top]:data-starting-style:-translate-y-nadicode-md motion-reduce:data-[side=top]:data-ending-style:translate-none motion-reduce:data-[side=top]:data-starting-style:translate-none data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className), ...props, children: [children, showCloseButton && (_jsxs(SheetPrimitive.Close, { "data-slot": "sheet-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-nadicode-md right-nadicode-md", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: closeLabel })] }))] })] }));
|
|
25
41
|
}
|
|
26
42
|
function SheetHeader({ className, ...props }) {
|
|
27
43
|
return (_jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-0.5 p-nadicode-lg", className), ...props }));
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type IconComponent, type IdentityMarkProps } from "./identity-mark.js";
|
|
2
|
+
import type { PageCommandAction } from "./page-actions.js";
|
|
3
|
+
export type SidebarSection<Id extends string> = PageCommandAction & {
|
|
4
|
+
id: Id;
|
|
5
|
+
label: string;
|
|
6
|
+
icon: IconComponent;
|
|
7
|
+
};
|
|
8
|
+
export type SidebarSectionsProps<Id extends string> = {
|
|
9
|
+
/** The way back: "Agents", "Customers", "Back to workspace". */
|
|
10
|
+
back: PageCommandAction & {
|
|
11
|
+
label: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
/** What you are in. `detail` reads under the name: "Company · 3 Agents". */
|
|
15
|
+
identity: {
|
|
16
|
+
name: string;
|
|
17
|
+
mark?: IdentityMarkProps;
|
|
18
|
+
detail?: string;
|
|
19
|
+
};
|
|
20
|
+
/** A heading over the sections: "Account", "Platform settings". */
|
|
21
|
+
group?: string;
|
|
22
|
+
/** Names the nav for assistive technology. */
|
|
23
|
+
label: string;
|
|
24
|
+
sections: readonly SidebarSection<Id>[];
|
|
25
|
+
current: Id;
|
|
26
|
+
/** The rail is too narrow for words: icons, names in tooltips. */
|
|
27
|
+
narrow?: boolean;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The sidebar swapped to one object: the way back, what you are in, and its sections.
|
|
31
|
+
*
|
|
32
|
+
* @family Navigation
|
|
33
|
+
* @when Inside an object, the account or Platform settings, the same sidebar column shows these instead of the places: an Agent's or a Customer's sections in the Portal, Nadia's Edit and her company's sections, the Portal's Account and Platform settings.
|
|
34
|
+
* @instead The places a person can go are the sidebar's own groups; a page's views are Tabs; a settings page that does not swap the column is a SettingsPage. Never a second column beside the first.
|
|
35
|
+
* @behaviour The back row returns to where the person came from and is disabled while leaving is blocked. One section is current. Narrow, the identity and the heading leave, and each row keeps its icon with its name in a tooltip.
|
|
36
|
+
* @words The back row names where it goes ("Agents", "Back to workspace"); the identity is the object's own name; the heading names the kind of settings ("Account"); sections are nouns ("Skills", "Members").
|
|
37
|
+
* @access The sections are a nav named by `label`; the current one carries aria-current="page". The identity's mark is decorative beside its name.
|
|
38
|
+
*/
|
|
39
|
+
export declare function SidebarSections<Id extends string>({ back, current, group, identity, label, narrow, sections, }: SidebarSectionsProps<Id>): import("react").JSX.Element;
|
|
40
|
+
//# sourceMappingURL=sidebar-sections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-sections.d.ts","sourceRoot":"","sources":["../../src/components/sidebar-sections.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AASnE,MAAM,MAAM,cAAc,CAAC,EAAE,SAAS,MAAM,IAAI,iBAAiB,GAAG;IAClE,EAAE,EAAE,EAAE,CAAC;IACP,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,EAAE,SAAS,MAAM,IAAI;IACpD,gEAAgE;IAChE,IAAI,EAAE,iBAAiB,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAChE,4EAA4E;IAC5E,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtE,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,cAAc,CAAC,EAAE,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,EAAE,CAAC;IACZ,kEAAkE;IAClE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAaF;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,EACjD,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,EACL,MAAc,EACd,QAAQ,GACT,EAAE,oBAAoB,CAAC,EAAE,CAAC,+BAyD1B"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronLeft } from "lucide-react";
|
|
4
|
+
import { IdentityMark, } from "./identity-mark.js";
|
|
5
|
+
import { SidebarGroupLabel, SidebarMenu, SidebarMenuButton, SidebarMenuItem, } from "./sidebar.js";
|
|
6
|
+
import { cn } from "../lib/utils.js";
|
|
7
|
+
function actionProps(action, disabled = false) {
|
|
8
|
+
if (action.render) {
|
|
9
|
+
return { render: action.render, "aria-disabled": disabled || undefined };
|
|
10
|
+
}
|
|
11
|
+
// The row's tooltip trigger takes `disabled` for itself, so the button element carries it.
|
|
12
|
+
return {
|
|
13
|
+
onClick: action.onClick,
|
|
14
|
+
render: _jsx("button", { disabled: disabled, type: "button" }),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The sidebar swapped to one object: the way back, what you are in, and its sections.
|
|
19
|
+
*
|
|
20
|
+
* @family Navigation
|
|
21
|
+
* @when Inside an object, the account or Platform settings, the same sidebar column shows these instead of the places: an Agent's or a Customer's sections in the Portal, Nadia's Edit and her company's sections, the Portal's Account and Platform settings.
|
|
22
|
+
* @instead The places a person can go are the sidebar's own groups; a page's views are Tabs; a settings page that does not swap the column is a SettingsPage. Never a second column beside the first.
|
|
23
|
+
* @behaviour The back row returns to where the person came from and is disabled while leaving is blocked. One section is current. Narrow, the identity and the heading leave, and each row keeps its icon with its name in a tooltip.
|
|
24
|
+
* @words The back row names where it goes ("Agents", "Back to workspace"); the identity is the object's own name; the heading names the kind of settings ("Account"); sections are nouns ("Skills", "Members").
|
|
25
|
+
* @access The sections are a nav named by `label`; the current one carries aria-current="page". The identity's mark is decorative beside its name.
|
|
26
|
+
*/
|
|
27
|
+
export function SidebarSections({ back, current, group, identity, label, narrow = false, sections, }) {
|
|
28
|
+
const row = cn(narrow && "justify-center px-0");
|
|
29
|
+
const words = cn("truncate", narrow && "sr-only");
|
|
30
|
+
return (_jsxs("div", { className: "grid w-full gap-2", "data-slot": "sidebar-sections", children: [_jsx(SidebarMenu, { children: _jsx(SidebarMenuItem, { children: _jsxs(SidebarMenuButton, { className: row, tooltip: back.label, ...actionProps(back, back.disabled), children: [_jsx(ChevronLeft, { "aria-hidden": "true" }), _jsx("span", { className: words, children: back.label })] }) }) }), narrow ? null : (_jsxs("div", { className: "flex min-w-0 items-center gap-2 px-2 pt-2 text-sm", "data-slot": "sidebar-sections-identity", children: [identity.mark ? _jsx(IdentityMark, { ...identity.mark, size: 24 }) : null, _jsxs("span", { className: "grid min-w-0", children: [_jsx("span", { className: "truncate font-medium text-sidebar-foreground", children: identity.name }), identity.detail ? (_jsx("span", { className: "truncate text-xs text-muted-foreground", children: identity.detail })) : null] })] })), group && !narrow ? _jsx(SidebarGroupLabel, { children: group }) : null, _jsx("nav", { "aria-label": label, children: _jsx(SidebarMenu, { children: sections.map((section) => {
|
|
31
|
+
const Icon = section.icon;
|
|
32
|
+
const isCurrent = section.id === current;
|
|
33
|
+
return (_jsx(SidebarMenuItem, { children: _jsxs(SidebarMenuButton, { "aria-current": isCurrent ? "page" : undefined, className: row, isActive: isCurrent, tooltip: section.label, ...actionProps(section), children: [_jsx(Icon, { "aria-hidden": "true" }), _jsx("span", { className: words, children: section.label })] }) }, section.id));
|
|
34
|
+
}) }) })] }));
|
|
35
|
+
}
|
|
@@ -42,6 +42,16 @@ type SidebarProps = React.ComponentProps<"div"> & {
|
|
|
42
42
|
/** The mobile sheet's standard focus destination after it closes. */
|
|
43
43
|
mobileFinalFocus?: React.ComponentProps<typeof SheetContent>["finalFocus"];
|
|
44
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* A product's navigation column: where a person can go, with the account at its foot.
|
|
47
|
+
*
|
|
48
|
+
* @family Navigation
|
|
49
|
+
* @when The Portal's and Nadia's left column: the groups of places, an object's sections when the column swaps, the update offer and the account menu at the foot.
|
|
50
|
+
* @instead An object's sections are SidebarSections inside this column, never a second column or a tab row; a page's own views are Tabs.
|
|
51
|
+
* @behaviour One row is selected and marked as the current page. Collapsed or narrow, rows keep their icon and show their name in a tooltip; under the mobile breakpoint the column becomes a sheet. A row's count uses SidebarMenuBadge, whose attention tone is for a failure that needs the person.
|
|
52
|
+
* @words Each row is a place's noun: "Agents", "Tasks", "Customers". A count is a bare number.
|
|
53
|
+
* @access The column is a landmark; each row is a link or a button with its name, and the current one carries aria-current="page". The badge's number is read with its row.
|
|
54
|
+
*/
|
|
45
55
|
declare function Sidebar({ side, variant, collapsible, mobileTitle, mobileDescription, mobileCloseLabel, mobileFinalFocus, className, children, dir, ...props }: SidebarProps): React.JSX.Element;
|
|
46
56
|
declare function SidebarTrigger({ className, onClick, "aria-label": ariaLabel, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
47
57
|
declare function SidebarRail({ className, "aria-label": ariaLabel, title, ...props }: React.ComponentProps<"button">): React.JSX.Element;
|
|
@@ -70,7 +80,10 @@ declare function SidebarMenuButton({ render, isActive, variant, size, tooltip, c
|
|
|
70
80
|
declare function SidebarMenuAction({ className, render, showOnHover, ...props }: useRender.ComponentProps<"button"> & React.ComponentProps<"button"> & {
|
|
71
81
|
showOnHover?: boolean;
|
|
72
82
|
}): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
73
|
-
declare function SidebarMenuBadge({ className, ...props }: React.ComponentProps<"div">
|
|
83
|
+
declare function SidebarMenuBadge({ className, tone, ...props }: React.ComponentProps<"div"> & {
|
|
84
|
+
/** `attention` is a count that needs the person, such as Tasks that failed. */
|
|
85
|
+
tone?: "default" | "attention";
|
|
86
|
+
}): React.JSX.Element;
|
|
74
87
|
declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React.ComponentProps<"div"> & {
|
|
75
88
|
showIcon?: boolean;
|
|
76
89
|
}): React.JSX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EACT,EAAE,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,GAC9B,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG;IAC1B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,0EAoBF;AAED,OAAO,EACL,OAAO,EACP,cAAc,EACd,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,CAAC"}
|
|
@@ -85,6 +85,16 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
85
85
|
...style,
|
|
86
86
|
}, className: cn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", className), ...props, children: children }) }) }));
|
|
87
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* A product's navigation column: where a person can go, with the account at its foot.
|
|
90
|
+
*
|
|
91
|
+
* @family Navigation
|
|
92
|
+
* @when The Portal's and Nadia's left column: the groups of places, an object's sections when the column swaps, the update offer and the account menu at the foot.
|
|
93
|
+
* @instead An object's sections are SidebarSections inside this column, never a second column or a tab row; a page's own views are Tabs.
|
|
94
|
+
* @behaviour One row is selected and marked as the current page. Collapsed or narrow, rows keep their icon and show their name in a tooltip; under the mobile breakpoint the column becomes a sheet. A row's count uses SidebarMenuBadge, whose attention tone is for a failure that needs the person.
|
|
95
|
+
* @words Each row is a place's noun: "Agents", "Tasks", "Customers". A count is a bare number.
|
|
96
|
+
* @access The column is a landmark; each row is a link or a button with its name, and the current one carries aria-current="page". The badge's number is read with its row.
|
|
97
|
+
*/
|
|
88
98
|
function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", mobileTitle, mobileDescription, mobileCloseLabel, mobileFinalFocus, className, children, dir, ...props }) {
|
|
89
99
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
90
100
|
if (collapsible === "none") {
|
|
@@ -239,8 +249,9 @@ function SidebarMenuAction({ className, render, showOnHover = false, ...props })
|
|
|
239
249
|
},
|
|
240
250
|
});
|
|
241
251
|
}
|
|
242
|
-
function SidebarMenuBadge({ className, ...props }) {
|
|
243
|
-
return (_jsx("div", { "data-slot": "sidebar-menu-badge", "data-sidebar": "menu-badge", className: cn("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-sm px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-primary-foreground",
|
|
252
|
+
function SidebarMenuBadge({ className, tone = "default", ...props }) {
|
|
253
|
+
return (_jsx("div", { "data-slot": "sidebar-menu-badge", "data-sidebar": "menu-badge", "data-tone": tone, className: cn("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-sm px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-primary-foreground", tone === "attention" &&
|
|
254
|
+
"h-4.5 min-w-4.5 rounded-full bg-destructive font-semibold text-destructive-foreground peer-hover/menu-button:text-destructive-foreground peer-data-active/menu-button:text-destructive-foreground", className), ...props }));
|
|
244
255
|
}
|
|
245
256
|
function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
246
257
|
// Random width between 50 to 90%.
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A still placeholder in the shape of content whose layout is known.
|
|
3
|
+
*
|
|
4
|
+
* @family Feedback
|
|
5
|
+
* @when A page or region whose layout is known while its data loads.
|
|
6
|
+
* @instead For a wait on something the person pressed use `PendingLabel` and `WaitingLine`. Unknown layout shows nothing until data. Never both a skeleton and a line.
|
|
7
|
+
* @behaviour The `line` fill, which stays visible on the card and on the workspace ground in both modes; 6 px corners or a circle, in the final shape so nothing shifts. Never pulses. Resolves to data, an absence or a failure.
|
|
8
|
+
* @words None. No "Loading" text beside it.
|
|
9
|
+
* @access The region is `aria-busy`; each placeholder is hidden and never focusable.
|
|
10
|
+
*/
|
|
1
11
|
declare function Skeleton({ className, shape, ...props }: React.ComponentProps<"div"> & {
|
|
2
12
|
shape?: "rectangle" | "circle";
|
|
3
13
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../src/components/skeleton.tsx"],"names":[],"mappings":"AAEA,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,KAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,KAAK,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;CAChC,+
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../src/components/skeleton.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,KAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,KAAK,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;CAChC,+BASA;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
|
+
/**
|
|
4
|
+
* A still placeholder in the shape of content whose layout is known.
|
|
5
|
+
*
|
|
6
|
+
* @family Feedback
|
|
7
|
+
* @when A page or region whose layout is known while its data loads.
|
|
8
|
+
* @instead For a wait on something the person pressed use `PendingLabel` and `WaitingLine`. Unknown layout shows nothing until data. Never both a skeleton and a line.
|
|
9
|
+
* @behaviour The `line` fill, which stays visible on the card and on the workspace ground in both modes; 6 px corners or a circle, in the final shape so nothing shifts. Never pulses. Resolves to data, an absence or a failure.
|
|
10
|
+
* @words None. No "Loading" text beside it.
|
|
11
|
+
* @access The region is `aria-busy`; each placeholder is hidden and never focusable.
|
|
12
|
+
*/
|
|
3
13
|
function Skeleton({ className, shape = "rectangle", ...props }) {
|
|
4
|
-
return (_jsx("div", { "data-slot": "skeleton", className: cn("bg-
|
|
14
|
+
return (_jsx("div", { "aria-hidden": "true", "data-slot": "skeleton", className: cn("bg-border", shape === "circle" ? "rounded-full" : "rounded-sm", className), ...props }));
|
|
5
15
|
}
|
|
6
16
|
export { Skeleton };
|