@raydenui/ui 0.8.0 → 0.9.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/README.md +4 -4
- package/dist/index.cjs +487 -115
- package/dist/index.js +487 -115
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5707,11 +5707,7 @@ var Accordion = forwardRef(
|
|
|
5707
5707
|
"div",
|
|
5708
5708
|
{
|
|
5709
5709
|
ref,
|
|
5710
|
-
className: cn(
|
|
5711
|
-
"w-full",
|
|
5712
|
-
type === "nested" && "flex flex-col gap-3",
|
|
5713
|
-
className
|
|
5714
|
-
),
|
|
5710
|
+
className: cn("w-full", type === "nested" && "flex flex-col gap-3", className),
|
|
5715
5711
|
...rest,
|
|
5716
5712
|
children
|
|
5717
5713
|
}
|
|
@@ -5732,13 +5728,7 @@ var AccordionItem = forwardRef(
|
|
|
5732
5728
|
ref,
|
|
5733
5729
|
className: cn(
|
|
5734
5730
|
"border-solid transition-colors",
|
|
5735
|
-
type === "default" ? cn(
|
|
5736
|
-
"border-b",
|
|
5737
|
-
isOpen ? "border-primary-300" : "border-grey-100"
|
|
5738
|
-
) : cn(
|
|
5739
|
-
"border rounded-[10px]",
|
|
5740
|
-
isOpen ? "border-primary-300" : "border-grey-75"
|
|
5741
|
-
),
|
|
5731
|
+
type === "default" ? cn("border-b", isOpen ? "border-primary-300" : "border-grey-100") : cn("border rounded-[10px]", isOpen ? "border-primary-300" : "border-grey-75"),
|
|
5742
5732
|
className
|
|
5743
5733
|
),
|
|
5744
5734
|
...rest,
|
|
@@ -5999,7 +5989,7 @@ var Input = forwardRef(
|
|
|
5999
5989
|
disabled && "cursor-not-allowed"
|
|
6000
5990
|
),
|
|
6001
5991
|
children: [
|
|
6002
|
-
leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", children: resolveIcon(leadingIcon, "md") }),
|
|
5992
|
+
leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", "aria-hidden": "true", children: resolveIcon(leadingIcon, "md") }),
|
|
6003
5993
|
/* @__PURE__ */ jsx(
|
|
6004
5994
|
"input",
|
|
6005
5995
|
{
|
|
@@ -6019,7 +6009,7 @@ var Input = forwardRef(
|
|
|
6019
6009
|
}
|
|
6020
6010
|
),
|
|
6021
6011
|
addonRight && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-sm text-grey-500", children: addonRight }),
|
|
6022
|
-
trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", children: resolveIcon(trailingIcon, "md") })
|
|
6012
|
+
trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", "aria-hidden": "true", children: resolveIcon(trailingIcon, "md") })
|
|
6023
6013
|
]
|
|
6024
6014
|
}
|
|
6025
6015
|
),
|
|
@@ -6059,7 +6049,7 @@ var Input = forwardRef(
|
|
|
6059
6049
|
readOnly ? "bg-grey-100 border-grey-300" : disabled ? "bg-grey-50 border-grey-200 cursor-not-allowed" : cn("bg-white dark:bg-grey-50", borderColor)
|
|
6060
6050
|
),
|
|
6061
6051
|
children: [
|
|
6062
|
-
leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", children: resolveIcon(leadingIcon, "md") }),
|
|
6052
|
+
leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", "aria-hidden": "true", children: resolveIcon(leadingIcon, "md") }),
|
|
6063
6053
|
/* @__PURE__ */ jsx(
|
|
6064
6054
|
"input",
|
|
6065
6055
|
{
|
|
@@ -6079,7 +6069,7 @@ var Input = forwardRef(
|
|
|
6079
6069
|
}
|
|
6080
6070
|
),
|
|
6081
6071
|
addonRight && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-sm text-grey-500", children: addonRight }),
|
|
6082
|
-
trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", children: resolveIcon(trailingIcon, "md") })
|
|
6072
|
+
trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", "aria-hidden": "true", children: resolveIcon(trailingIcon, "md") })
|
|
6083
6073
|
]
|
|
6084
6074
|
}
|
|
6085
6075
|
),
|
|
@@ -6517,24 +6507,37 @@ var RaydenChart = forwardRef(
|
|
|
6517
6507
|
[type, options]
|
|
6518
6508
|
);
|
|
6519
6509
|
const ChartComponent = chartComponentMap[type];
|
|
6520
|
-
return /* @__PURE__ */ jsx(
|
|
6521
|
-
"div",
|
|
6522
|
-
{
|
|
6523
|
-
ref,
|
|
6524
|
-
className: cn("relative", className),
|
|
6525
|
-
style: { height, width },
|
|
6526
|
-
...rest,
|
|
6527
|
-
children: /* @__PURE__ */ jsx(ChartComponent, { data, options: mergedOptions })
|
|
6528
|
-
}
|
|
6529
|
-
);
|
|
6510
|
+
return /* @__PURE__ */ jsx("div", { ref, className: cn("relative", className), style: { height, width }, ...rest, children: /* @__PURE__ */ jsx(ChartComponent, { data, options: mergedOptions }) });
|
|
6530
6511
|
}
|
|
6531
6512
|
);
|
|
6532
6513
|
RaydenChart.displayName = "RaydenChart";
|
|
6533
6514
|
function MinusIcon({ className }) {
|
|
6534
|
-
return /* @__PURE__ */ jsx(
|
|
6515
|
+
return /* @__PURE__ */ jsx(
|
|
6516
|
+
"svg",
|
|
6517
|
+
{
|
|
6518
|
+
className,
|
|
6519
|
+
viewBox: "0 0 24 24",
|
|
6520
|
+
fill: "none",
|
|
6521
|
+
stroke: "currentColor",
|
|
6522
|
+
strokeWidth: 2,
|
|
6523
|
+
strokeLinecap: "round",
|
|
6524
|
+
children: /* @__PURE__ */ jsx("path", { d: "M5 12h14" })
|
|
6525
|
+
}
|
|
6526
|
+
);
|
|
6535
6527
|
}
|
|
6536
6528
|
function PlusIcon({ className }) {
|
|
6537
|
-
return /* @__PURE__ */ jsx(
|
|
6529
|
+
return /* @__PURE__ */ jsx(
|
|
6530
|
+
"svg",
|
|
6531
|
+
{
|
|
6532
|
+
className,
|
|
6533
|
+
viewBox: "0 0 24 24",
|
|
6534
|
+
fill: "none",
|
|
6535
|
+
stroke: "currentColor",
|
|
6536
|
+
strokeWidth: 2,
|
|
6537
|
+
strokeLinecap: "round",
|
|
6538
|
+
children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14" })
|
|
6539
|
+
}
|
|
6540
|
+
);
|
|
6538
6541
|
}
|
|
6539
6542
|
var buttonSize = {
|
|
6540
6543
|
sm: "size-8 rounded-[10px]",
|
|
@@ -6612,10 +6615,7 @@ var Counter = forwardRef(
|
|
|
6612
6615
|
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx(
|
|
6613
6616
|
"span",
|
|
6614
6617
|
{
|
|
6615
|
-
className: cn(
|
|
6616
|
-
"font-medium text-grey-900 text-center leading-[1.45]",
|
|
6617
|
-
valueText[size]
|
|
6618
|
-
),
|
|
6618
|
+
className: cn("font-medium text-grey-900 text-center leading-[1.45]", valueText[size]),
|
|
6619
6619
|
children: val
|
|
6620
6620
|
}
|
|
6621
6621
|
) }),
|
|
@@ -6659,14 +6659,15 @@ var NumberCounter = forwardRef(
|
|
|
6659
6659
|
"div",
|
|
6660
6660
|
{
|
|
6661
6661
|
ref,
|
|
6662
|
-
className: cn(
|
|
6663
|
-
"inline-flex items-center justify-center",
|
|
6664
|
-
s.container,
|
|
6665
|
-
c.bg,
|
|
6666
|
-
className
|
|
6667
|
-
),
|
|
6662
|
+
className: cn("inline-flex items-center justify-center", s.container, c.bg, className),
|
|
6668
6663
|
...rest,
|
|
6669
|
-
children: /* @__PURE__ */ jsx(
|
|
6664
|
+
children: /* @__PURE__ */ jsx(
|
|
6665
|
+
"span",
|
|
6666
|
+
{
|
|
6667
|
+
className: cn("font-semibold text-center leading-[1.45] tracking-tight", s.text, c.text),
|
|
6668
|
+
children: value
|
|
6669
|
+
}
|
|
6670
|
+
)
|
|
6670
6671
|
}
|
|
6671
6672
|
);
|
|
6672
6673
|
}
|
|
@@ -6714,15 +6715,54 @@ function isDateDisabled(date, minDate, maxDate) {
|
|
|
6714
6715
|
return false;
|
|
6715
6716
|
}
|
|
6716
6717
|
function ChevronLeft({ className }) {
|
|
6717
|
-
return /* @__PURE__ */ jsx(
|
|
6718
|
+
return /* @__PURE__ */ jsx(
|
|
6719
|
+
"svg",
|
|
6720
|
+
{
|
|
6721
|
+
className,
|
|
6722
|
+
viewBox: "0 0 14 14",
|
|
6723
|
+
fill: "none",
|
|
6724
|
+
stroke: "currentColor",
|
|
6725
|
+
strokeWidth: 2,
|
|
6726
|
+
strokeLinecap: "round",
|
|
6727
|
+
strokeLinejoin: "round",
|
|
6728
|
+
"aria-hidden": "true",
|
|
6729
|
+
children: /* @__PURE__ */ jsx("path", { d: "M9 3L5 7l4 4" })
|
|
6730
|
+
}
|
|
6731
|
+
);
|
|
6718
6732
|
}
|
|
6719
6733
|
function ChevronRight({ className }) {
|
|
6720
|
-
return /* @__PURE__ */ jsx(
|
|
6734
|
+
return /* @__PURE__ */ jsx(
|
|
6735
|
+
"svg",
|
|
6736
|
+
{
|
|
6737
|
+
className,
|
|
6738
|
+
viewBox: "0 0 14 14",
|
|
6739
|
+
fill: "none",
|
|
6740
|
+
stroke: "currentColor",
|
|
6741
|
+
strokeWidth: 2,
|
|
6742
|
+
strokeLinecap: "round",
|
|
6743
|
+
strokeLinejoin: "round",
|
|
6744
|
+
"aria-hidden": "true",
|
|
6745
|
+
children: /* @__PURE__ */ jsx("path", { d: "M5 3l4 4-4 4" })
|
|
6746
|
+
}
|
|
6747
|
+
);
|
|
6721
6748
|
}
|
|
6722
6749
|
function ChevronDown2({ className }) {
|
|
6723
|
-
return /* @__PURE__ */ jsx(
|
|
6750
|
+
return /* @__PURE__ */ jsx(
|
|
6751
|
+
"svg",
|
|
6752
|
+
{
|
|
6753
|
+
className,
|
|
6754
|
+
viewBox: "0 0 24 24",
|
|
6755
|
+
fill: "none",
|
|
6756
|
+
stroke: "currentColor",
|
|
6757
|
+
strokeWidth: 2,
|
|
6758
|
+
strokeLinecap: "round",
|
|
6759
|
+
strokeLinejoin: "round",
|
|
6760
|
+
"aria-hidden": "true",
|
|
6761
|
+
children: /* @__PURE__ */ jsx("path", { d: "M6 9l6 6 6-6" })
|
|
6762
|
+
}
|
|
6763
|
+
);
|
|
6724
6764
|
}
|
|
6725
|
-
function DayCell({ day, state, onClick }) {
|
|
6765
|
+
function DayCell({ day, state, fullDate, onClick }) {
|
|
6726
6766
|
const isInteractive = state !== "disabled";
|
|
6727
6767
|
const cellClasses = cn(
|
|
6728
6768
|
"flex items-center justify-center w-10 h-10 text-sm font-medium relative select-none",
|
|
@@ -6735,6 +6775,13 @@ function DayCell({ day, state, onClick }) {
|
|
|
6735
6775
|
state === "today" && "text-grey-900 hover:bg-grey-75 rounded-[10px]",
|
|
6736
6776
|
isInteractive && "cursor-pointer"
|
|
6737
6777
|
);
|
|
6778
|
+
const dateLabel = fullDate.toLocaleDateString("en-US", {
|
|
6779
|
+
weekday: "long",
|
|
6780
|
+
year: "numeric",
|
|
6781
|
+
month: "long",
|
|
6782
|
+
day: "numeric"
|
|
6783
|
+
});
|
|
6784
|
+
const stateLabel = state === "today" ? "Today, " : state === "selected" ? "Selected, " : state === "start-range" ? "Start of range, " : state === "end-range" ? "End of range, " : state === "mid-range" ? "In selected range, " : "";
|
|
6738
6785
|
return /* @__PURE__ */ jsxs(
|
|
6739
6786
|
"button",
|
|
6740
6787
|
{
|
|
@@ -6743,9 +6790,12 @@ function DayCell({ day, state, onClick }) {
|
|
|
6743
6790
|
onClick: isInteractive ? onClick : void 0,
|
|
6744
6791
|
disabled: !isInteractive,
|
|
6745
6792
|
tabIndex: isInteractive ? 0 : -1,
|
|
6793
|
+
"aria-label": `${stateLabel}${dateLabel}`,
|
|
6794
|
+
"aria-current": state === "today" ? "date" : void 0,
|
|
6795
|
+
"aria-pressed": state === "selected" || state === "start-range" || state === "end-range" ? true : void 0,
|
|
6746
6796
|
children: [
|
|
6747
6797
|
day,
|
|
6748
|
-
state === "today" && /* @__PURE__ */ jsx("span", { className: "absolute bottom-[5px] left-1/2 -translate-x-1/2 size-1 rounded-full bg-primary-400" })
|
|
6798
|
+
state === "today" && /* @__PURE__ */ jsx("span", { className: "absolute bottom-[5px] left-1/2 -translate-x-1/2 size-1 rounded-full bg-primary-400", "aria-hidden": "true" })
|
|
6749
6799
|
]
|
|
6750
6800
|
}
|
|
6751
6801
|
);
|
|
@@ -6801,20 +6851,24 @@ function MonthGrid({
|
|
|
6801
6851
|
if (rows.length === 6 && rows[5].every((c) => c.state === "disabled")) {
|
|
6802
6852
|
rows.pop();
|
|
6803
6853
|
}
|
|
6804
|
-
|
|
6805
|
-
|
|
6854
|
+
const fullDayNames = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
|
|
6855
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", role: "grid", "aria-label": "Calendar", children: [
|
|
6856
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-10 items-center", role: "row", children: DAY_LABELS.map((label, i) => /* @__PURE__ */ jsx(
|
|
6806
6857
|
"div",
|
|
6807
6858
|
{
|
|
6859
|
+
role: "columnheader",
|
|
6860
|
+
"aria-label": fullDayNames[i],
|
|
6808
6861
|
className: "flex items-center justify-center w-10 h-10 text-sm font-medium text-grey-400",
|
|
6809
6862
|
children: label
|
|
6810
6863
|
},
|
|
6811
6864
|
i
|
|
6812
6865
|
)) }),
|
|
6813
|
-
rows.map((row, ri) => /* @__PURE__ */ jsx("div", { className: "flex h-10 items-center", children: row.map((cell, ci) => /* @__PURE__ */ jsx(
|
|
6866
|
+
rows.map((row, ri) => /* @__PURE__ */ jsx("div", { className: "flex h-10 items-center", role: "row", children: row.map((cell, ci) => /* @__PURE__ */ jsx(
|
|
6814
6867
|
DayCell,
|
|
6815
6868
|
{
|
|
6816
6869
|
day: cell.day,
|
|
6817
6870
|
state: cell.state,
|
|
6871
|
+
fullDate: cell.date,
|
|
6818
6872
|
onClick: () => onDayClick(cell.date)
|
|
6819
6873
|
},
|
|
6820
6874
|
ci
|
|
@@ -6830,10 +6884,12 @@ function YearGrid({ baseYear, selectedYear, onYearClick }) {
|
|
|
6830
6884
|
for (let i = 0; i < years.length; i += 4) {
|
|
6831
6885
|
rows.push(years.slice(i, i + 4));
|
|
6832
6886
|
}
|
|
6833
|
-
return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 w-full", children: rows.map((row, ri) => /* @__PURE__ */ jsx("div", { className: "flex gap-4 h-10 items-center w-full", children: row.map((year) => /* @__PURE__ */ jsx(
|
|
6887
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 w-full", role: "grid", "aria-label": "Year selection", children: rows.map((row, ri) => /* @__PURE__ */ jsx("div", { className: "flex gap-4 h-10 items-center w-full", role: "row", children: row.map((year) => /* @__PURE__ */ jsx(
|
|
6834
6888
|
"button",
|
|
6835
6889
|
{
|
|
6836
6890
|
type: "button",
|
|
6891
|
+
"aria-label": year === selectedYear ? `${year}, selected` : String(year),
|
|
6892
|
+
"aria-pressed": year === selectedYear || void 0,
|
|
6837
6893
|
className: cn(
|
|
6838
6894
|
"flex-1 flex items-center justify-center py-2.5 px-4 rounded-[10px] text-sm font-medium cursor-pointer select-none",
|
|
6839
6895
|
year === selectedYear ? "bg-primary-400 text-white" : "text-grey-900 hover:bg-grey-75"
|
|
@@ -6854,6 +6910,9 @@ function NavButton({
|
|
|
6854
6910
|
{
|
|
6855
6911
|
type: "button",
|
|
6856
6912
|
onClick,
|
|
6913
|
+
"aria-label": direction === "left" ? "Previous month" : "Next month",
|
|
6914
|
+
"aria-hidden": hidden || void 0,
|
|
6915
|
+
tabIndex: hidden ? -1 : void 0,
|
|
6857
6916
|
className: cn(
|
|
6858
6917
|
"flex items-center justify-center p-2 rounded-lg bg-grey-75 hover:bg-grey-200 transition-colors cursor-pointer",
|
|
6859
6918
|
hidden && "opacity-0 pointer-events-none"
|
|
@@ -7348,37 +7407,91 @@ function ProgressCircle({
|
|
|
7348
7407
|
var statusColors = {
|
|
7349
7408
|
information: {
|
|
7350
7409
|
bold: { bg: "bg-[#4a9fed]", divider: "bg-[#f0f7ff]" },
|
|
7351
|
-
subtle: {
|
|
7410
|
+
subtle: {
|
|
7411
|
+
bg: "bg-[#f0f7ff]",
|
|
7412
|
+
text: "text-grey-900",
|
|
7413
|
+
descText: "text-grey-600",
|
|
7414
|
+
divider: "bg-[#0063ad]"
|
|
7415
|
+
}
|
|
7352
7416
|
},
|
|
7353
7417
|
success: {
|
|
7354
7418
|
bold: { bg: "bg-success-400", divider: "bg-success-50" },
|
|
7355
|
-
subtle: {
|
|
7419
|
+
subtle: {
|
|
7420
|
+
bg: "bg-success-50",
|
|
7421
|
+
text: "text-grey-900",
|
|
7422
|
+
descText: "text-grey-600",
|
|
7423
|
+
divider: "bg-success-400"
|
|
7424
|
+
}
|
|
7356
7425
|
},
|
|
7357
7426
|
error: {
|
|
7358
7427
|
bold: { bg: "bg-error-400", divider: "bg-error-50" },
|
|
7359
|
-
subtle: {
|
|
7428
|
+
subtle: {
|
|
7429
|
+
bg: "bg-error-50",
|
|
7430
|
+
text: "text-grey-900",
|
|
7431
|
+
descText: "text-grey-600",
|
|
7432
|
+
divider: "bg-error-400"
|
|
7433
|
+
}
|
|
7360
7434
|
},
|
|
7361
7435
|
warning: {
|
|
7362
7436
|
bold: { bg: "bg-warning-400", divider: "bg-warning-50" },
|
|
7363
|
-
subtle: {
|
|
7437
|
+
subtle: {
|
|
7438
|
+
bg: "bg-warning-50",
|
|
7439
|
+
text: "text-grey-900",
|
|
7440
|
+
descText: "text-grey-600",
|
|
7441
|
+
divider: "bg-warning-700"
|
|
7442
|
+
}
|
|
7364
7443
|
},
|
|
7365
7444
|
feature: {
|
|
7366
7445
|
bold: { bg: "bg-grey-900", divider: "bg-grey-100" },
|
|
7367
|
-
subtle: {
|
|
7446
|
+
subtle: {
|
|
7447
|
+
bg: "bg-grey-50",
|
|
7448
|
+
text: "text-black",
|
|
7449
|
+
descText: "text-black",
|
|
7450
|
+
divider: "bg-grey-300"
|
|
7451
|
+
}
|
|
7368
7452
|
},
|
|
7369
7453
|
opportunity: {
|
|
7370
7454
|
bold: { bg: "bg-[#475ccc]", divider: "bg-[#b1bae9]" },
|
|
7371
|
-
subtle: {
|
|
7455
|
+
subtle: {
|
|
7456
|
+
bg: "bg-[#f7f8fd]",
|
|
7457
|
+
text: "text-grey-900",
|
|
7458
|
+
descText: "text-grey-600",
|
|
7459
|
+
divider: "bg-[#b1bae9]"
|
|
7460
|
+
}
|
|
7372
7461
|
}
|
|
7373
7462
|
};
|
|
7374
7463
|
function InfoIcon({ className }) {
|
|
7375
|
-
return /* @__PURE__ */ jsxs(
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7464
|
+
return /* @__PURE__ */ jsxs(
|
|
7465
|
+
"svg",
|
|
7466
|
+
{
|
|
7467
|
+
className,
|
|
7468
|
+
viewBox: "0 0 24 24",
|
|
7469
|
+
fill: "none",
|
|
7470
|
+
stroke: "currentColor",
|
|
7471
|
+
strokeWidth: 2,
|
|
7472
|
+
strokeLinecap: "round",
|
|
7473
|
+
strokeLinejoin: "round",
|
|
7474
|
+
children: [
|
|
7475
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
7476
|
+
/* @__PURE__ */ jsx("path", { d: "M12 16v-4M12 8h.01" })
|
|
7477
|
+
]
|
|
7478
|
+
}
|
|
7479
|
+
);
|
|
7379
7480
|
}
|
|
7380
7481
|
function CloseIcon({ className }) {
|
|
7381
|
-
return /* @__PURE__ */ jsx(
|
|
7482
|
+
return /* @__PURE__ */ jsx(
|
|
7483
|
+
"svg",
|
|
7484
|
+
{
|
|
7485
|
+
className,
|
|
7486
|
+
viewBox: "0 0 24 24",
|
|
7487
|
+
fill: "none",
|
|
7488
|
+
stroke: "currentColor",
|
|
7489
|
+
strokeWidth: 2,
|
|
7490
|
+
strokeLinecap: "round",
|
|
7491
|
+
strokeLinejoin: "round",
|
|
7492
|
+
children: /* @__PURE__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
7493
|
+
}
|
|
7494
|
+
);
|
|
7382
7495
|
}
|
|
7383
7496
|
var Banner = forwardRef(
|
|
7384
7497
|
({
|
|
@@ -7418,7 +7531,13 @@ var Banner = forwardRef(
|
|
|
7418
7531
|
children: [
|
|
7419
7532
|
/* @__PURE__ */ jsxs("div", { className: cn("flex flex-1 items-center", size === "sm" ? "gap-2" : "gap-3"), children: [
|
|
7420
7533
|
icon ? /* @__PURE__ */ jsx("span", { className: cn("shrink-0", iconSize4, textColor), children: resolveIcon(icon, size === "sm" ? "sm" : "md") }) : /* @__PURE__ */ jsx(InfoIcon, { className: cn("shrink-0", iconSize4, textColor) }),
|
|
7421
|
-
/* @__PURE__ */ jsx(
|
|
7534
|
+
/* @__PURE__ */ jsx(
|
|
7535
|
+
"span",
|
|
7536
|
+
{
|
|
7537
|
+
className: cn("font-semibold leading-[1.45] whitespace-nowrap", textSize2, textColor),
|
|
7538
|
+
children: title
|
|
7539
|
+
}
|
|
7540
|
+
),
|
|
7422
7541
|
description && /* @__PURE__ */ jsx("span", { className: cn("leading-[1.45] whitespace-nowrap", textSize2, descColor), children: description }),
|
|
7423
7542
|
buttonLabel && /* @__PURE__ */ jsx(
|
|
7424
7543
|
"button",
|
|
@@ -8069,10 +8188,34 @@ var Toggle = forwardRef(
|
|
|
8069
8188
|
);
|
|
8070
8189
|
Toggle.displayName = "Toggle";
|
|
8071
8190
|
function ChevronRight3({ className }) {
|
|
8072
|
-
return /* @__PURE__ */ jsx(
|
|
8191
|
+
return /* @__PURE__ */ jsx(
|
|
8192
|
+
"svg",
|
|
8193
|
+
{
|
|
8194
|
+
className,
|
|
8195
|
+
viewBox: "0 0 20 20",
|
|
8196
|
+
fill: "none",
|
|
8197
|
+
stroke: "currentColor",
|
|
8198
|
+
strokeWidth: 2,
|
|
8199
|
+
strokeLinecap: "round",
|
|
8200
|
+
strokeLinejoin: "round",
|
|
8201
|
+
children: /* @__PURE__ */ jsx("path", { d: "M7.5 5l5 5-5 5" })
|
|
8202
|
+
}
|
|
8203
|
+
);
|
|
8073
8204
|
}
|
|
8074
8205
|
function DoubleChevronRight({ className }) {
|
|
8075
|
-
return /* @__PURE__ */ jsx(
|
|
8206
|
+
return /* @__PURE__ */ jsx(
|
|
8207
|
+
"svg",
|
|
8208
|
+
{
|
|
8209
|
+
className,
|
|
8210
|
+
viewBox: "0 0 20 20",
|
|
8211
|
+
fill: "none",
|
|
8212
|
+
stroke: "currentColor",
|
|
8213
|
+
strokeWidth: 2,
|
|
8214
|
+
strokeLinecap: "round",
|
|
8215
|
+
strokeLinejoin: "round",
|
|
8216
|
+
children: /* @__PURE__ */ jsx("path", { d: "M5.5 5l5 5-5 5M10.5 5l5 5-5 5" })
|
|
8217
|
+
}
|
|
8218
|
+
);
|
|
8076
8219
|
}
|
|
8077
8220
|
function SeparatorElement({ type }) {
|
|
8078
8221
|
switch (type) {
|
|
@@ -8095,11 +8238,7 @@ function Breadcrumb({
|
|
|
8095
8238
|
"nav",
|
|
8096
8239
|
{
|
|
8097
8240
|
"aria-label": "Breadcrumb",
|
|
8098
|
-
className: cn(
|
|
8099
|
-
"py-2.5",
|
|
8100
|
-
hasBorders && "border-y border-grey-100",
|
|
8101
|
-
className
|
|
8102
|
-
),
|
|
8241
|
+
className: cn("py-2.5", hasBorders && "border-y border-grey-100", className),
|
|
8103
8242
|
...rest,
|
|
8104
8243
|
children: /* @__PURE__ */ jsx("ol", { className: "flex items-center gap-4 text-sm font-medium", children: items.map((item, i) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-4", children: [
|
|
8105
8244
|
i > 0 && /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: /* @__PURE__ */ jsx(SeparatorElement, { type: separator }) }),
|
|
@@ -8272,13 +8411,37 @@ var AvatarGroup = forwardRef(
|
|
|
8272
8411
|
);
|
|
8273
8412
|
AvatarGroup.displayName = "AvatarGroup";
|
|
8274
8413
|
function CloseIcon2({ className }) {
|
|
8275
|
-
return /* @__PURE__ */ jsx(
|
|
8414
|
+
return /* @__PURE__ */ jsx(
|
|
8415
|
+
"svg",
|
|
8416
|
+
{
|
|
8417
|
+
className,
|
|
8418
|
+
viewBox: "0 0 12 12",
|
|
8419
|
+
fill: "none",
|
|
8420
|
+
stroke: "currentColor",
|
|
8421
|
+
strokeWidth: 1.5,
|
|
8422
|
+
strokeLinecap: "round",
|
|
8423
|
+
strokeLinejoin: "round",
|
|
8424
|
+
children: /* @__PURE__ */ jsx("path", { d: "M9 3L3 9M3 3l6 6" })
|
|
8425
|
+
}
|
|
8426
|
+
);
|
|
8276
8427
|
}
|
|
8277
8428
|
function BoxIcon({ className }) {
|
|
8278
|
-
return /* @__PURE__ */ jsxs(
|
|
8279
|
-
|
|
8280
|
-
|
|
8281
|
-
|
|
8429
|
+
return /* @__PURE__ */ jsxs(
|
|
8430
|
+
"svg",
|
|
8431
|
+
{
|
|
8432
|
+
className,
|
|
8433
|
+
viewBox: "0 0 16 16",
|
|
8434
|
+
fill: "none",
|
|
8435
|
+
stroke: "currentColor",
|
|
8436
|
+
strokeWidth: 1.2,
|
|
8437
|
+
strokeLinecap: "round",
|
|
8438
|
+
strokeLinejoin: "round",
|
|
8439
|
+
children: [
|
|
8440
|
+
/* @__PURE__ */ jsx("path", { d: "M2.67 4.67L8 7.33l5.33-2.66M8 14V7.33" }),
|
|
8441
|
+
/* @__PURE__ */ jsx("path", { d: "M13.33 10.67V5.33a1.33 1.33 0 00-.66-1.15L8.67 2a1.33 1.33 0 00-1.34 0L3.33 4.18A1.33 1.33 0 002.67 5.33v5.34a1.33 1.33 0 00.66 1.15L7.33 14a1.33 1.33 0 001.34 0l4-2.18a1.33 1.33 0 00.66-1.15z" })
|
|
8442
|
+
]
|
|
8443
|
+
}
|
|
8444
|
+
);
|
|
8282
8445
|
}
|
|
8283
8446
|
var sizeClasses2 = {
|
|
8284
8447
|
sm: "w-[400px]",
|
|
@@ -8869,6 +9032,8 @@ var FileUploadDropZone = forwardRef(
|
|
|
8869
9032
|
"div",
|
|
8870
9033
|
{
|
|
8871
9034
|
ref,
|
|
9035
|
+
role: "region",
|
|
9036
|
+
"aria-label": "File upload dropzone",
|
|
8872
9037
|
className: cn(
|
|
8873
9038
|
"flex flex-col items-center justify-center rounded-xl p-8 transition-colors",
|
|
8874
9039
|
state === "dragging" ? "border-2 border-dashed border-primary-400 bg-primary-50/10" : state === "uploading" || state === "success" || state === "error" ? "border border-grey-200 bg-white dark:bg-grey-50" : "border-2 border-dashed border-grey-300 bg-white dark:bg-grey-50",
|
|
@@ -8889,11 +9054,12 @@ var FileUploadDropZone = forwardRef(
|
|
|
8889
9054
|
multiple,
|
|
8890
9055
|
onChange: handleFileChange,
|
|
8891
9056
|
className: "sr-only",
|
|
8892
|
-
tabIndex: -1
|
|
9057
|
+
tabIndex: -1,
|
|
9058
|
+
"aria-label": multiple ? "Choose files to upload" : "Choose file to upload"
|
|
8893
9059
|
}
|
|
8894
9060
|
),
|
|
8895
9061
|
(state === "default" || state === "dragging") && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
8896
|
-
/* @__PURE__ */ jsx(UploadStateIcon, { state: "default", size: 56 }),
|
|
9062
|
+
/* @__PURE__ */ jsx(UploadStateIcon, { state: "default", size: 56, "aria-hidden": "true" }),
|
|
8897
9063
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1", children: [
|
|
8898
9064
|
/* @__PURE__ */ jsxs("p", { className: "text-body-sm font-medium text-grey-600", children: [
|
|
8899
9065
|
"Click to upload ",
|
|
@@ -8903,12 +9069,12 @@ var FileUploadDropZone = forwardRef(
|
|
|
8903
9069
|
] }),
|
|
8904
9070
|
/* @__PURE__ */ jsx(Button, { variant: "primary", size: "sm", onClick: handleBrowse, children: "Browse Files" })
|
|
8905
9071
|
] }),
|
|
8906
|
-
state === "uploading" && uploadingFile && /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col items-center gap-4", children: [
|
|
8907
|
-
/* @__PURE__ */ jsx(FileTypeIcon, { type: getFileType(uploadingFile.name) }),
|
|
9072
|
+
state === "uploading" && uploadingFile && /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col items-center gap-4", "aria-live": "polite", "aria-atomic": "true", children: [
|
|
9073
|
+
/* @__PURE__ */ jsx(FileTypeIcon, { type: getFileType(uploadingFile.name), "aria-hidden": "true" }),
|
|
8908
9074
|
/* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-xs flex-col gap-2", children: [
|
|
8909
9075
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
8910
9076
|
/* @__PURE__ */ jsx("span", { className: "text-body-sm font-medium text-grey-700 truncate", children: uploadingFile.name }),
|
|
8911
|
-
/* @__PURE__ */ jsxs("span", { className: "text-body-xs font-medium text-grey-500 ml-2 shrink-0", children: [
|
|
9077
|
+
/* @__PURE__ */ jsxs("span", { className: "text-body-xs font-medium text-grey-500 ml-2 shrink-0", "aria-label": `Upload progress: ${Math.round(uploadingFile.progress)} percent`, children: [
|
|
8912
9078
|
Math.round(uploadingFile.progress),
|
|
8913
9079
|
"%"
|
|
8914
9080
|
] })
|
|
@@ -8916,8 +9082,8 @@ var FileUploadDropZone = forwardRef(
|
|
|
8916
9082
|
/* @__PURE__ */ jsx(ProgressBar, { value: uploadingFile.progress, size: "sm", showPercentage: false })
|
|
8917
9083
|
] })
|
|
8918
9084
|
] }),
|
|
8919
|
-
state === "success" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
8920
|
-
/* @__PURE__ */ jsx(UploadStateIcon, { state: "success", size: 56 }),
|
|
9085
|
+
state === "success" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", role: "status", children: [
|
|
9086
|
+
/* @__PURE__ */ jsx(UploadStateIcon, { state: "success", size: 56, "aria-hidden": "true" }),
|
|
8921
9087
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col items-center gap-1", children: /* @__PURE__ */ jsx("p", { className: "text-body-sm font-semibold text-grey-800", children: "Document Uploaded Successfully" }) }),
|
|
8922
9088
|
/* @__PURE__ */ jsx(
|
|
8923
9089
|
"button",
|
|
@@ -8929,8 +9095,8 @@ var FileUploadDropZone = forwardRef(
|
|
|
8929
9095
|
}
|
|
8930
9096
|
)
|
|
8931
9097
|
] }),
|
|
8932
|
-
state === "error" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
8933
|
-
/* @__PURE__ */ jsx(UploadStateIcon, { state: "error", size: 56 }),
|
|
9098
|
+
state === "error" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", role: "alert", children: [
|
|
9099
|
+
/* @__PURE__ */ jsx(UploadStateIcon, { state: "error", size: 56, "aria-hidden": "true" }),
|
|
8934
9100
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1", children: [
|
|
8935
9101
|
/* @__PURE__ */ jsx("p", { className: "text-body-sm font-semibold text-grey-800", children: "Failed to Upload" }),
|
|
8936
9102
|
errorMessage && /* @__PURE__ */ jsx("p", { className: "text-body-xs text-grey-400", children: errorMessage })
|
|
@@ -9262,7 +9428,7 @@ var SidebarMenu = forwardRef(
|
|
|
9262
9428
|
"nav",
|
|
9263
9429
|
{
|
|
9264
9430
|
ref,
|
|
9265
|
-
|
|
9431
|
+
"aria-label": "Main navigation",
|
|
9266
9432
|
className: cn(
|
|
9267
9433
|
"flex flex-col gap-3 overflow-y-auto rounded-xl py-6",
|
|
9268
9434
|
ts.container,
|
|
@@ -9352,7 +9518,7 @@ var SidebarMenuItem = forwardRef(
|
|
|
9352
9518
|
onClick: () => {
|
|
9353
9519
|
if (!disabled && !isExpandable) onSelect(value);
|
|
9354
9520
|
},
|
|
9355
|
-
|
|
9521
|
+
"aria-label": typeof labelContent === "string" ? labelContent : void 0,
|
|
9356
9522
|
className: cn(
|
|
9357
9523
|
"flex size-11 cursor-pointer items-center justify-center rounded transition-colors",
|
|
9358
9524
|
highlighted ? cn(ts.selectedBg, ts.selectedIcon) : cn(ts.defaultIcon, ts.hoverBg),
|
|
@@ -9371,6 +9537,8 @@ var SidebarMenuItem = forwardRef(
|
|
|
9371
9537
|
ref,
|
|
9372
9538
|
type: "button",
|
|
9373
9539
|
role: "menuitem",
|
|
9540
|
+
"aria-expanded": isExpandable ? open : void 0,
|
|
9541
|
+
"aria-haspopup": isExpandable ? "menu" : void 0,
|
|
9374
9542
|
disabled,
|
|
9375
9543
|
onClick: handleClick,
|
|
9376
9544
|
className: cn(
|
|
@@ -9398,6 +9566,7 @@ var SidebarMenuItem = forwardRef(
|
|
|
9398
9566
|
{
|
|
9399
9567
|
name: open ? "chevron-up" : "chevron-down",
|
|
9400
9568
|
size: "sm",
|
|
9569
|
+
"aria-hidden": "true",
|
|
9401
9570
|
className: cn(
|
|
9402
9571
|
"ml-1 shrink-0 transition-transform",
|
|
9403
9572
|
highlighted ? ts.selectedIcon : ts.defaultIcon
|
|
@@ -12862,6 +13031,7 @@ var TableHead = forwardRef(
|
|
|
12862
13031
|
{
|
|
12863
13032
|
name: sortDirection === "asc" ? "chevron-up" : "chevron-down",
|
|
12864
13033
|
size: "sm",
|
|
13034
|
+
"aria-hidden": "true",
|
|
12865
13035
|
className: cn("shrink-0", sortDirection ? "text-grey-700" : "text-grey-400")
|
|
12866
13036
|
}
|
|
12867
13037
|
)
|
|
@@ -13131,8 +13301,33 @@ function ThinSpinner({ size, color }) {
|
|
|
13131
13301
|
const r = size / 2 - 2;
|
|
13132
13302
|
const c = size / 2;
|
|
13133
13303
|
return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, className: "animate-spin", children: [
|
|
13134
|
-
/* @__PURE__ */ jsx(
|
|
13135
|
-
|
|
13304
|
+
/* @__PURE__ */ jsx(
|
|
13305
|
+
"circle",
|
|
13306
|
+
{
|
|
13307
|
+
cx: c,
|
|
13308
|
+
cy: c,
|
|
13309
|
+
r,
|
|
13310
|
+
fill: "none",
|
|
13311
|
+
stroke: "currentColor",
|
|
13312
|
+
strokeWidth: 1.5,
|
|
13313
|
+
opacity: 0.2,
|
|
13314
|
+
className: color
|
|
13315
|
+
}
|
|
13316
|
+
),
|
|
13317
|
+
/* @__PURE__ */ jsx(
|
|
13318
|
+
"circle",
|
|
13319
|
+
{
|
|
13320
|
+
cx: c,
|
|
13321
|
+
cy: c,
|
|
13322
|
+
r,
|
|
13323
|
+
fill: "none",
|
|
13324
|
+
stroke: "currentColor",
|
|
13325
|
+
strokeWidth: 1.5,
|
|
13326
|
+
strokeDasharray: `${r * Math.PI * 0.75} ${r * Math.PI * 1.25}`,
|
|
13327
|
+
strokeLinecap: "round",
|
|
13328
|
+
className: color
|
|
13329
|
+
}
|
|
13330
|
+
)
|
|
13136
13331
|
] });
|
|
13137
13332
|
}
|
|
13138
13333
|
function BoldSpinner({ size, color }) {
|
|
@@ -13140,8 +13335,33 @@ function BoldSpinner({ size, color }) {
|
|
|
13140
13335
|
const r = size / 2 - sw;
|
|
13141
13336
|
const c = size / 2;
|
|
13142
13337
|
return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, className: "animate-spin", children: [
|
|
13143
|
-
/* @__PURE__ */ jsx(
|
|
13144
|
-
|
|
13338
|
+
/* @__PURE__ */ jsx(
|
|
13339
|
+
"circle",
|
|
13340
|
+
{
|
|
13341
|
+
cx: c,
|
|
13342
|
+
cy: c,
|
|
13343
|
+
r,
|
|
13344
|
+
fill: "none",
|
|
13345
|
+
stroke: "currentColor",
|
|
13346
|
+
strokeWidth: sw,
|
|
13347
|
+
opacity: 0.2,
|
|
13348
|
+
className: color
|
|
13349
|
+
}
|
|
13350
|
+
),
|
|
13351
|
+
/* @__PURE__ */ jsx(
|
|
13352
|
+
"circle",
|
|
13353
|
+
{
|
|
13354
|
+
cx: c,
|
|
13355
|
+
cy: c,
|
|
13356
|
+
r,
|
|
13357
|
+
fill: "none",
|
|
13358
|
+
stroke: "currentColor",
|
|
13359
|
+
strokeWidth: sw,
|
|
13360
|
+
strokeDasharray: `${r * Math.PI * 0.75} ${r * Math.PI * 1.25}`,
|
|
13361
|
+
strokeLinecap: "round",
|
|
13362
|
+
className: color
|
|
13363
|
+
}
|
|
13364
|
+
)
|
|
13145
13365
|
] });
|
|
13146
13366
|
}
|
|
13147
13367
|
function DuoToneSpinner({ size, color }) {
|
|
@@ -13149,8 +13369,33 @@ function DuoToneSpinner({ size, color }) {
|
|
|
13149
13369
|
const r = size / 2 - sw;
|
|
13150
13370
|
const c = size / 2;
|
|
13151
13371
|
return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, className: "animate-spin", children: [
|
|
13152
|
-
/* @__PURE__ */ jsx(
|
|
13153
|
-
|
|
13372
|
+
/* @__PURE__ */ jsx(
|
|
13373
|
+
"circle",
|
|
13374
|
+
{
|
|
13375
|
+
cx: c,
|
|
13376
|
+
cy: c,
|
|
13377
|
+
r,
|
|
13378
|
+
fill: "none",
|
|
13379
|
+
stroke: "currentColor",
|
|
13380
|
+
strokeWidth: sw,
|
|
13381
|
+
opacity: 0.15,
|
|
13382
|
+
className: color
|
|
13383
|
+
}
|
|
13384
|
+
),
|
|
13385
|
+
/* @__PURE__ */ jsx(
|
|
13386
|
+
"circle",
|
|
13387
|
+
{
|
|
13388
|
+
cx: c,
|
|
13389
|
+
cy: c,
|
|
13390
|
+
r,
|
|
13391
|
+
fill: "none",
|
|
13392
|
+
stroke: "currentColor",
|
|
13393
|
+
strokeWidth: sw,
|
|
13394
|
+
strokeDasharray: `${r * Math.PI} ${r * Math.PI}`,
|
|
13395
|
+
strokeLinecap: "round",
|
|
13396
|
+
className: color
|
|
13397
|
+
}
|
|
13398
|
+
)
|
|
13154
13399
|
] });
|
|
13155
13400
|
}
|
|
13156
13401
|
function BufferingThinSpinner({ size, color }) {
|
|
@@ -13158,8 +13403,33 @@ function BufferingThinSpinner({ size, color }) {
|
|
|
13158
13403
|
const c = size / 2;
|
|
13159
13404
|
const circumference = 2 * Math.PI * r;
|
|
13160
13405
|
return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [
|
|
13161
|
-
/* @__PURE__ */ jsx(
|
|
13162
|
-
|
|
13406
|
+
/* @__PURE__ */ jsx(
|
|
13407
|
+
"circle",
|
|
13408
|
+
{
|
|
13409
|
+
cx: c,
|
|
13410
|
+
cy: c,
|
|
13411
|
+
r,
|
|
13412
|
+
fill: "none",
|
|
13413
|
+
stroke: "currentColor",
|
|
13414
|
+
strokeWidth: 1.5,
|
|
13415
|
+
opacity: 0.2,
|
|
13416
|
+
className: color
|
|
13417
|
+
}
|
|
13418
|
+
),
|
|
13419
|
+
/* @__PURE__ */ jsx(
|
|
13420
|
+
"circle",
|
|
13421
|
+
{
|
|
13422
|
+
cx: c,
|
|
13423
|
+
cy: c,
|
|
13424
|
+
r,
|
|
13425
|
+
fill: "none",
|
|
13426
|
+
stroke: "currentColor",
|
|
13427
|
+
strokeWidth: 1.5,
|
|
13428
|
+
strokeLinecap: "round",
|
|
13429
|
+
className: cn(color, "animate-[spinner-dash_1.5s_ease-in-out_infinite]"),
|
|
13430
|
+
style: { strokeDasharray: circumference, transformOrigin: "center" }
|
|
13431
|
+
}
|
|
13432
|
+
)
|
|
13163
13433
|
] });
|
|
13164
13434
|
}
|
|
13165
13435
|
function BufferingBoldSpinner({ size, color }) {
|
|
@@ -13168,8 +13438,33 @@ function BufferingBoldSpinner({ size, color }) {
|
|
|
13168
13438
|
const c = size / 2;
|
|
13169
13439
|
const circumference = 2 * Math.PI * r;
|
|
13170
13440
|
return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [
|
|
13171
|
-
/* @__PURE__ */ jsx(
|
|
13172
|
-
|
|
13441
|
+
/* @__PURE__ */ jsx(
|
|
13442
|
+
"circle",
|
|
13443
|
+
{
|
|
13444
|
+
cx: c,
|
|
13445
|
+
cy: c,
|
|
13446
|
+
r,
|
|
13447
|
+
fill: "none",
|
|
13448
|
+
stroke: "currentColor",
|
|
13449
|
+
strokeWidth: sw,
|
|
13450
|
+
opacity: 0.2,
|
|
13451
|
+
className: color
|
|
13452
|
+
}
|
|
13453
|
+
),
|
|
13454
|
+
/* @__PURE__ */ jsx(
|
|
13455
|
+
"circle",
|
|
13456
|
+
{
|
|
13457
|
+
cx: c,
|
|
13458
|
+
cy: c,
|
|
13459
|
+
r,
|
|
13460
|
+
fill: "none",
|
|
13461
|
+
stroke: "currentColor",
|
|
13462
|
+
strokeWidth: sw,
|
|
13463
|
+
strokeLinecap: "round",
|
|
13464
|
+
className: cn(color, "animate-[spinner-dash_1.5s_ease-in-out_infinite]"),
|
|
13465
|
+
style: { strokeDasharray: circumference, transformOrigin: "center" }
|
|
13466
|
+
}
|
|
13467
|
+
)
|
|
13173
13468
|
] });
|
|
13174
13469
|
}
|
|
13175
13470
|
function DotSpinner({ size, color }) {
|
|
@@ -13180,14 +13475,36 @@ function DotSpinner({ size, color }) {
|
|
|
13180
13475
|
const angle = i * 45 * Math.PI / 180;
|
|
13181
13476
|
const x = c + r * Math.cos(angle);
|
|
13182
13477
|
const y = c + r * Math.sin(angle);
|
|
13183
|
-
return /* @__PURE__ */ jsx(
|
|
13478
|
+
return /* @__PURE__ */ jsx(
|
|
13479
|
+
"circle",
|
|
13480
|
+
{
|
|
13481
|
+
cx: x,
|
|
13482
|
+
cy: y,
|
|
13483
|
+
r: dotSize / 2,
|
|
13484
|
+
fill: "currentColor",
|
|
13485
|
+
opacity: 0.15 + i / 8 * 0.85,
|
|
13486
|
+
className: color
|
|
13487
|
+
},
|
|
13488
|
+
i
|
|
13489
|
+
);
|
|
13184
13490
|
}) });
|
|
13185
13491
|
}
|
|
13186
13492
|
function JugglingSpinner({ size, color }) {
|
|
13187
13493
|
const dotSize = Math.max(3, size * 0.18);
|
|
13188
13494
|
return /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [0, 1, 2].map((i) => {
|
|
13189
13495
|
const cx = size / 2 + (i - 1) * (size * 0.35);
|
|
13190
|
-
return /* @__PURE__ */ jsx(
|
|
13496
|
+
return /* @__PURE__ */ jsx(
|
|
13497
|
+
"circle",
|
|
13498
|
+
{
|
|
13499
|
+
cx,
|
|
13500
|
+
cy: size / 2,
|
|
13501
|
+
r: dotSize / 2,
|
|
13502
|
+
fill: "currentColor",
|
|
13503
|
+
className: cn(color, "animate-[juggle_1.4s_ease-in-out_infinite]"),
|
|
13504
|
+
style: { animationDelay: `${i * 0.16}s` }
|
|
13505
|
+
},
|
|
13506
|
+
i
|
|
13507
|
+
);
|
|
13191
13508
|
}) });
|
|
13192
13509
|
}
|
|
13193
13510
|
var Spinner = forwardRef(
|
|
@@ -13246,7 +13563,19 @@ var Spinner = forwardRef(
|
|
|
13246
13563
|
);
|
|
13247
13564
|
Spinner.displayName = "Spinner";
|
|
13248
13565
|
function CheckIcon({ className }) {
|
|
13249
|
-
return /* @__PURE__ */ jsx(
|
|
13566
|
+
return /* @__PURE__ */ jsx(
|
|
13567
|
+
"svg",
|
|
13568
|
+
{
|
|
13569
|
+
className,
|
|
13570
|
+
viewBox: "0 0 24 24",
|
|
13571
|
+
fill: "none",
|
|
13572
|
+
stroke: "currentColor",
|
|
13573
|
+
strokeWidth: 3,
|
|
13574
|
+
strokeLinecap: "round",
|
|
13575
|
+
strokeLinejoin: "round",
|
|
13576
|
+
children: /* @__PURE__ */ jsx("path", { d: "M5 12l5 5L20 7" })
|
|
13577
|
+
}
|
|
13578
|
+
);
|
|
13250
13579
|
}
|
|
13251
13580
|
function StepCircle({
|
|
13252
13581
|
status,
|
|
@@ -13275,7 +13604,16 @@ function StepCircle({
|
|
|
13275
13604
|
isActive ? "bg-primary-400 border-primary-400" : isDisabled ? "bg-grey-300 border-grey-300" : "bg-grey-400 border-grey-300"
|
|
13276
13605
|
)
|
|
13277
13606
|
}
|
|
13278
|
-
) : indicator === "number" ? /* @__PURE__ */ jsx(
|
|
13607
|
+
) : indicator === "number" ? /* @__PURE__ */ jsx(
|
|
13608
|
+
"span",
|
|
13609
|
+
{
|
|
13610
|
+
className: cn(
|
|
13611
|
+
"text-xs font-medium",
|
|
13612
|
+
isActive ? "text-primary-400" : isDisabled ? "text-grey-300" : "text-grey-500"
|
|
13613
|
+
),
|
|
13614
|
+
children: stepNumber
|
|
13615
|
+
}
|
|
13616
|
+
) : icon ?? /* @__PURE__ */ jsx(
|
|
13279
13617
|
"div",
|
|
13280
13618
|
{
|
|
13281
13619
|
className: cn(
|
|
@@ -13291,7 +13629,20 @@ function Connector({
|
|
|
13291
13629
|
orientation,
|
|
13292
13630
|
completed
|
|
13293
13631
|
}) {
|
|
13294
|
-
return orientation === "horizontal" ? /* @__PURE__ */ jsx(
|
|
13632
|
+
return orientation === "horizontal" ? /* @__PURE__ */ jsx(
|
|
13633
|
+
"div",
|
|
13634
|
+
{
|
|
13635
|
+
className: cn("flex-1 h-0.5 rounded-full", completed ? "bg-primary-400" : "bg-grey-300")
|
|
13636
|
+
}
|
|
13637
|
+
) : /* @__PURE__ */ jsx(
|
|
13638
|
+
"div",
|
|
13639
|
+
{
|
|
13640
|
+
className: cn(
|
|
13641
|
+
"w-0.5 flex-1 min-h-[20px] ml-[11px] rounded-full",
|
|
13642
|
+
completed ? "bg-primary-400" : "bg-grey-300"
|
|
13643
|
+
)
|
|
13644
|
+
}
|
|
13645
|
+
);
|
|
13295
13646
|
}
|
|
13296
13647
|
function resolveStatuses(steps, activeStep) {
|
|
13297
13648
|
if (activeStep !== void 0) {
|
|
@@ -13305,14 +13656,7 @@ function resolveStatuses(steps, activeStep) {
|
|
|
13305
13656
|
return steps.map((s) => s.status ?? "incomplete");
|
|
13306
13657
|
}
|
|
13307
13658
|
var Stepper = forwardRef(
|
|
13308
|
-
({
|
|
13309
|
-
steps,
|
|
13310
|
-
activeStep,
|
|
13311
|
-
orientation = "horizontal",
|
|
13312
|
-
indicator = "dot",
|
|
13313
|
-
className,
|
|
13314
|
-
...rest
|
|
13315
|
-
}, ref) => {
|
|
13659
|
+
({ steps, activeStep, orientation = "horizontal", indicator = "dot", className, ...rest }, ref) => {
|
|
13316
13660
|
const statuses = resolveStatuses(steps, activeStep);
|
|
13317
13661
|
if (orientation === "vertical") {
|
|
13318
13662
|
return /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col", className), ...rest, children: steps.map((step, i) => {
|
|
@@ -13320,7 +13664,15 @@ var Stepper = forwardRef(
|
|
|
13320
13664
|
const isLast = i === steps.length - 1;
|
|
13321
13665
|
return /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
|
|
13322
13666
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
13323
|
-
/* @__PURE__ */ jsx(
|
|
13667
|
+
/* @__PURE__ */ jsx(
|
|
13668
|
+
StepCircle,
|
|
13669
|
+
{
|
|
13670
|
+
status,
|
|
13671
|
+
indicator,
|
|
13672
|
+
stepNumber: i + 1,
|
|
13673
|
+
icon: step.icon
|
|
13674
|
+
}
|
|
13675
|
+
),
|
|
13324
13676
|
!isLast && /* @__PURE__ */ jsx(Connector, { orientation: "vertical", completed: status === "completed" })
|
|
13325
13677
|
] }),
|
|
13326
13678
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col pb-6", children: [
|
|
@@ -13344,8 +13696,22 @@ var Stepper = forwardRef(
|
|
|
13344
13696
|
const isLast = i === steps.length - 1;
|
|
13345
13697
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 items-center gap-2.5", children: [
|
|
13346
13698
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 w-full", children: [
|
|
13347
|
-
/* @__PURE__ */ jsx(
|
|
13348
|
-
|
|
13699
|
+
/* @__PURE__ */ jsx(
|
|
13700
|
+
Connector,
|
|
13701
|
+
{
|
|
13702
|
+
orientation: "horizontal",
|
|
13703
|
+
completed: i > 0 && statuses[i - 1] === "completed"
|
|
13704
|
+
}
|
|
13705
|
+
),
|
|
13706
|
+
/* @__PURE__ */ jsx(
|
|
13707
|
+
StepCircle,
|
|
13708
|
+
{
|
|
13709
|
+
status,
|
|
13710
|
+
indicator,
|
|
13711
|
+
stepNumber: i + 1,
|
|
13712
|
+
icon: step.icon
|
|
13713
|
+
}
|
|
13714
|
+
),
|
|
13349
13715
|
/* @__PURE__ */ jsx(Connector, { orientation: "horizontal", completed: !isLast && status === "completed" })
|
|
13350
13716
|
] }),
|
|
13351
13717
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 text-center w-full", children: [
|
|
@@ -13716,6 +14082,8 @@ var Select = forwardRef(
|
|
|
13716
14082
|
const [open, setOpen] = useState(false);
|
|
13717
14083
|
const value = controlledValue ?? internalValue;
|
|
13718
14084
|
const listboxId = useId();
|
|
14085
|
+
const labelId = useId();
|
|
14086
|
+
const helperId = useId();
|
|
13719
14087
|
const containerRef = useRef(null);
|
|
13720
14088
|
const triggerRef = useRef(null);
|
|
13721
14089
|
const listRef = useRef(null);
|
|
@@ -13812,7 +14180,7 @@ var Select = forwardRef(
|
|
|
13812
14180
|
className: cn("relative flex flex-col gap-2 w-full", wrapperClassName),
|
|
13813
14181
|
...rest,
|
|
13814
14182
|
children: [
|
|
13815
|
-
label && /* @__PURE__ */ jsx("label", { className: "text-sm font-medium text-grey-900 leading-[1.45]", children: label }),
|
|
14183
|
+
label && /* @__PURE__ */ jsx("label", { id: labelId, className: "text-sm font-medium text-grey-900 leading-[1.45]", children: label }),
|
|
13816
14184
|
/* @__PURE__ */ jsxs(
|
|
13817
14185
|
"button",
|
|
13818
14186
|
{
|
|
@@ -13822,6 +14190,8 @@ var Select = forwardRef(
|
|
|
13822
14190
|
"aria-expanded": open,
|
|
13823
14191
|
"aria-haspopup": "listbox",
|
|
13824
14192
|
"aria-controls": listboxId,
|
|
14193
|
+
"aria-labelledby": label ? labelId : void 0,
|
|
14194
|
+
"aria-describedby": helperText ? helperId : void 0,
|
|
13825
14195
|
disabled,
|
|
13826
14196
|
onClick: () => !disabled && setOpen(!open),
|
|
13827
14197
|
className: cn(
|
|
@@ -13848,6 +14218,7 @@ var Select = forwardRef(
|
|
|
13848
14218
|
{
|
|
13849
14219
|
name: "chevron-down",
|
|
13850
14220
|
size: "md",
|
|
14221
|
+
"aria-hidden": "true",
|
|
13851
14222
|
className: cn(
|
|
13852
14223
|
"shrink-0 transition-transform",
|
|
13853
14224
|
open && "rotate-180",
|
|
@@ -13858,7 +14229,7 @@ var Select = forwardRef(
|
|
|
13858
14229
|
]
|
|
13859
14230
|
}
|
|
13860
14231
|
),
|
|
13861
|
-
helperText && /* @__PURE__ */ jsx("p", { className: "text-sm text-grey-500 leading-[1.45]", children: helperText }),
|
|
14232
|
+
helperText && /* @__PURE__ */ jsx("p", { id: helperId, className: "text-sm text-grey-500 leading-[1.45]", children: helperText }),
|
|
13862
14233
|
open && /* @__PURE__ */ jsx(SelectContext.Provider, { value: { value, onSelect, open }, children: /* @__PURE__ */ jsx(
|
|
13863
14234
|
"div",
|
|
13864
14235
|
{
|
|
@@ -13962,7 +14333,7 @@ var ActivityItem = forwardRef(
|
|
|
13962
14333
|
}, ref) => {
|
|
13963
14334
|
const hasConnectorAbove = connector === "middle" || connector === "last";
|
|
13964
14335
|
const hasConnectorBelow = connector === "top" || connector === "middle";
|
|
13965
|
-
return /* @__PURE__ */ jsxs("
|
|
14336
|
+
return /* @__PURE__ */ jsxs("article", { ref, className: cn("flex gap-3 items-start", className), ...rest, children: [
|
|
13966
14337
|
/* @__PURE__ */ jsxs(
|
|
13967
14338
|
"div",
|
|
13968
14339
|
{
|
|
@@ -13971,9 +14342,9 @@ var ActivityItem = forwardRef(
|
|
|
13971
14342
|
(connector === "last" || !connector) && "justify-start"
|
|
13972
14343
|
),
|
|
13973
14344
|
children: [
|
|
13974
|
-
hasConnectorAbove && /* @__PURE__ */ jsx("div", { className: "h-2 w-px bg-grey-100" }),
|
|
14345
|
+
hasConnectorAbove && /* @__PURE__ */ jsx("div", { className: "h-2 w-px bg-grey-100", "aria-hidden": "true" }),
|
|
13975
14346
|
/* @__PURE__ */ jsx("div", { className: "shrink-0 size-8", children: avatar }),
|
|
13976
|
-
hasConnectorBelow && /* @__PURE__ */ jsx("div", { className: "flex-1 w-px bg-grey-100" })
|
|
14347
|
+
hasConnectorBelow && /* @__PURE__ */ jsx("div", { className: "flex-1 w-px bg-grey-100", "aria-hidden": "true" })
|
|
13977
14348
|
]
|
|
13978
14349
|
}
|
|
13979
14350
|
),
|
|
@@ -13990,7 +14361,8 @@ var ActivityItem = forwardRef(
|
|
|
13990
14361
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 w-full", children: [
|
|
13991
14362
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full", children: [
|
|
13992
14363
|
/* @__PURE__ */ jsx("div", { className: "flex flex-1 items-start gap-1 min-w-0", children: /* @__PURE__ */ jsx("span", { className: "text-body-sm leading-5 text-grey-600", children: text }) }),
|
|
13993
|
-
unread && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-2 rounded-full bg-[#04802E] border-[1.5px] border-white" })
|
|
14364
|
+
unread && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-2 rounded-full bg-[#04802E] border-[1.5px] border-white", "aria-hidden": "true" }),
|
|
14365
|
+
unread && /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Unread" })
|
|
13994
14366
|
] }),
|
|
13995
14367
|
(date || time || link || badge) && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-1 w-full", children: [
|
|
13996
14368
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 items-start min-w-0", children: [
|