@tonyarbor/components 0.2.0 → 0.2.1

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.
Files changed (108) hide show
  1. package/dist/Banner.d.mts +59 -0
  2. package/dist/Banner.d.ts +59 -0
  3. package/dist/Banner.js +222 -0
  4. package/dist/Banner.js.map +1 -0
  5. package/dist/Banner.mjs +7 -0
  6. package/dist/Banner.mjs.map +1 -0
  7. package/dist/Checkbox.d.mts +4 -0
  8. package/dist/Checkbox.d.ts +4 -0
  9. package/dist/Checkbox.js +45 -16
  10. package/dist/Checkbox.js.map +1 -1
  11. package/dist/Checkbox.mjs +1 -1
  12. package/dist/DatePicker.d.mts +68 -0
  13. package/dist/DatePicker.d.ts +68 -0
  14. package/dist/DatePicker.js +490 -0
  15. package/dist/DatePicker.js.map +1 -0
  16. package/dist/DatePicker.mjs +7 -0
  17. package/dist/DatePicker.mjs.map +1 -0
  18. package/dist/Pagination.d.mts +36 -0
  19. package/dist/Pagination.d.ts +36 -0
  20. package/dist/Pagination.js +301 -0
  21. package/dist/Pagination.js.map +1 -0
  22. package/dist/Pagination.mjs +7 -0
  23. package/dist/Pagination.mjs.map +1 -0
  24. package/dist/Radio.js +32 -12
  25. package/dist/Radio.js.map +1 -1
  26. package/dist/Radio.mjs +1 -1
  27. package/dist/Table.d.mts +80 -0
  28. package/dist/Table.d.ts +80 -0
  29. package/dist/Table.js +347 -0
  30. package/dist/Table.js.map +1 -0
  31. package/dist/Table.mjs +8 -0
  32. package/dist/Table.mjs.map +1 -0
  33. package/dist/TableControls.d.mts +76 -0
  34. package/dist/TableControls.d.ts +76 -0
  35. package/dist/TableControls.js +461 -0
  36. package/dist/TableControls.js.map +1 -0
  37. package/dist/TableControls.mjs +7 -0
  38. package/dist/TableControls.mjs.map +1 -0
  39. package/dist/TableFooterPagination.d.mts +56 -0
  40. package/dist/TableFooterPagination.d.ts +56 -0
  41. package/dist/TableFooterPagination.js +499 -0
  42. package/dist/TableFooterPagination.js.map +1 -0
  43. package/dist/TableFooterPagination.mjs +7 -0
  44. package/dist/TableFooterPagination.mjs.map +1 -0
  45. package/dist/Tabs.d.mts +50 -0
  46. package/dist/Tabs.d.ts +50 -0
  47. package/dist/Tabs.js +187 -0
  48. package/dist/Tabs.js.map +1 -0
  49. package/dist/Tabs.mjs +7 -0
  50. package/dist/Tabs.mjs.map +1 -0
  51. package/dist/TextArea.d.mts +64 -0
  52. package/dist/TextArea.d.ts +64 -0
  53. package/dist/TextArea.js +171 -0
  54. package/dist/TextArea.js.map +1 -0
  55. package/dist/TextArea.mjs +7 -0
  56. package/dist/TextArea.mjs.map +1 -0
  57. package/dist/Toast.d.mts +48 -0
  58. package/dist/Toast.d.ts +48 -0
  59. package/dist/Toast.js +169 -0
  60. package/dist/Toast.js.map +1 -0
  61. package/dist/Toast.mjs +7 -0
  62. package/dist/Toast.mjs.map +1 -0
  63. package/dist/Toggle.d.mts +48 -0
  64. package/dist/Toggle.d.ts +48 -0
  65. package/dist/Toggle.js +291 -0
  66. package/dist/Toggle.js.map +1 -0
  67. package/dist/Toggle.mjs +7 -0
  68. package/dist/Toggle.mjs.map +1 -0
  69. package/dist/Tooltip.d.mts +32 -0
  70. package/dist/Tooltip.d.ts +32 -0
  71. package/dist/Tooltip.js +109 -0
  72. package/dist/Tooltip.js.map +1 -0
  73. package/dist/Tooltip.mjs +7 -0
  74. package/dist/Tooltip.mjs.map +1 -0
  75. package/dist/chunk-52TG3BFX.mjs +463 -0
  76. package/dist/chunk-52TG3BFX.mjs.map +1 -0
  77. package/dist/chunk-AI2U34CF.mjs +159 -0
  78. package/dist/chunk-AI2U34CF.mjs.map +1 -0
  79. package/dist/chunk-C25FFMRQ.mjs +255 -0
  80. package/dist/chunk-C25FFMRQ.mjs.map +1 -0
  81. package/dist/{chunk-BCYJIUQX.mjs → chunk-CUTYEIFE.mjs} +47 -18
  82. package/dist/chunk-CUTYEIFE.mjs.map +1 -0
  83. package/dist/chunk-DULH2KRW.mjs +133 -0
  84. package/dist/chunk-DULH2KRW.mjs.map +1 -0
  85. package/dist/chunk-G5NVKF2G.mjs +434 -0
  86. package/dist/chunk-G5NVKF2G.mjs.map +1 -0
  87. package/dist/{chunk-ARBHNHO7.mjs → chunk-M6DVBEEL.mjs} +33 -13
  88. package/dist/chunk-M6DVBEEL.mjs.map +1 -0
  89. package/dist/chunk-MBUMR2XJ.mjs +135 -0
  90. package/dist/chunk-MBUMR2XJ.mjs.map +1 -0
  91. package/dist/chunk-MNH2TGUX.mjs +73 -0
  92. package/dist/chunk-MNH2TGUX.mjs.map +1 -0
  93. package/dist/chunk-RRMG2SSZ.mjs +265 -0
  94. package/dist/chunk-RRMG2SSZ.mjs.map +1 -0
  95. package/dist/chunk-U4JXKZZG.mjs +186 -0
  96. package/dist/chunk-U4JXKZZG.mjs.map +1 -0
  97. package/dist/chunk-W55QJIAN.mjs +467 -0
  98. package/dist/chunk-W55QJIAN.mjs.map +1 -0
  99. package/dist/chunk-YV4OXFIM.mjs +151 -0
  100. package/dist/chunk-YV4OXFIM.mjs.map +1 -0
  101. package/dist/index.d.mts +11 -0
  102. package/dist/index.d.ts +11 -0
  103. package/dist/index.js +2752 -30
  104. package/dist/index.js.map +1 -1
  105. package/dist/index.mjs +47 -3
  106. package/package.json +58 -1
  107. package/dist/chunk-ARBHNHO7.mjs.map +0 -1
  108. package/dist/chunk-BCYJIUQX.mjs.map +0 -1
package/dist/index.js CHANGED
@@ -30,14 +30,25 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
+ Banner: () => Banner,
33
34
  Button: () => Button,
34
35
  Card: () => Card,
35
36
  Checkbox: () => Checkbox,
36
37
  Combobox: () => Combobox,
38
+ DatePicker: () => DatePicker,
37
39
  Input: () => Input,
38
40
  NumericInput: () => NumericInput,
41
+ Pagination: () => Pagination,
39
42
  Radio: () => Radio,
40
- Tag: () => Tag
43
+ Table: () => Table,
44
+ TableControls: () => TableControls,
45
+ TableFooterPagination: () => TableFooterPagination,
46
+ Tabs: () => Tabs,
47
+ Tag: () => Tag,
48
+ TextArea: () => TextArea,
49
+ Toast: () => Toast,
50
+ Toggle: () => Toggle,
51
+ Tooltip: () => Tooltip
41
52
  });
42
53
  module.exports = __toCommonJS(src_exports);
43
54
 
@@ -1079,10 +1090,10 @@ var import_clsx7 = require("clsx");
1079
1090
  var import_lucide_react2 = require("lucide-react");
1080
1091
  var import_jsx_runtime7 = require("react/jsx-runtime");
1081
1092
  var checkboxStyles = {
1082
- width: "20px",
1083
- height: "20px",
1084
- border: "2px solid #d1d1d1",
1085
- // grey-300
1093
+ width: "16px",
1094
+ height: "16px",
1095
+ border: "1px solid #7e7e7e",
1096
+ // grey-500
1086
1097
  borderRadius: "4px",
1087
1098
  display: "flex",
1088
1099
  alignItems: "center",
@@ -1093,9 +1104,18 @@ var checkboxStyles = {
1093
1104
  backgroundColor: "#ffffff"
1094
1105
  };
1095
1106
  var checkedStyles = {
1096
- backgroundColor: "#3cad51",
1097
- // brand-500
1098
- borderColor: "#3cad51"
1107
+ backgroundColor: "#0e8a0e",
1108
+ // brand-600
1109
+ border: "1px solid #0e8a0e"
1110
+ };
1111
+ var checkedHoverStyles = {
1112
+ backgroundColor: "#005700",
1113
+ // brand-800
1114
+ border: "1px solid #005700"
1115
+ };
1116
+ var uncheckedHoverStyles = {
1117
+ border: "1px solid #474747"
1118
+ // grey-700
1099
1119
  };
1100
1120
  var labelStyles4 = {
1101
1121
  fontSize: "13px",
@@ -1119,10 +1139,24 @@ var Checkbox = React7.forwardRef(
1119
1139
  style,
1120
1140
  "data-testid": dataTestId,
1121
1141
  name,
1122
- value
1142
+ value,
1143
+ indeterminate = false
1123
1144
  }, ref) => {
1124
1145
  const [isFocused, setIsFocused] = React7.useState(false);
1146
+ const [isHovered, setIsHovered] = React7.useState(false);
1125
1147
  const checkboxId = React7.useId();
1148
+ const innerRef = React7.useRef(null);
1149
+ React7.useEffect(() => {
1150
+ const node = innerRef.current;
1151
+ if (node) {
1152
+ node.indeterminate = indeterminate;
1153
+ if (typeof ref === "function") {
1154
+ ref(node);
1155
+ } else if (ref) {
1156
+ ref.current = node;
1157
+ }
1158
+ }
1159
+ }, [indeterminate, ref]);
1126
1160
  const handleChange = (e) => {
1127
1161
  if (!disabled) {
1128
1162
  onChange?.(e.target.checked);
@@ -1130,12 +1164,16 @@ var Checkbox = React7.forwardRef(
1130
1164
  };
1131
1165
  const boxStyle = {
1132
1166
  ...checkboxStyles,
1133
- ...checked && !disabled && checkedStyles,
1134
- ...disabled && !checked && { backgroundColor: "#f8f8f8", borderColor: "#efefef" },
1135
- ...disabled && checked && { backgroundColor: "#7e7e7e", borderColor: "#7e7e7e" },
1136
- ...isFocused && !disabled && { borderColor: "#3cad51", outline: "2px solid rgba(60, 173, 81, 0.2)" }
1167
+ ...(checked || indeterminate) && !disabled && checkedStyles,
1168
+ ...isHovered && !disabled && !(checked || indeterminate) && uncheckedHoverStyles,
1169
+ ...isHovered && !disabled && (checked || indeterminate) && checkedHoverStyles,
1170
+ ...disabled && !checked && !indeterminate && { backgroundColor: "#efefef", border: "1px solid #b3b3b3" },
1171
+ ...disabled && (checked || indeterminate) && { backgroundColor: "#b3b3b3", border: "1px solid #b3b3b3" },
1172
+ ...isFocused && !disabled && {
1173
+ boxShadow: "0px 0px 0px 3px #3cad51"
1174
+ }
1137
1175
  };
1138
- const checkmarkColor = disabled ? "#d1d1d1" : "#ffffff";
1176
+ const checkmarkColor = "#ffffff";
1139
1177
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1140
1178
  "div",
1141
1179
  {
@@ -1146,7 +1184,7 @@ var Checkbox = React7.forwardRef(
1146
1184
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1147
1185
  "input",
1148
1186
  {
1149
- ref,
1187
+ ref: innerRef,
1150
1188
  id: checkboxId,
1151
1189
  type: "checkbox",
1152
1190
  checked,
@@ -1162,13 +1200,15 @@ var Checkbox = React7.forwardRef(
1162
1200
  width: 0,
1163
1201
  height: 0
1164
1202
  },
1165
- "aria-checked": checked
1203
+ "aria-checked": indeterminate ? "mixed" : checked
1166
1204
  }
1167
1205
  ),
1168
1206
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1169
1207
  "label",
1170
1208
  {
1171
1209
  htmlFor: checkboxId,
1210
+ onMouseEnter: () => !disabled && setIsHovered(true),
1211
+ onMouseLeave: () => !disabled && setIsHovered(false),
1172
1212
  style: {
1173
1213
  display: "flex",
1174
1214
  alignItems: "center",
@@ -1176,7 +1216,7 @@ var Checkbox = React7.forwardRef(
1176
1216
  cursor: disabled ? "not-allowed" : "pointer"
1177
1217
  },
1178
1218
  children: [
1179
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: boxStyle, children: checked && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react2.Check, { size: 14, color: checkmarkColor, strokeWidth: 3 }) }),
1219
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: boxStyle, children: (checked || indeterminate) && (indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react2.Minus, { size: 12, color: checkmarkColor, strokeWidth: 3 }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react2.Check, { size: 16, color: checkmarkColor, strokeWidth: 3 })) }),
1180
1220
  label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1181
1221
  "span",
1182
1222
  {
@@ -1203,10 +1243,10 @@ var React8 = __toESM(require("react"));
1203
1243
  var import_clsx8 = require("clsx");
1204
1244
  var import_jsx_runtime8 = require("react/jsx-runtime");
1205
1245
  var radioStyles = {
1206
- width: "20px",
1207
- height: "20px",
1208
- border: "2px solid #d1d1d1",
1209
- // grey-300
1246
+ width: "16px",
1247
+ height: "16px",
1248
+ border: "1px solid #7e7e7e",
1249
+ // grey-500
1210
1250
  borderRadius: "50%",
1211
1251
  display: "flex",
1212
1252
  alignItems: "center",
@@ -1217,17 +1257,29 @@ var radioStyles = {
1217
1257
  backgroundColor: "#ffffff"
1218
1258
  };
1219
1259
  var checkedStyles2 = {
1220
- borderColor: "#3cad51"
1221
- // brand-500
1260
+ border: "1px solid #0e8a0e"
1261
+ // brand-600
1262
+ };
1263
+ var checkedHoverStyles2 = {
1264
+ border: "1px solid #005700"
1265
+ // brand-800
1266
+ };
1267
+ var uncheckedHoverStyles2 = {
1268
+ border: "1px solid #2f2f2f"
1269
+ // grey-900
1222
1270
  };
1223
1271
  var innerDotStyles = {
1224
1272
  width: "10px",
1225
1273
  height: "10px",
1226
1274
  borderRadius: "50%",
1227
- backgroundColor: "#3cad51",
1228
- // brand-500
1275
+ backgroundColor: "#0e8a0e",
1276
+ // brand-600
1229
1277
  transition: "all 0.2s ease-in-out"
1230
1278
  };
1279
+ var innerDotHoverStyles = {
1280
+ backgroundColor: "#005700"
1281
+ // brand-800
1282
+ };
1231
1283
  var labelStyles5 = {
1232
1284
  fontSize: "13px",
1233
1285
  color: "#2f2f2f",
@@ -1253,6 +1305,7 @@ var Radio = React8.forwardRef(
1253
1305
  value
1254
1306
  }, ref) => {
1255
1307
  const [isFocused, setIsFocused] = React8.useState(false);
1308
+ const [isHovered, setIsHovered] = React8.useState(false);
1256
1309
  const radioId = React8.useId();
1257
1310
  const handleChange = (e) => {
1258
1311
  if (!disabled) {
@@ -1262,13 +1315,18 @@ var Radio = React8.forwardRef(
1262
1315
  const circleStyle = {
1263
1316
  ...radioStyles,
1264
1317
  ...checked && !disabled && checkedStyles2,
1265
- ...disabled && !checked && { backgroundColor: "#f8f8f8", borderColor: "#efefef" },
1266
- ...disabled && checked && { borderColor: "#7e7e7e" },
1267
- ...isFocused && !disabled && { borderColor: "#3cad51", outline: "2px solid rgba(60, 173, 81, 0.2)" }
1318
+ ...isHovered && !disabled && !checked && uncheckedHoverStyles2,
1319
+ ...isHovered && !disabled && checked && checkedHoverStyles2,
1320
+ ...disabled && !checked && { backgroundColor: "#efefef", border: "1px solid #7e7e7e" },
1321
+ ...disabled && checked && { backgroundColor: "#efefef", border: "1px solid #7e7e7e" },
1322
+ ...isFocused && !disabled && {
1323
+ boxShadow: "0px 0px 0px 3px #3cad51"
1324
+ }
1268
1325
  };
1269
1326
  const dotStyle = {
1270
1327
  ...innerDotStyles,
1271
- backgroundColor: disabled ? "#7e7e7e" : "#3cad51"
1328
+ ...isHovered && !disabled && innerDotHoverStyles,
1329
+ ...disabled && { backgroundColor: "#7e7e7e" }
1272
1330
  };
1273
1331
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1274
1332
  "div",
@@ -1303,6 +1361,8 @@ var Radio = React8.forwardRef(
1303
1361
  "label",
1304
1362
  {
1305
1363
  htmlFor: radioId,
1364
+ onMouseEnter: () => !disabled && setIsHovered(true),
1365
+ onMouseLeave: () => !disabled && setIsHovered(false),
1306
1366
  style: {
1307
1367
  display: "flex",
1308
1368
  alignItems: "center",
@@ -1331,15 +1391,2677 @@ var Radio = React8.forwardRef(
1331
1391
  }
1332
1392
  );
1333
1393
  Radio.displayName = "Radio";
1394
+
1395
+ // src/DatePicker/DatePicker.tsx
1396
+ var React9 = __toESM(require("react"));
1397
+ var import_clsx9 = require("clsx");
1398
+ var Popover = __toESM(require("@radix-ui/react-popover"));
1399
+ var import_lucide_react3 = require("lucide-react");
1400
+ var import_date_fns = require("date-fns");
1401
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1402
+ var wrapperStyles3 = {
1403
+ display: "flex",
1404
+ flexDirection: "column",
1405
+ gap: "4px"
1406
+ };
1407
+ var labelStyles6 = {
1408
+ fontSize: "11px",
1409
+ fontWeight: 600,
1410
+ color: "#2f2f2f",
1411
+ textTransform: "uppercase",
1412
+ letterSpacing: "0.5px",
1413
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
1414
+ };
1415
+ var inputContainerStyles = {
1416
+ position: "relative",
1417
+ display: "flex",
1418
+ alignItems: "center"
1419
+ };
1420
+ var inputStyles3 = {
1421
+ width: "100%",
1422
+ height: "36px",
1423
+ padding: "0 36px 0 12px",
1424
+ fontSize: "13px",
1425
+ border: "1px solid #d1d1d1",
1426
+ borderRadius: "8px",
1427
+ outline: "none",
1428
+ transition: "all 0.2s ease-in-out",
1429
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
1430
+ backgroundColor: "#ffffff",
1431
+ color: "#2f2f2f"
1432
+ };
1433
+ var iconButtonStyles = {
1434
+ position: "absolute",
1435
+ right: "8px",
1436
+ display: "flex",
1437
+ alignItems: "center",
1438
+ justifyContent: "center",
1439
+ padding: "4px",
1440
+ cursor: "pointer",
1441
+ color: "#595959",
1442
+ backgroundColor: "transparent",
1443
+ border: "none"
1444
+ };
1445
+ var helperTextStyles4 = {
1446
+ fontSize: "11px",
1447
+ color: "#595959",
1448
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
1449
+ };
1450
+ var calendarPopoverStyles = {
1451
+ backgroundColor: "#ffffff",
1452
+ border: "1px solid #efefef",
1453
+ borderRadius: "8px",
1454
+ padding: "16px",
1455
+ boxShadow: "0 4px 12px rgba(0, 0, 0, 0.1)",
1456
+ minWidth: "320px",
1457
+ zIndex: 1e3
1458
+ };
1459
+ var calendarHeaderStyles = {
1460
+ display: "flex",
1461
+ alignItems: "center",
1462
+ justifyContent: "space-between",
1463
+ marginBottom: "16px",
1464
+ gap: "8px"
1465
+ };
1466
+ var monthYearContainerStyles = {
1467
+ display: "flex",
1468
+ gap: "8px",
1469
+ flex: 1
1470
+ };
1471
+ var selectStyles = {
1472
+ padding: "6px 8px",
1473
+ fontSize: "13px",
1474
+ border: "1px solid #d1d1d1",
1475
+ borderRadius: "6px",
1476
+ backgroundColor: "#ffffff",
1477
+ color: "#2f2f2f",
1478
+ cursor: "pointer",
1479
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
1480
+ outline: "none"
1481
+ };
1482
+ var navButtonStyles = {
1483
+ display: "flex",
1484
+ alignItems: "center",
1485
+ justifyContent: "center",
1486
+ width: "28px",
1487
+ height: "28px",
1488
+ border: "none",
1489
+ backgroundColor: "transparent",
1490
+ cursor: "pointer",
1491
+ borderRadius: "4px",
1492
+ color: "#2f2f2f",
1493
+ transition: "background-color 0.2s"
1494
+ };
1495
+ var weekDaysStyles = {
1496
+ display: "grid",
1497
+ gridTemplateColumns: "repeat(7, 1fr)",
1498
+ gap: "4px",
1499
+ marginBottom: "8px"
1500
+ };
1501
+ var weekDayStyles = {
1502
+ fontSize: "11px",
1503
+ fontWeight: 600,
1504
+ color: "#7e7e7e",
1505
+ textAlign: "center",
1506
+ padding: "4px",
1507
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
1508
+ };
1509
+ var daysGridStyles = {
1510
+ display: "grid",
1511
+ gridTemplateColumns: "repeat(7, 1fr)",
1512
+ gap: "4px"
1513
+ };
1514
+ var dayButtonStyles = {
1515
+ width: "36px",
1516
+ height: "36px",
1517
+ display: "flex",
1518
+ alignItems: "center",
1519
+ justifyContent: "center",
1520
+ border: "none",
1521
+ backgroundColor: "transparent",
1522
+ borderRadius: "50%",
1523
+ cursor: "pointer",
1524
+ fontSize: "13px",
1525
+ color: "#2f2f2f",
1526
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
1527
+ transition: "all 0.2s"
1528
+ };
1529
+ var footerStyles = {
1530
+ display: "flex",
1531
+ justifyContent: "flex-end",
1532
+ marginTop: "12px",
1533
+ paddingTop: "12px",
1534
+ borderTop: "1px solid #efefef"
1535
+ };
1536
+ var todayButtonStyles = {
1537
+ padding: "6px 12px",
1538
+ fontSize: "13px",
1539
+ fontWeight: 500,
1540
+ color: "#16a33d",
1541
+ backgroundColor: "transparent",
1542
+ border: "none",
1543
+ cursor: "pointer",
1544
+ borderRadius: "6px",
1545
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
1546
+ transition: "background-color 0.2s"
1547
+ };
1548
+ var MONTHS = [
1549
+ "January",
1550
+ "February",
1551
+ "March",
1552
+ "April",
1553
+ "May",
1554
+ "June",
1555
+ "July",
1556
+ "August",
1557
+ "September",
1558
+ "October",
1559
+ "November",
1560
+ "December"
1561
+ ];
1562
+ var WEEKDAYS = ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"];
1563
+ var DatePicker = React9.forwardRef(
1564
+ ({
1565
+ value,
1566
+ onChange,
1567
+ label,
1568
+ placeholder = "DD/MM/YYYY",
1569
+ helperText,
1570
+ error,
1571
+ state = "default",
1572
+ disabled = false,
1573
+ className,
1574
+ style,
1575
+ "data-testid": dataTestId,
1576
+ minDate,
1577
+ maxDate,
1578
+ dateFormat = "dd/MM/yyyy"
1579
+ }, ref) => {
1580
+ const [open, setOpen] = React9.useState(false);
1581
+ const [inputValue, setInputValue] = React9.useState("");
1582
+ const [viewDate, setViewDate] = React9.useState(value || /* @__PURE__ */ new Date());
1583
+ const inputId = React9.useId();
1584
+ React9.useEffect(() => {
1585
+ if (value && (0, import_date_fns.isValid)(value)) {
1586
+ setInputValue((0, import_date_fns.format)(value, dateFormat));
1587
+ } else {
1588
+ setInputValue("");
1589
+ }
1590
+ }, [value, dateFormat]);
1591
+ React9.useEffect(() => {
1592
+ if (value && (0, import_date_fns.isValid)(value)) {
1593
+ setViewDate(value);
1594
+ }
1595
+ }, [value]);
1596
+ const handleInputChange = (e) => {
1597
+ const newValue = e.target.value;
1598
+ setInputValue(newValue);
1599
+ const parsedDate = (0, import_date_fns.parse)(newValue, dateFormat, /* @__PURE__ */ new Date());
1600
+ if ((0, import_date_fns.isValid)(parsedDate)) {
1601
+ onChange?.(parsedDate);
1602
+ setViewDate(parsedDate);
1603
+ }
1604
+ };
1605
+ const handleInputBlur = () => {
1606
+ if (value && (0, import_date_fns.isValid)(value)) {
1607
+ setInputValue((0, import_date_fns.format)(value, dateFormat));
1608
+ } else if (!inputValue) {
1609
+ onChange?.(void 0);
1610
+ }
1611
+ };
1612
+ const handleDateSelect = (date) => {
1613
+ onChange?.(date);
1614
+ setOpen(false);
1615
+ };
1616
+ const handleTodayClick = () => {
1617
+ const today = /* @__PURE__ */ new Date();
1618
+ onChange?.(today);
1619
+ setViewDate(today);
1620
+ setOpen(false);
1621
+ };
1622
+ const handleMonthChange = (e) => {
1623
+ const newMonth = parseInt(e.target.value, 10);
1624
+ const newDate = new Date(viewDate);
1625
+ newDate.setMonth(newMonth);
1626
+ setViewDate(newDate);
1627
+ };
1628
+ const handleYearChange = (e) => {
1629
+ const newYear = parseInt(e.target.value, 10);
1630
+ const newDate = new Date(viewDate);
1631
+ newDate.setFullYear(newYear);
1632
+ setViewDate(newDate);
1633
+ };
1634
+ const handlePrevMonth = () => {
1635
+ setViewDate((0, import_date_fns.subMonths)(viewDate, 1));
1636
+ };
1637
+ const handleNextMonth = () => {
1638
+ setViewDate((0, import_date_fns.addMonths)(viewDate, 1));
1639
+ };
1640
+ const monthStart = (0, import_date_fns.startOfMonth)(viewDate);
1641
+ const monthEnd = (0, import_date_fns.endOfMonth)(viewDate);
1642
+ const startDate = (0, import_date_fns.startOfWeek)(monthStart, { weekStartsOn: 1 });
1643
+ const endDate = (0, import_date_fns.endOfWeek)(monthEnd, { weekStartsOn: 1 });
1644
+ const days = (0, import_date_fns.eachDayOfInterval)({ start: startDate, end: endDate });
1645
+ const isDateDisabled = (date) => {
1646
+ if (minDate && date < minDate) return true;
1647
+ if (maxDate && date > maxDate) return true;
1648
+ return false;
1649
+ };
1650
+ const currentYear = viewDate.getFullYear();
1651
+ const yearOptions = Array.from({ length: 201 }, (_, i) => currentYear - 100 + i);
1652
+ const currentState = error ? "error" : state;
1653
+ const getInputStyles = () => {
1654
+ const styles = { ...inputStyles3 };
1655
+ if (disabled) {
1656
+ styles.backgroundColor = "#f8f8f8";
1657
+ styles.borderColor = "#efefef";
1658
+ styles.color = "#7e7e7e";
1659
+ styles.cursor = "not-allowed";
1660
+ } else if (currentState === "error") {
1661
+ styles.borderColor = "#e02f1d";
1662
+ } else if (currentState === "success") {
1663
+ styles.borderColor = "#16a33d";
1664
+ }
1665
+ return styles;
1666
+ };
1667
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1668
+ "div",
1669
+ {
1670
+ className: (0, import_clsx9.clsx)("arbor-datepicker-wrapper", className),
1671
+ style: { ...wrapperStyles3, ...style },
1672
+ "data-testid": dataTestId,
1673
+ children: [
1674
+ label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { htmlFor: inputId, style: labelStyles6, children: label }),
1675
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Popover.Root, { open, onOpenChange: setOpen, children: [
1676
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: inputContainerStyles, children: [
1677
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1678
+ "input",
1679
+ {
1680
+ ref,
1681
+ id: inputId,
1682
+ type: "text",
1683
+ value: inputValue,
1684
+ onChange: handleInputChange,
1685
+ onBlur: handleInputBlur,
1686
+ placeholder,
1687
+ disabled,
1688
+ style: getInputStyles(),
1689
+ "aria-label": label || "Date picker"
1690
+ }
1691
+ ),
1692
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1693
+ "button",
1694
+ {
1695
+ type: "button",
1696
+ style: {
1697
+ ...iconButtonStyles,
1698
+ cursor: disabled ? "not-allowed" : "pointer"
1699
+ },
1700
+ disabled,
1701
+ "aria-label": "Open calendar",
1702
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Calendar, { size: 16 })
1703
+ }
1704
+ ) })
1705
+ ] }),
1706
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1707
+ Popover.Content,
1708
+ {
1709
+ align: "start",
1710
+ sideOffset: 4,
1711
+ style: calendarPopoverStyles,
1712
+ children: [
1713
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: calendarHeaderStyles, children: [
1714
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1715
+ "button",
1716
+ {
1717
+ type: "button",
1718
+ onClick: handlePrevMonth,
1719
+ style: navButtonStyles,
1720
+ onMouseEnter: (e) => {
1721
+ e.currentTarget.style.backgroundColor = "#f8f8f8";
1722
+ },
1723
+ onMouseLeave: (e) => {
1724
+ e.currentTarget.style.backgroundColor = "transparent";
1725
+ },
1726
+ "aria-label": "Previous month",
1727
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.ChevronLeft, { size: 16 })
1728
+ }
1729
+ ),
1730
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: monthYearContainerStyles, children: [
1731
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1732
+ "select",
1733
+ {
1734
+ value: viewDate.getMonth(),
1735
+ onChange: handleMonthChange,
1736
+ style: selectStyles,
1737
+ "aria-label": "Select month",
1738
+ children: MONTHS.map((month, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: index, children: month }, month))
1739
+ }
1740
+ ),
1741
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1742
+ "select",
1743
+ {
1744
+ value: viewDate.getFullYear(),
1745
+ onChange: handleYearChange,
1746
+ style: selectStyles,
1747
+ "aria-label": "Select year",
1748
+ children: yearOptions.map((year) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: year, children: year }, year))
1749
+ }
1750
+ )
1751
+ ] }),
1752
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1753
+ "button",
1754
+ {
1755
+ type: "button",
1756
+ onClick: handleNextMonth,
1757
+ style: navButtonStyles,
1758
+ onMouseEnter: (e) => {
1759
+ e.currentTarget.style.backgroundColor = "#f8f8f8";
1760
+ },
1761
+ onMouseLeave: (e) => {
1762
+ e.currentTarget.style.backgroundColor = "transparent";
1763
+ },
1764
+ "aria-label": "Next month",
1765
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.ChevronRight, { size: 16 })
1766
+ }
1767
+ )
1768
+ ] }),
1769
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: weekDaysStyles, children: WEEKDAYS.map((day) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: weekDayStyles, children: day }, day)) }),
1770
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: daysGridStyles, children: days.map((day) => {
1771
+ const isCurrentMonth = day.getMonth() === viewDate.getMonth();
1772
+ const isSelected = value && (0, import_date_fns.isSameDay)(day, value);
1773
+ const isTodayDate = (0, import_date_fns.isToday)(day);
1774
+ const isDayDisabled = isDateDisabled(day);
1775
+ const getDayButtonStyles = () => {
1776
+ const styles = { ...dayButtonStyles };
1777
+ if (!isCurrentMonth) {
1778
+ styles.color = "#d1d1d1";
1779
+ }
1780
+ if (isDayDisabled) {
1781
+ styles.color = "#d1d1d1";
1782
+ styles.cursor = "not-allowed";
1783
+ }
1784
+ if (isSelected) {
1785
+ styles.backgroundColor = "#3cad51";
1786
+ styles.color = "#ffffff";
1787
+ } else if (isTodayDate && !isDayDisabled) {
1788
+ styles.fontWeight = 600;
1789
+ styles.color = "#16a33d";
1790
+ }
1791
+ return styles;
1792
+ };
1793
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1794
+ "button",
1795
+ {
1796
+ type: "button",
1797
+ onClick: () => !isDayDisabled && handleDateSelect(day),
1798
+ disabled: isDayDisabled,
1799
+ style: getDayButtonStyles(),
1800
+ onMouseEnter: (e) => {
1801
+ if (!isSelected && !isDayDisabled && isCurrentMonth) {
1802
+ e.currentTarget.style.backgroundColor = "#f8f8f8";
1803
+ }
1804
+ },
1805
+ onMouseLeave: (e) => {
1806
+ if (!isSelected) {
1807
+ e.currentTarget.style.backgroundColor = "transparent";
1808
+ }
1809
+ },
1810
+ "aria-label": (0, import_date_fns.format)(day, "MMMM d, yyyy"),
1811
+ "aria-selected": isSelected,
1812
+ children: (0, import_date_fns.format)(day, "d")
1813
+ },
1814
+ day.toISOString()
1815
+ );
1816
+ }) }),
1817
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: footerStyles, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1818
+ "button",
1819
+ {
1820
+ type: "button",
1821
+ onClick: handleTodayClick,
1822
+ style: todayButtonStyles,
1823
+ onMouseEnter: (e) => {
1824
+ e.currentTarget.style.backgroundColor = "#f8f8f8";
1825
+ },
1826
+ onMouseLeave: (e) => {
1827
+ e.currentTarget.style.backgroundColor = "transparent";
1828
+ },
1829
+ children: "Today"
1830
+ }
1831
+ ) })
1832
+ ]
1833
+ }
1834
+ ) })
1835
+ ] }),
1836
+ error && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { style: { ...helperTextStyles4, color: "#e02f1d" }, children: error }),
1837
+ !error && helperText && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { style: helperTextStyles4, children: helperText })
1838
+ ]
1839
+ }
1840
+ );
1841
+ }
1842
+ );
1843
+ DatePicker.displayName = "DatePicker";
1844
+
1845
+ // src/Toast/Toast.tsx
1846
+ var React10 = __toESM(require("react"));
1847
+ var import_clsx10 = require("clsx");
1848
+ var import_lucide_react4 = require("lucide-react");
1849
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1850
+ var baseToastStyles = {
1851
+ width: "360px",
1852
+ padding: "16px",
1853
+ borderRadius: "8px",
1854
+ border: "1px solid",
1855
+ display: "flex",
1856
+ alignItems: "center",
1857
+ gap: "12px",
1858
+ boxShadow: "0px 4px 12px 0px rgba(32, 32, 32, 0.08)",
1859
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
1860
+ };
1861
+ var messageStyles = {
1862
+ fontSize: "13px",
1863
+ fontWeight: 600,
1864
+ flex: 1
1865
+ };
1866
+ var closeButtonStyles = {
1867
+ width: "24px",
1868
+ height: "24px",
1869
+ borderRadius: "50%",
1870
+ border: "none",
1871
+ background: "transparent",
1872
+ cursor: "pointer",
1873
+ display: "flex",
1874
+ alignItems: "center",
1875
+ justifyContent: "center",
1876
+ flexShrink: 0,
1877
+ transition: "background-color 0.2s ease-in-out"
1878
+ };
1879
+ var variantConfig = {
1880
+ information: {
1881
+ backgroundColor: "#f5fbff",
1882
+ borderColor: "#2c8bca",
1883
+ textColor: "#053a61",
1884
+ icon: import_lucide_react4.Info,
1885
+ iconColor: "#2c8bca",
1886
+ closeHoverBg: "#e0f3ff"
1887
+ },
1888
+ danger: {
1889
+ backgroundColor: "#fff5f5",
1890
+ borderColor: "#c93232",
1891
+ textColor: "#610202",
1892
+ icon: import_lucide_react4.AlertCircle,
1893
+ iconColor: "#c93232",
1894
+ closeHoverBg: "#ffe0e0"
1895
+ },
1896
+ warning: {
1897
+ backgroundColor: "#fffaf5",
1898
+ borderColor: "#e4720d",
1899
+ textColor: "#611f00",
1900
+ icon: import_lucide_react4.AlertTriangle,
1901
+ iconColor: "#e4720d",
1902
+ closeHoverBg: "#ffedd5"
1903
+ },
1904
+ success: {
1905
+ backgroundColor: "#f0faf3",
1906
+ borderColor: "#5ec171",
1907
+ textColor: "#024002",
1908
+ icon: import_lucide_react4.CheckCircle,
1909
+ iconColor: "#5ec171",
1910
+ closeHoverBg: "#d9f2df"
1911
+ },
1912
+ caution: {
1913
+ backgroundColor: "#fffdf5",
1914
+ borderColor: "#edae06",
1915
+ textColor: "#613f00",
1916
+ icon: import_lucide_react4.AlertOctagon,
1917
+ iconColor: "#edae06",
1918
+ closeHoverBg: "#fff8d5"
1919
+ }
1920
+ };
1921
+ var Toast = React10.forwardRef(
1922
+ ({
1923
+ variant,
1924
+ message,
1925
+ onClose,
1926
+ className,
1927
+ style,
1928
+ "data-testid": dataTestId
1929
+ }, ref) => {
1930
+ const [isCloseHovered, setIsCloseHovered] = React10.useState(false);
1931
+ const config = variantConfig[variant];
1932
+ const IconComponent = config.icon;
1933
+ const toastStyle = {
1934
+ ...baseToastStyles,
1935
+ backgroundColor: config.backgroundColor,
1936
+ borderColor: config.borderColor,
1937
+ ...style
1938
+ };
1939
+ const closeStyle = {
1940
+ ...closeButtonStyles,
1941
+ ...isCloseHovered && { backgroundColor: config.closeHoverBg }
1942
+ };
1943
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1944
+ "div",
1945
+ {
1946
+ ref,
1947
+ className: (0, import_clsx10.clsx)("arbor-toast", `arbor-toast-${variant}`, className),
1948
+ style: toastStyle,
1949
+ "data-testid": dataTestId,
1950
+ role: "alert",
1951
+ "aria-live": "polite",
1952
+ children: [
1953
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(IconComponent, { size: 16, color: config.iconColor, style: { flexShrink: 0 } }),
1954
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { style: { ...messageStyles, color: config.textColor }, children: message }),
1955
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1956
+ "button",
1957
+ {
1958
+ onClick: onClose,
1959
+ onMouseEnter: () => setIsCloseHovered(true),
1960
+ onMouseLeave: () => setIsCloseHovered(false),
1961
+ style: closeStyle,
1962
+ "aria-label": "Close notification",
1963
+ type: "button",
1964
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { style: { fontSize: "18px", lineHeight: 1, color: "#595959", fontWeight: "bold" }, children: "\xD7" })
1965
+ }
1966
+ )
1967
+ ]
1968
+ }
1969
+ );
1970
+ }
1971
+ );
1972
+ Toast.displayName = "Toast";
1973
+
1974
+ // src/Tooltip/Tooltip.tsx
1975
+ var React11 = __toESM(require("react"));
1976
+ var import_clsx11 = require("clsx");
1977
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1978
+ var tooltipStyles = {
1979
+ position: "absolute",
1980
+ bottom: "calc(100% + 8px)",
1981
+ left: "50%",
1982
+ transform: "translateX(-50%)",
1983
+ backgroundColor: "#2f2f2f",
1984
+ color: "#ffffff",
1985
+ padding: "12px",
1986
+ borderRadius: "8px",
1987
+ boxShadow: "0px 4px 12px 0px rgba(32, 32, 32, 0.08)",
1988
+ fontSize: "13px",
1989
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
1990
+ fontWeight: 400,
1991
+ lineHeight: 1.5,
1992
+ whiteSpace: "nowrap",
1993
+ pointerEvents: "none",
1994
+ zIndex: 1e3,
1995
+ opacity: 0,
1996
+ transition: "opacity 0.2s ease-in-out"
1997
+ };
1998
+ var wrapperStyles4 = {
1999
+ position: "relative",
2000
+ display: "inline-block"
2001
+ };
2002
+ var Tooltip = React11.forwardRef(
2003
+ ({
2004
+ content,
2005
+ children,
2006
+ className,
2007
+ style,
2008
+ "data-testid": dataTestId
2009
+ }, ref) => {
2010
+ const [isVisible, setIsVisible] = React11.useState(false);
2011
+ const visibleTooltipStyles = {
2012
+ ...tooltipStyles,
2013
+ opacity: isVisible ? 1 : 0,
2014
+ ...style
2015
+ };
2016
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2017
+ "div",
2018
+ {
2019
+ ref,
2020
+ style: wrapperStyles4,
2021
+ onMouseEnter: () => setIsVisible(true),
2022
+ onMouseLeave: () => setIsVisible(false),
2023
+ "data-testid": dataTestId,
2024
+ children: [
2025
+ children,
2026
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2027
+ "div",
2028
+ {
2029
+ className: (0, import_clsx11.clsx)("arbor-tooltip", className),
2030
+ style: visibleTooltipStyles,
2031
+ role: "tooltip",
2032
+ "aria-hidden": !isVisible,
2033
+ children: content
2034
+ }
2035
+ )
2036
+ ]
2037
+ }
2038
+ );
2039
+ }
2040
+ );
2041
+ Tooltip.displayName = "Tooltip";
2042
+
2043
+ // src/Toggle/Toggle.tsx
2044
+ var React12 = __toESM(require("react"));
2045
+ var import_clsx12 = require("clsx");
2046
+ var import_jsx_runtime12 = require("react/jsx-runtime");
2047
+ var toggleContainerStyles = {
2048
+ width: "40px",
2049
+ height: "24px",
2050
+ borderRadius: "16px",
2051
+ border: "1px solid",
2052
+ position: "relative",
2053
+ cursor: "pointer",
2054
+ transition: "all 0.2s ease-in-out"
2055
+ };
2056
+ var knobStyles = {
2057
+ width: "18px",
2058
+ height: "18px",
2059
+ borderRadius: "50%",
2060
+ position: "absolute",
2061
+ top: "50%",
2062
+ transform: "translateY(-50%)",
2063
+ transition: "all 0.2s ease-in-out"
2064
+ };
2065
+ var labelStyles7 = {
2066
+ fontSize: "13px",
2067
+ color: "#2f2f2f",
2068
+ cursor: "pointer",
2069
+ userSelect: "none",
2070
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
2071
+ };
2072
+ var wrapperStyles5 = {
2073
+ display: "flex",
2074
+ alignItems: "center",
2075
+ gap: "8px"
2076
+ };
2077
+ var Toggle = React12.forwardRef(
2078
+ ({
2079
+ label,
2080
+ checked = false,
2081
+ onChange,
2082
+ disabled = false,
2083
+ className,
2084
+ style,
2085
+ "data-testid": dataTestId,
2086
+ name,
2087
+ value
2088
+ }, ref) => {
2089
+ const [isFocused, setIsFocused] = React12.useState(false);
2090
+ const [isHovered, setIsHovered] = React12.useState(false);
2091
+ const [isActive, setIsActive] = React12.useState(false);
2092
+ const toggleId = React12.useId();
2093
+ const handleChange = (e) => {
2094
+ if (!disabled) {
2095
+ onChange?.(e.target.checked);
2096
+ }
2097
+ };
2098
+ const getContainerStyles = () => {
2099
+ if (disabled) {
2100
+ return {
2101
+ ...toggleContainerStyles,
2102
+ backgroundColor: checked ? "#d1d1d1" : "#ffffff",
2103
+ borderColor: checked ? "#d1d1d1" : "#d1d1d1",
2104
+ cursor: "not-allowed"
2105
+ };
2106
+ }
2107
+ if (checked) {
2108
+ if (isActive && isFocused) {
2109
+ return {
2110
+ ...toggleContainerStyles,
2111
+ backgroundColor: "#024002",
2112
+ borderColor: "#024002",
2113
+ boxShadow: "0px 0px 0px 3px #3cad51"
2114
+ };
2115
+ }
2116
+ if (isActive) {
2117
+ return {
2118
+ ...toggleContainerStyles,
2119
+ backgroundColor: "#024002",
2120
+ borderColor: "#024002"
2121
+ };
2122
+ }
2123
+ if (isHovered) {
2124
+ return {
2125
+ ...toggleContainerStyles,
2126
+ backgroundColor: "#005700",
2127
+ borderColor: "#005700"
2128
+ };
2129
+ }
2130
+ if (isFocused) {
2131
+ return {
2132
+ ...toggleContainerStyles,
2133
+ backgroundColor: "#0b800b",
2134
+ borderColor: "#0b800b",
2135
+ boxShadow: "0px 0px 0px 3px #3cad51"
2136
+ };
2137
+ }
2138
+ return {
2139
+ ...toggleContainerStyles,
2140
+ backgroundColor: "#0b800b",
2141
+ borderColor: "#0b800b"
2142
+ };
2143
+ } else {
2144
+ if (isActive && isFocused) {
2145
+ return {
2146
+ ...toggleContainerStyles,
2147
+ backgroundColor: "#efefef",
2148
+ borderColor: "#2f2f2f",
2149
+ boxShadow: "0px 0px 0px 3px #3cad51"
2150
+ };
2151
+ }
2152
+ if (isActive) {
2153
+ return {
2154
+ ...toggleContainerStyles,
2155
+ backgroundColor: "#efefef",
2156
+ borderColor: "#2f2f2f"
2157
+ };
2158
+ }
2159
+ if (isHovered) {
2160
+ return {
2161
+ ...toggleContainerStyles,
2162
+ backgroundColor: "#f8f8f8",
2163
+ borderColor: "#595959"
2164
+ };
2165
+ }
2166
+ if (isFocused) {
2167
+ return {
2168
+ ...toggleContainerStyles,
2169
+ backgroundColor: "#ffffff",
2170
+ borderColor: "#7e7e7e",
2171
+ boxShadow: "0px 0px 0px 3px #3cad51"
2172
+ };
2173
+ }
2174
+ return {
2175
+ ...toggleContainerStyles,
2176
+ backgroundColor: "#ffffff",
2177
+ borderColor: "#7e7e7e"
2178
+ };
2179
+ }
2180
+ };
2181
+ const getKnobStyles = () => {
2182
+ const baseKnob = {
2183
+ ...knobStyles,
2184
+ left: checked ? "18px" : "2px"
2185
+ };
2186
+ if (disabled) {
2187
+ return {
2188
+ ...baseKnob,
2189
+ backgroundColor: checked ? "#f8f8f8" : "#d1d1d1"
2190
+ };
2191
+ }
2192
+ if (checked) {
2193
+ if (isActive) {
2194
+ return {
2195
+ ...baseKnob,
2196
+ backgroundColor: "#efefef"
2197
+ };
2198
+ }
2199
+ if (isHovered) {
2200
+ return {
2201
+ ...baseKnob,
2202
+ backgroundColor: "#f8f8f8"
2203
+ };
2204
+ }
2205
+ return {
2206
+ ...baseKnob,
2207
+ backgroundColor: "#ffffff"
2208
+ };
2209
+ } else {
2210
+ if (isActive) {
2211
+ return {
2212
+ ...baseKnob,
2213
+ backgroundColor: "#2f2f2f"
2214
+ };
2215
+ }
2216
+ if (isHovered) {
2217
+ return {
2218
+ ...baseKnob,
2219
+ backgroundColor: "#595959"
2220
+ };
2221
+ }
2222
+ return {
2223
+ ...baseKnob,
2224
+ backgroundColor: "#7e7e7e"
2225
+ };
2226
+ }
2227
+ };
2228
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2229
+ "div",
2230
+ {
2231
+ className: (0, import_clsx12.clsx)("arbor-toggle-wrapper", className),
2232
+ style: { ...wrapperStyles5, ...style },
2233
+ "data-testid": dataTestId,
2234
+ children: [
2235
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2236
+ "input",
2237
+ {
2238
+ ref,
2239
+ id: toggleId,
2240
+ type: "checkbox",
2241
+ checked,
2242
+ onChange: handleChange,
2243
+ onFocus: () => setIsFocused(true),
2244
+ onBlur: () => setIsFocused(false),
2245
+ disabled,
2246
+ name,
2247
+ value,
2248
+ style: {
2249
+ position: "absolute",
2250
+ opacity: 0,
2251
+ width: 0,
2252
+ height: 0
2253
+ },
2254
+ "aria-checked": checked
2255
+ }
2256
+ ),
2257
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2258
+ "label",
2259
+ {
2260
+ htmlFor: toggleId,
2261
+ onMouseEnter: () => !disabled && setIsHovered(true),
2262
+ onMouseLeave: () => !disabled && setIsHovered(false),
2263
+ onMouseDown: () => !disabled && setIsActive(true),
2264
+ onMouseUp: () => !disabled && setIsActive(false),
2265
+ style: {
2266
+ display: "flex",
2267
+ alignItems: "center",
2268
+ gap: "8px",
2269
+ cursor: disabled ? "not-allowed" : "pointer"
2270
+ },
2271
+ children: [
2272
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: getContainerStyles(), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: getKnobStyles() }) }),
2273
+ label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2274
+ "span",
2275
+ {
2276
+ style: {
2277
+ ...labelStyles7,
2278
+ color: disabled ? "#7e7e7e" : "#2f2f2f",
2279
+ cursor: disabled ? "not-allowed" : "pointer"
2280
+ },
2281
+ children: label
2282
+ }
2283
+ )
2284
+ ]
2285
+ }
2286
+ )
2287
+ ]
2288
+ }
2289
+ );
2290
+ }
2291
+ );
2292
+ Toggle.displayName = "Toggle";
2293
+
2294
+ // src/TextArea/TextArea.tsx
2295
+ var React13 = __toESM(require("react"));
2296
+ var import_clsx13 = require("clsx");
2297
+ var import_jsx_runtime13 = require("react/jsx-runtime");
2298
+ var labelStyles8 = {
2299
+ fontSize: "13px",
2300
+ fontWeight: 600,
2301
+ color: "#2f2f2f",
2302
+ marginBottom: "0px",
2303
+ display: "block",
2304
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
2305
+ };
2306
+ var textareaWrapperStyles = {
2307
+ position: "relative",
2308
+ width: "100%"
2309
+ };
2310
+ var textareaStyles = {
2311
+ width: "100%",
2312
+ minHeight: "72px",
2313
+ padding: "8px",
2314
+ fontSize: "13px",
2315
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
2316
+ border: "1px solid",
2317
+ borderRadius: "8px",
2318
+ outline: "none",
2319
+ resize: "vertical",
2320
+ transition: "all 0.2s ease-in-out",
2321
+ lineHeight: "1.5"
2322
+ };
2323
+ var helperTextStyles5 = {
2324
+ fontSize: "13px",
2325
+ marginTop: "4px",
2326
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
2327
+ };
2328
+ var TextArea = React13.forwardRef(
2329
+ ({
2330
+ label,
2331
+ placeholder,
2332
+ value,
2333
+ onChange,
2334
+ state = "default",
2335
+ error,
2336
+ helperText,
2337
+ disabled = false,
2338
+ rows = 3,
2339
+ className,
2340
+ style,
2341
+ "data-testid": dataTestId,
2342
+ name
2343
+ }, ref) => {
2344
+ const [isFocused, setIsFocused] = React13.useState(false);
2345
+ const [isHovered, setIsHovered] = React13.useState(false);
2346
+ const textareaId = React13.useId();
2347
+ const actualState = error ? "error" : state;
2348
+ const getBorderColor = () => {
2349
+ if (disabled) {
2350
+ return "#dfdfdf";
2351
+ }
2352
+ if (actualState === "error") {
2353
+ return "#c93232";
2354
+ }
2355
+ if (actualState === "success") {
2356
+ return "#0e8a0e";
2357
+ }
2358
+ if (isFocused) {
2359
+ return "#0e8a0e";
2360
+ }
2361
+ if (isHovered) {
2362
+ return "#7e7e7e";
2363
+ }
2364
+ return "#dfdfdf";
2365
+ };
2366
+ const getBackgroundColor = () => {
2367
+ if (disabled) {
2368
+ return "#efefef";
2369
+ }
2370
+ return "#ffffff";
2371
+ };
2372
+ const getBoxShadow = () => {
2373
+ if (isFocused && !disabled) {
2374
+ if (actualState === "error") {
2375
+ return "0px 0px 0px 3px rgba(201, 50, 50, 0.2)";
2376
+ }
2377
+ return "0px 0px 0px 3px #3cad51";
2378
+ }
2379
+ return void 0;
2380
+ };
2381
+ const textareaStylesCombined = {
2382
+ ...textareaStyles,
2383
+ borderColor: getBorderColor(),
2384
+ backgroundColor: getBackgroundColor(),
2385
+ boxShadow: getBoxShadow(),
2386
+ color: disabled ? "#7e7e7e" : "#2f2f2f",
2387
+ cursor: disabled ? "not-allowed" : "text"
2388
+ };
2389
+ const helperColor = error ? "#c93232" : actualState === "success" ? "#0e8a0e" : "#595959";
2390
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
2391
+ "div",
2392
+ {
2393
+ className: (0, import_clsx13.clsx)("arbor-textarea-wrapper", className),
2394
+ style,
2395
+ "data-testid": dataTestId,
2396
+ children: [
2397
+ label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: textareaId, style: labelStyles8, children: label }),
2398
+ label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { height: "8px" } }),
2399
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: textareaWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2400
+ "textarea",
2401
+ {
2402
+ ref,
2403
+ id: textareaId,
2404
+ name,
2405
+ placeholder,
2406
+ value,
2407
+ onChange,
2408
+ disabled,
2409
+ rows,
2410
+ onFocus: () => setIsFocused(true),
2411
+ onBlur: () => setIsFocused(false),
2412
+ onMouseEnter: () => setIsHovered(true),
2413
+ onMouseLeave: () => setIsHovered(false),
2414
+ style: textareaStylesCombined
2415
+ }
2416
+ ) }),
2417
+ (error || helperText) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { ...helperTextStyles5, color: helperColor }, role: error ? "alert" : void 0, children: error || helperText })
2418
+ ]
2419
+ }
2420
+ );
2421
+ }
2422
+ );
2423
+ TextArea.displayName = "TextArea";
2424
+
2425
+ // src/Tabs/Tabs.tsx
2426
+ var React14 = __toESM(require("react"));
2427
+ var import_clsx14 = require("clsx");
2428
+ var import_jsx_runtime14 = require("react/jsx-runtime");
2429
+ var tabsContainerStyles = {
2430
+ display: "flex",
2431
+ alignItems: "flex-start",
2432
+ gap: "12px",
2433
+ borderBottom: "1px solid #f8f8f8",
2434
+ paddingBottom: "1px",
2435
+ width: "100%"
2436
+ };
2437
+ var tabItemWrapperStyles = {
2438
+ display: "flex",
2439
+ flexDirection: "column",
2440
+ alignItems: "center",
2441
+ cursor: "pointer",
2442
+ position: "relative"
2443
+ };
2444
+ var tabItemStyles = {
2445
+ display: "flex",
2446
+ alignItems: "center",
2447
+ justifyContent: "center",
2448
+ gap: "8px",
2449
+ padding: "8px 12px",
2450
+ borderRadius: "8px",
2451
+ fontSize: "14px",
2452
+ lineHeight: "1.5",
2453
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
2454
+ outline: "none",
2455
+ transition: "all 0.2s ease-in-out",
2456
+ userSelect: "none"
2457
+ };
2458
+ var underlineStyles = {
2459
+ width: "100%",
2460
+ height: "2px",
2461
+ borderTopLeftRadius: "4px",
2462
+ borderTopRightRadius: "4px",
2463
+ transition: "background-color 0.2s ease-in-out"
2464
+ };
2465
+ var Tabs = React14.forwardRef(
2466
+ ({
2467
+ tabs,
2468
+ activeTab,
2469
+ onTabChange,
2470
+ className,
2471
+ style,
2472
+ "data-testid": dataTestId
2473
+ }, ref) => {
2474
+ const [hoveredTab, setHoveredTab] = React14.useState(null);
2475
+ const [focusedTab, setFocusedTab] = React14.useState(null);
2476
+ const currentActiveTab = activeTab || (tabs.length > 0 ? tabs[0].value : "");
2477
+ const handleTabClick = (value) => {
2478
+ onTabChange?.(value);
2479
+ };
2480
+ const handleKeyDown = (e, value) => {
2481
+ if (e.key === "Enter" || e.key === " ") {
2482
+ e.preventDefault();
2483
+ handleTabClick(value);
2484
+ }
2485
+ };
2486
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2487
+ "div",
2488
+ {
2489
+ ref,
2490
+ className: (0, import_clsx14.clsx)("arbor-tabs", className),
2491
+ style: { ...tabsContainerStyles, ...style },
2492
+ "data-testid": dataTestId,
2493
+ role: "tablist",
2494
+ children: tabs.map((tab) => {
2495
+ const isActive = tab.value === currentActiveTab;
2496
+ const isHovered = tab.value === hoveredTab;
2497
+ const isFocused = tab.value === focusedTab;
2498
+ const getTextColor = () => {
2499
+ if (isActive) {
2500
+ return "#0e8a0e";
2501
+ }
2502
+ if (isHovered) {
2503
+ return "#202020";
2504
+ }
2505
+ return "#2f2f2f";
2506
+ };
2507
+ const getFontWeight = () => {
2508
+ return isActive ? 600 : 500;
2509
+ };
2510
+ const getUnderlineColor = () => {
2511
+ if (isActive) {
2512
+ return "#0e8a0e";
2513
+ }
2514
+ if (isHovered) {
2515
+ return "#d1d1d1";
2516
+ }
2517
+ return "transparent";
2518
+ };
2519
+ const getBoxShadow = () => {
2520
+ if (isFocused) {
2521
+ return "0px 0px 0px 3px #3cad51";
2522
+ }
2523
+ return void 0;
2524
+ };
2525
+ const tabItemStylesCombined = {
2526
+ ...tabItemStyles,
2527
+ color: getTextColor(),
2528
+ fontWeight: getFontWeight(),
2529
+ boxShadow: getBoxShadow(),
2530
+ backgroundColor: isFocused ? "rgba(255, 255, 255, 0.01)" : "transparent"
2531
+ };
2532
+ const underlineStylesCombined = {
2533
+ ...underlineStyles,
2534
+ backgroundColor: getUnderlineColor()
2535
+ };
2536
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2537
+ "div",
2538
+ {
2539
+ style: tabItemWrapperStyles,
2540
+ onMouseEnter: () => setHoveredTab(tab.value),
2541
+ onMouseLeave: () => setHoveredTab(null),
2542
+ children: [
2543
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2544
+ "div",
2545
+ {
2546
+ role: "tab",
2547
+ "aria-selected": isActive,
2548
+ tabIndex: isActive ? 0 : -1,
2549
+ onClick: () => handleTabClick(tab.value),
2550
+ onKeyDown: (e) => handleKeyDown(e, tab.value),
2551
+ onFocus: () => setFocusedTab(tab.value),
2552
+ onBlur: () => setFocusedTab(null),
2553
+ style: tabItemStylesCombined,
2554
+ children: [
2555
+ tab.icon && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { style: { display: "flex", alignItems: "center" }, children: tab.icon }),
2556
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: tab.label })
2557
+ ]
2558
+ }
2559
+ ),
2560
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { style: underlineStylesCombined })
2561
+ ]
2562
+ },
2563
+ tab.value
2564
+ );
2565
+ })
2566
+ }
2567
+ );
2568
+ }
2569
+ );
2570
+ Tabs.displayName = "Tabs";
2571
+
2572
+ // src/Banner/Banner.tsx
2573
+ var React15 = __toESM(require("react"));
2574
+ var import_clsx15 = require("clsx");
2575
+ var import_lucide_react5 = require("lucide-react");
2576
+ var import_jsx_runtime15 = require("react/jsx-runtime");
2577
+ var containerStyles2 = {
2578
+ display: "flex",
2579
+ alignItems: "flex-start",
2580
+ padding: "16px",
2581
+ borderRadius: "8px",
2582
+ border: "1px solid",
2583
+ width: "100%",
2584
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
2585
+ };
2586
+ var iconContainerStyles = {
2587
+ flexShrink: 0,
2588
+ width: "24px",
2589
+ height: "24px",
2590
+ display: "flex",
2591
+ alignItems: "center",
2592
+ justifyContent: "center"
2593
+ };
2594
+ var contentContainerStyles = {
2595
+ flex: 1,
2596
+ display: "flex",
2597
+ flexDirection: "column",
2598
+ minWidth: 0
2599
+ };
2600
+ var titleStyles = {
2601
+ fontSize: "18px",
2602
+ fontWeight: 600,
2603
+ lineHeight: "1.25",
2604
+ marginBottom: "8px"
2605
+ };
2606
+ var messageStyles2 = {
2607
+ fontSize: "13px",
2608
+ fontWeight: 400,
2609
+ lineHeight: "1.5",
2610
+ margin: 0
2611
+ };
2612
+ var actionContainerStyles = {
2613
+ display: "flex",
2614
+ flexDirection: "column",
2615
+ justifyContent: "flex-end",
2616
+ alignItems: "flex-end",
2617
+ alignSelf: "stretch",
2618
+ flexShrink: 0
2619
+ };
2620
+ var actionButtonStyles = {
2621
+ background: "none",
2622
+ border: "none",
2623
+ padding: 0,
2624
+ fontSize: "13px",
2625
+ fontWeight: 600,
2626
+ lineHeight: "1.5",
2627
+ textDecoration: "underline",
2628
+ textUnderlinePosition: "from-font",
2629
+ cursor: "pointer",
2630
+ fontFamily: "inherit"
2631
+ };
2632
+ var closeButtonStyles2 = {
2633
+ background: "none",
2634
+ border: "none",
2635
+ padding: "4px",
2636
+ cursor: "pointer",
2637
+ display: "flex",
2638
+ alignItems: "center",
2639
+ justifyContent: "center",
2640
+ flexShrink: 0,
2641
+ marginLeft: "8px"
2642
+ };
2643
+ var variantConfig2 = {
2644
+ warning: {
2645
+ backgroundColor: "#fffaf5",
2646
+ borderColor: "#e4720d",
2647
+ textColor: "#611f00",
2648
+ actionColor: "#a74102",
2649
+ icon: import_lucide_react5.AlertTriangle
2650
+ },
2651
+ destructive: {
2652
+ backgroundColor: "#fff5f5",
2653
+ borderColor: "#c93232",
2654
+ textColor: "#610202",
2655
+ actionColor: "#920a0a",
2656
+ icon: import_lucide_react5.AlertCircle
2657
+ },
2658
+ information: {
2659
+ backgroundColor: "#f5fbff",
2660
+ borderColor: "#2c8bca",
2661
+ textColor: "#053a61",
2662
+ actionColor: "#024f83",
2663
+ icon: import_lucide_react5.Info
2664
+ },
2665
+ neutral: {
2666
+ backgroundColor: "transparent",
2667
+ borderColor: "#b3b3b3",
2668
+ textColor: "#2f2f2f",
2669
+ actionColor: "#2f2f2f",
2670
+ icon: import_lucide_react5.Info
2671
+ }
2672
+ };
2673
+ var Banner = React15.forwardRef(
2674
+ ({
2675
+ variant = "information",
2676
+ title,
2677
+ message,
2678
+ icon = true,
2679
+ actionLabel,
2680
+ onAction,
2681
+ onClose,
2682
+ className,
2683
+ style,
2684
+ "data-testid": dataTestId
2685
+ }, ref) => {
2686
+ const config = variantConfig2[variant];
2687
+ const DefaultIcon = config.icon;
2688
+ const showIcon = icon !== false;
2689
+ const iconElement = icon === true || icon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DefaultIcon, { size: 20, strokeWidth: 2 }) : icon;
2690
+ const containerStylesCombined = {
2691
+ ...containerStyles2,
2692
+ backgroundColor: config.backgroundColor,
2693
+ borderColor: config.borderColor,
2694
+ color: config.textColor,
2695
+ gap: showIcon ? "16px" : "0px",
2696
+ ...style
2697
+ };
2698
+ const titleStylesCombined = {
2699
+ ...titleStyles,
2700
+ color: config.textColor
2701
+ };
2702
+ const messageStylesCombined = {
2703
+ ...messageStyles2,
2704
+ color: config.textColor
2705
+ };
2706
+ const actionButtonStylesCombined = {
2707
+ ...actionButtonStyles,
2708
+ color: config.actionColor
2709
+ };
2710
+ const closeButtonStylesCombined = {
2711
+ ...closeButtonStyles2,
2712
+ color: config.textColor
2713
+ };
2714
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2715
+ "div",
2716
+ {
2717
+ ref,
2718
+ className: (0, import_clsx15.clsx)("arbor-banner", `arbor-banner--${variant}`, className),
2719
+ style: containerStylesCombined,
2720
+ "data-testid": dataTestId,
2721
+ role: "alert",
2722
+ children: [
2723
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { ...iconContainerStyles, color: config.textColor }, children: iconElement }),
2724
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: contentContainerStyles, children: [
2725
+ title && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: titleStylesCombined, children: title }),
2726
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { style: messageStylesCombined, children: message })
2727
+ ] }),
2728
+ actionLabel && onAction && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: actionContainerStyles, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2729
+ "button",
2730
+ {
2731
+ type: "button",
2732
+ onClick: onAction,
2733
+ style: actionButtonStylesCombined,
2734
+ children: actionLabel
2735
+ }
2736
+ ) }),
2737
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2738
+ "button",
2739
+ {
2740
+ type: "button",
2741
+ onClick: onClose,
2742
+ style: closeButtonStylesCombined,
2743
+ "aria-label": "Close banner",
2744
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react5.X, { size: 20 })
2745
+ }
2746
+ )
2747
+ ]
2748
+ }
2749
+ );
2750
+ }
2751
+ );
2752
+ Banner.displayName = "Banner";
2753
+
2754
+ // src/Pagination/Pagination.tsx
2755
+ var React16 = __toESM(require("react"));
2756
+ var import_clsx16 = require("clsx");
2757
+ var import_lucide_react6 = require("lucide-react");
2758
+ var import_jsx_runtime16 = require("react/jsx-runtime");
2759
+ var containerStyles3 = {
2760
+ display: "flex",
2761
+ alignItems: "center",
2762
+ gap: "8px",
2763
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
2764
+ };
2765
+ var buttonStyles3 = {
2766
+ width: "24px",
2767
+ height: "24px",
2768
+ borderRadius: "50%",
2769
+ border: "none",
2770
+ background: "transparent",
2771
+ cursor: "pointer",
2772
+ display: "flex",
2773
+ alignItems: "center",
2774
+ justifyContent: "center",
2775
+ padding: 0,
2776
+ transition: "background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out",
2777
+ flexShrink: 0,
2778
+ WebkitTapHighlightColor: "transparent",
2779
+ outline: "none"
2780
+ };
2781
+ var buttonDisabledStyles = {
2782
+ cursor: "not-allowed",
2783
+ opacity: 0.5
2784
+ };
2785
+ var labelStyles9 = {
2786
+ fontSize: "13px",
2787
+ fontWeight: 600,
2788
+ lineHeight: "1.5",
2789
+ color: "#2f2f2f"
2790
+ };
2791
+ var inputWrapperStyles = {
2792
+ display: "flex",
2793
+ alignItems: "center",
2794
+ gap: "8px"
2795
+ };
2796
+ var inputStyles4 = {
2797
+ width: "60px",
2798
+ paddingTop: "12px",
2799
+ paddingBottom: "12px",
2800
+ paddingLeft: "16px",
2801
+ paddingRight: "16px",
2802
+ fontSize: "13px",
2803
+ fontWeight: 400,
2804
+ lineHeight: "1.5",
2805
+ color: "#2f2f2f",
2806
+ backgroundColor: "white",
2807
+ border: "1px solid #dfdfdf",
2808
+ borderRadius: "8px",
2809
+ fontFamily: "inherit",
2810
+ textAlign: "center",
2811
+ outline: "none"
2812
+ };
2813
+ var inputFocusStyles = {
2814
+ boxShadow: "0px 0px 0px 3px #3cad51"
2815
+ };
2816
+ var textStyles = {
2817
+ fontSize: "13px",
2818
+ fontWeight: 400,
2819
+ lineHeight: "1.5",
2820
+ color: "#2f2f2f"
2821
+ };
2822
+ var Pagination = React16.forwardRef(
2823
+ ({
2824
+ currentPage,
2825
+ totalPages,
2826
+ onPageChange,
2827
+ className,
2828
+ style,
2829
+ "data-testid": dataTestId
2830
+ }, ref) => {
2831
+ const [inputValue, setInputValue] = React16.useState(currentPage.toString());
2832
+ const [focusedButton, setFocusedButton] = React16.useState(null);
2833
+ const [hoveredButton, setHoveredButton] = React16.useState(null);
2834
+ const [activeButton, setActiveButton] = React16.useState(null);
2835
+ const [inputFocused, setInputFocused] = React16.useState(false);
2836
+ React16.useEffect(() => {
2837
+ setInputValue(currentPage.toString());
2838
+ }, [currentPage]);
2839
+ const handleFirstPage = () => {
2840
+ if (currentPage !== 1) {
2841
+ onPageChange(1);
2842
+ }
2843
+ };
2844
+ const handlePreviousPage = () => {
2845
+ if (currentPage > 1) {
2846
+ onPageChange(currentPage - 1);
2847
+ }
2848
+ };
2849
+ const handleNextPage = () => {
2850
+ if (currentPage < totalPages) {
2851
+ onPageChange(currentPage + 1);
2852
+ }
2853
+ };
2854
+ const handleLastPage = () => {
2855
+ if (currentPage !== totalPages) {
2856
+ onPageChange(totalPages);
2857
+ }
2858
+ };
2859
+ const handleInputChange = (e) => {
2860
+ const value = e.target.value;
2861
+ if (value === "" || /^\d+$/.test(value)) {
2862
+ setInputValue(value);
2863
+ }
2864
+ };
2865
+ const handleInputBlur = () => {
2866
+ setInputFocused(false);
2867
+ const pageNumber = parseInt(inputValue, 10);
2868
+ if (isNaN(pageNumber) || pageNumber < 1) {
2869
+ setInputValue(currentPage.toString());
2870
+ } else if (pageNumber > totalPages) {
2871
+ setInputValue(totalPages.toString());
2872
+ onPageChange(totalPages);
2873
+ } else if (pageNumber !== currentPage) {
2874
+ onPageChange(pageNumber);
2875
+ }
2876
+ };
2877
+ const handleInputKeyDown = (e) => {
2878
+ if (e.key === "Enter") {
2879
+ handleInputBlur();
2880
+ e.target.blur();
2881
+ }
2882
+ };
2883
+ const getButtonStyle = (buttonName, disabled) => {
2884
+ if (disabled) {
2885
+ return { ...buttonStyles3, ...buttonDisabledStyles };
2886
+ }
2887
+ const isHovered = hoveredButton === buttonName;
2888
+ const isFocused = focusedButton === buttonName;
2889
+ const isActive = activeButton === buttonName;
2890
+ const style2 = {
2891
+ ...buttonStyles3
2892
+ };
2893
+ if (isHovered && !isFocused && !isActive) {
2894
+ style2.backgroundColor = "#efefef";
2895
+ }
2896
+ if (isActive && !isFocused) {
2897
+ style2.backgroundColor = "transparent";
2898
+ }
2899
+ if (isFocused) {
2900
+ style2.boxShadow = "0px 0px 0px 3px #3cad51";
2901
+ style2.backgroundColor = "rgba(255, 255, 255, 0.01)";
2902
+ }
2903
+ return style2;
2904
+ };
2905
+ const isFirstDisabled = currentPage === 1;
2906
+ const isPreviousDisabled = currentPage === 1;
2907
+ const isNextDisabled = currentPage === totalPages;
2908
+ const isLastDisabled = currentPage === totalPages;
2909
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2910
+ "div",
2911
+ {
2912
+ ref,
2913
+ className: (0, import_clsx16.clsx)("arbor-pagination", className),
2914
+ style: { ...containerStyles3, ...style },
2915
+ "data-testid": dataTestId,
2916
+ children: [
2917
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2918
+ "button",
2919
+ {
2920
+ type: "button",
2921
+ onClick: handleFirstPage,
2922
+ disabled: isFirstDisabled,
2923
+ onMouseEnter: () => setHoveredButton("first"),
2924
+ onMouseLeave: () => setHoveredButton(null),
2925
+ onMouseDown: () => setActiveButton("first"),
2926
+ onMouseUp: () => setActiveButton(null),
2927
+ onFocus: () => setFocusedButton("first"),
2928
+ onBlur: () => setFocusedButton(null),
2929
+ style: getButtonStyle("first", isFirstDisabled),
2930
+ "aria-label": "Go to first page",
2931
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react6.ChevronsLeft, { size: 16, color: "#2f2f2f" })
2932
+ }
2933
+ ),
2934
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2935
+ "button",
2936
+ {
2937
+ type: "button",
2938
+ onClick: handlePreviousPage,
2939
+ disabled: isPreviousDisabled,
2940
+ onMouseEnter: () => setHoveredButton("previous"),
2941
+ onMouseLeave: () => setHoveredButton(null),
2942
+ onMouseDown: () => setActiveButton("previous"),
2943
+ onMouseUp: () => setActiveButton(null),
2944
+ onFocus: () => setFocusedButton("previous"),
2945
+ onBlur: () => setFocusedButton(null),
2946
+ style: getButtonStyle("previous", isPreviousDisabled),
2947
+ "aria-label": "Go to previous page",
2948
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react6.ChevronLeft, { size: 16, color: "#2f2f2f" })
2949
+ }
2950
+ ),
2951
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: inputWrapperStyles, children: [
2952
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: labelStyles9, children: "Page" }),
2953
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2954
+ "input",
2955
+ {
2956
+ type: "text",
2957
+ value: inputValue,
2958
+ onChange: handleInputChange,
2959
+ onBlur: handleInputBlur,
2960
+ onFocus: () => setInputFocused(true),
2961
+ onKeyDown: handleInputKeyDown,
2962
+ style: {
2963
+ ...inputStyles4,
2964
+ ...inputFocused && inputFocusStyles
2965
+ },
2966
+ "aria-label": `Page ${currentPage} of ${totalPages}`
2967
+ }
2968
+ ),
2969
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { style: textStyles, children: [
2970
+ "of ",
2971
+ totalPages
2972
+ ] })
2973
+ ] }),
2974
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2975
+ "button",
2976
+ {
2977
+ type: "button",
2978
+ onClick: handleNextPage,
2979
+ disabled: isNextDisabled,
2980
+ onMouseEnter: () => setHoveredButton("next"),
2981
+ onMouseLeave: () => setHoveredButton(null),
2982
+ onMouseDown: () => setActiveButton("next"),
2983
+ onMouseUp: () => setActiveButton(null),
2984
+ onFocus: () => setFocusedButton("next"),
2985
+ onBlur: () => setFocusedButton(null),
2986
+ style: getButtonStyle("next", isNextDisabled),
2987
+ "aria-label": "Go to next page",
2988
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react6.ChevronRight, { size: 16, color: "#2f2f2f" })
2989
+ }
2990
+ ),
2991
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2992
+ "button",
2993
+ {
2994
+ type: "button",
2995
+ onClick: handleLastPage,
2996
+ disabled: isLastDisabled,
2997
+ onMouseEnter: () => setHoveredButton("last"),
2998
+ onMouseLeave: () => setHoveredButton(null),
2999
+ onMouseDown: () => setActiveButton("last"),
3000
+ onMouseUp: () => setActiveButton(null),
3001
+ onFocus: () => setFocusedButton("last"),
3002
+ onBlur: () => setFocusedButton(null),
3003
+ style: getButtonStyle("last", isLastDisabled),
3004
+ "aria-label": "Go to last page",
3005
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react6.ChevronsRight, { size: 16, color: "#2f2f2f" })
3006
+ }
3007
+ )
3008
+ ]
3009
+ }
3010
+ );
3011
+ }
3012
+ );
3013
+ Pagination.displayName = "Pagination";
3014
+
3015
+ // src/TableFooterPagination/TableFooterPagination.tsx
3016
+ var React17 = __toESM(require("react"));
3017
+ var import_clsx17 = require("clsx");
3018
+ var import_lucide_react7 = require("lucide-react");
3019
+ var import_jsx_runtime17 = require("react/jsx-runtime");
3020
+ var containerStyles4 = {
3021
+ display: "flex",
3022
+ alignItems: "center",
3023
+ justifyContent: "space-between",
3024
+ backgroundColor: "white",
3025
+ paddingTop: "4px",
3026
+ paddingBottom: 0,
3027
+ paddingLeft: 0,
3028
+ paddingRight: 0,
3029
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
3030
+ };
3031
+ var textStyles2 = {
3032
+ fontSize: "13px",
3033
+ fontWeight: 400,
3034
+ lineHeight: "1.5",
3035
+ color: "#2f2f2f",
3036
+ minWidth: "165px"
3037
+ };
3038
+ var paginationWrapperStyles = {
3039
+ display: "flex",
3040
+ alignItems: "center",
3041
+ justifyContent: "center",
3042
+ gap: "8px",
3043
+ minWidth: "165px",
3044
+ flexWrap: "wrap"
3045
+ };
3046
+ var paginationButtonStyles = {
3047
+ width: "32px",
3048
+ height: "32px",
3049
+ minWidth: "32px",
3050
+ minHeight: "32px",
3051
+ maxWidth: "32px",
3052
+ maxHeight: "32px",
3053
+ borderRadius: "99px",
3054
+ border: "none",
3055
+ background: "white",
3056
+ cursor: "pointer",
3057
+ display: "flex",
3058
+ alignItems: "center",
3059
+ justifyContent: "center",
3060
+ padding: 0,
3061
+ transition: "background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out",
3062
+ flexShrink: 0,
3063
+ WebkitTapHighlightColor: "transparent",
3064
+ outline: "none"
3065
+ };
3066
+ var paginationButtonDisabledStyles = {
3067
+ cursor: "not-allowed",
3068
+ opacity: 0.5
3069
+ };
3070
+ var paginationLabelStyles = {
3071
+ fontSize: "13px",
3072
+ fontWeight: 400,
3073
+ lineHeight: "1.5",
3074
+ color: "#2f2f2f"
3075
+ };
3076
+ var paginationInputWrapperStyles = {
3077
+ display: "flex",
3078
+ alignItems: "center",
3079
+ gap: "8px"
3080
+ };
3081
+ var paginationInputStyles = {
3082
+ width: "60px",
3083
+ paddingTop: "12px",
3084
+ paddingBottom: "12px",
3085
+ paddingLeft: "16px",
3086
+ paddingRight: "16px",
3087
+ fontSize: "13px",
3088
+ fontWeight: 400,
3089
+ lineHeight: "1.5",
3090
+ color: "#2f2f2f",
3091
+ backgroundColor: "white",
3092
+ border: "1px solid #dfdfdf",
3093
+ borderRadius: "8px",
3094
+ fontFamily: "inherit",
3095
+ textAlign: "center",
3096
+ outline: "none"
3097
+ };
3098
+ var paginationInputFocusStyles = {
3099
+ boxShadow: "0px 0px 0px 3px #3cad51"
3100
+ };
3101
+ var rightAlignedStyles = {
3102
+ display: "flex",
3103
+ gap: "16px",
3104
+ alignItems: "center",
3105
+ justifyContent: "flex-end",
3106
+ minWidth: "165px"
3107
+ };
3108
+ var perPageButtonStyles = {
3109
+ height: "32px",
3110
+ backgroundColor: "white",
3111
+ border: "1px solid #d1d1d1",
3112
+ borderRadius: "8px",
3113
+ display: "flex",
3114
+ alignItems: "center",
3115
+ gap: "8px",
3116
+ paddingLeft: "12px",
3117
+ paddingRight: "8px",
3118
+ paddingTop: "8px",
3119
+ paddingBottom: "8px",
3120
+ cursor: "pointer",
3121
+ transition: "background-color 0.2s ease-in-out",
3122
+ outline: "none"
3123
+ };
3124
+ var perPageTextStyles = {
3125
+ fontSize: "13px",
3126
+ fontWeight: 600,
3127
+ lineHeight: "1.5",
3128
+ color: "#2f2f2f",
3129
+ textAlign: "center"
3130
+ };
3131
+ var expandButtonStyles = {
3132
+ height: "32px",
3133
+ minHeight: "32px",
3134
+ backgroundColor: "#efefef",
3135
+ border: "none",
3136
+ borderRadius: "99px",
3137
+ display: "flex",
3138
+ alignItems: "center",
3139
+ justifyContent: "center",
3140
+ paddingLeft: "16px",
3141
+ paddingRight: "16px",
3142
+ paddingTop: 0,
3143
+ paddingBottom: 0,
3144
+ gap: 0,
3145
+ cursor: "pointer",
3146
+ transition: "background-color 0.2s ease-in-out",
3147
+ outline: "none"
3148
+ };
3149
+ var expandButtonTextStyles = {
3150
+ fontSize: "13px",
3151
+ fontWeight: 600,
3152
+ lineHeight: "1.5",
3153
+ color: "#2f2f2f",
3154
+ textAlign: "center"
3155
+ };
3156
+ var TableFooterPagination = React17.forwardRef(
3157
+ ({
3158
+ currentPage,
3159
+ totalPages,
3160
+ onPageChange,
3161
+ totalResults,
3162
+ currentResults,
3163
+ itemsPerPage,
3164
+ onItemsPerPageChange,
3165
+ onExpandTable,
3166
+ className,
3167
+ style,
3168
+ "data-testid": dataTestId
3169
+ }, ref) => {
3170
+ const [inputValue, setInputValue] = React17.useState(currentPage.toString());
3171
+ const [focusedButton, setFocusedButton] = React17.useState(null);
3172
+ const [hoveredButton, setHoveredButton] = React17.useState(null);
3173
+ const [activeButton, setActiveButton] = React17.useState(null);
3174
+ const [inputFocused, setInputFocused] = React17.useState(false);
3175
+ const [perPageHovered, setPerPageHovered] = React17.useState(false);
3176
+ const [expandHovered, setExpandHovered] = React17.useState(false);
3177
+ React17.useEffect(() => {
3178
+ setInputValue(currentPage.toString());
3179
+ }, [currentPage]);
3180
+ const handleFirstPage = () => {
3181
+ if (currentPage !== 1) {
3182
+ onPageChange(1);
3183
+ }
3184
+ };
3185
+ const handlePreviousPage = () => {
3186
+ if (currentPage > 1) {
3187
+ onPageChange(currentPage - 1);
3188
+ }
3189
+ };
3190
+ const handleNextPage = () => {
3191
+ if (currentPage < totalPages) {
3192
+ onPageChange(currentPage + 1);
3193
+ }
3194
+ };
3195
+ const handleLastPage = () => {
3196
+ if (currentPage !== totalPages) {
3197
+ onPageChange(totalPages);
3198
+ }
3199
+ };
3200
+ const handleInputChange = (e) => {
3201
+ const value = e.target.value;
3202
+ if (value === "" || /^\d+$/.test(value)) {
3203
+ setInputValue(value);
3204
+ }
3205
+ };
3206
+ const handleInputBlur = () => {
3207
+ setInputFocused(false);
3208
+ const pageNumber = parseInt(inputValue, 10);
3209
+ if (isNaN(pageNumber) || pageNumber < 1) {
3210
+ setInputValue(currentPage.toString());
3211
+ } else if (pageNumber > totalPages) {
3212
+ setInputValue(totalPages.toString());
3213
+ onPageChange(totalPages);
3214
+ } else if (pageNumber !== currentPage) {
3215
+ onPageChange(pageNumber);
3216
+ }
3217
+ };
3218
+ const handleInputKeyDown = (e) => {
3219
+ if (e.key === "Enter") {
3220
+ handleInputBlur();
3221
+ e.target.blur();
3222
+ }
3223
+ };
3224
+ const getButtonStyle = (buttonName, disabled) => {
3225
+ if (disabled) {
3226
+ return { ...paginationButtonStyles, ...paginationButtonDisabledStyles };
3227
+ }
3228
+ const isHovered = hoveredButton === buttonName;
3229
+ const isFocused = focusedButton === buttonName;
3230
+ const isActive = activeButton === buttonName;
3231
+ const style2 = {
3232
+ ...paginationButtonStyles
3233
+ };
3234
+ if (isHovered && !isFocused && !isActive) {
3235
+ style2.backgroundColor = "#efefef";
3236
+ }
3237
+ if (isActive && !isFocused) {
3238
+ style2.backgroundColor = "transparent";
3239
+ }
3240
+ if (isFocused) {
3241
+ style2.boxShadow = "0px 0px 0px 3px #3cad51";
3242
+ style2.backgroundColor = "rgba(255, 255, 255, 0.01)";
3243
+ }
3244
+ return style2;
3245
+ };
3246
+ const isFirstDisabled = currentPage === 1;
3247
+ const isPreviousDisabled = currentPage === 1;
3248
+ const isNextDisabled = currentPage === totalPages;
3249
+ const isLastDisabled = currentPage === totalPages;
3250
+ const resultText = currentResults === totalResults ? `Showing ${totalResults} results` : `Showing ${currentResults} of ${totalResults} results`;
3251
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
3252
+ "div",
3253
+ {
3254
+ ref,
3255
+ className: (0, import_clsx17.clsx)("arbor-table-footer-pagination", className),
3256
+ style: { ...containerStyles4, ...style },
3257
+ "data-testid": dataTestId,
3258
+ children: [
3259
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: textStyles2, children: resultText }),
3260
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: paginationWrapperStyles, children: [
3261
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3262
+ "button",
3263
+ {
3264
+ type: "button",
3265
+ onClick: handleFirstPage,
3266
+ disabled: isFirstDisabled,
3267
+ onMouseEnter: () => setHoveredButton("first"),
3268
+ onMouseLeave: () => setHoveredButton(null),
3269
+ onMouseDown: () => setActiveButton("first"),
3270
+ onMouseUp: () => setActiveButton(null),
3271
+ onFocus: () => setFocusedButton("first"),
3272
+ onBlur: () => setFocusedButton(null),
3273
+ style: getButtonStyle("first", isFirstDisabled),
3274
+ "aria-label": "Go to first page",
3275
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3276
+ "svg",
3277
+ {
3278
+ width: "16",
3279
+ height: "16",
3280
+ viewBox: "0 0 16 16",
3281
+ fill: "none",
3282
+ xmlns: "http://www.w3.org/2000/svg",
3283
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3284
+ "path",
3285
+ {
3286
+ d: "M7 12L3 8L7 4M11 12L7 8L11 4",
3287
+ stroke: "#2f2f2f",
3288
+ strokeWidth: "1.5",
3289
+ strokeLinecap: "round",
3290
+ strokeLinejoin: "round"
3291
+ }
3292
+ )
3293
+ }
3294
+ )
3295
+ }
3296
+ ),
3297
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3298
+ "button",
3299
+ {
3300
+ type: "button",
3301
+ onClick: handlePreviousPage,
3302
+ disabled: isPreviousDisabled,
3303
+ onMouseEnter: () => setHoveredButton("previous"),
3304
+ onMouseLeave: () => setHoveredButton(null),
3305
+ onMouseDown: () => setActiveButton("previous"),
3306
+ onMouseUp: () => setActiveButton(null),
3307
+ onFocus: () => setFocusedButton("previous"),
3308
+ onBlur: () => setFocusedButton(null),
3309
+ style: getButtonStyle("previous", isPreviousDisabled),
3310
+ "aria-label": "Go to previous page",
3311
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3312
+ "svg",
3313
+ {
3314
+ width: "16",
3315
+ height: "16",
3316
+ viewBox: "0 0 16 16",
3317
+ fill: "none",
3318
+ xmlns: "http://www.w3.org/2000/svg",
3319
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3320
+ "path",
3321
+ {
3322
+ d: "M10 12L6 8L10 4",
3323
+ stroke: "#2f2f2f",
3324
+ strokeWidth: "1.5",
3325
+ strokeLinecap: "round",
3326
+ strokeLinejoin: "round"
3327
+ }
3328
+ )
3329
+ }
3330
+ )
3331
+ }
3332
+ ),
3333
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: paginationInputWrapperStyles, children: [
3334
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: paginationLabelStyles, children: "Page" }),
3335
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3336
+ "input",
3337
+ {
3338
+ type: "text",
3339
+ value: inputValue,
3340
+ onChange: handleInputChange,
3341
+ onBlur: handleInputBlur,
3342
+ onFocus: () => setInputFocused(true),
3343
+ onKeyDown: handleInputKeyDown,
3344
+ style: {
3345
+ ...paginationInputStyles,
3346
+ ...inputFocused && paginationInputFocusStyles
3347
+ },
3348
+ "aria-label": `Page ${currentPage} of ${totalPages}`
3349
+ }
3350
+ ),
3351
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { style: paginationLabelStyles, children: [
3352
+ "of ",
3353
+ totalPages
3354
+ ] })
3355
+ ] }),
3356
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3357
+ "button",
3358
+ {
3359
+ type: "button",
3360
+ onClick: handleNextPage,
3361
+ disabled: isNextDisabled,
3362
+ onMouseEnter: () => setHoveredButton("next"),
3363
+ onMouseLeave: () => setHoveredButton(null),
3364
+ onMouseDown: () => setActiveButton("next"),
3365
+ onMouseUp: () => setActiveButton(null),
3366
+ onFocus: () => setFocusedButton("next"),
3367
+ onBlur: () => setFocusedButton(null),
3368
+ style: getButtonStyle("next", isNextDisabled),
3369
+ "aria-label": "Go to next page",
3370
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3371
+ "svg",
3372
+ {
3373
+ width: "16",
3374
+ height: "16",
3375
+ viewBox: "0 0 16 16",
3376
+ fill: "none",
3377
+ xmlns: "http://www.w3.org/2000/svg",
3378
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3379
+ "path",
3380
+ {
3381
+ d: "M6 4L10 8L6 12",
3382
+ stroke: "#2f2f2f",
3383
+ strokeWidth: "1.5",
3384
+ strokeLinecap: "round",
3385
+ strokeLinejoin: "round"
3386
+ }
3387
+ )
3388
+ }
3389
+ )
3390
+ }
3391
+ ),
3392
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3393
+ "button",
3394
+ {
3395
+ type: "button",
3396
+ onClick: handleLastPage,
3397
+ disabled: isLastDisabled,
3398
+ onMouseEnter: () => setHoveredButton("last"),
3399
+ onMouseLeave: () => setHoveredButton(null),
3400
+ onMouseDown: () => setActiveButton("last"),
3401
+ onMouseUp: () => setActiveButton(null),
3402
+ onFocus: () => setFocusedButton("last"),
3403
+ onBlur: () => setFocusedButton(null),
3404
+ style: getButtonStyle("last", isLastDisabled),
3405
+ "aria-label": "Go to last page",
3406
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3407
+ "svg",
3408
+ {
3409
+ width: "16",
3410
+ height: "16",
3411
+ viewBox: "0 0 16 16",
3412
+ fill: "none",
3413
+ xmlns: "http://www.w3.org/2000/svg",
3414
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3415
+ "path",
3416
+ {
3417
+ d: "M9 4L13 8L9 12M5 4L9 8L5 12",
3418
+ stroke: "#2f2f2f",
3419
+ strokeWidth: "1.5",
3420
+ strokeLinecap: "round",
3421
+ strokeLinejoin: "round"
3422
+ }
3423
+ )
3424
+ }
3425
+ )
3426
+ }
3427
+ )
3428
+ ] }),
3429
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: rightAlignedStyles, children: [
3430
+ onItemsPerPageChange && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
3431
+ "button",
3432
+ {
3433
+ type: "button",
3434
+ onClick: () => onItemsPerPageChange(itemsPerPage),
3435
+ onMouseEnter: () => setPerPageHovered(true),
3436
+ onMouseLeave: () => setPerPageHovered(false),
3437
+ style: {
3438
+ ...perPageButtonStyles,
3439
+ backgroundColor: perPageHovered ? "#f5f5f5" : "white"
3440
+ },
3441
+ "aria-label": "Items per page",
3442
+ children: [
3443
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { style: perPageTextStyles, children: [
3444
+ itemsPerPage,
3445
+ " per page"
3446
+ ] }),
3447
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react7.ChevronDown, { size: 16, color: "#2f2f2f" })
3448
+ ]
3449
+ }
3450
+ ),
3451
+ onExpandTable && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3452
+ "button",
3453
+ {
3454
+ type: "button",
3455
+ onClick: onExpandTable,
3456
+ onMouseEnter: () => setExpandHovered(true),
3457
+ onMouseLeave: () => setExpandHovered(false),
3458
+ style: {
3459
+ ...expandButtonStyles,
3460
+ backgroundColor: expandHovered ? "#e5e5e5" : "#efefef"
3461
+ },
3462
+ "aria-label": "Expand table",
3463
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: expandButtonTextStyles, children: "Expand table" })
3464
+ }
3465
+ )
3466
+ ] })
3467
+ ]
3468
+ }
3469
+ );
3470
+ }
3471
+ );
3472
+ TableFooterPagination.displayName = "TableFooterPagination";
3473
+
3474
+ // src/TableControls/TableControls.tsx
3475
+ var React18 = __toESM(require("react"));
3476
+ var import_clsx18 = require("clsx");
3477
+ var Popover2 = __toESM(require("@radix-ui/react-popover"));
3478
+ var import_lucide_react8 = require("lucide-react");
3479
+ var import_jsx_runtime18 = require("react/jsx-runtime");
3480
+ var containerStyles5 = {
3481
+ display: "flex",
3482
+ alignItems: "center",
3483
+ justifyContent: "space-between",
3484
+ paddingTop: "8px",
3485
+ paddingBottom: "8px",
3486
+ paddingLeft: 0,
3487
+ paddingRight: 0,
3488
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
3489
+ };
3490
+ var actions1Styles = {
3491
+ display: "flex",
3492
+ gap: "12px",
3493
+ alignItems: "center"
3494
+ };
3495
+ var actions2Styles = {
3496
+ display: "flex",
3497
+ gap: "12px",
3498
+ alignItems: "center",
3499
+ justifyContent: "flex-end",
3500
+ flexGrow: 1,
3501
+ paddingRight: "4px"
3502
+ };
3503
+ var dropdownButtonStyles = {
3504
+ height: "32px",
3505
+ backgroundColor: "white",
3506
+ border: "1px solid #d1d1d1",
3507
+ borderRadius: "8px",
3508
+ display: "flex",
3509
+ alignItems: "center",
3510
+ justifyContent: "center",
3511
+ gap: "8px",
3512
+ paddingLeft: "12px",
3513
+ paddingRight: "8px",
3514
+ paddingTop: 0,
3515
+ paddingBottom: 0,
3516
+ cursor: "pointer",
3517
+ transition: "background-color 0.2s ease-in-out",
3518
+ outline: "none"
3519
+ };
3520
+ var dropdownTextStyles = {
3521
+ fontSize: "13px",
3522
+ fontWeight: 600,
3523
+ lineHeight: "1.5",
3524
+ color: "#2f2f2f",
3525
+ textAlign: "center"
3526
+ };
3527
+ var iconButtonStyles2 = {
3528
+ width: "32px",
3529
+ height: "32px",
3530
+ borderRadius: "99px",
3531
+ border: "none",
3532
+ backgroundColor: "white",
3533
+ cursor: "pointer",
3534
+ display: "flex",
3535
+ alignItems: "center",
3536
+ justifyContent: "center",
3537
+ padding: 0,
3538
+ transition: "background-color 0.2s ease-in-out",
3539
+ flexShrink: 0,
3540
+ outline: "none"
3541
+ };
3542
+ var iconButtonDisabledStyles = {
3543
+ cursor: "not-allowed",
3544
+ opacity: 0.5
3545
+ };
3546
+ var popoverContentStyles = {
3547
+ backgroundColor: "white",
3548
+ border: "1px solid #d1d1d1",
3549
+ borderRadius: "8px",
3550
+ padding: "8px",
3551
+ minWidth: "180px",
3552
+ boxShadow: "0 4px 12px rgba(0, 0, 0, 0.1)",
3553
+ zIndex: 1e3
3554
+ };
3555
+ var menuItemStyles = {
3556
+ padding: "8px 12px",
3557
+ fontSize: "13px",
3558
+ color: "#2f2f2f",
3559
+ cursor: "pointer",
3560
+ borderRadius: "4px",
3561
+ border: "none",
3562
+ backgroundColor: "white",
3563
+ width: "100%",
3564
+ textAlign: "left",
3565
+ transition: "background-color 0.2s ease-in-out"
3566
+ };
3567
+ var TableControls = React18.forwardRef(
3568
+ ({
3569
+ selectedCount = 0,
3570
+ onActionsClick,
3571
+ onUndoClick,
3572
+ onRedoClick,
3573
+ onHideColumnsClick,
3574
+ onSearchClick,
3575
+ onDownloadClick,
3576
+ onTooltipsClick,
3577
+ tooltipsEnabled = false,
3578
+ onSettingsClick,
3579
+ onExpandClick,
3580
+ undoDisabled = false,
3581
+ redoDisabled = false,
3582
+ className,
3583
+ style,
3584
+ "data-testid": dataTestId
3585
+ }, ref) => {
3586
+ const [hoveredButton, setHoveredButton] = React18.useState(null);
3587
+ const [focusedButton, setFocusedButton] = React18.useState(null);
3588
+ const [actionsOpen, setActionsOpen] = React18.useState(false);
3589
+ const [hideColumnsOpen, setHideColumnsOpen] = React18.useState(false);
3590
+ const getIconButtonStyle = (buttonName, disabled = false) => {
3591
+ if (disabled) {
3592
+ return { ...iconButtonStyles2, ...iconButtonDisabledStyles };
3593
+ }
3594
+ const isHovered = hoveredButton === buttonName;
3595
+ const isFocused = focusedButton === buttonName;
3596
+ return {
3597
+ ...iconButtonStyles2,
3598
+ backgroundColor: isHovered ? "#f5f5f5" : "white",
3599
+ boxShadow: isFocused ? "0 0 0 3px #3cad51" : "none"
3600
+ };
3601
+ };
3602
+ const getDropdownButtonStyle = (buttonName) => {
3603
+ const isHovered = hoveredButton === buttonName;
3604
+ const isFocused = focusedButton === buttonName;
3605
+ return {
3606
+ ...dropdownButtonStyles,
3607
+ backgroundColor: isHovered ? "#f5f5f5" : "white",
3608
+ boxShadow: isFocused ? "0 0 0 3px #3cad51" : "none"
3609
+ };
3610
+ };
3611
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
3612
+ "div",
3613
+ {
3614
+ ref,
3615
+ className: (0, import_clsx18.clsx)("arbor-table-controls", className),
3616
+ style: { ...containerStyles5, ...style },
3617
+ "data-testid": dataTestId,
3618
+ children: [
3619
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: actions1Styles, children: [
3620
+ onActionsClick && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Popover2.Root, { open: actionsOpen, onOpenChange: setActionsOpen, children: [
3621
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Popover2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
3622
+ "button",
3623
+ {
3624
+ type: "button",
3625
+ onClick: () => {
3626
+ setActionsOpen(!actionsOpen);
3627
+ onActionsClick();
3628
+ },
3629
+ onMouseEnter: () => setHoveredButton("actions"),
3630
+ onMouseLeave: () => setHoveredButton(null),
3631
+ onFocus: () => setFocusedButton("actions"),
3632
+ onBlur: () => setFocusedButton(null),
3633
+ style: getDropdownButtonStyle("actions"),
3634
+ "aria-label": "Actions",
3635
+ children: [
3636
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { style: dropdownTextStyles, children: [
3637
+ "Actions (",
3638
+ selectedCount,
3639
+ ")"
3640
+ ] }),
3641
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react8.ChevronDown, { size: 16, color: "#2f2f2f" })
3642
+ ]
3643
+ }
3644
+ ) }),
3645
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Popover2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
3646
+ Popover2.Content,
3647
+ {
3648
+ style: popoverContentStyles,
3649
+ sideOffset: 4,
3650
+ align: "start",
3651
+ children: [
3652
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3653
+ "button",
3654
+ {
3655
+ style: menuItemStyles,
3656
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "#f5f5f5",
3657
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "white",
3658
+ onClick: () => {
3659
+ console.log("Edit selected items");
3660
+ setActionsOpen(false);
3661
+ },
3662
+ children: "Edit selected items"
3663
+ }
3664
+ ),
3665
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3666
+ "button",
3667
+ {
3668
+ style: menuItemStyles,
3669
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "#f5f5f5",
3670
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "white",
3671
+ onClick: () => {
3672
+ console.log("Delete selected items");
3673
+ setActionsOpen(false);
3674
+ },
3675
+ children: "Delete selected items"
3676
+ }
3677
+ ),
3678
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3679
+ "button",
3680
+ {
3681
+ style: menuItemStyles,
3682
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "#f5f5f5",
3683
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "white",
3684
+ onClick: () => {
3685
+ console.log("Export selected items");
3686
+ setActionsOpen(false);
3687
+ },
3688
+ children: "Export selected items"
3689
+ }
3690
+ )
3691
+ ]
3692
+ }
3693
+ ) })
3694
+ ] }),
3695
+ onUndoClick && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3696
+ "button",
3697
+ {
3698
+ type: "button",
3699
+ onClick: onUndoClick,
3700
+ disabled: undoDisabled,
3701
+ onMouseEnter: () => setHoveredButton("undo"),
3702
+ onMouseLeave: () => setHoveredButton(null),
3703
+ onFocus: () => setFocusedButton("undo"),
3704
+ onBlur: () => setFocusedButton(null),
3705
+ style: getIconButtonStyle("undo", undoDisabled),
3706
+ "aria-label": "Undo",
3707
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react8.Undo2, { size: 16, color: "#2f2f2f" })
3708
+ }
3709
+ ),
3710
+ onRedoClick && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3711
+ "button",
3712
+ {
3713
+ type: "button",
3714
+ onClick: onRedoClick,
3715
+ disabled: redoDisabled,
3716
+ onMouseEnter: () => setHoveredButton("redo"),
3717
+ onMouseLeave: () => setHoveredButton(null),
3718
+ onFocus: () => setFocusedButton("redo"),
3719
+ onBlur: () => setFocusedButton(null),
3720
+ style: getIconButtonStyle("redo", redoDisabled),
3721
+ "aria-label": "Redo",
3722
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react8.Redo2, { size: 16, color: "#2f2f2f" })
3723
+ }
3724
+ ),
3725
+ onHideColumnsClick && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Popover2.Root, { open: hideColumnsOpen, onOpenChange: setHideColumnsOpen, children: [
3726
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Popover2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
3727
+ "button",
3728
+ {
3729
+ type: "button",
3730
+ onClick: () => {
3731
+ setHideColumnsOpen(!hideColumnsOpen);
3732
+ onHideColumnsClick();
3733
+ },
3734
+ onMouseEnter: () => setHoveredButton("hideColumns"),
3735
+ onMouseLeave: () => setHoveredButton(null),
3736
+ onFocus: () => setFocusedButton("hideColumns"),
3737
+ onBlur: () => setFocusedButton(null),
3738
+ style: getDropdownButtonStyle("hideColumns"),
3739
+ "aria-label": "Hide Columns",
3740
+ children: [
3741
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { style: dropdownTextStyles, children: "Hide Columns" }),
3742
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react8.ChevronDown, { size: 16, color: "#2f2f2f" })
3743
+ ]
3744
+ }
3745
+ ) }),
3746
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Popover2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
3747
+ Popover2.Content,
3748
+ {
3749
+ style: popoverContentStyles,
3750
+ sideOffset: 4,
3751
+ align: "start",
3752
+ children: [
3753
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3754
+ "button",
3755
+ {
3756
+ style: menuItemStyles,
3757
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "#f5f5f5",
3758
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "white",
3759
+ onClick: () => {
3760
+ console.log("Hide Name column");
3761
+ setHideColumnsOpen(false);
3762
+ },
3763
+ children: "Name"
3764
+ }
3765
+ ),
3766
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3767
+ "button",
3768
+ {
3769
+ style: menuItemStyles,
3770
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "#f5f5f5",
3771
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "white",
3772
+ onClick: () => {
3773
+ console.log("Hide Email column");
3774
+ setHideColumnsOpen(false);
3775
+ },
3776
+ children: "Email"
3777
+ }
3778
+ ),
3779
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3780
+ "button",
3781
+ {
3782
+ style: menuItemStyles,
3783
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "#f5f5f5",
3784
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "white",
3785
+ onClick: () => {
3786
+ console.log("Hide Status column");
3787
+ setHideColumnsOpen(false);
3788
+ },
3789
+ children: "Status"
3790
+ }
3791
+ ),
3792
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3793
+ "button",
3794
+ {
3795
+ style: menuItemStyles,
3796
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "#f5f5f5",
3797
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "white",
3798
+ onClick: () => {
3799
+ console.log("Hide Date column");
3800
+ setHideColumnsOpen(false);
3801
+ },
3802
+ children: "Date"
3803
+ }
3804
+ )
3805
+ ]
3806
+ }
3807
+ ) })
3808
+ ] })
3809
+ ] }),
3810
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: actions2Styles, children: [
3811
+ onSearchClick && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3812
+ "button",
3813
+ {
3814
+ type: "button",
3815
+ onClick: onSearchClick,
3816
+ onMouseEnter: () => setHoveredButton("search"),
3817
+ onMouseLeave: () => setHoveredButton(null),
3818
+ onFocus: () => setFocusedButton("search"),
3819
+ onBlur: () => setFocusedButton(null),
3820
+ style: getIconButtonStyle("search"),
3821
+ "aria-label": "Search",
3822
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react8.Search, { size: 16, color: "#2f2f2f" })
3823
+ }
3824
+ ),
3825
+ onDownloadClick && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3826
+ "button",
3827
+ {
3828
+ type: "button",
3829
+ onClick: onDownloadClick,
3830
+ onMouseEnter: () => setHoveredButton("download"),
3831
+ onMouseLeave: () => setHoveredButton(null),
3832
+ onFocus: () => setFocusedButton("download"),
3833
+ onBlur: () => setFocusedButton(null),
3834
+ style: getIconButtonStyle("download"),
3835
+ "aria-label": "Download",
3836
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react8.Download, { size: 16, color: "#2f2f2f" })
3837
+ }
3838
+ ),
3839
+ onTooltipsClick && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3840
+ "button",
3841
+ {
3842
+ type: "button",
3843
+ onClick: onTooltipsClick,
3844
+ onMouseEnter: () => setHoveredButton("tooltips"),
3845
+ onMouseLeave: () => setHoveredButton(null),
3846
+ onFocus: () => setFocusedButton("tooltips"),
3847
+ onBlur: () => setFocusedButton(null),
3848
+ style: getIconButtonStyle("tooltips"),
3849
+ "aria-label": tooltipsEnabled ? "Disable tooltips" : "Enable tooltips",
3850
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3851
+ import_lucide_react8.MessageSquare,
3852
+ {
3853
+ size: 16,
3854
+ color: "#2f2f2f"
3855
+ }
3856
+ )
3857
+ }
3858
+ ),
3859
+ onSettingsClick && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3860
+ "button",
3861
+ {
3862
+ type: "button",
3863
+ onClick: onSettingsClick,
3864
+ onMouseEnter: () => setHoveredButton("settings"),
3865
+ onMouseLeave: () => setHoveredButton(null),
3866
+ onFocus: () => setFocusedButton("settings"),
3867
+ onBlur: () => setFocusedButton(null),
3868
+ style: getIconButtonStyle("settings"),
3869
+ "aria-label": "Settings",
3870
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react8.Settings, { size: 16, color: "#2f2f2f" })
3871
+ }
3872
+ ),
3873
+ onExpandClick && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3874
+ "button",
3875
+ {
3876
+ type: "button",
3877
+ onClick: onExpandClick,
3878
+ onMouseEnter: () => setHoveredButton("expand"),
3879
+ onMouseLeave: () => setHoveredButton(null),
3880
+ onFocus: () => setFocusedButton("expand"),
3881
+ onBlur: () => setFocusedButton(null),
3882
+ style: getIconButtonStyle("expand"),
3883
+ "aria-label": "Expand",
3884
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react8.Expand, { size: 16, color: "#2f2f2f" })
3885
+ }
3886
+ )
3887
+ ] })
3888
+ ]
3889
+ }
3890
+ );
3891
+ }
3892
+ );
3893
+ TableControls.displayName = "TableControls";
3894
+
3895
+ // src/Table/Table.tsx
3896
+ var React19 = __toESM(require("react"));
3897
+ var import_clsx19 = require("clsx");
3898
+ var import_lucide_react9 = require("lucide-react");
3899
+ var import_jsx_runtime19 = require("react/jsx-runtime");
3900
+ var tableStyles = {
3901
+ width: "100%",
3902
+ borderCollapse: "separate",
3903
+ borderSpacing: 0,
3904
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
3905
+ };
3906
+ var headerCellStyles = {
3907
+ height: "44px",
3908
+ paddingLeft: "16px",
3909
+ paddingRight: "16px",
3910
+ paddingTop: 0,
3911
+ paddingBottom: 0,
3912
+ backgroundColor: "#f8f8f8",
3913
+ borderBottom: "1px solid #efefef",
3914
+ fontSize: "13px",
3915
+ fontWeight: 600,
3916
+ color: "#2f2f2f",
3917
+ textAlign: "left",
3918
+ position: "relative"
3919
+ };
3920
+ var checkboxCellStyles = {
3921
+ width: "48px",
3922
+ paddingLeft: "16px",
3923
+ paddingRight: "8px"
3924
+ };
3925
+ var bodyCellStyles = {
3926
+ height: "41px",
3927
+ paddingLeft: "16px",
3928
+ paddingRight: "16px",
3929
+ paddingTop: "8px",
3930
+ paddingBottom: "8px",
3931
+ borderBottom: "1px solid #efefef",
3932
+ fontSize: "13px",
3933
+ color: "#2f2f2f"
3934
+ };
3935
+ var menuButtonStyles = {
3936
+ width: "24px",
3937
+ height: "24px",
3938
+ border: "none",
3939
+ backgroundColor: "transparent",
3940
+ cursor: "pointer",
3941
+ display: "inline-flex",
3942
+ alignItems: "center",
3943
+ justifyContent: "center",
3944
+ padding: 0,
3945
+ marginLeft: "8px",
3946
+ borderRadius: "4px",
3947
+ transition: "background-color 0.2s ease-in-out"
3948
+ };
3949
+ var rowStyles = {
3950
+ transition: "background-color 0.1s ease-in-out"
3951
+ };
3952
+ var Table = React19.forwardRef(
3953
+ ({
3954
+ columns,
3955
+ rows,
3956
+ onRowSelectionChange,
3957
+ onSelectAllChange,
3958
+ allSelected = false,
3959
+ someSelected = false,
3960
+ className,
3961
+ style,
3962
+ "data-testid": dataTestId
3963
+ }, ref) => {
3964
+ const [hoveredRow, setHoveredRow] = React19.useState(null);
3965
+ const [hoveredMenuButton, setHoveredMenuButton] = React19.useState(null);
3966
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
3967
+ "table",
3968
+ {
3969
+ ref,
3970
+ className: (0, import_clsx19.clsx)("arbor-table", className),
3971
+ style: { ...tableStyles, ...style },
3972
+ "data-testid": dataTestId,
3973
+ children: [
3974
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("tr", { children: [
3975
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("th", { style: { ...headerCellStyles, ...checkboxCellStyles }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3976
+ Checkbox,
3977
+ {
3978
+ checked: allSelected,
3979
+ indeterminate: someSelected && !allSelected,
3980
+ onChange: onSelectAllChange,
3981
+ "aria-label": "Select all rows"
3982
+ }
3983
+ ) }),
3984
+ columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3985
+ "th",
3986
+ {
3987
+ style: {
3988
+ ...headerCellStyles,
3989
+ ...column.width ? { width: column.width } : {}
3990
+ },
3991
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: { display: "flex", alignItems: "center" }, children: [
3992
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: column.label }),
3993
+ column.showMenu !== false && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3994
+ "button",
3995
+ {
3996
+ type: "button",
3997
+ onMouseEnter: () => setHoveredMenuButton(`header-${column.key}`),
3998
+ onMouseLeave: () => setHoveredMenuButton(null),
3999
+ style: {
4000
+ ...menuButtonStyles,
4001
+ backgroundColor: hoveredMenuButton === `header-${column.key}` ? "#f5f5f5" : "transparent"
4002
+ },
4003
+ "aria-label": `${column.label} options`,
4004
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react9.MoreVertical, { size: 16, color: "#595959" })
4005
+ }
4006
+ )
4007
+ ] })
4008
+ },
4009
+ column.key
4010
+ ))
4011
+ ] }) }),
4012
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("tbody", { children: rows.map((row, index) => {
4013
+ const isOdd = index % 2 === 0;
4014
+ const isHovered = hoveredRow === row.id;
4015
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
4016
+ "tr",
4017
+ {
4018
+ onMouseEnter: () => setHoveredRow(row.id),
4019
+ onMouseLeave: () => setHoveredRow(null),
4020
+ style: {
4021
+ ...rowStyles,
4022
+ backgroundColor: isHovered ? "#fafafa" : isOdd ? "white" : "#f8f8f8"
4023
+ },
4024
+ children: [
4025
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("td", { style: { ...bodyCellStyles, ...checkboxCellStyles }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4026
+ Checkbox,
4027
+ {
4028
+ checked: row.selected || false,
4029
+ onChange: (checked) => onRowSelectionChange?.(row.id, checked),
4030
+ "aria-label": `Select row ${row.id}`
4031
+ }
4032
+ ) }),
4033
+ columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("td", { style: bodyCellStyles, children: row.cells[column.key] }, column.key))
4034
+ ]
4035
+ },
4036
+ row.id
4037
+ );
4038
+ }) })
4039
+ ]
4040
+ }
4041
+ );
4042
+ }
4043
+ );
4044
+ Table.displayName = "Table";
1334
4045
  // Annotate the CommonJS export names for ESM import in node:
1335
4046
  0 && (module.exports = {
4047
+ Banner,
1336
4048
  Button,
1337
4049
  Card,
1338
4050
  Checkbox,
1339
4051
  Combobox,
4052
+ DatePicker,
1340
4053
  Input,
1341
4054
  NumericInput,
4055
+ Pagination,
1342
4056
  Radio,
1343
- Tag
4057
+ Table,
4058
+ TableControls,
4059
+ TableFooterPagination,
4060
+ Tabs,
4061
+ Tag,
4062
+ TextArea,
4063
+ Toast,
4064
+ Toggle,
4065
+ Tooltip
1344
4066
  });
1345
4067
  //# sourceMappingURL=index.js.map