@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
@@ -1,67 +1,60 @@
1
1
  import { css } from "lit";
2
+ import { buttonPaletteStyles } from "../shared-styles/button-palette.styles.js";
2
3
  /**
3
4
  * Base style for button.
4
5
  *
5
6
  * Custom css variables:
6
- * [--button-background] - Set a custom background color
7
- * [--button-background-hover] - Set a custom button background color for hover state
8
- * [--button-background-active] - Set a custom button background color for active state
9
- * [--button-text] - Set a custom button text color
7
+ * [--button-background] - Set a custom background color, for every appearance and variant
8
+ * [--button-background-hover] - Set a custom button background color for hover state. Derived from --button-background when only that one is set
9
+ * [--button-background-active] - Set a custom button background color for active state. Derived from --button-background when only that one is set
10
+ * [--button-text] - Set a custom button text color, for every appearance and variant
10
11
  * [--button-padding] - Set a custom padding to the button. Note that thee padding is initialized through the `padding` css.
11
12
  * [--button-border-radius] - Set a custom radius to the button border
12
13
  * [--button-focus-outline] - Set a custom color to the focus outline
13
14
  * [--button-transition] - Set a custom button transition time
14
15
  * [--button-shadow] - Set a custom box shadow to the button (used by the `raised` variant)
15
16
  * [--button-shadow-hover] - Set a custom box shadow to the button on hover state (used by the `raised` variant)
16
- * [--button-border-color] - Set a custom border color, overriding whatever the active variant would otherwise use
17
+ * [--button-border-color] - Set a custom border color, for every appearance and variant
17
18
  * [--button-border-color-hover] - Set a custom border color for hover/focus-visible state, falling back to --button-border-color
18
19
  * [--button-border-size] - Set a custom border width
20
+ * [--button-full] - Set to `true` to get the same result as the `full` attribute. Meant to be set from a container query
21
+ */
22
+ /*
23
+ * The variant fills the palette slots (see {@link buttonPaletteStyles}), the
24
+ * appearance reads them into --_bg / --_bg-hover / --_bg-active / --_fg /
25
+ * --_bd, and #button finally reads those *behind* the --button-* custom
26
+ * properties, so a custom property always wins over any variant, appearance
27
+ * and state. Only `disabled` stays above them, so it never loses its look.
19
28
  */
20
29
  const base = css `
21
30
  :host {
22
- --_mainColor: var(
23
- --button-background,
24
- var(--eun-color-primary-500, #3d6fff)
25
- );
26
- --_mainColor-hover: var(
27
- --button-background-hover,
28
- var(--eun-color-primary-700, #3662e0)
29
- );
30
- --_mainColor-active: var(
31
- --button-background-active,
32
- var(--eun-color-primary-800, #2d52bd)
31
+ --_focusIndicator: var(--button-focus-outline, var(--_ring));
32
+ --_hoverFromCustom: color-mix(in srgb, var(--button-background) 88%, black);
33
+ --_activeFromCustom: color-mix(
34
+ in srgb,
35
+ var(--button-background) 76%,
36
+ black
33
37
  );
34
- --_mainColor-text: var(
35
- --button-text,
36
- var(--eun-color-on-primary-500, #ffffff)
37
- );
38
- --_mainColor-outline: var(
39
- --button-focus-outline,
40
- var(--eun-color-primary-700, #3662e0)
41
- );
42
- --_focusIndicator: var(--button-focus-outline, var(--_mainColor-outline));
43
38
  --_borderRadius: var(
44
39
  --button-border-radius,
45
- var(--eun-borderRadius-m, 8px)
40
+ var(--eun-border-radius-m, 8px)
46
41
  );
47
- --_backgroundColor: var(--button-background, var(--_mainColor));
48
42
  --_padding: var(
49
43
  --button-padding,
50
44
  var(--eun-space-s, 8px) calc(var(--eun-space-l, 32px) / 2)
51
45
  );
52
- --_textColor: var(--button-text, var(--_mainColor-text));
53
46
  --_boxShadow: var(--button-shadow, none);
54
47
  --_boxShadow-hover: var(--button-shadow-hover, var(--_boxShadow));
55
48
  --_transition: var(--button-transition, 0.2s);
56
49
  --_borderSize: var(--button-border-size, 1.5px);
57
- --_fontSize: var(--eun-fontSize-s, 14px);
50
+ --_fontSize: var(--eun-font-size-s, 14px);
58
51
  --_gap: var(--eun-space-xs, 4px);
59
52
  --_lineHeight: 1rem;
60
53
  --icon-size: var(--_lineHeight);
61
- --_borderColor: transparent;
62
54
  --_before-display: none;
63
55
  --_cursor: pointer;
64
56
  display: inline-flex;
57
+ width: fit-content;
65
58
  position: relative;
66
59
  user-select: none;
67
60
  cursor: var(--_cursor);
@@ -79,83 +72,37 @@ const base = css `
79
72
  outline-color: var(--_focusIndicator);
80
73
  }
81
74
  :host([size="xs"]) {
82
- --_fontSize: var(--eun-fontSize-xs, 10px);
75
+ --_fontSize: var(--eun-font-size-xs, 10px);
83
76
  --_padding: var(--eun-space-xxs, 1.6px) var(--eun-space-xs, 4px);
84
77
  --_lineHeight: 10px;
85
- --_borderRadius: var(--eun-borderRadius-s, 999px);
78
+ --_borderRadius: var(--eun-border-radius-s, 999px);
86
79
  }
87
80
  :host([size="s"]) {
88
- --_fontSize: var(--eun-fontSize-xs, 10px);
81
+ --_fontSize: var(--eun-font-size-xs, 10px);
89
82
  --_padding: calc(var(--eun-space-s) / 2) var(--eun-space-s);
90
83
  --_lineHeight: 10px;
91
- --_borderRadius: var(--eun-borderRadius-s, 999px);
84
+ --_borderRadius: var(--eun-border-radius-s, 999px);
92
85
  }
93
86
  :host([size="l"]) {
94
- --_fontSize: var(--eun-fontSize-m, 16px);
87
+ --_fontSize: var(--eun-font-size-m, 16px);
95
88
  --_gap: var(--eun-space-m, 16px);
96
89
  --_padding: calc(var(--eun-space-s, 8px) * 1.25) var(--eun-space-l, 32px);
97
90
  --_lineHeight: 1.1rem;
98
91
  }
99
92
  :host([size="xl"]) {
100
- --_fontSize: var(--eun-fontSize-l, 1.3rem);
93
+ --_fontSize: var(--eun-font-size-l, 1.3rem);
101
94
  --_gap: var(--eun-space-m, 16px);
102
95
  --_padding: calc(var(--eun-space-s, 8px) * 1.5) var(--eun-space-l, 32px);
103
96
  --_lineHeight: 1.3rem;
104
97
  }
105
98
  :host([rounded]) {
106
- --_borderRadius: var(--eun-borderRadius-xl, 999px);
107
- }
108
- :host([variant="secondary"]) {
109
- --_mainColor: var(--eun-color-secondary-500, #e5a030);
110
- --_mainColor-hover: var(--eun-color-secondary-700, #ca8d2a);
111
- --_mainColor-active: var(--eun-color-secondary-800, #a97624);
112
- --_mainColor-text: var(--eun-color-on-secondary-500, #000000de);
113
- --_mainColor-outline: var(--eun-color-secondary-700, #ca8d2a);
114
- }
115
- :host([variant="critical"]) {
116
- --_mainColor: var(--eun-color-critical-100, #aa0014);
117
- --_mainColor-hover: var(--eun-color-critical-100, #aa0014);
118
- --_mainColor-active: var(--eun-color-critical-100, #aa0014);
119
- --_mainColor-text: #fff;
120
- --_mainColor-outline: var(--eun-color-critical-100, #aa0014);
121
- }
122
- :host([variant="success"]) {
123
- --_mainColor: var(--eun-color-success-100, #1a9948);
124
- --_mainColor-hover: var(--eun-color-success-100, #1a9948);
125
- --_mainColor-active: var(--eun-color-success-100, #1a9948);
126
- --_mainColor-text: #fff;
127
- --_mainColor-outline: var(--eun-color-success-100, #1a9948);
128
- }
129
- :host([variant="warning"]) {
130
- --_mainColor: var(--eun-color-warning-100, #c85207);
131
- --_mainColor-hover: var(--eun-color-warning-100, #c85207);
132
- --_mainColor-active: var(--eun-color-warning-100, #c85207);
133
- --_mainColor-text: #fff;
134
- --_mainColor-outline: var(--eun-color-warning-100, #c85207);
135
- }
136
- :host([variant="light"]) {
137
- --_mainColor: var(--eun-color-grey-100, #f7f8fa);
138
- --_mainColor-hover: var(--eun-color-grey-200, #ecedf0);
139
- --_mainColor-active: var(--eun-color-grey-300, #dee0e7);
140
- --_mainColor-text: var(--eun-color-grey-700, #484e61);
141
- --_mainColor-outline: var(--eun-color-grey-500, #8d93aa);
142
- }
143
- :host([variant="medium"]) {
144
- --_mainColor: var(--eun-color-grey-300, #dee0e7);
145
- --_mainColor-hover: var(--eun-color-grey-400, #c1c9d6);
146
- --_mainColor-active: var(--eun-color-grey-500, #8d93aa);
147
- --_mainColor-text: var(--eun-color-grey-900, #000000);
148
- --_mainColor-outline: var(--eun-color-grey-600, #666e8a);
149
- }
150
- :host([variant="dark"]) {
151
- --_mainColor: var(--eun-color-grey-800, #071621);
152
- --_mainColor-hover: var(--eun-color-grey-700, #484e61);
153
- --_mainColor-active: var(--eun-color-grey-900, #000000);
154
- --_mainColor-text: var(--eun-color-grey-0, #ffffff);
155
- --_mainColor-outline: var(--eun-color-grey-800, #071621);
99
+ --_borderRadius: var(--eun-border-radius-xl, 999px);
156
100
  }
157
101
  slot::slotted(*) {
158
102
  color: var(--_textColor);
103
+ }
104
+ slot::slotted(*:not([fill])),
105
+ slot::slotted(*[fill="currentColor"]) {
159
106
  fill: var(--_textColor);
160
107
  }
161
108
  slot[name="start"]::slotted(eun-icon),
@@ -167,15 +114,15 @@ const base = css `
167
114
  }
168
115
  #button {
169
116
  font-family: var(--eun-font-family, "Mulish", sans-serif);
170
- background: var(--_backgroundColor);
117
+ --_textColor: var(--button-text, var(--_fg));
118
+ background: var(--button-background, var(--_bg));
171
119
  border-radius: var(--_borderRadius);
172
120
  color: var(--_textColor);
173
121
  box-shadow: var(--_boxShadow);
174
122
  display: flex;
175
123
  width: 100%;
176
124
  height: fit-content;
177
- border: var(--_borderSize) solid
178
- var(--button-border-color, var(--_borderColor));
125
+ border: var(--_borderSize) solid var(--button-border-color, var(--_bd));
179
126
  outline: 2px solid transparent;
180
127
  padding: var(--_padding);
181
128
  gap: var(--_gap);
@@ -192,7 +139,7 @@ const base = css `
192
139
  box-shadow: var(--_boxShadow-hover);
193
140
  border-color: var(
194
141
  --button-border-color-hover,
195
- var(--button-border-color, var(--_borderColor))
142
+ var(--button-border-color, var(--_bd))
196
143
  );
197
144
  }
198
145
  #external-link-icon {
@@ -231,19 +178,89 @@ const base = css `
231
178
  border: 0;
232
179
  }
233
180
  `;
234
- const fill = css `
235
- :host([appearance="fill"]:not([disabled])) {
236
- --_backgroundColor: var(--_mainColor);
237
- --_textColor: var(--_mainColor-text);
181
+ const appearances = css `
182
+ :host([appearance="fill"]),
183
+ :host(:not([appearance])) {
184
+ --_bg: var(--_solid);
185
+ --_bg-hover: var(--_solid-hover);
186
+ --_bg-active: var(--_solid-active);
187
+ --_fg: var(--_onSolid);
188
+ --_bd: transparent;
189
+ }
190
+ :host([appearance="default"]) {
191
+ --_bg: var(--_tint);
192
+ --_bg-hover: var(--_tint-hover);
193
+ --_bg-active: var(--_tint-active);
194
+ --_fg: var(--_fgTint);
195
+ --_bd: transparent;
196
+ }
197
+ :host([appearance="outline"]) {
198
+ --_bg: transparent;
199
+ --_bg-hover: var(--_wash-hover);
200
+ --_bg-active: var(--_wash-active);
201
+ --_fg: var(--_accent);
202
+ --_bd: var(--_solid);
203
+ }
204
+ :host([appearance="ghost"]) {
205
+ --_bg: transparent;
206
+ --_bg-hover: var(--_wash-hover);
207
+ --_bg-active: var(--_wash-active);
208
+ --_fg: var(--_accent);
209
+ --_bd: transparent;
210
+ }
211
+ :host([appearance="ghost"]:not([variant])) {
212
+ --_accent: var(--eun-text-secondary, #484e61);
213
+ --_wash-hover: var(--eun-content-hover, #edeff0);
214
+ --_wash-active: var(--eun-disabled-color, #ecedf0);
215
+ }
216
+ :host([appearance="raised"]) {
217
+ --_bg: transparent;
218
+ --_bg-hover: transparent;
219
+ --_bg-active: transparent;
220
+ --_fg: var(--_accent);
221
+ --_bd: transparent;
222
+ --_boxShadow: var(
223
+ --button-shadow,
224
+ var(--eun-shadow-s, "rgba(149, 157, 165, 0.2) 0px 8px 24px")
225
+ );
226
+ --_boxShadow-hover: var(
227
+ --button-shadow-hover,
228
+ var(
229
+ --eun-shadow-m,
230
+ "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px"
231
+ )
232
+ );
238
233
  }
239
- :host([appearance="fill"]:not([disabled]):is(:hover, :focus-visible)) #button,
240
- :host([appearance="fill"]:not([disabled]))
241
- #button:is(:hover, :focus-visible) {
242
- --_backgroundColor: var(--_mainColor-hover);
234
+ :host([appearance="flat"]) {
235
+ --_bg: var(--_flat);
236
+ --_bg-hover: var(--_flat-hover);
237
+ --_bg-active: var(--_flat-hover);
238
+ --_fg: var(--_flatFg);
239
+ --_bd: transparent;
243
240
  }
244
- :host([appearance="fill"]:not([disabled])) #button:active {
245
- --_backgroundColor: var(--_mainColor-active);
241
+
242
+ /* States : a custom background wins, derived when only the rest one is set. */
243
+ :host(:not([disabled])) #button:is(:hover, :focus-visible),
244
+ :host(:not([disabled]):focus-visible) #button {
245
+ background: var(
246
+ --button-background-hover,
247
+ var(--_hoverFromCustom, var(--_bg-hover))
248
+ );
246
249
  }
250
+ :host(:not([disabled])) #button:active {
251
+ background: var(
252
+ --button-background-active,
253
+ var(--_activeFromCustom, var(--_bg-active))
254
+ );
255
+ }
256
+ :host([appearance="raised"]:not([disabled])) #button:active {
257
+ box-shadow: var(
258
+ --eun-shadow-l,
259
+ "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px"
260
+ );
261
+ }
262
+
263
+ /* A solid semantic button darkens instead of switching color. */
247
264
  :host(
248
265
  [appearance="fill"]:is(
249
266
  [variant="critical"],
@@ -268,281 +285,29 @@ const fill = css `
268
285
  filter: brightness(0.8);
269
286
  }
270
287
  `;
271
- const raised = css `
272
- :host([appearance="raised"]:not([disabled])) {
273
- --_backgroundColor: transparent;
274
- --_textColor: var(--_mainColor);
275
- --_boxShadow: var(
276
- --button-shadow,
277
- var(--eun-shadow-s, "rgba(149, 157, 165, 0.2) 0px 8px 24px")
278
- );
279
- --_boxShadow-hover: var(
280
- --button-shadow-hover,
281
- var(
282
- --eun-shadow-m,
283
- "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px"
284
- )
285
- );
286
- }
287
- :host([appearance="raised"]:not([disabled])) #button:active {
288
- box-shadow: var(
289
- --eun-shadow-l,
290
- "rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px"
291
- );
292
- }
293
- `;
294
- const defaultAppearance = css `
295
- :host([appearance="default"]:not([disabled])) {
296
- --_textColor: var(--_mainColor);
297
- }
298
- :host([appearance="default"]:not([disabled])) {
299
- --_backgroundColor: var(
300
- --button-background,
301
- var(--eun-color-primary-transparent, #3d6fff33)
302
- );
303
- --_mainColor-hover: var(
304
- --button-background-hover,
305
- var(--eun-color-primary-transparent-hover, #3d6fff4d)
306
- );
307
- --_mainColor-active: var(
308
- --button-background-active,
309
- var(--eun-color-primary-transparent-active, #3d6fff66)
310
- );
311
- }
312
- :host([appearance="default"][variant="secondary"]:not([disabled])) {
313
- --_backgroundColor: var(
314
- --button-background,
315
- var(--eun-color-secondary-transparent, #e5a03033)
316
- );
317
- --_mainColor-hover: var(
318
- --button-background-hover,
319
- var(--eun-color-secondary-transparent-hover, #e5a0304d)
320
- );
321
- --_mainColor-active: var(
322
- --button-background-active,
323
- var(--eun-color-secondary-transparent-active, #e5a03066)
324
- );
325
- }
326
- :host([appearance="default"][variant="critical"]:not([disabled])) {
327
- --_backgroundColor: var(
328
- --button-background,
329
- var(--eun-color-critical-30, #faf0f1)
330
- );
331
- --_mainColor-hover: var(
332
- --button-background-hover,
333
- var(--eun-color-critical-50, #f1d6d9)
334
- );
335
- --_mainColor-active: var(
336
- --button-background-active,
337
- var(--eun-color-critical-90, #e4adb4)
338
- );
339
- }
340
- :host([appearance="default"][variant="success"]:not([disabled])) {
341
- --_backgroundColor: var(
342
- --button-background,
343
- var(--eun-color-success-30, #f1f9f4)
344
- );
345
- --_mainColor-hover: var(
346
- --button-background-hover,
347
- var(--eun-color-success-50, #daefe2)
348
- );
349
- --_mainColor-active: var(
350
- --button-background-active,
351
- var(--eun-color-success-90, #b6dec4)
352
- );
353
- }
354
- :host([appearance="default"][variant="warning"]:not([disabled])) {
355
- --_backgroundColor: var(
356
- --button-background,
357
- var(--eun-color-warning-30, #fcf5f0)
358
- );
359
- --_mainColor-hover: var(
360
- --button-background-hover,
361
- var(--eun-color-warning-50, #f6e3d7)
362
- );
363
- --_mainColor-active: var(
364
- --button-background-active,
365
- var(--eun-color-warning-90, #edc8b0)
366
- );
367
- }
368
- :host([appearance="default"][variant="light"]:not([disabled])) {
369
- --_backgroundColor: var(
370
- --button-background,
371
- var(--eun-color-grey-100, #f7f8fa)
372
- );
373
- --_mainColor-hover: var(
374
- --button-background-hover,
375
- var(--eun-color-grey-200, #ecedf0)
376
- );
377
- --_mainColor-active: var(
378
- --button-background-active,
379
- var(--eun-color-grey-300, #dee0e7)
380
- );
381
- }
382
- :host([appearance="default"][variant="medium"]:not([disabled])) {
383
- --_backgroundColor: var(
384
- --button-background,
385
- var(--eun-color-grey-200, #ecedf0)
386
- );
387
- --_mainColor-hover: var(
388
- --button-background-hover,
389
- var(--eun-color-grey-300, #dee0e7)
390
- );
391
- --_mainColor-active: var(
392
- --button-background-active,
393
- var(--eun-color-grey-400, #c1c9d6)
394
- );
395
- }
396
- :host([appearance="default"][variant="dark"]:not([disabled])) {
397
- --_backgroundColor: var(
398
- --button-background,
399
- var(--eun-color-grey-200, #ecedf0)
400
- );
401
- --_mainColor-hover: var(
402
- --button-background-hover,
403
- var(--eun-color-grey-300, #dee0e7)
404
- );
405
- --_mainColor-active: var(
406
- --button-background-active,
407
- var(--eun-color-grey-400, #c1c9d6)
408
- );
409
- }
410
- :host([appearance="default"]:not([disabled]):is(:hover, :focus-visible))
411
- #button,
412
- :host([appearance="default"]:not([disabled]))
413
- #button:is(:hover, :focus-visible) {
414
- --_backgroundColor: var(--_mainColor-hover);
415
- }
416
- :host([appearance="default"]:not([disabled])) #button:active {
417
- --_backgroundColor: var(--_mainColor-active);
418
- }
419
- `;
420
- const outline = css `
421
- :host([appearance="outline"]:not([disabled])) {
422
- --_backgroundColor: transparent;
423
- --_textColor: var(--_mainColor);
424
- --_borderColor: var(--_mainColor);
425
- --_mainColor-hover: var(--eun-color-primary-transparent-hover, #3d6fff4d);
426
- --_mainColor-active: var(--eun-color-primary-transparent-active, #3d6fff66);
427
- }
428
- :host([appearance="outline"][variant="secondary"]:not([disabled])) {
429
- --_mainColor-hover: var(--eun-color-secondary-transparent-hover, #e5a0304d);
430
- --_mainColor-active: var(
431
- --eun-color-secondary-transparent-active,
432
- #ef9c7c66
433
- );
434
- }
435
- :host([appearance="outline"][variant="critical"]:not([disabled])) {
436
- --_mainColor-hover: var(--eun-color-critical-50, #f1d6d9);
437
- --_mainColor-active: var(--eun-color-critical-90, #e4adb4);
438
- }
439
- :host([appearance="outline"][variant="success"]:not([disabled])) {
440
- --_mainColor-hover: var(--eun-color-success-50, #daefe2);
441
- --_mainColor-active: var(--eun-color-success-90, #b6dec4);
442
- }
443
- :host([appearance="outline"][variant="warning"]:not([disabled])) {
444
- --_mainColor-hover: var(--eun-color-warning-50, #f6e3d7);
445
- --_mainColor-active: var(--eun-color-warning-90, #edc8b0);
446
- }
447
- :host([appearance="outline"][variant="light"]:not([disabled])) {
448
- --_mainColor-hover: var(--eun-color-grey-200, #ecedf0);
449
- --_mainColor-active: var(--eun-color-grey-300, #dee0e7);
450
- }
451
- :host([appearance="outline"][variant="medium"]:not([disabled])) {
452
- --_mainColor-hover: var(--eun-color-grey-300, #dee0e7);
453
- --_mainColor-active: var(--eun-color-grey-400, #c1c9d6);
454
- }
455
- :host([appearance="outline"][variant="dark"]:not([disabled])) {
456
- --_mainColor-hover: var(--eun-color-grey-200, #ecedf0);
457
- --_mainColor-active: var(--eun-color-grey-300, #dee0e7);
458
- }
459
- :host([appearance="outline"]:not([disabled]):is(:hover, :focus-visible))
460
- #button,
461
- :host([appearance="outline"]:not([disabled]))
462
- #button:is(:hover, :focus-visible) {
463
- --_backgroundColor: var(--_mainColor-hover);
464
- }
465
- :host([appearance="outline"]:not([disabled])) #button:active {
466
- --_backgroundColor: var(--_mainColor-active);
467
- }
468
- `;
469
- const flat = css `
470
- :host([appearance="flat"]:not([disabled])) {
471
- --_backgroundColor: var(--eun-color-grey-100, #f7f8fa);
472
- --_textColor: var(--eun-text-secondary, #484e61);
473
- }
474
- :host([appearance="flat"]:not([disabled]):is(:hover, :focus-visible, :active))
475
- #button,
476
- :host([appearance="flat"]:not([disabled]))
477
- #button:is(:hover, :focus-visible, :active) {
478
- --_backgroundColor: var(--eun-content-hover, #edeff0);
479
- }
480
- `;
481
- const ghost = css `
482
- :host([appearance="ghost"]:not([disabled])) {
483
- --_backgroundColor: transparent;
484
- --_borderColor: transparent;
485
- --_textColor: var(--button-text, var(--_mainColor));
486
- --_mainColor-hover: var(--eun-color-primary-transparent-hover, #3d6fff4d);
487
- --_mainColor-active: var(--eun-color-primary-transparent-active, #3d6fff66);
488
- }
489
- :host([appearance="ghost"][variant="secondary"]:not([disabled])) {
490
- --_mainColor-hover: var(--eun-color-secondary-transparent-hover, #e5a0304d);
491
- --_mainColor-active: var(
492
- --eun-color-secondary-transparent-active,
493
- #ef9c7c66
494
- );
495
- }
496
- :host([appearance="ghost"][variant="critical"]:not([disabled])) {
497
- --_mainColor-hover: var(--eun-color-critical-50, #f1d6d9);
498
- --_mainColor-active: var(--eun-color-critical-90, #e4adb4);
499
- }
500
- :host([appearance="ghost"][variant="success"]:not([disabled])) {
501
- --_mainColor-hover: var(--eun-color-success-50, #daefe2);
502
- --_mainColor-active: var(--eun-color-success-90, #b6dec4);
503
- }
504
- :host([appearance="ghost"][variant="warning"]:not([disabled])) {
505
- --_mainColor-hover: var(--eun-color-warning-50, #f6e3d7);
506
- --_mainColor-active: var(--eun-color-warning-90, #edc8b0);
507
- }
508
- :host([appearance="ghost"][variant="light"]:not([disabled])) {
509
- --_mainColor-hover: var(--eun-color-grey-200, #ecedf0);
510
- --_mainColor-active: var(--eun-color-grey-300, #dee0e7);
511
- }
512
- :host([appearance="ghost"][variant="medium"]:not([disabled])) {
513
- --_mainColor-hover: var(--eun-color-grey-300, #dee0e7);
514
- --_mainColor-active: var(--eun-color-grey-400, #c1c9d6);
515
- }
516
- :host([appearance="ghost"][variant="dark"]:not([disabled])) {
517
- --_mainColor-hover: var(--eun-color-grey-200, #ecedf0);
518
- --_mainColor-active: var(--eun-color-grey-300, #dee0e7);
519
- }
520
- :host([appearance="ghost"]:not([variant]):not([disabled])) {
521
- --_mainColor: var(--eun-text-secondary, #484e61);
522
- --_mainColor-hover: var(--eun-content-hover, #edeff0);
523
- --_mainColor-active: var(--eun-disabled-color, #ecedf0);
524
- }
525
- :host([appearance="ghost"]:not([disabled])) #button:hover,
526
- :host([appearance="ghost"]:not([disabled]):focus-visible) #button,
527
- :host([appearance="ghost"]:not([disabled])) #button:focus-visible {
528
- --_backgroundColor: var(--_mainColor-hover);
529
- }
530
- :host([appearance="ghost"]:not([disabled])) #button:active {
531
- --_backgroundColor: var(--_mainColor-active);
532
- }
533
- `;
534
288
  const disabled = css `
535
289
  :host([disabled]) {
536
- --_mainColor: var(--eun-disabled-color, #ecedf0);
537
- --_textColor: var(--eun-text-disabled-color, #8d93aa);
290
+ --_bg: var(--eun-disabled-color, #ecedf0);
291
+ --_bg-hover: var(--eun-disabled-color, #ecedf0);
292
+ --_bg-active: var(--eun-disabled-color, #ecedf0);
293
+ --_fg: var(--eun-text-disabled-color, #8d93aa);
294
+ --_bd: transparent;
295
+ --_boxShadow: none;
296
+ --_boxShadow-hover: none;
538
297
  --_cursor: not-allowed;
539
298
  }
540
299
  :host([disabled]) #button {
541
300
  --_icon-color: currentColor;
301
+ --_textColor: var(--_fg);
302
+ background: var(--_bg);
303
+ border-color: var(--_bd);
542
304
  pointer-events: none;
543
305
  }
544
306
  `;
545
307
  const slide = css `
308
+ :host([slide]) {
309
+ width: auto;
310
+ }
546
311
  :host([slide]) #button {
547
312
  display: grid;
548
313
  grid-template-columns: auto 0fr auto;
@@ -578,22 +343,27 @@ const full = css `
578
343
  :host([full]) {
579
344
  display: flex;
580
345
  width: 100%;
581
- height: 100%;
582
346
  }
583
347
  :host([full]) #button {
584
- height: 100%;
585
348
  justify-content: center;
586
349
  }
587
350
  `;
351
+ const fullVariable = css `
352
+ @supports (width: if(style(--a: b): 1px; else: 2px)) {
353
+ :host {
354
+ width: if(style(--button-full: true): 100%; else: fit-content);
355
+ }
356
+ #button {
357
+ justify-content: if(style(--button-full: true): center; else: normal);
358
+ }
359
+ }
360
+ `;
588
361
  export const buttonStyles = [
362
+ buttonPaletteStyles,
589
363
  base,
590
- fill,
591
- raised,
592
- outline,
593
- flat,
594
- ghost,
595
- defaultAppearance,
364
+ appearances,
596
365
  disabled,
597
366
  slide,
367
+ fullVariable,
598
368
  full,
599
369
  ];
@@ -55,6 +55,8 @@ export type EunomiaDropdownPlacement = "top-start" | "top" | "top-end" | "right"
55
55
  * @prop {boolean} [disabled=false] - Whether the trigger button is disabled
56
56
  * @prop {'xs' | 's' | 'm' | 'l' | 'xl'} [size='m'] - The size of the trigger button
57
57
  * @prop {'primary' | 'secondary' | 'critical' | 'success' | 'warning'} variant - The color theme applied to the trigger button
58
+ * @prop {boolean} [fixedColor=false] - Keeps a light or dark trigger button white or black in every theme. Without it, they follow the grey scale, which flips with the active theme. Has no effect on the other variants
59
+ * @attr {boolean} [fixed-color=false] - Keeps a light or dark trigger button white or black in every theme. Without it, they follow the grey scale, which flips with the active theme. Has no effect on the other variants
58
60
  * @prop {boolean} [rounded=false] - Whether the trigger button has fully rounded corners
59
61
  * @prop {'default' | 'fill' | 'outline' | 'flat' | 'raised' | 'ghost'} [appearance='default'] - The trigger button's surface style, using the same values as the button component. Defaults to a paler tint rather than a solid fill, since a menu trigger reads better as a lighter weight control than a standalone primary action
60
62
  * @prop {EunomiaDropdownPlacement} [placement='bottom-start'] - Where the menu opens relative to the trigger
@@ -133,6 +135,11 @@ export declare class EunomiaDropdownButton extends LitElement implements Dropdow
133
135
  * Forwarded to the trigger `eun-button`.
134
136
  */
135
137
  variant?: ButtonVariant;
138
+ /**
139
+ * Forwarded to the trigger `eun-button`.
140
+ * @default false
141
+ */
142
+ fixedColor: boolean;
136
143
  /**
137
144
  * Forwarded to the trigger `eun-button`.
138
145
  * @default false