@fusion.dev/helix 0.150.0 → 0.151.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 +1010 -13
- package/dist/announcement/root/announcement-root.css.js +6 -1
- package/dist/area-chart/root/area-chart-root.css.js +2 -1
- package/dist/bar-chart/root/bar-chart-root.css.js +3 -1
- package/dist/chat/composer/chat-composer.css.js +2 -1
- package/dist/data-table/root/data-table-root.d.ts +2 -0
- package/dist/divider/root/divider-root.css.js +1 -1
- package/dist/element-events.generated.js +4 -0
- package/dist/line-chart/root/line-chart-root.css.js +2 -1
- package/dist/orb/root/orb-root.js +10 -5
- package/dist/progress/root/progress-root.css.js +1 -1
- package/dist/sandbox/root/sandbox-root.d.ts +26 -0
- package/dist/sandbox/root/sandbox-root.js +51 -2
- package/dist/sandbox/source/sandbox-source.css.js +2 -2
- package/dist/sandbox/source/sandbox-source.d.ts +12 -0
- package/dist/sandbox/source/sandbox-source.js +12 -6
- package/dist/table/root/table-root.d.ts +2 -0
- package/dist/table/row/table-row.css.js +2 -1
- package/dist/table/row/table-row.d.ts +1 -0
- package/dist/virtual-list/root/virtual-list-root.css.js +1 -1
- package/dist/virtual-list/root/virtual-list-root.d.ts +3 -0
- package/lint.json +1 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +485 -22
- package/types/vue.d.ts +171 -10
|
@@ -16,6 +16,11 @@ color-mix(in oklab, var(--_announcement-tint) 20%, var(--_announcement-ground))
|
|
|
16
16
|
in oklab,
|
|
17
17
|
var(--_announcement-tint) 40%,
|
|
18
18
|
var(--_announcement-ground)
|
|
19
|
-
);}[part="content"] {flex: 1 1 auto;min-inline-size: 0;text-align: var(--announcement-text-align, center);}:host([dismissible]) [part="content"] {padding-inline: calc(var(--helix-size-icon) + var(--helix-space-2xs) * 2 + var(--helix-space-xs));}[part="actions"] slot::slotted(*) {margin-inline-start: var(--helix-space-md);}[part="actions"] {align-items: center;display: flex;flex: 0 0 auto;gap: var(--helix-space-xs);}[part="
|
|
19
|
+
);}[part="content"] {flex: 1 1 auto;min-inline-size: 0;text-align: var(--announcement-text-align, center);}:host([dismissible]) [part="content"] {padding-inline: calc(var(--helix-size-icon) + var(--helix-space-2xs) * 2 + var(--helix-space-xs));}[part="actions"] slot::slotted(*) {margin-inline-start: var(--helix-space-md);}[part="actions"] {align-items: center;display: flex;flex: 0 0 auto;gap: var(--helix-space-xs);}:host([dismissible]) [part="actions"] {margin-inline-end: calc(
|
|
20
|
+
var(--helix-size-icon) +
|
|
21
|
+
var(--helix-space-2xs) *
|
|
22
|
+
2 +
|
|
23
|
+
var(--helix-space-xs)
|
|
24
|
+
);}[part="dismiss"] {all: unset;box-sizing: border-box;block-size: calc(var(--helix-size-icon) + var(--helix-space-2xs) * 2);inline-size: calc(var(--helix-size-icon) + var(--helix-space-2xs) * 2);border-radius: var(--helix-radii-sm);color: var(--helix-color-foreground-muted);cursor: pointer;display: inline-flex;flex: 0 0 auto;place-content: center;place-items: center;position: absolute;inset-inline-end: var(--announcement-inset, var(--helix-space-lg));transition:
|
|
20
25
|
background-color var(--helix-duration-fast) var(--helix-easing-standard),
|
|
21
26
|
color var(--helix-duration-fast) var(--helix-easing-standard);}[part="dismiss"]:hover {background-color: color-mix(in oklab, var(--helix-color-foreground) 8%, transparent);color: var(--helix-color-foreground);}[part="dismiss"] svg {block-size: var(--helix-size-icon);inline-size: var(--helix-size-icon);}[part="dismiss"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}[part="actions"][data-empty] {display: none;}:host(:state(waiting)) {display: none;}@media print {:host {background-color: transparent;}}`);
|
|
@@ -3,6 +3,7 @@ export const styles = createSheet(`:host {display: grid;gap: var(--area-chart-ga
|
|
|
3
3
|
in oklab,
|
|
4
4
|
var(--chart-series) var(--area-chart-fill-strength, 55%),
|
|
5
5
|
var(--helix-color-background)
|
|
6
|
-
);stroke: none;}:host([overlap]) [part="area"] {fill: var(--chart-series);fill-opacity: var(--area-chart-overlap-opacity, 0.3);}[part="line"] {stroke: var(--chart-series);stroke-linejoin: round;stroke-width: var(--area-chart-width, var(--_chart-stroke));vector-effect: non-scaling-stroke;}[part="baseline"] {stroke: var(--helix-color-border);stroke-width: var(--helix-border-thin);vector-effect: non-scaling-stroke;}[part="gridline"] {stroke: var(--area-chart-gridline-color, var(--helix-color-border));stroke-opacity: 0.7;stroke-width: var(--helix-border-thin);vector-effect: non-scaling-stroke;}[part="guide"] {stroke: var(--helix-color-foreground-muted);stroke-dasharray: 3 3;stroke-width: var(--helix-border-thin);vector-effect: non-scaling-stroke;}[part="labels"] {display: grid;grid-auto-columns: 1fr;grid-auto-flow: column;}[part="label"] {color: var(--helix-color-foreground-muted);font-size: var(--helix-text-xs);overflow: hidden;text-align: center;text-overflow: ellipsis;white-space: nowrap;}[part="
|
|
6
|
+
);stroke: none;}:host([overlap]) [part="area"] {fill: var(--chart-series);fill-opacity: var(--area-chart-overlap-opacity, 0.3);}[part="line"] {stroke: var(--chart-series);stroke-linejoin: round;stroke-width: var(--area-chart-width, var(--_chart-stroke));vector-effect: non-scaling-stroke;}[part="baseline"] {stroke: var(--helix-color-border);stroke-width: var(--helix-border-thin);vector-effect: non-scaling-stroke;}[part="gridline"] {stroke: var(--area-chart-gridline-color, var(--helix-color-border));stroke-opacity: 0.7;stroke-width: var(--helix-border-thin);vector-effect: non-scaling-stroke;}[part="guide"] {stroke: var(--helix-color-foreground-muted);stroke-dasharray: 3 3;stroke-width: var(--helix-border-thin);vector-effect: non-scaling-stroke;}[part="labels"] {display: grid;grid-auto-columns: 1fr;grid-auto-flow: column;}[part="label"] {color: var(--helix-color-foreground-muted);font-size: var(--helix-text-xs);overflow: hidden;text-align: center;text-overflow: ellipsis;white-space: nowrap;}[part="axis"] {color: var(--helix-color-foreground-subtle);font-size: var(--helix-text-xs);font-variant-numeric: tabular-nums;inline-size: calc(var(--area-chart-axis, 3ch) + 1ch);pointer-events: none;position: relative;}[part="tick"] {inset-inline-end: 0;position: absolute;translate: 0 -50%;white-space: nowrap;}:host([value-axis]) {grid-template-columns: auto 1fr;}:host([value-axis]) [part="axis"] {grid-column: 1;grid-row: 1;}:host([value-axis]) [part="plot"],
|
|
7
|
+
:host([value-axis]) [part="labels"] {grid-column: 2;}[part="summary"] {block-size: 1px;clip-path: inset(50%);inline-size: 1px;margin: var(--helix-space-none);overflow: hidden;position: absolute;white-space: nowrap;}[part="area"],
|
|
7
8
|
[part="line"] {transition: d var(--helix-duration-normal) var(--helix-easing-decelerate);}@starting-style {[part="area"],
|
|
8
9
|
[part="line"] {opacity: 0;}}@media print {:host {print-color-adjust: exact;}}`);
|
|
@@ -8,7 +8,9 @@ y var(--helix-duration-normal) var(--helix-easing-decelerate);}@starting-style {
|
|
|
8
8
|
in oklab,
|
|
9
9
|
var(--bar-chart-secondary) 45%,
|
|
10
10
|
var(--helix-color-foreground)
|
|
11
|
-
);color: var(--_bar-chart-axis-ink, var(--helix-color-foreground-subtle));}:host([secondary]) [part="axis"][data-axis="secondary"] {grid-column: 3;grid-row: 1;}:host([secondary]) [part="labels"] {grid-column: 2;grid-row: 2;}:host([orientation="horizontal"][secondary]) {grid-template-columns: auto 1fr;grid-template-rows: auto 1fr auto;}:host([orientation="horizontal"][secondary]) [part="axis"][data-axis="secondary"] {grid-column: 2;grid-row: 1;}:host([orientation="horizontal"][secondary]) [part="labels"] {grid-column: 1;grid-row: 2;}:host([orientation="horizontal"][secondary]) [part="plot"] {grid-column: 2;grid-row: 2;}:host([orientation="horizontal"][secondary]) [part="axis"][data-axis="primary"] {grid-column: 2;grid-row: 3;}
|
|
11
|
+
);color: var(--_bar-chart-axis-ink, var(--helix-color-foreground-subtle));}:host([secondary]) [part="axis"][data-axis="secondary"] {grid-column: 3;grid-row: 1;}:host([secondary]) [part="labels"] {grid-column: 2;grid-row: 2;}:host([orientation="horizontal"][secondary]) {grid-template-columns: auto 1fr;grid-template-rows: auto 1fr auto;}:host([orientation="horizontal"][secondary]) [part="axis"][data-axis="secondary"] {grid-column: 2;grid-row: 1;}:host([orientation="horizontal"][secondary]) [part="labels"] {grid-column: 1;grid-row: 2;}:host([orientation="horizontal"][secondary]) [part="plot"] {grid-column: 2;grid-row: 2;}:host([orientation="horizontal"][secondary]) [part="axis"][data-axis="primary"] {grid-column: 2;grid-row: 3;}:host([value-axis]:not([secondary]):not([orientation="horizontal"])) {grid-template-columns: auto 1fr;}:host([value-axis]:not([secondary]):not([orientation="horizontal"]))
|
|
12
|
+
[part="axis"][data-axis="primary"] {grid-column: 1;grid-row: 1;}:host([value-axis]:not([secondary]):not([orientation="horizontal"])) [part="plot"],
|
|
13
|
+
:host([value-axis]:not([secondary]):not([orientation="horizontal"])) [part="labels"] {grid-column: 2;}:host([value-axis][orientation="horizontal"]:not([secondary])) {grid-template-rows: 1fr auto;}:host([value-axis][orientation="horizontal"]:not([secondary])) [part="axis"][data-axis="primary"] {grid-column: 2;grid-row: 2;}[part="axis"] {color: var(--helix-color-foreground-subtle);font-size: var(--helix-text-xs);font-variant-numeric: tabular-nums;pointer-events: none;position: relative;}:host(:not([orientation="horizontal"])) [part="axis"] {inline-size: var(--bar-chart-axis, 3ch);}:host([orientation="horizontal"]) [part="axis"] {block-size: 1lh;}[part="tick"] {position: absolute;}:host(:not([orientation="horizontal"])) [part="tick"] {inset-inline-end: 0;translate: 0 -50%;}:host([orientation="horizontal"]) [part="tick"] {translate: -50% 0;}:host([orientation="horizontal"]:dir(rtl)) [part="tick"] {translate: 50% 0;}:host(:not([orientation="horizontal"])) [part="axis"][data-axis="secondary"] [part="tick"] {inset-inline-end: auto;inset-inline-start: 0;}[part="bar"] {fill-opacity: calc(var(--_bar-chart-area, 1) * var(--_bar-chart-through, 1));stroke-opacity: var(--_bar-chart-through, 1);}[part="bar"][data-emphasis="outlined"],
|
|
12
14
|
:host([emphasis="outlined"]) [part="bar"]:not([data-emphasis]) {--_bar-chart-foot: var(--_bar-chart-base);fill: var(--_bar-chart-shade);stroke: var(--_bar-chart-series);stroke-width: var(--bar-chart-bar-stroke, var(--helix-border-thick));vector-effect: non-scaling-stroke;}[part="bar"][data-emphasis="subtle"],
|
|
13
15
|
:host([emphasis="subtle"]) [part="bar"]:not([data-emphasis]) {--_bar-chart-area: 0.2;--_bar-chart-foot: var(--_bar-chart-base);stroke: var(--_bar-chart-series);stroke-width: var(--bar-chart-bar-stroke, var(--helix-border-thick));vector-effect: non-scaling-stroke;}[part="bar"] {--_bar-chart-shade: color-mix(
|
|
14
16
|
in oklab,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
2
|
export const styles = createSheet(`:host {display: block;}[part="composer"] {background-color: var(--chat-composer-background-color, var(--helix-color-surface));border: var(--chat-composer-border-width, var(--helix-border-thin)) solid
|
|
3
|
-
var(--helix-color-border);border-radius: var(--helix-radii-md);display: grid;gap: var(--helix-space-2xs);padding: var(--helix-space-xs);}[part="composer"]:focus-within {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: 0;}
|
|
3
|
+
var(--helix-color-border);border-radius: var(--helix-radii-md);display: grid;gap: var(--helix-space-2xs);padding: var(--helix-space-xs);}[part="composer"]:focus-within {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: 0;}:host(:state(invalid)) [part="composer"],
|
|
4
|
+
:host(:state(invalid)) [part="composer"]:focus-within {border-color: var(--helix-color-danger);outline-color: var(--helix-color-danger);}[part="field"] {background-color: transparent;border: 0;color: var(--helix-color-foreground);field-sizing: content;font-family: var(--helix-font-sans);font-size: var(--helix-text-sm);line-height: var(--helix-leading-normal);max-block-size: var(--chat-composer-max-block-size, 12rem);padding-block: var(--helix-space-2xs);padding-inline: calc(var(--helix-space-sm) - var(--helix-space-xs) - var(--helix-border-thin));resize: none;}[part="field"]:focus-visible {outline: none;}[part="tools"] {align-items: center;display: flex;gap: var(--helix-space-2xs);justify-content: flex-end;}[part="start"],
|
|
4
5
|
[part="end"] {--helix-size-control: var(--helix-size-control-sm);--helix-size-control-loose: calc(var(--helix-size-control) * 1.2);--helix-size-control-tight: calc(var(--helix-size-control) * 0.8);--helix-size-icon: var(--helix-size-icon-sm);--helix-size-icon-loose: calc(var(--helix-size-icon) * 1.2);--helix-size-icon-tight: calc(var(--helix-size-icon) * 0.8);align-items: center;display: flex;gap: var(--helix-space-2xs);}[part="start"] {margin-inline-end: auto;}[part="end"] {margin-inline-end: var(--helix-space-2xs);}[part="start"][data-empty],
|
|
5
6
|
[part="end"][data-empty] {display: none;}[part="send"] {align-items: center;background-color: transparent;block-size: calc(var(--helix-size-control-tight) - var(--helix-space-2xs));border: 0;border-radius: var(--helix-radii-sm);color: var(--helix-color-foreground-muted);cursor: pointer;display: inline-flex;inline-size: calc(var(--helix-size-control-tight) - var(--helix-space-2xs));justify-content: center;padding: var(--helix-space-none);}[part="mark"] {block-size: var(--helix-size-icon-tight);inline-size: var(--helix-size-icon-tight);}[part="send"]:hover:not(:disabled) {background-color: color-mix(in oklab, var(--helix-color-foreground) 8%, transparent);color: var(--helix-color-foreground);}[part="send"]:disabled {cursor: not-allowed;opacity: 0.5;}[part="send"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}`);
|
|
@@ -28,7 +28,9 @@ import '../../table/index.js';
|
|
|
28
28
|
* @documentation https://fusion.dev/helix/components/data-table
|
|
29
29
|
*
|
|
30
30
|
* @slot - The columns, as `TableColumn` elements.
|
|
31
|
+
* @slot empty - Content shown when there are no rows to show and none are loading, such as a picture and a link. Falls back to `empty-text`, which the live region still says.
|
|
31
32
|
* @slot footer - Content below the grid. It replaces the built-in pagination.
|
|
33
|
+
* @slot loading - Content shown while the rows load, such as a spinner. Falls back to `loading-text`, which the live region still says.
|
|
32
34
|
* @slot toolbar - Content above the grid, such as a search field or actions.
|
|
33
35
|
*
|
|
34
36
|
* @csspart cell - One cell.
|
|
@@ -7,4 +7,4 @@ var(--divider-padding, var(--helix-space-none))
|
|
|
7
7
|
--divider-padding-start,
|
|
8
8
|
var(--divider-padding, var(--helix-space-none))
|
|
9
9
|
);padding-inline: var(--helix-space-none);}:host(:state(vertical)) {align-self: stretch;display: inline-flex;flex-direction: column;}:host(:state(vertical)) [part="content"] {margin-block: var(--divider-content-gap, var(--helix-space-sm));margin-inline: var(--helix-space-none);}[part="line"] {background-color: var(--divider-color, var(--helix-color-border));}:host(:not(:state(vertical))) [part="line"] {block-size: var(--_divider-thickness);flex: 1 1 0;}:host(:state(vertical)) {block-size: var(--divider-length, auto);}:host(:state(vertical)) [part="line"] {flex: 1 1 0;inline-size: var(--_divider-thickness);min-block-size: 1em;}:host([content-placement="start"]) [part="line"]:has(+ [part="content"]:not([data-empty])),
|
|
10
|
-
:host([content-placement="end"]) [part="content"]:not([data-empty]) + [part="line"] {flex: 0 0 var(--divider-content-offset, var(--helix-space-lg));}@media print {:host {print-color-adjust: economy;}}`);
|
|
10
|
+
:host([content-placement="end"]) [part="content"]:not([data-empty]) + [part="line"] {flex: 0 0 var(--divider-content-offset, var(--helix-space-lg));}@media (forced-colors: active) {[part="line"] {background-color: CanvasText;forced-color-adjust: none;}}@media print {:host {print-color-adjust: economy;}}`);
|
|
@@ -3,8 +3,10 @@ registerElementEvents({
|
|
|
3
3
|
'helix-accordion-item': ['helix-before-close', 'helix-before-open', 'toggle'],
|
|
4
4
|
'helix-announcement': ['helix-dismiss'],
|
|
5
5
|
'helix-app-header': ['helix-scrolled'],
|
|
6
|
+
'helix-area-chart': ['helix-reading-change', 'helix-reading-press'],
|
|
6
7
|
'helix-aura': ['helix-aura-fallback'],
|
|
7
8
|
'helix-avatar': ['error', 'load'],
|
|
9
|
+
'helix-bar-chart': ['helix-reading-change', 'helix-reading-press'],
|
|
8
10
|
'helix-button': ['helix-press'],
|
|
9
11
|
'helix-button-group': ['change', 'helix-before-change'],
|
|
10
12
|
'helix-callout': ['helix-dismiss'],
|
|
@@ -133,6 +135,7 @@ registerElementEvents({
|
|
|
133
135
|
'helix-before-open',
|
|
134
136
|
'toggle',
|
|
135
137
|
],
|
|
138
|
+
'helix-line-chart': ['helix-reading-change', 'helix-reading-press'],
|
|
136
139
|
'helix-list': [
|
|
137
140
|
'change',
|
|
138
141
|
'helix-action',
|
|
@@ -217,6 +220,7 @@ registerElementEvents({
|
|
|
217
220
|
'helix-sandbox-preview': ['helix-console', 'helix-resize'],
|
|
218
221
|
'helix-sandbox-source': ['helix-before-edit', 'helix-caret', 'helix-edit'],
|
|
219
222
|
'helix-sandbox-terminal': ['change', 'helix-before-change'],
|
|
223
|
+
'helix-scatter-chart': ['helix-reading-change', 'helix-reading-press'],
|
|
220
224
|
'helix-scroll-area': ['scroll', 'scrollend'],
|
|
221
225
|
'helix-select': [
|
|
222
226
|
'change',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
-
export const styles = createSheet(`:host {display: grid;position: relative;gap: var(--line-chart-gap, var(--helix-space-2xs));}[part="plot"] {position: relative;block-size: var(--line-chart-block-size, 12em);}[part="plot"] svg {block-size: 100%;inline-size: 100%;overflow: visible;}[part~="line"] {stroke-linecap: round;stroke-linejoin: round;stroke-width: var(--line-chart-width, var(--_chart-stroke));vector-effect: non-scaling-stroke;}[part="area"] {opacity: calc(var(--line-chart-area-opacity, 0.16) * var(--helix-material-opacity));stroke: none;}[part="baseline"] {stroke: var(--helix-color-border);stroke-width: var(--helix-border-thin);vector-effect: non-scaling-stroke;}[part="labels"] {display: grid;grid-auto-columns: 1fr;grid-auto-flow: column;}[part="label"] {color: var(--helix-color-foreground-muted);font-size: var(--helix-text-xs);overflow: hidden;text-align: center;text-overflow: ellipsis;white-space: nowrap;}[part
|
|
2
|
+
export const styles = createSheet(`:host {display: grid;position: relative;gap: var(--line-chart-gap, var(--helix-space-2xs));}[part="plot"] {position: relative;block-size: var(--line-chart-block-size, 12em);}[part="plot"] svg {block-size: 100%;inline-size: 100%;overflow: visible;}[part~="line"] {stroke-linecap: round;stroke-linejoin: round;stroke-width: var(--line-chart-width, var(--_chart-stroke));vector-effect: non-scaling-stroke;}[part="area"] {opacity: calc(var(--line-chart-area-opacity, 0.16) * var(--helix-material-opacity));stroke: none;}[part="baseline"] {stroke: var(--helix-color-border);stroke-width: var(--helix-border-thin);vector-effect: non-scaling-stroke;}[part="labels"] {display: grid;grid-auto-columns: 1fr;grid-auto-flow: column;}[part="label"] {color: var(--helix-color-foreground-muted);font-size: var(--helix-text-xs);overflow: hidden;text-align: center;text-overflow: ellipsis;white-space: nowrap;}[part="axis"] {color: var(--helix-color-foreground-subtle);font-size: var(--helix-text-xs);font-variant-numeric: tabular-nums;inline-size: calc(var(--line-chart-axis, 3ch) + 1ch);pointer-events: none;position: relative;}[part="tick"] {inset-inline-end: 0;position: absolute;translate: 0 -50%;white-space: nowrap;}:host([value-axis]) {grid-template-columns: auto 1fr;}:host([value-axis]) [part="axis"] {grid-column: 1;grid-row: 1;}:host([value-axis]) [part="plot"],
|
|
3
|
+
:host([value-axis]) [part="labels"] {grid-column: 2;}[part~="line"] {stroke: var(--chart-series);}[part="terminus"] {color: var(--chart-series);}[part~="marker"] {background-color: var(--chart-series);block-size: var(--line-chart-marker-size, 6px);border-radius: var(--helix-radii-full);box-shadow: 0 0 0 var(--helix-border-thin)
|
|
3
4
|
var(--line-chart-marker-ring-color, var(--helix-color-background));inline-size: var(--line-chart-marker-size, 6px);pointer-events: none;position: absolute;translate: -50% -50%;}:host(:dir(rtl)) [part~="marker"] {translate: 50% -50%;}:host([terminus="ring"]) [part="svg"] {mask-composite: intersect;mask-image: var(--_line-chart-holes);}[part="area"] {fill: var(--chart-series);}[part="guide"] {stroke: var(--helix-color-foreground-muted);stroke-dasharray: 3 3;stroke-width: var(--helix-border-thin);vector-effect: non-scaling-stroke;}[part~="line"] {stroke-dasharray: 1000;transition:
|
|
4
5
|
d var(--helix-duration-normal) var(--helix-easing-decelerate),
|
|
5
6
|
stroke-dashoffset var(--helix-duration-slow) var(--helix-easing-decelerate);}@starting-style {[part~="line"] {stroke-dashoffset: 1000;}}[part~="line-dashed"] {stroke-dasharray: var(--line-chart-dash, 6 4);}@starting-style {[part~="line-dashed"] {stroke-dashoffset: 0;}}[part="area"] {transition:
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, HelixElement, hostAria, PaintGateController,
|
|
7
|
+
import { customElement, HelixElement, hostAria, PaintGateController, readColorAlpha, words, wordsConverter, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import { styles as liveStyles } from '../../shared/live/live.css.js';
|
|
@@ -14,7 +14,7 @@ const MORPH_NEAR = 380;
|
|
|
14
14
|
const MORPH_REACH = 580;
|
|
15
15
|
const LIGHT_Y = 0.36;
|
|
16
16
|
const STILL_PHASE = 1.4;
|
|
17
|
-
const GRAY = [128, 128, 128];
|
|
17
|
+
const GRAY = [128, 128, 128, 1];
|
|
18
18
|
let HelixOrb = class HelixOrb extends HelixElement {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
@@ -188,8 +188,8 @@ let HelixOrb = class HelixOrb extends HelixElement {
|
|
|
188
188
|
const params = still ? paramsFor(this.state) : this.paramsNow();
|
|
189
189
|
this.phase += dt * params.rate;
|
|
190
190
|
const painted = getComputedStyle(ctx.canvas);
|
|
191
|
-
const ink =
|
|
192
|
-
const ground =
|
|
191
|
+
const ink = readColorAlpha(painted.color) ?? GRAY;
|
|
192
|
+
const ground = readColorAlpha(painted.textDecorationColor) ?? GRAY;
|
|
193
193
|
const mesh = meshFor(size);
|
|
194
194
|
const even = evenSphere(mesh.lanes, mesh.segs);
|
|
195
195
|
const spin = this.phase * 0.9;
|
|
@@ -244,7 +244,12 @@ let HelixOrb = class HelixOrb extends HelixElement {
|
|
|
244
244
|
continue;
|
|
245
245
|
}
|
|
246
246
|
const t = Math.min(1, Math.max(0, dot.shade));
|
|
247
|
-
|
|
247
|
+
const alpha = ink[3] + (ground[3] - ink[3]) * t;
|
|
248
|
+
if (alpha <= 0) {
|
|
249
|
+
continue;
|
|
250
|
+
}
|
|
251
|
+
const channel = (at) => Math.round((ink[at] * ink[3] + (ground[at] * ground[3] - ink[at] * ink[3]) * t) / alpha);
|
|
252
|
+
ctx.fillStyle = `rgba(${channel(0)},${channel(1)},${channel(2)},${dot.alpha * alpha})`;
|
|
248
253
|
ctx.beginPath();
|
|
249
254
|
ctx.arc(dot.x, dot.y, Math.max(0.3, dot.radius), 0, Math.PI * 2);
|
|
250
255
|
ctx.fill();
|
|
@@ -6,7 +6,7 @@ var(--helix-color-background) 0 var(--helix-space-xs),
|
|
|
6
6
|
transparent var(--helix-space-xs) calc(var(--helix-space-xs) * 2)
|
|
7
7
|
);scale: 1 1;translate: 0;}}:host([shape="ring"]) {display: inline-grid;place-items: center;row-gap: var(--progress-label-gap, var(--helix-space-2xs));}:host([shape="ring"]) [part="track"] {--_ring-stroke: var(--progress-ring-width, var(--helix-size-progress));background-color: transparent;block-size: var(--progress-ring-size, 4rem);grid-area: 1 / 1;inline-size: var(--progress-ring-size, 4rem);rotate: -90deg;}:host([shape="ring"]) [part="groove"],
|
|
8
8
|
:host([shape="ring"]) [part="indicator"] {cx: 50%;cy: 50%;fill: none;r: calc(50% - var(--_ring-stroke) / 2);stroke-width: var(--_ring-stroke);}:host([shape="ring"]) [part="groove"] {stroke: var(--progress-track-color, var(--helix-color-surface-sunken));}:host([shape="ring"]) [part="indicator"] {scale: none;stroke: var(--progress-color, var(--helix-color-primary));stroke-dasharray: calc(var(--progress-fraction) * 100) 100;stroke-linecap: round;transition: stroke-dasharray var(--progress-transition-duration, var(--helix-duration-normal))
|
|
9
|
-
var(--helix-easing-decelerate);}:host([shape="ring"][show-value]) {gap: var(--helix-space-none);grid-template-columns: auto;}:host([shape="ring"]) [part="value"] {grid-area: 1 / 1;min-inline-size: 0;text-align: center;}:host([shape="ring"][indeterminate]) [part="track"] {animation: helix-progress-ring var(--_progress-cycle) linear infinite;}:host([shape="ring"][indeterminate]) [part="indicator"] {animation: helix-progress-ring-sweep calc(var(--_progress-cycle) * 0.7) ease-in-out infinite;transition: none;}@keyframes helix-progress-ring {from {rotate: -90deg;}to {rotate: 270deg;}}@keyframes helix-progress-ring-sweep {0% {stroke-dasharray: 10 100;stroke-dashoffset: 0;}50% {stroke-dasharray: 70 100;stroke-dashoffset: -25;}100% {stroke-dasharray: 10 100;stroke-dashoffset: -100;}}@media (prefers-reduced-motion: reduce) {:host([shape="ring"]) [part="indicator"] {transition: none;}:host([shape="ring"][indeterminate]) [part="track"] {animation-duration: calc(var(--_progress-cycle) * 12);}:host([shape="ring"][indeterminate]) [part="indicator"] {animation: none;stroke-dasharray: 25 100;}}@media print {:host {print-color-adjust: exact;}}:host([emphasis="subtle"]) [part="indicator"] {background-color: color-mix(
|
|
9
|
+
var(--helix-easing-decelerate);}:host([shape="ring"][show-value]) {gap: var(--helix-space-none);grid-template-columns: auto;}:host([shape="ring"]) [part="value"] {grid-area: 1 / 1;min-inline-size: 0;text-align: center;}:host([shape="ring"][indeterminate]) [part="track"] {animation: helix-progress-ring var(--_progress-cycle) linear infinite;}:host([shape="ring"][indeterminate]) [part="indicator"] {animation: helix-progress-ring-sweep calc(var(--_progress-cycle) * 0.7) ease-in-out infinite;transition: none;}@keyframes helix-progress-ring {from {rotate: -90deg;}to {rotate: 270deg;}}@keyframes helix-progress-ring-sweep {0% {stroke-dasharray: 10 100;stroke-dashoffset: 0;}50% {stroke-dasharray: 70 100;stroke-dashoffset: -25;}100% {stroke-dasharray: 10 100;stroke-dashoffset: -100;}}@media (prefers-reduced-motion: reduce) {:host([shape="ring"]) [part="indicator"] {transition: none;}:host([shape="ring"][indeterminate]) [part="track"] {animation-duration: calc(var(--_progress-cycle) * 12);}:host([shape="ring"][indeterminate]) [part="indicator"] {animation: none;stroke-dasharray: 25 100;}}@media (forced-colors: active) {[part="track"] {outline: var(--helix-border-thin) solid CanvasText;}[part="indicator"] {background-color: Highlight;forced-color-adjust: none;}:host([shape="ring"]) [part="track"] {outline: none;}:host([shape="ring"]) [part="indicator"] {stroke: Highlight;}:host([shape="ring"]) [part="groove"] {stroke: CanvasText;}}@media print {:host {print-color-adjust: exact;}}:host([emphasis="subtle"]) [part="indicator"] {background-color: color-mix(
|
|
10
10
|
in oklab,
|
|
11
11
|
var(--progress-color, var(--helix-color-primary)) 30%,
|
|
12
12
|
var(--progress-track-color, var(--helix-color-surface-sunken))
|
|
@@ -19,6 +19,12 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
|
19
19
|
* pointer, the keyboard, and the corner. The inner splitter holds the panes and
|
|
20
20
|
* the outer one holds the panel, so the panel spans the full width.
|
|
21
21
|
*
|
|
22
|
+
* On a focused divider, the arrow keys move it, and `Home` and `End` move it
|
|
23
|
+
* to its ends. `Enter` on the panes divider shuts the lead pane, and pressed
|
|
24
|
+
* again it opens the pane where it was. `Enter` on the panel divider shuts the
|
|
25
|
+
* panel to `panel-collapsed-size`, and pressed again it opens the panel to its
|
|
26
|
+
* last height.
|
|
27
|
+
*
|
|
22
28
|
* @since 0.1.0
|
|
23
29
|
* @status stable
|
|
24
30
|
* @category tooling
|
|
@@ -384,6 +390,26 @@ export declare class HelixSandbox extends HelixElement {
|
|
|
384
390
|
* and `panel-collapsed-size` was inert with it.
|
|
385
391
|
*/
|
|
386
392
|
private readonly handleCollapse;
|
|
393
|
+
/** Where the lead pane opens back to after `Enter` shut it. */
|
|
394
|
+
private reopenSplit?;
|
|
395
|
+
/** Where the panel opens back to after `Enter` shut it, in pixels. */
|
|
396
|
+
private reopenPanel?;
|
|
397
|
+
/**
|
|
398
|
+
* Shuts a pane on `Enter`, or opens it again, in this element's own units.
|
|
399
|
+
*
|
|
400
|
+
* The window splitter pattern's key. The splitter's own toggle asks for a
|
|
401
|
+
* collapse, which `handleCollapse` refuses, so the key is answered here: the
|
|
402
|
+
* panes divider moves `split` to zero and back, and the panel divider moves
|
|
403
|
+
* `panel-size` to `panel-collapsed-size` and back. Each goes through the same
|
|
404
|
+
* request a drag makes, so a consumer hears `helix-before-split` or
|
|
405
|
+
* `helix-before-panel-resize` and can refuse it.
|
|
406
|
+
*
|
|
407
|
+
* Only `Enter` on a divider of this sandbox's own splitters. The key comes up
|
|
408
|
+
* from the source pane too, and an `Enter` typed there is a new line.
|
|
409
|
+
*/
|
|
410
|
+
private readonly handleDividerKey;
|
|
411
|
+
private toggleLead;
|
|
412
|
+
private togglePanel;
|
|
387
413
|
/**
|
|
388
414
|
* Puts a divider where this element says it is.
|
|
389
415
|
*
|
|
@@ -94,6 +94,22 @@ let HelixSandbox = class HelixSandbox extends HelixElement {
|
|
|
94
94
|
this.handleCollapse = (event) => {
|
|
95
95
|
this.claim(event);
|
|
96
96
|
};
|
|
97
|
+
this.handleDividerKey = (event) => {
|
|
98
|
+
const splitter = event.currentTarget;
|
|
99
|
+
const origin = event.composedPath()[0];
|
|
100
|
+
if (event.key !== 'Enter' ||
|
|
101
|
+
!(origin instanceof Element) ||
|
|
102
|
+
origin.getAttribute('part') !== 'separator' ||
|
|
103
|
+
origin.getRootNode() !== splitter.shadowRoot) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
if (splitter.getAttribute('part') === 'panes') {
|
|
107
|
+
this.toggleLead(splitter);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
this.togglePanel(splitter);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
97
113
|
this.readPanel = () => {
|
|
98
114
|
this.hasPanel = this.querySelector(':scope > [slot="panel"]') !== null;
|
|
99
115
|
};
|
|
@@ -188,6 +204,37 @@ let HelixSandbox = class HelixSandbox extends HelixElement {
|
|
|
188
204
|
event.preventDefault();
|
|
189
205
|
return event.detail.value;
|
|
190
206
|
}
|
|
207
|
+
toggleLead(splitter) {
|
|
208
|
+
if (this.split > 0) {
|
|
209
|
+
const open = this.split;
|
|
210
|
+
this.requestSplit(0);
|
|
211
|
+
if (this.split === 0) {
|
|
212
|
+
this.reopenSplit = open;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
const home = Number.isFinite(this.defaultSplit) && this.defaultSplit > 0;
|
|
217
|
+
this.requestSplit(this.reopenSplit ?? (home ? this.defaultSplit : DEFAULT_SPLIT));
|
|
218
|
+
}
|
|
219
|
+
this.answer(splitter, this.split);
|
|
220
|
+
}
|
|
221
|
+
togglePanel(splitter) {
|
|
222
|
+
const floor = Number.isFinite(this.panelCollapsedSize)
|
|
223
|
+
? Math.max(0, this.panelCollapsedSize)
|
|
224
|
+
: 0;
|
|
225
|
+
if (this.panelSize > floor) {
|
|
226
|
+
const open = this.panelSize;
|
|
227
|
+
this.requestPanelSize(floor);
|
|
228
|
+
if (this.panelSize === floor) {
|
|
229
|
+
this.reopenPanel = open;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
const home = Number.isFinite(this.defaultPanelSize) && this.defaultPanelSize > floor;
|
|
234
|
+
this.requestPanelSize(this.reopenPanel ?? (home ? this.defaultPanelSize : DEFAULT_PANEL));
|
|
235
|
+
}
|
|
236
|
+
this.answer(splitter, this.panelPosition);
|
|
237
|
+
}
|
|
191
238
|
answer(divider, position) {
|
|
192
239
|
const target = divider;
|
|
193
240
|
if (target && Number.isFinite(position)) {
|
|
@@ -256,10 +303,12 @@ let HelixSandbox = class HelixSandbox extends HelixElement {
|
|
|
256
303
|
orientation="vertical" collapsed-size=${this.panelSliver} corner-label=${this.cornerLabel}
|
|
257
304
|
label=${this.panelLabel} default-position=${this.homePanelPosition}
|
|
258
305
|
min=${100 - PANEL_MAX * 100} .position=${this.panelPosition}
|
|
259
|
-
@helix-before-collapse=${this.handleCollapse} @helix-before-resize=${this.handlePanelChange}
|
|
306
|
+
@helix-before-collapse=${this.handleCollapse} @helix-before-resize=${this.handlePanelChange}
|
|
307
|
+
@keydown=${this.handleDividerKey}>
|
|
260
308
|
<helix-splitter slot="start" part="panes" exportparts="separator" default-position=${home}
|
|
261
309
|
label=${label} orientation=${vertical ? 'vertical' : 'horizontal'} .position=${split}
|
|
262
|
-
@helix-before-collapse=${this.handleCollapse} @helix-before-resize=${this.handlePanesChange}
|
|
310
|
+
@helix-before-collapse=${this.handleCollapse} @helix-before-resize=${this.handlePanesChange}
|
|
311
|
+
@keydown=${this.handleDividerKey}>
|
|
263
312
|
<div part="pane" data-pane=${first} slot="start"><slot name=${first} @slotchange=${this.seed}></slot></div>
|
|
264
313
|
<div part="pane" data-pane=${second} slot="end"><slot name=${second} @slotchange=${this.seed}></slot></div>
|
|
265
314
|
</helix-splitter>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
2
|
export const styles = createSheet(`:host {display: block;block-size: 100%;}[part="highlight"],
|
|
3
|
-
[part="source"] {border: none;color: var(--helix-color-foreground-muted);font-family: var(--helix-font-mono);font-size: var(--helix-text-xs);inline-size: 100%;line-height: var(--helix-leading-normal);min-block-size: var(--sandbox-source-min-block-size, 12rem);padding: var(--helix-space-sm);tab-size: 2;}[part="source"] {background-color: var(--sandbox-source-background-color, var(--helix-color-background));block-size: 100%;display: block;resize: none;}[part="source"]:focus-visible {background-color: var(--helix-color-surface);outline:
|
|
4
|
-
[part="field"] > [part="source"]:focus-visible {-webkit-text-fill-color: transparent;align-self: stretch;background-color: transparent;block-size: auto;caret-color: var(--helix-color-foreground);color: transparent;overflow: hidden;}[data-kind="callable"] {color: var(--sandbox-source-callable-color, var(--helix-color-syntax-callable));}[data-kind="comment"] {color: var(--sandbox-source-comment-color, var(--helix-color-syntax-comment));}[data-kind="constant"] {color: var(--sandbox-source-constant-color, var(--helix-color-syntax-constant));}[data-kind="invalid"] {color: var(--sandbox-source-invalid-color, var(--helix-color-syntax-invalid));}[data-kind="keyword"] {color: var(--sandbox-source-keyword-color, var(--helix-color-syntax-keyword));}[data-kind="name"] {color: var(--sandbox-source-name-color, var(--helix-color-syntax-name));}[data-kind="string"] {color: var(--sandbox-source-string-color, var(--helix-color-syntax-string));}[data-kind="tag"] {color: var(--sandbox-source-tag-color, var(--helix-color-syntax-tag));}`);
|
|
3
|
+
[part="source"] {border: none;color: var(--helix-color-foreground-muted);font-family: var(--helix-font-mono);font-size: var(--helix-text-xs);inline-size: 100%;line-height: var(--helix-leading-normal);min-block-size: var(--sandbox-source-min-block-size, 12rem);padding: var(--helix-space-sm);tab-size: 2;}[part="source"] {background-color: var(--sandbox-source-background-color, var(--helix-color-background));block-size: 100%;display: block;resize: none;}[part="source"]:focus-visible {background-color: var(--helix-color-surface);outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1);}[part="field"] {background-color: var(--sandbox-source-background-color, var(--helix-color-background));block-size: 100%;display: grid;grid-template-rows: minmax(max-content, auto);overflow: auto;}[part="field"]:focus-within {background-color: var(--helix-color-surface);}[part="field"]:has(> [part="source"]:focus-visible) {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1);}[part="field"] > [part] {grid-area: 1 / 1;letter-spacing: normal;margin: 0;overflow-wrap: break-word;white-space: pre-wrap;}[part="field"] > [part="source"],
|
|
4
|
+
[part="field"] > [part="source"]:focus-visible {-webkit-text-fill-color: transparent;align-self: stretch;background-color: transparent;block-size: auto;caret-color: var(--helix-color-foreground);color: transparent;outline: none;overflow: hidden;}[data-kind="callable"] {color: var(--sandbox-source-callable-color, var(--helix-color-syntax-callable));}[data-kind="comment"] {color: var(--sandbox-source-comment-color, var(--helix-color-syntax-comment));}[data-kind="constant"] {color: var(--sandbox-source-constant-color, var(--helix-color-syntax-constant));}[data-kind="invalid"] {color: var(--sandbox-source-invalid-color, var(--helix-color-syntax-invalid));}[data-kind="keyword"] {color: var(--sandbox-source-keyword-color, var(--helix-color-syntax-keyword));}[data-kind="name"] {color: var(--sandbox-source-name-color, var(--helix-color-syntax-name));}[data-kind="string"] {color: var(--sandbox-source-string-color, var(--helix-color-syntax-string));}[data-kind="tag"] {color: var(--sandbox-source-tag-color, var(--helix-color-syntax-tag));}`);
|
|
@@ -133,6 +133,18 @@ export declare class HelixSandboxSource extends HelixElement {
|
|
|
133
133
|
*/
|
|
134
134
|
private edit;
|
|
135
135
|
private readonly handleKeydown;
|
|
136
|
+
/**
|
|
137
|
+
* Writes the two spaces Tab inserts, as typing would.
|
|
138
|
+
*
|
|
139
|
+
* **Through `insertText`, so undo takes the indent back.** Assigning
|
|
140
|
+
* `field.value` empties the textarea's undo history: a reader who typed,
|
|
141
|
+
* pressed Tab and then Cmd+Z or Ctrl+Z lost the indent and everything typed
|
|
142
|
+
* before it. `insertText` is the edit a keystroke makes, so it joins the
|
|
143
|
+
* history and sends the `input` event that `handleInput` takes. It writes
|
|
144
|
+
* into whatever has focus, so it is used only while the field has it. Where it
|
|
145
|
+
* is not supported, the field is written directly.
|
|
146
|
+
*/
|
|
147
|
+
private indent;
|
|
136
148
|
protected render(): TemplateResult;
|
|
137
149
|
/** The field itself and its description, which is the whole pane without `tokenize`. */
|
|
138
150
|
private renderField;
|
|
@@ -46,12 +46,7 @@ let HelixSandboxSource = class HelixSandboxSource extends HelixElement {
|
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
48
|
event.preventDefault();
|
|
49
|
-
|
|
50
|
-
const { selectionEnd, selectionStart, value } = field;
|
|
51
|
-
field.value = `${value.slice(0, selectionStart)} ${value.slice(selectionEnd)}`;
|
|
52
|
-
field.selectionStart = selectionStart + 2;
|
|
53
|
-
field.selectionEnd = field.selectionStart;
|
|
54
|
-
this.edit(field, field.value);
|
|
49
|
+
this.indent(event.target);
|
|
55
50
|
};
|
|
56
51
|
}
|
|
57
52
|
static { this.words = 'helix-sandbox-source'; }
|
|
@@ -66,6 +61,17 @@ let HelixSandboxSource = class HelixSandboxSource extends HelixElement {
|
|
|
66
61
|
this.dispatchEvent(new HelixEditEvent({ value: next }));
|
|
67
62
|
}
|
|
68
63
|
}
|
|
64
|
+
indent(field) {
|
|
65
|
+
const { ownerDocument } = field;
|
|
66
|
+
const focused = field.getRootNode().activeElement === field;
|
|
67
|
+
if (focused &&
|
|
68
|
+
typeof ownerDocument.execCommand === 'function' &&
|
|
69
|
+
ownerDocument.execCommand('insertText', false, ' ')) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
field.setRangeText(' ', field.selectionStart, field.selectionEnd, 'end');
|
|
73
|
+
this.edit(field, field.value);
|
|
74
|
+
}
|
|
69
75
|
render() {
|
|
70
76
|
const field = this.renderField();
|
|
71
77
|
if (!this.tokenize) {
|
|
@@ -14,7 +14,9 @@ import '../../checkbox/index.js';
|
|
|
14
14
|
* @documentation https://fusion.dev/helix/components/table
|
|
15
15
|
*
|
|
16
16
|
* @slot - The table's rows.
|
|
17
|
+
* @slot empty - Content shown when there are no rows and none are loading, such as a picture and a link. Falls back to `empty-text`, which the live region still says.
|
|
17
18
|
* @slot heading - Words that name the table, shown above it in the weight of a heading.
|
|
19
|
+
* @slot loading - Content shown while the rows load, such as a spinner. Falls back to `loading-text`, which the live region still says.
|
|
18
20
|
*
|
|
19
21
|
* @csspart drag-preview - A copy of the row a pointer drags by its grip, which follows the pointer in the top layer until the row is let go, in a `reorderable` table. Hidden from assistive technology.
|
|
20
22
|
* @csspart live - A live region that repeats the empty and loading text, and says each step of a move, so screen readers announce it when it changes. Visually hidden in the styled tier.
|
|
@@ -4,7 +4,8 @@ export const styles = createSheet(`:host {display: contents;}[part~="select"] {a
|
|
|
4
4
|
in srgb,
|
|
5
5
|
var(--helix-color-primary) 10%,
|
|
6
6
|
var(--helix-color-background)
|
|
7
|
-
);}:host(
|
|
7
|
+
);}:host([disabled]) [part~="select"],
|
|
8
|
+
:host([disabled]) ::slotted(*) {opacity: var(--table-row-disabled-opacity, 0.5);}:host(:state(link)) ::slotted(*) {cursor: pointer;}:host(:state(link):hover) ::slotted(*) {background-color: var(
|
|
8
9
|
--table-row-hover-background-color,
|
|
9
10
|
color-mix(in oklab, var(--helix-color-foreground) 5%, transparent)
|
|
10
11
|
);}[part~="select"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1);}[part~="grip"] {align-items: center;border-block-end: var(--helix-border-thin) solid var(--helix-color-border);box-sizing: border-box;display: flex;min-block-size: var(--helix-size-control);padding-inline: var(--helix-space-2xs) var(--helix-space-sm);}[part~="grip"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1);}[part="grip-button"] {all: unset;align-items: center;border-radius: var(--helix-radii-sm);box-sizing: border-box;color: var(--table-grip-color, var(--helix-color-foreground-muted));cursor: grab;display: inline-flex;touch-action: none;}[part="grip-button"]:active {cursor: grabbing;}[part="grip-button"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}[part="grip-button"][aria-disabled="true"] {cursor: default;opacity: var(--table-grip-disabled-opacity, 0.4);}[part="grip-mark"] {block-size: 1em;inline-size: 1em;}:host(:state(dragging)) [part~="grip"],
|
|
@@ -21,6 +21,7 @@ import '../../checkbox/index.js';
|
|
|
21
21
|
* @cssproperty --table-drop-indicator-size - The thickness of the line where a moved row would land.
|
|
22
22
|
* @cssproperty --table-grip-color - The color of a row's grip, in a `reorderable` table.
|
|
23
23
|
* @cssproperty --table-grip-disabled-opacity - The opacity of a row's grip while a sort decides the order.
|
|
24
|
+
* @cssproperty --table-row-disabled-opacity - The opacity of the cells of a `disabled` row.
|
|
24
25
|
* @cssproperty --table-row-hover-background-color - The wash across the cells of a row with `href` under the pointer.
|
|
25
26
|
*/
|
|
26
27
|
export declare class HelixTableRow extends HelixHeadlessTableRow {
|
|
@@ -7,5 +7,5 @@ var(--helix-scrollbar-thumb-hover-color)
|
|
|
7
7
|
var(--virtual-list-scrollbar-track-color, var(--helix-scrollbar-track-color));}::slotted([data-index]:focus-visible) {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1);}::slotted([aria-selected="true"]) {background-color: var(
|
|
8
8
|
--virtual-list-selected-background-color,
|
|
9
9
|
var(--helix-color-primary-subtle)
|
|
10
|
-
);}[part="loading"] {color: var(--virtual-list-loading-color, var(--helix-color-foreground-muted));font-size: var(--helix-text-sm);padding: var(--virtual-list-loading-padding, var(--helix-space-sm));text-align: center;}[part="after"],
|
|
10
|
+
);}[part="empty"] {color: var(--virtual-list-empty-color, var(--helix-color-foreground-muted));font-size: var(--helix-text-sm);padding: var(--virtual-list-empty-padding, var(--helix-space-md));text-align: center;}[part="loading"] {color: var(--virtual-list-loading-color, var(--helix-color-foreground-muted));font-size: var(--helix-text-sm);padding: var(--virtual-list-loading-padding, var(--helix-space-sm));text-align: center;}[part="after"],
|
|
11
11
|
[part="before"] {flex: none;}@media print {:host {overflow: visible;}}`);
|
|
@@ -18,10 +18,13 @@ import type { CSSResultGroup } from 'lit';
|
|
|
18
18
|
*
|
|
19
19
|
* @csspart after - The space that stands in for the rows below the rendered ones.
|
|
20
20
|
* @csspart before - The space that stands in for the rows above the rendered ones.
|
|
21
|
+
* @csspart empty - The row shown when there are no items and none are loading, where `empty-label` or the `empty` slot gives it content.
|
|
21
22
|
* @csspart loading - The row after the last item while `loading` is set.
|
|
22
23
|
* @csspart viewport - The scrolling box.
|
|
23
24
|
*
|
|
24
25
|
* @cssproperty --virtual-list-block-size - How tall the scrolling box is.
|
|
26
|
+
* @cssproperty --virtual-list-empty-color - The color of the text in the row shown when there are no items.
|
|
27
|
+
* @cssproperty --virtual-list-empty-padding - The space around the text in the row shown when there are no items.
|
|
25
28
|
* @cssproperty --virtual-list-loading-color - The color of the text in the row drawn while `loading` is set.
|
|
26
29
|
* @cssproperty --virtual-list-loading-padding - The space around the text in the row drawn while `loading` is set.
|
|
27
30
|
* @cssproperty --virtual-list-scrollbar-thumb-color - The thumb of the list's scrollbar. Defaults to `--helix-scrollbar-thumb-color`.
|