@tfn-design/design-system 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/accordion/accordion.d.ts +1 -1
- package/dist/accordion/accordion.js +1 -1
- package/dist/accordion/web/ds-accordion.js +5 -4
- package/dist/account-password-field/account-password-field.js +1 -1
- package/dist/account-switcher/account-switcher.d.ts +11 -4
- package/dist/account-switcher/account-switcher.js +2 -1
- package/dist/account-switcher/web/ds-account-switcher.js +12 -4
- package/dist/ai-attachment/ai-attachment.d.ts +1 -1
- package/dist/ai-attachment/ai-attachment.js +1 -1
- package/dist/ai-attachment/web/ds-ai-attachment.js +1 -1
- package/dist/ai-branch-switcher/web/ds-ai-branch-switcher.js +2 -2
- package/dist/ai-composer/ai-composer.d.ts +1 -1
- package/dist/ai-composer/ai-composer.js +1 -1
- package/dist/ai-composer/native/ds-ai-composer.js +4 -2
- package/dist/ai-composer/web/ds-ai-composer.js +2 -3
- package/dist/ai-confirmation/ai-confirmation.d.ts +19 -3
- package/dist/ai-confirmation/ai-confirmation.js +18 -3
- package/dist/ai-confirmation/native/ds-ai-confirmation.js +18 -13
- package/dist/ai-confirmation/web/ds-ai-confirmation.d.ts +1 -1
- package/dist/ai-confirmation/web/ds-ai-confirmation.js +22 -11
- package/dist/ai-context-scope/ai-context-scope.d.ts +10 -2
- package/dist/ai-context-scope/ai-context-scope.js +11 -2
- package/dist/ai-context-scope/native/ds-ai-context-scope.js +4 -3
- package/dist/ai-context-scope/web/ds-ai-context-scope.js +19 -5
- package/dist/ai-conversation-list/ai-conversation-list.d.ts +16 -0
- package/dist/ai-conversation-list/ai-conversation-list.js +8 -0
- package/dist/ai-conversation-list/web/ds-ai-conversation-list.d.ts +10 -6
- package/dist/ai-conversation-list/web/ds-ai-conversation-list.js +89 -47
- package/dist/ai-diff/ai-diff.d.ts +13 -1
- package/dist/ai-diff/ai-diff.js +12 -1
- package/dist/ai-diff/native/ds-ai-diff.d.ts +1 -1
- package/dist/ai-diff/native/ds-ai-diff.js +4 -6
- package/dist/ai-diff/web/ds-ai-diff.d.ts +0 -4
- package/dist/ai-diff/web/ds-ai-diff.js +16 -9
- package/dist/ai-draft-panel/ai-draft-panel.d.ts +2 -0
- package/dist/ai-draft-panel/ai-draft-panel.js +5 -0
- package/dist/ai-draft-panel/web/ds-ai-draft-panel.d.ts +3 -1
- package/dist/ai-draft-panel/web/ds-ai-draft-panel.js +4 -4
- package/dist/ai-empty-state/native/ds-ai-empty-state.js +2 -2
- package/dist/ai-empty-state/web/ds-ai-empty-state.js +3 -1
- package/dist/ai-error-state/ai-error-state.d.ts +2 -2
- package/dist/ai-error-state/ai-error-state.js +2 -2
- package/dist/ai-error-state/native/ds-ai-error-state.d.ts +5 -1
- package/dist/ai-error-state/native/ds-ai-error-state.js +2 -1
- package/dist/ai-error-state/web/ds-ai-error-state.d.ts +5 -1
- package/dist/ai-error-state/web/ds-ai-error-state.js +3 -2
- package/dist/ai-label/native/ds-ai-label.js +2 -1
- package/dist/ai-label/web/ds-ai-label.js +1 -1
- package/dist/ai-message/ai-message.d.ts +1 -1
- package/dist/ai-message/ai-message.js +1 -1
- package/dist/ai-message/native/ds-ai-message.js +4 -3
- package/dist/ai-message/web/ds-ai-message-markdown.js +3 -3
- package/dist/ai-message/web/ds-ai-message.js +4 -3
- package/dist/ai-message-actions/ai-message-actions.d.ts +1 -1
- package/dist/ai-message-actions/ai-message-actions.js +1 -1
- package/dist/ai-message-actions/native/ds-ai-message-actions.js +1 -1
- package/dist/ai-message-actions/web/ds-ai-message-actions.js +1 -1
- package/dist/ai-plan/ai-plan.d.ts +1 -1
- package/dist/ai-plan/ai-plan.js +1 -1
- package/dist/ai-plan/web/ds-ai-plan.js +2 -2
- package/dist/ai-side-nav/web/ds-ai-side-nav.js +4 -3
- package/dist/ai-summary-card/native/ds-ai-summary-card.js +2 -1
- package/dist/ai-summary-card/web/ds-ai-summary-card.js +2 -1
- package/dist/ai-thread/web/ds-ai-thread.js +1 -1
- package/dist/ai-tool-call/ai-tool-call.d.ts +1 -1
- package/dist/ai-tool-call/ai-tool-call.js +1 -1
- package/dist/ai-tool-call/native/ds-ai-tool-call.js +3 -2
- package/dist/ai-tool-call/web/ds-ai-tool-call.js +4 -3
- package/dist/alert/native/ds-alert.js +4 -4
- package/dist/alert/web/ds-alert.js +5 -5
- package/dist/ambient-gradient/ambient-gradient.d.ts +1 -1
- package/dist/amount/amount.d.ts +1 -1
- package/dist/amount/amount.js +3 -2
- package/dist/amount/native/ds-amount.js +1 -1
- package/dist/amount/web/ds-amount.js +1 -1
- package/dist/amount-cell/amount-cell.d.ts +5 -2
- package/dist/amount-cell/web/ds-amount-cell.d.ts +1 -1
- package/dist/amount-cell/web/ds-amount-cell.js +7 -1
- package/dist/amount-entry/amount-entry.d.ts +28 -2
- package/dist/amount-entry/amount-entry.js +19 -12
- package/dist/amount-entry/native/ds-amount-entry.d.ts +1 -1
- package/dist/amount-entry/native/ds-amount-entry.js +5 -4
- package/dist/amount-entry/web/ds-amount-entry.d.ts +1 -1
- package/dist/amount-entry/web/ds-amount-entry.js +5 -4
- package/dist/app-shell/app-shell.d.ts +2 -0
- package/dist/app-shell/web/ds-app-shell.js +26 -3
- package/dist/approval-chain/approval-chain.d.ts +6 -2
- package/dist/approval-chain/approval-chain.js +4 -4
- package/dist/approval-chain/native/ds-approval-chain.js +16 -9
- package/dist/approval-chain/web/ds-approval-chain.d.ts +7 -1
- package/dist/approval-chain/web/ds-approval-chain.js +12 -11
- package/dist/auth-shell/web/ds-auth-shell.d.ts +5 -1
- package/dist/auth-shell/web/ds-auth-shell.js +5 -2
- package/dist/balance-header/balance-header.d.ts +8 -4
- package/dist/balance-header/native/ds-balance-header.d.ts +3 -3
- package/dist/balance-header/native/ds-balance-header.js +11 -4
- package/dist/balance-header/web/ds-balance-header.d.ts +1 -1
- package/dist/balance-header/web/ds-balance-header.js +7 -4
- package/dist/bar-chart/bar-chart.d.ts +46 -5
- package/dist/bar-chart/bar-chart.js +64 -6
- package/dist/bar-chart/web/ds-bar-chart.d.ts +21 -4
- package/dist/bar-chart/web/ds-bar-chart.js +121 -50
- package/dist/bottom-nav/bottom-nav.d.ts +8 -3
- package/dist/bottom-nav/bottom-nav.js +2 -2
- package/dist/bottom-nav/web/ds-bottom-nav.js +2 -2
- package/dist/box-plot/box-plot.d.ts +150 -0
- package/dist/box-plot/box-plot.js +124 -0
- package/dist/box-plot/web/ds-box-plot.d.ts +8 -0
- package/dist/box-plot/web/ds-box-plot.js +57 -0
- package/dist/brand-lockup/native/ds-brand-lockup.js +1 -1
- package/dist/brand-provider/brand-provider.d.ts +29 -0
- package/dist/brand-provider/brand-provider.js +9 -0
- package/dist/brand-provider/native/ds-brand-provider.d.ts +11 -0
- package/dist/brand-provider/native/ds-brand-provider.js +18 -0
- package/dist/brand-provider/web/ds-brand-provider.d.ts +10 -0
- package/dist/brand-provider/web/ds-brand-provider.js +20 -0
- package/dist/bullet-chart/bullet-chart.d.ts +12 -7
- package/dist/bullet-chart/bullet-chart.js +5 -4
- package/dist/bullet-chart/web/ds-bullet-chart.d.ts +1 -1
- package/dist/bullet-chart/web/ds-bullet-chart.js +9 -4
- package/dist/button/button.d.ts +1 -1
- package/dist/button/native/ds-button.js +2 -2
- package/dist/button/web/ds-button.js +1 -1
- package/dist/button-group/button-group.d.ts +1 -1
- package/dist/button-group/web/ds-button-group.d.ts +2 -2
- package/dist/calendar/calendar.d.ts +13 -2
- package/dist/calendar/calendar.js +4 -3
- package/dist/calendar/web/ds-calendar.d.ts +1 -1
- package/dist/calendar/web/ds-calendar.js +6 -5
- package/dist/card-carousel/native/ds-card-carousel.js +1 -1
- package/dist/card-carousel/web/ds-card-carousel.js +2 -2
- package/dist/chart/chart.d.ts +180 -64
- package/dist/chart/chart.js +367 -118
- package/dist/chart/web/ds-chart.d.ts +17 -7
- package/dist/chart/web/ds-chart.js +85 -108
- package/dist/check-option/check-option.d.ts +1 -1
- package/dist/check-option/check-option.js +1 -1
- package/dist/check-option/web/ds-check-option.d.ts +6 -1
- package/dist/check-option/web/ds-check-option.js +10 -6
- package/dist/checkbox/checkbox.d.ts +2 -2
- package/dist/checkbox/checkbox.js +2 -2
- package/dist/checkbox/native/ds-checkbox.js +1 -1
- package/dist/checkbox/web/checkbox-mark.js +1 -1
- package/dist/checkbox/web/ds-checkbox.d.ts +2 -2
- package/dist/checkbox/web/ds-checkbox.js +17 -6
- package/dist/chip/chip.d.ts +11 -11
- package/dist/chip/chip.js +5 -3
- package/dist/chip/native/ds-chip.js +1 -1
- package/dist/chip/web/ds-chip.js +6 -6
- package/dist/code-block/web/ds-code-block.js +3 -3
- package/dist/column-picker/web/ds-column-picker.js +2 -1
- package/dist/combobox/combobox.d.ts +2 -2
- package/dist/combobox/web/ds-combobox.js +4 -2
- package/dist/command-palette/command-palette.d.ts +4 -0
- package/dist/comment-thread/comment-thread.d.ts +2 -2
- package/dist/comment-thread/comment-thread.js +2 -2
- package/dist/comment-thread/native/ds-comment-thread.js +10 -9
- package/dist/comment-thread/web/ds-comment-thread.js +11 -10
- package/dist/condition-builder/condition-builder.d.ts +96 -4
- package/dist/condition-builder/condition-builder.js +68 -28
- package/dist/condition-builder/web/ds-condition-builder.d.ts +4 -2
- package/dist/condition-builder/web/ds-condition-builder.js +97 -57
- package/dist/context-switcher/context-switcher.d.ts +10 -1
- package/dist/context-switcher/context-switcher.js +5 -2
- package/dist/context-switcher/web/ds-context-switcher.d.ts +1 -1
- package/dist/context-switcher/web/ds-context-switcher.js +4 -3
- package/dist/coordinate-field/coordinate-field.d.ts +46 -5
- package/dist/coordinate-field/coordinate-field.js +35 -18
- package/dist/coordinate-field/native/ds-coordinate-field.d.ts +1 -1
- package/dist/coordinate-field/native/ds-coordinate-field.js +9 -8
- package/dist/coordinate-field/web/ds-coordinate-field.d.ts +1 -1
- package/dist/coordinate-field/web/ds-coordinate-field.js +10 -9
- package/dist/copy-field/copy-field.d.ts +23 -9
- package/dist/copy-field/copy-field.js +11 -6
- package/dist/copy-field/web/ds-copy-field.d.ts +1 -1
- package/dist/copy-field/web/ds-copy-field.js +6 -5
- package/dist/copy.d.ts +8 -0
- package/dist/copy.js +7 -0
- package/dist/count-badge/web/ds-count-badge.js +1 -1
- package/dist/countdown/native/ds-countdown.js +1 -1
- package/dist/countdown/web/ds-countdown.js +1 -1
- package/dist/dashboard-shell/dashboard-shell.d.ts +4 -2
- package/dist/data-table/web/data-table-theme.css +340 -52
- package/dist/data-table/web/ds-data-table.d.ts +43 -1
- package/dist/data-table/web/ds-data-table.js +165 -17
- package/dist/date-field/web/ds-date-field.d.ts +1 -1
- package/dist/date-field/web/ds-date-field.js +6 -5
- package/dist/date-input/date-input.d.ts +26 -5
- package/dist/date-input/date-input.js +34 -2
- package/dist/date-input/web/ds-date-input.js +13 -4
- package/dist/date-picker/date-picker.d.ts +38 -67
- package/dist/date-picker/date-picker.js +26 -60
- package/dist/date-picker/web/ds-date-picker.d.ts +13 -6
- package/dist/date-picker/web/ds-date-picker.js +41 -10
- package/dist/date-range-picker/web/ds-date-range-picker.d.ts +10 -4
- package/dist/date-range-picker/web/ds-date-range-picker.js +8 -5
- package/dist/day-picker/day-picker.d.ts +1 -1
- package/dist/day-picker/web/ds-day-picker.js +1 -1
- package/dist/delta/delta.d.ts +15 -1
- package/dist/delta/delta.js +20 -0
- package/dist/delta/native/ds-delta.d.ts +5 -2
- package/dist/delta/native/ds-delta.js +4 -3
- package/dist/delta/web/ds-delta.d.ts +5 -2
- package/dist/delta/web/ds-delta.js +4 -3
- package/dist/description-list/description-list.d.ts +4 -2
- package/dist/description-list/native/ds-description-list.d.ts +2 -2
- package/dist/description-list/native/ds-description-list.js +49 -27
- package/dist/description-list/web/ds-description-list.d.ts +2 -2
- package/dist/description-list/web/ds-description-list.js +40 -17
- package/dist/dialog/dialog.d.ts +12 -1
- package/dist/dialog/web/ds-dialog.d.ts +1 -1
- package/dist/dialog/web/ds-dialog.js +5 -3
- package/dist/diverging-bar-chart/diverging-bar-chart.d.ts +2 -1
- package/dist/diverging-bar-chart/diverging-bar-chart.js +2 -1
- package/dist/diverging-bar-chart/web/ds-diverging-bar-chart.d.ts +1 -1
- package/dist/diverging-bar-chart/web/ds-diverging-bar-chart.js +28 -5
- package/dist/donut-chart/donut-chart.d.ts +7 -1
- package/dist/donut-chart/donut-chart.js +4 -0
- package/dist/donut-chart/web/ds-donut-chart.d.ts +4 -1
- package/dist/donut-chart/web/ds-donut-chart.js +43 -24
- package/dist/drawer/drawer.d.ts +42 -5
- package/dist/drawer/drawer.js +10 -4
- package/dist/drawer/native/ds-drawer.d.ts +1 -1
- package/dist/drawer/native/ds-drawer.js +17 -7
- package/dist/drawer/web/ds-drawer.d.ts +1 -1
- package/dist/drawer/web/ds-drawer.js +32 -17
- package/dist/dropdown-menu/dropdown-menu.d.ts +10 -5
- package/dist/dropdown-menu/dropdown-menu.js +13 -4
- package/dist/dropdown-menu/web/ds-dropdown-menu-surface.d.ts +4 -2
- package/dist/dropdown-menu/web/ds-dropdown-menu-surface.js +6 -6
- package/dist/dropdown-menu/web/ds-dropdown-menu.d.ts +5 -2
- package/dist/dropdown-menu/web/ds-dropdown-menu.js +2 -2
- package/dist/dumbbell-chart/dumbbell-chart.d.ts +10 -9
- package/dist/dumbbell-chart/dumbbell-chart.js +18 -4
- package/dist/dumbbell-chart/web/ds-dumbbell-chart.d.ts +4 -1
- package/dist/dumbbell-chart/web/ds-dumbbell-chart.js +13 -3
- package/dist/editable-row/editable-row.d.ts +5 -1
- package/dist/editable-row/editable-row.js +7 -1
- package/dist/editable-row/web/ds-editable-row.js +7 -5
- package/dist/empty-state/empty-state.d.ts +39 -0
- package/dist/empty-state/empty-state.js +21 -0
- package/dist/empty-state/web/ds-empty-state.d.ts +19 -8
- package/dist/empty-state/web/ds-empty-state.js +15 -3
- package/dist/environment-banner/environment-banner.d.ts +1 -1
- package/dist/environment-banner/environment-banner.js +1 -1
- package/dist/environment-banner/web/ds-environment-banner.js +3 -3
- package/dist/evaluation-trace/evaluation-trace.d.ts +1 -1
- package/dist/evaluation-trace/evaluation-trace.js +1 -1
- package/dist/evaluation-trace/web/ds-evaluation-trace.js +1 -1
- 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 +9 -1
- package/dist/facet-button/facet-button.js +2 -2
- package/dist/facet-button/web/ds-facet-button.d.ts +1 -1
- package/dist/facet-button/web/ds-facet-button.js +9 -5
- package/dist/facet-menu/facet-menu.d.ts +1 -1
- package/dist/facet-menu/facet-menu.js +2 -1
- package/dist/facet-menu/web/ds-facet-menu.js +1 -1
- package/dist/fact/native/ds-fact.d.ts +4 -1
- package/dist/file-dropzone/file-dropzone.d.ts +54 -5
- package/dist/file-dropzone/file-dropzone.js +38 -20
- package/dist/file-dropzone/web/ds-file-dropzone.d.ts +1 -1
- package/dist/file-dropzone/web/ds-file-dropzone.js +16 -15
- package/dist/file-field/file-field.d.ts +26 -5
- package/dist/file-field/file-field.js +18 -8
- package/dist/file-field/web/ds-file-field.d.ts +5 -2
- package/dist/file-field/web/ds-file-field.js +6 -5
- package/dist/file-import/file-import.d.ts +50 -4
- package/dist/file-import/file-import.js +30 -11
- package/dist/file-import/web/ds-file-import.d.ts +7 -3
- package/dist/file-import/web/ds-file-import.js +11 -10
- package/dist/file-upload/file-upload.d.ts +64 -15
- package/dist/file-upload/file-upload.js +44 -30
- package/dist/file-upload/web/ds-file-upload.d.ts +11 -2
- package/dist/file-upload/web/ds-file-upload.js +17 -12
- package/dist/filter-bar/web/ds-filter-bar.js +1 -1
- package/dist/filter-button/filter-button.d.ts +5 -4
- package/dist/filter-button/filter-button.js +1 -1
- package/dist/filter-chip/web/ds-filter-chip.js +2 -2
- package/dist/filter-popover/web/ds-filter-popover.js +2 -1
- package/dist/form-field-group/form-field-group.d.ts +7 -2
- package/dist/form-field-group/form-field-group.js +2 -0
- package/dist/form-field-group/web/ds-form-field-group.js +2 -1
- package/dist/form-section/form-section.d.ts +4 -2
- package/dist/form-section/form-section.js +1 -1
- package/dist/funnel/funnel.d.ts +2 -1
- package/dist/funnel/web/ds-funnel.d.ts +1 -1
- package/dist/funnel/web/ds-funnel.js +22 -12
- package/dist/gauge/gauge.d.ts +6 -1
- package/dist/gauge/gauge.js +9 -1
- package/dist/gauge/web/ds-gauge.d.ts +8 -3
- package/dist/gauge/web/ds-gauge.js +26 -15
- package/dist/geo/geo.d.ts +15 -0
- package/dist/geo/geo.js +112 -0
- package/dist/geofence-editor/geofence-editor.d.ts +14 -5
- package/dist/geofence-editor/geofence-editor.js +32 -7
- package/dist/geofence-editor/web/ds-geofence-editor.d.ts +18 -3
- package/dist/geofence-editor/web/ds-geofence-editor.js +28 -13
- package/dist/group-header/web/ds-group-header.d.ts +1 -1
- package/dist/heatmap/heatmap-calendar.d.ts +95 -0
- package/dist/heatmap/heatmap-calendar.js +130 -0
- package/dist/heatmap/heatmap.d.ts +35 -8
- package/dist/heatmap/heatmap.js +61 -7
- package/dist/heatmap/web/ds-heatmap-calendar.d.ts +22 -0
- package/dist/heatmap/web/ds-heatmap-calendar.js +33 -0
- package/dist/heatmap/web/ds-heatmap.d.ts +21 -1
- package/dist/heatmap/web/ds-heatmap.js +59 -31
- package/dist/helper-text/native/ds-helper-text.js +2 -2
- package/dist/helper-text/web/ds-helper-text.js +2 -2
- package/dist/histogram/histogram.d.ts +2 -3
- package/dist/histogram/web/ds-histogram.d.ts +1 -1
- package/dist/histogram/web/ds-histogram.js +8 -2
- package/dist/icon/icon.d.ts +11 -0
- package/dist/icon/icon.js +52 -0
- package/dist/icon/native/ds-icon-provider.d.ts +6 -1
- package/dist/icon/native/ds-icon-provider.js +4 -2
- package/dist/icon/native/icon-direction.d.ts +10 -0
- package/dist/icon/native/icon-direction.js +6 -0
- package/dist/icon/native/use-icon-size.d.ts +6 -0
- package/dist/icon/native/use-icon-size.js +12 -0
- package/dist/icon/web/ds-icon-provider.d.ts +3 -1
- package/dist/icon/web/ds-icon-provider.js +1 -0
- package/dist/icon/web/icon-direction.css +45 -0
- package/dist/icon-button/icon-button.d.ts +6 -0
- package/dist/icon-button/native/ds-icon-button.d.ts +1 -1
- package/dist/icon-button/native/ds-icon-button.js +2 -1
- package/dist/icon-button/web/ds-icon-button.d.ts +1 -1
- package/dist/icon-button/web/ds-icon-button.js +8 -5
- package/dist/icon-frame/icon-frame.d.ts +2 -2
- package/dist/icon-frame/native/ds-icon-frame.js +3 -3
- package/dist/icon-frame/web/ds-icon-frame.js +3 -3
- package/dist/ident/ident.d.ts +2 -0
- package/dist/ident/ident.js +5 -0
- package/dist/ident/native/ds-ident.d.ts +30 -0
- package/dist/ident/native/ds-ident.js +13 -0
- package/dist/index.d.ts +88 -65
- package/dist/index.js +47 -36
- package/dist/inline-edit/inline-edit.d.ts +34 -4
- package/dist/inline-edit/inline-edit.js +19 -7
- package/dist/inline-edit/web/ds-inline-edit.d.ts +1 -1
- package/dist/inline-edit/web/ds-inline-edit.js +13 -8
- package/dist/input/input.d.ts +18 -5
- package/dist/input/input.js +17 -13
- package/dist/input/native/ds-input.js +1 -1
- package/dist/input/web/ds-input.d.ts +7 -1
- package/dist/input/web/ds-input.js +11 -9
- package/dist/interaction.d.ts +7 -5
- package/dist/interaction.js +1 -1
- package/dist/json-viewer/web/ds-json-viewer.js +1 -1
- package/dist/key-value-editor/key-value-editor.d.ts +57 -3
- package/dist/key-value-editor/key-value-editor.js +56 -26
- package/dist/key-value-editor/web/ds-key-value-editor.d.ts +1 -1
- package/dist/key-value-editor/web/ds-key-value-editor.js +15 -16
- package/dist/keypad/keypad.d.ts +21 -11
- package/dist/keypad/keypad.js +16 -10
- package/dist/keypad/native/ds-keypad.d.ts +1 -1
- package/dist/keypad/native/ds-keypad.js +10 -8
- package/dist/keypad/web/ds-keypad.d.ts +1 -1
- package/dist/keypad/web/ds-keypad.js +5 -4
- package/dist/label-picker/label-picker.d.ts +34 -4
- package/dist/label-picker/label-picker.js +28 -17
- package/dist/label-picker/native/ds-label-picker.d.ts +1 -1
- package/dist/label-picker/native/ds-label-picker.js +11 -10
- package/dist/label-picker/web/ds-label-picker.d.ts +1 -1
- package/dist/label-picker/web/ds-label-picker.js +11 -10
- package/dist/labeled-field/labeled-field.d.ts +17 -2
- package/dist/labeled-field/labeled-field.js +7 -5
- package/dist/labeled-field/web/ds-labeled-field.d.ts +1 -1
- package/dist/labeled-field/web/ds-labeled-field.js +6 -2
- package/dist/leaderboard/leaderboard.d.ts +4 -3
- package/dist/leaderboard/leaderboard.js +4 -1
- package/dist/leaderboard/web/ds-leaderboard.d.ts +1 -1
- package/dist/leaderboard/web/ds-leaderboard.js +8 -3
- package/dist/legend/legend.d.ts +4 -0
- package/dist/legend/legend.js +1 -0
- package/dist/legend/web/ds-legend.js +18 -11
- package/dist/lib/chart-context.d.ts +23 -3
- package/dist/lib/chart-context.js +9 -3
- package/dist/lib/chart-finish.d.ts +13 -6
- package/dist/lib/chart-finish.js +8 -2
- package/dist/lib/chart-library.d.ts +1 -1
- package/dist/lib/chart-series.d.ts +7 -4
- package/dist/lib/chart-series.js +2 -4
- package/dist/lib/chart-ticks.d.ts +11 -0
- package/dist/lib/chart-ticks.js +11 -0
- package/dist/lib/chart-value.d.ts +1 -1
- package/dist/lib/chart-value.js +3 -1
- package/dist/lib/cn.d.ts +1 -0
- package/dist/lib/cn.js +7 -2
- package/dist/lib/native/animated.d.ts +4 -5
- package/dist/lib/native/animated.js +3 -4
- package/dist/lib/time-of-day.d.ts +21 -0
- package/dist/lib/time-of-day.js +37 -0
- package/dist/lib/web/chart-finish.d.ts +1 -1
- package/dist/lib/web/chart-finish.js +1 -1
- package/dist/lib/web/density.d.ts +1 -0
- package/dist/lib/web/density.js +7 -0
- package/dist/lib/web/focus-habits.js +20 -8
- package/dist/lib/web/focus-trap.d.ts +10 -0
- package/dist/lib/web/focus-trap.js +4 -1
- package/dist/lib/web/live-announcer.d.ts +2 -0
- package/dist/lib/web/live-announcer.js +2 -1
- package/dist/lib/web/touch-target.d.ts +4 -4
- package/dist/lib/web/touch-target.js +3 -3
- package/dist/lib/web/use-anchored-surface.js +3 -2
- package/dist/lib/web/use-overlay.js +7 -1
- package/dist/list-page/list-page.d.ts +2 -1
- package/dist/list-page/web/ds-list-page.js +1 -5
- package/dist/list-row/list-row.d.ts +6 -6
- package/dist/list-row/list-row.js +4 -5
- package/dist/list-row/native/ds-list-row.js +7 -2
- package/dist/list-row/web/ds-list-row-group.d.ts +6 -2
- package/dist/list-row/web/ds-list-row-group.js +4 -2
- package/dist/list-row/web/ds-list-row.js +9 -9
- package/dist/loading-screen/native/ds-loading-screen.js +1 -1
- package/dist/log-viewer/log-viewer.d.ts +2 -2
- package/dist/log-viewer/log-viewer.js +1 -1
- package/dist/log-viewer/web/ds-log-viewer.js +6 -5
- package/dist/map/map.d.ts +5 -0
- package/dist/map/map.js +2 -0
- package/dist/map/web/ds-map.js +9 -3
- package/dist/map-banner/native/ds-map-banner.js +3 -3
- package/dist/map-banner/web/ds-map-banner.js +4 -4
- package/dist/map-controls/map-controls.d.ts +3 -5
- package/dist/map-controls/map-controls.js +4 -4
- package/dist/map-controls/native/ds-map-controls.js +1 -1
- package/dist/map-controls/web/ds-map-controls.js +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 +1 -1
- 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 +4 -2
- package/dist/map-layers/native/ds-map-layers.js +5 -4
- package/dist/map-layers/web/ds-map-layers.js +4 -4
- package/dist/map-list/map-list.d.ts +2 -1
- package/dist/map-list/web/ds-map-list.d.ts +1 -1
- package/dist/map-list/web/ds-map-list.js +19 -16
- package/dist/map-marker/map-marker.d.ts +5 -0
- package/dist/map-marker/map-marker.js +6 -0
- package/dist/map-marker/web/ds-map-marker.d.ts +12 -3
- package/dist/map-marker/web/ds-map-marker.js +18 -8
- package/dist/map-search/map-search.d.ts +9 -0
- package/dist/map-search/map-search.js +13 -0
- package/dist/map-search/native/ds-map-search.d.ts +10 -3
- package/dist/map-search/native/ds-map-search.js +32 -19
- package/dist/map-search/web/ds-map-search.d.ts +8 -3
- package/dist/map-search/web/ds-map-search.js +37 -27
- package/dist/map-search-area/native/ds-map-search-area.js +2 -1
- package/dist/map-search-area/web/ds-map-search-area.js +2 -1
- package/dist/map-sheet/native/ds-map-sheet.js +1 -1
- package/dist/map-sheet/web/ds-map-sheet.js +2 -2
- package/dist/map-summary/map-summary.d.ts +2 -1
- package/dist/map-summary/web/ds-map-summary.d.ts +2 -2
- package/dist/map-summary/web/ds-map-summary.js +18 -9
- package/dist/mention-input/mention-input.d.ts +23 -2
- package/dist/mention-input/mention-input.js +15 -8
- package/dist/mention-input/native/ds-mention-input.d.ts +1 -1
- package/dist/mention-input/native/ds-mention-input.js +6 -9
- package/dist/mention-input/web/ds-mention-input.d.ts +1 -1
- package/dist/mention-input/web/ds-mention-input.js +6 -5
- package/dist/menu-button/web/ds-menu-button.d.ts +2 -2
- package/dist/menu-button/web/ds-menu-button.js +9 -4
- package/dist/meter/meter.d.ts +5 -2
- package/dist/meter/meter.js +2 -1
- package/dist/meter/native/ds-meter.d.ts +2 -2
- package/dist/meter/native/ds-meter.js +13 -3
- package/dist/meter/web/ds-meter.d.ts +1 -1
- package/dist/meter/web/ds-meter.js +16 -9
- package/dist/metric/metric.d.ts +13 -9
- package/dist/metric/native/ds-metric.d.ts +1 -1
- package/dist/metric/native/ds-metric.js +26 -16
- package/dist/metric/web/ds-metric.d.ts +1 -1
- package/dist/metric/web/ds-metric.js +21 -5
- package/dist/metric-card/metric-card.d.ts +4 -3
- package/dist/metric-card/web/ds-metric-card.d.ts +1 -1
- package/dist/metric-card/web/ds-metric-card.js +4 -2
- package/dist/month-picker/web/ds-month-picker.js +2 -1
- package/dist/month-strip/web/ds-month-strip.js +1 -1
- package/dist/motion.d.ts +18 -3
- package/dist/motion.js +3 -1
- package/dist/multi-select/multi-select.d.ts +39 -9
- package/dist/multi-select/multi-select.js +35 -22
- package/dist/multi-select/web/ds-multi-select.d.ts +1 -1
- package/dist/multi-select/web/ds-multi-select.js +42 -24
- package/dist/native.d.ts +12 -0
- package/dist/native.js +8 -0
- package/dist/notification-list/native/ds-notification-list.d.ts +1 -1
- package/dist/notification-list/native/ds-notification-list.js +14 -7
- package/dist/notification-list/notification-list.d.ts +2 -1
- package/dist/notification-list/web/ds-notification-list.d.ts +1 -1
- package/dist/notification-list/web/ds-notification-list.js +10 -4
- package/dist/number-field/native/ds-number-field.js +1 -1
- package/dist/number-field/web/ds-number-field.js +1 -1
- package/dist/otp/native/ds-otp-field.js +3 -21
- package/dist/otp/native/ds-otp.js +3 -3
- package/dist/otp/otp.d.ts +3 -3
- package/dist/otp/web/ds-otp.js +3 -3
- package/dist/overflow-menu/web/ds-overflow-menu.js +7 -2
- package/dist/page-head/web/ds-page-head.js +2 -2
- package/dist/panel/native/ds-panel.js +1 -1
- package/dist/panel/panel.d.ts +1 -1
- package/dist/panel/web/ds-panel.d.ts +3 -1
- package/dist/panel/web/ds-panel.js +3 -2
- package/dist/password-feedback/web/ds-password-feedback.d.ts +1 -1
- package/dist/password-feedback/web/ds-password-feedback.js +3 -3
- package/dist/password-input/web/ds-password-input.d.ts +7 -2
- package/dist/password-input/web/ds-password-input.js +28 -3
- package/dist/password-requirements/password-requirements.d.ts +12 -2
- package/dist/password-requirements/password-requirements.js +6 -8
- package/dist/password-requirements/web/ds-password-requirements.js +5 -5
- package/dist/password-strength/web/ds-password-strength.js +2 -2
- package/dist/payment-card/native/ds-payment-card.d.ts +1 -1
- package/dist/payment-card/native/ds-payment-card.js +1 -1
- package/dist/payment-card/web/ds-payment-card.d.ts +1 -1
- package/dist/payment-card/web/ds-payment-card.js +1 -1
- package/dist/people-cell/people-cell.d.ts +5 -2
- package/dist/people-cell/web/ds-people-cell.d.ts +1 -1
- package/dist/people-cell/web/ds-people-cell.js +6 -2
- package/dist/person-cell/person-cell.d.ts +5 -2
- package/dist/person-cell/web/ds-person-cell.d.ts +1 -1
- package/dist/person-cell/web/ds-person-cell.js +11 -1
- package/dist/phone-field/native/ds-phone-field.js +2 -2
- package/dist/phone-field/phone-field.d.ts +35 -0
- package/dist/phone-field/phone-field.js +38 -0
- package/dist/phone-field/web/ds-phone-field.d.ts +31 -3
- package/dist/phone-field/web/ds-phone-field.js +45 -8
- package/dist/place-card/native/ds-place-card.d.ts +7 -3
- package/dist/place-card/native/ds-place-card.js +32 -21
- package/dist/place-card/place-card.d.ts +12 -6
- package/dist/place-card/place-card.js +6 -3
- package/dist/place-card/web/ds-place-card.d.ts +5 -3
- package/dist/place-card/web/ds-place-card.js +39 -27
- package/dist/plan-chart/plan-chart.d.ts +2 -3
- package/dist/plan-chart/web/ds-plan-chart.d.ts +1 -1
- package/dist/plan-chart/web/ds-plan-chart.js +34 -6
- package/dist/popover/popover.d.ts +7 -3
- package/dist/popover/web/ds-popover.d.ts +5 -1
- package/dist/popover/web/ds-popover.js +4 -2
- package/dist/priority-indicator/native/ds-priority-indicator.js +4 -4
- package/dist/priority-indicator/priority-indicator.d.ts +3 -3
- package/dist/priority-indicator/priority-indicator.js +3 -3
- package/dist/priority-indicator/web/ds-priority-indicator.js +4 -4
- package/dist/profile-card/profile-card.d.ts +2 -1
- package/dist/profile-card/web/ds-profile-card.d.ts +2 -2
- package/dist/profile-card/web/ds-profile-card.js +16 -3
- package/dist/progress-bar/native/ds-progress-bar.js +2 -1
- package/dist/progress-bar/web/ds-progress-bar.js +2 -1
- package/dist/progress-cell/progress-cell.d.ts +8 -3
- package/dist/progress-cell/progress-cell.js +1 -1
- package/dist/progress-cell/web/ds-progress-cell.d.ts +5 -2
- package/dist/progress-cell/web/ds-progress-cell.js +6 -2
- package/dist/progress-ring/native/ds-progress-ring.js +16 -11
- package/dist/progress-ring/progress-ring.d.ts +8 -4
- package/dist/progress-ring/progress-ring.js +7 -3
- package/dist/progress-ring/web/ds-progress-ring.js +16 -10
- package/dist/proportion-bar/native/ds-proportion-bar.d.ts +2 -2
- package/dist/proportion-bar/native/ds-proportion-bar.js +18 -7
- package/dist/proportion-bar/proportion-bar.d.ts +10 -3
- package/dist/proportion-bar/proportion-bar.js +6 -1
- package/dist/proportion-bar/web/ds-proportion-bar.d.ts +1 -1
- package/dist/proportion-bar/web/ds-proportion-bar.js +21 -14
- package/dist/quick-actions/native/ds-quick-actions.js +17 -2
- package/dist/quick-actions/quick-actions.d.ts +32 -2
- package/dist/quick-actions/quick-actions.js +9 -1
- package/dist/quick-actions/web/ds-quick-actions.js +20 -6
- package/dist/radar-chart/radar-chart.d.ts +11 -3
- package/dist/radar-chart/radar-chart.js +21 -3
- package/dist/radar-chart/web/ds-radar-chart.d.ts +1 -1
- package/dist/radar-chart/web/ds-radar-chart.js +34 -22
- package/dist/radial-progress/native/ds-radial-progress.d.ts +6 -2
- package/dist/radial-progress/native/ds-radial-progress.js +34 -11
- package/dist/radial-progress/radial-progress.d.ts +11 -2
- package/dist/radial-progress/radial-progress.js +9 -0
- package/dist/radial-progress/web/ds-radial-progress.d.ts +6 -2
- package/dist/radial-progress/web/ds-radial-progress.js +24 -10
- package/dist/radio/radio.d.ts +4 -4
- package/dist/radio/radio.js +4 -4
- package/dist/radio/web/ds-radio.d.ts +6 -2
- package/dist/radio/web/ds-radio.js +22 -10
- package/dist/radio-group/radio-group.d.ts +41 -5
- package/dist/radio-group/radio-group.js +5 -0
- package/dist/radio-group/web/ds-radio-group.d.ts +1 -1
- package/dist/radio-group/web/ds-radio-group.js +7 -2
- package/dist/rating-badge/rating-badge.d.ts +8 -2
- package/dist/rating-badge/rating-badge.js +5 -0
- package/dist/rating-badge/web/ds-rating-badge.d.ts +2 -2
- package/dist/rating-badge/web/ds-rating-badge.js +6 -4
- package/dist/recipient-select/recipient-select.d.ts +7 -0
- package/dist/recipient-select/recipient-select.js +3 -0
- package/dist/recipient-select/web/ds-recipient-select.js +4 -4
- package/dist/record-panel/record-panel.d.ts +17 -2
- package/dist/record-panel/web/ds-record-panel.d.ts +48 -13
- package/dist/record-panel/web/ds-record-panel.js +27 -18
- package/dist/reorder-list/reorder-list.d.ts +3 -0
- package/dist/reorder-list/web/ds-reorder-list.d.ts +6 -1
- package/dist/reorder-list/web/ds-reorder-list.js +6 -4
- package/dist/resend-control/native/ds-resend-control.d.ts +24 -0
- package/dist/resend-control/native/ds-resend-control.js +73 -0
- package/dist/resend-control/resend-control.d.ts +2 -0
- package/dist/resend-control/resend-control.js +2 -0
- package/dist/resend-control/web/ds-resend-control.js +3 -3
- package/dist/route-fields/route-fields.d.ts +79 -0
- package/dist/route-fields/route-fields.js +71 -0
- package/dist/route-fields/web/ds-route-fields.d.ts +5 -0
- package/dist/route-fields/web/ds-route-fields.js +83 -0
- package/dist/route-line/web/ds-route-line.js +2 -2
- package/dist/save-bar/save-bar.d.ts +1 -1
- package/dist/save-bar/save-bar.js +1 -1
- package/dist/save-bar/web/ds-save-bar.js +2 -2
- package/dist/scanner/scanner.d.ts +1 -1
- package/dist/scanner/scanner.js +2 -1
- package/dist/scatter-chart/scatter-chart.d.ts +2 -3
- package/dist/scatter-chart/web/ds-scatter-chart.d.ts +1 -1
- package/dist/scatter-chart/web/ds-scatter-chart.js +13 -4
- package/dist/schedule-chart/schedule-chart.d.ts +187 -0
- package/dist/schedule-chart/schedule-chart.js +285 -0
- package/dist/schedule-chart/web/ds-schedule-chart.d.ts +24 -0
- package/dist/schedule-chart/web/ds-schedule-chart.js +143 -0
- package/dist/segmented-control/native/ds-segmented-control.d.ts +1 -1
- package/dist/segmented-control/native/ds-segmented-control.js +1 -1
- package/dist/segmented-control/segmented-control.d.ts +7 -0
- package/dist/segmented-control/web/ds-segmented-control.d.ts +1 -1
- package/dist/segmented-control/web/ds-segmented-control.js +4 -3
- package/dist/select/native/ds-select.js +6 -3
- package/dist/select/select.d.ts +5 -0
- package/dist/select/web/ds-select.d.ts +14 -1
- package/dist/select/web/ds-select.js +22 -12
- package/dist/settings-directory/native/ds-settings-directory.js +1 -1
- package/dist/settings-directory/web/ds-settings-directory.js +1 -1
- package/dist/settings-row/web/ds-settings-row.d.ts +3 -1
- package/dist/settings-row/web/ds-settings-row.js +2 -2
- package/dist/sheet/web/ds-sheet.js +3 -3
- package/dist/side-nav/side-nav.d.ts +2 -1
- package/dist/side-nav/web/ds-side-nav-collapse.d.ts +4 -1
- package/dist/side-nav/web/ds-side-nav-collapse.js +6 -3
- package/dist/side-nav/web/ds-side-nav-header.js +1 -1
- package/dist/side-nav/web/ds-side-nav-primary.js +1 -1
- package/dist/side-nav/web/ds-side-nav-profile.js +1 -1
- package/dist/side-nav/web/ds-side-nav.d.ts +1 -1
- package/dist/side-nav/web/ds-side-nav.js +3 -3
- package/dist/skeleton/skeleton.d.ts +20 -0
- package/dist/skeleton/skeleton.js +4 -0
- package/dist/slider/native/ds-slider.js +1 -1
- package/dist/small-multiples/small-multiples.d.ts +3 -4
- package/dist/small-multiples/small-multiples.js +2 -1
- package/dist/small-multiples/web/ds-small-multiples.d.ts +1 -1
- package/dist/small-multiples/web/ds-small-multiples.js +8 -2
- package/dist/sparkline/sparkline.d.ts +19 -7
- package/dist/sparkline/sparkline.js +42 -17
- package/dist/sparkline/web/ds-sparkline.d.ts +1 -1
- package/dist/sparkline/web/ds-sparkline.js +4 -3
- package/dist/split-pane/web/ds-split-pane.js +2 -2
- package/dist/stat-tile/native/ds-stat-tile.d.ts +3 -3
- package/dist/stat-tile/native/ds-stat-tile.js +14 -7
- package/dist/stat-tile/stat-tile.d.ts +14 -8
- package/dist/stat-tile/web/ds-stat-tile.d.ts +4 -2
- package/dist/stat-tile/web/ds-stat-tile.js +8 -5
- package/dist/state-message/web/ds-state-message.d.ts +6 -2
- package/dist/state-message/web/ds-state-message.js +5 -2
- package/dist/status-badge/native/ds-status-badge.js +3 -3
- package/dist/status-badge/status-badge.d.ts +3 -3
- package/dist/status-badge/status-badge.js +1 -1
- package/dist/status-badge/web/ds-status-badge.js +4 -4
- package/dist/status-cell/status-cell.d.ts +5 -2
- package/dist/status-cell/web/ds-status-cell.d.ts +6 -2
- package/dist/status-cell/web/ds-status-cell.js +7 -2
- package/dist/status-control/web/ds-status-control.js +3 -3
- package/dist/status-dot/native/ds-status-dot.js +1 -1
- package/dist/status-dot/status-dot.d.ts +2 -2
- package/dist/status-dot/status-dot.js +2 -2
- package/dist/status-dot/web/ds-status-dot.js +2 -2
- package/dist/stepper-form/stepper-form.d.ts +27 -4
- package/dist/stepper-form/stepper-form.js +17 -9
- package/dist/stepper-form/web/ds-stepper-form.d.ts +1 -1
- package/dist/stepper-form/web/ds-stepper-form.js +7 -5
- package/dist/stick-chart/stick-chart.d.ts +2 -1
- package/dist/stick-chart/stick-chart.js +2 -1
- package/dist/stick-chart/web/ds-stick-chart.d.ts +1 -1
- package/dist/stick-chart/web/ds-stick-chart.js +17 -3
- package/dist/switch/native/ds-switch.js +1 -1
- package/dist/system-state/native/ds-system-state.d.ts +29 -0
- package/dist/system-state/native/ds-system-state.js +68 -0
- package/dist/system-state/system-state.js +4 -3
- package/dist/system-state/web/ds-system-state.js +2 -2
- package/dist/table-toolbar/web/ds-table-toolbar.js +1 -1
- package/dist/tabs/tabs.d.ts +5 -0
- package/dist/tabs/tabs.js +2 -0
- package/dist/tabs/web/ds-tabs.js +2 -2
- package/dist/task-shell/task-shell.d.ts +15 -6
- package/dist/task-shell/task-shell.js +5 -2
- package/dist/task-shell/web/ds-task-shell.d.ts +21 -6
- package/dist/task-shell/web/ds-task-shell.js +52 -18
- package/dist/text/native/ds-text.js +1 -1
- package/dist/text/text.d.ts +1 -1
- package/dist/text/text.js +1 -1
- package/dist/text/web/ds-text.js +1 -1
- package/dist/textarea/native/ds-textarea.d.ts +1 -1
- package/dist/textarea/native/ds-textarea.js +9 -8
- package/dist/textarea/web/ds-textarea.d.ts +1 -1
- package/dist/textarea/web/ds-textarea.js +8 -7
- package/dist/time-field/time-field.d.ts +37 -0
- package/dist/time-field/time-field.js +23 -0
- package/dist/time-field/web/ds-time-field.d.ts +8 -0
- package/dist/time-field/web/ds-time-field.js +28 -0
- package/dist/time-range/time-range.d.ts +35 -26
- package/dist/time-range/time-range.js +28 -46
- package/dist/time-range/web/ds-time-range.d.ts +1 -1
- package/dist/time-range/web/ds-time-range.js +9 -6
- package/dist/timeline/native/ds-timeline.d.ts +2 -2
- package/dist/timeline/native/ds-timeline.js +21 -7
- package/dist/timeline/timeline.d.ts +2 -1
- package/dist/timeline/web/ds-timeline.d.ts +2 -2
- package/dist/timeline/web/ds-timeline.js +18 -9
- package/dist/toast/native/ds-toast.js +1 -1
- package/dist/toggle-group/native/ds-toggle-group.js +1 -1
- package/dist/token-roles.d.ts +1 -1
- package/dist/token-roles.js +18 -0
- package/dist/tone.d.ts +4 -4
- package/dist/tone.js +1 -5
- package/dist/toolbar/toolbar.d.ts +19 -7
- package/dist/toolbar/toolbar.js +4 -3
- package/dist/toolbar/web/ds-toolbar.d.ts +5 -2
- package/dist/toolbar/web/ds-toolbar.js +3 -3
- package/dist/track-bars/track-bars.d.ts +3 -4
- package/dist/track-bars/web/ds-track-bars.d.ts +1 -1
- package/dist/track-bars/web/ds-track-bars.js +9 -3
- package/dist/tree/tree.d.ts +1 -1
- package/dist/tree/tree.js +1 -1
- package/dist/tree/web/ds-tree.js +2 -2
- package/dist/treemap/treemap.d.ts +2 -3
- package/dist/treemap/web/ds-treemap.d.ts +1 -1
- package/dist/treemap/web/ds-treemap.js +14 -3
- package/dist/two-line-cell/two-line-cell.d.ts +5 -2
- package/dist/two-line-cell/web/ds-two-line-cell.d.ts +1 -1
- package/dist/two-line-cell/web/ds-two-line-cell.js +5 -1
- package/dist/vehicle-marker/vehicle-marker.d.ts +5 -4
- package/dist/vehicle-marker/vehicle-marker.js +3 -3
- package/dist/vehicle-marker/web/ds-vehicle-marker.js +9 -6
- package/dist/waterfall-chart/waterfall-chart.d.ts +10 -5
- package/dist/waterfall-chart/waterfall-chart.js +17 -12
- package/dist/waterfall-chart/web/ds-waterfall-chart.d.ts +7 -2
- package/dist/waterfall-chart/web/ds-waterfall-chart.js +49 -11
- package/dist/web.d.ts +20 -5
- package/dist/web.js +10 -2
- package/dist/week-schedule/web/ds-week-schedule.d.ts +1 -1
- package/dist/week-schedule/web/ds-week-schedule.js +4 -4
- package/dist/week-schedule/week-schedule.d.ts +23 -4
- package/dist/week-schedule/week-schedule.js +19 -13
- package/forced-colors.css +8 -5
- package/package.json +10 -15
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LoadingContract } from '../skeleton/skeleton';
|
|
1
2
|
export declare const DESCRIPTION_LIST_COLUMNS: readonly [1, 2, 3];
|
|
2
3
|
export type DescriptionListColumns = (typeof DESCRIPTION_LIST_COLUMNS)[number];
|
|
3
4
|
/** The narrowest a column may get before the grid drops one. */
|
|
@@ -46,11 +47,12 @@ export interface DescriptionListEntry {
|
|
|
46
47
|
label: string;
|
|
47
48
|
/** The exact text a copy control takes. Its presence offers the control. */
|
|
48
49
|
copyValue?: string;
|
|
49
|
-
/** Spans every column, an address, a note.
|
|
50
|
+
/** Spans every column, an address, a note. In rows, keeps its value under its
|
|
51
|
+
* label at every width: a table, a list. */
|
|
50
52
|
wide?: boolean;
|
|
51
53
|
}
|
|
52
54
|
/** The props every Description List implementation accepts. */
|
|
53
|
-
export interface DescriptionListContract {
|
|
55
|
+
export interface DescriptionListContract extends LoadingContract {
|
|
54
56
|
/** Aligned settings rows or the default detail grid, on either platform. */
|
|
55
57
|
appearance?: 'grid' | 'rows';
|
|
56
58
|
/** The most columns the grid may use. It uses fewer when it is narrow. */
|
|
@@ -9,7 +9,7 @@ export interface DSDescriptionListItem extends DescriptionListEntry {
|
|
|
9
9
|
/** A control beside the value, an edit link, a "Change" button. */
|
|
10
10
|
action?: ReactNode;
|
|
11
11
|
}
|
|
12
|
-
export type DSDescriptionListProps = Omit<ViewProps, 'children'> & DescriptionListContract & {
|
|
12
|
+
export type DSDescriptionListProps = Omit<ViewProps, 'children' | 'accessibilityState' | 'aria-busy'> & DescriptionListContract & {
|
|
13
13
|
/** The pairs, in reading order. */
|
|
14
14
|
items: readonly DSDescriptionListItem[];
|
|
15
15
|
/** Copies an item's `copyValue`. Its presence offers the copy control.
|
|
@@ -18,4 +18,4 @@ export type DSDescriptionListProps = Omit<ViewProps, 'children'> & DescriptionLi
|
|
|
18
18
|
onCopy?: (item: DSDescriptionListItem) => DescriptionListCopyOutcome;
|
|
19
19
|
};
|
|
20
20
|
/** The details of one thing as labelled values in a grid of up to three columns. */
|
|
21
|
-
export declare function DSDescriptionList({ items, columns, appearance, onCopy, className, onLayout, ...props }: DSDescriptionListProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function DSDescriptionList({ loading, loadingLabel, items, columns, appearance, onCopy, className, onLayout, ...props }: DSDescriptionListProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,6 +10,8 @@ import { cn } from '../../lib/cn';
|
|
|
10
10
|
import { announce } from '../../lib/native/announce';
|
|
11
11
|
import { useThemeEpoch } from '../../lib/use-theme-epoch';
|
|
12
12
|
import { DSText } from '../../text/native/ds-text';
|
|
13
|
+
import { DSSkeleton } from '../../skeleton/native/ds-skeleton';
|
|
14
|
+
import { LOADING_ROWS } from '../../skeleton/skeleton';
|
|
13
15
|
import { useLargeText } from '../../lib/native/use-large-text';
|
|
14
16
|
const ICON_STYLING = {
|
|
15
17
|
className: { target: 'style', nativeStyleMapping: { color: 'color' } },
|
|
@@ -22,7 +24,7 @@ const LABEL_INK = {
|
|
|
22
24
|
};
|
|
23
25
|
const VALUE_INK = { foreground: 'text-foreground' };
|
|
24
26
|
const RULE = { border: 'border-border' };
|
|
25
|
-
export function DSDescriptionList({ items, columns = 2, appearance = 'grid', onCopy, className, onLayout, ...props }) {
|
|
27
|
+
export function DSDescriptionList({ loading = false, loadingLabel, items, columns = 2, appearance = 'grid', onCopy, className, onLayout, ...props }) {
|
|
26
28
|
const spec = descriptionListSpec();
|
|
27
29
|
const epoch = useThemeEpoch();
|
|
28
30
|
const [width, setWidth] = useState(0);
|
|
@@ -33,34 +35,54 @@ export function DSDescriptionList({ items, columns = 2, appearance = 'grid', onC
|
|
|
33
35
|
if (timer.current !== undefined)
|
|
34
36
|
clearTimeout(timer.current);
|
|
35
37
|
}, []);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (loading && loadingLabel)
|
|
40
|
+
announce(loadingLabel);
|
|
41
|
+
}, [loading, loadingLabel]);
|
|
36
42
|
const count = appearance === 'rows' || large ? 1 : descriptionListColumns(columns, width);
|
|
37
43
|
const cell = `${String(100 / count)}%`;
|
|
38
|
-
|
|
44
|
+
const waiting = loading
|
|
45
|
+
? items.length > 0
|
|
46
|
+
? items.map((item) => ({
|
|
47
|
+
key: item.key,
|
|
48
|
+
label: item.label,
|
|
49
|
+
wide: item.wide === true,
|
|
50
|
+
tall: (onCopy !== undefined && item.copyValue !== undefined) || item.action !== undefined,
|
|
51
|
+
}))
|
|
52
|
+
: Array.from({ length: LOADING_ROWS }, (_, i) => ({
|
|
53
|
+
key: String(i),
|
|
54
|
+
label: undefined,
|
|
55
|
+
wide: false,
|
|
56
|
+
tall: false,
|
|
57
|
+
}))
|
|
58
|
+
: [];
|
|
59
|
+
const side = appearance === 'rows' && width >= 512 && !large;
|
|
60
|
+
return (_jsxs(View, { accessibilityState: { busy: loading }, "aria-busy": loading, className: cn('flex-row flex-wrap', className), onLayout: (event) => {
|
|
39
61
|
setWidth(event.nativeEvent.layout.width);
|
|
40
62
|
onLayout?.(event);
|
|
41
|
-
}, ...props, children: items.map((item) => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
}, ...props, children: [waiting.map((pair) => (_jsx(View, { style: { width: pair.wide ? '100%' : cell }, className: cn(appearance === 'rows' ? 'flex-row items-center gap-2 py-4' : 'flex-row items-end gap-1 border-b pb-3 pt-3', appearance === 'grid' && RULE[spec.rule], count > 1 && 'pr-6'), children: _jsxs(View, { className: cn('min-w-0 flex-1 gap-1', side && 'flex-row items-center gap-2'), children: [pair.label === undefined ? (_jsx(DSSkeleton, { fits: "body-sm", className: side ? 'w-48' : 'w-24' })) : (_jsx(DSText, { variant: "body-sm", className: cn(appearance === 'rows' ? 'text-foreground' : LABEL_INK[spec.labelInk], side && 'w-48'), children: pair.label })), _jsx(View, { className: cn('justify-center', side && 'min-w-0 flex-1', pair.tall ? 'min-h-touch' : 'min-h-9'), children: _jsx(DSSkeleton, { fits: "body-md", className: "w-40 max-w-full" }) })] }) }, pair.key))), !loading && items.map((item) => {
|
|
64
|
+
const empty = descriptionListIsEmpty(item.value);
|
|
65
|
+
const state = copied?.key === item.key ? copied.state : 'idle';
|
|
66
|
+
const copyable = onCopy !== undefined && item.copyValue !== undefined && !empty;
|
|
67
|
+
return (_jsxs(View, { style: { width: item.wide === true ? '100%' : cell }, className: cn(appearance === 'rows'
|
|
68
|
+
? 'flex-row items-center gap-2 py-4'
|
|
69
|
+
: 'flex-row items-end gap-1 border-b pb-3 pt-3', appearance === 'grid' && RULE[spec.rule], count > 1 && 'pr-6'), children: [_jsxs(View, { accessible: true, accessibilityLabel: descriptionListPairLabel(item.label, item.value), className: cn('min-w-0 flex-1 gap-1', appearance === 'rows' && width >= 512 && !large && 'flex-row items-center gap-2'), children: [_jsx(DSText, { variant: "body-sm", className: cn('', appearance === 'rows' ? 'text-foreground' : LABEL_INK[spec.labelInk], appearance === 'rows' && width >= 512 && !large && 'w-48'), children: item.label }), _jsx(View, { className: cn('justify-center', appearance === 'rows' && width >= 512 && !large && 'min-w-0 flex-1', copyable || item.action !== undefined ? 'min-h-touch' : 'min-h-9'), children: _jsx(DSText, { variant: "body-md", className: cn(VALUE_INK[spec.valueInk]), children: empty ? DESCRIPTION_LIST_EMPTY_MARK : item.value }) })] }), copyable && (_jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: copyFieldActionLabel(item.label), onPress: () => {
|
|
70
|
+
const settle = (next) => {
|
|
71
|
+
setCopied({ key: item.key, state: next });
|
|
72
|
+
const said = copyFieldAnnouncement(next, item.label);
|
|
73
|
+
if (said !== undefined)
|
|
74
|
+
announce(said);
|
|
75
|
+
if (timer.current !== undefined)
|
|
76
|
+
clearTimeout(timer.current);
|
|
77
|
+
timer.current = setTimeout(() => {
|
|
78
|
+
setCopied(undefined);
|
|
79
|
+
}, COPY_FIELD_CONFIRM_MS);
|
|
80
|
+
};
|
|
81
|
+
void descriptionListCopyFailed(onCopy(item)).then((failed) => {
|
|
82
|
+
settle(failed ? 'failed' : 'copied');
|
|
83
|
+
});
|
|
84
|
+
}, style: ({ pressed }) => pressed && Platform.OS === 'ios'
|
|
85
|
+
? { transform: [{ scale: PRESS_SCALES.firm }] }
|
|
86
|
+
: null, className: "size-touch items-center justify-center rounded-full android:ripple-primary", children: state === 'copied' ? (_jsx(CheckIcon, { size: 18, className: "text-success" })) : state === 'failed' ? (_jsx(AlertIcon, { size: 18, className: "text-error" })) : (_jsx(CopyIcon, { size: 18, className: "text-muted-foreground" })) }, epoch)), item.action] }, item.key));
|
|
87
|
+
})] }));
|
|
66
88
|
}
|
|
@@ -7,9 +7,9 @@ export interface DSDescriptionListItem extends DescriptionListEntry {
|
|
|
7
7
|
/** A control beside the value, an edit link, a "Change" button. */
|
|
8
8
|
action?: ReactNode;
|
|
9
9
|
}
|
|
10
|
-
export type DSDescriptionListProps = Omit<ComponentProps<'div'>, 'children'> & DescriptionListContract & {
|
|
10
|
+
export type DSDescriptionListProps = Omit<ComponentProps<'div'>, 'children' | 'aria-busy'> & DescriptionListContract & {
|
|
11
11
|
/** The pairs, in reading order: across each row, then down. */
|
|
12
12
|
items: readonly DSDescriptionListItem[];
|
|
13
13
|
};
|
|
14
14
|
/** The details of one thing as labelled values in a grid of up to three columns, each value copyable or editable in place. */
|
|
15
|
-
export declare function DSDescriptionList({ items, columns, appearance, className, ...props }: DSDescriptionListProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function DSDescriptionList({ loading, loadingLabel, items, columns, appearance, className, ...props }: DSDescriptionListProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useRef, useState, } from 'react';
|
|
3
3
|
import { Check, Copy, TriangleAlert } from 'lucide-react';
|
|
4
4
|
import { DESCRIPTION_LIST_EMPTY_MARK, DESCRIPTION_LIST_EMPTY_WORDS, descriptionListIsEmpty, descriptionListSpec, } from '../description-list';
|
|
5
5
|
import { COPY_FIELD_CONFIRM_MS, copyFieldActionLabel, copyFieldAnnouncement, } from '../../copy-field/copy-field';
|
|
6
6
|
import { DSIconButton } from '../../icon-button/web/ds-icon-button';
|
|
7
7
|
import { cn } from '../../lib/cn';
|
|
8
|
+
import { DSSkeleton } from '../../skeleton/web/ds-skeleton';
|
|
9
|
+
import { LOADING_ROWS, loadingSpoken } from '../../skeleton/skeleton';
|
|
10
|
+
import { SpokenRegion } from '../../lib/web/spoken-region';
|
|
8
11
|
const LABEL_INK = {
|
|
9
12
|
'muted-foreground': 'text-muted-foreground',
|
|
10
13
|
};
|
|
@@ -23,9 +26,12 @@ const GLYPH = {
|
|
|
23
26
|
const GLYPH_INK = {
|
|
24
27
|
idle: '',
|
|
25
28
|
copied: 'text-success hover:text-success',
|
|
26
|
-
failed: 'text-
|
|
29
|
+
failed: 'text-error hover:text-error',
|
|
27
30
|
};
|
|
28
|
-
|
|
31
|
+
const ROW = 'grid min-w-0 grid-cols-1 items-baseline gap-x-6 gap-y-1 py-3';
|
|
32
|
+
const ROW_PAIRED = '@sm:grid-cols-[9rem_minmax(0,1fr)] @lg:grid-cols-[12rem_minmax(0,1fr)]';
|
|
33
|
+
const TERM_TYPE = 'text-body-sm break-words';
|
|
34
|
+
export function DSDescriptionList({ loading = false, loadingLabel, items, columns = 2, appearance = 'grid', className, ...props }) {
|
|
29
35
|
const spec = descriptionListSpec();
|
|
30
36
|
const [copied, setCopied] = useState(undefined);
|
|
31
37
|
const timer = useRef(undefined);
|
|
@@ -57,18 +63,35 @@ export function DSDescriptionList({ items, columns = 2, appearance = 'grid', cla
|
|
|
57
63
|
const said = copied === undefined || saying === undefined
|
|
58
64
|
? undefined
|
|
59
65
|
: copyFieldAnnouncement(copied.state, saying.label);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
const waiting = loading
|
|
67
|
+
? items.length > 0
|
|
68
|
+
? items.map((item) => ({
|
|
69
|
+
key: item.key,
|
|
70
|
+
label: item.label,
|
|
71
|
+
wide: item.wide === true,
|
|
72
|
+
tall: item.copyValue !== undefined || item.action !== undefined,
|
|
73
|
+
}))
|
|
74
|
+
: Array.from({ length: LOADING_ROWS }, (_, i) => ({
|
|
75
|
+
key: String(i),
|
|
76
|
+
label: undefined,
|
|
77
|
+
wide: false,
|
|
78
|
+
tall: false,
|
|
79
|
+
}))
|
|
80
|
+
: [];
|
|
81
|
+
return (_jsxs(_Fragment, { children: [_jsx(SpokenRegion, { text: loadingSpoken(loading, loadingLabel) }), _jsxs("div", { className: cn('@container', className), "aria-busy": loading ? true : undefined, ...props, children: [_jsxs("dl", { className: cn('m-0 grid gap-x-6', appearance === 'rows' ? 'grid-cols-1' : cn('gap-y-4', COLUMNS[columns])), children: [waiting.map((pair) => (_jsxs("div", { className: cn(appearance === 'rows'
|
|
82
|
+
? cn(ROW, !pair.wide && ROW_PAIRED)
|
|
83
|
+
: 'flex min-w-0 flex-col gap-1 border-b pb-3', appearance === 'grid' && RULE[spec.rule], pair.wide && 'col-span-full'), children: [_jsx("dt", { className: cn(TERM_TYPE, appearance === 'rows' ? 'description-term text-foreground' : LABEL_INK[spec.labelInk]), children: pair.label ?? _jsx(DSSkeleton, { fits: "body-sm", className: "w-24" }) }), _jsx("dd", { className: cn('m-0 flex min-w-0 items-center', (appearance === 'grid' || pair.tall) && 'min-h-9'), children: _jsx(DSSkeleton, { fits: "body-md", className: "w-40 max-w-full" }) })] }, pair.key))), !loading && items.map((item) => {
|
|
84
|
+
const empty = descriptionListIsEmpty(item.value);
|
|
85
|
+
const state = copied?.key === item.key ? copied.state : 'idle';
|
|
86
|
+
const Glyph = GLYPH[state];
|
|
87
|
+
const copyable = item.copyValue !== undefined && !empty;
|
|
88
|
+
const controlled = copyable || item.action !== undefined;
|
|
89
|
+
return (_jsxs("div", { className: cn(appearance === 'rows'
|
|
90
|
+
? cn(ROW, item.wide !== true && ROW_PAIRED)
|
|
91
|
+
: 'flex min-w-0 flex-col gap-1 border-b pb-3', appearance === 'grid' && RULE[spec.rule], item.wide === true && 'col-span-full'), children: [_jsx("dt", { className: cn(TERM_TYPE, appearance === 'rows'
|
|
92
|
+
? 'description-term text-foreground'
|
|
93
|
+
: LABEL_INK[spec.labelInk]), children: item.label }), _jsxs("dd", { className: cn('description-answer m-0 flex min-w-0 items-start gap-1 text-body-md', (appearance === 'grid' || controlled) && 'min-h-9', VALUE_INK[spec.valueInk]), children: [_jsx("span", { className: cn('min-w-0 flex-1 break-words', controlled ? 'mt-0.5 py-1 pointer-coarse:py-2' : 'self-center'), children: empty ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": true, children: DESCRIPTION_LIST_EMPTY_MARK }), _jsx("span", { className: "sr-only", children: DESCRIPTION_LIST_EMPTY_WORDS })] })) : (item.value) }), copyable && (_jsx(DSIconButton, { variant: "ghost", size: "sm", label: copyFieldActionLabel(item.label), icon: _jsx(Glyph, { "aria-hidden": true }), className: cn('flex-none', GLYPH_INK[state]), onClick: () => {
|
|
94
|
+
copy(item);
|
|
95
|
+
} })), item.action !== undefined && (_jsx("span", { className: "flex min-h-9 flex-none items-center pointer-coarse:min-h-11", children: item.action }))] })] }, item.key));
|
|
96
|
+
})] }), _jsx("span", { "aria-live": "polite", className: "sr-only", children: said ?? '' })] })] }));
|
|
74
97
|
}
|
package/dist/dialog/dialog.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const DIALOG_MIN_HEIGHT_PX: 240;
|
|
|
13
13
|
export declare const DIALOG_VIEWPORT_MARGIN_PX: 32;
|
|
14
14
|
/** `max-height: calc(100vh - 32px)`, from `.status-dialog`; `.overlay-dialog` omits it. */
|
|
15
15
|
export declare const DIALOG_VIEWPORT_RESERVE_PX: 32;
|
|
16
|
-
/** 16px, the
|
|
16
|
+
/** 16px, the source app's overlay radius (`overlayBorderRadius`, its card
|
|
17
17
|
* `md`), which is the `card` token (`rounded-card`) here. It was the design's
|
|
18
18
|
* 10px pop radius, shared with the popover, until 2026-10-09: a dialog is a
|
|
19
19
|
* card and the source draws it as one. */
|
|
@@ -85,6 +85,17 @@ export interface DialogContract {
|
|
|
85
85
|
/** How the title block is aligned. Defaults to
|
|
86
86
|
* `DIALOG_DEFAULT_HEADER_ALIGNMENT`, today's left-aligned header. */
|
|
87
87
|
headerAlign?: DialogHeaderAlignment;
|
|
88
|
+
/** A QUESTION THAT STOPS THE WORK UNTIL IT IS ANSWERED: a confirm, a delete,
|
|
89
|
+
* a discard. The dialog is announced as an alert dialog (`alertdialog`), so
|
|
90
|
+
* a screen reader says an answer is wanted and reads the question with it.
|
|
91
|
+
* Leave it off for a dialog that holds a form, a list or a walkthrough,
|
|
92
|
+
* which a reader works through rather than answers.
|
|
93
|
+
*
|
|
94
|
+
* Its words are its description, so give it a body of plain words (read out
|
|
95
|
+
* automatically) or name them with `aria-describedby`. Web only in effect:
|
|
96
|
+
* neither VoiceOver nor TalkBack has an alert dialog trait, so the native
|
|
97
|
+
* sheet takes the prop and is announced as it was. */
|
|
98
|
+
alert?: boolean;
|
|
88
99
|
/** Which width step. `sm` for a confirm, `md` when it needs a paragraph,
|
|
89
100
|
* `lg` when it carries a list or a form the paragraph width would crowd. */
|
|
90
101
|
size?: DialogSize;
|
|
@@ -36,4 +36,4 @@ export type DSDialogProps = Omit<ComponentProps<'div'>, 'title' | 'role' | 'aria
|
|
|
36
36
|
closeLabel: string;
|
|
37
37
|
});
|
|
38
38
|
/** A centred modal asking one short question, above everything else on the page. */
|
|
39
|
-
export declare function DSDialog({ open, title, sub, size, headerAlign, headingLevel, dismissible, closeLabel, footerArrangement, onRequestClose, dirty, onDirtyCloseAttempt, children, footer, confirm, masthead, media, mediaAction, className, 'aria-describedby': describedBy, ...props }: DSDialogProps): import("react").ReactPortal | null;
|
|
39
|
+
export declare function DSDialog({ open, title, sub, size, headerAlign, headingLevel, alert, dismissible, closeLabel, footerArrangement, onRequestClose, dirty, onDirtyCloseAttempt, children, footer, confirm, masthead, media, mediaAction, className, 'aria-describedby': describedBy, ...props }: DSDialogProps): import("react").ReactPortal | null;
|
|
@@ -49,11 +49,13 @@ const MASTHEAD_ALIGN = {
|
|
|
49
49
|
center: 'justify-center',
|
|
50
50
|
};
|
|
51
51
|
const CLOSE_ROOM = 'pt-18';
|
|
52
|
+
const CLOSE_PULL_START = '-ms-3.75';
|
|
53
|
+
const CLOSE_PULL_END = '-me-3.75';
|
|
52
54
|
function isPlainText(children) {
|
|
53
55
|
const parts = Children.toArray(children);
|
|
54
56
|
return (parts.length > 0 && parts.every((part) => typeof part === 'string' || typeof part === 'number'));
|
|
55
57
|
}
|
|
56
|
-
export function DSDialog({ open, title, sub, size = 'md', headerAlign = 'start', headingLevel = 2, dismissible = false, closeLabel, footerArrangement = 'end', onRequestClose, dirty = false, onDirtyCloseAttempt, children, footer, confirm, masthead, media, mediaAction, className, 'aria-describedby': describedBy, ...props }) {
|
|
58
|
+
export function DSDialog({ open, title, sub, size = 'md', headerAlign = 'start', headingLevel = 2, alert = false, dismissible = false, closeLabel, footerArrangement = 'end', onRequestClose, dirty = false, onDirtyCloseAttempt, children, footer, confirm, masthead, media, mediaAction, className, 'aria-describedby': describedBy, ...props }) {
|
|
57
59
|
const spec = dialogSpec(size);
|
|
58
60
|
const id = useId();
|
|
59
61
|
const titleId = `${id}-title`;
|
|
@@ -158,6 +160,6 @@ export function DSDialog({ open, title, sub, size = 'md', headerAlign = 'start',
|
|
|
158
160
|
.join(' ') ||
|
|
159
161
|
undefined);
|
|
160
162
|
const hasFoot = footer !== undefined || confirm !== undefined;
|
|
161
|
-
return createPortal(_jsxs(_Fragment, { children: [_jsx("div", { "data-role": "dialog-scrim", "aria-hidden": "true", onClick: exiting ? undefined : requestClose, style: z === null ? undefined : { zIndex: z - 1 }, className: cn('fixed inset-0', exiting ? 'animate-fade-out' : 'animate-fade-in', SCRIM[spec.scrim]) }), _jsx("div", { style: z === null ? undefined : { zIndex: z }, className: "pointer-events-none fixed inset-0 flex items-center justify-center p-[var(--modal-gutter)] max-sm:items-end max-sm:px-0 max-sm:pb-0", children: _jsxs("div", { ref: panelRef, role:
|
|
162
|
-
'focusable
|
|
163
|
+
return createPortal(_jsxs(_Fragment, { children: [_jsx("div", { "data-role": "dialog-scrim", "aria-hidden": "true", onClick: exiting ? undefined : requestClose, style: z === null ? undefined : { zIndex: z - 1 }, className: cn('fixed inset-0', exiting ? 'animate-fade-out' : 'animate-fade-in', SCRIM[spec.scrim]) }), _jsx("div", { style: z === null ? undefined : { zIndex: z }, className: "pointer-events-none fixed inset-0 flex items-center justify-center p-[var(--modal-gutter)] max-sm:items-end max-sm:px-0 max-sm:pb-0", children: _jsxs("div", { ref: panelRef, role: alert ? 'alertdialog' : 'dialog', "aria-modal": "true", "aria-labelledby": titleId, ...(describedByIds === undefined ? {} : { 'aria-describedby': describedByIds }), tabIndex: -1, onKeyDown: handleKeyDown, onAnimationEnd: finishExit, ...(exiting ? { inert: true } : {}), className: cn(PANEL, exiting ? PANEL_LEAVING : PANEL_ENTERING, WIDTH[size], MIN_HEIGHT[size], SURFACE[spec.surface], PANEL_EDGE, INK[spec.ink], 'shell-type', 'outline-none', className), ...props, children: [media !== undefined && (_jsxs("div", { className: "shrink-0 dialog-media dialog-px pt-3 pb-5", children: [_jsxs("div", { className: "flex items-center justify-between", children: [mediaAction ?? _jsx("span", {}), dismissible && (_jsx(DSIconButton, { label: closeLabel ?? '', variant: "ghost", className: cn('text-hero-foreground', CLOSE_PULL_END), icon: _jsx(X, { className: "size-4.5" }), onClick: requestClose }))] }), _jsx("div", { "aria-hidden": true, inert: true, className: "mt-2 flex h-tour-frame flex-col justify-center overflow-hidden rounded-card bg-card p-4", children: media })] })), _jsxs("div", { className: cn('relative shrink-0 dialog-px pb-4', media !== undefined ? 'pt-4' : dismissible ? CLOSE_ROOM : 'dialog-pt', HEADER_ALIGN[headerAlign], overflows && cn('border-b', BORDER[spec.border])), children: [masthead !== undefined && (_jsx("div", { className: cn('mb-3 flex', MASTHEAD_ALIGN[headerAlign]), children: masthead })), _jsx(Heading, { ref: headingRef, id: titleId, tabIndex: -1, className: cn('m-0 text-heading-md outline-none', TITLE_INK[spec.titleInk]), children: title }), sub !== undefined && (_jsx(DSText, { as: "p", variant: "body-sm", id: subId, className: cn('mt-1', BODY_INK[spec.bodyInk]), children: sub })), dismissible && media === undefined && (_jsx("div", { className: "pointer-events-none absolute inset-x-0 top-4 flex dialog-px", children: _jsx(DSIconButton, { label: closeLabel ?? '', variant: "ghost", icon: _jsx(X, {}), onClick: requestClose, className: cn('pointer-events-auto', CLOSE_PULL_START) }) }))] }), _jsx("div", { ref: bodyRef, id: bodyId, ...(overflows ? { tabIndex: 0 } : {}), className: cn('min-h-0 flex-1 overflow-y-auto overscroll-contain dialog-px text-body-sm', overflows &&
|
|
164
|
+
'focusable-inset', overflows && 'py-4', !hasFoot && 'dialog-pb', BODY_INK[spec.bodyInk]), children: children }), confirm !== undefined && (_jsx("div", { className: cn('mt-4 flex shrink-0 flex-col gap-3 border-t dialog-px py-4', BORDER[spec.border]), children: confirm })), footer !== undefined && (_jsx("div", { className: cn('flex shrink-0 items-center gap-3 dialog-px pt-4 dialog-pb', 'max-sm:flex-col-reverse max-sm:items-stretch max-sm:*:w-full', footerArrangement === 'split' ? 'justify-between' : 'justify-end', overflows && confirm === undefined && cn('border-t', BORDER[spec.border])), children: footer }))] }) })] }), portalNode);
|
|
163
165
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Forwarded } from '../props';
|
|
2
2
|
import type { ChartHue } from '../lib/chart-hue';
|
|
3
|
-
|
|
3
|
+
import type { LoadingContract } from '../skeleton/skeleton';
|
|
4
|
+
export interface DivergingBarChartContract extends LoadingContract {
|
|
4
5
|
/** The category names, left to right. */
|
|
5
6
|
labels: readonly string[];
|
|
6
7
|
/** One value per category; positive draws above the baseline, negative below. `null` is no reading. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { chartTicks } from '../lib/chart-ticks';
|
|
2
|
+
import { formatChartValue } from '../lib/chart-value';
|
|
2
3
|
export function divergingBarChartNiceMax(n) {
|
|
3
4
|
if (!(n > 0) || !Number.isFinite(n))
|
|
4
5
|
return 1;
|
|
@@ -38,7 +39,7 @@ export function divergingBarChartTicks(max) {
|
|
|
38
39
|
export function divergingBarChartTickAt(tick, max) {
|
|
39
40
|
return Math.round((50 - (tick / max) * 50) * 100) / 100;
|
|
40
41
|
}
|
|
41
|
-
export function divergingBarChartSigned(value, format =
|
|
42
|
+
export function divergingBarChartSigned(value, format = formatChartValue) {
|
|
42
43
|
if (value > 0)
|
|
43
44
|
return `+${format(value)}`;
|
|
44
45
|
if (value < 0)
|
|
@@ -13,4 +13,4 @@ export type DSDivergingBarChartProps = Omit<ComponentProps<'div'>, 'role' | 'ari
|
|
|
13
13
|
emptyLabel?: string;
|
|
14
14
|
};
|
|
15
15
|
/** A quantity that can go either way, drawn as bars above and below a baseline in two hues. */
|
|
16
|
-
export declare function DSDivergingBarChart({ labels, values, positiveSeries, negativeSeries, positiveLabel, negativeLabel, neutralLabel, label, height, valueLabels, labelEvery, formatValue, emptyLabel, className, ...props }: DSDivergingBarChartProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function DSDivergingBarChart({ labels, values, positiveSeries, negativeSeries, positiveLabel, negativeLabel, neutralLabel, label, height, valueLabels, labelEvery, formatValue, emptyLabel, loading, loadingLabel, className, ...props }: DSDivergingBarChartProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,12 +7,30 @@ import { cn } from '../../lib/cn';
|
|
|
7
7
|
import { CHART_SERIES_BG, chartSeriesSlot } from '../../lib/chart-series';
|
|
8
8
|
import { ChartFigures, useChartFigures } from '../../lib/web/chart-figures';
|
|
9
9
|
import { CHART_FINISH_READOUT } from '../../lib/web/chart-finish';
|
|
10
|
+
import { SpokenRegion } from '../../lib/web/spoken-region';
|
|
11
|
+
import { loadingSpoken } from '../../skeleton/skeleton';
|
|
12
|
+
import { DSSkeleton } from '../../skeleton/web/ds-skeleton';
|
|
10
13
|
import { DSText } from '../../text/web/ds-text';
|
|
14
|
+
import { formatChartValue } from '../../lib/chart-value';
|
|
11
15
|
const bgOf = (hue) => CHART_SERIES_BG[chartSeriesSlot(hue)];
|
|
12
16
|
function KeySwatch({ side, hue: swatchHue }) {
|
|
13
17
|
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
18
|
}
|
|
15
|
-
|
|
19
|
+
const LABEL_ROW = 'text-muted-foreground grid gap-1 text-body-xs';
|
|
20
|
+
const SKELETON_BARS = [
|
|
21
|
+
'bottom-1/2 h-1/3 rounded-b-none',
|
|
22
|
+
'top-1/2 h-1/5 rounded-t-none',
|
|
23
|
+
'bottom-1/2 h-1/5 rounded-b-none',
|
|
24
|
+
'top-1/2 h-2/5 rounded-t-none',
|
|
25
|
+
'bottom-1/2 h-1/4 rounded-b-none',
|
|
26
|
+
'bottom-1/2 h-2/5 rounded-b-none',
|
|
27
|
+
'top-1/2 h-1/6 rounded-t-none',
|
|
28
|
+
];
|
|
29
|
+
function DivergingBarChartSkeleton({ names, height, labelEvery, }) {
|
|
30
|
+
const columns = { gridTemplateColumns: `repeat(${String(names.length)}, minmax(0, 1fr))` };
|
|
31
|
+
return (_jsxs("div", { "aria-busy": true, className: "flex flex-col gap-2", "data-chart-loading": "", children: [_jsxs("div", { className: "relative pl-10", children: [_jsx("div", { className: "absolute inset-y-0 left-0 flex w-10 flex-col justify-between pe-2", children: Array.from({ length: 3 }, (_, i) => (_jsx(DSSkeleton, { fits: "body-xs", className: "w-full" }, i))) }), _jsxs("div", { className: "relative w-full", style: { height }, children: [_jsx("div", { "aria-hidden": true, className: "bg-border absolute inset-x-0 top-1/2 h-px" }), _jsx("div", { className: "absolute inset-0 grid gap-1", style: columns, children: names.map((_, i) => (_jsx("div", { className: "relative h-full", children: _jsx(DSSkeleton, { className: cn('absolute left-1/2 w-3/5 max-w-6 -translate-x-1/2', SKELETON_BARS[i % SKELETON_BARS.length]) }) }, i))) })] })] }), _jsx("div", { "aria-hidden": true, className: cn(LABEL_ROW, 'pl-10'), style: columns, children: names.map((name, i) => i % Math.max(1, labelEvery) !== 0 ? (_jsx("span", {}, i)) : name === undefined ? (_jsx(DSSkeleton, { fits: "body-xs", className: "mx-auto w-3/4" }, i)) : (_jsx("span", { className: "truncate text-center", children: name }, i))) })] }));
|
|
32
|
+
}
|
|
33
|
+
export function DSDivergingBarChart({ labels, values, positiveSeries = 1, negativeSeries = 2, positiveLabel, negativeLabel, neutralLabel, label, height = 160, valueLabels = false, labelEvery = 1, formatValue = formatChartValue, emptyLabel = 'No data', loading = false, loadingLabel, className, ...props }) {
|
|
16
34
|
const spec = divergingBarChartSpec({ labels, values });
|
|
17
35
|
const figures = useChartFigures();
|
|
18
36
|
const [active, setActive] = useState(undefined);
|
|
@@ -64,10 +82,15 @@ export function DSDivergingBarChart({ labels, values, positiveSeries = 1, negati
|
|
|
64
82
|
const tickText = (tick) => divergingBarChartSigned(tick, formatValue);
|
|
65
83
|
const gutter = `${String(Math.max(3, ...ticks.map((tick) => tickText(tick).length)) + 1)}ch`;
|
|
66
84
|
const hue = (bar) => bar.sign === 'negative' ? negativeSeries : positiveSeries;
|
|
85
|
+
const keyRow = (_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 })] }), !loading && 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 })] }))] }));
|
|
86
|
+
if (loading) {
|
|
87
|
+
const names = labels.length > 0 ? labels : Array.from({ length: SKELETON_BARS.length }, () => undefined);
|
|
88
|
+
return (_jsxs("div", { ...props, className: cn('flex w-full flex-col gap-2', className), children: [_jsx(SpokenRegion, { text: loadingSpoken(loading, loadingLabel) }), _jsx(DivergingBarChartSkeleton, { names: names, height: height, labelEvery: labelEvery }), keyRow] }));
|
|
89
|
+
}
|
|
67
90
|
if (spec.empty) {
|
|
68
|
-
return (
|
|
91
|
+
return (_jsxs("div", { ...props, className: cn('flex w-full flex-col gap-2', className), children: [_jsx(SpokenRegion, { text: loadingSpoken(loading, loadingLabel) }), _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 }) })] }));
|
|
69
92
|
}
|
|
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
|
|
93
|
+
return (_jsxs("div", { ...props, className: cn('flex w-full flex-col gap-2', className), children: [_jsx(SpokenRegion, { text: loadingSpoken(loading, loadingLabel) }), _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
94
|
? undefined
|
|
72
95
|
: divergingBarChartReading(spec.bars[reported], formatValue, neutralLabel), onKeyDown: onKeyDown, ref: plotRef, onPointerMove: onPointer, onPointerDown: onPointer, onPointerUp: onPointerUp, onPointerCancel: onPointerCancel, onPointerLeave: onPointerLeave, onBlur: () => {
|
|
73
96
|
releaseHold();
|
|
@@ -77,10 +100,10 @@ export function DSDivergingBarChart({ labels, values, positiveSeries = 1, negati
|
|
|
77
100
|
.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
101
|
const up = bar.sign !== 'negative';
|
|
79
102
|
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',
|
|
103
|
+
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', 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
104
|
? { bottom: 'calc(50% + 6px)' }
|
|
82
105
|
: up
|
|
83
106
|
? { bottom: `calc(50% + ${String(bar.extent / 2)}% + 4px)` }
|
|
84
107
|
: { 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:
|
|
108
|
+
}) }), 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: LABEL_ROW, 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))) }), keyRow, _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))) })] })] }));
|
|
86
109
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { Forwarded } from '../props';
|
|
2
|
+
import type { LoadingContract } from '../skeleton/skeleton';
|
|
3
|
+
/** What the development warning says when the key toggles parts and nothing names a part total. */
|
|
4
|
+
export declare const DONUT_SHOWN_NEEDS_A_LABEL = "A donut whose key hides parts needs shownLabel, or the centre keeps calling a part of the whole its total. Name what is left: \"Spend shown\".";
|
|
5
|
+
/** The word under the centre figure: the total's, or the part total's once a
|
|
6
|
+
* part is hidden. Falls back to the total's when the caller gave no other. */
|
|
7
|
+
export declare function donutCentreLabel(totalLabel: string, shownLabel: string | undefined, hiddenCount: number): string;
|
|
2
8
|
export declare const DONUT_MAX_SEGMENTS = 6;
|
|
3
9
|
/** How many named parts the ring keeps when it has to fold: the rest go to Other. */
|
|
4
10
|
export declare const DONUT_NAMED_WHEN_FOLDED: number;
|
|
@@ -19,7 +25,7 @@ export interface DonutSegment {
|
|
|
19
25
|
/** How much of the whole it is. Negative and non-finite values count as nothing. */
|
|
20
26
|
value: number;
|
|
21
27
|
}
|
|
22
|
-
export interface DonutChartContract {
|
|
28
|
+
export interface DonutChartContract extends LoadingContract {
|
|
23
29
|
/** The parts, in the order the ring runs from twelve o'clock, clockwise. */
|
|
24
30
|
segments: readonly DonutSegment[];
|
|
25
31
|
/** What the ring shows: names the group for a screen reader. */
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export const DONUT_SHOWN_NEEDS_A_LABEL = 'A donut whose key hides parts needs shownLabel, or the centre keeps calling a part of the whole its total. Name what is left: "Spend shown".';
|
|
2
|
+
export function donutCentreLabel(totalLabel, shownLabel, hiddenCount) {
|
|
3
|
+
return hiddenCount > 0 && shownLabel !== undefined && shownLabel.trim() !== '' ? shownLabel : totalLabel;
|
|
4
|
+
}
|
|
1
5
|
export const DONUT_MAX_SEGMENTS = 6;
|
|
2
6
|
export const DONUT_NAMED_WHEN_FOLDED = DONUT_MAX_SEGMENTS - 1;
|
|
3
7
|
export const DONUT_OTHER_KEY = 'other';
|
|
@@ -9,10 +9,13 @@ export type DSDonutChartProps = Omit<ComponentProps<'div'>, 'role' | 'aria-label
|
|
|
9
9
|
otherLabel: string;
|
|
10
10
|
/** The word under the total in the centre. Required: this package ships no copy. */
|
|
11
11
|
totalLabel: string;
|
|
12
|
+
/** The word under the centre figure once a part is hidden, "Spend shown": the figure is no
|
|
13
|
+
* longer the whole, so it is no longer the total. Needed whenever the key can hide a part. */
|
|
14
|
+
shownLabel?: string;
|
|
12
15
|
/** Shown in the centre when there is nothing to share. Required: this package ships no copy. */
|
|
13
16
|
emptyLabel: string;
|
|
14
17
|
/** Draws the ring in from twelve o'clock when it first appears. A person who has asked for less motion sees it finished. */
|
|
15
18
|
reveal?: boolean;
|
|
16
19
|
};
|
|
17
20
|
/** Parts of one whole as a thin ring with rounded ends, a total in the centre and a key of figures and percents. */
|
|
18
|
-
export declare function DSDonutChart({ segments, label, hiddenKeys, onHiddenKeysChange, formatValue, totalLabel, emptyLabel, otherLabel, reveal, className, ...props }: DSDonutChartProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function DSDonutChart({ segments, label, hiddenKeys, onHiddenKeysChange, formatValue, totalLabel, shownLabel, emptyLabel, otherLabel, reveal, loading, loadingLabel, className, ...props }: DSDonutChartProps): import("react/jsx-runtime").JSX.Element;
|