@ds-mo/ui 15.11.1 → 15.12.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/.package-ready.json +1 -1
- package/dist/agent-patterns.json +1 -1
- package/dist/agent.json +114 -18
- package/dist/angular/ds-card-action-center.d.ts +1 -1
- package/dist/angular/ds-card-action-center.js +3 -3
- package/dist/angular/ds-card-chart.d.ts +1 -1
- package/dist/angular/ds-card-chart.js +3 -3
- package/dist/angular/ds-card-navigation.d.ts +1 -1
- package/dist/angular/ds-card-navigation.js +3 -3
- package/dist/angular/ds-card-setting.d.ts +1 -1
- package/dist/angular/ds-card-setting.js +3 -3
- package/dist/angular/ds-card-settings-scope.d.ts +1 -1
- package/dist/angular/ds-card-settings-scope.js +3 -3
- package/dist/angular/ds-field.d.ts +1 -1
- package/dist/angular/ds-field.js +3 -3
- package/dist/angular/ds-inline-banner-settings.d.ts +1 -1
- package/dist/angular/ds-inline-banner-settings.js +3 -3
- package/dist/angular/ds-pagination.d.ts +1 -1
- package/dist/angular/ds-pagination.js +3 -3
- package/dist/angular/ds-radio.d.ts +1 -1
- package/dist/angular/ds-radio.js +3 -3
- package/dist/angular/ds-setting-row-radio.d.ts +1 -1
- package/dist/angular/ds-setting-row-radio.js +3 -3
- package/dist/angular/ds-setting-row-toggle.d.ts +1 -1
- package/dist/angular/ds-setting-row-toggle.js +3 -3
- package/dist/angular/ds-skeleton.d.ts +1 -1
- package/dist/angular/ds-skeleton.js +3 -3
- package/dist/components/THIRD-PARTY-NOTICES +1 -1
- package/dist/components/bundled-dependencies.json +1 -1
- package/dist/components/ds-agent-activity.js +1 -1
- package/dist/components/ds-agent-questionnaire.js +1 -1
- package/dist/components/ds-agent-response.js +1 -1
- package/dist/components/ds-agent-response.js.map +1 -1
- package/dist/components/ds-agent-source-list.js +1 -1
- package/dist/components/ds-agent-tool-call.js +1 -1
- package/dist/components/ds-attachment-list.js +1 -1
- package/dist/components/ds-badge.js +1 -1
- package/dist/components/ds-banner.js +1 -1
- package/dist/components/ds-bar-action.js +1 -1
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/ds-bar-page-title.js +1 -1
- package/dist/components/ds-bar-title.js +1 -1
- package/dist/components/ds-bar-workflow.js +1 -1
- package/dist/components/ds-breadcrumb.js +1 -1
- package/dist/components/ds-button-filled.js +1 -1
- package/dist/components/ds-button-inverted.js +1 -1
- package/dist/components/ds-button-unfilled.js +1 -1
- package/dist/components/ds-calendar.js +1 -1
- package/dist/components/ds-card-action-center.js +1 -1
- package/dist/components/ds-card-action-center.js.map +1 -1
- package/dist/components/ds-card-chart.js +1 -1
- package/dist/components/ds-card-chart.js.map +1 -1
- package/dist/components/ds-card-navigation.js +1 -1
- package/dist/components/ds-card-navigation.js.map +1 -1
- package/dist/components/ds-card-overview.js +1 -1
- package/dist/components/ds-card-overview.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-settings-scope.js +1 -1
- package/dist/components/ds-card-settings-scope.js.map +1 -1
- package/dist/components/ds-chart-legend.js +1 -1
- package/dist/components/ds-chart.js +1 -1
- package/dist/components/ds-checkbox-group.js +1 -1
- package/dist/components/ds-checkbox.js +1 -1
- package/dist/components/ds-chip.js +1 -1
- package/dist/components/ds-code-block.js +1 -1
- package/dist/components/ds-conversation-list-item.js +1 -1
- package/dist/components/ds-conversation-list-section.js +1 -1
- package/dist/components/ds-conversation-list.js +1 -1
- package/dist/components/ds-data-customize.js +1 -1
- package/dist/components/ds-data-customize.js.map +1 -1
- package/dist/components/ds-data-filter.js +1 -1
- package/dist/components/ds-data-group.js +1 -1
- package/dist/components/ds-data-preferences.js +1 -1
- package/dist/components/ds-data-saved-views.js +1 -1
- package/dist/components/ds-data-saved-views.js.map +1 -1
- package/dist/components/ds-data-search.js +1 -1
- package/dist/components/ds-data-sort.js +1 -1
- package/dist/components/ds-data-toolbar.js +1 -1
- package/dist/components/ds-divider.js +1 -1
- package/dist/components/ds-empty-state.js +1 -1
- package/dist/components/ds-field.js +1 -1
- package/dist/components/ds-filter-menu.js +1 -1
- package/dist/components/ds-inline-banner-settings.js +1 -1
- package/dist/components/ds-inline-banner-settings.js.map +1 -1
- package/dist/components/ds-input-date.js +1 -1
- package/dist/components/ds-input-time.js +1 -1
- package/dist/components/ds-input.js +1 -1
- package/dist/components/ds-map-cluster-marker.js +1 -1
- package/dist/components/ds-map-entity-marker.js +1 -1
- package/dist/components/ds-map-marker.js +1 -1
- package/dist/components/ds-markdown.js +1 -1
- package/dist/components/ds-menu.js +1 -1
- package/dist/components/ds-message-actions.js +1 -1
- package/dist/components/ds-message-bubble.js +1 -1
- package/dist/components/ds-message-composer.js +1 -1
- package/dist/components/ds-message-scroller.js +1 -1
- package/dist/components/ds-message.js +1 -1
- package/dist/components/ds-mobile-bar-nav.js +1 -1
- package/dist/components/ds-mobile-header.js +1 -1
- package/dist/components/ds-mobile-section-switcher.js +1 -1
- package/dist/components/ds-mobile-sheet-nav.js +1 -1
- package/dist/components/ds-modal.js +1 -1
- package/dist/components/ds-navigation-tab-group.js +1 -1
- package/dist/components/ds-pagination.js +1 -1
- package/dist/components/ds-panel-nav.js +1 -1
- package/dist/components/ds-panel-sub-nav.js +1 -1
- package/dist/components/ds-panel-tool-header.js +1 -1
- package/dist/components/ds-panel-tool-search.js +1 -1
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-paper-texture.js +1 -1
- package/dist/components/ds-radio-tile.js +1 -1
- package/dist/components/ds-radio.js +1 -1
- package/dist/components/ds-score.js +1 -1
- package/dist/components/ds-scroll-overlay.js +1 -1
- package/dist/components/ds-select-toggle.js +1 -1
- package/dist/components/ds-select.js +1 -1
- package/dist/components/ds-setting-row-checkbox.js +1 -1
- package/dist/components/ds-setting-row-radio.js +1 -1
- package/dist/components/ds-setting-row-radio.js.map +1 -1
- package/dist/components/ds-setting-row-toggle.js +1 -1
- package/dist/components/ds-setting-row-toggle.js.map +1 -1
- package/dist/components/ds-shell-app.js +1 -1
- package/dist/components/ds-shell-app.js.map +1 -1
- package/dist/components/ds-shell-page.js +1 -1
- package/dist/components/ds-shell-tools.js +1 -1
- package/dist/components/ds-skeleton.js +1 -1
- package/dist/components/ds-slider.js +1 -1
- package/dist/components/ds-swatch-picker.js +1 -1
- package/dist/components/ds-switch.js +1 -1
- package/dist/components/ds-tab-group.js +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-textarea.js +1 -1
- package/dist/components/ds-time-picker.js +1 -1
- package/dist/components/ds-toast.js +1 -1
- package/dist/components/ds-tooltip-chart.js +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/ds-typing-indicator.js +1 -1
- package/dist/components/{p-6QYDIPd1.js → p-3dG9v5Aw.js} +2 -2
- package/dist/components/{p-DwFnt0W0.js → p-5PReYMiY.js} +2 -2
- package/dist/components/{p-CzTJAO2J.js → p-8fddX3V3.js} +2 -2
- package/dist/components/{p-Cw1ljgW1.js → p-9u2WDF0J.js} +2 -2
- package/dist/components/{p-M9pOLcyK.js → p-B-ChwMFE.js} +2 -2
- package/dist/components/{p-y2Sdv9M3.js → p-BAIYOobl.js} +2 -2
- package/dist/components/{p-DKG26pp5.js → p-BIMW5_Z7.js} +2 -2
- package/dist/components/p-BMI0F08u.js +2 -0
- package/dist/components/{p-B5rN3slq.js.map → p-BMI0F08u.js.map} +1 -1
- package/dist/components/p-BV8sNEVP.js +2 -0
- package/dist/components/p-BV8sNEVP.js.map +1 -0
- package/dist/components/p-BVUdtuog.js +2 -0
- package/dist/components/p-BVUdtuog.js.map +1 -0
- package/dist/components/{p-CgYDQSLW.js → p-BYo1-6b5.js} +2 -2
- package/dist/components/{p-S5QCVAdH.js → p-BZbJkJpG.js} +2 -2
- package/dist/components/{p-D2rASHHq.js → p-BcYzHn1E.js} +2 -2
- package/dist/components/{p-0EpjqRWc.js → p-BfRAVR40.js} +2 -2
- package/dist/components/p-BnE9MeXS.js +2 -0
- package/dist/components/{p-CEB8RFih.js.map → p-BnE9MeXS.js.map} +1 -1
- package/dist/components/p-BoFK9lmP.js +2 -0
- package/dist/components/p-BoFK9lmP.js.map +1 -0
- package/dist/components/{p-BBZz2Dvg.js → p-BoWpIl_m.js} +2 -2
- package/dist/components/{p-DixX2_Bd.js → p-BpPHCF63.js} +2 -2
- package/dist/components/p-BpssHpam.js +2 -0
- package/dist/components/p-BpssHpam.js.map +1 -0
- package/dist/components/{p-DfwvHxYi.js → p-By_jYvHp.js} +2 -2
- package/dist/components/p-C5HGwzy9.js +2 -0
- package/dist/components/{p-Ba-dSshd.js.map → p-C5HGwzy9.js.map} +1 -1
- package/dist/components/{p-D4r6oWyQ.js → p-C860ilDn.js} +2 -2
- package/dist/components/{p-DGDF4NMV.js → p-CEHhx4VQ.js} +2 -2
- package/dist/components/{p-BqIRExej.js → p-CL0FpMKo.js} +2 -2
- package/dist/components/{p-CEm0AoDR.js → p-CQnjpuMX.js} +2 -2
- package/dist/components/{p-B9Q7fXxW.js → p-CUG4EkKn.js} +2 -2
- package/dist/components/{p-D-cZ6cRI.js → p-CYmz92EF.js} +2 -2
- package/dist/components/{p-DfzXyVoM.js → p-CbP9ASmI.js} +2 -2
- package/dist/components/{p-DvMCOJwc.js → p-CbPGO7vl.js} +2 -2
- package/dist/components/{p-DfphSI9S.js → p-CdMIA5hz.js} +2 -2
- package/dist/components/{p-Cxk1A7Sx.js → p-CeaIWw1Q.js} +2 -2
- package/dist/components/{p-CW-7vLUB.js → p-Cfqvxxs2.js} +2 -2
- package/dist/components/{p-CsPqGA8B.js → p-CpqLGzv4.js} +2 -2
- package/dist/components/{p-DKg181YU.js → p-DFR9hqDU.js} +2 -2
- package/dist/components/p-DKZP3jCY.js +2 -0
- package/dist/components/p-DKZP3jCY.js.map +1 -0
- package/dist/components/{p-CTAF7SkL.js → p-DMPn_dt7.js} +2 -2
- package/dist/components/{p-CYRTkP1A.js → p-DYruK9cb.js} +2 -2
- package/dist/components/{p-CqfYCn-e.js → p-DiUaIJ91.js} +2 -2
- package/dist/components/{p-OFJpWJcN.js → p-DimFbKZH.js} +2 -2
- package/dist/components/p-DmyU1fd-.js +2 -0
- package/dist/components/p-DmyU1fd-.js.map +1 -0
- package/dist/components/{p-BkajUPiA.js → p-DuhJ49iN.js} +2 -2
- package/dist/components/{p-CqW2eyiF.js → p-E0RqkUNq.js} +2 -2
- package/dist/components/{p-D_iZPukF.js → p-G6r6yYg8.js} +2 -2
- package/dist/components/p-HNktxWtF.js +2 -0
- package/dist/components/p-HNktxWtF.js.map +1 -0
- package/dist/components/{p-87FjWil8.js → p-IQdLCfJJ.js} +2 -2
- package/dist/components/{p-CAARHqjE.js → p-KTaiJztz.js} +2 -2
- package/dist/components/{p-BM-UYlIS.js → p-N-2CZze7.js} +2 -2
- package/dist/components/{p-Ch00yccW.js → p-Nx52go85.js} +2 -2
- package/dist/components/{p-CaNMVLhm.js → p-WEffoQQD.js} +2 -2
- package/dist/components/{p-DDawngok.js → p-XKt6j1UN.js} +2 -2
- package/dist/components/{p-CeXf9-X3.js → p-mSCnWLhL.js} +2 -2
- package/dist/components/{p-C8D853vs.js → p-nakO4viw.js} +2 -2
- package/dist/components/{p-BC9xYdJD.js → p-pkJ3X3s7.js} +2 -2
- package/dist/components/{p-BNnw_O4e.js → p-r_e6_0nP.js} +2 -2
- package/dist/components/p-zsWHUNJ9.js +2 -0
- package/dist/components/p-zsWHUNJ9.js.map +1 -0
- package/dist/docs/components.json +642 -22
- package/dist/lint/index.js +1 -1
- package/dist/mcp-data/registry/agent-activity.json +2 -2
- package/dist/mcp-data/registry/agent-questionnaire.json +2 -2
- package/dist/mcp-data/registry/agent-response.json +2 -2
- package/dist/mcp-data/registry/agent-source-list.json +2 -2
- package/dist/mcp-data/registry/agent-tool-call.json +2 -2
- package/dist/mcp-data/registry/attachment-list.json +2 -2
- package/dist/mcp-data/registry/avatar.json +2 -2
- package/dist/mcp-data/registry/badge.json +2 -2
- package/dist/mcp-data/registry/banner.json +2 -2
- package/dist/mcp-data/registry/bar-action.json +2 -2
- package/dist/mcp-data/registry/bar-nav.json +2 -2
- package/dist/mcp-data/registry/bar-page-title.json +2 -2
- package/dist/mcp-data/registry/bar-title.json +2 -2
- package/dist/mcp-data/registry/bar-workflow.json +2 -2
- package/dist/mcp-data/registry/breadcrumb.json +2 -2
- package/dist/mcp-data/registry/button-filled.json +2 -2
- package/dist/mcp-data/registry/button-inverted.json +2 -2
- package/dist/mcp-data/registry/button-unfilled.json +2 -2
- package/dist/mcp-data/registry/calendar.json +2 -2
- package/dist/mcp-data/registry/card-action-center.json +25 -5
- package/dist/mcp-data/registry/card-chart.json +25 -5
- package/dist/mcp-data/registry/card-navigation.json +25 -5
- package/dist/mcp-data/registry/card-overview.json +4 -4
- package/dist/mcp-data/registry/card-setting.json +25 -5
- package/dist/mcp-data/registry/card-settings-scope.json +24 -4
- package/dist/mcp-data/registry/chart-legend.json +2 -2
- package/dist/mcp-data/registry/chart.json +2 -2
- package/dist/mcp-data/registry/checkbox-group.json +2 -2
- package/dist/mcp-data/registry/checkbox.json +2 -2
- package/dist/mcp-data/registry/chip.json +2 -2
- package/dist/mcp-data/registry/code-block.json +2 -2
- package/dist/mcp-data/registry/conversation-list-item.json +2 -2
- package/dist/mcp-data/registry/conversation-list-section.json +2 -2
- package/dist/mcp-data/registry/conversation-list.json +2 -2
- package/dist/mcp-data/registry/data-customize.json +2 -2
- package/dist/mcp-data/registry/data-filter.json +2 -2
- package/dist/mcp-data/registry/data-group.json +2 -2
- package/dist/mcp-data/registry/data-preferences.json +2 -2
- package/dist/mcp-data/registry/data-saved-views.json +2 -2
- package/dist/mcp-data/registry/data-search.json +2 -2
- package/dist/mcp-data/registry/data-sort.json +2 -2
- package/dist/mcp-data/registry/data-toolbar.json +2 -2
- package/dist/mcp-data/registry/divider.json +2 -2
- package/dist/mcp-data/registry/empty-state.json +2 -2
- package/dist/mcp-data/registry/field.json +24 -4
- package/dist/mcp-data/registry/filter-menu.json +2 -2
- package/dist/mcp-data/registry/icon.json +2 -2
- package/dist/mcp-data/registry/inline-banner-settings.json +24 -4
- package/dist/mcp-data/registry/input-date.json +3 -3
- package/dist/mcp-data/registry/input-time.json +3 -3
- package/dist/mcp-data/registry/input.json +2 -2
- package/dist/mcp-data/registry/loader.json +2 -2
- package/dist/mcp-data/registry/map-cluster-marker.json +2 -2
- package/dist/mcp-data/registry/map-entity-marker.json +2 -2
- package/dist/mcp-data/registry/map-marker.json +2 -2
- package/dist/mcp-data/registry/markdown.json +2 -2
- package/dist/mcp-data/registry/menu.json +2 -2
- package/dist/mcp-data/registry/message-actions.json +2 -2
- package/dist/mcp-data/registry/message-bubble.json +2 -2
- package/dist/mcp-data/registry/message-composer.json +2 -2
- package/dist/mcp-data/registry/message-scroller.json +2 -2
- package/dist/mcp-data/registry/message.json +2 -2
- package/dist/mcp-data/registry/mobile-bar-nav.json +2 -2
- package/dist/mcp-data/registry/mobile-header.json +2 -2
- package/dist/mcp-data/registry/mobile-section-switcher.json +2 -2
- package/dist/mcp-data/registry/mobile-sheet-nav.json +2 -2
- package/dist/mcp-data/registry/modal.json +2 -2
- package/dist/mcp-data/registry/navigation-tab-group.json +2 -2
- package/dist/mcp-data/registry/pagination.json +24 -4
- package/dist/mcp-data/registry/panel-nav.json +2 -2
- package/dist/mcp-data/registry/panel-sub-nav.json +2 -2
- package/dist/mcp-data/registry/panel-tool-header.json +2 -2
- package/dist/mcp-data/registry/panel-tool-search.json +2 -2
- package/dist/mcp-data/registry/panel-tools.json +2 -2
- package/dist/mcp-data/registry/paper-texture.json +2 -2
- package/dist/mcp-data/registry/radio-tile.json +2 -2
- package/dist/mcp-data/registry/radio.json +24 -4
- package/dist/mcp-data/registry/registry.json +115 -19
- package/dist/mcp-data/registry/score.json +2 -2
- package/dist/mcp-data/registry/scroll-overlay.json +2 -2
- package/dist/mcp-data/registry/select-toggle.json +2 -2
- package/dist/mcp-data/registry/select.json +2 -2
- package/dist/mcp-data/registry/setting-row-checkbox.json +2 -2
- package/dist/mcp-data/registry/setting-row-radio.json +24 -4
- package/dist/mcp-data/registry/setting-row-toggle.json +25 -5
- package/dist/mcp-data/registry/shell-app.json +5 -4
- package/dist/mcp-data/registry/shell-page.json +2 -2
- package/dist/mcp-data/registry/shell-tools.json +2 -2
- package/dist/mcp-data/registry/skeleton.json +102 -10
- package/dist/mcp-data/registry/slider.json +2 -2
- package/dist/mcp-data/registry/swatch-picker.json +2 -2
- package/dist/mcp-data/registry/switch.json +2 -2
- package/dist/mcp-data/registry/tab-group.json +2 -2
- package/dist/mcp-data/registry/table.json +19 -8
- package/dist/mcp-data/registry/tag.json +2 -2
- package/dist/mcp-data/registry/text.json +2 -2
- package/dist/mcp-data/registry/textarea.json +2 -2
- package/dist/mcp-data/registry/time-picker.json +2 -2
- package/dist/mcp-data/registry/toast.json +2 -2
- package/dist/mcp-data/registry/tooltip-chart.json +2 -2
- package/dist/mcp-data/registry/tooltip.json +2 -2
- package/dist/mcp-data/registry/typing-indicator.json +2 -2
- package/dist/types/components/CardActionCenter/CardActionCenter.d.ts +2 -0
- package/dist/types/components/CardChart/CardChart.d.ts +2 -0
- package/dist/types/components/CardNavigation/CardNavigation.d.ts +2 -0
- package/dist/types/components/CardSetting/CardSetting.d.ts +2 -0
- package/dist/types/components/CardSettingsScope/CardSettingsScope.d.ts +2 -0
- package/dist/types/components/Field/Field.d.ts +3 -0
- package/dist/types/components/InlineBannerSettings/InlineBannerSettings.d.ts +2 -0
- package/dist/types/components/InputDate/InputDate.d.ts +5 -6
- package/dist/types/components/InputTime/InputTime.d.ts +5 -6
- package/dist/types/components/Pagination/Pagination.d.ts +3 -0
- package/dist/types/components/Radio/Radio.d.ts +2 -0
- package/dist/types/components/SettingRowRadio/SettingRowRadio.d.ts +2 -0
- package/dist/types/components/SettingRowToggle/SettingRowToggle.d.ts +2 -0
- package/dist/types/components/Skeleton/Skeleton.d.ts +13 -1
- package/dist/types/components/Skeleton/index.d.ts +1 -1
- package/dist/types/components/Table/Table.d.ts +6 -49
- package/dist/types/components/Table/table-caption-controller.d.ts +54 -0
- package/dist/types/components/Table/table-cell-editor.d.ts +1 -1
- package/dist/types/components/Table/table-editing-controller.d.ts +37 -0
- package/dist/types/components.d.ts +169 -4
- package/dist/types/utils/picker-popup-controller.d.ts +24 -0
- package/dist/types/utils/select-controller.d.ts +1 -0
- package/dist/vue/ds-card-action-center.js +1 -0
- package/dist/vue/ds-card-chart.js +1 -0
- package/dist/vue/ds-card-navigation.js +1 -0
- package/dist/vue/ds-card-setting.js +1 -0
- package/dist/vue/ds-card-settings-scope.js +1 -0
- package/dist/vue/ds-field.js +2 -1
- package/dist/vue/ds-inline-banner-settings.js +2 -1
- package/dist/vue/ds-pagination.js +1 -0
- package/dist/vue/ds-radio.js +1 -0
- package/dist/vue/ds-setting-row-radio.js +2 -1
- package/dist/vue/ds-setting-row-toggle.js +1 -0
- package/dist/vue/ds-skeleton.js +4 -0
- package/package.json +6 -6
- package/dist/components/p-B5rN3slq.js +0 -2
- package/dist/components/p-BT6xQogY.js +0 -2
- package/dist/components/p-BT6xQogY.js.map +0 -1
- package/dist/components/p-Ba-dSshd.js +0 -2
- package/dist/components/p-CEB8RFih.js +0 -2
- package/dist/components/p-CMrHRjjH.js +0 -2
- package/dist/components/p-CMrHRjjH.js.map +0 -1
- package/dist/components/p-CPNA8raE.js +0 -2
- package/dist/components/p-CPNA8raE.js.map +0 -1
- package/dist/components/p-Cnzry0_v.js +0 -2
- package/dist/components/p-Cnzry0_v.js.map +0 -1
- package/dist/components/p-Djkk338n.js +0 -2
- package/dist/components/p-Djkk338n.js.map +0 -1
- package/dist/components/p-hWKa8Jn8.js +0 -2
- package/dist/components/p-hWKa8Jn8.js.map +0 -1
- package/dist/components/p-xCqqM1Rg.js +0 -2
- package/dist/components/p-xCqqM1Rg.js.map +0 -1
- package/dist/types/utils/cartesian-chart-layout.d.ts +0 -13
- package/dist/types/utils/chart-viewport-controller.d.ts +0 -21
- /package/dist/components/{p-6QYDIPd1.js.map → p-3dG9v5Aw.js.map} +0 -0
- /package/dist/components/{p-DwFnt0W0.js.map → p-5PReYMiY.js.map} +0 -0
- /package/dist/components/{p-CzTJAO2J.js.map → p-8fddX3V3.js.map} +0 -0
- /package/dist/components/{p-Cw1ljgW1.js.map → p-9u2WDF0J.js.map} +0 -0
- /package/dist/components/{p-M9pOLcyK.js.map → p-B-ChwMFE.js.map} +0 -0
- /package/dist/components/{p-y2Sdv9M3.js.map → p-BAIYOobl.js.map} +0 -0
- /package/dist/components/{p-DKG26pp5.js.map → p-BIMW5_Z7.js.map} +0 -0
- /package/dist/components/{p-CgYDQSLW.js.map → p-BYo1-6b5.js.map} +0 -0
- /package/dist/components/{p-S5QCVAdH.js.map → p-BZbJkJpG.js.map} +0 -0
- /package/dist/components/{p-D2rASHHq.js.map → p-BcYzHn1E.js.map} +0 -0
- /package/dist/components/{p-0EpjqRWc.js.map → p-BfRAVR40.js.map} +0 -0
- /package/dist/components/{p-BBZz2Dvg.js.map → p-BoWpIl_m.js.map} +0 -0
- /package/dist/components/{p-DixX2_Bd.js.map → p-BpPHCF63.js.map} +0 -0
- /package/dist/components/{p-DfwvHxYi.js.map → p-By_jYvHp.js.map} +0 -0
- /package/dist/components/{p-D4r6oWyQ.js.map → p-C860ilDn.js.map} +0 -0
- /package/dist/components/{p-DGDF4NMV.js.map → p-CEHhx4VQ.js.map} +0 -0
- /package/dist/components/{p-BqIRExej.js.map → p-CL0FpMKo.js.map} +0 -0
- /package/dist/components/{p-CEm0AoDR.js.map → p-CQnjpuMX.js.map} +0 -0
- /package/dist/components/{p-B9Q7fXxW.js.map → p-CUG4EkKn.js.map} +0 -0
- /package/dist/components/{p-D-cZ6cRI.js.map → p-CYmz92EF.js.map} +0 -0
- /package/dist/components/{p-DfzXyVoM.js.map → p-CbP9ASmI.js.map} +0 -0
- /package/dist/components/{p-DvMCOJwc.js.map → p-CbPGO7vl.js.map} +0 -0
- /package/dist/components/{p-DfphSI9S.js.map → p-CdMIA5hz.js.map} +0 -0
- /package/dist/components/{p-Cxk1A7Sx.js.map → p-CeaIWw1Q.js.map} +0 -0
- /package/dist/components/{p-CW-7vLUB.js.map → p-Cfqvxxs2.js.map} +0 -0
- /package/dist/components/{p-CsPqGA8B.js.map → p-CpqLGzv4.js.map} +0 -0
- /package/dist/components/{p-DKg181YU.js.map → p-DFR9hqDU.js.map} +0 -0
- /package/dist/components/{p-CTAF7SkL.js.map → p-DMPn_dt7.js.map} +0 -0
- /package/dist/components/{p-CYRTkP1A.js.map → p-DYruK9cb.js.map} +0 -0
- /package/dist/components/{p-CqfYCn-e.js.map → p-DiUaIJ91.js.map} +0 -0
- /package/dist/components/{p-OFJpWJcN.js.map → p-DimFbKZH.js.map} +0 -0
- /package/dist/components/{p-BkajUPiA.js.map → p-DuhJ49iN.js.map} +0 -0
- /package/dist/components/{p-CqW2eyiF.js.map → p-E0RqkUNq.js.map} +0 -0
- /package/dist/components/{p-D_iZPukF.js.map → p-G6r6yYg8.js.map} +0 -0
- /package/dist/components/{p-87FjWil8.js.map → p-IQdLCfJJ.js.map} +0 -0
- /package/dist/components/{p-CAARHqjE.js.map → p-KTaiJztz.js.map} +0 -0
- /package/dist/components/{p-BM-UYlIS.js.map → p-N-2CZze7.js.map} +0 -0
- /package/dist/components/{p-Ch00yccW.js.map → p-Nx52go85.js.map} +0 -0
- /package/dist/components/{p-CaNMVLhm.js.map → p-WEffoQQD.js.map} +0 -0
- /package/dist/components/{p-DDawngok.js.map → p-XKt6j1UN.js.map} +0 -0
- /package/dist/components/{p-CeXf9-X3.js.map → p-mSCnWLhL.js.map} +0 -0
- /package/dist/components/{p-C8D853vs.js.map → p-nakO4viw.js.map} +0 -0
- /package/dist/components/{p-BC9xYdJD.js.map → p-pkJ3X3s7.js.map} +0 -0
- /package/dist/components/{p-BNnw_O4e.js.map → p-r_e6_0nP.js.map} +0 -0
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"Trend is supplied already resolved as a direction, a formatted value, and a tone. Whether a rise reads well is a product decision, so the component never infers tone from the numbers. Derive it with resolveMetricTrend.",
|
|
57
57
|
"Omit a trend when there is nothing to report; resolveMetricTrend returns null in that case so no zero change is rendered.",
|
|
58
58
|
"Omit score to render a centered Score unavailable cell with a tertiary border and no score fill. Set scoreErrorMessage to replace that copy while the measures remain readable.",
|
|
59
|
-
"Loading replaces the score and
|
|
59
|
+
"Loading replaces the score, measures, and fixed period copy with skeletons. The owner supplies loading atoms for slotted controls. Score loading replaces only the fill figure; the overview still skeletons the score-copy spacer and trend. When measures are already supplied, their count preserves the resolved grid shape; otherwise five measure placeholders join the score in the standard six-cell grid.",
|
|
60
60
|
"At most seven measures are shown. Keep larger collections outside the summary bar rather than turning it into a dense dashboard.",
|
|
61
61
|
"The period and filter controls are slotted rather than owned. Use the period slot when the current range is selectable; otherwise periodLabel supplies fixed current copy in the same md control-frame and label-inset anatomy. Use the filter slot for the application-owned comparison-window control. Slotted Selects use hasBorder false so the 48px bar owns their surrounding boundary and allowClear false because both controls always require one selected reporting period.",
|
|
62
62
|
"A numeric safety score infers fair from 0–50, good from 51–80, and excellent from 81–100. The level can be supplied explicitly when the displayed value is not numeric. The deprecated band field is ignored.",
|
|
@@ -376,8 +376,8 @@
|
|
|
376
376
|
"complexPropertyNote": "Assign these non-primitive values as JavaScript properties: metrics, score.",
|
|
377
377
|
"peerDependencies": {
|
|
378
378
|
"required": [
|
|
379
|
-
"@ds-mo/tokens ^8.0.
|
|
380
|
-
"@ds-mo/icons ^8.1.
|
|
379
|
+
"@ds-mo/tokens ^8.0.1",
|
|
380
|
+
"@ds-mo/icons ^8.1.2"
|
|
381
381
|
],
|
|
382
382
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
383
383
|
}
|
|
@@ -401,7 +401,7 @@
|
|
|
401
401
|
},
|
|
402
402
|
{
|
|
403
403
|
"path": "src/wc/components/CardOverview/CardOverview.tsx",
|
|
404
|
-
"content": "import {\n Component,\n Element,\n Event,\n EventEmitter,\n forceUpdate,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\nimport { resolveCssLengthPx, TOKEN_DEFAULTS } from '../../utils';\nimport { ConnectionTasks } from '../../utils/connection-tasks';\nimport type { TextColor, TextVariant } from '../Text/text-types';\nimport type { MetricTrend } from '../../utils/metric-change';\nimport type {\n CardOverviewLayout,\n CardOverviewVariant,\n OverviewMetric,\n OverviewScore,\n} from './card-overview-types';\nimport {\n findNextOverviewMetricIndex,\n resolveCardOverviewCollapseGeometry,\n resolveOverviewGridColumns,\n resolveOverviewRovingIndex,\n} from './card-overview-controller';\n\n/**\n * Metric cells below this width drop a grid column rather than compress further.\n *\n * A literal rather than a token: this is a layout threshold for a grid cell, and\n * the dimension scale has no token for that. The 200px tokens it could borrow\n * (`menu-width-xs`, `form-width-xs`, `panel-width-2xs`) all name other\n * components, so binding to one would couple this grid to an unrelated contract.\n * Consumers override with the `metricMinWidth` prop.\n */\nconst DEFAULT_METRIC_MIN_WIDTH = '200px';\n\n/** Skeleton cells rendered while loading with no metrics supplied yet. */\nconst DEFAULT_LOADING_METRIC_COUNT = 5;\n\n/** Maximum number of comparable measures the summary bar presents at once. */\nconst MAX_METRIC_COUNT = 7;\n\nconst TREND_COLORS: Record<MetricTrend['tone'], TextColor> = {\n positive: 'var(--color-always-dark-foreground-positive)',\n negative: 'var(--color-always-dark-foreground-negative)',\n neutral: 'var(--color-always-dark-foreground-secondary)',\n};\n\nconst ALWAYS_DARK_PRIMARY: TextColor = 'var(--color-always-dark-foreground-primary)';\nconst ALWAYS_DARK_SECONDARY: TextColor = 'var(--color-always-dark-foreground-secondary)';\n\n@Component({\n tag: 'ds-card-overview',\n styleUrl: 'CardOverview.css',\n scoped: true,\n})\nexport class CardOverview {\n @Element() el!: HTMLElement;\n\n /** Full summary card, or the condensed 48px summary bar. */\n @Prop() variant: CardOverviewVariant = 'default';\n\n /** Intrinsic responsive layout, or a page-owned single-column stack. */\n @Prop() layout: CardOverviewLayout = 'auto';\n\n /** Optional nonselectable safety score rendered as the first grid cell. */\n @Prop() score: OverviewScore | undefined;\n\n /** Fixed current date or range. Replaced by content in the `period` slot. */\n @Prop() periodLabel: string = '';\n\n /** Copy between the current period and comparison control, usually `vs.`. */\n @Prop() comparisonLabel: string = '';\n\n /** Measures rendered in the responsive grid. Only the first seven are shown. */\n @Prop() metrics: OverviewMetric[] = [];\n\n /**\n * Width a metric cell may shrink to before the grid drops a column. The grid\n * uses this threshold while choosing an evenly distributed column count.\n */\n @Prop() metricMinWidth: string = DEFAULT_METRIC_MIN_WIDTH;\n\n /** Replace the score and metrics with skeletons while data resolves. */\n @Prop() isLoading: boolean = false;\n\n /** Message shown in place of the score when its figure cannot be resolved. */\n @Prop() scoreErrorMessage: string | undefined;\n\n /** Accessible name for the region. */\n @Prop() overviewLabel: string = 'Overview';\n\n /**\n * Page-controlled visual collapse from the full card (`0`) toward its 48px\n * compact handoff height (`1`). The component preserves its expanded flow\n * height, keeps the period bar stationary, and moves/clips the grid beneath\n * it. The page still owns sticky positioning and the final compact handoff.\n */\n @Prop() scrollCollapseProgress: number = 0;\n\n /** Emitted when a metric that is not inactive is activated. */\n @Event() dsMetricSelect!: EventEmitter<OverviewMetric>;\n\n /** Roving tab stop across selectable metrics. */\n @State() private focusedMetricIndex: number = 0;\n @State() private expandedHeight: number = 0;\n @State() private gridColumns: number | undefined;\n\n private layoutEl?: HTMLElement;\n private layoutResizeObserver: ResizeObserver | null = null;\n private layoutResizeFrame: number | undefined;\n private hasLoaded = false;\n private readonly connectionTasks = new ConnectionTasks(() => this.el.isConnected);\n /** The node the observer is bound to, which a later render can replace. */\n private observedLayoutEl?: HTMLElement;\n\n connectedCallback() {\n if (this.hasLoaded) this.observeLayout();\n }\n\n componentDidLoad() {\n this.hasLoaded = true;\n this.observeLayout();\n }\n\n componentDidRender() {\n if (!this.el.isConnected) return;\n // Re-bind after HMR when DidLoad's observer was dropped, and whenever a\n // render swapped the layout node out from under the observer: the ref points\n // at the new node while the observer still watches the detached one, which\n // never resizes again. The grid would then keep its first measured column\n // count for the life of the component.\n if (!this.layoutResizeObserver || this.observedLayoutEl !== this.layoutEl) {\n this.observeLayout();\n } else {\n this.updateLayoutGeometry();\n }\n }\n\n disconnectedCallback() {\n this.connectionTasks.cancel();\n this.layoutResizeObserver?.disconnect();\n this.layoutResizeObserver = null;\n this.layoutResizeFrame = undefined;\n this.observedLayoutEl = undefined;\n }\n\n private get visibleMetrics(): OverviewMetric[] {\n return this.metrics.slice(0, MAX_METRIC_COUNT);\n }\n\n private get visibleCellCount(): number {\n const metricCount = this.isLoading ? this.loadingMetricCount : this.visibleMetrics.length;\n return 1 + metricCount;\n }\n\n /** Preserve an authored data shape while loading, or use the standard six-cell grid. */\n private get loadingMetricCount(): number {\n return this.visibleMetrics.length || DEFAULT_LOADING_METRIC_COUNT;\n }\n\n private get resolvedScrollCollapseProgress(): number {\n if (this.variant === 'compact' || !Number.isFinite(this.scrollCollapseProgress)) return 0;\n return Math.min(1, Math.max(0, this.scrollCollapseProgress));\n }\n\n private get scrollCollapseGeometry() {\n const compactHeight = resolveCssLengthPx(TOKEN_DEFAULTS.size600, 48);\n return resolveCardOverviewCollapseGeometry({\n variant: this.variant,\n progress: this.resolvedScrollCollapseProgress,\n expandedHeight: this.expandedHeight,\n compactHeight,\n });\n }\n\n private observeLayout() {\n const layout = this.layoutEl;\n if (!this.el.isConnected || !layout) return;\n\n this.connectionTasks.cancelFrame(this.layoutResizeFrame);\n this.layoutResizeFrame = undefined;\n\n const bounds = layout.getBoundingClientRect();\n this.updateLayoutGeometry(bounds.width, bounds.height);\n if (typeof ResizeObserver === 'undefined') return;\n\n this.layoutResizeObserver?.disconnect();\n this.layoutResizeObserver = new ResizeObserver(entries => {\n const rect = entries[0]?.contentRect;\n if (!rect) return;\n this.connectionTasks.cancelFrame(this.layoutResizeFrame);\n this.layoutResizeFrame = this.connectionTasks.frame(() => {\n this.layoutResizeFrame = undefined;\n if (this.layoutEl !== layout) return;\n this.updateLayoutGeometry(rect.width, rect.height);\n });\n });\n this.layoutResizeObserver.observe(layout);\n this.observedLayoutEl = layout;\n }\n\n private updateLayoutGeometry(width?: number, height?: number) {\n const layout = this.layoutEl;\n if (!this.el.isConnected || !layout) return;\n\n const bounds =\n width === undefined || height === undefined ? layout.getBoundingClientRect() : null;\n const resolvedWidth = width ?? bounds?.width ?? 0;\n const resolvedHeight = height ?? bounds?.height ?? 0;\n\n let changed = false;\n\n if (resolvedHeight > 0 && Math.abs(resolvedHeight - this.expandedHeight) >= 0.5) {\n this.expandedHeight = resolvedHeight;\n changed = true;\n }\n\n const columns = resolveOverviewGridColumns({\n cellCount: this.visibleCellCount,\n availableWidth: resolvedWidth,\n minCellWidth: resolveCssLengthPx(this.metricMinWidth, DEFAULT_METRIC_MIN_WIDTH),\n });\n if (columns !== this.gridColumns) {\n this.gridColumns = columns;\n changed = true;\n }\n\n // The column count is written straight to the host rather than through the\n // rendered style object. Measurement happens in `componentDidLoad` and in the\n // ResizeObserver callback, both outside a render cycle, and the host's style\n // is not patched again after the first render — so a rendered value would stay\n // pinned to whatever the first paint produced, before any width was known.\n if (this.gridColumns) {\n this.el.style.setProperty('--ds-card-overview-grid-columns', String(this.gridColumns));\n } else {\n this.el.style.removeProperty('--ds-card-overview-grid-columns');\n }\n\n if (changed) forceUpdate(this);\n }\n\n /** Index of the roving tab stop, skipping inactive metrics. */\n private get rovingIndex(): number {\n return resolveOverviewRovingIndex(this.visibleMetrics, this.focusedMetricIndex);\n }\n\n private selectMetric(metric: OverviewMetric, index: number) {\n if (metric.isInactive) return;\n this.focusedMetricIndex = index;\n this.dsMetricSelect.emit(metric);\n }\n\n /** Move the roving tab stop, wrapping and skipping inactive metrics. */\n private moveFocus(from: number, step: number) {\n const metrics = this.visibleMetrics;\n const next = findNextOverviewMetricIndex(metrics, from, step < 0 ? -1 : 1);\n if (next < 0) return;\n\n this.focusedMetricIndex = next;\n const cells = this.el.querySelectorAll<HTMLElement>('.card-overview__metric-action');\n cells[next]?.focus();\n }\n\n private handleMetricKeyDown = (event: KeyboardEvent, index: number) => {\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowDown':\n event.preventDefault();\n this.moveFocus(index, 1);\n break;\n case 'ArrowLeft':\n case 'ArrowUp':\n event.preventDefault();\n this.moveFocus(index, -1);\n break;\n default:\n break;\n }\n };\n\n /**\n * A skeleton bar matching the type metrics of the text it stands in for, so the\n * loading state holds the same shape and rhythm as the resolved content.\n *\n * `background` is always passed so the base and shimmer follow the card's\n * permanently dark surface in both themes.\n */\n private bar(textVariant: TextVariant, width: string, className?: string) {\n return (\n <ds-skeleton\n class={className}\n variant=\"text\"\n textVariant={textVariant}\n width={width}\n background=\"always-dark\"\n />\n );\n }\n\n /**\n * Arrow and change in one text node.\n *\n * The arrow is a typeface glyph rather than an icon so it inherits the exact\n * size, weight, and baseline of the value beside it; an icon would need its\n * own size scale and would drift whenever the type scale changed.\n *\n * Tone is supplied by the caller and never inferred here.\n */\n private renderTrend(trend: MetricTrend | undefined, variant: TextVariant) {\n if (!trend) return null;\n return (\n <ds-text\n as=\"span\"\n class={{\n 'card-overview__trend': true,\n 'ds-control-label-box': true,\n [`card-overview__trend--${trend.tone}`]: true,\n }}\n variant={variant}\n color={TREND_COLORS[trend.tone]}\n fontFeature=\"tabular-nums\"\n >\n {trend.direction === 'up' ? '↑' : '↓'} {trend.value}\n </ds-text>\n );\n }\n\n private renderScore() {\n if (this.isLoading) {\n return (\n <div class=\"card-overview__score\" part=\"score\">\n <div class=\"card-overview__score-content\">\n <ds-score size=\"lg\" variant=\"dense\" isLoading></ds-score>\n <div class=\"card-overview__score-copy\">\n {this.bar(\n 'text-body-small',\n 'var(--dimension-size-800)',\n 'card-overview__score-label-spacer'\n )}\n {this.bar(\n 'text-body-medium',\n 'calc(var(--dimension-size-300) + var(--dimension-space-050))'\n )}\n </div>\n </div>\n </div>\n );\n }\n\n const unavailableMessage =\n this.scoreErrorMessage || (!this.score ? 'Score unavailable' : undefined);\n if (unavailableMessage) {\n return (\n /* eslint-disable-next-line compomo/prefer-direct-ds-text -- The score track owns the grid divider and 8px outer inset. */\n <div class=\"card-overview__score\" part=\"score\">\n <ds-text\n as=\"span\"\n class=\"card-overview__score-content card-overview__score-content--error\"\n variant=\"text-body-medium\"\n color=\"inherit\"\n role=\"alert\"\n >\n {unavailableMessage}\n </ds-text>\n </div>\n );\n }\n\n const score = this.score;\n if (!score) return null;\n\n return (\n <div class=\"card-overview__score\" part=\"score\">\n <div class=\"card-overview__score-content\">\n <ds-score\n size=\"lg\"\n variant=\"dense\"\n value={score.value}\n level={score.level}\n label=\"Safety score\"\n />\n <div class=\"card-overview__score-copy\">\n <ds-text\n as=\"span\"\n class=\"card-overview__score-label-spacer ds-control-label-box\"\n variant=\"text-body-small\"\n color={ALWAYS_DARK_SECONDARY}\n aria-hidden=\"true\"\n >\n \n </ds-text>\n {this.renderTrend(score.trend, 'text-body-medium')}\n </div>\n </div>\n </div>\n );\n }\n\n private renderMetric(metric: OverviewMetric, index: number) {\n const selectable = !metric.isInactive;\n const label = (\n <ds-text\n as=\"span\"\n class=\"card-overview__metric-label ds-control-label-box\"\n variant=\"text-body-small\"\n color={ALWAYS_DARK_SECONDARY}\n wrap=\"nowrap\"\n >\n {metric.label}\n </ds-text>\n );\n\n return (\n <div class=\"card-overview__metric\" part=\"metric\">\n <div\n class={{\n 'card-overview__metric-action': true,\n 'card-overview__metric-action--inactive': !selectable,\n // Selection targets get the shared wash; press scaling is not used here\n // so the grid keeps its columns aligned. See docs/control-press-policy.md.\n 'ds-interaction-fill': selectable,\n 'ds-interaction-fill--on-always-dark': selectable,\n 'ds-focus-ring-inset': selectable,\n }}\n role={selectable ? 'button' : undefined}\n tabIndex={selectable && index === this.rovingIndex ? 0 : -1}\n onClick={() => this.selectMetric(metric, index)}\n onKeyDown={event => this.handleMetricKeyDown(event, index)}\n onFocusin={() => {\n if (selectable) this.focusedMetricIndex = index;\n }}\n >\n <div class=\"ds-interaction-fill__content card-overview__metric-content\">\n {metric.labelTooltip ? (\n <ds-tooltip label={metric.labelTooltip} side=\"top\" size=\"sm\">\n {label}\n </ds-tooltip>\n ) : (\n label\n )}\n <div class=\"card-overview__metric-figure\">\n <ds-text\n as=\"span\"\n class=\"card-overview__metric-value ds-control-label-box\"\n variant=\"text-body-medium\"\n color={ALWAYS_DARK_PRIMARY}\n wrap=\"nowrap\"\n fontFeature=\"tabular-nums\"\n >\n {metric.value}\n </ds-text>\n {this.renderTrend(metric.trend, 'text-body-medium')}\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n private renderMetrics() {\n if (this.isLoading) {\n return [\n this.renderScore(),\n ...Array.from({ length: this.loadingMetricCount }, (_, index) => (\n <div class=\"card-overview__metric\" key={`loading-${index}`}>\n <div class=\"card-overview__metric-action card-overview__metric-action--inactive\">\n <div class=\"card-overview__metric-content\">\n {this.bar('text-body-small', '35%', 'card-overview__metric-label')}\n <div class=\"card-overview__metric-figure\">\n {this.bar('text-body-medium', 'var(--dimension-size-500)')}\n {/* Match renderTrend's type canvas and the score trend's 28px width. */}\n {this.bar(\n 'text-body-medium',\n 'calc(var(--dimension-size-300) + var(--dimension-space-050))'\n )}\n </div>\n </div>\n </div>\n </div>\n )),\n ];\n }\n\n return [\n this.renderScore(),\n ...this.visibleMetrics.map((metric, index) => this.renderMetric(metric, index)),\n ];\n }\n\n render() {\n const compact = this.variant === 'compact';\n const collapse = this.scrollCollapseGeometry;\n\n // Omit absent custom properties rather than handing them an undefined value.\n // Stencil serialises undefined to the string \"undefined\", which is invalid in\n // `repeat()` and voids the whole grid-template-columns declaration — the grid\n // then collapses to one implicit column instead of using the `auto-fit`\n // fallback baked into the stylesheet.\n const customProperties: Record<string, string> = {\n '--ds-card-overview-metric-min': this.metricMinWidth,\n };\n if (this.gridColumns) {\n customProperties['--ds-card-overview-grid-columns'] = String(this.gridColumns);\n }\n if (collapse.active) {\n customProperties['--ds-card-overview-expanded-height'] = `${collapse.expandedHeight}px`;\n customProperties['--ds-card-overview-visible-height'] = `${collapse.visibleHeight}px`;\n customProperties['--ds-card-overview-content-offset'] = `${collapse.offset}px`;\n }\n\n return (\n <Host\n class={{\n 'card-overview': true,\n 'card-overview--compact': compact,\n 'card-overview--stacked': !compact && this.layout === 'stacked',\n 'card-overview--scroll-collapsing': collapse.active,\n }}\n role=\"region\"\n aria-label={this.overviewLabel}\n aria-busy={this.isLoading ? 'true' : undefined}\n style={customProperties}\n >\n <div\n class={{\n 'card-overview__surface': true,\n // Split shadow and inset highlight, so the opaque surface cannot cover\n // the highlight the way a combined elevation shadow would.\n 'ds-control-elevation': true,\n 'ds-control-elevation--sm': !compact,\n 'ds-control-elevation--floating': compact,\n }}\n >\n <div class=\"card-overview__clip\">\n <div\n ref={element => {\n this.layoutEl = (element as HTMLElement) ?? undefined;\n }}\n class={{\n 'card-overview__layout': true,\n }}\n >\n <div class=\"card-overview__summary\">\n <div class=\"card-overview__header ds-control--md\">\n <div class=\"card-overview__period\">\n <div class=\"card-overview__period-current\">\n <slot name=\"period\">\n {this.periodLabel && (\n /* eslint-disable-next-line compomo/prefer-direct-ds-text -- Fixed copy uses the same structural frame and label inset as a slotted Select. */\n <div class=\"card-overview__period-fixed ds-control-frame\">\n <ds-text\n as=\"span\"\n class=\"ds-control-label-box\"\n variant=\"text-body-medium\"\n emphasis\n color={ALWAYS_DARK_PRIMARY}\n >\n {this.periodLabel}\n </ds-text>\n </div>\n )}\n </slot>\n </div>\n {this.comparisonLabel && (\n <ds-text\n as=\"span\"\n class=\"card-overview__period-comparison ds-control-label-box\"\n variant=\"text-body-medium\"\n color={ALWAYS_DARK_SECONDARY}\n >\n {this.comparisonLabel}\n </ds-text>\n )}\n </div>\n <div class=\"card-overview__filter\">\n <slot name=\"filter\" />\n </div>\n </div>\n </div>\n\n {!compact && (\n <div class=\"card-overview__body\">\n <div class=\"card-overview__metrics\" part=\"metrics\">\n {this.renderMetrics()}\n </div>\n\n <slot name=\"footer\" />\n </div>\n )}\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n",
|
|
404
|
+
"content": "import {\n Component,\n Element,\n Event,\n EventEmitter,\n forceUpdate,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\nimport { resolveCssLengthPx, TOKEN_DEFAULTS } from '../../utils';\nimport { ConnectionTasks } from '../../utils/connection-tasks';\nimport type { TextColor, TextVariant } from '../Text/text-types';\nimport type { MetricTrend } from '../../utils/metric-change';\nimport type {\n CardOverviewLayout,\n CardOverviewVariant,\n OverviewMetric,\n OverviewScore,\n} from './card-overview-types';\nimport {\n findNextOverviewMetricIndex,\n resolveCardOverviewCollapseGeometry,\n resolveOverviewGridColumns,\n resolveOverviewRovingIndex,\n} from './card-overview-controller';\n\n/**\n * Metric cells below this width drop a grid column rather than compress further.\n *\n * A literal rather than a token: this is a layout threshold for a grid cell, and\n * the dimension scale has no token for that. The 200px tokens it could borrow\n * (`menu-width-xs`, `form-width-xs`, `panel-width-2xs`) all name other\n * components, so binding to one would couple this grid to an unrelated contract.\n * Consumers override with the `metricMinWidth` prop.\n */\nconst DEFAULT_METRIC_MIN_WIDTH = '200px';\n\n/** Skeleton cells rendered while loading with no metrics supplied yet. */\nconst DEFAULT_LOADING_METRIC_COUNT = 5;\n\n/** Maximum number of comparable measures the summary bar presents at once. */\nconst MAX_METRIC_COUNT = 7;\n\nconst TREND_COLORS: Record<MetricTrend['tone'], TextColor> = {\n positive: 'var(--color-always-dark-foreground-positive)',\n negative: 'var(--color-always-dark-foreground-negative)',\n neutral: 'var(--color-always-dark-foreground-secondary)',\n};\n\nconst ALWAYS_DARK_PRIMARY: TextColor = 'var(--color-always-dark-foreground-primary)';\nconst ALWAYS_DARK_SECONDARY: TextColor = 'var(--color-always-dark-foreground-secondary)';\n\n@Component({\n tag: 'ds-card-overview',\n styleUrl: 'CardOverview.css',\n scoped: true,\n})\nexport class CardOverview {\n @Element() el!: HTMLElement;\n\n /** Full summary card, or the condensed 48px summary bar. */\n @Prop() variant: CardOverviewVariant = 'default';\n\n /** Intrinsic responsive layout, or a page-owned single-column stack. */\n @Prop() layout: CardOverviewLayout = 'auto';\n\n /** Optional nonselectable safety score rendered as the first grid cell. */\n @Prop() score: OverviewScore | undefined;\n\n /** Fixed current date or range. Replaced by content in the `period` slot. */\n @Prop() periodLabel: string = '';\n\n /** Copy between the current period and comparison control, usually `vs.`. */\n @Prop() comparisonLabel: string = '';\n\n /** Measures rendered in the responsive grid. Only the first seven are shown. */\n @Prop() metrics: OverviewMetric[] = [];\n\n /**\n * Width a metric cell may shrink to before the grid drops a column. The grid\n * uses this threshold while choosing an evenly distributed column count.\n */\n @Prop() metricMinWidth: string = DEFAULT_METRIC_MIN_WIDTH;\n\n /** Replace the score and metrics with skeletons while data resolves. */\n @Prop() isLoading: boolean = false;\n\n /** Message shown in place of the score when its figure cannot be resolved. */\n @Prop() scoreErrorMessage: string | undefined;\n\n /** Accessible name for the region. */\n @Prop() overviewLabel: string = 'Overview';\n\n /**\n * Page-controlled visual collapse from the full card (`0`) toward its 48px\n * compact handoff height (`1`). The component preserves its expanded flow\n * height, keeps the period bar stationary, and moves/clips the grid beneath\n * it. The page still owns sticky positioning and the final compact handoff.\n */\n @Prop() scrollCollapseProgress: number = 0;\n\n /** Emitted when a metric that is not inactive is activated. */\n @Event() dsMetricSelect!: EventEmitter<OverviewMetric>;\n\n /** Roving tab stop across selectable metrics. */\n @State() private focusedMetricIndex: number = 0;\n @State() private expandedHeight: number = 0;\n @State() private gridColumns: number | undefined;\n\n private layoutEl?: HTMLElement;\n private layoutResizeObserver: ResizeObserver | null = null;\n private layoutResizeFrame: number | undefined;\n private hasLoaded = false;\n private readonly connectionTasks = new ConnectionTasks(() => this.el.isConnected);\n /** The node the observer is bound to, which a later render can replace. */\n private observedLayoutEl?: HTMLElement;\n\n connectedCallback() {\n if (this.hasLoaded) this.observeLayout();\n }\n\n componentDidLoad() {\n this.hasLoaded = true;\n this.observeLayout();\n }\n\n componentDidRender() {\n if (!this.el.isConnected) return;\n // Re-bind after HMR when DidLoad's observer was dropped, and whenever a\n // render swapped the layout node out from under the observer: the ref points\n // at the new node while the observer still watches the detached one, which\n // never resizes again. The grid would then keep its first measured column\n // count for the life of the component.\n if (!this.layoutResizeObserver || this.observedLayoutEl !== this.layoutEl) {\n this.observeLayout();\n } else {\n this.updateLayoutGeometry();\n }\n }\n\n disconnectedCallback() {\n this.connectionTasks.cancel();\n this.layoutResizeObserver?.disconnect();\n this.layoutResizeObserver = null;\n this.layoutResizeFrame = undefined;\n this.observedLayoutEl = undefined;\n }\n\n private get visibleMetrics(): OverviewMetric[] {\n return this.metrics.slice(0, MAX_METRIC_COUNT);\n }\n\n private get visibleCellCount(): number {\n const metricCount = this.isLoading ? this.loadingMetricCount : this.visibleMetrics.length;\n return 1 + metricCount;\n }\n\n /** Preserve an authored data shape while loading, or use the standard six-cell grid. */\n private get loadingMetricCount(): number {\n return this.visibleMetrics.length || DEFAULT_LOADING_METRIC_COUNT;\n }\n\n private get resolvedScrollCollapseProgress(): number {\n if (this.variant === 'compact' || !Number.isFinite(this.scrollCollapseProgress)) return 0;\n return Math.min(1, Math.max(0, this.scrollCollapseProgress));\n }\n\n private get scrollCollapseGeometry() {\n const compactHeight = resolveCssLengthPx(TOKEN_DEFAULTS.size600, 48);\n return resolveCardOverviewCollapseGeometry({\n variant: this.variant,\n progress: this.resolvedScrollCollapseProgress,\n expandedHeight: this.expandedHeight,\n compactHeight,\n });\n }\n\n private observeLayout() {\n const layout = this.layoutEl;\n if (!this.el.isConnected || !layout) return;\n\n this.connectionTasks.cancelFrame(this.layoutResizeFrame);\n this.layoutResizeFrame = undefined;\n\n const bounds = layout.getBoundingClientRect();\n this.updateLayoutGeometry(bounds.width, bounds.height);\n if (typeof ResizeObserver === 'undefined') return;\n\n this.layoutResizeObserver?.disconnect();\n this.layoutResizeObserver = new ResizeObserver(entries => {\n const rect = entries[0]?.contentRect;\n if (!rect) return;\n this.connectionTasks.cancelFrame(this.layoutResizeFrame);\n this.layoutResizeFrame = this.connectionTasks.frame(() => {\n this.layoutResizeFrame = undefined;\n if (this.layoutEl !== layout) return;\n this.updateLayoutGeometry(rect.width, rect.height);\n });\n });\n this.layoutResizeObserver.observe(layout);\n this.observedLayoutEl = layout;\n }\n\n private updateLayoutGeometry(width?: number, height?: number) {\n const layout = this.layoutEl;\n if (!this.el.isConnected || !layout) return;\n\n const bounds =\n width === undefined || height === undefined ? layout.getBoundingClientRect() : null;\n const resolvedWidth = width ?? bounds?.width ?? 0;\n const resolvedHeight = height ?? bounds?.height ?? 0;\n\n let changed = false;\n\n if (resolvedHeight > 0 && Math.abs(resolvedHeight - this.expandedHeight) >= 0.5) {\n this.expandedHeight = resolvedHeight;\n changed = true;\n }\n\n const columns = resolveOverviewGridColumns({\n cellCount: this.visibleCellCount,\n availableWidth: resolvedWidth,\n minCellWidth: resolveCssLengthPx(this.metricMinWidth, DEFAULT_METRIC_MIN_WIDTH),\n });\n if (columns !== this.gridColumns) {\n this.gridColumns = columns;\n changed = true;\n }\n\n // The column count is written straight to the host rather than through the\n // rendered style object. Measurement happens in `componentDidLoad` and in the\n // ResizeObserver callback, both outside a render cycle, and the host's style\n // is not patched again after the first render — so a rendered value would stay\n // pinned to whatever the first paint produced, before any width was known.\n if (this.gridColumns) {\n this.el.style.setProperty('--ds-card-overview-grid-columns', String(this.gridColumns));\n } else {\n this.el.style.removeProperty('--ds-card-overview-grid-columns');\n }\n\n if (changed) forceUpdate(this);\n }\n\n /** Index of the roving tab stop, skipping inactive metrics. */\n private get rovingIndex(): number {\n return resolveOverviewRovingIndex(this.visibleMetrics, this.focusedMetricIndex);\n }\n\n private selectMetric(metric: OverviewMetric, index: number) {\n if (metric.isInactive) return;\n this.focusedMetricIndex = index;\n this.dsMetricSelect.emit(metric);\n }\n\n /** Move the roving tab stop, wrapping and skipping inactive metrics. */\n private moveFocus(from: number, step: number) {\n const metrics = this.visibleMetrics;\n const next = findNextOverviewMetricIndex(metrics, from, step < 0 ? -1 : 1);\n if (next < 0) return;\n\n this.focusedMetricIndex = next;\n const cells = this.el.querySelectorAll<HTMLElement>('.card-overview__metric-action');\n cells[next]?.focus();\n }\n\n private handleMetricKeyDown = (event: KeyboardEvent, index: number) => {\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowDown':\n event.preventDefault();\n this.moveFocus(index, 1);\n break;\n case 'ArrowLeft':\n case 'ArrowUp':\n event.preventDefault();\n this.moveFocus(index, -1);\n break;\n default:\n break;\n }\n };\n\n /**\n * A skeleton bar matching the type metrics of the text it stands in for, so the\n * loading state holds the same shape and rhythm as the resolved content.\n *\n * `background` is always passed so the base and shimmer follow the card's\n * permanently dark surface in both themes.\n */\n private bar(textVariant: TextVariant, width: string, className?: string) {\n return (\n <ds-skeleton\n class={className}\n variant=\"text\"\n textVariant={textVariant}\n width={width}\n background=\"always-dark\"\n />\n );\n }\n\n /**\n * Arrow and change in one text node.\n *\n * The arrow is a typeface glyph rather than an icon so it inherits the exact\n * size, weight, and baseline of the value beside it; an icon would need its\n * own size scale and would drift whenever the type scale changed.\n *\n * Tone is supplied by the caller and never inferred here.\n */\n private renderTrend(trend: MetricTrend | undefined, variant: TextVariant) {\n if (!trend) return null;\n return (\n <ds-text\n as=\"span\"\n class={{\n 'card-overview__trend': true,\n 'ds-control-label-box': true,\n [`card-overview__trend--${trend.tone}`]: true,\n }}\n variant={variant}\n color={TREND_COLORS[trend.tone]}\n fontFeature=\"tabular-nums\"\n >\n {trend.direction === 'up' ? '↑' : '↓'} {trend.value}\n </ds-text>\n );\n }\n\n private renderScore() {\n if (this.isLoading) {\n return (\n <div class=\"card-overview__score\" part=\"score\">\n <div class=\"card-overview__score-content\">\n <ds-score size=\"lg\" variant=\"dense\" isLoading></ds-score>\n <div class=\"card-overview__score-copy\">\n {this.bar(\n 'text-body-small',\n 'var(--dimension-size-800)',\n 'card-overview__score-label-spacer'\n )}\n {this.bar(\n 'text-body-medium',\n 'calc(var(--dimension-size-300) + var(--dimension-space-050))'\n )}\n </div>\n </div>\n </div>\n );\n }\n\n const unavailableMessage =\n this.scoreErrorMessage || (!this.score ? 'Score unavailable' : undefined);\n if (unavailableMessage) {\n return (\n /* eslint-disable-next-line compomo/prefer-direct-ds-text -- The score track owns the grid divider and 8px outer inset. */\n <div class=\"card-overview__score\" part=\"score\">\n <ds-text\n as=\"span\"\n class=\"card-overview__score-content card-overview__score-content--error\"\n variant=\"text-body-medium\"\n color=\"inherit\"\n role=\"alert\"\n >\n {unavailableMessage}\n </ds-text>\n </div>\n );\n }\n\n const score = this.score;\n if (!score) return null;\n\n return (\n <div class=\"card-overview__score\" part=\"score\">\n <div class=\"card-overview__score-content\">\n <ds-score\n size=\"lg\"\n variant=\"dense\"\n value={score.value}\n level={score.level}\n label=\"Safety score\"\n />\n <div class=\"card-overview__score-copy\">\n <ds-text\n as=\"span\"\n class=\"card-overview__score-label-spacer ds-control-label-box\"\n variant=\"text-body-small\"\n color={ALWAYS_DARK_SECONDARY}\n aria-hidden=\"true\"\n >\n \n </ds-text>\n {this.renderTrend(score.trend, 'text-body-medium')}\n </div>\n </div>\n </div>\n );\n }\n\n private renderMetric(metric: OverviewMetric, index: number) {\n const selectable = !metric.isInactive;\n const label = (\n <ds-text\n as=\"span\"\n class=\"card-overview__metric-label ds-control-label-box\"\n variant=\"text-body-small\"\n color={ALWAYS_DARK_SECONDARY}\n wrap=\"nowrap\"\n >\n {metric.label}\n </ds-text>\n );\n\n return (\n <div class=\"card-overview__metric\" part=\"metric\">\n <div\n class={{\n 'card-overview__metric-action': true,\n 'card-overview__metric-action--inactive': !selectable,\n // Selection targets get the shared wash; press scaling is not used here\n // so the grid keeps its columns aligned. See docs/control-press-policy.md.\n 'ds-interaction-fill': selectable,\n 'ds-interaction-fill--on-always-dark': selectable,\n 'ds-focus-ring-inset': selectable,\n }}\n role={selectable ? 'button' : undefined}\n tabIndex={selectable && index === this.rovingIndex ? 0 : -1}\n onClick={() => this.selectMetric(metric, index)}\n onKeyDown={event => this.handleMetricKeyDown(event, index)}\n onFocusin={() => {\n if (selectable) this.focusedMetricIndex = index;\n }}\n >\n <div class=\"ds-interaction-fill__content card-overview__metric-content\">\n {metric.labelTooltip ? (\n <ds-tooltip label={metric.labelTooltip} side=\"top\" size=\"sm\">\n {label}\n </ds-tooltip>\n ) : (\n label\n )}\n <div class=\"card-overview__metric-figure\">\n <ds-text\n as=\"span\"\n class=\"card-overview__metric-value ds-control-label-box\"\n variant=\"text-body-medium\"\n color={ALWAYS_DARK_PRIMARY}\n wrap=\"nowrap\"\n fontFeature=\"tabular-nums\"\n >\n {metric.value}\n </ds-text>\n {this.renderTrend(metric.trend, 'text-body-medium')}\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n private renderMetrics() {\n if (this.isLoading) {\n return [\n this.renderScore(),\n ...Array.from({ length: this.loadingMetricCount }, (_, index) => (\n <div class=\"card-overview__metric\" key={`loading-${index}`}>\n <div class=\"card-overview__metric-action card-overview__metric-action--inactive\">\n <div class=\"card-overview__metric-content\">\n {this.bar('text-body-small', '35%', 'card-overview__metric-label')}\n <div class=\"card-overview__metric-figure\">\n {this.bar('text-body-medium', 'var(--dimension-size-500)')}\n {/* Match renderTrend's type canvas and the score trend's 28px width. */}\n {this.bar(\n 'text-body-medium',\n 'calc(var(--dimension-size-300) + var(--dimension-space-050))'\n )}\n </div>\n </div>\n </div>\n </div>\n )),\n ];\n }\n\n return [\n this.renderScore(),\n ...this.visibleMetrics.map((metric, index) => this.renderMetric(metric, index)),\n ];\n }\n\n render() {\n const compact = this.variant === 'compact';\n const collapse = this.scrollCollapseGeometry;\n\n // Omit absent custom properties rather than handing them an undefined value.\n // Stencil serialises undefined to the string \"undefined\", which is invalid in\n // `repeat()` and voids the whole grid-template-columns declaration — the grid\n // then collapses to one implicit column instead of using the `auto-fit`\n // fallback baked into the stylesheet.\n const customProperties: Record<string, string> = {\n '--ds-card-overview-metric-min': this.metricMinWidth,\n };\n if (this.gridColumns) {\n customProperties['--ds-card-overview-grid-columns'] = String(this.gridColumns);\n }\n if (collapse.active) {\n customProperties['--ds-card-overview-expanded-height'] = `${collapse.expandedHeight}px`;\n customProperties['--ds-card-overview-visible-height'] = `${collapse.visibleHeight}px`;\n customProperties['--ds-card-overview-content-offset'] = `${collapse.offset}px`;\n }\n\n return (\n <Host\n class={{\n 'card-overview': true,\n 'card-overview--compact': compact,\n 'card-overview--stacked': !compact && this.layout === 'stacked',\n 'card-overview--scroll-collapsing': collapse.active,\n }}\n role=\"region\"\n aria-label={this.overviewLabel}\n aria-busy={this.isLoading ? 'true' : undefined}\n style={customProperties}\n >\n <div\n class={{\n 'card-overview__surface': true,\n // Split shadow and inset highlight, so the opaque surface cannot cover\n // the highlight the way a combined elevation shadow would.\n 'ds-control-elevation': true,\n 'ds-control-elevation--sm': !compact,\n 'ds-control-elevation--floating': compact,\n }}\n >\n <div class=\"card-overview__clip\">\n <div\n ref={element => {\n this.layoutEl = (element as HTMLElement) ?? undefined;\n }}\n class={{\n 'card-overview__layout': true,\n }}\n >\n <div class=\"card-overview__summary\">\n <div class=\"card-overview__header ds-control--md\">\n <div class=\"card-overview__period\">\n <div class=\"card-overview__period-current\">\n <slot name=\"period\">\n {this.periodLabel && (\n <div class=\"card-overview__period-fixed ds-control-frame\">\n <ds-skeleton\n preserveLayout\n isLoading={this.isLoading}\n background=\"always-dark\"\n >\n <ds-text\n as=\"span\"\n class=\"ds-control-label-box\"\n variant=\"text-body-medium\"\n emphasis\n color={ALWAYS_DARK_PRIMARY}\n >\n {this.periodLabel}\n </ds-text>\n </ds-skeleton>\n </div>\n )}\n </slot>\n </div>\n {this.comparisonLabel && (\n <ds-skeleton\n class=\"card-overview__period-comparison\"\n preserveLayout\n isLoading={this.isLoading}\n background=\"always-dark\"\n >\n <ds-text\n as=\"span\"\n class=\"ds-control-label-box\"\n variant=\"text-body-medium\"\n color={ALWAYS_DARK_SECONDARY}\n >\n {this.comparisonLabel}\n </ds-text>\n </ds-skeleton>\n )}\n </div>\n <div class=\"card-overview__filter\">\n <slot name=\"filter\" />\n </div>\n </div>\n </div>\n\n {!compact && (\n <div class=\"card-overview__body\">\n <div class=\"card-overview__metrics\" part=\"metrics\">\n {this.renderMetrics()}\n </div>\n\n <slot name=\"footer\" />\n </div>\n )}\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n",
|
|
405
405
|
"type": "registry:ui"
|
|
406
406
|
},
|
|
407
407
|
{
|
|
@@ -71,7 +71,8 @@
|
|
|
71
71
|
"The parent owns read-only versus editable body composition, dirty state, validation, persistence, loading, success, and error consequences.",
|
|
72
72
|
"A save request keeps the section editing while validation or persistence is pending; the parent exits only after success.",
|
|
73
73
|
"A cancel request does not persist changes; the parent restores its chosen value snapshot and exits editing.",
|
|
74
|
-
"The immediate variant keeps the resting card surface and omits header actions even if editing is supplied. The application applies and persists each control change independently."
|
|
74
|
+
"The immediate variant keeps the resting card surface and omits header actions even if editing is supplied. The application applies and persists each control change independently.",
|
|
75
|
+
"isLoading replaces header copy and actions with skeletons while retaining card geometry; projected body loading remains owned by the application."
|
|
75
76
|
],
|
|
76
77
|
"responsiveBehavior": [
|
|
77
78
|
"Choose sm, md, or lg from the parent layout. Empty editable cards use the matching minimum height. Cards with body content, and immediate cards, fit that content.",
|
|
@@ -191,6 +192,15 @@
|
|
|
191
192
|
"mutable": false,
|
|
192
193
|
"description": "Section heading shown in the card header."
|
|
193
194
|
},
|
|
195
|
+
"isLoading": {
|
|
196
|
+
"type": "boolean",
|
|
197
|
+
"resolvedType": "boolean",
|
|
198
|
+
"attribute": "is-loading",
|
|
199
|
+
"default": "false",
|
|
200
|
+
"required": false,
|
|
201
|
+
"mutable": false,
|
|
202
|
+
"description": "Keep the card and projected content in place while its header shows skeletons."
|
|
203
|
+
},
|
|
194
204
|
"saveLabel": {
|
|
195
205
|
"type": "string",
|
|
196
206
|
"resolvedType": "string",
|
|
@@ -265,6 +275,15 @@
|
|
|
265
275
|
"mutable": false,
|
|
266
276
|
"description": "Section heading shown in the card header."
|
|
267
277
|
},
|
|
278
|
+
"isLoading": {
|
|
279
|
+
"type": "boolean",
|
|
280
|
+
"resolvedType": "boolean",
|
|
281
|
+
"attribute": "is-loading",
|
|
282
|
+
"default": "false",
|
|
283
|
+
"required": false,
|
|
284
|
+
"mutable": false,
|
|
285
|
+
"description": "Keep the card and projected content in place while its header shows skeletons."
|
|
286
|
+
},
|
|
268
287
|
"saveLabel": {
|
|
269
288
|
"type": "string",
|
|
270
289
|
"resolvedType": "string",
|
|
@@ -322,8 +341,8 @@
|
|
|
322
341
|
},
|
|
323
342
|
"peerDependencies": {
|
|
324
343
|
"required": [
|
|
325
|
-
"@ds-mo/tokens ^8.0.
|
|
326
|
-
"@ds-mo/icons ^8.1.
|
|
344
|
+
"@ds-mo/tokens ^8.0.1",
|
|
345
|
+
"@ds-mo/icons ^8.1.2"
|
|
327
346
|
],
|
|
328
347
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
329
348
|
}
|
|
@@ -336,17 +355,18 @@
|
|
|
336
355
|
"registryDependencies": [
|
|
337
356
|
"button-filled",
|
|
338
357
|
"button-unfilled",
|
|
358
|
+
"skeleton",
|
|
339
359
|
"text"
|
|
340
360
|
],
|
|
341
361
|
"files": [
|
|
342
362
|
{
|
|
343
363
|
"path": "src/wc/components/CardSetting/CardSetting.css",
|
|
344
|
-
"content": "@import '../../utils/radius.css';\n@import '../../utils/chrome-header.css';\n@import '../../utils/forced-colors.css';\n\n:host {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: var(--_card-setting-width);\n min-height: var(--_card-setting-min-height);\n max-width: 100%;\n overflow: hidden;\n border: none;\n border-radius: var(--ds-radius-card);\n background-color: var(--color-background-primary);\n box-shadow: var(--effect-shadow-elevated-sm);\n}\n\n:host::after {\n content: '';\n position: absolute;\n inset: 0;\n z-index: 4;\n border-radius: inherit;\n box-shadow: var(--effect-highlight-elevated-sm);\n pointer-events: none;\n}\n\n:host(.card-setting--editing) {\n background-color: var(--color-background-bold-brand);\n box-shadow: 0 0 0 var(--dimension-stroke-width-025) var(--color-border-bold-brand);\n}\n\n:host(.card-setting--editing)::after {\n box-shadow: none;\n}\n\n.card-setting__header {\n flex: 0 0 auto;\n border-bottom: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n}\n\n:host(.card-setting--editing) .card-setting__header {\n border-bottom-color: transparent;\n}\n\n.card-setting__copy {\n align-items: center;\n}\n\nds-text.card-setting__title {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n -webkit-user-select: none;\n user-select: none;\n}\n\n.card-setting__actions {\n flex-shrink: 0;\n}\n\n.card-setting__panel {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-height: 0;\n box-sizing: border-box;\n background-color: var(--color-background-primary);\n border-radius: 0 0 var(--ds-radius-card) var(--ds-radius-card);\n}\n\n:host(.card-setting--editing) .card-setting__panel {\n border-radius: var(--ds-radius-card);\n}\n\n.card-setting__banner {\n flex: 0 0 auto;\n min-width: 0;\n}\n\n.card-setting__banner--empty {\n display: none;\n}\n\n.card-setting__body {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-height: 0;\n box-sizing: border-box;\n padding-block: var(--dimension-space-100);\n}\n\n@media (forced-colors: active) {\n :host {\n box-shadow: none;\n outline: var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);\n outline-offset: calc(-1 * var(--dimension-stroke-width-012));\n }\n\n :host::after {\n box-shadow: none;\n }\n}\n",
|
|
364
|
+
"content": "@import '../../utils/radius.css';\n@import '../../utils/chrome-header.css';\n@import '../../utils/forced-colors.css';\n\n:host {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: var(--_card-setting-width);\n min-height: var(--_card-setting-min-height);\n max-width: 100%;\n overflow: hidden;\n border: none;\n border-radius: var(--ds-radius-card);\n background-color: var(--color-background-primary);\n box-shadow: var(--effect-shadow-elevated-sm);\n}\n\n:host::after {\n content: '';\n position: absolute;\n inset: 0;\n z-index: 4;\n border-radius: inherit;\n box-shadow: var(--effect-highlight-elevated-sm);\n pointer-events: none;\n}\n\n:host(.card-setting--editing) {\n background-color: var(--color-background-bold-brand);\n box-shadow: 0 0 0 var(--dimension-stroke-width-025) var(--color-border-bold-brand);\n}\n\n:host(.card-setting--editing)::after {\n box-shadow: none;\n}\n\n.card-setting__header {\n flex: 0 0 auto;\n border-bottom: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n}\n\n:host(.card-setting--editing) .card-setting__header {\n border-bottom-color: transparent;\n}\n\n.card-setting__copy {\n align-items: center;\n position: relative;\n}\n\nds-text.card-setting__title {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n -webkit-user-select: none;\n user-select: none;\n}\n\n.card-setting__actions {\n flex-shrink: 0;\n position: relative;\n}\n\n:host(.card-setting--loading) .card-setting__title {\n visibility: hidden;\n}\n\n.card-setting__heading-skeleton {\n position: absolute;\n inset-inline-start: var(--dimension-space-100);\n}\n\n.card-setting__panel {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-height: 0;\n box-sizing: border-box;\n background-color: var(--color-background-primary);\n border-radius: 0 0 var(--ds-radius-card) var(--ds-radius-card);\n}\n\n:host(.card-setting--editing) .card-setting__panel {\n border-radius: var(--ds-radius-card);\n}\n\n.card-setting__banner {\n flex: 0 0 auto;\n min-width: 0;\n}\n\n.card-setting__banner--empty {\n display: none;\n}\n\n.card-setting__body {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-height: 0;\n box-sizing: border-box;\n padding-block: var(--dimension-space-100);\n}\n\n@media (forced-colors: active) {\n :host {\n box-shadow: none;\n outline: var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);\n outline-offset: calc(-1 * var(--dimension-stroke-width-012));\n }\n\n :host::after {\n box-shadow: none;\n }\n}\n",
|
|
345
365
|
"type": "registry:ui"
|
|
346
366
|
},
|
|
347
367
|
{
|
|
348
368
|
"path": "src/wc/components/CardSetting/CardSetting.tsx",
|
|
349
|
-
"content": "import { Component, Element, Event, EventEmitter, h, Host, Prop, State } from '@stencil/core';\n\nexport type CardSettingVariant = 'editable' | 'immediate';\nexport type CardSettingWidth = 'sm' | 'md' | 'lg';\nexport type CardSettingAction = 'edit' | 'save' | 'cancel';\n\nexport interface CardSettingActionDetail {\n action: CardSettingAction;\n originalEvent: MouseEvent;\n}\n\nconst CARD_WIDTH_VARS: Record<CardSettingWidth, string> = {\n sm: 'var(--dimension-card-width-sm)',\n md: 'var(--dimension-card-width-md)',\n lg: 'var(--dimension-card-width-lg)',\n};\n\nconst CARD_HEIGHT_VARS: Record<CardSettingWidth, string> = {\n sm: 'var(--dimension-card-height-sm)',\n md: 'var(--dimension-card-height-md)',\n lg: 'var(--dimension-card-height-lg)',\n};\n\nconst FAINT_BRAND_TITLE_COLOR = 'var(--color-foreground-faint-brand)';\n\nconst isRenderableNode = (node: Node): boolean => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n return (node as Element).tagName !== 'SLOT';\n }\n return node.nodeType === Node.TEXT_NODE && Boolean(node.textContent?.trim());\n};\n\nconst slotName = (node: Node): string | null =>\n node.nodeType === Node.ELEMENT_NODE ? (node as Element).getAttribute('slot') : null;\n\nconst isDefaultSlottedNode = (node: Node): boolean => isRenderableNode(node) && !slotName(node);\n\nconst isBannerSlottedNode = (node: Node): boolean =>\n isRenderableNode(node) && slotName(node) === 'banner';\n\nconst slotHasRenderableContent = (slot: HTMLSlotElement | null): boolean =>\n Boolean(slot?.assignedNodes({ flatten: true }).some(isRenderableNode));\n\n@Component({\n tag: 'ds-card-setting',\n styleUrl: 'CardSetting.css',\n scoped: true,\n})\nexport class CardSetting {\n @Element() el!: HTMLElement;\n\n /** Section heading shown in the card header. */\n @Prop() heading!: string;\n\n /**\n * Card width token (`sm` / `md` / `lg`). Empty editable cards use the matching\n * minimum-height token. Cards with body content, and immediate cards, fit\n * that content.\n */\n @Prop() cardWidth: CardSettingWidth = 'md';\n\n /** Immediate settings omit edit actions and apply changes through their own controls. */\n @Prop() variant: CardSettingVariant = 'editable';\n\n /** Controlled edit state — parent owns single-edit orchestration. */\n @Prop() editing = false;\n @Prop() editLabel: string = 'Edit';\n @Prop() cancelLabel: string = 'Cancel';\n @Prop() saveLabel: string = 'Save';\n\n /** Emits a controlled edit, save, or cancel request. */\n @Event() dsAction!: EventEmitter<CardSettingActionDetail>;\n\n @State() private hasBannerContent = false;\n @State() private hasBodyContent = false;\n\n componentWillLoad() {\n const nodes = Array.from(this.el.childNodes);\n this.hasBannerContent = nodes.some(isBannerSlottedNode);\n this.hasBodyContent = nodes.some(isDefaultSlottedNode);\n }\n\n componentDidLoad() {\n this.syncBannerContent();\n this.syncBodyContent();\n }\n\n private emitAction(action: CardSettingAction, originalEvent: MouseEvent) {\n this.dsAction.emit({ action, originalEvent });\n }\n\n private readSlotContent(\n event: Event | undefined,\n slotSelector: string,\n containerSelector: string\n ): boolean {\n const slot =\n event?.target instanceof HTMLSlotElement\n ? event.target\n : this.el.querySelector<HTMLSlotElement>(slotSelector);\n if (slotHasRenderableContent(slot)) return true;\n const container = this.el.querySelector(containerSelector);\n return Array.from(container?.childNodes ?? []).some(isRenderableNode);\n }\n\n private syncBannerContent = (event?: Event) => {\n const hasContent = this.readSlotContent(\n event,\n ':scope > .card-setting__panel > .card-setting__banner > slot',\n ':scope > .card-setting__panel > .card-setting__banner'\n );\n if (hasContent !== this.hasBannerContent) this.hasBannerContent = hasContent;\n };\n\n private syncBodyContent = (event?: Event) => {\n const hasContent = this.readSlotContent(\n event,\n ':scope > .card-setting__panel > .card-setting__body > slot',\n ':scope > .card-setting__panel > .card-setting__body'\n );\n if (hasContent !== this.hasBodyContent) this.hasBodyContent = hasContent;\n };\n\n private get hugContent(): boolean {\n return this.variant === 'immediate' || this.hasBannerContent || this.hasBodyContent;\n }\n\n render() {\n const editing = this.variant === 'editable' && this.editing;\n\n return (\n <Host\n class={{\n 'card-setting': true,\n 'card-setting--editing': editing,\n 'card-setting--immediate': this.variant === 'immediate',\n 'card-setting--empty': !this.hugContent,\n }}\n style={{\n '--_card-setting-width': CARD_WIDTH_VARS[this.cardWidth],\n '--_card-setting-min-height': this.hugContent ? '0' : CARD_HEIGHT_VARS[this.cardWidth],\n }}\n >\n <header class=\"card-setting__header ds-chrome-header\">\n
|
|
369
|
+
"content": "import { Component, Element, Event, EventEmitter, h, Host, Prop, State } from '@stencil/core';\n\nexport type CardSettingVariant = 'editable' | 'immediate';\nexport type CardSettingWidth = 'sm' | 'md' | 'lg';\nexport type CardSettingAction = 'edit' | 'save' | 'cancel';\n\nexport interface CardSettingActionDetail {\n action: CardSettingAction;\n originalEvent: MouseEvent;\n}\n\nconst CARD_WIDTH_VARS: Record<CardSettingWidth, string> = {\n sm: 'var(--dimension-card-width-sm)',\n md: 'var(--dimension-card-width-md)',\n lg: 'var(--dimension-card-width-lg)',\n};\n\nconst CARD_HEIGHT_VARS: Record<CardSettingWidth, string> = {\n sm: 'var(--dimension-card-height-sm)',\n md: 'var(--dimension-card-height-md)',\n lg: 'var(--dimension-card-height-lg)',\n};\n\nconst FAINT_BRAND_TITLE_COLOR = 'var(--color-foreground-faint-brand)';\n\nconst isRenderableNode = (node: Node): boolean => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n return (node as Element).tagName !== 'SLOT';\n }\n return node.nodeType === Node.TEXT_NODE && Boolean(node.textContent?.trim());\n};\n\nconst slotName = (node: Node): string | null =>\n node.nodeType === Node.ELEMENT_NODE ? (node as Element).getAttribute('slot') : null;\n\nconst isDefaultSlottedNode = (node: Node): boolean => isRenderableNode(node) && !slotName(node);\n\nconst isBannerSlottedNode = (node: Node): boolean =>\n isRenderableNode(node) && slotName(node) === 'banner';\n\nconst slotHasRenderableContent = (slot: HTMLSlotElement | null): boolean =>\n Boolean(slot?.assignedNodes({ flatten: true }).some(isRenderableNode));\n\n@Component({\n tag: 'ds-card-setting',\n styleUrl: 'CardSetting.css',\n scoped: true,\n})\nexport class CardSetting {\n @Element() el!: HTMLElement;\n\n /** Section heading shown in the card header. */\n @Prop() heading!: string;\n\n /**\n * Card width token (`sm` / `md` / `lg`). Empty editable cards use the matching\n * minimum-height token. Cards with body content, and immediate cards, fit\n * that content.\n */\n @Prop() cardWidth: CardSettingWidth = 'md';\n\n /** Immediate settings omit edit actions and apply changes through their own controls. */\n @Prop() variant: CardSettingVariant = 'editable';\n\n /** Controlled edit state — parent owns single-edit orchestration. */\n @Prop() editing = false;\n /** Keep the card and projected content in place while its header shows skeletons. */\n @Prop() isLoading = false;\n @Prop() editLabel: string = 'Edit';\n @Prop() cancelLabel: string = 'Cancel';\n @Prop() saveLabel: string = 'Save';\n\n /** Emits a controlled edit, save, or cancel request. */\n @Event() dsAction!: EventEmitter<CardSettingActionDetail>;\n\n @State() private hasBannerContent = false;\n @State() private hasBodyContent = false;\n\n componentWillLoad() {\n const nodes = Array.from(this.el.childNodes);\n this.hasBannerContent = nodes.some(isBannerSlottedNode);\n this.hasBodyContent = nodes.some(isDefaultSlottedNode);\n }\n\n componentDidLoad() {\n this.syncBannerContent();\n this.syncBodyContent();\n }\n\n private emitAction(action: CardSettingAction, originalEvent: MouseEvent) {\n this.dsAction.emit({ action, originalEvent });\n }\n\n private readSlotContent(\n event: Event | undefined,\n slotSelector: string,\n containerSelector: string\n ): boolean {\n const slot =\n event?.target instanceof HTMLSlotElement\n ? event.target\n : this.el.querySelector<HTMLSlotElement>(slotSelector);\n if (slotHasRenderableContent(slot)) return true;\n const container = this.el.querySelector(containerSelector);\n return Array.from(container?.childNodes ?? []).some(isRenderableNode);\n }\n\n private syncBannerContent = (event?: Event) => {\n const hasContent = this.readSlotContent(\n event,\n ':scope > .card-setting__panel > .card-setting__banner > slot',\n ':scope > .card-setting__panel > .card-setting__banner'\n );\n if (hasContent !== this.hasBannerContent) this.hasBannerContent = hasContent;\n };\n\n private syncBodyContent = (event?: Event) => {\n const hasContent = this.readSlotContent(\n event,\n ':scope > .card-setting__panel > .card-setting__body > slot',\n ':scope > .card-setting__panel > .card-setting__body'\n );\n if (hasContent !== this.hasBodyContent) this.hasBodyContent = hasContent;\n };\n\n private get hugContent(): boolean {\n return this.variant === 'immediate' || this.hasBannerContent || this.hasBodyContent;\n }\n\n render() {\n const editing = this.variant === 'editable' && this.editing;\n\n return (\n <Host\n aria-busy={this.isLoading ? 'true' : undefined}\n class={{\n 'card-setting': true,\n 'card-setting--loading': this.isLoading,\n 'card-setting--editing': editing,\n 'card-setting--immediate': this.variant === 'immediate',\n 'card-setting--empty': !this.hugContent,\n }}\n style={{\n '--_card-setting-width': CARD_WIDTH_VARS[this.cardWidth],\n '--_card-setting-min-height': this.hugContent ? '0' : CARD_HEIGHT_VARS[this.cardWidth],\n }}\n >\n <header class=\"card-setting__header ds-chrome-header\">\n <div class=\"card-setting__copy ds-chrome-header__copy ds-control--md\">\n <ds-text\n class=\"card-setting__title ds-chrome-header__heading\"\n variant=\"text-title-small\"\n emphasis\n color={editing ? FAINT_BRAND_TITLE_COLOR : 'primary'}\n as=\"h2\"\n >\n {this.heading}\n </ds-text>\n {this.isLoading && (\n <ds-skeleton\n class=\"card-setting__heading-skeleton\"\n width=\"min(60%, calc(var(--dimension-size-800) * 2))\"\n textVariant=\"text-title-small\"\n />\n )}\n </div>\n {this.variant === 'editable' && (\n <div class=\"card-setting__actions ds-chrome-header__trailing\" inert={this.isLoading}>\n {!editing ? (\n <ds-skeleton\n preserveLayout\n isLoading={this.isLoading}\n variant=\"control\"\n controlAppearance=\"outlined\"\n controlContent=\"icon\"\n >\n <ds-button-unfilled\n variant=\"icon\"\n type=\"button\"\n icon=\"Pencil\"\n aria-label={this.editLabel}\n onDsClick={(event: CustomEvent<MouseEvent>) =>\n this.emitAction('edit', event.detail)\n }\n />\n </ds-skeleton>\n ) : (\n [\n <ds-skeleton\n key=\"cancel\"\n preserveLayout\n isLoading={this.isLoading}\n variant=\"control\"\n controlAppearance=\"outlined\"\n controlContent=\"icon\"\n background=\"bold\"\n >\n <ds-button-unfilled\n variant=\"icon\"\n type=\"button\"\n icon=\"Cross\"\n background=\"bold\"\n aria-label={this.cancelLabel}\n onDsClick={(event: CustomEvent<MouseEvent>) =>\n this.emitAction('cancel', event.detail)\n }\n />\n </ds-skeleton>,\n <ds-skeleton\n key=\"save\"\n preserveLayout\n isLoading={this.isLoading}\n variant=\"control\"\n >\n <ds-button-filled\n variant=\"icon\"\n type=\"button\"\n icon=\"Check\"\n intent=\"brand\"\n contrast=\"faint\"\n aria-label={this.saveLabel}\n onDsClick={(event: CustomEvent<MouseEvent>) =>\n this.emitAction('save', event.detail)\n }\n />\n </ds-skeleton>,\n ]\n )}\n </div>\n )}\n </header>\n <div class=\"card-setting__panel\">\n <div\n class={{\n 'card-setting__banner': true,\n 'card-setting__banner--empty': !this.hasBannerContent,\n }}\n >\n <slot name=\"banner\" onSlotchange={this.syncBannerContent} />\n </div>\n <div class=\"card-setting__body\">\n <slot onSlotchange={this.syncBodyContent} />\n </div>\n </div>\n </Host>\n );\n }\n}\n",
|
|
350
370
|
"type": "registry:ui"
|
|
351
371
|
}
|
|
352
372
|
]
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"The shared text-action recipe supplies brand foreground, hover underline, and keyboard focus indication."
|
|
33
33
|
],
|
|
34
34
|
"states": [
|
|
35
|
+
"Loading retains the card surface, sentence wrapping, and control footprints while replacing each fragment with an inert skeleton.",
|
|
35
36
|
"The application owns the selected area, profile, available choices, permissions, and empty-state copy. Existing complete area-trigger labels remain compatible. Applications that separate the localizable settings noun from the control supply the area-only trigger label and noun together.",
|
|
36
37
|
"The card reports popup requests without changing selection or expanded state.",
|
|
37
38
|
"The surface follows the active theme rather than imposing always-dark colors."
|
|
@@ -112,6 +113,15 @@
|
|
|
112
113
|
"mutable": false,
|
|
113
114
|
"description": "Sentence connector, supplied separately for localization."
|
|
114
115
|
},
|
|
116
|
+
"isLoading": {
|
|
117
|
+
"type": "boolean",
|
|
118
|
+
"resolvedType": "boolean",
|
|
119
|
+
"attribute": "is-loading",
|
|
120
|
+
"default": "false",
|
|
121
|
+
"required": false,
|
|
122
|
+
"mutable": false,
|
|
123
|
+
"description": "Replace sentence fragments and controls with skeletons inside the same card."
|
|
124
|
+
},
|
|
115
125
|
"managingLabel": {
|
|
116
126
|
"type": "string",
|
|
117
127
|
"resolvedType": "string",
|
|
@@ -224,6 +234,15 @@
|
|
|
224
234
|
"mutable": false,
|
|
225
235
|
"description": "Sentence connector, supplied separately for localization."
|
|
226
236
|
},
|
|
237
|
+
"isLoading": {
|
|
238
|
+
"type": "boolean",
|
|
239
|
+
"resolvedType": "boolean",
|
|
240
|
+
"attribute": "is-loading",
|
|
241
|
+
"default": "false",
|
|
242
|
+
"required": false,
|
|
243
|
+
"mutable": false,
|
|
244
|
+
"description": "Replace sentence fragments and controls with skeletons inside the same card."
|
|
245
|
+
},
|
|
227
246
|
"managingLabel": {
|
|
228
247
|
"type": "string",
|
|
229
248
|
"resolvedType": "string",
|
|
@@ -326,8 +345,8 @@
|
|
|
326
345
|
},
|
|
327
346
|
"peerDependencies": {
|
|
328
347
|
"required": [
|
|
329
|
-
"@ds-mo/tokens ^8.0.
|
|
330
|
-
"@ds-mo/icons ^8.1.
|
|
348
|
+
"@ds-mo/tokens ^8.0.1",
|
|
349
|
+
"@ds-mo/icons ^8.1.2"
|
|
331
350
|
],
|
|
332
351
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
333
352
|
}
|
|
@@ -338,17 +357,18 @@
|
|
|
338
357
|
"@ds-mo/tokens"
|
|
339
358
|
],
|
|
340
359
|
"registryDependencies": [
|
|
360
|
+
"skeleton",
|
|
341
361
|
"text"
|
|
342
362
|
],
|
|
343
363
|
"files": [
|
|
344
364
|
{
|
|
345
365
|
"path": "src/wc/components/CardSettingsScope/CardSettingsScope.css",
|
|
346
|
-
"content": "@import '../../utils/text-decoration.css';\n@import '../../utils/focus-ring.css';\n@import '../../utils/radius.css';\n@import '../../styles/control-elevation.css';\n\n:host {\n display: block;\n min-width: 0;\n width: var(--dimension-card-width-md);\n max-width: 100%;\n}\n\n.card-settings-scope {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 0 var(--dimension-space-050);\n box-sizing: border-box;\n min-height: var(--dimension-size-600);\n padding: var(--dimension-space-100) var(--dimension-space-200);\n border-radius: var(--ds-radius-card);\n background: var(--color-background-primary);\n color: var(--color-foreground-primary);\n}\n\n.card-settings-scope__action {\n display: inline-flex;\n align-items: center;\n min-height: var(--dimension-size-400);\n max-width: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: var(--dimension-radius-025);\n background: transparent;\n cursor: pointer;\n}\n\n.card-settings-scope__action ds-text {\n overflow-wrap: anywhere;\n text-align: start;\n}\n\n@media (forced-colors: active) {\n .card-settings-scope {\n outline: var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);\n outline-offset: calc(-1 * var(--dimension-stroke-width-012));\n }\n}\n",
|
|
366
|
+
"content": "@import '../../utils/text-decoration.css';\n@import '../../utils/focus-ring.css';\n@import '../../utils/radius.css';\n@import '../../styles/control-elevation.css';\n\n:host {\n display: block;\n min-width: 0;\n width: var(--dimension-card-width-md);\n max-width: 100%;\n}\n\n.card-settings-scope {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 0 var(--dimension-space-050);\n box-sizing: border-box;\n min-height: var(--dimension-size-600);\n padding: var(--dimension-space-100) var(--dimension-space-200);\n border-radius: var(--ds-radius-card);\n background: var(--color-background-primary);\n color: var(--color-foreground-primary);\n}\n\n.card-settings-scope__action {\n display: inline-flex;\n align-items: center;\n min-height: var(--dimension-size-400);\n max-width: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: var(--dimension-radius-025);\n background: transparent;\n cursor: pointer;\n}\n\n.card-settings-scope > ds-skeleton {\n min-width: 0;\n max-width: 100%;\n}\n\n.card-settings-scope__action ds-text {\n overflow-wrap: anywhere;\n text-align: start;\n}\n\n@media (forced-colors: active) {\n .card-settings-scope {\n outline: var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);\n outline-offset: calc(-1 * var(--dimension-stroke-width-012));\n }\n}\n",
|
|
347
367
|
"type": "registry:ui"
|
|
348
368
|
},
|
|
349
369
|
{
|
|
350
370
|
"path": "src/wc/components/CardSettingsScope/CardSettingsScope.tsx",
|
|
351
|
-
"content": "import { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\n\nexport interface SettingsScopeRequest {\n scope: 'area' | 'profile';\n anchor: HTMLButtonElement;\n originalEvent: MouseEvent;\n}\n\n@Component({\n tag: 'ds-card-settings-scope',\n styleUrl: 'CardSettingsScope.css',\n scoped: true,\n})\nexport class CardSettingsScope {\n /** Current product area or complete combined-view label in the sentence trigger. */\n @Prop() areaLabel: string = 'All settings';\n /** Current organization or settings profile. */\n @Prop() profileLabel: string = 'Organization';\n /** Sentence prefix, supplied separately for localization. */\n @Prop() managingLabel: string = 'Managing';\n /** Optional sentence noun after an area-only trigger label, supplied separately for localization. */\n @Prop() settingsLabel: string = '';\n /** Sentence connector, supplied separately for localization. */\n @Prop() forLabel: string = 'for';\n /** Accessible name for this context region. */\n @Prop() scopeLabel: string = 'Settings scope';\n /** ID of the application-owned product-area menu. */\n @Prop() areaControls: string | undefined;\n /** ID of the application-owned profiles popup. */\n @Prop() profileControls: string | undefined;\n /** Whether the product-area menu is open. */\n @Prop() areaExpanded: boolean = false;\n /** Whether the profiles popup is open. */\n @Prop() profileExpanded: boolean = false;\n /** Empty informational profile popups use dialog semantics instead of a menu. */\n @Prop() profilePopup: 'menu' | 'dialog' = 'menu';\n\n /** Requests a popup; the owner supplies choices, open state, and selection. */\n @Event() dsScopeRequest!: EventEmitter<SettingsScopeRequest>;\n\n private request(scope: SettingsScopeRequest['scope'], event: MouseEvent) {\n this.dsScopeRequest.emit({\n scope,\n anchor: event.currentTarget as HTMLButtonElement,\n originalEvent: event,\n });\n }\n\n render() {\n return (\n <Host>\n <div\n class=\"card-settings-scope ds-control-elevation ds-control-elevation--sm\"\n role=\"region\"\n aria-label={this.scopeLabel}\n >\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"primary\">\n
|
|
371
|
+
"content": "import { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\n\nexport interface SettingsScopeRequest {\n scope: 'area' | 'profile';\n anchor: HTMLButtonElement;\n originalEvent: MouseEvent;\n}\n\n@Component({\n tag: 'ds-card-settings-scope',\n styleUrl: 'CardSettingsScope.css',\n scoped: true,\n})\nexport class CardSettingsScope {\n /** Current product area or complete combined-view label in the sentence trigger. */\n @Prop() areaLabel: string = 'All settings';\n /** Current organization or settings profile. */\n @Prop() profileLabel: string = 'Organization';\n /** Sentence prefix, supplied separately for localization. */\n @Prop() managingLabel: string = 'Managing';\n /** Optional sentence noun after an area-only trigger label, supplied separately for localization. */\n @Prop() settingsLabel: string = '';\n /** Sentence connector, supplied separately for localization. */\n @Prop() forLabel: string = 'for';\n /** Accessible name for this context region. */\n @Prop() scopeLabel: string = 'Settings scope';\n /** ID of the application-owned product-area menu. */\n @Prop() areaControls: string | undefined;\n /** ID of the application-owned profiles popup. */\n @Prop() profileControls: string | undefined;\n /** Whether the product-area menu is open. */\n @Prop() areaExpanded: boolean = false;\n /** Whether the profiles popup is open. */\n @Prop() profileExpanded: boolean = false;\n /** Empty informational profile popups use dialog semantics instead of a menu. */\n @Prop() profilePopup: 'menu' | 'dialog' = 'menu';\n /** Replace sentence fragments and controls with skeletons inside the same card. */\n @Prop() isLoading: boolean = false;\n\n /** Requests a popup; the owner supplies choices, open state, and selection. */\n @Event() dsScopeRequest!: EventEmitter<SettingsScopeRequest>;\n\n private request(scope: SettingsScopeRequest['scope'], event: MouseEvent) {\n if (this.isLoading) return;\n this.dsScopeRequest.emit({\n scope,\n anchor: event.currentTarget as HTMLButtonElement,\n originalEvent: event,\n });\n }\n\n render() {\n return (\n <Host aria-busy={this.isLoading ? 'true' : undefined}>\n <div\n class=\"card-settings-scope ds-control-elevation ds-control-elevation--sm\"\n role=\"region\"\n aria-label={this.scopeLabel}\n >\n <ds-skeleton preserveLayout={true} isLoading={this.isLoading}>\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"primary\">\n {this.managingLabel}\n </ds-text>\n </ds-skeleton>\n <ds-skeleton preserveLayout={true} isLoading={this.isLoading}>\n <button\n type=\"button\"\n class=\"card-settings-scope__action ds-text-action ds-focus-ring\"\n aria-haspopup=\"menu\"\n aria-controls={this.areaControls}\n aria-expanded={String(this.areaExpanded)}\n onClick={event => this.request('area', event)}\n >\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"inherit\">\n {this.areaLabel}\n </ds-text>\n </button>\n </ds-skeleton>\n {this.settingsLabel.trim() ? (\n <ds-skeleton preserveLayout={true} isLoading={this.isLoading}>\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"primary\">\n {this.settingsLabel}\n </ds-text>\n </ds-skeleton>\n ) : null}\n <ds-skeleton preserveLayout={true} isLoading={this.isLoading}>\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"primary\">\n {this.forLabel}\n </ds-text>\n </ds-skeleton>\n <ds-skeleton preserveLayout={true} isLoading={this.isLoading}>\n <button\n type=\"button\"\n class=\"card-settings-scope__action ds-text-action ds-focus-ring\"\n aria-haspopup={this.profilePopup}\n aria-controls={this.profileControls}\n aria-expanded={String(this.profileExpanded)}\n onClick={event => this.request('profile', event)}\n >\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"inherit\">\n {this.profileLabel}\n </ds-text>\n </button>\n </ds-skeleton>\n </div>\n </Host>\n );\n }\n}\n",
|
|
352
372
|
"type": "registry:ui"
|
|
353
373
|
}
|
|
354
374
|
]
|
|
@@ -277,8 +277,8 @@
|
|
|
277
277
|
"complexPropertyNote": "Assign these non-primitive values as JavaScript properties: items.",
|
|
278
278
|
"peerDependencies": {
|
|
279
279
|
"required": [
|
|
280
|
-
"@ds-mo/tokens ^8.0.
|
|
281
|
-
"@ds-mo/icons ^8.1.
|
|
280
|
+
"@ds-mo/tokens ^8.0.1",
|
|
281
|
+
"@ds-mo/icons ^8.1.2"
|
|
282
282
|
],
|
|
283
283
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
284
284
|
}
|
|
@@ -239,8 +239,8 @@
|
|
|
239
239
|
"complexPropertyNote": "Assign these non-primitive values as JavaScript properties: definition.",
|
|
240
240
|
"peerDependencies": {
|
|
241
241
|
"required": [
|
|
242
|
-
"@ds-mo/tokens ^8.0.
|
|
243
|
-
"@ds-mo/icons ^8.1.
|
|
242
|
+
"@ds-mo/tokens ^8.0.1",
|
|
243
|
+
"@ds-mo/icons ^8.1.2"
|
|
244
244
|
],
|
|
245
245
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
246
246
|
}
|
|
@@ -217,8 +217,8 @@
|
|
|
217
217
|
},
|
|
218
218
|
"peerDependencies": {
|
|
219
219
|
"required": [
|
|
220
|
-
"@ds-mo/tokens ^8.0.
|
|
221
|
-
"@ds-mo/icons ^8.1.
|
|
220
|
+
"@ds-mo/tokens ^8.0.1",
|
|
221
|
+
"@ds-mo/icons ^8.1.2"
|
|
222
222
|
],
|
|
223
223
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
224
224
|
}
|
|
@@ -429,8 +429,8 @@
|
|
|
429
429
|
},
|
|
430
430
|
"peerDependencies": {
|
|
431
431
|
"required": [
|
|
432
|
-
"@ds-mo/tokens ^8.0.
|
|
433
|
-
"@ds-mo/icons ^8.1.
|
|
432
|
+
"@ds-mo/tokens ^8.0.1",
|
|
433
|
+
"@ds-mo/icons ^8.1.2"
|
|
434
434
|
],
|
|
435
435
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
436
436
|
}
|
|
@@ -337,8 +337,8 @@
|
|
|
337
337
|
},
|
|
338
338
|
"peerDependencies": {
|
|
339
339
|
"required": [
|
|
340
|
-
"@ds-mo/tokens ^8.0.
|
|
341
|
-
"@ds-mo/icons ^8.1.
|
|
340
|
+
"@ds-mo/tokens ^8.0.1",
|
|
341
|
+
"@ds-mo/icons ^8.1.2"
|
|
342
342
|
],
|
|
343
343
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
344
344
|
}
|
|
@@ -163,8 +163,8 @@
|
|
|
163
163
|
},
|
|
164
164
|
"peerDependencies": {
|
|
165
165
|
"required": [
|
|
166
|
-
"@ds-mo/tokens ^8.0.
|
|
167
|
-
"@ds-mo/icons ^8.1.
|
|
166
|
+
"@ds-mo/tokens ^8.0.1",
|
|
167
|
+
"@ds-mo/icons ^8.1.2"
|
|
168
168
|
],
|
|
169
169
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
170
170
|
}
|
|
@@ -281,8 +281,8 @@
|
|
|
281
281
|
},
|
|
282
282
|
"peerDependencies": {
|
|
283
283
|
"required": [
|
|
284
|
-
"@ds-mo/tokens ^8.0.
|
|
285
|
-
"@ds-mo/icons ^8.1.
|
|
284
|
+
"@ds-mo/tokens ^8.0.1",
|
|
285
|
+
"@ds-mo/icons ^8.1.2"
|
|
286
286
|
],
|
|
287
287
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
288
288
|
}
|
|
@@ -128,8 +128,8 @@
|
|
|
128
128
|
},
|
|
129
129
|
"peerDependencies": {
|
|
130
130
|
"required": [
|
|
131
|
-
"@ds-mo/tokens ^8.0.
|
|
132
|
-
"@ds-mo/icons ^8.1.
|
|
131
|
+
"@ds-mo/tokens ^8.0.1",
|
|
132
|
+
"@ds-mo/icons ^8.1.2"
|
|
133
133
|
],
|
|
134
134
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
135
135
|
}
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"required": [
|
|
93
|
-
"@ds-mo/tokens ^8.0.
|
|
94
|
-
"@ds-mo/icons ^8.1.
|
|
93
|
+
"@ds-mo/tokens ^8.0.1",
|
|
94
|
+
"@ds-mo/icons ^8.1.2"
|
|
95
95
|
],
|
|
96
96
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
97
97
|
}
|
|
@@ -369,8 +369,8 @@
|
|
|
369
369
|
"complexPropertyNote": "Assign these non-primitive values as JavaScript properties: fieldOrder, fields, hiddenFieldIds, options.",
|
|
370
370
|
"peerDependencies": {
|
|
371
371
|
"required": [
|
|
372
|
-
"@ds-mo/tokens ^8.0.
|
|
373
|
-
"@ds-mo/icons ^8.1.
|
|
372
|
+
"@ds-mo/tokens ^8.0.1",
|
|
373
|
+
"@ds-mo/icons ^8.1.2"
|
|
374
374
|
],
|
|
375
375
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
376
376
|
}
|
|
@@ -487,8 +487,8 @@
|
|
|
487
487
|
"complexPropertyNote": "Assign these non-primitive values as JavaScript properties: filters, matchModes, values.",
|
|
488
488
|
"peerDependencies": {
|
|
489
489
|
"required": [
|
|
490
|
-
"@ds-mo/tokens ^8.0.
|
|
491
|
-
"@ds-mo/icons ^8.1.
|
|
490
|
+
"@ds-mo/tokens ^8.0.1",
|
|
491
|
+
"@ds-mo/icons ^8.1.2"
|
|
492
492
|
],
|
|
493
493
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
494
494
|
}
|
|
@@ -351,8 +351,8 @@
|
|
|
351
351
|
"complexPropertyNote": "Assign these non-primitive values as JavaScript properties: grouping, options.",
|
|
352
352
|
"peerDependencies": {
|
|
353
353
|
"required": [
|
|
354
|
-
"@ds-mo/tokens ^8.0.
|
|
355
|
-
"@ds-mo/icons ^8.1.
|
|
354
|
+
"@ds-mo/tokens ^8.0.1",
|
|
355
|
+
"@ds-mo/icons ^8.1.2"
|
|
356
356
|
],
|
|
357
357
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
358
358
|
}
|
|
@@ -573,8 +573,8 @@
|
|
|
573
573
|
"complexPropertyNote": "Assign these non-primitive values as JavaScript properties: customizeOptions, customizeSections, fieldOrder, fields, filters, grouping, groupingOptions, hiddenFieldIds, matchModes, pinnedFieldIds, sort, sortColumns, values.",
|
|
574
574
|
"peerDependencies": {
|
|
575
575
|
"required": [
|
|
576
|
-
"@ds-mo/tokens ^8.0.
|
|
577
|
-
"@ds-mo/icons ^8.1.
|
|
576
|
+
"@ds-mo/tokens ^8.0.1",
|
|
577
|
+
"@ds-mo/icons ^8.1.2"
|
|
578
578
|
],
|
|
579
579
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
580
580
|
}
|
|
@@ -418,8 +418,8 @@
|
|
|
418
418
|
"complexPropertyNote": "Assign these non-primitive values as JavaScript properties: views.",
|
|
419
419
|
"peerDependencies": {
|
|
420
420
|
"required": [
|
|
421
|
-
"@ds-mo/tokens ^8.0.
|
|
422
|
-
"@ds-mo/icons ^8.1.
|
|
421
|
+
"@ds-mo/tokens ^8.0.1",
|
|
422
|
+
"@ds-mo/icons ^8.1.2"
|
|
423
423
|
],
|
|
424
424
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
425
425
|
}
|
|
@@ -348,8 +348,8 @@
|
|
|
348
348
|
"complexPropertyNote": "Assign these non-primitive values as JavaScript properties: fields, selectedFieldIds.",
|
|
349
349
|
"peerDependencies": {
|
|
350
350
|
"required": [
|
|
351
|
-
"@ds-mo/tokens ^8.0.
|
|
352
|
-
"@ds-mo/icons ^8.1.
|
|
351
|
+
"@ds-mo/tokens ^8.0.1",
|
|
352
|
+
"@ds-mo/icons ^8.1.2"
|
|
353
353
|
],
|
|
354
354
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
355
355
|
}
|
|
@@ -244,8 +244,8 @@
|
|
|
244
244
|
"complexPropertyNote": "Assign these non-primitive values as JavaScript properties: fields, sort.",
|
|
245
245
|
"peerDependencies": {
|
|
246
246
|
"required": [
|
|
247
|
-
"@ds-mo/tokens ^8.0.
|
|
248
|
-
"@ds-mo/icons ^8.1.
|
|
247
|
+
"@ds-mo/tokens ^8.0.1",
|
|
248
|
+
"@ds-mo/icons ^8.1.2"
|
|
249
249
|
],
|
|
250
250
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
251
251
|
}
|
|
@@ -165,8 +165,8 @@
|
|
|
165
165
|
},
|
|
166
166
|
"peerDependencies": {
|
|
167
167
|
"required": [
|
|
168
|
-
"@ds-mo/tokens ^8.0.
|
|
169
|
-
"@ds-mo/icons ^8.1.
|
|
168
|
+
"@ds-mo/tokens ^8.0.1",
|
|
169
|
+
"@ds-mo/icons ^8.1.2"
|
|
170
170
|
],
|
|
171
171
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
172
172
|
}
|
|
@@ -208,8 +208,8 @@
|
|
|
208
208
|
},
|
|
209
209
|
"peerDependencies": {
|
|
210
210
|
"required": [
|
|
211
|
-
"@ds-mo/tokens ^8.0.
|
|
212
|
-
"@ds-mo/icons ^8.1.
|
|
211
|
+
"@ds-mo/tokens ^8.0.1",
|
|
212
|
+
"@ds-mo/icons ^8.1.2"
|
|
213
213
|
],
|
|
214
214
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
215
215
|
}
|
|
@@ -194,8 +194,8 @@
|
|
|
194
194
|
},
|
|
195
195
|
"peerDependencies": {
|
|
196
196
|
"required": [
|
|
197
|
-
"@ds-mo/tokens ^8.0.
|
|
198
|
-
"@ds-mo/icons ^8.1.
|
|
197
|
+
"@ds-mo/tokens ^8.0.1",
|
|
198
|
+
"@ds-mo/icons ^8.1.2"
|
|
199
199
|
],
|
|
200
200
|
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
201
201
|
}
|