@lmvz-ds/components 0.35.1 → 0.36.0
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/CHANGELOG.md +16 -0
- package/assets/icons/calendar.svg +7 -0
- package/cjs/{aria-validation-controller-BC0Eaiv4.js → aria-validation-controller-Do0uEK4t.js} +1 -1
- package/cjs/{directional-focus-controller-DBat-oF7.js → directional-focus-controller-3uDoin45.js} +3 -1
- package/cjs/{element-activation-controller-BHqCUgQv.js → element-activation-controller-BWtUKzu2.js} +1 -1
- package/cjs/{element.util-CRS_YJ59.js → element.util-CctmBvUY.js} +14 -0
- package/cjs/{index-TGsVZNDP.js → index-BgvZ4y-3.js} +12 -0
- package/cjs/lmvz-action-list.cjs.entry.js +5 -5
- package/cjs/lmvz-action.cjs.entry.js +1 -1
- package/cjs/lmvz-button-group.cjs.entry.js +2 -2
- package/cjs/lmvz-button_2.cjs.entry.js +6 -6
- package/cjs/lmvz-card.cjs.entry.js +2 -2
- package/cjs/lmvz-checkbox.cjs.entry.js +2 -2
- package/cjs/lmvz-chip.cjs.entry.js +2 -2
- package/cjs/lmvz-components.cjs.js +2 -2
- package/cjs/lmvz-datepicker.cjs.entry.js +2764 -0
- package/cjs/lmvz-header_2.cjs.entry.js +6 -6
- package/cjs/{lmvz-popover.cjs.entry.js → lmvz-input_2.cjs.entry.js} +230 -11
- package/cjs/lmvz-link.cjs.entry.js +2 -2
- package/cjs/lmvz-menuitem.cjs.entry.js +5 -5
- package/cjs/lmvz-message.cjs.entry.js +2 -2
- package/cjs/lmvz-modal.cjs.entry.js +4 -4
- package/cjs/lmvz-radio.cjs.entry.js +3 -3
- package/cjs/lmvz-select.cjs.entry.js +3 -3
- package/cjs/lmvz-snackbar.cjs.entry.js +2 -2
- package/cjs/lmvz-spinner.cjs.entry.js +2 -2
- package/cjs/lmvz-tab.cjs.entry.js +2 -2
- package/cjs/lmvz-tabs.cjs.entry.js +4 -4
- package/cjs/lmvz-toggle.cjs.entry.js +4 -5
- package/cjs/loader.cjs.js +2 -2
- package/cjs/{async.util-Dnl6c82X.js → stencil.util-TjS8_DoU.js} +13 -1
- package/collection/assets/icons/calendar.svg +7 -0
- package/collection/collection-manifest.json +1 -0
- package/collection/components/lmvz-action-list/lmvz-action-list.css +1 -0
- package/collection/components/lmvz-button/lmvz-button.css +1 -0
- package/collection/components/lmvz-card/lmvz-card.css +1 -0
- package/collection/components/lmvz-datepicker/lmvz-datepicker.css +166 -0
- package/collection/components/lmvz-datepicker/lmvz-datepicker.js +988 -0
- package/collection/components/lmvz-datepicker/lmvz-datepicker.utils.js +189 -0
- package/collection/components/lmvz-datepicker/test/lmvz-datepicker.utils.unit.js +300 -0
- package/collection/components/lmvz-header/lmvz-header.js +1 -1
- package/collection/components/lmvz-icon/lmvz-icon.js +1 -1
- package/collection/components/lmvz-input/lmvz-input.css +2 -1
- package/collection/components/lmvz-input/lmvz-input.js +40 -2
- package/collection/components/lmvz-link/lmvz-link.js +1 -1
- package/collection/components/lmvz-menuitem/lmvz-menuitem.js +1 -1
- package/collection/components/lmvz-message/lmvz-message.js +1 -1
- package/collection/components/lmvz-modal/lmvz-modal.js +1 -1
- package/collection/components/lmvz-popover/lmvz-popover.js +6 -2
- package/collection/components/lmvz-radio/lmvz-radio.js +1 -1
- package/collection/components/lmvz-select/lmvz-select.js +1 -1
- package/collection/components/lmvz-snackbar/lmvz-snackbar.js +1 -1
- package/collection/components/lmvz-spinner/lmvz-spinner.js +1 -1
- package/collection/components/lmvz-tab/lmvz-tab.js +1 -1
- package/collection/components/lmvz-tabs/lmvz-tabs.js +1 -1
- package/collection/components/lmvz-toggle/lmvz-toggle.js +1 -1
- package/collection/integration/header-integration/header-integration.js +1 -1
- package/collection/utils/aria/aria.constants.js +7 -0
- package/collection/utils/aria/directional-focus-controller.js +3 -1
- package/collection/utils/element/element.util.js +5 -0
- package/components/index.d.ts +2 -0
- package/components/index.d.ts.bak +2 -0
- package/components/index.js +1 -1
- package/components/lmvz-action-list.js +1 -1
- package/components/lmvz-action.js +1 -1
- package/components/lmvz-button-group.js +1 -1
- package/components/lmvz-button.js +1 -1
- package/components/lmvz-card.js +1 -1
- package/components/lmvz-checkbox.js +1 -1
- package/components/lmvz-chip.js +1 -1
- package/components/lmvz-datepicker.d.ts +11 -0
- package/components/lmvz-datepicker.d.ts.bak +11 -0
- package/components/lmvz-datepicker.js +1 -0
- package/components/lmvz-header.js +1 -1
- package/components/lmvz-icon.js +1 -1
- package/components/lmvz-input.js +1 -1
- package/components/lmvz-link.js +1 -1
- package/components/lmvz-menuitem.js +1 -1
- package/components/lmvz-message.js +1 -1
- package/components/lmvz-modal.js +1 -1
- package/components/lmvz-popover.js +1 -1
- package/components/lmvz-radio.js +1 -1
- package/components/lmvz-select.js +1 -1
- package/components/lmvz-snackbar.js +1 -1
- package/components/lmvz-spinner.js +1 -1
- package/components/lmvz-tab.js +1 -1
- package/components/lmvz-tabs.js +1 -1
- package/components/lmvz-toggle.js +1 -1
- package/components/{p-Chj7BuUZ.js → p--FDdvoIg.js} +1 -1
- package/components/{p-CFTmV4XZ.js → p-BAj4FkUt.js} +1 -1
- package/components/{p-CxLd309t.js → p-BLMXiDE0.js} +1 -1
- package/components/{p-DGg7OzDl.js → p-BPYBmylI.js} +1 -1
- package/components/p-BhALzK62.js +1 -0
- package/components/p-Bnri3fEI.js +1 -0
- package/components/p-C-pRMuMh.js +1 -0
- package/components/p-CPuI0_r_.js +1 -0
- package/components/p-CWpl0WaZ.js +1 -0
- package/components/{p-D5FL8n1q.js → p-CrQCHVKL.js} +1 -1
- package/components/p-DqdrUt_G.js +1 -0
- package/components/{p-CgK6-SEe.js → p-diOze8wI.js} +1 -1
- package/esm/{aria-validation-controller-BvOU1BO8.js → aria-validation-controller-Cp6pofER.js} +1 -1
- package/esm/{directional-focus-controller-DgAdCZrG.js → directional-focus-controller-Bhu7RqYE.js} +3 -1
- package/esm/{element-activation-controller-7PNSl6io.js → element-activation-controller-BuwyVq4A.js} +1 -1
- package/esm/{element.util-BFcYfHYq.js → element.util-Bd9JyKJZ.js} +13 -1
- package/esm/{index-BPeerEwm.js → index-BOXP1Vx0.js} +12 -1
- package/esm/lmvz-action-list.entry.js +5 -5
- package/esm/lmvz-action.entry.js +1 -1
- package/esm/lmvz-button-group.entry.js +2 -2
- package/esm/lmvz-button_2.entry.js +6 -6
- package/esm/lmvz-card.entry.js +2 -2
- package/esm/lmvz-checkbox.entry.js +2 -2
- package/esm/lmvz-chip.entry.js +2 -2
- package/esm/lmvz-components.js +3 -3
- package/esm/lmvz-datepicker.entry.js +2762 -0
- package/esm/lmvz-header_2.entry.js +6 -6
- package/esm/{lmvz-popover.entry.js → lmvz-input_2.entry.js} +227 -9
- package/esm/lmvz-link.entry.js +2 -2
- package/esm/lmvz-menuitem.entry.js +5 -5
- package/esm/lmvz-message.entry.js +2 -2
- package/esm/lmvz-modal.entry.js +4 -4
- package/esm/lmvz-radio.entry.js +3 -3
- package/esm/lmvz-select.entry.js +3 -3
- package/esm/lmvz-snackbar.entry.js +2 -2
- package/esm/lmvz-spinner.entry.js +2 -2
- package/esm/lmvz-tab.entry.js +2 -2
- package/esm/lmvz-tabs.entry.js +4 -4
- package/esm/lmvz-toggle.entry.js +4 -5
- package/esm/loader.js +3 -3
- package/esm/{async.util-DZj20TV1.js → stencil.util-C3QOYC8E.js} +13 -1
- package/hydrate/index.js +3083 -241
- package/hydrate/index.mjs +3083 -241
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/{p-eb62d4af.entry.js → p-0af0211a.entry.js} +1 -1
- package/lmvz-components/{p-0c05f24b.entry.js → p-3d5867df.entry.js} +1 -1
- package/lmvz-components/{p-a887018d.entry.js → p-492adf21.entry.js} +1 -1
- package/lmvz-components/{p-24d13be6.entry.js → p-4fa6e72f.entry.js} +1 -1
- package/lmvz-components/{p-5bbbcfc0.entry.js → p-544e3ccb.entry.js} +1 -1
- package/lmvz-components/{p-eb4c5a6f.entry.js → p-63f6a596.entry.js} +1 -1
- package/lmvz-components/p-7a7aa922.entry.js +1 -0
- package/lmvz-components/p-8022c6dc.entry.js +1 -0
- package/lmvz-components/{p-BPeerEwm.js → p-BOXP1Vx0.js} +2 -2
- package/lmvz-components/p-Bd9JyKJZ.js +1 -0
- package/lmvz-components/{p-D9PQIBzA.js → p-BeY96W7m.js} +1 -1
- package/lmvz-components/p-C3QOYC8E.js +1 -0
- package/lmvz-components/p-GGkwaiT6.js +1 -0
- package/lmvz-components/{p-wlMjNjuv.js → p-UhNgD4L3.js} +1 -1
- package/lmvz-components/{p-d4154a65.entry.js → p-a611c110.entry.js} +1 -1
- package/lmvz-components/{p-46edf36f.entry.js → p-b1bb4393.entry.js} +1 -1
- package/lmvz-components/p-b50b1cb5.entry.js +1 -0
- package/lmvz-components/{p-f42b16e6.entry.js → p-b932cf91.entry.js} +1 -1
- package/lmvz-components/p-bff115d4.entry.js +1 -0
- package/lmvz-components/p-d280d21a.entry.js +1 -0
- package/lmvz-components/{p-c2544495.entry.js → p-d48203f9.entry.js} +1 -1
- package/lmvz-components/{p-e4ce63b3.entry.js → p-d9aede81.entry.js} +1 -1
- package/lmvz-components/{p-ecbd9e93.entry.js → p-dbfbcb74.entry.js} +1 -1
- package/lmvz-components/p-f0e28f3a.entry.js +1 -0
- package/lmvz-components/{p-aaa7691c.entry.js → p-f853faae.entry.js} +1 -1
- package/lmvz-components/p-fa2efc42.entry.js +1 -0
- package/lmvz-components/{p-194a3af5.entry.js → p-fe6f5bdc.entry.js} +1 -1
- package/manifest.json +940 -159
- package/package.json +5 -1
- package/types/api/ds.constants.d.ts +0 -1
- package/types/api/ds.types.d.ts +8 -0
- package/types/components/lmvz-action/lmvz-action.d.ts +0 -1
- package/types/components/lmvz-action-list/lmvz-action-list.d.ts +0 -1
- package/types/components/lmvz-button/lmvz-button.d.ts +0 -1
- package/types/components/lmvz-button-group/lmvz-button-group.d.ts +0 -1
- package/types/components/lmvz-card/lmvz-card.d.ts +0 -1
- package/types/components/lmvz-checkbox/lmvz-checkbox.d.ts +0 -1
- package/types/components/lmvz-chip/lmvz-chip.d.ts +0 -1
- package/types/components/lmvz-datepicker/lmvz-datepicker.d.ts +75 -0
- package/types/components/lmvz-datepicker/lmvz-datepicker.utils.d.ts +22 -0
- package/types/components/lmvz-datepicker/test/lmvz-datepicker.utils.unit.d.ts +1 -0
- package/types/components/lmvz-header/lmvz-header.d.ts +0 -1
- package/types/components/lmvz-icon/lmvz-icon.d.ts +0 -1
- package/types/components/lmvz-input/lmvz-input.d.ts +5 -1
- package/types/components/lmvz-link/lmvz-link.d.ts +0 -1
- package/types/components/lmvz-menuitem/lmvz-menuitem.d.ts +0 -1
- package/types/components/lmvz-message/lmvz-message.d.ts +0 -1
- package/types/components/lmvz-message/public.d.ts +0 -1
- package/types/components/lmvz-modal/lmvz-modal.d.ts +0 -1
- package/types/components/lmvz-modal/test/testing.d.ts +0 -1
- package/types/components/lmvz-popover/lmvz-popover.d.ts +0 -1
- package/types/components/lmvz-radio/lmvz-radio.d.ts +0 -1
- package/types/components/lmvz-select/lmvz-select.d.ts +0 -1
- package/types/components/lmvz-snackbar/lmvz-snackbar.d.ts +0 -1
- package/types/components/lmvz-snackbar/public.d.ts +0 -1
- package/types/components/lmvz-snackbar/snackbar-controller.d.ts +0 -1
- package/types/components/lmvz-spinner/lmvz-spinner.d.ts +0 -1
- package/types/components/lmvz-tab/lmvz-tab.d.ts +0 -1
- package/types/components/lmvz-tabs/lmvz-tabs.d.ts +0 -1
- package/types/components/lmvz-toggle/lmvz-toggle.d.ts +0 -1
- package/types/components.d.ts +216 -0
- package/types/index.d.ts +0 -1
- package/types/utils/aria/aria-validation-controller.d.ts +0 -1
- package/types/utils/aria/aria.constants.d.ts +1 -1
- package/types/utils/aria/directional-focus-controller.d.ts +0 -1
- package/types/utils/aria/element-activation-controller.d.ts +0 -1
- package/types/utils/async/async.util.d.ts +1 -2
- package/types/utils/data/event.util.d.ts +0 -1
- package/types/utils/data/number.util.d.ts +0 -1
- package/types/utils/data/object.util.d.ts +0 -1
- package/types/utils/data/time.util.d.ts +0 -1
- package/types/utils/element/element.util.d.ts +1 -1
- package/types/utils/environment.d.ts +0 -1
- package/types/utils/icons/icons-registry.d.ts +0 -1
- package/types/utils/icons/icons.d.ts +0 -1
- package/types/utils/icons/icons.unit.d.ts +0 -1
- package/types/utils/icons/public.d.ts +0 -1
- package/types/utils/public.d.ts +0 -1
- package/types/utils/radio/radio-group-controller.d.ts +0 -1
- package/types/utils/stencil/assets.d.ts +0 -1
- package/types/utils/stencil/reactive-controller-host.d.ts +0 -1
- package/types/utils/stencil/stencil.util.d.ts +0 -1
- package/cjs/lmvz-input.cjs.entry.js +0 -186
- package/cjs/stencil.util-CBrPLd-F.js +0 -17
- package/components/p-BVzxNP7h.js +0 -1
- package/components/p-DLUsBYJH.js +0 -1
- package/components/p-zMWemcoB.js +0 -1
- package/esm/lmvz-input.entry.js +0 -184
- package/esm/stencil.util-D2-5rsN3.js +0 -15
- package/lmvz-components/p-4416d688.entry.js +0 -1
- package/lmvz-components/p-489d9912.entry.js +0 -1
- package/lmvz-components/p-5ff55ba9.entry.js +0 -1
- package/lmvz-components/p-888e04d7.entry.js +0 -1
- package/lmvz-components/p-9dc420e2.entry.js +0 -1
- package/lmvz-components/p-BFcYfHYq.js +0 -1
- package/lmvz-components/p-BuEA0MWd.js +0 -1
- package/lmvz-components/p-DZj20TV1.js +0 -1
- package/lmvz-components/p-af48eccb.entry.js +0 -1
- package/lmvz-components/p-bc237ab7.entry.js +0 -1
- package/lmvz-components/p-bh9cItsP.js +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmvz-ds/components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.36.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "The components of the design system",
|
|
7
7
|
"author": "Patrick Nemenz <patrick.nemenz@adesso.at>",
|
|
@@ -119,6 +119,10 @@
|
|
|
119
119
|
"./lmvz-popover": {
|
|
120
120
|
"import": "./components/lmvz-popover.js",
|
|
121
121
|
"types": "./components/lmvz-popover.d.ts"
|
|
122
|
+
},
|
|
123
|
+
"./lmvz-datepicker": {
|
|
124
|
+
"import": "./components/lmvz-datepicker.js",
|
|
125
|
+
"types": "./components/lmvz-datepicker.d.ts"
|
|
122
126
|
}
|
|
123
127
|
},
|
|
124
128
|
"main": "./index.cjs.js",
|
|
@@ -16,4 +16,3 @@ export declare const snackbarPriorities: readonly ["low", "normal", "high"];
|
|
|
16
16
|
export declare const snackbarDismissReasons: readonly ["timeout", "manual", "action", "overridden", "swallowed"];
|
|
17
17
|
export declare const popoverPlacements: readonly ["top", "bottom", "start", "end", "top-start", "top-end", "bottom-start", "bottom-end"];
|
|
18
18
|
export declare const popoverSizes: readonly ["sm", "md", "lg"];
|
|
19
|
-
//# sourceMappingURL=ds.constants.d.ts.map
|
package/types/api/ds.types.d.ts
CHANGED
|
@@ -74,5 +74,13 @@ export namespace Popover {
|
|
|
74
74
|
export type Size = (typeof popoverSizes)[number];
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
export namespace Datepicker {
|
|
78
|
+
/**
|
|
79
|
+
* A display-format pattern using the tokens `yyyy`, `MM`, `dd`
|
|
80
|
+
* (any order, arbitrary literal separators), e.g. `'dd.MM.yyyy'`.
|
|
81
|
+
*/
|
|
82
|
+
export type DisplayFormat = string;
|
|
83
|
+
}
|
|
84
|
+
|
|
77
85
|
export type Attributes = { [key: string]: unknown };
|
|
78
86
|
export type FormRef = string | HTMLFormElement | undefined;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { IsoDateString, IsoYearMonthString } from '@lmvz-ds/lib-ts/date/IsoDateString.js';
|
|
3
|
+
import type { Datepicker } from '../../api';
|
|
4
|
+
export declare class LmvzDatepicker {
|
|
5
|
+
private el;
|
|
6
|
+
private readonly monthLabelId;
|
|
7
|
+
internals: ElementInternals;
|
|
8
|
+
private visibleDays?;
|
|
9
|
+
private inputEl?;
|
|
10
|
+
private focusedButtonRef?;
|
|
11
|
+
private initialValue;
|
|
12
|
+
private pendingGridFocus;
|
|
13
|
+
private syncOrigin;
|
|
14
|
+
private focusedDate;
|
|
15
|
+
private setFocusedDate;
|
|
16
|
+
private valueDate;
|
|
17
|
+
get value(): IsoDateString | undefined;
|
|
18
|
+
set value(value: IsoDateString | undefined);
|
|
19
|
+
private visibleMonthDate;
|
|
20
|
+
get visibleMonth(): IsoYearMonthString | undefined;
|
|
21
|
+
set visibleMonth(value: IsoYearMonthString | undefined);
|
|
22
|
+
min: IsoDateString | undefined;
|
|
23
|
+
max: IsoDateString | undefined;
|
|
24
|
+
locale: string;
|
|
25
|
+
firstDayOfWeek: 0 | 1;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
readonly: boolean;
|
|
28
|
+
required: boolean;
|
|
29
|
+
name?: string;
|
|
30
|
+
label?: string;
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
helperText?: string;
|
|
33
|
+
errorMessage?: string;
|
|
34
|
+
open: boolean;
|
|
35
|
+
displayFormat?: Datepicker.DisplayFormat;
|
|
36
|
+
lmvzChange: EventEmitter<{
|
|
37
|
+
value: IsoDateString | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
lmvzMonthChange: EventEmitter<{
|
|
40
|
+
visibleMonth: IsoYearMonthString;
|
|
41
|
+
}>;
|
|
42
|
+
lmvzOpen: EventEmitter<void>;
|
|
43
|
+
lmvzClose: EventEmitter<void>;
|
|
44
|
+
componentWillLoad(): void;
|
|
45
|
+
formAssociatedCallback(form: HTMLFormElement | undefined): void;
|
|
46
|
+
formResetCallback(): void;
|
|
47
|
+
formStateRestoreCallback(state: string | File | FormData | null): void;
|
|
48
|
+
checkValidity(): Promise<boolean>;
|
|
49
|
+
reportValidity(): Promise<boolean>;
|
|
50
|
+
protected handleValidityRelevantPropChange(): void;
|
|
51
|
+
protected handleDisplayFormatChange(): void;
|
|
52
|
+
protected handleDisabledChange(disabled: boolean): void;
|
|
53
|
+
handleKeydown(ev: KeyboardEvent): void;
|
|
54
|
+
private initFocusedDate;
|
|
55
|
+
private get effectiveVisibleMonth();
|
|
56
|
+
private navigateMonth;
|
|
57
|
+
private selectDate;
|
|
58
|
+
private moveFocus;
|
|
59
|
+
private syncInputTextFromValue;
|
|
60
|
+
private inputText;
|
|
61
|
+
private hasUnparseableInput;
|
|
62
|
+
private handleInputTextChange;
|
|
63
|
+
handleInputFocus(ev: FocusEvent): void;
|
|
64
|
+
private handleInputKeydown;
|
|
65
|
+
private focusGrid;
|
|
66
|
+
private handlePopoverOpen;
|
|
67
|
+
private handlePopoverClose;
|
|
68
|
+
private updateFormState;
|
|
69
|
+
private isInvalid;
|
|
70
|
+
private get effectivePlaceholder();
|
|
71
|
+
private renderHeader;
|
|
72
|
+
private renderWeekdayRow;
|
|
73
|
+
private renderGrid;
|
|
74
|
+
render(): any;
|
|
75
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as PlainDateFns from 'temporal-polyfill/fns/PlainDate';
|
|
2
|
+
import * as PlainYearMonthFns from 'temporal-polyfill/fns/PlainYearMonth';
|
|
3
|
+
import type { IsoDateString } from '@lmvz-ds/lib-ts/date/IsoDateString.js';
|
|
4
|
+
import type { Datepicker } from '../../api';
|
|
5
|
+
export declare function isSelected(date: PlainDateFns.Record, value: PlainDateFns.Record | undefined): boolean;
|
|
6
|
+
export declare function isDisabled(date: PlainDateFns.Record, min: PlainDateFns.Record | undefined, max: PlainDateFns.Record | undefined): boolean;
|
|
7
|
+
export declare function buildCalendarGrid(visibleMonth: PlainYearMonthFns.Record): PlainDateFns.Record[];
|
|
8
|
+
export declare function isInFirstWeekOfMonth(date: PlainDateFns.Record): boolean;
|
|
9
|
+
export declare function isInLastWeekOfMonth(date: PlainDateFns.Record): boolean;
|
|
10
|
+
export declare function firstSelectableDayOfMonth(visibleMonth: PlainYearMonthFns.Record, min: PlainDateFns.Record | undefined, max: PlainDateFns.Record | undefined): PlainDateFns.Record | null;
|
|
11
|
+
export declare function lastSelectableDayOfMonth(visibleMonth: PlainYearMonthFns.Record, min: PlainDateFns.Record | undefined, max: PlainDateFns.Record | undefined): PlainDateFns.Record | null;
|
|
12
|
+
export declare function getNavLabels(locale: string): {
|
|
13
|
+
prev: string;
|
|
14
|
+
next: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function getValidationLabels(locale: string): {
|
|
17
|
+
popoverSuffix: string;
|
|
18
|
+
invalidDateMessage: string;
|
|
19
|
+
};
|
|
20
|
+
export declare function derivePatternFromLocale(locale: string): Datepicker.DisplayFormat;
|
|
21
|
+
export declare function formatToDisplay(value: IsoDateString | undefined, locale: string, displayFormat?: Datepicker.DisplayFormat): string;
|
|
22
|
+
export declare function parseFromDisplay(text: string, locale: string, displayFormat?: Datepicker.DisplayFormat): IsoDateString | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -10,6 +10,7 @@ export declare class LmvzInput extends ReactiveControllerHost implements AriaVal
|
|
|
10
10
|
private nativeInputElement?;
|
|
11
11
|
private inputId;
|
|
12
12
|
private initialValue;
|
|
13
|
+
private ariaHostMirrorObserver?;
|
|
13
14
|
private nativeError;
|
|
14
15
|
private errorFromProp;
|
|
15
16
|
private get helperId();
|
|
@@ -51,6 +52,10 @@ export declare class LmvzInput extends ReactiveControllerHost implements AriaVal
|
|
|
51
52
|
getInputElement(): Promise<HTMLInputElement | undefined>;
|
|
52
53
|
constructor();
|
|
53
54
|
componentWillLoad(): void;
|
|
55
|
+
connectedCallback(): void;
|
|
56
|
+
disconnectedCallback(): void;
|
|
57
|
+
componentDidLoad(): void;
|
|
58
|
+
private mirrorHostAriaAttribute;
|
|
54
59
|
formAssociatedCallback(form: HTMLFormElement | undefined): void;
|
|
55
60
|
formResetCallback(): void;
|
|
56
61
|
formStateRestoreCallback(state: string): void;
|
|
@@ -63,4 +68,3 @@ export declare class LmvzInput extends ReactiveControllerHost implements AriaVal
|
|
|
63
68
|
private updateNativeError;
|
|
64
69
|
render(): any;
|
|
65
70
|
}
|
|
66
|
-
//# sourceMappingURL=lmvz-input.d.ts.map
|
package/types/components.d.ts
CHANGED
|
@@ -215,6 +215,86 @@ export declare namespace Components {
|
|
|
215
215
|
*/
|
|
216
216
|
"type": Chip.Type;
|
|
217
217
|
}
|
|
218
|
+
export interface LmvzDatepicker {
|
|
219
|
+
/**
|
|
220
|
+
* Returns whether the current value satisfies `required`/`min`/`max` and is a parseable date. Unlike a native `<input>`, form-associated custom elements do not forward `ElementInternals`' constraint-validation API to the element automatically — this delegates to it explicitly.
|
|
221
|
+
*/
|
|
222
|
+
"checkValidity": () => Promise<boolean>;
|
|
223
|
+
/**
|
|
224
|
+
* Whether the entire datepicker (input + panel) is disabled.
|
|
225
|
+
* @default false
|
|
226
|
+
*/
|
|
227
|
+
"disabled": boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Custom display-format pattern for the text field, using the tokens `yyyy`, `MM`, `dd` (e.g. `'dd.MM.yyyy'`). Defaults to a pattern derived from `locale`.
|
|
230
|
+
*/
|
|
231
|
+
"displayFormat"?: Datepicker.DisplayFormat;
|
|
232
|
+
/**
|
|
233
|
+
* Error message displayed below the text field when the value is invalid.
|
|
234
|
+
*/
|
|
235
|
+
"errorMessage"?: string;
|
|
236
|
+
/**
|
|
237
|
+
* First day of the week: `0` = Sunday, `1` = Monday. Monday-first is hardcoded for v1; this prop is reserved for future runtime support.
|
|
238
|
+
* @default 1
|
|
239
|
+
*/
|
|
240
|
+
"firstDayOfWeek": 0 | 1;
|
|
241
|
+
/**
|
|
242
|
+
* Helper text displayed below the text field.
|
|
243
|
+
*/
|
|
244
|
+
"helperText"?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Label for the composed text field.
|
|
247
|
+
*/
|
|
248
|
+
"label"?: string;
|
|
249
|
+
/**
|
|
250
|
+
* BCP 47 locale tag used for weekday/month names, ARIA labels, and the default display format.
|
|
251
|
+
* @default 'de-CH'
|
|
252
|
+
*/
|
|
253
|
+
"locale": string;
|
|
254
|
+
/**
|
|
255
|
+
* Maximum selectable date in ISO `YYYY-MM-DD` format. Days after this date are disabled.
|
|
256
|
+
*/
|
|
257
|
+
"max": IsoDateString | undefined;
|
|
258
|
+
/**
|
|
259
|
+
* Minimum selectable date in ISO `YYYY-MM-DD` format. Days before this date are disabled.
|
|
260
|
+
*/
|
|
261
|
+
"min": IsoDateString | undefined;
|
|
262
|
+
/**
|
|
263
|
+
* Name submitted with the form.
|
|
264
|
+
*/
|
|
265
|
+
"name"?: string;
|
|
266
|
+
/**
|
|
267
|
+
* Whether the calendar popover is open. Reflects the actual open state — it is kept in sync with focus/keyboard interactions and with light-dismiss/Escape closing.
|
|
268
|
+
* @default false
|
|
269
|
+
*/
|
|
270
|
+
"open": boolean;
|
|
271
|
+
/**
|
|
272
|
+
* Placeholder for the composed text field. Defaults to the locale-derived display pattern (e.g. `dd.MM.yyyy`).
|
|
273
|
+
*/
|
|
274
|
+
"placeholder"?: string;
|
|
275
|
+
/**
|
|
276
|
+
* Whether the datepicker is readonly. The text field cannot be typed into and the calendar cannot change the value, but the value is still submitted with the form.
|
|
277
|
+
* @default false
|
|
278
|
+
*/
|
|
279
|
+
"readonly": boolean;
|
|
280
|
+
/**
|
|
281
|
+
* Reports validation errors to the user (e.g. shows the browser's native validation bubble) and returns whether the current value is valid.
|
|
282
|
+
*/
|
|
283
|
+
"reportValidity": () => Promise<boolean>;
|
|
284
|
+
/**
|
|
285
|
+
* Whether a value is required for the form to be valid.
|
|
286
|
+
* @default false
|
|
287
|
+
*/
|
|
288
|
+
"required": boolean;
|
|
289
|
+
/**
|
|
290
|
+
* The selected date in ISO `YYYY-MM-DD` format.
|
|
291
|
+
*/
|
|
292
|
+
"value": `${number}-${number}-${number}` | undefined;
|
|
293
|
+
/**
|
|
294
|
+
* ISO year-month string (`YYYY-MM`) whose month is currently displayed. Defaults to the current month when unset.
|
|
295
|
+
*/
|
|
296
|
+
"visibleMonth": IsoYearMonthString | undefined;
|
|
297
|
+
}
|
|
218
298
|
/**
|
|
219
299
|
* An accessible, application-style navigation header component, that renders two connected levels of navigation.
|
|
220
300
|
*/
|
|
@@ -850,6 +930,14 @@ export declare namespace Components {
|
|
|
850
930
|
}
|
|
851
931
|
}
|
|
852
932
|
|
|
933
|
+
export declare namespace Datepicker {
|
|
934
|
+
/**
|
|
935
|
+
* A display-format pattern using the tokens `yyyy`, `MM`, `dd`
|
|
936
|
+
* (any order, arbitrary literal separators), e.g. `'dd.MM.yyyy'`.
|
|
937
|
+
*/
|
|
938
|
+
export type DisplayFormat = string;
|
|
939
|
+
}
|
|
940
|
+
|
|
853
941
|
export declare type FormRef = string | HTMLFormElement | undefined;
|
|
854
942
|
|
|
855
943
|
export declare namespace Icon {
|
|
@@ -880,6 +968,18 @@ declare const inputSizes: readonly ["sm", "md", "lg"];
|
|
|
880
968
|
|
|
881
969
|
declare const inputTypes: readonly ["text", "email", "password", "tel", "url", "search", "number"];
|
|
882
970
|
|
|
971
|
+
/**
|
|
972
|
+
* ISO 8601 date string: YYYY-MM-DD
|
|
973
|
+
* Compatible with Temporal.PlainDate.toString()
|
|
974
|
+
*/
|
|
975
|
+
export declare type IsoDateString = `${number}-${number}-${number}`;
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* ISO 8601 year-month string: YYYY-MM
|
|
979
|
+
* Compatible with Temporal.PlainYearMonth.toString()
|
|
980
|
+
*/
|
|
981
|
+
export declare type IsoYearMonthString = `${number}-${number}`;
|
|
982
|
+
|
|
883
983
|
export declare namespace JSX {
|
|
884
984
|
export type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in `attr:${K}` | `prop:${K}`]?: never } | { [P in `attr:${K}`]: AttrT } & { [P in K | `prop:${K}`]?: never } | { [P in `prop:${K}`]: PropT } & { [P in K | `attr:${K}`]?: never };
|
|
885
985
|
|
|
@@ -1080,6 +1180,98 @@ export declare namespace JSX {
|
|
|
1080
1180
|
*/
|
|
1081
1181
|
"type"?: Chip.Type;
|
|
1082
1182
|
}
|
|
1183
|
+
export interface LmvzDatepicker {
|
|
1184
|
+
/**
|
|
1185
|
+
* Whether the entire datepicker (input + panel) is disabled.
|
|
1186
|
+
* @default false
|
|
1187
|
+
*/
|
|
1188
|
+
"disabled"?: boolean;
|
|
1189
|
+
/**
|
|
1190
|
+
* Custom display-format pattern for the text field, using the tokens `yyyy`, `MM`, `dd` (e.g. `'dd.MM.yyyy'`). Defaults to a pattern derived from `locale`.
|
|
1191
|
+
*/
|
|
1192
|
+
"displayFormat"?: Datepicker.DisplayFormat;
|
|
1193
|
+
/**
|
|
1194
|
+
* Error message displayed below the text field when the value is invalid.
|
|
1195
|
+
*/
|
|
1196
|
+
"errorMessage"?: string;
|
|
1197
|
+
/**
|
|
1198
|
+
* First day of the week: `0` = Sunday, `1` = Monday. Monday-first is hardcoded for v1; this prop is reserved for future runtime support.
|
|
1199
|
+
* @default 1
|
|
1200
|
+
*/
|
|
1201
|
+
"firstDayOfWeek"?: 0 | 1;
|
|
1202
|
+
/**
|
|
1203
|
+
* The `id` of a `<form>` element to associate this element with.
|
|
1204
|
+
*/
|
|
1205
|
+
"form"?: string;
|
|
1206
|
+
/**
|
|
1207
|
+
* Helper text displayed below the text field.
|
|
1208
|
+
*/
|
|
1209
|
+
"helperText"?: string;
|
|
1210
|
+
/**
|
|
1211
|
+
* Label for the composed text field.
|
|
1212
|
+
*/
|
|
1213
|
+
"label"?: string;
|
|
1214
|
+
/**
|
|
1215
|
+
* BCP 47 locale tag used for weekday/month names, ARIA labels, and the default display format.
|
|
1216
|
+
* @default 'de-CH'
|
|
1217
|
+
*/
|
|
1218
|
+
"locale"?: string;
|
|
1219
|
+
/**
|
|
1220
|
+
* Maximum selectable date in ISO `YYYY-MM-DD` format. Days after this date are disabled.
|
|
1221
|
+
*/
|
|
1222
|
+
"max"?: IsoDateString | undefined;
|
|
1223
|
+
/**
|
|
1224
|
+
* Minimum selectable date in ISO `YYYY-MM-DD` format. Days before this date are disabled.
|
|
1225
|
+
*/
|
|
1226
|
+
"min"?: IsoDateString | undefined;
|
|
1227
|
+
/**
|
|
1228
|
+
* Name submitted with the form.
|
|
1229
|
+
*/
|
|
1230
|
+
"name"?: string;
|
|
1231
|
+
/**
|
|
1232
|
+
* Emitted when the user selects a date (via the calendar grid or by typing a complete valid date). The `value` field carries an IsoDateString representing the selected date.
|
|
1233
|
+
*/
|
|
1234
|
+
"onLmvzChange"?: (event: LmvzDatepickerCustomEvent<{ value: IsoDateString | undefined }>) => void;
|
|
1235
|
+
/**
|
|
1236
|
+
* Forwarded from the internal popover: fired after the calendar panel closes.
|
|
1237
|
+
*/
|
|
1238
|
+
"onLmvzClose"?: (event: LmvzDatepickerCustomEvent<void>) => void;
|
|
1239
|
+
/**
|
|
1240
|
+
* Emitted when the displayed month changes via prev/next navigation. The `visibleMonth` field carries an IsoYearMonthString representing the new month.
|
|
1241
|
+
*/
|
|
1242
|
+
"onLmvzMonthChange"?: (event: LmvzDatepickerCustomEvent<{ visibleMonth: IsoYearMonthString }>) => void;
|
|
1243
|
+
/**
|
|
1244
|
+
* Forwarded from the internal popover: fired after the calendar panel opens.
|
|
1245
|
+
*/
|
|
1246
|
+
"onLmvzOpen"?: (event: LmvzDatepickerCustomEvent<void>) => void;
|
|
1247
|
+
/**
|
|
1248
|
+
* Whether the calendar popover is open. Reflects the actual open state — it is kept in sync with focus/keyboard interactions and with light-dismiss/Escape closing.
|
|
1249
|
+
* @default false
|
|
1250
|
+
*/
|
|
1251
|
+
"open"?: boolean;
|
|
1252
|
+
/**
|
|
1253
|
+
* Placeholder for the composed text field. Defaults to the locale-derived display pattern (e.g. `dd.MM.yyyy`).
|
|
1254
|
+
*/
|
|
1255
|
+
"placeholder"?: string;
|
|
1256
|
+
/**
|
|
1257
|
+
* Whether the datepicker is readonly. The text field cannot be typed into and the calendar cannot change the value, but the value is still submitted with the form.
|
|
1258
|
+
* @default false
|
|
1259
|
+
*/
|
|
1260
|
+
"readonly"?: boolean;
|
|
1261
|
+
/**
|
|
1262
|
+
* Whether a value is required for the form to be valid.
|
|
1263
|
+
* @default false
|
|
1264
|
+
*/
|
|
1265
|
+
"required"?: boolean;
|
|
1266
|
+
/**
|
|
1267
|
+
* The selected date in ISO `YYYY-MM-DD` format.
|
|
1268
|
+
*/
|
|
1269
|
+
"value"?: `${number}-${number}-${number}` | undefined;
|
|
1270
|
+
/**
|
|
1271
|
+
* ISO year-month string (`YYYY-MM`) whose month is currently displayed. Defaults to the current month when unset.
|
|
1272
|
+
*/
|
|
1273
|
+
"visibleMonth"?: IsoYearMonthString | undefined;
|
|
1274
|
+
}
|
|
1083
1275
|
/**
|
|
1084
1276
|
* An accessible, application-style navigation header component, that renders two connected levels of navigation.
|
|
1085
1277
|
*/
|
|
@@ -1713,6 +1905,24 @@ export declare namespace JSX {
|
|
|
1713
1905
|
"type": Chip.Type;
|
|
1714
1906
|
"size": Chip.Size;
|
|
1715
1907
|
}
|
|
1908
|
+
export interface LmvzDatepickerAttributes {
|
|
1909
|
+
"value": `${number}-${number}-${number}` | undefined;
|
|
1910
|
+
"visibleMonth": IsoYearMonthString | undefined;
|
|
1911
|
+
"min": IsoDateString | undefined;
|
|
1912
|
+
"max": IsoDateString | undefined;
|
|
1913
|
+
"locale": string;
|
|
1914
|
+
"firstDayOfWeek": 0 | 1;
|
|
1915
|
+
"disabled": boolean;
|
|
1916
|
+
"readonly": boolean;
|
|
1917
|
+
"required": boolean;
|
|
1918
|
+
"name": string;
|
|
1919
|
+
"label": string;
|
|
1920
|
+
"placeholder": string;
|
|
1921
|
+
"helperText": string;
|
|
1922
|
+
"errorMessage": string;
|
|
1923
|
+
"open": boolean;
|
|
1924
|
+
"displayFormat": Datepicker.DisplayFormat;
|
|
1925
|
+
}
|
|
1716
1926
|
export interface LmvzHeaderAttributes {
|
|
1717
1927
|
"role": string;
|
|
1718
1928
|
"lmvzActiveNav": string;
|
|
@@ -1843,6 +2053,7 @@ export declare namespace JSX {
|
|
|
1843
2053
|
"lmvz-card": Omit<LmvzCard, keyof LmvzCardAttributes> & { [K in keyof LmvzCard & keyof LmvzCardAttributes]?: LmvzCard[K] } & { [K in keyof LmvzCard & keyof LmvzCardAttributes as `attr:${K}`]?: LmvzCardAttributes[K] } & { [K in keyof LmvzCard & keyof LmvzCardAttributes as `prop:${K}`]?: LmvzCard[K] } & OneOf<"cardTitle", LmvzCard["cardTitle"], LmvzCardAttributes["cardTitle"]>;
|
|
1844
2054
|
"lmvz-checkbox": Omit<LmvzCheckbox, keyof LmvzCheckboxAttributes> & { [K in keyof LmvzCheckbox & keyof LmvzCheckboxAttributes]?: LmvzCheckbox[K] } & { [K in keyof LmvzCheckbox & keyof LmvzCheckboxAttributes as `attr:${K}`]?: LmvzCheckboxAttributes[K] } & { [K in keyof LmvzCheckbox & keyof LmvzCheckboxAttributes as `prop:${K}`]?: LmvzCheckbox[K] } & OneOf<"label", LmvzCheckbox["label"], LmvzCheckboxAttributes["label"]>;
|
|
1845
2055
|
"lmvz-chip": Omit<LmvzChip, keyof LmvzChipAttributes> & { [K in keyof LmvzChip & keyof LmvzChipAttributes]?: LmvzChip[K] } & { [K in keyof LmvzChip & keyof LmvzChipAttributes as `attr:${K}`]?: LmvzChipAttributes[K] } & { [K in keyof LmvzChip & keyof LmvzChipAttributes as `prop:${K}`]?: LmvzChip[K] };
|
|
2056
|
+
"lmvz-datepicker": Omit<LmvzDatepicker, keyof LmvzDatepickerAttributes> & { [K in keyof LmvzDatepicker & keyof LmvzDatepickerAttributes]?: LmvzDatepicker[K] } & { [K in keyof LmvzDatepicker & keyof LmvzDatepickerAttributes as `attr:${K}`]?: LmvzDatepickerAttributes[K] } & { [K in keyof LmvzDatepicker & keyof LmvzDatepickerAttributes as `prop:${K}`]?: LmvzDatepicker[K] };
|
|
1846
2057
|
"lmvz-header": Omit<LmvzHeader, keyof LmvzHeaderAttributes> & { [K in keyof LmvzHeader & keyof LmvzHeaderAttributes]?: LmvzHeader[K] } & { [K in keyof LmvzHeader & keyof LmvzHeaderAttributes as `attr:${K}`]?: LmvzHeaderAttributes[K] } & { [K in keyof LmvzHeader & keyof LmvzHeaderAttributes as `prop:${K}`]?: LmvzHeader[K] };
|
|
1847
2058
|
"lmvz-icon": Omit<LmvzIcon, keyof LmvzIconAttributes> & { [K in keyof LmvzIcon & keyof LmvzIconAttributes]?: LmvzIcon[K] } & { [K in keyof LmvzIcon & keyof LmvzIconAttributes as `attr:${K}`]?: LmvzIconAttributes[K] } & { [K in keyof LmvzIcon & keyof LmvzIconAttributes as `prop:${K}`]?: LmvzIcon[K] } & OneOf<"icon", LmvzIcon["icon"], LmvzIconAttributes["icon"]>;
|
|
1848
2059
|
"lmvz-input": Omit<LmvzInput, keyof LmvzInputAttributes> & { [K in keyof LmvzInput & keyof LmvzInputAttributes]?: LmvzInput[K] } & { [K in keyof LmvzInput & keyof LmvzInputAttributes as `attr:${K}`]?: LmvzInputAttributes[K] } & { [K in keyof LmvzInput & keyof LmvzInputAttributes as `prop:${K}`]?: LmvzInput[K] } & OneOf<"label", LmvzInput["label"], LmvzInputAttributes["label"]>;
|
|
@@ -1887,6 +2098,11 @@ export declare interface LmvzCheckboxCustomEvent<T> extends CustomEvent<T> {
|
|
|
1887
2098
|
target: HTMLLmvzCheckboxElement;
|
|
1888
2099
|
}
|
|
1889
2100
|
|
|
2101
|
+
export declare interface LmvzDatepickerCustomEvent<T> extends CustomEvent<T> {
|
|
2102
|
+
detail: T;
|
|
2103
|
+
target: HTMLLmvzDatepickerElement;
|
|
2104
|
+
}
|
|
2105
|
+
|
|
1890
2106
|
declare namespace LmvzDS {
|
|
1891
2107
|
type Variant = (typeof variants)[number];
|
|
1892
2108
|
type Size = (typeof sizes)[number];
|
package/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const ariaAttributes: string[];
|
|
2
|
-
|
|
2
|
+
export declare const ariaHostMirrorAttributes: readonly ["aria-haspopup", "aria-controls", "aria-expanded", "aria-activedescendant", "aria-autocomplete"];
|
|
@@ -47,4 +47,3 @@ export declare class DirectionalFocusController implements ReactiveController {
|
|
|
47
47
|
export type ListKeyboardNavigationHost = DirectionalFocusHost;
|
|
48
48
|
export type ListKeyboardNavigationControllerConfig = DirectionalFocusControllerConfig;
|
|
49
49
|
export { DirectionalFocusController as ListKeyboardNavigationController };
|
|
50
|
-
//# sourceMappingURL=directional-focus-controller.d.ts.map
|
|
@@ -25,4 +25,3 @@ export declare class ElementActivationController implements ReactiveController {
|
|
|
25
25
|
declare function bindHandlers(target: HTMLElement, handler: (event: Event) => unknown, abortSignal: AbortSignal, keys?: string[]): void;
|
|
26
26
|
export declare function addElementActivationListener(...[target, handler, abortSignal, keys]: Parameters<typeof bindHandlers>): void;
|
|
27
27
|
export {};
|
|
28
|
-
//# sourceMappingURL=element-activation-controller.d.ts.map
|
|
@@ -8,5 +8,4 @@ export declare const waitFrame: () => Promise<void>;
|
|
|
8
8
|
export declare const raf: (h: FrameRequestCallback) => number;
|
|
9
9
|
export declare const deferEvent: (event: EventEmitter) => EventEmitter;
|
|
10
10
|
export declare const debounceEvent: (event: EventEmitter, wait: number) => EventEmitter;
|
|
11
|
-
export declare const debounce: (func: (...args:
|
|
12
|
-
//# sourceMappingURL=async.util.d.ts.map
|
|
11
|
+
export declare const debounce: <A extends any[]>(func: (...args: A) => void, wait?: number) => (...args: A) => any;
|