@ds-mo/ui 12.6.1 → 12.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -115
- package/dist/.build-stamp +1 -1
- package/dist/agent-patterns.json +5 -3
- package/dist/agent.json +60 -34
- package/dist/angular/ds-menu.d.ts +1 -1
- package/dist/angular/ds-menu.js +3 -3
- package/dist/components/ds-agent-activity.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-bar-nav.js +1 -1
- package/dist/components/ds-bar-nav.js.map +1 -1
- package/dist/components/ds-bar-title.js +1 -1
- package/dist/components/ds-bar-title.js.map +1 -1
- package/dist/components/ds-bar-workflow.js +1 -1
- package/dist/components/ds-bar-workflow.js.map +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-data-viz-bar.js +1 -1
- package/dist/components/ds-card-data-viz-bar.js.map +1 -1
- package/dist/components/ds-card-data-viz-donut.js +1 -1
- package/dist/components/ds-card-data-viz-donut.js.map +1 -1
- package/dist/components/ds-card-data-viz-line.js +1 -1
- package/dist/components/ds-card-data-viz-line.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-shell-data-viz.js +1 -1
- package/dist/components/ds-chart-bar.js +1 -1
- package/dist/components/ds-chart-donut.js +1 -1
- package/dist/components/ds-chart-legend.js +1 -1
- package/dist/components/ds-chart-legend.js.map +1 -1
- package/dist/components/ds-chart-line.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-item.js.map +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-conversation-list.js.map +1 -1
- package/dist/components/ds-empty-state.js +1 -1
- package/dist/components/ds-field.js +1 -1
- package/dist/components/ds-field.js.map +1 -1
- package/dist/components/ds-input.js +1 -1
- package/dist/components/ds-input.js.map +1 -1
- package/dist/components/ds-markdown.js +1 -1
- package/dist/components/ds-menu.js +1 -1
- package/dist/components/ds-message-composer.js +1 -1
- package/dist/components/ds-message-composer.js.map +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-bar-nav.js.map +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-mobile-sheet-nav.js.map +1 -1
- package/dist/components/ds-modal.js +1 -1
- package/dist/components/ds-modal.js.map +1 -1
- package/dist/components/ds-panel-nav.js +1 -1
- package/dist/components/ds-panel-nav.js.map +1 -1
- package/dist/components/ds-panel-sub-nav.js +1 -1
- package/dist/components/ds-panel-sub-nav.js.map +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-radio.js +1 -1
- package/dist/components/ds-radio.js.map +1 -1
- package/dist/components/ds-scroll-overlay.js +1 -1
- package/dist/components/ds-scroll-overlay.js.map +1 -1
- package/dist/components/ds-select-multi.js +1 -1
- package/dist/components/ds-select-multi.js.map +1 -1
- package/dist/components/ds-select.js +1 -1
- package/dist/components/ds-select.js.map +1 -1
- package/dist/components/ds-shell-app.js +1 -1
- package/dist/components/ds-shell-app.js.map +1 -1
- package/dist/components/ds-shell-gradient-picker.js +1 -1
- package/dist/components/ds-shell-gradient-picker.js.map +1 -1
- package/dist/components/ds-shell-gradient-swatch.js +1 -1
- package/dist/components/ds-shell-gradient-swatch.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-shell-tools.js.map +1 -1
- package/dist/components/ds-skeleton.js +1 -1
- package/dist/components/ds-slider.js +1 -1
- package/dist/components/ds-slider.js.map +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-tag.js +1 -1
- package/dist/components/ds-tag.js.map +1 -1
- package/dist/components/ds-text.js +1 -1
- package/dist/components/ds-toast.js +1 -1
- package/dist/components/ds-tooltip-data-viz.js +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/ds-typing-indicator.js +1 -1
- package/dist/components/{p-P5BMmQAc.js → p--eKXTylf.js} +2 -2
- package/dist/components/{p-P5BMmQAc.js.map → p--eKXTylf.js.map} +1 -1
- package/dist/components/p-1darPzys.js +2 -0
- package/dist/components/{p-CLzlL3G4.js.map → p-1darPzys.js.map} +1 -1
- package/dist/components/{p-BHYrsGBw.js → p-5-QAFB4j.js} +2 -2
- package/dist/components/{p-BHYrsGBw.js.map → p-5-QAFB4j.js.map} +1 -1
- package/dist/components/{p-D-xttdpn.js → p-B-9A0e_0.js} +2 -2
- package/dist/components/{p-CaRyxTMz.js → p-BT5hgg5i.js} +2 -2
- package/dist/components/{p-DQDpDYyF.js → p-B_5nxOeB.js} +2 -2
- package/dist/components/p-BcfC6phQ.js +2 -0
- package/dist/components/p-BcfC6phQ.js.map +1 -0
- package/dist/components/{p-BkAMkjIR.js → p-Bl001G0Y.js} +2 -2
- package/dist/components/p-BuiZcSga.js +2 -0
- package/dist/components/p-BuiZcSga.js.map +1 -0
- package/dist/components/p-Bv9frkvW.js +2 -0
- package/dist/components/p-Bv9frkvW.js.map +1 -0
- package/dist/components/{p-DWdRSOBV.js → p-C0-K8vnW.js} +2 -2
- package/dist/components/p-C61yJkfr.js +2 -0
- package/dist/components/p-C61yJkfr.js.map +1 -0
- package/dist/components/p-C6xC48hG.js +2 -0
- package/dist/components/p-C6xC48hG.js.map +1 -0
- package/dist/components/{p-DzRBKJ2L.js → p-C9h13YnX.js} +2 -2
- package/dist/components/{p-B3rbhRAk.js → p-CUAYsK44.js} +2 -2
- package/dist/components/{p-B3rbhRAk.js.map → p-CUAYsK44.js.map} +1 -1
- package/dist/components/p-C_9ZH0A3.js +2 -0
- package/dist/components/p-C_9ZH0A3.js.map +1 -0
- package/dist/components/p-Ca9-fnFl.js +2 -0
- package/dist/components/p-Ca9-fnFl.js.map +1 -0
- package/dist/components/p-CnAkobDW.js +2 -0
- package/dist/components/p-CnAkobDW.js.map +1 -0
- package/dist/components/{p-hLPTSGdo.js → p-CqWV4Hl_.js} +2 -2
- package/dist/components/p-Crsn82rz.js +2 -0
- package/dist/components/{p-4h7vAqyJ.js.map → p-Crsn82rz.js.map} +1 -1
- package/dist/components/p-CuwopElg.js +2 -0
- package/dist/components/p-CuwopElg.js.map +1 -0
- package/dist/components/p-CvyTZ4Mg.js +2 -0
- package/dist/components/{p-DikRzG5f.js.map → p-CvyTZ4Mg.js.map} +1 -1
- package/dist/components/p-DIa73GJP.js +2 -0
- package/dist/components/p-DIa73GJP.js.map +1 -0
- package/dist/components/p-DNFd4Ao-.js +2 -0
- package/dist/components/p-DNFd4Ao-.js.map +1 -0
- package/dist/components/p-De7NquTI.js +2 -0
- package/dist/components/p-De7NquTI.js.map +1 -0
- package/dist/components/p-DjbTFy2B.js +2 -0
- package/dist/components/p-DjbTFy2B.js.map +1 -0
- package/dist/components/p-guQ7hv6W.js +2 -0
- package/dist/components/p-guQ7hv6W.js.map +1 -0
- package/dist/components/{p-BwGnhInj.js → p-k0Hmj1KV.js} +2 -2
- package/dist/components/p-pgxlkvUy.js +2 -0
- package/dist/docs/components.json +110 -25
- package/dist/lib/utils/control-text.d.ts +3 -1
- package/dist/lib/utils/index.d.ts +1 -1
- package/dist/lib/utils/index.js +8 -0
- package/dist/lib/utils/index.js.map +2 -2
- package/dist/mcp-data/registry/agent-activity.json +1 -1
- package/dist/mcp-data/registry/agent-source-list.json +1 -1
- package/dist/mcp-data/registry/agent-tool-call.json +1 -1
- package/dist/mcp-data/registry/bar-nav.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 +1 -1
- package/dist/mcp-data/registry/button-filled.json +5 -4
- package/dist/mcp-data/registry/button-unfilled.json +3 -2
- package/dist/mcp-data/registry/card-data-viz-bar.json +3 -2
- package/dist/mcp-data/registry/card-data-viz-donut.json +3 -2
- package/dist/mcp-data/registry/card-data-viz-line.json +3 -2
- package/dist/mcp-data/registry/card-setting.json +2 -2
- package/dist/mcp-data/registry/card-shell-data-viz.json +2 -2
- package/dist/mcp-data/registry/checkbox.json +9 -9
- package/dist/mcp-data/registry/chip.json +1 -1
- package/dist/mcp-data/registry/conversation-list-item.json +2 -2
- package/dist/mcp-data/registry/conversation-list.json +2 -2
- package/dist/mcp-data/registry/empty-state.json +5 -1
- package/dist/mcp-data/registry/field.json +3 -2
- package/dist/mcp-data/registry/input.json +8 -7
- package/dist/mcp-data/registry/menu.json +22 -3
- package/dist/mcp-data/registry/message-scroller.json +2 -2
- package/dist/mcp-data/registry/mobile-bar-nav.json +7 -5
- package/dist/mcp-data/registry/mobile-header.json +2 -2
- package/dist/mcp-data/registry/mobile-section-switcher.json +1 -1
- package/dist/mcp-data/registry/mobile-sheet-nav.json +5 -3
- package/dist/mcp-data/registry/modal.json +2 -2
- package/dist/mcp-data/registry/panel-nav.json +2 -2
- package/dist/mcp-data/registry/panel-sub-nav.json +1 -1
- 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/radio.json +9 -9
- package/dist/mcp-data/registry/registry.json +59 -33
- package/dist/mcp-data/registry/select-multi.json +9 -7
- package/dist/mcp-data/registry/select.json +9 -7
- package/dist/mcp-data/registry/shell-app.json +2 -1
- package/dist/mcp-data/registry/shell-gradient-swatch.json +1 -1
- package/dist/mcp-data/registry/shell-tools.json +1 -1
- package/dist/mcp-data/registry/skeleton.json +2 -2
- package/dist/mcp-data/registry/slider.json +3 -2
- package/dist/mcp-data/registry/swatch-picker.json +1 -1
- package/dist/mcp-data/registry/switch.json +7 -7
- package/dist/mcp-data/registry/tab-group.json +1 -1
- package/dist/mcp-data/registry/tag.json +1 -1
- package/dist/styles/control-elevation.css +27 -2
- package/dist/types/components/ButtonFilled/ButtonFilled.d.ts +1 -1
- package/dist/types/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/types/components/Input/Input.d.ts +1 -1
- package/dist/types/components/Menu/Menu.d.ts +4 -1
- package/dist/types/components/MobileBarNav/MobileBarNav.d.ts +11 -0
- package/dist/types/components/MobileSheetNav/MobileSheetNav.d.ts +0 -1
- package/dist/types/components/Radio/Radio.d.ts +1 -1
- package/dist/types/components/Select/Select.d.ts +6 -23
- package/dist/types/components/SelectMulti/SelectMulti.d.ts +5 -20
- package/dist/types/components/ShellTools/ShellTools.d.ts +1 -0
- package/dist/types/components/Switch/Switch.d.ts +1 -1
- package/dist/types/components.d.ts +13 -2
- package/dist/types/utils/choice-list-parts.d.ts +4 -0
- package/dist/types/utils/control-press.d.ts +9 -0
- package/dist/types/utils/control-text.d.ts +3 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/select-controller.d.ts +67 -0
- package/package.json +1 -1
- package/dist/components/p-4h7vAqyJ.js +0 -2
- package/dist/components/p-6WdUnsGC.js +0 -2
- package/dist/components/p-6WdUnsGC.js.map +0 -1
- package/dist/components/p-BY0PzkUp.js +0 -2
- package/dist/components/p-BdPaDhDe.js +0 -2
- package/dist/components/p-BdPaDhDe.js.map +0 -1
- package/dist/components/p-BhC1YyId.js +0 -2
- package/dist/components/p-BhC1YyId.js.map +0 -1
- package/dist/components/p-BqPLwCrR.js +0 -2
- package/dist/components/p-BqPLwCrR.js.map +0 -1
- package/dist/components/p-CKGlB6Ow.js +0 -2
- package/dist/components/p-CKGlB6Ow.js.map +0 -1
- package/dist/components/p-CLzlL3G4.js +0 -2
- package/dist/components/p-CPK5Tgae.js +0 -2
- package/dist/components/p-CPK5Tgae.js.map +0 -1
- package/dist/components/p-CUWxI1u0.js +0 -2
- package/dist/components/p-CUWxI1u0.js.map +0 -1
- package/dist/components/p-Cx-ywr1e.js +0 -2
- package/dist/components/p-Cx-ywr1e.js.map +0 -1
- package/dist/components/p-D65itwnc.js +0 -2
- package/dist/components/p-D65itwnc.js.map +0 -1
- package/dist/components/p-DSa0Hnd3.js +0 -2
- package/dist/components/p-DSa0Hnd3.js.map +0 -1
- package/dist/components/p-DbpfpeQT.js +0 -2
- package/dist/components/p-DbpfpeQT.js.map +0 -1
- package/dist/components/p-DikRzG5f.js +0 -2
- package/dist/components/p-Dq1vMuJb.js +0 -2
- package/dist/components/p-Dq1vMuJb.js.map +0 -1
- package/dist/components/p-DuFm-ieS.js +0 -2
- package/dist/components/p-DuFm-ieS.js.map +0 -1
- package/dist/components/p-rsIOpkzV.js +0 -2
- package/dist/components/p-rsIOpkzV.js.map +0 -1
- /package/dist/components/{p-D-xttdpn.js.map → p-B-9A0e_0.js.map} +0 -0
- /package/dist/components/{p-CaRyxTMz.js.map → p-BT5hgg5i.js.map} +0 -0
- /package/dist/components/{p-DQDpDYyF.js.map → p-B_5nxOeB.js.map} +0 -0
- /package/dist/components/{p-BkAMkjIR.js.map → p-Bl001G0Y.js.map} +0 -0
- /package/dist/components/{p-DWdRSOBV.js.map → p-C0-K8vnW.js.map} +0 -0
- /package/dist/components/{p-DzRBKJ2L.js.map → p-C9h13YnX.js.map} +0 -0
- /package/dist/components/{p-hLPTSGdo.js.map → p-CqWV4Hl_.js.map} +0 -0
- /package/dist/components/{p-BwGnhInj.js.map → p-k0Hmj1KV.js.map} +0 -0
- /package/dist/components/{p-BY0PzkUp.js.map → p-pgxlkvUy.js.map} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
3
|
"name": "switch",
|
|
4
4
|
"title": "Switch",
|
|
5
|
-
"description": "Compact on/off setting control for changes that take effect immediately, with
|
|
5
|
+
"description": "Compact on/off setting control for changes that take effect immediately, with four sizes and form-associated behavior.",
|
|
6
6
|
"type": "registry:ui",
|
|
7
7
|
"meta": {
|
|
8
8
|
"library": "@ds-mo/ui",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"intent": {
|
|
14
14
|
"audience": "general",
|
|
15
15
|
"status": "stable",
|
|
16
|
-
"summary": "Compact on/off setting control for changes that take effect immediately, with
|
|
16
|
+
"summary": "Compact on/off setting control for changes that take effect immediately, with four sizes and form-associated behavior.",
|
|
17
17
|
"useWhen": [
|
|
18
18
|
"A binary setting takes effect immediately when the user turns it on or off.",
|
|
19
19
|
"A settings, form, or menu row needs a compact on/off control.",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"states": [
|
|
57
57
|
"Activation updates checked immediately and emits dsChange with the new boolean value.",
|
|
58
58
|
"The initial checked value is the form-reset baseline; unchecked switches submit nothing unless uncheckedValue is provided.",
|
|
59
|
-
"Sizes are md 32×20 with a 12px thumb and 4px
|
|
59
|
+
"Sizes are lg 40×24 with a 16px thumb and 4px body inset, md 32×20 with a 12px thumb and 4px inset, sm 24×16 with a 10px thumb and 3px inset, and xs 20×12 with an 8px thumb and 2px inset.",
|
|
60
60
|
"Unchecked uses a transparent track with a density-specific tertiary-foreground inset stroke and a solid tertiary-foreground thumb without a border. Checked uses a brand track and primary-background thumb with no strokes.",
|
|
61
61
|
"Presentation mode removes switch semantics, focus, interaction, and form submission while retaining the checked visual."
|
|
62
62
|
],
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
},
|
|
166
166
|
"size": {
|
|
167
167
|
"type": "SwitchSize",
|
|
168
|
-
"resolvedType": "\"md\" | \"sm\" | \"xs\"",
|
|
168
|
+
"resolvedType": "\"lg\" | \"md\" | \"sm\" | \"xs\"",
|
|
169
169
|
"attribute": "size",
|
|
170
170
|
"default": "'md'",
|
|
171
171
|
"required": false,
|
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
},
|
|
278
278
|
"size": {
|
|
279
279
|
"type": "SwitchSize",
|
|
280
|
-
"resolvedType": "\"md\" | \"sm\" | \"xs\"",
|
|
280
|
+
"resolvedType": "\"lg\" | \"md\" | \"sm\" | \"xs\"",
|
|
281
281
|
"attribute": "size",
|
|
282
282
|
"default": "'md'",
|
|
283
283
|
"required": false,
|
|
@@ -349,12 +349,12 @@
|
|
|
349
349
|
"files": [
|
|
350
350
|
{
|
|
351
351
|
"path": "src/wc/components/Switch/Switch.css",
|
|
352
|
-
"content": "@import '../../utils/focus-ring.css';\n@import '../../utils/control-inactive.css';\n\n:host {\n --ds-switch-width: var(--dimension-size-400);\n --ds-switch-height: var(--dimension-size-250);\n --ds-switch-thumb-size: var(--dimension-size-150);\n --ds-switch-gap: var(--dimension-space-050);\n --ds-switch-stroke: var(--dimension-stroke-width-012);\n --ds-switch-inset: var(--ds-switch-gap);\n --ds-switch-thumb-hover: var(--color-interaction-hover);\n --ds-switch-thumb-pressed: var(--color-interaction-pressed);\n --ds-switch-travel: calc(\n var(--ds-switch-width) - var(--ds-switch-thumb-size) - var(--ds-switch-inset) -\n var(--ds-switch-inset)\n );\n position: relative;\n display: inline-flex;\n width: var(--ds-switch-width);\n height: var(--ds-switch-height);\n padding: 0;\n border: none;\n border-radius: var(--dimension-radius-half);\n box-sizing: border-box;\n flex-shrink: 0;\n overflow: visible;\n cursor:
|
|
352
|
+
"content": "@import '../../utils/focus-ring.css';\n@import '../../utils/control-inactive.css';\n\n:host {\n --ds-switch-width: var(--dimension-size-400);\n --ds-switch-height: var(--dimension-size-250);\n --ds-switch-thumb-size: var(--dimension-size-150);\n --ds-switch-gap: var(--dimension-space-050);\n --ds-switch-stroke: var(--dimension-stroke-width-012);\n --ds-switch-inset: var(--ds-switch-gap);\n --ds-switch-thumb-hover: var(--color-interaction-hover);\n --ds-switch-thumb-pressed: var(--color-interaction-pressed);\n --ds-switch-travel: calc(\n var(--ds-switch-width) - var(--ds-switch-thumb-size) - var(--ds-switch-inset) -\n var(--ds-switch-inset)\n );\n position: relative;\n display: inline-flex;\n width: var(--ds-switch-width);\n height: var(--ds-switch-height);\n padding: 0;\n border: none;\n border-radius: var(--dimension-radius-half);\n box-sizing: border-box;\n flex-shrink: 0;\n overflow: visible;\n cursor: default;\n user-select: none;\n outline: none;\n background-color: transparent;\n box-shadow: inset 0 0 0 var(--ds-switch-stroke) var(--color-border-secondary);\n transition:\n background-color var(--effect-motion-short-3),\n box-shadow var(--effect-motion-short-3);\n}\n\n:host(.switch--lg) {\n --ds-switch-width: var(--dimension-size-500);\n --ds-switch-height: var(--dimension-size-300);\n --ds-switch-thumb-size: var(--dimension-iconography-sm);\n --ds-switch-gap: var(--dimension-space-050);\n}\n\n:host(.switch--sm) {\n --ds-switch-width: var(--dimension-size-300);\n --ds-switch-height: var(--dimension-size-200);\n --ds-switch-thumb-size: calc(var(--dimension-size-base) * 5 / 4);\n --ds-switch-gap: calc(var(--dimension-space-025) + var(--dimension-space-012));\n}\n\n:host(.switch--xs) {\n --ds-switch-width: var(--dimension-size-250);\n --ds-switch-height: var(--dimension-size-150);\n --ds-switch-thumb-size: var(--dimension-size-100);\n --ds-switch-gap: var(--dimension-space-025);\n}\n\n:host(.checked) {\n background-color: var(--color-background-bold-brand);\n box-shadow: none;\n}\n\n:host(.switch--readonly),\n:host(.switch--presentation) {\n cursor: default;\n}\n\n:host(.switch--presentation) {\n pointer-events: none;\n}\n\n/* Inactive: `.ds-control-inactive` (50% opacity). */\n\n.thumb {\n position: absolute;\n top: 50%;\n left: var(--ds-switch-inset);\n width: var(--ds-switch-thumb-size);\n height: var(--ds-switch-thumb-size);\n border-radius: var(--dimension-radius-half);\n background-color: var(--color-foreground-tertiary);\n box-shadow: none;\n transform: translateY(-50%);\n transition:\n background-color var(--effect-motion-short-3),\n transform var(--effect-motion-short-3);\n pointer-events: none;\n}\n\n.thumb::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n background: transparent;\n pointer-events: none;\n}\n\n:host(:hover:not(:disabled):not(.ds-control-inactive):not(.switch--readonly):not(.switch--presentation))\n .thumb::after {\n background: var(--ds-switch-thumb-hover);\n}\n\n:host(:active:not(:disabled):not(.ds-control-inactive):not(.switch--readonly):not(.switch--presentation))\n .thumb::after {\n background: var(--ds-switch-thumb-pressed);\n}\n\n:host(.checked) .thumb {\n background-color: var(--color-background-primary);\n box-shadow: none;\n transform: translate3d(var(--ds-switch-travel), -50%, 0);\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host {\n transition: none;\n }\n\n .thumb {\n transition: none;\n }\n}\n",
|
|
353
353
|
"type": "registry:ui"
|
|
354
354
|
},
|
|
355
355
|
{
|
|
356
356
|
"path": "src/wc/components/Switch/Switch.tsx",
|
|
357
|
-
"content": "import { AttachInternals, Component, Element, Prop, State, Event, EventEmitter, Watch, h, Host } from '@stencil/core';\nimport { DEFAULT_REQUIRED_MESSAGE, setRequiredValidity } from '../../utils';\n\nexport type SwitchSize = 'md' | 'sm' | 'xs';\n\nlet generatedLabelId = 0;\n\n@Component({\n tag: 'ds-switch',\n styleUrl: 'Switch.css',\n shadow: true,\n formAssociated: true,\n})\nexport class Switch {\n @Element() el!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n /** Current on/off state. The initial value is restored when the owning form resets. */\n @Prop({ mutable: true }) checked: boolean = false;\n\n @Prop({ reflect: true }) name: string | undefined;\n @Prop() value: string = 'on';\n\n /** Optional value submitted when unchecked; omitted by default like a native checkbox. */\n @Prop() uncheckedValue: string | undefined;\n\n /** Associates the switch with a form by id when it is rendered outside that form. */\n @Prop({ reflect: true }) form: string | undefined;\n\n @Prop({ reflect: true }) disabled: boolean = false;\n @Prop({ reflect: true }) readOnly: boolean = false;\n @Prop({ reflect: true }) required: boolean = false;\n @Prop() requiredMessage: string = DEFAULT_REQUIRED_MESSAGE;\n @Prop() isInactive: boolean = false;\n\n /** Compact track size for placement inside controls, menus, and form rows. */\n @Prop() size: SwitchSize = 'md';\n\n /**\n * Removes standalone control semantics so a composite owner such as a\n * `menuitemcheckbox` can use the switch as an aria-hidden visual indicator.\n */\n @Prop() presentation: boolean = false;\n\n @Event() dsChange!: EventEmitter<boolean>;\n\n private initialChecked = false;\n @State() private formDisabled = false;\n @State() private focused = false;\n @State() private touched = false;\n\n componentWillLoad() {\n this.initialChecked = this.checked;\n this.syncFormValue();\n }\n\n componentDidLoad() {\n this.syncNativeLabels();\n }\n\n @Watch('checked')\n @Watch('value')\n @Watch('uncheckedValue')\n @Watch('disabled')\n @Watch('isInactive')\n @Watch('presentation')\n @Watch('required')\n syncFormValue() {\n const inactive = this.presentation || this.isInactive || this.disabled || this.formDisabled;\n const submissionValue = this.checked ? this.value : this.uncheckedValue ?? null;\n const state = this.checked ? 'checked' : 'unchecked';\n this.internals.setFormValue(inactive ? null : submissionValue, state);\n\n const missing = this.required && !inactive && !this.checked;\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.checked = this.initialChecked;\n this.focused = false;\n this.touched = false;\n }\n\n formStateRestoreCallback(state: string | File | FormData | null) {\n this.checked = state === 'checked';\n }\n\n private syncNativeLabels() {\n if (this.presentation) return;\n if (this.el.hasAttribute('aria-label') || this.el.hasAttribute('aria-labelledby')) return;\n\n const labelIds = (Array.from(this.internals.labels) as HTMLLabelElement[]).map(label => {\n if (!label.id) label.id = `ds-switch-label-${++generatedLabelId}`;\n return label.id;\n });\n if (labelIds.length) this.el.setAttribute('aria-labelledby', labelIds.join(' '));\n }\n\n private handleClick = () => {\n if (this.presentation || this.readOnly || this.isInactive || this.disabled || this.formDisabled) return;\n this.checked = !this.checked;\n this.dsChange.emit(this.checked);\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (this.presentation || this.readOnly || this.isInactive || this.disabled || this.formDisabled) return;\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n this.handleClick();\n }\n };\n\n private handleFocus = () => {\n if (!this.presentation) this.focused = true;\n };\n\n private handleBlur = () => {\n if (this.presentation) return;\n this.focused = false;\n this.touched = true;\n };\n\n render() {\n const inactive = this.isInactive || this.disabled || this.formDisabled;\n const invalid = this.required && !inactive && !this.checked;\n const dirty = this.checked !== this.initialChecked;\n // Switch owns its structural track and thumb strokes so nested interaction layers cannot cover them.\n return (\n <Host\n role={this.presentation ? undefined : 'switch'}\n aria-checked={this.presentation ? undefined : String(this.checked)}\n aria-disabled={!this.presentation && inactive ? 'true' : undefined}\n aria-readonly={!this.presentation && this.readOnly ? 'true' : undefined}\n aria-required={!this.presentation && this.required ? 'true' : undefined}\n aria-invalid={!this.presentation && invalid ? 'true' : undefined}\n aria-hidden={this.presentation ? 'true' : undefined}\n data-checked={this.checked ? '' : undefined}\n data-unchecked={!this.checked ? '' : undefined}\n data-disabled={inactive ? '' : undefined}\n data-readonly={this.readOnly ? '' : undefined}\n data-required={this.required ? '' : undefined}\n data-focused={!this.presentation && this.focused ? '' : undefined}\n data-filled={!this.presentation && this.checked ? '' : undefined}\n data-dirty={!this.presentation && dirty ? '' : undefined}\n data-touched={!this.presentation && this.touched ? '' : undefined}\n data-valid={!this.presentation && !inactive && !invalid ? '' : undefined}\n data-invalid={!this.presentation && invalid ? '' : undefined}\n tabIndex={this.presentation || inactive ? -1 : 0}\n class={{\n switch: true,\n checked: this.checked,\n 'switch--md': this.size === 'md',\n 'switch--sm': this.size === 'sm',\n 'switch--xs': this.size === 'xs',\n 'switch--readonly': this.readOnly,\n 'switch--presentation': this.presentation,\n 'ds-focus-ring': true,\n 'ds-control-inactive': inactive,\n }}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n >\n <span class=\"thumb\" />\n </Host>\n );\n }\n}\n",
|
|
357
|
+
"content": "import { AttachInternals, Component, Element, Prop, State, Event, EventEmitter, Watch, h, Host } from '@stencil/core';\nimport { DEFAULT_REQUIRED_MESSAGE, setRequiredValidity } from '../../utils';\n\nexport type SwitchSize = 'lg' | 'md' | 'sm' | 'xs';\n\nlet generatedLabelId = 0;\n\n@Component({\n tag: 'ds-switch',\n styleUrl: 'Switch.css',\n shadow: true,\n formAssociated: true,\n})\nexport class Switch {\n @Element() el!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n /** Current on/off state. The initial value is restored when the owning form resets. */\n @Prop({ mutable: true }) checked: boolean = false;\n\n @Prop({ reflect: true }) name: string | undefined;\n @Prop() value: string = 'on';\n\n /** Optional value submitted when unchecked; omitted by default like a native checkbox. */\n @Prop() uncheckedValue: string | undefined;\n\n /** Associates the switch with a form by id when it is rendered outside that form. */\n @Prop({ reflect: true }) form: string | undefined;\n\n @Prop({ reflect: true }) disabled: boolean = false;\n @Prop({ reflect: true }) readOnly: boolean = false;\n @Prop({ reflect: true }) required: boolean = false;\n @Prop() requiredMessage: string = DEFAULT_REQUIRED_MESSAGE;\n @Prop() isInactive: boolean = false;\n\n /** Compact track size for placement inside controls, menus, and form rows. */\n @Prop() size: SwitchSize = 'md';\n\n /**\n * Removes standalone control semantics so a composite owner such as a\n * `menuitemcheckbox` can use the switch as an aria-hidden visual indicator.\n */\n @Prop() presentation: boolean = false;\n\n @Event() dsChange!: EventEmitter<boolean>;\n\n private initialChecked = false;\n @State() private formDisabled = false;\n @State() private focused = false;\n @State() private touched = false;\n\n componentWillLoad() {\n this.initialChecked = this.checked;\n this.syncFormValue();\n }\n\n componentDidLoad() {\n this.syncNativeLabels();\n }\n\n @Watch('checked')\n @Watch('value')\n @Watch('uncheckedValue')\n @Watch('disabled')\n @Watch('isInactive')\n @Watch('presentation')\n @Watch('required')\n syncFormValue() {\n const inactive = this.presentation || this.isInactive || this.disabled || this.formDisabled;\n const submissionValue = this.checked ? this.value : this.uncheckedValue ?? null;\n const state = this.checked ? 'checked' : 'unchecked';\n this.internals.setFormValue(inactive ? null : submissionValue, state);\n\n const missing = this.required && !inactive && !this.checked;\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.checked = this.initialChecked;\n this.focused = false;\n this.touched = false;\n }\n\n formStateRestoreCallback(state: string | File | FormData | null) {\n this.checked = state === 'checked';\n }\n\n private syncNativeLabels() {\n if (this.presentation) return;\n if (this.el.hasAttribute('aria-label') || this.el.hasAttribute('aria-labelledby')) return;\n\n const labelIds = (Array.from(this.internals.labels) as HTMLLabelElement[]).map(label => {\n if (!label.id) label.id = `ds-switch-label-${++generatedLabelId}`;\n return label.id;\n });\n if (labelIds.length) this.el.setAttribute('aria-labelledby', labelIds.join(' '));\n }\n\n private handleClick = () => {\n if (this.presentation || this.readOnly || this.isInactive || this.disabled || this.formDisabled) return;\n this.checked = !this.checked;\n this.dsChange.emit(this.checked);\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (this.presentation || this.readOnly || this.isInactive || this.disabled || this.formDisabled) return;\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n this.handleClick();\n }\n };\n\n private handleFocus = () => {\n if (!this.presentation) this.focused = true;\n };\n\n private handleBlur = () => {\n if (this.presentation) return;\n this.focused = false;\n this.touched = true;\n };\n\n render() {\n const inactive = this.isInactive || this.disabled || this.formDisabled;\n const invalid = this.required && !inactive && !this.checked;\n const dirty = this.checked !== this.initialChecked;\n // Switch owns its structural track and thumb strokes so nested interaction layers cannot cover them.\n return (\n <Host\n role={this.presentation ? undefined : 'switch'}\n aria-checked={this.presentation ? undefined : String(this.checked)}\n aria-disabled={!this.presentation && inactive ? 'true' : undefined}\n aria-readonly={!this.presentation && this.readOnly ? 'true' : undefined}\n aria-required={!this.presentation && this.required ? 'true' : undefined}\n aria-invalid={!this.presentation && invalid ? 'true' : undefined}\n aria-hidden={this.presentation ? 'true' : undefined}\n data-checked={this.checked ? '' : undefined}\n data-unchecked={!this.checked ? '' : undefined}\n data-disabled={inactive ? '' : undefined}\n data-readonly={this.readOnly ? '' : undefined}\n data-required={this.required ? '' : undefined}\n data-focused={!this.presentation && this.focused ? '' : undefined}\n data-filled={!this.presentation && this.checked ? '' : undefined}\n data-dirty={!this.presentation && dirty ? '' : undefined}\n data-touched={!this.presentation && this.touched ? '' : undefined}\n data-valid={!this.presentation && !inactive && !invalid ? '' : undefined}\n data-invalid={!this.presentation && invalid ? '' : undefined}\n tabIndex={this.presentation || inactive ? -1 : 0}\n class={{\n switch: true,\n checked: this.checked,\n 'switch--lg': this.size === 'lg',\n 'switch--md': this.size === 'md',\n 'switch--sm': this.size === 'sm',\n 'switch--xs': this.size === 'xs',\n 'switch--readonly': this.readOnly,\n 'switch--presentation': this.presentation,\n 'ds-focus-ring': true,\n 'ds-control-inactive': inactive,\n }}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n >\n <span class=\"thumb\" />\n </Host>\n );\n }\n}\n",
|
|
358
358
|
"type": "registry:ui"
|
|
359
359
|
}
|
|
360
360
|
]
|
|
@@ -238,7 +238,7 @@
|
|
|
238
238
|
"files": [
|
|
239
239
|
{
|
|
240
240
|
"path": "src/wc/components/TabGroup/TabGroup.css",
|
|
241
|
-
"content": "@import '../../utils/control-density.css';\n@import '../../utils/focus-ring.css';\n@import '../../utils/interaction-fill.css';\n@import '../../utils/control-inactive.css';\n\n:host {\n display: block;\n --_tab-group-surface-border: var(--color-border-tertiary);\n --_tab-group-divider: var(--color-border-secondary);\n}\n\n:host(.tab-group-host--on-medium) {\n --_tab-group-surface-border: var(--color-border-on-medium-background-tertiary);\n --_tab-group-divider: var(--color-border-on-medium-background-secondary);\n}\n\n:host(.tab-group-host--on-bold) {\n --_tab-group-surface-border: var(--color-border-on-bold-background-tertiary);\n --_tab-group-divider: var(--color-border-on-bold-background-secondary);\n}\n\n:host(.tab-group-host--on-strong) {\n --_tab-group-surface-border: var(--color-border-on-strong-background-tertiary);\n --_tab-group-divider: var(--color-border-on-strong-background-secondary);\n}\n\n:host(.tab-group-host--on-translucent) {\n --_tab-group-surface-border: var(--color-translucent-border-tertiary);\n --_tab-group-divider: var(--color-translucent-border-secondary);\n}\n\n:host(.tab-group-host--on-inverted) {\n --_tab-group-surface-border: var(--color-inverted-border-tertiary);\n --_tab-group-divider: var(--color-inverted-border-secondary);\n}\n\n:host(.tab-group-host--on-media) {\n --_tab-group-surface-border: var(--color-media-border-tertiary);\n --_tab-group-divider: var(--color-media-border-secondary);\n}\n\n:host(.tab-group-host--on-always-dark) {\n --_tab-group-surface-border: var(--color-always-dark-border-tertiary);\n --_tab-group-divider: var(--color-always-dark-border-secondary);\n}\n\n.tab-list {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-050);\n position: relative;\n width: max-content;\n max-width: 100%;\n height: var(--dimension-size-400);\n padding: calc(var(--dimension-space-050) - var(--dimension-stroke-width-012));\n background-color: var(--color-background-secondary);\n border: var(--dimension-stroke-width-012) solid var(--_tab-group-surface-border);\n border-radius: var(--dimension-radius-half);\n box-sizing: border-box;\n}\n\n:host(.tab-group-host--surface) .tab-list {\n background-color: transparent;\n}\n\n.tab {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--ds-control-gap);\n padding: 0 var(--ds-control-padding-inline);\n background-color: transparent;\n border: none;\n border-radius: var(--dimension-radius-half);\n cursor:
|
|
241
|
+
"content": "@import '../../utils/control-density.css';\n@import '../../utils/focus-ring.css';\n@import '../../utils/interaction-fill.css';\n@import '../../utils/control-inactive.css';\n\n:host {\n display: block;\n --_tab-group-surface-border: var(--color-border-tertiary);\n --_tab-group-divider: var(--color-border-secondary);\n}\n\n:host(.tab-group-host--on-medium) {\n --_tab-group-surface-border: var(--color-border-on-medium-background-tertiary);\n --_tab-group-divider: var(--color-border-on-medium-background-secondary);\n}\n\n:host(.tab-group-host--on-bold) {\n --_tab-group-surface-border: var(--color-border-on-bold-background-tertiary);\n --_tab-group-divider: var(--color-border-on-bold-background-secondary);\n}\n\n:host(.tab-group-host--on-strong) {\n --_tab-group-surface-border: var(--color-border-on-strong-background-tertiary);\n --_tab-group-divider: var(--color-border-on-strong-background-secondary);\n}\n\n:host(.tab-group-host--on-translucent) {\n --_tab-group-surface-border: var(--color-translucent-border-tertiary);\n --_tab-group-divider: var(--color-translucent-border-secondary);\n}\n\n:host(.tab-group-host--on-inverted) {\n --_tab-group-surface-border: var(--color-inverted-border-tertiary);\n --_tab-group-divider: var(--color-inverted-border-secondary);\n}\n\n:host(.tab-group-host--on-media) {\n --_tab-group-surface-border: var(--color-media-border-tertiary);\n --_tab-group-divider: var(--color-media-border-secondary);\n}\n\n:host(.tab-group-host--on-always-dark) {\n --_tab-group-surface-border: var(--color-always-dark-border-tertiary);\n --_tab-group-divider: var(--color-always-dark-border-secondary);\n}\n\n.tab-list {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-050);\n position: relative;\n width: max-content;\n max-width: 100%;\n height: var(--dimension-size-400);\n padding: calc(var(--dimension-space-050) - var(--dimension-stroke-width-012));\n background-color: var(--color-background-secondary);\n border: var(--dimension-stroke-width-012) solid var(--_tab-group-surface-border);\n border-radius: var(--dimension-radius-half);\n box-sizing: border-box;\n}\n\n:host(.tab-group-host--surface) .tab-list {\n background-color: transparent;\n}\n\n.tab {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--ds-control-gap);\n padding: 0 var(--ds-control-padding-inline);\n background-color: transparent;\n border: none;\n border-radius: var(--dimension-radius-half);\n cursor: default;\n -webkit-user-select: none;\n user-select: none;\n color: var(--color-foreground-secondary);\n transition: color var(--effect-motion-short-2);\n flex-shrink: 0;\n height: var(--ds-control-height);\n min-width: var(--dimension-size-400);\n box-sizing: border-box;\n --_dot: var(--color-foreground-bold-brand);\n /* Hover/press: `.ds-interaction-fill` — fills cover full 24px box (no layout border). */\n}\n\n.tab--selected {\n color: var(--color-foreground-primary);\n background-color: var(--color-background-primary);\n /* Inset stroke on interaction-fill ::after — stays above hover wash. */\n --ds-interaction-border-width: var(--dimension-stroke-width-012);\n --ds-interaction-border-color: var(--_tab-group-surface-border);\n}\n\n:host(.tab-group-host--surface) .tab--selected {\n background-color: var(--ds-interaction-active);\n}\n\n.tab--selected:not(.ds-interaction-fill) {\n box-shadow: inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color);\n}\n\n/* Inactive: `.ds-control-inactive` (50% opacity) — applied via class in TSX. */\n\n.tab__content {\n position: relative;\n z-index: 2;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--ds-control-gap);\n min-width: 0;\n}\n\n.tab__content--dot {\n padding-right: var(--dimension-space-050);\n}\n\n.tab__label {\n padding: 0 var(--ds-control-label-inset);\n white-space: nowrap;\n}\n\n.tab__icon {\n flex-shrink: 0;\n}\n\n.tab__dot {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n pointer-events: none;\n}\n\n.on-medium {\n color: var(--color-foreground-on-medium-background-secondary);\n}\n\n.on-medium.tab--selected { color: var(--color-foreground-on-medium-background-primary); }\n\n.on-bold {\n color: var(--color-foreground-on-bold-background-secondary);\n}\n\n.on-bold.tab--selected { color: var(--color-foreground-on-bold-background-primary); }\n\n.on-strong {\n color: var(--color-foreground-on-strong-background-secondary);\n}\n\n.on-strong.tab--selected { color: var(--color-foreground-on-strong-background-primary); }\n\n.on-translucent { color: var(--color-translucent-foreground-secondary); }\n\n.on-translucent.tab--selected { color: var(--color-translucent-foreground-primary); }\n\n.on-inverted { color: var(--color-inverted-foreground-secondary); }\n\n.on-inverted.tab--selected { color: var(--color-inverted-foreground-primary); }\n\n.on-media { color: var(--color-media-foreground-secondary); }\n\n.on-media.tab--selected { color: var(--color-media-foreground-primary); }\n\n.on-always-dark {\n color: var(--color-always-dark-foreground-secondary);\n}\n\n.on-always-dark.tab--selected { color: var(--color-always-dark-foreground-primary); }\n\n.tab-divider {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: var(--dimension-stroke-width-012);\n align-self: center;\n padding: 0;\n flex-shrink: 0;\n pointer-events: none;\n}\n\n.tab-divider__line {\n width: var(--dimension-stroke-width-012);\n height: var(--typography-lineheight-sm);\n flex-shrink: 0;\n background-color: var(--_tab-group-divider);\n}\n",
|
|
242
242
|
"type": "registry:ui"
|
|
243
243
|
},
|
|
244
244
|
{
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
"files": [
|
|
341
341
|
{
|
|
342
342
|
"path": "src/wc/components/Tag/Tag.css",
|
|
343
|
-
"content": "@import '../../utils/tag-chip.css';\n\n/* ── Intent × Contrast — strong ─────────────────────────────────────────── */\n\n:host(.tag--intent-neutral.tag--contrast-strong) { background-color: var(--color-background-strong-neutral); color: var(--color-foreground-medium-neutral); }\n:host(.tag--intent-brand.tag--contrast-strong) { background-color: var(--color-background-strong-brand); color: var(--color-foreground-on-strong-background-primary); }\n:host(.tag--intent-ai.tag--contrast-strong) { background-color: var(--color-background-strong-ai); color: var(--color-foreground-medium-ai); }\n:host(.tag--intent-negative.tag--contrast-strong) { background-color: var(--color-background-strong-negative); color: var(--color-foreground-medium-negative); }\n:host(.tag--intent-warning.tag--contrast-strong) { background-color: var(--color-background-strong-warning); color: var(--color-foreground-medium-warning); }\n:host(.tag--intent-caution.tag--contrast-strong) { background-color: var(--color-background-strong-caution); color: var(--color-foreground-medium-caution); }\n:host(.tag--intent-positive.tag--contrast-strong) { background-color: var(--color-background-strong-positive); color: var(--color-foreground-medium-positive); }\n\n/* ── Intent × Contrast — bold ───────────────────────────────────────────── */\n\n:host(.tag--intent-neutral.tag--contrast-bold) { background-color: var(--color-background-bold-neutral); color: var(--color-foreground-on-bold-background-primary); }\n:host(.tag--intent-brand.tag--contrast-bold) { background-color: var(--color-background-bold-brand); color: var(--color-foreground-on-bold-background-primary); }\n:host(.tag--intent-ai.tag--contrast-bold) { background-color: var(--color-background-bold-ai); color: var(--color-foreground-on-bold-background-primary); }\n:host(.tag--intent-negative.tag--contrast-bold) { background-color: var(--color-background-bold-negative); color: var(--color-foreground-on-bold-background-primary); }\n:host(.tag--intent-warning.tag--contrast-bold) { background-color: var(--color-background-bold-warning); color: var(--color-foreground-on-bold-background-primary); }\n:host(.tag--intent-caution.tag--contrast-bold) { background-color: var(--color-background-bold-caution); color: var(--color-foreground-on-bold-background-primary); }\n:host(.tag--intent-positive.tag--contrast-bold) { background-color: var(--color-background-bold-positive); color: var(--color-foreground-on-bold-background-primary); }\n\n/* ── Intent × Contrast — medium ─────────────────────────────────────────── */\n\n:host(.tag--intent-neutral.tag--contrast-medium) { background-color: var(--color-background-medium-neutral); color: var(--color-foreground-strong-neutral); }\n:host(.tag--intent-brand.tag--contrast-medium) { background-color: var(--color-background-medium-brand); color: var(--color-foreground-on-medium-background-primary); }\n:host(.tag--intent-ai.tag--contrast-medium) { background-color: var(--color-background-medium-ai); color: var(--color-foreground-strong-ai); }\n:host(.tag--intent-negative.tag--contrast-medium) { background-color: var(--color-background-medium-negative); color: var(--color-foreground-strong-negative); }\n:host(.tag--intent-warning.tag--contrast-medium) { background-color: var(--color-background-medium-warning); color: var(--color-foreground-strong-warning); }\n:host(.tag--intent-caution.tag--contrast-medium) { background-color: var(--color-background-medium-caution); color: var(--color-foreground-strong-caution); }\n:host(.tag--intent-positive.tag--contrast-medium) { background-color: var(--color-background-medium-positive); color: var(--color-foreground-strong-positive); }\n\n/* ── Intent × Contrast — faint ──────────────────────────────────────────── */\n\n:host(.tag--intent-neutral.tag--contrast-faint) { background-color: var(--color-background-faint-neutral); color: var(--color-foreground-bold-neutral); }\n:host(.tag--intent-brand.tag--contrast-faint) { background-color: var(--color-background-faint-brand); color: var(--color-foreground-bold-brand); }\n:host(.tag--intent-ai.tag--contrast-faint) { background-color: var(--color-background-faint-ai); color: var(--color-foreground-bold-ai); }\n:host(.tag--intent-negative.tag--contrast-faint) { background-color: var(--color-background-faint-negative); color: var(--color-foreground-bold-negative); }\n:host(.tag--intent-warning.tag--contrast-faint) { background-color: var(--color-background-faint-warning); color: var(--color-foreground-bold-warning); }\n:host(.tag--intent-caution.tag--contrast-faint) { background-color: var(--color-background-faint-caution); color: var(--color-foreground-bold-caution); }\n:host(.tag--intent-positive.tag--contrast-faint) { background-color: var(--color-background-faint-positive); color: var(--color-foreground-bold-positive); }\n\n/* ── Interactive menu trigger ───────────────────────────────────────────── */\n\n:host(.tag--interactive) {\n padding: 0;\n gap: 0;\n}\n\n.tag__button {\n all: unset;\n position: relative;\n z-index: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n min-width: 0;\n max-width: 100%;\n height: 100%;\n padding: 0 var(--ds-control-padding-inline);\n gap: var(--ds-control-gap);\n border-radius: inherit;\n color: inherit;\n cursor:
|
|
343
|
+
"content": "@import '../../utils/tag-chip.css';\n\n/* ── Intent × Contrast — strong ─────────────────────────────────────────── */\n\n:host(.tag--intent-neutral.tag--contrast-strong) { background-color: var(--color-background-strong-neutral); color: var(--color-foreground-medium-neutral); }\n:host(.tag--intent-brand.tag--contrast-strong) { background-color: var(--color-background-strong-brand); color: var(--color-foreground-on-strong-background-primary); }\n:host(.tag--intent-ai.tag--contrast-strong) { background-color: var(--color-background-strong-ai); color: var(--color-foreground-medium-ai); }\n:host(.tag--intent-negative.tag--contrast-strong) { background-color: var(--color-background-strong-negative); color: var(--color-foreground-medium-negative); }\n:host(.tag--intent-warning.tag--contrast-strong) { background-color: var(--color-background-strong-warning); color: var(--color-foreground-medium-warning); }\n:host(.tag--intent-caution.tag--contrast-strong) { background-color: var(--color-background-strong-caution); color: var(--color-foreground-medium-caution); }\n:host(.tag--intent-positive.tag--contrast-strong) { background-color: var(--color-background-strong-positive); color: var(--color-foreground-medium-positive); }\n\n/* ── Intent × Contrast — bold ───────────────────────────────────────────── */\n\n:host(.tag--intent-neutral.tag--contrast-bold) { background-color: var(--color-background-bold-neutral); color: var(--color-foreground-on-bold-background-primary); }\n:host(.tag--intent-brand.tag--contrast-bold) { background-color: var(--color-background-bold-brand); color: var(--color-foreground-on-bold-background-primary); }\n:host(.tag--intent-ai.tag--contrast-bold) { background-color: var(--color-background-bold-ai); color: var(--color-foreground-on-bold-background-primary); }\n:host(.tag--intent-negative.tag--contrast-bold) { background-color: var(--color-background-bold-negative); color: var(--color-foreground-on-bold-background-primary); }\n:host(.tag--intent-warning.tag--contrast-bold) { background-color: var(--color-background-bold-warning); color: var(--color-foreground-on-bold-background-primary); }\n:host(.tag--intent-caution.tag--contrast-bold) { background-color: var(--color-background-bold-caution); color: var(--color-foreground-on-bold-background-primary); }\n:host(.tag--intent-positive.tag--contrast-bold) { background-color: var(--color-background-bold-positive); color: var(--color-foreground-on-bold-background-primary); }\n\n/* ── Intent × Contrast — medium ─────────────────────────────────────────── */\n\n:host(.tag--intent-neutral.tag--contrast-medium) { background-color: var(--color-background-medium-neutral); color: var(--color-foreground-strong-neutral); }\n:host(.tag--intent-brand.tag--contrast-medium) { background-color: var(--color-background-medium-brand); color: var(--color-foreground-on-medium-background-primary); }\n:host(.tag--intent-ai.tag--contrast-medium) { background-color: var(--color-background-medium-ai); color: var(--color-foreground-strong-ai); }\n:host(.tag--intent-negative.tag--contrast-medium) { background-color: var(--color-background-medium-negative); color: var(--color-foreground-strong-negative); }\n:host(.tag--intent-warning.tag--contrast-medium) { background-color: var(--color-background-medium-warning); color: var(--color-foreground-strong-warning); }\n:host(.tag--intent-caution.tag--contrast-medium) { background-color: var(--color-background-medium-caution); color: var(--color-foreground-strong-caution); }\n:host(.tag--intent-positive.tag--contrast-medium) { background-color: var(--color-background-medium-positive); color: var(--color-foreground-strong-positive); }\n\n/* ── Intent × Contrast — faint ──────────────────────────────────────────── */\n\n:host(.tag--intent-neutral.tag--contrast-faint) { background-color: var(--color-background-faint-neutral); color: var(--color-foreground-bold-neutral); }\n:host(.tag--intent-brand.tag--contrast-faint) { background-color: var(--color-background-faint-brand); color: var(--color-foreground-bold-brand); }\n:host(.tag--intent-ai.tag--contrast-faint) { background-color: var(--color-background-faint-ai); color: var(--color-foreground-bold-ai); }\n:host(.tag--intent-negative.tag--contrast-faint) { background-color: var(--color-background-faint-negative); color: var(--color-foreground-bold-negative); }\n:host(.tag--intent-warning.tag--contrast-faint) { background-color: var(--color-background-faint-warning); color: var(--color-foreground-bold-warning); }\n:host(.tag--intent-caution.tag--contrast-faint) { background-color: var(--color-background-faint-caution); color: var(--color-foreground-bold-caution); }\n:host(.tag--intent-positive.tag--contrast-faint) { background-color: var(--color-background-faint-positive); color: var(--color-foreground-bold-positive); }\n\n/* ── Interactive menu trigger ───────────────────────────────────────────── */\n\n:host(.tag--interactive) {\n padding: 0;\n gap: 0;\n}\n\n.tag__button {\n all: unset;\n position: relative;\n z-index: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n min-width: 0;\n max-width: 100%;\n height: 100%;\n padding: 0 var(--ds-control-padding-inline);\n gap: var(--ds-control-gap);\n border-radius: inherit;\n color: inherit;\n cursor: default;\n}\n\n.tag__button:disabled {\n cursor: not-allowed;\n}\n\n.tag__button--expanded::after {\n background: var(--ds-interaction-pressed);\n}\n\n/* Hover/press wash stays above the Tag's semantic background. */\n\n/* ── Icons ──────────────────────────────────────────────────────────────── */\n\n.tag__prefix-icon,\n.tag__suffix-icon {\n position: relative;\n z-index: 2;\n display: inline-flex;\n flex-shrink: 0;\n width: var(--ds-control-icon);\n height: var(--ds-control-icon);\n}\n",
|
|
344
344
|
"type": "registry:ui"
|
|
345
345
|
},
|
|
346
346
|
{
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
* the inset highlight in a combined `--effect-elevation-*` box shadow.
|
|
4
4
|
*
|
|
5
5
|
* Import `@ds-mo/ui/control-elevation.css`, apply `.ds-control-elevation`, and
|
|
6
|
-
* select one level modifier.
|
|
7
|
-
*
|
|
6
|
+
* select one level modifier. Add `--press-scale` when the wrapper contains an
|
|
7
|
+
* approved press-scaling button so its surface and elevation move as one unit.
|
|
8
|
+
* The owner still supplies layout, radius, surface, and any backdrop blur.
|
|
9
|
+
* Keep wrapped controls' optional resting borders off.
|
|
8
10
|
*/
|
|
9
11
|
|
|
10
12
|
.ds-control-elevation {
|
|
@@ -38,3 +40,26 @@
|
|
|
38
40
|
--ds-control-elevation-shadow: var(--effect-shadow-elevated-floating);
|
|
39
41
|
--ds-control-elevation-highlight: var(--effect-highlight-elevated-floating);
|
|
40
42
|
}
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
* Transfer an approved button's physical press feedback to the elevated
|
|
46
|
+
* wrapper. The inherited override keeps the nested native button at rest so
|
|
47
|
+
* the wrapper and control do not compound their scale.
|
|
48
|
+
*/
|
|
49
|
+
.ds-control-elevation--press-scale {
|
|
50
|
+
--ds-control-press-active-scale: var(--dimension-scale-default);
|
|
51
|
+
|
|
52
|
+
transition: scale var(--effect-motion-short-2);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ds-control-elevation--press-scale[data-ds-press-active] {
|
|
56
|
+
scale: var(--dimension-scale-subtle);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (prefers-reduced-motion: reduce) {
|
|
60
|
+
.ds-control-elevation--press-scale,
|
|
61
|
+
.ds-control-elevation--press-scale[data-ds-press-active] {
|
|
62
|
+
scale: none;
|
|
63
|
+
transition: none;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -5,7 +5,7 @@ export type ButtonFilledIntent = 'neutral' | 'brand' | 'ai' | 'negative' | 'warn
|
|
|
5
5
|
export type ButtonFilledContrast = 'bold' | 'strong' | 'medium' | 'faint';
|
|
6
6
|
export type ButtonFilledBackground = ChoiceBackground;
|
|
7
7
|
export type ButtonFilledVariant = 'icon' | 'label' | 'icon-label';
|
|
8
|
-
export type ButtonFilledSize = 'md' | 'sm' | 'xs';
|
|
8
|
+
export type ButtonFilledSize = 'lg' | 'md' | 'sm' | 'xs';
|
|
9
9
|
export type ButtonFilledWidth = ControlWidth;
|
|
10
10
|
export declare class ButtonFilled {
|
|
11
11
|
el: HTMLElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import { type ControlWidth } from '../../utils';
|
|
3
3
|
export type InputType = 'text' | 'email' | 'tel' | 'url' | 'search' | 'password';
|
|
4
|
-
export type InputSize = 'md' | 'sm' | 'xs';
|
|
4
|
+
export type InputSize = 'lg' | 'md' | 'sm' | 'xs';
|
|
5
5
|
export type InputWidth = ControlWidth;
|
|
6
6
|
export declare class Input {
|
|
7
7
|
el: HTMLElement;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import { type ChoicePopupAnchorAlignment } from '../../utils';
|
|
2
|
+
import { type ChoicePopupAnchorAlignment, type ControlSize } from '../../utils';
|
|
3
3
|
import { type MenuAlign, type MenuSide } from './menu-position';
|
|
4
4
|
import type { MenuItemData, MenuSection } from './menu-types';
|
|
5
5
|
export type MenuSelectionMode = 'none' | 'single';
|
|
6
|
+
export type MenuSize = ControlSize;
|
|
6
7
|
import { type ShellGradientPreset } from '../../shell/shell-gradient-presets';
|
|
7
8
|
export declare class Menu {
|
|
8
9
|
el: HTMLElement;
|
|
9
10
|
open: boolean;
|
|
10
11
|
items: MenuItemData[];
|
|
12
|
+
/** Choice-row density. */
|
|
13
|
+
size: MenuSize;
|
|
11
14
|
/** Give ordinary rows mutually-exclusive menu semantics using isSelected. */
|
|
12
15
|
selectionMode: MenuSelectionMode;
|
|
13
16
|
sections: MenuSection[];
|
|
@@ -15,8 +15,19 @@ export declare class MobileBarNav {
|
|
|
15
15
|
searchDot: boolean;
|
|
16
16
|
agentsDot: boolean;
|
|
17
17
|
inboxDot: boolean;
|
|
18
|
+
private pressedItemId;
|
|
18
19
|
dsSheetNavToggle: EventEmitter<boolean>;
|
|
19
20
|
dsDestinationChange: EventEmitter<MobileBarNavDestinationDetail>;
|
|
21
|
+
private activePointerId;
|
|
22
|
+
private pressedAt;
|
|
23
|
+
private pressClearTimer;
|
|
24
|
+
disconnectedCallback(): void;
|
|
25
|
+
private clearPressTimer;
|
|
26
|
+
private clearPressedItem;
|
|
27
|
+
private beginDirectPress;
|
|
28
|
+
private finishDirectPress;
|
|
29
|
+
private cancelDirectPress;
|
|
30
|
+
private pressHandlers;
|
|
20
31
|
private destinationConfig;
|
|
21
32
|
private selectDestination;
|
|
22
33
|
focusDestination(destination: MobileDestination | 'sheet-nav'): Promise<void>;
|
|
@@ -17,7 +17,6 @@ export declare class MobileSheetNav {
|
|
|
17
17
|
dsBrowseContextChange: EventEmitter<NavChromeStyle>;
|
|
18
18
|
dsClose: EventEmitter<void>;
|
|
19
19
|
private get groups();
|
|
20
|
-
private get items();
|
|
21
20
|
private get activeId();
|
|
22
21
|
handleOpenChange(open: boolean): void;
|
|
23
22
|
handleKeyDown(event: KeyboardEvent): void;
|
|
@@ -4,7 +4,7 @@ import { type ChoiceBackground, type ChoiceOption, type ChoiceSection } from '..
|
|
|
4
4
|
export type SelectOption = ChoiceOption;
|
|
5
5
|
export type SelectSection = ChoiceSection;
|
|
6
6
|
export type SelectBackground = ChoiceBackground;
|
|
7
|
-
export type SelectSize = 'md' | 'sm' | 'xs';
|
|
7
|
+
export type SelectSize = 'lg' | 'md' | 'sm' | 'xs';
|
|
8
8
|
export type SelectWidth = ControlWidth;
|
|
9
9
|
export declare class Select {
|
|
10
10
|
el: HTMLElement;
|
|
@@ -82,15 +82,9 @@ export declare class Select {
|
|
|
82
82
|
private readonly generatedId;
|
|
83
83
|
private readonly listboxId;
|
|
84
84
|
private readonly errorId;
|
|
85
|
-
private triggerEl;
|
|
86
|
-
private popupEl;
|
|
87
|
-
private searchEl;
|
|
88
85
|
private initialValue;
|
|
89
|
-
private
|
|
90
|
-
private
|
|
91
|
-
private outsideHandler;
|
|
92
|
-
private repositionHandler;
|
|
93
|
-
private positionRetryRaf;
|
|
86
|
+
private readonly controller;
|
|
87
|
+
private createController;
|
|
94
88
|
componentWillLoad(): void;
|
|
95
89
|
componentDidLoad(): void;
|
|
96
90
|
disconnectedCallback(): void;
|
|
@@ -111,23 +105,12 @@ export declare class Select {
|
|
|
111
105
|
private get selectedOption();
|
|
112
106
|
private get hasSelection();
|
|
113
107
|
private get activeOptionId();
|
|
114
|
-
private scrollActiveOptionIntoView;
|
|
115
|
-
private bindPopupListeners;
|
|
116
|
-
private unbindPopupListeners;
|
|
117
|
-
private cancelPositionRetry;
|
|
118
|
-
/** Retry until the conditionally rendered popup is mounted and measurable. */
|
|
119
|
-
private schedulePositionUpdate;
|
|
120
|
-
/** @returns `true` when the current popup was found and positioned. */
|
|
121
|
-
private updatePosition;
|
|
122
|
-
private openPopup;
|
|
123
108
|
private closePopup;
|
|
109
|
+
private openPopup;
|
|
124
110
|
private selectOption;
|
|
125
111
|
private clearSelection;
|
|
126
|
-
private
|
|
127
|
-
private
|
|
128
|
-
private handleTypeahead;
|
|
129
|
-
private handleListKeyDown;
|
|
130
|
-
private handleTriggerKeyDown;
|
|
112
|
+
private readonly handleListKeyDown;
|
|
113
|
+
private readonly handleTriggerKeyDown;
|
|
131
114
|
private renderOption;
|
|
132
115
|
render(): any;
|
|
133
116
|
}
|
|
@@ -86,15 +86,9 @@ export declare class SelectMulti {
|
|
|
86
86
|
private readonly generatedId;
|
|
87
87
|
private readonly listboxId;
|
|
88
88
|
private readonly errorId;
|
|
89
|
-
private triggerEl;
|
|
90
|
-
private popupEl;
|
|
91
|
-
private searchEl;
|
|
92
89
|
private initialValues;
|
|
93
|
-
private
|
|
94
|
-
private
|
|
95
|
-
private outsideHandler;
|
|
96
|
-
private repositionHandler;
|
|
97
|
-
private positionRetryRaf;
|
|
90
|
+
private readonly controller;
|
|
91
|
+
private createController;
|
|
98
92
|
componentWillLoad(): void;
|
|
99
93
|
componentDidLoad(): void;
|
|
100
94
|
disconnectedCallback(): void;
|
|
@@ -115,21 +109,12 @@ export declare class SelectMulti {
|
|
|
115
109
|
private get resolvedValues();
|
|
116
110
|
private get hasSelection();
|
|
117
111
|
private get activeOptionId();
|
|
118
|
-
private scrollActiveOptionIntoView;
|
|
119
|
-
private bindPopupListeners;
|
|
120
|
-
private unbindPopupListeners;
|
|
121
|
-
private cancelPositionRetry;
|
|
122
|
-
/** Retry until the conditionally rendered popup is mounted and measurable. */
|
|
123
|
-
private schedulePositionUpdate;
|
|
124
|
-
/** @returns `true` when the current popup was found and positioned. */
|
|
125
|
-
private updatePosition;
|
|
126
|
-
private openPopup;
|
|
127
112
|
private closePopup;
|
|
113
|
+
private openPopup;
|
|
128
114
|
private toggleOption;
|
|
129
115
|
private clearSelection;
|
|
130
|
-
private
|
|
131
|
-
private
|
|
132
|
-
private handleTriggerKeyDown;
|
|
116
|
+
private readonly handleListKeyDown;
|
|
117
|
+
private readonly handleTriggerKeyDown;
|
|
133
118
|
private renderOption;
|
|
134
119
|
render(): any;
|
|
135
120
|
}
|
|
@@ -18,6 +18,7 @@ export declare class ShellTools {
|
|
|
18
18
|
toolShortcutsLabel: string;
|
|
19
19
|
inboxLabel: string;
|
|
20
20
|
inboxNavigationLabel: string;
|
|
21
|
+
presentationChanged(next: 'drawer' | 'fullscreen', previous: 'drawer' | 'fullscreen'): void;
|
|
21
22
|
dsToolChange: EventEmitter<{
|
|
22
23
|
id: PanelToolsToolId;
|
|
23
24
|
selected: boolean;
|
|
@@ -33,7 +33,7 @@ import { IconColor as IconColor1, IconSize } from "./components/Icon/Icon";
|
|
|
33
33
|
import { InputSize, InputType, InputWidth } from "./components/Input/Input";
|
|
34
34
|
import { LoaderColor, LoaderSize } from "./components/Loader/Loader";
|
|
35
35
|
import { MenuItemData, MenuSection } from "./components/Menu/menu-types";
|
|
36
|
-
import { MenuSelectionMode } from "./components/Menu/Menu";
|
|
36
|
+
import { MenuSelectionMode, MenuSize } from "./components/Menu/Menu";
|
|
37
37
|
import { MenuAlign, MenuSide } from "./components/Menu/menu-position";
|
|
38
38
|
import { ChoicePopupAnchorAlignment } from "./utils";
|
|
39
39
|
import { ShellGradientPreset } from "./shell/shell-gradient-presets";
|
|
@@ -92,7 +92,7 @@ export { IconColor as IconColor1, IconSize } from "./components/Icon/Icon";
|
|
|
92
92
|
export { InputSize, InputType, InputWidth } from "./components/Input/Input";
|
|
93
93
|
export { LoaderColor, LoaderSize } from "./components/Loader/Loader";
|
|
94
94
|
export { MenuItemData, MenuSection } from "./components/Menu/menu-types";
|
|
95
|
-
export { MenuSelectionMode } from "./components/Menu/Menu";
|
|
95
|
+
export { MenuSelectionMode, MenuSize } from "./components/Menu/Menu";
|
|
96
96
|
export { MenuAlign, MenuSide } from "./components/Menu/menu-position";
|
|
97
97
|
export { ChoicePopupAnchorAlignment } from "./utils";
|
|
98
98
|
export { ShellGradientPreset } from "./shell/shell-gradient-presets";
|
|
@@ -1276,6 +1276,11 @@ export namespace Components {
|
|
|
1276
1276
|
* @default TOKEN_CSS_LENGTHS.space050
|
|
1277
1277
|
*/
|
|
1278
1278
|
"sideOffset": number | string;
|
|
1279
|
+
/**
|
|
1280
|
+
* Choice-row density.
|
|
1281
|
+
* @default 'md'
|
|
1282
|
+
*/
|
|
1283
|
+
"size": MenuSize;
|
|
1279
1284
|
}
|
|
1280
1285
|
interface DsMessage {
|
|
1281
1286
|
/**
|
|
@@ -5350,6 +5355,11 @@ declare namespace LocalJSX {
|
|
|
5350
5355
|
* @default TOKEN_CSS_LENGTHS.space050
|
|
5351
5356
|
*/
|
|
5352
5357
|
"sideOffset"?: number | string;
|
|
5358
|
+
/**
|
|
5359
|
+
* Choice-row density.
|
|
5360
|
+
* @default 'md'
|
|
5361
|
+
*/
|
|
5362
|
+
"size"?: MenuSize;
|
|
5353
5363
|
}
|
|
5354
5364
|
interface DsMessage {
|
|
5355
5365
|
/**
|
|
@@ -7310,6 +7320,7 @@ declare namespace LocalJSX {
|
|
|
7310
7320
|
}
|
|
7311
7321
|
interface DsMenuAttributes {
|
|
7312
7322
|
"open": boolean;
|
|
7323
|
+
"size": MenuSize;
|
|
7313
7324
|
"selectionMode": MenuSelectionMode;
|
|
7314
7325
|
"side": MenuSide;
|
|
7315
7326
|
"align": MenuAlign;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { FunctionalComponent, VNode } from '../stencil-public-runtime';
|
|
2
2
|
import type { ChoiceOption } from './choice-list';
|
|
3
|
+
import { type ControlSize } from './control-text';
|
|
3
4
|
interface ChoiceSearchProps {
|
|
5
|
+
size?: ControlSize;
|
|
4
6
|
value: string;
|
|
5
7
|
placeholder: string;
|
|
6
8
|
ariaLabel?: string;
|
|
@@ -15,12 +17,14 @@ interface ChoiceSearchProps {
|
|
|
15
17
|
}
|
|
16
18
|
export declare const ChoiceSearch: FunctionalComponent<ChoiceSearchProps>;
|
|
17
19
|
interface ChoiceFooterProps {
|
|
20
|
+
size?: ControlSize;
|
|
18
21
|
clearLabel: string;
|
|
19
22
|
summary?: string;
|
|
20
23
|
onClear: (event: MouseEvent) => void;
|
|
21
24
|
}
|
|
22
25
|
export declare const ChoiceFooter: FunctionalComponent<ChoiceFooterProps>;
|
|
23
26
|
interface ChoiceOptionRowProps {
|
|
27
|
+
size?: ControlSize;
|
|
24
28
|
id: string;
|
|
25
29
|
option: ChoiceOption;
|
|
26
30
|
selected: boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transfers an eligible button pointer press to its elevated wrapper.
|
|
3
|
+
*
|
|
4
|
+
* The wrapper cannot rely on `:active`: Chromium also activates ancestors of a
|
|
5
|
+
* disabled native button. Window-level release cleanup preserves the native
|
|
6
|
+
* release-outside behavior without changing pointer capture or click delivery.
|
|
7
|
+
*/
|
|
8
|
+
export declare function beginElevatedControlPress(event: PointerEvent, eligible: boolean): void;
|
|
9
|
+
//# sourceMappingURL=control-press.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { TextVariant } from '../components/Text/text-types';
|
|
2
2
|
/** Shared public control sizes. Typography is derived; it is not a separate density API. */
|
|
3
|
-
export type ControlSize = 'md' | 'sm' | 'xs';
|
|
3
|
+
export type ControlSize = 'lg' | 'md' | 'sm' | 'xs';
|
|
4
4
|
/** Complete text variant selected internally by each control size. */
|
|
5
5
|
export declare const CONTROL_TEXT_VARIANT: Record<ControlSize, TextVariant>;
|
|
6
|
+
/** Supporting copy paired with each control density in two-line choice rows. */
|
|
7
|
+
export declare const CONTROL_SUPPORTING_TEXT_VARIANT: Record<ControlSize, TextVariant>;
|
|
6
8
|
//# sourceMappingURL=control-text.d.ts.map
|
|
@@ -12,7 +12,7 @@ export type { TokenDefaultKey } from './token-defaults';
|
|
|
12
12
|
export { DEFAULT_REQUIRED_MESSAGE, setRequiredValidity } from './required-validity';
|
|
13
13
|
export { controlWidthClass } from './control-width';
|
|
14
14
|
export type { ControlWidth } from './control-width';
|
|
15
|
-
export { CONTROL_TEXT_VARIANT } from './control-text';
|
|
15
|
+
export { CONTROL_SUPPORTING_TEXT_VARIANT, CONTROL_TEXT_VARIANT } from './control-text';
|
|
16
16
|
export type { ControlSize } from './control-text';
|
|
17
17
|
export { choicePopupMinWidth, resolveChoicePopupAlignOffset, } from './choice-popup-alignment';
|
|
18
18
|
export type { ChoicePopupAnchorAlignment } from './choice-popup-alignment';
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type ChoiceOption } from './choice-list';
|
|
2
|
+
type PopupPosition = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
};
|
|
6
|
+
export interface SelectControllerState<T extends ChoiceOption> {
|
|
7
|
+
readonly host: HTMLElement;
|
|
8
|
+
readonly generatedId: string;
|
|
9
|
+
readonly options: T[];
|
|
10
|
+
readonly searchable: boolean;
|
|
11
|
+
readonly isLoading: boolean;
|
|
12
|
+
readonly isDisabled: boolean;
|
|
13
|
+
readonly preferredIndex: number;
|
|
14
|
+
open: boolean;
|
|
15
|
+
activeIndex: number;
|
|
16
|
+
searchTerm: string;
|
|
17
|
+
focusRingVisible: boolean;
|
|
18
|
+
position: PopupPosition;
|
|
19
|
+
positionReady: boolean;
|
|
20
|
+
selectOption(option: T): void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Shared Select/SelectMulti interaction controller.
|
|
24
|
+
*
|
|
25
|
+
* Decorated Stencil state and scalar/array selection remain in each component;
|
|
26
|
+
* this controller owns only popup lifecycle, focus, positioning, typeahead,
|
|
27
|
+
* and listbox keyboard traversal.
|
|
28
|
+
*/
|
|
29
|
+
export declare class SelectController<T extends ChoiceOption> {
|
|
30
|
+
private readonly state;
|
|
31
|
+
private triggerEl;
|
|
32
|
+
private popupEl;
|
|
33
|
+
private searchEl;
|
|
34
|
+
private typeahead;
|
|
35
|
+
private typeaheadTimer;
|
|
36
|
+
private outsideHandler;
|
|
37
|
+
private repositionHandler;
|
|
38
|
+
private positionRetryRaf;
|
|
39
|
+
constructor(state: SelectControllerState<T>);
|
|
40
|
+
get activeOptionId(): string | undefined;
|
|
41
|
+
setTriggerElement: (element: HTMLButtonElement | null) => void;
|
|
42
|
+
setPopupElement: (element: HTMLDivElement | null) => void;
|
|
43
|
+
setSearchElement: (element: HTMLInputElement | null) => void;
|
|
44
|
+
connect(): void;
|
|
45
|
+
disconnect(): void;
|
|
46
|
+
setFocus(): void;
|
|
47
|
+
optionsChanged(): void;
|
|
48
|
+
loadingChanged(): void;
|
|
49
|
+
openChanged(open: boolean): void;
|
|
50
|
+
searchChanged(): void;
|
|
51
|
+
activeIndexChanged(): void;
|
|
52
|
+
openPopup(focusVisible: boolean, edge?: 'first' | 'last'): void;
|
|
53
|
+
closePopup(restoreFocus?: boolean): void;
|
|
54
|
+
focusSearchOrTrigger(): void;
|
|
55
|
+
handleTriggerKeyDown: (event: KeyboardEvent) => void;
|
|
56
|
+
handleListKeyDown: (event: KeyboardEvent) => void;
|
|
57
|
+
private isTypeaheadKey;
|
|
58
|
+
private handleTypeahead;
|
|
59
|
+
private scrollActiveOptionIntoView;
|
|
60
|
+
private bindPopupListeners;
|
|
61
|
+
private unbindPopupListeners;
|
|
62
|
+
private cancelPositionRetry;
|
|
63
|
+
private schedulePositionUpdate;
|
|
64
|
+
private updatePosition;
|
|
65
|
+
}
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=select-controller.d.ts.map
|