@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 +1 @@
1
- import{b as a,c as b}from"./chunks/chunk-EOWBYZV7.js";import"./chunks/chunk-VRGRCYIO.js";import"./chunks/chunk-5EVP7YNE.js";import"./chunks/chunk-XH6NREVZ.js";export{b as EunomiaTableActionBar,a as EunomiaTableActionBarTagName};
1
+ import{b as a,c as b}from"./chunks/chunk-IDKZKLJR.js";import"./chunks/chunk-VRGRCYIO.js";import"./chunks/chunk-5EVP7YNE.js";import"./chunks/chunk-XH6NREVZ.js";export{b as EunomiaTableActionBar,a as EunomiaTableActionBarTagName};
@@ -1,4 +1,4 @@
1
- import{a as F}from"./chunks/chunk-KVYUNKUO.js";import{a as O}from"./chunks/chunk-X2AUBZD2.js";import{a as p}from"./chunks/chunk-A6KGFALA.js";import{a as f}from"./chunks/chunk-D2M4BV5Y.js";import{b as x,c as m}from"./chunks/chunk-E74CM7UG.js";import"./chunks/chunk-PCM7D3YF.js";import{a as g,b as H}from"./chunks/chunk-EOWBYZV7.js";import"./chunks/chunk-PED5ATYN.js";import{a as z,b as M}from"./chunks/chunk-ZYC7DHES.js";import"./chunks/chunk-5XJLIHAU.js";import{a as B}from"./chunks/chunk-YGUJJ25C.js";import"./chunks/chunk-CEDHJUUH.js";import{a as P}from"./chunks/chunk-2JLDJFYD.js";import{a as k}from"./chunks/chunk-BMQOI7HX.js";import"./chunks/chunk-4MXL6PZC.js";import"./chunks/chunk-T7WABJEJ.js";import"./chunks/chunk-UP4M7TER.js";import"./chunks/chunk-VRGRCYIO.js";import"./chunks/chunk-MMLIPCOY.js";import"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import"./chunks/chunk-5EVP7YNE.js";import"./chunks/chunk-BKHD4S57.js";import{a as l,f as T,g as C,h as r,i as w,j as L,l as A,n as b,p as E,r as R,s as I}from"./chunks/chunk-XH6NREVZ.js";function N(n){let c=document.createElement(p);for(let e of n){let t=document.createElement(O);t.textContent=e.label,e.width&&(t.width=e.width),e.sort&&(t.sort=e.sort),c.appendChild(t)}return c}function D(n,c,e,t,i){let s=document.createElement(f);s.rowKey=t?t(n,c):m(void 0,c);for(let o of e)s.appendChild($(o,n,c));return i&&s.appendChild(j(i,n,c)),s}function $(n,c,e){let t=document.createElement(F);n.align&&t.style.setProperty("--table-cell-align",K(n.align));let i=c[n.key];return R(n.render?n.render(i,c,e):V(i),t),t}function K(n){switch(n){case"center":return"center";case"right":return"flex-end";default:return"flex-start"}}function V(n){return n==null?"":String(n)}function j(n,c,e){if(n.type==="dropdown"){let i=document.createElement(B);return i.setAttribute("slot","action"),i.size="xs",i.appearance="ghost",n.icon?i.icon=n.icon:n.label&&(i.label=n.label),i.ariaLabel=n.label??"Row actions",i.options=n.options(c),i.disabledKeys=n.disabledKeys?.(c)??[],i.disabled=n.disabled?.(c)??!1,i.addEventListener("eunselect",s=>{n.onSelect(s.key,c,e)}),i}let t=document.createElement(k);if(t.setAttribute("slot","action"),t.size="xs",n.variant==="danger"?(t.variant="critical",t.appearance="default"):t.appearance="ghost",t.ariaLabel=n.label,t.disabled=n.disabled?.(c)??!1,n.icon){let i=document.createElement(P);i.name=n.icon,i.size="16",t.appendChild(i)}else t.textContent=n.label;return t.addEventListener("click",()=>n.onClick(c,e)),t}var v=class n extends Event{static{this.eventName="euntableselectionchange"}constructor(c){super(n.eventName,{bubbles:!0,composed:!1}),this.selectedKeys=c,this.selectedCount=c.length}};var _=C`
1
+ import{a as F}from"./chunks/chunk-KVYUNKUO.js";import{a as O}from"./chunks/chunk-X2AUBZD2.js";import{a as p}from"./chunks/chunk-A6KGFALA.js";import{a as f}from"./chunks/chunk-D2M4BV5Y.js";import{b as x,c as m}from"./chunks/chunk-E74CM7UG.js";import"./chunks/chunk-PCM7D3YF.js";import{a as g,b as H}from"./chunks/chunk-IDKZKLJR.js";import"./chunks/chunk-PED5ATYN.js";import{a as z,b as M}from"./chunks/chunk-ZYC7DHES.js";import"./chunks/chunk-5XJLIHAU.js";import{a as B}from"./chunks/chunk-MPQP4R54.js";import"./chunks/chunk-CEDHJUUH.js";import{a as P}from"./chunks/chunk-JRGM3W7I.js";import{a as k}from"./chunks/chunk-DKOPI7QA.js";import"./chunks/chunk-OW7XKDCH.js";import"./chunks/chunk-32DTNR52.js";import"./chunks/chunk-UP4M7TER.js";import"./chunks/chunk-VRGRCYIO.js";import"./chunks/chunk-MMLIPCOY.js";import"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import"./chunks/chunk-3MTUVMM5.js";import"./chunks/chunk-SJWRE6PW.js";import"./chunks/chunk-5EVP7YNE.js";import"./chunks/chunk-5GKM5DIB.js";import{a as l,f as T,g as C,h as r,i as w,j as L,l as A,n as b,p as E,r as R,s as I}from"./chunks/chunk-XH6NREVZ.js";function N(n){let c=document.createElement(p);for(let e of n){let t=document.createElement(O);t.textContent=e.label,e.width&&(t.width=e.width),e.sort&&(t.sort=e.sort),c.appendChild(t)}return c}function D(n,c,e,t,i){let s=document.createElement(f);s.rowKey=t?t(n,c):m(void 0,c);for(let o of e)s.appendChild($(o,n,c));return i&&s.appendChild(j(i,n,c)),s}function $(n,c,e){let t=document.createElement(F);n.align&&t.style.setProperty("--table-cell-align",K(n.align));let i=c[n.key];return R(n.render?n.render(i,c,e):V(i),t),t}function K(n){switch(n){case"center":return"center";case"right":return"flex-end";default:return"flex-start"}}function V(n){return n==null?"":String(n)}function j(n,c,e){if(n.type==="dropdown"){let i=document.createElement(B);return i.setAttribute("slot","action"),i.size="xs",i.appearance="ghost",n.icon?i.icon=n.icon:n.label&&(i.label=n.label),i.ariaLabel=n.label??"Row actions",i.options=n.options(c),i.disabledKeys=n.disabledKeys?.(c)??[],i.disabled=n.disabled?.(c)??!1,i.addEventListener("eunselect",s=>{n.onSelect(s.key,c,e)}),i}let t=document.createElement(k);if(t.setAttribute("slot","action"),t.size="xs",n.color?(t.color=n.color,t.appearance="default"):t.appearance="ghost",t.ariaLabel=n.label,t.disabled=n.disabled?.(c)??!1,n.icon){let i=document.createElement(P);i.name=n.icon,i.size="16",t.appendChild(i)}else t.textContent=n.label;return t.addEventListener("click",()=>n.onClick(c,e)),t}var v=class n extends Event{static{this.eventName="euntableselectionchange"}constructor(c){super(n.eventName,{bubbles:!0,composed:!1}),this.selectedKeys=c,this.selectedCount=c.length}};var _=C`
2
2
  :host {
3
3
  display: grid;
4
4
  grid-template-columns: var(--_columns, none);
@@ -1,4 +1,4 @@
1
- import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk-UAGCQF23.js";import{a as X}from"./chunks/chunk-L74LXUGL.js";import{a as U}from"./chunks/chunk-XSMCT4DF.js";import{a as G}from"./chunks/chunk-GW3VP2L7.js";import{a as z,b as F,c as j,d as K,e as C}from"./chunks/chunk-OAULRKHQ.js";import{a as S}from"./chunks/chunk-YYCEPZUN.js";import{a as N,b as y,c as w,d as A,e as V,f as R,g as O}from"./chunks/chunk-LGLQ36QB.js";import{a as B}from"./chunks/chunk-T7WABJEJ.js";import{a as P}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import{a as v}from"./chunks/chunk-5EVP7YNE.js";import{a as c,f as I,g as _,h as u,i as E,j as k,n as g,p as b,s as D}from"./chunks/chunk-XH6NREVZ.js";var re=_`
1
+ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk-L65WUTXM.js";import{a as X}from"./chunks/chunk-L74LXUGL.js";import{a as U}from"./chunks/chunk-LFCXUVDO.js";import{a as G}from"./chunks/chunk-GW3VP2L7.js";import{a as z,b as F,c as j,d as K,e as C}from"./chunks/chunk-OAULRKHQ.js";import{a as S}from"./chunks/chunk-YYCEPZUN.js";import{a as N,b as y,c as w,d as A,e as V,f as R,g as O}from"./chunks/chunk-LGLQ36QB.js";import{a as B}from"./chunks/chunk-32DTNR52.js";import{a as P}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import{a as v}from"./chunks/chunk-5EVP7YNE.js";import{a as c,f as I,g as _,h as u,i as E,j as k,n as g,p as b,s as D}from"./chunks/chunk-XH6NREVZ.js";var re=_`
2
2
  #field {
3
3
  resize: vertical;
4
4
  min-height: 6rem;
@@ -336,7 +336,7 @@ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk
336
336
  <eun-button
337
337
  class="cancel"
338
338
  size="s"
339
- variant="critical"
339
+ color="critical"
340
340
  appearance="flat"
341
341
  rounded
342
342
  type="button"
@@ -1,4 +1,4 @@
1
- import{a as G,b as T,c as W,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k as ee,m as h,o as H,p as te,q as ie,r as oe,s as re}from"./chunks/chunk-S2UCEWNG.js";import"./chunks/chunk-SD2H5UDZ.js";import{a as N}from"./chunks/chunk-ATH2OAMU.js";import"./chunks/chunk-T4PTHUYF.js";import{a as q}from"./chunks/chunk-LK5BJ4SH.js";import{a as Y}from"./chunks/chunk-UAGCQF23.js";import{a as A}from"./chunks/chunk-LYYQAALT.js";import{a as U}from"./chunks/chunk-XSMCT4DF.js";import{a as j}from"./chunks/chunk-GW3VP2L7.js";import{a as R,c as K,d as B,e as C}from"./chunks/chunk-OAULRKHQ.js";import{a as P}from"./chunks/chunk-YYCEPZUN.js";import{a as _}from"./chunks/chunk-T7WABJEJ.js";import{a as V}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import"./chunks/chunk-5EVP7YNE.js";import{a as r,f as O,g as x,h as s,i as M,j as b,n as d,p as k,s as z}from"./chunks/chunk-XH6NREVZ.js";var de=x`
1
+ import{a as G,b as T,c as W,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k as ee,m as h,o as H,p as te,q as ie,r as oe,s as re}from"./chunks/chunk-S2UCEWNG.js";import"./chunks/chunk-SD2H5UDZ.js";import"./chunks/chunk-T4PTHUYF.js";import{a as q}from"./chunks/chunk-LK5BJ4SH.js";import{a as Y}from"./chunks/chunk-L65WUTXM.js";import{a as A}from"./chunks/chunk-LYYQAALT.js";import{a as U}from"./chunks/chunk-LFCXUVDO.js";import{a as j}from"./chunks/chunk-GW3VP2L7.js";import{a as R,c as K,d as B,e as C}from"./chunks/chunk-OAULRKHQ.js";import{a as P}from"./chunks/chunk-YYCEPZUN.js";import{a as _}from"./chunks/chunk-32DTNR52.js";import{a as V}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import{a as N}from"./chunks/chunk-SJWRE6PW.js";import"./chunks/chunk-5EVP7YNE.js";import{a as r,f as O,g as x,h as s,i as M,j as b,n as d,p as k,s as z}from"./chunks/chunk-XH6NREVZ.js";var de=x`
2
2
  :host {
3
3
  display: block;
4
4
  width: 100%;
@@ -45,22 +45,22 @@ import{a as G,b as T,c as W,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
45
45
  :host([aria-invalid="true"]) #field-wrapper:focus-within {
46
46
  outline-color: var(--_errorColor);
47
47
  }
48
- :host([variant="fill"]) {
48
+ :host([appearance="flat"]) {
49
49
  --_background: var(--field-background, var(--eun-content-hover, #edeff0));
50
50
  }
51
- :host([variant="fill"]) #field-wrapper {
51
+ :host([appearance="flat"]) #field-wrapper {
52
52
  border-color: transparent;
53
53
  }
54
- :host([variant="fill"][aria-invalid="true"]) #field-wrapper {
54
+ :host([appearance="flat"][aria-invalid="true"]) #field-wrapper {
55
55
  box-shadow: inset 0 0 0 var(--eun-border-width-m, 1.5px) var(--_errorColor);
56
56
  }
57
- :host([variant="underline"]) #field-wrapper {
57
+ :host([appearance="underline"]) #field-wrapper {
58
58
  border: none;
59
59
  outline: none;
60
60
  border-bottom: var(--eun-border-width-m, 1.5px) solid var(--_borderColor);
61
61
  border-radius: 0;
62
62
  }
63
- :host([variant="underline"]) #field-wrapper:focus-within {
63
+ :host([appearance="underline"]) #field-wrapper:focus-within {
64
64
  outline: none;
65
65
  }
66
66
  .segment-group {
@@ -179,7 +179,7 @@ import{a as G,b as T,c as W,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
179
179
  #modal-time .modal-footer {
180
180
  padding: var(--eun-space-m);
181
181
  }
182
- `,ne=[Y,de],ce=x`
182
+ `,ne=[Y,de],pe=x`
183
183
  @supports (anchor-name: --a) {
184
184
  #clock-popover:popover-open {
185
185
  position-try-fallbacks: --eun-time-picker-above;
@@ -191,7 +191,7 @@ import{a as G,b as T,c as W,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
191
191
  bottom: calc(anchor(top) + 4px);
192
192
  }
193
193
  }
194
- `,ae=ce;var me=x`
194
+ `,ae=pe;var ce=x`
195
195
  .tp-list {
196
196
  display: flex;
197
197
  flex-direction: column;
@@ -241,7 +241,7 @@ import{a as G,b as T,c as W,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
241
241
  cursor: not-allowed;
242
242
  opacity: 0.4;
243
243
  }
244
- `,se=me;var pe=1440;function le(u){let{format:g,hour:e,minute:t,locale:i,disabled:n=!1,onPick:c}=u,m=Math.max(1,Math.round(u.stepMinutes)),w=new Intl.DateTimeFormat(i,{hour:"numeric",minute:"2-digit",hourCycle:g===12?"h12":"h23"}),f=[];for(let a=0;a<pe;a+=m){let l=Math.floor(a/60),p=a%60;f.push({hour24:l,minute:p,text:w.format(new Date(2e3,0,1,l,p)),selected:l===e&&p===t})}let I=f.findIndex(a=>a.selected),F=I===-1?0:I,v=(a,l)=>{let p=a.querySelectorAll('[role="option"]'),S=Math.min(Math.max(l,0),p.length-1);p[S]?.focus()},ue=a=>{let l=a.currentTarget,p=Array.from(l.querySelectorAll('[role="option"]')),S=p.indexOf(document.activeElement),y=S===-1?F:S;switch(a.key){case"ArrowDown":a.preventDefault(),v(l,y+1);break;case"ArrowUp":a.preventDefault(),v(l,y-1);break;case"PageDown":a.preventDefault(),v(l,y+5);break;case"PageUp":a.preventDefault(),v(l,y-5);break;case"Home":a.preventDefault(),v(l,0);break;case"End":a.preventDefault(),v(l,p.length-1);break;case"Enter":case" ":{a.preventDefault();let L=f[y];L&&c(L.hour24,L.minute);break}default:break}};return d`
244
+ `,se=ce;var me=1440;function le(u){let{format:g,hour:e,minute:t,locale:i,disabled:n=!1,onPick:p}=u,c=Math.max(1,Math.round(u.stepMinutes)),w=new Intl.DateTimeFormat(i,{hour:"numeric",minute:"2-digit",hourCycle:g===12?"h12":"h23"}),f=[];for(let a=0;a<me;a+=c){let l=Math.floor(a/60),m=a%60;f.push({hour24:l,minute:m,text:w.format(new Date(2e3,0,1,l,m)),selected:l===e&&m===t})}let I=f.findIndex(a=>a.selected),F=I===-1?0:I,v=(a,l)=>{let m=a.querySelectorAll('[role="option"]'),S=Math.min(Math.max(l,0),m.length-1);m[S]?.focus()},ue=a=>{let l=a.currentTarget,m=Array.from(l.querySelectorAll('[role="option"]')),S=m.indexOf(document.activeElement),y=S===-1?F:S;switch(a.key){case"ArrowDown":a.preventDefault(),v(l,y+1);break;case"ArrowUp":a.preventDefault(),v(l,y-1);break;case"PageDown":a.preventDefault(),v(l,y+5);break;case"PageUp":a.preventDefault(),v(l,y-5);break;case"Home":a.preventDefault(),v(l,0);break;case"End":a.preventDefault(),v(l,m.length-1);break;case"Enter":case" ":{a.preventDefault();let L=f[y];L&&p(L.hour24,L.minute);break}default:break}};return d`
245
245
  <div
246
246
  class="tp-list"
247
247
  role="listbox"
@@ -257,13 +257,13 @@ import{a as G,b as T,c as W,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
257
257
  tabindex=${n?"-1":l===F?"0":"-1"}
258
258
  aria-selected=${a.selected?"true":"false"}
259
259
  ?disabled=${n}
260
- @click=${()=>c(a.hour24,a.minute)}
260
+ @click=${()=>p(a.hour24,a.minute)}
261
261
  >
262
262
  ${a.text}
263
263
  </button>
264
264
  `)}
265
265
  </div>
266
- `}var he="eun-time-picker",fe=_(B(z)),ve=N(q(U(j(R(K(fe)))))),o=class extends ve{constructor(){super(...arguments);this.stepMinute=1;this.mobileMode="wheel";this.panelMode="columns";this.listStepMinutes=30;this.noAnimation=!1;this.applyLabel="Apply";this.cancelLabel="Cancel";this.ariaLabelClock="Open clock";this.hourPlaceholder="hh";this.minutePlaceholder="mm";this.hideTimezoneLabel=!1;this.isOpen=!1;this.isModalOpen=!1;this.stagingValue=null;this.segments={hour:"",minute:"",period:""};this.checkLocalValidators=()=>{let e=this.resolvedHourFormat();if(be(this.segments)&&!E(this.segments,e))return{validity:{badInput:!0},message:"Enter a valid time"};if(this.value){let{hour:t,minute:i}=h(this.value,this.timezone),n=ee({hour:t,minute:i},D(this.minTime),D(this.maxTime));if(!n.valid)return n.violation==="min"?{validity:{rangeUnderflow:!0},message:this.dictionary.timePicker.mustBeAtOrAfter(this.minTime??"")}:{validity:{rangeOverflow:!0},message:this.dictionary.timePicker.mustBeAtOrBefore(this.maxTime??"")}}return{validity:{}}};this.handleHourColumnChange=e=>{let{minute:t}=h(this.displaySource,this.timezone);this.commitAdjustment(e,t)};this.handleMinuteColumnChange=e=>{let{hour:t}=h(this.displaySource,this.timezone);this.commitAdjustment(t,e)};this.handlePeriodColumnChange=e=>{let{hour:t,minute:i}=h(this.displaySource,this.timezone),{hour:n}=T(t);this.commitAdjustment(W(n,e),i)};this.handleTriggerClick=()=>{if(!(this.disabled||this.readonly)){if(this.resetStaging(),this.panelMode!=="list"&&this.isMobileViewport()){this.isModalOpen=!0;return}this.updateComplete.then(()=>{let e=this.popoverEl;if(!e)return;let t=this.popoverAnimation!==void 0;this.popoverAnimation?.cancel(),this.popoverAnimation=void 0;let i=!e.matches(":popover-open");i&&e.showPopover(),(i||t)&&this.playPopoverOpenAnimation(e)})}};this.handlePopoverToggle=e=>{if(e.newState==="open"){this.isOpen=!0,this.fieldWrapperEl&&this.popoverEl&&this.anchorFloatingElement(this.fieldWrapperEl,this.popoverEl,{forceFallback:A}),this.observeAnchorVisibility(this.fieldWrapperEl,()=>this.closePopover()),this.updateComplete.then(()=>this.panelMode==="list"?this.focusListSelection():this.focusFirstSpinbutton());return}this.isOpen=!1,this.unanchorFloatingElement(),this.unobserveAnchorVisibility(),this.triggerEl?.focus()};this.handleModalConfirm=()=>{this.commitStaged(),this.isModalOpen=!1};this.handleModalCancel=()=>{this.isModalOpen=!1};this.handleListPick=(e,t)=>{this.commitAdjustment(e,t),this.closePopover()};this.handlePeriodSegmentClick=()=>{this.setPeriodSegment(Z(this.segments.period||"AM"))};this.handlePeriodSegmentKeydown=e=>{switch(e.key){case"ArrowUp":case"ArrowDown":case"Enter":case" ":e.preventDefault(),this.handlePeriodSegmentClick();break;case"a":case"A":e.preventDefault(),this.setPeriodSegment("AM");break;case"p":case"P":e.preventDefault(),this.setPeriodSegment("PM");break;case"ArrowLeft":e.preventDefault(),this.focusPreviousSegment("period");break;case"ArrowRight":e.preventDefault(),this.focusNextSegment("period");break;default:break}}}get defaultValue(){return super.defaultValue}set defaultValue(e){super.defaultValue=e}willUpdate(e){let t=e.has("segments")||e.has("minTime")||e.has("maxTime");if(e.has("value")||e.has("timezone")||e.has("hourFormat")||e.has("locale")){let i=this.resolvedHourFormat();if(this.value){let n=h(this.value,this.timezone);this.segments=$(n.hour,n.minute,i)}else this.segments=$(null,null,i);t=!0}t&&this.checkValidity(this.value??null),super.willUpdate(e)}updated(e){super.updated(e),(e.has("valid")||e.has("hideError")||e.has("disabled"))&&this.setAttribute("aria-invalid",String(!this.hideError&&!this.disabled&&!this.valid))}getFocusAnchor(){return this.firstSegmentEl??void 0}focus(){super.focus?.(),this.firstSegmentEl?.focus()}isMobileViewport(){return window.matchMedia("(max-width: 767px)").matches}resolvedHourFormat(){return G(this.locale,this.hourFormat)}get displaySource(){return this.stagingValue??this.value??new Date}resetStaging(){this.stagingValue=this.value??null}commitStaged(){this.value=this.stagingValue,this.dispatchEvent(new P(this.value))}commitAdjustment(e,t){let i=H(this.displaySource,this.timezone,e,t);this.stagingValue=i,!this.isModalOpen&&(this.value=i,this.dispatchEvent(new P(this.value)))}commitTypedTime(e,t){this.value=H(this.value??new Date,this.timezone,e,t),this.dispatchEvent(new P(this.value)),(this.isOpen||this.isModalOpen)&&this.resetStaging()}commitSegmentGroupIfComplete(e){let t=this.resolvedHourFormat();if(!X(e,t))return;let i=E(e,t);i&&this.commitTypedTime(i.hour,i.minute)}popoverAnimationDuration(e){if(this.noAnimation||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return 0;let t=getComputedStyle(e).getPropertyValue("--time-picker-panel-transition-duration").trim();if(t){let i=t.endsWith("ms")?Number.parseFloat(t):Number.parseFloat(t)*1e3;if(Number.isFinite(i)&&i>=0)return i}return 200}playPopoverOpenAnimation(e){e.style.removeProperty("pointer-events");let t=this.popoverAnimationDuration(e);t!==0&&(this.popoverAnimation=e.animate([{opacity:0,transform:"scaleY(0.01)"},{opacity:1,transform:"scaleY(1)"}],{duration:t,easing:"ease",fill:"forwards"}))}closePopover(){let e=this.popoverEl;this.popoverAnimation?.cancel(),this.popoverAnimation=void 0,e?.matches(":popover-open")&&this.playPopoverCloseAnimation(e)}playPopoverCloseAnimation(e){e.style.pointerEvents="none";let t=this.popoverAnimationDuration(e);if(t===0){e.hidePopover();return}let i=e.animate([{opacity:1,transform:"scaleY(1)"},{opacity:0,transform:"scaleY(0.01)"}],{duration:t,easing:"ease",fill:"forwards"});this.popoverAnimation=i,i.finished.then(()=>{this.popoverAnimation===i&&(this.popoverAnimation=void 0),e.hidePopover()}).catch(()=>{})}focusFirstSpinbutton(){(this.isModalOpen?this.shadowRoot:this.popoverEl)?.querySelector('[role="spinbutton"]')?.focus({preventScroll:!0})}focusListSelection(){let e=this.popoverEl?.querySelector('[role="option"][aria-selected="true"]')??this.popoverEl?.querySelector('[role="option"]');e?.focus({preventScroll:!0}),e?.scrollIntoView({block:"center",behavior:this.noAnimation?"instant":"smooth"})}visibleSegmentOrder(){let e=J(this.resolvedHourFormat());return Q(this.locale).filter(t=>e.includes(t))}focusPreviousSegment(e){let t=this.visibleSegmentOrder(),i=t.indexOf(e);i<=0||this.focusSegment(t[i-1])}focusNextSegment(e){let t=this.visibleSegmentOrder(),i=t.indexOf(e);i===-1||i>=t.length-1||this.focusSegment(t[i+1])}focusSegment(e){this.shadowRoot?.querySelector(`.segment-${e}`)?.focus()}handleSegmentInput(e,t){let i=e.target,n=i.value.replace(/\D/g,"").slice(0,2);i.value=n;let c={...this.segments,[t]:n};this.segments=c,n.length===2&&this.focusNextSegment(t),this.commitSegmentGroupIfComplete(c)}handleSegmentKeydown(e,t){let i=e.target;e.key==="Backspace"&&i.value===""||e.key==="ArrowLeft"?(e.preventDefault(),this.focusPreviousSegment(t)):e.key==="ArrowRight"?(e.preventDefault(),this.focusNextSegment(t)):e.key==="ArrowUp"?(e.preventDefault(),this.adjustSegment(t,1)):e.key==="ArrowDown"&&(e.preventDefault(),this.adjustSegment(t,-1))}adjustSegment(e,t){let i=this.resolvedHourFormat(),n=e==="hour"?i===12?{min:1,max:12}:{min:0,max:23}:{min:0,max:59},c=Number(this.segments[e]),m;if(this.segments[e]===""||Number.isNaN(c)){let f=h(this.displaySource,this.timezone);m=e==="hour"?i===12?T(f.hour).hour:f.hour:f.minute}else m=c+t,m>n.max?m=n.min:m<n.min&&(m=n.max);let w={...this.segments,[e]:String(m).padStart(2,"0")};this.segments=w,this.commitSegmentGroupIfComplete(w)}setPeriodSegment(e){if(this.disabled||this.readonly)return;let t={...this.segments,period:e};this.segments=t,this.commitSegmentGroupIfComplete(t)}renderSegment(e){return e==="period"?d`
266
+ `}var he="eun-time-picker",fe=_(B(z)),ve=N(q(U(j(R(K(fe)))))),o=class extends ve{constructor(){super(...arguments);this.stepMinute=1;this.mobileMode="wheel";this.panelMode="columns";this.listStepMinutes=30;this.noAnimation=!1;this.applyLabel="Apply";this.cancelLabel="Cancel";this.ariaLabelClock="Open clock";this.hourPlaceholder="hh";this.minutePlaceholder="mm";this.hideTimezoneLabel=!1;this.isOpen=!1;this.isModalOpen=!1;this.stagingValue=null;this.segments={hour:"",minute:"",period:""};this.checkLocalValidators=()=>{let e=this.resolvedHourFormat();if(be(this.segments)&&!E(this.segments,e))return{validity:{badInput:!0},message:"Enter a valid time"};if(this.value){let{hour:t,minute:i}=h(this.value,this.timezone),n=ee({hour:t,minute:i},D(this.minTime),D(this.maxTime));if(!n.valid)return n.violation==="min"?{validity:{rangeUnderflow:!0},message:this.dictionary.timePicker.mustBeAtOrAfter(this.minTime??"")}:{validity:{rangeOverflow:!0},message:this.dictionary.timePicker.mustBeAtOrBefore(this.maxTime??"")}}return{validity:{}}};this.handleHourColumnChange=e=>{let{minute:t}=h(this.displaySource,this.timezone);this.commitAdjustment(e,t)};this.handleMinuteColumnChange=e=>{let{hour:t}=h(this.displaySource,this.timezone);this.commitAdjustment(t,e)};this.handlePeriodColumnChange=e=>{let{hour:t,minute:i}=h(this.displaySource,this.timezone),{hour:n}=T(t);this.commitAdjustment(W(n,e),i)};this.handleTriggerClick=()=>{if(!(this.disabled||this.readonly)){if(this.resetStaging(),this.panelMode!=="list"&&this.isMobileViewport()){this.isModalOpen=!0;return}this.updateComplete.then(()=>{let e=this.popoverEl;if(!e)return;let t=this.popoverAnimation!==void 0;this.popoverAnimation?.cancel(),this.popoverAnimation=void 0;let i=!e.matches(":popover-open");i&&e.showPopover(),(i||t)&&this.playPopoverOpenAnimation(e)})}};this.handlePopoverToggle=e=>{if(e.newState==="open"){this.isOpen=!0,this.fieldWrapperEl&&this.popoverEl&&this.anchorFloatingElement(this.fieldWrapperEl,this.popoverEl,{forceFallback:A}),this.observeAnchorVisibility(this.fieldWrapperEl,()=>this.closePopover()),this.updateComplete.then(()=>this.panelMode==="list"?this.focusListSelection():this.focusFirstSpinbutton());return}this.isOpen=!1,this.unanchorFloatingElement(),this.unobserveAnchorVisibility(),this.triggerEl?.focus()};this.handleModalConfirm=()=>{this.commitStaged(),this.isModalOpen=!1};this.handleModalCancel=()=>{this.isModalOpen=!1};this.handleListPick=(e,t)=>{this.commitAdjustment(e,t),this.closePopover()};this.handlePeriodSegmentClick=()=>{this.setPeriodSegment(Z(this.segments.period||"AM"))};this.handlePeriodSegmentKeydown=e=>{switch(e.key){case"ArrowUp":case"ArrowDown":case"Enter":case" ":e.preventDefault(),this.handlePeriodSegmentClick();break;case"a":case"A":e.preventDefault(),this.setPeriodSegment("AM");break;case"p":case"P":e.preventDefault(),this.setPeriodSegment("PM");break;case"ArrowLeft":e.preventDefault(),this.focusPreviousSegment("period");break;case"ArrowRight":e.preventDefault(),this.focusNextSegment("period");break;default:break}}}get defaultValue(){return super.defaultValue}set defaultValue(e){super.defaultValue=e}willUpdate(e){let t=e.has("segments")||e.has("minTime")||e.has("maxTime");if(e.has("value")||e.has("timezone")||e.has("hourFormat")||e.has("locale")){let i=this.resolvedHourFormat();if(this.value){let n=h(this.value,this.timezone);this.segments=$(n.hour,n.minute,i)}else this.segments=$(null,null,i);t=!0}t&&this.checkValidity(this.value??null),super.willUpdate(e)}updated(e){super.updated(e),(e.has("valid")||e.has("hideError")||e.has("disabled"))&&this.setAttribute("aria-invalid",String(!this.hideError&&!this.disabled&&!this.valid))}getFocusAnchor(){return this.firstSegmentEl??void 0}focus(){super.focus?.(),this.firstSegmentEl?.focus()}isMobileViewport(){return window.matchMedia("(max-width: 767px)").matches}resolvedHourFormat(){return G(this.locale,this.hourFormat)}get displaySource(){return this.stagingValue??this.value??new Date}resetStaging(){this.stagingValue=this.value??null}commitStaged(){this.value=this.stagingValue,this.dispatchEvent(new P(this.value))}commitAdjustment(e,t){let i=H(this.displaySource,this.timezone,e,t);this.stagingValue=i,!this.isModalOpen&&(this.value=i,this.dispatchEvent(new P(this.value)))}commitTypedTime(e,t){this.value=H(this.value??new Date,this.timezone,e,t),this.dispatchEvent(new P(this.value)),(this.isOpen||this.isModalOpen)&&this.resetStaging()}commitSegmentGroupIfComplete(e){let t=this.resolvedHourFormat();if(!X(e,t))return;let i=E(e,t);i&&this.commitTypedTime(i.hour,i.minute)}popoverAnimationDuration(e){if(this.noAnimation||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return 0;let t=getComputedStyle(e).getPropertyValue("--time-picker-panel-transition-duration").trim();if(t){let i=t.endsWith("ms")?Number.parseFloat(t):Number.parseFloat(t)*1e3;if(Number.isFinite(i)&&i>=0)return i}return 200}playPopoverOpenAnimation(e){e.style.removeProperty("pointer-events");let t=this.popoverAnimationDuration(e);t!==0&&(this.popoverAnimation=e.animate([{opacity:0,transform:"scaleY(0.01)"},{opacity:1,transform:"scaleY(1)"}],{duration:t,easing:"ease",fill:"forwards"}))}closePopover(){let e=this.popoverEl;this.popoverAnimation?.cancel(),this.popoverAnimation=void 0,e?.matches(":popover-open")&&this.playPopoverCloseAnimation(e)}playPopoverCloseAnimation(e){e.style.pointerEvents="none";let t=this.popoverAnimationDuration(e);if(t===0){e.hidePopover();return}let i=e.animate([{opacity:1,transform:"scaleY(1)"},{opacity:0,transform:"scaleY(0.01)"}],{duration:t,easing:"ease",fill:"forwards"});this.popoverAnimation=i,i.finished.then(()=>{this.popoverAnimation===i&&(this.popoverAnimation=void 0),e.hidePopover()}).catch(()=>{})}focusFirstSpinbutton(){(this.isModalOpen?this.shadowRoot:this.popoverEl)?.querySelector('[role="spinbutton"]')?.focus({preventScroll:!0})}focusListSelection(){let e=this.popoverEl?.querySelector('[role="option"][aria-selected="true"]')??this.popoverEl?.querySelector('[role="option"]');e?.focus({preventScroll:!0}),e?.scrollIntoView({block:"center",behavior:this.noAnimation?"instant":"smooth"})}visibleSegmentOrder(){let e=J(this.resolvedHourFormat());return Q(this.locale).filter(t=>e.includes(t))}focusPreviousSegment(e){let t=this.visibleSegmentOrder(),i=t.indexOf(e);i<=0||this.focusSegment(t[i-1])}focusNextSegment(e){let t=this.visibleSegmentOrder(),i=t.indexOf(e);i===-1||i>=t.length-1||this.focusSegment(t[i+1])}focusSegment(e){this.shadowRoot?.querySelector(`.segment-${e}`)?.focus()}handleSegmentInput(e,t){let i=e.target,n=i.value.replace(/\D/g,"").slice(0,2);i.value=n;let p={...this.segments,[t]:n};this.segments=p,n.length===2&&this.focusNextSegment(t),this.commitSegmentGroupIfComplete(p)}handleSegmentKeydown(e,t){let i=e.target;e.key==="Backspace"&&i.value===""||e.key==="ArrowLeft"?(e.preventDefault(),this.focusPreviousSegment(t)):e.key==="ArrowRight"?(e.preventDefault(),this.focusNextSegment(t)):e.key==="ArrowUp"?(e.preventDefault(),this.adjustSegment(t,1)):e.key==="ArrowDown"&&(e.preventDefault(),this.adjustSegment(t,-1))}adjustSegment(e,t){let i=this.resolvedHourFormat(),n=e==="hour"?i===12?{min:1,max:12}:{min:0,max:23}:{min:0,max:59},p=Number(this.segments[e]),c;if(this.segments[e]===""||Number.isNaN(p)){let f=h(this.displaySource,this.timezone);c=e==="hour"?i===12?T(f.hour).hour:f.hour:f.minute}else c=p+t,c>n.max?c=n.min:c<n.min&&(c=n.max);let w={...this.segments,[e]:String(c).padStart(2,"0")};this.segments=w,this.commitSegmentGroupIfComplete(w)}setPeriodSegment(e){if(this.disabled||this.readonly)return;let t={...this.segments,period:e};this.segments=t,this.commitSegmentGroupIfComplete(t)}renderSegment(e){return e==="period"?d`
267
267
  <button
268
268
  type="button"
269
269
  class="segment segment-period"
@@ -1,4 +1,4 @@
1
- import{a as $}from"./chunks/chunk-EST3M4AO.js";import{a as T}from"./chunks/chunk-SD2H5UDZ.js";import{a as A}from"./chunks/chunk-YYCEPZUN.js";import{a as _}from"./chunks/chunk-T7WABJEJ.js";import{a as b}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import{a as p}from"./chunks/chunk-5EVP7YNE.js";import{a as s,b as g,c as w,d as y,f as k,g as E,h as c,j as x,l as C,n as d,p as v,s as I}from"./chunks/chunk-XH6NREVZ.js";var R=E`
1
+ import{a as R}from"./chunks/chunk-EST3M4AO.js";import{a as A}from"./chunks/chunk-SD2H5UDZ.js";import{a as $}from"./chunks/chunk-YYCEPZUN.js";import{a as T}from"./chunks/chunk-32DTNR52.js";import{a as h}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import{a as p}from"./chunks/chunk-5EVP7YNE.js";import{a as s,b,c as w,d as y,f as k,g as E,h as c,i as C,j as x,l as _,n as d,p as v,s as I}from"./chunks/chunk-XH6NREVZ.js";var S=E`
2
2
  :host {
3
3
  display: inline-flex;
4
4
  width: fit-content;
@@ -52,9 +52,14 @@ import{a as $}from"./chunks/chunk-EST3M4AO.js";import{a as T}from"./chunks/chunk
52
52
  );
53
53
  border: var(--eun-border-width-s, 1px) solid
54
54
  var(--toggle-group-border-color, var(--eun-color-grey-300, #dee0e7));
55
+ box-shadow: var(--toggle-group-box-shadow, none);
55
56
  scrollbar-width: none;
56
57
  overflow-x: hidden;
57
58
  }
59
+ #scrollable:not(.settled) {
60
+ --_toggleTransition: none;
61
+ --icon-transition: none;
62
+ }
58
63
  #scrollable::-webkit-scrollbar {
59
64
  display: none;
60
65
  }
@@ -195,10 +200,12 @@ import{a as $}from"./chunks/chunk-EST3M4AO.js";import{a as T}from"./chunks/chunk
195
200
  var(--toggle-group-border-radius, var(--eun-border-radius-m, 8px)) - 3px
196
201
  );
197
202
  box-shadow: var(--_boxShadow);
198
- transition:
203
+ transition: var(
204
+ --_toggleTransition,
199
205
  background-color 0.2s ease-out,
200
206
  color 0.2s ease-out,
201
- box-shadow 0.2s ease-out;
207
+ box-shadow 0.2s ease-out
208
+ );
202
209
  }
203
210
  :host([full]) button,
204
211
  :host([full]) ::slotted(eun-toggle-item) {
@@ -247,19 +254,19 @@ import{a as $}from"./chunks/chunk-EST3M4AO.js";import{a as T}from"./chunks/chunk
247
254
  padding: 6px;
248
255
  }
249
256
 
250
- button[data-variant="secondary"] {
257
+ button[data-color="secondary"] {
251
258
  --_variantColorDefault: var(--eun-color-secondary-500, #e5a030);
252
259
  --_variantTintDefault: var(--eun-color-secondary-transparent, #e5a03033);
253
260
  }
254
- button[data-variant="critical"] {
261
+ button[data-color="critical"] {
255
262
  --_variantColorDefault: var(--eun-color-critical-100, #aa0014);
256
263
  --_variantTintDefault: var(--eun-color-critical-30, #faf0f1);
257
264
  }
258
- button[data-variant="success"] {
265
+ button[data-color="success"] {
259
266
  --_variantColorDefault: var(--eun-color-success-100, #1a9948);
260
267
  --_variantTintDefault: var(--eun-color-success-30, #f1f9f4);
261
268
  }
262
- button[data-variant="warning"] {
269
+ button[data-color="warning"] {
263
270
  --_variantColorDefault: var(--eun-color-warning-100, #c85207);
264
271
  --_variantTintDefault: var(--eun-color-warning-30, #fcf5f0);
265
272
  }
@@ -296,15 +303,16 @@ import{a as $}from"./chunks/chunk-EST3M4AO.js";import{a as T}from"./chunks/chunk
296
303
  outline-color: var(--_variantColor);
297
304
  color: var(--toggle-group-hover-color, var(--_variantColor));
298
305
  }
299
- `;var m=28,D="eun-toggle-group",u,h,n=class extends $(_(I)){constructor(){super(...arguments);this.options=[];this.value=[];this.single=!1;this.appearance="default";this.full=!1;w(this,u);w(this,h,!1);this.debounceMoveIndicator=T(()=>this.moveIndicator(!0),50);this.handleSlotChange=()=>{this.settleAndSync(!1)}}get totalCount(){return this.options.length+(this.items?.length??0)}get exclusive(){return this.single||this.totalCount===2}get entries(){let e=Array.from(this.trackEl?.querySelectorAll("button")??[]),t=this.options.map((r,o)=>({value:r.value,disabled:!!this.disabled,element:e[o]})),a=(this.items??[]).map(r=>({value:r.value,disabled:!!this.disabled||!!r.disabled,element:r}));return[...t,...a]}connectedCallback(){super.connectedCallback?.(),y(this,u,new ResizeObserver(this.debounceMoveIndicator)),g(this,u).observe(this)}disconnectedCallback(){g(this,u)?.disconnect(),super.disconnectedCallback?.()}firstUpdated(e){super.firstUpdated(e),this.settleAndSync(!1)}updated(e){super.updated(e),e.has("disabled")&&this.removeAttribute("tabindex"),(e.has("value")||e.has("options")||e.has("single")||e.has("appearance")||e.has("full"))&&this.settleAndSync(!0),e.has("disabled")&&this.disabled&&this.items?.forEach(t=>{t.disabled=!0})}whenItemsReady(){let e=new Set((this.items??[]).filter(t=>!customElements.get(t.tagName.toLowerCase())).map(t=>t.tagName.toLowerCase()));return e.size?Promise.all([...e].map(t=>customElements.whenDefined(t))):Promise.resolve()}settleAndSync(e){this.whenItemsReady().then(()=>{this.seedInitialValue(),this.applyExclusiveDefault(),this.syncItems(),this.refreshIndicator(e),this.updateScroll()})}seedInitialValue(){if(g(this,h)||(y(this,h,!0),this.value.length))return;let e=(this.items??[]).filter(t=>t.checked).map(t=>t.value);e.length&&(this.value=this.exclusive?[e[0]]:e)}applyExclusiveDefault(){if(!this.exclusive||this.value.length)return;let[e]=this.entries;e&&(this.value=[e.value])}activateValue(e){if(!this.disabled){if(this.exclusive){if(this.value[0]===e)return;this.value=[e]}else this.value=this.value.includes(e)?this.value.filter(t=>t!==e):[...this.value,e];this.dispatchEvent(new A(this.value))}}activateItem(e){this.disabled||e.disabled||this.activateValue(e.value)}syncItems(){this.items?.length&&(this.items.forEach(e=>{e.checked=this.value.includes(e.value),e.toggleAttribute("exclusive",this.exclusive),e.setAttribute("appearance",this.appearance),e.toggleAttribute("full",this.full)}),this.exclusive&&this.applyRovingTabindex())}whenItemReady(e){return typeof e.updateComplete?.then=="function"?e.updateComplete:customElements.whenDefined(e.tagName.toLowerCase()).then(()=>e.updateComplete)}applyRovingTabindex(){let e=this.entries,t=Math.max(0,e.findIndex(a=>a.value===this.value[0]));e.forEach((a,r)=>{if(a.element.tagName==="BUTTON")return;let o=a.element,i=r===t?"0":"-1";this.whenItemReady(o).then(()=>{o.setAttribute("tabindex",i)})})}refreshIndicator(e){if(!this.exclusive)return;let t=()=>{this.appearance==="default"&&this.moveIndicator(e),this.revealActive(e)},a=this.entries.find(r=>r.value===this.value[0]);if(a&&a.element.tagName!=="BUTTON"){this.whenItemReady(a.element).then(t);return}t()}revealActive(e){let t=this.trackEl,a=this.entries.find(S=>S.value===this.value[0]);if(!t||!a||t.scrollWidth<=t.clientWidth)return;let r=t.getBoundingClientRect(),o=a.element.getBoundingClientRect(),i=o.left-r.left-t.clientLeft,l=i+o.width,f=0;i<m?f=i-m:l>t.clientWidth-m&&(f=l-(t.clientWidth-m)),f&&t.scrollBy({left:f,behavior:e?"smooth":"instant"})}moveIndicator(e){let t=this.indicatorEl;if(!this.exclusive||!t||!this.trackEl)return;let a=this.entries.find(l=>l.value===this.value[0]);if(!a){t.style.opacity="0";return}let r=this.trackEl.getBoundingClientRect(),o=a.element.getBoundingClientRect(),i=o.left-r.left-this.trackEl.clientLeft+this.trackEl.scrollLeft;e||(t.style.transition="none"),t.style.opacity="1",t.style.width=`${Math.floor(o.width)}px`,t.style.transform=`translateX(${Math.floor(i)}px)`,e||(t.getBoundingClientRect(),t.style.transition="")}exclusiveTabIndex(e,t){let a=this.value[0]===e,r=this.value.length===0;return a||r&&t===0?0:-1}handleKeydown(e){if(this.disabled)return;if(!this.exclusive){let l=e.target;this.items?.includes(l)&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.activateItem(l));return}let t=this.entries;if(!t.length)return;let a=t.findIndex(l=>l.value===this.value[0]),r,o;switch(e.key){case"ArrowRight":case"ArrowDown":r=1,o=a===-1?0:(a+1)%t.length;break;case"ArrowLeft":case"ArrowUp":r=-1,o=a===-1?t.length-1:(a-1+t.length)%t.length;break;case"Home":r=1,o=0;break;case"End":r=-1,o=t.length-1;break;default:return}e.preventDefault();for(let l=0;l<t.length&&t[o]?.disabled;l+=1)o=(o+r+t.length)%t.length;let i=t[o];!i||i.disabled||(this.activateValue(i.value),i.element.focus())}arrowVisible(e){return this.overflowState?["middle",e==="start"?"end":"start"].includes(String(this.overflowState)):!1}isOnOverflow(){let e=this.trackEl;return!!e&&e.scrollWidth>e.clientWidth}render(){let e=this.exclusive,t=e&&this.appearance==="default";return d`
306
+ `;var m=28,B="eun-toggle-group",u,f,i=class extends R(T(I)){constructor(){super(...arguments);this.options=[];this.value=[];this.single=!1;this.appearance="default";this.full=!1;w(this,u);w(this,f,!1);this.settled=!1;this.debounceMoveIndicator=A(()=>this.moveIndicator(!0),50);this.handleSlotChange=()=>{this.settleAndSync(!1)}}get totalCount(){return this.options.length+(this.items?.length??0)}get exclusive(){return this.single||this.totalCount===2}get entries(){let e=Array.from(this.trackEl?.querySelectorAll("button")??[]),t=this.options.map((a,o)=>({value:a.value,disabled:!!this.disabled,element:e[o]})),r=(this.items??[]).map(a=>({value:a.value,disabled:!!this.disabled||!!a.disabled,element:a}));return[...t,...r]}connectedCallback(){super.connectedCallback?.(),y(this,u,new ResizeObserver(this.debounceMoveIndicator)),b(this,u).observe(this)}disconnectedCallback(){b(this,u)?.disconnect(),super.disconnectedCallback?.()}firstUpdated(e){super.firstUpdated(e),this.settleAndSync(!1).then(()=>Promise.all((this.items??[]).map(t=>this.whenItemReady(t)))).then(()=>{requestAnimationFrame(()=>requestAnimationFrame(()=>{this.settled=!0}))})}updated(e){super.updated(e),e.has("disabled")&&this.removeAttribute("tabindex"),(e.has("value")||e.has("options")||e.has("single")||e.has("appearance")||e.has("full"))&&this.settleAndSync(!0),e.has("disabled")&&this.disabled&&this.items?.forEach(t=>{t.disabled=!0})}whenItemsReady(){let e=new Set((this.items??[]).filter(t=>!customElements.get(t.tagName.toLowerCase())).map(t=>t.tagName.toLowerCase()));return e.size?Promise.all([...e].map(t=>customElements.whenDefined(t))):Promise.resolve()}settleAndSync(e){return this.whenItemsReady().then(()=>{this.seedInitialValue(),this.applyExclusiveDefault(),this.syncItems(),this.refreshIndicator(e),this.updateScroll()})}seedInitialValue(){if(b(this,f)||(y(this,f,!0),this.value.length))return;let e=(this.items??[]).filter(t=>t.checked).map(t=>t.value);e.length&&(this.value=this.exclusive?[e[0]]:e)}applyExclusiveDefault(){if(!this.exclusive||this.value.length)return;let[e]=this.entries;e&&(this.value=[e.value])}activateValue(e){if(!this.disabled){if(this.exclusive){if(this.value[0]===e)return;this.value=[e]}else this.value=this.value.includes(e)?this.value.filter(t=>t!==e):[...this.value,e];this.dispatchEvent(new $(this.value))}}activateItem(e){this.disabled||e.disabled||this.activateValue(e.value)}syncItems(){this.items?.length&&(this.items.forEach(e=>{e.checked=this.value.includes(e.value),e.toggleAttribute("exclusive",this.exclusive),e.setAttribute("appearance",this.appearance),e.toggleAttribute("full",this.full)}),this.exclusive&&this.applyRovingTabindex())}whenItemReady(e){return typeof e.updateComplete?.then=="function"?e.updateComplete:customElements.whenDefined(e.tagName.toLowerCase()).then(()=>e.updateComplete)}applyRovingTabindex(){let e=this.entries,t=Math.max(0,e.findIndex(r=>r.value===this.value[0]));e.forEach((r,a)=>{if(r.element.tagName==="BUTTON")return;let o=r.element,n=a===t?"0":"-1";this.whenItemReady(o).then(()=>{o.setAttribute("tabindex",n)})})}refreshIndicator(e){if(!this.exclusive)return;let t=()=>{this.appearance==="default"&&this.moveIndicator(e),this.revealActive(e)},r=this.entries.find(a=>a.value===this.value[0]);if(r&&r.element.tagName!=="BUTTON"){this.whenItemReady(r.element).then(t);return}t()}revealActive(e){let t=this.trackEl,r=this.entries.find(D=>D.value===this.value[0]);if(!t||!r||t.scrollWidth<=t.clientWidth)return;let a=t.getBoundingClientRect(),o=r.element.getBoundingClientRect(),n=o.left-a.left-t.clientLeft,l=n+o.width,g=0;n<m?g=n-m:l>t.clientWidth-m&&(g=l-(t.clientWidth-m)),g&&t.scrollBy({left:g,behavior:e?"smooth":"instant"})}moveIndicator(e){let t=this.indicatorEl;if(!this.exclusive||!t||!this.trackEl)return;let r=this.entries.find(l=>l.value===this.value[0]);if(!r){t.style.opacity="0";return}let a=this.trackEl.getBoundingClientRect(),o=r.element.getBoundingClientRect(),n=o.left-a.left-this.trackEl.clientLeft+this.trackEl.scrollLeft;e||(t.style.transition="none"),t.style.opacity="1",t.style.width=`${o.width}px`,t.style.transform=`translateX(${n}px)`,e||(t.getBoundingClientRect(),t.style.transition="")}exclusiveTabIndex(e,t){let r=this.value[0]===e,a=this.value.length===0;return r||a&&t===0?0:-1}handleKeydown(e){if(this.disabled)return;if(!this.exclusive){let l=e.target;this.items?.includes(l)&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.activateItem(l));return}let t=this.entries;if(!t.length)return;let r=t.findIndex(l=>l.value===this.value[0]),a,o;switch(e.key){case"ArrowRight":case"ArrowDown":a=1,o=r===-1?0:(r+1)%t.length;break;case"ArrowLeft":case"ArrowUp":a=-1,o=r===-1?t.length-1:(r-1+t.length)%t.length;break;case"Home":a=1,o=0;break;case"End":a=-1,o=t.length-1;break;default:return}e.preventDefault();for(let l=0;l<t.length&&t[o]?.disabled;l+=1)o=(o+a+t.length)%t.length;let n=t[o];!n||n.disabled||(this.activateValue(n.value),n.element.focus())}arrowVisible(e){return this.overflowState?["middle",e==="start"?"end":"start"].includes(String(this.overflowState)):!1}isOnOverflow(){let e=this.trackEl;return!!e&&e.scrollWidth>e.clientWidth}render(){let e=this.exclusive,t=e&&this.appearance==="default";return d`
300
307
  <div id="scrollable-wrapper">
301
308
  <div
302
309
  id="scrollable"
310
+ class=${h({settled:this.settled})}
303
311
  role=${e?"radiogroup":"group"}
304
312
  part="track"
305
313
  aria-label=${this.ariaLabel??v}
306
314
  aria-disabled=${this.disabled?"true":"false"}
307
- @keydown=${a=>this.handleKeydown(a)}
315
+ @keydown=${r=>this.handleKeydown(r)}
308
316
  @scroll=${this.updateScroll}
309
317
  >
310
318
  ${t?d`<span
@@ -312,39 +320,39 @@ import{a as $}from"./chunks/chunk-EST3M4AO.js";import{a as T}from"./chunks/chunk
312
320
  part="indicator"
313
321
  aria-hidden="true"
314
322
  ></span>`:v}
315
- ${this.options.map((a,r)=>{let o=this.value.includes(a.value),i=!!a.icon&&!a.showLabel;return d`
323
+ ${this.options.map((r,a)=>{let o=this.value.includes(r.value),n=!!r.icon&&!r.showLabel;return d`
316
324
  <button
317
325
  type="button"
318
- class=${b({active:o,"icon-only":i})}
319
- data-value=${a.value}
320
- data-variant=${p(a.variant)}
326
+ class=${h({active:o,"icon-only":n})}
327
+ data-value=${r.value}
328
+ data-color=${p(r.color)}
321
329
  role=${e?"radio":"checkbox"}
322
330
  aria-checked=${o?"true":"false"}
323
- aria-label=${p(i?a.label:void 0)}
324
- title=${p(i?a.label:void 0)}
325
- tabindex=${p(e?this.exclusiveTabIndex(a.value,r):void 0)}
331
+ aria-label=${p(n?r.label:void 0)}
332
+ title=${p(n?r.label:void 0)}
333
+ tabindex=${p(e?this.exclusiveTabIndex(r.value,a):void 0)}
326
334
  ?disabled=${this.disabled}
327
- @click=${()=>this.activateValue(a.value)}
335
+ @click=${()=>this.activateValue(r.value)}
328
336
  >
329
- ${a.icon?d`<eun-icon name=${a.icon} size="16"></eun-icon>`:v}
330
- ${i?v:a.label}
337
+ ${r.icon?d`<eun-icon name=${r.icon} size="16"></eun-icon>`:v}
338
+ ${n?v:r.label}
331
339
  </button>
332
340
  `})}
333
341
  <slot @slotchange=${this.handleSlotChange}></slot>
334
342
  </div>
335
343
  <div id="arrows">
336
344
  <arrow-container
337
- class=${b({visible:this.arrowVisible("start")})}
345
+ class=${h({visible:this.arrowVisible("start")})}
338
346
  @click=${this.scrollItem("back")}
339
347
  >
340
348
  <eun-icon name="chevron_left"></eun-icon>
341
349
  </arrow-container>
342
350
  <arrow-container
343
- class=${b({visible:this.arrowVisible("end")})}
351
+ class=${h({visible:this.arrowVisible("end")})}
344
352
  @click=${this.scrollItem("front")}
345
353
  >
346
354
  <eun-icon name="chevron_right"></eun-icon>
347
355
  </arrow-container>
348
356
  </div>
349
357
  </div>
350
- `}};u=new WeakMap,h=new WeakMap,n.styles=[R],s([c({type:Array,reflect:!0})],n.prototype,"options",2),s([c({type:Array,reflect:!0})],n.prototype,"value",2),s([c({type:Boolean,reflect:!0})],n.prototype,"single",2),s([c({reflect:!0})],n.prototype,"appearance",2),s([c({type:Boolean,reflect:!0})],n.prototype,"full",2),s([C()],n.prototype,"items",2),s([x("#scrollable")],n.prototype,"trackEl",2),s([x("#indicator")],n.prototype,"indicatorEl",2),n=s([k(D)],n);export{n as EunomiaToggleGroup,D as EunomiaToggleGroupTagName};
358
+ `}};u=new WeakMap,f=new WeakMap,i.styles=[S],s([c({type:Array,reflect:!0,converter:{toAttribute:e=>e?.length?JSON.stringify(e):null}})],i.prototype,"options",2),s([c({type:Array,reflect:!0,converter:{toAttribute:e=>e?.length?JSON.stringify(e):null}})],i.prototype,"value",2),s([c({type:Boolean,reflect:!0})],i.prototype,"single",2),s([c({reflect:!0})],i.prototype,"appearance",2),s([c({type:Boolean,reflect:!0})],i.prototype,"full",2),s([_()],i.prototype,"items",2),s([x("#scrollable")],i.prototype,"trackEl",2),s([x("#indicator")],i.prototype,"indicatorEl",2),s([C()],i.prototype,"settled",2),i=s([k(B)],i);export{i as EunomiaToggleGroup,B as EunomiaToggleGroupTagName};
@@ -1,4 +1,4 @@
1
- import{a as s}from"./chunks/chunk-T7WABJEJ.js";import{a as e,f as i,g as n,h as r,n as t,p as l,s as c}from"./chunks/chunk-XH6NREVZ.js";var u=n`
1
+ import{a as s}from"./chunks/chunk-32DTNR52.js";import{a as e,f as i,g as n,h as r,n as t,p as l,s as c}from"./chunks/chunk-XH6NREVZ.js";var u=n`
2
2
  :host {
3
3
  --_hoverColor: var(
4
4
  --toggle-group-hover-color,
@@ -35,10 +35,12 @@ import{a as s}from"./chunks/chunk-T7WABJEJ.js";import{a as e,f as i,g as n,h as
35
35
  );
36
36
  outline: 2px solid transparent;
37
37
  box-shadow: var(--_boxShadow);
38
- transition:
38
+ transition: var(
39
+ --_toggleTransition,
39
40
  background-color 0.2s ease-out,
40
41
  color 0.2s ease-out,
41
- box-shadow 0.2s ease-out;
42
+ box-shadow 0.2s ease-out
43
+ );
42
44
  }
43
45
  :host(:not([disabled]):hover) #item {
44
46
  box-shadow: var(--_boxShadow-hover);
@@ -89,19 +91,19 @@ import{a as s}from"./chunks/chunk-T7WABJEJ.js";import{a as e,f as i,g as n,h as
89
91
  transparent
90
92
  );
91
93
  }
92
- :host([variant="secondary"]) {
94
+ :host([color="secondary"]) {
93
95
  --_variantColorDefault: var(--eun-color-secondary-500, #e5a030);
94
96
  --_variantTintDefault: var(--eun-color-secondary-transparent, #e5a03033);
95
97
  }
96
- :host([variant="critical"]) {
98
+ :host([color="critical"]) {
97
99
  --_variantColorDefault: var(--eun-color-critical-100, #aa0014);
98
100
  --_variantTintDefault: var(--eun-color-critical-30, #faf0f1);
99
101
  }
100
- :host([variant="success"]) {
102
+ :host([color="success"]) {
101
103
  --_variantColorDefault: var(--eun-color-success-100, #1a9948);
102
104
  --_variantTintDefault: var(--eun-color-success-30, #f1f9f4);
103
105
  }
104
- :host([variant="warning"]) {
106
+ :host([color="warning"]) {
105
107
  --_variantColorDefault: var(--eun-color-warning-100, #c85207);
106
108
  --_variantTintDefault: var(--eun-color-warning-30, #fcf5f0);
107
109
  }
@@ -149,4 +151,4 @@ import{a as s}from"./chunks/chunk-T7WABJEJ.js";import{a as e,f as i,g as n,h as
149
151
  </slot>
150
152
  <slot></slot>
151
153
  </div>
152
- `}};o.styles=[u],e([r({reflect:!0})],o.prototype,"value",2),e([r()],o.prototype,"icon",2),e([r({reflect:!0})],o.prototype,"variant",2),e([r({type:Boolean,reflect:!0})],o.prototype,"checked",2),o=e([i(v)],o);export{o as EunomiaToggleItem,v as EunomiaToggleItemTagName};
154
+ `}};o.styles=[u],e([r({reflect:!0})],o.prototype,"value",2),e([r()],o.prototype,"icon",2),e([r({reflect:!0})],o.prototype,"color",2),e([r({type:Boolean,reflect:!0})],o.prototype,"checked",2),o=e([i(v)],o);export{o as EunomiaToggleItem,v as EunomiaToggleItemTagName};
@@ -1,4 +1,4 @@
1
- import{a as c}from"./chunks/chunk-YYCEPZUN.js";import{a as d}from"./chunks/chunk-T7WABJEJ.js";import{a as r,f as l,g as s,h as t,n as a,s as n}from"./chunks/chunk-XH6NREVZ.js";var i=s`
1
+ import{a as c}from"./chunks/chunk-YYCEPZUN.js";import{a as d}from"./chunks/chunk-32DTNR52.js";import{a as r,f as l,g as s,h as t,n as a,s as n}from"./chunks/chunk-XH6NREVZ.js";var i=s`
2
2
  :host {
3
3
  --_hoverColor: var(
4
4
  --toggle-hover-color,
@@ -1,4 +1,4 @@
1
- import{a as g}from"./chunks/chunk-N6ZW5CDN.js";import"./chunks/chunk-RIFF2D2F.js";import"./chunks/chunk-UDOZRIJZ.js";import{a as s}from"./chunks/chunk-YYCEPZUN.js";import{a as b}from"./chunks/chunk-VRGRCYIO.js";import{a as v}from"./chunks/chunk-BKHD4S57.js";import{a as i,f as c,g as h,h as r,j as p,l as d,n as o,p as l,s as u}from"./chunks/chunk-XH6NREVZ.js";var f=h`
1
+ import{a as g}from"./chunks/chunk-N6ZW5CDN.js";import"./chunks/chunk-RIFF2D2F.js";import"./chunks/chunk-UDOZRIJZ.js";import{a as s}from"./chunks/chunk-YYCEPZUN.js";import{a as b}from"./chunks/chunk-VRGRCYIO.js";import{a as v}from"./chunks/chunk-5GKM5DIB.js";import{a as i,f as c,g as h,h as r,j as p,l as d,n as o,p as l,s as u}from"./chunks/chunk-XH6NREVZ.js";var f=h`
2
2
  :host {
3
3
  --_height: var(--toolbar-height, 72px);
4
4
  --_heightCollapsed: var(--toolbar-height-collapsed, 56px);
@@ -6,53 +6,55 @@ import { EunomiaSeverity } from "../../../types/variant.type.js";
6
6
  * Tag name of the button component.
7
7
  */
8
8
  export declare const EunomiaButtonTagName = "eun-button";
9
- declare const EunomiaButton_base: import("../../../utils/constructor.type.js").Constructor<import("../../../mixins/button.mixin.js").ButtonMixinInterface> & import("../../../utils/constructor.type.js").Constructor<import("../../../mixins/command.mixin.js").CommandMixinInterface> & import("../../../utils/constructor.type.js").Constructor<import("../../../mixins/disabled.mixin.js").DisabledMixinInterface> & typeof LitElement;
9
+ declare const EunomiaButton_base: import("../../../utils/constructor.type.js").Constructor<import("../../../mixins/button.mixin.js").ButtonMixinInterface> & import("../../../utils/constructor.type.js").Constructor<import("../../../mixins/command.mixin.js").CommandMixinInterface> & import("../../../utils/constructor.type.js").Constructor<import("../../../mixins/disabled.mixin.js").DisabledMixinInterface> & import("../../../utils/constructor.type.js").Constructor<import("../../../mixins/localizable.mixin.js").LocalizableMixinInterface> & typeof LitElement;
10
10
  /**
11
11
  * A clickable control for performing an action or navigating to a link,
12
- * available in several variants, sizes, and surface styles.
12
+ * available in several colors, sizes, and surface styles.
13
13
  *
14
14
  * @slot [default] - The button content
15
15
  * @slot [start] - An icon or other content shown at the start of the button. Takes priority over the default icon from icon or severity. Leave empty to let one of those render instead
16
- * @slot [end] - An icon or other content shown at the end of the button. Ignored when href and target are set to open in a new tab, since an external link indicator takes its place
16
+ * @slot [end] - An icon or other content shown at the end of the button. Ignored when the button opens a link in a new tab, through href and target or a slotted anchor, since an external link indicator takes its place
17
17
  * @prop {'button' | 'submit' | 'reset'} [type='button'] - The button's native type. Ignored when href is set
18
- * @prop {'primary' | 'secondary' | 'critical' | 'success' | 'warning' | 'light' | 'medium' | 'dark'} [variant='primary'] - The color theme applied to the button. light/medium/dark are neutral grey tones with no semantic meaning, matching eun-tag's color scale, for a de-emphasized action next to a semantically-colored one
19
- * @prop {boolean} [fixedColor=false] - Keeps a light or dark 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
20
- * @attr {boolean} [fixed-color=false] - Keeps a light or dark 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
18
+ * @prop {'primary' | 'secondary' | 'critical' | 'success' | 'warning' | 'light' | 'medium' | 'dark'} [color='primary'] - The color applied to the button. light/medium/dark are neutral grey tones with no semantic meaning, matching eun-tag's color scale, for a de-emphasized action next to a semantically-colored one
19
+ * @prop {boolean} [fixedColor=false] - Keeps a light or dark 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 colors
20
+ * @attr {boolean} [fixed-color=false] - Keeps a light or dark 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 colors
21
21
  * @prop {import('../../content/icon/icon.type.js').EunomiaIconName} icon - An optional leading icon, shown at the start of the button. Ignored once something is slotted into start, and overridden by the default icon from severity when both are set
22
- * @prop {'info' | 'success' | 'warning' | 'critical' | 'neutral'} severity - The severity of the action this button leads to. When set, it supplies a default leading icon unless icon is also set or something is slotted into start. It has no effect on color, which is still controlled by variant
22
+ * @prop {'info' | 'success' | 'warning' | 'critical' | 'neutral'} severity - The severity of the action this button leads to. When set, it supplies a default leading icon unless icon is also set or something is slotted into start. It has no effect on color, which is still controlled by color
23
23
  * @prop {'xs' | 's' | 'm' | 'l' | 'xl'} [size='m'] - The size of the button
24
24
  * @prop {boolean} rounded - Whether the button has fully rounded corners
25
25
  * @prop {boolean} slide - Whether the button uses a sliding open animation
26
26
  * @prop {boolean} full - Whether the button stretches to fill 100% of the width available from its parent, instead of sizing to its content. Its content stays centered once stretched
27
27
  * @prop {boolean} [disabled=false] - Whether the button is disabled. For a link button, this removes the href instead, since links have no native disabled state
28
28
  * @prop {string} href - The URL the button navigates to. When set, the button renders as a link instead of a button
29
- * @prop {'_blank' | '_self' | '_parent' | '_top'} target - Where to open the linked URL. Only used when href is set. Opening in a new tab automatically adds an external link icon and announces it to assistive technology
29
+ * @prop {'_blank' | '_self' | '_parent' | '_top'} target - Where to open the linked URL. Only used when href is set. Opening in a new tab automatically adds an external link icon and announces it to assistive technology, in the current locale. A slotted anchor opening in a new tab gets the same icon and announcement
30
+ * @prop {string} [locale] - The locale used to resolve the "opens in a new tab" announcement. Defaults to the one set with setDefaultLocale, English otherwise
30
31
  * @prop {string} download - The filename used when the linked URL is downloaded instead of navigated to. Only used when href is set
31
32
  * @prop {boolean} [loading=false] - Whether the button shows a loading indicator. Like disabled, it blocks interaction, but keeps the original content in place so the button doesn't change size
32
33
  * @prop {string} [loadingLabel='Loading…'] - The accessible label announced while the button is loading
33
34
  * @prop {string} command - The command sent to the element targeted by commandFor when the button is clicked, following the Invoker Commands API
34
35
  * @prop {string} commandFor - The id of the element that command is sent to
35
36
  * @attr {string} aria-label - The accessible label for the button. When the button opens a link in a new tab, this automatically gets a note appended announcing it
36
- * @prop {'default' | 'fill' | 'outline' | 'flat' | 'raised' | 'ghost'} [appearance='fill'] - The button's surface style. Fill is a solid, colored background with light text. Default is a paler tint of the same color. Outline keeps the color as a border instead of a fill. Flat always renders a muted, low emphasis surface regardless of variant. Raised adds a drop shadow. Ghost shows no surface at rest, only gaining a border and a tinted background on hover, focus, or press
37
+ * @prop {'default' | 'fill' | 'outline' | 'flat' | 'raised' | 'ghost'} [appearance='fill'] - The button's surface style. Fill is a solid, colored background with light text. Default is a paler tint of the same color. Outline keeps the color as a border instead of a fill. Flat always renders a muted, low emphasis surface regardless of color. Raised adds a drop shadow. Ghost shows no surface at rest, only gaining a border and a tinted background on hover, focus, or press
37
38
  * @fires click - Fired when the button is activated by mouse, Enter, or Space
38
39
  * @fires {NavigationEvent} eunnavigate - Fired before following href, so a client-side router can intercept the navigation. Not fired for downloads, and cancelable
39
40
  * @cssprop [--button-background] - Sets the background color
40
41
  * @cssprop [--button-background-hover] - Sets the background color on hover
41
42
  * @cssprop [--button-background-active] - Sets the background color while pressed
42
43
  * @cssprop [--button-text] - Sets the text color
43
- * @cssprop [--button-padding] - Sets the button's padding
44
- * @cssprop [--button-border-radius] - Sets the corner radius of the button
44
+ * @cssprop [--button-padding] - Sets the button's padding, for every size
45
+ * @cssprop [--button-border-radius] - Sets the corner radius of the button, for every size and over rounded
45
46
  * @cssprop [--button-focus-outline] - Sets the color of the focus outline
46
47
  * @cssprop [--button-transition] - Sets the duration of the button's transitions
47
48
  * @cssprop [--button-shadow] - Sets a box shadow. None is applied by default
48
49
  * @cssprop [--button-shadow-hover] - Sets the box shadow on hover, falling back to button-shadow when unset
49
- * @cssprop [--button-border-color] - Sets the border color, overriding the color the active variant would otherwise use
50
+ * @cssprop [--button-border-color] - Sets the border color, overriding the color the active color would otherwise use
50
51
  * @cssprop [--button-border-color-hover] - Sets the border color on hover or focus, falling back to button-border-color when unset
51
52
  * @cssprop [--button-border-size] - Sets the width of the border
52
53
  * @cssprop [--button-full] - Set to true to stretch the button like the full attribute does. Unlike the attribute, a container query can set it, keeping the responsive behavior in pure CSS. Needs a browser supporting the CSS if() function
53
54
  * @element eun-button
54
55
  */
55
56
  export declare class EunomiaButton extends EunomiaButton_base {
57
+ #private;
56
58
  /**
57
59
  * Style to import to the component.
58
60
  *
@@ -77,19 +79,19 @@ export declare class EunomiaButton extends EunomiaButton_base {
77
79
  * `severity` is set and `icon` isn't (and nothing is slotted into
78
80
  * `start`), the leading icon is set according to it (see
79
81
  * {@link resolveIcon}) — same vocabulary as `eun-alert`/`eun-tag`. Has no
80
- * effect on color, which stays driven by `variant` : a full severity
82
+ * effect on color, which stays driven by `color` : a full severity
81
83
  * range (`info`/`neutral` included) doesn't have a matching action color.
82
84
  */
83
85
  severity?: EunomiaSeverity;
84
86
  /**
85
87
  * The button's surface treatment. `fill` is a solid, opaque
86
- * `variant`-colored background with light text ; `default` is a pale
88
+ * `color`-colored background with light text ; `default` is a pale
87
89
  * tinted wash of the same color ; `outline` drops the fill for a colored
88
90
  * border ; `flat` always renders the same muted, low-emphasis surface
89
- * regardless of `variant` ; `raised` adds a drop shadow ; `ghost` has no
91
+ * regardless of `color` ; `raised` adds a drop shadow ; `ghost` has no
90
92
  * visible surface at rest at all — a border (and a tinted background)
91
93
  * only appear on hover/focus/active, defaulting to a neutral gray when
92
- * `variant` isn't also set.
94
+ * `color` isn't also set.
93
95
  * @default fill
94
96
  */
95
97
  appearance: EunomiaButtonAppearance;
@@ -114,9 +116,34 @@ export declare class EunomiaButton extends EunomiaButton_base {
114
116
  * @param _changedProperties - Map of changed properties
115
117
  */
116
118
  protected updated(_changedProperties: PropertyValues): void;
119
+ /**
120
+ * The native `<a>` slotted as a direct child while `href` is unset, which
121
+ * then acts as the button's link : it's in the light DOM, so it's part of
122
+ * the server-rendered HTML, and a framework's own link component can be
123
+ * that anchor. Navigation, `target`/`rel` and the new-tab hint are the
124
+ * consumer's own in this mode.
125
+ * @internal
126
+ */
127
+ private get slottedAnchor();
128
+ /**
129
+ * Links have no native disabled state : while `disabled` or `loading`,
130
+ * the slotted anchor is announced as disabled and taken out of the tab
131
+ * order (its pointer events are cut by the stylesheet), then restored.
132
+ * @param anchor the slotted anchor.
133
+ * @private
134
+ */
135
+ private syncSlottedAnchor;
136
+ /**
137
+ * Re-renders when the default slot changes, so an anchor added or removed
138
+ * after the first render switches between the two modes.
139
+ * @private
140
+ */
141
+ private handleDefaultSlotChange;
117
142
  /**
118
143
  * Renders the end-of-content slot, replaced by an external-link indicator
119
- * (icon + accessible hint) when navigating away in a new tab.
144
+ * (icon + accessible hint) when navigating away in a new tab. A slotted
145
+ * anchor gets the icon only : the hint would sit outside it, so it's
146
+ * announced through its aria-description instead.
120
147
  * @private
121
148
  */
122
149
  private renderEndContent;