@mt-gloss/ui 0.1.82 → 0.1.84
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/{BaseAsyncButton-BE4m1Eff.js → BaseAsyncButton-Cq_l7clO.js} +25 -25
- package/{COMMITS-BcbOliuF.js → COMMITS-or4m2o8k.js} +10 -14
- package/{Expandable-8IsJX0iR.js → Expandable-C5vX1uaQ.js} +1237 -1235
- package/{UIContext-C7m-9sGv.js → UIContext-DP6JGCto.js} +69 -69
- package/catalog.js +53 -53
- package/composites-panels.js +79 -10
- package/index.js +5 -5
- package/internals.js +3 -3
- package/lib/composites/panels/PanelHostShell.d.ts +1 -0
- package/lib/composites/panels/PanelSlot.d.ts +7 -0
- package/lib/composites/panels/index.d.ts +3 -0
- package/lib/primitives/dashboard/MetricCard/CardShell.d.ts +1 -1
- package/lib/primitives/dashboard/MetricCard/types/cardShellProps.d.ts +8 -0
- package/package.json +1 -1
- package/ui.css +1 -1
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import { jsx as o, jsxs as m } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import b, { useEffect as
|
|
4
|
-
const N = function(
|
|
5
|
-
const { as: e, htmlFor: s, className:
|
|
2
|
+
import { g as p, d as B, al as g, i as _ } from "./UIContext-DP6JGCto.js";
|
|
3
|
+
import b, { useEffect as f } from "react";
|
|
4
|
+
const N = function(l) {
|
|
5
|
+
const { as: e, htmlFor: s, className: t, ...n } = l;
|
|
6
6
|
return /* @__PURE__ */ o(
|
|
7
7
|
p,
|
|
8
8
|
{
|
|
9
9
|
as: e || "label",
|
|
10
10
|
htmlFor: s,
|
|
11
|
-
className:
|
|
11
|
+
className: t ? `gloss-base-label ${t}` : "gloss-base-label",
|
|
12
12
|
...n
|
|
13
13
|
}
|
|
14
14
|
);
|
|
15
15
|
};
|
|
16
16
|
N.displayName = "BaseLabel";
|
|
17
|
-
const h = function(
|
|
18
|
-
const { as: e, className: s, ...
|
|
17
|
+
const h = function(l) {
|
|
18
|
+
const { as: e, className: s, ...t } = l;
|
|
19
19
|
return /* @__PURE__ */ o(
|
|
20
20
|
p,
|
|
21
21
|
{
|
|
22
22
|
as: e || "span",
|
|
23
23
|
"data-role": "value",
|
|
24
24
|
className: s ? `gloss-base-value ${s}` : "gloss-base-value",
|
|
25
|
-
...
|
|
25
|
+
...t
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
28
|
};
|
|
29
29
|
h.displayName = "BaseValue";
|
|
30
30
|
function v({
|
|
31
31
|
definition: a,
|
|
32
|
-
open:
|
|
32
|
+
open: l,
|
|
33
33
|
onDismiss: e,
|
|
34
34
|
className: s,
|
|
35
|
-
style:
|
|
35
|
+
style: t,
|
|
36
36
|
children: n
|
|
37
37
|
}) {
|
|
38
38
|
const c = a?.position ?? "top-right", r = a?.duration ?? 0;
|
|
39
|
-
|
|
40
|
-
if (!
|
|
39
|
+
f(() => {
|
|
40
|
+
if (!l || r <= 0 || !e) return;
|
|
41
41
|
const y = setTimeout(() => {
|
|
42
42
|
e();
|
|
43
43
|
}, r);
|
|
44
44
|
return () => clearTimeout(y);
|
|
45
|
-
}, [
|
|
45
|
+
}, [l, r, e]);
|
|
46
46
|
const i = {
|
|
47
47
|
portal: !0,
|
|
48
48
|
dismissOnClickOutside: !1,
|
|
@@ -57,13 +57,13 @@ function v({
|
|
|
57
57
|
B,
|
|
58
58
|
{
|
|
59
59
|
definition: i,
|
|
60
|
-
open:
|
|
60
|
+
open: l,
|
|
61
61
|
onDismiss: e,
|
|
62
62
|
children: /* @__PURE__ */ o(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
65
|
className: u.join(" "),
|
|
66
|
-
style:
|
|
66
|
+
style: t,
|
|
67
67
|
role: "status",
|
|
68
68
|
"aria-live": "polite",
|
|
69
69
|
children: n
|
|
@@ -82,11 +82,11 @@ const A = {
|
|
|
82
82
|
iconColor: "--_icon-color"
|
|
83
83
|
};
|
|
84
84
|
function C(a) {
|
|
85
|
-
const { definition:
|
|
85
|
+
const { definition: l, className: e, style: s, role: t, children: n, ...c } = a, { style: r, dataAttrs: i } = g(l, A);
|
|
86
86
|
return /* @__PURE__ */ o(
|
|
87
87
|
"div",
|
|
88
88
|
{
|
|
89
|
-
role:
|
|
89
|
+
role: t || "alert",
|
|
90
90
|
className: e ? `gloss-base-alert ${e}` : "gloss-base-alert",
|
|
91
91
|
style: { ...r, ...s },
|
|
92
92
|
...i,
|
|
@@ -102,8 +102,8 @@ const S = {
|
|
|
102
102
|
fontSize: "--_font-size"
|
|
103
103
|
};
|
|
104
104
|
function $(a) {
|
|
105
|
-
const { definition:
|
|
106
|
-
|
|
105
|
+
const { definition: l, separator: e = "/", className: s, style: t, children: n } = a, { style: c } = g(
|
|
106
|
+
l,
|
|
107
107
|
S
|
|
108
108
|
), r = b.Children.toArray(n);
|
|
109
109
|
return /* @__PURE__ */ o(
|
|
@@ -111,7 +111,7 @@ function $(a) {
|
|
|
111
111
|
{
|
|
112
112
|
"aria-label": "Breadcrumb",
|
|
113
113
|
className: s ? `gloss-base-breadcrumbs-nav ${s}` : "gloss-base-breadcrumbs-nav",
|
|
114
|
-
style: { ...c, ...
|
|
114
|
+
style: { ...c, ...t },
|
|
115
115
|
children: /* @__PURE__ */ o("ol", { className: "gloss-base-breadcrumbs", children: r.map((i, d) => {
|
|
116
116
|
const u = d === r.length - 1;
|
|
117
117
|
return /* @__PURE__ */ m(b.Fragment, { children: [
|
|
@@ -132,10 +132,10 @@ function $(a) {
|
|
|
132
132
|
$.displayName = "BaseBreadcrumbs";
|
|
133
133
|
function T(a) {
|
|
134
134
|
const {
|
|
135
|
-
as:
|
|
135
|
+
as: l,
|
|
136
136
|
definition: e,
|
|
137
137
|
loading: s = !1,
|
|
138
|
-
disabled:
|
|
138
|
+
disabled: t = !1,
|
|
139
139
|
className: n,
|
|
140
140
|
style: c,
|
|
141
141
|
children: r,
|
|
@@ -145,11 +145,11 @@ function T(a) {
|
|
|
145
145
|
n
|
|
146
146
|
].filter(Boolean).join(" ");
|
|
147
147
|
return /* @__PURE__ */ m(
|
|
148
|
-
|
|
148
|
+
_,
|
|
149
149
|
{
|
|
150
|
-
as:
|
|
150
|
+
as: l,
|
|
151
151
|
definition: e,
|
|
152
|
-
disabled:
|
|
152
|
+
disabled: t || s,
|
|
153
153
|
loading: s,
|
|
154
154
|
className: d,
|
|
155
155
|
style: c,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as a, jsxs as u, Fragment as
|
|
1
|
+
import { jsx as a, jsxs as u, Fragment as I } from "react/jsx-runtime";
|
|
2
2
|
import { createContext as h, useContext as p, useReducer as g, useRef as i, useEffect as r, useMemo as f, useCallback as v, useLayoutEffect as C } from "react";
|
|
3
3
|
const c = h(null);
|
|
4
4
|
function m() {
|
|
@@ -54,7 +54,7 @@ function _(e, n) {
|
|
|
54
54
|
function y(e) {
|
|
55
55
|
return e.activePanelId === "notification-center" ? "notif-center" : (e.activePanelId != null, "idle");
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function N() {
|
|
58
58
|
const [e, n] = g(_, S), t = i([]);
|
|
59
59
|
i(null), r(() => {
|
|
60
60
|
if (e.pendingSideEffects.length !== 0) {
|
|
@@ -83,7 +83,7 @@ function x() {
|
|
|
83
83
|
return { state: e, surfaceState: l, dispatch: n, getCloseLog: s };
|
|
84
84
|
}
|
|
85
85
|
function k({ children: e }) {
|
|
86
|
-
const n =
|
|
86
|
+
const n = N(), t = f(
|
|
87
87
|
() => n,
|
|
88
88
|
// Re-publish only when one of the four coordinator fields changes identity.
|
|
89
89
|
// dispatch + getCloseLog are stable. state + surfaceState change on dispatch.
|
|
@@ -91,12 +91,8 @@ function k({ children: e }) {
|
|
|
91
91
|
);
|
|
92
92
|
return /* @__PURE__ */ a(c.Provider, { value: t, children: e });
|
|
93
93
|
}
|
|
94
|
-
const
|
|
95
|
-
position: "
|
|
96
|
-
top: "100%",
|
|
97
|
-
left: 0,
|
|
98
|
-
right: 0,
|
|
99
|
-
zIndex: 2,
|
|
94
|
+
const x = {
|
|
95
|
+
position: "relative",
|
|
100
96
|
pointerEvents: "auto"
|
|
101
97
|
};
|
|
102
98
|
function L({ children: e, onClose: n, isOpen: t = !0 }) {
|
|
@@ -108,7 +104,7 @@ function L({ children: e, onClose: n, isOpen: t = !0 }) {
|
|
|
108
104
|
role: "dialog",
|
|
109
105
|
"aria-modal": "true",
|
|
110
106
|
className: "gloss-panel-chrome",
|
|
111
|
-
style:
|
|
107
|
+
style: x,
|
|
112
108
|
children: [
|
|
113
109
|
/* @__PURE__ */ a("div", { className: "gloss-panel-chrome__header", children: /* @__PURE__ */ a(
|
|
114
110
|
"button",
|
|
@@ -154,8 +150,8 @@ function H({ panelComponents: e }) {
|
|
|
154
150
|
n.activePanelId
|
|
155
151
|
), r(() => {
|
|
156
152
|
if (n.activePanelId == null) return;
|
|
157
|
-
function d(
|
|
158
|
-
|
|
153
|
+
function d(P) {
|
|
154
|
+
P.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
|
|
159
155
|
}
|
|
160
156
|
return document.addEventListener("keydown", d), () => {
|
|
161
157
|
document.removeEventListener("keydown", d);
|
|
@@ -177,7 +173,7 @@ function H({ panelComponents: e }) {
|
|
|
177
173
|
const E = v(() => {
|
|
178
174
|
t({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
|
|
179
175
|
}, [t]);
|
|
180
|
-
return /* @__PURE__ */ a("div", { "data-panel-host": "true", style: b, children: n.activePanelId != null && s != null && /* @__PURE__ */ u(
|
|
176
|
+
return /* @__PURE__ */ a("div", { "data-panel-host": "true", style: b, children: n.activePanelId != null && s != null && /* @__PURE__ */ u(I, { children: [
|
|
181
177
|
/* @__PURE__ */ a(
|
|
182
178
|
"div",
|
|
183
179
|
{
|
|
@@ -215,7 +211,7 @@ export {
|
|
|
215
211
|
O as a,
|
|
216
212
|
H as b,
|
|
217
213
|
L as c,
|
|
218
|
-
|
|
214
|
+
N as d,
|
|
219
215
|
y as e,
|
|
220
216
|
S as i,
|
|
221
217
|
_ as r,
|