@xyd-js/framework 0.1.0-xyd.3 → 0.1.0-xyd.31
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/dist/hydration.d.ts +1 -1
- package/dist/hydration.js +64 -122
- package/dist/hydration.js.map +1 -1
- package/dist/index.d.ts +2 -5
- package/dist/index.js +4 -16
- package/dist/index.js.map +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +133 -1450
- package/dist/react.js.map +1 -1
- package/package.json +26 -25
- package/dist/hydration.d.mts +0 -11
- package/dist/hydration.mjs +0 -245
- package/dist/hydration.mjs.map +0 -1
- package/dist/index.d.mts +0 -6
- package/dist/index.mjs +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/react.d.mts +0 -32
- package/dist/react.mjs +0 -1938
- package/dist/react.mjs.map +0 -1
- package/dist/sidebar-Dwf54qYp.d.ts +0 -15
- package/packages/hydration/README.md +0 -3
- package/packages/hydration/index.ts +0 -3
- package/packages/hydration/settings-to-props.ts +0 -325
- package/packages/react/README.md +0 -3
- package/packages/react/components/index.tsx +0 -337
- package/packages/react/components/sidebar/index.ts +0 -3
- package/packages/react/components/sidebar/sidebar-group.tsx +0 -240
- package/packages/react/components/sidebar/sidebar.tsx +0 -127
- package/packages/react/contexts/framework.tsx +0 -78
- package/packages/react/contexts/index.ts +0 -2
- package/packages/react/contexts/ui.tsx +0 -6
- package/packages/react/hooks/index.ts +0 -3
- package/packages/react/hooks/useMatchedNav.tsx +0 -29
- package/packages/react/index.ts +0 -12
- package/packages/react/utils/manualHydration.ts +0 -25
- package/packages/theme/context.tsx +0 -19
- package/packages/theme/index.ts +0 -0
- package/postcss.config.cjs +0 -5
- package/src/index.ts +0 -1
- package/src/types.ts +0 -5
- package/tsconfig.json +0 -45
- package/tsup.config.ts +0 -28
- /package/dist/{sidebar-Dwf54qYp.d.mts → Sidebar-Dwf54qYp.d.ts} +0 -0
package/dist/react.js
CHANGED
|
@@ -1,1290 +1,18 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
|
|
29
|
-
// packages/react/index.ts
|
|
30
|
-
var react_exports = {};
|
|
31
|
-
__export(react_exports, {
|
|
32
|
-
Framework: () => Framework,
|
|
33
|
-
FwBreadcrumbs: () => FwBreadcrumbs,
|
|
34
|
-
FwNav: () => FwNav,
|
|
35
|
-
FwNavLinks: () => FwNavLinks,
|
|
36
|
-
FwSidebarGroups: () => FwSidebarGroups,
|
|
37
|
-
FwSubNav: () => FwSubNav,
|
|
38
|
-
FwToc: () => FwToc,
|
|
39
|
-
useMatchedSubNav: () => useMatchedSubNav
|
|
40
|
-
});
|
|
41
|
-
module.exports = __toCommonJS(react_exports);
|
|
42
|
-
|
|
43
1
|
// packages/react/components/index.tsx
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
// ../xyd-components/dist/index-C0sBj-Rt.js
|
|
49
|
-
var import_react = __toESM(require("react"), 1);
|
|
50
|
-
var n = "hutvd2b";
|
|
51
|
-
var a = "hg9oorb";
|
|
52
|
-
var r = "h6jev6x";
|
|
53
|
-
var l = "i1uvewli";
|
|
54
|
-
function c(t5) {
|
|
55
|
-
var c2 = t5.children, o3 = t5.size, i3 = void 0 === o3 ? "sm" : o3, s2 = t5.kind, d3 = void 0 === s2 ? "warning" : s2;
|
|
56
|
-
return import_react.default.createElement("div", { className: "\n ".concat(n, "\n \n ").concat("sm" === i3 && r, "\n \n ").concat("warning" === d3 && a, "\n ") }, import_react.default.createElement("span", { className: l }, c2));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// ../xyd-components/dist/tslib.es6-nZyJ5rcw.js
|
|
60
|
-
function t2(t5, n4) {
|
|
61
|
-
var e3 = {};
|
|
62
|
-
for (var r4 in t5) Object.prototype.hasOwnProperty.call(t5, r4) && n4.indexOf(r4) < 0 && (e3[r4] = t5[r4]);
|
|
63
|
-
if (null != t5 && "function" == typeof Object.getOwnPropertySymbols) {
|
|
64
|
-
var o3 = 0;
|
|
65
|
-
for (r4 = Object.getOwnPropertySymbols(t5); o3 < r4.length; o3++) n4.indexOf(r4[o3]) < 0 && Object.prototype.propertyIsEnumerable.call(t5, r4[o3]) && (e3[r4[o3]] = t5[r4[o3]]);
|
|
66
|
-
}
|
|
67
|
-
return e3;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// ../xyd-components/dist/writer.js
|
|
71
|
-
var import_react7 = __toESM(require("react"), 1);
|
|
72
|
-
|
|
73
|
-
// ../../node_modules/.pnpm/@radix-ui+react-icons@1.3.2_react@18.3.1/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js
|
|
74
|
-
var import_react2 = require("react");
|
|
75
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
76
|
-
if (source == null) return {};
|
|
77
|
-
var target = {};
|
|
78
|
-
var sourceKeys = Object.keys(source);
|
|
79
|
-
var key, i3;
|
|
80
|
-
for (i3 = 0; i3 < sourceKeys.length; i3++) {
|
|
81
|
-
key = sourceKeys[i3];
|
|
82
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
83
|
-
target[key] = source[key];
|
|
84
|
-
}
|
|
85
|
-
return target;
|
|
86
|
-
}
|
|
87
|
-
var _excluded$f = ["color"];
|
|
88
|
-
var ArrowLeftIcon = /* @__PURE__ */ (0, import_react2.forwardRef)(function(_ref, forwardedRef) {
|
|
89
|
-
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
90
|
-
return (0, import_react2.createElement)("svg", Object.assign({
|
|
91
|
-
width: "15",
|
|
92
|
-
height: "15",
|
|
93
|
-
viewBox: "0 0 15 15",
|
|
94
|
-
fill: "none",
|
|
95
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
96
|
-
}, props, {
|
|
97
|
-
ref: forwardedRef
|
|
98
|
-
}), (0, import_react2.createElement)("path", {
|
|
99
|
-
d: "M6.85355 3.14645C7.04882 3.34171 7.04882 3.65829 6.85355 3.85355L3.70711 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H3.70711L6.85355 11.1464C7.04882 11.3417 7.04882 11.6583 6.85355 11.8536C6.65829 12.0488 6.34171 12.0488 6.14645 11.8536L2.14645 7.85355C1.95118 7.65829 1.95118 7.34171 2.14645 7.14645L6.14645 3.14645C6.34171 2.95118 6.65829 2.95118 6.85355 3.14645Z",
|
|
100
|
-
fill: color,
|
|
101
|
-
fillRule: "evenodd",
|
|
102
|
-
clipRule: "evenodd"
|
|
103
|
-
}));
|
|
104
|
-
});
|
|
105
|
-
var _excluded$g = ["color"];
|
|
106
|
-
var ArrowRightIcon = /* @__PURE__ */ (0, import_react2.forwardRef)(function(_ref, forwardedRef) {
|
|
107
|
-
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
108
|
-
return (0, import_react2.createElement)("svg", Object.assign({
|
|
109
|
-
width: "15",
|
|
110
|
-
height: "15",
|
|
111
|
-
viewBox: "0 0 15 15",
|
|
112
|
-
fill: "none",
|
|
113
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
114
|
-
}, props, {
|
|
115
|
-
ref: forwardedRef
|
|
116
|
-
}), (0, import_react2.createElement)("path", {
|
|
117
|
-
d: "M8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.2929 8H2.5C2.22386 8 2 7.77614 2 7.5C2 7.22386 2.22386 7 2.5 7H11.2929L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645Z",
|
|
118
|
-
fill: color,
|
|
119
|
-
fillRule: "evenodd",
|
|
120
|
-
clipRule: "evenodd"
|
|
121
|
-
}));
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
// ../xyd-components/dist/UnderlineNav-rNUvd4IV.js
|
|
125
|
-
var import_react6 = __toESM(require("react"), 1);
|
|
126
|
-
|
|
127
|
-
// ../xyd-components/dist/_rollupPluginBabelHelpers-DOmTa7nq.js
|
|
128
|
-
function t3(t5, r4) {
|
|
129
|
-
(null == r4 || r4 > t5.length) && (r4 = t5.length);
|
|
130
|
-
for (var e3 = 0, n4 = Array(r4); e3 < r4; e3++) n4[e3] = t5[e3];
|
|
131
|
-
return n4;
|
|
132
|
-
}
|
|
133
|
-
function r2(t5) {
|
|
134
|
-
if (Array.isArray(t5)) return t5;
|
|
135
|
-
}
|
|
136
|
-
function u() {
|
|
137
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
138
|
-
}
|
|
139
|
-
function h(t5, e3) {
|
|
140
|
-
return r2(t5) || function(t6, r4) {
|
|
141
|
-
var e4 = null == t6 ? null : "undefined" != typeof Symbol && t6[Symbol.iterator] || t6["@@iterator"];
|
|
142
|
-
if (null != e4) {
|
|
143
|
-
var n4, o3, i3, a3, u4 = [], c2 = true, f2 = false;
|
|
144
|
-
try {
|
|
145
|
-
if (i3 = (e4 = e4.call(t6)).next, 0 === r4) {
|
|
146
|
-
if (Object(e4) !== e4) return;
|
|
147
|
-
c2 = false;
|
|
148
|
-
} else for (; !(c2 = (n4 = i3.call(e4)).done) && (u4.push(n4.value), u4.length !== r4); c2 = true) ;
|
|
149
|
-
} catch (t7) {
|
|
150
|
-
f2 = true, o3 = t7;
|
|
151
|
-
} finally {
|
|
152
|
-
try {
|
|
153
|
-
if (!c2 && null != e4.return && (a3 = e4.return(), Object(a3) !== a3)) return;
|
|
154
|
-
} finally {
|
|
155
|
-
if (f2) throw o3;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
return u4;
|
|
159
|
-
}
|
|
160
|
-
}(t5, e3) || d(t5, e3) || u();
|
|
161
|
-
}
|
|
162
|
-
function d(r4, e3) {
|
|
163
|
-
if (r4) {
|
|
164
|
-
if ("string" == typeof r4) return t3(r4, e3);
|
|
165
|
-
var n4 = {}.toString.call(r4).slice(8, -1);
|
|
166
|
-
return "Object" === n4 && r4.constructor && (n4 = r4.constructor.name), "Map" === n4 || "Set" === n4 ? Array.from(r4) : "Arguments" === n4 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n4) ? t3(r4, e3) : void 0;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// ../../node_modules/.pnpm/@radix-ui+react-tabs@1.1.2_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@18.3.18_qsyrobternj736o5ex7scdd3r4/node_modules/@radix-ui/react-tabs/dist/index.mjs
|
|
171
|
-
var React13 = __toESM(require("react"), 1);
|
|
172
|
-
|
|
173
|
-
// ../../node_modules/.pnpm/@radix-ui+primitive@1.1.1/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
174
|
-
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
175
|
-
return function handleEvent(event) {
|
|
176
|
-
originalEventHandler == null ? void 0 : originalEventHandler(event);
|
|
177
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
178
|
-
return ourEventHandler == null ? void 0 : ourEventHandler(event);
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// ../../node_modules/.pnpm/@radix-ui+react-context@1.1.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
184
|
-
var React = __toESM(require("react"), 1);
|
|
185
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
186
|
-
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
187
|
-
let defaultContexts = [];
|
|
188
|
-
function createContext32(rootComponentName, defaultContext) {
|
|
189
|
-
const BaseContext = React.createContext(defaultContext);
|
|
190
|
-
const index = defaultContexts.length;
|
|
191
|
-
defaultContexts = [...defaultContexts, defaultContext];
|
|
192
|
-
const Provider = (props) => {
|
|
193
|
-
var _a;
|
|
194
|
-
const { scope, children, ...context } = props;
|
|
195
|
-
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
|
196
|
-
const value = React.useMemo(() => context, Object.values(context));
|
|
197
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
|
198
|
-
};
|
|
199
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
200
|
-
function useContext22(consumerName, scope) {
|
|
201
|
-
var _a;
|
|
202
|
-
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
|
203
|
-
const context = React.useContext(Context);
|
|
204
|
-
if (context) return context;
|
|
205
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
206
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
207
|
-
}
|
|
208
|
-
return [Provider, useContext22];
|
|
209
|
-
}
|
|
210
|
-
const createScope = () => {
|
|
211
|
-
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
212
|
-
return React.createContext(defaultContext);
|
|
213
|
-
});
|
|
214
|
-
return function useScope(scope) {
|
|
215
|
-
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
216
|
-
return React.useMemo(
|
|
217
|
-
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
218
|
-
[scope, contexts]
|
|
219
|
-
);
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
createScope.scopeName = scopeName;
|
|
223
|
-
return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
224
|
-
}
|
|
225
|
-
function composeContextScopes(...scopes) {
|
|
226
|
-
const baseScope = scopes[0];
|
|
227
|
-
if (scopes.length === 1) return baseScope;
|
|
228
|
-
const createScope = () => {
|
|
229
|
-
const scopeHooks = scopes.map((createScope2) => ({
|
|
230
|
-
useScope: createScope2(),
|
|
231
|
-
scopeName: createScope2.scopeName
|
|
232
|
-
}));
|
|
233
|
-
return function useComposedScopes(overrideScopes) {
|
|
234
|
-
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
235
|
-
const scopeProps = useScope(overrideScopes);
|
|
236
|
-
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
237
|
-
return { ...nextScopes2, ...currentScope };
|
|
238
|
-
}, {});
|
|
239
|
-
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
240
|
-
};
|
|
241
|
-
};
|
|
242
|
-
createScope.scopeName = baseScope.scopeName;
|
|
243
|
-
return createScope;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
// ../../node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.1_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react_bkbd3syfptkiebtjifbhjosaba/node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
|
247
|
-
var React11 = __toESM(require("react"), 1);
|
|
248
|
-
|
|
249
|
-
// ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.1_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@1_du3umibpgknzrmwryvhzp3lgou/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
250
|
-
var import_react3 = __toESM(require("react"), 1);
|
|
251
|
-
|
|
252
|
-
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
253
|
-
var React2 = __toESM(require("react"), 1);
|
|
254
|
-
function setRef(ref, value) {
|
|
255
|
-
if (typeof ref === "function") {
|
|
256
|
-
return ref(value);
|
|
257
|
-
} else if (ref !== null && ref !== void 0) {
|
|
258
|
-
ref.current = value;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
function composeRefs(...refs) {
|
|
262
|
-
return (node) => {
|
|
263
|
-
let hasCleanup = false;
|
|
264
|
-
const cleanups = refs.map((ref) => {
|
|
265
|
-
const cleanup = setRef(ref, node);
|
|
266
|
-
if (!hasCleanup && typeof cleanup == "function") {
|
|
267
|
-
hasCleanup = true;
|
|
268
|
-
}
|
|
269
|
-
return cleanup;
|
|
270
|
-
});
|
|
271
|
-
if (hasCleanup) {
|
|
272
|
-
return () => {
|
|
273
|
-
for (let i3 = 0; i3 < cleanups.length; i3++) {
|
|
274
|
-
const cleanup = cleanups[i3];
|
|
275
|
-
if (typeof cleanup == "function") {
|
|
276
|
-
cleanup();
|
|
277
|
-
} else {
|
|
278
|
-
setRef(refs[i3], null);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
function useComposedRefs(...refs) {
|
|
286
|
-
return React2.useCallback(composeRefs(...refs), refs);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.1.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
290
|
-
var React3 = __toESM(require("react"), 1);
|
|
291
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
292
|
-
var Slot = React3.forwardRef((props, forwardedRef) => {
|
|
293
|
-
const { children, ...slotProps } = props;
|
|
294
|
-
const childrenArray = React3.Children.toArray(children);
|
|
295
|
-
const slottable = childrenArray.find(isSlottable);
|
|
296
|
-
if (slottable) {
|
|
297
|
-
const newElement = slottable.props.children;
|
|
298
|
-
const newChildren = childrenArray.map((child) => {
|
|
299
|
-
if (child === slottable) {
|
|
300
|
-
if (React3.Children.count(newElement) > 1) return React3.Children.only(null);
|
|
301
|
-
return React3.isValidElement(newElement) ? newElement.props.children : null;
|
|
302
|
-
} else {
|
|
303
|
-
return child;
|
|
304
|
-
}
|
|
305
|
-
});
|
|
306
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
|
307
|
-
}
|
|
308
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
309
|
-
});
|
|
310
|
-
Slot.displayName = "Slot";
|
|
311
|
-
var SlotClone = React3.forwardRef((props, forwardedRef) => {
|
|
312
|
-
const { children, ...slotProps } = props;
|
|
313
|
-
if (React3.isValidElement(children)) {
|
|
314
|
-
const childrenRef = getElementRef(children);
|
|
315
|
-
return React3.cloneElement(children, {
|
|
316
|
-
...mergeProps(slotProps, children.props),
|
|
317
|
-
// @ts-ignore
|
|
318
|
-
ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
return React3.Children.count(children) > 1 ? React3.Children.only(null) : null;
|
|
322
|
-
});
|
|
323
|
-
SlotClone.displayName = "SlotClone";
|
|
324
|
-
var Slottable = ({ children }) => {
|
|
325
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children });
|
|
326
|
-
};
|
|
327
|
-
function isSlottable(child) {
|
|
328
|
-
return React3.isValidElement(child) && child.type === Slottable;
|
|
329
|
-
}
|
|
330
|
-
function mergeProps(slotProps, childProps) {
|
|
331
|
-
const overrideProps = { ...childProps };
|
|
332
|
-
for (const propName in childProps) {
|
|
333
|
-
const slotPropValue = slotProps[propName];
|
|
334
|
-
const childPropValue = childProps[propName];
|
|
335
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
336
|
-
if (isHandler) {
|
|
337
|
-
if (slotPropValue && childPropValue) {
|
|
338
|
-
overrideProps[propName] = (...args) => {
|
|
339
|
-
childPropValue(...args);
|
|
340
|
-
slotPropValue(...args);
|
|
341
|
-
};
|
|
342
|
-
} else if (slotPropValue) {
|
|
343
|
-
overrideProps[propName] = slotPropValue;
|
|
344
|
-
}
|
|
345
|
-
} else if (propName === "style") {
|
|
346
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
347
|
-
} else if (propName === "className") {
|
|
348
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
return { ...slotProps, ...overrideProps };
|
|
352
|
-
}
|
|
353
|
-
function getElementRef(element) {
|
|
354
|
-
var _a, _b;
|
|
355
|
-
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
356
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
357
|
-
if (mayWarn) {
|
|
358
|
-
return element.ref;
|
|
359
|
-
}
|
|
360
|
-
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
361
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
362
|
-
if (mayWarn) {
|
|
363
|
-
return element.props.ref;
|
|
364
|
-
}
|
|
365
|
-
return element.props.ref || element.ref;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
// ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.1_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@1_du3umibpgknzrmwryvhzp3lgou/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
369
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
370
|
-
function createCollection(name) {
|
|
371
|
-
const PROVIDER_NAME = name + "CollectionProvider";
|
|
372
|
-
const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME);
|
|
373
|
-
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
374
|
-
PROVIDER_NAME,
|
|
375
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
376
|
-
);
|
|
377
|
-
const CollectionProvider = (props) => {
|
|
378
|
-
const { scope, children } = props;
|
|
379
|
-
const ref = import_react3.default.useRef(null);
|
|
380
|
-
const itemMap = import_react3.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
381
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
382
|
-
};
|
|
383
|
-
CollectionProvider.displayName = PROVIDER_NAME;
|
|
384
|
-
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
385
|
-
const CollectionSlot = import_react3.default.forwardRef(
|
|
386
|
-
(props, forwardedRef) => {
|
|
387
|
-
const { scope, children } = props;
|
|
388
|
-
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
389
|
-
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
390
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Slot, { ref: composedRefs, children });
|
|
391
|
-
}
|
|
392
|
-
);
|
|
393
|
-
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
394
|
-
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
395
|
-
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
396
|
-
const CollectionItemSlot = import_react3.default.forwardRef(
|
|
397
|
-
(props, forwardedRef) => {
|
|
398
|
-
const { scope, children, ...itemData } = props;
|
|
399
|
-
const ref = import_react3.default.useRef(null);
|
|
400
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
401
|
-
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
402
|
-
import_react3.default.useEffect(() => {
|
|
403
|
-
context.itemMap.set(ref, { ref, ...itemData });
|
|
404
|
-
return () => void context.itemMap.delete(ref);
|
|
405
|
-
});
|
|
406
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
407
|
-
}
|
|
408
|
-
);
|
|
409
|
-
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
410
|
-
function useCollection2(scope) {
|
|
411
|
-
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
412
|
-
const getItems = import_react3.default.useCallback(() => {
|
|
413
|
-
const collectionNode = context.collectionRef.current;
|
|
414
|
-
if (!collectionNode) return [];
|
|
415
|
-
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
416
|
-
const items = Array.from(context.itemMap.values());
|
|
417
|
-
const orderedItems = items.sort(
|
|
418
|
-
(a3, b2) => orderedNodes.indexOf(a3.ref.current) - orderedNodes.indexOf(b2.ref.current)
|
|
419
|
-
);
|
|
420
|
-
return orderedItems;
|
|
421
|
-
}, [context.collectionRef, context.itemMap]);
|
|
422
|
-
return getItems;
|
|
423
|
-
}
|
|
424
|
-
return [
|
|
425
|
-
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
|
|
426
|
-
useCollection2,
|
|
427
|
-
createCollectionScope2
|
|
428
|
-
];
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
432
|
-
var React6 = __toESM(require("react"), 1);
|
|
433
|
-
|
|
434
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
435
|
-
var React5 = __toESM(require("react"), 1);
|
|
436
|
-
var useLayoutEffect2 = Boolean(globalThis == null ? void 0 : globalThis.document) ? React5.useLayoutEffect : () => {
|
|
437
|
-
};
|
|
438
|
-
|
|
439
|
-
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
440
|
-
var useReactId = React6["useId".toString()] || (() => void 0);
|
|
441
|
-
var count = 0;
|
|
442
|
-
function useId(deterministicId) {
|
|
443
|
-
const [id, setId] = React6.useState(useReactId());
|
|
444
|
-
useLayoutEffect2(() => {
|
|
445
|
-
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
|
|
446
|
-
}, [deterministicId]);
|
|
447
|
-
return deterministicId || (id ? `radix-${id}` : "");
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.0.1_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@18_sspjpiczol7qxzbuuyfihuep4u/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
451
|
-
var React7 = __toESM(require("react"), 1);
|
|
452
|
-
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
453
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
454
|
-
var NODES = [
|
|
455
|
-
"a",
|
|
456
|
-
"button",
|
|
457
|
-
"div",
|
|
458
|
-
"form",
|
|
459
|
-
"h2",
|
|
460
|
-
"h3",
|
|
461
|
-
"img",
|
|
462
|
-
"input",
|
|
463
|
-
"label",
|
|
464
|
-
"li",
|
|
465
|
-
"nav",
|
|
466
|
-
"ol",
|
|
467
|
-
"p",
|
|
468
|
-
"span",
|
|
469
|
-
"svg",
|
|
470
|
-
"ul"
|
|
471
|
-
];
|
|
472
|
-
var Primitive = NODES.reduce((primitive, node) => {
|
|
473
|
-
const Node = React7.forwardRef((props, forwardedRef) => {
|
|
474
|
-
const { asChild, ...primitiveProps } = props;
|
|
475
|
-
const Comp = asChild ? Slot : node;
|
|
476
|
-
if (typeof window !== "undefined") {
|
|
477
|
-
window[Symbol.for("radix-ui")] = true;
|
|
478
|
-
}
|
|
479
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
480
|
-
});
|
|
481
|
-
Node.displayName = `Primitive.${node}`;
|
|
482
|
-
return { ...primitive, [node]: Node };
|
|
483
|
-
}, {});
|
|
484
|
-
|
|
485
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
486
|
-
var React8 = __toESM(require("react"), 1);
|
|
487
|
-
function useCallbackRef(callback) {
|
|
488
|
-
const callbackRef = React8.useRef(callback);
|
|
489
|
-
React8.useEffect(() => {
|
|
490
|
-
callbackRef.current = callback;
|
|
491
|
-
});
|
|
492
|
-
return React8.useMemo(() => (...args) => {
|
|
493
|
-
var _a;
|
|
494
|
-
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
|
495
|
-
}, []);
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
499
|
-
var React9 = __toESM(require("react"), 1);
|
|
500
|
-
function useControllableState({
|
|
501
|
-
prop,
|
|
502
|
-
defaultProp,
|
|
503
|
-
onChange = () => {
|
|
504
|
-
}
|
|
505
|
-
}) {
|
|
506
|
-
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
|
|
507
|
-
const isControlled = prop !== void 0;
|
|
508
|
-
const value = isControlled ? prop : uncontrolledProp;
|
|
509
|
-
const handleChange = useCallbackRef(onChange);
|
|
510
|
-
const setValue = React9.useCallback(
|
|
511
|
-
(nextValue) => {
|
|
512
|
-
if (isControlled) {
|
|
513
|
-
const setter = nextValue;
|
|
514
|
-
const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
|
|
515
|
-
if (value2 !== prop) handleChange(value2);
|
|
516
|
-
} else {
|
|
517
|
-
setUncontrolledProp(nextValue);
|
|
518
|
-
}
|
|
519
|
-
},
|
|
520
|
-
[isControlled, prop, setUncontrolledProp, handleChange]
|
|
521
|
-
);
|
|
522
|
-
return [value, setValue];
|
|
523
|
-
}
|
|
524
|
-
function useUncontrolledState({
|
|
525
|
-
defaultProp,
|
|
526
|
-
onChange
|
|
527
|
-
}) {
|
|
528
|
-
const uncontrolledState = React9.useState(defaultProp);
|
|
529
|
-
const [value] = uncontrolledState;
|
|
530
|
-
const prevValueRef = React9.useRef(value);
|
|
531
|
-
const handleChange = useCallbackRef(onChange);
|
|
532
|
-
React9.useEffect(() => {
|
|
533
|
-
if (prevValueRef.current !== value) {
|
|
534
|
-
handleChange(value);
|
|
535
|
-
prevValueRef.current = value;
|
|
536
|
-
}
|
|
537
|
-
}, [value, prevValueRef, handleChange]);
|
|
538
|
-
return uncontrolledState;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
// ../../node_modules/.pnpm/@radix-ui+react-direction@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
542
|
-
var React10 = __toESM(require("react"), 1);
|
|
543
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
544
|
-
var DirectionContext = React10.createContext(void 0);
|
|
545
|
-
function useDirection(localDir) {
|
|
546
|
-
const globalDir = React10.useContext(DirectionContext);
|
|
547
|
-
return localDir || globalDir || "ltr";
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
// ../../node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.1_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react_bkbd3syfptkiebtjifbhjosaba/node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
|
551
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
552
|
-
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
553
|
-
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
554
|
-
var GROUP_NAME = "RovingFocusGroup";
|
|
555
|
-
var [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);
|
|
556
|
-
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
|
|
557
|
-
GROUP_NAME,
|
|
558
|
-
[createCollectionScope]
|
|
559
|
-
);
|
|
560
|
-
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
|
|
561
|
-
var RovingFocusGroup = React11.forwardRef(
|
|
562
|
-
(props, forwardedRef) => {
|
|
563
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
|
|
564
|
-
}
|
|
565
|
-
);
|
|
566
|
-
RovingFocusGroup.displayName = GROUP_NAME;
|
|
567
|
-
var RovingFocusGroupImpl = React11.forwardRef((props, forwardedRef) => {
|
|
568
|
-
const {
|
|
569
|
-
__scopeRovingFocusGroup,
|
|
570
|
-
orientation,
|
|
571
|
-
loop = false,
|
|
572
|
-
dir,
|
|
573
|
-
currentTabStopId: currentTabStopIdProp,
|
|
574
|
-
defaultCurrentTabStopId,
|
|
575
|
-
onCurrentTabStopIdChange,
|
|
576
|
-
onEntryFocus,
|
|
577
|
-
preventScrollOnEntryFocus = false,
|
|
578
|
-
...groupProps
|
|
579
|
-
} = props;
|
|
580
|
-
const ref = React11.useRef(null);
|
|
581
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
582
|
-
const direction = useDirection(dir);
|
|
583
|
-
const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({
|
|
584
|
-
prop: currentTabStopIdProp,
|
|
585
|
-
defaultProp: defaultCurrentTabStopId,
|
|
586
|
-
onChange: onCurrentTabStopIdChange
|
|
587
|
-
});
|
|
588
|
-
const [isTabbingBackOut, setIsTabbingBackOut] = React11.useState(false);
|
|
589
|
-
const handleEntryFocus = useCallbackRef(onEntryFocus);
|
|
590
|
-
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
591
|
-
const isClickFocusRef = React11.useRef(false);
|
|
592
|
-
const [focusableItemsCount, setFocusableItemsCount] = React11.useState(0);
|
|
593
|
-
React11.useEffect(() => {
|
|
594
|
-
const node = ref.current;
|
|
595
|
-
if (node) {
|
|
596
|
-
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
597
|
-
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
598
|
-
}
|
|
599
|
-
}, [handleEntryFocus]);
|
|
600
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
601
|
-
RovingFocusProvider,
|
|
602
|
-
{
|
|
603
|
-
scope: __scopeRovingFocusGroup,
|
|
604
|
-
orientation,
|
|
605
|
-
dir: direction,
|
|
606
|
-
loop,
|
|
607
|
-
currentTabStopId,
|
|
608
|
-
onItemFocus: React11.useCallback(
|
|
609
|
-
(tabStopId) => setCurrentTabStopId(tabStopId),
|
|
610
|
-
[setCurrentTabStopId]
|
|
611
|
-
),
|
|
612
|
-
onItemShiftTab: React11.useCallback(() => setIsTabbingBackOut(true), []),
|
|
613
|
-
onFocusableItemAdd: React11.useCallback(
|
|
614
|
-
() => setFocusableItemsCount((prevCount) => prevCount + 1),
|
|
615
|
-
[]
|
|
616
|
-
),
|
|
617
|
-
onFocusableItemRemove: React11.useCallback(
|
|
618
|
-
() => setFocusableItemsCount((prevCount) => prevCount - 1),
|
|
619
|
-
[]
|
|
620
|
-
),
|
|
621
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
622
|
-
Primitive.div,
|
|
623
|
-
{
|
|
624
|
-
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
625
|
-
"data-orientation": orientation,
|
|
626
|
-
...groupProps,
|
|
627
|
-
ref: composedRefs,
|
|
628
|
-
style: { outline: "none", ...props.style },
|
|
629
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, () => {
|
|
630
|
-
isClickFocusRef.current = true;
|
|
631
|
-
}),
|
|
632
|
-
onFocus: composeEventHandlers(props.onFocus, (event) => {
|
|
633
|
-
const isKeyboardFocus = !isClickFocusRef.current;
|
|
634
|
-
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
635
|
-
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
|
|
636
|
-
event.currentTarget.dispatchEvent(entryFocusEvent);
|
|
637
|
-
if (!entryFocusEvent.defaultPrevented) {
|
|
638
|
-
const items = getItems().filter((item) => item.focusable);
|
|
639
|
-
const activeItem = items.find((item) => item.active);
|
|
640
|
-
const currentItem = items.find((item) => item.id === currentTabStopId);
|
|
641
|
-
const candidateItems = [activeItem, currentItem, ...items].filter(
|
|
642
|
-
Boolean
|
|
643
|
-
);
|
|
644
|
-
const candidateNodes = candidateItems.map((item) => item.ref.current);
|
|
645
|
-
focusFirst(candidateNodes, preventScrollOnEntryFocus);
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
isClickFocusRef.current = false;
|
|
649
|
-
}),
|
|
650
|
-
onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
|
|
651
|
-
}
|
|
652
|
-
)
|
|
653
|
-
}
|
|
654
|
-
);
|
|
655
|
-
});
|
|
656
|
-
var ITEM_NAME = "RovingFocusGroupItem";
|
|
657
|
-
var RovingFocusGroupItem = React11.forwardRef(
|
|
658
|
-
(props, forwardedRef) => {
|
|
659
|
-
const {
|
|
660
|
-
__scopeRovingFocusGroup,
|
|
661
|
-
focusable = true,
|
|
662
|
-
active = false,
|
|
663
|
-
tabStopId,
|
|
664
|
-
...itemProps
|
|
665
|
-
} = props;
|
|
666
|
-
const autoId = useId();
|
|
667
|
-
const id = tabStopId || autoId;
|
|
668
|
-
const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);
|
|
669
|
-
const isCurrentTabStop = context.currentTabStopId === id;
|
|
670
|
-
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
671
|
-
const { onFocusableItemAdd, onFocusableItemRemove } = context;
|
|
672
|
-
React11.useEffect(() => {
|
|
673
|
-
if (focusable) {
|
|
674
|
-
onFocusableItemAdd();
|
|
675
|
-
return () => onFocusableItemRemove();
|
|
676
|
-
}
|
|
677
|
-
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
|
678
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
679
|
-
Collection.ItemSlot,
|
|
680
|
-
{
|
|
681
|
-
scope: __scopeRovingFocusGroup,
|
|
682
|
-
id,
|
|
683
|
-
focusable,
|
|
684
|
-
active,
|
|
685
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
686
|
-
Primitive.span,
|
|
687
|
-
{
|
|
688
|
-
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
689
|
-
"data-orientation": context.orientation,
|
|
690
|
-
...itemProps,
|
|
691
|
-
ref: forwardedRef,
|
|
692
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
|
|
693
|
-
if (!focusable) event.preventDefault();
|
|
694
|
-
else context.onItemFocus(id);
|
|
695
|
-
}),
|
|
696
|
-
onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
|
|
697
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
698
|
-
if (event.key === "Tab" && event.shiftKey) {
|
|
699
|
-
context.onItemShiftTab();
|
|
700
|
-
return;
|
|
701
|
-
}
|
|
702
|
-
if (event.target !== event.currentTarget) return;
|
|
703
|
-
const focusIntent = getFocusIntent(event, context.orientation, context.dir);
|
|
704
|
-
if (focusIntent !== void 0) {
|
|
705
|
-
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
|
|
706
|
-
event.preventDefault();
|
|
707
|
-
const items = getItems().filter((item) => item.focusable);
|
|
708
|
-
let candidateNodes = items.map((item) => item.ref.current);
|
|
709
|
-
if (focusIntent === "last") candidateNodes.reverse();
|
|
710
|
-
else if (focusIntent === "prev" || focusIntent === "next") {
|
|
711
|
-
if (focusIntent === "prev") candidateNodes.reverse();
|
|
712
|
-
const currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
713
|
-
candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
|
|
714
|
-
}
|
|
715
|
-
setTimeout(() => focusFirst(candidateNodes));
|
|
716
|
-
}
|
|
717
|
-
})
|
|
718
|
-
}
|
|
719
|
-
)
|
|
720
|
-
}
|
|
721
|
-
);
|
|
722
|
-
}
|
|
723
|
-
);
|
|
724
|
-
RovingFocusGroupItem.displayName = ITEM_NAME;
|
|
725
|
-
var MAP_KEY_TO_FOCUS_INTENT = {
|
|
726
|
-
ArrowLeft: "prev",
|
|
727
|
-
ArrowUp: "prev",
|
|
728
|
-
ArrowRight: "next",
|
|
729
|
-
ArrowDown: "next",
|
|
730
|
-
PageUp: "first",
|
|
731
|
-
Home: "first",
|
|
732
|
-
PageDown: "last",
|
|
733
|
-
End: "last"
|
|
734
|
-
};
|
|
735
|
-
function getDirectionAwareKey(key, dir) {
|
|
736
|
-
if (dir !== "rtl") return key;
|
|
737
|
-
return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
|
|
738
|
-
}
|
|
739
|
-
function getFocusIntent(event, orientation, dir) {
|
|
740
|
-
const key = getDirectionAwareKey(event.key, dir);
|
|
741
|
-
if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
|
|
742
|
-
if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
|
|
743
|
-
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
744
|
-
}
|
|
745
|
-
function focusFirst(candidates, preventScroll = false) {
|
|
746
|
-
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
747
|
-
for (const candidate of candidates) {
|
|
748
|
-
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
749
|
-
candidate.focus({ preventScroll });
|
|
750
|
-
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
function wrapArray(array, startIndex) {
|
|
754
|
-
return array.map((_2, index) => array[(startIndex + index) % array.length]);
|
|
755
|
-
}
|
|
756
|
-
var Root = RovingFocusGroup;
|
|
757
|
-
var Item = RovingFocusGroupItem;
|
|
758
|
-
|
|
759
|
-
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.2_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@18._pqwkltkxenlrsgmgun6icjiigu/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
760
|
-
var React22 = __toESM(require("react"), 1);
|
|
761
|
-
var React12 = __toESM(require("react"), 1);
|
|
762
|
-
function useStateMachine(initialState, machine) {
|
|
763
|
-
return React12.useReducer((state, event) => {
|
|
764
|
-
const nextState = machine[state][event];
|
|
765
|
-
return nextState ?? state;
|
|
766
|
-
}, initialState);
|
|
767
|
-
}
|
|
768
|
-
var Presence = (props) => {
|
|
769
|
-
const { present, children } = props;
|
|
770
|
-
const presence = usePresence(present);
|
|
771
|
-
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React22.Children.only(children);
|
|
772
|
-
const ref = useComposedRefs(presence.ref, getElementRef2(child));
|
|
773
|
-
const forceMount = typeof children === "function";
|
|
774
|
-
return forceMount || presence.isPresent ? React22.cloneElement(child, { ref }) : null;
|
|
775
|
-
};
|
|
776
|
-
Presence.displayName = "Presence";
|
|
777
|
-
function usePresence(present) {
|
|
778
|
-
const [node, setNode] = React22.useState();
|
|
779
|
-
const stylesRef = React22.useRef({});
|
|
780
|
-
const prevPresentRef = React22.useRef(present);
|
|
781
|
-
const prevAnimationNameRef = React22.useRef("none");
|
|
782
|
-
const initialState = present ? "mounted" : "unmounted";
|
|
783
|
-
const [state, send] = useStateMachine(initialState, {
|
|
784
|
-
mounted: {
|
|
785
|
-
UNMOUNT: "unmounted",
|
|
786
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
787
|
-
},
|
|
788
|
-
unmountSuspended: {
|
|
789
|
-
MOUNT: "mounted",
|
|
790
|
-
ANIMATION_END: "unmounted"
|
|
791
|
-
},
|
|
792
|
-
unmounted: {
|
|
793
|
-
MOUNT: "mounted"
|
|
794
|
-
}
|
|
795
|
-
});
|
|
796
|
-
React22.useEffect(() => {
|
|
797
|
-
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
798
|
-
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
799
|
-
}, [state]);
|
|
800
|
-
useLayoutEffect2(() => {
|
|
801
|
-
const styles = stylesRef.current;
|
|
802
|
-
const wasPresent = prevPresentRef.current;
|
|
803
|
-
const hasPresentChanged = wasPresent !== present;
|
|
804
|
-
if (hasPresentChanged) {
|
|
805
|
-
const prevAnimationName = prevAnimationNameRef.current;
|
|
806
|
-
const currentAnimationName = getAnimationName(styles);
|
|
807
|
-
if (present) {
|
|
808
|
-
send("MOUNT");
|
|
809
|
-
} else if (currentAnimationName === "none" || (styles == null ? void 0 : styles.display) === "none") {
|
|
810
|
-
send("UNMOUNT");
|
|
811
|
-
} else {
|
|
812
|
-
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
813
|
-
if (wasPresent && isAnimating) {
|
|
814
|
-
send("ANIMATION_OUT");
|
|
815
|
-
} else {
|
|
816
|
-
send("UNMOUNT");
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
prevPresentRef.current = present;
|
|
820
|
-
}
|
|
821
|
-
}, [present, send]);
|
|
822
|
-
useLayoutEffect2(() => {
|
|
823
|
-
if (node) {
|
|
824
|
-
let timeoutId;
|
|
825
|
-
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
826
|
-
const handleAnimationEnd = (event) => {
|
|
827
|
-
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
828
|
-
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
829
|
-
if (event.target === node && isCurrentAnimation) {
|
|
830
|
-
send("ANIMATION_END");
|
|
831
|
-
if (!prevPresentRef.current) {
|
|
832
|
-
const currentFillMode = node.style.animationFillMode;
|
|
833
|
-
node.style.animationFillMode = "forwards";
|
|
834
|
-
timeoutId = ownerWindow.setTimeout(() => {
|
|
835
|
-
if (node.style.animationFillMode === "forwards") {
|
|
836
|
-
node.style.animationFillMode = currentFillMode;
|
|
837
|
-
}
|
|
838
|
-
});
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
};
|
|
842
|
-
const handleAnimationStart = (event) => {
|
|
843
|
-
if (event.target === node) {
|
|
844
|
-
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
845
|
-
}
|
|
846
|
-
};
|
|
847
|
-
node.addEventListener("animationstart", handleAnimationStart);
|
|
848
|
-
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
849
|
-
node.addEventListener("animationend", handleAnimationEnd);
|
|
850
|
-
return () => {
|
|
851
|
-
ownerWindow.clearTimeout(timeoutId);
|
|
852
|
-
node.removeEventListener("animationstart", handleAnimationStart);
|
|
853
|
-
node.removeEventListener("animationcancel", handleAnimationEnd);
|
|
854
|
-
node.removeEventListener("animationend", handleAnimationEnd);
|
|
855
|
-
};
|
|
856
|
-
} else {
|
|
857
|
-
send("ANIMATION_END");
|
|
858
|
-
}
|
|
859
|
-
}, [node, send]);
|
|
860
|
-
return {
|
|
861
|
-
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
862
|
-
ref: React22.useCallback((node2) => {
|
|
863
|
-
if (node2) stylesRef.current = getComputedStyle(node2);
|
|
864
|
-
setNode(node2);
|
|
865
|
-
}, [])
|
|
866
|
-
};
|
|
867
|
-
}
|
|
868
|
-
function getAnimationName(styles) {
|
|
869
|
-
return (styles == null ? void 0 : styles.animationName) || "none";
|
|
870
|
-
}
|
|
871
|
-
function getElementRef2(element) {
|
|
872
|
-
var _a, _b;
|
|
873
|
-
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
874
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
875
|
-
if (mayWarn) {
|
|
876
|
-
return element.ref;
|
|
877
|
-
}
|
|
878
|
-
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
879
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
880
|
-
if (mayWarn) {
|
|
881
|
-
return element.props.ref;
|
|
882
|
-
}
|
|
883
|
-
return element.props.ref || element.ref;
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
// ../../node_modules/.pnpm/@radix-ui+react-tabs@1.1.2_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@18.3.18_qsyrobternj736o5ex7scdd3r4/node_modules/@radix-ui/react-tabs/dist/index.mjs
|
|
887
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
888
|
-
var TABS_NAME = "Tabs";
|
|
889
|
-
var [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [
|
|
890
|
-
createRovingFocusGroupScope
|
|
891
|
-
]);
|
|
892
|
-
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
893
|
-
var [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);
|
|
894
|
-
var Tabs = React13.forwardRef(
|
|
895
|
-
(props, forwardedRef) => {
|
|
896
|
-
const {
|
|
897
|
-
__scopeTabs,
|
|
898
|
-
value: valueProp,
|
|
899
|
-
onValueChange,
|
|
900
|
-
defaultValue,
|
|
901
|
-
orientation = "horizontal",
|
|
902
|
-
dir,
|
|
903
|
-
activationMode = "automatic",
|
|
904
|
-
...tabsProps
|
|
905
|
-
} = props;
|
|
906
|
-
const direction = useDirection(dir);
|
|
907
|
-
const [value, setValue] = useControllableState({
|
|
908
|
-
prop: valueProp,
|
|
909
|
-
onChange: onValueChange,
|
|
910
|
-
defaultProp: defaultValue
|
|
911
|
-
});
|
|
912
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
913
|
-
TabsProvider,
|
|
914
|
-
{
|
|
915
|
-
scope: __scopeTabs,
|
|
916
|
-
baseId: useId(),
|
|
917
|
-
value,
|
|
918
|
-
onValueChange: setValue,
|
|
919
|
-
orientation,
|
|
920
|
-
dir: direction,
|
|
921
|
-
activationMode,
|
|
922
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
923
|
-
Primitive.div,
|
|
924
|
-
{
|
|
925
|
-
dir: direction,
|
|
926
|
-
"data-orientation": orientation,
|
|
927
|
-
...tabsProps,
|
|
928
|
-
ref: forwardedRef
|
|
929
|
-
}
|
|
930
|
-
)
|
|
931
|
-
}
|
|
932
|
-
);
|
|
933
|
-
}
|
|
934
|
-
);
|
|
935
|
-
Tabs.displayName = TABS_NAME;
|
|
936
|
-
var TAB_LIST_NAME = "TabsList";
|
|
937
|
-
var TabsList = React13.forwardRef(
|
|
938
|
-
(props, forwardedRef) => {
|
|
939
|
-
const { __scopeTabs, loop = true, ...listProps } = props;
|
|
940
|
-
const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);
|
|
941
|
-
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
942
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
943
|
-
Root,
|
|
944
|
-
{
|
|
945
|
-
asChild: true,
|
|
946
|
-
...rovingFocusGroupScope,
|
|
947
|
-
orientation: context.orientation,
|
|
948
|
-
dir: context.dir,
|
|
949
|
-
loop,
|
|
950
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
951
|
-
Primitive.div,
|
|
952
|
-
{
|
|
953
|
-
role: "tablist",
|
|
954
|
-
"aria-orientation": context.orientation,
|
|
955
|
-
...listProps,
|
|
956
|
-
ref: forwardedRef
|
|
957
|
-
}
|
|
958
|
-
)
|
|
959
|
-
}
|
|
960
|
-
);
|
|
961
|
-
}
|
|
962
|
-
);
|
|
963
|
-
TabsList.displayName = TAB_LIST_NAME;
|
|
964
|
-
var TRIGGER_NAME = "TabsTrigger";
|
|
965
|
-
var TabsTrigger = React13.forwardRef(
|
|
966
|
-
(props, forwardedRef) => {
|
|
967
|
-
const { __scopeTabs, value, disabled = false, ...triggerProps } = props;
|
|
968
|
-
const context = useTabsContext(TRIGGER_NAME, __scopeTabs);
|
|
969
|
-
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
970
|
-
const triggerId = makeTriggerId(context.baseId, value);
|
|
971
|
-
const contentId = makeContentId(context.baseId, value);
|
|
972
|
-
const isSelected = value === context.value;
|
|
973
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
974
|
-
Item,
|
|
975
|
-
{
|
|
976
|
-
asChild: true,
|
|
977
|
-
...rovingFocusGroupScope,
|
|
978
|
-
focusable: !disabled,
|
|
979
|
-
active: isSelected,
|
|
980
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
981
|
-
Primitive.button,
|
|
982
|
-
{
|
|
983
|
-
type: "button",
|
|
984
|
-
role: "tab",
|
|
985
|
-
"aria-selected": isSelected,
|
|
986
|
-
"aria-controls": contentId,
|
|
987
|
-
"data-state": isSelected ? "active" : "inactive",
|
|
988
|
-
"data-disabled": disabled ? "" : void 0,
|
|
989
|
-
disabled,
|
|
990
|
-
id: triggerId,
|
|
991
|
-
...triggerProps,
|
|
992
|
-
ref: forwardedRef,
|
|
993
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
|
|
994
|
-
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
995
|
-
context.onValueChange(value);
|
|
996
|
-
} else {
|
|
997
|
-
event.preventDefault();
|
|
998
|
-
}
|
|
999
|
-
}),
|
|
1000
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
1001
|
-
if ([" ", "Enter"].includes(event.key)) context.onValueChange(value);
|
|
1002
|
-
}),
|
|
1003
|
-
onFocus: composeEventHandlers(props.onFocus, () => {
|
|
1004
|
-
const isAutomaticActivation = context.activationMode !== "manual";
|
|
1005
|
-
if (!isSelected && !disabled && isAutomaticActivation) {
|
|
1006
|
-
context.onValueChange(value);
|
|
1007
|
-
}
|
|
1008
|
-
})
|
|
1009
|
-
}
|
|
1010
|
-
)
|
|
1011
|
-
}
|
|
1012
|
-
);
|
|
1013
|
-
}
|
|
1014
|
-
);
|
|
1015
|
-
TabsTrigger.displayName = TRIGGER_NAME;
|
|
1016
|
-
var CONTENT_NAME = "TabsContent";
|
|
1017
|
-
var TabsContent = React13.forwardRef(
|
|
1018
|
-
(props, forwardedRef) => {
|
|
1019
|
-
const { __scopeTabs, value, forceMount, children, ...contentProps } = props;
|
|
1020
|
-
const context = useTabsContext(CONTENT_NAME, __scopeTabs);
|
|
1021
|
-
const triggerId = makeTriggerId(context.baseId, value);
|
|
1022
|
-
const contentId = makeContentId(context.baseId, value);
|
|
1023
|
-
const isSelected = value === context.value;
|
|
1024
|
-
const isMountAnimationPreventedRef = React13.useRef(isSelected);
|
|
1025
|
-
React13.useEffect(() => {
|
|
1026
|
-
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
|
|
1027
|
-
return () => cancelAnimationFrame(rAF);
|
|
1028
|
-
}, []);
|
|
1029
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1030
|
-
Primitive.div,
|
|
1031
|
-
{
|
|
1032
|
-
"data-state": isSelected ? "active" : "inactive",
|
|
1033
|
-
"data-orientation": context.orientation,
|
|
1034
|
-
role: "tabpanel",
|
|
1035
|
-
"aria-labelledby": triggerId,
|
|
1036
|
-
hidden: !present,
|
|
1037
|
-
id: contentId,
|
|
1038
|
-
tabIndex: 0,
|
|
1039
|
-
...contentProps,
|
|
1040
|
-
ref: forwardedRef,
|
|
1041
|
-
style: {
|
|
1042
|
-
...props.style,
|
|
1043
|
-
animationDuration: isMountAnimationPreventedRef.current ? "0s" : void 0
|
|
1044
|
-
},
|
|
1045
|
-
children: present && children
|
|
1046
|
-
}
|
|
1047
|
-
) });
|
|
1048
|
-
}
|
|
1049
|
-
);
|
|
1050
|
-
TabsContent.displayName = CONTENT_NAME;
|
|
1051
|
-
function makeTriggerId(baseId, value) {
|
|
1052
|
-
return `${baseId}-trigger-${value}`;
|
|
1053
|
-
}
|
|
1054
|
-
function makeContentId(baseId, value) {
|
|
1055
|
-
return `${baseId}-content-${value}`;
|
|
1056
|
-
}
|
|
1057
|
-
var Root2 = Tabs;
|
|
1058
|
-
var List = TabsList;
|
|
1059
|
-
var Trigger = TabsTrigger;
|
|
1060
|
-
var Content = TabsContent;
|
|
1061
|
-
|
|
1062
|
-
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1063
|
-
var import_react5 = require("react");
|
|
1064
|
-
|
|
1065
|
-
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
1066
|
-
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1067
|
-
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
1068
|
-
return Boolean(className) && array.indexOf(className) === index;
|
|
1069
|
-
}).join(" ");
|
|
1070
|
-
|
|
1071
|
-
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
|
1072
|
-
var import_react4 = require("react");
|
|
1073
|
-
|
|
1074
|
-
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
1075
|
-
var defaultAttributes = {
|
|
1076
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1077
|
-
width: 24,
|
|
1078
|
-
height: 24,
|
|
1079
|
-
viewBox: "0 0 24 24",
|
|
1080
|
-
fill: "none",
|
|
1081
|
-
stroke: "currentColor",
|
|
1082
|
-
strokeWidth: 2,
|
|
1083
|
-
strokeLinecap: "round",
|
|
1084
|
-
strokeLinejoin: "round"
|
|
1085
|
-
};
|
|
1086
|
-
|
|
1087
|
-
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
|
1088
|
-
var Icon = (0, import_react4.forwardRef)(
|
|
1089
|
-
({
|
|
1090
|
-
color = "currentColor",
|
|
1091
|
-
size = 24,
|
|
1092
|
-
strokeWidth = 2,
|
|
1093
|
-
absoluteStrokeWidth,
|
|
1094
|
-
className = "",
|
|
1095
|
-
children,
|
|
1096
|
-
iconNode,
|
|
1097
|
-
...rest
|
|
1098
|
-
}, ref) => {
|
|
1099
|
-
return (0, import_react4.createElement)(
|
|
1100
|
-
"svg",
|
|
1101
|
-
{
|
|
1102
|
-
ref,
|
|
1103
|
-
...defaultAttributes,
|
|
1104
|
-
width: size,
|
|
1105
|
-
height: size,
|
|
1106
|
-
stroke: color,
|
|
1107
|
-
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
|
1108
|
-
className: mergeClasses("lucide", className),
|
|
1109
|
-
...rest
|
|
1110
|
-
},
|
|
1111
|
-
[
|
|
1112
|
-
...iconNode.map(([tag, attrs]) => (0, import_react4.createElement)(tag, attrs)),
|
|
1113
|
-
...Array.isArray(children) ? children : [children]
|
|
1114
|
-
]
|
|
1115
|
-
);
|
|
1116
|
-
}
|
|
1117
|
-
);
|
|
1118
|
-
|
|
1119
|
-
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1120
|
-
var createLucideIcon = (iconName, iconNode) => {
|
|
1121
|
-
const Component = (0, import_react5.forwardRef)(
|
|
1122
|
-
({ className, ...props }, ref) => (0, import_react5.createElement)(Icon, {
|
|
1123
|
-
ref,
|
|
1124
|
-
iconNode,
|
|
1125
|
-
className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),
|
|
1126
|
-
...props
|
|
1127
|
-
})
|
|
1128
|
-
);
|
|
1129
|
-
Component.displayName = `${iconName}`;
|
|
1130
|
-
return Component;
|
|
1131
|
-
};
|
|
1132
|
-
|
|
1133
|
-
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-left.js
|
|
1134
|
-
var ChevronLeft = createLucideIcon("ChevronLeft", [
|
|
1135
|
-
["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]
|
|
1136
|
-
]);
|
|
1137
|
-
|
|
1138
|
-
// ../../node_modules/.pnpm/lucide-react@0.447.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
1139
|
-
var ChevronRight = createLucideIcon("ChevronRight", [
|
|
1140
|
-
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
1141
|
-
]);
|
|
1142
|
-
|
|
1143
|
-
// ../xyd-components/dist/UnderlineNav-rNUvd4IV.js
|
|
1144
|
-
var s = "hh34a3o";
|
|
1145
|
-
var m = "hilz89t";
|
|
1146
|
-
var o = "h1rnhmpa";
|
|
1147
|
-
var u2 = "lajci2p";
|
|
1148
|
-
var d2 = "iezrce7";
|
|
1149
|
-
var v = "i1vhi0b8";
|
|
1150
|
-
var h2 = "i1m2lps9";
|
|
1151
|
-
var f = "r1new93p";
|
|
1152
|
-
var E = "t1u3d3ty";
|
|
1153
|
-
var N = "t4udf3g";
|
|
1154
|
-
var p = "t1icpluq";
|
|
1155
|
-
var b = "badgd67";
|
|
1156
|
-
var g = "bcjznmh";
|
|
1157
|
-
var w = "p13ekkiz";
|
|
1158
|
-
var C = "h15733ml";
|
|
1159
|
-
function k(t5) {
|
|
1160
|
-
var a3 = t5.children, n4 = t5.href, r4 = t5.icon, c2 = t5.title, l2 = t5.kind, i3 = t5.size;
|
|
1161
|
-
return import_react6.default.createElement("div", { className: "\n ".concat(s, "\n ").concat("secondary" === l2 && m, "\n ").concat("secondary" === l2 && "md" == i3 && o, "\n ") }, import_react6.default.createElement("a", { className: u2, href: n4 }, import_react6.default.createElement("div", { className: "\n ".concat(d2, "\n ").concat("secondary" === l2 && v, "\n ") }, r4 && import_react6.default.createElement("div", { className: h2 }, r4), import_react6.default.createElement("div", { className: f }, import_react6.default.createElement("div", { className: E }, import_react6.default.createElement("div", { className: "\n ".concat(E, " \n ").concat(N, "\n ").concat("md" == i3 && p, "\n ") }, c2), import_react6.default.createElement(z, null)), import_react6.default.createElement("div", { className: "\n ".concat(b, "\n ").concat("md" == i3 && g, "\n ") }, a3)))));
|
|
1162
|
-
}
|
|
1163
|
-
function z() {
|
|
1164
|
-
return import_react6.default.createElement("div", { "data-pointer": "true", className: w }, import_react6.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: "currentColor", viewBox: "0 0 24 24" }, import_react6.default.createElement("path", { fillRule: "evenodd", d: "M9.293 7.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.414-1.414L12.586 12 9.293 8.707a1 1 0 0 1 0-1.414Z", clipRule: "evenodd" })));
|
|
1165
|
-
}
|
|
1166
|
-
k.List = function(t5) {
|
|
1167
|
-
var a3 = t5.children;
|
|
1168
|
-
return import_react6.default.createElement("div", { className: C }, a3);
|
|
1169
|
-
};
|
|
1170
|
-
var x = "h3kfd8c";
|
|
1171
|
-
var L = "l1et872q";
|
|
1172
|
-
function y(t5) {
|
|
1173
|
-
var a3 = t5.children;
|
|
1174
|
-
return import_react6.default.createElement("ol", { className: x }, a3);
|
|
1175
|
-
}
|
|
1176
|
-
y.Item = function(t5) {
|
|
1177
|
-
var a3 = t5.children;
|
|
1178
|
-
return import_react6.default.createElement("li", { className: L }, a3);
|
|
1179
|
-
};
|
|
1180
|
-
var T = "h14vj3ri";
|
|
1181
|
-
var j = "t1l6tz9b";
|
|
1182
|
-
var R = "thzxr0l";
|
|
1183
|
-
var B = "t1g1altt";
|
|
1184
|
-
function I(t5) {
|
|
1185
|
-
var a3 = t5.children;
|
|
1186
|
-
return import_react6.default.createElement("table", { className: T }, a3);
|
|
1187
|
-
}
|
|
1188
|
-
I.Th = function(t5) {
|
|
1189
|
-
var a3 = t5.children;
|
|
1190
|
-
return import_react6.default.createElement("th", { className: j }, a3);
|
|
1191
|
-
}, I.Tr = function(t5) {
|
|
1192
|
-
var a3 = t5.children;
|
|
1193
|
-
return import_react6.default.createElement("tr", { className: R }, a3);
|
|
1194
|
-
}, I.Td = function(t5) {
|
|
1195
|
-
var a3 = t5.children;
|
|
1196
|
-
return import_react6.default.createElement("td", { className: B }, a3);
|
|
1197
|
-
};
|
|
1198
|
-
var q = "hh8vcxa";
|
|
1199
|
-
var S = "b2p5907";
|
|
1200
|
-
var V = "coeb6fw";
|
|
1201
|
-
var W = "h196u2m6";
|
|
1202
|
-
var _ = "i1hlflsk";
|
|
1203
|
-
var G = "hownbu8";
|
|
1204
|
-
var H = "cuwerl2";
|
|
1205
|
-
var M = "hlivi01";
|
|
1206
|
-
function P(s2) {
|
|
1207
|
-
var m3 = s2.children, o3 = s2.items, u4 = s2.tabIndex, d3 = (0, import_react6.useState)(false), v3 = h(d3, 2), h4 = v3[0], f2 = v3[1], E4 = (0, import_react6.useState)(false), N3 = h(E4, 2), p3 = N3[0], b2 = N3[1], g2 = (0, import_react6.useRef)(null), w3 = (0, import_react6.useState)(o3[u4 || 0] || ""), C2 = h(w3, 2), k2 = C2[0], z2 = C2[1], x3 = function() {
|
|
1208
|
-
if (g2.current) {
|
|
1209
|
-
var e3 = g2.current, t5 = e3.scrollLeft, a3 = e3.scrollWidth, n4 = e3.clientWidth;
|
|
1210
|
-
f2(t5 > 0), b2(t5 < a3 - n4);
|
|
1211
|
-
}
|
|
1212
|
-
};
|
|
1213
|
-
(0, import_react6.useEffect)(function() {
|
|
1214
|
-
return x3(), window.addEventListener("resize", x3), function() {
|
|
1215
|
-
return window.removeEventListener("resize", x3);
|
|
1216
|
-
};
|
|
1217
|
-
}, []);
|
|
1218
|
-
var L2 = function(e3) {
|
|
1219
|
-
if (g2.current) {
|
|
1220
|
-
var t5 = "left" === e3 ? -200 : 200;
|
|
1221
|
-
g2.current.scrollBy({ left: t5, behavior: "smooth" });
|
|
1222
|
-
}
|
|
1223
|
-
};
|
|
1224
|
-
return import_react6.default.createElement(Root2, { asChild: true, value: k2, onValueChange: z2 }, import_react6.default.createElement("div", { className: q }, import_react6.default.createElement("div", { className: S }, h4 && import_react6.default.createElement("button", { onClick: function() {
|
|
1225
|
-
return L2("left");
|
|
1226
|
-
}, className: W }, import_react6.default.createElement(ChevronLeft, { className: _ })), import_react6.default.createElement("div", { ref: g2, onScroll: x3, className: G }, import_react6.default.createElement("div", { className: H }, import_react6.default.createElement(List, null, o3.map(function(t5, a3) {
|
|
1227
|
-
return import_react6.default.createElement(U, { key: a3, value: t5 }, t5);
|
|
1228
|
-
})))), p3 && import_react6.default.createElement("button", { onClick: function() {
|
|
1229
|
-
return L2("right");
|
|
1230
|
-
}, className: W }, import_react6.default.createElement(ChevronRight, { className: _ }))), import_react6.default.createElement("div", { className: V }, m3)));
|
|
1231
|
-
}
|
|
1232
|
-
function U(t5) {
|
|
1233
|
-
var a3 = t5.children, n4 = t5.value;
|
|
1234
|
-
return import_react6.default.createElement(Trigger, { asChild: true, value: n4 }, import_react6.default.createElement("button", { className: "".concat(M) }, a3));
|
|
1235
|
-
}
|
|
1236
|
-
P.Content = function(t5) {
|
|
1237
|
-
var a3 = t5.children, n4 = t5.value;
|
|
1238
|
-
return import_react6.default.createElement(Content, { asChild: true, value: n4 }, a3);
|
|
1239
|
-
};
|
|
1240
|
-
var Z = "h1bta36o";
|
|
1241
|
-
var A = "uxs4bf1";
|
|
1242
|
-
var D = "ifn7ecb";
|
|
1243
|
-
var F = "i441kmn";
|
|
1244
|
-
function J(t5) {
|
|
1245
|
-
var a3 = t5.children, n4 = t5.value, r4 = t5.onChange;
|
|
1246
|
-
return import_react6.default.createElement(Root2, { asChild: true, value: n4, onValueChange: r4 }, import_react6.default.createElement("nav", { className: Z }, import_react6.default.createElement(List, { asChild: true }, import_react6.default.createElement("ul", { className: A }, a3))));
|
|
1247
|
-
}
|
|
1248
|
-
J.Item = function(t5) {
|
|
1249
|
-
var a3 = t5.children, n4 = t5.value, r4 = t5.href;
|
|
1250
|
-
return import_react6.default.createElement(Trigger, { asChild: true, value: n4 }, import_react6.default.createElement("li", { className: D }, import_react6.default.createElement("a", { href: r4, className: "".concat(F) }, a3)));
|
|
1251
|
-
};
|
|
1252
|
-
|
|
1253
|
-
// ../xyd-components/dist/writer.js
|
|
1254
|
-
var i2 = "hwgsk4h";
|
|
1255
|
-
var m2 = "i1b95bxl";
|
|
1256
|
-
var o2 = "i1a3fa93";
|
|
1257
|
-
var u3 = "i1dl7ywj";
|
|
1258
|
-
function h3(e3) {
|
|
1259
|
-
var a3 = e3.children, n4 = t2(e3, ["children"]);
|
|
1260
|
-
return import_react7.default.createElement("a", Object.assign({}, n4), a3);
|
|
1261
|
-
}
|
|
1262
|
-
function p2(e3) {
|
|
1263
|
-
return import_react7.default.createElement("div", { className: i2 }, e3.items.map(function(t5, a3) {
|
|
1264
|
-
var s2 = a3 === e3.items.length - 1;
|
|
1265
|
-
return import_react7.default.createElement(import_react7.Fragment, { key: t5.href + t5.title }, a3 > 0 && import_react7.default.createElement(ArrowRightIcon, { className: m2 }), import_react7.default.createElement("div", { className: "\n ".concat(o2, "\n ").concat(s2 && u3, "\n "), title: t5.title }, t5.href && !s2 ? import_react7.default.createElement(h3, { href: t5.href }, t5.title) : t5.title));
|
|
1266
|
-
}));
|
|
1267
|
-
}
|
|
1268
|
-
var v2 = "h1xhrk1";
|
|
1269
|
-
var E3 = "l1elq7ab";
|
|
1270
|
-
var x2 = "i1mmatje";
|
|
1271
|
-
function N2(e3) {
|
|
1272
|
-
var a3 = e3.children, n4 = t2(e3, ["children"]);
|
|
1273
|
-
return import_react7.default.createElement("a", Object.assign({}, n4), a3);
|
|
1274
|
-
}
|
|
1275
|
-
function j2(e3) {
|
|
1276
|
-
return import_react7.default.createElement("div", { className: v2 }, e3.prev ? import_react7.default.createElement(N2, { href: e3.prev.href, title: e3.prev.title, className: E3 }, import_react7.default.createElement(ArrowLeftIcon, { className: x2 }), e3.prev.title) : import_react7.default.createElement("div", null), e3.next && import_react7.default.createElement(N2, { href: e3.next.href, title: e3.next.title, className: E3 }, e3.next.title, import_react7.default.createElement(ArrowRightIcon, { className: x2 })));
|
|
1277
|
-
}
|
|
2
|
+
import React5, { isValidElement } from "react";
|
|
3
|
+
import { useLocation as useLocation3 } from "react-router";
|
|
4
|
+
import { Breadcrumbs, NavLinks } from "@xyd-js/components/writer";
|
|
5
|
+
import { Toc, SubNav, UISidebar as UISidebar2, Nav } from "@xyd-js/ui";
|
|
1278
6
|
|
|
1279
7
|
// packages/react/contexts/framework.tsx
|
|
1280
|
-
|
|
8
|
+
import React, { createContext, useContext } from "react";
|
|
1281
9
|
var framework = {
|
|
1282
10
|
settings: {},
|
|
1283
11
|
sidebarGroups: []
|
|
1284
12
|
};
|
|
1285
|
-
var FrameworkContext =
|
|
13
|
+
var FrameworkContext = createContext(framework);
|
|
1286
14
|
function Framework(props) {
|
|
1287
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ React.createElement(FrameworkContext.Provider, { value: {
|
|
1288
16
|
settings: props.settings,
|
|
1289
17
|
sidebarGroups: props.sidebarGroups,
|
|
1290
18
|
toc: props.toc,
|
|
@@ -1293,40 +21,45 @@ function Framework(props) {
|
|
|
1293
21
|
} }, props.children);
|
|
1294
22
|
}
|
|
1295
23
|
function useSidebarGroups() {
|
|
1296
|
-
const ctx =
|
|
24
|
+
const ctx = useContext(FrameworkContext);
|
|
1297
25
|
return ctx.sidebarGroups;
|
|
1298
26
|
}
|
|
1299
27
|
function useSettings() {
|
|
1300
|
-
const ctx =
|
|
28
|
+
const ctx = useContext(FrameworkContext);
|
|
1301
29
|
return ctx.settings;
|
|
1302
30
|
}
|
|
1303
31
|
function useToC() {
|
|
1304
|
-
const ctx =
|
|
32
|
+
const ctx = useContext(FrameworkContext);
|
|
1305
33
|
return ctx.toc;
|
|
1306
34
|
}
|
|
1307
35
|
function useBreadcrumbs() {
|
|
1308
|
-
const ctx =
|
|
36
|
+
const ctx = useContext(FrameworkContext);
|
|
1309
37
|
return ctx.breadcrumbs;
|
|
1310
38
|
}
|
|
1311
39
|
function useNavLinks() {
|
|
1312
|
-
const ctx =
|
|
40
|
+
const ctx = useContext(FrameworkContext);
|
|
1313
41
|
return ctx.navlinks;
|
|
1314
42
|
}
|
|
1315
43
|
|
|
1316
|
-
// packages/react/components/
|
|
1317
|
-
|
|
1318
|
-
|
|
44
|
+
// packages/react/components/Sidebar/Sidebar.tsx
|
|
45
|
+
import React3 from "react";
|
|
46
|
+
import { Badge } from "@xyd-js/components/writer";
|
|
47
|
+
import { UISidebar } from "@xyd-js/ui";
|
|
48
|
+
|
|
49
|
+
// packages/react/components/Sidebar/SidebarGroup.tsx
|
|
50
|
+
import React2, { createContext as createContext3, useContext as useContext2, useEffect, useState } from "react";
|
|
51
|
+
import { useLocation } from "react-router";
|
|
1319
52
|
|
|
1320
53
|
// packages/react/contexts/ui.tsx
|
|
1321
|
-
|
|
1322
|
-
var UIContext = (
|
|
54
|
+
import { createContext as createContext2 } from "react";
|
|
55
|
+
var UIContext = createContext2({
|
|
1323
56
|
href: "",
|
|
1324
|
-
setHref: (
|
|
57
|
+
setHref: (v) => {
|
|
1325
58
|
}
|
|
1326
59
|
});
|
|
1327
60
|
|
|
1328
|
-
// packages/react/components/
|
|
1329
|
-
var groupContext = (
|
|
61
|
+
// packages/react/components/Sidebar/SidebarGroup.tsx
|
|
62
|
+
var groupContext = createContext3({
|
|
1330
63
|
active: () => [false, () => {
|
|
1331
64
|
}],
|
|
1332
65
|
onClick: () => null
|
|
@@ -1344,14 +77,14 @@ function FwSidebarGroupContext({
|
|
|
1344
77
|
} else {
|
|
1345
78
|
groupBehaviour = useDefaultBehaviour(initialActiveItems);
|
|
1346
79
|
}
|
|
1347
|
-
const location =
|
|
1348
|
-
const [href, setHref] =
|
|
1349
|
-
return /* @__PURE__ */
|
|
80
|
+
const location = useLocation();
|
|
81
|
+
const [href, setHref] = useState(location.pathname);
|
|
82
|
+
return /* @__PURE__ */ React2.createElement(UIContext.Provider, { value: {
|
|
1350
83
|
href,
|
|
1351
84
|
setHref: (value) => {
|
|
1352
85
|
setHref(value);
|
|
1353
86
|
}
|
|
1354
|
-
} }, /* @__PURE__ */
|
|
87
|
+
} }, /* @__PURE__ */ React2.createElement(groupContext.Provider, { value: {
|
|
1355
88
|
active: groupBehaviour,
|
|
1356
89
|
onClick: clientSideRouting ? (event, item) => {
|
|
1357
90
|
setHref(item.href);
|
|
@@ -1360,7 +93,7 @@ function FwSidebarGroupContext({
|
|
|
1360
93
|
} }, children));
|
|
1361
94
|
}
|
|
1362
95
|
function useGroup() {
|
|
1363
|
-
return (
|
|
96
|
+
return useContext2(groupContext);
|
|
1364
97
|
}
|
|
1365
98
|
function getLastValue(set) {
|
|
1366
99
|
let value;
|
|
@@ -1376,13 +109,13 @@ function stringify(item) {
|
|
|
1376
109
|
});
|
|
1377
110
|
}
|
|
1378
111
|
function recursiveSearch(items, href, levels = []) {
|
|
1379
|
-
for (let
|
|
1380
|
-
const item = items[
|
|
112
|
+
for (let i = 0; i < items.length; i++) {
|
|
113
|
+
const item = items[i];
|
|
1381
114
|
if (item.href === href) {
|
|
1382
|
-
return [...levels,
|
|
115
|
+
return [...levels, i];
|
|
1383
116
|
}
|
|
1384
117
|
if (item.items) {
|
|
1385
|
-
const result = recursiveSearch(item.items, href, [...levels,
|
|
118
|
+
const result = recursiveSearch(item.items, href, [...levels, i]);
|
|
1386
119
|
if (result) {
|
|
1387
120
|
return result;
|
|
1388
121
|
}
|
|
@@ -1407,9 +140,9 @@ function calcActive(groups, url) {
|
|
|
1407
140
|
}
|
|
1408
141
|
function useDefaultBehaviour(initialActiveItems) {
|
|
1409
142
|
const groups = useSidebarGroups();
|
|
1410
|
-
const [weakSet] =
|
|
1411
|
-
const [, setForceUpdate] =
|
|
1412
|
-
|
|
143
|
+
const [weakSet] = useState(() => new Set(initialActiveItems.map((item) => stringify(item))));
|
|
144
|
+
const [, setForceUpdate] = useState(0);
|
|
145
|
+
useEffect(() => {
|
|
1413
146
|
window.addEventListener("xyd.history.pushState", (event) => {
|
|
1414
147
|
var _a;
|
|
1415
148
|
const url = (_a = event.detail) == null ? void 0 : _a.url;
|
|
@@ -1447,9 +180,9 @@ function useDefaultBehaviour(initialActiveItems) {
|
|
|
1447
180
|
];
|
|
1448
181
|
}
|
|
1449
182
|
function useOnePathBehaviour(initialActiveItems) {
|
|
1450
|
-
const [weakSet] =
|
|
1451
|
-
const [lastLevel, setLastLevel] =
|
|
1452
|
-
const [, setForceUpdate] =
|
|
183
|
+
const [weakSet] = useState(() => new Set(initialActiveItems.map((item) => stringify(item))));
|
|
184
|
+
const [lastLevel, setLastLevel] = useState(false);
|
|
185
|
+
const [, setForceUpdate] = useState(0);
|
|
1453
186
|
const forceUpdate = () => setForceUpdate((prev) => prev + 1);
|
|
1454
187
|
const addItem = (item) => {
|
|
1455
188
|
weakSet.add(stringify(item));
|
|
@@ -1483,8 +216,8 @@ function useOnePathBehaviour(initialActiveItems) {
|
|
|
1483
216
|
if ((item.level || 0) > (lastLevel || 0) || lastLevel == false) {
|
|
1484
217
|
addItem(item);
|
|
1485
218
|
} else {
|
|
1486
|
-
const
|
|
1487
|
-
deleteItem(JSON.parse(
|
|
219
|
+
const v = getLastValue(weakSet);
|
|
220
|
+
deleteItem(JSON.parse(v));
|
|
1488
221
|
addItem(item);
|
|
1489
222
|
}
|
|
1490
223
|
}
|
|
@@ -1498,11 +231,9 @@ function scrollToDataSlug(event, item) {
|
|
|
1498
231
|
}
|
|
1499
232
|
}
|
|
1500
233
|
|
|
1501
|
-
// packages/react/components/
|
|
1502
|
-
var import_react11 = __toESM(require("react"));
|
|
1503
|
-
var import_ui2 = require("@xyd-js/ui");
|
|
234
|
+
// packages/react/components/Sidebar/Sidebar.tsx
|
|
1504
235
|
function FwSidebarItemGroup(props) {
|
|
1505
|
-
return /* @__PURE__ */
|
|
236
|
+
return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(UISidebar.ItemHeader, null, props.group), props.items.map((item, index) => /* @__PURE__ */ React3.createElement(
|
|
1506
237
|
FwSidebarItem,
|
|
1507
238
|
{
|
|
1508
239
|
key: index + item.href,
|
|
@@ -1517,56 +248,71 @@ function FwSidebarItemGroup(props) {
|
|
|
1517
248
|
var components = {
|
|
1518
249
|
Frontmatter: {
|
|
1519
250
|
// TODO: css
|
|
1520
|
-
Title: ({ children }) => /* @__PURE__ */
|
|
251
|
+
Title: ({ children }) => /* @__PURE__ */ React3.createElement("div", { style: {
|
|
1521
252
|
display: "flex",
|
|
1522
253
|
alignItems: "center",
|
|
1523
|
-
justifyContent: "space-between",
|
|
1524
254
|
width: "100%",
|
|
1525
255
|
gap: "10px"
|
|
1526
256
|
} }, children)
|
|
1527
257
|
},
|
|
1528
|
-
Badge: ({ children }) => /* @__PURE__ */
|
|
258
|
+
Badge: ({ children, ...rest }) => /* @__PURE__ */ React3.createElement(Badge, { ...rest }, children)
|
|
1529
259
|
};
|
|
1530
260
|
function mdxExport(code, components2) {
|
|
1531
261
|
const scope = {
|
|
1532
|
-
Fragment:
|
|
1533
|
-
jsxs:
|
|
1534
|
-
jsx:
|
|
1535
|
-
jsxDEV:
|
|
1536
|
-
_jsxs:
|
|
1537
|
-
_jsx:
|
|
262
|
+
Fragment: React3.Fragment,
|
|
263
|
+
jsxs: React3.createElement,
|
|
264
|
+
jsx: React3.createElement,
|
|
265
|
+
jsxDEV: React3.createElement,
|
|
266
|
+
_jsxs: React3.createElement,
|
|
267
|
+
_jsx: React3.createElement,
|
|
1538
268
|
...components2
|
|
1539
269
|
};
|
|
1540
270
|
const fn = new Function(...Object.keys(scope), `return ${code}`);
|
|
1541
271
|
return fn(...Object.values(scope));
|
|
1542
272
|
}
|
|
1543
273
|
function FwSidebarItem(props) {
|
|
1544
|
-
var _a, _b, _c;
|
|
274
|
+
var _a, _b, _c, _d;
|
|
1545
275
|
const { active, onClick } = useGroup();
|
|
1546
276
|
const [isActive, setActive] = active(props);
|
|
1547
277
|
let Title;
|
|
1548
278
|
if (typeof props.title === "object" && "code" in props.title) {
|
|
1549
279
|
const code = props.title.code;
|
|
1550
280
|
Title = () => mdxExport(
|
|
1551
|
-
// TODO: in the future better mechanism + support props + better components (provider?) - similar to codehik
|
|
1552
281
|
code.replace("() => ", ""),
|
|
1553
282
|
components
|
|
1554
283
|
);
|
|
1555
284
|
} else {
|
|
1556
285
|
Title = () => props.title;
|
|
1557
286
|
}
|
|
1558
|
-
|
|
1559
|
-
|
|
287
|
+
const handleClick = () => {
|
|
288
|
+
var _a2;
|
|
289
|
+
if (props.href) {
|
|
290
|
+
setActive();
|
|
291
|
+
} else if ((_a2 = props.items) == null ? void 0 : _a2.length) {
|
|
292
|
+
setActive();
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
const hasActiveChild = (_a = props.items) == null ? void 0 : _a.some((item) => {
|
|
296
|
+
var _a2;
|
|
297
|
+
const [itemActive] = active(item);
|
|
298
|
+
return itemActive && item.href || ((_a2 = item.items) == null ? void 0 : _a2.some((subItem) => {
|
|
299
|
+
const [subItemActive] = active(subItem);
|
|
300
|
+
return subItemActive && subItem.href;
|
|
301
|
+
}));
|
|
302
|
+
});
|
|
303
|
+
const isActiveItem = !!(isActive && props.href);
|
|
304
|
+
const isParentActive = hasActiveChild;
|
|
305
|
+
return /* @__PURE__ */ React3.createElement(
|
|
306
|
+
UISidebar.Item,
|
|
1560
307
|
{
|
|
1561
|
-
button: !!((
|
|
308
|
+
button: !!((_b = props.items) == null ? void 0 : _b.length),
|
|
1562
309
|
href: props.href,
|
|
1563
|
-
active:
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
}
|
|
310
|
+
active: isActiveItem,
|
|
311
|
+
isParentActive,
|
|
312
|
+
onClick: handleClick
|
|
1567
313
|
},
|
|
1568
|
-
/* @__PURE__ */
|
|
1569
|
-
((
|
|
314
|
+
/* @__PURE__ */ React3.createElement(Title, null),
|
|
315
|
+
((_c = props.items) == null ? void 0 : _c.length) && /* @__PURE__ */ React3.createElement(UISidebar.SubTree, { isOpen: isActive }, /* @__PURE__ */ React3.createElement(React3.Fragment, null, (_d = props.items) == null ? void 0 : _d.map((item, index) => /* @__PURE__ */ React3.createElement(
|
|
1570
316
|
FwSidebarItem,
|
|
1571
317
|
{
|
|
1572
318
|
key: index + item.href,
|
|
@@ -1580,33 +326,30 @@ function FwSidebarItem(props) {
|
|
|
1580
326
|
);
|
|
1581
327
|
}
|
|
1582
328
|
|
|
1583
|
-
// packages/react/components/index.tsx
|
|
1584
|
-
var import_ui4 = require("@xyd-js/ui");
|
|
1585
|
-
|
|
1586
329
|
// packages/react/utils/manualHydration.ts
|
|
1587
|
-
|
|
330
|
+
import React4 from "react";
|
|
1588
331
|
function manualHydration(obj, key = 0) {
|
|
1589
332
|
if (typeof obj !== "object" || obj === null) {
|
|
1590
|
-
return
|
|
333
|
+
return React4.createElement(React4.Fragment, { key });
|
|
1591
334
|
}
|
|
1592
335
|
const { type, props } = obj || {};
|
|
1593
336
|
if (typeof type !== "string" && typeof type !== "function") {
|
|
1594
|
-
return
|
|
337
|
+
return React4.createElement(React4.Fragment, { key });
|
|
1595
338
|
}
|
|
1596
339
|
let children = [];
|
|
1597
340
|
if (props == null ? void 0 : props.children) {
|
|
1598
341
|
if (Array.isArray(props.children)) {
|
|
1599
|
-
children = props.children.map((child,
|
|
342
|
+
children = props.children.map((child, i) => manualHydration(child, key + i)) || [];
|
|
1600
343
|
} else {
|
|
1601
344
|
children = [manualHydration(props.children, key)];
|
|
1602
345
|
}
|
|
1603
346
|
}
|
|
1604
347
|
const elementProps = { ...props, children, key };
|
|
1605
|
-
return
|
|
348
|
+
return React4.createElement(type, elementProps);
|
|
1606
349
|
}
|
|
1607
350
|
|
|
1608
351
|
// packages/react/hooks/useMatchedNav.tsx
|
|
1609
|
-
|
|
352
|
+
import { useLocation as useLocation2 } from "react-router";
|
|
1610
353
|
function normalizeHref(href) {
|
|
1611
354
|
if (href.startsWith("/")) {
|
|
1612
355
|
return href;
|
|
@@ -1616,7 +359,7 @@ function normalizeHref(href) {
|
|
|
1616
359
|
function useMatchedSubNav() {
|
|
1617
360
|
var _a, _b, _c;
|
|
1618
361
|
const settings = useSettings();
|
|
1619
|
-
const location = (
|
|
362
|
+
const location = useLocation2();
|
|
1620
363
|
const matchedSubnav = (_c = (_b = (_a = settings.structure) == null ? void 0 : _a.header) == null ? void 0 : _b.filter((item) => item.sub)) == null ? void 0 : _c.find((item) => {
|
|
1621
364
|
var _a2;
|
|
1622
365
|
return normalizeHref(location.pathname).startsWith(normalizeHref(((_a2 = item.sub) == null ? void 0 : _a2.match) || ""));
|
|
@@ -1631,28 +374,31 @@ function useMatchedSubNav() {
|
|
|
1631
374
|
function FwNavLogo() {
|
|
1632
375
|
var _a, _b, _c;
|
|
1633
376
|
const settings = useSettings();
|
|
1634
|
-
const logo =
|
|
1635
|
-
return /* @__PURE__ */
|
|
377
|
+
const logo = isValidElement((_a = settings == null ? void 0 : settings.styling) == null ? void 0 : _a.logo) ? (_b = settings == null ? void 0 : settings.styling) == null ? void 0 : _b.logo : manualHydration((_c = settings == null ? void 0 : settings.styling) == null ? void 0 : _c.logo);
|
|
378
|
+
return /* @__PURE__ */ React5.createElement("a", { href: "/" }, logo);
|
|
1636
379
|
}
|
|
1637
380
|
function FwNav({ kind }) {
|
|
1638
381
|
var _a, _b, _c;
|
|
1639
382
|
const matchedSubnav = useMatchedSubNav();
|
|
1640
|
-
const location = (
|
|
383
|
+
const location = useLocation3();
|
|
1641
384
|
const settings = useSettings();
|
|
1642
385
|
const headers = matchedSubnav ? matchedSubnav == null ? void 0 : matchedSubnav.items : (_a = settings == null ? void 0 : settings.structure) == null ? void 0 : _a.header;
|
|
1643
386
|
const active = headers == null ? void 0 : headers.find((item) => location.pathname.startsWith(item.url || ""));
|
|
1644
|
-
return /* @__PURE__ */
|
|
1645
|
-
|
|
387
|
+
return /* @__PURE__ */ React5.createElement(
|
|
388
|
+
Nav,
|
|
1646
389
|
{
|
|
1647
390
|
value: (active == null ? void 0 : active.url) || "",
|
|
1648
391
|
kind,
|
|
1649
|
-
logo: /* @__PURE__ */
|
|
392
|
+
logo: /* @__PURE__ */ React5.createElement(FwNavLogo, null),
|
|
1650
393
|
onChange: () => {
|
|
1651
394
|
}
|
|
1652
395
|
},
|
|
1653
396
|
(_c = (_b = settings == null ? void 0 : settings.structure) == null ? void 0 : _b.header) == null ? void 0 : _c.map((item, index) => {
|
|
1654
|
-
|
|
1655
|
-
|
|
397
|
+
if (item.sub) {
|
|
398
|
+
return null;
|
|
399
|
+
}
|
|
400
|
+
return /* @__PURE__ */ React5.createElement(
|
|
401
|
+
Nav.Item,
|
|
1656
402
|
{
|
|
1657
403
|
key: index + (item.url || "") + item.name,
|
|
1658
404
|
href: (item == null ? void 0 : item.url) || "",
|
|
@@ -1665,13 +411,13 @@ function FwNav({ kind }) {
|
|
|
1665
411
|
}
|
|
1666
412
|
function FwSubNav() {
|
|
1667
413
|
const matchedSubnav = useMatchedSubNav();
|
|
1668
|
-
const location = (
|
|
414
|
+
const location = useLocation3();
|
|
1669
415
|
if (!matchedSubnav) {
|
|
1670
416
|
return null;
|
|
1671
417
|
}
|
|
1672
418
|
const active = matchedSubnav == null ? void 0 : matchedSubnav.items.findLast((item) => location.pathname.startsWith(item.url || ""));
|
|
1673
|
-
return /* @__PURE__ */
|
|
1674
|
-
|
|
419
|
+
return /* @__PURE__ */ React5.createElement(
|
|
420
|
+
SubNav,
|
|
1675
421
|
{
|
|
1676
422
|
title: (matchedSubnav == null ? void 0 : matchedSubnav.name) || "",
|
|
1677
423
|
value: (active == null ? void 0 : active.url) || "",
|
|
@@ -1679,18 +425,18 @@ function FwSubNav() {
|
|
|
1679
425
|
}
|
|
1680
426
|
},
|
|
1681
427
|
matchedSubnav == null ? void 0 : matchedSubnav.items.map((item, index) => {
|
|
1682
|
-
return /* @__PURE__ */
|
|
428
|
+
return /* @__PURE__ */ React5.createElement(SubNav.Item, { value: item.url || "", href: item.url }, item.name);
|
|
1683
429
|
})
|
|
1684
430
|
);
|
|
1685
431
|
}
|
|
1686
432
|
function recursiveSearch2(items, href, levels = []) {
|
|
1687
|
-
for (let
|
|
1688
|
-
const item = items[
|
|
433
|
+
for (let i = 0; i < items.length; i++) {
|
|
434
|
+
const item = items[i];
|
|
1689
435
|
if (item.href === href) {
|
|
1690
|
-
return [...levels,
|
|
436
|
+
return [...levels, i];
|
|
1691
437
|
}
|
|
1692
438
|
if (item.items) {
|
|
1693
|
-
const result = recursiveSearch2(item.items, href, [...levels,
|
|
439
|
+
const result = recursiveSearch2(item.items, href, [...levels, i]);
|
|
1694
440
|
if (result) {
|
|
1695
441
|
return result;
|
|
1696
442
|
}
|
|
@@ -1707,19 +453,19 @@ function FwSidebarGroups(props) {
|
|
|
1707
453
|
if (typeof anchor.icon === "string") {
|
|
1708
454
|
switch (anchor.icon) {
|
|
1709
455
|
case "icon-cookbook": {
|
|
1710
|
-
icon = /* @__PURE__ */
|
|
456
|
+
icon = /* @__PURE__ */ React5.createElement(IconCookbook, null);
|
|
1711
457
|
break;
|
|
1712
458
|
}
|
|
1713
459
|
case "icon-community": {
|
|
1714
|
-
icon = /* @__PURE__ */
|
|
460
|
+
icon = /* @__PURE__ */ React5.createElement(IconCommunity, null);
|
|
1715
461
|
break;
|
|
1716
462
|
}
|
|
1717
463
|
case "icon-marketplace": {
|
|
1718
|
-
icon = /* @__PURE__ */
|
|
464
|
+
icon = /* @__PURE__ */ React5.createElement(IconMarketplace, null);
|
|
1719
465
|
break;
|
|
1720
466
|
}
|
|
1721
467
|
case "icon-sdk": {
|
|
1722
|
-
icon = /* @__PURE__ */
|
|
468
|
+
icon = /* @__PURE__ */ React5.createElement(IconSDK, null);
|
|
1723
469
|
break;
|
|
1724
470
|
}
|
|
1725
471
|
default: {
|
|
@@ -1727,11 +473,11 @@ function FwSidebarGroups(props) {
|
|
|
1727
473
|
}
|
|
1728
474
|
}
|
|
1729
475
|
} else {
|
|
1730
|
-
icon =
|
|
476
|
+
icon = isValidElement(anchor.icon) ? anchor.icon : manualHydration(anchor.icon);
|
|
1731
477
|
}
|
|
1732
|
-
return /* @__PURE__ */
|
|
478
|
+
return /* @__PURE__ */ React5.createElement(UISidebar2.FooterItem, { href: anchor.url, icon }, anchor.name);
|
|
1733
479
|
});
|
|
1734
|
-
const location = (
|
|
480
|
+
const location = useLocation3();
|
|
1735
481
|
const initialActiveItems = [];
|
|
1736
482
|
groups.forEach((group) => {
|
|
1737
483
|
const activeLevels = recursiveSearch2(group.items, location.pathname) || [];
|
|
@@ -1742,14 +488,14 @@ function FwSidebarGroups(props) {
|
|
|
1742
488
|
}, group.items);
|
|
1743
489
|
return group;
|
|
1744
490
|
});
|
|
1745
|
-
return /* @__PURE__ */
|
|
491
|
+
return /* @__PURE__ */ React5.createElement(
|
|
1746
492
|
FwSidebarGroupContext,
|
|
1747
493
|
{
|
|
1748
494
|
onePathBehaviour: props.onePathBehaviour,
|
|
1749
495
|
clientSideRouting: props.clientSideRouting,
|
|
1750
496
|
initialActiveItems
|
|
1751
497
|
},
|
|
1752
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ React5.createElement(UISidebar2, { footerItems: footerItems && footerItems }, groups == null ? void 0 : groups.map((group, index) => /* @__PURE__ */ React5.createElement(
|
|
1753
499
|
FwSidebarItemGroup,
|
|
1754
500
|
{
|
|
1755
501
|
key: index + group.group,
|
|
@@ -1779,10 +525,10 @@ function FwToc() {
|
|
|
1779
525
|
};
|
|
1780
526
|
flatten(toc);
|
|
1781
527
|
const tocFinal = flatToc.filter((item) => item.depth === 2);
|
|
1782
|
-
const location = (
|
|
528
|
+
const location = useLocation3();
|
|
1783
529
|
const defaultValue = location.hash ? location.hash.replace("#", "") : (_a = tocFinal[0]) == null ? void 0 : _a.value;
|
|
1784
|
-
return /* @__PURE__ */
|
|
1785
|
-
|
|
530
|
+
return /* @__PURE__ */ React5.createElement(Toc, { defaultValue }, tocFinal.map((item, index) => /* @__PURE__ */ React5.createElement(
|
|
531
|
+
Toc.Item,
|
|
1786
532
|
{
|
|
1787
533
|
key: index + item.value + item.depth,
|
|
1788
534
|
value: item.value
|
|
@@ -1792,22 +538,18 @@ function FwToc() {
|
|
|
1792
538
|
}
|
|
1793
539
|
function FwBreadcrumbs() {
|
|
1794
540
|
const breadcrumbs = useBreadcrumbs();
|
|
1795
|
-
return /* @__PURE__ */
|
|
1796
|
-
|
|
541
|
+
return /* @__PURE__ */ React5.createElement(
|
|
542
|
+
Breadcrumbs,
|
|
1797
543
|
{
|
|
1798
544
|
items: breadcrumbs || []
|
|
1799
545
|
}
|
|
1800
546
|
);
|
|
1801
547
|
}
|
|
1802
548
|
function FwNavLinks() {
|
|
1803
|
-
var _a, _b;
|
|
1804
549
|
const navlinks = useNavLinks();
|
|
1805
|
-
if (typeof ((_a = navlinks == null ? void 0 : navlinks.prev) == null ? void 0 : _a.title) !== "string" || typeof ((_b = navlinks == null ? void 0 : navlinks.next) == null ? void 0 : _b.title) !== "string") {
|
|
1806
|
-
return null;
|
|
1807
|
-
}
|
|
1808
550
|
if ((navlinks == null ? void 0 : navlinks.prev) || (navlinks == null ? void 0 : navlinks.next)) {
|
|
1809
|
-
return /* @__PURE__ */
|
|
1810
|
-
|
|
551
|
+
return /* @__PURE__ */ React5.createElement(
|
|
552
|
+
NavLinks,
|
|
1811
553
|
{
|
|
1812
554
|
prev: navlinks.prev,
|
|
1813
555
|
next: navlinks.next
|
|
@@ -1817,7 +559,7 @@ function FwNavLinks() {
|
|
|
1817
559
|
return null;
|
|
1818
560
|
}
|
|
1819
561
|
function IconCookbook() {
|
|
1820
|
-
return /* @__PURE__ */
|
|
562
|
+
return /* @__PURE__ */ React5.createElement(
|
|
1821
563
|
"svg",
|
|
1822
564
|
{
|
|
1823
565
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1825,7 +567,7 @@ function IconCookbook() {
|
|
|
1825
567
|
width: "1em",
|
|
1826
568
|
height: "1em"
|
|
1827
569
|
},
|
|
1828
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ React5.createElement(
|
|
1829
571
|
"path",
|
|
1830
572
|
{
|
|
1831
573
|
fillRule: "evenodd",
|
|
@@ -1836,7 +578,7 @@ function IconCookbook() {
|
|
|
1836
578
|
);
|
|
1837
579
|
}
|
|
1838
580
|
function IconCommunity() {
|
|
1839
|
-
return /* @__PURE__ */
|
|
581
|
+
return /* @__PURE__ */ React5.createElement(
|
|
1840
582
|
"svg",
|
|
1841
583
|
{
|
|
1842
584
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1845,7 +587,7 @@ function IconCommunity() {
|
|
|
1845
587
|
width: "1em",
|
|
1846
588
|
height: "1em"
|
|
1847
589
|
},
|
|
1848
|
-
/* @__PURE__ */
|
|
590
|
+
/* @__PURE__ */ React5.createElement(
|
|
1849
591
|
"path",
|
|
1850
592
|
{
|
|
1851
593
|
fillRule: "evenodd",
|
|
@@ -1856,7 +598,7 @@ function IconCommunity() {
|
|
|
1856
598
|
);
|
|
1857
599
|
}
|
|
1858
600
|
function IconMarketplace() {
|
|
1859
|
-
return /* @__PURE__ */
|
|
601
|
+
return /* @__PURE__ */ React5.createElement(
|
|
1860
602
|
"svg",
|
|
1861
603
|
{
|
|
1862
604
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1865,7 +607,7 @@ function IconMarketplace() {
|
|
|
1865
607
|
width: "1em",
|
|
1866
608
|
height: "1em"
|
|
1867
609
|
},
|
|
1868
|
-
/* @__PURE__ */
|
|
610
|
+
/* @__PURE__ */ React5.createElement(
|
|
1869
611
|
"path",
|
|
1870
612
|
{
|
|
1871
613
|
"fill-rule": "evenodd",
|
|
@@ -1873,7 +615,7 @@ function IconMarketplace() {
|
|
|
1873
615
|
d: "M3.78163 3.28449C3.8768 2.96725 4.16879 2.75 4.5 2.75H19.5C19.8312 2.75 20.1232 2.96725 20.2184 3.28449L21.7184 8.28449C21.7393 8.3544 21.75 8.42701 21.75 8.5C21.75 10.5711 20.0711 12.25 18 12.25C16.7733 12.25 15.6842 11.661 15 10.7504C14.3158 11.661 13.2267 12.25 12 12.25C10.7733 12.25 9.68417 11.661 9 10.7504C8.31583 11.661 7.2267 12.25 6 12.25C3.92893 12.25 2.25 10.5711 2.25 8.5C2.25 8.42701 2.26066 8.3544 2.28163 8.28449L3.78163 3.28449ZM9.75 8.5C9.75 9.74264 10.7574 10.75 12 10.75C13.2426 10.75 14.25 9.74264 14.25 8.5C14.25 8.08579 14.5858 7.75 15 7.75C15.4142 7.75 15.75 8.08579 15.75 8.5C15.75 9.74264 16.7574 10.75 18 10.75C19.2083 10.75 20.1942 9.79754 20.2477 8.60244L18.942 4.25H5.05802L3.75229 8.60244C3.80584 9.79753 4.79169 10.75 6 10.75C7.24264 10.75 8.25 9.74264 8.25 8.5C8.25 8.08579 8.58579 7.75 9 7.75C9.41421 7.75 9.75 8.08579 9.75 8.5Z"
|
|
1874
616
|
}
|
|
1875
617
|
),
|
|
1876
|
-
/* @__PURE__ */
|
|
618
|
+
/* @__PURE__ */ React5.createElement(
|
|
1877
619
|
"path",
|
|
1878
620
|
{
|
|
1879
621
|
"fill-rule": "evenodd",
|
|
@@ -1881,7 +623,7 @@ function IconMarketplace() {
|
|
|
1881
623
|
d: "M4 10.25C4.41421 10.25 4.75 10.5858 4.75 11V19.75H6.5C6.91421 19.75 7.25 20.0858 7.25 20.5C7.25 20.9142 6.91421 21.25 6.5 21.25H4C3.58579 21.25 3.25 20.9142 3.25 20.5V11C3.25 10.5858 3.58579 10.25 4 10.25ZM20 10.25C20.4142 10.25 20.75 10.5858 20.75 11V20.5C20.75 20.9142 20.4142 21.25 20 21.25H10.5C10.0858 21.25 9.75 20.9142 9.75 20.5C9.75 20.0858 10.0858 19.75 10.5 19.75H19.25V11C19.25 10.5858 19.5858 10.25 20 10.25Z"
|
|
1882
624
|
}
|
|
1883
625
|
),
|
|
1884
|
-
/* @__PURE__ */
|
|
626
|
+
/* @__PURE__ */ React5.createElement(
|
|
1885
627
|
"path",
|
|
1886
628
|
{
|
|
1887
629
|
d: "M12.003 19C11.31 18.9996 10.6384 18.7598 10.102 18.3213C9.56564 17.8829 9.19745 17.2726 9.05983 16.594C8.92222 15.9154 9.02364 15.2101 9.34693 14.5976C9.67022 13.9852 10.1955 13.5032 10.8337 13.2333C11.5673 12.9262 12.393 12.9221 13.1296 13.2222C13.8661 13.5222 14.4536 14.1018 14.7631 14.8338C15.0727 15.5659 15.0791 16.3907 14.7808 17.1274C14.4827 17.8642 13.9042 18.4527 13.1724 18.7641C12.8025 18.9205 12.4047 19.0007 12.003 19ZM11.1458 14.7215C11.1124 14.7215 11.0803 14.7348 11.0567 14.7584C11.0331 14.782 11.0198 14.8141 11.0198 14.8475V17.1923C11.0198 17.2258 11.0331 17.2578 11.0567 17.2814C11.0803 17.305 11.1124 17.3183 11.1458 17.3183C11.1671 17.3183 11.188 17.3128 11.2065 17.3024L13.3399 16.13C13.3597 16.1192 13.3761 16.1032 13.3876 16.0838C13.3991 16.0644 13.4052 16.0423 13.4052 16.0197C13.4052 15.9972 13.3991 15.9751 13.3876 15.9557C13.3761 15.9362 13.3597 15.9203 13.3399 15.9094L11.2063 14.7373C11.1879 14.727 11.1671 14.7215 11.1458 14.7215Z"
|
|
@@ -1890,7 +632,7 @@ function IconMarketplace() {
|
|
|
1890
632
|
);
|
|
1891
633
|
}
|
|
1892
634
|
function IconSDK() {
|
|
1893
|
-
return /* @__PURE__ */
|
|
635
|
+
return /* @__PURE__ */ React5.createElement(
|
|
1894
636
|
"svg",
|
|
1895
637
|
{
|
|
1896
638
|
viewBox: "0 0 15 15",
|
|
@@ -1898,7 +640,7 @@ function IconSDK() {
|
|
|
1898
640
|
width: "1em",
|
|
1899
641
|
height: "1em"
|
|
1900
642
|
},
|
|
1901
|
-
/* @__PURE__ */
|
|
643
|
+
/* @__PURE__ */ React5.createElement(
|
|
1902
644
|
"path",
|
|
1903
645
|
{
|
|
1904
646
|
d: "M7.28856 0.796908C7.42258 0.734364 7.57742 0.734364 7.71144 0.796908L13.7114 3.59691C13.8875 3.67906 14 3.85574 14 4.05V10.95C14 11.1443 13.8875 11.3209 13.7114 11.4031L7.71144 14.2031C7.57742 14.2656 7.42258 14.2656 7.28856 14.2031L1.28856 11.4031C1.11252 11.3209 1 11.1443 1 10.95V4.05C1 3.85574 1.11252 3.67906 1.28856 3.59691L7.28856 0.796908ZM2 4.80578L7 6.93078V12.9649L2 10.6316V4.80578ZM8 12.9649L13 10.6316V4.80578L8 6.93078V12.9649ZM7.5 6.05672L12.2719 4.02866L7.5 1.80176L2.72809 4.02866L7.5 6.05672Z",
|
|
@@ -1909,8 +651,7 @@ function IconSDK() {
|
|
|
1909
651
|
)
|
|
1910
652
|
);
|
|
1911
653
|
}
|
|
1912
|
-
|
|
1913
|
-
0 && (module.exports = {
|
|
654
|
+
export {
|
|
1914
655
|
Framework,
|
|
1915
656
|
FwBreadcrumbs,
|
|
1916
657
|
FwNav,
|
|
@@ -1919,63 +660,5 @@ function IconSDK() {
|
|
|
1919
660
|
FwSubNav,
|
|
1920
661
|
FwToc,
|
|
1921
662
|
useMatchedSubNav
|
|
1922
|
-
}
|
|
1923
|
-
/*! Bundled license information:
|
|
1924
|
-
|
|
1925
|
-
lucide-react/dist/esm/shared/src/utils.js:
|
|
1926
|
-
(**
|
|
1927
|
-
* @license lucide-react v0.447.0 - ISC
|
|
1928
|
-
*
|
|
1929
|
-
* This source code is licensed under the ISC license.
|
|
1930
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1931
|
-
*)
|
|
1932
|
-
|
|
1933
|
-
lucide-react/dist/esm/defaultAttributes.js:
|
|
1934
|
-
(**
|
|
1935
|
-
* @license lucide-react v0.447.0 - ISC
|
|
1936
|
-
*
|
|
1937
|
-
* This source code is licensed under the ISC license.
|
|
1938
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1939
|
-
*)
|
|
1940
|
-
|
|
1941
|
-
lucide-react/dist/esm/Icon.js:
|
|
1942
|
-
(**
|
|
1943
|
-
* @license lucide-react v0.447.0 - ISC
|
|
1944
|
-
*
|
|
1945
|
-
* This source code is licensed under the ISC license.
|
|
1946
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1947
|
-
*)
|
|
1948
|
-
|
|
1949
|
-
lucide-react/dist/esm/createLucideIcon.js:
|
|
1950
|
-
(**
|
|
1951
|
-
* @license lucide-react v0.447.0 - ISC
|
|
1952
|
-
*
|
|
1953
|
-
* This source code is licensed under the ISC license.
|
|
1954
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1955
|
-
*)
|
|
1956
|
-
|
|
1957
|
-
lucide-react/dist/esm/icons/chevron-left.js:
|
|
1958
|
-
(**
|
|
1959
|
-
* @license lucide-react v0.447.0 - ISC
|
|
1960
|
-
*
|
|
1961
|
-
* This source code is licensed under the ISC license.
|
|
1962
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1963
|
-
*)
|
|
1964
|
-
|
|
1965
|
-
lucide-react/dist/esm/icons/chevron-right.js:
|
|
1966
|
-
(**
|
|
1967
|
-
* @license lucide-react v0.447.0 - ISC
|
|
1968
|
-
*
|
|
1969
|
-
* This source code is licensed under the ISC license.
|
|
1970
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1971
|
-
*)
|
|
1972
|
-
|
|
1973
|
-
lucide-react/dist/esm/lucide-react.js:
|
|
1974
|
-
(**
|
|
1975
|
-
* @license lucide-react v0.447.0 - ISC
|
|
1976
|
-
*
|
|
1977
|
-
* This source code is licensed under the ISC license.
|
|
1978
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1979
|
-
*)
|
|
1980
|
-
*/
|
|
663
|
+
};
|
|
1981
664
|
//# sourceMappingURL=react.js.map
|