@esic-lab/data-core-ui 0.0.42 → 0.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -365,6 +365,7 @@ __export(index_exports, {
365
365
  ColorPickerBasic: () => ColorPickerBasic,
366
366
  DataTable: () => DataTable,
367
367
  DatePickerBasic: () => DatePickerBasic,
368
+ DatePickerRange: () => DatePickerRange,
368
369
  FileUploader: () => FileUploader,
369
370
  FilterPopUp: () => FilterPopUp,
370
371
  GhostButton: () => GhostButton,
@@ -1304,9 +1305,11 @@ function DatePickerBasic({
1304
1305
  placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
1305
1306
  minDate,
1306
1307
  maxDate,
1307
- disabledDate
1308
+ disabledDate,
1309
+ disablePast = false
1308
1310
  }) {
1309
1311
  const [open, setOpen] = (0, import_react8.useState)(false);
1312
+ const wrapperRef = (0, import_react8.useRef)(null);
1310
1313
  const current = value ? (0, import_dayjs.default)(value) : null;
1311
1314
  const today = (0, import_dayjs.default)();
1312
1315
  const formatThaiBE = (date) => {
@@ -1332,6 +1335,7 @@ function DatePickerBasic({
1332
1335
  const daysInMonth = calendar.daysInMonth();
1333
1336
  const firstDayOfMonth = calendar.startOf("month").day();
1334
1337
  const isDisabled = (date) => {
1338
+ if (disablePast && date.isBefore(today, "day")) return true;
1335
1339
  if (disabledDate && disabledDate(date.toDate())) return true;
1336
1340
  if (minDate && date.isBefore((0, import_dayjs.default)(minDate), "day")) return true;
1337
1341
  if (maxDate && date.isAfter((0, import_dayjs.default)(maxDate), "day")) return true;
@@ -1343,48 +1347,78 @@ function DatePickerBasic({
1343
1347
  onChange(selected.toDate());
1344
1348
  setOpen(false);
1345
1349
  };
1346
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { fontFamily: "Kanit", fontSize: 16 }, className: "relative w-full", children: [
1350
+ (0, import_react8.useEffect)(() => {
1351
+ const handleClickOutside = (e) => {
1352
+ if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
1353
+ setOpen(false);
1354
+ }
1355
+ };
1356
+ document.addEventListener("mousedown", handleClickOutside);
1357
+ return () => document.removeEventListener("mousedown", handleClickOutside);
1358
+ }, []);
1359
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { ref: wrapperRef, style: { fontFamily: "Kanit", fontSize: 16 }, className: "relative w-full", children: [
1347
1360
  /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "mb-1", children: [
1348
1361
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "body-1", children: label }),
1349
- required && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-red-500", children: "*" })
1362
+ required && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-red-500 ml-1", children: "*" })
1350
1363
  ] }),
1351
1364
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1352
1365
  "div",
1353
1366
  {
1354
- className: `border rounded px-3 py-2 cursor-pointer bg-white ${disabled ? "opacity-50" : ""}`,
1367
+ className: `border rounded px-3 py-2 cursor-pointer bg-white flex items-center ${disabled ? "opacity-50 cursor-not-allowed" : ""} ${error ? "border-red-500" : "border-gray-300"}`,
1355
1368
  onClick: () => !disabled && setOpen(!open),
1356
- children: value ? formatThaiBE(value) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-gray-400", children: placeholder })
1369
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex-1", children: value ? formatThaiBE(value) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-gray-400", children: placeholder }) })
1357
1370
  }
1358
1371
  ),
1359
1372
  open && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1360
1373
  "div",
1361
1374
  {
1362
- className: "absolute z-50 mt-2 w-80 p-4 bg-white shadow-xl rounded-lg border",
1375
+ className: "absolute z-50 mt-2 w-80 p-4 bg-white shadow-xl rounded-lg border animate-fade-in",
1363
1376
  style: { fontFamily: "Kanit", fontSize: 16 },
1364
1377
  children: [
1365
1378
  /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex justify-between items-center mb-3", children: [
1366
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { onClick: () => setCalendar(calendar.subtract(1, "month")), className: "px-2", children: "\u25C0" }),
1367
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "font-semibold", children: [
1379
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1380
+ "button",
1381
+ {
1382
+ onClick: () => setCalendar(calendar.subtract(1, "month")),
1383
+ className: "px-2 hover:bg-gray-100 rounded",
1384
+ children: "\u25C0"
1385
+ }
1386
+ ),
1387
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "font-semibold text-lg text-gray-700", children: [
1368
1388
  monthNames[calendar.month()],
1369
1389
  " ",
1370
1390
  calendar.year() + 543
1371
1391
  ] }),
1372
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { onClick: () => setCalendar(calendar.add(1, "month")), className: "px-2", children: "\u25B6" })
1392
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { onClick: () => setCalendar(calendar.add(1, "month")), className: "px-2 hover:bg-gray-100 rounded", children: "\u25B6" })
1373
1393
  ] }),
1374
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "grid grid-cols-7 text-center text-gray-600 mb-2", children: ["\u0E2D\u0E32", "\u0E08", "\u0E2D", "\u0E1E", "\u0E1E\u0E24", "\u0E28", "\u0E2A"].map((d) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { children: d }, d)) }),
1394
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "grid grid-cols-7 text-center text-gray-500 text-sm mb-2 font-medium", children: ["\u0E2D\u0E32", "\u0E08", "\u0E2D", "\u0E1E", "\u0E1E\u0E24", "\u0E28", "\u0E2A"].map((d) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { children: d }, d)) }),
1375
1395
  /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "grid grid-cols-7 gap-1 text-center", children: [
1376
1396
  Array(firstDayOfMonth).fill(null).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", {}, `empty-${i}`)),
1377
1397
  Array.from({ length: daysInMonth }, (_, i) => i + 1).map((d) => {
1378
1398
  const dateObj = calendar.date(d);
1379
- const disabled2 = isDisabled(dateObj);
1380
- const selected = current && dateObj.isSame(current, "day");
1399
+ const isDisable = isDisabled(dateObj);
1400
+ const isSelected = current && dateObj.isSame(current, "day");
1401
+ const isToday = dateObj.isSame(today, "day");
1402
+ let bgClass = "hover:bg-blue-100";
1403
+ let textClass = "text-gray-700";
1404
+ if (isDisable) {
1405
+ bgClass = "";
1406
+ textClass = "text-gray-300 cursor-not-allowed";
1407
+ } else if (isSelected) {
1408
+ bgClass = "bg-blue-500 text-white shadow-md";
1409
+ textClass = "text-white font-semibold";
1410
+ } else if (isToday) {
1411
+ bgClass = "border border-blue-500 font-bold";
1412
+ textClass = "text-blue-600";
1413
+ }
1381
1414
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1382
1415
  "div",
1383
1416
  {
1384
- onClick: () => !disabled2 && handleSelect(d),
1385
- className: `py-1 rounded cursor-pointer
1386
- ${selected ? "bg-blue-500 text-white" : ""}
1387
- ${disabled2 ? "text-gray-400 cursor-not-allowed" : "hover:bg-blue-100"}
1417
+ onClick: () => !isDisable && handleSelect(d),
1418
+ className: `
1419
+ py-1 rounded transition-all duration-200
1420
+ ${bgClass} ${textClass}
1421
+ ${!isDisable ? "cursor-pointer" : ""}
1388
1422
  `,
1389
1423
  children: d
1390
1424
  },
@@ -1395,13 +1429,188 @@ function DatePickerBasic({
1395
1429
  ]
1396
1430
  }
1397
1431
  ),
1398
- error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-red-500 caption-1", children: error })
1432
+ error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-red-500 text-xs mt-1", children: error })
1433
+ ] });
1434
+ }
1435
+
1436
+ // src/DatePicker/DatePickerRange/DatePickerRange.tsx
1437
+ var import_react9 = require("react");
1438
+ var import_dayjs2 = __toESM(require_dayjs_min());
1439
+ var import_th3 = __toESM(require_th());
1440
+ var import_buddhistEra2 = __toESM(require_buddhistEra());
1441
+ var import_date_fns2 = require("date-fns");
1442
+ var import_locale2 = require("date-fns/locale");
1443
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1444
+ import_dayjs2.default.extend(import_buddhistEra2.default);
1445
+ import_dayjs2.default.locale("th");
1446
+ function DatePickerRange({
1447
+ value,
1448
+ onChange,
1449
+ label,
1450
+ required,
1451
+ error,
1452
+ disabled,
1453
+ minDate,
1454
+ maxDate,
1455
+ disabledDate,
1456
+ disablePast = false
1457
+ }) {
1458
+ const [open, setOpen] = (0, import_react9.useState)(false);
1459
+ const wrapperRef = (0, import_react9.useRef)(null);
1460
+ const [startDate, endDate] = value;
1461
+ const startDayjs = startDate ? (0, import_dayjs2.default)(startDate) : null;
1462
+ const endDayjs = endDate ? (0, import_dayjs2.default)(endDate) : null;
1463
+ const today = (0, import_dayjs2.default)();
1464
+ const [calendar, setCalendar] = (0, import_react9.useState)(startDayjs || today);
1465
+ const formatThaiBE = (date) => {
1466
+ const formatted = (0, import_date_fns2.format)(date, "dd MMM yy", { locale: import_locale2.th });
1467
+ const year = parseInt((0, import_date_fns2.format)(date, "yyyy")) + 543;
1468
+ return formatted.replace(/\d{4}$/, String(year)).replace(/\d{2}$/, String(year).slice(2));
1469
+ };
1470
+ const monthNames = [
1471
+ "\u0E21\u0E01\u0E23\u0E32\u0E04\u0E21",
1472
+ "\u0E01\u0E38\u0E21\u0E20\u0E32\u0E1E\u0E31\u0E19\u0E18\u0E4C",
1473
+ "\u0E21\u0E35\u0E19\u0E32\u0E04\u0E21",
1474
+ "\u0E40\u0E21\u0E29\u0E32\u0E22\u0E19",
1475
+ "\u0E1E\u0E24\u0E29\u0E20\u0E32\u0E04\u0E21",
1476
+ "\u0E21\u0E34\u0E16\u0E38\u0E19\u0E32\u0E22\u0E19",
1477
+ "\u0E01\u0E23\u0E01\u0E0E\u0E32\u0E04\u0E21",
1478
+ "\u0E2A\u0E34\u0E07\u0E2B\u0E32\u0E04\u0E21",
1479
+ "\u0E01\u0E31\u0E19\u0E22\u0E32\u0E22\u0E19",
1480
+ "\u0E15\u0E38\u0E25\u0E32\u0E04\u0E21",
1481
+ "\u0E1E\u0E24\u0E28\u0E08\u0E34\u0E01\u0E32\u0E22\u0E19",
1482
+ "\u0E18\u0E31\u0E19\u0E27\u0E32\u0E04\u0E21"
1483
+ ];
1484
+ const daysInMonth = calendar.daysInMonth();
1485
+ const firstDayOfMonth = calendar.startOf("month").day();
1486
+ const isDisabled = (date) => {
1487
+ if (disablePast && date.isBefore(today, "day")) return true;
1488
+ if (disabledDate && disabledDate(date.toDate())) return true;
1489
+ if (minDate && date.isBefore((0, import_dayjs2.default)(minDate), "day")) return true;
1490
+ if (maxDate && date.isAfter((0, import_dayjs2.default)(maxDate), "day")) return true;
1491
+ return false;
1492
+ };
1493
+ const handleSelect = (d) => {
1494
+ const selected = calendar.date(d);
1495
+ if (isDisabled(selected)) return;
1496
+ const selectedDate = selected.toDate();
1497
+ if (!startDate || startDate && endDate) {
1498
+ onChange([selectedDate, null]);
1499
+ } else if (startDate && !endDate) {
1500
+ if (selected.isBefore(startDayjs, "day")) {
1501
+ onChange([selectedDate, null]);
1502
+ } else {
1503
+ onChange([startDate, selectedDate]);
1504
+ setOpen(false);
1505
+ }
1506
+ }
1507
+ };
1508
+ (0, import_react9.useEffect)(() => {
1509
+ const handleClickOutside = (e) => {
1510
+ if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
1511
+ setOpen(false);
1512
+ }
1513
+ };
1514
+ document.addEventListener("mousedown", handleClickOutside);
1515
+ return () => document.removeEventListener("mousedown", handleClickOutside);
1516
+ }, []);
1517
+ const ArrowIcon = () => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "w-4 h-4 text-gray-400", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1518
+ "path",
1519
+ {
1520
+ fillRule: "evenodd",
1521
+ d: "M12.97 3.97a.75.75 0 011.06 0l7.5 7.5a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 11-1.06-1.06l6.22-6.22H3a.75.75 0 010-1.5h16.19l-6.22-6.22a.75.75 0 010-1.06z",
1522
+ clipRule: "evenodd"
1523
+ }
1524
+ ) });
1525
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { ref: wrapperRef, style: { fontFamily: "Kanit", fontSize: 16 }, className: "relative w-full", children: [
1526
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "mb-1", children: [
1527
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "body-1", children: label }),
1528
+ required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-red-500 ml-1", children: "*" })
1529
+ ] }),
1530
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1531
+ "div",
1532
+ {
1533
+ className: `border rounded px-3 py-2 cursor-pointer bg-white flex items-center justify-between gap-2 ${disabled ? "opacity-50 cursor-not-allowed" : ""} ${error ? "border-red-500" : "border-gray-300"}`,
1534
+ onClick: () => !disabled && setOpen(!open),
1535
+ children: [
1536
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: `flex-1 ${!startDate ? "text-gray-400 font-light" : "text-gray-800"}`, children: startDate ? formatThaiBE(startDate) : "\u0E27\u0E31\u0E19\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19" }),
1537
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ArrowIcon, {}) }),
1538
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: `flex-1 text-right ${!endDate ? "text-gray-400 font-light" : "text-gray-800"}`, children: endDate ? formatThaiBE(endDate) : "\u0E27\u0E31\u0E19\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14" })
1539
+ ]
1540
+ }
1541
+ ),
1542
+ open && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1543
+ "div",
1544
+ {
1545
+ className: "absolute z-50 mt-2 w-80 p-4 bg-white shadow-xl rounded-lg border animate-fade-in right-0 left-0 mx-auto sm:mx-0 sm:left-auto sm:right-auto",
1546
+ style: { fontFamily: "Kanit", fontSize: 16 },
1547
+ children: [
1548
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex justify-between items-center mb-3", children: [
1549
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1550
+ "button",
1551
+ {
1552
+ onClick: () => setCalendar(calendar.subtract(1, "month")),
1553
+ className: "px-2 hover:bg-gray-100 rounded",
1554
+ children: "\u25C0"
1555
+ }
1556
+ ),
1557
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "font-semibold text-lg text-gray-700", children: [
1558
+ monthNames[calendar.month()],
1559
+ " ",
1560
+ calendar.year() + 543
1561
+ ] }),
1562
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", { onClick: () => setCalendar(calendar.add(1, "month")), className: "px-2 hover:bg-gray-100 rounded", children: "\u25B6" })
1563
+ ] }),
1564
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "grid grid-cols-7 text-center text-gray-500 text-sm mb-2 font-medium", children: ["\u0E2D\u0E32", "\u0E08", "\u0E2D", "\u0E1E", "\u0E1E\u0E24", "\u0E28", "\u0E2A"].map((d) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { children: d }, d)) }),
1565
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "grid grid-cols-7 gap-y-1 text-center", children: [
1566
+ Array(firstDayOfMonth).fill(null).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", {}, `empty-${i}`)),
1567
+ Array.from({ length: daysInMonth }, (_, i) => i + 1).map((d) => {
1568
+ const currentObj = calendar.date(d);
1569
+ const isDisable = isDisabled(currentObj);
1570
+ const isToday = currentObj.isSame(today, "day");
1571
+ const isStart = startDayjs && currentObj.isSame(startDayjs, "day");
1572
+ const isEnd = endDayjs && currentObj.isSame(endDayjs, "day");
1573
+ const isInRange = startDayjs && endDayjs && currentObj.isAfter(startDayjs, "day") && currentObj.isBefore(endDayjs, "day");
1574
+ let bgClass = "hover:bg-blue-100";
1575
+ let textClass = "text-gray-700";
1576
+ if (isDisable) {
1577
+ bgClass = "";
1578
+ textClass = "text-gray-300 cursor-not-allowed";
1579
+ } else if (isStart || isEnd) {
1580
+ bgClass = "bg-blue-600 shadow-md transform scale-105";
1581
+ textClass = "text-white font-semibold";
1582
+ } else if (isInRange) {
1583
+ bgClass = "bg-blue-100";
1584
+ textClass = "text-blue-700";
1585
+ } else if (isToday) {
1586
+ bgClass = "border border-blue-500 font-bold";
1587
+ textClass = "text-blue-600";
1588
+ }
1589
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1590
+ "div",
1591
+ {
1592
+ onClick: () => !isDisable && handleSelect(d),
1593
+ className: `
1594
+ h-9 w-9 flex items-center justify-center rounded-full mx-auto transition-all duration-200
1595
+ ${bgClass} ${textClass}
1596
+ ${!isDisable ? "cursor-pointer" : ""}
1597
+ `,
1598
+ children: d
1599
+ },
1600
+ d
1601
+ );
1602
+ })
1603
+ ] })
1604
+ ]
1605
+ }
1606
+ ),
1607
+ error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-red-500 text-xs mt-1", children: error })
1399
1608
  ] });
1400
1609
  }
1401
1610
 
1402
1611
  // src/ColorPicker/ColorPickerBasic/ColorPicker.tsx
1403
1612
  var import_antd5 = require("antd");
1404
- var import_jsx_runtime24 = require("react/jsx-runtime");
1613
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1405
1614
  function ColorPickerBasic({
1406
1615
  value,
1407
1616
  onChange,
@@ -1414,7 +1623,7 @@ function ColorPickerBasic({
1414
1623
  className,
1415
1624
  placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
1416
1625
  }) {
1417
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1626
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1418
1627
  import_antd5.ConfigProvider,
1419
1628
  {
1420
1629
  theme: {
@@ -1423,13 +1632,13 @@ function ColorPickerBasic({
1423
1632
  fontSize: 16
1424
1633
  }
1425
1634
  },
1426
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "container-input", children: [
1427
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
1428
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "body-1", children: label }),
1635
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "container-input", children: [
1636
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
1637
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "body-1", children: label }),
1429
1638
  " ",
1430
- required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-red-500", children: "*" })
1639
+ required && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-red-500", children: "*" })
1431
1640
  ] }),
1432
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1641
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1433
1642
  import_antd5.ColorPicker,
1434
1643
  {
1435
1644
  defaultFormat,
@@ -1441,9 +1650,9 @@ function ColorPickerBasic({
1441
1650
  showText: (color) => {
1442
1651
  const hex = color.toHexString();
1443
1652
  if (!value) {
1444
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: placeholder });
1653
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: placeholder });
1445
1654
  }
1446
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { children: [
1655
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { children: [
1447
1656
  "(",
1448
1657
  hex,
1449
1658
  ")"
@@ -1452,7 +1661,7 @@ function ColorPickerBasic({
1452
1661
  disabled
1453
1662
  }
1454
1663
  ),
1455
- error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-red-500 caption-1", children: error })
1664
+ error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-red-500 caption-1", children: error })
1456
1665
  ] })
1457
1666
  }
1458
1667
  );
@@ -2161,7 +2370,7 @@ var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a"
2161
2370
  greyDark.primary = greyDark[5];
2162
2371
 
2163
2372
  // src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
2164
- var import_jsx_runtime25 = require("react/jsx-runtime");
2373
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2165
2374
  function genPresets(presets = presetPalettes) {
2166
2375
  return Object.entries(presets).map(([label, colors]) => ({
2167
2376
  label,
@@ -2188,7 +2397,7 @@ function ColorPalettePickerBasic({
2188
2397
  red,
2189
2398
  green
2190
2399
  });
2191
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2400
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2192
2401
  import_antd6.ConfigProvider,
2193
2402
  {
2194
2403
  theme: {
@@ -2197,13 +2406,13 @@ function ColorPalettePickerBasic({
2197
2406
  fontSize: 16
2198
2407
  }
2199
2408
  },
2200
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "container-input", children: [
2201
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
2202
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "body-1", children: label }),
2409
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "container-input", children: [
2410
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
2411
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "body-1", children: label }),
2203
2412
  " ",
2204
- required && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-red-500", children: "*" })
2413
+ required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-red-500", children: "*" })
2205
2414
  ] }),
2206
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2415
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2207
2416
  import_antd6.ColorPicker,
2208
2417
  {
2209
2418
  defaultFormat,
@@ -2216,9 +2425,9 @@ function ColorPalettePickerBasic({
2216
2425
  showText: (color) => {
2217
2426
  const hex = color.toHexString();
2218
2427
  if (!value) {
2219
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: placeholder });
2428
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: placeholder });
2220
2429
  }
2221
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { children: [
2430
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { children: [
2222
2431
  "(",
2223
2432
  hex,
2224
2433
  ")"
@@ -2228,7 +2437,7 @@ function ColorPalettePickerBasic({
2228
2437
  onClear
2229
2438
  }
2230
2439
  ),
2231
- error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-red-500 caption-1", children: error })
2440
+ error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-red-500 caption-1", children: error })
2232
2441
  ] })
2233
2442
  }
2234
2443
  );
@@ -2236,7 +2445,7 @@ function ColorPalettePickerBasic({
2236
2445
 
2237
2446
  // src/Select/SelectField/SelectField.tsx
2238
2447
  var import_antd7 = require("antd");
2239
- var import_jsx_runtime26 = require("react/jsx-runtime");
2448
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2240
2449
  function SelectField({
2241
2450
  value,
2242
2451
  onChange,
@@ -2254,7 +2463,7 @@ function SelectField({
2254
2463
  className,
2255
2464
  onClear
2256
2465
  }) {
2257
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2466
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2258
2467
  import_antd7.ConfigProvider,
2259
2468
  {
2260
2469
  theme: {
@@ -2263,13 +2472,13 @@ function SelectField({
2263
2472
  fontSize: 16
2264
2473
  }
2265
2474
  },
2266
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "container-input", children: [
2267
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
2268
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "body-1", children: label }),
2475
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "container-input", children: [
2476
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
2477
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "body-1", children: label }),
2269
2478
  " ",
2270
- required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-red-500", children: "*" })
2479
+ required && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-red-500", children: "*" })
2271
2480
  ] }),
2272
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2481
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2273
2482
  import_antd7.Select,
2274
2483
  {
2275
2484
  showSearch: true,
@@ -2284,7 +2493,7 @@ function SelectField({
2284
2493
  options,
2285
2494
  mode,
2286
2495
  onSearch: handleSearch,
2287
- prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2496
+ prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2288
2497
  "span",
2289
2498
  {
2290
2499
  style: {
@@ -2301,7 +2510,7 @@ function SelectField({
2301
2510
  onClear
2302
2511
  }
2303
2512
  ),
2304
- error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-red-500 caption-1", children: error })
2513
+ error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-red-500 caption-1", children: error })
2305
2514
  ] })
2306
2515
  }
2307
2516
  );
@@ -2309,7 +2518,7 @@ function SelectField({
2309
2518
 
2310
2519
  // src/Select/SelectFieldGroup/SelectFieldGroup.tsx
2311
2520
  var import_antd8 = require("antd");
2312
- var import_jsx_runtime27 = require("react/jsx-runtime");
2521
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2313
2522
  function SelectFieldGroup({
2314
2523
  value,
2315
2524
  onChange,
@@ -2326,7 +2535,7 @@ function SelectFieldGroup({
2326
2535
  handleSearch,
2327
2536
  className
2328
2537
  }) {
2329
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2538
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2330
2539
  import_antd8.ConfigProvider,
2331
2540
  {
2332
2541
  theme: {
@@ -2334,13 +2543,13 @@ function SelectFieldGroup({
2334
2543
  fontFamily: "Kanit"
2335
2544
  }
2336
2545
  },
2337
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "container-input", children: [
2338
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
2339
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "body-1", children: label }),
2546
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "container-input", children: [
2547
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
2548
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "body-1", children: label }),
2340
2549
  " ",
2341
- required && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-red-500", children: "*" })
2550
+ required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-red-500", children: "*" })
2342
2551
  ] }),
2343
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2552
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2344
2553
  import_antd8.Select,
2345
2554
  {
2346
2555
  showSearch: true,
@@ -2355,7 +2564,7 @@ function SelectFieldGroup({
2355
2564
  options,
2356
2565
  mode,
2357
2566
  onSearch: handleSearch,
2358
- prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2567
+ prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2359
2568
  "span",
2360
2569
  {
2361
2570
  style: {
@@ -2371,7 +2580,7 @@ function SelectFieldGroup({
2371
2580
  allowClear: true
2372
2581
  }
2373
2582
  ),
2374
- error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-red-500 caption-1", children: error })
2583
+ error && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-red-500 caption-1", children: error })
2375
2584
  ] })
2376
2585
  }
2377
2586
  );
@@ -2391,7 +2600,7 @@ var status = [
2391
2600
 
2392
2601
  // src/Select/SelectFieldStatus/SelectFieldStatus.tsx
2393
2602
  var import_icons = require("@ant-design/icons");
2394
- var import_jsx_runtime28 = require("react/jsx-runtime");
2603
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2395
2604
  function SelectFieldStatus({
2396
2605
  value,
2397
2606
  onChange,
@@ -2404,7 +2613,7 @@ function SelectFieldStatus({
2404
2613
  className
2405
2614
  }) {
2406
2615
  const selectedItem = status.find((s) => s.value === value);
2407
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2616
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2408
2617
  import_antd9.ConfigProvider,
2409
2618
  {
2410
2619
  theme: {
@@ -2420,17 +2629,17 @@ function SelectFieldStatus({
2420
2629
  fontFamily: "Kanit"
2421
2630
  }
2422
2631
  },
2423
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "container-input", children: [
2424
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
2425
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "body-1", children: label }),
2632
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "container-input", children: [
2633
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
2634
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "body-1", children: label }),
2426
2635
  " ",
2427
- required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-red-500", children: "*" })
2636
+ required && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-red-500", children: "*" })
2428
2637
  ] }),
2429
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2638
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2430
2639
  import_antd9.Select,
2431
2640
  {
2432
2641
  disabled,
2433
- suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_icons.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
2642
+ suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
2434
2643
  value,
2435
2644
  onChange,
2436
2645
  className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
@@ -2441,7 +2650,7 @@ function SelectFieldStatus({
2441
2650
  showSearch: true
2442
2651
  }
2443
2652
  ),
2444
- error && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-red-500 caption-1", children: error })
2653
+ error && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-red-500 caption-1", children: error })
2445
2654
  ] })
2446
2655
  }
2447
2656
  );
@@ -2458,7 +2667,7 @@ var status2 = [
2458
2667
 
2459
2668
  // src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
2460
2669
  var import_icons2 = require("@ant-design/icons");
2461
- var import_jsx_runtime29 = require("react/jsx-runtime");
2670
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2462
2671
  function SelectFieldStatusReport({
2463
2672
  value,
2464
2673
  onChange,
@@ -2471,7 +2680,7 @@ function SelectFieldStatusReport({
2471
2680
  options
2472
2681
  }) {
2473
2682
  const selectedItem = status2.find((s) => s.value === value);
2474
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2683
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2475
2684
  import_antd10.ConfigProvider,
2476
2685
  {
2477
2686
  theme: {
@@ -2487,17 +2696,17 @@ function SelectFieldStatusReport({
2487
2696
  fontFamily: "Kanit"
2488
2697
  }
2489
2698
  },
2490
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "container-input", children: [
2491
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
2492
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "body-1", children: label }),
2699
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "container-input", children: [
2700
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
2701
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "body-1", children: label }),
2493
2702
  " ",
2494
- required && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-red-500", children: "*" })
2703
+ required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-red-500", children: "*" })
2495
2704
  ] }),
2496
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2705
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2497
2706
  import_antd10.Select,
2498
2707
  {
2499
2708
  disabled,
2500
- suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons2.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
2709
+ suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons2.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
2501
2710
  value,
2502
2711
  onChange,
2503
2712
  className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
@@ -2508,7 +2717,7 @@ function SelectFieldStatusReport({
2508
2717
  showSearch: true
2509
2718
  }
2510
2719
  ),
2511
- error && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-red-500 caption-1", children: error })
2720
+ error && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-red-500 caption-1", children: error })
2512
2721
  ] })
2513
2722
  }
2514
2723
  );
@@ -2516,8 +2725,8 @@ function SelectFieldStatusReport({
2516
2725
 
2517
2726
  // src/Select/SelectFieldTag/SelectFieldTag.tsx
2518
2727
  var import_antd11 = require("antd");
2519
- var import_react9 = require("react");
2520
- var import_jsx_runtime30 = require("react/jsx-runtime");
2728
+ var import_react10 = require("react");
2729
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2521
2730
  function SelectFieldTag({
2522
2731
  label,
2523
2732
  required,
@@ -2529,10 +2738,10 @@ function SelectFieldTag({
2529
2738
  onChange,
2530
2739
  onClear
2531
2740
  }) {
2532
- const [internalValue, setInternalValue] = (0, import_react9.useState)([]);
2741
+ const [internalValue, setInternalValue] = (0, import_react10.useState)([]);
2533
2742
  const isControlled = controlledValue !== void 0;
2534
2743
  const value = isControlled ? controlledValue : internalValue;
2535
- const [searchWord, setSearchWord] = (0, import_react9.useState)("");
2744
+ const [searchWord, setSearchWord] = (0, import_react10.useState)("");
2536
2745
  const handleChange = (val) => {
2537
2746
  const trimValue = val.map((v) => v.trim());
2538
2747
  const filtered = trimValue.filter((v) => v.trim() !== "");
@@ -2550,7 +2759,7 @@ function SelectFieldTag({
2550
2759
  }
2551
2760
  onChange?.([]);
2552
2761
  };
2553
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2762
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2554
2763
  import_antd11.ConfigProvider,
2555
2764
  {
2556
2765
  theme: {
@@ -2558,13 +2767,13 @@ function SelectFieldTag({
2558
2767
  fontFamily: "Kanit"
2559
2768
  }
2560
2769
  },
2561
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "container-input", children: [
2562
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
2563
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "body-1", children: label }),
2770
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "container-input", children: [
2771
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { children: [
2772
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "body-1", children: label }),
2564
2773
  " ",
2565
- required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-red-500", children: "*" })
2774
+ required && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-red-500", children: "*" })
2566
2775
  ] }),
2567
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2776
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2568
2777
  import_antd11.Select,
2569
2778
  {
2570
2779
  mode: "tags",
@@ -2583,7 +2792,7 @@ function SelectFieldTag({
2583
2792
  onClear
2584
2793
  }
2585
2794
  ),
2586
- error && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-red-500 caption-1", children: error })
2795
+ error && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-red-500 caption-1", children: error })
2587
2796
  ] })
2588
2797
  }
2589
2798
  );
@@ -2592,8 +2801,8 @@ function SelectFieldTag({
2592
2801
  // src/Select/SelectCustom/SelectCustom.tsx
2593
2802
  var import_icons_react8 = require("@tabler/icons-react");
2594
2803
  var import_antd12 = require("antd");
2595
- var import_react10 = require("react");
2596
- var import_jsx_runtime31 = require("react/jsx-runtime");
2804
+ var import_react11 = require("react");
2805
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2597
2806
  function SelectCustom({
2598
2807
  label = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
2599
2808
  placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01",
@@ -2603,8 +2812,8 @@ function SelectCustom({
2603
2812
  error,
2604
2813
  onClear
2605
2814
  }) {
2606
- const [value, setValue] = (0, import_react10.useState)([]);
2607
- const [valueList, setValueList] = (0, import_react10.useState)([]);
2815
+ const [value, setValue] = (0, import_react11.useState)([]);
2816
+ const [valueList, setValueList] = (0, import_react11.useState)([]);
2608
2817
  const handleChange = (selectedValues) => {
2609
2818
  const newValues = selectedValues.filter((v) => !valueList.includes(v));
2610
2819
  setValueList((prev) => {
@@ -2622,7 +2831,7 @@ function SelectCustom({
2622
2831
  });
2623
2832
  };
2624
2833
  const filteredOptions = options.filter((opt) => !valueList.includes(opt.value)).map((opt) => ({ value: opt.value, label: opt.label }));
2625
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2834
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2626
2835
  import_antd12.ConfigProvider,
2627
2836
  {
2628
2837
  theme: {
@@ -2631,13 +2840,13 @@ function SelectCustom({
2631
2840
  fontSize: 16
2632
2841
  }
2633
2842
  },
2634
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "container-input", children: [
2635
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { children: [
2636
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "body-1", children: label }),
2843
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "container-input", children: [
2844
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
2845
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "body-1", children: label }),
2637
2846
  " ",
2638
- required && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-red-500", children: "*" })
2847
+ required && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-red-500", children: "*" })
2639
2848
  ] }),
2640
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2849
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2641
2850
  import_antd12.Select,
2642
2851
  {
2643
2852
  value,
@@ -2648,16 +2857,16 @@ function SelectCustom({
2648
2857
  onClear
2649
2858
  }
2650
2859
  ),
2651
- error && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-red-500 caption-1", children: error }),
2652
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex justify-between items-center py-[2px] body-1", children: [
2653
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-row gap-[8px]", children: [
2654
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("p", { children: [
2860
+ error && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-red-500 caption-1", children: error }),
2861
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex justify-between items-center py-[2px] body-1", children: [
2862
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-row gap-[8px]", children: [
2863
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("p", { children: [
2655
2864
  index + 1,
2656
2865
  "."
2657
2866
  ] }),
2658
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { children: v })
2867
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { children: v })
2659
2868
  ] }),
2660
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons_react8.IconTrash, { className: "cursor-pointer", onClick: () => handleDelete(v) })
2869
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_icons_react8.IconTrash, { className: "cursor-pointer", onClick: () => handleDelete(v) })
2661
2870
  ] }, index)) })
2662
2871
  ] })
2663
2872
  }
@@ -2696,9 +2905,9 @@ var quarters = [
2696
2905
  ];
2697
2906
 
2698
2907
  // src/SortFilter/SortFilter.tsx
2699
- var import_react11 = require("react");
2908
+ var import_react12 = require("react");
2700
2909
  var import_icons_react9 = require("@tabler/icons-react");
2701
- var import_jsx_runtime32 = require("react/jsx-runtime");
2910
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2702
2911
  function SortFilter({
2703
2912
  showYear = true,
2704
2913
  showQuarter = true,
@@ -2706,10 +2915,10 @@ function SortFilter({
2706
2915
  onSortClick,
2707
2916
  onFilterClick
2708
2917
  }) {
2709
- const [yearValue, setYearValue] = (0, import_react11.useState)();
2710
- const [monthValue, setMonthValue] = (0, import_react11.useState)();
2711
- const [quarterValue, setQuartersValue] = (0, import_react11.useState)();
2712
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2918
+ const [yearValue, setYearValue] = (0, import_react12.useState)();
2919
+ const [monthValue, setMonthValue] = (0, import_react12.useState)();
2920
+ const [quarterValue, setQuartersValue] = (0, import_react12.useState)();
2921
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2713
2922
  import_antd13.ConfigProvider,
2714
2923
  {
2715
2924
  theme: {
@@ -2717,12 +2926,12 @@ function SortFilter({
2717
2926
  fontFamily: "Kanit"
2718
2927
  }
2719
2928
  },
2720
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "w-full flex items-center justify-between", children: [
2721
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "w-full flex gap-[10px]", children: [
2722
- showYear && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2929
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "w-full flex items-center justify-between", children: [
2930
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "w-full flex gap-[10px]", children: [
2931
+ showYear && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2723
2932
  SelectField,
2724
2933
  {
2725
- prefix: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_icons3.CalendarOutlined, {}),
2934
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons3.CalendarOutlined, {}),
2726
2935
  onChange: setYearValue,
2727
2936
  options: years.map((s) => ({
2728
2937
  value: s.value,
@@ -2732,10 +2941,10 @@ function SortFilter({
2732
2941
  value: yearValue
2733
2942
  }
2734
2943
  ) }),
2735
- showMonth && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2944
+ showMonth && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2736
2945
  SelectField,
2737
2946
  {
2738
- prefix: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_icons3.CalendarOutlined, {}),
2947
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons3.CalendarOutlined, {}),
2739
2948
  onChange: setMonthValue,
2740
2949
  options: months.map((s) => ({
2741
2950
  value: s.value,
@@ -2745,10 +2954,10 @@ function SortFilter({
2745
2954
  placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
2746
2955
  }
2747
2956
  ) }),
2748
- showQuarter && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2957
+ showQuarter && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2749
2958
  SelectField,
2750
2959
  {
2751
- prefix: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_icons3.CalendarOutlined, {}),
2960
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons3.CalendarOutlined, {}),
2752
2961
  onChange: setQuartersValue,
2753
2962
  options: quarters.map((s) => ({
2754
2963
  value: s.value,
@@ -2759,8 +2968,8 @@ function SortFilter({
2759
2968
  }
2760
2969
  ) })
2761
2970
  ] }),
2762
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex gap-[10px]", children: [
2763
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2971
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex gap-[10px]", children: [
2972
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2764
2973
  import_icons_react9.IconSortDescending,
2765
2974
  {
2766
2975
  size: 24,
@@ -2768,7 +2977,7 @@ function SortFilter({
2768
2977
  onClick: onSortClick
2769
2978
  }
2770
2979
  ),
2771
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2980
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2772
2981
  import_icons_react9.IconFilter,
2773
2982
  {
2774
2983
  size: 24,
@@ -2784,8 +2993,8 @@ function SortFilter({
2784
2993
 
2785
2994
  // src/Upload/FileUploader/FileUploader.tsx
2786
2995
  var import_icons_react10 = require("@tabler/icons-react");
2787
- var import_react12 = require("react");
2788
- var import_jsx_runtime33 = require("react/jsx-runtime");
2996
+ var import_react13 = require("react");
2997
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2789
2998
  function FileUploader({
2790
2999
  onUpload,
2791
3000
  onError,
@@ -2797,10 +3006,10 @@ function FileUploader({
2797
3006
  description,
2798
3007
  label
2799
3008
  }) {
2800
- const [fileList, setFileList] = (0, import_react12.useState)([]);
2801
- const [uploading, setUploading] = (0, import_react12.useState)(false);
2802
- const [dragActive, setDragActive] = (0, import_react12.useState)(false);
2803
- const inputRef = (0, import_react12.useRef)(null);
3009
+ const [fileList, setFileList] = (0, import_react13.useState)([]);
3010
+ const [uploading, setUploading] = (0, import_react13.useState)(false);
3011
+ const [dragActive, setDragActive] = (0, import_react13.useState)(false);
3012
+ const inputRef = (0, import_react13.useRef)(null);
2804
3013
  const validateFile = (file) => {
2805
3014
  if (accept && !accept.includes(file.type)) {
2806
3015
  onError?.(`Invalid file type. file: ${file.name}`);
@@ -2856,10 +3065,10 @@ function FileUploader({
2856
3065
  }
2857
3066
  if (inputRef.current) inputRef.current.value = "";
2858
3067
  };
2859
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "w-full", children: [
2860
- label && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "body-1", children: label }),
2861
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
2862
- mode === "upload" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3068
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "w-full", children: [
3069
+ label && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "body-1", children: label }),
3070
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
3071
+ mode === "upload" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2863
3072
  "button",
2864
3073
  {
2865
3074
  type: "button",
@@ -2867,15 +3076,15 @@ function FileUploader({
2867
3076
  className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
2868
3077
  ${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
2869
3078
  disabled: disabled ? disabled : uploading,
2870
- children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
2871
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Loader, { size: 15 }),
3079
+ children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
3080
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Loader, { size: 15 }),
2872
3081
  " \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
2873
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
2874
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons_react10.IconUpload, { size: 15, className: "text-gray-400" }),
3082
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
3083
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons_react10.IconUpload, { size: 15, className: "text-gray-400" }),
2875
3084
  " \u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C"
2876
3085
  ] })
2877
3086
  }
2878
- ) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3087
+ ) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2879
3088
  "div",
2880
3089
  {
2881
3090
  className: `min-w-[400px] min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
@@ -2889,17 +3098,17 @@ function FileUploader({
2889
3098
  },
2890
3099
  onDragLeave: () => setDragActive(false),
2891
3100
  onDrop: handleDrop,
2892
- children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex justify-center items-center gap-2", children: [
2893
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Loader, { size: 15 }),
3101
+ children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex justify-center items-center gap-2", children: [
3102
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Loader, { size: 15 }),
2894
3103
  " \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
2895
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
2896
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons_react10.IconUpload, { size: 20 }),
2897
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "body-1", children: "\u0E04\u0E25\u0E34\u0E01\u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E32\u0E01\u0E44\u0E1F\u0E25\u0E4C\u0E21\u0E32\u0E17\u0E35\u0E48\u0E1A\u0E23\u0E34\u0E40\u0E27\u0E13\u0E19\u0E35\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14" }),
2898
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-gray-400 body-3", children: "\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E41\u0E1A\u0E1A\u0E40\u0E14\u0E35\u0E48\u0E22\u0E27\u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E25\u0E32\u0E22\u0E44\u0E1F\u0E25\u0E4C" })
3104
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
3105
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons_react10.IconUpload, { size: 20 }),
3106
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "body-1", children: "\u0E04\u0E25\u0E34\u0E01\u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E32\u0E01\u0E44\u0E1F\u0E25\u0E4C\u0E21\u0E32\u0E17\u0E35\u0E48\u0E1A\u0E23\u0E34\u0E40\u0E27\u0E13\u0E19\u0E35\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14" }),
3107
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-gray-400 body-3", children: "\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E41\u0E1A\u0E1A\u0E40\u0E14\u0E35\u0E48\u0E22\u0E27\u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E25\u0E32\u0E22\u0E44\u0E1F\u0E25\u0E4C" })
2899
3108
  ] })
2900
3109
  }
2901
3110
  ),
2902
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3111
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2903
3112
  "input",
2904
3113
  {
2905
3114
  type: "file",
@@ -2912,13 +3121,13 @@ function FileUploader({
2912
3121
  }
2913
3122
  )
2914
3123
  ] }),
2915
- description && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-gray-400 body-4", children: description }),
2916
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mt-[8px]", children: fileList.length !== 0 && fileList.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2 rounded-[4px] px-[8px] py-[4px] body-1", children: [
2917
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
2918
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons_react10.IconPaperclip, { size: 15 }) }),
2919
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "truncate", children: file.name })
3124
+ description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-gray-400 body-4", children: description }),
3125
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mt-[8px]", children: fileList.length !== 0 && fileList.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2 rounded-[4px] px-[8px] py-[4px] body-1", children: [
3126
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
3127
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons_react10.IconPaperclip, { size: 15 }) }),
3128
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "truncate", children: file.name })
2920
3129
  ] }),
2921
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3130
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2922
3131
  import_icons_react10.IconTrash,
2923
3132
  {
2924
3133
  size: 20,
@@ -2954,7 +3163,7 @@ function messageLoading(content, duration) {
2954
3163
  // src/Breadcrumb/Breadcrumb.tsx
2955
3164
  var import_antd14 = require("antd");
2956
3165
  var import_antd15 = require("antd");
2957
- var import_jsx_runtime34 = require("react/jsx-runtime");
3166
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2958
3167
  function Breadcrumbs({
2959
3168
  items,
2960
3169
  separator,
@@ -2962,7 +3171,7 @@ function Breadcrumbs({
2962
3171
  classname,
2963
3172
  params
2964
3173
  }) {
2965
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3174
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2966
3175
  import_antd14.ConfigProvider,
2967
3176
  {
2968
3177
  theme: {
@@ -2970,7 +3179,7 @@ function Breadcrumbs({
2970
3179
  fontFamily: "Kanit"
2971
3180
  }
2972
3181
  },
2973
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3182
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2974
3183
  import_antd15.Breadcrumb,
2975
3184
  {
2976
3185
  items,
@@ -2986,7 +3195,7 @@ function Breadcrumbs({
2986
3195
 
2987
3196
  // src/HeadingPage/HeadingPage.tsx
2988
3197
  var import_antd16 = require("antd");
2989
- var import_jsx_runtime35 = require("react/jsx-runtime");
3198
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2990
3199
  function HeadingPage({ Heading }) {
2991
3200
  const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
2992
3201
  weekday: "long",
@@ -2994,7 +3203,7 @@ function HeadingPage({ Heading }) {
2994
3203
  month: "long",
2995
3204
  year: "numeric"
2996
3205
  });
2997
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3206
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2998
3207
  import_antd16.ConfigProvider,
2999
3208
  {
3000
3209
  theme: {
@@ -3002,9 +3211,9 @@ function HeadingPage({ Heading }) {
3002
3211
  fontFamily: "Kanit"
3003
3212
  }
3004
3213
  },
3005
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
3006
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "headline-5", children: Heading }),
3007
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("p", { className: "body-1", children: [
3214
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
3215
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "headline-5", children: Heading }),
3216
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("p", { className: "body-1", children: [
3008
3217
  " \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
3009
3218
  today
3010
3219
  ] })
@@ -3015,8 +3224,8 @@ function HeadingPage({ Heading }) {
3015
3224
 
3016
3225
  // src/Progress/ProgressBar.tsx
3017
3226
  var import_antd17 = require("antd");
3018
- var import_react13 = require("react");
3019
- var import_jsx_runtime36 = require("react/jsx-runtime");
3227
+ var import_react14 = require("react");
3228
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3020
3229
  function ProgressBar({
3021
3230
  percent = 0,
3022
3231
  size = "default",
@@ -3029,8 +3238,8 @@ function ProgressBar({
3029
3238
  steps,
3030
3239
  isCheckPoints
3031
3240
  }) {
3032
- const [barWidth, setBarWidth] = (0, import_react13.useState)(0);
3033
- const progressRef = (0, import_react13.useRef)(null);
3241
+ const [barWidth, setBarWidth] = (0, import_react14.useState)(0);
3242
+ const progressRef = (0, import_react14.useRef)(null);
3034
3243
  let strokeColor = "--color-green-500";
3035
3244
  const defaultStrokeWidth = type === "circle" ? 13 : strokeWidth ?? 8;
3036
3245
  const defaultSize = type === "circle" ? 43 : size;
@@ -3038,7 +3247,7 @@ function ProgressBar({
3038
3247
  const minCheckpoint = Math.min(...checkpoints);
3039
3248
  strokeColor = percent >= minCheckpoint ? "var(--color-green-500)" : "var(--color-red-500)";
3040
3249
  }
3041
- (0, import_react13.useEffect)(() => {
3250
+ (0, import_react14.useEffect)(() => {
3042
3251
  const inner = progressRef.current?.querySelector(".ant-progress-inner");
3043
3252
  if (!inner) return;
3044
3253
  const observer = new ResizeObserver(() => {
@@ -3047,7 +3256,7 @@ function ProgressBar({
3047
3256
  observer.observe(inner);
3048
3257
  return () => observer.disconnect();
3049
3258
  }, []);
3050
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3259
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3051
3260
  import_antd17.ConfigProvider,
3052
3261
  {
3053
3262
  theme: {
@@ -3055,8 +3264,8 @@ function ProgressBar({
3055
3264
  fontFamily: "Kanit"
3056
3265
  }
3057
3266
  },
3058
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "relative w-full", ref: progressRef, children: [
3059
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3267
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "relative w-full", ref: progressRef, children: [
3268
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3060
3269
  import_antd17.Progress,
3061
3270
  {
3062
3271
  className: "w-full",
@@ -3072,7 +3281,7 @@ function ProgressBar({
3072
3281
  strokeColor
3073
3282
  }
3074
3283
  ),
3075
- barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3284
+ barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3076
3285
  "div",
3077
3286
  {
3078
3287
  className: "checkpoint absolute top-0",
@@ -3095,24 +3304,24 @@ function ProgressBar({
3095
3304
 
3096
3305
  // src/KpiSection/KpiSection.tsx
3097
3306
  var import_antd18 = require("antd");
3098
- var import_react15 = require("react");
3307
+ var import_react16 = require("react");
3099
3308
 
3100
3309
  // src/KpiSection/hooks/useGetKpiSection.ts
3101
- var import_react14 = require("react");
3310
+ var import_react15 = require("react");
3102
3311
  var import_cuid = __toESM(require("cuid"));
3103
3312
  function useGetKpiSection() {
3104
- const [nameKpi, setNameKpi] = (0, import_react14.useState)("");
3105
- const [kpiValue, setKpiValue] = (0, import_react14.useState)("");
3106
- const [unitValue, setUnitValue] = (0, import_react14.useState)("");
3107
- const [kpiList, setKpiList] = (0, import_react14.useState)([]);
3108
- const [editingBackup, setEditingBackup] = (0, import_react14.useState)({});
3109
- const [selected, setSelected] = (0, import_react14.useState)("2");
3110
- const [errors, setErrors] = (0, import_react14.useState)({
3313
+ const [nameKpi, setNameKpi] = (0, import_react15.useState)("");
3314
+ const [kpiValue, setKpiValue] = (0, import_react15.useState)("");
3315
+ const [unitValue, setUnitValue] = (0, import_react15.useState)("");
3316
+ const [kpiList, setKpiList] = (0, import_react15.useState)([]);
3317
+ const [editingBackup, setEditingBackup] = (0, import_react15.useState)({});
3318
+ const [selected, setSelected] = (0, import_react15.useState)("2");
3319
+ const [errors, setErrors] = (0, import_react15.useState)({
3111
3320
  nameKpi: "",
3112
3321
  kpiValue: "",
3113
3322
  unitValue: ""
3114
3323
  });
3115
- const [itemErrors, setItemErrors] = (0, import_react14.useState)({});
3324
+ const [itemErrors, setItemErrors] = (0, import_react15.useState)({});
3116
3325
  const options = [
3117
3326
  { value: "1", label: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" },
3118
3327
  { value: "2", label: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02" }
@@ -3245,7 +3454,7 @@ function useGetKpiSection() {
3245
3454
 
3246
3455
  // src/KpiSection/KpiSection.tsx
3247
3456
  var import_icons_react11 = require("@tabler/icons-react");
3248
- var import_jsx_runtime37 = require("react/jsx-runtime");
3457
+ var import_jsx_runtime38 = require("react/jsx-runtime");
3249
3458
  function KpiSection({ type, onChangeKpiList }) {
3250
3459
  const {
3251
3460
  handleAddKpi,
@@ -3266,16 +3475,16 @@ function KpiSection({ type, onChangeKpiList }) {
3266
3475
  setItemErrors
3267
3476
  } = useGetKpiSection();
3268
3477
  const [messageApi2, messageContainer] = import_antd18.message.useMessage();
3269
- const [hasShownError, setHasShownError] = (0, import_react15.useState)(false);
3270
- (0, import_react15.useEffect)(() => {
3478
+ const [hasShownError, setHasShownError] = (0, import_react16.useState)(false);
3479
+ (0, import_react16.useEffect)(() => {
3271
3480
  setMessageApi(messageApi2);
3272
3481
  }, [messageApi2]);
3273
- (0, import_react15.useEffect)(() => {
3482
+ (0, import_react16.useEffect)(() => {
3274
3483
  if (onChangeKpiList) {
3275
3484
  onChangeKpiList(kpiList);
3276
3485
  }
3277
3486
  }, [kpiList]);
3278
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3487
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3279
3488
  import_antd18.ConfigProvider,
3280
3489
  {
3281
3490
  theme: {
@@ -3284,11 +3493,11 @@ function KpiSection({ type, onChangeKpiList }) {
3284
3493
  fontSize: 16
3285
3494
  }
3286
3495
  },
3287
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "container-input", children: [
3496
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "container-input", children: [
3288
3497
  messageContainer,
3289
- type === "number" && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "space-y-4", children: [
3290
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
3291
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3498
+ type === "number" && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "space-y-4", children: [
3499
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
3500
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3292
3501
  InputField,
3293
3502
  {
3294
3503
  value: nameKpi,
@@ -3300,7 +3509,7 @@ function KpiSection({ type, onChangeKpiList }) {
3300
3509
  error: errors.nameKpi
3301
3510
  }
3302
3511
  ),
3303
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3512
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3304
3513
  InputField,
3305
3514
  {
3306
3515
  value: kpiValue,
@@ -3324,7 +3533,7 @@ function KpiSection({ type, onChangeKpiList }) {
3324
3533
  error: errors.kpiValue
3325
3534
  }
3326
3535
  ),
3327
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3536
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3328
3537
  InputField,
3329
3538
  {
3330
3539
  value: unitValue,
@@ -3336,7 +3545,7 @@ function KpiSection({ type, onChangeKpiList }) {
3336
3545
  error: errors.unitValue
3337
3546
  }
3338
3547
  ),
3339
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3548
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3340
3549
  import_icons_react11.IconCirclePlus,
3341
3550
  {
3342
3551
  className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
@@ -3345,17 +3554,17 @@ function KpiSection({ type, onChangeKpiList }) {
3345
3554
  }
3346
3555
  ) })
3347
3556
  ] }),
3348
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
3557
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3349
3558
  "div",
3350
3559
  {
3351
3560
  className: "grid grid-cols-[30px_1fr_100px_120px_80px] items-start py-2 body-1 gap-[8px]",
3352
3561
  children: [
3353
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
3562
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
3354
3563
  index + 1,
3355
3564
  "."
3356
3565
  ] }),
3357
- kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
3358
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3566
+ kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
3567
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3359
3568
  InputField,
3360
3569
  {
3361
3570
  value: kpi.name,
@@ -3365,7 +3574,7 @@ function KpiSection({ type, onChangeKpiList }) {
3365
3574
  error: itemErrors[kpi.id]?.name
3366
3575
  }
3367
3576
  ),
3368
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3577
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3369
3578
  InputField,
3370
3579
  {
3371
3580
  value: kpi.value?.toString(),
@@ -3390,7 +3599,7 @@ function KpiSection({ type, onChangeKpiList }) {
3390
3599
  error: itemErrors[kpi.id]?.value
3391
3600
  }
3392
3601
  ),
3393
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3602
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3394
3603
  InputField,
3395
3604
  {
3396
3605
  value: kpi.unit,
@@ -3400,29 +3609,29 @@ function KpiSection({ type, onChangeKpiList }) {
3400
3609
  error: itemErrors[kpi.id]?.unit
3401
3610
  }
3402
3611
  ),
3403
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
3612
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3404
3613
  "div",
3405
3614
  {
3406
3615
  className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.value || !!itemErrors[kpi.id]?.unit || !!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
3407
3616
  children: [
3408
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3617
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3409
3618
  import_icons_react11.IconCheck,
3410
3619
  {
3411
3620
  className: "w-[30px] h-[30px] cursor-pointer",
3412
3621
  onClick: () => handleSave(kpi.id, type)
3413
3622
  }
3414
3623
  ),
3415
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_icons_react11.IconX, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
3624
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons_react11.IconX, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
3416
3625
  ]
3417
3626
  }
3418
3627
  )
3419
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
3420
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "body-1", children: kpi.name }),
3421
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "body-1", children: kpi.value }),
3422
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "body-1", children: kpi.unit }),
3423
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex gap-3 justify-end", children: [
3424
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_icons_react11.IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
3425
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_icons_react11.IconTrash, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
3628
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
3629
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "body-1", children: kpi.name }),
3630
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "body-1", children: kpi.value }),
3631
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "body-1", children: kpi.unit }),
3632
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex gap-3 justify-end", children: [
3633
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons_react11.IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
3634
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons_react11.IconTrash, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
3426
3635
  ] })
3427
3636
  ] })
3428
3637
  ]
@@ -3430,9 +3639,9 @@ function KpiSection({ type, onChangeKpiList }) {
3430
3639
  kpi.id
3431
3640
  )) })
3432
3641
  ] }),
3433
- type === "text" && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "space-y-4", children: [
3434
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
3435
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3642
+ type === "text" && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "space-y-4", children: [
3643
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
3644
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3436
3645
  InputField,
3437
3646
  {
3438
3647
  value: nameKpi,
@@ -3444,7 +3653,7 @@ function KpiSection({ type, onChangeKpiList }) {
3444
3653
  error: errors.nameKpi
3445
3654
  }
3446
3655
  ),
3447
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3656
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3448
3657
  import_icons_react11.IconCirclePlus,
3449
3658
  {
3450
3659
  className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
@@ -3453,13 +3662,13 @@ function KpiSection({ type, onChangeKpiList }) {
3453
3662
  }
3454
3663
  ) })
3455
3664
  ] }),
3456
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "grid grid-cols-[30px_1fr_80px] items-start py-2 body-1 gap-[8px]", children: [
3457
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
3665
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "grid grid-cols-[30px_1fr_80px] items-start py-2 body-1 gap-[8px]", children: [
3666
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
3458
3667
  index + 1,
3459
3668
  "."
3460
3669
  ] }),
3461
- kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
3462
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3670
+ kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
3671
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3463
3672
  InputField,
3464
3673
  {
3465
3674
  value: kpi.name,
@@ -3469,27 +3678,27 @@ function KpiSection({ type, onChangeKpiList }) {
3469
3678
  error: itemErrors[kpi.id]?.name
3470
3679
  }
3471
3680
  ),
3472
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
3681
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3473
3682
  "div",
3474
3683
  {
3475
3684
  className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
3476
3685
  children: [
3477
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3686
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3478
3687
  import_icons_react11.IconCheck,
3479
3688
  {
3480
3689
  className: "w-[30px] h-[30px] cursor-pointer",
3481
3690
  onClick: () => handleSave(kpi.id, type)
3482
3691
  }
3483
3692
  ),
3484
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_icons_react11.IconX, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
3693
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons_react11.IconX, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
3485
3694
  ]
3486
3695
  }
3487
3696
  )
3488
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
3489
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "body-1", children: kpi.name }),
3490
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex gap-3 justify-end", children: [
3491
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_icons_react11.IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
3492
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_icons_react11.IconTrash, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
3697
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
3698
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "body-1", children: kpi.name }),
3699
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex gap-3 justify-end", children: [
3700
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons_react11.IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
3701
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons_react11.IconTrash, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
3493
3702
  ] })
3494
3703
  ] })
3495
3704
  ] }, kpi.id)) })
@@ -3501,16 +3710,16 @@ function KpiSection({ type, onChangeKpiList }) {
3501
3710
 
3502
3711
  // src/Modal/Modal/Modal.tsx
3503
3712
  var import_antd19 = require("antd");
3504
- var import_jsx_runtime38 = require("react/jsx-runtime");
3713
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3505
3714
  function AntDModal({ children, isOpen, width, onCancel }) {
3506
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_antd19.Modal, { open: isOpen, onCancel, width, centered: true, footer: null, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children }) }) });
3715
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_antd19.Modal, { open: isOpen, onCancel, width, centered: true, footer: null, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children }) }) });
3507
3716
  }
3508
3717
 
3509
3718
  // src/Indicator/Indicator/Indicator.tsx
3510
3719
  var import_icons_react12 = require("@tabler/icons-react");
3511
- var import_react16 = require("react");
3720
+ var import_react17 = require("react");
3512
3721
  var import_antd20 = require("antd");
3513
- var import_jsx_runtime39 = require("react/jsx-runtime");
3722
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3514
3723
  function Indicator({
3515
3724
  option = [
3516
3725
  { value: "TEXT", label: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" },
@@ -3520,22 +3729,22 @@ function Indicator({
3520
3729
  arrayData,
3521
3730
  setArrayData
3522
3731
  }) {
3523
- const [valueSwitch, setValueSwitch] = (0, import_react16.useState)("TEXT");
3524
- const [cacheData, setCacheData] = (0, import_react16.useState)({
3732
+ const [valueSwitch, setValueSwitch] = (0, import_react17.useState)("TEXT");
3733
+ const [cacheData, setCacheData] = (0, import_react17.useState)({
3525
3734
  indicatorType: type,
3526
3735
  inputType: valueSwitch,
3527
3736
  textValue: "",
3528
3737
  numberValue: "",
3529
3738
  unit: ""
3530
3739
  });
3531
- const [cacheEditData, setCacheEditData] = (0, import_react16.useState)({
3740
+ const [cacheEditData, setCacheEditData] = (0, import_react17.useState)({
3532
3741
  indicatorType: type,
3533
3742
  inputType: valueSwitch,
3534
3743
  textValue: "",
3535
3744
  numberValue: "",
3536
3745
  unit: ""
3537
3746
  });
3538
- const [editIndex, setEditIndex] = (0, import_react16.useState)(null);
3747
+ const [editIndex, setEditIndex] = (0, import_react17.useState)(null);
3539
3748
  const handleAddIndicator = () => {
3540
3749
  if (cacheData.textValue.trim() === "") return;
3541
3750
  setArrayData([
@@ -3592,14 +3801,14 @@ function Indicator({
3592
3801
  }));
3593
3802
  console.log(cacheEditData);
3594
3803
  };
3595
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "w-full", children: [
3596
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
3804
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "w-full", children: [
3805
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
3597
3806
  "div",
3598
3807
  {
3599
3808
  className: `space-x-2 grid ${valueSwitch === "TEXT" ? `grid-cols-[140px_1fr_50px]` : `grid-cols-[140px_1fr_200px_200px_50px]`} items-start`,
3600
3809
  children: [
3601
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SwitchSelect, { option, onClick: handleClick, value: valueSwitch, label: "\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17", required: true }),
3602
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3810
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SwitchSelect, { option, onClick: handleClick, value: valueSwitch, label: "\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17", required: true }),
3811
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3603
3812
  InputField,
3604
3813
  {
3605
3814
  label: `\u0E0A\u0E37\u0E48\u0E2D\u0E15\u0E31\u0E27\u0E0A\u0E35\u0E49\u0E27\u0E31\u0E14${type === "OUTPUT" ? "\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" : "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C"}`,
@@ -3610,8 +3819,8 @@ function Indicator({
3610
3819
  required: true
3611
3820
  }
3612
3821
  ),
3613
- valueSwitch === "NUMBER" && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
3614
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3822
+ valueSwitch === "NUMBER" && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
3823
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3615
3824
  InputFieldNumber,
3616
3825
  {
3617
3826
  label: `\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E49\u0E32\u0E2B\u0E21\u0E32\u0E22${type === "OUTPUT" ? "\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" : "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C"}`,
@@ -3622,7 +3831,7 @@ function Indicator({
3622
3831
  required: true
3623
3832
  }
3624
3833
  ),
3625
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3834
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3626
3835
  InputField,
3627
3836
  {
3628
3837
  label: `\u0E2B\u0E19\u0E48\u0E27\u0E22`,
@@ -3634,17 +3843,17 @@ function Indicator({
3634
3843
  }
3635
3844
  )
3636
3845
  ] }),
3637
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react12.IconCirclePlus, { onClick: handleAddIndicator, className: "mt-7 cursor-pointer", size: 32 })
3846
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons_react12.IconCirclePlus, { onClick: handleAddIndicator, className: "mt-7 cursor-pointer", size: 32 })
3638
3847
  ]
3639
3848
  }
3640
3849
  ),
3641
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: arrayData.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
3850
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: arrayData.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
3642
3851
  "div",
3643
3852
  {
3644
3853
  className: `space-y-4 grid ${item.inputType === "TEXT" ? `grid-cols-[140px_1fr_50px_50px]` : `grid-cols-[140px_1fr_200px_150px_50px_50px]`} items-start`,
3645
3854
  children: [
3646
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "body-1 mt-2", children: item.inputType === "TEXT" ? "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" : "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02" }),
3647
- index === editIndex ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3855
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "body-1 mt-2", children: item.inputType === "TEXT" ? "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" : "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02" }),
3856
+ index === editIndex ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3648
3857
  import_antd20.Input,
3649
3858
  {
3650
3859
  className: "body-1 mt-2",
@@ -3653,9 +3862,9 @@ function Indicator({
3653
3862
  name: "textValue",
3654
3863
  onChange: (e) => handleChangeEditCashData(e)
3655
3864
  }
3656
- ) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "body-1 mt-2", children: item.textValue }),
3657
- item.inputType === "NUMBER" && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
3658
- index === editIndex ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3865
+ ) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "body-1 mt-2", children: item.textValue }),
3866
+ item.inputType === "NUMBER" && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
3867
+ index === editIndex ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3659
3868
  import_antd20.Input,
3660
3869
  {
3661
3870
  className: "body-1 mt-2",
@@ -3664,8 +3873,8 @@ function Indicator({
3664
3873
  name: "numberValue",
3665
3874
  onChange: (e) => handleChangeEditCashData(e)
3666
3875
  }
3667
- ) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "body-1 mt-2", children: item.numberValue }),
3668
- index === editIndex ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3876
+ ) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "body-1 mt-2", children: item.numberValue }),
3877
+ index === editIndex ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3669
3878
  import_antd20.Input,
3670
3879
  {
3671
3880
  className: "body-1 mt-2",
@@ -3674,19 +3883,19 @@ function Indicator({
3674
3883
  name: "unit",
3675
3884
  onChange: (e) => handleChangeEditCashData(e)
3676
3885
  }
3677
- ) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "body-1 mt-2", children: item.unit })
3886
+ ) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "body-1 mt-2", children: item.unit })
3678
3887
  ] }),
3679
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "body-1 mt-2 flex", children: editIndex !== null ? editIndex === index ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex", children: [
3680
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3888
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "body-1 mt-2 flex", children: editIndex !== null ? editIndex === index ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex", children: [
3889
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3681
3890
  import_icons_react12.IconCheck,
3682
3891
  {
3683
3892
  className: "cursor-pointer text-green-600",
3684
3893
  onClick: () => handleConfirmEditIndicator(index)
3685
3894
  }
3686
3895
  ),
3687
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react12.IconX, { className: "cursor-pointer text-red-600", onClick: handleCancelEditIndicator })
3688
- ] }) : void 0 : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react12.IconPencil, { className: "cursor-pointer", onClick: () => handleEditIndicator(index) }) }),
3689
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "body-1 mt-2 cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react12.IconTrash, { onClick: () => handleDeleteIndicator(index) }) })
3896
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons_react12.IconX, { className: "cursor-pointer text-red-600", onClick: handleCancelEditIndicator })
3897
+ ] }) : void 0 : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons_react12.IconPencil, { className: "cursor-pointer", onClick: () => handleEditIndicator(index) }) }),
3898
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "body-1 mt-2 cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons_react12.IconTrash, { onClick: () => handleDeleteIndicator(index) }) })
3690
3899
  ]
3691
3900
  }
3692
3901
  )) })
@@ -3695,31 +3904,31 @@ function Indicator({
3695
3904
 
3696
3905
  // src/FilterPopUp/FilterPopUp.tsx
3697
3906
  var import_icons_react13 = require("@tabler/icons-react");
3698
- var import_react17 = require("react");
3699
- var import_jsx_runtime40 = require("react/jsx-runtime");
3907
+ var import_react18 = require("react");
3908
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3700
3909
  var FilterPopUp = (filter) => {
3701
- const [isAction, setIsAction] = (0, import_react17.useState)(true);
3702
- const [filterArray, setFilterArray] = (0, import_react17.useState)([""]);
3910
+ const [isAction, setIsAction] = (0, import_react18.useState)(true);
3911
+ const [filterArray, setFilterArray] = (0, import_react18.useState)([""]);
3703
3912
  const handleClearFilter = () => {
3704
3913
  setFilterArray([]);
3705
3914
  };
3706
3915
  const handleSubmitFilter = () => {
3707
3916
  filter.handleSearch(filterArray);
3708
3917
  };
3709
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "relative", children: [
3710
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("button", { className: "flex px-2 py-1 rounded-lg border-1", onClick: () => setIsAction(!isAction), children: [
3711
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons_react13.IconFilter, {}),
3918
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "relative", children: [
3919
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("button", { className: "flex px-2 py-1 rounded-lg border-1", onClick: () => setIsAction(!isAction), children: [
3920
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons_react13.IconFilter, {}),
3712
3921
  "filter"
3713
3922
  ] }),
3714
- isAction ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "absolute bg-white p-5 rounded-lg shadow-2xl w-[600px]", children: [
3715
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex justify-end", children: [
3716
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex justify-end text-nowrap gap-2", children: [
3717
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(GhostButton, { title: "\u0E43\u0E0A\u0E49\u0E1F\u0E34\u0E25\u0E40\u0E15\u0E2D\u0E23\u0E4C", onClick: handleSubmitFilter, iconLeft: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons_react13.IconCheck, {}) }),
3718
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(GhostButton, { title: "\u0E25\u0E49\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14", onClick: handleClearFilter, iconLeft: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons_react13.IconTrash, {}) })
3923
+ isAction ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "absolute bg-white p-5 rounded-lg shadow-2xl w-[600px]", children: [
3924
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex justify-end", children: [
3925
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex justify-end text-nowrap gap-2", children: [
3926
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(GhostButton, { title: "\u0E43\u0E0A\u0E49\u0E1F\u0E34\u0E25\u0E40\u0E15\u0E2D\u0E23\u0E4C", onClick: handleSubmitFilter, iconLeft: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons_react13.IconCheck, {}) }),
3927
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(GhostButton, { title: "\u0E25\u0E49\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14", onClick: handleClearFilter, iconLeft: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons_react13.IconTrash, {}) })
3719
3928
  ] }),
3720
3929
  ""
3721
3930
  ] }),
3722
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3931
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3723
3932
  SelectCustom,
3724
3933
  {
3725
3934
  options: filter.selectionFilter,
@@ -3742,6 +3951,7 @@ var FilterPopUp = (filter) => {
3742
3951
  ColorPickerBasic,
3743
3952
  DataTable,
3744
3953
  DatePickerBasic,
3954
+ DatePickerRange,
3745
3955
  FileUploader,
3746
3956
  FilterPopUp,
3747
3957
  GhostButton,