@iyulab/components 3.0.0 → 3.2.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 +144 -0
- package/README.md +12 -0
- package/dist/components/UElement.d.ts +11 -0
- package/dist/components/UElement.js +14 -0
- package/dist/components/UElement.styles.js +9 -0
- package/dist/components/UFloatingElement.d.ts +4 -0
- package/dist/components/UFloatingElement.js +7 -0
- package/dist/components/UFormControlElement.d.ts +20 -3
- package/dist/components/UFormControlElement.js +46 -4
- package/dist/components/UOverlayElement.d.ts +4 -0
- package/dist/components/UOverlayElement.js +7 -0
- package/dist/components/alert/UAlert.d.ts +4 -0
- package/dist/components/alert/UAlert.js +7 -0
- package/dist/components/auto-scroll/UAutoScroll.d.ts +6 -2
- package/dist/components/auto-scroll/UAutoScroll.js +7 -0
- package/dist/components/avatar/UAvatar.d.ts +4 -0
- package/dist/components/avatar/UAvatar.js +11 -0
- package/dist/components/badge/UBadge.d.ts +6 -0
- package/dist/components/badge/UBadge.js +36 -1
- package/dist/components/badge/UBadge.styles.js +8 -0
- package/dist/components/breadcrumb-item/UBreadcrumbItem.js +2 -2
- package/dist/components/button/UButton.d.ts +7 -0
- package/dist/components/button/UButton.js +41 -1
- package/dist/components/button/UButton.styles.js +8 -0
- package/dist/components/button-group/UButtonGroup.d.ts +4 -0
- package/dist/components/button-group/UButtonGroup.js +13 -0
- package/dist/components/calendar/UCalendar.d.ts +8 -0
- package/dist/components/calendar/UCalendar.js +30 -14
- package/dist/components/calendar/UCalendar.styles.js +3 -0
- package/dist/components/calendar/dates.d.ts +12 -0
- package/dist/components/calendar/dates.js +25 -1
- package/dist/components/card/UCard.d.ts +6 -0
- package/dist/components/card/UCard.js +15 -0
- package/dist/components/carousel/UCarousel.d.ts +4 -0
- package/dist/components/carousel/UCarousel.js +7 -0
- package/dist/components/checkbox/UCheckbox.d.ts +6 -0
- package/dist/components/checkbox/UCheckbox.js +25 -1
- package/dist/components/chip/UChip.d.ts +5 -0
- package/dist/components/chip/UChip.js +30 -0
- package/dist/components/command-palette/UCommandPalette.js +3 -0
- package/dist/components/copy-button/UCopyButton.d.ts +4 -0
- package/dist/components/copy-button/UCopyButton.js +13 -0
- package/dist/components/date-picker/UDatePicker.d.ts +11 -5
- package/dist/components/date-picker/UDatePicker.js +13 -0
- package/dist/components/date-range-picker/UDateRangePicker.d.ts +9 -2
- package/dist/components/date-range-picker/UDateRangePicker.js +13 -0
- package/dist/components/date-range-picker/presets.d.ts +2 -1
- package/dist/components/date-range-picker/presets.js +5 -5
- package/dist/components/dialog/UDialog.d.ts +5 -0
- package/dist/components/dialog/UDialog.js +17 -0
- package/dist/components/divider/UDivider.d.ts +5 -0
- package/dist/components/divider/UDivider.js +17 -1
- package/dist/components/divider/UDivider.styles.js +5 -0
- package/dist/components/drawer/UDrawer.d.ts +5 -0
- package/dist/components/drawer/UDrawer.js +12 -0
- package/dist/components/field/UField.d.ts +4 -0
- package/dist/components/field/UField.js +7 -0
- package/dist/components/icon-button/UIconButton.d.ts +4 -0
- package/dist/components/icon-button/UIconButton.js +13 -0
- package/dist/components/input/UInput.d.ts +7 -0
- package/dist/components/input/UInput.js +31 -0
- package/dist/components/input/UInput.styles.js +9 -0
- package/dist/components/menu/UMenu.d.ts +7 -0
- package/dist/components/menu/UMenu.js +18 -0
- package/dist/components/menu-item/UMenuItem.d.ts +5 -0
- package/dist/components/menu-item/UMenuItem.js +13 -1
- package/dist/components/option/UOption.d.ts +4 -0
- package/dist/components/option/UOption.js +8 -1
- package/dist/components/pagination/UPagination.d.ts +4 -0
- package/dist/components/pagination/UPagination.js +11 -0
- package/dist/components/popover/UPopover.d.ts +5 -0
- package/dist/components/popover/UPopover.js +13 -0
- package/dist/components/progress-bar/UProgressBar.d.ts +4 -0
- package/dist/components/progress-bar/UProgressBar.js +14 -1
- package/dist/components/progress-bar/UProgressBar.styles.js +5 -0
- package/dist/components/progress-ring/UProgressRing.d.ts +4 -0
- package/dist/components/progress-ring/UProgressRing.js +13 -0
- package/dist/components/radio/URadio.d.ts +7 -0
- package/dist/components/radio/URadio.js +15 -2
- package/dist/components/rating/URating.d.ts +5 -1
- package/dist/components/rating/URating.js +6 -2
- package/dist/components/select/USelect.d.ts +7 -0
- package/dist/components/select/USelect.js +19 -1
- package/dist/components/skeleton/USkeleton.d.ts +5 -0
- package/dist/components/skeleton/USkeleton.js +16 -0
- package/dist/components/spinner/USpinner.d.ts +4 -0
- package/dist/components/spinner/USpinner.js +24 -0
- package/dist/components/split-panel/USplitPanel.d.ts +4 -0
- package/dist/components/split-panel/USplitPanel.js +7 -0
- package/dist/components/steps/USteps.d.ts +4 -0
- package/dist/components/steps/USteps.js +12 -1
- package/dist/components/switch/USwitch.js +1 -1
- package/dist/components/tab/UTab.d.ts +4 -0
- package/dist/components/tab/UTab.js +12 -1
- package/dist/components/tab/UTab.styles.js +7 -0
- package/dist/components/tab-nav/UTabNav.d.ts +6 -2
- package/dist/components/tab-nav/UTabNav.js +7 -0
- package/dist/components/tab-panel/UTabPanel.d.ts +5 -0
- package/dist/components/tab-panel/UTabPanel.js +18 -0
- package/dist/components/tag/UTag.d.ts +6 -0
- package/dist/components/tag/UTag.js +32 -1
- package/dist/components/text/UText.d.ts +5 -0
- package/dist/components/text/UText.js +21 -0
- package/dist/components/textarea/UTextarea.d.ts +7 -0
- package/dist/components/textarea/UTextarea.js +24 -0
- package/dist/components/tree/UTree.d.ts +4 -0
- package/dist/components/tree/UTree.js +7 -0
- package/dist/components/tree-item/UTreeItem.d.ts +4 -0
- package/dist/components/tree-item/UTreeItem.js +8 -1
- package/dist/custom-elements.json +46557 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/plugins/cem-check.d.ts +29 -0
- package/dist/plugins/cem-check.js +90 -0
- package/dist/plugins/cem-config.d.ts +17 -0
- package/dist/plugins/cem-config.js +22 -0
- package/dist/plugins/cem-enumerated-plugin.d.ts +20 -0
- package/dist/plugins/cem-enumerated-plugin.js +105 -0
- package/dist/plugins/cem-events-plugin.d.ts +18 -0
- package/dist/plugins/cem-events-plugin.js +96 -0
- package/dist/utilities/collation.d.ts +11 -0
- package/dist/utilities/collation.js +52 -0
- package/dist/utilities/enumerated.d.ts +20 -0
- package/dist/utilities/enumerated.js +24 -0
- package/dist/utilities/format.js +49 -15
- package/package.json +18 -15
- package/skills/iyulab-components/SKILL.md +8 -2
- package/skills/iyulab-components/references/components/checkbox.md +1 -1
- package/skills/iyulab-components/references/components/date-picker.md +2 -2
- package/skills/iyulab-components/references/components/date-range-picker.md +4 -4
- package/skills/iyulab-components/references/components/field.md +5 -0
- package/skills/iyulab-components/references/components/file-input.md +1 -1
- package/skills/iyulab-components/references/components/input.md +1 -1
- package/skills/iyulab-components/references/components/select.md +1 -1
- package/skills/iyulab-components/references/components/textarea.md +1 -1
- package/skills/iyulab-components/references/utilities/locale.md +14 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,149 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.2.0] - 2026-11-16
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **Development-mode warning for an unknown value of an enumerated attribute.** A template attribute string is not
|
|
8
|
+
type-checked, and a value outside the list (`appearance="filled"` on a button) matches no style rule, so the element silently
|
|
9
|
+
rendered as if the attribute were unset — nothing in the console. It now logs one `console.warn` per element, attribute and
|
|
10
|
+
value in development builds, naming the values that are accepted; rendering is unchanged and production builds do nothing.
|
|
11
|
+
Every element attribute whose type is a closed list of strings is covered (`appearance`, `color`, `size`, `tone`, `placement`,
|
|
12
|
+
`orientation`, `mode`, … on about forty elements; `u-alert` keeps its own `status` warning, which also suggests the nearest
|
|
13
|
+
valid name). Elements opt in through the new `UElement.enumerated` map, and `enumeratedValues<Union>()([...])`
|
|
14
|
+
(exported, also from `@iyulab/components/dist/utilities/enumerated.js`) writes a list the compiler checks against the type's
|
|
15
|
+
union in both directions, so the two cannot drift. A package that builds on `UElement` can use the same map for its own
|
|
16
|
+
elements.
|
|
17
|
+
|
|
18
|
+
- **`custom-elements.json` — a Custom Elements Manifest for every element.** The package now ships
|
|
19
|
+
`dist/custom-elements.json` (reachable as `@iyulab/components/dist/custom-elements.json`, and declared in the
|
|
20
|
+
`customElements` field of `package.json`) so editors, documentation tools and AI agents can read each element's attributes,
|
|
21
|
+
properties, events, slots, CSS parts and CSS custom properties without parsing the source. It is generated from the source at
|
|
22
|
+
build time (`npm run analyze`) and covers all 54 elements. Events are listed whether an element raises them with
|
|
23
|
+
`this.fire()` or `dispatchEvent()` — including from an arrow-function field — with the type of their `detail`
|
|
24
|
+
(`CustomEvent<USelectQueryChangeDetail>`); events documented with `@fires` keep their description. An attribute whose type is a closed list of strings
|
|
25
|
+
(`appearance`, `color`, `size`, …) is typed with its accepted values (`"solid" | "soft" | "outlined" | "plain" | "link"`)
|
|
26
|
+
instead of the alias name, so an editor or an agent can offer and check the values without reading the source. The file adds about
|
|
27
|
+
230 kB to the compressed package.
|
|
28
|
+
- **Build helpers for a package that publishes its own manifest** (`@iyulab/components/plugins/cem-config.js`,
|
|
29
|
+
`cem-events-plugin.js`, `cem-check.js`). `cemConfig()` is the analyzer configuration this package uses, so a package that
|
|
30
|
+
builds on these elements gets the same manifest with one line in `custom-elements-manifest.config.mjs`;
|
|
31
|
+
`checkManifest({ root, manifest })` returns what in a generated manifest disagrees with the source (an element that is not
|
|
32
|
+
registered, a missing description, an event the analyzer invented or missed) for a package's own test.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- **The calendar writes its day numbers in the locale's own digits.** `u-calendar` drew every day with Latin digits while the date
|
|
37
|
+
text field beside it already wrote the date in the locale's digits (`۲۰۲۶/۱۱/۰۵` in `fa`), so one picker showed two numeral systems.
|
|
38
|
+
The day cells now use the digits of the active locale: `fa` `۵`, `ar-EG` `٥`, `bn` `৫`. Locales that write Latin digits (`en`, `ko`,
|
|
39
|
+
`de`, `ja`, `he` …) are unchanged. The value, `data-iso`, and the events still carry ISO text — only the label of the cell changes.
|
|
40
|
+
|
|
41
|
+
- **The calendar week starts on the locale's first day of the week.** `u-date-picker`, `u-date-range-picker` and the calendar inside them
|
|
42
|
+
always opened the week on Sunday, so a `fa` or `ar-EG` page showed a Sunday-first grid and a `de`, `fr` or `ru` page did too. The
|
|
43
|
+
weekday row, the empty cells before the 1st and the Home/End keys now start the week where the locale does (read from
|
|
44
|
+
`Intl.Locale`): Saturday in `fa` and `ar-EG`, Monday in `de`, `fr`, `ru`, `en-GB`, Sunday in `en`, `ko`, `ja` and `th`. The
|
|
45
|
+
`thisWeek` and `lastWeek` presets of `u-date-range-picker` follow the same day. A browser that reports no week information keeps Sunday.
|
|
46
|
+
Pages that set no region and use `en`, `ko` or `ja` are unchanged.
|
|
47
|
+
- **Runtime dependency ranges follow the current patch releases** (`focus-trap` `^8.2.5`, `tabbable` `^6.5.2`). No behaviour change.
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- **`validationMessage` on the form controls can be set, as the docs said.** The property tables of `u-input`, `u-textarea`, `u-select`,
|
|
52
|
+
`u-date-picker`, `u-date-range-picker`, `u-file-input` and `u-checkbox` listed `validationMessage` ("Custom validation message")
|
|
53
|
+
and `validation-message` worked on `u-field`, but the controls only had a getter, so `.validationMessage=${text}` in a template
|
|
54
|
+
threw `TypeError: Cannot set property validationMessage … which has only a getter` on every render. It is now a property with the
|
|
55
|
+
attribute `validation-message` on every form control, with the same meaning as on `u-field`: the text shown while the control is
|
|
56
|
+
`invalid`, replacing the message the browser computed. Set it to an empty string to go back to the computed message. It changes
|
|
57
|
+
the text only — it does not make the value invalid or block a form submit; `setCustomValidity()` is still the call that does.
|
|
58
|
+
- **`setCustomValidity()` can be called before the control has rendered.** Called on an element that was just created (before it is
|
|
59
|
+
connected or has drawn once), it read the inner input too early and logged a development-mode `@query'd field … accessed before
|
|
60
|
+
the first update` warning. The message is now taken at once and applied right after the first render.
|
|
61
|
+
- **The docs say where the error text goes.** A control that draws its own field box (`u-input`, `u-textarea`, `u-select`, the date
|
|
62
|
+
pickers) shows its own error line when it is `invalid`, so `validation-message` on both that control and a `u-field` around it shows
|
|
63
|
+
two lines. `u-field`'s docs now ask for the text in one place, like the label, and the property tables describe `validationMessage`
|
|
64
|
+
as it works.
|
|
65
|
+
- **The keyboard focus ring on a calendar day is visible on all four sides inside a selected range.** In `u-date-range-picker` (and
|
|
66
|
+
the calendar inside `u-date-picker`), the day that holds focus draws a 2px ring outside its box, and the next day's range-band
|
|
67
|
+
background was painted over it, so the ring on the start day (or any day in the band) lost its trailing edge and read as a
|
|
68
|
+
partly missing outline. The focused day is now raised above its neighbours.
|
|
69
|
+
- **The calendar names the month its grid shows in every locale.** `u-calendar`'s month title and the grid's accessible name were
|
|
70
|
+
written in the locale's own calendar, but the grid and `value` are Gregorian. In `fa` the title read the Persian month (`آبان ۱۴۰۵`)
|
|
71
|
+
above a grid of November 2026, so a person and a screen reader were told another month; in `th` the title carried the Buddhist year
|
|
72
|
+
(`2569`) while the field next to it wrote `2026`. The title (and the "range start chosen" announcement) now use the Gregorian
|
|
73
|
+
calendar, as the date text already did. Locales whose default calendar is Gregorian are unchanged.
|
|
74
|
+
- **The class descriptions of `u-auto-scroll` and `u-tab-nav` were attached to a neighbouring type alias.** The comment block
|
|
75
|
+
sat above `AutoScrollMode` / `TabNavAppearance` instead of the class, so editors showed no description for either element and
|
|
76
|
+
their `@slot`, `@csspart` and `@cssprop` entries did not reach the generated documentation. No behaviour changes.
|
|
77
|
+
|
|
78
|
+
- **A label keeps its own direction in a right-to-left page.** The text an app puts in `u-tag`, `u-chip`, `u-option`,
|
|
79
|
+
`u-breadcrumb-item`, the trigger of a `u-select`, `u-button`, `u-menu-item`, `u-tree-item`, `u-checkbox`,
|
|
80
|
+
`u-radio`, `u-switch`, `u-tab`, `u-badge`, the text on a `u-divider`, the content over a `u-progress-bar` and the title of a `u-steps` item took the page's direction as its paragraph direction, so a run
|
|
81
|
+
of Latin letters ended up with its trailing punctuation at the wrong end (`Blue Harbor Co.` read `.Blue Harbor Co`).
|
|
82
|
+
Each label is now isolated and reads in its own order; where the component puts it (the start edge, the box's
|
|
83
|
+
alignment) does not change, and a left-to-right page renders exactly as before. The mechanism is one rule in the shared
|
|
84
|
+
base style, `bdi { unicode-bidi: plaintext }` — a `bdi` anywhere in a component's shadow tree now resolves its direction
|
|
85
|
+
from the rendered text, slotted or not (the browser default, `dir=auto`, does not look through a slot).
|
|
86
|
+
Only one-line labels are isolated; a content box (`u-card`, `u-panel`, `u-dialog`, `u-alert`, `u-expander`) holds
|
|
87
|
+
sentences and arbitrary markup and keeps following the page.
|
|
88
|
+
Migration: none — the extra `bdi` lives inside the shadow tree, so no consumer selector can reach it.
|
|
89
|
+
- **A number typed into `u-input type="number"` keeps its sign in front in a right-to-left page.** The field's inner input is
|
|
90
|
+
a text input (so the browser's own number handling does not apply), and in a right-to-left page it took the page as its
|
|
91
|
+
paragraph direction: `-1234.5` read `1234.5-`. The input is now left-to-right; only the alignment follows the page (the
|
|
92
|
+
digits still sit at the page's start edge, and the placeholder with them). A left-to-right page renders exactly as before.
|
|
93
|
+
`type="email"`, `url` and `tel` were measured and read correctly, so they are unchanged.
|
|
94
|
+
- **`parseNumber` and `u-input type="number"` read Arabic and Persian digits and separators.** On an `ar-EG` or `fa` page
|
|
95
|
+
the field wrote its decimal separator (`٫`) on blur but could not read it back: the number was lost the next time the field was
|
|
96
|
+
focused and left (`value` went empty and the field showed its invalid state), and a person typing `١٢٫٥` on an Arabic keyboard
|
|
97
|
+
got the same. `parseNumber` now reads the decimal digits of any script (Arabic-Indic `٠`–`٩`, Persian `۰`–`۹`, Bengali,
|
|
98
|
+
Devanagari, the full-width digits an East Asian IME types …), the Arabic decimal separator `٫` and the Arabic thousands
|
|
99
|
+
separator `٬`, and ignores the direction marks a formatted number can carry (`formatNumber` in Arabic puts one
|
|
100
|
+
before the minus sign). `value` is still a dot-decimal string; text that is not a number (including digit-like symbols such as
|
|
101
|
+
`①` or `½`) is still `null`, and text without any of these characters reads exactly as before.
|
|
102
|
+
- **A date written in a text field can be read back in every locale.** `formatDateText` and its date-time and period
|
|
103
|
+
siblings are documented as «the way `parseDate` reads it back», and `u-date-picker` / `u-date-range-picker` with
|
|
104
|
+
`format="locale"` rely on it, but in several locales they did not hold. `ar` put a right-to-left mark between the parts and
|
|
105
|
+
`ar-EG`, `ar-SA`, `fa` and `bn` wrote their own digits — `parseDate` read none of it, so a person who edited the date they saw
|
|
106
|
+
got a bad-input field and an empty `value`. `fa` and `th` wrote the Persian (1405) and Buddhist (2569) year, which
|
|
107
|
+
read back as the wrong year or not at all. The parsers (`parseDate`, `parseDateTime`, `parseDateRange`,
|
|
108
|
+
`parseDateTimeRange`) now read the digits of any script and ignore direction marks, and the text field is always
|
|
109
|
+
Gregorian, as `value` and the calendar next to the field are — `th` now writes `02/10/2026`, `fa` `۲۰۲۶/۱۰/۰۲`. The ISO
|
|
110
|
+
format and every locale that already wrote Latin digits in the Gregorian calendar (`en`, `ko`, `de`, `ja`, `he` …) are
|
|
111
|
+
unchanged; `dateTextPattern` follows (`th` → `DD/MM/YYYY`).
|
|
112
|
+
- **Form controls, `u-command-palette` and `u-rating` no longer log Lit's «scheduled an update after an update completed» in a development build.**
|
|
113
|
+
Three ordinary paths drew the element a second time and logged the warning in the console of every app: opening the command palette,
|
|
114
|
+
a form control clearing its error once the value became valid, and a `u-rating` whose value changed after a hover. The rating now
|
|
115
|
+
resets its hover preview before it draws, so that path is one draw. The palette and the form controls draw a second time for a reason
|
|
116
|
+
(the search it starts when opened, and the validity that the inner native control reports only after it is drawn), which is the
|
|
117
|
+
warning's own stated exception — they turn it off, with the reason in a comment.
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
## [3.1.0] - 2026-11-12
|
|
122
|
+
|
|
123
|
+
### Added
|
|
124
|
+
|
|
125
|
+
- **`compareText(a, b, locale?)` and `getCollator(locale?)` — one text order for tables and lists.** Digit runs
|
|
126
|
+
inside text compare as numbers (`A-2` before `A-10`, `9` before `10`), case and accents compare as the same letter (equal
|
|
127
|
+
rows keep their input order), and the locale is the app's `Locale.get()` (`<html lang>`, then the browser language, then
|
|
128
|
+
`en`) — not the browser default, so one app orders Hangul and Latin the same way for every user (`Locale.set('ko')` puts
|
|
129
|
+
Hangul first). One `Intl.Collator` is built per locale and reused; a malformed locale tag compares as English instead of
|
|
130
|
+
throwing. The table packages use it for their text columns.
|
|
131
|
+
|
|
132
|
+
### Fixed
|
|
133
|
+
|
|
134
|
+
- **`u-radio` no longer passes its own host as the `setValidity` anchor.** `ElementInternals.setValidity(flags,
|
|
135
|
+
message, anchor)` requires the anchor to be a shadow-including descendant of the element; the host is not one. Older
|
|
136
|
+
Chromium (the 120 generation) threw `NotFoundError` on every selection, and because the exception interrupted
|
|
137
|
+
validation before the event was dispatched, `change` never fired while `value` had already changed. The anchor is
|
|
138
|
+
now the radiogroup container, like every other form control. Current browsers accept the host, so they were not
|
|
139
|
+
affected.
|
|
140
|
+
|
|
141
|
+
### Documentation
|
|
142
|
+
|
|
143
|
+
- The README now states the browser floor: browsers that support `:state()` without the `--` prefix (Chrome and
|
|
144
|
+
Edge 125, Firefox 126, Safari 17.4). Below it, form controls throw on `states.add()` and styling that keys on
|
|
145
|
+
states does not apply. The skill overview carries the same line.
|
|
146
|
+
|
|
3
147
|
## [3.0.0] - 2026-11-11
|
|
4
148
|
|
|
5
149
|
### Changed (BREAKING — 3.0)
|
package/README.md
CHANGED
|
@@ -10,6 +10,13 @@ Lit 기반 웹 컴포넌트 라이브러리.
|
|
|
10
10
|
npm install @iyulab/components
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
## Browser support
|
|
14
|
+
|
|
15
|
+
지원 하한은 **`CustomStateSet` 의 `:state()` 를 `--` 접두 없이 지원하는 판**입니다 — Chrome · Edge 125, Firefox 126,
|
|
16
|
+
Safari 17.4 이상. 폼 컨트롤은 `:state(field)` 같은 상태를 `ElementInternals.states` 에 싣고 시트가 그 선택자로 모양을
|
|
17
|
+
정하므로, 그 아래 판(예: Chromium 120)에서는 `states.add('field')` 가 `--` 접두를 요구하며 던지고 스타일도 어긋납니다.
|
|
18
|
+
호환 shim 은 두지 않습니다 — 하한을 올리거나, 하한 아래가 꼭 필요하면 알려 주세요.
|
|
19
|
+
|
|
13
20
|
## Quick Start
|
|
14
21
|
|
|
15
22
|
아래 파일 하나가 그대로 돌아가는 첫 페이지입니다(Vite 기준 — `index.html` 이 `src/main.ts` 를 모듈로 싣는다).
|
|
@@ -270,6 +277,11 @@ Locale.register('nl', { valueMissing: '…' }); // 검증 메시지 overri
|
|
|
270
277
|
컴포넌트가 스스로 그리는 방향 글리프(셰브론)도 «이전» 과 «펼침» 이 읽는 방향을 가리키도록 뒤집힙니다 — `u-breadcrumb` 구분자 · `u-pagination` 과 `u-calendar` 의
|
|
271
278
|
이전/다음 · `u-expander` 와 `u-tree-item` 의 닫힘 표시 · `u-menu-item` 의 하위 메뉴 표시. 구분자(`separator`)나 펼침 아이콘(`expand-icon`) 슬롯으로 직접 넣은 글리프는 그린 그대로 둡니다.
|
|
272
279
|
|
|
280
|
+
앱이 넣은 **값**(원자적 데이터 — 이름 · 부품 번호 · 부호 붙은 수)은 페이지 방향에 끌려가지 않고 자기 글자의 방향으로 읽힙니다 — RTL 페이지의 `Blue Harbor Co.` 가 `.Blue Harbor Co` 로
|
|
281
|
+
뒤집히지 않습니다. `u-tag` · `u-chip` · `u-option` · `u-breadcrumb-item` · `u-button` · `u-menu-item` · `u-tree-item` · `u-checkbox` · `u-radio` · `u-switch` · `u-tab` · `u-badge` 의 한 줄 라벨 · `u-divider` 의 가운데 글 · `u-progress-bar` 위의 값과 `u-steps` 의 단계 제목 · `u-select` 닫힌 트리거의 값이 그렇고(섀도 안 `<bdi>` — 자리의 정렬은 그대로), 표 셀은
|
|
282
|
+
`flex-table` · `u-rich-table` · `u-simple-sheet` 가 같은 방식으로 합니다. **문장**(토스트 · 알림 본문 · 설명)은 페이지 방향을 따릅니다 — 문장 한가운데에 앱이 끼운 값은 앱이
|
|
283
|
+
`<bdi>` 로 감싸세요(`` `저장됨: <bdi>${name}</bdi>` ``).
|
|
284
|
+
|
|
273
285
|
### 네임스페이스 — 상위 패키지·앱의 문자열 (1.23.0~)
|
|
274
286
|
|
|
275
287
|
검증 메시지 키셋은 **닫혀 있습니다**(9키). 그 위에 자기 문자열을 담으려면 네임스페이스를
|
|
@@ -12,6 +12,17 @@ export declare class UElement extends LitElement {
|
|
|
12
12
|
*/
|
|
13
13
|
static forwardedAttributes: readonly string[];
|
|
14
14
|
static get observedAttributes(): string[];
|
|
15
|
+
/**
|
|
16
|
+
* **열거형 속성의 허용 값** — 속성 이름 → 허용하는 문자열 값 목록. 선언한 속성이 목록 밖의 값을 받으면 개발 모드에서
|
|
17
|
+
* 값(요소·속성·값 조합)당 한 번 `console.warn` 한다. 렌더 결과는 바꾸지 않는다.
|
|
18
|
+
*
|
|
19
|
+
* 템플릿의 속성 문자열은 타입 검사를 받지 않고, 목록 밖의 값은 어떤 스타일 규칙에도 안 걸려 **에러 없이 기본 모양으로
|
|
20
|
+
* 떨어진다**. 목록은 `enumeratedValues<유니온>()([...])` 로 적으면 유니온과의 일치를 컴파일러가 잰다. 비어 있거나(`undefined`
|
|
21
|
+
* · `null` · `''`) 문자열이 아닌 값은 판정하지 않는다. 하위 클래스가 더하려면 부모 것을 펼쳐 적는다(`{ ...super.enumerated, x }`).
|
|
22
|
+
*/
|
|
23
|
+
static enumerated: Readonly<Record<string, readonly string[]>>;
|
|
24
|
+
/** 선언한 열거형 속성의 현재 값이 목록 안인가 — 개발 모드에서만 부른다. */
|
|
25
|
+
private warnUnknownEnumerated;
|
|
15
26
|
attributeChangedCallback(name: string, old: string | null, value: string | null): void;
|
|
16
27
|
/** 연결된 동안의 로케일 구독 해제 함수 · 떨어질 때 본 로케일 판(다시 붙을 때 그 사이 바뀌었는가를 묻는다). */
|
|
17
28
|
private unsubscribeLocale?;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { styles } from "./UElement.styles.js";
|
|
2
2
|
import { Locale } from "../utilities/Locale.js";
|
|
3
|
+
import { devWarnOnce } from "../utilities/devWarning.js";
|
|
3
4
|
import { LitElement, render } from "lit";
|
|
4
5
|
// src/components/UElement.ts
|
|
5
6
|
/**
|
|
@@ -40,6 +41,18 @@ var UElement = class extends LitElement {
|
|
|
40
41
|
static get observedAttributes() {
|
|
41
42
|
return [...super.observedAttributes, ...this.forwardedAttributes];
|
|
42
43
|
}
|
|
44
|
+
static {
|
|
45
|
+
this.enumerated = {};
|
|
46
|
+
}
|
|
47
|
+
/** 선언한 열거형 속성의 현재 값이 목록 안인가 — 개발 모드에서만 부른다. */
|
|
48
|
+
warnUnknownEnumerated() {
|
|
49
|
+
const ctor = this.constructor;
|
|
50
|
+
for (const [prop, allowed] of Object.entries(ctor.enumerated)) {
|
|
51
|
+
const value = this[prop];
|
|
52
|
+
if (typeof value !== "string" || value === "" || allowed.includes(value)) continue;
|
|
53
|
+
devWarnOnce(`enum:${this.localName}:${prop}:${value}`, `<${this.localName} ${prop}="${value}"> — "${value}" is not a value of ${prop}, so no style rule matches it and the element renders as if ${prop} were unset. Use one of: ${allowed.join(", ")}.`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
43
56
|
attributeChangedCallback(name, old, value) {
|
|
44
57
|
super.attributeChangedCallback(name, old, value);
|
|
45
58
|
if (this.constructor.forwardedAttributes.includes(name)) this.requestUpdate();
|
|
@@ -58,6 +71,7 @@ var UElement = class extends LitElement {
|
|
|
58
71
|
super.disconnectedCallback();
|
|
59
72
|
}
|
|
60
73
|
performUpdate() {
|
|
74
|
+
if (process.env.NODE_ENV !== "production") this.warnUnknownEnumerated();
|
|
61
75
|
this.updating = true;
|
|
62
76
|
try {
|
|
63
77
|
super.performUpdate();
|
|
@@ -15,6 +15,10 @@ export type FloatingStrategy = 'absolute' | 'fixed';
|
|
|
15
15
|
* 스타일 훅으로 사용할 수 있습니다: `my-popover[anchor-hidden] { … }`
|
|
16
16
|
*/
|
|
17
17
|
export declare class UFloatingElement extends UElement {
|
|
18
|
+
/** 목록 밖의 값은 어떤 규칙에도 안 걸려 조용히 기본 모양이 된다 — 개발 모드에서 한 번 알린다(`UElement.enumerated`). */
|
|
19
|
+
static enumerated: {
|
|
20
|
+
strategy: readonly FloatingStrategy[];
|
|
21
|
+
};
|
|
18
22
|
static styles: CSSResultGroup;
|
|
19
23
|
/**
|
|
20
24
|
* 현재 엘리먼트가 보여지는지 여부입니다.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getParentElement, querySelectorAllWithin } from "../utilities/elements.js";
|
|
2
2
|
import { UElement } from "./UElement.js";
|
|
3
3
|
import { styles } from "./UFloatingElement.styles.js";
|
|
4
|
+
import { enumeratedValues } from "../utilities/enumerated.js";
|
|
4
5
|
import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/decorateMetadata.js";
|
|
5
6
|
import __decorate from "../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/decorate.js";
|
|
6
7
|
import { property, state } from "lit/decorators.js";
|
|
@@ -34,6 +35,12 @@ var UFloatingElement = class extends UElement {
|
|
|
34
35
|
this.floatingInternals = typeof this.attachInternals === "function" ? this.attachInternals() : void 0;
|
|
35
36
|
this.parkSeq = 0;
|
|
36
37
|
}
|
|
38
|
+
static {
|
|
39
|
+
this.enumerated = {
|
|
40
|
+
...super.enumerated,
|
|
41
|
+
strategy: enumeratedValues()(["absolute", "fixed"])
|
|
42
|
+
};
|
|
43
|
+
}
|
|
37
44
|
static {
|
|
38
45
|
this.styles = [super.styles, styles];
|
|
39
46
|
}
|
|
@@ -8,6 +8,10 @@ import { FieldDescriptionDisplay } from './field/UField.js';
|
|
|
8
8
|
export declare abstract class UFormControlElement<T> extends UElement {
|
|
9
9
|
static styles: CSSResultGroup;
|
|
10
10
|
static formAssociated: boolean;
|
|
11
|
+
/** 목록 밖의 값은 어떤 규칙에도 안 걸려 조용히 기본 모양이 된다 — 개발 모드에서 한 번 알린다(`UElement.enumerated`). 하위 컨트롤이 물려받는다. */
|
|
12
|
+
static enumerated: {
|
|
13
|
+
descriptionDisplay: readonly FieldDescriptionDisplay[];
|
|
14
|
+
};
|
|
11
15
|
/** 비활성 상태 */
|
|
12
16
|
disabled: boolean;
|
|
13
17
|
/**
|
|
@@ -66,17 +70,30 @@ export declare abstract class UFormControlElement<T> extends UElement {
|
|
|
66
70
|
*/
|
|
67
71
|
get validity(): ValidityState | undefined;
|
|
68
72
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
73
|
+
* `invalid` 일 때 보이는 오류 문구 — `u-field` 의 `validation-message` 와 같은 뜻이다.
|
|
74
|
+
*
|
|
75
|
+
* **읽으면** 지금 보일 문구다: 직접 준 문구가 있으면 그것, 없으면 `internals` 에 `setValidity()` 가 적어 둔 문구
|
|
76
|
+
* (ElementInternals 가 없으면 빈 문자열). **쓰면** 그 문구가 브라우저·컨트롤이 계산한 문구를 **대신**한다 — 칸마다
|
|
77
|
+
* 서버가 준 오류를 템플릿에서 선언형으로 줄 때 쓴다(`invalid` 와 함께). 비우면 계산된 문구로 돌아간다.
|
|
78
|
+
*
|
|
79
|
+
* ⚠문구만 바꾼다 — **유효한지 아닌지는 건드리지 않는다**(제출을 막지도 `invalid` 를 켜지도 않는다). 값이 틀렸다고
|
|
80
|
+
* 폼에 알리려면 `setCustomValidity()` 를 쓴다.
|
|
72
81
|
*/
|
|
73
82
|
get validationMessage(): string;
|
|
83
|
+
set validationMessage(value: string | null | undefined);
|
|
84
|
+
/** 직접 준 오류 문구(`validationMessage` 에 쓴 값). 비어 있으면 계산된 문구를 쓴다. */
|
|
85
|
+
private messageOverride;
|
|
74
86
|
/** `setCustomValidity()`로 주입된 커스텀 메시지. 비어있으면 커스텀 메시지가 없는 상태. */
|
|
75
87
|
private customMessage;
|
|
88
|
+
/** 첫 렌더 전에 들어온 `setCustomValidity()` — 안쪽 컨트롤이 아직 없어 첫 렌더 뒤에 반영한다. */
|
|
89
|
+
private customMessagePending;
|
|
76
90
|
/**
|
|
77
91
|
* 네이티브 `HTMLInputElement.setCustomValidity()`와 동일한 API입니다.
|
|
78
92
|
* 상태(및 `internals`)만 갱신할 뿐 화면은 건드리지 않는다 — UI 반영은 항상 `validate()`의 몫이다.
|
|
79
93
|
* 빈 문자열을 넘기면 해제되어 원래 자동 계산된 메시지로 돌아간다.
|
|
94
|
+
*
|
|
95
|
+
* 첫 렌더 전에 불러도 된다(`connectedCallback` 앞이어도) — 검증이 참조하는 안쪽 컨트롤이 아직 없으므로 문구만 받아 두고
|
|
96
|
+
* 첫 렌더 직후에 반영한다.
|
|
80
97
|
*/
|
|
81
98
|
setCustomValidity(message: string): void;
|
|
82
99
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UElement } from "./UElement.js";
|
|
2
2
|
import { styles } from "./UFormControlElement.styles.js";
|
|
3
|
+
import { enumeratedValues } from "../utilities/enumerated.js";
|
|
3
4
|
import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/decorateMetadata.js";
|
|
4
5
|
import __decorate from "../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/decorate.js";
|
|
5
6
|
import { property, state } from "lit/decorators.js";
|
|
@@ -15,6 +16,15 @@ var UFormControlElement = class extends UElement {
|
|
|
15
16
|
static {
|
|
16
17
|
this.formAssociated = true;
|
|
17
18
|
}
|
|
19
|
+
static {
|
|
20
|
+
this.enumerated = {
|
|
21
|
+
...super.enumerated,
|
|
22
|
+
descriptionDisplay: enumeratedValues()(["inline", "hint"])
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
static {
|
|
26
|
+
this.disableWarning?.("change-in-update");
|
|
27
|
+
}
|
|
18
28
|
/**
|
|
19
29
|
* 실제로 비활성인가 — 자기 `disabled` **또는** 조상 fieldset. 렌더·상호작용은 이것을 읽는다.
|
|
20
30
|
* 스타일은 같은 뜻의 표준 의사클래스 `:host(:disabled)` 를 쓴다(form-associated 요소는 둘 다에서 매칭된다).
|
|
@@ -48,20 +58,37 @@ var UFormControlElement = class extends UElement {
|
|
|
48
58
|
return this.internals?.validity;
|
|
49
59
|
}
|
|
50
60
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
61
|
+
* `invalid` 일 때 보이는 오류 문구 — `u-field` 의 `validation-message` 와 같은 뜻이다.
|
|
62
|
+
*
|
|
63
|
+
* **읽으면** 지금 보일 문구다: 직접 준 문구가 있으면 그것, 없으면 `internals` 에 `setValidity()` 가 적어 둔 문구
|
|
64
|
+
* (ElementInternals 가 없으면 빈 문자열). **쓰면** 그 문구가 브라우저·컨트롤이 계산한 문구를 **대신**한다 — 칸마다
|
|
65
|
+
* 서버가 준 오류를 템플릿에서 선언형으로 줄 때 쓴다(`invalid` 와 함께). 비우면 계산된 문구로 돌아간다.
|
|
66
|
+
*
|
|
67
|
+
* ⚠문구만 바꾼다 — **유효한지 아닌지는 건드리지 않는다**(제출을 막지도 `invalid` 를 켜지도 않는다). 값이 틀렸다고
|
|
68
|
+
* 폼에 알리려면 `setCustomValidity()` 를 쓴다.
|
|
54
69
|
*/
|
|
55
70
|
get validationMessage() {
|
|
56
|
-
return this.internals?.validationMessage
|
|
71
|
+
return this.messageOverride || this.internals?.validationMessage || "";
|
|
72
|
+
}
|
|
73
|
+
set validationMessage(value) {
|
|
74
|
+
const old = this.messageOverride;
|
|
75
|
+
this.messageOverride = value ?? "";
|
|
76
|
+
this.requestUpdate("validationMessage", old);
|
|
57
77
|
}
|
|
58
78
|
/**
|
|
59
79
|
* 네이티브 `HTMLInputElement.setCustomValidity()`와 동일한 API입니다.
|
|
60
80
|
* 상태(및 `internals`)만 갱신할 뿐 화면은 건드리지 않는다 — UI 반영은 항상 `validate()`의 몫이다.
|
|
61
81
|
* 빈 문자열을 넘기면 해제되어 원래 자동 계산된 메시지로 돌아간다.
|
|
82
|
+
*
|
|
83
|
+
* 첫 렌더 전에 불러도 된다(`connectedCallback` 앞이어도) — 검증이 참조하는 안쪽 컨트롤이 아직 없으므로 문구만 받아 두고
|
|
84
|
+
* 첫 렌더 직후에 반영한다.
|
|
62
85
|
*/
|
|
63
86
|
setCustomValidity(message) {
|
|
64
87
|
this.customMessage = message;
|
|
88
|
+
if (!this.hasUpdated) {
|
|
89
|
+
this.customMessagePending = true;
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
65
92
|
this.setValidity();
|
|
66
93
|
}
|
|
67
94
|
/**
|
|
@@ -87,7 +114,9 @@ var UFormControlElement = class extends UElement {
|
|
|
87
114
|
this.required = false;
|
|
88
115
|
this.invalid = false;
|
|
89
116
|
this.novalidate = false;
|
|
117
|
+
this.messageOverride = "";
|
|
90
118
|
this.customMessage = "";
|
|
119
|
+
this.customMessagePending = false;
|
|
91
120
|
this.quietCheck = false;
|
|
92
121
|
this.handleInvalid = (e) => {
|
|
93
122
|
if (this.quietCheck || !e.isTrusted) return;
|
|
@@ -146,6 +175,10 @@ var UFormControlElement = class extends UElement {
|
|
|
146
175
|
}
|
|
147
176
|
updated(changedProperties) {
|
|
148
177
|
super.updated(changedProperties);
|
|
178
|
+
if (this.customMessagePending) {
|
|
179
|
+
this.customMessagePending = false;
|
|
180
|
+
this.setValidity();
|
|
181
|
+
}
|
|
149
182
|
if (this.shouldValidate(changedProperties)) {
|
|
150
183
|
this.setValidity();
|
|
151
184
|
if (this.invalid && changedProperties.has("value") && this.internals) {
|
|
@@ -233,5 +266,14 @@ __decorate([property({
|
|
|
233
266
|
}), __decorateMetadata("design:type", Object)], UFormControlElement.prototype, "descriptionDisplay", void 0);
|
|
234
267
|
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UFormControlElement.prototype, "name", void 0);
|
|
235
268
|
__decorate([property(), __decorateMetadata("design:type", Object)], UFormControlElement.prototype, "value", void 0);
|
|
269
|
+
__decorate([
|
|
270
|
+
property({
|
|
271
|
+
type: String,
|
|
272
|
+
attribute: "validation-message",
|
|
273
|
+
noAccessor: true
|
|
274
|
+
}),
|
|
275
|
+
__decorateMetadata("design:type", String),
|
|
276
|
+
__decorateMetadata("design:paramtypes", [])
|
|
277
|
+
], UFormControlElement.prototype, "validationMessage", null);
|
|
236
278
|
__decorate([state(), __decorateMetadata("design:type", Object)], UFormControlElement.prototype, "hasSlottedLabel", void 0);
|
|
237
279
|
export { UFormControlElement };
|
|
@@ -12,6 +12,10 @@ export type OverlayMode = 'modal' | 'non-modal';
|
|
|
12
12
|
* @event hide - 오버레이가 숨겨지기 직전 발생합니다. 핸들러에서 취소하면 닫히지 않습니다.
|
|
13
13
|
*/
|
|
14
14
|
export declare abstract class UOverlayElement extends UElement {
|
|
15
|
+
/** 목록 밖의 값은 어떤 규칙에도 안 걸려 조용히 기본 모양이 된다 — 개발 모드에서 한 번 알린다(`UElement.enumerated`). */
|
|
16
|
+
static enumerated: {
|
|
17
|
+
mode: readonly OverlayMode[];
|
|
18
|
+
};
|
|
15
19
|
static styles: CSSResultGroup;
|
|
16
20
|
/**
|
|
17
21
|
* 열림/닫힘 상태
|
|
@@ -4,6 +4,7 @@ import { arrayAttrConverter } from "../utilities/converters.js";
|
|
|
4
4
|
import { HostAria, nameFromSlot } from "../utilities/hostAria.js";
|
|
5
5
|
import { UElement } from "./UElement.js";
|
|
6
6
|
import { styles } from "./UOverlayElement.styles.js";
|
|
7
|
+
import { enumeratedValues } from "../utilities/enumerated.js";
|
|
7
8
|
import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/decorateMetadata.js";
|
|
8
9
|
import __decorate from "../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/decorate.js";
|
|
9
10
|
import { property } from "lit/decorators.js";
|
|
@@ -32,6 +33,12 @@ var UOverlayElement = class extends UElement {
|
|
|
32
33
|
if (e.composedPath()[0] === this) this.requestClose("backdrop");
|
|
33
34
|
};
|
|
34
35
|
}
|
|
36
|
+
static {
|
|
37
|
+
this.enumerated = {
|
|
38
|
+
...super.enumerated,
|
|
39
|
+
mode: enumeratedValues()(["modal", "non-modal"])
|
|
40
|
+
};
|
|
41
|
+
}
|
|
35
42
|
static {
|
|
36
43
|
this.styles = [super.styles, styles];
|
|
37
44
|
}
|
|
@@ -37,6 +37,10 @@ export type AlertAppearance = "soft" | "outlined";
|
|
|
37
37
|
* @event hide - Alert가 닫히기 직전 발생 (취소 가능)
|
|
38
38
|
*/
|
|
39
39
|
export declare class UAlert extends UElement {
|
|
40
|
+
/** 목록 밖의 값은 어떤 규칙에도 안 걸려 조용히 기본 모양이 된다 — 개발 모드에서 한 번 알린다(`UElement.enumerated`). */
|
|
41
|
+
static enumerated: {
|
|
42
|
+
appearance: readonly AlertAppearance[];
|
|
43
|
+
};
|
|
40
44
|
static styles: import('lit').CSSResultGroup[];
|
|
41
45
|
/** 표시 여부 */
|
|
42
46
|
open: boolean;
|
|
@@ -6,6 +6,7 @@ import { Locale } from "../../utilities/Locale.js";
|
|
|
6
6
|
import { devWarnOnce } from "../../utilities/devWarning.js";
|
|
7
7
|
import { HostAria } from "../../utilities/hostAria.js";
|
|
8
8
|
import { delegate } from "../../utilities/listenInShadow.js";
|
|
9
|
+
import { enumeratedValues } from "../../utilities/enumerated.js";
|
|
9
10
|
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/decorateMetadata.js";
|
|
10
11
|
import __decorate from "../../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/decorate.js";
|
|
11
12
|
import { html } from "lit";
|
|
@@ -43,6 +44,12 @@ var UAlert = class UAlert extends UElement {
|
|
|
43
44
|
this.floating = false;
|
|
44
45
|
this.aria = new HostAria(this);
|
|
45
46
|
}
|
|
47
|
+
static {
|
|
48
|
+
this.enumerated = {
|
|
49
|
+
...super.enumerated,
|
|
50
|
+
appearance: enumeratedValues()(["soft", "outlined"])
|
|
51
|
+
};
|
|
52
|
+
}
|
|
46
53
|
static {
|
|
47
54
|
this.styles = [super.styles, styles];
|
|
48
55
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { UElement } from '../UElement.js';
|
|
2
|
+
/** `u-auto-scroll` 의 움직임 — `continuous` 흐름 · `item` 한 항목씩. */
|
|
3
|
+
export type AutoScrollMode = 'continuous' | 'item';
|
|
2
4
|
/**
|
|
3
5
|
* 넘치는 내용을 스스로 천천히 굴리는 상자 — 아무도 손대지 않는 화면(벽걸이 보드, 키오스크)에서 한 화면보다 긴 목록을
|
|
4
6
|
* 끝까지 보이게 한다.
|
|
@@ -19,9 +21,11 @@ import { UElement } from '../UElement.js';
|
|
|
19
21
|
*
|
|
20
22
|
* @slot - 굴릴 내용
|
|
21
23
|
*/
|
|
22
|
-
/** `u-auto-scroll` 의 움직임 — `continuous` 흐름 · `item` 한 항목씩. */
|
|
23
|
-
export type AutoScrollMode = 'continuous' | 'item';
|
|
24
24
|
export declare class UAutoScroll extends UElement {
|
|
25
|
+
/** 목록 밖의 값은 어떤 규칙에도 안 걸려 조용히 기본 모양이 된다 — 개발 모드에서 한 번 알린다(`UElement.enumerated`). */
|
|
26
|
+
static enumerated: {
|
|
27
|
+
mode: readonly AutoScrollMode[];
|
|
28
|
+
};
|
|
25
29
|
static styles: import('lit').CSSResultGroup[];
|
|
26
30
|
/** 움직임 — `continuous`(기본 — 끝까지 흐른다) · `item`(한 항목씩 넘기고 `pause` 만큼 멈춘다) */
|
|
27
31
|
mode: AutoScrollMode;
|
|
@@ -2,6 +2,7 @@ import { UElement } from "../UElement.js";
|
|
|
2
2
|
import { HostAria } from "../../utilities/hostAria.js";
|
|
3
3
|
import { styles } from "./UAutoScroll.styles.js";
|
|
4
4
|
import { UNATTENDED_IDLE_MS } from "../../utilities/unattended.js";
|
|
5
|
+
import { enumeratedValues } from "../../utilities/enumerated.js";
|
|
5
6
|
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/decorateMetadata.js";
|
|
6
7
|
import __decorate from "../../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/decorate.js";
|
|
7
8
|
import { html } from "lit";
|
|
@@ -88,6 +89,12 @@ var UAutoScroll = class UAutoScroll extends UElement {
|
|
|
88
89
|
if (!this.contains(e.relatedTarget)) this.focused = false;
|
|
89
90
|
};
|
|
90
91
|
}
|
|
92
|
+
static {
|
|
93
|
+
this.enumerated = {
|
|
94
|
+
...super.enumerated,
|
|
95
|
+
mode: enumeratedValues()(["continuous", "item"])
|
|
96
|
+
};
|
|
97
|
+
}
|
|
91
98
|
static {
|
|
92
99
|
this.styles = [super.styles, styles];
|
|
93
100
|
}
|
|
@@ -9,6 +9,10 @@ export type AvatarShape = "circle" | "square" | "rounded";
|
|
|
9
9
|
* @csspart label - 이니셜 라벨 텍스트 요소
|
|
10
10
|
*/
|
|
11
11
|
export declare class UAvatar extends UElement {
|
|
12
|
+
/** 목록 밖의 값은 어떤 규칙에도 안 걸려 조용히 기본 모양이 된다 — 개발 모드에서 한 번 알린다(`UElement.enumerated`). */
|
|
13
|
+
static enumerated: {
|
|
14
|
+
shape: readonly AvatarShape[];
|
|
15
|
+
};
|
|
12
16
|
static styles: import('lit').CSSResultGroup[];
|
|
13
17
|
/** 아바타 형태 */
|
|
14
18
|
shape: AvatarShape;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
2
|
import { styles } from "./UAvatar.styles.js";
|
|
3
|
+
import { enumeratedValues } from "../../utilities/enumerated.js";
|
|
3
4
|
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/decorateMetadata.js";
|
|
4
5
|
import __decorate from "../../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/decorate.js";
|
|
5
6
|
import { html } from "lit";
|
|
@@ -11,6 +12,16 @@ var UAvatar = class UAvatar extends UElement {
|
|
|
11
12
|
this.shape = "circle";
|
|
12
13
|
this.outline = false;
|
|
13
14
|
}
|
|
15
|
+
static {
|
|
16
|
+
this.enumerated = {
|
|
17
|
+
...super.enumerated,
|
|
18
|
+
shape: enumeratedValues()([
|
|
19
|
+
"circle",
|
|
20
|
+
"square",
|
|
21
|
+
"rounded"
|
|
22
|
+
])
|
|
23
|
+
};
|
|
24
|
+
}
|
|
14
25
|
static {
|
|
15
26
|
this.styles = [super.styles, styles];
|
|
16
27
|
}
|
|
@@ -15,6 +15,12 @@ export type BadgeAnchor = "top-right" | "top-left" | "bottom-right" | "bottom-le
|
|
|
15
15
|
* @cssprop --badge-padding-inline - 가로 여백 (`shape="dot"` 은 콘텐츠를 렌더하지 않아 적용되지 않는다)
|
|
16
16
|
*/
|
|
17
17
|
export declare class UBadge extends UElement {
|
|
18
|
+
/** 목록 밖의 값은 어떤 규칙에도 안 걸려 조용히 기본 모양이 된다 — 개발 모드에서 한 번 알린다(`UElement.enumerated`). */
|
|
19
|
+
static enumerated: {
|
|
20
|
+
shape: readonly BadgeShape[];
|
|
21
|
+
color: readonly BadgeColor[];
|
|
22
|
+
anchor: readonly BadgeAnchor[];
|
|
23
|
+
};
|
|
18
24
|
static styles: import('lit').CSSResultGroup[];
|
|
19
25
|
/** 접두 · 접미 슬롯이 찼는가 — 그 옆 간격은 섀도 안 상자가 갖는다(`::slotted` 여백은 문서의 전역 리셋에 진다). */
|
|
20
26
|
private readonly affixes;
|