@xenosystem/elements-react 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -41
- package/dist/containers/Avatar.d.ts +8 -1
- package/dist/containers/Avatar.js +3 -3
- package/dist/containers/BulkActionBar.d.ts +20 -0
- package/dist/containers/BulkActionBar.js +8 -0
- package/dist/containers/DataTable.d.ts +50 -6
- package/dist/containers/DataTable.js +185 -11
- package/dist/containers/Table.d.ts +2 -2
- package/dist/containers/Table.js +4 -3
- package/dist/content/Kbd.d.ts +16 -0
- package/dist/content/Kbd.js +8 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.js +12 -1
- package/dist/nav/Breadcrumb.d.ts +22 -0
- package/dist/nav/Breadcrumb.js +10 -0
- package/dist/overlays/CommandPalette.d.ts +43 -0
- package/dist/overlays/CommandPalette.js +96 -0
- package/dist/overlays/Popover.d.ts +27 -12
- package/dist/overlays/Popover.js +101 -7
- package/dist/overlays/ShortcutsSheet.d.ts +21 -0
- package/dist/overlays/ShortcutsSheet.js +7 -0
- package/dist/overlays/Tooltip.d.ts +21 -10
- package/dist/overlays/Tooltip.js +93 -9
- package/dist/shortcuts.d.ts +45 -0
- package/dist/shortcuts.js +164 -0
- package/dist/status/Banner.d.ts +23 -0
- package/dist/status/Banner.js +8 -0
- package/dist/status/Toast.d.ts +28 -0
- package/dist/status/Toast.js +11 -0
- package/dist/uiTree.d.ts +53 -0
- package/dist/uiTree.js +197 -0
- package/dist/useDialog.d.ts +3 -1
- package/dist/useDialog.js +37 -1
- package/dist/useMenu.js +31 -1
- package/dist/useToastQueue.d.ts +29 -0
- package/dist/useToastQueue.js +73 -0
- package/package.json +10 -4
- package/src/chrome-separated.css +133 -72
- package/src/chrome-unified.css +48 -16
- package/src/containers/Badges.css +52 -28
- package/src/containers/avatar.css +7 -2
- package/src/containers/bulk-action-bar.css +45 -0
- package/src/containers/card.css +14 -13
- package/src/containers/chip.css +1 -1
- package/src/containers/panel.css +16 -53
- package/src/containers/table.css +107 -1
- package/src/content/kbd.css +33 -0
- package/src/content/model-picker.css +2 -1
- package/src/controls.css +25 -11
- package/src/fonts.css +8 -2
- package/src/forced-colors.css +41 -0
- package/src/layout-platform.css +473 -0
- package/src/mcp-app-platform.css +1019 -0
- package/src/nav/breadcrumb.css +84 -0
- package/src/overlays/command-palette.css +157 -0
- package/src/overlays/menu.css +25 -16
- package/src/overlays/modal.css +9 -27
- package/src/overlays/onboarding.css +1305 -0
- package/src/overlays/segmented-control.css +6 -3
- package/src/overlays/shortcuts-sheet.css +55 -0
- package/src/overlays/tooltip.css +22 -4
- package/src/size.css +40 -0
- package/src/status/banner.css +83 -0
- package/src/status/toast.css +95 -0
- package/src/xeno-elements.css +63 -44
- package/src/xeno-theme.css +75 -31
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
.xeno-breadcrumb {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
min-width: 0;
|
|
5
|
+
font-family: var(--xeno-font-sans);
|
|
6
|
+
font-size: 13px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.xeno-breadcrumb-list {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: 2px;
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 0;
|
|
15
|
+
list-style: none;
|
|
16
|
+
min-width: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.xeno-breadcrumb-item {
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: 2px;
|
|
23
|
+
min-width: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.xeno-breadcrumb-sep {
|
|
27
|
+
color: var(--xeno-muted);
|
|
28
|
+
padding: 0 3px;
|
|
29
|
+
user-select: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.xeno-breadcrumb-btn,
|
|
33
|
+
.xeno-breadcrumb-link,
|
|
34
|
+
.xeno-breadcrumb-text {
|
|
35
|
+
display: inline-flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: 6px;
|
|
38
|
+
height: 28px;
|
|
39
|
+
padding: 0 7px;
|
|
40
|
+
border: 0;
|
|
41
|
+
border-radius: var(--xeno-chrome-btn-radius, var(--xeno-radius-sm));
|
|
42
|
+
background: transparent;
|
|
43
|
+
color: var(--xeno-text);
|
|
44
|
+
font-family: inherit;
|
|
45
|
+
font-size: inherit;
|
|
46
|
+
font-weight: 500;
|
|
47
|
+
text-decoration: none;
|
|
48
|
+
white-space: nowrap;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.xeno-breadcrumb-btn,
|
|
52
|
+
.xeno-breadcrumb-link {
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.xeno-breadcrumb-btn:hover,
|
|
57
|
+
.xeno-breadcrumb-link:hover {
|
|
58
|
+
background: var(--xeno-hover);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.xeno-breadcrumb-btn:focus-visible,
|
|
62
|
+
.xeno-breadcrumb-link:focus-visible {
|
|
63
|
+
outline: 2px solid var(--xeno-info);
|
|
64
|
+
outline-offset: 1px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.xeno-breadcrumb-text[aria-current='page'] {
|
|
68
|
+
color: var(--xeno-text);
|
|
69
|
+
font-weight: 600;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.xeno-breadcrumb-tag {
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
height: 15px;
|
|
76
|
+
padding: 0 4px;
|
|
77
|
+
border-radius: 2px;
|
|
78
|
+
background: var(--xeno-control);
|
|
79
|
+
color: var(--xeno-muted-text);
|
|
80
|
+
font-family: var(--xeno-font-mono);
|
|
81
|
+
font-size: 9.5px;
|
|
82
|
+
font-weight: 400;
|
|
83
|
+
line-height: 14px;
|
|
84
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
.xeno-palette-overlay {
|
|
2
|
+
position: fixed;
|
|
3
|
+
inset: 0;
|
|
4
|
+
z-index: 70;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: flex-start;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
padding: 10vh 16px 24px;
|
|
9
|
+
background: color-mix(in srgb, var(--xeno-canvas) 55%, transparent);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.xeno-palette {
|
|
13
|
+
width: min(560px, 100%);
|
|
14
|
+
max-height: 70vh;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
border-radius: var(--xeno-radius-control);
|
|
19
|
+
border: 1px solid var(--xeno-border);
|
|
20
|
+
background: var(--xeno-elevated);
|
|
21
|
+
color: var(--xeno-text);
|
|
22
|
+
box-shadow: var(--xeno-chrome-pop, var(--xeno-pop));
|
|
23
|
+
font-family: var(--xeno-font-sans);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.xeno-palette-head {
|
|
27
|
+
flex: none;
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 10px;
|
|
31
|
+
height: 44px;
|
|
32
|
+
padding: 0 14px;
|
|
33
|
+
border-bottom: 1px solid var(--xeno-border);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.xeno-palette-icon {
|
|
37
|
+
flex: none;
|
|
38
|
+
display: inline-flex;
|
|
39
|
+
color: var(--xeno-muted-text);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.xeno-palette-input {
|
|
43
|
+
flex: 1 1 auto;
|
|
44
|
+
min-width: 0;
|
|
45
|
+
height: 100%;
|
|
46
|
+
border: 0;
|
|
47
|
+
background: transparent;
|
|
48
|
+
color: var(--xeno-text);
|
|
49
|
+
font-family: inherit;
|
|
50
|
+
font-size: 13.5px;
|
|
51
|
+
outline: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.xeno-palette-input::placeholder {
|
|
55
|
+
color: var(--xeno-muted);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.xeno-palette-list {
|
|
59
|
+
flex: 1 1 auto;
|
|
60
|
+
overflow-y: auto;
|
|
61
|
+
padding: 6px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.xeno-palette-group + .xeno-palette-group {
|
|
65
|
+
margin-top: 6px;
|
|
66
|
+
padding-top: 6px;
|
|
67
|
+
border-top: 1px solid var(--xeno-border-subtle);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.xeno-palette-group-label {
|
|
71
|
+
padding: 4px 8px 5px;
|
|
72
|
+
font-size: 11px;
|
|
73
|
+
font-weight: 600;
|
|
74
|
+
letter-spacing: 0.06em;
|
|
75
|
+
text-transform: uppercase;
|
|
76
|
+
color: var(--xeno-muted-text);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.xeno-palette-item {
|
|
80
|
+
width: 100%;
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
gap: 10px;
|
|
84
|
+
min-height: 36px;
|
|
85
|
+
padding: 6px 8px;
|
|
86
|
+
border: 0;
|
|
87
|
+
border-radius: var(--xeno-radius-sm);
|
|
88
|
+
background: transparent;
|
|
89
|
+
color: var(--xeno-text);
|
|
90
|
+
font-family: inherit;
|
|
91
|
+
font-size: 13px;
|
|
92
|
+
text-align: left;
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.xeno-palette-item[data-active='true'],
|
|
97
|
+
.xeno-palette-item:hover:not(:disabled) {
|
|
98
|
+
background: var(--xeno-hover);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.xeno-palette-item:disabled {
|
|
102
|
+
opacity: 0.45;
|
|
103
|
+
cursor: not-allowed;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.xeno-palette-item-copy {
|
|
107
|
+
flex: 1 1 auto;
|
|
108
|
+
min-width: 0;
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: column;
|
|
111
|
+
gap: 1px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.xeno-palette-item-label {
|
|
115
|
+
font-weight: 500;
|
|
116
|
+
white-space: nowrap;
|
|
117
|
+
overflow: hidden;
|
|
118
|
+
text-overflow: ellipsis;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.xeno-palette-item-desc {
|
|
122
|
+
font-size: 11.5px;
|
|
123
|
+
color: var(--xeno-muted-text);
|
|
124
|
+
white-space: nowrap;
|
|
125
|
+
overflow: hidden;
|
|
126
|
+
text-overflow: ellipsis;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.xeno-palette-item-badge {
|
|
130
|
+
flex: none;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.xeno-palette-empty {
|
|
134
|
+
padding: 28px 16px;
|
|
135
|
+
text-align: center;
|
|
136
|
+
color: var(--xeno-muted-text);
|
|
137
|
+
font-size: 12.5px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.xeno-palette-foot {
|
|
141
|
+
flex: none;
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
gap: 14px;
|
|
145
|
+
height: 32px;
|
|
146
|
+
padding: 0 14px;
|
|
147
|
+
border-top: 1px solid var(--xeno-border);
|
|
148
|
+
background: var(--xeno-surface);
|
|
149
|
+
color: var(--xeno-muted-text);
|
|
150
|
+
font-size: 11px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.xeno-palette-hint {
|
|
154
|
+
display: inline-flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
gap: 5px;
|
|
157
|
+
}
|
package/src/overlays/menu.css
CHANGED
|
@@ -21,9 +21,13 @@
|
|
|
21
21
|
background: var(--xeno-elevated);
|
|
22
22
|
border: 1px solid var(--xeno-border);
|
|
23
23
|
border-radius: var(--xeno-radius-md);
|
|
24
|
-
|
|
24
|
+
/* On the chrome axis since 2026-11-22: Industrial takes the references' POP depth; Soft keeps the
|
|
25
|
+
value it always had (the fallback), so its owner's construction does not move. */
|
|
26
|
+
box-shadow: var(
|
|
27
|
+
--xeno-chrome-pop,
|
|
25
28
|
0 12px 32px -12px rgba(0, 0, 0, 0.55),
|
|
26
|
-
0 2px 8px rgba(0, 0, 0, 0.24)
|
|
29
|
+
0 2px 8px rgba(0, 0, 0, 0.24)
|
|
30
|
+
);
|
|
27
31
|
color: var(--xeno-text);
|
|
28
32
|
outline: none;
|
|
29
33
|
}
|
|
@@ -31,13 +35,21 @@
|
|
|
31
35
|
left: auto;
|
|
32
36
|
right: 0;
|
|
33
37
|
}
|
|
38
|
+
.xeno-popover-portal {
|
|
39
|
+
display: contents;
|
|
40
|
+
}
|
|
41
|
+
.xeno-popover-panel--portaled {
|
|
42
|
+
position: fixed;
|
|
43
|
+
z-index: 1000;
|
|
44
|
+
}
|
|
34
45
|
|
|
35
46
|
/* ── Menu (a Popover panel that is a role=menu list) ──────────────────────────────── */
|
|
36
47
|
/* `position: relative` + `isolation` come from `xeno-goo-host`, which the component also puts on this
|
|
37
48
|
element; the 4px padding is what `--xeno-goo-inset` defaults to, so the pill lines up with the rows. */
|
|
38
49
|
.xeno-menu {
|
|
39
|
-
min-width:
|
|
50
|
+
min-width: 192px;
|
|
40
51
|
padding: 4px;
|
|
52
|
+
--xeno-goo-radius: 4px;
|
|
41
53
|
}
|
|
42
54
|
|
|
43
55
|
/* The travelling hover pill is a PRIMITIVE, not a menu feature — see `goo.css` and `useGooPill()`. A
|
|
@@ -50,23 +62,18 @@
|
|
|
50
62
|
.xeno-menu-item {
|
|
51
63
|
display: flex;
|
|
52
64
|
align-items: center;
|
|
53
|
-
gap:
|
|
65
|
+
gap: 8px;
|
|
54
66
|
width: 100%;
|
|
55
|
-
|
|
56
|
-
lg 36 and there is no 34 in it — the number was picked by eye and never checked against the table
|
|
57
|
-
it belongs to. Found by measuring a product's menu rows against this component: the product was on
|
|
58
|
-
the scale and the library was not. */
|
|
59
|
-
height: 32px;
|
|
67
|
+
height: 28px;
|
|
60
68
|
margin: 0;
|
|
61
69
|
padding: 0 8px;
|
|
62
70
|
background: transparent;
|
|
63
71
|
border: none;
|
|
64
|
-
/*
|
|
65
|
-
|
|
66
|
-
border-radius: var(--xeno-radius-md);
|
|
72
|
+
/* Concentric inside a 6px panel with 4px padding: 4px inner corner prevents optical wobble. */
|
|
73
|
+
border-radius: 4px;
|
|
67
74
|
color: var(--xeno-text);
|
|
68
75
|
font-family: inherit;
|
|
69
|
-
font-size:
|
|
76
|
+
font-size: 12.5px;
|
|
70
77
|
line-height: 1;
|
|
71
78
|
text-align: left;
|
|
72
79
|
cursor: pointer;
|
|
@@ -75,14 +82,16 @@
|
|
|
75
82
|
background var(--xeno-dur) ease,
|
|
76
83
|
color var(--xeno-dur) ease;
|
|
77
84
|
}
|
|
78
|
-
/* The row paints no background of its own
|
|
79
|
-
would read as two highlights. */
|
|
85
|
+
/* The row paints no background of its own when goo pill is active, avoiding a double box. */
|
|
80
86
|
.xeno-menu-item:hover:not(:disabled),
|
|
81
87
|
.xeno-menu-item:focus-visible {
|
|
82
88
|
outline: none;
|
|
83
89
|
}
|
|
84
90
|
.xeno-menu-item:focus-visible {
|
|
85
|
-
|
|
91
|
+
background: var(--xeno-hover);
|
|
92
|
+
}
|
|
93
|
+
.xeno-goo-host[data-goo='on'] .xeno-menu-item:focus-visible {
|
|
94
|
+
background: transparent;
|
|
86
95
|
}
|
|
87
96
|
.xeno-menu-item[data-availability='disabled'] {
|
|
88
97
|
opacity: 0.4;
|
package/src/overlays/modal.css
CHANGED
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
.xeno-modal {
|
|
33
33
|
display: flex;
|
|
34
34
|
flex-direction: column;
|
|
35
|
-
gap:
|
|
36
|
-
padding:
|
|
35
|
+
gap: 0;
|
|
36
|
+
padding: 0;
|
|
37
37
|
width: min(92vw, 480px);
|
|
38
38
|
max-height: min(85vh, 640px);
|
|
39
39
|
background: var(--xeno-chrome-shell);
|
|
40
|
-
border: 1px solid var(--xeno-
|
|
41
|
-
border-radius: var(--xeno-chrome-radius);
|
|
40
|
+
border: 1px solid var(--xeno-border);
|
|
41
|
+
border-radius: var(--xeno-chrome-dialog-radius);
|
|
42
42
|
box-shadow: var(--xeno-chrome-shadow);
|
|
43
43
|
outline: none;
|
|
44
44
|
overflow: hidden;
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
max-height: 85vh;
|
|
50
50
|
border-bottom: none;
|
|
51
51
|
/* radius only on the top corners — it meets the bottom edge */
|
|
52
|
-
border-radius: var(--xeno-chrome-radius) var(--xeno-chrome-radius) 0 0;
|
|
52
|
+
border-radius: var(--xeno-chrome-dialog-radius) var(--xeno-chrome-dialog-radius) 0 0;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/* ── Header (title + close) ──────────────────────────────────────────────────────── */
|
|
@@ -60,15 +60,13 @@
|
|
|
60
60
|
gap: 8px;
|
|
61
61
|
padding: var(--xeno-chrome-dialog-header-pad);
|
|
62
62
|
background: var(--xeno-chrome-plate);
|
|
63
|
-
-
|
|
64
|
-
backdrop-filter: var(--xeno-chrome-plate-filter);
|
|
65
|
-
border-bottom: var(--xeno-chrome-divider);
|
|
63
|
+
border-bottom: 1px solid var(--xeno-border);
|
|
66
64
|
}
|
|
67
65
|
.xeno-modal-title {
|
|
68
66
|
min-width: 0;
|
|
69
67
|
margin: 0;
|
|
70
68
|
font-size: var(--xeno-chrome-dialog-title-size);
|
|
71
|
-
font-weight:
|
|
69
|
+
font-weight: 600;
|
|
72
70
|
letter-spacing: 0.03em;
|
|
73
71
|
line-height: 1.3;
|
|
74
72
|
color: var(--xeno-text);
|
|
@@ -100,10 +98,10 @@
|
|
|
100
98
|
display: flex;
|
|
101
99
|
align-items: center;
|
|
102
100
|
justify-content: flex-end;
|
|
103
|
-
gap:
|
|
101
|
+
gap: 8px;
|
|
104
102
|
padding: var(--xeno-chrome-dialog-footer-pad);
|
|
105
103
|
background: var(--xeno-chrome-plate);
|
|
106
|
-
border-top: var(--xeno-
|
|
104
|
+
border-top: 1px solid var(--xeno-border);
|
|
107
105
|
}
|
|
108
106
|
|
|
109
107
|
/* ── Motion (transform/opacity only; opt-in) ─────────────────────────────────────── */
|
|
@@ -146,22 +144,6 @@
|
|
|
146
144
|
}
|
|
147
145
|
}
|
|
148
146
|
|
|
149
|
-
/*
|
|
150
|
-
* §4 "Radius Is Per-Corner, Not Per-Element": a corner is rounded only where the surface meets
|
|
151
|
-
* NOTHING. Each plate faces its neighbour across the 2px gap, so the facing corners are SQUARE — a
|
|
152
|
-
* uniform radius on every plate is the tell that this section was skipped, and it was.
|
|
153
|
-
*
|
|
154
|
-
* Declared on first/last child rather than per plate so a stack with no header, or no footer, still
|
|
155
|
-
* presents a rounded outer edge instead of a square one against the rounded shell.
|
|
156
|
-
*/
|
|
157
147
|
.xeno-modal > * {
|
|
158
148
|
border-radius: 0;
|
|
159
149
|
}
|
|
160
|
-
.xeno-modal > :first-child {
|
|
161
|
-
border-top-left-radius: var(--xeno-chrome-radius-plate);
|
|
162
|
-
border-top-right-radius: var(--xeno-chrome-radius-plate);
|
|
163
|
-
}
|
|
164
|
-
.xeno-modal > :last-child {
|
|
165
|
-
border-bottom-left-radius: var(--xeno-chrome-radius-plate);
|
|
166
|
-
border-bottom-right-radius: var(--xeno-chrome-radius-plate);
|
|
167
|
-
}
|