@nadicodeai/ui 12.1.165 → 12.1.166
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 +8 -9
- package/README.md +2 -17
- package/dist/components/accordion.d.ts.map +1 -1
- package/dist/components/accordion.js +2 -1
- package/dist/components/account-menu.d.ts.map +1 -1
- package/dist/components/account-menu.js +5 -3
- package/dist/components/activity-calendar.d.ts.map +1 -1
- package/dist/components/activity-calendar.js +3 -2
- package/dist/components/agent-card.js +1 -1
- package/dist/components/agent-orb.d.ts.map +1 -1
- package/dist/components/agent-orb.js +1 -0
- package/dist/components/agent-profile.d.ts.map +1 -1
- package/dist/components/agent-profile.js +7 -4
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.d.ts.map +1 -1
- package/dist/components/alert-dialog.js +3 -3
- package/dist/components/app-mark.js +1 -1
- package/dist/components/avatar.js +8 -8
- package/dist/components/badge.d.ts +11 -16
- package/dist/components/badge.d.ts.map +1 -1
- package/dist/components/badge.js +7 -43
- package/dist/components/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb.js +3 -2
- package/dist/components/button.d.ts +5 -21
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +6 -76
- package/dist/components/calendar.d.ts +1 -1
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +3 -3
- package/dist/components/card-row.js +1 -1
- package/dist/components/card.d.ts +4 -1
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +3 -2
- package/dist/components/catalog-drawer.d.ts.map +1 -1
- package/dist/components/catalog-drawer.js +3 -2
- package/dist/components/chart-axis.d.ts.map +1 -1
- package/dist/components/chart-axis.js +0 -2
- package/dist/components/chart-bar-horizontal.d.ts.map +1 -1
- package/dist/components/chart-bar-horizontal.js +16 -14
- package/dist/components/chart-card.d.ts.map +1 -1
- package/dist/components/chart-card.js +0 -1
- package/dist/components/chart.d.ts.map +1 -1
- package/dist/components/chart.js +18 -32
- package/dist/components/checkbox.d.ts +3 -2
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +4 -3
- package/dist/components/choicebox.d.ts +5 -5
- package/dist/components/choicebox.d.ts.map +1 -1
- package/dist/components/choicebox.js +6 -5
- package/dist/components/clearable-input.d.ts.map +1 -1
- package/dist/components/clearable-input.js +2 -2
- package/dist/components/code-block.d.ts.map +1 -1
- package/dist/components/code-block.js +4 -2
- package/dist/components/collapsible.js +1 -1
- package/dist/components/collection-filters.d.ts.map +1 -1
- package/dist/components/collection-filters.js +1 -0
- package/dist/components/collection-page.js +1 -1
- package/dist/components/collection-sort.d.ts.map +1 -1
- package/dist/components/collection-sort.js +1 -4
- package/dist/components/collection-toolbar.js +1 -1
- package/dist/components/combobox.js +4 -4
- package/dist/components/command.d.ts.map +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/confirm-dialog.js +2 -2
- package/dist/components/context-menu.d.ts +1 -1
- package/dist/components/context-menu.d.ts.map +1 -1
- package/dist/components/copy-button.js +1 -1
- package/dist/components/data-table.d.ts +11 -3
- package/dist/components/data-table.d.ts.map +1 -1
- package/dist/components/data-table.js +12 -4
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +2 -2
- package/dist/components/drawer.d.ts +4 -4
- package/dist/components/drawer.d.ts.map +1 -1
- package/dist/components/drawer.js +14 -15
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +9 -5
- package/dist/components/empty-art.js +1 -1
- package/dist/components/empty-state.js +2 -2
- package/dist/components/entry-scene.d.ts.map +1 -1
- package/dist/components/entry-scene.js +2 -3
- package/dist/components/field.js +3 -3
- package/dist/components/file-diff.d.ts.map +1 -1
- package/dist/components/file-diff.js +5 -2
- package/dist/components/footer.d.ts +1 -1
- package/dist/components/footer.d.ts.map +1 -1
- package/dist/components/footer.js +3 -3
- package/dist/components/form-dialog.d.ts.map +1 -1
- package/dist/components/form-dialog.js +2 -1
- package/dist/components/form-drawer.d.ts +7 -9
- package/dist/components/form-drawer.d.ts.map +1 -1
- package/dist/components/form-drawer.js +5 -5
- package/dist/components/form.d.ts +26 -0
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.js +29 -0
- package/dist/components/gauge.js +2 -2
- package/dist/components/heatmap/calendar-heatmap.d.ts.map +1 -1
- package/dist/components/heatmap/calendar-heatmap.js +15 -13
- package/dist/components/hive-scene.d.ts.map +1 -1
- package/dist/components/hive-scene.js +3 -1
- package/dist/components/hover-card.d.ts +1 -1
- package/dist/components/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card.js +1 -1
- package/dist/components/input-group.d.ts +5 -6
- package/dist/components/input-group.d.ts.map +1 -1
- package/dist/components/input-group.js +8 -11
- package/dist/components/input-otp.d.ts.map +1 -1
- package/dist/components/input-otp.js +2 -2
- package/dist/components/item.d.ts +1 -1
- package/dist/components/item.js +2 -2
- package/dist/components/kbd.d.ts +6 -9
- package/dist/components/kbd.d.ts.map +1 -1
- package/dist/components/kbd.js +7 -3
- package/dist/components/message-notice.js +1 -1
- package/dist/components/middle-truncate.d.ts.map +1 -1
- package/dist/components/middle-truncate.js +1 -0
- package/dist/components/model-identity.d.ts +4 -4
- package/dist/components/model-identity.d.ts.map +1 -1
- package/dist/components/model-identity.js +2 -2
- package/dist/components/model-mark.d.ts.map +1 -1
- package/dist/components/model-mark.js +4 -2
- package/dist/components/multi-select.js +2 -2
- package/dist/components/native-select.d.ts.map +1 -1
- package/dist/components/native-select.js +2 -6
- package/dist/components/notice-banner.js +1 -1
- package/dist/components/object-page.js +2 -2
- package/dist/components/object-workspace.d.ts.map +1 -1
- package/dist/components/object-workspace.js +1 -3
- package/dist/components/overview-page.d.ts +1 -1
- package/dist/components/overview-page.d.ts.map +1 -1
- package/dist/components/overview-page.js +2 -1
- package/dist/components/page-actions.d.ts.map +1 -1
- package/dist/components/page-actions.js +9 -4
- package/dist/components/pairing-code.js +1 -1
- package/dist/components/pending-label.d.ts.map +1 -1
- package/dist/components/pending-label.js +0 -1
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/portal-sidebar-frame.d.ts.map +1 -1
- package/dist/components/portal-sidebar-frame.js +1 -1
- package/dist/components/product-message.d.ts.map +1 -1
- package/dist/components/product-message.js +1 -0
- package/dist/components/progress-checklist.d.ts.map +1 -1
- package/dist/components/progress-checklist.js +2 -2
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/progress.js +5 -4
- package/dist/components/radio-group.js +2 -2
- package/dist/components/reading-column.js +1 -1
- package/dist/components/record-identity.d.ts.map +1 -1
- package/dist/components/record-identity.js +2 -5
- package/dist/components/record-list.d.ts.map +1 -1
- package/dist/components/record-list.js +4 -3
- package/dist/components/record-sheet.js +1 -1
- package/dist/components/record-time.d.ts.map +1 -1
- package/dist/components/record-time.js +2 -1
- package/dist/components/resizable.d.ts.map +1 -1
- package/dist/components/resizable.js +1 -1
- package/dist/components/row-edit-form.d.ts +2 -1
- package/dist/components/row-edit-form.d.ts.map +1 -1
- package/dist/components/row-edit-form.js +2 -1
- package/dist/components/run-timeline.js +1 -1
- package/dist/components/scope-switcher.js +1 -1
- package/dist/components/segmented-control.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/settings-facts.js +1 -1
- package/dist/components/settings-section.js +1 -1
- package/dist/components/sheet.d.ts +1 -1
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +1 -1
- package/dist/components/sidebar.d.ts +2 -2
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +16 -18
- package/dist/components/site-menu.d.ts +28 -0
- package/dist/components/site-menu.d.ts.map +1 -0
- package/dist/components/site-menu.js +23 -0
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +2 -1
- package/dist/components/snippet.d.ts +2 -0
- package/dist/components/snippet.d.ts.map +1 -1
- package/dist/components/snippet.js +13 -6
- package/dist/components/sonner.d.ts.map +1 -1
- package/dist/components/sonner.js +3 -4
- package/dist/components/status-badge.d.ts +1 -1
- package/dist/components/status-badge.d.ts.map +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/table-card.js +1 -1
- package/dist/components/table.js +4 -4
- package/dist/components/tabs-nav.d.ts +52 -0
- package/dist/components/tabs-nav.d.ts.map +1 -0
- package/dist/components/tabs-nav.js +95 -0
- package/dist/components/tabs.d.ts +2 -56
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +2 -91
- package/dist/components/text-link.d.ts +1 -2
- package/dist/components/text-link.d.ts.map +1 -1
- package/dist/components/text-link.js +1 -2
- package/dist/components/textarea.d.ts +5 -2
- package/dist/components/textarea.d.ts.map +1 -1
- package/dist/components/textarea.js +12 -4
- package/dist/components/toast.d.ts +2 -0
- package/dist/components/toast.d.ts.map +1 -1
- package/dist/components/toast.js +4 -0
- package/dist/components/toggle-group.d.ts +3 -1
- package/dist/components/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group.js +3 -6
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip.d.ts +12 -12
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +9 -9
- package/dist/components/trend-badge.js +2 -2
- package/dist/components/update-card.js +1 -1
- package/dist/components/usage-meter.d.ts +1 -1
- package/dist/components/usage-meter.d.ts.map +1 -1
- package/dist/components/usage-meter.js +9 -7
- package/dist/components/waiting-line.js +1 -1
- package/dist/index.d.ts +3 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -7
- package/dist/internal/agent-orb-motion.d.ts +4 -1
- package/dist/internal/agent-orb-motion.d.ts.map +1 -1
- package/dist/internal/agent-orb-motion.js +9 -7
- package/dist/internal/agent-orb.d.ts +4 -1
- package/dist/internal/agent-orb.d.ts.map +1 -1
- package/dist/internal/agent-orb.js +7 -1
- package/dist/internal/assistant-ui/attachment.d.ts.map +1 -1
- package/dist/internal/assistant-ui/attachment.js +15 -15
- package/dist/internal/assistant-ui/follow-up-suggestions.js +1 -1
- package/dist/internal/assistant-ui/markdown-text.js +26 -25
- package/dist/internal/assistant-ui/reasoning.d.ts.map +1 -1
- package/dist/internal/assistant-ui/reasoning.js +13 -16
- package/dist/internal/assistant-ui/thread.d.ts.map +1 -1
- package/dist/internal/assistant-ui/thread.js +22 -16
- package/dist/internal/assistant-ui/tool-fallback.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tool-fallback.js +29 -21
- package/dist/internal/assistant-ui/tool-group.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tool-group.js +6 -7
- package/dist/internal/assistant-ui/tooltip-icon-button.js +1 -1
- package/dist/internal/badge-frame.d.ts +15 -0
- package/dist/internal/badge-frame.d.ts.map +1 -0
- package/dist/internal/badge-frame.js +44 -0
- package/dist/internal/button-classes.d.ts +20 -0
- package/dist/internal/button-classes.d.ts.map +1 -0
- package/dist/internal/button-classes.js +74 -0
- package/dist/internal/catalog-list.d.ts.map +1 -1
- package/dist/internal/catalog-list.js +8 -4
- package/dist/internal/collection-rail.js +3 -3
- package/dist/internal/form-drawer-frame.d.ts +10 -0
- package/dist/internal/form-drawer-frame.d.ts.map +1 -0
- package/dist/internal/form-drawer-frame.js +9 -0
- package/dist/internal/form-submit.d.ts +2 -1
- package/dist/internal/form-submit.d.ts.map +1 -1
- package/dist/internal/settings-save.d.ts.map +1 -1
- package/dist/internal/settings-save.js +4 -2
- package/dist/internal/status-mark.d.ts.map +1 -1
- package/dist/internal/status-mark.js +4 -1
- package/dist/internal/tab-row.d.ts +10 -0
- package/dist/internal/tab-row.d.ts.map +1 -0
- package/dist/internal/tab-row.js +2 -0
- package/dist/internal/table-compact-line.d.ts +1 -1
- package/dist/internal/table-compact-line.d.ts.map +1 -1
- package/dist/internal/table-compact-line.js +1 -1
- package/dist/internal/tooltip-content-frame.d.ts +14 -0
- package/dist/internal/tooltip-content-frame.d.ts.map +1 -0
- package/dist/internal/tooltip-content-frame.js +11 -0
- package/dist/lib/css-variables.d.ts +8 -0
- package/dist/lib/css-variables.d.ts.map +1 -0
- package/dist/lib/css-variables.js +4 -0
- package/dist/lib/merge-tokens.generated.js +1 -1
- package/dist/lib/use-copy-to-clipboard.d.ts.map +1 -1
- package/dist/lib/use-copy-to-clipboard.js +1 -2
- package/dist/showcase/samples.js +1 -1
- package/dist/showcase/specimens/choices.d.ts.map +1 -1
- package/dist/showcase/specimens/choices.js +3 -2
- package/dist/showcase/specimens/compositions.d.ts.map +1 -1
- package/dist/showcase/specimens/compositions.js +7 -5
- package/dist/showcase/specimens/data.d.ts.map +1 -1
- package/dist/showcase/specimens/data.js +1 -1
- package/dist/showcase/specimens/feedback.d.ts.map +1 -1
- package/dist/showcase/specimens/feedback.js +1 -2
- package/dist/showcase/specimens/index.d.ts +2 -0
- package/dist/showcase/specimens/index.d.ts.map +1 -1
- package/dist/showcase/specimens/inputs.d.ts +1 -0
- package/dist/showcase/specimens/inputs.d.ts.map +1 -1
- package/dist/showcase/specimens/inputs.js +5 -2
- package/dist/showcase/specimens/menus.d.ts +1 -0
- package/dist/showcase/specimens/menus.d.ts.map +1 -1
- package/dist/showcase/specimens/menus.js +7 -2
- package/dist/showcase/specimens/navigation.d.ts.map +1 -1
- package/dist/showcase/specimens/navigation.js +6 -5
- package/dist/showcase/specimens/status.d.ts.map +1 -1
- package/dist/showcase/specimens/status.js +4 -4
- 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 +38 -16
- package/dist/standalone/index.js +1 -1
- package/dist/standalone/orb-page.js +10 -8
- package/dist/styles/components.css +1 -1
- package/package.json +32 -33
- package/dist/eslint/index.js +0 -224
- package/dist/eslint/rules/badge-is-static-label.js +0 -93
- package/dist/eslint/rules/button-icon-slot.js +0 -102
- package/dist/eslint/rules/button-link-for-navigation.js +0 -146
- package/dist/eslint/rules/button-no-aria-label-with-text.js +0 -75
- package/dist/eslint/rules/button-type-roles-only-in-buttons.js +0 -83
- package/dist/eslint/rules/choice-control-has-a-name.js +0 -98
- package/dist/eslint/rules/choice-group-in-fieldset.js +0 -86
- package/dist/eslint/rules/command-shortcut-single-owner.js +0 -118
- package/dist/eslint/rules/confirm-dialog-words.js +0 -63
- package/dist/eslint/rules/data-table-one-unsized-column.js +0 -96
- package/dist/eslint/rules/destructive-action-placement.js +0 -69
- package/dist/eslint/rules/disabled-choice-says-why.js +0 -71
- package/dist/eslint/rules/disabled-control-appearance.js +0 -75
- package/dist/eslint/rules/ellipsis-opens-a-dialog.js +0 -110
- package/dist/eslint/rules/empty-state-owner.js +0 -145
- package/dist/eslint/rules/input-group-owners.js +0 -155
- package/dist/eslint/rules/jsx-class-utility.js +0 -200
- package/dist/eslint/rules/kbd-children-no-modifier-text.js +0 -128
- package/dist/eslint/rules/literal-text.js +0 -41
- package/dist/eslint/rules/menu-owner.js +0 -75
- package/dist/eslint/rules/middle-truncate-placement.js +0 -69
- package/dist/eslint/rules/no-app-feature-component.js +0 -100
- package/dist/eslint/rules/no-bare-button-label.js +0 -55
- package/dist/eslint/rules/no-choice-control-wrapper.js +0 -97
- package/dist/eslint/rules/no-comment.js +0 -77
- package/dist/eslint/rules/no-control-in-read-only-surface.js +0 -106
- package/dist/eslint/rules/no-decorative-icon.js +0 -164
- package/dist/eslint/rules/no-deprecated-zod-api.js +0 -215
- package/dist/eslint/rules/no-global-patch.js +0 -115
- package/dist/eslint/rules/no-hand-built-busy.js +0 -104
- package/dist/eslint/rules/no-hand-built-theme-picker.js +0 -144
- package/dist/eslint/rules/no-hand-built-tile.js +0 -41
- package/dist/eslint/rules/no-hand-formatted-date.js +0 -87
- package/dist/eslint/rules/no-hand-stacked-avatars.js +0 -67
- package/dist/eslint/rules/no-nested-collapse.js +0 -60
- package/dist/eslint/rules/no-package-component-redefinition.js +0 -175
- package/dist/eslint/rules/no-search-in-form.js +0 -47
- package/dist/eslint/rules/no-shadcn-appearance-override.js +0 -305
- package/dist/eslint/rules/no-shell-prompt-in-snippet.js +0 -74
- package/dist/eslint/rules/no-stock-error-words.js +0 -56
- package/dist/eslint/rules/no-subject-derived-expectation.js +0 -183
- package/dist/eslint/rules/no-tooltip-around-labelled-field.js +0 -72
- package/dist/eslint/rules/no-weight-class-on-strong-in-type-role.js +0 -57
- package/dist/eslint/rules/no-write-in-subscription.js +0 -140
- package/dist/eslint/rules/one-submenu-level.js +0 -43
- package/dist/eslint/rules/one-toast-per-flow.js +0 -91
- package/dist/eslint/rules/option-count.js +0 -167
- package/dist/eslint/rules/page-command-link-not-render.js +0 -43
- package/dist/eslint/rules/page-composition.js +0 -232
- package/dist/eslint/rules/progress-needs-name.js +0 -57
- package/dist/eslint/rules/rendered-import.js +0 -121
- package/dist/eslint/rules/server-action-discipline.js +0 -233
- package/dist/eslint/rules/settings-limit-in-footer.js +0 -94
- package/dist/eslint/rules/skeleton-in-region.js +0 -80
- package/dist/eslint/rules/sortable-heading-uses-sort.js +0 -79
- package/dist/eslint/rules/table-cell-inset-owner.js +0 -107
- package/dist/eslint/rules/tabs-selection-is-controlled.js +0 -47
- package/dist/eslint/rules/test-files-from-one-definition.js +0 -67
- package/dist/eslint/rules/tooltip-only-arrow.js +0 -38
- package/dist/eslint/rules/tooltip-trigger-accessible-name.js +0 -114
- package/dist/eslint/rules/workspace-declares-imports.js +0 -163
- package/dist/eslint/strict-design-system.js +0 -250
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
const heldNeutral = "disabled:border-border disabled:bg-muted disabled:text-muted-foreground aria-disabled:border-border aria-disabled:bg-muted aria-disabled:text-muted-foreground";
|
|
4
|
+
const heldDim = "disabled:opacity-50 aria-disabled:not-aria-busy:opacity-50";
|
|
5
|
+
const buttonClasses = cva("group/button inline-flex min-h-touch-target min-w-touch-target shrink-0 items-center justify-center rounded-sm border border-transparent bg-clip-padding text-button font-medium whitespace-nowrap transition-[background-color,border-color,color] duration-(--nc-duration-confirm) ease-(--nc-ease-out-strong) select-none disabled:pointer-events-none aria-disabled:pointer-events-none aria-invalid:border-destructive [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [@media(hover:hover)_and_(pointer:fine)]:min-w-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: [
|
|
9
|
+
"bg-primary text-primary-foreground hover:bg-primary-hover active:bg-primary-hover aria-expanded:bg-primary-hover",
|
|
10
|
+
heldNeutral,
|
|
11
|
+
],
|
|
12
|
+
outline: [
|
|
13
|
+
"border-border bg-(--nc-field,var(--background)) text-foreground hover:bg-muted hover:text-foreground active:bg-muted aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
14
|
+
heldNeutral,
|
|
15
|
+
],
|
|
16
|
+
secondary: [
|
|
17
|
+
"border-border bg-secondary text-secondary-foreground hover:bg-accent active:bg-accent aria-expanded:bg-accent aria-expanded:text-accent-foreground",
|
|
18
|
+
heldNeutral,
|
|
19
|
+
],
|
|
20
|
+
ghost: [
|
|
21
|
+
"hover:bg-muted hover:text-foreground active:bg-muted aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
22
|
+
heldDim,
|
|
23
|
+
],
|
|
24
|
+
brandGhost: [
|
|
25
|
+
"text-nc-identity-white hover:bg-nc-identity-white/10 hover:text-nc-identity-white aria-expanded:bg-nc-identity-white/10 aria-expanded:text-nc-identity-white",
|
|
26
|
+
heldDim,
|
|
27
|
+
],
|
|
28
|
+
brandSolid: [
|
|
29
|
+
"bg-nc-identity-white text-nc-identity-ink hover:bg-nc-identity-white/90 hover:text-nc-identity-ink active:bg-nc-identity-white/90 active:text-nc-identity-ink",
|
|
30
|
+
heldDim,
|
|
31
|
+
],
|
|
32
|
+
destructive: [
|
|
33
|
+
"bg-destructive text-destructive-foreground hover:brightness-90 active:brightness-90",
|
|
34
|
+
heldNeutral,
|
|
35
|
+
],
|
|
36
|
+
warning: [
|
|
37
|
+
"bg-warning text-warning-foreground hover:brightness-90 active:brightness-90",
|
|
38
|
+
heldNeutral,
|
|
39
|
+
],
|
|
40
|
+
link: ["text-(--nc-link) underline-offset-4 hover:underline", heldDim],
|
|
41
|
+
},
|
|
42
|
+
size: {
|
|
43
|
+
default: "h-control-height gap-0.75 px-button-padding-inline [@media(hover:hover)_and_(pointer:fine)]:min-h-control-height [&_[data-icon]_svg:not([class*='size-'])]:size-3.5",
|
|
44
|
+
xs: "h-nadicode-control-height-xs gap-1 px-2 text-button-xs in-data-[slot=button-group]:rounded-sm has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
45
|
+
sm: "h-nadicode-control-height-sm gap-0.75 px-button-padding-inline-sm in-data-[slot=button-group]:rounded-sm [&_svg:not([class*='size-'])]:size-3.5",
|
|
46
|
+
lg: "h-nadicode-control-height-lg gap-0.75 rounded-md px-button-padding-inline-lg text-button-lg",
|
|
47
|
+
inline: "h-auto gap-0.75 p-0 [@media(hover:hover)_and_(pointer:fine)]:min-h-control-height [&_[data-icon]_svg:not([class*='size-'])]:size-3.5",
|
|
48
|
+
icon: "size-control-height",
|
|
49
|
+
"icon-xs": "size-nadicode-control-height-xs rounded-xs-plus in-data-[slot=button-group]:rounded-sm",
|
|
50
|
+
"icon-sm": "size-nadicode-control-height-sm in-data-[slot=button-group]:rounded-sm",
|
|
51
|
+
"icon-lg": "size-nadicode-control-height-lg rounded-md",
|
|
52
|
+
},
|
|
53
|
+
shape: {
|
|
54
|
+
square: "",
|
|
55
|
+
rounded: "rounded-full px-3",
|
|
56
|
+
circle: "rounded-full",
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
defaultVariants: {
|
|
60
|
+
variant: "default",
|
|
61
|
+
size: "default",
|
|
62
|
+
shape: "square",
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* The button classes for an element that is not a `Button`, such as a calendar's
|
|
67
|
+
* day arrows. They pass through `cn` as `Button`'s do, so a variant's border,
|
|
68
|
+
* fill or text replaces the base one instead of losing to it in the stylesheet:
|
|
69
|
+
* unmerged, the base `border-transparent` hides every outline edge. A link
|
|
70
|
+
* drawn as a button is a `ButtonLink`.
|
|
71
|
+
*/
|
|
72
|
+
export function buttonVariants(props) {
|
|
73
|
+
return cn(buttonClasses(props));
|
|
74
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-list.d.ts","sourceRoot":"","sources":["../../src/internal/catalog-list.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,4BAA4B,CAAC;AASpF,KAAK,cAAc,GAAG,CAAC,GAAG,CAAC,CAAC;AAqG5B,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,YAAgB,EAChB,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,cAAc,CAAC;IACxB,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACrB,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;CACrC,+
|
|
1
|
+
{"version":3,"file":"catalog-list.d.ts","sourceRoot":"","sources":["../../src/internal/catalog-list.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,4BAA4B,CAAC;AASpF,KAAK,cAAc,GAAG,CAAC,GAAG,CAAC,CAAC;AAqG5B,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,YAAgB,EAChB,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,cAAc,CAAC;IACxB,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACrB,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;CACrC,+BAsBA;AAED,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;IAAE,OAAO,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,+BAoB7F;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,OAAO,CAE3E"}
|
|
@@ -19,7 +19,7 @@ function EntryName({ link, name }) {
|
|
|
19
19
|
children: name,
|
|
20
20
|
className: textLinkVariants({ kind: "plain" }),
|
|
21
21
|
};
|
|
22
|
-
return link.renderLink ? link.renderLink(anchor) : _jsx("a", { ...anchor });
|
|
22
|
+
return link.renderLink ? link.renderLink(anchor) : _jsx("a", { ...anchor, children: name });
|
|
23
23
|
}
|
|
24
24
|
function EntryAdd({ add }) {
|
|
25
25
|
const { added, ...command } = add;
|
|
@@ -41,9 +41,13 @@ function TitledSection({ columns, entries, headingLevel, title, }) {
|
|
|
41
41
|
return (_jsxs("section", { "aria-labelledby": headingId, className: "grid min-w-0 gap-3", children: [_jsx(Heading, { className: "text-heading-sm text-foreground", id: headingId, children: title }), _jsx(EntryList, { columns: columns, entries: entries })] }));
|
|
42
42
|
}
|
|
43
43
|
export function CatalogList({ columns, headingLevel = 3, sections, }) {
|
|
44
|
-
return (_jsx("div", { className: "grid min-w-0 gap-8", children: sections
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
return (_jsx("div", { className: "grid min-w-0 gap-8", children: sections.flatMap(({ id, title, entries }) => {
|
|
45
|
+
if (entries.length === 0)
|
|
46
|
+
return [];
|
|
47
|
+
return [
|
|
48
|
+
title ? (_jsx(TitledSection, { columns: columns, entries: entries, headingLevel: headingLevel, id: id, title: title }, id)) : (_jsx(EntryList, { columns: columns, entries: entries }, id)),
|
|
49
|
+
];
|
|
50
|
+
}) }));
|
|
47
51
|
}
|
|
48
52
|
export function CatalogSkeleton({ columns, label }) {
|
|
49
53
|
return (_jsx(SkeletonRegion, { "aria-label": label, busy: true, className: cn("grid gap-3", columns === 2 && "md:grid-cols-2"), role: "status", children: Array.from({ length: columns * 3 }, (_, index) => (_jsxs("div", { "aria-hidden": "true", className: ENTRY_FRAME, children: [_jsx(Skeleton, { className: "size-10 shrink-0" }), _jsxs("div", { className: "grid flex-1 gap-1.5 pt-0.5", children: [_jsx(Skeleton, { className: "h-4 w-32" }), _jsx(Skeleton, { className: "h-3.5 w-full" })] }), _jsx(Skeleton, { className: "h-control-height w-16 shrink-0" })] }, index))) }));
|
|
@@ -8,11 +8,11 @@ import { PageCommandButton } from "../components/page-actions.js";
|
|
|
8
8
|
import { Skeleton, SkeletonRegion } from "../components/skeleton.js";
|
|
9
9
|
import { StatusBadge } from "../components/status-badge.js";
|
|
10
10
|
import { cn } from "../lib/utils.js";
|
|
11
|
-
function defaultLink(props) {
|
|
12
|
-
return _jsx("a", { ...props });
|
|
11
|
+
function defaultLink({ children, ...props }) {
|
|
12
|
+
return _jsx("a", { ...props, children: children });
|
|
13
13
|
}
|
|
14
14
|
function RailItem({ item, renderLink, }) {
|
|
15
|
-
const body = (_jsxs(_Fragment, { children: [item.mark ? _jsx(IdentityMark, { ...item.mark, size: 24 }) : null, _jsxs("span", { className: "grid min-w-0 flex-1", children: [_jsx("span", { className: "truncate font-medium text-foreground", title: item.title, children: item.title }), item.detail ? (_jsx("span", { className: "line-clamp-2 text-body-sm break-
|
|
15
|
+
const body = (_jsxs(_Fragment, { children: [item.mark ? _jsx(IdentityMark, { ...item.mark, size: 24 }) : null, _jsxs("span", { className: "grid min-w-0 flex-1", children: [_jsx("span", { className: "truncate font-medium text-foreground", title: item.title, children: item.title }), item.detail ? (_jsx("span", { className: "line-clamp-2 text-body-sm wrap-break-word text-muted-foreground", children: item.detail })) : null] }), item.status ? _jsx(StatusBadge, { label: item.status.label, tone: item.status.tone }) : null, item.value === undefined ? null : (_jsx("span", { className: "shrink-0 text-right text-foreground tabular-nums", children: item.value }))] }));
|
|
16
16
|
const row = "flex min-h-9 min-w-0 items-center gap-3 px-4 py-2 text-sm";
|
|
17
17
|
return (_jsx("li", { "data-slot": "collection-rail-item", children: item.href ? (renderLink({
|
|
18
18
|
href: item.href,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FormSurfaceProps } from "../components/form-drawer.js";
|
|
2
|
+
export type FormDrawerFrameProps = FormSurfaceProps & ({
|
|
3
|
+
job: "catalog";
|
|
4
|
+
} | {
|
|
5
|
+
job: "steps";
|
|
6
|
+
progress: string;
|
|
7
|
+
});
|
|
8
|
+
/** The right-side sheet that `FormDrawer` and `CatalogDrawer` both draw. */
|
|
9
|
+
export declare function FormDrawerFrame(props: FormDrawerFrameProps): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=form-drawer-frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-drawer-frame.d.ts","sourceRoot":"","sources":["../../src/internal/form-drawer-frame.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GACjD,CAAC;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE5D,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,+BA0C1D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "../components/sheet.js";
|
|
4
|
+
import { guardUnsaved } from "./unsaved-guard.js";
|
|
5
|
+
/** The right-side sheet that `FormDrawer` and `CatalogDrawer` both draw. */
|
|
6
|
+
export function FormDrawerFrame(props) {
|
|
7
|
+
const { open, onOpenChange, onOpenChangeComplete, title, description, closeLabel, children, initialFocus, finalFocus = true, unsaved, } = props;
|
|
8
|
+
return (_jsx(Sheet, { modal: true, open: open, onOpenChange: guardUnsaved(onOpenChange, unsaved), onOpenChangeComplete: onOpenChangeComplete, children: _jsxs(SheetContent, { closeLabel: closeLabel, finalFocus: finalFocus, initialFocus: initialFocus, side: "right", children: [_jsxs(SheetHeader, { className: "pr-12", children: [props.job === "steps" ? (_jsx("p", { className: "font-label-mono text-label-mono text-muted-foreground", "data-slot": "form-drawer-progress", children: props.progress })) : null, _jsx(SheetTitle, { className: "wrap-break-word", children: title }), description ? _jsx(SheetDescription, { children: description }) : null] }), children] }) }));
|
|
9
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
import type { Form } from "../components/form.js";
|
|
2
3
|
/** The save of a drawer's, a dialog's or a row's form. */
|
|
3
4
|
export type FormSubmit = {
|
|
4
5
|
label: string;
|
|
@@ -15,7 +16,7 @@ export type FormSubmit = {
|
|
|
15
16
|
/** The button's own word while the save runs: the label's -ing form, *Saving*. */
|
|
16
17
|
pendingLabel: string;
|
|
17
18
|
});
|
|
18
|
-
export type FormProps = Omit<ComponentProps<
|
|
19
|
+
export type FormProps = Omit<ComponentProps<typeof Form>, "children" | "className"> & {
|
|
19
20
|
cancelLabel: string;
|
|
20
21
|
submit: FormSubmit;
|
|
21
22
|
/** A refusal or a failure of the save, above the footer, where the button is. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-submit.d.ts","sourceRoot":"","sources":["../../src/internal/form-submit.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"form-submit.d.ts","sourceRoot":"","sources":["../../src/internal/form-submit.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C,0DAA0D;AAC1D,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,CACA;IAAE,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9C;IACE,uFAAuF;IACvF,OAAO,EAAE,OAAO,CAAC;IACjB,kFAAkF;IAClF,YAAY,EAAE,MAAM,CAAC;CACtB,CACJ,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC,GAAG;IACpF,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,iFAAiF;IACjF,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAoCF,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,WAAmB,GACpB,EAAE;IACD,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,+BAeA"}
|
|
@@ -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,EASf,MAAM,OAAO,CAAC;AAOf,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAOtF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,eAAe,CAAC;IACzB,2FAA2F;IAC3F,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB;;;;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;AAuGF,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,+BA0GA;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,EAAE,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,sCAqC1D"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { createContext, startTransition, use, useCallback, useEffect, useLayoutEffect, useRef, useState, } from "react";
|
|
3
|
+
import { createContext, startTransition, use, useCallback, useEffect, useLayoutEffect, useMemo, 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
|
+
import { Form } from "../components/form.js";
|
|
7
8
|
import { MessageNotice } from "../components/message-notice.js";
|
|
8
9
|
import { messageSentences } from "../components/product-message.js";
|
|
9
10
|
import { CardContent } from "../components/card.js";
|
|
@@ -100,6 +101,7 @@ export function SettingsSaveForm({ save, titleId, children, }) {
|
|
|
100
101
|
element.addEventListener("reset", onReset);
|
|
101
102
|
return () => element.removeEventListener("reset", onReset);
|
|
102
103
|
}, [controlled]);
|
|
104
|
+
const saveContext = useMemo(() => ({ failure, claim }), [failure, claim]);
|
|
103
105
|
// A toast's store renders at once, outside the transition that ends the save, so `saved` waits for the commit
|
|
104
106
|
// that ends it, or for the section to close with it.
|
|
105
107
|
const announce = useCallback(() => {
|
|
@@ -116,7 +118,7 @@ export function SettingsSaveForm({ save, titleId, children, }) {
|
|
|
116
118
|
}, [announce]);
|
|
117
119
|
const changed = save.changed ?? fieldsChanged;
|
|
118
120
|
const sectionFailure = failure && (failure.field === undefined || !claimedFields.has(failure.field)) ? failure : null;
|
|
119
|
-
return (_jsx(SettingsSaveContext, { value:
|
|
121
|
+
return (_jsx(SettingsSaveContext, { value: saveContext, children: _jsxs(Form, { ref: form, "aria-labelledby": titleId, className: "contents", "data-slot": "settings-section-form", action: async (formData) => {
|
|
120
122
|
const result = await save.action(formData);
|
|
121
123
|
keepValuesOnReset.current = result !== null;
|
|
122
124
|
if (result === null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-mark.d.ts","sourceRoot":"","sources":["../../src/internal/status-mark.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEpF,MAAM,MAAM,aAAa,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"status-mark.d.ts","sourceRoot":"","sources":["../../src/internal/status-mark.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEpF,MAAM,MAAM,aAAa,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAkHpE,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,eAAe,EAAE,SAAS,aAAa,EAAE,CAM9E,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;CAAsC,CAAC;AAgB1E,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,eAAe,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAMtF,CAAC"}
|
|
@@ -45,7 +45,10 @@ const MARKS = {
|
|
|
45
45
|
ring: { outline: { kind: "circle", r: 6.7 }, hollow: true },
|
|
46
46
|
};
|
|
47
47
|
function sides(corners) {
|
|
48
|
-
return corners.
|
|
48
|
+
return corners.flatMap((start, index) => {
|
|
49
|
+
const end = corners[(index + 1) % corners.length];
|
|
50
|
+
return end === undefined ? [] : [[start, end]];
|
|
51
|
+
});
|
|
49
52
|
}
|
|
50
53
|
function contains(outline, [x, y]) {
|
|
51
54
|
if (outline.kind === "circle")
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** What a row of `Tabs` and a row of `TabsNav` links share: the row's required name and one tab's shape. */
|
|
2
|
+
export type TabGroupName = {
|
|
3
|
+
"aria-label": string;
|
|
4
|
+
"aria-labelledby"?: string | undefined;
|
|
5
|
+
} | {
|
|
6
|
+
"aria-labelledby": string;
|
|
7
|
+
"aria-label"?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
export declare const tabShape = "nc-transition-paint relative inline-flex shrink-0 h-nadicode-control-height-sm min-h-touch-target min-w-touch-target items-center justify-center gap-1.5 rounded-sm px-3 text-label-sm font-normal whitespace-nowrap text-muted-foreground not-aria-disabled:hover:text-foreground aria-disabled:cursor-not-allowed focus-visible:-outline-offset-2 [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [@media(hover:hover)_and_(pointer:fine)]:min-w-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 group-data-[variant=line]/tabs-list:rounded-none group-data-[variant=line]/tabs-list:text-body-sm";
|
|
10
|
+
//# sourceMappingURL=tab-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-row.d.ts","sourceRoot":"","sources":["../../src/internal/tab-row.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAE5G,MAAM,MAAM,YAAY,GACpB;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAChE;IAAE,iBAAiB,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAErE,eAAO,MAAM,QAAQ,8mBACwlB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/** What a row of `Tabs` and a row of `TabsNav` links share: the row's required name and one tab's shape. */
|
|
2
|
+
export const tabShape = "nc-transition-paint relative inline-flex shrink-0 h-nadicode-control-height-sm min-h-touch-target min-w-touch-target items-center justify-center gap-1.5 rounded-sm px-3 text-label-sm font-normal whitespace-nowrap text-muted-foreground not-aria-disabled:hover:text-foreground aria-disabled:cursor-not-allowed focus-visible:-outline-offset-2 [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [@media(hover:hover)_and_(pointer:fine)]:min-w-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 group-data-[variant=line]/tabs-list:rounded-none group-data-[variant=line]/tabs-list:text-body-sm";
|
|
@@ -10,7 +10,7 @@ export type TableDetailFact = {
|
|
|
10
10
|
besideName?: boolean;
|
|
11
11
|
};
|
|
12
12
|
/** A facts line reads a `Tag` as its text and a block value inline. */
|
|
13
|
-
export declare const detailFactsLine = "
|
|
13
|
+
export declare const detailFactsLine = "**:data-[slot=tag]:contents [&>span>:is(div,p,.block,.grid,.flex)]:inline";
|
|
14
14
|
export declare const detailFactsWrap = "[&_:not(.sr-only,[data-slot=badge],[data-slot=badge]_*)]:whitespace-normal";
|
|
15
15
|
export declare function DetailFacts({ facts, leadingSeparator, }: {
|
|
16
16
|
facts: readonly TableDetailFact[];
|
|
@@ -1 +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;IAChB,wGAAwG;IACxG,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,eAAe
|
|
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;IAChB,wGAAwG;IACxG,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,eAAe,8EACiD,CAAC;AAE9E,eAAO,MAAM,eAAe,+EACkD,CAAC;AAE/E,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,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,6BAahC;AAED,2KAA2K;AAC3K,wBAAgB,qBAAqB,6BAkBpC;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"}
|
|
@@ -4,7 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
import { tableCompactLayouts } from "../components/table-layouts.js";
|
|
5
5
|
import { cn } from "../lib/utils.js";
|
|
6
6
|
/** A facts line reads a `Tag` as its text and a block value inline. */
|
|
7
|
-
export const detailFactsLine = "
|
|
7
|
+
export const detailFactsLine = "**:data-[slot=tag]:contents [&>span>:is(div,p,.block,.grid,.flex)]:inline";
|
|
8
8
|
export const detailFactsWrap = "[&_:not(.sr-only,[data-slot=badge],[data-slot=badge]_*)]:whitespace-normal";
|
|
9
9
|
export function DetailFacts({ facts, leadingSeparator = false, }) {
|
|
10
10
|
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)));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
2
|
+
import type { PresentContent } from "./present-content.js";
|
|
3
|
+
type TooltipContentFrameProps = TooltipPrimitive.Popup.Props & Pick<TooltipPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset"> & {
|
|
4
|
+
/** What the tooltip says; a tooltip without it does not compile. */
|
|
5
|
+
children: PresentContent;
|
|
6
|
+
/** The stem pointing at the trigger; `false` for a tooltip that sits against it. */
|
|
7
|
+
arrow?: boolean;
|
|
8
|
+
/** Centres the text of a tooltip that wraps; `false` left-aligns it. */
|
|
9
|
+
centerText?: boolean;
|
|
10
|
+
};
|
|
11
|
+
/** The popup `TooltipContent` draws; only the package passes it content other than text. */
|
|
12
|
+
declare function TooltipContentFrame({ className, side, sideOffset, align, alignOffset, arrow, centerText, children, ...props }: TooltipContentFrameProps): import("react").JSX.Element;
|
|
13
|
+
export { TooltipContentFrame, type TooltipContentFrameProps };
|
|
14
|
+
//# sourceMappingURL=tooltip-content-frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip-content-frame.d.ts","sourceRoot":"","sources":["../../src/internal/tooltip-content-frame.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAGrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIjE,KAAK,wBAAwB,GAAG,gBAAgB,CAAC,KAAK,CAAC,KAAK,GAC1D,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,YAAY,CAAC,GAAG;IACzF,oEAAoE;IACpE,QAAQ,EAAE,cAAc,CAAC;IACzB,oFAAoF;IACpF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wEAAwE;IACxE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEJ,4FAA4F;AAC5F,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,IAAY,EACZ,UAAe,EACf,KAAgB,EAChB,WAAe,EACf,KAAY,EACZ,UAAiB,EACjB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,wBAAwB,+BA+B1B;AAED,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
4
|
+
import { overlayStem, OverlayStemShape } from "./overlay-stem.js";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
import { anchoredOverlayMotion } from "../lib/motion.js";
|
|
7
|
+
/** The popup `TooltipContent` draws; only the package passes it content other than text. */
|
|
8
|
+
function TooltipContentFrame({ className, side = "top", sideOffset = 10, align = "center", alignOffset = 0, arrow = true, centerText = true, children, ...props }) {
|
|
9
|
+
return (_jsx(TooltipPrimitive.Portal, { children: _jsx(TooltipPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-50", children: _jsxs(TooltipPrimitive.Popup, { "data-slot": "tooltip-content", "data-nc-ui": "", className: cn("z-50 w-fit max-w-62.5 rounded-md border-0 bg-foreground px-nadicode-xs py-1.5 text-body-compact text-balance text-background nc-elevation-floating has-data-[slot=kbd]:inline-flex has-data-[slot=kbd]:items-center has-data-[slot=kbd]:gap-1 has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:h-5 **:data-[slot=kbd]:min-w-5 **:data-[slot=kbd]:text-caption **:data-[slot=kbd]:leading-5", centerText ? "text-center" : "text-left", anchoredOverlayMotion, className), ...props, children: [children, arrow ? (_jsx(TooltipPrimitive.Arrow, { className: cn(overlayStem, "[&_path]:fill-foreground"), children: _jsx(OverlayStemShape, {}) })) : null] }) }) }));
|
|
10
|
+
}
|
|
11
|
+
export { TooltipContentFrame };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
type StyleWithVariables = CSSProperties & {
|
|
3
|
+
[name: `--${string}`]: string | number | undefined;
|
|
4
|
+
};
|
|
5
|
+
/** A `style` object that sets CSS custom properties, which `CSSProperties` does not list; React sets each `--` key through `style.setProperty`. */
|
|
6
|
+
export declare function cssVariables(style: StyleWithVariables): CSSProperties;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=css-variables.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css-variables.d.ts","sourceRoot":"","sources":["../../src/lib/css-variables.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,KAAK,kBAAkB,GAAG,aAAa,GAAG;IAAE,CAAC,IAAI,EAAE,KAAK,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEjG,mJAAmJ;AACnJ,wBAAgB,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAErE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by scripts/generate-merge-tokens.mjs from @nadicodeai/design-system/css.
|
|
2
|
-
// Do not edit: `
|
|
2
|
+
// Do not edit: `pnpm --filter @nadicodeai/ui generate:merge-tokens` rewrites it.
|
|
3
3
|
export const themeMergeTokens = {
|
|
4
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
5
|
radius: "2xl 3xl full lg md none sm xl xs xs-plus".split(" "),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-copy-to-clipboard.d.ts","sourceRoot":"","sources":["../../src/lib/use-copy-to-clipboard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-copy-to-clipboard.d.ts","sourceRoot":"","sources":["../../src/lib/use-copy-to-clipboard.ts"],"names":[],"mappings":"AA4BA,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,MAAM,EACN,OAAO,EACP,OAAO,EACP,eAAuB,GACxB,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;;;EAsCA"}
|
|
@@ -11,8 +11,7 @@ async function attemptCopy(input) {
|
|
|
11
11
|
return { kind: "copied" };
|
|
12
12
|
}
|
|
13
13
|
catch (error) {
|
|
14
|
-
|
|
15
|
-
return { kind: "failed", error: error };
|
|
14
|
+
return { kind: "failed", error: error instanceof Error ? error : new Error(String(error)) };
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
17
|
export function useCopyToClipboard({ text, onCopy, onError, timeout, skipWhileCopied = false, }) {
|
package/dist/showcase/samples.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Copy, Pencil, Trash2 } from "lucide-react";
|
|
3
3
|
import { agentOrbColorTokens } from "../components/agent-orb-appearance.js";
|
|
4
|
-
//
|
|
4
|
+
// oxlint-disable-next-line nadicodeai/product-message-imports -- the showcase words its own sample messages, which no product shows
|
|
5
5
|
import { wordMessage } from "../components/product-message.js";
|
|
6
6
|
export const nothing = () => undefined;
|
|
7
7
|
export const COBALTO = agentOrbColorTokens.cobalto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"choices.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/choices.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"choices.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/choices.tsx"],"names":[],"mappings":"AAyDA,iBAAS,sBAAsB,gCAc9B;AAED,iBAAS,gBAAgB,gCAgCxB;AAED,iBAAS,mBAAmB,gCAiB3B;AAED,iBAAS,uBAAuB,gCAe/B;AAED,iBAAS,sBAAsB,gCAqF9B;AAED,iBAAS,mBAAmB,gCAoC3B;AAID,iBAAS,wBAAwB,gCA8DhC;AAED,iBAAS,cAAc,gCA2CtB;AAED,iBAAS,yBAAyB,gCAUjC;AAED,iBAAS,yBAAyB,gCAQjC;AAED,iBAAS,kBAAkB,gCAsE1B;AAED,iBAAS,gBAAgB,gCAoCxB;AAED,iBAAS,cAAc,gCAgDtB;AAED,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;CAyBO,CAAC"}
|
|
@@ -9,6 +9,7 @@ import { ChoiceboxGroup, ChoiceboxGroupItem } from "../../components/choicebox.j
|
|
|
9
9
|
import { CollectionSort } from "../../components/collection-sort.js";
|
|
10
10
|
import { Combobox, ComboboxContent, ComboboxInput, ComboboxItem, ComboboxList, ComboboxLoading, } from "../../components/combobox.js";
|
|
11
11
|
import { Field, FieldLabel, FieldLegend, FieldSet } from "../../components/field.js";
|
|
12
|
+
import { Form } from "../../components/form.js";
|
|
12
13
|
import { Label } from "../../components/label.js";
|
|
13
14
|
import { MultiSelect, MultiSelectContent, MultiSelectRow, MultiSelectTrigger, } from "../../components/multi-select.js";
|
|
14
15
|
import { RadioGroup, RadioGroupItem } from "../../components/radio-group.js";
|
|
@@ -58,7 +59,7 @@ function SegmentedChoiceSpecimen() {
|
|
|
58
59
|
}
|
|
59
60
|
function ChoiceboxGroupSpecimen() {
|
|
60
61
|
const [plan, setPlan] = useState("trial");
|
|
61
|
-
return (_jsxs("div", { className: "grid max-w-2xl gap-6", children: [_jsxs(ChoiceboxGroup, { label: "Plan", name: "plan", onValueChange: (next) => setPlan(next === "pro" ? "pro" : "trial"), showLabel: true, type: "radio", value: plan, children: [_jsx(ChoiceboxGroupItem, { description: "Free for two weeks.",
|
|
62
|
+
return (_jsxs("div", { className: "grid max-w-2xl gap-6", children: [_jsxs(ChoiceboxGroup, { label: "Plan", name: "plan", onValueChange: (next) => setPlan(next === "pro" ? "pro" : "trial"), showLabel: true, type: "radio", value: plan, children: [_jsx(ChoiceboxGroupItem, { description: "Free for two weeks.", selectedFacts: ["Ends on 30 November."], title: "Pro trial", value: "trial" }), _jsx(ChoiceboxGroupItem, { description: "Starts today.", title: "Pro", value: "pro" }), _jsx(ChoiceboxGroupItem, { description: "For one company only.", disabledReason: "Already used on this company.", title: "Second trial", value: "second-trial" })] }), _jsxs(ChoiceboxGroup, { defaultValue: "standard", label: "Server size", name: "server-size", showLabel: true, type: "radio", children: [_jsx(ChoiceboxGroupItem, { badge: "Recommended", description: "Enough for most teams.", specs: ["4 vCPU", "8 GB"], title: "Standard", value: "standard" }), _jsx(ChoiceboxGroupItem, { description: "For heavy daily use.", specs: ["8 vCPU", "16 GB"], title: "Enhanced", value: "enhanced" })] }), _jsxs(ChoiceboxGroup, { label: "Send the report by", showLabel: true, type: "checkbox", children: [_jsx(ChoiceboxGroupItem, { description: "To the billing address.", title: "Email", value: "email" }), _jsx(ChoiceboxGroupItem, { description: "To the Rossi Ottica channel.", title: "Alveare", value: "chat" })] }), _jsxs(ChoiceboxGroup, { defaultValue: "pro", disabledReason: "Your partner manages this plan.", label: "Plan, managed by a partner", showLabel: true, type: "radio", children: [_jsx(ChoiceboxGroupItem, { description: "Free for two weeks.", title: "Pro trial", value: "trial" }), _jsx(ChoiceboxGroupItem, { description: "Starts today.", title: "Pro", value: "pro" })] }), _jsxs(ChoiceboxGroup, { defaultValue: ["email"], label: "Send the invoice by", showLabel: true, type: "checkbox", children: [_jsx(ChoiceboxGroupItem, { description: "To the billing address.", title: "Email", value: "email" }), _jsx(ChoiceboxGroupItem, { description: "Not set up for this company.", disabledReason: "Connect Alveare first.", title: "Alveare", value: "chat" })] }), _jsxs(ChoiceboxGroup, { label: "Plan, stacked", orientation: "vertical", showLabel: true, type: "radio", children: [_jsx(ChoiceboxGroupItem, { description: "Free for two weeks.", title: "Pro trial", value: "trial" }), _jsx(ChoiceboxGroupItem, { description: "Starts today.", title: "Pro", value: "pro" })] })] }));
|
|
62
63
|
}
|
|
63
64
|
function MultiSelectSpecimen() {
|
|
64
65
|
const [chosen, setChosen] = useState(new Set(["Milan", "Frankfurt"]));
|
|
@@ -117,7 +118,7 @@ function RadioGroupSpecimen() {
|
|
|
117
118
|
const legend = `${id}-legend`;
|
|
118
119
|
const disabledLegend = `${id}-disabled-legend`;
|
|
119
120
|
const requiredLegend = `${id}-required-legend`;
|
|
120
|
-
return (_jsxs("div", { className: "grid max-w-md gap-8", children: [_jsxs(FieldSet, { children: [_jsx(FieldLegend, { id: legend, variant: "label", children: "Who can see this Agent" }), _jsxs(RadioGroup, { "aria-labelledby": legend, defaultValue: "me", children: [_jsxs(Field, { orientation: "horizontal", children: [_jsx(RadioGroupItem, { id: `${id}-me`, value: "me" }), _jsx(FieldLabel, { htmlFor: `${id}-me`, children: "Only me" })] }), _jsxs(Field, { orientation: "horizontal", children: [_jsx(RadioGroupItem, { id: `${id}-everyone`, value: "everyone" }), _jsx(FieldLabel, { htmlFor: `${id}-everyone`, children: "Everyone in the company" })] })] })] }), _jsxs(FieldSet, { children: [_jsx(FieldLegend, { id: disabledLegend, variant: "label", children: "Who can see this Agent, locked" }), _jsxs(RadioGroup, { "aria-labelledby": disabledLegend, defaultValue: "me", disabled: true, children: [_jsxs(Field, { orientation: "horizontal", children: [_jsx(RadioGroupItem, { id: `${id}-locked-me`, value: "me" }), _jsx(FieldLabel, { htmlFor: `${id}-locked-me`, children: "Only me" })] }), _jsxs(Field, { orientation: "horizontal", children: [_jsx(RadioGroupItem, { id: `${id}-locked-everyone`, value: "everyone" }), _jsx(FieldLabel, { htmlFor: `${id}-locked-everyone`, children: "Everyone in the company" })] })] })] }), _jsxs(
|
|
121
|
+
return (_jsxs("div", { className: "grid max-w-md gap-8", children: [_jsxs(FieldSet, { children: [_jsx(FieldLegend, { id: legend, variant: "label", children: "Who can see this Agent" }), _jsxs(RadioGroup, { "aria-labelledby": legend, defaultValue: "me", children: [_jsxs(Field, { orientation: "horizontal", children: [_jsx(RadioGroupItem, { id: `${id}-me`, value: "me" }), _jsx(FieldLabel, { htmlFor: `${id}-me`, children: "Only me" })] }), _jsxs(Field, { orientation: "horizontal", children: [_jsx(RadioGroupItem, { id: `${id}-everyone`, value: "everyone" }), _jsx(FieldLabel, { htmlFor: `${id}-everyone`, children: "Everyone in the company" })] })] })] }), _jsxs(FieldSet, { children: [_jsx(FieldLegend, { id: disabledLegend, variant: "label", children: "Who can see this Agent, locked" }), _jsxs(RadioGroup, { "aria-labelledby": disabledLegend, defaultValue: "me", disabled: true, children: [_jsxs(Field, { orientation: "horizontal", children: [_jsx(RadioGroupItem, { id: `${id}-locked-me`, value: "me" }), _jsx(FieldLabel, { htmlFor: `${id}-locked-me`, children: "Only me" })] }), _jsxs(Field, { orientation: "horizontal", children: [_jsx(RadioGroupItem, { id: `${id}-locked-everyone`, value: "everyone" }), _jsx(FieldLabel, { htmlFor: `${id}-locked-everyone`, children: "Everyone in the company" })] })] })] }), _jsxs(Form, { className: "grid gap-4", onSubmit: (event) => {
|
|
121
122
|
event.preventDefault();
|
|
122
123
|
}, children: [_jsxs(FieldSet, { children: [_jsx(FieldLegend, { id: requiredLegend, variant: "label", children: "Billing cycle" }), _jsxs(RadioGroup, { "aria-labelledby": requiredLegend, name: "cycle", required: true, children: [_jsxs(Field, { orientation: "horizontal", children: [_jsx(RadioGroupItem, { id: `${id}-monthly`, value: "monthly" }), _jsx(FieldLabel, { htmlFor: `${id}-monthly`, children: "Monthly" })] }), _jsxs(Field, { orientation: "horizontal", children: [_jsx(RadioGroupItem, { id: `${id}-yearly`, value: "yearly" }), _jsx(FieldLabel, { htmlFor: `${id}-yearly`, children: "Yearly" })] })] })] }), _jsx(Button, { className: "justify-self-start", size: "sm", type: "submit", children: "Choose billing cycle" })] }), _jsx(RadioGroup, { "aria-label": "Standalone", defaultValue: "only", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(RadioGroupItem, { "aria-label": "Keep the old key", value: "only" }), _jsx("span", { className: "text-label-sm text-foreground", children: "Keep the old key" })] }) })] }));
|
|
123
124
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compositions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/compositions.tsx"],"names":[],"mappings":"AAoIA,iBAAS,oBAAoB,gCA+B5B;
|
|
1
|
+
{"version":3,"file":"compositions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/compositions.tsx"],"names":[],"mappings":"AAoIA,iBAAS,oBAAoB,gCA+B5B;AAMD,iBAAS,wBAAwB,gCAahC;AAED,iBAAS,qBAAqB,gCA0B7B;AAED,iBAAS,yBAAyB,gCAGjC;AAED,iBAAS,sBAAsB,gCAyD9B;AAED,iBAAS,yBAAyB,gCAUjC;AAED,iBAAS,qBAAqB,gCAwC7B;AAED,iBAAS,kBAAkB,gCAiB1B;AAED,iBAAS,kBAAkB,gCAuE1B;AAED,iBAAS,kBAAkB,gCAwB1B;AAED,iBAAS,oBAAoB,gCAkD5B;AAED,iBAAS,oBAAoB,gCAqC5B;AAED,iBAAS,mBAAmB,gCA2B3B;AAED,iBAAS,mBAAmB,gCAoB3B;AAwBD,iBAAS,uBAAuB,gCAkD/B;AA+BD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;CA2FE,CAAC"}
|
|
@@ -134,8 +134,9 @@ function ActivityFeedSpecimen() {
|
|
|
134
134
|
},
|
|
135
135
|
], empty: { kind: "nothingYet", message: "Nothing has happened yet." }, label: "Activity", loadingLabel: "Loading activity", locale: "en" }));
|
|
136
136
|
}
|
|
137
|
+
const cobaltoOrb = (size) => (_jsx(AgentOrb, { color: COBALTO, decorative: true, form: "orbit", size: size }));
|
|
137
138
|
function AgentProfileCardSpecimen() {
|
|
138
|
-
return (_jsx(AgentProfileCard, { activity: { label: "Last active", value: "Today at 09:13", missingLabel: "Never" }, description: "Writes quotes from the price list", descriptionMissingLabel: "No description yet", edit: { label: "Edit Acme Quotes", onClick: nothing }, name: "Acme Quotes", orb:
|
|
139
|
+
return (_jsx(AgentProfileCard, { activity: { label: "Last active", value: "Today at 09:13", missingLabel: "Never" }, description: "Writes quotes from the price list", descriptionMissingLabel: "No description yet", edit: { label: "Edit Acme Quotes", onClick: nothing }, name: "Acme Quotes", orb: cobaltoOrb, origin: { label: "Made from", value: "Sales template", missingLabel: "Made from scratch" }, state: { label: "State", tone: "success", text: "Ready" } }));
|
|
139
140
|
}
|
|
140
141
|
function CatalogDrawerSpecimen() {
|
|
141
142
|
const [open, setOpen] = useState(false);
|
|
@@ -345,6 +346,10 @@ function SelectableRecordListSpecimen() {
|
|
|
345
346
|
}),
|
|
346
347
|
} }));
|
|
347
348
|
}
|
|
349
|
+
const reconnectMenu = (mailbox) => ({
|
|
350
|
+
label: `More for ${mailbox.address}`,
|
|
351
|
+
commands: [{ label: "Reconnect", icon: _jsx(RefreshCw, {}), onClick: nothing }],
|
|
352
|
+
});
|
|
348
353
|
export const COMPOSITIONS = {
|
|
349
354
|
ActivityFeed: ActivityFeedSpecimen,
|
|
350
355
|
AgentProfileCard: AgentProfileCardSpecimen,
|
|
@@ -372,10 +377,7 @@ export const COMPOSITIONS = {
|
|
|
372
377
|
] }) })),
|
|
373
378
|
OverviewPage: OverviewPageSpecimen,
|
|
374
379
|
PageHeader: () => (_jsxs(PageActionsHostProvider, { children: [_jsx(PageHeader, { title: "Customers" }), _jsx(PageActions, { primary: { label: "Invite customer", icon: _jsx(Plus, {}), onClick: nothing } })] })),
|
|
375
|
-
RecordList: () => (_jsxs("div", { className: "grid gap-6", children: [_jsx(RecordList, { ...MAILBOX_LIST, footer: { count: "3 mailboxes" }, label: "Mailboxes", records: MAILBOXES }), _jsx(RecordList, { ...MAILBOX_LIST, label: "Mailboxes with one command", menu: (
|
|
376
|
-
label: `More for ${mailbox.address}`,
|
|
377
|
-
commands: [{ label: "Reconnect", icon: _jsx(RefreshCw, {}), onClick: nothing }],
|
|
378
|
-
}), records: MAILBOXES }), _jsx(RecordList, { ...MAILBOX_LIST, command: () => ({
|
|
380
|
+
RecordList: () => (_jsxs("div", { className: "grid gap-6", children: [_jsx(RecordList, { ...MAILBOX_LIST, footer: { count: "3 mailboxes" }, label: "Mailboxes", records: MAILBOXES }), _jsx(RecordList, { ...MAILBOX_LIST, label: "Mailboxes with one command", menu: reconnectMenu, records: MAILBOXES }), _jsx(RecordList, { ...MAILBOX_LIST, command: () => ({
|
|
379
381
|
label: "Reconnect",
|
|
380
382
|
pendingLabel: "Reconnecting…",
|
|
381
383
|
icon: _jsx(RefreshCw, {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/data.tsx"],"names":[],"mappings":"AA4HA,iBAAS,iBAAiB,gCAczB;AAsCD,iBAAS,iBAAiB,gCAkDzB;AAUD,iBAAS,eAAe,gCASvB;AAED,iBAAS,YAAY,gCAoCpB;AAED,iBAAS,WAAW,
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/data.tsx"],"names":[],"mappings":"AA4HA,iBAAS,iBAAiB,gCAczB;AAsCD,iBAAS,iBAAiB,gCAkDzB;AAUD,iBAAS,eAAe,gCASvB;AAED,iBAAS,YAAY,gCAoCpB;AAED,iBAAS,WAAW,gCAuBnB;AAQD,iBAAS,gBAAgB,gCAqBxB;AAED,iBAAS,qBAAqB,gCAc7B;AAED,iBAAS,UAAU,gCAqClB;AAED,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;CAgOU,CAAC"}
|
|
@@ -137,7 +137,7 @@ function ItemSpecimen() {
|
|
|
137
137
|
return (_jsxs(ItemGroup, { className: "max-w-lg", divided: true, children: [_jsxs(Item, { children: [_jsx(ItemMedia, { variant: "icon", children: _jsx(MessageCircle, { "aria-hidden": "true" }) }), _jsxs(ItemContent, { children: [_jsx(ItemTitle, { children: "Telegram" }), _jsx(ItemDescription, { children: "Invoices answers the sales group here." })] }), _jsx(ItemActions, { children: _jsx(Button, { size: "sm", variant: "outline", children: "Disconnect Telegram" }) })] }), _jsxs(Item, { children: [_jsx(ItemMedia, { variant: "icon", children: _jsx(RotateCw, { "aria-hidden": "true" }) }), _jsxs(ItemContent, { children: [_jsx(ItemTitle, { children: "Nadia filed 12 invoices" }), _jsx(ItemDescription, { children: "From the October statement, in the archive folder." })] })] }), _jsxs(Item, { children: [_jsx(ItemSelect, { checked: selected, label: "Select Chrome, Mac", onCheckedChange: setSelected }), _jsxs(ItemContent, { children: [_jsx(ItemTitle, { children: "Chrome, Mac" }), _jsx(ItemDescription, { children: "Signed in today at 09:14." })] })] })] }));
|
|
138
138
|
}
|
|
139
139
|
function KbdSpecimen() {
|
|
140
|
-
return (_jsxs("div", { className: "grid gap-3 text-sm", children: [_jsxs("span", { className: "flex items-center gap-2", children: ["Find", _jsx(Kbd, { meta: true,
|
|
140
|
+
return (_jsxs("div", { className: "grid gap-3 text-sm", children: [_jsxs("span", { className: "flex items-center gap-2", children: ["Find", _jsx(Kbd, { meta: true, keyName: "K" }), _jsx(Kbd, { meta: true, shift: true, keyName: "K" })] }), _jsxs("span", { className: "flex items-center gap-2", children: ["Find, small", _jsx(Kbd, { meta: true, size: "sm", keyName: "K" }), _jsx(Kbd, { meta: true, shift: true, size: "sm", keyName: "K" })] }), _jsxs("span", { className: "flex items-center gap-2", children: ["Close", _jsx(Kbd, { keyName: "Esc" })] }), _jsxs("span", { className: "flex items-center gap-2", children: ["Previous Agent", _jsx(Kbd, { keyName: "ArrowUp" })] })] }));
|
|
141
141
|
}
|
|
142
142
|
const IMPORT_STOPS = [
|
|
143
143
|
{ value: 1, label: "Reading the file" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/feedback.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/feedback.tsx"],"names":[],"mappings":"AA4CA,iBAAS,kBAAkB,gCAoE1B;AAED,iBAAS,oBAAoB,gCAkB5B;AAED,iBAAS,eAAe,gCAyBvB;AAED,iBAAS,kBAAkB,gCA8B1B;AAED,iBAAS,sBAAsB,gCAwB9B;AAED,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;CAyLM,CAAC"}
|
|
@@ -8,7 +8,6 @@ import { EmptyState } from "../../components/empty-state.js";
|
|
|
8
8
|
import { EntryProgress, EntryStageList } from "../../components/entry-scene.js";
|
|
9
9
|
import { DropdownMenu, DropdownMenuCommand, DropdownMenuContent, DropdownMenuTrigger, } from "../../components/dropdown-menu.js";
|
|
10
10
|
import { HoverCard, HoverCardContent, HoverCardSummary, HoverCardTrigger, } from "../../components/hover-card.js";
|
|
11
|
-
import { Kbd } from "../../components/kbd.js";
|
|
12
11
|
import { MessageNotice } from "../../components/message-notice.js";
|
|
13
12
|
import { NoticeBanner } from "../../components/notice-banner.js";
|
|
14
13
|
import { RecordTime } from "../../components/record-time.js";
|
|
@@ -76,7 +75,7 @@ export const FEEDBACK = {
|
|
|
76
75
|
Skeleton: () => (_jsxs(SkeletonRegion, { busy: true, className: "grid max-w-sm gap-3", children: [_jsx(Skeleton, { boxHeight: 20, height: 16, width: "75%" }), _jsx(Skeleton, { height: 16, width: 160 }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Skeleton, { height: 32, shape: "circle", width: 32 }), _jsx(Skeleton, { height: 48, shape: "squared", width: 48 })] }), _jsx(Skeleton, { height: 100, width: "100%", children: null }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Skeleton, { children: _jsx(Button, { children: "Save changes" }) }), _jsx(Skeleton, { show: false, children: _jsx(Button, { children: "Save changes" }) })] })] })),
|
|
77
76
|
SkeletonRegion: SkeletonRegionSpecimen,
|
|
78
77
|
Toaster: ToasterSpecimen,
|
|
79
|
-
Tooltip: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx(Button, { "aria-label": "Remove attachment", size: "icon", variant: "ghost" }), children: _jsx(X, { "aria-hidden": "true" }) }), _jsx(TooltipContent, { children: "Remove attachment" })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx(Button, { "aria-label": "Search", size: "icon", variant: "outline" }), children: _jsx(Search, { "aria-hidden": "true" }) }),
|
|
78
|
+
Tooltip: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx(Button, { "aria-label": "Remove attachment", size: "icon", variant: "ghost" }), children: _jsx(X, { "aria-hidden": "true" }) }), _jsx(TooltipContent, { children: "Remove attachment" })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx(Button, { "aria-label": "Search", size: "icon", variant: "outline" }), children: _jsx(Search, { "aria-hidden": "true" }) }), _jsx(TooltipContent, { shortcut: { keyName: "/" }, children: "Search" })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx(Button, { "aria-label": "Find a mailbox", size: "icon", variant: "outline" }), children: _jsx(Mail, { "aria-hidden": "true" }) }), _jsx(TooltipContent, { shortcut: { meta: true, keyName: "K" }, children: "Find a mailbox" })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx(Button, { variant: "outline" }), children: "Without a stem" }), _jsx(TooltipContent, { arrow: false, children: "Pinned to the button" })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx(Button, { variant: "outline" }), children: "Monthly limit" }), _jsx(TooltipContent, { centerText: false, children: "Limit: 400 runs a month. It resets on 1 November and unused runs do not carry over." })] })] })),
|
|
80
79
|
UpdateCard: UpdateCardSpecimen,
|
|
81
80
|
WaitingLine: () => (_jsxs("div", { className: "grid max-w-sm gap-2 text-sm", children: ["Connecting Telegram", _jsx(WaitingLine, { label: "Connecting Telegram", waiting: true })] })),
|
|
82
81
|
};
|
|
@@ -39,6 +39,7 @@ export declare const SPECIMENS: {
|
|
|
39
39
|
MenuChoiceRow: () => import("react").JSX.Element;
|
|
40
40
|
Popover: () => import("react").JSX.Element;
|
|
41
41
|
Sheet: () => import("react").JSX.Element;
|
|
42
|
+
SiteMenu: () => import("react").JSX.Element;
|
|
42
43
|
ThemeModeMenu: () => import("react").JSX.Element;
|
|
43
44
|
Alert: () => import("react").JSX.Element;
|
|
44
45
|
EmptyState: () => import("react").JSX.Element;
|
|
@@ -131,6 +132,7 @@ export declare const SPECIMENS: {
|
|
|
131
132
|
ClearableInput: () => import("react").JSX.Element;
|
|
132
133
|
CollectionSearch: () => import("react").JSX.Element;
|
|
133
134
|
Field: () => import("react").JSX.Element;
|
|
135
|
+
Form: () => import("react").JSX.Element;
|
|
134
136
|
Input: () => import("react").JSX.Element;
|
|
135
137
|
InputGroup: () => import("react").JSX.Element;
|
|
136
138
|
InputOTP: () => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYiB,CAAC"}
|
|
@@ -10,6 +10,7 @@ export declare const INPUTS: {
|
|
|
10
10
|
ClearableInput: typeof ClearableInputSpecimen;
|
|
11
11
|
CollectionSearch: typeof CollectionSearchSpecimen;
|
|
12
12
|
Field: () => import("react").JSX.Element;
|
|
13
|
+
Form: () => import("react").JSX.Element;
|
|
13
14
|
Input: () => import("react").JSX.Element;
|
|
14
15
|
InputGroup: typeof InputGroupSpecimen;
|
|
15
16
|
InputOTP: typeof InputOTPSpecimen;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/inputs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/inputs.tsx"],"names":[],"mappings":"AA+BA,iBAAS,gBAAgB,gCAexB;AAED,iBAAS,wBAAwB,gCAqBhC;AAED,iBAAS,sBAAsB,gCAiC9B;AAED,iBAAS,kBAAkB,gCAqC1B;AAED,iBAAS,gBAAgB,gCA2BxB;AAED,iBAAS,cAAc,gCAuCtB;AAqBD,iBAAS,oBAAoB,gCAoD5B;AAED,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;CAkIQ,CAAC"}
|