@indxsearch/systm 2.12.1 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +5 -0
- package/dist/components/Disclosure/Disclosure.d.ts +21 -0
- package/dist/components/NavigationMenu/NavigationMenu.d.ts +7 -0
- package/dist/components/SaveBar/SaveBar.d.ts +18 -0
- package/dist/components/Table/Table.d.ts +21 -1
- package/dist/components/Table/TableCell.d.ts +3 -1
- package/dist/components/Tabs/Tabs.d.ts +36 -2
- package/dist/components/Truncate/Truncate.d.ts +18 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +365 -202
- package/dist/systm.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -849,27 +849,38 @@ var ue = {
|
|
|
849
849
|
children: t
|
|
850
850
|
}) })]
|
|
851
851
|
}), V = {
|
|
852
|
-
table: "
|
|
853
|
-
caption: "
|
|
854
|
-
headerRow: "
|
|
855
|
-
dataRow: "
|
|
856
|
-
cellInner: "
|
|
857
|
-
cellLabel: "
|
|
858
|
-
cellContent: "
|
|
859
|
-
value: "
|
|
860
|
-
icon: "
|
|
852
|
+
table: "_table_j6zqj_1",
|
|
853
|
+
caption: "_caption_j6zqj_8",
|
|
854
|
+
headerRow: "_headerRow_j6zqj_25",
|
|
855
|
+
dataRow: "_dataRow_j6zqj_33",
|
|
856
|
+
cellInner: "_cellInner_j6zqj_41",
|
|
857
|
+
cellLabel: "_cellLabel_j6zqj_47",
|
|
858
|
+
cellContent: "_cellContent_j6zqj_52",
|
|
859
|
+
value: "_value_j6zqj_58",
|
|
860
|
+
icon: "_icon_j6zqj_64",
|
|
861
|
+
scroll: "_scroll_j6zqj_74",
|
|
862
|
+
bleedEnd: "_bleedEnd_j6zqj_87",
|
|
863
|
+
stickyFirst: "_stickyFirst_j6zqj_110"
|
|
861
864
|
};
|
|
862
865
|
//#endregion
|
|
863
866
|
//#region src/components/Table/Table.tsx
|
|
864
|
-
function ve({ children: e, caption: t, "aria-label": n }) {
|
|
865
|
-
|
|
866
|
-
className: V.table
|
|
867
|
+
function ve({ children: e, caption: t, "aria-label": n, scrollable: r = !1, stickyFirstColumn: i = !1, bleedEnd: a }) {
|
|
868
|
+
let o = /* @__PURE__ */ d("table", {
|
|
869
|
+
className: `${V.table} ${r && i ? V.stickyFirst : ""}`,
|
|
867
870
|
"aria-label": n,
|
|
868
871
|
children: [t && /* @__PURE__ */ u("caption", {
|
|
869
872
|
className: V.caption,
|
|
870
873
|
children: t
|
|
871
874
|
}), e]
|
|
872
875
|
});
|
|
876
|
+
return r ? /* @__PURE__ */ u("div", {
|
|
877
|
+
className: `${V.scroll} ${a === void 0 ? "" : V.bleedEnd}`,
|
|
878
|
+
style: a === void 0 ? void 0 : { "--table-bleed": typeof a == "number" ? `${a}px` : a },
|
|
879
|
+
role: "region",
|
|
880
|
+
"aria-label": n ?? t,
|
|
881
|
+
tabIndex: 0,
|
|
882
|
+
children: o
|
|
883
|
+
}) : o;
|
|
873
884
|
}
|
|
874
885
|
//#endregion
|
|
875
886
|
//#region src/components/Table/TableHeader.tsx
|
|
@@ -893,10 +904,13 @@ function be({ children: e }) {
|
|
|
893
904
|
}
|
|
894
905
|
//#endregion
|
|
895
906
|
//#region src/components/Table/TableCell.tsx
|
|
896
|
-
function xe({ label: e, children: t, isHeader: n = !1, scope: r }) {
|
|
897
|
-
let
|
|
898
|
-
|
|
899
|
-
...
|
|
907
|
+
function xe({ label: e, children: t, isHeader: n = !1, scope: r, colSpan: i }) {
|
|
908
|
+
let a = n ? "th" : "td", o = {
|
|
909
|
+
...n && r ? { scope: r } : {},
|
|
910
|
+
...i ? { colSpan: i } : {}
|
|
911
|
+
};
|
|
912
|
+
return e || t ? /* @__PURE__ */ u(a, {
|
|
913
|
+
...o,
|
|
900
914
|
children: /* @__PURE__ */ d("div", {
|
|
901
915
|
className: V.cellInner,
|
|
902
916
|
children: [e && /* @__PURE__ */ u("span", {
|
|
@@ -907,8 +921,8 @@ function xe({ label: e, children: t, isHeader: n = !1, scope: r }) {
|
|
|
907
921
|
children: t
|
|
908
922
|
})]
|
|
909
923
|
})
|
|
910
|
-
}) : /* @__PURE__ */ u(
|
|
911
|
-
...
|
|
924
|
+
}) : /* @__PURE__ */ u(a, {
|
|
925
|
+
...o,
|
|
912
926
|
children: t
|
|
913
927
|
});
|
|
914
928
|
}
|
|
@@ -935,168 +949,219 @@ function Ce({ children: t, "aria-label": n }) {
|
|
|
935
949
|
});
|
|
936
950
|
}
|
|
937
951
|
var H = {
|
|
938
|
-
tabs: "
|
|
939
|
-
scrollable: "
|
|
940
|
-
tab: "
|
|
941
|
-
icon: "
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
952
|
+
tabs: "_tabs_5w265_1",
|
|
953
|
+
scrollable: "_scrollable_5w265_16",
|
|
954
|
+
tab: "_tab_5w265_1",
|
|
955
|
+
icon: "_icon_5w265_52",
|
|
956
|
+
badge: "_badge_5w265_70",
|
|
957
|
+
active: "_active_5w265_81",
|
|
958
|
+
micro: "_micro_5w265_87",
|
|
959
|
+
default: "_default_5w265_94",
|
|
960
|
+
large: "_large_5w265_101",
|
|
961
|
+
buttonVariant: "_buttonVariant_5w265_110",
|
|
962
|
+
bleed: "_bleed_5w265_143"
|
|
963
|
+
};
|
|
964
|
+
//#endregion
|
|
965
|
+
//#region src/components/Tabs/Tabs.tsx
|
|
966
|
+
function we(e, t) {
|
|
967
|
+
if (!e || !t) return;
|
|
968
|
+
let n = parseFloat(getComputedStyle(e).paddingInlineStart) || 32, r = e.getBoundingClientRect(), i = t.getBoundingClientRect();
|
|
969
|
+
i.left < r.left + n ? e.scrollLeft -= r.left + n - i.left : i.right > r.right - n && (e.scrollLeft += i.right - (r.right - n));
|
|
970
|
+
}
|
|
971
|
+
var Te = {
|
|
947
972
|
micro: 14,
|
|
948
973
|
default: 14,
|
|
949
974
|
large: 21
|
|
950
975
|
};
|
|
951
|
-
function
|
|
952
|
-
let
|
|
953
|
-
start: !1,
|
|
954
|
-
end: !1
|
|
955
|
-
}), y = Math.max(e.findIndex((e) => e.value === r), 0), b = (t) => {
|
|
976
|
+
function Ee({ items: e, value: r, onValueChange: o, size: c = "default", variant: f = "underline", scrollable: p = !1, bleed: m, getPanelId: h, "aria-label": g, renderLink: _ }) {
|
|
977
|
+
let v = s(null), y = s(/* @__PURE__ */ new Map()), b = a(), x = Math.max(e.findIndex((e) => e.value === r), 0), S = e.some((e) => e.href !== void 0), C = (t) => {
|
|
956
978
|
let n = e[t];
|
|
957
979
|
if (!n) return;
|
|
958
980
|
o(n.value);
|
|
959
|
-
let r =
|
|
960
|
-
r?.focus({ preventScroll: !0 }),
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
981
|
+
let r = y.current.get(n.value);
|
|
982
|
+
r?.focus({ preventScroll: !0 }), p && we(v.current, r);
|
|
983
|
+
}, w = (t, n) => {
|
|
984
|
+
for (let r = 1; r <= e.length; r++) {
|
|
985
|
+
let i = (t + n * r + e.length * r) % e.length;
|
|
986
|
+
if (!e[i].disabled) return i;
|
|
987
|
+
}
|
|
988
|
+
}, T = (t, n) => {
|
|
965
989
|
if (e.length === 0) return;
|
|
966
990
|
let r;
|
|
967
991
|
switch (t.key) {
|
|
968
992
|
case "ArrowLeft":
|
|
969
|
-
r = (n -
|
|
993
|
+
r = w(n, -1);
|
|
970
994
|
break;
|
|
971
995
|
case "ArrowRight":
|
|
972
|
-
r = (n
|
|
996
|
+
r = w(n, 1);
|
|
973
997
|
break;
|
|
974
998
|
case "Home":
|
|
975
|
-
r =
|
|
999
|
+
r = w(-1, 1);
|
|
976
1000
|
break;
|
|
977
1001
|
case "End":
|
|
978
|
-
r = e.length -
|
|
1002
|
+
r = w(e.length, -1);
|
|
979
1003
|
break;
|
|
980
1004
|
default: return;
|
|
981
1005
|
}
|
|
982
|
-
t.preventDefault(),
|
|
1006
|
+
t.preventDefault(), r !== void 0 && C(r);
|
|
983
1007
|
};
|
|
984
1008
|
return i(() => {
|
|
985
|
-
let e =
|
|
986
|
-
if (!
|
|
1009
|
+
let e = v.current;
|
|
1010
|
+
if (!p || !e) return;
|
|
1011
|
+
if (m !== void 0) {
|
|
1012
|
+
e.style.removeProperty("--tabs-fade-start"), e.style.removeProperty("--tabs-fade-end");
|
|
1013
|
+
return;
|
|
1014
|
+
}
|
|
987
1015
|
let t = () => {
|
|
988
|
-
let t = e.scrollLeft
|
|
989
|
-
|
|
990
|
-
start: t,
|
|
991
|
-
end: n
|
|
992
|
-
});
|
|
1016
|
+
let t = Math.min(e.scrollLeft, 32), n = Math.min(Math.max(e.scrollWidth - e.clientWidth - e.scrollLeft, 0), 32);
|
|
1017
|
+
e.style.setProperty("--tabs-fade-start", `${t}px`), e.style.setProperty("--tabs-fade-end", `${n}px`);
|
|
993
1018
|
};
|
|
994
1019
|
t(), e.addEventListener("scroll", t, { passive: !0 });
|
|
995
1020
|
let n = new ResizeObserver(t);
|
|
996
1021
|
return n.observe(e), () => {
|
|
997
1022
|
e.removeEventListener("scroll", t), n.disconnect();
|
|
998
1023
|
};
|
|
999
|
-
}, [
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1024
|
+
}, [
|
|
1025
|
+
p,
|
|
1026
|
+
m,
|
|
1027
|
+
e.length
|
|
1028
|
+
]), i(() => {
|
|
1029
|
+
p && we(v.current, y.current.get(r));
|
|
1030
|
+
}, [p, r]), /* @__PURE__ */ u("div", {
|
|
1031
|
+
ref: v,
|
|
1032
|
+
className: `${H.tabs} ${f === "button" ? H.buttonVariant : ""} ${p ? H.scrollable : ""} ${p && m !== void 0 ? H.bleed : ""}`,
|
|
1033
|
+
style: p && m !== void 0 ? { "--tabs-bleed": typeof m == "number" ? `${m}px` : m } : void 0,
|
|
1034
|
+
role: S ? "navigation" : "tablist",
|
|
1035
|
+
"aria-label": g,
|
|
1005
1036
|
children: e.map((e, r) => {
|
|
1006
|
-
let i = r ===
|
|
1007
|
-
|
|
1037
|
+
let i = r === x, a = /* @__PURE__ */ d(l, { children: [
|
|
1038
|
+
e.icon ? /* @__PURE__ */ u("span", {
|
|
1039
|
+
className: H.icon,
|
|
1040
|
+
"aria-hidden": "true",
|
|
1041
|
+
children: n(e.icon) && e.icon.props.size === void 0 ? t(e.icon, { size: Te[c] }) : e.icon
|
|
1042
|
+
}) : null,
|
|
1043
|
+
e.label,
|
|
1044
|
+
e.badge != null && e.badge !== !1 ? /* @__PURE__ */ u("span", {
|
|
1045
|
+
className: H.badge,
|
|
1046
|
+
title: e.badgeTitle,
|
|
1047
|
+
children: e.badge
|
|
1048
|
+
}) : null
|
|
1049
|
+
] }), s = `${H.tab} ${H[c]} ${i ? H.active : ""}`;
|
|
1050
|
+
if (e.href !== void 0) {
|
|
1051
|
+
let t = {
|
|
1052
|
+
id: `${b}-tab-${e.value}`,
|
|
1053
|
+
className: s,
|
|
1054
|
+
href: e.disabled ? void 0 : e.href,
|
|
1055
|
+
"aria-current": i ? "page" : void 0,
|
|
1056
|
+
"aria-disabled": e.disabled || void 0,
|
|
1057
|
+
title: e.title,
|
|
1058
|
+
children: a
|
|
1059
|
+
};
|
|
1060
|
+
return /* @__PURE__ */ u("span", {
|
|
1061
|
+
style: { display: "contents" },
|
|
1062
|
+
ref: (t) => {
|
|
1063
|
+
let n = t?.firstElementChild;
|
|
1064
|
+
n ? y.current.set(e.value, n) : y.current.delete(e.value);
|
|
1065
|
+
},
|
|
1066
|
+
children: _ ? _(e, t) : /* @__PURE__ */ u("a", { ...t })
|
|
1067
|
+
}, e.value);
|
|
1068
|
+
}
|
|
1069
|
+
return /* @__PURE__ */ u("button", {
|
|
1008
1070
|
ref: (t) => {
|
|
1009
|
-
t ?
|
|
1071
|
+
t ? y.current.set(e.value, t) : y.current.delete(e.value);
|
|
1010
1072
|
},
|
|
1011
|
-
id: `${
|
|
1073
|
+
id: `${b}-tab-${e.value}`,
|
|
1012
1074
|
role: "tab",
|
|
1013
1075
|
type: "button",
|
|
1014
1076
|
"aria-selected": i,
|
|
1015
|
-
"aria-controls":
|
|
1077
|
+
"aria-controls": h?.(e),
|
|
1078
|
+
"aria-disabled": e.disabled || void 0,
|
|
1079
|
+
title: e.title,
|
|
1016
1080
|
tabIndex: i ? 0 : -1,
|
|
1017
|
-
className:
|
|
1018
|
-
onClick: () =>
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
children: n(e.icon) && e.icon.props.size === void 0 ? t(e.icon, { size: we[l] }) : e.icon
|
|
1024
|
-
}) : null, e.label]
|
|
1081
|
+
className: s,
|
|
1082
|
+
onClick: () => {
|
|
1083
|
+
e.disabled || o(e.value);
|
|
1084
|
+
},
|
|
1085
|
+
onKeyDown: (e) => T(e, r),
|
|
1086
|
+
children: a
|
|
1025
1087
|
}, e.value);
|
|
1026
1088
|
})
|
|
1027
1089
|
});
|
|
1028
1090
|
}
|
|
1029
1091
|
var U = {
|
|
1030
|
-
root: "
|
|
1031
|
-
micro: "
|
|
1032
|
-
default: "
|
|
1033
|
-
list: "
|
|
1034
|
-
item: "
|
|
1035
|
-
separator: "
|
|
1036
|
-
step: "
|
|
1037
|
-
switchable: "
|
|
1038
|
-
label: "
|
|
1039
|
-
text: "
|
|
1040
|
-
trigger: "
|
|
1041
|
-
icon: "
|
|
1042
|
-
option: "
|
|
1043
|
-
menu: "
|
|
1044
|
-
menuDivider: "
|
|
1092
|
+
root: "_root_wrjxq_1",
|
|
1093
|
+
micro: "_micro_wrjxq_2",
|
|
1094
|
+
default: "_default_wrjxq_3",
|
|
1095
|
+
list: "_list_wrjxq_4",
|
|
1096
|
+
item: "_item_wrjxq_5",
|
|
1097
|
+
separator: "_separator_wrjxq_6",
|
|
1098
|
+
step: "_step_wrjxq_7",
|
|
1099
|
+
switchable: "_switchable_wrjxq_8",
|
|
1100
|
+
label: "_label_wrjxq_8",
|
|
1101
|
+
text: "_text_wrjxq_11",
|
|
1102
|
+
trigger: "_trigger_wrjxq_12",
|
|
1103
|
+
icon: "_icon_wrjxq_16",
|
|
1104
|
+
option: "_option_wrjxq_17",
|
|
1105
|
+
menu: "_menu_wrjxq_18",
|
|
1106
|
+
menuDivider: "_menuDivider_wrjxq_19",
|
|
1107
|
+
truncate: "_truncate_wrjxq_32"
|
|
1045
1108
|
};
|
|
1046
1109
|
//#endregion
|
|
1047
1110
|
//#region src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
1048
|
-
function
|
|
1111
|
+
function De(t) {
|
|
1049
1112
|
return e.isValidElement(t) ? e.cloneElement(t, {
|
|
1050
1113
|
size: "14px",
|
|
1051
1114
|
color: "currentColor"
|
|
1052
1115
|
}) : t;
|
|
1053
1116
|
}
|
|
1054
|
-
var
|
|
1117
|
+
var Oe = "\0action", ke = ({ items: e, size: t = "default", overflow: n = "wrap", className: r = "", separator: i = /* @__PURE__ */ u(_, {
|
|
1055
1118
|
size: 14,
|
|
1056
1119
|
color: "currentColor"
|
|
1057
|
-
}), renderLink:
|
|
1058
|
-
"aria-label":
|
|
1059
|
-
className: `${U.root} ${U[t]} ${n}`,
|
|
1120
|
+
}), renderLink: a, "aria-label": o = "Breadcrumb" }) => /* @__PURE__ */ u("nav", {
|
|
1121
|
+
"aria-label": o,
|
|
1122
|
+
className: `${U.root} ${U[t]} ${n === "truncate" ? U.truncate : ""} ${r}`,
|
|
1060
1123
|
children: /* @__PURE__ */ u("ol", {
|
|
1061
1124
|
className: U.list,
|
|
1062
|
-
children: e.map((t,
|
|
1125
|
+
children: e.map((t, r) => /* @__PURE__ */ d("li", {
|
|
1063
1126
|
className: U.item,
|
|
1064
|
-
children: [
|
|
1127
|
+
children: [r > 0 && /* @__PURE__ */ u("span", {
|
|
1065
1128
|
className: U.separator,
|
|
1066
1129
|
"aria-hidden": "true",
|
|
1067
|
-
children:
|
|
1130
|
+
children: i
|
|
1068
1131
|
}), /* @__PURE__ */ d("div", {
|
|
1069
1132
|
className: `${U.step} ${t.switcher ? U.switchable : ""}`,
|
|
1070
1133
|
children: [t.href ? (() => {
|
|
1071
|
-
let
|
|
1134
|
+
let i = {
|
|
1072
1135
|
className: U.label,
|
|
1073
1136
|
href: t.href,
|
|
1137
|
+
title: n === "truncate" ? t.label : void 0,
|
|
1074
1138
|
onClick: t.onClick,
|
|
1075
|
-
"aria-current":
|
|
1139
|
+
"aria-current": r === e.length - 1 ? "page" : void 0,
|
|
1076
1140
|
children: /* @__PURE__ */ d(l, { children: [t.icon && /* @__PURE__ */ u("span", {
|
|
1077
1141
|
className: U.icon,
|
|
1078
1142
|
"aria-hidden": "true",
|
|
1079
|
-
children:
|
|
1143
|
+
children: De(t.icon)
|
|
1080
1144
|
}), /* @__PURE__ */ u("span", {
|
|
1081
1145
|
className: U.text,
|
|
1082
1146
|
children: t.label
|
|
1083
1147
|
})] })
|
|
1084
1148
|
};
|
|
1085
|
-
return
|
|
1149
|
+
return a ? a(t, i) : /* @__PURE__ */ u("a", { ...i });
|
|
1086
1150
|
})() : /* @__PURE__ */ d("span", {
|
|
1087
1151
|
className: U.label,
|
|
1088
|
-
|
|
1152
|
+
title: n === "truncate" ? t.label : void 0,
|
|
1153
|
+
"aria-current": r === e.length - 1 ? "page" : void 0,
|
|
1089
1154
|
children: [t.icon && /* @__PURE__ */ u("span", {
|
|
1090
1155
|
className: U.icon,
|
|
1091
1156
|
"aria-hidden": "true",
|
|
1092
|
-
children:
|
|
1157
|
+
children: De(t.icon)
|
|
1093
1158
|
}), /* @__PURE__ */ u("span", {
|
|
1094
1159
|
className: U.text,
|
|
1095
1160
|
children: t.label
|
|
1096
1161
|
})]
|
|
1097
1162
|
}), t.switcher && /* @__PURE__ */ d(D.Root, {
|
|
1098
1163
|
value: t.switcher.value,
|
|
1099
|
-
onValueChange: (e) => e ===
|
|
1164
|
+
onValueChange: (e) => e === Oe ? t.switcher.action?.onSelect() : t.switcher.onValueChange(e),
|
|
1100
1165
|
disabled: t.switcher.disabled || t.switcher.options.length === 0 && !t.switcher.action,
|
|
1101
1166
|
children: [/* @__PURE__ */ u(D.Trigger, {
|
|
1102
1167
|
className: U.trigger,
|
|
@@ -1136,7 +1201,7 @@ var De = "\0action", Oe = ({ items: e, size: t = "default", className: n = "", s
|
|
|
1136
1201
|
})
|
|
1137
1202
|
})]
|
|
1138
1203
|
}, e.value)), t.switcher.action && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(D.Separator, { className: U.menuDivider }), /* @__PURE__ */ u(D.Item, {
|
|
1139
|
-
value:
|
|
1204
|
+
value: Oe,
|
|
1140
1205
|
className: B.item,
|
|
1141
1206
|
textValue: t.switcher.action.label,
|
|
1142
1207
|
children: /* @__PURE__ */ d("span", {
|
|
@@ -1157,7 +1222,7 @@ var De = "\0action", Oe = ({ items: e, size: t = "default", className: n = "", s
|
|
|
1157
1222
|
})]
|
|
1158
1223
|
}, t.id))
|
|
1159
1224
|
})
|
|
1160
|
-
}),
|
|
1225
|
+
}), Ae = {
|
|
1161
1226
|
wrapper: "_wrapper_1a9jo_1",
|
|
1162
1227
|
track: "_track_1a9jo_8",
|
|
1163
1228
|
fill: "_fill_1a9jo_36",
|
|
@@ -1165,42 +1230,42 @@ var De = "\0action", Oe = ({ items: e, size: t = "default", className: n = "", s
|
|
|
1165
1230
|
};
|
|
1166
1231
|
//#endregion
|
|
1167
1232
|
//#region src/components/ProgressBar/ProgressBar.tsx
|
|
1168
|
-
function
|
|
1233
|
+
function je({ value: e, showLabel: t = !1, fulfilledColor: n = !1, className: r = "" }) {
|
|
1169
1234
|
let i = Math.min(100, Math.max(0, e)), a = `${Math.round(i)}%`, o = n && i >= 100 ? "var(--CPureBlue)" : void 0;
|
|
1170
1235
|
return /* @__PURE__ */ d("div", {
|
|
1171
|
-
className: `${
|
|
1236
|
+
className: `${Ae.wrapper} ${r}`,
|
|
1172
1237
|
role: "progressbar",
|
|
1173
1238
|
"aria-valuenow": i,
|
|
1174
1239
|
"aria-valuemin": 0,
|
|
1175
1240
|
"aria-valuemax": 100,
|
|
1176
1241
|
children: [/* @__PURE__ */ u("div", {
|
|
1177
|
-
className:
|
|
1242
|
+
className: Ae.track,
|
|
1178
1243
|
children: /* @__PURE__ */ u("div", {
|
|
1179
|
-
className:
|
|
1244
|
+
className: Ae.fill,
|
|
1180
1245
|
style: {
|
|
1181
1246
|
width: `${i}%`,
|
|
1182
1247
|
backgroundColor: o
|
|
1183
1248
|
}
|
|
1184
1249
|
})
|
|
1185
1250
|
}), t && /* @__PURE__ */ u("span", {
|
|
1186
|
-
className:
|
|
1251
|
+
className: Ae.label,
|
|
1187
1252
|
"aria-hidden": "true",
|
|
1188
1253
|
children: a
|
|
1189
1254
|
})]
|
|
1190
1255
|
});
|
|
1191
1256
|
}
|
|
1192
|
-
var
|
|
1257
|
+
var Me = {
|
|
1193
1258
|
chip: "_chip_iaxe0_1",
|
|
1194
1259
|
large: "_large_iaxe0_14"
|
|
1195
1260
|
};
|
|
1196
1261
|
//#endregion
|
|
1197
1262
|
//#region src/components/Chip/Chip.tsx
|
|
1198
|
-
function
|
|
1263
|
+
function Ne({ children: t, color: n, textColor: r, className: i, icon: a, size: o = "default" }) {
|
|
1199
1264
|
let s = {};
|
|
1200
1265
|
return n && (s.backgroundColor = n), r && (s.color = r), /* @__PURE__ */ d("span", {
|
|
1201
1266
|
className: [
|
|
1202
|
-
|
|
1203
|
-
o === "large" &&
|
|
1267
|
+
Me.chip,
|
|
1268
|
+
o === "large" && Me.large,
|
|
1204
1269
|
i
|
|
1205
1270
|
].filter(Boolean).join(" "),
|
|
1206
1271
|
style: s,
|
|
@@ -1221,44 +1286,63 @@ var W = {
|
|
|
1221
1286
|
success: "_success_ok48u_24",
|
|
1222
1287
|
warning: "_warning_ok48u_25",
|
|
1223
1288
|
destructive: "_destructive_ok48u_26"
|
|
1224
|
-
},
|
|
1289
|
+
}, Pe = {
|
|
1225
1290
|
success: /* @__PURE__ */ u(m, {}),
|
|
1226
1291
|
warning: /* @__PURE__ */ u(w, {}),
|
|
1227
1292
|
destructive: /* @__PURE__ */ u(w, {})
|
|
1228
1293
|
};
|
|
1229
|
-
function
|
|
1294
|
+
function Fe(t) {
|
|
1230
1295
|
return e.isValidElement(t) ? e.cloneElement(t, {
|
|
1231
1296
|
size: 16,
|
|
1232
1297
|
color: "currentColor"
|
|
1233
1298
|
}) : t;
|
|
1234
1299
|
}
|
|
1235
|
-
var
|
|
1236
|
-
let a = t === void 0 ?
|
|
1300
|
+
var Ie = ({ variant: e = "default", icon: t, className: n = "", children: r, role: i }) => {
|
|
1301
|
+
let a = t === void 0 ? Pe[e] : t;
|
|
1237
1302
|
return /* @__PURE__ */ d("div", {
|
|
1238
1303
|
role: i ?? (e === "destructive" || e === "warning" ? "alert" : "status"),
|
|
1239
1304
|
className: `${W.root} ${W[e]} ${n}`,
|
|
1240
1305
|
children: [a && /* @__PURE__ */ u("span", {
|
|
1241
1306
|
className: W.icon,
|
|
1242
1307
|
"aria-hidden": "true",
|
|
1243
|
-
children:
|
|
1308
|
+
children: Fe(a)
|
|
1244
1309
|
}), /* @__PURE__ */ u("div", {
|
|
1245
1310
|
className: W.body,
|
|
1246
1311
|
children: r
|
|
1247
1312
|
})]
|
|
1248
1313
|
});
|
|
1249
|
-
},
|
|
1314
|
+
}, Le = ({ children: e, className: t = "" }) => /* @__PURE__ */ u("div", {
|
|
1250
1315
|
className: `${W.title} ${t}`,
|
|
1251
1316
|
children: e
|
|
1252
|
-
}),
|
|
1317
|
+
}), Re = ({ children: e, className: t = "" }) => /* @__PURE__ */ u("div", {
|
|
1253
1318
|
className: `${W.description} ${t}`,
|
|
1254
1319
|
children: e
|
|
1255
|
-
}),
|
|
1320
|
+
}), ze = {
|
|
1321
|
+
root: "_root_1plhu_3",
|
|
1322
|
+
main: "_main_1plhu_18",
|
|
1323
|
+
aside: "_aside_1plhu_19",
|
|
1324
|
+
message: "_message_1plhu_26"
|
|
1325
|
+
}, Be = ({ visible: e = !0, message: t, aside: n, children: r, className: i = "", "aria-label": a = "Unsaved changes" }) => e ? /* @__PURE__ */ d("div", {
|
|
1326
|
+
role: "region",
|
|
1327
|
+
"aria-label": a,
|
|
1328
|
+
className: `${ze.root} ${i}`,
|
|
1329
|
+
children: [/* @__PURE__ */ d("div", {
|
|
1330
|
+
className: ze.main,
|
|
1331
|
+
children: [r, t && /* @__PURE__ */ u("span", {
|
|
1332
|
+
className: ze.message,
|
|
1333
|
+
children: t
|
|
1334
|
+
})]
|
|
1335
|
+
}), n && /* @__PURE__ */ u("div", {
|
|
1336
|
+
className: ze.aside,
|
|
1337
|
+
children: n
|
|
1338
|
+
})]
|
|
1339
|
+
}) : null, Ve = {
|
|
1256
1340
|
tooltip: "_tooltip_1de7z_1",
|
|
1257
1341
|
arrow: "_arrow_1de7z_13"
|
|
1258
1342
|
};
|
|
1259
1343
|
//#endregion
|
|
1260
1344
|
//#region src/components/Tooltip/Tooltip.tsx
|
|
1261
|
-
function
|
|
1345
|
+
function He({ content: e, position: t = "top", children: n, className: r }) {
|
|
1262
1346
|
return /* @__PURE__ */ u(k.Provider, {
|
|
1263
1347
|
delayDuration: 80,
|
|
1264
1348
|
children: /* @__PURE__ */ d(k.Root, { children: [/* @__PURE__ */ u(k.Trigger, {
|
|
@@ -1267,8 +1351,8 @@ function ze({ content: e, position: t = "top", children: n, className: r }) {
|
|
|
1267
1351
|
}), /* @__PURE__ */ u(k.Portal, { children: /* @__PURE__ */ d(k.Content, {
|
|
1268
1352
|
side: t,
|
|
1269
1353
|
sideOffset: 7,
|
|
1270
|
-
className: [
|
|
1271
|
-
children: [e, /* @__PURE__ */ u(k.Arrow, { className:
|
|
1354
|
+
className: [Ve.tooltip, r].filter(Boolean).join(" "),
|
|
1355
|
+
children: [e, /* @__PURE__ */ u(k.Arrow, { className: Ve.arrow })]
|
|
1272
1356
|
}) })] })
|
|
1273
1357
|
});
|
|
1274
1358
|
}
|
|
@@ -1286,11 +1370,11 @@ var G = {
|
|
|
1286
1370
|
legendItem: "_legendItem_1w5vh_90",
|
|
1287
1371
|
legendMark: "_legendMark_1w5vh_96",
|
|
1288
1372
|
legendLabel: "_legendLabel_1w5vh_102"
|
|
1289
|
-
},
|
|
1290
|
-
function
|
|
1373
|
+
}, Ue = "var(--lv4)", K = 12, We = 20, Ge = 8, Ke = 28, q = 20;
|
|
1374
|
+
function qe(e) {
|
|
1291
1375
|
return Number.isInteger(e) ? String(e) : e.toLocaleString(void 0, { maximumFractionDigits: 2 });
|
|
1292
1376
|
}
|
|
1293
|
-
function
|
|
1377
|
+
function Je({ series: e, labels: t, type: n = "line", height: a = 200, showLegend: o = !0, className: l }) {
|
|
1294
1378
|
let f = s(null), [p, m] = c(0), [h, g] = c(null);
|
|
1295
1379
|
i(() => {
|
|
1296
1380
|
let e = f.current;
|
|
@@ -1298,7 +1382,7 @@ function Ge({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1298
1382
|
let t = new ResizeObserver(([e]) => m(e.contentRect.width));
|
|
1299
1383
|
return t.observe(e), m(e.clientWidth), () => t.disconnect();
|
|
1300
1384
|
}, []);
|
|
1301
|
-
let _ = t?.length ?
|
|
1385
|
+
let _ = t?.length ? Ke : Ge, v = Math.max(p - q - We, 0), y = Math.max(a - K - _, 0), b = e.flatMap((e) => e.data.filter(Number.isFinite)), x = b.length ? Math.max(...b, 0) : 1, S = n === "bar" ? 0 : Math.min(...b, 0), C = x - S || 1, w = Math.max(...e.map((e) => e.data.length), 0), T = (e) => K + (1 - (e - S) / C) * y, E = (e) => w <= 1 ? q + v / 2 : q + e / (w - 1) * v, D = r((e) => {
|
|
1302
1386
|
if (w === 0) return;
|
|
1303
1387
|
let t = e.currentTarget.getBoundingClientRect(), r = e.clientX - t.left, i = e.clientY - t.top;
|
|
1304
1388
|
if (n === "line") {
|
|
@@ -1345,7 +1429,7 @@ function Ge({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1345
1429
|
});
|
|
1346
1430
|
})() : null, M = () => e.map((e, t) => {
|
|
1347
1431
|
if (!e.data.length) return null;
|
|
1348
|
-
let n = e.color ??
|
|
1432
|
+
let n = e.color ?? Ue;
|
|
1349
1433
|
return /* @__PURE__ */ d("g", { children: [/* @__PURE__ */ u("polyline", {
|
|
1350
1434
|
points: e.data.map((e, t) => `${E(t).toFixed(2)},${T(e).toFixed(2)}`).join(" "),
|
|
1351
1435
|
fill: "none",
|
|
@@ -1416,7 +1500,7 @@ function Ge({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1416
1500
|
children: [
|
|
1417
1501
|
/* @__PURE__ */ u("span", {
|
|
1418
1502
|
className: G.tooltipDot,
|
|
1419
|
-
style: { background: e.color ??
|
|
1503
|
+
style: { background: e.color ?? Ue }
|
|
1420
1504
|
}),
|
|
1421
1505
|
/* @__PURE__ */ u("span", {
|
|
1422
1506
|
className: G.tooltipName,
|
|
@@ -1424,7 +1508,7 @@ function Ge({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1424
1508
|
}),
|
|
1425
1509
|
/* @__PURE__ */ u("span", {
|
|
1426
1510
|
className: G.tooltipValue,
|
|
1427
|
-
children:
|
|
1511
|
+
children: qe(e.data[h.index] ?? 0)
|
|
1428
1512
|
})
|
|
1429
1513
|
]
|
|
1430
1514
|
}, t))]
|
|
@@ -1457,7 +1541,7 @@ function Ge({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1457
1541
|
className: G.legendItem,
|
|
1458
1542
|
children: [/* @__PURE__ */ u("div", {
|
|
1459
1543
|
className: G.legendMark,
|
|
1460
|
-
style: { background: e.color ??
|
|
1544
|
+
style: { background: e.color ?? Ue }
|
|
1461
1545
|
}), /* @__PURE__ */ u("span", {
|
|
1462
1546
|
className: G.legendLabel,
|
|
1463
1547
|
children: e.label
|
|
@@ -1475,7 +1559,7 @@ var J = {
|
|
|
1475
1559
|
};
|
|
1476
1560
|
//#endregion
|
|
1477
1561
|
//#region src/components/Textarea/Textarea.tsx
|
|
1478
|
-
function
|
|
1562
|
+
function Ye({ label: t, error: n, className: r = "", isValid: i = !0, id: a, rows: o = 4, ...s }) {
|
|
1479
1563
|
let c = e.useId(), l = a || c, f = `${l}-error`, p = n || !i;
|
|
1480
1564
|
return /* @__PURE__ */ d("div", {
|
|
1481
1565
|
className: `${J.wrapper} ${r}`,
|
|
@@ -1512,7 +1596,7 @@ var Y = {
|
|
|
1512
1596
|
description: "_description_xud7c_34",
|
|
1513
1597
|
close: "_close_xud7c_40",
|
|
1514
1598
|
srOnly: "_srOnly_xud7c_62"
|
|
1515
|
-
},
|
|
1599
|
+
}, Xe = ({ trigger: e, children: t, open: n, onOpenChange: r, title: i, description: a, className: o = "", showClose: s = !0 }) => /* @__PURE__ */ d(A.Root, {
|
|
1516
1600
|
open: n,
|
|
1517
1601
|
onOpenChange: r,
|
|
1518
1602
|
children: [e && /* @__PURE__ */ u(A.Trigger, {
|
|
@@ -1559,7 +1643,7 @@ var Y = {
|
|
|
1559
1643
|
today: "_today_aimna_131",
|
|
1560
1644
|
selected: "_selected_aimna_136",
|
|
1561
1645
|
errorText: "_errorText_aimna_142"
|
|
1562
|
-
},
|
|
1646
|
+
}, Ze = [
|
|
1563
1647
|
"Mo",
|
|
1564
1648
|
"Tu",
|
|
1565
1649
|
"We",
|
|
@@ -1567,7 +1651,7 @@ var Y = {
|
|
|
1567
1651
|
"Fr",
|
|
1568
1652
|
"Sa",
|
|
1569
1653
|
"Su"
|
|
1570
|
-
],
|
|
1654
|
+
], Qe = [
|
|
1571
1655
|
"January",
|
|
1572
1656
|
"February",
|
|
1573
1657
|
"March",
|
|
@@ -1585,15 +1669,15 @@ function Z(e) {
|
|
|
1585
1669
|
let t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
|
|
1586
1670
|
return `${e.getFullYear()}-${t}-${n}`;
|
|
1587
1671
|
}
|
|
1588
|
-
function
|
|
1672
|
+
function $e(e, t) {
|
|
1589
1673
|
return !!e && !!t && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
1590
1674
|
}
|
|
1591
|
-
function
|
|
1675
|
+
function et(e, t) {
|
|
1592
1676
|
let n = (new Date(e, t, 1).getDay() + 6) % 7, r = [];
|
|
1593
1677
|
for (let i = 0; i < 42; i++) r.push(new Date(e, t, 1 - n + i));
|
|
1594
1678
|
return r;
|
|
1595
1679
|
}
|
|
1596
|
-
var
|
|
1680
|
+
var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", error: a, isValid: o = !0, disabled: s = !1, className: l = "", formatDate: f = Z }) => {
|
|
1597
1681
|
let p = e.useId(), m = `${p}-error`, v = !!a || !o, [y, b] = c(!1), x = /* @__PURE__ */ new Date(), S = t ?? x, [C, w] = c(S.getFullYear()), [T, E] = c(S.getMonth()), [D, k] = c(S), A = e.useRef(/* @__PURE__ */ new Map()), j = e.useRef(!1), M = (e) => {
|
|
1598
1682
|
if (e) {
|
|
1599
1683
|
let e = t ?? /* @__PURE__ */ new Date();
|
|
@@ -1629,7 +1713,7 @@ var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1629
1713
|
T === 11 ? (E(0), w(C + 1)) : E(T + 1);
|
|
1630
1714
|
}, N = (e) => {
|
|
1631
1715
|
n?.(e), b(!1);
|
|
1632
|
-
}, P =
|
|
1716
|
+
}, P = et(C, T);
|
|
1633
1717
|
return /* @__PURE__ */ d("div", {
|
|
1634
1718
|
className: `${X.wrapper} ${l}`,
|
|
1635
1719
|
children: [
|
|
@@ -1684,7 +1768,7 @@ var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1684
1768
|
/* @__PURE__ */ d("span", {
|
|
1685
1769
|
className: X.monthLabel,
|
|
1686
1770
|
children: [
|
|
1687
|
-
|
|
1771
|
+
Qe[T],
|
|
1688
1772
|
" ",
|
|
1689
1773
|
C
|
|
1690
1774
|
]
|
|
@@ -1703,7 +1787,7 @@ var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1703
1787
|
}),
|
|
1704
1788
|
/* @__PURE__ */ u("div", {
|
|
1705
1789
|
className: X.weekdays,
|
|
1706
|
-
children:
|
|
1790
|
+
children: Ze.map((e) => /* @__PURE__ */ u("span", {
|
|
1707
1791
|
className: X.weekday,
|
|
1708
1792
|
children: e
|
|
1709
1793
|
}, e))
|
|
@@ -1711,7 +1795,7 @@ var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1711
1795
|
/* @__PURE__ */ u("div", {
|
|
1712
1796
|
className: X.grid,
|
|
1713
1797
|
children: P.map((e) => {
|
|
1714
|
-
let n = e.getMonth() !== T, r =
|
|
1798
|
+
let n = e.getMonth() !== T, r = $e(e, t), i = $e(e, x);
|
|
1715
1799
|
return /* @__PURE__ */ u("button", {
|
|
1716
1800
|
type: "button",
|
|
1717
1801
|
className: [
|
|
@@ -1732,7 +1816,7 @@ var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1732
1816
|
}),
|
|
1733
1817
|
"aria-pressed": r,
|
|
1734
1818
|
"aria-current": i ? "date" : void 0,
|
|
1735
|
-
tabIndex:
|
|
1819
|
+
tabIndex: $e(e, D) || D.getMonth() !== T && e.getDate() === 1 && !n ? 0 : -1,
|
|
1736
1820
|
onKeyDown: (t) => ee(t, e),
|
|
1737
1821
|
children: e.getDate()
|
|
1738
1822
|
}, e.toISOString());
|
|
@@ -1750,96 +1834,121 @@ var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1750
1834
|
]
|
|
1751
1835
|
});
|
|
1752
1836
|
}, Q = {
|
|
1753
|
-
root: "
|
|
1754
|
-
micro: "
|
|
1755
|
-
default: "
|
|
1756
|
-
large: "
|
|
1757
|
-
list: "
|
|
1758
|
-
alignEnd: "
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1837
|
+
root: "_root_1n7k4_1",
|
|
1838
|
+
micro: "_micro_1n7k4_7",
|
|
1839
|
+
default: "_default_1n7k4_8",
|
|
1840
|
+
large: "_large_1n7k4_9",
|
|
1841
|
+
list: "_list_1n7k4_11",
|
|
1842
|
+
alignEnd: "_alignEnd_1n7k4_24",
|
|
1843
|
+
alignList: "_alignList_1n7k4_24",
|
|
1844
|
+
control: "_control_1n7k4_29",
|
|
1845
|
+
link: "_link_1n7k4_56",
|
|
1846
|
+
icon: "_icon_1n7k4_57",
|
|
1847
|
+
caret: "_caret_1n7k4_57",
|
|
1848
|
+
viewportPosition: "_viewportPosition_1n7k4_60",
|
|
1849
|
+
panelTrigger: "_panelTrigger_1n7k4_77",
|
|
1850
|
+
viewport: "_viewport_1n7k4_60",
|
|
1851
|
+
content: "_content_1n7k4_106"
|
|
1852
|
+
}, nt = {
|
|
1767
1853
|
micro: 14,
|
|
1768
1854
|
default: 14,
|
|
1769
1855
|
large: 21
|
|
1770
|
-
},
|
|
1771
|
-
let
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1856
|
+
}, rt = e.createContext("default"), it = e.forwardRef(({ size: t = "default", align: n = "start", panelAlign: r = "trigger", panelWidth: i, className: a = "", style: o, children: s, "aria-label": c = "Main navigation", ...l }, f) => {
|
|
1857
|
+
let p = e.useRef(null), [m, h] = e.useState(null);
|
|
1858
|
+
e.useEffect(() => {
|
|
1859
|
+
let e = p.current;
|
|
1860
|
+
if (!e || r !== "trigger") return;
|
|
1861
|
+
let t = () => {
|
|
1862
|
+
let t = e.querySelector("[data-state=\"open\"][aria-expanded=\"true\"]");
|
|
1863
|
+
t && h(t.getBoundingClientRect().left - e.getBoundingClientRect().left);
|
|
1864
|
+
};
|
|
1865
|
+
t();
|
|
1866
|
+
let n = new MutationObserver(t);
|
|
1867
|
+
n.observe(e, {
|
|
1868
|
+
subtree: !0,
|
|
1869
|
+
attributes: !0,
|
|
1870
|
+
attributeFilter: ["data-state"]
|
|
1871
|
+
});
|
|
1872
|
+
let i = new ResizeObserver(t);
|
|
1873
|
+
return i.observe(e), () => {
|
|
1874
|
+
n.disconnect(), i.disconnect();
|
|
1875
|
+
};
|
|
1876
|
+
}, [r, s]);
|
|
1877
|
+
let g = {
|
|
1878
|
+
...o,
|
|
1879
|
+
...i === void 0 ? {} : { "--panel-width": typeof i == "number" ? `${i}px` : i },
|
|
1880
|
+
...r === "trigger" && m !== null ? { "--panel-offset": `${Math.round(m)}px` } : {}
|
|
1881
|
+
}, _ = r === "trigger" ? Q.panelTrigger : r === "end" ? Q.alignEnd : "";
|
|
1882
|
+
return /* @__PURE__ */ u(rt.Provider, {
|
|
1883
|
+
value: t,
|
|
1777
1884
|
children: /* @__PURE__ */ d(j.Root, {
|
|
1778
|
-
...
|
|
1779
|
-
ref:
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1885
|
+
...l,
|
|
1886
|
+
ref: (e) => {
|
|
1887
|
+
p.current = e, typeof f == "function" ? f(e) : f && (f.current = e);
|
|
1888
|
+
},
|
|
1889
|
+
"aria-label": c,
|
|
1890
|
+
style: g,
|
|
1891
|
+
className: `${Q.root} ${Q[t]} ${n === "end" ? Q.alignList : ""} ${_} ${a}`,
|
|
1892
|
+
children: [s, /* @__PURE__ */ u("div", {
|
|
1784
1893
|
className: Q.viewportPosition,
|
|
1785
1894
|
children: /* @__PURE__ */ u(j.Viewport, { className: Q.viewport })
|
|
1786
1895
|
})]
|
|
1787
1896
|
})
|
|
1788
1897
|
});
|
|
1789
1898
|
});
|
|
1790
|
-
|
|
1791
|
-
var
|
|
1899
|
+
it.displayName = "NavigationMenu";
|
|
1900
|
+
var at = e.forwardRef(({ className: e = "", ...t }, n) => /* @__PURE__ */ u(j.List, {
|
|
1792
1901
|
...t,
|
|
1793
1902
|
ref: n,
|
|
1794
1903
|
className: `${Q.list} ${e}`
|
|
1795
1904
|
}));
|
|
1796
|
-
|
|
1797
|
-
var
|
|
1798
|
-
function
|
|
1799
|
-
let n = e.useContext(
|
|
1905
|
+
at.displayName = "NavigationMenuList";
|
|
1906
|
+
var ot = j.Item;
|
|
1907
|
+
function st({ icon: t }) {
|
|
1908
|
+
let n = e.useContext(rt);
|
|
1800
1909
|
return t ? /* @__PURE__ */ u("span", {
|
|
1801
1910
|
className: Q.icon,
|
|
1802
1911
|
"aria-hidden": "true",
|
|
1803
1912
|
children: e.cloneElement(t, {
|
|
1804
|
-
size:
|
|
1913
|
+
size: nt[n],
|
|
1805
1914
|
color: "currentColor"
|
|
1806
1915
|
})
|
|
1807
1916
|
}) : null;
|
|
1808
1917
|
}
|
|
1809
|
-
var
|
|
1810
|
-
let o = e.useContext(
|
|
1918
|
+
var ct = e.forwardRef(({ className: t = "", icon: n, children: r, ...i }, a) => {
|
|
1919
|
+
let o = e.useContext(rt);
|
|
1811
1920
|
return /* @__PURE__ */ d(j.Trigger, {
|
|
1812
1921
|
...i,
|
|
1813
1922
|
ref: a,
|
|
1814
1923
|
className: `${Q.control} ${t}`,
|
|
1815
1924
|
children: [
|
|
1816
|
-
/* @__PURE__ */ u(
|
|
1925
|
+
/* @__PURE__ */ u(st, { icon: n }),
|
|
1817
1926
|
r,
|
|
1818
1927
|
/* @__PURE__ */ u("span", {
|
|
1819
1928
|
className: Q.caret,
|
|
1820
1929
|
"aria-hidden": "true",
|
|
1821
1930
|
children: /* @__PURE__ */ u(h, {
|
|
1822
|
-
size:
|
|
1931
|
+
size: nt[o],
|
|
1823
1932
|
color: "currentColor"
|
|
1824
1933
|
})
|
|
1825
1934
|
})
|
|
1826
1935
|
]
|
|
1827
1936
|
});
|
|
1828
1937
|
});
|
|
1829
|
-
|
|
1830
|
-
var
|
|
1938
|
+
ct.displayName = "NavigationMenuTrigger";
|
|
1939
|
+
var lt = e.forwardRef(({ className: e = "", ...t }, n) => /* @__PURE__ */ u(j.Content, {
|
|
1831
1940
|
...t,
|
|
1832
1941
|
ref: n,
|
|
1833
1942
|
className: `${Q.content} ${e}`
|
|
1834
1943
|
}));
|
|
1835
|
-
|
|
1836
|
-
var
|
|
1944
|
+
lt.displayName = "NavigationMenuContent";
|
|
1945
|
+
var ut = e.forwardRef(({ variant: e = "panel", icon: t, className: n = "", children: r, ...i }, a) => /* @__PURE__ */ u(j.Link, {
|
|
1837
1946
|
...i,
|
|
1838
1947
|
ref: a,
|
|
1839
1948
|
className: `${e === "navigation" ? Q.control : Q.link} ${n}`,
|
|
1840
|
-
children: e === "navigation" && !i.asChild ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(
|
|
1949
|
+
children: e === "navigation" && !i.asChild ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(st, { icon: t }), r] }) : r
|
|
1841
1950
|
}));
|
|
1842
|
-
|
|
1951
|
+
ut.displayName = "NavigationMenuLink";
|
|
1843
1952
|
var $ = {
|
|
1844
1953
|
panel: "_panel_1hiss_6",
|
|
1845
1954
|
header: "_header_1hiss_14",
|
|
@@ -1871,18 +1980,18 @@ var $ = {
|
|
|
1871
1980
|
};
|
|
1872
1981
|
//#endregion
|
|
1873
1982
|
//#region src/components/Chat/ChatPanel.tsx
|
|
1874
|
-
function
|
|
1983
|
+
function dt({ children: e }) {
|
|
1875
1984
|
return /* @__PURE__ */ u("kbd", {
|
|
1876
1985
|
className: $.kbd,
|
|
1877
1986
|
children: e
|
|
1878
1987
|
});
|
|
1879
1988
|
}
|
|
1880
|
-
var
|
|
1881
|
-
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(
|
|
1882
|
-
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(
|
|
1883
|
-
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(
|
|
1989
|
+
var ft = /* @__PURE__ */ d(l, { children: [
|
|
1990
|
+
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(dt, { children: "↵" }), " send"] }),
|
|
1991
|
+
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(dt, { children: "⇧↵" }), " new line"] }),
|
|
1992
|
+
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(dt, { children: "esc" }), " close"] })
|
|
1884
1993
|
] });
|
|
1885
|
-
function
|
|
1994
|
+
function pt({ header: e, children: t, composer: n, hints: r = ft, className: i = "", threadRef: a, "aria-label": o }) {
|
|
1886
1995
|
return /* @__PURE__ */ d("div", {
|
|
1887
1996
|
className: `${$.panel} ${i}`,
|
|
1888
1997
|
"aria-label": o,
|
|
@@ -1911,7 +2020,7 @@ function ut({ header: e, children: t, composer: n, hints: r = lt, className: i =
|
|
|
1911
2020
|
}
|
|
1912
2021
|
//#endregion
|
|
1913
2022
|
//#region src/components/Chat/Message.tsx
|
|
1914
|
-
function
|
|
2023
|
+
function mt({ children: e, className: t = "" }) {
|
|
1915
2024
|
return /* @__PURE__ */ u("div", {
|
|
1916
2025
|
className: $.userRow,
|
|
1917
2026
|
children: /* @__PURE__ */ u("div", {
|
|
@@ -1920,7 +2029,7 @@ function dt({ children: e, className: t = "" }) {
|
|
|
1920
2029
|
})
|
|
1921
2030
|
});
|
|
1922
2031
|
}
|
|
1923
|
-
function
|
|
2032
|
+
function ht({ label: e = "Assistant", icon: t, children: n, className: r = "" }) {
|
|
1924
2033
|
return /* @__PURE__ */ d("div", {
|
|
1925
2034
|
className: `${$.assistant} ${r}`,
|
|
1926
2035
|
children: [/* @__PURE__ */ d("div", {
|
|
@@ -1937,13 +2046,13 @@ function ft({ label: e = "Assistant", icon: t, children: n, className: r = "" })
|
|
|
1937
2046
|
}
|
|
1938
2047
|
//#endregion
|
|
1939
2048
|
//#region src/components/Chat/Composer.tsx
|
|
1940
|
-
var
|
|
2049
|
+
var gt = 18, _t = e.forwardRef(function({ value: e, onChange: t, onSend: n, onStop: a, streaming: c = !1, placeholder: l = "Ask a question…", disabled: m = !1, autoFocus: h = !1, icon: g, maxLines: _ = 6, className: v = "", "aria-label": y = "Message" }, b) {
|
|
1941
2050
|
let x = s(null);
|
|
1942
2051
|
o(b, () => ({ focus: () => x.current?.focus() }), []), i(() => {
|
|
1943
2052
|
let e = x.current;
|
|
1944
2053
|
if (!e) return;
|
|
1945
2054
|
e.style.height = "auto";
|
|
1946
|
-
let t =
|
|
2055
|
+
let t = gt * _ + 12;
|
|
1947
2056
|
e.style.height = `${Math.min(e.scrollHeight, t)}px`;
|
|
1948
2057
|
}, [e, _]);
|
|
1949
2058
|
let S = !c && !m && e.trim().length > 0, w = r(() => {
|
|
@@ -1999,7 +2108,7 @@ var pt = 18, mt = e.forwardRef(function({ value: e, onChange: t, onSend: n, onSt
|
|
|
1999
2108
|
});
|
|
2000
2109
|
//#endregion
|
|
2001
2110
|
//#region src/components/Chat/Citation.tsx
|
|
2002
|
-
function
|
|
2111
|
+
function vt({ n: e, href: t, onClick: n, title: r, className: i = "" }) {
|
|
2003
2112
|
let a = `${$.ref} ${i}`;
|
|
2004
2113
|
return t ? /* @__PURE__ */ u("a", {
|
|
2005
2114
|
href: t,
|
|
@@ -2017,7 +2126,7 @@ function ht({ n: e, href: t, onClick: n, title: r, className: i = "" }) {
|
|
|
2017
2126
|
children: e
|
|
2018
2127
|
});
|
|
2019
2128
|
}
|
|
2020
|
-
function
|
|
2129
|
+
function yt({ items: e, label: t = "Sources", className: n = "" }) {
|
|
2021
2130
|
return e.length === 0 ? null : /* @__PURE__ */ d("div", {
|
|
2022
2131
|
className: `${$.stack} ${n}`,
|
|
2023
2132
|
children: [/* @__PURE__ */ u("div", {
|
|
@@ -2026,7 +2135,7 @@ function gt({ items: e, label: t = "Sources", className: n = "" }) {
|
|
|
2026
2135
|
}), /* @__PURE__ */ u("div", {
|
|
2027
2136
|
className: $.wrap,
|
|
2028
2137
|
children: e.map((e) => {
|
|
2029
|
-
let t = /* @__PURE__ */ d(
|
|
2138
|
+
let t = /* @__PURE__ */ d(Ne, {
|
|
2030
2139
|
icon: e.icon,
|
|
2031
2140
|
children: [
|
|
2032
2141
|
/* @__PURE__ */ u("span", {
|
|
@@ -2054,7 +2163,7 @@ function gt({ items: e, label: t = "Sources", className: n = "" }) {
|
|
|
2054
2163
|
}
|
|
2055
2164
|
//#endregion
|
|
2056
2165
|
//#region src/components/Chat/StreamStatus.tsx
|
|
2057
|
-
function
|
|
2166
|
+
function bt({ children: e, className: t = "" }) {
|
|
2058
2167
|
return /* @__PURE__ */ d("div", {
|
|
2059
2168
|
className: `${$.status} ${t}`,
|
|
2060
2169
|
role: "status",
|
|
@@ -2066,7 +2175,7 @@ function _t({ children: e, className: t = "" }) {
|
|
|
2066
2175
|
}
|
|
2067
2176
|
//#endregion
|
|
2068
2177
|
//#region src/components/Chat/Suggestions.tsx
|
|
2069
|
-
function
|
|
2178
|
+
function xt({ items: e, onPick: t, label: n = "Try asking", className: r = "" }) {
|
|
2070
2179
|
return /* @__PURE__ */ d("div", {
|
|
2071
2180
|
className: `${$.suggestions} ${r}`,
|
|
2072
2181
|
children: [/* @__PURE__ */ u("div", {
|
|
@@ -2085,7 +2194,7 @@ function vt({ items: e, onPick: t, label: n = "Try asking", className: r = "" })
|
|
|
2085
2194
|
}
|
|
2086
2195
|
//#endregion
|
|
2087
2196
|
//#region src/components/Chat/AnswerActions.tsx
|
|
2088
|
-
function
|
|
2197
|
+
function St({ onCopy: e, copied: t = !1, onFollowUp: n, followUpLabel: r = "Ask a follow-up", className: i = "" }) {
|
|
2089
2198
|
return /* @__PURE__ */ d("div", {
|
|
2090
2199
|
className: `${$.actions} ${i}`,
|
|
2091
2200
|
children: [
|
|
@@ -2107,5 +2216,59 @@ function yt({ onCopy: e, copied: t = !1, onFollowUp: n, followUpLabel: r = "Ask
|
|
|
2107
2216
|
]
|
|
2108
2217
|
});
|
|
2109
2218
|
}
|
|
2219
|
+
var Ct = {
|
|
2220
|
+
truncate: "_truncate_za4sm_1",
|
|
2221
|
+
start: "_start_za4sm_13"
|
|
2222
|
+
};
|
|
2223
|
+
//#endregion
|
|
2224
|
+
//#region src/components/Truncate/Truncate.tsx
|
|
2225
|
+
function wt({ children: e, side: t = "end", title: n, className: r = "" }) {
|
|
2226
|
+
let i = n ?? (typeof e == "string" ? e : void 0);
|
|
2227
|
+
return /* @__PURE__ */ u("span", {
|
|
2228
|
+
className: `${Ct.truncate} ${t === "start" ? Ct.start : ""} ${r}`,
|
|
2229
|
+
title: i,
|
|
2230
|
+
children: t === "start" ? /* @__PURE__ */ u("bdi", { children: e }) : e
|
|
2231
|
+
});
|
|
2232
|
+
}
|
|
2233
|
+
var Tt = {
|
|
2234
|
+
disclosure: "_disclosure_94bgy_1",
|
|
2235
|
+
trigger: "_trigger_94bgy_7",
|
|
2236
|
+
summary: "_summary_94bgy_31",
|
|
2237
|
+
chevron: "_chevron_94bgy_36",
|
|
2238
|
+
content: "_content_94bgy_43"
|
|
2239
|
+
};
|
|
2240
|
+
//#endregion
|
|
2241
|
+
//#region src/components/Disclosure/Disclosure.tsx
|
|
2242
|
+
function Et({ summary: t, children: n, open: r, defaultOpen: i = !1, onOpenChange: a, className: o = "" }) {
|
|
2243
|
+
let [s, c] = e.useState(i), l = r ?? s, f = e.useId();
|
|
2244
|
+
return /* @__PURE__ */ d("div", {
|
|
2245
|
+
className: `${Tt.disclosure} ${o}`,
|
|
2246
|
+
"data-state": l ? "open" : "closed",
|
|
2247
|
+
children: [/* @__PURE__ */ d("button", {
|
|
2248
|
+
type: "button",
|
|
2249
|
+
className: Tt.trigger,
|
|
2250
|
+
"aria-expanded": l,
|
|
2251
|
+
"aria-controls": l ? f : void 0,
|
|
2252
|
+
onClick: () => {
|
|
2253
|
+
r === void 0 && c(!l), a?.(!l);
|
|
2254
|
+
},
|
|
2255
|
+
children: [/* @__PURE__ */ u("span", {
|
|
2256
|
+
className: Tt.summary,
|
|
2257
|
+
children: t
|
|
2258
|
+
}), /* @__PURE__ */ u("span", {
|
|
2259
|
+
className: Tt.chevron,
|
|
2260
|
+
"aria-hidden": "true",
|
|
2261
|
+
children: u(l ? h : _, {
|
|
2262
|
+
size: 14,
|
|
2263
|
+
color: "currentColor"
|
|
2264
|
+
})
|
|
2265
|
+
})]
|
|
2266
|
+
}), l && /* @__PURE__ */ u("div", {
|
|
2267
|
+
id: f,
|
|
2268
|
+
className: Tt.content,
|
|
2269
|
+
children: n
|
|
2270
|
+
})]
|
|
2271
|
+
});
|
|
2272
|
+
}
|
|
2110
2273
|
//#endregion
|
|
2111
|
-
export {
|
|
2274
|
+
export { Ie as Alert, Re as AlertDescription, Le as AlertTitle, St as AnswerActions, ht as AssistantMessage, ae as Base, ke as Breadcrumbs, P as Button, Je as Chart, pt as ChatPanel, re as Checkbox, Ne as Chip, yt as CitationList, vt as CitationRef, _t as Composer, tt as DatePicker, Et as Disclosure, oe as FilterPanelBase, le as InputField, dt as Kbd, Xe as Modal, it as NavigationMenu, lt as NavigationMenuContent, ot as NavigationMenuItem, ut as NavigationMenuLink, at as NavigationMenuList, ct as NavigationMenuTrigger, _e as Popover, je as ProgressBar, de as RadioButton, Be as SaveBar, ce as SearchField, he as Select, me as Slider, N as Spinner, bt as StreamStatus, xt as Suggestions, ve as Table, xe as TableCell, ye as TableHeader, Ce as TableIcon, be as TableRow, Se as TableValue, Ee as Tabs, Ye as Textarea, pe as ToggleSwitch, He as Tooltip, wt as Truncate, mt as UserMessage, ft as defaultChatHints, ne as spinnerNames };
|