@tfn-design/design-system 0.3.0 → 0.4.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 +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/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,6 +1,21 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
export
|
|
2
|
+
/** How one row is laid out. */
|
|
3
|
+
export interface RecordPanelRowOptions {
|
|
4
|
+
/** The value under its label at every width, where a value beside its label
|
|
5
|
+
* would be squeezed: a table, a list of readings. */
|
|
6
|
+
wide?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** One row: a label, its value and, for a value that needs the whole line, how. */
|
|
9
|
+
export type RecordPanelRow = readonly [string, ReactNode] | readonly [string, ReactNode, RecordPanelRowOptions];
|
|
10
|
+
/** One section's rows, in the order shown. */
|
|
11
|
+
export type RecordPanelRows = readonly RecordPanelRow[];
|
|
12
|
+
/** A section of the record's own, after Status, with any content under its heading.
|
|
13
|
+
* Rows of facts belong in `details`; this is for what is not a row, such as the
|
|
14
|
+
* people a decision has to get past. */
|
|
15
|
+
export interface RecordPanelSection {
|
|
16
|
+
title: string;
|
|
17
|
+
content: ReactNode;
|
|
18
|
+
}
|
|
4
19
|
/** One thing that happened to the record. */
|
|
5
20
|
export interface RecordPanelActivity {
|
|
6
21
|
at: string;
|
|
@@ -1,32 +1,67 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import { type RecordPanelActivity, type RecordPanelRows, type RecordPanelTab } from '../record-panel';
|
|
3
|
-
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import { type RecordPanelActivity, type RecordPanelRows, type RecordPanelSection, type RecordPanelTab } from '../record-panel';
|
|
3
|
+
interface DSRecordPanelBaseProps {
|
|
4
4
|
open: boolean;
|
|
5
5
|
title: string;
|
|
6
6
|
sub: string;
|
|
7
7
|
/** Where the record stands. Beside it, `statusHelp` says what the words mean. */
|
|
8
8
|
status: RecordPanelRows;
|
|
9
9
|
details: RecordPanelRows;
|
|
10
|
-
/** What the record is attached to, under `linksTitle`.
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
/** What the record is attached to, under `linksTitle`. Left out, or empty, the
|
|
11
|
+
* section is not drawn. */
|
|
12
|
+
links?: RecordPanelRows | undefined;
|
|
13
13
|
/** The record's own actions, beside Edit: the same ones its row offers. */
|
|
14
14
|
actions?: ReactNode;
|
|
15
15
|
onClose: () => void;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/** Opens the record's edit sheet. Left out, there is no Edit: a person who may
|
|
17
|
+
* not edit the record is shown no Edit, never a greyed one. */
|
|
18
|
+
onEdit?: (() => void) | undefined;
|
|
18
19
|
/** The `links` section's heading. */
|
|
19
20
|
linksTitle?: string;
|
|
20
21
|
/** The panel's id, for the `aria-controls` of whatever opens it. */
|
|
21
22
|
id?: string;
|
|
22
|
-
/**
|
|
23
|
-
|
|
23
|
+
/** Sections of the record's own, after Status: a sign-off chain, a map. Each
|
|
24
|
+
* takes the same heading as the rest, with any content under it. */
|
|
25
|
+
sections?: readonly RecordPanelSection[] | undefined;
|
|
24
26
|
/** A state that outranks everything else on the record, above the tabs. */
|
|
25
27
|
banner?: ReactNode;
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
+
/** On the Status heading's line, at its end: what the status words mean, or a
|
|
29
|
+
* small secondary button that changes the status (`DSButton variant="secondary"
|
|
30
|
+
* size="sm"`), so the action sits where the eye already is. */
|
|
31
|
+
statusHelp?: ReactNode | undefined;
|
|
32
|
+
/** Draws the Latest note section. On by default where there are tabs, off
|
|
33
|
+
* where there are none: with no Activity tab there is nowhere to add a note. */
|
|
34
|
+
latestNote?: boolean | undefined;
|
|
35
|
+
/** The panel's own style. A list sets `--drawer-pad-x` to its gutter here, so
|
|
36
|
+
* the record beside it keeps the same room at the sides. */
|
|
37
|
+
style?: CSSProperties;
|
|
38
|
+
}
|
|
39
|
+
/** The default: Overview and Activity tabs, with notes added from Activity. */
|
|
40
|
+
interface DSRecordPanelWithActivity {
|
|
41
|
+
/** Draws the Overview and Activity tabs. On by default. */
|
|
42
|
+
tabs?: true;
|
|
43
|
+
activity: readonly RecordPanelActivity[];
|
|
44
|
+
onNote: (text: string) => void;
|
|
45
|
+
/** Which tab it opens on. */
|
|
46
|
+
tab?: RecordPanelTab;
|
|
28
47
|
/** The half-written note, held by the list so a close does not discard it. */
|
|
29
48
|
draft?: string;
|
|
30
49
|
onDraftChange?: (text: string) => void;
|
|
31
50
|
}
|
|
32
|
-
|
|
51
|
+
/** One page, no tabs: the record as it is now, with no history and no notes to add. */
|
|
52
|
+
interface DSRecordPanelWithoutActivity {
|
|
53
|
+
/** `false` draws the record as one page: no tabs and no Activity, so no notes
|
|
54
|
+
* are added here. */
|
|
55
|
+
tabs: false;
|
|
56
|
+
/** Read only for the latest note, when `latestNote` asks for it. */
|
|
57
|
+
activity?: readonly RecordPanelActivity[] | undefined;
|
|
58
|
+
onNote?: undefined;
|
|
59
|
+
tab?: undefined;
|
|
60
|
+
draft?: undefined;
|
|
61
|
+
onDraftChange?: undefined;
|
|
62
|
+
}
|
|
63
|
+
/** Edit, the tabs, the links section and the latest note are each optional. Left
|
|
64
|
+
* out, the panel draws them all, as it always has. */
|
|
65
|
+
export type DSRecordPanelProps = DSRecordPanelBaseProps & (DSRecordPanelWithActivity | DSRecordPanelWithoutActivity);
|
|
66
|
+
export declare function DSRecordPanel({ open, title, sub, status, details, links, activity, actions, onClose, onEdit, onNote, id, linksTitle, tab, tabs, latestNote, sections, banner, statusHelp, draft, onDraftChange, style, }: DSRecordPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
export {};
|
|
@@ -8,16 +8,24 @@ import { DSLabeledField } from '../../labeled-field/web/ds-labeled-field';
|
|
|
8
8
|
import { DSTabs, tabDomId } from '../../tabs/web/ds-tabs';
|
|
9
9
|
import { DSText } from '../../text/web/ds-text';
|
|
10
10
|
import { DSTextarea } from '../../textarea/web/ds-textarea';
|
|
11
|
+
function Heading({ title, help }) {
|
|
12
|
+
return (_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx(DSText, { as: "h3", variant: "caps", tone: "muted", className: "record-head", children: title }), help === undefined ? null : _jsx("div", { className: "flex shrink-0 items-center", children: help })] }));
|
|
13
|
+
}
|
|
11
14
|
function Section({ title, rows, help, }) {
|
|
12
15
|
if (rows.length === 0)
|
|
13
16
|
return null;
|
|
14
|
-
return (_jsxs("section", { className: "flex flex-col gap-2", children: [
|
|
17
|
+
return (_jsxs("section", { className: "flex flex-col gap-2", children: [_jsx(Heading, { title: title, help: help }), _jsx(DSDescriptionList, { appearance: "rows", items: rows.map(([label, value, options]) => ({
|
|
18
|
+
key: label,
|
|
19
|
+
label,
|
|
20
|
+
value,
|
|
21
|
+
...(options?.wide === true ? { wide: true } : {}),
|
|
22
|
+
})) })] }));
|
|
15
23
|
}
|
|
16
24
|
function Entry({ entry }) {
|
|
17
25
|
return (_jsxs("li", { className: "flex flex-col gap-1 py-3", children: [_jsxs(DSText, { variant: "body-sm", tone: "muted", className: "tabular-nums", children: [entry.at, " \u00B7 ", entry.who] }), entry.kind === 'change' ? (_jsxs(DSText, { as: "p", children: [entry.field, ": ", entry.from ?? 'Not given', " \u2192 ", entry.to ?? 'Not given'] })) : (_jsx(DSText, { as: "p", children: entry.kind === 'note' ? `“${entry.text ?? ''}”` : entry.text }))] }));
|
|
18
26
|
}
|
|
19
|
-
export function DSRecordPanel({ open, title, sub, status, details, links, activity, actions, onClose, onEdit, onNote, id = RECORD_PANEL_ID, linksTitle = 'Related', tab = 'overview', banner, statusHelp, draft, onDraftChange, }) {
|
|
20
|
-
const [index, setIndex] = useState(tab === 'overview' ? 0 : 1);
|
|
27
|
+
export function DSRecordPanel({ open, title, sub, status, details, links = [], activity = [], actions, onClose, onEdit, onNote, id = RECORD_PANEL_ID, linksTitle = 'Related', tab = 'overview', tabs = true, latestNote = tabs, sections = [], banner, statusHelp, draft, onDraftChange, style, }) {
|
|
28
|
+
const [index, setIndex] = useState(tab === 'overview' || !tabs ? 0 : 1);
|
|
21
29
|
const [ownNote, setOwnNote] = useState('');
|
|
22
30
|
const note = draft ?? ownNote;
|
|
23
31
|
const setNote = onDraftChange ?? setOwnNote;
|
|
@@ -25,19 +33,20 @@ export function DSRecordPanel({ open, title, sub, status, details, links, activi
|
|
|
25
33
|
const last = recordPanelLatestNote(activity);
|
|
26
34
|
const tabsId = useId();
|
|
27
35
|
const panelId = `${tabsId}-panel`;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
const overview = (_jsxs(_Fragment, { children: [_jsx(Section, { title: "Status", rows: status, help: statusHelp }), sections.map((section) => (_jsxs("section", { className: "flex flex-col gap-2", children: [_jsx(Heading, { title: section.title }), section.content] }, section.title))), _jsx(Section, { title: "Details", rows: details }), _jsx(Section, { title: linksTitle, rows: links }), latestNote && (_jsxs("section", { className: "flex flex-col gap-2", children: [_jsx(DSText, { as: "h3", variant: "caps", tone: "muted", className: "record-head", children: "Latest note" }), last === undefined ? (_jsx(DSText, { as: "p", tone: "muted", children: tabs ? 'No notes yet. Anyone can add one from Activity.' : 'No notes yet.' })) : (_jsxs(_Fragment, { children: [_jsxs("blockquote", { className: "rounded-tile bg-muted p-3", children: [_jsxs(DSText, { as: "p", children: ["\u201C", last.text, "\u201D"] }), _jsxs(DSText, { variant: "body-sm", tone: "muted", children: [last.who, " \u00B7 ", last.at] })] }), tabs && notes.length > 1 && (_jsx("div", { children: _jsx(DSButton, { variant: "link", flush: true, onClick: () => {
|
|
37
|
+
setIndex(1);
|
|
38
|
+
document.getElementById(tabDomId(tabsId, 1))?.focus();
|
|
39
|
+
}, children: `See all ${String(notes.length)} notes` }) }))] }))] })), (onEdit !== undefined || actions !== undefined) && (_jsxs("div", { className: "flex flex-wrap gap-2 border-t border-border pt-4", children: [onEdit === undefined ? null : (_jsx(DSButton, { variant: "secondary", onClick: onEdit, children: "Edit record" })), actions] }))] }));
|
|
40
|
+
return (_jsx(DSDrawer, { id: id, open: open, modal: false, title: title, sub: sub, closeLabel: "Close", onRequestClose: onClose, ...(style === undefined ? {} : { style }), children: _jsxs("div", { className: "flex flex-col gap-5", children: [banner, !tabs ? (_jsx("div", { className: "flex flex-col gap-5", children: overview })) : (_jsxs(_Fragment, { children: [_jsx(DSTabs, { items: [
|
|
41
|
+
{ label: 'Overview' },
|
|
42
|
+
{
|
|
43
|
+
label: 'Activity',
|
|
44
|
+
...(notes.length > 0 ? { count: notes.length } : {}),
|
|
45
|
+
},
|
|
46
|
+
], selectedIndex: index, onSelectedIndexChange: setIndex, "aria-label": "Record", idPrefix: tabsId, panelId: panelId }), _jsx("div", { id: panelId, role: "tabpanel", "aria-labelledby": tabDomId(tabsId, index), className: "flex flex-col gap-5", children: index === 0 ? (overview) : (_jsxs(_Fragment, { children: [_jsx("ol", { className: "flex flex-col divide-y divide-border", children: activity.length === 0 ? (_jsx("li", { className: "py-3", children: _jsx(DSText, { tone: "muted", children: "Nothing has happened to this record yet." }) })) : ([...activity]
|
|
47
|
+
.reverse()
|
|
48
|
+
.map((a, i) => _jsx(Entry, { entry: a }, `${a.at}-${String(i)}`))) }), _jsx(DSLabeledField, { label: "Add a note", helper: "Notes are for people. They are not a reason and nothing filters on them.", children: _jsx(DSTextarea, { rows: 3, value: note, onValueChange: setNote, placeholder: "What should the next person know?" }) }), _jsx("div", { children: _jsx(DSButton, { disabled: note.trim() === '', onClick: () => {
|
|
49
|
+
onNote?.(note.trim());
|
|
50
|
+
setNote('');
|
|
51
|
+
}, children: "Save note" }) })] })) })] }))] }) }));
|
|
43
52
|
}
|
|
@@ -82,6 +82,9 @@ export interface ReorderListContract {
|
|
|
82
82
|
numbered?: Forwarded<boolean>;
|
|
83
83
|
/** Prevents reordering. */
|
|
84
84
|
disabled?: Forwarded<boolean>;
|
|
85
|
+
/** Rows draw no edge or fill at rest, for rows whose content is itself a field
|
|
86
|
+
* and so already has an edge. A lifted row is still raised. */
|
|
87
|
+
plain?: Forwarded<boolean>;
|
|
85
88
|
/** Replaces any of the words the list adds itself (see `ReorderListCopy`). */
|
|
86
89
|
copy?: Partial<ReorderListCopy>;
|
|
87
90
|
}
|
|
@@ -5,6 +5,11 @@ export type DSReorderListProps = Omit<ComponentProps<'div'>, 'children' | 'onCha
|
|
|
5
5
|
onOrderChange: (order: string[]) => void;
|
|
6
6
|
/** Draws extra content at the end of a row, before its menu, such as a status badge or a count. */
|
|
7
7
|
renderTrailing?: (item: ReorderItem, index: number) => ReactNode;
|
|
8
|
+
/** Draws content at the start of a row, after its handle and number, such as a route marker. */
|
|
9
|
+
renderLeading?: (item: ReorderItem, index: number) => ReactNode;
|
|
10
|
+
/** Draws the row's body in place of its label and description, such as a field. The
|
|
11
|
+
* item's label still names the handle, the menu and every announcement. */
|
|
12
|
+
renderContent?: (item: ReorderItem, index: number) => ReactNode;
|
|
8
13
|
};
|
|
9
14
|
/** A priority-ordered list whose rows move by drag, by keyboard on the handle, or from each row's menu. */
|
|
10
|
-
export declare function DSReorderList({ order, items, label, numbered, disabled, copy, onOrderChange, renderTrailing, className, ...props }: DSReorderListProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function DSReorderList({ order, items, label, numbered, disabled, plain, copy, onOrderChange, renderTrailing, renderLeading, renderContent, className, ...props }: DSReorderListProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useId, useLayoutEffect, useRef, useState, } from 'react';
|
|
3
3
|
import { ArrowUpDown, GripVertical } from 'lucide-react';
|
|
4
4
|
import { REORDER_ACTIONS, REORDER_LIST_COPY, moveItem, moveItemByKey, reorderActionTarget, reorderKeyIntent, reorderListRowSpec, reorderMenuActions, reorderSiblingShift, reorderTargetIndex, } from '../reorder-list';
|
|
@@ -22,7 +22,7 @@ const ROW_CONTROL = 'compact:size-8';
|
|
|
22
22
|
function isAction(value) {
|
|
23
23
|
return REORDER_ACTIONS.includes(value);
|
|
24
24
|
}
|
|
25
|
-
export function DSReorderList({ order, items, label, numbered = true, disabled = false, copy, onOrderChange, renderTrailing, className, ...props }) {
|
|
25
|
+
export function DSReorderList({ order, items, label, numbered = true, disabled = false, plain = false, copy, onOrderChange, renderTrailing, renderLeading, renderContent, className, ...props }) {
|
|
26
26
|
const baseId = useId();
|
|
27
27
|
const instructionsId = `${baseId}-how`;
|
|
28
28
|
const isDisabled = disabled;
|
|
@@ -232,7 +232,9 @@ export function DSReorderList({ order, items, label, numbered = true, disabled =
|
|
|
232
232
|
rows.current.delete(key);
|
|
233
233
|
else
|
|
234
234
|
rows.current.set(key, node);
|
|
235
|
-
}, "data-key": key, "data-lifted": isLifted || undefined, style: offset === 0 ? undefined : { transform: `translateY(${String(offset)}px)` }, className: cn('relative flex items-center gap-3 rounded-field border py-2 ps-1 pe-2', drag?.key === key ? 'z-(--layer-raised) transition-none' : 'transition-spring-calm', isLifted && 'shadow-medium',
|
|
235
|
+
}, "data-key": key, "data-lifted": isLifted || undefined, style: offset === 0 ? undefined : { transform: `translateY(${String(offset)}px)` }, className: cn('relative flex items-center gap-3 rounded-field border py-2 ps-1 pe-2', drag?.key === key ? 'z-(--layer-raised) transition-none' : 'transition-spring-calm', isLifted && 'shadow-medium', plain && !isLifted
|
|
236
|
+
? 'border-transparent'
|
|
237
|
+
: cn(SURFACE[spec.surface], BORDER[spec.border])), children: [_jsx("button", { ref: (node) => {
|
|
236
238
|
if (node === null)
|
|
237
239
|
handles.current.delete(key);
|
|
238
240
|
else
|
|
@@ -243,7 +245,7 @@ export function DSReorderList({ order, items, label, numbered = true, disabled =
|
|
|
243
245
|
onHandleBlur(key);
|
|
244
246
|
}, onPointerDown: (event) => {
|
|
245
247
|
onPointerDown(key, index, event);
|
|
246
|
-
}, className: cn('inline-flex shrink-0 touch-none select-none items-center justify-center rounded-control focusable state-layer', HANDLE_BOX, isLifted ? 'cursor-grabbing' : 'cursor-grab', INK[spec.handleInk], 'disabled:cursor-not-allowed disabled:text-disabled-foreground'), children: _jsx(GripVertical, { "aria-hidden": true, className: "size-4" }) }), numbered && (_jsx(DSText, { as: "span", variant: "body-sm", "aria-hidden": true, className: cn('w-5 shrink-0 text-end tabular-nums', INK[spec.positionInk]), children: index + 1 })),
|
|
248
|
+
}, className: cn('inline-flex shrink-0 touch-none select-none items-center justify-center rounded-control focusable state-layer', HANDLE_BOX, isLifted ? 'cursor-grabbing' : 'cursor-grab', INK[spec.handleInk], 'disabled:cursor-not-allowed disabled:text-disabled-foreground'), children: _jsx(GripVertical, { "aria-hidden": true, className: "size-4" }) }), numbered && (_jsx(DSText, { as: "span", variant: "body-sm", "aria-hidden": true, className: cn('w-5 shrink-0 text-end tabular-nums', INK[spec.positionInk]), children: index + 1 })), renderLeading?.(item, index), _jsx("div", { className: "min-w-0 flex-1", children: renderContent === undefined ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "truncate text-body-sm-strong", children: item.label }), item.description !== undefined && (_jsx("div", { className: cn('truncate text-body-xs', INK[spec.positionInk]), children: item.description }))] })) : (renderContent(item, index)) }), renderTrailing?.(item, index), actions.length > 0 && (_jsxs("span", { className: "relative shrink-0", children: [_jsx(DSIconButton, { variant: "ghost", size: "sm", label: words.menu(item.label), icon: _jsx(ArrowUpDown, { "aria-hidden": true }), className: ROW_CONTROL, disabled: isDisabled || lifted !== null, "aria-haspopup": "menu", "aria-expanded": menuFor === key, onClick: () => {
|
|
247
249
|
setMenuFor(menuFor === key ? null : key);
|
|
248
250
|
} }), _jsx(DSDropdownMenu, { open: menuFor === key, items: actions.map((action) => ({
|
|
249
251
|
label: words.actions[action],
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ViewProps } from 'react-native';
|
|
2
|
+
import { type ResendControlContract } from '../resend-control';
|
|
3
|
+
export type DSResendControlProps = Omit<ViewProps, 'children'> & ResendControlContract & {
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* A "didn't get it? resend" control that holds itself behind a countdown: the
|
|
8
|
+
* second adapter, for the driver's code screen.
|
|
9
|
+
*
|
|
10
|
+
* <strong>The same contract and helpers as the web adapter</strong>
|
|
11
|
+
* (`resendSpec`, `resendStateAfter`, `RESEND_COPY`), so the cooldown, the
|
|
12
|
+
* three outcomes and the words cannot drift between the two.
|
|
13
|
+
*
|
|
14
|
+
* <strong>Held, the link says so.</strong> While it waits the link is disabled,
|
|
15
|
+
* which a screen reader reads as dimmed, and its hint says how long is left.
|
|
16
|
+
* The visible time beside it is in the muted ink, not the disabled grey, so it
|
|
17
|
+
* can be read. It is hidden from the screen reader, which would otherwise read
|
|
18
|
+
* a new number every second.
|
|
19
|
+
*
|
|
20
|
+
* <strong>Said once, when it changes.</strong> The end of the wait and the
|
|
21
|
+
* rate limit are spoken through the platform's announcement, not a live
|
|
22
|
+
* region, so neither is said twice on Android.
|
|
23
|
+
*/
|
|
24
|
+
export declare function DSResendControl({ onResend, cooldownSeconds, resendLabel, rateLimitedLabel, copy, className, ...props }: DSResendControlProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { RESEND_COOLDOWN_SECONDS, RESEND_COPY, resendSpec, resendStateAfter, } from '../resend-control';
|
|
5
|
+
import { buttonSpec } from '../../button/button';
|
|
6
|
+
import { DSButton } from '../../button/native/ds-button';
|
|
7
|
+
import { DSText } from '../../text/native/ds-text';
|
|
8
|
+
import { Text } from '../../lib/native/text';
|
|
9
|
+
import { announce } from '../../lib/native/announce';
|
|
10
|
+
import { useReducedMotion } from '../../lib/native/use-reduced-motion';
|
|
11
|
+
import { cn } from '../../lib/cn';
|
|
12
|
+
const INK = { 'muted-foreground': 'text-muted-foreground' };
|
|
13
|
+
const LABEL_STEP = {
|
|
14
|
+
'ui-sm': 'text-ui-sm font-semibold',
|
|
15
|
+
'ui-md': 'text-ui-md font-semibold',
|
|
16
|
+
'ui-lg': 'text-ui-lg font-semibold',
|
|
17
|
+
'ui-xl': 'text-ui-xl font-semibold',
|
|
18
|
+
};
|
|
19
|
+
const LINK_LABEL = LABEL_STEP[buttonSpec('link', 'md', { flush: true }).text];
|
|
20
|
+
export function DSResendControl({ onResend, cooldownSeconds = RESEND_COOLDOWN_SECONDS, resendLabel, rateLimitedLabel, copy, className, ...props }) {
|
|
21
|
+
const words = { ...RESEND_COPY, ...copy };
|
|
22
|
+
const reduced = useReducedMotion();
|
|
23
|
+
const [state, setState] = useState('cooling');
|
|
24
|
+
const [remaining, setRemaining] = useState(cooldownSeconds);
|
|
25
|
+
const [limitLabel, setLimitLabel] = useState(rateLimitedLabel);
|
|
26
|
+
const [pending, setPending] = useState(false);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (state !== 'cooling' || reduced)
|
|
29
|
+
return undefined;
|
|
30
|
+
const timer = setInterval(() => {
|
|
31
|
+
setRemaining((left) => (left <= 1 ? 0 : left - 1));
|
|
32
|
+
}, 1000);
|
|
33
|
+
return () => {
|
|
34
|
+
clearInterval(timer);
|
|
35
|
+
};
|
|
36
|
+
}, [state, reduced]);
|
|
37
|
+
const spec = resendSpec(state, remaining, reduced);
|
|
38
|
+
const rateLimited = spec.state === 'rateLimited';
|
|
39
|
+
const counting = spec.countdown !== null;
|
|
40
|
+
const waiting = !spec.actionable;
|
|
41
|
+
const wasCounting = useRef(false);
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (wasCounting.current && !counting && !rateLimited)
|
|
44
|
+
announce(words.ready);
|
|
45
|
+
wasCounting.current = counting;
|
|
46
|
+
}, [counting, rateLimited, words.ready]);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (rateLimited)
|
|
49
|
+
announce(limitLabel);
|
|
50
|
+
}, [rateLimited, limitLabel]);
|
|
51
|
+
const press = useCallback(() => {
|
|
52
|
+
setPending(true);
|
|
53
|
+
void (async () => {
|
|
54
|
+
try {
|
|
55
|
+
const outcome = await onResend();
|
|
56
|
+
const next = resendStateAfter(outcome);
|
|
57
|
+
setState(next);
|
|
58
|
+
if (next === 'cooling')
|
|
59
|
+
setRemaining(cooldownSeconds);
|
|
60
|
+
if (outcome === 'rateLimited')
|
|
61
|
+
setLimitLabel(rateLimitedLabel);
|
|
62
|
+
}
|
|
63
|
+
finally {
|
|
64
|
+
setPending(false);
|
|
65
|
+
}
|
|
66
|
+
})();
|
|
67
|
+
}, [onResend, cooldownSeconds, rateLimitedLabel]);
|
|
68
|
+
return (_jsxs(View, { className: cn('flex-row flex-wrap items-baseline gap-x-1 gap-y-1', className), ...props, children: [_jsx(DSButton, { variant: "link", flush: true, pending: pending, disabled: waiting, ...(counting
|
|
69
|
+
? { accessibilityHint: words.available(remaining) }
|
|
70
|
+
: rateLimited
|
|
71
|
+
? { accessibilityHint: limitLabel }
|
|
72
|
+
: {}), onPress: press, children: resendLabel }), counting && (_jsx(Text, { testID: "resend-countdown", "aria-hidden": true, accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", className: cn('font-sans tabular-nums', LINK_LABEL, INK[spec.waitingInk]), children: words.counting(spec.countdown ?? '') })), rateLimited && (_jsx(DSText, { testID: "resend-limit", variant: "body-sm", className: cn('basis-full', INK[spec.waitingInk]), children: limitLabel }))] }));
|
|
73
|
+
}
|
|
@@ -34,6 +34,8 @@ export interface ResendCopy {
|
|
|
34
34
|
counting: (clock: string) => string;
|
|
35
35
|
/** The link's description while it counts down, given the seconds left. */
|
|
36
36
|
available: (seconds: number) => string;
|
|
37
|
+
/** Said once, through the polite live region, when the link turns busy. */
|
|
38
|
+
busy: string;
|
|
37
39
|
}
|
|
38
40
|
export declare const RESEND_COPY: ResendCopy;
|
|
39
41
|
export interface ResendControlContract {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BUTTON_BUSY_ANNOUNCEMENT } from '../button/button';
|
|
1
2
|
export const RESEND_OUTCOMES = ['sent', 'rateLimited', 'failed'];
|
|
2
3
|
export const RESEND_STATES = ['cooling', 'offered', 'rateLimited'];
|
|
3
4
|
export const RESEND_COOLDOWN_SECONDS = 30;
|
|
@@ -25,6 +26,7 @@ export function resendSpec(state, remaining, reduced = false) {
|
|
|
25
26
|
}
|
|
26
27
|
export const RESEND_COPY = {
|
|
27
28
|
ready: 'You can resend now',
|
|
29
|
+
busy: BUTTON_BUSY_ANNOUNCEMENT,
|
|
28
30
|
counting: (clock) => `in ${clock}`,
|
|
29
31
|
available: (seconds) => {
|
|
30
32
|
const whole = Math.max(0, Math.ceil(seconds));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useId, useRef, useState } from 'react';
|
|
3
3
|
import { RESEND_COOLDOWN_SECONDS, RESEND_COPY, resendSpec, resendStateAfter, } from '../resend-control';
|
|
4
4
|
import { DSButton } from '../../button/web/ds-button';
|
|
@@ -71,11 +71,11 @@ export function DSResendControl({ onResend, cooldownSeconds = RESEND_COOLDOWN_SE
|
|
|
71
71
|
}
|
|
72
72
|
})();
|
|
73
73
|
}, [onResend, cooldownSeconds, rateLimitedLabel]);
|
|
74
|
-
return (_jsxs("div", { className: cn('flex items-center', className), ...props, children: [
|
|
74
|
+
return (_jsxs("div", { className: cn('flex items-center', className), ...props, children: [_jsx(DSButton, { variant: "link", flush: true, pending: pending, busyLabel: words.busy, ...(waiting ? { 'aria-disabled': true } : {}), ...(counting || rateLimited
|
|
75
75
|
? { 'aria-describedby': rateLimited ? limitId : waitId }
|
|
76
76
|
: {}), onClick: () => {
|
|
77
77
|
if (waiting)
|
|
78
78
|
return;
|
|
79
79
|
press();
|
|
80
|
-
}, children:
|
|
80
|
+
}, children: _jsxs("span", { className: cn(waiting && INK[spec.waitingInk]), children: [resendLabel, counting && _jsxs("span", { "aria-hidden": true, children: [" ", words.counting(spec.countdown ?? '')] })] }) }), counting && (_jsx("span", { id: waitId, className: "sr-only", children: words.available(remaining) })), _jsx(DSText, { variant: "body-sm", id: limitId, "aria-live": "polite", className: cn(INK[spec.waitingInk], rateLimited && 'ms-2'), children: rateLimited ? limitLabel : '' })] }));
|
|
81
81
|
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { Forwarded } from '../props';
|
|
2
|
+
export declare const ROUTE_POINT_ROLES: readonly ["start", "stop", "destination"];
|
|
3
|
+
export type RoutePointRole = (typeof ROUTE_POINT_ROLES)[number];
|
|
4
|
+
/** What the point at `index` is in a route of `total` points. */
|
|
5
|
+
export declare function routePointRole(index: number, total: number): RoutePointRole;
|
|
6
|
+
/** One place on the route. */
|
|
7
|
+
export interface RoutePoint {
|
|
8
|
+
/** A stable key, kept as the point moves. */
|
|
9
|
+
key: string;
|
|
10
|
+
/** The text in the point's field. */
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
/** The fewest points a route has: a start and a destination. */
|
|
14
|
+
export declare const ROUTE_MIN_POINTS = 2;
|
|
15
|
+
/** How many points a route holds unless the caller says otherwise. */
|
|
16
|
+
export declare const ROUTE_DEFAULT_MAX_POINTS = 10;
|
|
17
|
+
/** Whether a stop can be added: the start and the destination both hold a place and there is room. */
|
|
18
|
+
export declare function routeCanAddStop(points: readonly RoutePoint[], maxPoints?: number): boolean;
|
|
19
|
+
/** A copy of the route with an empty stop, keyed `key`, just before the destination. */
|
|
20
|
+
export declare function routeAddStop(points: readonly RoutePoint[], key: string): RoutePoint[];
|
|
21
|
+
/** Whether a point can be removed: only while the route has more than a start and a destination. */
|
|
22
|
+
export declare function routeCanRemove(points: readonly RoutePoint[]): boolean;
|
|
23
|
+
/** A copy of the route without the point keyed `key`. A route at its fewest points is returned unchanged. */
|
|
24
|
+
export declare function routeRemovePoint(points: readonly RoutePoint[], key: string): RoutePoint[];
|
|
25
|
+
/** A copy of the route with the start and the destination swapped. */
|
|
26
|
+
export declare function routeSwap(points: readonly RoutePoint[]): RoutePoint[];
|
|
27
|
+
/** A copy of the route with the text of the point keyed `key` replaced. */
|
|
28
|
+
export declare function routeSetValue(points: readonly RoutePoint[], key: string, value: string): RoutePoint[];
|
|
29
|
+
/** Every word the fields add themselves, in one place so a locale can replace them. */
|
|
30
|
+
export interface RouteFieldsCopy {
|
|
31
|
+
/** A field's accessible name, given its role and, for a stop, its 1-based number among the stops. */
|
|
32
|
+
field: (role: RoutePointRole, stop: number) => string;
|
|
33
|
+
/** A field's placeholder, given its role. */
|
|
34
|
+
placeholder: (role: RoutePointRole) => string;
|
|
35
|
+
/** The swap button's accessible name. */
|
|
36
|
+
swap: string;
|
|
37
|
+
/** The add button's words. */
|
|
38
|
+
addStop: string;
|
|
39
|
+
/** Read with Add stop while it is disabled for want of a start and a destination. */
|
|
40
|
+
addStopNeedsEnds: string;
|
|
41
|
+
/** A remove button's accessible name, given the field's name. */
|
|
42
|
+
remove: (field: string) => string;
|
|
43
|
+
/** What the live region says after a change the fields made themselves. */
|
|
44
|
+
announcement: (kind: RouteAnnouncementKind, field: string) => string;
|
|
45
|
+
}
|
|
46
|
+
export declare const ROUTE_ANNOUNCEMENT_KINDS: readonly ["added", "removed", "swapped"];
|
|
47
|
+
export type RouteAnnouncementKind = (typeof ROUTE_ANNOUNCEMENT_KINDS)[number];
|
|
48
|
+
export declare const ROUTE_FIELDS_COPY: RouteFieldsCopy;
|
|
49
|
+
export declare const ROUTE_FIELDS_START_INK = "foreground";
|
|
50
|
+
export declare const ROUTE_FIELDS_DESTINATION_INK = "primary";
|
|
51
|
+
export declare const ROUTE_FIELDS_STOP_INK = "muted-foreground";
|
|
52
|
+
export declare const ROUTE_FIELDS_LINE = "muted-foreground";
|
|
53
|
+
export declare const ROUTE_FIELDS_MARK_GROUND = "background";
|
|
54
|
+
export type RouteFieldsInkRole = typeof ROUTE_FIELDS_START_INK | typeof ROUTE_FIELDS_DESTINATION_INK | typeof ROUTE_FIELDS_STOP_INK;
|
|
55
|
+
export interface RouteFieldsMarkSpec {
|
|
56
|
+
role: RoutePointRole;
|
|
57
|
+
ink: RouteFieldsInkRole;
|
|
58
|
+
/** Whether the dotted line runs up to the row above. */
|
|
59
|
+
lineAbove: boolean;
|
|
60
|
+
/** Whether the dotted line runs down to the row below. */
|
|
61
|
+
lineBelow: boolean;
|
|
62
|
+
}
|
|
63
|
+
/** How the mark beside the point at `index` of `total` is drawn. */
|
|
64
|
+
export declare function routeFieldsMarkSpec(index: number, total: number): RouteFieldsMarkSpec;
|
|
65
|
+
/** The props every Route Fields implementation accepts. */
|
|
66
|
+
export interface RouteFieldsContract {
|
|
67
|
+
/** What the fields are, for a screen reader, such as "Route". */
|
|
68
|
+
label: string;
|
|
69
|
+
/** The route, first to last: the start, any stops, then the destination. Two at least. */
|
|
70
|
+
points: readonly RoutePoint[];
|
|
71
|
+
/** Receives the whole route after any change: typing, a swap, a move, an added or removed stop. */
|
|
72
|
+
onPointsChange: (points: RoutePoint[]) => void;
|
|
73
|
+
/** The most points the route may hold, the ends included. 10 unless set. */
|
|
74
|
+
maxPoints?: Forwarded<number>;
|
|
75
|
+
/** Prevents every change. */
|
|
76
|
+
disabled?: Forwarded<boolean>;
|
|
77
|
+
/** Replaces any of the words the fields add themselves (see `RouteFieldsCopy`). */
|
|
78
|
+
copy?: Partial<RouteFieldsCopy>;
|
|
79
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export const ROUTE_POINT_ROLES = ['start', 'stop', 'destination'];
|
|
2
|
+
export function routePointRole(index, total) {
|
|
3
|
+
if (index <= 0)
|
|
4
|
+
return 'start';
|
|
5
|
+
if (index >= total - 1)
|
|
6
|
+
return 'destination';
|
|
7
|
+
return 'stop';
|
|
8
|
+
}
|
|
9
|
+
export const ROUTE_MIN_POINTS = 2;
|
|
10
|
+
export const ROUTE_DEFAULT_MAX_POINTS = 10;
|
|
11
|
+
function filled(point) {
|
|
12
|
+
return point !== undefined && point.value.trim() !== '';
|
|
13
|
+
}
|
|
14
|
+
export function routeCanAddStop(points, maxPoints = ROUTE_DEFAULT_MAX_POINTS) {
|
|
15
|
+
return points.length < maxPoints && filled(points[0]) && filled(points[points.length - 1]);
|
|
16
|
+
}
|
|
17
|
+
export function routeAddStop(points, key) {
|
|
18
|
+
const next = [...points];
|
|
19
|
+
next.splice(Math.max(next.length - 1, 0), 0, { key, value: '' });
|
|
20
|
+
return next;
|
|
21
|
+
}
|
|
22
|
+
export function routeCanRemove(points) {
|
|
23
|
+
return points.length > ROUTE_MIN_POINTS;
|
|
24
|
+
}
|
|
25
|
+
export function routeRemovePoint(points, key) {
|
|
26
|
+
if (!routeCanRemove(points))
|
|
27
|
+
return [...points];
|
|
28
|
+
return points.filter((point) => point.key !== key);
|
|
29
|
+
}
|
|
30
|
+
export function routeSwap(points) {
|
|
31
|
+
return [...points].reverse();
|
|
32
|
+
}
|
|
33
|
+
export function routeSetValue(points, key, value) {
|
|
34
|
+
return points.map((point) => (point.key === key ? { ...point, value } : point));
|
|
35
|
+
}
|
|
36
|
+
export const ROUTE_ANNOUNCEMENT_KINDS = ['added', 'removed', 'swapped'];
|
|
37
|
+
export const ROUTE_FIELDS_COPY = {
|
|
38
|
+
field: (role, stop) => role === 'start' ? 'From' : role === 'destination' ? 'To' : `Stop ${String(stop)}`,
|
|
39
|
+
placeholder: (role) => role === 'start'
|
|
40
|
+
? 'Choose a start'
|
|
41
|
+
: role === 'destination'
|
|
42
|
+
? 'Choose a destination'
|
|
43
|
+
: 'Add a stop',
|
|
44
|
+
swap: 'Swap start and destination',
|
|
45
|
+
addStop: 'Add stop',
|
|
46
|
+
addStopNeedsEnds: 'Choose a start and a destination to add a stop.',
|
|
47
|
+
remove: (field) => `Remove ${field}`,
|
|
48
|
+
announcement: (kind, field) => kind === 'added'
|
|
49
|
+
? `${field} added`
|
|
50
|
+
: kind === 'removed'
|
|
51
|
+
? `${field} removed`
|
|
52
|
+
: 'Start and destination swapped',
|
|
53
|
+
};
|
|
54
|
+
export const ROUTE_FIELDS_START_INK = 'foreground';
|
|
55
|
+
export const ROUTE_FIELDS_DESTINATION_INK = 'primary';
|
|
56
|
+
export const ROUTE_FIELDS_STOP_INK = 'muted-foreground';
|
|
57
|
+
export const ROUTE_FIELDS_LINE = 'muted-foreground';
|
|
58
|
+
export const ROUTE_FIELDS_MARK_GROUND = 'background';
|
|
59
|
+
export function routeFieldsMarkSpec(index, total) {
|
|
60
|
+
const role = routePointRole(index, total);
|
|
61
|
+
return {
|
|
62
|
+
role,
|
|
63
|
+
ink: role === 'start'
|
|
64
|
+
? ROUTE_FIELDS_START_INK
|
|
65
|
+
: role === 'destination'
|
|
66
|
+
? ROUTE_FIELDS_DESTINATION_INK
|
|
67
|
+
: ROUTE_FIELDS_STOP_INK,
|
|
68
|
+
lineAbove: index > 0,
|
|
69
|
+
lineBelow: index < total - 1,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ComponentProps } from 'react';
|
|
2
|
+
import { type RouteFieldsContract } from '../route-fields';
|
|
3
|
+
export type DSRouteFieldsProps = Omit<ComponentProps<'div'>, 'children' | 'onChange' | 'role' | 'aria-label'> & RouteFieldsContract;
|
|
4
|
+
/** A start, any stops and a destination as stacked fields: two swap, more reorder by drag, keyboard or menu. */
|
|
5
|
+
export declare function DSRouteFields({ label, points, onPointsChange, maxPoints, disabled, copy, className, ...props }: DSRouteFieldsProps): import("react/jsx-runtime").JSX.Element;
|