@ds-mo/ui 3.0.0 → 3.1.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/dist/.build-stamp +1 -1
- package/dist/angular/angular-component-lib/utils.d.ts +9 -0
- package/dist/angular/angular-component-lib/utils.js +58 -0
- package/dist/angular/boolean-value-accessor.d.ts +9 -0
- package/dist/angular/boolean-value-accessor.js +37 -0
- package/dist/angular/ds-app-shell.d.ts +12 -0
- package/dist/angular/ds-app-shell.js +38 -0
- package/dist/angular/ds-badge.d.ts +12 -0
- package/dist/angular/ds-badge.js +38 -0
- package/dist/angular/ds-banner.d.ts +15 -0
- package/dist/angular/ds-banner.js +42 -0
- package/dist/angular/ds-bar-nav.d.ts +18 -0
- package/dist/angular/ds-bar-nav.js +42 -0
- package/dist/angular/ds-button-filled.d.ts +15 -0
- package/dist/angular/ds-button-filled.js +43 -0
- package/dist/angular/ds-button-unfilled.d.ts +17 -0
- package/dist/angular/ds-button-unfilled.js +46 -0
- package/dist/angular/ds-card-data-viz-donut.d.ts +18 -0
- package/dist/angular/ds-card-data-viz-donut.js +42 -0
- package/dist/angular/ds-card-setting.d.ts +18 -0
- package/dist/angular/ds-card-setting.js +42 -0
- package/dist/angular/ds-card.d.ts +12 -0
- package/dist/angular/ds-card.js +38 -0
- package/dist/angular/ds-chart-bar.d.ts +12 -0
- package/dist/angular/ds-chart-bar.js +38 -0
- package/dist/angular/ds-chart-donut.d.ts +19 -0
- package/dist/angular/ds-chart-donut.js +42 -0
- package/dist/angular/ds-chart-legend.d.ts +30 -0
- package/dist/angular/ds-chart-legend.js +45 -0
- package/dist/angular/ds-chart-line.d.ts +12 -0
- package/dist/angular/ds-chart-line.js +38 -0
- package/dist/angular/ds-checkbox.d.ts +15 -0
- package/dist/angular/ds-checkbox.js +42 -0
- package/dist/angular/ds-chip.d.ts +18 -0
- package/dist/angular/ds-chip.js +42 -0
- package/dist/angular/ds-divider.d.ts +12 -0
- package/dist/angular/ds-divider.js +38 -0
- package/dist/angular/ds-empty-state.d.ts +12 -0
- package/dist/angular/ds-empty-state.js +38 -0
- package/dist/angular/ds-field.d.ts +12 -0
- package/dist/angular/ds-field.js +38 -0
- package/dist/angular/ds-icon.d.ts +12 -0
- package/dist/angular/ds-icon.js +38 -0
- package/dist/angular/ds-input.d.ts +17 -0
- package/dist/angular/ds-input.js +46 -0
- package/dist/angular/ds-loader.d.ts +12 -0
- package/dist/angular/ds-loader.js +38 -0
- package/dist/angular/ds-menu.d.ts +24 -0
- package/dist/angular/ds-menu.js +48 -0
- package/dist/angular/ds-modal.d.ts +15 -0
- package/dist/angular/ds-modal.js +42 -0
- package/dist/angular/ds-pagination.d.ts +15 -0
- package/dist/angular/ds-pagination.js +42 -0
- package/dist/angular/ds-panel-nav.d.ts +42 -0
- package/dist/angular/ds-panel-nav.js +58 -0
- package/dist/angular/ds-panel-tools.d.ts +33 -0
- package/dist/angular/ds-panel-tools.js +49 -0
- package/dist/angular/ds-radio-group.d.ts +15 -0
- package/dist/angular/ds-radio-group.js +42 -0
- package/dist/angular/ds-select.d.ts +18 -0
- package/dist/angular/ds-select.js +42 -0
- package/dist/angular/ds-shell-gradient-picker.d.ts +16 -0
- package/dist/angular/ds-shell-gradient-picker.js +42 -0
- package/dist/angular/ds-shell-gradient-swatch.d.ts +16 -0
- package/dist/angular/ds-shell-gradient-swatch.js +42 -0
- package/dist/angular/ds-skeleton.d.ts +12 -0
- package/dist/angular/ds-skeleton.js +38 -0
- package/dist/angular/ds-slider.d.ts +15 -0
- package/dist/angular/ds-slider.js +42 -0
- package/dist/angular/ds-tab-group-nav.d.ts +20 -0
- package/dist/angular/ds-tab-group-nav.js +46 -0
- package/dist/angular/ds-tab-group.d.ts +15 -0
- package/dist/angular/ds-tab-group.js +42 -0
- package/dist/angular/ds-table.d.ts +33 -0
- package/dist/angular/ds-table.js +48 -0
- package/dist/angular/ds-tag.d.ts +12 -0
- package/dist/angular/ds-tag.js +38 -0
- package/dist/angular/ds-text.d.ts +12 -0
- package/dist/angular/ds-text.js +38 -0
- package/dist/angular/ds-toggle.d.ts +15 -0
- package/dist/angular/ds-toggle.js +42 -0
- package/dist/angular/ds-tooltip-data-viz.d.ts +12 -0
- package/dist/angular/ds-tooltip-data-viz.js +38 -0
- package/dist/angular/ds-tooltip.d.ts +12 -0
- package/dist/angular/ds-tooltip.js +38 -0
- package/dist/angular/index.d.ts +2 -0
- package/dist/angular/index.js +43 -0
- package/dist/angular/proxies.d.ts +44 -0
- package/dist/angular/proxies.js +45 -0
- package/dist/angular/radio-value-accessor.d.ts +8 -0
- package/dist/angular/radio-value-accessor.js +34 -0
- package/dist/angular/select-value-accessor.d.ts +8 -0
- package/dist/angular/select-value-accessor.js +34 -0
- package/dist/angular/text-value-accessor.d.ts +8 -0
- package/dist/angular/text-value-accessor.js +34 -0
- package/dist/angular/value-accessor.d.ts +18 -0
- package/dist/angular/value-accessor.js +39 -0
- package/dist/components/ds-badge.js +1 -1
- package/dist/components/ds-banner.js +1 -1
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/ds-bar-nav.js.map +1 -1
- package/dist/components/ds-button-filled.js +1 -1
- package/dist/components/ds-button-unfilled.js +1 -1
- package/dist/components/ds-card-data-viz-donut.js +1 -1
- package/dist/components/ds-card-data-viz-donut.js.map +1 -1
- package/dist/components/ds-card-setting.js +1 -1
- package/dist/components/ds-card-setting.js.map +1 -1
- package/dist/components/ds-card.js +1 -1
- package/dist/components/ds-chart-donut.js +1 -1
- package/dist/components/ds-chart-donut.js.map +1 -1
- package/dist/components/ds-chart-legend.js +1 -1
- package/dist/components/ds-chart-legend.js.map +1 -1
- package/dist/components/ds-checkbox.js +1 -1
- package/dist/components/ds-checkbox.js.map +1 -1
- package/dist/components/ds-chip.js +1 -1
- package/dist/components/ds-chip.js.map +1 -1
- package/dist/components/ds-empty-state.js +1 -1
- package/dist/components/ds-empty-state.js.map +1 -1
- package/dist/components/ds-field.js +1 -1
- package/dist/components/ds-input.js +1 -1
- package/dist/components/ds-input.js.map +1 -1
- package/dist/components/ds-menu.js +1 -1
- package/dist/components/ds-modal.js +1 -1
- package/dist/components/ds-pagination.js +1 -1
- package/dist/components/ds-pagination.js.map +1 -1
- package/dist/components/ds-panel-nav.js +1 -1
- package/dist/components/ds-panel-nav.js.map +1 -1
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-panel-tools.js.map +1 -1
- package/dist/components/ds-radio-group.js +1 -1
- package/dist/components/ds-radio-group.js.map +1 -1
- package/dist/components/ds-select.js +1 -1
- package/dist/components/ds-select.js.map +1 -1
- package/dist/components/ds-shell-gradient-picker.js +1 -1
- package/dist/components/ds-shell-gradient-swatch.js +1 -1
- package/dist/components/ds-slider.js +1 -1
- package/dist/components/ds-tab-group-nav.js +1 -1
- package/dist/components/ds-tab-group.js +1 -1
- package/dist/components/ds-tab-group.js.map +1 -1
- package/dist/components/ds-table.js +1 -1
- package/dist/components/ds-table.js.map +1 -1
- package/dist/components/ds-tag.js +1 -1
- package/dist/components/ds-text.js +1 -1
- package/dist/components/ds-toggle.js +1 -1
- package/dist/components/ds-toggle.js.map +1 -1
- package/dist/components/ds-tooltip-data-viz.js +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-BBpASejH.js +2 -0
- package/dist/components/p-BBpASejH.js.map +1 -0
- package/dist/components/{p-V2qW8NL0.js → p-BFiaUYu7.js} +2 -2
- package/dist/components/p-BFiaUYu7.js.map +1 -0
- package/dist/components/p-BOQRM49Q.js +2 -0
- package/dist/components/{p-sBx2MuF2.js.map → p-BOQRM49Q.js.map} +1 -1
- package/dist/components/p-CTK82RIw.js +2 -0
- package/dist/components/p-CTK82RIw.js.map +1 -0
- package/dist/components/{p-BSNlp8Di.js → p-Cp86p-11.js} +2 -2
- package/dist/components/{p-BSNlp8Di.js.map → p-Cp86p-11.js.map} +1 -1
- package/dist/components/{p-DQ3l2TXw.js → p-DEgY_Lnb.js} +2 -2
- package/dist/components/{p-CNgNgezy.js → p-DHjjwgku.js} +2 -2
- package/dist/components/{p-CNgNgezy.js.map → p-DHjjwgku.js.map} +1 -1
- package/dist/components/p-DI8rHm9u.js +2 -0
- package/dist/components/p-DI8rHm9u.js.map +1 -0
- package/dist/components/p-DMD-RO1W.js +2 -0
- package/dist/components/p-DMD-RO1W.js.map +1 -0
- package/dist/components/{p-BVNJnFI9.js → p-DOEMwKBb.js} +2 -2
- package/dist/components/{p-BVNJnFI9.js.map → p-DOEMwKBb.js.map} +1 -1
- package/dist/components/p-DolYlDbY.js +2 -0
- package/dist/components/p-DolYlDbY.js.map +1 -0
- package/dist/framework/angular.d.ts +6 -0
- package/dist/framework/angular.js +6 -0
- package/dist/lib/utils/format-compact-number.d.ts +1 -1
- package/dist/lib/utils/index.js +8 -1
- package/dist/lib/utils/index.js.map +2 -2
- package/dist/react/components.d.ts +44 -0
- package/{src/react/components.ts → dist/react/components.js} +0 -1
- package/dist/react/ds-app-shell.d.ts +9 -0
- package/dist/react/ds-app-shell.js +12 -0
- package/dist/react/ds-badge.d.ts +9 -0
- package/dist/react/ds-badge.js +12 -0
- package/dist/react/ds-banner.d.ts +12 -0
- package/dist/react/ds-banner.js +12 -0
- package/dist/react/ds-bar-nav.d.ts +12 -0
- package/dist/react/ds-bar-nav.js +12 -0
- package/dist/react/ds-button-filled.d.ts +12 -0
- package/dist/react/ds-button-filled.js +12 -0
- package/dist/react/ds-button-unfilled.d.ts +13 -0
- package/dist/react/ds-button-unfilled.js +15 -0
- package/dist/react/ds-card-data-viz-donut.d.ts +12 -0
- package/dist/react/ds-card-data-viz-donut.js +12 -0
- package/dist/react/ds-card-setting.d.ts +12 -0
- package/dist/react/ds-card-setting.js +12 -0
- package/dist/react/ds-card.d.ts +9 -0
- package/dist/react/ds-card.js +12 -0
- package/dist/react/ds-chart-bar.d.ts +9 -0
- package/dist/react/ds-chart-bar.js +12 -0
- package/dist/react/ds-chart-donut.d.ts +12 -0
- package/dist/react/ds-chart-donut.js +12 -0
- package/dist/react/ds-chart-legend.d.ts +16 -0
- package/dist/react/ds-chart-legend.js +15 -0
- package/dist/react/ds-chart-line.d.ts +9 -0
- package/dist/react/ds-chart-line.js +12 -0
- package/dist/react/ds-checkbox.d.ts +12 -0
- package/dist/react/ds-checkbox.js +12 -0
- package/dist/react/ds-chip.d.ts +12 -0
- package/dist/react/ds-chip.js +12 -0
- package/dist/react/ds-divider.d.ts +9 -0
- package/dist/react/ds-divider.js +12 -0
- package/dist/react/ds-empty-state.d.ts +9 -0
- package/dist/react/ds-empty-state.js +12 -0
- package/dist/react/ds-field.d.ts +9 -0
- package/dist/react/ds-field.js +12 -0
- package/dist/react/ds-icon.d.ts +9 -0
- package/dist/react/ds-icon.js +12 -0
- package/dist/react/ds-input.d.ts +13 -0
- package/dist/react/ds-input.js +15 -0
- package/dist/react/ds-loader.d.ts +9 -0
- package/dist/react/ds-loader.js +12 -0
- package/dist/react/ds-menu.d.ts +14 -0
- package/dist/react/ds-menu.js +16 -0
- package/dist/react/ds-modal.d.ts +12 -0
- package/dist/react/ds-modal.js +12 -0
- package/dist/react/ds-pagination.d.ts +12 -0
- package/dist/react/ds-pagination.js +12 -0
- package/dist/react/ds-panel-nav.d.ts +17 -0
- package/dist/react/ds-panel-nav.js +19 -0
- package/dist/react/ds-panel-tools.d.ts +17 -0
- package/dist/react/ds-panel-tools.js +16 -0
- package/dist/react/ds-radio-group.d.ts +12 -0
- package/dist/react/ds-radio-group.js +12 -0
- package/dist/react/ds-select.d.ts +12 -0
- package/dist/react/ds-select.js +12 -0
- package/dist/react/ds-shell-gradient-picker.d.ts +12 -0
- package/dist/react/ds-shell-gradient-picker.js +12 -0
- package/dist/react/ds-shell-gradient-swatch.d.ts +12 -0
- package/dist/react/ds-shell-gradient-swatch.js +12 -0
- package/dist/react/ds-skeleton.d.ts +9 -0
- package/dist/react/ds-skeleton.js +12 -0
- package/dist/react/ds-slider.d.ts +12 -0
- package/dist/react/ds-slider.js +12 -0
- package/dist/react/ds-tab-group-nav.d.ts +13 -0
- package/dist/react/ds-tab-group-nav.js +15 -0
- package/dist/react/ds-tab-group.d.ts +12 -0
- package/dist/react/ds-tab-group.js +12 -0
- package/dist/react/ds-table.d.ts +21 -0
- package/dist/react/ds-table.js +16 -0
- package/dist/react/ds-tag.d.ts +9 -0
- package/dist/react/ds-tag.js +12 -0
- package/dist/react/ds-text.d.ts +9 -0
- package/dist/react/ds-text.js +12 -0
- package/dist/react/ds-toggle.d.ts +12 -0
- package/dist/react/ds-toggle.js +12 -0
- package/dist/react/ds-tooltip-data-viz.d.ts +9 -0
- package/dist/react/ds-tooltip-data-viz.js +12 -0
- package/dist/react/ds-tooltip.d.ts +9 -0
- package/dist/react/ds-tooltip.js +12 -0
- package/dist/types/components/BarNav/BarNav.d.ts +1 -0
- package/dist/types/components/ButtonFilled/ButtonFilled.d.ts +1 -1
- package/dist/types/components/ButtonUnfilled/ButtonUnfilled.d.ts +1 -1
- package/dist/types/components/CardDataVizDonut/CardDataVizDonut.d.ts +1 -0
- package/dist/types/components/CardSetting/CardSetting.d.ts +3 -0
- package/dist/types/components/ChartDonut/ChartDonut.d.ts +2 -0
- package/dist/types/components/ChartLegend/ChartLegend.d.ts +1 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts +12 -0
- package/dist/types/components/Chip/Chip.d.ts +2 -0
- package/dist/types/components/EmptyState/EmptyState.d.ts +2 -0
- package/dist/types/components/Input/Input.d.ts +14 -1
- package/dist/types/components/Menu/Menu.d.ts +2 -0
- package/dist/types/components/Pagination/Pagination.d.ts +3 -0
- package/dist/types/components/PanelNav/PanelNav.d.ts +7 -0
- package/dist/types/components/PanelTools/PanelTools.d.ts +2 -0
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +13 -1
- package/dist/types/components/Select/Select.d.ts +13 -1
- package/dist/types/components/ShellGradientPicker/ShellGradientPicker.d.ts +1 -0
- package/dist/types/components/ShellGradientSwatch/ShellGradientSwatch.d.ts +1 -1
- package/dist/types/components/TabGroup/TabGroup.d.ts +1 -1
- package/dist/types/components/TabGroupNav/TabGroupNav.d.ts +1 -1
- package/dist/types/components/Table/Table.d.ts +6 -0
- package/dist/types/components/Text/Text.d.ts +2 -1
- package/dist/types/components/Toggle/Toggle.d.ts +12 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +6 -0
- package/dist/types/components.d.ts +527 -32
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/dist/types/utils/format-compact-number.d.ts +1 -1
- package/package.json +58 -41
- package/dist/components/p-B_ENgncs.js +0 -2
- package/dist/components/p-B_ENgncs.js.map +0 -1
- package/dist/components/p-CQmul5NK.js +0 -2
- package/dist/components/p-CQmul5NK.js.map +0 -1
- package/dist/components/p-CsaW5gDM.js +0 -2
- package/dist/components/p-CsaW5gDM.js.map +0 -1
- package/dist/components/p-DEpLlQZK.js +0 -2
- package/dist/components/p-DEpLlQZK.js.map +0 -1
- package/dist/components/p-DRqJ3RUb.js +0 -2
- package/dist/components/p-DRqJ3RUb.js.map +0 -1
- package/dist/components/p-V2qW8NL0.js.map +0 -1
- package/dist/components/p-sBx2MuF2.js +0 -2
- package/src/angular/angular-component-lib/utils.ts +0 -65
- package/src/angular/index.ts +0 -45
- package/src/angular/proxies.ts +0 -1156
- package/src/react/ds-app-shell.ts +0 -26
- package/src/react/ds-badge.ts +0 -26
- package/src/react/ds-banner.ts +0 -27
- package/src/react/ds-bar-nav.ts +0 -27
- package/src/react/ds-button-filled.ts +0 -27
- package/src/react/ds-button-unfilled.ts +0 -33
- package/src/react/ds-card-data-viz-donut.ts +0 -27
- package/src/react/ds-card-setting.ts +0 -27
- package/src/react/ds-card.ts +0 -26
- package/src/react/ds-chart-bar.ts +0 -26
- package/src/react/ds-chart-donut.ts +0 -27
- package/src/react/ds-chart-legend.ts +0 -33
- package/src/react/ds-chart-line.ts +0 -26
- package/src/react/ds-checkbox.ts +0 -27
- package/src/react/ds-chip.ts +0 -27
- package/src/react/ds-divider.ts +0 -26
- package/src/react/ds-empty-state.ts +0 -26
- package/src/react/ds-field.ts +0 -26
- package/src/react/ds-icon.ts +0 -26
- package/src/react/ds-input.ts +0 -33
- package/src/react/ds-loader.ts +0 -26
- package/src/react/ds-menu.ts +0 -35
- package/src/react/ds-modal.ts +0 -27
- package/src/react/ds-pagination.ts +0 -27
- package/src/react/ds-panel-nav.ts +0 -41
- package/src/react/ds-panel-tools.ts +0 -35
- package/src/react/ds-radio-group.ts +0 -27
- package/src/react/ds-select.ts +0 -27
- package/src/react/ds-shell-gradient-picker.ts +0 -27
- package/src/react/ds-shell-gradient-swatch.ts +0 -27
- package/src/react/ds-skeleton.ts +0 -26
- package/src/react/ds-slider.ts +0 -27
- package/src/react/ds-tab-group-nav.ts +0 -33
- package/src/react/ds-tab-group.ts +0 -27
- package/src/react/ds-table.ts +0 -35
- package/src/react/ds-tag.ts +0 -26
- package/src/react/ds-text.ts +0 -26
- package/src/react/ds-toggle.ts +0 -27
- package/src/react/ds-tooltip-data-viz.ts +0 -26
- package/src/react/ds-tooltip.ts +0 -26
- package/src/wc/components/AppShell/AppShell.tsx +0 -377
- package/src/wc/components/Badge/Badge.tsx +0 -179
- package/src/wc/components/Badge/index.ts +0 -1
- package/src/wc/components/Banner/Banner.tsx +0 -156
- package/src/wc/components/BarNav/BarNav.tsx +0 -742
- package/src/wc/components/BarNav/bar-nav-dom-utils.ts +0 -23
- package/src/wc/components/BarNav/bar-nav-tabs-menu-utils.ts +0 -114
- package/src/wc/components/BarNav/bar-nav-types.ts +0 -3
- package/src/wc/components/BarNav/bar-nav-utils.ts +0 -67
- package/src/wc/components/BarNav/index.ts +0 -2
- package/src/wc/components/ButtonFilled/ButtonFilled.tsx +0 -171
- package/src/wc/components/ButtonFilled/index.ts +0 -7
- package/src/wc/components/ButtonUnfilled/ButtonUnfilled.tsx +0 -229
- package/src/wc/components/ButtonUnfilled/index.ts +0 -7
- package/src/wc/components/Card/Card.tsx +0 -78
- package/src/wc/components/Card/index.ts +0 -1
- package/src/wc/components/CardDataVizDonut/CardDataVizDonut.tsx +0 -108
- package/src/wc/components/CardDataVizDonut/index.ts +0 -1
- package/src/wc/components/CardSetting/CardSetting.tsx +0 -81
- package/src/wc/components/CardSetting/index.ts +0 -1
- package/src/wc/components/ChartBar/ChartBar.tsx +0 -88
- package/src/wc/components/ChartBar/index.ts +0 -1
- package/src/wc/components/ChartDonut/ChartDonut.tsx +0 -289
- package/src/wc/components/ChartDonut/index.ts +0 -1
- package/src/wc/components/ChartLegend/ChartLegend.tsx +0 -125
- package/src/wc/components/ChartLegend/index.ts +0 -2
- package/src/wc/components/ChartLine/ChartLine.tsx +0 -102
- package/src/wc/components/ChartLine/index.ts +0 -1
- package/src/wc/components/Checkbox/Checkbox.tsx +0 -60
- package/src/wc/components/Checkbox/index.ts +0 -1
- package/src/wc/components/Chip/Chip.tsx +0 -104
- package/src/wc/components/Chip/index.ts +0 -1
- package/src/wc/components/Divider/Divider.tsx +0 -107
- package/src/wc/components/Divider/index.ts +0 -2
- package/src/wc/components/EmptyState/EmptyState.tsx +0 -30
- package/src/wc/components/Field/Field.tsx +0 -30
- package/src/wc/components/Icon/Icon.tsx +0 -172
- package/src/wc/components/Icon/flag-icon-catalog.ts +0 -36
- package/src/wc/components/Icon/icon-cache.ts +0 -47
- package/src/wc/components/Icon/icon-svg.ts +0 -73
- package/src/wc/components/Icon/index.ts +0 -1
- package/src/wc/components/Icon/system-icon-catalog.ts +0 -401
- package/src/wc/components/Input/Input.tsx +0 -107
- package/src/wc/components/Input/index.ts +0 -1
- package/src/wc/components/Loader/Loader.tsx +0 -99
- package/src/wc/components/Loader/index.ts +0 -1
- package/src/wc/components/Menu/Menu.tsx +0 -437
- package/src/wc/components/Menu/menu-placement.ts +0 -26
- package/src/wc/components/Menu/menu-position.ts +0 -78
- package/src/wc/components/Menu/menu-types.ts +0 -39
- package/src/wc/components/Modal/Modal.tsx +0 -213
- package/src/wc/components/Pagination/Pagination.tsx +0 -97
- package/src/wc/components/PanelNav/PanelNav.tsx +0 -707
- package/src/wc/components/PanelNav/index.ts +0 -17
- package/src/wc/components/PanelNav/panel-nav-types.ts +0 -36
- package/src/wc/components/PanelNav/panel-nav-utils.ts +0 -79
- package/src/wc/components/PanelTools/PanelTools.tsx +0 -366
- package/src/wc/components/PanelTools/index.ts +0 -7
- package/src/wc/components/PanelTools/panel-tools-types.ts +0 -44
- package/src/wc/components/PanelTools/panel-tools-utils.ts +0 -50
- package/src/wc/components/RadioGroup/RadioGroup.tsx +0 -130
- package/src/wc/components/RadioGroup/index.ts +0 -1
- package/src/wc/components/Select/Select.tsx +0 -274
- package/src/wc/components/Select/index.ts +0 -1
- package/src/wc/components/ShellGradientPicker/ShellGradientPicker.tsx +0 -55
- package/src/wc/components/ShellGradientSwatch/ShellGradientSwatch.tsx +0 -69
- package/src/wc/components/ShellGradientSwatch/shell-gradient-swatch-types.ts +0 -17
- package/src/wc/components/Skeleton/Skeleton.tsx +0 -64
- package/src/wc/components/Skeleton/index.ts +0 -1
- package/src/wc/components/Slider/Slider.tsx +0 -76
- package/src/wc/components/Slider/index.ts +0 -1
- package/src/wc/components/TabGroup/TabGroup.tsx +0 -204
- package/src/wc/components/TabGroup/tab-item-utils.ts +0 -25
- package/src/wc/components/TabGroupNav/TabGroupNav.tsx +0 -347
- package/src/wc/components/Table/Table.tsx +0 -273
- package/src/wc/components/Tag/Tag.tsx +0 -63
- package/src/wc/components/Tag/index.ts +0 -1
- package/src/wc/components/Text/Text.tsx +0 -98
- package/src/wc/components/Text/index.ts +0 -12
- package/src/wc/components/Text/text-types.ts +0 -23
- package/src/wc/components/Text/text-utils.ts +0 -13
- package/src/wc/components/Toggle/Toggle.tsx +0 -43
- package/src/wc/components/Toggle/index.ts +0 -1
- package/src/wc/components/Tooltip/Tooltip.tsx +0 -372
- package/src/wc/components/TooltipDataViz/TooltipDataViz.tsx +0 -145
- package/src/wc/components/TooltipDataViz/index.ts +0 -1
- package/src/wc/components.d.ts +0 -3569
- package/src/wc/nav/badge-gradient-ring.ts +0 -109
- package/src/wc/nav/chrome-transition.ts +0 -62
- package/src/wc/nav/index.ts +0 -80
- package/src/wc/nav/nav-chrome.ts +0 -47
- package/src/wc/nav/shell-chrome-metrics.ts +0 -49
- package/src/wc/nav/shell-gradient-presets.ts +0 -60
- package/src/wc/nav/shell-gradient.ts +0 -94
- package/src/wc/nav/shell-shortcuts.ts +0 -63
- package/src/wc/nav/shell-view-transition.ts +0 -122
- package/src/wc/utils/chart-colors.ts +0 -7
- package/src/wc/utils/chart-types.ts +0 -25
- package/src/wc/utils/control-density.css +0 -43
- package/src/wc/utils/control-inactive.css +0 -20
- package/src/wc/utils/control-text.ts +0 -11
- package/src/wc/utils/control-width.css +0 -28
- package/src/wc/utils/control-width.ts +0 -10
- package/src/wc/utils/focus-ring.css +0 -33
- package/src/wc/utils/format-compact-number.ts +0 -27
- package/src/wc/utils/index.ts +0 -27
- package/src/wc/utils/interaction-fill.css +0 -162
- package/src/wc/utils/resolve-css-length-px.ts +0 -66
- package/src/wc/utils/resolve-css-time-ms.ts +0 -46
- package/src/wc/utils/scroll-edge-fade.css +0 -80
- package/src/wc/utils/scroll-edge-fade.ts +0 -148
- package/src/wc/utils/token-defaults.ts +0 -81
- package/src/wc/utils/truncate-svg-text.ts +0 -25
- package/src/wc/utils/typography.css +0 -146
- /package/dist/components/{p-DQ3l2TXw.js.map → p-DEgY_Lnb.js.map} +0 -0
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SHELL_GRADIENT_POSITION_BAR_VAR,
|
|
3
|
-
SHELL_GRADIENT_POSITION_PANEL_VAR,
|
|
4
|
-
} from './shell-gradient';
|
|
5
|
-
|
|
6
|
-
/** Per-badge background-position for shell gradient ring sampling. */
|
|
7
|
-
export const BADGE_GRADIENT_POSITION_VAR = '--_badge-gradient-position';
|
|
8
|
-
|
|
9
|
-
export interface GradientSurface {
|
|
10
|
-
element: HTMLElement;
|
|
11
|
-
chromeHost: HTMLElement;
|
|
12
|
-
positionVar: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/** Whether the badge sits under `ds-app-shell[gradient]`. */
|
|
16
|
-
export function isShellGradientActive(from: HTMLElement): boolean {
|
|
17
|
-
// Explicit <HTMLElement>: the inferred HTMLDsAppShellElement type only
|
|
18
|
-
// resolves where @stencil/core types are installed — consumers importing
|
|
19
|
-
// `@ds-mo/ui/nav` (raw TS) compile this without them.
|
|
20
|
-
const shell = from.closest<HTMLElement>('ds-app-shell');
|
|
21
|
-
return shell?.hasAttribute('gradient') === true;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/** Bar or panel chrome surface that owns the shell gradient stack. */
|
|
25
|
-
export function findGradientSurface(from: HTMLElement): GradientSurface | null {
|
|
26
|
-
const barHost = from.closest('ds-bar-nav') as HTMLElement | null;
|
|
27
|
-
if (barHost) {
|
|
28
|
-
const root = barHost.shadowRoot ?? barHost;
|
|
29
|
-
const element = root.querySelector('.bar-nav');
|
|
30
|
-
if (element) {
|
|
31
|
-
return {
|
|
32
|
-
element: element as HTMLElement,
|
|
33
|
-
chromeHost: barHost,
|
|
34
|
-
positionVar: SHELL_GRADIENT_POSITION_BAR_VAR,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const panelHost = from.closest('ds-panel-nav') as HTMLElement | null;
|
|
40
|
-
if (panelHost) {
|
|
41
|
-
const root = panelHost.shadowRoot ?? panelHost;
|
|
42
|
-
const element = root.querySelector('.panel-nav');
|
|
43
|
-
if (element) {
|
|
44
|
-
return {
|
|
45
|
-
element: element as HTMLElement,
|
|
46
|
-
chromeHost: panelHost,
|
|
47
|
-
positionVar: SHELL_GRADIENT_POSITION_PANEL_VAR,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
interface ParsedPosition {
|
|
56
|
-
x: number;
|
|
57
|
-
y: number;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/** Parse a two-value CSS background-position (e.g. `-200px 0`). */
|
|
61
|
-
export function parseCssBackgroundPosition(value: string): ParsedPosition {
|
|
62
|
-
const trimmed = value.trim();
|
|
63
|
-
if (!trimmed) return { x: 0, y: 0 };
|
|
64
|
-
|
|
65
|
-
const parts = trimmed.split(/\s+/);
|
|
66
|
-
const x = parseLength(parts[0] ?? '0');
|
|
67
|
-
const y = parseLength(parts[1] ?? '0');
|
|
68
|
-
return { x, y };
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function parseLength(token: string): number {
|
|
72
|
-
const px = token.match(/^(-?[\d.]+)px$/);
|
|
73
|
-
if (px) return Number(px[1]);
|
|
74
|
-
return 0;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Background position for a badge ring so the shell gradient aligns with nav chrome.
|
|
79
|
-
* Uses badge center relative to the painted chrome surface.
|
|
80
|
-
*/
|
|
81
|
-
export function badgeGradientPosition(
|
|
82
|
-
badgeHost: HTMLElement,
|
|
83
|
-
surface: GradientSurface,
|
|
84
|
-
shellPosition: string,
|
|
85
|
-
): string {
|
|
86
|
-
const badgeRect = badgeHost.getBoundingClientRect();
|
|
87
|
-
const surfaceRect = surface.element.getBoundingClientRect();
|
|
88
|
-
const anchorX = badgeRect.left + badgeRect.width / 2 - surfaceRect.left;
|
|
89
|
-
const anchorY = badgeRect.top + badgeRect.height / 2 - surfaceRect.top;
|
|
90
|
-
const { x, y } = parseCssBackgroundPosition(shellPosition);
|
|
91
|
-
|
|
92
|
-
return `${Math.round(x - anchorX)}px ${Math.round(y - anchorY)}px`;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/** Resolve shell gradient position from chrome host custom properties. */
|
|
96
|
-
export function readShellGradientPosition(surface: GradientSurface): string {
|
|
97
|
-
const styles = getComputedStyle(surface.chromeHost);
|
|
98
|
-
return styles.getPropertyValue(surface.positionVar).trim() || '0 0';
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/** Stamp `--_badge-gradient-position` on the badge host (fixed viewport chrome). */
|
|
102
|
-
export function syncBadgeGradientPosition(badgeHost: HTMLElement): void {
|
|
103
|
-
if (!isShellGradientActive(badgeHost)) {
|
|
104
|
-
badgeHost.style.removeProperty(BADGE_GRADIENT_POSITION_VAR);
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
badgeHost.style.setProperty(BADGE_GRADIENT_POSITION_VAR, '0 0');
|
|
109
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/** Bubbling/composed events — `ds-app-shell` and `ds-bar-nav` coordinate during width motion. */
|
|
2
|
-
|
|
3
|
-
export const CHROME_TRANSITION_START = 'dsChromeTransitionStart';
|
|
4
|
-
export const CHROME_TRANSITION_END = 'dsChromeTransitionEnd';
|
|
5
|
-
|
|
6
|
-
export type ChromeTransitionSource = 'panel-nav' | 'panel-tools';
|
|
7
|
-
|
|
8
|
-
export interface ChromeTransitionDetail {
|
|
9
|
-
source: ChromeTransitionSource;
|
|
10
|
-
/** Panel-tools drawer motion direction; omitted for panel-nav. */
|
|
11
|
-
phase?: 'opening' | 'closing';
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** Reference-counted gate — used while panel-nav width is transitioning. */
|
|
15
|
-
export class ChromeTransitionDepth {
|
|
16
|
-
private depth = 0;
|
|
17
|
-
|
|
18
|
-
enter(): void {
|
|
19
|
-
this.depth += 1;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
exit(): void {
|
|
23
|
-
this.depth = Math.max(0, this.depth - 1);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
get isActive(): boolean {
|
|
27
|
-
return this.depth > 0;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface RafCoalescer {
|
|
32
|
-
schedule(): void;
|
|
33
|
-
cancel(): void;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/** Coalesce bursty layout work (ResizeObserver, prop churn) to one callback per frame. */
|
|
37
|
-
export function createRafCoalescer(onFrame: () => void): RafCoalescer {
|
|
38
|
-
let rafId = 0;
|
|
39
|
-
return {
|
|
40
|
-
schedule() {
|
|
41
|
-
if (rafId !== 0) return;
|
|
42
|
-
rafId = requestAnimationFrame(() => {
|
|
43
|
-
rafId = 0;
|
|
44
|
-
onFrame();
|
|
45
|
-
});
|
|
46
|
-
},
|
|
47
|
-
cancel() {
|
|
48
|
-
if (rafId !== 0) {
|
|
49
|
-
cancelAnimationFrame(rafId);
|
|
50
|
-
rafId = 0;
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export function readChromeTransitionSource(event: Event): ChromeTransitionSource | undefined {
|
|
57
|
-
return (event as CustomEvent<ChromeTransitionDetail>).detail?.source;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export function readChromeTransitionPhase(event: Event): ChromeTransitionDetail['phase'] {
|
|
61
|
-
return (event as CustomEvent<ChromeTransitionDetail>).detail?.phase;
|
|
62
|
-
}
|
package/src/wc/nav/index.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
export type { NavChromeStyle } from './nav-chrome';
|
|
2
|
-
export {
|
|
3
|
-
NAV_STYLE_HINT_ATTR,
|
|
4
|
-
readNavStyleAttr,
|
|
5
|
-
setNavStyleHint,
|
|
6
|
-
clearNavStyleHint,
|
|
7
|
-
resolveNavChromeStyle,
|
|
8
|
-
shouldResyncNavChromeStyle,
|
|
9
|
-
} from './nav-chrome';
|
|
10
|
-
export {
|
|
11
|
-
SHELL_BAR_NAV_VT_NAME,
|
|
12
|
-
SHELL_NAV_REVEAL_DURATION_VAR,
|
|
13
|
-
SHELL_NAV_REVEAL_EASING_VAR,
|
|
14
|
-
parseCssTimeMs,
|
|
15
|
-
ensureShellNavVtStyle,
|
|
16
|
-
resolveShellNavRevealOrigin,
|
|
17
|
-
setShellNavRevealOriginVars,
|
|
18
|
-
animateShellNavRadialReveal,
|
|
19
|
-
runShellNavStyleRevealOnReady,
|
|
20
|
-
} from './shell-view-transition';
|
|
21
|
-
export type { ShellNavRevealOrigin } from './shell-view-transition';
|
|
22
|
-
export {
|
|
23
|
-
SHELL_GRADIENT_IMAGE_VAR,
|
|
24
|
-
SHELL_GRADIENT_SIZE_VAR,
|
|
25
|
-
SHELL_GRADIENT_POSITION_PANEL_VAR,
|
|
26
|
-
SHELL_GRADIENT_POSITION_BAR_VAR,
|
|
27
|
-
SHELL_GRADIENT_OPACITY_VAR,
|
|
28
|
-
SHELL_CHROME_SURFACE_POSITION_VAR,
|
|
29
|
-
SHELL_GRADIENT_OPACITY,
|
|
30
|
-
buildShellRadialGradient,
|
|
31
|
-
shellGradientImage,
|
|
32
|
-
shellGradientSize,
|
|
33
|
-
shellGradientPositionPanel,
|
|
34
|
-
shellGradientPositionBar,
|
|
35
|
-
shellChromeSurfacePosition,
|
|
36
|
-
shellChromeLayerActive,
|
|
37
|
-
readShellViewportDimensions,
|
|
38
|
-
} from './shell-gradient';
|
|
39
|
-
export type { ShellGradientLayout, ShellViewportDimensions } from './shell-gradient';
|
|
40
|
-
export type { MenuPlacement } from '../components/Menu/menu-placement';
|
|
41
|
-
export {
|
|
42
|
-
PANEL_NAV_USER_MENU_PLACEMENT,
|
|
43
|
-
} from '../components/Menu/menu-placement';
|
|
44
|
-
export type { ShellGradientPreset } from './shell-gradient-presets';
|
|
45
|
-
export {
|
|
46
|
-
DEFAULT_SHELL_GRADIENT_PRESET,
|
|
47
|
-
SHELL_GRADIENT_PRESETS,
|
|
48
|
-
SHELL_GRADIENT_PRESET_LABELS,
|
|
49
|
-
buildShellRadialGradientForPreset,
|
|
50
|
-
isShellGradientPreset,
|
|
51
|
-
normalizeShellGradientPreset,
|
|
52
|
-
shellGradientPresetStopToken,
|
|
53
|
-
} from './shell-gradient-presets';
|
|
54
|
-
export type { ChromeTransitionDetail, ChromeTransitionSource } from './chrome-transition';
|
|
55
|
-
export {
|
|
56
|
-
CHROME_TRANSITION_END,
|
|
57
|
-
CHROME_TRANSITION_START,
|
|
58
|
-
ChromeTransitionDepth,
|
|
59
|
-
createRafCoalescer,
|
|
60
|
-
readChromeTransitionSource,
|
|
61
|
-
readChromeTransitionPhase,
|
|
62
|
-
} from './chrome-transition';
|
|
63
|
-
export {
|
|
64
|
-
barGradientPositionFromPanelWidth,
|
|
65
|
-
isPanelNavCollapsed,
|
|
66
|
-
panelWidthPxFromTokens,
|
|
67
|
-
readCssVarWidthPx,
|
|
68
|
-
readPanelNavWidthTokens,
|
|
69
|
-
} from './shell-chrome-metrics';
|
|
70
|
-
export type { PanelNavWidthTokens } from './shell-chrome-metrics';
|
|
71
|
-
export {
|
|
72
|
-
BADGE_GRADIENT_POSITION_VAR,
|
|
73
|
-
badgeGradientPosition,
|
|
74
|
-
findGradientSurface,
|
|
75
|
-
isShellGradientActive,
|
|
76
|
-
parseCssBackgroundPosition,
|
|
77
|
-
readShellGradientPosition,
|
|
78
|
-
syncBadgeGradientPosition,
|
|
79
|
-
} from './badge-gradient-ring';
|
|
80
|
-
export type { GradientSurface } from './badge-gradient-ring';
|
package/src/wc/nav/nav-chrome.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/** Nav chrome style slot — dashboard vs settings. Colors unified for now; texture hooks use the class. */
|
|
2
|
-
export type NavChromeStyle = 'dashboard' | 'settings';
|
|
3
|
-
|
|
4
|
-
/** Document hint for first paint before framework props land. */
|
|
5
|
-
export const NAV_STYLE_HINT_ATTR = 'data-nav-style';
|
|
6
|
-
|
|
7
|
-
export function readNavStyleAttr(attr: string | null): NavChromeStyle | undefined {
|
|
8
|
-
if (attr === 'dashboard' || attr === 'settings') return attr;
|
|
9
|
-
return undefined;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function setNavStyleHint(style: NavChromeStyle): void {
|
|
13
|
-
if (typeof document === 'undefined') return;
|
|
14
|
-
document.documentElement.setAttribute(NAV_STYLE_HINT_ATTR, style);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function clearNavStyleHint(): void {
|
|
18
|
-
if (typeof document === 'undefined') return;
|
|
19
|
-
document.documentElement.removeAttribute(NAV_STYLE_HINT_ATTR);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function resolveNavChromeStyle(
|
|
23
|
-
styleProp: NavChromeStyle,
|
|
24
|
-
hostAttr: string | null,
|
|
25
|
-
docHint?: string | null,
|
|
26
|
-
): NavChromeStyle {
|
|
27
|
-
const fromHost = readNavStyleAttr(hostAttr);
|
|
28
|
-
if (fromHost) return fromHost;
|
|
29
|
-
|
|
30
|
-
const hint =
|
|
31
|
-
docHint !== undefined
|
|
32
|
-
? docHint
|
|
33
|
-
: typeof document !== 'undefined'
|
|
34
|
-
? document.documentElement.getAttribute(NAV_STYLE_HINT_ATTR)
|
|
35
|
-
: null;
|
|
36
|
-
const fromHint = readNavStyleAttr(hint);
|
|
37
|
-
if (fromHint) return fromHint;
|
|
38
|
-
|
|
39
|
-
return styleProp;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function shouldResyncNavChromeStyle(
|
|
43
|
-
renderedStyle: NavChromeStyle,
|
|
44
|
-
style: NavChromeStyle,
|
|
45
|
-
): boolean {
|
|
46
|
-
return renderedStyle !== style;
|
|
47
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { shellGradientPositionBar } from './shell-gradient';
|
|
2
|
-
|
|
3
|
-
/** Read a `var(--token)` width in px using a hidden probe (works with calc() tokens). */
|
|
4
|
-
export function readCssVarWidthPx(context: HTMLElement, cssVarName: string): number {
|
|
5
|
-
if (typeof document === 'undefined') return 0;
|
|
6
|
-
|
|
7
|
-
const probe = document.createElement('div');
|
|
8
|
-
probe.style.cssText =
|
|
9
|
-
'position:absolute;visibility:hidden;pointer-events:none;height:0;width:var(' +
|
|
10
|
-
cssVarName +
|
|
11
|
-
');';
|
|
12
|
-
context.appendChild(probe);
|
|
13
|
-
const width = probe.getBoundingClientRect().width;
|
|
14
|
-
context.removeChild(probe);
|
|
15
|
-
return width;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface PanelNavWidthTokens {
|
|
19
|
-
expandedPx: number;
|
|
20
|
-
collapsedPx: number;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/** Resolve panel-nav expanded/collapsed widths from scoped CSS vars on `.panel-nav`. */
|
|
24
|
-
export function readPanelNavWidthTokens(navRoot: HTMLElement): PanelNavWidthTokens {
|
|
25
|
-
return {
|
|
26
|
-
expandedPx: readCssVarWidthPx(navRoot, '--_nav-width'),
|
|
27
|
-
collapsedPx: readCssVarWidthPx(navRoot, '--_nav-width-collapsed'),
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function isPanelNavCollapsed(
|
|
32
|
-
panelNavHost: HTMLElement | null,
|
|
33
|
-
navRoot: HTMLElement | null,
|
|
34
|
-
): boolean {
|
|
35
|
-
if (navRoot?.classList.contains('panel-nav--collapsed')) return true;
|
|
36
|
-
const collapsedProp = (panelNavHost as (HTMLElement & { collapsed?: boolean }) | null)?.collapsed;
|
|
37
|
-
return collapsedProp === true;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export function panelWidthPxFromTokens(
|
|
41
|
-
tokens: PanelNavWidthTokens,
|
|
42
|
-
collapsed: boolean,
|
|
43
|
-
): number {
|
|
44
|
-
return collapsed ? tokens.collapsedPx : tokens.expandedPx;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export function barGradientPositionFromPanelWidth(panelWidthPx: number): string {
|
|
48
|
-
return shellGradientPositionBar(panelWidthPx);
|
|
49
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/** Built-in shell chrome wash presets — none (solid secondary), cool, neutral, warm. */
|
|
2
|
-
export type ShellGradientPreset = 'none' | 'cool' | 'neutral' | 'warm';
|
|
3
|
-
|
|
4
|
-
export const SHELL_GRADIENT_PRESETS: ShellGradientPreset[] = ['none', 'cool', 'neutral', 'warm'];
|
|
5
|
-
|
|
6
|
-
/** Wash presets shown after the `none` option in pickers. */
|
|
7
|
-
export const SHELL_GRADIENT_WASH_PRESETS: Exclude<ShellGradientPreset, 'none'>[] = [
|
|
8
|
-
'cool',
|
|
9
|
-
'neutral',
|
|
10
|
-
'warm',
|
|
11
|
-
];
|
|
12
|
-
|
|
13
|
-
/** Default wash when `gradient-preset` is omitted. */
|
|
14
|
-
export const DEFAULT_SHELL_GRADIENT_PRESET: ShellGradientPreset = 'neutral';
|
|
15
|
-
|
|
16
|
-
export const SHELL_GRADIENT_PRESET_LABELS: Record<ShellGradientPreset, string> = {
|
|
17
|
-
none: 'None',
|
|
18
|
-
cool: 'Cool',
|
|
19
|
-
neutral: 'Neutral',
|
|
20
|
-
warm: 'Warm',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const SHELL_GRADIENT_PRESET_STOP: Record<Exclude<ShellGradientPreset, 'none'>, string> = {
|
|
24
|
-
cool: 'var(--color-color-intent-blue-strong-background)',
|
|
25
|
-
neutral: 'var(--color-color-intent-grey-strong-background)',
|
|
26
|
-
warm: 'var(--color-color-intent-yellow-strong-background)',
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const GRADIENT_GEOMETRY = '100% 100% at 0% 0%';
|
|
30
|
-
|
|
31
|
-
export function shellGradientPresetStopToken(preset: ShellGradientPreset): string | null {
|
|
32
|
-
if (preset === 'none') return null;
|
|
33
|
-
return SHELL_GRADIENT_PRESET_STOP[preset];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export function isShellGradientPreset(value: string): value is ShellGradientPreset {
|
|
37
|
-
return (SHELL_GRADIENT_PRESETS as string[]).includes(value);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Coerce unknown/absent presets to the default. Runtime values escape the
|
|
42
|
-
* type: removing the reflected `gradient-preset` attribute (e.g. an Angular
|
|
43
|
-
* `[attr.gradient-preset]="null"` binding) drives the prop to null past its
|
|
44
|
-
* field default — without normalization the stop lookup interpolates the
|
|
45
|
-
* literal string "undefined" into CSS and the wash silently disappears.
|
|
46
|
-
*/
|
|
47
|
-
export function normalizeShellGradientPreset(
|
|
48
|
-
value: string | null | undefined,
|
|
49
|
-
): ShellGradientPreset {
|
|
50
|
-
return value != null && isShellGradientPreset(value) ? value : DEFAULT_SHELL_GRADIENT_PRESET;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/** Radial wash for a preset — transparent at top-left into the intent stop. `none` returns no image. */
|
|
54
|
-
export function buildShellRadialGradientForPreset(preset: ShellGradientPreset): string {
|
|
55
|
-
const normalized = normalizeShellGradientPreset(preset);
|
|
56
|
-
if (normalized === 'none') return 'none';
|
|
57
|
-
|
|
58
|
-
const stop = shellGradientPresetStopToken(normalized);
|
|
59
|
-
return `radial-gradient(${GRADIENT_GEOMETRY}, var(--color-background-transparent) 0%, ${stop} 100%)`;
|
|
60
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/** CSS var names consumed by `ds-panel-nav` / `ds-bar-nav` inside `ds-app-shell`. */
|
|
2
|
-
import type { ShellGradientPreset } from './shell-gradient-presets';
|
|
3
|
-
import {
|
|
4
|
-
DEFAULT_SHELL_GRADIENT_PRESET,
|
|
5
|
-
buildShellRadialGradientForPreset,
|
|
6
|
-
} from './shell-gradient-presets';
|
|
7
|
-
|
|
8
|
-
export type { ShellGradientPreset } from './shell-gradient-presets';
|
|
9
|
-
export {
|
|
10
|
-
DEFAULT_SHELL_GRADIENT_PRESET,
|
|
11
|
-
SHELL_GRADIENT_PRESETS,
|
|
12
|
-
SHELL_GRADIENT_PRESET_LABELS,
|
|
13
|
-
buildShellRadialGradientForPreset,
|
|
14
|
-
isShellGradientPreset,
|
|
15
|
-
shellGradientPresetStopToken,
|
|
16
|
-
} from './shell-gradient-presets';
|
|
17
|
-
|
|
18
|
-
export const SHELL_GRADIENT_IMAGE_VAR = '--ds-shell-gradient-image';
|
|
19
|
-
export const SHELL_GRADIENT_SIZE_VAR = '--ds-shell-gradient-size';
|
|
20
|
-
export const SHELL_GRADIENT_POSITION_PANEL_VAR = '--ds-shell-gradient-position-panel';
|
|
21
|
-
export const SHELL_GRADIENT_POSITION_BAR_VAR = '--ds-shell-gradient-position-bar';
|
|
22
|
-
export const SHELL_GRADIENT_OPACITY_VAR = '--ds-shell-gradient-opacity';
|
|
23
|
-
/** Per chrome-surface background-position — offsets wash + grid to shell row origin. */
|
|
24
|
-
export const SHELL_CHROME_SURFACE_POSITION_VAR = '--ds-shell-chrome-surface-position';
|
|
25
|
-
|
|
26
|
-
/** Layer opacity for the nav gradient wash. */
|
|
27
|
-
export const SHELL_GRADIENT_OPACITY = '0.1';
|
|
28
|
-
|
|
29
|
-
/** Whether the shared chrome layer (secondary bg + optional wash) should mount. */
|
|
30
|
-
export function shellChromeLayerActive(gradient: boolean): boolean {
|
|
31
|
-
return gradient;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Shell radial wash — same for panel and bar nav.
|
|
36
|
-
* Tokens follow `data-theme` (light/dark intent stops).
|
|
37
|
-
*/
|
|
38
|
-
export function buildShellRadialGradient(
|
|
39
|
-
preset: ShellGradientPreset = DEFAULT_SHELL_GRADIENT_PRESET,
|
|
40
|
-
): string {
|
|
41
|
-
return buildShellRadialGradientForPreset(preset);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/** Built-in radial image (`gradientSrc` on shell overrides). */
|
|
45
|
-
export function shellGradientImage(
|
|
46
|
-
preset: ShellGradientPreset = DEFAULT_SHELL_GRADIENT_PRESET,
|
|
47
|
-
): string {
|
|
48
|
-
return buildShellRadialGradient(preset);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface ShellViewportDimensions {
|
|
52
|
-
width: number;
|
|
53
|
-
height: number;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Viewport size for shell chrome with `background-attachment: fixed`.
|
|
58
|
-
* Must not use the `ds-app-shell` element box — the shell can be shorter or
|
|
59
|
-
* taller than the viewport when host height chains break or content overflows.
|
|
60
|
-
*/
|
|
61
|
-
export function readShellViewportDimensions(win?: Window): ShellViewportDimensions {
|
|
62
|
-
const w = win ?? (typeof globalThis.window !== 'undefined' ? globalThis.window : undefined);
|
|
63
|
-
if (!w) return { width: 0, height: 0 };
|
|
64
|
-
|
|
65
|
-
const visual = w.visualViewport;
|
|
66
|
-
return {
|
|
67
|
-
width: Math.round(visual?.width ?? w.innerWidth),
|
|
68
|
-
height: Math.round(visual?.height ?? w.innerHeight),
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface ShellGradientLayout {
|
|
73
|
-
width: number;
|
|
74
|
-
height: number;
|
|
75
|
-
panelWidth: number;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/** Pixel `background-size` for the fixed-attachment radial wash. */
|
|
79
|
-
export function shellGradientSize(layout: Pick<ShellGradientLayout, 'width' | 'height'>): string {
|
|
80
|
-
return `${Math.round(layout.width)}px ${Math.round(layout.height)}px`;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export function shellGradientPositionPanel(): string {
|
|
84
|
-
return '0 0';
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export function shellGradientPositionBar(panelWidth: number): string {
|
|
88
|
-
return `${-Math.round(panelWidth)}px 0`;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/** Phase-lock a chrome rect to the shell row coordinate system (wash + grid). */
|
|
92
|
-
export function shellChromeSurfacePosition(leftPx: number, topPx: number): string {
|
|
93
|
-
return `${-Math.round(leftPx)}px ${-Math.round(topPx)}px`;
|
|
94
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { PanelToolsToolId } from '../components/PanelTools/panel-tools-types';
|
|
2
|
-
|
|
3
|
-
export type ShellShortcutAction =
|
|
4
|
-
| 'toggle-panel-nav'
|
|
5
|
-
| 'close-panel-tools'
|
|
6
|
-
| `open-tool:${PanelToolsToolId}`;
|
|
7
|
-
|
|
8
|
-
const TOOL_SHORTCUT_KEYS: Record<string, PanelToolsToolId> = {
|
|
9
|
-
k: 'search',
|
|
10
|
-
a: 'agents',
|
|
11
|
-
s: 'stacks',
|
|
12
|
-
m: 'messages',
|
|
13
|
-
n: 'activity',
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
/** Tool shortcut keys (K/A/S/M/N) toggle open/closed via `ds-panel-tools.activateTool`. */
|
|
17
|
-
|
|
18
|
-
/** True when no modifier keys are held — avoids browser/app chords like ⌘N. */
|
|
19
|
-
export function isBareShellShortcutKey(
|
|
20
|
-
e: Pick<KeyboardEvent, 'metaKey' | 'ctrlKey' | 'altKey' | 'shiftKey'>,
|
|
21
|
-
): boolean {
|
|
22
|
-
return !e.metaKey && !e.ctrlKey && !e.altKey && !e.shiftKey;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/** Skip shell shortcuts while typing in an editable control. */
|
|
26
|
-
export function isEditableShortcutTarget(target: EventTarget | null): boolean {
|
|
27
|
-
if (!target || typeof target !== 'object') return false;
|
|
28
|
-
if (!('closest' in target) || typeof target.closest !== 'function') return false;
|
|
29
|
-
|
|
30
|
-
const el = target as Element & { isContentEditable?: boolean };
|
|
31
|
-
|
|
32
|
-
const editable = el.closest(
|
|
33
|
-
'input, textarea, select, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]',
|
|
34
|
-
);
|
|
35
|
-
if (editable) return true;
|
|
36
|
-
|
|
37
|
-
const role = el.getAttribute('role');
|
|
38
|
-
if (role === 'textbox' || role === 'combobox' || role === 'searchbox') return true;
|
|
39
|
-
|
|
40
|
-
return Boolean(el.isContentEditable);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function normalizedShortcutKey(e: Pick<KeyboardEvent, 'key' | 'code'>): string {
|
|
44
|
-
if (e.key === '[' || e.code === 'BracketLeft') return '[';
|
|
45
|
-
if (e.key === ']' || e.code === 'BracketRight') return ']';
|
|
46
|
-
return e.key.length === 1 ? e.key.toLowerCase() : e.key.toLowerCase();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/** Resolve a shell chrome shortcut, or `null` when the key is not handled. */
|
|
50
|
-
export function resolveShellShortcut(
|
|
51
|
-
e: Pick<KeyboardEvent, 'key' | 'code' | 'metaKey' | 'ctrlKey' | 'altKey' | 'shiftKey'>,
|
|
52
|
-
): ShellShortcutAction | null {
|
|
53
|
-
if (!isBareShellShortcutKey(e)) return null;
|
|
54
|
-
|
|
55
|
-
const key = normalizedShortcutKey(e);
|
|
56
|
-
if (key === '[') return 'toggle-panel-nav';
|
|
57
|
-
if (key === ']') return 'close-panel-tools';
|
|
58
|
-
|
|
59
|
-
const toolId = TOOL_SHORTCUT_KEYS[key];
|
|
60
|
-
if (toolId) return `open-tool:${toolId}`;
|
|
61
|
-
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { parseCssTimeMs } from '../utils/resolve-css-time-ms';
|
|
2
|
-
|
|
3
|
-
/** `view-transition-name` on `ds-bar-nav` — pairs with root reveal in shell apps. */
|
|
4
|
-
export const SHELL_BAR_NAV_VT_NAME = 'ds-shell-bar-nav';
|
|
5
|
-
|
|
6
|
-
export { parseCssTimeMs };
|
|
7
|
-
|
|
8
|
-
const VT_STYLE_ID = 'ds-shell-nav-vt-style';
|
|
9
|
-
|
|
10
|
-
/** TokoMo tokens for the dashboard ↔ settings radial reveal (WAAPI). */
|
|
11
|
-
export const SHELL_NAV_REVEAL_DURATION_VAR = '--effect-animation-duration-medium-3';
|
|
12
|
-
export const SHELL_NAV_REVEAL_EASING_VAR = '--effect-animation-easing-ease-in-out';
|
|
13
|
-
const SHELL_NAV_REVEAL_DURATION_FALLBACK_MS = 500;
|
|
14
|
-
const SHELL_NAV_REVEAL_EASING_FALLBACK = 'ease-in-out';
|
|
15
|
-
|
|
16
|
-
function readCssCustomProperty(name: string, fallback: string): string {
|
|
17
|
-
if (typeof document === 'undefined') return fallback;
|
|
18
|
-
const value = getComputedStyle(document.documentElement).getPropertyValue(name).trim();
|
|
19
|
-
return value || fallback;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** Suppress default cross-fade and pin new snapshots to a 0px circle for WAAPI reveal. */
|
|
23
|
-
export function ensureShellNavVtStyle(): void {
|
|
24
|
-
if (typeof document === 'undefined') return;
|
|
25
|
-
|
|
26
|
-
const content = [
|
|
27
|
-
'::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}',
|
|
28
|
-
`::view-transition-old(${SHELL_BAR_NAV_VT_NAME}),::view-transition-new(${SHELL_BAR_NAV_VT_NAME}){animation:none;mix-blend-mode:normal}`,
|
|
29
|
-
`::view-transition-old(${SHELL_BAR_NAV_VT_NAME}){z-index:1}`,
|
|
30
|
-
`::view-transition-new(${SHELL_BAR_NAV_VT_NAME}){z-index:2;clip-path:circle(0px at var(--vt-x,50%) var(--vt-y,50%))}`,
|
|
31
|
-
'::view-transition-new(root){clip-path:circle(0px at var(--vt-x,50%) var(--vt-y,50%))}',
|
|
32
|
-
].join('\n');
|
|
33
|
-
|
|
34
|
-
const existing = document.getElementById(VT_STYLE_ID) as HTMLStyleElement | null;
|
|
35
|
-
if (existing) {
|
|
36
|
-
if (existing.textContent !== content) existing.textContent = content;
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const style = document.createElement('style');
|
|
41
|
-
style.id = VT_STYLE_ID;
|
|
42
|
-
style.textContent = content;
|
|
43
|
-
document.head.appendChild(style);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface ShellNavRevealOrigin {
|
|
47
|
-
x: number;
|
|
48
|
-
y: number;
|
|
49
|
-
maxRadius: number;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/** Origin for the radial reveal — defaults to panel-nav footer gear, then viewport center. */
|
|
53
|
-
export function resolveShellNavRevealOrigin(originEl?: HTMLElement | null): ShellNavRevealOrigin {
|
|
54
|
-
const btn =
|
|
55
|
-
originEl ??
|
|
56
|
-
document.querySelector<HTMLElement>('.panel-nav__footer-btn');
|
|
57
|
-
const rect = btn?.getBoundingClientRect();
|
|
58
|
-
const x = rect ? Math.round(rect.left + rect.width / 2) : Math.round(window.innerWidth / 2);
|
|
59
|
-
const y = rect ? Math.round(rect.top + rect.height / 2) : Math.round(window.innerHeight / 2);
|
|
60
|
-
const maxRadius = Math.ceil(
|
|
61
|
-
Math.hypot(Math.max(x, window.innerWidth - x), Math.max(y, window.innerHeight - y)),
|
|
62
|
-
);
|
|
63
|
-
return { x, y, maxRadius };
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export function setShellNavRevealOriginVars(origin: ShellNavRevealOrigin): void {
|
|
67
|
-
document.documentElement.style.setProperty('--vt-x', `${origin.x}px`);
|
|
68
|
-
document.documentElement.style.setProperty('--vt-y', `${origin.y}px`);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/** Animate root + bar-nav snapshots with the same radial clip-path reveal. */
|
|
72
|
-
export function animateShellNavRadialReveal(
|
|
73
|
-
origin: ShellNavRevealOrigin,
|
|
74
|
-
durationMs?: number,
|
|
75
|
-
): void {
|
|
76
|
-
const duration =
|
|
77
|
-
durationMs ??
|
|
78
|
-
parseCssTimeMs(
|
|
79
|
-
readCssCustomProperty(SHELL_NAV_REVEAL_DURATION_VAR, '400ms'),
|
|
80
|
-
SHELL_NAV_REVEAL_DURATION_FALLBACK_MS,
|
|
81
|
-
);
|
|
82
|
-
const easing = readCssCustomProperty(
|
|
83
|
-
SHELL_NAV_REVEAL_EASING_VAR,
|
|
84
|
-
SHELL_NAV_REVEAL_EASING_FALLBACK,
|
|
85
|
-
);
|
|
86
|
-
const keyframes = {
|
|
87
|
-
clipPath: [
|
|
88
|
-
`circle(0px at ${origin.x}px ${origin.y}px)`,
|
|
89
|
-
`circle(${origin.maxRadius}px at ${origin.x}px ${origin.y}px)`,
|
|
90
|
-
],
|
|
91
|
-
};
|
|
92
|
-
const options = {
|
|
93
|
-
duration,
|
|
94
|
-
easing,
|
|
95
|
-
fill: 'forwards' as const,
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
document.documentElement.animate(keyframes, {
|
|
99
|
-
...options,
|
|
100
|
-
pseudoElement: '::view-transition-new(root)',
|
|
101
|
-
});
|
|
102
|
-
document.documentElement.animate(keyframes, {
|
|
103
|
-
...options,
|
|
104
|
-
pseudoElement: `::view-transition-new(${SHELL_BAR_NAV_VT_NAME})`,
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/** Run radial reveal when a view transition's `ready` promise settles (app/router driver). */
|
|
109
|
-
export function runShellNavStyleRevealOnReady(
|
|
110
|
-
transition: { ready: Promise<void> },
|
|
111
|
-
originEl?: HTMLElement | null,
|
|
112
|
-
): void {
|
|
113
|
-
ensureShellNavVtStyle();
|
|
114
|
-
const origin = resolveShellNavRevealOrigin(originEl);
|
|
115
|
-
setShellNavRevealOriginVars(origin);
|
|
116
|
-
|
|
117
|
-
transition.ready
|
|
118
|
-
.then(() => animateShellNavRadialReveal(origin))
|
|
119
|
-
.catch(() => {
|
|
120
|
-
/* transition skipped or superseded */
|
|
121
|
-
});
|
|
122
|
-
}
|