@fusion.dev/helix 0.167.0 → 0.169.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/custom-elements.json +47 -5
- package/dist/navigation/root/navigation-root.css.js +7 -1
- package/dist/navigation/root/navigation-root.d.ts +11 -2
- package/lint.json +1 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +118 -10
- package/types/vue.d.ts +30 -4
package/custom-elements.json
CHANGED
|
@@ -8414,7 +8414,7 @@
|
|
|
8414
8414
|
"text": "'error' | 'loaded' | 'loading'"
|
|
8415
8415
|
},
|
|
8416
8416
|
"default": "'loading'",
|
|
8417
|
-
"description": "The image's state: `loading` while it is on its way, `loaded` once it\narrives, or `error` when it fails and the initials replace it. An avatar\nwith no `src` has no image to wait for, and reports `error` as well, since\nthe initials are what it shows.\n\nRead-only to a consumer: it is a report rather than a setting, and the same\nreport `Image` gives, for the same reason. `load` and `error` fire once, so\na listener bound after the picture settled hears neither, which is the\nplatform on an `<img>` too, and this is what that listener asks instead.\nMirrored to `data-status` rather than reflected, as `Image` explains.",
|
|
8417
|
+
"description": "The image's state: `loading` while it is on its way, `loaded` once it\narrives, or `error` when it fails and the initials replace it. An avatar\nwith no `src` has no image to wait for, and reports `error` as well, since\nthe initials are what it shows.\n\nRead-only to a consumer: it is a report rather than a setting, and the same\nreport `Image` gives, for the same reason. `load` and `error` fire once, so\na listener bound after the picture settled hears neither, which is the\nplatform on an `<img>` too, and this is what that listener asks instead.\nMirrored to `data-status` rather than reflected, as `Image` explains, once a\npicture has loaded or failed. An avatar with no `src` reports `error` here\nand as `:state(error)`, and writes no `data-status`.",
|
|
8418
8418
|
"inheritedFrom": {
|
|
8419
8419
|
"name": "HelixHeadlessAvatar",
|
|
8420
8420
|
"module": "src/avatar/root/avatar-root.ts"
|
|
@@ -137475,7 +137475,7 @@
|
|
|
137475
137475
|
"declarations": [
|
|
137476
137476
|
{
|
|
137477
137477
|
"kind": "class",
|
|
137478
|
-
"description": "One marker moves to the current destination. A moving marker is easier to\nfollow than a background that switches from one item to another, and the\nmovement shows which page you came from as well as which one is current.",
|
|
137478
|
+
"description": "One marker moves to the current destination. A moving marker is easier to\nfollow than a background that switches from one item to another, and the\nmovement shows which page you came from as well as which one is current.\n\nThe marker depends on `variant`, as `Tabs`' mark does:\n\n- Unset, it is a pill on the current destination, with nothing behind the\n row.\n- `underlined` makes it a bar along the bottom of the row, on a rule.\n- `segmented` makes it a raised pill inside a sunken track.",
|
|
137479
137479
|
"name": "HelixNavigation",
|
|
137480
137480
|
"cssProperties": [
|
|
137481
137481
|
{
|
|
@@ -137487,7 +137487,7 @@
|
|
|
137487
137487
|
"name": "--navigation-gap"
|
|
137488
137488
|
},
|
|
137489
137489
|
{
|
|
137490
|
-
"description": "Fill of the marker on the current destination.",
|
|
137490
|
+
"description": "Fill of the marker on the current destination: the bar under `underlined`, and the pill otherwise.",
|
|
137491
137491
|
"name": "--navigation-indicator-color"
|
|
137492
137492
|
},
|
|
137493
137493
|
{
|
|
@@ -137495,9 +137495,13 @@
|
|
|
137495
137495
|
"name": "--navigation-indicator-radius"
|
|
137496
137496
|
},
|
|
137497
137497
|
{
|
|
137498
|
-
"description": "Shadow under the marker, for a marker that sits raised on the bar.",
|
|
137498
|
+
"description": "Shadow under the marker, for a marker that sits raised on the bar, as `segmented` draws it.",
|
|
137499
137499
|
"name": "--navigation-indicator-shadow"
|
|
137500
137500
|
},
|
|
137501
|
+
{
|
|
137502
|
+
"description": "Height of the bar under `underlined`, and its width down a column.",
|
|
137503
|
+
"name": "--navigation-indicator-thickness"
|
|
137504
|
+
},
|
|
137501
137505
|
{
|
|
137502
137506
|
"description": "Text color of a destination that is not the current one. Read by the page's stylesheet, which styles the links you slot.",
|
|
137503
137507
|
"name": "--navigation-item-color"
|
|
@@ -137533,6 +137537,10 @@
|
|
|
137533
137537
|
{
|
|
137534
137538
|
"description": "Corner radius of a destination, which its hover background follows.",
|
|
137535
137539
|
"name": "--navigation-item-radius"
|
|
137540
|
+
},
|
|
137541
|
+
{
|
|
137542
|
+
"description": "Color of the rule under the row in `underlined`.",
|
|
137543
|
+
"name": "--navigation-rule-color"
|
|
137536
137544
|
}
|
|
137537
137545
|
],
|
|
137538
137546
|
"members": [
|
|
@@ -137629,6 +137637,20 @@
|
|
|
137629
137637
|
"module": "src/navigation/root/navigation-root.ts"
|
|
137630
137638
|
}
|
|
137631
137639
|
},
|
|
137640
|
+
{
|
|
137641
|
+
"kind": "field",
|
|
137642
|
+
"name": "variant",
|
|
137643
|
+
"type": {
|
|
137644
|
+
"text": "'segmented' | 'underlined' | undefined"
|
|
137645
|
+
},
|
|
137646
|
+
"description": "How the destinations are drawn, with `Tabs`' three values and for the same\nreasons.\n\nUnset is a pill under the current destination with nothing behind the row,\nfor a bar inside other chrome. `underlined` is a rule under the row and a\nthicker one under the current destination, for a bar that heads a page, as\na repository's or a project's sections do. `segmented` puts the pill in a\nframed, sunken track, for a short set that reads as one control.\n\n**The same words as `Tabs`, because a reader cannot tell the two apart.**\nNavigation moves between pages and tabs between the panels of one page,\nand the bar looks the same either way. A console whose sections are pages\ncould not draw them the way its underlined tabs were drawn.\n\nDown a column, `underlined` stands the rule and the mark along the\ncolumn's inline end.\n\nReflected and left unset by default, so the host carries nothing a\nconsumer's server markup does not already have.",
|
|
137647
|
+
"attribute": "variant",
|
|
137648
|
+
"reflects": true,
|
|
137649
|
+
"inheritedFrom": {
|
|
137650
|
+
"name": "HelixHeadlessNavigation",
|
|
137651
|
+
"module": "src/navigation/root/navigation-root.ts"
|
|
137652
|
+
}
|
|
137653
|
+
},
|
|
137632
137654
|
{
|
|
137633
137655
|
"kind": "field",
|
|
137634
137656
|
"name": "current",
|
|
@@ -138084,6 +138106,14 @@
|
|
|
138084
138106
|
{
|
|
138085
138107
|
"description": "Links with the current page marked by a marker that moves to it.",
|
|
138086
138108
|
"slug": "preview"
|
|
138109
|
+
},
|
|
138110
|
+
{
|
|
138111
|
+
"description": "Links in a sunken track, with the current page marked by a raised pill.",
|
|
138112
|
+
"slug": "segmented"
|
|
138113
|
+
},
|
|
138114
|
+
{
|
|
138115
|
+
"description": "Links with the current page marked by a bar on a rule under the row.",
|
|
138116
|
+
"slug": "underlined"
|
|
138087
138117
|
}
|
|
138088
138118
|
],
|
|
138089
138119
|
"source": "helix/styled/src/navigation"
|
|
@@ -138164,6 +138194,18 @@
|
|
|
138164
138194
|
"name": "HelixHeadlessNavigation",
|
|
138165
138195
|
"module": "src/navigation/root/navigation-root.ts"
|
|
138166
138196
|
}
|
|
138197
|
+
},
|
|
138198
|
+
{
|
|
138199
|
+
"name": "variant",
|
|
138200
|
+
"type": {
|
|
138201
|
+
"text": "'segmented' | 'underlined' | undefined"
|
|
138202
|
+
},
|
|
138203
|
+
"description": "How the destinations are drawn, with `Tabs`' three values and for the same\nreasons.\n\nUnset is a pill under the current destination with nothing behind the row,\nfor a bar inside other chrome. `underlined` is a rule under the row and a\nthicker one under the current destination, for a bar that heads a page, as\na repository's or a project's sections do. `segmented` puts the pill in a\nframed, sunken track, for a short set that reads as one control.\n\n**The same words as `Tabs`, because a reader cannot tell the two apart.**\nNavigation moves between pages and tabs between the panels of one page,\nand the bar looks the same either way. A console whose sections are pages\ncould not draw them the way its underlined tabs were drawn.\n\nDown a column, `underlined` stands the rule and the mark along the\ncolumn's inline end.\n\nReflected and left unset by default, so the host carries nothing a\nconsumer's server markup does not already have.",
|
|
138204
|
+
"fieldName": "variant",
|
|
138205
|
+
"inheritedFrom": {
|
|
138206
|
+
"name": "HelixHeadlessNavigation",
|
|
138207
|
+
"module": "src/navigation/root/navigation-root.ts"
|
|
138208
|
+
}
|
|
138167
138209
|
}
|
|
138168
138210
|
],
|
|
138169
138211
|
"cssStates": [
|
|
@@ -245744,6 +245786,6 @@
|
|
|
245744
245786
|
],
|
|
245745
245787
|
"helix": {
|
|
245746
245788
|
"package": "@fusion.dev/helix",
|
|
245747
|
-
"version": "0.
|
|
245789
|
+
"version": "0.169.0"
|
|
245748
245790
|
}
|
|
245749
245791
|
}
|
|
@@ -2,4 +2,10 @@ import { createSheet } from '@fusion.dev/helix-core';
|
|
|
2
2
|
export const styles = createSheet(`:host {display: block;}[part="nav"] {align-items: center;block-size: var(--navigation-block-size, var(--helix-size-control-sm));display: flex;gap: var(--navigation-gap, var(--helix-space-2xs));min-inline-size: 0;overflow-x: auto;position: relative;}::slotted(:is(ul, ol, [role="list"])) {align-items: center;block-size: 100%;display: flex;gap: var(--navigation-gap, var(--helix-space-2xs));list-style: none;margin: var(--helix-space-none);padding: var(--helix-space-none);}:host([orientation="vertical"]) ::slotted(:is(ul, ol, [role="list"])) {align-items: stretch;block-size: auto;flex-direction: column;}[part="indicator"] {background-color: var(--navigation-indicator-color, var(--helix-color-surface-sunken));block-size: var(--indicator-block-size, 0);border-radius: var(--navigation-indicator-radius, var(--helix-radii-sm));box-shadow: var(--navigation-indicator-shadow, none);inline-size: var(--indicator-inline-size, 0);inset-block-start: 50%;inset-inline-start: 0;opacity: 0;position: absolute;translate: var(--indicator-x, 0) -50%;transition:
|
|
3
3
|
translate var(--helix-duration-normal) var(--helix-easing-emphasized),
|
|
4
4
|
inline-size var(--helix-duration-normal) var(--helix-easing-emphasized),
|
|
5
|
-
opacity var(--helix-duration-fast) var(--helix-easing-standard);z-index: var(--helix-layer-base);}[part="indicator"][data-placed] {opacity: 1;}:host([orientation="vertical"]) [part="nav"] {align-items: stretch;block-size: auto;flex-direction: column;overflow-x: visible;}:host([orientation="vertical"]) [part="indicator"] {inset-block-start: 0;translate: var(--indicator-x, 0) var(--indicator-y, 0);}
|
|
5
|
+
opacity var(--helix-duration-fast) var(--helix-easing-standard);z-index: var(--helix-layer-base);}[part="indicator"][data-placed] {opacity: 1;}:host([orientation="vertical"]) [part="nav"] {align-items: stretch;block-size: auto;flex-direction: column;overflow-x: visible;}:host([orientation="vertical"]) [part="indicator"] {inset-block-start: 0;translate: var(--indicator-x, 0) var(--indicator-y, 0);}:host([variant="underlined"]) [part="nav"] {background-image: linear-gradient(
|
|
6
|
+
var(--navigation-rule-color, var(--helix-color-border)),
|
|
7
|
+
var(--navigation-rule-color, var(--helix-color-border))
|
|
8
|
+
);background-position: bottom;background-repeat: repeat-x;background-size: 100% var(--helix-border-thin);}:host([variant="underlined"]) [part="indicator"] {background-color: var(--navigation-indicator-color, var(--helix-color-primary));block-size: var(--navigation-indicator-thickness, var(--helix-border-thick));border-radius: var(--navigation-indicator-radius, var(--helix-radii-none));inset-block-end: 0;inset-block-start: auto;translate: var(--indicator-x, 0) 0;}:host([variant="segmented"]) [part="nav"] {background-color: var(--helix-color-surface-sunken);block-size: var(--navigation-block-size, var(--helix-size-control));border: var(--helix-border-thin) solid var(--helix-color-border);border-radius: var(--helix-radii-sm);box-sizing: border-box;inline-size: fit-content;max-inline-size: 100%;padding: var(--helix-space-2xs);}:host([variant="segmented"]) [part="indicator"] {background-color: var(--navigation-indicator-color, var(--helix-color-surface-overlay));border-radius: var(
|
|
9
|
+
--navigation-indicator-radius,
|
|
10
|
+
calc(var(--helix-radii-sm) - var(--helix-border-thin))
|
|
11
|
+
);box-shadow: var(--navigation-indicator-shadow, var(--helix-shadow-sm));}:host([orientation="vertical"][variant="underlined"]) [part="nav"] {background-position: right;background-repeat: repeat-y;background-size: var(--helix-border-thin) 100%;}:host([orientation="vertical"][variant="underlined"]) [part="indicator"] {block-size: var(--indicator-block-size, 0);inline-size: var(--navigation-indicator-thickness, var(--helix-border-thick));inset-block-start: 0;inset-inline-end: 0;inset-inline-start: auto;translate: 0 var(--indicator-y, 0);}:host([orientation="vertical"][variant="segmented"]) [part="nav"] {block-size: auto;}:host([orientation="vertical"][variant="underlined"]:dir(rtl)) [part="nav"] {background-position: left;}@media print {:host {display: none;}}`);
|
|
@@ -8,6 +8,13 @@ import type { CSSResultGroup } from 'lit';
|
|
|
8
8
|
* follow than a background that switches from one item to another, and the
|
|
9
9
|
* movement shows which page you came from as well as which one is current.
|
|
10
10
|
*
|
|
11
|
+
* The marker depends on `variant`, as `Tabs`' mark does:
|
|
12
|
+
*
|
|
13
|
+
* - Unset, it is a pill on the current destination, with nothing behind the
|
|
14
|
+
* row.
|
|
15
|
+
* - `underlined` makes it a bar along the bottom of the row, on a rule.
|
|
16
|
+
* - `segmented` makes it a raised pill inside a sunken track.
|
|
17
|
+
*
|
|
11
18
|
* @since 0.1.0
|
|
12
19
|
* @status stable
|
|
13
20
|
* @category navigation
|
|
@@ -16,10 +23,11 @@ import type { CSSResultGroup } from 'lit';
|
|
|
16
23
|
*
|
|
17
24
|
* @cssproperty --navigation-block-size - Height of the bar in a row. Each destination fills it.
|
|
18
25
|
* @cssproperty --navigation-gap - Space between destinations.
|
|
19
|
-
* @cssproperty --navigation-indicator-color - Fill of the marker on the current destination.
|
|
26
|
+
* @cssproperty --navigation-indicator-color - Fill of the marker on the current destination: the bar under `underlined`, and the pill otherwise.
|
|
20
27
|
* @cssproperty --navigation-indicator-radius - Corner radius of the marker.
|
|
21
28
|
* @cssproperty --navigation-indicator-shadow - Shadow under the marker, for a marker that sits
|
|
22
|
-
* raised on the bar.
|
|
29
|
+
* raised on the bar, as `segmented` draws it.
|
|
30
|
+
* @cssproperty --navigation-indicator-thickness - Height of the bar under `underlined`, and its width down a column.
|
|
23
31
|
* @cssproperty --navigation-item-color - Text color of a destination that is not the current one. Read by the page's stylesheet, which styles the links you slot.
|
|
24
32
|
* @cssproperty --navigation-item-current-color - Text color of the current destination, the one marked `aria-current="page"`.
|
|
25
33
|
* @cssproperty --navigation-item-current-font-weight - Weight of the current destination's text.
|
|
@@ -29,6 +37,7 @@ import type { CSSResultGroup } from 'lit';
|
|
|
29
37
|
* @cssproperty --navigation-item-hover-color - Text color of a destination under the pointer.
|
|
30
38
|
* @cssproperty --navigation-item-padding-inline - Space either side of a destination's text.
|
|
31
39
|
* @cssproperty --navigation-item-radius - Corner radius of a destination, which its hover background follows.
|
|
40
|
+
* @cssproperty --navigation-rule-color - Color of the rule under the row in `underlined`.
|
|
32
41
|
*/
|
|
33
42
|
export declare class HelixNavigation extends HelixHeadlessNavigation {
|
|
34
43
|
static styles: CSSResultGroup;
|