@eunomia/elements 1.0.0-beta.7 → 1.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/components/chunks/{chunk-3PNGQEG4.js → chunk-32L2QYWQ.js} +2 -2
- package/dist/cdn/components/chunks/{chunk-Z3OFIE7S.js → chunk-3UUZM7X2.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-BVASCT2V.js → chunk-55PUDL7D.js} +13 -13
- package/dist/cdn/components/chunks/chunk-5LA5DQMP.js +1 -0
- package/dist/cdn/components/chunks/chunk-5LXGJVJR.js +1 -0
- package/dist/cdn/components/chunks/chunk-6TIEBY34.js +1 -0
- package/dist/cdn/components/chunks/{chunk-LVKMAHMU.js → chunk-AH2SKZ7T.js} +4 -1
- package/dist/cdn/components/chunks/chunk-JAGZL7JH.js +1 -0
- package/dist/cdn/components/chunks/{chunk-DGI7TKCU.js → chunk-LD35BFNK.js} +5 -9
- package/dist/cdn/components/chunks/chunk-P6LGU3FT.js +1 -0
- package/dist/cdn/components/chunks/{chunk-UYZR4JXZ.js → chunk-QSZO4GIH.js} +45 -9
- package/dist/cdn/components/chunks/{chunk-PXF554MD.js → chunk-QYB6Z6FG.js} +5 -5
- package/dist/cdn/components/chunks/{chunk-RIFF2D2F.js → chunk-RGC3I6MK.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-N6ZW5CDN.js → chunk-TCSB2MLU.js} +1 -1
- package/dist/cdn/components/chunks/chunk-WIUERJII.js +1 -0
- package/dist/cdn/components/eun-animate.js +4 -4
- package/dist/cdn/components/eun-button.js +1 -1
- package/dist/cdn/components/eun-carousel.js +10 -9
- package/dist/cdn/components/eun-chip.js +17 -11
- package/dist/cdn/components/eun-collapse.js +1 -1
- package/dist/cdn/components/eun-color-picker.js +18 -5
- package/dist/cdn/components/eun-counter.js +10 -8
- package/dist/cdn/components/eun-date-picker.js +46 -43
- package/dist/cdn/components/eun-drawer.js +19 -20
- package/dist/cdn/components/eun-dropdown-button.js +1 -1
- package/dist/cdn/components/eun-dropdown-item.js +3 -3
- package/dist/cdn/components/eun-fab.js +1 -1
- package/dist/cdn/components/eun-image-carousel.js +4 -4
- package/dist/cdn/components/eun-input-phone.js +11 -8
- package/dist/cdn/components/eun-input.js +1 -1
- package/dist/cdn/components/eun-link.js +59 -13
- package/dist/cdn/components/eun-modal.js +23 -13
- package/dist/cdn/components/eun-scheduler-event-editor.js +1 -1
- package/dist/cdn/components/eun-search.js +34 -28
- package/dist/cdn/components/eun-select.js +3 -3
- package/dist/cdn/components/eun-sidebar.js +66 -21
- package/dist/cdn/components/eun-sliding-card.js +1 -1
- package/dist/cdn/components/eun-stepper.js +16 -16
- package/dist/cdn/components/eun-tab-panel.js +1 -1
- package/dist/cdn/components/eun-table-action-bar.js +1 -1
- package/dist/cdn/components/eun-table.js +2 -2
- package/dist/cdn/components/eun-textarea.js +16 -13
- package/dist/cdn/components/eun-time-picker.js +25 -23
- package/dist/cdn/components/eun-toast.js +8 -8
- package/dist/cdn/components/eun-toggle-group.js +71 -35
- package/dist/cdn/components/eun-toggle-item.js +8 -8
- package/dist/cdn/components/eun-toolbar.js +20 -20
- package/dist/cdn/components/eun-tooltip.js +6 -6
- package/dist/cdn/styles/eunomia-themes.css +1 -1
- package/dist/cdn/styles/themes/mixins/eunomia-neutrals.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.css +1 -1
- package/dist/components/action/button/button.d.ts +2 -2
- package/dist/components/action/button/button.js +3 -7
- package/dist/components/action/button/button.styles.js +3 -3
- package/dist/components/action/dropdown-button/dropdown-button.d.ts +4 -6
- package/dist/components/action/dropdown-button/dropdown-button.js +6 -8
- package/dist/components/action/dropdown-button/dropdown-item.d.ts +10 -2
- package/dist/components/action/dropdown-button/dropdown-item.js +24 -9
- package/dist/components/action/link/link.d.ts +10 -1
- package/dist/components/action/link/link.js +13 -1
- package/dist/components/action/link/link.styles.js +50 -3
- package/dist/components/action/toggle/toggle-group.d.ts +12 -2
- package/dist/components/action/toggle/toggle-group.js +17 -2
- package/dist/components/action/toggle/toggle-group.styles.js +54 -18
- package/dist/components/action/toggle/toggle-item.js +1 -3
- package/dist/components/action/toggle/toggle-item.styles.js +7 -7
- package/dist/components/alert/drawer/drawer.d.ts +25 -0
- package/dist/components/alert/drawer/drawer.js +42 -3
- package/dist/components/alert/drawer/drawer.styles.js +6 -6
- package/dist/components/alert/modal/modal.d.ts +25 -0
- package/dist/components/alert/modal/modal.js +42 -3
- package/dist/components/alert/modal/modal.styles.js +17 -6
- package/dist/components/alert/toast/toast.js +3 -2
- package/dist/components/alert/toast/toast.styles.js +3 -3
- package/dist/components/content/chip/chip.js +3 -2
- package/dist/components/content/chip/chip.styles.js +9 -3
- package/dist/components/content/image-carousel/image-carousel.js +5 -4
- package/dist/components/content/tooltip/tooltip.d.ts +16 -9
- package/dist/components/content/tooltip/tooltip.js +28 -12
- package/dist/components/content/tooltip/tooltip.styles.js +1 -1
- package/dist/components/form/color-picker/color-picker.d.ts +7 -1
- package/dist/components/form/color-picker/color-picker.js +8 -2
- package/dist/components/form/color-picker/color-picker.styles.js +13 -0
- package/dist/components/form/counter/counter.d.ts +3 -1
- package/dist/components/form/counter/counter.js +3 -1
- package/dist/components/form/counter/counter.styles.js +6 -4
- package/dist/components/form/date-picker/date-picker.d.ts +6 -1
- package/dist/components/form/date-picker/date-picker.js +7 -2
- package/dist/components/form/date-picker/date-picker.styles.js +9 -6
- package/dist/components/form/input/input.d.ts +6 -1
- package/dist/components/form/input/input.js +7 -2
- package/dist/components/form/input-phone/input-phone.d.ts +7 -1
- package/dist/components/form/input-phone/input-phone.js +7 -1
- package/dist/components/form/input-phone/input-phone.styles.js +6 -3
- package/dist/components/form/search/search.d.ts +64 -10
- package/dist/components/form/search/search.js +112 -31
- package/dist/components/form/search/search.styles.js +2 -0
- package/dist/components/form/select/select.d.ts +7 -1
- package/dist/components/form/select/select.js +7 -1
- package/dist/components/form/shared-styles/field.styles.js +45 -8
- package/dist/components/form/shared-styles/listbox.styles.js +5 -1
- package/dist/components/form/textarea/textarea.d.ts +1 -0
- package/dist/components/form/textarea/textarea.js +2 -1
- package/dist/components/form/textarea/textarea.styles.js +3 -0
- package/dist/components/form/time-picker/time-picker.d.ts +6 -1
- package/dist/components/form/time-picker/time-picker.js +7 -2
- package/dist/components/form/time-picker/time-picker.styles.js +7 -5
- package/dist/components/layout/animate/animate.js +2 -1
- package/dist/components/navigation/carousel/carousel.d.ts +1 -2
- package/dist/components/navigation/carousel/carousel.js +14 -6
- package/dist/components/navigation/carousel/carousel.styles.js +5 -4
- package/dist/components/navigation/sidebar/sidebar.d.ts +98 -52
- package/dist/components/navigation/sidebar/sidebar.js +140 -85
- package/dist/components/navigation/sidebar/sidebar.styles.d.ts +1 -1
- package/dist/components/navigation/sidebar/sidebar.styles.js +69 -21
- package/dist/components/navigation/stepper/stepper.d.ts +1 -3
- package/dist/components/navigation/stepper/stepper.js +3 -21
- package/dist/components/navigation/toolbar/toolbar.d.ts +10 -0
- package/dist/components/navigation/toolbar/toolbar.js +8 -1
- package/dist/components/navigation/toolbar/toolbar.styles.js +18 -17
- package/dist/events/select.event.d.ts +3 -2
- package/dist/events/select.event.js +2 -1
- package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js +1 -1
- package/dist/features/table/table/table.js +1 -1
- package/dist/features/table/table-action-bar/table-action-bar.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/mixins/button.mixin.d.ts +1 -1
- package/dist/mixins/button.mixin.js +6 -4
- package/dist/mixins/dialog-surface.mixin.d.ts +8 -0
- package/dist/mixins/field-size.mixin.d.ts +19 -0
- package/dist/mixins/field-size.mixin.js +33 -0
- package/dist/mixins/rounded.mixin.d.ts +18 -0
- package/dist/mixins/rounded.mixin.js +32 -0
- package/dist/ssr/button-ssr.css +5 -5
- package/dist/ssr/carousel-ssr.css +9 -0
- package/dist/ssr/chip-ssr.css +8 -0
- package/dist/ssr/collapse-ssr.css +29 -0
- package/dist/ssr/field-ssr.css +43 -4
- package/dist/ssr/image-carousel-ssr.css +10 -0
- package/dist/ssr/links-ssr.css +38 -1
- package/dist/ssr/sidebar-ssr.css +95 -4
- package/dist/ssr/toggle-group-ssr.css +64 -13
- package/dist/ssr/toolbar-ssr.css +50 -0
- package/dist/types/variant.type.d.ts +4 -1
- package/dist/utils/boolean.utils.d.ts +14 -0
- package/dist/utils/boolean.utils.js +20 -0
- package/dist/utils/dropdown-menu.utils.d.ts +1 -1
- package/dist/utils/focusable-elements.utils.d.ts +12 -0
- package/dist/utils/focusable-elements.utils.js +26 -0
- package/dist/utils/input-modality.utils.d.ts +13 -0
- package/dist/utils/input-modality.utils.js +34 -0
- package/dist/utils/theme-generator.utils.d.ts +8 -2
- package/dist/utils/theme-generator.utils.js +30 -9
- package/package.json +1 -1
- package/styles/themes/mixins/eunomia-neutrals.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +6 -2
- package/dist/cdn/components/chunks/chunk-6VK6SHCG.js +0 -1
- package/dist/cdn/components/chunks/chunk-UDOZRIJZ.js +0 -1
|
@@ -18,6 +18,7 @@ import { css } from "lit";
|
|
|
18
18
|
*
|
|
19
19
|
* Custom css variables:
|
|
20
20
|
* [--field-listbox-max-height=260px] - Set a custom maximum height for the dropdown panel, past which it scrolls
|
|
21
|
+
* [--field-listbox-border-radius] - Set a custom corner radius for the dropdown panel, independent of --field-border-radius
|
|
21
22
|
* [--field-listbox-transition-duration=200ms] - Set a custom duration for the dropdown panel's open/close animation (played in JS — see each consumer's own `playListboxOpenAnimation`/`playListboxCloseAnimation`), disabled entirely by the `no-animation` attribute (`eun-select` only) or `prefers-reduced-motion: reduce`
|
|
22
23
|
* [--field-match-color] - Set a custom color for the matched search substring, highlighted with `<mark>`
|
|
23
24
|
* [--field-match-background] - Set a custom background for the matched search substring, none by default
|
|
@@ -43,7 +44,10 @@ const listbox = css `
|
|
|
43
44
|
color: var(--_textColor);
|
|
44
45
|
background: var(--eun-surface-color, #ffffff);
|
|
45
46
|
border: var(--eun-border-width-m, 1.5px) solid var(--_borderColor);
|
|
46
|
-
border-radius: var(
|
|
47
|
+
border-radius: var(
|
|
48
|
+
--field-listbox-border-radius,
|
|
49
|
+
var(--eun-border-radius-m, 8px)
|
|
50
|
+
);
|
|
47
51
|
box-shadow: var(
|
|
48
52
|
--eun-shadow-m,
|
|
49
53
|
0 10px 15px -3px rgba(0, 0, 0, 0.1),
|
|
@@ -90,6 +90,7 @@ declare const EunomiaTextareaMixinBase: Constructor<EunomiaTextareaBase>;
|
|
|
90
90
|
* @cssprop [--field-edit-cancel-color] - Sets the color of the cancel button in readonly-available edit mode
|
|
91
91
|
* @cssprop [--field-shadow] - Sets a box shadow on the field, none by default
|
|
92
92
|
* @cssprop [--field-font-size] - Sets the font size of the field's value and placeholder
|
|
93
|
+
* @cssprop [--field-line-height] - Sets the line height of the field's value and placeholder
|
|
93
94
|
* @cssprop [--field-label-font-size] - Sets the font size of the label
|
|
94
95
|
* @cssprop [--field-message-font-size] - Sets the font size of the hint, error messages and instructions
|
|
95
96
|
* @element eun-textarea
|
|
@@ -541,6 +541,7 @@ const EunomiaTextareaMixinBase = LocalizableMixin(FieldAppearanceMixin(FormLabel
|
|
|
541
541
|
* @cssprop [--field-edit-cancel-color] - Sets the color of the cancel button in readonly-available edit mode
|
|
542
542
|
* @cssprop [--field-shadow] - Sets a box shadow on the field, none by default
|
|
543
543
|
* @cssprop [--field-font-size] - Sets the font size of the field's value and placeholder
|
|
544
|
+
* @cssprop [--field-line-height] - Sets the line height of the field's value and placeholder
|
|
544
545
|
* @cssprop [--field-label-font-size] - Sets the font size of the label
|
|
545
546
|
* @cssprop [--field-message-font-size] - Sets the font size of the hint, error messages and instructions
|
|
546
547
|
* @element eun-textarea
|
|
@@ -1771,7 +1772,7 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
|
|
|
1771
1772
|
<eun-button
|
|
1772
1773
|
class="confirm"
|
|
1773
1774
|
size="s"
|
|
1774
|
-
appearance="
|
|
1775
|
+
appearance="soft"
|
|
1775
1776
|
rounded
|
|
1776
1777
|
type="button"
|
|
1777
1778
|
@click=${this.confirmEdit}
|
|
@@ -5,6 +5,8 @@ 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 { FieldAppearanceMixinInterface } from "../../../mixins/field-appearance.mixin.js";
|
|
8
|
+
import { RoundedMixinInterface } from "../../../mixins/rounded.mixin.js";
|
|
9
|
+
import { FieldSizeMixinInterface } from "../../../mixins/field-size.mixin.js";
|
|
8
10
|
import { AnchorPositionMixinInterface } from "../../../mixins/anchor-position.mixin.js";
|
|
9
11
|
import { LocalizableMixinInterface } from "../../../mixins/localizable.mixin.js";
|
|
10
12
|
import { Constructor } from "../../../utils/constructor.type.js";
|
|
@@ -19,7 +21,7 @@ export declare const EunomiaTimePickerTagName = "eun-time-picker";
|
|
|
19
21
|
* interface element.
|
|
20
22
|
* @internal
|
|
21
23
|
*/
|
|
22
|
-
type EunomiaTimePickerBase = LitElement & DisabledMixinInterface & ReadonlyMixinInterface & ValidatorsMixinInterface<Date | null> & FormMixinInterface<Date | null> & FormLabelMixinInterface & FieldAppearanceMixinInterface & AnchorPositionMixinInterface & LocalizableMixinInterface;
|
|
24
|
+
type EunomiaTimePickerBase = LitElement & DisabledMixinInterface & ReadonlyMixinInterface & ValidatorsMixinInterface<Date | null> & FormMixinInterface<Date | null> & FormLabelMixinInterface & FieldAppearanceMixinInterface & RoundedMixinInterface & FieldSizeMixinInterface & AnchorPositionMixinInterface & LocalizableMixinInterface;
|
|
23
25
|
declare const EunomiaTimePickerMixinBase: Constructor<EunomiaTimePickerBase>;
|
|
24
26
|
/**
|
|
25
27
|
* A time field entered across segmented numeric hour and minute inputs,
|
|
@@ -40,6 +42,8 @@ declare const EunomiaTimePickerMixinBase: Constructor<EunomiaTimePickerBase>;
|
|
|
40
42
|
* under a labeled group.
|
|
41
43
|
*
|
|
42
44
|
* @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
|
|
45
|
+
* @prop {boolean} [rounded=false] - Whether the field is fully rounded, as a pill. A custom border radius still wins over it
|
|
46
|
+
* @prop {'xs' | 's' | 'm' | 'l' | 'xl'} [size='m'] - The field size. A field and a button of the same size share the same height
|
|
43
47
|
* @prop {Date | null} value - The picked instant
|
|
44
48
|
* @prop {Date | null} defaultValue - The default value applied when the field connects, and restored on form reset
|
|
45
49
|
* @prop {string} [timezone] - The time zone the hour and minute are displayed and edited in. Defaults to the runtime's own
|
|
@@ -99,6 +103,7 @@ declare const EunomiaTimePickerMixinBase: Constructor<EunomiaTimePickerBase>;
|
|
|
99
103
|
* @cssprop [--time-picker-panel-background] - Sets the background color of the popover panel
|
|
100
104
|
* @cssprop [--time-picker-panel-transition-duration=200ms] - Sets the duration of the popover panel's open and close transition
|
|
101
105
|
* @cssprop [--field-font-size] - Sets the font size of the field's value and placeholder
|
|
106
|
+
* @cssprop [--field-line-height] - Sets the line height of the field's value and placeholder
|
|
102
107
|
* @cssprop [--field-label-font-size] - Sets the font size of the label
|
|
103
108
|
* @cssprop [--field-message-font-size] - Sets the font size of the hint, error messages and instructions
|
|
104
109
|
* @element eun-time-picker
|
|
@@ -12,6 +12,8 @@ import { ValidatorsMixin, } from "../../../mixins/validators.mixin.js";
|
|
|
12
12
|
import { FormMixin, hasErrorDisplayChange, } from "../../../mixins/form.mixin.js";
|
|
13
13
|
import { FormLabelMixin, } from "../../../mixins/form-label.mixin.js";
|
|
14
14
|
import { FieldAppearanceMixin, } from "../../../mixins/field-appearance.mixin.js";
|
|
15
|
+
import { RoundedMixin, } from "../../../mixins/rounded.mixin.js";
|
|
16
|
+
import { FieldSizeMixin, } from "../../../mixins/field-size.mixin.js";
|
|
15
17
|
import { AnchorPositionMixin, } from "../../../mixins/anchor-position.mixin.js";
|
|
16
18
|
import { LocalizableMixin, } from "../../../mixins/localizable.mixin.js";
|
|
17
19
|
import { ChangeEvent } from "../../../events/change.event.js";
|
|
@@ -37,7 +39,7 @@ export const EunomiaTimePickerTagName = "eun-time-picker";
|
|
|
37
39
|
* @internal
|
|
38
40
|
*/
|
|
39
41
|
const Base = DisabledMixin(ValidatorsMixin(LitElement));
|
|
40
|
-
const EunomiaTimePickerMixinBase = LocalizableMixin(AnchorPositionMixin(FieldAppearanceMixin(FormLabelMixin(ReadonlyMixin(FormMixin(Base))))));
|
|
42
|
+
const EunomiaTimePickerMixinBase = LocalizableMixin(AnchorPositionMixin(RoundedMixin(FieldSizeMixin(FieldAppearanceMixin(FormLabelMixin(ReadonlyMixin(FormMixin(Base))))))));
|
|
41
43
|
/**
|
|
42
44
|
* A time field entered across segmented numeric hour and minute inputs,
|
|
43
45
|
* plus an AM/PM toggle segment at a 12-hour format, with a trailing clock
|
|
@@ -57,6 +59,8 @@ const EunomiaTimePickerMixinBase = LocalizableMixin(AnchorPositionMixin(FieldApp
|
|
|
57
59
|
* under a labeled group.
|
|
58
60
|
*
|
|
59
61
|
* @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
|
|
62
|
+
* @prop {boolean} [rounded=false] - Whether the field is fully rounded, as a pill. A custom border radius still wins over it
|
|
63
|
+
* @prop {'xs' | 's' | 'm' | 'l' | 'xl'} [size='m'] - The field size. A field and a button of the same size share the same height
|
|
60
64
|
* @prop {Date | null} value - The picked instant
|
|
61
65
|
* @prop {Date | null} defaultValue - The default value applied when the field connects, and restored on form reset
|
|
62
66
|
* @prop {string} [timezone] - The time zone the hour and minute are displayed and edited in. Defaults to the runtime's own
|
|
@@ -116,6 +120,7 @@ const EunomiaTimePickerMixinBase = LocalizableMixin(AnchorPositionMixin(FieldApp
|
|
|
116
120
|
* @cssprop [--time-picker-panel-background] - Sets the background color of the popover panel
|
|
117
121
|
* @cssprop [--time-picker-panel-transition-duration=200ms] - Sets the duration of the popover panel's open and close transition
|
|
118
122
|
* @cssprop [--field-font-size] - Sets the font size of the field's value and placeholder
|
|
123
|
+
* @cssprop [--field-line-height] - Sets the line height of the field's value and placeholder
|
|
119
124
|
* @cssprop [--field-label-font-size] - Sets the font size of the label
|
|
120
125
|
* @cssprop [--field-message-font-size] - Sets the font size of the hint, error messages and instructions
|
|
121
126
|
* @element eun-time-picker
|
|
@@ -951,7 +956,7 @@ let EunomiaTimePicker = class EunomiaTimePicker extends EunomiaTimePickerMixinBa
|
|
|
951
956
|
?disabled=${this.disabled}
|
|
952
957
|
@click=${this.handleTriggerClick}
|
|
953
958
|
>
|
|
954
|
-
<eun-icon name="access_time"
|
|
959
|
+
<eun-icon name="access_time"></eun-icon>
|
|
955
960
|
</button>
|
|
956
961
|
</div>
|
|
957
962
|
`;
|
|
@@ -18,15 +18,15 @@ const timePicker = css `
|
|
|
18
18
|
display: flex;
|
|
19
19
|
align-items: center;
|
|
20
20
|
gap: var(--eun-space-xs, 4px);
|
|
21
|
-
width: 100%;
|
|
22
21
|
color: var(--_textColor);
|
|
23
22
|
background-color: var(--_background);
|
|
24
23
|
border: var(--eun-border-width-m, 1.5px) solid var(--_borderColor);
|
|
25
24
|
border-radius: var(--_borderRadius);
|
|
26
|
-
padding: var(--
|
|
27
|
-
var(--
|
|
25
|
+
padding: var(--_paddingBlock) calc(var(--_defaultPaddingInline) / 2)
|
|
26
|
+
var(--_paddingBlock) var(--_defaultPaddingInline);
|
|
28
27
|
outline: 1px solid transparent;
|
|
29
|
-
box-sizing:
|
|
28
|
+
box-sizing: content-box;
|
|
29
|
+
height: var(--_lineHeight);
|
|
30
30
|
transition:
|
|
31
31
|
border-color var(--eun-duration-s, 150ms) var(--eun-easing-default, ease),
|
|
32
32
|
outline-color var(--eun-duration-s, 150ms) var(--eun-easing-default, ease);
|
|
@@ -81,9 +81,10 @@ const timePicker = css `
|
|
|
81
81
|
box-sizing: content-box;
|
|
82
82
|
border: none;
|
|
83
83
|
background: none;
|
|
84
|
-
padding:
|
|
84
|
+
padding: 0 1px;
|
|
85
85
|
color: inherit;
|
|
86
86
|
font: inherit;
|
|
87
|
+
line-height: var(--_lineHeight);
|
|
87
88
|
text-align: center;
|
|
88
89
|
outline: none;
|
|
89
90
|
overflow: visible;
|
|
@@ -109,6 +110,7 @@ const timePicker = css `
|
|
|
109
110
|
padding-inline: 2px;
|
|
110
111
|
}
|
|
111
112
|
#clock-trigger {
|
|
113
|
+
--icon-size: min(16px, var(--_lineHeight));
|
|
112
114
|
display: flex;
|
|
113
115
|
align-items: center;
|
|
114
116
|
justify-content: center;
|
|
@@ -8,6 +8,7 @@ import { customElement, property } from "lit/decorators.js";
|
|
|
8
8
|
import { html, LitElement, nothing } from "lit";
|
|
9
9
|
import { animateStyles } from "./animate.styles.js";
|
|
10
10
|
import { mediaBelow } from "../../../breakpoints.js";
|
|
11
|
+
import { defaultTrueConverter } from "../../../utils/boolean.utils.js";
|
|
11
12
|
/**
|
|
12
13
|
* Tag name of the animate component.
|
|
13
14
|
*/
|
|
@@ -209,7 +210,7 @@ __decorate([
|
|
|
209
210
|
property({ type: Number, attribute: "mobile-delay" })
|
|
210
211
|
], EunomiaAnimate.prototype, "mobileDelay", void 0);
|
|
211
212
|
__decorate([
|
|
212
|
-
property({
|
|
213
|
+
property({ converter: defaultTrueConverter })
|
|
213
214
|
], EunomiaAnimate.prototype, "once", void 0);
|
|
214
215
|
__decorate([
|
|
215
216
|
property({ type: Number })
|
|
@@ -170,8 +170,7 @@ export declare class EunomiaCarousel extends EunomiaCarousel_base {
|
|
|
170
170
|
* Fades the viewport's edges to hint there's more to scroll — hidden
|
|
171
171
|
* automatically on whichever side is already at its scroll bound (never
|
|
172
172
|
* shown on the left at the very start, or the right at the very end).
|
|
173
|
-
* On by default ;
|
|
174
|
-
* Examples tab for the boolean-attribute caveat that applies here too).
|
|
173
|
+
* On by default ; `edge-fade="false"` turns it off.
|
|
175
174
|
* @default true
|
|
176
175
|
*/
|
|
177
176
|
edgeFade: boolean;
|
|
@@ -11,6 +11,7 @@ import { debounce } from "../../../utils/time.utils.js";
|
|
|
11
11
|
import { SlideChangeEvent } from "../../../events/slidechange.event.js";
|
|
12
12
|
import { carouselStyles } from "./carousel.styles.js";
|
|
13
13
|
import { LocalizableMixin } from "../../../mixins/localizable.mixin.js";
|
|
14
|
+
import { defaultTrueConverter } from "../../../utils/boolean.utils.js";
|
|
14
15
|
/**
|
|
15
16
|
* Tag name of the carousel component.
|
|
16
17
|
*/
|
|
@@ -154,8 +155,7 @@ let EunomiaCarousel = class EunomiaCarousel extends LocalizableMixin(LitElement)
|
|
|
154
155
|
* Fades the viewport's edges to hint there's more to scroll — hidden
|
|
155
156
|
* automatically on whichever side is already at its scroll bound (never
|
|
156
157
|
* shown on the left at the very start, or the right at the very end).
|
|
157
|
-
* On by default ;
|
|
158
|
-
* Examples tab for the boolean-attribute caveat that applies here too).
|
|
158
|
+
* On by default ; `edge-fade="false"` turns it off.
|
|
159
159
|
* @default true
|
|
160
160
|
*/
|
|
161
161
|
this.edgeFade = true;
|
|
@@ -943,7 +943,11 @@ __decorate([
|
|
|
943
943
|
property({ type: Number, attribute: "visible-slides" })
|
|
944
944
|
], EunomiaCarousel.prototype, "visibleSlides", void 0);
|
|
945
945
|
__decorate([
|
|
946
|
-
property({
|
|
946
|
+
property({
|
|
947
|
+
converter: defaultTrueConverter,
|
|
948
|
+
reflect: true,
|
|
949
|
+
attribute: "full-slides",
|
|
950
|
+
})
|
|
947
951
|
], EunomiaCarousel.prototype, "fullSlides", void 0);
|
|
948
952
|
__decorate([
|
|
949
953
|
property({ type: Number, attribute: "scroll-step" })
|
|
@@ -952,7 +956,11 @@ __decorate([
|
|
|
952
956
|
property({ type: Boolean, reflect: true, attribute: "center-snap" })
|
|
953
957
|
], EunomiaCarousel.prototype, "centerSnap", void 0);
|
|
954
958
|
__decorate([
|
|
955
|
-
property({
|
|
959
|
+
property({
|
|
960
|
+
converter: defaultTrueConverter,
|
|
961
|
+
reflect: true,
|
|
962
|
+
attribute: "edge-fade",
|
|
963
|
+
})
|
|
956
964
|
], EunomiaCarousel.prototype, "edgeFade", void 0);
|
|
957
965
|
__decorate([
|
|
958
966
|
property({ type: Boolean, reflect: true })
|
|
@@ -964,10 +972,10 @@ __decorate([
|
|
|
964
972
|
property({ type: Number, attribute: "autoplay-interval" })
|
|
965
973
|
], EunomiaCarousel.prototype, "autoplayInterval", void 0);
|
|
966
974
|
__decorate([
|
|
967
|
-
property({
|
|
975
|
+
property({ converter: defaultTrueConverter, attribute: "show-arrows" })
|
|
968
976
|
], EunomiaCarousel.prototype, "showArrows", void 0);
|
|
969
977
|
__decorate([
|
|
970
|
-
property({
|
|
978
|
+
property({ converter: defaultTrueConverter, attribute: "show-dots" })
|
|
971
979
|
], EunomiaCarousel.prototype, "showDots", void 0);
|
|
972
980
|
__decorate([
|
|
973
981
|
property({ attribute: "previous-label" })
|
|
@@ -130,8 +130,8 @@ const base = css `
|
|
|
130
130
|
transparent
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
|
-
:host(:not([edge-fade])) #viewport::before,
|
|
134
|
-
:host(:not([edge-fade])) #viewport::after {
|
|
133
|
+
:host(:is(:not([edge-fade]), [edge-fade="false"])) #viewport::before,
|
|
134
|
+
:host(:is(:not([edge-fade]), [edge-fade="false"])) #viewport::after {
|
|
135
135
|
content: none;
|
|
136
136
|
}
|
|
137
137
|
|
|
@@ -184,7 +184,7 @@ const base = css `
|
|
|
184
184
|
transition: transform var(--eun-duration-m, 200ms)
|
|
185
185
|
var(--eun-easing-default, ease);
|
|
186
186
|
}
|
|
187
|
-
:host([full-slides]) ::slotted(:not([slot])) {
|
|
187
|
+
:host([full-slides]:not([full-slides="false"])) ::slotted(:not([slot])) {
|
|
188
188
|
--_slideBasis: max(
|
|
189
189
|
var(--carousel-min-slide-width, 220px),
|
|
190
190
|
calc(
|
|
@@ -196,7 +196,8 @@ const base = css `
|
|
|
196
196
|
)
|
|
197
197
|
);
|
|
198
198
|
}
|
|
199
|
-
:host(:not([full-slides])
|
|
199
|
+
:host(:is(:not([full-slides]), [full-slides="false"]))
|
|
200
|
+
::slotted(:not([slot])) {
|
|
200
201
|
--_slideBasis: max(
|
|
201
202
|
var(--carousel-min-slide-width, 220px),
|
|
202
203
|
calc(
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement, PropertyValues, TemplateResult } from "lit";
|
|
2
|
+
import { EunomiaBreakpoint } from "../../../breakpoints.js";
|
|
2
3
|
/**
|
|
3
4
|
* Tag name of the sidebar component.
|
|
4
5
|
*/
|
|
@@ -16,6 +17,10 @@ export type EunomiaSidebarCollapseMode = "mini" | "hidden";
|
|
|
16
17
|
* Where the built-in collapse/expand toggle button renders.
|
|
17
18
|
*/
|
|
18
19
|
export type EunomiaSidebarTogglePlacement = "edge" | "inline";
|
|
20
|
+
/**
|
|
21
|
+
* The sidebar's color scheme.
|
|
22
|
+
*/
|
|
23
|
+
export type EunomiaSidebarTheme = "light" | "dark";
|
|
19
24
|
declare const EunomiaSidebar_base: import("../../../utils/constructor.type.js").Constructor<import("../../../mixins/localizable.mixin.js").LocalizableMixinInterface> & typeof LitElement;
|
|
20
25
|
/**
|
|
21
26
|
* A persistent, non-modal navigation panel that lays out beside page
|
|
@@ -44,7 +49,10 @@ declare const EunomiaSidebar_base: import("../../../utils/constructor.type.js").
|
|
|
44
49
|
* @slot footer - Optional footer content, such as a user menu, fixed below the scrollable body. Omitted entirely when nothing is slotted
|
|
45
50
|
* @prop {'start' | 'end'} [position='start'] - Which edge of the layout the sidebar is pinned against
|
|
46
51
|
* @prop {string} heading - An optional heading, rendered as the header slot's fallback content, and used as the accessible name when set
|
|
47
|
-
* @prop {
|
|
52
|
+
* @prop {'mobile' | 'tablet' | 'laptop' | 'desktop'} hideBelow - Hides the sidebar below this breakpoint, for a layout where another navigation takes over on small screens, such as the toolbar's mobile panel. Also applies before the component loads when sidebar-ssr.css is linked
|
|
53
|
+
* @attr {'mobile' | 'tablet' | 'laptop' | 'desktop'} hide-below - Hides the sidebar below this breakpoint
|
|
54
|
+
* @prop {'light' | 'dark'} [theme='light'] - The sidebar's color scheme. Dark uses the inverse surface, for a sidebar on a dark background
|
|
55
|
+
* @prop {boolean} [collapsible=true] - Whether the built-in toggle button renders at all. The collapse, expand, and toggle methods still work regardless, for driving collapse from elsewhere, such as a page header menu button. Set to false, or the attribute to "false", to rely on resizable alone
|
|
48
56
|
* @prop {'edge' | 'inline'} [togglePlacement='edge'] - Where the built-in toggle button renders: edge floats on the border, and inline sits inside the panel, pinned below the body and footer
|
|
49
57
|
* @attr {'edge' | 'inline'} [toggle-placement='edge'] - Where the built-in toggle button renders: edge floats on the border, and inline sits inside the panel, pinned below the body and footer
|
|
50
58
|
* @prop {'mini' | 'hidden'} [collapseMode='mini'] - The shape the collapsed state takes
|
|
@@ -54,20 +62,23 @@ declare const EunomiaSidebar_base: import("../../../utils/constructor.type.js").
|
|
|
54
62
|
* @attr {string} [expand-label] - The accessible label of the toggle button while collapsed. Defaults to the localized string for the current locale (English: "Expand sidebar")
|
|
55
63
|
* @prop {string} [collapseLabel] - The accessible label of the toggle button while expanded. Defaults to the localized string for the current locale (English: "Collapse sidebar")
|
|
56
64
|
* @attr {string} [collapse-label] - The accessible label of the toggle button while expanded. Defaults to the localized string for the current locale (English: "Collapse sidebar")
|
|
57
|
-
* @prop {boolean} [resizable=true] - Whether the border can be dragged, or, once focused, adjusted with arrow keys, to resize the panel
|
|
65
|
+
* @prop {boolean} [resizable=true] - Whether the border can be dragged, or, once focused, adjusted with arrow keys, to resize the panel. Set to false, or the attribute to "false", to turn it off
|
|
58
66
|
* @prop {string} [resizeLabel] - The accessible label of the drag-to-resize border. Defaults to the localized string for the current locale (English: "Resize sidebar")
|
|
59
67
|
* @attr {string} [resize-label] - The accessible label of the drag-to-resize border. Defaults to the localized string for the current locale (English: "Resize sidebar")
|
|
60
|
-
* @fires {ChangeEvent} eunchange - Fired whenever collapsed changes, including as a result of dragging or keyboard-resizing
|
|
68
|
+
* @fires {ChangeEvent} eunchange - Fired whenever collapsed changes, including as a result of dragging or keyboard-resizing below the mini width. A collapse reached this way takes the shape set by collapseMode, and expanding again returns to --sidebar-width
|
|
61
69
|
* @cssprop [--sidebar-width] - Sets the expanded width of the sidebar, also the floor of the drag-resize range and, once resized, holds the user's chosen width
|
|
62
70
|
* @cssprop [--sidebar-mini-width] - Sets the width of the mini collapsed state, also the floor of the drag-resize range
|
|
63
71
|
* @cssprop [--sidebar-max-width] - Sets the ceiling of the drag-resize range
|
|
64
|
-
* @cssprop [--sidebar-background] - Sets the background color of the sidebar
|
|
72
|
+
* @cssprop [--sidebar-background] - Sets the background color of the sidebar. Use an opaque color, or transparent to show the background behind the sidebar
|
|
65
73
|
* @cssprop [--sidebar-color] - Sets the text color of the sidebar
|
|
66
74
|
* @cssprop [--sidebar-border-color] - Sets the color of the sidebar's side border
|
|
67
75
|
* @cssprop [--sidebar-padding] - Sets the padding of the header, body, and footer
|
|
68
76
|
* @cssprop [--sidebar-padding-block] - Sets the vertical padding, as one length applied to both sides. Ignored when --sidebar-padding is set
|
|
69
77
|
* @cssprop [--sidebar-padding-inline] - Sets the horizontal padding, as one length applied to both sides. Ignored when --sidebar-padding is set
|
|
70
78
|
* @cssprop [--sidebar-gap] - Sets the gap inside the header and footer rows
|
|
79
|
+
* @cssprop [--sidebar-toggle-color] - Sets the color of the toggle button
|
|
80
|
+
* @cssprop [--sidebar-toggle-background-hover] - Sets the background color of the toggle button on hover
|
|
81
|
+
* @cssprop [--sidebar-resize-handle-delay] - Sets how long the pointer must rest on the border before the resize handle shows. Set to 0 to show it right away
|
|
71
82
|
* @cssprop [--sidebar-transition-duration] - Sets the duration of the collapse and resize transition
|
|
72
83
|
* @element eun-sidebar
|
|
73
84
|
*/
|
|
@@ -79,7 +90,7 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
79
90
|
* @internal
|
|
80
91
|
* @readonly
|
|
81
92
|
*/
|
|
82
|
-
static readonly styles: import("lit").CSSResult;
|
|
93
|
+
static readonly styles: import("lit").CSSResult[];
|
|
83
94
|
/**
|
|
84
95
|
* Which edge of the layout the sidebar is pinned against — decides which
|
|
85
96
|
* edge the border, toggle button, and resize handle render on : always
|
|
@@ -87,6 +98,20 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
87
98
|
* @default start
|
|
88
99
|
*/
|
|
89
100
|
position: EunomiaSidebarPosition;
|
|
101
|
+
/**
|
|
102
|
+
* Hides the sidebar below this breakpoint (`display: none`), for a layout
|
|
103
|
+
* where another navigation takes over on small screens, such as
|
|
104
|
+
* `eun-toolbar`'s mobile panel, which switches at `tablet` by default.
|
|
105
|
+
* A plain `@media` switch in the stylesheet, mirrored in
|
|
106
|
+
* `sidebar-ssr.css`, so it applies from first paint.
|
|
107
|
+
*/
|
|
108
|
+
hideBelow?: EunomiaBreakpoint;
|
|
109
|
+
/**
|
|
110
|
+
* The sidebar's color scheme : `dark` uses the inverse surface, the same
|
|
111
|
+
* one `eun-toolbar`'s own `theme="dark"` does.
|
|
112
|
+
* @default light
|
|
113
|
+
*/
|
|
114
|
+
theme: EunomiaSidebarTheme;
|
|
90
115
|
/**
|
|
91
116
|
* Optional heading text, rendered as the `header` slot's fallback
|
|
92
117
|
* content, and used as the accessible name (there's no dialog to
|
|
@@ -98,7 +123,9 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
98
123
|
* for where) ; `collapse()`/`expand()`/`toggleCollapse()` work regardless,
|
|
99
124
|
* for driving collapse from elsewhere (e.g. a page header menu button) —
|
|
100
125
|
* set this to `false` to drop the built-in button entirely and rely on
|
|
101
|
-
* `resizable` (dragging the border past the mini floor) alone.
|
|
126
|
+
* `resizable` (dragging the border past the mini floor) alone. The
|
|
127
|
+
* attribute value `"false"` turns it off too (see {@link
|
|
128
|
+
* defaultTrueConverter}).
|
|
102
129
|
* @default true
|
|
103
130
|
*/
|
|
104
131
|
collapsible: boolean;
|
|
@@ -137,7 +164,8 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
137
164
|
* Whether the border can be dragged (or, once focused, adjusted with the
|
|
138
165
|
* arrow keys) to resize the panel between `--sidebar-mini-width` and
|
|
139
166
|
* `--sidebar-max-width`. Independent of `collapsible`, which only
|
|
140
|
-
* controls the discrete toggle button.
|
|
167
|
+
* controls the discrete toggle button. The attribute value `"false"`
|
|
168
|
+
* turns it off too (see {@link defaultTrueConverter}).
|
|
141
169
|
* @default true
|
|
142
170
|
*/
|
|
143
171
|
resizable: boolean;
|
|
@@ -171,8 +199,7 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
171
199
|
private dragStartWidth;
|
|
172
200
|
/**
|
|
173
201
|
* The last *unclamped* width computed during a drag, used on release to
|
|
174
|
-
* decide whether the drag went
|
|
175
|
-
* into a full `collapse-mode="hidden"` collapse.
|
|
202
|
+
* decide whether the drag went below the mini floor and collapses.
|
|
176
203
|
* @internal
|
|
177
204
|
*/
|
|
178
205
|
private lastRawWidth;
|
|
@@ -185,13 +212,6 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
185
212
|
* @internal
|
|
186
213
|
*/
|
|
187
214
|
private dragStartCollapsed;
|
|
188
|
-
/**
|
|
189
|
-
* Whether `draggedHidden` was set right before the current drag started
|
|
190
|
-
* — compared against the final state at release for the same reason
|
|
191
|
-
* `dragStartCollapsed` is.
|
|
192
|
-
* @internal
|
|
193
|
-
*/
|
|
194
|
-
private dragStartHidden;
|
|
195
215
|
/**
|
|
196
216
|
* Whether `pointermove` actually fired at least once since the current
|
|
197
217
|
* `pointerdown` — a plain click on the resize handle (no movement)
|
|
@@ -206,18 +226,18 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
206
226
|
*/
|
|
207
227
|
private dragging;
|
|
208
228
|
/**
|
|
209
|
-
* Whether
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
*
|
|
229
|
+
* Whether the resize handle shows its highlight and resize cursor : set
|
|
230
|
+
* once the pointer has rested on the border for
|
|
231
|
+
* `--sidebar-resize-handle-delay`, or right away on `pointerdown`, so
|
|
232
|
+
* merely crossing the border on the way to the content doesn't flash it.
|
|
233
|
+
* @internal
|
|
234
|
+
*/
|
|
235
|
+
private resizeHandleArmed;
|
|
236
|
+
/**
|
|
237
|
+
* The pending timer arming {@link resizeHandleArmed}, if any.
|
|
218
238
|
* @internal
|
|
219
239
|
*/
|
|
220
|
-
private
|
|
240
|
+
private resizeHandleArmTimer?;
|
|
221
241
|
/**
|
|
222
242
|
* The width, in px, applied by the current (or most recent) drag/keyboard
|
|
223
243
|
* resize — `undefined` until the panel has been manually resized at
|
|
@@ -257,6 +277,11 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
257
277
|
* @param changed the changed properties.
|
|
258
278
|
*/
|
|
259
279
|
protected updated(changed: PropertyValues): void;
|
|
280
|
+
/**
|
|
281
|
+
* Lifecycle hook called when the element is disconnected from the DOM.
|
|
282
|
+
* Clears a pending resize handle arming timer.
|
|
283
|
+
*/
|
|
284
|
+
disconnectedCallback(): void;
|
|
260
285
|
/**
|
|
261
286
|
* Collapses the sidebar.
|
|
262
287
|
*/
|
|
@@ -277,6 +302,13 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
277
302
|
* @private
|
|
278
303
|
*/
|
|
279
304
|
private setCollapsed;
|
|
305
|
+
/**
|
|
306
|
+
* Drops the width a drag or keyboard resize applied, so the next expand
|
|
307
|
+
* returns to `--sidebar-width` instead of the narrow width the resize
|
|
308
|
+
* collapsed from.
|
|
309
|
+
* @private
|
|
310
|
+
*/
|
|
311
|
+
private forgetResizedWidth;
|
|
280
312
|
/**
|
|
281
313
|
* Reads a length custom property off the host's computed style, parsed
|
|
282
314
|
* as a px number.
|
|
@@ -319,16 +351,16 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
319
351
|
* `--sidebar-width` override, so a drag tracks the pointer immediately
|
|
320
352
|
* rather than waiting on Lit's render cycle) and reactively (via
|
|
321
353
|
* `liveWidthPx`, so `#resize-handle`'s `aria-valuenow` stays in sync).
|
|
322
|
-
* Also clears `collapsed
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
*
|
|
354
|
+
* Also clears `collapsed` without dispatching : while it reflects, its
|
|
355
|
+
* CSS rule sets `--_width` directly and would otherwise ignore every live
|
|
356
|
+
* update below — `settleWidth`/`settleCollapsedState` restore the correct
|
|
357
|
+
* final truth (and their one authoritative `eunchange`) once the
|
|
358
|
+
* interaction ends.
|
|
327
359
|
*
|
|
328
360
|
* @param px the requested width, in px.
|
|
329
|
-
* @param floor the minimum to clamp to — the mini width by default
|
|
330
|
-
*
|
|
331
|
-
*
|
|
361
|
+
* @param floor the minimum to clamp to — the mini width by default, or
|
|
362
|
+
* `0` during a `collapse-mode="hidden"` drag so it can visually approach
|
|
363
|
+
* a full hide.
|
|
332
364
|
* @private
|
|
333
365
|
*/
|
|
334
366
|
private applyWidth;
|
|
@@ -336,9 +368,10 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
336
368
|
* Reconciles `collapsed` once a *keyboard* resize ends, comparing the
|
|
337
369
|
* interaction's start and end states so exactly one `eunchange` fires
|
|
338
370
|
* for a genuine transition — and none at all for a resize that never
|
|
339
|
-
* crossed the mini floor.
|
|
340
|
-
*
|
|
341
|
-
* `handleResizeKeydown`).
|
|
371
|
+
* crossed the mini floor. Only `collapse-mode="mini"` collapses here :
|
|
372
|
+
* under `hidden`, collapsing would hide the panel entirely, which stays
|
|
373
|
+
* the toggle button's job (see `handleResizeKeydown`). A collapse forgets
|
|
374
|
+
* the resized width, so the next expand returns to `--sidebar-width`.
|
|
342
375
|
*
|
|
343
376
|
* @param widthPx the final width the interaction landed on.
|
|
344
377
|
* @param wasCollapsed whether the sidebar was collapsed when the
|
|
@@ -347,21 +380,35 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
347
380
|
*/
|
|
348
381
|
private settleCollapsedState;
|
|
349
382
|
/**
|
|
350
|
-
* Reconciles
|
|
351
|
-
*
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
* either flag actually changed from where the interaction started.
|
|
383
|
+
* Reconciles `collapsed` once a *drag* resize ends : a drag that lands
|
|
384
|
+
* below the mini floor collapses into whichever shape `collapse-mode`
|
|
385
|
+
* sets (the icon rail for `mini`, a full hide for `hidden`), and forgets
|
|
386
|
+
* the dragged width so the next expand returns to `--sidebar-width`.
|
|
387
|
+
* Anywhere else keeps the dragged width, clamped to the resize range.
|
|
388
|
+
* Fires exactly one `eunchange` iff `collapsed` actually changed from
|
|
389
|
+
* where the interaction started.
|
|
358
390
|
*
|
|
359
391
|
* @param rawWidth the final unclamped width the drag landed on.
|
|
360
392
|
* @param wasCollapsed whether `collapsed` was set when the drag started.
|
|
361
|
-
* @param wasHidden whether `draggedHidden` was set when the drag started.
|
|
362
393
|
* @private
|
|
363
394
|
*/
|
|
364
395
|
private settleWidth;
|
|
396
|
+
/**
|
|
397
|
+
* Arms the resize handle once the pointer has rested on the border for
|
|
398
|
+
* `--sidebar-resize-handle-delay` (300ms by default).
|
|
399
|
+
* @private
|
|
400
|
+
*/
|
|
401
|
+
private readonly handleResizePointerEnter;
|
|
402
|
+
/**
|
|
403
|
+
* Disarms the resize handle as soon as the pointer leaves the border.
|
|
404
|
+
* @private
|
|
405
|
+
*/
|
|
406
|
+
private readonly handleResizePointerLeave;
|
|
407
|
+
/**
|
|
408
|
+
* Clears {@link resizeHandleArmed} and its pending timer, if any.
|
|
409
|
+
* @private
|
|
410
|
+
*/
|
|
411
|
+
private disarmResizeHandle;
|
|
365
412
|
/**
|
|
366
413
|
* Starts a drag-resize : captures the pointer on the handle itself (so
|
|
367
414
|
* subsequent `pointermove`/`pointerup` keep firing there even once the
|
|
@@ -374,10 +421,10 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
374
421
|
/**
|
|
375
422
|
* Tracks an in-progress drag-resize, applying the live width as the
|
|
376
423
|
* pointer moves. Direction is flipped for `position="end"`, where
|
|
377
|
-
* dragging left (toward the panel) grows it.
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
* it actually
|
|
424
|
+
* dragging left (toward the panel) grows it. Under `collapse-mode="mini"`
|
|
425
|
+
* the panel stops at the mini floor, the narrowest it can ever be ; under
|
|
426
|
+
* `hidden` it tracks all the way down to `0`, previewing the full hide —
|
|
427
|
+
* `handleResizePointerUp` decides whether it actually collapses.
|
|
381
428
|
*
|
|
382
429
|
* @param event the pointermove event.
|
|
383
430
|
* @private
|
|
@@ -385,8 +432,7 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
385
432
|
private readonly handleResizePointerMove;
|
|
386
433
|
/**
|
|
387
434
|
* Ends a drag-resize : a plain click (no movement) is a no-op ; see
|
|
388
|
-
* `settleWidth` for how the final width resolves into `collapsed
|
|
389
|
-
* `draggedHidden`.
|
|
435
|
+
* `settleWidth` for how the final width resolves into `collapsed`.
|
|
390
436
|
*
|
|
391
437
|
* @param event the pointerup/pointercancel event.
|
|
392
438
|
* @private
|