@nadicodeai/ui 12.1.102 → 12.1.104
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/dist/components/accordion.d.ts +38 -12
- package/dist/components/accordion.d.ts.map +1 -1
- package/dist/components/accordion.js +36 -15
- package/dist/components/account-menu.js +2 -2
- package/dist/components/action-menu.d.ts +20 -19
- package/dist/components/action-menu.d.ts.map +1 -1
- package/dist/components/action-menu.js +22 -15
- package/dist/components/action-status.d.ts +14 -10
- package/dist/components/action-status.d.ts.map +1 -1
- package/dist/components/action-status.js +14 -10
- package/dist/components/activity-calendar.d.ts +3 -1
- package/dist/components/activity-calendar.d.ts.map +1 -1
- package/dist/components/activity-calendar.js +16 -2
- package/dist/components/activity-feed.d.ts +2 -2
- package/dist/components/activity-feed.d.ts.map +1 -1
- package/dist/components/activity-feed.js +14 -5
- package/dist/components/agent-card.d.ts +11 -5
- package/dist/components/agent-card.d.ts.map +1 -1
- package/dist/components/agent-card.js +13 -7
- package/dist/components/agent-list-row.js +1 -1
- package/dist/components/agent-orb-appearance.d.ts +7 -1
- package/dist/components/agent-orb-appearance.d.ts.map +1 -1
- package/dist/components/agent-orb-appearance.js +26 -0
- package/dist/components/agent-profile.d.ts +8 -7
- package/dist/components/agent-profile.d.ts.map +1 -1
- package/dist/components/agent-profile.js +6 -6
- package/dist/components/alert-dialog.d.ts +25 -16
- package/dist/components/alert-dialog.d.ts.map +1 -1
- package/dist/components/alert-dialog.js +30 -18
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/avatar.d.ts +83 -17
- package/dist/components/avatar.d.ts.map +1 -1
- package/dist/components/avatar.js +89 -23
- package/dist/components/badge.d.ts +59 -8
- package/dist/components/badge.d.ts.map +1 -1
- package/dist/components/badge.js +57 -14
- package/dist/components/breadcrumb.d.ts +18 -7
- package/dist/components/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb.js +37 -13
- package/dist/components/button-group.d.ts +12 -15
- package/dist/components/button-group.d.ts.map +1 -1
- package/dist/components/button-group.js +13 -17
- package/dist/components/button.d.ts +126 -23
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +164 -39
- package/dist/components/calendar.d.ts +26 -15
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +60 -46
- package/dist/components/card-row.d.ts +13 -5
- package/dist/components/card-row.d.ts.map +1 -1
- package/dist/components/card-row.js +24 -10
- package/dist/components/card.d.ts +6 -12
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +11 -16
- package/dist/components/carousel.d.ts +3 -3
- package/dist/components/carousel.d.ts.map +1 -1
- package/dist/components/carousel.js +7 -7
- package/dist/components/catalog-drawer.d.ts +7 -7
- package/dist/components/catalog-drawer.d.ts.map +1 -1
- package/dist/components/catalog-drawer.js +6 -6
- package/dist/components/chart-area-stacked.d.ts +1 -1
- package/dist/components/chart-area-stacked.d.ts.map +1 -1
- package/dist/components/chart-area-stacked.js +4 -4
- package/dist/components/chart-axis.d.ts +14 -1
- package/dist/components/chart-axis.d.ts.map +1 -1
- package/dist/components/chart-axis.js +11 -1
- package/dist/components/chart-bar-horizontal.d.ts +2 -2
- package/dist/components/chart-bar-horizontal.d.ts.map +1 -1
- package/dist/components/chart-bar-horizontal.js +14 -5
- package/dist/components/chart-bar-multiple.d.ts +1 -1
- package/dist/components/chart-bar-multiple.d.ts.map +1 -1
- package/dist/components/chart-bar-multiple.js +3 -3
- package/dist/components/chart-bar-stacked.d.ts +1 -1
- package/dist/components/chart-bar-stacked.d.ts.map +1 -1
- package/dist/components/chart-bar-stacked.js +3 -3
- package/dist/components/chart-card.d.ts +17 -6
- package/dist/components/chart-card.d.ts.map +1 -1
- package/dist/components/chart-card.js +11 -4
- package/dist/components/chart-date-range-control.d.ts +18 -9
- package/dist/components/chart-date-range-control.d.ts.map +1 -1
- package/dist/components/chart-date-range-control.js +43 -47
- package/dist/components/chart-sparkline.d.ts +4 -3
- package/dist/components/chart-sparkline.d.ts.map +1 -1
- package/dist/components/chart-sparkline.js +6 -5
- package/dist/components/check-counts.d.ts +44 -0
- package/dist/components/check-counts.d.ts.map +1 -0
- package/dist/components/check-counts.js +51 -0
- package/dist/components/checkbox.d.ts +39 -11
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +38 -11
- package/dist/components/choicebox.d.ts +96 -0
- package/dist/components/choicebox.d.ts.map +1 -0
- package/dist/components/choicebox.js +113 -0
- package/dist/components/clearable-input.d.ts +57 -0
- package/dist/components/clearable-input.d.ts.map +1 -0
- package/dist/components/clearable-input.js +58 -0
- package/dist/components/code-block.d.ts +77 -17
- package/dist/components/code-block.d.ts.map +1 -1
- package/dist/components/code-block.js +85 -15
- package/dist/components/collapsible.d.ts +27 -10
- package/dist/components/collapsible.d.ts.map +1 -1
- package/dist/components/collapsible.js +24 -9
- package/dist/components/collection-filters.d.ts +3 -1
- package/dist/components/collection-filters.d.ts.map +1 -1
- package/dist/components/collection-filters.js +7 -9
- package/dist/components/collection-page.d.ts +31 -10
- package/dist/components/collection-page.d.ts.map +1 -1
- package/dist/components/collection-page.js +14 -13
- package/dist/components/collection-search.d.ts +32 -10
- package/dist/components/collection-search.d.ts.map +1 -1
- package/dist/components/collection-search.js +24 -13
- package/dist/components/collection-sort.d.ts.map +1 -1
- package/dist/components/collection-sort.js +2 -2
- package/dist/components/collection-toolbar.d.ts +5 -2
- package/dist/components/collection-toolbar.d.ts.map +1 -1
- package/dist/components/collection-toolbar.js +7 -4
- package/dist/components/combobox.d.ts +97 -22
- package/dist/components/combobox.d.ts.map +1 -1
- package/dist/components/combobox.js +80 -28
- package/dist/components/command.d.ts +34 -21
- package/dist/components/command.d.ts.map +1 -1
- package/dist/components/command.js +33 -25
- package/dist/components/confirm-dialog.d.ts +23 -6
- package/dist/components/confirm-dialog.d.ts.map +1 -1
- package/dist/components/confirm-dialog.js +32 -13
- package/dist/components/context-menu.d.ts +14 -10
- package/dist/components/context-menu.d.ts.map +1 -1
- package/dist/components/context-menu.js +17 -12
- package/dist/components/copy-button.d.ts +5 -2
- package/dist/components/copy-button.d.ts.map +1 -1
- package/dist/components/copy-button.js +16 -8
- package/dist/components/data-table.d.ts +120 -54
- package/dist/components/data-table.d.ts.map +1 -1
- package/dist/components/data-table.js +163 -92
- package/dist/components/desktop-shell.d.ts +4 -2
- package/dist/components/desktop-shell.d.ts.map +1 -1
- package/dist/components/desktop-shell.js +3 -3
- package/dist/components/dialog.d.ts +63 -24
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +52 -31
- package/dist/components/disclosure-row.d.ts +1 -2
- package/dist/components/disclosure-row.d.ts.map +1 -1
- package/dist/components/disclosure-row.js +1 -2
- package/dist/components/disclosure.d.ts +1 -1
- package/dist/components/disclosure.js +1 -1
- package/dist/components/drawer.d.ts +33 -12
- package/dist/components/drawer.d.ts.map +1 -1
- package/dist/components/drawer.js +47 -35
- package/dist/components/dropdown-menu.d.ts +59 -14
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +58 -26
- package/dist/components/empty-state.d.ts +35 -12
- package/dist/components/empty-state.d.ts.map +1 -1
- package/dist/components/empty-state.js +35 -17
- package/dist/components/entry-scene.d.ts +4 -4
- package/dist/components/entry-scene.d.ts.map +1 -1
- package/dist/components/entry-scene.js +2 -2
- package/dist/components/field.d.ts +44 -14
- package/dist/components/field.d.ts.map +1 -1
- package/dist/components/field.js +49 -20
- package/dist/components/file-diff.d.ts.map +1 -1
- package/dist/components/file-diff.js +3 -4
- package/dist/components/form-dialog.d.ts +7 -7
- package/dist/components/form-dialog.d.ts.map +1 -1
- package/dist/components/form-dialog.js +13 -11
- package/dist/components/form-drawer.d.ts +10 -7
- package/dist/components/form-drawer.d.ts.map +1 -1
- package/dist/components/form-drawer.js +11 -10
- package/dist/components/gauge.d.ts +64 -0
- package/dist/components/gauge.d.ts.map +1 -0
- package/dist/components/gauge.js +73 -0
- package/dist/components/hover-card.d.ts +72 -14
- package/dist/components/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card.js +51 -17
- package/dist/components/identity-mark.d.ts +8 -1
- package/dist/components/identity-mark.d.ts.map +1 -1
- package/dist/components/identity-mark.js +31 -5
- package/dist/components/input-group.d.ts +44 -21
- package/dist/components/input-group.d.ts.map +1 -1
- package/dist/components/input-group.js +74 -27
- package/dist/components/input.d.ts +64 -12
- package/dist/components/input.d.ts.map +1 -1
- package/dist/components/input.js +51 -15
- package/dist/components/item.d.ts +37 -15
- package/dist/components/item.d.ts.map +1 -1
- package/dist/components/item.js +41 -22
- package/dist/components/kbd.d.ts +49 -13
- package/dist/components/kbd.d.ts.map +1 -1
- package/dist/components/kbd.js +115 -16
- package/dist/components/kpi-card.d.ts +12 -4
- package/dist/components/kpi-card.d.ts.map +1 -1
- package/dist/components/kpi-card.js +13 -4
- package/dist/components/label.d.ts +17 -10
- package/dist/components/label.d.ts.map +1 -1
- package/dist/components/label.js +18 -11
- package/dist/components/library-shelf.d.ts +6 -6
- package/dist/components/library-shelf.d.ts.map +1 -1
- package/dist/components/library-shelf.js +5 -5
- package/dist/components/load-more-button.d.ts +35 -0
- package/dist/components/load-more-button.d.ts.map +1 -0
- package/dist/components/load-more-button.js +26 -0
- package/dist/components/message-notice.d.ts +8 -13
- package/dist/components/message-notice.d.ts.map +1 -1
- package/dist/components/message-notice.js +25 -22
- package/dist/components/middle-truncate.d.ts +33 -0
- package/dist/components/middle-truncate.d.ts.map +1 -0
- package/dist/components/middle-truncate.js +72 -0
- package/dist/components/multi-select.d.ts +94 -0
- package/dist/components/multi-select.d.ts.map +1 -0
- package/dist/components/multi-select.js +132 -0
- package/dist/components/native-select.d.ts +37 -13
- package/dist/components/native-select.d.ts.map +1 -1
- package/dist/components/native-select.js +27 -11
- package/dist/components/notice-banner.d.ts +17 -10
- package/dist/components/notice-banner.d.ts.map +1 -1
- package/dist/components/notice-banner.js +12 -11
- package/dist/components/numbered-steps.d.ts +10 -4
- package/dist/components/numbered-steps.d.ts.map +1 -1
- package/dist/components/numbered-steps.js +9 -7
- package/dist/components/object-page.d.ts +40 -14
- package/dist/components/object-page.d.ts.map +1 -1
- package/dist/components/object-page.js +12 -10
- package/dist/components/object-workspace.d.ts +29 -10
- package/dist/components/object-workspace.d.ts.map +1 -1
- package/dist/components/object-workspace.js +18 -8
- package/dist/components/overview-page.d.ts +2 -2
- package/dist/components/overview-page.d.ts.map +1 -1
- package/dist/components/overview-page.js +8 -7
- package/dist/components/page-actions.d.ts +28 -8
- package/dist/components/page-actions.d.ts.map +1 -1
- package/dist/components/page-actions.js +22 -25
- package/dist/components/page-header.d.ts +11 -4
- package/dist/components/page-header.d.ts.map +1 -1
- package/dist/components/page-header.js +10 -5
- package/dist/components/pending-label.d.ts +6 -5
- package/dist/components/pending-label.d.ts.map +1 -1
- package/dist/components/pending-label.js +14 -6
- package/dist/components/picture-label.d.ts +2 -2
- package/dist/components/picture-label.d.ts.map +1 -1
- package/dist/components/picture-label.js +3 -3
- package/dist/components/portal-sidebar-frame.d.ts +9 -21
- package/dist/components/portal-sidebar-frame.d.ts.map +1 -1
- package/dist/components/portal-sidebar-frame.js +13 -27
- package/dist/components/progress-checklist.d.ts +46 -0
- package/dist/components/progress-checklist.d.ts.map +1 -0
- package/dist/components/progress-checklist.js +46 -0
- package/dist/components/progress.d.ts +48 -8
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/progress.js +92 -16
- package/dist/components/prose.d.ts +19 -0
- package/dist/components/prose.d.ts.map +1 -0
- package/dist/components/prose.js +29 -0
- package/dist/components/radio-group.d.ts +51 -12
- package/dist/components/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group.js +42 -12
- package/dist/components/reading-column.js +1 -1
- package/dist/components/record-identity.d.ts +6 -5
- package/dist/components/record-identity.d.ts.map +1 -1
- package/dist/components/record-identity.js +12 -3
- package/dist/components/record-list.d.ts +117 -27
- package/dist/components/record-list.d.ts.map +1 -1
- package/dist/components/record-list.js +185 -55
- package/dist/components/record-time.d.ts +20 -7
- package/dist/components/record-time.d.ts.map +1 -1
- package/dist/components/record-time.js +38 -19
- package/dist/components/resizable.d.ts +7 -5
- package/dist/components/resizable.d.ts.map +1 -1
- package/dist/components/resizable.js +6 -6
- package/dist/components/scope-switcher.d.ts +2 -0
- package/dist/components/scope-switcher.d.ts.map +1 -1
- package/dist/components/scope-switcher.js +2 -2
- package/dist/components/scroll-area.d.ts +47 -11
- package/dist/components/scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-area.js +72 -14
- package/dist/components/segmented-control.d.ts +82 -0
- package/dist/components/segmented-control.d.ts.map +1 -0
- package/dist/components/segmented-control.js +90 -0
- package/dist/components/select.d.ts +55 -15
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/select.js +62 -19
- package/dist/components/separator.d.ts +12 -5
- package/dist/components/separator.d.ts.map +1 -1
- package/dist/components/separator.js +11 -6
- package/dist/components/settings-facts.d.ts +34 -14
- package/dist/components/settings-facts.d.ts.map +1 -1
- package/dist/components/settings-facts.js +21 -12
- package/dist/components/settings-page.d.ts +4 -4
- package/dist/components/settings-page.js +5 -5
- package/dist/components/settings-section.d.ts +160 -34
- package/dist/components/settings-section.d.ts.map +1 -1
- package/dist/components/settings-section.js +92 -39
- package/dist/components/sheet.d.ts +47 -16
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +40 -19
- package/dist/components/sidebar-sections.d.ts +16 -12
- package/dist/components/sidebar-sections.d.ts.map +1 -1
- package/dist/components/sidebar-sections.js +30 -15
- package/dist/components/sidebar.d.ts +117 -21
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +180 -55
- package/dist/components/skeleton.d.ts +54 -8
- package/dist/components/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton.js +44 -9
- package/dist/components/slider.d.ts +53 -11
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +71 -17
- package/dist/components/snippet.d.ts +57 -0
- package/dist/components/snippet.d.ts.map +1 -0
- package/dist/components/snippet.js +60 -0
- package/dist/components/sonner.d.ts +13 -14
- package/dist/components/sonner.d.ts.map +1 -1
- package/dist/components/sonner.js +25 -22
- package/dist/components/status-badge.d.ts +37 -11
- package/dist/components/status-badge.d.ts.map +1 -1
- package/dist/components/status-badge.js +63 -15
- package/dist/components/status-dot.d.ts +42 -11
- package/dist/components/status-dot.d.ts.map +1 -1
- package/dist/components/status-dot.js +40 -11
- package/dist/components/switch.d.ts +43 -12
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/switch.js +42 -12
- package/dist/components/table-card.d.ts +21 -12
- package/dist/components/table-card.d.ts.map +1 -1
- package/dist/components/table-card.js +17 -9
- package/dist/components/table-layouts.d.ts +40 -8
- package/dist/components/table-layouts.d.ts.map +1 -1
- package/dist/components/table-layouts.js +52 -8
- package/dist/components/table-value.d.ts +4 -3
- package/dist/components/table-value.d.ts.map +1 -1
- package/dist/components/table-value.js +6 -5
- package/dist/components/table.d.ts +62 -25
- package/dist/components/table.d.ts.map +1 -1
- package/dist/components/table.js +62 -26
- package/dist/components/tabs.d.ts +86 -17
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +93 -22
- package/dist/components/text-link.d.ts +4 -1
- package/dist/components/text-link.d.ts.map +1 -1
- package/dist/components/text-link.js +4 -1
- package/dist/components/text-with-copy-button.d.ts +30 -0
- package/dist/components/text-with-copy-button.d.ts.map +1 -0
- package/dist/components/text-with-copy-button.js +32 -0
- package/dist/components/textarea.d.ts +40 -10
- package/dist/components/textarea.d.ts.map +1 -1
- package/dist/components/textarea.js +50 -11
- package/dist/components/theme-mode-switcher.d.ts +18 -1
- package/dist/components/theme-mode-switcher.d.ts.map +1 -1
- package/dist/components/theme-mode-switcher.js +20 -2
- package/dist/components/toggle-group.d.ts +28 -8
- package/dist/components/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group.js +12 -6
- package/dist/components/toggle.d.ts +6 -3
- package/dist/components/toggle.d.ts.map +1 -1
- package/dist/components/toggle.js +10 -7
- package/dist/components/tooltip.d.ts +43 -12
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +45 -16
- package/dist/components/trend-badge.js +1 -1
- package/dist/components/update-card.js +1 -1
- package/dist/eslint/index.js +82 -0
- package/dist/eslint/rules/badge-is-static-label.js +93 -0
- package/dist/eslint/rules/button-icon-slot.js +102 -0
- package/dist/eslint/rules/button-link-for-navigation.js +146 -0
- package/dist/eslint/rules/button-no-aria-label-with-text.js +75 -0
- package/dist/eslint/rules/button-type-roles-only-in-buttons.js +83 -0
- package/dist/eslint/rules/choice-control-has-a-name.js +98 -0
- package/dist/eslint/rules/choice-group-in-fieldset.js +86 -0
- package/dist/eslint/rules/command-shortcut-single-owner.js +118 -0
- package/dist/eslint/rules/confirm-dialog-words.js +63 -0
- package/dist/eslint/rules/data-table-one-unsized-column.js +96 -0
- package/dist/eslint/rules/destructive-action-placement.js +69 -0
- package/dist/eslint/rules/disabled-choice-says-why.js +71 -0
- package/dist/eslint/rules/ellipsis-opens-a-dialog.js +110 -0
- package/dist/eslint/rules/input-group-owners.js +155 -0
- package/dist/eslint/rules/kbd-children-no-modifier-text.js +128 -0
- package/dist/eslint/rules/literal-text.js +41 -0
- package/dist/eslint/rules/middle-truncate-placement.js +69 -0
- package/dist/eslint/rules/no-bare-button-label.js +55 -0
- package/dist/eslint/rules/no-control-in-read-only-surface.js +106 -0
- package/dist/eslint/rules/no-hand-built-busy.js +104 -0
- package/dist/eslint/rules/no-hand-built-theme-picker.js +144 -0
- package/dist/eslint/rules/no-hand-built-tile.js +41 -0
- package/dist/eslint/rules/no-hand-formatted-date.js +87 -0
- package/dist/eslint/rules/no-hand-stacked-avatars.js +67 -0
- package/dist/eslint/rules/no-nested-collapse.js +60 -0
- package/dist/eslint/rules/no-search-in-form.js +47 -0
- package/dist/eslint/rules/no-shadcn-appearance-override.js +2 -16
- package/dist/eslint/rules/no-shell-prompt-in-snippet.js +74 -0
- package/dist/eslint/rules/no-stock-error-words.js +56 -0
- package/dist/eslint/rules/no-tooltip-around-labelled-field.js +72 -0
- package/dist/eslint/rules/no-weight-class-on-strong-in-type-role.js +57 -0
- package/dist/eslint/rules/one-submenu-level.js +43 -0
- package/dist/eslint/rules/one-toast-per-flow.js +91 -0
- package/dist/eslint/rules/option-count.js +167 -0
- package/dist/eslint/rules/page-command-link-not-render.js +43 -0
- package/dist/eslint/rules/progress-needs-name.js +57 -0
- package/dist/eslint/rules/settings-limit-in-footer.js +94 -0
- package/dist/eslint/rules/skeleton-in-region.js +80 -0
- package/dist/eslint/rules/sortable-heading-uses-sort.js +79 -0
- package/dist/eslint/rules/table-cell-inset-owner.js +107 -0
- package/dist/eslint/rules/tabs-selection-is-controlled.js +47 -0
- package/dist/eslint/rules/tooltip-only-arrow.js +38 -0
- package/dist/eslint/rules/tooltip-trigger-accessible-name.js +114 -0
- package/dist/eslint/strict-design-system.js +21 -7
- package/dist/index.d.ts +13 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -13
- package/dist/internal/assistant-ui/attachment.d.ts.map +1 -1
- package/dist/internal/assistant-ui/attachment.js +2 -2
- package/dist/internal/assistant-ui/reasoning.d.ts +1 -1
- package/dist/internal/assistant-ui/reasoning.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tool-fallback.js +1 -1
- package/dist/internal/assistant-ui/tool-group.d.ts +1 -1
- package/dist/internal/assistant-ui/tool-group.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tooltip-icon-button.d.ts +2 -3
- package/dist/internal/assistant-ui/tooltip-icon-button.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tooltip-icon-button.js +1 -1
- package/dist/internal/catalog-list.js +2 -2
- package/dist/internal/collection-note.d.ts +23 -0
- package/dist/internal/collection-note.d.ts.map +1 -0
- package/dist/internal/collection-note.js +17 -0
- package/dist/internal/collection-rail.d.ts +57 -0
- package/dist/internal/collection-rail.d.ts.map +1 -0
- package/dist/internal/collection-rail.js +33 -0
- package/dist/internal/company-logo.d.ts +18 -0
- package/dist/internal/company-logo.d.ts.map +1 -0
- package/dist/internal/company-logo.js +14 -0
- package/dist/internal/control-name.d.ts +12 -0
- package/dist/internal/control-name.d.ts.map +1 -0
- package/dist/internal/control-name.js +1 -0
- package/dist/internal/diff-line.d.ts +9 -0
- package/dist/internal/diff-line.d.ts.map +1 -0
- package/dist/internal/diff-line.js +8 -0
- package/dist/internal/empty.d.ts +8 -4
- package/dist/internal/empty.d.ts.map +1 -1
- package/dist/internal/empty.js +14 -8
- package/dist/internal/field-frame.d.ts +33 -0
- package/dist/internal/field-frame.d.ts.map +1 -0
- package/dist/internal/field-frame.js +20 -0
- package/dist/internal/final-focus.d.ts +8 -0
- package/dist/internal/final-focus.d.ts.map +1 -0
- package/dist/internal/final-focus.js +10 -0
- package/dist/internal/footer-strip.d.ts.map +1 -1
- package/dist/internal/footer-strip.js +3 -1
- package/dist/internal/form-submit.d.ts +9 -5
- package/dist/internal/form-submit.d.ts.map +1 -1
- package/dist/internal/form-submit.js +31 -2
- package/dist/internal/input-box.d.ts +26 -0
- package/dist/internal/input-box.d.ts.map +1 -0
- package/dist/internal/input-box.js +59 -0
- package/dist/internal/menu-surface.d.ts +10 -3
- package/dist/internal/menu-surface.d.ts.map +1 -1
- package/dist/internal/menu-surface.js +10 -3
- package/dist/internal/notice.d.ts +25 -0
- package/dist/internal/notice.d.ts.map +1 -0
- package/dist/internal/notice.js +33 -0
- package/dist/internal/overlay-stem.d.ts +5 -0
- package/dist/internal/overlay-stem.d.ts.map +1 -0
- package/dist/internal/overlay-stem.js +7 -0
- package/dist/internal/phone-sheet.d.ts +4 -0
- package/dist/internal/phone-sheet.d.ts.map +1 -0
- package/dist/internal/phone-sheet.js +2 -0
- package/dist/internal/present-content.d.ts +3 -0
- package/dist/internal/present-content.d.ts.map +1 -0
- package/dist/internal/present-content.js +1 -0
- package/dist/internal/record-menu-items.d.ts +4 -3
- package/dist/internal/record-menu-items.d.ts.map +1 -1
- package/dist/internal/record-menu-items.js +21 -6
- package/dist/internal/settings-save.d.ts +9 -2
- package/dist/internal/settings-save.d.ts.map +1 -1
- package/dist/internal/settings-save.js +19 -6
- package/dist/internal/table-compact-line.d.ts +38 -0
- package/dist/internal/table-compact-line.d.ts.map +1 -0
- package/dist/internal/table-compact-line.js +35 -0
- package/dist/internal/title-when-cut.d.ts +8 -0
- package/dist/internal/title-when-cut.d.ts.map +1 -0
- package/dist/internal/title-when-cut.js +22 -0
- package/dist/internal/unsaved-guard.d.ts +18 -0
- package/dist/internal/unsaved-guard.d.ts.map +1 -0
- package/dist/internal/unsaved-guard.js +31 -0
- package/dist/lib/merge-tokens.generated.js +2 -2
- package/dist/showcase/foundations.d.ts.map +1 -1
- package/dist/showcase/foundations.js +10 -2
- package/dist/showcase/specimens/actions.d.ts +2 -0
- package/dist/showcase/specimens/actions.d.ts.map +1 -1
- package/dist/showcase/specimens/actions.js +30 -5
- package/dist/showcase/specimens/charts.d.ts.map +1 -1
- package/dist/showcase/specimens/charts.js +22 -13
- package/dist/showcase/specimens/choices.d.ts +14 -3
- package/dist/showcase/specimens/choices.d.ts.map +1 -1
- package/dist/showcase/specimens/choices.js +93 -13
- package/dist/showcase/specimens/compositions.d.ts.map +1 -1
- package/dist/showcase/specimens/compositions.js +136 -23
- package/dist/showcase/specimens/data.d.ts +12 -7
- package/dist/showcase/specimens/data.d.ts.map +1 -1
- package/dist/showcase/specimens/data.js +139 -35
- package/dist/showcase/specimens/feedback.d.ts +2 -0
- package/dist/showcase/specimens/feedback.d.ts.map +1 -1
- package/dist/showcase/specimens/feedback.js +39 -15
- package/dist/showcase/specimens/index.d.ts +20 -12
- package/dist/showcase/specimens/index.d.ts.map +1 -1
- package/dist/showcase/specimens/inputs.d.ts +4 -2
- package/dist/showcase/specimens/inputs.d.ts.map +1 -1
- package/dist/showcase/specimens/inputs.js +62 -19
- package/dist/showcase/specimens/menus.d.ts +0 -1
- package/dist/showcase/specimens/menus.d.ts.map +1 -1
- package/dist/showcase/specimens/menus.js +47 -17
- package/dist/showcase/specimens/navigation.d.ts +6 -4
- package/dist/showcase/specimens/navigation.d.ts.map +1 -1
- package/dist/showcase/specimens/navigation.js +61 -32
- package/dist/showcase/specimens/other.d.ts +1 -3
- package/dist/showcase/specimens/other.d.ts.map +1 -1
- package/dist/showcase/specimens/other.js +17 -13
- package/dist/showcase/specimens/status.d.ts +4 -1
- package/dist/showcase/specimens/status.d.ts.map +1 -1
- package/dist/showcase/specimens/status.js +64 -11
- package/dist/showcase/usage.generated.d.ts +1 -1
- package/dist/showcase/usage.generated.d.ts.map +1 -1
- package/dist/showcase/usage.generated.js +632 -544
- package/dist/standalone/index.js +1 -1
- package/dist/styles/components.css +13 -13
- package/dist/styles/globals.css +25 -0
- package/package.json +2 -3
- package/dist/components/approval-row.d.ts +0 -34
- package/dist/components/approval-row.d.ts.map +0 -1
- package/dist/components/approval-row.js +0 -27
- package/dist/components/channel-view.d.ts +0 -112
- package/dist/components/channel-view.d.ts.map +0 -1
- package/dist/components/channel-view.js +0 -84
- package/dist/components/dashboard-shell.d.ts +0 -51
- package/dist/components/dashboard-shell.d.ts.map +0 -1
- package/dist/components/dashboard-shell.js +0 -89
- package/dist/components/direction.d.ts +0 -2
- package/dist/components/direction.d.ts.map +0 -1
- package/dist/components/direction.js +0 -1
- package/dist/components/expandable-block.d.ts +0 -20
- package/dist/components/expandable-block.d.ts.map +0 -1
- package/dist/components/expandable-block.js +0 -32
- package/dist/components/form.d.ts +0 -42
- package/dist/components/form.d.ts.map +0 -1
- package/dist/components/form.js +0 -91
- package/dist/components/label-system.d.ts +0 -17
- package/dist/components/label-system.d.ts.map +0 -1
- package/dist/components/label-system.js +0 -21
- package/dist/components/memory-item.d.ts +0 -21
- package/dist/components/memory-item.d.ts.map +0 -1
- package/dist/components/memory-item.js +0 -18
- package/dist/components/menubar.d.ts +0 -43
- package/dist/components/menubar.d.ts.map +0 -1
- package/dist/components/menubar.js +0 -69
- package/dist/components/navigation-menu.d.ts +0 -26
- package/dist/components/navigation-menu.d.ts.map +0 -1
- package/dist/components/navigation-menu.js +0 -45
- package/dist/components/pagination.d.ts +0 -33
- package/dist/components/pagination.d.ts.map +0 -1
- package/dist/components/pagination.js +0 -41
- package/dist/components/plugin-slot-boundary.d.ts +0 -42
- package/dist/components/plugin-slot-boundary.d.ts.map +0 -1
- package/dist/components/plugin-slot-boundary.js +0 -41
- package/dist/components/status-row.d.ts +0 -32
- package/dist/components/status-row.d.ts.map +0 -1
- package/dist/components/status-row.js +0 -35
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A dropdown and a context menu carry the same commands
|
|
3
|
-
*
|
|
2
|
+
* A dropdown and a context menu carry the same commands, so both take this floating glass surface (DESIGN.md
|
|
3
|
+
* "Elevation & Depth"): the content under an open menu stays in view, saturated, behind its rows.
|
|
4
4
|
*/
|
|
5
|
-
export const menuSurface = "group/menu z-50 max-h-(--available-height) w-max min-w-[min(
|
|
5
|
+
export const menuSurface = "group/menu z-50 max-h-(--available-height) w-max min-w-[min(12.5rem,var(--available-width))] max-w-(--available-width) overflow-x-hidden overflow-y-auto rounded-lg border-0 nc-glass p-1.5 text-popover-foreground nc-elevation-floating outline-none data-closed:overflow-hidden";
|
|
6
|
+
/**
|
|
7
|
+
* Every row of a menu, whatever it holds, so the parts of one menu never differ in height. A row that can be
|
|
8
|
+
* chosen shows the pointer cursor; one that cannot turns its text muted, never dimmed, keeps the default cursor
|
|
9
|
+
* and takes no highlight from the keyboard. The highlight is the row's fill alone: no text inside the row changes
|
|
10
|
+
* colour with it.
|
|
11
|
+
*/
|
|
12
|
+
export const menuRow = "relative flex min-h-touch-target cursor-pointer items-center gap-1.5 rounded-sm px-1.5 py-1 group-data-[density=comfortable]/menu:gap-2 group-data-[density=comfortable]/menu:px-2 group-data-[density=comfortable]/menu:py-2 text-sm outline-hidden select-none focus:bg-accent data-inset:pl-7 data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:text-muted-foreground data-disabled:focus:bg-transparent [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type LucideIcon } from "lucide-react";
|
|
2
|
+
import { type PageCommand } from "../components/page-actions.js";
|
|
3
|
+
export type NoticeTone = "neutral" | "info" | "warning" | "destructive";
|
|
4
|
+
/** The hue of a notice's edge: a light step of its text colour, neutral for the plain tone. */
|
|
5
|
+
export declare const NOTICE_EDGE: Record<NoticeTone, string>;
|
|
6
|
+
/** The mark a tone draws: Info for neutral and info, the triangle for warning and destructive. */
|
|
7
|
+
export declare function NoticeMark({ icon, tone }: {
|
|
8
|
+
icon?: LucideIcon | undefined;
|
|
9
|
+
tone: NoticeTone;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* A notice's one fix, drawn as an underlined 14 px link with no padding. In a `strip` it takes the
|
|
13
|
+
* darkest step of the strip's own hue (neutral takes the foreground) and returns to the strip's
|
|
14
|
+
* text on hover; `inline` it follows the sentence in the sentence's own colour.
|
|
15
|
+
*/
|
|
16
|
+
export declare function NoticeLink({ className, command, ...place }: {
|
|
17
|
+
className?: string;
|
|
18
|
+
command: PageCommand;
|
|
19
|
+
} & ({
|
|
20
|
+
place: "inline";
|
|
21
|
+
} | {
|
|
22
|
+
place: "strip";
|
|
23
|
+
tone: NoticeTone;
|
|
24
|
+
})): import("react").JSX.Element;
|
|
25
|
+
//# sourceMappingURL=notice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notice.d.ts","sourceRoot":"","sources":["../../src/internal/notice.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAiB,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,2BAA2B,CAAC;AAGhF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,aAAa,CAAC;AAExE,+FAA+F;AAC/F,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAKlD,CAAC;AAEF,kGAAkG;AAClG,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,+BAG7F;AAgBD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,WAAW,CAAC;CACtB,GAAG,CAAC;IAAE,KAAK,EAAE,QAAQ,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,+BAc/D"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Info, TriangleAlert } from "lucide-react";
|
|
3
|
+
import { PageCommandButton } from "../components/page-actions.js";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
|
+
/** The hue of a notice's edge: a light step of its text colour, neutral for the plain tone. */
|
|
6
|
+
export const NOTICE_EDGE = {
|
|
7
|
+
neutral: "border-border",
|
|
8
|
+
info: "border-info-soft-foreground/25",
|
|
9
|
+
warning: "border-warning-soft-foreground/25",
|
|
10
|
+
destructive: "border-destructive-soft-foreground/25",
|
|
11
|
+
};
|
|
12
|
+
/** The mark a tone draws: Info for neutral and info, the triangle for warning and destructive. */
|
|
13
|
+
export function NoticeMark({ icon, tone }) {
|
|
14
|
+
const Mark = icon ?? (tone === "warning" || tone === "destructive" ? TriangleAlert : Info);
|
|
15
|
+
return _jsx(Mark, { "aria-hidden": "true" });
|
|
16
|
+
}
|
|
17
|
+
const LINK_LOOK = "[&_[data-slot=button]]:gap-0.5 [&_[data-slot=button]]:px-0! [&_[data-slot=button]]:text-body-sm [&_[data-slot=button]]:underline [&_[data-slot=button]_svg]:size-4!";
|
|
18
|
+
const STRIP_LINK = "[&_[data-slot=button]]:h-6 [&_[data-slot=button]]:hover:text-inherit";
|
|
19
|
+
const STRIP_LINK_TONE = {
|
|
20
|
+
neutral: "[&_[data-slot=button]]:text-foreground",
|
|
21
|
+
info: "[&_[data-slot=button]]:text-(--nc-cobalto-1000)",
|
|
22
|
+
warning: "[&_[data-slot=button]]:text-(--nc-giallo-1000)",
|
|
23
|
+
destructive: "[&_[data-slot=button]]:text-(--nc-rosso-1000)",
|
|
24
|
+
};
|
|
25
|
+
const INLINE_LINK = "align-bottom [&_[data-slot=button]]:h-5 [&_[data-slot=button]]:text-current";
|
|
26
|
+
/**
|
|
27
|
+
* A notice's one fix, drawn as an underlined 14 px link with no padding. In a `strip` it takes the
|
|
28
|
+
* darkest step of the strip's own hue (neutral takes the foreground) and returns to the strip's
|
|
29
|
+
* text on hover; `inline` it follows the sentence in the sentence's own colour.
|
|
30
|
+
*/
|
|
31
|
+
export function NoticeLink({ className, command, ...place }) {
|
|
32
|
+
return (_jsx("span", { className: cn("inline-flex", LINK_LOOK, place.place === "strip" ? [STRIP_LINK, STRIP_LINK_TONE[place.tone]] : INLINE_LINK, className), "data-notice-action": true, children: _jsx(PageCommandButton, { command: command, size: "xs", variant: "link" }) }));
|
|
33
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const overlayStem = "z-50 flex h-1.5 w-3.5 data-[side=bottom]:bottom-full data-[side=bottom]:rotate-180 data-[side=inline-end]:top-1/2! data-[side=inline-end]:left-full data-[side=inline-end]:-translate-x-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-end]:-rotate-90 data-[side=inline-start]:top-1/2! data-[side=inline-start]:right-full data-[side=inline-start]:translate-x-1 data-[side=inline-start]:-translate-y-1/2 data-[side=inline-start]:rotate-90 data-[side=left]:top-1/2! data-[side=left]:left-full data-[side=left]:-translate-x-1 data-[side=left]:-translate-y-1/2 data-[side=left]:-rotate-90 data-[side=right]:top-1/2! data-[side=right]:right-full data-[side=right]:translate-x-1 data-[side=right]:-translate-y-1/2 data-[side=right]:rotate-90 data-[side=top]:top-full";
|
|
2
|
+
export declare function OverlayStemShape({ outlined }: {
|
|
3
|
+
outlined?: boolean;
|
|
4
|
+
}): import("react").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=overlay-stem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlay-stem.d.ts","sourceRoot":"","sources":["../../src/internal/overlay-stem.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,qwBAC4uB,CAAC;AAOrwB,wBAAgB,gBAAgB,CAAC,EAAE,QAAgB,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,+BAO5E"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const overlayStem = "z-50 flex h-1.5 w-3.5 data-[side=bottom]:bottom-full data-[side=bottom]:rotate-180 data-[side=inline-end]:top-1/2! data-[side=inline-end]:left-full data-[side=inline-end]:-translate-x-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-end]:-rotate-90 data-[side=inline-start]:top-1/2! data-[side=inline-start]:right-full data-[side=inline-start]:translate-x-1 data-[side=inline-start]:-translate-y-1/2 data-[side=inline-start]:rotate-90 data-[side=left]:top-1/2! data-[side=left]:left-full data-[side=left]:-translate-x-1 data-[side=left]:-translate-y-1/2 data-[side=left]:-rotate-90 data-[side=right]:top-1/2! data-[side=right]:right-full data-[side=right]:translate-x-1 data-[side=right]:-translate-y-1/2 data-[side=right]:rotate-90 data-[side=top]:top-full";
|
|
3
|
+
const STEM_SHAPE = "M13.8284 0H0.17157C0.702003 0 1.21071 0.210714 1.58578 0.585787L5.58578 4.58579C6.36683 5.36684 7.63316 5.36683 8.41421 4.58579L12.4142 0.585786C12.7893 0.210714 13.298 0 13.8284 0Z";
|
|
4
|
+
const STEM_EDGE = "M0.17157 0C0.702003 0 1.21071 0.210714 1.58578 0.585787L5.58578 4.58579C6.36683 5.36684 7.63316 5.36683 8.41421 4.58579L12.4142 0.585786C12.7893 0.210714 13.298 0 13.8284 0";
|
|
5
|
+
export function OverlayStemShape({ outlined = false }) {
|
|
6
|
+
return (_jsxs("svg", { "aria-hidden": "true", className: "overflow-visible", height: "6", viewBox: "0 0 14 6", width: "14", children: [_jsx("path", { className: "fill-popover", d: STEM_SHAPE }), outlined ? _jsx("path", { className: "stroke-border", d: STEM_EDGE, fill: "none" }) : null] }));
|
|
7
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type PhoneLayout = "sheet" | "centred";
|
|
2
|
+
/** A centred modal popup docked to the bottom edge, full width, under 640 px. */
|
|
3
|
+
export declare const phoneSheetLayout = "max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:max-w-none max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none";
|
|
4
|
+
//# sourceMappingURL=phone-sheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-sheet.d.ts","sourceRoot":"","sources":["../../src/internal/phone-sheet.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9C,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,oIACsG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"present-content.d.ts","sourceRoot":"","sources":["../../src/internal/present-content.ts"],"names":[],"mappings":"AAAA,mHAAmH;AACnH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { MenuCommand, RecordMenu } from "../components/action-menu.js";
|
|
3
|
-
import type { PageCommandAction } from "../components/page-actions.js";
|
|
3
|
+
import type { PageCommand, PageCommandAction } from "../components/page-actions.js";
|
|
4
4
|
export declare function menuItemAction(action: PageCommandAction): {
|
|
5
5
|
render: import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
6
6
|
nativeButton: boolean;
|
|
@@ -10,10 +10,11 @@ export declare function menuItemAction(action: PageCommandAction): {
|
|
|
10
10
|
render?: undefined;
|
|
11
11
|
nativeButton?: undefined;
|
|
12
12
|
};
|
|
13
|
-
export declare function MenuCommandRow({ command, value }: {
|
|
13
|
+
export declare function MenuCommandRow({ command, iconEnd, value, }: {
|
|
14
14
|
command: MenuCommand;
|
|
15
|
+
iconEnd?: boolean;
|
|
15
16
|
value?: ReactNode;
|
|
16
17
|
}): import("react").JSX.Element;
|
|
17
|
-
export declare function soleMenuButton(commands: readonly MenuCommand[]):
|
|
18
|
+
export declare function soleMenuButton(commands: readonly MenuCommand[]): PageCommand | undefined;
|
|
18
19
|
export declare function RecordMenuItems({ record, commands }: Omit<RecordMenu, "label">): import("react").JSX.Element;
|
|
19
20
|
//# sourceMappingURL=record-menu-items.d.ts.map
|
|
@@ -1 +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;
|
|
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,WAAW,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEhF,wBAAgB,cAAc,CAAC,MAAM,EAAE,iBAAiB;;;;;;;;EAMvD;AAYD,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,OAAe,EACf,KAAK,GACN,EAAE;IACD,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,+BAuBA;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,WAAW,GAAG,SAAS,CAKxF;AAED,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,+BAe9E"}
|
|
@@ -2,16 +2,31 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { DropdownMenuCommand, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, } from "../components/dropdown-menu.js";
|
|
4
4
|
export function menuItemAction(action) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
if (action.link)
|
|
6
|
+
return { render: action.link, nativeButton: false };
|
|
7
|
+
if (action.render) {
|
|
8
|
+
return { render: action.render, nativeButton: action.render.type === "button" };
|
|
9
|
+
}
|
|
10
|
+
return { onClick: action.onClick };
|
|
8
11
|
}
|
|
9
|
-
|
|
10
|
-
return
|
|
12
|
+
function commandAction(command) {
|
|
13
|
+
return command.link ? { link: command.link } : menuItemAction(command);
|
|
14
|
+
}
|
|
15
|
+
function commandState(command) {
|
|
16
|
+
return command.locked
|
|
17
|
+
? { locked: true, reason: command.reason }
|
|
18
|
+
: { disabledReason: command.disabledReason };
|
|
19
|
+
}
|
|
20
|
+
export function MenuCommandRow({ command, iconEnd = false, value, }) {
|
|
21
|
+
return (_jsx(DropdownMenuCommand, { "aria-label": command.accessibleName, icon: command.icon, iconEnd: iconEnd, detail: command.detail, variant: command.destructive ? "destructive" : "default", ...commandState(command), loading: command.pending === true, loadingLabel: command.pendingLabel ?? command.label, ...commandAction(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
22
|
}
|
|
12
23
|
export function soleMenuButton(commands) {
|
|
13
24
|
const [only] = commands;
|
|
14
|
-
|
|
25
|
+
if (commands.length !== 1 || !only || only.destructive)
|
|
26
|
+
return undefined;
|
|
27
|
+
if (only.locked === true || only.disabledReason !== undefined)
|
|
28
|
+
return undefined;
|
|
29
|
+
return only;
|
|
15
30
|
}
|
|
16
31
|
export function RecordMenuItems({ record, commands }) {
|
|
17
32
|
const kept = commands.filter((command) => !command.destructive);
|
|
@@ -6,13 +6,20 @@ export type SettingsSaveFailure = {
|
|
|
6
6
|
field?: string;
|
|
7
7
|
};
|
|
8
8
|
export type SettingsSave = {
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Saves the section's fields; resolves to null once saved. A state change after its await goes in
|
|
11
|
+
* `startTransition`, or React renders it while Save still says Saving; what the page shows once saved goes in
|
|
12
|
+
* `saved`.
|
|
13
|
+
*/
|
|
10
14
|
action: (formData: FormData) => Promise<SettingsSaveFailure | null>;
|
|
11
15
|
/** "Save" */
|
|
12
16
|
label: string;
|
|
13
17
|
/** "Saving" */
|
|
14
18
|
pendingLabel: string;
|
|
15
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Called once a save resolves null, in the transition that ends the save: the product announces it through its
|
|
21
|
+
* own toast, and a state change made here renders with Save ready again.
|
|
22
|
+
*/
|
|
16
23
|
saved: () => void;
|
|
17
24
|
/** What is specific to this card, on the footer's left: a limit, what a value is for, a plan it needs, a link. Absent: nothing. */
|
|
18
25
|
hint?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-save.d.ts","sourceRoot":"","sources":["../../src/internal/settings-save.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"settings-save.d.ts","sourceRoot":"","sources":["../../src/internal/settings-save.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AAMf,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;;;;OAIG;IACH,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;;;OAGG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,mIAAmI;IACnI,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;AA4FF,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,+BAsFA;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,EAAE,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,sCAqC1D"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { createContext, use, useCallback, useEffect, useRef, useState, } from "react";
|
|
3
|
+
import { createContext, startTransition, use, useCallback, useEffect, useRef, useState, } from "react";
|
|
4
4
|
import { useFormStatus } from "react-dom";
|
|
5
5
|
import { Button } from "../components/button.js";
|
|
6
6
|
import { FieldError } from "../components/field.js";
|
|
7
7
|
import { MessageNotice } from "../components/message-notice.js";
|
|
8
|
-
import { PendingLabel } from "../components/pending-label.js";
|
|
9
8
|
import { messageSentences } from "../components/product-message.js";
|
|
10
9
|
import { CardContent } from "../components/card.js";
|
|
11
10
|
import { WaitingLine } from "../components/waiting-line.js";
|
|
@@ -55,7 +54,7 @@ function editableValues(form) {
|
|
|
55
54
|
}
|
|
56
55
|
function SaveFooter({ save, changed }) {
|
|
57
56
|
const { pending } = useFormStatus();
|
|
58
|
-
return (_jsxs(FooterStrip, { hint: save.hint, hintSlot: "settings-section-hint", children: [save.cancel ? (_jsx(Button, {
|
|
57
|
+
return (_jsxs(FooterStrip, { hint: save.hint, hintSlot: "settings-section-hint", children: [save.cancel ? (_jsx(Button, { disabled: pending, loading: save.cancel.pending ?? false, loadingLabel: save.cancel.pendingLabel ?? save.cancel.label, onClick: save.cancel.onCancel, type: "button", variant: "outline", children: save.cancel.label })) : null, _jsx(FormSubmitButton, { submit: {
|
|
59
58
|
label: save.label,
|
|
60
59
|
pendingLabel: save.pendingLabel,
|
|
61
60
|
pending,
|
|
@@ -100,9 +99,13 @@ export function SettingsSaveForm({ save, titleId, children, }) {
|
|
|
100
99
|
return (_jsx(SettingsSaveContext, { value: { failure, claim }, children: _jsxs("form", { ref: form, "aria-labelledby": titleId, className: "contents", "data-slot": "settings-section-form", action: async (formData) => {
|
|
101
100
|
const result = await save.action(formData);
|
|
102
101
|
keepValuesOnReset.current = result !== null;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
// React leaves an update after an await out of the action, so it would render while Save still says
|
|
103
|
+
// Saving; inside a transition it renders with the end of the save.
|
|
104
|
+
startTransition(() => {
|
|
105
|
+
setFailure(result);
|
|
106
|
+
if (result === null)
|
|
107
|
+
save.saved();
|
|
108
|
+
});
|
|
106
109
|
}, onChange: (event) => {
|
|
107
110
|
const edited = event.target;
|
|
108
111
|
if (edited instanceof Element &&
|
|
@@ -130,6 +133,16 @@ export function SettingsFieldFailure({ id }) {
|
|
|
130
133
|
const invalid = control.getAttribute("aria-invalid");
|
|
131
134
|
control.setAttribute("aria-invalid", "true");
|
|
132
135
|
control.setAttribute("aria-describedby", describedBy ? `${describedBy} ${failureId}` : failureId);
|
|
136
|
+
// The person pressed Save and the save failed about this field: the field takes the focus, now that the
|
|
137
|
+
// failure rendered with the end of the save and the field is enabled again. Focus they moved elsewhere stays.
|
|
138
|
+
const active = document.activeElement;
|
|
139
|
+
const leftOnSave = !active ||
|
|
140
|
+
active === document.body ||
|
|
141
|
+
(active instanceof HTMLButtonElement &&
|
|
142
|
+
active.type === "submit" &&
|
|
143
|
+
active.form === control.closest("form"));
|
|
144
|
+
if (leftOnSave && control instanceof HTMLElement)
|
|
145
|
+
control.focus();
|
|
133
146
|
return () => {
|
|
134
147
|
if (invalid === null)
|
|
135
148
|
control.removeAttribute("aria-invalid");
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type TableCompactLayout } from "../components/table-layouts.js";
|
|
3
|
+
export type TableDetailFact = {
|
|
4
|
+
id: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
value: React.ReactNode;
|
|
7
|
+
/** The value is prose a reader needs whole, such as why a check failed: the line wraps instead of ending in an ellipsis. */
|
|
8
|
+
wraps?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function DetailFacts({ facts, leadingSeparator, }: {
|
|
11
|
+
facts: readonly TableDetailFact[];
|
|
12
|
+
leadingSeparator?: boolean;
|
|
13
|
+
}): React.JSX.Element[];
|
|
14
|
+
type TableCompactLineValue = {
|
|
15
|
+
layout: TableCompactLayout;
|
|
16
|
+
facts: readonly TableDetailFact[];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The facts an entity row moves onto the line under its name on a card narrower than its
|
|
20
|
+
* columns, so the record stays one 72 px row: the name over one muted line. `RecordIdentity`
|
|
21
|
+
* draws them after its own line.
|
|
22
|
+
*/
|
|
23
|
+
export declare function TableCompactLine({ children, ...value }: TableCompactLineValue & {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}): React.JSX.Element;
|
|
26
|
+
/** The compact facts of the row this stands in, after a middle dot; nothing outside such a row or on a card wide enough for the columns. */
|
|
27
|
+
export declare function TableCompactFacts(): React.JSX.Element | null;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the entity rows around it are laid out compact now, read from the layout the browser
|
|
30
|
+
* drew: a row's cells move what does not fit beside the name under it instead.
|
|
31
|
+
*/
|
|
32
|
+
export declare function TableLaidOutCompact({ compact, children, }: {
|
|
33
|
+
compact: boolean;
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
}): React.JSX.Element;
|
|
36
|
+
export declare function useTableLaidOutCompact(): boolean;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=table-compact-line.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-compact-line.d.ts","sourceRoot":"","sources":["../../src/internal/table-compact-line.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAuB,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAG1F,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,4HAA4H;IAC5H,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,gBAAwB,GACzB,EAAE;IACD,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,uBAQA;AAED,KAAK,qBAAqB,GAAG;IAAE,MAAM,EAAE,kBAAkB,CAAC;IAAC,KAAK,EAAE,SAAS,eAAe,EAAE,CAAA;CAAE,CAAC;AAI/F;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,qBAAqB,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAEvD;AAED,4IAA4I;AAC5I,wBAAgB,iBAAiB,6BAehC;AAID;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAEA;AAED,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { tableCompactLayouts } from "../components/table-layouts.js";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
export function DetailFacts({ facts, leadingSeparator = false, }) {
|
|
7
|
+
return facts.map((fact, index) => (_jsxs("span", { children: [index > 0 || leadingSeparator ? _jsx("span", { "aria-hidden": "true", children: " \u00B7 " }) : null, _jsxs("span", { className: "sr-only", children: [fact.label, ": "] }), fact.value] }, fact.id)));
|
|
8
|
+
}
|
|
9
|
+
const TableCompactLineContext = React.createContext(null);
|
|
10
|
+
/**
|
|
11
|
+
* The facts an entity row moves onto the line under its name on a card narrower than its
|
|
12
|
+
* columns, so the record stays one 72 px row: the name over one muted line. `RecordIdentity`
|
|
13
|
+
* draws them after its own line.
|
|
14
|
+
*/
|
|
15
|
+
export function TableCompactLine({ children, ...value }) {
|
|
16
|
+
return _jsx(TableCompactLineContext, { value: value, children: children });
|
|
17
|
+
}
|
|
18
|
+
/** The compact facts of the row this stands in, after a middle dot; nothing outside such a row or on a card wide enough for the columns. */
|
|
19
|
+
export function TableCompactFacts() {
|
|
20
|
+
const line = React.useContext(TableCompactLineContext);
|
|
21
|
+
if (!line || line.facts.length === 0)
|
|
22
|
+
return null;
|
|
23
|
+
return (_jsx("span", { className: cn("[&_[data-slot=tag]]:contents [&>span>:is(div,p,.block,.grid,.flex)]:inline", tableCompactLayouts[line.layout].details), "data-slot": "table-detail-line", "data-wraps": line.facts.some((fact) => fact.wraps) || undefined, children: _jsx(DetailFacts, { facts: line.facts, leadingSeparator: true }) }));
|
|
24
|
+
}
|
|
25
|
+
const TableLaidOutCompactContext = React.createContext(false);
|
|
26
|
+
/**
|
|
27
|
+
* Whether the entity rows around it are laid out compact now, read from the layout the browser
|
|
28
|
+
* drew: a row's cells move what does not fit beside the name under it instead.
|
|
29
|
+
*/
|
|
30
|
+
export function TableLaidOutCompact({ compact, children, }) {
|
|
31
|
+
return _jsx(TableLaidOutCompactContext, { value: compact, children: children });
|
|
32
|
+
}
|
|
33
|
+
export function useTableLaidOutCompact() {
|
|
34
|
+
return React.useContext(TableLaidOutCompactContext);
|
|
35
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Names an element whole in its title while some of its text is cut by an ellipsis and no title
|
|
4
|
+
* inside it reads that text whole, such as the line under a name whose own title holds only the
|
|
5
|
+
* name, and drops the title once everything fits.
|
|
6
|
+
*/
|
|
7
|
+
export declare function titleWhenCut(event: React.SyntheticEvent<HTMLElement>): void;
|
|
8
|
+
//# sourceMappingURL=title-when-cut.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title-when-cut.d.ts","sourceRoot":"","sources":["../../src/internal/title-when-cut.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,QAiBpE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const read = (text) => (text ?? "").replace(/\s+/g, " ").trim();
|
|
2
|
+
/**
|
|
3
|
+
* Names an element whole in its title while some of its text is cut by an ellipsis and no title
|
|
4
|
+
* inside it reads that text whole, such as the line under a name whose own title holds only the
|
|
5
|
+
* name, and drops the title once everything fits.
|
|
6
|
+
*/
|
|
7
|
+
export function titleWhenCut(event) {
|
|
8
|
+
const element = event.currentTarget;
|
|
9
|
+
const readWholeInside = (node) => {
|
|
10
|
+
const titled = node.closest("[title]");
|
|
11
|
+
return (titled !== null &&
|
|
12
|
+
titled !== element &&
|
|
13
|
+
element.contains(titled) &&
|
|
14
|
+
read(titled.title).includes(read(node.textContent)));
|
|
15
|
+
};
|
|
16
|
+
const cut = [element, ...element.querySelectorAll("*")].some((node) => node.scrollWidth > node.clientWidth && !readWholeInside(node));
|
|
17
|
+
const text = read(element.textContent);
|
|
18
|
+
if (cut && text)
|
|
19
|
+
element.title = text;
|
|
20
|
+
else
|
|
21
|
+
element.removeAttribute("title");
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
|
|
2
|
+
/** Input a person typed that closing the surface would lose. */
|
|
3
|
+
export type UnsavedGuard = {
|
|
4
|
+
dirty: boolean;
|
|
5
|
+
/** Runs when a dismissal was held back, so the caller can ask what to do. */
|
|
6
|
+
onDismissBlocked: () => void;
|
|
7
|
+
};
|
|
8
|
+
/** What a surface's `onOpenChange` is told about why it closes; the Drawer's reasons are a superset of the Dialog's. */
|
|
9
|
+
export type DismissDetails = Pick<DrawerPrimitive.Root.ChangeEventDetails, "reason" | "cancel">;
|
|
10
|
+
/**
|
|
11
|
+
* Escape, a press outside, a swipe and the system back gesture are accidents, so with unsaved
|
|
12
|
+
* input they are held back (the close is cancelled) and reported; Close and Cancel are deliberate
|
|
13
|
+
* and always go through. Returns whether the close was held back.
|
|
14
|
+
*/
|
|
15
|
+
export declare function holdBackUnsavedDismissal(open: boolean, details: DismissDetails, unsaved?: UnsavedGuard): boolean;
|
|
16
|
+
/** The `onOpenChange` of a form surface that reports only whether it is open. */
|
|
17
|
+
export declare function guardUnsaved(onOpenChange: (open: boolean) => void, unsaved?: UnsavedGuard): (open: boolean, details: DismissDetails) => void;
|
|
18
|
+
//# sourceMappingURL=unsaved-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unsaved-guard.d.ts","sourceRoot":"","sources":["../../src/internal/unsaved-guard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEvE,gEAAgE;AAChE,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,6EAA6E;IAC7E,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B,CAAC;AAEF,wHAAwH;AACxH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,kBAAkB,EAAE,QAAQ,GAAG,QAAQ,CAAC,CAAC;AAchG;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,cAAc,EACvB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAKT;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,YAAY,IAChF,MAAM,OAAO,EAAE,SAAS,cAAc,UAI/C"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const HELD_BACK_WHEN_DIRTY = {
|
|
2
|
+
"escape-key": true,
|
|
3
|
+
"outside-press": true,
|
|
4
|
+
swipe: true,
|
|
5
|
+
"close-watcher": true,
|
|
6
|
+
"trigger-press": false,
|
|
7
|
+
"close-press": false,
|
|
8
|
+
"focus-out": false,
|
|
9
|
+
"imperative-action": false,
|
|
10
|
+
none: false,
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Escape, a press outside, a swipe and the system back gesture are accidents, so with unsaved
|
|
14
|
+
* input they are held back (the close is cancelled) and reported; Close and Cancel are deliberate
|
|
15
|
+
* and always go through. Returns whether the close was held back.
|
|
16
|
+
*/
|
|
17
|
+
export function holdBackUnsavedDismissal(open, details, unsaved) {
|
|
18
|
+
if (open || !unsaved?.dirty || !HELD_BACK_WHEN_DIRTY[details.reason])
|
|
19
|
+
return false;
|
|
20
|
+
details.cancel();
|
|
21
|
+
unsaved.onDismissBlocked();
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
/** The `onOpenChange` of a form surface that reports only whether it is open. */
|
|
25
|
+
export function guardUnsaved(onOpenChange, unsaved) {
|
|
26
|
+
return (open, details) => {
|
|
27
|
+
if (holdBackUnsavedDismissal(open, details, unsaved))
|
|
28
|
+
return;
|
|
29
|
+
onOpenChange(open);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by scripts/generate-merge-tokens.mjs from @nadicodeai/design-system/css.
|
|
2
2
|
// Do not edit: `npm run generate:merge-tokens -w @nadicodeai/ui` rewrites it.
|
|
3
3
|
export const themeMergeTokens = {
|
|
4
|
-
spacing: "control-height control-padding-inline nadicode-2xl nadicode-3xl nadicode-4xl nadicode-5xl nadicode-6xl nadicode-card-padding nadicode-content-max nadicode-control-height nadicode-control-height-lg nadicode-control-height-sm nadicode-control-height-xs nadicode-control-padding-inline nadicode-focus-outline-offset nadicode-focus-outline-width nadicode-guide nadicode-gutter-desktop nadicode-gutter-mobile nadicode-gutter-tablet nadicode-icon-stroke nadicode-icon-stroke-sm nadicode-lg nadicode-md nadicode-section-step-desktop nadicode-section-step-mobile nadicode-sm nadicode-touch-target nadicode-xl nadicode-xs nadicode-xxs touch-target".split(" "),
|
|
5
|
-
radius: "2xl 3xl full lg md none sm xl xs".split(" "),
|
|
4
|
+
spacing: "button-padding-inline button-padding-inline-lg button-padding-inline-sm control-height control-padding-inline nadicode-2xl nadicode-3xl nadicode-4xl nadicode-5xl nadicode-6xl nadicode-button-padding-inline nadicode-button-padding-inline-lg nadicode-button-padding-inline-sm nadicode-card-padding nadicode-content-max nadicode-control-height nadicode-control-height-lg nadicode-control-height-sm nadicode-control-height-xs nadicode-control-padding-inline nadicode-focus-outline-offset nadicode-focus-outline-width nadicode-guide nadicode-gutter-desktop nadicode-gutter-mobile nadicode-gutter-tablet nadicode-icon-stroke nadicode-icon-stroke-sm nadicode-lg nadicode-md nadicode-section-step-desktop nadicode-section-step-mobile nadicode-sm nadicode-touch-target nadicode-xl nadicode-xs nadicode-xxs touch-target".split(" "),
|
|
5
|
+
radius: "2xl 3xl full lg md none sm xl xs xs-plus".split(" "),
|
|
6
6
|
text: "body-compact body-display body-lead body-lg body-md body-sm button button-lg button-xs caption code display-lg display-md display-section display-wide display-xl heading-compact heading-lg heading-md heading-sm heading-xs label label-display label-lg label-md label-mono label-mono-lg label-mono-md label-sm".split(" "),
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foundations.d.ts","sourceRoot":"","sources":["../../src/showcase/foundations.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"foundations.d.ts","sourceRoot":"","sources":["../../src/showcase/foundations.tsx"],"names":[],"mappings":"AA0FA,wBAAgB,WAAW,gCAqI1B"}
|
|
@@ -8,7 +8,7 @@ import { Button } from "../components/button.js";
|
|
|
8
8
|
import { Card, CardDescription, CardHeader, CardTitle } from "../components/card.js";
|
|
9
9
|
import { CardRow } from "../components/card-row.js";
|
|
10
10
|
import { GlassControl } from "../components/glass-control.js";
|
|
11
|
-
import {
|
|
11
|
+
import { Input } from "../components/input.js";
|
|
12
12
|
import { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, } from "../components/popover.js";
|
|
13
13
|
import { ARANCIO, COBALTO, VERDE } from "./samples.js";
|
|
14
14
|
const NEUTRAL_ROLES = [
|
|
@@ -39,7 +39,9 @@ const TYPE_TOKENS = [
|
|
|
39
39
|
["heading-md", "nc-type-heading-md", "A page or object title"],
|
|
40
40
|
["heading-sm", "nc-type-heading-sm", "A card or settings title"],
|
|
41
41
|
["heading-xs", "nc-type-heading-xs", "A compact card title"],
|
|
42
|
+
["button-lg", "nc-type-button-lg", "Save changes"],
|
|
42
43
|
["button", "nc-type-button", "Save changes"],
|
|
44
|
+
["button-xs", "nc-type-button-xs", "Save changes"],
|
|
43
45
|
["label-md", "nc-type-label-md", "Item title"],
|
|
44
46
|
["label", "nc-type-label", "Field label"],
|
|
45
47
|
["label-sm", "nc-type-label-sm", "Secondary metadata"],
|
|
@@ -50,6 +52,12 @@ const TYPE_TOKENS = [
|
|
|
50
52
|
["caption", "nc-type-caption", "Badges, compact chrome labels, footer lines."],
|
|
51
53
|
["code", "nc-type-code", "tool.call(invoice.draft, { month: 'september' })"],
|
|
52
54
|
];
|
|
55
|
+
const EMPHASIS_ROLES = [
|
|
56
|
+
["heading-md, Subtle", "nc-type-heading-md", "text-heading-md", "A page or object", "title"],
|
|
57
|
+
["label-md, Strong", "nc-type-label-md", "text-label-md", "Item", "title"],
|
|
58
|
+
["body-sm, Strong", "nc-type-body-sm", "text-body-sm", "Default product", "descriptions"],
|
|
59
|
+
];
|
|
60
|
+
const SURFACE_CORNERS = { resting: 6, raised: 12, outlined: 6, plain: 6 };
|
|
53
61
|
function Name({ children }) {
|
|
54
62
|
return _jsx("code", { className: "font-mono text-xs text-muted-foreground", children: children });
|
|
55
63
|
}
|
|
@@ -57,5 +65,5 @@ function Group({ title, children }) {
|
|
|
57
65
|
return (_jsxs("section", { "aria-label": title, className: "grid gap-4", children: [_jsx("h3", { className: "text-sm font-semibold", children: title }), children] }));
|
|
58
66
|
}
|
|
59
67
|
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" }) })] })] })] }),
|
|
68
|
+
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" }) })] })] })] }), _jsxs(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("div", { className: "grid gap-4", children: EMPHASIS_ROLES.map(([token, typeClass, textClass, lead, emphasised]) => (_jsxs("div", { className: "grid gap-1 border-b border-border pb-4 last:border-0", children: [_jsx(Name, { children: token }), _jsxs("p", { className: `m-0 ${typeClass}`, children: [lead, " ", _jsx("strong", { children: emphasised })] }), _jsxs("p", { className: `m-0 ${textClass}`, children: [lead, " ", _jsx("strong", { children: emphasised })] })] }, 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 }), _jsxs(CardDescription, { className: "grid gap-1", children: [_jsx(Name, { children: `Card surface="${surface}"` }), _jsx(Name, { children: `${SURFACE_CORNERS[surface]} px corner` })] })] }) }, 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: _jsx(Input, { "aria-label": "Find", placeholder: "Find an Agent", prefix: _jsx(Search, { "aria-hidden": "true" }) }) }), _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
69
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const ACTIONS: {
|
|
2
2
|
Button: () => import("react").JSX.Element;
|
|
3
|
+
ButtonLink: () => import("react").JSX.Element;
|
|
3
4
|
ButtonGroup: () => import("react").JSX.Element;
|
|
5
|
+
LoadMoreButton: () => import("react").JSX.Element;
|
|
4
6
|
CopyButton: () => import("react").JSX.Element;
|
|
5
7
|
PageActions: () => import("react").JSX.Element;
|
|
6
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/actions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/actions.tsx"],"names":[],"mappings":"AAmDA,eAAO,MAAM,OAAO;;;;;;;CA6NO,CAAC"}
|