@ds-mo/ui 9.0.0 → 9.2.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 (385) hide show
  1. package/README.md +28 -0
  2. package/dist/.build-stamp +1 -1
  3. package/dist/agent-patterns.json +397 -0
  4. package/dist/agent.json +2347 -735
  5. package/dist/angular/ds-agent-activity.d.ts +12 -0
  6. package/dist/angular/ds-agent-activity.js +38 -0
  7. package/dist/angular/ds-agent-response.d.ts +12 -0
  8. package/dist/angular/ds-agent-response.js +38 -0
  9. package/dist/angular/ds-agent-source-list.d.ts +12 -0
  10. package/dist/angular/ds-agent-source-list.js +38 -0
  11. package/dist/angular/ds-agent-tool-call.d.ts +12 -0
  12. package/dist/angular/ds-agent-tool-call.js +38 -0
  13. package/dist/angular/ds-attachment-list.d.ts +12 -0
  14. package/dist/angular/ds-attachment-list.js +38 -0
  15. package/dist/angular/ds-avatar.d.ts +12 -0
  16. package/dist/angular/ds-avatar.js +38 -0
  17. package/dist/angular/ds-code-block.d.ts +12 -0
  18. package/dist/angular/ds-code-block.js +38 -0
  19. package/dist/angular/ds-conversation-list-item.d.ts +19 -0
  20. package/dist/angular/ds-conversation-list-item.js +42 -0
  21. package/dist/angular/ds-conversation-list-section.d.ts +12 -0
  22. package/dist/angular/ds-conversation-list-section.js +38 -0
  23. package/dist/angular/ds-conversation-list.d.ts +12 -0
  24. package/dist/angular/ds-conversation-list.js +37 -0
  25. package/dist/angular/ds-markdown.d.ts +12 -0
  26. package/dist/angular/ds-markdown.js +38 -0
  27. package/dist/angular/ds-menu.d.ts +6 -1
  28. package/dist/angular/ds-menu.js +7 -4
  29. package/dist/angular/ds-message-bubble.d.ts +12 -0
  30. package/dist/angular/ds-message-bubble.js +38 -0
  31. package/dist/angular/ds-message-composer.d.ts +23 -0
  32. package/dist/angular/ds-message-composer.js +49 -0
  33. package/dist/angular/ds-message-scroller.d.ts +15 -0
  34. package/dist/angular/ds-message-scroller.js +43 -0
  35. package/dist/angular/ds-message.d.ts +12 -0
  36. package/dist/angular/ds-message.js +38 -0
  37. package/dist/angular/ds-panel-tool-header.d.ts +25 -0
  38. package/dist/angular/ds-panel-tool-header.js +49 -0
  39. package/dist/angular/ds-panel-tool-search.d.ts +19 -0
  40. package/dist/angular/ds-panel-tool-search.js +49 -0
  41. package/dist/angular/ds-panel-tools.d.ts +30 -1
  42. package/dist/angular/ds-panel-tools.js +14 -5
  43. package/dist/angular/ds-swatch-picker.d.ts +15 -0
  44. package/dist/angular/ds-swatch-picker.js +42 -0
  45. package/dist/angular/index.d.ts +1 -1
  46. package/dist/angular/index.js +18 -0
  47. package/dist/angular/proxies.d.ts +18 -0
  48. package/dist/angular/proxies.js +18 -0
  49. package/dist/components/ds-agent-activity.d.ts +11 -0
  50. package/dist/components/ds-agent-activity.js +2 -0
  51. package/dist/components/ds-agent-activity.js.map +1 -0
  52. package/dist/components/ds-agent-response.d.ts +11 -0
  53. package/dist/components/ds-agent-response.js +2 -0
  54. package/dist/components/ds-agent-response.js.map +1 -0
  55. package/dist/components/ds-agent-source-list.d.ts +11 -0
  56. package/dist/components/ds-agent-source-list.js +2 -0
  57. package/dist/components/ds-agent-source-list.js.map +1 -0
  58. package/dist/components/ds-agent-tool-call.d.ts +11 -0
  59. package/dist/components/ds-agent-tool-call.js +2 -0
  60. package/dist/components/ds-agent-tool-call.js.map +1 -0
  61. package/dist/components/ds-app-shell.js +1 -1
  62. package/dist/components/ds-app-shell.js.map +1 -1
  63. package/dist/components/ds-attachment-list.d.ts +11 -0
  64. package/dist/components/ds-attachment-list.js +2 -0
  65. package/dist/components/ds-attachment-list.js.map +1 -0
  66. package/dist/components/ds-avatar.d.ts +11 -0
  67. package/dist/components/ds-avatar.js +2 -0
  68. package/dist/components/ds-avatar.js.map +1 -0
  69. package/dist/components/ds-badge.js +1 -1
  70. package/dist/components/ds-banner.js +1 -1
  71. package/dist/components/ds-bar-nav.js +1 -1
  72. package/dist/components/ds-bar-nav.js.map +1 -1
  73. package/dist/components/ds-button-filled.js +1 -1
  74. package/dist/components/ds-button-unfilled.js +1 -1
  75. package/dist/components/ds-card-data-viz-donut.js +1 -1
  76. package/dist/components/ds-card-setting.js +1 -1
  77. package/dist/components/ds-card-shell-data-viz.js +1 -1
  78. package/dist/components/ds-card.js +1 -1
  79. package/dist/components/ds-chart-bar.js +1 -1
  80. package/dist/components/ds-chart-bar.js.map +1 -1
  81. package/dist/components/ds-chart-donut.js +1 -1
  82. package/dist/components/ds-chart-legend.js +1 -1
  83. package/dist/components/ds-chart-line.js +1 -1
  84. package/dist/components/ds-checkbox.js +1 -1
  85. package/dist/components/ds-chip.js +1 -1
  86. package/dist/components/ds-code-block.d.ts +11 -0
  87. package/dist/components/ds-code-block.js +2 -0
  88. package/dist/components/ds-code-block.js.map +1 -0
  89. package/dist/components/ds-conversation-list-item.d.ts +11 -0
  90. package/dist/components/ds-conversation-list-item.js +2 -0
  91. package/dist/components/ds-conversation-list-item.js.map +1 -0
  92. package/dist/components/ds-conversation-list-section.d.ts +11 -0
  93. package/dist/components/ds-conversation-list-section.js +2 -0
  94. package/dist/components/ds-conversation-list-section.js.map +1 -0
  95. package/dist/components/ds-conversation-list.d.ts +11 -0
  96. package/dist/components/ds-conversation-list.js +2 -0
  97. package/dist/components/ds-conversation-list.js.map +1 -0
  98. package/dist/components/ds-divider.js +1 -1
  99. package/dist/components/ds-divider.js.map +1 -1
  100. package/dist/components/ds-empty-state.js +1 -1
  101. package/dist/components/ds-field.js +1 -1
  102. package/dist/components/ds-icon.js +1 -1
  103. package/dist/components/ds-input.js +1 -1
  104. package/dist/components/ds-markdown.d.ts +11 -0
  105. package/dist/components/ds-markdown.js +2 -0
  106. package/dist/components/ds-markdown.js.map +1 -0
  107. package/dist/components/ds-menu.js +1 -1
  108. package/dist/components/ds-message-bubble.d.ts +11 -0
  109. package/dist/components/ds-message-bubble.js +2 -0
  110. package/dist/components/ds-message-bubble.js.map +1 -0
  111. package/dist/components/ds-message-composer.d.ts +11 -0
  112. package/dist/components/ds-message-composer.js +2 -0
  113. package/dist/components/ds-message-composer.js.map +1 -0
  114. package/dist/components/ds-message-scroller.d.ts +11 -0
  115. package/dist/components/ds-message-scroller.js +2 -0
  116. package/dist/components/ds-message-scroller.js.map +1 -0
  117. package/dist/components/ds-message.d.ts +11 -0
  118. package/dist/components/ds-message.js +2 -0
  119. package/dist/components/ds-message.js.map +1 -0
  120. package/dist/components/ds-modal.js +1 -1
  121. package/dist/components/ds-panel-nav.js +1 -1
  122. package/dist/components/ds-panel-nav.js.map +1 -1
  123. package/dist/components/ds-panel-sub-nav.js +1 -1
  124. package/dist/components/ds-panel-tool-header.d.ts +11 -0
  125. package/dist/components/ds-panel-tool-header.js +2 -0
  126. package/dist/components/ds-panel-tool-header.js.map +1 -0
  127. package/dist/components/ds-panel-tool-search.d.ts +11 -0
  128. package/dist/components/ds-panel-tool-search.js +2 -0
  129. package/dist/components/ds-panel-tool-search.js.map +1 -0
  130. package/dist/components/ds-panel-tools.js +1 -1
  131. package/dist/components/ds-panel-tools.js.map +1 -1
  132. package/dist/components/ds-radio.js +1 -1
  133. package/dist/components/ds-select-multi.js +1 -1
  134. package/dist/components/ds-select-multi.js.map +1 -1
  135. package/dist/components/ds-select.js +1 -1
  136. package/dist/components/ds-select.js.map +1 -1
  137. package/dist/components/ds-shell-gradient-picker.js +1 -1
  138. package/dist/components/ds-shell-gradient-picker.js.map +1 -1
  139. package/dist/components/ds-shell-gradient-swatch.js +1 -1
  140. package/dist/components/ds-shell-gradient-swatch.js.map +1 -1
  141. package/dist/components/ds-skeleton.js +1 -1
  142. package/dist/components/ds-slider.js +1 -1
  143. package/dist/components/ds-slider.js.map +1 -1
  144. package/dist/components/ds-swatch-picker.d.ts +11 -0
  145. package/dist/components/ds-swatch-picker.js +2 -0
  146. package/dist/components/ds-swatch-picker.js.map +1 -0
  147. package/dist/components/ds-switch.js +1 -1
  148. package/dist/components/ds-tab-group.js +1 -1
  149. package/dist/components/ds-tab-group.js.map +1 -1
  150. package/dist/components/ds-tag.js +1 -1
  151. package/dist/components/ds-text.js +1 -1
  152. package/dist/components/ds-tooltip-data-viz.js +1 -1
  153. package/dist/components/ds-tooltip.js +1 -1
  154. package/dist/components/index.d.ts +14 -0
  155. package/dist/components/p--KbMQblZ.js +2 -0
  156. package/dist/components/p--KbMQblZ.js.map +1 -0
  157. package/dist/components/p-2br9YDbG.js +2 -0
  158. package/dist/components/p-2br9YDbG.js.map +1 -0
  159. package/dist/components/p-41UAx2eq.js +2 -0
  160. package/dist/components/p-41UAx2eq.js.map +1 -0
  161. package/dist/components/p-B1pWGQn1.js +2 -0
  162. package/dist/components/p-B1pWGQn1.js.map +1 -0
  163. package/dist/components/p-B7NbIYjS.js +2 -0
  164. package/dist/components/p-B7NbIYjS.js.map +1 -0
  165. package/dist/components/p-BBu_Svz7.js +2 -0
  166. package/dist/components/p-BBu_Svz7.js.map +1 -0
  167. package/dist/components/p-BEQB8EnB.js +2 -0
  168. package/dist/components/p-BEQB8EnB.js.map +1 -0
  169. package/dist/components/{p-CZ9wemOA.js → p-BFWC17em.js} +2 -2
  170. package/dist/components/{p-KRGBGTu5.js → p-BO6C8abO.js} +2 -2
  171. package/dist/components/{p-CbS_WWs2.js → p-BSOZXagj.js} +2 -2
  172. package/dist/components/p-BSOZXagj.js.map +1 -0
  173. package/dist/components/{p-DT2MK8Kt.js → p-BZAEZENv.js} +2 -2
  174. package/dist/components/p-BhC1YyId.js +2 -0
  175. package/dist/components/p-BhC1YyId.js.map +1 -0
  176. package/dist/components/p-BjtXYFhw.js +2 -0
  177. package/dist/components/p-BjtXYFhw.js.map +1 -0
  178. package/dist/components/{p-B-zhgAvL.js → p-Bo5wikia.js} +2 -2
  179. package/dist/components/p-Bx1G7P6W.js +2 -0
  180. package/dist/components/p-Bx1G7P6W.js.map +1 -0
  181. package/dist/components/p-C0sq948W.js +2 -0
  182. package/dist/components/p-C0sq948W.js.map +1 -0
  183. package/dist/components/p-CC1C8s6m.js +2 -0
  184. package/dist/components/p-CC1C8s6m.js.map +1 -0
  185. package/dist/components/p-CKaJx0IX.js +2 -0
  186. package/dist/components/p-CKaJx0IX.js.map +1 -0
  187. package/dist/components/{p-DyZj3k9S.js → p-CZMEhdlA.js} +2 -2
  188. package/dist/components/{p-BbV68F23.js → p-CiwdnKKp.js} +2 -2
  189. package/dist/components/{p-BLzivrE3.js → p-CnM9SW_8.js} +2 -2
  190. package/dist/components/{p-C7UFYvsO.js → p-CuKn9I5f.js} +2 -2
  191. package/dist/components/p-D1HFMTdC.js +2 -0
  192. package/dist/components/p-D1HFMTdC.js.map +1 -0
  193. package/dist/components/p-DFMM60My.js +2 -0
  194. package/dist/components/p-DFMM60My.js.map +1 -0
  195. package/dist/components/p-DIsDiGcp.js +2 -0
  196. package/dist/components/p-DIsDiGcp.js.map +1 -0
  197. package/dist/components/p-DVsje4AY.js +2 -0
  198. package/dist/components/p-DVsje4AY.js.map +1 -0
  199. package/dist/components/p-Di-ThR90.js +2 -0
  200. package/dist/components/p-Di-ThR90.js.map +1 -0
  201. package/dist/components/{p-C7RObioO.js → p-Di4HBckb.js} +2 -2
  202. package/dist/components/p-a9nGf1s6.js +2 -0
  203. package/dist/components/p-a9nGf1s6.js.map +1 -0
  204. package/dist/components/p-gidVv1FX.js +2 -0
  205. package/dist/components/p-gidVv1FX.js.map +1 -0
  206. package/dist/components/p-l6PmnW_P.js +2 -0
  207. package/dist/components/p-l6PmnW_P.js.map +1 -0
  208. package/dist/components/p-rEe-3KR_.js +2 -0
  209. package/dist/components/p-rEe-3KR_.js.map +1 -0
  210. package/dist/components/p-t9Ei1kHP.js +2 -0
  211. package/dist/components/p-t9Ei1kHP.js.map +1 -0
  212. package/dist/docs/components.json +8097 -3924
  213. package/dist/lib/components/Menu/menu-placement.d.ts +19 -3
  214. package/dist/lib/shell/index.d.ts +3 -3
  215. package/dist/lib/shell/index.js +48 -39
  216. package/dist/lib/shell/index.js.map +3 -3
  217. package/dist/lib/shell/shell-gradient-presets.d.ts +15 -0
  218. package/dist/lib/utils/choice-popup-alignment.d.ts +20 -0
  219. package/dist/lib/utils/index.d.ts +2 -0
  220. package/dist/lib/utils/index.js +16 -0
  221. package/dist/lib/utils/index.js.map +3 -3
  222. package/dist/mcp/cli.js +31409 -0
  223. package/dist/mcp-data/registry/agent-activity.json +158 -0
  224. package/dist/mcp-data/registry/agent-response.json +211 -0
  225. package/dist/mcp-data/registry/agent-source-list.json +153 -0
  226. package/dist/mcp-data/registry/agent-tool-call.json +213 -0
  227. package/dist/mcp-data/registry/app-shell.json +210 -0
  228. package/dist/mcp-data/registry/attachment-list.json +137 -0
  229. package/dist/mcp-data/registry/avatar.json +136 -0
  230. package/dist/mcp-data/registry/badge.json +289 -0
  231. package/dist/mcp-data/registry/banner.json +206 -0
  232. package/dist/mcp-data/registry/bar-nav.json +341 -0
  233. package/dist/mcp-data/registry/button-filled.json +386 -0
  234. package/dist/mcp-data/registry/button-unfilled.json +537 -0
  235. package/dist/mcp-data/registry/card-data-viz-donut.json +143 -0
  236. package/dist/mcp-data/registry/card-setting.json +194 -0
  237. package/dist/mcp-data/registry/card-shell-data-viz.json +173 -0
  238. package/dist/mcp-data/registry/card.json +126 -0
  239. package/dist/mcp-data/registry/chart-bar.json +121 -0
  240. package/dist/mcp-data/registry/chart-donut.json +257 -0
  241. package/dist/mcp-data/registry/chart-legend.json +209 -0
  242. package/dist/mcp-data/registry/chart-line.json +153 -0
  243. package/dist/mcp-data/registry/checkbox.json +361 -0
  244. package/dist/mcp-data/registry/chip.json +276 -0
  245. package/dist/mcp-data/registry/code-block.json +150 -0
  246. package/dist/mcp-data/registry/conversation-list-item.json +265 -0
  247. package/dist/mcp-data/registry/conversation-list-section.json +139 -0
  248. package/dist/mcp-data/registry/conversation-list.json +101 -0
  249. package/dist/mcp-data/registry/divider.json +225 -0
  250. package/dist/mcp-data/registry/empty-state.json +197 -0
  251. package/dist/mcp-data/registry/field.json +222 -0
  252. package/dist/mcp-data/registry/icon.json +242 -0
  253. package/dist/mcp-data/registry/input.json +597 -0
  254. package/dist/mcp-data/registry/loader.json +192 -0
  255. package/dist/mcp-data/registry/markdown.json +141 -0
  256. package/dist/mcp-data/registry/menu.json +479 -0
  257. package/dist/mcp-data/registry/message-bubble.json +119 -0
  258. package/dist/mcp-data/registry/message-composer.json +265 -0
  259. package/dist/mcp-data/registry/message-scroller.json +217 -0
  260. package/dist/mcp-data/registry/message.json +255 -0
  261. package/dist/mcp-data/registry/modal.json +150 -0
  262. package/dist/mcp-data/registry/panel-nav.json +622 -0
  263. package/dist/mcp-data/registry/panel-sub-nav.json +249 -0
  264. package/dist/mcp-data/registry/panel-tool-header.json +342 -0
  265. package/dist/mcp-data/registry/panel-tool-search.json +387 -0
  266. package/dist/mcp-data/registry/panel-tools.json +514 -0
  267. package/dist/mcp-data/registry/radio.json +374 -0
  268. package/dist/mcp-data/registry/registry.json +6916 -0
  269. package/dist/mcp-data/registry/select-multi.json +755 -0
  270. package/dist/mcp-data/registry/select.json +740 -0
  271. package/dist/mcp-data/registry/shell-gradient-picker.json +195 -0
  272. package/dist/mcp-data/registry/shell-gradient-swatch.json +215 -0
  273. package/dist/mcp-data/registry/skeleton.json +282 -0
  274. package/dist/mcp-data/registry/slider.json +657 -0
  275. package/dist/mcp-data/registry/swatch-picker.json +231 -0
  276. package/dist/mcp-data/registry/switch.json +361 -0
  277. package/dist/mcp-data/registry/tab-group.json +255 -0
  278. package/dist/mcp-data/registry/tag.json +352 -0
  279. package/dist/mcp-data/registry/text.json +371 -0
  280. package/dist/mcp-data/registry/tooltip-data-viz.json +158 -0
  281. package/dist/mcp-data/registry/tooltip.json +311 -0
  282. package/dist/react/components.d.ts +18 -0
  283. package/dist/react/components.js +18 -0
  284. package/dist/react/ds-agent-activity.d.ts +9 -0
  285. package/dist/react/ds-agent-activity.js +12 -0
  286. package/dist/react/ds-agent-response.d.ts +9 -0
  287. package/dist/react/ds-agent-response.js +12 -0
  288. package/dist/react/ds-agent-source-list.d.ts +9 -0
  289. package/dist/react/ds-agent-source-list.js +12 -0
  290. package/dist/react/ds-agent-tool-call.d.ts +9 -0
  291. package/dist/react/ds-agent-tool-call.js +12 -0
  292. package/dist/react/ds-attachment-list.d.ts +9 -0
  293. package/dist/react/ds-attachment-list.js +12 -0
  294. package/dist/react/ds-avatar.d.ts +9 -0
  295. package/dist/react/ds-avatar.js +12 -0
  296. package/dist/react/ds-code-block.d.ts +9 -0
  297. package/dist/react/ds-code-block.js +12 -0
  298. package/dist/react/ds-conversation-list-item.d.ts +14 -0
  299. package/dist/react/ds-conversation-list-item.js +12 -0
  300. package/dist/react/ds-conversation-list-section.d.ts +9 -0
  301. package/dist/react/ds-conversation-list-section.js +12 -0
  302. package/dist/react/ds-conversation-list.d.ts +9 -0
  303. package/dist/react/ds-conversation-list.js +12 -0
  304. package/dist/react/ds-markdown.d.ts +9 -0
  305. package/dist/react/ds-markdown.js +12 -0
  306. package/dist/react/ds-menu.d.ts +1 -0
  307. package/dist/react/ds-menu.js +2 -1
  308. package/dist/react/ds-message-bubble.d.ts +9 -0
  309. package/dist/react/ds-message-bubble.js +12 -0
  310. package/dist/react/ds-message-composer.d.ts +16 -0
  311. package/dist/react/ds-message-composer.js +16 -0
  312. package/dist/react/ds-message-scroller.d.ts +12 -0
  313. package/dist/react/ds-message-scroller.js +12 -0
  314. package/dist/react/ds-message.d.ts +9 -0
  315. package/dist/react/ds-message.js +12 -0
  316. package/dist/react/ds-panel-tool-header.d.ts +17 -0
  317. package/dist/react/ds-panel-tool-header.js +16 -0
  318. package/dist/react/ds-panel-tool-search.d.ts +14 -0
  319. package/dist/react/ds-panel-tool-search.js +16 -0
  320. package/dist/react/ds-panel-tools.d.ts +10 -0
  321. package/dist/react/ds-panel-tools.js +3 -0
  322. package/dist/react/ds-swatch-picker.d.ts +12 -0
  323. package/dist/react/ds-swatch-picker.js +12 -0
  324. package/dist/types/components/AgentActivity/AgentActivity.d.ts +14 -0
  325. package/dist/types/components/AgentResponse/AgentResponse.d.ts +12 -0
  326. package/dist/types/components/AgentSourceList/AgentSourceList.d.ts +9 -0
  327. package/dist/types/components/AgentToolCall/AgentToolCall.d.ts +13 -0
  328. package/dist/types/components/AppShell/AppShell.d.ts +4 -0
  329. package/dist/types/components/AttachmentList/AttachmentList.d.ts +8 -0
  330. package/dist/types/components/Avatar/Avatar.d.ts +8 -0
  331. package/dist/types/components/CodeBlock/CodeBlock.d.ts +11 -0
  332. package/dist/types/components/ConversationList/ConversationList.d.ts +4 -0
  333. package/dist/types/components/ConversationListItem/ConversationListItem.d.ts +22 -0
  334. package/dist/types/components/ConversationListSection/ConversationListSection.d.ts +9 -0
  335. package/dist/types/components/Markdown/Markdown.d.ts +15 -0
  336. package/dist/types/components/Menu/Menu.d.ts +10 -1
  337. package/dist/types/components/Menu/menu-placement.d.ts +19 -3
  338. package/dist/types/components/Menu/menu-types.d.ts +15 -2
  339. package/dist/types/components/Message/Message.d.ts +17 -0
  340. package/dist/types/components/MessageBubble/MessageBubble.d.ts +6 -0
  341. package/dist/types/components/MessageComposer/MessageComposer.d.ts +29 -0
  342. package/dist/types/components/MessageScroller/MessageScroller.d.ts +37 -0
  343. package/dist/types/components/PanelNav/PanelNav.d.ts +3 -0
  344. package/dist/types/components/PanelToolHeader/PanelToolHeader.d.ts +34 -0
  345. package/dist/types/components/PanelToolSearch/PanelToolSearch.d.ts +35 -0
  346. package/dist/types/components/PanelTools/PanelTools.d.ts +40 -1
  347. package/dist/types/components/PanelTools/panel-tools-types.d.ts +20 -0
  348. package/dist/types/components/PanelTools/panel-tools-utils.d.ts +2 -0
  349. package/dist/types/components/ShellGradientPicker/ShellGradientPicker.d.ts +2 -5
  350. package/dist/types/components/ShellGradientSwatch/ShellGradientSwatch.d.ts +1 -0
  351. package/dist/types/components/Slider/Slider.d.ts +1 -1
  352. package/dist/types/components/SwatchPicker/SwatchPicker.d.ts +21 -0
  353. package/dist/types/components/SwatchPicker/swatch-picker-types.d.ts +26 -0
  354. package/dist/types/components/conversation-types.d.ts +55 -0
  355. package/dist/types/components.d.ts +1298 -4
  356. package/dist/types/shell/index.d.ts +3 -3
  357. package/dist/types/shell/shell-gradient-presets.d.ts +15 -0
  358. package/dist/types/utils/choice-list-parts.d.ts +4 -1
  359. package/dist/types/utils/choice-popup-alignment.d.ts +21 -0
  360. package/dist/types/utils/index.d.ts +2 -0
  361. package/package.json +9 -2
  362. package/dist/components/p-Bafp65bw.js +0 -2
  363. package/dist/components/p-Bafp65bw.js.map +0 -1
  364. package/dist/components/p-BdnR3jxi.js +0 -2
  365. package/dist/components/p-BdnR3jxi.js.map +0 -1
  366. package/dist/components/p-CXF8yd-g.js +0 -2
  367. package/dist/components/p-CXF8yd-g.js.map +0 -1
  368. package/dist/components/p-C_cu-HIT.js +0 -2
  369. package/dist/components/p-C_cu-HIT.js.map +0 -1
  370. package/dist/components/p-CbS_WWs2.js.map +0 -1
  371. package/dist/components/p-D0B9uDTP.js +0 -2
  372. package/dist/components/p-D0B9uDTP.js.map +0 -1
  373. package/dist/components/p-DF0yLZG_.js +0 -2
  374. package/dist/components/p-DF0yLZG_.js.map +0 -1
  375. package/dist/components/p-VKIsOVza.js +0 -2
  376. package/dist/components/p-VKIsOVza.js.map +0 -1
  377. /package/dist/components/{p-CZ9wemOA.js.map → p-BFWC17em.js.map} +0 -0
  378. /package/dist/components/{p-KRGBGTu5.js.map → p-BO6C8abO.js.map} +0 -0
  379. /package/dist/components/{p-DT2MK8Kt.js.map → p-BZAEZENv.js.map} +0 -0
  380. /package/dist/components/{p-B-zhgAvL.js.map → p-Bo5wikia.js.map} +0 -0
  381. /package/dist/components/{p-DyZj3k9S.js.map → p-CZMEhdlA.js.map} +0 -0
  382. /package/dist/components/{p-BbV68F23.js.map → p-CiwdnKKp.js.map} +0 -0
  383. /package/dist/components/{p-BLzivrE3.js.map → p-CnM9SW_8.js.map} +0 -0
  384. /package/dist/components/{p-C7UFYvsO.js.map → p-CuKn9I5f.js.map} +0 -0
  385. /package/dist/components/{p-C7RObioO.js.map → p-Di4HBckb.js.map} +0 -0
@@ -0,0 +1,597 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "input",
4
+ "title": "Input",
5
+ "description": "Form-associated single-line text field for primary and secondary application backgrounds, with native text input behavior, three control densities, optional leading and trailing content, search clearing, and validation.",
6
+ "type": "registry:ui",
7
+ "meta": {
8
+ "library": "@ds-mo/ui",
9
+ "distribution": "npm",
10
+ "storybook": "https://zainadeel.github.io/compomo/?path=/story/input",
11
+ "source": "src/wc/components/Input/Input.tsx",
12
+ "intentStatus": "complete",
13
+ "intent": {
14
+ "audience": "general",
15
+ "status": "stable",
16
+ "summary": "Form-associated single-line text field for primary and secondary application backgrounds, with native text input behavior, three control densities, optional leading and trailing content, search clearing, and validation.",
17
+ "useWhen": [
18
+ "A user must enter or edit one line of text, an email address, telephone number, URL, search query, or password.",
19
+ "The value must participate in native, Angular, or React form state.",
20
+ "A compact filter or toolbar needs a single-line search field that follows the shared control-density recipe."
21
+ ],
22
+ "avoidWhen": [
23
+ "The user chooses from a finite set of known values.",
24
+ "The user must enter multiple paragraphs or formatted content.",
25
+ "The value is adjusted primarily by dragging within a numeric range."
26
+ ],
27
+ "alternatives": [
28
+ {
29
+ "when": "The value comes from a finite set of known choices.",
30
+ "component": "component:ds-select",
31
+ "reason": "Select exposes the available values and owns listbox selection behavior."
32
+ },
33
+ {
34
+ "when": "The value is an immediate on/off setting.",
35
+ "component": "component:ds-switch",
36
+ "reason": "Switch communicates a binary setting instead of free text entry."
37
+ },
38
+ {
39
+ "when": "The value is chosen from a bounded numeric range.",
40
+ "component": "component:ds-slider",
41
+ "reason": "Slider supports direct range adjustment and communicates the current position."
42
+ }
43
+ ],
44
+ "commonlyComposedWith": [
45
+ "component:ds-field",
46
+ "component:ds-icon",
47
+ "component:ds-text"
48
+ ],
49
+ "accessibility": [
50
+ "Provide a persistent visible label through the owning field or an external native label; placeholder text is guidance and must not be the field's only label.",
51
+ "Choose the native input type that matches the value so browsers and assistive technology can provide appropriate semantics and keyboards.",
52
+ "Error text is associated with the native input and announced as an alert when the invalid state is rendered.",
53
+ "Read-only fields remain focusable and submittable while preventing edits; inactive or disabled fields leave the tab order and are omitted from form submission.",
54
+ "Suffix content must not carry information that is otherwise absent from the field's visible label, value, or description."
55
+ ],
56
+ "states": [
57
+ "The normal field boundary uses the shared secondary inset border. Focus promotes it to the thicker bold-brand inset stroke, while error uses the thicker bold-negative inset stroke without changing geometry.",
58
+ "Placeholder text is secondary at rest and quaternary while the editable field is focused because it becomes decorative once typing begins.",
59
+ "Entered values use the parent surface's primary foreground; prefix icons, suffix content, and resting placeholder text use its secondary foreground.",
60
+ "Search fields show a standard borderless CrossCircle icon action only while they contain a value. Clearing emits the empty value and restores focus to the native field.",
61
+ "The suffix slot is for compact units or decorations. The optional leading icon is decorative and does not replace the field label.",
62
+ "Use autoComplete, inputMode, and enterKeyHint to provide browser and virtual-keyboard hints without changing the value's semantic type.",
63
+ "The host exposes focused, filled, dirty, touched, invalid, disabled, read-only, and required data attributes for Field integration and diagnostics.",
64
+ "Use Input only on primary or secondary application backgrounds. It intentionally does not expose alternate surface contexts."
65
+ ],
66
+ "responsiveBehavior": [
67
+ "Form fields normally fill their parent; use hug width only in a compact toolbar or filter layout with an explicit width constraint.",
68
+ "Choose density from the containing layout: md for ordinary forms, sm or xs only where the surrounding controls use the same compact recipe.",
69
+ "The owner supplies layout constraints and decides when a compact field moves to its own row."
70
+ ],
71
+ "frameworkCaveats": {
72
+ "customElements": [
73
+ "Listen for dsChange for user edits and dsClear for the search clear action.",
74
+ "Use the form attribute on the host when associating an input rendered outside its owning form."
75
+ ],
76
+ "react": [
77
+ "Use DsInput, bind value for controlled application state, and handle onDsChange and onDsClear."
78
+ ],
79
+ "angular": [
80
+ "Import DsInput with TextValueAccessor when integrating with Angular Forms."
81
+ ]
82
+ },
83
+ "references": [
84
+ {
85
+ "label": "Storybook examples",
86
+ "path": "src/wc/components/Input/Input.stories.ts"
87
+ },
88
+ {
89
+ "label": "Cross-browser form and accessibility coverage",
90
+ "path": "tests/e2e/forms.spec.ts"
91
+ }
92
+ ]
93
+ },
94
+ "api": {
95
+ "props": {
96
+ "ariaDescribedby": {
97
+ "type": "string | undefined",
98
+ "resolvedType": "string | undefined",
99
+ "attribute": "aria-describedby",
100
+ "required": false,
101
+ "mutable": false
102
+ },
103
+ "ariaLabel": {
104
+ "type": "string | null",
105
+ "resolvedType": "null | string",
106
+ "attribute": "aria-label",
107
+ "default": "null",
108
+ "required": false,
109
+ "mutable": false
110
+ },
111
+ "ariaLabelledby": {
112
+ "type": "string | undefined",
113
+ "resolvedType": "string | undefined",
114
+ "attribute": "aria-labelledby",
115
+ "required": false,
116
+ "mutable": false
117
+ },
118
+ "autoComplete": {
119
+ "type": "string | undefined",
120
+ "resolvedType": "string | undefined",
121
+ "attribute": "autocomplete",
122
+ "required": false,
123
+ "mutable": false,
124
+ "description": "Native browser autofill hint."
125
+ },
126
+ "autoFocus": {
127
+ "type": "boolean",
128
+ "resolvedType": "boolean",
129
+ "attribute": "auto-focus",
130
+ "default": "false",
131
+ "required": false,
132
+ "mutable": false
133
+ },
134
+ "clearLabel": {
135
+ "type": "string",
136
+ "resolvedType": "string",
137
+ "attribute": "clear-label",
138
+ "default": "'Clear'",
139
+ "required": false,
140
+ "mutable": false
141
+ },
142
+ "disabled": {
143
+ "type": "boolean",
144
+ "resolvedType": "boolean",
145
+ "attribute": "disabled",
146
+ "default": "false",
147
+ "required": false,
148
+ "mutable": false
149
+ },
150
+ "enterKeyHint": {
151
+ "type": "string",
152
+ "resolvedType": "string",
153
+ "attribute": "enterkeyhint",
154
+ "default": "''",
155
+ "required": false,
156
+ "mutable": false,
157
+ "description": "Preferred virtual-keyboard action label."
158
+ },
159
+ "error": {
160
+ "type": "boolean",
161
+ "resolvedType": "boolean",
162
+ "attribute": "error",
163
+ "default": "false",
164
+ "required": false,
165
+ "mutable": false
166
+ },
167
+ "errorMessage": {
168
+ "type": "string | undefined",
169
+ "resolvedType": "string | undefined",
170
+ "attribute": "error-message",
171
+ "required": false,
172
+ "mutable": false
173
+ },
174
+ "form": {
175
+ "type": "string | undefined",
176
+ "resolvedType": "string | undefined",
177
+ "attribute": "form",
178
+ "required": false,
179
+ "mutable": false
180
+ },
181
+ "hasBorder": {
182
+ "type": "boolean",
183
+ "resolvedType": "boolean",
184
+ "attribute": "has-border",
185
+ "default": "true",
186
+ "required": false,
187
+ "mutable": false,
188
+ "description": "Show the standard inset border."
189
+ },
190
+ "icon": {
191
+ "type": "string | undefined",
192
+ "resolvedType": "string | undefined",
193
+ "attribute": "icon",
194
+ "required": false,
195
+ "mutable": false,
196
+ "description": "Optional leading icon name."
197
+ },
198
+ "inputId": {
199
+ "type": "string | undefined",
200
+ "resolvedType": "string | undefined",
201
+ "attribute": "input-id",
202
+ "required": false,
203
+ "mutable": false,
204
+ "description": "Associates the internal input with an external <label>."
205
+ },
206
+ "inputMode": {
207
+ "type": "string",
208
+ "resolvedType": "string",
209
+ "attribute": "inputmode",
210
+ "default": "''",
211
+ "required": false,
212
+ "mutable": false,
213
+ "description": "Preferred virtual keyboard without changing the value semantics."
214
+ },
215
+ "isInactive": {
216
+ "type": "boolean",
217
+ "resolvedType": "boolean",
218
+ "attribute": "is-inactive",
219
+ "default": "false",
220
+ "required": false,
221
+ "mutable": false
222
+ },
223
+ "name": {
224
+ "type": "string | undefined",
225
+ "resolvedType": "string | undefined",
226
+ "attribute": "name",
227
+ "required": false,
228
+ "mutable": false
229
+ },
230
+ "placeholder": {
231
+ "type": "string | undefined",
232
+ "resolvedType": "string | undefined",
233
+ "attribute": "placeholder",
234
+ "required": false,
235
+ "mutable": false
236
+ },
237
+ "readOnly": {
238
+ "type": "boolean",
239
+ "resolvedType": "boolean",
240
+ "attribute": "read-only",
241
+ "default": "false",
242
+ "required": false,
243
+ "mutable": false,
244
+ "description": "Keeps the value focusable and submittable while preventing edits."
245
+ },
246
+ "required": {
247
+ "type": "boolean",
248
+ "resolvedType": "boolean",
249
+ "attribute": "required",
250
+ "default": "false",
251
+ "required": false,
252
+ "mutable": false
253
+ },
254
+ "requiredMessage": {
255
+ "type": "string",
256
+ "resolvedType": "string",
257
+ "attribute": "required-message",
258
+ "default": "'This field is required.'",
259
+ "required": false,
260
+ "mutable": false
261
+ },
262
+ "size": {
263
+ "type": "InputSize",
264
+ "resolvedType": "\"md\" | \"sm\" | \"xs\"",
265
+ "attribute": "size",
266
+ "default": "'md'",
267
+ "required": false,
268
+ "mutable": false,
269
+ "description": "Control density."
270
+ },
271
+ "type": {
272
+ "type": "InputType",
273
+ "resolvedType": "\"email\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"url\"",
274
+ "attribute": "type",
275
+ "default": "'text'",
276
+ "required": false,
277
+ "mutable": false
278
+ },
279
+ "value": {
280
+ "type": "string",
281
+ "resolvedType": "string",
282
+ "attribute": "value",
283
+ "default": "''",
284
+ "required": false,
285
+ "mutable": true
286
+ },
287
+ "width": {
288
+ "type": "InputWidth",
289
+ "resolvedType": "\"fill\" | \"hug\"",
290
+ "attribute": "width",
291
+ "default": "'fill'",
292
+ "required": false,
293
+ "mutable": false,
294
+ "description": "Width fit — fill the parent (default) or hug the available content."
295
+ }
296
+ },
297
+ "events": [
298
+ {
299
+ "name": "dsChange",
300
+ "detail": "string",
301
+ "bubbles": true,
302
+ "cancelable": true,
303
+ "composed": true
304
+ },
305
+ {
306
+ "name": "dsClear",
307
+ "detail": "void",
308
+ "bubbles": true,
309
+ "cancelable": true,
310
+ "composed": true
311
+ }
312
+ ],
313
+ "methods": [
314
+ {
315
+ "name": "setFocus",
316
+ "signature": "setFocus() => Promise<void>"
317
+ }
318
+ ],
319
+ "slots": []
320
+ },
321
+ "props": {
322
+ "ariaDescribedby": {
323
+ "type": "string | undefined",
324
+ "resolvedType": "string | undefined",
325
+ "attribute": "aria-describedby",
326
+ "required": false,
327
+ "mutable": false
328
+ },
329
+ "ariaLabel": {
330
+ "type": "string | null",
331
+ "resolvedType": "null | string",
332
+ "attribute": "aria-label",
333
+ "default": "null",
334
+ "required": false,
335
+ "mutable": false
336
+ },
337
+ "ariaLabelledby": {
338
+ "type": "string | undefined",
339
+ "resolvedType": "string | undefined",
340
+ "attribute": "aria-labelledby",
341
+ "required": false,
342
+ "mutable": false
343
+ },
344
+ "autoComplete": {
345
+ "type": "string | undefined",
346
+ "resolvedType": "string | undefined",
347
+ "attribute": "autocomplete",
348
+ "required": false,
349
+ "mutable": false,
350
+ "description": "Native browser autofill hint."
351
+ },
352
+ "autoFocus": {
353
+ "type": "boolean",
354
+ "resolvedType": "boolean",
355
+ "attribute": "auto-focus",
356
+ "default": "false",
357
+ "required": false,
358
+ "mutable": false
359
+ },
360
+ "clearLabel": {
361
+ "type": "string",
362
+ "resolvedType": "string",
363
+ "attribute": "clear-label",
364
+ "default": "'Clear'",
365
+ "required": false,
366
+ "mutable": false
367
+ },
368
+ "disabled": {
369
+ "type": "boolean",
370
+ "resolvedType": "boolean",
371
+ "attribute": "disabled",
372
+ "default": "false",
373
+ "required": false,
374
+ "mutable": false
375
+ },
376
+ "enterKeyHint": {
377
+ "type": "string",
378
+ "resolvedType": "string",
379
+ "attribute": "enterkeyhint",
380
+ "default": "''",
381
+ "required": false,
382
+ "mutable": false,
383
+ "description": "Preferred virtual-keyboard action label."
384
+ },
385
+ "error": {
386
+ "type": "boolean",
387
+ "resolvedType": "boolean",
388
+ "attribute": "error",
389
+ "default": "false",
390
+ "required": false,
391
+ "mutable": false
392
+ },
393
+ "errorMessage": {
394
+ "type": "string | undefined",
395
+ "resolvedType": "string | undefined",
396
+ "attribute": "error-message",
397
+ "required": false,
398
+ "mutable": false
399
+ },
400
+ "form": {
401
+ "type": "string | undefined",
402
+ "resolvedType": "string | undefined",
403
+ "attribute": "form",
404
+ "required": false,
405
+ "mutable": false
406
+ },
407
+ "hasBorder": {
408
+ "type": "boolean",
409
+ "resolvedType": "boolean",
410
+ "attribute": "has-border",
411
+ "default": "true",
412
+ "required": false,
413
+ "mutable": false,
414
+ "description": "Show the standard inset border."
415
+ },
416
+ "icon": {
417
+ "type": "string | undefined",
418
+ "resolvedType": "string | undefined",
419
+ "attribute": "icon",
420
+ "required": false,
421
+ "mutable": false,
422
+ "description": "Optional leading icon name."
423
+ },
424
+ "inputId": {
425
+ "type": "string | undefined",
426
+ "resolvedType": "string | undefined",
427
+ "attribute": "input-id",
428
+ "required": false,
429
+ "mutable": false,
430
+ "description": "Associates the internal input with an external <label>."
431
+ },
432
+ "inputMode": {
433
+ "type": "string",
434
+ "resolvedType": "string",
435
+ "attribute": "inputmode",
436
+ "default": "''",
437
+ "required": false,
438
+ "mutable": false,
439
+ "description": "Preferred virtual keyboard without changing the value semantics."
440
+ },
441
+ "isInactive": {
442
+ "type": "boolean",
443
+ "resolvedType": "boolean",
444
+ "attribute": "is-inactive",
445
+ "default": "false",
446
+ "required": false,
447
+ "mutable": false
448
+ },
449
+ "name": {
450
+ "type": "string | undefined",
451
+ "resolvedType": "string | undefined",
452
+ "attribute": "name",
453
+ "required": false,
454
+ "mutable": false
455
+ },
456
+ "placeholder": {
457
+ "type": "string | undefined",
458
+ "resolvedType": "string | undefined",
459
+ "attribute": "placeholder",
460
+ "required": false,
461
+ "mutable": false
462
+ },
463
+ "readOnly": {
464
+ "type": "boolean",
465
+ "resolvedType": "boolean",
466
+ "attribute": "read-only",
467
+ "default": "false",
468
+ "required": false,
469
+ "mutable": false,
470
+ "description": "Keeps the value focusable and submittable while preventing edits."
471
+ },
472
+ "required": {
473
+ "type": "boolean",
474
+ "resolvedType": "boolean",
475
+ "attribute": "required",
476
+ "default": "false",
477
+ "required": false,
478
+ "mutable": false
479
+ },
480
+ "requiredMessage": {
481
+ "type": "string",
482
+ "resolvedType": "string",
483
+ "attribute": "required-message",
484
+ "default": "'This field is required.'",
485
+ "required": false,
486
+ "mutable": false
487
+ },
488
+ "size": {
489
+ "type": "InputSize",
490
+ "resolvedType": "\"md\" | \"sm\" | \"xs\"",
491
+ "attribute": "size",
492
+ "default": "'md'",
493
+ "required": false,
494
+ "mutable": false,
495
+ "description": "Control density."
496
+ },
497
+ "type": {
498
+ "type": "InputType",
499
+ "resolvedType": "\"email\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"url\"",
500
+ "attribute": "type",
501
+ "default": "'text'",
502
+ "required": false,
503
+ "mutable": false
504
+ },
505
+ "value": {
506
+ "type": "string",
507
+ "resolvedType": "string",
508
+ "attribute": "value",
509
+ "default": "''",
510
+ "required": false,
511
+ "mutable": true
512
+ },
513
+ "width": {
514
+ "type": "InputWidth",
515
+ "resolvedType": "\"fill\" | \"hug\"",
516
+ "attribute": "width",
517
+ "default": "'fill'",
518
+ "required": false,
519
+ "mutable": false,
520
+ "description": "Width fit — fill the parent (default) or hug the available content."
521
+ }
522
+ },
523
+ "events": [
524
+ {
525
+ "name": "dsChange",
526
+ "detail": "string",
527
+ "bubbles": true,
528
+ "cancelable": true,
529
+ "composed": true
530
+ },
531
+ {
532
+ "name": "dsClear",
533
+ "detail": "void",
534
+ "bubbles": true,
535
+ "cancelable": true,
536
+ "composed": true
537
+ }
538
+ ],
539
+ "methods": [
540
+ {
541
+ "name": "setFocus",
542
+ "signature": "setFocus() => Promise<void>"
543
+ }
544
+ ],
545
+ "slots": [],
546
+ "exports": {
547
+ "customElement": "ds-input",
548
+ "react": "DsInput",
549
+ "angular": "DsInput"
550
+ },
551
+ "consumption": {
552
+ "install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
553
+ "cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
554
+ "customElements": {
555
+ "import": "import '@ds-mo/ui/dist/components/ds-input.js';",
556
+ "example": "<ds-input></ds-input>"
557
+ },
558
+ "react": {
559
+ "import": "import { DsInput } from '@ds-mo/ui/react';",
560
+ "example": "<DsInput />"
561
+ },
562
+ "angular": {
563
+ "import": "import { DsInput } from '@ds-mo/ui/angular/ds-input';",
564
+ "example": "<ds-input></ds-input>"
565
+ },
566
+ "peerDependencies": {
567
+ "required": [
568
+ "@ds-mo/tokens ^3.1.1",
569
+ "@ds-mo/icons ^6.2.0"
570
+ ],
571
+ "frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
572
+ }
573
+ }
574
+ },
575
+ "dependencies": [
576
+ "@ds-mo/ui",
577
+ "@ds-mo/tokens",
578
+ "@ds-mo/icons"
579
+ ],
580
+ "registryDependencies": [
581
+ "button-unfilled",
582
+ "icon",
583
+ "text"
584
+ ],
585
+ "files": [
586
+ {
587
+ "path": "src/wc/components/Input/Input.css",
588
+ "content": "@import '../../utils/interaction-fill.css';\n@import '../../utils/control-inactive.css';\n@import '../../utils/control-density.css';\n@import '../../utils/control-width.css';\n@import '../../utils/typography.css';\n\n:host(.input-host) {\n display: inline-flex;\n flex-direction: column;\n gap: var(--dimension-space-050);\n --ds-input-fg: var(--color-foreground-primary);\n --ds-input-placeholder: var(--color-foreground-secondary);\n --ds-input-placeholder-active: var(--color-foreground-quaternary);\n --ds-input-adornment-fg: var(--color-foreground-secondary);\n --ds-input-border: var(--color-border-secondary);\n}\n\n:host(.ds-control-width--fill),\n:host(.ds-control-width--fill) .input-control {\n width: 100%;\n}\n\n.input-control {\n display: inline-flex;\n align-items: 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 overflow: hidden;\n background: transparent;\n border: none;\n border-radius: var(--ds-control-radius, var(--dimension-radius-025));\n color: var(--ds-input-fg);\n}\n\n.input-control--bordered {\n --ds-interaction-border-width: var(--dimension-stroke-width-012);\n --ds-interaction-border-color: var(--ds-input-border);\n}\n\n.input-control--error {\n --ds-interaction-border-width: var(--dimension-stroke-width-018);\n --ds-interaction-border-color: var(--color-border-bold-negative);\n}\n\n.input-control:focus-within:not(.input-control--error) {\n --ds-interaction-border-width: var(--dimension-stroke-width-018);\n --ds-interaction-border-color: var(--color-border-bold-brand);\n}\n\n:host(.ds-control-inactive) .input-control::after {\n background: transparent;\n}\n\n.native-input {\n position: relative;\n z-index: 2;\n flex: 1 1 auto;\n min-width: 0;\n height: 100%;\n padding: 0 var(--ds-control-label-inset, var(--dimension-space-025));\n background: transparent;\n border: none;\n border-radius: inherit;\n outline: none;\n color: var(--ds-input-fg);\n font-family: inherit;\n -webkit-appearance: none;\n appearance: none;\n}\n\n.native-input:disabled {\n cursor: not-allowed;\n}\n\n.native-input:read-only:not(:disabled) {\n cursor: default;\n}\n\n.native-input::placeholder {\n color: var(--ds-input-placeholder);\n}\n\n.native-input:focus::placeholder {\n color: var(--ds-input-placeholder-active);\n}\n\n.native-input[type='search']::-webkit-search-cancel-button,\n.native-input[type='search']::-webkit-search-decoration {\n display: none;\n}\n\n.input-control__prefix,\n.input-control__suffix {\n position: relative;\n z-index: 2;\n flex-shrink: 0;\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 color: var(--ds-input-adornment-fg);\n}\n\n.input-control__suffix--empty {\n display: none;\n}\n\n.input-control__clear {\n position: relative;\n z-index: 2;\n flex-shrink: 0;\n align-self: center;\n}\n\n.input-control.ds-control--md:has(.input-control__clear),\n.input-control.ds-control--sm:has(.input-control__clear) {\n padding-right: var(--dimension-space-050);\n}\n\n.input-control.ds-control--xs:has(.input-control__clear) {\n padding-right: 0;\n}\n\n.error-text {\n width: 100%;\n}\n",
589
+ "type": "registry:ui"
590
+ },
591
+ {
592
+ "path": "src/wc/components/Input/Input.tsx",
593
+ "content": "import { AttachInternals, Component, Prop, State, Event, EventEmitter, Element, Method, Watch, h, Host } from '@stencil/core';\nimport { controlWidthClass, CONTROL_TEXT_VARIANT, type ControlWidth } from '../../utils';\n\nexport type InputType = 'text' | 'email' | 'tel' | 'url' | 'search' | 'password';\nexport type InputSize = 'md' | 'sm' | 'xs';\nexport type InputWidth = ControlWidth;\n\nconst ICON_SIZE: Record<InputSize, 'md' | 'sm' | 'xs'> = {\n md: 'md',\n sm: 'sm',\n xs: 'xs',\n};\n\nconst CLEAR_BUTTON_SIZE: Record<InputSize, 'sm' | 'xs'> = {\n md: 'sm',\n sm: 'xs',\n xs: 'xs',\n};\n\nlet idCounter = 0;\n\n@Component({\n tag: 'ds-input',\n styleUrl: 'Input.css',\n scoped: true,\n formAssociated: true,\n})\nexport class Input {\n @Element() el!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n private generatedId = `ds-input-${++idCounter}`;\n private errorId = `${this.generatedId}-error`;\n\n @Prop({ mutable: true }) value: string = '';\n @Prop({ reflect: true }) name: string | undefined;\n @Prop({ reflect: true }) form: string | undefined;\n @Prop({ reflect: true }) disabled: boolean = false;\n /** Keeps the value focusable and submittable while preventing edits. */\n @Prop({ reflect: true }) readOnly: boolean = false;\n @Prop({ reflect: true }) required: boolean = false;\n @Prop() requiredMessage: string = 'This field is required.';\n @Prop() clearLabel: string = 'Clear';\n @Prop() placeholder: string | undefined;\n @Prop() type: InputType = 'text';\n /** Native browser autofill hint. */\n @Prop({ attribute: 'autocomplete' }) autoComplete: string | undefined;\n /** Preferred virtual keyboard without changing the value semantics. */\n @Prop({ attribute: 'inputmode' }) inputMode: string = '';\n /** Preferred virtual-keyboard action label. */\n @Prop({ attribute: 'enterkeyhint' }) enterKeyHint: string = '';\n /** Control density. */\n @Prop() size: InputSize = 'md';\n /** Width fit — fill the parent (default) or hug the available content. */\n @Prop() width: InputWidth = 'fill';\n /** Show the standard inset border. */\n @Prop() hasBorder: boolean = true;\n /** Optional leading icon name. */\n @Prop() icon: string | undefined;\n @Prop() isInactive: boolean = false;\n @Prop() autoFocus: boolean = false;\n @Prop() error: boolean = false;\n @Prop() errorMessage: string | undefined;\n /** Associates the internal input with an external <label>. */\n @Prop() inputId: string | undefined;\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n @Prop({ attribute: 'aria-labelledby' }) ariaLabelledby: string | undefined;\n @Prop({ attribute: 'aria-describedby' }) ariaDescribedby: string | undefined;\n\n @Event() dsChange!: EventEmitter<string>;\n @Event() dsClear!: EventEmitter<void>;\n\n private initialValue = '';\n @State() private formDisabled = false;\n @State() private hasSuffix = false;\n @State() private focused = false;\n @State() private touched = false;\n\n componentWillLoad() {\n this.initialValue = this.value;\n this.hasSuffix = Boolean(this.el.querySelector('[slot=\"suffix\"]'));\n this.syncFormValue();\n }\n\n componentDidRender() {\n const hasSuffix = Boolean(this.el.querySelector('[slot=\"suffix\"]'));\n if (hasSuffix !== this.hasSuffix) this.hasSuffix = hasSuffix;\n }\n\n @Watch('value')\n @Watch('disabled')\n @Watch('isInactive')\n @Watch('required')\n syncFormValue() {\n const inactive = this.isInactive || this.disabled || this.formDisabled;\n this.internals.setFormValue(inactive ? null : this.value);\n const missing = this.required && !inactive && this.value.length === 0;\n this.internals.setValidity(missing ? { valueMissing: true } : {}, missing ? this.requiredMessage : '');\n }\n\n formDisabledCallback(disabled: boolean) {\n this.formDisabled = disabled;\n this.syncFormValue();\n }\n\n formResetCallback() {\n this.value = this.initialValue;\n }\n\n formStateRestoreCallback(state: string | File | FormData | null) {\n this.value = typeof state === 'string' ? state : '';\n }\n\n @Method()\n async setFocus() {\n this.el.querySelector('input')?.focus();\n }\n\n private handleInput = (e: Event) => {\n this.value = (e.target as HTMLInputElement).value;\n this.dsChange.emit(this.value);\n };\n\n private handleFocus = () => {\n this.focused = true;\n };\n\n private handleBlur = () => {\n this.focused = false;\n this.touched = true;\n };\n\n private handleClear = () => {\n this.value = '';\n this.dsChange.emit('');\n this.dsClear.emit();\n this.el.querySelector('input')?.focus();\n };\n\n render() {\n const inputId = this.inputId ?? this.generatedId;\n const inactive = this.isInactive || this.disabled || this.formDisabled;\n const filled = this.value.length > 0;\n const dirty = this.value !== this.initialValue;\n const showClear = this.type === 'search' && filled && !inactive && !this.readOnly;\n const showError = this.error && Boolean(this.errorMessage);\n const textVariant = CONTROL_TEXT_VARIANT[this.size];\n const iconSize = ICON_SIZE[this.size];\n\n const describedBy = [\n this.ariaDescribedby,\n showError ? this.errorId : undefined,\n ].filter(Boolean).join(' ') || undefined;\n\n return (\n <Host\n class={{\n 'input-host': true,\n 'ds-control-inactive': inactive,\n [`ds-control--${this.size}`]: true,\n ...controlWidthClass(this.width),\n }}\n data-disabled={inactive ? '' : undefined}\n data-readonly={this.readOnly ? '' : undefined}\n data-required={this.required ? '' : undefined}\n data-invalid={this.error ? '' : undefined}\n data-filled={filled ? '' : undefined}\n data-focused={this.focused ? '' : undefined}\n data-dirty={dirty ? '' : undefined}\n data-touched={this.touched ? '' : undefined}\n >\n <div\n class={{\n 'input-control': true,\n 'input-control--bordered': this.hasBorder || this.error,\n 'input-control--error': this.error,\n 'ds-interaction-fill': true,\n [`ds-control--${this.size}`]: true,\n }}\n >\n {this.icon && (\n <span class=\"input-control__prefix ds-interaction-fill__content\" aria-hidden=\"true\">\n <ds-icon name={this.icon} size={iconSize} color=\"inherit\" />\n </span>\n )}\n <input\n type={this.type}\n id={inputId}\n value={this.value}\n placeholder={this.placeholder}\n disabled={inactive}\n readOnly={this.readOnly}\n required={this.required}\n autoFocus={this.autoFocus}\n autoComplete={this.autoComplete}\n inputMode={this.inputMode || undefined}\n enterKeyHint={this.enterKeyHint || undefined}\n class={`native-input ds-text--${textVariant.replace('text-', '')} ds-text--regular ds-interaction-fill__content`}\n aria-label={this.ariaLabel}\n aria-labelledby={this.ariaLabelledby}\n aria-describedby={describedBy}\n aria-invalid={this.error ? 'true' : undefined}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n <span class={{ 'input-control__suffix': true, 'input-control__suffix--empty': !this.hasSuffix }}>\n <slot name=\"suffix\" />\n </span>\n {showClear && (\n <ds-button-unfilled\n class=\"input-control__clear\"\n variant=\"icon\"\n size={CLEAR_BUTTON_SIZE[this.size]}\n icon=\"CrossCircle\"\n hasBorder={false}\n rounded\n ariaLabel={this.clearLabel}\n onDsClick={this.handleClear}\n />\n )}\n </div>\n {showError && (\n <ds-text\n class=\"error-text\"\n as=\"div\"\n variant=\"text-body-small\"\n color=\"negative\"\n textId={this.errorId}\n role=\"alert\"\n >\n {this.errorMessage}\n </ds-text>\n )}\n </Host>\n );\n }\n}\n",
594
+ "type": "registry:ui"
595
+ }
596
+ ]
597
+ }