@ciridae/ui 0.16.1 → 1.0.1
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/README.md +17 -12
- package/dist/chat/chat-api-error.d.ts +14 -0
- package/dist/chat/chat-api-error.js +11 -0
- package/dist/chat/chat-client.d.ts +37 -0
- package/dist/chat/chat-client.js +66 -0
- package/dist/chat/chat-hooks.d.ts +4 -0
- package/dist/chat/chat-hooks.js +4 -0
- package/dist/chat/chat-query-keys.d.ts +10 -0
- package/dist/chat/chat-query-keys.js +8 -0
- package/dist/chat/contract.d.ts +488 -0
- package/dist/chat/contract.js +223 -0
- package/dist/chat/conversation-items-query-options.d.ts +382 -0
- package/dist/chat/conversation-items-query-options.js +15 -0
- package/dist/chat/describe-tool-call.d.ts +5 -0
- package/dist/chat/describe-tool-call.js +33 -0
- package/dist/chat/fetch-new-conversation-items.d.ts +10 -0
- package/dist/chat/fetch-new-conversation-items.js +38 -0
- package/dist/chat/message-group-position.d.ts +17 -0
- package/dist/chat/message-group-position.js +25 -0
- package/dist/chat/message-text.d.ts +23 -0
- package/dist/chat/message-text.js +118 -0
- package/dist/chat/mock-chat-client.d.ts +97 -0
- package/dist/chat/mock-chat-client.js +566 -0
- package/dist/chat/use-chat-conversation.d.ts +43 -0
- package/dist/chat/use-chat-conversation.js +156 -0
- package/dist/chat/use-conversation-list.d.ts +32 -0
- package/dist/chat/use-conversation-list.js +19 -0
- package/dist/ciridae.css +60 -479
- package/dist/components/activity-feed.d.ts +80 -0
- package/dist/components/activity-feed.js +373 -0
- package/dist/components/agent-work.d.ts +76 -0
- package/dist/components/agent-work.js +224 -0
- package/dist/components/app-navigation.d.ts +66 -0
- package/dist/components/app-navigation.js +102 -0
- package/dist/components/badge.d.ts +14 -0
- package/dist/components/badge.js +107 -0
- package/dist/components/brand-icons.d.ts +17 -0
- package/dist/components/brand-icons.js +21 -0
- package/dist/components/breakpoint.d.ts +7 -0
- package/dist/components/breakpoint.js +16 -0
- package/dist/components/bulk-action-bar.d.ts +15 -0
- package/dist/components/bulk-action-bar.js +45 -0
- package/dist/components/button.d.ts +52 -0
- package/dist/components/button.js +272 -0
- package/dist/components/calendar.d.ts +14 -0
- package/dist/components/calendar.js +158 -0
- package/dist/components/centered-page.d.ts +21 -0
- package/dist/components/centered-page.js +55 -0
- package/dist/components/chart.d.ts +22 -0
- package/dist/components/chart.js +116 -0
- package/dist/components/chat-page.d.ts +34 -0
- package/dist/components/chat-page.js +171 -0
- package/dist/components/chat-sheet-controller.d.ts +50 -0
- package/dist/components/chat-sheet-controller.js +133 -0
- package/dist/components/chat-sheet.d.ts +80 -0
- package/dist/components/chat-sheet.js +544 -0
- package/dist/components/chat.d.ts +135 -0
- package/dist/components/chat.js +545 -0
- package/dist/components/checkbox-item.d.ts +11 -0
- package/dist/components/checkbox-item.js +45 -0
- package/dist/components/checkbox-list.d.ts +51 -0
- package/dist/components/checkbox-list.js +167 -0
- package/dist/components/chip.d.ts +17 -0
- package/dist/components/chip.js +43 -0
- package/dist/components/collapsible.d.ts +8 -0
- package/dist/components/collapsible.js +41 -0
- package/dist/components/color-theme.d.ts +40 -0
- package/dist/components/color-theme.js +109 -0
- package/dist/components/column-settings.d.ts +22 -0
- package/dist/components/column-settings.js +112 -0
- package/dist/components/command-match.d.ts +7 -0
- package/dist/components/command-match.js +50 -0
- package/dist/components/command-menu.d.ts +43 -0
- package/dist/components/command-menu.js +339 -0
- package/dist/components/command-palette.d.ts +36 -0
- package/dist/components/command-palette.js +77 -0
- package/dist/components/controllable-state.d.ts +5 -0
- package/dist/components/controllable-state.js +15 -0
- package/dist/components/copyable-id.d.ts +37 -0
- package/dist/components/copyable-id.js +136 -0
- package/dist/components/data-display.d.ts +47 -0
- package/dist/components/data-display.js +221 -0
- package/dist/components/data-grid.d.ts +170 -0
- package/dist/components/data-grid.js +829 -0
- package/dist/components/date-range-picker.d.ts +44 -0
- package/dist/components/date-range-picker.js +153 -0
- package/dist/components/date-time.d.ts +11 -0
- package/dist/components/date-time.js +44 -0
- package/dist/components/dialog-height-context.d.ts +2 -0
- package/dist/components/dialog-height-context.js +3 -0
- package/dist/components/document-viewer.d.ts +62 -0
- package/dist/components/document-viewer.js +419 -0
- package/dist/components/drawer.d.ts +44 -0
- package/dist/components/drawer.js +236 -0
- package/dist/components/dropzone.d.ts +47 -0
- package/dist/components/dropzone.js +370 -0
- package/dist/components/editable-field.d.ts +99 -0
- package/dist/components/editable-field.js +422 -0
- package/dist/components/email-input.d.ts +12 -0
- package/dist/components/email-input.js +83 -0
- package/dist/components/environment-frame.d.ts +13 -0
- package/dist/components/environment-frame.js +42 -0
- package/dist/components/expandable-text.d.ts +9 -0
- package/dist/components/expandable-text.js +48 -0
- package/dist/components/feedback-screenshot.d.ts +19 -0
- package/dist/components/feedback-screenshot.js +162 -0
- package/dist/components/feedback-sheet.d.ts +80 -0
- package/dist/components/feedback-sheet.js +475 -0
- package/dist/components/field-context.d.ts +23 -0
- package/dist/components/field-context.js +15 -0
- package/dist/components/filter-bar.d.ts +77 -0
- package/dist/components/filter-bar.js +350 -0
- package/dist/components/form-controls.d.ts +53 -0
- package/dist/components/form-controls.js +123 -0
- package/dist/components/form-layout.d.ts +32 -0
- package/dist/components/form-layout.js +72 -0
- package/dist/components/hotkeys.d.ts +27 -0
- package/dist/components/hotkeys.js +70 -0
- package/dist/components/icon.d.ts +58 -0
- package/dist/components/icon.js +42 -0
- package/dist/components/input.d.ts +36 -0
- package/dist/components/input.js +249 -0
- package/dist/components/keyboard-shortcuts.d.ts +10 -0
- package/dist/components/keyboard-shortcuts.js +91 -0
- package/dist/components/keycap.d.ts +12 -0
- package/dist/components/keycap.js +45 -0
- package/dist/components/layout.d.ts +174 -0
- package/dist/components/layout.js +282 -0
- package/dist/components/lightbox.d.ts +14 -0
- package/dist/components/lightbox.js +117 -0
- package/dist/components/link.d.ts +13 -0
- package/dist/components/link.js +37 -0
- package/dist/components/locale.d.ts +463 -0
- package/dist/components/locale.js +501 -0
- package/dist/components/log-list.d.ts +20 -0
- package/dist/components/log-list.js +92 -0
- package/dist/components/mention-input.d.ts +50 -0
- package/dist/components/mention-input.js +503 -0
- package/dist/components/menu.d.ts +76 -0
- package/dist/components/menu.js +112 -0
- package/dist/components/meter.d.ts +14 -0
- package/dist/components/meter.js +44 -0
- package/dist/components/navigation.d.ts +21 -0
- package/dist/components/navigation.js +75 -0
- package/dist/components/notification-tray.d.ts +47 -0
- package/dist/components/notification-tray.js +218 -0
- package/dist/components/overlays.d.ts +107 -0
- package/dist/components/overlays.js +240 -0
- package/dist/components/page-frame.d.ts +65 -0
- package/dist/components/page-frame.js +94 -0
- package/dist/components/panel.d.ts +24 -0
- package/dist/components/panel.js +107 -0
- package/dist/components/profile-header.d.ts +15 -0
- package/dist/components/profile-header.js +40 -0
- package/dist/components/progress.d.ts +5 -0
- package/dist/components/progress.js +18 -0
- package/dist/components/project-avatar.d.ts +12 -0
- package/dist/components/project-avatar.js +22 -0
- package/dist/components/radio-card.d.ts +22 -0
- package/dist/components/radio-card.js +66 -0
- package/dist/components/recent-items.d.ts +28 -0
- package/dist/components/recent-items.js +63 -0
- package/dist/components/record.d.ts +95 -0
- package/dist/components/record.js +282 -0
- package/dist/components/scroll-area.d.ts +16 -0
- package/dist/components/scroll-area.js +50 -0
- package/dist/components/secret-dialog.d.ts +10 -0
- package/dist/components/secret-dialog.js +12 -0
- package/dist/components/segmented-bar.d.ts +23 -0
- package/dist/components/segmented-bar.js +75 -0
- package/dist/components/select.d.ts +84 -0
- package/dist/components/select.js +374 -0
- package/dist/components/settings.d.ts +34 -0
- package/dist/components/settings.js +56 -0
- package/dist/components/shell-skeleton.d.ts +7 -0
- package/dist/components/shell-skeleton.js +15 -0
- package/dist/components/shell.d.ts +62 -0
- package/dist/components/shell.js +415 -0
- package/dist/components/side-panel.d.ts +36 -0
- package/dist/components/side-panel.js +184 -0
- package/dist/components/sidebar.d.ts +35 -0
- package/dist/components/sidebar.js +207 -0
- package/dist/components/site-banner.d.ts +25 -0
- package/dist/components/site-banner.js +30 -0
- package/dist/components/skeleton.d.ts +15 -0
- package/dist/components/skeleton.js +61 -0
- package/dist/components/skeletons.d.ts +28 -0
- package/dist/components/skeletons.js +60 -0
- package/dist/components/stages.d.ts +97 -0
- package/dist/components/stages.js +365 -0
- package/dist/components/stat-card.d.ts +34 -0
- package/dist/components/stat-card.js +117 -0
- package/dist/components/status-banner.d.ts +17 -0
- package/dist/components/status-banner.js +132 -0
- package/dist/components/status.d.ts +32 -0
- package/dist/components/status.js +93 -0
- package/dist/components/steps.d.ts +17 -0
- package/dist/components/steps.js +51 -0
- package/dist/components/switch.d.ts +6 -0
- package/dist/components/switch.js +39 -0
- package/dist/components/tabs.d.ts +48 -0
- package/dist/components/tabs.js +247 -0
- package/dist/components/theme-customizer.d.ts +53 -0
- package/dist/components/theme-customizer.js +116 -0
- package/dist/components/toast.d.ts +23 -0
- package/dist/components/toast.js +140 -0
- package/dist/components/user-chip.d.ts +66 -0
- package/dist/components/user-chip.js +174 -0
- package/dist/components/wizard.d.ts +33 -0
- package/dist/components/wizard.js +91 -0
- package/dist/feedback/client.d.ts +37 -0
- package/dist/feedback/client.js +125 -0
- package/dist/feedback/comment-types.d.ts +17 -0
- package/dist/feedback/contract.d.ts +252 -0
- package/dist/feedback/contract.js +32 -0
- package/dist/feedback/feedback-cache.d.ts +6 -0
- package/dist/feedback/feedback-cache.js +58 -0
- package/dist/feedback/feedback-center-model.d.ts +8 -0
- package/dist/feedback/feedback-center-model.js +37 -0
- package/dist/feedback/feedback-composer-types.d.ts +11 -0
- package/dist/feedback/feedback-controller.d.ts +56 -0
- package/dist/feedback/feedback-controller.js +181 -0
- package/dist/feedback/feedback-tracking-types.d.ts +14 -0
- package/dist/feedback/generated/index.d.ts +1 -0
- package/dist/feedback/generated/index.js +2 -0
- package/dist/feedback/generated/types.gen.d.ts +737 -0
- package/dist/feedback/generated/types.gen.js +2 -0
- package/dist/feedback/generated/zod.gen.d.ts +738 -0
- package/dist/feedback/generated/zod.gen.js +293 -0
- package/dist/feedback/get-response-error-id.d.ts +1 -0
- package/dist/feedback/get-response-error-id.js +7 -0
- package/dist/feedback/operator-client.d.ts +21 -0
- package/dist/feedback/operator-client.js +96 -0
- package/dist/feedback/operator-contract.d.ts +111 -0
- package/dist/feedback/operator-contract.js +22 -0
- package/dist/feedback/operator-controller.d.ts +80 -0
- package/dist/feedback/operator-controller.js +43 -0
- package/dist/feedback/require-config.d.ts +2 -0
- package/dist/feedback/require-config.js +7 -0
- package/dist/feedback/submit-feedback-with-attachments.d.ts +10 -0
- package/dist/feedback/submit-feedback-with-attachments.js +10 -0
- package/dist/format/compact-number.d.ts +2 -0
- package/dist/format/compact-number.js +8 -0
- package/dist/format/money.d.ts +13 -0
- package/dist/format/money.js +21 -0
- package/dist/format/usd.d.ts +2 -0
- package/dist/format/usd.js +16 -0
- package/dist/preset.d.ts +18 -0
- package/dist/preset.js +470 -0
- package/dist/styled-system/css/conditions.mjs +1 -1
- package/dist/styled-system/css/css.mjs +3 -3
- package/dist/styled-system/patterns/box.d.ts +1 -1
- package/dist/styled-system/patterns/container.d.ts +1 -1
- package/dist/styled-system/patterns/link-overlay.d.ts +1 -1
- package/dist/styled-system/patterns/visually-hidden.d.ts +1 -1
- package/dist/styled-system/styles.css +7834 -458
- package/dist/styled-system/tokens/index.mjs +1465 -677
- package/dist/styled-system/tokens/tokens.d.ts +32 -26
- package/dist/styled-system/types/conditions.d.ts +11 -1
- package/dist/styled-system/types/prop-type.d.ts +12 -23
- package/dist/styled-system/types/style-props.d.ts +25 -24
- package/dist/styles.css +60 -479
- package/dist/theme/breakpoints.d.ts +15 -0
- package/dist/theme/breakpoints.js +12 -0
- package/dist/theme/color.d.ts +2 -0
- package/dist/theme/color.js +27 -0
- package/dist/theme/derive.d.ts +5 -0
- package/dist/theme/derive.js +43 -0
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/index.js +9 -0
- package/dist/theme/options.d.ts +32 -0
- package/dist/theme/options.js +9 -0
- package/dist/theme/palettes.d.ts +60 -0
- package/dist/theme/palettes.js +185 -0
- package/dist/theme/tokens.d.ts +29 -0
- package/dist/theme/tokens.js +188 -0
- package/package.json +475 -68
- package/dist/assets/ciridae/brand-background-dark.webp +0 -0
- package/dist/assets/ciridae/brand-background-light.webp +0 -0
- package/dist/assets/ciridae/ciridae-black.svg +0 -17
- package/dist/assets/ciridae/ciridae-brand-assets.d.ts +0 -25
- package/dist/assets/ciridae/ciridae-brand-assets.js +0 -25
- package/dist/assets/ciridae/ciridae-icon-black.png +0 -0
- package/dist/assets/ciridae/ciridae-icon-white.png +0 -0
- package/dist/assets/ciridae/ciridae-ui-wordmark-black.png +0 -0
- package/dist/assets/ciridae/ciridae-ui-wordmark-white.png +0 -0
- package/dist/assets/ciridae/ciridae-white.svg +0 -17
- package/dist/assets/ciridae/ciridae-wordmark-black.png +0 -0
- package/dist/assets/ciridae/ciridae-wordmark-white.png +0 -0
- package/dist/assets/ciridae/favicon.ico +0 -0
- package/dist/assets/ciridae/logo-white.png +0 -0
- package/dist/assets/ciridae/sign-in-screenshot.png +0 -0
- package/dist/components/blocks/admin-users-table.d.ts +0 -22
- package/dist/components/blocks/admin-users-table.js +0 -115
- package/dist/components/blocks/comment-composer.d.ts +0 -18
- package/dist/components/blocks/comment-composer.js +0 -137
- package/dist/components/blocks/comment-item.d.ts +0 -8
- package/dist/components/blocks/comment-item.js +0 -45
- package/dist/components/blocks/comment-thread.d.ts +0 -19
- package/dist/components/blocks/comment-thread.js +0 -37
- package/dist/components/blocks/comment-types.d.ts +0 -18
- package/dist/components/blocks/comment-types.js +0 -11
- package/dist/components/blocks/copy-field.d.ts +0 -18
- package/dist/components/blocks/copy-field.js +0 -61
- package/dist/components/blocks/feedback-center-comments.d.ts +0 -16
- package/dist/components/blocks/feedback-center-comments.js +0 -61
- package/dist/components/blocks/feedback-center-footer.d.ts +0 -12
- package/dist/components/blocks/feedback-center-footer.js +0 -10
- package/dist/components/blocks/feedback-center-sheet-parts.d.ts +0 -40
- package/dist/components/blocks/feedback-center-sheet-parts.js +0 -39
- package/dist/components/blocks/feedback-center-sheet.d.ts +0 -28
- package/dist/components/blocks/feedback-center-sheet.js +0 -105
- package/dist/components/blocks/feedback-composer-parts.d.ts +0 -16
- package/dist/components/blocks/feedback-composer-parts.js +0 -43
- package/dist/components/blocks/feedback-composer-types.d.ts +0 -12
- package/dist/components/blocks/feedback-composer.d.ts +0 -23
- package/dist/components/blocks/feedback-composer.js +0 -82
- package/dist/components/blocks/feedback-date-format.d.ts +0 -5
- package/dist/components/blocks/feedback-date-format.js +0 -11
- package/dist/components/blocks/feedback-detail-sheet.d.ts +0 -15
- package/dist/components/blocks/feedback-detail-sheet.js +0 -59
- package/dist/components/blocks/feedback-emergency-fields.d.ts +0 -17
- package/dist/components/blocks/feedback-emergency-fields.js +0 -32
- package/dist/components/blocks/feedback-metrics.d.ts +0 -6
- package/dist/components/blocks/feedback-metrics.js +0 -15
- package/dist/components/blocks/feedback-sheet.d.ts +0 -8
- package/dist/components/blocks/feedback-sheet.js +0 -29
- package/dist/components/blocks/feedback-status-badge.d.ts +0 -6
- package/dist/components/blocks/feedback-status-badge.js +0 -15
- package/dist/components/blocks/feedback-table-row.d.ts +0 -6
- package/dist/components/blocks/feedback-table-row.js +0 -27
- package/dist/components/blocks/feedback-table-sort.d.ts +0 -11
- package/dist/components/blocks/feedback-table-sort.js +0 -82
- package/dist/components/blocks/feedback-table.d.ts +0 -16
- package/dist/components/blocks/feedback-table.js +0 -45
- package/dist/components/blocks/feedback-tracking-types.d.ts +0 -102
- package/dist/components/blocks/feedback-tracking-types.js +0 -54
- package/dist/components/blocks/feedback-triage-timeline.d.ts +0 -11
- package/dist/components/blocks/feedback-triage-timeline.js +0 -17
- package/dist/components/blocks/feedback-type-badge.d.ts +0 -11
- package/dist/components/blocks/feedback-type-badge.js +0 -18
- package/dist/components/blocks/feedback-unread-badge.d.ts +0 -6
- package/dist/components/blocks/feedback-unread-badge.js +0 -9
- package/dist/components/blocks/feedback-user-detail.d.ts +0 -11
- package/dist/components/blocks/feedback-user-detail.js +0 -63
- package/dist/components/blocks/feedback-user-list.d.ts +0 -11
- package/dist/components/blocks/feedback-user-list.js +0 -41
- package/dist/components/blocks/generated-connect-link.d.ts +0 -22
- package/dist/components/blocks/generated-connect-link.js +0 -68
- package/dist/components/blocks/invite-user-sheet.d.ts +0 -20
- package/dist/components/blocks/invite-user-sheet.js +0 -72
- package/dist/components/blocks/kanban-board-parts.d.ts +0 -26
- package/dist/components/blocks/kanban-board-parts.js +0 -83
- package/dist/components/blocks/kanban-board-utils.d.ts +0 -58
- package/dist/components/blocks/kanban-board-utils.js +0 -140
- package/dist/components/blocks/kanban-board.d.ts +0 -16
- package/dist/components/blocks/kanban-board.js +0 -35
- package/dist/components/blocks/kanban-card.d.ts +0 -10
- package/dist/components/blocks/kanban-card.js +0 -34
- package/dist/components/blocks/kanban-column.d.ts +0 -17
- package/dist/components/blocks/kanban-column.js +0 -34
- package/dist/components/blocks/kanban-detail-sheet.d.ts +0 -17
- package/dist/components/blocks/kanban-detail-sheet.js +0 -34
- package/dist/components/blocks/kanban-types.d.ts +0 -24
- package/dist/components/blocks/mcp-access-grouped-tool-picker.d.ts +0 -19
- package/dist/components/blocks/mcp-access-grouped-tool-picker.js +0 -116
- package/dist/components/blocks/mcp-access-tool-picker-internals.d.ts +0 -35
- package/dist/components/blocks/mcp-access-tool-picker-internals.js +0 -24
- package/dist/components/blocks/mcp-access-tool-picker.d.ts +0 -22
- package/dist/components/blocks/mcp-access-tool-picker.js +0 -33
- package/dist/components/blocks/mcp-access-types.d.ts +0 -42
- package/dist/components/blocks/mcp-access-types.js +0 -7
- package/dist/components/blocks/mcp-client-setup.d.ts +0 -29
- package/dist/components/blocks/mcp-client-setup.js +0 -58
- package/dist/components/blocks/mcp-connect-clients.d.ts +0 -43
- package/dist/components/blocks/mcp-connect-clients.js +0 -66
- package/dist/components/blocks/mcp-plan-choice.d.ts +0 -17
- package/dist/components/blocks/mcp-plan-choice.js +0 -28
- package/dist/components/blocks/submit-feedback-composer.d.ts +0 -5
- package/dist/components/blocks/submit-feedback-composer.js +0 -40
- package/dist/components/blocks/timestamp-format.d.ts +0 -14
- package/dist/components/blocks/timestamp-format.js +0 -72
- package/dist/components/blocks/use-feedback-composer-state.d.ts +0 -27
- package/dist/components/blocks/use-feedback-composer-state.js +0 -60
- package/dist/components/blocks/use-reveal-thread-end.d.ts +0 -11
- package/dist/components/blocks/use-reveal-thread-end.js +0 -25
- package/dist/components/pages/admin-users-page.d.ts +0 -11
- package/dist/components/pages/admin-users-page.js +0 -30
- package/dist/components/pages/feedback-stakeholder-page-parts.d.ts +0 -18
- package/dist/components/pages/feedback-stakeholder-page-parts.js +0 -36
- package/dist/components/pages/feedback-stakeholder-page.d.ts +0 -9
- package/dist/components/pages/feedback-stakeholder-page.js +0 -66
- package/dist/components/pages/kanban-page.d.ts +0 -13
- package/dist/components/pages/kanban-page.js +0 -68
- package/dist/components/ui/accordion.d.ts +0 -7
- package/dist/components/ui/accordion.js +0 -17
- package/dist/components/ui/alert-dialog.d.ts +0 -22
- package/dist/components/ui/alert-dialog.js +0 -51
- package/dist/components/ui/alert.d.ts +0 -9
- package/dist/components/ui/alert.js +0 -24
- package/dist/components/ui/app-shell-page.d.ts +0 -22
- package/dist/components/ui/app-shell-page.js +0 -21
- package/dist/components/ui/app-shell.d.ts +0 -45
- package/dist/components/ui/app-shell.js +0 -44
- package/dist/components/ui/aspect-ratio.d.ts +0 -3
- package/dist/components/ui/aspect-ratio.js +0 -7
- package/dist/components/ui/avatar.d.ts +0 -11
- package/dist/components/ui/avatar.js +0 -22
- package/dist/components/ui/badge-variants.d.ts +0 -100
- package/dist/components/ui/badge-variants.js +0 -140
- package/dist/components/ui/badge.d.ts +0 -6
- package/dist/components/ui/badge.js +0 -9
- package/dist/components/ui/breadcrumb.d.ts +0 -11
- package/dist/components/ui/breadcrumb.js +0 -27
- package/dist/components/ui/button-group-variants.d.ts +0 -6
- package/dist/components/ui/button-group-variants.js +0 -13
- package/dist/components/ui/button-group.d.ts +0 -8
- package/dist/components/ui/button-group.js +0 -16
- package/dist/components/ui/button-variants.d.ts +0 -133
- package/dist/components/ui/button-variants.js +0 -170
- package/dist/components/ui/button.d.ts +0 -8
- package/dist/components/ui/button.js +0 -59
- package/dist/components/ui/calendar.d.ts +0 -10
- package/dist/components/ui/calendar.js +0 -99
- package/dist/components/ui/card.d.ts +0 -14
- package/dist/components/ui/card.js +0 -28
- package/dist/components/ui/carousel.d.ts +0 -19
- package/dist/components/ui/carousel.js +0 -104
- package/dist/components/ui/chart-context.d.ts +0 -33
- package/dist/components/ui/chart-context.js +0 -36
- package/dist/components/ui/chart-panel.d.ts +0 -11
- package/dist/components/ui/chart-panel.js +0 -6
- package/dist/components/ui/chart-tooltip.d.ts +0 -13
- package/dist/components/ui/chart-tooltip.js +0 -84
- package/dist/components/ui/chart.d.ts +0 -23
- package/dist/components/ui/chart.js +0 -52
- package/dist/components/ui/checkbox.d.ts +0 -4
- package/dist/components/ui/checkbox.js +0 -9
- package/dist/components/ui/ciridae-ui-provider.d.ts +0 -8
- package/dist/components/ui/ciridae-ui-provider.js +0 -14
- package/dist/components/ui/collapsible.d.ts +0 -5
- package/dist/components/ui/collapsible.js +0 -12
- package/dist/components/ui/color-theme-context.d.ts +0 -28
- package/dist/components/ui/color-theme-context.js +0 -3
- package/dist/components/ui/color-theme.d.ts +0 -5
- package/dist/components/ui/color-theme.js +0 -147
- package/dist/components/ui/combobox-anchor.d.ts +0 -3
- package/dist/components/ui/combobox-anchor.js +0 -5
- package/dist/components/ui/combobox.d.ts +0 -24
- package/dist/components/ui/combobox.js +0 -54
- package/dist/components/ui/command.d.ts +0 -19
- package/dist/components/ui/command.js +0 -38
- package/dist/components/ui/context-menu.d.ts +0 -30
- package/dist/components/ui/context-menu.js +0 -63
- package/dist/components/ui/data-table-column-settings.d.ts +0 -23
- package/dist/components/ui/data-table-column-settings.js +0 -170
- package/dist/components/ui/data-table-context.d.ts +0 -8
- package/dist/components/ui/data-table-context.js +0 -53
- package/dist/components/ui/data-table-controls.d.ts +0 -9
- package/dist/components/ui/data-table-controls.js +0 -30
- package/dist/components/ui/data-table-facet-filter.d.ts +0 -39
- package/dist/components/ui/data-table-facet-filter.js +0 -65
- package/dist/components/ui/data-table-grid.d.ts +0 -10
- package/dist/components/ui/data-table-grid.js +0 -34
- package/dist/components/ui/data-table-pagination.d.ts +0 -17
- package/dist/components/ui/data-table-pagination.js +0 -89
- package/dist/components/ui/data-table-search-input.d.ts +0 -14
- package/dist/components/ui/data-table-search-input.js +0 -15
- package/dist/components/ui/data-table-state.d.ts +0 -19
- package/dist/components/ui/data-table-state.js +0 -8
- package/dist/components/ui/data-table-tanstack.d.ts +0 -99
- package/dist/components/ui/data-table-tanstack.js +0 -128
- package/dist/components/ui/data-table.d.ts +0 -19
- package/dist/components/ui/data-table.js +0 -35
- package/dist/components/ui/dialog.d.ts +0 -23
- package/dist/components/ui/dialog.js +0 -48
- package/dist/components/ui/direction-context.d.ts +0 -3
- package/dist/components/ui/direction-context.js +0 -3
- package/dist/components/ui/direction.d.ts +0 -6
- package/dist/components/ui/direction.js +0 -7
- package/dist/components/ui/drawer.d.ts +0 -18
- package/dist/components/ui/drawer.js +0 -47
- package/dist/components/ui/dropdown-menu.d.ts +0 -30
- package/dist/components/ui/dropdown-menu.js +0 -63
- package/dist/components/ui/empty.d.ts +0 -11
- package/dist/components/ui/empty.js +0 -33
- package/dist/components/ui/expandable-data-table.d.ts +0 -24
- package/dist/components/ui/expandable-data-table.js +0 -62
- package/dist/components/ui/field.d.ts +0 -26
- package/dist/components/ui/field.js +0 -74
- package/dist/components/ui/file-upload-field-parts.d.ts +0 -21
- package/dist/components/ui/file-upload-field-parts.js +0 -55
- package/dist/components/ui/file-upload-field.d.ts +0 -16
- package/dist/components/ui/file-upload-field.js +0 -85
- package/dist/components/ui/form-context.d.ts +0 -23
- package/dist/components/ui/form-context.js +0 -35
- package/dist/components/ui/form-sheet.d.ts +0 -22
- package/dist/components/ui/form-sheet.js +0 -74
- package/dist/components/ui/form.d.ts +0 -12
- package/dist/components/ui/form.js +0 -38
- package/dist/components/ui/hover-card.d.ts +0 -10
- package/dist/components/ui/hover-card.js +0 -22
- package/dist/components/ui/input-group.d.ts +0 -16
- package/dist/components/ui/input-group.js +0 -62
- package/dist/components/ui/input-otp.d.ts +0 -11
- package/dist/components/ui/input-otp.js +0 -21
- package/dist/components/ui/input.d.ts +0 -3
- package/dist/components/ui/input.js +0 -6
- package/dist/components/ui/item.d.ts +0 -24
- package/dist/components/ui/item.js +0 -73
- package/dist/components/ui/kbd.d.ts +0 -3
- package/dist/components/ui/kbd.js +0 -9
- package/dist/components/ui/label.d.ts +0 -4
- package/dist/components/ui/label.js +0 -7
- package/dist/components/ui/loading-state.d.ts +0 -27
- package/dist/components/ui/loading-state.js +0 -44
- package/dist/components/ui/menubar.d.ts +0 -30
- package/dist/components/ui/menubar.js +0 -63
- package/dist/components/ui/metrics-strip.d.ts +0 -7
- package/dist/components/ui/metrics-strip.js +0 -18
- package/dist/components/ui/native-select.d.ts +0 -7
- package/dist/components/ui/native-select.js +0 -13
- package/dist/components/ui/navigation-menu-variants.d.ts +0 -2
- package/dist/components/ui/navigation-menu-variants.js +0 -3
- package/dist/components/ui/navigation-menu.d.ts +0 -13
- package/dist/components/ui/navigation-menu.js +0 -30
- package/dist/components/ui/page-header.d.ts +0 -33
- package/dist/components/ui/page-header.js +0 -54
- package/dist/components/ui/pagination.d.ts +0 -13
- package/dist/components/ui/pagination.js +0 -29
- package/dist/components/ui/popover.d.ts +0 -14
- package/dist/components/ui/popover.js +0 -34
- package/dist/components/ui/progress.d.ts +0 -4
- package/dist/components/ui/progress.js +0 -8
- package/dist/components/ui/property-list.d.ts +0 -6
- package/dist/components/ui/property-list.js +0 -15
- package/dist/components/ui/radio-group.d.ts +0 -5
- package/dist/components/ui/radio-group.js +0 -11
- package/dist/components/ui/registry-docs-api.d.ts +0 -11
- package/dist/components/ui/registry-docs-api.js +0 -9
- package/dist/components/ui/registry-docs-code.d.ts +0 -19
- package/dist/components/ui/registry-docs-code.js +0 -78
- package/dist/components/ui/registry-docs-showcase.d.ts +0 -11
- package/dist/components/ui/registry-docs-showcase.js +0 -27
- package/dist/components/ui/registry-docs.d.ts +0 -27
- package/dist/components/ui/registry-docs.js +0 -32
- package/dist/components/ui/resizable.d.ts +0 -14
- package/dist/components/ui/resizable.js +0 -15
- package/dist/components/ui/scroll-area.d.ts +0 -7
- package/dist/components/ui/scroll-area.js +0 -10
- package/dist/components/ui/select.d.ts +0 -15
- package/dist/components/ui/select.js +0 -38
- package/dist/components/ui/separator.d.ts +0 -4
- package/dist/components/ui/separator.js +0 -7
- package/dist/components/ui/sheet.d.ts +0 -21
- package/dist/components/ui/sheet.js +0 -62
- package/dist/components/ui/sidebar/context.d.ts +0 -27
- package/dist/components/ui/sidebar/context.js +0 -23
- package/dist/components/ui/sidebar/group.d.ts +0 -10
- package/dist/components/ui/sidebar/group.js +0 -18
- package/dist/components/ui/sidebar/layout.d.ts +0 -17
- package/dist/components/ui/sidebar/layout.js +0 -78
- package/dist/components/ui/sidebar/menu.d.ts +0 -30
- package/dist/components/ui/sidebar/menu.js +0 -64
- package/dist/components/ui/sidebar/provider.d.ts +0 -7
- package/dist/components/ui/sidebar/provider.js +0 -53
- package/dist/components/ui/sidebar/rail.d.ts +0 -3
- package/dist/components/ui/sidebar/rail.js +0 -12
- package/dist/components/ui/sidebar/trigger.d.ts +0 -4
- package/dist/components/ui/sidebar/trigger.js +0 -16
- package/dist/components/ui/sidebar-account-menu-theme.d.ts +0 -7
- package/dist/components/ui/sidebar-account-menu-theme.js +0 -32
- package/dist/components/ui/sidebar-account-menu.d.ts +0 -16
- package/dist/components/ui/sidebar-account-menu.js +0 -51
- package/dist/components/ui/sidebar.d.ts +0 -7
- package/dist/components/ui/sidebar.js +0 -7
- package/dist/components/ui/skeleton.d.ts +0 -2
- package/dist/components/ui/skeleton.js +0 -15
- package/dist/components/ui/slider.d.ts +0 -4
- package/dist/components/ui/slider.js +0 -9
- package/dist/components/ui/sonner.d.ts +0 -3
- package/dist/components/ui/sonner.js +0 -33
- package/dist/components/ui/spinner.d.ts +0 -2
- package/dist/components/ui/spinner.js +0 -16
- package/dist/components/ui/switch.d.ts +0 -6
- package/dist/components/ui/switch.js +0 -7
- package/dist/components/ui/table.d.ts +0 -21
- package/dist/components/ui/table.js +0 -34
- package/dist/components/ui/tabs-variants.d.ts +0 -6
- package/dist/components/ui/tabs-variants.js +0 -13
- package/dist/components/ui/tabs.d.ts +0 -8
- package/dist/components/ui/tabs.js +0 -17
- package/dist/components/ui/textarea.d.ts +0 -3
- package/dist/components/ui/textarea.js +0 -6
- package/dist/components/ui/toggle-group.d.ts +0 -9
- package/dist/components/ui/toggle-group.js +0 -24
- package/dist/components/ui/toggle-variants.d.ts +0 -7
- package/dist/components/ui/toggle-variants.js +0 -19
- package/dist/components/ui/toggle.d.ts +0 -5
- package/dist/components/ui/toggle.js +0 -9
- package/dist/components/ui/tooltip.d.ts +0 -14
- package/dist/components/ui/tooltip.js +0 -25
- package/dist/components/ui/use-color-theme.d.ts +0 -2
- package/dist/components/ui/use-color-theme.js +0 -10
- package/dist/components/ui/workflow-timeline.d.ts +0 -20
- package/dist/components/ui/workflow-timeline.js +0 -92
- package/dist/components/walkthrough/presentation/WalkthroughCoach.d.ts +0 -14
- package/dist/components/walkthrough/presentation/WalkthroughCoach.js +0 -32
- package/dist/components/walkthrough/presentation/WalkthroughHighlight.d.ts +0 -5
- package/dist/components/walkthrough/presentation/WalkthroughHighlight.js +0 -9
- package/dist/components/walkthrough/presentation/WalkthroughOverlay.d.ts +0 -1
- package/dist/components/walkthrough/presentation/WalkthroughOverlay.js +0 -70
- package/dist/components/walkthrough/presentation/positionWalkthroughCoach.d.ts +0 -11
- package/dist/components/walkthrough/presentation/positionWalkthroughCoach.js +0 -24
- package/dist/components/walkthrough/presentation/useWalkthroughCoachPosition.d.ts +0 -4
- package/dist/components/walkthrough/presentation/useWalkthroughCoachPosition.js +0 -17
- package/dist/components/walkthrough/runtime/WalkthroughContextDefinition.d.ts +0 -20
- package/dist/components/walkthrough/runtime/WalkthroughContextDefinition.js +0 -2
- package/dist/components/walkthrough/runtime/WalkthroughProvider.d.ts +0 -12
- package/dist/components/walkthrough/runtime/WalkthroughProvider.js +0 -190
- package/dist/components/walkthrough/runtime/useWalkthrough.d.ts +0 -1
- package/dist/components/walkthrough/runtime/useWalkthrough.js +0 -8
- package/dist/components/walkthrough/runtime/walkthroughEvents.d.ts +0 -3
- package/dist/components/walkthrough/runtime/walkthroughEvents.js +0 -55
- package/dist/components/walkthrough/runtime/walkthroughLocation.d.ts +0 -2
- package/dist/components/walkthrough/runtime/walkthroughLocation.js +0 -27
- package/dist/components/walkthrough/runtime/walkthroughStorage.d.ts +0 -3
- package/dist/components/walkthrough/runtime/walkthroughStorage.js +0 -54
- package/dist/components/walkthrough/runtime/walkthroughTypes.d.ts +0 -32
- package/dist/components/walkthrough/targeting/listenForOutsideWalkthroughInteraction.d.ts +0 -2
- package/dist/components/walkthrough/targeting/listenForOutsideWalkthroughInteraction.js +0 -19
- package/dist/components/walkthrough/targeting/useWalkthroughTargetRect.d.ts +0 -15
- package/dist/components/walkthrough/targeting/useWalkthroughTargetRect.js +0 -54
- package/dist/components/walkthrough/targeting/walkthroughTarget.d.ts +0 -6
- package/dist/components/walkthrough/targeting/walkthroughTarget.js +0 -24
- package/dist/components/walkthrough.d.ts +0 -4
- package/dist/components/walkthrough.js +0 -2
- package/dist/entries/accordion.d.ts +0 -1
- package/dist/entries/accordion.js +0 -1
- package/dist/entries/admin-users-page.d.ts +0 -1
- package/dist/entries/admin-users-page.js +0 -1
- package/dist/entries/admin-users-table.d.ts +0 -1
- package/dist/entries/admin-users-table.js +0 -1
- package/dist/entries/alert-dialog.d.ts +0 -1
- package/dist/entries/alert-dialog.js +0 -1
- package/dist/entries/alert.d.ts +0 -1
- package/dist/entries/alert.js +0 -1
- package/dist/entries/app-shell-page.d.ts +0 -1
- package/dist/entries/app-shell-page.js +0 -1
- package/dist/entries/app-shell.d.ts +0 -1
- package/dist/entries/app-shell.js +0 -1
- package/dist/entries/aspect-ratio.d.ts +0 -1
- package/dist/entries/aspect-ratio.js +0 -1
- package/dist/entries/avatar.d.ts +0 -1
- package/dist/entries/avatar.js +0 -1
- package/dist/entries/badge-variants.d.ts +0 -1
- package/dist/entries/badge-variants.js +0 -1
- package/dist/entries/badge.d.ts +0 -1
- package/dist/entries/badge.js +0 -1
- package/dist/entries/breadcrumb.d.ts +0 -1
- package/dist/entries/breadcrumb.js +0 -1
- package/dist/entries/button-group-variants.d.ts +0 -1
- package/dist/entries/button-group-variants.js +0 -1
- package/dist/entries/button-group.d.ts +0 -1
- package/dist/entries/button-group.js +0 -1
- package/dist/entries/button-variants.d.ts +0 -1
- package/dist/entries/button-variants.js +0 -1
- package/dist/entries/button.d.ts +0 -1
- package/dist/entries/button.js +0 -1
- package/dist/entries/calendar.d.ts +0 -1
- package/dist/entries/calendar.js +0 -1
- package/dist/entries/card.d.ts +0 -1
- package/dist/entries/card.js +0 -1
- package/dist/entries/carousel.d.ts +0 -1
- package/dist/entries/carousel.js +0 -1
- package/dist/entries/chart-context.d.ts +0 -1
- package/dist/entries/chart-context.js +0 -1
- package/dist/entries/chart-panel.d.ts +0 -1
- package/dist/entries/chart-panel.js +0 -1
- package/dist/entries/chart-tooltip.d.ts +0 -1
- package/dist/entries/chart-tooltip.js +0 -1
- package/dist/entries/chart.d.ts +0 -1
- package/dist/entries/chart.js +0 -1
- package/dist/entries/checkbox.d.ts +0 -1
- package/dist/entries/checkbox.js +0 -1
- package/dist/entries/ciridae-brand-assets.d.ts +0 -1
- package/dist/entries/ciridae-brand-assets.js +0 -1
- package/dist/entries/ciridae-ui-provider.d.ts +0 -1
- package/dist/entries/ciridae-ui-provider.js +0 -1
- package/dist/entries/collapsible.d.ts +0 -1
- package/dist/entries/collapsible.js +0 -1
- package/dist/entries/color-theme-context.d.ts +0 -1
- package/dist/entries/color-theme-context.js +0 -1
- package/dist/entries/color-theme.d.ts +0 -1
- package/dist/entries/color-theme.js +0 -1
- package/dist/entries/combobox-anchor.d.ts +0 -1
- package/dist/entries/combobox-anchor.js +0 -1
- package/dist/entries/combobox.d.ts +0 -1
- package/dist/entries/combobox.js +0 -1
- package/dist/entries/command.d.ts +0 -1
- package/dist/entries/command.js +0 -1
- package/dist/entries/comment-composer.d.ts +0 -1
- package/dist/entries/comment-composer.js +0 -1
- package/dist/entries/comment-item.d.ts +0 -1
- package/dist/entries/comment-item.js +0 -1
- package/dist/entries/comment-thread.d.ts +0 -1
- package/dist/entries/comment-thread.js +0 -1
- package/dist/entries/comment-types.d.ts +0 -1
- package/dist/entries/comment-types.js +0 -1
- package/dist/entries/context-menu.d.ts +0 -1
- package/dist/entries/context-menu.js +0 -1
- package/dist/entries/copy-field.d.ts +0 -1
- package/dist/entries/copy-field.js +0 -1
- package/dist/entries/data-table-column-settings.d.ts +0 -1
- package/dist/entries/data-table-column-settings.js +0 -1
- package/dist/entries/data-table-context.d.ts +0 -1
- package/dist/entries/data-table-context.js +0 -1
- package/dist/entries/data-table-controls.d.ts +0 -1
- package/dist/entries/data-table-controls.js +0 -1
- package/dist/entries/data-table-facet-filter.d.ts +0 -1
- package/dist/entries/data-table-facet-filter.js +0 -1
- package/dist/entries/data-table-grid.d.ts +0 -1
- package/dist/entries/data-table-grid.js +0 -1
- package/dist/entries/data-table-pagination.d.ts +0 -1
- package/dist/entries/data-table-pagination.js +0 -1
- package/dist/entries/data-table-search-input.d.ts +0 -1
- package/dist/entries/data-table-search-input.js +0 -1
- package/dist/entries/data-table-state.d.ts +0 -1
- package/dist/entries/data-table-state.js +0 -1
- package/dist/entries/data-table-tanstack.d.ts +0 -1
- package/dist/entries/data-table-tanstack.js +0 -1
- package/dist/entries/data-table.d.ts +0 -1
- package/dist/entries/data-table.js +0 -1
- package/dist/entries/dialog.d.ts +0 -1
- package/dist/entries/dialog.js +0 -1
- package/dist/entries/direction-context.d.ts +0 -1
- package/dist/entries/direction-context.js +0 -1
- package/dist/entries/direction.d.ts +0 -1
- package/dist/entries/direction.js +0 -1
- package/dist/entries/drawer.d.ts +0 -1
- package/dist/entries/drawer.js +0 -1
- package/dist/entries/dropdown-menu.d.ts +0 -1
- package/dist/entries/dropdown-menu.js +0 -1
- package/dist/entries/empty.d.ts +0 -1
- package/dist/entries/empty.js +0 -1
- package/dist/entries/expandable-data-table.d.ts +0 -1
- package/dist/entries/expandable-data-table.js +0 -1
- package/dist/entries/feedback-center-comments.d.ts +0 -1
- package/dist/entries/feedback-center-comments.js +0 -1
- package/dist/entries/feedback-center-footer.d.ts +0 -1
- package/dist/entries/feedback-center-footer.js +0 -1
- package/dist/entries/feedback-center-sheet-parts.d.ts +0 -1
- package/dist/entries/feedback-center-sheet-parts.js +0 -1
- package/dist/entries/feedback-center-sheet.d.ts +0 -1
- package/dist/entries/feedback-center-sheet.js +0 -1
- package/dist/entries/feedback-composer-parts.d.ts +0 -1
- package/dist/entries/feedback-composer-parts.js +0 -1
- package/dist/entries/feedback-composer-types.d.ts +0 -1
- package/dist/entries/feedback-composer-types.js +0 -1
- package/dist/entries/feedback-composer.d.ts +0 -1
- package/dist/entries/feedback-composer.js +0 -1
- package/dist/entries/feedback-date-format.d.ts +0 -1
- package/dist/entries/feedback-date-format.js +0 -1
- package/dist/entries/feedback-detail-sheet.d.ts +0 -1
- package/dist/entries/feedback-detail-sheet.js +0 -1
- package/dist/entries/feedback-emergency-fields.d.ts +0 -1
- package/dist/entries/feedback-emergency-fields.js +0 -1
- package/dist/entries/feedback-metrics.d.ts +0 -1
- package/dist/entries/feedback-metrics.js +0 -1
- package/dist/entries/feedback-sheet.d.ts +0 -1
- package/dist/entries/feedback-sheet.js +0 -1
- package/dist/entries/feedback-stakeholder-page-parts.d.ts +0 -1
- package/dist/entries/feedback-stakeholder-page-parts.js +0 -1
- package/dist/entries/feedback-stakeholder-page.d.ts +0 -1
- package/dist/entries/feedback-stakeholder-page.js +0 -1
- package/dist/entries/feedback-status-badge.d.ts +0 -1
- package/dist/entries/feedback-status-badge.js +0 -1
- package/dist/entries/feedback-table-row.d.ts +0 -1
- package/dist/entries/feedback-table-row.js +0 -1
- package/dist/entries/feedback-table-sort.d.ts +0 -1
- package/dist/entries/feedback-table-sort.js +0 -1
- package/dist/entries/feedback-table.d.ts +0 -1
- package/dist/entries/feedback-table.js +0 -1
- package/dist/entries/feedback-tracking-types.d.ts +0 -1
- package/dist/entries/feedback-tracking-types.js +0 -1
- package/dist/entries/feedback-triage-timeline.d.ts +0 -1
- package/dist/entries/feedback-triage-timeline.js +0 -1
- package/dist/entries/feedback-type-badge.d.ts +0 -1
- package/dist/entries/feedback-type-badge.js +0 -1
- package/dist/entries/feedback-unread-badge.d.ts +0 -1
- package/dist/entries/feedback-unread-badge.js +0 -1
- package/dist/entries/feedback-user-detail.d.ts +0 -1
- package/dist/entries/feedback-user-detail.js +0 -1
- package/dist/entries/feedback-user-list.d.ts +0 -1
- package/dist/entries/feedback-user-list.js +0 -1
- package/dist/entries/field.d.ts +0 -1
- package/dist/entries/field.js +0 -1
- package/dist/entries/file-upload-field-parts.d.ts +0 -1
- package/dist/entries/file-upload-field-parts.js +0 -1
- package/dist/entries/file-upload-field.d.ts +0 -1
- package/dist/entries/file-upload-field.js +0 -1
- package/dist/entries/form-context.d.ts +0 -1
- package/dist/entries/form-context.js +0 -1
- package/dist/entries/form-sheet.d.ts +0 -1
- package/dist/entries/form-sheet.js +0 -1
- package/dist/entries/form.d.ts +0 -1
- package/dist/entries/form.js +0 -1
- package/dist/entries/generated-connect-link.d.ts +0 -1
- package/dist/entries/generated-connect-link.js +0 -1
- package/dist/entries/hover-card.d.ts +0 -1
- package/dist/entries/hover-card.js +0 -1
- package/dist/entries/input-group.d.ts +0 -1
- package/dist/entries/input-group.js +0 -1
- package/dist/entries/input-otp.d.ts +0 -1
- package/dist/entries/input-otp.js +0 -1
- package/dist/entries/input.d.ts +0 -1
- package/dist/entries/input.js +0 -1
- package/dist/entries/invite-user-sheet.d.ts +0 -1
- package/dist/entries/invite-user-sheet.js +0 -1
- package/dist/entries/item.d.ts +0 -1
- package/dist/entries/item.js +0 -1
- package/dist/entries/kanban-board-parts.d.ts +0 -1
- package/dist/entries/kanban-board-parts.js +0 -1
- package/dist/entries/kanban-board-utils.d.ts +0 -1
- package/dist/entries/kanban-board-utils.js +0 -1
- package/dist/entries/kanban-board.d.ts +0 -1
- package/dist/entries/kanban-board.js +0 -1
- package/dist/entries/kanban-card.d.ts +0 -1
- package/dist/entries/kanban-card.js +0 -1
- package/dist/entries/kanban-column.d.ts +0 -1
- package/dist/entries/kanban-column.js +0 -1
- package/dist/entries/kanban-detail-sheet.d.ts +0 -1
- package/dist/entries/kanban-detail-sheet.js +0 -1
- package/dist/entries/kanban-page.d.ts +0 -1
- package/dist/entries/kanban-page.js +0 -1
- package/dist/entries/kanban-types.d.ts +0 -1
- package/dist/entries/kanban-types.js +0 -1
- package/dist/entries/kbd.d.ts +0 -1
- package/dist/entries/kbd.js +0 -1
- package/dist/entries/label.d.ts +0 -1
- package/dist/entries/label.js +0 -1
- package/dist/entries/loading-state.d.ts +0 -1
- package/dist/entries/loading-state.js +0 -1
- package/dist/entries/mcp-access-grouped-tool-picker.d.ts +0 -1
- package/dist/entries/mcp-access-grouped-tool-picker.js +0 -1
- package/dist/entries/mcp-access-tool-picker.d.ts +0 -1
- package/dist/entries/mcp-access-tool-picker.js +0 -1
- package/dist/entries/mcp-access-types.d.ts +0 -1
- package/dist/entries/mcp-access-types.js +0 -1
- package/dist/entries/mcp-client-setup.d.ts +0 -1
- package/dist/entries/mcp-client-setup.js +0 -1
- package/dist/entries/mcp-connect-clients.d.ts +0 -1
- package/dist/entries/mcp-connect-clients.js +0 -1
- package/dist/entries/mcp-plan-choice.d.ts +0 -1
- package/dist/entries/mcp-plan-choice.js +0 -1
- package/dist/entries/menubar.d.ts +0 -1
- package/dist/entries/menubar.js +0 -1
- package/dist/entries/metrics-strip.d.ts +0 -1
- package/dist/entries/metrics-strip.js +0 -1
- package/dist/entries/native-select.d.ts +0 -1
- package/dist/entries/native-select.js +0 -1
- package/dist/entries/navigation-menu-variants.d.ts +0 -1
- package/dist/entries/navigation-menu-variants.js +0 -1
- package/dist/entries/navigation-menu.d.ts +0 -1
- package/dist/entries/navigation-menu.js +0 -1
- package/dist/entries/page-header.d.ts +0 -1
- package/dist/entries/page-header.js +0 -1
- package/dist/entries/pagination.d.ts +0 -1
- package/dist/entries/pagination.js +0 -1
- package/dist/entries/palette.d.ts +0 -2
- package/dist/entries/palette.js +0 -2
- package/dist/entries/popover.d.ts +0 -1
- package/dist/entries/popover.js +0 -1
- package/dist/entries/progress.d.ts +0 -1
- package/dist/entries/progress.js +0 -1
- package/dist/entries/property-list.d.ts +0 -1
- package/dist/entries/property-list.js +0 -1
- package/dist/entries/radio-group.d.ts +0 -1
- package/dist/entries/radio-group.js +0 -1
- package/dist/entries/registry-docs-api.d.ts +0 -1
- package/dist/entries/registry-docs-api.js +0 -1
- package/dist/entries/registry-docs-code.d.ts +0 -1
- package/dist/entries/registry-docs-code.js +0 -1
- package/dist/entries/registry-docs-showcase.d.ts +0 -1
- package/dist/entries/registry-docs-showcase.js +0 -1
- package/dist/entries/registry-docs.d.ts +0 -1
- package/dist/entries/registry-docs.js +0 -1
- package/dist/entries/resizable.d.ts +0 -1
- package/dist/entries/resizable.js +0 -1
- package/dist/entries/scroll-area.d.ts +0 -1
- package/dist/entries/scroll-area.js +0 -1
- package/dist/entries/select.d.ts +0 -1
- package/dist/entries/select.js +0 -1
- package/dist/entries/separator.d.ts +0 -1
- package/dist/entries/separator.js +0 -1
- package/dist/entries/sheet.d.ts +0 -1
- package/dist/entries/sheet.js +0 -1
- package/dist/entries/sidebar/context.d.ts +0 -1
- package/dist/entries/sidebar/context.js +0 -1
- package/dist/entries/sidebar/group.d.ts +0 -1
- package/dist/entries/sidebar/group.js +0 -1
- package/dist/entries/sidebar/layout.d.ts +0 -1
- package/dist/entries/sidebar/layout.js +0 -1
- package/dist/entries/sidebar/menu.d.ts +0 -1
- package/dist/entries/sidebar/menu.js +0 -1
- package/dist/entries/sidebar/provider.d.ts +0 -1
- package/dist/entries/sidebar/provider.js +0 -1
- package/dist/entries/sidebar/rail.d.ts +0 -1
- package/dist/entries/sidebar/rail.js +0 -1
- package/dist/entries/sidebar/trigger.d.ts +0 -1
- package/dist/entries/sidebar/trigger.js +0 -1
- package/dist/entries/sidebar-account-menu-theme.d.ts +0 -1
- package/dist/entries/sidebar-account-menu-theme.js +0 -1
- package/dist/entries/sidebar-account-menu.d.ts +0 -1
- package/dist/entries/sidebar-account-menu.js +0 -1
- package/dist/entries/sidebar.d.ts +0 -1
- package/dist/entries/sidebar.js +0 -1
- package/dist/entries/skeleton.d.ts +0 -1
- package/dist/entries/skeleton.js +0 -1
- package/dist/entries/slider.d.ts +0 -1
- package/dist/entries/slider.js +0 -1
- package/dist/entries/sonner.d.ts +0 -1
- package/dist/entries/sonner.js +0 -1
- package/dist/entries/spinner.d.ts +0 -1
- package/dist/entries/spinner.js +0 -1
- package/dist/entries/submit-feedback-composer.d.ts +0 -1
- package/dist/entries/submit-feedback-composer.js +0 -1
- package/dist/entries/switch.d.ts +0 -1
- package/dist/entries/switch.js +0 -1
- package/dist/entries/table.d.ts +0 -1
- package/dist/entries/table.js +0 -1
- package/dist/entries/tabs-variants.d.ts +0 -1
- package/dist/entries/tabs-variants.js +0 -1
- package/dist/entries/tabs.d.ts +0 -1
- package/dist/entries/tabs.js +0 -1
- package/dist/entries/textarea.d.ts +0 -1
- package/dist/entries/textarea.js +0 -1
- package/dist/entries/timestamp-format.d.ts +0 -1
- package/dist/entries/timestamp-format.js +0 -1
- package/dist/entries/toggle-group.d.ts +0 -1
- package/dist/entries/toggle-group.js +0 -1
- package/dist/entries/toggle-variants.d.ts +0 -1
- package/dist/entries/toggle-variants.js +0 -1
- package/dist/entries/toggle.d.ts +0 -1
- package/dist/entries/toggle.js +0 -1
- package/dist/entries/tooltip.d.ts +0 -1
- package/dist/entries/tooltip.js +0 -1
- package/dist/entries/use-color-theme.d.ts +0 -1
- package/dist/entries/use-color-theme.js +0 -1
- package/dist/entries/use-feedback-composer-state.d.ts +0 -1
- package/dist/entries/use-feedback-composer-state.js +0 -1
- package/dist/entries/use-mobile.d.ts +0 -1
- package/dist/entries/use-mobile.js +0 -1
- package/dist/entries/utils.d.ts +0 -1
- package/dist/entries/utils.js +0 -1
- package/dist/entries/walkthrough.d.ts +0 -1
- package/dist/entries/walkthrough.js +0 -1
- package/dist/entries/workflow-timeline.d.ts +0 -1
- package/dist/entries/workflow-timeline.js +0 -1
- package/dist/hooks/use-mobile.d.ts +0 -1
- package/dist/hooks/use-mobile.js +0 -17
- package/dist/lib/browser-storage.d.ts +0 -12
- package/dist/lib/browser-storage.js +0 -42
- package/dist/lib/palette-presets.d.ts +0 -17
- package/dist/lib/palette-presets.js +0 -42
- package/dist/lib/palette-tokens.d.ts +0 -39
- package/dist/lib/palette-tokens.js +0 -133
- package/dist/lib/palette.d.ts +0 -83
- package/dist/lib/palette.js +0 -151
- package/dist/lib/utils.d.ts +0 -5
- package/dist/lib/utils.js +0 -8
- package/dist/style-imports.d.ts +0 -3
- /package/dist/{components/blocks/feedback-composer-types.js → feedback/comment-types.js} +0 -0
- /package/dist/{components/blocks/kanban-types.js → feedback/feedback-composer-types.js} +0 -0
- /package/dist/{components/walkthrough/runtime/walkthroughTypes.js → feedback/feedback-tracking-types.js} +0 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
import { type CiridaeLabels } from "./locale.js";
|
|
3
|
+
import { type SelectOption } from "./select.js";
|
|
4
|
+
/** What a save reports: the saved line's message, or why it failed. */
|
|
5
|
+
export type SaveOutcome = {
|
|
6
|
+
ok: true;
|
|
7
|
+
message?: ReactNode;
|
|
8
|
+
} | {
|
|
9
|
+
ok: false;
|
|
10
|
+
message: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
export type FieldEdit = {
|
|
13
|
+
kind: "text";
|
|
14
|
+
value: string;
|
|
15
|
+
save: (value: string) => Promise<SaveOutcome>;
|
|
16
|
+
/**
|
|
17
|
+
* The change goes through review: while `warning` returns a message for the draft it
|
|
18
|
+
* shows under the field, and only the `label` button saves.
|
|
19
|
+
*/
|
|
20
|
+
confirm?: {
|
|
21
|
+
label: ReactNode;
|
|
22
|
+
warning: (value: string) => ReactNode | null;
|
|
23
|
+
};
|
|
24
|
+
} | {
|
|
25
|
+
kind: "date";
|
|
26
|
+
/** Epoch milliseconds at local midnight. */
|
|
27
|
+
value: number;
|
|
28
|
+
/** Under the calendar, such as what the date was and where it came from. */
|
|
29
|
+
footer?: ReactNode;
|
|
30
|
+
save: (value: number) => Promise<SaveOutcome>;
|
|
31
|
+
} | {
|
|
32
|
+
kind: "list";
|
|
33
|
+
value: string;
|
|
34
|
+
options: readonly SelectOption[];
|
|
35
|
+
save: (value: string) => Promise<SaveOutcome>;
|
|
36
|
+
emptyMessage?: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
/** Not editable here: a lock with why in its tooltip. */
|
|
39
|
+
| {
|
|
40
|
+
kind: "locked";
|
|
41
|
+
title: string;
|
|
42
|
+
detail?: ReactNode;
|
|
43
|
+
}
|
|
44
|
+
/** Edited in another system: a link out. */
|
|
45
|
+
| {
|
|
46
|
+
kind: "external";
|
|
47
|
+
label: ReactNode;
|
|
48
|
+
href?: string;
|
|
49
|
+
onClick?: () => void;
|
|
50
|
+
};
|
|
51
|
+
/** Where a value came from or who checked it; `onOpen` or `href` opens the source. */
|
|
52
|
+
export type FieldProvenance = {
|
|
53
|
+
id: string;
|
|
54
|
+
label: ReactNode;
|
|
55
|
+
/** A magnifier, or a document for a source that opens. */
|
|
56
|
+
icon?: ReactNode;
|
|
57
|
+
onOpen?: () => void;
|
|
58
|
+
href?: string;
|
|
59
|
+
};
|
|
60
|
+
export type EditableFieldProps = Omit<ComponentProps<"div">, "children"> & {
|
|
61
|
+
label: string;
|
|
62
|
+
value: ReactNode;
|
|
63
|
+
provenance?: readonly FieldProvenance[];
|
|
64
|
+
/** Beside the value, such as a "Contested" `Badge`. */
|
|
65
|
+
badge?: ReactNode;
|
|
66
|
+
/** Under the value while the row is idle. */
|
|
67
|
+
note?: ReactNode;
|
|
68
|
+
/** The field needs the reader: the row lifts and this button sits at its end. */
|
|
69
|
+
action?: {
|
|
70
|
+
label: ReactNode;
|
|
71
|
+
onClick: () => void;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
};
|
|
74
|
+
edit?: FieldEdit;
|
|
75
|
+
labels?: Partial<CiridaeLabels["editableField"]>;
|
|
76
|
+
};
|
|
77
|
+
export declare function EditableField({ label, value, provenance, badge, note, action, edit, labels: ownLabels, className, ...props }: EditableFieldProps): import("@types/react").JSX.Element;
|
|
78
|
+
export type ConflictingSource = {
|
|
79
|
+
id: string;
|
|
80
|
+
label: ReactNode;
|
|
81
|
+
icon?: ReactNode;
|
|
82
|
+
value: ReactNode;
|
|
83
|
+
/** At the row's end, such as when the source was synced or who entered it. */
|
|
84
|
+
meta?: ReactNode;
|
|
85
|
+
};
|
|
86
|
+
export type SourceConflictProps = Omit<ComponentProps<"div">, "children"> & {
|
|
87
|
+
sources: readonly ConflictingSource[];
|
|
88
|
+
/** The value used until someone resolves the conflict, and why it is that one. */
|
|
89
|
+
effective: {
|
|
90
|
+
value: ReactNode;
|
|
91
|
+
note?: ReactNode;
|
|
92
|
+
};
|
|
93
|
+
/** At the effective row's end, such as a Resolve button. */
|
|
94
|
+
action?: ReactNode;
|
|
95
|
+
labels?: Partial<{
|
|
96
|
+
effectiveValue: string;
|
|
97
|
+
}>;
|
|
98
|
+
};
|
|
99
|
+
export declare function SourceConflict({ sources, effective, action, labels: ownLabels, className, ...props }: SourceConflictProps): import("@types/react").JSX.Element;
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* A record's field as a row: its label, value and where the value came from. A field with an
|
|
4
|
+
* `edit` changes in place and saves on its own: the row owns the editing, saving, saved and error
|
|
5
|
+
* states, and the caller owns what a save does through each edit's `save`. `SourceConflict` sits
|
|
6
|
+
* under a field whose sources disagree, with each source's value and the one in effect.
|
|
7
|
+
*/
|
|
8
|
+
import { ArrowSquareOutIcon, CheckIcon, FileTextIcon, LockIcon, MagnifyingGlassIcon, PencilSimpleIcon, WarningIcon, } from "@phosphor-icons/react";
|
|
9
|
+
import { useEffect, useId, useRef, useState, } from "react";
|
|
10
|
+
import { css, cx } from "#primitives/css";
|
|
11
|
+
import { Button } from "./button.js";
|
|
12
|
+
import { Calendar } from "./calendar.js";
|
|
13
|
+
import { useHotkey } from "./hotkeys.js";
|
|
14
|
+
import { icon, Spinner } from "./icon.js";
|
|
15
|
+
import { Input } from "./input.js";
|
|
16
|
+
import { useCiridaeLocale } from "./locale.js";
|
|
17
|
+
import { Tooltip } from "./overlays.js";
|
|
18
|
+
import { Combobox } from "./select.js";
|
|
19
|
+
/* The row stacks its label over the value in a narrow box, so each field is its own container. */
|
|
20
|
+
const fieldBox = css({ containerType: "inline-size" });
|
|
21
|
+
const fieldRow = css({
|
|
22
|
+
position: "relative",
|
|
23
|
+
display: "grid",
|
|
24
|
+
gridTemplateColumns: "150px minmax(0, 1fr) auto",
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
gap: "layout.contentGap",
|
|
27
|
+
paddingBlock: "panel.default",
|
|
28
|
+
paddingInline: "panel.comfortable",
|
|
29
|
+
borderBottom: "1px solid token(colors.border.panel)",
|
|
30
|
+
fontSize: "caption",
|
|
31
|
+
letterSpacing: "compact",
|
|
32
|
+
"&[data-needs]": {
|
|
33
|
+
background: "bg.raised",
|
|
34
|
+
borderBlock: "1px solid token(colors.border.glass)",
|
|
35
|
+
},
|
|
36
|
+
"&[data-editable]": { cursor: "pointer", _hover: { background: "bg.rowHover" } },
|
|
37
|
+
"&[data-editable]:is(:hover, :focus-within) [data-affordance], &[data-editing] [data-affordance]": { opacity: "1" },
|
|
38
|
+
"&[data-editable]:hover > [data-label]": { color: "fg.secondary" },
|
|
39
|
+
"@container (max-width: 520px)": {
|
|
40
|
+
gridTemplateColumns: "minmax(0, 1fr) auto",
|
|
41
|
+
rowGap: "layout.tightGap",
|
|
42
|
+
"& > [data-label]": { gridColumn: "1 / -1" },
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
const fieldLabel = css({
|
|
46
|
+
color: "fg.muted",
|
|
47
|
+
fontSize: "code",
|
|
48
|
+
fontWeight: "medium",
|
|
49
|
+
"[data-needs] > &": { color: "fg.secondary" },
|
|
50
|
+
});
|
|
51
|
+
const fieldValue = css({
|
|
52
|
+
display: "flex",
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
gap: "layout.controlGap",
|
|
55
|
+
minHeight: "control.knob",
|
|
56
|
+
fontSize: "body",
|
|
57
|
+
fontWeight: "medium",
|
|
58
|
+
lineHeight: "tight",
|
|
59
|
+
});
|
|
60
|
+
const valueButton = css({
|
|
61
|
+
display: "inline-flex",
|
|
62
|
+
alignItems: "center",
|
|
63
|
+
gap: "layout.controlGap",
|
|
64
|
+
minWidth: "0",
|
|
65
|
+
padding: "none",
|
|
66
|
+
border: "0",
|
|
67
|
+
borderRadius: "control",
|
|
68
|
+
background: "transparent",
|
|
69
|
+
color: "inherit",
|
|
70
|
+
font: "inherit",
|
|
71
|
+
textAlign: "start",
|
|
72
|
+
cursor: "pointer",
|
|
73
|
+
_focusVisible: { focusRing: "outer" },
|
|
74
|
+
});
|
|
75
|
+
const affordance = css({
|
|
76
|
+
color: "fg.muted",
|
|
77
|
+
opacity: "0",
|
|
78
|
+
transitionProperty: "opacity",
|
|
79
|
+
transitionDuration: "fast",
|
|
80
|
+
});
|
|
81
|
+
const lockMark = css({ display: "inline-flex", color: "fg.muted" });
|
|
82
|
+
const externalLink = css({
|
|
83
|
+
display: "inline-flex",
|
|
84
|
+
alignItems: "center",
|
|
85
|
+
gap: "layout.tightGap",
|
|
86
|
+
padding: "none",
|
|
87
|
+
border: "0",
|
|
88
|
+
background: "transparent",
|
|
89
|
+
color: "fg.secondary",
|
|
90
|
+
font: "inherit",
|
|
91
|
+
fontSize: "caption",
|
|
92
|
+
textDecoration: "none",
|
|
93
|
+
cursor: "pointer",
|
|
94
|
+
_hover: { color: "fg.primary" },
|
|
95
|
+
_focusVisible: { focusRing: "outer" },
|
|
96
|
+
});
|
|
97
|
+
const provenanceLine = css({
|
|
98
|
+
display: "flex",
|
|
99
|
+
flexWrap: "wrap",
|
|
100
|
+
alignItems: "center",
|
|
101
|
+
gap: "layout.contentGap",
|
|
102
|
+
marginTop: "control.iconGap",
|
|
103
|
+
minHeight: "control.knob",
|
|
104
|
+
color: "fg.muted",
|
|
105
|
+
fontSize: "code",
|
|
106
|
+
fontWeight: "medium",
|
|
107
|
+
"& > span, & > button, & > a": {
|
|
108
|
+
display: "inline-flex",
|
|
109
|
+
alignItems: "center",
|
|
110
|
+
gap: "layout.tightGap",
|
|
111
|
+
},
|
|
112
|
+
"&[data-tone=success] > span:first-child": { color: "accent.green" },
|
|
113
|
+
"&[data-tone=warning]": { color: "accent.yellow" },
|
|
114
|
+
"&[data-tone=danger]": { color: "accent.red" },
|
|
115
|
+
});
|
|
116
|
+
const sourceLink = css({
|
|
117
|
+
padding: "none",
|
|
118
|
+
border: "0",
|
|
119
|
+
background: "transparent",
|
|
120
|
+
color: "inherit",
|
|
121
|
+
font: "inherit",
|
|
122
|
+
cursor: "pointer",
|
|
123
|
+
textAlign: "start",
|
|
124
|
+
textDecoration: "underline",
|
|
125
|
+
textDecorationColor: "border.glass",
|
|
126
|
+
textUnderlineOffset: "2px",
|
|
127
|
+
_hover: { color: "fg.primary" },
|
|
128
|
+
_focusVisible: { focusRing: "outer" },
|
|
129
|
+
});
|
|
130
|
+
const fieldNote = css({
|
|
131
|
+
display: "block",
|
|
132
|
+
marginTop: "control.iconGap",
|
|
133
|
+
color: "fg.secondary",
|
|
134
|
+
fontSize: "code",
|
|
135
|
+
fontWeight: "medium",
|
|
136
|
+
});
|
|
137
|
+
const editor = css({ width: "200px", maxWidth: "100%", fontSize: "body" });
|
|
138
|
+
const editorValue = css({ position: "relative", display: "flex", alignItems: "center" });
|
|
139
|
+
const tooltipTitle = css({ display: "block", fontWeight: "medium" });
|
|
140
|
+
const tooltipDetail = css({ display: "block", fontSize: "code", opacity: "0.8" });
|
|
141
|
+
const trailingActions = css({ display: "inline-flex", gap: "layout.tightGap" });
|
|
142
|
+
/* The calendar opens above the date editor. */
|
|
143
|
+
const calendarPicker = css({
|
|
144
|
+
position: "absolute",
|
|
145
|
+
bottom: "calc(100% + token(spacing.control.iconGap))",
|
|
146
|
+
insetInlineStart: "0",
|
|
147
|
+
zIndex: "popover",
|
|
148
|
+
cursor: "default",
|
|
149
|
+
border: "1px solid token(colors.border.control)",
|
|
150
|
+
borderRadius: "inset",
|
|
151
|
+
background: "bg.card",
|
|
152
|
+
boxShadow: "card",
|
|
153
|
+
"& > section": { border: "0", background: "transparent" },
|
|
154
|
+
});
|
|
155
|
+
const calendarFooter = css({
|
|
156
|
+
paddingInline: "panel.default",
|
|
157
|
+
paddingBottom: "panel.compact",
|
|
158
|
+
color: "fg.muted",
|
|
159
|
+
fontSize: "code",
|
|
160
|
+
fontWeight: "medium",
|
|
161
|
+
});
|
|
162
|
+
/** An editor opens with its text selected, so typing replaces the value. */
|
|
163
|
+
function selectTyped(event) {
|
|
164
|
+
if (event.target instanceof HTMLInputElement)
|
|
165
|
+
event.target.select();
|
|
166
|
+
}
|
|
167
|
+
function localMidnight(date) {
|
|
168
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime();
|
|
169
|
+
}
|
|
170
|
+
export function EditableField({ label, value, provenance, badge, note, action, edit, labels: ownLabels, className, ...props }) {
|
|
171
|
+
const locale = useCiridaeLocale();
|
|
172
|
+
const labels = { ...locale.labels.editableField, ...ownLabels };
|
|
173
|
+
const formatDate = (timestamp) => locale.formatDate(timestamp);
|
|
174
|
+
const editable = edit !== undefined && edit.kind !== "locked" && edit.kind !== "external";
|
|
175
|
+
const [status, setStatus] = useState({ mode: "idle" });
|
|
176
|
+
const [draft, setDraft] = useState("");
|
|
177
|
+
const [draftDate, setDraftDate] = useState(0);
|
|
178
|
+
const [month, setMonth] = useState(() => new Date());
|
|
179
|
+
const rowRef = useRef(null);
|
|
180
|
+
const inputRef = useRef(null);
|
|
181
|
+
const valueRef = useRef(null);
|
|
182
|
+
// Focus goes back to the value once an edit that had it ends.
|
|
183
|
+
const restoreFocus = useRef(false);
|
|
184
|
+
// A pick from the list closes it too; this tells that close from a dismissal.
|
|
185
|
+
const picked = useRef(false);
|
|
186
|
+
const labelId = useId();
|
|
187
|
+
const valueId = useId();
|
|
188
|
+
const editing = status.mode === "editing" || status.mode === "error";
|
|
189
|
+
useEffect(() => {
|
|
190
|
+
if (status.mode === "editing")
|
|
191
|
+
inputRef.current?.focus();
|
|
192
|
+
if ((status.mode === "idle" || status.mode === "saved") && restoreFocus.current) {
|
|
193
|
+
restoreFocus.current = false;
|
|
194
|
+
valueRef.current?.focus();
|
|
195
|
+
}
|
|
196
|
+
}, [status.mode]);
|
|
197
|
+
const holdsFocus = () => rowRef.current?.contains(document.activeElement) ?? false;
|
|
198
|
+
const begin = () => {
|
|
199
|
+
if (!editable || editing || status.mode === "saving")
|
|
200
|
+
return;
|
|
201
|
+
picked.current = false;
|
|
202
|
+
if (edit.kind === "text")
|
|
203
|
+
setDraft(edit.value);
|
|
204
|
+
if (edit.kind === "list")
|
|
205
|
+
setDraft(edit.value);
|
|
206
|
+
if (edit.kind === "date") {
|
|
207
|
+
setDraftDate(edit.value);
|
|
208
|
+
setDraft(formatDate(edit.value));
|
|
209
|
+
setMonth(new Date(edit.value));
|
|
210
|
+
}
|
|
211
|
+
setStatus({ mode: "editing" });
|
|
212
|
+
};
|
|
213
|
+
const cancel = () => {
|
|
214
|
+
restoreFocus.current = holdsFocus();
|
|
215
|
+
setStatus({ mode: "idle" });
|
|
216
|
+
};
|
|
217
|
+
const commit = async (run) => {
|
|
218
|
+
restoreFocus.current = holdsFocus();
|
|
219
|
+
setStatus({ mode: "saving" });
|
|
220
|
+
const outcome = await run();
|
|
221
|
+
setStatus(outcome.ok
|
|
222
|
+
? { mode: "saved", message: outcome.message }
|
|
223
|
+
: { mode: "error", message: outcome.message });
|
|
224
|
+
};
|
|
225
|
+
const saveText = () => {
|
|
226
|
+
if (edit?.kind !== "text")
|
|
227
|
+
return;
|
|
228
|
+
if (draft === edit.value)
|
|
229
|
+
return cancel();
|
|
230
|
+
void commit(() => edit.save(draft));
|
|
231
|
+
};
|
|
232
|
+
const saveDate = (timestamp) => {
|
|
233
|
+
if (edit?.kind !== "date")
|
|
234
|
+
return;
|
|
235
|
+
if (timestamp === edit.value)
|
|
236
|
+
return cancel();
|
|
237
|
+
void commit(() => edit.save(timestamp));
|
|
238
|
+
};
|
|
239
|
+
const saveListValue = (next) => {
|
|
240
|
+
if (edit?.kind !== "list")
|
|
241
|
+
return;
|
|
242
|
+
if (next === edit.value)
|
|
243
|
+
return cancel();
|
|
244
|
+
setDraft(next);
|
|
245
|
+
void commit(() => edit.save(next));
|
|
246
|
+
};
|
|
247
|
+
// E edits the field while focus is in it, such as on its value.
|
|
248
|
+
useHotkey("E", begin, {
|
|
249
|
+
target: rowRef,
|
|
250
|
+
enabled: editable && !editing,
|
|
251
|
+
meta: { group: locale.labels.keyboard.record, name: locale.labels.keyboard.editField },
|
|
252
|
+
});
|
|
253
|
+
const retry = () => {
|
|
254
|
+
if (edit?.kind === "text" || edit?.kind === "list")
|
|
255
|
+
void commit(() => edit.save(draft));
|
|
256
|
+
if (edit?.kind === "date")
|
|
257
|
+
void commit(() => edit.save(draftDate));
|
|
258
|
+
};
|
|
259
|
+
const warning = edit?.kind === "text" && edit.confirm && status.mode === "editing"
|
|
260
|
+
? edit.confirm.warning(draft)
|
|
261
|
+
: null;
|
|
262
|
+
// A click outside saves a text edit that needs no review and drops any other.
|
|
263
|
+
useEffect(() => {
|
|
264
|
+
if (status.mode !== "editing" || edit?.kind === "list")
|
|
265
|
+
return;
|
|
266
|
+
const listener = (event) => {
|
|
267
|
+
const row = rowRef.current;
|
|
268
|
+
if (!row || !(event.target instanceof Node) || row.contains(event.target))
|
|
269
|
+
return;
|
|
270
|
+
if (edit?.kind === "text" && warning === null)
|
|
271
|
+
saveText();
|
|
272
|
+
else
|
|
273
|
+
cancel();
|
|
274
|
+
};
|
|
275
|
+
document.addEventListener("mousedown", listener);
|
|
276
|
+
return () => document.removeEventListener("mousedown", listener);
|
|
277
|
+
});
|
|
278
|
+
const onKeyDown = (event) => {
|
|
279
|
+
if (event.key === "Escape") {
|
|
280
|
+
event.preventDefault();
|
|
281
|
+
return cancel();
|
|
282
|
+
}
|
|
283
|
+
if (event.key !== "Enter")
|
|
284
|
+
return;
|
|
285
|
+
event.preventDefault();
|
|
286
|
+
if (edit?.kind === "text" && warning === null)
|
|
287
|
+
return saveText();
|
|
288
|
+
if (edit?.kind === "date") {
|
|
289
|
+
const typed = new Date(draft);
|
|
290
|
+
saveDate(Number.isNaN(typed.getTime()) ? draftDate : localMidnight(typed));
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
const valueLine = () => {
|
|
294
|
+
if (!edit || !editing || edit.kind === "locked" || edit.kind === "external") {
|
|
295
|
+
const shown = _jsx("span", { id: valueId, children: value });
|
|
296
|
+
return (_jsxs("span", { className: fieldValue, children: [editable && status.mode !== "saving" ? (_jsxs("button", { ref: valueRef, type: "button", className: valueButton, "aria-label": labels.edit(label), "aria-describedby": valueId, children: [shown, _jsx(PencilSimpleIcon, { "data-affordance": "", className: cx(icon({ size: "small" }), affordance), "aria-hidden": "true" })] })) : (shown), badge, edit?.kind === "locked" && (_jsx(Tooltip, { content: _jsxs(_Fragment, { children: [_jsx("span", { className: tooltipTitle, children: edit.title }), edit.detail !== undefined && (_jsx("span", { className: tooltipDetail, children: edit.detail }))] }), children: _jsx("span", { className: lockMark, role: "img", "aria-label": edit.title, tabIndex: 0, children: _jsx(LockIcon, { className: icon({ size: "small" }) }) }) })), edit?.kind === "external" &&
|
|
297
|
+
(edit.href !== undefined ? (_jsxs("a", { className: externalLink, href: edit.href, onClick: edit.onClick, children: [edit.label, _jsx(ArrowSquareOutIcon, { className: icon({ size: "small" }) })] })) : (_jsxs("button", { type: "button", className: externalLink, onClick: edit.onClick, children: [edit.label, _jsx(ArrowSquareOutIcon, { className: icon({ size: "small" }) })] }))), status.mode === "saving" && _jsx(Spinner, { size: "small", label: labels.saving })] }));
|
|
298
|
+
}
|
|
299
|
+
if (edit.kind === "list") {
|
|
300
|
+
return (_jsx("span", { className: editorValue, onFocus: selectTyped, children: _jsx("span", { className: editor, children: _jsx(Combobox, { label: label, options: edit.options, value: status.mode === "error" ? draft : edit.value, emptyMessage: edit.emptyMessage, defaultOpen: status.mode === "editing", autoFocus: true, onValueChange: (next) => {
|
|
301
|
+
if (next === null)
|
|
302
|
+
return;
|
|
303
|
+
picked.current = true;
|
|
304
|
+
saveListValue(next);
|
|
305
|
+
}, onOpenChange: (open) => {
|
|
306
|
+
if (!open && !picked.current && status.mode === "editing")
|
|
307
|
+
cancel();
|
|
308
|
+
} }) }) }));
|
|
309
|
+
}
|
|
310
|
+
return (_jsxs("span", { className: editorValue, onFocus: selectTyped, children: [_jsx(Input, { ref: inputRef, className: editor, "aria-labelledby": labelId, "aria-invalid": status.mode === "error" || undefined, value: draft, onChange: (event) => {
|
|
311
|
+
setDraft(event.target.value);
|
|
312
|
+
if (status.mode === "error")
|
|
313
|
+
setStatus({ mode: "editing" });
|
|
314
|
+
}, onKeyDown: onKeyDown }), edit.kind === "date" && status.mode === "editing" && (_jsxs("div", { className: calendarPicker, children: [_jsx(Calendar, { month: month, selected: new Date(draftDate), onMonthChange: setMonth, onSelect: (date) => {
|
|
315
|
+
const next = localMidnight(date);
|
|
316
|
+
setDraftDate(next);
|
|
317
|
+
setDraft(formatDate(next));
|
|
318
|
+
saveDate(next);
|
|
319
|
+
}, weekStartsOn: 1 }), edit.footer !== undefined && _jsx("div", { className: calendarFooter, children: edit.footer })] }))] }));
|
|
320
|
+
};
|
|
321
|
+
const statusLine = () => {
|
|
322
|
+
if (status.mode === "saving")
|
|
323
|
+
return null;
|
|
324
|
+
if (status.mode === "saved") {
|
|
325
|
+
return (_jsxs("span", { className: provenanceLine, "data-tone": "success", children: [_jsxs("span", { children: [_jsx(CheckIcon, { className: icon({ size: "small" }), weight: "bold" }), labels.saved] }), status.message !== undefined && _jsxs("span", { children: ["\u00B7 ", status.message] })] }));
|
|
326
|
+
}
|
|
327
|
+
if (status.mode === "error") {
|
|
328
|
+
return (_jsx("span", { className: provenanceLine, "data-tone": "danger", children: _jsxs("span", { children: [_jsx(WarningIcon, { className: icon({ size: "small" }) }), status.message] }) }));
|
|
329
|
+
}
|
|
330
|
+
if (status.mode === "editing" && edit) {
|
|
331
|
+
if (warning !== null) {
|
|
332
|
+
return (_jsx("span", { className: provenanceLine, "data-tone": "warning", children: _jsxs("span", { children: [_jsx(WarningIcon, { className: icon({ size: "small" }) }), warning] }) }));
|
|
333
|
+
}
|
|
334
|
+
return (_jsx("span", { className: provenanceLine, children: _jsx("span", { children: edit.kind === "list" ? labels.pickHint : labels.saveHint }) }));
|
|
335
|
+
}
|
|
336
|
+
if (!provenance?.length)
|
|
337
|
+
return null;
|
|
338
|
+
return (_jsx("span", { className: provenanceLine, children: provenance.map((item) => {
|
|
339
|
+
const opens = item.onOpen !== undefined || item.href !== undefined;
|
|
340
|
+
const mark = item.icon ?? (_jsx(_Fragment, { children: opens ? (_jsx(FileTextIcon, { className: icon({ size: "small" }) })) : (_jsx(MagnifyingGlassIcon, { className: icon({ size: "small" }) })) }));
|
|
341
|
+
if (item.href !== undefined)
|
|
342
|
+
return (_jsxs("a", { className: sourceLink, href: item.href, onClick: item.onOpen, children: [mark, item.label] }, item.id));
|
|
343
|
+
if (item.onOpen !== undefined)
|
|
344
|
+
return (_jsxs("button", { type: "button", className: sourceLink, onClick: (event) => {
|
|
345
|
+
event.stopPropagation();
|
|
346
|
+
item.onOpen?.();
|
|
347
|
+
}, children: [mark, item.label] }, item.id));
|
|
348
|
+
return (_jsxs("span", { children: [mark, item.label] }, item.id));
|
|
349
|
+
}) }));
|
|
350
|
+
};
|
|
351
|
+
const trailing = () => {
|
|
352
|
+
if (status.mode === "error") {
|
|
353
|
+
return (_jsxs("span", { className: trailingActions, children: [_jsx(Button, { variant: "secondary", size: "medium", onClick: cancel, children: labels.undo }), _jsx(Button, { variant: "secondary", size: "medium", onClick: retry, children: locale.labels.common.retry })] }));
|
|
354
|
+
}
|
|
355
|
+
if (status.mode === "editing" && edit?.kind === "text" && edit.confirm && warning !== null) {
|
|
356
|
+
const confirmLabel = edit.confirm.label;
|
|
357
|
+
return (_jsxs("span", { className: trailingActions, children: [_jsx(Button, { variant: "secondary", size: "medium", onClick: cancel, children: locale.labels.common.cancel }), _jsx(Button, { size: "medium", onClick: () => void commit(() => edit.save(draft)), children: confirmLabel })] }));
|
|
358
|
+
}
|
|
359
|
+
if (action && !editing) {
|
|
360
|
+
return (_jsx(Button, { variant: "secondary", size: "medium", disabled: action.disabled, onClick: (event) => {
|
|
361
|
+
event.stopPropagation();
|
|
362
|
+
action.onClick();
|
|
363
|
+
}, children: action.label }));
|
|
364
|
+
}
|
|
365
|
+
return _jsx("span", {});
|
|
366
|
+
};
|
|
367
|
+
return (_jsx("div", { ...props, className: cx(fieldBox, className), "data-ciridae-ui": "", children: _jsxs("div", { ref: rowRef, className: fieldRow, "data-needs": action && !editing ? "" : undefined, "data-editable": editable && !editing ? "" : undefined, "data-editing": editing ? "" : undefined, onClick: begin, children: [_jsx("span", { className: fieldLabel, id: labelId, "data-label": "", children: label }), _jsxs("span", { className: css({ minWidth: "0" }), children: [valueLine(), _jsx("span", { role: "status", children: statusLine() }), note !== undefined && status.mode === "idle" && (_jsx("span", { className: fieldNote, children: note }))] }), trailing()] }) }));
|
|
368
|
+
}
|
|
369
|
+
/* Source conflict: each source's value under a disputed field, then the value in effect. */
|
|
370
|
+
const conflictBlock = css({
|
|
371
|
+
display: "grid",
|
|
372
|
+
gap: "layout.controlGap",
|
|
373
|
+
paddingBlock: "panel.default",
|
|
374
|
+
paddingInline: "panel.comfortable",
|
|
375
|
+
borderBottom: "1px solid token(colors.border.panel)",
|
|
376
|
+
background: "bg.panel",
|
|
377
|
+
letterSpacing: "compact",
|
|
378
|
+
containerType: "inline-size",
|
|
379
|
+
});
|
|
380
|
+
const conflictRow = css({
|
|
381
|
+
display: "grid",
|
|
382
|
+
gridTemplateColumns: "150px minmax(0, 1fr) auto",
|
|
383
|
+
alignItems: "center",
|
|
384
|
+
gap: "layout.contentGap",
|
|
385
|
+
"@container (max-width: 520px)": {
|
|
386
|
+
gridTemplateColumns: "minmax(0, 1fr) auto",
|
|
387
|
+
rowGap: "layout.tightGap",
|
|
388
|
+
"& > :first-child": { gridColumn: "1 / -1" },
|
|
389
|
+
},
|
|
390
|
+
});
|
|
391
|
+
const sourceName = css({
|
|
392
|
+
display: "inline-flex",
|
|
393
|
+
alignItems: "center",
|
|
394
|
+
gap: "control.iconGap",
|
|
395
|
+
color: "fg.secondary",
|
|
396
|
+
fontSize: "code",
|
|
397
|
+
fontWeight: "medium",
|
|
398
|
+
"& svg": { fontSize: "icon.small" },
|
|
399
|
+
});
|
|
400
|
+
const sourceValue = css({ fontSize: "body", fontWeight: "medium", lineHeight: "tight" });
|
|
401
|
+
const sourceMeta = css({
|
|
402
|
+
color: "fg.secondary",
|
|
403
|
+
fontSize: "code",
|
|
404
|
+
fontWeight: "medium",
|
|
405
|
+
"@container (max-width: 520px)": { gridColumn: "1 / -1" },
|
|
406
|
+
});
|
|
407
|
+
const effectiveRow = css({
|
|
408
|
+
paddingTop: "panel.default",
|
|
409
|
+
borderTop: "1px solid token(colors.border.panel)",
|
|
410
|
+
});
|
|
411
|
+
const effectiveLabel = css({ fontSize: "code", fontWeight: "medium" });
|
|
412
|
+
const effectiveNote = css({
|
|
413
|
+
display: "block",
|
|
414
|
+
marginTop: "layout.tightGap",
|
|
415
|
+
color: "fg.secondary",
|
|
416
|
+
fontSize: "code",
|
|
417
|
+
fontWeight: "medium",
|
|
418
|
+
});
|
|
419
|
+
export function SourceConflict({ sources, effective, action, labels: ownLabels, className, ...props }) {
|
|
420
|
+
const labels = { ...useCiridaeLocale().labels.editableField, ...ownLabels };
|
|
421
|
+
return (_jsxs("div", { ...props, className: cx(conflictBlock, className), "data-ciridae-ui": "", children: [sources.map((source) => (_jsxs("div", { className: conflictRow, children: [_jsxs("span", { className: sourceName, children: [source.icon, source.label] }), _jsx("span", { className: sourceValue, children: source.value }), _jsx("span", { className: sourceMeta, children: source.meta })] }, source.id))), _jsxs("div", { className: cx(conflictRow, effectiveRow), children: [_jsx("span", { className: effectiveLabel, children: labels.effectiveValue }), _jsxs("span", { children: [_jsx("span", { className: sourceValue, children: effective.value }), effective.note !== undefined && _jsx("span", { className: effectiveNote, children: effective.note })] }), action ?? _jsx("span", {})] })] }));
|
|
422
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { InputProps } from "./input.js";
|
|
2
|
+
export type EmailInputProps = Omit<InputProps, "value" | "defaultValue" | "onChange" | "type" | "size"> & {
|
|
3
|
+
value: readonly string[];
|
|
4
|
+
onValueChange: (emails: string[]) => void;
|
|
5
|
+
/** Controlled draft lets a form validate and submit text not yet committed to a chip. */
|
|
6
|
+
inputValue: string;
|
|
7
|
+
onInputValueChange: (draft: string) => void;
|
|
8
|
+
/** Validation belongs to the form's email contract; invalid entries stay editable/removable. */
|
|
9
|
+
invalidEmails?: readonly string[];
|
|
10
|
+
};
|
|
11
|
+
/** Comma, semicolon, whitespace, Enter, Tab, or blur commits addresses; duplicates are ignored. */
|
|
12
|
+
export declare function EmailInput({ value, onValueChange, inputValue, onInputValueChange, invalidEmails, disabled, className, onKeyDown, onBlur, onPaste, ...props }: EmailInputProps): import("@types/react").JSX.Element;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { css, cx } from "#primitives/css";
|
|
3
|
+
import { Chip } from "./chip.js";
|
|
4
|
+
import { useFieldControl } from "./field-context.js";
|
|
5
|
+
const emailField = css({
|
|
6
|
+
display: "flex",
|
|
7
|
+
flexWrap: "wrap",
|
|
8
|
+
alignItems: "center",
|
|
9
|
+
gap: "layout.tightGap",
|
|
10
|
+
padding: "control.compactBlock",
|
|
11
|
+
minHeight: "control.compact",
|
|
12
|
+
border: "1px solid token(colors.border.control)",
|
|
13
|
+
borderRadius: "field",
|
|
14
|
+
background: "bg.control",
|
|
15
|
+
_focusWithin: { focusRing: "outer" },
|
|
16
|
+
"&[data-invalid]": { borderColor: "accent.red" },
|
|
17
|
+
"&[data-disabled]": { opacity: "disabled" },
|
|
18
|
+
});
|
|
19
|
+
const draftInput = css({
|
|
20
|
+
flex: "1",
|
|
21
|
+
minWidth: "control.search",
|
|
22
|
+
width: "auto",
|
|
23
|
+
border: "0",
|
|
24
|
+
background: "transparent",
|
|
25
|
+
color: "fg.primary",
|
|
26
|
+
fontFamily: "sans",
|
|
27
|
+
fontSize: "caption",
|
|
28
|
+
height: "control.shortcut",
|
|
29
|
+
paddingInline: "control.compactInline",
|
|
30
|
+
outline: "none",
|
|
31
|
+
_placeholder: { color: "fg.muted" },
|
|
32
|
+
_focusVisible: { outline: "none", boxShadow: "none" },
|
|
33
|
+
});
|
|
34
|
+
/** Comma, semicolon, whitespace, Enter, Tab, or blur commits addresses; duplicates are ignored. */
|
|
35
|
+
export function EmailInput({ value, onValueChange, inputValue, onInputValueChange, invalidEmails = [], disabled, className, onKeyDown, onBlur, onPaste, ...props }) {
|
|
36
|
+
// A `Field` names the draft input and describes it with its helper or error, as it does `Input`.
|
|
37
|
+
const fieldIds = useFieldControl(props);
|
|
38
|
+
const commit = (text) => {
|
|
39
|
+
const addresses = text.split(/[\s,;]+/).filter(Boolean);
|
|
40
|
+
if (addresses.length)
|
|
41
|
+
onValueChange([...new Set([...value, ...addresses])]);
|
|
42
|
+
onInputValueChange("");
|
|
43
|
+
};
|
|
44
|
+
const updateDraft = (text) => {
|
|
45
|
+
const parts = text.split(/[\s,;]+/);
|
|
46
|
+
const draft = parts.pop() ?? "";
|
|
47
|
+
const addresses = parts.filter(Boolean);
|
|
48
|
+
if (addresses.length)
|
|
49
|
+
onValueChange([...new Set([...value, ...addresses])]);
|
|
50
|
+
onInputValueChange(draft);
|
|
51
|
+
};
|
|
52
|
+
return (_jsxs("div", { className: cx(emailField, "ph-no-capture", className), "data-ciridae-ui": "", "data-sentry-mask": true, "data-disabled": disabled || undefined, "data-invalid": fieldIds["aria-invalid"] || undefined, children: [value.map((email) => (_jsx(Chip, { size: "compact", disabled: disabled, invalid: invalidEmails.includes(email), onRemove: () => onValueChange(value.filter((address) => address !== email)), children: email }, email))), _jsx("input", { ...props, ...fieldIds, type: "text", inputMode: "email", autoCapitalize: "none", spellCheck: false, className: draftInput, disabled: disabled, value: inputValue, onChange: (event) => updateDraft(event.target.value), onPaste: (event) => {
|
|
53
|
+
onPaste?.(event);
|
|
54
|
+
if (event.defaultPrevented)
|
|
55
|
+
return;
|
|
56
|
+
const text = event.clipboardData.getData("text");
|
|
57
|
+
if (!/[\s,;]/.test(text))
|
|
58
|
+
return;
|
|
59
|
+
event.preventDefault();
|
|
60
|
+
const input = event.currentTarget;
|
|
61
|
+
const start = input.selectionStart ?? inputValue.length;
|
|
62
|
+
const end = input.selectionEnd ?? start;
|
|
63
|
+
updateDraft(inputValue.slice(0, start) + text + inputValue.slice(end));
|
|
64
|
+
}, onKeyDown: (event) => {
|
|
65
|
+
onKeyDown?.(event);
|
|
66
|
+
if (event.defaultPrevented || event.nativeEvent.isComposing)
|
|
67
|
+
return;
|
|
68
|
+
if ((event.key === "Enter" || event.key === "Tab") && inputValue.trim()) {
|
|
69
|
+
if (event.key === "Enter")
|
|
70
|
+
event.preventDefault();
|
|
71
|
+
commit(inputValue);
|
|
72
|
+
}
|
|
73
|
+
}, onBlur: (event) => {
|
|
74
|
+
// Do not move a clicked action by adding a chip between pointerdown and click.
|
|
75
|
+
const nextFocus = event.relatedTarget;
|
|
76
|
+
const movingToAction = nextFocus instanceof Element &&
|
|
77
|
+
nextFocus.closest('button, a, [role="checkbox"], [role="switch"]');
|
|
78
|
+
// Safari button clicks blur without a relatedTarget. Keep that draft for form submission.
|
|
79
|
+
if (nextFocus !== null && inputValue.trim() && !movingToAction)
|
|
80
|
+
commit(inputValue);
|
|
81
|
+
onBlur?.(event);
|
|
82
|
+
} })] }));
|
|
83
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type SiteBannerProps } from "./site-banner.js";
|
|
2
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
3
|
+
export type EnvironmentFrameProps = ComponentProps<"div"> & {
|
|
4
|
+
/**
|
|
5
|
+
* The environment's name, such as "Staging", read as "Staging environment" through the locale's
|
|
6
|
+
* `shell.environment` label. Omit for builds that should not show an environment banner.
|
|
7
|
+
*/
|
|
8
|
+
label?: ReactNode;
|
|
9
|
+
/** The strip's tint: `warning` for a staging build, `info` for dev. */
|
|
10
|
+
tone?: SiteBannerProps["tone"];
|
|
11
|
+
};
|
|
12
|
+
/** A persistent environment strip and an inset AppShell viewport. */
|
|
13
|
+
export declare function EnvironmentFrame({ label, tone, children, className, ...props }: EnvironmentFrameProps): import("@types/react").JSX.Element;
|