@fusion.dev/helix 0.22.0 → 0.24.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 +63613 -38645
- package/dist/accordion/item/accordion-item.css.js +4 -0
- package/dist/announcement/root/announcement-root.css.js +26 -12
- package/dist/announcement/root/announcement-root.d.ts +17 -0
- package/dist/announcement/root/announcement-root.js +4 -0
- package/dist/app-header/root/app-header-root.css.js +6 -0
- package/dist/area-chart/index.d.ts +1 -0
- package/dist/area-chart/index.js +1 -0
- package/dist/area-chart/root/area-chart-root.css.d.ts +1 -0
- package/dist/area-chart/root/area-chart-root.css.js +97 -0
- package/dist/area-chart/root/area-chart-root.d.ts +38 -0
- package/dist/area-chart/root/area-chart-root.js +20 -0
- package/dist/bar-chart/root/bar-chart-root.css.js +0 -141
- package/dist/bar-chart/root/bar-chart-root.js +2 -1
- package/dist/button/root/button-root.css.js +4 -1
- package/dist/chat/composer/chat-composer.css.js +4 -0
- package/dist/chat/message/chat-message.css.js +20 -0
- package/dist/chat/root/chat-root.css.js +26 -0
- package/dist/code-block/root/code-block-root.css.js +122 -0
- package/dist/code-block/root/code-block-root.d.ts +5 -0
- package/dist/data-table/root/data-table-root.css.js +21 -3
- package/dist/data-table/root/data-table-root.d.ts +1 -0
- package/dist/data-table/root/data-table-root.js +1 -0
- package/dist/description-list/index.d.ts +2 -0
- package/dist/description-list/index.js +2 -0
- package/dist/description-list/item/description-list-item.css.d.ts +1 -0
- package/dist/description-list/item/description-list-item.css.js +31 -0
- package/dist/description-list/item/description-list-item.d.ts +21 -0
- package/dist/description-list/item/description-list-item.js +16 -0
- package/dist/description-list/root/description-list-root.css.d.ts +1 -0
- package/dist/description-list/root/description-list-root.css.js +35 -0
- package/dist/description-list/root/description-list-root.d.ts +62 -0
- package/dist/description-list/root/description-list-root.js +23 -0
- package/dist/donut-chart/root/donut-chart-root.css.js +0 -138
- package/dist/donut-chart/root/donut-chart-root.js +2 -1
- package/dist/element-events.generated.js +36 -8
- package/dist/filter-input/chip/filter-chip.css.d.ts +1 -0
- package/dist/filter-input/chip/filter-chip.css.js +85 -0
- package/dist/filter-input/chip/filter-chip.d.ts +32 -0
- package/dist/filter-input/chip/filter-chip.js +16 -0
- package/dist/filter-input/field/filter-field.css.d.ts +1 -0
- package/dist/filter-input/field/filter-field.css.js +4 -0
- package/dist/filter-input/field/filter-field.d.ts +29 -0
- package/dist/filter-input/field/filter-field.js +16 -0
- package/dist/filter-input/index.d.ts +4 -0
- package/dist/filter-input/index.js +4 -0
- package/dist/filter-input/menu/filter-menu.css.d.ts +1 -0
- package/dist/filter-input/menu/filter-menu.css.js +4 -0
- package/dist/filter-input/menu/filter-menu.d.ts +33 -0
- package/dist/filter-input/menu/filter-menu.js +19 -0
- package/dist/filter-input/operator/filter-operator.css.d.ts +1 -0
- package/dist/filter-input/operator/filter-operator.css.js +4 -0
- package/dist/filter-input/operator/filter-operator.d.ts +27 -0
- package/dist/filter-input/operator/filter-operator.js +16 -0
- package/dist/filter-input/root/filter-input-root.css.js +25 -2
- package/dist/filter-input/root/filter-input-root.d.ts +3 -0
- package/dist/heatmap/root/heatmap-root.d.ts +1 -0
- package/dist/heatmap/root/heatmap-root.js +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/line-chart/root/line-chart-root.css.js +0 -138
- package/dist/line-chart/root/line-chart-root.js +2 -1
- package/dist/menu/item/menu-item.css.js +33 -6
- package/dist/menu/item/menu-item.d.ts +2 -1
- package/dist/menu/root/menu-root.css.js +15 -0
- package/dist/navigation/root/navigation-root.css.js +2 -1
- package/dist/notifications/group/notification-group.css.d.ts +1 -0
- package/dist/notifications/group/notification-group.css.js +61 -0
- package/dist/notifications/group/notification-group.d.ts +37 -0
- package/dist/notifications/group/notification-group.js +16 -0
- package/dist/notifications/index.d.ts +1 -0
- package/dist/notifications/index.js +1 -0
- package/dist/notifications/notification/notification.css.js +74 -8
- package/dist/notifications/notification/notification.d.ts +25 -0
- package/dist/notifications/notification/notification.js +5 -0
- package/dist/notifications/root/notifications-root.css.js +8 -0
- package/dist/object-inspector/index.d.ts +1 -0
- package/dist/object-inspector/index.js +1 -0
- package/dist/object-inspector/root/object-inspector-root.css.d.ts +1 -0
- package/dist/object-inspector/root/object-inspector-root.css.js +148 -0
- package/dist/object-inspector/root/object-inspector-root.d.ts +35 -0
- package/dist/object-inspector/root/object-inspector-root.js +18 -0
- package/dist/sandbox/root/sandbox-root.d.ts +4 -0
- package/dist/sandbox/toolbar/sandbox-toolbar.css.js +7 -1
- package/dist/scatter-chart/index.d.ts +1 -0
- package/dist/scatter-chart/index.js +1 -0
- package/dist/scatter-chart/root/scatter-chart-root.css.d.ts +1 -0
- package/dist/scatter-chart/root/scatter-chart-root.css.js +138 -0
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +38 -0
- package/dist/scatter-chart/root/scatter-chart-root.js +20 -0
- package/dist/shared/chart/tooltip.css.d.ts +1 -0
- package/dist/shared/chart/tooltip.css.js +141 -0
- package/dist/skip-link/index.d.ts +1 -0
- package/dist/skip-link/index.js +1 -0
- package/dist/skip-link/root/skip-link-root.css.d.ts +1 -0
- package/dist/skip-link/root/skip-link-root.css.js +36 -0
- package/dist/skip-link/root/skip-link-root.d.ts +42 -0
- package/dist/skip-link/root/skip-link-root.js +17 -0
- package/dist/steps/step/step.css.js +4 -0
- package/dist/table/column/table-column.css.js +66 -0
- package/dist/tag/root/tag-root.d.ts +10 -0
- package/dist/text/root/text-root.d.ts +26 -13
- package/dist/text/root/text-root.js +3 -0
- package/dist/time-picker/root/time-picker-root.css.js +2 -2
- package/dist/toast/item/toast-item.css.js +9 -4
- package/dist/toolbar/root/toolbar-root.css.js +6 -0
- package/package.json +6 -6
- package/types/jsx.d.ts +4797 -701
- package/types/svelte.d.ts +11 -0
- package/types/vue.d.ts +910 -52
|
@@ -16,13 +16,13 @@ display: grid;
|
|
|
16
16
|
font-size: var(--helix-text-xs);
|
|
17
17
|
|
|
18
18
|
font-weight: var(--helix-weight-medium);
|
|
19
|
-
gap: var(--helix-space-xs);
|
|
20
19
|
|
|
21
20
|
grid-template-columns:
|
|
22
|
-
var(--menu-item-start,
|
|
21
|
+
var(--menu-item-start, 0px)
|
|
23
22
|
minmax(0, 1fr)
|
|
24
|
-
var(--
|
|
25
|
-
|
|
23
|
+
var(--menu-item-end, 0px);
|
|
24
|
+
|
|
25
|
+
min-block-size: var(--helix-size-control);
|
|
26
26
|
|
|
27
27
|
padding-inline: var(--helix-space-sm);
|
|
28
28
|
transition: background-color var(--helix-duration-fast) var(--helix-easing-standard);
|
|
@@ -47,20 +47,43 @@ opacity: 0.5;
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
[part="start"] {
|
|
50
|
-
|
|
50
|
+
|
|
51
|
+
--icon-size: var(--helix-size-icon);
|
|
51
52
|
|
|
52
53
|
align-items: center;
|
|
54
|
+
|
|
55
|
+
box-sizing: border-box;
|
|
53
56
|
color: var(--helix-color-foreground-subtle);
|
|
54
57
|
display: flex;
|
|
55
|
-
inline-size: var(--menu-item-start, var(--helix-size-icon));
|
|
56
58
|
justify-content: center;
|
|
59
|
+
padding-inline-end: var(--helix-space-xs);
|
|
57
60
|
|
|
58
61
|
min-block-size: var(--helix-size-icon);
|
|
59
62
|
}
|
|
60
63
|
|
|
64
|
+
[part="start"] {
|
|
65
|
+
grid-column: 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[part="item"] > slot:not([name]) {
|
|
69
|
+
display: block;
|
|
70
|
+
grid-column: 2;
|
|
71
|
+
|
|
72
|
+
min-inline-size: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
[part="mark"] {
|
|
76
|
+
grid-column: 3;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[part="start"][data-empty] {
|
|
80
|
+
display: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
61
83
|
[part="mark"] {
|
|
62
84
|
block-size: var(--helix-size-icon);
|
|
63
85
|
inline-size: var(--helix-size-icon);
|
|
86
|
+
justify-self: end;
|
|
64
87
|
}
|
|
65
88
|
|
|
66
89
|
svg[part="mark"] {
|
|
@@ -75,6 +98,10 @@ slot[name="submenu"] {
|
|
|
75
98
|
display: contents;
|
|
76
99
|
}
|
|
77
100
|
|
|
101
|
+
slot[name="submenu"]::slotted(helix-divider) {
|
|
102
|
+
margin-block: var(--helix-space-2xs);
|
|
103
|
+
}
|
|
104
|
+
|
|
78
105
|
:host(:dir(rtl)) [part="mark"][data-submenu] {
|
|
79
106
|
scale: -1 1;
|
|
80
107
|
}`);
|
|
@@ -13,8 +13,9 @@ import type { CSSResultGroup } from 'lit';
|
|
|
13
13
|
* @aliases Menu option, Menu row
|
|
14
14
|
* @documentation https://helix.fusion.dev/components/menu
|
|
15
15
|
*
|
|
16
|
+
* @cssproperty --menu-item-end - Width of the trailing column, seam included, which holds a tick or the caret into a page.
|
|
16
17
|
* @cssproperty --menu-item-hover-color - Fill under the pointer.
|
|
17
|
-
* @cssproperty --menu-item-start - Width of the leading column, for a row carrying more than a mark.
|
|
18
|
+
* @cssproperty --menu-item-start - Width of the leading column, seam included, for a row carrying more than a mark. The menu sets it per page and zero is no column at all.
|
|
18
19
|
*/
|
|
19
20
|
export declare class HelixMenuItem extends HelixHeadlessMenuItem {
|
|
20
21
|
static styles: CSSResultGroup;
|
|
@@ -7,7 +7,14 @@ display: contents;
|
|
|
7
7
|
[part="surface"] {
|
|
8
8
|
|
|
9
9
|
--helix-size-control: var(--helix-size-control-sm);
|
|
10
|
+
--helix-size-control-loose: calc(var(--helix-size-control) * 1.2);
|
|
11
|
+
--helix-size-control-tight: calc(var(--helix-size-control) * 0.8);
|
|
10
12
|
--helix-size-icon: var(--helix-size-icon-sm);
|
|
13
|
+
--helix-size-icon-loose: calc(var(--helix-size-icon) * 1.2);
|
|
14
|
+
--helix-size-icon-tight: calc(var(--helix-size-icon) * 0.8);
|
|
15
|
+
|
|
16
|
+
--menu-item-start: 0px;
|
|
17
|
+
--menu-item-end: 0px;
|
|
11
18
|
|
|
12
19
|
max-block-size: var(--menu-max-block-size, var(--floating-available-block-size, none));
|
|
13
20
|
overflow-y: auto;
|
|
@@ -28,6 +35,14 @@ padding-block: var(--helix-space-xs);
|
|
|
28
35
|
padding-inline: var(--helix-space-none);
|
|
29
36
|
}
|
|
30
37
|
|
|
38
|
+
:host(:state(start)) [part="surface"] {
|
|
39
|
+
--menu-item-start: calc(var(--helix-size-icon) + var(--helix-space-xs));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host(:state(mark)) [part="surface"] {
|
|
43
|
+
--menu-item-end: calc(var(--helix-size-icon) + var(--helix-space-xs));
|
|
44
|
+
}
|
|
45
|
+
|
|
31
46
|
[part="surface"][hidden] {
|
|
32
47
|
display: none;
|
|
33
48
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
+
export const styles = createSheet(`:host {
|
|
3
|
+
display: block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
[part="header"] {
|
|
7
|
+
align-items: center;
|
|
8
|
+
display: flex;
|
|
9
|
+
gap: var(--helix-space-xs);
|
|
10
|
+
padding-block: var(--helix-space-xs);
|
|
11
|
+
padding-inline: var(--notifications-padding-inline, var(--helix-space-md));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
[part="label"] {
|
|
15
|
+
color: var(--helix-color-foreground-muted);
|
|
16
|
+
font-family: var(--helix-font-sans);
|
|
17
|
+
font-size: var(--helix-text-sm);
|
|
18
|
+
font-weight: var(--helix-weight-medium);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
[part="count"] {
|
|
22
|
+
background-color: var(--helix-color-surface-sunken);
|
|
23
|
+
border-radius: var(--helix-radii-full);
|
|
24
|
+
color: var(--helix-color-foreground-subtle);
|
|
25
|
+
font-family: var(--helix-font-sans);
|
|
26
|
+
font-size: var(--helix-text-xs);
|
|
27
|
+
font-variant-numeric: tabular-nums;
|
|
28
|
+
line-height: 1;
|
|
29
|
+
min-inline-size: var(--helix-size-badge);
|
|
30
|
+
padding-block: var(--helix-space-2xs);
|
|
31
|
+
padding-inline: var(--helix-space-xs);
|
|
32
|
+
text-align: center;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[part="trigger"] {
|
|
36
|
+
all: unset;
|
|
37
|
+
align-items: center;
|
|
38
|
+
border-radius: var(--helix-radii-sm);
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
gap: var(--helix-space-xs);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[part="trigger"]:focus-visible {
|
|
45
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
46
|
+
outline-offset: var(--helix-size-focus-offset);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
[part="trigger"]:hover [part="label"] {
|
|
50
|
+
color: var(--helix-color-foreground);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
[part="action"] {
|
|
54
|
+
align-items: center;
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
margin-inline-start: auto;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[part="items"] {
|
|
60
|
+
position: relative;
|
|
61
|
+
}`);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { HelixHeadlessNotificationGroup } from '@fusion.dev/helix-headless/notifications';
|
|
2
|
+
import type { CSSResultGroup } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary A named set of notifications, which can be collapsed to the first of
|
|
5
|
+
* them.
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* The heading is chrome: it says which pile a reader is looking at and is never
|
|
9
|
+
* the thing they came to read, so it is drawn quieter than a row's title. A feed
|
|
10
|
+
* cut into five days has five of these, and a heading at the weight of the
|
|
11
|
+
* content turns a list of notifications into a list of dates.
|
|
12
|
+
*
|
|
13
|
+
* **The stack is two lines rather than two cards.** Collapsed, the rows behind
|
|
14
|
+
* the first are not rendered at all, so there is nothing to see through: what
|
|
15
|
+
* draws the pile is a pair of pseudo-elements above the visible row, offset and
|
|
16
|
+
* inset so they read as the top edges of cards behind it. A shadow could not do
|
|
17
|
+
* it, spreading on four sides where this has a top edge and no bottom one, and
|
|
18
|
+
* having no way to sit narrower than the thing it is behind, which is the cue
|
|
19
|
+
* that says there is something back there.
|
|
20
|
+
*
|
|
21
|
+
* @since 0.24.0
|
|
22
|
+
* @status experimental
|
|
23
|
+
* @category feedback
|
|
24
|
+
* @aliases NotificationSection, FeedGroup
|
|
25
|
+
* @documentation https://helix.fusion.dev/components/notifications
|
|
26
|
+
*
|
|
27
|
+
* @event {HelixBeforeCloseEvent} helix-before-close - Fired before the group folds, and cancelable.
|
|
28
|
+
* @event {HelixBeforeOpenEvent} helix-before-open - Fired before the group unfolds. Cancelable: refusing it takes the decision and nothing moves.
|
|
29
|
+
*/
|
|
30
|
+
export declare class HelixNotificationGroup extends HelixHeadlessNotificationGroup {
|
|
31
|
+
static styles: CSSResultGroup;
|
|
32
|
+
}
|
|
33
|
+
declare global {
|
|
34
|
+
interface HTMLElementTagNameMap {
|
|
35
|
+
'helix-notification-group': HelixNotificationGroup;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -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 { HelixHeadlessNotificationGroup } from '@fusion.dev/helix-headless/notifications';
|
|
9
|
+
import { styles } from './notification-group.css.js';
|
|
10
|
+
let HelixNotificationGroup = class HelixNotificationGroup extends HelixHeadlessNotificationGroup {
|
|
11
|
+
static { this.styles = styles; }
|
|
12
|
+
};
|
|
13
|
+
HelixNotificationGroup = __decorate([
|
|
14
|
+
customElement('helix-notification-group')
|
|
15
|
+
], HelixNotificationGroup);
|
|
16
|
+
export { HelixNotificationGroup };
|
|
@@ -3,6 +3,9 @@ export const styles = createSheet(`:host {
|
|
|
3
3
|
|
|
4
4
|
--_notifications-line: calc(var(--helix-text-sm) * var(--helix-leading-normal));
|
|
5
5
|
|
|
6
|
+
--_notifications-pad-block: var(--notifications-padding-block, var(--helix-space-xs));
|
|
7
|
+
--_notifications-unread: var(--notifications-unread-block-size, var(--helix-space-xs));
|
|
8
|
+
|
|
6
9
|
container-type: inline-size;
|
|
7
10
|
|
|
8
11
|
display: block;
|
|
@@ -16,7 +19,7 @@ var(--notifications-rule, var(--helix-color-border));
|
|
|
16
19
|
cursor: default;
|
|
17
20
|
display: grid;
|
|
18
21
|
grid-template-columns: minmax(var(--notifications-media-column, 0px), auto) minmax(0, 1fr) auto;
|
|
19
|
-
padding-block: var(--
|
|
22
|
+
padding-block: var(--_notifications-pad-block);
|
|
20
23
|
padding-inline: var(--notifications-padding-inline, var(--helix-space-md));
|
|
21
24
|
|
|
22
25
|
position: relative;
|
|
@@ -24,20 +27,48 @@ position: relative;
|
|
|
24
27
|
|
|
25
28
|
:host(:not(:state(read))) [part="item"]::before {
|
|
26
29
|
background-color: var(--notifications-unread-mark, var(--helix-color-accent));
|
|
27
|
-
block-size: var(--
|
|
30
|
+
block-size: var(--_notifications-unread);
|
|
28
31
|
border-radius: var(--notifications-unread-radius, var(--helix-radii-full));
|
|
29
32
|
content: "";
|
|
30
|
-
inline-size: var(--notifications-unread-inline-size, var(--
|
|
33
|
+
inline-size: var(--notifications-unread-inline-size, var(--_notifications-unread));
|
|
34
|
+
|
|
31
35
|
inset-block-start: var(
|
|
32
36
|
--notifications-unread-offset,
|
|
33
|
-
|
|
37
|
+
calc(
|
|
38
|
+
var(--_notifications-pad-block) +
|
|
39
|
+
(var(--_notifications-line) - var(--_notifications-unread)) /
|
|
40
|
+
2
|
|
41
|
+
)
|
|
34
42
|
);
|
|
35
43
|
inset-inline-start: var(--notifications-unread-inset, var(--helix-space-2xs));
|
|
36
44
|
position: absolute;
|
|
37
45
|
}
|
|
38
46
|
|
|
47
|
+
:host([separation="filled"]),
|
|
48
|
+
:host([separation="outlined"]) {
|
|
49
|
+
--notifications-rule: transparent;
|
|
50
|
+
|
|
51
|
+
margin-block-end: var(--notifications-item-gap, var(--helix-space-xs));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([separation="filled"]) [part="item"],
|
|
55
|
+
:host([separation="outlined"]) [part="item"] {
|
|
56
|
+
border: var(--helix-border-thin) solid var(--notifications-item-edge, var(--helix-color-border));
|
|
57
|
+
border-radius: var(--notifications-item-radius, var(--helix-radii-md));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host([separation="filled"]) [part="item"] {
|
|
61
|
+
background-color: var(--notifications-item-fill, var(--helix-color-surface-raised));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host([separation="filled"]) {
|
|
65
|
+
--avatar-background-color: color-mix(in oklab, var(--helix-color-foreground) 8%, transparent);
|
|
66
|
+
}
|
|
67
|
+
|
|
39
68
|
[part="media"] {
|
|
40
69
|
display: grid;
|
|
70
|
+
|
|
71
|
+
grid-template-rows: var(--_notifications-line);
|
|
41
72
|
place-items: center start;
|
|
42
73
|
}
|
|
43
74
|
|
|
@@ -61,17 +92,40 @@ line-height: var(--helix-leading-normal);
|
|
|
61
92
|
margin: var(--helix-space-none);
|
|
62
93
|
}
|
|
63
94
|
|
|
95
|
+
slot[name="detail"]::slotted(*) {
|
|
96
|
+
margin-block: var(--helix-space-2xs) var(--helix-space-none);
|
|
97
|
+
margin-inline: var(--helix-space-none);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[part="body"] slot:not([name])::slotted(a) {
|
|
101
|
+
color: inherit;
|
|
102
|
+
text-decoration: none;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
[part="body"] slot:not([name])::slotted(a:hover) {
|
|
106
|
+
text-decoration: underline;
|
|
107
|
+
text-decoration-color: color-mix(in oklab, currentcolor 35%, transparent);
|
|
108
|
+
text-decoration-thickness: 1px;
|
|
109
|
+
text-underline-offset: 0.25em;
|
|
110
|
+
}
|
|
111
|
+
|
|
64
112
|
:host(:not(:state(read))) [part="label"] {
|
|
65
113
|
color: var(--helix-color-foreground);
|
|
66
114
|
font-weight: var(--helix-weight-medium);
|
|
67
115
|
}
|
|
68
116
|
|
|
117
|
+
[part="controls"] {
|
|
118
|
+
margin-inline-end: calc((var(--helix-size-control) - var(--helix-size-icon)) / -2);
|
|
119
|
+
}
|
|
120
|
+
|
|
69
121
|
[part="trailing"] {
|
|
70
122
|
align-items: center;
|
|
71
|
-
align-self:
|
|
123
|
+
align-self: start;
|
|
72
124
|
display: grid;
|
|
73
125
|
grid-template-areas: "swap";
|
|
74
126
|
justify-items: end;
|
|
127
|
+
|
|
128
|
+
grid-template-rows: var(--_notifications-line);
|
|
75
129
|
margin-inline-start: var(--helix-space-sm);
|
|
76
130
|
}
|
|
77
131
|
|
|
@@ -88,8 +142,11 @@ translate var(--helix-duration-normal) var(--helix-easing-decelerate);
|
|
|
88
142
|
|
|
89
143
|
[part="trailing"] > :not([part="controls"]) {
|
|
90
144
|
color: var(--helix-color-foreground-subtle);
|
|
145
|
+
|
|
146
|
+
display: block;
|
|
91
147
|
font-family: var(--helix-font-sans);
|
|
92
148
|
font-size: var(--helix-text-xs);
|
|
149
|
+
line-height: var(--_notifications-line);
|
|
93
150
|
opacity: calc(1 - var(--_notifications-swap));
|
|
94
151
|
|
|
95
152
|
translate: calc(var(--helix-space-2xs) * var(--_notifications-swap)) 0;
|
|
@@ -144,15 +201,24 @@ translate: none;
|
|
|
144
201
|
[part="actions"] {
|
|
145
202
|
align-items: center;
|
|
146
203
|
display: flex;
|
|
204
|
+
flex-wrap: wrap;
|
|
147
205
|
gap: var(--helix-space-2xs);
|
|
148
206
|
}
|
|
149
207
|
|
|
208
|
+
:host(:not(:state(actions))) [part="actions"] {
|
|
209
|
+
display: none;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
:host(:state(actions)) [part="actions"] {
|
|
213
|
+
margin-block-start: var(--helix-space-2xs);
|
|
214
|
+
}
|
|
215
|
+
|
|
150
216
|
[part="dismiss"] {
|
|
151
217
|
background: none;
|
|
152
218
|
border: 0;
|
|
153
219
|
border-radius: var(--helix-radii-sm);
|
|
154
220
|
block-size: var(--helix-size-control);
|
|
155
|
-
color: var(--notifications-dismiss-color, var(--helix-color-
|
|
221
|
+
color: var(--notifications-dismiss-color, var(--helix-color-foreground-subtle));
|
|
156
222
|
cursor: pointer;
|
|
157
223
|
display: grid;
|
|
158
224
|
inline-size: var(--helix-size-control);
|
|
@@ -185,7 +251,7 @@ display: none;
|
|
|
185
251
|
}
|
|
186
252
|
}
|
|
187
253
|
|
|
188
|
-
@container (inline-size <
|
|
254
|
+
@container (inline-size < 18rem) {
|
|
189
255
|
[part="item"] {
|
|
190
256
|
grid-template-columns: minmax(var(--notifications-media-column, 0px), auto) minmax(0, 1fr);
|
|
191
257
|
}
|
|
@@ -194,7 +260,7 @@ grid-template-columns: minmax(var(--notifications-media-column, 0px), auto) minm
|
|
|
194
260
|
align-self: start;
|
|
195
261
|
grid-column: 2;
|
|
196
262
|
grid-row: 2;
|
|
197
|
-
justify-items:
|
|
263
|
+
justify-items: end;
|
|
198
264
|
margin-block-start: var(--helix-space-2xs);
|
|
199
265
|
margin-inline-start: var(--helix-space-none);
|
|
200
266
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HelixHeadlessNotification } from '@fusion.dev/helix-headless/notifications';
|
|
2
2
|
import type { CSSResultGroup } from 'lit';
|
|
3
|
+
import '../../format-date/index.js';
|
|
3
4
|
/**
|
|
4
5
|
* @summary One thing that happened, which a reader may not have seen yet.
|
|
5
6
|
*
|
|
@@ -44,6 +45,10 @@ import type { CSSResultGroup } from 'lit';
|
|
|
44
45
|
*
|
|
45
46
|
* @cssproperty --notifications-color - Ink in an item that has been read.
|
|
46
47
|
* @cssproperty --notifications-dismiss-color - Ink on the control that removes an item, which is `danger` because removing one is the end of it.
|
|
48
|
+
* @cssproperty --notifications-item-edge - Color of a carded row's border.
|
|
49
|
+
* @cssproperty --notifications-item-fill - Fill behind a `filled` row.
|
|
50
|
+
* @cssproperty --notifications-item-gap - Space between carded rows, which replaces the hairline.
|
|
51
|
+
* @cssproperty --notifications-item-radius - Corner radius of a carded row.
|
|
47
52
|
* @cssproperty --notifications-padding-block - Space above and below an item.
|
|
48
53
|
* @cssproperty --notifications-padding-inline - Space either side of an item.
|
|
49
54
|
* @cssproperty --notifications-rule - The hairline between items.
|
|
@@ -56,6 +61,26 @@ import type { CSSResultGroup } from 'lit';
|
|
|
56
61
|
*/
|
|
57
62
|
export declare class HelixNotification extends HelixHeadlessNotification {
|
|
58
63
|
static tier: string;
|
|
64
|
+
/**
|
|
65
|
+
* How a row is told apart from the one above it.
|
|
66
|
+
*
|
|
67
|
+
* `plain` is the resting one and is a hairline and nothing else: the row has
|
|
68
|
+
* no box of its own, and what separates it is a line the list draws between
|
|
69
|
+
* them. It is sayable rather than only reachable by leaving the attribute off,
|
|
70
|
+
* which is the reason `Announcement` gives for spelling out its own neutral.
|
|
71
|
+
*
|
|
72
|
+
* `outlined` and `filled` make each row a box: an edge, a corner, and a gap
|
|
73
|
+
* where the hairline was. A feed of boxes is a different reading of the same
|
|
74
|
+
* content, and which one is right depends on whether the rows are a list to
|
|
75
|
+
* scan or a set of things to act on. The reference this came from draws cards
|
|
76
|
+
* because every row in it has a control.
|
|
77
|
+
*
|
|
78
|
+
* **On the row and not on the feed, because the row is the box being
|
|
79
|
+
* separated.** A consumer wanting the whole feed carded says so once, in a
|
|
80
|
+
* document rule on the element, rather than on every item: this is a styled
|
|
81
|
+
* axis and a stylesheet is where it is set.
|
|
82
|
+
*/
|
|
83
|
+
separation?: 'filled' | 'outlined' | 'plain';
|
|
59
84
|
static styles: CSSResultGroup;
|
|
60
85
|
}
|
|
61
86
|
declare global {
|
|
@@ -6,12 +6,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { customElement } from '@fusion.dev/helix-core';
|
|
8
8
|
import { HelixHeadlessNotification } from '@fusion.dev/helix-headless/notifications';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
9
10
|
import { styles as glyphStyles } from '../../icon/glyph.css.js';
|
|
10
11
|
import { styles } from './notification.css.js';
|
|
12
|
+
import '../../format-date/index.js';
|
|
11
13
|
let HelixNotification = class HelixNotification extends HelixHeadlessNotification {
|
|
12
14
|
static { this.tier = 'helix-'; }
|
|
13
15
|
static { this.styles = [glyphStyles, styles]; }
|
|
14
16
|
};
|
|
17
|
+
__decorate([
|
|
18
|
+
property({ reflect: true })
|
|
19
|
+
], HelixNotification.prototype, "separation", void 0);
|
|
15
20
|
HelixNotification = __decorate([
|
|
16
21
|
customElement('helix-notification')
|
|
17
22
|
], HelixNotification);
|
|
@@ -2,10 +2,18 @@ import { createSheet } from '@fusion.dev/helix-core';
|
|
|
2
2
|
export const styles = createSheet(`:host {
|
|
3
3
|
|
|
4
4
|
--helix-size-checkbox: var(--helix-size-checkbox-sm);
|
|
5
|
+
--helix-size-checkbox-loose: calc(var(--helix-size-checkbox) * 1.2);
|
|
6
|
+
--helix-size-checkbox-tight: calc(var(--helix-size-checkbox) * 0.8);
|
|
5
7
|
--helix-size-control: var(--helix-size-control-sm);
|
|
8
|
+
--helix-size-control-loose: calc(var(--helix-size-control) * 1.2);
|
|
9
|
+
--helix-size-control-tight: calc(var(--helix-size-control) * 0.8);
|
|
6
10
|
--helix-size-icon: var(--helix-size-icon-sm);
|
|
11
|
+
--helix-size-icon-loose: calc(var(--helix-size-icon) * 1.2);
|
|
12
|
+
--helix-size-icon-tight: calc(var(--helix-size-icon) * 0.8);
|
|
7
13
|
--helix-size-tag: var(--helix-size-tag-sm);
|
|
8
14
|
|
|
15
|
+
--helix-size-avatar: var(--helix-size-avatar-sm);
|
|
16
|
+
|
|
9
17
|
display: grid;
|
|
10
18
|
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
11
19
|
max-block-size: var(--notifications-max-block-size, none);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './root/object-inspector-root.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './root/object-inspector-root.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
+
export const styles = createSheet(`:host {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
font-size: var(--helix-text-sm);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
[part="header"] {
|
|
9
|
+
align-items: center;
|
|
10
|
+
background-color: var(
|
|
11
|
+
--object-inspector-header-background-color,
|
|
12
|
+
var(--helix-color-surface-raised)
|
|
13
|
+
);
|
|
14
|
+
border: var(--helix-border-thin) solid
|
|
15
|
+
var(--object-inspector-border-color, var(--helix-color-border));
|
|
16
|
+
border-block-end: none;
|
|
17
|
+
border-start-end-radius: var(--object-inspector-radius, var(--helix-radii-lg));
|
|
18
|
+
border-start-start-radius: var(--object-inspector-radius, var(--helix-radii-lg));
|
|
19
|
+
display: flex;
|
|
20
|
+
padding-block: var(--helix-space-xs);
|
|
21
|
+
padding-inline: var(--helix-space-md);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[part="label"] {
|
|
25
|
+
color: var(--helix-color-foreground-muted);
|
|
26
|
+
font-family: var(--helix-font-sans);
|
|
27
|
+
font-size: var(--helix-text-xs);
|
|
28
|
+
font-weight: var(--helix-weight-medium);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[part="frame"] {
|
|
32
|
+
position: relative;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[part="tree"] {
|
|
36
|
+
background-color: var(--object-inspector-background-color, var(--helix-color-background));
|
|
37
|
+
border: var(--helix-border-thin) solid
|
|
38
|
+
var(--object-inspector-border-color, var(--helix-color-border));
|
|
39
|
+
border-radius: var(--object-inspector-radius, var(--helix-radii-lg));
|
|
40
|
+
font-family: var(--helix-font-mono);
|
|
41
|
+
line-height: var(--helix-leading-normal);
|
|
42
|
+
padding-block: var(--helix-space-xs);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
[part="header"] + [part="frame"] [part="tree"] {
|
|
46
|
+
border-start-end-radius: var(--helix-radii-none);
|
|
47
|
+
border-start-start-radius: var(--helix-radii-none);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host([windowed]) [part="tree"] {
|
|
51
|
+
block-size: var(--object-inspector-block-size, 24em);
|
|
52
|
+
overflow-y: auto;
|
|
53
|
+
overscroll-behavior: contain;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[part="tree"]:focus-visible {
|
|
57
|
+
outline: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
[part="row"] {
|
|
61
|
+
cursor: default;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
padding-inline-end: var(--helix-space-2xl);
|
|
64
|
+
padding-inline-start: calc(
|
|
65
|
+
var(--object-inspector-level) *
|
|
66
|
+
var(--helix-space-lg) +
|
|
67
|
+
var(--helix-space-sm) +
|
|
68
|
+
1em +
|
|
69
|
+
var(--helix-space-2xs)
|
|
70
|
+
);
|
|
71
|
+
text-overflow: ellipsis;
|
|
72
|
+
white-space: nowrap;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
[part="row"][aria-expanded] {
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
padding-inline-start: calc(
|
|
78
|
+
var(--object-inspector-level) *
|
|
79
|
+
var(--helix-space-lg) +
|
|
80
|
+
var(--helix-space-sm)
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[part="tree"]:focus [part="row"][data-active] {
|
|
85
|
+
background-color: var(--helix-color-surface-sunken);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[part="tree"]:focus-visible [part="row"][data-active] {
|
|
89
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
90
|
+
outline-offset: calc(var(--helix-size-focus-offset) * -1);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
[part="toggle"] {
|
|
94
|
+
block-size: 1em;
|
|
95
|
+
color: var(--helix-color-foreground-muted);
|
|
96
|
+
inline-size: 1em;
|
|
97
|
+
margin-inline-end: var(--helix-space-2xs);
|
|
98
|
+
vertical-align: -0.125em;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:host(:dir(rtl)) [part="row"][aria-expanded="false"] > [part="toggle"] {
|
|
102
|
+
scale: -1 1;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
[part="key"] {
|
|
106
|
+
color: var(--helix-color-syntax-name);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[part="string"] {
|
|
110
|
+
color: var(--helix-color-syntax-string);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
[part="number"] {
|
|
114
|
+
color: var(--helix-color-syntax-constant);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
[part="boolean"],
|
|
118
|
+
[part="null"] {
|
|
119
|
+
color: var(--helix-color-syntax-keyword);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
[part="summary"],
|
|
123
|
+
[part="count"] {
|
|
124
|
+
color: var(--helix-color-foreground-muted);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
[part="count"] {
|
|
128
|
+
font-family: var(--helix-font-sans);
|
|
129
|
+
font-size: var(--helix-text-xs);
|
|
130
|
+
margin-inline-start: var(--helix-space-xs);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
[part="copy"] {
|
|
134
|
+
inset-block-start: var(--helix-space-2xs);
|
|
135
|
+
inset-inline-end: var(--helix-space-2xs);
|
|
136
|
+
position: absolute;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@media print {
|
|
140
|
+
[part="tree"] {
|
|
141
|
+
block-size: auto;
|
|
142
|
+
overflow: visible;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
[part="copy"] {
|
|
146
|
+
display: none;
|
|
147
|
+
}
|
|
148
|
+
}`);
|