@tfn-design/design-system 0.2.0 → 0.3.0
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 +3 -3
- package/dist/accordion/accordion.d.ts +2 -2
- package/dist/accordion/web/ds-accordion.d.ts +10 -3
- package/dist/accordion/web/ds-accordion.js +33 -4
- package/dist/account-password-field/account-password-field.d.ts +4 -4
- package/dist/account-password-field/web/ds-account-password-field.d.ts +2 -2
- package/dist/account-password-field/web/ds-account-password-field.js +1 -1
- package/dist/account-switcher/account-switcher.d.ts +7 -7
- package/dist/account-switcher/web/ds-account-switcher.d.ts +5 -5
- package/dist/account-switcher/web/ds-account-switcher.js +3 -3
- package/dist/action-toast/action-toast.d.ts +12 -12
- package/dist/action-toast/web/ds-action-toast.d.ts +5 -5
- package/dist/action-toast/web/ds-action-toast.js +9 -4
- package/dist/ai-assist-field/ai-assist-field.d.ts +8 -6
- package/dist/ai-assist-field/ai-assist-field.js +12 -2
- package/dist/ai-assist-field/web/ds-ai-assist-field.d.ts +1 -1
- package/dist/ai-assist-field/web/ds-ai-assist-field.js +9 -8
- package/dist/ai-attachment/web/ds-ai-attachment.js +2 -1
- package/dist/ai-branch-switcher/ai-branch-switcher.d.ts +3 -0
- package/dist/ai-branch-switcher/web/ds-ai-branch-switcher.d.ts +1 -1
- package/dist/ai-branch-switcher/web/ds-ai-branch-switcher.js +8 -5
- package/dist/ai-citation/ai-citation.d.ts +8 -8
- package/dist/ai-citation/native/ds-ai-citation.js +5 -5
- package/dist/ai-citation/web/ds-ai-citation.js +6 -5
- package/dist/ai-composer/ai-composer.d.ts +2 -2
- package/dist/ai-composer/native/ds-ai-composer.js +5 -4
- package/dist/ai-composer/web/ds-ai-composer.d.ts +1 -1
- package/dist/ai-composer/web/ds-ai-composer.js +2 -2
- package/dist/ai-confirmation/ai-confirmation.d.ts +9 -9
- package/dist/ai-confirmation/native/ds-ai-confirmation.js +2 -2
- package/dist/ai-confirmation/web/ds-ai-confirmation.d.ts +1 -1
- package/dist/ai-confirmation/web/ds-ai-confirmation.js +3 -2
- package/dist/ai-context-scope/ai-context-scope.d.ts +5 -5
- package/dist/ai-context-scope/ai-context-scope.js +1 -1
- package/dist/ai-context-scope/native/ds-ai-context-scope.d.ts +1 -1
- package/dist/ai-context-scope/native/ds-ai-context-scope.js +6 -3
- package/dist/ai-context-scope/web/ds-ai-context-scope.d.ts +2 -2
- package/dist/ai-context-scope/web/ds-ai-context-scope.js +12 -2
- package/dist/ai-conversation-list/ai-conversation-list.d.ts +5 -5
- package/dist/ai-conversation-list/web/ds-ai-conversation-list.d.ts +1 -1
- package/dist/ai-conversation-list/web/ds-ai-conversation-list.js +7 -6
- package/dist/ai-diff/ai-diff.d.ts +2 -2
- package/dist/ai-diff/native/ds-ai-diff.js +3 -2
- package/dist/ai-diff/web/ds-ai-diff.js +3 -2
- package/dist/ai-draft-panel/ai-draft-panel.d.ts +3 -3
- package/dist/ai-draft-panel/ai-draft-panel.js +3 -3
- package/dist/ai-draft-panel/web/ds-ai-draft-panel.d.ts +2 -2
- package/dist/ai-draft-panel/web/ds-ai-draft-panel.js +3 -2
- package/dist/ai-empty-state/native/ds-ai-empty-state.d.ts +1 -1
- package/dist/ai-empty-state/native/ds-ai-empty-state.js +4 -3
- package/dist/ai-empty-state/web/ds-ai-empty-state.d.ts +1 -1
- package/dist/ai-empty-state/web/ds-ai-empty-state.js +2 -1
- package/dist/ai-error-state/native/ds-ai-error-state.js +3 -2
- package/dist/ai-error-state/web/ds-ai-error-state.js +2 -1
- package/dist/ai-feedback/ai-feedback.d.ts +1 -1
- package/dist/ai-feedback/ai-feedback.js +1 -1
- package/dist/ai-feedback/web/ds-ai-feedback.js +3 -2
- package/dist/ai-label/ai-label.d.ts +5 -5
- package/dist/ai-label/native/ds-ai-label.js +5 -4
- package/dist/ai-label/web/ds-ai-label.js +4 -4
- package/dist/ai-message/ai-message.d.ts +3 -3
- package/dist/ai-message/native/ds-ai-message.d.ts +1 -1
- package/dist/ai-message/native/ds-ai-message.js +12 -10
- package/dist/ai-message/web/ds-ai-message-markdown.js +5 -5
- package/dist/ai-message/web/ds-ai-message.d.ts +2 -2
- package/dist/ai-message/web/ds-ai-message.js +3 -2
- package/dist/ai-message-actions/ai-message-actions.d.ts +1 -1
- package/dist/ai-message-actions/native/ds-ai-message-actions.js +2 -1
- package/dist/ai-message-actions/web/use-ai-clipboard.d.ts +1 -1
- package/dist/ai-plan/ai-plan.d.ts +4 -4
- package/dist/ai-plan/web/ds-ai-plan.js +3 -2
- package/dist/ai-reasoning/ai-reasoning.d.ts +1 -1
- package/dist/ai-side-nav/ai-side-nav.d.ts +19 -19
- package/dist/ai-side-nav/web/ds-ai-side-nav.d.ts +9 -9
- package/dist/ai-side-nav/web/ds-ai-side-nav.js +2 -1
- package/dist/ai-suggestions/native/ds-ai-suggestions.js +1 -1
- package/dist/ai-suggestions/web/ds-ai-suggestions.js +1 -1
- package/dist/ai-summary-card/ai-summary-card.d.ts +8 -8
- package/dist/ai-summary-card/native/ds-ai-summary-card.d.ts +1 -1
- package/dist/ai-summary-card/native/ds-ai-summary-card.js +3 -3
- package/dist/ai-summary-card/web/ds-ai-summary-card.d.ts +1 -1
- package/dist/ai-summary-card/web/ds-ai-summary-card.js +2 -1
- package/dist/ai-thinking/native/ds-ai-thinking.js +3 -2
- package/dist/ai-thinking/web/ds-ai-thinking.js +1 -1
- package/dist/ai-thread/ai-thread.d.ts +3 -3
- package/dist/ai-thread/native/ds-ai-thread-panel.js +2 -1
- package/dist/ai-thread/native/ds-ai-thread.d.ts +2 -2
- package/dist/ai-thread/native/ds-ai-thread.js +4 -2
- package/dist/ai-thread/web/ds-ai-thread.d.ts +2 -2
- package/dist/ai-thread/web/ds-ai-thread.js +1 -1
- package/dist/ai-tool-call/ai-tool-call.d.ts +6 -6
- package/dist/ai-tool-call/native/ds-ai-tool-call.d.ts +1 -1
- package/dist/ai-tool-call/native/ds-ai-tool-call.js +5 -5
- package/dist/ai-tool-call/web/ds-ai-tool-call.d.ts +1 -1
- package/dist/ai-tool-call/web/ds-ai-tool-call.js +4 -3
- package/dist/alert/alert.d.ts +9 -9
- package/dist/alert/alert.js +1 -1
- package/dist/alert/native/ds-alert.js +9 -11
- package/dist/alert/web/ds-alert.js +24 -14
- package/dist/ambient-gradient/ambient-gradient.d.ts +11 -11
- package/dist/ambient-gradient/native/ambient-gradient-provider.d.ts +1 -1
- package/dist/ambient-gradient/native/ds-ambient-gradient.d.ts +1 -1
- package/dist/ambient-gradient/web/ds-ambient-gradient.d.ts +1 -1
- package/dist/amount/amount.d.ts +25 -25
- package/dist/amount/amount.js +4 -3
- package/dist/amount/native/ds-amount.js +2 -1
- package/dist/amount/web/ds-amount.js +1 -1
- package/dist/amount-cell/web/ds-amount-cell.js +1 -1
- package/dist/amount-entry/amount-entry.d.ts +8 -8
- package/dist/amount-entry/native/ds-amount-entry.js +3 -2
- package/dist/amount-entry/web/ds-amount-entry.js +2 -1
- package/dist/app-shell/app-shell.d.ts +9 -9
- package/dist/app-shell/app-shell.js +1 -1
- package/dist/app-shell/web/ds-app-shell.d.ts +24 -6
- package/dist/app-shell/web/ds-app-shell.js +4 -3
- package/dist/approval-chain/approval-chain.d.ts +12 -12
- package/dist/approval-chain/native/ds-approval-chain.d.ts +1 -1
- package/dist/approval-chain/native/ds-approval-chain.js +8 -6
- package/dist/approval-chain/web/ds-approval-chain.d.ts +1 -1
- package/dist/approval-chain/web/ds-approval-chain.js +7 -6
- package/dist/auth-shell/auth-shell.d.ts +4 -4
- package/dist/auth-shell/web/ds-auth-shell.d.ts +24 -6
- package/dist/auth-shell/web/ds-auth-shell.js +27 -2
- package/dist/avatar/avatar.d.ts +2 -2
- package/dist/avatar/native/ds-avatar.js +3 -2
- package/dist/avatar-group/avatar-group.d.ts +3 -3
- package/dist/avatar-group/native/ds-avatar-group.js +3 -2
- package/dist/avatar-group/web/ds-avatar-group.js +2 -2
- package/dist/balance-header/balance-header.d.ts +7 -7
- package/dist/balance-header/native/ds-balance-header.d.ts +1 -1
- package/dist/balance-header/native/ds-balance-header.js +3 -2
- package/dist/balance-header/web/ds-balance-header.d.ts +1 -1
- package/dist/balance-header/web/ds-balance-header.js +2 -1
- package/dist/bank-logo/bank-logo.d.ts +187 -0
- package/dist/bank-logo/bank-logo.js +151 -0
- package/dist/bank-logo/native/ds-bank-logo.d.ts +7 -0
- package/dist/bank-logo/native/ds-bank-logo.js +43 -0
- package/dist/bank-logo/web/ds-bank-logo.d.ts +10 -0
- package/dist/bank-logo/web/ds-bank-logo.js +27 -0
- package/dist/bar-chart/bar-chart.d.ts +63 -15
- package/dist/bar-chart/bar-chart.js +79 -2
- package/dist/bar-chart/web/ds-bar-chart.d.ts +5 -4
- package/dist/bar-chart/web/ds-bar-chart.js +86 -27
- package/dist/bottom-nav/bottom-nav.d.ts +27 -20
- package/dist/bottom-nav/bottom-nav.js +1 -0
- package/dist/bottom-nav/native/bottom-nav-icon-weight.d.ts +6 -0
- package/dist/bottom-nav/native/bottom-nav-icon-weight.js +6 -0
- package/dist/bottom-nav/native/ds-bottom-nav.d.ts +8 -8
- package/dist/bottom-nav/native/ds-bottom-nav.js +26 -17
- package/dist/bottom-nav/web/ds-bottom-nav.d.ts +16 -0
- package/dist/bottom-nav/web/ds-bottom-nav.js +31 -0
- package/dist/brand-lockup/brand-lockup.d.ts +41 -35
- package/dist/brand-lockup/brand-lockup.js +1 -1
- package/dist/brand-lockup/native/ds-brand-lockup.d.ts +7 -7
- package/dist/brand-lockup/native/ds-brand-lockup.js +6 -4
- package/dist/brand-lockup/web/ds-brand-lockup.d.ts +8 -8
- package/dist/brand-lockup/web/ds-brand-lockup.js +6 -4
- package/dist/breadcrumbs/breadcrumbs.d.ts +4 -4
- package/dist/breadcrumbs/web/ds-breadcrumbs.d.ts +1 -1
- package/dist/bulk-action-bar/bulk-action-bar.d.ts +6 -6
- package/dist/bulk-action-bar/web/ds-bulk-action-bar.d.ts +4 -4
- package/dist/bulk-action-bar/web/ds-bulk-action-bar.js +2 -1
- package/dist/bullet-chart/bullet-chart.d.ts +82 -0
- package/dist/bullet-chart/bullet-chart.js +60 -0
- package/dist/bullet-chart/web/ds-bullet-chart.d.ts +8 -0
- package/dist/bullet-chart/web/ds-bullet-chart.js +31 -0
- package/dist/button/button.d.ts +36 -36
- package/dist/button/button.js +14 -14
- package/dist/button/native/ds-button.js +10 -11
- package/dist/button/web/ds-button.d.ts +3 -3
- package/dist/button/web/ds-button.js +41 -24
- package/dist/button-group/button-group.d.ts +2 -2
- package/dist/button-group/web/ds-button-group.d.ts +3 -3
- package/dist/button-group/web/ds-button-group.js +1 -1
- package/dist/calendar/calendar.d.ts +14 -14
- package/dist/calendar/web/ds-calendar.d.ts +9 -5
- package/dist/calendar/web/ds-calendar.js +11 -9
- package/dist/card-carousel/card-carousel.d.ts +5 -5
- package/dist/card-carousel/native/ds-card-carousel.js +1 -1
- package/dist/card-carousel/web/ds-card-carousel.js +4 -2
- package/dist/chart/chart.d.ts +140 -60
- package/dist/chart/chart.js +146 -46
- package/dist/chart/web/ds-chart.d.ts +15 -13
- package/dist/chart/web/ds-chart.js +122 -49
- package/dist/check-option/check-option.d.ts +8 -10
- package/dist/check-option/check-option.js +0 -2
- package/dist/check-option/web/ds-check-option.d.ts +4 -4
- package/dist/check-option/web/ds-check-option.js +5 -4
- package/dist/checkbox/checkbox.d.ts +1 -1
- package/dist/checkbox/web/ds-checkbox.js +3 -7
- package/dist/chip/chip-wash.d.ts +5 -5
- package/dist/chip/chip.d.ts +5 -5
- package/dist/chip/native/ds-chip.d.ts +1 -1
- package/dist/chip/native/ds-chip.js +5 -4
- package/dist/chip/web/ds-chip.d.ts +2 -2
- package/dist/chip/web/ds-chip.js +37 -4
- package/dist/code-block/code-block.d.ts +10 -10
- package/dist/code-block/web/ds-code-block.js +2 -1
- package/dist/code-block/web/use-code-block-clipboard.d.ts +1 -1
- package/dist/column-picker/web/ds-column-picker.d.ts +3 -1
- package/dist/column-picker/web/ds-column-picker.js +2 -2
- package/dist/combobox/combobox.d.ts +24 -10
- package/dist/combobox/combobox.js +2 -5
- package/dist/combobox/web/ds-combobox.d.ts +2 -2
- package/dist/combobox/web/ds-combobox.js +45 -13
- package/dist/command-palette/command-palette.d.ts +30 -30
- package/dist/command-palette/web/ds-command-palette.d.ts +3 -3
- package/dist/command-palette/web/ds-command-palette.js +9 -7
- package/dist/comment-thread/comment-thread.d.ts +11 -11
- package/dist/comment-thread/native/ds-comment-thread.d.ts +1 -1
- package/dist/comment-thread/native/ds-comment-thread.js +14 -12
- package/dist/comment-thread/web/ds-comment-thread.d.ts +1 -1
- package/dist/comment-thread/web/ds-comment-thread.js +8 -7
- package/dist/condition-builder/condition-builder.d.ts +18 -18
- package/dist/condition-builder/condition-builder.js +1 -1
- package/dist/condition-builder/web/ds-condition-builder.js +9 -9
- package/dist/context-menu/context-menu.d.ts +4 -4
- package/dist/context-menu/web/ds-context-menu.d.ts +1 -1
- package/dist/context-menu/web/ds-context-menu.js +2 -2
- package/dist/coordinate-field/coordinate-field.d.ts +10 -10
- package/dist/coordinate-field/native/ds-coordinate-field.d.ts +1 -1
- package/dist/coordinate-field/native/ds-coordinate-field.js +2 -2
- package/dist/coordinate-field/web/ds-coordinate-field.d.ts +1 -1
- package/dist/coordinate-field/web/ds-coordinate-field.js +2 -2
- package/dist/copy-field/copy-field.d.ts +8 -8
- package/dist/copy-field/web/ds-copy-field.d.ts +1 -1
- package/dist/copy-field/web/ds-copy-field.js +4 -4
- package/dist/count-badge/count-badge.d.ts +9 -9
- package/dist/count-badge/native/ds-count-badge.js +3 -2
- package/dist/count-badge/web/ds-count-badge.js +4 -4
- package/dist/countdown/native/ds-countdown.js +3 -2
- package/dist/countdown/web/ds-countdown.js +2 -1
- package/dist/dashboard-shell/dashboard-shell.d.ts +3 -3
- package/dist/dashboard-shell/web/ds-dashboard-shell.d.ts +4 -4
- package/dist/data-table/data-table-license.d.ts +3 -3
- package/dist/data-table/data-table-store.d.ts +5 -5
- package/dist/data-table/url-state.d.ts +6 -6
- package/dist/data-table/web/data-table-parts.d.ts +2 -2
- package/dist/data-table/web/data-table-theme.css +83 -21
- package/dist/data-table/web/ds-data-table-skeleton-chip.d.ts +2 -2
- package/dist/data-table/web/ds-data-table.d.ts +4 -2
- package/dist/data-table/web/ds-data-table.js +7 -2
- package/dist/date-field/web/ds-date-field.d.ts +1 -1
- package/dist/date-input/date-input.d.ts +47 -12
- package/dist/date-input/date-input.js +30 -3
- package/dist/date-input/web/ds-date-input.d.ts +2 -2
- package/dist/date-input/web/ds-date-input.js +33 -7
- package/dist/date-picker/date-picker.d.ts +23 -23
- package/dist/date-picker/date-picker.js +1 -1
- package/dist/date-picker/web/ds-date-picker.d.ts +13 -7
- package/dist/date-picker/web/ds-date-picker.js +8 -7
- package/dist/date-range-picker/web/ds-date-range-picker.js +33 -3
- package/dist/day-picker/day-picker.d.ts +8 -2
- package/dist/day-picker/day-picker.js +1 -1
- package/dist/day-picker/web/ds-day-picker.d.ts +3 -3
- package/dist/day-picker/web/ds-day-picker.js +16 -4
- package/dist/delta/delta.d.ts +19 -3
- package/dist/delta/delta.js +30 -1
- package/dist/delta/native/ds-delta.js +10 -5
- package/dist/delta/web/ds-delta.js +7 -4
- package/dist/description-list/description-list.d.ts +3 -3
- package/dist/description-list/native/ds-description-list.d.ts +2 -2
- package/dist/description-list/native/ds-description-list.js +6 -3
- package/dist/description-list/web/ds-description-list.d.ts +2 -2
- package/dist/description-list/web/ds-description-list.js +3 -1
- package/dist/dialog/dialog.d.ts +9 -9
- package/dist/dialog/native/ds-dialog.d.ts +1 -1
- package/dist/dialog/native/ds-dialog.js +2 -1
- package/dist/dialog/web/ds-dialog.d.ts +13 -5
- package/dist/dialog/web/ds-dialog.js +9 -11
- package/dist/diverging-bar-chart/diverging-bar-chart.d.ts +23 -8
- package/dist/diverging-bar-chart/diverging-bar-chart.js +24 -2
- package/dist/diverging-bar-chart/web/ds-diverging-bar-chart.d.ts +2 -2
- package/dist/diverging-bar-chart/web/ds-diverging-bar-chart.js +30 -15
- package/dist/divider/divider.d.ts +2 -2
- package/dist/divider/web/ds-divider.d.ts +1 -1
- package/dist/divider/web/ds-divider.js +2 -2
- package/dist/donut-chart/donut-chart.d.ts +19 -3
- package/dist/donut-chart/donut-chart.js +19 -2
- package/dist/donut-chart/web/ds-donut-chart.d.ts +3 -1
- package/dist/donut-chart/web/ds-donut-chart.js +20 -12
- package/dist/drawer/drawer.d.ts +10 -10
- package/dist/drawer/native/ds-drawer.d.ts +3 -3
- package/dist/drawer/native/ds-drawer.js +4 -3
- package/dist/drawer/web/ds-drawer.d.ts +3 -3
- package/dist/drawer/web/ds-drawer.js +5 -3
- package/dist/dropdown-menu/dropdown-menu.d.ts +17 -17
- package/dist/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/dropdown-menu/native/ds-dropdown-menu.d.ts +2 -2
- package/dist/dropdown-menu/native/ds-dropdown-menu.js +4 -3
- package/dist/dropdown-menu/web/ds-dropdown-menu-surface.d.ts +5 -5
- package/dist/dropdown-menu/web/ds-dropdown-menu-surface.js +5 -4
- package/dist/dropdown-menu/web/ds-dropdown-menu.d.ts +4 -4
- package/dist/dumbbell-chart/dumbbell-chart.d.ts +39 -0
- package/dist/dumbbell-chart/dumbbell-chart.js +19 -0
- package/dist/dumbbell-chart/web/ds-dumbbell-chart.d.ts +13 -0
- package/dist/dumbbell-chart/web/ds-dumbbell-chart.js +20 -0
- package/dist/editable-row/editable-row.d.ts +7 -2
- package/dist/editable-row/web/ds-editable-row.d.ts +2 -2
- package/dist/editable-row/web/ds-editable-row.js +3 -3
- package/dist/empty-state/empty-state.d.ts +5 -5
- package/dist/empty-state/empty-state.js +1 -1
- package/dist/empty-state/native/ds-empty-state.d.ts +3 -3
- package/dist/empty-state/native/ds-empty-state.js +1 -1
- package/dist/empty-state/web/ds-empty-state.d.ts +8 -8
- package/dist/empty-state/web/ds-empty-state.js +2 -8
- package/dist/environment-banner/environment-banner.d.ts +9 -9
- package/dist/environment-banner/web/ds-environment-banner.d.ts +2 -2
- package/dist/environment-banner/web/ds-environment-banner.js +4 -2
- package/dist/evaluation-trace/evaluation-trace.d.ts +3 -3
- package/dist/evaluation-trace/web/ds-evaluation-trace.d.ts +1 -1
- package/dist/evaluation-trace/web/ds-evaluation-trace.js +7 -6
- package/dist/event-row/web/ds-event-row.d.ts +1 -1
- package/dist/event-row/web/ds-event-row.js +2 -1
- package/dist/facet-button/facet-button.d.ts +3 -3
- package/dist/facet-button/web/ds-facet-button.d.ts +1 -1
- package/dist/facet-button/web/ds-facet-button.js +4 -10
- package/dist/facet-menu/web/ds-facet-menu-row.d.ts +1 -1
- package/dist/facet-menu/web/ds-facet-menu.js +5 -4
- package/dist/fact/fact.d.ts +2 -2
- package/dist/fact/fact.js +1 -1
- package/dist/fact/native/ds-fact.js +3 -2
- package/dist/field-rules/field-rules.d.ts +9 -9
- package/dist/figure/figure.d.ts +1 -1
- package/dist/figure/figure.js +1 -1
- package/dist/figure/native/ds-figure.js +4 -3
- package/dist/file-dropzone/file-dropzone.d.ts +10 -10
- package/dist/file-dropzone/web/ds-file-dropzone.d.ts +2 -2
- package/dist/file-dropzone/web/ds-file-dropzone.js +3 -2
- package/dist/file-field/file-field.d.ts +4 -4
- package/dist/file-field/web/ds-file-field.d.ts +4 -4
- package/dist/file-field/web/ds-file-field.js +2 -1
- package/dist/file-import/file-import.d.ts +8 -8
- package/dist/file-import/file-import.js +1 -1
- package/dist/file-import/web/ds-file-import.d.ts +2 -2
- package/dist/file-import/web/ds-file-import.js +1 -1
- package/dist/file-upload/file-upload.d.ts +13 -13
- package/dist/file-upload/file-upload.js +1 -1
- package/dist/file-upload/web/ds-file-upload.d.ts +3 -1
- package/dist/file-upload/web/ds-file-upload.js +4 -4
- package/dist/filter-bar/filter-bar.d.ts +4 -4
- package/dist/filter-bar/web/ds-filter-bar.d.ts +2 -2
- package/dist/filter-bar/web/ds-filter-bar.js +2 -1
- package/dist/filter-button/filter-button.d.ts +7 -7
- package/dist/filter-button/web/ds-filter-button.d.ts +1 -1
- package/dist/filter-chip/filter-chip.d.ts +12 -12
- package/dist/filter-chip/web/ds-filter-chip.d.ts +1 -1
- package/dist/filter-chip/web/ds-filter-chip.js +4 -4
- package/dist/filter-popover/filter-popover.d.ts +3 -0
- package/dist/filter-popover/web/ds-filter-popover.d.ts +2 -2
- package/dist/filter-popover/web/ds-filter-popover.js +9 -4
- package/dist/form-field-group/form-field-group.d.ts +7 -7
- package/dist/form-field-group/web/ds-form-field-group.js +1 -1
- package/dist/form-section/form-section.d.ts +1 -1
- package/dist/form-section/form-section.js +1 -1
- package/dist/form-section/web/ds-form-section.d.ts +2 -2
- package/dist/form-section/web/ds-form-section.js +3 -1
- package/dist/freshness-indicator/freshness-indicator.d.ts +4 -1
- package/dist/freshness-indicator/freshness-indicator.js +8 -2
- package/dist/freshness-indicator/web/ds-freshness-indicator.d.ts +1 -1
- package/dist/freshness-indicator/web/ds-freshness-indicator.js +4 -2
- package/dist/funnel/funnel.d.ts +4 -4
- package/dist/funnel/web/ds-funnel.d.ts +3 -3
- package/dist/funnel/web/ds-funnel.js +21 -28
- package/dist/gauge/gauge.d.ts +9 -3
- package/dist/gauge/gauge.js +11 -1
- package/dist/gauge/web/ds-gauge.d.ts +8 -3
- package/dist/gauge/web/ds-gauge.js +15 -8
- package/dist/geo/geo.d.ts +15 -15
- package/dist/geofence-editor/geofence-editor.d.ts +8 -8
- package/dist/geofence-editor/web/ds-geofence-editor.d.ts +6 -6
- package/dist/geofence-editor/web/ds-geofence-editor.js +18 -18
- package/dist/glass.d.ts +15 -15
- package/dist/glass.js +1 -1
- package/dist/gradient-card/gradient-card.d.ts +3 -3
- package/dist/gradient-card/web/ds-gradient-card.d.ts +2 -2
- package/dist/gradient-card/web/ds-gradient-card.js +1 -1
- package/dist/group-header/group-header.d.ts +1 -1
- package/dist/group-header/web/ds-group-header.d.ts +1 -1
- package/dist/group-header/web/ds-group-header.js +1 -1
- package/dist/heading/heading.d.ts +18 -0
- package/dist/heading/heading.js +14 -0
- package/dist/heading/native/ds-heading.d.ts +5 -0
- package/dist/heading/native/ds-heading.js +9 -0
- package/dist/heading/web/ds-heading.d.ts +5 -0
- package/dist/heading/web/ds-heading.js +10 -0
- package/dist/heatmap/heatmap.d.ts +15 -4
- package/dist/heatmap/heatmap.js +6 -0
- package/dist/heatmap/web/ds-heatmap.d.ts +4 -4
- package/dist/heatmap/web/ds-heatmap.js +24 -11
- package/dist/helper-text/helper-text.d.ts +13 -13
- package/dist/helper-text/helper-text.js +4 -4
- package/dist/helper-text/native/ds-helper-text.d.ts +1 -1
- package/dist/helper-text/web/ds-helper-text.d.ts +1 -1
- package/dist/histogram/histogram.d.ts +68 -0
- package/dist/histogram/histogram.js +79 -0
- package/dist/histogram/web/ds-histogram.d.ts +10 -0
- package/dist/histogram/web/ds-histogram.js +33 -0
- package/dist/hover-card/hover-card.d.ts +1 -1
- package/dist/hover-card/web/ds-hover-card.d.ts +1 -1
- package/dist/hover-card/web/ds-hover-card.js +3 -2
- package/dist/icon/web/ds-icon-provider.js +2 -1
- package/dist/icon-button/icon-button.d.ts +8 -8
- package/dist/icon-button/icon-button.js +1 -1
- package/dist/icon-button/native/ds-icon-button.js +2 -2
- package/dist/icon-button/web/ds-icon-button.d.ts +1 -1
- package/dist/icon-button/web/ds-icon-button.js +3 -3
- package/dist/icon-frame/icon-frame.d.ts +23 -9
- package/dist/icon-frame/icon-frame.js +6 -2
- package/dist/icon-frame/native/ds-icon-frame.d.ts +1 -1
- package/dist/icon-frame/native/ds-icon-frame.js +24 -7
- package/dist/icon-frame/web/ds-icon-frame.d.ts +2 -2
- package/dist/icon-frame/web/ds-icon-frame.js +25 -6
- package/dist/icon-toggle-group/web/ds-icon-toggle-group.d.ts +5 -1
- package/dist/icon-toggle-group/web/ds-icon-toggle-group.js +2 -2
- package/dist/ident/ident.d.ts +4 -4
- package/dist/ident/web/ds-ident.js +1 -1
- package/dist/impersonation-banner/impersonation-banner.d.ts +2 -2
- package/dist/impersonation-banner/impersonation-banner.js +2 -2
- package/dist/impersonation-banner/web/ds-impersonation-banner.d.ts +5 -5
- package/dist/impersonation-banner/web/ds-impersonation-banner.js +2 -1
- package/dist/index.d.ts +39 -11
- package/dist/index.js +24 -10
- package/dist/inline-edit/inline-edit.d.ts +5 -5
- package/dist/inline-edit/web/ds-inline-edit.d.ts +2 -2
- package/dist/inline-edit/web/ds-inline-edit.js +8 -6
- package/dist/input/input.d.ts +8 -8
- package/dist/input/input.js +1 -1
- package/dist/input/native/ds-input.js +2 -3
- package/dist/input/web/ds-input.d.ts +2 -2
- package/dist/input/web/ds-input.js +13 -10
- package/dist/interaction.d.ts +7 -7
- package/dist/interaction.js +2 -2
- package/dist/json-viewer/json-viewer.d.ts +17 -17
- package/dist/json-viewer/web/ds-json-viewer.d.ts +1 -1
- package/dist/json-viewer/web/ds-json-viewer.js +3 -2
- package/dist/kanban-board/kanban-board.d.ts +13 -13
- package/dist/kanban-board/web/ds-kanban-board.d.ts +1 -1
- package/dist/kanban-board/web/ds-kanban-board.js +6 -5
- package/dist/kbd/kbd.d.ts +6 -6
- package/dist/kbd/web/ds-kbd.js +2 -2
- package/dist/key-value-editor/key-value-editor.d.ts +15 -10
- package/dist/key-value-editor/web/ds-key-value-editor.d.ts +2 -2
- package/dist/key-value-editor/web/ds-key-value-editor.js +11 -8
- package/dist/keypad/keypad.d.ts +4 -4
- package/dist/keypad/native/ds-keypad.js +3 -2
- package/dist/keypad/web/ds-keypad.js +1 -1
- package/dist/label/label.d.ts +28 -28
- package/dist/label/label.js +6 -6
- package/dist/label/native/ds-label-group.js +5 -3
- package/dist/label/native/ds-label.d.ts +2 -2
- package/dist/label/native/ds-label.js +18 -13
- package/dist/label/web/ds-label-group.js +4 -3
- package/dist/label/web/ds-label.d.ts +2 -2
- package/dist/label/web/ds-label.js +17 -13
- package/dist/label-picker/label-picker.d.ts +9 -9
- package/dist/label-picker/native/ds-label-picker.js +8 -5
- package/dist/label-picker/web/ds-label-picker.js +7 -6
- package/dist/labeled-divider/web/ds-labeled-divider.js +2 -1
- package/dist/labeled-field/labeled-field.d.ts +6 -6
- package/dist/labeled-field/web/ds-labeled-field.d.ts +4 -4
- package/dist/labeled-field/web/ds-labeled-field.js +1 -1
- package/dist/leaderboard/leaderboard.d.ts +53 -0
- package/dist/leaderboard/leaderboard.js +35 -0
- package/dist/leaderboard/web/ds-leaderboard.d.ts +14 -0
- package/dist/leaderboard/web/ds-leaderboard.js +16 -0
- package/dist/legend/legend.d.ts +28 -3
- package/dist/legend/legend.js +4 -0
- package/dist/legend/web/ds-legend.d.ts +5 -2
- package/dist/legend/web/ds-legend.js +32 -23
- package/dist/lib/chart-context.d.ts +32 -0
- package/dist/lib/chart-context.js +18 -0
- package/dist/lib/chart-curve.js +7 -1
- package/dist/lib/chart-finish.d.ts +28 -18
- package/dist/lib/chart-finish.js +25 -22
- package/dist/lib/chart-hue.d.ts +4 -3
- package/dist/lib/chart-hue.js +1 -1
- package/dist/lib/chart-library.d.ts +1 -1
- package/dist/lib/chart-library.js +1 -1
- package/dist/lib/chart-palette.d.ts +7 -7
- package/dist/lib/chart-series.d.ts +52 -7
- package/dist/lib/chart-series.js +43 -1
- package/dist/lib/chart-table.d.ts +14 -0
- package/dist/lib/chart-table.js +14 -0
- package/dist/lib/chart-ticks.d.ts +24 -0
- package/dist/lib/chart-ticks.js +33 -0
- package/dist/lib/chart-value.d.ts +2 -0
- package/dist/lib/chart-value.js +6 -0
- package/dist/lib/cn.d.ts +2 -0
- package/dist/lib/cn.js +22 -24
- package/dist/lib/focus-order.d.ts +2 -2
- package/dist/lib/ink-child.d.ts +1 -1
- package/dist/lib/native/glass.d.ts +3 -3
- package/dist/lib/native/glass.js +1 -1
- package/dist/lib/native/text.d.ts +5 -0
- package/dist/lib/native/text.js +6 -0
- package/dist/lib/native/use-large-text.d.ts +3 -0
- package/dist/lib/native/use-large-text.js +9 -0
- package/dist/lib/overlay-stack.d.ts +11 -11
- package/dist/lib/sets-type.d.ts +1 -0
- package/dist/lib/sets-type.js +5 -0
- package/dist/lib/use-theme-epoch.d.ts +4 -4
- package/dist/lib/use-theme-epoch.native.d.ts +7 -7
- package/dist/lib/web/assign-ref.d.ts +4 -0
- package/dist/lib/web/assign-ref.js +6 -0
- package/dist/lib/web/chart-figures.d.ts +25 -0
- package/dist/lib/web/chart-figures.js +25 -0
- package/dist/lib/web/chart-finish.d.ts +20 -6
- package/dist/lib/web/chart-finish.js +16 -2
- package/dist/lib/web/density.js +5 -5
- package/dist/lib/web/focus-trap.d.ts +3 -3
- package/dist/lib/web/map-glass.js +2 -2
- package/dist/lib/web/scroll-lock.d.ts +1 -1
- package/dist/lib/web/use-anchored-surface.d.ts +6 -6
- package/dist/lib/web/use-chart-points.d.ts +23 -0
- package/dist/lib/web/use-chart-points.js +58 -0
- package/dist/lib/web/use-overlay.d.ts +3 -3
- package/dist/list-row/list-row.d.ts +6 -6
- package/dist/list-row/native/ds-list-row.js +5 -2
- package/dist/list-row/web/ds-list-row-group.d.ts +13 -0
- package/dist/list-row/web/ds-list-row-group.js +5 -0
- package/dist/list-row/web/ds-list-row.d.ts +15 -3
- package/dist/list-row/web/ds-list-row.js +12 -5
- package/dist/loading-screen/loading-screen.d.ts +10 -10
- package/dist/loading-screen/native/ds-loading-screen.d.ts +1 -1
- package/dist/loading-screen/native/ds-loading-screen.js +3 -2
- package/dist/loading-screen/web/ds-loading-screen.d.ts +1 -1
- package/dist/loading-screen/web/ds-loading-screen.js +3 -3
- package/dist/loading-state/loading-state.d.ts +9 -9
- package/dist/loading-state/web/ds-loading-state.js +1 -1
- package/dist/log-viewer/log-viewer.d.ts +20 -20
- package/dist/log-viewer/log-viewer.js +14 -2
- package/dist/log-viewer/web/ds-log-viewer.js +12 -3
- package/dist/map/map.d.ts +18 -18
- package/dist/map/map.js +2 -2
- package/dist/map/web/ds-map-fence.d.ts +2 -2
- package/dist/map/web/ds-map-fence.js +14 -13
- package/dist/map/web/ds-map-popup.d.ts +2 -2
- package/dist/map/web/ds-map-popup.js +1 -1
- package/dist/map/web/ds-map.d.ts +3 -3
- package/dist/map/web/ds-map.js +5 -4
- package/dist/map/web/map-provider.d.ts +7 -7
- package/dist/map-banner/map-banner.d.ts +4 -4
- package/dist/map-banner/map-banner.js +1 -1
- package/dist/map-banner/native/ds-map-banner.js +2 -2
- package/dist/map-banner/web/ds-map-banner.js +3 -2
- package/dist/map-controls/map-controls.d.ts +6 -6
- package/dist/map-controls/map-controls.js +1 -1
- package/dist/map-controls/native/ds-map-controls.d.ts +1 -1
- package/dist/map-controls/native/ds-map-controls.js +5 -4
- package/dist/map-controls/web/ds-map-controls.d.ts +1 -1
- package/dist/map-controls/web/ds-map-controls.js +4 -4
- package/dist/map-draw-toolbar/map-draw-toolbar.d.ts +3 -3
- package/dist/map-draw-toolbar/map-draw-toolbar.js +1 -1
- package/dist/map-draw-toolbar/web/ds-map-draw-toolbar.d.ts +1 -1
- package/dist/map-draw-toolbar/web/ds-map-draw-toolbar.js +3 -2
- package/dist/map-heatmap-layer/map-heatmap-layer.d.ts +25 -8
- package/dist/map-heatmap-layer/map-heatmap-layer.js +4 -0
- package/dist/map-heatmap-layer/web/ds-map-heatmap-layer.d.ts +19 -7
- package/dist/map-heatmap-layer/web/ds-map-heatmap-layer.js +15 -11
- package/dist/map-layers/map-layers.d.ts +1 -1
- package/dist/map-layers/map-layers.js +1 -1
- package/dist/map-layers/native/ds-map-layers.d.ts +1 -1
- package/dist/map-layers/native/ds-map-layers.js +4 -4
- package/dist/map-layers/web/ds-map-layers.d.ts +2 -2
- package/dist/map-layers/web/ds-map-layers.js +6 -5
- package/dist/map-list/map-list.d.ts +1 -1
- package/dist/map-list/web/ds-map-list.js +2 -2
- package/dist/map-marker/map-marker.d.ts +2 -2
- package/dist/map-marker/web/ds-map-marker.d.ts +1 -1
- package/dist/map-marker/web/ds-map-marker.js +4 -3
- package/dist/map-search/map-search.d.ts +2 -2
- package/dist/map-search/map-search.js +1 -1
- package/dist/map-search/native/ds-map-search.d.ts +1 -1
- package/dist/map-search/native/ds-map-search.js +4 -4
- package/dist/map-search/web/ds-map-search.d.ts +1 -1
- package/dist/map-search/web/ds-map-search.js +21 -14
- package/dist/map-search-area/map-search-area.d.ts +1 -1
- package/dist/map-search-area/map-search-area.js +1 -1
- package/dist/map-search-area/native/ds-map-search-area.d.ts +1 -1
- package/dist/map-search-area/native/ds-map-search-area.js +2 -2
- package/dist/map-search-area/web/ds-map-search-area.d.ts +1 -1
- package/dist/map-search-area/web/ds-map-search-area.js +3 -2
- package/dist/map-sheet/map-sheet.d.ts +7 -7
- package/dist/map-sheet/map-sheet.js +1 -1
- package/dist/map-sheet/native/ds-map-sheet.js +2 -2
- package/dist/map-sheet/web/ds-map-sheet.d.ts +1 -1
- package/dist/map-sheet/web/ds-map-sheet.js +14 -6
- package/dist/map-summary/web/ds-map-summary.d.ts +1 -1
- package/dist/map-summary/web/ds-map-summary.js +6 -3
- package/dist/measure.d.ts +3 -3
- package/dist/mention-input/mention-input.d.ts +13 -13
- package/dist/mention-input/native/ds-mention-input.d.ts +1 -1
- package/dist/mention-input/native/ds-mention-input.js +6 -3
- package/dist/mention-input/web/ds-mention-input.d.ts +3 -3
- package/dist/mention-input/web/ds-mention-input.js +9 -7
- package/dist/menu-button/web/ds-menu-button.d.ts +2 -2
- package/dist/menu-button/web/ds-menu-button.js +9 -3
- package/dist/merchant-avatar/merchant-avatar.d.ts +6 -3
- package/dist/merchant-avatar/merchant-avatar.js +8 -0
- package/dist/merchant-avatar/native/ds-merchant-avatar.js +10 -9
- package/dist/merchant-avatar/web/ds-merchant-avatar.js +8 -8
- package/dist/meter/meter.d.ts +8 -4
- package/dist/meter/meter.js +5 -0
- package/dist/meter/native/ds-meter.d.ts +1 -1
- package/dist/meter/native/ds-meter.js +6 -4
- package/dist/meter/web/ds-meter.d.ts +8 -2
- package/dist/meter/web/ds-meter.js +12 -5
- package/dist/metric/metric.d.ts +5 -5
- package/dist/metric/native/ds-metric.js +5 -3
- package/dist/metric/web/ds-metric.js +2 -1
- package/dist/metric-card/metric-card.d.ts +60 -0
- package/dist/metric-card/metric-card.js +18 -0
- package/dist/metric-card/web/ds-metric-card.d.ts +24 -0
- package/dist/metric-card/web/ds-metric-card.js +17 -0
- package/dist/month-picker/month-picker.d.ts +2 -0
- package/dist/month-picker/web/ds-month-picker.d.ts +1 -1
- package/dist/month-picker/web/ds-month-picker.js +5 -4
- package/dist/month-strip/month-strip.d.ts +2 -0
- package/dist/month-strip/web/ds-month-strip.d.ts +3 -3
- package/dist/month-strip/web/ds-month-strip.js +12 -7
- package/dist/morph/morph.d.ts +10 -10
- package/dist/morph/native/ds-morph.d.ts +1 -1
- package/dist/morph/native/morph-provider.d.ts +2 -2
- package/dist/morph/web/ds-morph.d.ts +4 -4
- package/dist/motion.d.ts +33 -33
- package/dist/motion.js +12 -12
- package/dist/multi-select/multi-select.d.ts +10 -10
- package/dist/multi-select/web/ds-multi-select.js +9 -8
- package/dist/native.d.ts +6 -0
- package/dist/native.js +3 -0
- package/dist/notification-list/native/ds-notification-list.d.ts +1 -1
- package/dist/notification-list/native/ds-notification-list.js +7 -4
- package/dist/notification-list/notification-list.d.ts +4 -4
- package/dist/notification-list/web/ds-notification-list.d.ts +1 -1
- package/dist/notification-list/web/ds-notification-list.js +6 -5
- package/dist/number-field/native/ds-number-field.js +15 -7
- package/dist/number-field/number-field.d.ts +7 -7
- package/dist/number-field/web/ds-number-field.js +8 -7
- package/dist/otp/native/ds-otp-field.d.ts +1 -1
- package/dist/otp/native/ds-otp-field.js +9 -3
- package/dist/otp/native/ds-otp.js +1 -1
- package/dist/otp/otp.d.ts +14 -10
- package/dist/otp/web/ds-otp-field.d.ts +2 -2
- package/dist/otp/web/ds-otp-field.js +6 -1
- package/dist/otp/web/ds-otp.d.ts +1 -1
- package/dist/otp/web/ds-otp.js +3 -3
- package/dist/overflow-menu/web/ds-overflow-menu.js +9 -3
- package/dist/page-head/page-head.d.ts +4 -4
- package/dist/page-head/web/ds-page-head.d.ts +5 -3
- package/dist/page-head/web/ds-page-head.js +6 -2
- package/dist/pagination/web/ds-pagination.js +2 -1
- package/dist/panel/native/ds-panel.js +7 -4
- package/dist/panel/panel.d.ts +14 -14
- package/dist/panel/panel.js +7 -7
- package/dist/panel/web/ds-panel.d.ts +7 -5
- package/dist/panel/web/ds-panel.js +4 -3
- package/dist/password-feedback/password-feedback.d.ts +3 -3
- package/dist/password-feedback/web/ds-password-feedback.js +2 -2
- package/dist/password-requirements/password-requirements.d.ts +5 -5
- package/dist/password-requirements/web/ds-password-requirements.js +1 -1
- package/dist/password-strength/password-strength.d.ts +5 -5
- package/dist/password-strength/web/ds-password-strength.d.ts +2 -2
- package/dist/password-strength/web/ds-password-strength.js +4 -2
- package/dist/payment-card/native/ds-payment-card.js +5 -2
- package/dist/payment-card/payment-card.d.ts +2 -2
- package/dist/payment-card/web/ds-payment-card.js +2 -1
- package/dist/people-cell/web/ds-people-cell.js +1 -1
- package/dist/person-cell/person-cell.d.ts +1 -1
- package/dist/phone-field/native/ds-phone-field.d.ts +1 -1
- package/dist/phone-field/native/ds-phone-field.js +6 -4
- package/dist/phone-field/phone-field.d.ts +13 -12
- package/dist/phone-field/phone-field.js +1 -1
- package/dist/phone-field/web/ds-phone-field.d.ts +3 -3
- package/dist/phone-field/web/ds-phone-field.js +15 -8
- package/dist/place-card/native/ds-place-card.js +15 -7
- package/dist/place-card/place-card.d.ts +18 -18
- package/dist/place-card/web/ds-place-card.js +18 -8
- package/dist/plan-chart/plan-chart.d.ts +68 -0
- package/dist/plan-chart/plan-chart.js +42 -0
- package/dist/plan-chart/web/ds-plan-chart.d.ts +10 -0
- package/dist/plan-chart/web/ds-plan-chart.js +35 -0
- package/dist/popover/native/ds-popover.d.ts +1 -1
- package/dist/popover/popover.d.ts +3 -3
- package/dist/popover/web/ds-popover.d.ts +1 -1
- package/dist/popover/web/ds-popover.js +2 -2
- package/dist/presence-indicator/native/ds-presence-indicator.js +4 -3
- package/dist/presence-indicator/presence-indicator.d.ts +3 -3
- package/dist/presence-indicator/web/ds-presence-indicator.js +2 -2
- package/dist/price-pin/native/ds-price-pin.js +3 -2
- package/dist/price-pin/price-pin.d.ts +7 -7
- package/dist/price-pin/web/ds-price-pin.js +2 -2
- package/dist/priority-indicator/native/ds-priority-indicator.d.ts +1 -1
- package/dist/priority-indicator/native/ds-priority-indicator.js +3 -2
- package/dist/priority-indicator/priority-indicator.d.ts +5 -5
- package/dist/priority-indicator/web/ds-priority-indicator.d.ts +1 -1
- package/dist/priority-indicator/web/ds-priority-indicator.js +1 -1
- package/dist/profile-card/profile-card.d.ts +1 -1
- package/dist/profile-card/web/ds-profile-card.d.ts +1 -1
- package/dist/profile-card/web/ds-profile-card.js +5 -3
- package/dist/progress-bar/native/ds-progress-bar.d.ts +1 -1
- package/dist/progress-bar/native/ds-progress-bar.js +1 -1
- package/dist/progress-bar/progress-bar.d.ts +8 -8
- package/dist/progress-bar/web/ds-progress-bar.d.ts +1 -1
- package/dist/progress-bar/web/ds-progress-bar.js +4 -4
- package/dist/progress-cell/progress-cell.js +1 -1
- package/dist/progress-cell/web/ds-progress-cell.js +4 -1
- package/dist/progress-ring/native/ds-progress-ring.js +5 -3
- package/dist/progress-ring/progress-ring.d.ts +5 -5
- package/dist/progress-ring/web/ds-progress-ring.d.ts +8 -2
- package/dist/progress-ring/web/ds-progress-ring.js +9 -3
- package/dist/promo-banner/web/ds-promo-banner.js +2 -1
- package/dist/proportion-bar/native/ds-proportion-bar.js +4 -3
- package/dist/proportion-bar/proportion-bar.d.ts +3 -3
- package/dist/proportion-bar/web/ds-proportion-bar.js +5 -5
- package/dist/props.d.ts +2 -2
- package/dist/provider-button/provider-button.d.ts +6 -6
- package/dist/provider-button/web/ds-provider-button.d.ts +8 -8
- package/dist/qr-code/qr-code.d.ts +12 -12
- package/dist/qr-code/qr-matrix.d.ts +4 -4
- package/dist/qr-code/qr-matrix.js +1 -1
- package/dist/quick-actions/native/ds-quick-actions.js +4 -3
- package/dist/quick-actions/quick-actions.d.ts +2 -2
- package/dist/quick-actions/web/ds-quick-actions.js +7 -4
- package/dist/radar-chart/radar-chart.d.ts +26 -9
- package/dist/radar-chart/radar-chart.js +20 -7
- package/dist/radar-chart/web/ds-radar-chart.js +11 -24
- package/dist/radial-progress/native/ds-radial-progress.js +18 -20
- package/dist/radial-progress/radial-progress.d.ts +10 -10
- package/dist/radial-progress/radial-progress.js +1 -1
- package/dist/radial-progress/web/ds-radial-progress.js +24 -22
- package/dist/radio/radio.d.ts +11 -11
- package/dist/radio/web/ds-radio.d.ts +1 -1
- package/dist/radio/web/ds-radio.js +9 -5
- package/dist/radio-group/radio-group.d.ts +5 -5
- package/dist/radio-group/web/ds-radio-group.d.ts +2 -2
- package/dist/rating-badge/rating-badge.js +4 -1
- package/dist/rating-badge/web/ds-rating-badge.js +1 -1
- package/dist/recipient-select/recipient-select.d.ts +8 -4
- package/dist/recipient-select/web/ds-recipient-select.d.ts +2 -2
- package/dist/recipient-select/web/ds-recipient-select.js +5 -4
- package/dist/record-panel/record-panel.d.ts +1 -1
- package/dist/record-panel/web/ds-record-panel.js +20 -12
- package/dist/recovery-actions/web/ds-recovery-actions.d.ts +1 -1
- package/dist/recovery-shell/web/ds-recovery-shell.js +1 -1
- package/dist/relative-time/native/ds-relative-time.js +2 -1
- package/dist/relative-time/relative-time.d.ts +4 -4
- package/dist/reorder-list/reorder-list.d.ts +2 -2
- package/dist/reorder-list/web/ds-reorder-list.js +3 -2
- package/dist/resend-control/resend-control.d.ts +3 -3
- package/dist/resend-control/web/ds-resend-control.js +1 -1
- package/dist/route-line/route-line.d.ts +4 -4
- package/dist/route-line/web/ds-route-line.js +1 -1
- package/dist/route-stops/route-stops.d.ts +1 -1
- package/dist/route-stops/web/ds-route-stops.js +6 -3
- package/dist/row-actions-cell/web/ds-row-actions-cell.d.ts +4 -2
- package/dist/row-actions-cell/web/ds-row-actions-cell.js +2 -2
- package/dist/rule-summary/rule-summary.d.ts +8 -8
- package/dist/rule-summary/web/ds-rule-summary.d.ts +5 -5
- package/dist/rule-summary/web/ds-rule-summary.js +3 -2
- package/dist/save-bar/save-bar.d.ts +3 -3
- package/dist/save-bar/save-bar.js +1 -1
- package/dist/save-bar/web/ds-save-bar.js +2 -1
- package/dist/scale.d.ts +19 -19
- package/dist/scanner/native/ds-scanner.d.ts +5 -5
- package/dist/scanner/native/ds-scanner.js +4 -4
- package/dist/scanner/scanner.d.ts +20 -13
- package/dist/scanner/scanner.js +12 -8
- package/dist/scatter-chart/scatter-chart.d.ts +48 -0
- package/dist/scatter-chart/scatter-chart.js +15 -0
- package/dist/scatter-chart/web/ds-scatter-chart.d.ts +9 -0
- package/dist/scatter-chart/web/ds-scatter-chart.js +34 -0
- package/dist/scrim.d.ts +2 -2
- package/dist/scrim.js +1 -1
- package/dist/search-field/search-field.d.ts +3 -3
- package/dist/search-field/web/ds-search-field.d.ts +1 -1
- package/dist/search-field/web/ds-search-field.js +25 -6
- package/dist/section/native/ds-section.d.ts +5 -0
- package/dist/section/native/ds-section.js +9 -0
- package/dist/section/section-context.d.ts +1 -0
- package/dist/section/section-context.js +2 -0
- package/dist/section/section.d.ts +9 -0
- package/dist/section/section.js +8 -0
- package/dist/section/web/ds-section.d.ts +5 -0
- package/dist/section/web/ds-section.js +8 -0
- package/dist/section-nav/section-nav.d.ts +7 -7
- package/dist/section-nav/web/ds-section-nav.d.ts +2 -2
- package/dist/section-nav/web/ds-section-nav.js +2 -2
- package/dist/segmented-control/native/ds-segmented-control.js +21 -9
- package/dist/segmented-control/segmented-control.d.ts +5 -5
- package/dist/segmented-control/web/ds-segmented-control.js +2 -2
- package/dist/select/native/ds-select.d.ts +3 -3
- package/dist/select/native/ds-select.js +7 -6
- package/dist/select/select.d.ts +14 -14
- package/dist/select/web/ds-select-option-labels.d.ts +1 -1
- package/dist/select/web/ds-select-option-labels.js +2 -1
- package/dist/select/web/ds-select.d.ts +9 -9
- package/dist/select/web/ds-select.js +37 -12
- package/dist/settings-directory/native/ds-settings-directory.js +4 -2
- package/dist/settings-directory/web/ds-settings-directory.js +2 -1
- package/dist/settings-row/native/ds-settings-row.d.ts +2 -2
- package/dist/settings-row/native/ds-settings-row.js +4 -3
- package/dist/settings-row/settings-row.d.ts +3 -3
- package/dist/settings-row/web/ds-settings-row-group.d.ts +17 -0
- package/dist/settings-row/web/ds-settings-row-group.js +7 -0
- package/dist/settings-row/web/ds-settings-row.d.ts +5 -3
- package/dist/settings-row/web/ds-settings-row.js +3 -2
- package/dist/setup-guide/setup-guide.d.ts +19 -15
- package/dist/setup-guide/setup-guide.js +1 -0
- package/dist/setup-guide/web/ds-setup-guide.d.ts +5 -2
- package/dist/setup-guide/web/ds-setup-guide.js +12 -17
- package/dist/sheet/native/ds-sheet.d.ts +2 -2
- package/dist/sheet/native/ds-sheet.js +2 -2
- package/dist/sheet/sheet.d.ts +15 -15
- package/dist/sheet/sheet.js +2 -2
- package/dist/sheet/web/ds-sheet.d.ts +3 -3
- package/dist/sheet/web/ds-sheet.js +4 -2
- package/dist/side-nav/side-nav.d.ts +38 -38
- package/dist/side-nav/web/ds-side-nav-header.d.ts +1 -1
- package/dist/side-nav/web/ds-side-nav-menu.d.ts +4 -4
- package/dist/side-nav/web/ds-side-nav-notifications.d.ts +3 -3
- package/dist/side-nav/web/ds-side-nav-notifications.js +2 -1
- package/dist/side-nav/web/ds-side-nav-primary.d.ts +2 -2
- package/dist/side-nav/web/ds-side-nav-primary.js +1 -1
- package/dist/side-nav/web/ds-side-nav-profile.d.ts +2 -2
- package/dist/side-nav/web/ds-side-nav-profile.js +2 -1
- package/dist/side-nav/web/ds-side-nav-search.d.ts +1 -1
- package/dist/side-nav/web/ds-side-nav-search.js +1 -1
- package/dist/side-nav/web/ds-side-nav.d.ts +11 -11
- package/dist/side-nav/web/ds-side-nav.js +8 -7
- package/dist/skeleton/native/ds-skeleton.js +10 -8
- package/dist/skeleton/skeleton.d.ts +25 -25
- package/dist/skeleton/skeleton.js +15 -15
- package/dist/skeleton/web/ds-skeleton.js +44 -20
- package/dist/slider/native/ds-slider.js +3 -2
- package/dist/slider/slider.d.ts +6 -6
- package/dist/slider/web/ds-slider.js +2 -2
- package/dist/small-multiples/small-multiples.d.ts +49 -0
- package/dist/small-multiples/small-multiples.js +40 -0
- package/dist/small-multiples/web/ds-small-multiples.d.ts +10 -0
- package/dist/small-multiples/web/ds-small-multiples.js +21 -0
- package/dist/sparkline/sparkline.d.ts +8 -4
- package/dist/sparkline/sparkline.js +2 -2
- package/dist/sparkline/web/ds-sparkline.js +0 -2
- package/dist/spinner/spinner.d.ts +3 -3
- package/dist/split-pane/split-pane.d.ts +13 -13
- package/dist/split-pane/web/ds-split-pane.d.ts +2 -2
- package/dist/split-pane/web/ds-split-pane.js +3 -3
- package/dist/stat-tile/native/ds-stat-tile.d.ts +1 -1
- package/dist/stat-tile/native/ds-stat-tile.js +5 -7
- package/dist/stat-tile/stat-tile.d.ts +14 -12
- package/dist/stat-tile/stat-tile.js +5 -4
- package/dist/stat-tile/web/ds-stat-tile.d.ts +5 -2
- package/dist/stat-tile/web/ds-stat-tile.js +6 -5
- package/dist/state-message/state-message.d.ts +1 -1
- package/dist/state-message/state-message.js +7 -1
- package/dist/state-message/web/ds-state-message.js +1 -1
- package/dist/status-badge/native/ds-status-badge.js +2 -2
- package/dist/status-badge/status-badge.d.ts +3 -3
- package/dist/status-badge/web/ds-status-badge.d.ts +6 -6
- package/dist/status-badge/web/ds-status-badge.js +2 -2
- package/dist/status-cell/web/ds-status-cell.d.ts +1 -1
- package/dist/status-cell/web/ds-status-cell.js +3 -2
- package/dist/status-control/status-control.d.ts +11 -9
- package/dist/status-control/status-control.js +1 -1
- package/dist/status-control/web/ds-status-control.d.ts +1 -1
- package/dist/status-control/web/ds-status-control.js +3 -3
- package/dist/status-dot/native/ds-status-dot.d.ts +1 -1
- package/dist/status-dot/native/ds-status-dot.js +4 -2
- package/dist/status-dot/status-dot.d.ts +11 -11
- package/dist/status-dot/web/ds-status-dot.d.ts +1 -1
- package/dist/status-dot/web/ds-status-dot.js +4 -2
- package/dist/status-vocabularies.d.ts +2 -2
- package/dist/stepper-form/stepper-form.d.ts +7 -7
- package/dist/stepper-form/web/ds-stepper-form.d.ts +3 -3
- package/dist/stepper-form/web/ds-stepper-form.js +3 -2
- package/dist/steps/steps.d.ts +20 -7
- package/dist/steps/steps.js +2 -1
- package/dist/steps/web/ds-steps.d.ts +1 -1
- package/dist/steps/web/ds-steps.js +58 -15
- package/dist/stick-chart/stick-chart.d.ts +2 -2
- package/dist/stick-chart/web/ds-stick-chart.d.ts +2 -2
- package/dist/stick-chart/web/ds-stick-chart.js +13 -10
- package/dist/switch/switch.d.ts +2 -2
- package/dist/switch/web/ds-switch.js +1 -1
- package/dist/system-state/system-state.d.ts +1 -1
- package/dist/system-state/web/ds-system-state.d.ts +1 -1
- package/dist/system-state/web/ds-system-state.js +2 -1
- package/dist/table-toolbar/web/ds-table-toolbar.d.ts +3 -4
- package/dist/table-toolbar/web/ds-table-toolbar.js +20 -4
- package/dist/tabs/tabs.d.ts +10 -6
- package/dist/tabs/tabs.js +13 -4
- package/dist/tabs/web/ds-tabs.d.ts +1 -1
- package/dist/tabs/web/ds-tabs.js +9 -6
- package/dist/task/web/ds-task-editor.d.ts +3 -3
- package/dist/task/web/ds-task-editor.js +2 -2
- package/dist/task-shell/task-shell.d.ts +17 -13
- package/dist/task-shell/task-shell.js +2 -1
- package/dist/task-shell/web/ds-task-shell.d.ts +9 -9
- package/dist/task-shell/web/ds-task-shell.js +12 -5
- package/dist/text/native/ds-text.d.ts +5 -1
- package/dist/text/native/ds-text.js +12 -10
- package/dist/text/text.d.ts +88 -46
- package/dist/text/text.js +76 -41
- package/dist/text/web/ds-text.d.ts +1 -1
- package/dist/text/web/ds-text.js +16 -10
- package/dist/textarea/native/ds-textarea.js +7 -6
- package/dist/textarea/web/ds-textarea.js +10 -8
- package/dist/time-range/time-range.d.ts +8 -4
- package/dist/time-range/web/ds-time-range.d.ts +1 -1
- package/dist/time-range/web/ds-time-range.js +23 -9
- package/dist/timeline/native/ds-timeline.d.ts +1 -1
- package/dist/timeline/native/ds-timeline.js +6 -4
- package/dist/timeline/timeline.d.ts +9 -9
- package/dist/timeline/web/ds-timeline.d.ts +3 -3
- package/dist/timeline/web/ds-timeline.js +4 -3
- package/dist/toast/native/ds-toast.js +1 -1
- package/dist/toast/toast.d.ts +4 -4
- package/dist/toggle-group/toggle-group.d.ts +6 -6
- package/dist/token-roles.d.ts +2 -2
- package/dist/token-roles.js +21 -4
- package/dist/tone.d.ts +9 -9
- package/dist/tone.js +1 -1
- package/dist/toolbar/toolbar.d.ts +2 -2
- package/dist/toolbar/web/ds-toolbar.d.ts +1 -1
- package/dist/toolbar/web/ds-toolbar.js +1 -1
- package/dist/tooltip/tooltip.d.ts +11 -11
- package/dist/tooltip/tooltip.js +4 -4
- package/dist/tooltip/web/ds-tooltip.d.ts +4 -4
- package/dist/tooltip/web/ds-tooltip.js +1 -1
- package/dist/track-bars/track-bars.d.ts +49 -0
- package/dist/track-bars/track-bars.js +22 -0
- package/dist/track-bars/web/ds-track-bars.d.ts +8 -0
- package/dist/track-bars/web/ds-track-bars.js +24 -0
- package/dist/trail-line/trail-line.d.ts +12 -12
- package/dist/trail-line/trail-line.js +1 -1
- package/dist/trail-line/web/ds-trail-line.d.ts +2 -2
- package/dist/trail-line/web/ds-trail-line.js +13 -12
- package/dist/tree/tree.d.ts +11 -11
- package/dist/tree/web/ds-tree.d.ts +1 -1
- package/dist/tree/web/ds-tree.js +5 -4
- package/dist/treemap/treemap.d.ts +40 -0
- package/dist/treemap/treemap.js +74 -0
- package/dist/treemap/web/ds-treemap.d.ts +14 -0
- package/dist/treemap/web/ds-treemap.js +29 -0
- package/dist/trip-replay/trip-replay.d.ts +12 -12
- package/dist/trip-replay/web/ds-trip-replay.d.ts +1 -1
- package/dist/trip-replay/web/ds-trip-replay.js +2 -1
- package/dist/two-line-cell/web/ds-two-line-cell.js +1 -1
- package/dist/value-row/native/ds-value-row.js +7 -2
- package/dist/value-row/value-row.d.ts +3 -3
- package/dist/vehicle-marker/vehicle-marker.d.ts +10 -10
- package/dist/vehicle-marker/web/ds-vehicle-marker.d.ts +1 -1
- package/dist/vehicle-marker/web/ds-vehicle-marker.js +4 -2
- package/dist/waterfall-chart/waterfall-chart.d.ts +55 -0
- package/dist/waterfall-chart/waterfall-chart.js +44 -0
- package/dist/waterfall-chart/web/ds-waterfall-chart.d.ts +14 -0
- package/dist/waterfall-chart/web/ds-waterfall-chart.js +31 -0
- package/dist/web.d.ts +36 -2
- package/dist/web.js +18 -1
- package/dist/week-schedule/web/ds-week-schedule.d.ts +1 -1
- package/dist/week-schedule/web/ds-week-schedule.js +5 -4
- package/dist/week-schedule/week-schedule.d.ts +4 -4
- package/dist/week-schedule/week-schedule.js +5 -2
- package/forced-colors.css +35 -35
- package/package.json +4 -4
- package/styles.css +2 -2
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ In your CSS entry point, import Tailwind first, then this package's stylesheet:
|
|
|
47
47
|
@import "@tfn-design/design-system/styles.css";
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
That's the whole step. `styles.css` brings the tokens, every brand pack, the dark variant and the forced-colours rules
|
|
50
|
+
That's the whole step. `styles.css` brings the tokens, every brand pack, the dark variant and the forced-colours rules and it tells Tailwind to scan the package's components (`@source "./dist"`), so you don't add an `@source` of your own. Tailwind compiles a class only if it sees it. Without that scan, the components render unstyled and nothing reports an error.
|
|
51
51
|
|
|
52
52
|
Dark mode is a `.dark` class on an ancestor. A brand is `data-brand="<brand>"` on an ancestor.
|
|
53
53
|
|
|
@@ -65,7 +65,7 @@ The root entry, `@tfn-design/design-system`, holds the platform-neutral contract
|
|
|
65
65
|
|
|
66
66
|
### Data table
|
|
67
67
|
|
|
68
|
-
`DSDataTable` and its cells (from the web entry) run on DevExtreme, which your app installs and licenses itself. An app without a table
|
|
68
|
+
`DSDataTable` and its cells (from the web entry) run on DevExtreme, which your app installs and licenses itself. An app without a table and every native app, needs neither package.
|
|
69
69
|
|
|
70
70
|
```sh
|
|
71
71
|
pnpm add devextreme@^26.1.5 devextreme-react@^26.1.5
|
|
@@ -93,7 +93,7 @@ pnpm add devextreme@^26.1.5 devextreme-react@^26.1.5
|
|
|
93
93
|
|
|
94
94
|
### CSS
|
|
95
95
|
|
|
96
|
-
Don't import `styles.css` on native: its brand packs are attribute selectors
|
|
96
|
+
Don't import `styles.css` on native: its brand packs are attribute selectors and React Native has no DOM to match them. In the global CSS file NativeWind's Metro config points at, import the tokens' theme and scan the package:
|
|
97
97
|
|
|
98
98
|
```css
|
|
99
99
|
@import "@tfn-design/design-tokens/theme.css";
|
|
@@ -4,7 +4,7 @@ export type AccordionOpenSet = readonly number[];
|
|
|
4
4
|
/** What actually opens, given what was asked for. */
|
|
5
5
|
export declare function normaliseAccordionOpen(requested: AccordionOpenSet, allowMultiple: boolean): number[];
|
|
6
6
|
/** Where a press leaves the accordion. Pressing an OPEN section closes it, in
|
|
7
|
-
* both modes
|
|
7
|
+
* both modes, a single-open accordion that cannot be fully closed traps a
|
|
8
8
|
* reader in whichever section they opened last. */
|
|
9
9
|
export declare function toggleAccordion(open: AccordionOpenSet, index: number, allowMultiple: boolean): number[];
|
|
10
10
|
export type AccordionSurfaceRole = Extract<TokenRole, 'card'>;
|
|
@@ -37,7 +37,7 @@ export interface AccordionContract {
|
|
|
37
37
|
expanded: AccordionOpenSet;
|
|
38
38
|
/** Called with the open set a press leads to. */
|
|
39
39
|
onExpandedChange: (expanded: number[]) => void;
|
|
40
|
-
/** Let sections open independently. Off by default
|
|
40
|
+
/** Let sections open independently. Off by default, see the header. */
|
|
41
41
|
allowMultiple?: Forwarded<boolean>;
|
|
42
42
|
/** Drop the outer border, for an accordion inside something that has one. */
|
|
43
43
|
flat?: Forwarded<boolean>;
|
|
@@ -2,16 +2,23 @@ import type { ComponentProps, ReactNode } from 'react';
|
|
|
2
2
|
import { type AccordionContract } from '../accordion';
|
|
3
3
|
export interface DSAccordionItem {
|
|
4
4
|
title: string;
|
|
5
|
-
/** A quiet line under the title
|
|
5
|
+
/** A quiet line under the title, a count, or a summary of what the section
|
|
6
6
|
* holds while it is closed, which is what makes a closed section useful. */
|
|
7
7
|
subtitle?: string;
|
|
8
8
|
/** An icon or image after the chevron that helps identify the section. */
|
|
9
9
|
leading?: ReactNode;
|
|
10
|
-
/** Quiet meta beside the title row
|
|
10
|
+
/** Quiet meta beside the title row, a badge or a count. Not interactive. */
|
|
11
11
|
trailing?: ReactNode;
|
|
12
|
-
/** Buttons or links acting on this section, at the row's end
|
|
12
|
+
/** Buttons or links acting on this section, at the row's end, two at most, an overflow menu for the rest. */
|
|
13
13
|
actions?: ReactNode;
|
|
14
14
|
children: ReactNode;
|
|
15
|
+
/** A section that cannot be opened or closed for now, no access, or nothing
|
|
16
|
+
* in it yet. It stays in the list so the reader knows it exists; the
|
|
17
|
+
* button is disabled, so Tab skips it and a press does nothing. An open
|
|
18
|
+
* disabled section stays open while the reader reads it. In a one-open
|
|
19
|
+
* accordion, opening another section closes it, as it would any section;
|
|
20
|
+
* with `allowMultiple` it stays open beside the new one. */
|
|
21
|
+
disabled?: boolean;
|
|
15
22
|
}
|
|
16
23
|
/** The level of the heading each section's button sits in. */
|
|
17
24
|
export type DSAccordionHeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
@@ -9,20 +9,49 @@ const HEADER_FOCUS = 'focusable rounded-card focus-visible:-outline-offset-2 foc
|
|
|
9
9
|
const HEADER_PRESSED = 'has-[[aria-expanded]:active]:bg-linear-to-b has-[[aria-expanded]:active]:from-surface-pressed has-[[aria-expanded]:active]:to-surface-pressed';
|
|
10
10
|
const HEADER_STATES = 'hover:bg-linear-to-b hover:from-surface-hover hover:to-surface-hover ' + HEADER_PRESSED;
|
|
11
11
|
const SECTION_OPEN = 'bg-accent';
|
|
12
|
+
const HEADER_ATTR = 'data-accordion-header';
|
|
13
|
+
const MOVES = {
|
|
14
|
+
ArrowDown: (at, last) => (at >= last ? 0 : at + 1),
|
|
15
|
+
ArrowUp: (at, last) => (at <= 0 ? last : at - 1),
|
|
16
|
+
Home: () => 0,
|
|
17
|
+
End: (_at, last) => last,
|
|
18
|
+
};
|
|
12
19
|
export function DSAccordion({ items, expanded, onExpandedChange, allowMultiple = false, flat = false, separate = false, headingLevel = 3, className, ...props }) {
|
|
13
20
|
const spec = accordionSpec(flat, separate);
|
|
14
21
|
const id = useId();
|
|
15
22
|
const open = normaliseAccordionOpen(expanded, allowMultiple);
|
|
23
|
+
const onHeaderKeyDown = (event) => {
|
|
24
|
+
if (event.ctrlKey || event.metaKey || event.altKey || event.shiftKey)
|
|
25
|
+
return;
|
|
26
|
+
const move = MOVES[event.key];
|
|
27
|
+
if (move === undefined)
|
|
28
|
+
return;
|
|
29
|
+
const headers = [
|
|
30
|
+
...(event.currentTarget
|
|
31
|
+
.closest('[data-accordion-root]')
|
|
32
|
+
?.querySelectorAll(`[${HEADER_ATTR}="${id}"]:not(:disabled)`) ?? []),
|
|
33
|
+
];
|
|
34
|
+
const at = headers.indexOf(event.currentTarget);
|
|
35
|
+
if (at < 0)
|
|
36
|
+
return;
|
|
37
|
+
event.preventDefault();
|
|
38
|
+
headers[move(at, headers.length - 1)]?.focus();
|
|
39
|
+
};
|
|
16
40
|
return (_jsx("div", { className: cn('w-full', spec.separate
|
|
17
41
|
? 'flex flex-col gap-3'
|
|
18
|
-
: cn('overflow-hidden', SURFACE[spec.surface], spec.raised && 'rounded-card shadow-low'), className), ...props, children: items.map((item, index) => {
|
|
42
|
+
: cn('overflow-hidden', SURFACE[spec.surface], spec.raised && 'rounded-card shadow-low'), className), ...props, "data-accordion-root": "", children: items.map((item, index) => {
|
|
19
43
|
const isOpen = open.includes(index);
|
|
44
|
+
const isDisabled = item.disabled === true;
|
|
20
45
|
const panelId = `${id}-panel-${String(index)}`;
|
|
21
46
|
const headerId = `${id}-header-${String(index)}`;
|
|
22
47
|
return (_jsxs("div", { ...(spec.separate ? { 'data-accordion-card': '' } : {}), className: spec.separate
|
|
23
|
-
? cn('overflow-hidden rounded-card shadow-low', SURFACE[spec.surface], isOpen && SECTION_OPEN)
|
|
24
|
-
: cn(index > 0 && 'border-t border-border-subtle', isOpen && SECTION_OPEN), children: [_jsxs("div", { "data-open": isOpen ? '' : undefined, className: cn('flex items-center gap-2 pe-4 transition-control', isOpen ? HEADER_PRESSED : HEADER_STATES), children: [_jsx("div", { role: "heading", "aria-level": headingLevel, className: "flex min-w-0 flex-1", children: _jsxs("button", { type: "button", id: headerId, "aria-expanded": isOpen, "aria-controls": panelId, onClick: () => {
|
|
48
|
+
? cn('overflow-hidden rounded-card shadow-low', SURFACE[spec.surface], isOpen && [SECTION_OPEN, 'accordion-open'])
|
|
49
|
+
: cn(index > 0 && 'border-t border-border-subtle', isOpen && [SECTION_OPEN, 'accordion-open']), children: [_jsxs("div", { "data-open": isOpen ? '' : undefined, className: cn('flex items-center gap-2 pe-4 transition-control', isDisabled ? undefined : isOpen ? HEADER_PRESSED : HEADER_STATES), children: [_jsx("div", { role: "heading", "aria-level": headingLevel, className: "flex min-w-0 flex-1", children: _jsxs("button", { type: "button", id: headerId, "aria-expanded": isOpen, "aria-controls": panelId, disabled: isDisabled, [HEADER_ATTR]: id, onKeyDown: onHeaderKeyDown, onClick: () => {
|
|
25
50
|
onExpandedChange(toggleAccordion(open, index, allowMultiple));
|
|
26
|
-
}, className: cn(HEADER_FOCUS, 'flex min-w-0 flex-1 items-center gap-3 py-3 ps-4 text-start'), children: [_jsx(ChevronRight, { size: 16, "aria-hidden": true, className: cn('shrink-0 transition-control', isOpen
|
|
51
|
+
}, className: cn(HEADER_FOCUS, 'flex min-w-0 flex-1 items-center gap-3 py-3 ps-4 text-start', 'enabled:cursor-pointer disabled:cursor-not-allowed'), children: [_jsx(ChevronRight, { size: 16, "aria-hidden": true, className: cn('shrink-0 transition-control', isOpen && 'rotate-90', isDisabled
|
|
52
|
+
? 'text-disabled-foreground'
|
|
53
|
+
: isOpen
|
|
54
|
+
? 'accordion-open-chevron'
|
|
55
|
+
: 'text-muted-foreground') }), item.leading, _jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx(DSText, { as: "span", variant: "heading-sm", tone: isDisabled ? 'disabled' : 'default', className: "truncate", children: item.title }), item.subtitle !== undefined && (_jsx(DSText, { variant: "body-sm", tone: isDisabled ? 'disabled' : 'muted', className: "truncate", children: item.subtitle }))] }), item.trailing] }) }), item.actions !== undefined && (_jsx("div", { className: "flex shrink-0 items-center gap-1", children: item.actions }))] }), _jsx("div", { id: panelId, role: "region", "aria-labelledby": headerId, hidden: !isOpen, children: _jsx("div", { className: "pb-4 ps-11 pe-4", children: item.children }) })] }, item.title));
|
|
27
56
|
}) }));
|
|
28
57
|
}
|
|
@@ -2,18 +2,18 @@ export declare const PASSWORD_POLICY_READINGS: readonly ["caption", "checklist"]
|
|
|
2
2
|
export type PasswordPolicyReading = (typeof PASSWORD_POLICY_READINGS)[number];
|
|
3
3
|
export declare const PASSWORD_POLICY_DEFAULT_READING: PasswordPolicyReading;
|
|
4
4
|
export interface AccountPasswordFieldContract {
|
|
5
|
-
/** THE FIELD'S OWN LABEL
|
|
5
|
+
/** THE FIELD'S OWN LABEL and it is required.
|
|
6
6
|
*
|
|
7
7
|
* Defaulting it to "Password" is the obvious shape and is not what this
|
|
8
8
|
* does, for the reason every other user-facing string in this package is
|
|
9
|
-
* required: an English default is a string nobody remembers to replace
|
|
9
|
+
* required: an English default is a string nobody remembers to replace and
|
|
10
10
|
* a product that translates would ship it untranslated on the one screen
|
|
11
11
|
* nobody re-reads.
|
|
12
12
|
*
|
|
13
13
|
* It being here at all is the accessibility gate's finding rather than mine.
|
|
14
14
|
* A first draft left labelling to the caller, which is defensible for a bare
|
|
15
15
|
* input and wrong for a molecule that already owns the field, its policy and
|
|
16
|
-
* its message
|
|
16
|
+
* its message, a caller composing all three and then having to remember the
|
|
17
17
|
* label is a caller who will forget it. */
|
|
18
18
|
label: string;
|
|
19
19
|
value: string;
|
|
@@ -30,7 +30,7 @@ export interface AccountPasswordFieldContract {
|
|
|
30
30
|
}
|
|
31
31
|
export interface AccountPasswordFieldResolvedSpec {
|
|
32
32
|
reading: PasswordPolicyReading;
|
|
33
|
-
/** The caption's line, or undefined when there is nothing to say
|
|
33
|
+
/** The caption's line, or undefined when there is nothing to say, which
|
|
34
34
|
* includes every checklist case, because the rows already say it. */
|
|
35
35
|
caption: string | undefined;
|
|
36
36
|
/** Whether the policy is met. What a caller gates its submit on. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AccountPasswordFieldContract } from '../account-password-field';
|
|
2
2
|
import { type DSPasswordInputProps } from '../../password-input/web/ds-password-input';
|
|
3
|
-
export type DSAccountPasswordFieldProps = Omit<DSPasswordInputProps, 'value' | 'onChange' | 'disabled' | 'invalid'> & AccountPasswordFieldContract;
|
|
4
|
-
/** The field you SET an account password in
|
|
3
|
+
export type DSAccountPasswordFieldProps = Omit<DSPasswordInputProps, 'value' | 'onChange' | 'disabled' | 'invalid' | 'autoComplete'> & AccountPasswordFieldContract;
|
|
4
|
+
/** The field you SET an account password in, not the one you sign in with. */
|
|
5
5
|
export declare function DSAccountPasswordField({ label, value, onValueChange, reading, attempted, emptyMessage, disabled, className, ...props }: DSAccountPasswordFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -21,5 +21,5 @@ export function DSAccountPasswordField({ label, value, onValueChange, reading, a
|
|
|
21
21
|
? {
|
|
22
22
|
below: (_jsx(DSPasswordRequirements, { id: requirementsId, value: value, attempted: attempted })),
|
|
23
23
|
}
|
|
24
|
-
: {}), children: _jsx(DSPasswordInput, { ...props, ...(describedBy === '' ? {} : { 'aria-describedby': describedBy }), ...(refused ? { invalid: true } : {}), value: value, disabled: disabled, onValueChange: onValueChange }) }));
|
|
24
|
+
: {}), children: _jsx(DSPasswordInput, { ...props, autoComplete: "new-password", ...(describedBy === '' ? {} : { 'aria-describedby': describedBy }), ...(refused ? { invalid: true } : {}), value: value, disabled: disabled, onValueChange: onValueChange }) }));
|
|
25
25
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TokenRole } from '../token-roles';
|
|
2
2
|
export interface AccountSwitcherItem {
|
|
3
|
-
/** What `onSelect` receives. Never the label
|
|
3
|
+
/** What `onSelect` receives. Never the label, a label is translated. */
|
|
4
4
|
key: string;
|
|
5
5
|
label: string;
|
|
6
6
|
/** Marks a row that opens a further panel rather than doing something. The
|
|
@@ -12,7 +12,7 @@ export interface AccountSwitcherItem {
|
|
|
12
12
|
current?: boolean;
|
|
13
13
|
}
|
|
14
14
|
/** A run of rows. Groups are separated by a rule, which is the only thing
|
|
15
|
-
* separating them
|
|
15
|
+
* separating them, a group has no heading, because the panel is short enough
|
|
16
16
|
* that naming each run would be louder than the runs. */
|
|
17
17
|
export interface AccountSwitcherGroup {
|
|
18
18
|
key: string;
|
|
@@ -21,18 +21,18 @@ export interface AccountSwitcherGroup {
|
|
|
21
21
|
export interface AccountSwitcherResolvedSpec {
|
|
22
22
|
/** The panel's fill. `DSPopover` paints its own; this is the trigger's. */
|
|
23
23
|
surface: Extract<TokenRole, 'background'>;
|
|
24
|
-
/** The trigger under a pointer
|
|
24
|
+
/** The trigger under a pointer and a row under one. The same `muted` a nav
|
|
25
25
|
* row takes, so a hover looks the same down the whole column. */
|
|
26
26
|
hover: Extract<TokenRole, 'muted'>;
|
|
27
|
-
/** The account's name
|
|
27
|
+
/** The account's name and a row's label. */
|
|
28
28
|
ink: Extract<TokenRole, 'foreground'>;
|
|
29
29
|
/** The second line, under the name. */
|
|
30
30
|
quiet: Extract<TokenRole, 'muted-foreground'>;
|
|
31
|
-
/** A row's leading glyph
|
|
31
|
+
/** A row's leading glyph and the submenu mark. */
|
|
32
32
|
glyph: Extract<TokenRole, 'muted-foreground'>;
|
|
33
33
|
rule: Extract<TokenRole, 'border-subtle'>;
|
|
34
34
|
}
|
|
35
|
-
/** The one recipe this concern has
|
|
35
|
+
/** The one recipe this concern has, no size or tone axis, on the same terms
|
|
36
36
|
* `sideNavSpec()` and `panelSpec()` take no arguments. */
|
|
37
37
|
export declare function accountSwitcherSpec(): AccountSwitcherResolvedSpec;
|
|
38
38
|
export declare const ACCOUNT_SWITCHER_ROW_TINT_INK = "foreground";
|
|
@@ -55,7 +55,7 @@ export declare function accountSwitcherRowSpec(current: boolean): AccountSwitche
|
|
|
55
55
|
export declare const ACCOUNT_SWITCHER_TRIGGER_MARK_PX = 32;
|
|
56
56
|
export declare const ACCOUNT_SWITCHER_PANEL_MARK_PX = 44;
|
|
57
57
|
/** The panel's width. It is set rather than inherited from the trigger: the
|
|
58
|
-
* nav is resizable between 200 and 360
|
|
58
|
+
* nav is resizable between 200 and 360 and a panel that grew with it would
|
|
59
59
|
* re-line its own centred block every time somebody dragged the edge. The
|
|
60
60
|
* popover is as wide as this content (`width="content"`); in the popover's
|
|
61
61
|
* fixed 340px it sat to one side with a 40px gap on its right. */
|
|
@@ -7,7 +7,7 @@ export interface DSAccountSwitcherItemView {
|
|
|
7
7
|
submenu?: boolean;
|
|
8
8
|
/** The account the page is showing, in a run of accounts to switch between. */
|
|
9
9
|
current?: boolean;
|
|
10
|
-
/** Rendered verbatim, never cloned and never given a className
|
|
10
|
+
/** Rendered verbatim, never cloned and never given a className, the same
|
|
11
11
|
* contract `DSSideNav` makes with a destination's icon. */
|
|
12
12
|
icon?: ReactNode;
|
|
13
13
|
}
|
|
@@ -17,7 +17,7 @@ export interface DSAccountSwitcherGroupView extends Omit<AccountSwitcherGroup, '
|
|
|
17
17
|
export type DSAccountSwitcherProps = Omit<ComponentProps<'div'>, 'children' | 'role' | 'aria-label' | 'aria-expanded' | 'aria-haspopup' | 'onSelect'> & {
|
|
18
18
|
/** The account the page is showing. Supplies the mark's initials too. */
|
|
19
19
|
name: string;
|
|
20
|
-
/** The line under it
|
|
20
|
+
/** The line under it, who is signed in, or which environment this is.
|
|
21
21
|
* `Forwarded` so a caller may pass one straight through: under
|
|
22
22
|
* `exactOptionalPropertyTypes` a plain `string?` refuses `undefined`, which
|
|
23
23
|
* is what a caller forwarding its own optional prop is holding. */
|
|
@@ -26,11 +26,11 @@ export type DSAccountSwitcherProps = Omit<ComponentProps<'div'>, 'children' | 'r
|
|
|
26
26
|
open: boolean;
|
|
27
27
|
onOpenChange: (open: boolean) => void;
|
|
28
28
|
onSelect: (key: string) => void;
|
|
29
|
-
/** The one action that is not a row
|
|
29
|
+
/** The one action that is not a row, the way out of this account. Rendered
|
|
30
30
|
* full-width above the groups: a thing that leaves is easiest to find at
|
|
31
|
-
* the top
|
|
31
|
+
* the top and the full width marks it as not one of the accounts listed
|
|
32
32
|
* below it. */
|
|
33
33
|
action?: ReactNode;
|
|
34
34
|
};
|
|
35
|
-
/** The account a page is showing
|
|
35
|
+
/** The account a page is showing and the panel for becoming another one. */
|
|
36
36
|
export declare function DSAccountSwitcher({ name, subtitle, groups, open, onOpenChange, onSelect, action, className, ...props }: DSAccountSwitcherProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -18,13 +18,13 @@ export function DSAccountSwitcher({ name, subtitle, groups, open, onOpenChange,
|
|
|
18
18
|
const spec = accountSwitcherSpec();
|
|
19
19
|
const trigger = (_jsxs("button", { type: "button", onClick: () => {
|
|
20
20
|
onOpenChange(!open);
|
|
21
|
-
}, className: cn('focusable transition-control flex w-full min-w-0 items-center gap-2 rounded-
|
|
21
|
+
}, className: cn('focusable transition-control flex w-full min-w-0 items-center gap-2 rounded-field p-2 text-start', HOVER[spec.hover], open && OPEN_SURFACE[spec.hover]), children: [_jsx(DSAvatar, { "aria-hidden": true, shape: "square", name: name, size: ACCOUNT_SWITCHER_TRIGGER_MARK_PX }), _jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx(DSText, { variant: "label-md", className: "break-words", children: name }), subtitle !== undefined && (_jsx(DSText, { variant: "body-sm", tone: "muted", className: "break-words", children: subtitle }))] }), open ? (_jsx(ChevronUp, { size: 16, "aria-hidden": true, className: cn('shrink-0', GLYPH[spec.glyph]) })) : (_jsx(ChevronDown, { size: 16, "aria-hidden": true, className: cn('shrink-0', GLYPH[spec.glyph]) }))] }));
|
|
22
22
|
return (_jsx(DSPopover, { open: open, label: name, onRequestClose: () => {
|
|
23
23
|
onOpenChange(false);
|
|
24
|
-
}, trigger: trigger, width: "content", className: cn('min-w-0', className), ...props, children: _jsxs("div", { className: "flex flex-col gap-4", style: { width: ACCOUNT_SWITCHER_PANEL_WIDTH_PX }, children: [_jsxs("div", { className: "flex flex-col items-center gap-2 pt-2 text-center", children: [_jsx(DSAvatar, { "aria-hidden": true, shape: "square", name: name, size: ACCOUNT_SWITCHER_PANEL_MARK_PX }), _jsxs("span", { className: "flex flex-col", children: [_jsx(DSText, { variant: "label", children: name }), subtitle !== undefined && (_jsx(DSText, { variant: "
|
|
24
|
+
}, trigger: trigger, width: "content", className: cn('min-w-0', className), ...props, children: _jsxs("div", { className: "flex flex-col gap-4", style: { width: ACCOUNT_SWITCHER_PANEL_WIDTH_PX }, children: [_jsxs("div", { className: "flex flex-col items-center gap-2 pt-2 text-center", children: [_jsx(DSAvatar, { "aria-hidden": true, shape: "square", name: name, size: ACCOUNT_SWITCHER_PANEL_MARK_PX }), _jsxs("span", { className: "flex flex-col", children: [_jsx(DSText, { variant: "label-md", children: name }), subtitle !== undefined && (_jsx(DSText, { variant: "body-sm", tone: "muted", children: subtitle }))] })] }), action !== undefined && _jsx("div", { className: "w-full max-w-action", children: action }), groups.map((group, index) => (_jsxs("div", { className: "flex flex-col", children: [index > 0 && _jsx(DSDivider, { className: "mb-2" }), _jsx("ul", { className: "m-0 flex list-none flex-col p-0", children: group.items.map((item) => {
|
|
25
25
|
const row = accountSwitcherRowSpec(item.current === true);
|
|
26
26
|
return (_jsx("li", { children: _jsxs("button", { type: "button", onClick: () => {
|
|
27
27
|
onSelect(item.key);
|
|
28
|
-
}, ...(row.emphasised ? { 'aria-current': 'true' } : {}), className: cn('focusable transition-control flex w-full items-center gap-3 rounded-
|
|
28
|
+
}, ...(row.emphasised ? { 'aria-current': 'true' } : {}), className: cn('focusable transition-control flex w-full items-center gap-3 rounded-field', 'px-2 py-2 text-start pointer-coarse:min-h-touch', row.emphasised ? CURRENT_ROW : RESTING_ROW), children: [item.icon !== undefined && (_jsx("span", { "aria-hidden": true, className: cn('grid shrink-0 place-items-center', row.emphasised ? CURRENT_INK : GLYPH[spec.glyph]), children: item.icon })), _jsx(DSText, { variant: "body-md", ...(row.emphasised ? { tone: 'brand' } : {}), className: cn('min-w-0 flex-1 truncate', row.emphasised && 'font-semibold'), children: item.label }), item.submenu === true && (_jsx(ChevronRight, { size: 16, "aria-hidden": true, className: cn('shrink-0', GLYPH[spec.glyph]) }))] }) }, item.key));
|
|
29
29
|
}) })] }, group.key)))] }) }));
|
|
30
30
|
}
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
* TEN, AND THE SOURCE ARGUES FOR IT: "three screens tell the reader it is ten.
|
|
4
4
|
* A product that misstates its own undo window teaches people not to trust the
|
|
5
5
|
* next number it prints." Its CSS comment still says six and is the stale half
|
|
6
|
-
* of that pair
|
|
6
|
+
* of that pair, recorded here so the next reader who finds the two does not
|
|
7
7
|
* have to re-derive which one won. */
|
|
8
8
|
export declare const ACTION_TOAST_DISMISS_MS = 10000;
|
|
9
9
|
/** The Undo button's words when the caller gives none. A constant rather than a
|
|
10
10
|
* default in the adapter's parameters, so there is one place to find the English. */
|
|
11
11
|
export declare const ACTION_TOAST_UNDO_LABEL = "Undo";
|
|
12
|
-
/** A button beside the message. `Undo` is not one of these
|
|
12
|
+
/** A button beside the message. `Undo` is not one of these, it has its own slot
|
|
13
13
|
* and its own weight; see `ActionToastContract`. */
|
|
14
14
|
export interface ActionToastAction {
|
|
15
15
|
label: string;
|
|
16
16
|
run: () => void;
|
|
17
17
|
}
|
|
18
|
-
/** The roles this concern uses. The plate is `foreground` used INVERTED
|
|
19
|
-
* made from the ink role
|
|
18
|
+
/** The roles this concern uses. The plate is `foreground` used INVERTED, a fill
|
|
19
|
+
* made from the ink role, which is the same interpretive read `toast.ts`
|
|
20
20
|
* already makes for the identical `--color-inverse-surface`. */
|
|
21
21
|
export type ActionToastSurfaceRole = 'heading-foreground';
|
|
22
22
|
export type ActionToastInkRole = 'background';
|
|
@@ -31,8 +31,8 @@ export declare const ACTION_TOAST_DEFAULT_SIZE: ActionToastSize;
|
|
|
31
31
|
export interface ActionToastSizeSpec {
|
|
32
32
|
/** Horizontal padding, as a spacing step. */
|
|
33
33
|
paddingX: 3 | 4 | 6;
|
|
34
|
-
/** Vertical padding. Smaller than the horizontal on every step
|
|
35
|
-
* line of text
|
|
34
|
+
/** Vertical padding. Smaller than the horizontal on every step, a toast is a
|
|
35
|
+
* line of text and a square-ish box around one line reads as a card. */
|
|
36
36
|
paddingY: 2 | 3 | 4;
|
|
37
37
|
/** Message to actions. Wide on purpose: the gap is what stops a destructive
|
|
38
38
|
* Undo being pressed by someone aiming at the message. */
|
|
@@ -70,9 +70,9 @@ export interface ActionToastResolvedSpec {
|
|
|
70
70
|
radius: ActionToastRadius;
|
|
71
71
|
size: ActionToastSizeSpec;
|
|
72
72
|
}
|
|
73
|
-
/** No TONE argument: this toast has none. The source gives it none
|
|
73
|
+
/** No TONE argument: this toast has none. The source gives it none and a
|
|
74
74
|
* confirmation that has to announce a severity is an alert. The size is a
|
|
75
|
-
* different axis
|
|
75
|
+
* different axis, it says how big, never what kind. */
|
|
76
76
|
export declare function actionToastSpec(size?: ActionToastSize): ActionToastResolvedSpec;
|
|
77
77
|
export interface ActionToastContract {
|
|
78
78
|
/** Controlled, like every other overlay here. */
|
|
@@ -83,14 +83,14 @@ export interface ActionToastContract {
|
|
|
83
83
|
/** The confirmation itself. `string`, not `ReactNode`: the line has no room
|
|
84
84
|
* for composed content and a toast that needs markup is the wrong component. */
|
|
85
85
|
children: string;
|
|
86
|
-
/** Fired when the toast takes itself down
|
|
86
|
+
/** Fired when the toast takes itself down, its timer running out, or an
|
|
87
87
|
* action being pressed. The caller owns `open`, so this is how it learns. */
|
|
88
88
|
onDismiss: () => void;
|
|
89
89
|
/** The one somebody grabs at. Rendered LAST and closest to the screen edge,
|
|
90
|
-
* per the source: it is the button under time pressure
|
|
90
|
+
* per the source: it is the button under time pressure and the extras can
|
|
91
91
|
* wait. Omitted renders no Undo. */
|
|
92
92
|
undo?: () => void;
|
|
93
|
-
/** The Undo button's words
|
|
93
|
+
/** The Undo button's words and what the live region says it is. Left out it
|
|
94
94
|
* reads `ACTION_TOAST_UNDO_LABEL`; a product in another language passes its
|
|
95
95
|
* own. It is optional only so the callers that predate it keep compiling. */
|
|
96
96
|
undoLabel?: string;
|
|
@@ -98,7 +98,7 @@ export interface ActionToastContract {
|
|
|
98
98
|
* and can also be added from the record whenever they get round to it." */
|
|
99
99
|
extras?: ActionToastAction[];
|
|
100
100
|
}
|
|
101
|
-
/** A toast with no words is not a toast this component can produce
|
|
101
|
+
/** A toast with no words is not a toast this component can produce, the same
|
|
102
102
|
* WCAG 1.4.1 check `assertStatusBadgeReadsAsWords` makes for the badge. */
|
|
103
103
|
export declare function assertActionToastReadsAsWords(children: string): boolean;
|
|
104
104
|
/** WHAT THE LIVE REGION SAYS: the message, then the words of the buttons, so a
|
|
@@ -4,19 +4,19 @@ export type DSActionToastProps = Omit<ComponentProps<'div'>, 'children' | 'role'
|
|
|
4
4
|
/**
|
|
5
5
|
* A confirmation for an action whose result is invisible, carrying the way back.
|
|
6
6
|
*
|
|
7
|
-
* IT LEAVES ON ITS OWN
|
|
7
|
+
* IT LEAVES ON ITS OWN and that is the component's argument for existing. The
|
|
8
8
|
* source states it plainly: "A confirmation that has to be dismissed is a second
|
|
9
9
|
* thing to do about a thing that already worked."
|
|
10
10
|
*
|
|
11
11
|
* THE CLOCK STANDS STILL WHILE IT IS BEING USED. Content that disappears on a
|
|
12
|
-
* clock engages WCAG 2.2.1
|
|
12
|
+
* clock engages WCAG 2.2.1 and a ten-second window with a button in it is
|
|
13
13
|
* exactly the case that guideline is about. The design draws no control for
|
|
14
14
|
* pausing and none is invented: the pause is the pointer resting on the plate or
|
|
15
15
|
* focus being inside it, which are the two ways somebody shows they are reading
|
|
16
|
-
* it or reaching for it. The countdown bar stops with the timer
|
|
16
|
+
* it or reaching for it. The countdown bar stops with the timer and the time
|
|
17
17
|
* already spent is not given back when it resumes. The other mitigations the
|
|
18
18
|
* source gives still hold: the window is ten seconds rather than the four some
|
|
19
|
-
* systems use, the action is always reachable from the record afterwards
|
|
19
|
+
* systems use, the action is always reachable from the record afterwards and the
|
|
20
20
|
* toast never carries anything that exists only here.
|
|
21
21
|
*
|
|
22
22
|
* ITS WORDS ARE SPOKEN BY A REGION THAT WAS ALREADY THERE. The visible plate used
|
|
@@ -28,4 +28,4 @@ export type DSActionToastProps = Omit<ComponentProps<'div'>, 'children' | 'role'
|
|
|
28
28
|
* focus returns to the control that was focused when it opened, if that control
|
|
29
29
|
* is still on the page. If it has gone, nothing is forced.
|
|
30
30
|
*/
|
|
31
|
-
export declare function DSActionToast({ open, size, children, onDismiss, undo, undoLabel, extras, className, onPointerEnter, onPointerLeave, onFocus, onBlur, ...props }: DSActionToastProps): import("react").ReactPortal;
|
|
31
|
+
export declare function DSActionToast({ open, size, children, onDismiss, undo, undoLabel, extras, className, onPointerEnter, onPointerLeave, onFocus, onBlur, onKeyDown, ...props }: DSActionToastProps): import("react").ReactPortal;
|
|
@@ -4,6 +4,7 @@ import { createPortal } from 'react-dom';
|
|
|
4
4
|
import { ACTION_TOAST_DISMISS_MS, ACTION_TOAST_UNDO_LABEL, actionToastAnnouncement, actionToastSpec, assertActionToastReadsAsWords, } from '../action-toast';
|
|
5
5
|
import { cn } from '../../lib/cn';
|
|
6
6
|
import { SpokenRegion } from '../../lib/web/spoken-region';
|
|
7
|
+
import { useEscapeEntry } from '../../lib/web/focus-habits';
|
|
7
8
|
import { COARSE_POINTER_TARGET } from '../../lib/web/touch-target';
|
|
8
9
|
import { DSText } from '../../text/web/ds-text';
|
|
9
10
|
const SURFACE = {
|
|
@@ -17,7 +18,7 @@ function partDelay(index) {
|
|
|
17
18
|
}
|
|
18
19
|
const SURFACE_BAR = { background: 'bg-background' };
|
|
19
20
|
const TRACK = { background: 'bg-background/20' };
|
|
20
|
-
const PLATE = 'fixed z-[var(--layer-toast)] flex max-w-prose items-center overflow-hidden shadow-medium';
|
|
21
|
+
const PLATE = 'fixed z-[var(--layer-toast)] flex max-w-prose items-center overflow-hidden shadow-medium forced-colors:outline forced-colors:outline-1';
|
|
21
22
|
const RADIUS = { overlay: 'rounded-card' };
|
|
22
23
|
const PAD_X = { 3: 'px-3', 4: 'px-4', 6: 'px-6' };
|
|
23
24
|
const PAD_Y = { 2: 'py-2', 3: 'py-3', 4: 'py-4' };
|
|
@@ -32,7 +33,7 @@ const INSET = {
|
|
|
32
33
|
8: 'bottom-8 left-8',
|
|
33
34
|
};
|
|
34
35
|
const BUTTON = cn('shrink-0 cursor-pointer underline focusable inline-flex items-center justify-center rounded-control -mx-2 px-2 py-1', COARSE_POINTER_TARGET.compact);
|
|
35
|
-
export function DSActionToast({ open, size, children, onDismiss, undo, undoLabel, extras, className, onPointerEnter, onPointerLeave, onFocus, onBlur, ...props }) {
|
|
36
|
+
export function DSActionToast({ open, size, children, onDismiss, undo, undoLabel, extras, className, onPointerEnter, onPointerLeave, onFocus, onBlur, onKeyDown, ...props }) {
|
|
36
37
|
const [portalNode] = useState(() => {
|
|
37
38
|
const node = document.createElement('div');
|
|
38
39
|
node.setAttribute('data-ds-overlay-host', '');
|
|
@@ -132,9 +133,10 @@ export function DSActionToast({ open, size, children, onDismiss, undo, undoLabel
|
|
|
132
133
|
};
|
|
133
134
|
}, [open, portalNode]);
|
|
134
135
|
const region = _jsx(SpokenRegion, { text: open ? spoken : '', "data-role": "toast-region" });
|
|
136
|
+
const escapeEntry = useEscapeEntry(open && !exiting && focused, onDismiss);
|
|
135
137
|
const readsAsWords = assertActionToastReadsAsWords(children);
|
|
136
138
|
if (!readsAsWords && process.env['NODE_ENV'] !== 'production' && (open || exiting)) {
|
|
137
|
-
console.error('DSActionToast: children must be a non-empty word
|
|
139
|
+
console.error('DSActionToast: children must be a non-empty word. A toast carries its meaning in the WORD (WCAG 1.4.1). Rendering nothing.');
|
|
138
140
|
}
|
|
139
141
|
if ((!open && !exiting) || !readsAsWords) {
|
|
140
142
|
return createPortal(_jsxs(_Fragment, { children: [region, null] }), portalNode);
|
|
@@ -161,6 +163,9 @@ export function DSActionToast({ open, size, children, onDismiss, undo, undoLabel
|
|
|
161
163
|
}
|
|
162
164
|
onBlur?.(event);
|
|
163
165
|
}
|
|
166
|
+
function handleKeyDown(event) {
|
|
167
|
+
onKeyDown?.(event);
|
|
168
|
+
}
|
|
164
169
|
function handlePointerEnter(event) {
|
|
165
170
|
setHovered(true);
|
|
166
171
|
onPointerEnter?.(event);
|
|
@@ -169,7 +174,7 @@ export function DSActionToast({ open, size, children, onDismiss, undo, undoLabel
|
|
|
169
174
|
setHovered(false);
|
|
170
175
|
onPointerLeave?.(event);
|
|
171
176
|
}
|
|
172
|
-
return createPortal(_jsxs(_Fragment, { children: [region, _jsxs("div", { ref: plateRef, "data-role": "toast", ...(exiting ? { inert: true } : {}), onAnimationEnd: finishExit, onPointerEnter: handlePointerEnter, onPointerLeave: handlePointerLeave, onFocus: handleFocus, onBlur: handleBlur, className: cn(PLATE, RADIUS[spec.radius], INSET[spec.size.inset], PAD_X[spec.size.paddingX], PAD_Y[spec.size.paddingY], GAP[spec.size.gap], TEXT[spec.size.text], exiting ? 'animate-toast-out' : 'animate-toast-in', SURFACE[spec.surface], INK[spec.ink], className), ...props, children: [_jsx(DSText, { className: cn('animate-toast-part', INK[spec.ink]), style: partDelay(0), children: children }), extras?.map((extra, index) => (_jsx("button", { type: "button", style: partDelay(index + 1), onClick: act(extra.run), className: cn(BUTTON, 'animate-toast-part'), children: extra.label }, extra.label))), showsWindow && (_jsx("div", { "data-role": "toast-window", "aria-hidden": true, className: cn('absolute inset-x-0 bottom-0 h-1 motion-reduce:hidden', TRACK[spec.ink]), children: _jsx("div", { style: {
|
|
177
|
+
return createPortal(_jsxs(_Fragment, { children: [region, escapeEntry, _jsxs("div", { ref: plateRef, "data-role": "toast", ...(exiting ? { inert: true } : {}), onAnimationEnd: finishExit, onPointerEnter: handlePointerEnter, onPointerLeave: handlePointerLeave, onFocus: handleFocus, onBlur: handleBlur, onKeyDown: handleKeyDown, className: cn(PLATE, RADIUS[spec.radius], INSET[spec.size.inset], PAD_X[spec.size.paddingX], PAD_Y[spec.size.paddingY], GAP[spec.size.gap], TEXT[spec.size.text], exiting ? 'animate-toast-out' : 'animate-toast-in', SURFACE[spec.surface], INK[spec.ink], className), ...props, children: [_jsx(DSText, { className: cn('animate-toast-part', INK[spec.ink]), style: partDelay(0), children: children }), extras?.map((extra, index) => (_jsx("button", { type: "button", style: partDelay(index + 1), onClick: act(extra.run), className: cn(BUTTON, 'animate-toast-part'), children: extra.label }, extra.label))), showsWindow && (_jsx("div", { "data-role": "toast-window", "aria-hidden": true, className: cn('absolute inset-x-0 bottom-0 h-1 motion-reduce:hidden', TRACK[spec.ink]), children: _jsx("div", { style: {
|
|
173
178
|
animation: `toast-drain ${String(ACTION_TOAST_DISMISS_MS)}ms linear forwards`,
|
|
174
179
|
animationPlayState: paused ? 'paused' : 'running',
|
|
175
180
|
}, className: cn('h-full w-full origin-left', SURFACE_BAR[spec.ink]) }) }, children)), undo !== undefined && (_jsx("button", { type: "button", style: partDelay((extras?.length ?? 0) + 1), onClick: act(undo), className: cn(BUTTON, 'animate-toast-part font-semibold'), children: undoWords }))] })] }), portalNode);
|
|
@@ -8,10 +8,10 @@ export interface AssistFieldStateSpec {
|
|
|
8
8
|
/** Whether the suggestion, with Accept and Dismiss, is shown. */
|
|
9
9
|
showsSuggestion: boolean;
|
|
10
10
|
/** Which AI mark the field carries, if any. */
|
|
11
|
-
mark?: 'generated' | 'overridden';
|
|
11
|
+
mark?: 'generated' | 'edited' | 'overridden';
|
|
12
12
|
}
|
|
13
|
-
export declare function assistFieldStateSpec(state: AssistFieldState): AssistFieldStateSpec;
|
|
14
|
-
/** The suggestion's words
|
|
13
|
+
export declare function assistFieldStateSpec(state: AssistFieldState, disabled?: boolean): AssistFieldStateSpec;
|
|
14
|
+
/** The suggestion's words, "Suggested: 400 L". */
|
|
15
15
|
export declare function assistFieldSuggestionText(suggestion: string): string;
|
|
16
16
|
/** Accept's accessible name, which says what will be put in the field. */
|
|
17
17
|
export declare function assistFieldAcceptLabel(suggestion: string, fieldLabel: string): string;
|
|
@@ -19,7 +19,7 @@ export declare function assistFieldAcceptLabel(suggestion: string, fieldLabel: s
|
|
|
19
19
|
export declare function assistFieldSuggestLabel(fieldLabel: string): string;
|
|
20
20
|
/** Joins a field's own `aria-describedby` with the suggestion's id, keeping both. */
|
|
21
21
|
export declare function mergeDescribedBy(existing: string | undefined, added: string | undefined): string | undefined;
|
|
22
|
-
/** What a keyboard user is told
|
|
22
|
+
/** What a keyboard user is told and hears, about taking a suggestion, for a
|
|
23
23
|
* field read left to right. */
|
|
24
24
|
export declare const ASSIST_FIELD_KEYS_HINT = "Press Right arrow to accept or Escape to dismiss.";
|
|
25
25
|
/** The same hint, for the way the field is read: the arrow that points along the text. */
|
|
@@ -28,7 +28,7 @@ export declare function assistFieldKeysHint(rtl?: boolean): string;
|
|
|
28
28
|
export declare function assistFieldAnnouncement(suggestion: string, rtl?: boolean): string;
|
|
29
29
|
/** Dismiss's accessible name. */
|
|
30
30
|
export declare const ASSIST_FIELD_DISMISS_LABEL = "Dismiss suggestion";
|
|
31
|
-
/** The keys a field holding a suggestion answers
|
|
31
|
+
/** The keys a field holding a suggestion answers and what each one does. */
|
|
32
32
|
export interface AssistFieldKey {
|
|
33
33
|
key: string;
|
|
34
34
|
shiftKey?: boolean;
|
|
@@ -52,6 +52,8 @@ export interface AssistFieldContract {
|
|
|
52
52
|
label: string;
|
|
53
53
|
/** Where the assistance is in its life. */
|
|
54
54
|
state: AssistFieldState;
|
|
55
|
-
/** The suggested value as a reader sees it
|
|
55
|
+
/** The suggested value as a reader sees it, "400 L". */
|
|
56
56
|
suggestion?: string;
|
|
57
|
+
/** The field is disabled or read-only: nothing is offered and only the AI mark stays. */
|
|
58
|
+
disabled?: boolean;
|
|
57
59
|
}
|
|
@@ -22,8 +22,18 @@ const STATE_SPECS = {
|
|
|
22
22
|
mark: 'overridden',
|
|
23
23
|
},
|
|
24
24
|
};
|
|
25
|
-
export function assistFieldStateSpec(state) {
|
|
26
|
-
|
|
25
|
+
export function assistFieldStateSpec(state, disabled = false) {
|
|
26
|
+
const spec = STATE_SPECS[state];
|
|
27
|
+
if (!disabled)
|
|
28
|
+
return spec;
|
|
29
|
+
return {
|
|
30
|
+
working: false,
|
|
31
|
+
canSuggest: false,
|
|
32
|
+
showsSuggestion: false,
|
|
33
|
+
...(spec.mark === undefined
|
|
34
|
+
? {}
|
|
35
|
+
: { mark: spec.mark === 'overridden' ? 'edited' : spec.mark }),
|
|
36
|
+
};
|
|
27
37
|
}
|
|
28
38
|
export function assistFieldSuggestionText(suggestion) {
|
|
29
39
|
return `Suggested: ${suggestion.trim()}`;
|
|
@@ -24,4 +24,4 @@ export type DSAiAssistFieldProps = Omit<ComponentProps<'div'>, 'children'> & Ass
|
|
|
24
24
|
onRevert?: () => void;
|
|
25
25
|
};
|
|
26
26
|
/** A field the assistant can suggest a value for: a quiet sparkle inside it, the suggestion as ghost text, never written into it. */
|
|
27
|
-
export declare function DSAiAssistField({ label, state, suggestion, children, explanation, onSuggest, onAccept, onDismiss, onRevert, className, onFocus, onBlur, ...props }: DSAiAssistFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare function DSAiAssistField({ label, state, suggestion, disabled, children, explanation, onSuggest, onAccept, onDismiss, onRevert, className, onFocus, onBlur, ...props }: DSAiAssistFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,6 +10,7 @@ import { announceLive } from '../../lib/web/live-announcer';
|
|
|
10
10
|
import { cn } from '../../lib/cn';
|
|
11
11
|
import { useEscapeEntry, useFocusFallback, useFocusWithin } from '../../lib/web/focus-habits';
|
|
12
12
|
import { useComposing } from '../../lib/web/use-composing';
|
|
13
|
+
import { DSText } from '../../text/web/ds-text';
|
|
13
14
|
const GLYPH_INK = {
|
|
14
15
|
'muted-foreground': 'text-muted-foreground',
|
|
15
16
|
};
|
|
@@ -24,8 +25,8 @@ function caretIsAtEnd(target) {
|
|
|
24
25
|
return target.type === 'number';
|
|
25
26
|
return (target.selectionStart === target.selectionEnd && target.selectionStart === target.value.length);
|
|
26
27
|
}
|
|
27
|
-
export function DSAiAssistField({ label, state, suggestion, children, explanation, onSuggest, onAccept, onDismiss, onRevert, className, onFocus, onBlur, ...props }) {
|
|
28
|
-
const spec = assistFieldStateSpec(state);
|
|
28
|
+
export function DSAiAssistField({ label, state, suggestion, disabled = false, children, explanation, onSuggest, onAccept, onDismiss, onRevert, className, onFocus, onBlur, ...props }) {
|
|
29
|
+
const spec = assistFieldStateSpec(state, disabled);
|
|
29
30
|
const suggestionId = useId();
|
|
30
31
|
const frameRef = useRef(null);
|
|
31
32
|
const endRef = useRef(null);
|
|
@@ -73,7 +74,7 @@ export function DSAiAssistField({ label, state, suggestion, children, explanatio
|
|
|
73
74
|
return () => {
|
|
74
75
|
observer.disconnect();
|
|
75
76
|
};
|
|
76
|
-
}, [state]);
|
|
77
|
+
}, [state, disabled]);
|
|
77
78
|
const returnFocus = useRef(false);
|
|
78
79
|
useEffect(() => {
|
|
79
80
|
if (!returnFocus.current || state === 'suggested')
|
|
@@ -87,10 +88,10 @@ export function DSAiAssistField({ label, state, suggestion, children, explanatio
|
|
|
87
88
|
if (previous.current === state)
|
|
88
89
|
return;
|
|
89
90
|
previous.current = state;
|
|
90
|
-
if (state === 'suggested' && suggestion !== undefined) {
|
|
91
|
+
if (state === 'suggested' && suggestion !== undefined && !disabled) {
|
|
91
92
|
announceLive(assistFieldAnnouncement(suggestion, rtl));
|
|
92
93
|
}
|
|
93
|
-
}, [state, suggestion, rtl]);
|
|
94
|
+
}, [state, suggestion, rtl, disabled]);
|
|
94
95
|
const accept = () => {
|
|
95
96
|
if (suggestion === undefined)
|
|
96
97
|
return;
|
|
@@ -134,7 +135,7 @@ export function DSAiAssistField({ label, state, suggestion, children, explanatio
|
|
|
134
135
|
const room = {
|
|
135
136
|
'--ds-assist-end': `calc(${String(reserve)}px + var(--spacing) * 3)`,
|
|
136
137
|
};
|
|
137
|
-
return (_jsxs("div", { className: cn('flex flex-col gap-1
|
|
138
|
+
return (_jsxs("div", { className: cn('flex flex-col gap-1', className), ...props, onFocus: (event) => {
|
|
138
139
|
onFocus?.(event);
|
|
139
140
|
focus.props.onFocus();
|
|
140
141
|
}, onBlur: (event) => {
|
|
@@ -145,10 +146,10 @@ export function DSAiAssistField({ label, state, suggestion, children, explanatio
|
|
|
145
146
|
: {
|
|
146
147
|
top: slot.top,
|
|
147
148
|
height: slot.height,
|
|
148
|
-
insetInlineEnd: `calc(${String(slot.end)}px + var(--spacing)
|
|
149
|
+
insetInlineEnd: `calc(${String(slot.end)}px + var(--spacing))`,
|
|
149
150
|
}, children: [spec.canSuggest && (_jsx(DSIconButton, { variant: "ghost", size: "sm", tooltip: true, label: assistFieldSuggestLabel(label), "aria-busy": spec.working || undefined, "aria-disabled": spec.working || undefined, onClick: (event) => {
|
|
150
151
|
suggestPressed(event);
|
|
151
152
|
if (!spec.working)
|
|
152
153
|
onSuggest();
|
|
153
|
-
}, className: cn(GLYPH_INK[ASSIST_FIELD_GLYPH_INK], 'compact:size-7'), icon: _jsx(Sparkles, { "aria-hidden": true, className: cn(spec.working && 'animate-pulse-soft motion-reduce:animate-none') }) })), showsSuggestion && (_jsx(Sparkles, { "aria-hidden": true, className: cn('mx-2 size-icon-xs', GLYPH_INK[ASSIST_FIELD_GLYPH_INK]) })), spec.mark !== undefined && (_jsx(DSAiLabel, { state: spec.mark, explanation: explanation, ...(onRevert === undefined ? {} : { onRevert }) }))] })] }), showsSuggestion && (_jsxs("div", { className: "flex flex-wrap items-center gap-x-1 gap-y-
|
|
154
|
+
}, className: cn(GLYPH_INK[ASSIST_FIELD_GLYPH_INK], 'compact:size-7'), icon: _jsx(Sparkles, { "aria-hidden": true, className: cn(spec.working && 'animate-pulse-soft motion-reduce:animate-none') }) })), showsSuggestion && (_jsx(Sparkles, { "aria-hidden": true, className: cn('mx-2 size-icon-xs', GLYPH_INK[ASSIST_FIELD_GLYPH_INK]) })), spec.mark !== undefined && (_jsx(DSAiLabel, { state: spec.mark, explanation: explanation, ...(onRevert === undefined || disabled ? {} : { onRevert }) }))] })] }), showsSuggestion && (_jsxs("div", { className: "flex flex-wrap items-center gap-x-1 gap-y-1", children: [_jsxs(DSText, { as: "p", variant: "body-sm", id: suggestionId, className: "me-1 flex min-w-0 items-center gap-2 text-muted-foreground", children: [_jsx(Sparkles, { "aria-hidden": true, className: cn('size-icon-xs shrink-0', GLYPH_INK[ASSIST_FIELD_GLYPH_INK]) }), _jsxs("span", { className: "min-w-0 break-words", children: [assistFieldSuggestionText(suggestion), _jsxs("span", { className: "sr-only", children: [" ", assistFieldKeysHint(rtl)] })] })] }), _jsxs(DSButton, { variant: "ghost", size: "sm", "aria-label": assistFieldAcceptLabel(suggestion, label), onClick: accept, className: "gap-2 px-2", children: ["Accept", _jsx(DSKbd, { "aria-hidden": true, keys: [rtl ? 'left' : 'right'] })] }), _jsxs(DSButton, { variant: "ghost", size: "sm", "aria-label": ASSIST_FIELD_DISMISS_LABEL, onClick: dismiss, className: "gap-2 px-2", children: ["Dismiss", _jsx(DSKbd, { "aria-hidden": true, keys: ['Esc'] })] })] }))] }));
|
|
154
155
|
}
|