@iyulab/components 2.30.1 → 2.30.2
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 +20 -0
- package/dist/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/decorate.js +1 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/decorateMetadata.js +1 -2
- package/dist/_virtual/_glob-assets_raw/alert-circle-fill.svg.1e438750.js +1 -2
- package/dist/_virtual/_glob-assets_raw/alert-triangle-fill.svg.1a8797c4.js +1 -2
- package/dist/_virtual/_glob-assets_raw/bell-fill.svg.d37c41d9.js +1 -2
- package/dist/_virtual/_glob-assets_raw/calendar.svg.02c3abd8.js +1 -2
- package/dist/_virtual/_glob-assets_raw/check.svg.4690b01e.js +1 -2
- package/dist/_virtual/_glob-assets_raw/chevron-down.svg.0ccd06ea.js +1 -2
- package/dist/_virtual/_glob-assets_raw/chevron-left.svg.b4601050.js +1 -2
- package/dist/_virtual/_glob-assets_raw/chevron-right.svg.0711bb67.js +1 -2
- package/dist/_virtual/_glob-assets_raw/chevron-up.svg.ed917211.js +1 -2
- package/dist/_virtual/_glob-assets_raw/circle-check-fill.svg.3f0fcb72.js +1 -2
- package/dist/_virtual/_glob-assets_raw/copy.svg.6192f853.js +1 -2
- package/dist/_virtual/_glob-assets_raw/dark.css.e8ac080d.js +1 -2
- package/dist/_virtual/_glob-assets_raw/eye-off.svg.7aa25df0.js +1 -2
- package/dist/_virtual/_glob-assets_raw/eye.svg.2e5e9c4c.js +1 -2
- package/dist/_virtual/_glob-assets_raw/info-circle-fill.svg.6580071d.js +1 -2
- package/dist/_virtual/_glob-assets_raw/layout-sidebar.svg.3fe5a68f.js +1 -2
- package/dist/_virtual/_glob-assets_raw/light.css.637cb2f8.js +1 -2
- package/dist/_virtual/_glob-assets_raw/menu-2.svg.d6c83cc4.js +1 -2
- package/dist/_virtual/_glob-assets_raw/minus.svg.4610de75.js +1 -2
- package/dist/_virtual/_glob-assets_raw/player-pause-fill.svg.a756c400.js +1 -2
- package/dist/_virtual/_glob-assets_raw/player-play-fill.svg.768b6efc.js +1 -2
- package/dist/_virtual/_glob-assets_raw/plus.svg.d83ead68.js +1 -2
- package/dist/_virtual/_glob-assets_raw/search.svg.0ba2012d.js +1 -2
- package/dist/_virtual/_glob-assets_raw/star-fill.svg.f24b5a2d.js +1 -2
- package/dist/_virtual/_glob-assets_raw/star.svg.4af61468.js +1 -2
- package/dist/_virtual/_glob-assets_raw/x.svg.5596f6bb.js +1 -2
- package/dist/assets/locales/ar.json.js +1 -2
- package/dist/assets/locales/de.json.js +1 -2
- package/dist/assets/locales/en.json.js +1 -2
- package/dist/assets/locales/es.json.js +1 -2
- package/dist/assets/locales/fr.json.js +1 -2
- package/dist/assets/locales/id.json.js +1 -2
- package/dist/assets/locales/ja.json.js +1 -2
- package/dist/assets/locales/ko.json.js +1 -2
- package/dist/assets/locales/pt-BR.json.js +1 -2
- package/dist/assets/locales/ru.json.js +1 -2
- package/dist/assets/locales/th.json.js +1 -2
- package/dist/assets/locales/vi.json.js +1 -2
- package/dist/assets/locales/zh-CN.json.js +1 -2
- package/dist/assets/locales/zh-TW.json.js +1 -2
- package/dist/components/UElement.js +1 -2
- package/dist/components/UElement.styles.js +1 -2
- package/dist/components/UFloatingElement.js +3 -4
- package/dist/components/UFloatingElement.styles.js +1 -2
- package/dist/components/UFormControlElement.js +14 -5
- package/dist/components/UFormControlElement.styles.js +1 -2
- package/dist/components/UOverlayElement.js +3 -4
- package/dist/components/UOverlayElement.styles.js +1 -2
- package/dist/components/alert/UAlert.js +3 -4
- package/dist/components/alert/UAlert.styles.js +1 -2
- package/dist/components/avatar/UAvatar.js +3 -4
- package/dist/components/avatar/UAvatar.styles.js +1 -2
- package/dist/components/badge/UBadge.js +3 -4
- package/dist/components/badge/UBadge.styles.js +1 -2
- package/dist/components/breadcrumb/UBreadcrumb.js +2 -3
- package/dist/components/breadcrumb/UBreadcrumb.styles.js +1 -2
- package/dist/components/breadcrumb-item/UBreadcrumbItem.js +3 -4
- package/dist/components/breadcrumb-item/UBreadcrumbItem.styles.js +1 -2
- package/dist/components/button/UButton.js +3 -4
- package/dist/components/button/UButton.styles.js +1 -2
- package/dist/components/button/forwarded-aria.js +1 -2
- package/dist/components/button-group/UButtonGroup.js +3 -4
- package/dist/components/button-group/UButtonGroup.styles.js +1 -2
- package/dist/components/calendar/UCalendar.js +3 -4
- package/dist/components/calendar/UCalendar.styles.js +1 -2
- package/dist/components/calendar/date-text-controller.js +1 -2
- package/dist/components/calendar/dates.js +1 -2
- package/dist/components/calendar/datetime.js +1 -2
- package/dist/components/calendar/picker.styles.js +1 -2
- package/dist/components/card/UCard.js +3 -4
- package/dist/components/card/UCard.styles.js +1 -2
- package/dist/components/carousel/UCarousel.js +3 -4
- package/dist/components/carousel/UCarousel.styles.js +1 -2
- package/dist/components/checkbox/UCheckbox.js +3 -4
- package/dist/components/checkbox/UCheckbox.styles.js +1 -2
- package/dist/components/chip/UChip.js +3 -4
- package/dist/components/chip/UChip.styles.js +1 -2
- package/dist/components/copy-button/UCopyButton.js +3 -4
- package/dist/components/copy-button/UCopyButton.styles.js +1 -2
- package/dist/components/date-picker/UDatePicker.js +3 -4
- package/dist/components/date-picker/UDatePicker.styles.js +1 -2
- package/dist/components/date-range-picker/UDateRangePicker.js +3 -4
- package/dist/components/date-range-picker/UDateRangePicker.styles.js +1 -2
- package/dist/components/date-range-picker/presets.js +1 -2
- package/dist/components/dialog/UDialog.js +3 -4
- package/dist/components/dialog/UDialog.styles.js +1 -2
- package/dist/components/divider/UDivider.js +3 -4
- package/dist/components/divider/UDivider.styles.js +1 -2
- package/dist/components/drawer/UDrawer.js +3 -4
- package/dist/components/drawer/UDrawer.styles.js +1 -2
- package/dist/components/expander/UExpander.js +3 -4
- package/dist/components/expander/UExpander.styles.js +1 -2
- package/dist/components/field/UField.js +3 -4
- package/dist/components/field/UField.styles.js +1 -2
- package/dist/components/file-input/UFileInput.js +3 -4
- package/dist/components/file-input/UFileInput.styles.js +1 -2
- package/dist/components/form/UForm.js +3 -4
- package/dist/components/form/UForm.styles.js +1 -2
- package/dist/components/icon/UIcon.js +3 -4
- package/dist/components/icon/UIcon.styles.js +1 -2
- package/dist/components/icon-button/UIconButton.js +3 -4
- package/dist/components/icon-button/UIconButton.styles.js +1 -2
- package/dist/components/input/UInput.js +42 -8
- package/dist/components/input/UInput.styles.js +1 -2
- package/dist/components/menu/UMenu.js +3 -4
- package/dist/components/menu/UMenu.styles.js +1 -2
- package/dist/components/menu-item/UMenuItem.js +3 -4
- package/dist/components/menu-item/UMenuItem.styles.js +1 -2
- package/dist/components/option/UOption.js +3 -4
- package/dist/components/option/UOption.styles.js +1 -2
- package/dist/components/option-group/UOptionGroup.js +3 -4
- package/dist/components/option-group/UOptionGroup.styles.js +1 -2
- package/dist/components/pagination/UPagination.js +3 -4
- package/dist/components/pagination/UPagination.styles.js +1 -2
- package/dist/components/panel/UPanel.js +3 -4
- package/dist/components/panel/UPanel.styles.js +1 -2
- package/dist/components/popover/UPopover.js +3 -4
- package/dist/components/popover/UPopover.styles.js +1 -2
- package/dist/components/progress-bar/UProgressBar.js +3 -4
- package/dist/components/progress-bar/UProgressBar.styles.js +1 -2
- package/dist/components/progress-ring/UProgressRing.js +3 -4
- package/dist/components/progress-ring/UProgressRing.styles.js +1 -2
- package/dist/components/radio/URadio.js +3 -4
- package/dist/components/radio/URadio.styles.js +1 -2
- package/dist/components/rating/URating.js +3 -4
- package/dist/components/rating/URating.styles.js +1 -2
- package/dist/components/select/USelect.js +3 -4
- package/dist/components/select/USelect.styles.js +1 -2
- package/dist/components/skeleton/USkeleton.js +3 -4
- package/dist/components/skeleton/USkeleton.styles.js +1 -2
- package/dist/components/slider/USlider.js +3 -4
- package/dist/components/slider/USlider.styles.js +1 -2
- package/dist/components/spinner/USpinner.js +3 -4
- package/dist/components/spinner/USpinner.styles.js +1 -2
- package/dist/components/split-panel/USplitPanel.js +3 -4
- package/dist/components/split-panel/USplitPanel.styles.js +1 -2
- package/dist/components/steps/USteps.js +3 -4
- package/dist/components/steps/USteps.styles.js +1 -2
- package/dist/components/switch/USwitch.js +3 -4
- package/dist/components/switch/USwitch.styles.js +1 -2
- package/dist/components/tab/UTab.js +3 -4
- package/dist/components/tab/UTab.styles.js +1 -2
- package/dist/components/tab-nav/UTabNav.js +3 -4
- package/dist/components/tab-nav/UTabNav.styles.js +1 -2
- package/dist/components/tab-panel/UTabPanel.js +3 -4
- package/dist/components/tab-panel/UTabPanel.styles.js +1 -2
- package/dist/components/tag/UTag.js +3 -4
- package/dist/components/tag/UTag.styles.js +1 -2
- package/dist/components/text/UText.js +3 -4
- package/dist/components/text/UText.styles.js +1 -2
- package/dist/components/textarea/UTextarea.js +3 -4
- package/dist/components/textarea/UTextarea.styles.js +1 -2
- package/dist/components/tooltip/UTooltip.d.ts +12 -0
- package/dist/components/tooltip/UTooltip.js +54 -7
- package/dist/components/tooltip/UTooltip.styles.js +1 -2
- package/dist/components/tree/UTree.js +3 -4
- package/dist/components/tree/UTree.styles.js +1 -2
- package/dist/components/tree-item/UTreeItem.js +3 -4
- package/dist/components/tree-item/UTreeItem.styles.js +1 -2
- package/dist/utilities/BrowserStorage.js +1 -2
- package/dist/utilities/Dialog.js +1 -2
- package/dist/utilities/Locale.js +1 -2
- package/dist/utilities/OverlayManager.js +1 -2
- package/dist/utilities/Theme.js +1 -2
- package/dist/utilities/Toast.js +1 -2
- package/dist/utilities/accent.js +1 -2
- package/dist/utilities/chars.js +1 -2
- package/dist/utilities/clipboard.js +1 -2
- package/dist/utilities/composition.js +1 -2
- package/dist/utilities/converters.js +1 -2
- package/dist/utilities/dateValue.js +1 -2
- package/dist/utilities/devWarning.js +1 -2
- package/dist/utilities/elements.js +1 -2
- package/dist/utilities/format.js +1 -2
- package/dist/utilities/hostAria.js +1 -2
- package/dist/utilities/icons.js +18 -3
- package/dist/utilities/keyboard.js +1 -2
- package/dist/utilities/nestedControl.js +1 -2
- package/dist/utilities/progressAria.js +1 -2
- package/dist/utilities/search.js +1 -2
- package/dist/utilities/statusIcon.js +1 -2
- package/dist/utilities/tsv.js +1 -2
- package/package.json +1 -1
- package/skills/iyulab-components/references/components/tooltip.md +2 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/checkbox/UCheckbox.styles.ts
|
|
3
3
|
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
--checkbox-color: inherit;
|
|
@@ -215,5 +215,4 @@ var styles = css`
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
`;
|
|
218
|
-
//#endregion
|
|
219
218
|
export { styles };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Locale } from "../../utilities/Locale.js";
|
|
2
2
|
import { UElement } from "../UElement.js";
|
|
3
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
4
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorateMetadata.js";
|
|
4
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
5
5
|
import "../button/UButton.js";
|
|
6
6
|
import "../icon/UIcon.js";
|
|
7
7
|
import "../tooltip/UTooltip.js";
|
|
@@ -9,7 +9,7 @@ import "../tag/UTag.js";
|
|
|
9
9
|
import { styles } from "./UChip.styles.js";
|
|
10
10
|
import { html } from "lit";
|
|
11
11
|
import { customElement, property } from "lit/decorators.js";
|
|
12
|
-
|
|
12
|
+
// src/components/chip/UChip.ts
|
|
13
13
|
var UChip = class UChip extends UElement {
|
|
14
14
|
constructor(..._args) {
|
|
15
15
|
super(..._args);
|
|
@@ -144,5 +144,4 @@ __decorate([property({
|
|
|
144
144
|
}), __decorateMetadata("design:type", Object)], UChip.prototype, "selected", void 0);
|
|
145
145
|
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UChip.prototype, "value", void 0);
|
|
146
146
|
UChip = __decorate([customElement("u-chip")], UChip);
|
|
147
|
-
//#endregion
|
|
148
147
|
export { UChip };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/chip/UChip.styles.ts
|
|
3
3
|
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
display: inline-flex;
|
|
@@ -34,5 +34,4 @@ var styles = css`
|
|
|
34
34
|
min-inline-size: 24px;
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
|
-
//#endregion
|
|
38
37
|
export { styles };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Locale } from "../../utilities/Locale.js";
|
|
2
2
|
import { UElement } from "../UElement.js";
|
|
3
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
4
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorateMetadata.js";
|
|
4
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
5
5
|
import "../button/UButton.js";
|
|
6
6
|
import "../icon/UIcon.js";
|
|
7
7
|
import "../icon-button/UIconButton.js";
|
|
8
8
|
import { styles } from "./UCopyButton.styles.js";
|
|
9
9
|
import { html } from "lit";
|
|
10
10
|
import { customElement, property } from "lit/decorators.js";
|
|
11
|
-
|
|
11
|
+
// src/components/copy-button/UCopyButton.ts
|
|
12
12
|
var UCopyButton = class UCopyButton extends UElement {
|
|
13
13
|
constructor(..._args) {
|
|
14
14
|
super(..._args);
|
|
@@ -114,5 +114,4 @@ __decorate([property({ type: Number }), __decorateMetadata("design:type", Number
|
|
|
114
114
|
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UCopyButton.prototype, "value", void 0);
|
|
115
115
|
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UCopyButton.prototype, "label", void 0);
|
|
116
116
|
UCopyButton = __decorate([customElement("u-copy-button")], UCopyButton);
|
|
117
|
-
//#endregion
|
|
118
117
|
export { UCopyButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/copy-button/UCopyButton.styles.ts
|
|
3
3
|
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
display: inline-flex;
|
|
@@ -23,5 +23,4 @@ var styles = css`
|
|
|
23
23
|
color: var(--u-success-color-strong, #1B5E20);
|
|
24
24
|
}
|
|
25
25
|
`;
|
|
26
|
-
//#endregion
|
|
27
26
|
export { styles };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Locale } from "../../utilities/Locale.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.155.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
5
5
|
import "../button/UButton.js";
|
|
6
6
|
import "../icon/UIcon.js";
|
|
@@ -17,7 +17,7 @@ import { styles as styles$1 } from "./UDatePicker.styles.js";
|
|
|
17
17
|
import { html } from "lit";
|
|
18
18
|
import { customElement, property, query, state } from "lit/decorators.js";
|
|
19
19
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
20
|
-
|
|
20
|
+
// src/components/date-picker/UDatePicker.ts
|
|
21
21
|
/** Builds the `value` for the given mode — `datetime` always emits seconds + local offset so
|
|
22
22
|
* the result is unconditionally a valid, unambiguous ISO-8601 `DateTimeOffset` regardless of
|
|
23
23
|
* how coarse the UI input was (this is the guarantee the datetime mode request asked for). */
|
|
@@ -434,5 +434,4 @@ __decorate([state(), __decorateMetadata("design:type", Boolean)], UDatePicker.pr
|
|
|
434
434
|
__decorate([state(), __decorateMetadata("design:type", String)], UDatePicker.prototype, "pendingTime", void 0);
|
|
435
435
|
__decorate([state(), __decorateMetadata("design:type", String)], UDatePicker.prototype, "staged", void 0);
|
|
436
436
|
UDatePicker = __decorate([customElement("u-date-picker")], UDatePicker);
|
|
437
|
-
//#endregion
|
|
438
437
|
export { UDatePicker };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/date-picker/UDatePicker.styles.ts
|
|
3
3
|
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
--date-picker-popover-width: 296px;
|
|
@@ -37,5 +37,4 @@ var styles = css`
|
|
|
37
37
|
font-size: calc(var(--u-density, 14px) * 8 / 7);
|
|
38
38
|
}
|
|
39
39
|
`;
|
|
40
|
-
//#endregion
|
|
41
40
|
export { styles };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Locale } from "../../utilities/Locale.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.155.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
5
5
|
import "../button/UButton.js";
|
|
6
6
|
import { devWarnOnce } from "../../utilities/devWarning.js";
|
|
@@ -19,7 +19,7 @@ import { styles as styles$1 } from "./UDateRangePicker.styles.js";
|
|
|
19
19
|
import { html } from "lit";
|
|
20
20
|
import { customElement, property, query, state } from "lit/decorators.js";
|
|
21
21
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
22
|
-
|
|
22
|
+
// src/components/date-range-picker/UDateRangePicker.ts
|
|
23
23
|
var ISO_DATE = /^\d{4}-\d{2}-\d{2}$/;
|
|
24
24
|
var ISO_DATE_TIME = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/;
|
|
25
25
|
/** Splits `"start/end"` into its two halves — ISO dates, or in `mode="datetime"` ISO date-times read
|
|
@@ -514,5 +514,4 @@ __decorate([state(), __decorateMetadata("design:type", Boolean)], UDateRangePick
|
|
|
514
514
|
__decorate([state(), __decorateMetadata("design:type", String)], UDateRangePicker.prototype, "staged", void 0);
|
|
515
515
|
__decorate([state(), __decorateMetadata("design:type", Object)], UDateRangePicker.prototype, "pendingTimes", void 0);
|
|
516
516
|
UDateRangePicker = __decorate([customElement("u-date-range-picker")], UDateRangePicker);
|
|
517
|
-
//#endregion
|
|
518
517
|
export { UDateRangePicker };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/date-range-picker/UDateRangePicker.styles.ts
|
|
3
3
|
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
position: relative;
|
|
@@ -107,5 +107,4 @@ var styles = css`
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
`;
|
|
110
|
-
//#endregion
|
|
111
110
|
export { styles };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Locale } from "../../utilities/Locale.js";
|
|
2
2
|
import { addDays, addMonths, daysInMonth, parseISODate, toISODate } from "../calendar/dates.js";
|
|
3
|
-
|
|
3
|
+
// src/components/date-range-picker/presets.ts
|
|
4
4
|
var startOfWeek = (d) => addDays(d, -d.getDay());
|
|
5
5
|
var endOfMonth = (d) => new Date(d.getFullYear(), d.getMonth(), daysInMonth(d));
|
|
6
6
|
/** Built-in ranges as pure functions of "today" (a local calendar day). Both ends are inclusive. */
|
|
@@ -74,5 +74,4 @@ function ordered(label, a, b) {
|
|
|
74
74
|
end: a
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
//#endregion
|
|
78
77
|
export { BUILTIN_PRESETS, resolvePresets };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Locale } from "../../utilities/Locale.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.155.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UOverlayElement } from "../UOverlayElement.js";
|
|
5
5
|
import "../button/UButton.js";
|
|
6
6
|
import "../icon/UIcon.js";
|
|
7
7
|
import { styles } from "./UDialog.styles.js";
|
|
8
8
|
import { html } from "lit";
|
|
9
9
|
import { customElement, property, state } from "lit/decorators.js";
|
|
10
|
-
|
|
10
|
+
// src/components/dialog/UDialog.ts
|
|
11
11
|
var UDialog = class UDialog extends UOverlayElement {
|
|
12
12
|
constructor(..._args) {
|
|
13
13
|
super(..._args);
|
|
@@ -67,5 +67,4 @@ __decorate([property({
|
|
|
67
67
|
}), __decorateMetadata("design:type", Object)], UDialog.prototype, "offset", void 0);
|
|
68
68
|
__decorate([state(), __decorateMetadata("design:type", Object)], UDialog.prototype, "hasHeader", void 0);
|
|
69
69
|
UDialog = __decorate([customElement("u-dialog")], UDialog);
|
|
70
|
-
//#endregion
|
|
71
70
|
export { UDialog };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/dialog/UDialog.styles.ts
|
|
3
3
|
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
--container-offset: 0px;
|
|
@@ -119,5 +119,4 @@ var styles = css`
|
|
|
119
119
|
border-top: 1px solid var(--u-border-color, #E0E0E0);
|
|
120
120
|
}
|
|
121
121
|
`;
|
|
122
|
-
//#endregion
|
|
123
122
|
export { styles };
|
|
@@ -1,10 +1,10 @@
|
|
|
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.155.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
4
4
|
import { styles } from "./UDivider.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
6
6
|
import { customElement, property } from "lit/decorators.js";
|
|
7
|
-
|
|
7
|
+
// src/components/divider/UDivider.ts
|
|
8
8
|
var UDivider = class UDivider extends UElement {
|
|
9
9
|
constructor(..._args) {
|
|
10
10
|
super(..._args);
|
|
@@ -44,5 +44,4 @@ __decorate([property({
|
|
|
44
44
|
reflect: true
|
|
45
45
|
}), __decorateMetadata("design:type", Object)], UDivider.prototype, "align", void 0);
|
|
46
46
|
UDivider = __decorate([customElement("u-divider")], UDivider);
|
|
47
|
-
//#endregion
|
|
48
47
|
export { UDivider };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/divider/UDivider.styles.ts
|
|
3
3
|
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
--divider-size: 1px;
|
|
@@ -109,5 +109,4 @@ var styles = css`
|
|
|
109
109
|
padding: var(--u-space-md, 12px) 0;
|
|
110
110
|
}
|
|
111
111
|
`;
|
|
112
|
-
//#endregion
|
|
113
112
|
export { styles };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Locale } from "../../utilities/Locale.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.155.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UOverlayElement } from "../UOverlayElement.js";
|
|
5
5
|
import "../button/UButton.js";
|
|
6
6
|
import "../icon/UIcon.js";
|
|
7
7
|
import { styles } from "./UDrawer.styles.js";
|
|
8
8
|
import { html } from "lit";
|
|
9
9
|
import { customElement, property, state } from "lit/decorators.js";
|
|
10
|
-
|
|
10
|
+
// src/components/drawer/UDrawer.ts
|
|
11
11
|
var UDrawer = class UDrawer extends UOverlayElement {
|
|
12
12
|
constructor(..._args) {
|
|
13
13
|
super(..._args);
|
|
@@ -55,5 +55,4 @@ __decorate([property({
|
|
|
55
55
|
}), __decorateMetadata("design:type", Object)], UDrawer.prototype, "placement", void 0);
|
|
56
56
|
__decorate([state(), __decorateMetadata("design:type", Object)], UDrawer.prototype, "hasHeader", void 0);
|
|
57
57
|
UDrawer = __decorate([customElement("u-drawer")], UDrawer);
|
|
58
|
-
//#endregion
|
|
59
58
|
export { UDrawer };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/drawer/UDrawer.styles.ts
|
|
3
3
|
var styles = css`
|
|
4
4
|
|
|
5
5
|
:host([placement="left"]) { justify-content: flex-start; }
|
|
@@ -107,5 +107,4 @@ var styles = css`
|
|
|
107
107
|
border-top: 1px solid var(--u-border-color, #E0E0E0);
|
|
108
108
|
}
|
|
109
109
|
`;
|
|
110
|
-
//#endregion
|
|
111
110
|
export { styles };
|
|
@@ -1,11 +1,11 @@
|
|
|
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.155.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../icon/UIcon.js";
|
|
5
5
|
import { styles } from "./UExpander.styles.js";
|
|
6
6
|
import { html } from "lit";
|
|
7
7
|
import { customElement, property } from "lit/decorators.js";
|
|
8
|
-
|
|
8
|
+
// src/components/expander/UExpander.ts
|
|
9
9
|
var UExpander = class UExpander extends UElement {
|
|
10
10
|
constructor(..._args) {
|
|
11
11
|
super(..._args);
|
|
@@ -74,5 +74,4 @@ __decorate([property({
|
|
|
74
74
|
}), __decorateMetadata("design:type", Object)], UExpander.prototype, "disabled", void 0);
|
|
75
75
|
__decorate([property({ type: String }), __decorateMetadata("design:type", Object)], UExpander.prototype, "label", void 0);
|
|
76
76
|
UExpander = __decorate([customElement("u-expander")], UExpander);
|
|
77
|
-
//#endregion
|
|
78
77
|
export { UExpander };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/expander/UExpander.styles.ts
|
|
3
3
|
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
display: block;
|
|
@@ -93,5 +93,4 @@ var styles = css`
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
`;
|
|
96
|
-
//#endregion
|
|
97
96
|
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.155.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
4
4
|
import { HostAria } from "../../utilities/hostAria.js";
|
|
5
5
|
import { devWarnOnce } from "../../utilities/devWarning.js";
|
|
6
6
|
import "../icon/UIcon.js";
|
|
@@ -9,7 +9,7 @@ import { styles } from "./UField.styles.js";
|
|
|
9
9
|
import { html, nothing } from "lit";
|
|
10
10
|
import { customElement, property } from "lit/decorators.js";
|
|
11
11
|
import { isFocusable } from "tabbable";
|
|
12
|
-
|
|
12
|
+
// src/components/field/UField.ts
|
|
13
13
|
var _UField;
|
|
14
14
|
/** 네이티브로 «폼 컨트롤이거나 포커스를 받도록 저작된» 태그 — 가시성과 무관한 구조 사실이다. */
|
|
15
15
|
var NATIVE_CONTROL_TAGS = /* @__PURE__ */ new Set([
|
|
@@ -386,5 +386,4 @@ __decorate([property({
|
|
|
386
386
|
attribute: "description-display"
|
|
387
387
|
}), __decorateMetadata("design:type", Object)], UField.prototype, "descriptionDisplay", void 0);
|
|
388
388
|
UField = _UField = __decorate([customElement("u-field")], UField);
|
|
389
|
-
//#endregion
|
|
390
389
|
export { UField };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/field/UField.styles.ts
|
|
3
3
|
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
display: block;
|
|
@@ -80,5 +80,4 @@ var styles = css`
|
|
|
80
80
|
margin-top: 0.5em;
|
|
81
81
|
}
|
|
82
82
|
`;
|
|
83
|
-
//#endregion
|
|
84
83
|
export { styles };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Locale } from "../../utilities/Locale.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.155.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
5
5
|
import "../icon/UIcon.js";
|
|
6
6
|
import "../field/UField.js";
|
|
@@ -8,7 +8,7 @@ import { styles } from "./UFileInput.styles.js";
|
|
|
8
8
|
import { html } from "lit";
|
|
9
9
|
import { customElement, property, query } from "lit/decorators.js";
|
|
10
10
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
11
|
-
|
|
11
|
+
// src/components/file-input/UFileInput.ts
|
|
12
12
|
var UFileInput = class UFileInput extends UFormControlElement {
|
|
13
13
|
constructor(..._args) {
|
|
14
14
|
super(..._args);
|
|
@@ -155,5 +155,4 @@ __decorate([property({
|
|
|
155
155
|
__decorate([query(".trigger", true), __decorateMetadata("design:type", typeof HTMLButtonElement === "undefined" ? Object : HTMLButtonElement)], UFileInput.prototype, "triggerEl", void 0);
|
|
156
156
|
__decorate([query("input[type=\"file\"]", true), __decorateMetadata("design:type", typeof HTMLInputElement === "undefined" ? Object : HTMLInputElement)], UFileInput.prototype, "inputEl", void 0);
|
|
157
157
|
UFileInput = __decorate([customElement("u-file-input")], UFileInput);
|
|
158
|
-
//#endregion
|
|
159
158
|
export { UFileInput };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/file-input/UFileInput.styles.ts
|
|
3
3
|
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
display: var(--u-file-input-display, inline-block);
|
|
@@ -95,5 +95,4 @@ var styles = css`
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
`;
|
|
98
|
-
//#endregion
|
|
99
98
|
export { styles };
|
|
@@ -1,12 +1,12 @@
|
|
|
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.155.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
5
5
|
import { arrayAttrConverter } from "../../utilities/converters.js";
|
|
6
6
|
import { styles } from "./UForm.styles.js";
|
|
7
7
|
import { html } from "lit";
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
|
-
|
|
9
|
+
// src/components/form/UForm.ts
|
|
10
10
|
var UForm = class UForm extends UElement {
|
|
11
11
|
constructor(..._args) {
|
|
12
12
|
super(..._args);
|
|
@@ -113,5 +113,4 @@ __decorate([property({
|
|
|
113
113
|
attribute: false
|
|
114
114
|
}), __decorateMetadata("design:type", typeof Record === "undefined" ? Object : Record)], UForm.prototype, "model", void 0);
|
|
115
115
|
UForm = __decorate([customElement("u-form")], UForm);
|
|
116
|
-
//#endregion
|
|
117
116
|
export { UForm };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/form/UForm.styles.ts
|
|
3
3
|
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
width: 100%;
|
|
@@ -16,5 +16,4 @@ var styles = css`
|
|
|
16
16
|
font-size: inherit;
|
|
17
17
|
}
|
|
18
18
|
`;
|
|
19
|
-
//#endregion
|
|
20
19
|
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.155.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
4
4
|
import { IconRegistry, getDefaultBaseUrl } from "../../utilities/icons.js";
|
|
5
5
|
import { devWarnOnce } from "../../utilities/devWarning.js";
|
|
6
6
|
import { styles } from "./UIcon.styles.js";
|
|
@@ -8,7 +8,7 @@ import { nothing } from "lit";
|
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
9
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
10
10
|
import { until } from "lit/directives/until.js";
|
|
11
|
-
|
|
11
|
+
// src/components/icon/UIcon.ts
|
|
12
12
|
var UIcon = class UIcon extends UElement {
|
|
13
13
|
static {
|
|
14
14
|
this.styles = [super.styles, styles];
|
|
@@ -61,5 +61,4 @@ __decorate([property({ type: String }), __decorateMetadata("design:type", Object
|
|
|
61
61
|
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UIcon.prototype, "name", void 0);
|
|
62
62
|
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UIcon.prototype, "fallback", void 0);
|
|
63
63
|
UIcon = __decorate([customElement("u-icon")], UIcon);
|
|
64
|
-
//#endregion
|
|
65
64
|
export { UIcon };
|
|
@@ -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.155.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
4
4
|
import { FORWARDED_ARIA, readForwardedAria } from "../button/forwarded-aria.js";
|
|
5
5
|
import "../button/UButton.js";
|
|
6
6
|
import "../icon/UIcon.js";
|
|
@@ -9,7 +9,7 @@ import { styles } from "./UIconButton.styles.js";
|
|
|
9
9
|
import { html } from "lit";
|
|
10
10
|
import { customElement, property, state } from "lit/decorators.js";
|
|
11
11
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
12
|
-
|
|
12
|
+
// src/components/icon-button/UIconButton.ts
|
|
13
13
|
var UIconButton = class UIconButton extends UElement {
|
|
14
14
|
constructor(..._args) {
|
|
15
15
|
super(..._args);
|
|
@@ -117,5 +117,4 @@ __decorate([property({
|
|
|
117
117
|
}), __decorateMetadata("design:type", Object)], UIconButton.prototype, "tooltipOffset", void 0);
|
|
118
118
|
__decorate([state(), __decorateMetadata("design:type", Object)], UIconButton.prototype, "slotText", void 0);
|
|
119
119
|
UIconButton = __decorate([customElement("u-icon-button")], UIconButton);
|
|
120
|
-
//#endregion
|
|
121
120
|
export { UIconButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/icon-button/UIconButton.styles.ts
|
|
3
3
|
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
display: inline-flex;
|
|
@@ -21,5 +21,4 @@ var styles = css`
|
|
|
21
21
|
padding: 0.4em;
|
|
22
22
|
}
|
|
23
23
|
`;
|
|
24
|
-
//#endregion
|
|
25
24
|
export { styles };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Locale } from "../../utilities/Locale.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.155.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
5
5
|
import { isImeComposing } from "../../utilities/keyboard.js";
|
|
6
6
|
import "../spinner/USpinner.js";
|
|
@@ -15,7 +15,7 @@ import { html } from "lit";
|
|
|
15
15
|
import { customElement, property, query, state } from "lit/decorators.js";
|
|
16
16
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
17
17
|
import { live } from "lit/directives/live.js";
|
|
18
|
-
|
|
18
|
+
// src/components/input/UInput.ts
|
|
19
19
|
var UInput = class UInput extends UFormControlElement {
|
|
20
20
|
constructor(..._args) {
|
|
21
21
|
super(..._args);
|
|
@@ -360,8 +360,7 @@ var UInput = class UInput extends UFormControlElement {
|
|
|
360
360
|
};
|
|
361
361
|
const step = this.step ?? 1;
|
|
362
362
|
if (Number.isFinite(step) && step > 0) {
|
|
363
|
-
|
|
364
|
-
if (Math.abs(k - Math.round(k)) > 1e-9) return {
|
|
363
|
+
if (!isStepMultiple(n, min ?? 0, step)) return {
|
|
365
364
|
flags: { stepMismatch: true },
|
|
366
365
|
message: Locale.getValue("stepMismatch", { step })
|
|
367
366
|
};
|
|
@@ -507,8 +506,7 @@ var UInput = class UInput extends UFormControlElement {
|
|
|
507
506
|
const max = this.max !== void 0 && this.max !== "" ? Number(this.max) : void 0;
|
|
508
507
|
const current = parseNumber(this.numberText) ?? 0;
|
|
509
508
|
const base = min ?? 0;
|
|
510
|
-
const
|
|
511
|
-
const index = delta > 0 ? Math.floor(k + 1e-9) + 1 : Math.ceil(k - 1e-9) - 1;
|
|
509
|
+
const index = stepIndex(current, base, step, delta);
|
|
512
510
|
const places = Math.max(fractionDigits(step), fractionDigits(base));
|
|
513
511
|
let next = Number((base + index * step).toFixed(places));
|
|
514
512
|
if (min !== void 0 && next < min) next = min;
|
|
@@ -573,6 +571,43 @@ function fractionDigits(n) {
|
|
|
573
571
|
const digits = (mantissa.split(".")[1] ?? "").length;
|
|
574
572
|
return Math.max(0, digits - Number(exponent ?? 0));
|
|
575
573
|
}
|
|
574
|
+
/**
|
|
575
|
+
* `n` 이 `base` 에서 `step` 의 정수 배만큼 떨어져 있는가. 나눗셈의 부동소수 오차는 몫의 크기에 비례해 자라므로
|
|
576
|
+
* (`49.7 / 0.000001` 의 소수부는 7e-9) 절대 허용오차로는 작은 step 에서 거짓 불일치가 난다 — 가장 긴 소수 자릿수로
|
|
577
|
+
* 정수에 맞춰 정확히 나눠 본다. 자릿수가 정수 정밀도를 넘으면 몫에 상대 허용오차를 쓴다.
|
|
578
|
+
*/
|
|
579
|
+
/** 스테퍼가 가야 할 step 번호 — `current` 의 위쪽(+1)·아래쪽(-1) 이웃. 같은 정수 비교라 큰 몫에서도 오차가 없다. */
|
|
580
|
+
function stepIndex(current, base, step, delta) {
|
|
581
|
+
const scale = 10 ** Math.max(fractionDigits(current), fractionDigits(base), fractionDigits(step));
|
|
582
|
+
const scaledCurrent = Math.round(current * scale);
|
|
583
|
+
const scaledBase = Math.round(base * scale);
|
|
584
|
+
const scaledStep = Math.round(step * scale);
|
|
585
|
+
if ([
|
|
586
|
+
scaledCurrent,
|
|
587
|
+
scaledBase,
|
|
588
|
+
scaledStep
|
|
589
|
+
].every(Number.isSafeInteger) && scaledStep > 0) {
|
|
590
|
+
const diff = scaledCurrent - scaledBase;
|
|
591
|
+
const remainder = (diff % scaledStep + scaledStep) % scaledStep;
|
|
592
|
+
const floor = (diff - remainder) / scaledStep;
|
|
593
|
+
return delta > 0 ? floor + 1 : remainder === 0 ? floor - 1 : floor;
|
|
594
|
+
}
|
|
595
|
+
const k = (current - base) / step;
|
|
596
|
+
return delta > 0 ? Math.floor(k + 1e-9) + 1 : Math.ceil(k - 1e-9) - 1;
|
|
597
|
+
}
|
|
598
|
+
function isStepMultiple(n, base, step) {
|
|
599
|
+
const scale = 10 ** Math.max(fractionDigits(n), fractionDigits(base), fractionDigits(step));
|
|
600
|
+
const scaledN = Math.round(n * scale);
|
|
601
|
+
const scaledBase = Math.round(base * scale);
|
|
602
|
+
const scaledStep = Math.round(step * scale);
|
|
603
|
+
if ([
|
|
604
|
+
scaledN,
|
|
605
|
+
scaledBase,
|
|
606
|
+
scaledStep
|
|
607
|
+
].every(Number.isSafeInteger) && scaledStep > 0) return (scaledN - scaledBase) % scaledStep === 0;
|
|
608
|
+
const k = (n - base) / step;
|
|
609
|
+
return Math.abs(k - Math.round(k)) <= Math.max(1e-9, Math.abs(k) * Number.EPSILON * 4);
|
|
610
|
+
}
|
|
576
611
|
/** HTML 명세의 «암묵 제출을 막는 필드» — 네이티브 단일 행 입력의 이 type 들. `u-input` 의 type 은 전부 여기에 든다. */
|
|
577
612
|
var BLOCKING_TYPES = /* @__PURE__ */ new Set([
|
|
578
613
|
"text",
|
|
@@ -596,5 +631,4 @@ function isSubmitButton(el) {
|
|
|
596
631
|
function blocksImplicitSubmission(el) {
|
|
597
632
|
return (el instanceof HTMLInputElement || el instanceof UInput) && BLOCKING_TYPES.has(el.type);
|
|
598
633
|
}
|
|
599
|
-
//#endregion
|
|
600
634
|
export { UInput };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/input/UInput.styles.ts
|
|
3
3
|
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
--input-popover-min-height: 0px;
|
|
@@ -263,5 +263,4 @@ var styles = css`
|
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
`;
|
|
266
|
-
//#endregion
|
|
267
266
|
export { styles };
|