@eunomia/elements 1.0.0-beta.7 → 1.0.0-beta.8
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.
- package/dist/cdn/components/chunks/{chunk-3PNGQEG4.js → chunk-32L2QYWQ.js} +2 -2
- package/dist/cdn/components/chunks/{chunk-Z3OFIE7S.js → chunk-3UUZM7X2.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-BVASCT2V.js → chunk-55PUDL7D.js} +13 -13
- package/dist/cdn/components/chunks/chunk-5LA5DQMP.js +1 -0
- package/dist/cdn/components/chunks/chunk-5LXGJVJR.js +1 -0
- package/dist/cdn/components/chunks/chunk-6TIEBY34.js +1 -0
- package/dist/cdn/components/chunks/{chunk-LVKMAHMU.js → chunk-AH2SKZ7T.js} +4 -1
- package/dist/cdn/components/chunks/chunk-JAGZL7JH.js +1 -0
- package/dist/cdn/components/chunks/{chunk-DGI7TKCU.js → chunk-LD35BFNK.js} +5 -9
- package/dist/cdn/components/chunks/chunk-P6LGU3FT.js +1 -0
- package/dist/cdn/components/chunks/{chunk-UYZR4JXZ.js → chunk-QSZO4GIH.js} +45 -9
- package/dist/cdn/components/chunks/{chunk-PXF554MD.js → chunk-QYB6Z6FG.js} +5 -5
- package/dist/cdn/components/chunks/{chunk-RIFF2D2F.js → chunk-RGC3I6MK.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-N6ZW5CDN.js → chunk-TCSB2MLU.js} +1 -1
- package/dist/cdn/components/chunks/chunk-WIUERJII.js +1 -0
- package/dist/cdn/components/eun-animate.js +4 -4
- package/dist/cdn/components/eun-button.js +1 -1
- package/dist/cdn/components/eun-carousel.js +10 -9
- package/dist/cdn/components/eun-chip.js +17 -11
- package/dist/cdn/components/eun-collapse.js +1 -1
- package/dist/cdn/components/eun-color-picker.js +18 -5
- package/dist/cdn/components/eun-counter.js +10 -8
- package/dist/cdn/components/eun-date-picker.js +46 -43
- package/dist/cdn/components/eun-drawer.js +19 -20
- package/dist/cdn/components/eun-dropdown-button.js +1 -1
- package/dist/cdn/components/eun-dropdown-item.js +3 -3
- package/dist/cdn/components/eun-fab.js +1 -1
- package/dist/cdn/components/eun-image-carousel.js +4 -4
- package/dist/cdn/components/eun-input-phone.js +11 -8
- package/dist/cdn/components/eun-input.js +1 -1
- package/dist/cdn/components/eun-link.js +59 -13
- package/dist/cdn/components/eun-modal.js +23 -13
- package/dist/cdn/components/eun-scheduler-event-editor.js +1 -1
- package/dist/cdn/components/eun-search.js +34 -28
- package/dist/cdn/components/eun-select.js +3 -3
- package/dist/cdn/components/eun-sidebar.js +66 -21
- package/dist/cdn/components/eun-sliding-card.js +1 -1
- package/dist/cdn/components/eun-stepper.js +16 -16
- package/dist/cdn/components/eun-tab-panel.js +1 -1
- package/dist/cdn/components/eun-table-action-bar.js +1 -1
- package/dist/cdn/components/eun-table.js +2 -2
- package/dist/cdn/components/eun-textarea.js +16 -13
- package/dist/cdn/components/eun-time-picker.js +25 -23
- package/dist/cdn/components/eun-toast.js +8 -8
- package/dist/cdn/components/eun-toggle-group.js +71 -35
- package/dist/cdn/components/eun-toggle-item.js +8 -8
- package/dist/cdn/components/eun-toolbar.js +20 -20
- package/dist/cdn/components/eun-tooltip.js +6 -6
- package/dist/cdn/styles/eunomia-themes.css +1 -1
- package/dist/cdn/styles/themes/mixins/eunomia-neutrals.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.css +1 -1
- package/dist/components/action/button/button.d.ts +2 -2
- package/dist/components/action/button/button.js +3 -7
- package/dist/components/action/button/button.styles.js +3 -3
- package/dist/components/action/dropdown-button/dropdown-button.d.ts +4 -6
- package/dist/components/action/dropdown-button/dropdown-button.js +6 -8
- package/dist/components/action/dropdown-button/dropdown-item.d.ts +10 -2
- package/dist/components/action/dropdown-button/dropdown-item.js +24 -9
- package/dist/components/action/link/link.d.ts +10 -1
- package/dist/components/action/link/link.js +13 -1
- package/dist/components/action/link/link.styles.js +50 -3
- package/dist/components/action/toggle/toggle-group.d.ts +12 -2
- package/dist/components/action/toggle/toggle-group.js +17 -2
- package/dist/components/action/toggle/toggle-group.styles.js +54 -18
- package/dist/components/action/toggle/toggle-item.js +1 -3
- package/dist/components/action/toggle/toggle-item.styles.js +7 -7
- package/dist/components/alert/drawer/drawer.d.ts +25 -0
- package/dist/components/alert/drawer/drawer.js +42 -3
- package/dist/components/alert/drawer/drawer.styles.js +6 -6
- package/dist/components/alert/modal/modal.d.ts +25 -0
- package/dist/components/alert/modal/modal.js +42 -3
- package/dist/components/alert/modal/modal.styles.js +17 -6
- package/dist/components/alert/toast/toast.js +3 -2
- package/dist/components/alert/toast/toast.styles.js +3 -3
- package/dist/components/content/chip/chip.js +3 -2
- package/dist/components/content/chip/chip.styles.js +9 -3
- package/dist/components/content/image-carousel/image-carousel.js +5 -4
- package/dist/components/content/tooltip/tooltip.d.ts +16 -9
- package/dist/components/content/tooltip/tooltip.js +28 -12
- package/dist/components/content/tooltip/tooltip.styles.js +1 -1
- package/dist/components/form/color-picker/color-picker.d.ts +7 -1
- package/dist/components/form/color-picker/color-picker.js +8 -2
- package/dist/components/form/color-picker/color-picker.styles.js +13 -0
- package/dist/components/form/counter/counter.d.ts +3 -1
- package/dist/components/form/counter/counter.js +3 -1
- package/dist/components/form/counter/counter.styles.js +6 -4
- package/dist/components/form/date-picker/date-picker.d.ts +6 -1
- package/dist/components/form/date-picker/date-picker.js +7 -2
- package/dist/components/form/date-picker/date-picker.styles.js +9 -6
- package/dist/components/form/input/input.d.ts +6 -1
- package/dist/components/form/input/input.js +7 -2
- package/dist/components/form/input-phone/input-phone.d.ts +7 -1
- package/dist/components/form/input-phone/input-phone.js +7 -1
- package/dist/components/form/input-phone/input-phone.styles.js +6 -3
- package/dist/components/form/search/search.d.ts +64 -10
- package/dist/components/form/search/search.js +112 -31
- package/dist/components/form/search/search.styles.js +2 -0
- package/dist/components/form/select/select.d.ts +7 -1
- package/dist/components/form/select/select.js +7 -1
- package/dist/components/form/shared-styles/field.styles.js +45 -8
- package/dist/components/form/shared-styles/listbox.styles.js +5 -1
- package/dist/components/form/textarea/textarea.d.ts +1 -0
- package/dist/components/form/textarea/textarea.js +2 -1
- package/dist/components/form/textarea/textarea.styles.js +3 -0
- package/dist/components/form/time-picker/time-picker.d.ts +6 -1
- package/dist/components/form/time-picker/time-picker.js +7 -2
- package/dist/components/form/time-picker/time-picker.styles.js +7 -5
- package/dist/components/layout/animate/animate.js +2 -1
- package/dist/components/navigation/carousel/carousel.d.ts +1 -2
- package/dist/components/navigation/carousel/carousel.js +14 -6
- package/dist/components/navigation/carousel/carousel.styles.js +5 -4
- package/dist/components/navigation/sidebar/sidebar.d.ts +98 -52
- package/dist/components/navigation/sidebar/sidebar.js +140 -85
- package/dist/components/navigation/sidebar/sidebar.styles.d.ts +1 -1
- package/dist/components/navigation/sidebar/sidebar.styles.js +69 -21
- package/dist/components/navigation/stepper/stepper.d.ts +1 -3
- package/dist/components/navigation/stepper/stepper.js +3 -21
- package/dist/components/navigation/toolbar/toolbar.d.ts +10 -0
- package/dist/components/navigation/toolbar/toolbar.js +8 -1
- package/dist/components/navigation/toolbar/toolbar.styles.js +18 -17
- package/dist/events/select.event.d.ts +3 -2
- package/dist/events/select.event.js +2 -1
- package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js +1 -1
- package/dist/features/table/table/table.js +1 -1
- package/dist/features/table/table-action-bar/table-action-bar.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/mixins/button.mixin.d.ts +1 -1
- package/dist/mixins/button.mixin.js +6 -4
- package/dist/mixins/dialog-surface.mixin.d.ts +8 -0
- package/dist/mixins/field-size.mixin.d.ts +19 -0
- package/dist/mixins/field-size.mixin.js +33 -0
- package/dist/mixins/rounded.mixin.d.ts +18 -0
- package/dist/mixins/rounded.mixin.js +32 -0
- package/dist/ssr/button-ssr.css +5 -5
- package/dist/ssr/carousel-ssr.css +9 -0
- package/dist/ssr/chip-ssr.css +8 -0
- package/dist/ssr/collapse-ssr.css +29 -0
- package/dist/ssr/field-ssr.css +43 -4
- package/dist/ssr/image-carousel-ssr.css +10 -0
- package/dist/ssr/links-ssr.css +38 -1
- package/dist/ssr/sidebar-ssr.css +95 -4
- package/dist/ssr/toggle-group-ssr.css +64 -13
- package/dist/ssr/toolbar-ssr.css +50 -0
- package/dist/types/variant.type.d.ts +4 -1
- package/dist/utils/boolean.utils.d.ts +14 -0
- package/dist/utils/boolean.utils.js +20 -0
- package/dist/utils/dropdown-menu.utils.d.ts +1 -1
- package/dist/utils/focusable-elements.utils.d.ts +12 -0
- package/dist/utils/focusable-elements.utils.js +26 -0
- package/dist/utils/input-modality.utils.d.ts +13 -0
- package/dist/utils/input-modality.utils.js +34 -0
- package/dist/utils/theme-generator.utils.d.ts +8 -2
- package/dist/utils/theme-generator.utils.js +30 -9
- package/package.json +1 -1
- package/styles/themes/mixins/eunomia-neutrals.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +6 -2
- package/dist/cdn/components/chunks/chunk-6VK6SHCG.js +0 -1
- package/dist/cdn/components/chunks/chunk-UDOZRIJZ.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as g}from"./chunks/chunk-
|
|
1
|
+
import{b as g}from"./chunks/chunk-55PUDL7D.js";import{a as I}from"./chunks/chunk-5LA5DQMP.js";import{a as L,b as k,c as T}from"./chunks/chunk-GWLD2I3P.js";import"./chunks/chunk-UVHVQRPT.js";import{a as w,b as A}from"./chunks/chunk-AH2SKZ7T.js";import"./chunks/chunk-L74LXUGL.js";import{a as y}from"./chunks/chunk-LK5BJ4SH.js";import"./chunks/chunk-WIUERJII.js";import"./chunks/chunk-QSZO4GIH.js";import{b as O,c}from"./chunks/chunk-624VJYNA.js";import{a as u}from"./chunks/chunk-LYYQAALT.js";import"./chunks/chunk-WW4BTWMH.js";import"./chunks/chunk-GVS6IUKC.js";import"./chunks/chunk-P6LGU3FT.js";import"./chunks/chunk-BO3JOEWM.js";import"./chunks/chunk-TLBXTBMM.js";import{a as x}from"./chunks/chunk-YYCEPZUN.js";import"./chunks/chunk-3BMACIDO.js";import{a as d}from"./chunks/chunk-PPCHQG7P.js";import{a as m}from"./chunks/chunk-6TIEBY34.js";import{a as v}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js";import"./chunks/chunk-62RLISRD.js";import"./chunks/chunk-QL5GSW2A.js";import{a as r,f,h as b,j as s,k as h,l as a,p as o,r as l}from"./chunks/chunk-YITWLCD3.js";var C=b`
|
|
2
2
|
#shortcut-hint {
|
|
3
3
|
flex-shrink: 0;
|
|
4
4
|
display: inline-flex;
|
|
@@ -107,6 +107,8 @@ import{b as g}from"./chunks/chunk-BVASCT2V.js";import{a as A,b as L,c as k}from"
|
|
|
107
107
|
position: relative;
|
|
108
108
|
}
|
|
109
109
|
#panel-field #field {
|
|
110
|
+
box-sizing: border-box;
|
|
111
|
+
height: auto;
|
|
110
112
|
width: 100%;
|
|
111
113
|
border: none;
|
|
112
114
|
border-radius: 0;
|
|
@@ -138,16 +140,16 @@ import{b as g}from"./chunks/chunk-BVASCT2V.js";import{a as A,b as L,c as k}from"
|
|
|
138
140
|
gap: var(--eun-space-xs, 4px);
|
|
139
141
|
padding: var(--eun-space-s, 8px) var(--eun-space-m, 16px);
|
|
140
142
|
}
|
|
141
|
-
`,
|
|
143
|
+
`,D=C;var P="eun-search",i=class extends y(g){constructor(){super(...arguments);this.type="search";this.icon="search";this.clearable=!0;this.shortcut=!1;this.panel=!1;this.loading=!1;this.loadingLabel="Loading\u2026";this.suggestions=!1;this.noResultsLabel="No results";this.filter="contains";this.isOpen=!1;this.highlightedIndex=-1;this.optionsObserver=new MutationObserver(()=>{this.highlightedIndex>=this.filteredOptions.length&&(this.highlightedIndex=-1),this.requestUpdate()});this.handleTriggerClick=()=>{this.disabled||this.openPanel()};this.handleFieldPointerDown=()=>{this.fieldPointerDownAt=performance.now()};this.handleSuggestionsFieldActivate=()=>{!this.suggestions||this.panel||this.isOpen||this.openSuggestions()};this.handleSuggestionsFocusOut=()=>{requestAnimationFrame(()=>{this.matches(":focus-within")||this.closeSuggestions()})};this.handleSuggestionsInput=()=>{!this.suggestions||this.panel||(this.highlightedIndex=-1,this.isOpen||this.openSuggestions())};this.handleSuggestionsKeydown=e=>{if(!(!this.suggestions||this.panel))switch(e.key){case"ArrowDown":{e.preventDefault(),this.isOpen||this.openSuggestions(),this.filteredOptions.length&&(this.highlightedIndex=Math.min(this.highlightedIndex+1,this.filteredOptions.length-1));break}case"ArrowUp":{e.preventDefault(),this.isOpen||this.openSuggestions(),this.filteredOptions.length&&(this.highlightedIndex=Math.max(this.highlightedIndex-1,0));break}case"Enter":{let t=this.filteredOptions[this.highlightedIndex];t&&(e.preventDefault(),this.handleSelect(t));break}default:break}};this.handleSuggestionsPopoverToggle=e=>{if(e.newState==="open"){this.isOpen=!0,this.fieldWrapperEl&&this.listboxEl&&this.anchorFloatingElement(this.fieldWrapperEl,this.listboxEl,{forceFallback:u}),this.observeAnchorVisibility(this.fieldWrapperEl,()=>this.closeSuggestions());return}if(this.fieldPointerDownAt!==void 0&&performance.now()-this.fieldPointerDownAt<i.FIELD_POINTER_DOWN_WINDOW_MS){this.fieldPointerDownAt=void 0,this.openSuggestions();return}this.isOpen=!1,this.highlightedIndex=-1,this.unanchorFloatingElement(),this.unobserveAnchorVisibility()};this.handleShortcut=e=>{!this.shortcut||this.disabled||(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="k"&&(e.preventDefault(),this.panel?this.openPanel():this.focus())}}connectedCallback(){super.connectedCallback?.(),window.addEventListener("keydown",this.handleShortcut),this.optionsObserver.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["value","label"]})}disconnectedCallback(){window.removeEventListener("keydown",this.handleShortcut),this.optionsObserver.disconnect(),super.disconnectedCallback?.()}willUpdate(e){super.willUpdate(e),this.type!=="search"&&(this.type="search")}focusTarget(){if(this.panel){let[e]=this.triggerSlot?.assignedElements()??[];return e instanceof HTMLElement?e:this.triggerEl}return super.focusTarget()}openPanel(){this.modalEl?.show()}closePanel(){this.modalEl?.hide()}firstUpdated(e){super.firstUpdated(e);let t=this.shadowRoot?.getElementById("field");t&&(t.addEventListener("pointerdown",this.handleFieldPointerDown),t.addEventListener("focus",this.handleSuggestionsFieldActivate),t.addEventListener("click",this.handleSuggestionsFieldActivate),t.addEventListener("input",this.handleSuggestionsInput),t.addEventListener("keydown",this.handleSuggestionsKeydown),this.addEventListener("focusout",this.handleSuggestionsFocusOut))}get options(){return L(this.children)}get effectiveQuery(){return(this.value??"").trim().toLowerCase()}get filteredOptions(){let e=this.effectiveQuery;return!e||this.filter==="none"?this.options:this.options.filter(t=>t.label.toLowerCase().includes(e))}openSuggestions(){if(this.disabled||this.readonly){this.fieldPointerDownAt=void 0;return}let e=this.listboxEl;this.listboxAnimation?.cancel(),this.listboxAnimation=void 0,e?.matches(":popover-open")||e?.showPopover(),e&&this.playListboxOpenAnimation(e)}static listboxAnimationDuration(e){return window.matchMedia("(prefers-reduced-motion: reduce)").matches?0:O(e,"--field-listbox-transition-duration","m",200)}playListboxOpenAnimation(e){e.style.removeProperty("pointer-events");let t=i.listboxAnimationDuration(e);t!==0&&(this.listboxAnimation=e.animate([{opacity:0,transform:"scaleY(0.01)"},{opacity:1,transform:"scaleY(1)"}],{duration:t,easing:c(e),fill:"forwards"}))}closeSuggestions(){let e=this.listboxEl;this.listboxAnimation?.cancel(),this.listboxAnimation=void 0,e?.matches(":popover-open")&&this.playListboxCloseAnimation(e)}playListboxCloseAnimation(e){e.style.pointerEvents="none";let t=i.listboxAnimationDuration(e);if(t===0){e.hidePopover();return}let n=e.animate([{opacity:1,transform:"scaleY(1)"},{opacity:0,transform:"scaleY(0.01)"}],{duration:t,easing:c(e),fill:"forwards"});this.listboxAnimation=n,n.finished.then(()=>{this.listboxAnimation===n&&(this.listboxAnimation=void 0),e.hidePopover()}).catch(()=>{})}handleSelect(e){this.value=e.label,this.dispatchEvent(new x(this.value)),this.dispatchEvent(new I(e.value)),this.closeSuggestions()}renderSuggestionOptionRows(e){let t=this.effectiveQuery;return T(e,(n,p)=>o`
|
|
142
144
|
<li
|
|
143
145
|
id="listbox-option-${p}"
|
|
144
146
|
role="option"
|
|
145
|
-
aria-selected=${
|
|
146
|
-
class=${v({highlighted:p===this.highlightedIndex,selected:
|
|
147
|
-
@mousedown=${$=>{$.preventDefault(),this.handleSelect(
|
|
147
|
+
aria-selected=${n.label.toLowerCase()===t}
|
|
148
|
+
class=${v({highlighted:p===this.highlightedIndex,selected:n.label.toLowerCase()===t})}
|
|
149
|
+
@mousedown=${$=>{$.preventDefault(),this.handleSelect(n)}}
|
|
148
150
|
@mouseenter=${()=>{this.highlightedIndex=p}}
|
|
149
151
|
>
|
|
150
|
-
${
|
|
152
|
+
${k(n.label,t)}
|
|
151
153
|
</li>
|
|
152
154
|
`)}renderSuggestionsListbox(){return o`
|
|
153
155
|
<ul
|
|
@@ -168,30 +170,34 @@ import{b as g}from"./chunks/chunk-BVASCT2V.js";import{a as A,b as L,c as k}from"
|
|
|
168
170
|
variant="spinner"
|
|
169
171
|
size="16"
|
|
170
172
|
label=${this.loadingLabel}
|
|
171
|
-
></eun-loader>`:e?
|
|
173
|
+
></eun-loader>`:e?l:this.panel?o`<kbd id="shortcut-hint" aria-hidden="true">Esc</kbd>`:this.shortcut?o`<kbd id="shortcut-hint" aria-hidden="true"
|
|
172
174
|
>${this.shortcutLabel}</kbd
|
|
173
|
-
>`:
|
|
175
|
+
>`:l}hasTrailingAddon(){return this.loading||this.panel||this.shortcut}renderTriggerIndicator(){return this.shortcut?o`<kbd id="shortcut-hint" aria-hidden="true"
|
|
174
176
|
>${this.shortcutLabel}</kbd
|
|
175
|
-
>`:
|
|
177
|
+
>`:l}updated(e){super.updated(e);let t=this.shadowRoot?.getElementById("field");t&&(this.shortcut&&!this.panel?t.hasAttribute("aria-keyshortcuts")||t.setAttribute("aria-keyshortcuts","Control+K Meta+K"):t.removeAttribute("aria-keyshortcuts"),this.panel?t.hasAttribute("autofocus")||t.setAttribute("autofocus",""):t.removeAttribute("autofocus"),this.syncSuggestionsAria(t))}syncSuggestionsAria(e){if(!this.suggestions||this.panel){e.removeAttribute("role"),e.removeAttribute("aria-expanded"),e.removeAttribute("aria-controls"),e.removeAttribute("aria-autocomplete"),e.removeAttribute("aria-activedescendant");return}e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",this.isOpen?"true":"false"),e.setAttribute("aria-controls","listbox"),this.highlightedIndex>=0?e.setAttribute("aria-activedescendant",`listbox-option-${this.highlightedIndex}`):e.removeAttribute("aria-activedescendant")}render(){if(!this.panel)return super.render();let e=this.renderDescription();return o`
|
|
176
178
|
<div id="wrapper">
|
|
177
179
|
${this.renderFormLabels("search-trigger")}
|
|
178
|
-
<
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
180
|
+
<slot name="trigger" @click=${this.handleTriggerClick}>
|
|
181
|
+
<button
|
|
182
|
+
id="search-trigger"
|
|
183
|
+
part="trigger"
|
|
184
|
+
type="button"
|
|
185
|
+
aria-haspopup="dialog"
|
|
186
|
+
aria-label=${d(this.label)}
|
|
187
|
+
aria-keyshortcuts=${d(this.shortcut?"Control+K Meta+K":void 0)}
|
|
188
|
+
?disabled=${this.disabled}
|
|
189
|
+
>
|
|
190
|
+
${this.icon?o`<eun-icon
|
|
191
|
+
id="trigger-icon"
|
|
192
|
+
name=${this.icon}
|
|
193
|
+
size="16"
|
|
194
|
+
></eun-icon>`:l}
|
|
195
|
+
<span id="trigger-text" class="empty"
|
|
196
|
+
>${this.placeholder||""}</span
|
|
197
|
+
>
|
|
198
|
+
${this.renderTriggerIndicator()}
|
|
199
|
+
</button>
|
|
200
|
+
</slot>
|
|
195
201
|
<eun-modal
|
|
196
202
|
id="panel"
|
|
197
203
|
kind="search"
|
|
@@ -200,7 +206,7 @@ import{b as g}from"./chunks/chunk-BVASCT2V.js";import{a as A,b as L,c as k}from"
|
|
|
200
206
|
aria-label=${this.label||(this.panelLabel??this.dictionary.search.panel)}
|
|
201
207
|
>
|
|
202
208
|
<div id="panel-field">
|
|
203
|
-
${this.renderField(e!==
|
|
209
|
+
${this.renderField(e!==l)}
|
|
204
210
|
</div>
|
|
205
211
|
<div id="panel-results">
|
|
206
212
|
<slot name="results"></slot>
|
|
@@ -208,4 +214,4 @@ import{b as g}from"./chunks/chunk-BVASCT2V.js";import{a as A,b as L,c as k}from"
|
|
|
208
214
|
</eun-modal>
|
|
209
215
|
${e}
|
|
210
216
|
</div>
|
|
211
|
-
`}};i.styles=[g.styles,
|
|
217
|
+
`}};i.styles=[g.styles,w,...u?[]:[A],D],i.FIELD_POINTER_DOWN_WINDOW_MS=100,r([s({reflect:!0,converter:{toAttribute:()=>null}})],i.prototype,"type",2),r([s()],i.prototype,"icon",2),r([s({converter:m})],i.prototype,"clearable",2),r([s({type:Boolean})],i.prototype,"shortcut",2),r([s({type:Boolean})],i.prototype,"panel",2),r([s({attribute:"panel-label"})],i.prototype,"panelLabel",2),r([s({type:Boolean,reflect:!0})],i.prototype,"loading",2),r([s({attribute:"loading-label"})],i.prototype,"loadingLabel",2),r([s({type:Boolean,reflect:!0})],i.prototype,"suggestions",2),r([s({attribute:"no-results-label"})],i.prototype,"noResultsLabel",2),r([s()],i.prototype,"filter",2),r([h()],i.prototype,"isOpen",2),r([h()],i.prototype,"highlightedIndex",2),r([a("#panel")],i.prototype,"modalEl",2),r([a("#field-wrapper")],i.prototype,"fieldWrapperEl",2),r([a('slot[name="trigger"]')],i.prototype,"triggerSlot",2),r([a("#search-trigger")],i.prototype,"triggerEl",2),r([a("#listbox")],i.prototype,"listboxEl",2),i=r([f(P)],i);export{i as EunomiaSearch,P as EunomiaSearchTagName};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as P,b as V,c as B}from"./chunks/chunk-GWLD2I3P.js";import{a as A}from"./chunks/chunk-UVHVQRPT.js";import{a as R,b as H}from"./chunks/chunk-AH2SKZ7T.js";import{a as D}from"./chunks/chunk-LK5BJ4SH.js";import{a as E}from"./chunks/chunk-WIUERJII.js";import{a as F}from"./chunks/chunk-QSZO4GIH.js";import{b as N,c as g}from"./chunks/chunk-624VJYNA.js";import{a as b}from"./chunks/chunk-LYYQAALT.js";import{a as k}from"./chunks/chunk-GVS6IUKC.js";import{a as C}from"./chunks/chunk-P6LGU3FT.js";import{a as T}from"./chunks/chunk-BO3JOEWM.js";import{c as $,d as I,e as O,f as u}from"./chunks/chunk-TLBXTBMM.js";import{a as f}from"./chunks/chunk-YYCEPZUN.js";import{a as M}from"./chunks/chunk-3BMACIDO.js";import{a as p}from"./chunks/chunk-PPCHQG7P.js";import{a as d}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js";import{a as w}from"./chunks/chunk-62RLISRD.js";import"./chunks/chunk-QL5GSW2A.js";import{a as n,f as x,h as y,j as r,k as h,l as c,n as m,p as o,r as l,u as L}from"./chunks/chunk-YITWLCD3.js";var z=y`
|
|
2
2
|
#field {
|
|
3
3
|
padding-inline-end: calc(var(--eun-space-l, 32px) * 1.2);
|
|
4
4
|
}
|
|
@@ -105,7 +105,7 @@ import{a as H,b as P,c as R}from"./chunks/chunk-GWLD2I3P.js";import{a as A}from"
|
|
|
105
105
|
outline-offset: 2px;
|
|
106
106
|
border-radius: var(--eun-border-radius-m);
|
|
107
107
|
}
|
|
108
|
-
`,
|
|
108
|
+
`,W=[F,R,...b?[]:[H],z];var q="eun-select",K=M(O(L)),Q=w(D(C(E(k(T(I(A($(K))))))))),t=class extends Q{constructor(){super(...arguments);this.errorOnChange=!0;this.searchable=!1;this.native=!1;this.multiple=!1;this.noAnimation=!1;this.searchPlaceholder="Search\u2026";this.selectPlaceholder="Select\u2026";this.noResultsLabel="No results";this.loading=!1;this.loadingLabel="Loading\u2026";this.searchQuery="";this.isOpen=!1;this.highlightedIndex=-1;this.typeaheadBuffer="";this.handleIconSlotChange=()=>{this.requestUpdate()};this.handleActionsSlotChange=()=>{this.requestUpdate()};this.handleHostFocus=()=>{this.fieldEl?.focus()};this.handleWindowBlur=()=>{this.isOpen&&this.closeListbox()};this.handleFocusOut=()=>{this.isOpen&&requestAnimationFrame(()=>{this.matches(":focus-within")||this.closeListbox()})};this.handleFieldPointerDown=()=>{this.fieldPointerDownAt=performance.now()};this.handlePopoverToggle=e=>{if(e.newState==="open"){this.isOpen=!0,this.fieldWrapperEl&&this.listboxEl&&this.anchorFloatingElement(this.fieldWrapperEl,this.listboxEl,{forceFallback:b}),this.observeAnchorVisibility(this.fieldWrapperEl,()=>this.closeListbox());return}if(this.fieldPointerDownAt!==void 0&&performance.now()-this.fieldPointerDownAt<t.FIELD_POINTER_DOWN_WINDOW_MS){this.fieldPointerDownAt=void 0,this.openListbox();return}this.isOpen=!1,this.searchQuery=this.selectedLabel,this.highlightedIndex=-1,this.unanchorFloatingElement(),this.unobserveAnchorVisibility(),this.readonlyAvailable&&this.editing&&this.cancelEdit()};this.handleConfirmClick=()=>{this.closeListbox(),this.confirmEdit()}}get defaultValue(){return super.defaultValue}set defaultValue(e){let i=this.hasAttribute("multiple")&&typeof e=="string"?e.split(",").filter(Boolean):e;super.defaultValue=i}get value(){return super.value}set value(e){let i=this.hasAttribute("multiple")&&typeof e=="string"?e.split(",").filter(Boolean):e;super.value=i}connectedCallback(){super.connectedCallback?.(),this.addEventListener("focus",this.handleHostFocus),window.addEventListener("blur",this.handleWindowBlur)}disconnectedCallback(){this.removeEventListener("focus",this.handleHostFocus),window.removeEventListener("blur",this.handleWindowBlur),clearTimeout(this.typeaheadTimer),super.disconnectedCallback?.()}get options(){return P(this.children)}get selectedValues(){return this.multiple?this.value??[]:this.value?[this.value]:[]}isSelected(e){return this.selectedValues.includes(e.value)}get selectedLabel(){let e=this.selectedValues;return this.options.filter(i=>e.includes(i.value)).map(i=>i.label).join(", ")}get hasConfirmSlot(){return this.querySelector('[slot="confirm"]')!==null}get hasConfirmContent(){return this.hasConfirmSlot||!!(this.confirmLabel??this.dictionary.common.confirm)}get effectiveQuery(){if(!this.searchable)return"";let e=this.searchQuery.trim().toLowerCase();return e&&e!==this.selectedLabel.toLowerCase()?e:""}get filteredOptions(){let e=this.effectiveQuery;return e?this.options.filter(i=>i.label.toLowerCase().includes(e)):this.options}get effectivePlaceholder(){return this.placeholder??(this.searchable?this.searchPlaceholder:this.selectPlaceholder)}willUpdate(e){super.willUpdate(e),e.has("value")&&this.searchable&&!this.isOpen&&(this.searchQuery=this.selectedLabel)}firstUpdated(e){super.firstUpdated(e),this.syncOptions()}updated(e){super.updated(e),e.has("editing")&&this.editing&&(this.native?(this.syncOptions(),this.fieldEl?.focus()):this.openListbox()),this.native&&(e.has("value")&&this.fieldEl instanceof HTMLSelectElement&&(this.fieldEl.value=this.value??""),(e.has("readonly")||e.has("disabled"))&&(this.disabled||this.readonly?this.setAttribute("tabindex","-1"):this.removeAttribute("tabindex")))}get hostTabStop(){return!1}getFocusAnchor(){return this.fieldEl??void 0}focus(){super.focus?.(),this.fieldEl?.focus()}openListbox(){if(this.disabled||this.readonly){this.fieldPointerDownAt=void 0;return}let e=this.listboxEl;this.listboxAnimation?.cancel(),this.listboxAnimation=void 0,e?.matches(":popover-open")||e?.showPopover(),e&&this.playListboxOpenAnimation(e),this.fieldEl?.focus(),this.fieldEl instanceof HTMLInputElement&&this.fieldEl.select()}listboxAnimationDuration(e){return this.noAnimation||window.matchMedia("(prefers-reduced-motion: reduce)").matches?0:N(e,"--field-listbox-transition-duration","m",200)}playListboxOpenAnimation(e){e.style.removeProperty("pointer-events");let i=this.listboxAnimationDuration(e);i!==0&&(this.listboxAnimation=e.animate([{opacity:0,transform:"scaleY(0.01)"},{opacity:1,transform:"scaleY(1)"}],{duration:i,easing:g(e),fill:"forwards"}))}closeListbox(){let e=this.listboxEl;this.listboxAnimation?.cancel(),this.listboxAnimation=void 0,e?.matches(":popover-open")&&this.playListboxCloseAnimation(e)}playListboxCloseAnimation(e){e.style.pointerEvents="none";let i=this.listboxAnimationDuration(e);if(i===0){e.hidePopover();return}let s=e.animate([{opacity:1,transform:"scaleY(1)"},{opacity:0,transform:"scaleY(0.01)"}],{duration:i,easing:g(e),fill:"forwards"});this.listboxAnimation=s,s.finished.then(()=>{this.listboxAnimation===s&&(this.listboxAnimation=void 0),e.hidePopover()}).catch(()=>{})}handleFieldActivate(){this.isOpen||this.openListbox()}handleFieldInput(e){this.searchable&&(this.searchQuery=e.target.value,this.highlightedIndex=-1,this.isOpen||this.openListbox())}handleSelect(e){if(this.multiple){let i=this.selectedValues;this.value=i.includes(e.value)?i.filter(s=>s!==e.value):[...i,e.value],this.dispatchEvent(new f(this.value));return}this.value=e.value,this.dispatchEvent(new f(this.value)),this.closeListbox(),this.readonlyAvailable&&this.confirmEdit()}handleNativeChange(e){this.value=e.target.value,this.dispatchEvent(new f(this.value)),this.readonlyAvailable&&this.confirmEdit()}syncOptions(){if(!this.native||!(this.fieldEl instanceof HTMLSelectElement))return;let e=Array.from(this.children).filter(i=>i instanceof HTMLOptionElement||i instanceof HTMLOptGroupElement);this.fieldEl.replaceChildren(...e.map(i=>i.cloneNode(!0))),this.fieldEl.value=this.value??""}handleSlotChange(){this.syncOptions()}handleKeydown(e){switch(e.key){case"ArrowDown":{e.preventDefault(),this.isOpen||this.openListbox();let i=this.filteredOptions;i.length&&(this.highlightedIndex=Math.min(this.highlightedIndex+1,i.length-1));break}case"ArrowUp":{e.preventDefault(),this.isOpen||this.openListbox(),this.filteredOptions.length&&(this.highlightedIndex=Math.max(this.highlightedIndex-1,0));break}case"Home":{if(this.searchable)return;e.preventDefault(),this.isOpen||this.openListbox(),this.filteredOptions.length&&(this.highlightedIndex=0);break}case"End":{if(this.searchable)return;e.preventDefault(),this.isOpen||this.openListbox();let i=this.filteredOptions;i.length&&(this.highlightedIndex=i.length-1);break}case"Enter":{e.preventDefault();let i=this.filteredOptions[this.highlightedIndex];i&&this.handleSelect(i);break}case" ":{if(this.searchable||this.typeaheadBuffer){this.searchable||this.handleTypeahead(e);break}if(e.preventDefault(),!this.isOpen){this.openListbox();break}let i=this.filteredOptions[this.highlightedIndex];i&&this.handleSelect(i);break}default:this.searchable||this.handleTypeahead(e);break}}handleTypeahead(e){if(e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;e.preventDefault(),this.isOpen||this.openListbox();let i=this.filteredOptions;if(!i.length)return;clearTimeout(this.typeaheadTimer),this.typeaheadBuffer+=e.key.toLowerCase(),this.typeaheadTimer=setTimeout(()=>{this.typeaheadBuffer=""},600);let s=(this.highlightedIndex+1)%i.length,a=[...i.slice(s),...i.slice(0,s)].findIndex(v=>v.label.toLowerCase().startsWith(this.typeaheadBuffer));a!==-1&&(this.highlightedIndex=(s+a)%i.length)}renderHighlighted(e){return V(e,this.effectiveQuery)}renderOptionRows(e){return B(e,(i,s)=>{let a=this.isSelected(i);return o`
|
|
109
109
|
<li
|
|
110
110
|
id="listbox-option-${s}"
|
|
111
111
|
role="option"
|
|
@@ -234,4 +234,4 @@ import{a as H,b as P,c as R}from"./chunks/chunk-GWLD2I3P.js";import{a as A}from"
|
|
|
234
234
|
${a} ${i}
|
|
235
235
|
<slot hidden @slotchange=${this.handleSlotChange}></slot>
|
|
236
236
|
</div>
|
|
237
|
-
`}};t.styles=[
|
|
237
|
+
`}};t.styles=[W,u.base,u.errorMessages,u.hintMessages],t.FIELD_POINTER_DOWN_WINDOW_MS=100,n([r({attribute:"default-value"})],t.prototype,"defaultValue",1),n([r()],t.prototype,"value",1),n([r({type:Boolean,reflect:!0})],t.prototype,"searchable",2),n([r({type:Boolean,reflect:!0})],t.prototype,"native",2),n([r({type:Boolean,reflect:!0})],t.prototype,"multiple",2),n([r({type:Boolean,reflect:!0,attribute:"no-animation"})],t.prototype,"noAnimation",2),n([r()],t.prototype,"icon",2),n([r()],t.prototype,"placeholder",2),n([r({attribute:"search-placeholder"})],t.prototype,"searchPlaceholder",2),n([r({attribute:"select-placeholder"})],t.prototype,"selectPlaceholder",2),n([r({attribute:"empty-value-label"})],t.prototype,"emptyValueLabel",2),n([r({attribute:"no-results-label"})],t.prototype,"noResultsLabel",2),n([r({attribute:"confirm-label"})],t.prototype,"confirmLabel",2),n([r({type:Boolean,reflect:!0})],t.prototype,"loading",2),n([r({attribute:"loading-label"})],t.prototype,"loadingLabel",2),n([h()],t.prototype,"searchQuery",2),n([h()],t.prototype,"isOpen",2),n([h()],t.prototype,"highlightedIndex",2),n([c("#field")],t.prototype,"fieldEl",2),n([c("#field-wrapper")],t.prototype,"fieldWrapperEl",2),n([c("#listbox")],t.prototype,"listboxEl",2),n([m({slot:"icon"})],t.prototype,"iconSlotEls",2),n([m({slot:"actions"})],t.prototype,"actionsSlotEls",2),t=n([x(q)],t);export{t as EunomiaSelect,q as EunomiaSelectTagName};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as w}from"./chunks/chunk-624VJYNA.js";import{a as d}from"./chunks/chunk-YYCEPZUN.js";import{a as z,b as P}from"./chunks/chunk-BKZGTCMF.js";import{a as u}from"./chunks/chunk-PPCHQG7P.js";import{a as g}from"./chunks/chunk-6TIEBY34.js";import{a as y}from"./chunks/chunk-62RLISRD.js";import"./chunks/chunk-QL5GSW2A.js";import{a as r,f as m,g as b,h as f,j as a,k as h,l as c,p as s,r as l,u as x}from"./chunks/chunk-YITWLCD3.js";var _=f`
|
|
2
2
|
:host {
|
|
3
3
|
--_width: var(--sidebar-width, 280px);
|
|
4
4
|
--_miniWidth: var(--sidebar-mini-width, 64px);
|
|
@@ -8,6 +8,14 @@ import{a as p}from"./chunks/chunk-YYCEPZUN.js";import{a as m}from"./chunks/chunk
|
|
|
8
8
|
--sidebar-border-color,
|
|
9
9
|
var(--eun-border-color, #dee0e7)
|
|
10
10
|
);
|
|
11
|
+
--_toggleColor: var(
|
|
12
|
+
--sidebar-toggle-color,
|
|
13
|
+
var(--eun-text-secondary, #484e61)
|
|
14
|
+
);
|
|
15
|
+
--_toggleBackgroundHover: var(
|
|
16
|
+
--sidebar-toggle-background-hover,
|
|
17
|
+
var(--eun-content-hover, #edeff0)
|
|
18
|
+
);
|
|
11
19
|
--_paddingBlock: var(
|
|
12
20
|
--sidebar-padding,
|
|
13
21
|
var(--sidebar-padding-block, var(--eun-space-m, 16px))
|
|
@@ -34,6 +42,25 @@ import{a as p}from"./chunks/chunk-YYCEPZUN.js";import{a as m}from"./chunks/chunk
|
|
|
34
42
|
:host([dragging]) {
|
|
35
43
|
transition: none;
|
|
36
44
|
}
|
|
45
|
+
:host([theme="dark"]) {
|
|
46
|
+
--_background: var(
|
|
47
|
+
--sidebar-background,
|
|
48
|
+
var(--eun-surface-inverse, #0b1620)
|
|
49
|
+
);
|
|
50
|
+
--_color: var(--sidebar-color, var(--eun-text-on-inverse, #f5f7fa));
|
|
51
|
+
--_borderColor: var(
|
|
52
|
+
--sidebar-border-color,
|
|
53
|
+
color-mix(in srgb, var(--_color) 16%, transparent)
|
|
54
|
+
);
|
|
55
|
+
--_toggleColor: var(
|
|
56
|
+
--sidebar-toggle-color,
|
|
57
|
+
color-mix(in srgb, var(--_color) 75%, transparent)
|
|
58
|
+
);
|
|
59
|
+
--_toggleBackgroundHover: var(
|
|
60
|
+
--sidebar-toggle-background-hover,
|
|
61
|
+
color-mix(in srgb, var(--_color) 12%, transparent)
|
|
62
|
+
);
|
|
63
|
+
}
|
|
37
64
|
:host([position="end"]) {
|
|
38
65
|
border-inline-end: none;
|
|
39
66
|
border-inline-start: var(--eun-border-width-s, 1px) solid
|
|
@@ -46,10 +73,6 @@ import{a as p}from"./chunks/chunk-YYCEPZUN.js";import{a as m}from"./chunks/chunk
|
|
|
46
73
|
--_width: 0px;
|
|
47
74
|
border-color: transparent;
|
|
48
75
|
}
|
|
49
|
-
:host([dragged-hidden]) {
|
|
50
|
-
--_width: 0px !important;
|
|
51
|
-
border-color: transparent !important;
|
|
52
|
-
}
|
|
53
76
|
|
|
54
77
|
#surface {
|
|
55
78
|
box-sizing: border-box;
|
|
@@ -101,20 +124,20 @@ import{a as p}from"./chunks/chunk-YYCEPZUN.js";import{a as m}from"./chunks/chunk
|
|
|
101
124
|
inset-inline-end: -4px;
|
|
102
125
|
z-index: 0;
|
|
103
126
|
width: 8px;
|
|
104
|
-
cursor: ew-resize;
|
|
105
127
|
touch-action: none;
|
|
106
128
|
background: transparent;
|
|
107
|
-
transition: background-color var(--eun-duration-s, 150ms)
|
|
108
|
-
var(--eun-easing-default, ease);
|
|
109
129
|
}
|
|
110
130
|
:host([position="end"]) #resize-handle {
|
|
111
131
|
inset-inline-end: auto;
|
|
112
132
|
inset-inline-start: -4px;
|
|
113
133
|
}
|
|
114
|
-
#resize-handle
|
|
134
|
+
#resize-handle.armed,
|
|
115
135
|
#resize-handle:focus-visible {
|
|
136
|
+
cursor: ew-resize;
|
|
116
137
|
background: var(--eun-color-primary-500, #3d6fff);
|
|
117
138
|
opacity: 0.35;
|
|
139
|
+
transition: background-color var(--eun-duration-s, 150ms)
|
|
140
|
+
var(--eun-easing-default, ease);
|
|
118
141
|
}
|
|
119
142
|
#resize-handle:focus-visible {
|
|
120
143
|
outline: none;
|
|
@@ -138,17 +161,25 @@ import{a as p}from"./chunks/chunk-YYCEPZUN.js";import{a as m}from"./chunks/chunk
|
|
|
138
161
|
background: var(--_background);
|
|
139
162
|
border: var(--eun-border-width-s, 1px) solid var(--_borderColor);
|
|
140
163
|
border-radius: var(--eun-border-radius-xl, 999px);
|
|
141
|
-
color: var(--
|
|
164
|
+
color: var(--_toggleColor);
|
|
142
165
|
cursor: pointer;
|
|
143
|
-
|
|
144
|
-
|
|
166
|
+
outline: 2px solid transparent;
|
|
167
|
+
transition:
|
|
168
|
+
background-color var(--eun-duration-s, 150ms)
|
|
169
|
+
var(--eun-easing-default, ease),
|
|
170
|
+
outline var(--eun-duration-m, 200ms) var(--eun-easing-out, ease-out);
|
|
145
171
|
}
|
|
146
172
|
:host([position="end"]) #collapse-toggle:not(.inline) {
|
|
147
173
|
inset-inline-end: auto;
|
|
148
174
|
inset-inline-start: -14px;
|
|
149
175
|
}
|
|
150
176
|
#collapse-toggle:not(.inline):hover {
|
|
151
|
-
background:
|
|
177
|
+
background:
|
|
178
|
+
linear-gradient(
|
|
179
|
+
var(--_toggleBackgroundHover),
|
|
180
|
+
var(--_toggleBackgroundHover)
|
|
181
|
+
),
|
|
182
|
+
var(--_background);
|
|
152
183
|
}
|
|
153
184
|
|
|
154
185
|
#collapse-toggle.inline {
|
|
@@ -162,16 +193,19 @@ import{a as p}from"./chunks/chunk-YYCEPZUN.js";import{a as m}from"./chunks/chunk
|
|
|
162
193
|
border-top: var(--eun-border-width-s, 1px) solid var(--_borderColor);
|
|
163
194
|
border-radius: 0;
|
|
164
195
|
background: transparent;
|
|
165
|
-
color: var(--
|
|
196
|
+
color: var(--_toggleColor);
|
|
166
197
|
font: inherit;
|
|
167
198
|
font-size: var(--eun-font-size-s, 14px);
|
|
168
199
|
text-align: start;
|
|
169
200
|
cursor: pointer;
|
|
170
|
-
|
|
171
|
-
|
|
201
|
+
outline: 2px solid transparent;
|
|
202
|
+
transition:
|
|
203
|
+
background-color var(--eun-duration-s, 150ms)
|
|
204
|
+
var(--eun-easing-default, ease),
|
|
205
|
+
outline var(--eun-duration-m, 200ms) var(--eun-easing-out, ease-out);
|
|
172
206
|
}
|
|
173
207
|
#collapse-toggle.inline:hover {
|
|
174
|
-
background: var(--
|
|
208
|
+
background: var(--_toggleBackgroundHover);
|
|
175
209
|
}
|
|
176
210
|
#collapse-toggle-label {
|
|
177
211
|
overflow: hidden;
|
|
@@ -188,16 +222,24 @@ import{a as p}from"./chunks/chunk-YYCEPZUN.js";import{a as m}from"./chunks/chunk
|
|
|
188
222
|
}
|
|
189
223
|
|
|
190
224
|
#collapse-toggle:focus-visible {
|
|
191
|
-
outline:
|
|
225
|
+
outline-color: var(--eun-color-primary-500, #3d6fff);
|
|
192
226
|
outline-offset: 1px;
|
|
193
227
|
}
|
|
228
|
+
#collapse-toggle.inline:focus-visible {
|
|
229
|
+
outline-offset: -2px;
|
|
230
|
+
outline-color: var(--eun-color-primary-500, #3d6fff);
|
|
231
|
+
border-start-start-radius: var(--eun-border-radius-m, 8px);
|
|
232
|
+
border-start-end-radius: var(--eun-border-radius-m, 8px);
|
|
233
|
+
background: var(--_toggleBackgroundHover);
|
|
234
|
+
}
|
|
194
235
|
|
|
195
236
|
@media (prefers-reduced-motion: reduce) {
|
|
196
237
|
:host {
|
|
197
238
|
transition: none;
|
|
198
239
|
}
|
|
199
240
|
}
|
|
200
|
-
`,
|
|
241
|
+
`,T=b(Object.keys(z).map(p=>`@media ${P(p)} { :host([hide-below="${p}"]) { display: none; } }`).join(`
|
|
242
|
+
`)),k=[_,T];var W="eun-sidebar",t=class extends y(x){constructor(){super(...arguments);this.position="start";this.theme="light";this.collapsible=!0;this.togglePlacement="edge";this.collapseMode="mini";this.collapsed=!1;this.resizable=!0;this.dragStartWidth=0;this.lastRawWidth=0;this.dragStartCollapsed=!1;this.dragMoved=!1;this.dragging=!1;this.resizeHandleArmed=!1;this.focusWasInsideBeforeHiddenCollapse=!1;this.handleResizePointerEnter=()=>{this.disarmResizeHandle();let e=w(getComputedStyle(this).getPropertyValue("--sidebar-resize-handle-delay"))??100;if(e===0){this.resizeHandleArmed=!0;return}this.resizeHandleArmTimer=setTimeout(()=>{this.resizeHandleArmTimer=void 0,this.resizeHandleArmed=!0},e)};this.handleResizePointerLeave=()=>{this.disarmResizeHandle()};this.handleResizePointerDown=e=>{if(!(e.pointerType==="mouse"&&e.button!==0)){this.resizeHandleArmTimer!==void 0&&(clearTimeout(this.resizeHandleArmTimer),this.resizeHandleArmTimer=void 0),this.resizeHandleArmed=!0;try{this.resizeHandleEl?.setPointerCapture(e.pointerId)}catch{}this.dragStartX=e.clientX,this.dragStartWidth=this.currentWidthPx(),this.dragStartCollapsed=this.collapsed,this.lastRawWidth=this.dragStartWidth,this.dragMoved=!1}};this.handleResizePointerMove=e=>{if(this.dragStartX===void 0)return;this.dragging=!0,this.dragMoved=!0;let o=e.clientX-this.dragStartX,i=this.position==="start"?o:-o;this.lastRawWidth=this.dragStartWidth+i,this.applyWidth(this.lastRawWidth,this.collapseMode==="hidden"?0:this.miniWidthPx())};this.handleResizePointerUp=e=>{if(this.dragStartX!==void 0){try{this.resizeHandleEl?.releasePointerCapture(e.pointerId)}catch{}this.dragStartX=void 0,this.dragging=!1,this.dragMoved&&this.settleWidth(this.lastRawWidth,this.dragStartCollapsed)}};this.handleResizeKeydown=e=>{let i;switch(e.key){case"ArrowLeft":i=this.currentWidthPx()+(this.position==="start"?-16:16);break;case"ArrowRight":i=this.currentWidthPx()+(this.position==="start"?16:-16);break;case"Home":i=this.miniWidthPx();break;case"End":i=this.maxWidthPx();break;default:return}e.preventDefault();let n=this.collapsed;this.applyWidth(i),this.settleCollapsedState(i,n)}}willUpdate(e){super.willUpdate(e),e.has("collapsed")&&this.collapsed&&this.collapseMode==="hidden"&&(this.focusWasInsideBeforeHiddenCollapse=!!(document.activeElement&&this.contains(document.activeElement)))}updated(e){super.updated(e),e.has("collapsed")&&this.collapsed&&this.collapseMode==="hidden"&&this.focusWasInsideBeforeHiddenCollapse&&(this.focusWasInsideBeforeHiddenCollapse=!1,this.collapseToggleEl?.focus())}disconnectedCallback(){super.disconnectedCallback(),this.disarmResizeHandle()}collapse(){this.setCollapsed(!0)}expand(){this.setCollapsed(!1)}toggleCollapse(){this.setCollapsed(!this.collapsed)}setCollapsed(e){this.collapsed!==e&&(this.collapsed=e,this.dispatchEvent(new d))}forgetResizedWidth(){this.style.removeProperty("--sidebar-width"),this.liveWidthPx=void 0}resolvedPx(e,o){let i=getComputedStyle(this).getPropertyValue(e).trim(),n=Number.parseFloat(i);return Number.isNaN(n)?o:n}miniWidthPx(){return this.resolvedPx("--sidebar-mini-width",64)}maxWidthPx(){return this.resolvedPx("--sidebar-max-width",480)}currentWidthPx(){return this.collapsed&&this.collapseMode==="hidden"?0:this.collapsed&&this.collapseMode==="mini"?this.miniWidthPx():this.liveWidthPx??this.resolvedPx("--sidebar-width",280)}applyWidth(e,o=this.miniWidthPx()){let i=Math.min(Math.max(e,o),this.maxWidthPx());this.collapsed=!1,this.style.setProperty("--sidebar-width",`${i}px`),this.liveWidthPx=i}settleCollapsedState(e,o){let i=this.collapseMode==="mini"&&e<=this.miniWidthPx();i&&this.forgetResizedWidth(),this.collapsed=i,i!==o&&this.dispatchEvent(new d)}settleWidth(e,o){let i=this.miniWidthPx(),n=e<i;if(n)this.forgetResizedWidth();else{let v=Math.min(e,this.maxWidthPx());this.style.setProperty("--sidebar-width",`${v}px`),this.liveWidthPx=v}this.collapsed=n,n!==o&&this.dispatchEvent(new d)}disarmResizeHandle(){this.resizeHandleArmTimer!==void 0&&(clearTimeout(this.resizeHandleArmTimer),this.resizeHandleArmTimer=void 0),this.resizeHandleArmed=!1}collapseToggleIcon(){return(this.position==="start"?!this.collapsed:this.collapsed)?"chevron_left":"chevron_right"}surfaceAriaLabel(){return this.heading??this.ariaLabel??void 0}hasFooterContent(){return this.querySelector('[slot="footer"]')!==null}hasHeaderContent(){return!!this.heading||this.querySelector('[slot="header"]')!==null}renderHeader(){return s`
|
|
201
243
|
<div id="header">
|
|
202
244
|
<slot name="header">
|
|
203
245
|
${this.heading?s`<h2 id="heading">${this.heading}</h2>`:l}
|
|
@@ -228,6 +270,7 @@ import{a as p}from"./chunks/chunk-YYCEPZUN.js";import{a as m}from"./chunks/chunk
|
|
|
228
270
|
`}renderResizeHandle(){return s`
|
|
229
271
|
<div
|
|
230
272
|
id="resize-handle"
|
|
273
|
+
class=${u(this.resizeHandleArmed?"armed":void 0)}
|
|
231
274
|
role="separator"
|
|
232
275
|
aria-orientation="vertical"
|
|
233
276
|
aria-label=${this.resizeLabel??this.dictionary.sidebar.resize}
|
|
@@ -235,6 +278,8 @@ import{a as p}from"./chunks/chunk-YYCEPZUN.js";import{a as m}from"./chunks/chunk
|
|
|
235
278
|
aria-valuemin=${Math.round(this.miniWidthPx())}
|
|
236
279
|
aria-valuemax=${Math.round(this.maxWidthPx())}
|
|
237
280
|
tabindex="0"
|
|
281
|
+
@pointerenter=${this.handleResizePointerEnter}
|
|
282
|
+
@pointerleave=${this.handleResizePointerLeave}
|
|
238
283
|
@pointerdown=${this.handleResizePointerDown}
|
|
239
284
|
@pointermove=${this.handleResizePointerMove}
|
|
240
285
|
@pointerup=${this.handleResizePointerUp}
|
|
@@ -245,7 +290,7 @@ import{a as p}from"./chunks/chunk-YYCEPZUN.js";import{a as m}from"./chunks/chunk
|
|
|
245
290
|
<div
|
|
246
291
|
id="surface"
|
|
247
292
|
role="navigation"
|
|
248
|
-
aria-label=${
|
|
293
|
+
aria-label=${u(this.surfaceAriaLabel())}
|
|
249
294
|
?inert=${this.collapseMode==="hidden"&&this.collapsed}
|
|
250
295
|
>
|
|
251
296
|
${this.hasHeaderContent()?this.renderHeader():l}
|
|
@@ -261,4 +306,4 @@ import{a as p}from"./chunks/chunk-YYCEPZUN.js";import{a as m}from"./chunks/chunk
|
|
|
261
306
|
</div>
|
|
262
307
|
${this.resizable?this.renderResizeHandle():l}
|
|
263
308
|
${this.collapsible&&this.togglePlacement==="edge"?this.renderEdgeToggle():l}
|
|
264
|
-
`}};
|
|
309
|
+
`}};t.styles=k,r([a({reflect:!0,useDefault:!0})],t.prototype,"position",2),r([a({reflect:!0,attribute:"hide-below"})],t.prototype,"hideBelow",2),r([a({reflect:!0,useDefault:!0})],t.prototype,"theme",2),r([a()],t.prototype,"heading",2),r([a({converter:g})],t.prototype,"collapsible",2),r([a({reflect:!0,attribute:"toggle-placement",useDefault:!0})],t.prototype,"togglePlacement",2),r([a({reflect:!0,attribute:"collapse-mode",useDefault:!0})],t.prototype,"collapseMode",2),r([a({type:Boolean,reflect:!0})],t.prototype,"collapsed",2),r([a({attribute:"expand-label"})],t.prototype,"expandLabel",2),r([a({attribute:"collapse-label"})],t.prototype,"collapseLabel",2),r([a({converter:g})],t.prototype,"resizable",2),r([a({attribute:"resize-label"})],t.prototype,"resizeLabel",2),r([c("#resize-handle")],t.prototype,"resizeHandleEl",2),r([c("#collapse-toggle")],t.prototype,"collapseToggleEl",2),r([a({type:Boolean,reflect:!0})],t.prototype,"dragging",2),r([h()],t.prototype,"resizeHandleArmed",2),r([h()],t.prototype,"liveWidthPx",2),t=r([m(W)],t);export{t as EunomiaSidebar,W as EunomiaSidebarTagName};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as u,b as s}from"./chunks/chunk-
|
|
1
|
+
import{a as u,b as s}from"./chunks/chunk-RGC3I6MK.js";import"./chunks/chunk-5LXGJVJR.js";import{a as f,b as p}from"./chunks/chunk-MQQJ6DID.js";import"./chunks/chunk-5GKM5DIB.js";import{a as n}from"./chunks/chunk-PPCHQG7P.js";import{a as h}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js";import"./chunks/chunk-62RLISRD.js";import"./chunks/chunk-QL5GSW2A.js";import{a as t,f as o,h as d,j as l,k as a,p as r,u as c}from"./chunks/chunk-YITWLCD3.js";var v=d`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as $}from"./chunks/chunk-6TIEBY34.js";import{a as l}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js";import{a as s,f as g,h as S,j as i,n as x,p as a,r as p,u as y}from"./chunks/chunk-YITWLCD3.js";var u=class f extends Event{static{this.eventName="eunstepchange"}constructor(m){super(f.eventName,{bubbles:!0,composed:!1}),this.step=m}};var k=S`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
container-type: normal;
|
|
@@ -300,8 +300,8 @@ import{a as u}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js
|
|
|
300
300
|
var(--eun-text-disabled-color, #8d93aa)
|
|
301
301
|
);
|
|
302
302
|
}
|
|
303
|
-
`;var
|
|
304
|
-
class=${
|
|
303
|
+
`;var T="eun-stepper",o=class extends y{constructor(){super(...arguments);this.steps=[];this.activeStep=0;this.orientation="horizontal";this.variant="numbered";this.linear=!0;this.disabled=!1;this.handleSlotChange=()=>{this.syncSlottedSteps(),this.requestUpdate()}}hasSlottedSteps(){return this.children.length>0}requestStepFromChild(e){let t=this.slottedSteps.indexOf(e);t!==-1&&this.requestStep(t)}syncSlottedSteps(){this.slottedSteps.forEach((e,t)=>{e.index=t,e.orientation!==this.orientation&&(e.orientation=this.orientation);let r=this.statusOf(t,this.activeStep,e.state);e.status!==r&&(e.status=r);let n=t===this.activeStep;e.reachable=!n&&!this.disabled&&!e.disabled&&(!this.linear||t<this.activeStep)})}updated(e){super.updated(e),this.hasSlottedSteps()&&this.syncSlottedSteps()}requestStep(e){this.dispatchEvent(new u(e))}statusOf(e,t,r){return e===t?"current":e<t?r==="error"?"error":"completed":"upcoming"}renderIndicatorContent(e,t){return e==="completed"?a`<eun-icon name="check" size="16"></eun-icon>`:e==="error"?a`<eun-icon name="error" size="16"></eun-icon>`:`${t+1}`}renderSubstepRing(e){let t=this.activeSubstep??-1,r=e.length>0?Math.min(Math.max((t+1)/e.length,0),1):0,n=e[t]?.state==="error";return a`<span
|
|
304
|
+
class=${l({"substep-ring":!0,error:n})}
|
|
305
305
|
aria-hidden="true"
|
|
306
306
|
style="--_substepFraction: ${r}"
|
|
307
307
|
></span>`}renderIndicator(e,t,r){let n=r===this.activeStep&&!!e.substeps?.length;return a`
|
|
@@ -309,30 +309,30 @@ import{a as u}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js
|
|
|
309
309
|
${this.renderIndicatorContent(t,r)}
|
|
310
310
|
${n?this.renderSubstepRing(e.substeps):p}
|
|
311
311
|
</span>
|
|
312
|
-
`}renderStep(e,t,r){let n=this.statusOf(t,this.activeStep,e.state),
|
|
312
|
+
`}renderStep(e,t,r){let n=this.statusOf(t,this.activeStep,e.state),d=t===this.activeStep,w=!d&&!this.disabled&&!e.disabled&&(!this.linear||t<this.activeStep),v=this.renderIndicator(e,n,t),b=l({"step-control":!0,"has-description":!!e.description}),h=a`
|
|
313
313
|
<span class="content">
|
|
314
314
|
<span class="label">${e.label}</span>
|
|
315
315
|
${e.description?a`<span class="description">${e.description}</span>`:p}
|
|
316
316
|
</span>
|
|
317
|
-
`,
|
|
317
|
+
`,E=d&&e.substeps?.length&&this.activeSubstep!==void 0?a`<span class="sr-only"
|
|
318
318
|
>, step ${this.activeSubstep+1} of ${e.substeps.length}:
|
|
319
319
|
${e.substeps[this.activeSubstep]?.label}</span
|
|
320
|
-
>`:p,c;
|
|
321
|
-
>${
|
|
322
|
-
>`:
|
|
320
|
+
>`:p,c;d?c=a`<span class=${b} aria-current="step"
|
|
321
|
+
>${v}${h}${E}</span
|
|
322
|
+
>`:w?c=a`<button
|
|
323
323
|
type="button"
|
|
324
|
-
class=${
|
|
324
|
+
class=${b}
|
|
325
325
|
@click=${()=>this.requestStep(t)}
|
|
326
326
|
>
|
|
327
|
-
${
|
|
328
|
-
</button>`:c=a`<button type="button" class=${
|
|
329
|
-
${
|
|
330
|
-
</button>`;let
|
|
327
|
+
${v}${h}
|
|
328
|
+
</button>`:c=a`<button type="button" class=${b} disabled>
|
|
329
|
+
${v}${h}
|
|
330
|
+
</button>`;let z=this.orientation==="vertical"&&t<r?a`<span
|
|
331
331
|
class="v-connector"
|
|
332
332
|
aria-hidden="true"
|
|
333
333
|
?data-active=${t<this.activeStep}
|
|
334
334
|
></span>`:p;return a`<li class="step" data-status=${n}>
|
|
335
|
-
${c}${
|
|
335
|
+
${c}${z}
|
|
336
336
|
</li>`}renderConnector(e){return a`<li
|
|
337
337
|
class="connector"
|
|
338
338
|
aria-hidden="true"
|
|
@@ -344,7 +344,7 @@ import{a as u}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js
|
|
|
344
344
|
${this.renderStep(r,n,t)}
|
|
345
345
|
${this.orientation!=="vertical"&&n<t?this.renderConnector(n):p}
|
|
346
346
|
`)}
|
|
347
|
-
<li class=${
|
|
347
|
+
<li class=${l({"items-slot":!0,hidden:!e})}>
|
|
348
348
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
349
349
|
</li>
|
|
350
350
|
</ol>
|
|
@@ -359,4 +359,4 @@ import{a as u}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js
|
|
|
359
359
|
${r?a`<span slot="top-left">${r}</span>`:p}
|
|
360
360
|
<span slot="top-right">${t+1} / ${e}</span>
|
|
361
361
|
</eun-progress-bar>
|
|
362
|
-
`}render(){return this.variant==="progress"?this.renderProgress():this.renderNumbered()}};o.styles=[
|
|
362
|
+
`}render(){return this.variant==="progress"?this.renderProgress():this.renderNumbered()}};o.styles=[k],s([i({type:Array,reflect:!0,useDefault:!0})],o.prototype,"steps",2),s([i({type:Number,attribute:"active-step"})],o.prototype,"activeStep",2),s([i({type:Number,attribute:"active-substep"})],o.prototype,"activeSubstep",2),s([i({reflect:!0,useDefault:!0})],o.prototype,"orientation",2),s([i({reflect:!0,useDefault:!0})],o.prototype,"variant",2),s([i({reflect:!0,converter:$})],o.prototype,"linear",2),s([i({type:Boolean,reflect:!0})],o.prototype,"disabled",2),s([x()],o.prototype,"slottedSteps",2),o=s([g(T)],o);export{o as EunomiaStepper,T as EunomiaStepperTagName};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as d}from"./chunks/chunk-5LXGJVJR.js";import{a as i,f as l,h as r,j as s,p as n,u as o}from"./chunks/chunk-YITWLCD3.js";var c=r`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
font-family: var(--eun-font-family, "Mulish", sans-serif);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,c as b}from"./chunks/chunk-
|
|
1
|
+
import{b as a,c as b}from"./chunks/chunk-32L2QYWQ.js";import"./chunks/chunk-PD62MBOJ.js";import"./chunks/chunk-BKZGTCMF.js";import"./chunks/chunk-PPCHQG7P.js";import"./chunks/chunk-62RLISRD.js";import"./chunks/chunk-QL5GSW2A.js";import"./chunks/chunk-YITWLCD3.js";export{b as EunomiaTableActionBar,a as EunomiaTableActionBarTagName};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as C,b as J}from"./chunks/chunk-
|
|
1
|
+
import{a as C,b as J}from"./chunks/chunk-32L2QYWQ.js";import"./chunks/chunk-SVGWCKWT.js";import{a as Y,b as X}from"./chunks/chunk-ZYC7DHES.js";import"./chunks/chunk-QXQ25SQS.js";import{a as G}from"./chunks/chunk-VG6NAAIV.js";import"./chunks/chunk-QYB6Z6FG.js";import"./chunks/chunk-5LA5DQMP.js";import"./chunks/chunk-EUWUDCBZ.js";import"./chunks/chunk-I4ERDXSM.js";import"./chunks/chunk-TFTRCIIK.js";import"./chunks/chunk-AK2DIJX7.js";import{b as x,c as k,d as U,e as W,f as T}from"./chunks/chunk-VJCNHMQZ.js";import"./chunks/chunk-624VJYNA.js";import"./chunks/chunk-TLBXTBMM.js";import"./chunks/chunk-YYCEPZUN.js";import"./chunks/chunk-LD35BFNK.js";import"./chunks/chunk-3UUZM7X2.js";import"./chunks/chunk-3BMACIDO.js";import"./chunks/chunk-UP4M7TER.js";import"./chunks/chunk-22D3SRFR.js";import"./chunks/chunk-PD62MBOJ.js";import"./chunks/chunk-BKZGTCMF.js";import"./chunks/chunk-3MTUVMM5.js";import"./chunks/chunk-5GKM5DIB.js";import{a as A}from"./chunks/chunk-PPCHQG7P.js";import"./chunks/chunk-O7PHBLH2.js";import{a as q,b as V,c as I}from"./chunks/chunk-SGM2X2TC.js";import{a as j}from"./chunks/chunk-62RLISRD.js";import"./chunks/chunk-QL5GSW2A.js";import{a as o,f as _,h as S,j as s,k as K,l as L,p as m,q as N,r as R,t as D,u as F}from"./chunks/chunk-YITWLCD3.js";var Q=(b,v,e)=>{let t=new Map;for(let a=v;a<=e;a++)t.set(b[a],a);return t},Z=V(class extends I{constructor(b){if(super(b),b.type!==q.CHILD)throw Error("repeat() can only be used in text expressions")}dt(b,v,e){let t;e===void 0?e=v:v!==void 0&&(t=v);let a=[],r=[],i=0;for(let c of b)a[i]=t?t(c,i):i,r[i]=e(c,i),i++;return{values:r,keys:a}}render(b,v,e){return this.dt(b,v,e).values}update(b,[v,e,t]){let a=W(b),{values:r,keys:i}=this.dt(v,e,t);if(!Array.isArray(a))return this.ut=i,r;let c=this.ut??=[],l=[],u,f,d=0,h=a.length-1,p=0,g=r.length-1;for(;d<=h&&p<=g;)if(a[d]===null)d++;else if(a[h]===null)h--;else if(c[d]===i[p])l[p]=k(a[d],r[p]),d++,p++;else if(c[h]===i[g])l[g]=k(a[h],r[g]),h--,g--;else if(c[d]===i[g])l[g]=k(a[d],r[g]),x(b,l[g+1],a[d]),d++,g--;else if(c[h]===i[p])l[p]=k(a[h],r[p]),x(b,a[d],a[h]),h--,p++;else if(u===void 0&&(u=Q(i,p,g),f=Q(c,d,h)),u.has(c[d]))if(u.has(c[h])){let y=f.get(i[p]),B=y!==void 0?a[y]:null;if(B===null){let $=x(b,a[d]);k($,r[p]),l[p]=$}else l[p]=k(B,r[p]),x(b,a[d],B),a[y]=null;p++}else T(a[h]),h--;else T(a[d]),d++;for(;p<=g;){let y=x(b,l[g+1]);k(y,r[p]),l[p++]=y}for(;d<=h;){let y=a[d++];y!==null&&T(y)}return this.ut=i,U(b,l),N}});function O(b,v){return b?.length?b:`__row-${v}`}function ee(b){switch(b){case"center":return"center";case"right":return"end";case"left":return"start";default:return}}var M=class b extends Event{static{this.eventName="euntableselectionchange"}constructor(v){super(b.eventName,{bubbles:!0,composed:!1}),this.selectedKeys=v,this.selectedCount=v.length}};var z=class b extends Event{static{this.eventName="euntablerowclick"}constructor(v){super(b.eventName,{bubbles:!0,cancelable:!0,composed:!1}),this.rowKey=v}};var re=S`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -561,7 +561,7 @@ import{a as C,b as J}from"./chunks/chunk-3PNGQEG4.js";import"./chunks/chunk-SVGW
|
|
|
561
561
|
@eunselect=${r=>e.onSelect(r.key,t,a)}
|
|
562
562
|
></eun-dropdown-button>`:m`<eun-button
|
|
563
563
|
size="xs"
|
|
564
|
-
appearance=${e.color?"
|
|
564
|
+
appearance=${e.color?"soft":"ghost"}
|
|
565
565
|
color=${A(e.color)}
|
|
566
566
|
aria-label=${e.label}
|
|
567
567
|
?disabled=${e.disabled?.(t)??!1}
|