@iyulab/components 1.33.1 → 1.34.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 +66 -0
- package/dist/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/decorate.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/decorateMetadata.js +1 -1
- package/dist/assets/locales/ar.json.js +12 -2
- package/dist/assets/locales/de.json.js +12 -2
- package/dist/assets/locales/en.json.js +12 -2
- package/dist/assets/locales/es.json.js +11 -2
- package/dist/assets/locales/fr.json.js +12 -2
- package/dist/assets/locales/id.json.js +12 -2
- package/dist/assets/locales/ja.json.js +12 -2
- package/dist/assets/locales/ko.json.js +12 -2
- package/dist/assets/locales/pt-BR.json.js +12 -2
- package/dist/assets/locales/ru.json.js +12 -2
- package/dist/assets/locales/th.json.js +12 -2
- package/dist/assets/locales/vi.json.js +12 -2
- package/dist/assets/locales/zh-CN.json.js +12 -2
- package/dist/assets/locales/zh-TW.json.js +12 -2
- package/dist/components/UFloatingElement.d.ts +4 -0
- 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/card/UCard.js +2 -2
- package/dist/components/carousel/UCarousel.js +7 -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 -6
- package/dist/components/date-picker/UDatePicker.js +102 -12
- package/dist/components/date-picker/UDatePicker.styles.js +29 -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/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.js +2 -2
- 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 +14 -5
- 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.js +3 -3
- package/dist/utilities/Locale.d.ts +1 -1
- package/dist/utilities/Locale.js +1 -1
- package/dist/utilities/elements.d.ts +6 -0
- package/dist/utilities/elements.js +9 -1
- package/package.json +1 -1
- package/skills/iyulab-components/references/components/date-picker.md +21 -5
|
@@ -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.147.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import { styles } from "./USkeleton.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
6
6
|
import { customElement, property } from "lit/decorators.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.147.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
4
4
|
import "../tooltip/UTooltip.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.147.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import { styles } from "./USpinner.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
6
6
|
import { customElement, property, state } 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.147.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import { arrayAttrConverter } from "../../utilities/converters.js";
|
|
5
5
|
import { styles } from "./USplitPanel.styles.js";
|
|
6
6
|
import { html } from "lit";
|
|
@@ -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.147.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
4
4
|
import { Locale } from "../../utilities/Locale.js";
|
|
5
5
|
import { styles } from "./USwitch.styles.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.147.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../button/UButton.js";
|
|
5
5
|
import "../icon/UIcon.js";
|
|
6
6
|
import { styles } from "./UTab.styles.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.147.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UPanel } from "../panel/UPanel.js";
|
|
5
5
|
import { UTab } from "../tab/UTab.js";
|
|
6
6
|
import { styles } from "./UTabPanel.styles.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.147.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../icon/UIcon.js";
|
|
5
5
|
import { statusIcon } from "../../utilities/statusIcon.js";
|
|
6
6
|
import { styles } from "./UTag.styles.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.147.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import { styles } from "./UText.styles.js";
|
|
5
5
|
import { customElement, property } from "lit/decorators.js";
|
|
6
6
|
import { html, literal } from "lit/static-html.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.147.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
4
4
|
import { Locale } from "../../utilities/Locale.js";
|
|
5
5
|
import "../field/UField.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.147.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFloatingElement } from "../UFloatingElement.js";
|
|
4
4
|
import { styles } from "./UTooltip.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
@@ -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.147.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UTreeItem } from "../tree-item/UTreeItem.js";
|
|
5
5
|
import { styles } from "./UTree.styles.js";
|
|
6
6
|
import { html } from "lit";
|
|
@@ -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.147.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../spinner/USpinner.js";
|
|
5
5
|
import "../icon/UIcon.js";
|
|
6
6
|
import { styles } from "./UTreeItem.styles.js";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UElement } from "./components/UElement.js";
|
|
2
|
-
import { getParentElement, querySelectorAllWithin, querySelectorWithin } from "./utilities/elements.js";
|
|
2
|
+
import { getParentElement, isCoarsePointer, querySelectorAllWithin, querySelectorWithin } from "./utilities/elements.js";
|
|
3
3
|
import { UFloatingElement } from "./components/UFloatingElement.js";
|
|
4
4
|
import { UFormControlElement } from "./components/UFormControlElement.js";
|
|
5
5
|
import { OverlayManager } from "./utilities/OverlayManager.js";
|
|
@@ -18,8 +18,8 @@ import { UTooltip } from "./components/tooltip/UTooltip.js";
|
|
|
18
18
|
import { UIconButton } from "./components/icon-button/UIconButton.js";
|
|
19
19
|
import { UButtonGroup } from "./components/button-group/UButtonGroup.js";
|
|
20
20
|
import { UCard } from "./components/card/UCard.js";
|
|
21
|
-
import { UCarousel } from "./components/carousel/UCarousel.js";
|
|
22
21
|
import { Locale } from "./utilities/Locale.js";
|
|
22
|
+
import { UCarousel } from "./components/carousel/UCarousel.js";
|
|
23
23
|
import { UCheckbox } from "./components/checkbox/UCheckbox.js";
|
|
24
24
|
import { UTag } from "./components/tag/UTag.js";
|
|
25
25
|
import { UChip } from "./components/chip/UChip.js";
|
|
@@ -57,4 +57,4 @@ import { BrowserStorage } from "./utilities/BrowserStorage.js";
|
|
|
57
57
|
import { Dialog } from "./utilities/Dialog.js";
|
|
58
58
|
import { Theme } from "./utilities/Theme.js";
|
|
59
59
|
import { Toast } from "./utilities/Toast.js";
|
|
60
|
-
export { BrowserStorage, Dialog, IconCache, IconRegistry, Locale, OverlayManager, Theme, Toast, UAlert, UAvatar, UBadge, UBreadcrumb, UBreadcrumbItem, UButton, UButtonGroup, UCard, UCarousel, UCheckbox, UChip, UCopyButton, UDatePicker, UDialog, UDivider, UDrawer, UElement, UExpander, UField, UFloatingElement, UForm, UFormControlElement, UIcon, UIconButton, UInput, UMenu, UMenuItem, UOption, UOverlayElement, UPanel, UPopover, UProgressBar, UProgressRing, URadio, URating, USelect, USkeleton, USlider, USpinner, USplitPanel, USwitch, UTab, UTabPanel, UTag, UText, UTextarea, UTooltip, UTree, UTreeItem, arrayAttrConverter, booleanAttrConverter, dateAttrConverter, formatCurrency, formatDate, formatNumber, getDefaultBaseUrl, getParentElement, jsonAttrConverter, querySelectorAllWithin, querySelectorWithin, setDefaultBaseUrl, urlAttrConverter };
|
|
60
|
+
export { BrowserStorage, Dialog, IconCache, IconRegistry, Locale, OverlayManager, Theme, Toast, UAlert, UAvatar, UBadge, UBreadcrumb, UBreadcrumbItem, UButton, UButtonGroup, UCard, UCarousel, UCheckbox, UChip, UCopyButton, UDatePicker, UDialog, UDivider, UDrawer, UElement, UExpander, UField, UFloatingElement, UForm, UFormControlElement, UIcon, UIconButton, UInput, UMenu, UMenuItem, UOption, UOverlayElement, UPanel, UPopover, UProgressBar, UProgressRing, URadio, URating, USelect, USkeleton, USlider, USpinner, USplitPanel, USwitch, UTab, UTabPanel, UTag, UText, UTextarea, UTooltip, UTree, UTreeItem, arrayAttrConverter, booleanAttrConverter, dateAttrConverter, formatCurrency, formatDate, formatNumber, getDefaultBaseUrl, getParentElement, isCoarsePointer, jsonAttrConverter, querySelectorAllWithin, querySelectorWithin, setDefaultBaseUrl, urlAttrConverter };
|
|
@@ -12,7 +12,7 @@ export type SupportedLocale = 'en' | 'ko' | 'ja' | 'zh-CN' | 'zh-TW' | 'es' | 'f
|
|
|
12
12
|
/** 내장 로케일은 자동완성되지만, 임의의 BCP47 태그도 그대로 받는다. */
|
|
13
13
|
export type LocaleTag = SupportedLocale | (string & {});
|
|
14
14
|
/** 라이브러리가 제공하는 chrome 문자열 키. 지금은 검증 메시지뿐이지만 이후 다른 UI 문구도 추가될 수 있다. */
|
|
15
|
-
export type LocaleMessageKey = 'valueMissing' | 'badInput' | 'typeMismatch' | 'patternMismatch' | 'rangeUnderflow' | 'rangeOverflow' | 'stepMismatch' | 'tooShort' | 'tooLong' | 'increment' | 'decrement' | 'clear' | 'showPassword' | 'hidePassword';
|
|
15
|
+
export type LocaleMessageKey = 'valueMissing' | 'badInput' | 'typeMismatch' | 'patternMismatch' | 'rangeUnderflow' | 'rangeOverflow' | 'stepMismatch' | 'tooShort' | 'tooLong' | 'increment' | 'decrement' | 'clear' | 'today' | 'time' | 'showPassword' | 'hidePassword' | 'previousSlide' | 'nextSlide' | 'goToSlide';
|
|
16
16
|
type LocaleTable = Record<LocaleMessageKey, string>;
|
|
17
17
|
/**
|
|
18
18
|
* 한 패키지(또는 앱 영역)의 문자열 묶음.
|
package/dist/utilities/Locale.js
CHANGED
|
@@ -34,7 +34,7 @@ var builtins = new Map(Object.entries(/* #__PURE__ */ Object.assign({
|
|
|
34
34
|
var overrides = /* @__PURE__ */ new Map();
|
|
35
35
|
/** 브라우저 환경이면 `navigator.language`/`document.lang`으로 초기 로케일을 추측한다. */
|
|
36
36
|
function detectLocale() {
|
|
37
|
-
if (typeof navigator !== "undefined" && navigator.language) return navigator.language;
|
|
37
|
+
if (typeof window !== "undefined" && typeof navigator !== "undefined" && navigator.language) return navigator.language;
|
|
38
38
|
if (typeof document !== "undefined" && document.documentElement?.lang) return document.documentElement.lang;
|
|
39
39
|
return "en";
|
|
40
40
|
}
|
|
@@ -15,3 +15,9 @@ export declare function querySelectorWithin(element: Element, selectors: string)
|
|
|
15
15
|
* - 탐색은 element가 존재하는 shadow DOM 또는 document 루트 범위에서 이루어집니다.
|
|
16
16
|
*/
|
|
17
17
|
export declare function querySelectorAllWithin(element: Element, selectors: string): HTMLElement[];
|
|
18
|
+
/**
|
|
19
|
+
* 터치/펜처럼 지속되는 hover 상태가 없는 포인터인지 여부입니다.
|
|
20
|
+
* - 이런 포인터는 탭 시 `pointerenter` 직후 `pointerleave`가 뒤따르므로, hover 트리거
|
|
21
|
+
* 컴포넌트가 이를 구분하지 않으면 열리자마자 닫히는 결함으로 이어집니다(docket #104).
|
|
22
|
+
*/
|
|
23
|
+
export declare function isCoarsePointer(event: PointerEvent): boolean;
|
|
@@ -34,5 +34,13 @@ function querySelectorAllWithin(element, selectors) {
|
|
|
34
34
|
return Array.from(nodeList);
|
|
35
35
|
} else return [];
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* 터치/펜처럼 지속되는 hover 상태가 없는 포인터인지 여부입니다.
|
|
39
|
+
* - 이런 포인터는 탭 시 `pointerenter` 직후 `pointerleave`가 뒤따르므로, hover 트리거
|
|
40
|
+
* 컴포넌트가 이를 구분하지 않으면 열리자마자 닫히는 결함으로 이어집니다(docket #104).
|
|
41
|
+
*/
|
|
42
|
+
function isCoarsePointer(event) {
|
|
43
|
+
return event.pointerType === "touch" || event.pointerType === "pen";
|
|
44
|
+
}
|
|
37
45
|
//#endregion
|
|
38
|
-
export { getParentElement, querySelectorAllWithin, querySelectorWithin };
|
|
46
|
+
export { getParentElement, isCoarsePointer, querySelectorAllWithin, querySelectorWithin };
|
package/package.json
CHANGED
|
@@ -6,15 +6,28 @@ import '@iyulab/components/dist/components/date-picker/UDatePicker.js';
|
|
|
6
6
|
|
|
7
7
|
**Tag:** `u-date-picker`
|
|
8
8
|
|
|
9
|
-
Single-date selection with a popover calendar.
|
|
9
|
+
Single-date(-time) selection with a popover calendar. `mode="date"` (default) follows the same
|
|
10
|
+
convention as the native `input[type=date]`: an ISO `YYYY-MM-DD` string. `mode="datetime"` adds
|
|
11
|
+
a time-of-day input and the value becomes a complete ISO-8601 `DateTimeOffset` string
|
|
12
|
+
(`YYYY-MM-DDTHH:mm:ss±HH:mm`, seconds and the browser's local UTC offset always filled in — the
|
|
13
|
+
value is unconditionally valid regardless of how coarse the time input was). Form-associated.
|
|
10
14
|
|
|
11
15
|
> The calendar week always starts on Sunday, regardless of locale.
|
|
12
16
|
|
|
17
|
+
The calendar popover has a footer with a "Today" quick-action button (selects today's date —
|
|
18
|
+
in `mode="datetime"` this also sets the time to right now — disabled when today falls outside
|
|
19
|
+
`min`/`max`) and, when `clearable` and a value is set, a "Clear" button next to it. Picking a
|
|
20
|
+
day preserves whatever time-of-day was already set; only the "Today" button overrides the time.
|
|
21
|
+
`min`/`max` are always date-only, even in `mode="datetime"` — time-of-day is never range-checked.
|
|
22
|
+
|
|
13
23
|
```html
|
|
14
24
|
<u-date-picker name="start-date" label="Start date"></u-date-picker>
|
|
15
25
|
|
|
16
26
|
<!-- Clearable with a bounded range -->
|
|
17
27
|
<u-date-picker name="due-date" label="Due date" clearable min="2026-01-01" max="2026-12-31"></u-date-picker>
|
|
28
|
+
|
|
29
|
+
<!-- Date + time, value is a full ISO-8601 DateTimeOffset string -->
|
|
30
|
+
<u-date-picker name="sent-at" label="Sent at" mode="datetime"></u-date-picker>
|
|
18
31
|
```
|
|
19
32
|
|
|
20
33
|
---
|
|
@@ -23,9 +36,10 @@ Single-date selection with a popover calendar. The value follows the same conven
|
|
|
23
36
|
|
|
24
37
|
| Property | Type | Default | Reflect | Description |
|
|
25
38
|
|----------|------|---------|---------|-------------|
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
39
|
+
| `mode` | `'date' \| 'datetime'` | `'date'` | ✓ | `datetime` adds a time input; value becomes a full ISO-8601 `DateTimeOffset` string |
|
|
40
|
+
| `value` | `string` | — | — | Selected date (ISO `YYYY-MM-DD`), or full ISO-8601 datetime in `mode="datetime"` |
|
|
41
|
+
| `min` | `string` | — | — | Minimum selectable date (ISO `YYYY-MM-DD`, date-only in both modes) |
|
|
42
|
+
| `max` | `string` | — | — | Maximum selectable date (ISO `YYYY-MM-DD`, date-only in both modes) |
|
|
29
43
|
| `clearable` | `boolean` | `false` | ✓ | Show clear button |
|
|
30
44
|
| `placeholder` | `string` | — | — | Placeholder text |
|
|
31
45
|
| `disabled` | `boolean` | `false` | ✓ | Disable |
|
|
@@ -41,7 +55,7 @@ Single-date selection with a popover calendar. The value follows the same conven
|
|
|
41
55
|
|
|
42
56
|
| Event | Description |
|
|
43
57
|
|-------|-------------|
|
|
44
|
-
| `change` | Fires when the user clicks a date cell, confirms via keyboard, or clicks the clear button. Programmatic value assignment does not fire it. |
|
|
58
|
+
| `change` | Fires when the user clicks a date cell, confirms via keyboard, changes the time input (`mode="datetime"`, once a date is set), or clicks the clear button. Programmatic value assignment does not fire it. |
|
|
45
59
|
|
|
46
60
|
## Methods
|
|
47
61
|
|
|
@@ -65,6 +79,8 @@ Single-date selection with a popover calendar. The value follows the same conven
|
|
|
65
79
|
| `calendar-weekdays` | The weekday header row |
|
|
66
80
|
| `calendar-grid` | The date grid |
|
|
67
81
|
| `day` | A date cell button |
|
|
82
|
+
| `calendar-footer` | The row holding the "Today"/"Clear" quick-action buttons |
|
|
83
|
+
| `calendar-time` | The row holding the time-of-day input (`mode="datetime"` only) |
|
|
68
84
|
|
|
69
85
|
## CSS Custom Properties
|
|
70
86
|
|