luxen-ui 0.18.0 → 0.18.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/cdn/custom-elements.json +185 -175
- package/cdn/elements/dropdown/dropdown.d.ts +16 -1
- package/cdn/elements/dropdown/dropdown.d.ts.map +1 -1
- package/cdn/elements/dropdown/dropdown.js +1 -1
- package/cdn/elements/dropdown/dropdown.js.map +1 -1
- package/cdn/elements/tabs/tabs.d.ts +2 -0
- package/cdn/elements/tabs/tabs.d.ts.map +1 -1
- package/cdn/elements/tabs/tabs.js.map +1 -1
- package/cdn/elements/tag/tag.d.ts +14 -0
- package/cdn/elements/tag/tag.d.ts.map +1 -1
- package/cdn/elements/tag/tag.js +1 -1
- package/cdn/elements/tag/tag.js.map +1 -1
- package/cdn/standalone.css +35 -0
- package/cdn/styles/elements/tabs/line.css +35 -0
- package/dist/css/elements/tabs/line.css +35 -0
- package/dist/custom-elements.json +185 -175
- package/dist/elements/dropdown/dropdown.d.ts +16 -1
- package/dist/elements/dropdown/dropdown.d.ts.map +1 -1
- package/dist/elements/dropdown/dropdown.js +46 -4
- package/dist/elements/tabs/tabs.d.ts +2 -0
- package/dist/elements/tabs/tabs.d.ts.map +1 -1
- package/dist/elements/tabs/tabs.js +2 -0
- package/dist/elements/tag/tag.d.ts +14 -0
- package/dist/elements/tag/tag.d.ts.map +1 -1
- package/dist/elements/tag/tag.js +47 -23
- package/dist/metadata/index.json +11 -1
- package/dist/metadata/tabs.json +10 -0
- package/dist/templates/elements/tabs.md +4 -1
- package/dist/templates/elements/tag.md +6 -0
- package/package.json +1 -1
package/dist/metadata/index.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.18.
|
|
2
|
+
"version": "0.18.2",
|
|
3
3
|
"elements": [
|
|
4
4
|
{
|
|
5
5
|
"name": "alert",
|
|
@@ -5353,6 +5353,16 @@
|
|
|
5353
5353
|
"name": "--track-thickness",
|
|
5354
5354
|
"default": "1px",
|
|
5355
5355
|
"description": "`line` variant: thickness of the static bottom border."
|
|
5356
|
+
},
|
|
5357
|
+
{
|
|
5358
|
+
"name": "--hover-color",
|
|
5359
|
+
"default": "var(--l-color-bg-state-hover)",
|
|
5360
|
+
"description": "`line` variant: fill of the pill that appears behind a hovered tab label."
|
|
5361
|
+
},
|
|
5362
|
+
{
|
|
5363
|
+
"name": "--hover-inset",
|
|
5364
|
+
"default": "4px",
|
|
5365
|
+
"description": "`line` variant: block-axis gap between the hover pill and the tab edges, keeping it detached from the bottom border."
|
|
5356
5366
|
}
|
|
5357
5367
|
],
|
|
5358
5368
|
"commands": [],
|
package/dist/metadata/tabs.json
CHANGED
|
@@ -83,6 +83,16 @@
|
|
|
83
83
|
"name": "--track-thickness",
|
|
84
84
|
"default": "1px",
|
|
85
85
|
"description": "`line` variant: thickness of the static bottom border."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "--hover-color",
|
|
89
|
+
"default": "var(--l-color-bg-state-hover)",
|
|
90
|
+
"description": "`line` variant: fill of the pill that appears behind a hovered tab label."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "--hover-inset",
|
|
94
|
+
"default": "4px",
|
|
95
|
+
"description": "`line` variant: block-axis gap between the hover pill and the tab edges, keeping it detached from the bottom border."
|
|
86
96
|
}
|
|
87
97
|
],
|
|
88
98
|
"commands": [],
|
|
@@ -54,7 +54,7 @@ Add `variant="line"` for a tablist with a sliding underline indicator.
|
|
|
54
54
|
</l-tabs>
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Restyle the active underline and the static bottom border
|
|
57
|
+
Hovering a tab reveals a subtle pill behind its label, detached from the bottom border. Restyle it with `--hover-color` (and `--hover-inset` for the gap), along with the active underline and the static bottom border via `--indicator-color`, `--indicator-thickness`, `--track-color` and `--track-thickness`.
|
|
58
58
|
|
|
59
59
|
```html
|
|
60
60
|
<l-tabs
|
|
@@ -63,6 +63,7 @@ Restyle the active underline and the static bottom border with `--indicator-colo
|
|
|
63
63
|
--indicator-color: var(--l-color-bg-fill-info-strong);
|
|
64
64
|
--indicator-thickness: 3px;
|
|
65
65
|
--track-color: var(--l-color-divider);
|
|
66
|
+
--hover-color: var(--l-color-bg-fill-info-soft);
|
|
66
67
|
"
|
|
67
68
|
>
|
|
68
69
|
<div>
|
|
@@ -191,3 +192,5 @@ import 'luxen-ui/tabs';
|
|
|
191
192
|
- `--indicator-thickness` (default: `2px`) — `line` variant: thickness of the active underline.
|
|
192
193
|
- `--track-color` (default: `var(--l-color-border)`) — `line` variant: color of the static bottom border the tabs sit on.
|
|
193
194
|
- `--track-thickness` (default: `1px`) — `line` variant: thickness of the static bottom border.
|
|
195
|
+
- `--hover-color` (default: `var(--l-color-bg-state-hover)`) — `line` variant: fill of the pill that appears behind a hovered tab label.
|
|
196
|
+
- `--hover-inset` (default: `4px`) — `line` variant: block-axis gap between the hover pill and the tab edges, keeping it detached from the bottom border.
|
|
@@ -270,6 +270,12 @@ tag.querySelector('input'); // ❌ null — the checkbox is in the shadow root
|
|
|
270
270
|
tag.getAttribute('aria-pressed'); // ❌ null — it is on the inner button
|
|
271
271
|
```
|
|
272
272
|
|
|
273
|
+
Activation goes through the host, so a test runner clicks the chip it resolved by `data-testid` — no reaching into the shadow root, and no custom command.
|
|
274
|
+
|
|
275
|
+
```js
|
|
276
|
+
tag.click(); // ✅ toggles a selectable chip (does not remove a removable one)
|
|
277
|
+
```
|
|
278
|
+
|
|
273
279
|
```css
|
|
274
280
|
/* Style by the reflected attribute; ::part() reaches the inner nodes. */
|
|
275
281
|
l-tag[selected]::part(base) {
|
package/package.json
CHANGED