@fusion.dev/helix 0.142.1 → 0.144.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/README.md +9 -5
- package/custom-elements.json +29287 -1905
- package/dist/accordion/item/accordion-item.css.js +6 -1
- package/dist/accordion/item/accordion-item.d.ts +1 -0
- package/dist/announcement/root/announcement-root.d.ts +3 -3
- package/dist/app-header/root/app-header-root.d.ts +1 -3
- package/dist/aura/shader.d.ts +5 -1
- package/dist/aura/shader.js +88 -613
- package/dist/avatar/root/avatar-root.d.ts +3 -3
- package/dist/badge/root/badge-root.css.js +38 -2
- package/dist/badge/root/badge-root.d.ts +17 -0
- package/dist/badge/root/badge-root.js +3 -0
- package/dist/bar-chart/root/bar-chart-root.css.js +10 -0
- package/dist/blockquote/root/blockquote-root.css.js +9 -5
- package/dist/blockquote/root/blockquote-root.d.ts +5 -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/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/card/root/card-root.css.js +27 -1
- package/dist/card/root/card-root.d.ts +11 -0
- package/dist/carousel/root/carousel-root.js +2 -1
- package/dist/checkbox/root/checkbox-root.css.js +3 -3
- 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 -1
- package/dist/color-picker/root/color-picker-root.js +0 -1
- package/dist/combobox/root/combobox-root.css.js +5 -4
- package/dist/copy-button/root/copy-button-root.css.js +5 -0
- package/dist/data-table/root/data-table-root.css.js +7 -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 +83 -3
- package/dist/date-picker/root/date-picker-root.d.ts +1 -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/donut-chart/root/donut-chart-root.css.js +10 -0
- package/dist/drawer/root/drawer-root.css.js +53 -5
- package/dist/element-events.generated.js +48 -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.d.ts +0 -1
- package/dist/file-input/root/file-input-root.js +2 -1
- package/dist/filter-input/root/filter-input-root.d.ts +0 -1
- package/dist/filter-input/root/filter-input-root.js +2 -1
- package/dist/grid/root/grid-root.d.ts +15 -11
- package/dist/grid/root/grid-root.js +49 -15
- 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 +80 -16
- package/dist/icon-button/root/icon-button-root.d.ts +8 -1
- package/dist/icon-button/root/icon-button-root.js +2 -1
- package/dist/image/root/image-root.css.js +1 -1
- package/dist/input/root/input-root.css.js +3 -3
- package/dist/input/root/input-root.d.ts +3 -1
- package/dist/input/root/input-root.js +0 -1
- 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/line-chart/root/line-chart-root.css.js +10 -0
- package/dist/list/item/list-item.css.js +7 -1
- package/dist/loader/root/loader-root.css.js +10 -0
- package/dist/loader/root/loader-root.d.ts +10 -4
- package/dist/menu/item/menu-item.css.js +1 -1
- package/dist/menu/root/menu-root.d.ts +0 -3
- package/dist/meter/root/meter-root.css.js +27 -5
- package/dist/meter/root/meter-root.d.ts +5 -0
- package/dist/notifications/notification/notification.css.js +5 -0
- package/dist/number-input/root/number-input-root.css.js +3 -3
- package/dist/number-input/root/number-input-root.d.ts +6 -0
- package/dist/orb/root/orb-root.d.ts +11 -2
- package/dist/orb/root/orb-root.js +5 -1
- 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/qr-code/root/qr-code-root.css.js +2 -1
- package/dist/qr-code/root/qr-code-root.d.ts +2 -2
- package/dist/quote/root/quote-root.css.js +1 -1
- package/dist/quote/root/quote-root.d.ts +1 -0
- package/dist/rating/root/rating-root.d.ts +3 -0
- package/dist/sandbox/index.d.ts +2 -2
- package/dist/sandbox/root/sandbox-root.d.ts +20 -1
- package/dist/sandbox/root/sandbox-root.js +27 -10
- package/dist/sandbox/source/sandbox-source.d.ts +6 -1
- package/dist/sandbox/source/sandbox-source.js +13 -3
- package/dist/sandbox/terminal/sandbox-terminal.d.ts +3 -1
- package/dist/sandbox/terminal/sandbox-terminal.js +3 -1
- 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 +60 -5
- package/dist/skeleton/root/skeleton-root.d.ts +21 -2
- package/dist/skeleton/root/skeleton-root.js +3 -0
- package/dist/stat/root/stat-root.css.js +7 -7
- package/dist/stat/root/stat-root.d.ts +8 -0
- 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/column/table-column.css.js +5 -0
- package/dist/tabs/panel/tab-panel.css.js +1 -1
- package/dist/tabs/panel/tab-panel.d.ts +2 -0
- package/dist/tabs/root/tabs-root.css.js +13 -7
- package/dist/tabs/root/tabs-root.d.ts +5 -0
- package/dist/tabs/tab/tab.css.js +4 -4
- package/dist/tabs/tab/tab.d.ts +5 -0
- 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 +6 -3
- package/dist/text/root/text-root.css.js +58 -1
- package/dist/text/root/text-root.d.ts +11 -2
- package/dist/text/root/text-root.js +19 -1
- 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 -1
- package/dist/time-input/root/time-input-root.js +2 -1
- package/dist/toast/item/toast-item.css.js +16 -0
- package/dist/toast/root/toast-root.css.js +31 -7
- package/dist/toast/root/toast-root.d.ts +6 -9
- package/dist/toggle/group/toggle-group.css.js +16 -0
- package/dist/toggle/group/toggle-group.d.ts +3 -0
- package/dist/tour/root/tour-root.css.js +8 -0
- package/dist/tour/stop/tour-stop.css.js +37 -0
- package/dist/trend/root/trend-root.css.js +12 -5
- package/dist/trend/root/trend-root.d.ts +6 -2
- package/dist/trend/root/trend-root.js +0 -1
- package/dist/video/root/video-root.d.ts +0 -1
- package/dist/video/root/video-root.js +0 -1
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +0 -1
- package/dist/video-playlist/menu/video-playlist-menu.js +0 -1
- package/lint.json +1 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +9515 -2061
- package/types/svelte.d.ts +1 -0
- package/types/vue.d.ts +2302 -233
|
@@ -16,6 +16,10 @@ import '../../copy-button/index.js';
|
|
|
16
16
|
* backgrounds. A split diff stacks its two versions when the file is narrower
|
|
17
17
|
* than about 40rem.
|
|
18
18
|
*
|
|
19
|
+
* Long lines scroll by default. Set `wrap` to wrap them instead, for prose-like
|
|
20
|
+
* code such as a long command, and set `--code-block-max-block-size` to cap the
|
|
21
|
+
* height of a long file, which then scrolls.
|
|
22
|
+
*
|
|
19
23
|
* @since 0.1.0
|
|
20
24
|
* @status stable
|
|
21
25
|
* @category typography
|
|
@@ -24,11 +28,22 @@ import '../../copy-button/index.js';
|
|
|
24
28
|
* @cssproperty --code-block-backdrop - A backdrop filter for the block and its header, for a translucent background.
|
|
25
29
|
* @cssproperty --code-block-background-color - The background behind the code. Set it for a block that sits on a surface other than the page background.
|
|
26
30
|
* @cssproperty --code-block-border-color - The line around the block and its header.
|
|
31
|
+
* @cssproperty --code-block-gutter-color - The color of the line numbers.
|
|
27
32
|
* @cssproperty --code-block-header-background-color - The background behind the name. The default is `surface-raised`.
|
|
33
|
+
* @cssproperty --code-block-max-block-size - The tallest the code grows before it scrolls. The default is no limit.
|
|
28
34
|
* @cssproperty --code-block-radius - The corner radius of the header's top and the block's bottom, which form one shape.
|
|
29
35
|
*/
|
|
30
36
|
export declare class HelixCodeBlock extends HelixHeadlessCodeBlock {
|
|
31
37
|
static tier: string;
|
|
38
|
+
/**
|
|
39
|
+
* Whether long lines wrap.
|
|
40
|
+
*
|
|
41
|
+
* Off by default, so long lines scroll, because a line break can be
|
|
42
|
+
* significant in code and a wrapped line reads as two. For prose-like code, such as a long command or
|
|
43
|
+
* a log line, a wrap reads better than a scroll. Line numbers keep the lines
|
|
44
|
+
* unwrapped, since a wrapped line would take one number and several rows.
|
|
45
|
+
*/
|
|
46
|
+
wrap: boolean;
|
|
32
47
|
static styles: CSSResultGroup;
|
|
33
48
|
}
|
|
34
49
|
declare global {
|
|
@@ -6,12 +6,20 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { customElement } from '@fusion.dev/helix-core';
|
|
8
8
|
import { HelixHeadlessCodeBlock } from '@fusion.dev/helix-headless/code-block';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
9
10
|
import { styles } from './code-block-root.css.js';
|
|
10
11
|
import '../../copy-button/index.js';
|
|
11
12
|
let HelixCodeBlock = class HelixCodeBlock extends HelixHeadlessCodeBlock {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.wrap = false;
|
|
16
|
+
}
|
|
12
17
|
static { this.tier = 'helix-'; }
|
|
13
18
|
static { this.styles = styles; }
|
|
14
19
|
};
|
|
20
|
+
__decorate([
|
|
21
|
+
property({ reflect: true, type: Boolean })
|
|
22
|
+
], HelixCodeBlock.prototype, "wrap", void 0);
|
|
15
23
|
HelixCodeBlock = __decorate([
|
|
16
24
|
customElement('helix-code-block')
|
|
17
25
|
], HelixCodeBlock);
|
|
@@ -235,6 +235,70 @@ border-color: var(--helix-color-danger);
|
|
|
235
235
|
outline-color: var(--helix-color-danger);
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
+
[part="fields"] {
|
|
239
|
+
display: grid;
|
|
240
|
+
gap: var(--color-picker-fields-gap, var(--helix-space-xs));
|
|
241
|
+
grid-auto-columns: minmax(0, 1fr);
|
|
242
|
+
grid-auto-flow: column;
|
|
243
|
+
margin-block-start: var(--helix-space-sm);
|
|
244
|
+
padding-inline: var(--color-picker-padding, var(--helix-space-none));
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
:host([alpha]) [part="fields"] {
|
|
248
|
+
grid-auto-flow: row;
|
|
249
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
[part="field"] {
|
|
253
|
+
display: flex;
|
|
254
|
+
flex-direction: column;
|
|
255
|
+
gap: var(--helix-space-2xs);
|
|
256
|
+
min-inline-size: 0;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
[part="field-label"] {
|
|
260
|
+
color: var(--color-picker-field-label-color, var(--helix-color-foreground-muted));
|
|
261
|
+
font-family: var(--helix-font-sans);
|
|
262
|
+
font-size: var(--helix-text-sm);
|
|
263
|
+
font-weight: var(--helix-weight-medium);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
[part="field-input"] {
|
|
267
|
+
all: unset;
|
|
268
|
+
|
|
269
|
+
appearance: textfield;
|
|
270
|
+
background-color: var(--helix-color-surface-sunken);
|
|
271
|
+
block-size: var(--helix-size-control);
|
|
272
|
+
border: var(--helix-border-thin) solid var(--helix-color-border);
|
|
273
|
+
border-radius: var(--helix-radii-sm);
|
|
274
|
+
box-sizing: border-box;
|
|
275
|
+
color: var(--helix-color-foreground);
|
|
276
|
+
font-family: var(--helix-font-sans);
|
|
277
|
+
font-size: var(--helix-text-control);
|
|
278
|
+
font-variant-numeric: tabular-nums;
|
|
279
|
+
font-weight: var(--helix-weight-medium);
|
|
280
|
+
inline-size: 100%;
|
|
281
|
+
min-inline-size: 0;
|
|
282
|
+
padding-inline: var(--helix-space-xs);
|
|
283
|
+
transition: border-color var(--helix-duration-fast) var(--helix-easing-standard);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
[part="field-input"]::-webkit-inner-spin-button,
|
|
287
|
+
[part="field-input"]::-webkit-outer-spin-button {
|
|
288
|
+
appearance: none;
|
|
289
|
+
margin: 0;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
[part="field-input"]:hover {
|
|
293
|
+
border-color: var(--helix-color-foreground-muted);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
[part="field-input"]:focus-visible {
|
|
297
|
+
border-color: var(--helix-color-primary);
|
|
298
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
299
|
+
outline-offset: 0;
|
|
300
|
+
}
|
|
301
|
+
|
|
238
302
|
[part="actions"] {
|
|
239
303
|
display: flex;
|
|
240
304
|
flex: 1 1 auto;
|
|
@@ -2,7 +2,6 @@ import { HelixHeadlessColorPicker } from '@fusion.dev/helix-headless/color-picke
|
|
|
2
2
|
import type { CSSResultGroup } from 'lit';
|
|
3
3
|
import '../../button/index.js';
|
|
4
4
|
import '../../button-group/index.js';
|
|
5
|
-
import '../../icon/index.js';
|
|
6
5
|
import '../../slider/index.js';
|
|
7
6
|
/**
|
|
8
7
|
* @summary A color picker made of a square and two ramps.
|
|
@@ -35,6 +34,8 @@ import '../../slider/index.js';
|
|
|
35
34
|
* @aliases Color, ColorArea, Swatch picker
|
|
36
35
|
* @documentation https://fusion.dev/helix/components/color-picker
|
|
37
36
|
*
|
|
37
|
+
* @cssproperty --color-picker-field-label-color - The color of the names above the channel number fields, in `channel-fields`.
|
|
38
|
+
* @cssproperty --color-picker-fields-gap - The space between the channel number fields, in `channel-fields`.
|
|
38
39
|
* @cssproperty --color-picker-grid-radius - The corner radius of the square.
|
|
39
40
|
* @cssproperty --color-picker-grid-ratio - The aspect ratio of the square.
|
|
40
41
|
* @cssproperty --color-picker-padding - The inset of the rows under the square and of the picker's bottom edge.
|
|
@@ -8,7 +8,6 @@ import { customElement } from '@fusion.dev/helix-core';
|
|
|
8
8
|
import { HelixHeadlessColorPicker } from '@fusion.dev/helix-headless/color-picker';
|
|
9
9
|
import '../../button/index.js';
|
|
10
10
|
import '../../button-group/index.js';
|
|
11
|
-
import '../../icon/index.js';
|
|
12
11
|
import '../../slider/index.js';
|
|
13
12
|
import { styles as glyphStyles } from '../../shared/glyph/glyph.css.js';
|
|
14
13
|
import { styles } from './color-picker-root.css.js';
|
|
@@ -97,7 +97,7 @@ padding: var(--helix-space-none);
|
|
|
97
97
|
position: absolute;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
[part
|
|
100
|
+
[part~="create"] {
|
|
101
101
|
all: unset;
|
|
102
102
|
|
|
103
103
|
border-block-start: var(--helix-border-thin) solid var(--helix-color-border);
|
|
@@ -114,14 +114,15 @@ text-align: start;
|
|
|
114
114
|
transition: background-color var(--helix-duration-fast) var(--helix-easing-standard);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
[part
|
|
117
|
+
[part~="create"]:hover,
|
|
118
|
+
[part~="create-active"] {
|
|
118
119
|
background-color: light-dark(
|
|
119
120
|
color-mix(in oklab, var(--helix-color-foreground) 8%, transparent),
|
|
120
121
|
color-mix(in oklab, var(--helix-color-foreground) 12%, transparent)
|
|
121
122
|
);
|
|
122
123
|
}
|
|
123
124
|
|
|
124
|
-
[part
|
|
125
|
+
[part~="create"]:focus-visible {
|
|
125
126
|
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
126
127
|
outline-offset: calc(var(--helix-size-focus-offset) * -1);
|
|
127
128
|
}
|
|
@@ -138,7 +139,7 @@ display: block;
|
|
|
138
139
|
transition: none;
|
|
139
140
|
}
|
|
140
141
|
|
|
141
|
-
[part
|
|
142
|
+
[part~="create"] {
|
|
142
143
|
transition: none;
|
|
143
144
|
}
|
|
144
145
|
}
|
|
@@ -20,6 +20,11 @@ color: var(--helix-color-success);
|
|
|
20
20
|
color: var(--helix-color-success);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
[part="button"][data-failed],
|
|
24
|
+
:host(:not(:disabled)) [part="button"][data-failed]:hover {
|
|
25
|
+
color: var(--helix-color-danger);
|
|
26
|
+
}
|
|
27
|
+
|
|
23
28
|
slot > svg {
|
|
24
29
|
block-size: var(--helix-size-icon-tight);
|
|
25
30
|
inline-size: var(--helix-size-icon-tight);
|
|
@@ -86,6 +86,13 @@ border-block-end-color: transparent;
|
|
|
86
86
|
cursor: pointer;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
[part~="cell"]:focus-visible,
|
|
90
|
+
[part~="select"]:focus-visible,
|
|
91
|
+
[part="select-all"]:focus-visible {
|
|
92
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
93
|
+
outline-offset: calc(var(--helix-size-focus-offset) * -1);
|
|
94
|
+
}
|
|
95
|
+
|
|
89
96
|
[part~="select"],
|
|
90
97
|
[part="select-all"] {
|
|
91
98
|
align-items: center;
|
|
@@ -77,6 +77,25 @@ flex-basis: 0;
|
|
|
77
77
|
min-inline-size: var(--helix-size-icon-loose);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
[part="segments"] {
|
|
81
|
+
--_segment-focus-background-color: var(
|
|
82
|
+
--date-input-segment-focus-background-color,
|
|
83
|
+
var(--helix-color-primary)
|
|
84
|
+
);
|
|
85
|
+
--_segment-focus-color: var(
|
|
86
|
+
--date-input-segment-focus-color,
|
|
87
|
+
var(--helix-color-foreground-on-primary)
|
|
88
|
+
);
|
|
89
|
+
--_segment-literal-color: var(
|
|
90
|
+
--date-input-segment-literal-color,
|
|
91
|
+
var(--helix-color-foreground-muted)
|
|
92
|
+
);
|
|
93
|
+
--_segment-placeholder-color: var(
|
|
94
|
+
--date-input-segment-placeholder-color,
|
|
95
|
+
var(--helix-color-foreground-subtle)
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
80
99
|
@media print {
|
|
81
100
|
:host {
|
|
82
101
|
print-color-adjust: exact;
|
|
@@ -27,6 +27,14 @@ import '../../tag/index.js';
|
|
|
27
27
|
* @cssproperty --date-input-border-width - The width of the panel's border. It
|
|
28
28
|
* follows `--helix-border-floating`, which is `0`, so the panel stands out by its
|
|
29
29
|
* shadow unless a theme sets a border.
|
|
30
|
+
* @cssproperty --date-input-segment-focus-background-color - The fill behind the
|
|
31
|
+
* segment with focus, in `segmented`. It follows `--helix-color-primary`.
|
|
32
|
+
* @cssproperty --date-input-segment-focus-color - The text of the segment with
|
|
33
|
+
* focus, in `segmented`.
|
|
34
|
+
* @cssproperty --date-input-segment-literal-color - The text the locale writes
|
|
35
|
+
* between two segments, in `segmented`.
|
|
36
|
+
* @cssproperty --date-input-segment-placeholder-color - The dashes of a segment
|
|
37
|
+
* with nothing in it, in `segmented`. It matches the text field's placeholder.
|
|
30
38
|
* @cssproperty --date-input-shadow - The shadow under the panel. It follows
|
|
31
39
|
* `--helix-shadow-floating`. The panel can sit over any content, so it has a
|
|
32
40
|
* shadow by default.
|
|
@@ -10,6 +10,7 @@ import '../../date-picker/index.js';
|
|
|
10
10
|
import '../../tag/index.js';
|
|
11
11
|
import { styles as fieldStyles } from '../../shared/field/field.css.js';
|
|
12
12
|
import { styles as fieldFrameStyles } from '../../shared/field/field-frame.css.js';
|
|
13
|
+
import { styles as fieldSegmentsStyles } from '../../shared/field/field-segments.css.js';
|
|
13
14
|
import { styles as fieldStackedStyles } from '../../shared/field/field-stacked.css.js';
|
|
14
15
|
import { styles as floatingEntranceStyles } from '../../shared/floating/entrance.css.js';
|
|
15
16
|
import { styles as floatingPanelStyles } from '../../shared/floating/panel.css.js';
|
|
@@ -21,6 +22,7 @@ let HelixDateInput = class HelixDateInput extends HelixHeadlessDateInput {
|
|
|
21
22
|
fieldStyles,
|
|
22
23
|
fieldFrameStyles,
|
|
23
24
|
fieldStackedStyles,
|
|
25
|
+
fieldSegmentsStyles,
|
|
24
26
|
tagRowStyles,
|
|
25
27
|
floatingPanelStyles,
|
|
26
28
|
floatingEntranceStyles,
|
|
@@ -56,12 +56,92 @@ inline-size: var(--_calendar-day);
|
|
|
56
56
|
justify-content: center;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
[part="previous"]:hover,
|
|
60
|
-
[part="next"]:hover {
|
|
59
|
+
[part="previous"]:hover:not(:disabled),
|
|
60
|
+
[part="next"]:hover:not(:disabled) {
|
|
61
61
|
background-color: var(--helix-color-surface-sunken);
|
|
62
62
|
color: var(--helix-color-foreground);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
[part="previous"]:focus-visible,
|
|
66
|
+
[part="next"]:focus-visible {
|
|
67
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
68
|
+
outline-offset: var(--helix-size-focus-offset);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
[part="heading-button"] {
|
|
72
|
+
all: unset;
|
|
73
|
+
box-sizing: border-box;
|
|
74
|
+
border-radius: var(--helix-radii-sm);
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
padding-inline: var(--helix-space-2xs);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[part="heading-button"]:hover:not(:disabled) {
|
|
80
|
+
background-color: var(--helix-color-surface-sunken);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
[part="heading-button"]:focus-visible {
|
|
84
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
85
|
+
outline-offset: var(--helix-size-focus-offset);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[part="periods"] {
|
|
89
|
+
display: grid;
|
|
90
|
+
gap: var(--helix-space-2xs);
|
|
91
|
+
inline-size: calc(var(--_calendar-track) * 7);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
[part="period-row"] {
|
|
95
|
+
display: grid;
|
|
96
|
+
gap: var(--helix-space-2xs);
|
|
97
|
+
grid-template-columns: repeat(3, 1fr);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[part~="period"] {
|
|
101
|
+
align-items: center;
|
|
102
|
+
block-size: var(--date-picker-period-size, calc(var(--_calendar-row) * 1.5));
|
|
103
|
+
border-radius: var(--helix-radii-sm);
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
display: inline-flex;
|
|
106
|
+
font-size: var(--helix-text-sm);
|
|
107
|
+
justify-content: center;
|
|
108
|
+
transition: background-color var(--helix-duration-fast) var(--helix-easing-standard);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
[part~="period"]:hover:not([aria-disabled]) {
|
|
112
|
+
background-color: var(--helix-color-surface-sunken);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
[part~="period-current"] {
|
|
116
|
+
box-shadow: inset 0 0 0 var(--helix-border-thin) var(--helix-color-border);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
[part~="period-selected"] {
|
|
120
|
+
background-color: var(--date-picker-selected-color, var(--helix-color-surface-inverse));
|
|
121
|
+
color: var(--helix-color-foreground-inverse);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
[part~="period-selected"]:hover:not([aria-disabled]) {
|
|
125
|
+
background-color: var(--date-picker-selected-color, var(--helix-color-surface-inverse));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
[part~="period-disabled"] {
|
|
129
|
+
color: var(--helix-color-foreground-subtle);
|
|
130
|
+
cursor: default;
|
|
131
|
+
opacity: 0.4;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
[part~="period"]:focus-visible {
|
|
135
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
136
|
+
outline-offset: var(--helix-size-focus-offset);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
[part="previous"]:disabled,
|
|
140
|
+
[part="next"]:disabled {
|
|
141
|
+
cursor: default;
|
|
142
|
+
opacity: 0.4;
|
|
143
|
+
}
|
|
144
|
+
|
|
65
145
|
[part="previous"] svg,
|
|
66
146
|
[part="next"] svg,
|
|
67
147
|
::slotted([slot="previous-icon"]),
|
|
@@ -167,7 +247,7 @@ color: var(--helix-color-foreground-inverse);
|
|
|
167
247
|
cursor: default;
|
|
168
248
|
}
|
|
169
249
|
|
|
170
|
-
[part~="
|
|
250
|
+
[part~="day-disabled"] {
|
|
171
251
|
color: var(--helix-color-foreground-subtle);
|
|
172
252
|
opacity: 0.4;
|
|
173
253
|
}
|
|
@@ -25,6 +25,7 @@ import type { CSSResultGroup } from 'lit';
|
|
|
25
25
|
*
|
|
26
26
|
* @cssproperty --date-picker-columns - Months per row. Two unless there is only one.
|
|
27
27
|
* @cssproperty --date-picker-day-size - Width and height of a day.
|
|
28
|
+
* @cssproperty --date-picker-period-size - Height of a month or a year in the months and years views, where `max-view` is set.
|
|
28
29
|
* @cssproperty --date-picker-range-color - Band behind the days in a range.
|
|
29
30
|
* @cssproperty --date-picker-row-size - Height of a week row.
|
|
30
31
|
* @cssproperty --date-picker-selected-color - Fill behind a selected day.
|
|
@@ -176,6 +176,53 @@ justify-content: center;
|
|
|
176
176
|
margin-inline: auto;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
+
[part="dismiss"] {
|
|
180
|
+
all: unset;
|
|
181
|
+
|
|
182
|
+
box-sizing: border-box;
|
|
183
|
+
position: absolute;
|
|
184
|
+
inset-block-start: calc(
|
|
185
|
+
var(--dialog-padding, var(--helix-space-lg)) +
|
|
186
|
+
(var(--helix-text-xl) * var(--helix-leading-tight) - var(--helix-size-control-sm)) /
|
|
187
|
+
2
|
|
188
|
+
);
|
|
189
|
+
inset-inline-end: var(--helix-space-md);
|
|
190
|
+
block-size: var(--helix-size-control-sm);
|
|
191
|
+
border-radius: var(--helix-radii-sm);
|
|
192
|
+
color: var(--helix-color-foreground-muted);
|
|
193
|
+
cursor: pointer;
|
|
194
|
+
display: inline-flex;
|
|
195
|
+
inline-size: var(--helix-size-control-sm);
|
|
196
|
+
place-content: center;
|
|
197
|
+
place-items: center;
|
|
198
|
+
transition: color var(--helix-duration-fast) var(--helix-easing-standard);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
[part="dismiss"] svg {
|
|
202
|
+
block-size: var(--helix-size-icon-sm);
|
|
203
|
+
inline-size: var(--helix-size-icon-sm);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
[part="dismiss"]:hover {
|
|
207
|
+
background-color: color-mix(in oklab, var(--helix-color-foreground) 8%, transparent);
|
|
208
|
+
color: var(--helix-color-foreground);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
[part="dismiss"]:focus-visible {
|
|
212
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
213
|
+
outline-offset: var(--helix-size-focus-offset);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
:host([dismissible]) ::slotted([slot="header"]) {
|
|
217
|
+
padding-inline-end: calc(var(--helix-size-control-sm) + var(--helix-space-xs));
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
@media (prefers-reduced-motion: reduce) {
|
|
221
|
+
[part="dismiss"] {
|
|
222
|
+
transition: none;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
179
226
|
@media print {
|
|
180
227
|
:host {
|
|
181
228
|
display: none;
|
|
@@ -7,8 +7,8 @@ display: flex;
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
[part="content"] {
|
|
10
|
-
color: var(--helix-color-foreground-muted);
|
|
11
|
-
margin-inline: var(--helix-space-sm);
|
|
10
|
+
color: var(--divider-content-color, var(--helix-color-foreground-muted));
|
|
11
|
+
margin-inline: var(--divider-content-gap, var(--helix-space-sm));
|
|
12
12
|
display: inline-flex;
|
|
13
13
|
flex: 0 0 auto;
|
|
14
14
|
font-family: var(--helix-font-sans);
|
|
@@ -49,7 +49,7 @@ flex-direction: column;
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
:host([orientation="vertical"]) [part="content"] {
|
|
52
|
-
margin-block: var(--helix-space-sm);
|
|
52
|
+
margin-block: var(--divider-content-gap, var(--helix-space-sm));
|
|
53
53
|
margin-inline: var(--helix-space-none);
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -74,6 +74,11 @@ inline-size: var(--_divider-thickness);
|
|
|
74
74
|
min-block-size: 1em;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
:host([content-placement="start"]) [part="line"]:has(+ [part="content"]:not([data-empty])),
|
|
78
|
+
:host([content-placement="end"]) [part="content"]:not([data-empty]) + [part="line"] {
|
|
79
|
+
flex: 0 0 var(--divider-content-offset, var(--helix-space-lg));
|
|
80
|
+
}
|
|
81
|
+
|
|
77
82
|
@media print {
|
|
78
83
|
:host {
|
|
79
84
|
print-color-adjust: economy;
|
|
@@ -8,15 +8,23 @@ import type { CSSResultGroup } from 'lit';
|
|
|
8
8
|
* default. A vertical divider stretches to fit its flex parent, so it matches
|
|
9
9
|
* the height of what it sits beside.
|
|
10
10
|
*
|
|
11
|
+
* Content set into the line sits at its middle. `content-placement` moves it
|
|
12
|
+
* toward the start or the end, leaving a short length of line before or after
|
|
13
|
+
* it, the way a section label sits in a form.
|
|
14
|
+
*
|
|
11
15
|
* @since 0.1.0
|
|
12
16
|
* @status stable
|
|
13
17
|
* @category layout
|
|
14
18
|
* @aliases Separator, Rule
|
|
15
19
|
* @documentation https://fusion.dev/helix/components/divider
|
|
16
20
|
*
|
|
17
|
-
* @csspart
|
|
21
|
+
* @csspart content - The content set into the line.
|
|
22
|
+
* @csspart line - The line, or each half of it when content is set into it.
|
|
18
23
|
*
|
|
19
24
|
* @cssproperty --divider-color - The color of the line.
|
|
25
|
+
* @cssproperty --divider-content-color - The color of the content set into the line.
|
|
26
|
+
* @cssproperty --divider-content-gap - The space either side of the content set into the line.
|
|
27
|
+
* @cssproperty --divider-content-offset - The length of line before the content under `content-placement="start"`, or after it under `end`.
|
|
20
28
|
* @cssproperty --divider-length - The length of a vertical line. A horizontal line takes the divider's width.
|
|
21
29
|
* @cssproperty --divider-padding - The space removed from both ends of the line.
|
|
22
30
|
* @cssproperty --divider-padding-end - The space removed from the end of the line only.
|
|
@@ -24,6 +32,14 @@ import type { CSSResultGroup } from 'lit';
|
|
|
24
32
|
* @cssproperty --divider-thickness - The thickness of the line.
|
|
25
33
|
*/
|
|
26
34
|
export declare class HelixDivider extends HelixHeadlessDivider {
|
|
35
|
+
/**
|
|
36
|
+
* Where content set into the line sits along it.
|
|
37
|
+
*
|
|
38
|
+
* Absent is the middle. `start` and `end` move it toward one end, with a
|
|
39
|
+
* short length of line, `--divider-content-offset`, kept before or after it.
|
|
40
|
+
* A divider with nothing set into it is one line whatever this says.
|
|
41
|
+
*/
|
|
42
|
+
contentPlacement?: 'end' | 'start';
|
|
27
43
|
static styles: CSSResultGroup;
|
|
28
44
|
}
|
|
29
45
|
declare global {
|
|
@@ -6,10 +6,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { customElement } from '@fusion.dev/helix-core';
|
|
8
8
|
import { HelixHeadlessDivider } from '@fusion.dev/helix-headless/divider';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
9
10
|
import { styles } from './divider-root.css.js';
|
|
10
11
|
let HelixDivider = class HelixDivider extends HelixHeadlessDivider {
|
|
11
12
|
static { this.styles = styles; }
|
|
12
13
|
};
|
|
14
|
+
__decorate([
|
|
15
|
+
property({ attribute: 'content-placement', reflect: true })
|
|
16
|
+
], HelixDivider.prototype, "contentPlacement", void 0);
|
|
13
17
|
HelixDivider = __decorate([
|
|
14
18
|
customElement('helix-divider')
|
|
15
19
|
], HelixDivider);
|
|
@@ -175,4 +175,14 @@ stroke-opacity: calc(0.62 * var(--helix-material-opacity));
|
|
|
175
175
|
|
|
176
176
|
:host([material="frosted"]) [part~="segment"] {
|
|
177
177
|
stroke-opacity: calc(0.88 * var(--helix-material-opacity));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
[part="summary"] {
|
|
181
|
+
block-size: 1px;
|
|
182
|
+
clip-path: inset(50%);
|
|
183
|
+
inline-size: 1px;
|
|
184
|
+
margin: var(--helix-space-none);
|
|
185
|
+
overflow: hidden;
|
|
186
|
+
position: absolute;
|
|
187
|
+
white-space: nowrap;
|
|
178
188
|
}`);
|
|
@@ -55,6 +55,8 @@ flex-direction: column;
|
|
|
55
55
|
outline: none;
|
|
56
56
|
position: fixed;
|
|
57
57
|
|
|
58
|
+
transform: var(--_drawer-away);
|
|
59
|
+
|
|
58
60
|
transition:
|
|
59
61
|
transform var(--helix-duration-normal) var(--helix-easing-decelerate),
|
|
60
62
|
display var(--helix-duration-normal) allow-discrete,
|
|
@@ -62,6 +64,10 @@ overlay var(--helix-duration-normal) allow-discrete;
|
|
|
62
64
|
z-index: var(--helix-layer-overlay);
|
|
63
65
|
}
|
|
64
66
|
|
|
67
|
+
[part="panel"]:not([open]) {
|
|
68
|
+
display: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
65
71
|
:host([material="glass"]) [part="panel"] {
|
|
66
72
|
backdrop-filter: var(--drawer-backdrop, var(--helix-material-backdrop));
|
|
67
73
|
background-color: var(
|
|
@@ -84,7 +90,7 @@ block-size: 100%;
|
|
|
84
90
|
inline-size: min(var(--_drawer-size), 100%);
|
|
85
91
|
inset-block: 0;
|
|
86
92
|
inset-inline-end: 0;
|
|
87
|
-
|
|
93
|
+
--_drawer-away: translateX(100%);
|
|
88
94
|
}
|
|
89
95
|
|
|
90
96
|
:host([placement="start"]) [part="panel"] {
|
|
@@ -94,7 +100,7 @@ block-size: 100%;
|
|
|
94
100
|
inline-size: min(var(--_drawer-size), 100%);
|
|
95
101
|
inset-block: 0;
|
|
96
102
|
inset-inline-start: 0;
|
|
97
|
-
|
|
103
|
+
--_drawer-away: translateX(-100%);
|
|
98
104
|
}
|
|
99
105
|
|
|
100
106
|
:host([placement="bottom"]) [part="panel"] {
|
|
@@ -103,7 +109,7 @@ border-end-end-radius: var(--helix-radii-none);
|
|
|
103
109
|
block-size: min(var(--_drawer-size), 100%);
|
|
104
110
|
inset-block-end: 0;
|
|
105
111
|
inset-inline: 0;
|
|
106
|
-
|
|
112
|
+
--_drawer-away: translateY(100%);
|
|
107
113
|
}
|
|
108
114
|
|
|
109
115
|
:host([placement="top"]) [part="panel"] {
|
|
@@ -112,14 +118,45 @@ border-start-end-radius: var(--helix-radii-none);
|
|
|
112
118
|
block-size: min(var(--_drawer-size), 100%);
|
|
113
119
|
inset-block-start: 0;
|
|
114
120
|
inset-inline: 0;
|
|
115
|
-
|
|
121
|
+
--_drawer-away: translateY(-100%);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
:host(:dir(rtl):not([placement])) [part="panel"],
|
|
125
|
+
:host(:dir(rtl)[placement="end"]) [part="panel"] {
|
|
126
|
+
--_drawer-away: translateX(-100%);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:host(:dir(rtl)[placement="start"]) [part="panel"] {
|
|
130
|
+
--_drawer-away: translateX(100%);
|
|
116
131
|
}
|
|
117
132
|
|
|
118
133
|
:host(:state(open)) [part="panel"] {
|
|
119
134
|
border: var(--drawer-border-width, var(--helix-border-floating)) solid
|
|
120
135
|
var(--drawer-border-color, var(--helix-color-border));
|
|
121
136
|
box-shadow: var(--drawer-shadow, var(--helix-shadow-floating));
|
|
122
|
-
|
|
137
|
+
|
|
138
|
+
transform: translate(var(--drawer-swipe-x, 0), var(--drawer-swipe-y, 0));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
[part="panel"],
|
|
142
|
+
[part="content"] {
|
|
143
|
+
touch-action: pan-y;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
:host([placement="bottom"]) [part="panel"],
|
|
147
|
+
:host([placement="top"]) [part="panel"] {
|
|
148
|
+
touch-action: pan-x;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
[part="panel"][data-swiping] {
|
|
152
|
+
transition: none;
|
|
153
|
+
user-select: none;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@starting-style {
|
|
157
|
+
:host(:state(open)) [part="panel"][open] {
|
|
158
|
+
transform: var(--_drawer-away);
|
|
159
|
+
}
|
|
123
160
|
}
|
|
124
161
|
|
|
125
162
|
[part="header"] {
|
|
@@ -138,6 +175,17 @@ margin: var(--helix-space-none);
|
|
|
138
175
|
margin-block-end: var(--helix-space-md);
|
|
139
176
|
}
|
|
140
177
|
|
|
178
|
+
[part="footer"] {
|
|
179
|
+
flex: 0 0 auto;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
::slotted([slot="footer"]) {
|
|
183
|
+
display: flex;
|
|
184
|
+
flex-wrap: wrap;
|
|
185
|
+
gap: var(--helix-space-xs);
|
|
186
|
+
margin-block-start: var(--helix-space-md);
|
|
187
|
+
}
|
|
188
|
+
|
|
141
189
|
[part="content"] {
|
|
142
190
|
flex: 1 1 auto;
|
|
143
191
|
min-block-size: 0;
|