@pglejzer/datepicker-ui 1.0.0 → 1.1.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/README.md +47 -13
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.d.cts +10 -18
- package/dist/cjs/kit.cjs +1 -1
- package/dist/cjs/kit.d.cts +111 -19
- package/dist/cjs/shared.cjs +1 -1
- package/dist/cjs/shared.d.cts +145 -41
- package/dist/css/index.css +1 -1
- package/dist/css/main.css +1 -1
- package/dist/css/themes/theme-ai.css +1 -1
- package/dist/css/themes/theme-crane-straight.css +1 -1
- package/dist/css/themes/theme-crane.css +1 -1
- package/dist/css/themes/theme-cyberpunk.css +1 -1
- package/dist/css/themes/theme-glassmorphic.css +1 -1
- package/dist/css/themes/theme-m2.css +1 -1
- package/dist/css/themes/theme-m3-green.css +1 -1
- package/dist/css/themes/theme-pastel.css +1 -1
- package/dist/esm/index.d.ts +10 -14
- package/dist/esm/index.js +1 -1
- package/dist/esm/kit.d.ts +112 -19
- package/dist/esm/kit.js +1 -1
- package/dist/esm/shared.d.ts +140 -41
- package/dist/esm/shared.js +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/kit.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
:is(.dp-
|
|
1
|
+
:is(.dp-ui__dialog,.dp-ui__container)[data-theme=crane-straight]{color-scheme:dark}:is(.dp-ui,.dp-ui__dialog,.dp-ui__container)[data-theme=crane-straight]{--dp-ui-sys-color-surface-container-high: #5d1049;--dp-ui-sys-color-surface-variant: #71135c;--dp-ui-sys-color-on-surface: #ffffff;--dp-ui-sys-color-on-surface-variant: #e5e5e5;--dp-ui-sys-color-primary: #e30425;--dp-ui-sys-color-on-primary: #ffffff;--dp-ui-sys-color-secondary-container: #e30425;--dp-ui-sys-color-on-secondary-container: #ffffff;--dp-ui-sys-color-on-primary-container: #ffffff;--dp-ui-sys-color-outline-variant: color-mix( in srgb, #ff4c52 12%, transparent );--dp-ui-sys-color-outline: #ff4c52;--dp-ui-focus-ring-color: #ff4c52;--dp-ui-text-field-focus-outline-color: #ff8a8f;--dp-ui-text-field-focus-label-text-color: #ff8a8f;--dp-ui-sys-color-error: #ffb4ab;--dp-ui-date-in-range-container-color: #8f0d3a;--dp-ui-text-button-label-text-color: #ff8a8f;--dp-ui-preset-pressed-container-color: #8f0d3a;--dp-ui-preset-pressed-label-text-color: #ffffff;--dp-ui-date-today-outline-color: #ff8a8f;--dp-ui-date-today-label-text-color: #ff8a8f;--dp-ui-date-badge-color: #ff8a8f;--dp-ui-sys-shape-corner-extra-small: 0;--dp-ui-sys-shape-corner-small: 0;--dp-ui-sys-shape-corner-medium: 0;--dp-ui-sys-shape-corner-large: 0;--dp-ui-sys-shape-corner-extra-large: 0;--dp-ui-sys-shape-corner-full: 0;--dp-ui-container-shape-docked: 0;--dp-ui-container-shape-modal: 0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:is(.dp-
|
|
1
|
+
:is(.dp-ui__dialog,.dp-ui__container)[data-theme=crane]{color-scheme:dark}:is(.dp-ui,.dp-ui__dialog,.dp-ui__container)[data-theme=crane]{--dp-ui-sys-color-surface-container-high: #5d1049;--dp-ui-sys-color-surface-variant: #71135c;--dp-ui-sys-color-on-surface: #ffffff;--dp-ui-sys-color-on-surface-variant: #e5e5e5;--dp-ui-sys-color-primary: #e30425;--dp-ui-sys-color-on-primary: #ffffff;--dp-ui-sys-color-secondary-container: #e30425;--dp-ui-sys-color-on-secondary-container: #ffffff;--dp-ui-sys-color-on-primary-container: #ffffff;--dp-ui-sys-color-outline-variant: color-mix( in srgb, #ff4c52 12%, transparent );--dp-ui-sys-color-outline: #ff4c52;--dp-ui-focus-ring-color: #ff4c52;--dp-ui-text-field-focus-outline-color: #ff8a8f;--dp-ui-text-field-focus-label-text-color: #ff8a8f;--dp-ui-sys-color-error: #ffb4ab;--dp-ui-date-in-range-container-color: #8f0d3a;--dp-ui-text-button-label-text-color: #ff8a8f;--dp-ui-preset-pressed-container-color: #8f0d3a;--dp-ui-preset-pressed-label-text-color: #ffffff;--dp-ui-date-today-outline-color: #ff8a8f;--dp-ui-date-today-label-text-color: #ff8a8f;--dp-ui-date-badge-color: #ff8a8f;--dp-ui-container-shape-docked: 1.25rem;--dp-ui-container-shape-modal: 1.25rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:is(.dp-
|
|
1
|
+
:is(.dp-ui__dialog,.dp-ui__container)[data-theme=cyberpunk]{color-scheme:dark}:is(.dp-ui,.dp-ui__dialog,.dp-ui__container)[data-theme=cyberpunk]{--dp-ui-sys-color-surface-container-high: #0f0c29;--dp-ui-sys-color-surface-variant: #1a1a2e;--dp-ui-sys-color-on-surface: #00f0ff;--dp-ui-sys-color-on-surface-variant: #00f0ff;--dp-ui-sys-color-primary: #00f0ff;--dp-ui-sys-color-on-primary: #0f0c29;--dp-ui-sys-color-secondary-container: #00f0ff;--dp-ui-sys-color-on-secondary-container: #0f0c29;--dp-ui-sys-color-on-primary-container: #0f0c29;--dp-ui-sys-color-outline-variant: rgba(0, 240, 255, 0.3);--dp-ui-sys-color-outline: rgb(255, 255, 255);--dp-ui-focus-ring-color: rgb(255, 255, 255);--dp-ui-sys-color-error: #ff5c7a;--dp-ui-date-in-range-container-color: #0e4a5c;--dp-ui-date-in-range-label-text-color: #e0fdff;--dp-ui-preset-pressed-container-color: #0e4a5c;--dp-ui-preset-pressed-label-text-color: #e0fdff;--dp-ui-container-elevation: 0 0 12px #00f0ff;--dp-ui-container-shape-docked: 1rem;--dp-ui-container-shape-modal: 1rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:is(.dp-
|
|
1
|
+
:is(.dp-ui__dialog,.dp-ui__container)[data-theme=glassmorphic]{color-scheme:dark}:is(.dp-ui,.dp-ui__dialog,.dp-ui__container)[data-theme=glassmorphic]{--dp-ui-sys-color-surface-container-high: rgba(16, 16, 24, 0.78);--dp-ui-sys-color-surface-variant: rgba(255, 255, 255, 0.14);--dp-ui-sys-color-on-surface: rgba(255, 255, 255, 0.95);--dp-ui-sys-color-on-surface-variant: rgba(255, 255, 255, 0.85);--dp-ui-sys-color-primary: rgba(255, 255, 255, 0.75);--dp-ui-sys-color-on-primary: #000000;--dp-ui-sys-color-secondary-container: rgba(255, 255, 255, 0.6);--dp-ui-sys-color-on-secondary-container: #000000;--dp-ui-sys-color-on-primary-container: #000000;--dp-ui-sys-color-outline-variant: rgba(255, 255, 255, 0.35);--dp-ui-sys-color-outline: rgba(255, 255, 255, 0.9);--dp-ui-focus-ring-color: #ffffff;--dp-ui-sys-color-error: #ffb4ab;--dp-ui-container-elevation: 0 10px 32px rgba(15, 15, 15, 0.25), 0 4px 8px rgba(0, 0, 0, 0.12);--dp-ui-container-backdrop-filter: blur(12px) saturate(180%);--dp-ui-container-shape-docked: 1.25rem;--dp-ui-container-shape-modal: 1.25rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:is(.dp-
|
|
1
|
+
:is(.dp-ui__dialog,.dp-ui__container)[data-theme=m2]{color-scheme:light}:is(.dp-ui,.dp-ui__dialog,.dp-ui__container)[data-theme=m2]{--dp-ui-sys-color-surface-container-high: #ffffff;--dp-ui-sys-color-surface-variant: #e0e0e0;--dp-ui-sys-color-on-surface: #000000;--dp-ui-sys-color-on-surface-variant: rgba(0, 0, 0, 0.6);--dp-ui-sys-color-primary: #6200ee;--dp-ui-sys-color-on-primary: #ffffff;--dp-ui-sys-color-secondary-container: #ece0fd;--dp-ui-sys-color-on-secondary-container: #6200ee;--dp-ui-sys-color-on-primary-container: #6200ee;--dp-ui-sys-color-outline-variant: #d6d6d6;--dp-ui-sys-color-outline: #8b5cf6;--dp-ui-focus-ring-color: #8b5cf6;--dp-ui-container-elevation: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 5px 8px 0px rgba(0, 0, 0, 0.14), 0px 1px 14px 0px rgba(0, 0, 0, 0.12);--dp-ui-container-shape-docked: 4px;--dp-ui-container-shape-modal: 4px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:is(.dp-
|
|
1
|
+
:is(.dp-ui__dialog,.dp-ui__container)[data-theme=m3-green]{color-scheme:light}:is(.dp-ui,.dp-ui__dialog,.dp-ui__container)[data-theme=m3-green]{--dp-ui-sys-color-surface-container-high: #e5eadc;--dp-ui-sys-color-surface-variant: #e0e4d6;--dp-ui-sys-color-on-surface: #1a1c18;--dp-ui-sys-color-on-surface-variant: #43483f;--dp-ui-sys-color-primary: #386a20;--dp-ui-sys-color-on-primary: #ffffff;--dp-ui-sys-color-on-primary-container: #042100;--dp-ui-sys-color-secondary-container: #d9e7cb;--dp-ui-sys-color-on-secondary-container: #131f0d;--dp-ui-sys-color-outline: #74796d;--dp-ui-sys-color-outline-variant: #c4c8bb;--dp-ui-sys-color-error: #ba1a1a;--dp-ui-sys-color-scrim: #000000}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:is(.dp-
|
|
1
|
+
:is(.dp-ui__dialog,.dp-ui__container)[data-theme=pastel]{color-scheme:light}:is(.dp-ui,.dp-ui__dialog,.dp-ui__container)[data-theme=pastel]{--dp-ui-sys-color-surface-container-high: #fdf6f0;--dp-ui-sys-color-surface-variant: #fae3d9;--dp-ui-sys-color-on-surface: #3b3b3b;--dp-ui-sys-color-on-surface-variant: #836b61;--dp-ui-sys-color-primary: #ffb6b9;--dp-ui-sys-color-on-primary: #3b3b3b;--dp-ui-sys-color-secondary-container: #ffb6b9;--dp-ui-sys-color-on-secondary-container: #3b3b3b;--dp-ui-sys-color-on-primary-container: #3b3b3b;--dp-ui-sys-color-outline-variant: #efdcd2;--dp-ui-sys-color-outline: #c9646a;--dp-ui-focus-ring-color: #a8474e;--dp-ui-text-field-focus-outline-color: #a8474e;--dp-ui-text-field-focus-label-text-color: #a8474e;--dp-ui-date-in-range-container-color: #ffe3e4;--dp-ui-text-button-label-text-color: #a8474e;--dp-ui-preset-pressed-container-color: #ffe3e4;--dp-ui-preset-pressed-label-text-color: #3b3b3b;--dp-ui-date-today-outline-color: #a8474e;--dp-ui-date-today-label-text-color: #a8474e;--dp-ui-date-badge-color: #a8474e;--dp-ui-container-elevation: 0 4px 16px rgba(0, 0, 0, 0.05);--dp-ui-container-shape-docked: 1.25rem;--dp-ui-container-shape-modal: 1.25rem}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/utils/EventEmitter.d.ts
|
|
1
|
+
import { $ as PlainDate, A as SelectMonthEventData, C as PickerValue, D as RangeStartEventData, E as RangeEndEventData, F as VisibleRange, M as SwitchViewEventData, N as UnavailableReason, O as RangeValue, P as UpdateEventData, Q as RangeEnd, S as OpenEventData, T as PickerView, W as WeekStartOption, X as PageBy, Y as CalendarMode, Z as Precision, _ as DateValue, a as DatepickerOptions, b as NavigateEventData, c as RangePreset, d as UIOptions, f as CancelEventData, g as ConfirmEventData, h as CloseEventData, i as DateDecoration, j as SelectYearEventData, k as SelectDayEventData, l as RangePresetValue, m as ClearEventData, n as CalendarOptions, o as LabelsOptions, p as CancelReason, r as CallbacksOptions, s as PluralLabel, t as BehaviorOptions, u as ThemeName, v as DatepickerEventMap, w as PickerValueInput, x as NavigateSource, y as ErrorEventData } from "./shared.js";
|
|
3
2
|
type Handler<Data> = (data: Data) => void;
|
|
4
3
|
export declare class EventEmitter<Events extends object> {
|
|
5
4
|
private store;
|
|
@@ -11,8 +10,6 @@ export declare class EventEmitter<Events extends object> {
|
|
|
11
10
|
clear(): void;
|
|
12
11
|
private listenersOf;
|
|
13
12
|
}
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/datepicker/DatepickerUI.d.ts
|
|
16
13
|
export default class DatepickerUI {
|
|
17
14
|
private readonly core;
|
|
18
15
|
private readonly emitter;
|
|
@@ -27,6 +24,12 @@ export default class DatepickerUI {
|
|
|
27
24
|
getValue(): PickerValue | null;
|
|
28
25
|
setValue(value: PickerValueInput | null): void;
|
|
29
26
|
setActiveEnd(end: RangeEnd): void;
|
|
27
|
+
setView(view: PickerView): void;
|
|
28
|
+
getView(): PickerView;
|
|
29
|
+
getVisibleRange(): VisibleRange | null;
|
|
30
|
+
goTo(date: Date | string): void;
|
|
31
|
+
isSelectable(value: PickerValueInput): boolean;
|
|
32
|
+
clear(): void;
|
|
30
33
|
setOptions(options: DatepickerOptions): void;
|
|
31
34
|
getElement(): HTMLElement;
|
|
32
35
|
on<K extends keyof DatepickerEventMap>(event: K, handler: Handler<DatepickerEventMap[K]>): () => void;
|
|
@@ -40,14 +43,10 @@ export default class DatepickerUI {
|
|
|
40
43
|
static getAllInstances(): DatepickerUI[];
|
|
41
44
|
static destroyAll(): void;
|
|
42
45
|
}
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region src/datepicker/options/types.d.ts
|
|
45
46
|
interface ResolvedPreset {
|
|
46
47
|
readonly label: string;
|
|
47
48
|
readonly value: () => unknown;
|
|
48
49
|
}
|
|
49
|
-
//#endregion
|
|
50
|
-
//#region src/datepicker/options/defaults.d.ts
|
|
51
50
|
interface DefaultOptions {
|
|
52
51
|
readonly calendar: {
|
|
53
52
|
readonly weekStart: WeekStartOption;
|
|
@@ -57,10 +56,8 @@ interface DefaultOptions {
|
|
|
57
56
|
readonly pageBy: PageBy;
|
|
58
57
|
readonly presets: readonly ResolvedPreset[];
|
|
59
58
|
};
|
|
60
|
-
readonly ui: Required<Pick<UIOptions, "displayMode" | "format" | "theme" | "colorScheme" | "weekNumbers" | "outsideDays" | "fixedWeeks" | "todayButton" | "clearButton" | "animation" | "allowPageScroll" | "fullscreen" | "cssClass" | "swipe" | "viewSwitch" | "initialView" | "mask" | "startView">> & {
|
|
61
|
-
readonly inline:
|
|
62
|
-
readonly enabled: boolean;
|
|
63
|
-
};
|
|
59
|
+
readonly ui: Required<Pick<UIOptions, "displayMode" | "layout" | "format" | "theme" | "colorScheme" | "weekNumbers" | "outsideDays" | "fixedWeeks" | "todayButton" | "clearButton" | "animation" | "allowPageScroll" | "fullscreen" | "cssClass" | "swipe" | "viewSwitch" | "initialView" | "mask" | "startView">> & {
|
|
60
|
+
readonly inline: Required<Omit<NonNullable<UIOptions["inline"]>, "container">>;
|
|
64
61
|
readonly yearRange: {
|
|
65
62
|
readonly before: number;
|
|
66
63
|
readonly after: number;
|
|
@@ -70,5 +67,4 @@ interface DefaultOptions {
|
|
|
70
67
|
readonly behavior: Required<Omit<BehaviorOptions, "id">>;
|
|
71
68
|
}
|
|
72
69
|
export declare const DEFAULT_DATEPICKER_OPTIONS: DefaultOptions;
|
|
73
|
-
|
|
74
|
-
export { type BehaviorOptions, type CalendarMode, type CalendarOptions, type CallbacksOptions, type CancelEventData, type CloseEventData, type ConfirmEventData, type DateDecoration, type DateValue, type DatepickerEventMap, type DatepickerOptions, DatepickerUI, type ErrorEventData, type LabelsOptions, type NavigateEventData, type OpenEventData, type PageBy, type PickerValue, type PickerValueInput, type PlainDate, type PluralLabel, type Precision, type RangeEnd, type RangeEndEventData, type RangePreset, type RangePresetValue, type RangeStartEventData, type RangeValue, type SelectDayEventData, type SelectMonthEventData, type SelectYearEventData, type ThemeName, type UIOptions, type UnavailableReason, type UpdateEventData };
|
|
70
|
+
export { type BehaviorOptions, type CalendarMode, type CalendarOptions, type CallbacksOptions, type CancelEventData, type CancelReason, type ClearEventData, type CloseEventData, type ConfirmEventData, type DateDecoration, type DateValue, type DatepickerEventMap, type DatepickerOptions, DatepickerUI, type ErrorEventData, type LabelsOptions, type NavigateEventData, type NavigateSource, type OpenEventData, type PageBy, type PickerValue, type PickerValueInput, type PickerView, type PlainDate, type PluralLabel, type Precision, type RangeEnd, type RangeEndEventData, type RangePreset, type RangePresetValue, type RangeStartEventData, type RangeValue, type SelectDayEventData, type SelectMonthEventData, type SelectYearEventData, type SwitchViewEventData, type ThemeName, type UIOptions, type UnavailableReason, type UpdateEventData, type VisibleRange };
|