@fusion.dev/helix 0.148.0 → 0.149.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 +7471 -982
- package/dist/chat/root/chat-root.css.js +3 -1
- package/dist/chat/root/chat-root.d.ts +3 -0
- package/dist/data-table/root/data-table-root.css.js +20 -8
- package/dist/data-table/root/data-table-root.d.ts +12 -0
- package/dist/element-events.generated.js +32 -4
- package/dist/list/item/list-item.css.js +4 -2
- package/dist/list/item/list-item.d.ts +4 -0
- package/dist/list/root/list-root.css.js +2 -1
- package/dist/list/root/list-root.d.ts +6 -0
- package/dist/list/root/list-root.js +2 -1
- package/dist/listbox/reorder/index.d.ts +1 -0
- package/dist/listbox/reorder/index.js +6 -0
- package/dist/listbox/reorder/listbox-drag-preview.css.d.ts +1 -0
- package/dist/listbox/reorder/listbox-drag-preview.css.js +3 -0
- package/dist/listbox/reorder/listbox-reorder.css.d.ts +1 -0
- package/dist/listbox/reorder/listbox-reorder.css.js +4 -0
- package/dist/listbox/root/listbox-root.d.ts +9 -0
- package/dist/notifications/notification/notification.css.js +8 -2
- package/dist/notifications/notification/notification.d.ts +13 -5
- package/dist/notifications/notification/notification.js +13 -0
- package/dist/notifications/root/notifications-root.css.js +3 -1
- package/dist/notifications/root/notifications-root.d.ts +17 -2
- package/dist/notifications/root/notifications-root.js +13 -1
- package/dist/orb/root/orb-root.d.ts +5 -0
- package/dist/orb/root/orb-root.js +13 -12
- package/dist/sandbox/preview/sandbox-preview.d.ts +5 -0
- package/dist/sandbox/preview/sandbox-preview.js +11 -8
- package/dist/sandbox/root/sandbox-root.d.ts +8 -3
- package/dist/sandbox/root/sandbox-root.js +7 -3
- package/dist/sandbox/source/sandbox-source.d.ts +5 -0
- package/dist/sandbox/source/sandbox-source.js +4 -1
- package/dist/sandbox/status-bar/sandbox-status-bar.d.ts +10 -0
- package/dist/sandbox/status-bar/sandbox-status-bar.js +14 -2
- package/dist/sandbox/terminal/sandbox-terminal.d.ts +11 -0
- package/dist/sandbox/terminal/sandbox-terminal.js +22 -11
- package/dist/scroll-area/root/scroll-area-root.css.js +5 -4
- package/dist/scroll-area/root/scroll-area-root.d.ts +3 -3
- package/dist/table/root/table-root.css.js +3 -1
- package/dist/table/root/table-root.d.ts +8 -1
- package/dist/table/row/table-row.css.js +9 -1
- package/dist/table/row/table-row.d.ts +5 -0
- package/dist/tooltip/root/tooltip-root.d.ts +9 -0
- package/dist/tree/item/tree-item.css.js +3 -1
- package/dist/tree/item/tree-item.d.ts +6 -0
- package/dist/tree/root/tree-root.css.js +2 -1
- package/dist/tree/root/tree-root.d.ts +8 -1
- package/dist/virtual-list/root/virtual-list-root.css.js +6 -1
- package/dist/virtual-list/root/virtual-list-root.d.ts +3 -0
- package/lint.json +1 -1
- package/package.json +8 -7
- package/types/jsx.d.ts +4137 -1515
- package/types/vue.d.ts +1409 -501
- package/types/words.d.ts +2555 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
-
export const styles = createSheet(`:host {display: grid;grid-template-rows: auto minmax(0, 1fr) auto auto auto;max-block-size: var(--chat-max-block-size, none);min-block-size: 0;}[part="header"] {grid-row: 1;}[part="log"] {grid-row: 2;}[part="resume"] {grid-row: 3;}[part="status"] {grid-row: 4;}[part="composer"] {grid-row: 5;}[part="log"] {display: flex;flex-direction: column;scrollbar-color: var(--
|
|
2
|
+
export const styles = createSheet(`:host {display: grid;grid-template-rows: auto minmax(0, 1fr) auto auto auto;max-block-size: var(--chat-max-block-size, none);min-block-size: 0;}[part="header"] {grid-row: 1;}[part="log"] {grid-row: 2;}[part="resume"] {grid-row: 3;}[part="status"] {grid-row: 4;}[part="composer"] {grid-row: 5;}[part="log"] {display: flex;flex-direction: column;scrollbar-color: var(--chat-scrollbar-thumb-color, var(--helix-scrollbar-thumb-color))
|
|
3
|
+
var(--chat-scrollbar-track-color, var(--helix-scrollbar-track-color));scrollbar-width: thin;gap: var(--chat-gap, var(--helix-space-md));overflow-y: auto;padding-block: var(--helix-space-md);padding-inline: var(--chat-padding-inline, var(--helix-space-md));justify-content: safe flex-end;}[part="log"]:hover {scrollbar-color: var(--chat-scrollbar-thumb-hover-color, var(--helix-scrollbar-thumb-hover-color))
|
|
4
|
+
var(--chat-scrollbar-track-color, var(--helix-scrollbar-track-color));}[part="header"][hidden],
|
|
3
5
|
[part="resume"][hidden],
|
|
4
6
|
[part="composer"][hidden] {display: none;}[part="status"][data-empty] {padding-block: 0;}[part="header"] {--helix-size-tag: var(--helix-size-tag-sm);align-items: center;border-block-end: var(--helix-border-thin) solid var(--chat-rule, var(--helix-color-border));display: flex;gap: var(--helix-space-sm);justify-content: space-between;min-block-size: var(--helix-size-control);padding-block: var(--helix-space-2xs);padding-inline: var(--chat-padding-inline, var(--helix-space-md));}[part="header"] > [part="actions"] {--helix-size-control: var(--helix-size-control-sm);--helix-size-control-loose: calc(var(--helix-size-control) * 1.2);--helix-size-control-tight: calc(var(--helix-size-control) * 0.8);--helix-size-icon: var(--helix-size-icon-sm);--helix-size-icon-loose: calc(var(--helix-size-icon) * 1.2);--helix-size-icon-tight: calc(var(--helix-size-icon) * 0.8);align-items: center;display: flex;flex: 0 0 auto;gap: var(--helix-space-2xs);}[part="header"] > [part="actions"][hidden] {display: none;}[part="resume"] {display: grid;justify-items: center;margin-block-start: calc(var(--helix-space-xl) * -1);pointer-events: none;position: relative;}[part="resume"] > * {pointer-events: auto;}[part="resume"] slot::slotted(*) {border: var(--chat-resume-border-width, var(--helix-border-floating)) solid
|
|
5
7
|
var(--chat-resume-border-color, var(--helix-color-border));box-shadow: var(--chat-resume-shadow, var(--helix-shadow-floating));}[part="status"] {color: var(--helix-color-foreground-muted);font-family: var(--helix-font-sans);font-size: var(--helix-text-xs);padding-block-end: var(--helix-space-2xs);padding-block-start: var(--helix-space-xs);padding-inline: var(--chat-padding-inline, var(--helix-space-md));}[part="typing"] {align-items: center;color: var(--chat-typing-color, var(--helix-color-foreground-muted));display: inline-flex;gap: var(--chat-typing-gap, var(--helix-space-xs));}[part="composer"] {padding-block: var(--helix-space-sm);padding-inline: var(--chat-padding-inline, var(--helix-space-md));}[part="empty"],
|
|
@@ -36,6 +36,9 @@ import '../message/chat-message.js';
|
|
|
36
36
|
* @cssproperty --chat-resume-border-width - Width of the edge around the resume control, which sits over content.
|
|
37
37
|
* @cssproperty --chat-resume-shadow - Shadow under the resume control, which floats over the transcript.
|
|
38
38
|
* @cssproperty --chat-rule - The hairline under the header.
|
|
39
|
+
* @cssproperty --chat-scrollbar-thumb-color - The thumb of the transcript's scrollbar. Defaults to `--helix-scrollbar-thumb-color`.
|
|
40
|
+
* @cssproperty --chat-scrollbar-thumb-hover-color - The thumb while the pointer is over the transcript. Defaults to `--helix-scrollbar-thumb-hover-color`.
|
|
41
|
+
* @cssproperty --chat-scrollbar-track-color - The track of the transcript's scrollbar. Defaults to `--helix-scrollbar-track-color`.
|
|
39
42
|
* @cssproperty --chat-typing-color - The color of the dots and the words that say who is typing.
|
|
40
43
|
* @cssproperty --chat-typing-gap - The space between the dots and the words that say who is typing.
|
|
41
44
|
*/
|
|
@@ -7,16 +7,23 @@ transparent,
|
|
|
7
7
|
transparent
|
|
8
8
|
);}:host(:dir(rtl)) [part="table"] {--_data-table-fade: to left;}@keyframes data-table-edges {0% {--_data-table-fade-end: var(--helix-space-xl);--_data-table-fade-start: 0rem;}5%,
|
|
9
9
|
95% {--_data-table-fade-end: var(--helix-space-xl);--_data-table-fade-start: var(--helix-space-xl);}100% {--_data-table-fade-end: 0rem;--_data-table-fade-start: var(--helix-space-xl);}}@media (prefers-reduced-motion: reduce) {[part="table"] {animation: none;}}[part="head"],
|
|
10
|
-
[part
|
|
11
|
-
var(--data-table-rule-color, var(--helix-color-border));color: var(--data-table-color, var(--helix-color-foreground));font-family: var(--helix-font-sans);font-size: var(--data-table-text, var(--helix-text-sm));padding-block: var(--data-table-padding-block, var(--helix-space-sm));padding-inline: var(--data-table-padding-inline, var(--helix-space-none) var(--helix-space-md));text-align: var(--data-table-cell-align);}[part
|
|
10
|
+
[part~="row"] {display: contents;}[part~="cell"] {border-block-end: var(--helix-border-thin) solid
|
|
11
|
+
var(--data-table-rule-color, var(--helix-color-border));color: var(--data-table-color, var(--helix-color-foreground));font-family: var(--helix-font-sans);font-size: var(--data-table-text, var(--helix-text-sm));padding-block: var(--data-table-padding-block, var(--helix-space-sm));padding-inline: var(--data-table-padding-inline, var(--helix-space-none) var(--helix-space-md));text-align: var(--data-table-cell-align);}[part~="row"]:last-of-type [part~="cell"] {border-block-end-color: transparent;}::slotted(helix-table-column) {--_table-heading-color: var(--data-table-heading-color);--_table-heading-padding-block: var(--data-table-padding-block);--_table-heading-padding-inline: var(--data-table-padding-inline);--_table-heading-rule-color: var(--data-table-rule-color);--_table-heading-text: var(--data-table-text);}::slotted(helix-table-column[sortable]) {cursor: pointer;}[part~="cell"]:focus-visible,
|
|
12
12
|
[part="more-cell"]:focus-visible,
|
|
13
13
|
[part~="select"]:focus-visible,
|
|
14
|
-
[part="select-all"]:focus-visible
|
|
15
|
-
[part="
|
|
16
|
-
|
|
14
|
+
[part="select-all"]:focus-visible,
|
|
15
|
+
[part="row-grip"]:focus-visible,
|
|
16
|
+
[part="grip-head"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1);}[part~="select"],
|
|
17
|
+
[part="select-all"],
|
|
18
|
+
[part="row-grip"],
|
|
19
|
+
[part="grip-head"] {align-items: center;border-block-end: var(--helix-border-thin) solid
|
|
20
|
+
var(--data-table-rule-color, var(--helix-color-border));display: flex;justify-content: center;padding-block: var(--data-table-padding-block, var(--helix-space-sm));padding-inline: var(--data-table-padding-inline, var(--helix-space-sm));}[part~="row"]:last-of-type [part~="select"],
|
|
21
|
+
[part~="row"]:last-of-type [part="row-grip"] {border-block-end-color: transparent;}[part~="row"][aria-selected="true"] > * {background-color: var(
|
|
17
22
|
--data-table-selected-background-color,
|
|
18
23
|
color-mix(in srgb, var(--helix-color-primary) 10%, var(--helix-color-background))
|
|
19
|
-
);}[part="
|
|
24
|
+
);}[part="row-grip-button"] {all: unset;align-items: center;border-radius: var(--helix-radii-sm);box-sizing: border-box;color: var(--data-table-grip-color, var(--helix-color-foreground-muted));cursor: grab;display: inline-flex;touch-action: none;}[part="row-grip-button"]:active {cursor: grabbing;}[part="row-grip-button"][aria-disabled="true"] {cursor: default;opacity: var(--data-table-grip-disabled-opacity, 0.4);}[part="row-grip-mark"] {block-size: 1em;inline-size: 1em;}[part~="row"][part~="row-dragging"] > * {opacity: var(--data-table-dragging-opacity, 0.5);}[part~="row"][part~="row-drop-before"] > * {box-shadow: inset 0 var(--data-table-drop-indicator-size, var(--helix-border-thick)) 0 0
|
|
25
|
+
var(--data-table-drop-indicator-color, var(--helix-color-primary));}[part~="row"][part~="row-drop-after"] > * {box-shadow: inset 0 calc(var(--data-table-drop-indicator-size, var(--helix-border-thick)) * -1) 0
|
|
26
|
+
0 var(--data-table-drop-indicator-color, var(--helix-color-primary));}[part="toolbar"][data-empty],
|
|
20
27
|
[part="footer"][data-empty] {display: none;}[part="toolbar"] {padding-block-end: var(--data-table-toolbar-gap, var(--helix-space-sm));}[part="footer"] {align-items: center;display: flex;flex-wrap: wrap;gap: var(--data-table-footer-item-gap, var(--helix-space-md));padding-block-start: var(--data-table-footer-gap, var(--helix-space-sm));}[part="pagination"] {margin-inline-start: auto;}[part="empty"],
|
|
21
28
|
[part="loading"] {grid-column: 1 / -1;}:host([child-field]) [part~="cell-header"] {--_data-table-gutter: calc(
|
|
22
29
|
var(--data-table-toggle-size, var(--helix-size-icon-tight)) +
|
|
@@ -35,5 +42,10 @@ var(--helix-color-surface-raised)
|
|
|
35
42
|
);}:host([windowed]) [part="table"] {block-size: var(--data-table-block-size, 24em);overflow-y: auto;overscroll-behavior: contain;}:host([windowed]) ::slotted(helix-table-column) {--_table-heading-background-color: var(
|
|
36
43
|
--data-table-heading-background-color,
|
|
37
44
|
var(--helix-color-background)
|
|
38
|
-
);--_table-heading-layer: var(--helix-layer-sticky);--_table-heading-position: sticky;}:host([windowed]) [part="select-all"]
|
|
39
|
-
|
|
45
|
+
);--_table-heading-layer: var(--helix-layer-sticky);--_table-heading-position: sticky;}:host([windowed]) [part="select-all"],
|
|
46
|
+
:host([windowed]) [part="grip-head"] {background-color: var(--data-table-heading-background-color, var(--helix-color-background));inset-block-start: 0;position: sticky;z-index: var(--helix-layer-sticky);}[part="before"],
|
|
47
|
+
[part="after"] {grid-column: 1 / -1;}:host([loading]) [part="table"] {opacity: 0.5;}[part="drag-preview"] {background-color: var(
|
|
48
|
+
--data-table-drag-preview-background-color,
|
|
49
|
+
var(--helix-color-surface-raised)
|
|
50
|
+
);border: var(--data-table-drag-preview-border-width, var(--helix-border-floating)) solid
|
|
51
|
+
var(--data-table-drag-preview-border-color, var(--helix-color-border));border-radius: var(--data-table-drag-preview-radius, var(--helix-radii-sm));box-shadow: var(--data-table-drag-preview-shadow, var(--helix-shadow-floating));opacity: var(--data-table-drag-preview-opacity, 0.9);}@media print {:host {background-color: transparent;}[part="table"] {overflow-x: visible;}:host([windowed]) [part="table"] {block-size: auto;overflow-y: visible;}[part="footer"] {display: none;}}`);
|
|
@@ -33,6 +33,7 @@ import '../../table/index.js';
|
|
|
33
33
|
*
|
|
34
34
|
* @csspart cell - One cell.
|
|
35
35
|
* @csspart cell-selected - Added to `cell` in a selected row.
|
|
36
|
+
* @csspart drag-preview - A copy of the row a pointer drags by its grip, which follows the pointer in the top layer until the row is let go, with `reorderable-rows`. Hidden from assistive technology.
|
|
36
37
|
* @csspart live - A copy of the empty and loading messages, which screen readers announce when they change. Visually hidden in the styled tier.
|
|
37
38
|
* @csspart table - The grid.
|
|
38
39
|
*
|
|
@@ -41,8 +42,19 @@ import '../../table/index.js';
|
|
|
41
42
|
* short result keeps the full box with space below it.
|
|
42
43
|
* @cssproperty --data-table-color - The text color of a cell.
|
|
43
44
|
* @cssproperty --data-table-columns - The grid track list for the columns. It overrides the list worked out from the columns.
|
|
45
|
+
* @cssproperty --data-table-drag-preview-background-color - The fill behind the copy of a row a pointer drags.
|
|
46
|
+
* @cssproperty --data-table-drag-preview-border-color - The color of the edge around the copy of a row a pointer drags.
|
|
47
|
+
* @cssproperty --data-table-drag-preview-border-width - The width of the edge around the copy of a row a pointer drags. None by default, where the shadow lifts it.
|
|
48
|
+
* @cssproperty --data-table-drag-preview-opacity - The opacity of the copy of a row a pointer drags.
|
|
49
|
+
* @cssproperty --data-table-drag-preview-radius - The corner radius of the copy of a row a pointer drags.
|
|
50
|
+
* @cssproperty --data-table-drag-preview-shadow - The shadow that raises the copy of a row a pointer drags over the page.
|
|
51
|
+
* @cssproperty --data-table-dragging-opacity - The opacity of a row being moved, with `reorderable-rows`.
|
|
52
|
+
* @cssproperty --data-table-drop-indicator-color - The color of the line where a moved row would land.
|
|
53
|
+
* @cssproperty --data-table-drop-indicator-size - The thickness of the line where a moved row would land.
|
|
44
54
|
* @cssproperty --data-table-footer-gap - The space between the grid and the footer below it.
|
|
45
55
|
* @cssproperty --data-table-footer-item-gap - The space between the pieces of the footer, such as a summary and the pagination.
|
|
56
|
+
* @cssproperty --data-table-grip-color - The color of a row's grip, with `reorderable-rows`.
|
|
57
|
+
* @cssproperty --data-table-grip-disabled-opacity - The opacity of a row's grip while a sort decides the order.
|
|
46
58
|
* @cssproperty --data-table-heading-background-color - The fill behind a heading while `windowed`.
|
|
47
59
|
* It is opaque, because rows scroll under the sticky heading. Unset otherwise.
|
|
48
60
|
* @cssproperty --data-table-heading-color - The text color of a heading.
|
|
@@ -67,6 +67,7 @@ registerElementEvents({
|
|
|
67
67
|
'helix-copy-button': ['helix-copy', 'helix-copy-error', 'helix-press'],
|
|
68
68
|
'helix-data-table': [
|
|
69
69
|
'helix-activate',
|
|
70
|
+
'helix-before-reorder',
|
|
70
71
|
'helix-expand',
|
|
71
72
|
'helix-filter',
|
|
72
73
|
'helix-filtered',
|
|
@@ -132,9 +133,23 @@ registerElementEvents({
|
|
|
132
133
|
'helix-before-open',
|
|
133
134
|
'toggle',
|
|
134
135
|
],
|
|
135
|
-
'helix-list': [
|
|
136
|
+
'helix-list': [
|
|
137
|
+
'change',
|
|
138
|
+
'helix-action',
|
|
139
|
+
'helix-before-change',
|
|
140
|
+
'helix-before-reorder',
|
|
141
|
+
'helix-reorder',
|
|
142
|
+
],
|
|
136
143
|
'helix-list-item': ['helix-action'],
|
|
137
|
-
'helix-listbox': [
|
|
144
|
+
'helix-listbox': [
|
|
145
|
+
'change',
|
|
146
|
+
'helix-before-change',
|
|
147
|
+
'helix-before-reorder',
|
|
148
|
+
'helix-filter',
|
|
149
|
+
'helix-load-more',
|
|
150
|
+
'helix-reorder',
|
|
151
|
+
'input',
|
|
152
|
+
],
|
|
138
153
|
'helix-map': [
|
|
139
154
|
'change',
|
|
140
155
|
'helix-activate',
|
|
@@ -227,7 +242,14 @@ registerElementEvents({
|
|
|
227
242
|
'helix-steps': ['helix-activate', 'helix-before-activate', 'helix-select'],
|
|
228
243
|
'helix-switch': ['change', 'helix-before-toggle', 'input'],
|
|
229
244
|
'helix-tab': ['helix-select'],
|
|
230
|
-
'helix-table': [
|
|
245
|
+
'helix-table': [
|
|
246
|
+
'helix-before-reorder',
|
|
247
|
+
'helix-reorder',
|
|
248
|
+
'helix-select',
|
|
249
|
+
'helix-selected',
|
|
250
|
+
'helix-sort',
|
|
251
|
+
'helix-sorted',
|
|
252
|
+
],
|
|
231
253
|
'helix-table-column': ['helix-before-resize', 'helix-resized'],
|
|
232
254
|
'helix-tabs': ['helix-activate', 'helix-before-activate', 'helix-select'],
|
|
233
255
|
'helix-tag': ['helix-dismiss'],
|
|
@@ -258,7 +280,13 @@ registerElementEvents({
|
|
|
258
280
|
'toggle',
|
|
259
281
|
],
|
|
260
282
|
'helix-tour-stop': ['helix-tour-ask'],
|
|
261
|
-
'helix-tree': [
|
|
283
|
+
'helix-tree': [
|
|
284
|
+
'helix-activate',
|
|
285
|
+
'helix-before-activate',
|
|
286
|
+
'helix-before-reorder',
|
|
287
|
+
'helix-reorder',
|
|
288
|
+
'helix-select',
|
|
289
|
+
],
|
|
262
290
|
'helix-tree-item': [
|
|
263
291
|
'helix-before-close',
|
|
264
292
|
'helix-before-open',
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
-
export const styles = createSheet(`:host {display: block;}[part~="row"] {align-items: center;display: grid;grid-template-columns: auto auto 1fr auto;padding: var(--list-item-padding, var(--helix-space-sm) var(--helix-space-md));}[part="rail"] {align-self: start;color: var(--helix-color-foreground-muted);display: var(--list-item-rail-display, none);font-family: var(--helix-font-mono);font-size: var(--helix-text-xs);grid-column: 1;grid-row: 1;letter-spacing: var(--helix-tracking-wide);line-height: calc(var(--helix-text-sm) * var(--helix-leading-normal));inline-size: var(--list-rail-inline-size, var(--helix-space-3xl));}[part="rail"]::before {content: var(--list-item-rail-content, "");}slot[name="start"]::slotted(*) {color: var(--helix-color-foreground-muted);grid-column: 2;margin-inline-end: var(--helix-space-sm);grid-row: 1 / span 2;}slot:not([name]) {color: var(--helix-color-foreground);display: block;font-size: var(--helix-text-sm);font-weight: var(--list-item-term-weight, var(--helix-weight-regular));grid-column: 3;grid-row: 1;}slot[name="description"] {color: var(--helix-color-foreground-muted);display: block;font-size: var(--helix-text-xs);grid-column: 3;grid-row: 2;}slot:not([name])::slotted(*),
|
|
3
|
-
slot[name="description"]::slotted(*) {margin: var(--helix-space-none);}slot[name="end"]::slotted(*) {grid-column: 4;grid-row: 1 / span 2;}[part="link"] {align-items: center;color: inherit;display: grid;grid-column: 1 / 4;grid-row: 1 / span 2;grid-template-columns: subgrid;grid-template-rows: subgrid;text-decoration: none;}[part~="row-current"] {background-color: var(--list-item-current-background-color, var(--helix-color-well));border-radius: var(--helix-radii-sm);}[part~="row"]:focus-visible {border-radius: var(--helix-radii-sm);outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1);}:host(:state(selected)) [part~="row"] {background-color: var(--list-item-selected-background-color, var(--helix-color-primary-subtle));border-radius: var(--helix-radii-sm);}:
|
|
2
|
+
export const styles = createSheet(`:host {display: block;}[part~="row"] {align-items: center;display: grid;grid-template-columns: auto auto 1fr auto auto;padding: var(--list-item-padding, var(--helix-space-sm) var(--helix-space-md));}[part="rail"] {align-self: start;color: var(--helix-color-foreground-muted);display: var(--list-item-rail-display, none);font-family: var(--helix-font-mono);font-size: var(--helix-text-xs);grid-column: 1;grid-row: 1;letter-spacing: var(--helix-tracking-wide);line-height: calc(var(--helix-text-sm) * var(--helix-leading-normal));inline-size: var(--list-rail-inline-size, var(--helix-space-3xl));}[part="rail"]::before {content: var(--list-item-rail-content, "");}slot[name="start"]::slotted(*) {color: var(--helix-color-foreground-muted);grid-column: 2;margin-inline-end: var(--helix-space-sm);grid-row: 1 / span 2;}slot:not([name]) {color: var(--helix-color-foreground);display: block;font-size: var(--helix-text-sm);font-weight: var(--list-item-term-weight, var(--helix-weight-regular));grid-column: 3;grid-row: 1;}slot[name="description"] {color: var(--helix-color-foreground-muted);display: block;font-size: var(--helix-text-xs);grid-column: 3;grid-row: 2;}slot:not([name])::slotted(*),
|
|
3
|
+
slot[name="description"]::slotted(*) {margin: var(--helix-space-none);}slot[name="end"]::slotted(*) {grid-column: 4;grid-row: 1 / span 2;}[part="link"] {align-items: center;color: inherit;display: grid;grid-column: 1 / 4;grid-row: 1 / span 2;grid-template-columns: subgrid;grid-template-rows: subgrid;text-decoration: none;}[part~="row-current"] {background-color: var(--list-item-current-background-color, var(--helix-color-well));border-radius: var(--helix-radii-sm);}[part~="row"]:focus-visible {border-radius: var(--helix-radii-sm);outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1);}:host(:state(selected)) [part~="row"] {background-color: var(--list-item-selected-background-color, var(--helix-color-primary-subtle));border-radius: var(--helix-radii-sm);}[part="grip"] {all: unset;align-items: center;border-radius: var(--helix-radii-sm);box-sizing: border-box;color: var(--list-item-grip-color, var(--helix-color-foreground-muted));cursor: grab;display: inline-flex;grid-column: 5;grid-row: 1 / span 2;margin-inline-start: var(--helix-space-sm);touch-action: none;}[part="grip"]:active {cursor: grabbing;}[part="grip"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}[part="grip-mark"] {block-size: 1em;inline-size: 1em;}:host(:state(dragging)) [part~="row"] {opacity: var(--list-item-dragging-opacity, 0.5);}:host(:state(drop-before)) [part~="row"] {box-shadow: inset 0 var(--list-item-drop-indicator-size, var(--helix-border-thick)) 0 0
|
|
4
|
+
var(--list-item-drop-indicator-color, var(--helix-color-primary));}:host(:state(drop-after)) [part~="row"] {box-shadow: inset 0 calc(var(--list-item-drop-indicator-size, var(--helix-border-thick)) * -1) 0 0
|
|
5
|
+
var(--list-item-drop-indicator-color, var(--helix-color-primary));}:host([disabled]) {opacity: var(--list-item-disabled-opacity, 0.5);}`);
|
|
@@ -16,6 +16,10 @@ import { type CSSResultGroup, type TemplateResult } from 'lit';
|
|
|
16
16
|
*
|
|
17
17
|
* @cssproperty --list-item-current-background-color - The fill behind a row that is `current`.
|
|
18
18
|
* @cssproperty --list-item-disabled-opacity - The opacity of a `disabled` row.
|
|
19
|
+
* @cssproperty --list-item-dragging-opacity - The opacity of a row being moved, in a `reorderable` list.
|
|
20
|
+
* @cssproperty --list-item-drop-indicator-color - The color of the line where a moved row would land.
|
|
21
|
+
* @cssproperty --list-item-drop-indicator-size - The thickness of the line where a moved row would land.
|
|
22
|
+
* @cssproperty --list-item-grip-color - The color of the grip, in a `reorderable` list.
|
|
19
23
|
* @cssproperty --list-item-padding - The padding inside the row.
|
|
20
24
|
* @cssproperty --list-item-rail-content - What the rail cell shows. The list sets it.
|
|
21
25
|
* @cssproperty --list-item-rail-display - Whether the row has a rail. The list sets it.
|
|
@@ -2,4 +2,5 @@ import { createSheet } from '@fusion.dev/helix-core';
|
|
|
2
2
|
export const styles = createSheet(`:host {display: flex;flex-direction: column;gap: var(--list-gap, var(--helix-space-none));}:host([divided]) ::slotted(*:not(:first-child)) {border-block-start: var(--helix-border-thin) solid var(--helix-color-border);}:host([kind="ordered"]),
|
|
3
3
|
:host([kind="unordered"]) {contain: style;padding-inline-start: var(--list-marker-gutter, var(--helix-space-md));}:host([kind="ordered"]) ::slotted(*),
|
|
4
4
|
:host([kind="unordered"]) ::slotted(*) {display: list-item;list-style-position: outside;}:host([kind="ordered"]) ::slotted(*) {list-style-type: decimal;}:host([kind="ordered"][type="a"]) ::slotted(*) {list-style-type: lower-alpha;}:host([kind="ordered"][type="A"]) ::slotted(*) {list-style-type: upper-alpha;}:host([kind="ordered"][type="i"]) ::slotted(*) {list-style-type: lower-roman;}:host([kind="ordered"][type="I"]) ::slotted(*) {list-style-type: upper-roman;}:host([kind="unordered"]) ::slotted(*) {list-style-type: disc;}:host([kind="ordered"]) ::slotted(*) {counter-increment: list-item var(--list-step, 1);}:host([kind="ordered"]) ::slotted(:first-child) {counter-set: list-item var(--list-first);}:host([marker="rail"]) {counter-reset: list-rail;padding-inline-start: var(--helix-space-none);}:host([marker="rail"]) ::slotted(*) {--list-item-rail-content: counter(list-rail, var(--list-rail-style, decimal-leading-zero));--list-item-rail-display: block;counter-increment: list-rail var(--list-step, 1);}:host([marker="rail"]) ::slotted(:first-child) {counter-set: list-rail var(--list-first);}:host([kind="ordered"][marker="rail"]) ::slotted(*),
|
|
5
|
-
:host([kind="unordered"][marker="rail"]) ::slotted(*) {display: block;list-style: none;}:host([kind="description"]) ::slotted(*) {--list-item-term-weight: var(--helix-weight-semibold);}
|
|
5
|
+
:host([kind="unordered"][marker="rail"]) ::slotted(*) {display: block;list-style: none;}:host([kind="description"]) ::slotted(*) {--list-item-term-weight: var(--helix-weight-semibold);}[part="drag-preview"] {background-color: var(--list-drag-preview-background-color, var(--helix-color-surface-raised));border: var(--list-drag-preview-border-width, var(--helix-border-floating)) solid
|
|
6
|
+
var(--list-drag-preview-border-color, var(--helix-color-border));border-radius: var(--list-drag-preview-radius, var(--helix-radii-sm));box-shadow: var(--list-drag-preview-shadow, var(--helix-shadow-floating));opacity: var(--list-drag-preview-opacity, 0.9);}@media print {:host {print-color-adjust: economy;}}`);
|
|
@@ -13,6 +13,12 @@ import type { CSSResultGroup } from 'lit';
|
|
|
13
13
|
* @aliases Rows, Stack, Menu
|
|
14
14
|
* @documentation https://fusion.dev/helix/components/list
|
|
15
15
|
*
|
|
16
|
+
* @cssproperty --list-drag-preview-background-color - The fill behind the copy of a row a pointer drags.
|
|
17
|
+
* @cssproperty --list-drag-preview-border-color - The color of the edge around the copy of a row a pointer drags.
|
|
18
|
+
* @cssproperty --list-drag-preview-border-width - The width of the edge around the copy of a row a pointer drags. None by default, where the shadow lifts it.
|
|
19
|
+
* @cssproperty --list-drag-preview-opacity - The opacity of the copy of a row a pointer drags.
|
|
20
|
+
* @cssproperty --list-drag-preview-radius - The corner radius of the copy of a row a pointer drags.
|
|
21
|
+
* @cssproperty --list-drag-preview-shadow - The shadow that raises the copy of a row a pointer drags over the page.
|
|
16
22
|
* @cssproperty --list-gap - The space between rows.
|
|
17
23
|
* @cssproperty --list-marker-gutter - The space that the markers of ordered and unordered lists sit in.
|
|
18
24
|
* @cssproperty --list-rail-inline-size - The width of the rail's track.
|
|
@@ -7,13 +7,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { customElement } from '@fusion.dev/helix-core';
|
|
8
8
|
import { HelixHeadlessList } from '@fusion.dev/helix-headless/list';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { styles as liveStyles } from '../../shared/live/live.css.js';
|
|
10
11
|
import { styles } from './list-root.css.js';
|
|
11
12
|
let HelixList = class HelixList extends HelixHeadlessList {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
14
15
|
this.divided = false;
|
|
15
16
|
}
|
|
16
|
-
static { this.styles = styles; }
|
|
17
|
+
static { this.styles = [liveStyles, styles]; }
|
|
17
18
|
};
|
|
18
19
|
__decorate([
|
|
19
20
|
property({ reflect: true, type: Boolean })
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ListboxReorderController, reorderListbox, } from '@fusion.dev/helix-headless/listbox/reorder';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { reorderListbox } from '@fusion.dev/helix-headless/listbox/reorder';
|
|
2
|
+
import { HelixListbox } from '../root/listbox-root.js';
|
|
3
|
+
import { styles as previewStyles } from './listbox-drag-preview.css.js';
|
|
4
|
+
import { styles } from './listbox-reorder.css.js';
|
|
5
|
+
reorderListbox(HelixListbox, styles, previewStyles);
|
|
6
|
+
export { ListboxReorderController, reorderListbox, } from '@fusion.dev/helix-headless/listbox/reorder';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
+
export const styles = createSheet(`[popover] {background-color: var(--listbox-drag-preview-background-color, var(--helix-color-surface-raised));border: var(--listbox-drag-preview-border-width, var(--helix-border-floating)) solid
|
|
3
|
+
var(--listbox-drag-preview-border-color, var(--helix-color-border));border-radius: var(--listbox-drag-preview-radius, var(--helix-radii-sm));box-shadow: var(--listbox-drag-preview-shadow, var(--helix-shadow-floating));opacity: var(--listbox-drag-preview-opacity, 0.9);}`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
+
export const styles = createSheet(`* {cursor: grab;}:host(:state(dragging)) {opacity: var(--listbox-dragging-opacity, 0.5);}:host(:state(drop-before)),
|
|
3
|
+
:host(:state(drop-after)) {position: relative;}:host(:state(drop-before))::before,
|
|
4
|
+
:host(:state(drop-after))::before {background-color: var(--listbox-drop-indicator-color, var(--helix-color-primary));block-size: var(--listbox-drop-indicator-size, var(--helix-border-thick));content: "";inset-inline: 0;pointer-events: none;position: absolute;z-index: 1;}:host(:state(drop-before))::before {inset-block-start: 0;}:host(:state(drop-after))::before {inset-block-end: 0;}`);
|
|
@@ -20,6 +20,15 @@ import type { CSSResultGroup } from 'lit';
|
|
|
20
20
|
* @cssproperty --listbox-background-color - The panel's fill. Set it to `transparent` when the list is already inside a panel.
|
|
21
21
|
* @cssproperty --listbox-border - The panel's border, as a shorthand. Set it to `none` when the list is already inside a panel.
|
|
22
22
|
* @cssproperty --listbox-column-min-inline-size - How narrow a column may be with `layout="grid"`. As many columns as fit are drawn. Defaults to `8rem`.
|
|
23
|
+
* @cssproperty --listbox-drag-preview-background-color - The fill behind the copy of an option a pointer drags.
|
|
24
|
+
* @cssproperty --listbox-drag-preview-border-color - The color of the edge around the copy of an option a pointer drags.
|
|
25
|
+
* @cssproperty --listbox-drag-preview-border-width - The width of the edge around the copy of an option a pointer drags. None by default, where the shadow lifts it.
|
|
26
|
+
* @cssproperty --listbox-drag-preview-opacity - The opacity of the copy of an option a pointer drags.
|
|
27
|
+
* @cssproperty --listbox-drag-preview-radius - The corner radius of the copy of an option a pointer drags.
|
|
28
|
+
* @cssproperty --listbox-drag-preview-shadow - The shadow that raises the copy of an option a pointer drags over the page.
|
|
29
|
+
* @cssproperty --listbox-dragging-opacity - The opacity of an option being dragged, in a `reorderable` list with `@fusion.dev/helix/listbox/reorder` imported.
|
|
30
|
+
* @cssproperty --listbox-drop-indicator-color - The color of the line where a dragged option would land.
|
|
31
|
+
* @cssproperty --listbox-drop-indicator-size - The thickness of the line where a dragged option would land.
|
|
23
32
|
* @cssproperty --listbox-error-color - The color of the line shown while `load-error` is set.
|
|
24
33
|
* @cssproperty --listbox-max-block-size - Maximum height of the list before it scrolls.
|
|
25
34
|
*/
|
|
@@ -17,8 +17,14 @@ var(--notifications-unread-inline-size, var(--_notifications-unread))
|
|
|
17
17
|
2
|
|
18
18
|
)
|
|
19
19
|
);position: absolute;}:host([separation="filled"]),
|
|
20
|
-
:host([separation="outlined"])
|
|
21
|
-
:host(
|
|
20
|
+
:host([separation="outlined"]),
|
|
21
|
+
:host(:state(feed-filled)),
|
|
22
|
+
:host(:state(feed-outlined)) {--notifications-rule: transparent;margin-block-end: var(--notifications-item-gap, var(--helix-space-xs));}:host([separation="filled"]) [part="item"],
|
|
23
|
+
:host([separation="outlined"]) [part="item"],
|
|
24
|
+
:host(:state(feed-filled)) [part="item"],
|
|
25
|
+
:host(:state(feed-outlined)) [part="item"] {border: var(--helix-border-thin) solid var(--notifications-item-edge, var(--helix-color-border));border-radius: var(--notifications-item-radius, var(--helix-radii-md));}:host([separation="filled"]) [part="item"],
|
|
26
|
+
:host(:state(feed-filled)) [part="item"] {background-color: var(--notifications-item-fill, var(--helix-color-surface-raised));}:host([separation="filled"]),
|
|
27
|
+
:host(:state(feed-filled)) {--avatar-background-color: color-mix(in oklab, var(--helix-color-foreground) 8%, transparent);}[part="media"] {display: grid;grid-template-rows: var(--_notifications-line);place-items: center start;}[part="body"] {display: grid;gap: var(--helix-space-2xs);}[part="label"] {color: var(--notifications-color, var(--helix-color-foreground-muted));font-family: var(--helix-font-sans);font-size: var(--helix-text-sm);line-height: var(--_notifications-line);}slot[name="description"]::slotted(*) {color: var(--helix-color-foreground-subtle);font-family: var(--helix-font-sans);font-size: var(--helix-text-xs);line-height: var(--helix-leading-normal);margin: var(--helix-space-none);}slot[name="detail"]::slotted(*) {margin-block: var(--helix-space-2xs) var(--helix-space-none);margin-inline: var(--helix-space-none);}[part="body"] slot:not([name])::slotted(a) {color: inherit;text-decoration: none;}[part="body"] slot:not([name])::slotted(a:hover) {text-decoration: underline;text-decoration-color: color-mix(in oklab, currentcolor 35%, transparent);text-decoration-thickness: 1px;text-underline-offset: 0.25em;}:host(:not(:state(read))) [part="label"] {color: var(--helix-color-foreground);font-weight: var(--helix-weight-medium);}[part="controls"] {margin-inline-end: calc((var(--helix-size-control) - var(--helix-size-icon)) / -2);}[part="trailing"] {align-items: center;align-self: start;display: grid;grid-template-areas: "swap";justify-items: end;grid-template-rows: var(--_notifications-line);margin-inline-start: var(--helix-space-sm);}[part="trailing"] > * {grid-area: swap;transition:
|
|
22
28
|
opacity var(--helix-duration-normal) var(--helix-easing-standard),
|
|
23
29
|
translate var(--helix-duration-normal) var(--helix-easing-decelerate);}:host {--_notifications-swap: 0;}[part="trailing"] > :not([part="controls"]) {color: var(--helix-color-foreground-subtle);display: block;font-family: var(--helix-font-sans);font-size: var(--helix-text-xs);line-height: var(--_notifications-line);opacity: calc(1 - var(--_notifications-swap));translate: calc(var(--helix-space-2xs) * var(--_notifications-swap)) 0;}[part="controls"] {align-items: center;display: flex;opacity: var(--_notifications-swap);}:host(:hover:state(controls)),
|
|
24
30
|
:host(:focus-within:state(controls)) {--_notifications-swap: 1;}[part="controls"] {pointer-events: none;}:host(:hover:state(controls)) [part="controls"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HelixHeadlessNotification } from '@fusion.dev/helix-headless/notifications';
|
|
2
|
-
import type { CSSResultGroup } from 'lit';
|
|
2
|
+
import type { CSSResultGroup, PropertyValues } from 'lit';
|
|
3
3
|
import '../../format-date/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* @summary A single notification about something that happened, marked read or unread.
|
|
@@ -52,9 +52,17 @@ import '../../format-date/index.js';
|
|
|
52
52
|
* @cssproperty --notifications-unread-mark - Color of the edge mark on an unread item.
|
|
53
53
|
* @cssproperty --notifications-unread-offset - Distance from the unread mark to the row's top edge.
|
|
54
54
|
* @cssproperty --notifications-unread-radius - Corner radius of the unread mark, which can turn it into a dot.
|
|
55
|
+
*
|
|
56
|
+
* @cssstate feed-filled - The feed's `separation` is `filled` and the row sets none of its own, so the row is drawn as `filled`.
|
|
57
|
+
* @cssstate feed-outlined - The feed's `separation` is `outlined` and the row sets none of its own, so the row is drawn as `outlined`.
|
|
55
58
|
*/
|
|
56
59
|
export declare class HelixNotification extends HelixHeadlessNotification {
|
|
57
60
|
static tier: string;
|
|
61
|
+
/**
|
|
62
|
+
* @internal Set by the feed: its own `separation`, which this row takes
|
|
63
|
+
* where it sets none, as `:state(feed-filled)` or `:state(feed-outlined)`.
|
|
64
|
+
*/
|
|
65
|
+
feedSeparation: 'filled' | 'outlined' | 'plain' | undefined;
|
|
58
66
|
/**
|
|
59
67
|
* How a row is separated from the one above it.
|
|
60
68
|
*
|
|
@@ -69,12 +77,12 @@ export declare class HelixNotification extends HelixHeadlessNotification {
|
|
|
69
77
|
* scan or a set of things to act on. The reference this came from draws cards
|
|
70
78
|
* because every row in it has a control.
|
|
71
79
|
*
|
|
72
|
-
* **On the row
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* axis and a stylesheet is where it is set.
|
|
80
|
+
* **On the row, because the row is the box being separated, and on the
|
|
81
|
+
* feed for every row at once.** A feed's own `separation` is taken by each
|
|
82
|
+
* row that sets none, and a row that sets one keeps it, `plain` included.
|
|
76
83
|
*/
|
|
77
84
|
separation?: 'filled' | 'outlined' | 'plain';
|
|
85
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
78
86
|
static styles: CSSResultGroup;
|
|
79
87
|
}
|
|
80
88
|
declare global {
|
|
@@ -11,9 +11,22 @@ import { styles as glyphStyles } from '../../shared/glyph/glyph.css.js';
|
|
|
11
11
|
import { styles } from './notification.css.js';
|
|
12
12
|
import '../../format-date/index.js';
|
|
13
13
|
let HelixNotification = class HelixNotification extends HelixHeadlessNotification {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.feedSeparation = undefined;
|
|
17
|
+
}
|
|
14
18
|
static { this.tier = 'helix-'; }
|
|
19
|
+
willUpdate(changed) {
|
|
20
|
+
super.willUpdate(changed);
|
|
21
|
+
const taken = this.separation ? undefined : this.feedSeparation;
|
|
22
|
+
this.toggleState('feed-filled', taken === 'filled');
|
|
23
|
+
this.toggleState('feed-outlined', taken === 'outlined');
|
|
24
|
+
}
|
|
15
25
|
static { this.styles = [glyphStyles, styles]; }
|
|
16
26
|
};
|
|
27
|
+
__decorate([
|
|
28
|
+
property({ attribute: false })
|
|
29
|
+
], HelixNotification.prototype, "feedSeparation", void 0);
|
|
17
30
|
__decorate([
|
|
18
31
|
property({ reflect: true })
|
|
19
32
|
], HelixNotification.prototype, "separation", void 0);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
2
|
export const styles = createSheet(`:host {--helix-size-checkbox: var(--helix-size-checkbox-sm);--helix-size-checkbox-loose: calc(var(--helix-size-checkbox) * 1.2);--helix-size-checkbox-tight: calc(var(--helix-size-checkbox) * 0.8);--helix-size-control: var(--helix-size-control-sm);--helix-size-control-loose: calc(var(--helix-size-control) * 1.2);--helix-size-control-tight: calc(var(--helix-size-control) * 0.8);--helix-size-icon: var(--helix-size-icon-sm);--helix-size-icon-loose: calc(var(--helix-size-icon) * 1.2);--helix-size-icon-tight: calc(var(--helix-size-icon) * 0.8);--helix-size-tag: var(--helix-size-tag-sm);--helix-size-avatar: var(--helix-size-avatar-sm);display: grid;grid-template-rows: auto minmax(0, 1fr) auto;max-block-size: var(--notifications-max-block-size, none);}:host(:state(media)) {--notifications-media-column: calc(var(--helix-size-avatar) + var(--helix-space-sm));}[part="header"] {align-items: center;border-block-end: var(--helix-border-thin) solid
|
|
3
3
|
var(--notifications-rule, var(--helix-color-border));display: flex;gap: var(--helix-space-sm);justify-content: space-between;padding-block: var(--helix-space-sm);padding-inline: var(--notifications-padding-inline, var(--helix-space-lg));}[part="header"][data-empty],
|
|
4
|
-
[part="footer"][data-empty] {display: none;}[part="list"] {overflow-y: auto;}[
|
|
4
|
+
[part="footer"][data-empty] {display: none;}[part="list"] {overflow-y: auto;}:host([separation="filled"]) [part="header"],
|
|
5
|
+
:host([separation="outlined"]) [part="header"] {border-block-end: none;}:host([separation="filled"]) [part="list"],
|
|
6
|
+
:host([separation="outlined"]) [part="list"] {padding-block-start: var(--notifications-item-gap, var(--helix-space-xs));}[part="footer"] {border-block-start: var(--helix-border-thin) solid
|
|
5
7
|
var(--notifications-rule, var(--helix-color-border));padding-block: var(--helix-space-sm);padding-inline: var(--notifications-padding-inline, var(--helix-space-lg));}::slotted(helix-notification:last-of-type) {--notifications-rule: transparent;}[part="mark-all"] {background: none;border: 0;border-radius: var(--helix-radii-sm);color: var(--helix-color-foreground-muted);cursor: pointer;font-family: var(--helix-font-sans);font-size: var(--helix-text-sm);padding-block: var(--helix-space-2xs);padding-inline: var(--helix-space-2xs);transition: color var(--helix-duration-fast) var(--helix-easing-standard);}[part="mark-all"]:hover {color: var(--helix-color-foreground);}[part="more"] {background: none;border: 0;border-block-start: var(--helix-border-thin) solid var(--helix-color-border);color: var(--helix-color-foreground-muted);cursor: pointer;font-family: var(--helix-font-sans);font-size: var(--helix-text-sm);inline-size: 100%;padding-block: var(--helix-space-sm);transition: color var(--helix-duration-fast) var(--helix-easing-standard);}[part="more"]:hover {color: var(--helix-color-foreground);}[part="more"][aria-disabled="true"],
|
|
6
8
|
[part="more"][aria-disabled="true"]:hover {color: var(--helix-color-foreground-subtle);cursor: default;}[part="more"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1);}[part="mark-all"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}[part="empty"],
|
|
7
9
|
[part="loading"] {--_collection-inset-block: var(--helix-space-lg);--_collection-inset-inline: var(--helix-space-md);}[part="error"] {color: var(--notifications-error-color, var(--helix-color-danger));font-family: var(--helix-font-sans);font-size: var(--helix-text-sm);margin: var(--helix-space-none);padding-block: var(--helix-space-lg);padding-inline: var(--helix-space-md);text-align: center;}@media print {:host {max-block-size: none;}[part="list"] {overflow-y: visible;}[part="mark-all"],
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { HelixHeadlessNotifications } from '@fusion.dev/helix-headless/notifications';
|
|
2
|
-
import type { CSSResultGroup } from 'lit';
|
|
3
|
-
import '../notification/notification.js';
|
|
2
|
+
import type { CSSResultGroup, PropertyValues } from 'lit';
|
|
4
3
|
/**
|
|
5
4
|
* @summary A feed of notifications, each marked read or unread.
|
|
6
5
|
*
|
|
@@ -32,6 +31,7 @@ import '../notification/notification.js';
|
|
|
32
31
|
* @csspart more - The button after the list that asks for more, while `load-more` is set. It stays while the feed is loading, in a lighter color and `aria-disabled`, so focus stays on it.
|
|
33
32
|
*
|
|
34
33
|
* @cssproperty --notifications-error-color - The color of the `error` line.
|
|
34
|
+
* @cssproperty --notifications-item-gap - Space before the first row, and between rows, while `separation` makes every row a box.
|
|
35
35
|
* @cssproperty --notifications-max-block-size - How tall the feed may get before the list scrolls.
|
|
36
36
|
* @cssproperty --notifications-media-column - Width of the media column that every item keeps when any item in the feed has media.
|
|
37
37
|
* @cssproperty --notifications-padding-inline - Space either side of the header and footer.
|
|
@@ -39,7 +39,22 @@ import '../notification/notification.js';
|
|
|
39
39
|
*/
|
|
40
40
|
export declare class HelixNotifications extends HelixHeadlessNotifications {
|
|
41
41
|
static tier: string;
|
|
42
|
+
/**
|
|
43
|
+
* How every row in the feed is set apart from the one above it, where the
|
|
44
|
+
* row does not say for itself.
|
|
45
|
+
*
|
|
46
|
+
* `plain`, the resting one, separates the rows by a hairline. `outlined` and
|
|
47
|
+
* `filled` make every row a box, as the row's own `separation` does, take
|
|
48
|
+
* away the rule under the header, which reads as a stray line above a box,
|
|
49
|
+
* and put the gap that falls between the boxes before the first one too.
|
|
50
|
+
*
|
|
51
|
+
* A row that sets its own `separation` keeps it, so a feed of boxes can hold
|
|
52
|
+
* one plain row and the other way round.
|
|
53
|
+
*/
|
|
54
|
+
separation?: 'filled' | 'outlined' | 'plain';
|
|
42
55
|
static styles: CSSResultGroup;
|
|
56
|
+
/** Tells each row the feed's `separation`, which a row that sets none takes. */
|
|
57
|
+
protected updated(changed: PropertyValues): void;
|
|
43
58
|
}
|
|
44
59
|
declare global {
|
|
45
60
|
interface HTMLElementTagNameMap {
|
|
@@ -6,14 +6,26 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { customElement } from '@fusion.dev/helix-core';
|
|
8
8
|
import { HelixHeadlessNotifications } from '@fusion.dev/helix-headless/notifications';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
9
10
|
import { styles as collectionStateStyles } from '../../shared/collection/state.css.js';
|
|
10
11
|
import { styles as liveStyles } from '../../shared/live/live.css.js';
|
|
12
|
+
import { HelixNotification } from '../notification/notification.js';
|
|
11
13
|
import { styles } from './notifications-root.css.js';
|
|
12
|
-
import '../notification/notification.js';
|
|
13
14
|
let HelixNotifications = class HelixNotifications extends HelixHeadlessNotifications {
|
|
14
15
|
static { this.tier = 'helix-'; }
|
|
15
16
|
static { this.styles = [liveStyles, collectionStateStyles, styles]; }
|
|
17
|
+
updated(changed) {
|
|
18
|
+
super.updated(changed);
|
|
19
|
+
for (const item of this.items) {
|
|
20
|
+
if (item instanceof HelixNotification) {
|
|
21
|
+
item.feedSeparation = this.separation;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
16
25
|
};
|
|
26
|
+
__decorate([
|
|
27
|
+
property({ reflect: true })
|
|
28
|
+
], HelixNotifications.prototype, "separation", void 0);
|
|
17
29
|
HelixNotifications = __decorate([
|
|
18
30
|
customElement('helix-notifications')
|
|
19
31
|
], HelixNotifications);
|
|
@@ -63,6 +63,11 @@ import { type OrbState } from '../shapes.js';
|
|
|
63
63
|
* @cssstate working - The orb shows `working`.
|
|
64
64
|
*/
|
|
65
65
|
export declare class HelixOrb extends HelixElement {
|
|
66
|
+
/**
|
|
67
|
+
* The key this family's words are registered under, its tag:
|
|
68
|
+
* `registerWords('de', { 'helix-orb': { stateLabels: { thinking: 'Denkt nach' } } })`.
|
|
69
|
+
*/
|
|
70
|
+
static words: string;
|
|
66
71
|
static styles: CSSResultGroup;
|
|
67
72
|
/**
|
|
68
73
|
* Says each new state politely, such as "Working" and then "Done".
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, HelixElement, hostAria, PaintGateController, readColor, wordsConverter, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { customElement, HelixElement, hostAria, PaintGateController, readColor, words, wordsConverter, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import { styles as liveStyles } from '../../shared/live/live.css.js';
|
|
@@ -14,15 +14,6 @@ const MORPH_NEAR = 380;
|
|
|
14
14
|
const MORPH_REACH = 580;
|
|
15
15
|
const LIGHT_Y = 0.36;
|
|
16
16
|
const STILL_PHASE = 1.4;
|
|
17
|
-
const LABELS = {
|
|
18
|
-
connecting: 'Connecting',
|
|
19
|
-
done: 'Done',
|
|
20
|
-
fetching: 'Fetching',
|
|
21
|
-
listening: 'Listening',
|
|
22
|
-
thinking: 'Thinking',
|
|
23
|
-
waiting: 'Waiting',
|
|
24
|
-
working: 'Working',
|
|
25
|
-
};
|
|
26
17
|
const GRAY = [128, 128, 128];
|
|
27
18
|
let HelixOrb = class HelixOrb extends HelixElement {
|
|
28
19
|
constructor() {
|
|
@@ -30,7 +21,15 @@ let HelixOrb = class HelixOrb extends HelixElement {
|
|
|
30
21
|
this.announce = false;
|
|
31
22
|
this.label = '';
|
|
32
23
|
this.state = 'thinking';
|
|
33
|
-
this.stateLabels = {
|
|
24
|
+
this.stateLabels = {
|
|
25
|
+
connecting: 'Connecting',
|
|
26
|
+
done: 'Done',
|
|
27
|
+
fetching: 'Fetching',
|
|
28
|
+
listening: 'Listening',
|
|
29
|
+
thinking: 'Thinking',
|
|
30
|
+
waiting: 'Waiting',
|
|
31
|
+
working: 'Working',
|
|
32
|
+
};
|
|
34
33
|
this.context = null;
|
|
35
34
|
this.gate = new PaintGateController(this, {
|
|
36
35
|
canRun: () => !!this.context && !this.lost,
|
|
@@ -69,6 +68,7 @@ let HelixOrb = class HelixOrb extends HelixElement {
|
|
|
69
68
|
this.gate.play();
|
|
70
69
|
};
|
|
71
70
|
}
|
|
71
|
+
static { this.words = 'helix-orb'; }
|
|
72
72
|
static { this.styles = [liveStyles, styles]; }
|
|
73
73
|
willUpdate(changed) {
|
|
74
74
|
super.willUpdate(changed);
|
|
@@ -95,7 +95,7 @@ let HelixOrb = class HelixOrb extends HelixElement {
|
|
|
95
95
|
: 'thinking';
|
|
96
96
|
}
|
|
97
97
|
get word() {
|
|
98
|
-
return this.stateLabels?.[this.shown]
|
|
98
|
+
return this.stateLabels?.[this.shown] ?? '';
|
|
99
99
|
}
|
|
100
100
|
render() {
|
|
101
101
|
return html `<canvas part="canvas" aria-hidden="true"></canvas>${this.announce ? html `<span part="live">${this.word}</span>` : nothing}`;
|
|
@@ -264,6 +264,7 @@ __decorate([
|
|
|
264
264
|
property()
|
|
265
265
|
], HelixOrb.prototype, "state", void 0);
|
|
266
266
|
__decorate([
|
|
267
|
+
words,
|
|
267
268
|
property({ attribute: 'state-labels', converter: wordsConverter })
|
|
268
269
|
], HelixOrb.prototype, "stateLabels", void 0);
|
|
269
270
|
HelixOrb = __decorate([
|
|
@@ -80,6 +80,11 @@ export type PreviewMessage = PreviewConsole | PreviewPress | PreviewReady | Prev
|
|
|
80
80
|
* @cssstate loading - While the frame's document loads, until it can take the example.
|
|
81
81
|
*/
|
|
82
82
|
export declare class HelixSandboxPreview extends HelixElement {
|
|
83
|
+
/**
|
|
84
|
+
* The key this part's words are registered under, its tag:
|
|
85
|
+
* `registerWords('de', { 'helix-sandbox-preview': { label: 'Vorschau' } })`.
|
|
86
|
+
*/
|
|
87
|
+
static words: string;
|
|
83
88
|
/**
|
|
84
89
|
* The color mode the frame renders in.
|
|
85
90
|
*
|