@webtides/element-library 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/CHANGELOG.md +399 -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 +16676 -3457
  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 +44 -1
  37. package/src/components/button/button.js +338 -29
  38. package/src/components/button/button.readme.md +138 -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 +25 -0
  59. package/src/components/checkbox-field/checkbox-field.js +32 -11
  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 +22 -0
  191. package/src/components/switch-field/switch-field.js +24 -10
  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 +158 -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
@@ -1,19 +1,18 @@
1
- export function define(): void;
1
+ import FormField from '../form-field/form-field.js';
2
2
  /**
3
3
  * Numeric amount stepper input. Renders a readonly `<input type="number">` flanked by
4
4
  * increment (`+`) and decrement (`-`) buttons, with optional `min` and `max` bounds.
5
- * Extends `FormField` and inherits its label, help and validation surface.
5
+ * Extends `FormField`: the `label` is rendered above the stepper and names the input, the help
6
+ * message between the two, and the error message below the stepper while the field is touched and
7
+ * not valid. The input names both messages in `aria-describedby`.
6
8
  *
7
- * @element el-amount-field
9
+ * The field renders into the page, as every field does. Its input belongs to the form around it and
10
+ * is submitted with it, under the `name` of the field.
8
11
  *
9
- * @slot plus - Replaces the default `+` glyph in the increment button.
10
- * @slot minus - Replaces the default `-` glyph in the decrement button.
12
+ * @element el-amount-field
11
13
  *
12
- * @csspart wrapper - The outer container around the input and stepper buttons.
13
- * @csspart button - Applied to both stepper buttons.
14
- * @csspart plus - Applied to the increment button (in addition to `button`).
15
- * @csspart minus - Applied to the decrement button (in addition to `button`).
16
- * @csspart input - The numeric input element.
14
+ * @cssprop [--el-amount-field-plus='+'] - The sign of the increment button, a CSS string.
15
+ * @cssprop [--el-amount-field-minus='-'] - The sign of the decrement button, a CSS string.
17
16
  *
18
17
  * @property {string} name - Form name for the underlying `<input>` element.
19
18
  * @property {number} value - Current numeric value of the field.
@@ -21,14 +20,14 @@ export function define(): void;
21
20
  * above.
22
21
  * @property {number | false} min - Lower bound. Set to `false` to leave the value unbounded
23
22
  * below.
23
+ * @property {string} plusLabel - The accessible name of the increment button. Default
24
+ * `'Increase'`.
25
+ * @property {string} minusLabel - The accessible name of the decrement button. Default
26
+ * `'Decrease'`.
24
27
  */
25
28
  export default class AmountField extends FormField {
26
- constructor();
29
+ constructor(options: any);
27
30
  properties(): {
28
- name: string;
29
- value: number;
30
- max: boolean;
31
- min: number;
32
31
  required: boolean;
33
32
  disabled: boolean;
34
33
  label: string;
@@ -37,6 +36,12 @@ export default class AmountField extends FormField {
37
36
  helpMessage: string;
38
37
  valid: boolean;
39
38
  touched: boolean;
39
+ name: string;
40
+ value: number;
41
+ max: boolean;
42
+ min: number;
43
+ plusLabel: string;
44
+ minusLabel: string;
40
45
  };
41
46
  events(): {
42
47
  '[ref=plus]': {
@@ -49,5 +54,14 @@ export default class AmountField extends FormField {
49
54
  change: () => any;
50
55
  };
51
56
  };
57
+ /**
58
+ * The stepper: the two buttons around the input. The buttons are of the type `button`, a button
59
+ * without a type submits the form it is in. Their signs are drawn by the stylesheet, so each
60
+ * has its name as a label.
61
+ *
62
+ * A bound that is not set leaves its attribute out of the input. A button is disabled at its
63
+ * bound, and both are with the field.
64
+ */
65
+ fieldTemplate(): any;
52
66
  }
53
- import FormField from '../form-field/form-field.js';
67
+ export declare function define(): void;
@@ -0,0 +1,57 @@
1
+ import { TemplateElement } from '@webtides/element-js';
2
+ /**
3
+ * An avatar: the picture that stands for a person or a thing. It shows the first of these that it
4
+ * has: the image, the initials, an icon. An image that cannot be loaded makes way for the next.
5
+ * With a `label` it is an image with that name for assistive technology; without one it is a
6
+ * decoration beside a name that is written out.
7
+ *
8
+ * @element el-avatar
9
+ *
10
+ * @slot icon - The icon that is shown without an image and without initials. Unset, it is the
11
+ * outline of a person.
12
+ *
13
+ * @csspart base - The shape of the avatar: background, radius. It carries the role and the label.
14
+ * @csspart image - The image.
15
+ * @csspart initials - The initials.
16
+ * @csspart icon - The region of the `icon` slot.
17
+ *
18
+ * @cssproperty --el-avatar-size - The width and the height of the avatar. Unset, the `size`
19
+ * decides.
20
+ *
21
+ * @property {string} image - The address of the image.
22
+ * @property {string} label - The accessible name of the avatar, the name of the person for
23
+ * example. Without it the avatar is hidden from assistive technology.
24
+ * @property {string} initials - One or two letters that are shown without an image.
25
+ * @property {'circle'|'square'|'rounded'} shape - The shape of the avatar. Default `'circle'`.
26
+ * Reflected to the `shape` attribute.
27
+ * @property {'small'|'medium'|'large'} size - The width and the height: the control height of that
28
+ * size, `--el-control-height` times 0.8, 1 or 1.25.
29
+ * Default `'medium'`. Reflected to the `size` attribute.
30
+ */
31
+ export default class Avatar extends TemplateElement {
32
+ _failedImage: any;
33
+ constructor();
34
+ properties(): {
35
+ image: string;
36
+ label: string;
37
+ initials: string;
38
+ shape: string;
39
+ size: string;
40
+ };
41
+ connected(): void;
42
+ events(): {
43
+ '[ref=image]': {
44
+ error: () => void;
45
+ };
46
+ };
47
+ /**
48
+ * Remembers the image that could not be loaded, so that the next thing the avatar has is
49
+ * shown instead. Another address in `image` is tried again.
50
+ * @private
51
+ */
52
+ private _giveUpOnImage;
53
+ /** @private */
54
+ private _contentTemplate;
55
+ template(): any;
56
+ }
57
+ export declare function define(): void;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -0,0 +1,32 @@
1
+ import { TemplateElement } from '@webtides/element-js';
2
+ /**
3
+ * A badge: a short label that marks something with a status or a count ("New", "3"). Pure
4
+ * presentation, without a role and without behaviour. It speaks the library's shared vocabulary
5
+ * for its colours, a semantic `variant` and an `appearance`, and is sized by the font size of the
6
+ * text it stands in.
7
+ *
8
+ * @element el-badge
9
+ *
10
+ * @slot - The text of the badge.
11
+ *
12
+ * @csspart base - The surface of the badge: background, border, radius.
13
+ *
14
+ * @property {'neutral'|'brand'|'success'|'warning'|'danger'} variant - Semantic variant, which
15
+ * picks the colours. Default `'neutral'`. Reflected to the `variant` attribute.
16
+ * @property {'filled'|'outlined'|'plain'} appearance - How the colours of the variant are painted:
17
+ * as a fill, as a border around a transparent badge, or as text only. Default `'filled'`.
18
+ * Reflected to the `appearance` attribute.
19
+ * @property {boolean} pill - Fully rounded ends. A badge with a single character is a circle.
20
+ * @property {boolean} pulse - Draws attention: a ring spreads from the badge, again and again.
21
+ */
22
+ export default class Badge extends TemplateElement {
23
+ constructor();
24
+ properties(): {
25
+ variant: string;
26
+ appearance: string;
27
+ pill: boolean;
28
+ pulse: boolean;
29
+ };
30
+ template(): any;
31
+ }
32
+ export declare function define(): void;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -0,0 +1,27 @@
1
+ import { TemplateElement } from '@webtides/element-js';
2
+ /**
3
+ * A breadcrumb: the trail from the start page to the current page, for a page deep inside of a
4
+ * site. The breadcrumb is the landmark and the list; every `el-breadcrumb-item` slotted into it is
5
+ * one entry of the trail. A trail that does not fit breaks into a second line.
6
+ *
7
+ * @element el-breadcrumb
8
+ *
9
+ * @slot - The entries of the trail: `el-breadcrumb-item` elements, from the start page to the
10
+ * current page.
11
+ *
12
+ * @csspart base - The `nav` landmark.
13
+ * @csspart list - The list of the entries.
14
+ *
15
+ * @cssproperty --el-breadcrumb-separator - What stands between two entries, as a CSS string.
16
+ * Unset, it is `'/'`. Read by the items, so it can be set on the breadcrumb or for the page.
17
+ *
18
+ * @property {string} label - The name of the landmark. Default `'Breadcrumb'`.
19
+ */
20
+ export default class Breadcrumb extends TemplateElement {
21
+ constructor();
22
+ properties(): {
23
+ label: string;
24
+ };
25
+ template(): any;
26
+ }
27
+ export declare function define(): void;
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -0,0 +1,38 @@
1
+ import { TemplateElement } from '@webtides/element-js';
2
+ /**
3
+ * One entry of a breadcrumb: a link to a page on the way to the current one with `href`, plain
4
+ * text without. `current` marks the entry of the page the user is on. Every entry but the first
5
+ * brings the separator that stands in front of it.
6
+ *
7
+ * @element el-breadcrumb-item
8
+ *
9
+ * @slot - The name of the page.
10
+ *
11
+ * @csspart base - The entry: an item of the list of the breadcrumb.
12
+ * @csspart separator - What stands in front of the entry. Hidden for the first one, and from
13
+ * assistive technology.
14
+ * @csspart label - The name of the page: an `<a>` with `href`, a `<span>` without.
15
+ *
16
+ * @cssproperty --el-breadcrumb-separator - What stands in front of the entry, as a CSS string.
17
+ * Unset, it is `'/'`.
18
+ *
19
+ * @property {string} href - The address of the page. Unset, the entry is text and no link.
20
+ * @property {string} target - Where to open the page (only with `href`).
21
+ * @property {string} rel - `rel` attribute for the link, written when `target` is set. Default
22
+ * `'noreferrer noopener'`.
23
+ * @property {boolean} current - The entry is the page the user is on: it gets
24
+ * `aria-current="page"`. Default `false`.
25
+ */
26
+ export default class BreadcrumbItem extends TemplateElement {
27
+ constructor();
28
+ properties(): {
29
+ href: string;
30
+ target: string;
31
+ rel: string;
32
+ current: boolean;
33
+ };
34
+ /** @private */
35
+ private labelTemplate;
36
+ template(): any;
37
+ }
38
+ export declare function define(): void;
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -1,9 +1,25 @@
1
- export function define(): void;
1
+ import { TemplateElement } from '@webtides/element-js';
2
2
  /**
3
3
  * A themeable button that renders a native `<button>` — or an `<a>` when `href` is set — and
4
- * decorates it with the `--el-*` design tokens. Supports semantic variants, sizes, outline /
5
- * pill / circle shapes, an optional dropdown caret and a loading spinner. API modelled on
6
- * Shoelace's `<sl-button>`.
4
+ * decorates it with the `--el-*` design tokens. Speaks the library's shared vocabulary: a semantic
5
+ * `variant`, an `appearance` and a `size`. Also supports pill / circle shapes, an optional
6
+ * dropdown caret and a loading spinner.
7
+ *
8
+ * ARIA attributes on the element reach the control inside it, which is what has the focus and what
9
+ * a screen reader announces: `aria-label`, `aria-description`, `aria-expanded`, `aria-haspopup`,
10
+ * `aria-pressed` and `aria-current` as they are, `aria-labelledby`, `aria-describedby` and
11
+ * `aria-controls` as references to the elements they name.
12
+ *
13
+ * The element is form-associated: a `<fieldset disabled>` around it disables it, and it is listed in
14
+ * the `elements` of its form. A button of the type `submit` submits its form with a hidden native
15
+ * `<button type="submit">` in its content: it is the `submitter` of the `submit` event, its `name`
16
+ * and `value` are in the data of the form, and Enter in a field of the form finds it. The element
17
+ * makes that button when the form is first submitted with it, by a click or by Enter in a field.
18
+ * Until then its content is what the page wrote, so a framework can hydrate a server-rendered
19
+ * button, also when the element has started before the framework does. The attributes `form`,
20
+ * `formaction`, `formenctype`, `formmethod`, `formnovalidate` and `formtarget` of the element do
21
+ * what they do on a native button. A `click` listener of the page that calls `preventDefault()`
22
+ * keeps the button from submitting or resetting.
7
23
  *
8
24
  * @element el-button
9
25
  *
@@ -18,29 +34,55 @@ export function define(): void;
18
34
  * @csspart caret - The dropdown caret, present only while `caret` is `true`.
19
35
  * @csspart spinner - The loading spinner, present only while `loading` is `true`.
20
36
  *
21
- * @property {'default'|'primary'|'success'|'neutral'|'warning'|'danger'|'text'} variant - Visual
22
- * variant. Default `'default'`.
23
- * @property {'small'|'medium'|'large'} size - Button size. Default `'medium'`.
24
- * @property {boolean} outline - Draws the button as an outline (transparent fill, colored border).
37
+ * @property {'neutral'|'brand'|'success'|'warning'|'danger'} variant - Semantic variant, which
38
+ * picks the colours. Default `'neutral'`. Reflected to the `variant` attribute.
39
+ * @property {'filled'|'outlined'|'plain'} appearance - How the colours of the variant are painted:
40
+ * as a fill, as a border around a transparent button, or as text only. Default `'filled'`.
41
+ * Reflected to the `appearance` attribute.
42
+ * @property {'small'|'medium'|'large'} size - Button size. Default `'medium'`. Reflected to the
43
+ * `size` attribute.
25
44
  * @property {boolean} pill - Fully rounded ends.
26
45
  * @property {boolean} circle - Renders a square, fully-rounded icon button (use with a single icon).
27
46
  * @property {boolean} caret - Appends a dropdown caret after the label.
28
47
  * @property {boolean} loading - Shows a spinner and blocks interaction.
29
- * @property {boolean} disabled - Disables the button.
48
+ * @property {boolean} disabled - Disables the button. Reflected to the `disabled` attribute, which is
49
+ * there while the button is disabled and gone while it is not.
30
50
  * @property {'button'|'submit'|'reset'} type - Behaviour when activated. `submit` / `reset` act on
31
- * the nearest ancestor `<form>`. Ignored when `href` is set. Default `'button'`.
32
- * @property {string} name - Name submitted with the owning form (button mode only).
33
- * @property {string} value - Value submitted with the owning form (button mode only).
51
+ * the form of the button: the nearest ancestor `<form>`, or the one its `form` attribute names.
52
+ * Ignored when `href` is set. Default `'button'`.
53
+ * @property {string} name - Name submitted with the form, when the form is submitted with this
54
+ * button (button mode only).
55
+ * @property {string} value - Value submitted under that name (button mode only).
34
56
  * @property {string} href - When set, the button renders as a link to this URL.
35
57
  * @property {string} target - Where to open the linked URL (link mode only).
36
58
  * @property {string} rel - `rel` attribute for the link (link mode only). Default `'noreferrer noopener'`.
37
59
  * @property {string} download - Tells the browser to download the linked URL (link mode only).
38
60
  */
39
- export default class Button {
61
+ export default class Button extends TemplateElement {
62
+ disabled: boolean;
63
+ /**
64
+ * The platform tells a form-associated element when a `<fieldset disabled>` around it disables
65
+ * it, and resolves its `form` attribute.
66
+ */
67
+ static formAssociated: boolean;
68
+ static get observedAttributes(): string[];
69
+ /**
70
+ * The native submit button of a button of the type `submit`, see `_syncSubmitter()`.
71
+ * @private
72
+ * @type {HTMLButtonElement | undefined}
73
+ */
74
+ private _submitter;
75
+ /**
76
+ * Where the element listens for Enter in a field of its form, see `afterUpdate()`.
77
+ * @private
78
+ * @type {Node | undefined}
79
+ */
80
+ private _keydownRoot;
81
+ constructor();
40
82
  properties(): {
41
83
  variant: string;
84
+ appearance: string;
42
85
  size: string;
43
- outline: boolean;
44
86
  pill: boolean;
45
87
  circle: boolean;
46
88
  caret: boolean;
@@ -56,6 +98,46 @@ export default class Button {
56
98
  };
57
99
  /** Whether the button renders as a link rather than a native button. */
58
100
  get isLink(): boolean;
101
+ /**
102
+ * An ARIA attribute of the element, or one it shares with a native submit button, was set,
103
+ * changed or removed. They are no properties of the component: the template and the submit
104
+ * button read them from the element, so a change asks for a new render. Before the first render
105
+ * there is nothing to do, it reads them anyway.
106
+ *
107
+ * `disabled` is a property. For the platform an attribute that is there disables a
108
+ * form-associated element, whatever it says: the browser then keeps every click from it. The
109
+ * library reads `disabled="false"` and an attribute without a value as not disabled, so those
110
+ * are taken off the element.
111
+ */
112
+ attributeChangedCallback(name: any, oldValue: any, newValue: any): void;
113
+ /**
114
+ * The platform says that the element is disabled, or no longer is: by its own attribute, or by a
115
+ * `<fieldset disabled>` around it. The template asks the platform, see `_isDisabled()`.
116
+ */
117
+ formDisabledCallback(): void;
118
+ /**
119
+ * `disabled` is reflected as the platform reads it: the attribute is there while the button is
120
+ * disabled, and gone while it is not. element-js would write `disabled="false"`.
121
+ * @param {{ property: string, newValue: unknown }} options
122
+ */
123
+ reflectProperty(options: {
124
+ property: string;
125
+ newValue: unknown;
126
+ }): void;
127
+ afterUpdate(): void;
128
+ disconnected(): void;
129
+ /**
130
+ * Enter in a field of the form submits the form with its first submit button, and without one
131
+ * only a form with a single field. The browser looks for that button once every listener has
132
+ * had the key, so the native submit button of the element is made here, if it is not there yet.
133
+ *
134
+ * Only for a key the browser may submit with: Enter in an `<input>` or a `<select>` of the
135
+ * form, and not while a text is being composed. Enter in a `<textarea>` is a line break, and
136
+ * leaves the content of the element as it is.
137
+ * @private
138
+ * @param {KeyboardEvent} event
139
+ */
140
+ private _onRootKeydown;
59
141
  /** Focuses the underlying control. */
60
142
  focus(options: any): void;
61
143
  /** Removes focus from the underlying control. */
@@ -67,7 +149,69 @@ export default class Button {
67
149
  click: (event: any) => void;
68
150
  };
69
151
  };
152
+ /**
153
+ * Runs `action` once every listener has had `event`, and not when one of them has prevented it:
154
+ * what the platform does with the activation of a native control. The listener of the control
155
+ * is the first on the path of a click, before every listener of the page.
156
+ *
157
+ * The last target on the path is the window, and a listener that is added there now comes after
158
+ * the ones it has: `action` runs inside of the click, as a caller of `click()` expects. A
159
+ * listener on the way that stops the event keeps it from getting there. The platform acts all
160
+ * the same, so `action` runs a task later then.
161
+ * @private
162
+ * @param {Event} event
163
+ * @param {() => void} action
164
+ */
165
+ private _afterListeners;
166
+ /**
167
+ * Whether the button is disabled: by its own `disabled`, or by a `<fieldset disabled>` around
168
+ * it. The platform knows the second, and counts the attribute of the element as well. On the
169
+ * server there is no tree to ask.
170
+ * @private
171
+ * @returns {boolean}
172
+ */
173
+ private _isDisabled;
174
+ /**
175
+ * Keeps the native submit button of a button of the type `submit`: a hidden
176
+ * `<button type="submit">` in the content of the element, in the page, where it belongs to the
177
+ * form. A form is submitted with a submit button that belongs to it, and with nothing else: the
178
+ * button is the `submitter` of the `submit` event, its `name` and `value` are in the data, it
179
+ * says how to submit (`formmethod`, `formnovalidate`, …), and Enter in a field looks for it.
180
+ * The control in the shadow root has no form, and the element itself is no submit button for the
181
+ * platform.
182
+ *
183
+ * The button takes over `name`, `value` and the attributes of the element that a native submit
184
+ * button has. It is disabled while the element is disabled or loading, which keeps Enter from
185
+ * submitting as well. One that is in the content already is taken: written by the page, for a
186
+ * form that is submitted with Enter before the script has run, or copied with the element.
187
+ *
188
+ * The element makes the button only when the form is about to be submitted with it (`create`):
189
+ * with a click, or with Enter in a field. A render does not. The content of the element is what
190
+ * the page wrote until then: a framework that hydrates a server-rendered page after the element
191
+ * has started finds the children it rendered, and no other.
192
+ * @private
193
+ * @param {boolean} [create] - Whether to make the button when there is none.
194
+ * @returns {HTMLButtonElement | null} The submit button, or `null`: for a button of another
195
+ * type, and while there is none and none was asked for.
196
+ */
197
+ private _syncSubmitter;
198
+ /**
199
+ * The ARIA attributes of the element, for the control. An empty one counts as not set: none of
200
+ * them has an empty value, and element-js writes an attribute that was there from the start
201
+ * back as an empty one when it is removed.
202
+ * @private
203
+ * @returns {Object<string, string | undefined>}
204
+ */
205
+ private _ariaAttributes;
206
+ /**
207
+ * Hands the control the elements that the element names by id in `aria-labelledby`,
208
+ * `aria-describedby` and `aria-controls`. They are looked up when the button renders, so an
209
+ * element that comes into the page later is found once the attribute is set again.
210
+ * @private
211
+ */
212
+ private _syncAriaRelations;
70
213
  /** @private */
71
214
  private contentTemplate;
72
215
  template(): any;
73
216
  }
217
+ export declare function define(): void;
@@ -0,0 +1,28 @@
1
+ import { TemplateElement } from '@webtides/element-js';
2
+ /**
3
+ * A button group: a row of `el-button` that reads as one control, the actions of a toolbar, a
4
+ * button with a second one for more options, the steps back and forward. The buttons touch, only
5
+ * the outer corners of the row are rounded, and a line divides two neighbours. To assistive
6
+ * technology it is a group, with a name.
7
+ *
8
+ * The group joins its buttons with its stylesheet alone. It runs no script on them, so a
9
+ * server-rendered group does not change when the elements take over.
10
+ *
11
+ * @element el-button-group
12
+ *
13
+ * @slot - The buttons of the group: `el-button` elements, or elements that hold one (an
14
+ * `el-popover` with its anchor).
15
+ *
16
+ * @csspart base - The row. It carries `role="group"` and the label.
17
+ *
18
+ * @property {string} label - The accessible name of the group, "Text alignment". Unset, the group
19
+ * has no name. Default `''`.
20
+ */
21
+ export default class ButtonGroup extends TemplateElement {
22
+ constructor();
23
+ properties(): {
24
+ label: string;
25
+ };
26
+ template(): any;
27
+ }
28
+ export declare function define(): void;
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -0,0 +1,40 @@
1
+ import { TemplateElement } from '@webtides/element-js';
2
+ /**
3
+ * A card: a surface that groups what belongs together, a form, a section of settings, an entry of
4
+ * a list. It has four regions, each of them a slot: `media` at the top, then `header`, the body and
5
+ * `footer`. A region that nothing is slotted into takes no space. Pure presentation, without a role
6
+ * and without behaviour.
7
+ *
8
+ * @element el-card
9
+ *
10
+ * @slot - The body of the card.
11
+ * @slot media - An image or a video at the top of the card, from edge to edge.
12
+ * @slot header - The title of the card, and what stands beside it, an action for example.
13
+ * @slot footer - What closes the card: actions, a note.
14
+ *
15
+ * @csspart base - The surface of the card: background, border, radius, shadow.
16
+ * @csspart media - The region of the `media` slot.
17
+ * @csspart header - The region of the `header` slot.
18
+ * @csspart body - The region of the default slot.
19
+ * @csspart footer - The region of the `footer` slot.
20
+ *
21
+ * @cssproperty --el-card-padding - The padding of the header, the body and the footer. Unset, it
22
+ * is `--el-space-4`, and `1rem` without a theme.
23
+ *
24
+ * @property {'outlined'|'filled'|'plain'} appearance - How the surface is painted: with the
25
+ * background of the page and a border, with a muted fill and a border, or not at all. Default
26
+ * `'outlined'`. Reflected to the `appearance` attribute.
27
+ */
28
+ export default class Card extends TemplateElement {
29
+ constructor();
30
+ properties(): {
31
+ appearance: string;
32
+ };
33
+ events(): {
34
+ "[part~='base']": {
35
+ slotchange: () => any;
36
+ };
37
+ };
38
+ template(): any;
39
+ }
40
+ export declare function define(): void;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const _default: string;
2
+ export default _default;
@@ -1,8 +1,16 @@
1
- export function define(): void;
1
+ import { TemplateElement, html, defineElement } from '@webtides/element-js';
2
+ import CarouselEvents from './carousel.events.js';
2
3
  /**
3
4
  * Carousel/slider component backed by Glide.js. Direct children of the host element are
4
5
  * treated as slides; the component renders Glide's controls (navigation arrows and bullet
5
- * pager) inside the shadow DOM around them.
6
+ * pager) inside the shadow DOM around them. A bullet is a button named by `dotLabel` and the
7
+ * number of its slide, and `aria-pressed` marks the one of the slide that shows.
8
+ *
9
+ * The children of the element stay what the page wrote. The copies of the first and the last
10
+ * slides that Glide needs for looping are kept in the shadow root, so a framework can hydrate
11
+ * server-rendered slides. Rules of the page's style sheets reach those copies as far as they
12
+ * select them without an ancestor outside the carousel (a class on the slide does, `el-carousel >
13
+ * .slide` does not).
6
14
  *
7
15
  * @element el-carousel
8
16
  *
@@ -10,9 +18,11 @@ export function define(): void;
10
18
  * `detail` is the new active slide index.
11
19
  *
12
20
  * @slot - Default slot. Direct children become slides (unless they have a `slot`
13
- * attribute or are Glide clones).
14
- * @slot arrow-left - Content of the "previous" navigation button.
15
- * @slot arrow-right - Content of the "next" navigation button.
21
+ * attribute).
22
+ * @slot arrow-left - Content of the "previous" navigation button; it names the button. Left
23
+ * empty, the button shows an arrow head and is named "Previous slide" for screen readers.
24
+ * @slot arrow-right - Content of the "next" navigation button; it names the button. Left empty,
25
+ * the button shows an arrow head and is named "Next slide" for screen readers.
16
26
  *
17
27
  * @csspart track - The Glide track wrapper.
18
28
  * @csspart slides - The slides container.
@@ -31,9 +41,13 @@ export function define(): void;
31
41
  * plain list (useful for SSR or feature-flagging the carousel off).
32
42
  * @property {string} slidePrefix - Prefix used when generating per-slide identifiers.
33
43
  * @property {boolean} bullets - Whether to render the bullet pager.
44
+ * @property {string} dotLabel - Accessible label of a bullet, followed by the number of its slide
45
+ * (`'Go to slide 2'`). Default `'Go to slide'`.
34
46
  * @property {boolean} arrows - Whether to render the previous/next navigation arrows.
35
47
  */
36
- export default class Carousel {
48
+ export default class Carousel extends TemplateElement {
49
+ #private;
50
+ constructor();
37
51
  /**
38
52
  * Returns the underlying Glide instance for external navigation/configuration. Falls
39
53
  * back to a no-op `{ go() }` stub while Glide is not mounted (e.g. when `disabled`).
@@ -44,6 +58,7 @@ export default class Carousel {
44
58
  disabled: boolean;
45
59
  slidePrefix: string;
46
60
  bullets: boolean;
61
+ dotLabel: string;
47
62
  arrows: boolean;
48
63
  };
49
64
  connected(): void;
@@ -73,7 +88,6 @@ export default class Carousel {
73
88
  /** @private */
74
89
  private renderSlides;
75
90
  template(): any;
76
- #private;
77
91
  }
78
- import CarouselEvents from './carousel.events.js';
92
+ export declare function define(): void;
79
93
  export { html, defineElement, CarouselEvents };
@@ -1,4 +1,4 @@
1
- declare namespace _default {
2
- let CAROUSEL_RUN: string;
3
- }
1
+ declare const _default: {
2
+ CAROUSEL_RUN: string;
3
+ };
4
4
  export default _default;
@@ -1 +1 @@
1
- export default function _default(Glide: any, Components: any, Events: any): any;
1
+ export default function (Glide: any, Components: any, Events: any): any;
@@ -1 +1,8 @@
1
- export default function _default(Glide: any, Components: any, Events: any): any;
1
+ /**
2
+ * Glide's clones of the first and the last slides, which a carousel needs to loop.
3
+ *
4
+ * They live in the shadow root, before and after the slot of the slides, and not among the
5
+ * children of the element. Those belong to the page: a framework that hydrates server-rendered
6
+ * slides finds nodes it did not render otherwise.
7
+ */
8
+ export default function (Glide: any, Components: any, Events: any): any;