@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,276 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "chip",
4
+ "title": "Chip",
5
+ "description": "Always-removable metadata value for primary surfaces, with semantic value status and parent-owned removal.",
6
+ "type": "registry:ui",
7
+ "meta": {
8
+ "library": "@ds-mo/ui",
9
+ "distribution": "npm",
10
+ "storybook": "https://zainadeel.github.io/compomo/?path=/story/chip",
11
+ "source": "src/wc/components/Chip/Chip.tsx",
12
+ "intentStatus": "complete",
13
+ "intent": {
14
+ "audience": "general",
15
+ "status": "stable",
16
+ "summary": "Always-removable metadata value for primary surfaces, with semantic value status and parent-owned removal.",
17
+ "useWhen": [
18
+ "A user-applied value such as a filter, recipient, or tokenized input entry must remain visible and individually removable.",
19
+ "A compact metadata value needs a semantic neutral, active, error, or caution status before removal.",
20
+ "A collection owner can remove the represented value and restore focus after the dismiss action."
21
+ ],
22
+ "avoidWhen": [
23
+ "The label is static or not individually removable; use Tag instead.",
24
+ "The control selects, toggles, or navigates; use the matching button or navigation component.",
25
+ "The information is a persistent status, count, or unread indicator; use Badge or an appropriate status composition instead.",
26
+ "The chip would be placed on any surface other than a primary surface."
27
+ ],
28
+ "alternatives": [
29
+ {
30
+ "when": "The metadata label is static and has no dismiss action.",
31
+ "component": "component:ds-tag",
32
+ "reason": "Tag owns non-interactive taxonomy and metadata labels."
33
+ },
34
+ {
35
+ "when": "The compact mark communicates a count, status, or unread indicator.",
36
+ "component": "component:ds-badge",
37
+ "reason": "Badge owns supplemental counters and status marks without a dismiss action."
38
+ },
39
+ {
40
+ "when": "The value is a selectable or persistent toggle.",
41
+ "component": "component:ds-button-unfilled",
42
+ "reason": "ButtonUnfilled owns command and toggle semantics."
43
+ }
44
+ ],
45
+ "commonlyComposedWith": [
46
+ "component:ds-input",
47
+ "component:ds-select"
48
+ ],
49
+ "accessibility": [
50
+ "Keep the visible label meaningful without relying on semantic color alone.",
51
+ "Give the dismiss action a name that identifies the represented value.",
52
+ "After removal, the parent moves focus to the next chip, then the previous chip, or the owning collection or input trigger when no chips remain.",
53
+ "Inactive chips remain visible while their dismiss action is disabled and removed from keyboard interaction."
54
+ ],
55
+ "states": [
56
+ "Semantic state describes the represented value; active does not mean selected or pressed.",
57
+ "The dismiss action is the chip's only interaction, and the parent owns data mutation after dsRemove.",
58
+ "Long labels remain on one line and truncate only when the consuming layout supplies a maximum width; otherwise the chip sizes to its content.",
59
+ "Rounded shape is a visual choice and does not change semantics or interaction.",
60
+ "Chip is designed only for primary surfaces and has no surface-context API."
61
+ ],
62
+ "responsiveBehavior": [
63
+ "The parent chooses chip size and owns wrapping, overflow, and collection condensation.",
64
+ "Chip does not automatically resize, hide, or collapse its label at responsive breakpoints."
65
+ ],
66
+ "frameworkCaveats": {
67
+ "customElements": [
68
+ "dsRemove has no payload; associate each rendered chip with its owning value and remove that value from the event handler."
69
+ ],
70
+ "react": [
71
+ "Use the rendered chip's bound item context in the dsRemove handler, then restore focus after the collection rerenders."
72
+ ],
73
+ "angular": [
74
+ "Use the rendered chip's bound item context in the dsRemove handler, then restore focus after the collection rerenders."
75
+ ]
76
+ },
77
+ "references": [
78
+ {
79
+ "label": "Storybook examples",
80
+ "path": "src/wc/components/Chip/Chip.stories.ts"
81
+ }
82
+ ]
83
+ },
84
+ "api": {
85
+ "props": {
86
+ "isInactive": {
87
+ "type": "boolean",
88
+ "resolvedType": "boolean",
89
+ "attribute": "is-inactive",
90
+ "default": "false",
91
+ "required": false,
92
+ "mutable": false
93
+ },
94
+ "label": {
95
+ "type": "string",
96
+ "resolvedType": "string",
97
+ "attribute": "label",
98
+ "required": true,
99
+ "mutable": false
100
+ },
101
+ "maxWidth": {
102
+ "type": "string | number | undefined",
103
+ "resolvedType": "number | string | undefined",
104
+ "attribute": "max-width",
105
+ "required": false,
106
+ "mutable": false
107
+ },
108
+ "removeLabel": {
109
+ "type": "string",
110
+ "resolvedType": "string",
111
+ "attribute": "remove-label",
112
+ "default": "'Remove {label}'",
113
+ "required": false,
114
+ "mutable": false,
115
+ "description": "Accessible remove action. Use `{label}` as the chip-label placeholder."
116
+ },
117
+ "rounded": {
118
+ "type": "boolean",
119
+ "resolvedType": "boolean",
120
+ "attribute": "rounded",
121
+ "default": "false",
122
+ "required": false,
123
+ "mutable": false
124
+ },
125
+ "size": {
126
+ "type": "ChipSize",
127
+ "resolvedType": "\"md\" | \"sm\" | \"xs\"",
128
+ "attribute": "size",
129
+ "default": "'md'",
130
+ "required": false,
131
+ "mutable": false
132
+ },
133
+ "state": {
134
+ "type": "ChipState",
135
+ "resolvedType": "\"active\" | \"caution\" | \"default\" | \"error\"",
136
+ "attribute": "state",
137
+ "default": "'default'",
138
+ "required": false,
139
+ "mutable": false,
140
+ "description": "Semantic color state."
141
+ }
142
+ },
143
+ "events": [
144
+ {
145
+ "name": "dsRemove",
146
+ "detail": "void",
147
+ "bubbles": true,
148
+ "cancelable": true,
149
+ "composed": true,
150
+ "description": "Fired when the remove button is clicked."
151
+ }
152
+ ],
153
+ "methods": [],
154
+ "slots": []
155
+ },
156
+ "props": {
157
+ "isInactive": {
158
+ "type": "boolean",
159
+ "resolvedType": "boolean",
160
+ "attribute": "is-inactive",
161
+ "default": "false",
162
+ "required": false,
163
+ "mutable": false
164
+ },
165
+ "label": {
166
+ "type": "string",
167
+ "resolvedType": "string",
168
+ "attribute": "label",
169
+ "required": true,
170
+ "mutable": false
171
+ },
172
+ "maxWidth": {
173
+ "type": "string | number | undefined",
174
+ "resolvedType": "number | string | undefined",
175
+ "attribute": "max-width",
176
+ "required": false,
177
+ "mutable": false
178
+ },
179
+ "removeLabel": {
180
+ "type": "string",
181
+ "resolvedType": "string",
182
+ "attribute": "remove-label",
183
+ "default": "'Remove {label}'",
184
+ "required": false,
185
+ "mutable": false,
186
+ "description": "Accessible remove action. Use `{label}` as the chip-label placeholder."
187
+ },
188
+ "rounded": {
189
+ "type": "boolean",
190
+ "resolvedType": "boolean",
191
+ "attribute": "rounded",
192
+ "default": "false",
193
+ "required": false,
194
+ "mutable": false
195
+ },
196
+ "size": {
197
+ "type": "ChipSize",
198
+ "resolvedType": "\"md\" | \"sm\" | \"xs\"",
199
+ "attribute": "size",
200
+ "default": "'md'",
201
+ "required": false,
202
+ "mutable": false
203
+ },
204
+ "state": {
205
+ "type": "ChipState",
206
+ "resolvedType": "\"active\" | \"caution\" | \"default\" | \"error\"",
207
+ "attribute": "state",
208
+ "default": "'default'",
209
+ "required": false,
210
+ "mutable": false,
211
+ "description": "Semantic color state."
212
+ }
213
+ },
214
+ "events": [
215
+ {
216
+ "name": "dsRemove",
217
+ "detail": "void",
218
+ "bubbles": true,
219
+ "cancelable": true,
220
+ "composed": true,
221
+ "description": "Fired when the remove button is clicked."
222
+ }
223
+ ],
224
+ "methods": [],
225
+ "slots": [],
226
+ "exports": {
227
+ "customElement": "ds-chip",
228
+ "react": "DsChip",
229
+ "angular": "DsChip"
230
+ },
231
+ "consumption": {
232
+ "install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
233
+ "cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
234
+ "customElements": {
235
+ "import": "import '@ds-mo/ui/dist/components/ds-chip.js';",
236
+ "example": "<ds-chip></ds-chip>"
237
+ },
238
+ "react": {
239
+ "import": "import { DsChip } from '@ds-mo/ui/react';",
240
+ "example": "<DsChip />"
241
+ },
242
+ "angular": {
243
+ "import": "import { DsChip } from '@ds-mo/ui/angular/ds-chip';",
244
+ "example": "<ds-chip></ds-chip>"
245
+ },
246
+ "peerDependencies": {
247
+ "required": [
248
+ "@ds-mo/tokens ^3.1.1",
249
+ "@ds-mo/icons ^6.2.0"
250
+ ],
251
+ "frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
252
+ }
253
+ }
254
+ },
255
+ "dependencies": [
256
+ "@ds-mo/ui",
257
+ "@ds-mo/tokens",
258
+ "@ds-mo/icons"
259
+ ],
260
+ "registryDependencies": [
261
+ "icon",
262
+ "text"
263
+ ],
264
+ "files": [
265
+ {
266
+ "path": "src/wc/components/Chip/Chip.css",
267
+ "content": "@import '../../utils/tag-chip.css';\n\n/*\n * Semantic state colors — Chip’s differentiator from Tag.\n * All states use the faint contrast weight; hue comes from the state.\n */\n:host(.chip--default) {\n background-color: var(--color-background-faint-neutral);\n color: var(--color-foreground-bold-neutral);\n}\n\n:host(.chip--active) {\n background-color: var(--color-background-faint-brand);\n color: var(--color-foreground-bold-brand);\n}\n\n:host(.chip--error) {\n background-color: var(--color-background-faint-negative);\n color: var(--color-foreground-bold-negative);\n}\n\n:host(.chip--caution) {\n background-color: var(--color-background-faint-caution);\n color: var(--color-foreground-bold-caution);\n}\n\n/*\n * Label↔dismiss uses host gap, mirroring Tag icon↔label spacing:\n * [inset][text][inset][gap][icon].\n */\n.tag__remove {\n padding: 0;\n margin: 0;\n border: none;\n background: none;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n color: inherit;\n flex-shrink: 0;\n position: relative;\n z-index: 2;\n border-radius: var(--dimension-radius-half);\n}\n\n.tag__remove::before {\n content: '';\n position: absolute;\n inset: var(--dimension-space-n025);\n border-radius: var(--dimension-radius-half);\n background-color: transparent;\n transition: var(--effect-transition-interaction-background-short-2);\n pointer-events: none;\n}\n\n.tag__remove:hover::before {\n background-color: var(--color-interaction-hover);\n}\n\n.tag__remove:active::before {\n background-color: var(--color-interaction-pressed);\n}\n\n:host(.tag--size-sm) .tag__remove::before {\n inset: var(--dimension-space-n012);\n}\n\n:host(.tag--size-xs) .tag__remove::before {\n inset: 0;\n}\n\n.tag__remove-x {\n display: inline-flex;\n flex-shrink: 0;\n width: var(--ds-control-icon);\n height: var(--ds-control-icon);\n}\n",
268
+ "type": "registry:ui"
269
+ },
270
+ {
271
+ "path": "src/wc/components/Chip/Chip.tsx",
272
+ "content": "import { Component, Prop, Event, EventEmitter, h, Host } from '@stencil/core';\nimport { CONTROL_TEXT_VARIANT } from '../../utils';\n\n/**\n * Semantic chip state — replaces Tag’s intent × contrast matrix.\n * - `default` — neutral faint\n * - `active` — brand faint\n * - `error` — negative faint\n * - `caution` — caution faint\n */\nexport type ChipState = 'default' | 'active' | 'error' | 'caution';\nexport type ChipSize = 'md' | 'sm' | 'xs';\n\n/** Dismiss `ds-icon` size — same iconography metrics as Tag’s leading icon. */\nconst ICON_SIZE: Record<ChipSize, 'md' | 'sm' | 'xs'> = {\n md: 'md',\n sm: 'sm',\n xs: 'xs',\n};\n\n/**\n * Removable chip — same density recipe as Tag, but colored by semantic `state`\n * (not intent × contrast). Not a toggle/select control; the only intentional\n * action is remove.\n */\n@Component({\n tag: 'ds-chip',\n styleUrl: 'Chip.css',\n scoped: true,\n})\nexport class Chip {\n @Prop() label!: string;\n /** Semantic color state. @default 'default' */\n @Prop() state: ChipState = 'default';\n @Prop() size: ChipSize = 'md';\n @Prop() rounded: boolean = false;\n @Prop() maxWidth: string | number | undefined;\n @Prop() isInactive: boolean = false;\n /** Accessible remove action. Use `{label}` as the chip-label placeholder. */\n @Prop() removeLabel: string = 'Remove {label}';\n\n /** Fired when the remove button is clicked. */\n @Event() dsRemove!: EventEmitter<void>;\n\n private handleRemove = (e: MouseEvent) => {\n e.stopPropagation();\n if (this.isInactive) return;\n this.dsRemove.emit();\n };\n\n render() {\n const textVariant = CONTROL_TEXT_VARIANT[this.size];\n const iconSize = ICON_SIZE[this.size];\n\n const maxWidthStyle = this.maxWidth != null\n ? { maxWidth: typeof this.maxWidth === 'number' ? `${this.maxWidth}px` : this.maxWidth }\n : undefined;\n\n return (\n <Host\n class={{\n 'tag': true,\n 'chip': true,\n [`chip--${this.state}`]: true,\n [`tag--size-${this.size}`]: true,\n 'ds-control--md': this.size === 'md',\n 'ds-control--sm': this.size === 'sm',\n 'ds-control--xs': this.size === 'xs',\n 'tag--rounded': this.rounded,\n 'tag--removable': true,\n /* Hover overlay on the chip surface — dismiss is the only action. */\n 'ds-interaction-fill': !this.isInactive,\n 'ds-control-inactive': this.isInactive,\n }}\n style={maxWidthStyle}\n aria-disabled={this.isInactive ? 'true' : undefined}\n >\n <ds-text class=\"tag__label\" as=\"span\" variant={textVariant} color=\"inherit\">\n {this.label}\n </ds-text>\n <button\n type=\"button\"\n class=\"tag__remove ds-focus-ring-inset\"\n onClick={this.handleRemove}\n aria-label={this.removeLabel.replace('{label}', this.label)}\n disabled={this.isInactive || undefined}\n >\n <ds-icon class=\"tag__remove-x\" name=\"Cross\" size={iconSize} color=\"inherit\"></ds-icon>\n </button>\n </Host>\n );\n }\n}\n",
273
+ "type": "registry:ui"
274
+ }
275
+ ]
276
+ }
@@ -0,0 +1,225 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "divider",
4
+ "title": "Divider",
5
+ "description": "Horizontal or vertical separator between sibling content groups, decorative by default with optional structural semantics.",
6
+ "type": "registry:ui",
7
+ "meta": {
8
+ "library": "@ds-mo/ui",
9
+ "distribution": "npm",
10
+ "storybook": "https://zainadeel.github.io/compomo/?path=/story/divider",
11
+ "source": "src/wc/components/Divider/Divider.tsx",
12
+ "intentStatus": "complete",
13
+ "intent": {
14
+ "audience": "general",
15
+ "status": "stable",
16
+ "summary": "Horizontal or vertical separator between sibling content groups, decorative by default with optional structural semantics.",
17
+ "useWhen": [
18
+ "Related sibling content groups on one surface need stronger visual separation than spacing alone provides.",
19
+ "A list or panel needs an inset separator that does not define the outer edge of its container.",
20
+ "Meaningful document or group structure requires an explicit horizontal or vertical separator."
21
+ ],
22
+ "avoidWhen": [
23
+ "Spacing alone communicates the grouping clearly.",
24
+ "The line defines a container edge, control outline, or selected state; use the owning component's border treatment.",
25
+ "The divider would compensate for weak headings or unclear information hierarchy.",
26
+ "A decorative flourish does not clarify grouping."
27
+ ],
28
+ "alternatives": [
29
+ {
30
+ "when": "Content needs an enclosing surface and outer boundary.",
31
+ "component": "component:ds-card",
32
+ "reason": "Card owns container chrome, structure, and edge treatment."
33
+ },
34
+ {
35
+ "when": "A static compact label is being used to name a group.",
36
+ "component": "component:ds-text",
37
+ "reason": "Text communicates hierarchy directly instead of relying on a line."
38
+ }
39
+ ],
40
+ "commonlyComposedWith": [
41
+ "component:ds-card",
42
+ "component:ds-menu",
43
+ "component:ds-panel-sub-nav"
44
+ ],
45
+ "accessibility": [
46
+ "Keep purely visual dividers hidden from assistive technology.",
47
+ "Expose separator semantics only when the line represents meaningful document or group structure.",
48
+ "Semantic orientation must match the divider's visual orientation.",
49
+ "Do not use a semantic divider as a substitute for headings, landmarks, or explicit group labels."
50
+ ],
51
+ "states": [
52
+ "Horizontal and vertical variants separate sibling groups along the parent's layout axis.",
53
+ "The omitted background context is for primary and secondary surfaces. Explicit faint documents a faint surface while using the same standard divider token.",
54
+ "Other background contexts select their matching divider token, including navigation where Divider is composed inside app chrome.",
55
+ "Inset is symmetric along the line axis. Explicit length is reserved for layout-specific separators; otherwise the line fills the available axis."
56
+ ],
57
+ "responsiveBehavior": [
58
+ "The parent layout decides whether to change orientation, visibility, inset, or length at responsive breakpoints.",
59
+ "Divider does not infer layout direction or hide itself responsively."
60
+ ],
61
+ "frameworkCaveats": {
62
+ "customElements": [
63
+ "Set semantic mode only from known document structure; presentation alone should remain hidden from assistive technology."
64
+ ],
65
+ "react": [
66
+ "Derive orientation and visibility from the parent layout rather than viewport logic inside Divider."
67
+ ],
68
+ "angular": [
69
+ "Derive orientation and visibility from the parent layout rather than viewport logic inside Divider."
70
+ ]
71
+ },
72
+ "references": [
73
+ {
74
+ "label": "Storybook examples",
75
+ "path": "src/wc/components/Divider/Divider.stories.ts"
76
+ }
77
+ ]
78
+ },
79
+ "api": {
80
+ "props": {
81
+ "background": {
82
+ "type": "DividerBackground | undefined",
83
+ "resolvedType": "\"always-dark\" | \"bold\" | \"faint\" | \"inverted\" | \"media\" | \"medium\" | \"navigation\" | \"strong\" | \"translucent\" | undefined",
84
+ "attribute": "background",
85
+ "required": false,
86
+ "mutable": false,
87
+ "description": "Actual parent surface context. Omit on primary and secondary surfaces."
88
+ },
89
+ "inset": {
90
+ "type": "DividerInset",
91
+ "resolvedType": "\"none\" | \"space-000\" | \"space-012\" | \"space-025\" | \"space-050\" | \"space-075\" | \"space-100\" | \"space-125\" | \"space-150\" | \"space-175\" | \"space-200\" | \"space-250\" | \"space-300\" | \"space-400\" | \"space-600\" | \"space-800\" | string & {}",
92
+ "attribute": "inset",
93
+ "default": "'none'",
94
+ "required": false,
95
+ "mutable": false,
96
+ "description": "Insets the divider from its start/end edges. Accepts spacing token names or any CSS length."
97
+ },
98
+ "length": {
99
+ "type": "DividerLength",
100
+ "resolvedType": "\"auto\" | \"full\" | string & {}",
101
+ "attribute": "length",
102
+ "default": "'auto'",
103
+ "required": false,
104
+ "mutable": false,
105
+ "description": "Visual line length. Defaults to filling the available axis. Accepts any CSS length."
106
+ },
107
+ "orientation": {
108
+ "type": "DividerOrientation",
109
+ "resolvedType": "\"horizontal\" | \"vertical\"",
110
+ "attribute": "orientation",
111
+ "default": "'horizontal'",
112
+ "required": false,
113
+ "mutable": false,
114
+ "description": "Direction of the divider line. Defaults to 'horizontal'."
115
+ },
116
+ "semantic": {
117
+ "type": "boolean",
118
+ "resolvedType": "boolean",
119
+ "attribute": "semantic",
120
+ "default": "false",
121
+ "required": false,
122
+ "mutable": false,
123
+ "description": "Expose the divider as a semantic separator. Visual-only dividers are hidden from assistive tech by default."
124
+ }
125
+ },
126
+ "events": [],
127
+ "methods": [],
128
+ "slots": []
129
+ },
130
+ "props": {
131
+ "background": {
132
+ "type": "DividerBackground | undefined",
133
+ "resolvedType": "\"always-dark\" | \"bold\" | \"faint\" | \"inverted\" | \"media\" | \"medium\" | \"navigation\" | \"strong\" | \"translucent\" | undefined",
134
+ "attribute": "background",
135
+ "required": false,
136
+ "mutable": false,
137
+ "description": "Actual parent surface context. Omit on primary and secondary surfaces."
138
+ },
139
+ "inset": {
140
+ "type": "DividerInset",
141
+ "resolvedType": "\"none\" | \"space-000\" | \"space-012\" | \"space-025\" | \"space-050\" | \"space-075\" | \"space-100\" | \"space-125\" | \"space-150\" | \"space-175\" | \"space-200\" | \"space-250\" | \"space-300\" | \"space-400\" | \"space-600\" | \"space-800\" | string & {}",
142
+ "attribute": "inset",
143
+ "default": "'none'",
144
+ "required": false,
145
+ "mutable": false,
146
+ "description": "Insets the divider from its start/end edges. Accepts spacing token names or any CSS length."
147
+ },
148
+ "length": {
149
+ "type": "DividerLength",
150
+ "resolvedType": "\"auto\" | \"full\" | string & {}",
151
+ "attribute": "length",
152
+ "default": "'auto'",
153
+ "required": false,
154
+ "mutable": false,
155
+ "description": "Visual line length. Defaults to filling the available axis. Accepts any CSS length."
156
+ },
157
+ "orientation": {
158
+ "type": "DividerOrientation",
159
+ "resolvedType": "\"horizontal\" | \"vertical\"",
160
+ "attribute": "orientation",
161
+ "default": "'horizontal'",
162
+ "required": false,
163
+ "mutable": false,
164
+ "description": "Direction of the divider line. Defaults to 'horizontal'."
165
+ },
166
+ "semantic": {
167
+ "type": "boolean",
168
+ "resolvedType": "boolean",
169
+ "attribute": "semantic",
170
+ "default": "false",
171
+ "required": false,
172
+ "mutable": false,
173
+ "description": "Expose the divider as a semantic separator. Visual-only dividers are hidden from assistive tech by default."
174
+ }
175
+ },
176
+ "events": [],
177
+ "methods": [],
178
+ "slots": [],
179
+ "exports": {
180
+ "customElement": "ds-divider",
181
+ "react": "DsDivider",
182
+ "angular": "DsDivider"
183
+ },
184
+ "consumption": {
185
+ "install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
186
+ "cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
187
+ "customElements": {
188
+ "import": "import '@ds-mo/ui/dist/components/ds-divider.js';",
189
+ "example": "<ds-divider></ds-divider>"
190
+ },
191
+ "react": {
192
+ "import": "import { DsDivider } from '@ds-mo/ui/react';",
193
+ "example": "<DsDivider />"
194
+ },
195
+ "angular": {
196
+ "import": "import { DsDivider } from '@ds-mo/ui/angular/ds-divider';",
197
+ "example": "<ds-divider></ds-divider>"
198
+ },
199
+ "peerDependencies": {
200
+ "required": [
201
+ "@ds-mo/tokens ^3.1.1",
202
+ "@ds-mo/icons ^6.2.0"
203
+ ],
204
+ "frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
205
+ }
206
+ }
207
+ },
208
+ "dependencies": [
209
+ "@ds-mo/ui",
210
+ "@ds-mo/tokens"
211
+ ],
212
+ "registryDependencies": [],
213
+ "files": [
214
+ {
215
+ "path": "src/wc/components/Divider/Divider.css",
216
+ "content": ":host {\n --_divider-color: var(--color-divider-divider);\n --_divider-inset: 0;\n --_divider-length: 100%;\n\n display: block;\n flex-shrink: 0;\n width: var(--_divider-length);\n height: var(--dimension-stroke-width-012);\n margin: 0 var(--_divider-inset);\n border: none;\n background-color: var(--_divider-color);\n}\n\n:host(.divider--vertical) {\n width: var(--dimension-stroke-width-012);\n height: var(--_divider-length);\n min-height: var(--dimension-stroke-width-012);\n margin: var(--_divider-inset) 0;\n align-self: stretch;\n}\n\n:host(.divider--vertical.divider--custom-length) {\n align-self: center;\n}\n\n:host([background='bold']),\n:host(.divider--background-bold) {\n --_divider-color: var(--color-divider-divider-on-bold-background);\n}\n\n:host([background='strong']),\n:host(.divider--background-strong) {\n --_divider-color: var(--color-divider-divider-on-strong-background);\n}\n\n:host([background='medium']),\n:host(.divider--background-medium) {\n --_divider-color: var(--color-divider-divider-on-medium-background);\n}\n\n:host([background='translucent']),\n:host(.divider--background-translucent) {\n --_divider-color: var(--color-translucent-divider);\n}\n\n:host([background='navigation']),\n:host(.divider--background-navigation) {\n --_divider-color: var(--color-navigation-divider);\n}\n\n:host([background='media']),\n:host(.divider--background-media) {\n --_divider-color: var(--color-media-divider);\n}\n\n:host([background='always-dark']),\n:host(.divider--background-always-dark) {\n --_divider-color: var(--color-always-dark-divider);\n}\n\n:host([background='inverted']),\n:host(.divider--background-inverted) {\n --_divider-color: var(--color-inverted-divider);\n}\n",
217
+ "type": "registry:ui"
218
+ },
219
+ {
220
+ "path": "src/wc/components/Divider/Divider.tsx",
221
+ "content": "import { Component, Prop, h, Host } from '@stencil/core';\n\nexport type DividerOrientation = 'horizontal' | 'vertical';\nexport type DividerBackground =\n | 'faint'\n | 'medium'\n | 'bold'\n | 'strong'\n | 'translucent'\n | 'inverted'\n | 'media'\n | 'navigation'\n | 'always-dark';\nexport type DividerInsetToken =\n | 'space-000'\n | 'space-012'\n | 'space-025'\n | 'space-050'\n | 'space-075'\n | 'space-100'\n | 'space-125'\n | 'space-150'\n | 'space-175'\n | 'space-200'\n | 'space-250'\n | 'space-300'\n | 'space-400'\n | 'space-600'\n | 'space-800';\nexport type DividerInset = 'none' | DividerInsetToken | (string & {});\nexport type DividerLength = 'auto' | 'full' | (string & {});\n\nconst INSET_VALUE: Record<'none' | DividerInsetToken, string> = {\n none: '0',\n 'space-000': 'var(--dimension-space-000)',\n 'space-012': 'var(--dimension-space-012)',\n 'space-025': 'var(--dimension-space-025)',\n 'space-050': 'var(--dimension-space-050)',\n 'space-075': 'var(--dimension-space-075)',\n 'space-100': 'var(--dimension-space-100)',\n 'space-125': 'var(--dimension-space-125)',\n 'space-150': 'var(--dimension-space-150)',\n 'space-175': 'var(--dimension-space-175)',\n 'space-200': 'var(--dimension-space-200)',\n 'space-250': 'var(--dimension-space-250)',\n 'space-300': 'var(--dimension-space-300)',\n 'space-400': 'var(--dimension-space-400)',\n 'space-600': 'var(--dimension-space-600)',\n 'space-800': 'var(--dimension-space-800)',\n};\n\n@Component({\n tag: 'ds-divider',\n styleUrl: 'Divider.css',\n scoped: true,\n})\nexport class Divider {\n /** Direction of the divider line. Defaults to 'horizontal'. */\n @Prop() orientation: DividerOrientation = 'horizontal';\n\n /** Actual parent surface context. Omit on primary and secondary surfaces. */\n @Prop() background: DividerBackground | undefined;\n\n /** Insets the divider from its start/end edges. Accepts spacing token names or any CSS length. */\n @Prop() inset: DividerInset = 'none';\n\n /** Visual line length. Defaults to filling the available axis. Accepts any CSS length. */\n @Prop() length: DividerLength = 'auto';\n\n /** Expose the divider as a semantic separator. Visual-only dividers are hidden from assistive tech by default. */\n @Prop() semantic: boolean = false;\n\n private resolveInset(): string {\n return Object.prototype.hasOwnProperty.call(INSET_VALUE, this.inset)\n ? INSET_VALUE[this.inset as keyof typeof INSET_VALUE]\n : this.inset;\n }\n\n private resolveLength(): string {\n return this.length === 'auto' || this.length === 'full'\n ? '100%'\n : this.length;\n }\n\n render() {\n const isVertical = this.orientation === 'vertical';\n const hasCustomLength = this.length !== 'auto' && this.length !== 'full';\n\n return (\n <Host\n role={this.semantic ? 'separator' : undefined}\n aria-orientation={this.semantic ? this.orientation : undefined}\n aria-hidden={this.semantic ? undefined : 'true'}\n class={{\n divider: true,\n 'divider--vertical': isVertical,\n 'divider--custom-length': hasCustomLength,\n [`divider--background-${this.background}`]: !!this.background,\n }}\n style={{\n '--_divider-inset': this.resolveInset(),\n '--_divider-length': this.resolveLength(),\n }}\n />\n );\n }\n}\n",
222
+ "type": "registry:ui"
223
+ }
224
+ ]
225
+ }