@esic-lab/data-core-ui 0.0.16 → 0.0.18
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/{STO-logo-KFQUNTJ3.svg → STO-logo-ADYYAPS3.svg} +92 -92
- package/dist/assets/STO-logo.svg +92 -92
- package/dist/index.css +164 -0
- package/dist/index.d.mts +21 -8
- package/dist/index.d.ts +21 -8
- package/dist/index.js +118 -117
- package/dist/index.mjs +157 -156
- package/package.json +6 -2
package/dist/index.mjs
CHANGED
|
@@ -629,7 +629,7 @@ function Switch({ label, checked, onChange, disabled }) {
|
|
|
629
629
|
onChange(!checked);
|
|
630
630
|
}
|
|
631
631
|
};
|
|
632
|
-
return /* @__PURE__ */ jsxs6("div", { className: "flex
|
|
632
|
+
return /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-[10px]", children: [
|
|
633
633
|
label && /* @__PURE__ */ jsx9("p", { className: `body-1 ${disabled ? "opacity-50 select-none" : ""}`, children: label }),
|
|
634
634
|
/* @__PURE__ */ jsx9(
|
|
635
635
|
"button",
|
|
@@ -851,9 +851,9 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
851
851
|
}
|
|
852
852
|
|
|
853
853
|
// src/Table/DataTable/AntDataTable.tsx
|
|
854
|
-
import { Table } from "antd";
|
|
854
|
+
import { ConfigProvider, Table } from "antd";
|
|
855
855
|
import { useState as useState3 } from "react";
|
|
856
|
-
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
856
|
+
import { Fragment as Fragment2, jsx as jsx15 } from "react/jsx-runtime";
|
|
857
857
|
function AntDataTable({
|
|
858
858
|
dataSource,
|
|
859
859
|
columns,
|
|
@@ -871,17 +871,29 @@ function AntDataTable({
|
|
|
871
871
|
onRowSelect && onRowSelect(newSelectedRowKeys);
|
|
872
872
|
}
|
|
873
873
|
};
|
|
874
|
-
return /* @__PURE__ */ jsx15(
|
|
875
|
-
|
|
874
|
+
return /* @__PURE__ */ jsx15(Fragment2, { children: /* @__PURE__ */ jsx15(
|
|
875
|
+
ConfigProvider,
|
|
876
876
|
{
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
877
|
+
theme: {
|
|
878
|
+
components: {},
|
|
879
|
+
token: {
|
|
880
|
+
fontFamily: "Kanit",
|
|
881
|
+
fontSize: 14
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
children: /* @__PURE__ */ jsx15(
|
|
885
|
+
Table,
|
|
886
|
+
{
|
|
887
|
+
dataSource,
|
|
888
|
+
columns,
|
|
889
|
+
rowSelection: rowCheckbox ? rowSelection : void 0,
|
|
890
|
+
pagination: { position: ["bottomCenter"], pageSize },
|
|
891
|
+
style: { width },
|
|
892
|
+
scroll: { y: height }
|
|
893
|
+
}
|
|
894
|
+
)
|
|
883
895
|
}
|
|
884
|
-
);
|
|
896
|
+
) });
|
|
885
897
|
}
|
|
886
898
|
|
|
887
899
|
// src/Calendar/Calendar/Calendar.tsx
|
|
@@ -892,7 +904,7 @@ import timeGridPlugin from "@fullcalendar/timegrid";
|
|
|
892
904
|
import interactionPlugin from "@fullcalendar/interaction";
|
|
893
905
|
import thLocale from "@fullcalendar/core/locales/th";
|
|
894
906
|
import { IconChevronLeft, IconChevronRight, IconX } from "@tabler/icons-react";
|
|
895
|
-
import { Fragment as
|
|
907
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
896
908
|
function Calendar({ events }) {
|
|
897
909
|
const calendarRef = useRef(null);
|
|
898
910
|
const [monthTitle, setMonthTitle] = useState4("");
|
|
@@ -1012,7 +1024,7 @@ function Calendar({ events }) {
|
|
|
1012
1024
|
});
|
|
1013
1025
|
},
|
|
1014
1026
|
eventContent: (arg) => {
|
|
1015
|
-
return /* @__PURE__ */ jsx16(
|
|
1027
|
+
return /* @__PURE__ */ jsx16(Fragment3, { children: /* @__PURE__ */ jsx16("div", { className: "flex items-center h-[28px] p-[4px] border-green-500 border-l-[10px] bg-red-400 rounded text-left text-white caption-1", children: arg.event.title }) });
|
|
1016
1028
|
},
|
|
1017
1029
|
moreLinkContent: (arg) => `+${arg.num} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`
|
|
1018
1030
|
}
|
|
@@ -1091,12 +1103,12 @@ function TextInput({
|
|
|
1091
1103
|
}
|
|
1092
1104
|
|
|
1093
1105
|
// src/InputField/InputField.tsx
|
|
1094
|
-
import { ConfigProvider, Input } from "antd";
|
|
1106
|
+
import { ConfigProvider as ConfigProvider2, Input } from "antd";
|
|
1095
1107
|
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1096
1108
|
function InputField({
|
|
1097
1109
|
value,
|
|
1098
1110
|
onChange,
|
|
1099
|
-
placeholder,
|
|
1111
|
+
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1100
1112
|
title,
|
|
1101
1113
|
require: require2,
|
|
1102
1114
|
bottomText,
|
|
@@ -1105,19 +1117,20 @@ function InputField({
|
|
|
1105
1117
|
errorMessage,
|
|
1106
1118
|
addonBefore,
|
|
1107
1119
|
addonAfter,
|
|
1108
|
-
defaultValue
|
|
1120
|
+
defaultValue,
|
|
1121
|
+
className
|
|
1109
1122
|
}) {
|
|
1110
1123
|
return /* @__PURE__ */ jsx18(
|
|
1111
|
-
|
|
1124
|
+
ConfigProvider2,
|
|
1112
1125
|
{
|
|
1113
1126
|
theme: {
|
|
1114
1127
|
token: {
|
|
1115
1128
|
fontFamily: "Kanit"
|
|
1116
1129
|
}
|
|
1117
1130
|
},
|
|
1118
|
-
children: /* @__PURE__ */ jsxs14("div", { children: [
|
|
1131
|
+
children: /* @__PURE__ */ jsxs14("div", { className: "container-input", children: [
|
|
1119
1132
|
/* @__PURE__ */ jsxs14("div", { children: [
|
|
1120
|
-
/* @__PURE__ */ jsx18("span", { className: "body-
|
|
1133
|
+
/* @__PURE__ */ jsx18("span", { className: "body-1", children: title }),
|
|
1121
1134
|
" ",
|
|
1122
1135
|
require2 && /* @__PURE__ */ jsx18("span", { className: "text-red-500", children: "*" })
|
|
1123
1136
|
] }),
|
|
@@ -1127,6 +1140,7 @@ function InputField({
|
|
|
1127
1140
|
value,
|
|
1128
1141
|
placeholder,
|
|
1129
1142
|
disabled,
|
|
1143
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1130
1144
|
onChange: (e) => onChange(e.target.value || void 0),
|
|
1131
1145
|
allowClear: true,
|
|
1132
1146
|
addonBefore,
|
|
@@ -1145,8 +1159,8 @@ function InputField({
|
|
|
1145
1159
|
}
|
|
1146
1160
|
|
|
1147
1161
|
// src/Input/TextArea/TextArea.tsx
|
|
1148
|
-
import { Input as Input2 } from "antd";
|
|
1149
|
-
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1162
|
+
import { ConfigProvider as ConfigProvider3, Input as Input2 } from "antd";
|
|
1163
|
+
import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1150
1164
|
var { TextArea } = Input2;
|
|
1151
1165
|
function TextAreaInput({
|
|
1152
1166
|
label,
|
|
@@ -1161,34 +1175,46 @@ function TextAreaInput({
|
|
|
1161
1175
|
error,
|
|
1162
1176
|
disabled
|
|
1163
1177
|
}) {
|
|
1164
|
-
return /* @__PURE__ */
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1178
|
+
return /* @__PURE__ */ jsx19(Fragment4, { children: /* @__PURE__ */ jsx19(
|
|
1179
|
+
ConfigProvider3,
|
|
1180
|
+
{
|
|
1181
|
+
theme: {
|
|
1182
|
+
components: {},
|
|
1183
|
+
token: {
|
|
1184
|
+
fontFamily: "Kanit",
|
|
1185
|
+
fontSize: 16
|
|
1186
|
+
}
|
|
1187
|
+
},
|
|
1188
|
+
children: /* @__PURE__ */ jsxs15("div", { children: [
|
|
1189
|
+
label && /* @__PURE__ */ jsxs15("p", { className: "body-1 mb-[8px]", children: [
|
|
1190
|
+
label,
|
|
1191
|
+
" ",
|
|
1192
|
+
required && /* @__PURE__ */ jsx19("span", { className: "text-red-500", children: "\xA0*" })
|
|
1193
|
+
] }),
|
|
1194
|
+
/* @__PURE__ */ jsx19(
|
|
1195
|
+
TextArea,
|
|
1196
|
+
{
|
|
1197
|
+
value,
|
|
1198
|
+
rows: height,
|
|
1199
|
+
style: {
|
|
1200
|
+
...error && resizable ? { borderColor: "red" } : {},
|
|
1201
|
+
...disabled || !resizable ? { resize: "none" } : {}
|
|
1202
|
+
},
|
|
1203
|
+
placeholder,
|
|
1204
|
+
maxLength,
|
|
1205
|
+
showCount,
|
|
1206
|
+
onChange: (e) => onChange(e.target.value),
|
|
1207
|
+
disabled
|
|
1208
|
+
}
|
|
1209
|
+
),
|
|
1210
|
+
error && /* @__PURE__ */ jsx19("p", { className: "text-red-600 body-1", children: error })
|
|
1211
|
+
] })
|
|
1212
|
+
}
|
|
1213
|
+
) });
|
|
1188
1214
|
}
|
|
1189
1215
|
|
|
1190
1216
|
// src/ColorPicker/ColorPicker.tsx
|
|
1191
|
-
import { ConfigProvider as
|
|
1217
|
+
import { ConfigProvider as ConfigProvider4, ColorPicker } from "antd";
|
|
1192
1218
|
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1193
1219
|
function ColorPickerBasic({
|
|
1194
1220
|
value,
|
|
@@ -1205,16 +1231,16 @@ function ColorPickerBasic({
|
|
|
1205
1231
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
1206
1232
|
}) {
|
|
1207
1233
|
return /* @__PURE__ */ jsx20(
|
|
1208
|
-
|
|
1234
|
+
ConfigProvider4,
|
|
1209
1235
|
{
|
|
1210
1236
|
theme: {
|
|
1211
1237
|
token: {
|
|
1212
1238
|
fontFamily: "Kanit"
|
|
1213
1239
|
}
|
|
1214
1240
|
},
|
|
1215
|
-
children: /* @__PURE__ */ jsxs16("div", { children: [
|
|
1241
|
+
children: /* @__PURE__ */ jsxs16("div", { className: "container-input", children: [
|
|
1216
1242
|
/* @__PURE__ */ jsxs16("div", { children: [
|
|
1217
|
-
/* @__PURE__ */ jsx20("span", { className: "body-
|
|
1243
|
+
/* @__PURE__ */ jsx20("span", { className: "body-1", children: title }),
|
|
1218
1244
|
" ",
|
|
1219
1245
|
require2 && /* @__PURE__ */ jsx20("span", { className: "text-red-500", children: "*" })
|
|
1220
1246
|
] }),
|
|
@@ -1222,7 +1248,7 @@ function ColorPickerBasic({
|
|
|
1222
1248
|
ColorPicker,
|
|
1223
1249
|
{
|
|
1224
1250
|
defaultFormat,
|
|
1225
|
-
className
|
|
1251
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1226
1252
|
value,
|
|
1227
1253
|
defaultValue: "#ffff",
|
|
1228
1254
|
onChange,
|
|
@@ -1254,7 +1280,7 @@ function ColorPickerBasic({
|
|
|
1254
1280
|
// src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
|
|
1255
1281
|
var import_dayjs = __toESM(require_dayjs_min());
|
|
1256
1282
|
var import_th2 = __toESM(require_th());
|
|
1257
|
-
import { ConfigProvider as
|
|
1283
|
+
import { ConfigProvider as ConfigProvider5, DatePicker } from "antd";
|
|
1258
1284
|
import thTH from "antd/locale/th_TH";
|
|
1259
1285
|
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1260
1286
|
function DatePickerBasic({
|
|
@@ -1265,7 +1291,7 @@ function DatePickerBasic({
|
|
|
1265
1291
|
bottomText,
|
|
1266
1292
|
showError,
|
|
1267
1293
|
errorMessage,
|
|
1268
|
-
placeholder,
|
|
1294
|
+
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
|
|
1269
1295
|
disabled,
|
|
1270
1296
|
defaultValue,
|
|
1271
1297
|
minDate,
|
|
@@ -1277,24 +1303,25 @@ function DatePickerBasic({
|
|
|
1277
1303
|
const dateFormat = "DD/MM/YYYY";
|
|
1278
1304
|
import_dayjs.default.locale("th_TH");
|
|
1279
1305
|
return /* @__PURE__ */ jsx21(
|
|
1280
|
-
|
|
1306
|
+
ConfigProvider5,
|
|
1281
1307
|
{
|
|
1282
1308
|
locale: thTH,
|
|
1283
1309
|
theme: {
|
|
1284
1310
|
token: {
|
|
1285
|
-
fontFamily: "Kanit"
|
|
1311
|
+
fontFamily: "Kanit",
|
|
1312
|
+
fontSize: 16
|
|
1286
1313
|
}
|
|
1287
1314
|
},
|
|
1288
|
-
children: /* @__PURE__ */ jsxs17("div", { children: [
|
|
1315
|
+
children: /* @__PURE__ */ jsxs17("div", { className: "container-input", children: [
|
|
1289
1316
|
/* @__PURE__ */ jsxs17("div", { children: [
|
|
1290
|
-
/* @__PURE__ */ jsx21("span", { className: "body-
|
|
1317
|
+
/* @__PURE__ */ jsx21("span", { className: "body-1", children: title }),
|
|
1291
1318
|
" ",
|
|
1292
1319
|
require2 && /* @__PURE__ */ jsx21("span", { className: "text-red-500", children: "*" })
|
|
1293
1320
|
] }),
|
|
1294
1321
|
/* @__PURE__ */ jsx21(
|
|
1295
1322
|
DatePicker,
|
|
1296
1323
|
{
|
|
1297
|
-
className: `body-1 ${className ?? ""}`,
|
|
1324
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1298
1325
|
value,
|
|
1299
1326
|
placeholder,
|
|
1300
1327
|
onChange,
|
|
@@ -1322,7 +1349,7 @@ function DatePickerBasic({
|
|
|
1322
1349
|
var import_th3 = __toESM(require_th());
|
|
1323
1350
|
var import_customParseFormat = __toESM(require_customParseFormat());
|
|
1324
1351
|
var import_dayjs2 = __toESM(require_dayjs_min());
|
|
1325
|
-
import { ConfigProvider as
|
|
1352
|
+
import { ConfigProvider as ConfigProvider6, DatePicker as DatePicker2 } from "antd";
|
|
1326
1353
|
import thTH2 from "antd/locale/th_TH";
|
|
1327
1354
|
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1328
1355
|
import_dayjs2.default.extend(import_customParseFormat.default);
|
|
@@ -1347,17 +1374,18 @@ function DatePickerRangePicker({
|
|
|
1347
1374
|
const dateFormat = "DD/MM/YYYY";
|
|
1348
1375
|
import_dayjs2.default.locale("th_TH");
|
|
1349
1376
|
return /* @__PURE__ */ jsx22(
|
|
1350
|
-
|
|
1377
|
+
ConfigProvider6,
|
|
1351
1378
|
{
|
|
1352
1379
|
locale: thTH2,
|
|
1353
1380
|
theme: {
|
|
1354
1381
|
token: {
|
|
1355
|
-
fontFamily: "Kanit"
|
|
1382
|
+
fontFamily: "Kanit",
|
|
1383
|
+
fontSize: 16
|
|
1356
1384
|
}
|
|
1357
1385
|
},
|
|
1358
|
-
children: /* @__PURE__ */ jsxs18("div", { children: [
|
|
1386
|
+
children: /* @__PURE__ */ jsxs18("div", { className: "container-input", children: [
|
|
1359
1387
|
/* @__PURE__ */ jsxs18("div", { children: [
|
|
1360
|
-
/* @__PURE__ */ jsx22("span", { className: "body-
|
|
1388
|
+
/* @__PURE__ */ jsx22("span", { className: "body-1", children: title }),
|
|
1361
1389
|
" ",
|
|
1362
1390
|
require2 && /* @__PURE__ */ jsx22("span", { className: "text-red-500", children: "*" })
|
|
1363
1391
|
] }),
|
|
@@ -1367,7 +1395,7 @@ function DatePickerRangePicker({
|
|
|
1367
1395
|
format: dateFormat,
|
|
1368
1396
|
value,
|
|
1369
1397
|
placeholder,
|
|
1370
|
-
className: `body-1 ${className ?? ""}`,
|
|
1398
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1371
1399
|
onChange,
|
|
1372
1400
|
allowClear: true,
|
|
1373
1401
|
disabled,
|
|
@@ -1390,30 +1418,20 @@ function DatePickerRangePicker({
|
|
|
1390
1418
|
}
|
|
1391
1419
|
|
|
1392
1420
|
// src/TimePicker/TimePickerBasic/TimePickerBasic.tsx
|
|
1393
|
-
import { ConfigProvider as
|
|
1421
|
+
import { ConfigProvider as ConfigProvider7, TimePicker } from "antd";
|
|
1394
1422
|
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1395
|
-
function TimePickerBasic({
|
|
1396
|
-
value,
|
|
1397
|
-
onChange,
|
|
1398
|
-
require: require2,
|
|
1399
|
-
title,
|
|
1400
|
-
bottomText,
|
|
1401
|
-
showError,
|
|
1402
|
-
errorMessage,
|
|
1403
|
-
placeholder,
|
|
1404
|
-
disabled
|
|
1405
|
-
}) {
|
|
1423
|
+
function TimePickerBasic({ value, onChange, require: require2, title, bottomText, showError, errorMessage, placeholder, disabled, className }) {
|
|
1406
1424
|
return /* @__PURE__ */ jsx23(
|
|
1407
|
-
|
|
1425
|
+
ConfigProvider7,
|
|
1408
1426
|
{
|
|
1409
1427
|
theme: {
|
|
1410
1428
|
token: {
|
|
1411
1429
|
fontFamily: "Kanit"
|
|
1412
1430
|
}
|
|
1413
1431
|
},
|
|
1414
|
-
children: /* @__PURE__ */ jsxs19("div", { children: [
|
|
1432
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "container-input", children: [
|
|
1415
1433
|
/* @__PURE__ */ jsxs19("div", { children: [
|
|
1416
|
-
/* @__PURE__ */ jsx23("span", { className: "body-
|
|
1434
|
+
/* @__PURE__ */ jsx23("span", { className: "body-1", children: title }),
|
|
1417
1435
|
" ",
|
|
1418
1436
|
require2 && /* @__PURE__ */ jsx23("span", { className: "text-red-500", children: "*" })
|
|
1419
1437
|
] }),
|
|
@@ -1421,7 +1439,7 @@ function TimePickerBasic({
|
|
|
1421
1439
|
TimePicker,
|
|
1422
1440
|
{
|
|
1423
1441
|
format: "HH:mm",
|
|
1424
|
-
className:
|
|
1442
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1425
1443
|
value,
|
|
1426
1444
|
placeholder,
|
|
1427
1445
|
onChange,
|
|
@@ -1440,7 +1458,7 @@ function TimePickerBasic({
|
|
|
1440
1458
|
}
|
|
1441
1459
|
|
|
1442
1460
|
// src/TimePicker/TimePickerRangePicker/TimerPickerRangePicker.tsx
|
|
1443
|
-
import { ConfigProvider as
|
|
1461
|
+
import { ConfigProvider as ConfigProvider8, TimePicker as TimePicker2 } from "antd";
|
|
1444
1462
|
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1445
1463
|
function TimePickerRangePicker({
|
|
1446
1464
|
value,
|
|
@@ -1451,19 +1469,20 @@ function TimePickerRangePicker({
|
|
|
1451
1469
|
bottomText,
|
|
1452
1470
|
showError,
|
|
1453
1471
|
errorMessage,
|
|
1454
|
-
disabled
|
|
1472
|
+
disabled,
|
|
1473
|
+
className
|
|
1455
1474
|
}) {
|
|
1456
1475
|
return /* @__PURE__ */ jsx24(
|
|
1457
|
-
|
|
1476
|
+
ConfigProvider8,
|
|
1458
1477
|
{
|
|
1459
1478
|
theme: {
|
|
1460
1479
|
token: {
|
|
1461
1480
|
fontFamily: "Kanit"
|
|
1462
1481
|
}
|
|
1463
1482
|
},
|
|
1464
|
-
children: /* @__PURE__ */ jsxs20("div", { children: [
|
|
1483
|
+
children: /* @__PURE__ */ jsxs20("div", { className: "container-input", children: [
|
|
1465
1484
|
/* @__PURE__ */ jsxs20("div", { children: [
|
|
1466
|
-
/* @__PURE__ */ jsx24("span", { className: "body-
|
|
1485
|
+
/* @__PURE__ */ jsx24("span", { className: "body-1", children: title }),
|
|
1467
1486
|
" ",
|
|
1468
1487
|
require2 && /* @__PURE__ */ jsx24("span", { className: "text-red-500", children: "*" })
|
|
1469
1488
|
] }),
|
|
@@ -1473,7 +1492,7 @@ function TimePickerRangePicker({
|
|
|
1473
1492
|
format: "HH:mm",
|
|
1474
1493
|
value,
|
|
1475
1494
|
placeholder,
|
|
1476
|
-
className:
|
|
1495
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1477
1496
|
onChange,
|
|
1478
1497
|
allowClear: true,
|
|
1479
1498
|
disabled
|
|
@@ -1490,12 +1509,12 @@ function TimePickerRangePicker({
|
|
|
1490
1509
|
}
|
|
1491
1510
|
|
|
1492
1511
|
// src/Select/SelectField/SelectField.tsx
|
|
1493
|
-
import { Select, ConfigProvider as
|
|
1512
|
+
import { Select, ConfigProvider as ConfigProvider9 } from "antd";
|
|
1494
1513
|
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1495
1514
|
function SelectField({
|
|
1496
1515
|
value,
|
|
1497
1516
|
onChange,
|
|
1498
|
-
placeholder,
|
|
1517
|
+
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1499
1518
|
title,
|
|
1500
1519
|
require: require2,
|
|
1501
1520
|
bottomText,
|
|
@@ -1507,26 +1526,21 @@ function SelectField({
|
|
|
1507
1526
|
mode,
|
|
1508
1527
|
prefix,
|
|
1509
1528
|
prefixSize = 20,
|
|
1510
|
-
handleSearch
|
|
1529
|
+
handleSearch,
|
|
1530
|
+
className
|
|
1511
1531
|
}) {
|
|
1512
1532
|
return /* @__PURE__ */ jsx25(
|
|
1513
|
-
|
|
1533
|
+
ConfigProvider9,
|
|
1514
1534
|
{
|
|
1515
1535
|
theme: {
|
|
1516
|
-
components: {
|
|
1517
|
-
Select: {
|
|
1518
|
-
hoverBorderColor: "#D9D9D9",
|
|
1519
|
-
activeBorderColor: "#D9D9D9",
|
|
1520
|
-
activeOutlineColor: "#D9D9D9"
|
|
1521
|
-
}
|
|
1522
|
-
},
|
|
1523
1536
|
token: {
|
|
1524
|
-
fontFamily: "Kanit"
|
|
1537
|
+
fontFamily: "Kanit",
|
|
1538
|
+
fontSize: 16
|
|
1525
1539
|
}
|
|
1526
1540
|
},
|
|
1527
|
-
children: /* @__PURE__ */ jsxs21("div", { children: [
|
|
1541
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "container-input", children: [
|
|
1528
1542
|
/* @__PURE__ */ jsxs21("div", { children: [
|
|
1529
|
-
/* @__PURE__ */ jsx25("span", { className: "body-
|
|
1543
|
+
/* @__PURE__ */ jsx25("span", { className: "body-1", children: title }),
|
|
1530
1544
|
" ",
|
|
1531
1545
|
require2 && /* @__PURE__ */ jsx25("span", { className: "text-red-500", children: "*" })
|
|
1532
1546
|
] }),
|
|
@@ -1537,7 +1551,7 @@ function SelectField({
|
|
|
1537
1551
|
value,
|
|
1538
1552
|
defaultValue,
|
|
1539
1553
|
onChange,
|
|
1540
|
-
className:
|
|
1554
|
+
className: `body-1 flex justify-center w-full ${className ?? ""}`,
|
|
1541
1555
|
placeholder,
|
|
1542
1556
|
optionFilterProp: "label",
|
|
1543
1557
|
filterOption: (input, option) => (option?.label ?? "").toString().toLowerCase().includes(input.toLowerCase()),
|
|
@@ -1560,12 +1574,12 @@ function SelectField({
|
|
|
1560
1574
|
}
|
|
1561
1575
|
|
|
1562
1576
|
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
1563
|
-
import { Select as Select2, ConfigProvider as
|
|
1577
|
+
import { Select as Select2, ConfigProvider as ConfigProvider10 } from "antd";
|
|
1564
1578
|
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1565
1579
|
function SelectFieldGroup({
|
|
1566
1580
|
value,
|
|
1567
1581
|
onChange,
|
|
1568
|
-
placeholder,
|
|
1582
|
+
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1569
1583
|
title,
|
|
1570
1584
|
require: require2,
|
|
1571
1585
|
bottomText,
|
|
@@ -1577,26 +1591,20 @@ function SelectFieldGroup({
|
|
|
1577
1591
|
mode,
|
|
1578
1592
|
prefix,
|
|
1579
1593
|
prefixSize = 20,
|
|
1580
|
-
handleSearch
|
|
1594
|
+
handleSearch,
|
|
1595
|
+
className
|
|
1581
1596
|
}) {
|
|
1582
1597
|
return /* @__PURE__ */ jsx26(
|
|
1583
|
-
|
|
1598
|
+
ConfigProvider10,
|
|
1584
1599
|
{
|
|
1585
1600
|
theme: {
|
|
1586
|
-
components: {
|
|
1587
|
-
Select: {
|
|
1588
|
-
hoverBorderColor: "#D9D9D9",
|
|
1589
|
-
activeBorderColor: "#D9D9D9",
|
|
1590
|
-
activeOutlineColor: "#D9D9D9"
|
|
1591
|
-
}
|
|
1592
|
-
},
|
|
1593
1601
|
token: {
|
|
1594
1602
|
fontFamily: "Kanit"
|
|
1595
1603
|
}
|
|
1596
1604
|
},
|
|
1597
|
-
children: /* @__PURE__ */ jsxs22("div", { children: [
|
|
1605
|
+
children: /* @__PURE__ */ jsxs22("div", { className: "container-input", children: [
|
|
1598
1606
|
/* @__PURE__ */ jsxs22("div", { children: [
|
|
1599
|
-
/* @__PURE__ */ jsx26("span", { className: "body-
|
|
1607
|
+
/* @__PURE__ */ jsx26("span", { className: "body-1", children: title }),
|
|
1600
1608
|
" ",
|
|
1601
1609
|
require2 && /* @__PURE__ */ jsx26("span", { className: "text-red-500", children: "*" })
|
|
1602
1610
|
] }),
|
|
@@ -1607,7 +1615,7 @@ function SelectFieldGroup({
|
|
|
1607
1615
|
value,
|
|
1608
1616
|
defaultValue,
|
|
1609
1617
|
onChange,
|
|
1610
|
-
className:
|
|
1618
|
+
className: `body-1 flex justify-center w-full ${className ?? ""}`,
|
|
1611
1619
|
placeholder,
|
|
1612
1620
|
optionFilterProp: "label",
|
|
1613
1621
|
filterOption: (input, option) => (option?.label ?? "").toString().toLowerCase().includes(input.toLowerCase()),
|
|
@@ -1642,7 +1650,7 @@ function SelectFieldGroup({
|
|
|
1642
1650
|
}
|
|
1643
1651
|
|
|
1644
1652
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
1645
|
-
import { Select as Select3, ConfigProvider as
|
|
1653
|
+
import { Select as Select3, ConfigProvider as ConfigProvider11 } from "antd";
|
|
1646
1654
|
|
|
1647
1655
|
// src/Select/SelectFieldStatus/StatusMockup.ts
|
|
1648
1656
|
var status = [
|
|
@@ -1665,11 +1673,13 @@ function SelectFieldStatus({
|
|
|
1665
1673
|
bottomText,
|
|
1666
1674
|
disabled,
|
|
1667
1675
|
showError,
|
|
1668
|
-
errorMessage
|
|
1676
|
+
errorMessage,
|
|
1677
|
+
options,
|
|
1678
|
+
className
|
|
1669
1679
|
}) {
|
|
1670
1680
|
const selectedItem = status.find((s) => s.value === value);
|
|
1671
1681
|
return /* @__PURE__ */ jsx27(
|
|
1672
|
-
|
|
1682
|
+
ConfigProvider11,
|
|
1673
1683
|
{
|
|
1674
1684
|
theme: {
|
|
1675
1685
|
components: {
|
|
@@ -1684,9 +1694,9 @@ function SelectFieldStatus({
|
|
|
1684
1694
|
fontFamily: "Kanit"
|
|
1685
1695
|
}
|
|
1686
1696
|
},
|
|
1687
|
-
children: /* @__PURE__ */ jsxs23("div", { children: [
|
|
1697
|
+
children: /* @__PURE__ */ jsxs23("div", { className: "container-input", children: [
|
|
1688
1698
|
/* @__PURE__ */ jsxs23("div", { children: [
|
|
1689
|
-
/* @__PURE__ */ jsx27("span", { className: "body-
|
|
1699
|
+
/* @__PURE__ */ jsx27("span", { className: "body-1", children: title }),
|
|
1690
1700
|
" ",
|
|
1691
1701
|
require2 && /* @__PURE__ */ jsx27("span", { className: "text-red-500", children: "*" })
|
|
1692
1702
|
] }),
|
|
@@ -1697,15 +1707,11 @@ function SelectFieldStatus({
|
|
|
1697
1707
|
suffixIcon: /* @__PURE__ */ jsx27(DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
1698
1708
|
value,
|
|
1699
1709
|
onChange,
|
|
1700
|
-
className:
|
|
1710
|
+
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
1701
1711
|
placeholder,
|
|
1702
1712
|
optionFilterProp: "label",
|
|
1703
|
-
|
|
1704
|
-
options
|
|
1705
|
-
value: s.value,
|
|
1706
|
-
label: s.label,
|
|
1707
|
-
color: s.color
|
|
1708
|
-
}))
|
|
1713
|
+
filterOption: (input, option) => (option?.label ?? "").toString().toLowerCase().includes(input.toLowerCase()),
|
|
1714
|
+
options
|
|
1709
1715
|
}
|
|
1710
1716
|
),
|
|
1711
1717
|
/* @__PURE__ */ jsxs23("div", { children: [
|
|
@@ -1719,7 +1725,7 @@ function SelectFieldStatus({
|
|
|
1719
1725
|
}
|
|
1720
1726
|
|
|
1721
1727
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
1722
|
-
import { Select as Select4, ConfigProvider as
|
|
1728
|
+
import { Select as Select4, ConfigProvider as ConfigProvider12 } from "antd";
|
|
1723
1729
|
|
|
1724
1730
|
// src/Select/SelectFieldStatusReport/StatusReportMockup.ts
|
|
1725
1731
|
var status2 = [
|
|
@@ -1739,11 +1745,12 @@ function SelectFieldStatusReport({
|
|
|
1739
1745
|
bottomText,
|
|
1740
1746
|
disabled,
|
|
1741
1747
|
showError,
|
|
1742
|
-
errorMessage
|
|
1748
|
+
errorMessage,
|
|
1749
|
+
className
|
|
1743
1750
|
}) {
|
|
1744
1751
|
const selectedItem = status2.find((s) => s.value === value);
|
|
1745
1752
|
return /* @__PURE__ */ jsx28(
|
|
1746
|
-
|
|
1753
|
+
ConfigProvider12,
|
|
1747
1754
|
{
|
|
1748
1755
|
theme: {
|
|
1749
1756
|
components: {
|
|
@@ -1758,9 +1765,9 @@ function SelectFieldStatusReport({
|
|
|
1758
1765
|
fontFamily: "Kanit"
|
|
1759
1766
|
}
|
|
1760
1767
|
},
|
|
1761
|
-
children: /* @__PURE__ */ jsxs24("div", { children: [
|
|
1768
|
+
children: /* @__PURE__ */ jsxs24("div", { className: "container-input", children: [
|
|
1762
1769
|
/* @__PURE__ */ jsxs24("div", { children: [
|
|
1763
|
-
/* @__PURE__ */ jsx28("span", { className: "body-
|
|
1770
|
+
/* @__PURE__ */ jsx28("span", { className: "body-1", children: title }),
|
|
1764
1771
|
" ",
|
|
1765
1772
|
require2 && /* @__PURE__ */ jsx28("span", { className: "text-red-500", children: "*" })
|
|
1766
1773
|
] }),
|
|
@@ -1771,7 +1778,7 @@ function SelectFieldStatusReport({
|
|
|
1771
1778
|
suffixIcon: /* @__PURE__ */ jsx28(DownOutlined2, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
1772
1779
|
value,
|
|
1773
1780
|
onChange,
|
|
1774
|
-
className:
|
|
1781
|
+
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
1775
1782
|
placeholder,
|
|
1776
1783
|
optionFilterProp: "label",
|
|
1777
1784
|
filterSort: (optionA, optionB) => (optionA?.label ?? "").toLowerCase().localeCompare((optionB?.label ?? "").toLowerCase()),
|
|
@@ -1793,7 +1800,7 @@ function SelectFieldStatusReport({
|
|
|
1793
1800
|
}
|
|
1794
1801
|
|
|
1795
1802
|
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
1796
|
-
import { Select as Select5, ConfigProvider as
|
|
1803
|
+
import { Select as Select5, ConfigProvider as ConfigProvider13 } from "antd";
|
|
1797
1804
|
import { useState as useState6 } from "react";
|
|
1798
1805
|
import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1799
1806
|
function SelectFieldTag({
|
|
@@ -1805,6 +1812,7 @@ function SelectFieldTag({
|
|
|
1805
1812
|
showError,
|
|
1806
1813
|
errorMessage,
|
|
1807
1814
|
value: controlledValue,
|
|
1815
|
+
className,
|
|
1808
1816
|
onChange
|
|
1809
1817
|
}) {
|
|
1810
1818
|
const [internalValue, setInternalValue] = useState6([]);
|
|
@@ -1829,23 +1837,16 @@ function SelectFieldTag({
|
|
|
1829
1837
|
onChange?.([]);
|
|
1830
1838
|
};
|
|
1831
1839
|
return /* @__PURE__ */ jsx29(
|
|
1832
|
-
|
|
1840
|
+
ConfigProvider13,
|
|
1833
1841
|
{
|
|
1834
1842
|
theme: {
|
|
1835
|
-
components: {
|
|
1836
|
-
Select: {
|
|
1837
|
-
hoverBorderColor: "#D9D9D9",
|
|
1838
|
-
activeBorderColor: "#D9D9D9",
|
|
1839
|
-
activeOutlineColor: "#D9D9D9"
|
|
1840
|
-
}
|
|
1841
|
-
},
|
|
1842
1843
|
token: {
|
|
1843
1844
|
fontFamily: "Kanit"
|
|
1844
1845
|
}
|
|
1845
1846
|
},
|
|
1846
|
-
children: /* @__PURE__ */ jsxs25("div", { children: [
|
|
1847
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "container-input", children: [
|
|
1847
1848
|
/* @__PURE__ */ jsxs25("div", { children: [
|
|
1848
|
-
/* @__PURE__ */ jsx29("span", { className: "body-
|
|
1849
|
+
/* @__PURE__ */ jsx29("span", { className: "body-1", children: title }),
|
|
1849
1850
|
" ",
|
|
1850
1851
|
require2 && /* @__PURE__ */ jsx29("span", { className: "text-red-500", children: "*" })
|
|
1851
1852
|
] }),
|
|
@@ -1853,7 +1854,7 @@ function SelectFieldTag({
|
|
|
1853
1854
|
Select5,
|
|
1854
1855
|
{
|
|
1855
1856
|
mode: "tags",
|
|
1856
|
-
className:
|
|
1857
|
+
className: `body-1 flex justify-center w-full ${className ?? ""}`,
|
|
1857
1858
|
placeholder,
|
|
1858
1859
|
value,
|
|
1859
1860
|
onChange: handleChange,
|
|
@@ -1878,7 +1879,7 @@ function SelectFieldTag({
|
|
|
1878
1879
|
}
|
|
1879
1880
|
|
|
1880
1881
|
// src/SortFilter/SortFilter.tsx
|
|
1881
|
-
import { ConfigProvider as
|
|
1882
|
+
import { ConfigProvider as ConfigProvider14 } from "antd";
|
|
1882
1883
|
import { CalendarOutlined } from "@ant-design/icons";
|
|
1883
1884
|
|
|
1884
1885
|
// src/SortFilter/DataMockSortFilter.ts
|
|
@@ -1923,7 +1924,7 @@ function SortFilter({
|
|
|
1923
1924
|
const [monthValue, setMonthValue] = useState7();
|
|
1924
1925
|
const [quarterValue, setQuartersValue] = useState7();
|
|
1925
1926
|
return /* @__PURE__ */ jsx30(
|
|
1926
|
-
|
|
1927
|
+
ConfigProvider14,
|
|
1927
1928
|
{
|
|
1928
1929
|
theme: {
|
|
1929
1930
|
token: {
|
|
@@ -1998,7 +1999,7 @@ function SortFilter({
|
|
|
1998
1999
|
// src/Upload/FileUploader/FileUploader.tsx
|
|
1999
2000
|
import { IconPaperclip, IconUpload, IconTrash } from "@tabler/icons-react";
|
|
2000
2001
|
import { useRef as useRef2, useState as useState8 } from "react";
|
|
2001
|
-
import { Fragment as
|
|
2002
|
+
import { Fragment as Fragment5, jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2002
2003
|
function FileUploader({
|
|
2003
2004
|
onUpload,
|
|
2004
2005
|
onError,
|
|
@@ -2080,10 +2081,10 @@ function FileUploader({
|
|
|
2080
2081
|
className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
|
|
2081
2082
|
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
2082
2083
|
disabled: disabled ? disabled : uploading,
|
|
2083
|
-
children: uploading ? /* @__PURE__ */ jsxs27(
|
|
2084
|
+
children: uploading ? /* @__PURE__ */ jsxs27(Fragment5, { children: [
|
|
2084
2085
|
/* @__PURE__ */ jsx31(Loader, { size: 15 }),
|
|
2085
2086
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
2086
|
-
] }) : /* @__PURE__ */ jsxs27(
|
|
2087
|
+
] }) : /* @__PURE__ */ jsxs27(Fragment5, { children: [
|
|
2087
2088
|
/* @__PURE__ */ jsx31(IconUpload, { size: 15, className: "text-gray-400" }),
|
|
2088
2089
|
" \u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C"
|
|
2089
2090
|
] })
|
|
@@ -2165,7 +2166,7 @@ function messageLoading(content, duration) {
|
|
|
2165
2166
|
}
|
|
2166
2167
|
|
|
2167
2168
|
// src/Breadcrumb/Breadcrumb.tsx
|
|
2168
|
-
import { ConfigProvider as
|
|
2169
|
+
import { ConfigProvider as ConfigProvider15 } from "antd";
|
|
2169
2170
|
import { Breadcrumb } from "antd";
|
|
2170
2171
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2171
2172
|
function Breadcrumbs({
|
|
@@ -2176,7 +2177,7 @@ function Breadcrumbs({
|
|
|
2176
2177
|
params
|
|
2177
2178
|
}) {
|
|
2178
2179
|
return /* @__PURE__ */ jsx32(
|
|
2179
|
-
|
|
2180
|
+
ConfigProvider15,
|
|
2180
2181
|
{
|
|
2181
2182
|
theme: {
|
|
2182
2183
|
token: {
|
|
@@ -2198,7 +2199,7 @@ function Breadcrumbs({
|
|
|
2198
2199
|
}
|
|
2199
2200
|
|
|
2200
2201
|
// src/HeadingPage/HeadingPage.tsx
|
|
2201
|
-
import { ConfigProvider as
|
|
2202
|
+
import { ConfigProvider as ConfigProvider16 } from "antd";
|
|
2202
2203
|
import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2203
2204
|
function HeadingPage({ Heading }) {
|
|
2204
2205
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
@@ -2208,7 +2209,7 @@ function HeadingPage({ Heading }) {
|
|
|
2208
2209
|
year: "numeric"
|
|
2209
2210
|
});
|
|
2210
2211
|
return /* @__PURE__ */ jsx33(
|
|
2211
|
-
|
|
2212
|
+
ConfigProvider16,
|
|
2212
2213
|
{
|
|
2213
2214
|
theme: {
|
|
2214
2215
|
token: {
|
|
@@ -2227,7 +2228,7 @@ function HeadingPage({ Heading }) {
|
|
|
2227
2228
|
}
|
|
2228
2229
|
|
|
2229
2230
|
// src/Progress/ProgressBar.tsx
|
|
2230
|
-
import { ConfigProvider as
|
|
2231
|
+
import { ConfigProvider as ConfigProvider17, Progress } from "antd";
|
|
2231
2232
|
import { useEffect as useEffect2, useRef as useRef3, useState as useState9 } from "react";
|
|
2232
2233
|
import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2233
2234
|
function ProgressBar({
|
|
@@ -2263,7 +2264,7 @@ function ProgressBar({
|
|
|
2263
2264
|
return () => observer.disconnect();
|
|
2264
2265
|
}, []);
|
|
2265
2266
|
return /* @__PURE__ */ jsx34(
|
|
2266
|
-
|
|
2267
|
+
ConfigProvider17,
|
|
2267
2268
|
{
|
|
2268
2269
|
theme: {
|
|
2269
2270
|
token: {
|