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

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 (181) hide show
  1. package/dist/cdn/components/chunks/{chunk-SIHZFOTK.js → chunk-2XASWWKR.js} +1 -1
  2. package/dist/cdn/components/chunks/chunk-32DTNR52.js +1 -0
  3. package/dist/cdn/components/chunks/chunk-3MTUVMM5.js +1 -0
  4. package/dist/cdn/components/chunks/chunk-5GKM5DIB.js +1 -0
  5. package/dist/cdn/components/chunks/{chunk-GSJEJLFA.js → chunk-6ETDXUH2.js} +1 -1
  6. package/dist/cdn/components/chunks/{chunk-EJIX2D4Z.js → chunk-AIS3UICU.js} +7 -7
  7. package/dist/cdn/components/chunks/{chunk-BMQOI7HX.js → chunk-DKOPI7QA.js} +99 -55
  8. package/dist/cdn/components/chunks/{chunk-NHFWATVN.js → chunk-EAKYD33D.js} +3 -3
  9. package/dist/cdn/components/chunks/{chunk-EOWBYZV7.js → chunk-IDKZKLJR.js} +5 -5
  10. package/dist/cdn/components/chunks/chunk-JRGM3W7I.js +53 -0
  11. package/dist/cdn/components/chunks/{chunk-UAGCQF23.js → chunk-L65WUTXM.js} +5 -5
  12. package/dist/cdn/components/chunks/chunk-LFCXUVDO.js +1 -0
  13. package/dist/cdn/components/chunks/{chunk-YGUJJ25C.js → chunk-MPQP4R54.js} +2 -2
  14. package/dist/cdn/components/chunks/{chunk-RJCJXB7Y.js → chunk-NBIENHLV.js} +1 -1
  15. package/dist/cdn/components/chunks/{chunk-4MXL6PZC.js → chunk-OW7XKDCH.js} +13 -13
  16. package/dist/cdn/components/chunks/{chunk-IJ5WFMK4.js → chunk-SD2WHGPF.js} +7 -6
  17. package/dist/cdn/components/chunks/chunk-SJWRE6PW.js +1 -0
  18. package/dist/cdn/components/eun-animate.js +5 -3
  19. package/dist/cdn/components/eun-badge.js +7 -7
  20. package/dist/cdn/components/eun-breadcrumb-item.js +1 -1
  21. package/dist/cdn/components/eun-breadcrumb.js +1 -1
  22. package/dist/cdn/components/eun-button.js +1 -1
  23. package/dist/cdn/components/eun-calendar.js +13 -13
  24. package/dist/cdn/components/eun-card.js +42 -3
  25. package/dist/cdn/components/eun-carousel.js +2 -2
  26. package/dist/cdn/components/eun-check-card.js +1 -1
  27. package/dist/cdn/components/eun-checkbox-list.js +1 -1
  28. package/dist/cdn/components/eun-checkbox.js +1 -1
  29. package/dist/cdn/components/eun-chip.js +1 -1
  30. package/dist/cdn/components/eun-collapse.js +39 -20
  31. package/dist/cdn/components/eun-color-picker.js +3 -3
  32. package/dist/cdn/components/eun-counter.js +8 -8
  33. package/dist/cdn/components/eun-date-picker.js +19 -19
  34. package/dist/cdn/components/eun-drawer.js +9 -9
  35. package/dist/cdn/components/eun-dropdown-button.js +1 -1
  36. package/dist/cdn/components/eun-fab.js +6 -6
  37. package/dist/cdn/components/eun-icon.js +1 -1
  38. package/dist/cdn/components/eun-image-card.js +1 -1
  39. package/dist/cdn/components/eun-image-carousel.js +3 -3
  40. package/dist/cdn/components/eun-input-file.js +1 -1
  41. package/dist/cdn/components/eun-input-phone.js +18 -18
  42. package/dist/cdn/components/eun-input.js +1 -1
  43. package/dist/cdn/components/eun-link.js +116 -18
  44. package/dist/cdn/components/eun-modal.js +15 -15
  45. package/dist/cdn/components/eun-radio-card.js +1 -1
  46. package/dist/cdn/components/eun-radio-list.js +1 -1
  47. package/dist/cdn/components/eun-radio.js +1 -1
  48. package/dist/cdn/components/eun-scheduler-event-editor.js +7 -7
  49. package/dist/cdn/components/eun-scheduler-event.js +1 -1
  50. package/dist/cdn/components/eun-scheduler.js +18 -18
  51. package/dist/cdn/components/eun-search.js +15 -15
  52. package/dist/cdn/components/eun-select.js +2 -2
  53. package/dist/cdn/components/eun-slider.js +1 -1
  54. package/dist/cdn/components/eun-sliding-card.js +1 -1
  55. package/dist/cdn/components/eun-switch.js +1 -1
  56. package/dist/cdn/components/eun-tab-group.js +1 -1
  57. package/dist/cdn/components/eun-tab.js +1 -1
  58. package/dist/cdn/components/eun-table-action-bar.js +1 -1
  59. package/dist/cdn/components/eun-table.js +1 -1
  60. package/dist/cdn/components/eun-textarea.js +2 -2
  61. package/dist/cdn/components/eun-time-picker.js +11 -11
  62. package/dist/cdn/components/eun-toggle-group.js +30 -22
  63. package/dist/cdn/components/eun-toggle-item.js +10 -8
  64. package/dist/cdn/components/eun-toggle.js +1 -1
  65. package/dist/cdn/components/eun-toolbar.js +1 -1
  66. package/dist/components/action/button/button.d.ts +44 -17
  67. package/dist/components/action/button/button.js +100 -22
  68. package/dist/components/action/button/button.styles.js +77 -39
  69. package/dist/components/action/dropdown-button/dropdown-button.d.ts +8 -8
  70. package/dist/components/action/dropdown-button/dropdown-button.js +7 -7
  71. package/dist/components/action/fab/fab.d.ts +7 -6
  72. package/dist/components/action/fab/fab.js +11 -8
  73. package/dist/components/action/fab/fab.styles.js +4 -4
  74. package/dist/components/action/link/link.d.ts +65 -6
  75. package/dist/components/action/link/link.js +176 -20
  76. package/dist/components/action/link/link.styles.js +86 -1
  77. package/dist/components/action/shared-styles/button-palette.styles.d.ts +3 -3
  78. package/dist/components/action/shared-styles/button-palette.styles.js +14 -14
  79. package/dist/components/action/toggle/toggle-group.d.ts +15 -5
  80. package/dist/components/action/toggle/toggle-group.js +42 -17
  81. package/dist/components/action/toggle/toggle-group.styles.d.ts +2 -1
  82. package/dist/components/action/toggle/toggle-group.styles.js +15 -7
  83. package/dist/components/action/toggle/toggle-item.d.ts +4 -4
  84. package/dist/components/action/toggle/toggle-item.js +2 -2
  85. package/dist/components/action/toggle/toggle-item.styles.js +8 -6
  86. package/dist/components/alert/drawer/drawer.js +1 -1
  87. package/dist/components/alert/modal/modal.d.ts +8 -8
  88. package/dist/components/alert/modal/modal.js +11 -11
  89. package/dist/components/content/badge/badge.d.ts +6 -6
  90. package/dist/components/content/badge/badge.js +4 -4
  91. package/dist/components/content/badge/badge.styles.js +4 -4
  92. package/dist/components/content/card/card.d.ts +32 -4
  93. package/dist/components/content/card/card.js +64 -4
  94. package/dist/components/content/card/card.styles.js +33 -1
  95. package/dist/components/content/card/image-card.d.ts +2 -1
  96. package/dist/components/content/card/image-card.js +1 -0
  97. package/dist/components/content/card/sliding-card.d.ts +2 -1
  98. package/dist/components/content/card/sliding-card.js +1 -0
  99. package/dist/components/content/collapse/collapse.d.ts +29 -11
  100. package/dist/components/content/collapse/collapse.js +53 -23
  101. package/dist/components/content/collapse/collapse.styles.js +13 -0
  102. package/dist/components/content/icon/icon.d.ts +12 -2
  103. package/dist/components/content/icon/icon.js +52 -22
  104. package/dist/components/content/icon/icon.style.d.ts +2 -0
  105. package/dist/components/content/icon/icon.style.js +4 -1
  106. package/dist/components/content/shared-styles/card-link.styles.js +1 -0
  107. package/dist/components/form/color-picker/color-picker.d.ts +3 -3
  108. package/dist/components/form/color-picker/color-picker.js +4 -4
  109. package/dist/components/form/counter/counter.d.ts +3 -3
  110. package/dist/components/form/counter/counter.js +3 -3
  111. package/dist/components/form/counter/counter.styles.js +5 -5
  112. package/dist/components/form/date-picker/date-picker.d.ts +3 -3
  113. package/dist/components/form/date-picker/date-picker.js +3 -3
  114. package/dist/components/form/date-picker/date-picker.styles.js +5 -5
  115. package/dist/components/form/input/input.d.ts +3 -3
  116. package/dist/components/form/input/input.js +4 -4
  117. package/dist/components/form/input-phone/input-phone.d.ts +3 -3
  118. package/dist/components/form/input-phone/input-phone.js +3 -3
  119. package/dist/components/form/input-phone/input-phone.styles.js +12 -12
  120. package/dist/components/form/search/search.styles.js +3 -3
  121. package/dist/components/form/select/select.d.ts +3 -3
  122. package/dist/components/form/select/select.js +3 -3
  123. package/dist/components/form/shared-styles/field.styles.js +5 -5
  124. package/dist/components/form/textarea/textarea.d.ts +3 -3
  125. package/dist/components/form/textarea/textarea.js +4 -4
  126. package/dist/components/form/time-picker/time-picker.d.ts +3 -3
  127. package/dist/components/form/time-picker/time-picker.js +3 -3
  128. package/dist/components/form/time-picker/time-picker.styles.js +5 -5
  129. package/dist/components/layout/animate/animate.d.ts +8 -0
  130. package/dist/components/layout/animate/animate.js +20 -8
  131. package/dist/features/scheduler/calendar/calendar.d.ts +6 -6
  132. package/dist/features/scheduler/calendar/calendar.js +9 -9
  133. package/dist/features/scheduler/scheduler/scheduler.d.ts +6 -6
  134. package/dist/features/scheduler/scheduler/scheduler.js +13 -13
  135. package/dist/features/scheduler/scheduler-event/scheduler-event.d.ts +10 -8
  136. package/dist/features/scheduler/scheduler-event/scheduler-event.js +7 -7
  137. package/dist/features/scheduler/scheduler-event/scheduler-event.styles.js +6 -6
  138. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js +5 -5
  139. package/dist/features/scheduler/shared/scheduler-event-popover.js +2 -2
  140. package/dist/features/scheduler/shared/scheduler-hour-grid.d.ts +2 -2
  141. package/dist/features/scheduler/shared/scheduler-hour-grid.js +3 -3
  142. package/dist/features/scheduler/shared/scheduler-month-view.d.ts +3 -3
  143. package/dist/features/scheduler/shared/scheduler-month-view.js +2 -2
  144. package/dist/features/table/table/table.types.d.ts +7 -3
  145. package/dist/features/table/table-action-bar/table-action-bar.js +3 -3
  146. package/dist/features/table/table-managed/table-managed.js +2 -2
  147. package/dist/i18n/en.d.ts +3 -0
  148. package/dist/i18n/en.js +3 -0
  149. package/dist/i18n/fr.js +3 -0
  150. package/dist/index.d.ts +3 -3
  151. package/dist/jsx.d.ts +1 -1
  152. package/dist/mixins/button.mixin.d.ts +10 -9
  153. package/dist/mixins/button.mixin.js +14 -6
  154. package/dist/mixins/card-link.mixin.d.ts +3 -2
  155. package/dist/mixins/card-link.mixin.js +12 -5
  156. package/dist/mixins/disabled.mixin.d.ts +3 -3
  157. package/dist/mixins/disabled.mixin.js +10 -5
  158. package/dist/mixins/field-appearance.mixin.d.ts +19 -0
  159. package/dist/mixins/{field-variant.mixin.js → field-appearance.mixin.js} +11 -11
  160. package/dist/ssr/animate-ssr.css +26 -72
  161. package/dist/ssr/links-ssr.css +35 -0
  162. package/dist/ssr/overlay-ssr.css +0 -41
  163. package/dist/ssr/rich-text.css +38 -0
  164. package/dist/ssr/sidebar-ssr.css +0 -38
  165. package/dist/ssr/toolbar-ssr.css +73 -39
  166. package/dist/types/variant.type.d.ts +26 -10
  167. package/dist/utils/navigation.utils.d.ts +14 -0
  168. package/dist/utils/navigation.utils.js +33 -0
  169. package/dist/utils/new-tab-anchor.controller.d.ts +44 -0
  170. package/dist/utils/new-tab-anchor.controller.js +102 -0
  171. package/dist/utils/severity-icon.utils.d.ts +1 -1
  172. package/dist/utils/severity-icon.utils.js +1 -1
  173. package/dist/utils/theme-generator.utils.d.ts +3 -1
  174. package/dist/utils/theme-generator.utils.js +3 -1
  175. package/package.json +8 -2
  176. package/dist/cdn/components/chunks/chunk-2JLDJFYD.js +0 -48
  177. package/dist/cdn/components/chunks/chunk-ATH2OAMU.js +0 -1
  178. package/dist/cdn/components/chunks/chunk-BKHD4S57.js +0 -1
  179. package/dist/cdn/components/chunks/chunk-T7WABJEJ.js +0 -1
  180. package/dist/cdn/components/chunks/chunk-XSMCT4DF.js +0 -1
  181. package/dist/mixins/field-variant.mixin.d.ts +0 -22
@@ -1,10 +1,10 @@
1
1
  import { css } from "lit";
2
2
  /**
3
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
4
+ * `eun-dropdown-button`, which renders an `eun-button`). A `color` fills
5
5
  * the same slots on the host, and each component's stylesheet then reads
6
6
  * them, per appearance and state, *behind* its public `--<component>-*`
7
- * custom properties, so those always win over any variant and appearance.
7
+ * custom properties, so those always win over any color and appearance.
8
8
  *
9
9
  * Slots :
10
10
  * - `--_solid`, `--_solid-hover`, `--_solid-active` : the strong color, at
@@ -21,7 +21,7 @@ import { css } from "lit";
21
21
  * `light` and `dark` are absolute colors : white and black, whatever the
22
22
  * appearance. They have no pale wash, so the tinted surface is as solid as
23
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
24
+ * the neutral surface every other color shares. By default they follow the
25
25
  * grey scale, which flips with the active theme ; `fixed-color` pins them to
26
26
  * the light theme's white and black instead.
27
27
  */
@@ -43,7 +43,7 @@ export const buttonPaletteStyles = css `
43
43
  --_flatFg: var(--eun-text-secondary, #484e61);
44
44
  --_ring: var(--eun-color-primary-700, #3662e0);
45
45
  }
46
- :host([variant="secondary"]) {
46
+ :host([color="secondary"]) {
47
47
  --_solid: var(--eun-color-secondary-500, #e5a030);
48
48
  --_solid-hover: var(--eun-color-secondary-700, #ca8d2a);
49
49
  --_solid-active: var(--eun-color-secondary-800, #a97624);
@@ -54,7 +54,7 @@ export const buttonPaletteStyles = css `
54
54
  --_tint-active: var(--eun-color-secondary-transparent-active, #e5a03066);
55
55
  --_ring: var(--eun-color-secondary-700, #ca8d2a);
56
56
  }
57
- :host([variant="critical"]) {
57
+ :host([color="critical"]) {
58
58
  --_solid: var(--eun-color-critical-100, #aa0014);
59
59
  --_solid-hover: var(--eun-color-critical-100, #aa0014);
60
60
  --_solid-active: var(--eun-color-critical-100, #aa0014);
@@ -65,7 +65,7 @@ export const buttonPaletteStyles = css `
65
65
  --_tint-active: var(--eun-color-critical-90, #e4adb4);
66
66
  --_ring: var(--eun-color-critical-100, #aa0014);
67
67
  }
68
- :host([variant="success"]) {
68
+ :host([color="success"]) {
69
69
  --_solid: var(--eun-color-success-100, #1a9948);
70
70
  --_solid-hover: var(--eun-color-success-100, #1a9948);
71
71
  --_solid-active: var(--eun-color-success-100, #1a9948);
@@ -76,7 +76,7 @@ export const buttonPaletteStyles = css `
76
76
  --_tint-active: var(--eun-color-success-90, #b6dec4);
77
77
  --_ring: var(--eun-color-success-100, #1a9948);
78
78
  }
79
- :host([variant="warning"]) {
79
+ :host([color="warning"]) {
80
80
  --_solid: var(--eun-color-warning-100, #c85207);
81
81
  --_solid-hover: var(--eun-color-warning-100, #c85207);
82
82
  --_solid-active: var(--eun-color-warning-100, #c85207);
@@ -87,7 +87,7 @@ export const buttonPaletteStyles = css `
87
87
  --_tint-active: var(--eun-color-warning-90, #edc8b0);
88
88
  --_ring: var(--eun-color-warning-100, #c85207);
89
89
  }
90
- :host([variant="medium"]) {
90
+ :host([color="medium"]) {
91
91
  --_solid: var(--eun-color-grey-700, #484e61);
92
92
  --_solid-hover: var(--eun-color-grey-800, #071621);
93
93
  --_solid-active: var(--eun-color-grey-900, #000000);
@@ -110,32 +110,32 @@ export const buttonPaletteStyles = css `
110
110
  );
111
111
  --_ring: var(--eun-color-grey-700, #484e61);
112
112
  }
113
- :host([variant="light"]) {
113
+ :host([color="light"]) {
114
114
  --_solid: var(--eun-color-grey-0, #ffffff);
115
115
  --_solid-hover: var(--eun-color-grey-200, #ecedf0);
116
116
  --_solid-active: var(--eun-color-grey-300, #dee0e7);
117
117
  --_onSolid: var(--eun-color-grey-900, #000000);
118
118
  }
119
- :host([variant="light"][fixed-color]) {
119
+ :host([color="light"][fixed-color]) {
120
120
  --_solid: #ffffff;
121
121
  --_solid-hover: #ecedf0;
122
122
  --_solid-active: #dee0e7;
123
123
  --_onSolid: #000000;
124
124
  }
125
- :host([variant="dark"]) {
125
+ :host([color="dark"]) {
126
126
  --_solid: var(--eun-color-grey-800, #071621);
127
127
  --_solid-hover: var(--eun-color-grey-900, #000000);
128
128
  --_solid-active: var(--eun-color-grey-900, #000000);
129
129
  --_onSolid: var(--eun-color-grey-0, #ffffff);
130
130
  }
131
- :host([variant="dark"][fixed-color]) {
131
+ :host([color="dark"][fixed-color]) {
132
132
  --_solid: #071621;
133
133
  --_solid-hover: #000000;
134
134
  --_solid-active: #000000;
135
135
  --_onSolid: #ffffff;
136
136
  }
137
- :host([variant="light"]),
138
- :host([variant="dark"]) {
137
+ :host([color="light"]),
138
+ :host([color="dark"]) {
139
139
  --_accent: var(--_solid);
140
140
  --_tint: var(--_solid);
141
141
  --_tint-hover: var(--_solid-hover);
@@ -1,6 +1,6 @@
1
1
  import { LitElement, PropertyValues, TemplateResult } from "lit";
2
2
  import { EunomiaIconName } from "../../content/icon/icon.type.js";
3
- import { ButtonVariant } from "../../../mixins/button.mixin.js";
3
+ import { ButtonColor } from "../../../mixins/button.mixin.js";
4
4
  import { EunomiaToggleAppearance } from "../../../types/variant.type.js";
5
5
  import type { EunomiaToggleItem } from "./toggle-item.js";
6
6
  /**
@@ -36,11 +36,11 @@ export type EunomiaToggleGroupOption = {
36
36
  showLabel?: boolean;
37
37
  /**
38
38
  * This choice's own semantic color, once the group's `appearance` isn't
39
- * `default` — see {@link ButtonVariant}. Falls back to a neutral style at
39
+ * `default` — see {@link ButtonColor}. Falls back to a neutral style at
40
40
  * rest, taking on this color only once selected ; unset choices default
41
41
  * to `primary`. Ignored entirely in `default` appearance.
42
42
  */
43
- variant?: ButtonVariant;
43
+ color?: ButtonColor;
44
44
  };
45
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
  /**
@@ -82,13 +82,14 @@ declare const EunomiaToggleGroup_base: import("../../../utils/constructor.type.j
82
82
  * @cssprop [--toggle-group-background] - Sets the background color of the track, for every appearance (transparent by default in outline and flat)
83
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
84
84
  * @cssprop [--toggle-group-color] - Sets the text color of unselected options
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
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 color
86
86
  * @cssprop [--toggle-group-active-color] - Sets the text color of selected options, for every appearance
87
87
  * @cssprop [--toggle-group-border-radius] - Sets the corner radius of the track and its options
88
88
  * @cssprop [--toggle-group-gap] - Sets the gap between the options
89
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
90
90
  * @cssprop [--toggle-group-hover-color] - Sets the text color of an unselected option on hover and keyboard focus, for every appearance
91
91
  * @cssprop [--toggle-group-hover-background] - Sets the background color of an unselected option on hover. Transparent by default, and applies regardless of appearance
92
+ * @cssprop [--toggle-group-box-shadow] - Sets a box shadow on the track itself, for every appearance. None by default
92
93
  * @cssprop [--toggle-group-shadow] - Sets a box shadow on every option, and the sliding indicator in exclusive mode. None by default
93
94
  * @cssprop [--toggle-group-shadow-hover] - Sets the box shadow of an unselected option on hover, falling back to toggle-group-shadow when unset
94
95
  * @cssprop [--toggle-group-arrows-color] - Sets the background color the overflow arrows fade out to, once the group overflows its container
@@ -106,7 +107,8 @@ export declare class EunomiaToggleGroup extends EunomiaToggleGroup_base {
106
107
  static readonly styles: import("lit").CSSResult[];
107
108
  /**
108
109
  * The choices to render, in order. Also reflected as a JSON-serialized
109
- * `options` attribute (Lit's default `Array` converter).
110
+ * `options` attribute (Lit's default `Array` converter), left out while
111
+ * empty so an SSR framework doesn't see an attribute it never rendered.
110
112
  * @default []
111
113
  */
112
114
  options: EunomiaToggleGroupOption[];
@@ -159,6 +161,14 @@ export declare class EunomiaToggleGroup extends EunomiaToggleGroup_base {
159
161
  * @readonly
160
162
  */
161
163
  private readonly indicatorEl?;
164
+ /**
165
+ * Whether the initial selection has been painted once. Until then, the
166
+ * choices and their icons skip their color transitions (see the
167
+ * `#scrollable:not(.settled)` rule), so the selected one appears in its
168
+ * final state on load instead of fading in from the unselected color.
169
+ * @internal
170
+ */
171
+ private settled;
162
172
  /**
163
173
  * The total number of choices, combining `options` and slotted
164
174
  * `eun-toggle-item` elements. Drives {@link exclusive} together with
@@ -16,7 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
16
16
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
17
17
  };
18
18
  var _EunomiaToggleGroup_resizeObserver, _EunomiaToggleGroup_hasSeededInitialValue;
19
- import { customElement, property, query, queryAssignedElements, } from "lit/decorators.js";
19
+ import { customElement, property, query, queryAssignedElements, state, } from "lit/decorators.js";
20
20
  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";
@@ -73,13 +73,14 @@ export const EunomiaToggleGroupTagName = "eun-toggle-group";
73
73
  * @cssprop [--toggle-group-background] - Sets the background color of the track, for every appearance (transparent by default in outline and flat)
74
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
75
75
  * @cssprop [--toggle-group-color] - Sets the text color of unselected options
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
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 color
77
77
  * @cssprop [--toggle-group-active-color] - Sets the text color of selected options, for every appearance
78
78
  * @cssprop [--toggle-group-border-radius] - Sets the corner radius of the track and its options
79
79
  * @cssprop [--toggle-group-gap] - Sets the gap between the options
80
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
81
81
  * @cssprop [--toggle-group-hover-color] - Sets the text color of an unselected option on hover and keyboard focus, for every appearance
82
82
  * @cssprop [--toggle-group-hover-background] - Sets the background color of an unselected option on hover. Transparent by default, and applies regardless of appearance
83
+ * @cssprop [--toggle-group-box-shadow] - Sets a box shadow on the track itself, for every appearance. None by default
83
84
  * @cssprop [--toggle-group-shadow] - Sets a box shadow on every option, and the sliding indicator in exclusive mode. None by default
84
85
  * @cssprop [--toggle-group-shadow-hover] - Sets the box shadow of an unselected option on hover, falling back to toggle-group-shadow when unset
85
86
  * @cssprop [--toggle-group-arrows-color] - Sets the background color the overflow arrows fade out to, once the group overflows its container
@@ -90,7 +91,8 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends NavigationOverflowMixi
90
91
  super(...arguments);
91
92
  /**
92
93
  * The choices to render, in order. Also reflected as a JSON-serialized
93
- * `options` attribute (Lit's default `Array` converter).
94
+ * `options` attribute (Lit's default `Array` converter), left out while
95
+ * empty so an SSR framework doesn't see an attribute it never rendered.
94
96
  * @default []
95
97
  */
96
98
  this.options = [];
@@ -141,6 +143,14 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends NavigationOverflowMixi
141
143
  * @internal
142
144
  */
143
145
  _EunomiaToggleGroup_hasSeededInitialValue.set(this, false);
146
+ /**
147
+ * Whether the initial selection has been painted once. Until then, the
148
+ * choices and their icons skip their color transitions (see the
149
+ * `#scrollable:not(.settled)` rule), so the selected one appears in its
150
+ * final state on load instead of fading in from the unselected color.
151
+ * @internal
152
+ */
153
+ this.settled = false;
144
154
  /**
145
155
  * Debounced wrapper around {@link moveIndicator}, used by the resize
146
156
  * observer so a burst of layout changes doesn't retrigger it constantly.
@@ -202,7 +212,13 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends NavigationOverflowMixi
202
212
  }
203
213
  firstUpdated(changedProperties) {
204
214
  super.firstUpdated(changedProperties);
205
- this.settleAndSync(false);
215
+ this.settleAndSync(false)
216
+ .then(() => Promise.all((this.items ?? []).map((item) => this.whenItemReady(item))))
217
+ .then(() => {
218
+ requestAnimationFrame(() => requestAnimationFrame(() => {
219
+ this.settled = true;
220
+ }));
221
+ });
206
222
  }
207
223
  updated(_changedProperties) {
208
224
  super.updated(_changedProperties);
@@ -253,14 +269,11 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends NavigationOverflowMixi
253
269
  * @private
254
270
  */
255
271
  settleAndSync(animate) {
256
- this.whenItemsReady().then(() => {
272
+ return this.whenItemsReady().then(() => {
257
273
  this.seedInitialValue();
258
274
  this.applyExclusiveDefault();
259
275
  this.syncItems();
260
276
  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
277
  this.updateScroll();
265
278
  });
266
279
  }
@@ -508,10 +521,6 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends NavigationOverflowMixi
508
521
  }
509
522
  const trackRect = this.trackEl.getBoundingClientRect();
510
523
  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
524
  const offset = activeRect.left -
516
525
  trackRect.left -
517
526
  this.trackEl.clientLeft +
@@ -520,8 +529,8 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends NavigationOverflowMixi
520
529
  indicator.style.transition = "none";
521
530
  }
522
531
  indicator.style.opacity = "1";
523
- indicator.style.width = `${Math.floor(activeRect.width)}px`;
524
- indicator.style.transform = `translateX(${Math.floor(offset)}px)`;
532
+ indicator.style.width = `${activeRect.width}px`;
533
+ indicator.style.transform = `translateX(${offset}px)`;
525
534
  if (!animate) {
526
535
  indicator.getBoundingClientRect();
527
536
  indicator.style.transition = "";
@@ -646,6 +655,7 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends NavigationOverflowMixi
646
655
  <div id="scrollable-wrapper">
647
656
  <div
648
657
  id="scrollable"
658
+ class=${classMap({ settled: this.settled })}
649
659
  role=${exclusive ? "radiogroup" : "group"}
650
660
  part="track"
651
661
  aria-label=${this.ariaLabel ?? nothing}
@@ -668,7 +678,7 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends NavigationOverflowMixi
668
678
  type="button"
669
679
  class=${classMap({ active: checked, "icon-only": iconOnly })}
670
680
  data-value=${option.value}
671
- data-variant=${ifDefined(option.variant)}
681
+ data-color=${ifDefined(option.color)}
672
682
  role=${exclusive ? "radio" : "checkbox"}
673
683
  aria-checked=${checked ? "true" : "false"}
674
684
  aria-label=${ifDefined(iconOnly ? option.label : undefined)}
@@ -717,10 +727,22 @@ _EunomiaToggleGroup_hasSeededInitialValue = new WeakMap();
717
727
  */
718
728
  EunomiaToggleGroup.styles = [toggleGroupStyles];
719
729
  __decorate([
720
- property({ type: Array, reflect: true })
730
+ property({
731
+ type: Array,
732
+ reflect: true,
733
+ converter: {
734
+ toAttribute: (value) => value?.length ? JSON.stringify(value) : null,
735
+ },
736
+ })
721
737
  ], EunomiaToggleGroup.prototype, "options", void 0);
722
738
  __decorate([
723
- property({ type: Array, reflect: true })
739
+ property({
740
+ type: Array,
741
+ reflect: true,
742
+ converter: {
743
+ toAttribute: (value) => value?.length ? JSON.stringify(value) : null,
744
+ },
745
+ })
724
746
  ], EunomiaToggleGroup.prototype, "value", void 0);
725
747
  __decorate([
726
748
  property({ type: Boolean, reflect: true })
@@ -740,6 +762,9 @@ __decorate([
740
762
  __decorate([
741
763
  query("#indicator")
742
764
  ], EunomiaToggleGroup.prototype, "indicatorEl", void 0);
765
+ __decorate([
766
+ state()
767
+ ], EunomiaToggleGroup.prototype, "settled", void 0);
743
768
  EunomiaToggleGroup = __decorate([
744
769
  customElement(EunomiaToggleGroupTagName)
745
770
  ], EunomiaToggleGroup);
@@ -5,13 +5,14 @@
5
5
  * [--toggle-group-background] - Set a custom background color for the track, for every appearance (transparent by default in `outline`/`flat`)
6
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 ; in `outline`/`flat` appearance, the selected color of every option, over its own variant
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 color
9
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
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
+ * [--toggle-group-box-shadow] - Set a custom box shadow on the track itself, for every appearance, none by default
15
16
  * [--toggle-group-shadow] - Set a custom box shadow on every option (and the sliding indicator, in exclusive mode), none by default
16
17
  * [--toggle-group-shadow-hover] - Set a custom box shadow on hover state, for an unselected option ; falls back to `--toggle-group-shadow`
17
18
  * [--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
@@ -6,13 +6,14 @@ import { css } from "lit";
6
6
  * [--toggle-group-background] - Set a custom background color for the track, for every appearance (transparent by default in `outline`/`flat`)
7
7
  * [--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
8
8
  * [--toggle-group-color] - Set a custom text color for unselected options
9
- * [--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-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 color
10
10
  * [--toggle-group-active-color] - Set a custom text color for selected options, for every appearance
11
11
  * [--toggle-group-border-radius] - Set a custom border radius for the track and its options
12
12
  * [--toggle-group-gap] - Set a custom gap between the options
13
13
  * [--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`
14
14
  * [--toggle-group-hover-color] - Set a custom text color on hover state, for an unselected option, for every appearance
15
15
  * [--toggle-group-hover-background] - Set a custom background color on hover state, for an unselected option ; transparent by default. Applies regardless of `appearance`
16
+ * [--toggle-group-box-shadow] - Set a custom box shadow on the track itself, for every appearance, none by default
16
17
  * [--toggle-group-shadow] - Set a custom box shadow on every option (and the sliding indicator, in exclusive mode), none by default
17
18
  * [--toggle-group-shadow-hover] - Set a custom box shadow on hover state, for an unselected option ; falls back to `--toggle-group-shadow`
18
19
  * [--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
@@ -71,9 +72,14 @@ export const toggleGroupStyles = css `
71
72
  );
72
73
  border: var(--eun-border-width-s, 1px) solid
73
74
  var(--toggle-group-border-color, var(--eun-color-grey-300, #dee0e7));
75
+ box-shadow: var(--toggle-group-box-shadow, none);
74
76
  scrollbar-width: none;
75
77
  overflow-x: hidden;
76
78
  }
79
+ #scrollable:not(.settled) {
80
+ --_toggleTransition: none;
81
+ --icon-transition: none;
82
+ }
77
83
  #scrollable::-webkit-scrollbar {
78
84
  display: none;
79
85
  }
@@ -214,10 +220,12 @@ export const toggleGroupStyles = css `
214
220
  var(--toggle-group-border-radius, var(--eun-border-radius-m, 8px)) - 3px
215
221
  );
216
222
  box-shadow: var(--_boxShadow);
217
- transition:
223
+ transition: var(
224
+ --_toggleTransition,
218
225
  background-color 0.2s ease-out,
219
226
  color 0.2s ease-out,
220
- box-shadow 0.2s ease-out;
227
+ box-shadow 0.2s ease-out
228
+ );
221
229
  }
222
230
  :host([full]) button,
223
231
  :host([full]) ::slotted(eun-toggle-item) {
@@ -266,19 +274,19 @@ export const toggleGroupStyles = css `
266
274
  padding: 6px;
267
275
  }
268
276
 
269
- button[data-variant="secondary"] {
277
+ button[data-color="secondary"] {
270
278
  --_variantColorDefault: var(--eun-color-secondary-500, #e5a030);
271
279
  --_variantTintDefault: var(--eun-color-secondary-transparent, #e5a03033);
272
280
  }
273
- button[data-variant="critical"] {
281
+ button[data-color="critical"] {
274
282
  --_variantColorDefault: var(--eun-color-critical-100, #aa0014);
275
283
  --_variantTintDefault: var(--eun-color-critical-30, #faf0f1);
276
284
  }
277
- button[data-variant="success"] {
285
+ button[data-color="success"] {
278
286
  --_variantColorDefault: var(--eun-color-success-100, #1a9948);
279
287
  --_variantTintDefault: var(--eun-color-success-30, #f1f9f4);
280
288
  }
281
- button[data-variant="warning"] {
289
+ button[data-color="warning"] {
282
290
  --_variantColorDefault: var(--eun-color-warning-100, #c85207);
283
291
  --_variantTintDefault: var(--eun-color-warning-30, #fcf5f0);
284
292
  }
@@ -1,6 +1,6 @@
1
1
  import { LitElement, PropertyValues, TemplateResult } from "lit";
2
2
  import { EunomiaIconName } from "../../content/icon/icon.type.js";
3
- import { ButtonVariant } from "../../../mixins/button.mixin.js";
3
+ import { ButtonColor } from "../../../mixins/button.mixin.js";
4
4
  /**
5
5
  * Tag name of the toggle item component.
6
6
  */
@@ -18,7 +18,7 @@ declare const EunomiaToggleItem_base: import("../../../utils/constructor.type.js
18
18
  * @csspart item - The item's own surface box, carrying its padding, background, and border. Exposed for effects the item's CSS custom properties don't cover
19
19
  * @prop {string} value - The value reported when this option is selected
20
20
  * @prop {EunomiaIconName} icon - An icon shown before the slotted content. For an icon only item, also set an accessible label yourself, since there's no label property to derive one from
21
- * @prop {'primary' | 'secondary' | 'critical' | 'success' | 'warning'} [variant] - This item's own color, used once the parent group's appearance isn't default. It renders as neutral at rest, taking on this color only once selected, and defaults to primary when unset. Ignored entirely in the default appearance
21
+ * @prop {'primary' | 'secondary' | 'critical' | 'success' | 'warning'} [color] - This item's own color, used once the parent group's appearance isn't default. It renders as neutral at rest, taking on this color only once selected, and defaults to primary when unset. Ignored entirely in the default appearance
22
22
  * @prop {boolean} [disabled=false] - Whether this option is disabled
23
23
  * @prop {boolean} [checked=false] - Whether this option is currently selected. Set by the parent toggle group, and shouldn't be set directly
24
24
  * @element eun-toggle-item
@@ -43,11 +43,11 @@ export declare class EunomiaToggleItem extends EunomiaToggleItem_base {
43
43
  /**
44
44
  * This item's own semantic color, once the parent group's `appearance`
45
45
  * isn't `default` — see `eun-toggle-group`'s own `appearance`/
46
- * `ButtonVariant` doc. Falls back to a neutral style at rest, taking on
46
+ * `ButtonColor` doc. Falls back to a neutral style at rest, taking on
47
47
  * this color only once selected ; unset defaults to `primary`. Ignored
48
48
  * entirely in `default` appearance.
49
49
  */
50
- variant?: ButtonVariant;
50
+ color?: ButtonColor;
51
51
  /**
52
52
  * Indicates whether this option is currently selected.
53
53
  * Owned by the parent `eun-toggle-group` ; do not set directly.
@@ -35,7 +35,7 @@ const TOGGLE_GROUP_TAG_NAME = "eun-toggle-group";
35
35
  * @csspart item - The item's own surface box, carrying its padding, background, and border. Exposed for effects the item's CSS custom properties don't cover
36
36
  * @prop {string} value - The value reported when this option is selected
37
37
  * @prop {EunomiaIconName} icon - An icon shown before the slotted content. For an icon only item, also set an accessible label yourself, since there's no label property to derive one from
38
- * @prop {'primary' | 'secondary' | 'critical' | 'success' | 'warning'} [variant] - This item's own color, used once the parent group's appearance isn't default. It renders as neutral at rest, taking on this color only once selected, and defaults to primary when unset. Ignored entirely in the default appearance
38
+ * @prop {'primary' | 'secondary' | 'critical' | 'success' | 'warning'} [color] - This item's own color, used once the parent group's appearance isn't default. It renders as neutral at rest, taking on this color only once selected, and defaults to primary when unset. Ignored entirely in the default appearance
39
39
  * @prop {boolean} [disabled=false] - Whether this option is disabled
40
40
  * @prop {boolean} [checked=false] - Whether this option is currently selected. Set by the parent toggle group, and shouldn't be set directly
41
41
  * @element eun-toggle-item
@@ -130,7 +130,7 @@ __decorate([
130
130
  ], EunomiaToggleItem.prototype, "icon", void 0);
131
131
  __decorate([
132
132
  property({ reflect: true })
133
- ], EunomiaToggleItem.prototype, "variant", void 0);
133
+ ], EunomiaToggleItem.prototype, "color", void 0);
134
134
  __decorate([
135
135
  property({ type: Boolean, reflect: true })
136
136
  ], EunomiaToggleItem.prototype, "checked", void 0);
@@ -41,10 +41,12 @@ export const toggleItemStyles = css `
41
41
  );
42
42
  outline: 2px solid transparent;
43
43
  box-shadow: var(--_boxShadow);
44
- transition:
44
+ transition: var(
45
+ --_toggleTransition,
45
46
  background-color 0.2s ease-out,
46
47
  color 0.2s ease-out,
47
- box-shadow 0.2s ease-out;
48
+ box-shadow 0.2s ease-out
49
+ );
48
50
  }
49
51
  :host(:not([disabled]):hover) #item {
50
52
  box-shadow: var(--_boxShadow-hover);
@@ -95,19 +97,19 @@ export const toggleItemStyles = css `
95
97
  transparent
96
98
  );
97
99
  }
98
- :host([variant="secondary"]) {
100
+ :host([color="secondary"]) {
99
101
  --_variantColorDefault: var(--eun-color-secondary-500, #e5a030);
100
102
  --_variantTintDefault: var(--eun-color-secondary-transparent, #e5a03033);
101
103
  }
102
- :host([variant="critical"]) {
104
+ :host([color="critical"]) {
103
105
  --_variantColorDefault: var(--eun-color-critical-100, #aa0014);
104
106
  --_variantTintDefault: var(--eun-color-critical-30, #faf0f1);
105
107
  }
106
- :host([variant="success"]) {
108
+ :host([color="success"]) {
107
109
  --_variantColorDefault: var(--eun-color-success-100, #1a9948);
108
110
  --_variantTintDefault: var(--eun-color-success-30, #f1f9f4);
109
111
  }
110
- :host([variant="warning"]) {
112
+ :host([color="warning"]) {
111
113
  --_variantColorDefault: var(--eun-color-warning-100, #c85207);
112
114
  --_variantTintDefault: var(--eun-color-warning-30, #fcf5f0);
113
115
  }
@@ -424,7 +424,7 @@ let EunomiaDrawer = class EunomiaDrawer extends DialogSurfaceMixin(LitElement) {
424
424
  heading=${this.confirmCloseHeading}
425
425
  cancel-label=${this.confirmCloseCancelLabel}
426
426
  confirm-label=${this.confirmCloseConfirmLabel}
427
- confirm-variant="critical"
427
+ confirm-color="critical"
428
428
  @eunconfirm=${this.handleDiscardConfirmed}
429
429
  @euncancel=${this.stopDialogPropagation}
430
430
  >
@@ -1,6 +1,6 @@
1
1
  import { LitElement, PropertyValues, TemplateResult } from "lit";
2
- import { ButtonVariant } from "../../../mixins/button.mixin.js";
3
- import { EunomiaModalConfirmVariant } from "../../../types/variant.type.js";
2
+ import { ButtonColor } from "../../../mixins/button.mixin.js";
3
+ import { EunomiaModalConfirmColor } from "../../../types/variant.type.js";
4
4
  /**
5
5
  * Tag name of the modal component.
6
6
  */
@@ -34,8 +34,8 @@ declare const EunomiaModal_base: import("../../../utils/constructor.type.js").Co
34
34
  * @prop {boolean} [closeable=true] - Shows the close button in the top right corner
35
35
  * @prop {string} [cancelLabel='Cancel'] - The label of the default cancel button
36
36
  * @prop {string} [confirmLabel='Confirm'] - The label of the default confirm button
37
- * @prop {'primary' | 'critical'} [confirmVariant='primary'] - The color theme of the default confirm button
38
- * @prop {'primary' | 'secondary' | 'critical' | 'success' | 'warning'} cancelVariant - The color theme of the default cancel button. Left unset, it renders as a neutral gray ghost button
37
+ * @prop {'primary' | 'critical'} [confirmColor='primary'] - The color of the default confirm button
38
+ * @prop {'primary' | 'secondary' | 'critical' | 'success' | 'warning'} cancelColor - The color of the default cancel button. Left unset, it renders as a neutral gray ghost button
39
39
  * @prop {string} ariaLabelClose - The accessible label of the close button
40
40
  * @prop {string} [confirmCloseHeading='Discard changes?'] - The heading of the internal discard confirmation dialog
41
41
  * @attr {string} [confirm-close-heading='Discard changes?'] - The heading of the internal discard confirmation dialog
@@ -122,16 +122,16 @@ export declare class EunomiaModal extends EunomiaModal_base {
122
122
  */
123
123
  confirmLabel: string;
124
124
  /**
125
- * Variant of the default confirm button.
125
+ * Color of the default confirm button.
126
126
  * @default primary
127
127
  */
128
- confirmVariant: EunomiaModalConfirmVariant;
128
+ confirmColor: EunomiaModalConfirmColor;
129
129
  /**
130
- * Variant of the default cancel button. Left unset, it renders as a
130
+ * Color of the default cancel button. Left unset, it renders as a
131
131
  * neutral gray ghost button; set it to color it like any other button
132
132
  * instead.
133
133
  */
134
- cancelVariant?: ButtonVariant;
134
+ cancelColor?: ButtonColor;
135
135
  /**
136
136
  * Aria label of the close (X) button.
137
137
  * @default Close
@@ -45,8 +45,8 @@ export const EunomiaModalTagName = "eun-modal";
45
45
  * @prop {boolean} [closeable=true] - Shows the close button in the top right corner
46
46
  * @prop {string} [cancelLabel='Cancel'] - The label of the default cancel button
47
47
  * @prop {string} [confirmLabel='Confirm'] - The label of the default confirm button
48
- * @prop {'primary' | 'critical'} [confirmVariant='primary'] - The color theme of the default confirm button
49
- * @prop {'primary' | 'secondary' | 'critical' | 'success' | 'warning'} cancelVariant - The color theme of the default cancel button. Left unset, it renders as a neutral gray ghost button
48
+ * @prop {'primary' | 'critical'} [confirmColor='primary'] - The color of the default confirm button
49
+ * @prop {'primary' | 'secondary' | 'critical' | 'success' | 'warning'} cancelColor - The color of the default cancel button. Left unset, it renders as a neutral gray ghost button
50
50
  * @prop {string} ariaLabelClose - The accessible label of the close button
51
51
  * @prop {string} [confirmCloseHeading='Discard changes?'] - The heading of the internal discard confirmation dialog
52
52
  * @attr {string} [confirm-close-heading='Discard changes?'] - The heading of the internal discard confirmation dialog
@@ -120,10 +120,10 @@ let EunomiaModal = class EunomiaModal extends DialogSurfaceMixin(LitElement) {
120
120
  */
121
121
  this.confirmLabel = "Confirm";
122
122
  /**
123
- * Variant of the default confirm button.
123
+ * Color of the default confirm button.
124
124
  * @default primary
125
125
  */
126
- this.confirmVariant = "primary";
126
+ this.confirmColor = "primary";
127
127
  /**
128
128
  * Aria label of the close (X) button.
129
129
  * @default Close
@@ -412,7 +412,7 @@ let EunomiaModal = class EunomiaModal extends DialogSurfaceMixin(LitElement) {
412
412
  heading=${this.confirmCloseHeading}
413
413
  cancel-label=${this.confirmCloseCancelLabel}
414
414
  confirm-label=${this.confirmCloseConfirmLabel}
415
- confirm-variant="critical"
415
+ confirm-color="critical"
416
416
  @eunconfirm=${this.handleDiscardConfirmed}
417
417
  @euncancel=${this.stopDialogPropagation}
418
418
  >
@@ -465,12 +465,12 @@ let EunomiaModal = class EunomiaModal extends DialogSurfaceMixin(LitElement) {
465
465
  <eun-button
466
466
  id="cancel-button"
467
467
  appearance="ghost"
468
- variant=${ifDefined(this.cancelVariant)}
468
+ color=${ifDefined(this.cancelColor)}
469
469
  @click=${() => this.requestClose()}
470
470
  >${this.cancelLabel}</eun-button
471
471
  >
472
472
  <eun-button
473
- variant=${this.confirmVariant}
473
+ color=${this.confirmColor}
474
474
  @click=${() => this.confirm()}
475
475
  >${this.confirmLabel}</eun-button
476
476
  >
@@ -521,11 +521,11 @@ __decorate([
521
521
  property({ attribute: "confirm-label" })
522
522
  ], EunomiaModal.prototype, "confirmLabel", void 0);
523
523
  __decorate([
524
- property({ attribute: "confirm-variant" })
525
- ], EunomiaModal.prototype, "confirmVariant", void 0);
524
+ property({ attribute: "confirm-color" })
525
+ ], EunomiaModal.prototype, "confirmColor", void 0);
526
526
  __decorate([
527
- property({ attribute: "cancel-variant" })
528
- ], EunomiaModal.prototype, "cancelVariant", void 0);
527
+ property({ attribute: "cancel-color" })
528
+ ], EunomiaModal.prototype, "cancelColor", void 0);
529
529
  __decorate([
530
530
  property({ attribute: "aria-label-close" })
531
531
  ], EunomiaModal.prototype, "ariaLabelClose", void 0);