@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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constraint-site.d.ts","sourceRoot":"","sources":["../../DS1/0-face/constraint-site.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmC,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAGjF,sEAAsE;AACtE,eAAO,MAAM,YAAY,UAAuB,CAAC;AACjD,eAAO,MAAM,eAAe,UAAqC,CAAC;AAClE,yDAAyD;AACzD,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,+FAA+F;AAC/F,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAC7G,0GAA0G;AAC1G,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC;AACtF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpF,4FAA4F;AAC5F,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAIxD;AAED,+GAA+G;AAC/G,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAUlE;AAED,uGAAuG;AACvG,wBAAsB,aAAa,CAAC,IAAI,GAAE,QAAmB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAahF;AAID;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,EAAoB,EAAE,MAAM,SAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAmCpJ;AAED,0FAA0F;AAC1F,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,CAQrD;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,EAAE,KAAK,EAAE,MAAwB,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAsB,EAAE,EAAE;IACtH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,yDAAyD;IACzD,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IACjE,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAuBxB;AAmBD,+GAA+G;AAC/G,MAAM,MAAM,WAAW,GAAG;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtG,wBAAgB,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,WAAW,EAAE,CAUlE;AAID,8JAA8J;AAC9J,wBAAgB,QAAQ,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMpG;AAED,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,EAAE,CAMpI"}
@@ -0,0 +1,186 @@
1
+ // The constraints on every page of a site, at every phone width, from inside the browser: the constraint
2
+ // panel's Site check (constraint-panel.ts). Each page in the site's sitemap is opened once in a frame of
3
+ // the site's own, out of sight, then made as wide as each phone in turn and drawn at that phone's scale,
4
+ // and measured with every rule in constraints.ts at each width. Three pages are checked at a time.
5
+ // scripts/constraints-phone.ts does the same from a terminal, in WebKit as an iPhone.
6
+ import { constraints, measureConstraints } from './constraints';
7
+ import { calculateScalingFactor, defaultScalingConfig } from './scaling';
8
+ /** The narrowest phone still sold, the common ones and the widest. */
9
+ export const PHONE_WIDTHS = [320, 375, 393, 430];
10
+ export const VIEWPORT_WIDTHS = [...PHONE_WIDTHS, 768, 1024, 1440];
11
+ /** Pages checked side by side, each in its own frame. */
12
+ export const PAGES_AT_ONCE = 3;
13
+ /** An element as a person finds it: its tag, id and classes, and the start of its words. */
14
+ export function describeElement(element) {
15
+ const name = element.localName + (element.id ? `#${element.id}` : '') + Array.from(element.classList, c => `.${c}`).join('');
16
+ const words = (element.textContent ?? '').trim().replace(/\s+/g, ' ').slice(0, 40);
17
+ return words ? `${name} "${words}"` : name;
18
+ }
19
+ /** The pages a sitemap lists on the site's own origin, in its order and once each; none when it lists none. */
20
+ export function sitemapPages(xml, origin) {
21
+ const pages = [...xml.matchAll(/<loc>\s*([^<\s]+)\s*<\/loc>/g)].flatMap(([, loc]) => {
22
+ try {
23
+ const url = new URL(loc.replace(/&amp;/g, '&'), origin);
24
+ return url.origin === origin ? [url.href] : [];
25
+ }
26
+ catch {
27
+ return [];
28
+ }
29
+ });
30
+ return [...new Set(pages)];
31
+ }
32
+ /** The site's pages: its sitemap's, or else the page itself and every page it links to on the site. */
33
+ export async function findSitePages(page = document) {
34
+ const { origin } = page.location ?? window.location;
35
+ try {
36
+ const answer = await fetch(new URL('/sitemap.xml', origin));
37
+ if (answer.ok) {
38
+ const pages = sitemapPages(await answer.text(), origin);
39
+ if (pages.length)
40
+ return pages;
41
+ }
42
+ }
43
+ catch { /* No sitemap: the links below. */ }
44
+ const links = Array.from(page.querySelectorAll('a[href]'), link => new URL(link.href, origin))
45
+ .filter(url => url.origin === origin && !/\.\w+$/.test(url.pathname))
46
+ .map(url => `${url.origin}${url.pathname}`);
47
+ return [...new Set([`${origin}${(page.location ?? window.location).pathname}`, ...links])];
48
+ }
49
+ const wait = (ms) => new Promise(done => setTimeout(done, ms));
50
+ /**
51
+ * Opens a page once in a frame inside `host`, then makes the frame as wide as each width in turn, draws
52
+ * the page at that width's phone scale, and returns what every rule measured and found at each, in the
53
+ * order of `widths`. The page reflows at each width without loading again. The address carries `ph=out`,
54
+ * the analytics opt-out most trackers honour, so the check counts no visits.
55
+ */
56
+ export async function inspectInFrame(host, url, widths = VIEWPORT_WIDTHS, height = 844) {
57
+ const frame = document.createElement('iframe');
58
+ frame.setAttribute('aria-hidden', 'true');
59
+ frame.tabIndex = -1;
60
+ frame.style.cssText = `position:absolute;top:0;left:-1000px;width:${widths[0]}px;height:${height}px;border:0;visibility:hidden;pointer-events:none`;
61
+ const address = new URL(url);
62
+ address.searchParams.set('ph', 'out');
63
+ try {
64
+ const loaded = new Promise((done, fail) => {
65
+ frame.addEventListener('load', () => done(), { once: true });
66
+ setTimeout(() => fail(new Error('did not load in 30 seconds')), 30000);
67
+ });
68
+ frame.src = address.href;
69
+ host.appendChild(frame);
70
+ await loaded;
71
+ const page = frame.contentDocument;
72
+ if (!page?.documentElement)
73
+ throw new Error('could not be read');
74
+ await page.fonts?.ready;
75
+ const root = page.documentElement;
76
+ const checks = [];
77
+ for (const width of widths) {
78
+ frame.style.width = `${width}px`;
79
+ // The phone's scale for this width, whichever browser draws the frame: a computer's would draw it
80
+ // at 1, and a page that scales once on load would keep the first width's.
81
+ root.style.setProperty('--sf', String(calculateScalingFactor(width, { ...defaultScalingConfig, snap: 'layout' })));
82
+ root.setAttribute('data-mobile', '');
83
+ void root.scrollWidth;
84
+ // Room for what follows a resize on its own: resize observers, a carousel measuring its slides.
85
+ await wait(80);
86
+ checks.push(checkPage(page));
87
+ }
88
+ return checks;
89
+ }
90
+ finally {
91
+ frame.remove();
92
+ }
93
+ }
94
+ /** Every rule on a page: what it measured, and each place it is broken, said in words. */
95
+ export function checkPage(page) {
96
+ const measured = {};
97
+ const findings = [];
98
+ for (const { constraint, measured: count, findings: found } of measureConstraints(page)) {
99
+ measured[constraint.code] = count;
100
+ for (const { message, element, review } of found)
101
+ findings.push({ code: constraint.code, rule: constraint.rule, message, element: describeElement(element), ...(review ? { review } : {}) });
102
+ }
103
+ return { findings, measured };
104
+ }
105
+ /**
106
+ * Checks every page at every width, `PAGES_AT_ONCE` pages side by side, and reports each page's result at
107
+ * each width as it comes. Stops starting pages when `signal` aborts. Whatever the pages store in this
108
+ * browser while they are checked is put back afterwards.
109
+ */
110
+ export async function checkSite({ pages, widths = VIEWPORT_WIDTHS, inspect, onResult, signal, atOnce = PAGES_AT_ONCE }) {
111
+ const kept = storedNow();
112
+ const results = [];
113
+ const total = pages.length * widths.length;
114
+ const queue = [...pages];
115
+ const next = async () => {
116
+ for (let url = queue.shift(); url && !signal?.aborted; url = queue.shift()) {
117
+ const checks = await inspect(url, widths).catch((error) => error);
118
+ for (const [index, width] of widths.entries()) {
119
+ const result = checks instanceof Error
120
+ ? { url, width, findings: [], measured: {}, error: checks.message }
121
+ : { url, width, ...(checks[index] ?? { findings: [], measured: {} }) };
122
+ results.push(result);
123
+ if (!signal?.aborted)
124
+ onResult(result, results.length, total);
125
+ }
126
+ }
127
+ };
128
+ try {
129
+ await Promise.all(Array.from({ length: Math.max(1, atOnce) }, next));
130
+ }
131
+ finally {
132
+ putBack(kept);
133
+ }
134
+ return results;
135
+ }
136
+ /** This site's storage in this browser, to put back after the check. */
137
+ function storedNow() {
138
+ try {
139
+ return new Map(Object.keys(localStorage).map(key => [key, localStorage.getItem(key)]));
140
+ }
141
+ catch {
142
+ return null;
143
+ }
144
+ }
145
+ function putBack(kept) {
146
+ if (!kept)
147
+ return;
148
+ try {
149
+ for (const key of Object.keys(localStorage))
150
+ if (!kept.has(key))
151
+ localStorage.removeItem(key);
152
+ for (const [key, value] of kept)
153
+ if (localStorage.getItem(key) !== value)
154
+ localStorage.setItem(key, value);
155
+ }
156
+ catch { /* Storage blocked: nothing was kept either. */ }
157
+ }
158
+ export function summarizeRules(results) {
159
+ return constraints.map(constraint => {
160
+ const counts = results.map(result => result.measured[constraint.code] ?? 0);
161
+ return {
162
+ constraint,
163
+ measured: counts.reduce((sum, count) => sum + count, 0),
164
+ views: counts.filter(count => count > 0).length,
165
+ broken: results.reduce((sum, result) => sum + result.findings.filter(finding => finding.code === constraint.code && !finding.review).length, 0),
166
+ };
167
+ });
168
+ }
169
+ const count = (n, [one, many]) => `${n.toLocaleString('en')} ${n === 1 ? one : many}`;
170
+ /** What a rule did, in a sentence: kept, broken, or nothing on the pages for it to measure. `views` is how many page views were checked; one is this page. */
171
+ export function ruleLine({ constraint, measured, views, broken }, total) {
172
+ if (!measured)
173
+ return `Nothing to measure: no ${constraint.measures[1]} ${total === 1 ? 'on this page' : 'on these pages'}.`;
174
+ const where = total === 1 ? 'on this page' : `on ${views.toLocaleString('en')} of ${total.toLocaleString('en')} page views`;
175
+ return broken
176
+ ? `Broken ${broken === 1 ? 'once' : `${broken.toLocaleString('en')} times`}, among ${count(measured, constraint.measures)} measured ${where}.`
177
+ : `Kept by ${count(measured, constraint.measures)} measured ${where}.`;
178
+ }
179
+ /** Every page checked, in the order checked, with how much it broke at each width. */
180
+ export function summarizePages(results) {
181
+ const pages = new Map();
182
+ for (const { url, width, findings, error } of results) {
183
+ pages.set(url, [...(pages.get(url) ?? []), { width, broken: findings.filter(finding => !finding.review).length, error }].sort((a, b) => a.width - b.width));
184
+ }
185
+ return [...pages].map(([url, widths]) => ({ url, widths }));
186
+ }
@@ -0,0 +1,47 @@
1
+ /** Where a page breaks a rule: the element, and what is wrong with it in a sentence. `review` marks what the
2
+ * check could not measure (words over a picture, a blend) and asks a person to look, which breaks no rule. */
3
+ export type Finding = {
4
+ element: Element;
5
+ message: string;
6
+ review?: boolean;
7
+ };
8
+ export type Constraint = {
9
+ /** `<component>.<what>`, lower case, never changed once given. */
10
+ code: string;
11
+ /** The rule, one sentence, said of the thing and not of a product. */
12
+ rule: string;
13
+ /** Why it holds, when the rule alone does not say. */
14
+ why?: string;
15
+ /** The elements that keep it, by tag. */
16
+ components: string[];
17
+ /** The test that measures it in the source: a file in tests/ and the name it is given there. */
18
+ check: {
19
+ file: string;
20
+ test: string;
21
+ };
22
+ /** Measures it on a page as drawn, and returns where the page breaks it. */
23
+ inspect: (root: ParentNode) => Finding[];
24
+ /** What it measures on a page, one and many (`['card', 'cards']`), and how many of them a page has. */
25
+ measures: [one: string, many: string];
26
+ count: (root: ParentNode) => number;
27
+ };
28
+ export declare const constraints: Constraint[];
29
+ /** Every rule a page breaks, in the list's order. */
30
+ export declare function inspectConstraints(root?: ParentNode): (Finding & {
31
+ constraint: Constraint;
32
+ })[];
33
+ /** Every rule with how many things it measured on the page and where the page breaks it, in the list's order. */
34
+ export declare function measureConstraints(root?: ParentNode): {
35
+ constraint: Constraint;
36
+ measured: number;
37
+ findings: Finding[];
38
+ }[];
39
+ /** The component's name as its page is called: `ds-card` is Card. */
40
+ export declare const componentName: (tag: string) => string;
41
+ /** The rules grouped by the first component that keeps them, in the list's order. */
42
+ export declare function byComponent(list?: Constraint[]): [string, Constraint[]][];
43
+ export declare const skillStart = "<!-- constraints:start (written by scripts/write-constraints.ts from DS1/0-face/constraints.ts) -->";
44
+ export declare const skillEnd = "<!-- constraints:end -->";
45
+ /** The skill's list: a line a rule, under its component, between the markers. */
46
+ export declare function skillBlock(list?: Constraint[]): string;
47
+ //# sourceMappingURL=constraints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../../DS1/0-face/constraints.ts"],"names":[],"mappings":"AAgBA;+GAC+G;AAC/G,MAAM,MAAM,OAAO,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE9E,MAAM,MAAM,UAAU,GAAG;IACvB,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,gGAAgG;IAChG,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,4EAA4E;IAC5E,OAAO,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,EAAE,CAAC;IACzC,uGAAuG;IACvG,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACtC,KAAK,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,MAAM,CAAC;CACrC,CAAC;AA6EF,eAAO,MAAM,WAAW,EAAE,UAAU,EA0JnC,CAAC;AAEF,qDAAqD;AACrD,wBAAgB,kBAAkB,CAAC,IAAI,GAAE,UAAqB,GAAG,CAAC,OAAO,GAAG;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,CAAC,EAAE,CAExG;AAED,iHAAiH;AACjH,wBAAgB,kBAAkB,CAAC,IAAI,GAAE,UAAqB,GAAG;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,EAAE,CAAA;CAAE,EAAE,CAEnI;AAED,qEAAqE;AACrE,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,WAGxC,CAAC;AAEF,qFAAqF;AACrF,wBAAgB,WAAW,CAAC,IAAI,GAAE,UAAU,EAAgB,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,CAOtF;AAED,eAAO,MAAM,UAAU,wGAAwG,CAAC;AAChI,eAAO,MAAM,QAAQ,6BAA6B,CAAC;AAEnD,iFAAiF;AACjF,wBAAgB,UAAU,CAAC,IAAI,GAAE,UAAU,EAAgB,GAAG,MAAM,CAQnE"}
@@ -0,0 +1,274 @@
1
+ import { faultLineGrids, inspectFaultLines } from './fault-lines';
2
+ import { labelledButtons, inspectButtonLabels } from './button-label';
3
+ import { inspectTextContrast, measureTextContrast } from "./text-contrast";
4
+ import { inspectWordWrap, wordHeaders } from './word-wrap';
5
+ /** The actual initial, including a component nested in another open shadow root. */
6
+ function isAvatarInitial(element) {
7
+ for (let parent = element; parent; parent = parent.assignedSlot ?? parent.parentElement ?? parent.getRootNode().host ?? null) {
8
+ if (parent.matches('ds-avatar, .ds-avatar'))
9
+ return true;
10
+ }
11
+ return false;
12
+ }
13
+ /** A pixel either way is the same place. */
14
+ const near = (a, b) => Math.abs(a - b) <= 1;
15
+ const px = (n) => `${Math.round(n)}px`;
16
+ /** An element's style, from its own window: a page checked in a frame is measured by the frame's. */
17
+ const styleOf = (element) => (element.ownerDocument.defaultView ?? window).getComputedStyle(element);
18
+ /** Every drawn card with its picture: `ds-card` and its slotted picture, or `.ds-card` and its media's. */
19
+ function cards(root) {
20
+ return Array.from(root.querySelectorAll('ds-card, .ds-card')).flatMap(card => {
21
+ const slotted = card.localName === 'ds-card'
22
+ ? card.querySelector(':scope > [slot="media"]')
23
+ : card.querySelector(':scope > .ds-card__media > *');
24
+ const picture = slotted?.localName === 'picture' ? slotted.querySelector('img') ?? slotted : slotted;
25
+ if (!picture)
26
+ return [];
27
+ const box = card.getBoundingClientRect();
28
+ const face = picture.getBoundingClientRect();
29
+ if (!box.height || !face.height)
30
+ return [];
31
+ return [{ card, picture, box, face }];
32
+ });
33
+ }
34
+ /** The element's parent as drawn: the slot it is given to, the host of the shadow root it is in, or its parent. */
35
+ function drawnParent(element) {
36
+ if (element.assignedSlot)
37
+ return element.assignedSlot;
38
+ const parent = element.parentNode;
39
+ if (parent && parent.nodeType === Node.DOCUMENT_FRAGMENT_NODE && 'host' in parent)
40
+ return parent.host;
41
+ return element.parentElement;
42
+ }
43
+ /** Whether something the element stands in cuts it off or scrolls it, so it cannot widen the page: a slide in
44
+ * a carousel's track stands in the track, whichever side of a shadow root the two are on. */
45
+ function contained(element) {
46
+ for (let box = drawnParent(element); box && box !== element.ownerDocument.documentElement; box = drawnParent(box)) {
47
+ const style = styleOf(box);
48
+ if (/hidden|clip|auto|scroll/.test(style.overflowX) || style.position === 'fixed')
49
+ return true;
50
+ }
51
+ return false;
52
+ }
53
+ /** Every piece of the page that is drawn: it has a size. */
54
+ function drawn(root) {
55
+ return Array.from(root.querySelectorAll('body *')).filter(element => {
56
+ const box = element.getBoundingClientRect();
57
+ return box.width > 0 && box.height > 0;
58
+ });
59
+ }
60
+ /** Sideways scrolling by design: a carousel's track, a table, a block of code and a matrix scroll in their own frame. */
61
+ const SIDEWAYS_BY_DESIGN = '.ds-carousel__track, .ds-carousel, ds-carousel, .ds-table-scroll, .ds-table, ds-table, table, pre, ds-matrix, .ds-matrix';
62
+ /** Every box on the page that scrolls sideways: its overflow lets it, and it holds more than its width. */
63
+ function sidewaysScrollers(root) {
64
+ return Array.from(root.querySelectorAll('body *')).filter(element => element.clientWidth > 0 && element.scrollWidth > element.clientWidth + 1 && /auto|scroll/.test(styleOf(element).overflowX));
65
+ }
66
+ /** Cards side by side: one parent, one top and one height. */
67
+ function rows(found) {
68
+ const groups = [];
69
+ for (const entry of found) {
70
+ const row = groups.find(([first]) => first.card.parentElement === entry.card.parentElement
71
+ && near(first.box.top, entry.box.top) && near(first.box.height, entry.box.height));
72
+ if (row)
73
+ row.push(entry);
74
+ else
75
+ groups.push([entry]);
76
+ }
77
+ return groups.filter(row => row.length > 1);
78
+ }
79
+ export const constraints = [
80
+ {
81
+ code: 'page.fault-lines',
82
+ rule: 'Fault lines keep related card and control grids aligned across the whole page, with matching track edges and gaps at every checked viewport width.',
83
+ why: 'Compare separate sections in the same alignment family; responsive layouts may change together, while unrelated groups and intentional exceptions remain independent.',
84
+ components: ['ds-page'],
85
+ check: { file: 'tests/fault-lines.test.ts', test: 'fault lines catch shifted tracks and unequal gaps across sections at each viewport' },
86
+ measures: ['alignment group', 'alignment groups'], count: root => faultLineGrids(root).length, inspect: inspectFaultLines,
87
+ },
88
+ {
89
+ code: 'select.hug',
90
+ rule: 'Select and date-picker triggers use hug sizing, never fill sizing or growing to occupy the available row.',
91
+ components: ['ds-select', 'ds-calendar'],
92
+ check: { file: 'tests/select-hug.test.ts', test: 'select triggers hug instead of filling their row' },
93
+ measures: ['select', 'selects'],
94
+ count: root => root.querySelectorAll('ds-select[data-field]:not([data-listbox]), ds-calendar[picker]').length,
95
+ inspect: root => Array.from(root.querySelectorAll('ds-select[data-field]:not([data-listbox]), ds-calendar[picker]')).flatMap(element => {
96
+ const control = element.querySelector('select') ?? element.shadowRoot?.querySelector('.trigger');
97
+ if (!control || !element.getBoundingClientRect().width)
98
+ return [];
99
+ const fills = Number(styleOf(element).flexGrow) > 0 || element.getBoundingClientRect().width > control.getBoundingClientRect().width + 1;
100
+ return fills ? [{ element, message: 'Use hug sizing; the select must not fill its row.' }] : [];
101
+ }),
102
+ },
103
+ {
104
+ code: 'button.visible-label',
105
+ rule: 'Button labels stay fully visible, never faded, gradient-masked or truncated; round the required width up to whole grid squares.',
106
+ why: 'The action must remain readable; a chosen width cannot cut off its label.',
107
+ components: ['ds-button'],
108
+ check: { file: 'tests/button-cut-fade-measure.test.ts', test: 'button labels stay whole without gradients and snap up to the grid' },
109
+ measures: ['button', 'buttons'], count: root => labelledButtons(root).length, inspect: inspectButtonLabels,
110
+ },
111
+ {
112
+ code: 'text.whole-words',
113
+ rule: 'Headings and table headers keep each word intact across lines; only a long word that cannot fit may split at a valid language-specific hyphenation point, with a visible hyphen.',
114
+ why: 'Wrap between words or give the heading more room; never leave a final letter on its own, use break-all or anywhere, or insert an arbitrary line break inside a word. Use the correct lang with automatic hyphenation, or a soft hyphen at an editorially verified break; scripts with other line-breaking conventions keep their own typesetting rules.',
115
+ components: ['ds-text', 'ds-table'],
116
+ check: { file: 'tests/word-wrap.test.ts', test: 'headings and table headers keep whole words or use a typesetting hyphen' },
117
+ measures: ['heading or table header', 'headings and table headers'],
118
+ count: root => wordHeaders(root).length,
119
+ inspect: inspectWordWrap,
120
+ },
121
+ {
122
+ code: 'color.text-contrast',
123
+ rule: 'Visible text, including muted labels, placeholders and avatar initials, has at least 4.5:1 contrast against the background it is drawn on.',
124
+ why: 'Measure resolved colours through slots and open shadow roots, including transparency and opacity; image backgrounds and effects that cannot be measured need a visual review.',
125
+ components: ['ds-color', 'ds-text', 'ds-avatar'],
126
+ check: { file: 'tests/text-contrast.test.ts', test: 'rendered text contrast catches component overrides, slots, alpha and opacity' },
127
+ measures: ['text sample', 'text samples'],
128
+ count: root => measureTextContrast(root).length,
129
+ inspect: inspectTextContrast,
130
+ },
131
+ {
132
+ code: 'avatar.initial-contrast',
133
+ rule: 'Avatar initials have at least 4.5:1 contrast against their rendered fill, including after a theme or identity colour changes.',
134
+ why: 'Check each initial inside the avatar’s shadow root and in overlapping groups; decorative initials still need to be readable. Explicit ink overrides must pass too.',
135
+ components: ['ds-avatar'],
136
+ check: { file: 'tests/avatar-contrast.test.ts', test: 'avatar initials stay readable after theme and CSS-variable changes, and the avatar constraint catches overrides' },
137
+ measures: ['avatar initial', 'avatar initials'],
138
+ count: root => measureTextContrast(root).filter(result => isAvatarInitial(result.element)).length,
139
+ inspect: root => inspectTextContrast(root).filter(finding => isAvatarInitial(finding.element)),
140
+ },
141
+ {
142
+ code: 'card.media-level',
143
+ rule: "A card's picture stands on the card's foot, a square below the words at least, so the pictures of cards side by side stand on one level whatever the words above them.",
144
+ why: 'The room a taller card leaves goes above its picture, never below it, so pictures of one height side by side start on one line too; a taller picture starts higher.',
145
+ components: ['ds-card'],
146
+ check: { file: 'tests/card.test.ts', test: "a picture stands on the card's foot, so pictures side by side stand on one level" },
147
+ measures: ['card with a media picture', 'cards with a media picture'],
148
+ count: root => cards(root).length,
149
+ inspect(root) {
150
+ const found = cards(root);
151
+ const findings = [];
152
+ for (const { picture, box, face } of found) {
153
+ if (face.bottom < box.bottom - 1)
154
+ findings.push({ element: picture, message: `The picture stands ${px(box.bottom - face.bottom)} above the card's foot.` });
155
+ }
156
+ for (const [first, ...rest] of rows(found)) {
157
+ for (const { picture, face } of rest) {
158
+ if (near(face.height, first.face.height) && !near(face.top, first.face.top))
159
+ findings.push({ element: picture, message: `The picture starts ${px(Math.abs(face.top - first.face.top))} ${face.top > first.face.top ? 'lower' : 'higher'} than the one in the first card beside it.` });
160
+ }
161
+ }
162
+ return findings;
163
+ },
164
+ },
165
+ {
166
+ code: 'card.media-corners',
167
+ rule: "A picture is never rounded where it meets the card's edge: the card cuts it square there, and only a corner standing free inside the card, towards the words, keeps a picture's corner.",
168
+ components: ['ds-card'],
169
+ check: { file: 'tests/card.test.ts', test: "a picture is square where it meets the card's edge" },
170
+ measures: ['card with a media picture', 'cards with a media picture'],
171
+ count: root => cards(root).length,
172
+ inspect(root) {
173
+ return cards(root).flatMap(({ picture, box, face }) => {
174
+ const top = face.top <= box.top + 1;
175
+ const bottom = face.bottom >= box.bottom - 1;
176
+ const start = face.left <= box.left + 1;
177
+ const end = face.right >= box.right - 1;
178
+ const style = styleOf(picture);
179
+ const corners = [
180
+ ['top left', style.borderTopLeftRadius, top || start],
181
+ ['top right', style.borderTopRightRadius, top || end],
182
+ ['bottom right', style.borderBottomRightRadius, bottom || end],
183
+ ['bottom left', style.borderBottomLeftRadius, bottom || start],
184
+ ];
185
+ const rounded = corners.filter(([, radius, meets]) => meets && parseFloat(radius) > 0).map(([name]) => name);
186
+ return rounded.length ? [{ element: picture, message: `The picture's ${rounded.join(' and ')} ${rounded.length > 1 ? 'corners are' : 'corner is'} rounded where it meets the card.` }] : [];
187
+ });
188
+ },
189
+ },
190
+ {
191
+ code: 'page.window-width',
192
+ rule: 'A page is never wider than its window: nothing reaches past either edge unless something it stands in cuts it off or scrolls it, so a phone never zooms the page out or slides it sideways.',
193
+ why: 'A phone widens a page that is too wide and zooms it out, words and all, so a piece one square too wide spoils every piece on the page; check it at every phone width from 320px up.',
194
+ components: ['ds-page'],
195
+ check: { file: 'tests/page.test.ts', test: 'every column of a page can shrink to the window, and below thirty squares every layout stacks' },
196
+ measures: ['piece', 'pieces'],
197
+ count: root => drawn(root).length,
198
+ inspect(root) {
199
+ const page = root.ownerDocument ?? root;
200
+ const width = page.documentElement.clientWidth || page.defaultView?.innerWidth || 0;
201
+ if (!width)
202
+ return [];
203
+ const past = (element) => {
204
+ const box = element.getBoundingClientRect();
205
+ if (!box.width || !box.height)
206
+ return 0;
207
+ return Math.max(box.right - width, -box.left, 0);
208
+ };
209
+ const findings = [];
210
+ for (const element of drawn(root)) {
211
+ const reach = past(element);
212
+ if (reach <= 1 || styleOf(element).position === 'fixed' || contained(element))
213
+ continue;
214
+ // Only the outermost: the element whose own box first passes the edge.
215
+ if (element.parentElement && past(element.parentElement) > 1)
216
+ continue;
217
+ const box = element.getBoundingClientRect();
218
+ const side = box.right - width >= -box.left ? 'right' : 'left';
219
+ findings.push({ element, message: `It reaches ${px(reach)} past the window's ${side} edge, in a window ${px(width)} wide.` });
220
+ }
221
+ return findings;
222
+ },
223
+ },
224
+ {
225
+ code: 'carousel.sideways-scroll',
226
+ rule: 'Only a carousel scrolls pieces sideways: pieces wider than their column stand in a carousel strip or stack, and nothing else scrolls sideways but a table, a block of code or a matrix in its own frame.',
227
+ why: 'A box given overflow auto to keep a page in its window hides what is past its edge with nothing to say it is there, no snap and no controls, and a phone slides it where a finger meant to scroll down; make it a ds-carousel strip (slide-width="auto") or stack it.',
228
+ components: ['ds-carousel'],
229
+ check: { file: 'tests/carousel.test.ts', test: 'only a carousel scrolls sideways: a plain box that scrolls sideways breaks the rule, a track, a table or a block of code does not' },
230
+ measures: ['box that scrolls sideways', 'boxes that scroll sideways'],
231
+ count: root => sidewaysScrollers(root).length,
232
+ inspect(root) {
233
+ return sidewaysScrollers(root).filter(element => !element.closest(SIDEWAYS_BY_DESIGN)).map(element => ({
234
+ element,
235
+ message: `It holds ${px(element.scrollWidth)} of pieces in ${px(element.clientWidth)} and scrolls them sideways; only a carousel does that.`,
236
+ }));
237
+ },
238
+ },
239
+ ];
240
+ /** Every rule a page breaks, in the list's order. */
241
+ export function inspectConstraints(root = document) {
242
+ return constraints.flatMap(constraint => constraint.inspect(root).map(finding => ({ ...finding, constraint })));
243
+ }
244
+ /** Every rule with how many things it measured on the page and where the page breaks it, in the list's order. */
245
+ export function measureConstraints(root = document) {
246
+ return constraints.map(constraint => ({ constraint, measured: constraint.count(root), findings: constraint.inspect(root) }));
247
+ }
248
+ /** The component's name as its page is called: `ds-card` is Card. */
249
+ export const componentName = (tag) => {
250
+ const name = tag.replace(/^ds-/, '').replace(/-/g, ' ');
251
+ return name.charAt(0).toUpperCase() + name.slice(1);
252
+ };
253
+ /** The rules grouped by the first component that keeps them, in the list's order. */
254
+ export function byComponent(list = constraints) {
255
+ const groups = new Map();
256
+ for (const constraint of list) {
257
+ const tag = constraint.components[0];
258
+ groups.set(tag, [...(groups.get(tag) ?? []), constraint]);
259
+ }
260
+ return [...groups];
261
+ }
262
+ export const skillStart = '<!-- constraints:start (written by scripts/write-constraints.ts from DS1/0-face/constraints.ts) -->';
263
+ export const skillEnd = '<!-- constraints:end -->';
264
+ /** The skill's list: a line a rule, under its component, between the markers. */
265
+ export function skillBlock(list = constraints) {
266
+ const lines = [skillStart];
267
+ for (const [tag, rules] of byComponent(list)) {
268
+ lines.push('', `**${componentName(tag)}** (\`${tag}\`)`, '');
269
+ for (const { code, rule, why } of rules)
270
+ lines.push(`- \`${code}\`: ${rule}${why ? ` ${why}` : ''}`);
271
+ }
272
+ lines.push('', skillEnd);
273
+ return lines.join('\n');
274
+ }
@@ -93,5 +93,5 @@ async function say(copied, words) {
93
93
  if (copied)
94
94
  toast.success(words);
95
95
  else
96
- toast.error(words);
96
+ toast.error(words, { failure: { code: "clipboard.copy", message: "Clipboard copy failed" } });
97
97
  }
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Cut words fade, never an ellipsis. Wherever Design system 1 cuts words that do
3
+ * not fit (a row's name, a tag, a menu entry, a calendar's title), they fade out
4
+ * over their last square (`var(--ds-unit)`), a mask on the words, so they fade
5
+ * into whatever is behind them. Words that fit stay crisp: the fade is drawn
6
+ * only while an element is marked `data-cut="end"`, and this module is what
7
+ * measures and marks it.
8
+ *
9
+ * Every stylesheet writes the fade the same way: the element clips
10
+ * (`text-overflow: clip`), and only under `[data-cut="end"]` takes
11
+ * `mask-image: linear-gradient(to right, #000 calc(100% - var(--ds-unit)), transparent)`,
12
+ * the gradient running to the left in a right-to-left page.
13
+ *
14
+ * - `watchCuts()` is the watcher a component owns: it marks the elements it
15
+ * watches while `scrollWidth > clientWidth + 1`, measures again when they
16
+ * resize, when `measure()` is called (after a render, since words can change
17
+ * without the box resizing), once the page's fonts have loaded and, with
18
+ * `text: true`, when the words inside them change. `disconnect()` lets go.
19
+ * - Every watcher measures in the next frame, together with every other one:
20
+ * all widths are read, then all marks written, so a page building a few
21
+ * hundred words lays itself out once for them rather than once each. Read
22
+ * one by one, after each element connected or updated, the words of Ezo's
23
+ * landing page laid it out again two hundred times, over half a second.
24
+ * Elements that resize are measured the same way, in one pass for all.
25
+ * - `CutFades` is the same watcher as a Lit reactive controller: it starts when
26
+ * its element connects, measures after every update and stops when it
27
+ * disconnects.
28
+ * - `startCutFades()` is for a page without Lit: it marks DS1's native classes
29
+ * (`.ds-row__name`, `.ds-sidebar__label`, `.ds-menu__item`, …) in the page,
30
+ * and keeps marking them as the page changes. It returns a function that
31
+ * stops it.
32
+ */
33
+ /** The attribute a cut element carries: `data-cut="end"`. */
34
+ export declare const CUT_ATTRIBUTE = "data-cut";
35
+ /**
36
+ * The native classes DS1's stylesheets fade when they are marked cut, for
37
+ * `startCutFades()` on a page without Lit.
38
+ */
39
+ export declare const CUT_FADE_SELECTOR: string;
40
+ /** Whether an element's words are wider than its box. */
41
+ export declare function isCut(element: Element): boolean;
42
+ /** Marks an element `data-cut="end"` while its words do not fit, and takes the mark off when they do. Returns whether it is cut. */
43
+ export declare function markCut(element: Element): boolean;
44
+ /** Elements to watch: one, several, or a function that finds them again at each measure. */
45
+ export type CutSource = Element | Iterable<Element> | (() => Iterable<Element>);
46
+ export type CutWatchOptions = {
47
+ /** Also measure again when the words inside a watched element change (a MutationObserver). */
48
+ text?: boolean;
49
+ };
50
+ export type CutWatcher = {
51
+ /** Watches these elements and measures them. A function is asked again at each measure, so elements a render adds are taken in. */
52
+ watch(source: CutSource): void;
53
+ /** Watches what matches `selector` inside `root`, found again at each measure. */
54
+ select(root: ParentNode, selector: string): void;
55
+ /** Measures every watched element again: after a render, or when words change. */
56
+ measure(): void;
57
+ /** Stops watching and lets every element go. Marks stay as they are. */
58
+ disconnect(): void;
59
+ };
60
+ /** A watcher that marks the elements it watches `data-cut="end"` while their words do not fit. */
61
+ export declare function watchCuts(options?: CutWatchOptions): CutWatcher;
62
+ /**
63
+ * The part of a Lit element `CutFades` uses, so this module needs nothing from
64
+ * Lit. The render root is read as a node to search; it is typed loosely so an
65
+ * element type-checks in every product, whichever DOM library it compiles with.
66
+ */
67
+ type ControllerHost = Element & {
68
+ addController(controller: {
69
+ hostConnected?(): void;
70
+ hostUpdated?(): void;
71
+ hostDisconnected?(): void;
72
+ }): void;
73
+ readonly renderRoot?: unknown;
74
+ };
75
+ export type CutFadeOptions = {
76
+ /** What to measure in the element's render root (its shadow root), found again after every update. */
77
+ selector?: string;
78
+ /** Other elements to measure, asked again after every update: the host itself, its slotted children. */
79
+ targets?: () => Iterable<Element>;
80
+ /** Also measure again when the element's own children or words change (the words slotted into it). */
81
+ text?: boolean;
82
+ };
83
+ /**
84
+ * The cut-words watcher as a Lit reactive controller:
85
+ * `protected readonly cuts = new CutFades(this, { selector: ".label" })`. It watches from
86
+ * when the element connects to when it disconnects, and measures after every
87
+ * update; call `measure()` when words change outside an update.
88
+ */
89
+ export declare class CutFades {
90
+ private watcher;
91
+ private words;
92
+ private readonly host;
93
+ private readonly options;
94
+ constructor(host: ControllerHost, options: CutFadeOptions);
95
+ hostConnected(): void;
96
+ hostUpdated(): void;
97
+ hostDisconnected(): void;
98
+ /** Measures again, as after an update. */
99
+ measure(): void;
100
+ }
101
+ /**
102
+ * Marks DS1's native classes cut on a page without Lit, so their words fade
103
+ * where they are cut, and keeps marking them as the page changes. Returns a
104
+ * function that stops it.
105
+ *
106
+ * @example
107
+ * // A module script on the page, beside one.css and controls.css (Sync 1 `root` `"modules": ["cut-fade"]`):
108
+ * startCutFades();
109
+ */
110
+ export declare function startCutFades(root?: ParentNode, selector?: string): () => void;
111
+ export {};
112
+ //# sourceMappingURL=cut-fade.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cut-fade.d.ts","sourceRoot":"","sources":["../../DS1/0-face/cut-fade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,6DAA6D;AAC7D,eAAO,MAAM,aAAa,aAAa,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAYlB,CAAC;AAEb,yDAAyD;AACzD,wBAAgB,KAAK,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE/C;AAED,oIAAoI;AACpI,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAOjD;AAED,4FAA4F;AAC5F,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAEhF,MAAM,MAAM,eAAe,GAAG;IAC5B,8FAA8F;IAC9F,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,mIAAmI;IACnI,KAAK,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;IAC/B,kFAAkF;IAClF,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjD,kFAAkF;IAClF,OAAO,IAAI,IAAI,CAAC;IAChB,wEAAwE;IACxE,UAAU,IAAI,IAAI,CAAC;CACpB,CAAC;AAoFF,kGAAkG;AAClG,wBAAgB,SAAS,CAAC,OAAO,GAAE,eAAoB,GAAG,UAAU,CAoDnE;AAGD;;;;GAIG;AACH,KAAK,cAAc,GAAG,OAAO,GAAG;IAC9B,aAAa,CAAC,UAAU,EAAE;QAAE,aAAa,CAAC,IAAI,IAAI,CAAC;QAAC,WAAW,CAAC,IAAI,IAAI,CAAC;QAAC,gBAAgB,CAAC,IAAI,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;IAC7G,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,sGAAsG;IACtG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wGAAwG;IACxG,OAAO,CAAC,EAAE,MAAM,QAAQ,CAAC,OAAO,CAAC,CAAC;IAClC,sGAAsG;IACtG,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF;;;;;GAKG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,OAAO,CAAyB;IACxC,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAiB;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;gBAE7B,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc;IAMzD,aAAa;IAcb,WAAW;IAEX,gBAAgB;IAOhB,0CAA0C;IAC1C,OAAO;CACR;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,IAAI,GAAE,UAAqB,EAAE,QAAQ,GAAE,MAA0B,GAAG,MAAM,IAAI,CAY3G"}