@ds-mo/ui 9.0.0 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/dist/.build-stamp +1 -1
- package/dist/agent-patterns.json +233 -0
- package/dist/agent.json +155 -19
- package/dist/angular/ds-menu.d.ts +6 -1
- package/dist/angular/ds-menu.js +7 -4
- package/dist/angular/ds-swatch-picker.d.ts +15 -0
- package/dist/angular/ds-swatch-picker.js +42 -0
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.js +1 -0
- package/dist/angular/proxies.d.ts +1 -0
- package/dist/angular/proxies.js +1 -0
- package/dist/components/ds-app-shell.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-menu.js +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-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-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-slider.js +1 -1
- package/dist/components/ds-slider.js.map +1 -1
- package/dist/components/ds-swatch-picker.d.ts +11 -0
- package/dist/components/ds-swatch-picker.js +2 -0
- package/dist/components/ds-swatch-picker.js.map +1 -0
- package/dist/components/ds-tooltip-data-viz.js +1 -1
- package/dist/components/p-D1HFMTdC.js +2 -0
- package/dist/components/p-D1HFMTdC.js.map +1 -0
- package/dist/components/p-HBIxvS5C.js +2 -0
- package/dist/components/p-HBIxvS5C.js.map +1 -0
- package/dist/components/p-l6PmnW_P.js +2 -0
- package/dist/components/p-l6PmnW_P.js.map +1 -0
- package/dist/components/p-tQ1QHeOE.js +2 -0
- package/dist/components/p-tQ1QHeOE.js.map +1 -0
- package/dist/docs/components.json +268 -30
- package/dist/lib/components/Menu/menu-placement.d.ts +6 -3
- package/dist/lib/shell/index.d.ts +2 -2
- package/dist/lib/shell/index.js +40 -39
- package/dist/lib/shell/index.js.map +3 -3
- package/dist/lib/shell/shell-gradient-presets.d.ts +15 -0
- package/dist/lib/utils/choice-popup-alignment.d.ts +20 -0
- package/dist/lib/utils/index.d.ts +2 -0
- package/dist/lib/utils/index.js +16 -0
- package/dist/lib/utils/index.js.map +3 -3
- package/dist/mcp/cli.js +31409 -0
- package/dist/mcp-data/registry/app-shell.json +210 -0
- package/dist/mcp-data/registry/badge.json +289 -0
- package/dist/mcp-data/registry/banner.json +206 -0
- package/dist/mcp-data/registry/bar-nav.json +341 -0
- package/dist/mcp-data/registry/button-filled.json +386 -0
- package/dist/mcp-data/registry/button-unfilled.json +537 -0
- package/dist/mcp-data/registry/card-data-viz-donut.json +143 -0
- package/dist/mcp-data/registry/card-setting.json +194 -0
- package/dist/mcp-data/registry/card-shell-data-viz.json +173 -0
- package/dist/mcp-data/registry/card.json +126 -0
- package/dist/mcp-data/registry/chart-bar.json +121 -0
- package/dist/mcp-data/registry/chart-donut.json +257 -0
- package/dist/mcp-data/registry/chart-legend.json +209 -0
- package/dist/mcp-data/registry/chart-line.json +153 -0
- package/dist/mcp-data/registry/checkbox.json +361 -0
- package/dist/mcp-data/registry/chip.json +276 -0
- package/dist/mcp-data/registry/divider.json +225 -0
- package/dist/mcp-data/registry/empty-state.json +197 -0
- package/dist/mcp-data/registry/field.json +222 -0
- package/dist/mcp-data/registry/icon.json +242 -0
- package/dist/mcp-data/registry/input.json +597 -0
- package/dist/mcp-data/registry/loader.json +192 -0
- package/dist/mcp-data/registry/menu.json +459 -0
- package/dist/mcp-data/registry/modal.json +150 -0
- package/dist/mcp-data/registry/panel-nav.json +622 -0
- package/dist/mcp-data/registry/panel-sub-nav.json +249 -0
- package/dist/mcp-data/registry/panel-tools.json +374 -0
- package/dist/mcp-data/registry/radio.json +374 -0
- package/dist/mcp-data/registry/registry.json +5389 -0
- package/dist/mcp-data/registry/select-multi.json +755 -0
- package/dist/mcp-data/registry/select.json +740 -0
- package/dist/mcp-data/registry/shell-gradient-picker.json +195 -0
- package/dist/mcp-data/registry/shell-gradient-swatch.json +215 -0
- package/dist/mcp-data/registry/skeleton.json +282 -0
- package/dist/mcp-data/registry/slider.json +657 -0
- package/dist/mcp-data/registry/swatch-picker.json +231 -0
- package/dist/mcp-data/registry/switch.json +361 -0
- package/dist/mcp-data/registry/tab-group.json +255 -0
- package/dist/mcp-data/registry/tag.json +352 -0
- package/dist/mcp-data/registry/text.json +371 -0
- package/dist/mcp-data/registry/tooltip-data-viz.json +158 -0
- package/dist/mcp-data/registry/tooltip.json +311 -0
- package/dist/react/components.d.ts +1 -0
- package/dist/react/components.js +1 -0
- package/dist/react/ds-menu.d.ts +1 -0
- package/dist/react/ds-menu.js +2 -1
- package/dist/react/ds-swatch-picker.d.ts +12 -0
- package/dist/react/ds-swatch-picker.js +12 -0
- package/dist/types/components/Menu/Menu.d.ts +7 -1
- package/dist/types/components/Menu/menu-placement.d.ts +6 -3
- package/dist/types/components/Menu/menu-types.d.ts +14 -1
- package/dist/types/components/ShellGradientPicker/ShellGradientPicker.d.ts +2 -5
- package/dist/types/components/ShellGradientSwatch/ShellGradientSwatch.d.ts +1 -0
- package/dist/types/components/SwatchPicker/SwatchPicker.d.ts +21 -0
- package/dist/types/components/SwatchPicker/swatch-picker-types.d.ts +26 -0
- package/dist/types/components.d.ts +117 -0
- package/dist/types/shell/index.d.ts +2 -2
- package/dist/types/shell/shell-gradient-presets.d.ts +15 -0
- package/dist/types/utils/choice-popup-alignment.d.ts +21 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/package.json +6 -2
- package/dist/components/p-Bafp65bw.js +0 -2
- package/dist/components/p-Bafp65bw.js.map +0 -1
- package/dist/components/p-BdnR3jxi.js +0 -2
- package/dist/components/p-BdnR3jxi.js.map +0 -1
- package/dist/components/p-C_cu-HIT.js +0 -2
- package/dist/components/p-C_cu-HIT.js.map +0 -1
- package/dist/components/p-D0B9uDTP.js +0 -2
- package/dist/components/p-D0B9uDTP.js.map +0 -1
- package/dist/components/p-DF0yLZG_.js +0 -2
- package/dist/components/p-DF0yLZG_.js.map +0 -1
|
@@ -0,0 +1,537 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "button-unfilled",
|
|
4
|
+
"title": "ButtonUnfilled",
|
|
5
|
+
"description": "Secondary command and compact chrome button with optional persistent toggle state, surface-aware interaction treatment, and async progress.",
|
|
6
|
+
"type": "registry:ui",
|
|
7
|
+
"meta": {
|
|
8
|
+
"library": "@ds-mo/ui",
|
|
9
|
+
"distribution": "npm",
|
|
10
|
+
"storybook": "https://zainadeel.github.io/compomo/?path=/story/button-unfilled",
|
|
11
|
+
"source": "src/wc/components/ButtonUnfilled/ButtonUnfilled.tsx",
|
|
12
|
+
"intentStatus": "complete",
|
|
13
|
+
"intent": {
|
|
14
|
+
"audience": "general",
|
|
15
|
+
"status": "stable",
|
|
16
|
+
"summary": "Secondary command and compact chrome button with optional persistent toggle state, surface-aware interaction treatment, and async progress.",
|
|
17
|
+
"useWhen": [
|
|
18
|
+
"A secondary command accompanies the single filled primary action in a local decision area.",
|
|
19
|
+
"A toolbar, tool rail, overflow area, or shell region needs a compact icon action.",
|
|
20
|
+
"A command represents a persistent toggle or mode whose active state remains meaningful after activation."
|
|
21
|
+
],
|
|
22
|
+
"avoidWhen": [
|
|
23
|
+
"The command is the single primary action in a local decision area; use ButtonFilled instead.",
|
|
24
|
+
"The control selects an application destination or local content panel; use the matching navigation component.",
|
|
25
|
+
"Active styling would only indicate the most recently invoked command or add decorative emphasis.",
|
|
26
|
+
"Surface context would be used to make the action louder or quieter rather than describe its actual parent surface."
|
|
27
|
+
],
|
|
28
|
+
"alternatives": [
|
|
29
|
+
{
|
|
30
|
+
"when": "The command is the single primary action in the decision area.",
|
|
31
|
+
"component": "component:ds-button-filled",
|
|
32
|
+
"reason": "ButtonFilled owns highest-emphasis commands."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"when": "The choices are persistent application destinations.",
|
|
36
|
+
"component": "component:ds-panel-nav",
|
|
37
|
+
"reason": "PanelNav owns primary route selection and navigation semantics."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"when": "The choices are transient commands or contextual options.",
|
|
41
|
+
"component": "component:ds-menu",
|
|
42
|
+
"reason": "Menu owns temporary popup collections and their keyboard model."
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"commonlyComposedWith": [
|
|
46
|
+
"component:ds-button-filled",
|
|
47
|
+
"component:ds-menu",
|
|
48
|
+
"component:ds-panel-tools"
|
|
49
|
+
],
|
|
50
|
+
"patterns": [
|
|
51
|
+
"pattern:menu-trigger"
|
|
52
|
+
],
|
|
53
|
+
"accessibility": [
|
|
54
|
+
"Provide an explicit accessible name for every icon-only action.",
|
|
55
|
+
"Use active state only for a persistent toggle or mode, and synchronize pressed semantics unless an owning composite exposes the selection state.",
|
|
56
|
+
"Treat notification dots as supplemental unread or status information; never use a dot as the sole state, meaning, or accessible name.",
|
|
57
|
+
"Loading keeps the action focused and named, exposes busy and disabled state, and blocks activation; announce broader operation progress from the owning workflow when needed.",
|
|
58
|
+
"Use inactive state only when an unavailable action must remain visible.",
|
|
59
|
+
"For form submission, use native submit behavior and handle the form submit event rather than submitting from the button click event."
|
|
60
|
+
],
|
|
61
|
+
"states": [
|
|
62
|
+
"General content UI keeps the selected interaction fill and border for persistent active state.",
|
|
63
|
+
"Shell, navigation, and tool-rail chrome uses foreground-only active state with no selected fill or border.",
|
|
64
|
+
"The omitted default surface treatment is for primary and secondary parent surfaces and uses the brand-active selected fill; pass faint explicitly on faint surfaces to use the neutral active fill.",
|
|
65
|
+
"Surface context must match the actual parent surface; translucent, inverted, media, and always-dark treatments are reserved for those surfaces.",
|
|
66
|
+
"Loading prevents duplicate activation without applying inactive opacity or removing the current keyboard focus.",
|
|
67
|
+
"Rounded changes only the control radius to the half-radius treatment; it does not change hierarchy, size, variant, or interaction semantics.",
|
|
68
|
+
"Icon and icon-label loading replace the icon in place. Label-only loading centers the loader while preserving the button's measured width."
|
|
69
|
+
],
|
|
70
|
+
"responsiveBehavior": [
|
|
71
|
+
"The consuming layout decides when an icon-label action becomes icon-only and must provide an explicit accessible name after changing variants.",
|
|
72
|
+
"Use fill width only when the parent layout requires a full-width secondary action."
|
|
73
|
+
],
|
|
74
|
+
"frameworkCaveats": {
|
|
75
|
+
"customElements": [
|
|
76
|
+
"For form submission, use the native submit type and listen to the form submit event; use dsClick for non-submit commands.",
|
|
77
|
+
"Roving-focus composites own the button's tab-stop placement and selection semantics."
|
|
78
|
+
],
|
|
79
|
+
"react": [
|
|
80
|
+
"Keep active, pressed, and async state synchronized from the owning toolbar or workflow."
|
|
81
|
+
],
|
|
82
|
+
"angular": [
|
|
83
|
+
"Keep active, pressed, and async state synchronized from the owning toolbar or workflow."
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
"references": [
|
|
87
|
+
{
|
|
88
|
+
"label": "Storybook examples",
|
|
89
|
+
"path": "src/wc/components/ButtonUnfilled/ButtonUnfilled.stories.ts"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"api": {
|
|
94
|
+
"props": {
|
|
95
|
+
"activeFill": {
|
|
96
|
+
"type": "boolean",
|
|
97
|
+
"resolvedType": "boolean",
|
|
98
|
+
"attribute": "active-fill",
|
|
99
|
+
"default": "true",
|
|
100
|
+
"required": false,
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"description": "When active, render the selected interaction fill.\nDefault `true` for general UI. Shell chrome (nav / tool rails) should pass\n`false` so selection is foreground-only (primary color, no fill)."
|
|
103
|
+
},
|
|
104
|
+
"ariaLabel": {
|
|
105
|
+
"type": "string | null",
|
|
106
|
+
"resolvedType": "null | string",
|
|
107
|
+
"attribute": "aria-label",
|
|
108
|
+
"default": "null",
|
|
109
|
+
"required": false,
|
|
110
|
+
"mutable": false,
|
|
111
|
+
"description": "Accessible name override. Required for icon-only buttons."
|
|
112
|
+
},
|
|
113
|
+
"background": {
|
|
114
|
+
"type": "ButtonUnfilledBackground | undefined",
|
|
115
|
+
"resolvedType": "\"always-dark\" | \"bold\" | \"faint\" | \"inverted\" | \"media\" | \"medium\" | \"strong\" | \"translucent\" | undefined",
|
|
116
|
+
"attribute": "background",
|
|
117
|
+
"required": false,
|
|
118
|
+
"mutable": false,
|
|
119
|
+
"description": "Actual parent surface context. Omit on primary and secondary surfaces."
|
|
120
|
+
},
|
|
121
|
+
"controls": {
|
|
122
|
+
"type": "string | undefined",
|
|
123
|
+
"resolvedType": "string | undefined",
|
|
124
|
+
"attribute": "controls",
|
|
125
|
+
"required": false,
|
|
126
|
+
"mutable": false
|
|
127
|
+
},
|
|
128
|
+
"dot": {
|
|
129
|
+
"type": "boolean",
|
|
130
|
+
"resolvedType": "boolean",
|
|
131
|
+
"attribute": "dot",
|
|
132
|
+
"default": "false",
|
|
133
|
+
"required": false,
|
|
134
|
+
"mutable": false,
|
|
135
|
+
"description": "Show a notification dot at the top-right of the icon zone (icon variant only)."
|
|
136
|
+
},
|
|
137
|
+
"expanded": {
|
|
138
|
+
"type": "boolean | undefined",
|
|
139
|
+
"resolvedType": "boolean | undefined",
|
|
140
|
+
"attribute": "expanded",
|
|
141
|
+
"required": false,
|
|
142
|
+
"mutable": false
|
|
143
|
+
},
|
|
144
|
+
"focusTabIndex": {
|
|
145
|
+
"type": "number",
|
|
146
|
+
"resolvedType": "number | undefined",
|
|
147
|
+
"attribute": "tab-index",
|
|
148
|
+
"required": false,
|
|
149
|
+
"mutable": false,
|
|
150
|
+
"description": "Native `tabindex` for roving keyboard groups in shell chrome.\nOmit for the default button tab stop (`0`)."
|
|
151
|
+
},
|
|
152
|
+
"hasBorder": {
|
|
153
|
+
"type": "boolean",
|
|
154
|
+
"resolvedType": "boolean",
|
|
155
|
+
"attribute": "has-border",
|
|
156
|
+
"default": "true",
|
|
157
|
+
"required": false,
|
|
158
|
+
"mutable": false,
|
|
159
|
+
"description": "Show a 1px secondary inset border. Default on; shell chrome can pass `false`."
|
|
160
|
+
},
|
|
161
|
+
"haspopup": {
|
|
162
|
+
"type": "ButtonUnfilledPopup | undefined",
|
|
163
|
+
"resolvedType": "\"dialog\" | \"grid\" | \"listbox\" | \"menu\" | \"tree\" | \"true\" | undefined",
|
|
164
|
+
"attribute": "haspopup",
|
|
165
|
+
"required": false,
|
|
166
|
+
"mutable": false
|
|
167
|
+
},
|
|
168
|
+
"icon": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"resolvedType": "string",
|
|
171
|
+
"attribute": "icon",
|
|
172
|
+
"default": "''",
|
|
173
|
+
"required": false,
|
|
174
|
+
"mutable": false,
|
|
175
|
+
"description": "Icon name passed to <ds-icon> for `icon` / `icon-label` variants."
|
|
176
|
+
},
|
|
177
|
+
"isActive": {
|
|
178
|
+
"type": "boolean",
|
|
179
|
+
"resolvedType": "boolean",
|
|
180
|
+
"attribute": "is-active",
|
|
181
|
+
"default": "false",
|
|
182
|
+
"required": false,
|
|
183
|
+
"mutable": false,
|
|
184
|
+
"description": "Active/selected visual state. Always promotes foreground to primary."
|
|
185
|
+
},
|
|
186
|
+
"isInactive": {
|
|
187
|
+
"type": "boolean",
|
|
188
|
+
"resolvedType": "boolean",
|
|
189
|
+
"attribute": "is-inactive",
|
|
190
|
+
"default": "false",
|
|
191
|
+
"required": false,
|
|
192
|
+
"mutable": false,
|
|
193
|
+
"description": "Disables interaction."
|
|
194
|
+
},
|
|
195
|
+
"isLoading": {
|
|
196
|
+
"type": "boolean",
|
|
197
|
+
"resolvedType": "boolean",
|
|
198
|
+
"attribute": "is-loading",
|
|
199
|
+
"default": "false",
|
|
200
|
+
"required": false,
|
|
201
|
+
"mutable": false,
|
|
202
|
+
"description": "Shows an inline loader and prevents interaction without applying inactive opacity."
|
|
203
|
+
},
|
|
204
|
+
"label": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"resolvedType": "string",
|
|
207
|
+
"attribute": "label",
|
|
208
|
+
"default": "''",
|
|
209
|
+
"required": false,
|
|
210
|
+
"mutable": false,
|
|
211
|
+
"description": "Visible text for `label` / `icon-label` variants."
|
|
212
|
+
},
|
|
213
|
+
"pressed": {
|
|
214
|
+
"type": "boolean | undefined",
|
|
215
|
+
"resolvedType": "boolean | undefined",
|
|
216
|
+
"attribute": "pressed",
|
|
217
|
+
"required": false,
|
|
218
|
+
"mutable": false
|
|
219
|
+
},
|
|
220
|
+
"rounded": {
|
|
221
|
+
"type": "boolean",
|
|
222
|
+
"resolvedType": "boolean",
|
|
223
|
+
"attribute": "rounded",
|
|
224
|
+
"default": "false",
|
|
225
|
+
"required": false,
|
|
226
|
+
"mutable": false,
|
|
227
|
+
"description": "Use the half-radius treatment instead of the default control radius."
|
|
228
|
+
},
|
|
229
|
+
"size": {
|
|
230
|
+
"type": "ButtonUnfilledSize",
|
|
231
|
+
"resolvedType": "\"md\" | \"sm\" | \"xs\"",
|
|
232
|
+
"attribute": "size",
|
|
233
|
+
"default": "'md'",
|
|
234
|
+
"required": false,
|
|
235
|
+
"mutable": false,
|
|
236
|
+
"description": "Control density (height, padding, icon, type)."
|
|
237
|
+
},
|
|
238
|
+
"type": {
|
|
239
|
+
"type": "'button' | 'submit' | 'reset'",
|
|
240
|
+
"resolvedType": "\"button\" | \"reset\" | \"submit\"",
|
|
241
|
+
"attribute": "type",
|
|
242
|
+
"default": "'button'",
|
|
243
|
+
"required": false,
|
|
244
|
+
"mutable": false,
|
|
245
|
+
"description": "Native button type."
|
|
246
|
+
},
|
|
247
|
+
"variant": {
|
|
248
|
+
"type": "ButtonUnfilledVariant",
|
|
249
|
+
"resolvedType": "\"icon\" | \"icon-label\" | \"label\"",
|
|
250
|
+
"attribute": "variant",
|
|
251
|
+
"default": "'label'",
|
|
252
|
+
"required": false,
|
|
253
|
+
"mutable": false,
|
|
254
|
+
"description": "Content layout. Default is label-only; pass `icon` for icon-only chrome\n(nav / tool rails) or `icon-label` for leading icon + text."
|
|
255
|
+
},
|
|
256
|
+
"width": {
|
|
257
|
+
"type": "ButtonUnfilledWidth",
|
|
258
|
+
"resolvedType": "\"fill\" | \"hug\"",
|
|
259
|
+
"attribute": "width",
|
|
260
|
+
"default": "'hug'",
|
|
261
|
+
"required": false,
|
|
262
|
+
"mutable": false,
|
|
263
|
+
"description": "Width fit — hug content (default) or fill the parent."
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"events": [
|
|
267
|
+
{
|
|
268
|
+
"name": "dsChange",
|
|
269
|
+
"detail": "boolean",
|
|
270
|
+
"bubbles": true,
|
|
271
|
+
"cancelable": true,
|
|
272
|
+
"composed": true
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "dsClick",
|
|
276
|
+
"detail": "MouseEvent",
|
|
277
|
+
"bubbles": true,
|
|
278
|
+
"cancelable": true,
|
|
279
|
+
"composed": true
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
"methods": [
|
|
283
|
+
{
|
|
284
|
+
"name": "setFocus",
|
|
285
|
+
"signature": "setFocus() => Promise<void>"
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
"slots": []
|
|
289
|
+
},
|
|
290
|
+
"props": {
|
|
291
|
+
"activeFill": {
|
|
292
|
+
"type": "boolean",
|
|
293
|
+
"resolvedType": "boolean",
|
|
294
|
+
"attribute": "active-fill",
|
|
295
|
+
"default": "true",
|
|
296
|
+
"required": false,
|
|
297
|
+
"mutable": false,
|
|
298
|
+
"description": "When active, render the selected interaction fill.\nDefault `true` for general UI. Shell chrome (nav / tool rails) should pass\n`false` so selection is foreground-only (primary color, no fill)."
|
|
299
|
+
},
|
|
300
|
+
"ariaLabel": {
|
|
301
|
+
"type": "string | null",
|
|
302
|
+
"resolvedType": "null | string",
|
|
303
|
+
"attribute": "aria-label",
|
|
304
|
+
"default": "null",
|
|
305
|
+
"required": false,
|
|
306
|
+
"mutable": false,
|
|
307
|
+
"description": "Accessible name override. Required for icon-only buttons."
|
|
308
|
+
},
|
|
309
|
+
"background": {
|
|
310
|
+
"type": "ButtonUnfilledBackground | undefined",
|
|
311
|
+
"resolvedType": "\"always-dark\" | \"bold\" | \"faint\" | \"inverted\" | \"media\" | \"medium\" | \"strong\" | \"translucent\" | undefined",
|
|
312
|
+
"attribute": "background",
|
|
313
|
+
"required": false,
|
|
314
|
+
"mutable": false,
|
|
315
|
+
"description": "Actual parent surface context. Omit on primary and secondary surfaces."
|
|
316
|
+
},
|
|
317
|
+
"controls": {
|
|
318
|
+
"type": "string | undefined",
|
|
319
|
+
"resolvedType": "string | undefined",
|
|
320
|
+
"attribute": "controls",
|
|
321
|
+
"required": false,
|
|
322
|
+
"mutable": false
|
|
323
|
+
},
|
|
324
|
+
"dot": {
|
|
325
|
+
"type": "boolean",
|
|
326
|
+
"resolvedType": "boolean",
|
|
327
|
+
"attribute": "dot",
|
|
328
|
+
"default": "false",
|
|
329
|
+
"required": false,
|
|
330
|
+
"mutable": false,
|
|
331
|
+
"description": "Show a notification dot at the top-right of the icon zone (icon variant only)."
|
|
332
|
+
},
|
|
333
|
+
"expanded": {
|
|
334
|
+
"type": "boolean | undefined",
|
|
335
|
+
"resolvedType": "boolean | undefined",
|
|
336
|
+
"attribute": "expanded",
|
|
337
|
+
"required": false,
|
|
338
|
+
"mutable": false
|
|
339
|
+
},
|
|
340
|
+
"focusTabIndex": {
|
|
341
|
+
"type": "number",
|
|
342
|
+
"resolvedType": "number | undefined",
|
|
343
|
+
"attribute": "tab-index",
|
|
344
|
+
"required": false,
|
|
345
|
+
"mutable": false,
|
|
346
|
+
"description": "Native `tabindex` for roving keyboard groups in shell chrome.\nOmit for the default button tab stop (`0`)."
|
|
347
|
+
},
|
|
348
|
+
"hasBorder": {
|
|
349
|
+
"type": "boolean",
|
|
350
|
+
"resolvedType": "boolean",
|
|
351
|
+
"attribute": "has-border",
|
|
352
|
+
"default": "true",
|
|
353
|
+
"required": false,
|
|
354
|
+
"mutable": false,
|
|
355
|
+
"description": "Show a 1px secondary inset border. Default on; shell chrome can pass `false`."
|
|
356
|
+
},
|
|
357
|
+
"haspopup": {
|
|
358
|
+
"type": "ButtonUnfilledPopup | undefined",
|
|
359
|
+
"resolvedType": "\"dialog\" | \"grid\" | \"listbox\" | \"menu\" | \"tree\" | \"true\" | undefined",
|
|
360
|
+
"attribute": "haspopup",
|
|
361
|
+
"required": false,
|
|
362
|
+
"mutable": false
|
|
363
|
+
},
|
|
364
|
+
"icon": {
|
|
365
|
+
"type": "string",
|
|
366
|
+
"resolvedType": "string",
|
|
367
|
+
"attribute": "icon",
|
|
368
|
+
"default": "''",
|
|
369
|
+
"required": false,
|
|
370
|
+
"mutable": false,
|
|
371
|
+
"description": "Icon name passed to <ds-icon> for `icon` / `icon-label` variants."
|
|
372
|
+
},
|
|
373
|
+
"isActive": {
|
|
374
|
+
"type": "boolean",
|
|
375
|
+
"resolvedType": "boolean",
|
|
376
|
+
"attribute": "is-active",
|
|
377
|
+
"default": "false",
|
|
378
|
+
"required": false,
|
|
379
|
+
"mutable": false,
|
|
380
|
+
"description": "Active/selected visual state. Always promotes foreground to primary."
|
|
381
|
+
},
|
|
382
|
+
"isInactive": {
|
|
383
|
+
"type": "boolean",
|
|
384
|
+
"resolvedType": "boolean",
|
|
385
|
+
"attribute": "is-inactive",
|
|
386
|
+
"default": "false",
|
|
387
|
+
"required": false,
|
|
388
|
+
"mutable": false,
|
|
389
|
+
"description": "Disables interaction."
|
|
390
|
+
},
|
|
391
|
+
"isLoading": {
|
|
392
|
+
"type": "boolean",
|
|
393
|
+
"resolvedType": "boolean",
|
|
394
|
+
"attribute": "is-loading",
|
|
395
|
+
"default": "false",
|
|
396
|
+
"required": false,
|
|
397
|
+
"mutable": false,
|
|
398
|
+
"description": "Shows an inline loader and prevents interaction without applying inactive opacity."
|
|
399
|
+
},
|
|
400
|
+
"label": {
|
|
401
|
+
"type": "string",
|
|
402
|
+
"resolvedType": "string",
|
|
403
|
+
"attribute": "label",
|
|
404
|
+
"default": "''",
|
|
405
|
+
"required": false,
|
|
406
|
+
"mutable": false,
|
|
407
|
+
"description": "Visible text for `label` / `icon-label` variants."
|
|
408
|
+
},
|
|
409
|
+
"pressed": {
|
|
410
|
+
"type": "boolean | undefined",
|
|
411
|
+
"resolvedType": "boolean | undefined",
|
|
412
|
+
"attribute": "pressed",
|
|
413
|
+
"required": false,
|
|
414
|
+
"mutable": false
|
|
415
|
+
},
|
|
416
|
+
"rounded": {
|
|
417
|
+
"type": "boolean",
|
|
418
|
+
"resolvedType": "boolean",
|
|
419
|
+
"attribute": "rounded",
|
|
420
|
+
"default": "false",
|
|
421
|
+
"required": false,
|
|
422
|
+
"mutable": false,
|
|
423
|
+
"description": "Use the half-radius treatment instead of the default control radius."
|
|
424
|
+
},
|
|
425
|
+
"size": {
|
|
426
|
+
"type": "ButtonUnfilledSize",
|
|
427
|
+
"resolvedType": "\"md\" | \"sm\" | \"xs\"",
|
|
428
|
+
"attribute": "size",
|
|
429
|
+
"default": "'md'",
|
|
430
|
+
"required": false,
|
|
431
|
+
"mutable": false,
|
|
432
|
+
"description": "Control density (height, padding, icon, type)."
|
|
433
|
+
},
|
|
434
|
+
"type": {
|
|
435
|
+
"type": "'button' | 'submit' | 'reset'",
|
|
436
|
+
"resolvedType": "\"button\" | \"reset\" | \"submit\"",
|
|
437
|
+
"attribute": "type",
|
|
438
|
+
"default": "'button'",
|
|
439
|
+
"required": false,
|
|
440
|
+
"mutable": false,
|
|
441
|
+
"description": "Native button type."
|
|
442
|
+
},
|
|
443
|
+
"variant": {
|
|
444
|
+
"type": "ButtonUnfilledVariant",
|
|
445
|
+
"resolvedType": "\"icon\" | \"icon-label\" | \"label\"",
|
|
446
|
+
"attribute": "variant",
|
|
447
|
+
"default": "'label'",
|
|
448
|
+
"required": false,
|
|
449
|
+
"mutable": false,
|
|
450
|
+
"description": "Content layout. Default is label-only; pass `icon` for icon-only chrome\n(nav / tool rails) or `icon-label` for leading icon + text."
|
|
451
|
+
},
|
|
452
|
+
"width": {
|
|
453
|
+
"type": "ButtonUnfilledWidth",
|
|
454
|
+
"resolvedType": "\"fill\" | \"hug\"",
|
|
455
|
+
"attribute": "width",
|
|
456
|
+
"default": "'hug'",
|
|
457
|
+
"required": false,
|
|
458
|
+
"mutable": false,
|
|
459
|
+
"description": "Width fit — hug content (default) or fill the parent."
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
"events": [
|
|
463
|
+
{
|
|
464
|
+
"name": "dsChange",
|
|
465
|
+
"detail": "boolean",
|
|
466
|
+
"bubbles": true,
|
|
467
|
+
"cancelable": true,
|
|
468
|
+
"composed": true
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"name": "dsClick",
|
|
472
|
+
"detail": "MouseEvent",
|
|
473
|
+
"bubbles": true,
|
|
474
|
+
"cancelable": true,
|
|
475
|
+
"composed": true
|
|
476
|
+
}
|
|
477
|
+
],
|
|
478
|
+
"methods": [
|
|
479
|
+
{
|
|
480
|
+
"name": "setFocus",
|
|
481
|
+
"signature": "setFocus() => Promise<void>"
|
|
482
|
+
}
|
|
483
|
+
],
|
|
484
|
+
"slots": [],
|
|
485
|
+
"exports": {
|
|
486
|
+
"customElement": "ds-button-unfilled",
|
|
487
|
+
"react": "DsButtonUnfilled",
|
|
488
|
+
"angular": "DsButtonUnfilled"
|
|
489
|
+
},
|
|
490
|
+
"consumption": {
|
|
491
|
+
"install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
|
|
492
|
+
"cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
|
|
493
|
+
"customElements": {
|
|
494
|
+
"import": "import '@ds-mo/ui/dist/components/ds-button-unfilled.js';",
|
|
495
|
+
"example": "<ds-button-unfilled></ds-button-unfilled>"
|
|
496
|
+
},
|
|
497
|
+
"react": {
|
|
498
|
+
"import": "import { DsButtonUnfilled } from '@ds-mo/ui/react';",
|
|
499
|
+
"example": "<DsButtonUnfilled />"
|
|
500
|
+
},
|
|
501
|
+
"angular": {
|
|
502
|
+
"import": "import { DsButtonUnfilled } from '@ds-mo/ui/angular/ds-button-unfilled';",
|
|
503
|
+
"example": "<ds-button-unfilled></ds-button-unfilled>"
|
|
504
|
+
},
|
|
505
|
+
"peerDependencies": {
|
|
506
|
+
"required": [
|
|
507
|
+
"@ds-mo/tokens ^3.1.1",
|
|
508
|
+
"@ds-mo/icons ^6.2.0"
|
|
509
|
+
],
|
|
510
|
+
"frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
"dependencies": [
|
|
515
|
+
"@ds-mo/ui",
|
|
516
|
+
"@ds-mo/tokens",
|
|
517
|
+
"@ds-mo/icons"
|
|
518
|
+
],
|
|
519
|
+
"registryDependencies": [
|
|
520
|
+
"badge",
|
|
521
|
+
"icon",
|
|
522
|
+
"loader",
|
|
523
|
+
"text"
|
|
524
|
+
],
|
|
525
|
+
"files": [
|
|
526
|
+
{
|
|
527
|
+
"path": "src/wc/components/ButtonUnfilled/ButtonUnfilled.css",
|
|
528
|
+
"content": "@import '../../utils/focus-ring.css';\n@import '../../utils/interaction-fill.css';\n@import '../../utils/control-inactive.css';\n@import '../../utils/control-density.css';\n@import '../../utils/control-width.css';\n\n:host {\n display: inline-flex;\n outline: none;\n --ds-button-unfilled-fg: var(--color-foreground-secondary);\n --ds-button-unfilled-fg-active: var(--color-foreground-primary);\n --ds-button-unfilled-dot-ring: var(--color-background-secondary);\n --ds-button-unfilled-border: var(--color-border-secondary);\n}\n\n/* Icon-only: fixed square from density height (hug). Fill stretches the hit target. */\n:host(.button-unfilled-host--icon.ds-control-width--hug) {\n width: var(--ds-control-height, var(--dimension-size-400));\n height: var(--ds-control-height, var(--dimension-size-400));\n min-width: var(--ds-control-height, var(--dimension-size-400));\n min-height: var(--ds-control-height, var(--dimension-size-400));\n}\n\n:host(.button-unfilled-host--icon.ds-control-width--fill) {\n height: var(--ds-control-height, var(--dimension-size-400));\n min-height: var(--ds-control-height, var(--dimension-size-400));\n}\n\n:host(.ds-control-width--fill) .button-unfilled {\n width: 100%;\n}\n\n.button-unfilled {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n height: var(--ds-control-height, var(--dimension-size-400));\n padding: 0 var(--ds-control-padding-inline, var(--dimension-space-075));\n gap: var(--ds-control-gap, var(--dimension-space-050));\n background: transparent;\n border: none;\n border-radius: var(--ds-control-radius, var(--dimension-radius-025));\n color: var(--ds-button-unfilled-fg);\n cursor: pointer;\n -webkit-user-select: none;\n user-select: none;\n overflow: hidden;\n transition: color var(--effect-motion-short-2);\n /* Hover/press/selected fill: `.ds-interaction-fill` (+ `--selected` / `--on-*`).\n Active always promotes foreground to primary (toggle mode). */\n}\n\n.button-unfilled--icon {\n width: 100%;\n height: 100%;\n padding: 0;\n}\n\n.button-unfilled--rounded {\n --ds-control-radius: var(--dimension-radius-half);\n}\n\n.button-unfilled--active {\n color: var(--ds-button-unfilled-fg-active);\n}\n\n/* Inset stroke via interaction-fill ::after (above selected / hover washes). */\n.button-unfilled--bordered {\n --ds-interaction-border-width: var(--dimension-stroke-width-012);\n --ds-interaction-border-color: var(--ds-button-unfilled-border);\n}\n\n/* Fallback if interaction-fill is omitted (should be rare — prefer keep the util class). */\n.button-unfilled--bordered: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` (25% opacity). */\n\n/* Foreground / chrome tokens per surface — interaction tokens come from util `--on-*`. */\n.button-unfilled--background-medium {\n --ds-button-unfilled-fg: var(--color-foreground-on-medium-background-secondary);\n --ds-button-unfilled-fg-active: var(--color-foreground-on-medium-background-primary);\n --ds-button-unfilled-dot-ring: var(--color-background-medium-neutral);\n --ds-button-unfilled-border: var(--color-border-on-medium-background-secondary);\n}\n\n.button-unfilled--background-bold {\n --ds-button-unfilled-fg: var(--color-foreground-on-bold-background-secondary);\n --ds-button-unfilled-fg-active: var(--color-foreground-on-bold-background-primary);\n --ds-button-unfilled-dot-ring: var(--color-background-bold-neutral);\n --ds-button-unfilled-border: var(--color-border-on-bold-background-secondary);\n}\n\n.button-unfilled--background-strong {\n --ds-button-unfilled-fg: var(--color-foreground-on-strong-background-secondary);\n --ds-button-unfilled-fg-active: var(--color-foreground-on-strong-background-primary);\n --ds-button-unfilled-dot-ring: var(--color-background-strong-neutral);\n --ds-button-unfilled-border: var(--color-border-on-strong-background-secondary);\n}\n\n.button-unfilled--background-translucent {\n --ds-button-unfilled-fg: var(--color-translucent-foreground-secondary);\n --ds-button-unfilled-fg-active: var(--color-translucent-foreground-primary);\n --ds-button-unfilled-dot-ring: var(--color-translucent-translucent);\n --ds-button-unfilled-border: var(--color-translucent-border-secondary);\n}\n\n.button-unfilled--background-inverted {\n --ds-button-unfilled-fg: var(--color-inverted-foreground-secondary);\n --ds-button-unfilled-fg-active: var(--color-inverted-foreground-primary);\n --ds-button-unfilled-dot-ring: var(--color-inverted-background);\n --ds-button-unfilled-border: var(--color-inverted-border-secondary);\n}\n\n.button-unfilled--background-media {\n --ds-button-unfilled-fg: var(--color-media-foreground-secondary);\n --ds-button-unfilled-fg-active: var(--color-media-foreground-primary);\n --ds-button-unfilled-dot-ring: var(--color-media-background);\n --ds-button-unfilled-border: var(--color-media-border-secondary);\n}\n\n.button-unfilled--on-always-dark {\n --ds-button-unfilled-fg: var(--color-always-dark-foreground-secondary);\n --ds-button-unfilled-fg-active: var(--color-always-dark-foreground-primary);\n --ds-button-unfilled-dot-ring: var(--color-always-dark-background);\n --ds-button-unfilled-border: var(--color-always-dark-border-secondary);\n}\n\n/*\n * After surface ring defaults: selected fill remaps the knock-out to the active\n * wash so the badge halo matches the selected background.\n */\n.button-unfilled.ds-interaction-fill--selected {\n --ds-button-unfilled-dot-ring: var(--ds-interaction-active);\n}\n\n.button-unfilled__icon-wrap {\n position: relative;\n width: var(--ds-control-icon, var(--dimension-iconography-md));\n height: var(--ds-control-icon, var(--dimension-iconography-md));\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n z-index: 2;\n}\n\n.button-unfilled__label {\n position: relative;\n z-index: 2;\n padding: 0 var(--ds-control-label-inset, var(--dimension-space-025));\n white-space: nowrap;\n flex-shrink: 0;\n min-width: 0;\n}\n\n.button-unfilled__label--loading {\n visibility: hidden;\n}\n\n.button-unfilled > .button-unfilled__loader-overlay {\n position: absolute;\n inset: 0;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n}\n\n.button-unfilled__dot {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n pointer-events: none;\n}\n",
|
|
529
|
+
"type": "registry:ui"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"path": "src/wc/components/ButtonUnfilled/ButtonUnfilled.tsx",
|
|
533
|
+
"content": "import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';\nimport { controlWidthClass, CONTROL_TEXT_VARIANT, type ControlWidth } from '../../utils';\n\nexport type ButtonUnfilledBackground =\n | 'faint'\n | 'medium'\n | 'bold'\n | 'strong'\n | 'translucent'\n | 'inverted'\n | 'media'\n | 'always-dark';\n\nexport type ButtonUnfilledVariant = 'icon' | 'label' | 'icon-label';\n\nexport type ButtonUnfilledSize = 'md' | 'sm' | 'xs';\n\nexport type ButtonUnfilledWidth = ControlWidth;\nexport type ButtonUnfilledPopup = 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';\n\n/**\n * `ds-icon` size prop matching control-density icon metrics\n * (md→20 / sm→16 / xs→12 via `--dimension-iconography-*`).\n */\nconst ICON_SIZE: Record<ButtonUnfilledSize, 'md' | 'sm' | 'xs'> = {\n md: 'md',\n sm: 'sm',\n xs: 'xs',\n};\n\n@Component({\n tag: 'ds-button-unfilled',\n styleUrl: 'ButtonUnfilled.css',\n scoped: true,\n})\nexport class ButtonUnfilled {\n @Element() el!: HTMLElement;\n\n /**\n * Content layout. Default is label-only; pass `icon` for icon-only chrome\n * (nav / tool rails) or `icon-label` for leading icon + text.\n */\n @Prop() variant: ButtonUnfilledVariant = 'label';\n\n /** Control density (height, padding, icon, type). */\n @Prop() size: ButtonUnfilledSize = 'md';\n\n /** Width fit — hug content (default) or fill the parent. */\n @Prop() width: ButtonUnfilledWidth = 'hug';\n\n /** Visible text for `label` / `icon-label` variants. */\n @Prop() label: string = '';\n\n /** Icon name passed to <ds-icon> for `icon` / `icon-label` variants. */\n @Prop() icon: string = '';\n\n /** Active/selected visual state. Always promotes foreground to primary. */\n @Prop() isActive: boolean = false;\n\n /**\n * When active, render the selected interaction fill.\n * Default `true` for general UI. Shell chrome (nav / tool rails) should pass\n * `false` so selection is foreground-only (primary color, no fill).\n */\n @Prop() activeFill: boolean = true;\n\n /** Show a 1px secondary inset border. Default on; shell chrome can pass `false`. */\n @Prop() hasBorder: boolean = true;\n\n /** Use the half-radius treatment instead of the default control radius. */\n @Prop() rounded: boolean = false;\n\n /** Show a notification dot at the top-right of the icon zone (icon variant only). */\n @Prop() dot: boolean = false;\n\n /** Disables interaction. */\n @Prop() isInactive: boolean = false;\n\n /** Shows an inline loader and prevents interaction without applying inactive opacity. */\n @Prop() isLoading: boolean = false;\n\n /** Native button type. */\n @Prop() type: 'button' | 'submit' | 'reset' = 'button';\n\n /** Actual parent surface context. Omit on primary and secondary surfaces. */\n @Prop() background: ButtonUnfilledBackground | undefined;\n\n /** Accessible name override. Required for icon-only buttons. */\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n @Prop() controls: string | undefined;\n @Prop() expanded: boolean | undefined;\n @Prop() haspopup: ButtonUnfilledPopup | undefined;\n @Prop() pressed: boolean | undefined;\n\n /**\n * Native `tabindex` for roving keyboard groups in shell chrome.\n * Omit for the default button tab stop (`0`).\n */\n @Prop({ attribute: 'tab-index' }) focusTabIndex?: number;\n\n @Event() dsClick!: EventEmitter<MouseEvent>;\n @Event() dsChange!: EventEmitter<boolean>;\n\n private buttonEl: HTMLButtonElement | null = null;\n\n @Method()\n async setFocus() {\n this.buttonEl?.focus();\n }\n\n private handleClick = (event: MouseEvent) => {\n if (this.isInactive || this.isLoading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n this.dsClick.emit(event);\n this.dsChange.emit(!this.isActive);\n };\n\n private get showIcon(): boolean {\n return this.variant === 'icon' || this.variant === 'icon-label';\n }\n\n private get showLabel(): boolean {\n return this.variant === 'label' || this.variant === 'icon-label';\n }\n\n private get showDot(): boolean {\n return this.variant === 'icon' && this.dot && !this.isLoading;\n }\n\n /** Knock-out ring: selected fill → active wash; otherwise surface token. */\n private get dotRing(): string {\n if (this.isActive && this.activeFill) {\n return 'var(--ds-interaction-active)';\n }\n return 'var(--ds-button-unfilled-dot-ring)';\n }\n\n private get accessibleName(): string | undefined {\n if (this.ariaLabel) return this.ariaLabel;\n if (this.isLoading && this.variant === 'label' && this.label) return this.label;\n return undefined;\n }\n\n render() {\n const bg = this.background;\n const textVariant = CONTROL_TEXT_VARIANT[this.size];\n const iconSize = ICON_SIZE[this.size];\n\n const cls: Record<string, boolean> = {\n 'button-unfilled': true,\n 'ds-focus-ring-inset': true,\n 'ds-interaction-fill': true,\n 'ds-interaction-fill--selected': this.isActive && this.activeFill && !this.isInactive,\n 'ds-interaction-fill--on-faint': bg === 'faint',\n 'ds-interaction-fill--on-medium': bg === 'medium',\n 'ds-interaction-fill--on-bold': bg === 'bold',\n 'ds-interaction-fill--on-strong': bg === 'strong',\n 'ds-interaction-fill--on-translucent': bg === 'translucent',\n 'ds-interaction-fill--on-inverted': bg === 'inverted',\n 'ds-interaction-fill--on-media': bg === 'media',\n 'ds-interaction-fill--on-always-dark': bg === 'always-dark',\n 'button-unfilled--active': this.isActive,\n 'button-unfilled--bordered': this.hasBorder,\n 'button-unfilled--rounded': this.rounded,\n 'ds-control-inactive': this.isInactive,\n 'ds-control--md': this.size === 'md',\n 'ds-control--sm': this.size === 'sm',\n 'ds-control--xs': this.size === 'xs',\n 'button-unfilled--icon': this.variant === 'icon',\n 'button-unfilled--label': this.variant === 'label',\n 'button-unfilled--icon-label': this.variant === 'icon-label',\n 'button-unfilled--background-faint': bg === 'faint',\n 'button-unfilled--background-medium': bg === 'medium',\n 'button-unfilled--background-bold': bg === 'bold',\n 'button-unfilled--background-strong': bg === 'strong',\n 'button-unfilled--background-translucent': bg === 'translucent',\n 'button-unfilled--background-inverted': bg === 'inverted',\n 'button-unfilled--background-media': bg === 'media',\n 'button-unfilled--on-always-dark': bg === 'always-dark',\n };\n\n return (\n <Host\n class={{\n 'button-unfilled-host': true,\n 'button-unfilled-host--icon': this.variant === 'icon',\n 'ds-control--md': this.size === 'md',\n 'ds-control--sm': this.size === 'sm',\n 'ds-control--xs': this.size === 'xs',\n ...controlWidthClass(this.width),\n }}\n tabIndex={-1}\n >\n <button\n ref={el => {\n this.buttonEl = el ?? null;\n }}\n type={this.type}\n class={cls}\n disabled={this.isInactive}\n tabIndex={this.focusTabIndex ?? 0}\n aria-label={this.accessibleName}\n aria-busy={this.isLoading ? 'true' : undefined}\n aria-disabled={this.isLoading ? 'true' : undefined}\n aria-controls={this.controls}\n aria-expanded={this.expanded === undefined ? undefined : String(this.expanded)}\n aria-haspopup={this.haspopup}\n aria-pressed={this.pressed === undefined ? undefined : String(this.pressed)}\n onClick={this.handleClick}\n >\n {this.showIcon && (\n <span class=\"button-unfilled__icon-wrap ds-interaction-fill__content\">\n {this.isLoading\n ? <ds-loader size={iconSize} color=\"inherit\" />\n : <ds-icon name={this.icon} size={iconSize} color=\"inherit\" />\n }\n {this.showDot && (\n <ds-badge\n class=\"button-unfilled__dot\"\n variant=\"dot\"\n background={this.dotRing}\n label=\"\"\n aria-hidden=\"true\"\n />\n )}\n </span>\n )}\n {this.showLabel && (\n <ds-text\n class={{\n 'button-unfilled__label': true,\n 'button-unfilled__label--loading': this.isLoading && this.variant === 'label',\n 'ds-interaction-fill__content': true,\n }}\n as=\"span\"\n variant={textVariant}\n emphasis\n color=\"inherit\"\n >\n {this.label}\n </ds-text>\n )}\n {this.isLoading && this.variant === 'label' && (\n <span class=\"button-unfilled__loader-overlay ds-interaction-fill__content\">\n <ds-loader size={iconSize} color=\"inherit\" />\n </span>\n )}\n </button>\n </Host>\n );\n }\n}\n",
|
|
534
|
+
"type": "registry:ui"
|
|
535
|
+
}
|
|
536
|
+
]
|
|
537
|
+
}
|