@waggylabs/yumekit 0.5.1 → 0.5.3
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 +24 -0
- package/README.md +54 -63
- package/dist/ai/llm.txt +14 -11
- package/dist/ai/skill/examples/nav-layout.html +5 -5
- package/dist/ai/skill/examples/themed-app.html +6 -6
- package/dist/ai/skill/patterns.md +7 -7
- package/dist/ai/skill/reference.md +21 -18
- package/dist/components/y-appbar.js +45 -16
- package/dist/components/y-banner.js +44 -15
- package/dist/components/y-button/y-button.d.ts +11 -4
- package/dist/components/y-button.d.ts +11 -4
- package/dist/components/y-button.js +43 -14
- package/dist/components/y-checkbox.js +7 -1
- package/dist/components/y-code.js +9 -2
- package/dist/components/y-color.js +12 -2
- package/dist/components/y-colorpicker.js +12 -2
- package/dist/components/y-data-grid.js +83 -35
- package/dist/components/y-date.js +72 -30
- package/dist/components/y-datepicker.js +72 -30
- package/dist/components/y-dialog.js +1 -1
- package/dist/components/y-help.js +46 -17
- package/dist/components/y-input.js +11 -1
- package/dist/components/y-paginator.js +46 -17
- package/dist/components/y-select.js +1 -1
- package/dist/components/y-sidebar.js +45 -16
- package/dist/components/y-tabs/y-tabs.d.ts +17 -0
- package/dist/components/y-tabs.d.ts +17 -0
- package/dist/components/y-tabs.js +193 -8
- package/dist/components/y-tag/y-tag.d.ts +9 -2
- package/dist/components/y-tag.d.ts +9 -2
- package/dist/components/y-tag.js +36 -8
- package/dist/components/y-textarea.js +11 -1
- package/dist/index.js +341 -63
- package/dist/react.d.ts +5 -0
- package/dist/yumekit.min.js +1 -1
- package/llm.txt +14 -11
- package/package.json +1 -1
- package/scripts/install-ai-docs.js +93 -72
package/CHANGELOG.md
CHANGED
|
@@ -31,6 +31,30 @@ Delete any empty sections before publishing.
|
|
|
31
31
|
<!-- ### Security -->
|
|
32
32
|
<!-- Vulnerability patches or hardening changes -->
|
|
33
33
|
|
|
34
|
+
## [0.5.3]
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- `y-button` and `y-tag` rename the `style-type` attribute to `variant`.
|
|
39
|
+
|
|
40
|
+
### Deprecated
|
|
41
|
+
|
|
42
|
+
- `y-button`'s and `y-tag`'s `style-type` attribute is deprecated in favor of `variant`; it still works (with `variant` taking precedence) but will be removed in a future major version.
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- `y-input`, `y-textarea`, and `y-checkbox` now respond to clicks across their full interactive area. Clicking anywhere in a `y-input`/`y-textarea` (padding and icon slots included) focuses the field, and clicking a `y-checkbox`'s label toggles it, matching the existing hover affordance and `y-radio`'s label behavior.
|
|
47
|
+
|
|
48
|
+
## [0.5.2] - 2026-06-27
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- `y-tabs` gains an `overflow` attribute: `scroll` (default) keeps tabs on a single line and shows prev/next arrow buttons when the strip overflows its container, while `wrap` lets tabs flow onto multiple rows.
|
|
53
|
+
|
|
54
|
+
### Changed
|
|
55
|
+
|
|
56
|
+
- `y-code` now scrolls its content within a height-constrained container — set a CSS `height` or `max-height` and the code area scrolls, where previously vertical scrolling only kicked in with `max-lines`.
|
|
57
|
+
|
|
34
58
|
## [0.5.1] - 2026-06-20
|
|
35
59
|
|
|
36
60
|
### Added
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ YumeKit is a collection of 51 production-ready components built with native Web
|
|
|
21
21
|
|
|
22
22
|
- **Zero dependencies** — built entirely on web standards
|
|
23
23
|
- **Framework-agnostic** — works with React, Vue, Svelte, or plain HTML
|
|
24
|
-
- **Themeable** —
|
|
24
|
+
- **Themeable** — 60 built-in themes plus support for fully custom themes
|
|
25
25
|
- **Accessible** — ARIA-compliant, keyboard navigable, form-associated inputs
|
|
26
26
|
- **Tree-shakeable** — import only the components you use
|
|
27
27
|
|
|
@@ -73,68 +73,59 @@ Then use the `<y-theme>` component to apply a theme:
|
|
|
73
73
|
|
|
74
74
|
## Components
|
|
75
75
|
|
|
76
|
-
| Component
|
|
77
|
-
|
|
|
78
|
-
| Animate
|
|
79
|
-
| App Bar
|
|
80
|
-
| Avatar
|
|
81
|
-
| Avatar Group
|
|
82
|
-
| Badge
|
|
83
|
-
| Banner
|
|
84
|
-
| Break
|
|
85
|
-
| Breadcrumbs
|
|
86
|
-
| Button
|
|
87
|
-
| Button Group
|
|
88
|
-
| Card
|
|
89
|
-
| Checkbox
|
|
90
|
-
| Code
|
|
91
|
-
| Color
|
|
92
|
-
| Color Picker
|
|
93
|
-
| Data Grid
|
|
94
|
-
| Date
|
|
95
|
-
| DatePicker
|
|
96
|
-
| Dialog
|
|
97
|
-
| Dock
|
|
98
|
-
| Drawer
|
|
99
|
-
| Droplist
|
|
100
|
-
| Gallery
|
|
101
|
-
| Grid
|
|
102
|
-
| Help
|
|
103
|
-
| Icon
|
|
104
|
-
| Input
|
|
105
|
-
| Masonry
|
|
106
|
-
| Menu
|
|
107
|
-
| Paginator
|
|
108
|
-
| Panel Bar
|
|
109
|
-
| Popover
|
|
110
|
-
| Progress
|
|
111
|
-
| Radio
|
|
112
|
-
| Rating
|
|
113
|
-
| Select
|
|
114
|
-
| Shape
|
|
115
|
-
| Sidebar
|
|
116
|
-
| Slider
|
|
117
|
-
| Splitter
|
|
118
|
-
| Stack
|
|
119
|
-
| Stepper
|
|
120
|
-
| Switch
|
|
121
|
-
| Table
|
|
122
|
-
| Tabs
|
|
123
|
-
| Tag
|
|
124
|
-
| Textarea
|
|
125
|
-
| Theme
|
|
126
|
-
| Toast
|
|
127
|
-
| Tooltip
|
|
128
|
-
| Tree
|
|
129
|
-
|
|
130
|
-
### Sub-elements
|
|
131
|
-
|
|
132
|
-
These are building blocks used inside their parent component, not standalone components (and not included in the count above):
|
|
133
|
-
|
|
134
|
-
| Element | Used inside | Description |
|
|
135
|
-
| --------------- | -------------- | -------------------------------- |
|
|
136
|
-
| `<y-panel>` | `<y-panelbar>` | Individual accordion panel |
|
|
137
|
-
| `<y-tree-item>` | `<y-tree>` | Individual node within a tree |
|
|
76
|
+
| Component | Element | Description |
|
|
77
|
+
| ------------ | ------------------ | ------------------------------------------------------ |
|
|
78
|
+
| Animate | `<y-animate>` | Scroll/viewport-triggered animation wrapper |
|
|
79
|
+
| App Bar | `<y-appbar>` | Top or side navigation bar |
|
|
80
|
+
| Avatar | `<y-avatar>` | User avatar with shape and color variants |
|
|
81
|
+
| Avatar Group | `<y-avatar-group>` | Overlapping avatar group with overflow count |
|
|
82
|
+
| Badge | `<y-badge>` | Status badge or label |
|
|
83
|
+
| Banner | `<y-banner>` | Full-width inline message / alert banner |
|
|
84
|
+
| Break | `<y-break>` | Divider with optional centered label, icon, or slot |
|
|
85
|
+
| Breadcrumbs | `<y-breadcrumbs>` | Navigation breadcrumb trail with collapse support |
|
|
86
|
+
| Button | `<y-button>` | Button with icon, size, and style variants |
|
|
87
|
+
| Button Group | `<y-button-group>` | Groups buttons (or inputs) into a connected toolbar |
|
|
88
|
+
| Card | `<y-card>` | Content card container |
|
|
89
|
+
| Checkbox | `<y-checkbox>` | Form checkbox input |
|
|
90
|
+
| Code | `<y-code>` | Code block with built-in syntax highlighting |
|
|
91
|
+
| Color | `<y-color>` | Color swatch / value display |
|
|
92
|
+
| Color Picker | `<y-colorpicker>` | Interactive color picker |
|
|
93
|
+
| Data Grid | `<y-data-grid>` | Data grid with sorting, filtering, editing, pagination |
|
|
94
|
+
| Date | `<y-date>` | Date input |
|
|
95
|
+
| DatePicker | `<y-datepicker>` | A date and time picker |
|
|
96
|
+
| Dialog | `<y-dialog>` | Modal dialog |
|
|
97
|
+
| Dock | `<y-dock>` | Fixed navigation dock |
|
|
98
|
+
| Drawer | `<y-drawer>` | Side drawer / sidebar |
|
|
99
|
+
| Droplist | `<y-droplist>` | Drag-and-drop reorderable list |
|
|
100
|
+
| Gallery | `<y-gallery>` | Media gallery with lightbox |
|
|
101
|
+
| Grid | `<y-grid>` | CSS Grid layout container |
|
|
102
|
+
| Help | `<y-help>` | Guided product tour / onboarding walkthrough |
|
|
103
|
+
| Icon | `<y-icon>` | SVG icon display |
|
|
104
|
+
| Input | `<y-input>` | Text input field |
|
|
105
|
+
| Masonry | `<y-masonry>` | JS-positioned masonry layout |
|
|
106
|
+
| Menu | `<y-menu>` | Dropdown navigation menu |
|
|
107
|
+
| Paginator | `<y-paginator>` | Pagination controls |
|
|
108
|
+
| Panel Bar | `<y-panelbar>` | Accordion panel group |
|
|
109
|
+
| Popover | `<y-popover>` | Anchored floating popover |
|
|
110
|
+
| Progress | `<y-progress>` | Progress bar |
|
|
111
|
+
| Radio | `<y-radio>` | Radio button input |
|
|
112
|
+
| Rating | `<y-rating>` | Star / icon rating input |
|
|
113
|
+
| Select | `<y-select>` | Select / dropdown input |
|
|
114
|
+
| Shape | `<y-shape>` | Decorative CSS shape container |
|
|
115
|
+
| Sidebar | `<y-sidebar>` | Collapsible app sidebar navigation |
|
|
116
|
+
| Slider | `<y-slider>` | Range slider input |
|
|
117
|
+
| Splitter | `<y-splitter>` | Two-pane container with a draggable resize handle |
|
|
118
|
+
| Stack | `<y-stack>` | Flexbox layout container (row or column) |
|
|
119
|
+
| Stepper | `<y-stepper>` | Multi-step wizard with sequential flow |
|
|
120
|
+
| Switch | `<y-switch>` | Toggle switch |
|
|
121
|
+
| Table | `<y-table>` | Sortable data table |
|
|
122
|
+
| Tabs | `<y-tabs>` | Tabbed interface |
|
|
123
|
+
| Tag | `<y-tag>` | Tag / chip label |
|
|
124
|
+
| Textarea | `<y-textarea>` | Multi-line text input |
|
|
125
|
+
| Theme | `<y-theme>` | Theme provider |
|
|
126
|
+
| Toast | `<y-toast>` | Notification toast |
|
|
127
|
+
| Tooltip | `<y-tooltip>` | Tooltip / popover |
|
|
128
|
+
| Tree | `<y-tree>` | Hierarchical tree view |
|
|
138
129
|
|
|
139
130
|
---
|
|
140
131
|
|
package/dist/ai/llm.txt
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
A modern, framework-agnostic Web Components UI kit providing 51 production-ready custom HTML elements. Built entirely on native web standards with zero external runtime dependencies.
|
|
4
4
|
|
|
5
5
|
## Version
|
|
6
|
-
0.5.
|
|
6
|
+
0.5.3
|
|
7
7
|
|
|
8
8
|
## License
|
|
9
9
|
MIT
|
|
@@ -158,7 +158,8 @@ Tag: `<y-button>`
|
|
|
158
158
|
Attributes:
|
|
159
159
|
- `color` — predefined scheme (`"base"` | `"primary"` | `"secondary"` | `"success"` | `"warning"` | `"error"` | `"help"`) or any CSS color (`#hex`, `rgb()`, `hsl()`)
|
|
160
160
|
- `size` — `"small"` | `"medium"` (default) | `"large"`
|
|
161
|
-
- `
|
|
161
|
+
- `variant` — `"outlined"` (default) | `"filled"` | `"flat"`
|
|
162
|
+
- `style-type` — **deprecated** alias for `variant`; still honored (with `variant` winning if both are set) but will be removed in a future major version
|
|
162
163
|
- `padding-mode` — `"auto"` (default) | `"square"` | `"wide"`. Controls whether the inline padding collapses to the block value: `auto` does so for icon-only buttons; `square` forces it (e.g. paginator number buttons); `wide` never does
|
|
163
164
|
- `left-icon` — icon name (from registry)
|
|
164
165
|
- `right-icon` — icon name (from registry)
|
|
@@ -176,7 +177,7 @@ Attributes:
|
|
|
176
177
|
<y-button href="/docs" target="_blank" rel="noopener">Docs</y-button>
|
|
177
178
|
```
|
|
178
179
|
|
|
179
|
-
CSS Custom Properties (per `small|medium|large`): `--component-button-padding-{size}` sets padding on all sides; `--component-button-padding-block-{size}` and `--component-button-padding-inline-{size}` override the vertical / horizontal axes independently and fall back to `--component-button-padding-{size}` when unset (the Material and Shadcn themes use this for wider buttons). Whether the inline axis collapses to the block value is governed by the `padding-mode` attribute above (default `auto` = collapse for icon-only buttons). `--component-control-height-{size}` sets the min-height (shared with `y-input` so fields and buttons stay the same height per theme); falls back to `--sizing-{size}`. For `
|
|
180
|
+
CSS Custom Properties (per `small|medium|large`): `--component-button-padding-{size}` sets padding on all sides; `--component-button-padding-block-{size}` and `--component-button-padding-inline-{size}` override the vertical / horizontal axes independently and fall back to `--component-button-padding-{size}` when unset (the Material and Shadcn themes use this for wider buttons). Whether the inline axis collapses to the block value is governed by the `padding-mode` attribute above (default `auto` = collapse for icon-only buttons). `--component-control-height-{size}` sets the min-height (shared with `y-input` so fields and buttons stay the same height per theme); falls back to `--sizing-{size}`. For `variant="outlined"`, the border is sourced from the button's matching semantic border token (`--base-border`, `--primary-border`, `--error-border`, …) per `color`, falling back to the button's text color when that token is unset. `--component-button-border-width` sets the border width and is applied as the `border-width` longhand (not baked into a shorthand), so it accepts a 1–4 value pattern for per-side widths (e.g. `1px 2px` or `0 0 2px 0` for a bottom-only border); defaults to `1px`. Two optional global overrides remain: `--component-button-outline-border` overrides the border style + color as a CSS `border` shorthand (e.g. `1px solid var(--base-border)`) — note its width is superseded by `--component-button-border-width` — and `--component-button-outline-border-color` sets just the border color across resting/hover/focus/active — set either via CSS or a scoped `y-theme` to flatten all outlined borders to one color.
|
|
180
181
|
|
|
181
182
|
---
|
|
182
183
|
|
|
@@ -779,7 +780,8 @@ Tag: `<y-tag>`
|
|
|
779
780
|
Attributes:
|
|
780
781
|
- `color` — predefined scheme or CSS color (`#hex`, `rgb()`, `hsl()`). For `filled`, text is auto-contrasted via WCAG luminance. For `flat`, background is a 20% tint via `color-mix()`.
|
|
781
782
|
- `size` — `"small"` | `"medium"` | `"large"`
|
|
782
|
-
- `
|
|
783
|
+
- `variant` — `"filled"` (default) | `"outlined"` | `"flat"`
|
|
784
|
+
- `style-type` — **deprecated** alias for `variant`; still honored (with `variant` winning if both are set) but will be removed in a future major version
|
|
783
785
|
- `shape` — `"square"` (default) | `"round"`
|
|
784
786
|
- `removable` — boolean, shows close button
|
|
785
787
|
|
|
@@ -789,8 +791,8 @@ The `flat` style uses `--{color}-background-app` as the background, so it automa
|
|
|
789
791
|
|
|
790
792
|
```html
|
|
791
793
|
<y-tag color="primary" removable>JavaScript</y-tag>
|
|
792
|
-
<y-tag color="success"
|
|
793
|
-
<y-tag color="base"
|
|
794
|
+
<y-tag color="success" variant="outlined" shape="round">Active</y-tag>
|
|
795
|
+
<y-tag color="base" variant="flat">Draft</y-tag>
|
|
794
796
|
```
|
|
795
797
|
|
|
796
798
|
---
|
|
@@ -976,7 +978,7 @@ CSS Custom Properties: `--component-popover-background`, `--component-popover-co
|
|
|
976
978
|
<strong slot="header">Confirm change</strong>
|
|
977
979
|
<p>Saving will overwrite the existing layout.</p>
|
|
978
980
|
<div slot="footer">
|
|
979
|
-
<y-button size="small"
|
|
981
|
+
<y-button size="small" variant="outlined">Cancel</y-button>
|
|
980
982
|
<y-button size="small" color="primary">Save</y-button>
|
|
981
983
|
</div>
|
|
982
984
|
</y-popover>
|
|
@@ -1470,7 +1472,7 @@ CSS Custom Properties: `--component-dock-height`, `--component-dock-height-{smal
|
|
|
1470
1472
|
|
|
1471
1473
|
```html
|
|
1472
1474
|
<y-dock
|
|
1473
|
-
items='[{"name":"Home","icon":"home","href":"/","selected":true},{"name":"Search","icon":"
|
|
1475
|
+
items='[{"name":"Home","icon":"home","href":"/","selected":true},{"name":"Search","icon":"magnifying-glass","href":"/search"},{"name":"Profile","icon":"gear","href":"/profile"}]'
|
|
1474
1476
|
></y-dock>
|
|
1475
1477
|
```
|
|
1476
1478
|
|
|
@@ -1481,7 +1483,7 @@ Dropdown menu. Positioned relative to an anchor element. Items can be defined vi
|
|
|
1481
1483
|
|
|
1482
1484
|
Tag: `<y-menu>`
|
|
1483
1485
|
Attributes:
|
|
1484
|
-
- `items` — JSON string: `[{"text": "Edit", "value": "edit", "href": "...", "icon": "
|
|
1486
|
+
- `items` — JSON string: `[{"text": "Edit", "value": "edit", "href": "...", "icon": "pencil", "slot": "name", "selected": true, "children": [...]}, ...]`
|
|
1485
1487
|
- `anchor` — element ID (no `#`) of the trigger element; clicking the anchor toggles the menu automatically (no manual listener needed). A disabled anchor (native `disabled`, a reflected `disabled` attribute on a custom element like `y-button`, or `aria-disabled="true"`) will not open the menu.
|
|
1486
1488
|
- `visible` — boolean
|
|
1487
1489
|
- `direction` — `"down"` (default) | `"up"` | `"left"` | `"right"`
|
|
@@ -1498,7 +1500,7 @@ Item object fields:
|
|
|
1498
1500
|
- `text` — display text
|
|
1499
1501
|
- `value` — value reported in the `select` event (defaults to `text`)
|
|
1500
1502
|
- `href` — optional navigation URL
|
|
1501
|
-
- `icon` — icon name rendered via `<y-icon>` (e.g. `"
|
|
1503
|
+
- `icon` — icon name rendered via `<y-icon>` (e.g. `"pencil"`, `"trash"`)
|
|
1502
1504
|
- `slot` — named slot in light DOM whose content replaces this item's default content
|
|
1503
1505
|
- `selected` — boolean, highlights the active item
|
|
1504
1506
|
- `children` — array of sub-items (nested submenu)
|
|
@@ -1657,6 +1659,7 @@ Attributes:
|
|
|
1657
1659
|
- `position` — `"top"` (default) | `"bottom"` | `"left"` | `"right"`
|
|
1658
1660
|
- `size` — `"small"` | `"medium"` | `"large"`
|
|
1659
1661
|
- `variant` — `"default"` (default, bordered boxes) | `"accent"` (minimal tabs; the active tab shows a primary-colored indicator border on its content-facing edge — bottom for `top` tabs, top for `bottom`, etc. — like Material/Carbon)
|
|
1662
|
+
- `overflow` — `"scroll"` (default; tabs stay on one line and prev/next arrow buttons appear when the strip overflows its container) | `"wrap"` (tabs flow onto multiple rows, or columns for `left`/`right` positions)
|
|
1660
1663
|
|
|
1661
1664
|
Methods: `activateTab(id)`
|
|
1662
1665
|
|
|
@@ -1815,7 +1818,7 @@ Keyboard: ArrowUp/Down move between visible items; ArrowRight expands or focuses
|
|
|
1815
1818
|
```html
|
|
1816
1819
|
<y-tree route-match="prefix" style="width:280px">
|
|
1817
1820
|
<y-tree-item href="/docs" expanded>
|
|
1818
|
-
<y-icon slot="icon" name="
|
|
1821
|
+
<y-icon slot="icon" name="folder" size="small"></y-icon>
|
|
1819
1822
|
<span slot="label">Docs</span>
|
|
1820
1823
|
<y-tree-item slot="children" href="/docs/install">
|
|
1821
1824
|
<span slot="label">Installation</span>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
<nav slot="nav">
|
|
38
38
|
<y-button style-type="flat" left-icon="home">Dashboard</y-button>
|
|
39
|
-
<y-button style-type="flat" left-icon="
|
|
39
|
+
<y-button style-type="flat" left-icon="diagram">Reports</y-button>
|
|
40
40
|
</nav>
|
|
41
41
|
|
|
42
42
|
<div slot="actions" style="display:flex; align-items:center; gap:0.5rem;">
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
<!-- User menu -->
|
|
51
51
|
<y-menu position="bottom-right">
|
|
52
52
|
<y-avatar slot="trigger" alt="JD" color="secondary" size="small" style="cursor:pointer;"></y-avatar>
|
|
53
|
-
<y-button style-type="flat" left-icon="
|
|
54
|
-
<y-button style-type="flat" left-icon="
|
|
53
|
+
<y-button style-type="flat" left-icon="gear">Settings</y-button>
|
|
54
|
+
<y-button style-type="flat" left-icon="x">Sign Out</y-button>
|
|
55
55
|
</y-menu>
|
|
56
56
|
</div>
|
|
57
57
|
</y-appbar>
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
<y-drawer id="sidebar" position="left" modal>
|
|
61
61
|
<nav class="drawer-nav">
|
|
62
62
|
<y-button style-type="flat" left-icon="home">Dashboard</y-button>
|
|
63
|
-
<y-button style-type="flat" left-icon="
|
|
64
|
-
<y-button style-type="flat" left-icon="
|
|
63
|
+
<y-button style-type="flat" left-icon="diagram">Reports</y-button>
|
|
64
|
+
<y-button style-type="flat" left-icon="gear">Settings</y-button>
|
|
65
65
|
</nav>
|
|
66
66
|
</y-drawer>
|
|
67
67
|
|
|
@@ -89,15 +89,15 @@
|
|
|
89
89
|
<!-- Icons tab -->
|
|
90
90
|
<div slot="icons" style="display:flex; gap:1rem; flex-wrap:wrap; padding-top:1rem; align-items:center;">
|
|
91
91
|
<y-icon name="home" size="large" label="Home"></y-icon>
|
|
92
|
-
<y-icon name="
|
|
92
|
+
<y-icon name="gear" size="large" label="Settings"></y-icon>
|
|
93
93
|
<y-icon name="bell" size="large" color="warning" label="Notifications"></y-icon>
|
|
94
94
|
<y-icon name="check" size="large" color="success" label="Success"></y-icon>
|
|
95
|
-
<y-icon name="
|
|
96
|
-
<y-icon name="info" size="large" color="primary" label="Info"></y-icon>
|
|
97
|
-
<y-icon name="
|
|
95
|
+
<y-icon name="x" size="large" color="error" label="Close"></y-icon>
|
|
96
|
+
<y-icon name="circle-info" size="large" color="primary" label="Info"></y-icon>
|
|
97
|
+
<y-icon name="magnifying-glass" size="large" label="Search"></y-icon>
|
|
98
98
|
<y-icon name="trash" size="large" color="error" label="Delete"></y-icon>
|
|
99
|
-
<y-icon name="
|
|
100
|
-
<y-icon name="
|
|
99
|
+
<y-icon name="pencil" size="large" color="secondary" label="Edit"></y-icon>
|
|
100
|
+
<y-icon name="down-to-bracket" size="large" color="primary" label="Download"></y-icon>
|
|
101
101
|
</div>
|
|
102
102
|
</y-tabs>
|
|
103
103
|
</div>
|
|
@@ -18,7 +18,7 @@ Common multi-component patterns. Adapt these for specific use cases.
|
|
|
18
18
|
<y-appbar
|
|
19
19
|
orientation="horizontal"
|
|
20
20
|
sticky="start"
|
|
21
|
-
items='[{"text":"Dashboard","icon":"home","href":"/"},{"text":"Reports","icon":"
|
|
21
|
+
items='[{"text":"Dashboard","icon":"home","href":"/"},{"text":"Reports","icon":"diagram","href":"/reports"},{"text":"Settings","icon":"gear","href":"/settings"}]'
|
|
22
22
|
>
|
|
23
23
|
<y-icon slot="logo" name="bolt" size="medium"></y-icon>
|
|
24
24
|
<span slot="title">MyApp</span>
|
|
@@ -48,7 +48,7 @@ Common multi-component patterns. Adapt these for specific use cases.
|
|
|
48
48
|
<y-appbar
|
|
49
49
|
orientation="vertical"
|
|
50
50
|
sticky="start"
|
|
51
|
-
items='[{"text":"Dashboard","icon":"home","href":"/"},{"text":"Reports","icon":"
|
|
51
|
+
items='[{"text":"Dashboard","icon":"home","href":"/"},{"text":"Reports","icon":"diagram","href":"/reports"},{"text":"Settings","icon":"gear","href":"/settings"}]'
|
|
52
52
|
>
|
|
53
53
|
<y-icon slot="logo" name="bolt" size="medium"></y-icon>
|
|
54
54
|
<span slot="title">MyApp</span>
|
|
@@ -85,7 +85,7 @@ Common multi-component patterns. Adapt these for specific use cases.
|
|
|
85
85
|
<y-button type="submit" color="primary">Sign In</y-button>
|
|
86
86
|
</form>
|
|
87
87
|
|
|
88
|
-
<y-button slot="footer"
|
|
88
|
+
<y-button slot="footer" variant="flat">Forgot password?</y-button>
|
|
89
89
|
</y-card>
|
|
90
90
|
</div>
|
|
91
91
|
|
|
@@ -128,7 +128,7 @@ Common multi-component patterns. Adapt these for specific use cases.
|
|
|
128
128
|
<y-dialog id="delete-dialog" persistent>
|
|
129
129
|
<span slot="header">Confirm Delete</span>
|
|
130
130
|
<p>This action cannot be undone. Are you sure?</p>
|
|
131
|
-
<y-button slot="footer" id="cancel-btn"
|
|
131
|
+
<y-button slot="footer" id="cancel-btn" variant="outlined">Cancel</y-button>
|
|
132
132
|
<y-button slot="footer" id="confirm-btn" color="error">Delete</y-button>
|
|
133
133
|
</y-dialog>
|
|
134
134
|
|
|
@@ -186,13 +186,13 @@ Common multi-component patterns. Adapt these for specific use cases.
|
|
|
186
186
|
|
|
187
187
|
<y-panel label="Danger Zone">
|
|
188
188
|
<div style="padding:1rem 0;">
|
|
189
|
-
<y-button color="error"
|
|
189
|
+
<y-button color="error" variant="outlined">Delete Account</y-button>
|
|
190
190
|
</div>
|
|
191
191
|
</y-panel>
|
|
192
192
|
</y-panelbar>
|
|
193
193
|
|
|
194
194
|
<div style="margin-top:1rem; display:flex; justify-content:flex-end; gap:0.5rem;">
|
|
195
|
-
<y-button
|
|
195
|
+
<y-button variant="outlined">Cancel</y-button>
|
|
196
196
|
<y-button type="submit" color="primary">Save Changes</y-button>
|
|
197
197
|
</div>
|
|
198
198
|
</form>
|
|
@@ -256,7 +256,7 @@ function confirmAction(message) {
|
|
|
256
256
|
dialog.innerHTML = `
|
|
257
257
|
<span slot="header">Confirm</span>
|
|
258
258
|
<p>${message}</p>
|
|
259
|
-
<y-button slot="footer" id="cancel"
|
|
259
|
+
<y-button slot="footer" id="cancel" variant="outlined">Cancel</y-button>
|
|
260
260
|
<y-button slot="footer" id="confirm" color="primary">Confirm</y-button>
|
|
261
261
|
`;
|
|
262
262
|
document.body.appendChild(dialog);
|
|
@@ -139,7 +139,8 @@ When `href` is set, the internal element renders as `<a>` instead of `<button>`
|
|
|
139
139
|
| ------------ | -------------------------------------------------------------------------------------- |
|
|
140
140
|
| `color` | `base` \| `primary` \| `secondary` \| `success` \| `warning` \| `error` \| `help` |
|
|
141
141
|
| `size` | `small` \| `medium` \| `large` |
|
|
142
|
-
| `
|
|
142
|
+
| `variant` | `outlined` (default) \| `filled` \| `flat` |
|
|
143
|
+
| `style-type` | **deprecated** alias for `variant` (still honored; `variant` wins if both set) — removed in a future major version |
|
|
143
144
|
| `padding-mode` | `auto` (default) \| `square` \| `wide` — `square` forces equal block/inline padding (e.g. paginator numbers), `wide` keeps inline padding even when icon-only, `auto` squares icon-only buttons |
|
|
144
145
|
| `disabled` | boolean |
|
|
145
146
|
| `type` | `button` (default) \| `submit` \| `reset` — ignored when `href` is set |
|
|
@@ -158,7 +159,7 @@ Slots: default (label), `left-icon`, `right-icon`
|
|
|
158
159
|
</y-button>
|
|
159
160
|
|
|
160
161
|
<!-- Link button — renders <a href="/docs"> internally -->
|
|
161
|
-
<y-button href="/docs" color="primary"
|
|
162
|
+
<y-button href="/docs" color="primary" variant="outlined"
|
|
162
163
|
>Documentation</y-button
|
|
163
164
|
>
|
|
164
165
|
|
|
@@ -167,7 +168,7 @@ Slots: default (label), `left-icon`, `right-icon`
|
|
|
167
168
|
href="https://example.com"
|
|
168
169
|
target="_blank"
|
|
169
170
|
rel="noopener noreferrer"
|
|
170
|
-
|
|
171
|
+
variant="flat"
|
|
171
172
|
>
|
|
172
173
|
External
|
|
173
174
|
<y-icon slot="right-icon" name="arrow-right" size="small"></y-icon>
|
|
@@ -177,7 +178,7 @@ Slots: default (label), `left-icon`, `right-icon`
|
|
|
177
178
|
<y-button href="/restricted" disabled>Unavailable</y-button>
|
|
178
179
|
```
|
|
179
180
|
|
|
180
|
-
CSS Custom Properties (per `small|medium|large`): `--component-button-padding-{size}` (all sides), and `--component-button-padding-block-{size}` / `--component-button-padding-inline-{size}` to override the vertical / horizontal axes independently (fall back to `--component-button-padding-{size}`). The `padding-mode` attribute governs whether the inline axis collapses to the block value (default `auto` = collapse for icon-only buttons). `--component-control-height-{size}` sets min-height (shared with `y-input`; falls back to `--sizing-{size}`). For `
|
|
181
|
+
CSS Custom Properties (per `small|medium|large`): `--component-button-padding-{size}` (all sides), and `--component-button-padding-block-{size}` / `--component-button-padding-inline-{size}` to override the vertical / horizontal axes independently (fall back to `--component-button-padding-{size}`). The `padding-mode` attribute governs whether the inline axis collapses to the block value (default `auto` = collapse for icon-only buttons). `--component-control-height-{size}` sets min-height (shared with `y-input`; falls back to `--sizing-{size}`). For `variant="outlined"`: the border is sourced from the button's matching semantic border token (`--base-border`, `--error-border`, …) per `color`, falling back to the text color when that token is unset. `--component-button-border-width` (applied as the `border-width` longhand, default `1px`) accepts a 1–4 value pattern for per-side widths (e.g. `0 0 2px 0`). Optional global overrides: `--component-button-outline-border` (border style + color as a CSS `border` shorthand; its width is superseded by `--component-button-border-width`) and `--component-button-outline-border-color` (border color across all states) — set via CSS or a scoped `y-theme`.
|
|
181
182
|
|
|
182
183
|
---
|
|
183
184
|
|
|
@@ -208,8 +209,8 @@ Slot: default (accepts any child elements — typically `y-button`, `y-input`, o
|
|
|
208
209
|
<!-- Mixed: input + button (search bar) -->
|
|
209
210
|
<y-button-group>
|
|
210
211
|
<y-input placeholder="Search…"></y-input>
|
|
211
|
-
<y-button
|
|
212
|
-
<y-icon slot="left-icon" name="
|
|
212
|
+
<y-button variant="filled" color="primary">
|
|
213
|
+
<y-icon slot="left-icon" name="magnifying-glass" size="small"></y-icon>
|
|
213
214
|
</y-button>
|
|
214
215
|
</y-button-group>
|
|
215
216
|
```
|
|
@@ -683,7 +684,8 @@ Slots: default (the element the badge overlays)
|
|
|
683
684
|
| ------------ | ------------------------------------------ |
|
|
684
685
|
| `color` | color scheme name |
|
|
685
686
|
| `size` | `small` \| `medium` \| `large` |
|
|
686
|
-
| `
|
|
687
|
+
| `variant` | `filled` (default) \| `outlined` \| `flat` |
|
|
688
|
+
| `style-type` | **deprecated** alias for `variant` (still honored; `variant` wins if both set) — removed in a future major version |
|
|
687
689
|
| `shape` | `square` (default) \| `round` |
|
|
688
690
|
| `removable` | boolean — shows close button |
|
|
689
691
|
|
|
@@ -693,8 +695,8 @@ Slot: default (label text)
|
|
|
693
695
|
|
|
694
696
|
```html
|
|
695
697
|
<y-tag color="primary" removable>JavaScript</y-tag>
|
|
696
|
-
<y-tag color="success"
|
|
697
|
-
<y-tag color="base"
|
|
698
|
+
<y-tag color="success" variant="outlined" shape="round">Active</y-tag>
|
|
699
|
+
<y-tag color="base" variant="flat">Draft</y-tag>
|
|
698
700
|
```
|
|
699
701
|
|
|
700
702
|
---
|
|
@@ -769,7 +771,7 @@ Slot: default (trigger element)
|
|
|
769
771
|
|
|
770
772
|
```html
|
|
771
773
|
<y-tooltip text="Remove this item" position="top">
|
|
772
|
-
<y-button color="error"
|
|
774
|
+
<y-button color="error" variant="flat"
|
|
773
775
|
><y-icon name="trash"></y-icon
|
|
774
776
|
></y-button>
|
|
775
777
|
</y-tooltip>
|
|
@@ -973,8 +975,8 @@ Slots: `header`, `body`, `footer` — **named slots only**; content without a `s
|
|
|
973
975
|
<y-drawer id="nav-drawer" position="left" anchor="open-nav-btn">
|
|
974
976
|
<strong slot="header">Navigation</strong>
|
|
975
977
|
<nav slot="body">
|
|
976
|
-
<y-button
|
|
977
|
-
<y-button
|
|
978
|
+
<y-button variant="flat">Dashboard</y-button>
|
|
979
|
+
<y-button variant="flat">Settings</y-button>
|
|
978
980
|
</nav>
|
|
979
981
|
</y-drawer>
|
|
980
982
|
|
|
@@ -1163,7 +1165,7 @@ Slots: `header`, `body`, `footer` — **named slots only**; content without a `s
|
|
|
1163
1165
|
<y-dialog id="confirm-dialog">
|
|
1164
1166
|
<span slot="header">Confirm Delete</span>
|
|
1165
1167
|
<p slot="body">This action cannot be undone.</p>
|
|
1166
|
-
<y-button slot="footer"
|
|
1168
|
+
<y-button slot="footer" variant="outlined">Cancel</y-button>
|
|
1167
1169
|
<y-button slot="footer" color="error">Delete</y-button>
|
|
1168
1170
|
</y-dialog>
|
|
1169
1171
|
|
|
@@ -1209,17 +1211,17 @@ Fixed navigation bar (dock) for primary app navigation. Displays icon+label item
|
|
|
1209
1211
|
```html
|
|
1210
1212
|
<!-- Basic bottom dock -->
|
|
1211
1213
|
<y-dock
|
|
1212
|
-
items='[{"name":"Home","icon":"home","href":"/","selected":true},{"name":"Search","icon":"
|
|
1214
|
+
items='[{"name":"Home","icon":"home","href":"/","selected":true},{"name":"Search","icon":"magnifying-glass","href":"/search"},{"name":"Profile","icon":"gear","href":"/profile"}]'
|
|
1213
1215
|
></y-dock>
|
|
1214
1216
|
|
|
1215
1217
|
<!-- Per-item custom slot template -->
|
|
1216
1218
|
<y-dock
|
|
1217
|
-
items='[{"name":"Home","icon":"home","href":"/"},{"name":"Create","icon":"plus","slot":"create-action"},{"name":"Profile","icon":"
|
|
1219
|
+
items='[{"name":"Home","icon":"home","href":"/"},{"name":"Create","icon":"plus","slot":"create-action"},{"name":"Profile","icon":"gear","href":"/profile"}]'
|
|
1218
1220
|
>
|
|
1219
1221
|
<y-button
|
|
1220
1222
|
slot="create-action"
|
|
1221
1223
|
color="primary"
|
|
1222
|
-
|
|
1224
|
+
variant="filled"
|
|
1223
1225
|
size="small"
|
|
1224
1226
|
left-icon="plus"
|
|
1225
1227
|
>Create</y-button
|
|
@@ -1363,6 +1365,7 @@ Methods: `.show(opts)` — **single options object**: `{ message, color, duratio
|
|
|
1363
1365
|
| `position` | `top` (default) \| `bottom` \| `left` \| `right` |
|
|
1364
1366
|
| `size` | `small` \| `medium` \| `large` |
|
|
1365
1367
|
| `variant` | `default` (bordered boxes) \| `accent` (minimal tabs; active tab shows a primary indicator border on its content-facing edge, like Material/Carbon) |
|
|
1368
|
+
| `overflow` | `scroll` (default; one line + prev/next arrows when the strip overflows) \| `wrap` (tabs flow onto multiple rows/columns) |
|
|
1366
1369
|
|
|
1367
1370
|
Options object shape: `{"id":"tab1","label":"Tab 1","slot":"tab1","disabled":false,"leftIcon":"home","rightIcon":"arrow-right"}` — `id`, `label`, and `slot` are required; `disabled`, `leftIcon`, `rightIcon` are optional.
|
|
1368
1371
|
|
|
@@ -1727,7 +1730,7 @@ CSS Parts: `tree`
|
|
|
1727
1730
|
```html
|
|
1728
1731
|
<y-tree route-match="prefix" style="width:280px">
|
|
1729
1732
|
<y-tree-item href="/docs" expanded>
|
|
1730
|
-
<y-icon slot="icon" name="
|
|
1733
|
+
<y-icon slot="icon" name="folder" size="small"></y-icon>
|
|
1731
1734
|
<span slot="label">Docs</span>
|
|
1732
1735
|
<y-tree-item slot="children" href="/docs/install">
|
|
1733
1736
|
<span slot="label">Installation</span>
|
|
@@ -1850,7 +1853,7 @@ Accessibility: non-modal uses `role="tooltip"`; modal uses `role="dialog"` + `ar
|
|
|
1850
1853
|
<strong slot="header">Confirm change</strong>
|
|
1851
1854
|
<p>Saving will overwrite the existing layout.</p>
|
|
1852
1855
|
<div slot="footer">
|
|
1853
|
-
<y-button size="small"
|
|
1856
|
+
<y-button size="small" variant="outlined">Cancel</y-button>
|
|
1854
1857
|
<y-button size="small" color="primary">Save</y-button>
|
|
1855
1858
|
</div>
|
|
1856
1859
|
</y-popover>
|