@0001-labs/design-system-1 0.3.0-alpha.28 → 0.3.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 (782) hide show
  1. package/DS1/0-face/button-label.ts +28 -0
  2. package/DS1/0-face/calendar.ts +6 -4
  3. package/DS1/0-face/carousel.ts +70 -0
  4. package/DS1/0-face/constraint-panel.ts +443 -0
  5. package/DS1/0-face/constraint-site.ts +201 -0
  6. package/DS1/0-face/constraints.ts +308 -0
  7. package/DS1/0-face/copy-text.ts +1 -1
  8. package/DS1/0-face/cut-fade.ts +312 -0
  9. package/DS1/0-face/define.ts +30 -2
  10. package/DS1/0-face/face-correction.ts +96 -0
  11. package/DS1/0-face/failures.ts +32 -0
  12. package/DS1/0-face/fault-lines.ts +159 -0
  13. package/DS1/0-face/feedback-overlays.ts +5 -3
  14. package/DS1/0-face/feedback.ts +3 -0
  15. package/DS1/0-face/focus-vision.swift +31 -0
  16. package/DS1/0-face/focus.ts +181 -0
  17. package/DS1/0-face/google-face-metrics.json +102 -0
  18. package/DS1/0-face/grid.ts +61 -4
  19. package/DS1/0-face/i18n.ts +36 -18
  20. package/DS1/0-face/layout-inspector.ts +124 -98
  21. package/DS1/0-face/preference-options.ts +4 -0
  22. package/DS1/0-face/scaling.ts +21 -3
  23. package/DS1/0-face/shape.ts +43 -0
  24. package/DS1/0-face/text-contrast.ts +164 -0
  25. package/DS1/0-face/theme-bootstrap.js +43 -0
  26. package/DS1/0-face/toast-queue.ts +7 -1
  27. package/DS1/0-face/translations/da.json +10 -1
  28. package/DS1/0-face/translations/de.json +10 -1
  29. package/DS1/0-face/translations/en.json +10 -1
  30. package/DS1/0-face/translations/es.json +10 -1
  31. package/DS1/0-face/translations/fi.json +10 -1
  32. package/DS1/0-face/translations/fr.json +10 -1
  33. package/DS1/0-face/translations/is.json +10 -1
  34. package/DS1/0-face/translations/it.json +10 -1
  35. package/DS1/0-face/translations/ja.json +10 -1
  36. package/DS1/0-face/translations/ko.json +10 -1
  37. package/DS1/0-face/translations/nb.json +10 -1
  38. package/DS1/0-face/translations/pt-BR.json +10 -1
  39. package/DS1/0-face/translations/pt.json +10 -1
  40. package/DS1/0-face/translations/sv.json +10 -1
  41. package/DS1/0-face/translations/zh.json +10 -1
  42. package/DS1/0-face/word-wrap.ts +113 -0
  43. package/DS1/1-root/card.css +47 -20
  44. package/DS1/1-root/carousel.css +7 -0
  45. package/DS1/1-root/cjk.css +1 -1
  46. package/DS1/1-root/component-tokens.css +3 -2
  47. package/DS1/1-root/context.css +44 -6
  48. package/DS1/1-root/controls.css +99 -8
  49. package/DS1/1-root/document.css +9 -1
  50. package/DS1/1-root/empty.css +46 -5
  51. package/DS1/1-root/figures.css +50 -3
  52. package/DS1/1-root/fonts.css +1 -1
  53. package/DS1/1-root/footer.css +147 -16
  54. package/DS1/1-root/foundation.ts +60 -0
  55. package/DS1/1-root/guide.css +35 -0
  56. package/DS1/1-root/header.css +30 -9
  57. package/DS1/1-root/material.css +67 -0
  58. package/DS1/1-root/notice.css +10 -2
  59. package/DS1/1-root/one.css +15 -7
  60. package/DS1/1-root/progress.css +9 -1
  61. package/DS1/1-root/row.css +68 -2
  62. package/DS1/1-root/table.css +47 -4
  63. package/DS1/1-root/text.css +26 -0
  64. package/DS1/2-core/button-split.ts +10 -5
  65. package/DS1/2-core/chart/chart.css +71 -2
  66. package/DS1/2-core/chart/grid-chart.ts +2 -1
  67. package/DS1/2-core/ds-activity.ts +32 -0
  68. package/DS1/2-core/ds-app-chrome.ts +1 -0
  69. package/DS1/2-core/ds-avatar.ts +75 -7
  70. package/DS1/2-core/ds-badge.ts +8 -1
  71. package/DS1/2-core/ds-button.ts +7 -1
  72. package/DS1/2-core/ds-chart.ts +184 -49
  73. package/DS1/2-core/ds-cycle.ts +27 -186
  74. package/DS1/2-core/ds-device-bezel.ts +1 -0
  75. package/DS1/2-core/ds-empty.ts +6 -4
  76. package/DS1/2-core/ds-input.ts +23 -3
  77. package/DS1/2-core/ds-message.ts +22 -0
  78. package/DS1/2-core/ds-number.ts +349 -0
  79. package/DS1/2-core/ds-progress.ts +3 -0
  80. package/DS1/2-core/ds-radio.ts +3 -0
  81. package/DS1/2-core/ds-stat.ts +3 -0
  82. package/DS1/2-core/ds-switch.ts +5 -1
  83. package/DS1/2-core/ds-tag.ts +9 -2
  84. package/DS1/2-core/ds-text.ts +7 -0
  85. package/DS1/2-core/ds-token.ts +3 -0
  86. package/DS1/2-core/ds-tooltip.ts +17 -2
  87. package/DS1/2-core/ds-window.ts +1 -0
  88. package/DS1/2-core/generated/ds-icon-map.ts +47 -5
  89. package/DS1/2-core/generated/icons-extra.ts +24 -3
  90. package/DS1/2-core/generated/icons-immediate.ts +3 -3
  91. package/DS1/2-core/number-expression.ts +64 -0
  92. package/DS1/2-core/styles/ds-activity.css +16 -0
  93. package/DS1/2-core/styles/ds-badge.css +4 -1
  94. package/DS1/2-core/styles/ds-button-host.css +47 -13
  95. package/DS1/2-core/styles/ds-button-split.css +8 -0
  96. package/DS1/2-core/styles/ds-button.css +94 -20
  97. package/DS1/2-core/styles/ds-card.css +6 -0
  98. package/DS1/2-core/styles/ds-checkbox.css +20 -8
  99. package/DS1/2-core/styles/ds-image.css +2 -1
  100. package/DS1/2-core/styles/ds-input.css +37 -4
  101. package/DS1/2-core/styles/ds-number.css +127 -0
  102. package/DS1/2-core/styles/ds-radio.css +4 -1
  103. package/DS1/2-core/styles/ds-switch.css +34 -4
  104. package/DS1/2-core/styles/ds-tag.css +34 -6
  105. package/DS1/2-core/styles/ds-text.css +13 -4
  106. package/DS1/2-core/styles/ds-token.css +4 -1
  107. package/DS1/2-core/styles/ds-tooltip.css +13 -7
  108. package/DS1/3-unit/calendar-base.ts +5 -2
  109. package/DS1/3-unit/context-trigger.ts +29 -2
  110. package/DS1/3-unit/ds-calendar.ts +711 -37
  111. package/DS1/3-unit/ds-carousel.ts +13 -1
  112. package/DS1/3-unit/ds-context.ts +40 -2
  113. package/DS1/3-unit/ds-form.ts +47 -11
  114. package/DS1/3-unit/ds-list.ts +31 -3
  115. package/DS1/3-unit/ds-matrix.ts +3 -0
  116. package/DS1/3-unit/ds-menu.ts +9 -5
  117. package/DS1/3-unit/ds-row.ts +17 -2
  118. package/DS1/3-unit/ds-select.ts +1 -1
  119. package/DS1/3-unit/ds-sidebar.ts +18 -3
  120. package/DS1/3-unit/ds-table-of-contents.ts +166 -0
  121. package/DS1/3-unit/ds-table.ts +2 -1
  122. package/DS1/3-unit/ds-tabs.ts +40 -2
  123. package/DS1/3-unit/styles/ds-calendar.css +356 -42
  124. package/DS1/3-unit/styles/ds-context.css +38 -0
  125. package/DS1/3-unit/styles/ds-list.css +26 -1
  126. package/DS1/3-unit/styles/ds-matrix.css +4 -1
  127. package/DS1/3-unit/styles/ds-row.css +39 -0
  128. package/DS1/3-unit/styles/ds-select.css +22 -12
  129. package/DS1/3-unit/styles/ds-sidebar.css +16 -2
  130. package/DS1/3-unit/styles/ds-table-of-contents.css +40 -0
  131. package/DS1/3-unit/styles/ds-tabs.css +95 -0
  132. package/DS1/4-page/ds-container.ts +2 -1
  133. package/DS1/4-page/ds-document.ts +3 -0
  134. package/DS1/4-page/ds-footer.ts +93 -18
  135. package/DS1/4-page/ds-header.ts +5 -1
  136. package/DS1/4-page/ds-overlay.ts +8 -3
  137. package/DS1/4-page/ds-page.ts +22 -1
  138. package/DS1/4-page/email.ts +7 -4
  139. package/DS1/4-page/styles/ds-container.css +0 -1
  140. package/DS1/4-page/styles/ds-overlay.css +7 -0
  141. package/DS1/4-page/styles/ds-page.css +10 -0
  142. package/DS1/5-visual-kit/app-chrome.ts +129 -0
  143. package/DS1/5-visual-kit/bezels.ts +394 -0
  144. package/DS1/5-visual-kit/browser-icons.LICENSE +53 -0
  145. package/DS1/5-visual-kit/browser-icons.ts +47 -0
  146. package/DS1/5-visual-kit/browser-styles.ts +53 -0
  147. package/DS1/5-visual-kit/device-bezel.ts +55 -0
  148. package/DS1/5-visual-kit/instagram-frame.ts +15 -0
  149. package/DS1/5-visual-kit/instagram.ts +41 -0
  150. package/DS1/5-visual-kit/mobile-chrome.ts +25 -0
  151. package/DS1/5-visual-kit/native-icon-paths.ts +145 -0
  152. package/DS1/5-visual-kit/window.ts +22 -0
  153. package/DS1/components.ts +1 -0
  154. package/DS1/index.ts +14 -1
  155. package/DS1/react/choice.ts +4 -2
  156. package/DS1/react/context.ts +11 -6
  157. package/DS1/react/empty.ts +2 -2
  158. package/DS1/react/footer.ts +5 -5
  159. package/DS1/react/header.ts +1 -1
  160. package/DS1/react/message.ts +4 -2
  161. package/DS1/react/number.ts +53 -0
  162. package/DS1/react/sidebar.ts +4 -2
  163. package/DS1/react/table-of-contents.ts +28 -0
  164. package/DS1/x-flag/LICENSE.md +26 -0
  165. package/DS1/x-flag/ac.svg +1 -0
  166. package/DS1/x-flag/ad.svg +1 -0
  167. package/DS1/x-flag/ae.svg +1 -0
  168. package/DS1/x-flag/af.svg +1 -0
  169. package/DS1/x-flag/ag.svg +1 -0
  170. package/DS1/x-flag/ai.svg +1 -0
  171. package/DS1/x-flag/al.svg +1 -0
  172. package/DS1/x-flag/am.svg +1 -0
  173. package/DS1/x-flag/ao.svg +1 -0
  174. package/DS1/x-flag/aq.svg +1 -0
  175. package/DS1/x-flag/ar.svg +1 -0
  176. package/DS1/x-flag/as.svg +1 -0
  177. package/DS1/x-flag/at.svg +1 -0
  178. package/DS1/x-flag/au.svg +1 -0
  179. package/DS1/x-flag/aw.svg +1 -0
  180. package/DS1/x-flag/ax.svg +1 -0
  181. package/DS1/x-flag/az.svg +1 -0
  182. package/DS1/x-flag/ba.svg +1 -0
  183. package/DS1/x-flag/bb.svg +1 -0
  184. package/DS1/x-flag/bd.svg +1 -0
  185. package/DS1/x-flag/be.svg +1 -0
  186. package/DS1/x-flag/bf.svg +1 -0
  187. package/DS1/x-flag/bg.svg +1 -0
  188. package/DS1/x-flag/bh.svg +1 -0
  189. package/DS1/x-flag/bi.svg +1 -0
  190. package/DS1/x-flag/bj.svg +1 -0
  191. package/DS1/x-flag/bl.svg +1 -0
  192. package/DS1/x-flag/bm.svg +1 -0
  193. package/DS1/x-flag/bn.svg +1 -0
  194. package/DS1/x-flag/bo.svg +1 -0
  195. package/DS1/x-flag/bq-bo.svg +1 -0
  196. package/DS1/x-flag/bq-sa.svg +1 -0
  197. package/DS1/x-flag/bq-se.svg +1 -0
  198. package/DS1/x-flag/bq.svg +1 -0
  199. package/DS1/x-flag/br.svg +1 -0
  200. package/DS1/x-flag/bs.svg +1 -0
  201. package/DS1/x-flag/bt.svg +1 -0
  202. package/DS1/x-flag/bv.svg +1 -0
  203. package/DS1/x-flag/bw.svg +1 -0
  204. package/DS1/x-flag/by.svg +1 -0
  205. package/DS1/x-flag/bz.svg +1 -0
  206. package/DS1/x-flag/ca.svg +1 -0
  207. package/DS1/x-flag/cc.svg +1 -0
  208. package/DS1/x-flag/cd.svg +1 -0
  209. package/DS1/x-flag/cf.svg +1 -0
  210. package/DS1/x-flag/cg.svg +1 -0
  211. package/DS1/x-flag/ch.svg +1 -0
  212. package/DS1/x-flag/ci.svg +1 -0
  213. package/DS1/x-flag/ck.svg +1 -0
  214. package/DS1/x-flag/cl.svg +1 -0
  215. package/DS1/x-flag/cm.svg +1 -0
  216. package/DS1/x-flag/cn.svg +1 -0
  217. package/DS1/x-flag/co.svg +1 -0
  218. package/DS1/x-flag/cr.svg +1 -0
  219. package/DS1/x-flag/cu.svg +1 -0
  220. package/DS1/x-flag/cv.svg +1 -0
  221. package/DS1/x-flag/cw.svg +1 -0
  222. package/DS1/x-flag/cx.svg +1 -0
  223. package/DS1/x-flag/cy.svg +1 -0
  224. package/DS1/x-flag/cz.svg +1 -0
  225. package/DS1/x-flag/de.svg +1 -0
  226. package/DS1/x-flag/dj.svg +1 -0
  227. package/DS1/x-flag/dk.svg +1 -0
  228. package/DS1/x-flag/dm.svg +1 -0
  229. package/DS1/x-flag/do.svg +1 -0
  230. package/DS1/x-flag/dz.svg +1 -0
  231. package/DS1/x-flag/ec.svg +1 -0
  232. package/DS1/x-flag/ee.svg +1 -0
  233. package/DS1/x-flag/eg.svg +1 -0
  234. package/DS1/x-flag/eh.svg +1 -0
  235. package/DS1/x-flag/er.svg +1 -0
  236. package/DS1/x-flag/es-ct.svg +1 -0
  237. package/DS1/x-flag/es.svg +1 -0
  238. package/DS1/x-flag/et.svg +1 -0
  239. package/DS1/x-flag/eu.svg +1 -0
  240. package/DS1/x-flag/fi.svg +1 -0
  241. package/DS1/x-flag/fj.svg +1 -0
  242. package/DS1/x-flag/fk.svg +1 -0
  243. package/DS1/x-flag/fm.svg +1 -0
  244. package/DS1/x-flag/fo.svg +1 -0
  245. package/DS1/x-flag/fr.svg +1 -0
  246. package/DS1/x-flag/ga.svg +1 -0
  247. package/DS1/x-flag/gb-eng.svg +1 -0
  248. package/DS1/x-flag/gb-nir.svg +1 -0
  249. package/DS1/x-flag/gb-sct.svg +1 -0
  250. package/DS1/x-flag/gb-wls.svg +1 -0
  251. package/DS1/x-flag/gb.svg +1 -0
  252. package/DS1/x-flag/gd.svg +1 -0
  253. package/DS1/x-flag/ge.svg +1 -0
  254. package/DS1/x-flag/gf.svg +1 -0
  255. package/DS1/x-flag/gg.svg +1 -0
  256. package/DS1/x-flag/gh.svg +1 -0
  257. package/DS1/x-flag/gi.svg +1 -0
  258. package/DS1/x-flag/gl.svg +1 -0
  259. package/DS1/x-flag/gm.svg +1 -0
  260. package/DS1/x-flag/gn.svg +1 -0
  261. package/DS1/x-flag/gp.svg +1 -0
  262. package/DS1/x-flag/gq.svg +1 -0
  263. package/DS1/x-flag/gr.svg +1 -0
  264. package/DS1/x-flag/gs.svg +1 -0
  265. package/DS1/x-flag/gt.svg +1 -0
  266. package/DS1/x-flag/gu.svg +1 -0
  267. package/DS1/x-flag/gw.svg +1 -0
  268. package/DS1/x-flag/gy.svg +1 -0
  269. package/DS1/x-flag/hk.svg +1 -0
  270. package/DS1/x-flag/hm.svg +1 -0
  271. package/DS1/x-flag/hn.svg +1 -0
  272. package/DS1/x-flag/hr.svg +1 -0
  273. package/DS1/x-flag/ht.svg +1 -0
  274. package/DS1/x-flag/hu.svg +1 -0
  275. package/DS1/x-flag/ic.svg +1 -0
  276. package/DS1/x-flag/id.svg +1 -0
  277. package/DS1/x-flag/ie.svg +1 -0
  278. package/DS1/x-flag/il.svg +1 -0
  279. package/DS1/x-flag/im.svg +1 -0
  280. package/DS1/x-flag/in.svg +1 -0
  281. package/DS1/x-flag/io.svg +1 -0
  282. package/DS1/x-flag/iq.svg +1 -0
  283. package/DS1/x-flag/ir.svg +1 -0
  284. package/DS1/x-flag/is.svg +1 -0
  285. package/DS1/x-flag/it.svg +1 -0
  286. package/DS1/x-flag/je.svg +1 -0
  287. package/DS1/x-flag/jm.svg +1 -0
  288. package/DS1/x-flag/jo.svg +1 -0
  289. package/DS1/x-flag/jp.svg +1 -0
  290. package/DS1/x-flag/ke.svg +1 -0
  291. package/DS1/x-flag/kg.svg +1 -0
  292. package/DS1/x-flag/kh.svg +1 -0
  293. package/DS1/x-flag/ki.svg +1 -0
  294. package/DS1/x-flag/km.svg +1 -0
  295. package/DS1/x-flag/kn.svg +1 -0
  296. package/DS1/x-flag/kp.svg +1 -0
  297. package/DS1/x-flag/kr.svg +1 -0
  298. package/DS1/x-flag/kw.svg +1 -0
  299. package/DS1/x-flag/ky.svg +1 -0
  300. package/DS1/x-flag/kz.svg +1 -0
  301. package/DS1/x-flag/la.svg +1 -0
  302. package/DS1/x-flag/lb.svg +1 -0
  303. package/DS1/x-flag/lc.svg +1 -0
  304. package/DS1/x-flag/li.svg +1 -0
  305. package/DS1/x-flag/lk.svg +1 -0
  306. package/DS1/x-flag/lr.svg +1 -0
  307. package/DS1/x-flag/ls.svg +1 -0
  308. package/DS1/x-flag/lt.svg +1 -0
  309. package/DS1/x-flag/lu.svg +1 -0
  310. package/DS1/x-flag/lv.svg +1 -0
  311. package/DS1/x-flag/ly.svg +1 -0
  312. package/DS1/x-flag/ma.svg +1 -0
  313. package/DS1/x-flag/mc.svg +1 -0
  314. package/DS1/x-flag/md.svg +1 -0
  315. package/DS1/x-flag/me.svg +1 -0
  316. package/DS1/x-flag/mf.svg +1 -0
  317. package/DS1/x-flag/mg.svg +1 -0
  318. package/DS1/x-flag/mh.svg +1 -0
  319. package/DS1/x-flag/mk.svg +1 -0
  320. package/DS1/x-flag/ml.svg +1 -0
  321. package/DS1/x-flag/mm.svg +1 -0
  322. package/DS1/x-flag/mn.svg +1 -0
  323. package/DS1/x-flag/mo.svg +1 -0
  324. package/DS1/x-flag/mp.svg +1 -0
  325. package/DS1/x-flag/mq.svg +1 -0
  326. package/DS1/x-flag/mr.svg +1 -0
  327. package/DS1/x-flag/ms.svg +1 -0
  328. package/DS1/x-flag/mt.svg +1 -0
  329. package/DS1/x-flag/mu.svg +1 -0
  330. package/DS1/x-flag/mv.svg +1 -0
  331. package/DS1/x-flag/mw.svg +1 -0
  332. package/DS1/x-flag/mx.svg +1 -0
  333. package/DS1/x-flag/my.svg +1 -0
  334. package/DS1/x-flag/mz.svg +1 -0
  335. package/DS1/x-flag/na.svg +1 -0
  336. package/DS1/x-flag/nc.svg +1 -0
  337. package/DS1/x-flag/ne.svg +1 -0
  338. package/DS1/x-flag/nf.svg +1 -0
  339. package/DS1/x-flag/ng.svg +1 -0
  340. package/DS1/x-flag/ni.svg +1 -0
  341. package/DS1/x-flag/nl.svg +1 -0
  342. package/DS1/x-flag/no.svg +1 -0
  343. package/DS1/x-flag/np.svg +1 -0
  344. package/DS1/x-flag/nr.svg +1 -0
  345. package/DS1/x-flag/nu.svg +1 -0
  346. package/DS1/x-flag/nz.svg +1 -0
  347. package/DS1/x-flag/om.svg +1 -0
  348. package/DS1/x-flag/pa.svg +1 -0
  349. package/DS1/x-flag/pe.svg +1 -0
  350. package/DS1/x-flag/pf.svg +1 -0
  351. package/DS1/x-flag/pg.svg +1 -0
  352. package/DS1/x-flag/ph.svg +1 -0
  353. package/DS1/x-flag/pk.svg +1 -0
  354. package/DS1/x-flag/pl.svg +1 -0
  355. package/DS1/x-flag/pm.svg +1 -0
  356. package/DS1/x-flag/pn.svg +1 -0
  357. package/DS1/x-flag/pr.svg +1 -0
  358. package/DS1/x-flag/ps.svg +1 -0
  359. package/DS1/x-flag/pt.svg +1 -0
  360. package/DS1/x-flag/pw.svg +1 -0
  361. package/DS1/x-flag/py.svg +1 -0
  362. package/DS1/x-flag/qa.svg +1 -0
  363. package/DS1/x-flag/re.svg +1 -0
  364. package/DS1/x-flag/ro.svg +1 -0
  365. package/DS1/x-flag/rs.svg +1 -0
  366. package/DS1/x-flag/ru.svg +1 -0
  367. package/DS1/x-flag/rw.svg +1 -0
  368. package/DS1/x-flag/sa.svg +1 -0
  369. package/DS1/x-flag/sb.svg +1 -0
  370. package/DS1/x-flag/sc.svg +1 -0
  371. package/DS1/x-flag/sd.svg +1 -0
  372. package/DS1/x-flag/se.svg +1 -0
  373. package/DS1/x-flag/sg.svg +1 -0
  374. package/DS1/x-flag/sh.svg +1 -0
  375. package/DS1/x-flag/si.svg +1 -0
  376. package/DS1/x-flag/sj.svg +1 -0
  377. package/DS1/x-flag/sk.svg +1 -0
  378. package/DS1/x-flag/sl.svg +1 -0
  379. package/DS1/x-flag/sm.svg +1 -0
  380. package/DS1/x-flag/sn.svg +1 -0
  381. package/DS1/x-flag/so.svg +1 -0
  382. package/DS1/x-flag/sr.svg +1 -0
  383. package/DS1/x-flag/ss.svg +1 -0
  384. package/DS1/x-flag/st.svg +1 -0
  385. package/DS1/x-flag/sv.svg +1 -0
  386. package/DS1/x-flag/sx.svg +1 -0
  387. package/DS1/x-flag/sy.svg +1 -0
  388. package/DS1/x-flag/sz.svg +1 -0
  389. package/DS1/x-flag/ta.svg +1 -0
  390. package/DS1/x-flag/tc.svg +1 -0
  391. package/DS1/x-flag/td.svg +1 -0
  392. package/DS1/x-flag/tf.svg +1 -0
  393. package/DS1/x-flag/tg.svg +1 -0
  394. package/DS1/x-flag/th.svg +1 -0
  395. package/DS1/x-flag/tj.svg +1 -0
  396. package/DS1/x-flag/tk.svg +1 -0
  397. package/DS1/x-flag/tl.svg +1 -0
  398. package/DS1/x-flag/tm.svg +1 -0
  399. package/DS1/x-flag/tn.svg +1 -0
  400. package/DS1/x-flag/to.svg +1 -0
  401. package/DS1/x-flag/tr.svg +1 -0
  402. package/DS1/x-flag/tt.svg +1 -0
  403. package/DS1/x-flag/tv.svg +1 -0
  404. package/DS1/x-flag/tw.svg +1 -0
  405. package/DS1/x-flag/tz.svg +1 -0
  406. package/DS1/x-flag/ua.svg +1 -0
  407. package/DS1/x-flag/ug.svg +1 -0
  408. package/DS1/x-flag/um.svg +1 -0
  409. package/DS1/x-flag/us.svg +1 -0
  410. package/DS1/x-flag/uy.svg +1 -0
  411. package/DS1/x-flag/uz.svg +1 -0
  412. package/DS1/x-flag/va.svg +1 -0
  413. package/DS1/x-flag/vc.svg +1 -0
  414. package/DS1/x-flag/ve.svg +1 -0
  415. package/DS1/x-flag/vg.svg +1 -0
  416. package/DS1/x-flag/vi.svg +1 -0
  417. package/DS1/x-flag/vn.svg +1 -0
  418. package/DS1/x-flag/vu.svg +1 -0
  419. package/DS1/x-flag/wf.svg +1 -0
  420. package/DS1/x-flag/ws.svg +1 -0
  421. package/DS1/x-flag/xk.svg +1 -0
  422. package/DS1/x-flag/ye.svg +1 -0
  423. package/DS1/x-flag/yt.svg +1 -0
  424. package/DS1/x-flag/za.svg +1 -0
  425. package/DS1/x-flag/zm.svg +1 -0
  426. package/DS1/x-flag/zw.svg +1 -0
  427. package/DS1/x-icon/android.svg +9 -0
  428. package/DS1/x-icon/arrange-check.svg +1 -1
  429. package/DS1/x-icon/arrange-page.svg +1 -1
  430. package/DS1/x-icon/chrome.svg +7 -0
  431. package/DS1/x-icon/edge-brand.svg +6 -0
  432. package/DS1/x-icon/firefox.svg +4 -0
  433. package/DS1/x-icon/health.svg +3 -0
  434. package/DS1/x-icon/left.svg +2 -3
  435. package/DS1/x-icon/linux.svg +1 -0
  436. package/DS1/x-icon/material.svg +1 -0
  437. package/DS1/x-icon/milestone-planned.svg +3 -0
  438. package/DS1/x-icon/milestone.svg +3 -0
  439. package/DS1/x-icon/more.svg +1 -5
  440. package/DS1/x-icon/network.svg +3 -0
  441. package/DS1/x-icon/opera.svg +4 -0
  442. package/DS1/x-icon/prediction.svg +3 -0
  443. package/DS1/x-icon/priority-high.svg +3 -0
  444. package/DS1/x-icon/priority-low.svg +3 -0
  445. package/DS1/x-icon/priority-medium.svg +3 -0
  446. package/DS1/x-icon/project.svg +3 -0
  447. package/DS1/x-icon/redo.svg +2 -2
  448. package/DS1/x-icon/repeat-small.svg +3 -0
  449. package/DS1/x-icon/safari.svg +4 -0
  450. package/DS1/x-icon/scaling.svg +3 -0
  451. package/DS1/x-icon/tabs.svg +4 -0
  452. package/DS1/x-icon/windows.svg +5 -0
  453. package/README.md +3 -3
  454. package/dist/0-face/button-label.d.ts +5 -0
  455. package/dist/0-face/button-label.d.ts.map +1 -0
  456. package/dist/0-face/button-label.js +31 -0
  457. package/dist/0-face/calendar.d.ts +1 -1
  458. package/dist/0-face/calendar.d.ts.map +1 -1
  459. package/dist/0-face/calendar.js +6 -3
  460. package/dist/0-face/carousel.d.ts +9 -0
  461. package/dist/0-face/carousel.d.ts.map +1 -1
  462. package/dist/0-face/carousel.js +80 -0
  463. package/dist/0-face/constraint-panel.d.ts +43 -0
  464. package/dist/0-face/constraint-panel.d.ts.map +1 -0
  465. package/dist/0-face/constraint-panel.js +451 -0
  466. package/dist/0-face/constraint-site.d.ts +73 -0
  467. package/dist/0-face/constraint-site.d.ts.map +1 -0
  468. package/dist/0-face/constraint-site.js +186 -0
  469. package/dist/0-face/constraints.d.ts +47 -0
  470. package/dist/0-face/constraints.d.ts.map +1 -0
  471. package/dist/0-face/constraints.js +274 -0
  472. package/dist/0-face/copy-text.js +1 -1
  473. package/dist/0-face/cut-fade.d.ts +112 -0
  474. package/dist/0-face/cut-fade.d.ts.map +1 -0
  475. package/dist/0-face/cut-fade.js +274 -0
  476. package/dist/0-face/define.d.ts.map +1 -1
  477. package/dist/0-face/define.js +24 -3
  478. package/dist/0-face/face-correction.d.ts +51 -0
  479. package/dist/0-face/face-correction.d.ts.map +1 -0
  480. package/dist/0-face/face-correction.js +80 -0
  481. package/dist/0-face/failures.d.ts +16 -0
  482. package/dist/0-face/failures.d.ts.map +1 -0
  483. package/dist/0-face/failures.js +21 -0
  484. package/dist/0-face/fault-lines.d.ts +20 -0
  485. package/dist/0-face/fault-lines.d.ts.map +1 -0
  486. package/dist/0-face/fault-lines.js +172 -0
  487. package/dist/0-face/feedback-overlays.d.ts.map +1 -1
  488. package/dist/0-face/feedback-overlays.js +5 -3
  489. package/dist/0-face/feedback.d.ts +2 -0
  490. package/dist/0-face/feedback.d.ts.map +1 -1
  491. package/dist/0-face/feedback.js +1 -0
  492. package/dist/0-face/focus.d.ts +71 -0
  493. package/dist/0-face/focus.d.ts.map +1 -0
  494. package/dist/0-face/focus.js +196 -0
  495. package/dist/0-face/grid.d.ts +11 -1
  496. package/dist/0-face/grid.d.ts.map +1 -1
  497. package/dist/0-face/grid.js +90 -4
  498. package/dist/0-face/i18n.d.ts.map +1 -1
  499. package/dist/0-face/i18n.js +38 -16
  500. package/dist/0-face/layout-inspector.d.ts +5 -1
  501. package/dist/0-face/layout-inspector.d.ts.map +1 -1
  502. package/dist/0-face/layout-inspector.js +130 -104
  503. package/dist/0-face/preference-options.d.ts +4 -0
  504. package/dist/0-face/preference-options.d.ts.map +1 -1
  505. package/dist/0-face/scaling.d.ts +8 -1
  506. package/dist/0-face/scaling.d.ts.map +1 -1
  507. package/dist/0-face/scaling.js +19 -2
  508. package/dist/0-face/shape.d.ts +35 -0
  509. package/dist/0-face/shape.d.ts.map +1 -0
  510. package/dist/0-face/shape.js +23 -0
  511. package/dist/0-face/text-contrast.d.ts +22 -0
  512. package/dist/0-face/text-contrast.d.ts.map +1 -0
  513. package/dist/0-face/text-contrast.js +178 -0
  514. package/dist/0-face/theme-bootstrap.js +56 -0
  515. package/dist/0-face/toast-queue.d.ts +4 -0
  516. package/dist/0-face/toast-queue.d.ts.map +1 -1
  517. package/dist/0-face/toast-queue.js +4 -1
  518. package/dist/0-face/translations/da.json +10 -1
  519. package/dist/0-face/translations/de.json +10 -1
  520. package/dist/0-face/translations/en.json +10 -1
  521. package/dist/0-face/translations/es.json +10 -1
  522. package/dist/0-face/translations/fi.json +10 -1
  523. package/dist/0-face/translations/fr.json +10 -1
  524. package/dist/0-face/translations/is.json +10 -1
  525. package/dist/0-face/translations/it.json +10 -1
  526. package/dist/0-face/translations/ja.json +10 -1
  527. package/dist/0-face/translations/ko.json +10 -1
  528. package/dist/0-face/translations/nb.json +10 -1
  529. package/dist/0-face/translations/pt-BR.json +10 -1
  530. package/dist/0-face/translations/pt.json +10 -1
  531. package/dist/0-face/translations/sv.json +10 -1
  532. package/dist/0-face/translations/zh.json +10 -1
  533. package/dist/0-face/word-wrap.d.ts +6 -0
  534. package/dist/0-face/word-wrap.d.ts.map +1 -0
  535. package/dist/0-face/word-wrap.js +119 -0
  536. package/dist/1-root/foundation.d.ts +12 -0
  537. package/dist/1-root/foundation.d.ts.map +1 -0
  538. package/dist/1-root/foundation.js +59 -0
  539. package/dist/2-core/button-split.d.ts +1 -0
  540. package/dist/2-core/button-split.d.ts.map +1 -1
  541. package/dist/2-core/button-split.js +9 -4
  542. package/dist/2-core/chart/grid-chart.d.ts +2 -0
  543. package/dist/2-core/chart/grid-chart.d.ts.map +1 -1
  544. package/dist/2-core/chart/grid-chart.js +2 -1
  545. package/dist/2-core/ds-activity.d.ts +25 -0
  546. package/dist/2-core/ds-activity.d.ts.map +1 -0
  547. package/dist/2-core/ds-activity.js +28 -0
  548. package/dist/2-core/ds-app-chrome.d.ts +2 -0
  549. package/dist/2-core/ds-app-chrome.d.ts.map +1 -0
  550. package/dist/2-core/ds-app-chrome.js +1 -0
  551. package/dist/2-core/ds-avatar.d.ts +12 -0
  552. package/dist/2-core/ds-avatar.d.ts.map +1 -1
  553. package/dist/2-core/ds-avatar.js +86 -7
  554. package/dist/2-core/ds-badge.d.ts +7 -1
  555. package/dist/2-core/ds-badge.d.ts.map +1 -1
  556. package/dist/2-core/ds-badge.js +8 -1
  557. package/dist/2-core/ds-button.d.ts +12 -0
  558. package/dist/2-core/ds-button.d.ts.map +1 -1
  559. package/dist/2-core/ds-button.js +4 -0
  560. package/dist/2-core/ds-chart.d.ts +28 -3
  561. package/dist/2-core/ds-chart.d.ts.map +1 -1
  562. package/dist/2-core/ds-chart.js +110 -130
  563. package/dist/2-core/ds-cycle.d.ts +2 -2
  564. package/dist/2-core/ds-cycle.d.ts.map +1 -1
  565. package/dist/2-core/ds-cycle.js +36 -171
  566. package/dist/2-core/ds-device-bezel.d.ts +2 -0
  567. package/dist/2-core/ds-device-bezel.d.ts.map +1 -0
  568. package/dist/2-core/ds-device-bezel.js +1 -0
  569. package/dist/2-core/ds-empty.d.ts +2 -2
  570. package/dist/2-core/ds-empty.d.ts.map +1 -1
  571. package/dist/2-core/ds-empty.js +6 -4
  572. package/dist/2-core/ds-input.d.ts +7 -0
  573. package/dist/2-core/ds-input.d.ts.map +1 -1
  574. package/dist/2-core/ds-input.js +23 -3
  575. package/dist/2-core/ds-message.d.ts +11 -0
  576. package/dist/2-core/ds-message.d.ts.map +1 -1
  577. package/dist/2-core/ds-message.js +18 -0
  578. package/dist/2-core/ds-number.d.ts +86 -0
  579. package/dist/2-core/ds-number.d.ts.map +1 -0
  580. package/dist/2-core/ds-number.js +326 -0
  581. package/dist/2-core/ds-progress.d.ts +3 -0
  582. package/dist/2-core/ds-progress.d.ts.map +1 -1
  583. package/dist/2-core/ds-progress.js +3 -0
  584. package/dist/2-core/ds-radio.d.ts +3 -0
  585. package/dist/2-core/ds-radio.d.ts.map +1 -1
  586. package/dist/2-core/ds-radio.js +10 -1
  587. package/dist/2-core/ds-stat.d.ts +3 -0
  588. package/dist/2-core/ds-stat.d.ts.map +1 -1
  589. package/dist/2-core/ds-stat.js +3 -0
  590. package/dist/2-core/ds-switch.d.ts +14 -1
  591. package/dist/2-core/ds-switch.d.ts.map +1 -1
  592. package/dist/2-core/ds-switch.js +3 -1
  593. package/dist/2-core/ds-tag.d.ts +8 -1
  594. package/dist/2-core/ds-tag.d.ts.map +1 -1
  595. package/dist/2-core/ds-tag.js +12 -2
  596. package/dist/2-core/ds-text.d.ts +7 -0
  597. package/dist/2-core/ds-text.d.ts.map +1 -1
  598. package/dist/2-core/ds-text.js +7 -0
  599. package/dist/2-core/ds-token.d.ts +3 -0
  600. package/dist/2-core/ds-token.d.ts.map +1 -1
  601. package/dist/2-core/ds-token.js +3 -0
  602. package/dist/2-core/ds-tooltip.d.ts.map +1 -1
  603. package/dist/2-core/ds-tooltip.js +23 -2
  604. package/dist/2-core/ds-window.d.ts +2 -0
  605. package/dist/2-core/ds-window.d.ts.map +1 -0
  606. package/dist/2-core/ds-window.js +1 -0
  607. package/dist/2-core/generated/ds-icon-map.d.ts +27 -6
  608. package/dist/2-core/generated/ds-icon-map.d.ts.map +1 -1
  609. package/dist/2-core/generated/ds-icon-map.js +47 -5
  610. package/dist/2-core/generated/icons-extra.d.ts.map +1 -1
  611. package/dist/2-core/generated/icons-extra.js +24 -3
  612. package/dist/2-core/generated/icons-immediate.d.ts +1 -1
  613. package/dist/2-core/generated/icons-immediate.d.ts.map +1 -1
  614. package/dist/2-core/generated/icons-immediate.js +3 -3
  615. package/dist/2-core/number-expression.d.ts +12 -0
  616. package/dist/2-core/number-expression.d.ts.map +1 -0
  617. package/dist/2-core/number-expression.js +82 -0
  618. package/dist/3-unit/calendar-base.d.ts +5 -0
  619. package/dist/3-unit/calendar-base.d.ts.map +1 -1
  620. package/dist/3-unit/calendar-base.js +3 -2
  621. package/dist/3-unit/context-trigger.d.ts.map +1 -1
  622. package/dist/3-unit/context-trigger.js +32 -2
  623. package/dist/3-unit/ds-calendar.d.ts +197 -4
  624. package/dist/3-unit/ds-calendar.d.ts.map +1 -1
  625. package/dist/3-unit/ds-calendar.js +687 -45
  626. package/dist/3-unit/ds-carousel.d.ts +3 -0
  627. package/dist/3-unit/ds-carousel.d.ts.map +1 -1
  628. package/dist/3-unit/ds-carousel.js +13 -1
  629. package/dist/3-unit/ds-context.d.ts +18 -1
  630. package/dist/3-unit/ds-context.d.ts.map +1 -1
  631. package/dist/3-unit/ds-context.js +37 -1
  632. package/dist/3-unit/ds-form.d.ts +9 -0
  633. package/dist/3-unit/ds-form.d.ts.map +1 -1
  634. package/dist/3-unit/ds-form.js +52 -11
  635. package/dist/3-unit/ds-list.d.ts +20 -1
  636. package/dist/3-unit/ds-list.d.ts.map +1 -1
  637. package/dist/3-unit/ds-list.js +31 -3
  638. package/dist/3-unit/ds-matrix.d.ts +3 -0
  639. package/dist/3-unit/ds-matrix.d.ts.map +1 -1
  640. package/dist/3-unit/ds-matrix.js +3 -0
  641. package/dist/3-unit/ds-menu.d.ts.map +1 -1
  642. package/dist/3-unit/ds-menu.js +17 -1
  643. package/dist/3-unit/ds-row.d.ts +13 -0
  644. package/dist/3-unit/ds-row.d.ts.map +1 -1
  645. package/dist/3-unit/ds-row.js +15 -2
  646. package/dist/3-unit/ds-select.js +1 -1
  647. package/dist/3-unit/ds-sidebar.d.ts +17 -0
  648. package/dist/3-unit/ds-sidebar.d.ts.map +1 -1
  649. package/dist/3-unit/ds-sidebar.js +14 -3
  650. package/dist/3-unit/ds-table-of-contents.d.ts +68 -0
  651. package/dist/3-unit/ds-table-of-contents.d.ts.map +1 -0
  652. package/dist/3-unit/ds-table-of-contents.js +190 -0
  653. package/dist/3-unit/ds-table.d.ts.map +1 -1
  654. package/dist/3-unit/ds-table.js +2 -1
  655. package/dist/3-unit/ds-tabs.d.ts +32 -1
  656. package/dist/3-unit/ds-tabs.d.ts.map +1 -1
  657. package/dist/3-unit/ds-tabs.js +39 -1
  658. package/dist/4-page/ds-container.d.ts.map +1 -1
  659. package/dist/4-page/ds-container.js +2 -1
  660. package/dist/4-page/ds-document.d.ts +3 -0
  661. package/dist/4-page/ds-document.d.ts.map +1 -1
  662. package/dist/4-page/ds-document.js +3 -0
  663. package/dist/4-page/ds-footer.d.ts +47 -7
  664. package/dist/4-page/ds-footer.d.ts.map +1 -1
  665. package/dist/4-page/ds-footer.js +58 -14
  666. package/dist/4-page/ds-header.d.ts +6 -0
  667. package/dist/4-page/ds-header.d.ts.map +1 -1
  668. package/dist/4-page/ds-header.js +4 -1
  669. package/dist/4-page/ds-overlay.d.ts +2 -2
  670. package/dist/4-page/ds-overlay.d.ts.map +1 -1
  671. package/dist/4-page/ds-overlay.js +8 -3
  672. package/dist/4-page/ds-page.d.ts +12 -0
  673. package/dist/4-page/ds-page.d.ts.map +1 -1
  674. package/dist/4-page/ds-page.js +19 -1
  675. package/dist/4-page/email.d.ts +2 -0
  676. package/dist/4-page/email.d.ts.map +1 -1
  677. package/dist/4-page/email.js +5 -4
  678. package/dist/5-visual-kit/app-chrome.d.ts +98 -0
  679. package/dist/5-visual-kit/app-chrome.d.ts.map +1 -0
  680. package/dist/5-visual-kit/app-chrome.js +119 -0
  681. package/dist/5-visual-kit/bezels.d.ts +30 -0
  682. package/dist/5-visual-kit/bezels.d.ts.map +1 -0
  683. package/dist/5-visual-kit/bezels.js +388 -0
  684. package/dist/5-visual-kit/browser-icons.d.ts +5 -0
  685. package/dist/5-visual-kit/browser-icons.d.ts.map +1 -0
  686. package/dist/5-visual-kit/browser-icons.js +51 -0
  687. package/dist/5-visual-kit/browser-styles.d.ts +3 -0
  688. package/dist/5-visual-kit/browser-styles.d.ts.map +1 -0
  689. package/dist/5-visual-kit/browser-styles.js +52 -0
  690. package/dist/5-visual-kit/device-bezel.d.ts +84 -0
  691. package/dist/5-visual-kit/device-bezel.d.ts.map +1 -0
  692. package/dist/5-visual-kit/device-bezel.js +56 -0
  693. package/dist/5-visual-kit/instagram-frame.d.ts +8 -0
  694. package/dist/5-visual-kit/instagram-frame.d.ts.map +1 -0
  695. package/dist/5-visual-kit/instagram-frame.js +13 -0
  696. package/dist/5-visual-kit/instagram.d.ts +18 -0
  697. package/dist/5-visual-kit/instagram.d.ts.map +1 -0
  698. package/dist/5-visual-kit/instagram.js +39 -0
  699. package/dist/5-visual-kit/mobile-chrome.d.ts +4 -0
  700. package/dist/5-visual-kit/mobile-chrome.d.ts.map +1 -0
  701. package/dist/5-visual-kit/mobile-chrome.js +24 -0
  702. package/dist/5-visual-kit/native-icon-paths.d.ts +146 -0
  703. package/dist/5-visual-kit/native-icon-paths.d.ts.map +1 -0
  704. package/dist/5-visual-kit/native-icon-paths.js +145 -0
  705. package/dist/5-visual-kit/window.d.ts +51 -0
  706. package/dist/5-visual-kit/window.d.ts.map +1 -0
  707. package/dist/5-visual-kit/window.js +20 -0
  708. package/dist/browser-icons-BFbS1tIx.js +56 -0
  709. package/dist/browser-icons-BFbS1tIx.js.map +1 -0
  710. package/dist/browser-icons-CT8qU77Z.js +48 -0
  711. package/dist/browser-icons-CT8qU77Z.js.map +1 -0
  712. package/dist/components.d.ts +1 -0
  713. package/dist/components.d.ts.map +1 -1
  714. package/dist/components.js +1 -0
  715. package/dist/design-system-1.bundle.js +5874 -2097
  716. package/dist/design-system-1.bundle.js.map +1 -1
  717. package/dist/design-system-1.bundle.min.js +7332 -4682
  718. package/dist/design-system-1.bundle.min.js.map +1 -1
  719. package/dist/design-system-1.css +1 -1
  720. package/dist/feedback.js +197 -167
  721. package/dist/feedback.js.map +1 -1
  722. package/dist/{icons-extra-CRxxWFjX.js → icons-extra-BMPvmQPI.js} +25 -4
  723. package/dist/icons-extra-BMPvmQPI.js.map +1 -0
  724. package/dist/{icons-extra-H5pqCM_R.js → icons-extra-BfYOw-cR.js} +83 -5
  725. package/dist/icons-extra-BfYOw-cR.js.map +1 -0
  726. package/dist/index.d.ts +12 -1
  727. package/dist/index.d.ts.map +1 -1
  728. package/dist/index.js +11 -1
  729. package/dist/instagram-CKofs55A.js +50 -0
  730. package/dist/instagram-CKofs55A.js.map +1 -0
  731. package/dist/instagram-CcYf5oiM.js +48 -0
  732. package/dist/instagram-CcYf5oiM.js.map +1 -0
  733. package/dist/lit-Ce_uWYM4.js +612 -0
  734. package/dist/lit-Ce_uWYM4.js.map +1 -0
  735. package/dist/lit-DGUVm1Ce.js +557 -0
  736. package/dist/lit-DGUVm1Ce.js.map +1 -0
  737. package/dist/native-icon-paths-CB9evXBM.js +93 -0
  738. package/dist/native-icon-paths-CB9evXBM.js.map +1 -0
  739. package/dist/native-icon-paths-zay-3g_n.js +150 -0
  740. package/dist/native-icon-paths-zay-3g_n.js.map +1 -0
  741. package/dist/react/avatar.d.ts +1 -1
  742. package/dist/react/choice.d.ts +4 -0
  743. package/dist/react/choice.d.ts.map +1 -1
  744. package/dist/react/choice.js +2 -2
  745. package/dist/react/context.d.ts +19 -4
  746. package/dist/react/context.d.ts.map +1 -1
  747. package/dist/react/context.js +4 -4
  748. package/dist/react/empty.d.ts +2 -2
  749. package/dist/react/empty.d.ts.map +1 -1
  750. package/dist/react/empty.js +1 -1
  751. package/dist/react/footer.d.ts +5 -5
  752. package/dist/react/footer.d.ts.map +1 -1
  753. package/dist/react/footer.js +2 -2
  754. package/dist/react/header.d.ts +2 -2
  755. package/dist/react/header.d.ts.map +1 -1
  756. package/dist/react/message.d.ts +4 -0
  757. package/dist/react/message.d.ts.map +1 -1
  758. package/dist/react/message.js +2 -2
  759. package/dist/react/number.d.ts +53 -0
  760. package/dist/react/number.d.ts.map +1 -0
  761. package/dist/react/number.js +25 -0
  762. package/dist/react/page.d.ts +1 -1
  763. package/dist/react/sidebar.d.ts +4 -0
  764. package/dist/react/sidebar.d.ts.map +1 -1
  765. package/dist/react/sidebar.js +2 -2
  766. package/dist/react/table-of-contents.d.ts +19 -0
  767. package/dist/react/table-of-contents.d.ts.map +1 -0
  768. package/dist/react/table-of-contents.js +28 -0
  769. package/dist/{shared-words-CdMDVtXx.js → shared-words-C5cjxMjZ.js} +151 -16
  770. package/dist/shared-words-C5cjxMjZ.js.map +1 -0
  771. package/dist/{shared-words-BtRee8xR.js → shared-words-Cdm7xd-_.js} +163 -28
  772. package/dist/shared-words-Cdm7xd-_.js.map +1 -0
  773. package/package.json +25 -12
  774. package/DS1/3-unit/ds-calendar-large.ts +0 -353
  775. package/DS1/3-unit/styles/ds-calendar-large.css +0 -178
  776. package/dist/3-unit/ds-calendar-large.d.ts +0 -142
  777. package/dist/3-unit/ds-calendar-large.d.ts.map +0 -1
  778. package/dist/3-unit/ds-calendar-large.js +0 -308
  779. package/dist/icons-extra-CRxxWFjX.js.map +0 -1
  780. package/dist/icons-extra-H5pqCM_R.js.map +0 -1
  781. package/dist/shared-words-BtRee8xR.js.map +0 -1
  782. package/dist/shared-words-CdMDVtXx.js.map +0 -1
@@ -21,6 +21,13 @@
21
21
  * ds-row--auto as high as its content, at least one square
22
22
  * ds-row--stacked the content stacked, each line one square (a tile, a card)
23
23
  * ds-row--nav a navigation row: the sidebar's two-pixel corners
24
+ * ds-row__picture a record's picture before its words (a date or colour tile, an
25
+ * avatar, a logo, or a button holding one): sixteen square at the
26
+ * start of its square, the words on the next
27
+ * ds-row__name a record's words: they hug and give way first; cut, they fade over
28
+ * the last square, never an ellipsis (`data-cut="end"`, set by the
29
+ * element, or 0-face/cut-fade.ts on a page without Lit)
30
+ * ds-row__value the figure or date at the row's end, in tabular figures
24
31
  * aria-current="page" the destination being shown, filled and in the medium weight
25
32
  * aria-disabled="true" or `disabled` on a button: dimmed, not pressable
26
33
  *
@@ -32,7 +39,7 @@
32
39
  * ds-sidebar the tree (`role="tree"`)
33
40
  * ds-sidebar__item a row (`role="treeitem"`, `aria-level`, `aria-expanded` on a parent, `aria-selected`)
34
41
  * ds-sidebar__disclosure the arrow on its own square, turned down when the row is open; empty on a leaf
35
- * ds-sidebar__label the words, cut short with an ellipsis
42
+ * ds-sidebar__label the words; cut, they fade over the last square (`data-cut="end"`)
36
43
  * ds-sidebar__meta small muted words at the row's end
37
44
  *
38
45
  * An icon (`.ds-icon`) in a tree row takes a square of its own. Tokens:
@@ -212,6 +219,59 @@ button.ds-row[aria-disabled="true"]:hover::after {
212
219
  --ds-row-radius: calc(2px * var(--ds-sf));
213
220
  }
214
221
 
222
+ /* The parts of a record's row, as the element draws them: a 16px picture before the name takes
223
+ the first sixteen of its square and the row's 4px gap puts the words on the next; the name
224
+ hugs and gives way first; the value stands at the row's end. */
225
+ /* The picture is exactly one control (16px) square, standing on the lower sixteen: whatever
226
+ holds it (a button that opens it, a property's trigger) adds no width, padding or margin,
227
+ so the 4px gap is the only space before the words, as in every record row. The measures
228
+ are important because a button's own face rules are more specific than a part's. */
229
+ :is(.ds-row, ds-row, .ds-row__target) > .ds-row__picture {
230
+ flex: none;
231
+ display: inline-flex;
232
+ align-items: flex-end;
233
+ box-sizing: border-box;
234
+ width: var(--ds-control-height) !important;
235
+ min-width: 0 !important;
236
+ height: var(--ds-control-height);
237
+ margin: 0 !important;
238
+ padding: 0 !important;
239
+ }
240
+ /* A picture that opens something of its own (a date to change) stands over the row's press
241
+ layer, as the end slot does; a plain tile lets the press through to the row. */
242
+ .ds-row__picture:has(button, a) {
243
+ position: relative;
244
+ z-index: 2;
245
+ }
246
+ .ds-row__picture :is(ds-button, button, a) {
247
+ display: flex;
248
+ width: 100% !important;
249
+ min-width: 0 !important;
250
+ height: 100%;
251
+ margin: 0 !important;
252
+ padding: 0 !important;
253
+ }
254
+ .ds-row .ds-row__name {
255
+ flex: 0 1 auto;
256
+ min-width: 0;
257
+ overflow: hidden;
258
+ white-space: nowrap;
259
+ text-overflow: clip;
260
+ }
261
+ .ds-row .ds-row__name[data-cut="end"] {
262
+ mask-image: linear-gradient(to right, #000 calc(100% - var(--ds-unit)), transparent);
263
+ }
264
+ .ds-row:dir(rtl) .ds-row__name[data-cut="end"] {
265
+ mask-image: linear-gradient(to left, #000 calc(100% - var(--ds-unit)), transparent);
266
+ }
267
+ .ds-row .ds-row__value {
268
+ flex: none;
269
+ margin-inline-start: auto;
270
+ white-space: nowrap;
271
+ text-align: end;
272
+ font-variant-numeric: tabular-nums;
273
+ }
274
+
215
275
  /* A sidebar of nested things: the tree. */
216
276
 
217
277
  .ds-sidebar {
@@ -307,7 +367,13 @@ button.ds-row[aria-disabled="true"]:hover::after {
307
367
  min-width: 0;
308
368
  padding-inline-start: calc(4px * var(--ds-sf));
309
369
  overflow: hidden;
310
- text-overflow: ellipsis;
370
+ text-overflow: clip;
371
+ }
372
+ .ds-sidebar__label[data-cut="end"] {
373
+ mask-image: linear-gradient(to right, #000 calc(100% - var(--ds-unit)), transparent);
374
+ }
375
+ .ds-sidebar__label[data-cut="end"]:dir(rtl) {
376
+ mask-image: linear-gradient(to left, #000 calc(100% - var(--ds-unit)), transparent);
311
377
  }
312
378
  .ds-sidebar__meta {
313
379
  flex: none;
@@ -17,6 +17,17 @@
17
17
  * <th scope="rowgroup"> a row group, a heading row in grey
18
18
  * <td aria-selected="true"> a selected cell
19
19
  *
20
+ * `data-plain` takes every line away: the same rows with no rule at their
21
+ * foot, standing on the paper as a list's rows do (Money's tables), the
22
+ * words still on the lower sixteen of each square.
23
+ *
24
+ * `data-frame` draws the same rows in a rounded 1px frame with a 1px line
25
+ * between columns. Every line is drawn inside the cells' squares, the frame
26
+ * over the first and last pixels as the sheet's lines are at a cell's end and
27
+ * foot, so each row keeps its 20px pitch and the last row's rule is the
28
+ * frame's foot; words stand 4px in from the lines. Fills in the cells keep
29
+ * inside the rounded corners.
30
+ *
20
31
  * `data-sheet` makes it a spreadsheet: every cell four squares by one (80 by
21
32
  * 20), its 1px lines at its end and foot so the words have 79 by 19, set 4px
22
33
  * in on the sixteen. Words that do not fit fade out over the last square
@@ -73,9 +84,41 @@
73
84
  padding-inline-end: 0;
74
85
  }
75
86
 
87
+ /* A plain table: no lines at all, each row one square with its words on the lower sixteen. */
88
+ .ds-table[data-plain] :is(th, td) {
89
+ border-bottom: 0;
90
+ }
91
+ .ds-table[data-frame] {
92
+ --ds-table-radius: var(--ds-radius-card, calc(8px * var(--ds-sf, 1)));
93
+ position: relative;
94
+ border-collapse: separate;
95
+ border-radius: var(--ds-table-radius);
96
+ clip-path: inset(0 round var(--ds-table-radius));
97
+ }
98
+ /* The frame is drawn over the cells, so a filled cell never covers it. */
99
+ .ds-table[data-frame]::after {
100
+ position: absolute;
101
+ inset: 0;
102
+ z-index: 1;
103
+ box-sizing: border-box;
104
+ border: 1px solid var(--ds-table-rule);
105
+ border-radius: var(--ds-table-radius);
106
+ content: "";
107
+ pointer-events: none;
108
+ }
109
+ .ds-table[data-frame] :is(th, td) {
110
+ padding-inline: calc(4px * var(--ds-sf, 1));
111
+ }
112
+ .ds-table[data-frame] :is(th, td) + :is(th, td) {
113
+ box-shadow: inset 1px 0 0 var(--ds-table-rule);
114
+ }
115
+ .ds-table[data-frame]:dir(rtl) :is(th, td) + :is(th, td) {
116
+ box-shadow: inset -1px 0 0 var(--ds-table-rule);
117
+ }
118
+
76
119
  .ds-table thead th,
77
120
  .ds-table th[scope="rowgroup"] {
78
- color: var(--ds-title-color, light-dark(#797979, #9a9a9a));
121
+ color: var(--ds-title-color, light-dark(#6e6e6e, #9a9a9a));
79
122
  }
80
123
 
81
124
  .ds-table tbody th:not([scope="rowgroup"]) {
@@ -107,7 +150,7 @@
107
150
  padding-top: calc(var(--ds-table-row) - var(--ds-type-lineheight-default));
108
151
  line-height: var(--ds-type-lineheight-default);
109
152
  text-align: start;
110
- color: var(--ds-title-color, light-dark(#797979, #9a9a9a));
153
+ color: var(--ds-title-color, light-dark(#6e6e6e, #9a9a9a));
111
154
  }
112
155
 
113
156
  .ds-table-scroll {
@@ -197,7 +240,7 @@
197
240
  inset-inline-start: 0;
198
241
  z-index: 1;
199
242
  background: var(--ds-table-paper);
200
- color: var(--ds-title-color, light-dark(#797979, #9a9a9a));
243
+ color: var(--ds-title-color, light-dark(#6e6e6e, #9a9a9a));
201
244
  text-align: center;
202
245
  font-variant-numeric: tabular-nums;
203
246
  }
@@ -214,7 +257,7 @@
214
257
  z-index: 4;
215
258
  }
216
259
  .ds-table[data-sheet] .ds-table__letters td {
217
- color: var(--ds-title-color, light-dark(#797979, #9a9a9a));
260
+ color: var(--ds-title-color, light-dark(#6e6e6e, #9a9a9a));
218
261
  text-align: center;
219
262
  }
220
263
  .ds-table[data-sheet] tbody td:not([data-numeric]) {
@@ -17,8 +17,27 @@
17
17
  * ds-text--display 20 on two squares, medium
18
18
  * ds-text--strong medium
19
19
  * ds-text--muted, --title, --danger tones
20
+ *
21
+ * The page's own text reads as ds-text does: what stands in the body outside
22
+ * a component is 14 on a one-square line in the text colour, scaled with the
23
+ * device, so a product never sets its own body size, leading or ink.
24
+ *
25
+ * It is drawn with grayscale antialiasing, as one.css has always drawn it: the
26
+ * browser's own smoothing on a Mac thickens every stem, so the same 400 weight
27
+ * reads heavier in a product that loads controls.css without one.css (Link
28
+ * beside Money). Inherited, so components' shadow roots draw the same.
20
29
  */
21
30
 
31
+ body {
32
+ color: var(--ds-text-color);
33
+ font-family: var(--ds-typeface-regular);
34
+ font-size: var(--ds-type-size-default);
35
+ line-height: var(--ds-unit);
36
+ -webkit-font-smoothing: antialiased;
37
+ -moz-osx-font-smoothing: grayscale;
38
+ text-rendering: optimizeLegibility;
39
+ }
40
+
22
41
  .ds-text {
23
42
  margin: 0;
24
43
  color: var(--ds-text-color);
@@ -34,6 +53,13 @@
34
53
  font-size: var(--ds-type-size-small);
35
54
  }
36
55
 
56
+ /* text.whole-words: headings must not inherit emergency wrapping from prose. */
57
+ :is(h1, h2, h3, h4, h5, h6, th, [role="heading"], [role="columnheader"], [role="rowheader"], .ds-text--heading, .ds-text--display) {
58
+ word-break: normal;
59
+ overflow-wrap: normal;
60
+ hyphens: manual;
61
+ }
62
+
37
63
  .ds-text--heading {
38
64
  font-family: var(--ds-typeface-medium);
39
65
  font-size: var(--ds-type-size-heading);
@@ -12,7 +12,7 @@ export interface SplitSegment<T extends string = string> {
12
12
  export interface SplitButtonState extends HTMLElement {
13
13
  options: string; segments: ReadonlyArray<SplitSegment> | undefined;
14
14
  value: string; disabled: boolean; splitDisabled: boolean;
15
- actions: boolean; literal: boolean; renderRoot: HTMLElement | DocumentFragment;
15
+ actions: boolean; literal: boolean; labelled?: boolean; renderRoot: HTMLElement | DocumentFragment;
16
16
  }
17
17
  function choices(host: SplitButtonState): ReadonlyArray<SplitSegment> {
18
18
  return host.segments ?? host.options.split(",").map(part => part.trim()).filter(Boolean).map(part => {
@@ -41,15 +41,20 @@ export function focusSplit(host: SplitButtonState, options?: FocusOptions) {
41
41
  (buttons.find(button => button.getAttribute("aria-pressed") === "true") ?? buttons[0])?.focus(options);
42
42
  }
43
43
  export function renderSplit(host: SplitButtonState) {
44
+ // `labelled` writes a segment's words after its icon; otherwise an icon stands alone and names it.
45
+ const words = (segment: SplitSegment) => html`<ds-text .text=${segment.label} .literal=${host.literal}></ds-text>`;
44
46
  return html`${choices(host).map(segment => html`<button
45
47
  type="button" part="segment" value=${segment.value}
46
48
  aria-pressed=${host.actions ? nothing : String(segment.value === host.value)}
47
- aria-label=${segment.icon ? (host.literal ? segment.label : getText(segment.label)) : nothing}
48
- ?data-icon=${!!segment.icon}
49
+ aria-label=${segment.icon && !host.labelled ? (host.literal ? segment.label : getText(segment.label)) : nothing}
50
+ ?data-icon=${!!segment.icon && !host.labelled}
51
+ ?data-icon-words=${!!segment.icon && !!host.labelled}
49
52
  ?data-short=${segment.label.length === 1}
50
53
  ?disabled=${host.splitDisabled || segment.disabled}
51
54
  @click=${() => press(host, segment)}
52
55
  >${segment.icon
53
- ? html`<ds-icon type=${segment.icon} aria-hidden="true"></ds-icon>`
54
- : html`<ds-text .text=${segment.label} .literal=${host.literal}></ds-text>`}</button>`)}`;
56
+ ? host.labelled
57
+ ? html`<ds-icon type=${segment.icon} aria-hidden="true"></ds-icon>${words(segment)}`
58
+ : html`<ds-icon type=${segment.icon} aria-hidden="true"></ds-icon>`
59
+ : words(segment)}</button>`)}`;
55
60
  }
@@ -1,4 +1,4 @@
1
- :host { --ds-chart-ink: var(--text-color, #1e1e1e); --ds-chart-muted: var(--base-darker-grey, #797979); --ds-chart-faint: var(--slate-light, #e6e6e6); --ds-chart-up: var(--apple-green, #99ff73); --ds-chart-down: var(--tuned-red, #ff5f5f); --ds-chart-live: var(--ds-chart-up); --ds-chart-line: var(--ds-chart-faint); --ds-chart-fill: var(--ds-chart-faint); --ds-chart-small: calc(var(--ds-chart-unit, 20px) / 2); font-family: var(--ds-chart-font, var(--typeface-regular, sans-serif)); }
1
+ :host { --ds-chart-ink: var(--text-color, #1e1e1e); --ds-chart-muted: var(--ds-title-color, #6e6e6e); --ds-chart-faint: var(--slate-light, #e6e6e6); --ds-chart-up: var(--apple-green, #99ff73); --ds-chart-down: var(--tuned-red, #ff5f5f); --ds-chart-live: var(--ds-chart-up); --ds-chart-line: var(--ds-chart-faint); --ds-chart-fill: var(--ds-chart-faint); --ds-chart-small: calc(var(--ds-chart-unit, 20px) / 2); font-family: var(--ds-chart-font, var(--typeface-regular, sans-serif)); }
2
2
  :host([hidden]) { display: none !important; }
3
3
  * { box-sizing: border-box; }
4
4
  :host([data-chart-kind="line"]) {
@@ -112,15 +112,33 @@
112
112
 
113
113
  .bars {
114
114
  display: flex;
115
+ align-items: flex-start;
116
+ }
117
+
118
+ .bar-columns {
119
+ position: relative;
120
+ display: flex;
121
+ }
122
+
123
+ :host([fill]) .bar-columns {
124
+ flex: 1 1 auto;
125
+ min-width: 0;
115
126
  }
116
127
 
117
128
  .bar-cell {
118
129
  display: grid;
119
- grid-template-rows: auto var(--ds-chart-unit) var(--ds-chart-unit);
130
+ grid-template-rows: auto;
131
+ grid-auto-rows: var(--ds-chart-unit);
120
132
  align-items: center;
121
133
  width: calc(var(--span) * var(--ds-chart-unit));
122
134
  }
123
135
 
136
+ :host([fill]) .bar-cell {
137
+ flex: 1 1 0;
138
+ width: auto;
139
+ min-width: 0;
140
+ }
141
+
124
142
  .bar-area {
125
143
  position: relative;
126
144
  display: flex;
@@ -128,10 +146,25 @@
128
146
  box-shadow: inset 0 -1px 0 var(--ds-chart-line);
129
147
  }
130
148
 
149
+ /* A scale's lines across the bars, one a square, under them. */
150
+ .bar-guides {
151
+ position: absolute;
152
+ inset-inline: 0;
153
+ top: 0;
154
+ pointer-events: none;
155
+ background: repeating-linear-gradient(to top, transparent 0 calc(var(--ds-chart-unit) - 1px), var(--ds-chart-line) calc(var(--ds-chart-unit) - 1px) var(--ds-chart-unit));
156
+ }
157
+
131
158
  .bar-fill {
159
+ position: relative;
132
160
  width: calc(var(--span) * var(--ds-chart-unit) - 1px);
133
161
  }
134
162
 
163
+ :host([fill]) .bar-fill,
164
+ :host([fill]) .bar-compare {
165
+ width: calc(100% - 1px);
166
+ }
167
+
135
168
  .bar-fill.up {
136
169
  background: var(--ds-chart-up);
137
170
  }
@@ -153,6 +186,38 @@
153
186
  box-shadow: inset 0 0 0 1px var(--ds-chart-ink);
154
187
  }
155
188
 
189
+ /* A bar's value just over it, in the small type, centred on the bar and free to run past it. */
190
+ .bar-value {
191
+ position: absolute;
192
+ left: 0;
193
+ width: calc(100% - 1px);
194
+ display: flex;
195
+ justify-content: center;
196
+ font-size: var(--ds-chart-small);
197
+ line-height: 1;
198
+ white-space: nowrap;
199
+ color: var(--ds-chart-ink);
200
+ font-variant-numeric: tabular-nums;
201
+ }
202
+
203
+ /* The scale at the end: two squares, each label just above its line, as the line chart's. */
204
+ .bar-axis {
205
+ position: relative;
206
+ flex: none;
207
+ width: calc(2 * var(--ds-chart-unit));
208
+ }
209
+
210
+ .bar-tick {
211
+ position: absolute;
212
+ right: 0;
213
+ margin-bottom: 2px;
214
+ font-size: var(--ds-chart-small);
215
+ line-height: 1;
216
+ white-space: nowrap;
217
+ color: var(--ds-chart-muted);
218
+ font-variant-numeric: tabular-nums;
219
+ }
220
+
156
221
  .bar-caption,
157
222
  .bar-label {
158
223
  font-size: var(--ds-chart-small);
@@ -164,6 +229,10 @@
164
229
  color: var(--ds-chart-muted);
165
230
  }
166
231
 
232
+ .bar-label {
233
+ color: var(--ds-chart-muted);
234
+ }
235
+
167
236
 
168
237
  @keyframes blink { from { opacity: 1; } to { opacity: .25; } }
169
238
  @media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
@@ -69,7 +69,8 @@ interface Palette {
69
69
  gridMajor: string;
70
70
  }
71
71
 
72
- const STEPS: number[] = [];
72
+ /** The round sizes a square of a chart stands for: 1, 2, 2.5 and 5 times a power of ten. */
73
+ export const STEPS: number[] = [];
73
74
  for (let exp = -4; exp <= 9; exp++) {
74
75
  for (const base of [1, 2, 2.5, 5]) STEPS.push(base * 10 ** exp);
75
76
  }
@@ -0,0 +1,32 @@
1
+ import { LitElement, html, unsafeCSS } from "lit";
2
+ import { define } from "../0-face/define";
3
+ import metrics from "../1-root/component-metrics.css?inline";
4
+ import styles from "./styles/ds-activity.css?inline";
5
+
6
+ // Each frame is a small arrangement of squares, not a measure of completion.
7
+ const patterns = [
8
+ [5, 6, 9, 10], [1, 5, 6, 9], [1, 2, 6, 10], [2, 6, 7, 10],
9
+ [5, 6, 9, 10], [6, 9, 10, 14], [5, 9, 13, 14], [5, 8, 9, 13],
10
+ ];
11
+
12
+ /**
13
+ * A working mark on the sixteen: four-pixel cells rearrange inside a control
14
+ * square. Set active only while work is running; the default slot names the
15
+ * actual operation. Reduced motion keeps the resting arrangement. Decorative
16
+ * marks use aria-hidden and put their status in a separate live region.
17
+ */
18
+ export class Activity extends LitElement {
19
+ static properties = { active: { type: Boolean, reflect: true } };
20
+ static styles = [unsafeCSS(metrics), unsafeCSS(styles)];
21
+ declare active: boolean;
22
+ constructor() { super(); this.active = false; }
23
+ render() {
24
+ return html`<span class="mark" aria-hidden="true">
25
+ ${patterns.map((cells, frame) => html`<span class="frame" style=${`animation-delay: -${frame * 200}ms`}>
26
+ ${Array.from({ length: 16 }, (_, cell) => html`<i class=${cells.includes(cell) ? "ink" : ""}></i>`)}
27
+ </span>`)}
28
+ </span><span class="words"><slot></slot></span>`;
29
+ }
30
+ }
31
+ define("ds-activity", Activity);
32
+ declare global { interface HTMLElementTagNameMap { "ds-activity": Activity } }
@@ -0,0 +1 @@
1
+ export * from '../5-visual-kit/app-chrome';
@@ -1,6 +1,7 @@
1
1
  import { LitElement, html, nothing, unsafeCSS, type PropertyValues } from "lit";
2
2
  import { styleMap } from "lit/directives/style-map.js";
3
3
  import { keyed } from "lit/directives/keyed.js";
4
+ import { contrastRatio, colorReader, composite, type RGBA } from "../0-face/text-contrast";
4
5
  import { define } from "../0-face/define";
5
6
  import { provideIcons } from "./ds-icon";
6
7
  import { avatarIcon } from "./generated/icon-avatar";
@@ -10,16 +11,30 @@ import styles from "./styles/ds-avatar.css?inline";
10
11
  // the first frame instead of the initial while the deferred icons load.
11
12
  provideIcons({ avatar: avatarIcon });
12
13
 
14
+ /** The ink that reads on a fill: black on a light one, white on a dark one. */
15
+ const inkOn = (rgb: number[]) => {
16
+ const fill = [...rgb, 1] as RGBA;
17
+ const white: RGBA = [1, 1, 1, 1], black: RGBA = [42 / 255, 42 / 255, 42 / 255, 1];
18
+ if (contrastRatio(black, fill) >= 4.5) return "var(--ds-black)";
19
+ if (contrastRatio(white, fill) >= 4.5) return "var(--ds-white)";
20
+ return "black";
21
+ };
22
+
13
23
  /** Saved identity colours are hex; their ink must stay legible in either theme. */
14
24
  export function avatarInk(color: string): string | undefined {
15
25
  const match = /^#([a-f\d]{6}|[a-f\d]{3})$/i.exec(color);
16
26
  if (!match) return undefined;
17
27
  const hex = match[1].length === 3 ? [...match[1]].map((c) => c + c).join("") : match[1];
18
- const rgb = [0, 2, 4]
19
- .map((i) => parseInt(hex.slice(i, i + 2), 16) / 255)
20
- .map((n) => (n <= 0.04045 ? n / 12.92 : ((n + 0.055) / 1.055) ** 2.4));
21
- const luminance = rgb[0] * 0.2126 + rgb[1] * 0.7152 + rgb[2] * 0.0722;
22
- return luminance > 0.22 ? "var(--ds-black)" : "var(--ds-white)";
28
+ return inkOn([0, 2, 4].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255));
29
+ }
30
+
31
+ /** The ink on a fill as the browser resolved it (`rgb(253, 187, 45)`), for a `color` given as a variable. */
32
+ export function inkOnResolved(fill: string): string | undefined {
33
+ const match = /^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+([\d.]+%?))?\s*\)/.exec(fill);
34
+ if (!match) return undefined;
35
+ // A fill with no colour yet (`rgba(0, 0, 0, 0)`) says nothing about the ink.
36
+ if (match[4] !== undefined && parseFloat(match[4]) === 0) return undefined;
37
+ return inkOn([match[1], match[2], match[3]].map((n) => Number(n) / 255));
23
38
  }
24
39
 
25
40
  /**
@@ -81,6 +96,28 @@ export class Avatar extends LitElement {
81
96
  this.fit = "cover";
82
97
  this.logo = this.mask = this.outlined = this.pending = this.plain = this.loaded = this.failed = false;
83
98
  }
99
+ private inkObserver?: MutationObserver;
100
+ private inkFrame = 0;
101
+ private readonly queueInk = () => {
102
+ const view = this.ownerDocument.defaultView!;
103
+ if (!this.inkFrame) this.inkFrame = view.requestAnimationFrame(() => { this.inkFrame = 0; this.resolveInk(); });
104
+ };
105
+ connectedCallback() {
106
+ super.connectedCallback();
107
+ const view = this.ownerDocument.defaultView!;
108
+ this.inkObserver = new view.MutationObserver(this.queueInk);
109
+ // Observe only the painted ancestors, never our own shadow's ink writes.
110
+ for (let parent: Element | null = this; parent; parent = parent.parentElement ?? (parent.getRootNode() as ShadowRoot).host ?? null) {
111
+ this.inkObserver.observe(parent, { attributes: true, attributeFilter: ['class', 'style', 'data-theme'] });
112
+ }
113
+ view.addEventListener('load', this.queueInk, true);
114
+ }
115
+ disconnectedCallback() {
116
+ super.disconnectedCallback(); this.inkObserver?.disconnect();
117
+ const view = this.ownerDocument.defaultView!;
118
+ view.cancelAnimationFrame(this.inkFrame); this.inkFrame = 0;
119
+ view.removeEventListener('load', this.queueInk, true);
120
+ }
84
121
  protected willUpdate(changed: PropertyValues<this>) {
85
122
  if (changed.has("src")) {
86
123
  this.loaded = false;
@@ -88,19 +125,50 @@ export class Avatar extends LitElement {
88
125
  this.style.removeProperty("--ds-avatar-intrinsic-ratio");
89
126
  }
90
127
  }
128
+ /** A fill named by a variable (`var(--brand-highlight)`) gets its ink once the browser has resolved it. */
129
+ protected updated() {
130
+ if (this.ink || this.pending || this.plain) return;
131
+ this.resolveInk();
132
+ }
133
+ /** Reads the fill as drawn; while the variable is still undefined (its stylesheet on its way), looks again next
134
+ * frame, and once more when the page has loaded everything. */
135
+ private resolveInk(tries = 0) {
136
+ const frame = this.renderRoot.querySelector<HTMLElement>(".frame");
137
+ if (!frame || !this.isConnected) return;
138
+ if (this.ink || this.pending || this.plain) return;
139
+ const view = this.ownerDocument.defaultView!;
140
+ const read = colorReader(this.ownerDocument);
141
+ let fill = read(view.getComputedStyle(frame).backgroundColor);
142
+ if (fill && fill[3] > 0) {
143
+ for (let parent: Element | null = this; parent && fill[3] < 1; parent = parent.parentElement ?? (parent.getRootNode() as ShadowRoot).host ?? null) {
144
+ const background = read(view.getComputedStyle(parent).backgroundColor);
145
+ if (background) fill = composite(fill, background);
146
+ }
147
+ if (fill[3] < 1) return;
148
+ const tokens = view.getComputedStyle(this);
149
+ const black = read(tokens.getPropertyValue('--ds-black').trim()), white = read(tokens.getPropertyValue('--ds-white').trim());
150
+ const ink = black && contrastRatio(black, fill) >= 4.5 ? 'var(--ds-black)' : white && contrastRatio(white, fill) >= 4.5 ? 'var(--ds-white)' : contrastRatio([0,0,0,1], fill) >= 4.5 ? 'black' : 'white';
151
+ if (frame.style.color !== ink) frame.style.color = ink;
152
+ return;
153
+ }
154
+ if (tries < 60) this.ownerDocument.defaultView!.requestAnimationFrame(() => this.resolveInk(tries + 1));
155
+ if (tries === 0 && this.ownerDocument.readyState !== "complete") {
156
+ this.ownerDocument.defaultView?.addEventListener("load", () => this.resolveInk(60), { once: true });
157
+ }
158
+ }
91
159
  render() {
92
160
  const src = this.src;
93
161
  const fallback = this.icon
94
162
  ? html`<ds-icon type=${this.icon} aria-hidden="true"></ds-icon>`
95
163
  : html`<span
96
164
  class="initial"
97
- ?data-pair=${[...this.initial].length > 1}
165
+ ?data-pair=${[...this.initial].length > 1 && !/^\d{1,2}$/.test(this.initial)}
98
166
  style=${styleMap({ "--initial-count": String([...this.initial].length || 1) })}
99
167
  >${this.initial}</span
100
168
  >`;
101
169
  return html`<span
102
170
  class="frame"
103
- style=${styleMap({ backgroundColor: !this.pending && !this.plain ? this.color || undefined : undefined, color: !this.pending ? this.ink || avatarInk(this.color) : undefined })}
171
+ style=${styleMap({ backgroundColor: !this.pending && !this.plain ? this.color || undefined : undefined, color: !this.pending ? this.ink || (!this.plain ? avatarInk(this.color) : undefined) : undefined })}
104
172
  role=${this.label ? "img" : nothing}
105
173
  aria-label=${this.label || nothing}
106
174
  aria-hidden=${this.label ? nothing : "true"}
@@ -1,9 +1,13 @@
1
1
  import { LitElement, html, unsafeCSS } from "lit";
2
2
  import { define } from "../0-face/define";
3
+ import { CutFades } from "../0-face/cut-fade";
3
4
  import "./ds-icon";
4
5
  import styles from "./styles/ds-badge.css?inline";
5
6
 
6
- /** A noninteractive status label. Products own its words and status meaning. */
7
+ /**
8
+ * A noninteractive status label. Products own its words and status meaning.
9
+ * Words that do not fit fade out over their last square, never an ellipsis.
10
+ */
7
11
  export class Badge extends LitElement {
8
12
  static properties = {
9
13
  icon: { type: String },
@@ -15,6 +19,8 @@ export class Badge extends LitElement {
15
19
  private observer?: ResizeObserver;
16
20
  private contentObserver?: MutationObserver;
17
21
  private measureFrame = 0;
22
+ /** Marks the words `data-cut="end"` while they are wider than the badge. */
23
+ protected readonly cuts = new CutFades(this, { selector: ".frame:not(.icon-only) .label" });
18
24
 
19
25
  constructor() { super(); this.icon = ""; this.iconOnly = false; }
20
26
 
@@ -62,6 +68,7 @@ export class Badge extends LitElement {
62
68
  // "Done" at 32.3px read as 32 and was cut short in a 40px badge.)
63
69
  const natural = frame.getBoundingClientRect().width;
64
70
  frame.style.width = `${Math.max(1, Math.ceil(natural / unit)) * unit}px`;
71
+ this.cuts.measure();
65
72
  });
66
73
  };
67
74
 
@@ -21,8 +21,10 @@ export class Button extends Control {
21
21
  segments: { attribute: false },
22
22
  value: { type: String, reflect: true },
23
23
  actions: { type: Boolean, reflect: true },
24
+ labelled: { type: Boolean, reflect: true },
24
25
  literal: { type: Boolean, reflect: true },
25
26
  compact: { type: Boolean, reflect: true },
27
+ plain: { type: Boolean, reflect: true },
26
28
  _fieldsetDisabled: { state: true },
27
29
  primary: { type: Boolean, reflect: true },
28
30
  secondary: { type: Boolean, reflect: true },
@@ -50,8 +52,12 @@ export class Button extends Control {
50
52
  declare segments: ReadonlyArray<SplitSegment> | undefined;
51
53
  declare value: string;
52
54
  declare actions: boolean;
55
+ /** A split's segments with an icon show their words after it too. */
56
+ declare labelled: boolean;
53
57
  declare literal: boolean;
54
58
  declare compact: boolean;
59
+ /** A plain split: its segments' words and icons alone, on no ground in any state, as text tabs are. */
60
+ declare plain: boolean;
55
61
  declare private _fieldsetDisabled: boolean;
56
62
  private splitRole = false;
57
63
  get splitDisabled(): boolean { return this.disabled || this._fieldsetDisabled; }
@@ -104,7 +110,7 @@ export class Button extends Control {
104
110
  super();
105
111
  if (typeof this.attachInternals === "function") this.attachInternals();
106
112
  this.split = false; this.options = ""; this.value = "";
107
- this.actions = false; this.literal = false; this.compact = false; this._fieldsetDisabled = false;
113
+ this.actions = false; this.labelled = false; this.literal = false; this.compact = false; this.plain = false; this._fieldsetDisabled = false;
108
114
  this.addEventListener("click", event => {
109
115
  if (this._fieldsetDisabled) { event.preventDefault(); event.stopImmediatePropagation(); }
110
116
  }, { capture: true });