@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
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef, useState, } from 'react';
|
|
3
|
-
import { DIVERGING_BAR_CHART_KEYS, DIVERGING_BAR_CHART_TOUCH_HOLD_MS, divergingBarChartNearest, divergingBarChartReading, divergingBarChartSigned, divergingBarChartSpec, divergingBarChartStep, } from '../diverging-bar-chart';
|
|
3
|
+
import { DIVERGING_BAR_CHART_KEYS, DIVERGING_BAR_CHART_TOUCH_HOLD_MS, divergingBarChartDirection, divergingBarChartNearest, divergingBarChartReading, divergingBarChartSigned, divergingBarChartSpec, divergingBarChartStep, divergingBarChartTickAt, divergingBarChartTicks, } from '../diverging-bar-chart';
|
|
4
|
+
import { DSButton } from '../../button/web/ds-button';
|
|
5
|
+
import { CHART_TABLE_CLASSES as T } from '../../lib/chart-table';
|
|
4
6
|
import { cn } from '../../lib/cn';
|
|
5
7
|
import { CHART_SERIES_BG, chartSeriesSlot } from '../../lib/chart-series';
|
|
8
|
+
import { ChartFigures, useChartFigures } from '../../lib/web/chart-figures';
|
|
6
9
|
import { CHART_FINISH_READOUT } from '../../lib/web/chart-finish';
|
|
10
|
+
import { DSText } from '../../text/web/ds-text';
|
|
7
11
|
const bgOf = (hue) => CHART_SERIES_BG[chartSeriesSlot(hue)];
|
|
8
|
-
|
|
12
|
+
function KeySwatch({ side, hue: swatchHue }) {
|
|
13
|
+
return (_jsxs("span", { "aria-hidden": true, className: "relative inline-block h-4 w-3 shrink-0", children: [_jsx("span", { className: "bg-border absolute inset-x-0 top-1/2 h-px" }), side === 'on' ? (_jsx("span", { className: "bg-muted-foreground absolute inset-x-0 top-1/2 h-0.5 -translate-y-1/2 rounded-full" })) : (_jsx("span", { className: cn('absolute inset-x-0 h-1/2', side === 'above' ? 'top-0 rounded-t-xs' : 'bottom-0 rounded-b-xs', swatchHue === undefined ? '' : bgOf(swatchHue)) }))] }));
|
|
14
|
+
}
|
|
15
|
+
export function DSDivergingBarChart({ labels, values, positiveSeries = 1, negativeSeries = 2, positiveLabel, negativeLabel, neutralLabel, label, height = 160, valueLabels = false, labelEvery = 1, formatValue = (value) => value.toLocaleString(), emptyLabel = 'No data', className, ...props }) {
|
|
9
16
|
const spec = divergingBarChartSpec({ labels, values });
|
|
17
|
+
const figures = useChartFigures();
|
|
10
18
|
const [active, setActive] = useState(undefined);
|
|
11
19
|
const plotRef = useRef(null);
|
|
12
20
|
const holdTimer = useRef(undefined);
|
|
@@ -52,20 +60,27 @@ export function DSDivergingBarChart({ labels, values, positiveSeries = 1, negati
|
|
|
52
60
|
if (event.pointerType === 'mouse')
|
|
53
61
|
setActive(undefined);
|
|
54
62
|
}
|
|
63
|
+
const ticks = divergingBarChartTicks(spec.max);
|
|
64
|
+
const tickText = (tick) => divergingBarChartSigned(tick, formatValue);
|
|
65
|
+
const gutter = `${String(Math.max(3, ...ticks.map((tick) => tickText(tick).length)) + 1)}ch`;
|
|
55
66
|
const hue = (bar) => bar.sign === 'negative' ? negativeSeries : positiveSeries;
|
|
56
67
|
if (spec.empty) {
|
|
57
|
-
return (_jsx("div", { ...props, className: cn('flex w-full flex-col gap-2', className), children: _jsx("div", { role: "img", "aria-label": `${label}: ${emptyLabel}`, className: "border-border text-muted-foreground flex w-full items-center justify-center rounded-xs border border-dashed", style: { height }, children: _jsx("span", { className: "bg-muted rounded-xs px-3 py-
|
|
68
|
+
return (_jsx("div", { ...props, className: cn('flex w-full flex-col gap-2', className), children: _jsx("div", { role: "img", "aria-label": `${label}: ${emptyLabel}`, className: "border-border text-muted-foreground flex w-full items-center justify-center rounded-xs border border-dashed", style: { height }, children: _jsx("span", { className: "bg-muted rounded-xs px-3 py-2 text-body-sm", children: emptyLabel }) }) }));
|
|
58
69
|
}
|
|
59
|
-
return (_jsxs("div", { ...props, className: cn('flex w-full flex-col gap-2', className), children: [_jsxs("div", { role: "slider", tabIndex: 0, "aria-label": label, "aria-valuemin": 0, "aria-valuemax": spec.bars.length - 1, "aria-valuenow": reported, "aria-valuetext": spec.bars[reported] === undefined
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
return (_jsxs("div", { ...props, className: cn('flex w-full flex-col gap-2', className), children: [_jsxs("div", { className: "relative", style: { paddingLeft: gutter }, children: [_jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 left-0", style: { width: gutter }, "data-diverging-axis": "", children: ticks.map((tick) => (_jsx(DSText, { as: "span", variant: "body-xs", className: "text-muted-foreground absolute right-0 -translate-y-1/2 pe-2 text-right whitespace-nowrap tabular-nums", style: { top: `${String(divergingBarChartTickAt(tick, spec.max))}%` }, children: tickText(tick) }, tick))) }), _jsxs("div", { role: "slider", tabIndex: 0, "aria-label": label, "aria-valuemin": 0, "aria-valuemax": spec.bars.length - 1, "aria-valuenow": reported, "aria-valuetext": spec.bars[reported] === undefined
|
|
71
|
+
? undefined
|
|
72
|
+
: divergingBarChartReading(spec.bars[reported], formatValue, neutralLabel), onKeyDown: onKeyDown, ref: plotRef, onPointerMove: onPointer, onPointerDown: onPointer, onPointerUp: onPointerUp, onPointerCancel: onPointerCancel, onPointerLeave: onPointerLeave, onBlur: () => {
|
|
73
|
+
releaseHold();
|
|
74
|
+
setActive(undefined);
|
|
75
|
+
}, className: "focusable relative w-full touch-pan-y rounded-xs", style: { height }, children: [ticks
|
|
76
|
+
.filter((tick) => tick !== 0)
|
|
77
|
+
.map((tick) => (_jsx("div", { "aria-hidden": true, className: "bg-border-subtle absolute inset-x-0 h-px", style: { top: `${String(divergingBarChartTickAt(tick, spec.max))}%` } }, tick))), _jsx("div", { "aria-hidden": true, className: "bg-border absolute inset-x-0 top-1/2 h-px" }), _jsx("div", { "aria-hidden": true, className: "absolute inset-0 grid gap-1", style: { gridTemplateColumns: `repeat(${String(spec.bars.length)}, minmax(0, 1fr))` }, children: spec.bars.map((bar) => {
|
|
78
|
+
const up = bar.sign !== 'negative';
|
|
79
|
+
const dimmed = active !== undefined && active !== bar.index;
|
|
80
|
+
return (_jsxs("div", { className: "relative h-full", children: [bar.extent > 0 && (_jsx("div", { "data-forced-colors": "mark", className: cn('absolute left-1/2 w-3/5 max-w-6 -translate-x-1/2', up ? 'bottom-1/2 rounded-t-xs' : 'top-1/2 rounded-b-xs', up ? 'fill-sheen-up' : 'fill-sheen-down', bgOf(hue(bar)), dimmed && 'opacity-40'), style: { height: `${String(bar.extent / 2)}%` } })), bar.sign === 'zero' && (_jsx("div", { "data-forced-colors": "mark", "data-diverging-zero": "", className: cn('bg-muted-foreground absolute top-1/2 left-1/2 h-0.5 w-3/5 max-w-6 -translate-x-1/2 -translate-y-1/2 rounded-full', dimmed && 'opacity-40') })), valueLabels && bar.value !== null && (_jsx(DSText, { as: "span", variant: "body-xs", className: "text-muted-foreground absolute left-1/2 -translate-x-1/2 whitespace-nowrap tabular-nums", style: bar.sign === 'zero'
|
|
81
|
+
? { bottom: 'calc(50% + 6px)' }
|
|
82
|
+
: up
|
|
83
|
+
? { bottom: `calc(50% + ${String(bar.extent / 2)}% + 4px)` }
|
|
84
|
+
: { top: `calc(50% + ${String(bar.extent / 2)}% + 4px)` }, children: divergingBarChartSigned(bar.value, formatValue) }))] }, bar.index));
|
|
85
|
+
}) }), inspected !== undefined && (_jsxs("div", { "aria-hidden": true, className: cn(CHART_FINISH_READOUT, 'absolute top-0 left-1/2 flex -translate-x-1/2 items-center gap-2 px-3 py-2 text-body-sm whitespace-nowrap tabular-nums'), children: [inspected.value !== null && (_jsx("span", { className: cn('size-2 rounded-full', inspected.sign === 'zero' ? 'bg-muted-foreground' : bgOf(hue(inspected))) })), divergingBarChartReading(inspected, formatValue, neutralLabel)] }))] })] }), _jsx("div", { "aria-hidden": true, className: "text-muted-foreground grid gap-1 text-body-xs", style: { gridTemplateColumns: `repeat(${String(spec.bars.length)}, minmax(0, 1fr))`, paddingLeft: gutter }, children: spec.bars.map((bar) => (_jsx("span", { className: cn('truncate text-center', active === bar.index && 'text-foreground font-semibold'), children: bar.index % Math.max(1, labelEvery) === 0 ? bar.label : '' }, bar.index))) }), _jsxs("div", { className: "flex flex-wrap items-center gap-x-5 gap-y-1 text-body-sm", "data-diverging-key": "", children: [_jsxs("span", { className: "inline-flex items-center gap-2", children: [_jsx(KeySwatch, { side: "above", hue: positiveSeries }), _jsx("span", { className: "text-foreground", children: positiveLabel })] }), _jsxs("span", { className: "inline-flex items-center gap-2", children: [_jsx(KeySwatch, { side: "below", hue: negativeSeries }), _jsx("span", { className: "text-foreground", children: negativeLabel })] }), spec.hasZero && neutralLabel !== undefined && neutralLabel.trim() !== '' && (_jsxs("span", { className: "inline-flex items-center gap-2", children: [_jsx(KeySwatch, { side: "on" }), _jsx("span", { className: "text-foreground", children: neutralLabel })] }))] }), _jsx("div", { children: _jsx(DSButton, { variant: "link", quiet: true, labelSize: "sm", ...figures.toggle, children: figures.label }) }), _jsxs(ChartFigures, { figures: figures, caption: label, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { scope: "col", className: T.columnHead, children: label }), _jsx("th", { scope: "col", className: T.figureHead, children: "Value" }), _jsx("th", { scope: "col", className: T.noteHead, children: "Direction" })] }) }), _jsx("tbody", { children: spec.bars.map((bar) => (_jsxs("tr", { className: T.row, children: [_jsx("th", { scope: "row", className: T.rowHead, children: bar.label }), _jsx("td", { className: T.figure, children: bar.value === null ? 'No data' : divergingBarChartSigned(bar.value, formatValue) }), _jsx("td", { className: T.note, children: divergingBarChartDirection(bar, { positiveLabel, negativeLabel, ...(neutralLabel === undefined ? {} : { neutralLabel }) }) })] }, bar.index))) })] })] }));
|
|
71
86
|
}
|
|
@@ -11,7 +11,7 @@ export interface DividerResolvedSpec {
|
|
|
11
11
|
ink: DividerInkRole;
|
|
12
12
|
thickness: number;
|
|
13
13
|
/** Which axis the rule's thickness applies to. `horizontal` reserves height,
|
|
14
|
-
* `vertical` reserves width
|
|
14
|
+
* `vertical` reserves width, the design's own wording and the reason the
|
|
15
15
|
* two cannot share one CSS property. */
|
|
16
16
|
axis: DividerAxis;
|
|
17
17
|
}
|
|
@@ -20,7 +20,7 @@ export declare function dividerSpec(axis?: DividerAxis, thickness?: number): Div
|
|
|
20
20
|
export interface DividerContract {
|
|
21
21
|
/** Whether the rule runs horizontally or vertically. Defaults to horizontal. */
|
|
22
22
|
axis?: Forwarded<DividerAxis>;
|
|
23
|
-
/** Stroke width in pixels
|
|
23
|
+
/** Stroke width in pixels, the height of a horizontal rule, the width of a
|
|
24
24
|
* vertical one. Defaults to [DIVIDER_THICKNESS_PX]. */
|
|
25
25
|
thickness?: Forwarded<number>;
|
|
26
26
|
/** Inset before the rule along its main axis. Logical, so it follows the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
2
|
import { type DividerContract } from '../divider';
|
|
3
3
|
export type DSDividerProps = Omit<ComponentProps<'div'>, 'role' | 'aria-hidden' | 'children'> & DividerContract;
|
|
4
|
-
/** A hairline rule. Decorative
|
|
4
|
+
/** A hairline rule. Decorative, see the contract on why it is hidden. */
|
|
5
5
|
export declare function DSDivider({ axis, thickness, indent, endIndent, length, className, style, ...props }: DSDividerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,7 +8,7 @@ export function DSDivider({ axis = 'horizontal', thickness, indent = 0, endInden
|
|
|
8
8
|
const extent = horizontal
|
|
9
9
|
? {
|
|
10
10
|
blockSize: spec.thickness,
|
|
11
|
-
inlineSize: length
|
|
11
|
+
inlineSize: length ?? `calc(100% - ${String(indent)}px - ${String(endIndent)}px)`,
|
|
12
12
|
marginInlineStart: indent,
|
|
13
13
|
marginInlineEnd: endIndent,
|
|
14
14
|
}
|
|
@@ -18,5 +18,5 @@ export function DSDivider({ axis = 'horizontal', thickness, indent = 0, endInden
|
|
|
18
18
|
marginBlockStart: indent,
|
|
19
19
|
marginBlockEnd: endIndent,
|
|
20
20
|
};
|
|
21
|
-
return (_jsx("div", { role: "presentation", "aria-hidden": "true", "data-forced-colors": "rule", className: cn(INK[spec.ink], 'shrink-0',
|
|
21
|
+
return (_jsx("div", { role: "presentation", "aria-hidden": "true", "data-forced-colors": "rule", className: cn(INK[spec.ink], 'shrink-0', !horizontal && length === undefined && 'self-stretch', className), style: { ...extent, ...style }, ...props }));
|
|
22
22
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { Forwarded } from '../props';
|
|
2
2
|
export declare const DONUT_MAX_SEGMENTS = 6;
|
|
3
|
+
/** How many named parts the ring keeps when it has to fold: the rest go to Other. */
|
|
4
|
+
export declare const DONUT_NAMED_WHEN_FOLDED: number;
|
|
5
|
+
/** The key of the folded part, which `hiddenKeys` can name like any other. */
|
|
6
|
+
export declare const DONUT_OTHER_KEY = "other";
|
|
3
7
|
/** The drawing's box, in the units of its viewBox. */
|
|
4
8
|
export declare const DONUT_BOX = 120;
|
|
5
9
|
/** The ring's radius and thickness: thin, so the centre has room for the total. */
|
|
@@ -23,8 +27,20 @@ export interface DonutChartContract {
|
|
|
23
27
|
/** The keys of parts left out of the ring and the total. */
|
|
24
28
|
hiddenKeys?: Forwarded<readonly string[]>;
|
|
25
29
|
}
|
|
26
|
-
/**
|
|
27
|
-
export
|
|
30
|
+
/** A part as the ring and its key hold it: `other` marks the folded part, drawn in the quiet colour. */
|
|
31
|
+
export interface DonutPart extends DonutSegment {
|
|
32
|
+
other?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Every part the caller gave, as at most six: past six, parts six and up are
|
|
36
|
+
* folded into one Other (their values summed, broken values counting as
|
|
37
|
+
* nothing) and an Other the caller already has takes them instead of a second
|
|
38
|
+
* one being made. Other is always last. Folding an already folded list gives
|
|
39
|
+
* it back, so a caller can fold once and hand the result on.
|
|
40
|
+
*/
|
|
41
|
+
export declare function donutParts(segments: readonly DonutSegment[], otherLabel?: string): DonutPart[];
|
|
42
|
+
/** The parts that are on the ring: every part (folded to six, see `donutParts`), minus the hidden ones. */
|
|
43
|
+
export declare function donutVisible(segments: readonly DonutSegment[], hiddenKeys?: readonly string[], otherLabel?: string): DonutPart[];
|
|
28
44
|
/** The whole: the sum of the visible parts. */
|
|
29
45
|
export declare function donutTotal(visible: readonly DonutSegment[]): number;
|
|
30
46
|
/** Whole-number percents of the visible parts that add up to exactly 100
|
|
@@ -38,7 +54,7 @@ export interface DonutArc {
|
|
|
38
54
|
offset: number;
|
|
39
55
|
}
|
|
40
56
|
/**
|
|
41
|
-
* The arcs of the ring. Each is drawn as a dash with a round cap
|
|
57
|
+
* The arcs of the ring. Each is drawn as a dash with a round cap and a round
|
|
42
58
|
* cap adds half the stroke to each end, so the dash is shortened by the stroke
|
|
43
59
|
* and the gap to leave the air between parts. A lone part is the whole circle,
|
|
44
60
|
* drawn without the gap. A part too small to hold a cap is a dot.
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export const DONUT_MAX_SEGMENTS = 6;
|
|
2
|
+
export const DONUT_NAMED_WHEN_FOLDED = DONUT_MAX_SEGMENTS - 1;
|
|
3
|
+
export const DONUT_OTHER_KEY = 'other';
|
|
2
4
|
export const DONUT_BOX = 120;
|
|
3
5
|
export const DONUT_RADIUS = 50;
|
|
4
6
|
export const DONUT_STROKE = 8;
|
|
@@ -6,8 +8,23 @@ export const DONUT_GAP = 3;
|
|
|
6
8
|
function share(value) {
|
|
7
9
|
return Number.isFinite(value) && value > 0 ? value : 0;
|
|
8
10
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
const isOther = (s) => s.key === DONUT_OTHER_KEY || s.label.trim().toLowerCase() === 'other';
|
|
12
|
+
export function donutParts(segments, otherLabel = 'Other') {
|
|
13
|
+
const own = segments.find(isOther);
|
|
14
|
+
const named = segments.filter((s) => s !== own);
|
|
15
|
+
const fits = segments.length <= DONUT_MAX_SEGMENTS;
|
|
16
|
+
const kept = fits ? named : named.slice(0, DONUT_NAMED_WHEN_FOLDED);
|
|
17
|
+
const folded = fits ? [] : named.slice(DONUT_NAMED_WHEN_FOLDED);
|
|
18
|
+
if (own === undefined && folded.length === 0)
|
|
19
|
+
return kept;
|
|
20
|
+
const value = [own, ...folded].reduce((sum, s) => sum + (s === undefined ? 0 : share(s.value)), 0);
|
|
21
|
+
return [
|
|
22
|
+
...kept,
|
|
23
|
+
{ key: own?.key ?? DONUT_OTHER_KEY, label: own?.label ?? otherLabel, value, other: true },
|
|
24
|
+
];
|
|
25
|
+
}
|
|
26
|
+
export function donutVisible(segments, hiddenKeys = [], otherLabel = 'Other') {
|
|
27
|
+
return donutParts(segments, otherLabel).filter((s) => !hiddenKeys.includes(s.key));
|
|
11
28
|
}
|
|
12
29
|
export function donutTotal(visible) {
|
|
13
30
|
return visible.reduce((sum, s) => sum + share(s.value), 0);
|
|
@@ -5,6 +5,8 @@ export type DSDonutChartProps = Omit<ComponentProps<'div'>, 'role' | 'aria-label
|
|
|
5
5
|
onHiddenKeysChange?: (hiddenKeys: string[]) => void;
|
|
6
6
|
/** How a part's figure is written in the key and the centre. Defaults to the number in the reader's locale. */
|
|
7
7
|
formatValue?: (value: number) => string;
|
|
8
|
+
/** What the folded part is called when the ring has more than six parts. Required: this package ships no copy. */
|
|
9
|
+
otherLabel: string;
|
|
8
10
|
/** The word under the total in the centre. Required: this package ships no copy. */
|
|
9
11
|
totalLabel: string;
|
|
10
12
|
/** Shown in the centre when there is nothing to share. Required: this package ships no copy. */
|
|
@@ -13,4 +15,4 @@ export type DSDonutChartProps = Omit<ComponentProps<'div'>, 'role' | 'aria-label
|
|
|
13
15
|
reveal?: boolean;
|
|
14
16
|
};
|
|
15
17
|
/** Parts of one whole as a thin ring with rounded ends, a total in the centre and a key of figures and percents. */
|
|
16
|
-
export declare function DSDonutChart({ segments, label, hiddenKeys, onHiddenKeysChange, formatValue, totalLabel, emptyLabel, reveal, className, ...props }: DSDonutChartProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function DSDonutChart({ segments, label, hiddenKeys, onHiddenKeysChange, formatValue, totalLabel, emptyLabel, otherLabel, reveal, className, ...props }: DSDonutChartProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useId, useState } from 'react';
|
|
3
|
-
import { DONUT_BOX, DONUT_RADIUS, DONUT_STROKE, donutArcs, donutPercents, donutTotal, donutVisible, } from '../donut-chart';
|
|
4
|
-
import { CHART_SERIES_BG, CHART_SERIES_STROKE, chartSeriesSlot } from '../../lib/chart-series';
|
|
3
|
+
import { DONUT_BOX, DONUT_RADIUS, DONUT_STROKE, donutArcs, donutParts, donutPercents, donutTotal, donutVisible, } from '../donut-chart';
|
|
4
|
+
import { CHART_QUIET, CHART_SERIES_BG, CHART_SERIES_STROKE, chartSeriesSlot, } from '../../lib/chart-series';
|
|
5
5
|
import { cn } from '../../lib/cn';
|
|
6
|
-
|
|
6
|
+
import { CHART_FINISH_ORNAMENT, FillSheenGradient } from '../../lib/web/chart-finish';
|
|
7
|
+
import { DSText } from '../../text/web/ds-text';
|
|
8
|
+
export function DSDonutChart({ segments, label, hiddenKeys = [], onHiddenKeysChange, formatValue = (value) => value.toLocaleString(), totalLabel, emptyLabel, otherLabel, reveal = true, className, ...props }) {
|
|
7
9
|
const uid = useId().replace(/[^a-zA-Z0-9_-]/g, '');
|
|
8
10
|
const maskId = `${uid}-draw`;
|
|
11
|
+
const sheenId = `${uid}-sheen`;
|
|
9
12
|
const [active, setActive] = useState(undefined);
|
|
10
|
-
const
|
|
13
|
+
const listed = donutParts(segments, otherLabel);
|
|
14
|
+
const visible = donutVisible(listed, hiddenKeys, otherLabel);
|
|
11
15
|
const total = donutTotal(visible);
|
|
12
16
|
const percents = donutPercents(visible);
|
|
13
17
|
const arcs = donutArcs(visible);
|
|
14
|
-
const
|
|
18
|
+
const isQuiet = (key) => listed.find((s) => s.key === key)?.other === true;
|
|
15
19
|
const slotOf = (key) => chartSeriesSlot(listed.findIndex((s) => s.key === key) + 1);
|
|
16
20
|
const inspected = listed.find((s) => s.key === active && !hiddenKeys.includes(s.key));
|
|
17
21
|
const inspectedPercent = inspected === undefined ? 0 : (percents[visible.indexOf(inspected)] ?? 0);
|
|
@@ -19,13 +23,17 @@ export function DSDonutChart({ segments, label, hiddenKeys = [], onHiddenKeysCha
|
|
|
19
23
|
const rowContent = (s) => {
|
|
20
24
|
const hidden = hiddenKeys.includes(s.key);
|
|
21
25
|
const at = visible.findIndex((v) => v.key === s.key);
|
|
22
|
-
return (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": true, "data-forced-colors": "mark", className: cn('size-2.5 shrink-0 rounded-full', hidden
|
|
26
|
+
return (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": true, "data-forced-colors": "mark", className: cn('size-2.5 shrink-0 rounded-full', hidden
|
|
27
|
+
? 'border border-muted-foreground bg-transparent'
|
|
28
|
+
: s.other === true
|
|
29
|
+
? CHART_QUIET.bg
|
|
30
|
+
: CHART_SERIES_BG[slotOf(s.key)]) }), _jsx("span", { className: cn('min-w-0 flex-1 truncate text-start', hidden && 'text-muted-foreground line-through'), children: s.label }), _jsx("span", { className: cn('tabular-nums', hidden ? 'text-muted-foreground line-through' : 'font-semibold text-foreground'), children: formatValue(s.value) }), _jsx("span", { className: "w-10 text-end tabular-nums text-muted-foreground", children: hidden ? '' : `${String(percents[at] ?? 0)}%` })] }));
|
|
23
31
|
};
|
|
24
|
-
return (_jsxs("div", { className: cn('flex w-full flex-col items-center gap-6 sm:flex-row', className), ...props, role: "group", "aria-label": label, children: [_jsxs("div", { className: "relative size-40 shrink-0", children: [_jsxs("svg", { "aria-hidden": true, viewBox: `0 0 ${String(DONUT_BOX)} ${String(DONUT_BOX)}`, className: "size-full overflow-visible", fill: "none", children: [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
return (_jsxs("div", { className: cn('flex w-full flex-col items-center gap-6 sm:flex-row', className), ...props, role: "group", "aria-label": label, children: [_jsxs("div", { className: "relative size-40 shrink-0", children: [_jsxs("svg", { "aria-hidden": true, viewBox: `0 0 ${String(DONUT_BOX)} ${String(DONUT_BOX)}`, className: "size-full overflow-visible", fill: "none", children: [_jsxs("defs", { children: [_jsx(FillSheenGradient, { id: sheenId, round: true, turned: true }), reveal && (_jsx("mask", { id: maskId, maskUnits: "userSpaceOnUse", children: _jsx("circle", { cx: DONUT_BOX / 2, cy: DONUT_BOX / 2, r: DONUT_RADIUS, strokeWidth: DONUT_STROKE * 3, pathLength: 100, strokeDasharray: "100 100", className: "stroke-hero-foreground animate-draw-arc", transform: `rotate(-90 ${String(DONUT_BOX / 2)} ${String(DONUT_BOX / 2)})` }) }))] }), _jsx("circle", { "data-donut-track": "", cx: DONUT_BOX / 2, cy: DONUT_BOX / 2, r: DONUT_RADIUS, strokeWidth: DONUT_STROKE, className: "stroke-track forced-colors:hidden" }), _jsxs("g", { ...(reveal ? { mask: `url(#${maskId})` } : {}), children: [arcs.map((arc) => (_jsx("circle", { "data-donut-arc": arc.key, cx: DONUT_BOX / 2, cy: DONUT_BOX / 2, r: DONUT_RADIUS, strokeWidth: DONUT_STROKE, strokeLinecap: "round", strokeDasharray: `${String(arc.length)} ${String(2 * Math.PI * DONUT_RADIUS)}`, strokeDashoffset: -arc.offset, transform: `rotate(-90 ${String(DONUT_BOX / 2)} ${String(DONUT_BOX / 2)})`, "data-chart-ink": "stroke", className: cn(isQuiet(arc.key) ? CHART_QUIET.stroke : CHART_SERIES_STROKE[slotOf(arc.key)], 'transition-control', active !== undefined && active !== arc.key && 'opacity-40'), onPointerEnter: () => {
|
|
33
|
+
setActive(arc.key);
|
|
34
|
+
}, onPointerLeave: () => {
|
|
35
|
+
setActive(undefined);
|
|
36
|
+
} }, arc.key))), arcs.map((arc) => (_jsx("circle", { cx: DONUT_BOX / 2, cy: DONUT_BOX / 2, r: DONUT_RADIUS, strokeWidth: DONUT_STROKE, strokeLinecap: "round", strokeDasharray: `${String(arc.length)} ${String(2 * Math.PI * DONUT_RADIUS)}`, strokeDashoffset: -arc.offset, transform: `rotate(-90 ${String(DONUT_BOX / 2)} ${String(DONUT_BOX / 2)})`, stroke: `url(#${sheenId})`, className: cn(CHART_FINISH_ORNAMENT, 'transition-control', active !== undefined && active !== arc.key && 'opacity-40') }, `${arc.key}-sheen`)))] })] }), _jsx("div", { "aria-hidden": true, "data-donut-centre": "", className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center gap-1 px-8 text-center", children: total <= 0 ? (_jsx(DSText, { as: "span", variant: "body-sm", className: "text-muted-foreground", children: emptyLabel })) : inspected === undefined ? (_jsxs(_Fragment, { children: [_jsx(DSText, { as: "span", variant: "heading-md", className: "tabular-nums leading-none text-foreground", children: formatValue(total) }), _jsx(DSText, { as: "span", variant: "body-xs", className: "text-muted-foreground", children: totalLabel })] })) : (_jsxs(_Fragment, { children: [_jsx(DSText, { as: "span", variant: "heading-md", className: "tabular-nums leading-none text-foreground", children: formatValue(inspected.value) }), _jsxs(DSText, { as: "span", variant: "body-xs", className: "max-w-full truncate text-muted-foreground", children: [inspected.label, ", ", String(inspectedPercent), "%"] })] })) })] }), _jsx("ul", { className: "flex w-full min-w-0 flex-1 flex-col gap-1 text-body-sm", "aria-label": `${label}, parts`, children: listed.map((s) => (_jsx("li", { children: interactive ? (_jsx("button", { type: "button", "aria-pressed": !hiddenKeys.includes(s.key), onClick: () => {
|
|
29
37
|
onHiddenKeysChange(hiddenKeys.includes(s.key)
|
|
30
38
|
? hiddenKeys.filter((k) => k !== s.key)
|
|
31
39
|
: [...hiddenKeys, s.key]);
|
|
@@ -37,5 +45,5 @@ export function DSDonutChart({ segments, label, hiddenKeys = [], onHiddenKeysCha
|
|
|
37
45
|
setActive(s.key);
|
|
38
46
|
}, onBlur: () => {
|
|
39
47
|
setActive(undefined);
|
|
40
|
-
}, className: "focusable state-layer flex min-h-8 w-full items-center gap-2 rounded-xs px-
|
|
48
|
+
}, className: "focusable state-layer flex min-h-8 w-full items-center gap-2 rounded-xs px-2 pointer-coarse:min-h-touch", children: rowContent(s) })) : (_jsx("div", { className: "flex min-h-8 items-center gap-2 px-2", children: rowContent(s) })) }, s.key))) })] }));
|
|
41
49
|
}
|
package/dist/drawer/drawer.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Forwarded } from '../props';
|
|
|
2
2
|
/** Which edge the panel comes from. `right` is the design's; the other three are this package's. */
|
|
3
3
|
export declare const DRAWER_DIRECTIONS: readonly ["right", "left", "top", "bottom"];
|
|
4
4
|
export type DrawerDirection = (typeof DRAWER_DIRECTIONS)[number];
|
|
5
|
-
/** Which dimension `DRAWER_EXTENT_PX` sets
|
|
5
|
+
/** Which dimension `DRAWER_EXTENT_PX` sets, a width for the vertical edges, a height for the horizontal. */
|
|
6
6
|
export declare const DRAWER_AXES: Record<DrawerDirection, 'inline' | 'block'>;
|
|
7
7
|
/** 520px (`--size-drawer-width`) along the entry axis, capped to the viewport by the adapters. */
|
|
8
8
|
export declare const DRAWER_EXTENT_PX: 520;
|
|
@@ -14,10 +14,10 @@ export declare const DRAWER_SCROLLS_ITS_BODY: true;
|
|
|
14
14
|
export declare const DRAWER_Z_INDEX: 31;
|
|
15
15
|
export declare const DRAWER_SCRIM_Z_INDEX: 30;
|
|
16
16
|
/** The panel scrim's strength, the value `--scrim-panel-opacity` carries. The
|
|
17
|
-
* measurement, not a taste
|
|
17
|
+
* measurement, not a taste, see theme.css.
|
|
18
18
|
*
|
|
19
19
|
* IN THE COLOUR, NOT THE ELEMENT (2026-10-05). It was the element's `opacity`,
|
|
20
|
-
* under a fade whose keyframe runs opacity from 0 to 1
|
|
20
|
+
* under a fade whose keyframe runs opacity from 0 to 1 and a running
|
|
21
21
|
* animation outranks a resting value: the scrim rose to a solid blue grey over
|
|
22
22
|
* the entrance and snapped back to 70% when it ended, the flash an older note
|
|
23
23
|
* in the adapter describes fixing once already. `bg-scrim-panel/70` puts the
|
|
@@ -40,10 +40,10 @@ export type DrawerCloseInkRole = 'muted-foreground';
|
|
|
40
40
|
* `token-roles.ts` had no scrim role to point at; there are three. And an
|
|
41
41
|
* inverted read of the body ink is not what a panel scrim is: measured against
|
|
42
42
|
* the product being matched, a drawer lays a light blue-grey over the page and
|
|
43
|
-
* lands it on #CFD9E5, where the body ink at 30% landed on #BABABB
|
|
43
|
+
* lands it on #CFD9E5, where the body ink at 30% landed on #BABABB, darker,
|
|
44
44
|
* and neutral where theirs is blue.
|
|
45
45
|
*
|
|
46
|
-
* `scrim-panel` is that colour as a role
|
|
46
|
+
* `scrim-panel` is that colour as a role and the opacity moved with it, see
|
|
47
47
|
* the note beside it in theme.css on why a light scrim needs a high alpha to
|
|
48
48
|
* dim anything at all. */
|
|
49
49
|
export type DrawerScrimRole = 'scrim-panel';
|
|
@@ -62,14 +62,14 @@ export interface DrawerResolvedSpec {
|
|
|
62
62
|
border: DrawerBorderRole;
|
|
63
63
|
ink: DrawerInkRole;
|
|
64
64
|
titleInk: DrawerTitleInkRole;
|
|
65
|
-
/** `.drawer-sub
|
|
65
|
+
/** `.drawer-sub` and `.drawer-foot .count`, the same read, one role. */
|
|
66
66
|
subInk: DrawerSubInkRole;
|
|
67
67
|
closeHoverSurface: DrawerCloseSurfaceRole;
|
|
68
68
|
closeInk: DrawerCloseInkRole;
|
|
69
69
|
scrim: DrawerScrimRole;
|
|
70
70
|
/** The edge, echoed back so an adapter reads one object rather than two. */
|
|
71
71
|
direction: DrawerDirection;
|
|
72
|
-
/** Which dimension `extentPx` sets
|
|
72
|
+
/** Which dimension `extentPx` sets, see `DRAWER_AXES`. */
|
|
73
73
|
axis: 'inline' | 'block';
|
|
74
74
|
/** 520px, along the entry axis. */
|
|
75
75
|
extentPx: number;
|
|
@@ -92,9 +92,9 @@ export interface DrawerContract {
|
|
|
92
92
|
/** Whether the drawer is showing. Owned by the caller; there is no
|
|
93
93
|
* uncontrolled mode, because the open state is almost always derived. */
|
|
94
94
|
open: boolean;
|
|
95
|
-
/** The record's name, as a heading. Required
|
|
95
|
+
/** The record's name, as a heading. Required and visible on both platforms. */
|
|
96
96
|
title: string;
|
|
97
|
-
/** A second line under the title
|
|
97
|
+
/** A second line under the title, `.drawer-sub`. One line at body-sm. */
|
|
98
98
|
sub?: Forwarded<string>;
|
|
99
99
|
/** Which edge it comes from. `right` by default; a phone usually wants `bottom`. */
|
|
100
100
|
direction?: DrawerDirection;
|
|
@@ -112,7 +112,7 @@ export interface DrawerContract {
|
|
|
112
112
|
* and focus stays where it was. Web only; native is always modal. */
|
|
113
113
|
modal?: Forwarded<boolean>;
|
|
114
114
|
/** `true` lifts the panel off the window's edges: it sits a gutter in from
|
|
115
|
-
* every edge, with rounded corners, pinned to its own edge and the top
|
|
115
|
+
* every edge, with rounded corners, pinned to its own edge and the top and is
|
|
116
116
|
* only as tall as what it holds, up to the room there is. From the top or the
|
|
117
117
|
* bottom it spans the gutters and grows to 520px at most. See
|
|
118
118
|
* `DRAWER_FLOATING_GUTTER`. Web only; native always docks to its edge. */
|
|
@@ -2,11 +2,11 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import { type ViewProps } from 'react-native';
|
|
3
3
|
import { type DrawerContract } from '../drawer';
|
|
4
4
|
export type DSDrawerProps = Omit<ViewProps, 'accessibilityViewIsModal' | 'accessibilityLabel' | 'accessibilityRole'> & DrawerContract & {
|
|
5
|
-
/** `.drawer-body
|
|
5
|
+
/** `.drawer-body`, the record. It is what scrolls, not the panel. */
|
|
6
6
|
children: ReactNode;
|
|
7
|
-
/** `.drawer-foot
|
|
7
|
+
/** `.drawer-foot`, the record's own actions, behind a hairline. */
|
|
8
8
|
footer?: ReactNode;
|
|
9
|
-
/** `.drawer-foot .count
|
|
9
|
+
/** `.drawer-foot .count`, pushed left of the actions by `mr-auto`. */
|
|
10
10
|
count?: ReactNode;
|
|
11
11
|
/** Applies to the PANEL. */
|
|
12
12
|
className?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PRESS_SCALES } from '../../interaction';
|
|
3
|
-
import { Modal, Platform, Pressable, ScrollView,
|
|
3
|
+
import { Modal, Platform, Pressable, ScrollView, View } from 'react-native';
|
|
4
4
|
import { X } from 'lucide-react-native';
|
|
5
5
|
import { styled } from 'nativewind';
|
|
6
6
|
import { DRAWER_SCRIM_OPACITY, drawerSpec, } from '../drawer';
|
|
@@ -8,6 +8,7 @@ import { cn } from '../../lib/cn';
|
|
|
8
8
|
import { requestCloseUnlessDirty } from '../../lib/dirty-close';
|
|
9
9
|
import { useThemeEpoch } from '../../lib/use-theme-epoch';
|
|
10
10
|
import { useReducedMotion } from '../../lib/native/use-reduced-motion';
|
|
11
|
+
import { DSText } from '../../text/native/ds-text';
|
|
11
12
|
const SURFACE = { background: 'bg-background' };
|
|
12
13
|
const BORDER = { border: 'border-border' };
|
|
13
14
|
const TITLE_INK = {
|
|
@@ -37,7 +38,7 @@ export function DSDrawer({ open, title, sub, direction = 'right', closeLabel, on
|
|
|
37
38
|
};
|
|
38
39
|
const epoch = useThemeEpoch();
|
|
39
40
|
const reduced = useReducedMotion();
|
|
40
|
-
return (_jsxs(Modal, { visible: open, transparent: true, animationType: reduced || Platform.OS === 'web' ? 'none' : spec.direction === 'bottom' ? 'slide' : 'fade', onRequestClose: requestClose, statusBarTranslucent: true, "aria-label": title, children: [_jsx(Pressable, { testID: "drawer-scrim", "aria-hidden": true, accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", onPress: requestClose, style: { opacity: DRAWER_SCRIM_OPACITY }, className: cn('absolute inset-0', SCRIM[spec.scrim]) }), _jsxs(View, { testID: "drawer", accessibilityViewIsModal: true, accessibilityRole: "none", accessibilityLabel: title, "data-direction": spec.direction, className: cn('absolute flex-col overflow-hidden', GEOMETRY[spec.direction], SURFACE[spec.surface], BORDER[spec.border], className), ...props, children: [_jsxs(View, { testID: "drawer-head", className: cn('flex-row items-start border-b p-6', BORDER[spec.border]), children: [_jsxs(View, { className: "min-w-0 flex-1 flex-col gap-
|
|
41
|
+
return (_jsxs(Modal, { visible: open, transparent: true, animationType: reduced || Platform.OS === 'web' ? 'none' : spec.direction === 'bottom' ? 'slide' : 'fade', onRequestClose: requestClose, statusBarTranslucent: true, "aria-label": title, children: [_jsx(Pressable, { testID: "drawer-scrim", "aria-hidden": true, accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", onPress: requestClose, style: { opacity: DRAWER_SCRIM_OPACITY }, className: cn('absolute inset-0', SCRIM[spec.scrim]) }), _jsxs(View, { testID: "drawer", accessibilityViewIsModal: true, accessibilityRole: "none", accessibilityLabel: title, "data-direction": spec.direction, className: cn('absolute flex-col overflow-hidden', GEOMETRY[spec.direction], SURFACE[spec.surface], BORDER[spec.border], className), ...props, children: [_jsxs(View, { testID: "drawer-head", className: cn('flex-row items-start border-b p-6', BORDER[spec.border]), children: [_jsxs(View, { className: "min-w-0 flex-1 flex-col gap-1", children: [_jsx(DSText, { variant: "heading-md", accessibilityRole: "header", className: cn(TITLE_INK[spec.titleInk]), children: title }), sub !== undefined && (_jsx(DSText, { variant: "body-sm", className: cn(SUB_INK[spec.subInk]), children: sub }))] }), _jsx(Pressable, { testID: "drawer-close", accessibilityRole: "button", accessibilityLabel: closeLabel, onPress: requestClose, style: ({ pressed }) => pressed && Platform.OS === 'ios'
|
|
41
42
|
? { transform: [{ scale: PRESS_SCALES.firm }] }
|
|
42
|
-
: null, className: cn('ml-3 size-11 shrink-0 items-center justify-center rounded-full android:ripple-border', CLOSE_HOVER[spec.closeHoverSurface]), children: _jsx(CloseIcon, { "aria-hidden": true, size: 18, className: CLOSE_INK[spec.closeInk] }) }, epoch)] }), _jsx(ScrollView, { testID: "drawer-scroll", focusable: true, className: "flex-1", contentContainerClassName: "gap-3 p-6", children: children }), footer !== undefined && (_jsxs(View, { testID: "drawer-foot", className: cn('flex-row items-center gap-3 border-t p-4', BORDER[spec.border]), children: [count !== undefined && (_jsx(
|
|
43
|
+
: null, className: cn('ml-3 size-11 shrink-0 items-center justify-center rounded-full android:ripple-border', CLOSE_HOVER[spec.closeHoverSurface]), children: _jsx(CloseIcon, { "aria-hidden": true, size: 18, className: CLOSE_INK[spec.closeInk] }) }, epoch)] }), _jsx(ScrollView, { testID: "drawer-scroll", focusable: true, className: "flex-1", contentContainerClassName: "gap-3 p-6", children: children }), footer !== undefined && (_jsxs(View, { testID: "drawer-foot", className: cn('flex-row items-center gap-3 border-t p-4', BORDER[spec.border]), children: [count !== undefined && (_jsx(DSText, { variant: "body-sm", className: cn('mr-auto', SUB_INK[spec.subInk]), children: count })), footer] }))] })] }));
|
|
43
44
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
2
|
import { type DrawerContract, type DrawerHeadingLevel } from '../drawer';
|
|
3
3
|
export type DSDrawerProps = Omit<ComponentProps<'div'>, 'title' | 'role' | 'aria-modal' | 'aria-labelledby' | 'onKeyDown' | 'tabIndex' | 'ref' | 'onAnimationEnd'> & DrawerContract & {
|
|
4
|
-
/** `.drawer-body
|
|
4
|
+
/** `.drawer-body`, the record. It is what scrolls, not the panel. */
|
|
5
5
|
children: ReactNode;
|
|
6
|
-
/** `.drawer-foot
|
|
6
|
+
/** `.drawer-foot`, the record's own actions, behind a hairline. Put the
|
|
7
7
|
* main action last, where the row ends. */
|
|
8
8
|
footer?: ReactNode;
|
|
9
|
-
/** `.drawer-foot .count
|
|
9
|
+
/** `.drawer-foot .count`, pushed left of the actions. Shows only when there is a footer. */
|
|
10
10
|
count?: ReactNode;
|
|
11
11
|
/** The title's heading level. An `h2` unless told. */
|
|
12
12
|
headingLevel?: DrawerHeadingLevel;
|
|
@@ -11,8 +11,10 @@ import { announceLive } from '../../lib/web/live-announcer';
|
|
|
11
11
|
import { useOverlay } from '../../lib/web/use-overlay';
|
|
12
12
|
import { lockBodyScroll } from '../../lib/web/scroll-lock';
|
|
13
13
|
import { DSIconButton } from '../../icon-button/web/ds-icon-button';
|
|
14
|
-
|
|
14
|
+
import { DSText } from '../../text/web/ds-text';
|
|
15
|
+
const SURFACE = { background: 'bg-dialog-fill' };
|
|
15
16
|
const BORDER = { border: 'border-border' };
|
|
17
|
+
const PANEL_EDGE = 'border-dialog-edge';
|
|
16
18
|
const INK = { foreground: 'text-foreground' };
|
|
17
19
|
const TITLE_INK = {
|
|
18
20
|
'heading-foreground': 'text-heading-foreground',
|
|
@@ -163,7 +165,7 @@ export function DSDrawer({ open, title, sub, direction = 'right', closeLabel, on
|
|
|
163
165
|
const Heading = HEADING[headingLevel];
|
|
164
166
|
const panel = (_jsxs("div", { ref: panelRef, ...(modal
|
|
165
167
|
? { role: 'dialog', 'aria-modal': true, tabIndex: -1 }
|
|
166
|
-
: { role: 'complementary' }), "aria-labelledby": titleId, ...(sub === undefined ? {} : { 'aria-describedby': subId }), onKeyDown: handleKeyDown, "data-direction": spec.direction, "data-modal": modal ? 'true' : 'false', "data-floating": floating ? 'true' : 'false', ...(exiting ? { inert: true } : {}), style: z === null || floating ? undefined : { zIndex: z }, onAnimationEnd: finishExit, className: cn(PANEL, exiting ? EXIT[spec.direction] : ENTER[spec.direction], floating ? FLOATING_GEOMETRY[spec.direction] : GEOMETRY[spec.direction], SURFACE[spec.surface],
|
|
167
|
-
'focusable focus-visible:-outline-offset-(--size-focus-ring-offset) focus-visible:shadow-none'), children: children }), footer !== undefined && (_jsxs("div", { className: cn('flex flex-none flex-wrap items-center justify-end gap-3 border-t p-4', BORDER[spec.border]), children: [count !== undefined && (_jsx("span",
|
|
168
|
+
: { role: 'complementary' }), "aria-labelledby": titleId, ...(sub === undefined ? {} : { 'aria-describedby': subId }), onKeyDown: handleKeyDown, "data-direction": spec.direction, "data-modal": modal ? 'true' : 'false', "data-floating": floating ? 'true' : 'false', ...(exiting ? { inert: true } : {}), style: z === null || floating ? undefined : { zIndex: z }, onAnimationEnd: finishExit, className: cn(PANEL, exiting ? EXIT[spec.direction] : ENTER[spec.direction], floating ? FLOATING_GEOMETRY[spec.direction] : GEOMETRY[spec.direction], SURFACE[spec.surface], PANEL_EDGE, INK[spec.ink], 'outline-none', className), ...props, children: [_jsxs("div", { className: cn('flex shrink-0 items-start gap-3 border-b p-6', BORDER[spec.border]), children: [_jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [_jsx(Heading, { ref: headingRef, id: titleId, tabIndex: -1, className: cn('m-0 text-heading-md break-words outline-none', TITLE_INK[spec.titleInk]), children: title }), sub !== undefined && (_jsx(DSText, { as: "p", variant: "body-sm", id: subId, className: cn('m-0 break-words', SUB_INK[spec.subInk]), children: sub }))] }), _jsx(DSIconButton, { label: closeLabel, variant: "ghost", icon: _jsx(X, {}), onClick: requestClose, className: "-my-2 shrink-0" })] }), _jsx("div", { ref: bodyRef, ...(overflows ? { tabIndex: 0 } : {}), className: cn('min-h-0 flex-1 overflow-y-auto overscroll-contain p-6', overflows &&
|
|
169
|
+
'focusable focus-visible:-outline-offset-(--size-focus-ring-offset) focus-visible:shadow-none'), children: children }), footer !== undefined && (_jsxs("div", { className: cn('flex flex-none flex-wrap items-center justify-end gap-3 border-t p-4', BORDER[spec.border]), children: [count !== undefined && (_jsx(DSText, { as: "span", variant: "body-sm", className: cn('mr-auto', SUB_INK[spec.subInk]), children: count })), footer] }))] }));
|
|
168
170
|
return createPortal(_jsxs(_Fragment, { children: [modal && (_jsx("div", { "data-role": "drawer-scrim", "aria-hidden": "true", onClick: exiting ? undefined : requestClose, style: z === null ? undefined : { zIndex: z - 1 }, className: cn('fixed inset-0', SCRIM_BLUR_CLASS, exiting ? 'animate-fade-out' : 'animate-fade-in', SCRIM[spec.scrim]) })), floating ? (_jsx("div", { "data-role": "drawer-frame", style: z === null ? undefined : { zIndex: z }, className: FLOATING_FRAME[spec.direction], children: panel })) : (panel)] }), portalNode);
|
|
169
171
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import type { Forwarded } from '../props';
|
|
2
2
|
import { type KbdPlatform } from '../kbd/kbd';
|
|
3
3
|
import type { LabelColour, LabelItem } from '../label/label';
|
|
4
|
-
/** One action
|
|
4
|
+
/** One action, a leaf that can never hold a submenu of its own. */
|
|
5
5
|
export interface DropdownMenuLeaf {
|
|
6
|
-
/** `.pop-item`'s own text
|
|
6
|
+
/** `.pop-item`'s own text, the button's visible label. */
|
|
7
7
|
label: string;
|
|
8
|
-
/** `data-act
|
|
8
|
+
/** `data-act`, the opaque action key a caller's own `onAction` receives.
|
|
9
9
|
* This contract names nothing about what the action does. */
|
|
10
10
|
act: string;
|
|
11
11
|
/** Shows the item and refuses to choose it. It stays focusable, so a screen reader still hears it. */
|
|
12
12
|
disabled?: Forwarded<boolean>;
|
|
13
13
|
/** Draws the item in the destructive ink, where the caller placed it. */
|
|
14
14
|
destructive?: Forwarded<boolean>;
|
|
15
|
-
/** A key combination that does the same thing
|
|
15
|
+
/** A key combination that does the same thing, `'mod+c'`, `'shift+f'`, shown beside the item. */
|
|
16
16
|
shortcut?: Forwarded<string>;
|
|
17
17
|
/** A destination instead of an action: the item is a link. */
|
|
18
18
|
href?: Forwarded<string>;
|
|
19
|
-
/** The label colour this item wears as a dot before its text
|
|
19
|
+
/** The label colour this item wears as a dot before its text, for an item that applies or picks that label. */
|
|
20
20
|
labelColour?: Forwarded<LabelColour>;
|
|
21
21
|
/** The labels the record behind this item carries, drawn as dots after its text and read with its name. */
|
|
22
22
|
labels?: Forwarded<readonly LabelItem[]>;
|
|
@@ -44,7 +44,7 @@ export type DropdownMenuEntry = DropdownMenuItem | DropdownMenuSeparator;
|
|
|
44
44
|
* menu anchored to its trigger; native presents the same items as a bottom sheet.
|
|
45
45
|
*/
|
|
46
46
|
export interface DropdownMenuContract {
|
|
47
|
-
/** `.pop-item
|
|
47
|
+
/** `.pop-item`, the safe group, reached for by habit, with rules and group names between runs. */
|
|
48
48
|
items: readonly DropdownMenuEntry[];
|
|
49
49
|
/** Destructive actions, grouped apart below a divider. */
|
|
50
50
|
danger?: Forwarded<readonly DropdownMenuItem[]>;
|
|
@@ -60,7 +60,7 @@ export interface DropdownMenuItemSpec {
|
|
|
60
60
|
ink: DropdownMenuItemInkRole;
|
|
61
61
|
hoverSurface: DropdownMenuItemHoverSurfaceRole;
|
|
62
62
|
}
|
|
63
|
-
/** `.pop-item` vs `.pop-item-danger
|
|
63
|
+
/** `.pop-item` vs `.pop-item-danger`, the danger half CALLS `toneSpec('error')`
|
|
64
64
|
* rather than re-deriving `destructive`/`destructive-surface` by hand, the
|
|
65
65
|
* same discipline `delta.ts`'s `DELTA_SENTIMENT_SPECS` already holds itself
|
|
66
66
|
* to for the identical two CSS variables. See the header. */
|
|
@@ -74,7 +74,7 @@ export declare const DROPDOWN_MENU_ITEM_SPECS: {
|
|
|
74
74
|
readonly hoverSurface: "destructive-surface";
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
|
-
/** The one function an adapter calls per item
|
|
77
|
+
/** The one function an adapter calls per item, never re-derives the danger
|
|
78
78
|
* ink/surface itself. */
|
|
79
79
|
export declare function dropdownMenuItemSpec(danger: boolean): DropdownMenuItemSpec;
|
|
80
80
|
export type DropdownMenuSurfaceRole = 'background';
|
|
@@ -83,7 +83,7 @@ export interface DropdownMenuResolvedSpec {
|
|
|
83
83
|
surface: DropdownMenuSurfaceRole;
|
|
84
84
|
border: DropdownMenuBorderRole;
|
|
85
85
|
}
|
|
86
|
-
/** The container's own recipe
|
|
86
|
+
/** The container's own recipe, no size/tone/variant axis exists for it (the
|
|
87
87
|
* same "one recipe" shape `panelSpec()` takes no arguments for). */
|
|
88
88
|
export declare function dropdownMenuSpec(): DropdownMenuResolvedSpec;
|
|
89
89
|
/**
|
|
@@ -95,22 +95,22 @@ export declare function dropdownMenuSpec(): DropdownMenuResolvedSpec;
|
|
|
95
95
|
* already carries the label) or `aria-label`.
|
|
96
96
|
*/
|
|
97
97
|
export declare const DROPDOWN_MENU_NEEDS_A_NAME = "DSDropdownMenu takes no name of its own: pass aria-labelledby (the trigger id) or aria-label. role=\"menu\" computes no name from its items.";
|
|
98
|
-
export declare const DROPDOWN_MENU_NEEDS_A_TRIGGER = "A menu with no trigger of its own has nothing to return focus to on Escape or after a selection. Render your own element with aria-haspopup=\"menu\" and aria-expanded={open}
|
|
99
|
-
/** THE RELATIVE WRAPPER IS NO LONGER REQUIRED
|
|
98
|
+
export declare const DROPDOWN_MENU_NEEDS_A_TRIGGER = "A menu with no trigger of its own has nothing to return focus to on Escape or after a selection. Render your own element with aria-haspopup=\"menu\" and aria-expanded={open} and open the menu from it. DSDropdownMenu captures it automatically via document.activeElement.";
|
|
99
|
+
/** THE RELATIVE WRAPPER IS NO LONGER REQUIRED and this constant now says so
|
|
100
100
|
* rather than being deleted.
|
|
101
101
|
*
|
|
102
102
|
* It used to read: render the menu and its trigger inside a `relative`
|
|
103
103
|
* container, the role `.pop-anchor` plays in the source. That was the caller's
|
|
104
|
-
* half of a rule this component should never have needed them for
|
|
104
|
+
* half of a rule this component should never have needed them for, it
|
|
105
105
|
* positioned itself `absolute`, so it depended on an ancestor it did not own,
|
|
106
106
|
* and any ancestor with hidden overflow then clipped it. The dialog panel is
|
|
107
107
|
* one, so a menu opened inside a dialog was cut off at the panel's edge.
|
|
108
108
|
*
|
|
109
109
|
* The menu is measured and placed against the viewport now. A caller who still
|
|
110
|
-
* has the `relative` wrapper is not broken by this
|
|
111
|
-
* no longer consulted
|
|
110
|
+
* has the `relative` wrapper is not broken by this, a positioned box is simply
|
|
111
|
+
* no longer consulted, which is why the requirement could be dropped without
|
|
112
112
|
* waiting for a version boundary. The export stays so nothing importing it
|
|
113
|
-
* breaks
|
|
113
|
+
* breaks and so the next reader finds the answer where the question was. */
|
|
114
114
|
export declare const DROPDOWN_MENU_NEEDS_A_RELATIVE_ANCHOR = "DSDropdownMenu measures its trigger and places itself against the viewport, so it no longer needs a `relative` container. A wrapper you already have is harmless; a new one is unnecessary.";
|
|
115
115
|
export declare const DROPDOWN_MENU_SURFACE_ROLES: readonly ["background"];
|
|
116
116
|
export declare const DROPDOWN_MENU_BORDER_ROLES: readonly ["border"];
|
|
@@ -172,7 +172,7 @@ export declare const DROPDOWN_MENU_DANGER_SECTION = "__dropdown-menu-danger";
|
|
|
172
172
|
export declare function dropdownMenuSections<T extends DropdownMenuItem>(entries: readonly (T | DropdownMenuSeparator)[], danger?: readonly T[]): DropdownMenuSection<T>[];
|
|
173
173
|
/** Every item the arrow keys walk, in order. */
|
|
174
174
|
export declare function dropdownMenuWalk<T extends DropdownMenuItem>(sections: readonly DropdownMenuSection<T>[]): DropdownMenuRow<T>[];
|
|
175
|
-
/** Whether a row is destructive
|
|
175
|
+
/** Whether a row is destructive, by its own flag or by sitting in the `danger` group. */
|
|
176
176
|
export declare function dropdownMenuRowIsDestructive(row: {
|
|
177
177
|
item: DropdownMenuLeaf;
|
|
178
178
|
danger: boolean;
|
|
@@ -202,6 +202,6 @@ export declare function dropdownMenuIsTypeaheadKey(event: {
|
|
|
202
202
|
metaKey: boolean;
|
|
203
203
|
altKey: boolean;
|
|
204
204
|
}): boolean;
|
|
205
|
-
/** A shortcut in the `aria-keyshortcuts` spelling
|
|
205
|
+
/** A shortcut in the `aria-keyshortcuts` spelling, `'mod+c'` → `'Meta+C'` on a Command-key keyboard, `'Control+C'` elsewhere. */
|
|
206
206
|
export declare function dropdownMenuAriaShortcut(combo: string, platform: KbdPlatform): string;
|
|
207
207
|
export declare const DROPDOWN_MENU_DISABLED_INK_ROLES: readonly ["disabled-foreground"];
|
|
@@ -11,7 +11,7 @@ export function dropdownMenuSpec() {
|
|
|
11
11
|
return { surface: 'background', border: 'border' };
|
|
12
12
|
}
|
|
13
13
|
export const DROPDOWN_MENU_NEEDS_A_NAME = 'DSDropdownMenu takes no name of its own: pass aria-labelledby (the trigger id) or aria-label. role="menu" computes no name from its items.';
|
|
14
|
-
export const DROPDOWN_MENU_NEEDS_A_TRIGGER = 'A menu with no trigger of its own has nothing to return focus to on Escape or after a selection. Render your own element with aria-haspopup="menu" and aria-expanded={open}
|
|
14
|
+
export const DROPDOWN_MENU_NEEDS_A_TRIGGER = 'A menu with no trigger of its own has nothing to return focus to on Escape or after a selection. Render your own element with aria-haspopup="menu" and aria-expanded={open} and open the menu from it. DSDropdownMenu captures it automatically via document.activeElement.';
|
|
15
15
|
export const DROPDOWN_MENU_NEEDS_A_RELATIVE_ANCHOR = 'DSDropdownMenu measures its trigger and places itself against the viewport, so it no longer needs a `relative` container. A wrapper you already have is harmless; a new one is unnecessary.';
|
|
16
16
|
export const DROPDOWN_MENU_SURFACE_ROLES = ['background'];
|
|
17
17
|
export const DROPDOWN_MENU_BORDER_ROLES = ['border'];
|