@fusion.dev/helix 0.158.0 → 0.160.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 +2446 -164
- package/dist/app-header/root/app-header-root.css.js +1 -1
- package/dist/button/root/button-root.d.ts +1 -0
- package/dist/date-input/root/date-input-root.css.js +3 -2
- package/dist/date-picker/root/date-picker-root.css.js +6 -0
- package/dist/date-picker/root/date-picker-root.d.ts +1 -0
- package/dist/element-events.generated.js +4 -1
- package/dist/icon-button/root/icon-button-root.d.ts +1 -0
- package/dist/shared/field/field-segments.css.js +1 -1
- package/dist/steps/step/step.css.js +3 -1
- package/dist/tabs/root/tabs-root.css.js +2 -1
- package/dist/tabs/root/tabs-root.d.ts +4 -0
- package/dist/tabs/tab/tab.css.js +1 -1
- package/dist/tabs/tab/tab.d.ts +2 -0
- package/dist/time-input/root/time-input-root.css.js +2 -1
- package/dist/toast/item/toast-item.css.js +2 -2
- package/lint.json +1 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +905 -159
- package/types/vue.d.ts +258 -32
- package/types/words.d.ts +32 -2
|
@@ -6,5 +6,5 @@ border-color var(--helix-duration-normal) var(--helix-easing-standard);}:host([m
|
|
|
6
6
|
backdrop-filter var(--helix-duration-normal) var(--helix-easing-standard),
|
|
7
7
|
background-color var(--helix-duration-normal) var(--helix-easing-standard),
|
|
8
8
|
border-color var(--helix-duration-normal) var(--helix-easing-standard),
|
|
9
|
-
translate var(--helix-duration-normal) var(--helix-easing-standard);}:host([sticky]:state(hidden)) {translate: 0 -100%;}:host(:state(folded)) [part="row"] {block-size: auto;grid-template-columns: minmax(0, 1fr) auto;grid-template-rows: var(--app-header-block-size, var(--helix-size-header));row-gap: var(--helix-space-none);}:host(:state(folded)) [part="content"] {align-items: stretch;flex-direction: column;grid-column: 1 / -1;grid-row: 2;justify-content: flex-start;overflow-x: visible;padding-block-end: var(--helix-space-sm);}[part="content"][hidden] {display: none;}[part="toggle"] {all: unset;box-sizing: border-box;align-items: center;block-size: var(--helix-size-control);border-radius: var(--helix-radii-sm);color: var(--helix-color-foreground-muted);cursor: pointer;display: inline-flex;inline-size: var(--helix-size-control);justify-content: center;}[part="toggle"] svg {block-size: var(--helix-size-icon);inline-size: var(--helix-size-icon);}[part="toggle"]:hover,
|
|
9
|
+
translate var(--helix-duration-normal) var(--helix-easing-standard);}:host([sticky]:state(hidden)) {translate: 0 -100%;}:host(:state(folded)) [part="row"] {block-size: auto;grid-template-columns: minmax(0, 1fr) auto;grid-template-rows: var(--app-header-block-size, var(--helix-size-header));row-gap: var(--helix-space-none);}:host(:state(folded)) [part="content"] {align-items: stretch;flex-direction: column;grid-column: 1 / -1;grid-row: 2;justify-content: flex-start;overflow-x: visible;padding-block-end: var(--helix-space-sm);}[part="content"][hidden] {display: none;}[part="toggle"] {all: unset;box-sizing: border-box;align-items: center;block-size: var(--helix-size-control);border-radius: var(--helix-radii-sm);color: var(--helix-color-foreground-muted);cursor: pointer;display: inline-flex;inline-size: var(--helix-size-control);justify-content: center;}[part="start"] > [part="toggle"] {margin-inline-end: var(--helix-space-xs);}[part="toggle"] svg {block-size: var(--helix-size-icon);inline-size: var(--helix-size-icon);}[part="toggle"]:hover,
|
|
10
10
|
:host(:state(open)) [part="toggle"] {background-color: color-mix(in oklab, var(--helix-color-foreground) 8%, transparent);color: var(--helix-color-foreground);}[part="toggle"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}@media (prefers-reduced-motion: reduce) {:host([sticky]) {transition: none;}}@media print {:host {display: none;}}`);
|
|
@@ -49,6 +49,7 @@ declare const HelixButton_base: (new (...args: any[]) => import("../../shared/mi
|
|
|
49
49
|
* @cssproperty --button-spinner-size - Size of the ring a pending button turns. Defaults to the size of its icons.
|
|
50
50
|
*
|
|
51
51
|
* @cssstate pending - The button is pending: `pending` is set. A ring turns over its hidden words.
|
|
52
|
+
* @cssstate pressed - A Button Group in a selection mode has this button pressed.
|
|
52
53
|
*/
|
|
53
54
|
export declare class HelixButton extends HelixButton_base {
|
|
54
55
|
/**
|
|
@@ -2,8 +2,9 @@ import { createSheet } from '@fusion.dev/helix-core';
|
|
|
2
2
|
export const styles = createSheet(`[part="field"] {align-items: center;background-color: var(--date-input-background-color, var(--helix-color-well));border: var(--helix-border-thin) solid var(--helix-color-border);border-radius: var(--helix-radii-sm);display: flex;flex-wrap: wrap;gap: var(--helix-space-2xs);min-block-size: var(--helix-size-control);padding-block: var(--helix-space-2xs);padding-inline: var(--helix-space-xs);transition:
|
|
3
3
|
background-color var(--helix-duration-fast) var(--helix-easing-standard),
|
|
4
4
|
border-color var(--helix-duration-fast) var(--helix-easing-standard);}slot[name="start"]::slotted(*),
|
|
5
|
-
slot[name="end"]::slotted(*) {color: var(--helix-color-foreground-subtle);flex: none;}[part="trigger"] {all: unset;block-size: var(--helix-size-icon);box-sizing: border-box;color: var(--helix-color-foreground-muted);cursor: pointer;flex: none;inline-size: var(--helix-size-icon);mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");mask-position: center;mask-repeat: no-repeat;mask-size: 100%;background-color: currentColor;transition: color var(--helix-duration-fast) var(--helix-easing-standard);}[part="trigger"]:hover {color: var(--helix-color-foreground);}[part="trigger"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}[part="surface"] {--_floating-border-color: var(--date-input-border-color, var(--helix-color-border));--_floating-border-width: var(--date-input-border-width, var(--helix-border-floating));--_floating-shadow: var(--date-input-shadow, var(--helix-shadow-floating));inline-size: max-content;padding: var(--helix-space-sm);position: absolute;}::slotted([slot="panel-header"]) {display: block;margin-block-end: var(--helix-space-sm);}::slotted([slot="panel-footer"]) {display: block;margin-block-start: var(--helix-space-sm);}:host(:disabled) [part="field"] {color: var(--helix-color-foreground-subtle);}:host(:disabled) [part="control"],
|
|
6
|
-
:host(:disabled) [part="trigger"] {cursor: not-allowed;}@media (prefers-reduced-motion: reduce) {[part="
|
|
5
|
+
slot[name="end"]::slotted(*) {color: var(--helix-color-foreground-subtle);flex: none;}[part="trigger"] {all: unset;block-size: var(--helix-size-icon);box-sizing: border-box;color: var(--helix-color-foreground-muted);cursor: pointer;flex: none;inline-size: var(--helix-size-icon);mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");mask-position: center;mask-repeat: no-repeat;mask-size: 100%;background-color: currentColor;transition: color var(--helix-duration-fast) var(--helix-easing-standard);}[part="trigger"]:hover {color: var(--helix-color-foreground);}[part="trigger"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}[part="clear"] {--icon-size: var(--helix-size-icon-tight);all: unset;align-items: center;border-radius: var(--helix-radii-sm);box-sizing: border-box;color: var(--helix-color-foreground-muted);cursor: pointer;display: flex;flex: 0 0 auto;justify-content: center;min-block-size: var(--helix-size-icon-loose);min-inline-size: var(--helix-size-icon-loose);transition: color var(--helix-duration-fast) var(--helix-easing-standard);}[part="clear"]:hover {color: var(--helix-color-foreground);}[part="clear"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}[part="surface"] {--_floating-border-color: var(--date-input-border-color, var(--helix-color-border));--_floating-border-width: var(--date-input-border-width, var(--helix-border-floating));--_floating-shadow: var(--date-input-shadow, var(--helix-shadow-floating));inline-size: max-content;padding: var(--helix-space-sm);position: absolute;}::slotted([slot="panel-header"]) {display: block;margin-block-end: var(--helix-space-sm);}::slotted([slot="panel-footer"]) {display: block;margin-block-start: var(--helix-space-sm);}:host(:disabled) [part="field"] {color: var(--helix-color-foreground-subtle);}:host(:disabled) [part="control"],
|
|
6
|
+
:host(:disabled) [part="trigger"] {cursor: not-allowed;}@media (prefers-reduced-motion: reduce) {[part="clear"],
|
|
7
|
+
[part="field"],
|
|
7
8
|
[part="trigger"] {transition: none;}}[part="date"] {flex: none;}:host([mode="multiple"]) [part="control"] {flex-basis: 0;min-inline-size: var(--helix-size-icon-loose);}[part="segments"] {--_segment-focus-background-color: var(
|
|
8
9
|
--date-input-segment-focus-background-color,
|
|
9
10
|
var(--helix-color-primary)
|
|
@@ -15,6 +15,12 @@ light-dark(
|
|
|
15
15
|
color-mix(in oklab, var(--helix-color-foreground) 10%, transparent),
|
|
16
16
|
color-mix(in oklab, var(--helix-color-foreground) 14%, transparent)
|
|
17
17
|
)
|
|
18
|
+
);}[part~="cell"][data-range-preview]:is([data-range-start], [data-range-middle], [data-range-end]) {background-color: var(
|
|
19
|
+
--date-picker-range-preview-color,
|
|
20
|
+
light-dark(
|
|
21
|
+
color-mix(in oklab, var(--helix-color-foreground) 5%, transparent),
|
|
22
|
+
color-mix(in oklab, var(--helix-color-foreground) 8%, transparent)
|
|
23
|
+
)
|
|
18
24
|
);}[part~="cell"][aria-selected]:not([data-range-start]):not([data-range-middle]):not([data-range-end])
|
|
19
25
|
[part~="day"] {box-shadow: 0 0 0 calc((var(--_calendar-row) - var(--_calendar-day)) / 2)
|
|
20
26
|
var(
|
|
@@ -28,6 +28,7 @@ import type { CSSResultGroup } from 'lit';
|
|
|
28
28
|
* @cssproperty --date-picker-feedback-color - The color of the message under the calendar, while `feedback` is set.
|
|
29
29
|
* @cssproperty --date-picker-period-size - Height of a month or a year in the months and years views, where `max-view` is set.
|
|
30
30
|
* @cssproperty --date-picker-range-color - Band behind the days in a range.
|
|
31
|
+
* @cssproperty --date-picker-range-preview-color - Band behind the days a waiting range is drawn to, before its second end is chosen.
|
|
31
32
|
* @cssproperty --date-picker-row-size - Height of a week row.
|
|
32
33
|
* @cssproperty --date-picker-selected-color - Fill behind a selected day.
|
|
33
34
|
* @cssproperty --date-picker-track-size - Width of a column, which is what sets the space between days.
|
|
@@ -2,7 +2,7 @@ import { registerElementEvents } from '@fusion.dev/helix-core';
|
|
|
2
2
|
registerElementEvents({
|
|
3
3
|
'helix-accordion-item': ['helix-before-close', 'helix-before-open', 'toggle'],
|
|
4
4
|
'helix-announcement': ['helix-dismiss'],
|
|
5
|
-
'helix-app-header': ['helix-scrolled'],
|
|
5
|
+
'helix-app-header': ['helix-before-close', 'helix-before-open', 'helix-scrolled', 'toggle'],
|
|
6
6
|
'helix-area-chart': ['helix-reading-change', 'helix-reading-press'],
|
|
7
7
|
'helix-aura': ['helix-aura-fallback'],
|
|
8
8
|
'helix-avatar': ['error', 'load'],
|
|
@@ -88,6 +88,7 @@ registerElementEvents({
|
|
|
88
88
|
'helix-before-change',
|
|
89
89
|
'helix-before-close',
|
|
90
90
|
'helix-before-open',
|
|
91
|
+
'helix-clear',
|
|
91
92
|
'input',
|
|
92
93
|
'toggle',
|
|
93
94
|
],
|
|
@@ -248,6 +249,7 @@ registerElementEvents({
|
|
|
248
249
|
'helix-steps': ['helix-activate', 'helix-before-activate', 'helix-select'],
|
|
249
250
|
'helix-switch': ['change', 'helix-before-toggle', 'input'],
|
|
250
251
|
'helix-tab': ['helix-dismiss', 'helix-select'],
|
|
252
|
+
'helix-tab-panel': ['helix-load'],
|
|
251
253
|
'helix-table': [
|
|
252
254
|
'helix-before-reorder',
|
|
253
255
|
'helix-reorder',
|
|
@@ -266,6 +268,7 @@ registerElementEvents({
|
|
|
266
268
|
'helix-before-change',
|
|
267
269
|
'helix-before-close',
|
|
268
270
|
'helix-before-open',
|
|
271
|
+
'helix-clear',
|
|
269
272
|
'input',
|
|
270
273
|
'toggle',
|
|
271
274
|
],
|
|
@@ -38,6 +38,7 @@ declare const HelixIconButton_base: (new (...args: any[]) => import("../../share
|
|
|
38
38
|
* @cssproperty --icon-button-spinner-size - Size of the ring a pending button turns.
|
|
39
39
|
*
|
|
40
40
|
* @cssstate pending - The button is pending: `pending` is set. A ring turns over its hidden icon.
|
|
41
|
+
* @cssstate pressed - A Button Group in a selection mode has this button pressed.
|
|
41
42
|
*/
|
|
42
43
|
export declare class HelixIconButton extends HelixIconButton_base {
|
|
43
44
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
-
export const styles = createSheet(`[part="segments"] {align-items: center;color: var(--helix-color-foreground);display: flex;flex: 1 1 auto;font-family: var(--helix-font-sans);font-size: var(--helix-text-md);font-variant-numeric: tabular-nums;font-weight: var(--helix-weight-medium);min-inline-size: 0;white-space: nowrap;}[part~="segment"] {border-radius: var(--helix-radii-sm);caret-color: transparent;outline: none;padding-inline: calc(var(--helix-space-2xs) / 2);}[part~="segment"]:focus {background-color: var(--_segment-focus-background-color, var(--helix-color-primary));color: var(--_segment-focus-color, var(--helix-color-foreground-on-primary));}[part~="segment-placeholder"] {color: var(--_segment-placeholder-color, var(--helix-color-foreground-subtle));}[part
|
|
2
|
+
export const styles = createSheet(`[part="segments"] {align-items: center;color: var(--helix-color-foreground);display: flex;flex: 1 1 auto;font-family: var(--helix-font-sans);font-size: var(--helix-text-md);font-variant-numeric: tabular-nums;font-weight: var(--helix-weight-medium);min-inline-size: 0;white-space: nowrap;}[part~="segment"] {border-radius: var(--helix-radii-sm);caret-color: transparent;outline: none;padding-inline: calc(var(--helix-space-2xs) / 2);}[part~="segment"]:focus {background-color: var(--_segment-focus-background-color, var(--helix-color-primary));color: var(--_segment-focus-color, var(--helix-color-foreground-on-primary));}[part~="segment-placeholder"] {color: var(--_segment-placeholder-color, var(--helix-color-foreground-subtle));}[part~="literal"] {color: var(--_segment-literal-color, var(--helix-color-foreground-muted));white-space: pre;}:host(:disabled) [part="segments"] {color: var(--helix-color-foreground-subtle);cursor: not-allowed;}`);
|
|
@@ -3,4 +3,6 @@ export const styles = createSheet(`:host {--_step-inset: var(--helix-space-sm);a
|
|
|
3
3
|
:host::after {background-color: var(--steps-connector-color, var(--helix-color-border));content: "";position: absolute;z-index: 0;}:host::before {block-size: var(--_steps-lead-block-size, var(--helix-border-thin));inline-size: var(--_steps-lead-inline-size, 0);inset-block-start: var(--_steps-lead-block-start, 50%);inset-inline-start: var(--_steps-lead-inline-start, 0);}:host::after {block-size: var(--_steps-trail-block-size, var(--helix-border-thin));inline-size: var(--_steps-trail-inline-size, 0);inset-block-start: var(--_steps-trail-block-start, 50%);inset-inline-start: var(--_steps-trail-inline-start, 0);}:host(:first-child)::before,
|
|
4
4
|
:host(:last-child)::after {display: none;}[part="marker"] {align-items: center;grid-column: var(--_steps-marker-column, 1);grid-row: 1;justify-self: var(--_steps-marker-justify, center);block-size: var(--_steps-mark-box, var(--helix-size-icon));box-sizing: border-box;color: var(--_steps-marker-color, var(--helix-color-border));display: inline-flex;flex: 0 0 auto;font-family: var(--helix-font-sans);font-size: var(--helix-text-xs);font-weight: var(--helix-weight-semibold);inline-size: var(--_steps-mark-box, var(--helix-size-icon));justify-content: center;position: relative;transition: color var(--helix-duration-fast) var(--helix-easing-standard);z-index: 1;}[part="marker"] slot {align-items: center;display: inline-flex;justify-content: center;}[part="marker"]::after {content: var(--_steps-count, none);}[part="marker"] svg {block-size: var(--_steps-m, var(--helix-size-icon));display: var(--_steps-mark, inline);flex: 0 0 auto;inline-size: var(--_steps-m, var(--helix-size-icon));}slot[name="marker"]::slotted(*) {--icon-size: var(--_steps-m, var(--helix-size-icon));}:host([complete]) [part="marker"] {color: var(--steps-complete-color, var(--_steps-ink-complete, var(--helix-color-success)));}:host([current]) [part="marker"] {color: var(--steps-current-color, var(--_steps-ink-current, var(--helix-color-primary)));}:host([complete][current]) [part="marker"] {color: var(--steps-complete-color, var(--_steps-ink-complete, var(--helix-color-success)));}[part="body"] {align-items: var(--_steps-body-align, center);grid-column: var(--_steps-body-column, 1);grid-row: var(--_steps-body-row, 2);display: flex;flex-direction: column;min-inline-size: 0;position: relative;z-index: 1;}[part="label"] {--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);--helix-space-control: var(--_step-inset);--helix-text-control: var(--helix-text-sm);--button-foreground-color: var(--helix-color-foreground-muted);max-inline-size: 100%;}:host([complete]) [part="label"],
|
|
5
5
|
:host([current]) [part="label"] {--button-foreground-color: var(--helix-color-foreground);}[part="description"] {color: var(--helix-color-foreground-subtle);font-family: var(--helix-font-sans);font-size: var(--helix-text-xs);padding-inline: var(--_step-inset);}:host([disabled]) [part="marker"],
|
|
6
|
-
:host([disabled]) [part="description"] {opacity: 0.5;}[part="content"] {display: var(--_steps-content, none);grid-column: var(--_steps-body-column, 1);grid-row: calc(var(--_steps-body-row, 2) + 1);grid-template-rows: 0fr;padding-inline: var(--_step-inset);transition:
|
|
6
|
+
:host([disabled]) [part="description"] {opacity: 0.5;}[part="content"] {display: var(--_steps-content, none);grid-column: var(--_steps-body-column, 1);grid-row: calc(var(--_steps-body-row, 2) + 1);grid-template-rows: 0fr;padding-inline: var(--_step-inset);transition:
|
|
7
|
+
grid-template-rows var(--helix-duration-normal) var(--helix-easing-standard),
|
|
8
|
+
visibility var(--helix-duration-normal) var(--helix-easing-standard);visibility: hidden;}:host([current]) [part="content"] {grid-template-rows: 1fr;visibility: visible;}[part="content"] > slot {display: block;min-block-size: 0;overflow: hidden;}`);
|
|
@@ -2,7 +2,8 @@ import { createSheet } from '@fusion.dev/helix-core';
|
|
|
2
2
|
export const styles = createSheet(`:host {--_tabs-rule: none;--_tab-radius: var(--helix-radii-sm);--_tab-selected-shadow: var(--helix-shadow-sm);--_tab-selected-surface: var(--helix-color-surface-raised);display: grid;grid-template-rows: auto minmax(0, 1fr);min-block-size: 0;}[part="tabs"] {background-image: var(--_tabs-rule, none);background-position: bottom;background-repeat: repeat-x;background-size: 100% var(--helix-border-thin);display: flex;gap: var(--tabs-gap, var(--helix-space-2xs));overflow-x: auto;}[part="scroll-start"],
|
|
3
3
|
[part="scroll-end"] {align-items: center;background-color: var(--tabs-scroll-background-color, var(--helix-color-surface));border: none;color: var(--helix-color-foreground-subtle);cursor: pointer;display: inline-flex;flex: none;justify-content: center;padding-inline: var(--helix-space-2xs);position: sticky;z-index: 1;}[part="scroll-start"] {inset-inline-start: 0;}[part="scroll-end"] {inset-inline-end: 0;}[part="scroll-start"][hidden],
|
|
4
4
|
[part="scroll-end"][hidden] {display: none;}[part="scroll-start"] svg,
|
|
5
|
-
[part="scroll-end"] svg {block-size: var(--helix-size-icon);inline-size: var(--helix-size-icon);}[
|
|
5
|
+
[part="scroll-end"] svg {block-size: var(--helix-size-icon);inline-size: var(--helix-size-icon);}slot[name="scroll-start-icon"]::slotted(*),
|
|
6
|
+
slot[name="scroll-end-icon"]::slotted(*) {--icon-size: var(--helix-size-icon);block-size: var(--helix-size-icon);inline-size: var(--helix-size-icon);}[part="scroll-start"]:hover,
|
|
6
7
|
[part="scroll-end"]:hover {color: var(--helix-color-foreground);}:host([orientation="vertical"]) [part="scroll-start"] {inset-block-start: 0;inset-inline-start: auto;padding-block: var(--helix-space-2xs);}:host([orientation="vertical"]) [part="scroll-end"] {inset-block-end: 0;inset-inline-end: auto;padding-block: var(--helix-space-2xs);}:host([variant="underlined"]) {--_tabs-rule: linear-gradient(
|
|
7
8
|
var(--tabs-rule-color, var(--helix-color-border)),
|
|
8
9
|
var(--tabs-rule-color, var(--helix-color-border))
|
|
@@ -24,11 +24,15 @@ import type { CSSResultGroup } from 'lit';
|
|
|
24
24
|
* @slot - The tabs, as direct children of this element.
|
|
25
25
|
* @slot indicator - A mark of your own, drawn inside the `indicator` part, where the selected tab's place and size reach it.
|
|
26
26
|
* @slot panels - The panels, as direct children of this element. Panels inside a wrapper are not paired with tabs, because pairing reads only the direct children.
|
|
27
|
+
* @slot scroll-end-icon - Replaces the glyph on the button that scrolls the strip toward its end.
|
|
28
|
+
* @slot scroll-start-icon - Replaces the glyph on the button that scrolls the strip toward its start.
|
|
27
29
|
*
|
|
28
30
|
* @csspart indicator - The mark that moves to the selected tab. It carries the selected tab's place and size as `--indicator-x`, `--indicator-y`, `--indicator-inline-size` and `--indicator-block-size`.
|
|
29
31
|
* @csspart panels - The panel container.
|
|
30
32
|
* @csspart scroll-end - The button that scrolls the strip toward its end, shown under `scroll-controls` while there is more that way. It holds to the end of the strip.
|
|
33
|
+
* @csspart scroll-end-mark - The glyph on that button, where none is slotted.
|
|
31
34
|
* @csspart scroll-start - The button that scrolls the strip toward its start, shown under `scroll-controls` while there is more that way. It holds to the start of the strip.
|
|
35
|
+
* @csspart scroll-start-mark - The glyph on that button, where none is slotted.
|
|
32
36
|
* @csspart tabs - The tab list.
|
|
33
37
|
*
|
|
34
38
|
* @cssproperty --tabs-gap - The space between tabs.
|
package/dist/tabs/tab/tab.css.js
CHANGED
|
@@ -10,4 +10,4 @@ color-mix(in oklab, var(--helix-color-foreground) 5%, transparent)
|
|
|
10
10
|
--tabs-tab-selected-background-color,
|
|
11
11
|
var(--_tab-selected-surface, transparent)
|
|
12
12
|
);box-shadow: var(--_tab-selected-shadow, none);color: var(--tabs-tab-selected-color, var(--helix-color-foreground));}[part="tab"]:disabled,
|
|
13
|
-
[part="tab"][aria-disabled="true"] {cursor: not-allowed;opacity: var(--tabs-tab-disabled-opacity, 0.5);}[part="tab"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1);}[part="dismiss"] {align-items: center;border-radius: var(--helix-radii-sm);color: var(--tabs-tab-dismiss-color, currentColor);display: inline-flex;margin-inline: var(--helix-space-2xs) calc(var(--helix-space-2xs) * -1);padding: var(--helix-space-none);}[part="dismiss"] svg {block-size: 1em;inline-size: 1em;}[part="dismiss"]:hover {background-color: color-mix(in oklab, var(--helix-color-foreground) 10%, transparent);}`);
|
|
13
|
+
[part="tab"][aria-disabled="true"] {cursor: not-allowed;opacity: var(--tabs-tab-disabled-opacity, 0.5);}[part="tab"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1);}[part="dismiss"] {align-items: center;border-radius: var(--helix-radii-sm);color: var(--tabs-tab-dismiss-color, currentColor);display: inline-flex;margin-inline: var(--helix-space-2xs) calc(var(--helix-space-2xs) * -1);padding: var(--helix-space-none);}[part="dismiss"] svg {block-size: 1em;inline-size: 1em;}slot[name="dismiss-icon"]::slotted(*) {--icon-size: 1em;block-size: 1em;inline-size: 1em;}[part="dismiss"]:hover {background-color: color-mix(in oklab, var(--helix-color-foreground) 10%, transparent);}`);
|
package/dist/tabs/tab/tab.d.ts
CHANGED
|
@@ -14,8 +14,10 @@ import type { CSSResultGroup } from 'lit';
|
|
|
14
14
|
* @documentation https://fusion.dev/helix/components/tabs
|
|
15
15
|
*
|
|
16
16
|
* @slot - The tab's label.
|
|
17
|
+
* @slot dismiss-icon - Replaces the glyph on the mark that closes a `dismissible` tab.
|
|
17
18
|
*
|
|
18
19
|
* @csspart dismiss - The mark a pointer presses to close a `dismissible` tab.
|
|
20
|
+
* @csspart dismiss-mark - The glyph on that mark, where none is slotted.
|
|
19
21
|
* @csspart tab - The tab itself.
|
|
20
22
|
*
|
|
21
23
|
* @cssproperty --tabs-tab-block-size - The height of a tab. `segmented` sizes its tabs to the track and does not read it.
|
|
@@ -2,7 +2,8 @@ import { createSheet } from '@fusion.dev/helix-core';
|
|
|
2
2
|
export const styles = createSheet(`[part="field"] {align-items: center;background-color: var(--time-input-background-color, var(--helix-color-well));flex-wrap: wrap;min-block-size: var(--helix-size-control);padding-block: var(--helix-space-2xs);border: var(--helix-border-thin) solid var(--helix-color-border);border-radius: var(--helix-radii-sm);display: flex;gap: var(--helix-space-2xs);padding-inline: var(--helix-space-xs);transition:
|
|
3
3
|
background-color var(--helix-duration-fast) var(--helix-easing-standard),
|
|
4
4
|
border-color var(--helix-duration-fast) var(--helix-easing-standard);}slot[name="start"]::slotted(*),
|
|
5
|
-
slot[name="end"]::slotted(*) {color: var(--helix-color-foreground-subtle);flex: none;}:host(:disabled) [part="field"] {color: var(--helix-color-foreground-subtle);}[part="trigger"] {--icon-size: var(--helix-size-icon);all: unset;align-items: center;box-sizing: border-box;color: var(--helix-color-foreground-muted);cursor: pointer;display: flex;flex: none;transition: color var(--helix-duration-fast) var(--helix-easing-standard);}:host(:not([mode="multiple"])) [part="field"] {flex-wrap: nowrap;}[part="trigger-icon"] {block-size: var(--icon-size);inline-size: var(--icon-size);}[part="trigger"]:hover {color: var(--helix-color-foreground);}[part="trigger"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}:host(:disabled) [part="trigger"] {cursor: not-allowed;}[part="surface"] {--_floating-border-color: var(--time-input-border-color, var(--helix-color-border));--_floating-border-width: var(--time-input-border-width, var(--helix-border-floating));--_floating-shadow: var(--time-input-shadow, var(--helix-shadow-floating));inline-size: var(--floating-anchor-inline-size, 100%);min-inline-size: max-content;overflow: hidden;padding-block: var(--helix-space-2xs);padding-inline: var(--helix-space-none);position: absolute;}::slotted([slot="panel-header"]) {display: block;margin-block-end: var(--helix-space-sm);margin-inline: var(--helix-space-sm);}::slotted([slot="panel-footer"]) {display: block;margin-block-start: var(--helix-space-sm);margin-inline: var(--helix-space-sm);}@media (prefers-reduced-motion: reduce) {[part="
|
|
5
|
+
slot[name="end"]::slotted(*) {color: var(--helix-color-foreground-subtle);flex: none;}:host(:disabled) [part="field"] {color: var(--helix-color-foreground-subtle);}[part="trigger"] {--icon-size: var(--helix-size-icon);all: unset;align-items: center;box-sizing: border-box;color: var(--helix-color-foreground-muted);cursor: pointer;display: flex;flex: none;transition: color var(--helix-duration-fast) var(--helix-easing-standard);}:host(:not([mode="multiple"])) [part="field"] {flex-wrap: nowrap;}[part="trigger-icon"] {block-size: var(--icon-size);inline-size: var(--icon-size);}[part="trigger"]:hover {color: var(--helix-color-foreground);}[part="trigger"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}[part="clear"] {--icon-size: var(--helix-size-icon-tight);all: unset;align-items: center;border-radius: var(--helix-radii-sm);box-sizing: border-box;color: var(--helix-color-foreground-muted);cursor: pointer;display: flex;flex: 0 0 auto;justify-content: center;min-block-size: var(--helix-size-icon-loose);min-inline-size: var(--helix-size-icon-loose);transition: color var(--helix-duration-fast) var(--helix-easing-standard);}[part="clear"]:hover {color: var(--helix-color-foreground);}[part="clear"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}:host(:disabled) [part="trigger"] {cursor: not-allowed;}[part="surface"] {--_floating-border-color: var(--time-input-border-color, var(--helix-color-border));--_floating-border-width: var(--time-input-border-width, var(--helix-border-floating));--_floating-shadow: var(--time-input-shadow, var(--helix-shadow-floating));inline-size: var(--floating-anchor-inline-size, 100%);min-inline-size: max-content;overflow: hidden;padding-block: var(--helix-space-2xs);padding-inline: var(--helix-space-none);position: absolute;}::slotted([slot="panel-header"]) {display: block;margin-block-end: var(--helix-space-sm);margin-inline: var(--helix-space-sm);}::slotted([slot="panel-footer"]) {display: block;margin-block-start: var(--helix-space-sm);margin-inline: var(--helix-space-sm);}@media (prefers-reduced-motion: reduce) {[part="clear"],
|
|
6
|
+
[part="field"],
|
|
6
7
|
[part="trigger"] {transition: none;}}:host([variant="wheels"]) [part="surface"] {inline-size: max-content;}[part="time"] {flex: none;}:host([mode="multiple"]) [part="control"] {flex-basis: 0;min-inline-size: var(--helix-size-icon-loose);}[part="segments"] {--_segment-focus-background-color: var(
|
|
7
8
|
--time-input-segment-focus-background-color,
|
|
8
9
|
var(--helix-color-primary)
|
|
@@ -13,10 +13,10 @@ var(--toast-item-padding, var(--helix-space-sm)) +
|
|
|
13
13
|
(var(--_toast-line) - var(--helix-size-control)) /
|
|
14
14
|
2
|
|
15
15
|
);inset-inline-end: var(--helix-space-sm);block-size: var(--helix-size-control);border-radius: var(--helix-radii-sm);color: var(--toast-dismiss-color, var(--helix-color-foreground-muted));cursor: pointer;display: inline-flex;flex: 0 0 auto;inline-size: var(--helix-size-control);place-content: center;place-items: center;transition: color var(--helix-duration-fast) var(--helix-easing-standard);}[part="dismiss"] svg {block-size: var(--helix-size-icon);inline-size: var(--helix-size-icon);}[part="dismiss"]:hover {background-color: color-mix(in oklab, var(--helix-color-foreground) 8%, transparent);color: var(--helix-color-foreground);}[part="dismiss"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}[part="item"],
|
|
16
|
-
[part="item"] > * {touch-action: pan-y;}[part="content"] > slot {display: block;touch-action: pan-y;}[part="item"][data-swiping] {transition: none;translate: var(--toast-swipe-x, 0) 0;user-select: none;}[part="timer"] {animation: helix-toast-drain var(--toast-duration, 0ms) linear forwards;background-color: var(
|
|
16
|
+
[part="item"] > * {touch-action: pan-y;}[part="content"] > slot {display: block;touch-action: pan-y;}[part="item"][data-swiping] {transition: none;translate: var(--toast-swipe-x, 0) var(--toast-swipe-y, 0);user-select: none;}[part="timer"] {animation: helix-toast-drain var(--toast-duration, 0ms) linear forwards;background-color: var(
|
|
17
17
|
--toast-tone-color,
|
|
18
18
|
var(--_toast-severity, var(--helix-color-foreground-muted))
|
|
19
|
-
);block-size: var(--toast-timer-size, var(--helix-space-2xs));inset-block-start: 0;inset-inline: 0;position: absolute;transform-origin: 0 50%;}[part="timer"]:dir(rtl) {transform-origin: 100% 50%;}:host([data-paused]) [part="timer"] {animation-play-state: paused;}@keyframes helix-toast-drain {to {scale: 0 1;}}@media (prefers-reduced-motion: no-preference) {[part="item"] {animation: helix-toast-in var(--helix-duration-normal) var(--helix-easing-decelerate) backwards;}}@keyframes helix-toast-in {from {opacity: 0;translate: 0 var(--_toast-enter, var(--helix-space-lg));}}:host([data-closed]) [part="item"] {padding-block: 0;transition: padding-block var(--helix-duration-normal) var(--helix-easing-accelerate);}:host([hidden]:not([hidden="until-found"])) {display: grid;}:host(:state(waiting)) {display: none;}:host([data-closed]) {grid-template-rows: minmax(0, 0fr);margin-block-start: 0;opacity: 0;translate: 0 var(--_toast-enter, var(--helix-space-lg));visibility: hidden;transition:
|
|
19
|
+
);block-size: var(--toast-timer-size, var(--helix-space-2xs));inset-block-start: 0;inset-inline: 0;position: absolute;transform-origin: 0 50%;}[part="timer"]:dir(rtl) {transform-origin: 100% 50%;}:host([data-paused]) [part="timer"] {animation-play-state: paused;}@keyframes helix-toast-drain {to {scale: 0 1;}}@media (prefers-reduced-motion: no-preference) {[part="item"] {animation: helix-toast-in var(--helix-duration-normal) var(--helix-easing-decelerate) backwards;}}@keyframes helix-toast-in {from {opacity: 0;translate: 0 var(--_toast-enter, var(--helix-space-lg));}}:host([data-closed]) [part="item"] {padding-block: 0;transition: padding-block var(--helix-duration-normal) var(--helix-easing-accelerate);}:host([hidden]:not([hidden="until-found"], :state(waiting))) {display: grid;}:host(:state(waiting)) {display: none;}:host([data-closed]) {grid-template-rows: minmax(0, 0fr);margin-block-start: 0;opacity: 0;translate: 0 var(--_toast-enter, var(--helix-space-lg));visibility: hidden;transition:
|
|
20
20
|
grid-template-rows var(--helix-duration-normal) var(--helix-easing-accelerate),
|
|
21
21
|
margin-block-start var(--helix-duration-normal) var(--helix-easing-accelerate),
|
|
22
22
|
opacity var(--helix-duration-normal) var(--helix-easing-accelerate),
|