@webtides/element-library 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/CHANGELOG.md +384 -3
  2. package/README.md +61 -41
  3. package/all.js +28 -0
  4. package/catalog.d.ts +14 -0
  5. package/catalog.js +55 -27
  6. package/custom-elements.json +16604 -3420
  7. package/package.json +35 -28
  8. package/src/components/accordion/accordion.changelog.md +10 -0
  9. package/src/components/accordion/accordion.js +10 -7
  10. package/src/components/accordion/accordion.readme.md +2 -0
  11. package/src/components/accordion/accordion.style.js +8 -0
  12. package/src/components/amount-field/amount-field.changelog.md +23 -3
  13. package/src/components/amount-field/amount-field.js +53 -26
  14. package/src/components/amount-field/amount-field.readme.md +82 -20
  15. package/src/components/amount-field/amount-field.style.js +111 -47
  16. package/src/components/avatar/avatar.changelog.md +23 -0
  17. package/src/components/avatar/avatar.define.js +3 -0
  18. package/src/components/avatar/avatar.js +115 -0
  19. package/src/components/avatar/avatar.readme.md +132 -0
  20. package/src/components/avatar/avatar.style.js +67 -0
  21. package/src/components/badge/badge.changelog.md +23 -0
  22. package/src/components/badge/badge.define.js +3 -0
  23. package/src/components/badge/badge.js +59 -0
  24. package/src/components/badge/badge.readme.md +109 -0
  25. package/src/components/badge/badge.style.js +63 -0
  26. package/src/components/breadcrumb/breadcrumb.changelog.md +22 -0
  27. package/src/components/breadcrumb/breadcrumb.define.js +3 -0
  28. package/src/components/breadcrumb/breadcrumb.js +47 -0
  29. package/src/components/breadcrumb/breadcrumb.readme.md +108 -0
  30. package/src/components/breadcrumb/breadcrumb.style.js +20 -0
  31. package/src/components/breadcrumb-item/breadcrumb-item.changelog.md +23 -0
  32. package/src/components/breadcrumb-item/breadcrumb-item.define.js +3 -0
  33. package/src/components/breadcrumb-item/breadcrumb-item.js +82 -0
  34. package/src/components/breadcrumb-item/breadcrumb-item.readme.md +106 -0
  35. package/src/components/breadcrumb-item/breadcrumb-item.style.js +92 -0
  36. package/src/components/button/button.changelog.md +34 -1
  37. package/src/components/button/button.js +285 -29
  38. package/src/components/button/button.readme.md +130 -10
  39. package/src/components/button/button.style.js +99 -120
  40. package/src/components/button-group/button-group.changelog.md +24 -0
  41. package/src/components/button-group/button-group.define.js +3 -0
  42. package/src/components/button-group/button-group.js +53 -0
  43. package/src/components/button-group/button-group.readme.md +114 -0
  44. package/src/components/button-group/button-group.style.js +41 -0
  45. package/src/components/card/card.changelog.md +23 -0
  46. package/src/components/card/card.define.js +3 -0
  47. package/src/components/card/card.js +73 -0
  48. package/src/components/card/card.readme.md +136 -0
  49. package/src/components/card/card.style.js +99 -0
  50. package/src/components/carousel/carousel.changelog.md +20 -0
  51. package/src/components/carousel/carousel.js +89 -40
  52. package/src/components/carousel/carousel.readme.md +39 -6
  53. package/src/components/carousel/carousel.style.js +21 -77
  54. package/src/components/carousel/glide/components/ShadowAnchors.js +3 -1
  55. package/src/components/carousel/glide/components/ShadowClones.js +21 -24
  56. package/src/components/carousel/glide/components/ShadowGaps.js +2 -2
  57. package/src/components/carousel/glide/components/ShadowHtml.js +22 -3
  58. package/src/components/checkbox-field/checkbox-field.changelog.md +19 -0
  59. package/src/components/checkbox-field/checkbox-field.js +25 -10
  60. package/src/components/checkbox-field/checkbox-field.readme.md +17 -4
  61. package/src/components/checkbox-field/checkbox-field.style.js +15 -3
  62. package/src/components/checkbox-group-field/checkbox-group-field.changelog.md +25 -0
  63. package/src/components/checkbox-group-field/checkbox-group-field.define.js +3 -0
  64. package/src/components/checkbox-group-field/checkbox-group-field.js +217 -0
  65. package/src/components/checkbox-group-field/checkbox-group-field.readme.md +95 -0
  66. package/src/components/checkbox-group-field/checkbox-group-field.style.js +62 -0
  67. package/src/components/color-field/color-field.changelog.md +24 -0
  68. package/src/components/color-field/color-field.define.js +3 -0
  69. package/src/components/color-field/color-field.js +184 -0
  70. package/src/components/color-field/color-field.readme.md +95 -0
  71. package/src/components/color-field/color-field.style.js +39 -0
  72. package/src/components/combobox-field/combobox-field.changelog.md +23 -0
  73. package/src/components/combobox-field/combobox-field.define.js +3 -0
  74. package/src/components/combobox-field/combobox-field.js +97 -0
  75. package/src/components/combobox-field/combobox-field.readme.md +93 -0
  76. package/src/components/combobox-field/combobox-field.style.js +56 -0
  77. package/src/components/copy-button/copy-button.changelog.md +24 -0
  78. package/src/components/copy-button/copy-button.define.js +3 -0
  79. package/src/components/copy-button/copy-button.events.js +4 -0
  80. package/src/components/copy-button/copy-button.js +237 -0
  81. package/src/components/copy-button/copy-button.readme.md +134 -0
  82. package/src/components/copy-button/copy-button.style.js +109 -0
  83. package/src/components/date-field/date-field.changelog.md +24 -0
  84. package/src/components/date-field/date-field.define.js +3 -0
  85. package/src/components/date-field/date-field.js +119 -0
  86. package/src/components/date-field/date-field.readme.md +110 -0
  87. package/src/components/date-field/date-field.style.js +53 -0
  88. package/src/components/dialog/dialog.changelog.md +16 -1
  89. package/src/components/dialog/dialog.js +252 -57
  90. package/src/components/dialog/dialog.readme.md +36 -4
  91. package/src/components/dialog/dialog.style.js +9 -109
  92. package/src/components/divider/divider.changelog.md +23 -0
  93. package/src/components/divider/divider.define.js +3 -0
  94. package/src/components/divider/divider.js +48 -0
  95. package/src/components/divider/divider.readme.md +101 -0
  96. package/src/components/divider/divider.style.js +50 -0
  97. package/src/components/drawer/drawer.changelog.md +25 -0
  98. package/src/components/drawer/drawer.define.js +3 -0
  99. package/src/components/drawer/drawer.events.js +8 -0
  100. package/src/components/drawer/drawer.js +80 -0
  101. package/src/components/drawer/drawer.readme.md +194 -0
  102. package/src/components/drawer/drawer.style.js +83 -0
  103. package/src/components/dropdown/dropdown.js +9 -7
  104. package/src/components/empty-state/empty-state.changelog.md +22 -0
  105. package/src/components/empty-state/empty-state.define.js +3 -0
  106. package/src/components/empty-state/empty-state.js +55 -0
  107. package/src/components/empty-state/empty-state.readme.md +114 -0
  108. package/src/components/empty-state/empty-state.style.js +60 -0
  109. package/src/components/file-field/file-field.changelog.md +24 -0
  110. package/src/components/file-field/file-field.define.js +3 -0
  111. package/src/components/file-field/file-field.js +205 -0
  112. package/src/components/file-field/file-field.readme.md +103 -0
  113. package/src/components/file-field/file-field.style.js +28 -0
  114. package/src/components/form-field/form-field.changelog.md +25 -0
  115. package/src/components/form-field/form-field.js +212 -15
  116. package/src/components/form-field/form-field.readme.md +82 -18
  117. package/src/components/form-field/form-field.style.js +6 -24
  118. package/src/components/input-field/input-field.changelog.md +24 -0
  119. package/src/components/input-field/input-field.js +82 -6
  120. package/src/components/input-field/input-field.readme.md +34 -5
  121. package/src/components/input-field/input-field.style.js +32 -13
  122. package/src/components/notification/notification.changelog.md +21 -1
  123. package/src/components/notification/notification.js +80 -74
  124. package/src/components/notification/notification.readme.md +54 -13
  125. package/src/components/notification/notification.style.js +37 -22
  126. package/src/components/otp-field/otp-field.changelog.md +23 -0
  127. package/src/components/otp-field/otp-field.define.js +3 -0
  128. package/src/components/otp-field/otp-field.events.js +3 -0
  129. package/src/components/otp-field/otp-field.js +172 -0
  130. package/src/components/otp-field/otp-field.readme.md +111 -0
  131. package/src/components/otp-field/otp-field.style.js +53 -0
  132. package/src/components/pagination/pagination.changelog.md +30 -0
  133. package/src/components/pagination/pagination.define.js +3 -0
  134. package/src/components/pagination/pagination.events.js +3 -0
  135. package/src/components/pagination/pagination.js +282 -0
  136. package/src/components/pagination/pagination.readme.md +167 -0
  137. package/src/components/pagination/pagination.style.js +162 -0
  138. package/src/components/password-field/password-field.changelog.md +24 -0
  139. package/src/components/password-field/password-field.js +7 -1
  140. package/src/components/password-field/password-field.readme.md +15 -6
  141. package/src/components/password-field/password-field.style.js +36 -13
  142. package/src/components/popover/popover.changelog.md +24 -0
  143. package/src/components/popover/popover.define.js +3 -0
  144. package/src/components/popover/popover.events.js +4 -0
  145. package/src/components/popover/popover.js +255 -0
  146. package/src/components/popover/popover.readme.md +132 -0
  147. package/src/components/popover/popover.style.js +41 -0
  148. package/src/components/progress-bar/progress-bar.changelog.md +23 -0
  149. package/src/components/progress-bar/progress-bar.define.js +3 -0
  150. package/src/components/progress-bar/progress-bar.js +80 -0
  151. package/src/components/progress-bar/progress-bar.readme.md +110 -0
  152. package/src/components/progress-bar/progress-bar.style.js +93 -0
  153. package/src/components/progress-ring/progress-ring.changelog.md +23 -0
  154. package/src/components/progress-ring/progress-ring.define.js +3 -0
  155. package/src/components/progress-ring/progress-ring.js +83 -0
  156. package/src/components/progress-ring/progress-ring.readme.md +115 -0
  157. package/src/components/progress-ring/progress-ring.style.js +85 -0
  158. package/src/components/radio-field/radio-field.changelog.md +16 -0
  159. package/src/components/radio-field/radio-field.js +34 -11
  160. package/src/components/radio-field/radio-field.readme.md +13 -8
  161. package/src/components/radio-field/radio-field.style.js +17 -65
  162. package/src/components/range-field/range-field.changelog.md +24 -0
  163. package/src/components/range-field/range-field.define.js +3 -0
  164. package/src/components/range-field/range-field.js +167 -0
  165. package/src/components/range-field/range-field.readme.md +87 -0
  166. package/src/components/range-field/range-field.style.js +41 -0
  167. package/src/components/rating-field/rating-field.changelog.md +24 -0
  168. package/src/components/rating-field/rating-field.define.js +3 -0
  169. package/src/components/rating-field/rating-field.js +195 -0
  170. package/src/components/rating-field/rating-field.readme.md +82 -0
  171. package/src/components/rating-field/rating-field.style.js +79 -0
  172. package/src/components/select-field/select-field.changelog.md +17 -0
  173. package/src/components/select-field/select-field.js +100 -8
  174. package/src/components/select-field/select-field.readme.md +32 -6
  175. package/src/components/select-field/select-field.style.js +19 -9
  176. package/src/components/skeleton/skeleton.changelog.md +22 -0
  177. package/src/components/skeleton/skeleton.define.js +3 -0
  178. package/src/components/skeleton/skeleton.js +49 -0
  179. package/src/components/skeleton/skeleton.readme.md +115 -0
  180. package/src/components/skeleton/skeleton.style.js +79 -0
  181. package/src/components/slider/slider.changelog.md +15 -0
  182. package/src/components/slider/slider.js +37 -5
  183. package/src/components/slider/slider.readme.md +28 -6
  184. package/src/components/slider/slider.style.js +7 -71
  185. package/src/components/spinner/spinner.changelog.md +22 -0
  186. package/src/components/spinner/spinner.define.js +3 -0
  187. package/src/components/spinner/spinner.js +48 -0
  188. package/src/components/spinner/spinner.readme.md +98 -0
  189. package/src/components/spinner/spinner.style.js +44 -0
  190. package/src/components/switch-field/switch-field.changelog.md +16 -0
  191. package/src/components/switch-field/switch-field.js +17 -9
  192. package/src/components/switch-field/switch-field.readme.md +11 -4
  193. package/src/components/switch-field/switch-field.style.js +13 -13
  194. package/src/components/tab-group/tab-group.changelog.md +19 -0
  195. package/src/components/tab-group/tab-group.js +122 -10
  196. package/src/components/tab-group/tab-group.readme.md +25 -4
  197. package/src/components/tab-link/tab-link.changelog.md +16 -0
  198. package/src/components/tab-link/tab-link.js +51 -8
  199. package/src/components/tab-link/tab-link.readme.md +14 -8
  200. package/src/components/tab-link/tab-link.style.js +13 -0
  201. package/src/components/tab-panel/tab-panel.changelog.md +8 -2
  202. package/src/components/tab-panel/tab-panel.js +7 -3
  203. package/src/components/tab-panel/tab-panel.readme.md +7 -5
  204. package/src/components/tag/tag.changelog.md +24 -0
  205. package/src/components/tag/tag.define.js +3 -0
  206. package/src/components/tag/tag.events.js +3 -0
  207. package/src/components/tag/tag.js +116 -0
  208. package/src/components/tag/tag.readme.md +119 -0
  209. package/src/components/tag/tag.style.js +101 -0
  210. package/src/components/tag-field/tag-field.changelog.md +25 -0
  211. package/src/components/tag-field/tag-field.define.js +3 -0
  212. package/src/components/tag-field/tag-field.js +359 -0
  213. package/src/components/tag-field/tag-field.readme.md +113 -0
  214. package/src/components/tag-field/tag-field.style.js +62 -0
  215. package/src/components/textarea-field/textarea-field.changelog.md +28 -4
  216. package/src/components/textarea-field/textarea-field.js +68 -14
  217. package/src/components/textarea-field/textarea-field.readme.md +45 -9
  218. package/src/components/textarea-field/textarea-field.style.js +45 -2
  219. package/src/components/toast/toast.changelog.md +24 -0
  220. package/src/components/toast/toast.define.js +3 -0
  221. package/src/components/toast/toast.js +193 -0
  222. package/src/components/toast/toast.readme.md +189 -0
  223. package/src/components/toast/toast.style.js +74 -0
  224. package/src/components/tooltip/tooltip.changelog.md +24 -0
  225. package/src/components/tooltip/tooltip.define.js +3 -0
  226. package/src/components/tooltip/tooltip.events.js +4 -0
  227. package/src/components/tooltip/tooltip.js +377 -0
  228. package/src/components/tooltip/tooltip.readme.md +172 -0
  229. package/src/components/tooltip/tooltip.style.js +107 -0
  230. package/src/components/transition-classes/transition-classes.js +6 -6
  231. package/src/styles/appearance.style.js +42 -0
  232. package/src/styles/arrow.style.js +65 -0
  233. package/src/styles/choice-group.style.js +94 -0
  234. package/src/styles/form-control.style.js +79 -0
  235. package/src/styles/host.style.js +55 -0
  236. package/src/styles/layers.css +31 -0
  237. package/src/styles/modal.style.js +146 -0
  238. package/src/styles/native.css +275 -0
  239. package/src/styles/size.style.js +48 -0
  240. package/src/styles/slide-controls.style.js +225 -0
  241. package/src/styles/utilities.css +30 -0
  242. package/src/styles/variants.style.js +78 -0
  243. package/src/themes/default.css +86 -142
  244. package/src/themes/high-contrast.css +72 -129
  245. package/src/themes/sketchy.css +95 -175
  246. package/src/utils/floating.js +71 -0
  247. package/src/utils/focus.js +18 -0
  248. package/src/utils/progress.js +25 -0
  249. package/src/utils/slots.js +21 -0
  250. package/src/utils/text-entry-attributes.js +51 -0
  251. package/types/all.d.ts +54 -1
  252. package/types/index.d.ts +1 -0
  253. package/types/src/components/accordion/accordion.d.ts +6 -4
  254. package/types/src/components/accordion/accordion.events.d.ts +3 -3
  255. package/types/src/components/accordion-group/accordion-group.d.ts +4 -3
  256. package/types/src/components/amount-field/amount-field.d.ts +30 -16
  257. package/types/src/components/avatar/avatar.d.ts +57 -0
  258. package/types/src/components/avatar/avatar.define.d.ts +1 -0
  259. package/types/src/components/avatar/avatar.style.d.ts +2 -0
  260. package/types/src/components/badge/badge.d.ts +32 -0
  261. package/types/src/components/badge/badge.define.d.ts +1 -0
  262. package/types/src/components/badge/badge.style.d.ts +2 -0
  263. package/types/src/components/breadcrumb/breadcrumb.d.ts +27 -0
  264. package/types/src/components/breadcrumb/breadcrumb.define.d.ts +1 -0
  265. package/types/src/components/breadcrumb/breadcrumb.style.d.ts +2 -0
  266. package/types/src/components/breadcrumb-item/breadcrumb-item.d.ts +38 -0
  267. package/types/src/components/breadcrumb-item/breadcrumb-item.define.d.ts +1 -0
  268. package/types/src/components/breadcrumb-item/breadcrumb-item.style.d.ts +2 -0
  269. package/types/src/components/button/button.d.ts +129 -14
  270. package/types/src/components/button-group/button-group.d.ts +28 -0
  271. package/types/src/components/button-group/button-group.define.d.ts +1 -0
  272. package/types/src/components/button-group/button-group.style.d.ts +2 -0
  273. package/types/src/components/card/card.d.ts +40 -0
  274. package/types/src/components/card/card.define.d.ts +1 -0
  275. package/types/src/components/card/card.style.d.ts +2 -0
  276. package/types/src/components/carousel/carousel.d.ts +22 -8
  277. package/types/src/components/carousel/carousel.events.d.ts +3 -3
  278. package/types/src/components/carousel/glide/components/ShadowAnchors.d.ts +1 -1
  279. package/types/src/components/carousel/glide/components/ShadowClones.d.ts +8 -1
  280. package/types/src/components/carousel/glide/components/ShadowGaps.d.ts +1 -1
  281. package/types/src/components/carousel/glide/components/ShadowHtml.d.ts +1 -1
  282. package/types/src/components/carousel/glide/components/glide-html.d.ts +1 -1
  283. package/types/src/components/checkbox-field/checkbox-field.d.ts +22 -15
  284. package/types/src/components/checkbox-group-field/checkbox-group-field.d.ts +100 -0
  285. package/types/src/components/checkbox-group-field/checkbox-group-field.define.d.ts +1 -0
  286. package/types/src/components/checkbox-group-field/checkbox-group-field.style.d.ts +2 -0
  287. package/types/src/components/color-field/color-field.d.ts +102 -0
  288. package/types/src/components/color-field/color-field.define.d.ts +1 -0
  289. package/types/src/components/color-field/color-field.style.d.ts +2 -0
  290. package/types/src/components/combobox-field/combobox-field.d.ts +84 -0
  291. package/types/src/components/combobox-field/combobox-field.define.d.ts +1 -0
  292. package/types/src/components/combobox-field/combobox-field.style.d.ts +2 -0
  293. package/types/src/components/copy-button/copy-button.d.ts +93 -0
  294. package/types/src/components/copy-button/copy-button.define.d.ts +1 -0
  295. package/types/src/components/copy-button/copy-button.events.d.ts +5 -0
  296. package/types/src/components/copy-button/copy-button.style.d.ts +2 -0
  297. package/types/src/components/date-field/date-field.d.ts +102 -0
  298. package/types/src/components/date-field/date-field.define.d.ts +1 -0
  299. package/types/src/components/date-field/date-field.style.d.ts +2 -0
  300. package/types/src/components/dialog/dialog.d.ts +101 -19
  301. package/types/src/components/dialog/dialog.events.d.ts +8 -8
  302. package/types/src/components/divider/divider.d.ts +27 -0
  303. package/types/src/components/divider/divider.define.d.ts +1 -0
  304. package/types/src/components/divider/divider.style.d.ts +2 -0
  305. package/types/src/components/drawer/drawer.d.ts +70 -0
  306. package/types/src/components/drawer/drawer.define.d.ts +1 -0
  307. package/types/src/components/drawer/drawer.events.d.ts +9 -0
  308. package/types/src/components/drawer/drawer.style.d.ts +2 -0
  309. package/types/src/components/dropdown/dropdown.d.ts +5 -3
  310. package/types/src/components/empty-state/empty-state.d.ts +29 -0
  311. package/types/src/components/empty-state/empty-state.define.d.ts +1 -0
  312. package/types/src/components/empty-state/empty-state.style.d.ts +2 -0
  313. package/types/src/components/file-field/file-field.d.ts +115 -0
  314. package/types/src/components/file-field/file-field.define.d.ts +1 -0
  315. package/types/src/components/file-field/file-field.style.d.ts +2 -0
  316. package/types/src/components/form-field/form-field.d.ts +129 -14
  317. package/types/src/components/form-field/form-field.events.d.ts +4 -4
  318. package/types/src/components/input-field/input-field.d.ts +52 -5
  319. package/types/src/components/lazy-src/lazy-src.d.ts +7 -5
  320. package/types/src/components/lazy-src/lazy-src.events.d.ts +5 -5
  321. package/types/src/components/notification/notification.d.ts +18 -18
  322. package/types/src/components/notification/notification.events.d.ts +6 -6
  323. package/types/src/components/otp-field/otp-field.d.ts +130 -0
  324. package/types/src/components/otp-field/otp-field.define.d.ts +1 -0
  325. package/types/src/components/otp-field/otp-field.events.d.ts +4 -0
  326. package/types/src/components/otp-field/otp-field.style.d.ts +2 -0
  327. package/types/src/components/pagination/pagination.d.ts +117 -0
  328. package/types/src/components/pagination/pagination.define.d.ts +1 -0
  329. package/types/src/components/pagination/pagination.events.d.ts +4 -0
  330. package/types/src/components/pagination/pagination.style.d.ts +2 -0
  331. package/types/src/components/password-field/password-field.d.ts +29 -12
  332. package/types/src/components/popover/popover.d.ts +123 -0
  333. package/types/src/components/popover/popover.define.d.ts +1 -0
  334. package/types/src/components/popover/popover.events.d.ts +5 -0
  335. package/types/src/components/popover/popover.style.d.ts +2 -0
  336. package/types/src/components/progress-bar/progress-bar.d.ts +35 -0
  337. package/types/src/components/progress-bar/progress-bar.define.d.ts +1 -0
  338. package/types/src/components/progress-bar/progress-bar.style.d.ts +2 -0
  339. package/types/src/components/progress-ring/progress-ring.d.ts +40 -0
  340. package/types/src/components/progress-ring/progress-ring.define.d.ts +1 -0
  341. package/types/src/components/progress-ring/progress-ring.style.d.ts +2 -0
  342. package/types/src/components/radio-field/radio-field.d.ts +21 -9
  343. package/types/src/components/range-field/range-field.d.ts +94 -0
  344. package/types/src/components/range-field/range-field.define.d.ts +1 -0
  345. package/types/src/components/range-field/range-field.style.d.ts +2 -0
  346. package/types/src/components/rating-field/rating-field.d.ts +96 -0
  347. package/types/src/components/rating-field/rating-field.define.d.ts +1 -0
  348. package/types/src/components/rating-field/rating-field.style.d.ts +2 -0
  349. package/types/src/components/scroll-to/scroll-to.d.ts +3 -2
  350. package/types/src/components/scroll-to-top/scroll-to-top.d.ts +4 -2
  351. package/types/src/components/select-field/select-field.d.ts +55 -5
  352. package/types/src/components/skeleton/skeleton.d.ts +29 -0
  353. package/types/src/components/skeleton/skeleton.define.d.ts +1 -0
  354. package/types/src/components/skeleton/skeleton.style.d.ts +2 -0
  355. package/types/src/components/slider/slider.d.ts +14 -8
  356. package/types/src/components/slider/slider.events.d.ts +4 -4
  357. package/types/src/components/spinner/spinner.d.ts +28 -0
  358. package/types/src/components/spinner/spinner.define.d.ts +1 -0
  359. package/types/src/components/spinner/spinner.style.d.ts +2 -0
  360. package/types/src/components/sticky/sticky.d.ts +4 -2
  361. package/types/src/components/svg-use/svg-use.d.ts +4 -2
  362. package/types/src/components/switch-field/switch-field.d.ts +17 -15
  363. package/types/src/components/tab-group/tab-group.d.ts +44 -3
  364. package/types/src/components/tab-link/tab-link.d.ts +33 -10
  365. package/types/src/components/tab-panel/tab-panel.d.ts +8 -5
  366. package/types/src/components/tag/tag.d.ts +53 -0
  367. package/types/src/components/tag/tag.define.d.ts +1 -0
  368. package/types/src/components/tag/tag.events.d.ts +4 -0
  369. package/types/src/components/tag/tag.style.d.ts +2 -0
  370. package/types/src/components/tag-field/tag-field.d.ts +178 -0
  371. package/types/src/components/tag-field/tag-field.define.d.ts +1 -0
  372. package/types/src/components/tag-field/tag-field.style.d.ts +2 -0
  373. package/types/src/components/textarea-field/textarea-field.d.ts +44 -4
  374. package/types/src/components/toast/toast.d.ts +110 -0
  375. package/types/src/components/toast/toast.define.d.ts +1 -0
  376. package/types/src/components/toast/toast.style.d.ts +2 -0
  377. package/types/src/components/tooltip/tooltip.d.ts +161 -0
  378. package/types/src/components/tooltip/tooltip.define.d.ts +1 -0
  379. package/types/src/components/tooltip/tooltip.events.d.ts +5 -0
  380. package/types/src/components/tooltip/tooltip.style.d.ts +2 -0
  381. package/types/src/components/transition-classes/transition-classes.d.ts +9 -8
  382. package/types/src/styles/appearance.style.d.ts +18 -0
  383. package/types/src/styles/arrow.style.d.ts +15 -0
  384. package/types/src/styles/choice-group.style.d.ts +23 -0
  385. package/types/src/styles/form-control.style.d.ts +26 -0
  386. package/types/src/styles/host.style.d.ts +24 -0
  387. package/types/src/styles/modal.style.d.ts +20 -0
  388. package/types/src/styles/size.style.d.ts +20 -0
  389. package/types/src/styles/slide-controls.style.d.ts +20 -0
  390. package/types/src/styles/variants.style.d.ts +32 -0
  391. package/types/src/utils/body-scroll.d.ts +12 -2
  392. package/types/src/utils/floating.d.ts +36 -0
  393. package/types/src/utils/focus.d.ts +16 -0
  394. package/types/src/utils/progress.d.ts +19 -0
  395. package/types/src/utils/slots.d.ts +19 -0
  396. package/types/src/utils/text-entry-attributes.d.ts +18 -0
  397. package/types/src/utils/transitions.d.ts +2 -2
  398. package/web-types.json +6590 -1584
@@ -0,0 +1,109 @@
1
+ # Badge
2
+
3
+ `badge` is a short label that marks something with a status or a count: "New", "Beta", "3". It is pure presentation, without a role and without behaviour. It speaks the library's shared vocabulary for its colours: a semantic `variant` and an `appearance`.
4
+
5
+ Without a theme imported the badge has a muted surface and the text that goes with it, a light surface in a light colour scheme and a dark one in a dark scheme; import a theme to skin it.
6
+
7
+ ## How to use
8
+
9
+ #### Install
10
+
11
+ ```sh
12
+ npm i --save @webtides/element-library
13
+ ```
14
+
15
+ #### Use
16
+
17
+ ```js
18
+ import '@webtides/element-library/badge/define';
19
+ ```
20
+
21
+ ```html
22
+ <el-badge variant="brand">New</el-badge>
23
+
24
+ <!-- Outlined, or as text only -->
25
+ <el-badge variant="success" appearance="outlined">passing</el-badge>
26
+
27
+ <!-- A count, as a circle -->
28
+ <el-badge variant="danger" pill="true">3</el-badge>
29
+
30
+ <!-- Catches the eye -->
31
+ <el-badge variant="danger" pill="true" pulse="true">Live</el-badge>
32
+ ```
33
+
34
+ > Boolean attributes are passed as strings (`pill="true"`), matching the rest of the library.
35
+
36
+ ## API
37
+
38
+ #### Properties/Attributes
39
+
40
+ | Name | Type | Default | Description |
41
+ | --- | --- | --- | --- |
42
+ | `variant` | `string` | `'neutral'` | `neutral`, `brand`, `success`, `warning` or `danger`. Picks the colours. Reflected. |
43
+ | `appearance` | `string` | `'filled'` | `filled`, `outlined` or `plain`. How the colours of the variant are painted. Reflected. |
44
+ | `pill` | `boolean` | `false` | Fully rounded ends. A badge with a single character is a circle. |
45
+ | `pulse` | `boolean` | `false` | Draws attention: a ring spreads from the badge, again and again. |
46
+
47
+ #### Methods
48
+
49
+ _None._
50
+
51
+ #### Events
52
+
53
+ _None._
54
+
55
+ #### Slots
56
+
57
+ | Name | Description |
58
+ | ----------- | ---------------------- |
59
+ | _(default)_ | The text of the badge. |
60
+
61
+ #### CSS Parts
62
+
63
+ | Name | Description |
64
+ | ------ | ----------------------------------------------------- |
65
+ | `base` | The surface of the badge: background, border, radius. |
66
+
67
+ #### CSS Custom Properties
68
+
69
+ Reads the standard library design tokens: the colours of the variants, `--el-border-width`, `--el-radius-md` and `--el-font-family`.
70
+
71
+ Each variant reads one colour: `--el-color-accent` (`brand`), `--el-color-success`, `--el-color-warning` and `--el-color-danger`. `neutral` reads the surface tokens: `--el-color-bg-muted` for the fill, `--el-color-border` for the border and `--el-color-fg` for the text. The text on a brand, success or danger fill is `--el-color-bg`; a warning fill carries dark text.
72
+
73
+ ## Variant and appearance
74
+
75
+ The two properties are independent of each other, and every combination works.
76
+
77
+ | `appearance` | What is painted |
78
+ | --- | --- |
79
+ | `filled` | The fill of the variant, its border, and the text colour for that fill. |
80
+ | `outlined` | No fill. The border and the text have the colour of the variant; `neutral` has the border colour of the theme. |
81
+ | `plain` | No fill and no border, only the text in the colour of the variant. |
82
+
83
+ Both are reflected: the element writes them onto itself as attributes, the defaults included (`<el-badge variant="neutral" appearance="filled">`), so that they can be selected from a stylesheet (`el-badge[variant='danger']`). A value the badge does not know is painted like the default.
84
+
85
+ ## Size
86
+
87
+ There is no `size`. A badge is three quarters of the font size of the text it stands in, and its paddings follow: in a heading it is larger than in a paragraph. For a badge of another size, set a font size on it:
88
+
89
+ ```css
90
+ el-badge.large {
91
+ font-size: 1.25rem; /* the text of the badge is three quarters of that */
92
+ }
93
+ ```
94
+
95
+ A badge with a single character is as wide as it is high: a square, and a circle with `pill`.
96
+
97
+ The `hidden` attribute hides the badge.
98
+
99
+ ## Accessibility
100
+
101
+ - A badge is text for assistive technology, read where it stands in the page. It has no role. A change of its text is not announced; for a count that has to be announced when it changes, put the badge into a live region of the page.
102
+ - A status must not be told by the colour alone: write it into the badge ("Failed"), and do not leave it to a red badge without a word.
103
+ - A bare count has no meaning out of context. Add what it counts for a screen reader, with the `el-visually-hidden` class of `styles/utilities.css` for example: `<el-badge>3 <span class="el-visually-hidden">unread messages</span></el-badge>`.
104
+ - The text of a badge is small. Whether it can be read depends on the colours of the theme: the text on a fill needs a contrast of 4.5 : 1 to the colour of its variant.
105
+ - `pulse` stands still for a user who prefers reduced motion (`prefers-reduced-motion: reduce`).
106
+
107
+ ## Server-side rendering
108
+
109
+ The badge is fully part of the server-rendered markup (Declarative Shadow DOM) and looks the same before and after its JavaScript has loaded.
@@ -0,0 +1,63 @@
1
+ import hostStyle from '../../styles/host.style.js';
2
+ import variantsStyle from '../../styles/variants.style.js';
3
+ import appearanceStyle from '../../styles/appearance.style.js';
4
+
5
+ const css = String.raw;
6
+
7
+ const style = css`
8
+ :host {
9
+ display: inline-flex;
10
+ vertical-align: middle;
11
+ }
12
+
13
+ .badge {
14
+ /* The colours come from the variants and appearance modules. Everything else is in em: a
15
+ badge is three quarters of the text it stands in, whatever size that text has. */
16
+ display: inline-flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ /* As wide as it is high, so that a single character gives a square, and a circle as a pill. */
20
+ min-width: calc(1.7em + 2 * var(--el-border-width, 1px));
21
+ padding: 0.35em 0.6em;
22
+ border: var(--el-border-width, 1px) solid transparent;
23
+ border-radius: var(--el-radius-md, 4px);
24
+ font-family: var(--el-font-family, inherit);
25
+ font-size: 0.75em;
26
+ font-weight: 600;
27
+ line-height: 1;
28
+ white-space: nowrap;
29
+ }
30
+
31
+ .badge--pill {
32
+ border-radius: 999px;
33
+ }
34
+
35
+ /* ── Pulse ────────────────────────────────────────────────────────────── */
36
+
37
+ /* The ring has the border colour of the variant: its own colour for brand, success, warning
38
+ and danger, the border of the theme for neutral, whose fill is too faint to be seen. */
39
+ .badge--pulse {
40
+ animation: el-badge-pulse 1.5s infinite;
41
+ }
42
+
43
+ @keyframes el-badge-pulse {
44
+ 0% {
45
+ box-shadow: 0 0 0 0 var(--_el-variant-border);
46
+ }
47
+ 70% {
48
+ box-shadow: 0 0 0 0.5em transparent;
49
+ }
50
+ 100% {
51
+ box-shadow: 0 0 0 0 transparent;
52
+ }
53
+ }
54
+
55
+ /* The pulse is there to catch the eye and says nothing the badge does not say. */
56
+ @media (prefers-reduced-motion: reduce) {
57
+ .badge--pulse {
58
+ animation: none;
59
+ }
60
+ }
61
+ `;
62
+
63
+ export default [hostStyle(), variantsStyle(), appearanceStyle('.badge'), style].join('\n');
@@ -0,0 +1,22 @@
1
+ # Change Log
2
+
3
+ All notable changes to this component live here. Versions refer to the parent `@webtides/element-library` release (see root [`CHANGELOG.md`](../../../CHANGELOG.md)); components no longer version independently.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/).
6
+
7
+ <!--
8
+ When your PR touches this component, add an entry under Unreleased and
9
+ mirror it (prefixed with the component name) in root CHANGELOG.md.
10
+ Uncomment headings as needed.
11
+ -->
12
+
13
+ ## Unreleased
14
+
15
+ ## [0.3.0] - 2026-11-17
16
+
17
+ ### Added
18
+
19
+ - Initial `el-breadcrumb`: the trail from the start page to the current page. A `nav` landmark, named by `label` ("Breadcrumb" by default), that holds a list; every `el-breadcrumb-item` slotted into it is an entry of that list. ([#123](https://github.com/webtides/element-library/issues/123))
20
+ - The entries stand in a row that breaks into a second line where it does not fit. A line after the first starts with a separator.
21
+ - `--el-breadcrumb-separator`, a CSS string (`'/'` by default), is what stands between two entries. Set on the breadcrumb or for the whole page, it is the separator of every entry.
22
+ - The breadcrumb does nothing with its entries from a script, so a server-rendered trail is complete without JavaScript.
@@ -0,0 +1,3 @@
1
+ import { define } from './breadcrumb.js';
2
+
3
+ define();
@@ -0,0 +1,47 @@
1
+ import { TemplateElement, defineElement, html } from '@webtides/element-js';
2
+ import style from './breadcrumb.style.js';
3
+
4
+ /**
5
+ * A breadcrumb: the trail from the start page to the current page, for a page deep inside of a
6
+ * site. The breadcrumb is the landmark and the list; every `el-breadcrumb-item` slotted into it is
7
+ * one entry of the trail. A trail that does not fit breaks into a second line.
8
+ *
9
+ * @element el-breadcrumb
10
+ *
11
+ * @slot - The entries of the trail: `el-breadcrumb-item` elements, from the start page to the
12
+ * current page.
13
+ *
14
+ * @csspart base - The `nav` landmark.
15
+ * @csspart list - The list of the entries.
16
+ *
17
+ * @cssproperty --el-breadcrumb-separator - What stands between two entries, as a CSS string.
18
+ * Unset, it is `'/'`. Read by the items, so it can be set on the breadcrumb or for the page.
19
+ *
20
+ * @property {string} label - The name of the landmark. Default `'Breadcrumb'`.
21
+ */
22
+ export default class Breadcrumb extends TemplateElement {
23
+ constructor() {
24
+ super({
25
+ styles: [style],
26
+ shadowRender: true,
27
+ });
28
+ }
29
+
30
+ properties() {
31
+ return {
32
+ label: 'Breadcrumb',
33
+ };
34
+ }
35
+
36
+ template() {
37
+ return html`
38
+ <nav part="base" class="breadcrumb" aria-label="${this.label}">
39
+ <div part="list" class="list" role="list"><slot></slot></div>
40
+ </nav>
41
+ `;
42
+ }
43
+ }
44
+
45
+ export function define() {
46
+ defineElement('el-breadcrumb', Breadcrumb);
47
+ }
@@ -0,0 +1,108 @@
1
+ # Breadcrumb
2
+
3
+ `breadcrumb` is the trail from the start page to the current page, for a page deep inside of a site: a product in a category, a setting in a section. The breadcrumb is the landmark and the list; every [`el-breadcrumb-item`](../breadcrumb-item/breadcrumb-item.readme.md) in it is one entry.
4
+
5
+ ## How to use
6
+
7
+ #### Install
8
+
9
+ ```sh
10
+ npm i --save @webtides/element-library
11
+ ```
12
+
13
+ #### Use
14
+
15
+ ```js
16
+ import '@webtides/element-library/breadcrumb/define';
17
+ import '@webtides/element-library/breadcrumb-item/define';
18
+ ```
19
+
20
+ ```html
21
+ <el-breadcrumb>
22
+ <el-breadcrumb-item href="/">Home</el-breadcrumb-item>
23
+ <el-breadcrumb-item href="/shoes">Shoes</el-breadcrumb-item>
24
+ <el-breadcrumb-item href="/shoes/running">Running</el-breadcrumb-item>
25
+ <el-breadcrumb-item current="true">Trail runner 4</el-breadcrumb-item>
26
+ </el-breadcrumb>
27
+ ```
28
+
29
+ > Boolean attributes are passed as strings (`current="true"`), matching the rest of the library.
30
+
31
+ ## API
32
+
33
+ #### Properties/Attributes
34
+
35
+ | Name | Type | Default | Description |
36
+ | ------- | -------- | -------------- | ------------------------- |
37
+ | `label` | `string` | `'Breadcrumb'` | The name of the landmark. |
38
+
39
+ #### Methods
40
+
41
+ _None._
42
+
43
+ #### Events
44
+
45
+ _None._
46
+
47
+ #### Slots
48
+
49
+ | Name | Description |
50
+ | --------- | ------------------------------------------------------------------------------------ |
51
+ | (default) | The entries: `el-breadcrumb-item` elements, from the start page to the current page. |
52
+
53
+ #### CSS Parts
54
+
55
+ | Name | Description |
56
+ | ------ | ------------------------ |
57
+ | `base` | The `nav` landmark. |
58
+ | `list` | The list of the entries. |
59
+
60
+ #### CSS Custom Properties
61
+
62
+ | Name | Default | Description |
63
+ | --------------------------- | ------- | -------------------------------------------------------------------- |
64
+ | `--el-breadcrumb-separator` | `'/'` | What stands between two entries, as a CSS string. Read by the items. |
65
+
66
+ ## The entries
67
+
68
+ The entries are written in the order of the trail, the start page first. An entry with `href` is a link, the others are text. Mark the entry of the page the user is on with `current`: it is the last one, and it can be text or a link.
69
+
70
+ The breadcrumb does nothing with its entries from a script: it does not count them, mark the last one or leave any out. What the trail shows is what the page writes into it.
71
+
72
+ ## Separator
73
+
74
+ `--el-breadcrumb-separator` is a CSS string. Every entry but the first shows it in front of itself. Set it on the breadcrumb, or once for the whole page:
75
+
76
+ ```css
77
+ :root {
78
+ --el-breadcrumb-separator: '›';
79
+ }
80
+ ```
81
+
82
+ A separator that points (`›`, `→`) has to point the other way in a text that runs from right to left; the default `/` does not need that:
83
+
84
+ ```css
85
+ [dir='rtl'] {
86
+ --el-breadcrumb-separator: '‹';
87
+ }
88
+ ```
89
+
90
+ The separator has the muted text colour of the theme. It is hidden from assistive technology.
91
+
92
+ ## A trail that does not fit
93
+
94
+ The trail breaks into a second line where its container is too narrow, and every line after the first starts with a separator. A name that is longer than the container breaks inside of its entry. The gap between the entries is `--el-space-2`, the one between two lines `--el-space-1`.
95
+
96
+ The `hidden` attribute hides the breadcrumb.
97
+
98
+ ## Accessibility
99
+
100
+ - The breadcrumb is a navigation landmark (`<nav>`) named by `label`, "Breadcrumb" by default. Set `label` to translate it. A screen reader lists the landmarks of a page by these names, so the name should not be the one of the main navigation.
101
+ - Inside of it is a list, and every item is an entry of that list: a screen reader says how many entries the trail has and where its user is in it.
102
+ - The entry with `current` carries `aria-current="page"`, which a screen reader announces as "current page".
103
+ - The separators are not read out.
104
+ - A breadcrumb is a second way through the site, next to its main navigation. Put it at the start of the main content, where it is the same on every page.
105
+
106
+ ## Server-side rendering
107
+
108
+ The landmark, its name and the list are part of the server-rendered markup (Declarative Shadow DOM), and so are the entries, their links and their separators. The breadcrumb is complete before its JavaScript has loaded, and without JavaScript.
@@ -0,0 +1,20 @@
1
+ import hostStyle from '../../styles/host.style.js';
2
+
3
+ const css = String.raw;
4
+
5
+ const style = css`
6
+ :host {
7
+ display: block;
8
+ }
9
+
10
+ /* A row that breaks into a second one where it does not fit. An item brings its separator
11
+ with it, so the gap is the space on both sides of a separator. */
12
+ .list {
13
+ display: flex;
14
+ flex-wrap: wrap;
15
+ align-items: center;
16
+ gap: var(--el-space-1, 0.25em) var(--el-space-2, 0.5em);
17
+ }
18
+ `;
19
+
20
+ export default [hostStyle(), style].join('\n');
@@ -0,0 +1,23 @@
1
+ # Change Log
2
+
3
+ All notable changes to this component live here. Versions refer to the parent `@webtides/element-library` release (see root [`CHANGELOG.md`](../../../CHANGELOG.md)); components no longer version independently.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/).
6
+
7
+ <!--
8
+ When your PR touches this component, add an entry under Unreleased and
9
+ mirror it (prefixed with the component name) in root CHANGELOG.md.
10
+ Uncomment headings as needed.
11
+ -->
12
+
13
+ ## Unreleased
14
+
15
+ ## [0.3.0] - 2026-11-17
16
+
17
+ ### Added
18
+
19
+ - Initial `el-breadcrumb-item`: one entry of an `el-breadcrumb`, an item of its list (`role="listitem"`). ([#123](https://github.com/webtides/element-library/issues/123))
20
+ - With `href` it is a native link (`target` is passed on, `rel` is written with it), without it is text.
21
+ - `current` marks the entry of the page the user is on: `aria-current="page"`, the text colour of the theme and a heavier weight, as text or as a link.
22
+ - Every entry but the first shows the separator in front of itself: the CSS string in `--el-breadcrumb-separator`, `'/'` by default, in the muted text colour of the theme and hidden from assistive technology.
23
+ - A link has the accent colour of the theme, the text colour without a theme, is underlined under the pointer and shows the focus ring of the theme. On a touch screen it is at least `--el-touch-target` wide and high.
@@ -0,0 +1,3 @@
1
+ import { define } from './breadcrumb-item.js';
2
+
3
+ define();
@@ -0,0 +1,82 @@
1
+ import { TemplateElement, defineElement, html, spreadAttributes } from '@webtides/element-js';
2
+ import style from './breadcrumb-item.style.js';
3
+
4
+ /**
5
+ * One entry of a breadcrumb: a link to a page on the way to the current one with `href`, plain
6
+ * text without. `current` marks the entry of the page the user is on. Every entry but the first
7
+ * brings the separator that stands in front of it.
8
+ *
9
+ * @element el-breadcrumb-item
10
+ *
11
+ * @slot - The name of the page.
12
+ *
13
+ * @csspart base - The entry: an item of the list of the breadcrumb.
14
+ * @csspart separator - What stands in front of the entry. Hidden for the first one, and from
15
+ * assistive technology.
16
+ * @csspart label - The name of the page: an `<a>` with `href`, a `<span>` without.
17
+ *
18
+ * @cssproperty --el-breadcrumb-separator - What stands in front of the entry, as a CSS string.
19
+ * Unset, it is `'/'`.
20
+ *
21
+ * @property {string} href - The address of the page. Unset, the entry is text and no link.
22
+ * @property {string} target - Where to open the page (only with `href`).
23
+ * @property {string} rel - `rel` attribute for the link, written when `target` is set. Default
24
+ * `'noreferrer noopener'`.
25
+ * @property {boolean} current - The entry is the page the user is on: it gets
26
+ * `aria-current="page"`. Default `false`.
27
+ */
28
+ export default class BreadcrumbItem extends TemplateElement {
29
+ constructor() {
30
+ super({
31
+ styles: [style],
32
+ shadowRender: true,
33
+ });
34
+ }
35
+
36
+ properties() {
37
+ return {
38
+ href: '',
39
+ target: '',
40
+ rel: 'noreferrer noopener',
41
+ current: false,
42
+ };
43
+ }
44
+
45
+ /** @private */
46
+ labelTemplate() {
47
+ const current = { 'aria-current': this.current ? 'page' : undefined };
48
+
49
+ if (!this.href) {
50
+ return html`<span part="label" class="label" ${spreadAttributes(current)}><slot></slot></span>`;
51
+ }
52
+
53
+ return html`
54
+ <a
55
+ part="label"
56
+ class="label"
57
+ href="${this.href}"
58
+ ${spreadAttributes({
59
+ target: this.target || undefined,
60
+ rel: this.target ? this.rel : undefined,
61
+ ...current,
62
+ })}
63
+ ><slot></slot
64
+ ></a>
65
+ `;
66
+ }
67
+
68
+ template() {
69
+ // The role of an entry is inside of the shadow root, not on the element: it is part of the
70
+ // server-rendered markup that way, and needs no script.
71
+ return html`
72
+ <div part="base" class="item" role="listitem">
73
+ <span part="separator" class="separator" aria-hidden="true"></span>
74
+ ${this.labelTemplate()}
75
+ </div>
76
+ `;
77
+ }
78
+ }
79
+
80
+ export function define() {
81
+ defineElement('el-breadcrumb-item', BreadcrumbItem);
82
+ }
@@ -0,0 +1,106 @@
1
+ # Breadcrumb Item
2
+
3
+ `breadcrumb-item` is one entry of an [`el-breadcrumb`](../breadcrumb/breadcrumb.readme.md): a link to a page on the way to the current one with `href`, plain text without. `current` marks the entry of the page the user is on.
4
+
5
+ ## How to use
6
+
7
+ #### Install
8
+
9
+ ```sh
10
+ npm i --save @webtides/element-library
11
+ ```
12
+
13
+ #### Use
14
+
15
+ ```js
16
+ import '@webtides/element-library/breadcrumb/define';
17
+ import '@webtides/element-library/breadcrumb-item/define';
18
+ ```
19
+
20
+ ```html
21
+ <el-breadcrumb>
22
+ <el-breadcrumb-item href="/">Home</el-breadcrumb-item>
23
+ <el-breadcrumb-item href="/shoes">Shoes</el-breadcrumb-item>
24
+ <el-breadcrumb-item current="true">Trail runner 4</el-breadcrumb-item>
25
+ </el-breadcrumb>
26
+ ```
27
+
28
+ > Boolean attributes are passed as strings (`current="true"`), matching the rest of the library.
29
+
30
+ ## API
31
+
32
+ #### Properties/Attributes
33
+
34
+ | Name | Type | Default | Description |
35
+ | --- | --- | --- | --- |
36
+ | `href` | `string` | `''` | The address of the page. Unset, the entry is text and no link. |
37
+ | `target` | `string` | `''` | Where to open the page (only with `href`). |
38
+ | `rel` | `string` | `'noreferrer noopener'` | `rel` attribute for the link, written when `target` is set. |
39
+ | `current` | `boolean` | `false` | The entry is the page the user is on: it gets `aria-current="page"`. |
40
+
41
+ #### Methods
42
+
43
+ _None._
44
+
45
+ #### Events
46
+
47
+ _None._
48
+
49
+ #### Slots
50
+
51
+ | Name | Description |
52
+ | --------- | --------------------------------------------- |
53
+ | (default) | The name of the page, with an icon if wanted. |
54
+
55
+ #### CSS Parts
56
+
57
+ | Name | Description |
58
+ | ----------- | ------------------------------------------------------------------------------------------- |
59
+ | `base` | The entry: an item of the list of the breadcrumb. |
60
+ | `separator` | What stands in front of the entry. Hidden for the first one, and from assistive technology. |
61
+ | `label` | The name of the page: an `<a>` with `href`, a `<span>` without. |
62
+
63
+ #### CSS Custom Properties
64
+
65
+ | Name | Default | Description |
66
+ | --------------------------- | ------- | --------------------------------------------------- |
67
+ | `--el-breadcrumb-separator` | `'/'` | What stands in front of the entry, as a CSS string. |
68
+
69
+ ## Link or text
70
+
71
+ With `href` the entry is a native `<a>`: it can be reached with the keyboard, opened in a new tab and followed by a router that listens for clicks on links. `target` is passed on, and `rel` is written with it.
72
+
73
+ Without `href` the entry is text. That is the usual form of the last entry, the current page, and of a step on the way that has no page of its own.
74
+
75
+ ## The current page
76
+
77
+ `current` marks the page the user is on. The entry gets `aria-current="page"`, the text colour of the theme and a heavier weight, whether it is text or a link. A weight, not only a colour: the current page is told from the others without seeing colours, and without a theme.
78
+
79
+ The breadcrumb does not mark the last entry by itself. Set `current` where the trail is written.
80
+
81
+ ## Look
82
+
83
+ A link has the accent colour of the theme and is underlined under the pointer. Without a theme imported it has the text colour. The focus of the keyboard shows with the focus ring of the theme.
84
+
85
+ An icon is part of what is slotted into the item, in front of the name or in its place; the two stand in a row with a small gap. An icon that stands alone needs a name:
86
+
87
+ ```html
88
+ <el-breadcrumb-item href="/"><svg aria-label="Home" role="img">…</svg></el-breadcrumb-item>
89
+ ```
90
+
91
+ On a touch screen (`any-pointer: coarse`) a link is at least `--el-touch-target` wide and high. Text stays as it is.
92
+
93
+ Other colours go on the part: `el-breadcrumb-item::part(label) { color: inherit; }`.
94
+
95
+ The `hidden` attribute hides the entry, with its separator.
96
+
97
+ ## Accessibility
98
+
99
+ - The entry is an item of the list of the breadcrumb (`role="listitem"`). Use it inside of an `el-breadcrumb` only: an item of a list needs its list.
100
+ - A link is named by what is slotted into the item.
101
+ - The separator is hidden from assistive technology (`aria-hidden`), and it is not part of the link: the name of the link is the name of the page.
102
+ - `aria-current="page"` is on the link or the text itself, where a screen reader announces it with the name of the page.
103
+
104
+ ## Server-side rendering
105
+
106
+ The role of the entry, its link, `aria-current` and the separator are part of the server-rendered markup (Declarative Shadow DOM). Which entry is the first, and so has no separator, is decided by the stylesheet. The entry is complete before its JavaScript has loaded, and without JavaScript.