@hxdhxd/harmony-flow-ui 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7,13 +7,43 @@ var defaultTheme = {
7
7
  colorText: "#142033",
8
8
  colorTextMuted: "#66758c",
9
9
  colorBorder: "#dce9f7",
10
+ radiusControl: "6px",
11
+ radiusPanel: "8px",
12
+ radiusOverlay: "10px",
13
+ shadowPopover: "0 8px 24px rgba(41, 106, 168, 0.12)",
14
+ shadowModal: "0 18px 48px rgba(41, 106, 168, 0.16)",
10
15
  radiusMd: "14px",
11
16
  radiusLg: "24px",
12
17
  shadowElevated: "0 18px 48px rgba(41, 106, 168, 0.16)",
13
18
  motionDuration: "180ms"
14
19
  };
15
- var darkTheme = { ...defaultTheme, colorPrimary: "#58a9ff", colorPrimaryHover: "#7cbbff", colorBackground: "#0d1724", colorSurface: "#152337", colorText: "#f4f8fc", colorTextMuted: "#a9bad0", colorBorder: "#30445b", shadowElevated: "0 20px 54px rgba(0,0,0,.46)" };
16
- var highContrastTheme = { ...defaultTheme, colorPrimary: "#005fcc", colorPrimaryHover: "#004a9f", colorBackground: "#ffffff", colorSurface: "#ffffff", colorText: "#000000", colorTextMuted: "#303030", colorBorder: "#000000", shadowElevated: "0 0 0 2px #000000", motionDuration: "0ms" };
20
+ var darkTheme = {
21
+ ...defaultTheme,
22
+ colorPrimary: "#58a9ff",
23
+ colorPrimaryHover: "#7cbbff",
24
+ colorBackground: "#0d1724",
25
+ colorSurface: "#152337",
26
+ colorText: "#f4f8fc",
27
+ colorTextMuted: "#a9bad0",
28
+ colorBorder: "#30445b",
29
+ shadowPopover: "0 8px 24px rgba(0, 0, 0, 0.32)",
30
+ shadowModal: "0 20px 54px rgba(0, 0, 0, 0.46)",
31
+ shadowElevated: "0 20px 54px rgba(0, 0, 0, 0.46)"
32
+ };
33
+ var highContrastTheme = {
34
+ ...defaultTheme,
35
+ colorPrimary: "#005fcc",
36
+ colorPrimaryHover: "#004a9f",
37
+ colorBackground: "#ffffff",
38
+ colorSurface: "#ffffff",
39
+ colorText: "#000000",
40
+ colorTextMuted: "#303030",
41
+ colorBorder: "#000000",
42
+ shadowPopover: "0 0 0 2px #000000",
43
+ shadowModal: "0 0 0 2px #000000",
44
+ shadowElevated: "0 0 0 2px #000000",
45
+ motionDuration: "0ms"
46
+ };
17
47
  var tokenVariables = {
18
48
  colorPrimary: "--hf-color-primary",
19
49
  colorPrimaryHover: "--hf-color-primary-hover",
@@ -22,6 +52,11 @@ var tokenVariables = {
22
52
  colorText: "--hf-color-text",
23
53
  colorTextMuted: "--hf-color-text-muted",
24
54
  colorBorder: "--hf-color-border",
55
+ radiusControl: "--hf-radius-control",
56
+ radiusPanel: "--hf-radius-panel",
57
+ radiusOverlay: "--hf-radius-overlay",
58
+ shadowPopover: "--hf-shadow-popover",
59
+ shadowModal: "--hf-shadow-modal",
25
60
  radiusMd: "--hf-radius-md",
26
61
  radiusLg: "--hf-radius-lg",
27
62
  shadowElevated: "--hf-shadow-elevated",
@@ -51,7 +86,7 @@ function ThemeProvider({ children, tokens, mode = "light", className = "", style
51
86
  // src/components/Button.tsx
52
87
  import { forwardRef } from "react";
53
88
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
54
- var Button = forwardRef(function Button2({ children, className = "", variant = "primary", size = "md", shape = "pill", fullWidth = false, loading = false, leadingIcon, trailingIcon, iconOnly = false, disabled, ...props }, ref) {
89
+ var Button = forwardRef(function Button2({ children, className = "", variant = "primary", size = "md", shape = "rounded", fullWidth = false, loading = false, leadingIcon, trailingIcon, iconOnly = false, disabled, ...props }, ref) {
55
90
  return /* @__PURE__ */ jsxs(
56
91
  "button",
57
92
  {
@@ -296,7 +331,7 @@ function Modal({ open, title, children, onClose, footer }) {
296
331
  /* @__PURE__ */ jsx9("div", { className: "hf-modal-backdrop", onMouseDown: (event) => event.target === event.currentTarget && onClose(), children: /* @__PURE__ */ jsxs7("div", { ref: dialogRef, className: "hf-modal", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, children: [
297
332
  /* @__PURE__ */ jsxs7("header", { className: "hf-modal__header", children: [
298
333
  /* @__PURE__ */ jsx9("h2", { id: titleId, children: title }),
299
- /* @__PURE__ */ jsx9(Button, { variant: "quiet", size: "sm", onClick: onClose, "aria-label": "\u5173\u95ED\u5F39\u7A97", children: "\xD7" })
334
+ /* @__PURE__ */ jsx9(Button, { variant: "quiet", size: "sm", iconOnly: true, leadingIcon: /* @__PURE__ */ jsx9(Icon, { name: "close", size: 16 }), onClick: onClose, "aria-label": "\u5173\u95ED\u5F39\u7A97" })
300
335
  ] }),
301
336
  /* @__PURE__ */ jsx9("div", { className: "hf-modal__body", children }),
302
337
  footer && /* @__PURE__ */ jsx9("footer", { className: "hf-modal__footer", children: footer })
@@ -372,7 +407,10 @@ function Accordion({ items, value, defaultValue = [], onChange, multiple = false
372
407
  return /* @__PURE__ */ jsxs10("section", { className: open ? "is-open" : "", children: [
373
408
  /* @__PURE__ */ jsx12("h3", { children: /* @__PURE__ */ jsxs10("button", { type: "button", "aria-expanded": open, disabled: item.disabled, onClick: () => toggle(item.key), children: [
374
409
  /* @__PURE__ */ jsx12("span", { children: item.title }),
375
- /* @__PURE__ */ jsx12("span", { "aria-hidden": "true", children: "\u2304" })
410
+ /* @__PURE__ */ jsxs10("span", { className: "hf-accordion__toggle", "aria-hidden": "true", children: [
411
+ /* @__PURE__ */ jsx12("i", {}),
412
+ /* @__PURE__ */ jsx12("i", {})
413
+ ] })
376
414
  ] }) }),
377
415
  open && /* @__PURE__ */ jsx12("div", { className: "hf-accordion__panel", children: item.content })
378
416
  ] }, item.key);
@@ -421,7 +459,7 @@ function ColorPicker({ value, onChange, label, presets = ["#0a7cff", "#19a989",
421
459
  /* @__PURE__ */ jsxs12("button", { type: "button", className: "hf-color-picker__trigger", disabled, "aria-expanded": open, onClick: () => setOpen(!open), children: [
422
460
  /* @__PURE__ */ jsx15("span", { style: { background: value } }),
423
461
  /* @__PURE__ */ jsx15("code", { children: value.toUpperCase() }),
424
- /* @__PURE__ */ jsx15("span", { "aria-hidden": "true", children: "\u2304" })
462
+ /* @__PURE__ */ jsx15(Icon, { className: "hf-picker-trigger__chevron", name: "chevron-down", size: 16 })
425
463
  ] }),
426
464
  open && /* @__PURE__ */ jsxs12("div", { className: "hf-color-picker__panel", children: [
427
465
  /* @__PURE__ */ jsx15("input", { type: "color", "aria-label": "\u9009\u62E9\u989C\u8272", value, onChange: (event) => onChange(event.target.value) }),
@@ -572,7 +610,7 @@ function ChatComposer({ value, onChange, onSend, attachments = [], onRemoveAttac
572
610
  item.icon,
573
611
  /* @__PURE__ */ jsx17("strong", { children: item.name }),
574
612
  item.size && /* @__PURE__ */ jsx17("small", { children: item.size }),
575
- onRemoveAttachment && /* @__PURE__ */ jsx17("button", { type: "button", "aria-label": `\u79FB\u9664\u9644\u4EF6 ${item.name}`, onClick: () => onRemoveAttachment(item.id), children: "\xD7" })
613
+ onRemoveAttachment && /* @__PURE__ */ jsx17("button", { type: "button", "aria-label": `\u79FB\u9664\u9644\u4EF6 ${item.name}`, onClick: () => onRemoveAttachment(item.id), children: /* @__PURE__ */ jsx17(Icon, { name: "close", size: 14 }) })
576
614
  ] }, item.id)) }),
577
615
  /* @__PURE__ */ jsx17("textarea", { "aria-label": "\u6D88\u606F\u5185\u5BB9", value, maxLength, disabled, placeholder, onChange: (event) => onChange(event.target.value), onKeyDown: keyDown }),
578
616
  /* @__PURE__ */ jsxs14("footer", { children: [
@@ -752,7 +790,7 @@ function CodeBlock({ code, language = "text", filename, wrap, showLineNumbers =
752
790
  function VoiceInput({ state = "idle", duration = "00:00", level = 0.45, disabled, onStart, onStop, onCancel, error }) {
753
791
  const active = state === "listening";
754
792
  return /* @__PURE__ */ jsxs15("div", { className: `hf-voice-input is-${state}`, role: "status", "aria-label": active ? "\u6B63\u5728\u5F55\u97F3" : state === "processing" ? "\u6B63\u5728\u8BC6\u522B\u8BED\u97F3" : "\u8BED\u97F3\u8F93\u5165", children: [
755
- /* @__PURE__ */ jsx18("button", { type: "button", className: "hf-voice-input__main", disabled: disabled || state === "processing", onClick: active ? onStop : onStart, children: state === "processing" ? /* @__PURE__ */ jsx18("span", { className: "hf-spinner" }) : active ? "\u25A0" : "\u25CF" }),
793
+ /* @__PURE__ */ jsx18("button", { type: "button", className: "hf-voice-input__main", "aria-label": active ? "\u505C\u6B62\u5F55\u97F3" : state === "processing" ? "\u6B63\u5728\u8BC6\u522B\u8BED\u97F3" : "\u5F00\u59CB\u8BED\u97F3\u8F93\u5165", disabled: disabled || state === "processing", onClick: active ? onStop : onStart, children: state === "processing" ? /* @__PURE__ */ jsx18("span", { className: "hf-spinner" }) : /* @__PURE__ */ jsx18("span", { className: active ? "hf-voice-input__stop-icon" : "hf-voice-input__record-icon" }) }),
756
794
  /* @__PURE__ */ jsxs15("div", { children: [
757
795
  /* @__PURE__ */ jsx18("div", { className: "hf-voice-input__wave", "aria-hidden": "true", children: Array.from({ length: 18 }, (_, index) => /* @__PURE__ */ jsx18("i", { style: { height: `${Math.max(12, index * 17 % 75 * level + 12)}%` } }, index)) }),
758
796
  /* @__PURE__ */ jsx18("span", { children: active ? duration : state === "processing" ? "\u6B63\u5728\u8F6C\u6362\u6587\u5B57\u2026" : error ?? "\u70B9\u51FB\u5F00\u59CB\u8BED\u97F3\u8F93\u5165" })
@@ -771,7 +809,7 @@ function ModelSelector({ models, value, onChange, label = "\u9009\u62E9\u6A21\u5
771
809
  /* @__PURE__ */ jsx18("strong", { children: selected?.name ?? label }),
772
810
  selected?.description && /* @__PURE__ */ jsx18("small", { children: selected.description })
773
811
  ] }),
774
- /* @__PURE__ */ jsx18("i", { "aria-hidden": "true", children: "\u2304" })
812
+ /* @__PURE__ */ jsx18(Icon, { className: "hf-model-selector__chevron", name: "chevron-down", size: 16 })
775
813
  ] }),
776
814
  open && /* @__PURE__ */ jsx18("div", { className: "hf-model-selector__menu", role: "listbox", "aria-label": label, children: models.map((model) => /* @__PURE__ */ jsxs15("button", { type: "button", role: "option", "aria-selected": model.id === value, disabled: model.disabled, onClick: () => {
777
815
  onChange(model.id);
@@ -1088,7 +1126,7 @@ function MemberPicker({ members, value, onChange, label = "\u6DFB\u52A0\u6210\u5
1088
1126
  return item && /* @__PURE__ */ jsxs17("span", { children: [
1089
1127
  /* @__PURE__ */ jsx20(Avatar, { name: item.name, src: item.avatar, size: "sm" }),
1090
1128
  item.name,
1091
- /* @__PURE__ */ jsx20("button", { type: "button", disabled, "aria-label": `\u79FB\u9664 ${item.name}`, onClick: () => onChange(value.filter((key) => key !== id)), children: "\xD7" })
1129
+ /* @__PURE__ */ jsx20("button", { type: "button", disabled, "aria-label": `\u79FB\u9664 ${item.name}`, onClick: () => onChange(value.filter((key) => key !== id)), children: /* @__PURE__ */ jsx20(Icon, { name: "close", size: 14 }) })
1092
1130
  ] }, id);
1093
1131
  }) }),
1094
1132
  /* @__PURE__ */ jsx20("input", { "aria-label": label, value: query, disabled, placeholder: label, onChange: (event) => setQuery(event.target.value) }),
@@ -1122,27 +1160,115 @@ function SharePanel({ scope, onScopeChange, members, onCopyLink, linkCopied, foo
1122
1160
  ] }, item)) }),
1123
1161
  members && /* @__PURE__ */ jsx20("div", { className: "hf-share-panel__members", children: members }),
1124
1162
  /* @__PURE__ */ jsxs17("footer", { children: [
1125
- /* @__PURE__ */ jsx20("button", { type: "button", onClick: onCopyLink, children: linkCopied ? "\u94FE\u63A5\u5DF2\u590D\u5236" : "\u590D\u5236\u94FE\u63A5" }),
1163
+ /* @__PURE__ */ jsx20(Button, { type: "button", size: "sm", variant: "secondary", onClick: onCopyLink, children: linkCopied ? "\u94FE\u63A5\u5DF2\u590D\u5236" : "\u590D\u5236\u94FE\u63A5" }),
1126
1164
  footer
1127
1165
  ] })
1128
1166
  ] });
1129
1167
  }
1130
1168
 
1131
- // src/components/Scheduling.tsx
1169
+ // src/forms/Select.tsx
1170
+ import { forwardRef as forwardRef5, useEffect as useEffect4, useId as useId4, useRef as useRef4, useState as useState10 } from "react";
1132
1171
  import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
1172
+ var Select = forwardRef5(function Select2({ id, label, hint, error, options, placeholder, className = "", value, defaultValue, onChange, disabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }, forwardedRef) {
1173
+ const generatedId = useId4();
1174
+ const inputId = id ?? generatedId;
1175
+ const triggerId = `${inputId}-trigger`;
1176
+ const listboxId = `${inputId}-listbox`;
1177
+ const descriptionId = `${inputId}-description`;
1178
+ const [open, setOpen] = useState10(false);
1179
+ const rootRef = useDismissibleLayer(open, () => setOpen(false), { autoFocus: false });
1180
+ const nativeRef = useRef4(null);
1181
+ const [innerValue, setInnerValue] = useState10(() => String(defaultValue ?? (placeholder ? "" : options.find((option) => !option.disabled)?.value ?? "")));
1182
+ const selectedValue = value === void 0 ? innerValue : String(value);
1183
+ const selectedOption = options.find((option) => option.value === selectedValue);
1184
+ const enabledIndices = options.map((option, index) => option.disabled ? -1 : index).filter((index) => index >= 0);
1185
+ const selectedIndex = options.findIndex((option) => option.value === selectedValue);
1186
+ const [activeIndex, setActiveIndex] = useState10(selectedIndex >= 0 ? selectedIndex : enabledIndices[0] ?? -1);
1187
+ const assignRef = (node) => {
1188
+ nativeRef.current = node;
1189
+ if (typeof forwardedRef === "function") forwardedRef(node);
1190
+ else if (forwardedRef) forwardedRef.current = node;
1191
+ };
1192
+ const handleNativeChange = (event) => {
1193
+ if (value === void 0) setInnerValue(event.currentTarget.value);
1194
+ onChange?.(event);
1195
+ };
1196
+ const choose = (nextValue) => {
1197
+ const native = nativeRef.current;
1198
+ if (!native) return;
1199
+ Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "value")?.set?.call(native, nextValue);
1200
+ native.dispatchEvent(new Event("change", { bubbles: true }));
1201
+ if (value === void 0) setInnerValue(nextValue);
1202
+ setOpen(false);
1203
+ window.requestAnimationFrame(() => document.getElementById(triggerId)?.focus());
1204
+ };
1205
+ useEffect4(() => {
1206
+ if (selectedIndex >= 0) setActiveIndex(selectedIndex);
1207
+ }, [selectedIndex]);
1208
+ const move = (direction) => {
1209
+ if (!enabledIndices.length) return;
1210
+ const current = enabledIndices.indexOf(activeIndex);
1211
+ const next = current < 0 ? 0 : (current + direction + enabledIndices.length) % enabledIndices.length;
1212
+ setActiveIndex(enabledIndices[next]);
1213
+ };
1214
+ const handleKeyDown = (event) => {
1215
+ if (event.key === "ArrowDown" || event.key === "ArrowUp") {
1216
+ event.preventDefault();
1217
+ if (!open) setOpen(true);
1218
+ move(event.key === "ArrowDown" ? 1 : -1);
1219
+ } else if ((event.key === "Enter" || event.key === " ") && open) {
1220
+ event.preventDefault();
1221
+ const option = options[activeIndex];
1222
+ if (option && !option.disabled) choose(option.value);
1223
+ } else if (event.key === "Escape" && open) {
1224
+ event.preventDefault();
1225
+ setOpen(false);
1226
+ } else if (event.key === "Home" && open && enabledIndices.length) {
1227
+ event.preventDefault();
1228
+ setActiveIndex(enabledIndices[0]);
1229
+ } else if (event.key === "End" && open && enabledIndices.length) {
1230
+ event.preventDefault();
1231
+ setActiveIndex(enabledIndices[enabledIndices.length - 1]);
1232
+ } else if (event.key === "Tab") setOpen(false);
1233
+ };
1234
+ return /* @__PURE__ */ jsxs18("div", { className: `hf-field ${className}`.trim(), ref: rootRef, children: [
1235
+ label && /* @__PURE__ */ jsx21("label", { className: "hf-field__label", htmlFor: triggerId, children: label }),
1236
+ /* @__PURE__ */ jsxs18("div", { className: `hf-select-shell ${open ? "hf-select-shell--open" : ""} ${error ? "hf-select-shell--error" : ""}`, children: [
1237
+ /* @__PURE__ */ jsxs18("select", { ref: assignRef, id: inputId, className: "hf-select-native", tabIndex: -1, "aria-hidden": "true", value: selectedValue, disabled, onChange: handleNativeChange, ...props, children: [
1238
+ placeholder && /* @__PURE__ */ jsx21("option", { value: "", disabled: true, children: placeholder }),
1239
+ options.map((option) => /* @__PURE__ */ jsx21("option", { value: option.value, disabled: option.disabled, children: typeof option.label === "string" ? option.label : option.value }, option.value))
1240
+ ] }),
1241
+ /* @__PURE__ */ jsxs18("button", { id: triggerId, type: "button", className: "hf-select", disabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-haspopup": "listbox", "aria-expanded": open, "aria-controls": open ? listboxId : void 0, "aria-activedescendant": open && activeIndex >= 0 ? `${listboxId}-option-${activeIndex}` : void 0, "aria-invalid": Boolean(error), "aria-describedby": hint || error ? descriptionId : void 0, onClick: () => {
1242
+ setActiveIndex(selectedIndex >= 0 ? selectedIndex : enabledIndices[0] ?? -1);
1243
+ setOpen((current) => !current);
1244
+ }, onKeyDown: handleKeyDown, children: [
1245
+ /* @__PURE__ */ jsx21("span", { className: !selectedOption ? "hf-select__placeholder" : "", children: selectedOption?.label ?? placeholder ?? "\u8BF7\u9009\u62E9" }),
1246
+ /* @__PURE__ */ jsx21("svg", { className: "hf-select__chevron", viewBox: "0 0 16 16", width: "16", height: "16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx21("path", { d: open ? "m4.5 9.75 3.5-3.5 3.5 3.5" : "m4.5 6.25 3.5 3.5 3.5-3.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
1247
+ ] }),
1248
+ open && /* @__PURE__ */ jsx21("div", { id: listboxId, className: "hf-select-menu", role: "listbox", "aria-labelledby": triggerId, children: options.map((option, index) => /* @__PURE__ */ jsxs18("button", { id: `${listboxId}-option-${index}`, type: "button", role: "option", "aria-selected": option.value === selectedValue, disabled: option.disabled, className: index === activeIndex ? "is-active" : "", onPointerMove: () => !option.disabled && setActiveIndex(index), onClick: () => choose(option.value), children: [
1249
+ /* @__PURE__ */ jsx21("span", { children: option.label }),
1250
+ option.value === selectedValue && /* @__PURE__ */ jsx21("svg", { viewBox: "0 0 16 16", width: "16", height: "16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx21("path", { d: "m3.5 8 3 3 6-6", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round" }) })
1251
+ ] }, option.value)) })
1252
+ ] }),
1253
+ (error || hint) && /* @__PURE__ */ jsx21("span", { id: descriptionId, className: `hf-field__hint ${error ? "hf-field__hint--error" : ""}`, children: error ?? hint })
1254
+ ] });
1255
+ });
1256
+
1257
+ // src/components/Scheduling.tsx
1258
+ import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
1133
1259
  function EventCard({
1134
1260
  event,
1135
1261
  onClick
1136
1262
  }) {
1137
- return /* @__PURE__ */ jsxs18(
1263
+ return /* @__PURE__ */ jsxs19(
1138
1264
  "button",
1139
1265
  {
1140
1266
  type: "button",
1141
1267
  className: "hf-event-card",
1142
1268
  onClick: () => onClick?.(event.id),
1143
1269
  children: [
1144
- /* @__PURE__ */ jsx21("strong", { children: event.title }),
1145
- /* @__PURE__ */ jsxs18("time", { children: [
1270
+ /* @__PURE__ */ jsx22("strong", { children: event.title }),
1271
+ /* @__PURE__ */ jsxs19("time", { children: [
1146
1272
  event.start,
1147
1273
  "\u2013",
1148
1274
  event.end
@@ -1156,43 +1282,44 @@ function Scheduler({
1156
1282
  events,
1157
1283
  onEventClick
1158
1284
  }) {
1159
- return /* @__PURE__ */ jsx21("div", { className: "hf-scheduler", children: days.map((day2) => /* @__PURE__ */ jsxs18("section", { children: [
1160
- /* @__PURE__ */ jsx21("strong", { children: day2 }),
1161
- events.filter((e) => e.start.startsWith(day2)).map((e) => /* @__PURE__ */ jsx21(EventCard, { event: e, onClick: onEventClick }, e.id))
1285
+ return /* @__PURE__ */ jsx22("div", { className: "hf-scheduler", children: days.map((day2) => /* @__PURE__ */ jsxs19("section", { children: [
1286
+ /* @__PURE__ */ jsx22("strong", { children: day2 }),
1287
+ events.filter((e) => e.start.startsWith(day2)).map((e) => /* @__PURE__ */ jsx22(EventCard, { event: e, onClick: onEventClick }, e.id))
1162
1288
  ] }, day2)) });
1163
1289
  }
1164
1290
  function ResourceCalendar({
1165
1291
  resources,
1166
1292
  events
1167
1293
  }) {
1168
- return /* @__PURE__ */ jsx21("div", { className: "hf-resource-calendar", children: resources.map((r) => /* @__PURE__ */ jsxs18("section", { children: [
1169
- /* @__PURE__ */ jsx21("strong", { children: r.name }),
1170
- events.filter((e) => e.resourceId === r.id).map((e) => /* @__PURE__ */ jsx21(EventCard, { event: e }, e.id))
1294
+ return /* @__PURE__ */ jsx22("div", { className: "hf-resource-calendar", children: resources.map((r) => /* @__PURE__ */ jsxs19("section", { children: [
1295
+ /* @__PURE__ */ jsx22("strong", { children: r.name }),
1296
+ events.filter((e) => e.resourceId === r.id).map((e) => /* @__PURE__ */ jsx22(EventCard, { event: e }, e.id))
1171
1297
  ] }, r.id)) });
1172
1298
  }
1173
1299
  function RecurrenceEditor({
1174
1300
  value,
1175
1301
  onChange
1176
1302
  }) {
1177
- return /* @__PURE__ */ jsxs18("div", { className: "hf-recurrence", children: [
1178
- /* @__PURE__ */ jsxs18(
1179
- "select",
1303
+ return /* @__PURE__ */ jsxs19("div", { className: "hf-recurrence", children: [
1304
+ /* @__PURE__ */ jsx22(
1305
+ Select,
1180
1306
  {
1307
+ className: "hf-recurrence__select",
1181
1308
  "aria-label": "\u91CD\u590D\u9891\u7387",
1182
1309
  value: value.frequency,
1310
+ options: [
1311
+ { value: "none", label: "\u4E0D\u91CD\u590D" },
1312
+ { value: "daily", label: "\u6BCF\u5929" },
1313
+ { value: "weekly", label: "\u6BCF\u5468" },
1314
+ { value: "monthly", label: "\u6BCF\u6708" }
1315
+ ],
1183
1316
  onChange: (e) => onChange({
1184
1317
  ...value,
1185
1318
  frequency: e.target.value
1186
- }),
1187
- children: [
1188
- /* @__PURE__ */ jsx21("option", { value: "none", children: "\u4E0D\u91CD\u590D" }),
1189
- /* @__PURE__ */ jsx21("option", { value: "daily", children: "\u6BCF\u5929" }),
1190
- /* @__PURE__ */ jsx21("option", { value: "weekly", children: "\u6BCF\u5468" }),
1191
- /* @__PURE__ */ jsx21("option", { value: "monthly", children: "\u6BCF\u6708" })
1192
- ]
1319
+ })
1193
1320
  }
1194
1321
  ),
1195
- /* @__PURE__ */ jsx21(
1322
+ /* @__PURE__ */ jsx22(
1196
1323
  "input",
1197
1324
  {
1198
1325
  "aria-label": "\u91CD\u590D\u95F4\u9694",
@@ -1209,19 +1336,17 @@ function TimezoneSelect({
1209
1336
  value,
1210
1337
  onChange
1211
1338
  }) {
1212
- return /* @__PURE__ */ jsx21(
1213
- "select",
1339
+ return /* @__PURE__ */ jsx22(
1340
+ Select,
1214
1341
  {
1215
1342
  "aria-label": "\u65F6\u533A",
1216
1343
  className: "hf-timezone",
1217
1344
  value,
1218
- onChange: (e) => onChange(e.target.value),
1219
- children: options.map((o) => /* @__PURE__ */ jsxs18("option", { value: o.value, children: [
1220
- o.label,
1221
- " (",
1222
- o.offset,
1223
- ")"
1224
- ] }, o.value))
1345
+ options: options.map((option) => ({
1346
+ value: option.value,
1347
+ label: `${option.label} (${option.offset})`
1348
+ })),
1349
+ onChange: (e) => onChange(e.target.value)
1225
1350
  }
1226
1351
  );
1227
1352
  }
@@ -1230,24 +1355,24 @@ function AvailabilityGrid({
1230
1355
  slots,
1231
1356
  value
1232
1357
  }) {
1233
- return /* @__PURE__ */ jsx21("div", { className: "hf-availability", children: /* @__PURE__ */ jsxs18("table", { children: [
1234
- /* @__PURE__ */ jsx21("thead", { children: /* @__PURE__ */ jsxs18("tr", { children: [
1235
- /* @__PURE__ */ jsx21("th", { children: "\u6210\u5458" }),
1236
- slots.map((s) => /* @__PURE__ */ jsx21("th", { children: s }, s))
1358
+ return /* @__PURE__ */ jsx22("div", { className: "hf-availability", children: /* @__PURE__ */ jsxs19("table", { children: [
1359
+ /* @__PURE__ */ jsx22("thead", { children: /* @__PURE__ */ jsxs19("tr", { children: [
1360
+ /* @__PURE__ */ jsx22("th", { children: "\u6210\u5458" }),
1361
+ slots.map((s) => /* @__PURE__ */ jsx22("th", { children: s }, s))
1237
1362
  ] }) }),
1238
- /* @__PURE__ */ jsx21("tbody", { children: people.map((p) => /* @__PURE__ */ jsxs18("tr", { children: [
1239
- /* @__PURE__ */ jsx21("th", { children: p.name }),
1240
- slots.map((s) => /* @__PURE__ */ jsx21("td", { children: /* @__PURE__ */ jsx21("i", { className: `is-${value[p.id]?.[s] ?? "unavailable"}` }) }, s))
1363
+ /* @__PURE__ */ jsx22("tbody", { children: people.map((p) => /* @__PURE__ */ jsxs19("tr", { children: [
1364
+ /* @__PURE__ */ jsx22("th", { children: p.name }),
1365
+ slots.map((s) => /* @__PURE__ */ jsx22("td", { children: /* @__PURE__ */ jsx22("i", { className: `is-${value[p.id]?.[s] ?? "unavailable"}` }) }, s))
1241
1366
  ] }, p.id)) })
1242
1367
  ] }) });
1243
1368
  }
1244
1369
 
1245
1370
  // src/foundations/Typography.tsx
1246
- import { jsx as jsx22 } from "react/jsx-runtime";
1371
+ import { jsx as jsx23 } from "react/jsx-runtime";
1247
1372
  function Typography({ as, variant = "body", muted, truncate, className = "", ...props }) {
1248
1373
  const defaults = { display: "h1", h1: "h1", h2: "h2", h3: "h3", code: "code" };
1249
1374
  const Tag2 = as ?? defaults[variant] ?? "p";
1250
- return /* @__PURE__ */ jsx22(Tag2, { className: `hf-typography hf-typography--${variant}${muted ? " is-muted" : ""}${truncate ? " is-truncated" : ""} ${className}`, ...props });
1375
+ return /* @__PURE__ */ jsx23(Tag2, { className: `hf-typography hf-typography--${variant}${muted ? " is-muted" : ""}${truncate ? " is-truncated" : ""} ${className}`, ...props });
1251
1376
  }
1252
1377
 
1253
1378
  // src/navigation/types.ts
@@ -1256,85 +1381,85 @@ function activateNavigationItem(item, onItemSelect) {
1256
1381
  }
1257
1382
 
1258
1383
  // src/navigation/FloatingNav.tsx
1259
- import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
1384
+ import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
1260
1385
  function FloatingNav({ brand, items, action, activeKey, onItemSelect, className = "", ...props }) {
1261
- return /* @__PURE__ */ jsxs19("nav", { className: `hf-floating-nav ${className}`.trim(), "aria-label": "\u4E3B\u5BFC\u822A", ...props, children: [
1262
- /* @__PURE__ */ jsx23("div", { className: "hf-floating-nav__brand", children: brand }),
1263
- /* @__PURE__ */ jsx23("div", { className: "hf-floating-nav__items", children: items.map((item) => /* @__PURE__ */ jsx23("a", { href: item.href ?? "#", "aria-current": activeKey === item.key ? "page" : void 0, onClick: () => activateNavigationItem(item, onItemSelect), children: item.label }, item.key)) }),
1264
- action && /* @__PURE__ */ jsx23("div", { className: "hf-floating-nav__action", children: action })
1386
+ return /* @__PURE__ */ jsxs20("nav", { className: `hf-floating-nav ${className}`.trim(), "aria-label": "\u4E3B\u5BFC\u822A", ...props, children: [
1387
+ /* @__PURE__ */ jsx24("div", { className: "hf-floating-nav__brand", children: brand }),
1388
+ /* @__PURE__ */ jsx24("div", { className: "hf-floating-nav__items", children: items.map((item) => /* @__PURE__ */ jsx24("a", { href: item.href ?? "#", "aria-current": activeKey === item.key ? "page" : void 0, onClick: () => activateNavigationItem(item, onItemSelect), children: item.label }, item.key)) }),
1389
+ action && /* @__PURE__ */ jsx24("div", { className: "hf-floating-nav__action", children: action })
1265
1390
  ] });
1266
1391
  }
1267
1392
 
1268
1393
  // src/navigation/Sidebar.tsx
1269
- import { useState as useState10 } from "react";
1270
- import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
1394
+ import { useState as useState11 } from "react";
1395
+ import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
1271
1396
  function Sidebar({ brand, items, activeKey, collapsed, defaultCollapsed = false, onCollapsedChange, onItemSelect, appearance = "flush", className = "", ...props }) {
1272
- const [internalCollapsed, setInternalCollapsed] = useState10(defaultCollapsed);
1397
+ const [internalCollapsed, setInternalCollapsed] = useState11(defaultCollapsed);
1273
1398
  const isCollapsed = collapsed ?? internalCollapsed;
1274
1399
  const toggle = () => {
1275
1400
  const next = !isCollapsed;
1276
1401
  if (collapsed === void 0) setInternalCollapsed(next);
1277
1402
  onCollapsedChange?.(next);
1278
1403
  };
1279
- return /* @__PURE__ */ jsxs20("aside", { className: `hf-sidebar hf-sidebar--${appearance} ${isCollapsed ? "hf-sidebar--collapsed" : ""} ${className}`.trim(), ...props, children: [
1280
- /* @__PURE__ */ jsxs20("div", { className: "hf-sidebar__top", children: [
1281
- brand && /* @__PURE__ */ jsx24("div", { className: "hf-sidebar__brand", children: brand }),
1282
- /* @__PURE__ */ jsx24("button", { type: "button", onClick: toggle, "aria-label": isCollapsed ? "\u5C55\u5F00\u4FA7\u8FB9\u680F" : "\u6536\u8D77\u4FA7\u8FB9\u680F", "aria-expanded": !isCollapsed, children: "\u2039" })
1404
+ return /* @__PURE__ */ jsxs21("aside", { className: `hf-sidebar hf-sidebar--${appearance} ${isCollapsed ? "hf-sidebar--collapsed" : ""} ${className}`.trim(), ...props, children: [
1405
+ /* @__PURE__ */ jsxs21("div", { className: "hf-sidebar__top", children: [
1406
+ brand && /* @__PURE__ */ jsx25("div", { className: "hf-sidebar__brand", children: brand }),
1407
+ /* @__PURE__ */ jsx25("button", { className: "hf-sidebar__collapse", type: "button", onClick: toggle, "aria-label": isCollapsed ? "\u5C55\u5F00\u4FA7\u8FB9\u680F" : "\u6536\u8D77\u4FA7\u8FB9\u680F", "aria-expanded": !isCollapsed, children: /* @__PURE__ */ jsx25(Icon, { name: "arrow-right", size: 17 }) })
1283
1408
  ] }),
1284
- /* @__PURE__ */ jsx24("nav", { "aria-label": "\u4FA7\u8FB9\u5BFC\u822A", children: items.map((item) => /* @__PURE__ */ jsxs20("a", { href: item.href ?? "#", "aria-current": activeKey === item.key ? "page" : void 0, title: isCollapsed ? item.label : void 0, onClick: () => activateNavigationItem(item, onItemSelect), children: [
1285
- /* @__PURE__ */ jsx24("span", { className: "hf-sidebar__icon", children: item.icon ?? item.label.slice(0, 1) }),
1286
- /* @__PURE__ */ jsx24("span", { className: "hf-sidebar__label", children: item.label })
1409
+ /* @__PURE__ */ jsx25("nav", { "aria-label": "\u4FA7\u8FB9\u5BFC\u822A", children: items.map((item) => /* @__PURE__ */ jsxs21("a", { href: item.href ?? "#", "aria-current": activeKey === item.key ? "page" : void 0, title: isCollapsed ? item.label : void 0, onClick: () => activateNavigationItem(item, onItemSelect), children: [
1410
+ /* @__PURE__ */ jsx25("span", { className: "hf-sidebar__icon", children: item.icon ?? item.label.slice(0, 1) }),
1411
+ /* @__PURE__ */ jsx25("span", { className: "hf-sidebar__label", children: item.label })
1287
1412
  ] }, item.key)) })
1288
1413
  ] });
1289
1414
  }
1290
1415
 
1291
1416
  // src/navigation/Breadcrumb.tsx
1292
- import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
1417
+ import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
1293
1418
  function Breadcrumb({ items, separator = "/", onItemSelect, className = "", ...props }) {
1294
- return /* @__PURE__ */ jsx25("nav", { className: `hf-breadcrumb ${className}`.trim(), "aria-label": "\u9762\u5305\u5C51", ...props, children: /* @__PURE__ */ jsx25("ol", { children: items.map((item, index) => {
1419
+ return /* @__PURE__ */ jsx26("nav", { className: `hf-breadcrumb ${className}`.trim(), "aria-label": "\u9762\u5305\u5C51", ...props, children: /* @__PURE__ */ jsx26("ol", { children: items.map((item, index) => {
1295
1420
  const current = index === items.length - 1;
1296
- return /* @__PURE__ */ jsxs21("li", { children: [
1297
- current ? /* @__PURE__ */ jsx25("span", { "aria-current": "page", children: item.label }) : /* @__PURE__ */ jsx25("a", { href: item.href ?? "#", onClick: () => activateNavigationItem(item, onItemSelect), children: item.label }),
1298
- !current && /* @__PURE__ */ jsx25("i", { "aria-hidden": "true", children: separator })
1421
+ return /* @__PURE__ */ jsxs22("li", { children: [
1422
+ current ? /* @__PURE__ */ jsx26("span", { "aria-current": "page", children: item.label }) : /* @__PURE__ */ jsx26("a", { href: item.href ?? "#", onClick: () => activateNavigationItem(item, onItemSelect), children: item.label }),
1423
+ !current && /* @__PURE__ */ jsx26("i", { "aria-hidden": "true", children: separator })
1299
1424
  ] }, item.key);
1300
1425
  }) }) });
1301
1426
  }
1302
1427
 
1303
1428
  // src/navigation/Menu.tsx
1304
- import { useState as useState11 } from "react";
1305
- import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
1429
+ import { useState as useState12 } from "react";
1430
+ import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
1306
1431
  function DropdownMenu({ label, items, activeKey, onItemSelect, className = "", ...props }) {
1307
- const [open, setOpen] = useState11(false);
1432
+ const [open, setOpen] = useState12(false);
1308
1433
  const ref = useDismissibleLayer(open, () => setOpen(false), { autoFocus: false });
1309
- return /* @__PURE__ */ jsxs22("div", { ref, className: `hf-menu ${className}`.trim(), ...props, children: [
1310
- /* @__PURE__ */ jsxs22("button", { type: "button", "aria-expanded": open, "aria-haspopup": "menu", onClick: () => setOpen((value) => !value), children: [
1311
- label,
1312
- /* @__PURE__ */ jsx26("span", { "aria-hidden": "true", children: "\u2304" })
1434
+ return /* @__PURE__ */ jsxs23("div", { ref, className: `hf-menu ${className}`.trim(), ...props, children: [
1435
+ /* @__PURE__ */ jsxs23("button", { type: "button", "aria-expanded": open, "aria-haspopup": "menu", onClick: () => setOpen((value) => !value), children: [
1436
+ /* @__PURE__ */ jsx27("span", { children: label }),
1437
+ /* @__PURE__ */ jsx27(Icon, { className: "hf-menu__chevron", name: "chevron-down", size: 16 })
1313
1438
  ] }),
1314
- open && /* @__PURE__ */ jsx26("div", { className: "hf-menu__panel", role: "menu", children: items.map((item) => /* @__PURE__ */ jsx26("a", { role: "menuitem", href: item.href ?? "#", "aria-current": activeKey === item.key ? "page" : void 0, onClick: () => {
1439
+ open && /* @__PURE__ */ jsx27("div", { className: "hf-menu__panel", role: "menu", children: items.map((item) => /* @__PURE__ */ jsx27("a", { role: "menuitem", href: item.href ?? "#", "aria-current": activeKey === item.key ? "page" : void 0, onClick: () => {
1315
1440
  activateNavigationItem(item, onItemSelect);
1316
1441
  setOpen(false);
1317
1442
  }, children: item.label }, item.key)) })
1318
1443
  ] });
1319
1444
  }
1320
1445
  function MegaMenu({ label, items, onItemSelect, className = "", ...props }) {
1321
- const [open, setOpen] = useState11(false);
1446
+ const [open, setOpen] = useState12(false);
1322
1447
  const ref = useDismissibleLayer(open, () => setOpen(false), { autoFocus: false });
1323
- return /* @__PURE__ */ jsxs22("div", { ref, className: `hf-menu hf-mega-menu ${className}`.trim(), ...props, children: [
1324
- /* @__PURE__ */ jsxs22("button", { type: "button", "aria-expanded": open, "aria-haspopup": "menu", onClick: () => setOpen((value) => !value), children: [
1325
- label,
1326
- /* @__PURE__ */ jsx26("span", { "aria-hidden": "true", children: "\u2304" })
1448
+ return /* @__PURE__ */ jsxs23("div", { ref, className: `hf-menu hf-mega-menu ${className}`.trim(), ...props, children: [
1449
+ /* @__PURE__ */ jsxs23("button", { type: "button", "aria-expanded": open, "aria-haspopup": "menu", onClick: () => setOpen((value) => !value), children: [
1450
+ /* @__PURE__ */ jsx27("span", { children: label }),
1451
+ /* @__PURE__ */ jsx27(Icon, { className: "hf-menu__chevron", name: "chevron-down", size: 16 })
1327
1452
  ] }),
1328
- open && /* @__PURE__ */ jsx26("div", { className: "hf-mega-menu__panel", role: "menu", children: items.map((group) => /* @__PURE__ */ jsxs22("section", { children: [
1329
- /* @__PURE__ */ jsx26("h3", { children: group.label }),
1330
- group.children?.map((item) => /* @__PURE__ */ jsxs22("a", { role: "menuitem", href: item.href ?? "#", onClick: () => {
1453
+ open && /* @__PURE__ */ jsx27("div", { className: "hf-mega-menu__panel", role: "menu", children: items.map((group) => /* @__PURE__ */ jsxs23("section", { children: [
1454
+ /* @__PURE__ */ jsx27("h3", { children: group.label }),
1455
+ group.children?.map((item) => /* @__PURE__ */ jsxs23("a", { role: "menuitem", href: item.href ?? "#", onClick: () => {
1331
1456
  activateNavigationItem(item, onItemSelect);
1332
1457
  setOpen(false);
1333
1458
  }, children: [
1334
- /* @__PURE__ */ jsx26("span", { children: item.icon }),
1335
- /* @__PURE__ */ jsxs22("span", { children: [
1336
- /* @__PURE__ */ jsx26("strong", { children: item.label }),
1337
- item.description && /* @__PURE__ */ jsx26("small", { children: item.description })
1459
+ /* @__PURE__ */ jsx27("span", { children: item.icon }),
1460
+ /* @__PURE__ */ jsxs23("span", { children: [
1461
+ /* @__PURE__ */ jsx27("strong", { children: item.label }),
1462
+ item.description && /* @__PURE__ */ jsx27("small", { children: item.description })
1338
1463
  ] })
1339
1464
  ] }, item.key))
1340
1465
  ] }, group.key)) })
@@ -1342,49 +1467,49 @@ function MegaMenu({ label, items, onItemSelect, className = "", ...props }) {
1342
1467
  }
1343
1468
 
1344
1469
  // src/navigation/MobileNavigation.tsx
1345
- import { useId as useId4, useState as useState12 } from "react";
1346
- import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
1470
+ import { useId as useId5, useState as useState13 } from "react";
1471
+ import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
1347
1472
  function MobileNavigation({ brand, items, mode = "drawer", activeKey, open, onOpenChange, onItemSelect, className = "", ...props }) {
1348
- const [internalOpen, setInternalOpen] = useState12(false);
1473
+ const [internalOpen, setInternalOpen] = useState13(false);
1349
1474
  const isOpen = open ?? internalOpen;
1350
- const panelId = useId4();
1475
+ const panelId = useId5();
1351
1476
  const setOpen = (next) => {
1352
1477
  if (open === void 0) setInternalOpen(next);
1353
1478
  onOpenChange?.(next);
1354
1479
  };
1355
1480
  const panelRef = useDismissibleLayer(isOpen, () => setOpen(false), true);
1356
- return /* @__PURE__ */ jsxs23("div", { className: `hf-mobile-nav ${className}`.trim(), ...props, children: [
1357
- /* @__PURE__ */ jsxs23("div", { className: "hf-mobile-nav__bar", children: [
1358
- /* @__PURE__ */ jsx27("div", { children: brand }),
1359
- /* @__PURE__ */ jsxs23("button", { type: "button", "aria-label": "\u6253\u5F00\u5BFC\u822A", "aria-expanded": isOpen, "aria-controls": panelId, onClick: () => setOpen(true), children: [
1360
- /* @__PURE__ */ jsx27("i", {}),
1361
- /* @__PURE__ */ jsx27("i", {}),
1362
- /* @__PURE__ */ jsx27("i", {})
1481
+ return /* @__PURE__ */ jsxs24("div", { className: `hf-mobile-nav ${className}`.trim(), ...props, children: [
1482
+ /* @__PURE__ */ jsxs24("div", { className: "hf-mobile-nav__bar", children: [
1483
+ /* @__PURE__ */ jsx28("div", { children: brand }),
1484
+ /* @__PURE__ */ jsxs24("button", { type: "button", "aria-label": "\u6253\u5F00\u5BFC\u822A", "aria-expanded": isOpen, "aria-controls": panelId, onClick: () => setOpen(true), children: [
1485
+ /* @__PURE__ */ jsx28("i", {}),
1486
+ /* @__PURE__ */ jsx28("i", {}),
1487
+ /* @__PURE__ */ jsx28("i", {})
1363
1488
  ] })
1364
1489
  ] }),
1365
- isOpen && /* @__PURE__ */ jsx27("div", { className: `hf-mobile-nav__backdrop hf-mobile-nav__backdrop--${mode}`, onMouseDown: (event) => event.target === event.currentTarget && setOpen(false), children: /* @__PURE__ */ jsxs23("nav", { ref: panelRef, id: panelId, className: "hf-mobile-nav__panel", "aria-label": "\u79FB\u52A8\u5BFC\u822A", tabIndex: -1, children: [
1366
- /* @__PURE__ */ jsxs23("header", { children: [
1367
- /* @__PURE__ */ jsx27("div", { children: brand }),
1368
- /* @__PURE__ */ jsx27("button", { type: "button", "aria-label": "\u5173\u95ED\u5BFC\u822A", onClick: () => setOpen(false), children: "\xD7" })
1490
+ isOpen && /* @__PURE__ */ jsx28("div", { className: `hf-mobile-nav__backdrop hf-mobile-nav__backdrop--${mode}`, onMouseDown: (event) => event.target === event.currentTarget && setOpen(false), children: /* @__PURE__ */ jsxs24("nav", { ref: panelRef, id: panelId, className: "hf-mobile-nav__panel", "aria-label": "\u79FB\u52A8\u5BFC\u822A", tabIndex: -1, children: [
1491
+ /* @__PURE__ */ jsxs24("header", { children: [
1492
+ /* @__PURE__ */ jsx28("div", { children: brand }),
1493
+ /* @__PURE__ */ jsx28("button", { type: "button", "aria-label": "\u5173\u95ED\u5BFC\u822A", onClick: () => setOpen(false), children: /* @__PURE__ */ jsx28(Icon, { name: "close", size: 18 }) })
1369
1494
  ] }),
1370
- /* @__PURE__ */ jsx27("div", { className: "hf-mobile-nav__links", children: items.map((item, index) => /* @__PURE__ */ jsxs23("a", { href: item.href ?? "#", "aria-current": activeKey === item.key ? "page" : void 0, style: { "--hf-nav-index": index }, onClick: () => {
1495
+ /* @__PURE__ */ jsx28("div", { className: "hf-mobile-nav__links", children: items.map((item, index) => /* @__PURE__ */ jsxs24("a", { href: item.href ?? "#", "aria-current": activeKey === item.key ? "page" : void 0, style: { "--hf-nav-index": index }, onClick: () => {
1371
1496
  activateNavigationItem(item, onItemSelect);
1372
1497
  setOpen(false);
1373
1498
  }, children: [
1374
- /* @__PURE__ */ jsx27("span", { children: item.label }),
1375
- item.description && /* @__PURE__ */ jsx27("small", { children: item.description })
1499
+ /* @__PURE__ */ jsx28("span", { children: item.label }),
1500
+ item.description && /* @__PURE__ */ jsx28("small", { children: item.description })
1376
1501
  ] }, item.key)) })
1377
1502
  ] }) })
1378
1503
  ] });
1379
1504
  }
1380
1505
 
1381
1506
  // src/navigation/Scrollspy.tsx
1382
- import { useEffect as useEffect4, useState as useState13 } from "react";
1383
- import { jsx as jsx28 } from "react/jsx-runtime";
1507
+ import { useEffect as useEffect5, useState as useState14 } from "react";
1508
+ import { jsx as jsx29 } from "react/jsx-runtime";
1384
1509
  function Scrollspy({ items, activeKey, onItemSelect, rootMargin = "-20% 0px -65%", className = "", ...props }) {
1385
- const [observedKey, setObservedKey] = useState13(items[0]?.key);
1510
+ const [observedKey, setObservedKey] = useState14(items[0]?.key);
1386
1511
  const currentKey = activeKey ?? observedKey;
1387
- useEffect4(() => {
1512
+ useEffect5(() => {
1388
1513
  if (activeKey || !("IntersectionObserver" in window)) return;
1389
1514
  const observer = new IntersectionObserver((entries) => {
1390
1515
  const visible = entries.find((entry) => entry.isIntersecting);
@@ -1396,15 +1521,15 @@ function Scrollspy({ items, activeKey, onItemSelect, rootMargin = "-20% 0px -65%
1396
1521
  });
1397
1522
  return () => observer.disconnect();
1398
1523
  }, [activeKey, items, rootMargin]);
1399
- return /* @__PURE__ */ jsx28("nav", { className: `hf-scrollspy ${className}`.trim(), "aria-label": "\u9875\u5185\u5BFC\u822A", ...props, children: items.map((item) => /* @__PURE__ */ jsx28("a", { href: item.href ?? `#${item.key}`, "aria-current": currentKey === item.key ? "location" : void 0, onClick: () => onItemSelect?.(item), children: item.label }, item.key)) });
1524
+ return /* @__PURE__ */ jsx29("nav", { className: `hf-scrollspy ${className}`.trim(), "aria-label": "\u9875\u5185\u5BFC\u822A", ...props, children: items.map((item) => /* @__PURE__ */ jsx29("a", { href: item.href ?? `#${item.key}`, "aria-current": currentKey === item.key ? "location" : void 0, onClick: () => onItemSelect?.(item), children: item.label }, item.key)) });
1400
1525
  }
1401
1526
 
1402
1527
  // src/navigation/ShrinkNav.tsx
1403
- import { useEffect as useEffect5, useState as useState14 } from "react";
1404
- import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
1528
+ import { useEffect as useEffect6, useState as useState15 } from "react";
1529
+ import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
1405
1530
  function ShrinkNav({ brand, items, threshold = 48, action, activeKey, onItemSelect, className = "", ...props }) {
1406
- const [compact, setCompact] = useState14(false);
1407
- useEffect5(() => {
1531
+ const [compact, setCompact] = useState15(false);
1532
+ useEffect6(() => {
1408
1533
  let frame = 0;
1409
1534
  const update = () => {
1410
1535
  cancelAnimationFrame(frame);
@@ -1417,18 +1542,18 @@ function ShrinkNav({ brand, items, threshold = 48, action, activeKey, onItemSele
1417
1542
  window.removeEventListener("scroll", update);
1418
1543
  };
1419
1544
  }, [threshold]);
1420
- return /* @__PURE__ */ jsxs24("nav", { className: `hf-shrink-nav ${compact ? "hf-shrink-nav--compact" : ""} ${className}`.trim(), "aria-label": "\u6EDA\u52A8\u5BFC\u822A", ...props, children: [
1421
- /* @__PURE__ */ jsx29("div", { className: "hf-shrink-nav__brand", children: brand }),
1422
- /* @__PURE__ */ jsx29("div", { className: "hf-shrink-nav__items", children: items.map((item) => /* @__PURE__ */ jsx29("a", { href: item.href ?? "#", "aria-current": activeKey === item.key ? "page" : void 0, onClick: () => onItemSelect?.(item), children: item.label }, item.key)) }),
1545
+ return /* @__PURE__ */ jsxs25("nav", { className: `hf-shrink-nav ${compact ? "hf-shrink-nav--compact" : ""} ${className}`.trim(), "aria-label": "\u6EDA\u52A8\u5BFC\u822A", ...props, children: [
1546
+ /* @__PURE__ */ jsx30("div", { className: "hf-shrink-nav__brand", children: brand }),
1547
+ /* @__PURE__ */ jsx30("div", { className: "hf-shrink-nav__items", children: items.map((item) => /* @__PURE__ */ jsx30("a", { href: item.href ?? "#", "aria-current": activeKey === item.key ? "page" : void 0, onClick: () => onItemSelect?.(item), children: item.label }, item.key)) }),
1423
1548
  action
1424
1549
  ] });
1425
1550
  }
1426
1551
 
1427
1552
  // src/navigation/Tabs.tsx
1428
- import { useId as useId5 } from "react";
1429
- import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
1553
+ import { useId as useId6 } from "react";
1554
+ import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
1430
1555
  function Tabs({ items, value, onChange, variant = "line", label = "\u5185\u5BB9\u6807\u7B7E" }) {
1431
- const id = useId5();
1556
+ const id = useId6();
1432
1557
  const active = items.find((item) => item.key === value) ?? items[0];
1433
1558
  const onKeyDown = (event) => {
1434
1559
  if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(event.key)) return;
@@ -1439,43 +1564,43 @@ function Tabs({ items, value, onChange, variant = "line", label = "\u5185\u5BB9\
1439
1564
  const next = enabled[(current + offset + enabled.length) % enabled.length];
1440
1565
  if (next) onChange(next.key);
1441
1566
  };
1442
- return /* @__PURE__ */ jsxs25("div", { className: `hf-tabs hf-tabs--${variant}`, children: [
1443
- /* @__PURE__ */ jsx30("div", { role: "tablist", "aria-label": label, onKeyDown, children: items.map((item) => /* @__PURE__ */ jsxs25("button", { type: "button", role: "tab", id: `${id}-${item.key}`, "aria-controls": `${id}-${item.key}-panel`, "aria-selected": item.key === value, tabIndex: item.key === value ? 0 : -1, disabled: item.disabled, onClick: () => onChange(item.key), children: [
1567
+ return /* @__PURE__ */ jsxs26("div", { className: `hf-tabs hf-tabs--${variant}`, children: [
1568
+ /* @__PURE__ */ jsx31("div", { role: "tablist", "aria-label": label, onKeyDown, children: items.map((item) => /* @__PURE__ */ jsxs26("button", { type: "button", role: "tab", id: `${id}-${item.key}`, "aria-controls": `${id}-${item.key}-panel`, "aria-selected": item.key === value, tabIndex: item.key === value ? 0 : -1, disabled: item.disabled, onClick: () => onChange(item.key), children: [
1444
1569
  item.icon,
1445
- /* @__PURE__ */ jsx30("span", { children: item.label }),
1446
- item.badge && /* @__PURE__ */ jsx30("small", { children: item.badge })
1570
+ /* @__PURE__ */ jsx31("span", { children: item.label }),
1571
+ item.badge && /* @__PURE__ */ jsx31("small", { children: item.badge })
1447
1572
  ] }, item.key)) }),
1448
- active && /* @__PURE__ */ jsx30("div", { role: "tabpanel", id: `${id}-${active.key}-panel`, "aria-labelledby": `${id}-${active.key}`, tabIndex: 0, children: active.content })
1573
+ active && /* @__PURE__ */ jsx31("div", { role: "tabpanel", id: `${id}-${active.key}-panel`, "aria-labelledby": `${id}-${active.key}`, tabIndex: 0, children: active.content })
1449
1574
  ] });
1450
1575
  }
1451
1576
 
1452
1577
  // src/navigation/Steps.tsx
1453
- import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
1578
+ import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
1454
1579
  function Steps({ items, current, onChange, orientation = "horizontal" }) {
1455
1580
  const currentIndex = Math.max(0, items.findIndex((item) => item.key === current));
1456
- return /* @__PURE__ */ jsx31("ol", { className: `hf-steps hf-steps--${orientation}`, children: items.map((item, index) => {
1581
+ return /* @__PURE__ */ jsx32("ol", { className: `hf-steps hf-steps--${orientation}`, children: items.map((item, index) => {
1457
1582
  const state = index < currentIndex ? "complete" : index === currentIndex ? "current" : "upcoming";
1458
- return /* @__PURE__ */ jsx31("li", { className: `is-${state}`, "aria-current": state === "current" ? "step" : void 0, children: /* @__PURE__ */ jsxs26("button", { type: "button", disabled: item.disabled || !onChange, onClick: () => onChange?.(item.key), children: [
1459
- /* @__PURE__ */ jsx31("span", { children: state === "complete" ? "\u2713" : index + 1 }),
1460
- /* @__PURE__ */ jsxs26("span", { children: [
1461
- /* @__PURE__ */ jsx31("strong", { children: item.title }),
1462
- item.optional && /* @__PURE__ */ jsx31("small", { children: "\u53EF\u9009" }),
1463
- item.description && /* @__PURE__ */ jsx31("small", { children: item.description })
1583
+ return /* @__PURE__ */ jsx32("li", { className: `is-${state}`, "aria-current": state === "current" ? "step" : void 0, children: /* @__PURE__ */ jsxs27("button", { type: "button", disabled: item.disabled || !onChange, onClick: () => onChange?.(item.key), children: [
1584
+ /* @__PURE__ */ jsx32("span", { children: state === "complete" ? "\u2713" : index + 1 }),
1585
+ /* @__PURE__ */ jsxs27("span", { children: [
1586
+ /* @__PURE__ */ jsx32("strong", { children: item.title }),
1587
+ item.optional && /* @__PURE__ */ jsx32("small", { children: "\u53EF\u9009" }),
1588
+ item.description && /* @__PURE__ */ jsx32("small", { children: item.description })
1464
1589
  ] })
1465
1590
  ] }) }, item.key);
1466
1591
  }) });
1467
1592
  }
1468
1593
 
1469
1594
  // src/navigation/CommandPalette.tsx
1470
- import { useEffect as useEffect6, useMemo as useMemo4, useState as useState15 } from "react";
1595
+ import { useEffect as useEffect7, useMemo as useMemo4, useState as useState16 } from "react";
1471
1596
  import { createPortal as createPortal3 } from "react-dom";
1472
- import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
1597
+ import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
1473
1598
  function CommandPalette({ open, onOpenChange, items, onSelect, placeholder = "\u8F93\u5165\u547D\u4EE4\u6216\u641C\u7D22\u2026" }) {
1474
- const [query, setQuery] = useState15("");
1475
- const [active, setActive] = useState15(0);
1599
+ const [query, setQuery] = useState16("");
1600
+ const [active, setActive] = useState16(0);
1476
1601
  const enabled = useMemo4(() => items.filter((item) => !item.disabled && `${item.label} ${item.description ?? ""} ${item.group ?? ""}`.toLowerCase().includes(query.toLowerCase())), [items, query]);
1477
1602
  const dialogRef = useDismissibleLayer(open, () => onOpenChange(false), true);
1478
- useEffect6(() => {
1603
+ useEffect7(() => {
1479
1604
  if (!open) {
1480
1605
  setQuery("");
1481
1606
  setActive(0);
@@ -1499,39 +1624,39 @@ function CommandPalette({ open, onOpenChange, items, onSelect, placeholder = "\u
1499
1624
  }
1500
1625
  };
1501
1626
  if (!open) return null;
1502
- return createPortal3(/* @__PURE__ */ jsx32("div", { className: "hf-command-backdrop", onMouseDown: (event) => event.target === event.currentTarget && onOpenChange(false), children: /* @__PURE__ */ jsxs27("div", { ref: dialogRef, tabIndex: -1, className: "hf-command", role: "dialog", "aria-modal": "true", "aria-label": "\u547D\u4EE4\u9762\u677F", children: [
1503
- /* @__PURE__ */ jsxs27("div", { className: "hf-command__search", children: [
1504
- /* @__PURE__ */ jsx32("span", { "aria-hidden": "true", children: "\u2315" }),
1505
- /* @__PURE__ */ jsx32("input", { autoFocus: true, role: "combobox", "aria-expanded": "true", "aria-controls": "hf-command-list", value: query, placeholder, onChange: (event) => {
1627
+ return createPortal3(/* @__PURE__ */ jsx33("div", { className: "hf-command-backdrop", onMouseDown: (event) => event.target === event.currentTarget && onOpenChange(false), children: /* @__PURE__ */ jsxs28("div", { ref: dialogRef, tabIndex: -1, className: "hf-command", role: "dialog", "aria-modal": "true", "aria-label": "\u547D\u4EE4\u9762\u677F", children: [
1628
+ /* @__PURE__ */ jsxs28("div", { className: "hf-command__search", children: [
1629
+ /* @__PURE__ */ jsx33("span", { "aria-hidden": "true", children: "\u2315" }),
1630
+ /* @__PURE__ */ jsx33("input", { autoFocus: true, role: "combobox", "aria-expanded": "true", "aria-controls": "hf-command-list", value: query, placeholder, onChange: (event) => {
1506
1631
  setQuery(event.target.value);
1507
1632
  setActive(0);
1508
1633
  }, onKeyDown: keydown }),
1509
- /* @__PURE__ */ jsx32("kbd", { children: "Esc" })
1634
+ /* @__PURE__ */ jsx33("kbd", { children: "Esc" })
1510
1635
  ] }),
1511
- /* @__PURE__ */ jsxs27("div", { id: "hf-command-list", className: "hf-command__list", role: "listbox", children: [
1512
- enabled.map((item, index) => /* @__PURE__ */ jsxs27("button", { type: "button", role: "option", "aria-selected": index === active, onPointerMove: () => setActive(index), onClick: () => {
1636
+ /* @__PURE__ */ jsxs28("div", { id: "hf-command-list", className: "hf-command__list", role: "listbox", children: [
1637
+ enabled.map((item, index) => /* @__PURE__ */ jsxs28("button", { type: "button", role: "option", "aria-selected": index === active, onPointerMove: () => setActive(index), onClick: () => {
1513
1638
  onSelect(item.key);
1514
1639
  onOpenChange(false);
1515
1640
  }, children: [
1516
1641
  item.icon,
1517
- /* @__PURE__ */ jsxs27("span", { children: [
1518
- /* @__PURE__ */ jsx32("strong", { children: item.label }),
1519
- item.description && /* @__PURE__ */ jsx32("small", { children: item.description })
1642
+ /* @__PURE__ */ jsxs28("span", { children: [
1643
+ /* @__PURE__ */ jsx33("strong", { children: item.label }),
1644
+ item.description && /* @__PURE__ */ jsx33("small", { children: item.description })
1520
1645
  ] }),
1521
- item.shortcut && /* @__PURE__ */ jsx32("kbd", { children: item.shortcut })
1646
+ item.shortcut && /* @__PURE__ */ jsx33("kbd", { children: item.shortcut })
1522
1647
  ] }, item.key)),
1523
- !enabled.length && /* @__PURE__ */ jsx32("div", { className: "hf-command__empty", children: "\u6CA1\u6709\u5339\u914D\u547D\u4EE4" })
1648
+ !enabled.length && /* @__PURE__ */ jsx33("div", { className: "hf-command__empty", children: "\u6CA1\u6709\u5339\u914D\u547D\u4EE4" })
1524
1649
  ] })
1525
1650
  ] }) }), document.body);
1526
1651
  }
1527
1652
 
1528
1653
  // src/layout/Layout.tsx
1529
- import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
1654
+ import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
1530
1655
  function Container({ size = "lg", padding = 24, className = "", style, ...props }) {
1531
- return /* @__PURE__ */ jsx33("div", { className: `hf-container hf-container--${size} ${className}`.trim(), style: { "--hf-container-padding": `${padding}px`, ...style }, ...props });
1656
+ return /* @__PURE__ */ jsx34("div", { className: `hf-container hf-container--${size} ${className}`.trim(), style: { "--hf-container-padding": `${padding}px`, ...style }, ...props });
1532
1657
  }
1533
1658
  function Stack({ direction = "column", gap = 12, align, justify, wrap = false, className = "", style, ...props }) {
1534
- return /* @__PURE__ */ jsx33("div", { className: `hf-stack hf-stack--${direction} ${className}`.trim(), style: { "--hf-stack-gap": `${gap}px`, alignItems: align, justifyContent: justify, flexWrap: wrap ? "wrap" : void 0, ...style }, ...props });
1659
+ return /* @__PURE__ */ jsx34("div", { className: `hf-stack hf-stack--${direction} ${className}`.trim(), style: { "--hf-stack-gap": `${gap}px`, alignItems: align, justifyContent: justify, flexWrap: wrap ? "wrap" : void 0, ...style }, ...props });
1535
1660
  }
1536
1661
  function Grid({ columns = "auto", minItemWidth = 240, gap = 16, className = "", style, ...props }) {
1537
1662
  const gridStyle = {
@@ -1539,7 +1664,7 @@ function Grid({ columns = "auto", minItemWidth = 240, gap = 16, className = "",
1539
1664
  "--hf-grid-gap": `${gap}px`,
1540
1665
  ...style
1541
1666
  };
1542
- return /* @__PURE__ */ jsx33("div", { className: `hf-grid ${className}`.trim(), style: gridStyle, ...props });
1667
+ return /* @__PURE__ */ jsx34("div", { className: `hf-grid ${className}`.trim(), style: gridStyle, ...props });
1543
1668
  }
1544
1669
  function Masonry({ columns, minColumnWidth = 260, gap = 16, className = "", style, children, ...props }) {
1545
1670
  const masonryStyle = {
@@ -1548,154 +1673,66 @@ function Masonry({ columns, minColumnWidth = 260, gap = 16, className = "", styl
1548
1673
  "--hf-masonry-gap": `${gap}px`,
1549
1674
  ...style
1550
1675
  };
1551
- return /* @__PURE__ */ jsx33("div", { className: `hf-masonry ${className}`.trim(), style: masonryStyle, ...props, children });
1676
+ return /* @__PURE__ */ jsx34("div", { className: `hf-masonry ${className}`.trim(), style: masonryStyle, ...props, children });
1552
1677
  }
1553
1678
  function PageLayout({ variant = "single", sidebar, header, sidebarWidth = 280, className = "", style, children, ...props }) {
1554
1679
  const layoutStyle = { "--hf-layout-sidebar": `${sidebarWidth}px`, ...style };
1555
- return /* @__PURE__ */ jsxs28("div", { className: `hf-page-layout hf-page-layout--${variant} ${className}`.trim(), style: layoutStyle, ...props, children: [
1556
- header && /* @__PURE__ */ jsx33("header", { className: "hf-page-layout__header", children: header }),
1557
- sidebar && /* @__PURE__ */ jsx33("aside", { className: "hf-page-layout__sidebar", children: sidebar }),
1558
- /* @__PURE__ */ jsx33("main", { className: "hf-page-layout__main", children })
1680
+ return /* @__PURE__ */ jsxs29("div", { className: `hf-page-layout hf-page-layout--${variant} ${className}`.trim(), style: layoutStyle, ...props, children: [
1681
+ header && /* @__PURE__ */ jsx34("header", { className: "hf-page-layout__header", children: header }),
1682
+ sidebar && /* @__PURE__ */ jsx34("aside", { className: "hf-page-layout__sidebar", children: sidebar }),
1683
+ /* @__PURE__ */ jsx34("main", { className: "hf-page-layout__main", children })
1559
1684
  ] });
1560
1685
  }
1561
1686
 
1562
1687
  // src/layout/Skeleton.tsx
1563
- import { jsx as jsx34 } from "react/jsx-runtime";
1688
+ import { jsx as jsx35 } from "react/jsx-runtime";
1564
1689
  function Skeleton({ width = "100%", height = 16, radius, circle, animated = true, className = "", style, ...props }) {
1565
1690
  const value = (input) => typeof input === "number" ? `${input}px` : input;
1566
- return /* @__PURE__ */ jsx34("span", { "aria-hidden": "true", className: `hf-skeleton ${animated ? "is-animated" : ""} ${circle ? "is-circle" : ""} ${className}`.trim(), style: { width: value(width), height: value(height), borderRadius: radius ? value(radius) : void 0, ...style }, ...props });
1691
+ return /* @__PURE__ */ jsx35("span", { "aria-hidden": "true", className: `hf-skeleton ${animated ? "is-animated" : ""} ${circle ? "is-circle" : ""} ${className}`.trim(), style: { width: value(width), height: value(height), borderRadius: radius ? value(radius) : void 0, ...style }, ...props });
1567
1692
  }
1568
1693
 
1569
1694
  // src/feedback/Loading.tsx
1570
- import { jsx as jsx35, jsxs as jsxs29 } from "react/jsx-runtime";
1695
+ import { jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
1571
1696
  function Spinner({ label = "\u6B63\u5728\u52A0\u8F7D", size = 20, className = "" }) {
1572
- return /* @__PURE__ */ jsx35("span", { className: `hf-loading-spinner ${className}`.trim(), role: "status", "aria-label": label, style: { "--hf-loading-size": `${size}px` } });
1697
+ return /* @__PURE__ */ jsx36("span", { className: `hf-loading-spinner ${className}`.trim(), role: "status", "aria-label": label, style: { "--hf-loading-size": `${size}px` } });
1573
1698
  }
1574
1699
  function LoadingDots({ label = "\u6B63\u5728\u52A0\u8F7D" }) {
1575
- return /* @__PURE__ */ jsxs29("span", { className: "hf-loading-dots", role: "status", "aria-label": label, children: [
1576
- /* @__PURE__ */ jsx35("i", {}),
1577
- /* @__PURE__ */ jsx35("i", {}),
1578
- /* @__PURE__ */ jsx35("i", {})
1700
+ return /* @__PURE__ */ jsxs30("span", { className: "hf-loading-dots", role: "status", "aria-label": label, children: [
1701
+ /* @__PURE__ */ jsx36("i", {}),
1702
+ /* @__PURE__ */ jsx36("i", {}),
1703
+ /* @__PURE__ */ jsx36("i", {})
1579
1704
  ] });
1580
1705
  }
1581
1706
  function ProgressBar({ value, label, indeterminate = false, className = "" }) {
1582
1707
  const percent = Math.min(100, Math.max(0, value ?? 0));
1583
- return /* @__PURE__ */ jsxs29("div", { className: `hf-progress ${indeterminate ? "is-indeterminate" : ""} ${className}`.trim(), children: [
1584
- label && /* @__PURE__ */ jsxs29("div", { className: "hf-progress__label", children: [
1585
- /* @__PURE__ */ jsx35("span", { children: label }),
1586
- !indeterminate && /* @__PURE__ */ jsxs29("strong", { children: [
1708
+ return /* @__PURE__ */ jsxs30("div", { className: `hf-progress ${indeterminate ? "is-indeterminate" : ""} ${className}`.trim(), children: [
1709
+ label && /* @__PURE__ */ jsxs30("div", { className: "hf-progress__label", children: [
1710
+ /* @__PURE__ */ jsx36("span", { children: label }),
1711
+ !indeterminate && /* @__PURE__ */ jsxs30("strong", { children: [
1587
1712
  percent,
1588
1713
  "%"
1589
1714
  ] })
1590
1715
  ] }),
1591
- /* @__PURE__ */ jsx35("div", { className: "hf-progress__track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": indeterminate ? void 0 : percent, children: /* @__PURE__ */ jsx35("i", { style: { "--hf-progress": `${percent}%` } }) })
1716
+ /* @__PURE__ */ jsx36("div", { className: "hf-progress__track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": indeterminate ? void 0 : percent, children: /* @__PURE__ */ jsx36("i", { style: { "--hf-progress": `${percent}%` } }) })
1592
1717
  ] });
1593
1718
  }
1594
1719
  function ProgressRing({ value, size = 72, label }) {
1595
1720
  const percent = Math.min(100, Math.max(0, value));
1596
- return /* @__PURE__ */ jsx35("span", { className: "hf-progress-ring", role: "progressbar", "aria-label": label, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": percent, style: { "--hf-ring-value": `${percent * 3.6}deg`, "--hf-ring-size": `${size}px` }, children: /* @__PURE__ */ jsxs29("strong", { children: [
1721
+ return /* @__PURE__ */ jsx36("span", { className: "hf-progress-ring", role: "progressbar", "aria-label": label, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": percent, style: { "--hf-ring-value": `${percent * 3.6}deg`, "--hf-ring-size": `${size}px` }, children: /* @__PURE__ */ jsxs30("strong", { children: [
1597
1722
  percent,
1598
1723
  "%"
1599
1724
  ] }) });
1600
1725
  }
1601
1726
  function LoadingOverlay({ active = true, label = "\u6B63\u5728\u51C6\u5907\u5185\u5BB9", className = "", children, ...props }) {
1602
- return /* @__PURE__ */ jsxs29("div", { className: `hf-loading-overlay ${className}`.trim(), "aria-busy": active, ...props, children: [
1727
+ return /* @__PURE__ */ jsxs30("div", { className: `hf-loading-overlay ${className}`.trim(), "aria-busy": active, ...props, children: [
1603
1728
  children,
1604
- active && /* @__PURE__ */ jsxs29("div", { className: "hf-loading-overlay__veil", role: "status", children: [
1605
- /* @__PURE__ */ jsx35(Spinner, { label, size: 28 }),
1606
- /* @__PURE__ */ jsx35("span", { children: label })
1729
+ active && /* @__PURE__ */ jsxs30("div", { className: "hf-loading-overlay__veil", role: "status", children: [
1730
+ /* @__PURE__ */ jsx36(Spinner, { label, size: 28 }),
1731
+ /* @__PURE__ */ jsx36("span", { children: label })
1607
1732
  ] })
1608
1733
  ] });
1609
1734
  }
1610
1735
 
1611
- // src/forms/Select.tsx
1612
- import { forwardRef as forwardRef5, useEffect as useEffect7, useId as useId6, useRef as useRef4, useState as useState16 } from "react";
1613
- import { jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
1614
- var Select = forwardRef5(function Select2({ id, label, hint, error, options, placeholder, className = "", value, defaultValue, onChange, disabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }, forwardedRef) {
1615
- const generatedId = useId6();
1616
- const inputId = id ?? generatedId;
1617
- const triggerId = `${inputId}-trigger`;
1618
- const listboxId = `${inputId}-listbox`;
1619
- const descriptionId = `${inputId}-description`;
1620
- const [open, setOpen] = useState16(false);
1621
- const rootRef = useDismissibleLayer(open, () => setOpen(false), { autoFocus: false });
1622
- const nativeRef = useRef4(null);
1623
- const [innerValue, setInnerValue] = useState16(() => String(defaultValue ?? (placeholder ? "" : options.find((option) => !option.disabled)?.value ?? "")));
1624
- const selectedValue = value === void 0 ? innerValue : String(value);
1625
- const selectedOption = options.find((option) => option.value === selectedValue);
1626
- const enabledIndices = options.map((option, index) => option.disabled ? -1 : index).filter((index) => index >= 0);
1627
- const selectedIndex = options.findIndex((option) => option.value === selectedValue);
1628
- const [activeIndex, setActiveIndex] = useState16(selectedIndex >= 0 ? selectedIndex : enabledIndices[0] ?? -1);
1629
- const assignRef = (node) => {
1630
- nativeRef.current = node;
1631
- if (typeof forwardedRef === "function") forwardedRef(node);
1632
- else if (forwardedRef) forwardedRef.current = node;
1633
- };
1634
- const handleNativeChange = (event) => {
1635
- if (value === void 0) setInnerValue(event.currentTarget.value);
1636
- onChange?.(event);
1637
- };
1638
- const choose = (nextValue) => {
1639
- const native = nativeRef.current;
1640
- if (!native) return;
1641
- Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "value")?.set?.call(native, nextValue);
1642
- native.dispatchEvent(new Event("change", { bubbles: true }));
1643
- if (value === void 0) setInnerValue(nextValue);
1644
- setOpen(false);
1645
- window.requestAnimationFrame(() => document.getElementById(triggerId)?.focus());
1646
- };
1647
- useEffect7(() => {
1648
- if (selectedIndex >= 0) setActiveIndex(selectedIndex);
1649
- }, [selectedIndex]);
1650
- const move = (direction) => {
1651
- if (!enabledIndices.length) return;
1652
- const current = enabledIndices.indexOf(activeIndex);
1653
- const next = current < 0 ? 0 : (current + direction + enabledIndices.length) % enabledIndices.length;
1654
- setActiveIndex(enabledIndices[next]);
1655
- };
1656
- const handleKeyDown = (event) => {
1657
- if (event.key === "ArrowDown" || event.key === "ArrowUp") {
1658
- event.preventDefault();
1659
- if (!open) setOpen(true);
1660
- move(event.key === "ArrowDown" ? 1 : -1);
1661
- } else if ((event.key === "Enter" || event.key === " ") && open) {
1662
- event.preventDefault();
1663
- const option = options[activeIndex];
1664
- if (option && !option.disabled) choose(option.value);
1665
- } else if (event.key === "Escape" && open) {
1666
- event.preventDefault();
1667
- setOpen(false);
1668
- } else if (event.key === "Home" && open && enabledIndices.length) {
1669
- event.preventDefault();
1670
- setActiveIndex(enabledIndices[0]);
1671
- } else if (event.key === "End" && open && enabledIndices.length) {
1672
- event.preventDefault();
1673
- setActiveIndex(enabledIndices[enabledIndices.length - 1]);
1674
- } else if (event.key === "Tab") setOpen(false);
1675
- };
1676
- return /* @__PURE__ */ jsxs30("div", { className: `hf-field ${className}`.trim(), ref: rootRef, children: [
1677
- label && /* @__PURE__ */ jsx36("label", { className: "hf-field__label", htmlFor: triggerId, children: label }),
1678
- /* @__PURE__ */ jsxs30("div", { className: `hf-select-shell ${open ? "hf-select-shell--open" : ""} ${error ? "hf-select-shell--error" : ""}`, children: [
1679
- /* @__PURE__ */ jsxs30("select", { ref: assignRef, id: inputId, className: "hf-select-native", tabIndex: -1, "aria-hidden": "true", value: selectedValue, disabled, onChange: handleNativeChange, ...props, children: [
1680
- placeholder && /* @__PURE__ */ jsx36("option", { value: "", disabled: true, children: placeholder }),
1681
- options.map((option) => /* @__PURE__ */ jsx36("option", { value: option.value, disabled: option.disabled, children: typeof option.label === "string" ? option.label : option.value }, option.value))
1682
- ] }),
1683
- /* @__PURE__ */ jsxs30("button", { id: triggerId, type: "button", className: "hf-select", disabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-haspopup": "listbox", "aria-expanded": open, "aria-controls": open ? listboxId : void 0, "aria-activedescendant": open && activeIndex >= 0 ? `${listboxId}-option-${activeIndex}` : void 0, "aria-invalid": Boolean(error), "aria-describedby": hint || error ? descriptionId : void 0, onClick: () => {
1684
- setActiveIndex(selectedIndex >= 0 ? selectedIndex : enabledIndices[0] ?? -1);
1685
- setOpen((current) => !current);
1686
- }, onKeyDown: handleKeyDown, children: [
1687
- /* @__PURE__ */ jsx36("span", { className: !selectedOption ? "hf-select__placeholder" : "", children: selectedOption?.label ?? placeholder ?? "\u8BF7\u9009\u62E9" }),
1688
- /* @__PURE__ */ jsx36("svg", { className: "hf-select__chevron", viewBox: "0 0 16 16", width: "16", height: "16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx36("path", { d: open ? "m4.5 9.75 3.5-3.5 3.5 3.5" : "m4.5 6.25 3.5 3.5 3.5-3.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
1689
- ] }),
1690
- open && /* @__PURE__ */ jsx36("div", { id: listboxId, className: "hf-select-menu", role: "listbox", "aria-labelledby": triggerId, children: options.map((option, index) => /* @__PURE__ */ jsxs30("button", { id: `${listboxId}-option-${index}`, type: "button", role: "option", "aria-selected": option.value === selectedValue, disabled: option.disabled, className: index === activeIndex ? "is-active" : "", onPointerMove: () => !option.disabled && setActiveIndex(index), onClick: () => choose(option.value), children: [
1691
- /* @__PURE__ */ jsx36("span", { children: option.label }),
1692
- option.value === selectedValue && /* @__PURE__ */ jsx36("svg", { viewBox: "0 0 16 16", width: "16", height: "16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx36("path", { d: "m3.5 8 3 3 6-6", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round" }) })
1693
- ] }, option.value)) })
1694
- ] }),
1695
- (error || hint) && /* @__PURE__ */ jsx36("span", { id: descriptionId, className: `hf-field__hint ${error ? "hf-field__hint--error" : ""}`, children: error ?? hint })
1696
- ] });
1697
- });
1698
-
1699
1736
  // src/forms/MultiSelect.tsx
1700
1737
  import { useId as useId7, useState as useState17 } from "react";
1701
1738
  import { jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
@@ -1723,7 +1760,7 @@ function MultiSelect({ label, options, value, onChange, placeholder = "\u8BF7\u9
1723
1760
  /* @__PURE__ */ jsx37("button", { type: "button", "aria-label": `\u79FB\u9664 ${String(option?.label)}`, onClick: (event) => {
1724
1761
  event.stopPropagation();
1725
1762
  toggle(item);
1726
- }, children: "\xD7" })
1763
+ }, children: /* @__PURE__ */ jsx37(Icon, { name: "close", size: 13 }) })
1727
1764
  ] }, item);
1728
1765
  }) : /* @__PURE__ */ jsx37("em", { children: placeholder }) }),
1729
1766
  /* @__PURE__ */ jsx37(Icon, { name: "chevron-down", size: 16, className: "hf-multiselect__chevron" })
@@ -2241,7 +2278,7 @@ function Combobox({ label, options, value = "", onChange, placeholder = "\u641C\
2241
2278
  setActive(0);
2242
2279
  setOpen(true);
2243
2280
  }, onKeyDown }),
2244
- /* @__PURE__ */ jsx45("button", { type: "button", "aria-label": open ? "\u5173\u95ED\u9009\u9879" : "\u6253\u5F00\u9009\u9879", disabled, onClick: () => setOpen((current) => !current), children: "\u2304" })
2281
+ /* @__PURE__ */ jsx45("button", { type: "button", "aria-label": open ? "\u5173\u95ED\u9009\u9879" : "\u6253\u5F00\u9009\u9879", disabled, onClick: () => setOpen((current) => !current), children: /* @__PURE__ */ jsx45(Icon, { name: "chevron-down", size: 16 }) })
2245
2282
  ] }),
2246
2283
  open && /* @__PURE__ */ jsx45("div", { id: `${id}-listbox`, className: "hf-combobox__menu", role: "listbox", children: filtered.length ? filtered.map((option, index) => /* @__PURE__ */ jsxs38("button", { type: "button", role: "option", "aria-selected": option.value === value, disabled: option.disabled, className: index === active ? "is-active" : "", onPointerMove: () => setActive(index), onClick: () => choose(option.value), children: [
2247
2284
  /* @__PURE__ */ jsx45("span", { children: option.label }),
@@ -2289,10 +2326,7 @@ function Cascader({ options, value = [], onChange, label }) {
2289
2326
  }
2290
2327
  return /* @__PURE__ */ jsxs40("div", { className: "hf-field hf-cascader", children: [
2291
2328
  label && /* @__PURE__ */ jsx47("span", { className: "hf-field__label", children: label }),
2292
- /* @__PURE__ */ jsx47("div", { children: levels.map((items, level) => /* @__PURE__ */ jsxs40("select", { "aria-label": `\u7B2C ${level + 1} \u7EA7`, value: value[level] ?? "", onChange: (event) => onChange([...value.slice(0, level), event.target.value]), children: [
2293
- /* @__PURE__ */ jsx47("option", { value: "", children: "\u8BF7\u9009\u62E9" }),
2294
- items.map((item) => /* @__PURE__ */ jsx47("option", { disabled: item.disabled, value: item.value, children: item.label }, item.value))
2295
- ] }, level)) })
2329
+ /* @__PURE__ */ jsx47("div", { children: levels.map((items, level) => /* @__PURE__ */ jsx47(Select, { "aria-label": `\u7B2C ${level + 1} \u7EA7`, className: "hf-cascader__level", value: value[level] ?? "", placeholder: "\u8BF7\u9009\u62E9", options: items.map((item) => ({ label: item.label, value: item.value, disabled: item.disabled })), onChange: (event) => onChange([...value.slice(0, level), event.target.value]) }, level)) })
2296
2330
  ] });
2297
2331
  }
2298
2332
  function TreeSelect({ options, value, onChange, label, placeholder = "\u9009\u62E9\u8282\u70B9" }) {
@@ -2302,8 +2336,8 @@ function TreeSelect({ options, value, onChange, label, placeholder = "\u9009\u62
2302
2336
  return /* @__PURE__ */ jsxs40("div", { className: "hf-field hf-tree-select", children: [
2303
2337
  label && /* @__PURE__ */ jsx47("span", { className: "hf-field__label", children: label }),
2304
2338
  /* @__PURE__ */ jsxs40("button", { type: "button", className: "hf-picker-trigger", "aria-expanded": open, onClick: () => setOpen(!open), children: [
2305
- all.find((item) => item.node.key === value)?.node.label ?? placeholder,
2306
- /* @__PURE__ */ jsx47("span", { children: "\u2304" })
2339
+ /* @__PURE__ */ jsx47("span", { children: all.find((item) => item.node.key === value)?.node.label ?? placeholder }),
2340
+ /* @__PURE__ */ jsx47(Icon, { className: "hf-picker-trigger__chevron", name: "chevron-down", size: 16 })
2307
2341
  ] }),
2308
2342
  open && /* @__PURE__ */ jsx47("div", { role: "listbox", children: all.map(({ node, depth }) => /* @__PURE__ */ jsx47("button", { type: "button", role: "option", "aria-selected": node.key === value, disabled: node.disabled, style: { paddingLeft: 12 + depth * 18 }, onClick: () => {
2309
2343
  onChange(node.key);
@@ -2356,7 +2390,7 @@ function SearchInput({ onSearch, loading, clearable = true, ...props }) {
2356
2390
  setValue(event.target.value);
2357
2391
  props.onChange?.(event);
2358
2392
  } }),
2359
- clearable && value && /* @__PURE__ */ jsx47("button", { type: "button", "aria-label": "\u6E05\u9664\u641C\u7D22", onClick: () => setValue(""), children: "\xD7" }),
2393
+ clearable && value && /* @__PURE__ */ jsx47("button", { type: "button", "aria-label": "\u6E05\u9664\u641C\u7D22", onClick: () => setValue(""), children: /* @__PURE__ */ jsx47(Icon, { name: "close", size: 14 }) }),
2360
2394
  /* @__PURE__ */ jsx47("button", { type: "submit", disabled: loading, children: loading ? "\u641C\u7D22\u4E2D" : "\u641C\u7D22" })
2361
2395
  ] });
2362
2396
  }
@@ -2372,7 +2406,7 @@ function Drawer({ open, title, children, onClose, footer, side = "right", size =
2372
2406
  return createPortal4(/* @__PURE__ */ jsx48("div", { className: "hf-drawer-backdrop", onMouseDown: (event) => event.target === event.currentTarget && onClose(), children: /* @__PURE__ */ jsxs41("div", { ref: drawerRef, className: `hf-drawer hf-drawer--${side} hf-drawer--${size}`, role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, children: [
2373
2407
  /* @__PURE__ */ jsxs41("header", { children: [
2374
2408
  /* @__PURE__ */ jsx48("h2", { id: titleId, children: title }),
2375
- /* @__PURE__ */ jsx48(Button, { variant: "quiet", size: "sm", onClick: onClose, "aria-label": "\u5173\u95ED\u62BD\u5C49", children: "\xD7" })
2409
+ /* @__PURE__ */ jsx48(Button, { variant: "quiet", size: "sm", iconOnly: true, leadingIcon: /* @__PURE__ */ jsx48(Icon, { name: "close", size: 16 }), onClick: onClose, "aria-label": "\u5173\u95ED\u62BD\u5C49" })
2376
2410
  ] }),
2377
2411
  /* @__PURE__ */ jsx48("div", { className: "hf-drawer__body", children }),
2378
2412
  footer && /* @__PURE__ */ jsx48("footer", { children: footer })
@@ -2457,7 +2491,7 @@ function Notification({ title, children, tone = "info", time, unread, action, on
2457
2491
  children && /* @__PURE__ */ jsx51("p", { children }),
2458
2492
  action && /* @__PURE__ */ jsx51("div", { className: "hf-notification__action", children: action })
2459
2493
  ] }),
2460
- onClose && /* @__PURE__ */ jsx51("button", { type: "button", "aria-label": "\u5173\u95ED\u901A\u77E5", onClick: onClose, children: "\xD7" })
2494
+ onClose && /* @__PURE__ */ jsx51("button", { type: "button", "aria-label": "\u5173\u95ED\u901A\u77E5", onClick: onClose, children: /* @__PURE__ */ jsx51(Icon, { name: "close", size: 15 }) })
2461
2495
  ] });
2462
2496
  }
2463
2497
  function Result({ status = "info", title, description, actions, extra }) {
@@ -2872,23 +2906,20 @@ function QueryBuilder({ fields, rules, onChange, conjunction = "and", onConjunct
2872
2906
  return /* @__PURE__ */ jsxs56("div", { className: "hf-query-builder", children: [
2873
2907
  /* @__PURE__ */ jsxs56("header", { children: [
2874
2908
  /* @__PURE__ */ jsx64("strong", { children: "\u6EE1\u8DB3" }),
2875
- /* @__PURE__ */ jsxs56("select", { "aria-label": "\u6761\u4EF6\u5173\u7CFB", value: conjunction, disabled, onChange: (event) => onConjunctionChange?.(event.target.value), children: [
2876
- /* @__PURE__ */ jsx64("option", { value: "and", children: "\u5168\u90E8\u6761\u4EF6" }),
2877
- /* @__PURE__ */ jsx64("option", { value: "or", children: "\u4EFB\u4E00\u6761\u4EF6" })
2878
- ] })
2909
+ /* @__PURE__ */ jsx64(Select, { className: "hf-query-builder__select", "aria-label": "\u6761\u4EF6\u5173\u7CFB", value: conjunction, disabled, options: [{ value: "and", label: "\u5168\u90E8\u6761\u4EF6" }, { value: "or", label: "\u4EFB\u4E00\u6761\u4EF6" }], onChange: (event) => onConjunctionChange?.(event.target.value) })
2879
2910
  ] }),
2880
2911
  /* @__PURE__ */ jsx64("div", { children: rules.map((rule, index) => {
2881
2912
  const field = fields.find((item) => item.key === rule.field) ?? fields[0];
2882
2913
  const operators = field?.operators ?? defaultOperators;
2883
2914
  return /* @__PURE__ */ jsxs56("div", { className: "hf-query-builder__rule", children: [
2884
2915
  /* @__PURE__ */ jsx64("span", { children: index + 1 }),
2885
- /* @__PURE__ */ jsx64("select", { "aria-label": `\u6761\u4EF6 ${index + 1} \u5B57\u6BB5`, value: rule.field, disabled, onChange: (event) => {
2916
+ /* @__PURE__ */ jsx64(Select, { className: "hf-query-builder__select", "aria-label": `\u6761\u4EF6 ${index + 1} \u5B57\u6BB5`, value: rule.field, disabled, options: fields.map((item) => ({ value: item.key, label: item.label })), onChange: (event) => {
2886
2917
  const next = fields.find((item) => item.key === event.target.value);
2887
2918
  update(rule.id, { field: next.key, operator: (next.operators ?? defaultOperators)[0]?.value ?? "equals", value: "" });
2888
- }, children: fields.map((item) => /* @__PURE__ */ jsx64("option", { value: item.key, children: item.label }, item.key)) }),
2889
- /* @__PURE__ */ jsx64("select", { "aria-label": `\u6761\u4EF6 ${index + 1} \u8FD0\u7B97\u7B26`, value: rule.operator, disabled, onChange: (event) => update(rule.id, { operator: event.target.value }), children: operators.map((item) => /* @__PURE__ */ jsx64("option", { value: item.value, children: item.label }, item.value)) }),
2919
+ } }),
2920
+ /* @__PURE__ */ jsx64(Select, { className: "hf-query-builder__select", "aria-label": `\u6761\u4EF6 ${index + 1} \u8FD0\u7B97\u7B26`, value: rule.operator, disabled, options: operators, onChange: (event) => update(rule.id, { operator: event.target.value }) }),
2890
2921
  /* @__PURE__ */ jsx64("input", { "aria-label": `\u6761\u4EF6 ${index + 1} \u503C`, type: field?.type ?? "text", value: rule.value, disabled, onChange: (event) => update(rule.id, { value: event.target.value }) }),
2891
- /* @__PURE__ */ jsx64("button", { type: "button", "aria-label": `\u5220\u9664\u6761\u4EF6 ${index + 1}`, disabled, onClick: () => onChange(rules.filter((item) => item.id !== rule.id)), children: "\xD7" })
2922
+ /* @__PURE__ */ jsx64("button", { type: "button", "aria-label": `\u5220\u9664\u6761\u4EF6 ${index + 1}`, disabled, onClick: () => onChange(rules.filter((item) => item.id !== rule.id)), children: /* @__PURE__ */ jsx64(Icon, { name: "close", size: 15 }) })
2892
2923
  ] }, rule.id);
2893
2924
  }) }),
2894
2925
  /* @__PURE__ */ jsx64("button", { type: "button", className: "hf-query-builder__add", disabled: disabled || !fields.length, onClick: add, children: "\uFF0B \u6DFB\u52A0\u6761\u4EF6" })
@@ -3036,12 +3067,9 @@ function FilterBuilder({ fields, value, onChange, disabled, addLabel = "\u6DFB\u
3036
3067
  /* @__PURE__ */ jsx66("div", { children: value.map((filter, index) => {
3037
3068
  const field = fields.find((item) => item.key === filter.field) ?? fields[0];
3038
3069
  return /* @__PURE__ */ jsxs58("div", { className: "hf-filter-builder__item", children: [
3039
- /* @__PURE__ */ jsx66("select", { "aria-label": `\u7B5B\u9009 ${index + 1} \u5B57\u6BB5`, value: filter.field, disabled, onChange: (event) => update(filter.id, { field: event.target.value, value: "" }), children: fields.map((item) => /* @__PURE__ */ jsx66("option", { value: item.key, children: item.label }, item.key)) }),
3040
- field?.options ? /* @__PURE__ */ jsxs58("select", { "aria-label": `\u7B5B\u9009 ${index + 1} \u503C`, value: filter.value, disabled, onChange: (event) => update(filter.id, { value: event.target.value }), children: [
3041
- /* @__PURE__ */ jsx66("option", { value: "", children: "\u8BF7\u9009\u62E9" }),
3042
- field.options.map((item) => /* @__PURE__ */ jsx66("option", { value: item.value, children: item.label }, item.value))
3043
- ] }) : /* @__PURE__ */ jsx66("input", { "aria-label": `\u7B5B\u9009 ${index + 1} \u503C`, type: field?.type ?? "text", value: filter.value, disabled, onChange: (event) => update(filter.id, { value: event.target.value }) }),
3044
- /* @__PURE__ */ jsx66("button", { type: "button", "aria-label": `\u5220\u9664\u7B5B\u9009 ${index + 1}`, disabled, onClick: () => onChange(value.filter((item) => item.id !== filter.id)), children: "\xD7" })
3070
+ /* @__PURE__ */ jsx66(Select, { className: "hf-filter-builder__select", "aria-label": `\u7B5B\u9009 ${index + 1} \u5B57\u6BB5`, value: filter.field, disabled, options: fields.map((item) => ({ value: item.key, label: item.label })), onChange: (event) => update(filter.id, { field: event.target.value, value: "" }) }),
3071
+ field?.options ? /* @__PURE__ */ jsx66(Select, { className: "hf-filter-builder__select", "aria-label": `\u7B5B\u9009 ${index + 1} \u503C`, value: filter.value, placeholder: "\u8BF7\u9009\u62E9", disabled, options: field.options, onChange: (event) => update(filter.id, { value: event.target.value }) }) : /* @__PURE__ */ jsx66("input", { "aria-label": `\u7B5B\u9009 ${index + 1} \u503C`, type: field?.type ?? "text", value: filter.value, disabled, onChange: (event) => update(filter.id, { value: event.target.value }) }),
3072
+ /* @__PURE__ */ jsx66("button", { type: "button", "aria-label": `\u5220\u9664\u7B5B\u9009 ${index + 1}`, disabled, onClick: () => onChange(value.filter((item) => item.id !== filter.id)), children: /* @__PURE__ */ jsx66(Icon, { name: "close", size: 15 }) })
3045
3073
  ] }, filter.id);
3046
3074
  }) }),
3047
3075
  /* @__PURE__ */ jsxs58("button", { type: "button", className: "hf-filter-builder__add", disabled: disabled || !fields.length, onClick: add, children: [