@fusion.dev/helix 0.143.0 → 0.145.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 +19817 -1238
- package/dist/accordion/item/accordion-item.css.js +14 -3
- package/dist/accordion/item/accordion-item.d.ts +2 -0
- package/dist/aura/palette.d.ts +38 -0
- package/dist/aura/palette.js +22 -0
- package/dist/aura/root/aura-root.css.js +24 -3
- package/dist/aura/root/aura-root.d.ts +42 -7
- package/dist/aura/root/aura-root.js +31 -25
- package/dist/badge/root/badge-root.css.js +35 -0
- package/dist/badge/root/badge-root.d.ts +16 -0
- package/dist/badge/root/badge-root.js +3 -0
- package/dist/blockquote/root/blockquote-root.css.js +5 -5
- package/dist/blockquote/root/blockquote-root.d.ts +5 -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 +1 -1
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +3 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.js +2 -0
- package/dist/button/root/button-root.css.js +38 -1
- package/dist/button/root/button-root.d.ts +5 -0
- package/dist/button/root/button-root.js +2 -1
- package/dist/button-group/root/button-group-root.d.ts +3 -0
- package/dist/callout/root/callout-root.css.js +69 -11
- package/dist/callout/root/callout-root.d.ts +25 -2
- package/dist/callout/root/callout-root.js +4 -0
- package/dist/canvas/root/canvas-root.css.js +1 -0
- package/dist/card/root/card-root.css.js +26 -1
- package/dist/card/root/card-root.d.ts +11 -0
- package/dist/carousel/root/carousel-root.css.js +17 -1
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +2 -0
- package/dist/checkbox-group/root/checkbox-group-root.js +2 -0
- package/dist/code-block/root/code-block-root.css.js +23 -0
- package/dist/code-block/root/code-block-root.d.ts +15 -0
- package/dist/code-block/root/code-block-root.js +8 -0
- package/dist/color-picker/root/color-picker-root.css.js +64 -0
- package/dist/color-picker/root/color-picker-root.d.ts +2 -0
- package/dist/copy-button/root/copy-button-root.css.js +5 -0
- package/dist/data-table/root/data-table-root.css.js +63 -0
- package/dist/data-table/root/data-table-root.d.ts +1 -0
- package/dist/date-input/root/date-input-root.css.js +19 -0
- package/dist/date-input/root/date-input-root.d.ts +8 -0
- package/dist/date-input/root/date-input-root.js +2 -0
- package/dist/date-picker/root/date-picker-root.css.js +68 -0
- package/dist/date-picker/root/date-picker-root.d.ts +1 -0
- package/dist/description-list/item/description-list-item.css.js +11 -0
- package/dist/dialog/root/dialog-root.css.js +47 -0
- package/dist/divider/root/divider-root.css.js +8 -3
- package/dist/divider/root/divider-root.d.ts +17 -1
- package/dist/divider/root/divider-root.js +4 -0
- package/dist/drawer/root/drawer-root.css.js +28 -1
- package/dist/drilldown/item/drilldown-item.css.js +2 -1
- package/dist/drilldown/root/drilldown-root.css.js +2 -1
- package/dist/element-events.generated.js +66 -14
- package/dist/empty/root/empty-root.css.js +9 -9
- package/dist/empty/root/empty-root.d.ts +9 -0
- package/dist/file-input/root/file-input-root.js +2 -0
- package/dist/filter-input/root/filter-input-root.js +2 -0
- package/dist/flex/root/flex-root.css.js +134 -9
- package/dist/flex/root/flex-root.d.ts +51 -5
- package/dist/flex/root/flex-root.js +17 -1
- package/dist/grid/root/grid-root.css.js +114 -11
- package/dist/grid/root/grid-root.d.ts +37 -0
- package/dist/grid/root/grid-root.js +13 -1
- package/dist/heatmap/root/heatmap-root.css.js +33 -5
- package/dist/heatmap/root/heatmap-root.d.ts +4 -1
- package/dist/icon/index.d.ts +1 -0
- package/dist/icon/index.js +1 -0
- package/dist/icon/root/icon-root.d.ts +1 -1
- package/dist/icon/root/icon-root.js +1 -1
- package/dist/icon/root/index.d.ts +2 -0
- package/dist/icon/root/index.js +2 -0
- package/dist/icon-button/root/icon-button-root.css.js +37 -0
- package/dist/icon-button/root/icon-button-root.d.ts +4 -0
- package/dist/icon-button/root/icon-button-root.js +2 -1
- package/dist/input/root/input-root.css.js +3 -3
- package/dist/input/root/input-root.d.ts +3 -0
- package/dist/legend/root/legend-root.css.js +40 -13
- package/dist/legend/root/legend-root.d.ts +6 -0
- package/dist/legend/root/legend-root.js +1 -1
- package/dist/lightbox/root/lightbox-root.css.js +84 -0
- package/dist/lightbox/root/lightbox-root.d.ts +1 -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/loader/root/loader-root.css.js +10 -0
- package/dist/loader/root/loader-root.d.ts +3 -0
- package/dist/menu/index.d.ts +1 -0
- package/dist/menu/index.js +1 -0
- package/dist/menu/item/menu-item.css.js +15 -1
- package/dist/menu/item/menu-item.d.ts +3 -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 +23 -1
- package/dist/meter/root/meter-root.d.ts +5 -0
- package/dist/navigation/root/navigation-root.css.js +3 -2
- package/dist/navigation/root/navigation-root.d.ts +6 -0
- package/dist/notifications/notification/notification.css.js +5 -0
- package/dist/notifications/root/notifications-root.css.js +24 -1
- package/dist/notifications/root/notifications-root.d.ts +1 -0
- package/dist/number-input/root/number-input-root.css.js +3 -3
- package/dist/number-input/root/number-input-root.d.ts +3 -0
- package/dist/object-inspector/root/object-inspector-root.css.js +36 -1
- 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/orb/index.d.ts +1 -1
- package/dist/orb/index.js +1 -1
- package/dist/orb/root/orb-root.d.ts +31 -5
- package/dist/orb/root/orb-root.js +33 -4
- 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 +12 -5
- package/dist/pin-input/root/pin-input-root.d.ts +5 -0
- package/dist/popover/root/popover-root.css.js +36 -0
- package/dist/popover/root/popover-root.d.ts +1 -0
- package/dist/progress/root/progress-root.css.js +22 -1
- package/dist/progress/root/progress-root.d.ts +5 -0
- package/dist/quote/root/quote-root.css.js +1 -1
- package/dist/quote/root/quote-root.d.ts +1 -0
- package/dist/sandbox/frame.d.ts +63 -0
- package/dist/sandbox/frame.js +132 -0
- package/dist/sandbox/index.d.ts +1 -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.d.ts +1 -0
- package/dist/sandbox/source/sandbox-source.js +7 -3
- package/dist/sandbox/terminal/sandbox-terminal.css.js +39 -0
- package/dist/sandbox/terminal/sandbox-terminal.d.ts +42 -1
- package/dist/sandbox/terminal/sandbox-terminal.js +47 -3
- 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/shared/chart/tooltip.css.js +25 -2
- package/dist/shared/field/field-segments.css.d.ts +1 -0
- package/dist/shared/field/field-segments.css.js +40 -0
- package/dist/skeleton/root/skeleton-root.css.js +56 -5
- package/dist/skeleton/root/skeleton-root.d.ts +17 -1
- package/dist/skeleton/root/skeleton-root.js +3 -0
- package/dist/skip-link/root/skip-link-root.css.js +8 -8
- package/dist/skip-link/root/skip-link-root.d.ts +9 -0
- package/dist/speed-dial/item/speed-dial-item.css.js +11 -4
- package/dist/speed-dial/item/speed-dial-item.d.ts +4 -0
- package/dist/speed-dial/root/speed-dial-root.css.js +7 -3
- package/dist/speed-dial/root/speed-dial-root.d.ts +9 -0
- package/dist/speed-dial/root/speed-dial-root.js +4 -0
- package/dist/stat/root/stat-root.css.js +7 -7
- package/dist/stat/root/stat-root.d.ts +8 -0
- package/dist/steps/step/step.js +2 -1
- package/dist/switch/root/switch-root.css.js +13 -5
- package/dist/switch/root/switch-root.d.ts +25 -1
- package/dist/switch/root/switch-root.js +7 -0
- 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 +56 -1
- package/dist/tabs/tab/tab.css.js +5 -1
- package/dist/tag/group/tag-group.css.d.ts +1 -0
- package/dist/tag/group/tag-group.css.js +6 -0
- package/dist/tag/group/tag-group.d.ts +25 -0
- package/dist/tag/group/tag-group.js +16 -0
- package/dist/tag/index.d.ts +1 -0
- package/dist/tag/index.js +1 -0
- package/dist/tag/root/tag-root.css.js +50 -0
- package/dist/tag/root/tag-root.d.ts +4 -0
- package/dist/text/clamp.d.ts +8 -0
- package/dist/text/clamp.js +1 -0
- package/dist/text/root/text-root.css.js +85 -45
- package/dist/text/root/text-root.d.ts +48 -7
- package/dist/text/root/text-root.js +17 -11
- package/dist/textarea/root/textarea-root.css.js +12 -4
- package/dist/textarea/root/textarea-root.d.ts +4 -0
- package/dist/time-input/root/time-input-root.css.js +19 -0
- package/dist/time-input/root/time-input-root.d.ts +8 -0
- package/dist/time-input/root/time-input-root.js +2 -0
- 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 +16 -0
- package/dist/toggle/group/toggle-group.css.js +16 -0
- package/dist/toolbar/root/toolbar-root.css.js +3 -0
- package/dist/toolbar/root/toolbar-root.d.ts +3 -0
- package/dist/tour/root/tour-root.css.js +8 -0
- package/dist/tour/stop/tour-stop.css.js +32 -0
- package/dist/tree/item/tree-item.css.js +72 -0
- package/dist/tree/item/tree-item.d.ts +10 -0
- package/dist/trend/root/trend-root.css.js +12 -5
- package/dist/trend/root/trend-root.d.ts +6 -1
- 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 +5 -0
- package/dist/virtual-list/root/virtual-list-root.d.ts +4 -3
- package/lint.json +1 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +8620 -813
- package/types/svelte.d.ts +3 -0
- package/types/vue.d.ts +2372 -213
|
@@ -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] {
|
|
@@ -67,7 +67,8 @@ 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;
|
package/dist/tabs/tab/tab.css.js
CHANGED
|
@@ -18,8 +18,12 @@ font: inherit;
|
|
|
18
18
|
font-size: var(--helix-text-sm);
|
|
19
19
|
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),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { HelixHeadlessTagGroup } from '@fusion.dev/helix-headless/tag';
|
|
2
|
+
import type { CSSResultGroup } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary A set of tags that the arrow keys move through, and that can be removed and selected from the keyboard.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* The tags sit in a row that wraps. A selected tag is filled with its tone, as
|
|
8
|
+
* `emphasis="solid"` draws one, and the focused tag takes the focus ring round
|
|
9
|
+
* its whole box.
|
|
10
|
+
*
|
|
11
|
+
* @since 0.1.0
|
|
12
|
+
* @status stable
|
|
13
|
+
* @aliases Tag list, Chip group, Token list
|
|
14
|
+
* @documentation https://fusion.dev/helix/components/tag
|
|
15
|
+
*
|
|
16
|
+
* @cssproperty --tag-group-gap - The space between tags, across and between rows.
|
|
17
|
+
*/
|
|
18
|
+
export declare class HelixTagGroup extends HelixHeadlessTagGroup {
|
|
19
|
+
static styles: CSSResultGroup;
|
|
20
|
+
}
|
|
21
|
+
declare global {
|
|
22
|
+
interface HTMLElementTagNameMap {
|
|
23
|
+
'helix-tag-group': HelixTagGroup;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement } from '@fusion.dev/helix-core';
|
|
8
|
+
import { HelixHeadlessTagGroup } from '@fusion.dev/helix-headless/tag';
|
|
9
|
+
import { styles } from './tag-group.css.js';
|
|
10
|
+
let HelixTagGroup = class HelixTagGroup extends HelixHeadlessTagGroup {
|
|
11
|
+
static { this.styles = styles; }
|
|
12
|
+
};
|
|
13
|
+
HelixTagGroup = __decorate([
|
|
14
|
+
customElement('helix-tag-group')
|
|
15
|
+
], HelixTagGroup);
|
|
16
|
+
export { HelixTagGroup };
|
package/dist/tag/index.d.ts
CHANGED
package/dist/tag/index.js
CHANGED
|
@@ -110,6 +110,56 @@ margin-inline-end: var(--_tag-inset);
|
|
|
110
110
|
opacity: 0.75;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
[part="link"] {
|
|
114
|
+
color: inherit;
|
|
115
|
+
display: block;
|
|
116
|
+
min-inline-size: 0;
|
|
117
|
+
text-decoration: none;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@media (hover: hover) {
|
|
121
|
+
[part="link"][href]:hover {
|
|
122
|
+
text-decoration: underline;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
[part="link"]:focus-visible {
|
|
127
|
+
border-radius: var(--helix-radii-sm);
|
|
128
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
129
|
+
outline-offset: var(--helix-size-focus-offset);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:host([disabled]) {
|
|
133
|
+
opacity: var(--tag-disabled-opacity, 0.5);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:host([disabled]) [part="dismiss"] {
|
|
137
|
+
cursor: not-allowed;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
[part="cell"] {
|
|
141
|
+
align-items: center;
|
|
142
|
+
align-self: stretch;
|
|
143
|
+
border-radius: inherit;
|
|
144
|
+
cursor: default;
|
|
145
|
+
display: inline-flex;
|
|
146
|
+
gap: var(--helix-space-2xs);
|
|
147
|
+
margin-inline: calc(var(--_tag-inset) * -1);
|
|
148
|
+
min-inline-size: 0;
|
|
149
|
+
padding-inline: var(--_tag-inset);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
[part="cell"]:focus-visible {
|
|
153
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
154
|
+
outline-offset: var(--helix-size-focus-offset);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
:host(:state(selected)) {
|
|
158
|
+
--_tag-fill: color-mix(in oklab, var(--_tag-color) 82%, var(--helix-color-foreground));
|
|
159
|
+
--_tag-edge: var(--_tag-fill);
|
|
160
|
+
--_tag-label: var(--helix-color-foreground-inverse);
|
|
161
|
+
}
|
|
162
|
+
|
|
113
163
|
@media print {
|
|
114
164
|
:host {
|
|
115
165
|
print-color-adjust: economy;
|
|
@@ -14,13 +14,17 @@ import type { CSSResultGroup } from 'lit';
|
|
|
14
14
|
* @documentation https://fusion.dev/helix/components/tag
|
|
15
15
|
*
|
|
16
16
|
* @slot - The tag's label.
|
|
17
|
+
* @slot dismiss-icon - Replaces the glyph on the remove button.
|
|
17
18
|
*
|
|
18
19
|
* @event {HelixDismissEvent} helix-dismiss - The remove button was pressed. The tag does not remove itself, so remove it in response. Cancelable.
|
|
19
20
|
*
|
|
21
|
+
* @csspart cell - The grid cell in a `Tag.Group`, which takes focus and draws the ring round the whole tag.
|
|
20
22
|
* @csspart dismiss - The remove button, when `dismissible`.
|
|
23
|
+
* @csspart link - The link around the label, under `href`.
|
|
21
24
|
*
|
|
22
25
|
* @cssproperty --tag-background-color - The fill behind the tag.
|
|
23
26
|
* @cssproperty --tag-border-color - The color of the tag's edge.
|
|
27
|
+
* @cssproperty --tag-disabled-opacity - How strongly a `disabled` tag is drawn.
|
|
24
28
|
* @cssproperty --tag-foreground-color - The label color.
|
|
25
29
|
* @cssproperty --tag-radius - The corner radius of the tag.
|
|
26
30
|
*/
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The line count `lines` asks for, as the declaration that clamps 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.
|
|
7
|
+
*/
|
|
8
|
+
export declare const clampOf: (lines: number | undefined) => string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const clampOf = (lines) => Number.isInteger(lines) && lines > 0 ? `-webkit-line-clamp: ${lines}` : 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,40 @@ 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([lines]) [part="text"] {
|
|
190
|
+
-webkit-box-orient: vertical;
|
|
191
|
+
display: -webkit-box;
|
|
192
|
+
overflow: hidden;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
:host([text-align="start"]) {
|
|
196
|
+
text-align: start;
|
|
197
|
+
}
|
|
198
|
+
:host([text-align="center"]) {
|
|
199
|
+
text-align: center;
|
|
200
|
+
}
|
|
201
|
+
:host([text-align="end"]) {
|
|
202
|
+
text-align: end;
|
|
203
|
+
}
|
|
204
|
+
:host([text-align="justify"]) {
|
|
205
|
+
text-align: justify;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
:host([text-wrap="balance"]) {
|
|
209
|
+
text-wrap: balance;
|
|
210
|
+
}
|
|
211
|
+
:host([text-wrap="pretty"]) {
|
|
212
|
+
text-wrap: pretty;
|
|
213
|
+
}
|
|
214
|
+
:host([text-wrap="nowrap"]) {
|
|
215
|
+
text-wrap: nowrap;
|
|
216
|
+
}
|
|
217
|
+
|
|
178
218
|
:host([as="em"]) [part="text"] {
|
|
179
219
|
font-style: italic;
|
|
180
220
|
}
|
|
@@ -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,33 @@ 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.
|
|
91
|
+
*/
|
|
92
|
+
lines?: number;
|
|
93
|
+
/**
|
|
94
|
+
* How the lines align, set as `text-align`.
|
|
95
|
+
*
|
|
96
|
+
* Named for the CSS property it sets. `align` alone is a legacy HTML
|
|
97
|
+
* attribute the browser maps to `text-align` by itself on any element, and
|
|
98
|
+
* it has no `start` or `end`.
|
|
99
|
+
*/
|
|
100
|
+
textAlign?: 'start' | 'center' | 'end' | 'justify';
|
|
101
|
+
/**
|
|
102
|
+
* How the lines break, set as `text-wrap`.
|
|
103
|
+
*
|
|
104
|
+
* `balance` evens out the length of every line, for a heading of a few
|
|
105
|
+
* lines. `pretty` avoids a last line of one short word, for a paragraph.
|
|
106
|
+
* `nowrap` keeps the text on one line. Absent, the lines break as the
|
|
107
|
+
* browser breaks them.
|
|
108
|
+
*/
|
|
109
|
+
textWrap?: 'balance' | 'pretty' | 'nowrap';
|
|
67
110
|
/**
|
|
68
111
|
* The meaning of the text, shown by its color, such as `danger` or `success`.
|
|
69
112
|
* It is set separately from `variant`.
|
|
@@ -84,8 +127,6 @@ export declare class HelixText extends HelixElement {
|
|
|
84
127
|
*/
|
|
85
128
|
variant?: 'display' | 'heading' | 'subheading' | 'title' | 'body' | 'body-strong' | 'caption' | 'label' | 'code';
|
|
86
129
|
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
130
|
protected render(): unknown;
|
|
90
131
|
static styles: CSSResultGroup;
|
|
91
132
|
}
|
|
@@ -5,8 +5,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { customElement, HelixElement, reportRuntime } from '@fusion.dev/helix-core';
|
|
8
|
+
import { nothing } from 'lit';
|
|
8
9
|
import { property } from 'lit/decorators.js';
|
|
9
10
|
import { literal, html as staticHtml } from 'lit/static-html.js';
|
|
11
|
+
import { clampOf } from '../clamp.js';
|
|
10
12
|
import { styles } from './text-root.css.js';
|
|
11
13
|
const TAGS = {
|
|
12
14
|
code: literal `code`,
|
|
@@ -25,25 +27,20 @@ const TAGS = {
|
|
|
25
27
|
let HelixText = class HelixText extends HelixElement {
|
|
26
28
|
updated(changed) {
|
|
27
29
|
super.updated(changed);
|
|
28
|
-
if (changed.has('as') && this.as === 'label'
|
|
30
|
+
if (changed.has('as') && this.as === 'label') {
|
|
29
31
|
reportRuntime({
|
|
30
32
|
kind: 'unreachable-label',
|
|
31
|
-
message: '<helix-text as="label">
|
|
32
|
-
'
|
|
33
|
-
'
|
|
33
|
+
message: '<helix-text as="label"> is deprecated: its label is in a shadow root, which `for` ' +
|
|
34
|
+
'and a wrapped control cannot reach, so it labels nothing. Write `variant="label"` ' +
|
|
35
|
+
'for the look, `<label data-text="label">` for a native control, and give a Helix ' +
|
|
36
|
+
'field its own `label`.',
|
|
34
37
|
tag: this.localName,
|
|
35
38
|
});
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
|
-
labelsNothing() {
|
|
39
|
-
const fields = [...this.querySelectorAll('*')].some((element) => element.constructor.formAssociated === true);
|
|
40
|
-
return (fields ||
|
|
41
|
-
this.hasAttribute('for') ||
|
|
42
|
-
this.querySelector('input, select, textarea, button, meter, output, progress') !== null);
|
|
43
|
-
}
|
|
44
41
|
render() {
|
|
45
42
|
const tag = (this.as && Object.hasOwn(TAGS, this.as) ? TAGS[this.as] : undefined) ?? literal `span`;
|
|
46
|
-
return staticHtml `<${tag} part="text"><slot></slot></${tag}>`;
|
|
43
|
+
return staticHtml `<${tag} part="text" style=${clampOf(this.lines) ?? nothing}><slot></slot></${tag}>`;
|
|
47
44
|
}
|
|
48
45
|
static { this.styles = styles; }
|
|
49
46
|
};
|
|
@@ -53,6 +50,15 @@ __decorate([
|
|
|
53
50
|
__decorate([
|
|
54
51
|
property({ reflect: true })
|
|
55
52
|
], HelixText.prototype, "emphasis", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
property({ reflect: true, type: Number })
|
|
55
|
+
], HelixText.prototype, "lines", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
property({ attribute: 'text-align', reflect: true })
|
|
58
|
+
], HelixText.prototype, "textAlign", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
property({ attribute: 'text-wrap', reflect: true })
|
|
61
|
+
], HelixText.prototype, "textWrap", void 0);
|
|
56
62
|
__decorate([
|
|
57
63
|
property({ reflect: true })
|
|
58
64
|
], HelixText.prototype, "tone", void 0);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
2
|
export const styles = createSheet(`[part="field"] {
|
|
3
3
|
background-color: var(--textarea-background-color, var(--helix-color-well));
|
|
4
|
-
border: var(--helix-border-thin) solid var(--helix-color-border);
|
|
5
|
-
border-radius: var(--helix-radii-sm);
|
|
4
|
+
border: var(--helix-border-thin) solid var(--textarea-border-color, var(--helix-color-border));
|
|
5
|
+
border-radius: var(--textarea-radius, var(--helix-radii-sm));
|
|
6
6
|
display: flex;
|
|
7
|
-
|
|
7
|
+
gap: var(--helix-space-2xs);
|
|
8
|
+
padding: var(--textarea-padding, var(--helix-space-xs));
|
|
8
9
|
transition:
|
|
9
10
|
border-color var(--helix-duration-fast) var(--helix-easing-standard),
|
|
10
11
|
background-color var(--helix-duration-fast) var(--helix-easing-standard);
|
|
@@ -14,7 +15,14 @@ background-color var(--helix-duration-fast) var(--helix-easing-standard);
|
|
|
14
15
|
line-height: var(--helix-leading-normal);
|
|
15
16
|
overflow-wrap: break-word;
|
|
16
17
|
|
|
17
|
-
resize: vertical;
|
|
18
|
+
resize: var(--textarea-resize, vertical);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
slot[name="start"]::slotted(*),
|
|
22
|
+
slot[name="end"]::slotted(*) {
|
|
23
|
+
align-self: flex-start;
|
|
24
|
+
color: var(--helix-color-foreground-subtle);
|
|
25
|
+
flex: 0 0 auto;
|
|
18
26
|
}
|
|
19
27
|
|
|
20
28
|
:host([auto-grow]) [part="control"] {
|