@webtides/element-library 0.1.2 → 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 +390 -3
  2. package/README.md +61 -41
  3. package/all.js +28 -0
  4. package/catalog.d.ts +14 -0
  5. package/catalog.js +63 -0
  6. package/custom-elements.json +16604 -3420
  7. package/package.json +37 -25
  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,167 @@
1
+ # Pagination
2
+
3
+ `pagination` is the way through a list that is split into pages. It shows the current page, the pages around it, the first and the last, and a button for the page before and the page after. The pages in between are left out, and the row keeps its length while the current page moves.
4
+
5
+ It loads nothing itself: a button sets `page` and fires `pagination-change`, and the page shows the entries that belong to 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/pagination/define';
19
+ ```
20
+
21
+ ```html
22
+ <!-- 200 entries, 10 on a page: 20 pages -->
23
+ <el-pagination total="200"></el-pagination>
24
+
25
+ <!-- 25 on a page, on the third page -->
26
+ <el-pagination total="200" per-page="25" page="3"></el-pagination>
27
+ ```
28
+
29
+ ```js
30
+ const pagination = document.querySelector('el-pagination');
31
+
32
+ pagination.addEventListener('pagination-change', (event) => {
33
+ showEntriesOf(event.detail.page);
34
+ });
35
+ ```
36
+
37
+ ## API
38
+
39
+ #### Properties/Attributes
40
+
41
+ | Name | Type | Default | Description |
42
+ | --- | --- | --- | --- |
43
+ | `page` | `number` | `1` | The current page, counted from 1. Reflected. |
44
+ | `total` | `number` | `0` | The number of entries in the whole list. |
45
+ | `per-page` | `number` | `10` | The number of entries on one page. |
46
+ | `siblings` | `number` | `1` | How many pages are shown on each side of the current page. |
47
+ | `boundaries` | `number` | `1` | How many pages are shown at the start and at the end of the row. |
48
+ | `size` | `string` | `'medium'` | `small`, `medium` or `large`: the size of the buttons. Reflected. |
49
+ | `label` | `string` | `'Pagination'` | The name of the landmark. |
50
+ | `page-label` | `string` | `'Page'` | The word the button of a page is named with, in front of its number: "Page 3". |
51
+ | `previous-label` | `string` | `'Previous page'` | The name of the button for the page before. |
52
+ | `next-label` | `string` | `'Next page'` | The name of the button for the page after. |
53
+ | `pages` | `number` | | The number of pages. Read-only, a property without an attribute. |
54
+
55
+ #### Methods
56
+
57
+ _None._
58
+
59
+ #### Events
60
+
61
+ | Name | Detail | Description |
62
+ | --- | --- | --- |
63
+ | `pagination-change` | `{ page: number }` | Fired when a button has changed the page. Not fired when `page` is set from a script. |
64
+
65
+ #### Slots
66
+
67
+ | Name | Description |
68
+ | --------------- | ----------------------------------------------------------------- |
69
+ | `previous-icon` | The icon of the button for the page before. Unset, an arrow head. |
70
+ | `next-icon` | The icon of the button for the page after. Unset, an arrow head. |
71
+
72
+ #### CSS Parts
73
+
74
+ | Name | Description |
75
+ | ---------- | ------------------------------------------------------------ |
76
+ | `base` | The `nav` landmark. |
77
+ | `list` | The row of the buttons. |
78
+ | `button` | Every button: the pages, the page before and the page after. |
79
+ | `page` | The button of a page. |
80
+ | `current` | The button of the current page. |
81
+ | `previous` | The button for the page before. |
82
+ | `next` | The button for the page after. |
83
+ | `ellipsis` | The mark in the place of pages that are left out. |
84
+
85
+ #### CSS Custom Properties
86
+
87
+ _None._
88
+
89
+ Reads the standard library design tokens: `--el-color-fg`, `--el-color-fg-muted`, `--el-color-bg`, `--el-color-accent`, `--el-color-focus-ring`, `--el-focus-ring-width`, `--el-focus-ring-offset`, `--el-control-height`, `--el-touch-target`, `--el-space-1`, `--el-radius-md`, `--el-font-family`, `--el-font-size-sm`, `--el-font-size-md`, `--el-duration-md` and `--el-ease`.
90
+
91
+ ## The pages
92
+
93
+ The number of pages is `total` divided by `per-page`, rounded up; the read-only property `pages` holds it. A list without entries has one page, an empty one.
94
+
95
+ `page` is the current page. A page that does not exist is shown as the nearest one that does: `page="99"` of 20 pages shows the last page, and a list that gets shorter keeps to the pages that are left. The property itself is not changed for that.
96
+
97
+ A value that is no number counts as the default.
98
+
99
+ ## The row
100
+
101
+ The row has a fixed number of places:
102
+
103
+ - `boundaries` pages at the start and as many at the end,
104
+ - the current page with `siblings` pages on each side,
105
+ - one place between each end and the middle. It holds an ellipsis, or the page itself where only one page is missing.
106
+
107
+ With the defaults that is seven places: `1 … 9 10 11 … 20`. Near an end the middle does not shrink but stops, so the row is as long on the first page as on any other: `1 2 3 4 5 … 20`. A list with no more pages than places shows them all.
108
+
109
+ | `siblings` | `boundaries` | On page 10 of 20 |
110
+ | ---------- | ------------ | ----------------------- |
111
+ | `0` | `1` | `1 … 10 … 20` |
112
+ | `1` | `1` | `1 … 9 10 11 … 20` |
113
+ | `2` | `1` | `1 … 8 9 10 11 12 … 20` |
114
+ | `1` | `2` | `1 2 … 9 10 11 … 19 20` |
115
+ | `1` | `0` | `… 9 10 11 …` |
116
+
117
+ Where the row does not fit into its container it breaks into a second row. With the defaults the row is nine buttons wide, 24.5rem at the medium size. `siblings="0"` takes two of them away and `boundaries="0"` two more, and `size="small"` makes every button a fifth narrower: on a phone a row of five small buttons (`siblings="0" boundaries="0" size="small"`) is 11rem wide.
118
+
119
+ ## The event
120
+
121
+ `pagination-change` is fired when a button has changed the page, with the new page in `event.detail.page`. At that moment `page` is set already. The event bubbles and crosses shadow roots.
122
+
123
+ A click on the current page does nothing. `page` set from a script changes the row without an event.
124
+
125
+ The pagination renders buttons, not links: it does not change the address of the page. Write the page into the address in the listener where a page should be reachable by a link.
126
+
127
+ ## Size and look
128
+
129
+ | `size` | With a control height of 2.5rem |
130
+ | -------- | ------------------------------- |
131
+ | `small` | Buttons of 2rem |
132
+ | `medium` | Buttons of 2.5rem |
133
+ | `large` | Buttons of 3.125rem |
134
+
135
+ A button is a square of the control height of its size, and grows in width with a number that does not fit. On a touch screen no button is smaller than `--el-touch-target`.
136
+
137
+ The buttons are text on nothing, with a tint of the text colour under the pointer. The current page has the fill of the accent colour (`--el-color-accent`) with the colour of the page background on it, like a brand button. Without a theme the buttons have the text colour of the page, and the current page a blue fill.
138
+
139
+ The keyboard focus shows as a ring around the button: `--el-focus-ring-width` wide, in `--el-color-focus-ring`, and `--el-focus-ring-offset` away from its edge. Without `--el-color-focus-ring` the ring has the text colour of the buttons: `--el-color-fg`, or the text colour of the page. That holds for the current page as well, whose own text is the colour for its fill and may be the colour of the page around it. Its ring is the outline of its place in the row then, the `li` around the button: it has the corners of `--el-radius-md`, and not those a page gives to `::part(current)`. Where the user forces colours, that outline is the ring of the current page with a theme as well, in a colour of the system.
140
+
141
+ There is no `variant`. For another look paint the parts:
142
+
143
+ ```css
144
+ el-pagination::part(current) {
145
+ background: none;
146
+ color: inherit;
147
+ box-shadow: inset 0 -2px currentColor;
148
+ }
149
+ ```
150
+
151
+ Both `page` and `size` are reflected: the element writes them onto itself as attributes, the defaults included.
152
+
153
+ ## Accessibility
154
+
155
+ - The pagination is a navigation landmark (`nav`) with the name in `label`. Two paginations on one page need two names, "Pages of the results" and "Pages of the comments" for example.
156
+ - The row is a list of buttons. Every button has a name: "Page 3", "Previous page", "Next page". The button of the current page is marked with `aria-current="page"`.
157
+ - The names are English by default. For another language set `label`, `page-label`, `previous-label` and `next-label`.
158
+ - The ellipsis and the arrow heads are hidden from assistive technology.
159
+ - All buttons are reached with `Tab` and pressed with `Enter` or `Space`. The button for the page before is disabled on the first page, the one for the page after on the last.
160
+ - After a button of a page is pressed, the focus is on the button of that page, wherever it stands in the new row. It stays on an arrow button, which can be pressed again, until that one reaches the end; then it goes to the current page.
161
+ - The pagination does not announce the new page. What changes is the list: move the focus to its heading or announce it there.
162
+ - With forced colours the current page has the colours of a selection.
163
+ - The arrow heads turn with the reading direction (`dir="rtl"`).
164
+
165
+ ## Server-side rendering
166
+
167
+ The pagination is fully part of the server-rendered markup (Declarative Shadow DOM): the row for the `page`, `total` and `per-page` of the element, the current page and the disabled buttons. Without JavaScript the buttons do nothing.
@@ -0,0 +1,162 @@
1
+ import hostStyle from '../../styles/host.style.js';
2
+ import sizeStyle from '../../styles/size.style.js';
3
+
4
+ const css = String.raw;
5
+
6
+ const style = css`
7
+ :host {
8
+ display: block;
9
+ }
10
+
11
+ /* A row that breaks into a second one where it does not fit, so it never is wider than its
12
+ container. */
13
+ [part~='list'] {
14
+ display: flex;
15
+ flex-wrap: wrap;
16
+ gap: var(--el-space-1, 0.25rem);
17
+ margin: 0;
18
+ padding: 0;
19
+ list-style: none;
20
+ }
21
+
22
+ li {
23
+ display: flex;
24
+ /* Whether a theme gives the focus ring a colour: transparent with --el-color-focus-ring.
25
+ Without the token the var() has no value and the property is invalid, so what reads it
26
+ takes its fallback. A stylesheet cannot ask whether a property is set in another way. */
27
+ --_el-pagination-ring-themed: color-mix(in srgb, var(--el-color-focus-ring) 0%, transparent);
28
+ }
29
+
30
+ /* ── Buttons ──────────────────────────────────────────────────────────── */
31
+
32
+ /* A square of the control height of the size, which grows in width with a long number. The
33
+ ellipsis has the same box, so the row does not move when it comes or goes. */
34
+ [part~='button'],
35
+ [part~='ellipsis'] {
36
+ display: inline-flex;
37
+ align-items: center;
38
+ justify-content: center;
39
+ min-width: var(--_el-size-height);
40
+ min-height: var(--_el-size-height);
41
+ /* Little, so that two figures fit into the square of the small size too. */
42
+ padding: 0 var(--el-space-1, 0.25em);
43
+ font-family: var(--el-font-family, inherit);
44
+ font-size: var(--_el-size-font-size);
45
+ /* Figures of one width: the row is as wide with a 1 as with an 8. */
46
+ font-variant-numeric: tabular-nums;
47
+ line-height: 1;
48
+ }
49
+
50
+ [part~='button'] {
51
+ border: none;
52
+ border-radius: var(--el-radius-md, 4px);
53
+ background: transparent;
54
+ color: var(--el-color-fg, inherit);
55
+ cursor: pointer;
56
+ user-select: none;
57
+ transition: background var(--el-duration-md, 0s) var(--el-ease, linear);
58
+ }
59
+
60
+ [part~='ellipsis'] {
61
+ color: var(--el-color-fg-muted, inherit);
62
+ user-select: none;
63
+ }
64
+
65
+ /* The arrow heads that are there without an icon of the page. */
66
+ slot > svg {
67
+ width: 1.25em;
68
+ height: 1.25em;
69
+ }
70
+
71
+ /* They point with the reading direction. The page before is at the right in a text that runs
72
+ from right to left. */
73
+ :host(:dir(rtl)) slot > svg {
74
+ transform: scaleX(-1);
75
+ }
76
+
77
+ /* ── States ───────────────────────────────────────────────────────────── */
78
+
79
+ /* A tint of the text colour, which shows on every background. Hover only where the pointer
80
+ can hover: a touch screen leaves :hover on the button that was tapped last. */
81
+ @media (hover: hover) {
82
+ [part~='button']:hover {
83
+ background: color-mix(in srgb, currentColor 12%, transparent);
84
+ }
85
+ }
86
+
87
+ [part~='button']:active {
88
+ background: color-mix(in srgb, currentColor 24%, transparent);
89
+ }
90
+
91
+ /* The ring of a theme, and without one a ring in the colour of the text. */
92
+ [part~='button']:focus-visible {
93
+ outline: var(--el-focus-ring-width, 2px) solid var(--el-color-focus-ring, currentColor);
94
+ outline-offset: var(--el-focus-ring-offset, 2px);
95
+ }
96
+
97
+ /* The current page has the fill of the accent colour, like a brand button. It leads nowhere,
98
+ so it does not answer to the pointer. */
99
+ [part~='current'],
100
+ [part~='current']:hover,
101
+ [part~='current']:active {
102
+ background: var(--el-color-accent, #2563eb);
103
+ color: var(--el-color-bg, #fff);
104
+ font-weight: 600;
105
+ cursor: default;
106
+ }
107
+
108
+ /* The text of the current page is the colour for its fill, and that may be the colour of the
109
+ page around it: a ring in it would not show there. So without a theme the ring of the
110
+ current page is the outline of its place in the row. The place has the box of the button
111
+ and the text colour of the other buttons, which is made for the page. With a theme that
112
+ outline shows nothing, and the ring is the one of the button. */
113
+ [part~='current']:focus-visible {
114
+ outline-color: var(--el-color-focus-ring, transparent);
115
+ }
116
+
117
+ li:has(> [part~='current']:focus-visible) {
118
+ outline: var(--el-focus-ring-width, 2px) solid
119
+ var(--_el-pagination-ring-themed, var(--el-color-fg, currentColor));
120
+ outline-offset: var(--el-focus-ring-offset, 2px);
121
+ border-radius: var(--el-radius-md, 4px);
122
+ }
123
+
124
+ /* Forced colours take the fill away. The colours of a selection mark the page there. The
125
+ button is taken out of the forcing as a whole: a browser would paint a plate in the colour
126
+ of the page behind the figure, on which the text colour of a selection cannot be read. */
127
+ @media (forced-colors: active) {
128
+ [part~='current'],
129
+ [part~='current']:hover,
130
+ [part~='current']:active {
131
+ forced-color-adjust: none;
132
+ background: Highlight;
133
+ color: HighlightText;
134
+ }
135
+
136
+ /* The browser gives the outline of the place a colour of the system, with a theme as
137
+ well. The button is out of the forcing and would draw the ring of the theme over it. */
138
+ [part~='current']:focus-visible {
139
+ outline-color: transparent;
140
+ }
141
+ }
142
+
143
+ [part~='button'][disabled] {
144
+ background: transparent;
145
+ opacity: 0.55;
146
+ cursor: not-allowed;
147
+ }
148
+
149
+ /* ── Touch screens ────────────────────────────────────────────────────── */
150
+
151
+ /* On a coarse pointer no button falls below --el-touch-target in either direction. Without
152
+ the token the sizes stay as they are. */
153
+ @media (any-pointer: coarse) {
154
+ [part~='button'],
155
+ [part~='ellipsis'] {
156
+ min-width: max(var(--_el-size-height), var(--el-touch-target, 0px));
157
+ min-height: max(var(--_el-size-height), var(--el-touch-target, 0px));
158
+ }
159
+ }
160
+ `;
161
+
162
+ export default [hostStyle(), sizeStyle(), style].join('\n');
@@ -12,6 +12,30 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
12
12
 
13
13
  ## Unreleased
14
14
 
15
+ ## [0.3.0] - 2026-11-17
16
+
17
+ ### Added
18
+
19
+ - `autocomplete`, `inputmode`, `enterkeyhint`, `autocapitalize`, `autocorrect` and `spellcheck` are passed on to the native `<input>`, in server-rendered markup and on every render, the one the reveal toggle triggers included. Set them as attributes or properties on the element; one that is not set is left out on the `<input>`. Before, the field dropped them, so a password manager and the on-screen keyboard got no hints. `autocomplete="current-password"` and `autocomplete="new-password"` now reach the input.
20
+ - `show-label` and `hide-label` (`showLabel`, `hideLabel`): the two accessible labels of the reveal button. Defaults `'Show password'` and `'Hide password'`, the texts that were fixed before. ([#98](https://github.com/webtides/element-library/issues/98))
21
+ - `size` (`small`, `medium` by default, `large`), as on `el-input-field`. ([#69](https://github.com/webtides/element-library/issues/69))
22
+
23
+ ### Changed
24
+
25
+ - On a touch screen (`@media (any-pointer: coarse)`) the reveal button is at least `--el-touch-target` wide and high (20 × 20 px before), the input at least that high, and the clear cross of an invalid field at least that wide and high. Unchanged on a fine pointer and without the token. Known limit: when an `el-input-field` connects before the first `el-password-field` of a page, element-js gives the password field the style sheet of the input field ([element-js#198](https://github.com/webtides/element-js/issues/198)). The reveal button then has none of its styles, this size included.
26
+ - Without a theme the error message has the colour of the text. It was `red`, which is 4 : 1 on white and below the 4.5 : 1 that small text needs, and which no page with a dark background could rely on. Every field has this fallback now. With a theme, or with `--el-color-danger` set, nothing changes. ([#128](https://github.com/webtides/element-library/issues/128))
27
+ - The label has the text colour of the theme (`--el-color-fg`) and the help message its muted colour (`--el-color-fg-muted`), as in every field now. Before, they had them only on a page that had an `el-form-field` as well; without a theme both keep the colour of the text. A help message without a text takes no room: empty it was a row of the column, and the label stood two gaps above the input instead of one (8 px instead of 4 px with the shipped themes). ([#130](https://github.com/webtides/element-library/issues/130))
28
+
29
+ ### Fixed
30
+
31
+ - The field has its own styles when an `el-input-field` is on the page before it. Before, it took over the stylesheet of the input field in that order and lost its own: the reveal button looked like a native button, with a border and a background. See `form-field`.
32
+ - The error message is announced by screen readers: it is an alert (`role="alert"`), and the input names it in `aria-describedby` while it is shown. Before, the input pointed at it with `aria-errormessage` only. ([#94](https://github.com/webtides/element-library/issues/94))
33
+ - The `hidden` attribute hides the field. Before, the `display` of the element won over it. ([#69](https://github.com/webtides/element-library/issues/69))
34
+ - The cross of a field that is not valid empties `value` as well, reports it with `input-change`, and `valid` follows the empty input. Before, only the input was emptied. See `form-field`. ([#115](https://github.com/webtides/element-library/issues/115))
35
+ - A value that a script sets on the element reaches the input also after the user has typed. The field renders its value as the `value` attribute of the input, which is only the default of the control: once the user had typed, the browser no longer showed it. After `x` was typed into a field with "first", `el.value = 'outside'` left "firstx" in the input and in what the form submitted, while `value` said "outside". The field now writes a value that was set from outside to the control as well, as `el-textarea-field` does. Text the user types is not written back, so the caret stays where it is. ([#126](https://github.com/webtides/element-library/issues/126))
36
+ - A second field with the same `name` on the page keeps its own label and its own messages. The ids of the input and of the messages are made per field, not from the name (BREAKING for a page that names `input-<name>` or `<name>-help-message` itself). See `form-field`. ([#133](https://github.com/webtides/element-library/issues/133))
37
+ - The field is as high after it was left as before in a page with high lines. The mark beside the input (✓ or ✗) made it grow by 3 px at a line height of 1.5, where the input has the look of the browser. See `form-field`. ([#116](https://github.com/webtides/element-library/issues/116))
38
+
15
39
  ## [0.1.0] - 2026-06-03
16
40
 
17
41
  ### Added
@@ -15,6 +15,10 @@ import style from './password-field.style.js';
15
15
  * @property {boolean} passwordToggle - Whether to render the show/hide reveal button. Default `true`.
16
16
  * @property {boolean} passwordVisible - Whether the value is currently revealed as plain text.
17
17
  * Default `false`.
18
+ * @property {string} showLabel - Accessible label of the reveal button while the value is masked.
19
+ * Default `'Show password'`.
20
+ * @property {string} hideLabel - Accessible label of the reveal button while the value is revealed.
21
+ * Default `'Hide password'`.
18
22
  */
19
23
  export default class PasswordField extends InputField {
20
24
  constructor(options) {
@@ -27,6 +31,8 @@ export default class PasswordField extends InputField {
27
31
  type: 'password',
28
32
  passwordToggle: true,
29
33
  passwordVisible: false,
34
+ showLabel: 'Show password',
35
+ hideLabel: 'Hide password',
30
36
  };
31
37
  }
32
38
 
@@ -60,7 +66,7 @@ export default class PasswordField extends InputField {
60
66
  type="button"
61
67
  class="password-toggle"
62
68
  data-password-toggle
63
- aria-label="${this.passwordVisible ? 'Hide password' : 'Show password'}"
69
+ aria-label="${this.passwordVisible ? this.hideLabel : this.showLabel}"
64
70
  aria-pressed="${this.passwordVisible ? 'true' : 'false'}"
65
71
  ?disabled="${this.disabled}"
66
72
  >
@@ -2,7 +2,7 @@
2
2
 
3
3
  `password-field` is a masked password input with an optional show/hide reveal toggle. It extends `input-field` (and therefore `form-field`), inheriting the label, help text, error message, `required` and validation surface; it pins the input `type` to `password` and flips it to `text` while revealed.
4
4
 
5
- It is headless by default, like `input-field` — the native input keeps its browser look until a theme decorates it.
5
+ It is headless by default, like `input-field` — the native input keeps its browser look until `styles/native.css` decorates it with the tokens of a theme.
6
6
 
7
7
  ## How to use
8
8
 
@@ -29,15 +29,19 @@ import '@webtides/element-library/password-field/define';
29
29
 
30
30
  #### Properties/Attributes
31
31
 
32
- Inherits all of `input-field`'s properties (`name`, `value`, `placeholder`, `required`, `disabled`, `label`, `labelScreenReaderOnly`, `errorMessage`, `helpMessage`, `pattern`, `valid`, `touched`) and adds:
32
+ Inherits all of `input-field`'s properties (`name`, `value`, `size`, `placeholder`, `required`, `disabled`, `label`, `labelScreenReaderOnly`, `errorMessage`, `helpMessage`, `pattern`, `valid`, `touched`, and the keyboard and autofill hints `autocomplete`, `inputmode`, `enterkeyhint`, `autocapitalize`, `autocorrect`, `spellcheck`) and adds:
33
33
 
34
- | Name | Type | Default | Description |
35
- | ------------------ | --------- | ------- | ------------------------------------------------------ |
36
- | `password-toggle` | `boolean` | `true` | Whether to render the show/hide reveal button. |
34
+ | Name | Type | Default | Description |
35
+ | --- | --- | --- | --- |
36
+ | `password-toggle` | `boolean` | `true` | Whether to render the show/hide reveal button. |
37
37
  | `password-visible` | `boolean` | `false` | Whether the value is currently revealed as plain text. |
38
+ | `show-label` | `string` | `'Show password'` | Accessible label of the reveal button while the value is masked. |
39
+ | `hide-label` | `string` | `'Hide password'` | Accessible label of the reveal button while the value is revealed. |
38
40
 
39
41
  > `type` is fixed to `password` (and switches to `text` while revealed); setting it has no effect.
40
42
 
43
+ Set `autocomplete` so that a password manager can tell a login from a sign-up: `current-password` for a login, `new-password` where a password is chosen. The hints stay on the input when the toggle reveals or masks the value.
44
+
41
45
  #### Methods
42
46
 
43
47
  | Name | Description |
@@ -54,7 +58,12 @@ Inherits all of `input-field`'s properties (`name`, `value`, `placeholder`, `req
54
58
 
55
59
  Headless by default; the reveal button reads `--el-color-fg-muted`, `--el-color-accent`, `--el-focus-ring-width` and `--el-radius-sm`, and the field inherits `input-field`'s tokens (`--el-color-success`, `--el-color-danger`, `--el-font-size-sm`, `--el-space-*`). Skin it via a theme — see the Storybook _Docs / Theming_ page.
56
60
 
61
+ The label, the help message, the control and the error message stack in a column, and the texts have one look in every field: see [Layout](../form-field/form-field.readme.md#layout) in the readme of `form-field`.
62
+
63
+ On a touch screen (`@media (any-pointer: coarse)`) the reveal button is at least `--el-touch-target` wide and high, the input at least that high, and the clear cross of an invalid field at least that wide and high. Without that token, and on a fine pointer, the sizes stay as they are.
64
+
57
65
  ## Accessibility
58
66
 
59
- - The reveal button is a real `<button>` with an `aria-label` that flips between "Show password" and "Hide password", and an `aria-pressed` state, so its purpose and state are announced.
67
+ - The reveal button is a real `<button>` with an `aria-label` that flips between "Show password" and "Hide password", and an `aria-pressed` state, so its purpose and state are announced. Set `show-label` and `hide-label` to translate the two labels.
60
68
  - Validation messages surface only once the field is `touched` (inherited from `form-field`).
69
+ - The error message is an alert (`role="alert"`) and part of the `aria-describedby` of the input while it is shown: a screen reader announces it when it appears and reads it again when the input gets focus.
@@ -1,16 +1,12 @@
1
+ import hostStyle from '../../styles/host.style.js';
2
+ import formControlStyle from '../../styles/form-control.style.js';
3
+ import sizeStyle from '../../styles/size.style.js';
4
+
1
5
  const css = String.raw;
2
6
 
3
- export default css`
7
+ const style = css`
4
8
  el-password-field {
5
- display: flex;
6
- flex-direction: column;
7
- gap: var(--el-space-1, 4px);
8
-
9
9
  .field {
10
- display: flex;
11
- align-items: center;
12
- gap: var(--el-space-2, 8px);
13
-
14
10
  .validity {
15
11
  .valid {
16
12
  color: var(--el-color-success, green);
@@ -51,12 +47,39 @@ export default css`
51
47
  height: 1.25em;
52
48
  }
53
49
 
54
- .message {
55
- font-size: var(--el-font-size-sm, 14px);
50
+ /* Touch screens: the control, the toggle and the clear cross are at least
51
+ --el-touch-target. The mark beside the input keeps that width in both states, so the
52
+ input does not jump when the validity changes. Without the token the sizes stay as they are. */
53
+ @media (any-pointer: coarse) {
54
+ input {
55
+ min-height: max(
56
+ calc(var(--el-control-height, 0px) * var(--_el-size-scale, 1)),
57
+ var(--el-touch-target, 0px)
58
+ );
59
+ }
60
+
61
+ .password-toggle {
62
+ min-width: var(--el-touch-target, auto);
63
+ min-height: var(--el-touch-target, auto);
64
+ }
56
65
 
57
- &.error-message {
58
- color: var(--el-color-danger, red);
66
+ .validity,
67
+ [data-clear-input] {
68
+ display: grid;
69
+ place-items: center;
70
+ min-width: var(--el-touch-target, auto);
71
+ }
72
+
73
+ [data-clear-input] {
74
+ min-height: var(--el-touch-target, auto);
59
75
  }
60
76
  }
61
77
  }
62
78
  `;
79
+
80
+ export default [
81
+ hostStyle('el-password-field'),
82
+ formControlStyle('el-password-field'),
83
+ sizeStyle('el-password-field'),
84
+ style,
85
+ ].join('\n');
@@ -0,0 +1,24 @@
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-popover`: a panel that floats next to an anchor. A click on the anchor opens it; a second click, a click beside it or `Escape` closes it. ([#70](https://github.com/webtides/element-library/issues/70))
20
+ - Built on the native popover of the platform (`popover="auto"`): the panel is in the top layer, so nothing clips it or lies on top of it, and one popover is open at a time.
21
+ - `placement` (`top`, `bottom`, `left`, `right`, each also with `-start` or `-end`; `bottom` by default) and `distance` (8 px by default). The panel goes to the opposite side when it has no room, stays inside the viewport, and follows its anchor while it is open. The place is computed with `@floating-ui/dom`, a new dependency of the library.
22
+ - `arrow`: an arrow on the panel that points to the anchor.
23
+ - `open` (reflected, with the `open` custom state), `show()`, `hide()` and `toggle()`, and the events `popover-show` and `popover-hide`.
24
+ - The anchor gets `aria-expanded`. `Escape` gives the focus back to the anchor when it was inside the panel.
@@ -0,0 +1,3 @@
1
+ import { define } from './popover.js';
2
+
3
+ define();
@@ -0,0 +1,4 @@
1
+ export default {
2
+ SHOW: 'popover-show',
3
+ HIDE: 'popover-hide',
4
+ };