@softistx/material 3.249.0 → 3.250.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/CHANGELOG.md +10 -0
- package/README.md +2 -2
- package/dist/capture-toolbar.css +1 -1
- package/dist/{components-BbAylWQW.js → components-DUvKQIBi.js} +3 -1
- package/dist/components.js +1 -1
- package/dist/embed-chunks/{dist-C-lAK_LC.js → dist-BVPJSDov.js} +1 -1
- package/dist/embed-chunks/{emoji-picker-BWDQFdQu.js → emoji-picker-CrIXB9pF.js} +22 -22
- package/dist/embed-chunks/{mention-list-CdUr0h3X.js → mention-list-9hwOYNND.js} +1 -1
- package/dist/embed-chunks/{nxgt-theme-provider-DdDsiEPj.js → nxgt-theme-provider-Cjl7Eb8v.js} +703 -592
- package/dist/embed-chunks/switch-control-BrwJRN_V.js +207 -0
- package/dist/embed-chunks/{tabs-root-MF9lEHbq.js → tabs-root-BvPc1aaV.js} +5 -5
- package/dist/embed-chunks/{useLatest-RGIW0nya.js → useLatest-CbcU5ozz.js} +322 -322
- package/dist/embed.css +2 -2
- package/dist/embed.js +1266 -740
- package/dist/image-editor.css +1 -1
- package/dist/image-editor.js +902 -1017
- package/dist/lib/components/ui/layout/account-frame/account-frame.d.ts +2 -2
- package/dist/lib/embed/index.d.ts +4 -1
- package/dist/main.js +1 -1
- package/docs/components/navigation-and-layout.md +2 -2
- package/docs/guides/embed.md +44 -0
- package/package.json +1 -1
- package/dist/embed-chunks/bubble-input-yXAeW84_.js +0 -29
- package/dist/embed-chunks/switch-control-B95ZWvna.js +0 -181
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { b as e, c as t, f as n, m as r, p as i, u as a } from "./use-shape-morph-D1MOoQ4T.js";
|
|
2
|
+
import { n as o } from "./is-production-Cx8oURag.js";
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
import { Suspense as c, use as l } from "react";
|
|
5
|
+
import { browser as u } from "react-dom";
|
|
6
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
+
//#region ../../node_modules/@radix-ui/react-switch/dist/index.mjs
|
|
8
|
+
var m = Object.defineProperty, h = (e, t) => m(e, "name", {
|
|
9
|
+
value: t,
|
|
10
|
+
configurable: !0
|
|
11
|
+
}), g = "Switch", [_, v] = i(g), [y, b] = _(g);
|
|
12
|
+
function x(e) {
|
|
13
|
+
let { __scopeSwitch: t, checked: n, children: r, defaultChecked: i, disabled: o, form: c, name: l, onCheckedChange: u, required: d, value: p = "on", internal_do_not_use_render: m } = e, [h, _] = a({
|
|
14
|
+
prop: n,
|
|
15
|
+
defaultProp: i ?? !1,
|
|
16
|
+
onChange: u,
|
|
17
|
+
caller: g
|
|
18
|
+
}), [v, b] = s.useState(null), [x, S] = s.useState(null), C = s.useRef(!1), [w, T] = s.useReducer((e) => e + 1, 0), E = {
|
|
19
|
+
checked: h,
|
|
20
|
+
setChecked: _,
|
|
21
|
+
disabled: o,
|
|
22
|
+
control: v,
|
|
23
|
+
setControl: b,
|
|
24
|
+
name: l,
|
|
25
|
+
form: c,
|
|
26
|
+
value: p,
|
|
27
|
+
hasConsumerStoppedPropagationRef: C,
|
|
28
|
+
userInteractionCount: w,
|
|
29
|
+
onUserInteraction: T,
|
|
30
|
+
required: d,
|
|
31
|
+
defaultChecked: i,
|
|
32
|
+
isFormControl: !v || !!c || !!v.closest("form"),
|
|
33
|
+
bubbleInput: x,
|
|
34
|
+
setBubbleInput: S
|
|
35
|
+
};
|
|
36
|
+
return /* @__PURE__ */ f(y, {
|
|
37
|
+
scope: t,
|
|
38
|
+
...E,
|
|
39
|
+
children: O(m) ? m(E) : r
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
h(x, "SwitchProvider");
|
|
43
|
+
var S = "SwitchTrigger", C = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ h(function({ __scopeSwitch: t, onClick: i, ...a }, o) {
|
|
44
|
+
let { control: c, form: l, value: u, disabled: d, checked: p, required: m, setControl: g, setChecked: _, hasConsumerStoppedPropagationRef: v, onUserInteraction: y, isFormControl: x, bubbleInput: C } = b(S, t), w = e(o, g), T = s.useRef(p);
|
|
45
|
+
return s.useEffect(() => {
|
|
46
|
+
let e = l ? c?.ownerDocument.getElementById(l) : c?.form;
|
|
47
|
+
if (e instanceof HTMLFormElement) {
|
|
48
|
+
let t = /* @__PURE__ */ h(() => _(T.current), "reset");
|
|
49
|
+
return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
|
|
50
|
+
}
|
|
51
|
+
}, [
|
|
52
|
+
c,
|
|
53
|
+
l,
|
|
54
|
+
_
|
|
55
|
+
]), /* @__PURE__ */ f(r.button, {
|
|
56
|
+
type: "button",
|
|
57
|
+
role: "switch",
|
|
58
|
+
"aria-checked": p,
|
|
59
|
+
"aria-required": m,
|
|
60
|
+
"data-state": k(p),
|
|
61
|
+
"data-disabled": d ? "" : void 0,
|
|
62
|
+
disabled: d,
|
|
63
|
+
value: u,
|
|
64
|
+
...a,
|
|
65
|
+
ref: w,
|
|
66
|
+
onClick: n(i, (e) => {
|
|
67
|
+
y(), _((e) => !e), C && x && (v.current = e.isPropagationStopped(), v.current || e.stopPropagation());
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
}, "SwitchTrigger")), w = "SwitchThumb", T = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ h(function(e, t) {
|
|
71
|
+
let { __scopeSwitch: n, ...i } = e, a = b(w, n);
|
|
72
|
+
return /* @__PURE__ */ f(r.span, {
|
|
73
|
+
"data-state": k(a.checked),
|
|
74
|
+
"data-disabled": a.disabled ? "" : void 0,
|
|
75
|
+
...i,
|
|
76
|
+
ref: t
|
|
77
|
+
});
|
|
78
|
+
}, "SwitchThumb")), E = "SwitchBubbleInput", D = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ h(function({ __scopeSwitch: i, onClick: a, ...o }, c) {
|
|
79
|
+
let { control: l, hasConsumerStoppedPropagationRef: u, userInteractionCount: d, checked: p, defaultChecked: m, required: h, disabled: g, name: _, value: v, form: y, bubbleInput: x, setBubbleInput: S } = b(E, i), C = e(c, S), w = t(l), T = s.useRef(!1), D = s.useRef(p), O = s.useRef(d);
|
|
80
|
+
s.useEffect(() => {
|
|
81
|
+
let e = x;
|
|
82
|
+
if (!e) return;
|
|
83
|
+
let t = window.HTMLInputElement.prototype, n = Object.getOwnPropertyDescriptor(t, "checked").set, r = d !== O.current;
|
|
84
|
+
O.current = d;
|
|
85
|
+
let i = D.current !== p;
|
|
86
|
+
D.current = p;
|
|
87
|
+
let a = !(r && u.current);
|
|
88
|
+
if (i && n) {
|
|
89
|
+
T.current = !r;
|
|
90
|
+
let t = new Event("click", { bubbles: a });
|
|
91
|
+
n.call(e, p), e.dispatchEvent(t), T.current = !1;
|
|
92
|
+
}
|
|
93
|
+
}, [
|
|
94
|
+
x,
|
|
95
|
+
p,
|
|
96
|
+
u,
|
|
97
|
+
d
|
|
98
|
+
]);
|
|
99
|
+
let k = s.useRef(p);
|
|
100
|
+
return /* @__PURE__ */ f(r.input, {
|
|
101
|
+
type: "checkbox",
|
|
102
|
+
"aria-hidden": !0,
|
|
103
|
+
defaultChecked: m ?? k.current,
|
|
104
|
+
required: h,
|
|
105
|
+
disabled: g,
|
|
106
|
+
name: _,
|
|
107
|
+
value: v,
|
|
108
|
+
form: y,
|
|
109
|
+
...o,
|
|
110
|
+
tabIndex: -1,
|
|
111
|
+
ref: C,
|
|
112
|
+
onClick: n(a, (e) => {
|
|
113
|
+
T.current && e.stopPropagation();
|
|
114
|
+
}),
|
|
115
|
+
style: {
|
|
116
|
+
...o.style,
|
|
117
|
+
...w,
|
|
118
|
+
position: "absolute",
|
|
119
|
+
pointerEvents: "none",
|
|
120
|
+
opacity: 0,
|
|
121
|
+
margin: 0,
|
|
122
|
+
transform: "translateX(-100%)"
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}, "SwitchBubbleInput"));
|
|
126
|
+
function O(e) {
|
|
127
|
+
return typeof e == "function";
|
|
128
|
+
}
|
|
129
|
+
h(O, "isFunction");
|
|
130
|
+
function k(e) {
|
|
131
|
+
return e ? "checked" : "unchecked";
|
|
132
|
+
}
|
|
133
|
+
h(k, "getState");
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region lib/lib/browser-only.tsx
|
|
136
|
+
function A({ reason: e, children: t }) {
|
|
137
|
+
return l(u(e)), t;
|
|
138
|
+
}
|
|
139
|
+
function j({ reason: e, fallback: t = null, children: n }) {
|
|
140
|
+
return /* @__PURE__ */ f(c, {
|
|
141
|
+
fallback: t,
|
|
142
|
+
children: /* @__PURE__ */ f(A, {
|
|
143
|
+
reason: e,
|
|
144
|
+
children: n
|
|
145
|
+
})
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region lib/components/ui/primitives/bubble-input/bubble-input.tsx
|
|
150
|
+
function M({ children: e }) {
|
|
151
|
+
return /* @__PURE__ */ f(j, {
|
|
152
|
+
reason: "Radix's hidden form input carries an inline style",
|
|
153
|
+
children: e
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function N(e, t) {
|
|
157
|
+
return { internal_do_not_use_render: ({ isFormControl: n }) => /* @__PURE__ */ p(d, { children: [e, n ? /* @__PURE__ */ f(M, { children: t }) : null] }) };
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region lib/components/ui/fields/switch/partials/switch-control.tsx
|
|
161
|
+
function P({ className: e, checked: t, defaultChecked: n, required: r, onCheckedChange: i, name: a, form: s, disabled: c, value: l, thumbIcons: u = !1, readOnly: d, ...m }) {
|
|
162
|
+
let h = /* @__PURE__ */ f(C, {
|
|
163
|
+
"data-slot": "switch",
|
|
164
|
+
"data-thumb-icons": u,
|
|
165
|
+
"aria-readonly": d || void 0,
|
|
166
|
+
"data-readonly": d || void 0,
|
|
167
|
+
className: o("nxgt-switch peer nxgt-touch-target inline-flex h-8 w-[3.25rem] shrink-0 items-center rounded-full shadow-xs outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 forced-colors:focus-visible:outline-solid forced-colors:focus-visible:outline-2 forced-colors:focus-visible:outline-offset-2 forced-colors:focus-visible:outline-[Highlight] disabled:cursor-not-allowed disabled:opacity-50 data-readonly:cursor-default", e),
|
|
168
|
+
"data-pw": a ?? "switch",
|
|
169
|
+
...m,
|
|
170
|
+
children: /* @__PURE__ */ p(T, {
|
|
171
|
+
"data-slot": "switch-thumb",
|
|
172
|
+
"data-nxgt-state-layer": "",
|
|
173
|
+
className: "nxgt-switch-thumb pointer-events-none",
|
|
174
|
+
"data-pw": a ? `${a}-thumb` : "switch-thumb",
|
|
175
|
+
children: [u ? /* @__PURE__ */ f("svg", {
|
|
176
|
+
className: "nxgt-switch-icon nxgt-switch-x",
|
|
177
|
+
viewBox: "0 0 24 24",
|
|
178
|
+
"aria-hidden": "true",
|
|
179
|
+
focusable: "false",
|
|
180
|
+
children: /* @__PURE__ */ f("path", { d: "M7 7l10 10M17 7L7 17" })
|
|
181
|
+
}) : null, /* @__PURE__ */ f("svg", {
|
|
182
|
+
className: "nxgt-switch-icon",
|
|
183
|
+
viewBox: "0 0 24 24",
|
|
184
|
+
"aria-hidden": "true",
|
|
185
|
+
focusable: "false",
|
|
186
|
+
children: /* @__PURE__ */ f("path", {
|
|
187
|
+
className: "nxgt-switch-check",
|
|
188
|
+
d: "M5.5 12.5l4.2 4.2L18.5 7.5",
|
|
189
|
+
pathLength: 1
|
|
190
|
+
})
|
|
191
|
+
})]
|
|
192
|
+
})
|
|
193
|
+
});
|
|
194
|
+
return /* @__PURE__ */ f(x, {
|
|
195
|
+
checked: d ? t ?? n ?? !1 : t,
|
|
196
|
+
defaultChecked: d ? void 0 : n,
|
|
197
|
+
required: r,
|
|
198
|
+
onCheckedChange: d ? void 0 : i,
|
|
199
|
+
name: a,
|
|
200
|
+
form: s,
|
|
201
|
+
disabled: c,
|
|
202
|
+
value: l,
|
|
203
|
+
...N(h, /* @__PURE__ */ f(D, {}))
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
//#endregion
|
|
207
|
+
export { N as n, j as r, P as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as e, b as t, f as n, g as r, i, m as a, p as o, s, u as c, v as l } from "./use-shape-morph-D1MOoQ4T.js";
|
|
2
|
-
import { A as u, D as d, E as f, F as p, H as m, I as h, L as g, M as _, N as ee, O as te, P as ne, R as re, U as v, V as ie,
|
|
2
|
+
import { A as u, D as d, E as f, F as p, H as m, I as h, L as g, M as _, N as ee, O as te, P as ne, R as re, U as v, V as ie, j as ae, k as oe, o as se, z as ce } from "./useLatest-CbcU5ozz.js";
|
|
3
3
|
import { n as y } from "./is-production-Cx8oURag.js";
|
|
4
4
|
import * as b from "react";
|
|
5
5
|
import { createContext as le, useCallback as ue, useContext as de, useEffect as x, useLayoutEffect as S, useRef as C, useState as w } from "react";
|
|
@@ -34,7 +34,7 @@ var me = Object.defineProperty, O = (e, t) => me(e, "name", {
|
|
|
34
34
|
});
|
|
35
35
|
}, "Popover"), ye = "PopoverAnchor", be = /* @__PURE__ */ b.forwardRef(/* @__PURE__ */ O(function(e, t) {
|
|
36
36
|
let { __scopePopover: n, ...r } = e, i = j(ye, n), a = A(n), { onCustomAnchorAdd: o, onCustomAnchorRemove: s } = i;
|
|
37
|
-
return b.useEffect(() => (o(), () => s()), [o, s]), /* @__PURE__ */ E(
|
|
37
|
+
return b.useEffect(() => (o(), () => s()), [o, s]), /* @__PURE__ */ E(oe, {
|
|
38
38
|
...a,
|
|
39
39
|
...r,
|
|
40
40
|
ref: t
|
|
@@ -50,7 +50,7 @@ var me = Object.defineProperty, O = (e, t) => me(e, "name", {
|
|
|
50
50
|
ref: l,
|
|
51
51
|
onClick: n(e.onClick, s.onOpenToggle)
|
|
52
52
|
});
|
|
53
|
-
return s.hasCustomAnchor ? u : /* @__PURE__ */ E(
|
|
53
|
+
return s.hasCustomAnchor ? u : /* @__PURE__ */ E(oe, {
|
|
54
54
|
asChild: !0,
|
|
55
55
|
...c,
|
|
56
56
|
children: u
|
|
@@ -137,7 +137,7 @@ var me = Object.defineProperty, O = (e, t) => me(e, "name", {
|
|
|
137
137
|
onFocusOutside: l,
|
|
138
138
|
onDismiss: () => f.onOpenChange(!1),
|
|
139
139
|
deferPointerDownOutside: !0,
|
|
140
|
-
children: /* @__PURE__ */ E(
|
|
140
|
+
children: /* @__PURE__ */ E(ae, {
|
|
141
141
|
"data-state": N(f.open),
|
|
142
142
|
role: "dialog",
|
|
143
143
|
id: f.contentId,
|
|
@@ -335,7 +335,7 @@ function it({ className: e, ...t }) {
|
|
|
335
335
|
return /* @__PURE__ */ E("div", {
|
|
336
336
|
"data-slot": "input-group",
|
|
337
337
|
role: "group",
|
|
338
|
-
className: y(
|
|
338
|
+
className: y(se, "group/input-group relative flex w-full items-center outline-none", "h-11 max-h-full min-w-0 has-[>textarea]:h-auto", "has-[>[data-align=inline-start]]:[&>input]:ps-2", "has-[>[data-align=inline-end]]:[&>input]:pe-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", e),
|
|
339
339
|
...t
|
|
340
340
|
});
|
|
341
341
|
}
|