@iyulab/components 1.53.0 → 1.55.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 +74 -0
- package/README.md +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.152.0}/helpers/esm/decorate.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.152.0}/helpers/esm/decorateMetadata.js +1 -1
- package/dist/assets/locales/ar.json.js +23 -1
- package/dist/assets/locales/de.json.js +23 -1
- package/dist/assets/locales/en.json.js +23 -1
- package/dist/assets/locales/es.json.js +23 -1
- package/dist/assets/locales/fr.json.js +23 -1
- package/dist/assets/locales/id.json.js +23 -1
- package/dist/assets/locales/ja.json.js +23 -1
- package/dist/assets/locales/ko.json.js +23 -1
- package/dist/assets/locales/pt-BR.json.js +23 -1
- package/dist/assets/locales/ru.json.js +23 -1
- package/dist/assets/locales/th.json.js +23 -1
- package/dist/assets/locales/vi.json.js +23 -1
- package/dist/assets/locales/zh-CN.json.js +23 -1
- package/dist/assets/locales/zh-TW.json.js +23 -1
- package/dist/components/UFloatingElement.js +2 -2
- package/dist/components/UFormControlElement.js +2 -2
- package/dist/components/UOverlayElement.js +2 -2
- package/dist/components/alert/UAlert.js +2 -2
- package/dist/components/avatar/UAvatar.js +2 -2
- package/dist/components/badge/UBadge.js +2 -2
- package/dist/components/breadcrumb/UBreadcrumb.js +1 -1
- package/dist/components/breadcrumb-item/UBreadcrumbItem.js +2 -2
- package/dist/components/button/UButton.js +2 -2
- package/dist/components/button-group/UButtonGroup.js +2 -2
- package/dist/components/calendar/UCalendar.d.ts +101 -0
- package/dist/components/calendar/UCalendar.js +223 -0
- package/dist/components/calendar/UCalendar.styles.d.ts +1 -0
- package/dist/components/calendar/UCalendar.styles.js +137 -0
- package/dist/components/calendar/dates.d.ts +13 -0
- package/dist/components/calendar/dates.js +37 -0
- package/dist/components/calendar/picker.styles.d.ts +5 -0
- package/dist/components/calendar/picker.styles.js +78 -0
- package/dist/components/card/UCard.js +2 -2
- package/dist/components/carousel/UCarousel.js +2 -2
- package/dist/components/checkbox/UCheckbox.js +2 -2
- package/dist/components/chip/UChip.js +2 -2
- package/dist/components/copy-button/UCopyButton.js +2 -2
- package/dist/components/date-picker/UDatePicker.d.ts +43 -15
- package/dist/components/date-picker/UDatePicker.js +142 -175
- package/dist/components/date-picker/UDatePicker.styles.js +13 -129
- package/dist/components/date-range-picker/UDateRangePicker.d.ts +113 -0
- package/dist/components/date-range-picker/UDateRangePicker.js +276 -0
- package/dist/components/date-range-picker/UDateRangePicker.styles.d.ts +1 -0
- package/dist/components/date-range-picker/UDateRangePicker.styles.js +83 -0
- package/dist/components/date-range-picker/presets.d.ts +32 -0
- package/dist/components/date-range-picker/presets.js +78 -0
- package/dist/components/dialog/UDialog.js +2 -2
- package/dist/components/divider/UDivider.js +2 -2
- package/dist/components/drawer/UDrawer.js +2 -2
- package/dist/components/expander/UExpander.js +2 -2
- package/dist/components/field/UField.js +2 -2
- package/dist/components/file-input/UFileInput.js +2 -2
- package/dist/components/form/UForm.js +2 -2
- package/dist/components/icon/UIcon.js +2 -2
- package/dist/components/icon-button/UIconButton.js +2 -2
- package/dist/components/input/UInput.d.ts +31 -3
- package/dist/components/input/UInput.js +131 -24
- package/dist/components/menu/UMenu.js +2 -2
- package/dist/components/menu-item/UMenuItem.js +2 -2
- package/dist/components/option/UOption.js +2 -2
- package/dist/components/panel/UPanel.js +2 -2
- package/dist/components/popover/UPopover.js +2 -2
- package/dist/components/progress-bar/UProgressBar.js +2 -2
- package/dist/components/progress-ring/UProgressRing.js +2 -2
- package/dist/components/radio/URadio.js +2 -2
- package/dist/components/rating/URating.js +2 -2
- package/dist/components/select/USelect.js +2 -2
- package/dist/components/skeleton/USkeleton.js +2 -2
- package/dist/components/slider/USlider.js +2 -2
- package/dist/components/spinner/USpinner.js +2 -2
- package/dist/components/split-panel/USplitPanel.js +2 -2
- package/dist/components/switch/USwitch.js +2 -2
- package/dist/components/tab/UTab.js +2 -2
- package/dist/components/tab-panel/UTabPanel.js +2 -2
- package/dist/components/tag/UTag.js +2 -2
- package/dist/components/text/UText.js +2 -2
- package/dist/components/textarea/UTextarea.js +2 -2
- package/dist/components/tooltip/UTooltip.js +2 -2
- package/dist/components/tree/UTree.js +2 -2
- package/dist/components/tree-item/UTreeItem.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -2
- package/dist/plugins/vite-plugin-react-wrapper.d.ts +7 -0
- package/dist/plugins/vite-plugin-react-wrapper.js +11 -1
- package/dist/react/UDateRangePicker.d.ts +13 -0
- package/dist/react/UDateRangePicker.js +12 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/dist/utilities/Locale.d.ts +1 -1
- package/dist/utilities/format.d.ts +53 -0
- package/dist/utilities/format.js +159 -1
- package/package.json +1 -1
- package/skills/iyulab-components/SKILL.md +1 -0
- package/skills/iyulab-components/references/components/date-picker.md +16 -2
- package/skills/iyulab-components/references/components/date-range-picker.md +147 -0
- package/skills/iyulab-components/references/components/input.md +14 -4
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** ISO `YYYY-MM-DD` → 로컬 자정 `Date`. */
|
|
2
|
+
export declare function parseISODate(iso: string): Date;
|
|
3
|
+
/** 로컬 `Date` → ISO `YYYY-MM-DD`. */
|
|
4
|
+
export declare function toISODate(date: Date): string;
|
|
5
|
+
export declare function isSameDay(a: Date, b: Date): boolean;
|
|
6
|
+
export declare function startOfMonth(date: Date): Date;
|
|
7
|
+
export declare function addMonths(date: Date, delta: number): Date;
|
|
8
|
+
export declare function addDays(date: Date, delta: number): Date;
|
|
9
|
+
export declare function daysInMonth(date: Date): number;
|
|
10
|
+
/** 두 날의 달 차이(`b` 가 `a` 보다 몇 달 뒤인가). 일자는 무시한다. */
|
|
11
|
+
export declare function monthDiff(a: Date, b: Date): number;
|
|
12
|
+
/** `min`/`max`(ISO 날짜, 둘 다 선택)를 벗어나는가 — 경계일은 포함이다. */
|
|
13
|
+
export declare function isOutOfRange(date: Date, min?: string, max?: string): boolean;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/components/calendar/dates.ts
|
|
2
|
+
/** ISO `YYYY-MM-DD` → 로컬 자정 `Date`. */
|
|
3
|
+
function parseISODate(iso) {
|
|
4
|
+
const [y, m, d] = iso.split("-").map(Number);
|
|
5
|
+
return new Date(y, m - 1, d);
|
|
6
|
+
}
|
|
7
|
+
/** 로컬 `Date` → ISO `YYYY-MM-DD`. */
|
|
8
|
+
function toISODate(date) {
|
|
9
|
+
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
|
|
10
|
+
}
|
|
11
|
+
function isSameDay(a, b) {
|
|
12
|
+
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
13
|
+
}
|
|
14
|
+
function startOfMonth(date) {
|
|
15
|
+
return new Date(date.getFullYear(), date.getMonth(), 1);
|
|
16
|
+
}
|
|
17
|
+
function addMonths(date, delta) {
|
|
18
|
+
return new Date(date.getFullYear(), date.getMonth() + delta, 1);
|
|
19
|
+
}
|
|
20
|
+
function addDays(date, delta) {
|
|
21
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate() + delta);
|
|
22
|
+
}
|
|
23
|
+
function daysInMonth(date) {
|
|
24
|
+
return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
|
|
25
|
+
}
|
|
26
|
+
/** 두 날의 달 차이(`b` 가 `a` 보다 몇 달 뒤인가). 일자는 무시한다. */
|
|
27
|
+
function monthDiff(a, b) {
|
|
28
|
+
return (b.getFullYear() - a.getFullYear()) * 12 + (b.getMonth() - a.getMonth());
|
|
29
|
+
}
|
|
30
|
+
/** `min`/`max`(ISO 날짜, 둘 다 선택)를 벗어나는가 — 경계일은 포함이다. */
|
|
31
|
+
function isOutOfRange(date, min, max) {
|
|
32
|
+
if (min && date.getTime() < parseISODate(min).getTime()) return true;
|
|
33
|
+
if (max && date.getTime() > parseISODate(max).getTime()) return true;
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { addDays, addMonths, daysInMonth, isOutOfRange, isSameDay, monthDiff, parseISODate, startOfMonth, toISODate };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
//#region src/components/calendar/picker.styles.ts
|
|
3
|
+
/**
|
|
4
|
+
* 날짜 피커들(`u-date-picker` · `u-date-range-picker`)이 함께 쓰는 트리거·팝오버·하단 줄 규칙.
|
|
5
|
+
* 호스트의 `display`/`width` 와 팝오버 폭은 피커마다 다르므로 각 피커의 시트가 갖는다.
|
|
6
|
+
*/
|
|
7
|
+
var styles = css`
|
|
8
|
+
.container {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: 0.4em;
|
|
13
|
+
padding: 0.3em 0.6em;
|
|
14
|
+
border: 1px solid var(--u-input-border-color, #E0E0E0);
|
|
15
|
+
border-radius: 0.25em;
|
|
16
|
+
background-color: var(--u-input-bg-color, #FFFFFF);
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
transition: border-color var(--u-duration-normal, 220ms) var(--u-ease-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
19
|
+
box-shadow var(--u-duration-normal, 220ms) var(--u-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
20
|
+
}
|
|
21
|
+
:host([readonly]) .container,
|
|
22
|
+
:host(:disabled) .container {
|
|
23
|
+
cursor: not-allowed;
|
|
24
|
+
border-color: var(--u-border-color-weak, #EEEEEE);
|
|
25
|
+
background-color: var(--u-bg-color-disabled, #FAFAFA);
|
|
26
|
+
}
|
|
27
|
+
:host(:not([readonly]):not(:disabled)) .container:hover {
|
|
28
|
+
box-shadow: 0 0 0 1px var(--u-input-border-color-hover, #BDBDBD);
|
|
29
|
+
}
|
|
30
|
+
:host(:not([readonly]):not(:disabled)) .container:focus-within {
|
|
31
|
+
box-shadow: 0 0 0 1px var(--u-input-border-color-focus, #1565C0);
|
|
32
|
+
}
|
|
33
|
+
:host([invalid]:not([readonly]):not(:disabled)) .container {
|
|
34
|
+
box-shadow: 0 0 0 1px var(--u-input-border-color-invalid, #C62828);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.text-content {
|
|
38
|
+
flex: 1 0 auto;
|
|
39
|
+
min-width: 0;
|
|
40
|
+
font-size: 1em;
|
|
41
|
+
line-height: 1.5;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
}
|
|
46
|
+
.text-content.placeholder {
|
|
47
|
+
color: var(--u-txt-color-weak, #616161);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.suffix-item {
|
|
51
|
+
color: var(--u-icon-color, #616161);
|
|
52
|
+
font-size: 1em;
|
|
53
|
+
transition: color var(--u-duration-normal, 220ms) var(--u-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
54
|
+
}
|
|
55
|
+
.suffix-item:hover {
|
|
56
|
+
color: var(--u-icon-color-hover, #1565C0);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
u-popover {
|
|
60
|
+
padding: 8px;
|
|
61
|
+
border: 1px solid var(--u-border-color, #E0E0E0);
|
|
62
|
+
border-radius: var(--u-radius-lg, 6px);
|
|
63
|
+
background-color: var(--u-panel-bg-color, #FFFFFF);
|
|
64
|
+
box-shadow: var(--u-shadow-lg, 0 4px 12px rgba(0, 0, 0, 0.16), 0 2px 4px rgba(0, 0, 0, 0.06));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.calendar-footer {
|
|
68
|
+
display: flex;
|
|
69
|
+
justify-content: space-between;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: 8px;
|
|
72
|
+
padding-top: 8px;
|
|
73
|
+
margin-top: 4px;
|
|
74
|
+
border-top: 1px solid var(--u-border-color-weak, #EEEEEE);
|
|
75
|
+
}
|
|
76
|
+
`;
|
|
77
|
+
//#endregion
|
|
78
|
+
export { styles };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.js";
|
|
4
4
|
import { styles } from "./UCard.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
6
6
|
import { customElement, property } from "lit/decorators.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../button/UButton.js";
|
|
5
5
|
import "../icon/UIcon.js";
|
|
6
6
|
import { Locale } from "../../utilities/Locale.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
4
4
|
import "../icon/UIcon.js";
|
|
5
5
|
import { Locale } from "../../utilities/Locale.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../button/UButton.js";
|
|
5
5
|
import "../icon/UIcon.js";
|
|
6
6
|
import { Locale } from "../../utilities/Locale.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../button/UButton.js";
|
|
5
5
|
import "../icon/UIcon.js";
|
|
6
6
|
import { Locale } from "../../utilities/Locale.js";
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { PropertyValues } from 'lit';
|
|
2
2
|
import { UFormControlElement } from '../UFormControlElement.js';
|
|
3
|
+
import { DateTextFormat } from '../../utilities/format.js';
|
|
4
|
+
import { UCalendar } from '../calendar/UCalendar.js';
|
|
3
5
|
import { UPopover } from '../popover/UPopover.js';
|
|
4
6
|
export type DatePickerMode = 'date' | 'datetime';
|
|
5
7
|
/**
|
|
6
8
|
* A single-date(-time)-selection form control. In `mode="date"` (default) the value follows
|
|
7
|
-
* the same convention as the native `input[type=date]`: an ISO `YYYY-MM-DD` string
|
|
9
|
+
* the same convention as the native `input[type=date]`: an ISO `YYYY-MM-DD` string, and the
|
|
10
|
+
* field is a text box — type `2026-10-02`, `20261002` or `10-02` (this year) and press Enter or
|
|
11
|
+
* leave the field; the calendar is a helper. The text shows as `YYYY-MM-DD` whatever the browser
|
|
12
|
+
* language, or in the locale's numeric order with `format="locale"`. Clicking the field opens the
|
|
13
|
+
* calendar and keeps typing in the field; ArrowDown (or Alt+ArrowDown) moves into the calendar.
|
|
14
|
+
* Text that is not a date clears the value and reports `badInput`, like the native input. In
|
|
8
15
|
* `mode="datetime"` the value is a complete ISO-8601 `DateTimeOffset` string
|
|
9
16
|
* (`YYYY-MM-DDTHH:mm:ss±HH:mm`) — the component always fills in seconds and the browser's
|
|
10
17
|
* local UTC offset, so the value is unconditionally valid regardless of how coarse the time
|
|
@@ -22,6 +29,7 @@ export type DatePickerMode = 'date' | 'datetime';
|
|
|
22
29
|
* as a CSS hook for consumers who want to react to the open/closed state from outside.
|
|
23
30
|
*
|
|
24
31
|
* @csspart field - the u-field element
|
|
32
|
+
* @csspart input - the text box (`mode="date"` only)
|
|
25
33
|
* @csspart container - the element wrapping the trigger area
|
|
26
34
|
* @csspart popover - the popover element showing the calendar
|
|
27
35
|
* @csspart calendar - the calendar container
|
|
@@ -58,27 +66,34 @@ export declare class UDatePicker extends UFormControlElement<string> {
|
|
|
58
66
|
max?: string;
|
|
59
67
|
/** Whether to show the clear button */
|
|
60
68
|
clearable: boolean;
|
|
61
|
-
/** Placeholder text (shown on the trigger when there is no value)
|
|
69
|
+
/** Placeholder text (shown on the trigger when there is no value). In `mode="date"` it defaults
|
|
70
|
+
* to the pattern to type (`YYYY-MM-DD`). */
|
|
62
71
|
placeholder?: string;
|
|
72
|
+
/** How the `mode="date"` text box writes and reads a date: `iso` (default, `YYYY-MM-DD` in every
|
|
73
|
+
* language) or `locale` (the active locale's numeric order, e.g. `10/02/2026` in `en-US`). ISO
|
|
74
|
+
* and `20261002` are read in both. The value is ISO either way. */
|
|
75
|
+
format: DateTextFormat;
|
|
63
76
|
containerEl?: HTMLElement;
|
|
64
77
|
popoverEl?: UPopover;
|
|
78
|
+
calendarEl?: UCalendar;
|
|
65
79
|
/** Unique id wiring the combobox's `aria-controls` to the calendar dialog — mirrors USelect's `listboxId`. */
|
|
66
80
|
private readonly calendarId;
|
|
67
81
|
private open;
|
|
68
|
-
private viewDate;
|
|
69
|
-
private focusedDate;
|
|
70
82
|
/** Time-of-day for the next selection while no `value` exists yet (`mode="datetime"` only) —
|
|
71
83
|
* once `value` is set, the time input reads/writes its time portion directly instead. */
|
|
72
84
|
private pendingTime;
|
|
73
|
-
|
|
85
|
+
/** What the person is typing in the `mode="date"` text box, until it is committed; `null` shows the value. */
|
|
86
|
+
private draft;
|
|
87
|
+
/** The committed text was not a date — the value is empty and validity reports `badInput`. */
|
|
88
|
+
private badText;
|
|
89
|
+
/** Set when the calendar opens by keyboard (or its button): focus then moves into the grid. A click
|
|
90
|
+
* in the text box opens it too, but leaves the caret where the person is typing. */
|
|
91
|
+
private focusCalendarOnOpen;
|
|
74
92
|
protected updated(changed: PropertyValues): void;
|
|
75
93
|
render(): import('lit-html').TemplateResult<1>;
|
|
76
94
|
private renderCalendar;
|
|
77
95
|
private renderTimeRow;
|
|
78
96
|
private renderFooter;
|
|
79
|
-
private renderDay;
|
|
80
|
-
private isOutOfRange;
|
|
81
|
-
private focusDayButton;
|
|
82
97
|
/** `timeOverride` lets a caller force the time-of-day (the "today" quick action wants
|
|
83
98
|
* "right now", overriding whatever time was previously set) — a plain day-cell click omits
|
|
84
99
|
* it, which preserves the existing time-of-day (or `pendingTime`) so switching the date
|
|
@@ -89,16 +104,29 @@ export declare class UDatePicker extends UFormControlElement<string> {
|
|
|
89
104
|
* `pendingTime` for whenever a day gets picked. Doesn't close the popover or refocus the
|
|
90
105
|
* trigger — unlike selecting a day, adjusting the time doesn't conclude the interaction. */
|
|
91
106
|
private handleTimeChange;
|
|
92
|
-
private
|
|
93
|
-
private
|
|
94
|
-
private
|
|
95
|
-
private
|
|
96
|
-
|
|
107
|
+
private handleDaySelect;
|
|
108
|
+
private get textInputEl();
|
|
109
|
+
private openCalendar;
|
|
110
|
+
private handleTextInput;
|
|
111
|
+
/** A click anywhere on the field (not on its clear or calendar button) opens the calendar and
|
|
112
|
+
* puts the caret in the text box — the person can pick a day or keep typing. */
|
|
113
|
+
private handleContainerClick;
|
|
114
|
+
private handleCalendarButtonClick;
|
|
115
|
+
/** ArrowDown / Alt+ArrowDown opens the calendar and moves into it (the combobox convention);
|
|
116
|
+
* Enter commits what was typed. Escape is the popover layer's — it closes the calendar. */
|
|
117
|
+
private handleTextKeydown;
|
|
118
|
+
/** Turns the typed text into the value. Empty text clears it; text that is not a date also clears
|
|
119
|
+
* it and reports `badInput` (the native date input does the same); a date outside `min`/`max` is
|
|
120
|
+
* kept and reported as out of range — the person typed it, so it is not silently dropped. */
|
|
121
|
+
private commitText;
|
|
122
|
+
/** Escape inside the grid closes the calendar and returns focus to the trigger — the grid
|
|
123
|
+
* itself does not know it lives in a popover, so the picker owns this. */
|
|
124
|
+
private handleCalendarKeydown;
|
|
97
125
|
private handlePopoverShow;
|
|
98
126
|
private handlePopoverHide;
|
|
99
127
|
private handleClearClick;
|
|
100
|
-
/** "오늘" 퀵액션 — `today`
|
|
101
|
-
* `
|
|
128
|
+
/** "오늘" 퀵액션 — 달력이 이미 `data-today` 로 표시 중인 날을 실제로 선택하는 것뿐이라
|
|
129
|
+
* `selectDay`를 그대로 탄다
|
|
102
130
|
* (범위 밖이면 `selectDay`가 조용히 no-op — 클릭 불가 상태인 day 셀과 동일 규약).
|
|
103
131
|
* datetime 모드에서는 "지금"을 통째로 채우는 것이 소비자 요청의 본질
|
|
104
132
|
* 이라 시간까지 `now`로 덮어쓴다 — 평범한 day 셀 클릭과 달리 기존 시각을 보존하지 않는다. */
|