@iyulab/components 1.58.0 → 2.0.1
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 -0
- package/README.md +6 -4
- 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 +5 -1
- package/dist/assets/locales/de.json.js +5 -1
- package/dist/assets/locales/en.json.js +5 -1
- package/dist/assets/locales/es.json.js +5 -1
- package/dist/assets/locales/fr.json.js +5 -1
- package/dist/assets/locales/id.json.js +5 -1
- package/dist/assets/locales/ja.json.js +5 -1
- package/dist/assets/locales/ko.json.js +5 -1
- package/dist/assets/locales/pt-BR.json.js +5 -1
- package/dist/assets/locales/ru.json.js +5 -1
- package/dist/assets/locales/th.json.js +5 -1
- package/dist/assets/locales/vi.json.js +5 -1
- package/dist/assets/locales/zh-CN.json.js +5 -1
- package/dist/assets/locales/zh-TW.json.js +5 -1
- package/dist/components/UElement.styles.js +2 -2
- package/dist/components/alert/UAlert.d.ts +12 -7
- package/dist/components/alert/UAlert.js +3 -3
- package/dist/components/alert/UAlert.styles.js +6 -23
- package/dist/components/badge/UBadge.d.ts +5 -5
- package/dist/components/badge/UBadge.js +3 -3
- package/dist/components/badge/UBadge.styles.js +4 -4
- package/dist/components/breadcrumb-item/UBreadcrumbItem.styles.js +1 -1
- package/dist/components/button/UButton.d.ts +32 -16
- package/dist/components/button/UButton.js +38 -5
- package/dist/components/button/UButton.styles.js +67 -50
- package/dist/components/button/forwarded-aria.d.ts +6 -0
- package/dist/components/button/forwarded-aria.js +15 -0
- package/dist/components/button-group/UButtonGroup.d.ts +4 -4
- package/dist/components/button-group/UButtonGroup.js +8 -8
- package/dist/components/button-group/UButtonGroup.styles.js +2 -2
- package/dist/components/calendar/UCalendar.styles.js +4 -3
- package/dist/components/calendar/date-text-controller.d.ts +5 -0
- package/dist/components/calendar/date-text-controller.js +7 -0
- package/dist/components/calendar/picker.styles.js +7 -2
- package/dist/components/card/UCard.d.ts +4 -3
- package/dist/components/card/UCard.js +3 -3
- package/dist/components/card/UCard.styles.js +2 -1
- package/dist/components/carousel/UCarousel.js +2 -2
- package/dist/components/carousel/UCarousel.styles.js +17 -6
- package/dist/components/checkbox/UCheckbox.d.ts +8 -9
- package/dist/components/checkbox/UCheckbox.js +3 -3
- package/dist/components/checkbox/UCheckbox.styles.js +22 -18
- package/dist/components/chip/UChip.d.ts +2 -2
- package/dist/components/chip/UChip.js +4 -4
- package/dist/components/copy-button/UCopyButton.d.ts +2 -2
- package/dist/components/copy-button/UCopyButton.js +4 -4
- package/dist/components/date-picker/UDatePicker.d.ts +3 -0
- package/dist/components/date-picker/UDatePicker.js +9 -4
- package/dist/components/date-picker/UDatePicker.styles.js +13 -2
- package/dist/components/date-range-picker/UDateRangePicker.d.ts +3 -0
- package/dist/components/date-range-picker/UDateRangePicker.js +8 -3
- package/dist/components/date-range-picker/UDateRangePicker.styles.js +13 -3
- package/dist/components/dialog/UDialog.js +1 -1
- package/dist/components/divider/UDivider.d.ts +3 -3
- package/dist/components/divider/UDivider.js +2 -2
- package/dist/components/divider/UDivider.styles.js +5 -5
- package/dist/components/drawer/UDrawer.js +1 -1
- package/dist/components/expander/UExpander.styles.js +2 -2
- package/dist/components/file-input/UFileInput.styles.js +5 -2
- package/dist/components/icon-button/UIconButton.d.ts +4 -3
- package/dist/components/icon-button/UIconButton.js +16 -6
- package/dist/components/icon-button/UIconButton.styles.js +2 -2
- package/dist/components/input/UInput.d.ts +12 -5
- package/dist/components/input/UInput.js +7 -4
- package/dist/components/input/UInput.styles.js +60 -30
- package/dist/components/menu/UMenu.d.ts +5 -4
- package/dist/components/menu/UMenu.js +3 -3
- package/dist/components/menu/UMenu.styles.js +1 -1
- package/dist/components/menu-item/UMenuItem.styles.js +1 -1
- package/dist/components/option/UOption.d.ts +1 -0
- package/dist/components/option/UOption.js +6 -3
- package/dist/components/option/UOption.styles.js +1 -1
- package/dist/components/progress-bar/UProgressBar.styles.js +11 -0
- package/dist/components/radio/URadio.d.ts +27 -6
- package/dist/components/radio/URadio.js +48 -12
- package/dist/components/radio/URadio.styles.js +47 -13
- package/dist/components/rating/URating.styles.js +5 -1
- package/dist/components/select/USelect.d.ts +9 -2
- package/dist/components/select/USelect.js +7 -2
- package/dist/components/select/USelect.styles.js +55 -26
- package/dist/components/slider/USlider.styles.js +4 -4
- package/dist/components/spinner/USpinner.styles.js +2 -0
- package/dist/components/split-panel/USplitPanel.styles.js +2 -1
- package/dist/components/steps/USteps.d.ts +57 -0
- package/dist/components/steps/USteps.js +58 -0
- package/dist/components/steps/USteps.styles.d.ts +1 -0
- package/dist/components/steps/USteps.styles.js +110 -0
- package/dist/components/switch/USwitch.styles.js +5 -3
- package/dist/components/tab/UTab.js +2 -2
- package/dist/components/tab/UTab.styles.js +1 -1
- package/dist/components/tab-panel/UTabPanel.d.ts +11 -2
- package/dist/components/tab-panel/UTabPanel.js +33 -5
- package/dist/components/tab-panel/UTabPanel.styles.js +29 -29
- package/dist/components/tag/UTag.d.ts +14 -6
- package/dist/components/tag/UTag.js +8 -3
- package/dist/components/tag/UTag.styles.js +33 -26
- package/dist/components/textarea/UTextarea.d.ts +9 -3
- package/dist/components/textarea/UTextarea.js +7 -2
- package/dist/components/textarea/UTextarea.styles.js +41 -22
- package/dist/components/tree-item/UTreeItem.styles.js +7 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/plugins/vite-plugin-react-wrapper.js +14 -5
- package/dist/react/UAlert.d.ts +4 -2
- package/dist/react/UAvatar.d.ts +4 -2
- package/dist/react/UBadge.d.ts +4 -2
- package/dist/react/UBreadcrumb.d.ts +4 -2
- package/dist/react/UBreadcrumbItem.d.ts +4 -2
- package/dist/react/UButton.d.ts +4 -2
- package/dist/react/UButtonGroup.d.ts +4 -2
- package/dist/react/UCard.d.ts +4 -2
- package/dist/react/UCarousel.d.ts +4 -2
- package/dist/react/UCheckbox.d.ts +4 -2
- package/dist/react/UChip.d.ts +4 -2
- package/dist/react/UCopyButton.d.ts +4 -2
- package/dist/react/UDatePicker.d.ts +4 -2
- package/dist/react/UDateRangePicker.d.ts +4 -2
- package/dist/react/UDialog.d.ts +4 -2
- package/dist/react/UDivider.d.ts +4 -2
- package/dist/react/UDrawer.d.ts +4 -2
- package/dist/react/UExpander.d.ts +4 -2
- package/dist/react/UField.d.ts +4 -2
- package/dist/react/UFileInput.d.ts +4 -2
- package/dist/react/UForm.d.ts +4 -2
- package/dist/react/UIcon.d.ts +4 -2
- package/dist/react/UIconButton.d.ts +4 -2
- package/dist/react/UInput.d.ts +4 -2
- package/dist/react/UMenu.d.ts +4 -2
- package/dist/react/UMenuItem.d.ts +4 -2
- package/dist/react/UOption.d.ts +4 -2
- package/dist/react/UPanel.d.ts +4 -2
- package/dist/react/UPopover.d.ts +4 -2
- package/dist/react/UProgressBar.d.ts +4 -2
- package/dist/react/UProgressRing.d.ts +4 -2
- package/dist/react/URadio.d.ts +4 -2
- package/dist/react/URating.d.ts +4 -2
- package/dist/react/USelect.d.ts +4 -2
- package/dist/react/USkeleton.d.ts +4 -2
- package/dist/react/USlider.d.ts +4 -2
- package/dist/react/USpinner.d.ts +4 -2
- package/dist/react/USplitPanel.d.ts +4 -2
- package/dist/react/USteps.d.ts +14 -0
- package/dist/react/USteps.js +10 -0
- package/dist/react/USwitch.d.ts +4 -2
- package/dist/react/UTab.d.ts +4 -2
- package/dist/react/UTabPanel.d.ts +4 -2
- package/dist/react/UTag.d.ts +4 -2
- package/dist/react/UText.d.ts +4 -2
- package/dist/react/UTextarea.d.ts +4 -2
- package/dist/react/UTooltip.d.ts +4 -2
- package/dist/react/UTree.d.ts +4 -2
- package/dist/react/UTreeItem.d.ts +4 -2
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/dist/styles/dark.css +42 -0
- package/dist/styles/light.css +44 -0
- package/dist/utilities/Dialog.d.ts +2 -2
- package/dist/utilities/Dialog.js +3 -3
- package/dist/utilities/Locale.d.ts +1 -1
- package/dist/utilities/Toast.d.ts +2 -2
- package/dist/utilities/Toast.js +1 -1
- package/dist/utilities/icons.d.ts +12 -3
- package/dist/utilities/icons.js +24 -6
- package/package.json +1 -1
- package/skills/iyulab-components/SKILL.md +3 -3
- package/skills/iyulab-components/references/components/alert.md +5 -5
- package/skills/iyulab-components/references/components/badge.md +3 -3
- package/skills/iyulab-components/references/components/button-group.md +3 -3
- package/skills/iyulab-components/references/components/button.md +34 -19
- package/skills/iyulab-components/references/components/card.md +3 -3
- package/skills/iyulab-components/references/components/checkbox.md +5 -5
- package/skills/iyulab-components/references/components/chip.md +2 -2
- package/skills/iyulab-components/references/components/copy-button.md +1 -1
- package/skills/iyulab-components/references/components/date-picker.md +1 -0
- package/skills/iyulab-components/references/components/date-range-picker.md +1 -0
- package/skills/iyulab-components/references/components/dialog.md +2 -2
- package/skills/iyulab-components/references/components/divider.md +2 -2
- package/skills/iyulab-components/references/components/drawer.md +1 -1
- package/skills/iyulab-components/references/components/field.md +1 -1
- package/skills/iyulab-components/references/components/icon-button.md +8 -2
- package/skills/iyulab-components/references/components/input.md +4 -2
- package/skills/iyulab-components/references/components/menu.md +1 -1
- package/skills/iyulab-components/references/components/radio.md +16 -4
- package/skills/iyulab-components/references/components/select.md +2 -1
- package/skills/iyulab-components/references/components/steps.md +66 -0
- package/skills/iyulab-components/references/components/tab-panel.md +10 -3
- package/skills/iyulab-components/references/components/tag.md +11 -7
- package/skills/iyulab-components/references/components/textarea.md +2 -1
- package/skills/iyulab-components/references/usage.md +1 -1
- package/skills/iyulab-components/references/utilities/dialog.md +2 -2
- package/skills/iyulab-components/references/utilities/icons.md +2 -2
- package/skills/iyulab-components/references/utilities/theme.md +9 -5
- package/skills/iyulab-components/references/utilities/toast.md +2 -2
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# u-steps
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import '@iyulab/components/dist/components/steps/USteps.js';
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
**Tag:** `u-steps`
|
|
8
|
+
|
|
9
|
+
A display-only progress line — where a record stands in a fixed sequence of steps. Not a wizard:
|
|
10
|
+
moving to the next step is the consumer's own action, placed beside it. For several tracks
|
|
11
|
+
(fulfilment and billing, say), stack one `u-steps` per track and give each a `label`.
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<u-steps id="fulfilment" label="Fulfilment" current="1"></u-steps>
|
|
15
|
+
<script type="module">
|
|
16
|
+
document.getElementById('fulfilment').items = [
|
|
17
|
+
{ label: 'Received', description: '10.02' },
|
|
18
|
+
{ label: 'Proof' },
|
|
19
|
+
{ label: 'Print' },
|
|
20
|
+
{ label: 'Ship' },
|
|
21
|
+
];
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<!-- a blocked step -->
|
|
25
|
+
<u-steps label="Billing" .items=${[{ label: 'Invoice' }, { label: 'Paid', status: 'hold' }, { label: 'Closed' }]}></u-steps>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Status is told by marker shape as well as colour — complete = check, current = heavy ring,
|
|
29
|
+
hold = warning tint, upcoming = empty ring. Assistive tech hears the current step through
|
|
30
|
+
`aria-current="step"` and complete/hold through a hidden status word (`stepComplete`,
|
|
31
|
+
`stepOnHold` locale keys).
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Properties
|
|
36
|
+
|
|
37
|
+
| Property | Type | Default | Reflect | Description |
|
|
38
|
+
|----------|------|---------|---------|-------------|
|
|
39
|
+
| `items` | `StepItem[]` | `[]` | — | `{ label, description?, status? }` (property only) |
|
|
40
|
+
| `current` | `number` | — | — | Index of the current step; steps without `status` before it are `complete`, after it `upcoming` |
|
|
41
|
+
| `label` | `string` | — | — | Track name shown at the start; also the list's accessible name |
|
|
42
|
+
|
|
43
|
+
`StepStatus` = `'complete' | 'current' | 'hold' | 'upcoming'`. An item's own `status` wins over
|
|
44
|
+
the inference from `current`.
|
|
45
|
+
|
|
46
|
+
## CSS Parts
|
|
47
|
+
|
|
48
|
+
| Part | Description |
|
|
49
|
+
|------|-------------|
|
|
50
|
+
| `base` | Outer box |
|
|
51
|
+
| `label` | Track name |
|
|
52
|
+
| `list` | The `ol` |
|
|
53
|
+
| `step` | One step — also `step-complete`, `step-current`, `step-hold`, `step-upcoming` |
|
|
54
|
+
| `marker` | Ring / check |
|
|
55
|
+
| `title` | Step name |
|
|
56
|
+
| `description` | Step's secondary text |
|
|
57
|
+
| `connector` | Line between steps |
|
|
58
|
+
|
|
59
|
+
## CSS Custom Properties
|
|
60
|
+
|
|
61
|
+
| Property | Description |
|
|
62
|
+
|----------|-------------|
|
|
63
|
+
| `--steps-marker-size` | Marker diameter (default 18px) |
|
|
64
|
+
| `--steps-connector-color` | Connector not yet travelled |
|
|
65
|
+
| `--steps-connector-done-color` | Travelled connector and complete marker |
|
|
66
|
+
| `--steps-label-width` | Width of the track name (default 56px) |
|
|
@@ -21,8 +21,8 @@ Tab-based content switcher. Pair each `u-tab` with a `u-panel` of the same `valu
|
|
|
21
21
|
<u-panel value="settings">Settings content</u-panel>
|
|
22
22
|
</u-tab-panel>
|
|
23
23
|
|
|
24
|
-
<!-- Card
|
|
25
|
-
<u-tab-panel
|
|
24
|
+
<!-- Card appearance, left placement -->
|
|
25
|
+
<u-tab-panel appearance="card" placement="left">
|
|
26
26
|
<u-tab value="a" removable>Tab A</u-tab>
|
|
27
27
|
<u-panel value="a">Panel A</u-panel>
|
|
28
28
|
</u-tab-panel>
|
|
@@ -62,7 +62,7 @@ out of the component.
|
|
|
62
62
|
| Property | Type | Default | Reflect | Description |
|
|
63
63
|
|----------|------|---------|---------|-------------|
|
|
64
64
|
| `value` | `string` | `''` | ✓ | Currently active tab value |
|
|
65
|
-
| `
|
|
65
|
+
| `appearance` | `'line'\|'card'\|'pill'\|'plain'` | `'line'` | ✓ | Tab bar style |
|
|
66
66
|
| `placement` | `'top'\|'bottom'\|'left'\|'right'` | `'top'` | ✓ | Tab bar position |
|
|
67
67
|
| `draggable` | `boolean` | `false` | ✓ | Native drag attribute — **no built-in reordering** |
|
|
68
68
|
| `disabled` | `boolean` | `false` | ✓ | Disable all tabs |
|
|
@@ -73,6 +73,13 @@ out of the component.
|
|
|
73
73
|
|-------|-------------|
|
|
74
74
|
| `change` | Fires on user-driven tab changes (click/keyboard). Not emitted for initial mount or direct `value` assignment. |
|
|
75
75
|
|
|
76
|
+
### Accessibility
|
|
77
|
+
|
|
78
|
+
The panel wires the WAI-ARIA tabs pattern itself: each tab carries `aria-selected`, only the
|
|
79
|
+
selected tab is a tab stop (arrow keys, Home and End move between tabs and select them), each
|
|
80
|
+
`u-panel` becomes a `tabpanel`, and a tab and its panel (same `value`) point at each other with
|
|
81
|
+
`aria-controls` / `aria-labelledby`. Ids are generated when missing; ids you set are kept.
|
|
82
|
+
|
|
76
83
|
### CSS Parts
|
|
77
84
|
|
|
78
85
|
| Part | Description |
|
|
@@ -10,8 +10,9 @@ Non-interactive label tag for categories, status, or metadata display.
|
|
|
10
10
|
|
|
11
11
|
```html
|
|
12
12
|
<u-tag>Default</u-tag>
|
|
13
|
-
<u-tag color="blue"
|
|
13
|
+
<u-tag color="blue" appearance="outlined">TypeScript</u-tag>
|
|
14
14
|
<u-tag color="green" rounded>Active</u-tag>
|
|
15
|
+
<u-tag color="success" dot>Shipped</u-tag>
|
|
15
16
|
|
|
16
17
|
<!-- With icon prefix -->
|
|
17
18
|
<u-tag color="red">
|
|
@@ -36,10 +37,11 @@ For interactive chips (selectable/removable), use [`u-chip`](./chip.md) instead.
|
|
|
36
37
|
|
|
37
38
|
| Property | Type | Default | Reflect | Description |
|
|
38
39
|
|----------|------|---------|---------|-------------|
|
|
39
|
-
| `
|
|
40
|
-
| `color` | `'neutral'\|'primary'\|'info'\|'success'\|'warning'\|'danger'\|'blue'\|'green'\|'yellow'\|'red'\|'orange'\|'teal'\|'cyan'\|'purple'\|'pink'
|
|
40
|
+
| `appearance` | `'solid'\|'soft'\|'outlined'\|'plain'` | `'soft'` | ✓ | How much chrome: `solid` filled · `soft` tint · `outlined` · `plain` coloured text only |
|
|
41
|
+
| `color` | `'neutral'\|'primary'\|'info'\|'success'\|'warning'\|'danger'\|'blue'\|'green'\|'yellow'\|'red'\|'orange'\|'teal'\|'cyan'\|'purple'\|'pink'` | `'neutral'` | ✓ | Color — `neutral` (the default) is grey |
|
|
41
42
|
| `rounded` | `boolean` | `false` | ✓ | Pill shape |
|
|
42
43
|
| `icon` | `boolean` | `false` | ✓ | Adds a status icon so the meaning survives without color (`info`/`success`/`warning`/`danger` only) |
|
|
44
|
+
| `dot` | `boolean` | `false` | ✓ | Adds a small leading mark in the text colour — for status labels repeated down a table column. `icon` wins when both are set |
|
|
43
45
|
|
|
44
46
|
## CSS Parts
|
|
45
47
|
|
|
@@ -48,16 +50,17 @@ For interactive chips (selectable/removable), use [`u-chip`](./chip.md) instead.
|
|
|
48
50
|
| `base` | Outer tag box |
|
|
49
51
|
| `content` | Inner content wrapper |
|
|
50
52
|
| `icon` | Status icon (rendered only with `icon` + a semantic `color`) |
|
|
53
|
+
| `dot` | Leading mark (rendered only with `dot`) |
|
|
51
54
|
|
|
52
55
|
## Color axes
|
|
53
56
|
|
|
54
57
|
`color` carries **two** axes. The **role** axis (`primary`·`info`·`success`·`warning`·`danger`)
|
|
55
58
|
means *semantics* — it follows re-branding and inherits the contrast contract. The **decorative**
|
|
56
|
-
axis (`blue`·`purple` …
|
|
59
|
+
axis (`blue`·`purple` …) means *the color itself* and is deliberately immune to re-branding.
|
|
57
60
|
|
|
58
|
-
`neutral` (the default) is **
|
|
59
|
-
|
|
60
|
-
`info` "Shipped"
|
|
61
|
+
`neutral` (the default) is **achromatic** — a grey label, the same meaning `neutral` has on `u-button`,
|
|
62
|
+
`u-badge` and `u-checkbox`. Use it for a label that should carry no colour at all — a status such as "Pending" next
|
|
63
|
+
to an `info` "Shipped". For a tag tinted with the brand colour, use `primary`.
|
|
61
64
|
|
|
62
65
|
`icon` only applies to the four **status** roles — `neutral` and `primary` are not states, and the
|
|
63
66
|
decorative axis carries no meaning, so no icon is drawn there.
|
|
@@ -75,3 +78,4 @@ decorative axis carries no meaning, so no icon is drawn there.
|
|
|
75
78
|
| `--tag-color` | Text color |
|
|
76
79
|
| `--tag-bg-color` | Background color |
|
|
77
80
|
| `--tag-border-color` | Border color |
|
|
81
|
+
| `--tag-dot-size` | Diameter of the leading `dot` (default 6px) |
|
|
@@ -23,7 +23,8 @@ Multi-line text input with auto-resize and optional character counter. Form-asso
|
|
|
23
23
|
| Property | Type | Default | Reflect | Description |
|
|
24
24
|
|----------|------|---------|---------|-------------|
|
|
25
25
|
| `value` | `string` | — | — | Current text value |
|
|
26
|
-
| `
|
|
26
|
+
| `appearance` | `'outlined'\|'soft'\|'underlined'\|'plain'` | `'outlined'` | ✓ | How much chrome: `outlined` · `soft` tinted face · `underlined` bottom line only · `plain` no chrome |
|
|
27
|
+
| `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Field size, like a button's: 12px · `--u-density` (14px) · 16px. A field and a button of the same size share a height |
|
|
27
28
|
| `resize` | `'none'\|'vertical'\|'horizontal'\|'both'\|'auto'` | `'auto'` | ✓ | Resize behavior |
|
|
28
29
|
| `minRows` | `number` | — | — | Minimum visible rows |
|
|
29
30
|
| `maxRows` | `number` | — | — | Maximum rows (auto-resize cap) |
|
|
@@ -118,7 +118,7 @@ tracked as open work, because the sheet pairs it by hand across five colour role
|
|
|
118
118
|
|
|
119
119
|
⚠ Setting `--u-primary-color` alone is **not enough**: hover/focus/link colors resolve from
|
|
120
120
|
`--u-primary-color-strong`, so they stay on the default ramp and your brand looks half-applied.
|
|
121
|
-
The measured symptom is a *selected table row* or *tag* that stays blue while buttons turn brand —
|
|
121
|
+
The measured symptom is a *selected table row* or `color="primary"` *tag* that stays blue while buttons turn brand —
|
|
122
122
|
that one is `--u-primary-bg-color`.
|
|
123
123
|
|
|
124
124
|
### Typography
|
|
@@ -30,7 +30,7 @@ const result = await Dialog.show({
|
|
|
30
30
|
content: 'Which plan do you want?',
|
|
31
31
|
actions: [
|
|
32
32
|
{ label: 'Free', value: 'free' },
|
|
33
|
-
{ label: 'Pro', value: 'pro',
|
|
33
|
+
{ label: 'Pro', value: 'pro', appearance: 'solid' }
|
|
34
34
|
]
|
|
35
35
|
});
|
|
36
36
|
// result = 'free' | 'pro' | null (if closed without selecting)
|
|
@@ -79,7 +79,7 @@ interface CustomDialogOptions extends DialogOptions {
|
|
|
79
79
|
interface DialogAction {
|
|
80
80
|
label: string;
|
|
81
81
|
value: string;
|
|
82
|
-
|
|
82
|
+
appearance?: ButtonAppearance; // default: 'solid'
|
|
83
83
|
color?: ButtonColor;
|
|
84
84
|
}
|
|
85
85
|
```
|
|
@@ -27,13 +27,13 @@ IconRegistry.register('my-icons', async (name: string) => {
|
|
|
27
27
|
Resolver contract — the registry owns caching, so a resolver is a pure lookup:
|
|
28
28
|
return `string` = success (cached) · return `undefined` = definitive not-found (negative-cached, not retried) · `throw` = transient error (not cached, retried on next lookup).
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Registering an existing `lib` name replaces it — to override a built-in library (e.g. air-gapped local bundle), register it again. Replacing evicts that library's cache.
|
|
31
31
|
|
|
32
32
|
## API
|
|
33
33
|
|
|
34
34
|
| Method | Description |
|
|
35
35
|
|--------|-------------|
|
|
36
|
-
| `IconRegistry.register(lib, resolver)` | Register an icon library
|
|
36
|
+
| `IconRegistry.register(lib, resolver)` | Register an icon library; an existing `lib` is replaced (its cached entries are evicted) |
|
|
37
37
|
| `IconRegistry.unregister(lib)` | Remove a library + evict its cached entries |
|
|
38
38
|
| `IconRegistry.has(lib)` | Check if a library is registered |
|
|
39
39
|
| `IconRegistry.resolve(lib, name)` | `Promise<string \| undefined>` — resolve SVG source (cached + in-flight dedupe) |
|
|
@@ -51,11 +51,15 @@ changes**, because those targets are relative to the page background.
|
|
|
51
51
|
> from `--u-primary-color-strong`, so they stay on the default ramp and the brand looks
|
|
52
52
|
> half-applied. (The sheet derives no step from `--u-primary-color` — measured: 0 references.)
|
|
53
53
|
|
|
54
|
-
> **Load that block however you like — a plain static `import`
|
|
55
|
-
> built-in sheets
|
|
56
|
-
>
|
|
57
|
-
>
|
|
58
|
-
>
|
|
54
|
+
> **Load that block however you like — a plain static `import` and a plain `:root` rule are
|
|
55
|
+
> enough.** Since 2.0 the built-in sheets live in a cascade layer (`@layer iyu.base, iyu.house;`),
|
|
56
|
+
> and unlayered application CSS beats every layer regardless of load order, `Theme.init()` timing
|
|
57
|
+
> or selector specificity (a `:where(:root)` wrapper wins too). A house theme sits between the two
|
|
58
|
+
> in `@layer iyu.house { … }`.
|
|
59
|
+
>
|
|
60
|
+
> 🔴 **That includes dark mode.** The dark palette is scoped to `:root[theme="dark"]` inside
|
|
61
|
+
> `iyu.base`, so an unlayered `:root` override applies in both themes. Scope a mode-specific value
|
|
62
|
+
> yourself with `:root[theme="dark"] { … }`.
|
|
59
63
|
|
|
60
64
|
## API
|
|
61
65
|
|
|
@@ -27,7 +27,7 @@ await Toast.show('success', 'Custom message', {
|
|
|
27
27
|
title: 'Done',
|
|
28
28
|
position: 'top-center',
|
|
29
29
|
duration: 3000,
|
|
30
|
-
|
|
30
|
+
appearance: 'outlined',
|
|
31
31
|
closable: true
|
|
32
32
|
});
|
|
33
33
|
```
|
|
@@ -50,7 +50,7 @@ await Toast.show('success', 'Custom message', {
|
|
|
50
50
|
```ts
|
|
51
51
|
interface ToastOptions {
|
|
52
52
|
target?: HTMLElement; // mount point (default: document.body)
|
|
53
|
-
|
|
53
|
+
appearance?: AlertAppearance; // 'soft' | 'outlined' — default: 'soft'
|
|
54
54
|
title?: string; // Optional title override
|
|
55
55
|
position?: ToastPosition;
|
|
56
56
|
duration?: number; // Auto-dismiss ms (0 = no auto-dismiss)
|