@ds-mo/ui 8.3.1 → 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.
Files changed (184) hide show
  1. package/README.md +28 -3
  2. package/dist/.build-stamp +1 -1
  3. package/dist/agent-patterns.json +233 -0
  4. package/dist/agent.json +155 -174
  5. package/dist/angular/ds-menu.d.ts +6 -1
  6. package/dist/angular/ds-menu.js +7 -4
  7. package/dist/angular/ds-swatch-picker.d.ts +15 -0
  8. package/dist/angular/{ds-pagination.js → ds-swatch-picker.js} +15 -15
  9. package/dist/angular/index.d.ts +1 -1
  10. package/dist/angular/index.js +1 -2
  11. package/dist/angular/proxies.d.ts +1 -2
  12. package/dist/angular/proxies.js +1 -2
  13. package/dist/components/ds-app-shell.js +1 -1
  14. package/dist/components/ds-badge.js +1 -1
  15. package/dist/components/ds-banner.js +1 -1
  16. package/dist/components/ds-bar-nav.js +1 -1
  17. package/dist/components/ds-bar-nav.js.map +1 -1
  18. package/dist/components/ds-button-filled.js +1 -1
  19. package/dist/components/ds-button-unfilled.js +1 -1
  20. package/dist/components/ds-card-data-viz-donut.js +1 -1
  21. package/dist/components/ds-card-setting.js +1 -1
  22. package/dist/components/ds-card-shell-data-viz.js +1 -1
  23. package/dist/components/ds-card.js +1 -1
  24. package/dist/components/ds-chart-bar.js +1 -1
  25. package/dist/components/ds-chart-bar.js.map +1 -1
  26. package/dist/components/ds-chart-donut.js +1 -1
  27. package/dist/components/ds-chart-legend.js +1 -1
  28. package/dist/components/ds-chart-line.js +1 -1
  29. package/dist/components/ds-checkbox.js +1 -1
  30. package/dist/components/ds-chip.js +1 -1
  31. package/dist/components/ds-empty-state.js +1 -1
  32. package/dist/components/ds-field.js +1 -1
  33. package/dist/components/ds-input.js +1 -1
  34. package/dist/components/ds-menu.js +1 -1
  35. package/dist/components/ds-modal.js +1 -1
  36. package/dist/components/ds-panel-nav.js +1 -1
  37. package/dist/components/ds-panel-nav.js.map +1 -1
  38. package/dist/components/ds-panel-sub-nav.js +1 -1
  39. package/dist/components/ds-panel-tools.js +1 -1
  40. package/dist/components/ds-radio.js +1 -1
  41. package/dist/components/ds-select-multi.js +1 -1
  42. package/dist/components/ds-select-multi.js.map +1 -1
  43. package/dist/components/ds-select.js +1 -1
  44. package/dist/components/ds-select.js.map +1 -1
  45. package/dist/components/ds-shell-gradient-picker.js +1 -1
  46. package/dist/components/ds-shell-gradient-picker.js.map +1 -1
  47. package/dist/components/ds-shell-gradient-swatch.js +1 -1
  48. package/dist/components/ds-shell-gradient-swatch.js.map +1 -1
  49. package/dist/components/ds-skeleton.js +1 -1
  50. package/dist/components/ds-skeleton.js.map +1 -1
  51. package/dist/components/ds-slider.js +1 -1
  52. package/dist/components/ds-slider.js.map +1 -1
  53. package/dist/components/{ds-pagination.d.ts → ds-swatch-picker.d.ts} +4 -4
  54. package/dist/components/ds-swatch-picker.js +2 -0
  55. package/dist/components/ds-swatch-picker.js.map +1 -0
  56. package/dist/components/ds-tab-group.js +1 -1
  57. package/dist/components/ds-tag.js +1 -1
  58. package/dist/components/ds-text.js +1 -1
  59. package/dist/components/ds-tooltip-data-viz.js +1 -1
  60. package/dist/components/ds-tooltip.js +1 -1
  61. package/dist/components/{p-CysJosvS.js → p-B-zhgAvL.js} +2 -2
  62. package/dist/components/{p-C21sIElQ.js → p-BLzivrE3.js} +2 -2
  63. package/dist/components/{p-DAuadHYu.js → p-BbV68F23.js} +2 -2
  64. package/dist/components/{p-_y99wWNU.js → p-C7RObioO.js} +2 -2
  65. package/dist/components/{p-DxQ4gzbA.js → p-CZ9wemOA.js} +2 -2
  66. package/dist/components/{p-BKA6houZ.js → p-CbS_WWs2.js} +2 -2
  67. package/dist/components/p-D1HFMTdC.js +2 -0
  68. package/dist/components/p-D1HFMTdC.js.map +1 -0
  69. package/dist/components/{p-BGcSrHKl.js → p-DT2MK8Kt.js} +2 -2
  70. package/dist/components/{p-DV23KMU-.js → p-DyZj3k9S.js} +2 -2
  71. package/dist/components/p-HBIxvS5C.js +2 -0
  72. package/dist/components/p-HBIxvS5C.js.map +1 -0
  73. package/dist/components/{p-D6hvtWDk.js → p-KRGBGTu5.js} +2 -2
  74. package/dist/components/p-l6PmnW_P.js +2 -0
  75. package/dist/components/p-l6PmnW_P.js.map +1 -0
  76. package/dist/components/p-tQ1QHeOE.js +2 -0
  77. package/dist/components/p-tQ1QHeOE.js.map +1 -0
  78. package/dist/docs/components.json +546 -1024
  79. package/dist/lib/components/Menu/menu-placement.d.ts +6 -3
  80. package/dist/lib/shell/index.d.ts +2 -2
  81. package/dist/lib/shell/index.js +40 -39
  82. package/dist/lib/shell/index.js.map +3 -3
  83. package/dist/lib/shell/shell-gradient-presets.d.ts +15 -0
  84. package/dist/lib/utils/choice-popup-alignment.d.ts +20 -0
  85. package/dist/lib/utils/index.d.ts +2 -0
  86. package/dist/lib/utils/index.js +16 -0
  87. package/dist/lib/utils/index.js.map +3 -3
  88. package/dist/mcp/cli.js +31409 -0
  89. package/dist/mcp-data/registry/app-shell.json +210 -0
  90. package/dist/mcp-data/registry/badge.json +289 -0
  91. package/dist/mcp-data/registry/banner.json +206 -0
  92. package/dist/mcp-data/registry/bar-nav.json +341 -0
  93. package/dist/mcp-data/registry/button-filled.json +386 -0
  94. package/dist/mcp-data/registry/button-unfilled.json +537 -0
  95. package/dist/mcp-data/registry/card-data-viz-donut.json +143 -0
  96. package/dist/mcp-data/registry/card-setting.json +194 -0
  97. package/dist/mcp-data/registry/card-shell-data-viz.json +173 -0
  98. package/dist/mcp-data/registry/card.json +126 -0
  99. package/dist/mcp-data/registry/chart-bar.json +121 -0
  100. package/dist/mcp-data/registry/chart-donut.json +257 -0
  101. package/dist/mcp-data/registry/chart-legend.json +209 -0
  102. package/dist/mcp-data/registry/chart-line.json +153 -0
  103. package/dist/mcp-data/registry/checkbox.json +361 -0
  104. package/dist/mcp-data/registry/chip.json +276 -0
  105. package/dist/mcp-data/registry/divider.json +225 -0
  106. package/dist/mcp-data/registry/empty-state.json +197 -0
  107. package/dist/mcp-data/registry/field.json +222 -0
  108. package/dist/mcp-data/registry/icon.json +242 -0
  109. package/dist/mcp-data/registry/input.json +597 -0
  110. package/dist/mcp-data/registry/loader.json +192 -0
  111. package/dist/mcp-data/registry/menu.json +459 -0
  112. package/dist/mcp-data/registry/modal.json +150 -0
  113. package/dist/mcp-data/registry/panel-nav.json +622 -0
  114. package/dist/mcp-data/registry/panel-sub-nav.json +249 -0
  115. package/dist/mcp-data/registry/panel-tools.json +374 -0
  116. package/dist/mcp-data/registry/radio.json +374 -0
  117. package/dist/mcp-data/registry/registry.json +5389 -0
  118. package/dist/mcp-data/registry/select-multi.json +755 -0
  119. package/dist/mcp-data/registry/select.json +740 -0
  120. package/dist/mcp-data/registry/shell-gradient-picker.json +195 -0
  121. package/dist/mcp-data/registry/shell-gradient-swatch.json +215 -0
  122. package/dist/mcp-data/registry/skeleton.json +282 -0
  123. package/dist/mcp-data/registry/slider.json +657 -0
  124. package/dist/mcp-data/registry/swatch-picker.json +231 -0
  125. package/dist/mcp-data/registry/switch.json +361 -0
  126. package/dist/mcp-data/registry/tab-group.json +255 -0
  127. package/dist/mcp-data/registry/tag.json +352 -0
  128. package/dist/mcp-data/registry/text.json +371 -0
  129. package/dist/mcp-data/registry/tooltip-data-viz.json +158 -0
  130. package/dist/mcp-data/registry/tooltip.json +311 -0
  131. package/dist/react/components.d.ts +1 -2
  132. package/dist/react/components.js +1 -2
  133. package/dist/react/ds-menu.d.ts +1 -0
  134. package/dist/react/ds-menu.js +2 -1
  135. package/dist/react/ds-swatch-picker.d.ts +12 -0
  136. package/dist/react/ds-swatch-picker.js +12 -0
  137. package/dist/types/components/Menu/Menu.d.ts +7 -1
  138. package/dist/types/components/Menu/menu-placement.d.ts +6 -3
  139. package/dist/types/components/Menu/menu-types.d.ts +14 -1
  140. package/dist/types/components/ShellGradientPicker/ShellGradientPicker.d.ts +2 -5
  141. package/dist/types/components/ShellGradientSwatch/ShellGradientSwatch.d.ts +1 -0
  142. package/dist/types/components/SwatchPicker/SwatchPicker.d.ts +21 -0
  143. package/dist/types/components/SwatchPicker/swatch-picker-types.d.ts +26 -0
  144. package/dist/types/components.d.ts +117 -237
  145. package/dist/types/shell/index.d.ts +2 -2
  146. package/dist/types/shell/shell-gradient-presets.d.ts +15 -0
  147. package/dist/types/utils/choice-popup-alignment.d.ts +21 -0
  148. package/dist/types/utils/index.d.ts +2 -0
  149. package/package.json +6 -2
  150. package/dist/angular/ds-pagination.d.ts +0 -15
  151. package/dist/angular/ds-table.d.ts +0 -33
  152. package/dist/angular/ds-table.js +0 -48
  153. package/dist/components/ds-pagination.js +0 -2
  154. package/dist/components/ds-pagination.js.map +0 -1
  155. package/dist/components/ds-table.d.ts +0 -11
  156. package/dist/components/ds-table.js +0 -2
  157. package/dist/components/ds-table.js.map +0 -1
  158. package/dist/components/p-CKV6rOGa.js +0 -2
  159. package/dist/components/p-CKV6rOGa.js.map +0 -1
  160. package/dist/components/p-CSTr2132.js +0 -2
  161. package/dist/components/p-CSTr2132.js.map +0 -1
  162. package/dist/components/p-C_cu-HIT.js +0 -2
  163. package/dist/components/p-C_cu-HIT.js.map +0 -1
  164. package/dist/components/p-D0B9uDTP.js +0 -2
  165. package/dist/components/p-D0B9uDTP.js.map +0 -1
  166. package/dist/components/p-DhxWfdX0.js +0 -2
  167. package/dist/components/p-DhxWfdX0.js.map +0 -1
  168. package/dist/components/p-Pip-LNhl.js +0 -2
  169. package/dist/components/p-Pip-LNhl.js.map +0 -1
  170. package/dist/react/ds-pagination.d.ts +0 -12
  171. package/dist/react/ds-pagination.js +0 -12
  172. package/dist/react/ds-table.d.ts +0 -21
  173. package/dist/react/ds-table.js +0 -16
  174. package/dist/types/components/Pagination/Pagination.d.ts +0 -14
  175. package/dist/types/components/Table/Table.d.ts +0 -56
  176. /package/dist/components/{p-CysJosvS.js.map → p-B-zhgAvL.js.map} +0 -0
  177. /package/dist/components/{p-C21sIElQ.js.map → p-BLzivrE3.js.map} +0 -0
  178. /package/dist/components/{p-DAuadHYu.js.map → p-BbV68F23.js.map} +0 -0
  179. /package/dist/components/{p-_y99wWNU.js.map → p-C7RObioO.js.map} +0 -0
  180. /package/dist/components/{p-DxQ4gzbA.js.map → p-CZ9wemOA.js.map} +0 -0
  181. /package/dist/components/{p-BKA6houZ.js.map → p-CbS_WWs2.js.map} +0 -0
  182. /package/dist/components/{p-BGcSrHKl.js.map → p-DT2MK8Kt.js.map} +0 -0
  183. /package/dist/components/{p-DV23KMU-.js.map → p-DyZj3k9S.js.map} +0 -0
  184. /package/dist/components/{p-D6hvtWDk.js.map → p-KRGBGTu5.js.map} +0 -0
@@ -0,0 +1,195 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "shell-gradient-picker",
4
+ "title": "ShellGradientPicker",
5
+ "description": "Deprecated compatibility wrapper that maps the fixed AppShell wash presets into SwatchPicker.",
6
+ "type": "registry:ui",
7
+ "meta": {
8
+ "library": "@ds-mo/ui",
9
+ "distribution": "npm",
10
+ "storybook": "https://zainadeel.github.io/compomo/?path=/story/shell-gradient-picker",
11
+ "source": "src/wc/components/ShellGradientPicker/ShellGradientPicker.tsx",
12
+ "intentStatus": "complete",
13
+ "intent": {
14
+ "audience": "specialized",
15
+ "status": "deprecated",
16
+ "replacedBy": "component:ds-swatch-picker",
17
+ "replacementReason": "SwatchPicker now owns the same accessible interaction with a generic option model that supports both flat colors and gradients.",
18
+ "summary": "Deprecated compatibility wrapper that maps the fixed AppShell wash presets into SwatchPicker.",
19
+ "useWhen": [
20
+ "Adding the Appearance or Theme section to the application's user or account menu.",
21
+ "Users must choose the global AppShell chrome treatment from none, cool, neutral, warm, or fresh."
22
+ ],
23
+ "avoidWhen": [
24
+ "Choosing semantic intent, page background, chart, content, or brand colors.",
25
+ "Building an arbitrary gradient editor or allowing custom gradient values.",
26
+ "A picker already exists for the application; provide exactly one canonical preference location.",
27
+ "Rendering an individual swatch outside the complete picker."
28
+ ],
29
+ "alternatives": [
30
+ {
31
+ "when": "The user is selecting the application light, dark, or system color mode.",
32
+ "component": "component:ds-menu",
33
+ "reason": "Color mode is a separate appearance preference and should use ordinary menu selection rows."
34
+ }
35
+ ],
36
+ "commonlyComposedWith": [
37
+ "component:ds-app-shell",
38
+ "component:ds-menu"
39
+ ],
40
+ "patterns": [
41
+ "pattern:application-shell"
42
+ ],
43
+ "accessibility": [
44
+ "Provide a localized groupLabel that describes the shell appearance choice.",
45
+ "Treat the presets as one radio group with one Tab stop; Arrow keys, Home, and End move and select within the group.",
46
+ "Keep the visible compact swatches and their accessible preset names; do not rely on color alone for assistive technology."
47
+ ],
48
+ "states": [
49
+ "Neutral is the default preset; none renders solid shell chrome without a wash.",
50
+ "Cool, neutral, warm, and fresh use design tokens and automatically adapt to the active light or dark color theme.",
51
+ "Apply dsChange immediately to AppShell.gradientPreset and keep the containing account menu open.",
52
+ "The application owns local persistence, cross-tab synchronization, and server or account preference precedence; the picker owns only selection UI and events.",
53
+ "Treat the fixed preset union as the only supported values and do not construct custom gradients."
54
+ ],
55
+ "responsiveBehavior": [
56
+ "Keep the compact picker in the user or account appearance menu on supported desktop and tablet shell compositions.",
57
+ "The future mobile account surface may present the same preference differently."
58
+ ],
59
+ "frameworkCaveats": {
60
+ "customElements": [
61
+ "Listen for dsChange, resolve application preference precedence, and assign the result to the single AppShell gradientPreset property."
62
+ ],
63
+ "react": [
64
+ "Use the generated wrapper and handle onDsChange without closing the containing account menu."
65
+ ],
66
+ "angular": [
67
+ "Bind value to the resolved preference and handle dsChange to update application state."
68
+ ]
69
+ },
70
+ "references": [
71
+ {
72
+ "label": "Replacement stories",
73
+ "path": "src/wc/components/SwatchPicker/SwatchPicker.stories.ts"
74
+ },
75
+ {
76
+ "label": "AppShell gradient contract",
77
+ "path": "src/wc/components/AppShell/AppShell.mdx"
78
+ },
79
+ {
80
+ "label": "Application shell composition",
81
+ "path": "agent/patterns/application-shell/pattern.agent.json"
82
+ }
83
+ ]
84
+ },
85
+ "api": {
86
+ "props": {
87
+ "groupLabel": {
88
+ "type": "string",
89
+ "resolvedType": "string",
90
+ "attribute": "group-label",
91
+ "default": "'Shell gradient theme'",
92
+ "required": false,
93
+ "mutable": false
94
+ },
95
+ "value": {
96
+ "type": "ShellGradientPreset",
97
+ "resolvedType": "\"cool\" | \"fresh\" | \"neutral\" | \"none\" | \"warm\"",
98
+ "attribute": "value",
99
+ "default": "'neutral'",
100
+ "required": false,
101
+ "mutable": true,
102
+ "description": "Active shell wash preset."
103
+ }
104
+ },
105
+ "events": [
106
+ {
107
+ "name": "dsChange",
108
+ "detail": "ShellGradientPreset",
109
+ "bubbles": true,
110
+ "cancelable": true,
111
+ "composed": true
112
+ }
113
+ ],
114
+ "methods": [],
115
+ "slots": []
116
+ },
117
+ "props": {
118
+ "groupLabel": {
119
+ "type": "string",
120
+ "resolvedType": "string",
121
+ "attribute": "group-label",
122
+ "default": "'Shell gradient theme'",
123
+ "required": false,
124
+ "mutable": false
125
+ },
126
+ "value": {
127
+ "type": "ShellGradientPreset",
128
+ "resolvedType": "\"cool\" | \"fresh\" | \"neutral\" | \"none\" | \"warm\"",
129
+ "attribute": "value",
130
+ "default": "'neutral'",
131
+ "required": false,
132
+ "mutable": true,
133
+ "description": "Active shell wash preset."
134
+ }
135
+ },
136
+ "events": [
137
+ {
138
+ "name": "dsChange",
139
+ "detail": "ShellGradientPreset",
140
+ "bubbles": true,
141
+ "cancelable": true,
142
+ "composed": true
143
+ }
144
+ ],
145
+ "methods": [],
146
+ "slots": [],
147
+ "exports": {
148
+ "customElement": "ds-shell-gradient-picker",
149
+ "react": "DsShellGradientPicker",
150
+ "angular": "DsShellGradientPicker"
151
+ },
152
+ "consumption": {
153
+ "install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
154
+ "cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
155
+ "customElements": {
156
+ "import": "import '@ds-mo/ui/dist/components/ds-shell-gradient-picker.js';",
157
+ "example": "<ds-shell-gradient-picker></ds-shell-gradient-picker>"
158
+ },
159
+ "react": {
160
+ "import": "import { DsShellGradientPicker } from '@ds-mo/ui/react';",
161
+ "example": "<DsShellGradientPicker />"
162
+ },
163
+ "angular": {
164
+ "import": "import { DsShellGradientPicker } from '@ds-mo/ui/angular/ds-shell-gradient-picker';",
165
+ "example": "<ds-shell-gradient-picker></ds-shell-gradient-picker>"
166
+ },
167
+ "peerDependencies": {
168
+ "required": [
169
+ "@ds-mo/tokens ^3.1.1",
170
+ "@ds-mo/icons ^6.2.0"
171
+ ],
172
+ "frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
173
+ }
174
+ }
175
+ },
176
+ "dependencies": [
177
+ "@ds-mo/ui",
178
+ "@ds-mo/tokens"
179
+ ],
180
+ "registryDependencies": [
181
+ "swatch-picker"
182
+ ],
183
+ "files": [
184
+ {
185
+ "path": "src/wc/components/ShellGradientPicker/ShellGradientPicker.css",
186
+ "content": ":host {\n display: block;\n width: 100%;\n}\n",
187
+ "type": "registry:ui"
188
+ },
189
+ {
190
+ "path": "src/wc/components/ShellGradientPicker/ShellGradientPicker.tsx",
191
+ "content": "import { Component, Prop, Event, EventEmitter, h, Host } from '@stencil/core';\nimport {\n DEFAULT_SHELL_GRADIENT_PRESET,\n normalizeShellGradientPreset,\n type ShellGradientPreset,\n} from '../ShellGradientSwatch/shell-gradient-swatch-types';\nimport { shellGradientPickerSections } from '../../shell/shell-gradient-presets';\n\n/** @deprecated Use `ds-swatch-picker` with shell preset options. */\n@Component({\n tag: 'ds-shell-gradient-picker',\n styleUrl: 'ShellGradientPicker.css',\n scoped: true,\n})\nexport class ShellGradientPicker {\n /** Active shell wash preset. */\n @Prop({ mutable: true, reflect: true }) value: ShellGradientPreset =\n DEFAULT_SHELL_GRADIENT_PRESET;\n @Prop() groupLabel: string = 'Shell gradient theme';\n\n @Event() dsChange!: EventEmitter<ShellGradientPreset>;\n\n private handleChange = (value: string) => {\n const normalized = normalizeShellGradientPreset(value);\n if (normalized === normalizeShellGradientPreset(this.value)) return;\n this.value = normalized;\n this.dsChange.emit(normalized);\n };\n\n render() {\n return (\n <Host>\n <ds-swatch-picker\n value={normalizeShellGradientPreset(this.value)}\n groupLabel={this.groupLabel}\n sections={shellGradientPickerSections()}\n onDsChange={(event: CustomEvent<string>) => {\n event.stopPropagation();\n this.handleChange(event.detail);\n }}\n />\n </Host>\n );\n }\n}\n",
192
+ "type": "registry:ui"
193
+ }
194
+ ]
195
+ }
@@ -0,0 +1,215 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "shell-gradient-swatch",
4
+ "title": "ShellGradientSwatch",
5
+ "description": "Deprecated internal compatibility component for one legacy AppShell gradient swatch.",
6
+ "type": "registry:ui",
7
+ "meta": {
8
+ "library": "@ds-mo/ui",
9
+ "distribution": "npm",
10
+ "storybook": "https://zainadeel.github.io/compomo/?path=/story/shell-gradient-swatch",
11
+ "source": "src/wc/components/ShellGradientSwatch/ShellGradientSwatch.tsx",
12
+ "intentStatus": "complete",
13
+ "intent": {
14
+ "audience": "internal",
15
+ "status": "deprecated",
16
+ "replacedBy": "component:ds-swatch-picker",
17
+ "replacementReason": "SwatchPicker renders its option buttons internally so an individually published radio swatch is no longer needed.",
18
+ "summary": "Deprecated internal compatibility component for one legacy AppShell gradient swatch.",
19
+ "useWhen": [
20
+ "Maintaining or extending ShellGradientPicker inside CompoMo."
21
+ ],
22
+ "avoidWhen": [
23
+ "Building application UI directly; use ShellGradientPicker instead.",
24
+ "Selecting semantic, brand, chart, page, or arbitrary gradient colors.",
25
+ "Creating a partial or custom set of shell gradient choices."
26
+ ],
27
+ "alternatives": [
28
+ {
29
+ "when": "An application needs the supported global shell appearance control.",
30
+ "component": "component:ds-swatch-picker",
31
+ "reason": "SwatchPicker provides the complete radio-group semantics, keyboard behavior, generic previews, and selection event."
32
+ }
33
+ ],
34
+ "commonlyComposedWith": [
35
+ "component:ds-swatch-picker"
36
+ ],
37
+ "accessibility": [
38
+ "Keep radio semantics, aria-checked state, and a preset-specific accessible name on the internal button.",
39
+ "Let ShellGradientPicker manage the roving tab stop and group keyboard navigation.",
40
+ "Do not expose an unlabeled color-only choice."
41
+ ],
42
+ "states": [
43
+ "Preset determines the token-based preview; selected determines radio state and selected visuals.",
44
+ "The selected swatch owns the radio group's single tab stop while ShellGradientPicker coordinates selection and focus movement.",
45
+ "isInactive disables interaction but does not remove the accessible name."
46
+ ],
47
+ "responsiveBehavior": [
48
+ "Preserve the fixed compact swatch geometry and let ShellGradientPicker own layout."
49
+ ],
50
+ "frameworkCaveats": {
51
+ "customElements": [
52
+ "Do not instantiate this internal primitive in consuming applications."
53
+ ],
54
+ "react": [
55
+ "Use DsShellGradientPicker rather than the generated swatch wrapper."
56
+ ],
57
+ "angular": [
58
+ "Use DsShellGradientPicker rather than importing DsShellGradientSwatch."
59
+ ]
60
+ },
61
+ "references": [
62
+ {
63
+ "label": "Parent picker",
64
+ "path": "src/wc/components/ShellGradientPicker/ShellGradientPicker.tsx"
65
+ }
66
+ ]
67
+ },
68
+ "api": {
69
+ "props": {
70
+ "ariaLabel": {
71
+ "type": "string | null",
72
+ "resolvedType": "null | string",
73
+ "attribute": "aria-label",
74
+ "default": "null",
75
+ "required": false,
76
+ "mutable": false
77
+ },
78
+ "isInactive": {
79
+ "type": "boolean",
80
+ "resolvedType": "boolean",
81
+ "attribute": "is-inactive",
82
+ "default": "false",
83
+ "required": false,
84
+ "mutable": false
85
+ },
86
+ "preset": {
87
+ "type": "ShellGradientPreset",
88
+ "resolvedType": "\"cool\" | \"fresh\" | \"neutral\" | \"none\" | \"warm\"",
89
+ "attribute": "preset",
90
+ "default": "'neutral'",
91
+ "required": false,
92
+ "mutable": false,
93
+ "description": "Wash preset this orb previews."
94
+ },
95
+ "selected": {
96
+ "type": "boolean",
97
+ "resolvedType": "boolean",
98
+ "attribute": "selected",
99
+ "default": "false",
100
+ "required": false,
101
+ "mutable": false,
102
+ "description": "Selected — brand stroke + halo over inner fill/border/interaction stack."
103
+ }
104
+ },
105
+ "events": [
106
+ {
107
+ "name": "dsSelect",
108
+ "detail": "ShellGradientPreset",
109
+ "bubbles": true,
110
+ "cancelable": true,
111
+ "composed": true
112
+ }
113
+ ],
114
+ "methods": [],
115
+ "slots": []
116
+ },
117
+ "props": {
118
+ "ariaLabel": {
119
+ "type": "string | null",
120
+ "resolvedType": "null | string",
121
+ "attribute": "aria-label",
122
+ "default": "null",
123
+ "required": false,
124
+ "mutable": false
125
+ },
126
+ "isInactive": {
127
+ "type": "boolean",
128
+ "resolvedType": "boolean",
129
+ "attribute": "is-inactive",
130
+ "default": "false",
131
+ "required": false,
132
+ "mutable": false
133
+ },
134
+ "preset": {
135
+ "type": "ShellGradientPreset",
136
+ "resolvedType": "\"cool\" | \"fresh\" | \"neutral\" | \"none\" | \"warm\"",
137
+ "attribute": "preset",
138
+ "default": "'neutral'",
139
+ "required": false,
140
+ "mutable": false,
141
+ "description": "Wash preset this orb previews."
142
+ },
143
+ "selected": {
144
+ "type": "boolean",
145
+ "resolvedType": "boolean",
146
+ "attribute": "selected",
147
+ "default": "false",
148
+ "required": false,
149
+ "mutable": false,
150
+ "description": "Selected — brand stroke + halo over inner fill/border/interaction stack."
151
+ }
152
+ },
153
+ "events": [
154
+ {
155
+ "name": "dsSelect",
156
+ "detail": "ShellGradientPreset",
157
+ "bubbles": true,
158
+ "cancelable": true,
159
+ "composed": true
160
+ }
161
+ ],
162
+ "methods": [],
163
+ "slots": [],
164
+ "exports": {
165
+ "customElement": "ds-shell-gradient-swatch",
166
+ "react": "DsShellGradientSwatch",
167
+ "angular": "DsShellGradientSwatch"
168
+ },
169
+ "consumption": {
170
+ "install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
171
+ "cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
172
+ "customElements": {
173
+ "import": "import '@ds-mo/ui/dist/components/ds-shell-gradient-swatch.js';",
174
+ "example": "<ds-shell-gradient-swatch></ds-shell-gradient-swatch>"
175
+ },
176
+ "react": {
177
+ "import": "import { DsShellGradientSwatch } from '@ds-mo/ui/react';",
178
+ "example": "<DsShellGradientSwatch />"
179
+ },
180
+ "angular": {
181
+ "import": "import { DsShellGradientSwatch } from '@ds-mo/ui/angular/ds-shell-gradient-swatch';",
182
+ "example": "<ds-shell-gradient-swatch></ds-shell-gradient-swatch>"
183
+ },
184
+ "peerDependencies": {
185
+ "required": [
186
+ "@ds-mo/tokens ^3.1.1",
187
+ "@ds-mo/icons ^6.2.0"
188
+ ],
189
+ "frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
190
+ }
191
+ }
192
+ },
193
+ "dependencies": [
194
+ "@ds-mo/ui",
195
+ "@ds-mo/tokens"
196
+ ],
197
+ "registryDependencies": [],
198
+ "files": [
199
+ {
200
+ "path": "src/wc/components/ShellGradientSwatch/ShellGradientSwatch.css",
201
+ "content": "@import '../../utils/focus-ring.css';\n@import '../../utils/control-inactive.css';\n\n/**\n * Swatch — 24×24 orb (size-300). Spacing lives on the picker row.\n *\n * Layer stack (bottom → top):\n * Default: fill → border → interaction (hover/press)\n * Selected: fill → border → interaction → halo → stroke (brand)\n */\n\n:host {\n box-sizing: border-box;\n display: inline-flex;\n flex: 0 0 auto;\n width: var(--dimension-size-300);\n height: var(--dimension-size-300);\n --_swatch-inner-inset: calc(\n var(--dimension-stroke-width-025) + var(--dimension-space-025)\n );\n --_swatch-ring-bg: var(--color-background-primary);\n --_swatch-select-motion: var(--effect-motion-short-3);\n}\n\n.shell-gradient-swatch {\n position: relative;\n box-sizing: border-box;\n width: var(--dimension-size-300);\n height: var(--dimension-size-300);\n padding: 0;\n border: none;\n border-radius: var(--dimension-radius-half);\n background: transparent;\n cursor: pointer;\n flex-shrink: 0;\n isolation: isolate;\n}\n\n.shell-gradient-swatch__fill,\n.shell-gradient-swatch__border,\n.shell-gradient-swatch__interaction,\n.shell-gradient-swatch__halo,\n.shell-gradient-swatch__stroke {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n border-radius: inherit;\n pointer-events: none;\n}\n\n/* 1 — fill */\n.shell-gradient-swatch__fill {\n z-index: 1;\n background-color: var(--color-background-secondary);\n background-image: var(--_swatch-gradient-image);\n background-repeat: no-repeat;\n background-size: cover;\n background-position: 0 0;\n transition:\n top var(--_swatch-select-motion),\n right var(--_swatch-select-motion),\n bottom var(--_swatch-select-motion),\n left var(--_swatch-select-motion);\n}\n\n.shell-gradient-swatch--none .shell-gradient-swatch__fill {\n background-image: none;\n}\n\n.shell-gradient-swatch:not(.shell-gradient-swatch--none) .shell-gradient-swatch__fill {\n opacity: var(--ds-shell-gradient-opacity, 0.1);\n}\n\n/* 2 — secondary border (matches ds-interaction-fill--bordered) */\n.shell-gradient-swatch__border {\n z-index: 2;\n box-shadow: inset 0 0 0 var(--dimension-stroke-width-012) var(--color-border-secondary);\n transition:\n top var(--_swatch-select-motion),\n right var(--_swatch-select-motion),\n bottom var(--_swatch-select-motion),\n left var(--_swatch-select-motion);\n}\n\n/* 3 — hover / press (over border, under selected chrome) */\n.shell-gradient-swatch__interaction {\n z-index: 3;\n background: transparent;\n transition:\n top var(--_swatch-select-motion),\n right var(--_swatch-select-motion),\n bottom var(--_swatch-select-motion),\n left var(--_swatch-select-motion),\n background-color 0s;\n}\n\n.shell-gradient-swatch:hover:not(:disabled) .shell-gradient-swatch__interaction {\n background: var(--color-interaction-hover);\n}\n\n.shell-gradient-swatch:active:not(:disabled) .shell-gradient-swatch__interaction {\n background: var(--color-interaction-pressed);\n}\n\n/* 4 — halo gap (selected only) */\n.shell-gradient-swatch__halo {\n z-index: 4;\n opacity: 0;\n transform: scale(1.2);\n transform-origin: center;\n box-shadow: inset 0 0 0 var(--_swatch-inner-inset) var(--_swatch-ring-bg);\n transition:\n opacity var(--_swatch-select-motion),\n transform var(--_swatch-select-motion);\n}\n\n/* 5 — brand stroke (selected only) */\n.shell-gradient-swatch__stroke {\n z-index: 5;\n opacity: 0;\n transform: scale(1.2);\n transform-origin: center;\n box-shadow: inset 0 0 0 var(--dimension-stroke-width-025) var(--color-border-bold-brand);\n transition:\n opacity var(--_swatch-select-motion),\n transform var(--_swatch-select-motion);\n}\n\n.shell-gradient-swatch--selected .shell-gradient-swatch__fill,\n.shell-gradient-swatch--selected .shell-gradient-swatch__border,\n.shell-gradient-swatch--selected .shell-gradient-swatch__interaction {\n top: var(--_swatch-inner-inset);\n right: var(--_swatch-inner-inset);\n bottom: var(--_swatch-inner-inset);\n left: var(--_swatch-inner-inset);\n}\n\n.shell-gradient-swatch--selected .shell-gradient-swatch__halo,\n.shell-gradient-swatch--selected .shell-gradient-swatch__stroke {\n opacity: 1;\n transform: scale(1);\n}\n\n/* Inactive: `.ds-control-inactive` (25% opacity). */\n\n@media (prefers-reduced-motion: reduce) {\n .shell-gradient-swatch__fill,\n .shell-gradient-swatch__border,\n .shell-gradient-swatch__interaction,\n .shell-gradient-swatch__halo,\n .shell-gradient-swatch__stroke {\n transition: none;\n }\n}\n",
202
+ "type": "registry:ui"
203
+ },
204
+ {
205
+ "path": "src/wc/components/ShellGradientSwatch/ShellGradientSwatch.tsx",
206
+ "content": "import { Component, Prop, Event, EventEmitter, h, Host } from '@stencil/core';\nimport {\n SHELL_GRADIENT_PRESET_LABELS,\n buildShellRadialGradientForPreset,\n DEFAULT_SHELL_GRADIENT_PRESET,\n type ShellGradientPreset,\n} from './shell-gradient-swatch-types';\nimport { shellGradientPresetOpacity } from '../../shell/shell-gradient-presets';\n\n/** @deprecated Use `ds-swatch-picker`; individual swatches are implementation detail. */\n@Component({\n tag: 'ds-shell-gradient-swatch',\n styleUrl: 'ShellGradientSwatch.css',\n scoped: true,\n})\nexport class ShellGradientSwatch {\n /** Wash preset this orb previews. */\n @Prop({ reflect: true }) preset: ShellGradientPreset = DEFAULT_SHELL_GRADIENT_PRESET;\n\n /** Selected — brand stroke + halo over inner fill/border/interaction stack. */\n @Prop({ reflect: true }) selected = false;\n\n @Prop() isInactive = false;\n\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n\n @Event() dsSelect!: EventEmitter<ShellGradientPreset>;\n\n private handleClick = () => {\n if (this.isInactive) return;\n this.dsSelect.emit(this.preset);\n };\n\n render() {\n const label = this.ariaLabel ?? SHELL_GRADIENT_PRESET_LABELS[this.preset];\n\n return (\n <Host>\n <button\n type=\"button\"\n class={{\n 'shell-gradient-swatch': true,\n 'ds-focus-ring-inset': true,\n 'ds-control-inactive': this.isInactive,\n 'shell-gradient-swatch--selected': this.selected,\n 'shell-gradient-swatch--none': this.preset === 'none',\n }}\n style={\n this.preset === 'none'\n ? undefined\n : {\n '--_swatch-gradient-image': buildShellRadialGradientForPreset(this.preset),\n '--ds-shell-gradient-opacity': shellGradientPresetOpacity(this.preset),\n }\n }\n aria-label={label}\n role=\"radio\"\n aria-checked={this.selected ? 'true' : 'false'}\n tabIndex={this.selected ? 0 : -1}\n disabled={this.isInactive}\n onClick={this.handleClick}\n >\n <span class=\"shell-gradient-swatch__fill\" aria-hidden=\"true\" />\n <span class=\"shell-gradient-swatch__border\" aria-hidden=\"true\" />\n <span class=\"shell-gradient-swatch__interaction\" aria-hidden=\"true\" />\n <span class=\"shell-gradient-swatch__halo\" aria-hidden=\"true\" />\n <span class=\"shell-gradient-swatch__stroke\" aria-hidden=\"true\" />\n </button>\n </Host>\n );\n }\n}\n",
207
+ "type": "registry:ui"
208
+ },
209
+ {
210
+ "path": "src/wc/components/ShellGradientSwatch/shell-gradient-swatch-types.ts",
211
+ "content": "import type { ShellGradientPreset } from '../../shell/shell-gradient-presets';\nexport type { ShellGradientPreset };\n\nexport {\n DEFAULT_SHELL_GRADIENT_PRESET,\n SHELL_GRADIENT_PRESETS,\n SHELL_GRADIENT_WASH_PRESETS,\n SHELL_GRADIENT_PRESET_LABELS,\n buildShellRadialGradientForPreset,\n buildShellRadialGradientFromStops,\n isShellGradientPreset,\n normalizeShellGradientPreset,\n shellGradientPresetOpacity,\n shellGradientPresetRecipe,\n shellGradientPresetStopToken,\n} from '../../shell/shell-gradient-presets';\n",
212
+ "type": "registry:ui"
213
+ }
214
+ ]
215
+ }