@sia.soul/sia-react-ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/THIRD_PARTY_NOTICES.md +12 -0
- package/dist/Select-CJJ5LQap.d.cts +44 -0
- package/dist/Select-CJJ5LQap.d.ts +44 -0
- package/dist/chart.cjs +7523 -0
- package/dist/chart.css +1036 -0
- package/dist/chart.d.cts +2061 -0
- package/dist/chart.d.ts +2061 -0
- package/dist/chart.js +120 -0
- package/dist/chunk-34TTF4Y7.js +812 -0
- package/dist/chunk-6VXOLMKZ.js +381 -0
- package/dist/chunk-DZ45HRVP.js +583 -0
- package/dist/chunk-I342FGQY.js +7344 -0
- package/dist/chunk-JKZGAZMB.js +318 -0
- package/dist/chunk-MBS2HXLZ.js +59 -0
- package/dist/chunk-NZAT2RUM.js +60 -0
- package/dist/chunk-OMA75YLM.js +298 -0
- package/dist/chunk-ULEGTKXR.js +2138 -0
- package/dist/chunk-YCVXUMGP.js +945 -0
- package/dist/core-BeiAQiDY.d.ts +1076 -0
- package/dist/core-DRICIs2n.d.cts +1076 -0
- package/dist/core.cjs +3353 -0
- package/dist/core.css +8734 -0
- package/dist/core.d.cts +3 -0
- package/dist/core.d.ts +3 -0
- package/dist/core.js +45 -0
- package/dist/index.cjs +19658 -0
- package/dist/index.css +9762 -0
- package/dist/index.d.cts +1222 -0
- package/dist/index.d.ts +1222 -0
- package/dist/index.js +6843 -0
- package/dist/markdown-editor.cjs +417 -0
- package/dist/markdown-editor.d.cts +28 -0
- package/dist/markdown-editor.d.ts +28 -0
- package/dist/markdown-editor.js +6 -0
- package/dist/rich-text-editor.cjs +1853 -0
- package/dist/rich-text-editor.d.cts +27 -0
- package/dist/rich-text-editor.d.ts +27 -0
- package/dist/rich-text-editor.js +11 -0
- package/dist/select-date-range-BDWdo7qt.d.ts +84 -0
- package/dist/select-date-range-DWik3ADr.d.cts +84 -0
- package/dist/select-date-range.cjs +2074 -0
- package/dist/select-date-range.d.cts +3 -0
- package/dist/select-date-range.d.ts +3 -0
- package/dist/select-date-range.js +8 -0
- package/package.json +129 -0
package/dist/core.cjs
ADDED
|
@@ -0,0 +1,3353 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/core.ts
|
|
21
|
+
var core_exports = {};
|
|
22
|
+
__export(core_exports, {
|
|
23
|
+
Breadcrumb: () => Breadcrumb,
|
|
24
|
+
Button: () => Button,
|
|
25
|
+
Card: () => Card,
|
|
26
|
+
Collapse: () => Collapse,
|
|
27
|
+
FloatButton: () => FloatButton2,
|
|
28
|
+
Icon: () => Icon,
|
|
29
|
+
Input: () => Input,
|
|
30
|
+
Modal: () => Modal2,
|
|
31
|
+
Progress: () => Progress,
|
|
32
|
+
Segmented: () => Segmented,
|
|
33
|
+
Select: () => Select,
|
|
34
|
+
Tabs: () => Tabs,
|
|
35
|
+
Tag: () => Tag,
|
|
36
|
+
Typography: () => Typography,
|
|
37
|
+
Upload: () => Upload,
|
|
38
|
+
message: () => message
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(core_exports);
|
|
41
|
+
|
|
42
|
+
// src/components/Button.tsx
|
|
43
|
+
var import_react = require("react");
|
|
44
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
|
+
var Button = (0, import_react.forwardRef)(function Button2({
|
|
46
|
+
variant = "default",
|
|
47
|
+
size = "medium",
|
|
48
|
+
loading = false,
|
|
49
|
+
block = false,
|
|
50
|
+
danger = false,
|
|
51
|
+
icon,
|
|
52
|
+
iconPosition = "start",
|
|
53
|
+
className = "",
|
|
54
|
+
children,
|
|
55
|
+
disabled,
|
|
56
|
+
onClick,
|
|
57
|
+
style,
|
|
58
|
+
...props
|
|
59
|
+
}, forwardedRef) {
|
|
60
|
+
const localRef = (0, import_react.useRef)(null);
|
|
61
|
+
function setRef(node) {
|
|
62
|
+
localRef.current = node;
|
|
63
|
+
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
64
|
+
else if (forwardedRef) forwardedRef.current = node;
|
|
65
|
+
}
|
|
66
|
+
function handleClick(event) {
|
|
67
|
+
const button = localRef.current;
|
|
68
|
+
if (button && variant === "primary") {
|
|
69
|
+
const rect = button.getBoundingClientRect();
|
|
70
|
+
button.style.setProperty("--sia-wave-x", `${event.clientX - rect.left}px`);
|
|
71
|
+
button.style.setProperty("--sia-wave-y", `${event.clientY - rect.top}px`);
|
|
72
|
+
button.dataset.wave = "active";
|
|
73
|
+
window.setTimeout(() => delete button.dataset.wave, 360);
|
|
74
|
+
}
|
|
75
|
+
onClick?.(event);
|
|
76
|
+
}
|
|
77
|
+
const mergedStyle = block ? { ...style, width: "100%" } : style ?? {};
|
|
78
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
79
|
+
"button",
|
|
80
|
+
{
|
|
81
|
+
ref: setRef,
|
|
82
|
+
type: "button",
|
|
83
|
+
className: `sia-button sia-button--${variant} sia-button--${size}${danger ? " sia-button--danger" : ""} ${className}`.trim(),
|
|
84
|
+
"aria-busy": loading || void 0,
|
|
85
|
+
disabled: disabled || loading,
|
|
86
|
+
onClick: handleClick,
|
|
87
|
+
style: mergedStyle,
|
|
88
|
+
...props,
|
|
89
|
+
children: [
|
|
90
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sia-button__spinner", "aria-hidden": "true" }) : icon && iconPosition === "start" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sia-button__icon", children: icon }) : null,
|
|
91
|
+
children !== void 0 && children !== null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children }) : null,
|
|
92
|
+
!loading && icon && iconPosition === "end" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sia-button__icon", children: icon }) : null
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// src/components/Card.tsx
|
|
99
|
+
var import_react3 = require("react");
|
|
100
|
+
|
|
101
|
+
// src/components/Icon.tsx
|
|
102
|
+
var import_react2 = require("react");
|
|
103
|
+
|
|
104
|
+
// src/components/IconCatalog.tsx
|
|
105
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
106
|
+
var extendedIconPaths = {
|
|
107
|
+
"notepad-file": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { transform: "scale(0.0234375)", fill: "currentColor", stroke: "none", children: [
|
|
108
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M752 80H272c-70.4 0-128 57.6-128 128v608c0 70.4 57.6 128 128 128h353.6c33.6 0 65.6-12.8 91.2-36.8l126.4-126.4c24-24 36.8-56 36.8-91.2V208c0-70.4-57.6-128-128-128zM208 816V208c0-35.2 28.8-64 64-64h480c35.2 0 64 28.8 64 64v464h-96c-70.4 0-128 57.6-128 128v80H272c-35.2 0-64-28.8-64-64z m462.4 44.8c-4.8 4.8-9.6 8-14.4 11.2v-72c0-35.2 28.8-64 64-64h75.2L670.4 860.8z" }),
|
|
109
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M368 352h288c17.6 0 32-14.4 32-32s-14.4-32-32-32H368c-17.6 0-32 14.4-32 32s14.4 32 32 32z m128 256H368c-17.6 0-32 14.4-32 32s14.4 32 32 32h128c17.6 0 32-14.4 32-32s-14.4-32-32-32z m-128-96h288c17.6 0 32-14.4 32-32s-14.4-32-32-32H368c-17.6 0-32 14.4-32 32s14.4 32 32 32z" })
|
|
110
|
+
] }),
|
|
111
|
+
"notepad-folder": /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("g", { transform: "scale(0.0234375)", fill: "currentColor", stroke: "none", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M510.4 243.2c8 27.2 33.6 44.8 60.8 44.8h259.2c0-35.2-28.8-64-64-64H504l6.4 19.2zM484.8 160h281.6c70.4 0 128 57.6 128 128v25.6c30.4 24 51.2 60.8 51.2 102.4v384c0 70.4-57.6 128-128 128H208c-70.4 0-128-57.6-128-128V224c0-70.4 57.6-128 128-128h164.8c46.4 0 89.6 25.6 112 64z m-112 0H208c-35.2 0-64 28.8-64 64v576c0 35.2 28.8 64 64 64h608c35.2 0 64-28.8 64-64V416c0-35.2-28.8-64-64-64H574.4c-56 0-105.6-36.8-121.6-89.6l-19.2-57.6c-8-27.2-32-44.8-60.8-44.8zM272 704h256c17.6 0 32 14.4 32 32s-14.4 32-32 32H272c-17.6 0-32-14.4-32-32s14.4-32 32-32z" }) }),
|
|
112
|
+
"notepad-virtual-folder": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { transform: "scale(0.0234375)", fill: "currentColor", stroke: "none", children: [
|
|
113
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M704 864H192c-89.6 0-160-70.4-160-160V192c0-89.6 70.4-160 160-160h512c89.6 0 160 70.4 160 160v512c0 89.6-70.4 160-160 160zM192 96c-51.2 0-96 44.8-96 96v512c0 51.2 44.8 96 96 96h512c51.2 0 96-44.8 96-96V192c0-51.2-44.8-96-96-96H192z" }),
|
|
114
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M832 992H320c-19.2 0-32-12.8-32-32s12.8-32 32-32h512c51.2 0 96-44.8 96-96V320c0-19.2 12.8-32 32-32s32 12.8 32 32v512c0 89.6-70.4 160-160 160z" })
|
|
115
|
+
] }),
|
|
116
|
+
"step-backward": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
117
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M6 5v14" }),
|
|
118
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m18 6-8 6 8 6V6Z" })
|
|
119
|
+
] }),
|
|
120
|
+
"step-forward": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
121
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M18 5v14" }),
|
|
122
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m6 6 8 6-8 6V6Z" })
|
|
123
|
+
] }),
|
|
124
|
+
"fast-backward": /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m11 6-7 6 7 6V6ZM20 6l-7 6 7 6V6Z" }) }),
|
|
125
|
+
"fast-forward": /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m13 6 7 6-7 6V6ZM4 6l7 6-7 6V6Z" }) }),
|
|
126
|
+
"corner-up-left": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
127
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m9 5-5 5 5 5" }),
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 10h9a7 7 0 0 1 7 7v2" })
|
|
129
|
+
] }),
|
|
130
|
+
"corner-up-right": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
131
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m15 5 5 5-5 5" }),
|
|
132
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M20 10h-9a7 7 0 0 0-7 7v2" })
|
|
133
|
+
] }),
|
|
134
|
+
"swap-horizontal": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
135
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 8h15m0 0-4-4m4 4-4 4" }),
|
|
136
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M20 16H5m0 0 4-4m-4 4 4 4" })
|
|
137
|
+
] }),
|
|
138
|
+
"swap-vertical": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
139
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 4v15m0 0-4-4m4 4 4-4" }),
|
|
140
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M16 20V5m0 0-4 4m4-4 4 4" })
|
|
141
|
+
] }),
|
|
142
|
+
expand: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9 4H4v5M4 4l6 6M15 20h5v-5m0 5-6-6" }) }),
|
|
143
|
+
shrink: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M10 10H5V5m0 5 6-6M14 14h5v5m0-5-6 6" }) }),
|
|
144
|
+
fullscreen: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9 4H4v5M15 4h5v5M9 20H4v-5M15 20h5v-5" }),
|
|
145
|
+
"fullscreen-exit": /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 9h5V4M20 9h-5V4M4 15h5v5M20 15h-5v5" }),
|
|
146
|
+
"menu-fold": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
147
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 6h16M4 12h10M4 18h16" }),
|
|
148
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m18 9-3 3 3 3" })
|
|
149
|
+
] }),
|
|
150
|
+
"menu-unfold": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
151
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 6h16M10 12h10M4 18h16" }),
|
|
152
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m6 9 3 3-3 3" })
|
|
153
|
+
] }),
|
|
154
|
+
login: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M10 5H5v14h5M13 8l4 4-4 4M8 12h9" }) }),
|
|
155
|
+
logout: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M14 5h5v14h-5M11 8l-4 4 4 4M16 12H7" }) }),
|
|
156
|
+
move: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
157
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 3v18M3 12h18" }),
|
|
158
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m9 6 3-3 3 3M9 18l3 3 3-3M6 9l-3 3 3 3M18 9l3 3-3 3" })
|
|
159
|
+
] }),
|
|
160
|
+
"vertical-align-top": /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 4h16M12 7v13M8 11l4-4 4 4" }) }),
|
|
161
|
+
"vertical-align-middle": /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 12h16M12 4v16M8 8l4 4 4-4M8 16l4-4 4 4" }) }),
|
|
162
|
+
"vertical-align-bottom": /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 20h16M12 4v13M8 13l4 4 4-4" }) }),
|
|
163
|
+
"square-plus": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
164
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "3" }),
|
|
165
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 8v8M8 12h8" })
|
|
166
|
+
] }),
|
|
167
|
+
"square-minus": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
168
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "3" }),
|
|
169
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 12h8" })
|
|
170
|
+
] }),
|
|
171
|
+
"square-check": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
172
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "3" }),
|
|
173
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m8 12 3 3 6-7" })
|
|
174
|
+
] }),
|
|
175
|
+
"square-close": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
176
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "3" }),
|
|
177
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m8.5 8.5 7 7m0-7-7 7" })
|
|
178
|
+
] }),
|
|
179
|
+
"tab-plus": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
180
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2.5" }),
|
|
181
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 9h18M7 6.5h.1M10 6.5h.1M15 12v6M12 15h6" })
|
|
182
|
+
] }),
|
|
183
|
+
"folder-plus": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
184
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 6h7l2 2h9v11H3V6Z" }),
|
|
185
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M16 11v6M13 14h6" })
|
|
186
|
+
] }),
|
|
187
|
+
pin: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 3h8l-1.5 5 3 3v2H13v8l-2-2v-6H6.5v-2l3-3L8 3Z" }) }),
|
|
188
|
+
"pin-off": /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9.5 8 8 3h8l-1.5 5 3 3v2H13v4M6.5 13v-2l1-1M3 3l18 18" }) }),
|
|
189
|
+
stop: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
190
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
191
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M6 18 18 6" })
|
|
192
|
+
] }),
|
|
193
|
+
"help-circle": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
194
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
195
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9.7 9a2.5 2.5 0 1 1 3.6 2.3c-.9.5-1.3 1.1-1.3 2.1M12 17v.1" })
|
|
196
|
+
] }),
|
|
197
|
+
save: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
198
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 3h13l3 3v15H4V3Z" }),
|
|
199
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 3v6h8V3M8 21v-7h8v7" })
|
|
200
|
+
] }),
|
|
201
|
+
clipboard: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
202
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "5", y: "4", width: "14", height: "17", rx: "2.5" }),
|
|
203
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9 4.5V3h6v1.5M9 9h6M9 13h6M9 17h4" })
|
|
204
|
+
] }),
|
|
205
|
+
"clipboard-check": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
206
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "5", y: "4", width: "14", height: "17", rx: "2.5" }),
|
|
207
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9 4.5V3h6v1.5m-6 9 2 2 4-5" })
|
|
208
|
+
] }),
|
|
209
|
+
"file-plus": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
210
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M6 3h8l4 4v14H6V3Z" }),
|
|
211
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M14 3v5h4M12 11v6M9 14h6" })
|
|
212
|
+
] }),
|
|
213
|
+
"file-check": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
214
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M6 3h8l4 4v14H6V3Z" }),
|
|
215
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M14 3v5h4m-8 6 2 2 4-5" })
|
|
216
|
+
] }),
|
|
217
|
+
"file-warning": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
218
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M6 3h8l4 4v14H6V3Z" }),
|
|
219
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M14 3v5h4M12 11v4m0 3v.1" })
|
|
220
|
+
] }),
|
|
221
|
+
"file-spreadsheet": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
222
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M6 3h8l4 4v14H6V3Z" }),
|
|
223
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M14 3v5h4M8.5 11h7v7h-7v-7Zm0 3.5h7M12 11v7" })
|
|
224
|
+
] }),
|
|
225
|
+
"align-left": /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 6h16M4 10h11M4 14h16M4 18h11" }),
|
|
226
|
+
"align-center": /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 6h16M7 10h10M4 14h16M7 18h10" }),
|
|
227
|
+
"align-right": /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 6h16M9 10h11M4 14h16M9 18h11" }),
|
|
228
|
+
"align-justify": /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 6h16M4 10h16M4 14h16M4 18h16" }),
|
|
229
|
+
bold: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 4h6a4 4 0 0 1 0 8H7V4Zm0 8h7a4 4 0 0 1 0 8H7v-8Z" }),
|
|
230
|
+
italic: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M10 4h8M6 20h8M14 4 10 20" }),
|
|
231
|
+
underline: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 4v7a5 5 0 0 0 10 0V4M5 21h14" }) }),
|
|
232
|
+
strikethrough: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M5 12h14M8 8c.3-2.5 2-4 4.5-4 2.2 0 3.7 1 4.5 2.5M8 16c.8 2.5 2.5 4 5 4 2.2 0 3.8-1 4.5-2.5" }) }),
|
|
233
|
+
"list-ordered": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
234
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9 6h12M9 12h12M9 18h12" }),
|
|
235
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 5h1v3M4 11h2l-2 3h2M4 17h2l-2 3h2" })
|
|
236
|
+
] }),
|
|
237
|
+
"list-unordered": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
238
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9 6h12M9 12h12M9 18h12" }),
|
|
239
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "4.5", cy: "6", r: ".5" }),
|
|
240
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "4.5", cy: "12", r: ".5" }),
|
|
241
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "4.5", cy: "18", r: ".5" })
|
|
242
|
+
] }),
|
|
243
|
+
eraser: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
244
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m4 15 8-10 8 7-7 8H7l-3-3v-2Z" }),
|
|
245
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m9 9 8 7M13 20h8" })
|
|
246
|
+
] }),
|
|
247
|
+
highlighter: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
248
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m7 14 7-10 5 4-8 9-4-3Z" }),
|
|
249
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m5 17 6 3H3l2-3ZM15 14l4 3" })
|
|
250
|
+
] }),
|
|
251
|
+
table: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
252
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
253
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 9h18M3 14h18M9 4v16M15 4v16" })
|
|
254
|
+
] }),
|
|
255
|
+
columns: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
256
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
257
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 4v16" })
|
|
258
|
+
] }),
|
|
259
|
+
rows: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
260
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
261
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 9h18M3 15h18" })
|
|
262
|
+
] }),
|
|
263
|
+
"bar-chart": /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 21V10h4v11M10 21V4h4v17M16 21v-8h4v8M3 21h18" }) }),
|
|
264
|
+
"line-chart": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
265
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 20h18M4 17l5-6 4 3 7-9" }),
|
|
266
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "9", cy: "11", r: "1" }),
|
|
267
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "13", cy: "14", r: "1" })
|
|
268
|
+
] }),
|
|
269
|
+
"pie-chart": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
270
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M11 3a9 9 0 1 0 9 9h-9V3Z" }),
|
|
271
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M14 3.5A8.5 8.5 0 0 1 20.5 10H14V3.5Z" })
|
|
272
|
+
] }),
|
|
273
|
+
"area-chart": /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 20h18M4 17l5-6 4 3 7-9v12H4Z" }) }),
|
|
274
|
+
activity: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 12h4l2-6 4 13 3-7h5" }),
|
|
275
|
+
"trending-up": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
276
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m4 17 6-6 4 4 6-7" }),
|
|
277
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M15 8h5v5" })
|
|
278
|
+
] }),
|
|
279
|
+
"trending-down": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
280
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m4 7 6 6 4-4 6 7" }),
|
|
281
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M15 16h5v-5" })
|
|
282
|
+
] }),
|
|
283
|
+
database: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
284
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ellipse", { cx: "12", cy: "5", rx: "8", ry: "3" }),
|
|
285
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 5v7c0 1.7 3.6 3 8 3s8-1.3 8-3V5M4 12v7c0 1.7 3.6 3 8 3s8-1.3 8-3v-7" })
|
|
286
|
+
] }),
|
|
287
|
+
cloud: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 19h11a4 4 0 0 0 .5-8A7 7 0 0 0 5.2 9.5 4.8 4.8 0 0 0 7 19Z" }),
|
|
288
|
+
"cloud-download": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
289
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 18H5a4 4 0 0 1 .2-8 7 7 0 0 1 13.3 1A4 4 0 0 1 19 19h-2" }),
|
|
290
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 11v10m-4-4 4 4 4-4" })
|
|
291
|
+
] }),
|
|
292
|
+
"cloud-upload": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
293
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 18H5a4 4 0 0 1 .2-8 7 7 0 0 1 13.3 1A4 4 0 0 1 19 19h-2" }),
|
|
294
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 21V11m-4 4 4-4 4 4" })
|
|
295
|
+
] }),
|
|
296
|
+
server: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
297
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "4", width: "18", height: "7", rx: "2" }),
|
|
298
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "13", width: "18", height: "7", rx: "2" }),
|
|
299
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 7.5h.1M7 16.5h.1M11 7.5h6M11 16.5h6" })
|
|
300
|
+
] }),
|
|
301
|
+
desktop: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
302
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "3", width: "18", height: "14", rx: "2" }),
|
|
303
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 21h8M12 17v4" })
|
|
304
|
+
] }),
|
|
305
|
+
laptop: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
306
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M5 5h14v11H5V5Z" }),
|
|
307
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m3 19 2-3h14l2 3H3Z" })
|
|
308
|
+
] }),
|
|
309
|
+
mobile: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
310
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "7", y: "2", width: "10", height: "20", rx: "2.5" }),
|
|
311
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M10 5h4M12 19v.1" })
|
|
312
|
+
] }),
|
|
313
|
+
tablet: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
314
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "5", y: "2", width: "14", height: "20", rx: "2.5" }),
|
|
315
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M10 5h4M12 19v.1" })
|
|
316
|
+
] }),
|
|
317
|
+
printer: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
318
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 9V3h10v6M6 18H4V9h16v9h-2" }),
|
|
319
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 14h10v7H7v-7ZM17 11h.1" })
|
|
320
|
+
] }),
|
|
321
|
+
camera: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
322
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 7h4l2-3h6l2 3h4v13H3V7Z" }),
|
|
323
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "13", r: "4" })
|
|
324
|
+
] }),
|
|
325
|
+
video: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
326
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "5", width: "13", height: "14", rx: "2" }),
|
|
327
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m16 10 5-3v10l-5-3v-4Z" })
|
|
328
|
+
] }),
|
|
329
|
+
microphone: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
330
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "9", y: "3", width: "6", height: "12", rx: "3" }),
|
|
331
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M5 11a7 7 0 0 0 14 0M12 18v3M8 21h8" })
|
|
332
|
+
] }),
|
|
333
|
+
"volume-up": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
334
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 10h4l5-4v12l-5-4H4v-4Z" }),
|
|
335
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M16 9a4 4 0 0 1 0 6M18.5 6.5a8 8 0 0 1 0 11" })
|
|
336
|
+
] }),
|
|
337
|
+
"volume-off": /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 10h4l5-4v12l-5-4H4v-4ZM17 9l5 6m0-6-5 6" }) }),
|
|
338
|
+
"speaker-wave": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
339
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 10h3.5l4.7-3.6v11.2L7.5 14H4v-4Z", fill: "currentColor", stroke: "none" }),
|
|
340
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M15.2 9.2a4 4 0 0 1 0 5.6" })
|
|
341
|
+
] }),
|
|
342
|
+
"speaker-muted": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
343
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 10h3.5l4.7-3.6v11.2L7.5 14H4v-4Z", fill: "currentColor", stroke: "none" }),
|
|
344
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m15.5 9.5 5 5m0-5-5 5" })
|
|
345
|
+
] }),
|
|
346
|
+
wifi: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 9a14 14 0 0 1 18 0M6 13a9 9 0 0 1 12 0M9.5 17a4 4 0 0 1 5 0M12 21v.1" }) }),
|
|
347
|
+
power: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
348
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 3v9" }),
|
|
349
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 5.5a8 8 0 1 0 10 0" })
|
|
350
|
+
] }),
|
|
351
|
+
key: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
352
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "8", cy: "15", r: "4" }),
|
|
353
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m11 12 8-8m-3 3 3 3m-6 0 3 3" })
|
|
354
|
+
] }),
|
|
355
|
+
shield: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 3 4 6v6c0 5 3 8 8 10 5-2 8-5 8-10V6l-8-3Z" }),
|
|
356
|
+
"shield-check": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
357
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 3 4 6v6c0 5 3 8 8 10 5-2 8-5 8-10V6l-8-3Z" }),
|
|
358
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m8 12 2.5 2.5L16 9" })
|
|
359
|
+
] }),
|
|
360
|
+
bug: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 9h8v7a4 4 0 0 1-8 0V9ZM9 9a3 3 0 0 1 6 0M5 11h3M16 11h3M5 16h3M16 16h3M7 5l2 2M17 5l-2 2" }) }),
|
|
361
|
+
bulb: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
362
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 15a7 7 0 1 1 8 0c-1.2.8-1.5 1.8-1.5 3h-5c0-1.2-.3-2.2-1.5-3Z" }),
|
|
363
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9.5 21h5" })
|
|
364
|
+
] }),
|
|
365
|
+
rocket: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
366
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 16c-2-1-4-1-5 0 0-3 1-5 4-6M14 6c3-3 6-3 7-3 0 1 0 4-3 7l-6 6-4-4 6-6Z" }),
|
|
367
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M14 14c0 3-2 6-5 7 0-2 0-4-1-5M5 19l-2 2" })
|
|
368
|
+
] }),
|
|
369
|
+
target: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
370
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
371
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "5" }),
|
|
372
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "1" })
|
|
373
|
+
] }),
|
|
374
|
+
trophy: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
375
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 4h8v5a4 4 0 0 1-8 0V4ZM9 20h6M12 13v7" }),
|
|
376
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 6H4v2a4 4 0 0 0 5 4M16 6h4v2a4 4 0 0 1-5 4" })
|
|
377
|
+
] }),
|
|
378
|
+
"shopping-cart": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
379
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 4h2l2 11h10l3-8H6" }),
|
|
380
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "9", cy: "20", r: "1" }),
|
|
381
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "17", cy: "20", r: "1" })
|
|
382
|
+
] }),
|
|
383
|
+
"shopping-bag": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
384
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M5 8h14l1 13H4L5 8Z" }),
|
|
385
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9 9V6a3 3 0 0 1 6 0v3" })
|
|
386
|
+
] }),
|
|
387
|
+
shop: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
388
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 10v11h16V10M3 4h18l-2 6H5L3 4Z" }),
|
|
389
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9 21v-6h6v6" })
|
|
390
|
+
] }),
|
|
391
|
+
wallet: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
392
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "5", width: "18", height: "15", rx: "2.5" }),
|
|
393
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 9h18M15 13h6v4h-6a2 2 0 0 1 0-4Z" })
|
|
394
|
+
] }),
|
|
395
|
+
bank: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m3 9 9-6 9 6M5 10h14M6 10v8M10 10v8M14 10v8M18 10v8M3 21h18M4 18h16" }) }),
|
|
396
|
+
calculator: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
397
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "5", y: "2", width: "14", height: "20", rx: "2.5" }),
|
|
398
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 5h8v4H8V5ZM8 13h.1M12 13h.1M16 13h.1M8 17h.1M12 17h.1M16 17h.1" })
|
|
399
|
+
] }),
|
|
400
|
+
tag: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
401
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 12V4h8l10 10-7 7L3 12Z" }),
|
|
402
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "7.5", cy: "8.5", r: "1" })
|
|
403
|
+
] }),
|
|
404
|
+
tags: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
405
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M6 12V4h7l8 8-6 6-9-6Z" }),
|
|
406
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "10", cy: "8", r: "1" }),
|
|
407
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m3 8 1 9 7 4 2-2" })
|
|
408
|
+
] }),
|
|
409
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 4h16v13H9l-5 4V4Z" }),
|
|
410
|
+
comments: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
411
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 4h13v10H8l-5 4V4Z" }),
|
|
412
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M10 17h6l5 4V8h-2" })
|
|
413
|
+
] }),
|
|
414
|
+
send: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m3 11 18-8-8 18-2-8-8-2Zm8 2 10-10" }),
|
|
415
|
+
share: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
416
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "18", cy: "5", r: "3" }),
|
|
417
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "6", cy: "12", r: "3" }),
|
|
418
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "18", cy: "19", r: "3" }),
|
|
419
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m8.5 10.5 7-4M8.5 13.5l7 4" })
|
|
420
|
+
] }),
|
|
421
|
+
paperclip: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m8 12 7-7a4 4 0 0 1 6 6l-9 9a6 6 0 0 1-9-9l8-8" }),
|
|
422
|
+
location: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
423
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 22s7-6.2 7-13a7 7 0 1 0-14 0c0 6.8 7 13 7 13Z" }),
|
|
424
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "9", r: "2.5" })
|
|
425
|
+
] }),
|
|
426
|
+
compass: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
427
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
428
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m15.5 8.5-2 5-5 2 2-5 5-2Z" })
|
|
429
|
+
] }),
|
|
430
|
+
car: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
431
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 15V9l2-5h12l2 5v6M3 10h18M6 15h12" }),
|
|
432
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "7", cy: "18", r: "2" }),
|
|
433
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "17", cy: "18", r: "2" })
|
|
434
|
+
] }),
|
|
435
|
+
truck: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
436
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 5h11v12H3V5ZM14 9h4l3 4v4h-7V9Z" }),
|
|
437
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "7", cy: "19", r: "2" }),
|
|
438
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "18", cy: "19", r: "2" })
|
|
439
|
+
] }),
|
|
440
|
+
gift: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
441
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "9", width: "18", height: "12", rx: "2" }),
|
|
442
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 9v12M3 13h18M12 9H8a3 3 0 1 1 4-3v3Zm0 0h4a3 3 0 1 0-4-3v3Z" })
|
|
443
|
+
] }),
|
|
444
|
+
coffee: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
445
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 8h13v6a6 6 0 0 1-6 6H10a6 6 0 0 1-6-6V8ZM17 10h2a3 3 0 0 1 0 6h-3" }),
|
|
446
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 4v1M12 3v2" })
|
|
447
|
+
] }),
|
|
448
|
+
experiment: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
449
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9 3h6M10 3v6l-6 10a2 2 0 0 0 2 3h12a2 2 0 0 0 2-3L14 9V3" }),
|
|
450
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 16h10" })
|
|
451
|
+
] }),
|
|
452
|
+
tool: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M14 6a5 5 0 0 0-6-3l3 3-3 3-3-3a5 5 0 0 0 6 6l7 7a2 2 0 0 0 3-3l-7-7Z" }) }),
|
|
453
|
+
appstore: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
454
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "3", width: "7", height: "7", rx: "2" }),
|
|
455
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "14", y: "3", width: "7", height: "7", rx: "2" }),
|
|
456
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "14", width: "7", height: "7", rx: "2" }),
|
|
457
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "14", y: "14", width: "7", height: "7", rx: "2" })
|
|
458
|
+
] }),
|
|
459
|
+
puzzle: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9 3h4.2a2.8 2.8 0 1 0 5.6 0H21v6h-2.2a2.8 2.8 0 1 0 0 5.6H21V21h-6.4v-2.2a2.8 2.8 0 1 0-5.6 0V21H3v-6.4h2.2a2.8 2.8 0 1 0 0-5.6H3V3h6Z" }) }),
|
|
460
|
+
partition: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
461
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 5v5M6 14v-2h12v2M6 18v3M12 18v3M18 18v3" }),
|
|
462
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "3", r: "2" }),
|
|
463
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "6", cy: "16", r: "2" }),
|
|
464
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "16", r: "2" }),
|
|
465
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "18", cy: "16", r: "2" })
|
|
466
|
+
] }),
|
|
467
|
+
branches: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
468
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "6", cy: "5", r: "2" }),
|
|
469
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "18", cy: "7", r: "2" }),
|
|
470
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "6", cy: "19", r: "2" }),
|
|
471
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M6 7v10M8 10c6 0 4-3 8-3M8 14c6 0 4 3 8 3" })
|
|
472
|
+
] }),
|
|
473
|
+
scan: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 3H3v5M16 3h5v5M8 21H3v-5M16 21h5v-5M7 12h10" }),
|
|
474
|
+
"qr-code": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
475
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "3", width: "7", height: "7", rx: "1" }),
|
|
476
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "14", y: "3", width: "7", height: "7", rx: "1" }),
|
|
477
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "14", width: "7", height: "7", rx: "1" }),
|
|
478
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M14 14h3v3h-3v-3ZM18 18h3v3h-3v-3ZM14 20h1M20 14h1" })
|
|
479
|
+
] }),
|
|
480
|
+
barcode: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 5v14M7 5v14M11 5v14M14 5v14M16 5v14M20 5v14" }),
|
|
481
|
+
"user-plus": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
482
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "10", cy: "8", r: "4" }),
|
|
483
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 21c.7-4.3 3-6.5 7-6.5 2 0 3.6.6 4.7 1.7M19 14v7M15.5 17.5h7" })
|
|
484
|
+
] }),
|
|
485
|
+
"user-minus": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
486
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "10", cy: "8", r: "4" }),
|
|
487
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 21c.7-4.3 3-6.5 7-6.5 2 0 3.6.6 4.7 1.7M15.5 17.5h7" })
|
|
488
|
+
] }),
|
|
489
|
+
smile: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
490
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
491
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 10h.1M16 10h.1M8 15c1 1.4 2.3 2 4 2s3-.6 4-2" })
|
|
492
|
+
] }),
|
|
493
|
+
meh: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
494
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
495
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 10h.1M16 10h.1M8 16h8" })
|
|
496
|
+
] }),
|
|
497
|
+
frown: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
498
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
499
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 10h.1M16 10h.1M8 17c1-1.4 2.3-2 4-2s3 .6 4 2" })
|
|
500
|
+
] }),
|
|
501
|
+
"game-cultivator": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
502
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7.2 7.5h9.6M9 5.2 12 2l3 3.2" }),
|
|
503
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "8.8", r: "3.6" }),
|
|
504
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7.5 21c.2-4.9 1.8-7.3 4.5-7.3s4.3 2.4 4.5 7.3M9.4 15.2 7 18m7.6-2.8L17 18M10 21l2-4 2 4" })
|
|
505
|
+
] }),
|
|
506
|
+
"game-swordsman": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
507
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9.2 5.2h5.6M12 2.5v2.7" }),
|
|
508
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "8.8", r: "3.4" }),
|
|
509
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7.2 21c.3-5 1.9-7.4 4.8-7.4s4.5 2.4 4.8 7.4M9.2 14.8 7 18.2m7.8-3.4 2.2 3.4M9.5 21l2.5-4 2.5 4" }),
|
|
510
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m17.7 5.1 2.2-1-.9 2.3-5.2 5.2M16.2 7.8l1.8 1.8" })
|
|
511
|
+
] }),
|
|
512
|
+
"game-spirit-wolf": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
513
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m5.2 8.2.7-4 3.3 2.2A9 9 0 0 1 12 6c1 0 1.9.1 2.8.4l3.3-2.2.7 4A7.7 7.7 0 0 1 20 13c0 4.3-3.5 7.7-8 7.7S4 17.3 4 13c0-1.8.4-3.4 1.2-4.8Z" }),
|
|
514
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8.3 12h.1m7.2 0h.1M9 16c1.8 1.3 4.2 1.3 6 0m-3-1.5v1M7 18l-2.2 2M17 18l2.2 2" })
|
|
515
|
+
] }),
|
|
516
|
+
"game-gem": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
517
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m4 8 3-4h10l3 4-8 13L4 8Z" }),
|
|
518
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 8h16M8 4l-2 4 6 13 6-13-2-4M6 8h12" })
|
|
519
|
+
] }),
|
|
520
|
+
"game-ingot": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
521
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4 9.5c2.2 1 4.1 1.5 5.8 1.6L12 6l2.2 5.1c1.7-.1 3.6-.6 5.8-1.6-.3 5.1-2.9 8.4-8 10-5.1-1.6-7.7-4.9-8-10Z" }),
|
|
522
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4.6 10.1 3 6.5c2.3 1.2 4.2 1.6 5.8 1.2M19.4 10.1 21 6.5c-2.3 1.2-4.2 1.6-5.8 1.2M7 16.3c3.3 1 6.7 1 10 0" })
|
|
523
|
+
] }),
|
|
524
|
+
"game-sword": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
525
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m14.5 4.5 5-1-1 5L9 18l-3 1 1-3 9.5-9.5M5 19l-1 1" }),
|
|
526
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m12.5 7.5 4 4M7.5 14.5l2 2" })
|
|
527
|
+
] }),
|
|
528
|
+
"game-robe": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
529
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m8.5 4 3.5 2 3.5-2 4 4-2.5 3-1.2-1V21H8.2V10L7 11 4.5 8l4-4Z" }),
|
|
530
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9 4.5 12 9l3-4.5M12 9v12" })
|
|
531
|
+
] }),
|
|
532
|
+
"game-pants": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
533
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 3h10l1 18h-5l-1-10-1 10H6L7 3Z" }),
|
|
534
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 7h10M12 3v8" })
|
|
535
|
+
] }),
|
|
536
|
+
"game-pendant": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
537
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M5 4c1.7 4.4 4 6.6 7 6.6S17.3 8.4 19 4" }),
|
|
538
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 10.6c-2.7 1.8-4 3.8-4 6a4 4 0 0 0 8 0c0-2.2-1.3-4.2-4-6Z" }),
|
|
539
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "16.5", r: "1.5" })
|
|
540
|
+
] }),
|
|
541
|
+
"game-necklace": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
542
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M5 4c.7 6.3 3 9.5 7 9.5S18.3 10.3 19 4" }),
|
|
543
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m12 13.5 3 2.4-1.2 4.1h-3.6L9 15.9l3-2.4Z" }),
|
|
544
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 7h.1m10 0h.1M9 10h.1m6 0h.1" })
|
|
545
|
+
] }),
|
|
546
|
+
"game-pill": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
547
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M6.2 17.8a5.7 5.7 0 0 1 0-8.1l3.5-3.5a5.7 5.7 0 1 1 8.1 8.1l-3.5 3.5a5.7 5.7 0 0 1-8.1 0Z" }),
|
|
548
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m8 8 8 8" }),
|
|
549
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M6.3 12.2c1.3.2 2.5.7 3.5 1.7s1.6 2.2 1.8 3.5" })
|
|
550
|
+
] }),
|
|
551
|
+
"game-potion": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
552
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9 3h6M10 3v5l-5 7.5A3.5 3.5 0 0 0 8 21h8a3.5 3.5 0 0 0 3-5.5L14 8V3" }),
|
|
553
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 15h10M9.5 12h5" })
|
|
554
|
+
] }),
|
|
555
|
+
"game-elixir-jar": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
556
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 3h8l-1 4c2.6 1.2 4 3.5 4 6.8V21H5v-7.2C5 10.5 6.4 8.2 9 7L8 3Z" }),
|
|
557
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8.5 7h7M5 14h14M9 17h6" })
|
|
558
|
+
] }),
|
|
559
|
+
"game-flame": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
560
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M13.8 2.5c.6 3.6-2.1 4.8-2.1 7.2 0 1.1.7 1.9 1.7 1.9 1.8 0 2.4-2.1 2-4.1 2.6 2 4.1 4.6 4.1 7.4A7.5 7.5 0 0 1 4.5 15c0-3.5 1.8-6.5 5.2-9-.2 2.3.8 3.4 1.8 3.7-.4-2.6.3-5.1 2.3-7.2Z" }),
|
|
561
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 21c-2 0-3.3-1.3-3.3-3.2 0-1.5.9-2.8 2.6-4.2 0 1.7.8 2.5 1.7 2.5 1 0 1.7-.9 1.5-2.3 1.2 1.2 1.8 2.5 1.8 4A4 4 0 0 1 12 21Z" })
|
|
562
|
+
] }),
|
|
563
|
+
"game-soul-elixir": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
564
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "4.2" }),
|
|
565
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5.3 5.3l2.2 2.2m9 9 2.2 2.2m0-13.4-2.2 2.2m-9 9-2.2 2.2" }),
|
|
566
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m10 12 1.4 1.4L14.5 10" })
|
|
567
|
+
] }),
|
|
568
|
+
"game-herb": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
569
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 21V9" }),
|
|
570
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 13c-5.5.1-8-2.6-8-7.5 5-.2 7.8 2.1 8 7.5Zm0 4c5.5.1 8-2.6 8-7.5-5-.2-7.8 2.1-8 7.5Z" })
|
|
571
|
+
] }),
|
|
572
|
+
"game-meditate": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
573
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "5.5", r: "2.5" }),
|
|
574
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8.5 11c1-1.5 2.2-2.2 3.5-2.2s2.5.7 3.5 2.2l2.8 4M5.7 15l2.8-4M4 19c2.5-2.2 5.2-2.5 8-1 2.8-1.5 5.5-1.2 8 1M7 21h10" }),
|
|
575
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m9.5 14.5 2.5 3.4 2.5-3.4" })
|
|
576
|
+
] }),
|
|
577
|
+
"game-backpack": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
578
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 8V5.5a4 4 0 0 1 8 0V8M6 8h12l2 13H4L6 8Z" }),
|
|
579
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8.5 13h7v5h-7v-5ZM9 5.5h6" })
|
|
580
|
+
] }),
|
|
581
|
+
"game-qi": /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
582
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
583
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 8.5c2.5-2.8 7-2.2 8.7.2 1.7 2.4.9 5.6-1.6 6.8-2.4 1.2-5.5-.1-5.8-2.5-.2-1.8 1.4-3.1 3.2-2.8 1.8.3 2.6 2.2 1.7 3.5" })
|
|
584
|
+
] })
|
|
585
|
+
};
|
|
586
|
+
|
|
587
|
+
// src/components/Icon.tsx
|
|
588
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
589
|
+
var coreIconPaths = {
|
|
590
|
+
search: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
591
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "10.8", cy: "10.8", r: "6.8" }),
|
|
592
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m15.8 15.8 5.2 5.2" })
|
|
593
|
+
] }),
|
|
594
|
+
plus: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 4v16M4 12h16" }),
|
|
595
|
+
minus: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M4 12h16" }),
|
|
596
|
+
close: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m5 5 14 14M19 5 5 19" }),
|
|
597
|
+
check: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m4 12.5 5.2 5L20 6.5" }),
|
|
598
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
599
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
600
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 11v6M12 7.2v.1" })
|
|
601
|
+
] }),
|
|
602
|
+
question: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
603
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
604
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M9.8 9a2.4 2.4 0 1 1 3.5 2.2c-.9.5-1.3 1.1-1.3 2.1M12 16.8v.1" })
|
|
605
|
+
] }),
|
|
606
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
607
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M10.3 4.1 2.6 18a2 2 0 0 0 1.8 3h15.2a2 2 0 0 0 1.8-3L13.7 4.1a2 2 0 0 0-3.4 0Z" }),
|
|
608
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 9v4M12 17v.1" })
|
|
609
|
+
] }),
|
|
610
|
+
"circle-check": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
611
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
612
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m8 12 2.7 2.7L16.5 9" })
|
|
613
|
+
] }),
|
|
614
|
+
"circle-close": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
615
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
616
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m9 9 6 6M15 9l-6 6" })
|
|
617
|
+
] }),
|
|
618
|
+
"circle-plus": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
619
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
620
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 8v8M8 12h8" })
|
|
621
|
+
] }),
|
|
622
|
+
"circle-minus": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
623
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
624
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 12h8" })
|
|
625
|
+
] }),
|
|
626
|
+
"chevron-left": /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m15.5 5-7 7 7 7" }),
|
|
627
|
+
"chevron-right": /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m8.5 5 7 7-7 7" }),
|
|
628
|
+
"chevron-up": /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m5 15.5 7-7 7 7" }),
|
|
629
|
+
"chevron-down": /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m5 8.5 7 7 7-7" }),
|
|
630
|
+
"double-left": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
631
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m12 5-7 7 7 7" }),
|
|
632
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m19 5-7 7 7 7" })
|
|
633
|
+
] }),
|
|
634
|
+
"double-right": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
635
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m5 5 7 7-7 7" }),
|
|
636
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m12 5 7 7-7 7" })
|
|
637
|
+
] }),
|
|
638
|
+
"arrow-left": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
639
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m10 5-7 7 7 7" }),
|
|
640
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3 12h18" })
|
|
641
|
+
] }),
|
|
642
|
+
"arrow-right": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
643
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m14 5 7 7-7 7" }),
|
|
644
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3 12h18" })
|
|
645
|
+
] }),
|
|
646
|
+
"arrow-up": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
647
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m5 10 7-7 7 7" }),
|
|
648
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 3v18" })
|
|
649
|
+
] }),
|
|
650
|
+
"arrow-down": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
651
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m5 14 7 7 7-7" }),
|
|
652
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 3v18" })
|
|
653
|
+
] }),
|
|
654
|
+
menu: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M4 6h16M4 12h16M4 18h16" }),
|
|
655
|
+
"more-horizontal": /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M5 12h.1M12 12h.1M19 12h.1" }),
|
|
656
|
+
"more-vertical": /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 5v.1M12 12v.1M12 19v.1" }),
|
|
657
|
+
home: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
658
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m3.5 11 8.5-7 8.5 7" }),
|
|
659
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M5.5 9.5V20h13V9.5M9.5 20v-6h5v6" })
|
|
660
|
+
] }),
|
|
661
|
+
user: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
662
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "8", r: "4" }),
|
|
663
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M4.5 21c.7-4.2 3.2-6.5 7.5-6.5s6.8 2.3 7.5 6.5" })
|
|
664
|
+
] }),
|
|
665
|
+
users: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
666
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "9", cy: "8", r: "3.5" }),
|
|
667
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2.8 20c.6-3.8 2.7-5.8 6.2-5.8s5.6 2 6.2 5.8" }),
|
|
668
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M15 5.2a3.5 3.5 0 0 1 0 6.6M16.2 14.5c2.9.5 4.4 2.3 4.9 5.5" })
|
|
669
|
+
] }),
|
|
670
|
+
settings: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
671
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "3" }),
|
|
672
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1-2.8 2.8-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.6v.2h-4V21a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1L4.2 17l.1-.1a1.7 1.7 0 0 0 .3-1.9A1.7 1.7 0 0 0 3 14H2.8v-4H3a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9L4.2 7 7 4.2l.1.1a1.7 1.7 0 0 0 1.9.3A1.7 1.7 0 0 0 10 3v-.2h4V3a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1L19.8 7l-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1h.2v4H21a1.7 1.7 0 0 0-1.6 1Z" })
|
|
673
|
+
] }),
|
|
674
|
+
edit: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
675
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M4 20h4l11-11a2.8 2.8 0 0 0-4-4L4 16v4Z" }),
|
|
676
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m13.5 6.5 4 4M4 20h16" })
|
|
677
|
+
] }),
|
|
678
|
+
copy: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
679
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "8", y: "8", width: "12", height: "12", rx: "2.5" }),
|
|
680
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2" })
|
|
681
|
+
] }),
|
|
682
|
+
trash: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M4 7h16M9 3h6l1 4H8l1-4ZM6 7l1 14h10l1-14M10 11v6M14 11v6" }) }),
|
|
683
|
+
scissors: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
684
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "6", cy: "7", r: "3" }),
|
|
685
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "6", cy: "17", r: "3" }),
|
|
686
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m8.7 8.3 11.3 6.2M8.7 15.7 20 9.5" })
|
|
687
|
+
] }),
|
|
688
|
+
undo: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
689
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m8 7-5 5 5 5" }),
|
|
690
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3 12h10a7 7 0 0 1 7 7" })
|
|
691
|
+
] }),
|
|
692
|
+
redo: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
693
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m16 7 5 5-5 5" }),
|
|
694
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M21 12H11a7 7 0 0 0-7 7" })
|
|
695
|
+
] }),
|
|
696
|
+
"zoom-in": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
697
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "10.8", cy: "10.8", r: "6.8" }),
|
|
698
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m15.8 15.8 5.2 5.2M10.8 7.8v6M7.8 10.8h6" })
|
|
699
|
+
] }),
|
|
700
|
+
"zoom-out": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
701
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "10.8", cy: "10.8", r: "6.8" }),
|
|
702
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m15.8 15.8 5.2 5.2M7.8 10.8h6" })
|
|
703
|
+
] }),
|
|
704
|
+
download: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 3v12M7 10l5 5 5-5M4 20h16" }) }),
|
|
705
|
+
upload: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 16V4M7 9l5-5 5 5M4 20h16" }) }),
|
|
706
|
+
refresh: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
707
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M20 7v5h-5" }),
|
|
708
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M19 12a7.5 7.5 0 1 1-2-5" })
|
|
709
|
+
] }),
|
|
710
|
+
loader: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M18.4 5.6l-2.1 2.1M7.7 16.3l-2.1 2.1" }),
|
|
711
|
+
calendar: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
712
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "3", y: "5", width: "18", height: "16", rx: "2.5" }),
|
|
713
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 3v4M16 3v4M3 10h18M7 14h2M11 14h2M15 14h2M7 18h2M11 18h2" })
|
|
714
|
+
] }),
|
|
715
|
+
clock: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
716
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
717
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 7v5l3.5 2" })
|
|
718
|
+
] }),
|
|
719
|
+
mail: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
720
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2.5" }),
|
|
721
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m4 7 8 6 8-6" })
|
|
722
|
+
] }),
|
|
723
|
+
phone: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8.2 3.5 5.4 4.8c-1 .5-1.5 1.7-1.1 2.8 2.2 5.9 6.2 9.9 12.1 12.1 1.1.4 2.3-.1 2.8-1.1l1.3-2.8-4.2-2-1.4 2.1c-2.8-1.2-5.6-4-6.8-6.8l2.1-1.4-2-4.2Z" }),
|
|
724
|
+
link: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
725
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m9.5 14.5 5-5" }),
|
|
726
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7.5 16.5 6 18a3.5 3.5 0 0 1-5-5l3-3a3.5 3.5 0 0 1 5 0M16.5 7.5 18 6a3.5 3.5 0 0 1 5 5l-3 3a3.5 3.5 0 0 1-5 0" })
|
|
727
|
+
] }),
|
|
728
|
+
"external-link": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
729
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M14 4h6v6M20 4 11 13" }),
|
|
730
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M19 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h6" })
|
|
731
|
+
] }),
|
|
732
|
+
eye: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
733
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z" }),
|
|
734
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
|
735
|
+
] }),
|
|
736
|
+
"eye-off": /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m3 3 18 18M10.6 6.1A10 10 0 0 1 12 6c6 0 9.5 6 9.5 6a14.5 14.5 0 0 1-2.2 3M6.4 6.4C3.9 8.2 2.5 12 2.5 12s3.5 6 9.5 6a9.7 9.7 0 0 0 3-.5M9.9 9.9a3 3 0 0 0 4.2 4.2" }) }),
|
|
737
|
+
lock: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
738
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "4", y: "10", width: "16", height: "11", rx: "2.5" }),
|
|
739
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 10V7a4 4 0 0 1 8 0v3M12 14v3" })
|
|
740
|
+
] }),
|
|
741
|
+
unlock: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
742
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "4", y: "10", width: "16", height: "11", rx: "2.5" }),
|
|
743
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 10V7a4 4 0 0 1 7.5-2M12 14v3" })
|
|
744
|
+
] }),
|
|
745
|
+
bell: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
746
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M18 9a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9Z" }),
|
|
747
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M10 21h4" })
|
|
748
|
+
] }),
|
|
749
|
+
star: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2-5.6-3-5.6 3 1.1-6.2L3 9.6l6.2-.9L12 3Z" }),
|
|
750
|
+
heart: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M20.8 5.8a5.5 5.5 0 0 0-7.8 0L12 6.9l-1-1.1a5.5 5.5 0 1 0-7.8 7.8L12 21l8.8-7.4a5.5 5.5 0 0 0 0-7.8Z" }),
|
|
751
|
+
file: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
752
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M6 3h8l4 4v14H6V3Z" }),
|
|
753
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M14 3v5h4" })
|
|
754
|
+
] }),
|
|
755
|
+
folder: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3 6h7l2 2h9v11H3V6Z" }),
|
|
756
|
+
image: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
757
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2.5" }),
|
|
758
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "9", cy: "9", r: "2" }),
|
|
759
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m4 17 4.5-4.5 3.5 3 2.5-2.5 5.5 5" })
|
|
760
|
+
] }),
|
|
761
|
+
filter: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3 5h18l-7 8v6l-4 2v-8L3 5Z" }),
|
|
762
|
+
"sort-ascending": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
763
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7 19V5M3.5 8.5 7 5l3.5 3.5" }),
|
|
764
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M13 7h8M13 12h6M13 17h4" })
|
|
765
|
+
] }),
|
|
766
|
+
"sort-descending": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
767
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7 5v14M3.5 15.5 7 19l3.5-3.5" }),
|
|
768
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M13 7h4M13 12h6M13 17h8" })
|
|
769
|
+
] }),
|
|
770
|
+
play: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
771
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
772
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m10 8 6 4-6 4V8Z" })
|
|
773
|
+
] }),
|
|
774
|
+
pause: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
775
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
776
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M9.5 9v6M14.5 9v6" })
|
|
777
|
+
] }),
|
|
778
|
+
book: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
779
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M4 5.5A2.5 2.5 0 0 1 6.5 3H11v17H6.5A2.5 2.5 0 0 0 4 22V5.5Z" }),
|
|
780
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M20 5.5A2.5 2.5 0 0 0 17.5 3H13v17h4.5A2.5 2.5 0 0 1 20 22V5.5Z" })
|
|
781
|
+
] }),
|
|
782
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
783
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "4", y: "4", width: "6", height: "6", rx: "1.5" }),
|
|
784
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "14", y: "4", width: "6", height: "6", rx: "1.5" }),
|
|
785
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "4", y: "14", width: "6", height: "6", rx: "1.5" }),
|
|
786
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "14", y: "14", width: "6", height: "6", rx: "1.5" })
|
|
787
|
+
] }),
|
|
788
|
+
token: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
789
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "4" }),
|
|
790
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5.3 5.3l2.1 2.1M16.6 16.6l2.1 2.1M18.7 5.3l-2.1 2.1M7.4 16.6l-2.1 2.1" })
|
|
791
|
+
] }),
|
|
792
|
+
sun: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
793
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "3.6" }),
|
|
794
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M18.7 5.3l-1.4 1.4M6.7 17.3l-1.4 1.4" })
|
|
795
|
+
] }),
|
|
796
|
+
moon: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M20 15.2A8 8 0 0 1 8.8 4 8.5 8.5 0 1 0 20 15.2Z" }),
|
|
797
|
+
code: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m9 18-6-6 6-6M15 6l6 6-6 6" }),
|
|
798
|
+
github: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M9 19c-4 1.2-4-2-5-2.5M14 22v-3.1c0-.9.3-1.5.8-1.9 2.7-.3 5.5-1.3 5.5-6A4.7 4.7 0 0 0 19 7.7 4.4 4.4 0 0 0 18.9 4S17.8 3.7 15 5.3a11.7 11.7 0 0 0-6 0C6.2 3.7 5.1 4 5.1 4A4.4 4.4 0 0 0 5 7.7 4.7 4.7 0 0 0 3.7 11c0 4.7 2.8 5.7 5.5 6 .5.4.8 1 .8 1.9V22" })
|
|
799
|
+
};
|
|
800
|
+
var iconPaths = { ...coreIconPaths, ...extendedIconPaths };
|
|
801
|
+
var ICON_NAMES = Object.freeze(Object.keys(iconPaths));
|
|
802
|
+
var filledIconPaths = {
|
|
803
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
804
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
805
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 10.5v6M12 7.2v.1", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
806
|
+
] }),
|
|
807
|
+
question: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
808
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
809
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M9.6 9a2.5 2.5 0 1 1 3.6 2.3c-.8.5-1.2 1.1-1.2 2.1M12 16.8v.1", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
810
|
+
] }),
|
|
811
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
812
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M10.3 3.5 1.8 19a2 2 0 0 0 1.8 3h16.8a2 2 0 0 0 1.8-3L13.7 3.5a2 2 0 0 0-3.4 0Z", fill: "currentColor", stroke: "none" }),
|
|
813
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 9v5M12 18v.1", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
814
|
+
] }),
|
|
815
|
+
"circle-check": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
816
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
817
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m7.5 12 3 3 6-6", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
818
|
+
] }),
|
|
819
|
+
"circle-close": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
820
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
821
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m8.8 8.8 6.4 6.4M15.2 8.8l-6.4 6.4", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
822
|
+
] }),
|
|
823
|
+
"circle-plus": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
824
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
825
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 7.5v9M7.5 12h9", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
826
|
+
] }),
|
|
827
|
+
"circle-minus": /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
828
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
829
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7.5 12h9", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
830
|
+
] }),
|
|
831
|
+
home: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2.6 10.8 12 2.8l9.4 8a1 1 0 0 1-1.3 1.5l-.6-.5V21h-5.2v-6.2H9.7V21H4.5v-9.2l-.6.5a1 1 0 1 1-1.3-1.5Z", fill: "currentColor", stroke: "none" }),
|
|
832
|
+
user: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
833
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "7.5", r: "4.5", fill: "currentColor", stroke: "none" }),
|
|
834
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3.5 21c.7-5 3.6-7.5 8.5-7.5s7.8 2.5 8.5 7.5H3.5Z", fill: "currentColor", stroke: "none" })
|
|
835
|
+
] }),
|
|
836
|
+
users: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
837
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "8.5", cy: "8", r: "3.8", fill: "currentColor", stroke: "none" }),
|
|
838
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "17", cy: "8.5", r: "3", fill: "currentColor", stroke: "none", opacity: ".7" }),
|
|
839
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M1.8 21c.6-4.6 2.8-7 6.7-7s6.1 2.4 6.7 7H1.8ZM14.4 15.2c3.9-.2 6.4 1.7 7 5.8h-4.5a9.9 9.9 0 0 0-2.5-5.8Z", fill: "currentColor", stroke: "none" })
|
|
840
|
+
] }),
|
|
841
|
+
trash: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 3h8l1 3h4v2H3V6h4l1-3Zm-2.5 7h13l-1 11h-11l-1-11Z", fill: "currentColor", stroke: "none" }),
|
|
842
|
+
bell: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 2.5a2 2 0 0 1 2 1.6c3 .9 5 3.6 5 6.9v4.3l2 3.2H3l2-3.2V11c0-3.3 2-6 5-6.9a2 2 0 0 1 2-1.6ZM9.2 20h5.6a3 3 0 0 1-5.6 0Z", fill: "currentColor", stroke: "none" }),
|
|
843
|
+
star: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m12 2.2 3 6 6.6 1-4.8 4.6 1.1 6.6-5.9-3.1-5.9 3.1 1.1-6.6-4.8-4.6 6.6-1 3-6Z", fill: "currentColor", stroke: "none" }),
|
|
844
|
+
heart: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 21.3 3.1 13.7A5.8 5.8 0 0 1 11 5.2l1 1 1-1a5.8 5.8 0 0 1 7.9 8.5L12 21.3Z", fill: "currentColor", stroke: "none" }),
|
|
845
|
+
mail: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
846
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "2.5", y: "4.5", width: "19", height: "15", rx: "2.5", fill: "currentColor", stroke: "none" }),
|
|
847
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m4.5 7 7.5 5.8L19.5 7", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "1.8" })
|
|
848
|
+
] }),
|
|
849
|
+
lock: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7 10V7a5 5 0 0 1 10 0v3h1.5a2.5 2.5 0 0 1 2.5 2.5v7a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 3 19.5v-7A2.5 2.5 0 0 1 5.5 10H7Zm2.5 0h5V7a2.5 2.5 0 0 0-5 0v3Z", fill: "currentColor", stroke: "none" }),
|
|
850
|
+
unlock: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7 10V7a5 5 0 0 1 9.5-2.2l-2.2 1.1A2.5 2.5 0 0 0 9.5 7v3h9A2.5 2.5 0 0 1 21 12.5v7a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 3 19.5v-7A2.5 2.5 0 0 1 5.5 10H7Z", fill: "currentColor", stroke: "none" }),
|
|
851
|
+
calendar: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
852
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "2.5", y: "4.5", width: "19", height: "17", rx: "2.5", fill: "currentColor", stroke: "none" }),
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3 9.5h18M8 2.5v4M16 2.5v4", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "1.8" })
|
|
854
|
+
] }),
|
|
855
|
+
clock: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
856
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
857
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 6.5V12l4 2.3", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "2" })
|
|
858
|
+
] }),
|
|
859
|
+
file: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M5 2.5h10l4 4V22H5V2.5Zm9 1.8V8h3.7L14 4.3Z", fill: "currentColor", stroke: "none" }),
|
|
860
|
+
folder: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2.5 5h7l2.2 2.5h9.8V20H2.5V5Z", fill: "currentColor", stroke: "none" }),
|
|
861
|
+
image: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
862
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "2.5", y: "3.5", width: "19", height: "17", rx: "2.5", fill: "currentColor", stroke: "none" }),
|
|
863
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m4.5 18 4.3-4.6 3.4 3 2.5-2.6 4.8 4.2", stroke: "var(--sia-icon-contrast, #fff)", strokeWidth: "1.7" }),
|
|
864
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "8", cy: "8.5", r: "1.7", fill: "var(--sia-icon-contrast, #fff)", stroke: "none" })
|
|
865
|
+
] }),
|
|
866
|
+
filter: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2 4h20l-7.8 9v6.2L9.8 22v-9L2 4Z", fill: "currentColor", stroke: "none" }),
|
|
867
|
+
play: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
868
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
869
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m10 7.8 6.5 4.2-6.5 4.2V7.8Z", fill: "var(--sia-icon-contrast, #fff)", stroke: "none" })
|
|
870
|
+
] }),
|
|
871
|
+
pause: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
872
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
|
|
873
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8.5 7.5h2.5v9H8.5v-9Zm4.5 0h2.5v9H13v-9Z", fill: "var(--sia-icon-contrast, #fff)", stroke: "none" })
|
|
874
|
+
] }),
|
|
875
|
+
book: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3 4.5A3.5 3.5 0 0 1 6.5 1H11v19H6.5A3.5 3.5 0 0 0 3 23V4.5ZM21 4.5A3.5 3.5 0 0 0 17.5 1H13v19h4.5A3.5 3.5 0 0 1 21 23V4.5Z", fill: "currentColor", stroke: "none" }),
|
|
876
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
877
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "3", y: "3", width: "8", height: "8", rx: "2", fill: "currentColor", stroke: "none" }),
|
|
878
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "13", y: "3", width: "8", height: "8", rx: "2", fill: "currentColor", stroke: "none" }),
|
|
879
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "3", y: "13", width: "8", height: "8", rx: "2", fill: "currentColor", stroke: "none" }),
|
|
880
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "13", y: "13", width: "8", height: "8", rx: "2", fill: "currentColor", stroke: "none" })
|
|
881
|
+
] }),
|
|
882
|
+
token: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
883
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "5", fill: "currentColor", stroke: "none" }),
|
|
884
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 1v4M12 19v4M1 12h4M19 12h4M4.2 4.2 7 7M17 17l2.8 2.8M19.8 4.2 17 7M7 17l-2.8 2.8", stroke: "currentColor", strokeWidth: "2.2" })
|
|
885
|
+
] })
|
|
886
|
+
};
|
|
887
|
+
var FILLED_ICON_NAMES = Object.freeze(Object.keys(filledIconPaths));
|
|
888
|
+
var Icon = (0, import_react2.forwardRef)(function Icon2({ name, size = "1em", strokeWidth = 1.8, rotate = 0, spin = false, pulse = false, label, variant = "outline", className = "", style, ...props }, ref) {
|
|
889
|
+
const resolvedSize = typeof size === "number" ? `${size}px` : size;
|
|
890
|
+
const mergedStyle = { "--sia-icon-size": resolvedSize, "--sia-icon-rotate": `${rotate}deg`, ...style };
|
|
891
|
+
const animationClass = spin ? " sia-icon--spin" : pulse ? " sia-icon--pulse" : "";
|
|
892
|
+
const filledPath = filledIconPaths[name];
|
|
893
|
+
const resolvedVariant = variant === "filled" && filledPath ? "filled" : "outline";
|
|
894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
895
|
+
"span",
|
|
896
|
+
{
|
|
897
|
+
ref,
|
|
898
|
+
className: `sia-icon${animationClass} ${className}`.trim(),
|
|
899
|
+
"data-variant": resolvedVariant,
|
|
900
|
+
role: label ? "img" : void 0,
|
|
901
|
+
"aria-label": label,
|
|
902
|
+
"aria-hidden": label ? void 0 : true,
|
|
903
|
+
style: mergedStyle,
|
|
904
|
+
...props,
|
|
905
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth, strokeLinecap: "round", strokeLinejoin: "round", focusable: "false", children: resolvedVariant === "filled" ? filledPath : iconPaths[name] })
|
|
906
|
+
}
|
|
907
|
+
);
|
|
908
|
+
});
|
|
909
|
+
|
|
910
|
+
// src/components/Card.tsx
|
|
911
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
912
|
+
function Card({
|
|
913
|
+
title,
|
|
914
|
+
description,
|
|
915
|
+
extra,
|
|
916
|
+
accent,
|
|
917
|
+
accentColor,
|
|
918
|
+
collapsible = false,
|
|
919
|
+
collapsed,
|
|
920
|
+
defaultCollapsed = false,
|
|
921
|
+
onCollapsedChange,
|
|
922
|
+
bodyHeight,
|
|
923
|
+
bodyClassName = "",
|
|
924
|
+
bodyStyle,
|
|
925
|
+
className = "",
|
|
926
|
+
style,
|
|
927
|
+
children,
|
|
928
|
+
...props
|
|
929
|
+
}) {
|
|
930
|
+
const [internalCollapsed, setInternalCollapsed] = (0, import_react3.useState)(defaultCollapsed);
|
|
931
|
+
const isCollapsed = collapsed ?? internalCollapsed;
|
|
932
|
+
const hasHeader = title || extra || collapsible;
|
|
933
|
+
const mergedStyle = accentColor ? { "--sia-card-accent": accentColor, ...style } : style;
|
|
934
|
+
const mergedBodyStyle = bodyHeight === void 0 ? { ...bodyStyle } : { height: bodyHeight, overflowY: "auto", ...bodyStyle };
|
|
935
|
+
function toggleCollapsed() {
|
|
936
|
+
const nextCollapsed = !isCollapsed;
|
|
937
|
+
if (collapsed === void 0) setInternalCollapsed(nextCollapsed);
|
|
938
|
+
onCollapsedChange?.(nextCollapsed);
|
|
939
|
+
}
|
|
940
|
+
const heading = /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "sia-card__heading", children: [
|
|
941
|
+
accent || accentColor ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: `sia-card__accent${accent ? ` sia-card__accent--${accent}` : ""}`, "aria-hidden": "true" }) : null,
|
|
942
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { className: "sia-card__title", children: title }) : null
|
|
943
|
+
] });
|
|
944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: `sia-card${isCollapsed ? " sia-card--collapsed" : ""} ${className}`.trim(), style: mergedStyle, ...props, children: [
|
|
945
|
+
hasHeader ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: "sia-card__header", children: [
|
|
946
|
+
collapsible ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("button", { type: "button", className: "sia-card__collapse-trigger", "aria-expanded": !isCollapsed, onClick: toggleCollapsed, children: [
|
|
947
|
+
heading,
|
|
948
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: isCollapsed ? "chevron-down" : "chevron-up", size: 16 })
|
|
949
|
+
] }) : heading,
|
|
950
|
+
extra ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "sia-card__extra", children: extra }) : null
|
|
951
|
+
] }) : null,
|
|
952
|
+
!isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
953
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "sia-card__description", children: description }) : null,
|
|
954
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: `sia-card__body ${bodyClassName}`.trim(), style: mergedBodyStyle, children })
|
|
955
|
+
] }) : null
|
|
956
|
+
] });
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
// src/components/Tag.tsx
|
|
960
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
961
|
+
function Tag({
|
|
962
|
+
status = "default",
|
|
963
|
+
compact = false,
|
|
964
|
+
variant = "soft",
|
|
965
|
+
icon,
|
|
966
|
+
closable = false,
|
|
967
|
+
disabled = false,
|
|
968
|
+
onClose,
|
|
969
|
+
className = "",
|
|
970
|
+
children,
|
|
971
|
+
...props
|
|
972
|
+
}) {
|
|
973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
974
|
+
"span",
|
|
975
|
+
{
|
|
976
|
+
className: `sia-tag sia-tag--${status} sia-tag--${variant}${compact ? " sia-tag--compact" : ""}${disabled ? " sia-tag--disabled" : ""} ${className}`.trim(),
|
|
977
|
+
"aria-disabled": disabled || void 0,
|
|
978
|
+
...props,
|
|
979
|
+
children: [
|
|
980
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "sia-tag__icon", children: icon }) : null,
|
|
981
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children }),
|
|
982
|
+
closable ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
983
|
+
"button",
|
|
984
|
+
{
|
|
985
|
+
type: "button",
|
|
986
|
+
className: "sia-tag__close",
|
|
987
|
+
"aria-label": "\u79FB\u9664\u6807\u7B7E",
|
|
988
|
+
disabled,
|
|
989
|
+
onClick: (event) => {
|
|
990
|
+
event.stopPropagation();
|
|
991
|
+
onClose?.(event);
|
|
992
|
+
},
|
|
993
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "close", size: 12 })
|
|
994
|
+
}
|
|
995
|
+
) : null
|
|
996
|
+
]
|
|
997
|
+
}
|
|
998
|
+
);
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
// src/components/Tabs.tsx
|
|
1002
|
+
var import_react8 = require("react");
|
|
1003
|
+
|
|
1004
|
+
// src/components/Dropdown.tsx
|
|
1005
|
+
var import_react7 = require("react");
|
|
1006
|
+
|
|
1007
|
+
// src/components/Navigation.tsx
|
|
1008
|
+
var import_react6 = require("react");
|
|
1009
|
+
|
|
1010
|
+
// src/components/PopupPortal.tsx
|
|
1011
|
+
var import_react4 = require("react");
|
|
1012
|
+
var import_react_dom = require("react-dom");
|
|
1013
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1014
|
+
function setForwardedRef(ref, value) {
|
|
1015
|
+
if (typeof ref === "function") ref(value);
|
|
1016
|
+
else if (ref) ref.current = value;
|
|
1017
|
+
}
|
|
1018
|
+
function clamp(value, min, max) {
|
|
1019
|
+
return Math.min(Math.max(value, min), Math.max(min, max));
|
|
1020
|
+
}
|
|
1021
|
+
var PopupPortal = (0, import_react4.forwardRef)(function PopupPortal2({
|
|
1022
|
+
anchorRef,
|
|
1023
|
+
open = true,
|
|
1024
|
+
placement = "bottom-start",
|
|
1025
|
+
offset = 6,
|
|
1026
|
+
viewportPadding = 8,
|
|
1027
|
+
className = "",
|
|
1028
|
+
style,
|
|
1029
|
+
children,
|
|
1030
|
+
...props
|
|
1031
|
+
}, forwardedRef) {
|
|
1032
|
+
const popupRef = (0, import_react4.useRef)(null);
|
|
1033
|
+
const [position, setPosition] = (0, import_react4.useState)();
|
|
1034
|
+
(0, import_react4.useLayoutEffect)(() => {
|
|
1035
|
+
if (!open || typeof document === "undefined") {
|
|
1036
|
+
setPosition(void 0);
|
|
1037
|
+
return;
|
|
1038
|
+
}
|
|
1039
|
+
const update = () => {
|
|
1040
|
+
const anchor = anchorRef.current;
|
|
1041
|
+
const popup = popupRef.current;
|
|
1042
|
+
if (!anchor || !popup) return;
|
|
1043
|
+
const anchorRect = anchor.getBoundingClientRect();
|
|
1044
|
+
const popupRect = popup.getBoundingClientRect();
|
|
1045
|
+
const viewportWidth = document.documentElement.clientWidth;
|
|
1046
|
+
const viewportHeight = document.documentElement.clientHeight;
|
|
1047
|
+
let resolvedPlacement = placement;
|
|
1048
|
+
const availableBelow = Math.max(0, viewportHeight - viewportPadding - anchorRect.bottom - offset);
|
|
1049
|
+
const availableAbove = Math.max(0, anchorRect.top - offset - viewportPadding);
|
|
1050
|
+
const availableRight = Math.max(0, viewportWidth - viewportPadding - anchorRect.right - offset);
|
|
1051
|
+
const availableLeft = Math.max(0, anchorRect.left - offset - viewportPadding);
|
|
1052
|
+
const horizontalSide = placement.startsWith("right") || placement.startsWith("left");
|
|
1053
|
+
if (horizontalSide) {
|
|
1054
|
+
const prefersRight = placement.startsWith("right");
|
|
1055
|
+
const fitsRight = popupRect.width <= availableRight;
|
|
1056
|
+
const fitsLeft = popupRect.width <= availableLeft;
|
|
1057
|
+
if (prefersRight && !fitsRight && (fitsLeft || availableLeft > availableRight)) {
|
|
1058
|
+
resolvedPlacement = placement.replace("right", "left");
|
|
1059
|
+
} else if (!prefersRight && !fitsLeft && (fitsRight || availableRight > availableLeft)) {
|
|
1060
|
+
resolvedPlacement = placement.replace("left", "right");
|
|
1061
|
+
}
|
|
1062
|
+
} else {
|
|
1063
|
+
const prefersBottom = placement.startsWith("bottom");
|
|
1064
|
+
const fitsBelow = popupRect.height <= availableBelow;
|
|
1065
|
+
const fitsAbove = popupRect.height <= availableAbove;
|
|
1066
|
+
if (prefersBottom && !fitsBelow && (fitsAbove || availableAbove > availableBelow)) {
|
|
1067
|
+
resolvedPlacement = placement.replace("bottom", "top");
|
|
1068
|
+
} else if (!prefersBottom && !fitsAbove && (fitsBelow || availableBelow > availableAbove)) {
|
|
1069
|
+
resolvedPlacement = placement.replace("top", "bottom");
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
const resolvedHorizontalSide = resolvedPlacement.startsWith("right") || resolvedPlacement.startsWith("left");
|
|
1073
|
+
const top = resolvedHorizontalSide ? resolvedPlacement.endsWith("end") ? anchorRect.bottom - popupRect.height : anchorRect.top : resolvedPlacement.startsWith("bottom") ? anchorRect.bottom + offset : anchorRect.top - popupRect.height - offset;
|
|
1074
|
+
const availableHeight = resolvedHorizontalSide ? Math.max(0, viewportHeight - viewportPadding * 2) : resolvedPlacement.startsWith("bottom") ? availableBelow : availableAbove;
|
|
1075
|
+
const alignedLeft = resolvedHorizontalSide ? resolvedPlacement.startsWith("right") ? anchorRect.right + offset : anchorRect.left - popupRect.width - offset : resolvedPlacement.endsWith("end") ? anchorRect.right - popupRect.width : anchorRect.left;
|
|
1076
|
+
const next = {
|
|
1077
|
+
top: clamp(top, viewportPadding, viewportHeight - popupRect.height - viewportPadding),
|
|
1078
|
+
left: clamp(alignedLeft, viewportPadding, viewportWidth - popupRect.width - viewportPadding),
|
|
1079
|
+
anchorWidth: anchorRect.width,
|
|
1080
|
+
availableHeight,
|
|
1081
|
+
placement: resolvedPlacement
|
|
1082
|
+
};
|
|
1083
|
+
setPosition((current) => current && current.top === next.top && current.left === next.left && current.anchorWidth === next.anchorWidth && current.availableHeight === next.availableHeight && current.placement === next.placement ? current : next);
|
|
1084
|
+
};
|
|
1085
|
+
update();
|
|
1086
|
+
window.addEventListener("resize", update);
|
|
1087
|
+
window.addEventListener("scroll", update, true);
|
|
1088
|
+
const observer = new ResizeObserver(update);
|
|
1089
|
+
if (anchorRef.current) observer.observe(anchorRef.current);
|
|
1090
|
+
if (popupRef.current) observer.observe(popupRef.current);
|
|
1091
|
+
return () => {
|
|
1092
|
+
window.removeEventListener("resize", update);
|
|
1093
|
+
window.removeEventListener("scroll", update, true);
|
|
1094
|
+
observer.disconnect();
|
|
1095
|
+
};
|
|
1096
|
+
}, [anchorRef, offset, open, placement, viewportPadding]);
|
|
1097
|
+
if (!open || typeof document === "undefined") return null;
|
|
1098
|
+
return (0, import_react_dom.createPortal)(
|
|
1099
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1100
|
+
"div",
|
|
1101
|
+
{
|
|
1102
|
+
ref: (node) => {
|
|
1103
|
+
popupRef.current = node;
|
|
1104
|
+
setForwardedRef(forwardedRef, node);
|
|
1105
|
+
},
|
|
1106
|
+
className: `sia-popup-portal ${className}`.trim(),
|
|
1107
|
+
"data-sia-popup-layer": "",
|
|
1108
|
+
"data-placement": position?.placement ?? placement,
|
|
1109
|
+
style: {
|
|
1110
|
+
...style,
|
|
1111
|
+
"--sia-popup-anchor-width": `${position?.anchorWidth ?? anchorRef.current?.getBoundingClientRect().width ?? 0}px`,
|
|
1112
|
+
"--sia-popup-available-height": position ? `${position.availableHeight}px` : void 0,
|
|
1113
|
+
top: position?.top ?? 0,
|
|
1114
|
+
left: position?.left ?? 0,
|
|
1115
|
+
visibility: position ? "visible" : "hidden"
|
|
1116
|
+
},
|
|
1117
|
+
...props,
|
|
1118
|
+
children
|
|
1119
|
+
}
|
|
1120
|
+
),
|
|
1121
|
+
document.body
|
|
1122
|
+
);
|
|
1123
|
+
});
|
|
1124
|
+
|
|
1125
|
+
// src/components/shared.ts
|
|
1126
|
+
var import_react5 = require("react");
|
|
1127
|
+
function useControllableState({ value, defaultValue, onChange }) {
|
|
1128
|
+
const [internalValue, setInternalValue] = (0, import_react5.useState)(defaultValue);
|
|
1129
|
+
const controlled = value !== void 0;
|
|
1130
|
+
const currentValue = controlled ? value : internalValue;
|
|
1131
|
+
const setValue = (0, import_react5.useCallback)((nextValue) => {
|
|
1132
|
+
if (Object.is(currentValue, nextValue)) return;
|
|
1133
|
+
if (!controlled) setInternalValue(nextValue);
|
|
1134
|
+
onChange?.(nextValue);
|
|
1135
|
+
}, [controlled, currentValue, onChange]);
|
|
1136
|
+
return [currentValue, setValue];
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
// src/components/Navigation.tsx
|
|
1140
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1141
|
+
function MenuPopup({
|
|
1142
|
+
anchorRef,
|
|
1143
|
+
open,
|
|
1144
|
+
placement,
|
|
1145
|
+
menuId,
|
|
1146
|
+
theme,
|
|
1147
|
+
children,
|
|
1148
|
+
onMouseEnter,
|
|
1149
|
+
onMouseLeave
|
|
1150
|
+
}) {
|
|
1151
|
+
const [mounted, setMounted] = (0, import_react6.useState)(open);
|
|
1152
|
+
(0, import_react6.useEffect)(() => {
|
|
1153
|
+
if (open) {
|
|
1154
|
+
setMounted(true);
|
|
1155
|
+
return void 0;
|
|
1156
|
+
}
|
|
1157
|
+
const timer = window.setTimeout(() => setMounted(false), 160);
|
|
1158
|
+
return () => window.clearTimeout(timer);
|
|
1159
|
+
}, [open]);
|
|
1160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1161
|
+
PopupPortal,
|
|
1162
|
+
{
|
|
1163
|
+
anchorRef,
|
|
1164
|
+
open: mounted,
|
|
1165
|
+
placement,
|
|
1166
|
+
offset: 4,
|
|
1167
|
+
className: `sia-menu__popup sia-menu--${theme}${open ? " is-open" : " is-closing"}`,
|
|
1168
|
+
"data-sia-menu-owner": menuId,
|
|
1169
|
+
onMouseEnter,
|
|
1170
|
+
onMouseLeave,
|
|
1171
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "sia-menu__popup-list", role: "menu", children })
|
|
1172
|
+
}
|
|
1173
|
+
);
|
|
1174
|
+
}
|
|
1175
|
+
function MenuEntry({
|
|
1176
|
+
item,
|
|
1177
|
+
level,
|
|
1178
|
+
parents,
|
|
1179
|
+
props
|
|
1180
|
+
}) {
|
|
1181
|
+
const anchorRef = (0, import_react6.useRef)(null);
|
|
1182
|
+
const closeTimerRef = (0, import_react6.useRef)(void 0);
|
|
1183
|
+
const hasChildren = Boolean(item.children?.length);
|
|
1184
|
+
const isOpen = props.open.includes(item.key);
|
|
1185
|
+
const isSelected = props.selected.includes(item.key);
|
|
1186
|
+
const path = [item.key, ...parents];
|
|
1187
|
+
const collapsed = props.inlineCollapsed && level === 0;
|
|
1188
|
+
const inlineSubmenu = props.mode === "inline" && !collapsed;
|
|
1189
|
+
(0, import_react6.useEffect)(() => () => {
|
|
1190
|
+
if (closeTimerRef.current !== void 0) window.clearTimeout(closeTimerRef.current);
|
|
1191
|
+
}, []);
|
|
1192
|
+
function cancelClose() {
|
|
1193
|
+
if (closeTimerRef.current !== void 0) {
|
|
1194
|
+
window.clearTimeout(closeTimerRef.current);
|
|
1195
|
+
closeTimerRef.current = void 0;
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
function scheduleClose() {
|
|
1199
|
+
cancelClose();
|
|
1200
|
+
closeTimerRef.current = window.setTimeout(() => props.toggle(item.key, false), 100);
|
|
1201
|
+
}
|
|
1202
|
+
const hover = props.triggerSubMenuAction === "hover" && hasChildren && !inlineSubmenu;
|
|
1203
|
+
const submenu = hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MenuLevel, { items: item.children ?? [], level: level + 1, parents: [item.key, ...parents], props }) : null;
|
|
1204
|
+
const popupPlacement = props.mode === "horizontal" && level === 0 ? "bottom-start" : "right-start";
|
|
1205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1206
|
+
"li",
|
|
1207
|
+
{
|
|
1208
|
+
className: `sia-menu__entry${isOpen ? " is-open" : ""}${isSelected ? " is-selected" : ""}${item.disabled ? " is-disabled" : ""}${item.danger ? " is-danger" : ""}`,
|
|
1209
|
+
onMouseEnter: hover ? () => {
|
|
1210
|
+
cancelClose();
|
|
1211
|
+
props.toggle(item.key, true);
|
|
1212
|
+
} : void 0,
|
|
1213
|
+
onMouseLeave: hover ? scheduleClose : void 0,
|
|
1214
|
+
children: [
|
|
1215
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1216
|
+
"button",
|
|
1217
|
+
{
|
|
1218
|
+
ref: anchorRef,
|
|
1219
|
+
type: "button",
|
|
1220
|
+
className: "sia-menu__item",
|
|
1221
|
+
style: { paddingInlineStart: collapsed ? void 0 : 12 + level * props.inlineIndent },
|
|
1222
|
+
title: collapsed ? item.title ?? (typeof item.label === "string" ? item.label : void 0) : item.title,
|
|
1223
|
+
disabled: item.disabled,
|
|
1224
|
+
"aria-current": isSelected ? "page" : void 0,
|
|
1225
|
+
"aria-expanded": hasChildren ? isOpen : void 0,
|
|
1226
|
+
onClick: (event) => hasChildren ? props.toggle(item.key) : props.select(item, path, event),
|
|
1227
|
+
children: [
|
|
1228
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sia-menu__icon", children: item.icon }) : null,
|
|
1229
|
+
!collapsed ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sia-menu__label", children: item.label }) : null,
|
|
1230
|
+
!collapsed && item.extra ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sia-menu__extra", children: item.extra }) : null,
|
|
1231
|
+
!collapsed && hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { className: "sia-menu__expand-icon", name: "chevron-down", size: 13 }) : null
|
|
1232
|
+
]
|
|
1233
|
+
}
|
|
1234
|
+
),
|
|
1235
|
+
hasChildren ? inlineSubmenu ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "sia-menu__submenu", role: "menu", "aria-hidden": !isOpen, children: submenu }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1236
|
+
MenuPopup,
|
|
1237
|
+
{
|
|
1238
|
+
anchorRef,
|
|
1239
|
+
open: isOpen,
|
|
1240
|
+
placement: popupPlacement,
|
|
1241
|
+
menuId: props.menuId,
|
|
1242
|
+
theme: props.theme,
|
|
1243
|
+
onMouseEnter: hover ? cancelClose : void 0,
|
|
1244
|
+
onMouseLeave: hover ? scheduleClose : void 0,
|
|
1245
|
+
children: submenu
|
|
1246
|
+
}
|
|
1247
|
+
) : null
|
|
1248
|
+
]
|
|
1249
|
+
}
|
|
1250
|
+
);
|
|
1251
|
+
}
|
|
1252
|
+
function MenuLevel({
|
|
1253
|
+
items,
|
|
1254
|
+
level,
|
|
1255
|
+
parents,
|
|
1256
|
+
props
|
|
1257
|
+
}) {
|
|
1258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: items.map((item, index) => {
|
|
1259
|
+
if (item.type === "divider") return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("li", { className: "sia-menu__divider", role: "separator" }, item.key || `divider-${index}`);
|
|
1260
|
+
if (item.type === "group") return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("li", { className: "sia-menu__group", children: [
|
|
1261
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "sia-menu__group-title", children: item.label }),
|
|
1262
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { role: "group", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MenuLevel, { items: item.children ?? [], level: level + 1, parents: [...parents, item.key], props }) })
|
|
1263
|
+
] }, item.key);
|
|
1264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MenuEntry, { item, level, parents, props }, item.key);
|
|
1265
|
+
}) });
|
|
1266
|
+
}
|
|
1267
|
+
function Menu({
|
|
1268
|
+
items,
|
|
1269
|
+
mode = "vertical",
|
|
1270
|
+
theme = "light",
|
|
1271
|
+
selectedKeys,
|
|
1272
|
+
defaultSelectedKeys = [],
|
|
1273
|
+
openKeys,
|
|
1274
|
+
defaultOpenKeys = [],
|
|
1275
|
+
multiple = false,
|
|
1276
|
+
selectable = true,
|
|
1277
|
+
inlineCollapsed = false,
|
|
1278
|
+
inlineIndent = 20,
|
|
1279
|
+
triggerSubMenuAction = "click",
|
|
1280
|
+
onClick,
|
|
1281
|
+
onSelect,
|
|
1282
|
+
onDeselect,
|
|
1283
|
+
onOpenChange,
|
|
1284
|
+
className = "",
|
|
1285
|
+
...rest
|
|
1286
|
+
}) {
|
|
1287
|
+
const menuId = (0, import_react6.useId)();
|
|
1288
|
+
const rootRef = (0, import_react6.useRef)(null);
|
|
1289
|
+
const [selected, setSelected] = useControllableState({ value: selectedKeys, defaultValue: defaultSelectedKeys });
|
|
1290
|
+
const [open, setOpen] = useControllableState({ value: openKeys, defaultValue: defaultOpenKeys, onChange: (next) => onOpenChange?.([...next]) });
|
|
1291
|
+
(0, import_react6.useEffect)(() => {
|
|
1292
|
+
if (mode === "inline" || !open.length) return void 0;
|
|
1293
|
+
const closeOutside = (event) => {
|
|
1294
|
+
const target = event.target;
|
|
1295
|
+
if (rootRef.current?.contains(target)) return;
|
|
1296
|
+
const owner = target instanceof Element ? target.closest("[data-sia-menu-owner]")?.getAttribute("data-sia-menu-owner") : null;
|
|
1297
|
+
if (owner !== menuId) setOpen([]);
|
|
1298
|
+
};
|
|
1299
|
+
document.addEventListener("pointerdown", closeOutside);
|
|
1300
|
+
return () => document.removeEventListener("pointerdown", closeOutside);
|
|
1301
|
+
}, [menuId, mode, open.length, setOpen]);
|
|
1302
|
+
function toggle(key, force) {
|
|
1303
|
+
const shouldOpen = force ?? !open.includes(key);
|
|
1304
|
+
setOpen(shouldOpen ? open.includes(key) ? open : [...open, key] : open.filter((item) => item !== key));
|
|
1305
|
+
}
|
|
1306
|
+
function select(item, keyPath, domEvent) {
|
|
1307
|
+
const info = { key: item.key, keyPath, domEvent, item };
|
|
1308
|
+
onClick?.(info);
|
|
1309
|
+
if (!selectable) return;
|
|
1310
|
+
const exists = selected.includes(item.key);
|
|
1311
|
+
const next = multiple ? exists ? selected.filter((key) => key !== item.key) : [...selected, item.key] : [item.key];
|
|
1312
|
+
setSelected(next);
|
|
1313
|
+
if (exists && multiple) onDeselect?.({ ...info, selectedKeys: [...next] });
|
|
1314
|
+
else onSelect?.({ ...info, selectedKeys: [...next] });
|
|
1315
|
+
if (mode !== "inline") setOpen([]);
|
|
1316
|
+
}
|
|
1317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { ref: rootRef, className: `sia-menu sia-menu--${mode} sia-menu--${theme}${inlineCollapsed ? " sia-menu--collapsed" : ""} ${className}`.trim(), role: "menu", ...rest, "data-sia-menu-owner": menuId, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MenuLevel, { items, level: 0, parents: [], props: { menuId, mode, theme, multiple, selectable, inlineCollapsed, inlineIndent, triggerSubMenuAction, selected, open, select, toggle } }) });
|
|
1318
|
+
}
|
|
1319
|
+
function Segmented({ options, value, defaultValue, size = "medium", block = false, vertical = false, disabled = false, onChange, className = "", onKeyDown, ...props }) {
|
|
1320
|
+
const normalized = (0, import_react6.useMemo)(() => options.map((option) => typeof option === "object" ? option : { label: option, value: option }), [options]);
|
|
1321
|
+
const [current, setCurrent] = useControllableState({ value, defaultValue: defaultValue ?? normalized[0]?.value, onChange: (next) => next !== void 0 && onChange?.(next) });
|
|
1322
|
+
function keyboard(event) {
|
|
1323
|
+
onKeyDown?.(event);
|
|
1324
|
+
if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(event.key)) return;
|
|
1325
|
+
event.preventDefault();
|
|
1326
|
+
const enabled = normalized.filter((option) => !option.disabled);
|
|
1327
|
+
const index = enabled.findIndex((option) => option.value === current);
|
|
1328
|
+
const next = event.key === "ArrowRight" || event.key === "ArrowDown" ? enabled[(index + 1) % enabled.length] : enabled[(index - 1 + enabled.length) % enabled.length];
|
|
1329
|
+
if (next) setCurrent(next.value);
|
|
1330
|
+
}
|
|
1331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: `sia-segmented sia-segmented--${size}${block ? " sia-segmented--block" : ""}${vertical ? " sia-segmented--vertical" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), role: "radiogroup", onKeyDown: keyboard, ...props, children: normalized.map((option) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { type: "button", role: "radio", "aria-checked": option.value === current, title: option.title, className: option.value === current ? "is-selected" : "", disabled: disabled || option.disabled, onClick: () => setCurrent(option.value), children: [
|
|
1332
|
+
option.icon,
|
|
1333
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: option.label ?? option.value })
|
|
1334
|
+
] }, option.value)) });
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
// src/components/Dropdown.tsx
|
|
1338
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1339
|
+
var placementMap = {
|
|
1340
|
+
bottomLeft: "bottom-start",
|
|
1341
|
+
bottomRight: "bottom-end",
|
|
1342
|
+
topLeft: "top-start",
|
|
1343
|
+
topRight: "top-end"
|
|
1344
|
+
};
|
|
1345
|
+
function DropdownRoot({
|
|
1346
|
+
menu,
|
|
1347
|
+
children,
|
|
1348
|
+
trigger = ["hover"],
|
|
1349
|
+
placement = "bottomLeft",
|
|
1350
|
+
open,
|
|
1351
|
+
defaultOpen = false,
|
|
1352
|
+
disabled = false,
|
|
1353
|
+
arrow = false,
|
|
1354
|
+
autoFocus = false,
|
|
1355
|
+
openDelay = 80,
|
|
1356
|
+
closeDelay = 120,
|
|
1357
|
+
popupClassName = "",
|
|
1358
|
+
popupStyle,
|
|
1359
|
+
popupRender,
|
|
1360
|
+
onOpenChange,
|
|
1361
|
+
className = "",
|
|
1362
|
+
onClick,
|
|
1363
|
+
onMouseEnter,
|
|
1364
|
+
onMouseLeave,
|
|
1365
|
+
onContextMenu,
|
|
1366
|
+
onKeyDown,
|
|
1367
|
+
...props
|
|
1368
|
+
}) {
|
|
1369
|
+
const rootRef = (0, import_react7.useRef)(null);
|
|
1370
|
+
const contextAnchorRef = (0, import_react7.useRef)(null);
|
|
1371
|
+
const popupRef = (0, import_react7.useRef)(null);
|
|
1372
|
+
const openTimerRef = (0, import_react7.useRef)(void 0);
|
|
1373
|
+
const closeTimerRef = (0, import_react7.useRef)(void 0);
|
|
1374
|
+
const [internalOpen, setInternalOpen] = (0, import_react7.useState)(defaultOpen);
|
|
1375
|
+
const [mounted, setMounted] = (0, import_react7.useState)(open ?? defaultOpen);
|
|
1376
|
+
const [contextPoint, setContextPoint] = (0, import_react7.useState)();
|
|
1377
|
+
const visible = open ?? internalOpen;
|
|
1378
|
+
const triggerSet = new Set(trigger);
|
|
1379
|
+
const pointAtCenter = typeof arrow === "object" && arrow.pointAtCenter;
|
|
1380
|
+
function clearTimer(ref) {
|
|
1381
|
+
if (ref.current === void 0) return;
|
|
1382
|
+
window.clearTimeout(ref.current);
|
|
1383
|
+
ref.current = void 0;
|
|
1384
|
+
}
|
|
1385
|
+
function clearTimers() {
|
|
1386
|
+
clearTimer(openTimerRef);
|
|
1387
|
+
clearTimer(closeTimerRef);
|
|
1388
|
+
}
|
|
1389
|
+
function updateOpen(next, source) {
|
|
1390
|
+
clearTimers();
|
|
1391
|
+
if (next === visible) return;
|
|
1392
|
+
if (open === void 0) setInternalOpen(next);
|
|
1393
|
+
onOpenChange?.(next, { source });
|
|
1394
|
+
}
|
|
1395
|
+
function scheduleOpen() {
|
|
1396
|
+
clearTimer(closeTimerRef);
|
|
1397
|
+
clearTimer(openTimerRef);
|
|
1398
|
+
openTimerRef.current = window.setTimeout(() => updateOpen(true, "trigger"), Math.max(0, openDelay));
|
|
1399
|
+
}
|
|
1400
|
+
function scheduleClose() {
|
|
1401
|
+
clearTimer(openTimerRef);
|
|
1402
|
+
clearTimer(closeTimerRef);
|
|
1403
|
+
closeTimerRef.current = window.setTimeout(() => updateOpen(false, "trigger"), Math.max(0, closeDelay));
|
|
1404
|
+
}
|
|
1405
|
+
(0, import_react7.useEffect)(() => {
|
|
1406
|
+
if (visible) {
|
|
1407
|
+
setMounted(true);
|
|
1408
|
+
return void 0;
|
|
1409
|
+
}
|
|
1410
|
+
const timer = window.setTimeout(() => setMounted(false), 160);
|
|
1411
|
+
return () => window.clearTimeout(timer);
|
|
1412
|
+
}, [visible]);
|
|
1413
|
+
(0, import_react7.useEffect)(() => {
|
|
1414
|
+
if (!visible && !mounted) setContextPoint(void 0);
|
|
1415
|
+
}, [mounted, visible]);
|
|
1416
|
+
(0, import_react7.useEffect)(() => () => clearTimers(), []);
|
|
1417
|
+
(0, import_react7.useEffect)(() => {
|
|
1418
|
+
if (!visible) return void 0;
|
|
1419
|
+
const contextMenuTrigger = triggerSet.has("contextMenu");
|
|
1420
|
+
const closeOutside = (event) => {
|
|
1421
|
+
const target = event.target;
|
|
1422
|
+
if (popupRef.current?.contains(target)) return;
|
|
1423
|
+
if (!contextMenuTrigger && rootRef.current?.contains(target)) return;
|
|
1424
|
+
const targetOwner = target instanceof Element ? target.closest("[data-sia-menu-owner]")?.getAttribute("data-sia-menu-owner") : null;
|
|
1425
|
+
const menuOwner = popupRef.current?.querySelector("[data-sia-menu-owner]")?.getAttribute("data-sia-menu-owner");
|
|
1426
|
+
if (menuOwner && targetOwner === menuOwner) return;
|
|
1427
|
+
updateOpen(false, "trigger");
|
|
1428
|
+
};
|
|
1429
|
+
const closeWithEscape = (event) => {
|
|
1430
|
+
if (event.key !== "Escape") return;
|
|
1431
|
+
updateOpen(false, "trigger");
|
|
1432
|
+
rootRef.current?.querySelector("button, a, [tabindex]:not([tabindex='-1'])")?.focus();
|
|
1433
|
+
};
|
|
1434
|
+
const keepOpenOverNestedMenu = (event) => {
|
|
1435
|
+
const target = event.target;
|
|
1436
|
+
if (target instanceof Element && target.closest(".sia-menu__popup")) clearTimer(closeTimerRef);
|
|
1437
|
+
};
|
|
1438
|
+
document.addEventListener("pointerdown", closeOutside);
|
|
1439
|
+
document.addEventListener("keydown", closeWithEscape);
|
|
1440
|
+
document.addEventListener("pointerover", keepOpenOverNestedMenu);
|
|
1441
|
+
return () => {
|
|
1442
|
+
document.removeEventListener("pointerdown", closeOutside);
|
|
1443
|
+
document.removeEventListener("keydown", closeWithEscape);
|
|
1444
|
+
document.removeEventListener("pointerover", keepOpenOverNestedMenu);
|
|
1445
|
+
};
|
|
1446
|
+
}, [visible]);
|
|
1447
|
+
(0, import_react7.useEffect)(() => {
|
|
1448
|
+
if (!visible || !mounted || !autoFocus) return void 0;
|
|
1449
|
+
const frame = window.requestAnimationFrame(() => {
|
|
1450
|
+
popupRef.current?.querySelector(
|
|
1451
|
+
"[data-sia-dropdown-autofocus], input:not(:disabled), textarea:not(:disabled), .sia-menu__item:not(:disabled)"
|
|
1452
|
+
)?.focus();
|
|
1453
|
+
});
|
|
1454
|
+
return () => window.cancelAnimationFrame(frame);
|
|
1455
|
+
}, [autoFocus, mounted, visible]);
|
|
1456
|
+
function handleMenuClick(info) {
|
|
1457
|
+
info.domEvent.stopPropagation();
|
|
1458
|
+
menu.onClick?.(info);
|
|
1459
|
+
updateOpen(false, "menu");
|
|
1460
|
+
}
|
|
1461
|
+
function handleClick(event) {
|
|
1462
|
+
onClick?.(event);
|
|
1463
|
+
if (disabled || !triggerSet.has("click") || event.defaultPrevented) return;
|
|
1464
|
+
setContextPoint(void 0);
|
|
1465
|
+
updateOpen(!visible, "trigger");
|
|
1466
|
+
}
|
|
1467
|
+
function handleMouseEnter(event) {
|
|
1468
|
+
onMouseEnter?.(event);
|
|
1469
|
+
if (!disabled && triggerSet.has("hover")) scheduleOpen();
|
|
1470
|
+
}
|
|
1471
|
+
function handleMouseLeave(event) {
|
|
1472
|
+
onMouseLeave?.(event);
|
|
1473
|
+
if (!disabled && triggerSet.has("hover")) scheduleClose();
|
|
1474
|
+
}
|
|
1475
|
+
function handleContextMenu(event) {
|
|
1476
|
+
onContextMenu?.(event);
|
|
1477
|
+
if (disabled || !triggerSet.has("contextMenu") || event.defaultPrevented) return;
|
|
1478
|
+
event.preventDefault();
|
|
1479
|
+
event.stopPropagation();
|
|
1480
|
+
setContextPoint({ x: event.clientX, y: event.clientY });
|
|
1481
|
+
updateOpen(true, "trigger");
|
|
1482
|
+
}
|
|
1483
|
+
function handleKeyDown(event) {
|
|
1484
|
+
onKeyDown?.(event);
|
|
1485
|
+
if (disabled || event.defaultPrevented) return;
|
|
1486
|
+
if (event.key === "ArrowDown" && (triggerSet.has("click") || triggerSet.has("hover"))) {
|
|
1487
|
+
event.preventDefault();
|
|
1488
|
+
setContextPoint(void 0);
|
|
1489
|
+
updateOpen(true, "trigger");
|
|
1490
|
+
} else if (triggerSet.has("contextMenu") && (event.key === "ContextMenu" || event.shiftKey && event.key === "F10")) {
|
|
1491
|
+
event.preventDefault();
|
|
1492
|
+
setContextPoint(void 0);
|
|
1493
|
+
updateOpen(true, "trigger");
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
const menuNode = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1497
|
+
Menu,
|
|
1498
|
+
{
|
|
1499
|
+
mode: "vertical",
|
|
1500
|
+
theme: menu.theme,
|
|
1501
|
+
items: menu.items,
|
|
1502
|
+
multiple: menu.multiple,
|
|
1503
|
+
selectable: menu.selectable,
|
|
1504
|
+
selectedKeys: menu.selectedKeys,
|
|
1505
|
+
defaultSelectedKeys: menu.defaultSelectedKeys,
|
|
1506
|
+
triggerSubMenuAction: "hover",
|
|
1507
|
+
onClick: handleMenuClick,
|
|
1508
|
+
onSelect: menu.onSelect,
|
|
1509
|
+
onDeselect: menu.onDeselect,
|
|
1510
|
+
className: "sia-dropdown__menu"
|
|
1511
|
+
}
|
|
1512
|
+
);
|
|
1513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1514
|
+
"span",
|
|
1515
|
+
{
|
|
1516
|
+
ref: rootRef,
|
|
1517
|
+
className: `sia-dropdown${visible ? " is-open" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(),
|
|
1518
|
+
"aria-expanded": visible,
|
|
1519
|
+
"aria-haspopup": "menu",
|
|
1520
|
+
tabIndex: triggerSet.has("contextMenu") ? 0 : void 0,
|
|
1521
|
+
onClick: handleClick,
|
|
1522
|
+
onMouseEnter: handleMouseEnter,
|
|
1523
|
+
onMouseLeave: handleMouseLeave,
|
|
1524
|
+
onContextMenu: handleContextMenu,
|
|
1525
|
+
onKeyDown: handleKeyDown,
|
|
1526
|
+
...props,
|
|
1527
|
+
children: [
|
|
1528
|
+
children,
|
|
1529
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1530
|
+
"span",
|
|
1531
|
+
{
|
|
1532
|
+
ref: contextAnchorRef,
|
|
1533
|
+
className: "sia-dropdown__context-anchor",
|
|
1534
|
+
style: contextPoint ? { left: contextPoint.x, top: contextPoint.y } : void 0,
|
|
1535
|
+
"aria-hidden": "true"
|
|
1536
|
+
}
|
|
1537
|
+
),
|
|
1538
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1539
|
+
PopupPortal,
|
|
1540
|
+
{
|
|
1541
|
+
ref: popupRef,
|
|
1542
|
+
anchorRef: contextPoint ? contextAnchorRef : rootRef,
|
|
1543
|
+
open: mounted,
|
|
1544
|
+
placement: contextPoint ? "bottom-start" : placementMap[placement],
|
|
1545
|
+
offset: contextPoint ? 2 : 6,
|
|
1546
|
+
className: `sia-dropdown__popup${visible ? " is-open" : " is-closing"}${arrow ? " sia-dropdown__popup--arrow" : ""}${pointAtCenter ? " sia-dropdown__popup--arrow-center" : ""} ${popupClassName}`.trim(),
|
|
1547
|
+
style: popupStyle,
|
|
1548
|
+
onMouseEnter: () => {
|
|
1549
|
+
clearTimer(closeTimerRef);
|
|
1550
|
+
if (!disabled && triggerSet.has("hover")) clearTimer(openTimerRef);
|
|
1551
|
+
},
|
|
1552
|
+
onMouseLeave: () => {
|
|
1553
|
+
if (!disabled && triggerSet.has("hover")) scheduleClose();
|
|
1554
|
+
},
|
|
1555
|
+
onClick: (event) => event.stopPropagation(),
|
|
1556
|
+
children: popupRender ? popupRender(menuNode) : menuNode
|
|
1557
|
+
},
|
|
1558
|
+
contextPoint ? `context-${contextPoint.x}-${contextPoint.y}` : "trigger"
|
|
1559
|
+
)
|
|
1560
|
+
]
|
|
1561
|
+
}
|
|
1562
|
+
);
|
|
1563
|
+
}
|
|
1564
|
+
function DropdownButton({
|
|
1565
|
+
children,
|
|
1566
|
+
className = "",
|
|
1567
|
+
buttonProps,
|
|
1568
|
+
onClick,
|
|
1569
|
+
disabled,
|
|
1570
|
+
trigger = ["click"],
|
|
1571
|
+
...dropdownProps
|
|
1572
|
+
}) {
|
|
1573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: `sia-dropdown-button ${className}`.trim(), children: [
|
|
1574
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { ...buttonProps, disabled, onClick, children }),
|
|
1575
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DropdownRoot, { ...dropdownProps, disabled, trigger, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1576
|
+
Button,
|
|
1577
|
+
{
|
|
1578
|
+
...buttonProps,
|
|
1579
|
+
className: `sia-dropdown-button__arrow ${buttonProps?.className ?? ""}`.trim(),
|
|
1580
|
+
disabled,
|
|
1581
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "chevron-down", size: 14 }),
|
|
1582
|
+
"aria-label": "\u5C55\u5F00\u4E0B\u62C9\u83DC\u5355"
|
|
1583
|
+
}
|
|
1584
|
+
) })
|
|
1585
|
+
] });
|
|
1586
|
+
}
|
|
1587
|
+
var Dropdown = Object.assign(DropdownRoot, { Button: DropdownButton });
|
|
1588
|
+
|
|
1589
|
+
// src/components/Tabs.tsx
|
|
1590
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1591
|
+
function Tabs({
|
|
1592
|
+
items,
|
|
1593
|
+
activeKey,
|
|
1594
|
+
defaultActiveKey,
|
|
1595
|
+
onChange,
|
|
1596
|
+
type = "line",
|
|
1597
|
+
size = "medium",
|
|
1598
|
+
tabPosition,
|
|
1599
|
+
orientation = "horizontal",
|
|
1600
|
+
centered = false,
|
|
1601
|
+
tabBarTitle,
|
|
1602
|
+
tabBarExtraContent,
|
|
1603
|
+
destroyInactiveTabPane = true,
|
|
1604
|
+
closable = false,
|
|
1605
|
+
onEdit,
|
|
1606
|
+
tabContextMenu,
|
|
1607
|
+
onTabContextMenuClick,
|
|
1608
|
+
className = "",
|
|
1609
|
+
...props
|
|
1610
|
+
}) {
|
|
1611
|
+
const firstEnabledKey = items.find((item) => !item.disabled)?.key ?? "";
|
|
1612
|
+
const [internalActiveKey, setInternalActiveKey] = (0, import_react8.useState)(defaultActiveKey ?? firstEnabledKey);
|
|
1613
|
+
const currentKey = activeKey ?? internalActiveKey;
|
|
1614
|
+
const selectedKey = items.some((item) => item.key === currentKey && !item.disabled) ? currentKey : firstEnabledKey;
|
|
1615
|
+
const baseId = (0, import_react8.useId)().replace(/:/g, "");
|
|
1616
|
+
const enabledItems = (0, import_react8.useMemo)(() => items.filter((item) => !item.disabled), [items]);
|
|
1617
|
+
const resolvedPosition = tabPosition ?? (orientation === "vertical" ? "left" : "top");
|
|
1618
|
+
const resolvedOrientation = resolvedPosition === "left" || resolvedPosition === "right" ? "vertical" : "horizontal";
|
|
1619
|
+
function selectTab(key) {
|
|
1620
|
+
if (key === selectedKey) return;
|
|
1621
|
+
if (activeKey === void 0) setInternalActiveKey(key);
|
|
1622
|
+
onChange?.(key);
|
|
1623
|
+
}
|
|
1624
|
+
function focusAndSelect(key) {
|
|
1625
|
+
selectTab(key);
|
|
1626
|
+
document.getElementById(`${baseId}-tab-${key}`)?.focus();
|
|
1627
|
+
}
|
|
1628
|
+
function handleKeyDown(event, key) {
|
|
1629
|
+
const previousKey = resolvedOrientation === "horizontal" ? "ArrowLeft" : "ArrowUp";
|
|
1630
|
+
const nextKey = resolvedOrientation === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
1631
|
+
if (![previousKey, nextKey, "Home", "End"].includes(event.key) || enabledItems.length === 0) return;
|
|
1632
|
+
event.preventDefault();
|
|
1633
|
+
const currentIndex = Math.max(0, enabledItems.findIndex((item) => item.key === key));
|
|
1634
|
+
if (event.key === "Home") return focusAndSelect(enabledItems[0].key);
|
|
1635
|
+
if (event.key === "End") return focusAndSelect(enabledItems[enabledItems.length - 1].key);
|
|
1636
|
+
const offset = event.key === nextKey ? 1 : -1;
|
|
1637
|
+
const nextIndex = (currentIndex + offset + enabledItems.length) % enabledItems.length;
|
|
1638
|
+
focusAndSelect(enabledItems[nextIndex].key);
|
|
1639
|
+
}
|
|
1640
|
+
const hasPanels = items.some((item) => item.children !== void 0);
|
|
1641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1642
|
+
"div",
|
|
1643
|
+
{
|
|
1644
|
+
className: `sia-tabs sia-tabs--${type} sia-tabs--${size} sia-tabs--${resolvedOrientation} sia-tabs--${resolvedPosition}${centered ? " sia-tabs--centered" : ""} ${className}`.trim(),
|
|
1645
|
+
...props,
|
|
1646
|
+
children: [
|
|
1647
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "sia-tabs__header", children: [
|
|
1648
|
+
tabBarTitle ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "sia-tabs__title", children: [
|
|
1649
|
+
tabBarTitle,
|
|
1650
|
+
type === "tech-line" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("svg", { className: "sia-tabs__title-connector", viewBox: "0 0 32 40", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M0 39 H5 Q8 39 10 35 L28 3 Q29 1 32 1", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }) }) : null
|
|
1651
|
+
] }) : null,
|
|
1652
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "sia-tabs__list", role: "tablist", "aria-orientation": resolvedOrientation, children: items.map((item) => {
|
|
1653
|
+
const selected = item.key === selectedKey;
|
|
1654
|
+
const canClose = item.closable ?? closable;
|
|
1655
|
+
const tabNode = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: `sia-tabs__tab-wrap${canClose ? " is-closable" : ""}`, children: [
|
|
1656
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1657
|
+
"button",
|
|
1658
|
+
{
|
|
1659
|
+
id: `${baseId}-tab-${item.key}`,
|
|
1660
|
+
type: "button",
|
|
1661
|
+
className: "sia-tabs__tab",
|
|
1662
|
+
role: "tab",
|
|
1663
|
+
"aria-selected": selected,
|
|
1664
|
+
"aria-controls": hasPanels ? `${baseId}-panel-${item.key}` : void 0,
|
|
1665
|
+
tabIndex: selected ? 0 : -1,
|
|
1666
|
+
disabled: item.disabled,
|
|
1667
|
+
onClick: () => selectTab(item.key),
|
|
1668
|
+
onKeyDown: (event) => handleKeyDown(event, item.key),
|
|
1669
|
+
children: [
|
|
1670
|
+
type === "tech-line" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("svg", { className: "sia-tabs__tab-shape", viewBox: "0 0 100 34", preserveAspectRatio: "none", "aria-hidden": "true", children: [
|
|
1671
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("linearGradient", { id: `${baseId}-tab-fill-${item.key}`, x1: "0", y1: "0", x2: "1", y2: "0", children: [
|
|
1672
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("stop", { offset: "0", stopColor: "var(--sia-tabs-line-fill-edge, var(--sia-tabs-line-fill))" }),
|
|
1673
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("stop", { offset: ".53", stopColor: "var(--sia-tabs-line-fill-center, var(--sia-tabs-line-fill))" }),
|
|
1674
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("stop", { offset: "1", stopColor: "var(--sia-tabs-line-fill-edge, var(--sia-tabs-line-fill))" })
|
|
1675
|
+
] }) }),
|
|
1676
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1677
|
+
"path",
|
|
1678
|
+
{
|
|
1679
|
+
d: "M19 1 H96 Q99 1 97.5 4 L83.5 30 Q82 33 79 33 H4 Q1 33 2.5 30 L16.5 4 Q18 1 19 1 Z",
|
|
1680
|
+
fill: `url(#${baseId}-tab-fill-${item.key})`,
|
|
1681
|
+
stroke: "currentColor",
|
|
1682
|
+
strokeWidth: "1.5",
|
|
1683
|
+
vectorEffect: "non-scaling-stroke"
|
|
1684
|
+
}
|
|
1685
|
+
)
|
|
1686
|
+
] }) : null,
|
|
1687
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "sia-tabs__icon", children: item.icon }) : null,
|
|
1688
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: item.label })
|
|
1689
|
+
]
|
|
1690
|
+
}
|
|
1691
|
+
),
|
|
1692
|
+
canClose ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1693
|
+
"button",
|
|
1694
|
+
{
|
|
1695
|
+
type: "button",
|
|
1696
|
+
className: "sia-tabs__close",
|
|
1697
|
+
"aria-label": `\u5173\u95ED${typeof item.label === "string" ? item.label : "\u6807\u7B7E\u9875"}`,
|
|
1698
|
+
disabled: item.disabled,
|
|
1699
|
+
onClick: () => onEdit?.(item.key, "remove"),
|
|
1700
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { name: "close", size: 12 })
|
|
1701
|
+
}
|
|
1702
|
+
) : null
|
|
1703
|
+
] }, item.key);
|
|
1704
|
+
const contextMenuItems = typeof tabContextMenu === "function" ? tabContextMenu(item) : tabContextMenu;
|
|
1705
|
+
if (!contextMenuItems?.length) return tabNode;
|
|
1706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1707
|
+
Dropdown,
|
|
1708
|
+
{
|
|
1709
|
+
className: "sia-tabs__tab-context-trigger",
|
|
1710
|
+
popupClassName: "sia-tabs__tab-context-menu",
|
|
1711
|
+
trigger: ["contextMenu"],
|
|
1712
|
+
tabIndex: -1,
|
|
1713
|
+
menu: {
|
|
1714
|
+
items: contextMenuItems,
|
|
1715
|
+
selectable: false,
|
|
1716
|
+
onClick: (info) => onTabContextMenuClick?.({ ...info, tabKey: item.key, tab: item })
|
|
1717
|
+
},
|
|
1718
|
+
children: tabNode
|
|
1719
|
+
},
|
|
1720
|
+
item.key
|
|
1721
|
+
);
|
|
1722
|
+
}) }),
|
|
1723
|
+
tabBarExtraContent ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "sia-tabs__extra", children: tabBarExtraContent }) : null
|
|
1724
|
+
] }),
|
|
1725
|
+
hasPanels ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "sia-tabs__panels", children: items.map((item) => {
|
|
1726
|
+
const selected = item.key === selectedKey;
|
|
1727
|
+
if (destroyInactiveTabPane && !selected) return null;
|
|
1728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1729
|
+
"div",
|
|
1730
|
+
{
|
|
1731
|
+
id: `${baseId}-panel-${item.key}`,
|
|
1732
|
+
className: "sia-tabs__panel",
|
|
1733
|
+
role: "tabpanel",
|
|
1734
|
+
"aria-labelledby": `${baseId}-tab-${item.key}`,
|
|
1735
|
+
hidden: !selected,
|
|
1736
|
+
tabIndex: 0,
|
|
1737
|
+
children: item.children
|
|
1738
|
+
},
|
|
1739
|
+
item.key
|
|
1740
|
+
);
|
|
1741
|
+
}) }) : null
|
|
1742
|
+
]
|
|
1743
|
+
}
|
|
1744
|
+
);
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
// src/components/Feedback.tsx
|
|
1748
|
+
var import_react10 = require("react");
|
|
1749
|
+
var import_react_dom3 = require("react-dom");
|
|
1750
|
+
var import_client = require("react-dom/client");
|
|
1751
|
+
|
|
1752
|
+
// src/components/FloatingDisplay.tsx
|
|
1753
|
+
var import_react9 = require("react");
|
|
1754
|
+
var import_react_dom2 = require("react-dom");
|
|
1755
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1756
|
+
var FLOATING_GAP = 9;
|
|
1757
|
+
var FLOATING_VIEWPORT_PADDING = 8;
|
|
1758
|
+
var FLOATING_ARROW_EDGE_OFFSET = 16;
|
|
1759
|
+
var activeTooltipClose;
|
|
1760
|
+
function clampFloating(value, min, max) {
|
|
1761
|
+
return Math.min(Math.max(value, min), Math.max(min, max));
|
|
1762
|
+
}
|
|
1763
|
+
function resolveFloatingPosition(trigger, overlay, placement) {
|
|
1764
|
+
const viewportWidth = document.documentElement.clientWidth;
|
|
1765
|
+
const viewportHeight = document.documentElement.clientHeight;
|
|
1766
|
+
let resolvedPlacement = placement;
|
|
1767
|
+
if (placement.startsWith("top") && trigger.top - overlay.height - FLOATING_GAP < FLOATING_VIEWPORT_PADDING && trigger.bottom + overlay.height + FLOATING_GAP <= viewportHeight - FLOATING_VIEWPORT_PADDING) {
|
|
1768
|
+
resolvedPlacement = placement.replace("top", "bottom");
|
|
1769
|
+
} else if (placement.startsWith("bottom") && trigger.bottom + overlay.height + FLOATING_GAP > viewportHeight - FLOATING_VIEWPORT_PADDING && trigger.top - overlay.height - FLOATING_GAP >= FLOATING_VIEWPORT_PADDING) {
|
|
1770
|
+
resolvedPlacement = placement.replace("bottom", "top");
|
|
1771
|
+
} else if (placement === "left" && trigger.left - overlay.width - FLOATING_GAP < FLOATING_VIEWPORT_PADDING && trigger.right + overlay.width + FLOATING_GAP <= viewportWidth - FLOATING_VIEWPORT_PADDING) {
|
|
1772
|
+
resolvedPlacement = "right";
|
|
1773
|
+
} else if (placement === "right" && trigger.right + overlay.width + FLOATING_GAP > viewportWidth - FLOATING_VIEWPORT_PADDING && trigger.left - overlay.width - FLOATING_GAP >= FLOATING_VIEWPORT_PADDING) {
|
|
1774
|
+
resolvedPlacement = "left";
|
|
1775
|
+
}
|
|
1776
|
+
let top = trigger.top;
|
|
1777
|
+
let left = trigger.left;
|
|
1778
|
+
if (resolvedPlacement.startsWith("top") || resolvedPlacement.startsWith("bottom")) {
|
|
1779
|
+
top = resolvedPlacement.startsWith("top") ? trigger.top - overlay.height - FLOATING_GAP : trigger.bottom + FLOATING_GAP;
|
|
1780
|
+
left = resolvedPlacement.endsWith("-start") ? trigger.left : resolvedPlacement.endsWith("-end") ? trigger.right - overlay.width : trigger.left + (trigger.width - overlay.width) / 2;
|
|
1781
|
+
} else {
|
|
1782
|
+
top = trigger.top + (trigger.height - overlay.height) / 2;
|
|
1783
|
+
left = resolvedPlacement === "left" ? trigger.left - overlay.width - FLOATING_GAP : trigger.right + FLOATING_GAP;
|
|
1784
|
+
}
|
|
1785
|
+
top = clampFloating(top, FLOATING_VIEWPORT_PADDING, viewportHeight - overlay.height - FLOATING_VIEWPORT_PADDING);
|
|
1786
|
+
left = clampFloating(left, FLOATING_VIEWPORT_PADDING, viewportWidth - overlay.width - FLOATING_VIEWPORT_PADDING);
|
|
1787
|
+
const result = { top, left, placement: resolvedPlacement };
|
|
1788
|
+
if (resolvedPlacement.startsWith("top") || resolvedPlacement.startsWith("bottom")) {
|
|
1789
|
+
result.arrowX = resolvedPlacement.endsWith("-start") ? clampFloating(FLOATING_ARROW_EDGE_OFFSET, 8, overlay.width - 16) : resolvedPlacement.endsWith("-end") ? clampFloating(overlay.width - FLOATING_ARROW_EDGE_OFFSET - 8, 8, overlay.width - 16) : clampFloating(trigger.left + trigger.width / 2 - left - 4, 8, overlay.width - 16);
|
|
1790
|
+
} else {
|
|
1791
|
+
result.arrowY = clampFloating(trigger.top + trigger.height / 2 - top - 4, 8, overlay.height - 16);
|
|
1792
|
+
}
|
|
1793
|
+
return result;
|
|
1794
|
+
}
|
|
1795
|
+
function Floating({
|
|
1796
|
+
children,
|
|
1797
|
+
content,
|
|
1798
|
+
placement = "top",
|
|
1799
|
+
trigger = "hover",
|
|
1800
|
+
open,
|
|
1801
|
+
defaultOpen = false,
|
|
1802
|
+
mouseEnterDelay = 0.1,
|
|
1803
|
+
mouseLeaveDelay = 0.1,
|
|
1804
|
+
arrow = true,
|
|
1805
|
+
color,
|
|
1806
|
+
className = "",
|
|
1807
|
+
overlayClassName = "",
|
|
1808
|
+
role = "tooltip",
|
|
1809
|
+
onOpenChange
|
|
1810
|
+
}) {
|
|
1811
|
+
const rootRef = (0, import_react9.useRef)(null);
|
|
1812
|
+
const overlayRef = (0, import_react9.useRef)(null);
|
|
1813
|
+
const enterTimer = (0, import_react9.useRef)();
|
|
1814
|
+
const leaveTimer = (0, import_react9.useRef)();
|
|
1815
|
+
const contentId = (0, import_react9.useId)();
|
|
1816
|
+
const triggers = Array.isArray(trigger) ? trigger : [trigger];
|
|
1817
|
+
const [visible, setVisible] = useControllableState({ value: open, defaultValue: defaultOpen, onChange: onOpenChange });
|
|
1818
|
+
const [position, setPosition] = (0, import_react9.useState)();
|
|
1819
|
+
const setVisibleRef = (0, import_react9.useRef)(setVisible);
|
|
1820
|
+
setVisibleRef.current = setVisible;
|
|
1821
|
+
const closeSelfRef = (0, import_react9.useRef)();
|
|
1822
|
+
if (!closeSelfRef.current) closeSelfRef.current = () => setVisibleRef.current(false);
|
|
1823
|
+
const exclusiveTooltip = role === "tooltip" && triggers.includes("hover");
|
|
1824
|
+
function openNow() {
|
|
1825
|
+
if (exclusiveTooltip && activeTooltipClose !== closeSelfRef.current) {
|
|
1826
|
+
activeTooltipClose?.();
|
|
1827
|
+
activeTooltipClose = closeSelfRef.current;
|
|
1828
|
+
}
|
|
1829
|
+
setVisible(true);
|
|
1830
|
+
}
|
|
1831
|
+
function closeNow() {
|
|
1832
|
+
if (activeTooltipClose === closeSelfRef.current) activeTooltipClose = void 0;
|
|
1833
|
+
setVisible(false);
|
|
1834
|
+
}
|
|
1835
|
+
function clearTimers() {
|
|
1836
|
+
window.clearTimeout(enterTimer.current);
|
|
1837
|
+
window.clearTimeout(leaveTimer.current);
|
|
1838
|
+
}
|
|
1839
|
+
function show(delay = 0) {
|
|
1840
|
+
clearTimers();
|
|
1841
|
+
if (delay <= 0) openNow();
|
|
1842
|
+
else enterTimer.current = window.setTimeout(openNow, delay * 1e3);
|
|
1843
|
+
}
|
|
1844
|
+
function hide(delay = 0) {
|
|
1845
|
+
clearTimers();
|
|
1846
|
+
if (delay <= 0) closeNow();
|
|
1847
|
+
else leaveTimer.current = window.setTimeout(closeNow, delay * 1e3);
|
|
1848
|
+
}
|
|
1849
|
+
(0, import_react9.useEffect)(() => {
|
|
1850
|
+
if (!visible || !triggers.includes("click")) return;
|
|
1851
|
+
const close = (event) => {
|
|
1852
|
+
const target = event.target;
|
|
1853
|
+
if (!rootRef.current?.contains(target) && !overlayRef.current?.contains(target)) closeNow();
|
|
1854
|
+
};
|
|
1855
|
+
document.addEventListener("pointerdown", close);
|
|
1856
|
+
return () => document.removeEventListener("pointerdown", close);
|
|
1857
|
+
}, [triggers.join("|"), visible]);
|
|
1858
|
+
(0, import_react9.useLayoutEffect)(() => {
|
|
1859
|
+
if (!visible) {
|
|
1860
|
+
setPosition(void 0);
|
|
1861
|
+
return;
|
|
1862
|
+
}
|
|
1863
|
+
const update = () => {
|
|
1864
|
+
if (!rootRef.current || !overlayRef.current) return;
|
|
1865
|
+
setPosition(resolveFloatingPosition(rootRef.current.getBoundingClientRect(), overlayRef.current.getBoundingClientRect(), placement));
|
|
1866
|
+
};
|
|
1867
|
+
update();
|
|
1868
|
+
window.addEventListener("resize", update);
|
|
1869
|
+
window.addEventListener("scroll", update, true);
|
|
1870
|
+
const observer = new ResizeObserver(update);
|
|
1871
|
+
if (rootRef.current) observer.observe(rootRef.current);
|
|
1872
|
+
if (overlayRef.current) observer.observe(overlayRef.current);
|
|
1873
|
+
return () => {
|
|
1874
|
+
window.removeEventListener("resize", update);
|
|
1875
|
+
window.removeEventListener("scroll", update, true);
|
|
1876
|
+
observer.disconnect();
|
|
1877
|
+
};
|
|
1878
|
+
}, [children, content, placement, visible]);
|
|
1879
|
+
(0, import_react9.useEffect)(() => () => {
|
|
1880
|
+
clearTimers();
|
|
1881
|
+
if (activeTooltipClose === closeSelfRef.current) activeTooltipClose = void 0;
|
|
1882
|
+
}, []);
|
|
1883
|
+
const child = (0, import_react9.cloneElement)(children, {
|
|
1884
|
+
...triggers.includes("hover") ? { onMouseEnter: (event) => {
|
|
1885
|
+
children.props.onMouseEnter?.(event);
|
|
1886
|
+
show(mouseEnterDelay);
|
|
1887
|
+
}, onMouseLeave: (event) => {
|
|
1888
|
+
children.props.onMouseLeave?.(event);
|
|
1889
|
+
hide(mouseLeaveDelay);
|
|
1890
|
+
} } : {},
|
|
1891
|
+
...triggers.includes("focus") ? { onFocus: (event) => {
|
|
1892
|
+
children.props.onFocus?.(event);
|
|
1893
|
+
show();
|
|
1894
|
+
}, onBlur: (event) => {
|
|
1895
|
+
children.props.onBlur?.(event);
|
|
1896
|
+
hide();
|
|
1897
|
+
} } : {},
|
|
1898
|
+
...triggers.includes("click") ? { onClick: (event) => {
|
|
1899
|
+
children.props.onClick?.(event);
|
|
1900
|
+
if (visible) closeNow();
|
|
1901
|
+
else openNow();
|
|
1902
|
+
} } : {},
|
|
1903
|
+
"aria-describedby": visible ? contentId : void 0
|
|
1904
|
+
});
|
|
1905
|
+
const overlay = visible && content !== null && content !== void 0 && typeof document !== "undefined" ? (0, import_react_dom2.createPortal)(
|
|
1906
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1907
|
+
"span",
|
|
1908
|
+
{
|
|
1909
|
+
ref: overlayRef,
|
|
1910
|
+
id: contentId,
|
|
1911
|
+
role,
|
|
1912
|
+
"data-custom-color": color ? "" : void 0,
|
|
1913
|
+
className: `sia-floating__overlay sia-floating__overlay--${position?.placement ?? placement} ${overlayClassName}`.trim(),
|
|
1914
|
+
style: {
|
|
1915
|
+
"--sia-floating-color": color,
|
|
1916
|
+
"--sia-floating-arrow-x": position?.arrowX == null ? void 0 : `${position.arrowX}px`,
|
|
1917
|
+
"--sia-floating-arrow-y": position?.arrowY == null ? void 0 : `${position.arrowY}px`,
|
|
1918
|
+
top: position?.top ?? 0,
|
|
1919
|
+
left: position?.left ?? 0,
|
|
1920
|
+
visibility: position ? "visible" : "hidden"
|
|
1921
|
+
},
|
|
1922
|
+
onMouseEnter: triggers.includes("hover") ? () => show() : void 0,
|
|
1923
|
+
onMouseLeave: triggers.includes("hover") ? () => hide(mouseLeaveDelay) : void 0,
|
|
1924
|
+
children: [
|
|
1925
|
+
content,
|
|
1926
|
+
arrow ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sia-floating__arrow" }) : null
|
|
1927
|
+
]
|
|
1928
|
+
}
|
|
1929
|
+
),
|
|
1930
|
+
document.body
|
|
1931
|
+
) : null;
|
|
1932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
1933
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { ref: rootRef, className: `sia-floating ${className}`.trim(), children: child }),
|
|
1934
|
+
overlay
|
|
1935
|
+
] });
|
|
1936
|
+
}
|
|
1937
|
+
function Tooltip(props) {
|
|
1938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Floating, { ...props, content: props.title });
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
// src/components/Feedback.tsx
|
|
1942
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1943
|
+
function Progress({
|
|
1944
|
+
percent = 0,
|
|
1945
|
+
type = "line",
|
|
1946
|
+
status,
|
|
1947
|
+
showInfo = true,
|
|
1948
|
+
format,
|
|
1949
|
+
strokeColor,
|
|
1950
|
+
trailColor,
|
|
1951
|
+
strokeWidth = 8,
|
|
1952
|
+
width = 120,
|
|
1953
|
+
steps,
|
|
1954
|
+
success,
|
|
1955
|
+
size = "default",
|
|
1956
|
+
className = "",
|
|
1957
|
+
style,
|
|
1958
|
+
...props
|
|
1959
|
+
}) {
|
|
1960
|
+
const safe = Math.max(0, Math.min(100, percent));
|
|
1961
|
+
const resolved = status ?? (safe >= 100 ? "success" : "normal");
|
|
1962
|
+
const color = typeof strokeColor === "string" ? strokeColor : void 0;
|
|
1963
|
+
const background = typeof strokeColor === "object" ? `linear-gradient(90deg, ${strokeColor.from}, ${strokeColor.to})` : color;
|
|
1964
|
+
const label = format?.(safe, success?.percent) ?? (resolved === "exception" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { name: "close" }) : resolved === "success" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { name: "check" }) : `${safe}%`);
|
|
1965
|
+
if (type !== "line") {
|
|
1966
|
+
const radius = 46;
|
|
1967
|
+
const circumference = 2 * Math.PI * radius;
|
|
1968
|
+
const dash = circumference * (safe / 100);
|
|
1969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: `sia-progress sia-progress--${type} sia-progress--${resolved} ${className}`.trim(), style: { width, height: width, ...style }, ...props, children: [
|
|
1970
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { viewBox: "0 0 100 100", role: "progressbar", "aria-valuenow": safe, children: [
|
|
1971
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("circle", { className: "sia-progress__trail", cx: "50", cy: "50", r: radius, style: { stroke: trailColor } }),
|
|
1972
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("circle", { className: "sia-progress__circle", cx: "50", cy: "50", r: radius, style: { stroke: color, strokeDasharray: type === "dashboard" ? `${circumference * 0.75} ${circumference * 0.25}` : circumference, strokeDashoffset: (type === "dashboard" ? circumference * 0.75 : circumference) - dash * (type === "dashboard" ? 0.75 : 1), strokeWidth } })
|
|
1973
|
+
] }),
|
|
1974
|
+
showInfo ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sia-progress__text", children: label }) : null
|
|
1975
|
+
] });
|
|
1976
|
+
}
|
|
1977
|
+
const height = Array.isArray(size) ? size[1] : typeof size === "number" ? size : size === "small" ? 6 : strokeWidth;
|
|
1978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: `sia-progress sia-progress--line sia-progress--${resolved} ${className}`.trim(), style, ...props, children: [
|
|
1979
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "sia-progress__outer", style: { height, backgroundColor: trailColor }, children: steps ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "sia-progress__steps", children: Array.from({ length: steps }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: index < Math.round(steps * safe / 100) ? "is-active" : "", style: { background: index < Math.round(steps * safe / 100) ? background : trailColor } }, index)) }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
1980
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sia-progress__bar", style: { width: `${safe}%`, background } }),
|
|
1981
|
+
success?.percent ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sia-progress__success", style: { width: `${success.percent}%`, background: success.strokeColor } }) : null
|
|
1982
|
+
] }) }),
|
|
1983
|
+
showInfo ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sia-progress__info", children: label }) : null
|
|
1984
|
+
] });
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
// src/components/DataDisplay.tsx
|
|
1988
|
+
var import_react12 = require("react");
|
|
1989
|
+
var import_react_dom5 = require("react-dom");
|
|
1990
|
+
|
|
1991
|
+
// src/components/Overlay.tsx
|
|
1992
|
+
var import_react11 = require("react");
|
|
1993
|
+
var import_react_dom4 = require("react-dom");
|
|
1994
|
+
var bodyLockCount = 0;
|
|
1995
|
+
var previousBodyOverflow = "";
|
|
1996
|
+
var overlayStack = [];
|
|
1997
|
+
function lockBodyScroll() {
|
|
1998
|
+
if (bodyLockCount === 0) {
|
|
1999
|
+
previousBodyOverflow = document.body.style.overflow;
|
|
2000
|
+
document.body.style.overflow = "hidden";
|
|
2001
|
+
}
|
|
2002
|
+
bodyLockCount += 1;
|
|
2003
|
+
return () => {
|
|
2004
|
+
bodyLockCount = Math.max(0, bodyLockCount - 1);
|
|
2005
|
+
if (bodyLockCount === 0) document.body.style.overflow = previousBodyOverflow;
|
|
2006
|
+
};
|
|
2007
|
+
}
|
|
2008
|
+
function focusableElements(container) {
|
|
2009
|
+
return [...container.querySelectorAll(
|
|
2010
|
+
'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
2011
|
+
)].filter((element) => !element.hidden && element.getAttribute("aria-hidden") !== "true");
|
|
2012
|
+
}
|
|
2013
|
+
function useOverlayLifecycle(open, panelRef, onRequestClose, keyboard = true) {
|
|
2014
|
+
const overlayIdRef = (0, import_react11.useRef)(/* @__PURE__ */ Symbol("sia-overlay"));
|
|
2015
|
+
const closeRef = (0, import_react11.useRef)(onRequestClose);
|
|
2016
|
+
closeRef.current = onRequestClose;
|
|
2017
|
+
(0, import_react11.useEffect)(() => {
|
|
2018
|
+
if (!open || typeof document === "undefined") return void 0;
|
|
2019
|
+
const overlayId = overlayIdRef.current;
|
|
2020
|
+
const previouslyFocused = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
2021
|
+
overlayStack.push(overlayId);
|
|
2022
|
+
const unlockBody = lockBodyScroll();
|
|
2023
|
+
const focusTimer = window.setTimeout(() => {
|
|
2024
|
+
const panel = panelRef.current;
|
|
2025
|
+
if (!panel) return;
|
|
2026
|
+
const [firstFocusable] = focusableElements(panel);
|
|
2027
|
+
(firstFocusable ?? panel).focus({ preventScroll: true });
|
|
2028
|
+
}, 0);
|
|
2029
|
+
function handleKeyDown(event) {
|
|
2030
|
+
if (overlayStack.at(-1) !== overlayId) return;
|
|
2031
|
+
if (event.key === "Escape" && keyboard) {
|
|
2032
|
+
event.preventDefault();
|
|
2033
|
+
closeRef.current();
|
|
2034
|
+
return;
|
|
2035
|
+
}
|
|
2036
|
+
if (event.key !== "Tab" || !panelRef.current) return;
|
|
2037
|
+
const focusable = focusableElements(panelRef.current);
|
|
2038
|
+
if (focusable.length === 0) {
|
|
2039
|
+
event.preventDefault();
|
|
2040
|
+
panelRef.current.focus();
|
|
2041
|
+
return;
|
|
2042
|
+
}
|
|
2043
|
+
const first = focusable[0];
|
|
2044
|
+
const last = focusable.at(-1);
|
|
2045
|
+
if (event.shiftKey && document.activeElement === first) {
|
|
2046
|
+
event.preventDefault();
|
|
2047
|
+
last.focus();
|
|
2048
|
+
} else if (!event.shiftKey && document.activeElement === last) {
|
|
2049
|
+
event.preventDefault();
|
|
2050
|
+
first.focus();
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
2054
|
+
return () => {
|
|
2055
|
+
window.clearTimeout(focusTimer);
|
|
2056
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
2057
|
+
const index = overlayStack.lastIndexOf(overlayId);
|
|
2058
|
+
if (index >= 0) overlayStack.splice(index, 1);
|
|
2059
|
+
unlockBody();
|
|
2060
|
+
previouslyFocused?.focus({ preventScroll: true });
|
|
2061
|
+
};
|
|
2062
|
+
}, [keyboard, open, panelRef]);
|
|
2063
|
+
}
|
|
2064
|
+
function OverlayPortal({ children, container }) {
|
|
2065
|
+
if (typeof document === "undefined") return null;
|
|
2066
|
+
const target = typeof container === "function" ? container() : container ?? document.body;
|
|
2067
|
+
return (0, import_react_dom4.createPortal)(children, target);
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
// src/components/DataDisplay.tsx
|
|
2071
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2072
|
+
function BadgeRibbon({ text, color, placement = "end", className = "", children, ...props }) {
|
|
2073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: `sia-ribbon-wrap ${className}`.trim(), ...props, children: [
|
|
2074
|
+
children,
|
|
2075
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: `sia-ribbon sia-ribbon--${placement}`, style: { backgroundColor: color }, children: text })
|
|
2076
|
+
] });
|
|
2077
|
+
}
|
|
2078
|
+
function Badge({ count, showZero = false, overflowCount = 99, dot = false, status, text, color, offset = [0, 0], size = "default", className = "", children, style, ...props }) {
|
|
2079
|
+
const numeric = typeof count === "number";
|
|
2080
|
+
const hidden = !dot && !status && (count === void 0 || count === null || count === 0 && !showZero);
|
|
2081
|
+
const display = numeric && count > overflowCount ? `${overflowCount}+` : count;
|
|
2082
|
+
const badge = !hidden ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("sup", { className: `sia-badge__count${dot || status ? " sia-badge__dot" : ""}${status ? ` sia-badge__dot--${status}` : ""} sia-badge__count--${size}`, style: { backgroundColor: color, transform: `translate(calc(50% + ${offset[0]}px), calc(-50% + ${offset[1]}px))` }, children: dot || status ? null : display }) : null;
|
|
2083
|
+
if (status && !children) return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: `sia-badge sia-badge--status ${className}`.trim(), style, ...props, children: [
|
|
2084
|
+
badge,
|
|
2085
|
+
text ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sia-badge__text", children: text }) : null
|
|
2086
|
+
] });
|
|
2087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: `sia-badge ${className}`.trim(), style, ...props, children: [
|
|
2088
|
+
children,
|
|
2089
|
+
badge,
|
|
2090
|
+
text && !status ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sia-badge__text", children: text }) : null
|
|
2091
|
+
] });
|
|
2092
|
+
}
|
|
2093
|
+
Badge.Ribbon = BadgeRibbon;
|
|
2094
|
+
function CollapsePanel({
|
|
2095
|
+
open,
|
|
2096
|
+
forceRender = false,
|
|
2097
|
+
destroyInactivePanel = false,
|
|
2098
|
+
children
|
|
2099
|
+
}) {
|
|
2100
|
+
const [keepChildren, setKeepChildren] = (0, import_react12.useState)(open || forceRender || !destroyInactivePanel);
|
|
2101
|
+
(0, import_react12.useEffect)(() => {
|
|
2102
|
+
if (open || forceRender || !destroyInactivePanel) {
|
|
2103
|
+
setKeepChildren(true);
|
|
2104
|
+
return void 0;
|
|
2105
|
+
}
|
|
2106
|
+
const timer = window.setTimeout(() => setKeepChildren(false), 240);
|
|
2107
|
+
return () => window.clearTimeout(timer);
|
|
2108
|
+
}, [destroyInactivePanel, forceRender, open]);
|
|
2109
|
+
const renderChildren = open || forceRender || !destroyInactivePanel || keepChildren;
|
|
2110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "sia-collapse__panel", "aria-hidden": !open, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "sia-collapse__panel-motion", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "sia-collapse__panel-body", children: renderChildren ? children : null }) }) });
|
|
2111
|
+
}
|
|
2112
|
+
function Collapse({ items, activeKey, defaultActiveKey = [], accordion = false, bordered = true, ghost = false, destroyInactivePanel = false, expandIconPosition = "start", onChange, className = "", ...props }) {
|
|
2113
|
+
const normalize = (key) => Array.isArray(key) ? [...key] : key === void 0 ? [] : [key];
|
|
2114
|
+
const controlled = activeKey !== void 0;
|
|
2115
|
+
const [internal, setInternal] = (0, import_react12.useState)(normalize(defaultActiveKey));
|
|
2116
|
+
const openKeys = controlled ? normalize(activeKey) : internal;
|
|
2117
|
+
function toggle(item) {
|
|
2118
|
+
if (item.disabled || item.collapsible === "disabled") return;
|
|
2119
|
+
const open = openKeys.includes(item.key);
|
|
2120
|
+
const next = accordion ? open ? [] : [item.key] : open ? openKeys.filter((key) => key !== item.key) : [...openKeys, item.key];
|
|
2121
|
+
if (!controlled) setInternal(next);
|
|
2122
|
+
onChange?.(accordion ? next[0] ?? "" : next);
|
|
2123
|
+
}
|
|
2124
|
+
const borderClassName = !bordered || ghost ? "sia-collapse--borderless" : "sia-collapse--bordered";
|
|
2125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: `sia-collapse ${borderClassName}${ghost ? " sia-collapse--ghost" : ""} sia-collapse--icon-${expandIconPosition} ${className}`.trim(), ...props, children: items.map((item) => {
|
|
2126
|
+
const open = openKeys.includes(item.key);
|
|
2127
|
+
const arrow = item.showArrow === false ? null : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: "sia-collapse__arrow", "aria-label": open ? "\u6536\u8D77" : "\u5C55\u5F00", onClick: item.collapsible === "icon" ? () => toggle(item) : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icon, { name: "chevron-right", size: 14 }) });
|
|
2128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { className: `sia-collapse__item${open ? " is-open" : ""}${item.disabled ? " is-disabled" : ""} ${item.className ?? ""}`.trim(), children: [
|
|
2129
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("header", { className: "sia-collapse__header", role: "button", tabIndex: item.disabled ? -1 : 0, "aria-expanded": open, onClick: item.collapsible === "icon" ? void 0 : () => toggle(item), onKeyDown: (event) => {
|
|
2130
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
2131
|
+
event.preventDefault();
|
|
2132
|
+
toggle(item);
|
|
2133
|
+
}
|
|
2134
|
+
}, children: [
|
|
2135
|
+
expandIconPosition === "start" ? arrow : null,
|
|
2136
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sia-collapse__label", children: item.label }),
|
|
2137
|
+
item.extra ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sia-collapse__extra", onClick: (event) => event.stopPropagation(), children: item.extra }) : null,
|
|
2138
|
+
expandIconPosition === "end" ? arrow : null
|
|
2139
|
+
] }),
|
|
2140
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CollapsePanel, { open, forceRender: item.forceRender, destroyInactivePanel, children: item.children })
|
|
2141
|
+
] }, item.key);
|
|
2142
|
+
}) });
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
// src/components/Select.tsx
|
|
2146
|
+
var import_react13 = require("react");
|
|
2147
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2148
|
+
function defaultFilterOption(query, option) {
|
|
2149
|
+
return String(option.label).toLowerCase().includes(query.toLowerCase());
|
|
2150
|
+
}
|
|
2151
|
+
var Select = (0, import_react13.forwardRef)(function Select2({
|
|
2152
|
+
options,
|
|
2153
|
+
mode = "single",
|
|
2154
|
+
value,
|
|
2155
|
+
defaultValue,
|
|
2156
|
+
onChange,
|
|
2157
|
+
placeholder = "\u8BF7\u9009\u62E9",
|
|
2158
|
+
size = "medium",
|
|
2159
|
+
status = "default",
|
|
2160
|
+
allowClear = false,
|
|
2161
|
+
loading = false,
|
|
2162
|
+
showSearch = false,
|
|
2163
|
+
allowInput = false,
|
|
2164
|
+
inputMaxLength,
|
|
2165
|
+
searchPlaceholder = "\u641C\u7D22\u9009\u9879",
|
|
2166
|
+
onSearch,
|
|
2167
|
+
filterOption = defaultFilterOption,
|
|
2168
|
+
showSelectAll = false,
|
|
2169
|
+
maxTagCount = 2,
|
|
2170
|
+
virtual = true,
|
|
2171
|
+
virtualThreshold = 100,
|
|
2172
|
+
listHeight = 256,
|
|
2173
|
+
optionHeight = 34,
|
|
2174
|
+
disabled,
|
|
2175
|
+
className = "",
|
|
2176
|
+
id,
|
|
2177
|
+
notFoundContent = "\u6682\u65E0\u6570\u636E",
|
|
2178
|
+
onKeyDown,
|
|
2179
|
+
...props
|
|
2180
|
+
}, forwardedRef) {
|
|
2181
|
+
const fallbackId = (0, import_react13.useId)();
|
|
2182
|
+
const selectId = id ?? fallbackId;
|
|
2183
|
+
const listboxId = `${selectId}-listbox`;
|
|
2184
|
+
const rootRef = (0, import_react13.useRef)(null);
|
|
2185
|
+
const popupRef = (0, import_react13.useRef)(null);
|
|
2186
|
+
const searchRef = (0, import_react13.useRef)(null);
|
|
2187
|
+
const listRef = (0, import_react13.useRef)(null);
|
|
2188
|
+
const [open, setOpen] = (0, import_react13.useState)(false);
|
|
2189
|
+
const [query, setQuery] = (0, import_react13.useState)("");
|
|
2190
|
+
const [activeIndex, setActiveIndex] = (0, import_react13.useState)(-1);
|
|
2191
|
+
const [scrollTop, setScrollTop] = (0, import_react13.useState)(0);
|
|
2192
|
+
const deferredQuery = (0, import_react13.useDeferredValue)(query.trim());
|
|
2193
|
+
const initialValue = defaultValue === void 0 ? mode === "multiple" ? [] : null : defaultValue;
|
|
2194
|
+
const [currentValue, setCurrentValue] = useControllableState({
|
|
2195
|
+
value,
|
|
2196
|
+
defaultValue: initialValue,
|
|
2197
|
+
onChange: (nextValue) => {
|
|
2198
|
+
if (Array.isArray(nextValue)) {
|
|
2199
|
+
const selectedOptions2 = nextValue.map((selectedValue) => options.find((option) => option.value === selectedValue) ?? (allowInput ? { label: String(selectedValue), value: selectedValue } : void 0)).filter((option) => option !== void 0);
|
|
2200
|
+
onChange?.(nextValue, selectedOptions2);
|
|
2201
|
+
} else {
|
|
2202
|
+
const selectedOption = nextValue === null ? null : options.find((option) => option.value === nextValue) ?? (allowInput ? { label: String(nextValue), value: nextValue } : null);
|
|
2203
|
+
onChange?.(nextValue, selectedOption);
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
});
|
|
2207
|
+
const selectedValues = (0, import_react13.useMemo)(() => {
|
|
2208
|
+
if (mode === "multiple") return Array.isArray(currentValue) ? currentValue : currentValue === null ? [] : [currentValue];
|
|
2209
|
+
return Array.isArray(currentValue) ? currentValue.slice(0, 1) : currentValue === null ? [] : [currentValue];
|
|
2210
|
+
}, [currentValue, mode]);
|
|
2211
|
+
const selectedValueSet = (0, import_react13.useMemo)(() => new Set(selectedValues), [selectedValues]);
|
|
2212
|
+
const availableOptions = (0, import_react13.useMemo)(() => {
|
|
2213
|
+
if (!allowInput) return options;
|
|
2214
|
+
const optionValueSet = new Set(options.map((option) => option.value));
|
|
2215
|
+
const selectedCustomOptions = selectedValues.filter((selectedValue) => !optionValueSet.has(selectedValue)).map((selectedValue) => ({ label: String(selectedValue), value: selectedValue }));
|
|
2216
|
+
return selectedCustomOptions.length ? [...selectedCustomOptions, ...options] : options;
|
|
2217
|
+
}, [allowInput, options, selectedValues]);
|
|
2218
|
+
const selectedOptions = (0, import_react13.useMemo)(() => selectedValues.map((selectedValue) => availableOptions.find((option) => option.value === selectedValue)).filter((option) => option !== void 0), [availableOptions, selectedValues]);
|
|
2219
|
+
const filteredOptions = (0, import_react13.useMemo)(() => deferredQuery ? availableOptions.filter((option) => filterOption(deferredQuery, option)) : availableOptions, [availableOptions, deferredQuery, filterOption]);
|
|
2220
|
+
const inputValue = query.trim();
|
|
2221
|
+
const exactInputOption = inputValue ? availableOptions.find((option) => String(option.value).toLowerCase() === inputValue.toLowerCase() || typeof option.label === "string" && option.label.toLowerCase() === inputValue.toLowerCase()) : void 0;
|
|
2222
|
+
const canSubmitInput = allowInput && Boolean(inputValue) && !exactInputOption;
|
|
2223
|
+
const multiple = mode === "multiple";
|
|
2224
|
+
const hasValue = selectedOptions.length > 0;
|
|
2225
|
+
const virtualEnabled = virtual && filteredOptions.length >= virtualThreshold;
|
|
2226
|
+
const overscan = 3;
|
|
2227
|
+
const visibleCount = Math.ceil(listHeight / optionHeight) + overscan * 2;
|
|
2228
|
+
const virtualStart = virtualEnabled ? Math.max(0, Math.floor(scrollTop / optionHeight) - overscan) : 0;
|
|
2229
|
+
const virtualEnd = virtualEnabled ? Math.min(filteredOptions.length, virtualStart + visibleCount) : filteredOptions.length;
|
|
2230
|
+
const renderedOptions = virtualEnabled ? filteredOptions.slice(virtualStart, virtualEnd) : filteredOptions;
|
|
2231
|
+
const enabledFilteredOptions = filteredOptions.filter((option) => !option.disabled);
|
|
2232
|
+
const allFilteredSelected = enabledFilteredOptions.length > 0 && enabledFilteredOptions.every((option) => selectedValueSet.has(option.value));
|
|
2233
|
+
(0, import_react13.useEffect)(() => {
|
|
2234
|
+
if (!open) return void 0;
|
|
2235
|
+
function closeFromOutside(event) {
|
|
2236
|
+
const target = event.target;
|
|
2237
|
+
if (!rootRef.current?.contains(target) && !popupRef.current?.contains(target)) closeDropdown();
|
|
2238
|
+
}
|
|
2239
|
+
document.addEventListener("mousedown", closeFromOutside);
|
|
2240
|
+
return () => document.removeEventListener("mousedown", closeFromOutside);
|
|
2241
|
+
}, [open]);
|
|
2242
|
+
(0, import_react13.useEffect)(() => {
|
|
2243
|
+
if (open && (showSearch || allowInput)) searchRef.current?.focus();
|
|
2244
|
+
}, [allowInput, open, showSearch]);
|
|
2245
|
+
function firstEnabledIndex() {
|
|
2246
|
+
return filteredOptions.findIndex((option) => !option.disabled);
|
|
2247
|
+
}
|
|
2248
|
+
function closeDropdown() {
|
|
2249
|
+
setOpen(false);
|
|
2250
|
+
setQuery("");
|
|
2251
|
+
setScrollTop(0);
|
|
2252
|
+
}
|
|
2253
|
+
function openDropdown() {
|
|
2254
|
+
if (disabled || loading) return;
|
|
2255
|
+
const selectedIndex = filteredOptions.findIndex((option) => selectedValueSet.has(option.value) && !option.disabled);
|
|
2256
|
+
setActiveIndex(selectedIndex >= 0 ? selectedIndex : firstEnabledIndex());
|
|
2257
|
+
setOpen(true);
|
|
2258
|
+
}
|
|
2259
|
+
function keepActiveVisible(index) {
|
|
2260
|
+
if (!virtualEnabled || !listRef.current) return;
|
|
2261
|
+
const optionTop = index * optionHeight;
|
|
2262
|
+
const optionBottom = optionTop + optionHeight;
|
|
2263
|
+
const viewportTop = listRef.current.scrollTop;
|
|
2264
|
+
const viewportBottom = viewportTop + listHeight;
|
|
2265
|
+
const nextScrollTop = optionTop < viewportTop ? optionTop : optionBottom > viewportBottom ? optionBottom - listHeight : viewportTop;
|
|
2266
|
+
if (nextScrollTop !== viewportTop) {
|
|
2267
|
+
listRef.current.scrollTop = nextScrollTop;
|
|
2268
|
+
setScrollTop(nextScrollTop);
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
function moveActive(direction) {
|
|
2272
|
+
if (filteredOptions.length === 0) return;
|
|
2273
|
+
let nextIndex = activeIndex;
|
|
2274
|
+
for (let index = 0; index < filteredOptions.length; index += 1) {
|
|
2275
|
+
nextIndex = (nextIndex + direction + filteredOptions.length) % filteredOptions.length;
|
|
2276
|
+
if (!filteredOptions[nextIndex]?.disabled) {
|
|
2277
|
+
setActiveIndex(nextIndex);
|
|
2278
|
+
keepActiveVisible(nextIndex);
|
|
2279
|
+
return;
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
function selectOption(option) {
|
|
2284
|
+
if (option.disabled) return;
|
|
2285
|
+
if (multiple) {
|
|
2286
|
+
const nextValues = selectedValueSet.has(option.value) ? selectedValues.filter((item) => item !== option.value) : [...selectedValues, option.value];
|
|
2287
|
+
setCurrentValue(nextValues);
|
|
2288
|
+
return;
|
|
2289
|
+
}
|
|
2290
|
+
setCurrentValue(option.value);
|
|
2291
|
+
closeDropdown();
|
|
2292
|
+
}
|
|
2293
|
+
function selectAllFiltered() {
|
|
2294
|
+
if (allFilteredSelected) return;
|
|
2295
|
+
const nextValues = [...selectedValues];
|
|
2296
|
+
const nextValueSet = new Set(nextValues);
|
|
2297
|
+
enabledFilteredOptions.forEach((option) => {
|
|
2298
|
+
if (!nextValueSet.has(option.value)) nextValues.push(option.value);
|
|
2299
|
+
});
|
|
2300
|
+
setCurrentValue(nextValues);
|
|
2301
|
+
}
|
|
2302
|
+
function submitInputValue() {
|
|
2303
|
+
if (!allowInput || !inputValue) return;
|
|
2304
|
+
selectOption(exactInputOption ?? { label: inputValue, value: inputValue });
|
|
2305
|
+
if (multiple) {
|
|
2306
|
+
setQuery("");
|
|
2307
|
+
setActiveIndex(-1);
|
|
2308
|
+
setScrollTop(0);
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
function clearSelection() {
|
|
2312
|
+
setCurrentValue(multiple ? [] : null);
|
|
2313
|
+
}
|
|
2314
|
+
function handleInteractionKeyDown(event, fromSearch = false) {
|
|
2315
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
2316
|
+
event.preventDefault();
|
|
2317
|
+
if (!open) openDropdown();
|
|
2318
|
+
else moveActive(event.key === "ArrowDown" ? 1 : -1);
|
|
2319
|
+
} else if (event.key === "Enter" || event.key === " " && !fromSearch) {
|
|
2320
|
+
event.preventDefault();
|
|
2321
|
+
if (!open) openDropdown();
|
|
2322
|
+
else if (activeIndex >= 0 && filteredOptions[activeIndex]) selectOption(filteredOptions[activeIndex]);
|
|
2323
|
+
else if (fromSearch && allowInput) submitInputValue();
|
|
2324
|
+
} else if (event.key === "Escape") {
|
|
2325
|
+
closeDropdown();
|
|
2326
|
+
} else if (event.key === "Home" && open && !fromSearch) {
|
|
2327
|
+
event.preventDefault();
|
|
2328
|
+
const firstIndex = firstEnabledIndex();
|
|
2329
|
+
setActiveIndex(firstIndex);
|
|
2330
|
+
keepActiveVisible(firstIndex);
|
|
2331
|
+
} else if (event.key === "End" && open && !fromSearch) {
|
|
2332
|
+
event.preventDefault();
|
|
2333
|
+
const reversedIndex = [...filteredOptions].reverse().findIndex((option) => !option.disabled);
|
|
2334
|
+
const lastIndex = reversedIndex < 0 ? -1 : filteredOptions.length - 1 - reversedIndex;
|
|
2335
|
+
setActiveIndex(lastIndex);
|
|
2336
|
+
keepActiveVisible(lastIndex);
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
function handleTriggerKeyDown(event) {
|
|
2340
|
+
handleInteractionKeyDown(event);
|
|
2341
|
+
onKeyDown?.(event);
|
|
2342
|
+
}
|
|
2343
|
+
function handleSearchChange(event) {
|
|
2344
|
+
const nextQuery = event.target.value;
|
|
2345
|
+
setQuery(nextQuery);
|
|
2346
|
+
setActiveIndex(-1);
|
|
2347
|
+
setScrollTop(0);
|
|
2348
|
+
if (listRef.current) listRef.current.scrollTop = 0;
|
|
2349
|
+
onSearch?.(nextQuery);
|
|
2350
|
+
}
|
|
2351
|
+
function clearValue(event) {
|
|
2352
|
+
event.stopPropagation();
|
|
2353
|
+
clearSelection();
|
|
2354
|
+
}
|
|
2355
|
+
function handleListScroll(event) {
|
|
2356
|
+
if (virtualEnabled) setScrollTop(event.currentTarget.scrollTop);
|
|
2357
|
+
}
|
|
2358
|
+
function renderOption(option, renderedIndex) {
|
|
2359
|
+
const optionIndex = virtualEnabled ? virtualStart + renderedIndex : renderedIndex;
|
|
2360
|
+
const selected = selectedValueSet.has(option.value);
|
|
2361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2362
|
+
"div",
|
|
2363
|
+
{
|
|
2364
|
+
id: `${listboxId}-${optionIndex}`,
|
|
2365
|
+
className: `sia-select__option${selected ? " is-selected" : ""}${optionIndex === activeIndex ? " is-active" : ""}${option.disabled ? " is-disabled" : ""}`,
|
|
2366
|
+
role: "option",
|
|
2367
|
+
"aria-selected": selected,
|
|
2368
|
+
"aria-disabled": option.disabled || void 0,
|
|
2369
|
+
style: virtualEnabled ? { position: "absolute", top: optionIndex * optionHeight, right: 0, left: 0, height: optionHeight } : void 0,
|
|
2370
|
+
onMouseEnter: () => !option.disabled && setActiveIndex(optionIndex),
|
|
2371
|
+
onMouseDown: (event) => event.preventDefault(),
|
|
2372
|
+
onClick: () => selectOption(option),
|
|
2373
|
+
children: [
|
|
2374
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: option.label }),
|
|
2375
|
+
selected ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: "check", size: 15 }) : null
|
|
2376
|
+
]
|
|
2377
|
+
},
|
|
2378
|
+
`${typeof option.value}-${option.value}`
|
|
2379
|
+
);
|
|
2380
|
+
}
|
|
2381
|
+
const visibleTags = selectedOptions.slice(0, Math.max(0, maxTagCount));
|
|
2382
|
+
const hiddenTagCount = selectedOptions.length - visibleTags.length;
|
|
2383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { ref: rootRef, className: `sia-select sia-select--${size} sia-select--${status}${open ? " is-open" : ""}${disabled ? " is-disabled" : ""}${multiple ? " sia-select--multiple" : ""} ${className}`.trim(), children: [
|
|
2384
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2385
|
+
"button",
|
|
2386
|
+
{
|
|
2387
|
+
...props,
|
|
2388
|
+
ref: forwardedRef,
|
|
2389
|
+
className: "sia-select__trigger",
|
|
2390
|
+
id: selectId,
|
|
2391
|
+
type: "button",
|
|
2392
|
+
role: "combobox",
|
|
2393
|
+
"aria-controls": listboxId,
|
|
2394
|
+
"aria-expanded": open,
|
|
2395
|
+
"aria-haspopup": "listbox",
|
|
2396
|
+
"aria-activedescendant": open && activeIndex >= 0 ? `${listboxId}-${activeIndex}` : void 0,
|
|
2397
|
+
"aria-invalid": status === "error" || void 0,
|
|
2398
|
+
disabled,
|
|
2399
|
+
onClick: () => open ? closeDropdown() : openDropdown(),
|
|
2400
|
+
onKeyDown: handleTriggerKeyDown,
|
|
2401
|
+
children: [
|
|
2402
|
+
multiple && hasValue ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "sia-select__tags", children: [
|
|
2403
|
+
visibleTags.map((option) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sia-select__tag", children: option.label }, `${typeof option.value}-${option.value}`)),
|
|
2404
|
+
hiddenTagCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "sia-select__tag sia-select__tag--rest", children: [
|
|
2405
|
+
"+",
|
|
2406
|
+
hiddenTagCount
|
|
2407
|
+
] }) : null
|
|
2408
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: `sia-select__value${hasValue ? "" : " is-placeholder"}`, children: selectedOptions[0]?.label ?? placeholder }),
|
|
2409
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sia-select__spinner", "aria-hidden": "true" }) : null,
|
|
2410
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { className: "sia-select__arrow", name: "chevron-down", size: 15 })
|
|
2411
|
+
]
|
|
2412
|
+
}
|
|
2413
|
+
),
|
|
2414
|
+
allowClear && hasValue && !disabled && !loading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { className: "sia-select__clear", type: "button", "aria-label": "\u6E05\u7A7A\u9009\u62E9", onClick: clearValue, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: "circle-close", variant: "filled", size: 15 }) }) : null,
|
|
2415
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(PopupPortal, { ref: popupRef, anchorRef: rootRef, open, className: "sia-select__dropdown", children: [
|
|
2416
|
+
showSearch || allowInput ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "sia-select__search", children: [
|
|
2417
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: "search", size: 15 }),
|
|
2418
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("input", { ref: searchRef, value: query, maxLength: inputMaxLength, onChange: handleSearchChange, onKeyDown: (event) => handleInteractionKeyDown(event, true), placeholder: searchPlaceholder, "aria-label": searchPlaceholder })
|
|
2419
|
+
] }) : null,
|
|
2420
|
+
canSubmitInput ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: "sia-select__input-option", onMouseDown: (event) => event.preventDefault(), onClick: submitInputValue, children: [
|
|
2421
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: "plus", size: 14 }),
|
|
2422
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
|
|
2423
|
+
"\u4F7F\u7528\u201C",
|
|
2424
|
+
inputValue,
|
|
2425
|
+
"\u201D"
|
|
2426
|
+
] })
|
|
2427
|
+
] }) : null,
|
|
2428
|
+
multiple && showSelectAll ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "sia-select__actions", children: [
|
|
2429
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", disabled: allFilteredSelected || enabledFilteredOptions.length === 0, onClick: selectAllFiltered, children: "\u5168\u9009" }),
|
|
2430
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", disabled: !hasValue, onClick: clearSelection, children: "\u6E05\u9664" }),
|
|
2431
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
|
|
2432
|
+
selectedValues.length,
|
|
2433
|
+
" \u9879\u5DF2\u9009"
|
|
2434
|
+
] })
|
|
2435
|
+
] }) : null,
|
|
2436
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2437
|
+
"div",
|
|
2438
|
+
{
|
|
2439
|
+
ref: listRef,
|
|
2440
|
+
id: listboxId,
|
|
2441
|
+
className: "sia-select__list",
|
|
2442
|
+
role: "listbox",
|
|
2443
|
+
"aria-labelledby": selectId,
|
|
2444
|
+
"aria-multiselectable": multiple || void 0,
|
|
2445
|
+
style: { maxHeight: listHeight },
|
|
2446
|
+
onScroll: handleListScroll,
|
|
2447
|
+
children: filteredOptions.length > 0 ? virtualEnabled ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "sia-select__virtual-space", style: { height: filteredOptions.length * optionHeight }, children: renderedOptions.map(renderOption) }) : renderedOptions.map(renderOption) : canSubmitInput ? null : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "sia-select__empty", children: notFoundContent })
|
|
2448
|
+
}
|
|
2449
|
+
)
|
|
2450
|
+
] })
|
|
2451
|
+
] });
|
|
2452
|
+
});
|
|
2453
|
+
|
|
2454
|
+
// src/components/Input.tsx
|
|
2455
|
+
var import_react14 = require("react");
|
|
2456
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2457
|
+
var Input = (0, import_react14.forwardRef)(function Input2({
|
|
2458
|
+
label,
|
|
2459
|
+
hint,
|
|
2460
|
+
status = "default",
|
|
2461
|
+
size = "medium",
|
|
2462
|
+
prefix,
|
|
2463
|
+
suffix,
|
|
2464
|
+
allowClear = false,
|
|
2465
|
+
onClear,
|
|
2466
|
+
showCount = false,
|
|
2467
|
+
placeholderMode = "default",
|
|
2468
|
+
placeholder,
|
|
2469
|
+
className = "",
|
|
2470
|
+
id,
|
|
2471
|
+
disabled,
|
|
2472
|
+
value,
|
|
2473
|
+
defaultValue,
|
|
2474
|
+
maxLength,
|
|
2475
|
+
onChange,
|
|
2476
|
+
...props
|
|
2477
|
+
}, forwardedRef) {
|
|
2478
|
+
const fallbackId = (0, import_react14.useId)();
|
|
2479
|
+
const inputId = id ?? fallbackId;
|
|
2480
|
+
const localRef = (0, import_react14.useRef)(null);
|
|
2481
|
+
const [uncontrolledValue, setUncontrolledValue] = (0, import_react14.useState)(() => defaultValue === void 0 ? "" : String(defaultValue));
|
|
2482
|
+
const currentText = value !== void 0 ? String(value) : uncontrolledValue;
|
|
2483
|
+
const hasValue = currentText.length > 0;
|
|
2484
|
+
const floatingPlaceholder = placeholderMode === "floating" && Boolean(placeholder);
|
|
2485
|
+
const hintId = `${inputId}-hint`;
|
|
2486
|
+
const describedBy = [props["aria-describedby"], hint ? hintId : null].filter(Boolean).join(" ") || void 0;
|
|
2487
|
+
function setRef(node) {
|
|
2488
|
+
localRef.current = node;
|
|
2489
|
+
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
2490
|
+
else if (forwardedRef) forwardedRef.current = node;
|
|
2491
|
+
}
|
|
2492
|
+
function handleChange(event) {
|
|
2493
|
+
if (maxLength !== void 0 && maxLength >= 0 && event.target.value.length > maxLength) {
|
|
2494
|
+
const valueSetter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
|
|
2495
|
+
valueSetter?.call(event.target, event.target.value.slice(0, maxLength));
|
|
2496
|
+
}
|
|
2497
|
+
setUncontrolledValue(event.target.value);
|
|
2498
|
+
onChange?.(event);
|
|
2499
|
+
}
|
|
2500
|
+
function clearValue() {
|
|
2501
|
+
const input2 = localRef.current;
|
|
2502
|
+
if (!input2 || disabled) return;
|
|
2503
|
+
const valueSetter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
|
|
2504
|
+
valueSetter?.call(input2, "");
|
|
2505
|
+
input2.dispatchEvent(new Event("input", { bubbles: true }));
|
|
2506
|
+
setUncontrolledValue("");
|
|
2507
|
+
input2.focus();
|
|
2508
|
+
onClear?.();
|
|
2509
|
+
}
|
|
2510
|
+
const input = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2511
|
+
"input",
|
|
2512
|
+
{
|
|
2513
|
+
...props,
|
|
2514
|
+
ref: setRef,
|
|
2515
|
+
id: inputId,
|
|
2516
|
+
className: "sia-input",
|
|
2517
|
+
disabled,
|
|
2518
|
+
value,
|
|
2519
|
+
defaultValue,
|
|
2520
|
+
maxLength,
|
|
2521
|
+
placeholder,
|
|
2522
|
+
"aria-describedby": describedBy,
|
|
2523
|
+
"aria-invalid": status === "error" || void 0,
|
|
2524
|
+
onChange: handleChange
|
|
2525
|
+
}
|
|
2526
|
+
);
|
|
2527
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: `sia-input-control sia-input-control--${size} sia-input-control--${status}${floatingPlaceholder ? " sia-input-control--floating" : ""}${floatingPlaceholder && hasValue ? " is-filled" : ""}${disabled ? " is-disabled" : ""}`, children: [
|
|
2528
|
+
prefix ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sia-input-control__affix", children: prefix }) : null,
|
|
2529
|
+
floatingPlaceholder ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "sia-input-control__input-wrap", children: [
|
|
2530
|
+
input,
|
|
2531
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sia-input-control__floating-placeholder", "aria-hidden": "true", children: placeholder })
|
|
2532
|
+
] }) : input,
|
|
2533
|
+
allowClear && hasValue && !disabled ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { className: "sia-input-control__clear", type: "button", "aria-label": "\u6E05\u7A7A\u8F93\u5165", onClick: clearValue, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { name: "circle-close", variant: "filled", size: 15 }) }) : null,
|
|
2534
|
+
suffix ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sia-input-control__affix", children: suffix }) : null,
|
|
2535
|
+
showCount ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: `sia-input-control__count${maxLength !== void 0 && currentText.length >= maxLength ? " is-limit" : ""}`, "aria-live": "polite", children: [
|
|
2536
|
+
currentText.length,
|
|
2537
|
+
maxLength !== void 0 ? `/${maxLength}` : null
|
|
2538
|
+
] }) : null
|
|
2539
|
+
] });
|
|
2540
|
+
if (!label && !hint) return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: `sia-field ${className}`.trim(), children: control });
|
|
2541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: `sia-field ${className}`.trim(), children: [
|
|
2542
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { className: "sia-field__label", htmlFor: inputId, children: label }) : null,
|
|
2543
|
+
control,
|
|
2544
|
+
hint ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { id: hintId, className: `sia-field__hint sia-field__hint--${status}`, children: hint }) : null
|
|
2545
|
+
] });
|
|
2546
|
+
});
|
|
2547
|
+
|
|
2548
|
+
// src/components/Upload.tsx
|
|
2549
|
+
var import_react15 = require("react");
|
|
2550
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2551
|
+
var LIST_IGNORE = /* @__PURE__ */ Symbol("SIA_UPLOAD_LIST_IGNORE");
|
|
2552
|
+
function UploadRoot({
|
|
2553
|
+
accept,
|
|
2554
|
+
multiple = false,
|
|
2555
|
+
directory = false,
|
|
2556
|
+
disabled = false,
|
|
2557
|
+
maxCount: maxCount2,
|
|
2558
|
+
fileList,
|
|
2559
|
+
defaultFileList = [],
|
|
2560
|
+
listType = "text",
|
|
2561
|
+
showUploadList = true,
|
|
2562
|
+
beforeUpload,
|
|
2563
|
+
customRequest,
|
|
2564
|
+
onChange,
|
|
2565
|
+
onRemove,
|
|
2566
|
+
children,
|
|
2567
|
+
className = "",
|
|
2568
|
+
onDragOver,
|
|
2569
|
+
onDrop,
|
|
2570
|
+
...props
|
|
2571
|
+
}) {
|
|
2572
|
+
const inputRef = (0, import_react15.useRef)(null);
|
|
2573
|
+
const filesRef = (0, import_react15.useRef)(fileList ?? defaultFileList);
|
|
2574
|
+
const id = (0, import_react15.useId)();
|
|
2575
|
+
const [files, setFiles] = useControllableState({ value: fileList, defaultValue: defaultFileList });
|
|
2576
|
+
filesRef.current = files;
|
|
2577
|
+
function emit(file, nextList) {
|
|
2578
|
+
filesRef.current = nextList;
|
|
2579
|
+
setFiles(nextList);
|
|
2580
|
+
onChange?.({ file, fileList: nextList });
|
|
2581
|
+
}
|
|
2582
|
+
async function processFile(file, allFiles) {
|
|
2583
|
+
const beforeResult = await beforeUpload?.(file, allFiles);
|
|
2584
|
+
if (beforeResult === LIST_IGNORE) return;
|
|
2585
|
+
if (beforeResult === false) {
|
|
2586
|
+
const pending = { uid: `${Date.now()}-${file.name}`, name: file.name, size: file.size, type: file.type, status: "ready", originFileObj: file };
|
|
2587
|
+
emit(pending, maxCount2 === 1 ? [pending] : [...filesRef.current, pending].slice(-(maxCount2 ?? Number.POSITIVE_INFINITY)));
|
|
2588
|
+
return;
|
|
2589
|
+
}
|
|
2590
|
+
const uploadFile = beforeResult instanceof File ? beforeResult : file;
|
|
2591
|
+
const item = { uid: `${Date.now()}-${Math.random().toString(36).slice(2)}`, name: uploadFile.name, size: uploadFile.size, type: uploadFile.type, status: "uploading", percent: 0, originFileObj: uploadFile };
|
|
2592
|
+
const nextList = maxCount2 === 1 ? [item] : [...filesRef.current, item].slice(-(maxCount2 ?? Number.POSITIVE_INFINITY));
|
|
2593
|
+
emit(item, nextList);
|
|
2594
|
+
const request = {
|
|
2595
|
+
file: uploadFile,
|
|
2596
|
+
filename: uploadFile.name,
|
|
2597
|
+
onProgress: (percent) => {
|
|
2598
|
+
const progressing = { ...item, status: "uploading", percent };
|
|
2599
|
+
const progressList = filesRef.current.map((entry) => entry.uid === item.uid ? progressing : entry);
|
|
2600
|
+
emit(progressing, progressList);
|
|
2601
|
+
},
|
|
2602
|
+
onSuccess: (response) => {
|
|
2603
|
+
const done = { ...item, status: "done", percent: 100, response };
|
|
2604
|
+
const completed = filesRef.current.map((entry) => entry.uid === item.uid ? done : entry);
|
|
2605
|
+
emit(done, completed);
|
|
2606
|
+
},
|
|
2607
|
+
onError: (error) => {
|
|
2608
|
+
const failed = { ...item, status: "error", error };
|
|
2609
|
+
const completed = filesRef.current.map((entry) => entry.uid === item.uid ? failed : entry);
|
|
2610
|
+
emit(failed, completed);
|
|
2611
|
+
}
|
|
2612
|
+
};
|
|
2613
|
+
if (customRequest) customRequest(request);
|
|
2614
|
+
else window.setTimeout(() => request.onSuccess({ local: true }), 180);
|
|
2615
|
+
}
|
|
2616
|
+
function handleFiles(event) {
|
|
2617
|
+
const selected = [...event.currentTarget.files ?? []];
|
|
2618
|
+
selected.forEach((file) => void processFile(file, selected));
|
|
2619
|
+
event.currentTarget.value = "";
|
|
2620
|
+
}
|
|
2621
|
+
function handleDrop(event) {
|
|
2622
|
+
onDrop?.(event);
|
|
2623
|
+
if (event.defaultPrevented || disabled) return;
|
|
2624
|
+
event.preventDefault();
|
|
2625
|
+
const selected = [...event.dataTransfer.files];
|
|
2626
|
+
selected.forEach((file) => void processFile(file, selected));
|
|
2627
|
+
}
|
|
2628
|
+
async function remove(file) {
|
|
2629
|
+
if (await onRemove?.(file) === false) return;
|
|
2630
|
+
const next = files.filter((item) => item.uid !== file.uid);
|
|
2631
|
+
emit({ ...file, status: "ready" }, next);
|
|
2632
|
+
}
|
|
2633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2634
|
+
"div",
|
|
2635
|
+
{
|
|
2636
|
+
className: `sia-upload sia-upload--${listType} ${className}`.trim(),
|
|
2637
|
+
onDragOver: (event) => {
|
|
2638
|
+
onDragOver?.(event);
|
|
2639
|
+
if (!event.defaultPrevented && !disabled) event.preventDefault();
|
|
2640
|
+
},
|
|
2641
|
+
onDrop: handleDrop,
|
|
2642
|
+
...props,
|
|
2643
|
+
children: [
|
|
2644
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2645
|
+
"input",
|
|
2646
|
+
{
|
|
2647
|
+
ref: inputRef,
|
|
2648
|
+
id,
|
|
2649
|
+
className: "sia-upload__input",
|
|
2650
|
+
type: "file",
|
|
2651
|
+
accept,
|
|
2652
|
+
multiple,
|
|
2653
|
+
disabled,
|
|
2654
|
+
...directory ? { webkitdirectory: "", directory: "" } : {},
|
|
2655
|
+
onChange: handleFiles
|
|
2656
|
+
}
|
|
2657
|
+
),
|
|
2658
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "sia-upload__trigger", onClick: () => !disabled && inputRef.current?.click(), children: children ?? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { name: "upload", size: 16 }), disabled, children: "\u9009\u62E9\u6587\u4EF6" }) }),
|
|
2659
|
+
showUploadList && files.length ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "sia-upload__list", children: files.map((file) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: `sia-upload__item sia-upload__item--${file.status ?? "ready"}`, children: [
|
|
2660
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { name: file.status === "done" ? "circle-check" : "file", size: 16 }),
|
|
2661
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sia-upload__name", title: file.name, children: file.name }),
|
|
2662
|
+
file.status === "uploading" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sia-upload__progress", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { width: `${file.percent ?? 0}%` } }) }) : null,
|
|
2663
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", "aria-label": `\u79FB\u9664 ${file.name}`, onClick: () => void remove(file), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { name: "close", size: 14 }) })
|
|
2664
|
+
] }, file.uid)) }) : null
|
|
2665
|
+
]
|
|
2666
|
+
}
|
|
2667
|
+
);
|
|
2668
|
+
}
|
|
2669
|
+
function UploadDragger({ hint = "\u652F\u6301\u5355\u4E2A\u6216\u6279\u91CF\u4E0A\u4F20", children, className = "", ...props }) {
|
|
2670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(UploadRoot, { ...props, className: `sia-upload-dragger ${className}`.trim(), children: children ?? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sia-upload-dragger__content", children: [
|
|
2671
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { name: "upload", size: 28 }),
|
|
2672
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { children: "\u70B9\u51FB\u6216\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4E0A\u4F20" }),
|
|
2673
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: hint })
|
|
2674
|
+
] }) });
|
|
2675
|
+
}
|
|
2676
|
+
var Upload = Object.assign(UploadRoot, { Dragger: UploadDragger, LIST_IGNORE });
|
|
2677
|
+
|
|
2678
|
+
// src/components/Modal.tsx
|
|
2679
|
+
var import_react16 = require("react");
|
|
2680
|
+
var import_client2 = require("react-dom/client");
|
|
2681
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2682
|
+
var modalHandles = /* @__PURE__ */ new Set();
|
|
2683
|
+
var MODAL_MOTION_DURATION = 220;
|
|
2684
|
+
var typeIcons = {
|
|
2685
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { name: "info", size: 23 }),
|
|
2686
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { name: "circle-check", size: 23 }),
|
|
2687
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { name: "warning", size: 23 }),
|
|
2688
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { name: "circle-close", size: 23 }),
|
|
2689
|
+
confirm: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { name: "question", size: 23 })
|
|
2690
|
+
};
|
|
2691
|
+
var ModalRoot = (0, import_react16.forwardRef)(function Modal({
|
|
2692
|
+
open,
|
|
2693
|
+
title,
|
|
2694
|
+
children,
|
|
2695
|
+
footer,
|
|
2696
|
+
type = "default",
|
|
2697
|
+
okText = "\u786E\u5B9A",
|
|
2698
|
+
cancelText = "\u53D6\u6D88",
|
|
2699
|
+
showCancel = type === "default" || type === "confirm",
|
|
2700
|
+
confirmLoading = false,
|
|
2701
|
+
okButtonProps,
|
|
2702
|
+
cancelButtonProps,
|
|
2703
|
+
closable = true,
|
|
2704
|
+
maskClosable = true,
|
|
2705
|
+
keyboard = true,
|
|
2706
|
+
centered = false,
|
|
2707
|
+
width = 520,
|
|
2708
|
+
zIndex = 1e3,
|
|
2709
|
+
getContainer,
|
|
2710
|
+
onOk,
|
|
2711
|
+
onCancel,
|
|
2712
|
+
onOpenChange,
|
|
2713
|
+
className = "",
|
|
2714
|
+
style,
|
|
2715
|
+
...props
|
|
2716
|
+
}, forwardedRef) {
|
|
2717
|
+
const localRef = (0, import_react16.useRef)(null);
|
|
2718
|
+
const titleId = (0, import_react16.useId)();
|
|
2719
|
+
const [submitting, setSubmitting] = (0, import_react16.useState)(false);
|
|
2720
|
+
const [rendered, setRendered] = (0, import_react16.useState)(open);
|
|
2721
|
+
const [closing, setClosing] = (0, import_react16.useState)(false);
|
|
2722
|
+
(0, import_react16.useEffect)(() => {
|
|
2723
|
+
if (open) {
|
|
2724
|
+
setRendered(true);
|
|
2725
|
+
setClosing(false);
|
|
2726
|
+
return void 0;
|
|
2727
|
+
}
|
|
2728
|
+
if (!rendered) return void 0;
|
|
2729
|
+
setClosing(true);
|
|
2730
|
+
const timer = window.setTimeout(() => {
|
|
2731
|
+
setRendered(false);
|
|
2732
|
+
setClosing(false);
|
|
2733
|
+
}, MODAL_MOTION_DURATION);
|
|
2734
|
+
return () => window.clearTimeout(timer);
|
|
2735
|
+
}, [open, rendered]);
|
|
2736
|
+
function setRef(node) {
|
|
2737
|
+
localRef.current = node;
|
|
2738
|
+
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
2739
|
+
else if (forwardedRef) forwardedRef.current = node;
|
|
2740
|
+
}
|
|
2741
|
+
function requestClose() {
|
|
2742
|
+
if (submitting || confirmLoading) return;
|
|
2743
|
+
onCancel?.();
|
|
2744
|
+
onOpenChange?.(false);
|
|
2745
|
+
}
|
|
2746
|
+
async function handleOk() {
|
|
2747
|
+
if (!onOk) {
|
|
2748
|
+
onOpenChange?.(false);
|
|
2749
|
+
return;
|
|
2750
|
+
}
|
|
2751
|
+
try {
|
|
2752
|
+
const result = onOk();
|
|
2753
|
+
if (result instanceof Promise) {
|
|
2754
|
+
setSubmitting(true);
|
|
2755
|
+
const resolved = await result;
|
|
2756
|
+
if (resolved !== false) onOpenChange?.(false);
|
|
2757
|
+
} else if (result !== false) {
|
|
2758
|
+
onOpenChange?.(false);
|
|
2759
|
+
}
|
|
2760
|
+
} catch {
|
|
2761
|
+
return;
|
|
2762
|
+
} finally {
|
|
2763
|
+
setSubmitting(false);
|
|
2764
|
+
}
|
|
2765
|
+
}
|
|
2766
|
+
useOverlayLifecycle(rendered, localRef, requestClose, keyboard);
|
|
2767
|
+
if (!rendered) return null;
|
|
2768
|
+
const mergedStyle = {
|
|
2769
|
+
...style,
|
|
2770
|
+
"--sia-modal-width": typeof width === "number" ? `${width}px` : width
|
|
2771
|
+
};
|
|
2772
|
+
const loading = submitting || confirmLoading;
|
|
2773
|
+
const defaultFooter = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
2774
|
+
showCancel ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button, { ...cancelButtonProps, onClick: requestClose, disabled: loading || cancelButtonProps?.disabled, children: cancelText }) : null,
|
|
2775
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button, { variant: "primary", ...okButtonProps, onClick: handleOk, loading, children: okText })
|
|
2776
|
+
] });
|
|
2777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(OverlayPortal, { container: getContainer, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2778
|
+
"div",
|
|
2779
|
+
{
|
|
2780
|
+
className: `sia-modal-root${centered ? " sia-modal-root--centered" : ""}`,
|
|
2781
|
+
"data-state": closing ? "closing" : "open",
|
|
2782
|
+
style: { zIndex },
|
|
2783
|
+
onMouseDown: (event) => {
|
|
2784
|
+
if (event.target === event.currentTarget && maskClosable) requestClose();
|
|
2785
|
+
},
|
|
2786
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2787
|
+
"div",
|
|
2788
|
+
{
|
|
2789
|
+
ref: setRef,
|
|
2790
|
+
className: `sia-modal sia-modal--${type} ${className}`.trim(),
|
|
2791
|
+
style: mergedStyle,
|
|
2792
|
+
role: "dialog",
|
|
2793
|
+
"aria-modal": "true",
|
|
2794
|
+
"aria-labelledby": title ? titleId : void 0,
|
|
2795
|
+
tabIndex: -1,
|
|
2796
|
+
...props,
|
|
2797
|
+
children: [
|
|
2798
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "sia-modal__header", children: [
|
|
2799
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "sia-modal__heading", children: [
|
|
2800
|
+
typeIcons[type] ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "sia-modal__type-icon", "aria-hidden": "true", children: typeIcons[type] }) : null,
|
|
2801
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { id: titleId, children: title }) : null
|
|
2802
|
+
] }),
|
|
2803
|
+
closable ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", className: "sia-modal__close", "aria-label": "\u5173\u95ED\u5BF9\u8BDD\u6846", onClick: requestClose, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { name: "close", size: 17 }) }) : null
|
|
2804
|
+
] }),
|
|
2805
|
+
children !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "sia-modal__body", children }) : null,
|
|
2806
|
+
footer !== null ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "sia-modal__footer", children: footer ?? defaultFooter }) : null
|
|
2807
|
+
]
|
|
2808
|
+
}
|
|
2809
|
+
)
|
|
2810
|
+
}
|
|
2811
|
+
) });
|
|
2812
|
+
});
|
|
2813
|
+
function openModal(config) {
|
|
2814
|
+
if (typeof document === "undefined") return { destroy() {
|
|
2815
|
+
}, update() {
|
|
2816
|
+
} };
|
|
2817
|
+
const container = document.createElement("div");
|
|
2818
|
+
container.className = "sia-modal-api-host";
|
|
2819
|
+
document.body.appendChild(container);
|
|
2820
|
+
const root = (0, import_client2.createRoot)(container);
|
|
2821
|
+
let currentConfig = config;
|
|
2822
|
+
let currentOpen = true;
|
|
2823
|
+
let destroyed = false;
|
|
2824
|
+
let cleanupTimer;
|
|
2825
|
+
function cleanup() {
|
|
2826
|
+
if (destroyed) return;
|
|
2827
|
+
destroyed = true;
|
|
2828
|
+
if (cleanupTimer !== void 0) window.clearTimeout(cleanupTimer);
|
|
2829
|
+
root.unmount();
|
|
2830
|
+
container.remove();
|
|
2831
|
+
modalHandles.delete(handle);
|
|
2832
|
+
}
|
|
2833
|
+
function closeWithMotion() {
|
|
2834
|
+
if (destroyed || !currentOpen) return;
|
|
2835
|
+
currentOpen = false;
|
|
2836
|
+
render();
|
|
2837
|
+
cleanupTimer = window.setTimeout(cleanup, MODAL_MOTION_DURATION);
|
|
2838
|
+
}
|
|
2839
|
+
function render() {
|
|
2840
|
+
root.render(/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ModalRoot, { ...currentConfig, open: currentOpen, onOpenChange: (nextOpen) => {
|
|
2841
|
+
currentConfig.onOpenChange?.(nextOpen);
|
|
2842
|
+
if (!nextOpen) closeWithMotion();
|
|
2843
|
+
} }));
|
|
2844
|
+
}
|
|
2845
|
+
const handle = {
|
|
2846
|
+
destroy: closeWithMotion,
|
|
2847
|
+
update(next) {
|
|
2848
|
+
if (destroyed) return;
|
|
2849
|
+
currentConfig = { ...currentConfig, ...next };
|
|
2850
|
+
render();
|
|
2851
|
+
}
|
|
2852
|
+
};
|
|
2853
|
+
modalHandles.add(handle);
|
|
2854
|
+
render();
|
|
2855
|
+
return handle;
|
|
2856
|
+
}
|
|
2857
|
+
function preset(type, defaults = {}) {
|
|
2858
|
+
return (config) => openModal({
|
|
2859
|
+
okText: type === "confirm" ? "\u786E\u5B9A" : "\u77E5\u9053\u4E86",
|
|
2860
|
+
showCancel: type === "confirm",
|
|
2861
|
+
closable: type !== "confirm",
|
|
2862
|
+
maskClosable: type !== "confirm",
|
|
2863
|
+
...defaults,
|
|
2864
|
+
...config,
|
|
2865
|
+
type
|
|
2866
|
+
});
|
|
2867
|
+
}
|
|
2868
|
+
var Modal2 = Object.assign(ModalRoot, {
|
|
2869
|
+
open: openModal,
|
|
2870
|
+
info: preset("info", { title: "\u63D0\u793A" }),
|
|
2871
|
+
success: preset("success", { title: "\u64CD\u4F5C\u6210\u529F" }),
|
|
2872
|
+
warning: preset("warning", { title: "\u8BF7\u6CE8\u610F" }),
|
|
2873
|
+
error: preset("error", { title: "\u64CD\u4F5C\u5931\u8D25" }),
|
|
2874
|
+
confirm: preset("confirm", { title: "\u786E\u8BA4\u64CD\u4F5C" }),
|
|
2875
|
+
destroyAll() {
|
|
2876
|
+
[...modalHandles].forEach((handle) => handle.destroy());
|
|
2877
|
+
}
|
|
2878
|
+
});
|
|
2879
|
+
|
|
2880
|
+
// src/components/Message.tsx
|
|
2881
|
+
var import_client3 = require("react-dom/client");
|
|
2882
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2883
|
+
var messageSeed = 0;
|
|
2884
|
+
var messageRoot = null;
|
|
2885
|
+
var messageContainer = null;
|
|
2886
|
+
var messageItems = [];
|
|
2887
|
+
var defaultDuration = 3;
|
|
2888
|
+
var maxCount = 5;
|
|
2889
|
+
var messageTimers = /* @__PURE__ */ new Map();
|
|
2890
|
+
var messageIcons = {
|
|
2891
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "info", size: 18 }),
|
|
2892
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "circle-check", size: 18 }),
|
|
2893
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "warning", size: 18 }),
|
|
2894
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "circle-close", size: 18 }),
|
|
2895
|
+
loading: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "loader", size: 18, spin: true })
|
|
2896
|
+
};
|
|
2897
|
+
function ensureMessageRoot() {
|
|
2898
|
+
if (typeof document === "undefined") return false;
|
|
2899
|
+
if (!messageContainer) {
|
|
2900
|
+
messageContainer = document.createElement("div");
|
|
2901
|
+
messageContainer.className = "sia-message-root";
|
|
2902
|
+
document.body.appendChild(messageContainer);
|
|
2903
|
+
messageRoot = (0, import_client3.createRoot)(messageContainer);
|
|
2904
|
+
}
|
|
2905
|
+
return true;
|
|
2906
|
+
}
|
|
2907
|
+
function renderMessages() {
|
|
2908
|
+
if (!ensureMessageRoot()) return;
|
|
2909
|
+
messageRoot.render(/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "sia-message-list", "aria-live": "polite", children: messageItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: `sia-message sia-message--${item.type}`, role: item.type === "loading" ? "status" : "alert", children: [
|
|
2910
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sia-message__icon", "aria-hidden": "true", children: messageIcons[item.type] }),
|
|
2911
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sia-message__content", children: item.content }),
|
|
2912
|
+
item.closable ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", className: "sia-message__close", "aria-label": "\u5173\u95ED\u63D0\u793A", onClick: () => closeMessage(item.key), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "close", size: 14 }) }) : null
|
|
2913
|
+
] }, item.key)) }));
|
|
2914
|
+
}
|
|
2915
|
+
function closeMessage(key) {
|
|
2916
|
+
const item = messageItems.find((candidate) => candidate.key === key);
|
|
2917
|
+
const timer = messageTimers.get(key);
|
|
2918
|
+
if (timer !== void 0) window.clearTimeout(timer);
|
|
2919
|
+
messageTimers.delete(key);
|
|
2920
|
+
messageItems = messageItems.filter((candidate) => candidate.key !== key);
|
|
2921
|
+
item?.onClose?.();
|
|
2922
|
+
renderMessages();
|
|
2923
|
+
}
|
|
2924
|
+
function scheduleMessage(item) {
|
|
2925
|
+
const existingTimer = messageTimers.get(item.key);
|
|
2926
|
+
if (existingTimer !== void 0) window.clearTimeout(existingTimer);
|
|
2927
|
+
const duration = item.duration ?? (item.type === "loading" ? 0 : defaultDuration);
|
|
2928
|
+
if (duration > 0) {
|
|
2929
|
+
messageTimers.set(item.key, window.setTimeout(() => closeMessage(item.key), duration * 1e3));
|
|
2930
|
+
}
|
|
2931
|
+
}
|
|
2932
|
+
function openMessage(input) {
|
|
2933
|
+
const config = typeof input === "object" && input !== null && "content" in input ? input : { content: input };
|
|
2934
|
+
const key = config.key ?? `sia-message-${++messageSeed}`;
|
|
2935
|
+
const item = { ...config, key, type: config.type ?? "info" };
|
|
2936
|
+
const existingIndex = messageItems.findIndex((candidate) => candidate.key === key);
|
|
2937
|
+
if (existingIndex >= 0) messageItems = messageItems.map((candidate, index) => index === existingIndex ? item : candidate);
|
|
2938
|
+
else messageItems = [...messageItems, item];
|
|
2939
|
+
while (messageItems.length > maxCount) closeMessage(messageItems[0].key);
|
|
2940
|
+
renderMessages();
|
|
2941
|
+
scheduleMessage(item);
|
|
2942
|
+
return {
|
|
2943
|
+
close: () => closeMessage(key),
|
|
2944
|
+
update(next) {
|
|
2945
|
+
const current = messageItems.find((candidate) => candidate.key === key);
|
|
2946
|
+
if (!current) return;
|
|
2947
|
+
const updated = { ...current, ...next, key, type: next.type ?? current.type };
|
|
2948
|
+
messageItems = messageItems.map((candidate) => candidate.key === key ? updated : candidate);
|
|
2949
|
+
renderMessages();
|
|
2950
|
+
scheduleMessage(updated);
|
|
2951
|
+
}
|
|
2952
|
+
};
|
|
2953
|
+
}
|
|
2954
|
+
function shortcut(type) {
|
|
2955
|
+
return (content, duration) => openMessage({ content, duration, type });
|
|
2956
|
+
}
|
|
2957
|
+
var message = {
|
|
2958
|
+
open: openMessage,
|
|
2959
|
+
info: shortcut("info"),
|
|
2960
|
+
success: shortcut("success"),
|
|
2961
|
+
warning: shortcut("warning"),
|
|
2962
|
+
error: shortcut("error"),
|
|
2963
|
+
loading: shortcut("loading"),
|
|
2964
|
+
destroy(key) {
|
|
2965
|
+
if (key !== void 0) {
|
|
2966
|
+
closeMessage(key);
|
|
2967
|
+
return;
|
|
2968
|
+
}
|
|
2969
|
+
[...messageItems].forEach((item) => closeMessage(item.key));
|
|
2970
|
+
},
|
|
2971
|
+
config(config) {
|
|
2972
|
+
if (config.duration !== void 0) defaultDuration = config.duration;
|
|
2973
|
+
if (config.maxCount !== void 0) maxCount = Math.max(1, config.maxCount);
|
|
2974
|
+
}
|
|
2975
|
+
};
|
|
2976
|
+
|
|
2977
|
+
// src/components/Breadcrumb.tsx
|
|
2978
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2979
|
+
function Breadcrumb({ items, separator = "/", itemRender, className = "", ...props }) {
|
|
2980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("nav", { "aria-label": "\u9762\u5305\u5C51\u5BFC\u822A", ...props, className: `sia-breadcrumb ${className}`.trim(), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ol", { className: "sia-breadcrumb__list", children: items.map((item, index) => {
|
|
2981
|
+
const current = index === items.length - 1;
|
|
2982
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
2983
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "sia-breadcrumb__icon", "aria-hidden": "true", children: item.icon }) : null,
|
|
2984
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "sia-breadcrumb__title", children: item.title })
|
|
2985
|
+
] });
|
|
2986
|
+
const custom = itemRender?.(item, index, items);
|
|
2987
|
+
const label = item.disabled ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "sia-breadcrumb__label", "aria-disabled": "true", children: content }) : custom !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "sia-breadcrumb__label", children: custom }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { className: "sia-breadcrumb__label", href: item.href, target: item.target, rel: item.target === "_blank" ? "noopener noreferrer" : void 0, onClick: item.onClick, children: content }) : item.onClick ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { className: "sia-breadcrumb__label", variant: "text", onClick: item.onClick, children: content }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "sia-breadcrumb__label", children: content });
|
|
2988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { className: `sia-breadcrumb__item${current ? " is-current" : ""}${item.disabled ? " is-disabled" : ""}`, children: [
|
|
2989
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "sia-breadcrumb__entry", "aria-current": current ? "page" : void 0, children: [
|
|
2990
|
+
label,
|
|
2991
|
+
item.menu?.items.length ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Dropdown, { menu: item.menu, trigger: ["click"], disabled: item.disabled, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { className: "sia-breadcrumb__menu-trigger", variant: "text", size: "small", disabled: item.disabled, "aria-label": `\u5C55\u5F00${typeof item.title === "string" ? item.title : "\u5C42\u7EA7"}\u83DC\u5355`, icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "chevron-down", size: 12 }) }) }) : null
|
|
2992
|
+
] }),
|
|
2993
|
+
!current ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "sia-breadcrumb__separator", "aria-hidden": "true", children: item.separator === void 0 ? separator : item.separator }) : null
|
|
2994
|
+
] }, item.key ?? index);
|
|
2995
|
+
}) }) });
|
|
2996
|
+
}
|
|
2997
|
+
|
|
2998
|
+
// src/components/Typography.tsx
|
|
2999
|
+
var import_react18 = require("react");
|
|
3000
|
+
|
|
3001
|
+
// src/components/TextArea.tsx
|
|
3002
|
+
var import_react17 = require("react");
|
|
3003
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3004
|
+
var TextArea = (0, import_react17.forwardRef)(function TextArea2({
|
|
3005
|
+
label,
|
|
3006
|
+
hint,
|
|
3007
|
+
status = "default",
|
|
3008
|
+
showCount = false,
|
|
3009
|
+
className = "",
|
|
3010
|
+
id,
|
|
3011
|
+
disabled,
|
|
3012
|
+
value,
|
|
3013
|
+
defaultValue,
|
|
3014
|
+
maxLength,
|
|
3015
|
+
onChange,
|
|
3016
|
+
...props
|
|
3017
|
+
}, ref) {
|
|
3018
|
+
const fallbackId = (0, import_react17.useId)();
|
|
3019
|
+
const textAreaId = id ?? fallbackId;
|
|
3020
|
+
const [uncontrolledValue, setUncontrolledValue] = (0, import_react17.useState)(() => defaultValue === void 0 ? "" : String(defaultValue));
|
|
3021
|
+
const currentText = value !== void 0 ? String(value) : uncontrolledValue;
|
|
3022
|
+
const hintId = `${textAreaId}-hint`;
|
|
3023
|
+
const describedBy = [props["aria-describedby"], hint ? hintId : null].filter(Boolean).join(" ") || void 0;
|
|
3024
|
+
function handleChange(event) {
|
|
3025
|
+
setUncontrolledValue(event.target.value);
|
|
3026
|
+
onChange?.(event);
|
|
3027
|
+
}
|
|
3028
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: `sia-textarea-control sia-textarea-control--${status}${disabled ? " is-disabled" : ""}`, children: [
|
|
3029
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3030
|
+
"textarea",
|
|
3031
|
+
{
|
|
3032
|
+
...props,
|
|
3033
|
+
ref,
|
|
3034
|
+
id: textAreaId,
|
|
3035
|
+
className: "sia-textarea",
|
|
3036
|
+
disabled,
|
|
3037
|
+
value,
|
|
3038
|
+
defaultValue,
|
|
3039
|
+
maxLength,
|
|
3040
|
+
"aria-describedby": describedBy,
|
|
3041
|
+
"aria-invalid": status === "error" || void 0,
|
|
3042
|
+
onChange: handleChange
|
|
3043
|
+
}
|
|
3044
|
+
),
|
|
3045
|
+
showCount ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: `sia-textarea-control__count${maxLength !== void 0 && currentText.length >= maxLength ? " is-limit" : ""}`, "aria-live": "polite", children: [
|
|
3046
|
+
currentText.length,
|
|
3047
|
+
maxLength !== void 0 ? `/${maxLength}` : null
|
|
3048
|
+
] }) : null
|
|
3049
|
+
] });
|
|
3050
|
+
if (!label && !hint) return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: `sia-field ${className}`.trim(), children: control });
|
|
3051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: `sia-field ${className}`.trim(), children: [
|
|
3052
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { className: "sia-field__label", htmlFor: textAreaId, children: label }) : null,
|
|
3053
|
+
control,
|
|
3054
|
+
hint ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { id: hintId, className: `sia-field__hint sia-field__hint--${status}`, children: hint }) : null
|
|
3055
|
+
] });
|
|
3056
|
+
});
|
|
3057
|
+
|
|
3058
|
+
// src/components/Typography.tsx
|
|
3059
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3060
|
+
function TypographyContent({
|
|
3061
|
+
as: Tag2 = "span",
|
|
3062
|
+
type,
|
|
3063
|
+
disabled,
|
|
3064
|
+
strong,
|
|
3065
|
+
italic,
|
|
3066
|
+
underline,
|
|
3067
|
+
delete: deleted,
|
|
3068
|
+
mark,
|
|
3069
|
+
code,
|
|
3070
|
+
keyboard,
|
|
3071
|
+
copyable,
|
|
3072
|
+
editable,
|
|
3073
|
+
ellipsis,
|
|
3074
|
+
children,
|
|
3075
|
+
className = "",
|
|
3076
|
+
...props
|
|
3077
|
+
}) {
|
|
3078
|
+
const contentRef = (0, import_react18.useRef)(null);
|
|
3079
|
+
const editRef = (0, import_react18.useRef)(null);
|
|
3080
|
+
const timer = (0, import_react18.useRef)();
|
|
3081
|
+
const [localText, setLocalText] = (0, import_react18.useState)();
|
|
3082
|
+
const [draft, setDraft] = (0, import_react18.useState)("");
|
|
3083
|
+
const [editing, setEditing] = (0, import_react18.useState)(false);
|
|
3084
|
+
const [copied, setCopied] = (0, import_react18.useState)(false);
|
|
3085
|
+
const [copyError, setCopyError] = (0, import_react18.useState)(false);
|
|
3086
|
+
const [expanded, setExpanded] = (0, import_react18.useState)(false);
|
|
3087
|
+
const [overflow, setOverflow] = (0, import_react18.useState)(false);
|
|
3088
|
+
const editConfig = typeof editable === "object" ? editable : void 0;
|
|
3089
|
+
const content = editConfig?.text ?? localText ?? children;
|
|
3090
|
+
const requestedRows = typeof ellipsis === "object" ? ellipsis.rows ?? 1 : 1;
|
|
3091
|
+
const rows = Number.isFinite(requestedRows) ? Math.max(1, Math.floor(requestedRows)) : 1;
|
|
3092
|
+
const expandable = typeof ellipsis === "object" && ellipsis.expandable;
|
|
3093
|
+
(0, import_react18.useEffect)(() => {
|
|
3094
|
+
setLocalText(void 0);
|
|
3095
|
+
}, [children]);
|
|
3096
|
+
(0, import_react18.useEffect)(() => () => clearTimeout(timer.current), []);
|
|
3097
|
+
(0, import_react18.useLayoutEffect)(() => {
|
|
3098
|
+
const element = contentRef.current;
|
|
3099
|
+
if (!element || !ellipsis || editing || expanded) return;
|
|
3100
|
+
const measure = () => setOverflow(element.scrollHeight > element.clientHeight + 1 || element.scrollWidth > element.clientWidth + 1);
|
|
3101
|
+
measure();
|
|
3102
|
+
const observer = new ResizeObserver(measure);
|
|
3103
|
+
observer.observe(element);
|
|
3104
|
+
return () => observer.disconnect();
|
|
3105
|
+
}, [content, ellipsis, rows, editing, expanded]);
|
|
3106
|
+
async function copy() {
|
|
3107
|
+
try {
|
|
3108
|
+
const text = typeof copyable === "object" ? copyable.text ?? contentRef.current?.textContent ?? "" : contentRef.current?.textContent ?? "";
|
|
3109
|
+
await navigator.clipboard.writeText(text);
|
|
3110
|
+
setCopied(true);
|
|
3111
|
+
setCopyError(false);
|
|
3112
|
+
clearTimeout(timer.current);
|
|
3113
|
+
timer.current = setTimeout(() => setCopied(false), 2e3);
|
|
3114
|
+
if (typeof copyable === "object") copyable.onCopy?.();
|
|
3115
|
+
} catch {
|
|
3116
|
+
setCopyError(true);
|
|
3117
|
+
}
|
|
3118
|
+
}
|
|
3119
|
+
function finish(save) {
|
|
3120
|
+
if (save) {
|
|
3121
|
+
setLocalText(draft);
|
|
3122
|
+
editConfig?.onChange?.(draft);
|
|
3123
|
+
}
|
|
3124
|
+
setEditing(false);
|
|
3125
|
+
requestAnimationFrame(() => editRef.current?.focus());
|
|
3126
|
+
}
|
|
3127
|
+
let formatted = content;
|
|
3128
|
+
if (strong) formatted = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: formatted });
|
|
3129
|
+
if (italic) formatted = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("em", { children: formatted });
|
|
3130
|
+
if (underline) formatted = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("u", { children: formatted });
|
|
3131
|
+
if (deleted) formatted = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("del", { children: formatted });
|
|
3132
|
+
if (mark) formatted = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("mark", { children: formatted });
|
|
3133
|
+
if (code) formatted = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("code", { children: formatted });
|
|
3134
|
+
if (keyboard) formatted = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("kbd", { children: formatted });
|
|
3135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Tag2, { ...props, "aria-disabled": disabled || void 0, className: `sia-typography sia-typography--${Tag2}${type ? ` sia-typography--${type}` : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), children: editing ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "sia-typography__editor", children: [
|
|
3136
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3137
|
+
TextArea,
|
|
3138
|
+
{
|
|
3139
|
+
autoFocus: true,
|
|
3140
|
+
"aria-label": "\u7F16\u8F91\u6587\u672C",
|
|
3141
|
+
value: draft,
|
|
3142
|
+
maxLength: editConfig?.maxLength,
|
|
3143
|
+
rows: 3,
|
|
3144
|
+
onChange: (event) => setDraft(event.target.value),
|
|
3145
|
+
onKeyDown: (event) => {
|
|
3146
|
+
if (event.nativeEvent.isComposing) return;
|
|
3147
|
+
if (event.key === "Escape") {
|
|
3148
|
+
event.preventDefault();
|
|
3149
|
+
finish(false);
|
|
3150
|
+
}
|
|
3151
|
+
if (event.key === "Enter" && !event.shiftKey) {
|
|
3152
|
+
event.preventDefault();
|
|
3153
|
+
finish(true);
|
|
3154
|
+
}
|
|
3155
|
+
}
|
|
3156
|
+
}
|
|
3157
|
+
),
|
|
3158
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "sia-typography__edit-actions", children: [
|
|
3159
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { size: "small", onClick: () => finish(false), children: "\u53D6\u6D88" }),
|
|
3160
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { size: "small", variant: "primary", onClick: () => finish(true), children: "\u4FDD\u5B58" })
|
|
3161
|
+
] })
|
|
3162
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
3163
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { ref: contentRef, className: ellipsis && !expanded ? "sia-typography__ellipsis" : void 0, style: ellipsis && !expanded ? { "--sia-typography-rows": rows } : void 0, children: formatted }),
|
|
3164
|
+
expandable && (overflow || expanded) ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { variant: "link", size: "small", className: "sia-typography__action", "aria-expanded": expanded, disabled, onClick: () => setExpanded(!expanded), children: expanded ? "\u6536\u8D77" : "\u5C55\u5F00" }) : null,
|
|
3165
|
+
editable ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { ref: editRef, variant: "text", size: "small", className: "sia-typography__action", "aria-label": "\u7F16\u8F91\u6587\u672C", title: "\u7F16\u8F91", disabled, icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "edit", size: 14 }), onClick: () => {
|
|
3166
|
+
setDraft(contentRef.current?.textContent ?? "");
|
|
3167
|
+
setEditing(true);
|
|
3168
|
+
} }) : null,
|
|
3169
|
+
copyable ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { variant: "text", size: "small", className: "sia-typography__action", "aria-label": copied ? "\u5DF2\u590D\u5236" : "\u590D\u5236\u6587\u672C", title: copied ? "\u5DF2\u590D\u5236" : "\u590D\u5236", disabled, icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: copied ? "check" : "copy", size: 14 }), onClick: () => void copy() }) : null,
|
|
3170
|
+
copyError ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { role: "status", className: "sia-typography--danger", children: "\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u9009\u62E9\u6587\u672C\u590D\u5236\u3002" }) : null
|
|
3171
|
+
] }) });
|
|
3172
|
+
}
|
|
3173
|
+
function Title({ level = 1, ...props }) {
|
|
3174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TypographyContent, { ...props, as: `h${level}` });
|
|
3175
|
+
}
|
|
3176
|
+
function Text(props) {
|
|
3177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TypographyContent, { ...props });
|
|
3178
|
+
}
|
|
3179
|
+
function Paragraph(props) {
|
|
3180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TypographyContent, { ...props, as: "p" });
|
|
3181
|
+
}
|
|
3182
|
+
function Link({ disabled, className = "", onClick, href, target, rel, ...props }) {
|
|
3183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3184
|
+
"a",
|
|
3185
|
+
{
|
|
3186
|
+
...props,
|
|
3187
|
+
href: disabled ? void 0 : href,
|
|
3188
|
+
target,
|
|
3189
|
+
rel: rel ?? (target === "_blank" ? "noopener noreferrer" : void 0),
|
|
3190
|
+
"aria-disabled": disabled || void 0,
|
|
3191
|
+
tabIndex: disabled ? -1 : props.tabIndex,
|
|
3192
|
+
className: `sia-typography sia-typography--link${disabled ? " is-disabled" : ""} ${className}`.trim(),
|
|
3193
|
+
onClick: (event) => {
|
|
3194
|
+
if (disabled) event.preventDefault();
|
|
3195
|
+
else onClick?.(event);
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
);
|
|
3199
|
+
}
|
|
3200
|
+
function TypographyRoot({ className = "", ...props }) {
|
|
3201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { ...props, className: `sia-typography ${className}`.trim() });
|
|
3202
|
+
}
|
|
3203
|
+
var Typography = Object.assign(TypographyRoot, { Title, Text, Paragraph, Link });
|
|
3204
|
+
|
|
3205
|
+
// src/components/FloatButton.tsx
|
|
3206
|
+
var import_react19 = require("react");
|
|
3207
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3208
|
+
var GroupShape = (0, import_react19.createContext)(void 0);
|
|
3209
|
+
var FloatButtonRoot = (0, import_react19.forwardRef)(function FloatButton({
|
|
3210
|
+
icon,
|
|
3211
|
+
description,
|
|
3212
|
+
tooltip,
|
|
3213
|
+
type = "default",
|
|
3214
|
+
shape = "circle",
|
|
3215
|
+
badge,
|
|
3216
|
+
htmlType = "button",
|
|
3217
|
+
className = "",
|
|
3218
|
+
style,
|
|
3219
|
+
children,
|
|
3220
|
+
...props
|
|
3221
|
+
}, ref) {
|
|
3222
|
+
const groupShape = (0, import_react19.useContext)(GroupShape);
|
|
3223
|
+
const label = props["aria-label"] ?? (typeof tooltip === "string" ? tooltip : typeof description === "string" ? description : "\u60AC\u6D6E\u64CD\u4F5C");
|
|
3224
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3225
|
+
"button",
|
|
3226
|
+
{
|
|
3227
|
+
...props,
|
|
3228
|
+
ref,
|
|
3229
|
+
type: htmlType,
|
|
3230
|
+
"aria-label": label,
|
|
3231
|
+
className: `sia-float-button sia-float-button--${groupShape ?? shape} sia-float-button--${type} ${className}`.trim(),
|
|
3232
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Badge, { ...badge, className: "sia-float-button__badge", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "sia-float-button__body", children: [
|
|
3233
|
+
icon !== null ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "sia-float-button__icon", children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { name: "question", size: 20 }) }) : null,
|
|
3234
|
+
description != null || children != null ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "sia-float-button__description", children: description ?? children }) : null
|
|
3235
|
+
] }) })
|
|
3236
|
+
}
|
|
3237
|
+
);
|
|
3238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "sia-float-button-root", style, children: tooltip ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Tooltip, { title: tooltip, placement: "left", children: button }) : button });
|
|
3239
|
+
});
|
|
3240
|
+
function FloatButtonGroup({
|
|
3241
|
+
shape = "circle",
|
|
3242
|
+
type = "default",
|
|
3243
|
+
icon,
|
|
3244
|
+
closeIcon,
|
|
3245
|
+
tooltip,
|
|
3246
|
+
trigger,
|
|
3247
|
+
placement = "top",
|
|
3248
|
+
open,
|
|
3249
|
+
defaultOpen = false,
|
|
3250
|
+
onOpenChange,
|
|
3251
|
+
children,
|
|
3252
|
+
className = "",
|
|
3253
|
+
onMouseEnter,
|
|
3254
|
+
onMouseLeave,
|
|
3255
|
+
onKeyDown,
|
|
3256
|
+
onBlur,
|
|
3257
|
+
...props
|
|
3258
|
+
}) {
|
|
3259
|
+
const [visible, setVisible] = useControllableState({ value: open, defaultValue: defaultOpen, onChange: onOpenChange });
|
|
3260
|
+
const rootRef = (0, import_react19.useRef)(null);
|
|
3261
|
+
const triggerRef = (0, import_react19.useRef)(null);
|
|
3262
|
+
const id = (0, import_react19.useId)();
|
|
3263
|
+
(0, import_react19.useEffect)(() => {
|
|
3264
|
+
if (!trigger || !visible) return;
|
|
3265
|
+
const close = (event) => {
|
|
3266
|
+
if (!rootRef.current?.contains(event.target)) setVisible(false);
|
|
3267
|
+
};
|
|
3268
|
+
document.addEventListener("pointerdown", close);
|
|
3269
|
+
return () => document.removeEventListener("pointerdown", close);
|
|
3270
|
+
}, [trigger, visible, setVisible]);
|
|
3271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(GroupShape.Provider, { value: shape, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3272
|
+
"div",
|
|
3273
|
+
{
|
|
3274
|
+
...props,
|
|
3275
|
+
ref: rootRef,
|
|
3276
|
+
role: "group",
|
|
3277
|
+
className: `sia-float-button-group sia-float-button-group--${shape} sia-float-button-group--${placement}${trigger ? " sia-float-button-group--menu" : ""} ${className}`.trim(),
|
|
3278
|
+
onMouseEnter: (event) => {
|
|
3279
|
+
onMouseEnter?.(event);
|
|
3280
|
+
if (trigger === "hover") setVisible(true);
|
|
3281
|
+
},
|
|
3282
|
+
onMouseLeave: (event) => {
|
|
3283
|
+
onMouseLeave?.(event);
|
|
3284
|
+
if (trigger === "hover" && !event.currentTarget.contains(document.activeElement)) setVisible(false);
|
|
3285
|
+
},
|
|
3286
|
+
onBlur: (event) => {
|
|
3287
|
+
onBlur?.(event);
|
|
3288
|
+
if (trigger === "hover" && !event.currentTarget.contains(event.relatedTarget) && !event.currentTarget.matches(":hover")) setVisible(false);
|
|
3289
|
+
},
|
|
3290
|
+
onKeyDown: (event) => {
|
|
3291
|
+
onKeyDown?.(event);
|
|
3292
|
+
if (!event.defaultPrevented && trigger && event.key === "Escape") {
|
|
3293
|
+
setVisible(false);
|
|
3294
|
+
triggerRef.current?.focus();
|
|
3295
|
+
}
|
|
3296
|
+
},
|
|
3297
|
+
children: [
|
|
3298
|
+
!trigger || visible ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { id, className: "sia-float-button-group__list", children }) : null,
|
|
3299
|
+
trigger ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3300
|
+
FloatButtonRoot,
|
|
3301
|
+
{
|
|
3302
|
+
ref: triggerRef,
|
|
3303
|
+
type,
|
|
3304
|
+
icon: visible ? closeIcon ?? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { name: "close", size: 20 }) : icon ?? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { name: "plus", size: 20 }),
|
|
3305
|
+
tooltip,
|
|
3306
|
+
"aria-label": visible ? "\u6536\u8D77\u60AC\u6D6E\u83DC\u5355" : "\u5C55\u5F00\u60AC\u6D6E\u83DC\u5355",
|
|
3307
|
+
"aria-expanded": visible,
|
|
3308
|
+
"aria-controls": visible ? id : void 0,
|
|
3309
|
+
onClick: () => setVisible(!visible)
|
|
3310
|
+
}
|
|
3311
|
+
) : null
|
|
3312
|
+
]
|
|
3313
|
+
}
|
|
3314
|
+
) });
|
|
3315
|
+
}
|
|
3316
|
+
function FloatButtonBackTop({ target, visibilityHeight = 400, behavior = "smooth", onClick, icon, tooltip = "\u8FD4\u56DE\u9876\u90E8", ...props }) {
|
|
3317
|
+
const [visible, setVisible] = (0, import_react19.useState)(false);
|
|
3318
|
+
(0, import_react19.useEffect)(() => {
|
|
3319
|
+
const element = target ? target() : window;
|
|
3320
|
+
if (!element) return;
|
|
3321
|
+
const update = () => setVisible((element === window ? window.scrollY : element.scrollTop) >= visibilityHeight);
|
|
3322
|
+
update();
|
|
3323
|
+
element.addEventListener("scroll", update, { passive: true });
|
|
3324
|
+
return () => element.removeEventListener("scroll", update);
|
|
3325
|
+
}, [target, visibilityHeight]);
|
|
3326
|
+
if (!visible) return null;
|
|
3327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FloatButtonRoot, { ...props, tooltip, icon: icon ?? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { name: "arrow-up", size: 20 }), onClick: (event) => {
|
|
3328
|
+
onClick?.(event);
|
|
3329
|
+
if (event.defaultPrevented) return;
|
|
3330
|
+
const element = target ? target() : window;
|
|
3331
|
+
element?.scrollTo({ top: 0, behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : behavior });
|
|
3332
|
+
} });
|
|
3333
|
+
}
|
|
3334
|
+
var FloatButton2 = Object.assign(FloatButtonRoot, { Group: FloatButtonGroup, BackTop: FloatButtonBackTop });
|
|
3335
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
3336
|
+
0 && (module.exports = {
|
|
3337
|
+
Breadcrumb,
|
|
3338
|
+
Button,
|
|
3339
|
+
Card,
|
|
3340
|
+
Collapse,
|
|
3341
|
+
FloatButton,
|
|
3342
|
+
Icon,
|
|
3343
|
+
Input,
|
|
3344
|
+
Modal,
|
|
3345
|
+
Progress,
|
|
3346
|
+
Segmented,
|
|
3347
|
+
Select,
|
|
3348
|
+
Tabs,
|
|
3349
|
+
Tag,
|
|
3350
|
+
Typography,
|
|
3351
|
+
Upload,
|
|
3352
|
+
message
|
|
3353
|
+
});
|