@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,742 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
Prop,
|
|
4
|
-
Event,
|
|
5
|
-
EventEmitter,
|
|
6
|
-
Element,
|
|
7
|
-
Watch,
|
|
8
|
-
State,
|
|
9
|
-
h,
|
|
10
|
-
Host,
|
|
11
|
-
} from '@stencil/core';
|
|
12
|
-
import type { NavChromeStyle } from '../../nav/nav-chrome';
|
|
13
|
-
import type { MenuItemData } from '../Menu/menu-types';
|
|
14
|
-
import { isTabDivider } from '../TabGroup/tab-item-utils';
|
|
15
|
-
import type { BarNavTab } from './bar-nav-types';
|
|
16
|
-
import {
|
|
17
|
-
deriveBarNavValueFromUrl,
|
|
18
|
-
parseJsonArrayProp,
|
|
19
|
-
shouldResyncBarNavProps,
|
|
20
|
-
} from './bar-nav-utils';
|
|
21
|
-
import {
|
|
22
|
-
getTabListFromTabGroup,
|
|
23
|
-
queryWithinComponentHost,
|
|
24
|
-
type QueryableHost,
|
|
25
|
-
} from './bar-nav-dom-utils';
|
|
26
|
-
import {
|
|
27
|
-
tabsOverflowContainer,
|
|
28
|
-
tabsToOverflowMenuSections,
|
|
29
|
-
trimTrailingDividers,
|
|
30
|
-
visibleTabCountForWidth,
|
|
31
|
-
} from './bar-nav-tabs-menu-utils';
|
|
32
|
-
import {
|
|
33
|
-
CHROME_TRANSITION_END,
|
|
34
|
-
CHROME_TRANSITION_START,
|
|
35
|
-
ChromeTransitionDepth,
|
|
36
|
-
createRafCoalescer,
|
|
37
|
-
readChromeTransitionSource,
|
|
38
|
-
readChromeTransitionPhase,
|
|
39
|
-
} from '../../nav/chrome-transition';
|
|
40
|
-
|
|
41
|
-
@Component({
|
|
42
|
-
tag: 'ds-bar-nav',
|
|
43
|
-
styleUrl: 'BarNav.css',
|
|
44
|
-
scoped: true,
|
|
45
|
-
})
|
|
46
|
-
export class BarNav {
|
|
47
|
-
/** Style slot: `dashboard` or `settings`. Colors match for now. */
|
|
48
|
-
@Prop({ attribute: 'nav-style', reflect: true }) navStyle: NavChromeStyle = 'dashboard';
|
|
49
|
-
|
|
50
|
-
@Element() el!: HTMLElement;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Tab items for the left section.
|
|
54
|
-
* Set via JS property: `el.tabs = [...]`. Replace the array reference to update.
|
|
55
|
-
*/
|
|
56
|
-
@Prop() tabs: BarNavTab[] = [];
|
|
57
|
-
|
|
58
|
-
/** JSON fallback for `tabs` — useful when framework bindings don't propagate arrays. */
|
|
59
|
-
@Prop({ attribute: 'tabs-json' }) tabsJson: string = '';
|
|
60
|
-
|
|
61
|
-
/** ID of the currently active tab. Overridden when `currentUrl` + `basePath` are set. */
|
|
62
|
-
@Prop({ mutable: true }) value: string = '';
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Fallback heading shown when no tabs are provided.
|
|
66
|
-
* When tabs are present the heading is hidden.
|
|
67
|
-
*/
|
|
68
|
-
@Prop() heading: string | undefined;
|
|
69
|
-
|
|
70
|
-
/** Section base path (e.g. `/dashboard/safety`). Used with `currentUrl` to derive `value`. */
|
|
71
|
-
@Prop() basePath: string = '';
|
|
72
|
-
|
|
73
|
-
/** Current route URL. When set with `basePath`, the active tab is derived automatically. */
|
|
74
|
-
@Prop() currentUrl: string = '';
|
|
75
|
-
|
|
76
|
-
/** Emitted when the active tab changes. Detail = tab id. */
|
|
77
|
-
@Event() dsTabChange!: EventEmitter<string>;
|
|
78
|
-
|
|
79
|
-
@State() private resolvedTabs: BarNavTab[] = [];
|
|
80
|
-
@State() private urlDerivedValue: string = '';
|
|
81
|
-
@State() private hideTabsForDetailRoute = false;
|
|
82
|
-
@State() private tabsCollapsed = false;
|
|
83
|
-
@State() private menuOpen = false;
|
|
84
|
-
/** When false, defer showing expanded tabs or the collapsed trigger until intrinsic width is measured (avoids a one-frame flash of the full tab row on narrow viewports). */
|
|
85
|
-
@State() private tabLayoutCommitted = false;
|
|
86
|
-
@State() private visibleTabs: BarNavTab[] = [];
|
|
87
|
-
@State() private overflowTabs: BarNavTab[] = [];
|
|
88
|
-
@State() private menuInitialFocusVisible = false;
|
|
89
|
-
@State() private overflowRovingFocused = false;
|
|
90
|
-
|
|
91
|
-
private static readonly HOST_PROP_SYNC_BUDGET = 8;
|
|
92
|
-
private static readonly INTRINSIC_WIDTH_RETRY_MAX = 3;
|
|
93
|
-
private static readonly TAB_LAYOUT_COMMIT_MAX_FRAMES = 16;
|
|
94
|
-
private static readonly OVERFLOW_HYSTERESIS_PX = 8;
|
|
95
|
-
|
|
96
|
-
private headerEl: HTMLElement | null = null;
|
|
97
|
-
private triggerEl: (HTMLElement & { setFocus?: () => Promise<void> }) | null = null;
|
|
98
|
-
private menuEl: HTMLDsMenuElement | null = null;
|
|
99
|
-
private visibleTabGroupEl: HTMLDsTabGroupNavElement | null = null;
|
|
100
|
-
private probeTabGroupEl: QueryableHost | null = null;
|
|
101
|
-
private resizeObserver: ResizeObserver | null = null;
|
|
102
|
-
private intrinsicWidthRetryCount = 0;
|
|
103
|
-
private tabLayoutPendingFrames = 0;
|
|
104
|
-
private readonly panelNavTransition = new ChromeTransitionDepth();
|
|
105
|
-
private readonly panelToolsTransition = new ChromeTransitionDepth();
|
|
106
|
-
private readonly overflowCoalescer = createRafCoalescer(() => {
|
|
107
|
-
this.updateTabsCollapsed();
|
|
108
|
-
});
|
|
109
|
-
private chromeTransitionShell: HTMLElement | null = null;
|
|
110
|
-
/** Matches `basePath` once tabs + URL are reconciled for the active section. */
|
|
111
|
-
@State() private committedSection = '';
|
|
112
|
-
/** Section waiting for URL + tabs to catch up after a cross-area navigation. */
|
|
113
|
-
@State() private pendingSection = '';
|
|
114
|
-
|
|
115
|
-
private get effectiveValue(): string {
|
|
116
|
-
if (this.currentUrl && this.basePath) {
|
|
117
|
-
return this.urlDerivedValue;
|
|
118
|
-
}
|
|
119
|
-
return this.value;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
private get hasOverflowTabs(): boolean {
|
|
123
|
-
return this.tabLayoutCommitted && this.tabsCollapsed && this.overflowTabs.length > 0;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
private digestTabsConfig(tabs: BarNavTab[]): string {
|
|
127
|
-
return tabs.map(t => (isTabDivider(t) ? '|' : t.id)).join(',');
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
private resetTabOverflowLayout() {
|
|
131
|
-
this.tabLayoutCommitted = false;
|
|
132
|
-
this.tabsCollapsed = false;
|
|
133
|
-
this.menuOpen = false;
|
|
134
|
-
this.menuInitialFocusVisible = false;
|
|
135
|
-
this.intrinsicWidthRetryCount = 0;
|
|
136
|
-
this.tabLayoutPendingFrames = 0;
|
|
137
|
-
this.visibleTabs = [];
|
|
138
|
-
this.overflowTabs = [];
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
@Watch('tabs')
|
|
142
|
-
@Watch('tabsJson')
|
|
143
|
-
@Watch('currentUrl')
|
|
144
|
-
@Watch('basePath')
|
|
145
|
-
onHostPropsChange() {
|
|
146
|
-
this.applyHostProps();
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
@Watch('value')
|
|
150
|
-
@Watch('urlDerivedValue')
|
|
151
|
-
onSelectionChange() {
|
|
152
|
-
this.syncMenuSections();
|
|
153
|
-
this.scheduleOverflowCheck();
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
@Watch('menuOpen')
|
|
157
|
-
onMenuOpenChange(open: boolean) {
|
|
158
|
-
if (this.menuEl) {
|
|
159
|
-
this.menuEl.open = open;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
@Watch('tabsCollapsed')
|
|
164
|
-
onTabsCollapsedChange(collapsed: boolean, prevCollapsed: boolean | undefined) {
|
|
165
|
-
if (!collapsed) {
|
|
166
|
-
this.menuOpen = false;
|
|
167
|
-
this.menuInitialFocusVisible = false;
|
|
168
|
-
this.menuEl = null;
|
|
169
|
-
}
|
|
170
|
-
this.scheduleOverflowCheck();
|
|
171
|
-
if (collapsed) {
|
|
172
|
-
requestAnimationFrame(() => {
|
|
173
|
-
this.scheduleOverflowCheck();
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
if (collapsed || prevCollapsed === undefined || prevCollapsed === collapsed) return;
|
|
177
|
-
requestAnimationFrame(() => this.scheduleOverflowCheck());
|
|
178
|
-
queueMicrotask(() => this.focusVisibleSelectedTab());
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
componentWillLoad() {
|
|
182
|
-
this.applyHostProps();
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
componentDidLoad() {
|
|
186
|
-
this.syncHostPropsIfNeeded();
|
|
187
|
-
this.scheduleDeferredHostPropSync();
|
|
188
|
-
this.setupOverflowObserver();
|
|
189
|
-
this.bindChromeTransitionListeners();
|
|
190
|
-
this.scheduleOverflowCheck();
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
componentDidRender() {
|
|
194
|
-
if (this.chromeOverflowPaused()) {
|
|
195
|
-
this.syncMenuAnchor();
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
this.scheduleOverflowCheck();
|
|
199
|
-
this.syncMenuAnchor();
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
disconnectedCallback() {
|
|
203
|
-
this.resizeObserver?.disconnect();
|
|
204
|
-
this.resizeObserver = null;
|
|
205
|
-
this.overflowCoalescer.cancel();
|
|
206
|
-
this.unbindChromeTransitionListeners();
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
private bindChromeTransitionListeners() {
|
|
210
|
-
const shell = this.el.closest('ds-app-shell');
|
|
211
|
-
if (!shell) return;
|
|
212
|
-
this.chromeTransitionShell = shell;
|
|
213
|
-
shell.addEventListener(CHROME_TRANSITION_START, this.onChromeTransitionStart);
|
|
214
|
-
shell.addEventListener(CHROME_TRANSITION_END, this.onChromeTransitionEnd);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
private unbindChromeTransitionListeners() {
|
|
218
|
-
if (!this.chromeTransitionShell) return;
|
|
219
|
-
this.chromeTransitionShell.removeEventListener(
|
|
220
|
-
CHROME_TRANSITION_START,
|
|
221
|
-
this.onChromeTransitionStart,
|
|
222
|
-
);
|
|
223
|
-
this.chromeTransitionShell.removeEventListener(
|
|
224
|
-
CHROME_TRANSITION_END,
|
|
225
|
-
this.onChromeTransitionEnd,
|
|
226
|
-
);
|
|
227
|
-
this.chromeTransitionShell = null;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
private onChromeTransitionStart = (event: Event) => {
|
|
231
|
-
const source = readChromeTransitionSource(event);
|
|
232
|
-
if (source === 'panel-nav') {
|
|
233
|
-
this.panelNavTransition.enter();
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
if (source === 'panel-tools') {
|
|
237
|
-
const phase = readChromeTransitionPhase(event) ?? 'opening';
|
|
238
|
-
if (phase === 'closing') {
|
|
239
|
-
this.panelToolsTransition.enter();
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
private chromeOverflowPaused(): boolean {
|
|
245
|
-
return this.panelNavTransition.isActive || this.panelToolsTransition.isActive;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
private onChromeTransitionEnd = (event: Event) => {
|
|
249
|
-
const source = readChromeTransitionSource(event);
|
|
250
|
-
if (source === 'panel-nav') {
|
|
251
|
-
this.panelNavTransition.exit();
|
|
252
|
-
if (!this.panelNavTransition.isActive) {
|
|
253
|
-
this.scheduleOverflowCheck();
|
|
254
|
-
}
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
if (source === 'panel-tools') {
|
|
258
|
-
this.panelToolsTransition.exit();
|
|
259
|
-
this.scheduleOverflowCheck();
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
/** Re-resolve props assigned by the host after componentWillLoad (Angular ngAfterViewInit). */
|
|
264
|
-
private syncHostPropsIfNeeded() {
|
|
265
|
-
if (shouldResyncBarNavProps(this.resolvedTabs, this.tabs, this.tabsJson)) {
|
|
266
|
-
this.applyHostProps();
|
|
267
|
-
} else if (this.currentUrl && this.basePath) {
|
|
268
|
-
this.syncValueFromUrl();
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
/** Poll across animation frames — host props may land without triggering @Watch. */
|
|
273
|
-
private scheduleDeferredHostPropSync() {
|
|
274
|
-
let remaining = BarNav.HOST_PROP_SYNC_BUDGET;
|
|
275
|
-
const tick = () => {
|
|
276
|
-
this.syncHostPropsIfNeeded();
|
|
277
|
-
if (--remaining > 0) {
|
|
278
|
-
requestAnimationFrame(tick);
|
|
279
|
-
}
|
|
280
|
-
};
|
|
281
|
-
queueMicrotask(tick);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
private setupOverflowObserver() {
|
|
285
|
-
if (typeof ResizeObserver === 'undefined' || !this.headerEl) return;
|
|
286
|
-
this.resizeObserver?.disconnect();
|
|
287
|
-
this.resizeObserver = new ResizeObserver(() => {
|
|
288
|
-
if (this.chromeOverflowPaused()) return;
|
|
289
|
-
this.scheduleOverflowCheck();
|
|
290
|
-
});
|
|
291
|
-
this.resizeObserver.observe(this.headerEl);
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
private scheduleOverflowCheck() {
|
|
295
|
-
if (this.chromeOverflowPaused()) return;
|
|
296
|
-
this.overflowCoalescer.schedule();
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/** Width available for the tab row or collapsed trigger. */
|
|
300
|
-
private getLeftZoneAvailableWidth(): number {
|
|
301
|
-
if (!this.headerEl) return 0;
|
|
302
|
-
|
|
303
|
-
const headerStyle = getComputedStyle(this.headerEl);
|
|
304
|
-
const horizontalPadding =
|
|
305
|
-
(parseFloat(headerStyle.paddingLeft) || 0) + (parseFloat(headerStyle.paddingRight) || 0);
|
|
306
|
-
|
|
307
|
-
return Math.max(0, this.headerEl.clientWidth - horizontalPadding);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
private getTabsIntrinsicWidth(): number {
|
|
311
|
-
const tabList = getTabListFromTabGroup(this.probeTabGroupEl);
|
|
312
|
-
return tabList?.scrollWidth ?? 0;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
private getHeaderGap(): number {
|
|
316
|
-
if (!this.headerEl) return 0;
|
|
317
|
-
const style = getComputedStyle(this.headerEl);
|
|
318
|
-
return parseFloat(style.columnGap || style.gap) || 0;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
private getOverflowTriggerReserveWidth(): number {
|
|
322
|
-
if (!this.triggerEl) {
|
|
323
|
-
return 40;
|
|
324
|
-
}
|
|
325
|
-
return this.triggerEl.getBoundingClientRect().width + this.getHeaderGap();
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
private getProbeTabMetrics():
|
|
329
|
-
| {
|
|
330
|
-
itemWidths: number[];
|
|
331
|
-
itemGap: number;
|
|
332
|
-
listExtraWidth: number;
|
|
333
|
-
}
|
|
334
|
-
| null {
|
|
335
|
-
const tabList = getTabListFromTabGroup(this.probeTabGroupEl);
|
|
336
|
-
if (!tabList) return null;
|
|
337
|
-
|
|
338
|
-
const children = Array.from(tabList.children) as HTMLElement[];
|
|
339
|
-
const itemWidths = children.map(child => child.getBoundingClientRect().width);
|
|
340
|
-
if (itemWidths.length === 0 || itemWidths.some(width => width === 0)) return null;
|
|
341
|
-
|
|
342
|
-
const style = getComputedStyle(tabList);
|
|
343
|
-
const itemGap = parseFloat(style.columnGap || style.gap) || 0;
|
|
344
|
-
const childrenWidth = itemWidths.reduce((sum, width) => sum + width, 0);
|
|
345
|
-
const gapWidth = itemGap * Math.max(0, itemWidths.length - 1);
|
|
346
|
-
const listExtraWidth = Math.max(0, tabList.scrollWidth - childrenWidth - gapWidth);
|
|
347
|
-
|
|
348
|
-
return { itemWidths, itemGap, listExtraWidth };
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
private setOverflowTabLayout(visibleTabs: BarNavTab[], overflowTabs: BarNavTab[]) {
|
|
352
|
-
const nextCollapsed = overflowTabs.length > 0;
|
|
353
|
-
const visibleChanged =
|
|
354
|
-
this.digestTabsConfig(visibleTabs) !== this.digestTabsConfig(this.visibleTabs);
|
|
355
|
-
const overflowChanged =
|
|
356
|
-
this.digestTabsConfig(overflowTabs) !== this.digestTabsConfig(this.overflowTabs);
|
|
357
|
-
|
|
358
|
-
if (visibleChanged) {
|
|
359
|
-
this.visibleTabs = visibleTabs;
|
|
360
|
-
}
|
|
361
|
-
if (overflowChanged) {
|
|
362
|
-
this.overflowTabs = overflowTabs;
|
|
363
|
-
}
|
|
364
|
-
if (nextCollapsed !== this.tabsCollapsed) {
|
|
365
|
-
this.tabsCollapsed = nextCollapsed;
|
|
366
|
-
if (!nextCollapsed) {
|
|
367
|
-
this.menuOpen = false;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
private scheduleIntrinsicWidthRetry() {
|
|
373
|
-
if (this.intrinsicWidthRetryCount >= BarNav.INTRINSIC_WIDTH_RETRY_MAX) return;
|
|
374
|
-
this.intrinsicWidthRetryCount++;
|
|
375
|
-
requestAnimationFrame(() => this.scheduleOverflowCheck());
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
private forceTabLayoutCommit(fallbackCollapsed: boolean) {
|
|
379
|
-
this.intrinsicWidthRetryCount = 0;
|
|
380
|
-
this.tabLayoutPendingFrames = 0;
|
|
381
|
-
this.setOverflowTabLayout(
|
|
382
|
-
fallbackCollapsed ? [] : this.resolvedTabs,
|
|
383
|
-
fallbackCollapsed ? this.resolvedTabs : [],
|
|
384
|
-
);
|
|
385
|
-
this.tabLayoutCommitted = true;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
private updateTabsCollapsed() {
|
|
389
|
-
if (!this.headerEl || this.resolvedTabs.length === 0 || this.hideTabsForDetailRoute) {
|
|
390
|
-
if (this.tabsCollapsed) {
|
|
391
|
-
this.setOverflowTabLayout([], []);
|
|
392
|
-
}
|
|
393
|
-
this.intrinsicWidthRetryCount = 0;
|
|
394
|
-
this.tabLayoutPendingFrames = 0;
|
|
395
|
-
this.tabLayoutCommitted = true;
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
const metrics = this.getProbeTabMetrics();
|
|
400
|
-
const intrinsicWidth = this.getTabsIntrinsicWidth();
|
|
401
|
-
if (!metrics || intrinsicWidth === 0) {
|
|
402
|
-
this.tabLayoutPendingFrames += 1;
|
|
403
|
-
if (this.intrinsicWidthRetryCount >= BarNav.INTRINSIC_WIDTH_RETRY_MAX) {
|
|
404
|
-
this.forceTabLayoutCommit(false);
|
|
405
|
-
} else if (this.tabLayoutPendingFrames >= BarNav.TAB_LAYOUT_COMMIT_MAX_FRAMES) {
|
|
406
|
-
this.forceTabLayoutCommit(false);
|
|
407
|
-
} else {
|
|
408
|
-
this.scheduleIntrinsicWidthRetry();
|
|
409
|
-
}
|
|
410
|
-
return;
|
|
411
|
-
}
|
|
412
|
-
this.intrinsicWidthRetryCount = 0;
|
|
413
|
-
this.tabLayoutPendingFrames = 0;
|
|
414
|
-
|
|
415
|
-
const shouldCollapse = tabsOverflowContainer(
|
|
416
|
-
intrinsicWidth,
|
|
417
|
-
this.getLeftZoneAvailableWidth(),
|
|
418
|
-
this.tabsCollapsed,
|
|
419
|
-
BarNav.OVERFLOW_HYSTERESIS_PX,
|
|
420
|
-
);
|
|
421
|
-
|
|
422
|
-
if (!shouldCollapse) {
|
|
423
|
-
this.setOverflowTabLayout(this.resolvedTabs, []);
|
|
424
|
-
this.tabLayoutCommitted = true;
|
|
425
|
-
return;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
const visibleCount = visibleTabCountForWidth(
|
|
429
|
-
metrics.itemWidths,
|
|
430
|
-
this.getLeftZoneAvailableWidth(),
|
|
431
|
-
this.getOverflowTriggerReserveWidth(),
|
|
432
|
-
metrics.itemGap,
|
|
433
|
-
metrics.listExtraWidth,
|
|
434
|
-
);
|
|
435
|
-
const visibleTabs = trimTrailingDividers(this.resolvedTabs.slice(0, visibleCount));
|
|
436
|
-
const overflowTabs = this.resolvedTabs.slice(visibleTabs.length);
|
|
437
|
-
this.setOverflowTabLayout(visibleTabs, overflowTabs);
|
|
438
|
-
this.tabLayoutCommitted = true;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
private syncMenuAnchor() {
|
|
442
|
-
if (!this.menuEl || !this.triggerEl || !this.hasOverflowTabs) return;
|
|
443
|
-
this.menuEl.anchor = this.triggerEl;
|
|
444
|
-
this.syncMenuSections();
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
private handleMenuSelect(e: Event) {
|
|
448
|
-
const detail = (e as CustomEvent<MenuItemData>).detail;
|
|
449
|
-
if (detail?.value !== undefined) {
|
|
450
|
-
this.selectTab(String(detail.value));
|
|
451
|
-
}
|
|
452
|
-
this.menuOpen = false;
|
|
453
|
-
this.menuInitialFocusVisible = false;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
private handleMenuClose() {
|
|
457
|
-
this.menuOpen = false;
|
|
458
|
-
this.menuInitialFocusVisible = false;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
/** Batch tabs/basePath/currentUrl updates so URL derivation never runs with a mixed section. */
|
|
462
|
-
private incomingTabs(): BarNavTab[] {
|
|
463
|
-
return this.tabsJson
|
|
464
|
-
? parseJsonArrayProp(this.tabsJson, [])
|
|
465
|
-
: (this.tabs ?? []);
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
private applyHostProps() {
|
|
469
|
-
const nextBasePath = this.basePath;
|
|
470
|
-
const sectionChanged =
|
|
471
|
-
nextBasePath !== '' &&
|
|
472
|
-
this.committedSection !== '' &&
|
|
473
|
-
nextBasePath !== this.committedSection;
|
|
474
|
-
|
|
475
|
-
if (sectionChanged) {
|
|
476
|
-
this.urlDerivedValue = '';
|
|
477
|
-
this.committedSection = '';
|
|
478
|
-
this.pendingSection = nextBasePath;
|
|
479
|
-
this.resolvedTabs = [];
|
|
480
|
-
this.resetTabOverflowLayout();
|
|
481
|
-
return;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
if (this.pendingSection) {
|
|
485
|
-
if (!nextBasePath || nextBasePath !== this.pendingSection) {
|
|
486
|
-
return;
|
|
487
|
-
}
|
|
488
|
-
if (!this.currentUrl.startsWith(this.pendingSection)) {
|
|
489
|
-
return;
|
|
490
|
-
}
|
|
491
|
-
const tabs = this.incomingTabs();
|
|
492
|
-
if (tabs.length === 0) {
|
|
493
|
-
return;
|
|
494
|
-
}
|
|
495
|
-
this.pendingSection = '';
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
const tabs = this.incomingTabs();
|
|
499
|
-
const tabsConfigChanged =
|
|
500
|
-
this.digestTabsConfig(tabs) !== this.digestTabsConfig(this.resolvedTabs);
|
|
501
|
-
|
|
502
|
-
this.resolvedTabs = tabs;
|
|
503
|
-
this.syncValueFromUrl();
|
|
504
|
-
this.committedSection = nextBasePath;
|
|
505
|
-
if (tabsConfigChanged) {
|
|
506
|
-
this.resetTabOverflowLayout();
|
|
507
|
-
}
|
|
508
|
-
this.scheduleOverflowCheck();
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
private syncMenuSections() {
|
|
512
|
-
if (!this.menuEl) return;
|
|
513
|
-
this.menuEl.sections = tabsToOverflowMenuSections(this.overflowTabs, this.effectiveValue);
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
private syncValueFromUrl() {
|
|
517
|
-
const tabs = this.incomingTabs();
|
|
518
|
-
|
|
519
|
-
if (!this.currentUrl || !this.basePath) {
|
|
520
|
-
this.urlDerivedValue = '';
|
|
521
|
-
this.hideTabsForDetailRoute = false;
|
|
522
|
-
return;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
if (!this.currentUrl.startsWith(this.basePath)) {
|
|
526
|
-
this.urlDerivedValue = '';
|
|
527
|
-
this.hideTabsForDetailRoute = false;
|
|
528
|
-
return;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
const { value, hideTabs } = deriveBarNavValueFromUrl(
|
|
532
|
-
this.currentUrl,
|
|
533
|
-
this.basePath,
|
|
534
|
-
tabs,
|
|
535
|
-
);
|
|
536
|
-
this.urlDerivedValue = value;
|
|
537
|
-
this.hideTabsForDetailRoute = hideTabs;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
private selectTab(id: string) {
|
|
541
|
-
this.value = id;
|
|
542
|
-
this.dsTabChange.emit(id);
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
/** Move focus to the selected tab in the visible tab group (after expand). */
|
|
546
|
-
private focusVisibleSelectedTab() {
|
|
547
|
-
const tab = queryWithinComponentHost(
|
|
548
|
-
this.visibleTabGroupEl,
|
|
549
|
-
`[data-tab-id="${this.effectiveValue}"]`,
|
|
550
|
-
);
|
|
551
|
-
tab?.focus({ preventScroll: true });
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
private handleTabChange(e: Event) {
|
|
555
|
-
this.selectTab((e as CustomEvent<string>).detail);
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
private toggleTabMenu(options?: { focusVisible?: boolean }) {
|
|
559
|
-
if (this.menuOpen) {
|
|
560
|
-
this.menuOpen = false;
|
|
561
|
-
this.menuInitialFocusVisible = false;
|
|
562
|
-
return;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
if (this.menuEl && this.triggerEl) {
|
|
566
|
-
this.menuEl.anchor = this.triggerEl;
|
|
567
|
-
this.menuEl.minWidth = '';
|
|
568
|
-
this.syncMenuSections();
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
this.menuInitialFocusVisible = options?.focusVisible ?? false;
|
|
572
|
-
this.menuOpen = true;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
private handleTabRovingExit(e: CustomEvent<'start' | 'end'>) {
|
|
576
|
-
if (e.detail !== 'end' || !this.hasOverflowTabs) return;
|
|
577
|
-
this.overflowRovingFocused = true;
|
|
578
|
-
void this.triggerEl?.setFocus?.();
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
private handleOverflowFocus = () => {
|
|
582
|
-
this.overflowRovingFocused = true;
|
|
583
|
-
};
|
|
584
|
-
|
|
585
|
-
private handleOverflowBlur = () => {
|
|
586
|
-
this.overflowRovingFocused = false;
|
|
587
|
-
};
|
|
588
|
-
|
|
589
|
-
private handleTriggerKeyDown(e: KeyboardEvent) {
|
|
590
|
-
if (!this.hasOverflowTabs) return;
|
|
591
|
-
|
|
592
|
-
if (!this.menuOpen) {
|
|
593
|
-
if (e.key === 'ArrowLeft') {
|
|
594
|
-
e.preventDefault();
|
|
595
|
-
this.overflowRovingFocused = false;
|
|
596
|
-
void this.visibleTabGroupEl?.focusLastTab();
|
|
597
|
-
return;
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
|
601
|
-
e.preventDefault();
|
|
602
|
-
this.toggleTabMenu({ focusVisible: true });
|
|
603
|
-
}
|
|
604
|
-
return;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
if (e.key === 'Escape') {
|
|
608
|
-
e.preventDefault();
|
|
609
|
-
this.menuOpen = false;
|
|
610
|
-
this.menuInitialFocusVisible = false;
|
|
611
|
-
void this.triggerEl?.setFocus?.();
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
render() {
|
|
616
|
-
const sectionReady =
|
|
617
|
-
this.basePath !== '' && this.committedSection === this.basePath;
|
|
618
|
-
const hasTabs =
|
|
619
|
-
sectionReady && this.resolvedTabs.length > 0 && !this.hideTabsForDetailRoute;
|
|
620
|
-
const tabGroupKey = this.basePath || 'no-section';
|
|
621
|
-
const renderedTabs = this.hasOverflowTabs ? this.visibleTabs : this.resolvedTabs;
|
|
622
|
-
|
|
623
|
-
return (
|
|
624
|
-
<Host>
|
|
625
|
-
<header
|
|
626
|
-
class={{
|
|
627
|
-
'bar-nav': true,
|
|
628
|
-
'bar-nav--dashboard': this.navStyle === 'dashboard',
|
|
629
|
-
'bar-nav--settings': this.navStyle === 'settings',
|
|
630
|
-
'bar-nav--tabs-collapsed':
|
|
631
|
-
hasTabs && this.hasOverflowTabs,
|
|
632
|
-
}}
|
|
633
|
-
ref={el => {
|
|
634
|
-
this.headerEl = el as HTMLElement;
|
|
635
|
-
if (el && !this.resizeObserver) {
|
|
636
|
-
this.setupOverflowObserver();
|
|
637
|
-
}
|
|
638
|
-
}}
|
|
639
|
-
>
|
|
640
|
-
{hasTabs && (
|
|
641
|
-
<div class="bar-nav__tabs-probe" aria-hidden="true" inert>
|
|
642
|
-
<ds-tab-group-nav
|
|
643
|
-
key={`probe-${tabGroupKey}`}
|
|
644
|
-
ref={el => {
|
|
645
|
-
const next = el ?? null;
|
|
646
|
-
if (next === this.probeTabGroupEl) return;
|
|
647
|
-
this.probeTabGroupEl = next;
|
|
648
|
-
if (next) {
|
|
649
|
-
this.intrinsicWidthRetryCount = 0;
|
|
650
|
-
this.tabLayoutPendingFrames = 0;
|
|
651
|
-
this.scheduleOverflowCheck();
|
|
652
|
-
}
|
|
653
|
-
}}
|
|
654
|
-
tabs={this.resolvedTabs}
|
|
655
|
-
value={this.effectiveValue}
|
|
656
|
-
/>
|
|
657
|
-
</div>
|
|
658
|
-
)}
|
|
659
|
-
|
|
660
|
-
{hasTabs && this.tabLayoutCommitted && renderedTabs.length > 0 && (
|
|
661
|
-
<div class="bar-nav__left">
|
|
662
|
-
<ds-tab-group-nav
|
|
663
|
-
key={`visible-${tabGroupKey}`}
|
|
664
|
-
class="bar-nav__tabs-visible"
|
|
665
|
-
ref={el => {
|
|
666
|
-
this.visibleTabGroupEl = el ?? null;
|
|
667
|
-
}}
|
|
668
|
-
tabs={renderedTabs}
|
|
669
|
-
value={this.effectiveValue}
|
|
670
|
-
selectionFollowsFocus={false}
|
|
671
|
-
rovingEnabled={!this.overflowRovingFocused}
|
|
672
|
-
onDsChange={(e: Event) => this.handleTabChange(e)}
|
|
673
|
-
onDsRovingExit={(e: CustomEvent<'start' | 'end'>) => this.handleTabRovingExit(e)}
|
|
674
|
-
onFocusin={() => {
|
|
675
|
-
this.overflowRovingFocused = false;
|
|
676
|
-
}}
|
|
677
|
-
/>
|
|
678
|
-
</div>
|
|
679
|
-
)}
|
|
680
|
-
|
|
681
|
-
{hasTabs && !this.tabLayoutCommitted && (
|
|
682
|
-
<div class="bar-nav__tabs-pending" aria-hidden="true" />
|
|
683
|
-
)}
|
|
684
|
-
|
|
685
|
-
{!hasTabs && this.heading && (
|
|
686
|
-
<ds-text
|
|
687
|
-
class="bar-nav__heading"
|
|
688
|
-
as="span"
|
|
689
|
-
variant="text-body-medium"
|
|
690
|
-
emphasis
|
|
691
|
-
color="inherit"
|
|
692
|
-
wrap="nowrap"
|
|
693
|
-
>
|
|
694
|
-
{this.heading}
|
|
695
|
-
</ds-text>
|
|
696
|
-
)}
|
|
697
|
-
|
|
698
|
-
{hasTabs && this.hasOverflowTabs && (
|
|
699
|
-
<ds-button-unfilled variant="icon"
|
|
700
|
-
class={{
|
|
701
|
-
'bar-nav__overflow-trigger': true,
|
|
702
|
-
}}
|
|
703
|
-
icon="Ellipses"
|
|
704
|
-
isActive={this.menuOpen}
|
|
705
|
-
activeFill={false}
|
|
706
|
-
hasBorder={false}
|
|
707
|
-
focusTabIndex={this.overflowRovingFocused ? 0 : -1}
|
|
708
|
-
ref={(el?: HTMLDsButtonUnfilledElement) => {
|
|
709
|
-
this.triggerEl = (el as (HTMLElement & { setFocus?: () => Promise<void> })) ?? null;
|
|
710
|
-
}}
|
|
711
|
-
haspopup="menu"
|
|
712
|
-
expanded={this.menuOpen}
|
|
713
|
-
aria-label="More tabs"
|
|
714
|
-
onDsClick={() => this.toggleTabMenu({ focusVisible: false })}
|
|
715
|
-
onFocusin={this.handleOverflowFocus}
|
|
716
|
-
onFocusout={this.handleOverflowBlur}
|
|
717
|
-
onKeyDown={(e: KeyboardEvent) => this.handleTriggerKeyDown(e)}
|
|
718
|
-
/>
|
|
719
|
-
)}
|
|
720
|
-
|
|
721
|
-
</header>
|
|
722
|
-
|
|
723
|
-
{hasTabs && this.hasOverflowTabs && (
|
|
724
|
-
<ds-menu
|
|
725
|
-
ref={el => {
|
|
726
|
-
this.menuEl = (el as HTMLDsMenuElement) ?? null;
|
|
727
|
-
}}
|
|
728
|
-
open={this.menuOpen}
|
|
729
|
-
sections={tabsToOverflowMenuSections(this.overflowTabs, this.effectiveValue)}
|
|
730
|
-
side="bottom"
|
|
731
|
-
align="end"
|
|
732
|
-
sideOffset="calc(var(--dimension-space-100) + var(--dimension-space-050))"
|
|
733
|
-
alignOffset="var(--dimension-space-050)"
|
|
734
|
-
initialFocusVisible={this.menuInitialFocusVisible}
|
|
735
|
-
onDsSelect={(e: Event) => this.handleMenuSelect(e)}
|
|
736
|
-
onDsClose={() => this.handleMenuClose()}
|
|
737
|
-
/>
|
|
738
|
-
)}
|
|
739
|
-
</Host>
|
|
740
|
-
);
|
|
741
|
-
}
|
|
742
|
-
}
|