@eunomia/elements 1.0.0-beta.2 → 1.0.0-beta.4

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 (354) hide show
  1. package/README.md +1 -1
  2. package/dist/cdn/components/chunks/chunk-2JLDJFYD.js +48 -0
  3. package/dist/cdn/components/chunks/chunk-4MXL6PZC.js +124 -0
  4. package/dist/cdn/components/chunks/{chunk-32KRPOPV.js → chunk-5XJGYXW7.js} +6 -6
  5. package/dist/cdn/components/chunks/{chunk-O2HNWH65.js → chunk-5XJLIHAU.js} +7 -7
  6. package/dist/cdn/components/chunks/{chunk-5GF2Q3NR.js → chunk-74AOAB4X.js} +1 -1
  7. package/dist/cdn/components/chunks/{chunk-WYMBUIKX.js → chunk-A6KGFALA.js} +4 -4
  8. package/dist/cdn/components/chunks/chunk-BMQOI7HX.js +371 -0
  9. package/dist/cdn/components/chunks/{chunk-LJYTHDZP.js → chunk-D2M4BV5Y.js} +6 -6
  10. package/dist/cdn/components/chunks/{chunk-NEYBPT3D.js → chunk-EJIX2D4Z.js} +2 -2
  11. package/dist/cdn/components/chunks/{chunk-BYBUXKXC.js → chunk-EOWBYZV7.js} +2 -2
  12. package/dist/cdn/components/chunks/chunk-EST3M4AO.js +1 -0
  13. package/dist/cdn/components/chunks/{chunk-AQQMW353.js → chunk-GSJEJLFA.js} +3 -3
  14. package/dist/cdn/components/chunks/chunk-GU6BVMFJ.js +1 -0
  15. package/dist/cdn/components/chunks/{chunk-5RCCZVFZ.js → chunk-IJ5WFMK4.js} +1 -1
  16. package/dist/cdn/components/chunks/{chunk-RWONCXTF.js → chunk-KVYUNKUO.js} +2 -2
  17. package/dist/cdn/components/chunks/chunk-LGLQ36QB.js +16 -0
  18. package/dist/cdn/components/chunks/{chunk-74HHV4CX.js → chunk-NHFWATVN.js} +2 -2
  19. package/dist/cdn/components/chunks/chunk-OAULRKHQ.js +38 -0
  20. package/dist/cdn/components/chunks/chunk-P32B7BFD.js +118 -0
  21. package/dist/cdn/components/chunks/{chunk-ZPFHTJSS.js → chunk-PCM7D3YF.js} +1 -1
  22. package/dist/cdn/components/chunks/{chunk-ABYEBP57.js → chunk-PED5ATYN.js} +11 -8
  23. package/dist/cdn/components/chunks/{chunk-ON42P6FI.js → chunk-RJCJXB7Y.js} +5 -5
  24. package/dist/cdn/components/chunks/{chunk-5C7YND22.js → chunk-S2UCEWNG.js} +8 -8
  25. package/dist/cdn/components/chunks/{chunk-7WTSHE7M.js → chunk-SIHZFOTK.js} +9 -9
  26. package/dist/cdn/components/chunks/{chunk-6UPI7GHJ.js → chunk-UAGCQF23.js} +7 -7
  27. package/dist/cdn/components/chunks/{chunk-6IILPCSQ.js → chunk-X2AUBZD2.js} +3 -3
  28. package/dist/cdn/components/chunks/chunk-YGUJJ25C.js +263 -0
  29. package/dist/cdn/components/chunks/chunk-YYCEPZUN.js +1 -0
  30. package/dist/cdn/components/eun-alert.js +65 -45
  31. package/dist/cdn/components/eun-animate.js +178 -2
  32. package/dist/cdn/components/eun-badge.js +1 -1
  33. package/dist/cdn/components/eun-breadcrumb-item.js +14 -10
  34. package/dist/cdn/components/eun-breadcrumb.js +11 -7
  35. package/dist/cdn/components/eun-button.js +1 -1
  36. package/dist/cdn/components/eun-calendar.js +16 -16
  37. package/dist/cdn/components/eun-card.js +29 -12
  38. package/dist/cdn/components/eun-carousel.js +36 -28
  39. package/dist/cdn/components/eun-check-card.js +3 -3
  40. package/dist/cdn/components/eun-checkbox-list.js +3 -3
  41. package/dist/cdn/components/eun-checkbox.js +1 -1
  42. package/dist/cdn/components/eun-chip.js +45 -210
  43. package/dist/cdn/components/eun-collapse.js +20 -26
  44. package/dist/cdn/components/eun-color-picker.js +28 -28
  45. package/dist/cdn/components/eun-counter.js +11 -11
  46. package/dist/cdn/components/eun-date-picker.js +50 -50
  47. package/dist/cdn/components/eun-drawer.js +3 -3
  48. package/dist/cdn/components/eun-dropdown-button.js +1 -1
  49. package/dist/cdn/components/eun-dropdown-item.js +6 -6
  50. package/dist/cdn/components/eun-fab.js +31 -53
  51. package/dist/cdn/components/eun-icon.js +1 -1
  52. package/dist/cdn/components/eun-image-card.js +18 -11
  53. package/dist/cdn/components/eun-image-carousel.js +16 -16
  54. package/dist/cdn/components/eun-infinite-list.js +1 -1
  55. package/dist/cdn/components/eun-input-file.js +20 -20
  56. package/dist/cdn/components/eun-input-phone.js +14 -14
  57. package/dist/cdn/components/eun-input.js +1 -1
  58. package/dist/cdn/components/eun-label.js +4 -4
  59. package/dist/cdn/components/eun-link.js +29 -11
  60. package/dist/cdn/components/eun-loader.js +1 -1
  61. package/dist/cdn/components/eun-modal.js +6 -6
  62. package/dist/cdn/components/eun-pagination.js +3 -3
  63. package/dist/cdn/components/eun-password-strength.js +9 -6
  64. package/dist/cdn/components/eun-progress-bar.js +13 -13
  65. package/dist/cdn/components/eun-radio-card.js +2 -2
  66. package/dist/cdn/components/eun-radio-list.js +3 -3
  67. package/dist/cdn/components/eun-radio.js +1 -1
  68. package/dist/cdn/components/eun-scheduler-event-editor.js +2 -2
  69. package/dist/cdn/components/eun-scheduler-event.js +1 -1
  70. package/dist/cdn/components/eun-scheduler.js +10 -10
  71. package/dist/cdn/components/eun-search.js +7 -7
  72. package/dist/cdn/components/eun-select.js +39 -18
  73. package/dist/cdn/components/eun-sidebar.js +10 -10
  74. package/dist/cdn/components/eun-skeleton.js +1 -1
  75. package/dist/cdn/components/eun-slider.js +9 -9
  76. package/dist/cdn/components/eun-sliding-card.js +7 -10
  77. package/dist/cdn/components/eun-step.js +8 -8
  78. package/dist/cdn/components/eun-stepper.js +8 -8
  79. package/dist/cdn/components/eun-switch.js +10 -10
  80. package/dist/cdn/components/eun-tab-group.js +19 -11
  81. package/dist/cdn/components/eun-tab-panel.js +1 -1
  82. package/dist/cdn/components/eun-tab.js +1 -1
  83. package/dist/cdn/components/eun-table-action-bar.js +1 -1
  84. package/dist/cdn/components/eun-table-cell.js +1 -1
  85. package/dist/cdn/components/eun-table-column.js +1 -1
  86. package/dist/cdn/components/eun-table-header.js +1 -1
  87. package/dist/cdn/components/eun-table-item.js +1 -1
  88. package/dist/cdn/components/eun-table-skeleton-row.js +1 -1
  89. package/dist/cdn/components/eun-table.js +3 -3
  90. package/dist/cdn/components/eun-tag.js +34 -122
  91. package/dist/cdn/components/eun-textarea.js +28 -28
  92. package/dist/cdn/components/eun-time-picker.js +25 -25
  93. package/dist/cdn/components/eun-toast.js +40 -36
  94. package/dist/cdn/components/eun-toggle-group.js +199 -66
  95. package/dist/cdn/components/eun-toggle-item.js +42 -25
  96. package/dist/cdn/components/eun-toggle.js +13 -10
  97. package/dist/cdn/components/eun-toolbar.js +28 -19
  98. package/dist/cdn/components/eun-tooltip.js +122 -87
  99. package/dist/cdn/styles/eunomia-themes.css +1 -1
  100. package/dist/cdn/styles/themes/eunomia-theme.css +1 -1
  101. package/dist/cdn/styles/themes/eunomia-theme.scss +1 -0
  102. package/dist/cdn/styles/themes/mixins/eunomia-neutrals.mixin.scss +71 -0
  103. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +3 -13
  104. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.mixin.scss +3 -13
  105. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.css +1 -1
  106. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.scss +2 -0
  107. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +3 -13
  108. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.mixin.scss +3 -13
  109. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.css +1 -1
  110. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.scss +2 -0
  111. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +3 -13
  112. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.mixin.scss +3 -13
  113. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.css +1 -1
  114. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.scss +2 -0
  115. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +3 -13
  116. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.mixin.scss +3 -13
  117. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.css +1 -1
  118. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.scss +2 -0
  119. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +3 -13
  120. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.mixin.scss +3 -13
  121. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.css +1 -1
  122. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.scss +2 -0
  123. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +3 -13
  124. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.mixin.scss +3 -13
  125. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.css +1 -1
  126. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.scss +2 -0
  127. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +3 -13
  128. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.mixin.scss +3 -13
  129. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.css +1 -1
  130. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.scss +2 -0
  131. package/dist/cdn/styles/tools/indexes/eunomia-tools.index.scss +1 -0
  132. package/dist/cdn/styles/tools/mixins/settings/eunomia-alpha.mixin.scss +39 -0
  133. package/dist/cdn/styles/tools/mixins/settings/eunomia-border.mixin.scss +3 -3
  134. package/dist/cdn/styles/tools/mixins/settings/eunomia-font.mixin.scss +12 -12
  135. package/dist/cdn/styles/tools/mixins/settings/eunomia-radius.mixin.scss +4 -4
  136. package/dist/components/action/button/button.d.ts +7 -6
  137. package/dist/components/action/button/button.js +7 -6
  138. package/dist/components/action/button/button.styles.js +143 -373
  139. package/dist/components/action/dropdown-button/dropdown-button.d.ts +7 -0
  140. package/dist/components/action/dropdown-button/dropdown-button.js +11 -0
  141. package/dist/components/action/dropdown-button/dropdown-button.styles.js +8 -8
  142. package/dist/components/action/dropdown-button/dropdown-item.styles.js +6 -6
  143. package/dist/components/action/fab/fab.d.ts +3 -1
  144. package/dist/components/action/fab/fab.js +3 -1
  145. package/dist/components/action/fab/fab.styles.js +26 -49
  146. package/dist/components/action/link/link.d.ts +50 -0
  147. package/dist/components/action/link/link.js +69 -1
  148. package/dist/components/action/link/link.styles.js +19 -2
  149. package/dist/components/action/shared-styles/button-palette.styles.d.ts +27 -0
  150. package/dist/components/action/shared-styles/button-palette.styles.js +151 -0
  151. package/dist/components/action/toggle/toggle-group.d.ts +41 -7
  152. package/dist/components/action/toggle/toggle-group.js +162 -46
  153. package/dist/components/action/toggle/toggle-group.styles.d.ts +6 -5
  154. package/dist/components/action/toggle/toggle-group.styles.js +152 -35
  155. package/dist/components/action/toggle/toggle-item.styles.js +38 -21
  156. package/dist/components/action/toggle/toggle.d.ts +1 -1
  157. package/dist/components/action/toggle/toggle.js +2 -2
  158. package/dist/components/action/toggle/toggle.styles.d.ts +2 -2
  159. package/dist/components/action/toggle/toggle.styles.js +13 -10
  160. package/dist/components/alert/alert/alert.d.ts +4 -3
  161. package/dist/components/alert/alert/alert.js +4 -3
  162. package/dist/components/alert/alert/alert.styles.js +57 -36
  163. package/dist/components/alert/drawer/drawer.styles.js +3 -3
  164. package/dist/components/alert/modal/modal.styles.js +6 -6
  165. package/dist/components/alert/toast/toast.d.ts +4 -3
  166. package/dist/components/alert/toast/toast.js +4 -3
  167. package/dist/components/alert/toast/toast.styles.js +41 -36
  168. package/dist/components/content/badge/badge.styles.js +1 -1
  169. package/dist/components/content/card/card.d.ts +4 -4
  170. package/dist/components/content/card/card.js +4 -4
  171. package/dist/components/content/card/card.styles.js +27 -10
  172. package/dist/components/content/card/image-card.d.ts +1 -1
  173. package/dist/components/content/card/image-card.js +1 -1
  174. package/dist/components/content/card/image-card.styles.js +17 -10
  175. package/dist/components/content/card/sliding-card.styles.js +3 -6
  176. package/dist/components/content/chip/chip.d.ts +16 -7
  177. package/dist/components/content/chip/chip.js +18 -6
  178. package/dist/components/content/chip/chip.styles.d.ts +1 -1
  179. package/dist/components/content/chip/chip.styles.js +43 -210
  180. package/dist/components/content/collapse/collapse.styles.js +10 -16
  181. package/dist/components/content/icon/icon.d.ts +48 -5
  182. package/dist/components/content/icon/icon.js +92 -20
  183. package/dist/components/content/icon/icon.style.js +1 -1
  184. package/dist/components/content/image-carousel/image-carousel.styles.js +14 -14
  185. package/dist/components/content/password-strength/password-strength.styles.js +7 -4
  186. package/dist/components/content/progress-bar/progress-bar.styles.js +9 -9
  187. package/dist/components/content/shared-styles/tone-surface.styles.d.ts +31 -0
  188. package/dist/components/content/shared-styles/tone-surface.styles.js +149 -0
  189. package/dist/components/content/tag/tag.d.ts +16 -6
  190. package/dist/components/content/tag/tag.js +19 -6
  191. package/dist/components/content/tag/tag.styles.d.ts +1 -1
  192. package/dist/components/content/tag/tag.styles.js +40 -121
  193. package/dist/components/content/tooltip/tooltip.d.ts +15 -4
  194. package/dist/components/content/tooltip/tooltip.js +21 -4
  195. package/dist/components/content/tooltip/tooltip.styles.js +115 -79
  196. package/dist/components/form/checkbox/check-card.styles.js +2 -2
  197. package/dist/components/form/checkbox/checkbox-list.d.ts +1 -1
  198. package/dist/components/form/checkbox/checkbox-list.js +1 -1
  199. package/dist/components/form/checkbox/checkbox.d.ts +1 -1
  200. package/dist/components/form/checkbox/checkbox.styles.js +6 -6
  201. package/dist/components/form/color-picker/color-picker.d.ts +1 -1
  202. package/dist/components/form/color-picker/color-picker.js +9 -7
  203. package/dist/components/form/color-picker/color-picker.styles.js +7 -7
  204. package/dist/components/form/counter/counter.d.ts +1 -1
  205. package/dist/components/form/counter/counter.js +3 -3
  206. package/dist/components/form/counter/counter.styles.js +7 -7
  207. package/dist/components/form/date-picker/date-picker-day-grid.styles.js +2 -2
  208. package/dist/components/form/date-picker/date-picker-grid.styles.js +15 -15
  209. package/dist/components/form/date-picker/date-picker-month-grid.styles.js +1 -1
  210. package/dist/components/form/date-picker/date-picker-year-grid.styles.js +1 -1
  211. package/dist/components/form/date-picker/date-picker.d.ts +1 -1
  212. package/dist/components/form/date-picker/date-picker.js +3 -3
  213. package/dist/components/form/date-picker/date-picker.styles.js +12 -12
  214. package/dist/components/form/input/input.d.ts +1 -1
  215. package/dist/components/form/input/input.js +2 -2
  216. package/dist/components/form/input-file/input-file.d.ts +1 -1
  217. package/dist/components/form/input-file/input-file.js +5 -5
  218. package/dist/components/form/input-file/input-file.styles.js +9 -9
  219. package/dist/components/form/input-phone/input-phone.d.ts +1 -1
  220. package/dist/components/form/input-phone/input-phone.js +3 -3
  221. package/dist/components/form/input-phone/input-phone.styles.js +7 -7
  222. package/dist/components/form/label/label.styles.js +4 -4
  223. package/dist/components/form/radio/radio-card.styles.js +1 -1
  224. package/dist/components/form/radio/radio-list.d.ts +1 -1
  225. package/dist/components/form/radio/radio-list.js +2 -2
  226. package/dist/components/form/radio/radio.d.ts +1 -1
  227. package/dist/components/form/radio/radio.styles.js +2 -2
  228. package/dist/components/form/search/search.styles.js +6 -6
  229. package/dist/components/form/select/select.d.ts +17 -1
  230. package/dist/components/form/select/select.js +28 -5
  231. package/dist/components/form/select/select.styles.js +16 -5
  232. package/dist/components/form/shared-styles/card.styles.js +1 -1
  233. package/dist/components/form/shared-styles/field.styles.js +7 -7
  234. package/dist/components/form/shared-styles/form-labels.styles.js +1 -1
  235. package/dist/components/form/shared-styles/listbox.styles.js +6 -6
  236. package/dist/components/form/slider/slider.d.ts +1 -1
  237. package/dist/components/form/slider/slider.js +2 -2
  238. package/dist/components/form/slider/slider.styles.js +6 -6
  239. package/dist/components/form/switch/switch.d.ts +1 -1
  240. package/dist/components/form/switch/switch.styles.js +8 -8
  241. package/dist/components/form/textarea/textarea.d.ts +1 -1
  242. package/dist/components/form/textarea/textarea.js +4 -4
  243. package/dist/components/form/textarea/textarea.styles.js +6 -6
  244. package/dist/components/form/time-picker/time-picker-columns.styles.js +6 -6
  245. package/dist/components/form/time-picker/time-picker-list.styles.js +2 -2
  246. package/dist/components/form/time-picker/time-picker.d.ts +1 -1
  247. package/dist/components/form/time-picker/time-picker.js +3 -3
  248. package/dist/components/form/time-picker/time-picker.styles.js +8 -8
  249. package/dist/components/layout/animate/animate.d.ts +40 -5
  250. package/dist/components/layout/animate/animate.js +30 -11
  251. package/dist/components/layout/animate/animate.styles.d.ts +1 -1
  252. package/dist/components/layout/animate/animate.styles.js +191 -1
  253. package/dist/components/loader/loader/loader.styles.js +2 -2
  254. package/dist/components/loader/skeleton/skeleton.styles.js +8 -5
  255. package/dist/components/navigation/breadcrumb/breadcrumb-item.d.ts +7 -0
  256. package/dist/components/navigation/breadcrumb/breadcrumb-item.js +15 -1
  257. package/dist/components/navigation/breadcrumb/breadcrumb-item.styles.js +3 -3
  258. package/dist/components/navigation/breadcrumb/breadcrumb.d.ts +1 -0
  259. package/dist/components/navigation/breadcrumb/breadcrumb.js +7 -1
  260. package/dist/components/navigation/breadcrumb/breadcrumb.styles.js +3 -3
  261. package/dist/components/navigation/carousel/carousel.d.ts +40 -6
  262. package/dist/components/navigation/carousel/carousel.js +61 -12
  263. package/dist/components/navigation/carousel/carousel.styles.js +20 -8
  264. package/dist/components/navigation/pagination/pagination.styles.js +3 -3
  265. package/dist/components/navigation/sidebar/sidebar.styles.js +9 -9
  266. package/dist/components/navigation/stepper/step.styles.js +8 -8
  267. package/dist/components/navigation/stepper/stepper.styles.js +8 -8
  268. package/dist/components/navigation/tabs/tab/tab.styles.js +5 -5
  269. package/dist/components/navigation/tabs/tab-group/tab-group.d.ts +9 -0
  270. package/dist/components/navigation/tabs/tab-group/tab-group.js +19 -2
  271. package/dist/components/navigation/tabs/tab-group/tab-group.styles.js +12 -4
  272. package/dist/components/navigation/tabs/tab-panel/tab-panel.styles.js +1 -1
  273. package/dist/components/navigation/toolbar/toolbar.d.ts +24 -0
  274. package/dist/components/navigation/toolbar/toolbar.js +30 -2
  275. package/dist/components/navigation/toolbar/toolbar.styles.js +20 -10
  276. package/dist/events/change.event.d.ts +13 -1
  277. package/dist/events/change.event.js +2 -1
  278. package/dist/features/scheduler/calendar/calendar.js +1 -1
  279. package/dist/features/scheduler/calendar/calendar.styles.js +3 -3
  280. package/dist/features/scheduler/scheduler/scheduler.styles.js +2 -2
  281. package/dist/features/scheduler/scheduler-event/scheduler-event.styles.js +2 -2
  282. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.styles.js +2 -2
  283. package/dist/features/scheduler/shared/scheduler-event-popover.styles.js +4 -4
  284. package/dist/features/scheduler/shared/scheduler-hour-grid.styles.js +1 -1
  285. package/dist/features/scheduler/shared/scheduler-month-view.styles.js +1 -1
  286. package/dist/features/scheduler/shared/scheduler-year-view.styles.js +1 -1
  287. package/dist/features/table/native-table.css +11 -11
  288. package/dist/features/table/table/table.styles.js +2 -2
  289. package/dist/features/table/table-action-bar/table-action-bar.styles.js +2 -2
  290. package/dist/features/table/table-cell/table-cell.styles.js +2 -2
  291. package/dist/features/table/table-column/table-column.styles.js +3 -3
  292. package/dist/features/table/table-header/table-header.styles.js +4 -4
  293. package/dist/features/table/table-item/table-item.styles.js +6 -6
  294. package/dist/features/table/table-skeleton-row/table-skeleton-row.styles.js +1 -1
  295. package/dist/index.d.ts +5 -5
  296. package/dist/index.js +6 -3
  297. package/dist/jsx.d.ts +18 -5
  298. package/dist/mixins/button.mixin.d.ts +1 -0
  299. package/dist/mixins/button.mixin.js +10 -0
  300. package/dist/mixins/check.mixin.d.ts +1 -1
  301. package/dist/mixins/check.mixin.js +6 -2
  302. package/dist/mixins/editable.mixin.d.ts +1 -1
  303. package/dist/mixins/form.mixin.d.ts +9 -1
  304. package/dist/mixins/form.mixin.js +110 -14
  305. package/dist/mixins/overflow-navigation.mixin.js +2 -1
  306. package/dist/mixins/radio.mixin.d.ts +1 -1
  307. package/dist/mixins/radio.mixin.js +6 -2
  308. package/dist/mixins/validators.mixin.d.ts +9 -3
  309. package/dist/ssr/animate-ssr.css +149 -0
  310. package/dist/ssr/overlay-ssr.css +57 -0
  311. package/dist/ssr/sidebar-ssr.css +57 -0
  312. package/dist/ssr/toolbar-ssr.css +41 -0
  313. package/dist/utils/rich-text.utils.d.ts +33 -0
  314. package/dist/utils/rich-text.utils.js +140 -49
  315. package/dist/utils/theme-generator.utils.d.ts +24 -3
  316. package/dist/utils/theme-generator.utils.js +66 -21
  317. package/package.json +14 -3
  318. package/styles/themes/eunomia-theme.scss +1 -0
  319. package/styles/themes/mixins/eunomia-neutrals.mixin.scss +71 -0
  320. package/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +3 -13
  321. package/styles/themes/prebuilt-themes/eunomia/eunomia.mixin.scss +3 -13
  322. package/styles/themes/prebuilt-themes/eunomia/eunomia.theme.scss +2 -0
  323. package/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +3 -13
  324. package/styles/themes/prebuilt-themes/fire/eunomia-fire.mixin.scss +3 -13
  325. package/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.scss +2 -0
  326. package/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +3 -13
  327. package/styles/themes/prebuilt-themes/forest/eunomia-forest.mixin.scss +3 -13
  328. package/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.scss +2 -0
  329. package/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +3 -13
  330. package/styles/themes/prebuilt-themes/gold/eunomia-gold.mixin.scss +3 -13
  331. package/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.scss +2 -0
  332. package/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +3 -13
  333. package/styles/themes/prebuilt-themes/ocean/eunomia-ocean.mixin.scss +3 -13
  334. package/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.scss +2 -0
  335. package/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +3 -13
  336. package/styles/themes/prebuilt-themes/salmon/eunomia-salmon.mixin.scss +3 -13
  337. package/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.scss +2 -0
  338. package/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +3 -13
  339. package/styles/themes/prebuilt-themes/violet/eunomia-violet.mixin.scss +3 -13
  340. package/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.scss +2 -0
  341. package/styles/tools/indexes/eunomia-tools.index.scss +1 -0
  342. package/styles/tools/mixins/settings/eunomia-alpha.mixin.scss +39 -0
  343. package/styles/tools/mixins/settings/eunomia-border.mixin.scss +3 -3
  344. package/styles/tools/mixins/settings/eunomia-font.mixin.scss +12 -12
  345. package/styles/tools/mixins/settings/eunomia-radius.mixin.scss +4 -4
  346. package/dist/cdn/components/chunks/chunk-27Q2SLRY.js +0 -603
  347. package/dist/cdn/components/chunks/chunk-2IQUMAMI.js +0 -38
  348. package/dist/cdn/components/chunks/chunk-5TH3P53V.js +0 -16
  349. package/dist/cdn/components/chunks/chunk-7Q6AHVI5.js +0 -1
  350. package/dist/cdn/components/chunks/chunk-DENMN3WH.js +0 -48
  351. package/dist/cdn/components/chunks/chunk-MBF52GEL.js +0 -1
  352. package/dist/cdn/components/chunks/chunk-ONYUXQV2.js +0 -1
  353. package/dist/cdn/components/chunks/chunk-ZKPCO5RB.js +0 -262
  354. package/dist/components/layout/animate/animate-ssr.css +0 -64
@@ -0,0 +1,151 @@
1
+ import { css } from "lit";
2
+ /**
3
+ * Shared color palette of the button family (`eun-button`, `eun-fab`, and so
4
+ * `eun-dropdown-button`, which renders an `eun-button`). A `variant` fills
5
+ * the same slots on the host, and each component's stylesheet then reads
6
+ * them, per appearance and state, *behind* its public `--<component>-*`
7
+ * custom properties, so those always win over any variant and appearance.
8
+ *
9
+ * Slots :
10
+ * - `--_solid`, `--_solid-hover`, `--_solid-active` : the strong color, at
11
+ * rest, hovered and pressed.
12
+ * - `--_onSolid` : the text color on top of the strong color.
13
+ * - `--_accent` : the text/border color on a pale or transparent surface.
14
+ * - `--_tint`, `--_tint-hover`, `--_tint-active` : the pale wash, and
15
+ * `--_fgTint` the text color on it.
16
+ * - `--_wash-hover`, `--_wash-active` : the wash a transparent surface
17
+ * (outline, ghost) takes on hover and press.
18
+ * - `--_flat`, `--_flat-hover`, `--_flatFg` : the muted `flat` surface.
19
+ * - `--_ring` : the focus outline color.
20
+ *
21
+ * `light` and `dark` are absolute colors : white and black, whatever the
22
+ * appearance. They have no pale wash, so the tinted surface is as solid as
23
+ * the strong one, and `flat` is a faint wash of the color itself rather than
24
+ * the neutral surface every other variant shares. By default they follow the
25
+ * grey scale, which flips with the active theme ; `fixed-color` pins them to
26
+ * the light theme's white and black instead.
27
+ */
28
+ export const buttonPaletteStyles = css `
29
+ :host {
30
+ --_solid: var(--eun-color-primary-500, #3d6fff);
31
+ --_solid-hover: var(--eun-color-primary-700, #3662e0);
32
+ --_solid-active: var(--eun-color-primary-800, #2d52bd);
33
+ --_onSolid: var(--eun-color-on-primary-500, #ffffff);
34
+ --_accent: var(--eun-color-primary-500, #3d6fff);
35
+ --_tint: var(--eun-color-primary-transparent, #3d6fff33);
36
+ --_tint-hover: var(--eun-color-primary-transparent-hover, #3d6fff4d);
37
+ --_tint-active: var(--eun-color-primary-transparent-active, #3d6fff66);
38
+ --_fgTint: var(--_accent);
39
+ --_wash-hover: var(--_tint-hover);
40
+ --_wash-active: var(--_tint-active);
41
+ --_flat: var(--eun-surface-sunken, #f7f8fa);
42
+ --_flat-hover: var(--eun-surface-sunken-hover, #edeff0);
43
+ --_flatFg: var(--eun-text-secondary, #484e61);
44
+ --_ring: var(--eun-color-primary-700, #3662e0);
45
+ }
46
+ :host([variant="secondary"]) {
47
+ --_solid: var(--eun-color-secondary-500, #e5a030);
48
+ --_solid-hover: var(--eun-color-secondary-700, #ca8d2a);
49
+ --_solid-active: var(--eun-color-secondary-800, #a97624);
50
+ --_onSolid: var(--eun-color-on-secondary-500, #000000de);
51
+ --_accent: var(--eun-color-secondary-500, #e5a030);
52
+ --_tint: var(--eun-color-secondary-transparent, #e5a03033);
53
+ --_tint-hover: var(--eun-color-secondary-transparent-hover, #e5a0304d);
54
+ --_tint-active: var(--eun-color-secondary-transparent-active, #e5a03066);
55
+ --_ring: var(--eun-color-secondary-700, #ca8d2a);
56
+ }
57
+ :host([variant="critical"]) {
58
+ --_solid: var(--eun-color-critical-100, #aa0014);
59
+ --_solid-hover: var(--eun-color-critical-100, #aa0014);
60
+ --_solid-active: var(--eun-color-critical-100, #aa0014);
61
+ --_onSolid: #fff;
62
+ --_accent: var(--eun-color-critical-100, #aa0014);
63
+ --_tint: var(--eun-color-critical-30, #faf0f1);
64
+ --_tint-hover: var(--eun-color-critical-50, #f1d6d9);
65
+ --_tint-active: var(--eun-color-critical-90, #e4adb4);
66
+ --_ring: var(--eun-color-critical-100, #aa0014);
67
+ }
68
+ :host([variant="success"]) {
69
+ --_solid: var(--eun-color-success-100, #1a9948);
70
+ --_solid-hover: var(--eun-color-success-100, #1a9948);
71
+ --_solid-active: var(--eun-color-success-100, #1a9948);
72
+ --_onSolid: #fff;
73
+ --_accent: var(--eun-color-success-100, #1a9948);
74
+ --_tint: var(--eun-color-success-30, #f1f9f4);
75
+ --_tint-hover: var(--eun-color-success-50, #daefe2);
76
+ --_tint-active: var(--eun-color-success-90, #b6dec4);
77
+ --_ring: var(--eun-color-success-100, #1a9948);
78
+ }
79
+ :host([variant="warning"]) {
80
+ --_solid: var(--eun-color-warning-100, #c85207);
81
+ --_solid-hover: var(--eun-color-warning-100, #c85207);
82
+ --_solid-active: var(--eun-color-warning-100, #c85207);
83
+ --_onSolid: #fff;
84
+ --_accent: var(--eun-color-warning-100, #c85207);
85
+ --_tint: var(--eun-color-warning-30, #fcf5f0);
86
+ --_tint-hover: var(--eun-color-warning-50, #f6e3d7);
87
+ --_tint-active: var(--eun-color-warning-90, #edc8b0);
88
+ --_ring: var(--eun-color-warning-100, #c85207);
89
+ }
90
+ :host([variant="medium"]) {
91
+ --_solid: var(--eun-color-grey-700, #484e61);
92
+ --_solid-hover: var(--eun-color-grey-800, #071621);
93
+ --_solid-active: var(--eun-color-grey-900, #000000);
94
+ --_onSolid: var(--eun-color-grey-0, #ffffff);
95
+ --_accent: var(--eun-color-grey-900, #000000);
96
+ --_tint: color-mix(
97
+ in srgb,
98
+ var(--eun-color-grey-700, #484e61) 20%,
99
+ transparent
100
+ );
101
+ --_tint-hover: color-mix(
102
+ in srgb,
103
+ var(--eun-color-grey-700, #484e61) 30%,
104
+ transparent
105
+ );
106
+ --_tint-active: color-mix(
107
+ in srgb,
108
+ var(--eun-color-grey-700, #484e61) 40%,
109
+ transparent
110
+ );
111
+ --_ring: var(--eun-color-grey-700, #484e61);
112
+ }
113
+ :host([variant="light"]) {
114
+ --_solid: var(--eun-color-grey-0, #ffffff);
115
+ --_solid-hover: var(--eun-color-grey-200, #ecedf0);
116
+ --_solid-active: var(--eun-color-grey-300, #dee0e7);
117
+ --_onSolid: var(--eun-color-grey-900, #000000);
118
+ }
119
+ :host([variant="light"][fixed-color]) {
120
+ --_solid: #ffffff;
121
+ --_solid-hover: #ecedf0;
122
+ --_solid-active: #dee0e7;
123
+ --_onSolid: #000000;
124
+ }
125
+ :host([variant="dark"]) {
126
+ --_solid: var(--eun-color-grey-800, #071621);
127
+ --_solid-hover: var(--eun-color-grey-900, #000000);
128
+ --_solid-active: var(--eun-color-grey-900, #000000);
129
+ --_onSolid: var(--eun-color-grey-0, #ffffff);
130
+ }
131
+ :host([variant="dark"][fixed-color]) {
132
+ --_solid: #071621;
133
+ --_solid-hover: #000000;
134
+ --_solid-active: #000000;
135
+ --_onSolid: #ffffff;
136
+ }
137
+ :host([variant="light"]),
138
+ :host([variant="dark"]) {
139
+ --_accent: var(--_solid);
140
+ --_tint: var(--_solid);
141
+ --_tint-hover: var(--_solid-hover);
142
+ --_tint-active: var(--_solid-active);
143
+ --_fgTint: var(--_onSolid);
144
+ --_wash-hover: color-mix(in srgb, var(--_solid) 16%, transparent);
145
+ --_wash-active: color-mix(in srgb, var(--_solid) 28%, transparent);
146
+ --_flat: color-mix(in srgb, var(--_solid) 16%, transparent);
147
+ --_flat-hover: color-mix(in srgb, var(--_solid) 24%, transparent);
148
+ --_flatFg: var(--_solid);
149
+ --_ring: var(--_solid);
150
+ }
151
+ `;
@@ -42,7 +42,7 @@ export type EunomiaToggleGroupOption = {
42
42
  */
43
43
  variant?: ButtonVariant;
44
44
  };
45
- declare const EunomiaToggleGroup_base: import("../../../utils/constructor.type.js").Constructor<import("../../../mixins/disabled.mixin.js").DisabledMixinInterface> & typeof LitElement;
45
+ declare const EunomiaToggleGroup_base: import("../../../utils/constructor.type.js").Constructor<import("../../../mixins/overflow-navigation.mixin.js").NavigationOverflowMixinInterface> & import("../../../utils/constructor.type.js").Constructor<import("../../../mixins/disabled.mixin.js").DisabledMixinInterface> & typeof LitElement;
46
46
  /**
47
47
  * Groups toggle choices, declared through options, slotted toggle item
48
48
  * elements, or both at once, into a single segmented control. The
@@ -70,6 +70,8 @@ declare const EunomiaToggleGroup_base: import("../../../utils/constructor.type.j
70
70
  * the Examples tab for what each shape looks like.
71
71
  *
72
72
  * @slot [default] - Toggle item elements, used instead of or alongside options
73
+ * @prop {boolean} [full=false] - Stretches the group to 100% of its parent's width, dividing that width equally between every choice, instead of sizing to content
74
+ * @attr {boolean} [full=false] - Stretches the group to 100% of its parent's width, dividing that width equally between every choice, instead of sizing to content
73
75
  * @prop {Array<EunomiaToggleGroupOption>} options - The choices to render, in order
74
76
  * @prop {Array<string>} value - The currently selected choices' values. Always exactly one entry in exclusive mode
75
77
  * @prop {boolean} [single=false] - Forces the exclusive, sliding indicator mode regardless of choice count. Already the case for exactly two choices without setting this
@@ -77,18 +79,19 @@ declare const EunomiaToggleGroup_base: import("../../../utils/constructor.type.j
77
79
  * @prop {boolean} [disabled=false] - Whether the whole group is disabled
78
80
  * @attr {string} [aria-label] - The accessible label for the group, required since the group has no visible legend of its own
79
81
  * @fires {ChangeEvent} eunchange - Fired whenever the selection changes
80
- * @cssprop [--toggle-group-background] - Sets the background color of the track. Ignored once appearance isn't default, which has no shared background
81
- * @cssprop [--toggle-group-border-color] - Sets the border color of the track, and the border color of each option at rest in the outline appearance
82
+ * @cssprop [--toggle-group-background] - Sets the background color of the track, for every appearance (transparent by default in outline and flat)
83
+ * @cssprop [--toggle-group-border-color] - Sets the border color of the track in the default appearance, and the border color of each option at rest in the outline and flat appearances
82
84
  * @cssprop [--toggle-group-color] - Sets the text color of unselected options
83
- * @cssprop [--toggle-group-active-background] - Sets the background color of selected options, and the sliding indicator in exclusive mode, in the default appearance. Also sets the primary variant's selected color in the outline and flat appearances, for an option that sets no variant of its own
84
- * @cssprop [--toggle-group-active-color] - Sets the text color of selected options in the default appearance. Ignored in the outline and flat appearances, where the selected text color always follows the option's own color instead
85
+ * @cssprop [--toggle-group-active-background] - Sets the background color of selected options, and the sliding indicator in exclusive mode, in the default appearance. In the outline and flat appearances, sets the selected color of every option, over its own variant
86
+ * @cssprop [--toggle-group-active-color] - Sets the text color of selected options, for every appearance
85
87
  * @cssprop [--toggle-group-border-radius] - Sets the corner radius of the track and its options
86
88
  * @cssprop [--toggle-group-gap] - Sets the gap between the options
87
89
  * @cssprop [--toggle-group-padding] - Sets the padding of the track, also used as the indicator's inset so it stays flush with the track's edge. Ignored once appearance isn't default
88
- * @cssprop [--toggle-group-hover-color] - Sets the text color of an unselected option on hover, in the default appearance. Ignored in the outline and flat appearances, where hover and focus text color always follow the option's own color instead, exactly like the selected state
90
+ * @cssprop [--toggle-group-hover-color] - Sets the text color of an unselected option on hover and keyboard focus, for every appearance
89
91
  * @cssprop [--toggle-group-hover-background] - Sets the background color of an unselected option on hover. Transparent by default, and applies regardless of appearance
90
92
  * @cssprop [--toggle-group-shadow] - Sets a box shadow on every option, and the sliding indicator in exclusive mode. None by default
91
93
  * @cssprop [--toggle-group-shadow-hover] - Sets the box shadow of an unselected option on hover, falling back to toggle-group-shadow when unset
94
+ * @cssprop [--toggle-group-arrows-color] - Sets the background color the overflow arrows fade out to, once the group overflows its container
92
95
  * @element eun-toggle-group
93
96
  */
94
97
  export declare class EunomiaToggleGroup extends EunomiaToggleGroup_base {
@@ -128,6 +131,13 @@ export declare class EunomiaToggleGroup extends EunomiaToggleGroup_base {
128
131
  * @default default
129
132
  */
130
133
  appearance: EunomiaToggleGroupAppearance;
134
+ /**
135
+ * Stretches the group to 100% of its parent's width, dividing that width
136
+ * equally between every choice instead of sizing to content. A label
137
+ * that doesn't fit its share makes the row overflow rather than shrink.
138
+ * @default false
139
+ */
140
+ full: boolean;
131
141
  /**
132
142
  * The `eun-toggle-item` elements slotted in, if any.
133
143
  * @internal
@@ -169,7 +179,7 @@ export declare class EunomiaToggleGroup extends EunomiaToggleGroup_base {
169
179
  private get entries();
170
180
  connectedCallback(): void;
171
181
  disconnectedCallback(): void;
172
- protected firstUpdated(): void;
182
+ protected firstUpdated(changedProperties: PropertyValues): void;
173
183
  protected updated(_changedProperties: PropertyValues): void;
174
184
  /**
175
185
  * Waits for every slotted item's custom element to be *defined*, not
@@ -293,6 +303,14 @@ export declare class EunomiaToggleGroup extends EunomiaToggleGroup_base {
293
303
  * @private
294
304
  */
295
305
  private refreshIndicator;
306
+ /**
307
+ * Scrolls the row just enough to bring the selected entry into view, once
308
+ * the group overflows its container, leaving room for the arrows.
309
+ *
310
+ * @param animate whether to scroll smoothly, or jump there instantly.
311
+ * @private
312
+ */
313
+ private revealActive;
296
314
  /**
297
315
  * Debounced wrapper around {@link moveIndicator}, used by the resize
298
316
  * observer so a burst of layout changes doesn't retrigger it constantly.
@@ -340,6 +358,22 @@ export declare class EunomiaToggleGroup extends EunomiaToggleGroup_base {
340
358
  * @private
341
359
  */
342
360
  private readonly handleSlotChange;
361
+ /**
362
+ * Whether a given overflow arrow should currently be visible : hidden
363
+ * when nothing overflows, and once scrolled all the way to that edge.
364
+ *
365
+ * @param arrowPosition the position of the arrow to check.
366
+ * @returns true if it should be visible, false otherwise.
367
+ * @private
368
+ */
369
+ private arrowVisible;
370
+ /**
371
+ * The row mixes internal `<button>`s (`options`) with slotted items, so the
372
+ * mixin's slot-based measurement can't see every choice : compares the
373
+ * scrollable's own sizes instead.
374
+ * @protected
375
+ */
376
+ protected isOnOverflow(): boolean;
343
377
  render(): TemplateResult;
344
378
  }
345
379
  declare global {
@@ -21,9 +21,15 @@ import { html, LitElement, nothing } from "lit";
21
21
  import { classMap } from "lit/directives/class-map.js";
22
22
  import { ifDefined } from "lit/directives/if-defined.js";
23
23
  import { DisabledMixin } from "../../../mixins/disabled.mixin.js";
24
+ import { NavigationOverflowMixin } from "../../../mixins/overflow-navigation.mixin.js";
24
25
  import { ChangeEvent } from "../../../events/change.event.js";
25
26
  import { debounce } from "../../../utils/time.utils.js";
26
27
  import { toggleGroupStyles } from "./toggle-group.styles.js";
28
+ /**
29
+ * Room kept between a revealed entry and the row's edge, so the overflow
30
+ * arrows (24px wide) never sit over it.
31
+ */
32
+ const ARROW_CLEARANCE = 28;
27
33
  /**
28
34
  * Tag name of the toggle group component.
29
35
  */
@@ -55,6 +61,8 @@ export const EunomiaToggleGroupTagName = "eun-toggle-group";
55
61
  * the Examples tab for what each shape looks like.
56
62
  *
57
63
  * @slot [default] - Toggle item elements, used instead of or alongside options
64
+ * @prop {boolean} [full=false] - Stretches the group to 100% of its parent's width, dividing that width equally between every choice, instead of sizing to content
65
+ * @attr {boolean} [full=false] - Stretches the group to 100% of its parent's width, dividing that width equally between every choice, instead of sizing to content
58
66
  * @prop {Array<EunomiaToggleGroupOption>} options - The choices to render, in order
59
67
  * @prop {Array<string>} value - The currently selected choices' values. Always exactly one entry in exclusive mode
60
68
  * @prop {boolean} [single=false] - Forces the exclusive, sliding indicator mode regardless of choice count. Already the case for exactly two choices without setting this
@@ -62,21 +70,22 @@ export const EunomiaToggleGroupTagName = "eun-toggle-group";
62
70
  * @prop {boolean} [disabled=false] - Whether the whole group is disabled
63
71
  * @attr {string} [aria-label] - The accessible label for the group, required since the group has no visible legend of its own
64
72
  * @fires {ChangeEvent} eunchange - Fired whenever the selection changes
65
- * @cssprop [--toggle-group-background] - Sets the background color of the track. Ignored once appearance isn't default, which has no shared background
66
- * @cssprop [--toggle-group-border-color] - Sets the border color of the track, and the border color of each option at rest in the outline appearance
73
+ * @cssprop [--toggle-group-background] - Sets the background color of the track, for every appearance (transparent by default in outline and flat)
74
+ * @cssprop [--toggle-group-border-color] - Sets the border color of the track in the default appearance, and the border color of each option at rest in the outline and flat appearances
67
75
  * @cssprop [--toggle-group-color] - Sets the text color of unselected options
68
- * @cssprop [--toggle-group-active-background] - Sets the background color of selected options, and the sliding indicator in exclusive mode, in the default appearance. Also sets the primary variant's selected color in the outline and flat appearances, for an option that sets no variant of its own
69
- * @cssprop [--toggle-group-active-color] - Sets the text color of selected options in the default appearance. Ignored in the outline and flat appearances, where the selected text color always follows the option's own color instead
76
+ * @cssprop [--toggle-group-active-background] - Sets the background color of selected options, and the sliding indicator in exclusive mode, in the default appearance. In the outline and flat appearances, sets the selected color of every option, over its own variant
77
+ * @cssprop [--toggle-group-active-color] - Sets the text color of selected options, for every appearance
70
78
  * @cssprop [--toggle-group-border-radius] - Sets the corner radius of the track and its options
71
79
  * @cssprop [--toggle-group-gap] - Sets the gap between the options
72
80
  * @cssprop [--toggle-group-padding] - Sets the padding of the track, also used as the indicator's inset so it stays flush with the track's edge. Ignored once appearance isn't default
73
- * @cssprop [--toggle-group-hover-color] - Sets the text color of an unselected option on hover, in the default appearance. Ignored in the outline and flat appearances, where hover and focus text color always follow the option's own color instead, exactly like the selected state
81
+ * @cssprop [--toggle-group-hover-color] - Sets the text color of an unselected option on hover and keyboard focus, for every appearance
74
82
  * @cssprop [--toggle-group-hover-background] - Sets the background color of an unselected option on hover. Transparent by default, and applies regardless of appearance
75
83
  * @cssprop [--toggle-group-shadow] - Sets a box shadow on every option, and the sliding indicator in exclusive mode. None by default
76
84
  * @cssprop [--toggle-group-shadow-hover] - Sets the box shadow of an unselected option on hover, falling back to toggle-group-shadow when unset
85
+ * @cssprop [--toggle-group-arrows-color] - Sets the background color the overflow arrows fade out to, once the group overflows its container
77
86
  * @element eun-toggle-group
78
87
  */
79
- let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitElement) {
88
+ let EunomiaToggleGroup = class EunomiaToggleGroup extends NavigationOverflowMixin(DisabledMixin(LitElement)) {
80
89
  constructor() {
81
90
  super(...arguments);
82
91
  /**
@@ -106,6 +115,13 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
106
115
  * @default default
107
116
  */
108
117
  this.appearance = "default";
118
+ /**
119
+ * Stretches the group to 100% of its parent's width, dividing that width
120
+ * equally between every choice instead of sizing to content. A label
121
+ * that doesn't fit its share makes the row overflow rather than shrink.
122
+ * @default false
123
+ */
124
+ this.full = false;
109
125
  /**
110
126
  * Keeps the indicator aligned when the track is resized (a responsive
111
127
  * layout change, a custom font loading in, ...) without a value/options
@@ -184,7 +200,8 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
184
200
  __classPrivateFieldGet(this, _EunomiaToggleGroup_resizeObserver, "f")?.disconnect();
185
201
  super.disconnectedCallback?.();
186
202
  }
187
- firstUpdated() {
203
+ firstUpdated(changedProperties) {
204
+ super.firstUpdated(changedProperties);
188
205
  this.settleAndSync(false);
189
206
  }
190
207
  updated(_changedProperties) {
@@ -195,7 +212,8 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
195
212
  if (_changedProperties.has("value") ||
196
213
  _changedProperties.has("options") ||
197
214
  _changedProperties.has("single") ||
198
- _changedProperties.has("appearance")) {
215
+ _changedProperties.has("appearance") ||
216
+ _changedProperties.has("full")) {
199
217
  this.settleAndSync(true);
200
218
  }
201
219
  if (_changedProperties.has("disabled") && this.disabled) {
@@ -240,6 +258,10 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
240
258
  this.applyExclusiveDefault();
241
259
  this.syncItems();
242
260
  this.refreshIndicator(animate);
261
+ // After the sync : measuring reads layout, which would otherwise style
262
+ // the items before they carry their state, then transition into it.
263
+ // Needed since the host's size may not change with the choices.
264
+ this.updateScroll();
243
265
  });
244
266
  }
245
267
  /**
@@ -310,7 +332,7 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
310
332
  ? this.value.filter((v) => v !== value)
311
333
  : [...this.value, value];
312
334
  }
313
- this.dispatchEvent(new ChangeEvent());
335
+ this.dispatchEvent(new ChangeEvent(this.value));
314
336
  }
315
337
  /**
316
338
  * Activates the given `eun-toggle-item`'s value, unless the group or the
@@ -345,6 +367,7 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
345
367
  item.checked = this.value.includes(item.value);
346
368
  item.toggleAttribute("exclusive", this.exclusive);
347
369
  item.setAttribute("appearance", this.appearance);
370
+ item.toggleAttribute("full", this.full);
348
371
  });
349
372
  if (this.exclusive) {
350
373
  this.applyRovingTabindex();
@@ -416,15 +439,52 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
416
439
  * @private
417
440
  */
418
441
  refreshIndicator(animate) {
419
- if (!this.exclusive || this.appearance !== "default") {
442
+ if (!this.exclusive) {
420
443
  return;
421
444
  }
445
+ const settle = () => {
446
+ if (this.appearance === "default") {
447
+ this.moveIndicator(animate);
448
+ }
449
+ this.revealActive(animate);
450
+ };
422
451
  const active = this.entries.find((entry) => entry.value === this.value[0]);
423
452
  if (active && active.element.tagName !== "BUTTON") {
424
- this.whenItemReady(active.element).then(() => this.moveIndicator(animate));
453
+ this.whenItemReady(active.element).then(settle);
425
454
  return;
426
455
  }
427
- this.moveIndicator(animate);
456
+ settle();
457
+ }
458
+ /**
459
+ * Scrolls the row just enough to bring the selected entry into view, once
460
+ * the group overflows its container, leaving room for the arrows.
461
+ *
462
+ * @param animate whether to scroll smoothly, or jump there instantly.
463
+ * @private
464
+ */
465
+ revealActive(animate) {
466
+ const track = this.trackEl;
467
+ const active = this.entries.find((entry) => entry.value === this.value[0]);
468
+ if (!track || !active || track.scrollWidth <= track.clientWidth) {
469
+ return;
470
+ }
471
+ const trackRect = track.getBoundingClientRect();
472
+ const rect = active.element.getBoundingClientRect();
473
+ const left = rect.left - trackRect.left - track.clientLeft;
474
+ const right = left + rect.width;
475
+ let delta = 0;
476
+ if (left < ARROW_CLEARANCE) {
477
+ delta = left - ARROW_CLEARANCE;
478
+ }
479
+ else if (right > track.clientWidth - ARROW_CLEARANCE) {
480
+ delta = right - (track.clientWidth - ARROW_CLEARANCE);
481
+ }
482
+ if (delta) {
483
+ track.scrollBy({
484
+ left: delta,
485
+ behavior: animate ? "smooth" : "instant",
486
+ });
487
+ }
428
488
  }
429
489
  /**
430
490
  * Slides the highlight behind the currently selected entry, resizing it
@@ -448,12 +508,20 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
448
508
  }
449
509
  const trackRect = this.trackEl.getBoundingClientRect();
450
510
  const activeRect = active.element.getBoundingClientRect();
511
+ // The indicator lives inside the scrolling row, so it moves with the
512
+ // content : its offset is the active entry's position in *content*
513
+ // coordinates, from the padding edge (past the border), not from the
514
+ // window.
515
+ const offset = activeRect.left -
516
+ trackRect.left -
517
+ this.trackEl.clientLeft +
518
+ this.trackEl.scrollLeft;
451
519
  if (!animate) {
452
520
  indicator.style.transition = "none";
453
521
  }
454
522
  indicator.style.opacity = "1";
455
523
  indicator.style.width = `${Math.floor(activeRect.width)}px`;
456
- indicator.style.transform = `translateX(${Math.floor(activeRect.left - trackRect.left)}px)`;
524
+ indicator.style.transform = `translateX(${Math.floor(offset)}px)`;
457
525
  if (!animate) {
458
526
  indicator.getBoundingClientRect();
459
527
  indicator.style.transition = "";
@@ -543,52 +611,97 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
543
611
  this.activateValue(next.value);
544
612
  next.element.focus();
545
613
  }
614
+ /**
615
+ * Whether a given overflow arrow should currently be visible : hidden
616
+ * when nothing overflows, and once scrolled all the way to that edge.
617
+ *
618
+ * @param arrowPosition the position of the arrow to check.
619
+ * @returns true if it should be visible, false otherwise.
620
+ * @private
621
+ */
622
+ arrowVisible(arrowPosition) {
623
+ if (!this.overflowState) {
624
+ return false;
625
+ }
626
+ const overflowPositions = [
627
+ "middle",
628
+ arrowPosition === "start" ? "end" : "start",
629
+ ];
630
+ return overflowPositions.includes(String(this.overflowState));
631
+ }
632
+ /**
633
+ * The row mixes internal `<button>`s (`options`) with slotted items, so the
634
+ * mixin's slot-based measurement can't see every choice : compares the
635
+ * scrollable's own sizes instead.
636
+ * @protected
637
+ */
638
+ isOnOverflow() {
639
+ const el = this.trackEl;
640
+ return !!el && el.scrollWidth > el.clientWidth;
641
+ }
546
642
  render() {
547
643
  const exclusive = this.exclusive;
548
644
  const showIndicator = exclusive && this.appearance === "default";
549
645
  return html `
550
- <div
551
- id="track"
552
- role=${exclusive ? "radiogroup" : "group"}
553
- part="track"
554
- aria-label=${this.ariaLabel ?? nothing}
555
- aria-disabled=${this.disabled ? "true" : "false"}
556
- @keydown=${(event) => this.handleKeydown(event)}
557
- >
558
- ${showIndicator
646
+ <div id="scrollable-wrapper">
647
+ <div
648
+ id="scrollable"
649
+ role=${exclusive ? "radiogroup" : "group"}
650
+ part="track"
651
+ aria-label=${this.ariaLabel ?? nothing}
652
+ aria-disabled=${this.disabled ? "true" : "false"}
653
+ @keydown=${(event) => this.handleKeydown(event)}
654
+ @scroll=${this.updateScroll}
655
+ >
656
+ ${showIndicator
559
657
  ? html `<span
560
- id="indicator"
561
- part="indicator"
562
- aria-hidden="true"
563
- ></span>`
658
+ id="indicator"
659
+ part="indicator"
660
+ aria-hidden="true"
661
+ ></span>`
564
662
  : nothing}
565
- ${this.options.map((option, index) => {
663
+ ${this.options.map((option, index) => {
566
664
  const checked = this.value.includes(option.value);
567
665
  const iconOnly = !!option.icon && !option.showLabel;
568
666
  return html `
569
- <button
570
- type="button"
571
- class=${classMap({ active: checked, "icon-only": iconOnly })}
572
- data-value=${option.value}
573
- data-variant=${ifDefined(option.variant)}
574
- role=${exclusive ? "radio" : "checkbox"}
575
- aria-checked=${checked ? "true" : "false"}
576
- aria-label=${ifDefined(iconOnly ? option.label : undefined)}
577
- title=${ifDefined(iconOnly ? option.label : undefined)}
578
- tabindex=${ifDefined(exclusive
667
+ <button
668
+ type="button"
669
+ class=${classMap({ active: checked, "icon-only": iconOnly })}
670
+ data-value=${option.value}
671
+ data-variant=${ifDefined(option.variant)}
672
+ role=${exclusive ? "radio" : "checkbox"}
673
+ aria-checked=${checked ? "true" : "false"}
674
+ aria-label=${ifDefined(iconOnly ? option.label : undefined)}
675
+ title=${ifDefined(iconOnly ? option.label : undefined)}
676
+ tabindex=${ifDefined(exclusive
579
677
  ? this.exclusiveTabIndex(option.value, index)
580
678
  : undefined)}
581
- ?disabled=${this.disabled}
582
- @click=${() => this.activateValue(option.value)}
583
- >
584
- ${option.icon
679
+ ?disabled=${this.disabled}
680
+ @click=${() => this.activateValue(option.value)}
681
+ >
682
+ ${option.icon
585
683
  ? html `<eun-icon name=${option.icon} size="16"></eun-icon>`
586
684
  : nothing}
587
- ${iconOnly ? nothing : option.label}
588
- </button>
589
- `;
685
+ ${iconOnly ? nothing : option.label}
686
+ </button>
687
+ `;
590
688
  })}
591
- <slot @slotchange=${this.handleSlotChange}></slot>
689
+ <slot @slotchange=${this.handleSlotChange}></slot>
690
+ </div>
691
+ <div id="arrows">
692
+ <arrow-container
693
+ class=${classMap({ visible: this.arrowVisible("start") })}
694
+ @click=${this.scrollItem("back")}
695
+ >
696
+ <eun-icon name="chevron_left"></eun-icon>
697
+ </arrow-container>
698
+ <arrow-container
699
+ class=${classMap({ visible: this.arrowVisible("end") })}
700
+ @click=${this.scrollItem("front")}
701
+ >
702
+ <eun-icon name="chevron_right"></eun-icon>
703
+ </arrow-container>
704
+ </div>
592
705
  </div>
593
706
  `;
594
707
  }
@@ -615,11 +728,14 @@ __decorate([
615
728
  __decorate([
616
729
  property({ reflect: true })
617
730
  ], EunomiaToggleGroup.prototype, "appearance", void 0);
731
+ __decorate([
732
+ property({ type: Boolean, reflect: true })
733
+ ], EunomiaToggleGroup.prototype, "full", void 0);
618
734
  __decorate([
619
735
  queryAssignedElements()
620
736
  ], EunomiaToggleGroup.prototype, "items", void 0);
621
737
  __decorate([
622
- query("#track")
738
+ query("#scrollable")
623
739
  ], EunomiaToggleGroup.prototype, "trackEl", void 0);
624
740
  __decorate([
625
741
  query("#indicator")
@@ -2,17 +2,18 @@
2
2
  * Base style for the toggle group component.
3
3
  *
4
4
  * Custom css variables:
5
- * [--toggle-group-background] - Set a custom background color for the track ; ignored once `appearance` isn't `default`
6
- * [--toggle-group-border-color] - Set a custom border color for the track ; also the per-option border color at rest in `outline` appearance
5
+ * [--toggle-group-background] - Set a custom background color for the track, for every appearance (transparent by default in `outline`/`flat`)
6
+ * [--toggle-group-border-color] - Set a custom border color for the track in `default` appearance, and for each option's border at rest in `outline` and `flat` appearance
7
7
  * [--toggle-group-color] - Set a custom text color for unselected options
8
- * [--toggle-group-active-background] - Set a custom background color for selected options (and the sliding indicator, in exclusive mode) in `default` appearance ; also the `primary` variant's selected color in `outline`/`flat` appearance
9
- * [--toggle-group-active-color] - Set a custom text color for selected options in `default` appearance ; ignored in `outline`/`flat` appearance
8
+ * [--toggle-group-active-background] - Set a custom background color for selected options (and the sliding indicator, in exclusive mode) in `default` appearance ; in `outline`/`flat` appearance, the selected color of every option, over its own variant
9
+ * [--toggle-group-active-color] - Set a custom text color for selected options, for every appearance
10
10
  * [--toggle-group-border-radius] - Set a custom border radius for the track and its options
11
11
  * [--toggle-group-gap] - Set a custom gap between the options
12
12
  * [--toggle-group-padding] - Set a custom padding for the track ; also used as the indicator's inset, so it stays flush with the track's edge. Ignored once `appearance` isn't `default`
13
- * [--toggle-group-hover-color] - Set a custom text color on hover state, for an unselected option, in `default` appearance ; ignored in `outline`/`flat` appearance, where hover (and keyboard focus) text color always follows the option's own variant color instead
13
+ * [--toggle-group-hover-color] - Set a custom text color on hover state, for an unselected option, for every appearance
14
14
  * [--toggle-group-hover-background] - Set a custom background color on hover state, for an unselected option ; transparent by default. Applies regardless of `appearance`
15
15
  * [--toggle-group-shadow] - Set a custom box shadow on every option (and the sliding indicator, in exclusive mode), none by default
16
16
  * [--toggle-group-shadow-hover] - Set a custom box shadow on hover state, for an unselected option ; falls back to `--toggle-group-shadow`
17
+ * [--toggle-group-arrows-color] - Set a custom background color the overflow arrows fade out to, once the group overflows its container ; defaults to the track color laid over `--eun-surface-color`, so set it when the group sits on another background
17
18
  */
18
19
  export declare const toggleGroupStyles: import("lit").CSSResult;