@fusion.dev/helix 0.144.0 → 0.146.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 +17914 -4368
- package/dist/accordion/item/accordion-item.css.js +25 -10
- package/dist/accordion/item/accordion-item.d.ts +10 -0
- package/dist/aura/palette.d.ts +38 -0
- package/dist/aura/palette.js +22 -0
- package/dist/aura/root/aura-root.css.js +27 -3
- package/dist/aura/root/aura-root.d.ts +61 -14
- package/dist/aura/root/aura-root.js +40 -23
- package/dist/badge/root/badge-root.css.js +86 -16
- package/dist/badge/root/badge-root.d.ts +18 -0
- package/dist/badge/root/badge-root.js +6 -0
- package/dist/blockquote/root/blockquote-root.css.js +2 -2
- package/dist/blockquote/root/blockquote-root.d.ts +2 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.css.js +7 -7
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +5 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.css.js +24 -1
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +4 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.js +2 -0
- package/dist/button/root/button-root.css.js +4 -3
- package/dist/button/root/button-root.d.ts +2 -0
- package/dist/button-group/root/button-group-root.d.ts +3 -0
- package/dist/callout/root/callout-root.css.js +4 -3
- package/dist/callout/root/callout-root.d.ts +6 -2
- package/dist/canvas/root/canvas-root.css.js +1 -0
- package/dist/card/root/card-root.d.ts +6 -0
- package/dist/carousel/root/carousel-root.css.js +17 -1
- package/dist/chat/message/chat-message.css.js +0 -62
- package/dist/chat/message/chat-message.js +2 -1
- package/dist/chat/root/chat-root.css.js +7 -0
- package/dist/chat/root/chat-root.d.ts +2 -0
- package/dist/chat/root/chat-root.js +2 -1
- package/dist/chat/typing.css.d.ts +1 -0
- package/dist/chat/typing.css.js +62 -0
- package/dist/checkbox/root/checkbox-root.css.js +15 -0
- package/dist/checkbox/root/checkbox-root.d.ts +2 -1
- package/dist/code/root/code-root.css.js +2 -2
- package/dist/code/root/code-root.d.ts +2 -0
- package/dist/code-block/root/code-block-root.css.js +24 -0
- package/dist/code-block/root/code-block-root.d.ts +2 -1
- package/dist/color-input/root/color-input-root.css.js +10 -0
- package/dist/color-picker/root/color-picker-root.css.js +8 -0
- package/dist/color-picker/root/color-picker-root.d.ts +1 -0
- package/dist/copy-button/root/copy-button-root.css.js +15 -6
- package/dist/copy-button/root/copy-button-root.d.ts +7 -0
- package/dist/data-table/root/data-table-root.css.js +70 -0
- package/dist/data-table/root/data-table-root.d.ts +6 -0
- package/dist/date-input/root/date-input-root.css.js +10 -0
- package/dist/description-list/item/description-list-item.css.js +11 -0
- package/dist/donut-chart/root/donut-chart-root.css.js +19 -0
- package/dist/donut-chart/root/donut-chart-root.d.ts +3 -0
- package/dist/drawer/root/drawer-root.css.js +47 -0
- package/dist/drawer/root/drawer-root.d.ts +5 -0
- package/dist/drilldown/item/drilldown-item.css.js +8 -7
- package/dist/drilldown/item/drilldown-item.d.ts +6 -0
- package/dist/drilldown/root/drilldown-root.css.js +27 -13
- package/dist/drilldown/root/drilldown-root.d.ts +10 -0
- package/dist/element-events.generated.js +72 -13
- package/dist/file-input/root/file-input-root.css.js +12 -11
- package/dist/file-input/root/file-input-root.d.ts +11 -0
- package/dist/filter-input/root/filter-input-root.css.js +6 -5
- package/dist/filter-input/root/filter-input-root.d.ts +5 -0
- package/dist/flex/root/flex-root.css.js +143 -9
- package/dist/flex/root/flex-root.d.ts +62 -5
- package/dist/flex/root/flex-root.js +17 -1
- package/dist/graph/root/graph-root.css.js +11 -8
- package/dist/graph/root/graph-root.d.ts +8 -0
- package/dist/grid/root/grid-root.css.js +114 -11
- package/dist/grid/root/grid-root.d.ts +40 -0
- package/dist/grid/root/grid-root.js +13 -1
- package/dist/heatmap/root/heatmap-root.css.js +2 -1
- package/dist/icon-button/root/icon-button-root.css.js +68 -13
- package/dist/icon-button/root/icon-button-root.d.ts +4 -0
- package/dist/kbd/root/kbd-root.css.js +27 -0
- package/dist/kbd/root/kbd-root.d.ts +2 -0
- package/dist/lightbox/item/lightbox-item.css.js +4 -0
- package/dist/lightbox/root/lightbox-root.css.js +41 -0
- package/dist/line-chart/root/line-chart-root.css.js +16 -0
- package/dist/line-chart/root/line-chart-root.d.ts +2 -0
- package/dist/list/item/list-item.css.js +21 -1
- package/dist/list/item/list-item.d.ts +3 -0
- package/dist/list/root/list-root.css.js +13 -1
- package/dist/listbox/root/listbox-root.css.js +9 -0
- package/dist/listbox/root/listbox-root.d.ts +1 -0
- package/dist/loader/root/loader-root.css.js +3 -3
- package/dist/loader/root/loader-root.d.ts +2 -0
- package/dist/megamenu/root/megamenu-root.css.js +16 -13
- package/dist/megamenu/root/megamenu-root.d.ts +11 -0
- package/dist/menu/index.d.ts +1 -0
- package/dist/menu/index.js +1 -0
- package/dist/menu/item/menu-item.css.js +39 -4
- package/dist/menu/item/menu-item.d.ts +4 -0
- package/dist/menu/item/menu-item.js +2 -0
- package/dist/menu/section/menu-section.css.d.ts +1 -0
- package/dist/menu/section/menu-section.css.js +14 -0
- package/dist/menu/section/menu-section.d.ts +24 -0
- package/dist/menu/section/menu-section.js +16 -0
- package/dist/meter/root/meter-root.css.js +6 -3
- package/dist/meter/root/meter-root.d.ts +1 -0
- package/dist/navigation/root/navigation-root.css.js +3 -2
- package/dist/navigation/root/navigation-root.d.ts +13 -0
- package/dist/notifications/root/notifications-root.css.js +30 -1
- package/dist/notifications/root/notifications-root.d.ts +1 -0
- package/dist/number-input/root/number-input-root.css.js +12 -9
- package/dist/number-input/root/number-input-root.d.ts +8 -0
- package/dist/object-inspector/root/object-inspector-root.css.js +38 -7
- package/dist/object-inspector/root/object-inspector-root.d.ts +4 -1
- package/dist/object-inspector/root/object-inspector-root.js +2 -1
- package/dist/option/root/option-root.css.js +1 -1
- package/dist/orb/index.d.ts +1 -1
- package/dist/orb/index.js +1 -1
- package/dist/orb/root/orb-root.d.ts +40 -6
- package/dist/orb/root/orb-root.js +29 -11
- package/dist/outline/root/outline-root.css.js +10 -0
- package/dist/outline/root/outline-root.d.ts +7 -0
- package/dist/pin-input/root/pin-input-root.css.js +4 -4
- package/dist/pin-input/root/pin-input-root.d.ts +4 -0
- package/dist/progress/root/progress-root.css.js +4 -2
- package/dist/progress/root/progress-root.d.ts +1 -0
- package/dist/qr-code/root/qr-code-root.css.js +11 -0
- package/dist/quote/root/quote-root.css.js +3 -0
- package/dist/quote/root/quote-root.d.ts +2 -0
- package/dist/radio/root/radio-root.css.js +16 -0
- package/dist/radio/root/radio-root.d.ts +2 -1
- package/dist/sandbox/frame.d.ts +64 -0
- package/dist/sandbox/frame.js +146 -0
- package/dist/sandbox/index.d.ts +2 -0
- package/dist/sandbox/index.js +1 -0
- package/dist/sandbox/levels.d.ts +10 -0
- package/dist/sandbox/levels.js +5 -0
- package/dist/sandbox/root/sandbox-root.d.ts +3 -0
- package/dist/sandbox/root/sandbox-root.js +13 -3
- package/dist/sandbox/source/sandbox-source.css.js +70 -0
- package/dist/sandbox/source/sandbox-source.d.ts +35 -0
- package/dist/sandbox/source/sandbox-source.js +22 -3
- package/dist/sandbox/terminal/sandbox-terminal.css.js +39 -0
- package/dist/sandbox/terminal/sandbox-terminal.d.ts +50 -1
- package/dist/sandbox/terminal/sandbox-terminal.js +61 -4
- package/dist/sandbox/tokens.d.ts +39 -0
- package/dist/sandbox/tokens.js +9 -0
- package/dist/scatter-chart/root/scatter-chart-root.css.js +9 -0
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +2 -0
- package/dist/scroll-area/root/scroll-area-root.css.js +83 -1
- package/dist/scroll-area/root/scroll-area-root.d.ts +6 -0
- package/dist/skeleton/root/skeleton-root.css.js +11 -11
- package/dist/skeleton/root/skeleton-root.d.ts +1 -0
- package/dist/skip-link/root/skip-link-root.css.js +20 -8
- package/dist/skip-link/root/skip-link-root.d.ts +12 -3
- package/dist/slider/root/slider-root.css.js +26 -0
- package/dist/sparkline/root/sparkline-root.css.js +49 -0
- package/dist/sparkline/root/sparkline-root.d.ts +6 -0
- package/dist/sparkline/root/sparkline-root.js +2 -1
- package/dist/speed-dial/item/speed-dial-item.css.js +18 -10
- package/dist/speed-dial/item/speed-dial-item.d.ts +7 -0
- package/dist/speed-dial/root/speed-dial-root.css.js +17 -8
- package/dist/speed-dial/root/speed-dial-root.d.ts +16 -1
- package/dist/speed-dial/root/speed-dial-root.js +4 -1
- package/dist/stat/root/stat-root.css.js +4 -0
- package/dist/steps/root/steps-root.css.js +28 -0
- package/dist/steps/root/steps-root.d.ts +5 -0
- package/dist/steps/step/step.js +2 -1
- package/dist/table/root/table-root.css.js +18 -0
- package/dist/table/root/table-root.d.ts +6 -0
- package/dist/table/root/table-root.js +2 -0
- package/dist/table/row/table-row.css.js +18 -0
- package/dist/table/row/table-row.d.ts +2 -0
- package/dist/table/row/table-row.js +2 -0
- package/dist/tabs/panel/tab-panel.css.js +5 -1
- package/dist/tabs/root/tabs-root.css.js +58 -3
- package/dist/tabs/root/tabs-root.d.ts +4 -0
- package/dist/tabs/tab/tab.css.js +21 -10
- package/dist/tabs/tab/tab.d.ts +7 -0
- package/dist/tag/group/tag-group.css.js +6 -0
- package/dist/text/clamp.d.ts +11 -0
- package/dist/text/clamp.js +3 -0
- package/dist/text/root/text-root.css.js +79 -45
- package/dist/text/root/text-root.d.ts +49 -7
- package/dist/text/root/text-root.js +17 -11
- package/dist/textarea/root/textarea-root.css.js +27 -0
- package/dist/time-input/root/time-input-root.css.js +12 -0
- package/dist/time-picker/root/time-picker-root.css.js +1 -1
- package/dist/timeline/group/timeline-group.css.d.ts +1 -0
- package/dist/timeline/group/timeline-group.css.js +32 -0
- package/dist/timeline/group/timeline-group.d.ts +25 -0
- package/dist/timeline/group/timeline-group.js +16 -0
- package/dist/timeline/index.d.ts +1 -0
- package/dist/timeline/index.js +1 -0
- package/dist/timeline/item/timeline-item.css.js +43 -16
- package/dist/timeline/root/timeline-root.css.js +56 -0
- package/dist/timeline/root/timeline-root.d.ts +26 -0
- package/dist/timeline/root/timeline-root.js +7 -0
- package/dist/toast/item/toast-item.css.js +10 -0
- package/dist/toast/root/toast-root.d.ts +1 -0
- package/dist/toast/root/toast-root.js +1 -0
- package/dist/toggle/group/toggle-group.css.js +10 -7
- package/dist/toggle/group/toggle-group.d.ts +6 -1
- package/dist/toggle/root/toggle-root.d.ts +6 -0
- package/dist/toolbar/root/toolbar-root.css.js +4 -0
- package/dist/toolbar/root/toolbar-root.d.ts +5 -0
- package/dist/tooltip/root/tooltip-root.css.js +5 -5
- package/dist/tooltip/root/tooltip-root.d.ts +4 -0
- package/dist/tree/item/tree-item.css.js +89 -7
- package/dist/tree/item/tree-item.d.ts +19 -0
- package/dist/trend/root/trend-root.css.js +3 -5
- package/dist/trend/root/trend-root.d.ts +2 -2
- package/dist/video/root/video-root.css.js +6 -0
- package/dist/video/root/video-root.d.ts +3 -0
- package/dist/virtual-list/root/virtual-list-root.css.js +19 -0
- package/dist/virtual-list/root/virtual-list-root.d.ts +10 -3
- package/lint.json +1 -1
- package/package.json +9 -9
- package/types/jsx.d.ts +8253 -1233
- package/types/svelte.d.ts +2 -0
- package/types/vue.d.ts +2357 -312
package/dist/steps/step/step.js
CHANGED
|
@@ -7,10 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { customElement } from '@fusion.dev/helix-core';
|
|
8
8
|
import { HelixHeadlessStep } from '@fusion.dev/helix-headless/steps';
|
|
9
9
|
import '../../button/index.js';
|
|
10
|
+
import { styles as liveStyles } from '../../shared/live/live.css.js';
|
|
10
11
|
import { styles } from './step.css.js';
|
|
11
12
|
let HelixStep = class HelixStep extends HelixHeadlessStep {
|
|
12
13
|
static { this.tier = 'helix-'; }
|
|
13
|
-
static { this.styles = styles; }
|
|
14
|
+
static { this.styles = [liveStyles, styles]; }
|
|
14
15
|
};
|
|
15
16
|
HelixStep = __decorate([
|
|
16
17
|
customElement('helix-step')
|
|
@@ -15,6 +15,24 @@ inline-size: 100%;
|
|
|
15
15
|
display: contents;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
::slotted([slot="heading"]) {
|
|
19
|
+
color: var(--table-title-color, var(--helix-color-foreground));
|
|
20
|
+
display: block;
|
|
21
|
+
font-family: var(--helix-font-sans);
|
|
22
|
+
font-size: var(--table-title-text, var(--helix-text-md));
|
|
23
|
+
font-weight: var(--helix-weight-semibold);
|
|
24
|
+
margin-block: var(--helix-space-none) var(--table-title-gap, var(--helix-space-sm));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
[part="select-all"] {
|
|
28
|
+
align-items: center;
|
|
29
|
+
border-block-end: var(--helix-border-thin) solid var(--helix-color-border);
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
display: flex;
|
|
32
|
+
min-block-size: var(--helix-size-control-loose);
|
|
33
|
+
padding-inline: var(--helix-space-none) var(--helix-space-md);
|
|
34
|
+
}
|
|
35
|
+
|
|
18
36
|
:host([loading]) [part="table"] {
|
|
19
37
|
opacity: 0.5;
|
|
20
38
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HelixHeadlessTable } from '@fusion.dev/helix-headless/table';
|
|
2
2
|
import type { CSSResultGroup } from 'lit';
|
|
3
|
+
import '../../checkbox/index.js';
|
|
3
4
|
/**
|
|
4
5
|
* @summary A table of data, laid out on a grid.
|
|
5
6
|
*
|
|
@@ -13,13 +14,18 @@ import type { CSSResultGroup } from 'lit';
|
|
|
13
14
|
* @documentation https://fusion.dev/helix/components/table
|
|
14
15
|
*
|
|
15
16
|
* @slot - The table's rows.
|
|
17
|
+
* @slot heading - Words that name the table, shown above it in the weight of a heading.
|
|
16
18
|
*
|
|
17
19
|
* @csspart live - A live region that repeats the empty and loading text, so screen readers announce it when it changes. Visually hidden in the styled tier.
|
|
18
20
|
* @csspart table - The grid.
|
|
19
21
|
*
|
|
20
22
|
* @cssproperty --table-columns - Track list for the columns. It overrides the track list worked out from the columns.
|
|
23
|
+
* @cssproperty --table-title-color - The color of the words in the `heading` slot.
|
|
24
|
+
* @cssproperty --table-title-gap - The space between the `heading` slot and the grid.
|
|
25
|
+
* @cssproperty --table-title-text - The font size of the words in the `heading` slot.
|
|
21
26
|
*/
|
|
22
27
|
export declare class HelixTable extends HelixHeadlessTable {
|
|
28
|
+
static tier: string;
|
|
23
29
|
static styles: CSSResultGroup;
|
|
24
30
|
}
|
|
25
31
|
declare global {
|
|
@@ -9,7 +9,9 @@ import { HelixHeadlessTable } from '@fusion.dev/helix-headless/table';
|
|
|
9
9
|
import { styles as collectionStateStyles } from '../../shared/collection/state.css.js';
|
|
10
10
|
import { styles as liveStyles } from '../../shared/live/live.css.js';
|
|
11
11
|
import { styles } from './table-root.css.js';
|
|
12
|
+
import '../../checkbox/index.js';
|
|
12
13
|
let HelixTable = class HelixTable extends HelixHeadlessTable {
|
|
14
|
+
static { this.tier = 'helix-'; }
|
|
13
15
|
static { this.styles = [liveStyles, collectionStateStyles, styles]; }
|
|
14
16
|
};
|
|
15
17
|
HelixTable = __decorate([
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
2
|
export const styles = createSheet(`:host {
|
|
3
3
|
display: contents;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
[part~="select"] {
|
|
7
|
+
align-items: center;
|
|
8
|
+
border-block-end: var(--helix-border-thin) solid var(--helix-color-border);
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
display: flex;
|
|
11
|
+
min-block-size: var(--helix-size-control);
|
|
12
|
+
padding-inline: var(--helix-space-none) var(--helix-space-md);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host(:state(selected)) [part~="select"],
|
|
16
|
+
:host(:state(selected)) ::slotted(*) {
|
|
17
|
+
background-color: color-mix(
|
|
18
|
+
in srgb,
|
|
19
|
+
var(--helix-color-primary) 10%,
|
|
20
|
+
var(--helix-color-background)
|
|
21
|
+
);
|
|
4
22
|
}`);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HelixHeadlessTableRow } from '@fusion.dev/helix-headless/table';
|
|
2
2
|
import type { CSSResultGroup } from 'lit';
|
|
3
|
+
import '../../checkbox/index.js';
|
|
3
4
|
/**
|
|
4
5
|
* @summary One row of a table.
|
|
5
6
|
*
|
|
@@ -16,6 +17,7 @@ import type { CSSResultGroup } from 'lit';
|
|
|
16
17
|
* @slot - The row's cells.
|
|
17
18
|
*/
|
|
18
19
|
export declare class HelixTableRow extends HelixHeadlessTableRow {
|
|
20
|
+
static tier: string;
|
|
19
21
|
static styles: CSSResultGroup;
|
|
20
22
|
}
|
|
21
23
|
declare global {
|
|
@@ -7,7 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { customElement } from '@fusion.dev/helix-core';
|
|
8
8
|
import { HelixHeadlessTableRow } from '@fusion.dev/helix-headless/table';
|
|
9
9
|
import { styles } from './table-row.css.js';
|
|
10
|
+
import '../../checkbox/index.js';
|
|
10
11
|
let HelixTableRow = class HelixTableRow extends HelixHeadlessTableRow {
|
|
12
|
+
static { this.tier = 'helix-'; }
|
|
11
13
|
static { this.styles = styles; }
|
|
12
14
|
};
|
|
13
15
|
HelixTableRow = __decorate([
|
|
@@ -8,7 +8,11 @@ display: contents;
|
|
|
8
8
|
min-block-size: 0;
|
|
9
9
|
min-inline-size: 0;
|
|
10
10
|
outline: none;
|
|
11
|
-
padding-block-start: var(
|
|
11
|
+
padding-block-start: var(
|
|
12
|
+
--tabs-panel-padding-block-start,
|
|
13
|
+
var(--_tabs-panel-padding-block-start, var(--helix-space-md))
|
|
14
|
+
);
|
|
15
|
+
padding-inline-start: var(--_tabs-panel-padding-inline-start, var(--helix-space-none));
|
|
12
16
|
}
|
|
13
17
|
|
|
14
18
|
[part="panel"][hidden] {
|
|
@@ -59,15 +59,16 @@ background-color: var(--_indicator-color, transparent);
|
|
|
59
59
|
block-size: var(--_indicator-block, var(--helix-border-thick));
|
|
60
60
|
|
|
61
61
|
border: var(--_indicator-border, 0) solid var(--_indicator-border-color, transparent);
|
|
62
|
-
border-radius: var(--_indicator-radius, var(--helix-radii-none));
|
|
63
|
-
box-shadow: var(--_indicator-shadow, none);
|
|
62
|
+
border-radius: var(--tabs-indicator-radius, var(--_indicator-radius, var(--helix-radii-none)));
|
|
63
|
+
box-shadow: var(--tabs-indicator-shadow, var(--_indicator-shadow, none));
|
|
64
64
|
inline-size: var(--indicator-inline-size, 0);
|
|
65
65
|
inset-block-start: 0;
|
|
66
66
|
inset-inline-start: 0;
|
|
67
67
|
opacity: 0;
|
|
68
68
|
position: absolute;
|
|
69
69
|
|
|
70
|
-
translate:
|
|
70
|
+
translate: calc(var(--indicator-x, 0px) + var(--_indicator-offset-x, 0px))
|
|
71
|
+
calc(var(--indicator-y, 0px) + var(--_indicator-offset, 0px));
|
|
71
72
|
|
|
72
73
|
transition:
|
|
73
74
|
translate var(--helix-duration-normal) var(--helix-easing-emphasized),
|
|
@@ -126,6 +127,60 @@ var(--tabs-indicator-thickness, var(--helix-border-thick))
|
|
|
126
127
|
--_tab-selected-shadow: none;
|
|
127
128
|
}
|
|
128
129
|
|
|
130
|
+
:host([orientation="vertical"]) {
|
|
131
|
+
|
|
132
|
+
--_tabs-inline-sign: 1;
|
|
133
|
+
--_tabs-panel-padding-block-start: var(--helix-space-none);
|
|
134
|
+
--_tabs-panel-padding-inline-start: var(--helix-space-md);
|
|
135
|
+
|
|
136
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
137
|
+
grid-template-rows: minmax(0, 1fr);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:host([orientation="vertical"]:dir(rtl)) {
|
|
141
|
+
--_tabs-inline-sign: -1;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:host([orientation="vertical"]) [part="tabs"] {
|
|
145
|
+
align-content: start;
|
|
146
|
+
background-position: right;
|
|
147
|
+
background-repeat: repeat-y;
|
|
148
|
+
background-size: var(--helix-border-thin) 100%;
|
|
149
|
+
flex-direction: column;
|
|
150
|
+
overflow-x: visible;
|
|
151
|
+
overflow-y: auto;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
:host([orientation="vertical"]:dir(rtl)) [part="tabs"] {
|
|
155
|
+
background-position: left;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:host([orientation="vertical"]) ::slotted(helix-tab) {
|
|
159
|
+
--_tab-inline-size: 100%;
|
|
160
|
+
--_tab-justify: flex-start;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
:host([orientation="vertical"][variant="segmented"]) [part="tabs"] {
|
|
164
|
+
--_tab-height: initial;
|
|
165
|
+
|
|
166
|
+
block-size: auto;
|
|
167
|
+
justify-self: start;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
:host([orientation="vertical"][variant="underlined"]) [part="indicator"] {
|
|
171
|
+
--_indicator-block: var(--indicator-block-size, 0);
|
|
172
|
+
--_indicator-offset: 0px;
|
|
173
|
+
--_indicator-offset-x: calc(
|
|
174
|
+
(
|
|
175
|
+
var(--indicator-inline-size, 0px) -
|
|
176
|
+
var(--tabs-indicator-thickness, var(--helix-border-thick))
|
|
177
|
+
) *
|
|
178
|
+
var(--_tabs-inline-sign, 1)
|
|
179
|
+
);
|
|
180
|
+
|
|
181
|
+
inline-size: var(--tabs-indicator-thickness, var(--helix-border-thick));
|
|
182
|
+
}
|
|
183
|
+
|
|
129
184
|
@media print {
|
|
130
185
|
:host {
|
|
131
186
|
box-shadow: none;
|
|
@@ -22,13 +22,17 @@ import type { CSSResultGroup } from 'lit';
|
|
|
22
22
|
* @documentation https://fusion.dev/helix/components/tabs
|
|
23
23
|
*
|
|
24
24
|
* @slot - The tabs, as direct children of this element.
|
|
25
|
+
* @slot indicator - A mark of your own, drawn inside the `indicator` part, where the selected tab's place and size reach it.
|
|
25
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.
|
|
26
27
|
*
|
|
28
|
+
* @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`.
|
|
27
29
|
* @csspart panels - The panel container.
|
|
28
30
|
* @csspart tabs - The tab list.
|
|
29
31
|
*
|
|
30
32
|
* @cssproperty --tabs-gap - The space between tabs.
|
|
31
33
|
* @cssproperty --tabs-indicator-color - The fill of the mark on the current tab: the bar under `underlined`, and the pill otherwise.
|
|
34
|
+
* @cssproperty --tabs-indicator-radius - The corners of the mark.
|
|
35
|
+
* @cssproperty --tabs-indicator-shadow - The shadow under the mark, which the pill and `segmented` draw.
|
|
32
36
|
* @cssproperty --tabs-indicator-thickness - The height of the bar under `underlined`.
|
|
33
37
|
* @cssproperty --tabs-rule-color - The color of the rule under the row in `underlined`.
|
|
34
38
|
*/
|
package/dist/tabs/tab/tab.css.js
CHANGED
|
@@ -11,15 +11,19 @@ block-size: var(--_tab-height, var(--tabs-tab-block-size, var(--helix-size-contr
|
|
|
11
11
|
border: none;
|
|
12
12
|
|
|
13
13
|
border-block-end: var(--helix-border-thick) solid transparent;
|
|
14
|
-
border-radius: var(--_tab-radius, var(--helix-radii-none));
|
|
14
|
+
border-radius: var(--tabs-tab-radius, var(--_tab-radius, var(--helix-radii-none)));
|
|
15
15
|
color: var(--tabs-tab-color, var(--helix-color-foreground-subtle));
|
|
16
16
|
cursor: pointer;
|
|
17
17
|
font: inherit;
|
|
18
|
-
font-size: var(--helix-text-sm);
|
|
19
|
-
font-weight: var(--helix-weight-medium);
|
|
18
|
+
font-size: var(--tabs-tab-font-size, var(--helix-text-sm));
|
|
19
|
+
font-weight: var(--tabs-tab-font-weight, var(--helix-weight-medium));
|
|
20
20
|
display: inline-flex;
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
inline-size: var(--_tab-inline-size, auto);
|
|
23
|
+
justify-content: var(--_tab-justify, center);
|
|
22
24
|
padding-inline: var(--tabs-tab-padding-inline, var(--helix-space-sm));
|
|
25
|
+
|
|
26
|
+
text-decoration: none;
|
|
23
27
|
transition:
|
|
24
28
|
background-color var(--helix-duration-fast) var(--helix-easing-standard),
|
|
25
29
|
border-color var(--helix-duration-normal) var(--helix-easing-emphasized),
|
|
@@ -27,21 +31,28 @@ color var(--helix-duration-fast) var(--helix-easing-standard);
|
|
|
27
31
|
white-space: nowrap;
|
|
28
32
|
}
|
|
29
33
|
|
|
30
|
-
[part="tab"]:hover:not(:disabled) {
|
|
31
|
-
background-color:
|
|
32
|
-
|
|
34
|
+
[part="tab"]:hover:not(:disabled, [aria-disabled="true"]) {
|
|
35
|
+
background-color: var(
|
|
36
|
+
--tabs-tab-hover-background-color,
|
|
37
|
+
color-mix(in oklab, var(--helix-color-foreground) 5%, transparent)
|
|
38
|
+
);
|
|
39
|
+
color: var(--tabs-tab-hover-color, var(--helix-color-foreground));
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
:host(:state(selected)) [part="tab"],
|
|
36
43
|
:host(:state(selected)) [part="tab"]:hover {
|
|
37
|
-
background-color: var(
|
|
44
|
+
background-color: var(
|
|
45
|
+
--tabs-tab-selected-background-color,
|
|
46
|
+
var(--_tab-selected-surface, transparent)
|
|
47
|
+
);
|
|
38
48
|
box-shadow: var(--_tab-selected-shadow, none);
|
|
39
49
|
color: var(--tabs-tab-selected-color, var(--helix-color-foreground));
|
|
40
50
|
}
|
|
41
51
|
|
|
42
|
-
[part="tab"]:disabled
|
|
52
|
+
[part="tab"]:disabled,
|
|
53
|
+
[part="tab"][aria-disabled="true"] {
|
|
43
54
|
cursor: not-allowed;
|
|
44
|
-
opacity: 0.5;
|
|
55
|
+
opacity: var(--tabs-tab-disabled-opacity, 0.5);
|
|
45
56
|
}
|
|
46
57
|
|
|
47
58
|
[part="tab"]:focus-visible {
|
package/dist/tabs/tab/tab.d.ts
CHANGED
|
@@ -19,7 +19,14 @@ import type { CSSResultGroup } from 'lit';
|
|
|
19
19
|
*
|
|
20
20
|
* @cssproperty --tabs-tab-block-size - The height of a tab. `segmented` sizes its tabs to the track and does not read it.
|
|
21
21
|
* @cssproperty --tabs-tab-color - The label color of a tab that is not current.
|
|
22
|
+
* @cssproperty --tabs-tab-disabled-opacity - How faint a disabled tab is drawn.
|
|
23
|
+
* @cssproperty --tabs-tab-font-size - The size of a tab's label.
|
|
24
|
+
* @cssproperty --tabs-tab-font-weight - The weight of a tab's label.
|
|
25
|
+
* @cssproperty --tabs-tab-hover-background-color - The wash under the pointer.
|
|
26
|
+
* @cssproperty --tabs-tab-hover-color - The label color under the pointer.
|
|
22
27
|
* @cssproperty --tabs-tab-padding-inline - The space either side of the label.
|
|
28
|
+
* @cssproperty --tabs-tab-radius - The corners of a tab, which the hover wash takes.
|
|
29
|
+
* @cssproperty --tabs-tab-selected-background-color - The fill of the current tab itself, under the moving mark.
|
|
23
30
|
* @cssproperty --tabs-tab-selected-color - The label color of the current tab.
|
|
24
31
|
*/
|
|
25
32
|
export declare class HelixTab extends HelixHeadlessTab {
|
|
@@ -3,4 +3,10 @@ export const styles = createSheet(`:host {
|
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-wrap: wrap;
|
|
5
5
|
gap: var(--tag-group-gap, var(--helix-space-2xs));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
[part="empty"]:focus-visible {
|
|
9
|
+
border-radius: var(--helix-radii-sm);
|
|
10
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
11
|
+
outline-offset: var(--helix-size-focus-offset);
|
|
6
12
|
}`);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The line count `lines` asks for, as the declarations that clamp it, or
|
|
3
|
+
* `undefined` where it is no whole number above zero.
|
|
4
|
+
*
|
|
5
|
+
* Written on the part inside the shadow root, so any count works with no rule
|
|
6
|
+
* per number, and the server renders it with the rest of the template. The
|
|
7
|
+
* box and the overflow it needs are written with the count, so a count that
|
|
8
|
+
* is no count leaves the text as it was, with nothing cut off. A page's
|
|
9
|
+
* `::part(text)` rule still wins over each of them.
|
|
10
|
+
*/
|
|
11
|
+
export declare const clampOf: (lines: number | undefined) => string | undefined;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
2
|
export const styles = createSheet(`:host {
|
|
3
3
|
display: inline;
|
|
4
|
+
|
|
5
|
+
font-family: var(--text-font-family);
|
|
6
|
+
font-size: var(--text-font-size);
|
|
7
|
+
font-weight: var(--text-font-weight);
|
|
8
|
+
letter-spacing: var(--text-letter-spacing);
|
|
9
|
+
line-height: var(--text-line-height);
|
|
4
10
|
}
|
|
5
11
|
|
|
6
12
|
:host([as="p"]),
|
|
@@ -15,84 +21,84 @@ display: block;
|
|
|
15
21
|
|
|
16
22
|
:host([variant="display"]),
|
|
17
23
|
:host(:not([variant])[as="h1"]) {
|
|
18
|
-
font-family: var(--helix-font-display);
|
|
19
|
-
font-size: var(--helix-text-3xl);
|
|
20
|
-
font-weight: var(--helix-weight-semibold);
|
|
21
|
-
letter-spacing: var(--helix-tracking-tight);
|
|
22
|
-
line-height: var(--helix-leading-heading);
|
|
24
|
+
font-family: var(--text-font-family, var(--helix-font-display));
|
|
25
|
+
font-size: var(--text-font-size, var(--helix-text-3xl));
|
|
26
|
+
font-weight: var(--text-font-weight, var(--helix-weight-semibold));
|
|
27
|
+
letter-spacing: var(--text-letter-spacing, var(--helix-tracking-tight));
|
|
28
|
+
line-height: var(--text-line-height, var(--helix-leading-heading));
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
:host([variant="heading"]),
|
|
26
32
|
:host(:not([variant])[as="h2"]) {
|
|
27
|
-
font-family: var(--helix-font-sans);
|
|
28
|
-
font-size: var(--helix-text-2xl);
|
|
29
|
-
font-weight: var(--helix-weight-semibold);
|
|
30
|
-
letter-spacing: var(--helix-tracking-tight);
|
|
31
|
-
line-height: var(--helix-leading-heading);
|
|
33
|
+
font-family: var(--text-font-family, var(--helix-font-sans));
|
|
34
|
+
font-size: var(--text-font-size, var(--helix-text-2xl));
|
|
35
|
+
font-weight: var(--text-font-weight, var(--helix-weight-semibold));
|
|
36
|
+
letter-spacing: var(--text-letter-spacing, var(--helix-tracking-tight));
|
|
37
|
+
line-height: var(--text-line-height, var(--helix-leading-heading));
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
:host([variant="subheading"]),
|
|
35
41
|
:host(:not([variant])[as="h3"]) {
|
|
36
|
-
font-family: var(--helix-font-sans);
|
|
37
|
-
font-size: var(--helix-text-xl);
|
|
38
|
-
font-weight: var(--helix-weight-semibold);
|
|
39
|
-
letter-spacing: var(--helix-tracking-tight);
|
|
40
|
-
line-height: var(--helix-leading-heading);
|
|
42
|
+
font-family: var(--text-font-family, var(--helix-font-sans));
|
|
43
|
+
font-size: var(--text-font-size, var(--helix-text-xl));
|
|
44
|
+
font-weight: var(--text-font-weight, var(--helix-weight-semibold));
|
|
45
|
+
letter-spacing: var(--text-letter-spacing, var(--helix-tracking-tight));
|
|
46
|
+
line-height: var(--text-line-height, var(--helix-leading-heading));
|
|
41
47
|
}
|
|
42
48
|
|
|
43
49
|
:host([variant="title"]),
|
|
44
50
|
:host(:not([variant])[as="h4"]) {
|
|
45
|
-
font-family: var(--helix-font-sans);
|
|
46
|
-
font-size: var(--helix-text-lg);
|
|
47
|
-
font-weight: var(--helix-weight-semibold);
|
|
48
|
-
letter-spacing: var(--helix-tracking-normal);
|
|
49
|
-
line-height: var(--helix-leading-heading);
|
|
51
|
+
font-family: var(--text-font-family, var(--helix-font-sans));
|
|
52
|
+
font-size: var(--text-font-size, var(--helix-text-lg));
|
|
53
|
+
font-weight: var(--text-font-weight, var(--helix-weight-semibold));
|
|
54
|
+
letter-spacing: var(--text-letter-spacing, var(--helix-tracking-normal));
|
|
55
|
+
line-height: var(--text-line-height, var(--helix-leading-heading));
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
:host([variant="body"]),
|
|
53
59
|
:host(:not([variant])[as="p"]) {
|
|
54
|
-
font-family: var(--helix-font-sans);
|
|
55
|
-
font-size: var(--helix-text-md);
|
|
56
|
-
font-weight: var(--helix-weight-regular);
|
|
57
|
-
letter-spacing: var(--helix-tracking-normal);
|
|
58
|
-
line-height: var(--helix-leading-normal);
|
|
60
|
+
font-family: var(--text-font-family, var(--helix-font-sans));
|
|
61
|
+
font-size: var(--text-font-size, var(--helix-text-md));
|
|
62
|
+
font-weight: var(--text-font-weight, var(--helix-weight-regular));
|
|
63
|
+
letter-spacing: var(--text-letter-spacing, var(--helix-tracking-normal));
|
|
64
|
+
line-height: var(--text-line-height, var(--helix-leading-normal));
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
:host([variant="body-strong"]),
|
|
62
68
|
:host(:not([variant])[as="h5"]),
|
|
63
69
|
:host(:not([variant])[as="h6"]),
|
|
64
70
|
:host(:not([variant])[as="strong"]) {
|
|
65
|
-
font-family: var(--helix-font-sans);
|
|
66
|
-
font-size: var(--helix-text-md);
|
|
67
|
-
font-weight: var(--helix-weight-medium);
|
|
68
|
-
letter-spacing: var(--helix-tracking-normal);
|
|
69
|
-
line-height: var(--helix-leading-normal);
|
|
71
|
+
font-family: var(--text-font-family, var(--helix-font-sans));
|
|
72
|
+
font-size: var(--text-font-size, var(--helix-text-md));
|
|
73
|
+
font-weight: var(--text-font-weight, var(--helix-weight-medium));
|
|
74
|
+
letter-spacing: var(--text-letter-spacing, var(--helix-tracking-normal));
|
|
75
|
+
line-height: var(--text-line-height, var(--helix-leading-normal));
|
|
70
76
|
}
|
|
71
77
|
|
|
72
78
|
:host([variant="caption"]) {
|
|
73
|
-
font-family: var(--helix-font-sans);
|
|
74
|
-
font-size: var(--helix-text-sm);
|
|
75
|
-
font-weight: var(--helix-weight-regular);
|
|
76
|
-
letter-spacing: var(--helix-tracking-normal);
|
|
77
|
-
line-height: var(--helix-leading-normal);
|
|
79
|
+
font-family: var(--text-font-family, var(--helix-font-sans));
|
|
80
|
+
font-size: var(--text-font-size, var(--helix-text-sm));
|
|
81
|
+
font-weight: var(--text-font-weight, var(--helix-weight-regular));
|
|
82
|
+
letter-spacing: var(--text-letter-spacing, var(--helix-tracking-normal));
|
|
83
|
+
line-height: var(--text-line-height, var(--helix-leading-normal));
|
|
78
84
|
}
|
|
79
85
|
|
|
80
86
|
:host([variant="label"]),
|
|
81
87
|
:host(:not([variant])[as="label"]) {
|
|
82
|
-
font-family: var(--helix-font-sans);
|
|
83
|
-
font-size: var(--helix-text-xs);
|
|
84
|
-
font-weight: var(--helix-weight-medium);
|
|
85
|
-
letter-spacing: var(--helix-tracking-wide);
|
|
86
|
-
line-height: var(--helix-leading-normal);
|
|
88
|
+
font-family: var(--text-font-family, var(--helix-font-sans));
|
|
89
|
+
font-size: var(--text-font-size, var(--helix-text-xs));
|
|
90
|
+
font-weight: var(--text-font-weight, var(--helix-weight-medium));
|
|
91
|
+
letter-spacing: var(--text-letter-spacing, var(--helix-tracking-wide));
|
|
92
|
+
line-height: var(--text-line-height, var(--helix-leading-normal));
|
|
87
93
|
}
|
|
88
94
|
|
|
89
95
|
:host([variant="code"]),
|
|
90
96
|
:host(:not([variant])[as="code"]) {
|
|
91
|
-
font-family: var(--helix-font-mono);
|
|
92
|
-
font-size: var(--helix-text-xs);
|
|
93
|
-
font-weight: var(--helix-weight-regular);
|
|
94
|
-
letter-spacing: var(--helix-tracking-normal);
|
|
95
|
-
line-height: var(--helix-leading-normal);
|
|
97
|
+
font-family: var(--text-font-family, var(--helix-font-mono));
|
|
98
|
+
font-size: var(--text-font-size, var(--helix-text-xs));
|
|
99
|
+
font-weight: var(--text-font-weight, var(--helix-weight-regular));
|
|
100
|
+
letter-spacing: var(--text-letter-spacing, var(--helix-tracking-normal));
|
|
101
|
+
line-height: var(--text-line-height, var(--helix-leading-normal));
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
:host(
|
|
@@ -175,6 +181,34 @@ letter-spacing: inherit;
|
|
|
175
181
|
margin: var(--helix-space-none);
|
|
176
182
|
}
|
|
177
183
|
|
|
184
|
+
:host([lines]) {
|
|
185
|
+
display: block;
|
|
186
|
+
min-inline-size: 0;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
:host([text-align="start"]) {
|
|
190
|
+
text-align: start;
|
|
191
|
+
}
|
|
192
|
+
:host([text-align="center"]) {
|
|
193
|
+
text-align: center;
|
|
194
|
+
}
|
|
195
|
+
:host([text-align="end"]) {
|
|
196
|
+
text-align: end;
|
|
197
|
+
}
|
|
198
|
+
:host([text-align="justify"]) {
|
|
199
|
+
text-align: justify;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
:host([text-wrap="balance"]) {
|
|
203
|
+
text-wrap: balance;
|
|
204
|
+
}
|
|
205
|
+
:host([text-wrap="pretty"]) {
|
|
206
|
+
text-wrap: pretty;
|
|
207
|
+
}
|
|
208
|
+
:host([text-wrap="nowrap"]) {
|
|
209
|
+
text-wrap: nowrap;
|
|
210
|
+
}
|
|
211
|
+
|
|
178
212
|
:host([as="em"]) [part="text"] {
|
|
179
213
|
font-style: italic;
|
|
180
214
|
}
|
|
@@ -25,6 +25,14 @@ import type { CSSResultGroup, PropertyValues } from 'lit';
|
|
|
25
25
|
* state. Combining them would need a variant for every pair, such as
|
|
26
26
|
* `caption-danger` and `label-muted`.
|
|
27
27
|
*
|
|
28
|
+
* `lines` cuts the text off after that many lines and ends it with an
|
|
29
|
+
* ellipsis. `text-wrap` balances or tidies the line breaks, and `text-align`
|
|
30
|
+
* sets the alignment. Each `--text-*` property overrides one value of the
|
|
31
|
+
* ramp, for a text or for every text inside an element.
|
|
32
|
+
*
|
|
33
|
+
* **To label a control, write a native `<label data-text="label">`.** The
|
|
34
|
+
* base layer gives it the label ramp. A Helix field takes its own `label`.
|
|
35
|
+
*
|
|
28
36
|
* @since 0.1.0
|
|
29
37
|
* @status stable
|
|
30
38
|
* @category typography
|
|
@@ -34,6 +42,12 @@ import type { CSSResultGroup, PropertyValues } from 'lit';
|
|
|
34
42
|
* @slot - The text.
|
|
35
43
|
*
|
|
36
44
|
* @csspart text - The rendered element.
|
|
45
|
+
*
|
|
46
|
+
* @cssproperty --text-font-family - The typeface. Overrides the ramp's.
|
|
47
|
+
* @cssproperty --text-font-size - The size. Overrides the ramp's.
|
|
48
|
+
* @cssproperty --text-font-weight - The weight. Overrides the ramp's.
|
|
49
|
+
* @cssproperty --text-letter-spacing - The tracking. Overrides the ramp's.
|
|
50
|
+
* @cssproperty --text-line-height - The leading. Overrides the ramp's.
|
|
37
51
|
*/
|
|
38
52
|
export declare class HelixText extends HelixElement {
|
|
39
53
|
/**
|
|
@@ -41,12 +55,14 @@ export declare class HelixText extends HelixElement {
|
|
|
41
55
|
*
|
|
42
56
|
* Decides the outline and the semantics.
|
|
43
57
|
*
|
|
44
|
-
* **`label`
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
58
|
+
* **`label` is deprecated and no longer listed.** The element is in this
|
|
59
|
+
* one's shadow root, which neither `for` nor a wrapped control can reach, so
|
|
60
|
+
* it labeled nothing. Written anyway, it still renders a `<label>` in the
|
|
61
|
+
* label ramp and warns. Use `variant="label"` for the look, a native
|
|
62
|
+
* `<label data-text="label">` to label a native control, and a Helix field's
|
|
63
|
+
* own `label`.
|
|
48
64
|
*/
|
|
49
|
-
as?: 'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'strong' | 'em' | 'code'
|
|
65
|
+
as?: 'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'strong' | 'em' | 'code';
|
|
50
66
|
/**
|
|
51
67
|
* Makes the text quieter: `muted`, or the quieter `subtle`.
|
|
52
68
|
*
|
|
@@ -64,6 +80,34 @@ export declare class HelixText extends HelixElement {
|
|
|
64
80
|
* The resting case is the absent attribute, full strength.
|
|
65
81
|
*/
|
|
66
82
|
emphasis?: 'muted' | 'subtle';
|
|
83
|
+
/**
|
|
84
|
+
* The most lines to show. Text past the last one is cut off with an
|
|
85
|
+
* ellipsis.
|
|
86
|
+
*
|
|
87
|
+
* Lays the text out as a block, because a line count needs a width to break
|
|
88
|
+
* against. The whole text stays in the page, so a screen reader and a search
|
|
89
|
+
* still read all of it. Set it as an attribute, such as `lines="1"` for a
|
|
90
|
+
* single line. A count that is not a whole number above zero, such as `0`,
|
|
91
|
+
* cuts nothing off.
|
|
92
|
+
*/
|
|
93
|
+
lines?: number;
|
|
94
|
+
/**
|
|
95
|
+
* How the lines align, set as `text-align`.
|
|
96
|
+
*
|
|
97
|
+
* Named for the CSS property it sets. `align` alone is a legacy HTML
|
|
98
|
+
* attribute the browser maps to `text-align` by itself on any element, and
|
|
99
|
+
* it has no `start` or `end`.
|
|
100
|
+
*/
|
|
101
|
+
textAlign?: 'start' | 'center' | 'end' | 'justify';
|
|
102
|
+
/**
|
|
103
|
+
* How the lines break, set as `text-wrap`.
|
|
104
|
+
*
|
|
105
|
+
* `balance` evens out the length of every line, for a heading of a few
|
|
106
|
+
* lines. `pretty` avoids a last line of one short word, for a paragraph.
|
|
107
|
+
* `nowrap` keeps the text on one line. Absent, the lines break as the
|
|
108
|
+
* browser breaks them.
|
|
109
|
+
*/
|
|
110
|
+
textWrap?: 'balance' | 'pretty' | 'nowrap';
|
|
67
111
|
/**
|
|
68
112
|
* The meaning of the text, shown by its color, such as `danger` or `success`.
|
|
69
113
|
* It is set separately from `variant`.
|
|
@@ -84,8 +128,6 @@ export declare class HelixText extends HelixElement {
|
|
|
84
128
|
*/
|
|
85
129
|
variant?: 'display' | 'heading' | 'subheading' | 'title' | 'body' | 'body-strong' | 'caption' | 'label' | 'code';
|
|
86
130
|
protected updated(changed: PropertyValues): void;
|
|
87
|
-
/** Whether the page wrote this as the label of a control, which it cannot be. */
|
|
88
|
-
private labelsNothing;
|
|
89
131
|
protected render(): unknown;
|
|
90
132
|
static styles: CSSResultGroup;
|
|
91
133
|
}
|