@esic-lab/data-core-ui 0.0.25 → 0.0.26

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.mjs CHANGED
@@ -305,6 +305,28 @@ var require_dayjs_min = __commonJS({
305
305
  }
306
306
  });
307
307
 
308
+ // node_modules/dayjs/plugin/buddhistEra.js
309
+ var require_buddhistEra = __commonJS({
310
+ "node_modules/dayjs/plugin/buddhistEra.js"(exports, module) {
311
+ "use strict";
312
+ !(function(t, e) {
313
+ "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs_plugin_buddhistEra = e();
314
+ })(exports, (function() {
315
+ "use strict";
316
+ return function(t, e) {
317
+ var n = e.prototype, i = n.format;
318
+ n.format = function(t2) {
319
+ var e2 = this, n2 = (t2 || "YYYY-MM-DDTHH:mm:ssZ").replace(/(\[[^\]]+])|BBBB|BB/g, (function(t3, n3) {
320
+ var i2, o = String(e2.$y + 543), f = "BB" === t3 ? [o.slice(-2), 2] : [o, 4];
321
+ return n3 || (i2 = e2.$utils()).s.apply(i2, f.concat(["0"]));
322
+ }));
323
+ return i.bind(this)(n2);
324
+ };
325
+ };
326
+ }));
327
+ }
328
+ });
329
+
308
330
  // node_modules/dayjs/locale/th.js
309
331
  var require_th = __commonJS({
310
332
  "node_modules/dayjs/locale/th.js"(exports, module) {
@@ -324,134 +346,6 @@ var require_th = __commonJS({
324
346
  }
325
347
  });
326
348
 
327
- // node_modules/dayjs/plugin/customParseFormat.js
328
- var require_customParseFormat = __commonJS({
329
- "node_modules/dayjs/plugin/customParseFormat.js"(exports, module) {
330
- "use strict";
331
- !(function(e, t) {
332
- "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_customParseFormat = t();
333
- })(exports, (function() {
334
- "use strict";
335
- var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a = function(e2) {
336
- return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3);
337
- };
338
- var f = function(e2) {
339
- return function(t2) {
340
- this[e2] = +t2;
341
- };
342
- }, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) {
343
- (this.zone || (this.zone = {})).offset = (function(e3) {
344
- if (!e3) return 0;
345
- if ("Z" === e3) return 0;
346
- var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0);
347
- return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2;
348
- })(e2);
349
- }], u = function(e2) {
350
- var t2 = s[e2];
351
- return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f));
352
- }, d = function(e2, t2) {
353
- var n2, r2 = s.meridiem;
354
- if (r2) {
355
- for (var i2 = 1; i2 <= 24; i2 += 1) if (e2.indexOf(r2(i2, 0, t2)) > -1) {
356
- n2 = i2 > 12;
357
- break;
358
- }
359
- } else n2 = e2 === (t2 ? "pm" : "PM");
360
- return n2;
361
- }, c = { A: [o, function(e2) {
362
- this.afternoon = d(e2, false);
363
- }], a: [o, function(e2) {
364
- this.afternoon = d(e2, true);
365
- }], Q: [n, function(e2) {
366
- this.month = 3 * (e2 - 1) + 1;
367
- }], S: [n, function(e2) {
368
- this.milliseconds = 100 * +e2;
369
- }], SS: [r, function(e2) {
370
- this.milliseconds = 10 * +e2;
371
- }], SSS: [/\d{3}/, function(e2) {
372
- this.milliseconds = +e2;
373
- }], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [r, f("day")], Do: [o, function(e2) {
374
- var t2 = s.ordinal, n2 = e2.match(/\d+/);
375
- if (this.day = n2[0], t2) for (var r2 = 1; r2 <= 31; r2 += 1) t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2);
376
- }], w: [i, f("week")], ww: [r, f("week")], M: [i, f("month")], MM: [r, f("month")], MMM: [o, function(e2) {
377
- var t2 = u("months"), n2 = (u("monthsShort") || t2.map((function(e3) {
378
- return e3.slice(0, 3);
379
- }))).indexOf(e2) + 1;
380
- if (n2 < 1) throw new Error();
381
- this.month = n2 % 12 || n2;
382
- }], MMMM: [o, function(e2) {
383
- var t2 = u("months").indexOf(e2) + 1;
384
- if (t2 < 1) throw new Error();
385
- this.month = t2 % 12 || t2;
386
- }], Y: [/[+-]?\d+/, f("year")], YY: [r, function(e2) {
387
- this.year = a(e2);
388
- }], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h };
389
- function l(n2) {
390
- var r2, i2;
391
- r2 = n2, i2 = s && s.formats;
392
- for (var o2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(t2, n3, r3) {
393
- var o3 = r3 && r3.toUpperCase();
394
- return n3 || i2[r3] || e[r3] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(e2, t3, n4) {
395
- return t3 || n4.slice(1);
396
- }));
397
- }))).match(t), a2 = o2.length, f2 = 0; f2 < a2; f2 += 1) {
398
- var h2 = o2[f2], u2 = c[h2], d2 = u2 && u2[0], l2 = u2 && u2[1];
399
- o2[f2] = l2 ? { regex: d2, parser: l2 } : h2.replace(/^\[|\]$/g, "");
400
- }
401
- return function(e2) {
402
- for (var t2 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) {
403
- var i3 = o2[n3];
404
- if ("string" == typeof i3) r3 += i3.length;
405
- else {
406
- var s2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = s2.exec(h3)[0];
407
- f3.call(t2, u3), e2 = e2.replace(u3, "");
408
- }
409
- }
410
- return (function(e3) {
411
- var t3 = e3.afternoon;
412
- if (void 0 !== t3) {
413
- var n4 = e3.hours;
414
- t3 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon;
415
- }
416
- })(t2), t2;
417
- };
418
- }
419
- return function(e2, t2, n2) {
420
- n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (a = e2.parseTwoDigitYear);
421
- var r2 = t2.prototype, i2 = r2.parse;
422
- r2.parse = function(e3) {
423
- var t3 = e3.date, r3 = e3.utc, o2 = e3.args;
424
- this.$u = r3;
425
- var a2 = o2[1];
426
- if ("string" == typeof a2) {
427
- var f2 = true === o2[2], h2 = true === o2[3], u2 = f2 || h2, d2 = o2[2];
428
- h2 && (d2 = o2[2]), s = this.$locale(), !f2 && d2 && (s = n2.Ls[d2]), this.$d = (function(e4, t4, n3, r4) {
429
- try {
430
- if (["x", "X"].indexOf(t4) > -1) return new Date(("X" === t4 ? 1e3 : 1) * e4);
431
- var i3 = l(t4)(e4), o3 = i3.year, s2 = i3.month, a3 = i3.day, f3 = i3.hours, h3 = i3.minutes, u3 = i3.seconds, d3 = i3.milliseconds, c3 = i3.zone, m2 = i3.week, M2 = /* @__PURE__ */ new Date(), Y = a3 || (o3 || s2 ? 1 : M2.getDate()), p = o3 || M2.getFullYear(), v = 0;
432
- o3 && !s2 || (v = s2 > 0 ? s2 - 1 : M2.getMonth());
433
- var D, w = f3 || 0, g = h3 || 0, y = u3 || 0, L = d3 || 0;
434
- return c3 ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c3.offset * 1e3)) : n3 ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m2 && (D = r4(D).week(m2).toDate()), D);
435
- } catch (e5) {
436
- return /* @__PURE__ */ new Date("");
437
- }
438
- })(t3, a2, r3, n2), this.init(), d2 && true !== d2 && (this.$L = this.locale(d2).$L), u2 && t3 != this.format(a2) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
439
- } else if (a2 instanceof Array) for (var c2 = a2.length, m = 1; m <= c2; m += 1) {
440
- o2[1] = a2[m - 1];
441
- var M = n2.apply(this, o2);
442
- if (M.isValid()) {
443
- this.$d = M.$d, this.$L = M.$L, this.init();
444
- break;
445
- }
446
- m === c2 && (this.$d = /* @__PURE__ */ new Date(""));
447
- }
448
- else i2.call(this, e3);
449
- };
450
- };
451
- }));
452
- }
453
- });
454
-
455
349
  // src/Button/PrimaryButton/PrimaryButton.tsx
456
350
  import { jsx, jsxs } from "react/jsx-runtime";
457
351
  function PrimaryButton({
@@ -1073,13 +967,13 @@ function TextInput({
1073
967
  return /* @__PURE__ */ jsxs13("div", { children: [
1074
968
  label && /* @__PURE__ */ jsxs13("p", { className: "body-1 mb-[8px]", children: [
1075
969
  label,
1076
- required && /* @__PURE__ */ jsx17("span", { className: "text-red-600", children: "\xA0*" })
970
+ required && /* @__PURE__ */ jsx17("span", { className: "text-red-500", children: "\xA0*" })
1077
971
  ] }),
1078
972
  /* @__PURE__ */ jsxs13(
1079
973
  "div",
1080
974
  {
1081
975
  className: `border-[1px] rounded-[8px] w-full h-[40px] flex justify-center items-center
1082
- ${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-600" : ""}`,
976
+ ${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-500" : ""}`,
1083
977
  children: [
1084
978
  /* @__PURE__ */ jsx17(
1085
979
  "input",
@@ -1098,23 +992,21 @@ function TextInput({
1098
992
  ]
1099
993
  }
1100
994
  ),
1101
- error && /* @__PURE__ */ jsx17("p", { className: "text-red-600 body-1", children: error })
995
+ error && /* @__PURE__ */ jsx17("p", { className: "text-red-500 body-1", children: error })
1102
996
  ] });
1103
997
  }
1104
998
 
1105
- // src/InputField/InputField.tsx
999
+ // src/Input/InputField/InputField.tsx
1106
1000
  import { ConfigProvider as ConfigProvider2, Input } from "antd";
1107
1001
  import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
1108
1002
  function InputField({
1109
1003
  value,
1110
1004
  onChange,
1111
1005
  placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
1112
- title,
1113
- require: require2,
1114
- bottomText,
1006
+ label,
1007
+ required,
1115
1008
  disabled,
1116
- showError,
1117
- errorMessage,
1009
+ error,
1118
1010
  addonBefore,
1119
1011
  addonAfter,
1120
1012
  defaultValue,
@@ -1131,9 +1023,9 @@ function InputField({
1131
1023
  },
1132
1024
  children: /* @__PURE__ */ jsxs14("div", { className: "container-input", children: [
1133
1025
  /* @__PURE__ */ jsxs14("div", { children: [
1134
- /* @__PURE__ */ jsx18("span", { className: "body-1", children: title }),
1026
+ /* @__PURE__ */ jsx18("span", { className: "body-1", children: label }),
1135
1027
  " ",
1136
- require2 && /* @__PURE__ */ jsx18("span", { className: "text-red-500", children: "*" })
1028
+ required && /* @__PURE__ */ jsx18("span", { className: "text-red-500", children: "*" })
1137
1029
  ] }),
1138
1030
  /* @__PURE__ */ jsx18(
1139
1031
  Input,
@@ -1150,11 +1042,7 @@ function InputField({
1150
1042
  onClear
1151
1043
  }
1152
1044
  ),
1153
- /* @__PURE__ */ jsxs14("div", { children: [
1154
- /* @__PURE__ */ jsx18("p", { className: "caption-1 text-gray-500", children: bottomText }),
1155
- " ",
1156
- showError && /* @__PURE__ */ jsx18("p", { className: "caption-1 text-red-500 ", children: errorMessage })
1157
- ] })
1045
+ error && /* @__PURE__ */ jsx18("p", { className: "text-red-500 caption-1", children: error })
1158
1046
  ] })
1159
1047
  }
1160
1048
  );
@@ -1209,45 +1097,106 @@ function TextAreaInput({
1209
1097
  disabled
1210
1098
  }
1211
1099
  ),
1212
- error && /* @__PURE__ */ jsx19("p", { className: "text-red-600 body-1", children: error })
1100
+ error && /* @__PURE__ */ jsx19("p", { className: "text-red-500 body-1", children: error })
1213
1101
  ] })
1214
1102
  }
1215
1103
  ) });
1216
1104
  }
1217
1105
 
1218
- // src/ColorPicker/ColorPicker.tsx
1219
- import { ConfigProvider as ConfigProvider4, ColorPicker } from "antd";
1106
+ // src/Input/InputFieldNumber/InputFieldNumber.tsx
1107
+ import { ConfigProvider as ConfigProvider4, InputNumber } from "antd";
1220
1108
  import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
1221
- function ColorPickerBasic({
1109
+ function InputFieldNumber({
1222
1110
  value,
1223
1111
  onChange,
1224
- require: require2,
1112
+ placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
1225
1113
  title,
1226
- bottomText,
1227
- showError,
1228
- errorMessage,
1114
+ required,
1229
1115
  disabled,
1230
- allowClear,
1231
- defaultFormat,
1116
+ error,
1117
+ addonBefore,
1118
+ addonAfter,
1119
+ defaultValue,
1232
1120
  className,
1233
- placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
1121
+ max,
1122
+ min,
1123
+ controls,
1124
+ size,
1125
+ changeOnWheel,
1126
+ formatter,
1127
+ parser
1234
1128
  }) {
1235
1129
  return /* @__PURE__ */ jsx20(
1236
1130
  ConfigProvider4,
1237
1131
  {
1238
1132
  theme: {
1239
1133
  token: {
1240
- fontFamily: "Kanit",
1241
- fontSize: 16
1134
+ fontFamily: "Kanit"
1242
1135
  }
1243
1136
  },
1244
1137
  children: /* @__PURE__ */ jsxs16("div", { className: "container-input", children: [
1245
1138
  /* @__PURE__ */ jsxs16("div", { children: [
1246
1139
  /* @__PURE__ */ jsx20("span", { className: "body-1", children: title }),
1247
1140
  " ",
1248
- require2 && /* @__PURE__ */ jsx20("span", { className: "text-red-500", children: "*" })
1141
+ required && /* @__PURE__ */ jsx20("span", { className: "text-red-500", children: "*" })
1249
1142
  ] }),
1250
1143
  /* @__PURE__ */ jsx20(
1144
+ InputNumber,
1145
+ {
1146
+ value: value ?? void 0,
1147
+ onChange: (val) => onChange(val),
1148
+ placeholder,
1149
+ disabled,
1150
+ className: `body-1 w-full ${className ?? ""}`,
1151
+ addonBefore,
1152
+ addonAfter,
1153
+ defaultValue,
1154
+ max,
1155
+ min,
1156
+ controls,
1157
+ size,
1158
+ changeOnWheel,
1159
+ formatter,
1160
+ parser
1161
+ }
1162
+ ),
1163
+ error && /* @__PURE__ */ jsx20("p", { className: "text-red-500 caption-1", children: error })
1164
+ ] })
1165
+ }
1166
+ );
1167
+ }
1168
+
1169
+ // src/ColorPicker/ColorPicker.tsx
1170
+ import { ConfigProvider as ConfigProvider5, ColorPicker } from "antd";
1171
+ import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
1172
+ function ColorPickerBasic({
1173
+ value,
1174
+ onChange,
1175
+ required,
1176
+ label,
1177
+ error,
1178
+ disabled,
1179
+ allowClear,
1180
+ defaultFormat,
1181
+ className,
1182
+ placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
1183
+ }) {
1184
+ return /* @__PURE__ */ jsx21(
1185
+ ConfigProvider5,
1186
+ {
1187
+ theme: {
1188
+ token: {
1189
+ fontFamily: "Kanit",
1190
+ fontSize: 16
1191
+ }
1192
+ },
1193
+ children: /* @__PURE__ */ jsxs17("div", { className: "container-input", children: [
1194
+ /* @__PURE__ */ jsxs17("div", { children: [
1195
+ /* @__PURE__ */ jsx21("span", { className: "body-1", children: label }),
1196
+ " ",
1197
+ required && /* @__PURE__ */ jsx21("span", { className: "text-red-500", children: "*" })
1198
+ ] }),
1199
+ /* @__PURE__ */ jsx21(
1251
1200
  ColorPicker,
1252
1201
  {
1253
1202
  defaultFormat,
@@ -1259,9 +1208,9 @@ function ColorPickerBasic({
1259
1208
  showText: (color) => {
1260
1209
  const hex = color.toHexString();
1261
1210
  if (!value) {
1262
- return /* @__PURE__ */ jsx20("span", { children: placeholder });
1211
+ return /* @__PURE__ */ jsx21("span", { children: placeholder });
1263
1212
  }
1264
- return /* @__PURE__ */ jsxs16("span", { children: [
1213
+ return /* @__PURE__ */ jsxs17("span", { children: [
1265
1214
  "(",
1266
1215
  hex,
1267
1216
  ")"
@@ -1270,11 +1219,7 @@ function ColorPickerBasic({
1270
1219
  disabled
1271
1220
  }
1272
1221
  ),
1273
- /* @__PURE__ */ jsxs16("div", { children: [
1274
- /* @__PURE__ */ jsx20("p", { className: "caption-1 text-gray-500", children: bottomText }),
1275
- " ",
1276
- showError && /* @__PURE__ */ jsx20("p", { className: "caption-1 text-red-500 ", children: errorMessage })
1277
- ] })
1222
+ error && /* @__PURE__ */ jsx21("p", { className: "text-red-500 caption-1", children: error })
1278
1223
  ] })
1279
1224
  }
1280
1225
  );
@@ -1282,18 +1227,34 @@ function ColorPickerBasic({
1282
1227
 
1283
1228
  // src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
1284
1229
  var import_dayjs = __toESM(require_dayjs_min());
1285
- var import_th2 = __toESM(require_th());
1286
- import { ConfigProvider as ConfigProvider5, DatePicker } from "antd";
1230
+ var import_buddhistEra = __toESM(require_buddhistEra());
1231
+ import { ConfigProvider as ConfigProvider6, DatePicker } from "antd";
1287
1232
  import thTH from "antd/locale/th_TH";
1288
- import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
1233
+ import { format } from "date-fns";
1234
+ import { th as thFns } from "date-fns/locale";
1235
+
1236
+ // src/DatePicker/convertToBuddhist.ts
1237
+ import th from "antd/es/date-picker/locale/th_TH";
1238
+ var buddhistLocale = {
1239
+ ...th,
1240
+ lang: {
1241
+ ...th.lang,
1242
+ fieldDateFormat: "BBBB-MM-DD",
1243
+ fieldDateTimeFormat: "BBBB-MM-DD HH:mm:ss",
1244
+ yearFormat: "BBBB",
1245
+ cellYearFormat: "BBBB"
1246
+ }
1247
+ };
1248
+
1249
+ // src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
1250
+ import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
1251
+ import_dayjs.default.extend(import_buddhistEra.default);
1289
1252
  function DatePickerBasic({
1290
1253
  value,
1291
1254
  onChange,
1292
- require: require2,
1293
- title,
1294
- bottomText,
1295
- showError,
1296
- errorMessage,
1255
+ required,
1256
+ label,
1257
+ error,
1297
1258
  placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
1298
1259
  disabled,
1299
1260
  defaultValue,
@@ -1303,10 +1264,8 @@ function DatePickerBasic({
1303
1264
  className,
1304
1265
  size
1305
1266
  }) {
1306
- const dateFormat = "DD/MM/YYYY";
1307
- import_dayjs.default.locale("th_TH");
1308
- return /* @__PURE__ */ jsx21(
1309
- ConfigProvider5,
1267
+ return /* @__PURE__ */ jsx22(
1268
+ ConfigProvider6,
1310
1269
  {
1311
1270
  locale: thTH,
1312
1271
  theme: {
@@ -1315,56 +1274,57 @@ function DatePickerBasic({
1315
1274
  fontSize: 16
1316
1275
  }
1317
1276
  },
1318
- children: /* @__PURE__ */ jsxs17("div", { className: "container-input", children: [
1319
- /* @__PURE__ */ jsxs17("div", { children: [
1320
- /* @__PURE__ */ jsx21("span", { className: "body-1", children: title }),
1321
- " ",
1322
- require2 && /* @__PURE__ */ jsx21("span", { className: "text-red-500", children: "*" })
1277
+ children: /* @__PURE__ */ jsxs18("div", { className: "container-input", children: [
1278
+ /* @__PURE__ */ jsxs18("div", { children: [
1279
+ /* @__PURE__ */ jsx22("span", { className: "body-1", children: label }),
1280
+ required && /* @__PURE__ */ jsx22("span", { className: "text-red-500", children: "*" })
1323
1281
  ] }),
1324
- /* @__PURE__ */ jsx21(
1282
+ /* @__PURE__ */ jsx22(
1325
1283
  DatePicker,
1326
1284
  {
1327
1285
  className: `body-1 w-full ${className ?? ""}`,
1328
- value,
1286
+ value: value ? (0, import_dayjs.default)(value) : null,
1329
1287
  placeholder,
1330
- onChange,
1288
+ onChange: (date) => {
1289
+ onChange(date ? date.toDate() : null);
1290
+ },
1331
1291
  allowClear: true,
1332
1292
  disabled,
1333
- format: dateFormat,
1334
- defaultValue,
1335
- minDate,
1336
- maxDate,
1337
- disabledDate,
1338
- size
1293
+ format: (date) => date ? format(date.toDate(), "dd/MM/yyyy", { locale: thFns }).replace(
1294
+ /\d{4}$/,
1295
+ (y) => String(parseInt(y) + 543)
1296
+ ) : "",
1297
+ defaultValue: defaultValue ? (0, import_dayjs.default)(defaultValue) : null,
1298
+ disabledDate: (d) => disabledDate ? disabledDate(d.toDate()) : false,
1299
+ minDate: minDate ? (0, import_dayjs.default)(minDate) : void 0,
1300
+ maxDate: maxDate ? (0, import_dayjs.default)(maxDate) : void 0,
1301
+ size,
1302
+ locale: buddhistLocale
1339
1303
  }
1340
1304
  ),
1341
- /* @__PURE__ */ jsxs17("div", { children: [
1342
- /* @__PURE__ */ jsx21("p", { className: "caption-1 text-gray-500", children: bottomText }),
1343
- " ",
1344
- showError && /* @__PURE__ */ jsx21("p", { className: "caption-1 text-red-500 ", children: errorMessage })
1345
- ] })
1305
+ error && /* @__PURE__ */ jsx22("p", { className: "text-red-500 caption-1", children: error })
1346
1306
  ] })
1347
1307
  }
1348
1308
  );
1349
1309
  }
1350
1310
 
1351
1311
  // src/DatePicker/DatePickerRangePicker/DatePickerRangePicker.tsx
1352
- var import_th3 = __toESM(require_th());
1353
- var import_customParseFormat = __toESM(require_customParseFormat());
1312
+ var import_th2 = __toESM(require_th());
1354
1313
  var import_dayjs2 = __toESM(require_dayjs_min());
1355
- import { ConfigProvider as ConfigProvider6, DatePicker as DatePicker2 } from "antd";
1314
+ var import_buddhistEra2 = __toESM(require_buddhistEra());
1315
+ import { ConfigProvider as ConfigProvider7, DatePicker as DatePicker2 } from "antd";
1356
1316
  import thTH2 from "antd/locale/th_TH";
1357
- import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
1358
- import_dayjs2.default.extend(import_customParseFormat.default);
1317
+ import { format as format2 } from "date-fns";
1318
+ import { th as thFns2 } from "date-fns/locale";
1319
+ import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
1320
+ import_dayjs2.default.extend(import_buddhistEra2.default);
1359
1321
  function DatePickerRangePicker({
1360
1322
  value,
1361
1323
  onChange,
1362
1324
  placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
1363
- title,
1364
- require: require2,
1365
- bottomText,
1366
- showError,
1367
- errorMessage,
1325
+ label,
1326
+ required,
1327
+ error,
1368
1328
  disabled,
1369
1329
  minDate,
1370
1330
  maxDate,
@@ -1374,10 +1334,8 @@ function DatePickerRangePicker({
1374
1334
  onOpenChange,
1375
1335
  onCalendarChange
1376
1336
  }) {
1377
- const dateFormat = "DD/MM/YYYY";
1378
- import_dayjs2.default.locale("th_TH");
1379
- return /* @__PURE__ */ jsx22(
1380
- ConfigProvider6,
1337
+ return /* @__PURE__ */ jsx23(
1338
+ ConfigProvider7,
1381
1339
  {
1382
1340
  locale: thTH2,
1383
1341
  theme: {
@@ -1386,133 +1344,178 @@ function DatePickerRangePicker({
1386
1344
  fontSize: 16
1387
1345
  }
1388
1346
  },
1389
- children: /* @__PURE__ */ jsxs18("div", { className: "container-input", children: [
1390
- /* @__PURE__ */ jsxs18("div", { children: [
1391
- /* @__PURE__ */ jsx22("span", { className: "body-1", children: title }),
1347
+ children: /* @__PURE__ */ jsxs19("div", { className: "container-input", children: [
1348
+ /* @__PURE__ */ jsxs19("div", { children: [
1349
+ /* @__PURE__ */ jsx23("span", { className: "body-1", children: label }),
1392
1350
  " ",
1393
- require2 && /* @__PURE__ */ jsx22("span", { className: "text-red-500", children: "*" })
1351
+ required && /* @__PURE__ */ jsx23("span", { className: "text-red-500", children: "*" })
1394
1352
  ] }),
1395
- /* @__PURE__ */ jsx22(
1353
+ /* @__PURE__ */ jsx23(
1396
1354
  DatePicker2.RangePicker,
1397
1355
  {
1398
- format: dateFormat,
1399
- value,
1356
+ format: (date) => date ? format2(date.toDate(), "dd/MM/yyyy", { locale: thFns2 }).replace(
1357
+ /\d{4}$/,
1358
+ (y) => String(parseInt(y) + 543)
1359
+ ) : "",
1360
+ value: value ? [
1361
+ value[0] ? (0, import_dayjs2.default)(value[0]) : null,
1362
+ value[1] ? (0, import_dayjs2.default)(value[1]) : null
1363
+ ] : null,
1400
1364
  placeholder,
1401
1365
  className: `body-1 w-full ${className ?? ""}`,
1402
- onChange,
1366
+ onChange: (dates, dateStrings) => {
1367
+ if (!dates) {
1368
+ onChange(null);
1369
+ } else {
1370
+ onChange([
1371
+ dates[0] ? dates[0].toDate() : null,
1372
+ dates[1] ? dates[1].toDate() : null
1373
+ ]);
1374
+ }
1375
+ },
1403
1376
  allowClear: true,
1404
1377
  disabled,
1405
- minDate,
1406
- maxDate,
1407
- disabledDate,
1378
+ disabledDate: (d) => disabledDate ? disabledDate(d.toDate()) : false,
1379
+ minDate: minDate ? (0, import_dayjs2.default)(minDate) : void 0,
1380
+ maxDate: maxDate ? (0, import_dayjs2.default)(maxDate) : void 0,
1408
1381
  size,
1409
1382
  onOpenChange,
1410
- onCalendarChange
1383
+ onCalendarChange: (dates, dateStrings, info) => {
1384
+ if (!dates) {
1385
+ onCalendarChange?.([null, null], dateStrings, info);
1386
+ } else {
1387
+ onCalendarChange?.(
1388
+ [
1389
+ dates[0] ? dates[0].toDate() : null,
1390
+ dates[1] ? dates[1].toDate() : null
1391
+ ],
1392
+ dateStrings,
1393
+ info
1394
+ );
1395
+ }
1396
+ },
1397
+ locale: buddhistLocale
1411
1398
  }
1412
1399
  ),
1413
- /* @__PURE__ */ jsxs18("div", { children: [
1414
- /* @__PURE__ */ jsx22("p", { className: "caption-1 text-gray-500", children: bottomText }),
1415
- " ",
1416
- showError && /* @__PURE__ */ jsx22("p", { className: "caption-1 text-red-500 ", children: errorMessage })
1417
- ] })
1400
+ error && /* @__PURE__ */ jsx23("p", { className: "text-red-500 caption-1", children: error })
1418
1401
  ] })
1419
1402
  }
1420
1403
  );
1421
1404
  }
1422
1405
 
1423
1406
  // src/TimePicker/TimePickerBasic/TimePickerBasic.tsx
1424
- import { ConfigProvider as ConfigProvider7, TimePicker } from "antd";
1425
- import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
1426
- function TimePickerBasic({ value, onChange, require: require2, title, bottomText, showError, errorMessage, placeholder, disabled, className }) {
1427
- return /* @__PURE__ */ jsx23(
1428
- ConfigProvider7,
1407
+ var import_dayjs3 = __toESM(require_dayjs_min());
1408
+ import { ConfigProvider as ConfigProvider8, TimePicker } from "antd";
1409
+ import thTH3 from "antd/locale/th_TH";
1410
+ import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
1411
+ function TimePickerBasic({
1412
+ value,
1413
+ onChange,
1414
+ required,
1415
+ label,
1416
+ error,
1417
+ placeholder,
1418
+ disabled,
1419
+ className
1420
+ }) {
1421
+ return /* @__PURE__ */ jsx24(
1422
+ ConfigProvider8,
1429
1423
  {
1424
+ locale: thTH3,
1430
1425
  theme: {
1431
1426
  token: {
1432
1427
  fontFamily: "Kanit"
1433
1428
  }
1434
1429
  },
1435
- children: /* @__PURE__ */ jsxs19("div", { className: "container-input", children: [
1436
- /* @__PURE__ */ jsxs19("div", { children: [
1437
- /* @__PURE__ */ jsx23("span", { className: "body-1", children: title }),
1430
+ children: /* @__PURE__ */ jsxs20("div", { className: "container-input", children: [
1431
+ /* @__PURE__ */ jsxs20("div", { children: [
1432
+ /* @__PURE__ */ jsx24("span", { className: "body-1", children: label }),
1438
1433
  " ",
1439
- require2 && /* @__PURE__ */ jsx23("span", { className: "text-red-500", children: "*" })
1434
+ required && /* @__PURE__ */ jsx24("span", { className: "text-red-500", children: "*" })
1440
1435
  ] }),
1441
- /* @__PURE__ */ jsx23(
1436
+ /* @__PURE__ */ jsx24(
1442
1437
  TimePicker,
1443
1438
  {
1444
1439
  format: "HH:mm",
1445
1440
  className: `body-1 w-full ${className ?? ""}`,
1446
- value,
1441
+ value: value ? (0, import_dayjs3.default)(value) : null,
1447
1442
  placeholder,
1448
- onChange,
1443
+ onChange: (time) => {
1444
+ onChange(time ? time.toDate() : null);
1445
+ },
1449
1446
  allowClear: true,
1450
1447
  disabled
1451
1448
  }
1452
1449
  ),
1453
- /* @__PURE__ */ jsxs19("div", { children: [
1454
- /* @__PURE__ */ jsx23("p", { className: "caption-1 text-gray-500", children: bottomText }),
1455
- " ",
1456
- showError && /* @__PURE__ */ jsx23("p", { className: "caption-1 text-red-500 ", children: errorMessage })
1457
- ] })
1450
+ error && /* @__PURE__ */ jsx24("p", { className: "text-red-500 caption-1", children: error })
1458
1451
  ] })
1459
1452
  }
1460
1453
  );
1461
1454
  }
1462
1455
 
1463
1456
  // src/TimePicker/TimePickerRangePicker/TimerPickerRangePicker.tsx
1464
- import { ConfigProvider as ConfigProvider8, TimePicker as TimePicker2 } from "antd";
1465
- import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
1457
+ var import_dayjs4 = __toESM(require_dayjs_min());
1458
+ import { ConfigProvider as ConfigProvider9, TimePicker as TimePicker2 } from "antd";
1459
+ import thTH4 from "antd/locale/th_TH";
1460
+ import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
1466
1461
  function TimePickerRangePicker({
1467
1462
  value,
1468
1463
  onChange,
1469
1464
  placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
1470
- title,
1471
- require: require2,
1472
- bottomText,
1473
- showError,
1474
- errorMessage,
1465
+ label,
1466
+ required,
1467
+ error,
1475
1468
  disabled,
1476
1469
  className
1477
1470
  }) {
1478
- return /* @__PURE__ */ jsx24(
1479
- ConfigProvider8,
1471
+ return /* @__PURE__ */ jsx25(
1472
+ ConfigProvider9,
1480
1473
  {
1474
+ locale: thTH4,
1481
1475
  theme: {
1482
1476
  token: {
1483
1477
  fontFamily: "Kanit"
1484
1478
  }
1485
1479
  },
1486
- children: /* @__PURE__ */ jsxs20("div", { className: "container-input", children: [
1487
- /* @__PURE__ */ jsxs20("div", { children: [
1488
- /* @__PURE__ */ jsx24("span", { className: "body-1", children: title }),
1480
+ children: /* @__PURE__ */ jsxs21("div", { className: "container-input", children: [
1481
+ /* @__PURE__ */ jsxs21("div", { children: [
1482
+ /* @__PURE__ */ jsx25("span", { className: "body-1", children: label }),
1489
1483
  " ",
1490
- require2 && /* @__PURE__ */ jsx24("span", { className: "text-red-500", children: "*" })
1484
+ required && /* @__PURE__ */ jsx25("span", { className: "text-red-500", children: "*" })
1491
1485
  ] }),
1492
- /* @__PURE__ */ jsx24(
1486
+ /* @__PURE__ */ jsx25(
1493
1487
  TimePicker2.RangePicker,
1494
1488
  {
1495
1489
  format: "HH:mm",
1496
- value,
1490
+ value: value ? [
1491
+ value[0] ? (0, import_dayjs4.default)(value[0]) : null,
1492
+ value[1] ? (0, import_dayjs4.default)(value[1]) : null
1493
+ ] : null,
1497
1494
  placeholder,
1498
1495
  className: `body-1 w-full ${className ?? ""}`,
1499
- onChange,
1496
+ onChange: (dates, dateStrings) => {
1497
+ if (!dates) {
1498
+ onChange(null);
1499
+ } else {
1500
+ onChange([
1501
+ dates[0] ? dates[0].toDate() : null,
1502
+ dates[1] ? dates[1].toDate() : null
1503
+ ]);
1504
+ }
1505
+ },
1500
1506
  allowClear: true,
1501
- disabled
1507
+ disabled,
1508
+ showNow: true
1502
1509
  }
1503
1510
  ),
1504
- /* @__PURE__ */ jsxs20("div", { children: [
1505
- /* @__PURE__ */ jsx24("p", { className: "caption-1 text-gray-500", children: bottomText }),
1506
- " ",
1507
- showError && /* @__PURE__ */ jsx24("p", { className: "caption-1 text-red-500 ", children: errorMessage })
1508
- ] })
1511
+ error && /* @__PURE__ */ jsx25("p", { className: "text-red-500 caption-1", children: error })
1509
1512
  ] })
1510
1513
  }
1511
1514
  );
1512
1515
  }
1513
1516
 
1514
1517
  // src/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
1515
- import { ConfigProvider as ConfigProvider9, ColorPicker as ColorPicker2, theme } from "antd";
1518
+ import { ConfigProvider as ConfigProvider10, ColorPicker as ColorPicker2, theme } from "antd";
1516
1519
 
1517
1520
  // node_modules/@babel/runtime/helpers/esm/typeof.js
1518
1521
  function _typeof(o) {
@@ -2214,7 +2217,7 @@ var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a"
2214
2217
  greyDark.primary = greyDark[5];
2215
2218
 
2216
2219
  // src/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
2217
- import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
2220
+ import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
2218
2221
  function genPresets(presets = presetPalettes) {
2219
2222
  return Object.entries(presets).map(([label, colors]) => ({
2220
2223
  label,
@@ -2225,11 +2228,9 @@ function genPresets(presets = presetPalettes) {
2225
2228
  function ColorPalettePickerBasic({
2226
2229
  value,
2227
2230
  onChange,
2228
- require: require2,
2229
- title,
2230
- bottomText,
2231
- showError,
2232
- errorMessage,
2231
+ required,
2232
+ label,
2233
+ error,
2233
2234
  disabled,
2234
2235
  allowClear,
2235
2236
  defaultFormat,
@@ -2243,8 +2244,8 @@ function ColorPalettePickerBasic({
2243
2244
  red,
2244
2245
  green
2245
2246
  });
2246
- return /* @__PURE__ */ jsx25(
2247
- ConfigProvider9,
2247
+ return /* @__PURE__ */ jsx26(
2248
+ ConfigProvider10,
2248
2249
  {
2249
2250
  theme: {
2250
2251
  token: {
@@ -2252,13 +2253,13 @@ function ColorPalettePickerBasic({
2252
2253
  fontSize: 16
2253
2254
  }
2254
2255
  },
2255
- children: /* @__PURE__ */ jsxs21("div", { className: "container-input", children: [
2256
- /* @__PURE__ */ jsxs21("div", { children: [
2257
- /* @__PURE__ */ jsx25("span", { className: "body-1", children: title }),
2256
+ children: /* @__PURE__ */ jsxs22("div", { className: "container-input", children: [
2257
+ /* @__PURE__ */ jsxs22("div", { children: [
2258
+ /* @__PURE__ */ jsx26("span", { className: "body-1", children: label }),
2258
2259
  " ",
2259
- require2 && /* @__PURE__ */ jsx25("span", { className: "text-red-500", children: "*" })
2260
+ required && /* @__PURE__ */ jsx26("span", { className: "text-red-500", children: "*" })
2260
2261
  ] }),
2261
- /* @__PURE__ */ jsx25(
2262
+ /* @__PURE__ */ jsx26(
2262
2263
  ColorPicker2,
2263
2264
  {
2264
2265
  defaultFormat,
@@ -2271,9 +2272,9 @@ function ColorPalettePickerBasic({
2271
2272
  showText: (color) => {
2272
2273
  const hex = color.toHexString();
2273
2274
  if (!value) {
2274
- return /* @__PURE__ */ jsx25("span", { children: placeholder });
2275
+ return /* @__PURE__ */ jsx26("span", { children: placeholder });
2275
2276
  }
2276
- return /* @__PURE__ */ jsxs21("span", { children: [
2277
+ return /* @__PURE__ */ jsxs22("span", { children: [
2277
2278
  "(",
2278
2279
  hex,
2279
2280
  ")"
@@ -2283,28 +2284,22 @@ function ColorPalettePickerBasic({
2283
2284
  onClear
2284
2285
  }
2285
2286
  ),
2286
- /* @__PURE__ */ jsxs21("div", { children: [
2287
- /* @__PURE__ */ jsx25("p", { className: "caption-1 text-gray-500", children: bottomText }),
2288
- " ",
2289
- showError && /* @__PURE__ */ jsx25("p", { className: "caption-1 text-red-500 ", children: errorMessage })
2290
- ] })
2287
+ error && /* @__PURE__ */ jsx26("p", { className: "text-red-500 caption-1", children: error })
2291
2288
  ] })
2292
2289
  }
2293
2290
  );
2294
2291
  }
2295
2292
 
2296
2293
  // src/Select/SelectField/SelectField.tsx
2297
- import { Select, ConfigProvider as ConfigProvider10 } from "antd";
2298
- import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
2294
+ import { Select, ConfigProvider as ConfigProvider11 } from "antd";
2295
+ import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
2299
2296
  function SelectField({
2300
2297
  value,
2301
2298
  onChange,
2302
2299
  placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
2303
- title,
2304
- require: require2,
2305
- bottomText,
2306
- showError,
2307
- errorMessage,
2300
+ label,
2301
+ required,
2302
+ error,
2308
2303
  disabled,
2309
2304
  defaultValue,
2310
2305
  options,
@@ -2315,8 +2310,8 @@ function SelectField({
2315
2310
  className,
2316
2311
  onClear
2317
2312
  }) {
2318
- return /* @__PURE__ */ jsx26(
2319
- ConfigProvider10,
2313
+ return /* @__PURE__ */ jsx27(
2314
+ ConfigProvider11,
2320
2315
  {
2321
2316
  theme: {
2322
2317
  token: {
@@ -2324,13 +2319,13 @@ function SelectField({
2324
2319
  fontSize: 16
2325
2320
  }
2326
2321
  },
2327
- children: /* @__PURE__ */ jsxs22("div", { className: "container-input", children: [
2328
- /* @__PURE__ */ jsxs22("div", { children: [
2329
- /* @__PURE__ */ jsx26("span", { className: "body-1", children: title }),
2322
+ children: /* @__PURE__ */ jsxs23("div", { className: "container-input", children: [
2323
+ /* @__PURE__ */ jsxs23("div", { children: [
2324
+ /* @__PURE__ */ jsx27("span", { className: "body-1", children: label }),
2330
2325
  " ",
2331
- require2 && /* @__PURE__ */ jsx26("span", { className: "text-red-500", children: "*" })
2326
+ required && /* @__PURE__ */ jsx27("span", { className: "text-red-500", children: "*" })
2332
2327
  ] }),
2333
- /* @__PURE__ */ jsx26(
2328
+ /* @__PURE__ */ jsx27(
2334
2329
  Select,
2335
2330
  {
2336
2331
  showSearch: true,
@@ -2345,33 +2340,27 @@ function SelectField({
2345
2340
  options,
2346
2341
  mode,
2347
2342
  onSearch: handleSearch,
2348
- prefix: prefix ? /* @__PURE__ */ jsx26("span", { style: { width: prefixSize, height: prefixSize, display: "flex", alignItems: "center", justifyContent: "center" }, children: prefix }) : void 0,
2343
+ prefix: prefix ? /* @__PURE__ */ jsx27("span", { style: { width: prefixSize, height: prefixSize, display: "flex", alignItems: "center", justifyContent: "center" }, children: prefix }) : void 0,
2349
2344
  allowClear: true,
2350
2345
  onClear
2351
2346
  }
2352
2347
  ),
2353
- /* @__PURE__ */ jsxs22("div", { children: [
2354
- /* @__PURE__ */ jsx26("p", { className: "caption-1 text-gray-500", children: bottomText }),
2355
- " ",
2356
- showError && /* @__PURE__ */ jsx26("p", { className: "caption-1 text-red-500 ", children: errorMessage })
2357
- ] })
2348
+ error && /* @__PURE__ */ jsx27("p", { className: "text-red-500 caption-1", children: error })
2358
2349
  ] })
2359
2350
  }
2360
2351
  );
2361
2352
  }
2362
2353
 
2363
2354
  // src/Select/SelectFieldGroup/SelectFieldGroup.tsx
2364
- import { Select as Select2, ConfigProvider as ConfigProvider11 } from "antd";
2365
- import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
2355
+ import { Select as Select2, ConfigProvider as ConfigProvider12 } from "antd";
2356
+ import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
2366
2357
  function SelectFieldGroup({
2367
2358
  value,
2368
2359
  onChange,
2369
2360
  placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
2370
- title,
2371
- require: require2,
2372
- bottomText,
2373
- showError,
2374
- errorMessage,
2361
+ label,
2362
+ required,
2363
+ error,
2375
2364
  disabled,
2376
2365
  defaultValue,
2377
2366
  options,
@@ -2381,21 +2370,21 @@ function SelectFieldGroup({
2381
2370
  handleSearch,
2382
2371
  className
2383
2372
  }) {
2384
- return /* @__PURE__ */ jsx27(
2385
- ConfigProvider11,
2373
+ return /* @__PURE__ */ jsx28(
2374
+ ConfigProvider12,
2386
2375
  {
2387
2376
  theme: {
2388
2377
  token: {
2389
2378
  fontFamily: "Kanit"
2390
2379
  }
2391
2380
  },
2392
- children: /* @__PURE__ */ jsxs23("div", { className: "container-input", children: [
2393
- /* @__PURE__ */ jsxs23("div", { children: [
2394
- /* @__PURE__ */ jsx27("span", { className: "body-1", children: title }),
2381
+ children: /* @__PURE__ */ jsxs24("div", { className: "container-input", children: [
2382
+ /* @__PURE__ */ jsxs24("div", { children: [
2383
+ /* @__PURE__ */ jsx28("span", { className: "body-1", children: label }),
2395
2384
  " ",
2396
- require2 && /* @__PURE__ */ jsx27("span", { className: "text-red-500", children: "*" })
2385
+ required && /* @__PURE__ */ jsx28("span", { className: "text-red-500", children: "*" })
2397
2386
  ] }),
2398
- /* @__PURE__ */ jsx27(
2387
+ /* @__PURE__ */ jsx28(
2399
2388
  Select2,
2400
2389
  {
2401
2390
  showSearch: true,
@@ -2410,7 +2399,7 @@ function SelectFieldGroup({
2410
2399
  options,
2411
2400
  mode,
2412
2401
  onSearch: handleSearch,
2413
- prefix: prefix ? /* @__PURE__ */ jsx27(
2402
+ prefix: prefix ? /* @__PURE__ */ jsx28(
2414
2403
  "span",
2415
2404
  {
2416
2405
  style: {
@@ -2426,18 +2415,14 @@ function SelectFieldGroup({
2426
2415
  allowClear: true
2427
2416
  }
2428
2417
  ),
2429
- /* @__PURE__ */ jsxs23("div", { children: [
2430
- /* @__PURE__ */ jsx27("p", { className: "caption-1 text-gray-500", children: bottomText }),
2431
- " ",
2432
- showError && /* @__PURE__ */ jsx27("p", { className: "caption-1 text-red-500 ", children: errorMessage })
2433
- ] })
2418
+ error && /* @__PURE__ */ jsx28("p", { className: "text-red-500 caption-1", children: error })
2434
2419
  ] })
2435
2420
  }
2436
2421
  );
2437
2422
  }
2438
2423
 
2439
2424
  // src/Select/SelectFieldStatus/SelectFieldStatus.tsx
2440
- import { Select as Select3, ConfigProvider as ConfigProvider12 } from "antd";
2425
+ import { Select as Select3, ConfigProvider as ConfigProvider13 } from "antd";
2441
2426
 
2442
2427
  // src/Select/SelectFieldStatus/StatusMockup.ts
2443
2428
  var status = [
@@ -2450,23 +2435,21 @@ var status = [
2450
2435
 
2451
2436
  // src/Select/SelectFieldStatus/SelectFieldStatus.tsx
2452
2437
  import { DownOutlined } from "@ant-design/icons";
2453
- import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
2438
+ import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
2454
2439
  function SelectFieldStatus({
2455
2440
  value,
2456
2441
  onChange,
2457
2442
  placeholder,
2458
- title,
2459
- require: require2,
2460
- bottomText,
2443
+ label,
2444
+ required,
2461
2445
  disabled,
2462
- showError,
2463
- errorMessage,
2446
+ error,
2464
2447
  options,
2465
2448
  className
2466
2449
  }) {
2467
2450
  const selectedItem = status.find((s) => s.value === value);
2468
- return /* @__PURE__ */ jsx28(
2469
- ConfigProvider12,
2451
+ return /* @__PURE__ */ jsx29(
2452
+ ConfigProvider13,
2470
2453
  {
2471
2454
  theme: {
2472
2455
  components: {
@@ -2481,17 +2464,17 @@ function SelectFieldStatus({
2481
2464
  fontFamily: "Kanit"
2482
2465
  }
2483
2466
  },
2484
- children: /* @__PURE__ */ jsxs24("div", { className: "container-input", children: [
2485
- /* @__PURE__ */ jsxs24("div", { children: [
2486
- /* @__PURE__ */ jsx28("span", { className: "body-1", children: title }),
2467
+ children: /* @__PURE__ */ jsxs25("div", { className: "container-input", children: [
2468
+ /* @__PURE__ */ jsxs25("div", { children: [
2469
+ /* @__PURE__ */ jsx29("span", { className: "body-1", children: label }),
2487
2470
  " ",
2488
- require2 && /* @__PURE__ */ jsx28("span", { className: "text-red-500", children: "*" })
2471
+ required && /* @__PURE__ */ jsx29("span", { className: "text-red-500", children: "*" })
2489
2472
  ] }),
2490
- /* @__PURE__ */ jsx28(
2473
+ /* @__PURE__ */ jsx29(
2491
2474
  Select3,
2492
2475
  {
2493
2476
  disabled,
2494
- suffixIcon: /* @__PURE__ */ jsx28(DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
2477
+ suffixIcon: /* @__PURE__ */ jsx29(DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
2495
2478
  value,
2496
2479
  onChange,
2497
2480
  className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
@@ -2502,18 +2485,14 @@ function SelectFieldStatus({
2502
2485
  showSearch: true
2503
2486
  }
2504
2487
  ),
2505
- /* @__PURE__ */ jsxs24("div", { children: [
2506
- /* @__PURE__ */ jsx28("p", { className: "caption-1 text-gray-500", children: bottomText }),
2507
- " ",
2508
- showError && /* @__PURE__ */ jsx28("p", { className: "caption-1 text-red-500 ", children: errorMessage })
2509
- ] })
2488
+ error && /* @__PURE__ */ jsx29("p", { className: "text-red-500 caption-1", children: error })
2510
2489
  ] })
2511
2490
  }
2512
2491
  );
2513
2492
  }
2514
2493
 
2515
2494
  // src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
2516
- import { Select as Select4, ConfigProvider as ConfigProvider13 } from "antd";
2495
+ import { Select as Select4, ConfigProvider as ConfigProvider14 } from "antd";
2517
2496
 
2518
2497
  // src/Select/SelectFieldStatusReport/StatusReportMockup.ts
2519
2498
  var status2 = [
@@ -2523,23 +2502,21 @@ var status2 = [
2523
2502
 
2524
2503
  // src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
2525
2504
  import { DownOutlined as DownOutlined2 } from "@ant-design/icons";
2526
- import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
2505
+ import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
2527
2506
  function SelectFieldStatusReport({
2528
2507
  value,
2529
2508
  onChange,
2530
2509
  placeholder,
2531
- title,
2532
- require: require2,
2533
- bottomText,
2510
+ label,
2511
+ required,
2534
2512
  disabled,
2535
- showError,
2536
- errorMessage,
2513
+ error,
2537
2514
  className,
2538
2515
  options
2539
2516
  }) {
2540
2517
  const selectedItem = status2.find((s) => s.value === value);
2541
- return /* @__PURE__ */ jsx29(
2542
- ConfigProvider13,
2518
+ return /* @__PURE__ */ jsx30(
2519
+ ConfigProvider14,
2543
2520
  {
2544
2521
  theme: {
2545
2522
  components: {
@@ -2554,17 +2531,17 @@ function SelectFieldStatusReport({
2554
2531
  fontFamily: "Kanit"
2555
2532
  }
2556
2533
  },
2557
- children: /* @__PURE__ */ jsxs25("div", { className: "container-input", children: [
2558
- /* @__PURE__ */ jsxs25("div", { children: [
2559
- /* @__PURE__ */ jsx29("span", { className: "body-1", children: title }),
2534
+ children: /* @__PURE__ */ jsxs26("div", { className: "container-input", children: [
2535
+ /* @__PURE__ */ jsxs26("div", { children: [
2536
+ /* @__PURE__ */ jsx30("span", { className: "body-1", children: label }),
2560
2537
  " ",
2561
- require2 && /* @__PURE__ */ jsx29("span", { className: "text-red-500", children: "*" })
2538
+ required && /* @__PURE__ */ jsx30("span", { className: "text-red-500", children: "*" })
2562
2539
  ] }),
2563
- /* @__PURE__ */ jsx29(
2540
+ /* @__PURE__ */ jsx30(
2564
2541
  Select4,
2565
2542
  {
2566
2543
  disabled,
2567
- suffixIcon: /* @__PURE__ */ jsx29(DownOutlined2, { style: { color: value ? "#fff" : "#D9D9D9" } }),
2544
+ suffixIcon: /* @__PURE__ */ jsx30(DownOutlined2, { style: { color: value ? "#fff" : "#D9D9D9" } }),
2568
2545
  value,
2569
2546
  onChange,
2570
2547
  className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
@@ -2575,28 +2552,22 @@ function SelectFieldStatusReport({
2575
2552
  showSearch: true
2576
2553
  }
2577
2554
  ),
2578
- /* @__PURE__ */ jsxs25("div", { children: [
2579
- /* @__PURE__ */ jsx29("p", { className: "caption-1 text-gray-500", children: bottomText }),
2580
- " ",
2581
- showError && /* @__PURE__ */ jsx29("p", { className: "caption-1 text-red-500 ", children: errorMessage })
2582
- ] })
2555
+ error && /* @__PURE__ */ jsx30("p", { className: "text-red-500 caption-1", children: error })
2583
2556
  ] })
2584
2557
  }
2585
2558
  );
2586
2559
  }
2587
2560
 
2588
2561
  // src/Select/SelectFieldTag/SelectFieldTag.tsx
2589
- import { Select as Select5, ConfigProvider as ConfigProvider14 } from "antd";
2562
+ import { Select as Select5, ConfigProvider as ConfigProvider15 } from "antd";
2590
2563
  import { useState as useState6 } from "react";
2591
- import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
2564
+ import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
2592
2565
  function SelectFieldTag({
2593
- title,
2594
- require: require2,
2595
- bottomText,
2566
+ label,
2567
+ required,
2596
2568
  placeholder,
2597
2569
  options,
2598
- showError,
2599
- errorMessage,
2570
+ error,
2600
2571
  value: controlledValue,
2601
2572
  className,
2602
2573
  onChange,
@@ -2623,21 +2594,21 @@ function SelectFieldTag({
2623
2594
  }
2624
2595
  onChange?.([]);
2625
2596
  };
2626
- return /* @__PURE__ */ jsx30(
2627
- ConfigProvider14,
2597
+ return /* @__PURE__ */ jsx31(
2598
+ ConfigProvider15,
2628
2599
  {
2629
2600
  theme: {
2630
2601
  token: {
2631
2602
  fontFamily: "Kanit"
2632
2603
  }
2633
2604
  },
2634
- children: /* @__PURE__ */ jsxs26("div", { className: "container-input", children: [
2635
- /* @__PURE__ */ jsxs26("div", { children: [
2636
- /* @__PURE__ */ jsx30("span", { className: "body-1", children: title }),
2605
+ children: /* @__PURE__ */ jsxs27("div", { className: "container-input", children: [
2606
+ /* @__PURE__ */ jsxs27("div", { children: [
2607
+ /* @__PURE__ */ jsx31("span", { className: "body-1", children: label }),
2637
2608
  " ",
2638
- require2 && /* @__PURE__ */ jsx30("span", { className: "text-red-500", children: "*" })
2609
+ required && /* @__PURE__ */ jsx31("span", { className: "text-red-500", children: "*" })
2639
2610
  ] }),
2640
- /* @__PURE__ */ jsx30(
2611
+ /* @__PURE__ */ jsx31(
2641
2612
  Select5,
2642
2613
  {
2643
2614
  mode: "tags",
@@ -2656,11 +2627,7 @@ function SelectFieldTag({
2656
2627
  onClear
2657
2628
  }
2658
2629
  ),
2659
- /* @__PURE__ */ jsxs26("div", { children: [
2660
- /* @__PURE__ */ jsx30("p", { className: "caption-1 text-gray-500", children: bottomText }),
2661
- " ",
2662
- showError && /* @__PURE__ */ jsx30("p", { className: "caption-1 text-red-500 ", children: errorMessage })
2663
- ] })
2630
+ error && /* @__PURE__ */ jsx31("p", { className: "text-red-500 caption-1", children: error })
2664
2631
  ] })
2665
2632
  }
2666
2633
  );
@@ -2668,18 +2635,16 @@ function SelectFieldTag({
2668
2635
 
2669
2636
  // src/Select/SelectCustom/SelectCustom.tsx
2670
2637
  import { IconTrash } from "@tabler/icons-react";
2671
- import { Select as Select6, ConfigProvider as ConfigProvider15 } from "antd";
2638
+ import { Select as Select6, ConfigProvider as ConfigProvider16 } from "antd";
2672
2639
  import { useState as useState7 } from "react";
2673
- import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
2640
+ import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
2674
2641
  function SelectCustom({
2675
- title = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
2642
+ label = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
2676
2643
  placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01",
2677
2644
  options,
2678
- require: require2 = false,
2645
+ required = false,
2679
2646
  onChange,
2680
- bottomText,
2681
- showError,
2682
- errorMessage,
2647
+ error,
2683
2648
  onClear
2684
2649
  }) {
2685
2650
  const [value, setValue] = useState7([]);
@@ -2701,8 +2666,8 @@ function SelectCustom({
2701
2666
  });
2702
2667
  };
2703
2668
  const filteredOptions = options.filter((opt) => !valueList.includes(opt.value)).map((opt) => ({ value: opt.value, label: opt.label }));
2704
- return /* @__PURE__ */ jsx31(
2705
- ConfigProvider15,
2669
+ return /* @__PURE__ */ jsx32(
2670
+ ConfigProvider16,
2706
2671
  {
2707
2672
  theme: {
2708
2673
  token: {
@@ -2710,13 +2675,13 @@ function SelectCustom({
2710
2675
  fontSize: 16
2711
2676
  }
2712
2677
  },
2713
- children: /* @__PURE__ */ jsxs27("div", { className: "container-input", children: [
2714
- /* @__PURE__ */ jsxs27("div", { children: [
2715
- /* @__PURE__ */ jsx31("span", { className: "body-1", children: title }),
2678
+ children: /* @__PURE__ */ jsxs28("div", { className: "container-input", children: [
2679
+ /* @__PURE__ */ jsxs28("div", { children: [
2680
+ /* @__PURE__ */ jsx32("span", { className: "body-1", children: label }),
2716
2681
  " ",
2717
- require2 && /* @__PURE__ */ jsx31("span", { className: "text-red-500", children: "*" })
2682
+ required && /* @__PURE__ */ jsx32("span", { className: "text-red-500", children: "*" })
2718
2683
  ] }),
2719
- /* @__PURE__ */ jsx31(
2684
+ /* @__PURE__ */ jsx32(
2720
2685
  Select6,
2721
2686
  {
2722
2687
  value,
@@ -2727,24 +2692,20 @@ function SelectCustom({
2727
2692
  onClear
2728
2693
  }
2729
2694
  ),
2730
- /* @__PURE__ */ jsxs27("div", { children: [
2731
- /* @__PURE__ */ jsx31("p", { className: "caption-1 text-gray-500", children: bottomText }),
2732
- " ",
2733
- showError && /* @__PURE__ */ jsx31("p", { className: "caption-1 text-red-500 ", children: errorMessage })
2734
- ] }),
2735
- /* @__PURE__ */ jsx31("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ jsxs27(
2695
+ error && /* @__PURE__ */ jsx32("p", { className: "text-red-500 caption-1", children: error }),
2696
+ /* @__PURE__ */ jsx32("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ jsxs28(
2736
2697
  "div",
2737
2698
  {
2738
2699
  className: "flex justify-between items-center py-[2px] body-1",
2739
2700
  children: [
2740
- /* @__PURE__ */ jsxs27("div", { className: "flex flex-row gap-[8px]", children: [
2741
- /* @__PURE__ */ jsxs27("p", { children: [
2701
+ /* @__PURE__ */ jsxs28("div", { className: "flex flex-row gap-[8px]", children: [
2702
+ /* @__PURE__ */ jsxs28("p", { children: [
2742
2703
  index + 1,
2743
2704
  "."
2744
2705
  ] }),
2745
- /* @__PURE__ */ jsx31("p", { children: v })
2706
+ /* @__PURE__ */ jsx32("p", { children: v })
2746
2707
  ] }),
2747
- /* @__PURE__ */ jsx31(
2708
+ /* @__PURE__ */ jsx32(
2748
2709
  IconTrash,
2749
2710
  {
2750
2711
  className: "cursor-pointer",
@@ -2761,7 +2722,7 @@ function SelectCustom({
2761
2722
  }
2762
2723
 
2763
2724
  // src/SortFilter/SortFilter.tsx
2764
- import { ConfigProvider as ConfigProvider16 } from "antd";
2725
+ import { ConfigProvider as ConfigProvider17 } from "antd";
2765
2726
  import { CalendarOutlined } from "@ant-design/icons";
2766
2727
 
2767
2728
  // src/SortFilter/DataMockSortFilter.ts
@@ -2794,7 +2755,7 @@ var quarters = [
2794
2755
  // src/SortFilter/SortFilter.tsx
2795
2756
  import { useState as useState8 } from "react";
2796
2757
  import { IconSortDescending as IconSortDescending2, IconFilter } from "@tabler/icons-react";
2797
- import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
2758
+ import { jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
2798
2759
  function SortFilter({
2799
2760
  showYear = true,
2800
2761
  showQuarter = true,
@@ -2805,20 +2766,20 @@ function SortFilter({
2805
2766
  const [yearValue, setYearValue] = useState8();
2806
2767
  const [monthValue, setMonthValue] = useState8();
2807
2768
  const [quarterValue, setQuartersValue] = useState8();
2808
- return /* @__PURE__ */ jsx32(
2809
- ConfigProvider16,
2769
+ return /* @__PURE__ */ jsx33(
2770
+ ConfigProvider17,
2810
2771
  {
2811
2772
  theme: {
2812
2773
  token: {
2813
2774
  fontFamily: "Kanit"
2814
2775
  }
2815
2776
  },
2816
- children: /* @__PURE__ */ jsxs28("div", { className: "w-full flex items-center justify-between", children: [
2817
- /* @__PURE__ */ jsxs28("div", { className: "w-full flex gap-[10px]", children: [
2818
- showYear && /* @__PURE__ */ jsx32("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx32(
2777
+ children: /* @__PURE__ */ jsxs29("div", { className: "w-full flex items-center justify-between", children: [
2778
+ /* @__PURE__ */ jsxs29("div", { className: "w-full flex gap-[10px]", children: [
2779
+ showYear && /* @__PURE__ */ jsx33("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx33(
2819
2780
  SelectField,
2820
2781
  {
2821
- prefix: /* @__PURE__ */ jsx32(CalendarOutlined, {}),
2782
+ prefix: /* @__PURE__ */ jsx33(CalendarOutlined, {}),
2822
2783
  onChange: setYearValue,
2823
2784
  options: years.map((s) => ({
2824
2785
  value: s.value,
@@ -2828,10 +2789,10 @@ function SortFilter({
2828
2789
  value: yearValue
2829
2790
  }
2830
2791
  ) }),
2831
- showMonth && /* @__PURE__ */ jsx32("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx32(
2792
+ showMonth && /* @__PURE__ */ jsx33("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx33(
2832
2793
  SelectField,
2833
2794
  {
2834
- prefix: /* @__PURE__ */ jsx32(CalendarOutlined, {}),
2795
+ prefix: /* @__PURE__ */ jsx33(CalendarOutlined, {}),
2835
2796
  onChange: setMonthValue,
2836
2797
  options: months.map((s) => ({
2837
2798
  value: s.value,
@@ -2841,10 +2802,10 @@ function SortFilter({
2841
2802
  placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
2842
2803
  }
2843
2804
  ) }),
2844
- showQuarter && /* @__PURE__ */ jsx32("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx32(
2805
+ showQuarter && /* @__PURE__ */ jsx33("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx33(
2845
2806
  SelectField,
2846
2807
  {
2847
- prefix: /* @__PURE__ */ jsx32(CalendarOutlined, {}),
2808
+ prefix: /* @__PURE__ */ jsx33(CalendarOutlined, {}),
2848
2809
  onChange: setQuartersValue,
2849
2810
  options: quarters.map((s) => ({
2850
2811
  value: s.value,
@@ -2855,8 +2816,8 @@ function SortFilter({
2855
2816
  }
2856
2817
  ) })
2857
2818
  ] }),
2858
- /* @__PURE__ */ jsxs28("div", { className: "flex gap-[10px]", children: [
2859
- /* @__PURE__ */ jsx32(
2819
+ /* @__PURE__ */ jsxs29("div", { className: "flex gap-[10px]", children: [
2820
+ /* @__PURE__ */ jsx33(
2860
2821
  IconSortDescending2,
2861
2822
  {
2862
2823
  size: 24,
@@ -2864,7 +2825,7 @@ function SortFilter({
2864
2825
  onClick: onSortClick
2865
2826
  }
2866
2827
  ),
2867
- /* @__PURE__ */ jsx32(
2828
+ /* @__PURE__ */ jsx33(
2868
2829
  IconFilter,
2869
2830
  {
2870
2831
  size: 24,
@@ -2881,7 +2842,7 @@ function SortFilter({
2881
2842
  // src/Upload/FileUploader/FileUploader.tsx
2882
2843
  import { IconPaperclip, IconUpload, IconTrash as IconTrash2 } from "@tabler/icons-react";
2883
2844
  import { useRef as useRef2, useState as useState9 } from "react";
2884
- import { Fragment as Fragment5, jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
2845
+ import { Fragment as Fragment5, jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
2885
2846
  function FileUploader({
2886
2847
  onUpload,
2887
2848
  onError,
@@ -2914,7 +2875,7 @@ function FileUploader({
2914
2875
  const handleRemoveFile = async (index) => {
2915
2876
  try {
2916
2877
  if (onRemove) {
2917
- await onRemove();
2878
+ await onRemove(index);
2918
2879
  }
2919
2880
  const updatedList = [...fileList];
2920
2881
  updatedList.splice(index, 1);
@@ -2952,10 +2913,10 @@ function FileUploader({
2952
2913
  }
2953
2914
  if (inputRef.current) inputRef.current.value = "";
2954
2915
  };
2955
- return /* @__PURE__ */ jsxs29("div", { className: "w-full", children: [
2956
- label && /* @__PURE__ */ jsx33("p", { className: "body-1", children: label }),
2957
- /* @__PURE__ */ jsxs29("div", { children: [
2958
- mode === "upload" ? /* @__PURE__ */ jsx33(
2916
+ return /* @__PURE__ */ jsxs30("div", { className: "w-full", children: [
2917
+ label && /* @__PURE__ */ jsx34("p", { className: "body-1", children: label }),
2918
+ /* @__PURE__ */ jsxs30("div", { children: [
2919
+ mode === "upload" ? /* @__PURE__ */ jsx34(
2959
2920
  "button",
2960
2921
  {
2961
2922
  type: "button",
@@ -2963,15 +2924,15 @@ function FileUploader({
2963
2924
  className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
2964
2925
  ${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
2965
2926
  disabled: disabled ? disabled : uploading,
2966
- children: uploading ? /* @__PURE__ */ jsxs29(Fragment5, { children: [
2967
- /* @__PURE__ */ jsx33(Loader, { size: 15 }),
2927
+ children: uploading ? /* @__PURE__ */ jsxs30(Fragment5, { children: [
2928
+ /* @__PURE__ */ jsx34(Loader, { size: 15 }),
2968
2929
  " \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
2969
- ] }) : /* @__PURE__ */ jsxs29(Fragment5, { children: [
2970
- /* @__PURE__ */ jsx33(IconUpload, { size: 15, className: "text-gray-400" }),
2930
+ ] }) : /* @__PURE__ */ jsxs30(Fragment5, { children: [
2931
+ /* @__PURE__ */ jsx34(IconUpload, { size: 15, className: "text-gray-400" }),
2971
2932
  " \u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C"
2972
2933
  ] })
2973
2934
  }
2974
- ) : /* @__PURE__ */ jsx33(
2935
+ ) : /* @__PURE__ */ jsx34(
2975
2936
  "div",
2976
2937
  {
2977
2938
  className: `min-w-[400px] min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
@@ -2985,17 +2946,17 @@ function FileUploader({
2985
2946
  },
2986
2947
  onDragLeave: () => setDragActive(false),
2987
2948
  onDrop: handleDrop,
2988
- children: uploading ? /* @__PURE__ */ jsxs29("div", { className: "flex justify-center items-center gap-2", children: [
2989
- /* @__PURE__ */ jsx33(Loader, { size: 15 }),
2949
+ children: uploading ? /* @__PURE__ */ jsxs30("div", { className: "flex justify-center items-center gap-2", children: [
2950
+ /* @__PURE__ */ jsx34(Loader, { size: 15 }),
2990
2951
  " \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
2991
- ] }) : /* @__PURE__ */ jsxs29("div", { className: "flex flex-col items-center gap-2", children: [
2992
- /* @__PURE__ */ jsx33(IconUpload, { size: 20 }),
2993
- /* @__PURE__ */ jsx33("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" }),
2994
- /* @__PURE__ */ jsx33("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" })
2952
+ ] }) : /* @__PURE__ */ jsxs30("div", { className: "flex flex-col items-center gap-2", children: [
2953
+ /* @__PURE__ */ jsx34(IconUpload, { size: 20 }),
2954
+ /* @__PURE__ */ jsx34("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" }),
2955
+ /* @__PURE__ */ jsx34("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" })
2995
2956
  ] })
2996
2957
  }
2997
2958
  ),
2998
- /* @__PURE__ */ jsx33(
2959
+ /* @__PURE__ */ jsx34(
2999
2960
  "input",
3000
2961
  {
3001
2962
  type: "file",
@@ -3008,13 +2969,13 @@ function FileUploader({
3008
2969
  }
3009
2970
  )
3010
2971
  ] }),
3011
- description && /* @__PURE__ */ jsx33("p", { className: "text-gray-400 body-4", children: description }),
3012
- /* @__PURE__ */ jsx33("div", { className: "mt-[8px]", children: fileList.length !== 0 && fileList.map((file, index) => /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 rounded-[4px] px-[8px] py-[4px] body-1", children: [
3013
- /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
3014
- /* @__PURE__ */ jsx33("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ jsx33(IconPaperclip, { size: 15 }) }),
3015
- /* @__PURE__ */ jsx33("span", { className: "truncate", children: file.name })
2972
+ description && /* @__PURE__ */ jsx34("p", { className: "text-gray-400 body-4", children: description }),
2973
+ /* @__PURE__ */ jsx34("div", { className: "mt-[8px]", children: fileList.length !== 0 && fileList.map((file, index) => /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2 rounded-[4px] px-[8px] py-[4px] body-1", children: [
2974
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
2975
+ /* @__PURE__ */ jsx34("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ jsx34(IconPaperclip, { size: 15 }) }),
2976
+ /* @__PURE__ */ jsx34("span", { className: "truncate", children: file.name })
3016
2977
  ] }),
3017
- /* @__PURE__ */ jsx33(
2978
+ /* @__PURE__ */ jsx34(
3018
2979
  IconTrash2,
3019
2980
  {
3020
2981
  size: 20,
@@ -3048,9 +3009,9 @@ function messageLoading(content, duration) {
3048
3009
  }
3049
3010
 
3050
3011
  // src/Breadcrumb/Breadcrumb.tsx
3051
- import { ConfigProvider as ConfigProvider17 } from "antd";
3012
+ import { ConfigProvider as ConfigProvider18 } from "antd";
3052
3013
  import { Breadcrumb } from "antd";
3053
- import { jsx as jsx34 } from "react/jsx-runtime";
3014
+ import { jsx as jsx35 } from "react/jsx-runtime";
3054
3015
  function Breadcrumbs({
3055
3016
  items,
3056
3017
  separator,
@@ -3058,15 +3019,15 @@ function Breadcrumbs({
3058
3019
  classname,
3059
3020
  params
3060
3021
  }) {
3061
- return /* @__PURE__ */ jsx34(
3062
- ConfigProvider17,
3022
+ return /* @__PURE__ */ jsx35(
3023
+ ConfigProvider18,
3063
3024
  {
3064
3025
  theme: {
3065
3026
  token: {
3066
3027
  fontFamily: "Kanit"
3067
3028
  }
3068
3029
  },
3069
- children: /* @__PURE__ */ jsx34(
3030
+ children: /* @__PURE__ */ jsx35(
3070
3031
  Breadcrumb,
3071
3032
  {
3072
3033
  items,
@@ -3081,8 +3042,8 @@ function Breadcrumbs({
3081
3042
  }
3082
3043
 
3083
3044
  // src/HeadingPage/HeadingPage.tsx
3084
- import { ConfigProvider as ConfigProvider18 } from "antd";
3085
- import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
3045
+ import { ConfigProvider as ConfigProvider19 } from "antd";
3046
+ import { jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
3086
3047
  function HeadingPage({ Heading }) {
3087
3048
  const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
3088
3049
  weekday: "long",
@@ -3090,17 +3051,17 @@ function HeadingPage({ Heading }) {
3090
3051
  month: "long",
3091
3052
  year: "numeric"
3092
3053
  });
3093
- return /* @__PURE__ */ jsx35(
3094
- ConfigProvider18,
3054
+ return /* @__PURE__ */ jsx36(
3055
+ ConfigProvider19,
3095
3056
  {
3096
3057
  theme: {
3097
3058
  token: {
3098
3059
  fontFamily: "Kanit"
3099
3060
  }
3100
3061
  },
3101
- children: /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
3102
- /* @__PURE__ */ jsx35("p", { className: "headline-5", children: Heading }),
3103
- /* @__PURE__ */ jsxs30("p", { className: "body-1", children: [
3062
+ children: /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
3063
+ /* @__PURE__ */ jsx36("p", { className: "headline-5", children: Heading }),
3064
+ /* @__PURE__ */ jsxs31("p", { className: "body-1", children: [
3104
3065
  " \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
3105
3066
  today
3106
3067
  ] })
@@ -3110,9 +3071,9 @@ function HeadingPage({ Heading }) {
3110
3071
  }
3111
3072
 
3112
3073
  // src/Progress/ProgressBar.tsx
3113
- import { ConfigProvider as ConfigProvider19, Progress } from "antd";
3074
+ import { ConfigProvider as ConfigProvider20, Progress } from "antd";
3114
3075
  import { useEffect as useEffect2, useRef as useRef3, useState as useState10 } from "react";
3115
- import { jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
3076
+ import { jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
3116
3077
  function ProgressBar({
3117
3078
  percent = 0,
3118
3079
  size = "default",
@@ -3145,16 +3106,16 @@ function ProgressBar({
3145
3106
  observer.observe(inner);
3146
3107
  return () => observer.disconnect();
3147
3108
  }, []);
3148
- return /* @__PURE__ */ jsx36(
3149
- ConfigProvider19,
3109
+ return /* @__PURE__ */ jsx37(
3110
+ ConfigProvider20,
3150
3111
  {
3151
3112
  theme: {
3152
3113
  token: {
3153
3114
  fontFamily: "Kanit"
3154
3115
  }
3155
3116
  },
3156
- children: /* @__PURE__ */ jsxs31("div", { className: "relative w-full", ref: progressRef, children: [
3157
- /* @__PURE__ */ jsx36(
3117
+ children: /* @__PURE__ */ jsxs32("div", { className: "relative w-full", ref: progressRef, children: [
3118
+ /* @__PURE__ */ jsx37(
3158
3119
  Progress,
3159
3120
  {
3160
3121
  className: "w-full",
@@ -3170,7 +3131,7 @@ function ProgressBar({
3170
3131
  strokeColor
3171
3132
  }
3172
3133
  ),
3173
- barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ jsx36(
3134
+ barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ jsx37(
3174
3135
  "div",
3175
3136
  {
3176
3137
  className: "checkpoint absolute top-0",
@@ -3192,7 +3153,7 @@ function ProgressBar({
3192
3153
  }
3193
3154
 
3194
3155
  // src/KpiSection/KpiSection.tsx
3195
- import { ConfigProvider as ConfigProvider20, message } from "antd";
3156
+ import { ConfigProvider as ConfigProvider21, message } from "antd";
3196
3157
  import { useEffect as useEffect3, useState as useState12 } from "react";
3197
3158
 
3198
3159
  // src/KpiSection/hooks/useGetKpiSection.ts
@@ -3349,7 +3310,7 @@ import {
3349
3310
  IconTrash as IconTrash3,
3350
3311
  IconX as IconX2
3351
3312
  } from "@tabler/icons-react";
3352
- import { Fragment as Fragment6, jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
3313
+ import { Fragment as Fragment6, jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
3353
3314
  function KpiSection({ type, onChangeKpiList }) {
3354
3315
  const {
3355
3316
  handleAddKpi,
@@ -3379,8 +3340,8 @@ function KpiSection({ type, onChangeKpiList }) {
3379
3340
  onChangeKpiList(kpiList);
3380
3341
  }
3381
3342
  }, [kpiList]);
3382
- return /* @__PURE__ */ jsx37(
3383
- ConfigProvider20,
3343
+ return /* @__PURE__ */ jsx38(
3344
+ ConfigProvider21,
3384
3345
  {
3385
3346
  theme: {
3386
3347
  token: {
@@ -3388,30 +3349,27 @@ function KpiSection({ type, onChangeKpiList }) {
3388
3349
  fontSize: 16
3389
3350
  }
3390
3351
  },
3391
- children: /* @__PURE__ */ jsxs32("div", { className: "container-input", children: [
3352
+ children: /* @__PURE__ */ jsxs33("div", { className: "container-input", children: [
3392
3353
  messageContainer,
3393
- type === "number" && /* @__PURE__ */ jsxs32("div", { className: "space-y-4", children: [
3394
- /* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
3395
- /* @__PURE__ */ jsx37(
3354
+ type === "number" && /* @__PURE__ */ jsxs33("div", { className: "space-y-4", children: [
3355
+ /* @__PURE__ */ jsxs33("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
3356
+ /* @__PURE__ */ jsx38(
3396
3357
  InputField,
3397
3358
  {
3398
3359
  value: nameKpi,
3399
- title: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
3360
+ label: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
3400
3361
  placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
3401
- require: true,
3402
3362
  onChange: (value) => setNameKpi(value ?? ""),
3403
3363
  className: "h-[32px]",
3404
- showError: !!errors.nameKpi,
3405
- errorMessage: errors.nameKpi
3364
+ error: errors.nameKpi
3406
3365
  }
3407
3366
  ),
3408
- /* @__PURE__ */ jsx37(
3367
+ /* @__PURE__ */ jsx38(
3409
3368
  InputField,
3410
3369
  {
3411
3370
  value: kpiValue,
3412
- title: "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
3371
+ label: "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
3413
3372
  placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
3414
- require: true,
3415
3373
  onChange: (value) => {
3416
3374
  if (value === void 0 || value === "") {
3417
3375
  setKpiValue("");
@@ -3426,28 +3384,25 @@ function KpiSection({ type, onChangeKpiList }) {
3426
3384
  }
3427
3385
  }
3428
3386
  },
3429
- showError: !!errors.kpiValue,
3430
- errorMessage: errors.kpiValue
3387
+ error: errors.kpiValue
3431
3388
  }
3432
3389
  ),
3433
- /* @__PURE__ */ jsx37(
3390
+ /* @__PURE__ */ jsx38(
3434
3391
  InputField,
3435
3392
  {
3436
3393
  value: unitValue,
3437
- title: "\u0E2B\u0E19\u0E48\u0E27\u0E22",
3394
+ label: "\u0E2B\u0E19\u0E48\u0E27\u0E22",
3438
3395
  placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
3439
- require: true,
3440
3396
  onChange: (value) => setUnitValue(value ?? ""),
3441
3397
  className: "h-[32px]",
3442
- showError: !!errors.unitValue,
3443
- errorMessage: errors.unitValue
3398
+ error: errors.unitValue
3444
3399
  }
3445
3400
  ),
3446
- /* @__PURE__ */ jsx37(
3401
+ /* @__PURE__ */ jsx38(
3447
3402
  "div",
3448
3403
  {
3449
3404
  className: `flex justify-end mt-[28px]`,
3450
- children: /* @__PURE__ */ jsx37(
3405
+ children: /* @__PURE__ */ jsx38(
3451
3406
  IconCirclePlus,
3452
3407
  {
3453
3408
  className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
@@ -3458,17 +3413,17 @@ function KpiSection({ type, onChangeKpiList }) {
3458
3413
  }
3459
3414
  )
3460
3415
  ] }),
3461
- /* @__PURE__ */ jsx37("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs32(
3416
+ /* @__PURE__ */ jsx38("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs33(
3462
3417
  "div",
3463
3418
  {
3464
3419
  className: "grid grid-cols-[30px_1fr_100px_120px_80px] items-start py-2 body-1 gap-[8px]",
3465
3420
  children: [
3466
- /* @__PURE__ */ jsxs32("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
3421
+ /* @__PURE__ */ jsxs33("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
3467
3422
  index + 1,
3468
3423
  "."
3469
3424
  ] }),
3470
- kpi.isEditing ? /* @__PURE__ */ jsxs32(Fragment6, { children: [
3471
- /* @__PURE__ */ jsx37(
3425
+ kpi.isEditing ? /* @__PURE__ */ jsxs33(Fragment6, { children: [
3426
+ /* @__PURE__ */ jsx38(
3472
3427
  InputField,
3473
3428
  {
3474
3429
  value: kpi.name,
@@ -3477,11 +3432,10 @@ function KpiSection({ type, onChangeKpiList }) {
3477
3432
  (item) => item.id === kpi.id ? { ...item, name: value ?? "" } : item
3478
3433
  )
3479
3434
  ),
3480
- showError: !!itemErrors[kpi.id]?.name,
3481
- errorMessage: itemErrors[kpi.id]?.name
3435
+ error: itemErrors[kpi.id]?.name
3482
3436
  }
3483
3437
  ),
3484
- /* @__PURE__ */ jsx37(
3438
+ /* @__PURE__ */ jsx38(
3485
3439
  InputField,
3486
3440
  {
3487
3441
  value: kpi.value?.toString(),
@@ -3507,11 +3461,10 @@ function KpiSection({ type, onChangeKpiList }) {
3507
3461
  }
3508
3462
  }
3509
3463
  },
3510
- showError: !!itemErrors[kpi.id]?.value,
3511
- errorMessage: itemErrors[kpi.id]?.value
3464
+ error: itemErrors[kpi.id]?.value
3512
3465
  }
3513
3466
  ),
3514
- /* @__PURE__ */ jsx37(
3467
+ /* @__PURE__ */ jsx38(
3515
3468
  InputField,
3516
3469
  {
3517
3470
  value: kpi.unit,
@@ -3520,23 +3473,22 @@ function KpiSection({ type, onChangeKpiList }) {
3520
3473
  (item) => item.id === kpi.id ? { ...item, unit: value ?? "" } : item
3521
3474
  )
3522
3475
  ),
3523
- showError: !!itemErrors[kpi.id]?.unit,
3524
- errorMessage: itemErrors[kpi.id]?.unit
3476
+ error: itemErrors[kpi.id]?.unit
3525
3477
  }
3526
3478
  ),
3527
- /* @__PURE__ */ jsxs32(
3479
+ /* @__PURE__ */ jsxs33(
3528
3480
  "div",
3529
3481
  {
3530
3482
  className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.value || !!itemErrors[kpi.id]?.unit || !!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
3531
3483
  children: [
3532
- /* @__PURE__ */ jsx37(
3484
+ /* @__PURE__ */ jsx38(
3533
3485
  IconCheck2,
3534
3486
  {
3535
3487
  className: "w-[30px] h-[30px] cursor-pointer",
3536
3488
  onClick: () => handleSave(kpi.id, type)
3537
3489
  }
3538
3490
  ),
3539
- /* @__PURE__ */ jsx37(
3491
+ /* @__PURE__ */ jsx38(
3540
3492
  IconX2,
3541
3493
  {
3542
3494
  className: "w-[30px] h-[30px] cursor-pointer",
@@ -3546,19 +3498,19 @@ function KpiSection({ type, onChangeKpiList }) {
3546
3498
  ]
3547
3499
  }
3548
3500
  )
3549
- ] }) : /* @__PURE__ */ jsxs32(Fragment6, { children: [
3550
- /* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.name }),
3551
- /* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.value }),
3552
- /* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.unit }),
3553
- /* @__PURE__ */ jsxs32("div", { className: "flex gap-3 justify-end", children: [
3554
- /* @__PURE__ */ jsx37(
3501
+ ] }) : /* @__PURE__ */ jsxs33(Fragment6, { children: [
3502
+ /* @__PURE__ */ jsx38("p", { className: "body-1", children: kpi.name }),
3503
+ /* @__PURE__ */ jsx38("p", { className: "body-1", children: kpi.value }),
3504
+ /* @__PURE__ */ jsx38("p", { className: "body-1", children: kpi.unit }),
3505
+ /* @__PURE__ */ jsxs33("div", { className: "flex gap-3 justify-end", children: [
3506
+ /* @__PURE__ */ jsx38(
3555
3507
  IconPencil,
3556
3508
  {
3557
3509
  className: "w-[30px] h-[30px] cursor-pointer",
3558
3510
  onClick: () => handleEdit(kpi.id)
3559
3511
  }
3560
3512
  ),
3561
- /* @__PURE__ */ jsx37(
3513
+ /* @__PURE__ */ jsx38(
3562
3514
  IconTrash3,
3563
3515
  {
3564
3516
  className: "w-[30px] h-[30px] cursor-pointer",
@@ -3572,26 +3524,24 @@ function KpiSection({ type, onChangeKpiList }) {
3572
3524
  kpi.id
3573
3525
  )) })
3574
3526
  ] }),
3575
- type === "text" && /* @__PURE__ */ jsxs32("div", { className: "space-y-4", children: [
3576
- /* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
3577
- /* @__PURE__ */ jsx37(
3527
+ type === "text" && /* @__PURE__ */ jsxs33("div", { className: "space-y-4", children: [
3528
+ /* @__PURE__ */ jsxs33("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
3529
+ /* @__PURE__ */ jsx38(
3578
3530
  InputField,
3579
3531
  {
3580
3532
  value: nameKpi,
3581
- title: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
3533
+ label: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
3582
3534
  placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
3583
- require: true,
3584
3535
  onChange: (value) => setNameKpi(value ?? ""),
3585
3536
  className: "h-[32px]",
3586
- showError: !!errors.nameKpi,
3587
- errorMessage: errors.nameKpi
3537
+ error: errors.nameKpi
3588
3538
  }
3589
3539
  ),
3590
- /* @__PURE__ */ jsx37(
3540
+ /* @__PURE__ */ jsx38(
3591
3541
  "div",
3592
3542
  {
3593
3543
  className: `flex justify-end mt-[28px]`,
3594
- children: /* @__PURE__ */ jsx37(
3544
+ children: /* @__PURE__ */ jsx38(
3595
3545
  IconCirclePlus,
3596
3546
  {
3597
3547
  className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
@@ -3602,17 +3552,17 @@ function KpiSection({ type, onChangeKpiList }) {
3602
3552
  }
3603
3553
  )
3604
3554
  ] }),
3605
- /* @__PURE__ */ jsx37("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs32(
3555
+ /* @__PURE__ */ jsx38("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs33(
3606
3556
  "div",
3607
3557
  {
3608
3558
  className: "grid grid-cols-[30px_1fr_80px] items-start py-2 body-1 gap-[8px]",
3609
3559
  children: [
3610
- /* @__PURE__ */ jsxs32("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
3560
+ /* @__PURE__ */ jsxs33("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
3611
3561
  index + 1,
3612
3562
  "."
3613
3563
  ] }),
3614
- kpi.isEditing ? /* @__PURE__ */ jsxs32(Fragment6, { children: [
3615
- /* @__PURE__ */ jsx37(
3564
+ kpi.isEditing ? /* @__PURE__ */ jsxs33(Fragment6, { children: [
3565
+ /* @__PURE__ */ jsx38(
3616
3566
  InputField,
3617
3567
  {
3618
3568
  value: kpi.name,
@@ -3621,23 +3571,22 @@ function KpiSection({ type, onChangeKpiList }) {
3621
3571
  (item) => item.id === kpi.id ? { ...item, name: value ?? "" } : item
3622
3572
  )
3623
3573
  ),
3624
- showError: !!itemErrors[kpi.id]?.name,
3625
- errorMessage: itemErrors[kpi.id]?.name
3574
+ error: itemErrors[kpi.id]?.name
3626
3575
  }
3627
3576
  ),
3628
- /* @__PURE__ */ jsxs32(
3577
+ /* @__PURE__ */ jsxs33(
3629
3578
  "div",
3630
3579
  {
3631
3580
  className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
3632
3581
  children: [
3633
- /* @__PURE__ */ jsx37(
3582
+ /* @__PURE__ */ jsx38(
3634
3583
  IconCheck2,
3635
3584
  {
3636
3585
  className: "w-[30px] h-[30px] cursor-pointer",
3637
3586
  onClick: () => handleSave(kpi.id, type)
3638
3587
  }
3639
3588
  ),
3640
- /* @__PURE__ */ jsx37(
3589
+ /* @__PURE__ */ jsx38(
3641
3590
  IconX2,
3642
3591
  {
3643
3592
  className: "w-[30px] h-[30px] cursor-pointer",
@@ -3647,17 +3596,17 @@ function KpiSection({ type, onChangeKpiList }) {
3647
3596
  ]
3648
3597
  }
3649
3598
  )
3650
- ] }) : /* @__PURE__ */ jsxs32(Fragment6, { children: [
3651
- /* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.name }),
3652
- /* @__PURE__ */ jsxs32("div", { className: "flex gap-3 justify-end", children: [
3653
- /* @__PURE__ */ jsx37(
3599
+ ] }) : /* @__PURE__ */ jsxs33(Fragment6, { children: [
3600
+ /* @__PURE__ */ jsx38("p", { className: "body-1", children: kpi.name }),
3601
+ /* @__PURE__ */ jsxs33("div", { className: "flex gap-3 justify-end", children: [
3602
+ /* @__PURE__ */ jsx38(
3654
3603
  IconPencil,
3655
3604
  {
3656
3605
  className: "w-[30px] h-[30px] cursor-pointer",
3657
3606
  onClick: () => handleEdit(kpi.id)
3658
3607
  }
3659
3608
  ),
3660
- /* @__PURE__ */ jsx37(
3609
+ /* @__PURE__ */ jsx38(
3661
3610
  IconTrash3,
3662
3611
  {
3663
3612
  className: "w-[30px] h-[30px] cursor-pointer",
@@ -3690,6 +3639,7 @@ export {
3690
3639
  GhostButton,
3691
3640
  HeadingPage,
3692
3641
  InputField,
3642
+ InputFieldNumber,
3693
3643
  KpiSection,
3694
3644
  Loader,
3695
3645
  MenuNavBar,