@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.
- package/dist/cdn/components/chunks/{chunk-SIHZFOTK.js → chunk-2XASWWKR.js} +1 -1
- package/dist/cdn/components/chunks/chunk-32DTNR52.js +1 -0
- package/dist/cdn/components/chunks/chunk-3MTUVMM5.js +1 -0
- package/dist/cdn/components/chunks/chunk-5GKM5DIB.js +1 -0
- package/dist/cdn/components/chunks/{chunk-GSJEJLFA.js → chunk-6ETDXUH2.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-EJIX2D4Z.js → chunk-AIS3UICU.js} +7 -7
- package/dist/cdn/components/chunks/{chunk-BMQOI7HX.js → chunk-DKOPI7QA.js} +99 -55
- package/dist/cdn/components/chunks/{chunk-NHFWATVN.js → chunk-EAKYD33D.js} +3 -3
- package/dist/cdn/components/chunks/{chunk-EOWBYZV7.js → chunk-IDKZKLJR.js} +5 -5
- package/dist/cdn/components/chunks/chunk-JRGM3W7I.js +53 -0
- package/dist/cdn/components/chunks/{chunk-UAGCQF23.js → chunk-L65WUTXM.js} +5 -5
- package/dist/cdn/components/chunks/chunk-LFCXUVDO.js +1 -0
- package/dist/cdn/components/chunks/{chunk-YGUJJ25C.js → chunk-MPQP4R54.js} +2 -2
- package/dist/cdn/components/chunks/{chunk-RJCJXB7Y.js → chunk-NBIENHLV.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-4MXL6PZC.js → chunk-OW7XKDCH.js} +13 -13
- package/dist/cdn/components/chunks/{chunk-IJ5WFMK4.js → chunk-SD2WHGPF.js} +7 -6
- package/dist/cdn/components/chunks/chunk-SJWRE6PW.js +1 -0
- package/dist/cdn/components/eun-animate.js +5 -3
- package/dist/cdn/components/eun-badge.js +7 -7
- package/dist/cdn/components/eun-breadcrumb-item.js +1 -1
- package/dist/cdn/components/eun-breadcrumb.js +1 -1
- package/dist/cdn/components/eun-button.js +1 -1
- package/dist/cdn/components/eun-calendar.js +13 -13
- package/dist/cdn/components/eun-card.js +42 -3
- package/dist/cdn/components/eun-carousel.js +2 -2
- package/dist/cdn/components/eun-check-card.js +1 -1
- package/dist/cdn/components/eun-checkbox-list.js +1 -1
- package/dist/cdn/components/eun-checkbox.js +1 -1
- package/dist/cdn/components/eun-chip.js +1 -1
- package/dist/cdn/components/eun-collapse.js +39 -20
- package/dist/cdn/components/eun-color-picker.js +3 -3
- package/dist/cdn/components/eun-counter.js +8 -8
- package/dist/cdn/components/eun-date-picker.js +19 -19
- package/dist/cdn/components/eun-drawer.js +9 -9
- package/dist/cdn/components/eun-dropdown-button.js +1 -1
- package/dist/cdn/components/eun-fab.js +6 -6
- package/dist/cdn/components/eun-icon.js +1 -1
- package/dist/cdn/components/eun-image-card.js +1 -1
- package/dist/cdn/components/eun-image-carousel.js +3 -3
- package/dist/cdn/components/eun-input-file.js +1 -1
- package/dist/cdn/components/eun-input-phone.js +18 -18
- package/dist/cdn/components/eun-input.js +1 -1
- package/dist/cdn/components/eun-link.js +116 -18
- package/dist/cdn/components/eun-modal.js +15 -15
- package/dist/cdn/components/eun-radio-card.js +1 -1
- package/dist/cdn/components/eun-radio-list.js +1 -1
- package/dist/cdn/components/eun-radio.js +1 -1
- package/dist/cdn/components/eun-scheduler-event-editor.js +7 -7
- package/dist/cdn/components/eun-scheduler-event.js +1 -1
- package/dist/cdn/components/eun-scheduler.js +18 -18
- package/dist/cdn/components/eun-search.js +15 -15
- package/dist/cdn/components/eun-select.js +2 -2
- package/dist/cdn/components/eun-slider.js +1 -1
- package/dist/cdn/components/eun-sliding-card.js +1 -1
- package/dist/cdn/components/eun-switch.js +1 -1
- package/dist/cdn/components/eun-tab-group.js +1 -1
- package/dist/cdn/components/eun-tab.js +1 -1
- package/dist/cdn/components/eun-table-action-bar.js +1 -1
- package/dist/cdn/components/eun-table.js +1 -1
- package/dist/cdn/components/eun-textarea.js +2 -2
- package/dist/cdn/components/eun-time-picker.js +11 -11
- package/dist/cdn/components/eun-toggle-group.js +30 -22
- package/dist/cdn/components/eun-toggle-item.js +10 -8
- package/dist/cdn/components/eun-toggle.js +1 -1
- package/dist/cdn/components/eun-toolbar.js +1 -1
- package/dist/components/action/button/button.d.ts +44 -17
- package/dist/components/action/button/button.js +100 -22
- package/dist/components/action/button/button.styles.js +77 -39
- package/dist/components/action/dropdown-button/dropdown-button.d.ts +8 -8
- package/dist/components/action/dropdown-button/dropdown-button.js +7 -7
- package/dist/components/action/fab/fab.d.ts +7 -6
- package/dist/components/action/fab/fab.js +11 -8
- package/dist/components/action/fab/fab.styles.js +4 -4
- package/dist/components/action/link/link.d.ts +65 -6
- package/dist/components/action/link/link.js +176 -20
- package/dist/components/action/link/link.styles.js +86 -1
- package/dist/components/action/shared-styles/button-palette.styles.d.ts +3 -3
- package/dist/components/action/shared-styles/button-palette.styles.js +14 -14
- package/dist/components/action/toggle/toggle-group.d.ts +15 -5
- package/dist/components/action/toggle/toggle-group.js +42 -17
- package/dist/components/action/toggle/toggle-group.styles.d.ts +2 -1
- package/dist/components/action/toggle/toggle-group.styles.js +15 -7
- package/dist/components/action/toggle/toggle-item.d.ts +4 -4
- package/dist/components/action/toggle/toggle-item.js +2 -2
- package/dist/components/action/toggle/toggle-item.styles.js +8 -6
- package/dist/components/alert/drawer/drawer.js +1 -1
- package/dist/components/alert/modal/modal.d.ts +8 -8
- package/dist/components/alert/modal/modal.js +11 -11
- package/dist/components/content/badge/badge.d.ts +6 -6
- package/dist/components/content/badge/badge.js +4 -4
- package/dist/components/content/badge/badge.styles.js +4 -4
- package/dist/components/content/card/card.d.ts +32 -4
- package/dist/components/content/card/card.js +64 -4
- package/dist/components/content/card/card.styles.js +33 -1
- package/dist/components/content/card/image-card.d.ts +2 -1
- package/dist/components/content/card/image-card.js +1 -0
- package/dist/components/content/card/sliding-card.d.ts +2 -1
- package/dist/components/content/card/sliding-card.js +1 -0
- package/dist/components/content/collapse/collapse.d.ts +29 -11
- package/dist/components/content/collapse/collapse.js +53 -23
- package/dist/components/content/collapse/collapse.styles.js +13 -0
- package/dist/components/content/icon/icon.d.ts +12 -2
- package/dist/components/content/icon/icon.js +52 -22
- package/dist/components/content/icon/icon.style.d.ts +2 -0
- package/dist/components/content/icon/icon.style.js +4 -1
- package/dist/components/content/shared-styles/card-link.styles.js +1 -0
- package/dist/components/form/color-picker/color-picker.d.ts +3 -3
- package/dist/components/form/color-picker/color-picker.js +4 -4
- package/dist/components/form/counter/counter.d.ts +3 -3
- package/dist/components/form/counter/counter.js +3 -3
- package/dist/components/form/counter/counter.styles.js +5 -5
- package/dist/components/form/date-picker/date-picker.d.ts +3 -3
- package/dist/components/form/date-picker/date-picker.js +3 -3
- package/dist/components/form/date-picker/date-picker.styles.js +5 -5
- package/dist/components/form/input/input.d.ts +3 -3
- package/dist/components/form/input/input.js +4 -4
- package/dist/components/form/input-phone/input-phone.d.ts +3 -3
- package/dist/components/form/input-phone/input-phone.js +3 -3
- package/dist/components/form/input-phone/input-phone.styles.js +12 -12
- package/dist/components/form/search/search.styles.js +3 -3
- package/dist/components/form/select/select.d.ts +3 -3
- package/dist/components/form/select/select.js +3 -3
- package/dist/components/form/shared-styles/field.styles.js +5 -5
- package/dist/components/form/textarea/textarea.d.ts +3 -3
- package/dist/components/form/textarea/textarea.js +4 -4
- package/dist/components/form/time-picker/time-picker.d.ts +3 -3
- package/dist/components/form/time-picker/time-picker.js +3 -3
- package/dist/components/form/time-picker/time-picker.styles.js +5 -5
- package/dist/components/layout/animate/animate.d.ts +8 -0
- package/dist/components/layout/animate/animate.js +20 -8
- package/dist/features/scheduler/calendar/calendar.d.ts +6 -6
- package/dist/features/scheduler/calendar/calendar.js +9 -9
- package/dist/features/scheduler/scheduler/scheduler.d.ts +6 -6
- package/dist/features/scheduler/scheduler/scheduler.js +13 -13
- package/dist/features/scheduler/scheduler-event/scheduler-event.d.ts +10 -8
- package/dist/features/scheduler/scheduler-event/scheduler-event.js +7 -7
- package/dist/features/scheduler/scheduler-event/scheduler-event.styles.js +6 -6
- package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js +5 -5
- package/dist/features/scheduler/shared/scheduler-event-popover.js +2 -2
- package/dist/features/scheduler/shared/scheduler-hour-grid.d.ts +2 -2
- package/dist/features/scheduler/shared/scheduler-hour-grid.js +3 -3
- package/dist/features/scheduler/shared/scheduler-month-view.d.ts +3 -3
- package/dist/features/scheduler/shared/scheduler-month-view.js +2 -2
- package/dist/features/table/table/table.types.d.ts +7 -3
- package/dist/features/table/table-action-bar/table-action-bar.js +3 -3
- package/dist/features/table/table-managed/table-managed.js +2 -2
- package/dist/i18n/en.d.ts +3 -0
- package/dist/i18n/en.js +3 -0
- package/dist/i18n/fr.js +3 -0
- package/dist/index.d.ts +3 -3
- package/dist/jsx.d.ts +1 -1
- package/dist/mixins/button.mixin.d.ts +10 -9
- package/dist/mixins/button.mixin.js +14 -6
- package/dist/mixins/card-link.mixin.d.ts +3 -2
- package/dist/mixins/card-link.mixin.js +12 -5
- package/dist/mixins/disabled.mixin.d.ts +3 -3
- package/dist/mixins/disabled.mixin.js +10 -5
- package/dist/mixins/field-appearance.mixin.d.ts +19 -0
- package/dist/mixins/{field-variant.mixin.js → field-appearance.mixin.js} +11 -11
- package/dist/ssr/animate-ssr.css +26 -72
- package/dist/ssr/links-ssr.css +35 -0
- package/dist/ssr/overlay-ssr.css +0 -41
- package/dist/ssr/rich-text.css +38 -0
- package/dist/ssr/sidebar-ssr.css +0 -38
- package/dist/ssr/toolbar-ssr.css +73 -39
- package/dist/types/variant.type.d.ts +26 -10
- package/dist/utils/navigation.utils.d.ts +14 -0
- package/dist/utils/navigation.utils.js +33 -0
- package/dist/utils/new-tab-anchor.controller.d.ts +44 -0
- package/dist/utils/new-tab-anchor.controller.js +102 -0
- package/dist/utils/severity-icon.utils.d.ts +1 -1
- package/dist/utils/severity-icon.utils.js +1 -1
- package/dist/utils/theme-generator.utils.d.ts +3 -1
- package/dist/utils/theme-generator.utils.js +3 -1
- package/package.json +8 -2
- package/dist/cdn/components/chunks/chunk-2JLDJFYD.js +0 -48
- package/dist/cdn/components/chunks/chunk-ATH2OAMU.js +0 -1
- package/dist/cdn/components/chunks/chunk-BKHD4S57.js +0 -1
- package/dist/cdn/components/chunks/chunk-T7WABJEJ.js +0 -1
- package/dist/cdn/components/chunks/chunk-XSMCT4DF.js +0 -1
- package/dist/mixins/field-variant.mixin.d.ts +0 -22
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as m,b as h,c as b}from"./chunks/chunk-6VK6SHCG.js";import{a as v}from"./chunks/chunk-N6ZW5CDN.js";import"./chunks/chunk-RIFF2D2F.js";import"./chunks/chunk-UDOZRIJZ.js";import{a as n}from"./chunks/chunk-5EVP7YNE.js";import{a as
|
|
1
|
+
import{a as m,b as h,c as b}from"./chunks/chunk-6VK6SHCG.js";import{a as v}from"./chunks/chunk-N6ZW5CDN.js";import"./chunks/chunk-RIFF2D2F.js";import"./chunks/chunk-UDOZRIJZ.js";import{a as n}from"./chunks/chunk-5EVP7YNE.js";import{a as t,f as d,g as p,h as r,i as u,j as s,n as i,p as a,s as f}from"./chunks/chunk-XH6NREVZ.js";var l=class c extends Event{static{this.eventName="eunconfirm"}constructor(){super(c.eventName,{bubbles:!0,composed:!0,cancelable:!0})}};var C=p`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
@@ -134,26 +134,26 @@ import{a as m,b as h,c as b}from"./chunks/chunk-6VK6SHCG.js";import{a as v}from"
|
|
|
134
134
|
transition-duration: 0.01ms;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
`,g=
|
|
137
|
+
`,g=C;var y="eun-modal",e=class extends v(f){constructor(){super(...arguments);this.open=!1;this.kind="dialog";this.closeOnBackdrop=!0;this.dirty=!1;this.hideActions=!1;this.closeable=!0;this.cancelLabel="Cancel";this.confirmLabel="Confirm";this.confirmColor="primary";this.ariaLabelClose="Close";this.confirmCloseHeading="Discard changes?";this.confirmCloseDescription="You have unsaved changes. This action can't be undone.";this.confirmCloseCancelLabel="Keep editing";this.confirmCloseConfirmLabel="Discard";this.mountConfirmModal=!1;this.handleDiscardConfirmed=o=>{o.stopPropagation(),this.confirmDiscard()};this.stopDialogPropagation=o=>{o.stopPropagation()};this.handleToggle=o=>{let x=o;if(this.syncingFromPopover=!0,this.open=x.newState==="open",this.syncingFromPopover=!1,this.open){this.openDialogSurface({surfaceEl:this.surfaceEl,onEscape:()=>this.requestClose(),onOutsideClick:()=>{this.closeOnBackdrop&&this.requestClose()}}),this.updateComplete.then(()=>this.focusInitialElement());return}this.closeDialogSurface()};this.handleCommandEvent=o=>{b(o,this)}}willUpdate(o){o.has("dirty")&&this.dirty&&(this.mountConfirmModal=!0)}updated(o){super.updated(o),o.has("open")&&this.syncPopoverOpenState(this.open,this.surfaceEl)}connectedCallback(){super.connectedCallback?.(),this.addEventListener("command",this.handleCommandEvent)}disconnectedCallback(){this.removeEventListener("command",this.handleCommandEvent),this.teardownDialogSurface(this.open),super.disconnectedCallback?.()}show(){this.open=!0}hide(){this.open=!1}confirm(){let o=new l;this.dispatchEvent(o),o.defaultPrevented||(this.open=!1)}cancel(){let o=new m;this.dispatchEvent(o),o.defaultPrevented||(this.open=!1)}requestClose(){if(this.dirty){let o=new h;this.dispatchEvent(o),o.defaultPrevented||this.confirmCloseModalEl?.show();return}this.cancel()}confirmDiscard(){this.dirty=!1,this.cancel()}focusInitialElement(){let o=this.querySelector("[autofocus]");if(o){o.focus();return}if(!this.hideActions){this.cancelButtonEl?.focus();return}this.surfaceEl?.focus()}renderHeader(){return!this.heading&&!this.description?a:i`
|
|
138
138
|
<div id="header">
|
|
139
|
-
${this.heading?
|
|
140
|
-
${this.description?
|
|
139
|
+
${this.heading?i`<h2 id="heading">${this.heading}</h2>`:a}
|
|
140
|
+
${this.description?i`<p id="description">${this.description}</p>`:a}
|
|
141
141
|
</div>
|
|
142
|
-
`}renderConfirmCloseModal(){return
|
|
142
|
+
`}renderConfirmCloseModal(){return i`
|
|
143
143
|
<eun-modal
|
|
144
144
|
id="confirm-close-modal"
|
|
145
145
|
kind="alert"
|
|
146
146
|
heading=${this.confirmCloseHeading}
|
|
147
147
|
cancel-label=${this.confirmCloseCancelLabel}
|
|
148
148
|
confirm-label=${this.confirmCloseConfirmLabel}
|
|
149
|
-
confirm-
|
|
149
|
+
confirm-color="critical"
|
|
150
150
|
@eunconfirm=${this.handleDiscardConfirmed}
|
|
151
151
|
@euncancel=${this.stopDialogPropagation}
|
|
152
152
|
>
|
|
153
|
-
${this.confirmCloseDescription?
|
|
153
|
+
${this.confirmCloseDescription?i`<p>${this.confirmCloseDescription}</p>`:a}
|
|
154
154
|
<slot name="confirm-close"></slot>
|
|
155
155
|
</eun-modal>
|
|
156
|
-
`}render(){return
|
|
156
|
+
`}render(){return i`
|
|
157
157
|
<div
|
|
158
158
|
id="surface"
|
|
159
159
|
popover="manual"
|
|
@@ -165,7 +165,7 @@ import{a as m,b as h,c as b}from"./chunks/chunk-6VK6SHCG.js";import{a as v}from"
|
|
|
165
165
|
tabindex="-1"
|
|
166
166
|
@toggle=${this.handleToggle}
|
|
167
167
|
>
|
|
168
|
-
${this.closeable?
|
|
168
|
+
${this.closeable?i`
|
|
169
169
|
<eun-button
|
|
170
170
|
id="close-button"
|
|
171
171
|
appearance="ghost"
|
|
@@ -176,23 +176,23 @@ import{a as m,b as h,c as b}from"./chunks/chunk-6VK6SHCG.js";import{a as v}from"
|
|
|
176
176
|
>
|
|
177
177
|
<eun-icon name="close" size="16"></eun-icon>
|
|
178
178
|
</eun-button>
|
|
179
|
-
`:
|
|
179
|
+
`:a}
|
|
180
180
|
${this.renderHeader()}
|
|
181
181
|
<div id="body">
|
|
182
182
|
<slot></slot>
|
|
183
183
|
</div>
|
|
184
|
-
${this.hideActions?
|
|
184
|
+
${this.hideActions?a:i`
|
|
185
185
|
<div id="actions">
|
|
186
186
|
<slot name="footer">
|
|
187
187
|
<eun-button
|
|
188
188
|
id="cancel-button"
|
|
189
189
|
appearance="ghost"
|
|
190
|
-
|
|
190
|
+
color=${n(this.cancelColor)}
|
|
191
191
|
@click=${()=>this.requestClose()}
|
|
192
192
|
>${this.cancelLabel}</eun-button
|
|
193
193
|
>
|
|
194
194
|
<eun-button
|
|
195
|
-
|
|
195
|
+
color=${this.confirmColor}
|
|
196
196
|
@click=${()=>this.confirm()}
|
|
197
197
|
>${this.confirmLabel}</eun-button
|
|
198
198
|
>
|
|
@@ -200,5 +200,5 @@ import{a as m,b as h,c as b}from"./chunks/chunk-6VK6SHCG.js";import{a as v}from"
|
|
|
200
200
|
</div>
|
|
201
201
|
`}
|
|
202
202
|
</div>
|
|
203
|
-
${this.mountConfirmModal?this.renderConfirmCloseModal():
|
|
204
|
-
`}};e.styles=g,
|
|
203
|
+
${this.mountConfirmModal?this.renderConfirmCloseModal():a}
|
|
204
|
+
`}};e.styles=g,t([r({type:Boolean,reflect:!0})],e.prototype,"open",2),t([r()],e.prototype,"heading",2),t([r()],e.prototype,"description",2),t([r({reflect:!0})],e.prototype,"kind",2),t([r({type:Boolean,attribute:"close-on-backdrop"})],e.prototype,"closeOnBackdrop",2),t([r({type:Boolean,reflect:!0})],e.prototype,"dirty",2),t([r({type:Boolean,attribute:"hide-actions"})],e.prototype,"hideActions",2),t([r({type:Boolean,reflect:!0})],e.prototype,"closeable",2),t([r({attribute:"cancel-label"})],e.prototype,"cancelLabel",2),t([r({attribute:"confirm-label"})],e.prototype,"confirmLabel",2),t([r({attribute:"confirm-color"})],e.prototype,"confirmColor",2),t([r({attribute:"cancel-color"})],e.prototype,"cancelColor",2),t([r({attribute:"aria-label-close"})],e.prototype,"ariaLabelClose",2),t([r({attribute:"confirm-close-heading"})],e.prototype,"confirmCloseHeading",2),t([r({attribute:"confirm-close-description"})],e.prototype,"confirmCloseDescription",2),t([r({attribute:"confirm-close-cancel-label"})],e.prototype,"confirmCloseCancelLabel",2),t([r({attribute:"confirm-close-confirm-label"})],e.prototype,"confirmCloseConfirmLabel",2),t([s("#surface")],e.prototype,"surfaceEl",2),t([s("#cancel-button")],e.prototype,"cancelButtonEl",2),t([s("#confirm-close-modal")],e.prototype,"confirmCloseModalEl",2),t([u()],e.prototype,"mountConfirmModal",2),e=t([d(y)],e);export{e as EunomiaModal,y as EunomiaModalTagName};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as u}from"./chunks/chunk-
|
|
1
|
+
import{b as u}from"./chunks/chunk-6ETDXUH2.js";import{a as s}from"./chunks/chunk-74AOAB4X.js";import{e as a}from"./chunks/chunk-OAULRKHQ.js";import"./chunks/chunk-YYCEPZUN.js";import"./chunks/chunk-32DTNR52.js";import{a as l}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import{a as o,f as d,g as i,h as c,l as t,n as e,p as n}from"./chunks/chunk-XH6NREVZ.js";var h=i`
|
|
2
2
|
:host {
|
|
3
3
|
--_borderWidth: var(--radio-card-border-width, 1px);
|
|
4
4
|
--_borderColor: var(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as E}from"./chunks/chunk-BQHYZB2W.js";import{a as y}from"./chunks/chunk-GW3VP2L7.js";import{a as m,c as b,d as g,e as d}from"./chunks/chunk-OAULRKHQ.js";import{a as v}from"./chunks/chunk-YYCEPZUN.js";import{a as p}from"./chunks/chunk-
|
|
1
|
+
import{a as E}from"./chunks/chunk-BQHYZB2W.js";import{a as y}from"./chunks/chunk-GW3VP2L7.js";import{a as m,c as b,d as g,e as d}from"./chunks/chunk-OAULRKHQ.js";import{a as v}from"./chunks/chunk-YYCEPZUN.js";import{a as p}from"./chunks/chunk-32DTNR52.js";import{a as f}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import"./chunks/chunk-5EVP7YNE.js";import{a as r,f as l,g as h,h as o,j as u,n as c,s as n}from"./chunks/chunk-XH6NREVZ.js";var $=h`
|
|
2
2
|
:host {
|
|
3
3
|
--_container-gap: var(--radio-list-gap, var(--eun-space-s, 8px));
|
|
4
4
|
--_options-gap: var(--radio-list-options-gap, var(--eun-space-s, 8px));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunks/chunk-
|
|
1
|
+
import{a,b}from"./chunks/chunk-6ETDXUH2.js";import"./chunks/chunk-OAULRKHQ.js";import"./chunks/chunk-YYCEPZUN.js";import"./chunks/chunk-32DTNR52.js";import"./chunks/chunk-XH6NREVZ.js";export{b as EunomiaRadio,a as EunomiaRadioTagName};
|
|
@@ -66,7 +66,7 @@ import{a as L,b as k}from"./chunks/chunk-IKAZYVB7.js";import{a as D}from"./chunk
|
|
|
66
66
|
#actions .spacer {
|
|
67
67
|
flex: 1 1 auto;
|
|
68
68
|
}
|
|
69
|
-
`,T=x;var h=class u extends Event{static{this.eventName="eunguestinvite"}constructor(m,t){super(u.eventName,{bubbles:!0,composed:!1}),this.email=m,this.eventId=t}};var w="eun-scheduler-event-editor",
|
|
69
|
+
`,T=x;var h=class u extends Event{static{this.eventName="eunguestinvite"}constructor(m,t){super(u.eventName,{bubbles:!0,composed:!1}),this.email=m,this.eventId=t}};var w="eun-scheduler-event-editor",C=[{name:"red",value:"#f14959"},{name:"purple",value:"#9562e3"},{name:"yellow",value:"#f0f050"},{name:"blue",value:"#3bb3b9"},{name:"green",value:"#49f15f"},{name:"pink",value:"#d05df3"}],G=["low","medium","high","critical"],P={low:"success",high:"warning",critical:"critical"},I=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,i=class extends v{constructor(){super(...arguments);this.hideActions=!1;this.titleLabel="Title";this.descriptionLabel="Description";this.allDayLabel="All day";this.dateLabel="Date";this.endDateLabel="End date";this.startTimeLabel="Start time";this.endTimeLabel="End time";this.locationLabel="Location";this.notesLabel="Notes";this.priorityLabel="Priority";this.colorLabel="Color";this.requiredLabel="is required";this.colorLabels={red:"Red",purple:"Purple",yellow:"Yellow",blue:"Blue",green:"Green",pink:"Pink"};this.guestsLabel="Guests";this.addGuestLabel="Add guest";this.removeGuestLabel="Remove";this.saveLabel="Save";this.cancelLabel="Cancel";this.deleteLabel="Delete";this.formTitle="";this.formDescription="";this.formAllDay=!1;this.formDate=n(new Date);this.formEndDate=n(new Date);this.formStart=null;this.formEnd=null;this.formLocation="";this.formNotes="";this.formPriority="medium";this.formColor="#3bb3b9";this.formGuests=[];this.guestInputValue="";this.guestInputError=!1;this.showErrors=!1;this.seedSnapshot="";this.handleSaveClick=()=>{this.requestSave()};this.handleCancelClick=()=>{this.seedForm()};this.handlePriorityChange=t=>{this.formPriority=t.target.value[0]};this.handleGuestInputChange=t=>{this.guestInputValue=t.target.value??"",this.guestInputError=!1};this.handleGuestInputKeydown=t=>{t.key==="Enter"&&(t.preventDefault(),this.addGuest())};this.handleAddGuestClick=()=>{this.addGuest()};this.handleRemoveGuest=t=>{this.formGuests=this.formGuests.filter(e=>e.email!==t)}}connectedCallback(){super.connectedCallback?.(),this.seedForm()}willUpdate(t){(t.has("event")||t.has("initialStart")||t.has("initialEnd"))&&this.seedForm(),super.willUpdate(t)}updated(t){super.updated(t),["formTitle","formDescription","formAllDay","formDate","formEndDate","formStart","formEnd","formLocation","formNotes","formPriority","formColor","formGuests"].some(o=>t.has(o))&&this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}seedForm(){let t=this.event;if(t)this.formTitle=t.title,this.formDescription=t.description??"",this.formAllDay=!!t.allDay,this.formDate=n(t.start),this.formEndDate=n(t.end),this.formStart=t.start,this.formEnd=t.end,this.formLocation=t.location??"",this.formNotes=t.notes??"",this.formPriority=t.priority??"medium",this.formColor=t.color,this.formGuests=t.guests?t.guests.map(e=>({...e})):[];else{let e=this.initialStart??A(new Date),o=this.initialEnd??y(e,1);this.formTitle="",this.formDescription="",this.formAllDay=!1,this.formDate=n(e),this.formEndDate=n(e),this.formStart=e,this.formEnd=o,this.formLocation="",this.formNotes="",this.formPriority="medium",this.formColor="blue",this.formGuests=[]}this.guestInputValue="",this.guestInputError=!1,this.showErrors=!1,this.seedSnapshot=this.snapshot()}snapshot(){return JSON.stringify({title:this.formTitle,description:this.formDescription,allDay:this.formAllDay,date:this.formDate.getTime(),endDate:this.formEndDate.getTime(),start:this.formStart?.getTime(),end:this.formEnd?.getTime(),location:this.formLocation,notes:this.formNotes,priority:this.formPriority,color:this.formColor,guests:this.formGuests})}get dirty(){return this.snapshot()!==this.seedSnapshot}get isEditing(){return!!this.event}composeStartEnd(){if(this.formAllDay)return{start:n(this.formDate),end:g(this.formEndDate)};if(!this.formStart||!this.formEnd)return null;let t=new Date(this.formDate);t.setHours(this.formStart.getHours(),this.formStart.getMinutes(),0,0);let e=new Date(this.formDate);return e.setHours(this.formEnd.getHours(),this.formEnd.getMinutes(),0,0),e.getTime()<=t.getTime()&&e.setDate(e.getDate()+1),{start:t,end:e}}get valid(){if(!this.formTitle.trim())return!1;let t=this.composeStartEnd();return!!t&&t.end.getTime()>t.start.getTime()}requestSave(){if(!this.valid)return this.showErrors=!0,!1;let t=this.composeStartEnd(),e={id:this.event?.id??crypto.randomUUID(),title:this.formTitle.trim(),description:this.formDescription||void 0,allDay:this.formAllDay,start:t.start,end:t.end,location:this.formLocation||void 0,notes:this.formNotes||void 0,color:this.formColor,priority:this.formPriority,guests:this.formGuests.length?this.formGuests:void 0};return this.dispatchEvent(this.event?new D(e):new L(e)),this.event=e,this.seedSnapshot=this.snapshot(),!0}requestDelete(){this.event&&this.dispatchEvent(new k(this.event.id))}addGuest(){let t=this.guestInputValue.trim();if(!t)return;if(!I.test(t)){this.guestInputError=!0;return}let e=this.formGuests.some(o=>o.email.toLowerCase()===t.toLowerCase());this.guestInputValue="",this.guestInputError=!1,!e&&(this.formGuests=[...this.formGuests,{email:t,status:"pending"}],this.dispatchEvent(new h(t,this.event?.id)))}render(){let t=this.showErrors&&!this.formTitle.trim();return l`
|
|
70
70
|
<div id="fields">
|
|
71
71
|
<eun-input
|
|
72
72
|
label=${this.titleLabel}
|
|
@@ -165,7 +165,7 @@ import{a as L,b as k}from"./chunks/chunk-IKAZYVB7.js";import{a as D}from"./chunk
|
|
|
165
165
|
<eun-button
|
|
166
166
|
appearance="default"
|
|
167
167
|
id="guest-add-button"
|
|
168
|
-
|
|
168
|
+
color="secondary"
|
|
169
169
|
aria-label=${this.addGuestLabel}
|
|
170
170
|
@click=${this.handleAddGuestClick}
|
|
171
171
|
>
|
|
@@ -215,10 +215,10 @@ import{a as L,b as k}from"./chunks/chunk-IKAZYVB7.js";import{a as D}from"./chunk
|
|
|
215
215
|
.value=${[this.formPriority]}
|
|
216
216
|
@eunchange=${this.handlePriorityChange}
|
|
217
217
|
>
|
|
218
|
-
${
|
|
218
|
+
${G.map(e=>l`
|
|
219
219
|
<eun-toggle-item
|
|
220
220
|
value=${e}
|
|
221
|
-
|
|
221
|
+
color=${p(P[e])}
|
|
222
222
|
>
|
|
223
223
|
${N(e)}
|
|
224
224
|
</eun-toggle-item>
|
|
@@ -233,7 +233,7 @@ import{a as L,b as k}from"./chunks/chunk-IKAZYVB7.js";import{a as D}from"./chunk
|
|
|
233
233
|
.value=${this.formColor}
|
|
234
234
|
@eunchange=${e=>{this.formColor=e.target.value}}
|
|
235
235
|
>
|
|
236
|
-
${
|
|
236
|
+
${C.map(e=>l`
|
|
237
237
|
<option value=${e.value}>
|
|
238
238
|
${this.colorLabels[e.name]}
|
|
239
239
|
</option>
|
|
@@ -244,7 +244,7 @@ import{a as L,b as k}from"./chunks/chunk-IKAZYVB7.js";import{a as D}from"./chunk
|
|
|
244
244
|
${this.hideActions?c:l`
|
|
245
245
|
<div id="actions">
|
|
246
246
|
${this.event?l`
|
|
247
|
-
<eun-button
|
|
247
|
+
<eun-button color="critical" @click=${this.requestDelete}>
|
|
248
248
|
${this.deleteLabel}
|
|
249
249
|
</eun-button>
|
|
250
250
|
`:c}
|
|
@@ -252,7 +252,7 @@ import{a as L,b as k}from"./chunks/chunk-IKAZYVB7.js";import{a as D}from"./chunk
|
|
|
252
252
|
<eun-button appearance="ghost" @click=${this.handleCancelClick}>
|
|
253
253
|
${this.cancelLabel}
|
|
254
254
|
</eun-button>
|
|
255
|
-
<eun-button
|
|
255
|
+
<eun-button color="primary" @click=${this.handleSaveClick}>
|
|
256
256
|
${this.saveLabel}
|
|
257
257
|
</eun-button>
|
|
258
258
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunks/chunk-
|
|
1
|
+
import{a,b}from"./chunks/chunk-AIS3UICU.js";import"./chunks/chunk-647ISUF4.js";import"./chunks/chunk-MJ4RDZLL.js";import"./chunks/chunk-XH6NREVZ.js";export{b as EunomiaSchedulerEventCard,a as EunomiaSchedulerEventCardTagName};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as A,b as $}from"./chunks/chunk-IKAZYVB7.js";import{a as
|
|
1
|
+
import{a as A,b as $}from"./chunks/chunk-IKAZYVB7.js";import{a as S}from"./chunks/chunk-LK5BJ4SH.js";import{a as T}from"./chunks/chunk-IJJ67C66.js";import{a as w}from"./chunks/chunk-BRSNQMCD.js";import{a as k,b as C,d as y,e as P,f as M}from"./chunks/chunk-647ISUF4.js";import{j as E}from"./chunks/chunk-MJ4RDZLL.js";import{a as D}from"./chunks/chunk-SJWRE6PW.js";import{a as c}from"./chunks/chunk-5EVP7YNE.js";import{a as i,f as x,g,h as o,i as p,j as h,n as s,p as d,s as L}from"./chunks/chunk-XH6NREVZ.js";var R=g`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
box-sizing: border-box;
|
|
@@ -249,7 +249,7 @@ import{a as A,b as $}from"./chunks/chunk-IKAZYVB7.js";import{a as T}from"./chunk
|
|
|
249
249
|
gap: var(--eun-space-s, 8px);
|
|
250
250
|
padding: 0 var(--eun-space-m, 16px) var(--eun-space-m, 16px);
|
|
251
251
|
}
|
|
252
|
-
`,
|
|
252
|
+
`,O=Q;function N(l){let{event:n,locale:e,editLabel:a,deleteLabel:r,closeLabel:u,priorityLabels:v,readonly:b,onEdit:m,onDelete:_,onClose:W}=l;return s`
|
|
253
253
|
<div
|
|
254
254
|
class="event-popover-bar"
|
|
255
255
|
style="--_accent: var(--eun-color-${n.color}-600);"
|
|
@@ -295,8 +295,8 @@ import{a as A,b as $}from"./chunks/chunk-IKAZYVB7.js";import{a as T}from"./chunk
|
|
|
295
295
|
size="s"
|
|
296
296
|
hide-icon
|
|
297
297
|
color="primary"
|
|
298
|
-
.severity=${
|
|
299
|
-
>${
|
|
298
|
+
.severity=${k[n.priority]}
|
|
299
|
+
>${v[n.priority]??n.priority}</eun-tag
|
|
300
300
|
>
|
|
301
301
|
</div>
|
|
302
302
|
`:d}
|
|
@@ -307,7 +307,7 @@ import{a as A,b as $}from"./chunks/chunk-IKAZYVB7.js";import{a as T}from"./chunk
|
|
|
307
307
|
${n.guests.map(f=>s`
|
|
308
308
|
<li class="event-popover-guest" data-status=${f.status}>
|
|
309
309
|
<eun-icon
|
|
310
|
-
name=${
|
|
310
|
+
name=${C[f.status]}
|
|
311
311
|
size="14"
|
|
312
312
|
aria-hidden="true"
|
|
313
313
|
></eun-icon>
|
|
@@ -321,19 +321,19 @@ import{a as A,b as $}from"./chunks/chunk-IKAZYVB7.js";import{a as T}from"./chunk
|
|
|
321
321
|
${b?d:s`
|
|
322
322
|
<div class="event-popover-actions">
|
|
323
323
|
<eun-button
|
|
324
|
-
|
|
324
|
+
color="critical"
|
|
325
325
|
size="s"
|
|
326
326
|
appearance="outline"
|
|
327
327
|
rounded
|
|
328
328
|
@click=${_}
|
|
329
329
|
>${r}</eun-button
|
|
330
330
|
>
|
|
331
|
-
<eun-button
|
|
331
|
+
<eun-button color="primary" size="s" rounded @click=${m}
|
|
332
332
|
>${a}</eun-button
|
|
333
333
|
>
|
|
334
334
|
</div>
|
|
335
335
|
`}
|
|
336
|
-
`}function I(l,n){let e={weekday:"long",day:"numeric",month:"long"};if(
|
|
336
|
+
`}function I(l,n){let e={weekday:"long",day:"numeric",month:"long"};if(M(l)){let v=l.start.toLocaleDateString(n,e),b=l.end.toLocaleDateString(n,e),m=v===b?v:`${v} \u2013 ${b}`;return l.allDay?`All day \xB7 ${m}`:m}let a=l.start.toLocaleDateString(n,e),r=l.start.toLocaleTimeString(n,{hour:"numeric",minute:"2-digit"}),u=l.end.toLocaleTimeString(n,{hour:"numeric",minute:"2-digit"});return`${a} \xB7 ${r} \u2013 ${u}`}var j="eun-scheduler",V=["day","week","work-week","month","year"],t=class extends D(S(L)){constructor(){super(...arguments);this.events=[];this.view="week";this.displayedDate=new Date;this.weekStartsOn=1;this.dayStartHour=0;this.dayEndHour=24;this.slotDuration=30;this.readonly=!1;this.noAnimation=!1;this.todayLabel="Today";this.newEventLabel="New event";this.ariaLabelPrevious="Previous period";this.ariaLabelNext="Next period";this.viewDayLabel="Day";this.viewWeekLabel="Week";this.viewWorkWeekLabel="Work week";this.viewMonthLabel="Month";this.viewYearLabel="Year";this.applyLabel="Apply";this.cancelLabel="Cancel";this.deleteLabel="Delete";this.editLabel="Edit";this.closeLabel="Close";this.moreEventsLabel="+{count} more";this.eventAppearance="default";this.isDrawerOpen=!1;this.isModalOpen=!1;this.editingEvent=null;this.createStart=H(new Date);this.createEnd=E(this.createStart,1);this.editorDirty=!1;this.isMobile=!1;this.selectedEvent=null;this.handleMobileMediaChange=e=>{this.isMobile=e.matches};this.handleToday=()=>{this.displayedDate=new Date};this.handlePrevious=()=>this.navigate(-1);this.handleNext=()=>this.navigate(1);this.handleViewChange=e=>{let[a]=e.target.value;a&&(this.view=a)};this.handleMobileViewSelect=e=>{this.view=e.key};this.handleCalendarPeriodChange=()=>{this.calendarEl&&(this.view=this.calendarEl.view,this.displayedDate=this.calendarEl.displayedDate)};this.handleCalendarEventClick=e=>{this.openEventPopover(e.event,e.anchor)};this.handleCalendarSlotClick=e=>{this.openCreateEditor(e.start)};this.handleEventPopoverToggle=e=>{if(e.newState==="open"){this.popoverTriggerEl&&this.eventPopoverEl&&(this.anchorFloatingElement(this.popoverTriggerEl,this.eventPopoverEl,{axis:"horizontal",forceFallback:!0}),this.observeAnchorVisibility(this.popoverTriggerEl,()=>this.closeEventPopover()));return}this.unanchorFloatingElement(),this.unobserveAnchorVisibility(),this.popoverTriggerEl?.focus(),this.popoverTriggerEl=void 0};this.handlePopoverEdit=()=>{let e=this.selectedEvent;this.closeEventPopover(),e&&this.openEditEditor(e)};this.handlePopoverDelete=()=>{let e=this.selectedEvent;this.closeEventPopover(),e&&this.dispatchEvent(new $(e.id))};this.handlePopoverClose=()=>{this.closeEventPopover()};this.handleEditorCreate=e=>{this.dispatchEvent(new A(e.event)),this.closeEditor()};this.handleEditorUpdate=e=>{this.dispatchEvent(new w(e.event)),this.closeEditor()};this.handleCalendarEventMove=e=>{this.dispatchEvent(new w(e.event))};this.handleEditorDelete=e=>{this.dispatchEvent(new $(e.eventId)),this.closeEditor()};this.handleEditorInput=()=>{this.editorDirty=this.drawerEditorEl?.dirty??!1};this.handleDrawerSave=()=>{this.drawerEditorEl?.requestSave()};this.handleDrawerCancel=()=>{this.closeEditor()};this.handleDrawerDelete=()=>{this.drawerEditorEl?.requestDelete()};this.handleModalSave=()=>{this.modalEditorEl?.requestSave()};this.handleModalDelete=()=>{this.modalEditorEl?.requestDelete()};this.handleModalCancel=()=>{this.closeEditor()}}updated(e){if(super.updated(e),e.has("view")||e.has("displayedDate")||e.has("weekStartsOn")){let a=y(this.view,this.displayedDate,this.weekStartsOn);this.dispatchEvent(new T(this.view,a.start,a.end))}}updateMobileMediaQuery(){this.mobileMediaQuery?.removeEventListener("change",this.handleMobileMediaChange),this.mobileMediaQuery=window.matchMedia("(max-width: 767px)"),this.mobileMediaQuery.addEventListener("change",this.handleMobileMediaChange),this.isMobile=this.mobileMediaQuery.matches}connectedCallback(){super.connectedCallback?.(),this.updateMobileMediaQuery()}disconnectedCallback(){this.mobileMediaQuery?.removeEventListener("change",this.handleMobileMediaChange),super.disconnectedCallback?.()}navigate(e){this.displayedDate=P(this.view,this.displayedDate,e)}openCreateEditor(e){this.readonly||(this.editingEvent=null,this.createStart=e,this.createEnd=E(e,1),this.openEditorSurface())}openEditEditor(e){this.readonly||(this.editingEvent=e,this.openEditorSurface())}openEventPopover(e,a){this.selectedEvent=e,this.popoverTriggerEl=a,this.updateComplete.then(()=>{let r=this.eventPopoverEl;if(!r)return;let u=this.eventPopoverAnimation!==void 0;this.eventPopoverAnimation?.cancel(),this.eventPopoverAnimation=void 0;let v=!r.matches(":popover-open");v&&r.showPopover(),(v||u)&&this.playEventPopoverOpenAnimation(r)})}eventPopoverAnimationDuration(e){if(this.noAnimation||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return 0;let a=getComputedStyle(e).getPropertyValue("--scheduler-popover-transition-duration").trim();if(a){let r=a.endsWith("ms")?Number.parseFloat(a):Number.parseFloat(a)*1e3;if(Number.isFinite(r)&&r>=0)return r}return 160}playEventPopoverOpenAnimation(e){e.style.removeProperty("pointer-events");let a=this.eventPopoverAnimationDuration(e);a!==0&&(this.eventPopoverAnimation=e.animate([{opacity:0,transform:"scale(0.98)"},{opacity:1,transform:"scale(1)"}],{duration:a,easing:"ease",fill:"forwards"}))}closeEventPopover(){let e=this.eventPopoverEl;this.eventPopoverAnimation?.cancel(),this.eventPopoverAnimation=void 0,e?.matches(":popover-open")&&this.playEventPopoverCloseAnimation(e)}playEventPopoverCloseAnimation(e){e.style.pointerEvents="none";let a=this.eventPopoverAnimationDuration(e);if(a===0){e.hidePopover();return}let r=e.animate([{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.98)"}],{duration:a,easing:"ease",fill:"forwards"});this.eventPopoverAnimation=r,r.finished.then(()=>{this.eventPopoverAnimation===r&&(this.eventPopoverAnimation=void 0),e.hidePopover()}).catch(()=>{})}openEditorSurface(){this.editorDirty=!1,this.isMobile?this.isModalOpen=!0:this.isDrawerOpen=!0}closeEditor(){this.isDrawerOpen=!1,this.isModalOpen=!1,this.editingEvent=null,this.editorDirty=!1}renderNavArrows(){return s`
|
|
337
337
|
<div id="header-nav-arrows">
|
|
338
338
|
<eun-button
|
|
339
339
|
appearance="ghost"
|
|
@@ -384,7 +384,7 @@ import{a as A,b as $}from"./chunks/chunk-IKAZYVB7.js";import{a as T}from"./chunk
|
|
|
384
384
|
appearance="flat"
|
|
385
385
|
size="s"
|
|
386
386
|
label=${this.viewLabel(this.view)}
|
|
387
|
-
.options=${
|
|
387
|
+
.options=${V.map(a=>({key:a,label:this.viewLabel(a)}))}
|
|
388
388
|
@eunselect=${this.handleMobileViewSelect}
|
|
389
389
|
></eun-dropdown-button>
|
|
390
390
|
</div>
|
|
@@ -393,7 +393,7 @@ import{a as A,b as $}from"./chunks/chunk-IKAZYVB7.js";import{a as T}from"./chunk
|
|
|
393
393
|
<eun-toggle-group
|
|
394
394
|
single
|
|
395
395
|
aria-label=${this.dictionary.scheduler.calendarView}
|
|
396
|
-
.options=${
|
|
396
|
+
.options=${V.map(a=>({label:this.viewLabel(a),value:a}))}
|
|
397
397
|
.value=${[this.view]}
|
|
398
398
|
@eunchange=${this.handleViewChange}
|
|
399
399
|
></eun-toggle-group>
|
|
@@ -414,7 +414,7 @@ import{a as A,b as $}from"./chunks/chunk-IKAZYVB7.js";import{a as T}from"./chunk
|
|
|
414
414
|
?readonly=${this.readonly}
|
|
415
415
|
?no-animation=${this.noAnimation}
|
|
416
416
|
more-events-label=${this.moreEventsLabel}
|
|
417
|
-
event-
|
|
417
|
+
event-appearance=${this.eventAppearance}
|
|
418
418
|
@eunperiodchange=${this.handleCalendarPeriodChange}
|
|
419
419
|
@euneventclick=${this.handleCalendarEventClick}
|
|
420
420
|
@eunslotclick=${this.handleCalendarSlotClick}
|
|
@@ -443,7 +443,7 @@ import{a as A,b as $}from"./chunks/chunk-IKAZYVB7.js";import{a as T}from"./chunk
|
|
|
443
443
|
></eun-scheduler-event-editor>
|
|
444
444
|
<div slot="footer" style="display: contents">
|
|
445
445
|
${this.editingEvent?s`<eun-button
|
|
446
|
-
|
|
446
|
+
color="critical"
|
|
447
447
|
appearance="outline"
|
|
448
448
|
@click=${this.handleDrawerDelete}
|
|
449
449
|
>${this.deleteLabel}</eun-button
|
|
@@ -452,7 +452,7 @@ import{a as A,b as $}from"./chunks/chunk-IKAZYVB7.js";import{a as T}from"./chunk
|
|
|
452
452
|
<eun-button appearance="ghost" @click=${this.handleDrawerCancel}
|
|
453
453
|
>${this.cancelLabel}</eun-button
|
|
454
454
|
>
|
|
455
|
-
<eun-button
|
|
455
|
+
<eun-button color="primary" @click=${this.handleDrawerSave}
|
|
456
456
|
>${this.applyLabel}</eun-button
|
|
457
457
|
>
|
|
458
458
|
</div>
|
|
@@ -477,21 +477,21 @@ import{a as A,b as $}from"./chunks/chunk-IKAZYVB7.js";import{a as T}from"./chunk
|
|
|
477
477
|
></eun-scheduler-event-editor>
|
|
478
478
|
<div slot="footer">
|
|
479
479
|
${this.editingEvent?s`<eun-button
|
|
480
|
-
|
|
480
|
+
color="critical"
|
|
481
481
|
@click=${this.handleModalDelete}
|
|
482
482
|
>${this.deleteLabel}</eun-button
|
|
483
483
|
>`:d}
|
|
484
484
|
<span style="flex: 1 1 auto;"></span>
|
|
485
|
-
<eun-button
|
|
485
|
+
<eun-button color="secondary" @click=${this.handleModalCancel}
|
|
486
486
|
>${this.cancelLabel}</eun-button
|
|
487
487
|
>
|
|
488
|
-
<eun-button
|
|
488
|
+
<eun-button color="primary" @click=${this.handleModalSave}
|
|
489
489
|
>${this.applyLabel}</eun-button
|
|
490
490
|
>
|
|
491
491
|
</div>
|
|
492
492
|
</eun-modal>
|
|
493
493
|
|
|
494
494
|
<div id="event-popover" popover @toggle=${this.handleEventPopoverToggle}>
|
|
495
|
-
${this.selectedEvent?
|
|
495
|
+
${this.selectedEvent?N({event:this.selectedEvent,locale:this.locale,editLabel:this.editLabel,deleteLabel:this.deleteLabel,closeLabel:this.closeLabel,priorityLabels:{low:"Low",medium:"Medium",high:"High",critical:"Critical"},readonly:this.readonly,onEdit:this.handlePopoverEdit,onDelete:this.handlePopoverDelete,onClose:this.handlePopoverClose}):d}
|
|
496
496
|
</div>
|
|
497
|
-
`}viewLabel(e){switch(e){case"day":return this.viewDayLabel;case"week":return this.viewWeekLabel;case"work-week":return this.viewWorkWeekLabel;case"month":return this.viewMonthLabel;case"year":return this.viewYearLabel;default:return e}}};t.styles=[z,
|
|
497
|
+
`}viewLabel(e){switch(e){case"day":return this.viewDayLabel;case"week":return this.viewWeekLabel;case"work-week":return this.viewWorkWeekLabel;case"month":return this.viewMonthLabel;case"year":return this.viewYearLabel;default:return e}}};t.styles=[z,O],i([o({attribute:!1})],t.prototype,"events",2),i([o({reflect:!0})],t.prototype,"view",2),i([o({attribute:!1})],t.prototype,"displayedDate",2),i([o({type:Number,attribute:"week-starts-on"})],t.prototype,"weekStartsOn",2),i([o({type:Number,attribute:"day-start-hour"})],t.prototype,"dayStartHour",2),i([o({type:Number,attribute:"day-end-hour"})],t.prototype,"dayEndHour",2),i([o({type:Number,attribute:"slot-duration"})],t.prototype,"slotDuration",2),i([o({type:Boolean,reflect:!0})],t.prototype,"readonly",2),i([o({type:Boolean,reflect:!0,attribute:"no-animation"})],t.prototype,"noAnimation",2),i([o({attribute:"today-label"})],t.prototype,"todayLabel",2),i([o({attribute:"new-event-label"})],t.prototype,"newEventLabel",2),i([o({attribute:"aria-label-previous"})],t.prototype,"ariaLabelPrevious",2),i([o({attribute:"aria-label-next"})],t.prototype,"ariaLabelNext",2),i([o({attribute:"view-day-label"})],t.prototype,"viewDayLabel",2),i([o({attribute:"view-week-label"})],t.prototype,"viewWeekLabel",2),i([o({attribute:"view-work-week-label"})],t.prototype,"viewWorkWeekLabel",2),i([o({attribute:"view-month-label"})],t.prototype,"viewMonthLabel",2),i([o({attribute:"view-year-label"})],t.prototype,"viewYearLabel",2),i([o({attribute:"apply-label"})],t.prototype,"applyLabel",2),i([o({attribute:"cancel-label"})],t.prototype,"cancelLabel",2),i([o({attribute:"delete-label"})],t.prototype,"deleteLabel",2),i([o({attribute:"edit-label"})],t.prototype,"editLabel",2),i([o({attribute:"close-label"})],t.prototype,"closeLabel",2),i([o({attribute:"more-events-label"})],t.prototype,"moreEventsLabel",2),i([o({attribute:"event-appearance"})],t.prototype,"eventAppearance",2),i([p()],t.prototype,"isDrawerOpen",2),i([p()],t.prototype,"isModalOpen",2),i([p()],t.prototype,"editingEvent",2),i([p()],t.prototype,"createStart",2),i([p()],t.prototype,"createEnd",2),i([p()],t.prototype,"editorDirty",2),i([p()],t.prototype,"isMobile",2),i([h("#editor")],t.prototype,"drawerEditorEl",2),i([h("#editor-mobile")],t.prototype,"modalEditorEl",2),i([p()],t.prototype,"selectedEvent",2),i([h("#event-popover")],t.prototype,"eventPopoverEl",2),i([h("#calendar")],t.prototype,"calendarEl",2),t=i([x(j)],t);function H(l){let n=new Date(l);return n.setHours(n.getHours()+1,0,0,0),n}function F(l,n,e,a,r){switch(l){case"day":return e.toLocaleDateString(r,{weekday:"long",day:"numeric",month:"long",year:"numeric"});case"year":return String(n.getFullYear());case"month":return n.toLocaleDateString(r,{month:"long",year:"numeric"});default:return`${e.toLocaleDateString(r,{day:"numeric",month:"short"})} \u2013 ${a.toLocaleDateString(r,{day:"numeric",month:"short",year:"numeric"})}`}}export{t as EunomiaScheduler,j as EunomiaSchedulerTagName};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as g}from"./chunks/chunk-
|
|
1
|
+
import{b as g}from"./chunks/chunk-EAKYD33D.js";import{a as L,b as k}from"./chunks/chunk-KBH5PCUO.js";import"./chunks/chunk-E4IS25H7.js";import{a as w,b as A}from"./chunks/chunk-5XJGYXW7.js";import{a as y}from"./chunks/chunk-LK5BJ4SH.js";import"./chunks/chunk-L65WUTXM.js";import{a as c}from"./chunks/chunk-LYYQAALT.js";import"./chunks/chunk-L74LXUGL.js";import"./chunks/chunk-LFCXUVDO.js";import"./chunks/chunk-GW3VP2L7.js";import"./chunks/chunk-OAULRKHQ.js";import{a as x}from"./chunks/chunk-YYCEPZUN.js";import"./chunks/chunk-32DTNR52.js";import{a as m}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import{a as p}from"./chunks/chunk-5EVP7YNE.js";import{a as r,f as b,g as v,h as n,i as h,j as d,n as o,p as l}from"./chunks/chunk-XH6NREVZ.js";var $=v`
|
|
2
2
|
#shortcut-hint {
|
|
3
3
|
flex-shrink: 0;
|
|
4
4
|
display: inline-flex;
|
|
@@ -68,16 +68,16 @@ import{b as g}from"./chunks/chunk-NHFWATVN.js";import{a as L,b as k}from"./chunk
|
|
|
68
68
|
background-color: var(--eun-disabled-color, #ecedf0);
|
|
69
69
|
color: var(--eun-text-disabled-color, #8d93aa);
|
|
70
70
|
}
|
|
71
|
-
:host([
|
|
71
|
+
:host([appearance="flat"]) #search-trigger {
|
|
72
72
|
border-color: transparent;
|
|
73
73
|
}
|
|
74
|
-
:host([
|
|
74
|
+
:host([appearance="underline"]) #search-trigger {
|
|
75
75
|
border: none;
|
|
76
76
|
outline: none;
|
|
77
77
|
border-bottom: var(--eun-border-width-m, 1.5px) solid var(--_borderColor);
|
|
78
78
|
border-radius: 0;
|
|
79
79
|
}
|
|
80
|
-
:host([
|
|
80
|
+
:host([appearance="underline"]) #search-trigger:focus-visible {
|
|
81
81
|
outline: none;
|
|
82
82
|
}
|
|
83
83
|
#trigger-icon {
|
|
@@ -137,18 +137,18 @@ import{b as g}from"./chunks/chunk-NHFWATVN.js";import{a as L,b as k}from"./chunk
|
|
|
137
137
|
gap: var(--eun-space-xs, 4px);
|
|
138
138
|
padding: var(--eun-space-s, 8px) var(--eun-space-m, 16px);
|
|
139
139
|
}
|
|
140
|
-
`,T=$;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.ariaLabelPanel="Search";this.loading=!1;this.loadingLabel="Loading\u2026";this.suggestions=!1;this.noResultsLabel="No results";this.isOpen=!1;this.highlightedIndex=-1;this.handleFieldPointerDown=()=>{this.fieldPointerDownAt=performance.now()};this.handleSuggestionsFieldActivate=()=>{!this.suggestions||this.panel||this.isOpen||this.openSuggestions()};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:c}),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)}disconnectedCallback(){window.removeEventListener("keydown",this.handleShortcut),super.disconnectedCallback?.()}willUpdate(e){super.willUpdate(e),this.type!=="search"&&(this.type="search")}focusTarget(){return this.panel?this.triggerEl: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))}get options(){return L(this.children)}get effectiveQuery(){return(this.value??"").trim().toLowerCase()}get filteredOptions(){let e=this.effectiveQuery;return e?this.options.filter(t=>t.label.toLowerCase().includes(e)):this.options}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){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return 0;let t=getComputedStyle(e).getPropertyValue("--field-listbox-transition-duration").trim();if(t){let s=t.endsWith("ms")?Number.parseFloat(t):Number.parseFloat(t)*1e3;if(Number.isFinite(s)&&s>=0)return s}return 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:"ease",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 s=e.animate([{opacity:1,transform:"scaleY(1)"},{opacity:0,transform:"scaleY(0.01)"}],{duration:t,easing:"ease",fill:"forwards"});this.listboxAnimation=s,s.finished.then(()=>{this.listboxAnimation===s&&(this.listboxAnimation=void 0),e.hidePopover()}).catch(()=>{})}handleSelect(e){this.value=e.label,this.dispatchEvent(new x),this.closeSuggestions()}renderSuggestionOptionRows(e){let t=[],s=this.effectiveQuery,f;return e.forEach((
|
|
141
|
-
${
|
|
140
|
+
`,T=$;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.ariaLabelPanel="Search";this.loading=!1;this.loadingLabel="Loading\u2026";this.suggestions=!1;this.noResultsLabel="No results";this.isOpen=!1;this.highlightedIndex=-1;this.handleFieldPointerDown=()=>{this.fieldPointerDownAt=performance.now()};this.handleSuggestionsFieldActivate=()=>{!this.suggestions||this.panel||this.isOpen||this.openSuggestions()};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:c}),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)}disconnectedCallback(){window.removeEventListener("keydown",this.handleShortcut),super.disconnectedCallback?.()}willUpdate(e){super.willUpdate(e),this.type!=="search"&&(this.type="search")}focusTarget(){return this.panel?this.triggerEl: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))}get options(){return L(this.children)}get effectiveQuery(){return(this.value??"").trim().toLowerCase()}get filteredOptions(){let e=this.effectiveQuery;return e?this.options.filter(t=>t.label.toLowerCase().includes(e)):this.options}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){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return 0;let t=getComputedStyle(e).getPropertyValue("--field-listbox-transition-duration").trim();if(t){let s=t.endsWith("ms")?Number.parseFloat(t):Number.parseFloat(t)*1e3;if(Number.isFinite(s)&&s>=0)return s}return 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:"ease",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 s=e.animate([{opacity:1,transform:"scaleY(1)"},{opacity:0,transform:"scaleY(0.01)"}],{duration:t,easing:"ease",fill:"forwards"});this.listboxAnimation=s,s.finished.then(()=>{this.listboxAnimation===s&&(this.listboxAnimation=void 0),e.hidePopover()}).catch(()=>{})}handleSelect(e){this.value=e.label,this.dispatchEvent(new x),this.closeSuggestions()}renderSuggestionOptionRows(e){let t=[],s=this.effectiveQuery,f;return e.forEach((a,u)=>{a.group!==f&&(f=a.group,a.group&&t.push(o`<li class="group-label" role="presentation">
|
|
141
|
+
${a.group}
|
|
142
142
|
</li>`)),t.push(o`
|
|
143
143
|
<li
|
|
144
144
|
id="listbox-option-${u}"
|
|
145
145
|
role="option"
|
|
146
|
-
aria-selected=${
|
|
147
|
-
class=${m({highlighted:u===this.highlightedIndex,selected:
|
|
148
|
-
@mousedown=${I=>{I.preventDefault(),this.handleSelect(
|
|
146
|
+
aria-selected=${a.label.toLowerCase()===s}
|
|
147
|
+
class=${m({highlighted:u===this.highlightedIndex,selected:a.label.toLowerCase()===s})}
|
|
148
|
+
@mousedown=${I=>{I.preventDefault(),this.handleSelect(a)}}
|
|
149
149
|
@mouseenter=${()=>{this.highlightedIndex=u}}
|
|
150
150
|
>
|
|
151
|
-
${k(
|
|
151
|
+
${k(a.label,s)}
|
|
152
152
|
</li>
|
|
153
153
|
`)}),t}renderSuggestionsListbox(){return o`
|
|
154
154
|
<ul
|
|
@@ -169,11 +169,11 @@ import{b as g}from"./chunks/chunk-NHFWATVN.js";import{a as L,b as k}from"./chunk
|
|
|
169
169
|
variant="spinner"
|
|
170
170
|
size="16"
|
|
171
171
|
label=${this.loadingLabel}
|
|
172
|
-
></eun-loader>`:e?
|
|
172
|
+
></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"
|
|
173
173
|
>${this.shortcutLabel}</kbd
|
|
174
|
-
>`:
|
|
174
|
+
>`:l}hasTrailingAddon(){return this.loading||this.panel||this.shortcut}renderTriggerIndicator(){return this.shortcut?o`<kbd id="shortcut-hint" aria-hidden="true"
|
|
175
175
|
>${this.shortcutLabel}</kbd
|
|
176
|
-
>`:
|
|
176
|
+
>`: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-activedescendant");return}e.setAttribute("role","combobox"),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`
|
|
177
177
|
<div id="wrapper">
|
|
178
178
|
${this.renderFormLabels("search-trigger")}
|
|
179
179
|
<button
|
|
@@ -189,7 +189,7 @@ import{b as g}from"./chunks/chunk-NHFWATVN.js";import{a as L,b as k}from"./chunk
|
|
|
189
189
|
id="trigger-icon"
|
|
190
190
|
name=${this.icon}
|
|
191
191
|
size="16"
|
|
192
|
-
></eun-icon>`:
|
|
192
|
+
></eun-icon>`:l}
|
|
193
193
|
<span id="trigger-text" class="empty">${this.placeholder||""}</span>
|
|
194
194
|
${this.renderTriggerIndicator()}
|
|
195
195
|
</button>
|
|
@@ -201,7 +201,7 @@ import{b as g}from"./chunks/chunk-NHFWATVN.js";import{a as L,b as k}from"./chunk
|
|
|
201
201
|
aria-label=${this.label||this.ariaLabelPanel}
|
|
202
202
|
>
|
|
203
203
|
<div id="panel-field">
|
|
204
|
-
${this.renderField(e!==
|
|
204
|
+
${this.renderField(e!==l)}
|
|
205
205
|
</div>
|
|
206
206
|
<div id="panel-results">
|
|
207
207
|
<slot name="results"></slot>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as D,b as P}from"./chunks/chunk-KBH5PCUO.js";import{a as O}from"./chunks/chunk-E4IS25H7.js";import{a as k,b as F}from"./chunks/chunk-5XJGYXW7.js";import{a as
|
|
1
|
+
import{a as D,b as P}from"./chunks/chunk-KBH5PCUO.js";import{a as O}from"./chunks/chunk-E4IS25H7.js";import{a as k,b as F}from"./chunks/chunk-5XJGYXW7.js";import{a as C}from"./chunks/chunk-LK5BJ4SH.js";import{a as E}from"./chunks/chunk-L65WUTXM.js";import{a as v}from"./chunks/chunk-LYYQAALT.js";import{a as A}from"./chunks/chunk-LFCXUVDO.js";import{a as T}from"./chunks/chunk-GW3VP2L7.js";import{a as $,c as I,d as M,e as b}from"./chunks/chunk-OAULRKHQ.js";import{a as f}from"./chunks/chunk-YYCEPZUN.js";import{a as w}from"./chunks/chunk-32DTNR52.js";import{a as d}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import{a as u}from"./chunks/chunk-5EVP7YNE.js";import{a as s,f as x,g as y,h as l,i as p,j as c,l as m,n as o,p as a,s as L}from"./chunks/chunk-XH6NREVZ.js";var V=y`
|
|
2
2
|
#field {
|
|
3
3
|
padding-inline-end: calc(var(--eun-space-l, 32px) * 1.2);
|
|
4
4
|
}
|
|
@@ -104,7 +104,7 @@ import{a as D,b as P}from"./chunks/chunk-KBH5PCUO.js";import{a as O}from"./chunk
|
|
|
104
104
|
outline-offset: 2px;
|
|
105
105
|
border-radius: var(--eun-border-radius-m);
|
|
106
106
|
}
|
|
107
|
-
`,H=[E,k,...v?[]:[F],V];var N="eun-select",B=w(M(L)),W=A(
|
|
107
|
+
`,H=[E,k,...v?[]:[F],V];var N="eun-select",B=w(M(L)),W=C(A(T($(O(I(B)))))),t=class extends W{constructor(){super(...arguments);this.searchable=!1;this.native=!1;this.multiple=!1;this.noAnimation=!1;this.searchPlaceholder="Search\u2026";this.selectPlaceholder="Select\u2026";this.emptyValueLabel="No value set";this.noResultsLabel="No results";this.confirmLabel="Confirm";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:v}),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 D(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}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.setAttribute("tabindex",this.disabled||this.readonly?"-1":"0"))}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){if(this.noAnimation||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return 0;let i=getComputedStyle(e).getPropertyValue("--field-listbox-transition-duration").trim();if(i){let n=i.endsWith("ms")?Number.parseFloat(i):Number.parseFloat(i)*1e3;if(Number.isFinite(n)&&n>=0)return n}return 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:"ease",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 n=e.animate([{opacity:1,transform:"scaleY(1)"},{opacity:0,transform:"scaleY(0.01)"}],{duration:i,easing:"ease",fill:"forwards"});this.listboxAnimation=n,n.finished.then(()=>{this.listboxAnimation===n&&(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(n=>n!==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}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 n=(this.highlightedIndex+1)%i.length,r=[...i.slice(n),...i.slice(0,n)].findIndex(h=>h.label.toLowerCase().startsWith(this.typeaheadBuffer));r!==-1&&(this.highlightedIndex=(n+r)%i.length)}renderHighlighted(e){return P(e,this.effectiveQuery)}renderOptionRows(e){let i=[],n;return e.forEach((r,h)=>{r.group!==n&&(n=r.group,r.group&&i.push(o`<li class="group-label" role="presentation">
|
|
108
108
|
${r.group}
|
|
109
109
|
</li>`));let g=this.isSelected(r);i.push(o`
|
|
110
110
|
<li
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as C}from"./chunks/chunk-GW3VP2L7.js";import{a as _,c as y,d as w,e as d}from"./chunks/chunk-OAULRKHQ.js";import{a as x}from"./chunks/chunk-YYCEPZUN.js";import{a as k}from"./chunks/chunk-
|
|
1
|
+
import{a as C}from"./chunks/chunk-GW3VP2L7.js";import{a as _,c as y,d as w,e as d}from"./chunks/chunk-OAULRKHQ.js";import{a as x}from"./chunks/chunk-YYCEPZUN.js";import{a as k}from"./chunks/chunk-32DTNR52.js";import{a as h}from"./chunks/chunk-MMLIPCOY.js";import{a as g}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import{a as f}from"./chunks/chunk-5EVP7YNE.js";import{a,f as p,g as m,h as o,i as c,j as b,n as s,p as l,s as v}from"./chunks/chunk-XH6NREVZ.js";var $=m`
|
|
2
2
|
:host {
|
|
3
3
|
--_trackHeight: var(--slider-track-height, 6px);
|
|
4
4
|
--_trackColor: var(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as u,b as s}from"./chunks/chunk-RIFF2D2F.js";import"./chunks/chunk-UDOZRIJZ.js";import{a as h}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import{a as f,b as p}from"./chunks/chunk-
|
|
1
|
+
import{a as u,b as s}from"./chunks/chunk-RIFF2D2F.js";import"./chunks/chunk-UDOZRIJZ.js";import{a as h}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import{a as f,b as p}from"./chunks/chunk-SD2WHGPF.js";import"./chunks/chunk-SJWRE6PW.js";import{a as n}from"./chunks/chunk-5EVP7YNE.js";import"./chunks/chunk-5GKM5DIB.js";import{a as t,f as o,g as d,h as l,i as a,n as r,s as c}from"./chunks/chunk-XH6NREVZ.js";var g=d`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as k}from"./chunks/chunk-GU6BVMFJ.js";import{a as f,c as b,d as p,e as t}from"./chunks/chunk-OAULRKHQ.js";import"./chunks/chunk-YYCEPZUN.js";import{a as h}from"./chunks/chunk-
|
|
1
|
+
import{a as k}from"./chunks/chunk-GU6BVMFJ.js";import{a as f,c as b,d as p,e as t}from"./chunks/chunk-OAULRKHQ.js";import"./chunks/chunk-YYCEPZUN.js";import{a as h}from"./chunks/chunk-32DTNR52.js";import{a as u}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import{a as d}from"./chunks/chunk-5EVP7YNE.js";import{a as e,f as c,g as n,h as a,n as i,p as s,s as l}from"./chunks/chunk-XH6NREVZ.js";var g=n`
|
|
2
2
|
:host {
|
|
3
3
|
--_trackWidth: var(--switch-track-width, 40px);
|
|
4
4
|
--_trackHeight: var(--switch-track-height, 22px);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as k}from"./chunks/chunk-EST3M4AO.js";import{b as D}from"./chunks/chunk-
|
|
1
|
+
import{a as k}from"./chunks/chunk-EST3M4AO.js";import{b as D}from"./chunks/chunk-NBIENHLV.js";import{a as S}from"./chunks/chunk-E5LQKBFI.js";import{a as P}from"./chunks/chunk-SD2H5UDZ.js";import"./chunks/chunk-32DTNR52.js";import"./chunks/chunk-VRGRCYIO.js";import{a as c}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import{a as x}from"./chunks/chunk-5EVP7YNE.js";import{a as o,f as y,g as w,h as l,j as d,l as h,n as T,s as E}from"./chunks/chunk-XH6NREVZ.js";var p=class C extends Event{static{this.eventName="tabchange"}constructor(v){super(C.eventName),this.active=v.active}};var N=w`
|
|
2
2
|
:host {
|
|
3
3
|
--_swipe-duration: var(--tab-panel-swipe-duration, 200ms);
|
|
4
4
|
--_indicator-height: var(--tab-indicator-height, 2px);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunks/chunk-
|
|
1
|
+
import{a,b}from"./chunks/chunk-NBIENHLV.js";import"./chunks/chunk-32DTNR52.js";import"./chunks/chunk-VRGRCYIO.js";import"./chunks/chunk-XH6NREVZ.js";export{b as EunomiaTab,a as EunomiaTabTagName};
|