@ds-mo/ui 3.0.1 → 3.1.1

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 (438) hide show
  1. package/dist/.build-stamp +1 -1
  2. package/dist/angular/angular-component-lib/utils.d.ts +9 -0
  3. package/dist/angular/angular-component-lib/utils.js +58 -0
  4. package/dist/angular/boolean-value-accessor.d.ts +9 -0
  5. package/dist/angular/boolean-value-accessor.js +37 -0
  6. package/dist/angular/ds-app-shell.d.ts +12 -0
  7. package/dist/angular/ds-app-shell.js +38 -0
  8. package/dist/angular/ds-badge.d.ts +12 -0
  9. package/dist/angular/ds-badge.js +38 -0
  10. package/dist/angular/ds-banner.d.ts +15 -0
  11. package/dist/angular/ds-banner.js +42 -0
  12. package/dist/angular/ds-bar-nav.d.ts +18 -0
  13. package/dist/angular/ds-bar-nav.js +42 -0
  14. package/dist/angular/ds-button-filled.d.ts +15 -0
  15. package/dist/angular/ds-button-filled.js +43 -0
  16. package/dist/angular/ds-button-unfilled.d.ts +17 -0
  17. package/dist/angular/ds-button-unfilled.js +46 -0
  18. package/dist/angular/ds-card-data-viz-donut.d.ts +18 -0
  19. package/dist/angular/ds-card-data-viz-donut.js +42 -0
  20. package/dist/angular/ds-card-setting.d.ts +18 -0
  21. package/dist/angular/ds-card-setting.js +42 -0
  22. package/dist/angular/ds-card.d.ts +12 -0
  23. package/dist/angular/ds-card.js +38 -0
  24. package/dist/angular/ds-chart-bar.d.ts +12 -0
  25. package/dist/angular/ds-chart-bar.js +38 -0
  26. package/dist/angular/ds-chart-donut.d.ts +19 -0
  27. package/dist/angular/ds-chart-donut.js +42 -0
  28. package/dist/angular/ds-chart-legend.d.ts +30 -0
  29. package/dist/angular/ds-chart-legend.js +45 -0
  30. package/dist/angular/ds-chart-line.d.ts +12 -0
  31. package/dist/angular/ds-chart-line.js +38 -0
  32. package/dist/angular/ds-checkbox.d.ts +15 -0
  33. package/dist/angular/ds-checkbox.js +42 -0
  34. package/dist/angular/ds-chip.d.ts +18 -0
  35. package/dist/angular/ds-chip.js +42 -0
  36. package/dist/angular/ds-divider.d.ts +12 -0
  37. package/dist/angular/ds-divider.js +38 -0
  38. package/dist/angular/ds-empty-state.d.ts +12 -0
  39. package/dist/angular/ds-empty-state.js +38 -0
  40. package/dist/angular/ds-field.d.ts +12 -0
  41. package/dist/angular/ds-field.js +38 -0
  42. package/dist/angular/ds-icon.d.ts +12 -0
  43. package/dist/angular/ds-icon.js +38 -0
  44. package/dist/angular/ds-input.d.ts +17 -0
  45. package/dist/angular/ds-input.js +46 -0
  46. package/dist/angular/ds-loader.d.ts +12 -0
  47. package/dist/angular/ds-loader.js +38 -0
  48. package/dist/angular/ds-menu.d.ts +24 -0
  49. package/dist/angular/ds-menu.js +48 -0
  50. package/dist/angular/ds-modal.d.ts +15 -0
  51. package/dist/angular/ds-modal.js +42 -0
  52. package/dist/angular/ds-pagination.d.ts +15 -0
  53. package/dist/angular/ds-pagination.js +42 -0
  54. package/dist/angular/ds-panel-nav.d.ts +42 -0
  55. package/dist/angular/ds-panel-nav.js +58 -0
  56. package/dist/angular/ds-panel-tools.d.ts +33 -0
  57. package/dist/angular/ds-panel-tools.js +49 -0
  58. package/dist/angular/ds-radio-group.d.ts +15 -0
  59. package/dist/angular/ds-radio-group.js +42 -0
  60. package/dist/angular/ds-select.d.ts +18 -0
  61. package/dist/angular/ds-select.js +42 -0
  62. package/dist/angular/ds-shell-gradient-picker.d.ts +16 -0
  63. package/dist/angular/ds-shell-gradient-picker.js +42 -0
  64. package/dist/angular/ds-shell-gradient-swatch.d.ts +16 -0
  65. package/dist/angular/ds-shell-gradient-swatch.js +42 -0
  66. package/dist/angular/ds-skeleton.d.ts +12 -0
  67. package/dist/angular/ds-skeleton.js +38 -0
  68. package/dist/angular/ds-slider.d.ts +15 -0
  69. package/dist/angular/ds-slider.js +42 -0
  70. package/dist/angular/ds-tab-group-nav.d.ts +20 -0
  71. package/dist/angular/ds-tab-group-nav.js +46 -0
  72. package/dist/angular/ds-tab-group.d.ts +15 -0
  73. package/dist/angular/ds-tab-group.js +42 -0
  74. package/dist/angular/ds-table.d.ts +33 -0
  75. package/dist/angular/ds-table.js +48 -0
  76. package/dist/angular/ds-tag.d.ts +12 -0
  77. package/dist/angular/ds-tag.js +38 -0
  78. package/dist/angular/ds-text.d.ts +12 -0
  79. package/dist/angular/ds-text.js +38 -0
  80. package/dist/angular/ds-toggle.d.ts +15 -0
  81. package/dist/angular/ds-toggle.js +42 -0
  82. package/dist/angular/ds-tooltip-data-viz.d.ts +12 -0
  83. package/dist/angular/ds-tooltip-data-viz.js +38 -0
  84. package/dist/angular/ds-tooltip.d.ts +12 -0
  85. package/dist/angular/ds-tooltip.js +38 -0
  86. package/dist/angular/index.d.ts +2 -0
  87. package/dist/angular/index.js +43 -0
  88. package/dist/angular/proxies.d.ts +44 -0
  89. package/dist/angular/proxies.js +45 -0
  90. package/dist/angular/radio-value-accessor.d.ts +8 -0
  91. package/dist/angular/radio-value-accessor.js +34 -0
  92. package/dist/angular/select-value-accessor.d.ts +8 -0
  93. package/dist/angular/select-value-accessor.js +34 -0
  94. package/dist/angular/text-value-accessor.d.ts +8 -0
  95. package/dist/angular/text-value-accessor.js +34 -0
  96. package/dist/angular/value-accessor.d.ts +18 -0
  97. package/dist/angular/value-accessor.js +39 -0
  98. package/dist/components/ds-app-shell.js +1 -1
  99. package/dist/components/ds-bar-nav.js +1 -1
  100. package/dist/components/ds-bar-nav.js.map +1 -1
  101. package/dist/components/ds-button-filled.js +1 -1
  102. package/dist/components/ds-button-unfilled.js +1 -1
  103. package/dist/components/ds-card-data-viz-donut.js +1 -1
  104. package/dist/components/ds-card-data-viz-donut.js.map +1 -1
  105. package/dist/components/ds-card-setting.js +1 -1
  106. package/dist/components/ds-card-setting.js.map +1 -1
  107. package/dist/components/ds-chart-donut.js +1 -1
  108. package/dist/components/ds-chart-donut.js.map +1 -1
  109. package/dist/components/ds-chart-legend.js +1 -1
  110. package/dist/components/ds-chart-legend.js.map +1 -1
  111. package/dist/components/ds-checkbox.js +1 -1
  112. package/dist/components/ds-checkbox.js.map +1 -1
  113. package/dist/components/ds-chip.js +1 -1
  114. package/dist/components/ds-chip.js.map +1 -1
  115. package/dist/components/ds-empty-state.js +1 -1
  116. package/dist/components/ds-empty-state.js.map +1 -1
  117. package/dist/components/ds-input.js +1 -1
  118. package/dist/components/ds-input.js.map +1 -1
  119. package/dist/components/ds-menu.js +1 -1
  120. package/dist/components/ds-pagination.js +1 -1
  121. package/dist/components/ds-pagination.js.map +1 -1
  122. package/dist/components/ds-panel-nav.js +1 -1
  123. package/dist/components/ds-panel-nav.js.map +1 -1
  124. package/dist/components/ds-panel-tools.js +1 -1
  125. package/dist/components/ds-panel-tools.js.map +1 -1
  126. package/dist/components/ds-radio-group.js +1 -1
  127. package/dist/components/ds-radio-group.js.map +1 -1
  128. package/dist/components/ds-select.js +1 -1
  129. package/dist/components/ds-select.js.map +1 -1
  130. package/dist/components/ds-shell-gradient-picker.js +1 -1
  131. package/dist/components/ds-shell-gradient-swatch.js +1 -1
  132. package/dist/components/ds-tab-group-nav.js +1 -1
  133. package/dist/components/ds-tab-group.js +1 -1
  134. package/dist/components/ds-tab-group.js.map +1 -1
  135. package/dist/components/ds-table.js +1 -1
  136. package/dist/components/ds-table.js.map +1 -1
  137. package/dist/components/ds-toggle.js +1 -1
  138. package/dist/components/ds-toggle.js.map +1 -1
  139. package/dist/components/index.js +1 -1
  140. package/dist/components/index.js.map +1 -1
  141. package/dist/components/p-BBpASejH.js +2 -0
  142. package/dist/components/p-BBpASejH.js.map +1 -0
  143. package/dist/components/{p-D0gBLLJx.js → p-BFiaUYu7.js} +2 -2
  144. package/dist/components/p-BFiaUYu7.js.map +1 -0
  145. package/dist/components/p-CTK82RIw.js +2 -0
  146. package/dist/components/p-CTK82RIw.js.map +1 -0
  147. package/dist/components/{p-BSNlp8Di.js → p-Cp86p-11.js} +2 -2
  148. package/dist/components/{p-BSNlp8Di.js.map → p-Cp86p-11.js.map} +1 -1
  149. package/dist/components/{p-vlwhuqVn.js → p-DHjjwgku.js} +2 -2
  150. package/dist/components/{p-vlwhuqVn.js.map → p-DHjjwgku.js.map} +1 -1
  151. package/dist/components/{p-boPMASaQ.js → p-DOEMwKBb.js} +2 -2
  152. package/dist/components/{p-boPMASaQ.js.map → p-DOEMwKBb.js.map} +1 -1
  153. package/dist/components/{p-Co2kLhWu.js → p-DolYlDbY.js} +2 -2
  154. package/dist/components/p-DolYlDbY.js.map +1 -0
  155. package/dist/components/p-NkAPA-Dz.js +2 -0
  156. package/dist/components/p-NkAPA-Dz.js.map +1 -0
  157. package/dist/framework/angular.d.ts +6 -0
  158. package/dist/framework/angular.js +6 -0
  159. package/dist/lib/nav/chrome-transition.d.ts +8 -0
  160. package/dist/lib/nav/index.js.map +2 -2
  161. package/dist/lib/utils/format-compact-number.d.ts +1 -1
  162. package/dist/lib/utils/index.js +8 -1
  163. package/dist/lib/utils/index.js.map +2 -2
  164. package/dist/react/components.d.ts +44 -0
  165. package/{src/react/components.ts → dist/react/components.js} +0 -1
  166. package/dist/react/ds-app-shell.d.ts +9 -0
  167. package/dist/react/ds-app-shell.js +12 -0
  168. package/dist/react/ds-badge.d.ts +9 -0
  169. package/dist/react/ds-badge.js +12 -0
  170. package/dist/react/ds-banner.d.ts +12 -0
  171. package/dist/react/ds-banner.js +12 -0
  172. package/dist/react/ds-bar-nav.d.ts +12 -0
  173. package/dist/react/ds-bar-nav.js +12 -0
  174. package/dist/react/ds-button-filled.d.ts +12 -0
  175. package/dist/react/ds-button-filled.js +12 -0
  176. package/dist/react/ds-button-unfilled.d.ts +13 -0
  177. package/dist/react/ds-button-unfilled.js +15 -0
  178. package/dist/react/ds-card-data-viz-donut.d.ts +12 -0
  179. package/dist/react/ds-card-data-viz-donut.js +12 -0
  180. package/dist/react/ds-card-setting.d.ts +12 -0
  181. package/dist/react/ds-card-setting.js +12 -0
  182. package/dist/react/ds-card.d.ts +9 -0
  183. package/dist/react/ds-card.js +12 -0
  184. package/dist/react/ds-chart-bar.d.ts +9 -0
  185. package/dist/react/ds-chart-bar.js +12 -0
  186. package/dist/react/ds-chart-donut.d.ts +12 -0
  187. package/dist/react/ds-chart-donut.js +12 -0
  188. package/dist/react/ds-chart-legend.d.ts +16 -0
  189. package/dist/react/ds-chart-legend.js +15 -0
  190. package/dist/react/ds-chart-line.d.ts +9 -0
  191. package/dist/react/ds-chart-line.js +12 -0
  192. package/dist/react/ds-checkbox.d.ts +12 -0
  193. package/dist/react/ds-checkbox.js +12 -0
  194. package/dist/react/ds-chip.d.ts +12 -0
  195. package/dist/react/ds-chip.js +12 -0
  196. package/dist/react/ds-divider.d.ts +9 -0
  197. package/dist/react/ds-divider.js +12 -0
  198. package/dist/react/ds-empty-state.d.ts +9 -0
  199. package/dist/react/ds-empty-state.js +12 -0
  200. package/dist/react/ds-field.d.ts +9 -0
  201. package/dist/react/ds-field.js +12 -0
  202. package/dist/react/ds-icon.d.ts +9 -0
  203. package/dist/react/ds-icon.js +12 -0
  204. package/dist/react/ds-input.d.ts +13 -0
  205. package/dist/react/ds-input.js +15 -0
  206. package/dist/react/ds-loader.d.ts +9 -0
  207. package/dist/react/ds-loader.js +12 -0
  208. package/dist/react/ds-menu.d.ts +14 -0
  209. package/dist/react/ds-menu.js +16 -0
  210. package/dist/react/ds-modal.d.ts +12 -0
  211. package/dist/react/ds-modal.js +12 -0
  212. package/dist/react/ds-pagination.d.ts +12 -0
  213. package/dist/react/ds-pagination.js +12 -0
  214. package/dist/react/ds-panel-nav.d.ts +17 -0
  215. package/dist/react/ds-panel-nav.js +19 -0
  216. package/dist/react/ds-panel-tools.d.ts +17 -0
  217. package/dist/react/ds-panel-tools.js +16 -0
  218. package/dist/react/ds-radio-group.d.ts +12 -0
  219. package/dist/react/ds-radio-group.js +12 -0
  220. package/dist/react/ds-select.d.ts +12 -0
  221. package/dist/react/ds-select.js +12 -0
  222. package/dist/react/ds-shell-gradient-picker.d.ts +12 -0
  223. package/dist/react/ds-shell-gradient-picker.js +12 -0
  224. package/dist/react/ds-shell-gradient-swatch.d.ts +12 -0
  225. package/dist/react/ds-shell-gradient-swatch.js +12 -0
  226. package/dist/react/ds-skeleton.d.ts +9 -0
  227. package/dist/react/ds-skeleton.js +12 -0
  228. package/dist/react/ds-slider.d.ts +12 -0
  229. package/dist/react/ds-slider.js +12 -0
  230. package/dist/react/ds-tab-group-nav.d.ts +13 -0
  231. package/dist/react/ds-tab-group-nav.js +15 -0
  232. package/dist/react/ds-tab-group.d.ts +12 -0
  233. package/dist/react/ds-tab-group.js +12 -0
  234. package/dist/react/ds-table.d.ts +21 -0
  235. package/dist/react/ds-table.js +16 -0
  236. package/dist/react/ds-tag.d.ts +9 -0
  237. package/dist/react/ds-tag.js +12 -0
  238. package/dist/react/ds-text.d.ts +9 -0
  239. package/dist/react/ds-text.js +12 -0
  240. package/dist/react/ds-toggle.d.ts +12 -0
  241. package/dist/react/ds-toggle.js +12 -0
  242. package/dist/react/ds-tooltip-data-viz.d.ts +9 -0
  243. package/dist/react/ds-tooltip-data-viz.js +12 -0
  244. package/dist/react/ds-tooltip.d.ts +9 -0
  245. package/dist/react/ds-tooltip.js +12 -0
  246. package/dist/types/components/BarNav/BarNav.d.ts +1 -0
  247. package/dist/types/components/ButtonFilled/ButtonFilled.d.ts +1 -1
  248. package/dist/types/components/ButtonUnfilled/ButtonUnfilled.d.ts +1 -1
  249. package/dist/types/components/CardDataVizDonut/CardDataVizDonut.d.ts +1 -0
  250. package/dist/types/components/CardSetting/CardSetting.d.ts +3 -0
  251. package/dist/types/components/ChartDonut/ChartDonut.d.ts +2 -0
  252. package/dist/types/components/ChartLegend/ChartLegend.d.ts +1 -0
  253. package/dist/types/components/Checkbox/Checkbox.d.ts +12 -0
  254. package/dist/types/components/Chip/Chip.d.ts +2 -0
  255. package/dist/types/components/EmptyState/EmptyState.d.ts +2 -0
  256. package/dist/types/components/Input/Input.d.ts +14 -1
  257. package/dist/types/components/Menu/Menu.d.ts +2 -0
  258. package/dist/types/components/Pagination/Pagination.d.ts +3 -0
  259. package/dist/types/components/PanelNav/PanelNav.d.ts +7 -0
  260. package/dist/types/components/PanelTools/PanelTools.d.ts +2 -0
  261. package/dist/types/components/RadioGroup/RadioGroup.d.ts +13 -1
  262. package/dist/types/components/Select/Select.d.ts +13 -1
  263. package/dist/types/components/ShellGradientPicker/ShellGradientPicker.d.ts +1 -0
  264. package/dist/types/components/ShellGradientSwatch/ShellGradientSwatch.d.ts +1 -1
  265. package/dist/types/components/TabGroup/TabGroup.d.ts +1 -1
  266. package/dist/types/components/TabGroupNav/TabGroupNav.d.ts +1 -1
  267. package/dist/types/components/Table/Table.d.ts +6 -0
  268. package/dist/types/components/Toggle/Toggle.d.ts +12 -0
  269. package/dist/types/components.d.ts +525 -30
  270. package/dist/types/nav/chrome-transition.d.ts +8 -0
  271. package/dist/types/stencil-public-runtime.d.ts +1 -0
  272. package/dist/types/utils/format-compact-number.d.ts +1 -1
  273. package/package.json +58 -41
  274. package/dist/components/p-BiM6QBTF.js +0 -2
  275. package/dist/components/p-BiM6QBTF.js.map +0 -1
  276. package/dist/components/p-Co2kLhWu.js.map +0 -1
  277. package/dist/components/p-CsaW5gDM.js +0 -2
  278. package/dist/components/p-CsaW5gDM.js.map +0 -1
  279. package/dist/components/p-D0gBLLJx.js.map +0 -1
  280. package/dist/components/p-DEpLlQZK.js +0 -2
  281. package/dist/components/p-DEpLlQZK.js.map +0 -1
  282. package/src/angular/angular-component-lib/utils.ts +0 -65
  283. package/src/angular/index.ts +0 -45
  284. package/src/angular/proxies.ts +0 -1156
  285. package/src/react/ds-app-shell.ts +0 -26
  286. package/src/react/ds-badge.ts +0 -26
  287. package/src/react/ds-banner.ts +0 -27
  288. package/src/react/ds-bar-nav.ts +0 -27
  289. package/src/react/ds-button-filled.ts +0 -27
  290. package/src/react/ds-button-unfilled.ts +0 -33
  291. package/src/react/ds-card-data-viz-donut.ts +0 -27
  292. package/src/react/ds-card-setting.ts +0 -27
  293. package/src/react/ds-card.ts +0 -26
  294. package/src/react/ds-chart-bar.ts +0 -26
  295. package/src/react/ds-chart-donut.ts +0 -27
  296. package/src/react/ds-chart-legend.ts +0 -33
  297. package/src/react/ds-chart-line.ts +0 -26
  298. package/src/react/ds-checkbox.ts +0 -27
  299. package/src/react/ds-chip.ts +0 -27
  300. package/src/react/ds-divider.ts +0 -26
  301. package/src/react/ds-empty-state.ts +0 -26
  302. package/src/react/ds-field.ts +0 -26
  303. package/src/react/ds-icon.ts +0 -26
  304. package/src/react/ds-input.ts +0 -33
  305. package/src/react/ds-loader.ts +0 -26
  306. package/src/react/ds-menu.ts +0 -35
  307. package/src/react/ds-modal.ts +0 -27
  308. package/src/react/ds-pagination.ts +0 -27
  309. package/src/react/ds-panel-nav.ts +0 -41
  310. package/src/react/ds-panel-tools.ts +0 -35
  311. package/src/react/ds-radio-group.ts +0 -27
  312. package/src/react/ds-select.ts +0 -27
  313. package/src/react/ds-shell-gradient-picker.ts +0 -27
  314. package/src/react/ds-shell-gradient-swatch.ts +0 -27
  315. package/src/react/ds-skeleton.ts +0 -26
  316. package/src/react/ds-slider.ts +0 -27
  317. package/src/react/ds-tab-group-nav.ts +0 -33
  318. package/src/react/ds-tab-group.ts +0 -27
  319. package/src/react/ds-table.ts +0 -35
  320. package/src/react/ds-tag.ts +0 -26
  321. package/src/react/ds-text.ts +0 -26
  322. package/src/react/ds-toggle.ts +0 -27
  323. package/src/react/ds-tooltip-data-viz.ts +0 -26
  324. package/src/react/ds-tooltip.ts +0 -26
  325. package/src/wc/components/AppShell/AppShell.tsx +0 -377
  326. package/src/wc/components/Badge/Badge.tsx +0 -179
  327. package/src/wc/components/Badge/index.ts +0 -1
  328. package/src/wc/components/Banner/Banner.tsx +0 -156
  329. package/src/wc/components/BarNav/BarNav.tsx +0 -745
  330. package/src/wc/components/BarNav/bar-nav-dom-utils.ts +0 -23
  331. package/src/wc/components/BarNav/bar-nav-tabs-menu-utils.ts +0 -114
  332. package/src/wc/components/BarNav/bar-nav-types.ts +0 -3
  333. package/src/wc/components/BarNav/bar-nav-utils.ts +0 -67
  334. package/src/wc/components/BarNav/index.ts +0 -2
  335. package/src/wc/components/ButtonFilled/ButtonFilled.tsx +0 -171
  336. package/src/wc/components/ButtonFilled/index.ts +0 -7
  337. package/src/wc/components/ButtonUnfilled/ButtonUnfilled.tsx +0 -229
  338. package/src/wc/components/ButtonUnfilled/index.ts +0 -7
  339. package/src/wc/components/Card/Card.tsx +0 -78
  340. package/src/wc/components/Card/index.ts +0 -1
  341. package/src/wc/components/CardDataVizDonut/CardDataVizDonut.tsx +0 -108
  342. package/src/wc/components/CardDataVizDonut/index.ts +0 -1
  343. package/src/wc/components/CardSetting/CardSetting.tsx +0 -81
  344. package/src/wc/components/CardSetting/index.ts +0 -1
  345. package/src/wc/components/ChartBar/ChartBar.tsx +0 -88
  346. package/src/wc/components/ChartBar/index.ts +0 -1
  347. package/src/wc/components/ChartDonut/ChartDonut.tsx +0 -289
  348. package/src/wc/components/ChartDonut/index.ts +0 -1
  349. package/src/wc/components/ChartLegend/ChartLegend.tsx +0 -125
  350. package/src/wc/components/ChartLegend/index.ts +0 -2
  351. package/src/wc/components/ChartLine/ChartLine.tsx +0 -102
  352. package/src/wc/components/ChartLine/index.ts +0 -1
  353. package/src/wc/components/Checkbox/Checkbox.tsx +0 -60
  354. package/src/wc/components/Checkbox/index.ts +0 -1
  355. package/src/wc/components/Chip/Chip.tsx +0 -104
  356. package/src/wc/components/Chip/index.ts +0 -1
  357. package/src/wc/components/Divider/Divider.tsx +0 -107
  358. package/src/wc/components/Divider/index.ts +0 -2
  359. package/src/wc/components/EmptyState/EmptyState.tsx +0 -30
  360. package/src/wc/components/Field/Field.tsx +0 -30
  361. package/src/wc/components/Icon/Icon.tsx +0 -172
  362. package/src/wc/components/Icon/flag-icon-catalog.ts +0 -36
  363. package/src/wc/components/Icon/icon-cache.ts +0 -47
  364. package/src/wc/components/Icon/icon-svg.ts +0 -73
  365. package/src/wc/components/Icon/index.ts +0 -1
  366. package/src/wc/components/Icon/system-icon-catalog.ts +0 -401
  367. package/src/wc/components/Input/Input.tsx +0 -107
  368. package/src/wc/components/Input/index.ts +0 -1
  369. package/src/wc/components/Loader/Loader.tsx +0 -99
  370. package/src/wc/components/Loader/index.ts +0 -1
  371. package/src/wc/components/Menu/Menu.tsx +0 -437
  372. package/src/wc/components/Menu/menu-placement.ts +0 -26
  373. package/src/wc/components/Menu/menu-position.ts +0 -78
  374. package/src/wc/components/Menu/menu-types.ts +0 -39
  375. package/src/wc/components/Modal/Modal.tsx +0 -213
  376. package/src/wc/components/Pagination/Pagination.tsx +0 -97
  377. package/src/wc/components/PanelNav/PanelNav.tsx +0 -714
  378. package/src/wc/components/PanelNav/index.ts +0 -17
  379. package/src/wc/components/PanelNav/panel-nav-types.ts +0 -36
  380. package/src/wc/components/PanelNav/panel-nav-utils.ts +0 -79
  381. package/src/wc/components/PanelTools/PanelTools.tsx +0 -366
  382. package/src/wc/components/PanelTools/index.ts +0 -7
  383. package/src/wc/components/PanelTools/panel-tools-types.ts +0 -44
  384. package/src/wc/components/PanelTools/panel-tools-utils.ts +0 -50
  385. package/src/wc/components/RadioGroup/RadioGroup.tsx +0 -130
  386. package/src/wc/components/RadioGroup/index.ts +0 -1
  387. package/src/wc/components/Select/Select.tsx +0 -274
  388. package/src/wc/components/Select/index.ts +0 -1
  389. package/src/wc/components/ShellGradientPicker/ShellGradientPicker.tsx +0 -55
  390. package/src/wc/components/ShellGradientSwatch/ShellGradientSwatch.tsx +0 -69
  391. package/src/wc/components/ShellGradientSwatch/shell-gradient-swatch-types.ts +0 -17
  392. package/src/wc/components/Skeleton/Skeleton.tsx +0 -64
  393. package/src/wc/components/Skeleton/index.ts +0 -1
  394. package/src/wc/components/Slider/Slider.tsx +0 -76
  395. package/src/wc/components/Slider/index.ts +0 -1
  396. package/src/wc/components/TabGroup/TabGroup.tsx +0 -204
  397. package/src/wc/components/TabGroup/tab-item-utils.ts +0 -25
  398. package/src/wc/components/TabGroupNav/TabGroupNav.tsx +0 -347
  399. package/src/wc/components/Table/Table.tsx +0 -273
  400. package/src/wc/components/Tag/Tag.tsx +0 -63
  401. package/src/wc/components/Tag/index.ts +0 -1
  402. package/src/wc/components/Text/Text.tsx +0 -99
  403. package/src/wc/components/Text/index.ts +0 -12
  404. package/src/wc/components/Text/text-types.ts +0 -23
  405. package/src/wc/components/Text/text-utils.ts +0 -13
  406. package/src/wc/components/Toggle/Toggle.tsx +0 -43
  407. package/src/wc/components/Toggle/index.ts +0 -1
  408. package/src/wc/components/Tooltip/Tooltip.tsx +0 -413
  409. package/src/wc/components/TooltipDataViz/TooltipDataViz.tsx +0 -145
  410. package/src/wc/components/TooltipDataViz/index.ts +0 -1
  411. package/src/wc/components.d.ts +0 -3569
  412. package/src/wc/nav/badge-gradient-ring.ts +0 -109
  413. package/src/wc/nav/chrome-transition.ts +0 -62
  414. package/src/wc/nav/index.ts +0 -80
  415. package/src/wc/nav/nav-chrome.ts +0 -47
  416. package/src/wc/nav/shell-chrome-metrics.ts +0 -49
  417. package/src/wc/nav/shell-gradient-presets.ts +0 -60
  418. package/src/wc/nav/shell-gradient.ts +0 -94
  419. package/src/wc/nav/shell-shortcuts.ts +0 -63
  420. package/src/wc/nav/shell-view-transition.ts +0 -122
  421. package/src/wc/utils/chart-colors.ts +0 -7
  422. package/src/wc/utils/chart-types.ts +0 -25
  423. package/src/wc/utils/control-density.css +0 -43
  424. package/src/wc/utils/control-inactive.css +0 -20
  425. package/src/wc/utils/control-text.ts +0 -11
  426. package/src/wc/utils/control-width.css +0 -28
  427. package/src/wc/utils/control-width.ts +0 -10
  428. package/src/wc/utils/focus-ring.css +0 -33
  429. package/src/wc/utils/format-compact-number.ts +0 -27
  430. package/src/wc/utils/index.ts +0 -27
  431. package/src/wc/utils/interaction-fill.css +0 -162
  432. package/src/wc/utils/resolve-css-length-px.ts +0 -66
  433. package/src/wc/utils/resolve-css-time-ms.ts +0 -46
  434. package/src/wc/utils/scroll-edge-fade.css +0 -80
  435. package/src/wc/utils/scroll-edge-fade.ts +0 -148
  436. package/src/wc/utils/token-defaults.ts +0 -81
  437. package/src/wc/utils/truncate-svg-text.ts +0 -25
  438. package/src/wc/utils/typography.css +0 -146
@@ -1,109 +0,0 @@
1
- import {
2
- SHELL_GRADIENT_POSITION_BAR_VAR,
3
- SHELL_GRADIENT_POSITION_PANEL_VAR,
4
- } from './shell-gradient';
5
-
6
- /** Per-badge background-position for shell gradient ring sampling. */
7
- export const BADGE_GRADIENT_POSITION_VAR = '--_badge-gradient-position';
8
-
9
- export interface GradientSurface {
10
- element: HTMLElement;
11
- chromeHost: HTMLElement;
12
- positionVar: string;
13
- }
14
-
15
- /** Whether the badge sits under `ds-app-shell[gradient]`. */
16
- export function isShellGradientActive(from: HTMLElement): boolean {
17
- // Explicit <HTMLElement>: the inferred HTMLDsAppShellElement type only
18
- // resolves where @stencil/core types are installed — consumers importing
19
- // `@ds-mo/ui/nav` (raw TS) compile this without them.
20
- const shell = from.closest<HTMLElement>('ds-app-shell');
21
- return shell?.hasAttribute('gradient') === true;
22
- }
23
-
24
- /** Bar or panel chrome surface that owns the shell gradient stack. */
25
- export function findGradientSurface(from: HTMLElement): GradientSurface | null {
26
- const barHost = from.closest('ds-bar-nav') as HTMLElement | null;
27
- if (barHost) {
28
- const root = barHost.shadowRoot ?? barHost;
29
- const element = root.querySelector('.bar-nav');
30
- if (element) {
31
- return {
32
- element: element as HTMLElement,
33
- chromeHost: barHost,
34
- positionVar: SHELL_GRADIENT_POSITION_BAR_VAR,
35
- };
36
- }
37
- }
38
-
39
- const panelHost = from.closest('ds-panel-nav') as HTMLElement | null;
40
- if (panelHost) {
41
- const root = panelHost.shadowRoot ?? panelHost;
42
- const element = root.querySelector('.panel-nav');
43
- if (element) {
44
- return {
45
- element: element as HTMLElement,
46
- chromeHost: panelHost,
47
- positionVar: SHELL_GRADIENT_POSITION_PANEL_VAR,
48
- };
49
- }
50
- }
51
-
52
- return null;
53
- }
54
-
55
- interface ParsedPosition {
56
- x: number;
57
- y: number;
58
- }
59
-
60
- /** Parse a two-value CSS background-position (e.g. `-200px 0`). */
61
- export function parseCssBackgroundPosition(value: string): ParsedPosition {
62
- const trimmed = value.trim();
63
- if (!trimmed) return { x: 0, y: 0 };
64
-
65
- const parts = trimmed.split(/\s+/);
66
- const x = parseLength(parts[0] ?? '0');
67
- const y = parseLength(parts[1] ?? '0');
68
- return { x, y };
69
- }
70
-
71
- function parseLength(token: string): number {
72
- const px = token.match(/^(-?[\d.]+)px$/);
73
- if (px) return Number(px[1]);
74
- return 0;
75
- }
76
-
77
- /**
78
- * Background position for a badge ring so the shell gradient aligns with nav chrome.
79
- * Uses badge center relative to the painted chrome surface.
80
- */
81
- export function badgeGradientPosition(
82
- badgeHost: HTMLElement,
83
- surface: GradientSurface,
84
- shellPosition: string,
85
- ): string {
86
- const badgeRect = badgeHost.getBoundingClientRect();
87
- const surfaceRect = surface.element.getBoundingClientRect();
88
- const anchorX = badgeRect.left + badgeRect.width / 2 - surfaceRect.left;
89
- const anchorY = badgeRect.top + badgeRect.height / 2 - surfaceRect.top;
90
- const { x, y } = parseCssBackgroundPosition(shellPosition);
91
-
92
- return `${Math.round(x - anchorX)}px ${Math.round(y - anchorY)}px`;
93
- }
94
-
95
- /** Resolve shell gradient position from chrome host custom properties. */
96
- export function readShellGradientPosition(surface: GradientSurface): string {
97
- const styles = getComputedStyle(surface.chromeHost);
98
- return styles.getPropertyValue(surface.positionVar).trim() || '0 0';
99
- }
100
-
101
- /** Stamp `--_badge-gradient-position` on the badge host (fixed viewport chrome). */
102
- export function syncBadgeGradientPosition(badgeHost: HTMLElement): void {
103
- if (!isShellGradientActive(badgeHost)) {
104
- badgeHost.style.removeProperty(BADGE_GRADIENT_POSITION_VAR);
105
- return;
106
- }
107
-
108
- badgeHost.style.setProperty(BADGE_GRADIENT_POSITION_VAR, '0 0');
109
- }
@@ -1,62 +0,0 @@
1
- /** Bubbling/composed events — `ds-app-shell` and `ds-bar-nav` coordinate during width motion. */
2
-
3
- export const CHROME_TRANSITION_START = 'dsChromeTransitionStart';
4
- export const CHROME_TRANSITION_END = 'dsChromeTransitionEnd';
5
-
6
- export type ChromeTransitionSource = 'panel-nav' | 'panel-tools';
7
-
8
- export interface ChromeTransitionDetail {
9
- source: ChromeTransitionSource;
10
- /** Panel-tools drawer motion direction; omitted for panel-nav. */
11
- phase?: 'opening' | 'closing';
12
- }
13
-
14
- /** Reference-counted gate — used while panel-nav width is transitioning. */
15
- export class ChromeTransitionDepth {
16
- private depth = 0;
17
-
18
- enter(): void {
19
- this.depth += 1;
20
- }
21
-
22
- exit(): void {
23
- this.depth = Math.max(0, this.depth - 1);
24
- }
25
-
26
- get isActive(): boolean {
27
- return this.depth > 0;
28
- }
29
- }
30
-
31
- export interface RafCoalescer {
32
- schedule(): void;
33
- cancel(): void;
34
- }
35
-
36
- /** Coalesce bursty layout work (ResizeObserver, prop churn) to one callback per frame. */
37
- export function createRafCoalescer(onFrame: () => void): RafCoalescer {
38
- let rafId = 0;
39
- return {
40
- schedule() {
41
- if (rafId !== 0) return;
42
- rafId = requestAnimationFrame(() => {
43
- rafId = 0;
44
- onFrame();
45
- });
46
- },
47
- cancel() {
48
- if (rafId !== 0) {
49
- cancelAnimationFrame(rafId);
50
- rafId = 0;
51
- }
52
- },
53
- };
54
- }
55
-
56
- export function readChromeTransitionSource(event: Event): ChromeTransitionSource | undefined {
57
- return (event as CustomEvent<ChromeTransitionDetail>).detail?.source;
58
- }
59
-
60
- export function readChromeTransitionPhase(event: Event): ChromeTransitionDetail['phase'] {
61
- return (event as CustomEvent<ChromeTransitionDetail>).detail?.phase;
62
- }
@@ -1,80 +0,0 @@
1
- export type { NavChromeStyle } from './nav-chrome';
2
- export {
3
- NAV_STYLE_HINT_ATTR,
4
- readNavStyleAttr,
5
- setNavStyleHint,
6
- clearNavStyleHint,
7
- resolveNavChromeStyle,
8
- shouldResyncNavChromeStyle,
9
- } from './nav-chrome';
10
- export {
11
- SHELL_BAR_NAV_VT_NAME,
12
- SHELL_NAV_REVEAL_DURATION_VAR,
13
- SHELL_NAV_REVEAL_EASING_VAR,
14
- parseCssTimeMs,
15
- ensureShellNavVtStyle,
16
- resolveShellNavRevealOrigin,
17
- setShellNavRevealOriginVars,
18
- animateShellNavRadialReveal,
19
- runShellNavStyleRevealOnReady,
20
- } from './shell-view-transition';
21
- export type { ShellNavRevealOrigin } from './shell-view-transition';
22
- export {
23
- SHELL_GRADIENT_IMAGE_VAR,
24
- SHELL_GRADIENT_SIZE_VAR,
25
- SHELL_GRADIENT_POSITION_PANEL_VAR,
26
- SHELL_GRADIENT_POSITION_BAR_VAR,
27
- SHELL_GRADIENT_OPACITY_VAR,
28
- SHELL_CHROME_SURFACE_POSITION_VAR,
29
- SHELL_GRADIENT_OPACITY,
30
- buildShellRadialGradient,
31
- shellGradientImage,
32
- shellGradientSize,
33
- shellGradientPositionPanel,
34
- shellGradientPositionBar,
35
- shellChromeSurfacePosition,
36
- shellChromeLayerActive,
37
- readShellViewportDimensions,
38
- } from './shell-gradient';
39
- export type { ShellGradientLayout, ShellViewportDimensions } from './shell-gradient';
40
- export type { MenuPlacement } from '../components/Menu/menu-placement';
41
- export {
42
- PANEL_NAV_USER_MENU_PLACEMENT,
43
- } from '../components/Menu/menu-placement';
44
- export type { ShellGradientPreset } from './shell-gradient-presets';
45
- export {
46
- DEFAULT_SHELL_GRADIENT_PRESET,
47
- SHELL_GRADIENT_PRESETS,
48
- SHELL_GRADIENT_PRESET_LABELS,
49
- buildShellRadialGradientForPreset,
50
- isShellGradientPreset,
51
- normalizeShellGradientPreset,
52
- shellGradientPresetStopToken,
53
- } from './shell-gradient-presets';
54
- export type { ChromeTransitionDetail, ChromeTransitionSource } from './chrome-transition';
55
- export {
56
- CHROME_TRANSITION_END,
57
- CHROME_TRANSITION_START,
58
- ChromeTransitionDepth,
59
- createRafCoalescer,
60
- readChromeTransitionSource,
61
- readChromeTransitionPhase,
62
- } from './chrome-transition';
63
- export {
64
- barGradientPositionFromPanelWidth,
65
- isPanelNavCollapsed,
66
- panelWidthPxFromTokens,
67
- readCssVarWidthPx,
68
- readPanelNavWidthTokens,
69
- } from './shell-chrome-metrics';
70
- export type { PanelNavWidthTokens } from './shell-chrome-metrics';
71
- export {
72
- BADGE_GRADIENT_POSITION_VAR,
73
- badgeGradientPosition,
74
- findGradientSurface,
75
- isShellGradientActive,
76
- parseCssBackgroundPosition,
77
- readShellGradientPosition,
78
- syncBadgeGradientPosition,
79
- } from './badge-gradient-ring';
80
- export type { GradientSurface } from './badge-gradient-ring';
@@ -1,47 +0,0 @@
1
- /** Nav chrome style slot — dashboard vs settings. Colors unified for now; texture hooks use the class. */
2
- export type NavChromeStyle = 'dashboard' | 'settings';
3
-
4
- /** Document hint for first paint before framework props land. */
5
- export const NAV_STYLE_HINT_ATTR = 'data-nav-style';
6
-
7
- export function readNavStyleAttr(attr: string | null): NavChromeStyle | undefined {
8
- if (attr === 'dashboard' || attr === 'settings') return attr;
9
- return undefined;
10
- }
11
-
12
- export function setNavStyleHint(style: NavChromeStyle): void {
13
- if (typeof document === 'undefined') return;
14
- document.documentElement.setAttribute(NAV_STYLE_HINT_ATTR, style);
15
- }
16
-
17
- export function clearNavStyleHint(): void {
18
- if (typeof document === 'undefined') return;
19
- document.documentElement.removeAttribute(NAV_STYLE_HINT_ATTR);
20
- }
21
-
22
- export function resolveNavChromeStyle(
23
- styleProp: NavChromeStyle,
24
- hostAttr: string | null,
25
- docHint?: string | null,
26
- ): NavChromeStyle {
27
- const fromHost = readNavStyleAttr(hostAttr);
28
- if (fromHost) return fromHost;
29
-
30
- const hint =
31
- docHint !== undefined
32
- ? docHint
33
- : typeof document !== 'undefined'
34
- ? document.documentElement.getAttribute(NAV_STYLE_HINT_ATTR)
35
- : null;
36
- const fromHint = readNavStyleAttr(hint);
37
- if (fromHint) return fromHint;
38
-
39
- return styleProp;
40
- }
41
-
42
- export function shouldResyncNavChromeStyle(
43
- renderedStyle: NavChromeStyle,
44
- style: NavChromeStyle,
45
- ): boolean {
46
- return renderedStyle !== style;
47
- }
@@ -1,49 +0,0 @@
1
- import { shellGradientPositionBar } from './shell-gradient';
2
-
3
- /** Read a `var(--token)` width in px using a hidden probe (works with calc() tokens). */
4
- export function readCssVarWidthPx(context: HTMLElement, cssVarName: string): number {
5
- if (typeof document === 'undefined') return 0;
6
-
7
- const probe = document.createElement('div');
8
- probe.style.cssText =
9
- 'position:absolute;visibility:hidden;pointer-events:none;height:0;width:var(' +
10
- cssVarName +
11
- ');';
12
- context.appendChild(probe);
13
- const width = probe.getBoundingClientRect().width;
14
- context.removeChild(probe);
15
- return width;
16
- }
17
-
18
- export interface PanelNavWidthTokens {
19
- expandedPx: number;
20
- collapsedPx: number;
21
- }
22
-
23
- /** Resolve panel-nav expanded/collapsed widths from scoped CSS vars on `.panel-nav`. */
24
- export function readPanelNavWidthTokens(navRoot: HTMLElement): PanelNavWidthTokens {
25
- return {
26
- expandedPx: readCssVarWidthPx(navRoot, '--_nav-width'),
27
- collapsedPx: readCssVarWidthPx(navRoot, '--_nav-width-collapsed'),
28
- };
29
- }
30
-
31
- export function isPanelNavCollapsed(
32
- panelNavHost: HTMLElement | null,
33
- navRoot: HTMLElement | null,
34
- ): boolean {
35
- if (navRoot?.classList.contains('panel-nav--collapsed')) return true;
36
- const collapsedProp = (panelNavHost as (HTMLElement & { collapsed?: boolean }) | null)?.collapsed;
37
- return collapsedProp === true;
38
- }
39
-
40
- export function panelWidthPxFromTokens(
41
- tokens: PanelNavWidthTokens,
42
- collapsed: boolean,
43
- ): number {
44
- return collapsed ? tokens.collapsedPx : tokens.expandedPx;
45
- }
46
-
47
- export function barGradientPositionFromPanelWidth(panelWidthPx: number): string {
48
- return shellGradientPositionBar(panelWidthPx);
49
- }
@@ -1,60 +0,0 @@
1
- /** Built-in shell chrome wash presets — none (solid secondary), cool, neutral, warm. */
2
- export type ShellGradientPreset = 'none' | 'cool' | 'neutral' | 'warm';
3
-
4
- export const SHELL_GRADIENT_PRESETS: ShellGradientPreset[] = ['none', 'cool', 'neutral', 'warm'];
5
-
6
- /** Wash presets shown after the `none` option in pickers. */
7
- export const SHELL_GRADIENT_WASH_PRESETS: Exclude<ShellGradientPreset, 'none'>[] = [
8
- 'cool',
9
- 'neutral',
10
- 'warm',
11
- ];
12
-
13
- /** Default wash when `gradient-preset` is omitted. */
14
- export const DEFAULT_SHELL_GRADIENT_PRESET: ShellGradientPreset = 'neutral';
15
-
16
- export const SHELL_GRADIENT_PRESET_LABELS: Record<ShellGradientPreset, string> = {
17
- none: 'None',
18
- cool: 'Cool',
19
- neutral: 'Neutral',
20
- warm: 'Warm',
21
- };
22
-
23
- const SHELL_GRADIENT_PRESET_STOP: Record<Exclude<ShellGradientPreset, 'none'>, string> = {
24
- cool: 'var(--color-color-intent-blue-strong-background)',
25
- neutral: 'var(--color-color-intent-grey-strong-background)',
26
- warm: 'var(--color-color-intent-yellow-strong-background)',
27
- };
28
-
29
- const GRADIENT_GEOMETRY = '100% 100% at 0% 0%';
30
-
31
- export function shellGradientPresetStopToken(preset: ShellGradientPreset): string | null {
32
- if (preset === 'none') return null;
33
- return SHELL_GRADIENT_PRESET_STOP[preset];
34
- }
35
-
36
- export function isShellGradientPreset(value: string): value is ShellGradientPreset {
37
- return (SHELL_GRADIENT_PRESETS as string[]).includes(value);
38
- }
39
-
40
- /**
41
- * Coerce unknown/absent presets to the default. Runtime values escape the
42
- * type: removing the reflected `gradient-preset` attribute (e.g. an Angular
43
- * `[attr.gradient-preset]="null"` binding) drives the prop to null past its
44
- * field default — without normalization the stop lookup interpolates the
45
- * literal string "undefined" into CSS and the wash silently disappears.
46
- */
47
- export function normalizeShellGradientPreset(
48
- value: string | null | undefined,
49
- ): ShellGradientPreset {
50
- return value != null && isShellGradientPreset(value) ? value : DEFAULT_SHELL_GRADIENT_PRESET;
51
- }
52
-
53
- /** Radial wash for a preset — transparent at top-left into the intent stop. `none` returns no image. */
54
- export function buildShellRadialGradientForPreset(preset: ShellGradientPreset): string {
55
- const normalized = normalizeShellGradientPreset(preset);
56
- if (normalized === 'none') return 'none';
57
-
58
- const stop = shellGradientPresetStopToken(normalized);
59
- return `radial-gradient(${GRADIENT_GEOMETRY}, var(--color-background-transparent) 0%, ${stop} 100%)`;
60
- }
@@ -1,94 +0,0 @@
1
- /** CSS var names consumed by `ds-panel-nav` / `ds-bar-nav` inside `ds-app-shell`. */
2
- import type { ShellGradientPreset } from './shell-gradient-presets';
3
- import {
4
- DEFAULT_SHELL_GRADIENT_PRESET,
5
- buildShellRadialGradientForPreset,
6
- } from './shell-gradient-presets';
7
-
8
- export type { ShellGradientPreset } from './shell-gradient-presets';
9
- export {
10
- DEFAULT_SHELL_GRADIENT_PRESET,
11
- SHELL_GRADIENT_PRESETS,
12
- SHELL_GRADIENT_PRESET_LABELS,
13
- buildShellRadialGradientForPreset,
14
- isShellGradientPreset,
15
- shellGradientPresetStopToken,
16
- } from './shell-gradient-presets';
17
-
18
- export const SHELL_GRADIENT_IMAGE_VAR = '--ds-shell-gradient-image';
19
- export const SHELL_GRADIENT_SIZE_VAR = '--ds-shell-gradient-size';
20
- export const SHELL_GRADIENT_POSITION_PANEL_VAR = '--ds-shell-gradient-position-panel';
21
- export const SHELL_GRADIENT_POSITION_BAR_VAR = '--ds-shell-gradient-position-bar';
22
- export const SHELL_GRADIENT_OPACITY_VAR = '--ds-shell-gradient-opacity';
23
- /** Per chrome-surface background-position — offsets wash + grid to shell row origin. */
24
- export const SHELL_CHROME_SURFACE_POSITION_VAR = '--ds-shell-chrome-surface-position';
25
-
26
- /** Layer opacity for the nav gradient wash. */
27
- export const SHELL_GRADIENT_OPACITY = '0.1';
28
-
29
- /** Whether the shared chrome layer (secondary bg + optional wash) should mount. */
30
- export function shellChromeLayerActive(gradient: boolean): boolean {
31
- return gradient;
32
- }
33
-
34
- /**
35
- * Shell radial wash — same for panel and bar nav.
36
- * Tokens follow `data-theme` (light/dark intent stops).
37
- */
38
- export function buildShellRadialGradient(
39
- preset: ShellGradientPreset = DEFAULT_SHELL_GRADIENT_PRESET,
40
- ): string {
41
- return buildShellRadialGradientForPreset(preset);
42
- }
43
-
44
- /** Built-in radial image (`gradientSrc` on shell overrides). */
45
- export function shellGradientImage(
46
- preset: ShellGradientPreset = DEFAULT_SHELL_GRADIENT_PRESET,
47
- ): string {
48
- return buildShellRadialGradient(preset);
49
- }
50
-
51
- export interface ShellViewportDimensions {
52
- width: number;
53
- height: number;
54
- }
55
-
56
- /**
57
- * Viewport size for shell chrome with `background-attachment: fixed`.
58
- * Must not use the `ds-app-shell` element box — the shell can be shorter or
59
- * taller than the viewport when host height chains break or content overflows.
60
- */
61
- export function readShellViewportDimensions(win?: Window): ShellViewportDimensions {
62
- const w = win ?? (typeof globalThis.window !== 'undefined' ? globalThis.window : undefined);
63
- if (!w) return { width: 0, height: 0 };
64
-
65
- const visual = w.visualViewport;
66
- return {
67
- width: Math.round(visual?.width ?? w.innerWidth),
68
- height: Math.round(visual?.height ?? w.innerHeight),
69
- };
70
- }
71
-
72
- export interface ShellGradientLayout {
73
- width: number;
74
- height: number;
75
- panelWidth: number;
76
- }
77
-
78
- /** Pixel `background-size` for the fixed-attachment radial wash. */
79
- export function shellGradientSize(layout: Pick<ShellGradientLayout, 'width' | 'height'>): string {
80
- return `${Math.round(layout.width)}px ${Math.round(layout.height)}px`;
81
- }
82
-
83
- export function shellGradientPositionPanel(): string {
84
- return '0 0';
85
- }
86
-
87
- export function shellGradientPositionBar(panelWidth: number): string {
88
- return `${-Math.round(panelWidth)}px 0`;
89
- }
90
-
91
- /** Phase-lock a chrome rect to the shell row coordinate system (wash + grid). */
92
- export function shellChromeSurfacePosition(leftPx: number, topPx: number): string {
93
- return `${-Math.round(leftPx)}px ${-Math.round(topPx)}px`;
94
- }
@@ -1,63 +0,0 @@
1
- import type { PanelToolsToolId } from '../components/PanelTools/panel-tools-types';
2
-
3
- export type ShellShortcutAction =
4
- | 'toggle-panel-nav'
5
- | 'close-panel-tools'
6
- | `open-tool:${PanelToolsToolId}`;
7
-
8
- const TOOL_SHORTCUT_KEYS: Record<string, PanelToolsToolId> = {
9
- k: 'search',
10
- a: 'agents',
11
- s: 'stacks',
12
- m: 'messages',
13
- n: 'activity',
14
- };
15
-
16
- /** Tool shortcut keys (K/A/S/M/N) toggle open/closed via `ds-panel-tools.activateTool`. */
17
-
18
- /** True when no modifier keys are held — avoids browser/app chords like ⌘N. */
19
- export function isBareShellShortcutKey(
20
- e: Pick<KeyboardEvent, 'metaKey' | 'ctrlKey' | 'altKey' | 'shiftKey'>,
21
- ): boolean {
22
- return !e.metaKey && !e.ctrlKey && !e.altKey && !e.shiftKey;
23
- }
24
-
25
- /** Skip shell shortcuts while typing in an editable control. */
26
- export function isEditableShortcutTarget(target: EventTarget | null): boolean {
27
- if (!target || typeof target !== 'object') return false;
28
- if (!('closest' in target) || typeof target.closest !== 'function') return false;
29
-
30
- const el = target as Element & { isContentEditable?: boolean };
31
-
32
- const editable = el.closest(
33
- 'input, textarea, select, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]',
34
- );
35
- if (editable) return true;
36
-
37
- const role = el.getAttribute('role');
38
- if (role === 'textbox' || role === 'combobox' || role === 'searchbox') return true;
39
-
40
- return Boolean(el.isContentEditable);
41
- }
42
-
43
- function normalizedShortcutKey(e: Pick<KeyboardEvent, 'key' | 'code'>): string {
44
- if (e.key === '[' || e.code === 'BracketLeft') return '[';
45
- if (e.key === ']' || e.code === 'BracketRight') return ']';
46
- return e.key.length === 1 ? e.key.toLowerCase() : e.key.toLowerCase();
47
- }
48
-
49
- /** Resolve a shell chrome shortcut, or `null` when the key is not handled. */
50
- export function resolveShellShortcut(
51
- e: Pick<KeyboardEvent, 'key' | 'code' | 'metaKey' | 'ctrlKey' | 'altKey' | 'shiftKey'>,
52
- ): ShellShortcutAction | null {
53
- if (!isBareShellShortcutKey(e)) return null;
54
-
55
- const key = normalizedShortcutKey(e);
56
- if (key === '[') return 'toggle-panel-nav';
57
- if (key === ']') return 'close-panel-tools';
58
-
59
- const toolId = TOOL_SHORTCUT_KEYS[key];
60
- if (toolId) return `open-tool:${toolId}`;
61
-
62
- return null;
63
- }
@@ -1,122 +0,0 @@
1
- import { parseCssTimeMs } from '../utils/resolve-css-time-ms';
2
-
3
- /** `view-transition-name` on `ds-bar-nav` — pairs with root reveal in shell apps. */
4
- export const SHELL_BAR_NAV_VT_NAME = 'ds-shell-bar-nav';
5
-
6
- export { parseCssTimeMs };
7
-
8
- const VT_STYLE_ID = 'ds-shell-nav-vt-style';
9
-
10
- /** TokoMo tokens for the dashboard ↔ settings radial reveal (WAAPI). */
11
- export const SHELL_NAV_REVEAL_DURATION_VAR = '--effect-animation-duration-medium-3';
12
- export const SHELL_NAV_REVEAL_EASING_VAR = '--effect-animation-easing-ease-in-out';
13
- const SHELL_NAV_REVEAL_DURATION_FALLBACK_MS = 500;
14
- const SHELL_NAV_REVEAL_EASING_FALLBACK = 'ease-in-out';
15
-
16
- function readCssCustomProperty(name: string, fallback: string): string {
17
- if (typeof document === 'undefined') return fallback;
18
- const value = getComputedStyle(document.documentElement).getPropertyValue(name).trim();
19
- return value || fallback;
20
- }
21
-
22
- /** Suppress default cross-fade and pin new snapshots to a 0px circle for WAAPI reveal. */
23
- export function ensureShellNavVtStyle(): void {
24
- if (typeof document === 'undefined') return;
25
-
26
- const content = [
27
- '::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}',
28
- `::view-transition-old(${SHELL_BAR_NAV_VT_NAME}),::view-transition-new(${SHELL_BAR_NAV_VT_NAME}){animation:none;mix-blend-mode:normal}`,
29
- `::view-transition-old(${SHELL_BAR_NAV_VT_NAME}){z-index:1}`,
30
- `::view-transition-new(${SHELL_BAR_NAV_VT_NAME}){z-index:2;clip-path:circle(0px at var(--vt-x,50%) var(--vt-y,50%))}`,
31
- '::view-transition-new(root){clip-path:circle(0px at var(--vt-x,50%) var(--vt-y,50%))}',
32
- ].join('\n');
33
-
34
- const existing = document.getElementById(VT_STYLE_ID) as HTMLStyleElement | null;
35
- if (existing) {
36
- if (existing.textContent !== content) existing.textContent = content;
37
- return;
38
- }
39
-
40
- const style = document.createElement('style');
41
- style.id = VT_STYLE_ID;
42
- style.textContent = content;
43
- document.head.appendChild(style);
44
- }
45
-
46
- export interface ShellNavRevealOrigin {
47
- x: number;
48
- y: number;
49
- maxRadius: number;
50
- }
51
-
52
- /** Origin for the radial reveal — defaults to panel-nav footer gear, then viewport center. */
53
- export function resolveShellNavRevealOrigin(originEl?: HTMLElement | null): ShellNavRevealOrigin {
54
- const btn =
55
- originEl ??
56
- document.querySelector<HTMLElement>('.panel-nav__footer-btn');
57
- const rect = btn?.getBoundingClientRect();
58
- const x = rect ? Math.round(rect.left + rect.width / 2) : Math.round(window.innerWidth / 2);
59
- const y = rect ? Math.round(rect.top + rect.height / 2) : Math.round(window.innerHeight / 2);
60
- const maxRadius = Math.ceil(
61
- Math.hypot(Math.max(x, window.innerWidth - x), Math.max(y, window.innerHeight - y)),
62
- );
63
- return { x, y, maxRadius };
64
- }
65
-
66
- export function setShellNavRevealOriginVars(origin: ShellNavRevealOrigin): void {
67
- document.documentElement.style.setProperty('--vt-x', `${origin.x}px`);
68
- document.documentElement.style.setProperty('--vt-y', `${origin.y}px`);
69
- }
70
-
71
- /** Animate root + bar-nav snapshots with the same radial clip-path reveal. */
72
- export function animateShellNavRadialReveal(
73
- origin: ShellNavRevealOrigin,
74
- durationMs?: number,
75
- ): void {
76
- const duration =
77
- durationMs ??
78
- parseCssTimeMs(
79
- readCssCustomProperty(SHELL_NAV_REVEAL_DURATION_VAR, '400ms'),
80
- SHELL_NAV_REVEAL_DURATION_FALLBACK_MS,
81
- );
82
- const easing = readCssCustomProperty(
83
- SHELL_NAV_REVEAL_EASING_VAR,
84
- SHELL_NAV_REVEAL_EASING_FALLBACK,
85
- );
86
- const keyframes = {
87
- clipPath: [
88
- `circle(0px at ${origin.x}px ${origin.y}px)`,
89
- `circle(${origin.maxRadius}px at ${origin.x}px ${origin.y}px)`,
90
- ],
91
- };
92
- const options = {
93
- duration,
94
- easing,
95
- fill: 'forwards' as const,
96
- };
97
-
98
- document.documentElement.animate(keyframes, {
99
- ...options,
100
- pseudoElement: '::view-transition-new(root)',
101
- });
102
- document.documentElement.animate(keyframes, {
103
- ...options,
104
- pseudoElement: `::view-transition-new(${SHELL_BAR_NAV_VT_NAME})`,
105
- });
106
- }
107
-
108
- /** Run radial reveal when a view transition's `ready` promise settles (app/router driver). */
109
- export function runShellNavStyleRevealOnReady(
110
- transition: { ready: Promise<void> },
111
- originEl?: HTMLElement | null,
112
- ): void {
113
- ensureShellNavVtStyle();
114
- const origin = resolveShellNavRevealOrigin(originEl);
115
- setShellNavRevealOriginVars(origin);
116
-
117
- transition.ready
118
- .then(() => animateShellNavRadialReveal(origin))
119
- .catch(() => {
120
- /* transition skipped or superseded */
121
- });
122
- }