@iyulab/components 2.31.1 → 2.33.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +1 -1
  3. package/dist/assets/locales/ar.json.js +3 -1
  4. package/dist/assets/locales/de.json.js +3 -1
  5. package/dist/assets/locales/en.json.js +3 -1
  6. package/dist/assets/locales/es.json.js +3 -1
  7. package/dist/assets/locales/fr.json.js +3 -1
  8. package/dist/assets/locales/id.json.js +3 -1
  9. package/dist/assets/locales/ja.json.js +3 -1
  10. package/dist/assets/locales/ko.json.js +3 -1
  11. package/dist/assets/locales/pt-BR.json.js +3 -1
  12. package/dist/assets/locales/ru.json.js +3 -1
  13. package/dist/assets/locales/th.json.js +3 -1
  14. package/dist/assets/locales/vi.json.js +3 -1
  15. package/dist/assets/locales/zh-CN.json.js +3 -1
  16. package/dist/assets/locales/zh-TW.json.js +3 -1
  17. package/dist/components/auto-scroll/UAutoScroll.d.ts +62 -0
  18. package/dist/components/auto-scroll/UAutoScroll.js +126 -0
  19. package/dist/components/auto-scroll/UAutoScroll.styles.d.ts +1 -0
  20. package/dist/components/auto-scroll/UAutoScroll.styles.js +16 -0
  21. package/dist/components/card/UCard.d.ts +9 -0
  22. package/dist/components/card/UCard.js +4 -0
  23. package/dist/components/card/UCard.styles.js +29 -0
  24. package/dist/components/carousel/UCarousel.d.ts +14 -1
  25. package/dist/components/carousel/UCarousel.js +30 -1
  26. package/dist/components/carousel/UCarousel.styles.js +70 -3
  27. package/dist/components/steps/USteps.d.ts +11 -2
  28. package/dist/components/steps/USteps.js +16 -4
  29. package/dist/components/steps/USteps.styles.js +57 -0
  30. package/dist/index.d.ts +1 -0
  31. package/dist/index.js +2 -1
  32. package/dist/react/UAutoScroll.d.ts +14 -0
  33. package/dist/react/UAutoScroll.js +10 -0
  34. package/dist/react/index.d.ts +1 -0
  35. package/dist/react/index.js +1 -0
  36. package/dist/utilities/Locale.d.ts +1 -1
  37. package/dist/utilities/Theme.d.ts +15 -0
  38. package/dist/utilities/Theme.js +30 -2
  39. package/package.json +1 -1
  40. package/skills/iyulab-components/SKILL.md +2 -1
  41. package/skills/iyulab-components/references/components/auto-scroll.md +58 -0
  42. package/skills/iyulab-components/references/components/card.md +12 -0
  43. package/skills/iyulab-components/references/components/carousel.md +22 -1
  44. package/skills/iyulab-components/references/components/steps.md +24 -4
  45. package/skills/iyulab-components/references/utilities/theme.md +10 -0
@@ -33,6 +33,17 @@ border carries hover, and the card does not lift (a lifting card shakes a grid r
33
33
  — buttons, links — out of a link card; an `<a>` cannot contain them. The link's accessible name is all of the card's
34
34
  text unless the host has an `aria-label`, which moves to the link.
35
35
 
36
+ **A card that must be read first (`tone`).** `warning`, `danger`, `success` and `info` give the card that status's
37
+ soft face and border — «Check these 2», «Blocked» — and `primary` keeps the face and draws the main colour around it,
38
+ for the one card on a screen that holds the next action. The card's heading says what the tone means; colour alone
39
+ does not. The tone paints the inner box, so a `--card-border-color` set on the host from outside (a theme sheet does)
40
+ does not cover it.
41
+
42
+ ```html
43
+ <u-card tone="warning"><h2 slot="header">Check these 2</h2>…</u-card>
44
+ <u-card tone="primary"><h2 slot="header">Next</h2>…<u-button>Assign 100 copies</u-button></u-card>
45
+ ```
46
+
36
47
  ---
37
48
 
38
49
  ## Slots
@@ -52,6 +63,7 @@ text unless the host has an `aria-label`, which moves to the link.
52
63
  | `shadowless` | `boolean` | `false` | ✓ | Remove drop shadow |
53
64
  | `appearance` | `'outlined'\|'plain'` | `'outlined'` | ✓ | `outlined` border and drop shadow · `plain` no border and no shadow (layout only) |
54
65
  | `hoverable` | `boolean` | `false` | ✓ | Lift effect on hover |
66
+ | `tone` | `'primary'\|'info'\|'success'\|'warning'\|'danger'` | — | ✓ | Emphasis — a status face and border, or (`primary`) a main-colour border |
55
67
  | `href` | `string` | — | ✓ | Makes the whole card a link to this URL |
56
68
  | `target` | `string` | — | | Link target (with `href`) |
57
69
  | `rel` | `string` | — | | Link relationship (with `href`) |
@@ -34,6 +34,23 @@ position ("2 of 5"). Name the carousel with `aria-label` on the host — a regio
34
34
  landmark. A `role`, `aria-roledescription` or `aria-label` you put on a slide is kept; only the empty
35
35
  ones are filled.
36
36
 
37
+ ### A rotating wall display — `pagination-style="labels"`
38
+
39
+ For a screen read from across a room, the dots are not enough: the viewer has to see which page this is, what comes
40
+ next and when it changes. `labels` draws a row under the slides (never over them — it would cover a list's last
41
+ row): each tab is named by its slide's `aria-label` (the position when there is none), the passed tabs are full, and
42
+ the current tab fills over `autoplay-interval` while the carousel rotates. When rotation stops, the fill stops too.
43
+
44
+ ```html
45
+ <u-carousel autoplay loop pagination pagination-style="labels" autoplay-interval="20000" aria-label="Floor board">
46
+ <section aria-label="Late">…</section>
47
+ <section aria-label="Stages">…</section>
48
+ <section aria-label="Batches">…</section>
49
+ </u-carousel>
50
+ ```
51
+
52
+ Give the carousel a height (`flex: 1` in a full-screen column, or a fixed height) — the row takes its share of it.
53
+
37
54
  ---
38
55
 
39
56
  ## Slots
@@ -51,6 +68,7 @@ ones are filled.
51
68
  | `loop` | `boolean` | `false` | Loop from last to first |
52
69
  | `navigation` | `boolean` | `false` | Show prev/next buttons |
53
70
  | `pagination` | `boolean` | `false` | Show dot pagination |
71
+ | `paginationStyle` | `'dots'\|'labels'` | `'dots'` | `pagination-style` — `labels` puts a row under the slides: each slide's name and a progress bar (see below) |
54
72
  | `draggable` | `boolean` | `false` | Drag to navigate |
55
73
  | `slidesPerView` | `number` | `1` | Visible slides at once |
56
74
  | `slidesPerMove` | `number` | `1` | Slides to advance per step |
@@ -73,5 +91,8 @@ ones are filled.
73
91
  | `prev-button` | Previous navigation button |
74
92
  | `next-button` | Next navigation button |
75
93
  | `indicator` | Pagination indicator wrapper |
76
- | `dot` | Individual pagination dot |
94
+ | `dot` | Individual pagination dot — with `labels`, one named tab |
95
+ | `dot-label` | A tab's name (`labels` only) |
96
+ | `dot-track` | A tab's progress track (`labels` only) |
97
+ | `dot-progress` | A tab's fill — runs over `autoplay-interval` on the current tab while rotating (`labels` only) |
77
98
  | `rotation-button` | Stop/start button (only with `autoplay`, inside the indicator) |
@@ -26,9 +26,26 @@ moving to the next step is the consumer's own action, placed beside it. For seve
26
26
  ```
27
27
 
28
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).
29
+ hold = warning tint, upcoming = empty ring, skipped = dashed ring. Assistive tech hears the current step through
30
+ `aria-current="step"` and complete/hold/skipped through a hidden status word (`stepComplete`,
31
+ `stepOnHold`, `stepSkipped` locale keys). `skipped` is a step this record's route does not have — an order with no
32
+ proof still shows «Proof», passed over.
33
+
34
+ ### Bars — `appearance="bars"`
35
+
36
+ Each step takes an equal column: a bar on top, the step's name and its description (a date) under it. The travelled
37
+ and current bars are filled, upcoming and skipped ones empty, a held step's bar is the warning colour; the current
38
+ step's name is bold. For a detail page's header, where seven steps each carry a date.
39
+
40
+ ```html
41
+ <u-steps appearance="bars" current="3" .items=${[
42
+ { label: 'Intake', description: '10/21' },
43
+ { label: 'Proof', description: 'none', status: 'skipped' },
44
+ { label: 'Check', description: '10/21' },
45
+ { label: 'Plate', description: '10/21 · batch 50' },
46
+ { label: 'Print' }, { label: 'Foil · pack' }, { label: 'Ship' },
47
+ ]}></u-steps>
48
+ ```
32
49
 
33
50
  ---
34
51
 
@@ -39,8 +56,9 @@ hold = warning tint, upcoming = empty ring. Assistive tech hears the current ste
39
56
  | `items` | `StepItem[]` | `[]` | — | `{ label, description?, status? }` (property only) |
40
57
  | `current` | `number` | — | — | Index of the current step; steps without `status` before it are `complete`, after it `upcoming` |
41
58
  | `label` | `string` | — | — | Track name shown at the start; also the list's accessible name |
59
+ | `appearance` | `'line'\|'bars'` | `'line'` | ✓ | `line` markers and connectors · `bars` a bar per step with the text under it |
42
60
 
43
- `StepStatus` = `'complete' | 'current' | 'hold' | 'upcoming'`. An item's own `status` wins over
61
+ `StepStatus` = `'complete' | 'current' | 'hold' | 'upcoming' | 'skipped'`. An item's own `status` wins over
44
62
  the inference from `current`.
45
63
 
46
64
  ## CSS Parts
@@ -64,3 +82,5 @@ the inference from `current`.
64
82
  | `--steps-connector-color` | Connector not yet travelled |
65
83
  | `--steps-connector-done-color` | Travelled connector and complete marker |
66
84
  | `--steps-label-width` | Width of the track name (default 56px) |
85
+ | `--steps-bar-height` | Bar thickness with `bars` (default 6px) |
86
+ | `--steps-bar-color` | Filled bar colour with `bars` (default the primary colour) |
@@ -61,6 +61,15 @@ changes**, because those targets are relative to the page background.
61
61
  > `iyu.base`, so an unlayered `:root` override applies in both themes. Scope a mode-specific value
62
62
  > yourself with `:root[theme="dark"] { … }`.
63
63
 
64
+ ## A screen with its own theme
65
+
66
+ `Theme.override('dark')` applies a theme to the document without touching the user's preference: nothing is stored,
67
+ `get()` still answers the preference, `resolved()` and `<html theme>` answer the override. `Theme.override(null)` clears
68
+ it and returns to the preference (under `'system'`, the OS value at that moment). A preference set while an override
69
+ is on waits until it is cleared. Use it for a screen that owns its background — a floor board on a TV stays dark even
70
+ where the user chose light — and clear it when that screen goes (`@iyulab/modern-app` does both for a route with
71
+ `metadata: { theme }`).
72
+
64
73
  ## API
65
74
 
66
75
  | Member | Type | Description |
@@ -69,6 +78,7 @@ changes**, because those targets are relative to the page background.
69
78
  | `Theme.get()` | `ThemeType \| undefined` | Get current theme |
70
79
  | `Theme.set(theme)` | `void` | Set theme (`'light'`, `'dark'`, `'system'`) |
71
80
  | `Theme.resolved()` | `'light' \| 'dark'` | The theme actually applied — use this, not `get()`, for brightness branches |
81
+ | `Theme.override(theme)` | `void` | Apply `'light'` / `'dark'` without changing or storing the preference; `null` returns to the preference |
72
82
  | `Theme.accent(seed)` | `void` | Derive the `--u-primary-*` ramp from a brand color; `null` clears it |
73
83
  | `Theme.isInitialized` | `boolean` | Whether `init()` has been called |
74
84