@iyulab/components 1.0.0 → 1.0.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 +171 -170
- package/dist/components/icon/UIcon.js +1 -0
- package/dist/components/icon/UIcon.styles.js +0 -1
- package/dist/components/radio/URadio.js +3 -2
- package/dist/components/select/USelect.js +3 -2
- package/dist/components/textarea/UTextarea.d.ts +1 -1
- package/dist/components/textarea/UTextarea.js +8 -5
- package/dist/components/textarea/UTextarea.styles.js +8 -1
- package/dist/utilities/Dialog.js +3 -3
- package/dist/utilities/Toast.js +1 -1
- package/package.json +8 -5
- package/skills/iyulab-components/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,200 +1,201 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 1.0.
|
|
4
|
-
|
|
5
|
-
###
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- `
|
|
16
|
-
- `
|
|
17
|
-
- `
|
|
18
|
-
- `
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- `u-rating`
|
|
24
|
-
- `
|
|
25
|
-
- `
|
|
26
|
-
- `
|
|
27
|
-
- `
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
### Documentation
|
|
40
|
-
|
|
41
|
-
- `skills/iyulab-components/` — full agent skill added with 39 component references, 9 utility references, and 5 extension references
|
|
42
|
-
- `docs/` — developer documentation added (architecture, guidelines, events, theming, form-controls, icons)
|
|
3
|
+
## [1.0.2] - 2026-04-07
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- `Toast`: Fixed toast not being removed from DOM after hide — changed event listener from `'u-hide'` to `'hide'` to match actual event dispatched by `UAlert`
|
|
7
|
+
- `Dialog`: Fixed dialog promise never resolving after close — changed event listener from `'u-hide'` to `'hide'` to match actual event dispatched by `UOverlayElement`
|
|
8
|
+
|
|
9
|
+
## [1.0.1] - 2026-04-01
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- `@lit/react` moved from `dependencies` to optional `peerDependencies`
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- `UIcon`: Auto-apply `fill="currentColor"` only for fill-based icons; skip when `stroke="currentColor"` is present. Removed global `fill: currentColor` CSS rule
|
|
16
|
+
- `URadio` / `USelect`: `options` field is now a `@state()` so the UI re-renders when options change; `onChangeValue()` now triggers on both `value` and `options` changes
|
|
17
|
+
- `UTextarea`: Replaced `all: unset` with explicit CSS reset for better cross-browser compatibility; height recalculation moved inside `requestAnimationFrame` to stabilize auto-resize
|
|
18
|
+
- `Dialog`: Fixed `prompt()` input not capturing user text — switched to property binding (`.value`) and native `@input` event
|
|
19
|
+
|
|
20
|
+
## [1.0.0] - 2026-04-01
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- New components: `u-avatar`, `u-badge`, `u-breadcrumb` / `u-breadcrumb-item`, `u-chip`, `u-field`, `u-icon-button`, `u-option`, `u-panel`, `u-radio`, `u-rating`, `u-select`, `u-slider`, `u-switch`, `u-tab` / `u-tab-panel`
|
|
24
|
+
- `Toast` utility: semantic API replacing `Notifier.toast()` — `Toast.show()`, `Toast.success()`, `Toast.error()`, etc.
|
|
25
|
+
- `Dialog` utility: imperative API — `Dialog.confirm()`, `Dialog.prompt()`, etc.
|
|
26
|
+
- `OverlayManager`: built-in overlay stack management and ESC key handling
|
|
27
|
+
- `icons.ts`: full rewrite of `IconRegistry` with bundled SVG support via Vite `import.meta.glob` and built-in CDN resolvers for Tabler, Heroicons, Lucide, and Bootstrap Icons
|
|
28
|
+
- Vite plugins: `vite-plugin-glob-resolve` and `vite-plugin-react-wrapper` for automatic React wrapper generation
|
|
29
|
+
- `skills/iyulab-components/` agent skill with 39 component references, 9 utility references, and 5 extension references
|
|
30
|
+
- `docs/` developer documentation (architecture, guidelines, events, theming, form-controls, icons)
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
- **Breaking:** Removed `U`-prefixed event types (`UChangeEvent`, `UInputEvent`, `UShowEvent`, `UHideEvent`, `USelectEvent`, `UResizeEvent`) — replaced with `ShowEvent`, `HideEvent`, `PickEvent`, `CheckEvent`, `ExpandEvent`, `CollapseEvent`, `NavigateEvent`, `RemoveEvent`, `ShiftEvent`
|
|
34
|
+
- **Breaking:** `Notifier` replaced by `Toast`; `IconRegistry` rewritten as `icons.ts` — existing API is not compatible, migration required
|
|
35
|
+
- **Breaking:** `UModalElement` removed — merged into `UOverlayElement`; extend `UOverlayElement` instead
|
|
36
|
+
- Heavy components extract render logic into a separate `U<Name>.component.ts` file
|
|
37
|
+
- `converters.ts` extended with additional type conversion utilities
|
|
43
38
|
- `README.md` overhauled with Agent Skills installation guide
|
|
44
39
|
|
|
45
|
-
|
|
40
|
+
## [0.4.0] - 2026-03-02
|
|
46
41
|
|
|
47
|
-
|
|
42
|
+
### Added
|
|
43
|
+
- `UJsonElement`: new base class that reads JSON from a `<script type="application/json">` tag in light DOM and maps properties to the component automatically; includes built-in error UI (`error()` method) and `buildHTML()` static helper
|
|
44
|
+
- `sanitizers.ts` utility: `stripZeroWidth()`, `escapeHtmlText()`, `escapeHtmlAttr()`, `escapeHtmlHref()` for HTML/XSS protection
|
|
45
|
+
- New icon assets: `arrow-down-up`, `code-slash`, `download`, `sort-alpha-down`, `sort-alpha-up`
|
|
48
46
|
|
|
49
|
-
###
|
|
50
|
-
- **BaseElement
|
|
51
|
-
- All components updated to use the renamed base classes
|
|
47
|
+
### Changed
|
|
48
|
+
- **Breaking:** `BaseElement`, `FloatingElement`, `ModalElement` renamed to `UElement`, `UFloatingElement`, `UModalElement` — all components updated accordingly
|
|
52
49
|
|
|
53
|
-
###
|
|
54
|
-
-
|
|
55
|
-
- Includes built-in error UI rendering via `error()` method
|
|
56
|
-
- Provides static `buildHTML()` helper to generate safe component HTML from JSON data
|
|
57
|
-
- **Icons**: Added new icon assets
|
|
58
|
-
- `arrow-down-up`, `code-slash`, `download`, `sort-alpha-down`, `sort-alpha-up`
|
|
50
|
+
### Fixed
|
|
51
|
+
- `UCarousel`: Fixed tap vs drag detection — pointer target is tracked to dispatch a `click` event on tap when drag distance is below threshold
|
|
59
52
|
|
|
60
|
-
|
|
61
|
-
- **sanitizers.ts**: Added HTML/XSS protection utilities
|
|
62
|
-
- `stripZeroWidth()`: Removes zero-width characters (ZWSP, BOM, etc.)
|
|
63
|
-
- `escapeHtmlText()`: Escapes special characters for HTML text context
|
|
64
|
-
- `escapeHtmlAttr()`: Escapes special characters for HTML attribute context
|
|
65
|
-
- `escapeHtmlHref()`: Sanitizes and validates `href`/`src` values (blocks `javascript:`, `data:`, `vbscript:` protocols)
|
|
53
|
+
## [0.3.0] - 2026-02-26
|
|
66
54
|
|
|
67
|
-
###
|
|
68
|
-
-
|
|
55
|
+
### Added
|
|
56
|
+
- `UCard`: card layout component with `header`, `footer`, `media` slots
|
|
57
|
+
- `UCarousel`: carousel component with autoplay, drag, navigation, and multi-slide view
|
|
69
58
|
|
|
70
|
-
|
|
59
|
+
### Changed
|
|
60
|
+
- Moved `@lit/react` and `react` to optional `peerDependencies`
|
|
61
|
+
- Updated devDependencies
|
|
71
62
|
|
|
72
|
-
|
|
73
|
-
- **UCard**: Added card layout component with `header`, `footer`, `media` slots
|
|
74
|
-
- **UCarousel**: Added carousel component with autoplay, drag, navigation, multi-slide view
|
|
63
|
+
## [0.2.3] - 2026-02-09
|
|
75
64
|
|
|
76
|
-
###
|
|
77
|
-
-
|
|
78
|
-
- Updated devDependencies
|
|
65
|
+
### Added
|
|
66
|
+
- `UInput`: `inputmode`, `enterkeyhint`, `size`, `multiple` properties for improved mobile UX and HTML standard compliance (#4)
|
|
79
67
|
|
|
80
|
-
## 0.2.
|
|
81
|
-
|
|
82
|
-
###
|
|
83
|
-
-
|
|
84
|
-
|
|
85
|
-
## 0.2.
|
|
86
|
-
|
|
87
|
-
###
|
|
88
|
-
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
- **
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
- **Icons**: Added new icon assets
|
|
115
|
-
- `arrow-repeat`, `box-arrow-up-right`, `file-earmark`, `flag`, `globe`
|
|
116
|
-
- `hand-thumbs-up`, `hand-thumbs-up-fill`, `hand-thumbs-down`, `hand-thumbs-down-fill`
|
|
117
|
-
- `share`, `stop-circle`, `tools`
|
|
118
|
-
- **Utilities**: Added new utility functions
|
|
119
|
-
- `converters.ts`: `arrayAttrConverter()` for array attribute conversion
|
|
120
|
-
- `elements.ts`: DOM helper functions (`getParentElement`, `querySelectorWithin`, `querySelectorAllWithin`)
|
|
121
|
-
|
|
122
|
-
### Improvements
|
|
123
|
-
- **FloatingElement**: Enhanced positioning and anchor management logic
|
|
124
|
-
- **UButton**: Improved click event handling for disabled and loading states
|
|
125
|
-
- **UDialog/UDrawer**: Updated to use improved modal element patterns
|
|
126
|
-
- **UMenu**: Refactored submenu handling and dropdown logic
|
|
127
|
-
- **IconRegistry**: Reorganized and improved icon loading architecture
|
|
128
|
-
- **Utilities**: Moved internal utilities to public utilities directory
|
|
129
|
-
- `internals/attribute-converters.ts` → `utilities/converters.ts`
|
|
130
|
-
- `internals/node-helpers.ts` → `utilities/elements.ts`
|
|
131
|
-
- `utilities/icons.ts` → `utilities/IconRegistry.ts`
|
|
132
|
-
|
|
133
|
-
## 0.1.11 (2026-01-06)
|
|
134
|
-
|
|
135
|
-
### Fixes
|
|
136
|
-
- Fixed d.ts generation error for `Theme` class by exporting the class
|
|
68
|
+
## [0.2.2] - 2026-02-09
|
|
69
|
+
|
|
70
|
+
### Added
|
|
71
|
+
- `UInput`: `min`, `max`, `step` properties for number/date/time input types (#1)
|
|
72
|
+
|
|
73
|
+
## [0.2.1] - 2026-02-09
|
|
74
|
+
|
|
75
|
+
### Added
|
|
76
|
+
- Events documentation: complete event API reference with all `u-*` events, detail types, and usage examples (#3)
|
|
77
|
+
- CSS Custom Properties reference: full `--u-*` variable list with light/dark values (#2)
|
|
78
|
+
- Theming guide: setup, switching, and external design system integration
|
|
79
|
+
- Component list with tags and descriptions
|
|
80
|
+
|
|
81
|
+
## [0.2.0] - 2026-01-16
|
|
82
|
+
|
|
83
|
+
### Added
|
|
84
|
+
- `UTag`: tag component for labels, categories, and status; variants: `default`, `info`, `success`, `warning`, `danger`; removable with animation; prefix/suffix slots
|
|
85
|
+
- `UButton`: `variant` property with `default`, `borderless`, and `link` styles
|
|
86
|
+
- `UTooltip`: `interactive` property for keeping tooltip open on hover
|
|
87
|
+
- New icon assets: `arrow-repeat`, `box-arrow-up-right`, `file-earmark`, `flag`, `globe`, `hand-thumbs-up`, `hand-thumbs-up-fill`, `hand-thumbs-down`, `hand-thumbs-down-fill`, `share`, `stop-circle`, `tools`
|
|
88
|
+
- `converters.ts`: `arrayAttrConverter()` for array attribute conversion
|
|
89
|
+
- `elements.ts`: DOM helpers — `getParentElement`, `querySelectorWithin`, `querySelectorAllWithin`
|
|
90
|
+
|
|
91
|
+
### Changed
|
|
92
|
+
- **Breaking:** `IconRegistry` changed from singleton instance to static class (use `IconRegistry.register()` instead of `icons.register()`)
|
|
93
|
+
- **Breaking:** `Notifier` changed from singleton instance to static class (use `Notifier.toast()` instead of `notifier.toast()`)
|
|
94
|
+
- **Breaking:** `Theme` changed from singleton instance to static class (use `Theme.init()` instead of `theme.init()`)
|
|
95
|
+
- **Breaking:** `UIconButton` removed — use `UButton` with icon slot instead
|
|
96
|
+
- `FloatingElement`: enhanced positioning and anchor management logic
|
|
97
|
+
- `UButton`: improved click event handling for disabled and loading states
|
|
98
|
+
- `UDialog` / `UDrawer`: updated to use improved modal element patterns
|
|
99
|
+
- `UMenu`: refactored submenu handling and dropdown logic
|
|
100
|
+
- `IconRegistry`: reorganized and improved icon loading architecture
|
|
101
|
+
- Internal utilities moved to public: `internals/attribute-converters.ts` → `utilities/converters.ts`, `internals/node-helpers.ts` → `utilities/elements.ts`, `utilities/icons.ts` → `utilities/IconRegistry.ts`
|
|
137
102
|
|
|
138
|
-
|
|
139
|
-
- **UTreeItem**: Added `loading` property with spinner indicator
|
|
140
|
-
- **UTreeItem**: Added MutationObserver for dynamic child loading support
|
|
141
|
-
- **UMenuItem**: Added `loading` property with spinner indicator
|
|
103
|
+
## [0.1.11] - 2026-01-06
|
|
142
104
|
|
|
143
|
-
###
|
|
144
|
-
-
|
|
145
|
-
-
|
|
146
|
-
- **UMenu/UMenuItem**: Refactored submenu handling logic
|
|
147
|
-
- **UTreeItem**: Improved children slot handling with `processChildren` method
|
|
148
|
-
- **UTreeItem**: Changed indent styling to use CSS custom property (`--indent-level`)
|
|
105
|
+
### Added
|
|
106
|
+
- `UTreeItem`: `loading` property with spinner indicator and `MutationObserver` for dynamic child loading
|
|
107
|
+
- `UMenuItem`: `loading` property with spinner indicator
|
|
149
108
|
|
|
150
|
-
|
|
109
|
+
### Changed
|
|
110
|
+
- `UDivider`: simplified component (removed movable functionality)
|
|
111
|
+
- `USplitPanel`: completely rewritten with native splitter implementation
|
|
112
|
+
- `UMenu` / `UMenuItem`: refactored submenu handling logic
|
|
113
|
+
- `UTreeItem`: improved children slot handling with `processChildren` method; indent styling now uses CSS custom property (`--indent-level`)
|
|
114
|
+
|
|
115
|
+
### Fixed
|
|
116
|
+
- Fixed d.ts generation error for `Theme` class by exporting the class
|
|
117
|
+
|
|
118
|
+
## [0.1.10] - 2025-12-19
|
|
119
|
+
|
|
120
|
+
### Fixed
|
|
151
121
|
- Fixed circular dependency issue between `UMenu` and `UMenuItem`
|
|
152
|
-
-
|
|
122
|
+
- `UMenuItem` now uses tag name check instead of `instanceof` for submenu detection
|
|
123
|
+
|
|
124
|
+
## [0.1.9] - 2025-12-19
|
|
153
125
|
|
|
154
|
-
|
|
155
|
-
-
|
|
126
|
+
### Added
|
|
127
|
+
- `Tree` and `TreeItem` components for hierarchical data display
|
|
156
128
|
- Updated React wrapper plugin to support new file structure
|
|
129
|
+
|
|
130
|
+
### Removed
|
|
157
131
|
- Removed `CopyButton` component
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
|
|
176
|
-
|
|
132
|
+
|
|
133
|
+
### Changed
|
|
134
|
+
- React wrapper output directory changed to `react-components`
|
|
135
|
+
|
|
136
|
+
## [0.1.8] - 2025-12-18
|
|
137
|
+
|
|
138
|
+
### Changed
|
|
139
|
+
- **Breaking:** Added `U` prefix to all component class names (e.g., `Alert` → `UAlert`)
|
|
140
|
+
- **Breaking:** File naming convention changed: `{Name}.ts` → `U{Name}.component.ts`, `{Name}.styles.ts` → `U{Name}.styles.ts`, `index.ts` → `U{Name}.ts`
|
|
141
|
+
|
|
142
|
+
## [0.1.7] - 2025-12-12
|
|
143
|
+
|
|
144
|
+
### Added
|
|
145
|
+
- `FloatingElement` base class for shared popover and tooltip logic
|
|
146
|
+
- `ModalElement` base class for shared dialog and drawer logic
|
|
147
|
+
- `Drawer` component
|
|
148
|
+
- `Skeleton` component
|
|
149
|
+
|
|
150
|
+
### Changed
|
|
151
|
+
- `Menu`: improved with dropdown, context menu, and submenu support
|
|
152
|
+
- `Dialog`: refactored to extend `ModalElement`
|
|
153
|
+
|
|
154
|
+
### Removed
|
|
155
|
+
- Removed `ContextMenu` and `DropdownMenu` — functionality merged into `Menu`
|
|
156
|
+
|
|
157
|
+
## [0.1.5] - 2025-12-10
|
|
158
|
+
|
|
159
|
+
### Changed
|
|
177
160
|
- Improved `Icon` component and refactored icon utilities
|
|
178
161
|
- Improved `Input` component styles and validation
|
|
179
162
|
- Improved `Tooltip`, `Divider`, `SplitPanel` components
|
|
180
163
|
- Improved `notifier` utility
|
|
181
|
-
- Removed `Panel` component
|
|
182
164
|
- Updated theme styles (light/dark)
|
|
183
165
|
|
|
184
|
-
|
|
185
|
-
-
|
|
166
|
+
### Removed
|
|
167
|
+
- Removed `Panel` component
|
|
168
|
+
|
|
169
|
+
## [0.1.4] - 2025-12-05
|
|
170
|
+
|
|
171
|
+
### Fixed
|
|
172
|
+
- Fixed miscellaneous issues
|
|
173
|
+
|
|
174
|
+
## [0.1.3] - 2025-11-17
|
|
175
|
+
|
|
176
|
+
### Added
|
|
177
|
+
- `ProgressBar` component for displaying top-of-page loading progress
|
|
178
|
+
|
|
179
|
+
### Fixed
|
|
180
|
+
- Fixed theme `useBuiltIn` option not working as expected
|
|
181
|
+
|
|
182
|
+
## [0.1.2] - 2025-11-13
|
|
183
|
+
|
|
184
|
+
### Fixed
|
|
185
|
+
- Fixed a type issue in `theme` utility
|
|
186
|
+
|
|
187
|
+
## [0.1.1] - 2025-11-13
|
|
188
|
+
|
|
189
|
+
### Added
|
|
190
|
+
- `BrowserStorage` utility supporting `localStorage` and `cookie` with async get/set/remove methods
|
|
186
191
|
|
|
187
|
-
|
|
188
|
-
-
|
|
189
|
-
- added `ProgressBar` component to show loading progress at the top of the page.
|
|
192
|
+
### Changed
|
|
193
|
+
- Theme `persist` option renamed to `store`
|
|
190
194
|
|
|
191
|
-
|
|
192
|
-
-
|
|
195
|
+
### Removed
|
|
196
|
+
- Removed `toggle` method from theme utility
|
|
193
197
|
|
|
194
|
-
## 0.1.
|
|
195
|
-
- added `BrowserStorage` which supports `localStorage` and `cookie` with async methods for getting, setting, and removing items.
|
|
196
|
-
- changed theme `persist` option to `store` option, and fixed some issues.
|
|
197
|
-
- removed `toggle` method from theme utility.
|
|
198
|
+
## [0.1.0] - 2025-11-12
|
|
198
199
|
|
|
199
|
-
|
|
200
|
-
- Initial
|
|
200
|
+
### Added
|
|
201
|
+
- Initial release
|
|
@@ -42,6 +42,7 @@ var UIcon = class UIcon extends UElement {
|
|
|
42
42
|
const svg = doc.documentElement;
|
|
43
43
|
if (svg?.tagName.toLowerCase() !== "svg") return void 0;
|
|
44
44
|
svg.setAttribute("part", "svg");
|
|
45
|
+
if (svg.getAttribute("stroke") !== "currentColor") svg.setAttribute("fill", "currentColor");
|
|
45
46
|
return svg.outerHTML;
|
|
46
47
|
} catch {
|
|
47
48
|
return;
|
|
@@ -4,7 +4,7 @@ import { UFormControlElement } from "../UFormControlElement.js";
|
|
|
4
4
|
import "../field/UField.js";
|
|
5
5
|
import { UOption } from "../option/UOption.js";
|
|
6
6
|
import { styles } from "./URadio.styles.js";
|
|
7
|
-
import { customElement, property } from "lit/decorators.js";
|
|
7
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
8
8
|
import { html } from "lit";
|
|
9
9
|
//#region src/components/radio/URadio.ts
|
|
10
10
|
var URadio = class URadio extends UFormControlElement {
|
|
@@ -76,7 +76,7 @@ var URadio = class URadio extends UFormControlElement {
|
|
|
76
76
|
if (this.disabled) option.disabled = true;
|
|
77
77
|
if (this.readonly) option.disabled = true;
|
|
78
78
|
});
|
|
79
|
-
if (changedProperties.has(
|
|
79
|
+
if (["value", "options"].some((k) => changedProperties.has(k))) this.onChangeValue();
|
|
80
80
|
}
|
|
81
81
|
render() {
|
|
82
82
|
return html`
|
|
@@ -146,6 +146,7 @@ __decorate([property({
|
|
|
146
146
|
type: String,
|
|
147
147
|
reflect: true
|
|
148
148
|
}), __decorateMetadata("design:type", Object)], URadio.prototype, "orientation", void 0);
|
|
149
|
+
__decorate([state(), __decorateMetadata("design:type", Array)], URadio.prototype, "options", void 0);
|
|
149
150
|
URadio = __decorate([customElement("u-radio")], URadio);
|
|
150
151
|
//#endregion
|
|
151
152
|
export { URadio };
|
|
@@ -7,7 +7,7 @@ import "../field/UField.js";
|
|
|
7
7
|
import { UOption } from "../option/UOption.js";
|
|
8
8
|
import { UPopover } from "../popover/UPopover.js";
|
|
9
9
|
import { styles } from "./USelect.styles.js";
|
|
10
|
-
import { customElement, property, query } from "lit/decorators.js";
|
|
10
|
+
import { customElement, property, query, state } from "lit/decorators.js";
|
|
11
11
|
import { html } from "lit";
|
|
12
12
|
//#region src/components/select/USelect.ts
|
|
13
13
|
var _ref, _ref2;
|
|
@@ -133,7 +133,7 @@ var USelect = class USelect extends UFormControlElement {
|
|
|
133
133
|
}
|
|
134
134
|
updated(changedProperties) {
|
|
135
135
|
super.updated(changedProperties);
|
|
136
|
-
if (changedProperties.has(
|
|
136
|
+
if (["value", "options"].some((k) => changedProperties.has(k))) this.onChangeValue();
|
|
137
137
|
}
|
|
138
138
|
render() {
|
|
139
139
|
return html`
|
|
@@ -310,6 +310,7 @@ __decorate([property({
|
|
|
310
310
|
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], USelect.prototype, "placeholder", void 0);
|
|
311
311
|
__decorate([query(".container", true), __decorateMetadata("design:type", typeof (_ref = typeof HTMLElement !== "undefined" && HTMLElement) === "function" ? _ref : Object)], USelect.prototype, "containerEl", void 0);
|
|
312
312
|
__decorate([query("u-popover", true), __decorateMetadata("design:type", typeof (_ref2 = typeof UPopover !== "undefined" && UPopover) === "function" ? _ref2 : Object)], USelect.prototype, "popoverEl", void 0);
|
|
313
|
+
__decorate([state(), __decorateMetadata("design:type", Array)], USelect.prototype, "options", void 0);
|
|
313
314
|
USelect = __decorate([customElement("u-select")], USelect);
|
|
314
315
|
//#endregion
|
|
315
316
|
export { USelect };
|
|
@@ -49,7 +49,7 @@ export declare class UTextarea extends UFormControlElement<string> {
|
|
|
49
49
|
/** placeholder 텍스트 */
|
|
50
50
|
placeholder?: string;
|
|
51
51
|
textareaEl?: HTMLTextAreaElement;
|
|
52
|
-
protected updated(changedProperties: PropertyValues): void
|
|
52
|
+
protected updated(changedProperties: PropertyValues): Promise<void>;
|
|
53
53
|
render(): import('lit-html').TemplateResult<1>;
|
|
54
54
|
validate(): boolean;
|
|
55
55
|
reset(): void;
|
|
@@ -34,8 +34,9 @@ var UTextarea = class UTextarea extends UFormControlElement {
|
|
|
34
34
|
static {
|
|
35
35
|
this.styles = [super.styles, styles];
|
|
36
36
|
}
|
|
37
|
-
updated(changedProperties) {
|
|
37
|
+
async updated(changedProperties) {
|
|
38
38
|
super.updated(changedProperties);
|
|
39
|
+
await this.updateComplete;
|
|
39
40
|
if (this.resize === "auto" && [
|
|
40
41
|
"value",
|
|
41
42
|
"minRows",
|
|
@@ -102,10 +103,12 @@ var UTextarea = class UTextarea extends UFormControlElement {
|
|
|
102
103
|
const minHeight = this.minRows ? lineHeight * this.minRows + extra : lineHeight + extra;
|
|
103
104
|
const maxHeight = this.maxRows ? lineHeight * this.maxRows + extra : Infinity;
|
|
104
105
|
textarea.style.height = "auto";
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
requestAnimationFrame(() => {
|
|
107
|
+
const scrollHeight = textarea.scrollHeight;
|
|
108
|
+
const newHeight = Math.min(Math.max(scrollHeight, minHeight), maxHeight);
|
|
109
|
+
textarea.style.height = `${newHeight}px`;
|
|
110
|
+
textarea.style.overflowY = scrollHeight > maxHeight ? "auto" : "hidden";
|
|
111
|
+
});
|
|
109
112
|
}
|
|
110
113
|
};
|
|
111
114
|
__decorate([property({
|
|
@@ -101,7 +101,14 @@ var styles = css`
|
|
|
101
101
|
|
|
102
102
|
/* ===== Textarea 요소 ===== */
|
|
103
103
|
textarea {
|
|
104
|
-
|
|
104
|
+
display: block;
|
|
105
|
+
border: none;
|
|
106
|
+
background: none;
|
|
107
|
+
outline: none;
|
|
108
|
+
padding: 0;
|
|
109
|
+
margin: 0;
|
|
110
|
+
color: inherit;
|
|
111
|
+
font: inherit;
|
|
105
112
|
flex: 1;
|
|
106
113
|
min-width: 0;
|
|
107
114
|
font-size: 1em;
|
package/dist/utilities/Dialog.js
CHANGED
|
@@ -52,8 +52,8 @@ var Dialog = class {
|
|
|
52
52
|
<u-input
|
|
53
53
|
type=${options?.type || "text"}
|
|
54
54
|
placeholder=${options?.placeholder || ""}
|
|
55
|
-
value=${inputValue}
|
|
56
|
-
@
|
|
55
|
+
.value=${inputValue}
|
|
56
|
+
@input=${(e) => {
|
|
57
57
|
inputValue = e.target.value || "";
|
|
58
58
|
}}
|
|
59
59
|
@keydown=${(e) => {
|
|
@@ -108,7 +108,7 @@ var Dialog = class {
|
|
|
108
108
|
(options.target || document.body).appendChild(dialog);
|
|
109
109
|
await dialog.updateComplete;
|
|
110
110
|
dialog.show();
|
|
111
|
-
dialog.addEventListener("
|
|
111
|
+
dialog.addEventListener("hide", (e) => {
|
|
112
112
|
if (e.target !== dialog) return;
|
|
113
113
|
setTimeout(() => dialog.remove(), 300);
|
|
114
114
|
resolve(closeValue);
|
package/dist/utilities/Toast.js
CHANGED
|
@@ -52,7 +52,7 @@ var Toast = class {
|
|
|
52
52
|
container.appendChild(el);
|
|
53
53
|
await el.updateComplete;
|
|
54
54
|
el.show();
|
|
55
|
-
el.addEventListener("
|
|
55
|
+
el.addEventListener("hide", async () => {
|
|
56
56
|
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
57
57
|
el.remove();
|
|
58
58
|
this.elements.delete(el);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iyulab/components",
|
|
3
3
|
"description": "web-components library based on lit-element made by iyulab",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iyulab",
|
|
7
7
|
"components",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist",
|
|
20
|
+
"skills",
|
|
20
21
|
"plugins/**/*.js",
|
|
21
22
|
"plugins/**/*.d.ts",
|
|
22
|
-
"
|
|
23
|
-
"LICENSE",
|
|
23
|
+
"package.json",
|
|
24
24
|
"README.md",
|
|
25
25
|
"CHANGELOG.md",
|
|
26
|
-
"
|
|
26
|
+
"LICENSE"
|
|
27
27
|
],
|
|
28
28
|
"type": "module",
|
|
29
29
|
"types": "./dist/index.d.ts",
|
|
@@ -45,14 +45,17 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@floating-ui/dom": "^1.7.6",
|
|
48
|
-
"@lit/react": "^1.0.8",
|
|
49
48
|
"focus-trap": "^8.0.1",
|
|
50
49
|
"lit": "^3.3.2"
|
|
51
50
|
},
|
|
52
51
|
"peerDependencies": {
|
|
52
|
+
"@lit/react": ">=1.0.8",
|
|
53
53
|
"react": ">=18.0.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
56
|
+
"@lit/react": {
|
|
57
|
+
"optional": true
|
|
58
|
+
},
|
|
56
59
|
"react": {
|
|
57
60
|
"optional": true
|
|
58
61
|
}
|