@ds-mo/ui 14.20.0 → 14.22.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 +8 -4
- package/dist/agent.json +447 -44
- package/dist/angular/ds-bar-title.d.ts +1 -1
- package/dist/angular/ds-bar-title.js +3 -3
- package/dist/angular/ds-chip.d.ts +1 -1
- package/dist/angular/ds-chip.js +3 -3
- package/dist/angular/ds-filter-menu.d.ts +7 -1
- package/dist/angular/ds-filter-menu.js +7 -4
- package/dist/angular/ds-input.d.ts +1 -1
- package/dist/angular/ds-input.js +3 -3
- package/dist/angular/ds-panel-nav.d.ts +7 -1
- package/dist/angular/ds-panel-nav.js +7 -4
- package/dist/angular/ds-shell-app.d.ts +7 -1
- package/dist/angular/ds-shell-app.js +7 -4
- package/dist/angular/ds-shell-page.d.ts +1 -1
- package/dist/angular/ds-shell-page.js +3 -3
- package/dist/angular/ds-tab-group.d.ts +1 -1
- package/dist/angular/ds-tab-group.js +3 -3
- package/dist/angular/ds-table-filter.d.ts +7 -1
- package/dist/angular/ds-table-filter.js +7 -4
- package/dist/angular/ds-table-group.d.ts +29 -0
- package/dist/angular/ds-table-group.js +48 -0
- package/dist/angular/ds-table-search.d.ts +20 -0
- package/dist/angular/ds-table-search.js +49 -0
- package/dist/angular/ds-table.d.ts +1 -1
- package/dist/angular/ds-table.js +3 -3
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.js +2 -0
- package/dist/angular/proxies.d.ts +2 -0
- package/dist/angular/proxies.js +2 -0
- 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-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-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-unfilled.js +1 -1
- package/dist/components/ds-card-chart.js +1 -1
- package/dist/components/ds-card-overview.js +1 -1
- package/dist/components/ds-card-setting.js +1 -1
- package/dist/components/ds-chart-legend.js +1 -1
- package/dist/components/ds-chart.js +1 -1
- package/dist/components/ds-checkbox.js +1 -1
- package/dist/components/ds-chip.js +1 -1
- package/dist/components/ds-chip.js.map +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-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-input.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-composer.js +1 -1
- package/dist/components/ds-message-scroller.js +1 -1
- package/dist/components/ds-message-scroller.js.map +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-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-tool-search.js.map +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.js +1 -1
- package/dist/components/ds-select.js +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-slider.js +1 -1
- package/dist/components/ds-swatch-picker.js +1 -1
- package/dist/components/ds-tab-group.js +1 -1
- package/dist/components/ds-table-filter.js +1 -1
- package/dist/components/ds-table-filter.js.map +1 -1
- package/dist/components/ds-table-group.d.ts +11 -0
- package/dist/components/ds-table-group.js +2 -0
- package/dist/components/ds-table-group.js.map +1 -0
- package/dist/components/ds-table-saved-views.js +1 -1
- package/dist/components/ds-table-search.d.ts +11 -0
- package/dist/components/ds-table-search.js +2 -0
- package/dist/components/ds-table-search.js.map +1 -0
- package/dist/components/ds-table-sort.js +1 -1
- package/dist/components/ds-table-sort.js.map +1 -1
- package/dist/components/ds-table-toolbar.js +1 -1
- package/dist/components/ds-table-toolbar.js.map +1 -1
- package/dist/components/ds-table.js +1 -1
- package/dist/components/ds-table.js.map +1 -1
- package/dist/components/ds-tag.js +1 -1
- package/dist/components/ds-text.js +1 -1
- package/dist/components/ds-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-Bf7PZJPT.js → p-5Z4oYuiK.js} +2 -2
- package/dist/components/{p-DIlScMvI.js → p-6rB0eAda.js} +2 -2
- package/dist/components/{p-CptSB-tA.js → p-9ykZwPlI.js} +2 -2
- package/dist/components/p-B0OZx3JB.js +2 -0
- package/dist/components/p-B0OZx3JB.js.map +1 -0
- package/dist/components/{p-BHhmB9-4.js → p-B0kSlcaw.js} +2 -2
- package/dist/components/{p-DWjTOoXs.js → p-B1wMpt1z.js} +2 -2
- package/dist/components/p-BEttT0UB.js +2 -0
- package/dist/components/p-BEttT0UB.js.map +1 -0
- package/dist/components/p-BFit8o0r.js +2 -0
- package/dist/components/p-BFit8o0r.js.map +1 -0
- package/dist/components/{p-fRDzpfi9.js → p-BXv6RpoF.js} +2 -2
- package/dist/components/{p-D7QlTWbN.js → p-BbG7nOcz.js} +2 -2
- package/dist/components/{p-Bx5BSd6F.js → p-BcxidW9k.js} +2 -2
- package/dist/components/{p-1UAVanY9.js → p-Bd8I2oXN.js} +2 -2
- package/dist/components/{p-DGe5oXR0.js → p-Bjq1KP_Y.js} +2 -2
- package/dist/components/p-Bjq1KP_Y.js.map +1 -0
- package/dist/components/{p-DW5Ita-P.js → p-BnTPuV3x.js} +2 -2
- package/dist/components/{p-DW5Ita-P.js.map → p-BnTPuV3x.js.map} +1 -1
- package/dist/components/p-BqVXMEJm.js +2 -0
- package/dist/components/p-BqVXMEJm.js.map +1 -0
- package/dist/components/p-CB3fv_Oh.js +2 -0
- package/dist/components/p-CB3fv_Oh.js.map +1 -0
- package/dist/components/{p-DdH7b4JF.js → p-CBymzuOO.js} +2 -2
- package/dist/components/{p-BjRD57w3.js → p-CE2b5GPu.js} +2 -2
- package/dist/components/{p-DBYv7fRq.js → p-CFkZSDwI.js} +2 -2
- package/dist/components/{p-Bb4KnRy0.js → p-CTH3dSYg.js} +2 -2
- package/dist/components/{p-BmssRAEZ.js → p-CZ144LS5.js} +2 -2
- package/dist/components/{p-B-HsfQOK.js → p-Cd1JnnVK.js} +2 -2
- package/dist/components/p-CeKa4VbU.js +2 -0
- package/dist/components/{p-AtUP95E_.js.map → p-CeKa4VbU.js.map} +1 -1
- package/dist/components/{p-CDw_WEVt.js → p-Cnsvgx1M.js} +2 -2
- package/dist/components/{p-BYFS2qWb.js → p-CpeJMKJ5.js} +2 -2
- package/dist/components/{p-DM1Z_hh0.js → p-D36EmETH.js} +2 -2
- package/dist/components/p-D9wZlB_N.js +2 -0
- package/dist/components/p-D9wZlB_N.js.map +1 -0
- package/dist/components/{p-DFC0sRM-.js → p-DI8DUozc.js} +2 -2
- package/dist/components/{p-v4oqkJms.js → p-DSy1oOnd.js} +2 -2
- package/dist/components/{p-v4oqkJms.js.map → p-DSy1oOnd.js.map} +1 -1
- package/dist/components/{p-DQBT1Jkf.js → p-DbLLH3hr.js} +2 -2
- package/dist/components/{p-B2FT4Da6.js → p-De0qjzPu.js} +2 -2
- package/dist/components/{p-B6rSDhJY.js → p-Dit6JmAK.js} +2 -2
- package/dist/components/p-DnZ7DNaz.js +2 -0
- package/dist/components/p-DnZ7DNaz.js.map +1 -0
- package/dist/components/{p-caLOcQUK.js → p-DzPtYdXy.js} +2 -2
- package/dist/components/{p-Do8wbFff.js → p-XaCYqck3.js} +2 -2
- package/dist/components/{p-L8IIeDXM.js → p-_C-XRpCB.js} +2 -2
- package/dist/components/{p-CyZqk196.js → p-bHnk8t5I.js} +2 -2
- package/dist/components/p-hYjmOPCI.js +2 -0
- package/dist/components/p-hYjmOPCI.js.map +1 -0
- package/dist/components/{p-ChfVRPHw.js → p-pUOA3iDG.js} +2 -2
- package/dist/components/{p-DLbHgbVj.js → p-pnO8tAYB.js} +2 -2
- package/dist/components/{p-CCmgtju-.js → p-pxN8JGEh.js} +2 -2
- package/dist/components/p-pxN8JGEh.js.map +1 -0
- package/dist/components/{p-B4wTnsUL.js → p-w9fkkwL2.js} +2 -2
- package/dist/components/p-x5u5Ueli.js +2 -0
- package/dist/components/{p-BeA6Jv-3.js.map → p-x5u5Ueli.js.map} +1 -1
- package/dist/docs/components.json +1582 -45
- package/dist/lib/components/BarTitle/bar-title-types.d.ts +1 -0
- package/dist/lib/components/Menu/menu-placement.d.ts +13 -0
- package/dist/lib/components/PanelNav/panel-nav-types.d.ts +19 -0
- package/dist/lib/components/ShellApp/shell-app-types.d.ts +1 -0
- package/dist/lib/components/ShellPage/shell-page-types.d.ts +1 -0
- package/dist/lib/shell/index.d.ts +3 -3
- package/dist/lib/shell/index.js.map +2 -2
- package/dist/mcp-data/registry/bar-title.json +25 -4
- package/dist/mcp-data/registry/button-filled.json +1 -0
- package/dist/mcp-data/registry/button-unfilled.json +1 -0
- package/dist/mcp-data/registry/chip.json +39 -2
- package/dist/mcp-data/registry/filter-menu.json +84 -11
- package/dist/mcp-data/registry/input.json +54 -2
- package/dist/mcp-data/registry/menu.json +1 -1
- package/dist/mcp-data/registry/panel-nav.json +71 -10
- package/dist/mcp-data/registry/panel-tool-search.json +4 -5
- package/dist/mcp-data/registry/registry.json +452 -43
- package/dist/mcp-data/registry/select.json +1 -0
- package/dist/mcp-data/registry/shell-app.json +47 -5
- package/dist/mcp-data/registry/shell-page.json +25 -5
- package/dist/mcp-data/registry/tab-group.json +21 -2
- package/dist/mcp-data/registry/table-filter.json +79 -9
- package/dist/mcp-data/registry/table-group.json +301 -0
- package/dist/mcp-data/registry/table-search.json +343 -0
- package/dist/mcp-data/registry/table-sort.json +1 -1
- package/dist/mcp-data/registry/table-toolbar.json +7 -6
- package/dist/mcp-data/registry/table.json +55 -17
- package/dist/react/components.d.ts +2 -0
- package/dist/react/components.js +2 -0
- package/dist/react/ds-filter-menu.d.ts +2 -1
- package/dist/react/ds-filter-menu.js +1 -0
- package/dist/react/ds-panel-nav.d.ts +2 -1
- package/dist/react/ds-panel-nav.js +1 -0
- package/dist/react/ds-shell-app.d.ts +2 -1
- package/dist/react/ds-shell-app.js +1 -0
- package/dist/react/ds-table-filter.d.ts +2 -1
- package/dist/react/ds-table-filter.js +1 -0
- package/dist/react/ds-table-group.d.ts +14 -0
- package/dist/react/ds-table-group.js +16 -0
- package/dist/react/ds-table-search.d.ts +14 -0
- package/dist/react/ds-table-search.js +16 -0
- package/dist/styles/table.css +46 -0
- package/dist/types/components/BarTitle/BarTitle.d.ts +4 -1
- package/dist/types/components/BarTitle/bar-title-types.d.ts +1 -0
- package/dist/types/components/BarTitle/index.d.ts +1 -1
- package/dist/types/components/Chip/Chip.d.ts +5 -0
- package/dist/types/components/FilterMenu/FilterMenu.d.ts +26 -0
- package/dist/types/components/Input/Input.d.ts +6 -0
- package/dist/types/components/Menu/menu-placement.d.ts +13 -0
- package/dist/types/components/PanelNav/PanelNav.d.ts +29 -2
- package/dist/types/components/PanelNav/index.d.ts +2 -2
- package/dist/types/components/PanelNav/panel-nav-types.d.ts +19 -0
- package/dist/types/components/PanelNav/panel-nav-utils.d.ts +10 -2
- package/dist/types/components/ShellApp/ShellApp.d.ts +11 -1
- package/dist/types/components/ShellApp/shell-app-types.d.ts +1 -0
- package/dist/types/components/ShellPage/ShellPage.d.ts +6 -1
- package/dist/types/components/ShellPage/index.d.ts +1 -1
- package/dist/types/components/ShellPage/shell-page-types.d.ts +1 -0
- package/dist/types/components/TabGroup/TabGroup.d.ts +2 -0
- package/dist/types/components/Table/Table.d.ts +6 -0
- package/dist/types/components/Table/index.d.ts +1 -1
- package/dist/types/components/Table/table-cell-model.d.ts +11 -1
- package/dist/types/components/Table/table-highlight.d.ts +12 -0
- package/dist/types/components/Table/table-model.d.ts +6 -5
- package/dist/types/components/Table/table-render-model.d.ts +1 -1
- package/dist/types/components/Table/table-row-view.d.ts +4 -1
- package/dist/types/components/Table/table-types.d.ts +22 -4
- package/dist/types/components/Table/table-virtual-model.d.ts +2 -0
- package/dist/types/components/TableFilter/TableFilter.d.ts +9 -1
- package/dist/types/components/TableGroup/TableGroup.d.ts +60 -0
- package/dist/types/components/TableSearch/TableSearch.d.ts +56 -0
- package/dist/types/components/TableSearch/table-search-model.d.ts +10 -0
- package/dist/types/components/TableSearch/table-search-types.d.ts +10 -0
- package/dist/types/components.d.ts +459 -14
- package/dist/types/shell/index.d.ts +3 -3
- package/dist/types/utils/choice-list-parts.d.ts +11 -1
- package/dist/types/utils/select-controller.d.ts +1 -1
- package/dist/vue/components.d.ts +2 -0
- package/dist/vue/components.js +2 -0
- package/dist/vue/ds-bar-title.js +1 -0
- package/dist/vue/ds-chip.js +2 -0
- package/dist/vue/ds-filter-menu.js +5 -0
- package/dist/vue/ds-input.js +3 -0
- package/dist/vue/ds-panel-nav.js +4 -0
- package/dist/vue/ds-shell-app.js +3 -0
- package/dist/vue/ds-shell-page.js +1 -0
- package/dist/vue/ds-tab-group.js +1 -0
- package/dist/vue/ds-table-filter.js +5 -0
- package/dist/vue/ds-table-group.d.ts +3 -0
- package/dist/vue/ds-table-group.js +20 -0
- package/dist/vue/ds-table-search.d.ts +3 -0
- package/dist/vue/ds-table-search.js +22 -0
- package/dist/vue/ds-table.js +2 -0
- package/package.json +1 -1
- package/dist/components/p-AtUP95E_.js +0 -2
- package/dist/components/p-B5-R5mb8.js +0 -2
- package/dist/components/p-B5-R5mb8.js.map +0 -1
- package/dist/components/p-BUexfjjg.js +0 -2
- package/dist/components/p-BUexfjjg.js.map +0 -1
- package/dist/components/p-BeA6Jv-3.js +0 -2
- package/dist/components/p-BkelrY4-.js +0 -2
- package/dist/components/p-BkelrY4-.js.map +0 -1
- package/dist/components/p-CCmgtju-.js.map +0 -1
- package/dist/components/p-DA5H_Iq_.js +0 -2
- package/dist/components/p-DA5H_Iq_.js.map +0 -1
- package/dist/components/p-DGe5oXR0.js.map +0 -1
- package/dist/components/p-DKt_8s-U.js +0 -2
- package/dist/components/p-DKt_8s-U.js.map +0 -1
- package/dist/components/p-DfDoqOlx.js +0 -2
- package/dist/components/p-DfDoqOlx.js.map +0 -1
- package/dist/components/p-rw0ZxIE4.js +0 -2
- package/dist/components/p-rw0ZxIE4.js.map +0 -1
- /package/dist/components/{p-Bf7PZJPT.js.map → p-5Z4oYuiK.js.map} +0 -0
- /package/dist/components/{p-DIlScMvI.js.map → p-6rB0eAda.js.map} +0 -0
- /package/dist/components/{p-CptSB-tA.js.map → p-9ykZwPlI.js.map} +0 -0
- /package/dist/components/{p-BHhmB9-4.js.map → p-B0kSlcaw.js.map} +0 -0
- /package/dist/components/{p-DWjTOoXs.js.map → p-B1wMpt1z.js.map} +0 -0
- /package/dist/components/{p-fRDzpfi9.js.map → p-BXv6RpoF.js.map} +0 -0
- /package/dist/components/{p-D7QlTWbN.js.map → p-BbG7nOcz.js.map} +0 -0
- /package/dist/components/{p-Bx5BSd6F.js.map → p-BcxidW9k.js.map} +0 -0
- /package/dist/components/{p-1UAVanY9.js.map → p-Bd8I2oXN.js.map} +0 -0
- /package/dist/components/{p-DdH7b4JF.js.map → p-CBymzuOO.js.map} +0 -0
- /package/dist/components/{p-BjRD57w3.js.map → p-CE2b5GPu.js.map} +0 -0
- /package/dist/components/{p-DBYv7fRq.js.map → p-CFkZSDwI.js.map} +0 -0
- /package/dist/components/{p-Bb4KnRy0.js.map → p-CTH3dSYg.js.map} +0 -0
- /package/dist/components/{p-BmssRAEZ.js.map → p-CZ144LS5.js.map} +0 -0
- /package/dist/components/{p-B-HsfQOK.js.map → p-Cd1JnnVK.js.map} +0 -0
- /package/dist/components/{p-CDw_WEVt.js.map → p-Cnsvgx1M.js.map} +0 -0
- /package/dist/components/{p-BYFS2qWb.js.map → p-CpeJMKJ5.js.map} +0 -0
- /package/dist/components/{p-DM1Z_hh0.js.map → p-D36EmETH.js.map} +0 -0
- /package/dist/components/{p-DFC0sRM-.js.map → p-DI8DUozc.js.map} +0 -0
- /package/dist/components/{p-DQBT1Jkf.js.map → p-DbLLH3hr.js.map} +0 -0
- /package/dist/components/{p-B2FT4Da6.js.map → p-De0qjzPu.js.map} +0 -0
- /package/dist/components/{p-B6rSDhJY.js.map → p-Dit6JmAK.js.map} +0 -0
- /package/dist/components/{p-caLOcQUK.js.map → p-DzPtYdXy.js.map} +0 -0
- /package/dist/components/{p-Do8wbFff.js.map → p-XaCYqck3.js.map} +0 -0
- /package/dist/components/{p-L8IIeDXM.js.map → p-_C-XRpCB.js.map} +0 -0
- /package/dist/components/{p-CyZqk196.js.map → p-bHnk8t5I.js.map} +0 -0
- /package/dist/components/{p-ChfVRPHw.js.map → p-pUOA3iDG.js.map} +0 -0
- /package/dist/components/{p-DLbHgbVj.js.map → p-pnO8tAYB.js.map} +0 -0
- /package/dist/components/{p-B4wTnsUL.js.map → p-w9fkkwL2.js.map} +0 -0
|
@@ -56,10 +56,12 @@
|
|
|
56
56
|
],
|
|
57
57
|
"states": [
|
|
58
58
|
"Every size applies one complete control-density recipe across frame height, inline padding, icon zones, text-container inset, gap, and radius; supporting error content follows the shared 4px field flow.",
|
|
59
|
-
"The normal field boundary uses the shared secondary inset border. Focus promotes it to the thicker bold-brand inset stroke, while error uses the thicker bold-negative inset stroke without changing geometry. Set hasBorder to false only in chrome that supplies enough surrounding structure;
|
|
59
|
+
"The normal field boundary uses the shared secondary inset border. Focus promotes it to the thicker bold-brand inset stroke, while error uses the thicker bold-negative inset stroke without changing geometry. Set hasBorder to false only in chrome that supplies enough surrounding structure; set hasInteractionFill to false when that containing chrome also owns hover and pressed feedback.",
|
|
60
60
|
"Placeholder text is secondary at rest and quaternary while the editable field is focused because it becomes decorative once typing begins. Single-line placeholder and entered value text truncate with an ellipsis when the field is narrower than its content.",
|
|
61
61
|
"Entered values use the parent surface's primary foreground; prefix icons, suffix content, and resting placeholder text use its secondary foreground.",
|
|
62
62
|
"Search fields show a standard borderless CrossCircle icon action only while they contain a value. Clearing emits the empty value and restores focus to the native field.",
|
|
63
|
+
"Search fields disable browser autocomplete history, automatic capitalization, autocorrection, and spellchecking by default so browser-owned suggestions do not compete with product-owned results. Consumers can explicitly provide autoComplete when a different native history behavior is required.",
|
|
64
|
+
"Search fields used with owned result sets forward aria-controls and aria-activedescendant to the native field so keyboard focus can remain in the query while assistive technology tracks the active result.",
|
|
63
65
|
"The suffix slot is for compact units or decorations. The optional leading icon is decorative and does not replace the field label.",
|
|
64
66
|
"Use autoComplete, inputMode, and enterKeyHint to provide browser and virtual-keyboard hints without changing the value's semantic type.",
|
|
65
67
|
"Number fields preserve native spinbutton semantics, keyboard stepping, and min/max constraint behavior while dsChange continues to report the native string value. Two borderless inset chevron actions split the available inner height, disable independently at their numeric bound, and restore focus to the spinbutton after pointer activation.",
|
|
@@ -100,6 +102,22 @@
|
|
|
100
102
|
},
|
|
101
103
|
"api": {
|
|
102
104
|
"props": {
|
|
105
|
+
"ariaActiveDescendant": {
|
|
106
|
+
"type": "string | undefined",
|
|
107
|
+
"resolvedType": "string | undefined",
|
|
108
|
+
"attribute": "aria-activedescendant",
|
|
109
|
+
"required": false,
|
|
110
|
+
"mutable": false,
|
|
111
|
+
"description": "Identifies the active descendant while focus remains in the editable field."
|
|
112
|
+
},
|
|
113
|
+
"ariaControls": {
|
|
114
|
+
"type": "string | undefined",
|
|
115
|
+
"resolvedType": "string | undefined",
|
|
116
|
+
"attribute": "aria-controls",
|
|
117
|
+
"required": false,
|
|
118
|
+
"mutable": false,
|
|
119
|
+
"description": "Identifies the results or popup controlled by the editable field."
|
|
120
|
+
},
|
|
103
121
|
"ariaDescribedby": {
|
|
104
122
|
"type": "string | undefined",
|
|
105
123
|
"resolvedType": "string | undefined",
|
|
@@ -194,6 +212,15 @@
|
|
|
194
212
|
"mutable": false,
|
|
195
213
|
"description": "Show the standard inset border, including focused and invalid strokes."
|
|
196
214
|
},
|
|
215
|
+
"hasInteractionFill": {
|
|
216
|
+
"type": "boolean",
|
|
217
|
+
"resolvedType": "boolean",
|
|
218
|
+
"attribute": "has-interaction-fill",
|
|
219
|
+
"default": "true",
|
|
220
|
+
"required": false,
|
|
221
|
+
"mutable": false,
|
|
222
|
+
"description": "Show the standard hover and pressed fill when the field is not embedded in interactive chrome."
|
|
223
|
+
},
|
|
197
224
|
"icon": {
|
|
198
225
|
"type": "string | undefined",
|
|
199
226
|
"resolvedType": "string | undefined",
|
|
@@ -359,6 +386,22 @@
|
|
|
359
386
|
"slots": []
|
|
360
387
|
},
|
|
361
388
|
"props": {
|
|
389
|
+
"ariaActiveDescendant": {
|
|
390
|
+
"type": "string | undefined",
|
|
391
|
+
"resolvedType": "string | undefined",
|
|
392
|
+
"attribute": "aria-activedescendant",
|
|
393
|
+
"required": false,
|
|
394
|
+
"mutable": false,
|
|
395
|
+
"description": "Identifies the active descendant while focus remains in the editable field."
|
|
396
|
+
},
|
|
397
|
+
"ariaControls": {
|
|
398
|
+
"type": "string | undefined",
|
|
399
|
+
"resolvedType": "string | undefined",
|
|
400
|
+
"attribute": "aria-controls",
|
|
401
|
+
"required": false,
|
|
402
|
+
"mutable": false,
|
|
403
|
+
"description": "Identifies the results or popup controlled by the editable field."
|
|
404
|
+
},
|
|
362
405
|
"ariaDescribedby": {
|
|
363
406
|
"type": "string | undefined",
|
|
364
407
|
"resolvedType": "string | undefined",
|
|
@@ -453,6 +496,15 @@
|
|
|
453
496
|
"mutable": false,
|
|
454
497
|
"description": "Show the standard inset border, including focused and invalid strokes."
|
|
455
498
|
},
|
|
499
|
+
"hasInteractionFill": {
|
|
500
|
+
"type": "boolean",
|
|
501
|
+
"resolvedType": "boolean",
|
|
502
|
+
"attribute": "has-interaction-fill",
|
|
503
|
+
"default": "true",
|
|
504
|
+
"required": false,
|
|
505
|
+
"mutable": false,
|
|
506
|
+
"description": "Show the standard hover and pressed fill when the field is not embedded in interactive chrome."
|
|
507
|
+
},
|
|
456
508
|
"icon": {
|
|
457
509
|
"type": "string | undefined",
|
|
458
510
|
"resolvedType": "string | undefined",
|
|
@@ -668,7 +720,7 @@
|
|
|
668
720
|
},
|
|
669
721
|
{
|
|
670
722
|
"path": "src/wc/components/Input/Input.tsx",
|
|
671
|
-
"content": "import {\n AttachInternals,\n Component,\n Prop,\n State,\n Event,\n EventEmitter,\n Element,\n Method,\n Watch,\n h,\n Host,\n} from '@stencil/core';\nimport {\n controlWidthClass,\n CONTROL_TEXT_VARIANT,\n DEFAULT_REQUIRED_MESSAGE,\n restoreStringFormState,\n setFormControlValue,\n setRequiredValidity,\n type ControlWidth,\n} from '../../utils';\n\nexport type InputType = 'text' | 'email' | 'tel' | 'url' | 'search' | 'password' | 'number';\nexport type InputSize = 'lg' | 'md' | 'sm' | 'xs';\nexport type InputWidth = ControlWidth;\nexport type InputTextAlign = 'start' | 'end';\n\nconst ICON_SIZE: Record<InputSize, 'lg' | 'md' | 'sm' | 'xs'> = {\n lg: 'lg',\n md: 'md',\n sm: 'sm',\n xs: 'xs',\n};\n\nconst CLEAR_BUTTON_SIZE: Record<InputSize, 'md' | 'sm' | 'xs'> = {\n lg: 'md',\n md: 'sm',\n sm: 'xs',\n xs: 'xs',\n};\n\nlet idCounter = 0;\n\n@Component({\n tag: 'ds-input',\n styleUrl: 'Input.css',\n scoped: true,\n formAssociated: true,\n})\nexport class Input {\n @Element() el!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n private generatedId = `ds-input-${++idCounter}`;\n private errorId = `${this.generatedId}-error`;\n\n @Prop({ mutable: true }) value: string = '';\n @Prop({ reflect: true }) name: string | undefined;\n @Prop({ reflect: true }) form: string | undefined;\n @Prop({ reflect: true }) disabled: boolean = false;\n /** Keeps the value focusable and submittable while preventing edits. */\n @Prop({ reflect: true }) readOnly: boolean = false;\n @Prop({ reflect: true }) required: boolean = false;\n @Prop() requiredMessage: string = DEFAULT_REQUIRED_MESSAGE;\n @Prop() clearLabel: string = 'Clear';\n @Prop() placeholder: string | undefined;\n @Prop() type: InputType = 'text';\n /** Minimum accepted value when type is number. */\n @Prop() min: number | undefined;\n /** Maximum accepted value when type is number. */\n @Prop() max: number | undefined;\n /** Numeric increment used by native stepping and constraint validation. */\n @Prop() step: number | undefined;\n /** Align the editable value; number steppers follow the same inline edge. */\n @Prop() textAlign: InputTextAlign = 'start';\n /** Native browser autofill hint. */\n @Prop({ attribute: 'autocomplete' }) autoComplete: string | undefined;\n /** Preferred virtual keyboard without changing the value semantics. */\n @Prop({ attribute: 'inputmode' }) inputMode: string = '';\n /** Preferred virtual-keyboard action label. */\n @Prop({ attribute: 'enterkeyhint' }) enterKeyHint: string = '';\n /** Control density. */\n @Prop() size: InputSize = 'md';\n /** Width fit — fill the parent (default) or hug the available content. */\n @Prop() width: InputWidth = 'fill';\n /** Show the standard inset border, including focused and invalid strokes. */\n @Prop() hasBorder: boolean = true;\n /** Optional leading icon name. */\n @Prop() icon: string | undefined;\n @Prop() isInactive: boolean = false;\n @Prop() autoFocus: boolean = false;\n @Prop() error: boolean = false;\n @Prop() errorMessage: string | undefined;\n /** Associates the internal input with an external <label>. */\n @Prop() inputId: string | undefined;\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n @Prop({ attribute: 'aria-labelledby' }) ariaLabelledby: string | undefined;\n @Prop({ attribute: 'aria-describedby' }) ariaDescribedby: string | undefined;\n\n @Event() dsChange!: EventEmitter<string>;\n @Event() dsClear!: EventEmitter<void>;\n\n private initialValue = '';\n private inputEl?: HTMLInputElement;\n @State() private formDisabled = false;\n @State() private hasSuffix = false;\n @State() private focused = false;\n @State() private touched = false;\n\n componentWillLoad() {\n this.initialValue = this.value;\n this.hasSuffix = Boolean(this.el.querySelector('[slot=\"suffix\"]'));\n this.syncFormValue();\n }\n\n componentDidRender() {\n const hasSuffix = Boolean(this.el.querySelector('[slot=\"suffix\"]'));\n if (hasSuffix !== this.hasSuffix) this.hasSuffix = hasSuffix;\n }\n\n @Watch('value')\n @Watch('disabled')\n @Watch('isInactive')\n @Watch('required')\n syncFormValue() {\n const inactive = this.isInactive || this.disabled || this.formDisabled;\n setFormControlValue(this.internals, this.value, { inactive });\n const missing = this.required && !inactive && this.value.length === 0;\n setRequiredValidity(this.internals, missing, this.requiredMessage);\n }\n\n formDisabledCallback(disabled: boolean) {\n this.formDisabled = disabled;\n this.syncFormValue();\n }\n\n formResetCallback() {\n this.value = this.initialValue;\n }\n\n formStateRestoreCallback(state: string | File | FormData | null) {\n this.value = restoreStringFormState(state);\n }\n\n @Method()\n async setFocus() {\n this.inputEl?.focus();\n }\n\n private handleInput = (e: Event) => {\n this.value = (e.target as HTMLInputElement).value;\n this.dsChange.emit(this.value);\n };\n\n private handleFocus = () => {\n this.focused = true;\n };\n\n private handleBlur = () => {\n this.focused = false;\n this.touched = true;\n };\n\n private handleClear = () => {\n this.value = '';\n this.dsChange.emit('');\n this.dsClear.emit();\n this.inputEl?.focus();\n };\n\n private numericStepDisabled(direction: 1 | -1): boolean {\n if (this.value.trim() === '') return false;\n const value = Number(this.value);\n if (!Number.isFinite(value)) return false;\n if (direction > 0 && this.max !== undefined) return value >= this.max;\n if (direction < 0 && this.min !== undefined) return value <= this.min;\n return false;\n }\n\n private handleNumericStep = (direction: 1 | -1) => {\n const input = this.inputEl;\n if (!input || input.disabled || input.readOnly || this.numericStepDisabled(direction)) return;\n\n const previous = input.value;\n if (direction > 0) input.stepUp();\n else input.stepDown();\n input.focus({ preventScroll: true });\n if (input.value === previous) return;\n\n this.value = input.value;\n this.dsChange.emit(this.value);\n };\n\n private renderNumericStepper(inactive: boolean) {\n const incrementDisabled = inactive || this.readOnly || this.numericStepDisabled(1);\n const decrementDisabled = inactive || this.readOnly || this.numericStepDisabled(-1);\n\n return (\n <span class=\"input-control__number-stepper\">\n <button\n type=\"button\"\n class=\"input-control__number-step input-control__number-step--increment ds-focus-ring-inset ds-interaction-fill\"\n disabled={incrementDisabled}\n tabIndex={-1}\n aria-hidden=\"true\"\n onClick={() => this.handleNumericStep(1)}\n >\n <ds-icon\n class=\"input-control__number-step-icon ds-interaction-fill__content\"\n name=\"ChevronUp\"\n size=\"xs\"\n color=\"inherit\"\n />\n </button>\n <button\n type=\"button\"\n class=\"input-control__number-step input-control__number-step--decrement ds-focus-ring-inset ds-interaction-fill\"\n disabled={decrementDisabled}\n tabIndex={-1}\n aria-hidden=\"true\"\n onClick={() => this.handleNumericStep(-1)}\n >\n <ds-icon\n class=\"input-control__number-step-icon ds-interaction-fill__content\"\n name=\"ChevronDown\"\n size=\"xs\"\n color=\"inherit\"\n />\n </button>\n </span>\n );\n }\n\n render() {\n const inputId = this.inputId ?? this.generatedId;\n const inactive = this.isInactive || this.disabled || this.formDisabled;\n const filled = this.value.length > 0;\n const dirty = this.value !== this.initialValue;\n const showClear = this.type === 'search' && filled && !inactive && !this.readOnly;\n const showError = this.error && Boolean(this.errorMessage);\n const textVariant = CONTROL_TEXT_VARIANT[this.size];\n const iconSize = ICON_SIZE[this.size];\n const numeric = this.type === 'number';\n\n const describedBy =\n [this.ariaDescribedby, showError ? this.errorId : undefined].filter(Boolean).join(' ') ||\n undefined;\n\n return (\n <Host\n class={{\n 'input-host': true,\n 'ds-field-stack': true,\n 'ds-control-inactive': inactive,\n [`ds-control--${this.size}`]: true,\n ...controlWidthClass(this.width),\n }}\n data-disabled={inactive ? '' : undefined}\n data-readonly={this.readOnly ? '' : undefined}\n data-required={this.required ? '' : undefined}\n data-invalid={this.error ? '' : undefined}\n data-filled={filled ? '' : undefined}\n data-focused={this.focused ? '' : undefined}\n data-dirty={dirty ? '' : undefined}\n data-touched={this.touched ? '' : undefined}\n >\n <div\n class={{\n 'input-control': true,\n 'input-control--number': numeric,\n 'input-control--align-start': this.textAlign === 'start',\n 'input-control--align-end': this.textAlign === 'end',\n 'ds-control-frame': true,\n 'input-control--bordered': this.hasBorder,\n 'input-control--error': this.hasBorder && this.error,\n 'ds-interaction-fill': true,\n [`ds-control--${this.size}`]: true,\n }}\n >\n {numeric && this.textAlign === 'end' && this.renderNumericStepper(inactive)}\n {this.icon && (\n <span\n class=\"input-control__prefix ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name={this.icon} size={iconSize} color=\"inherit\" />\n </span>\n )}\n <input\n ref={element => {\n this.inputEl = element;\n }}\n type={this.type}\n id={inputId}\n value={this.value}\n placeholder={this.placeholder}\n min={numeric ? this.min : undefined}\n max={numeric ? this.max : undefined}\n step={numeric ? this.step : undefined}\n disabled={inactive}\n readOnly={this.readOnly}\n required={this.required}\n autoFocus={this.autoFocus}\n autoComplete={this.autoComplete}\n inputMode={this.inputMode || undefined}\n enterKeyHint={this.enterKeyHint || undefined}\n class={`native-input native-input--align-${this.textAlign} ds-control-label-box ds-text--${textVariant.replace('text-', '')} ds-text--regular ds-interaction-fill__content`}\n aria-label={this.ariaLabel}\n aria-labelledby={this.ariaLabelledby}\n aria-describedby={describedBy}\n aria-invalid={this.error ? 'true' : undefined}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n <span\n class={{\n 'input-control__suffix': true,\n 'ds-control-icon-box': true,\n 'input-control__suffix--empty': !this.hasSuffix,\n }}\n >\n <slot name=\"suffix\" />\n </span>\n {showClear && (\n <ds-button-unfilled\n class=\"input-control__clear\"\n variant=\"icon\"\n size={CLEAR_BUTTON_SIZE[this.size]}\n icon=\"CrossCircle\"\n hasBorder={false}\n rounded\n ariaLabel={this.clearLabel}\n onDsClick={this.handleClear}\n />\n )}\n {numeric && this.textAlign === 'start' && this.renderNumericStepper(inactive)}\n </div>\n {showError && (\n <ds-text\n class=\"error-text\"\n as=\"div\"\n variant=\"text-body-small\"\n color=\"negative\"\n textId={this.errorId}\n role=\"alert\"\n >\n {this.errorMessage}\n </ds-text>\n )}\n </Host>\n );\n }\n}\n",
|
|
723
|
+
"content": "import {\n AttachInternals,\n Component,\n Prop,\n State,\n Event,\n EventEmitter,\n Element,\n Method,\n Watch,\n h,\n Host,\n} from '@stencil/core';\nimport {\n controlWidthClass,\n CONTROL_TEXT_VARIANT,\n DEFAULT_REQUIRED_MESSAGE,\n restoreStringFormState,\n setFormControlValue,\n setRequiredValidity,\n type ControlWidth,\n} from '../../utils';\n\nexport type InputType = 'text' | 'email' | 'tel' | 'url' | 'search' | 'password' | 'number';\nexport type InputSize = 'lg' | 'md' | 'sm' | 'xs';\nexport type InputWidth = ControlWidth;\nexport type InputTextAlign = 'start' | 'end';\n\nconst ICON_SIZE: Record<InputSize, 'lg' | 'md' | 'sm' | 'xs'> = {\n lg: 'lg',\n md: 'md',\n sm: 'sm',\n xs: 'xs',\n};\n\nconst CLEAR_BUTTON_SIZE: Record<InputSize, 'md' | 'sm' | 'xs'> = {\n lg: 'md',\n md: 'sm',\n sm: 'xs',\n xs: 'xs',\n};\n\nlet idCounter = 0;\n\n@Component({\n tag: 'ds-input',\n styleUrl: 'Input.css',\n scoped: true,\n formAssociated: true,\n})\nexport class Input {\n @Element() el!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n private generatedId = `ds-input-${++idCounter}`;\n private errorId = `${this.generatedId}-error`;\n\n @Prop({ mutable: true }) value: string = '';\n @Prop({ reflect: true }) name: string | undefined;\n @Prop({ reflect: true }) form: string | undefined;\n @Prop({ reflect: true }) disabled: boolean = false;\n /** Keeps the value focusable and submittable while preventing edits. */\n @Prop({ reflect: true }) readOnly: boolean = false;\n @Prop({ reflect: true }) required: boolean = false;\n @Prop() requiredMessage: string = DEFAULT_REQUIRED_MESSAGE;\n @Prop() clearLabel: string = 'Clear';\n @Prop() placeholder: string | undefined;\n @Prop() type: InputType = 'text';\n /** Minimum accepted value when type is number. */\n @Prop() min: number | undefined;\n /** Maximum accepted value when type is number. */\n @Prop() max: number | undefined;\n /** Numeric increment used by native stepping and constraint validation. */\n @Prop() step: number | undefined;\n /** Align the editable value; number steppers follow the same inline edge. */\n @Prop() textAlign: InputTextAlign = 'start';\n /** Native browser autofill hint. */\n @Prop({ attribute: 'autocomplete' }) autoComplete: string | undefined;\n /** Preferred virtual keyboard without changing the value semantics. */\n @Prop({ attribute: 'inputmode' }) inputMode: string = '';\n /** Preferred virtual-keyboard action label. */\n @Prop({ attribute: 'enterkeyhint' }) enterKeyHint: string = '';\n /** Control density. */\n @Prop() size: InputSize = 'md';\n /** Width fit — fill the parent (default) or hug the available content. */\n @Prop() width: InputWidth = 'fill';\n /** Show the standard inset border, including focused and invalid strokes. */\n @Prop() hasBorder: boolean = true;\n /** Show the standard hover and pressed fill when the field is not embedded in interactive chrome. */\n @Prop() hasInteractionFill: boolean = true;\n /** Optional leading icon name. */\n @Prop() icon: string | undefined;\n @Prop() isInactive: boolean = false;\n @Prop() autoFocus: boolean = false;\n @Prop() error: boolean = false;\n @Prop() errorMessage: string | undefined;\n /** Associates the internal input with an external <label>. */\n @Prop() inputId: string | undefined;\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n @Prop({ attribute: 'aria-labelledby' }) ariaLabelledby: string | undefined;\n @Prop({ attribute: 'aria-describedby' }) ariaDescribedby: string | undefined;\n /** Identifies the results or popup controlled by the editable field. */\n @Prop({ attribute: 'aria-controls' }) ariaControls: string | undefined;\n /** Identifies the active descendant while focus remains in the editable field. */\n @Prop({ attribute: 'aria-activedescendant' }) ariaActiveDescendant: string | undefined;\n\n @Event() dsChange!: EventEmitter<string>;\n @Event() dsClear!: EventEmitter<void>;\n\n private initialValue = '';\n private inputEl?: HTMLInputElement;\n @State() private formDisabled = false;\n @State() private hasSuffix = false;\n @State() private focused = false;\n @State() private touched = false;\n\n componentWillLoad() {\n this.initialValue = this.value;\n this.hasSuffix = Boolean(this.el.querySelector('[slot=\"suffix\"]'));\n this.syncFormValue();\n }\n\n componentDidRender() {\n const hasSuffix = Boolean(this.el.querySelector('[slot=\"suffix\"]'));\n if (hasSuffix !== this.hasSuffix) this.hasSuffix = hasSuffix;\n }\n\n @Watch('value')\n @Watch('disabled')\n @Watch('isInactive')\n @Watch('required')\n syncFormValue() {\n const inactive = this.isInactive || this.disabled || this.formDisabled;\n setFormControlValue(this.internals, this.value, { inactive });\n const missing = this.required && !inactive && this.value.length === 0;\n setRequiredValidity(this.internals, missing, this.requiredMessage);\n }\n\n formDisabledCallback(disabled: boolean) {\n this.formDisabled = disabled;\n this.syncFormValue();\n }\n\n formResetCallback() {\n this.value = this.initialValue;\n }\n\n formStateRestoreCallback(state: string | File | FormData | null) {\n this.value = restoreStringFormState(state);\n }\n\n @Method()\n async setFocus() {\n this.inputEl?.focus();\n }\n\n private handleInput = (e: Event) => {\n this.value = (e.target as HTMLInputElement).value;\n this.dsChange.emit(this.value);\n };\n\n private handleFocus = () => {\n this.focused = true;\n };\n\n private handleBlur = () => {\n this.focused = false;\n this.touched = true;\n };\n\n private handleClear = () => {\n this.value = '';\n this.dsChange.emit('');\n this.dsClear.emit();\n this.inputEl?.focus();\n };\n\n private numericStepDisabled(direction: 1 | -1): boolean {\n if (this.value.trim() === '') return false;\n const value = Number(this.value);\n if (!Number.isFinite(value)) return false;\n if (direction > 0 && this.max !== undefined) return value >= this.max;\n if (direction < 0 && this.min !== undefined) return value <= this.min;\n return false;\n }\n\n private handleNumericStep = (direction: 1 | -1) => {\n const input = this.inputEl;\n if (!input || input.disabled || input.readOnly || this.numericStepDisabled(direction)) return;\n\n const previous = input.value;\n if (direction > 0) input.stepUp();\n else input.stepDown();\n input.focus({ preventScroll: true });\n if (input.value === previous) return;\n\n this.value = input.value;\n this.dsChange.emit(this.value);\n };\n\n private renderNumericStepper(inactive: boolean) {\n const incrementDisabled = inactive || this.readOnly || this.numericStepDisabled(1);\n const decrementDisabled = inactive || this.readOnly || this.numericStepDisabled(-1);\n\n return (\n <span class=\"input-control__number-stepper\">\n <button\n type=\"button\"\n class=\"input-control__number-step input-control__number-step--increment ds-focus-ring-inset ds-interaction-fill\"\n disabled={incrementDisabled}\n tabIndex={-1}\n aria-hidden=\"true\"\n onClick={() => this.handleNumericStep(1)}\n >\n <ds-icon\n class=\"input-control__number-step-icon ds-interaction-fill__content\"\n name=\"ChevronUp\"\n size=\"xs\"\n color=\"inherit\"\n />\n </button>\n <button\n type=\"button\"\n class=\"input-control__number-step input-control__number-step--decrement ds-focus-ring-inset ds-interaction-fill\"\n disabled={decrementDisabled}\n tabIndex={-1}\n aria-hidden=\"true\"\n onClick={() => this.handleNumericStep(-1)}\n >\n <ds-icon\n class=\"input-control__number-step-icon ds-interaction-fill__content\"\n name=\"ChevronDown\"\n size=\"xs\"\n color=\"inherit\"\n />\n </button>\n </span>\n );\n }\n\n render() {\n const inputId = this.inputId ?? this.generatedId;\n const inactive = this.isInactive || this.disabled || this.formDisabled;\n const filled = this.value.length > 0;\n const dirty = this.value !== this.initialValue;\n const showClear = this.type === 'search' && filled && !inactive && !this.readOnly;\n const showError = this.error && Boolean(this.errorMessage);\n const textVariant = CONTROL_TEXT_VARIANT[this.size];\n const iconSize = ICON_SIZE[this.size];\n const numeric = this.type === 'number';\n const resolvedAutoComplete = this.autoComplete ?? (this.type === 'search' ? 'off' : undefined);\n\n const describedBy =\n [this.ariaDescribedby, showError ? this.errorId : undefined].filter(Boolean).join(' ') ||\n undefined;\n\n return (\n <Host\n class={{\n 'input-host': true,\n 'ds-field-stack': true,\n 'ds-control-inactive': inactive,\n [`ds-control--${this.size}`]: true,\n ...controlWidthClass(this.width),\n }}\n data-disabled={inactive ? '' : undefined}\n data-readonly={this.readOnly ? '' : undefined}\n data-required={this.required ? '' : undefined}\n data-invalid={this.error ? '' : undefined}\n data-filled={filled ? '' : undefined}\n data-focused={this.focused ? '' : undefined}\n data-dirty={dirty ? '' : undefined}\n data-touched={this.touched ? '' : undefined}\n >\n <div\n class={{\n 'input-control': true,\n 'input-control--number': numeric,\n 'input-control--align-start': this.textAlign === 'start',\n 'input-control--align-end': this.textAlign === 'end',\n 'ds-control-frame': true,\n 'input-control--bordered': this.hasBorder,\n 'input-control--error': this.hasBorder && this.error,\n 'ds-interaction-fill': this.hasInteractionFill,\n [`ds-control--${this.size}`]: true,\n }}\n >\n {numeric && this.textAlign === 'end' && this.renderNumericStepper(inactive)}\n {this.icon && (\n <span\n class=\"input-control__prefix ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name={this.icon} size={iconSize} color=\"inherit\" />\n </span>\n )}\n <input\n ref={element => {\n this.inputEl = element;\n }}\n type={this.type}\n id={inputId}\n value={this.value}\n placeholder={this.placeholder}\n min={numeric ? this.min : undefined}\n max={numeric ? this.max : undefined}\n step={numeric ? this.step : undefined}\n disabled={inactive}\n readOnly={this.readOnly}\n required={this.required}\n autoFocus={this.autoFocus}\n autoComplete={resolvedAutoComplete}\n autoCapitalize={this.type === 'search' ? 'none' : undefined}\n autoCorrect={this.type === 'search' ? 'off' : undefined}\n spellcheck={this.type === 'search' ? false : undefined}\n inputMode={this.inputMode || undefined}\n enterKeyHint={this.enterKeyHint || undefined}\n class={`native-input native-input--align-${this.textAlign} ds-control-label-box ds-text--${textVariant.replace('text-', '')} ds-text--regular ds-interaction-fill__content`}\n aria-label={this.ariaLabel}\n aria-labelledby={this.ariaLabelledby}\n aria-describedby={describedBy}\n aria-controls={this.ariaControls}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-invalid={this.error ? 'true' : undefined}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n <span\n class={{\n 'input-control__suffix': true,\n 'ds-control-icon-box': true,\n 'input-control__suffix--empty': !this.hasSuffix,\n }}\n >\n <slot name=\"suffix\" />\n </span>\n {showClear && (\n <ds-button-unfilled\n class=\"input-control__clear\"\n variant=\"icon\"\n size={CLEAR_BUTTON_SIZE[this.size]}\n icon=\"CrossCircle\"\n hasBorder={false}\n rounded\n ariaLabel={this.clearLabel}\n onDsClick={this.handleClear}\n />\n )}\n {numeric && this.textAlign === 'start' && this.renderNumericStepper(inactive)}\n </div>\n {showError && (\n <ds-text\n class=\"error-text\"\n as=\"div\"\n variant=\"text-body-small\"\n color=\"negative\"\n textId={this.errorId}\n role=\"alert\"\n >\n {this.errorMessage}\n </ds-text>\n )}\n </Host>\n );\n }\n}\n",
|
|
672
724
|
"type": "registry:ui"
|
|
673
725
|
}
|
|
674
726
|
]
|
|
@@ -533,7 +533,7 @@
|
|
|
533
533
|
},
|
|
534
534
|
{
|
|
535
535
|
"path": "src/wc/components/Menu/menu-placement.ts",
|
|
536
|
-
"content": "import type { ChoicePopupAnchorAlignment } from '../../utils/choice-popup-alignment';\nimport type { MenuAlign, MenuSide } from './menu-position';\n\n/** Placement props bindable on `ds-menu` (side, align, offsets). */\nexport interface MenuPlacement {\n side: MenuSide;\n align: MenuAlign;\n anchorAlignment: ChoicePopupAnchorAlignment;\n sideOffset: number | string;\n alignOffset: number | string;\n}\n\n/**\n * Canonical `ds-menu` placement for the **panel-nav footer user menu**.\n * Anchor from `dsNavUserAction` detail `{ anchor }` (id `ds-panel-nav-user-menu-anchor`).\n *\n * Not for BarNav overflow menus — those use `side=\"bottom\"` / `align=\"end\"` internally.\n * `align: 'end'` bottom-aligns the last choice cell on the anchor; the side offset nudges into the content area:\n * - `sideOffset` space-100 + space-050 (12px): 4px past the panel-nav outer edge (anchor is ~8px inset).\n * - `anchorAlignment: 'choice-cell'`: the shared section inset puts the last row edge on the footer user row.\n */\nexport const PANEL_NAV_USER_MENU_PLACEMENT = {\n side: 'right',\n align: 'end',\n anchorAlignment: 'choice-cell',\n sideOffset: 'calc(var(--dimension-space-100) + var(--dimension-space-050))',\n alignOffset: 0,\n} as const satisfies MenuPlacement;\n\n/**\n * Canonical placement for a menu opened by a PanelTools header action.\n * Matches BarNav overflow: the 32px trigger is 8px inside the 48px header, so\n * a 12px side offset places the popup 4px below the header edge. Choice-cell\n * alignment keeps the final menu item edge aligned with the trigger.\n */\nexport const PANEL_TOOLS_HEADER_MENU_PLACEMENT = {\n side: 'bottom',\n align: 'end',\n anchorAlignment: 'choice-cell',\n sideOffset: 'calc(var(--dimension-space-100) + var(--dimension-space-050))',\n alignOffset: 0,\n} as const satisfies MenuPlacement;\n",
|
|
536
|
+
"content": "import type { ChoicePopupAnchorAlignment } from '../../utils/choice-popup-alignment';\nimport type { MenuAlign, MenuSide } from './menu-position';\n\n/** Placement props bindable on `ds-menu` (side, align, offsets). */\nexport interface MenuPlacement {\n side: MenuSide;\n align: MenuAlign;\n anchorAlignment: ChoicePopupAnchorAlignment;\n sideOffset: number | string;\n alignOffset: number | string;\n}\n\n/**\n * Canonical `ds-menu` placement for the **panel-nav footer user menu**.\n * Anchor from `dsNavUserAction` detail `{ anchor }` (id `ds-panel-nav-user-menu-anchor`).\n *\n * Not for BarNav overflow menus — those use `side=\"bottom\"` / `align=\"end\"` internally.\n * `align: 'end'` bottom-aligns the last choice cell on the anchor; the side offset nudges into the content area:\n * - `sideOffset` space-100 + space-050 (12px): 4px past the panel-nav outer edge (anchor is ~8px inset).\n * - `anchorAlignment: 'choice-cell'`: the shared section inset puts the last row edge on the footer user row.\n */\nexport const PANEL_NAV_USER_MENU_PLACEMENT = {\n side: 'right',\n align: 'end',\n anchorAlignment: 'choice-cell',\n sideOffset: 'calc(var(--dimension-space-100) + var(--dimension-space-050))',\n alignOffset: 0,\n} as const satisfies MenuPlacement;\n\n/**\n * Canonical placement for PanelNav's collapsed child-route flyout.\n * The parent control is 8px inside the panel edge, so a 12px side offset leaves\n * a 4px visual gap outside the panel. Start choice-cell alignment places the\n * first flyout row on the same block axis as its parent control.\n */\nexport const PANEL_NAV_CHILD_MENU_PLACEMENT = {\n side: 'right',\n align: 'start',\n anchorAlignment: 'choice-cell',\n sideOffset: 'calc(var(--dimension-space-100) + var(--dimension-space-050))',\n alignOffset: 0,\n} as const satisfies MenuPlacement;\n\n/**\n * Canonical placement for a menu opened by a PanelTools header action.\n * Matches BarNav overflow: the 32px trigger is 8px inside the 48px header, so\n * a 12px side offset places the popup 4px below the header edge. Choice-cell\n * alignment keeps the final menu item edge aligned with the trigger.\n */\nexport const PANEL_TOOLS_HEADER_MENU_PLACEMENT = {\n side: 'bottom',\n align: 'end',\n anchorAlignment: 'choice-cell',\n sideOffset: 'calc(var(--dimension-space-100) + var(--dimension-space-050))',\n alignOffset: 0,\n} as const satisfies MenuPlacement;\n",
|
|
537
537
|
"type": "registry:ui"
|
|
538
538
|
},
|
|
539
539
|
{
|