@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
|
@@ -74,16 +74,16 @@ const search = css `
|
|
|
74
74
|
background-color: var(--eun-disabled-color, #ecedf0);
|
|
75
75
|
color: var(--eun-text-disabled-color, #8d93aa);
|
|
76
76
|
}
|
|
77
|
-
:host([
|
|
77
|
+
:host([appearance="flat"]) #search-trigger {
|
|
78
78
|
border-color: transparent;
|
|
79
79
|
}
|
|
80
|
-
:host([
|
|
80
|
+
:host([appearance="underline"]) #search-trigger {
|
|
81
81
|
border: none;
|
|
82
82
|
outline: none;
|
|
83
83
|
border-bottom: var(--eun-border-width-m, 1.5px) solid var(--_borderColor);
|
|
84
84
|
border-radius: 0;
|
|
85
85
|
}
|
|
86
|
-
:host([
|
|
86
|
+
:host([appearance="underline"]) #search-trigger:focus-visible {
|
|
87
87
|
outline: none;
|
|
88
88
|
}
|
|
89
89
|
#trigger-icon {
|
|
@@ -5,7 +5,7 @@ import { ValidatorsMixinInterface } from "../../../mixins/validators.mixin.js";
|
|
|
5
5
|
import { FormMixinInterface } from "../../../mixins/form.mixin.js";
|
|
6
6
|
import { FormLabelMixinInterface } from "../../../mixins/form-label.mixin.js";
|
|
7
7
|
import { EditableMixinInterface } from "../../../mixins/editable.mixin.js";
|
|
8
|
-
import {
|
|
8
|
+
import { FieldAppearanceMixinInterface } from "../../../mixins/field-appearance.mixin.js";
|
|
9
9
|
import { AnchorPositionMixinInterface } from "../../../mixins/anchor-position.mixin.js";
|
|
10
10
|
import { EunomiaIconName } from "../../content/icon/icon.type.js";
|
|
11
11
|
import { Constructor } from "../../../utils/constructor.type.js";
|
|
@@ -22,7 +22,7 @@ type SelectValue = string | string[];
|
|
|
22
22
|
* Type of the select base used to declare every necessary Mixin interface elements.
|
|
23
23
|
* @internal
|
|
24
24
|
*/
|
|
25
|
-
type EunomiaSelectBase = LitElement & DisabledMixinInterface & ReadonlyMixinInterface & ValidatorsMixinInterface<SelectValue> & FormMixinInterface<SelectValue> & EditableMixinInterface & FormLabelMixinInterface &
|
|
25
|
+
type EunomiaSelectBase = LitElement & DisabledMixinInterface & ReadonlyMixinInterface & ValidatorsMixinInterface<SelectValue> & FormMixinInterface<SelectValue> & EditableMixinInterface & FormLabelMixinInterface & FieldAppearanceMixinInterface & AnchorPositionMixinInterface;
|
|
26
26
|
declare const EunomiaSelectMixinBase: Constructor<EunomiaSelectBase>;
|
|
27
27
|
/**
|
|
28
28
|
* A field that picks one or more values from a list of option and optgroup
|
|
@@ -49,7 +49,7 @@ declare const EunomiaSelectMixinBase: Constructor<EunomiaSelectBase>;
|
|
|
49
49
|
* @prop {boolean} [searchable=false] - Whether the field filters its options as the user types. When false, the field is read only and driven by arrow keys, Enter, and type-ahead. Ignored while native is set
|
|
50
50
|
* @prop {boolean} [native=false] - Renders the field as a real select, using the browser's own dropdown instead of the listbox panel. Takes priority over searchable and multiple, neither of which a native dropdown can support
|
|
51
51
|
* @prop {boolean} [multiple=false] - Whether more than one option can be picked at once. Each option then renders a checkbox, and picking one toggles it without closing the dropdown, so value becomes an array of every picked option's value. Ignored while native is set
|
|
52
|
-
* @prop {'outline' | '
|
|
52
|
+
* @prop {'outline' | 'flat' | 'underline'} [appearance='outline'] - How the field's surface is drawn: a bordered box, a muted background with no border, or a bottom border only
|
|
53
53
|
* @prop {string} label - The title label of the field, rendered through the label component
|
|
54
54
|
* @prop {string} instructions - Instructions displayed below the label
|
|
55
55
|
* @prop {string} name - The field name
|
|
@@ -15,7 +15,7 @@ import { ValidatorsMixin, } from "../../../mixins/validators.mixin.js";
|
|
|
15
15
|
import { FormMixin } from "../../../mixins/form.mixin.js";
|
|
16
16
|
import { FormLabelMixin, } from "../../../mixins/form-label.mixin.js";
|
|
17
17
|
import { EditableMixin, } from "../../../mixins/editable.mixin.js";
|
|
18
|
-
import {
|
|
18
|
+
import { FieldAppearanceMixin, } from "../../../mixins/field-appearance.mixin.js";
|
|
19
19
|
import { AnchorPositionMixin, } from "../../../mixins/anchor-position.mixin.js";
|
|
20
20
|
import { ChangeEvent } from "../../../events/change.event.js";
|
|
21
21
|
import { formLabelsStyles } from "../shared-styles/form-labels.styles.js";
|
|
@@ -31,7 +31,7 @@ export const EunomiaSelectTagName = "eun-select";
|
|
|
31
31
|
* @internal
|
|
32
32
|
*/
|
|
33
33
|
const Base = DisabledMixin(ValidatorsMixin(LitElement));
|
|
34
|
-
const EunomiaSelectMixinBase = AnchorPositionMixin(
|
|
34
|
+
const EunomiaSelectMixinBase = AnchorPositionMixin(FieldAppearanceMixin(FormLabelMixin(ReadonlyMixin(EditableMixin(FormMixin(Base))))));
|
|
35
35
|
/**
|
|
36
36
|
* A field that picks one or more values from a list of option and optgroup
|
|
37
37
|
* children. Set searchable to let the field also filter that list as the
|
|
@@ -57,7 +57,7 @@ const EunomiaSelectMixinBase = AnchorPositionMixin(FieldVariantMixin(FormLabelMi
|
|
|
57
57
|
* @prop {boolean} [searchable=false] - Whether the field filters its options as the user types. When false, the field is read only and driven by arrow keys, Enter, and type-ahead. Ignored while native is set
|
|
58
58
|
* @prop {boolean} [native=false] - Renders the field as a real select, using the browser's own dropdown instead of the listbox panel. Takes priority over searchable and multiple, neither of which a native dropdown can support
|
|
59
59
|
* @prop {boolean} [multiple=false] - Whether more than one option can be picked at once. Each option then renders a checkbox, and picking one toggles it without closing the dropdown, so value becomes an array of every picked option's value. Ignored while native is set
|
|
60
|
-
* @prop {'outline' | '
|
|
60
|
+
* @prop {'outline' | 'flat' | 'underline'} [appearance='outline'] - How the field's surface is drawn: a bordered box, a muted background with no border, or a bottom border only
|
|
61
61
|
* @prop {string} label - The title label of the field, rendered through the label component
|
|
62
62
|
* @prop {string} instructions - Instructions displayed below the label
|
|
63
63
|
* @prop {string} name - The field name
|
|
@@ -117,22 +117,22 @@ const base = css `
|
|
|
117
117
|
#field[aria-invalid="true"]:focus-visible {
|
|
118
118
|
outline-color: var(--_errorColor);
|
|
119
119
|
}
|
|
120
|
-
:host([
|
|
120
|
+
:host([appearance="flat"]) {
|
|
121
121
|
--_background: var(--field-background, var(--eun-content-hover, #edeff0));
|
|
122
122
|
}
|
|
123
|
-
:host([
|
|
123
|
+
:host([appearance="flat"]) #field:not(:hover) {
|
|
124
124
|
border-color: transparent;
|
|
125
125
|
}
|
|
126
|
-
:host([
|
|
126
|
+
:host([appearance="flat"]) #field[aria-invalid="true"] {
|
|
127
127
|
box-shadow: inset 0 0 0 var(--eun-border-width-m, 1.5px) var(--_errorColor);
|
|
128
128
|
}
|
|
129
|
-
:host([
|
|
129
|
+
:host([appearance="underline"]) #field {
|
|
130
130
|
border: none;
|
|
131
131
|
outline: none;
|
|
132
132
|
border-bottom: var(--eun-border-width-m, 1.5px) solid var(--_borderColor);
|
|
133
133
|
border-radius: 0;
|
|
134
134
|
}
|
|
135
|
-
:host([
|
|
135
|
+
:host([appearance="underline"]) #field:focus-visible {
|
|
136
136
|
outline: none;
|
|
137
137
|
}
|
|
138
138
|
slot[name="icon"] {
|
|
@@ -5,7 +5,7 @@ import { ValidatorsMixinInterface, Validity } from "../../../mixins/validators.m
|
|
|
5
5
|
import { FormMixinInterface } from "../../../mixins/form.mixin.js";
|
|
6
6
|
import { FormLabelMixinInterface } from "../../../mixins/form-label.mixin.js";
|
|
7
7
|
import { EditableMixinInterface } from "../../../mixins/editable.mixin.js";
|
|
8
|
-
import {
|
|
8
|
+
import { FieldAppearanceMixinInterface } from "../../../mixins/field-appearance.mixin.js";
|
|
9
9
|
import { Constructor } from "../../../utils/constructor.type.js";
|
|
10
10
|
/**
|
|
11
11
|
* Tag name of the textarea component.
|
|
@@ -15,7 +15,7 @@ export declare const EunomiaTextareaTagName = "eun-textarea";
|
|
|
15
15
|
* Type of the textarea base used to declare every necessary Mixin interface elements.
|
|
16
16
|
* @internal
|
|
17
17
|
*/
|
|
18
|
-
type EunomiaTextareaBase = LitElement & DisabledMixinInterface & ReadonlyMixinInterface & ValidatorsMixinInterface<string> & FormMixinInterface<string> & EditableMixinInterface & FormLabelMixinInterface &
|
|
18
|
+
type EunomiaTextareaBase = LitElement & DisabledMixinInterface & ReadonlyMixinInterface & ValidatorsMixinInterface<string> & FormMixinInterface<string> & EditableMixinInterface & FormLabelMixinInterface & FieldAppearanceMixinInterface;
|
|
19
19
|
declare const EunomiaTextareaMixinBase: Constructor<EunomiaTextareaBase>;
|
|
20
20
|
/**
|
|
21
21
|
* A multi-line text field, sharing its label, hint, and error chrome and
|
|
@@ -34,7 +34,7 @@ declare const EunomiaTextareaMixinBase: Constructor<EunomiaTextareaBase>;
|
|
|
34
34
|
* typed by hand. See the Accessibility tab for the full keyboard and ARIA
|
|
35
35
|
* details of the toolbar and both readonly behaviors.
|
|
36
36
|
*
|
|
37
|
-
* @prop {'outline' | '
|
|
37
|
+
* @prop {'outline' | 'flat' | 'underline'} [appearance='outline'] - How the field's surface is drawn: a bordered box, a muted background with no border, or a bottom border only
|
|
38
38
|
* @prop {string} label - The title label of the field, rendered through the label component
|
|
39
39
|
* @prop {string} instructions - Instructions displayed below the label
|
|
40
40
|
* @prop {string} placeholder - The placeholder shown when the field is empty
|
|
@@ -15,7 +15,7 @@ import { ValidatorsMixin, } from "../../../mixins/validators.mixin.js";
|
|
|
15
15
|
import { FormMixin } from "../../../mixins/form.mixin.js";
|
|
16
16
|
import { FormLabelMixin, } from "../../../mixins/form-label.mixin.js";
|
|
17
17
|
import { EditableMixin, } from "../../../mixins/editable.mixin.js";
|
|
18
|
-
import {
|
|
18
|
+
import { FieldAppearanceMixin, } from "../../../mixins/field-appearance.mixin.js";
|
|
19
19
|
import { ChangeEvent } from "../../../events/change.event.js";
|
|
20
20
|
import { findRichTextColor, formatRichText, getPlainTextLength, populateEditableRoot, RICH_TEXT_COLORS, serializeEditableRoot, splitAlign, } from "../../../utils/rich-text.utils.js";
|
|
21
21
|
import { formLabelsStyles } from "../shared-styles/form-labels.styles.js";
|
|
@@ -467,7 +467,7 @@ function getActiveColorName(root, kind) {
|
|
|
467
467
|
* @internal
|
|
468
468
|
*/
|
|
469
469
|
const Base = DisabledMixin(ValidatorsMixin(LitElement));
|
|
470
|
-
const EunomiaTextareaMixinBase =
|
|
470
|
+
const EunomiaTextareaMixinBase = FieldAppearanceMixin(FormLabelMixin(ReadonlyMixin(EditableMixin(FormMixin(Base)))));
|
|
471
471
|
/**
|
|
472
472
|
* A multi-line text field, sharing its label, hint, and error chrome and
|
|
473
473
|
* theming with the input component. It grows and shrinks to fit its
|
|
@@ -485,7 +485,7 @@ const EunomiaTextareaMixinBase = FieldVariantMixin(FormLabelMixin(ReadonlyMixin(
|
|
|
485
485
|
* typed by hand. See the Accessibility tab for the full keyboard and ARIA
|
|
486
486
|
* details of the toolbar and both readonly behaviors.
|
|
487
487
|
*
|
|
488
|
-
* @prop {'outline' | '
|
|
488
|
+
* @prop {'outline' | 'flat' | 'underline'} [appearance='outline'] - How the field's surface is drawn: a bordered box, a muted background with no border, or a bottom border only
|
|
489
489
|
* @prop {string} label - The title label of the field, rendered through the label component
|
|
490
490
|
* @prop {string} instructions - Instructions displayed below the label
|
|
491
491
|
* @prop {string} placeholder - The placeholder shown when the field is empty
|
|
@@ -1625,7 +1625,7 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
|
|
|
1625
1625
|
<eun-button
|
|
1626
1626
|
class="cancel"
|
|
1627
1627
|
size="s"
|
|
1628
|
-
|
|
1628
|
+
color="critical"
|
|
1629
1629
|
appearance="flat"
|
|
1630
1630
|
rounded
|
|
1631
1631
|
type="button"
|
|
@@ -4,7 +4,7 @@ import { ReadonlyMixinInterface } from "../../../mixins/readonly.mixin.js";
|
|
|
4
4
|
import { ValidatorsMixinInterface, Validity } from "../../../mixins/validators.mixin.js";
|
|
5
5
|
import { FormMixinInterface } from "../../../mixins/form.mixin.js";
|
|
6
6
|
import { FormLabelMixinInterface } from "../../../mixins/form-label.mixin.js";
|
|
7
|
-
import {
|
|
7
|
+
import { FieldAppearanceMixinInterface } from "../../../mixins/field-appearance.mixin.js";
|
|
8
8
|
import { AnchorPositionMixinInterface } from "../../../mixins/anchor-position.mixin.js";
|
|
9
9
|
import { LocalizableMixinInterface } from "../../../mixins/localizable.mixin.js";
|
|
10
10
|
import { Constructor } from "../../../utils/constructor.type.js";
|
|
@@ -19,7 +19,7 @@ export declare const EunomiaTimePickerTagName = "eun-time-picker";
|
|
|
19
19
|
* interface element.
|
|
20
20
|
* @internal
|
|
21
21
|
*/
|
|
22
|
-
type EunomiaTimePickerBase = LitElement & DisabledMixinInterface & ReadonlyMixinInterface & ValidatorsMixinInterface<Date | null> & FormMixinInterface<Date | null> & FormLabelMixinInterface &
|
|
22
|
+
type EunomiaTimePickerBase = LitElement & DisabledMixinInterface & ReadonlyMixinInterface & ValidatorsMixinInterface<Date | null> & FormMixinInterface<Date | null> & FormLabelMixinInterface & FieldAppearanceMixinInterface & AnchorPositionMixinInterface & LocalizableMixinInterface;
|
|
23
23
|
declare const EunomiaTimePickerMixinBase: Constructor<EunomiaTimePickerBase>;
|
|
24
24
|
/**
|
|
25
25
|
* A time field entered across segmented numeric hour and minute inputs,
|
|
@@ -39,7 +39,7 @@ declare const EunomiaTimePickerMixinBase: Constructor<EunomiaTimePickerBase>;
|
|
|
39
39
|
* each hour, minute, and period column is its own spin button, grouped
|
|
40
40
|
* under a labeled group.
|
|
41
41
|
*
|
|
42
|
-
* @prop {'outline' | '
|
|
42
|
+
* @prop {'outline' | 'flat' | 'underline'} [appearance='outline'] - How the field's surface is drawn: a bordered box, a muted background with no border, or a bottom border only
|
|
43
43
|
* @prop {Date | null} value - The picked instant
|
|
44
44
|
* @prop {Date | null} defaultValue - The default value applied when the field connects, and restored on form reset
|
|
45
45
|
* @prop {string} [timezone] - The time zone the hour and minute are displayed and edited in. Defaults to the runtime's own
|
|
@@ -11,7 +11,7 @@ import { ReadonlyMixin, } from "../../../mixins/readonly.mixin.js";
|
|
|
11
11
|
import { ValidatorsMixin, } from "../../../mixins/validators.mixin.js";
|
|
12
12
|
import { FormMixin } from "../../../mixins/form.mixin.js";
|
|
13
13
|
import { FormLabelMixin, } from "../../../mixins/form-label.mixin.js";
|
|
14
|
-
import {
|
|
14
|
+
import { FieldAppearanceMixin, } from "../../../mixins/field-appearance.mixin.js";
|
|
15
15
|
import { AnchorPositionMixin, } from "../../../mixins/anchor-position.mixin.js";
|
|
16
16
|
import { LocalizableMixin, } from "../../../mixins/localizable.mixin.js";
|
|
17
17
|
import { ChangeEvent } from "../../../events/change.event.js";
|
|
@@ -34,7 +34,7 @@ export const EunomiaTimePickerTagName = "eun-time-picker";
|
|
|
34
34
|
* @internal
|
|
35
35
|
*/
|
|
36
36
|
const Base = DisabledMixin(ValidatorsMixin(LitElement));
|
|
37
|
-
const EunomiaTimePickerMixinBase = LocalizableMixin(AnchorPositionMixin(
|
|
37
|
+
const EunomiaTimePickerMixinBase = LocalizableMixin(AnchorPositionMixin(FieldAppearanceMixin(FormLabelMixin(ReadonlyMixin(FormMixin(Base))))));
|
|
38
38
|
/**
|
|
39
39
|
* A time field entered across segmented numeric hour and minute inputs,
|
|
40
40
|
* plus an AM/PM toggle segment at a 12-hour format, with a trailing clock
|
|
@@ -53,7 +53,7 @@ const EunomiaTimePickerMixinBase = LocalizableMixin(AnchorPositionMixin(FieldVar
|
|
|
53
53
|
* each hour, minute, and period column is its own spin button, grouped
|
|
54
54
|
* under a labeled group.
|
|
55
55
|
*
|
|
56
|
-
* @prop {'outline' | '
|
|
56
|
+
* @prop {'outline' | 'flat' | 'underline'} [appearance='outline'] - How the field's surface is drawn: a bordered box, a muted background with no border, or a bottom border only
|
|
57
57
|
* @prop {Date | null} value - The picked instant
|
|
58
58
|
* @prop {Date | null} defaultValue - The default value applied when the field connects, and restored on form reset
|
|
59
59
|
* @prop {string} [timezone] - The time zone the hour and minute are displayed and edited in. Defaults to the runtime's own
|
|
@@ -55,22 +55,22 @@ const timePicker = css `
|
|
|
55
55
|
:host([aria-invalid="true"]) #field-wrapper:focus-within {
|
|
56
56
|
outline-color: var(--_errorColor);
|
|
57
57
|
}
|
|
58
|
-
:host([
|
|
58
|
+
:host([appearance="flat"]) {
|
|
59
59
|
--_background: var(--field-background, var(--eun-content-hover, #edeff0));
|
|
60
60
|
}
|
|
61
|
-
:host([
|
|
61
|
+
:host([appearance="flat"]) #field-wrapper {
|
|
62
62
|
border-color: transparent;
|
|
63
63
|
}
|
|
64
|
-
:host([
|
|
64
|
+
:host([appearance="flat"][aria-invalid="true"]) #field-wrapper {
|
|
65
65
|
box-shadow: inset 0 0 0 var(--eun-border-width-m, 1.5px) var(--_errorColor);
|
|
66
66
|
}
|
|
67
|
-
:host([
|
|
67
|
+
:host([appearance="underline"]) #field-wrapper {
|
|
68
68
|
border: none;
|
|
69
69
|
outline: none;
|
|
70
70
|
border-bottom: var(--eun-border-width-m, 1.5px) solid var(--_borderColor);
|
|
71
71
|
border-radius: 0;
|
|
72
72
|
}
|
|
73
|
-
:host([
|
|
73
|
+
:host([appearance="underline"]) #field-wrapper:focus-within {
|
|
74
74
|
outline: none;
|
|
75
75
|
}
|
|
76
76
|
.segment-group {
|
|
@@ -129,6 +129,14 @@ export declare class EunomiaAnimate extends LitElement {
|
|
|
129
129
|
* @private
|
|
130
130
|
*/
|
|
131
131
|
private teardownObserver;
|
|
132
|
+
/**
|
|
133
|
+
* Forwards `duration`/`delay` to the host's transition through a
|
|
134
|
+
* shadow-internal `<style>`, only when they differ from the stylesheet's
|
|
135
|
+
* own defaults : an inline style on the host would be a hydration
|
|
136
|
+
* mismatch for an SSR framework, since the server never renders it.
|
|
137
|
+
* @private
|
|
138
|
+
*/
|
|
139
|
+
private renderTiming;
|
|
132
140
|
render(): TemplateResult;
|
|
133
141
|
}
|
|
134
142
|
declare global {
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { customElement, property } from "lit/decorators.js";
|
|
8
|
-
import { html, LitElement } from "lit";
|
|
8
|
+
import { html, LitElement, nothing } from "lit";
|
|
9
9
|
import { animateStyles } from "./animate.styles.js";
|
|
10
10
|
/**
|
|
11
11
|
* Tag name of the animate component.
|
|
@@ -105,12 +105,6 @@ let EunomiaAnimate = class EunomiaAnimate extends LitElement {
|
|
|
105
105
|
}
|
|
106
106
|
updated(changed) {
|
|
107
107
|
super.updated(changed);
|
|
108
|
-
if (changed.has("duration")) {
|
|
109
|
-
this.style.setProperty("--_duration", `${this.duration}ms`);
|
|
110
|
-
}
|
|
111
|
-
if (changed.has("delay")) {
|
|
112
|
-
this.style.setProperty("--_delay", `${this.delay}ms`);
|
|
113
|
-
}
|
|
114
108
|
if (this.isConnected &&
|
|
115
109
|
(changed.has("animation") ||
|
|
116
110
|
changed.has("tabletAnimation") ||
|
|
@@ -155,8 +149,26 @@ let EunomiaAnimate = class EunomiaAnimate extends LitElement {
|
|
|
155
149
|
this.observer?.disconnect();
|
|
156
150
|
this.observer = undefined;
|
|
157
151
|
}
|
|
152
|
+
/**
|
|
153
|
+
* Forwards `duration`/`delay` to the host's transition through a
|
|
154
|
+
* shadow-internal `<style>`, only when they differ from the stylesheet's
|
|
155
|
+
* own defaults : an inline style on the host would be a hydration
|
|
156
|
+
* mismatch for an SSR framework, since the server never renders it.
|
|
157
|
+
* @private
|
|
158
|
+
*/
|
|
159
|
+
renderTiming() {
|
|
160
|
+
const rules = [
|
|
161
|
+
this.duration !== 600 ? `--_duration: ${Number(this.duration)}ms;` : "",
|
|
162
|
+
this.delay !== 0 ? `--_delay: ${Number(this.delay)}ms;` : "",
|
|
163
|
+
].join("");
|
|
164
|
+
return rules
|
|
165
|
+
? html `<style>
|
|
166
|
+
:host { ${rules} }
|
|
167
|
+
</style>`
|
|
168
|
+
: nothing;
|
|
169
|
+
}
|
|
158
170
|
render() {
|
|
159
|
-
return html
|
|
171
|
+
return html `${this.renderTiming()}<slot></slot>`;
|
|
160
172
|
}
|
|
161
173
|
};
|
|
162
174
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement, PropertyValues, TemplateResult } from "lit";
|
|
2
2
|
import { WeekStartsOn } from "../../../utils/date.utils.js";
|
|
3
3
|
import { EunomiaSchedulerEvent, EunomiaSchedulerView } from "../shared/scheduler.types.js";
|
|
4
|
-
import { type
|
|
4
|
+
import { type EunomiaSchedulerEventAppearance } from "../scheduler-event/scheduler-event.js";
|
|
5
5
|
/**
|
|
6
6
|
* Tag name of the calendar component.
|
|
7
7
|
*/
|
|
@@ -51,8 +51,8 @@ export declare const EunomiaCalendarTagName = "eun-calendar";
|
|
|
51
51
|
* @prop {boolean} [readonly=false] - Disables the slot click event, removing the create-here affordance, and event-chip dragging. View only
|
|
52
52
|
* @prop {boolean} [noAnimation=false] - Disables the mobile swipe slide animation
|
|
53
53
|
* @prop {string} [moreEventsLabel='+{count} more'] - The template for the month view's overflow affordance, with the placeholder replaced by the hidden event count
|
|
54
|
-
* @prop {'default' | 'transparent' | 'ghost'} [
|
|
55
|
-
* @attr {'default' | 'transparent' | 'ghost'} [event-
|
|
54
|
+
* @prop {'default' | 'transparent' | 'ghost'} [eventAppearance='default'] - The appearance applied to day, week, and work week event chips. Month view is unaffected, always picking ghost, or default for multi-day bars, itself
|
|
55
|
+
* @attr {'default' | 'transparent' | 'ghost'} [event-appearance='default'] - The visual variant applied to day, week, and work week event chips
|
|
56
56
|
* @fires {EventClickEvent} euneventclick - Fired when an event chip is clicked
|
|
57
57
|
* @fires {SlotClickEvent} eunslotclick - Fired when an empty hour-grid slot is clicked
|
|
58
58
|
* @fires {EventUpdateEvent} euneventupdate - Fired when a day, week, or work week event chip is dragged to a new time or day and dropped
|
|
@@ -124,13 +124,13 @@ export declare class EunomiaCalendar extends LitElement {
|
|
|
124
124
|
/** @default +{count} more */
|
|
125
125
|
moreEventsLabel: string;
|
|
126
126
|
/**
|
|
127
|
-
* The
|
|
128
|
-
* `month` view is unaffected — it always picks its own
|
|
127
|
+
* The appearance applied to day/week/work-week event chips.
|
|
128
|
+
* `month` view is unaffected — it always picks its own appearance per
|
|
129
129
|
* event (`ghost` unless the event spans multiple days ; see
|
|
130
130
|
* `scheduler-month-view.ts`'s own doc on `MonthViewProps`).
|
|
131
131
|
* @default default
|
|
132
132
|
*/
|
|
133
|
-
|
|
133
|
+
eventAppearance: EunomiaSchedulerEventAppearance;
|
|
134
134
|
/**
|
|
135
135
|
* The calendar cell currently in the roving-tabindex focus position, in
|
|
136
136
|
* month/year view — kept in sync with {@link displayedDate} (see
|
|
@@ -101,8 +101,8 @@ const HOUR_GRID_SLOT_HEIGHT = 24;
|
|
|
101
101
|
* @prop {boolean} [readonly=false] - Disables the slot click event, removing the create-here affordance, and event-chip dragging. View only
|
|
102
102
|
* @prop {boolean} [noAnimation=false] - Disables the mobile swipe slide animation
|
|
103
103
|
* @prop {string} [moreEventsLabel='+{count} more'] - The template for the month view's overflow affordance, with the placeholder replaced by the hidden event count
|
|
104
|
-
* @prop {'default' | 'transparent' | 'ghost'} [
|
|
105
|
-
* @attr {'default' | 'transparent' | 'ghost'} [event-
|
|
104
|
+
* @prop {'default' | 'transparent' | 'ghost'} [eventAppearance='default'] - The appearance applied to day, week, and work week event chips. Month view is unaffected, always picking ghost, or default for multi-day bars, itself
|
|
105
|
+
* @attr {'default' | 'transparent' | 'ghost'} [event-appearance='default'] - The visual variant applied to day, week, and work week event chips
|
|
106
106
|
* @fires {EventClickEvent} euneventclick - Fired when an event chip is clicked
|
|
107
107
|
* @fires {SlotClickEvent} eunslotclick - Fired when an empty hour-grid slot is clicked
|
|
108
108
|
* @fires {EventUpdateEvent} euneventupdate - Fired when a day, week, or work week event chip is dragged to a new time or day and dropped
|
|
@@ -164,13 +164,13 @@ let EunomiaCalendar = class EunomiaCalendar extends LitElement {
|
|
|
164
164
|
/** @default +{count} more */
|
|
165
165
|
this.moreEventsLabel = "+{count} more";
|
|
166
166
|
/**
|
|
167
|
-
* The
|
|
168
|
-
* `month` view is unaffected — it always picks its own
|
|
167
|
+
* The appearance applied to day/week/work-week event chips.
|
|
168
|
+
* `month` view is unaffected — it always picks its own appearance per
|
|
169
169
|
* event (`ghost` unless the event spans multiple days ; see
|
|
170
170
|
* `scheduler-month-view.ts`'s own doc on `MonthViewProps`).
|
|
171
171
|
* @default default
|
|
172
172
|
*/
|
|
173
|
-
this.
|
|
173
|
+
this.eventAppearance = "default";
|
|
174
174
|
/**
|
|
175
175
|
* The calendar cell currently in the roving-tabindex focus position, in
|
|
176
176
|
* month/year view — kept in sync with {@link displayedDate} (see
|
|
@@ -856,7 +856,7 @@ let EunomiaCalendar = class EunomiaCalendar extends LitElement {
|
|
|
856
856
|
const ghost = document.createElement(EunomiaSchedulerEventCardTagName);
|
|
857
857
|
ghost.label = event.title;
|
|
858
858
|
ghost.color = event.color;
|
|
859
|
-
ghost.
|
|
859
|
+
ghost.appearance = this.eventAppearance;
|
|
860
860
|
ghost.locale = this.locale;
|
|
861
861
|
ghost.start = event.start;
|
|
862
862
|
ghost.end = event.end;
|
|
@@ -989,7 +989,7 @@ let EunomiaCalendar = class EunomiaCalendar extends LitElement {
|
|
|
989
989
|
slotDuration: this.slotDuration,
|
|
990
990
|
locale: this.locale,
|
|
991
991
|
slotHeight: HOUR_GRID_SLOT_HEIGHT,
|
|
992
|
-
|
|
992
|
+
eventAppearance: this.eventAppearance,
|
|
993
993
|
onSlotClick: this.handleSlotClick,
|
|
994
994
|
onEventClick: this.handleEventClick,
|
|
995
995
|
draggingEventId: this.draggingEventId,
|
|
@@ -1132,8 +1132,8 @@ __decorate([
|
|
|
1132
1132
|
property({ attribute: "more-events-label" })
|
|
1133
1133
|
], EunomiaCalendar.prototype, "moreEventsLabel", void 0);
|
|
1134
1134
|
__decorate([
|
|
1135
|
-
property({ attribute: "event-
|
|
1136
|
-
], EunomiaCalendar.prototype, "
|
|
1135
|
+
property({ attribute: "event-appearance" })
|
|
1136
|
+
], EunomiaCalendar.prototype, "eventAppearance", void 0);
|
|
1137
1137
|
__decorate([
|
|
1138
1138
|
state()
|
|
1139
1139
|
], EunomiaCalendar.prototype, "focusedDate", void 0);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement, PropertyValues, TemplateResult } from "lit";
|
|
2
2
|
import { WeekStartsOn } from "../../../utils/date.utils.js";
|
|
3
3
|
import { EunomiaSchedulerEvent, EunomiaSchedulerView } from "../shared/scheduler.types.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { EunomiaSchedulerEventAppearance } from "../scheduler-event/scheduler-event.js";
|
|
5
5
|
/**
|
|
6
6
|
* Tag name of the scheduler component.
|
|
7
7
|
*/
|
|
@@ -51,8 +51,8 @@ declare const EunomiaScheduler_base: import("../../../utils/constructor.type.js"
|
|
|
51
51
|
* @prop {string} [viewMonthLabel='Month'] - The label of the month view switcher option
|
|
52
52
|
* @prop {string} [viewYearLabel='Year'] - The label of the year view switcher option
|
|
53
53
|
* @prop {string} [moreEventsLabel='+{count} more'] - The template for the month view's overflow affordance, with the placeholder replaced by the hidden event count
|
|
54
|
-
* @prop {'default' | 'transparent' | 'ghost'} [
|
|
55
|
-
* @attr {'default' | 'transparent' | 'ghost'} [event-
|
|
54
|
+
* @prop {'default' | 'transparent' | 'ghost'} [eventAppearance='default'] - The appearance applied to day, week, and work week event chips. Month view is unaffected, always picking ghost, or default for multi-day bars, itself
|
|
55
|
+
* @attr {'default' | 'transparent' | 'ghost'} [event-appearance='default'] - The visual variant applied to day, week, and work week event chips
|
|
56
56
|
* @fires {EventCreateEvent} euneventcreate - Fired when a new event is saved
|
|
57
57
|
* @fires {EventUpdateEvent} euneventupdate - Fired when an existing event is saved, or a day, week, or work week chip is dragged to a new time or day
|
|
58
58
|
* @fires {EventDeleteEvent} euneventdelete - Fired when an event is deleted
|
|
@@ -158,12 +158,12 @@ export declare class EunomiaScheduler extends EunomiaScheduler_base {
|
|
|
158
158
|
/** @default +{count} more */
|
|
159
159
|
moreEventsLabel: string;
|
|
160
160
|
/**
|
|
161
|
-
* The
|
|
162
|
-
* `month` view is unaffected — it always picks its own
|
|
161
|
+
* The appearance applied to day/week/work-week event chips.
|
|
162
|
+
* `month` view is unaffected — it always picks its own appearance per
|
|
163
163
|
* event (`ghost` unless the event spans multiple days).
|
|
164
164
|
* @default default
|
|
165
165
|
*/
|
|
166
|
-
|
|
166
|
+
eventAppearance: EunomiaSchedulerEventAppearance;
|
|
167
167
|
/**
|
|
168
168
|
* Whether the desktop editing drawer is open.
|
|
169
169
|
* @internal
|
|
@@ -73,8 +73,8 @@ const VIEWS = [
|
|
|
73
73
|
* @prop {string} [viewMonthLabel='Month'] - The label of the month view switcher option
|
|
74
74
|
* @prop {string} [viewYearLabel='Year'] - The label of the year view switcher option
|
|
75
75
|
* @prop {string} [moreEventsLabel='+{count} more'] - The template for the month view's overflow affordance, with the placeholder replaced by the hidden event count
|
|
76
|
-
* @prop {'default' | 'transparent' | 'ghost'} [
|
|
77
|
-
* @attr {'default' | 'transparent' | 'ghost'} [event-
|
|
76
|
+
* @prop {'default' | 'transparent' | 'ghost'} [eventAppearance='default'] - The appearance applied to day, week, and work week event chips. Month view is unaffected, always picking ghost, or default for multi-day bars, itself
|
|
77
|
+
* @attr {'default' | 'transparent' | 'ghost'} [event-appearance='default'] - The visual variant applied to day, week, and work week event chips
|
|
78
78
|
* @fires {EventCreateEvent} euneventcreate - Fired when a new event is saved
|
|
79
79
|
* @fires {EventUpdateEvent} euneventupdate - Fired when an existing event is saved, or a day, week, or work week chip is dragged to a new time or day
|
|
80
80
|
* @fires {EventDeleteEvent} euneventdelete - Fired when an event is deleted
|
|
@@ -174,12 +174,12 @@ let EunomiaScheduler = class EunomiaScheduler extends LocalizableMixin(AnchorPos
|
|
|
174
174
|
/** @default +{count} more */
|
|
175
175
|
this.moreEventsLabel = "+{count} more";
|
|
176
176
|
/**
|
|
177
|
-
* The
|
|
178
|
-
* `month` view is unaffected — it always picks its own
|
|
177
|
+
* The appearance applied to day/week/work-week event chips.
|
|
178
|
+
* `month` view is unaffected — it always picks its own appearance per
|
|
179
179
|
* event (`ghost` unless the event spans multiple days).
|
|
180
180
|
* @default default
|
|
181
181
|
*/
|
|
182
|
-
this.
|
|
182
|
+
this.eventAppearance = "default";
|
|
183
183
|
/**
|
|
184
184
|
* Whether the desktop editing drawer is open.
|
|
185
185
|
* @internal
|
|
@@ -792,7 +792,7 @@ let EunomiaScheduler = class EunomiaScheduler extends LocalizableMixin(AnchorPos
|
|
|
792
792
|
?readonly=${this.readonly}
|
|
793
793
|
?no-animation=${this.noAnimation}
|
|
794
794
|
more-events-label=${this.moreEventsLabel}
|
|
795
|
-
event-
|
|
795
|
+
event-appearance=${this.eventAppearance}
|
|
796
796
|
@eunperiodchange=${this.handleCalendarPeriodChange}
|
|
797
797
|
@euneventclick=${this.handleCalendarEventClick}
|
|
798
798
|
@eunslotclick=${this.handleCalendarSlotClick}
|
|
@@ -824,7 +824,7 @@ let EunomiaScheduler = class EunomiaScheduler extends LocalizableMixin(AnchorPos
|
|
|
824
824
|
<div slot="footer" style="display: contents">
|
|
825
825
|
${this.editingEvent
|
|
826
826
|
? html `<eun-button
|
|
827
|
-
|
|
827
|
+
color="critical"
|
|
828
828
|
appearance="outline"
|
|
829
829
|
@click=${this.handleDrawerDelete}
|
|
830
830
|
>${this.deleteLabel}</eun-button
|
|
@@ -834,7 +834,7 @@ let EunomiaScheduler = class EunomiaScheduler extends LocalizableMixin(AnchorPos
|
|
|
834
834
|
<eun-button appearance="ghost" @click=${this.handleDrawerCancel}
|
|
835
835
|
>${this.cancelLabel}</eun-button
|
|
836
836
|
>
|
|
837
|
-
<eun-button
|
|
837
|
+
<eun-button color="primary" @click=${this.handleDrawerSave}
|
|
838
838
|
>${this.applyLabel}</eun-button
|
|
839
839
|
>
|
|
840
840
|
</div>
|
|
@@ -862,16 +862,16 @@ let EunomiaScheduler = class EunomiaScheduler extends LocalizableMixin(AnchorPos
|
|
|
862
862
|
<div slot="footer">
|
|
863
863
|
${this.editingEvent
|
|
864
864
|
? html `<eun-button
|
|
865
|
-
|
|
865
|
+
color="critical"
|
|
866
866
|
@click=${this.handleModalDelete}
|
|
867
867
|
>${this.deleteLabel}</eun-button
|
|
868
868
|
>`
|
|
869
869
|
: nothing}
|
|
870
870
|
<span style="flex: 1 1 auto;"></span>
|
|
871
|
-
<eun-button
|
|
871
|
+
<eun-button color="secondary" @click=${this.handleModalCancel}
|
|
872
872
|
>${this.cancelLabel}</eun-button
|
|
873
873
|
>
|
|
874
|
-
<eun-button
|
|
874
|
+
<eun-button color="primary" @click=${this.handleModalSave}
|
|
875
875
|
>${this.applyLabel}</eun-button
|
|
876
876
|
>
|
|
877
877
|
</div>
|
|
@@ -999,8 +999,8 @@ __decorate([
|
|
|
999
999
|
property({ attribute: "more-events-label" })
|
|
1000
1000
|
], EunomiaScheduler.prototype, "moreEventsLabel", void 0);
|
|
1001
1001
|
__decorate([
|
|
1002
|
-
property({ attribute: "event-
|
|
1003
|
-
], EunomiaScheduler.prototype, "
|
|
1002
|
+
property({ attribute: "event-appearance" })
|
|
1003
|
+
], EunomiaScheduler.prototype, "eventAppearance", void 0);
|
|
1004
1004
|
__decorate([
|
|
1005
1005
|
state()
|
|
1006
1006
|
], EunomiaScheduler.prototype, "isDrawerOpen", void 0);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EunomiaAppearance } from "../../../types/variant.type.js";
|
|
1
2
|
import { LitElement, PropertyValues, TemplateResult } from "lit";
|
|
2
3
|
import { EunomiaSchedulerEventColor } from "../shared/scheduler.types.js";
|
|
3
4
|
/**
|
|
@@ -5,9 +6,10 @@ import { EunomiaSchedulerEventColor } from "../shared/scheduler.types.js";
|
|
|
5
6
|
*/
|
|
6
7
|
export declare const EunomiaSchedulerEventCardTagName = "eun-scheduler-event";
|
|
7
8
|
/**
|
|
8
|
-
* All available scheduler event chip
|
|
9
|
+
* All available scheduler event chip appearances : the shared `default`
|
|
10
|
+
* and `ghost` meanings, plus the chip's own `transparent`.
|
|
9
11
|
*/
|
|
10
|
-
export type
|
|
12
|
+
export type EunomiaSchedulerEventAppearance = Extract<EunomiaAppearance, "default" | "transparent" | "ghost">;
|
|
11
13
|
/**
|
|
12
14
|
* All available scheduler event chip layout directions.
|
|
13
15
|
*/
|
|
@@ -26,7 +28,7 @@ export type EunomiaSchedulerEventCardDirection = "row" | "column";
|
|
|
26
28
|
* The accessible name still includes the time either way, only the
|
|
27
29
|
* visual line disappears.
|
|
28
30
|
*
|
|
29
|
-
* There are
|
|
31
|
+
* There are three appearances. Default renders an opaque tint, with
|
|
30
32
|
* color mixed toward the current theme's own surface color, automatically
|
|
31
33
|
* light in light mode and dark in dark mode with no extra work needed.
|
|
32
34
|
* Transparent mixes the same accent toward transparent instead, for a
|
|
@@ -40,7 +42,7 @@ export type EunomiaSchedulerEventCardDirection = "row" | "column";
|
|
|
40
42
|
* @prop {Date} start - The event's start time, shown as the chip's compact time label
|
|
41
43
|
* @prop {Date} [end] - The event's end time. Used only to build a fuller accessible name, such as "Team sync, 9:00 AM to 10:00 AM", never shown visually on the chip
|
|
42
44
|
* @prop {string} [color='blue'] - The event's accent color : one of the six preset names (red/purple/yellow/blue/green/pink), each with its own tuned two-tone CSS, or a `#rrggbb` hex string for a fully custom color
|
|
43
|
-
* @prop {'default' | 'transparent' | 'ghost'} [
|
|
45
|
+
* @prop {'default' | 'transparent' | 'ghost'} [appearance='default'] - How the chip's surface is drawn
|
|
44
46
|
* @prop {'row' | 'column'} [direction='column'] - Column stacks the title above the time as two lines. Row lays them out side by side on one line instead, the title truncating with an ellipsis while the time never does, for the month view's single-day chips on desktop, where a cell is wide but not tall
|
|
45
47
|
* @attr {'row' | 'column'} [direction='column'] - Column stacks the title above the time as two lines. Row lays them out side by side on one line instead
|
|
46
48
|
* @prop {string} [locale] - The locale used to format the time label. Defaults to the runtime's own
|
|
@@ -51,8 +53,8 @@ export type EunomiaSchedulerEventCardDirection = "row" | "column";
|
|
|
51
53
|
* @cssprop [--scheduler-event-bar-width] - Sets the width of the color bar
|
|
52
54
|
* @cssprop [--scheduler-event-gap] - Sets the gap between the bar and the text
|
|
53
55
|
* @cssprop [--scheduler-event-padding] - Sets the inner padding
|
|
54
|
-
* @cssprop [--scheduler-event-opaque-tint] - Sets the mix percentage for the default
|
|
55
|
-
* @cssprop [--scheduler-event-transparent-tint] - Sets the mix percentage for the transparent
|
|
56
|
+
* @cssprop [--scheduler-event-opaque-tint] - Sets the mix percentage for the default appearance's background
|
|
57
|
+
* @cssprop [--scheduler-event-transparent-tint] - Sets the mix percentage for the transparent appearance's background
|
|
56
58
|
* @cssprop [--scheduler-event-title-color] - Sets the title text color
|
|
57
59
|
* @cssprop [--scheduler-event-time-color] - Sets the time text color
|
|
58
60
|
* @element eun-scheduler-event
|
|
@@ -93,10 +95,10 @@ export declare class EunomiaSchedulerEventCard extends LitElement {
|
|
|
93
95
|
*/
|
|
94
96
|
private static readonly PRESET_COLORS;
|
|
95
97
|
/**
|
|
96
|
-
*
|
|
98
|
+
* How the chip's surface is drawn.
|
|
97
99
|
* @default default
|
|
98
100
|
*/
|
|
99
|
-
|
|
101
|
+
appearance: EunomiaSchedulerEventAppearance;
|
|
100
102
|
/**
|
|
101
103
|
* `column` stacks the title above the time (two lines) ; `row` lays them
|
|
102
104
|
* out side by side on one line instead, the title truncating with an
|