@fusion.dev/helix 0.23.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 +63152 -38228
- 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/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 +8 -2
- package/dist/menu/root/menu-root.css.js +4 -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/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 +4790 -698
- package/types/svelte.d.ts +11 -0
- package/types/vue.d.ts +907 -51
|
@@ -21,7 +21,8 @@ grid-template-columns:
|
|
|
21
21
|
var(--menu-item-start, 0px)
|
|
22
22
|
minmax(0, 1fr)
|
|
23
23
|
var(--menu-item-end, 0px);
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
min-block-size: var(--helix-size-control);
|
|
25
26
|
|
|
26
27
|
padding-inline: var(--helix-space-sm);
|
|
27
28
|
transition: background-color var(--helix-duration-fast) var(--helix-easing-standard);
|
|
@@ -46,7 +47,8 @@ opacity: 0.5;
|
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
[part="start"] {
|
|
49
|
-
|
|
50
|
+
|
|
51
|
+
--icon-size: var(--helix-size-icon);
|
|
50
52
|
|
|
51
53
|
align-items: center;
|
|
52
54
|
|
|
@@ -96,6 +98,10 @@ slot[name="submenu"] {
|
|
|
96
98
|
display: contents;
|
|
97
99
|
}
|
|
98
100
|
|
|
101
|
+
slot[name="submenu"]::slotted(helix-divider) {
|
|
102
|
+
margin-block: var(--helix-space-2xs);
|
|
103
|
+
}
|
|
104
|
+
|
|
99
105
|
:host(:dir(rtl)) [part="mark"][data-submenu] {
|
|
100
106
|
scale: -1 1;
|
|
101
107
|
}`);
|
|
@@ -7,7 +7,11 @@ 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);
|
|
11
15
|
|
|
12
16
|
--menu-item-start: 0px;
|
|
13
17
|
--menu-item-end: 0px;
|
|
@@ -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
|
+
}`);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { HelixHeadlessObjectInspector } from '@fusion.dev/helix-headless/object-inspector';
|
|
2
|
+
import type { CSSResultGroup } from 'lit';
|
|
3
|
+
import '../../copy-button/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* @summary A value read as a tree: collapse what you do not need, count what
|
|
6
|
+
* you collapsed, copy the part you do.
|
|
7
|
+
*
|
|
8
|
+
* @description
|
|
9
|
+
* Code Block's frame around a tree of entries. Each type takes its ink from the
|
|
10
|
+
* syntax set the code blocks already use, a key in one, a string in another and
|
|
11
|
+
* a number, a boolean and a null in theirs, and each row is one line with a long
|
|
12
|
+
* string ending in an ellipsis, so every row is one height and a windowed tree
|
|
13
|
+
* never has to measure them one by one.
|
|
14
|
+
*
|
|
15
|
+
* @since 0.1.0
|
|
16
|
+
* @status experimental
|
|
17
|
+
* @category data
|
|
18
|
+
* @aliases JSON viewer, Object viewer, Inspector, Data explorer
|
|
19
|
+
* @documentation https://helix.fusion.dev/components/object-inspector
|
|
20
|
+
*
|
|
21
|
+
* @cssproperty --object-inspector-background-color - Ground under the tree.
|
|
22
|
+
* @cssproperty --object-inspector-block-size - Height of the scrolling box, when windowed.
|
|
23
|
+
* @cssproperty --object-inspector-border-color - The edge around the tree and its header.
|
|
24
|
+
* @cssproperty --object-inspector-header-background-color - The bar carrying the label.
|
|
25
|
+
* @cssproperty --object-inspector-radius - Corner radius of the tree.
|
|
26
|
+
*/
|
|
27
|
+
export declare class HelixObjectInspector extends HelixHeadlessObjectInspector {
|
|
28
|
+
static tier: string;
|
|
29
|
+
static styles: CSSResultGroup;
|
|
30
|
+
}
|
|
31
|
+
declare global {
|
|
32
|
+
interface HTMLElementTagNameMap {
|
|
33
|
+
'helix-object-inspector': HelixObjectInspector;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 { HelixHeadlessObjectInspector } from '@fusion.dev/helix-headless/object-inspector';
|
|
9
|
+
import { styles } from './object-inspector-root.css.js';
|
|
10
|
+
import '../../copy-button/index.js';
|
|
11
|
+
let HelixObjectInspector = class HelixObjectInspector extends HelixHeadlessObjectInspector {
|
|
12
|
+
static { this.tier = 'helix-'; }
|
|
13
|
+
static { this.styles = styles; }
|
|
14
|
+
};
|
|
15
|
+
HelixObjectInspector = __decorate([
|
|
16
|
+
customElement('helix-object-inspector')
|
|
17
|
+
], HelixObjectInspector);
|
|
18
|
+
export { HelixObjectInspector };
|
|
@@ -32,8 +32,12 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
|
32
32
|
* @slot status - A status bar, spanning both panes at the bottom.
|
|
33
33
|
* @slot toolbar - A bar across the top, spanning both panes.
|
|
34
34
|
*
|
|
35
|
+
* @event {HelixBeforeEditEvent} helix-before-edit - Fired before the source is edited, by the source pane and heard here. Cancelable: refusing it takes the decision and nothing moves.
|
|
35
36
|
* @event {HelixBeforePanelResizeEvent} helix-before-panel-resize - Fired before the panel's divider is let go, with its height in pixels. Cancelable: refusing it takes the decision and nothing moves.
|
|
36
37
|
* @event {HelixBeforeSplitEvent} helix-before-split - Fired before the panes' divider is let go, with the lead pane's share. Cancelable: refusing it takes the decision and nothing moves.
|
|
38
|
+
* @event {HelixCaretEvent} helix-caret - Fired when the cursor moves in the source, by the source pane and heard here.
|
|
39
|
+
* @event {HelixConsoleEvent} helix-console - Relayed from the frame by the preview pane, one per console call.
|
|
40
|
+
* @event {HelixResizeEvent} helix-resize - How tall the frame's content is, from the preview pane, whenever it changes.
|
|
37
41
|
*
|
|
38
42
|
* @csspart body - The splitter holding the panes above the panel.
|
|
39
43
|
* @csspart corner - The handle where the two dividers cross.
|