@iyulab/components 1.38.0 → 1.40.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 +194 -0
- package/README.md +24 -0
- package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/decorate.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/decorateMetadata.js +1 -1
- package/dist/_virtual/_glob-assets_raw/dark.css.e8ac080d.js +1 -1
- package/dist/_virtual/_glob-assets_raw/light.css.637cb2f8.js +1 -1
- package/dist/assets/locales/ar.json.js +6 -2
- package/dist/assets/locales/de.json.js +6 -2
- package/dist/assets/locales/en.json.js +6 -2
- package/dist/assets/locales/es.json.js +6 -2
- package/dist/assets/locales/fr.json.js +6 -2
- package/dist/assets/locales/id.json.js +6 -2
- package/dist/assets/locales/ja.json.js +6 -2
- package/dist/assets/locales/ko.json.js +6 -2
- package/dist/assets/locales/pt-BR.json.js +6 -2
- package/dist/assets/locales/ru.json.js +6 -2
- package/dist/assets/locales/th.json.js +6 -2
- package/dist/assets/locales/vi.json.js +6 -2
- package/dist/assets/locales/zh-CN.json.js +6 -2
- package/dist/assets/locales/zh-TW.json.js +6 -2
- package/dist/components/UFloatingElement.js +2 -2
- package/dist/components/UFormControlElement.js +2 -2
- package/dist/components/UOverlayElement.js +2 -2
- package/dist/components/alert/UAlert.js +2 -2
- package/dist/components/avatar/UAvatar.js +2 -2
- package/dist/components/badge/UBadge.js +2 -2
- package/dist/components/breadcrumb/UBreadcrumb.js +1 -1
- package/dist/components/breadcrumb/UBreadcrumb.styles.js +1 -1
- package/dist/components/breadcrumb-item/UBreadcrumbItem.js +2 -2
- package/dist/components/breadcrumb-item/UBreadcrumbItem.styles.js +1 -1
- package/dist/components/button/UButton.js +2 -2
- package/dist/components/button-group/UButtonGroup.js +2 -2
- package/dist/components/card/UCard.js +2 -2
- package/dist/components/carousel/UCarousel.js +2 -2
- package/dist/components/checkbox/UCheckbox.js +2 -2
- package/dist/components/checkbox/UCheckbox.styles.js +7 -1
- package/dist/components/chip/UChip.js +2 -2
- package/dist/components/chip/UChip.styles.js +7 -0
- package/dist/components/copy-button/UCopyButton.js +2 -2
- package/dist/components/date-picker/UDatePicker.js +2 -2
- package/dist/components/date-picker/UDatePicker.styles.js +2 -2
- package/dist/components/dialog/UDialog.js +2 -2
- package/dist/components/divider/UDivider.js +2 -2
- package/dist/components/divider/UDivider.styles.js +1 -1
- package/dist/components/drawer/UDrawer.js +2 -2
- package/dist/components/expander/UExpander.js +2 -2
- package/dist/components/expander/UExpander.styles.js +1 -1
- package/dist/components/field/UField.js +2 -2
- package/dist/components/field/UField.styles.js +1 -1
- package/dist/components/file-input/UFileInput.js +2 -2
- package/dist/components/file-input/UFileInput.styles.js +2 -2
- package/dist/components/form/UForm.js +2 -2
- package/dist/components/icon/UIcon.js +3 -3
- package/dist/components/icon-button/UIconButton.js +2 -2
- package/dist/components/input/UInput.d.ts +15 -1
- package/dist/components/input/UInput.js +62 -12
- package/dist/components/input/UInput.styles.js +25 -6
- package/dist/components/menu/UMenu.js +2 -2
- package/dist/components/menu-item/UMenuItem.js +2 -2
- package/dist/components/option/UOption.js +2 -2
- package/dist/components/panel/UPanel.js +2 -2
- package/dist/components/popover/UPopover.js +23 -7
- package/dist/components/progress-bar/UProgressBar.js +2 -2
- package/dist/components/progress-ring/UProgressRing.js +2 -2
- package/dist/components/radio/URadio.js +2 -2
- package/dist/components/rating/URating.js +2 -2
- package/dist/components/rating/URating.styles.js +6 -0
- package/dist/components/select/USelect.d.ts +7 -1
- package/dist/components/select/USelect.js +19 -8
- package/dist/components/select/USelect.styles.js +18 -5
- package/dist/components/skeleton/USkeleton.js +2 -2
- package/dist/components/slider/USlider.d.ts +3 -1
- package/dist/components/slider/USlider.js +2 -2
- package/dist/components/slider/USlider.styles.js +19 -2
- package/dist/components/spinner/USpinner.js +2 -2
- package/dist/components/split-panel/USplitPanel.d.ts +37 -2
- package/dist/components/split-panel/USplitPanel.js +120 -11
- package/dist/components/split-panel/USplitPanel.styles.js +37 -6
- package/dist/components/switch/USwitch.js +2 -2
- package/dist/components/switch/USwitch.styles.js +8 -3
- package/dist/components/tab/UTab.js +2 -2
- package/dist/components/tab/UTab.styles.js +1 -1
- package/dist/components/tab-panel/UTabPanel.js +3 -3
- package/dist/components/tag/UTag.js +2 -2
- package/dist/components/text/UText.js +2 -2
- package/dist/components/text/UText.styles.js +1 -1
- package/dist/components/textarea/UTextarea.d.ts +5 -0
- package/dist/components/textarea/UTextarea.js +2 -2
- package/dist/components/textarea/UTextarea.styles.js +6 -3
- package/dist/components/tooltip/UTooltip.js +2 -2
- package/dist/components/tree/UTree.js +2 -2
- package/dist/components/tree-item/UTreeItem.js +2 -2
- package/dist/components/tree-item/UTreeItem.styles.js +50 -13
- package/dist/styles/dark.css +4 -1
- package/dist/styles/light.css +7 -4
- package/dist/utilities/Locale.d.ts +1 -1
- package/dist/utilities/OverlayManager.d.ts +36 -4
- package/dist/utilities/OverlayManager.js +39 -4
- package/dist/utilities/Toast.d.ts +55 -4
- package/dist/utilities/Toast.js +84 -19
- package/package.json +4 -4
- package/skills/iyulab-components/references/components/dialog.md +19 -0
- package/skills/iyulab-components/references/components/input.md +17 -0
- package/skills/iyulab-components/references/components/panel.md +12 -0
- package/skills/iyulab-components/references/components/select.md +9 -0
- package/skills/iyulab-components/references/components/slider.md +1 -1
- package/skills/iyulab-components/references/components/split-panel.md +41 -3
- package/skills/iyulab-components/references/components/tab-panel.md +18 -0
- package/skills/iyulab-components/references/utilities/overlay-manager.md +16 -2
|
@@ -15,7 +15,7 @@ Resizable two-panel layout. Drag the splitter to adjust panel sizes.
|
|
|
15
15
|
</u-split-panel>
|
|
16
16
|
|
|
17
17
|
<!-- Vertical split -->
|
|
18
|
-
<u-split-panel orientation="vertical" default-ratio="
|
|
18
|
+
<u-split-panel orientation="vertical" default-ratio="30,70" style="height: 400px;">
|
|
19
19
|
<div>Top panel</div>
|
|
20
20
|
<div>Bottom panel</div>
|
|
21
21
|
</u-split-panel>
|
|
@@ -30,6 +30,27 @@ Resizable two-panel layout. Drag the splitter to adjust panel sizes.
|
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
+
## Sizing
|
|
34
|
+
|
|
35
|
+
**Give the host a height.** This is a shell: `:host` is `height: 100%` with `overflow: hidden`,
|
|
36
|
+
so the panels divide whatever height the host has — and an unconstrained host has none to divide.
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<u-split-panel style="height: 400px">…</u-split-panel>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
⚠ Leave the height off — or nest the component in a container that has no height of its own — and
|
|
43
|
+
it collapses to a thin strip (measured: 18px, with 900px-tall panel content), the content is
|
|
44
|
+
clipped by `overflow: hidden`, and there is no scrollbar to reach it. No error, nothing in the
|
|
45
|
+
console. Every example below assumes a height on the host for this reason.
|
|
46
|
+
|
|
47
|
+
A height-bearing ancestor works the same way (measured):
|
|
48
|
+
|
|
49
|
+
```css
|
|
50
|
+
.page { height: 100%; display: flex; flex-direction: column; }
|
|
51
|
+
.page u-split-panel { flex: 1 1 auto; min-height: 0; }
|
|
52
|
+
```
|
|
53
|
+
|
|
33
54
|
## Slots
|
|
34
55
|
|
|
35
56
|
| Name | Description |
|
|
@@ -42,7 +63,7 @@ Resizable two-panel layout. Drag the splitter to adjust panel sizes.
|
|
|
42
63
|
| Property | Type | Default | Reflect | Description |
|
|
43
64
|
|----------|------|---------|---------|-------------|
|
|
44
65
|
| `orientation` | `'horizontal'\|'vertical'` | `'horizontal'` | ✓ | Split direction |
|
|
45
|
-
| `defaultRatio` | `number[]` | `[]` | ✓ | Initial size ratios
|
|
66
|
+
| `defaultRatio` | `number[]` | `[]` | ✓ | Initial size ratios. Attribute form is comma-separated, without brackets: `default-ratio="30,70"`. Ratios are shares of the space between the handles |
|
|
46
67
|
| `ratio` | `number[]` | `[]` | ✓ | Current size ratios |
|
|
47
68
|
| `disabled` | `boolean` | `false` | ✓ | Prevent resizing |
|
|
48
69
|
| `lazy` | `boolean` | `false` | ✓ | Show preview while dragging, commit on release |
|
|
@@ -55,11 +76,28 @@ Resizable two-panel layout. Drag the splitter to adjust panel sizes.
|
|
|
55
76
|
| `shift` | Dragging in progress |
|
|
56
77
|
| `shift-end` | Drag ends |
|
|
57
78
|
|
|
79
|
+
## Keyboard & Accessibility
|
|
80
|
+
|
|
81
|
+
Each handle is a focusable `role="separator"` following the WAI-ARIA APG *Window Splitter*
|
|
82
|
+
pattern. Its value is the share of the panel **before** it (`aria-valuenow`, `0` to the combined
|
|
83
|
+
share of the two panels it sits between — `100` with two panels), and it is named by the
|
|
84
|
+
`resizePanels` locale message.
|
|
85
|
+
|
|
86
|
+
| Key | Effect |
|
|
87
|
+
|-----|--------|
|
|
88
|
+
| `←` / `→` (horizontal) · `↑` / `↓` (vertical) | Shrink / grow the panel before the handle by 5% |
|
|
89
|
+
| `Home` / `End` | Give the panel before the handle its smallest / largest size |
|
|
90
|
+
| `Enter` | Collapse the panel before the handle; press again to restore its previous size |
|
|
91
|
+
|
|
92
|
+
In a right-to-left layout `←` still moves the handle left. A keyboard change fires `shift-start`,
|
|
93
|
+
`shift` and `shift-end` in turn, so listening to `shift-end` alone covers both pointer and keyboard.
|
|
94
|
+
|
|
58
95
|
## CSS Custom Properties
|
|
59
96
|
|
|
60
97
|
| Property | Description |
|
|
61
98
|
|----------|-------------|
|
|
62
|
-
| `--splitter-size` |
|
|
99
|
+
| `--splitter-size` | Thickness of the visible line (default `4px`) |
|
|
100
|
+
| `--splitter-hit-size` | Thickness of the area that takes the pointer (default `24px`, WCAG 2.5.8). It occupies layout space between the panels, so it never covers a panel's scrollbar. The handle is the larger of the two; set it to `var(--splitter-size)` for a flush handle |
|
|
63
101
|
| `--splitter-color` | Splitter default color |
|
|
64
102
|
| `--splitter-color-hover` | Splitter color on hover |
|
|
65
103
|
| `--splitter-color-active` | Splitter color while dragging |
|
|
@@ -32,6 +32,24 @@ Tab-based content switcher. Pair each `u-tab` with a `u-panel` of the same `valu
|
|
|
32
32
|
|
|
33
33
|
## u-tab-panel
|
|
34
34
|
|
|
35
|
+
### Sizing
|
|
36
|
+
|
|
37
|
+
`u-tab-panel` is a flex shell with no height of its own, so it behaves two ways — both intended:
|
|
38
|
+
|
|
39
|
+
- **No height** — it grows with the active panel's content; nothing is clipped and no scrollbar
|
|
40
|
+
appears (measured: a 900px panel under a `top` tab bar gives a 935px-tall component — the 34px bar
|
|
41
|
+
plus the content).
|
|
42
|
+
- **A height, or a height-bearing parent** — the **content area** becomes the scroll region and the
|
|
43
|
+
tab bar keeps its place (measured: 300px tall → a 265px content area with 635px to scroll).
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<u-tab-panel style="height: 300px">…</u-tab-panel>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The tab bar scrolls on its own axis when the tabs overflow it — horizontally for `placement="top"`
|
|
50
|
+
and `"bottom"`, vertically for `"left"` and `"right"` — so a long tab list never pushes the content
|
|
51
|
+
out of the component.
|
|
52
|
+
|
|
35
53
|
### Slots
|
|
36
54
|
|
|
37
55
|
| Name | Description |
|
|
@@ -4,7 +4,20 @@
|
|
|
4
4
|
import { OverlayManager } from '@iyulab/components';
|
|
5
5
|
```
|
|
6
6
|
|
|
7
|
-
Internal static manager
|
|
7
|
+
Internal static manager that **owns the layer scale for every stacking surface**. Used by `UOverlayElement` (`u-dialog`, `u-drawer`) to track open overlays, assign z-index, and manage body scroll locking — and read by `Toast` for the notification layer.
|
|
8
|
+
|
|
9
|
+
## Layer scale
|
|
10
|
+
|
|
11
|
+
Stacking is a contract, not a negotiation between components. Two bands exist, and the notification band is **always above** the overlay band:
|
|
12
|
+
|
|
13
|
+
| Band | Value | Owned by |
|
|
14
|
+
|------|-------|----------|
|
|
15
|
+
| Overlay | `9999 + depth`, capped at `9999 + 1000` | `UOverlayElement` subclasses (`u-dialog`, `u-drawer`, custom overlays) |
|
|
16
|
+
| **Notification** | `OverlayManager.notificationZIndex` | `Toast` |
|
|
17
|
+
|
|
18
|
+
Overlay z-index comes from **how many overlays are open at once** (stack depth), not from how many have ever been opened. That is what bounds the band — and a bounded band is what lets the notification layer sit above it by construction. More than 1000 simultaneous overlays share the top value: they stop stacking relative to each other, but notifications stay above them.
|
|
19
|
+
|
|
20
|
+
> **Do not hardcode a z-index for a surface that must appear above overlays.** Read `OverlayManager.notificationZIndex` so the value follows the scale.
|
|
8
21
|
|
|
9
22
|
> **Note:** You generally do not need to use `OverlayManager` directly. It is called automatically by overlay components. Only use it if you are building a custom overlay component that extends `UOverlayElement`.
|
|
10
23
|
|
|
@@ -12,10 +25,11 @@ Internal static manager for the overlay stack. Used by `UOverlayElement` (`u-dia
|
|
|
12
25
|
|
|
13
26
|
| Member | Type / Returns | Description |
|
|
14
27
|
|--------|----------------|-------------|
|
|
15
|
-
| `OverlayManager.add(overlay, lockBody?)` | `void` | Register an overlay;
|
|
28
|
+
| `OverlayManager.add(overlay, lockBody?)` | `void` | Register an overlay; assigns a z-index from the overlay band by stack depth; optionally locks body scroll |
|
|
16
29
|
| `OverlayManager.remove(overlay, lockBody?)` | `void` | Unregister an overlay; releases scroll lock if no overlays remain |
|
|
17
30
|
| `OverlayManager.isTopmost(overlay)` | `boolean` | Returns `true` if the overlay is the topmost in the stack (used for ESC key handling) |
|
|
18
31
|
| `OverlayManager.size` | `number` | Number of currently open overlays |
|
|
32
|
+
| `OverlayManager.notificationZIndex` | `number` | z-index of the notification layer — guaranteed above the whole overlay band. Use this for toasts, snackbars, and anything else that must remain visible over an open modal |
|
|
19
33
|
| `OverlayManager.trapStack` | `FocusTrap[]` | Shared focus-trap stack (used internally by focus-trap library) |
|
|
20
34
|
|
|
21
35
|
## Example (custom overlay)
|