@esic-lab/data-core-ui 0.0.15 → 0.0.17
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 +690 -9
- package/dist/index.d.mts +766 -12
- package/dist/index.d.ts +766 -12
- package/dist/index.js +2052 -101
- package/dist/index.mjs +2044 -95
- package/package.json +12 -3
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,457 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// node_modules/dayjs/dayjs.min.js
|
|
28
|
+
var require_dayjs_min = __commonJS({
|
|
29
|
+
"node_modules/dayjs/dayjs.min.js"(exports, module) {
|
|
30
|
+
"use strict";
|
|
31
|
+
!(function(t, e) {
|
|
32
|
+
"object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
|
|
33
|
+
})(exports, (function() {
|
|
34
|
+
"use strict";
|
|
35
|
+
var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
|
|
36
|
+
var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
|
|
37
|
+
return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
|
|
38
|
+
} }, m = function(t2, e2, n2) {
|
|
39
|
+
var r2 = String(t2);
|
|
40
|
+
return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
|
|
41
|
+
}, v = { s: m, z: function(t2) {
|
|
42
|
+
var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
|
|
43
|
+
return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
|
|
44
|
+
}, m: function t2(e2, n2) {
|
|
45
|
+
if (e2.date() < n2.date()) return -t2(n2, e2);
|
|
46
|
+
var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
|
|
47
|
+
return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
|
|
48
|
+
}, a: function(t2) {
|
|
49
|
+
return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
|
|
50
|
+
}, p: function(t2) {
|
|
51
|
+
return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
|
|
52
|
+
}, u: function(t2) {
|
|
53
|
+
return void 0 === t2;
|
|
54
|
+
} }, g = "en", D = {};
|
|
55
|
+
D[g] = M;
|
|
56
|
+
var p = "$isDayjsObject", S = function(t2) {
|
|
57
|
+
return t2 instanceof _ || !(!t2 || !t2[p]);
|
|
58
|
+
}, w = function t2(e2, n2, r2) {
|
|
59
|
+
var i2;
|
|
60
|
+
if (!e2) return g;
|
|
61
|
+
if ("string" == typeof e2) {
|
|
62
|
+
var s2 = e2.toLowerCase();
|
|
63
|
+
D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
|
|
64
|
+
var u2 = e2.split("-");
|
|
65
|
+
if (!i2 && u2.length > 1) return t2(u2[0]);
|
|
66
|
+
} else {
|
|
67
|
+
var a2 = e2.name;
|
|
68
|
+
D[a2] = e2, i2 = a2;
|
|
69
|
+
}
|
|
70
|
+
return !r2 && i2 && (g = i2), i2 || !r2 && g;
|
|
71
|
+
}, O = function(t2, e2) {
|
|
72
|
+
if (S(t2)) return t2.clone();
|
|
73
|
+
var n2 = "object" == typeof e2 ? e2 : {};
|
|
74
|
+
return n2.date = t2, n2.args = arguments, new _(n2);
|
|
75
|
+
}, b = v;
|
|
76
|
+
b.l = w, b.i = S, b.w = function(t2, e2) {
|
|
77
|
+
return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
|
|
78
|
+
};
|
|
79
|
+
var _ = (function() {
|
|
80
|
+
function M2(t2) {
|
|
81
|
+
this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
|
|
82
|
+
}
|
|
83
|
+
var m2 = M2.prototype;
|
|
84
|
+
return m2.parse = function(t2) {
|
|
85
|
+
this.$d = (function(t3) {
|
|
86
|
+
var e2 = t3.date, n2 = t3.utc;
|
|
87
|
+
if (null === e2) return /* @__PURE__ */ new Date(NaN);
|
|
88
|
+
if (b.u(e2)) return /* @__PURE__ */ new Date();
|
|
89
|
+
if (e2 instanceof Date) return new Date(e2);
|
|
90
|
+
if ("string" == typeof e2 && !/Z$/i.test(e2)) {
|
|
91
|
+
var r2 = e2.match($);
|
|
92
|
+
if (r2) {
|
|
93
|
+
var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
|
|
94
|
+
return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return new Date(e2);
|
|
98
|
+
})(t2), this.init();
|
|
99
|
+
}, m2.init = function() {
|
|
100
|
+
var t2 = this.$d;
|
|
101
|
+
this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
|
|
102
|
+
}, m2.$utils = function() {
|
|
103
|
+
return b;
|
|
104
|
+
}, m2.isValid = function() {
|
|
105
|
+
return !(this.$d.toString() === l);
|
|
106
|
+
}, m2.isSame = function(t2, e2) {
|
|
107
|
+
var n2 = O(t2);
|
|
108
|
+
return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
|
|
109
|
+
}, m2.isAfter = function(t2, e2) {
|
|
110
|
+
return O(t2) < this.startOf(e2);
|
|
111
|
+
}, m2.isBefore = function(t2, e2) {
|
|
112
|
+
return this.endOf(e2) < O(t2);
|
|
113
|
+
}, m2.$g = function(t2, e2, n2) {
|
|
114
|
+
return b.u(t2) ? this[e2] : this.set(n2, t2);
|
|
115
|
+
}, m2.unix = function() {
|
|
116
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
117
|
+
}, m2.valueOf = function() {
|
|
118
|
+
return this.$d.getTime();
|
|
119
|
+
}, m2.startOf = function(t2, e2) {
|
|
120
|
+
var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
|
|
121
|
+
var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
|
|
122
|
+
return r2 ? i2 : i2.endOf(a);
|
|
123
|
+
}, $2 = function(t3, e3) {
|
|
124
|
+
return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
|
|
125
|
+
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
|
|
126
|
+
switch (f2) {
|
|
127
|
+
case h:
|
|
128
|
+
return r2 ? l2(1, 0) : l2(31, 11);
|
|
129
|
+
case c:
|
|
130
|
+
return r2 ? l2(1, M3) : l2(0, M3 + 1);
|
|
131
|
+
case o:
|
|
132
|
+
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
|
133
|
+
return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
|
|
134
|
+
case a:
|
|
135
|
+
case d:
|
|
136
|
+
return $2(v2 + "Hours", 0);
|
|
137
|
+
case u:
|
|
138
|
+
return $2(v2 + "Minutes", 1);
|
|
139
|
+
case s:
|
|
140
|
+
return $2(v2 + "Seconds", 2);
|
|
141
|
+
case i:
|
|
142
|
+
return $2(v2 + "Milliseconds", 3);
|
|
143
|
+
default:
|
|
144
|
+
return this.clone();
|
|
145
|
+
}
|
|
146
|
+
}, m2.endOf = function(t2) {
|
|
147
|
+
return this.startOf(t2, false);
|
|
148
|
+
}, m2.$set = function(t2, e2) {
|
|
149
|
+
var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
|
|
150
|
+
if (o2 === c || o2 === h) {
|
|
151
|
+
var y2 = this.clone().set(d, 1);
|
|
152
|
+
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
|
153
|
+
} else l2 && this.$d[l2]($2);
|
|
154
|
+
return this.init(), this;
|
|
155
|
+
}, m2.set = function(t2, e2) {
|
|
156
|
+
return this.clone().$set(t2, e2);
|
|
157
|
+
}, m2.get = function(t2) {
|
|
158
|
+
return this[b.p(t2)]();
|
|
159
|
+
}, m2.add = function(r2, f2) {
|
|
160
|
+
var d2, l2 = this;
|
|
161
|
+
r2 = Number(r2);
|
|
162
|
+
var $2 = b.p(f2), y2 = function(t2) {
|
|
163
|
+
var e2 = O(l2);
|
|
164
|
+
return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
|
|
165
|
+
};
|
|
166
|
+
if ($2 === c) return this.set(c, this.$M + r2);
|
|
167
|
+
if ($2 === h) return this.set(h, this.$y + r2);
|
|
168
|
+
if ($2 === a) return y2(1);
|
|
169
|
+
if ($2 === o) return y2(7);
|
|
170
|
+
var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
|
|
171
|
+
return b.w(m3, this);
|
|
172
|
+
}, m2.subtract = function(t2, e2) {
|
|
173
|
+
return this.add(-1 * t2, e2);
|
|
174
|
+
}, m2.format = function(t2) {
|
|
175
|
+
var e2 = this, n2 = this.$locale();
|
|
176
|
+
if (!this.isValid()) return n2.invalidDate || l;
|
|
177
|
+
var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
|
|
178
|
+
return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
|
|
179
|
+
}, d2 = function(t3) {
|
|
180
|
+
return b.s(s2 % 12 || 12, t3, "0");
|
|
181
|
+
}, $2 = f2 || function(t3, e3, n3) {
|
|
182
|
+
var r3 = t3 < 12 ? "AM" : "PM";
|
|
183
|
+
return n3 ? r3.toLowerCase() : r3;
|
|
184
|
+
};
|
|
185
|
+
return r2.replace(y, (function(t3, r3) {
|
|
186
|
+
return r3 || (function(t4) {
|
|
187
|
+
switch (t4) {
|
|
188
|
+
case "YY":
|
|
189
|
+
return String(e2.$y).slice(-2);
|
|
190
|
+
case "YYYY":
|
|
191
|
+
return b.s(e2.$y, 4, "0");
|
|
192
|
+
case "M":
|
|
193
|
+
return a2 + 1;
|
|
194
|
+
case "MM":
|
|
195
|
+
return b.s(a2 + 1, 2, "0");
|
|
196
|
+
case "MMM":
|
|
197
|
+
return h2(n2.monthsShort, a2, c2, 3);
|
|
198
|
+
case "MMMM":
|
|
199
|
+
return h2(c2, a2);
|
|
200
|
+
case "D":
|
|
201
|
+
return e2.$D;
|
|
202
|
+
case "DD":
|
|
203
|
+
return b.s(e2.$D, 2, "0");
|
|
204
|
+
case "d":
|
|
205
|
+
return String(e2.$W);
|
|
206
|
+
case "dd":
|
|
207
|
+
return h2(n2.weekdaysMin, e2.$W, o2, 2);
|
|
208
|
+
case "ddd":
|
|
209
|
+
return h2(n2.weekdaysShort, e2.$W, o2, 3);
|
|
210
|
+
case "dddd":
|
|
211
|
+
return o2[e2.$W];
|
|
212
|
+
case "H":
|
|
213
|
+
return String(s2);
|
|
214
|
+
case "HH":
|
|
215
|
+
return b.s(s2, 2, "0");
|
|
216
|
+
case "h":
|
|
217
|
+
return d2(1);
|
|
218
|
+
case "hh":
|
|
219
|
+
return d2(2);
|
|
220
|
+
case "a":
|
|
221
|
+
return $2(s2, u2, true);
|
|
222
|
+
case "A":
|
|
223
|
+
return $2(s2, u2, false);
|
|
224
|
+
case "m":
|
|
225
|
+
return String(u2);
|
|
226
|
+
case "mm":
|
|
227
|
+
return b.s(u2, 2, "0");
|
|
228
|
+
case "s":
|
|
229
|
+
return String(e2.$s);
|
|
230
|
+
case "ss":
|
|
231
|
+
return b.s(e2.$s, 2, "0");
|
|
232
|
+
case "SSS":
|
|
233
|
+
return b.s(e2.$ms, 3, "0");
|
|
234
|
+
case "Z":
|
|
235
|
+
return i2;
|
|
236
|
+
}
|
|
237
|
+
return null;
|
|
238
|
+
})(t3) || i2.replace(":", "");
|
|
239
|
+
}));
|
|
240
|
+
}, m2.utcOffset = function() {
|
|
241
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
242
|
+
}, m2.diff = function(r2, d2, l2) {
|
|
243
|
+
var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
|
|
244
|
+
return b.m(y2, m3);
|
|
245
|
+
};
|
|
246
|
+
switch (M3) {
|
|
247
|
+
case h:
|
|
248
|
+
$2 = D2() / 12;
|
|
249
|
+
break;
|
|
250
|
+
case c:
|
|
251
|
+
$2 = D2();
|
|
252
|
+
break;
|
|
253
|
+
case f:
|
|
254
|
+
$2 = D2() / 3;
|
|
255
|
+
break;
|
|
256
|
+
case o:
|
|
257
|
+
$2 = (g2 - v2) / 6048e5;
|
|
258
|
+
break;
|
|
259
|
+
case a:
|
|
260
|
+
$2 = (g2 - v2) / 864e5;
|
|
261
|
+
break;
|
|
262
|
+
case u:
|
|
263
|
+
$2 = g2 / n;
|
|
264
|
+
break;
|
|
265
|
+
case s:
|
|
266
|
+
$2 = g2 / e;
|
|
267
|
+
break;
|
|
268
|
+
case i:
|
|
269
|
+
$2 = g2 / t;
|
|
270
|
+
break;
|
|
271
|
+
default:
|
|
272
|
+
$2 = g2;
|
|
273
|
+
}
|
|
274
|
+
return l2 ? $2 : b.a($2);
|
|
275
|
+
}, m2.daysInMonth = function() {
|
|
276
|
+
return this.endOf(c).$D;
|
|
277
|
+
}, m2.$locale = function() {
|
|
278
|
+
return D[this.$L];
|
|
279
|
+
}, m2.locale = function(t2, e2) {
|
|
280
|
+
if (!t2) return this.$L;
|
|
281
|
+
var n2 = this.clone(), r2 = w(t2, e2, true);
|
|
282
|
+
return r2 && (n2.$L = r2), n2;
|
|
283
|
+
}, m2.clone = function() {
|
|
284
|
+
return b.w(this.$d, this);
|
|
285
|
+
}, m2.toDate = function() {
|
|
286
|
+
return new Date(this.valueOf());
|
|
287
|
+
}, m2.toJSON = function() {
|
|
288
|
+
return this.isValid() ? this.toISOString() : null;
|
|
289
|
+
}, m2.toISOString = function() {
|
|
290
|
+
return this.$d.toISOString();
|
|
291
|
+
}, m2.toString = function() {
|
|
292
|
+
return this.$d.toUTCString();
|
|
293
|
+
}, M2;
|
|
294
|
+
})(), k = _.prototype;
|
|
295
|
+
return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach((function(t2) {
|
|
296
|
+
k[t2[1]] = function(e2) {
|
|
297
|
+
return this.$g(e2, t2[0], t2[1]);
|
|
298
|
+
};
|
|
299
|
+
})), O.extend = function(t2, e2) {
|
|
300
|
+
return t2.$i || (t2(e2, _, O), t2.$i = true), O;
|
|
301
|
+
}, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
|
|
302
|
+
return O(1e3 * t2);
|
|
303
|
+
}, O.en = D[g], O.Ls = D, O.p = {}, O;
|
|
304
|
+
}));
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
// node_modules/dayjs/locale/th.js
|
|
309
|
+
var require_th = __commonJS({
|
|
310
|
+
"node_modules/dayjs/locale/th.js"(exports, module) {
|
|
311
|
+
"use strict";
|
|
312
|
+
!(function(_, e) {
|
|
313
|
+
"object" == typeof exports && "undefined" != typeof module ? module.exports = e(require_dayjs_min()) : "function" == typeof define && define.amd ? define(["dayjs"], e) : (_ = "undefined" != typeof globalThis ? globalThis : _ || self).dayjs_locale_th = e(_.dayjs);
|
|
314
|
+
})(exports, (function(_) {
|
|
315
|
+
"use strict";
|
|
316
|
+
function e(_2) {
|
|
317
|
+
return _2 && "object" == typeof _2 && "default" in _2 ? _2 : { default: _2 };
|
|
318
|
+
}
|
|
319
|
+
var t = e(_), d = { name: "th", weekdays: "\u0E2D\u0E32\u0E17\u0E34\u0E15\u0E22\u0E4C_\u0E08\u0E31\u0E19\u0E17\u0E23\u0E4C_\u0E2D\u0E31\u0E07\u0E04\u0E32\u0E23_\u0E1E\u0E38\u0E18_\u0E1E\u0E24\u0E2B\u0E31\u0E2A\u0E1A\u0E14\u0E35_\u0E28\u0E38\u0E01\u0E23\u0E4C_\u0E40\u0E2A\u0E32\u0E23\u0E4C".split("_"), weekdaysShort: "\u0E2D\u0E32\u0E17\u0E34\u0E15\u0E22\u0E4C_\u0E08\u0E31\u0E19\u0E17\u0E23\u0E4C_\u0E2D\u0E31\u0E07\u0E04\u0E32\u0E23_\u0E1E\u0E38\u0E18_\u0E1E\u0E24\u0E2B\u0E31\u0E2A_\u0E28\u0E38\u0E01\u0E23\u0E4C_\u0E40\u0E2A\u0E32\u0E23\u0E4C".split("_"), weekdaysMin: "\u0E2D\u0E32._\u0E08._\u0E2D._\u0E1E._\u0E1E\u0E24._\u0E28._\u0E2A.".split("_"), months: "\u0E21\u0E01\u0E23\u0E32\u0E04\u0E21_\u0E01\u0E38\u0E21\u0E20\u0E32\u0E1E\u0E31\u0E19\u0E18\u0E4C_\u0E21\u0E35\u0E19\u0E32\u0E04\u0E21_\u0E40\u0E21\u0E29\u0E32\u0E22\u0E19_\u0E1E\u0E24\u0E29\u0E20\u0E32\u0E04\u0E21_\u0E21\u0E34\u0E16\u0E38\u0E19\u0E32\u0E22\u0E19_\u0E01\u0E23\u0E01\u0E0E\u0E32\u0E04\u0E21_\u0E2A\u0E34\u0E07\u0E2B\u0E32\u0E04\u0E21_\u0E01\u0E31\u0E19\u0E22\u0E32\u0E22\u0E19_\u0E15\u0E38\u0E25\u0E32\u0E04\u0E21_\u0E1E\u0E24\u0E28\u0E08\u0E34\u0E01\u0E32\u0E22\u0E19_\u0E18\u0E31\u0E19\u0E27\u0E32\u0E04\u0E21".split("_"), monthsShort: "\u0E21.\u0E04._\u0E01.\u0E1E._\u0E21\u0E35.\u0E04._\u0E40\u0E21.\u0E22._\u0E1E.\u0E04._\u0E21\u0E34.\u0E22._\u0E01.\u0E04._\u0E2A.\u0E04._\u0E01.\u0E22._\u0E15.\u0E04._\u0E1E.\u0E22._\u0E18.\u0E04.".split("_"), formats: { LT: "H:mm", LTS: "H:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY \u0E40\u0E27\u0E25\u0E32 H:mm", LLLL: "\u0E27\u0E31\u0E19dddd\u0E17\u0E35\u0E48 D MMMM YYYY \u0E40\u0E27\u0E25\u0E32 H:mm" }, relativeTime: { future: "\u0E2D\u0E35\u0E01 %s", past: "%s\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27", s: "\u0E44\u0E21\u0E48\u0E01\u0E35\u0E48\u0E27\u0E34\u0E19\u0E32\u0E17\u0E35", m: "1 \u0E19\u0E32\u0E17\u0E35", mm: "%d \u0E19\u0E32\u0E17\u0E35", h: "1 \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07", hh: "%d \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07", d: "1 \u0E27\u0E31\u0E19", dd: "%d \u0E27\u0E31\u0E19", M: "1 \u0E40\u0E14\u0E37\u0E2D\u0E19", MM: "%d \u0E40\u0E14\u0E37\u0E2D\u0E19", y: "1 \u0E1B\u0E35", yy: "%d \u0E1B\u0E35" }, ordinal: function(_2) {
|
|
320
|
+
return _2 + ".";
|
|
321
|
+
} };
|
|
322
|
+
return t.default.locale(d, null, true), d;
|
|
323
|
+
}));
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
|
|
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
|
+
|
|
1
455
|
// src/Button/PrimaryButton/PrimaryButton.tsx
|
|
2
456
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
457
|
function PrimaryButton({
|
|
@@ -6,13 +460,17 @@ function PrimaryButton({
|
|
|
6
460
|
iconLeft,
|
|
7
461
|
iconRight,
|
|
8
462
|
bgColor = "bg-primary-500",
|
|
9
|
-
textColor = "black"
|
|
463
|
+
textColor = "black",
|
|
464
|
+
disabled
|
|
10
465
|
}) {
|
|
11
466
|
return /* @__PURE__ */ jsx(
|
|
12
467
|
"button",
|
|
13
468
|
{
|
|
14
|
-
className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] cursor-pointer ${bgColor} text-${textColor} body-1`,
|
|
15
469
|
onClick,
|
|
470
|
+
disabled,
|
|
471
|
+
className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] body-1 transition
|
|
472
|
+
${disabled ? "text-gray-400 bg-gray-100 cursor-not-allowed" : `${bgColor} text-${textColor} cursor-pointer
|
|
473
|
+
hover:brightness-95 active:brightness-90`}`,
|
|
16
474
|
children: /* @__PURE__ */ jsxs("div", { className: "flex justify-center items-center gap-[10px]", children: [
|
|
17
475
|
iconLeft && /* @__PURE__ */ jsx("div", { children: iconLeft }),
|
|
18
476
|
title,
|
|
@@ -24,12 +482,13 @@ function PrimaryButton({
|
|
|
24
482
|
|
|
25
483
|
// src/Button/SecondaryButton/SecondaryButton.tsx
|
|
26
484
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
27
|
-
function SecondaryButton({ title, onClick, iconLeft, iconRight }) {
|
|
485
|
+
function SecondaryButton({ title, onClick, iconLeft, iconRight, disabled }) {
|
|
28
486
|
return /* @__PURE__ */ jsx2(
|
|
29
487
|
"button",
|
|
30
488
|
{
|
|
31
|
-
className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] border-[1px] border-black cursor-pointer bg-white text-black body-1`,
|
|
32
489
|
onClick,
|
|
490
|
+
disabled,
|
|
491
|
+
className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] border-[1px] body-1 transition ${disabled ? "text-gray-400 border-gray-400 bg-gray-100 cursor-not-allowed" : "cursor-pointer bg-white border-black text-black hover:bg-gray-100 active:bg-gray-200"}`,
|
|
33
492
|
children: /* @__PURE__ */ jsxs2("div", { className: "flex justify-center items-center gap-[10px]", children: [
|
|
34
493
|
iconLeft && /* @__PURE__ */ jsx2("div", { children: iconLeft }),
|
|
35
494
|
title,
|
|
@@ -41,12 +500,14 @@ function SecondaryButton({ title, onClick, iconLeft, iconRight }) {
|
|
|
41
500
|
|
|
42
501
|
// src/Button/GhostButton/GhostButton.tsx
|
|
43
502
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
44
|
-
function GhostButton({ title, onClick, iconLeft, iconRight }) {
|
|
503
|
+
function GhostButton({ title, onClick, iconLeft, iconRight, disabled }) {
|
|
45
504
|
return /* @__PURE__ */ jsx3(
|
|
46
505
|
"button",
|
|
47
506
|
{
|
|
48
|
-
className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] cursor-pointer bg-[#E9E9E9] body-1`,
|
|
49
507
|
onClick,
|
|
508
|
+
disabled,
|
|
509
|
+
className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] body-1 transition
|
|
510
|
+
${disabled ? "text-gray-400 bg-gray-100 cursor-not-allowed" : "bg-[#E9E9E9] cursor-pointer hover:bg-[#d6d6d6] active:bg-[#c4c4c4]"}`,
|
|
50
511
|
children: /* @__PURE__ */ jsxs3("div", { className: "flex justify-center items-center gap-[10px]", children: [
|
|
51
512
|
iconLeft && /* @__PURE__ */ jsx3("div", { children: iconLeft }),
|
|
52
513
|
title,
|
|
@@ -58,12 +519,19 @@ function GhostButton({ title, onClick, iconLeft, iconRight }) {
|
|
|
58
519
|
|
|
59
520
|
// src/Loader/Loader/Loader.tsx
|
|
60
521
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
61
|
-
function Loader({ size = 25 }) {
|
|
522
|
+
function Loader({ size = 25, color = "#000000" }) {
|
|
62
523
|
return /* @__PURE__ */ jsx4(
|
|
63
524
|
"div",
|
|
64
525
|
{
|
|
65
|
-
style: {
|
|
66
|
-
|
|
526
|
+
style: {
|
|
527
|
+
width: size,
|
|
528
|
+
height: size,
|
|
529
|
+
borderWidth: 4,
|
|
530
|
+
borderStyle: "solid",
|
|
531
|
+
borderColor: color,
|
|
532
|
+
borderTopColor: "transparent"
|
|
533
|
+
},
|
|
534
|
+
className: "rounded-full animate-spin"
|
|
67
535
|
}
|
|
68
536
|
);
|
|
69
537
|
}
|
|
@@ -71,42 +539,74 @@ function Loader({ size = 25 }) {
|
|
|
71
539
|
// src/Checkbox/Checkbox/Checkbox.tsx
|
|
72
540
|
import { IconCheck } from "@tabler/icons-react";
|
|
73
541
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
74
|
-
function Checkbox({ label, checked, onChange }) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
542
|
+
function Checkbox({ label, checked, onChange, disabled }) {
|
|
543
|
+
const handleClick = () => {
|
|
544
|
+
if (!disabled) {
|
|
545
|
+
onChange(!checked);
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
return /* @__PURE__ */ jsxs4(
|
|
549
|
+
"div",
|
|
550
|
+
{
|
|
551
|
+
className: `flex gap-[10px] items-center
|
|
552
|
+
${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"}`,
|
|
553
|
+
"aria-disabled": disabled,
|
|
554
|
+
onClick: handleClick,
|
|
555
|
+
children: [
|
|
556
|
+
/* @__PURE__ */ jsx5(
|
|
557
|
+
"div",
|
|
84
558
|
{
|
|
85
|
-
className: `flex justify-center items-center transition-
|
|
559
|
+
className: `flex justify-center items-center border-[1px] border-black w-[24px] h-[24px] rounded-[8px] transition-colors duration-100
|
|
560
|
+
${checked ? "bg-black text-white" : "bg-white text-black"}
|
|
561
|
+
${disabled ? "pointer-events-none" : ""}`,
|
|
562
|
+
children: /* @__PURE__ */ jsx5(
|
|
563
|
+
"span",
|
|
564
|
+
{
|
|
565
|
+
className: `flex justify-center items-center transition-transform duration-150
|
|
86
566
|
${checked ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
87
|
-
|
|
567
|
+
children: /* @__PURE__ */ jsx5(IconCheck, { size: 20 })
|
|
568
|
+
}
|
|
569
|
+
)
|
|
88
570
|
}
|
|
89
|
-
)
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
571
|
+
),
|
|
572
|
+
label && /* @__PURE__ */ jsx5("p", { className: "body-1 select-none", children: label })
|
|
573
|
+
]
|
|
574
|
+
}
|
|
575
|
+
);
|
|
94
576
|
}
|
|
95
577
|
|
|
96
578
|
// src/Checkbox/CheckboxGroup/CheckboxGroup.tsx
|
|
97
579
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
98
580
|
function CheckboxGroup({ options, onChange, alignment = "vertical" }) {
|
|
99
|
-
return /* @__PURE__ */ jsx6("div", { className: `flex gap-4 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ jsx6(
|
|
581
|
+
return /* @__PURE__ */ jsx6("div", { className: `flex gap-4 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ jsx6(
|
|
582
|
+
Checkbox,
|
|
583
|
+
{
|
|
584
|
+
checked: opt.checked,
|
|
585
|
+
label: opt.label,
|
|
586
|
+
onChange: () => onChange(opt.label),
|
|
587
|
+
disabled: opt.disabled
|
|
588
|
+
},
|
|
589
|
+
opt.label
|
|
590
|
+
)) });
|
|
100
591
|
}
|
|
101
592
|
|
|
102
593
|
// src/Radio/Radio/Radio.tsx
|
|
103
594
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
104
|
-
function Radio({ selected, onChange }) {
|
|
595
|
+
function Radio({ selected, onChange, disabled }) {
|
|
596
|
+
const handleClick = () => {
|
|
597
|
+
if (!disabled) {
|
|
598
|
+
onChange(!selected);
|
|
599
|
+
}
|
|
600
|
+
};
|
|
105
601
|
return /* @__PURE__ */ jsx7(
|
|
106
602
|
"div",
|
|
107
603
|
{
|
|
108
|
-
className:
|
|
109
|
-
|
|
604
|
+
className: `
|
|
605
|
+
flex justify-center items-center w-[16px] h-[16px] border-[1px] border-black rounded-full
|
|
606
|
+
${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"}
|
|
607
|
+
`,
|
|
608
|
+
onClick: handleClick,
|
|
609
|
+
"aria-disabled": disabled,
|
|
110
610
|
children: selected && /* @__PURE__ */ jsx7("div", { className: `bg-black w-[10px] h-[10px] rounded-full transition-all duration-300` })
|
|
111
611
|
}
|
|
112
612
|
);
|
|
@@ -116,28 +616,38 @@ function Radio({ selected, onChange }) {
|
|
|
116
616
|
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
117
617
|
function RadioGroup({ options, value, onChange, alignment = "horizontal" }) {
|
|
118
618
|
return /* @__PURE__ */ jsx8("div", { className: `flex gap-2 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ jsxs5("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
119
|
-
/* @__PURE__ */ jsx8(Radio, { selected: value === opt.value, onChange: () => onChange(opt.value) }),
|
|
120
|
-
/* @__PURE__ */ jsx8("span", { className:
|
|
619
|
+
/* @__PURE__ */ jsx8(Radio, { selected: value === opt.value, onChange: () => onChange(opt.value), disabled: opt.disabled }),
|
|
620
|
+
/* @__PURE__ */ jsx8("span", { className: `body-1 ${opt.disabled ? "text-gray-400 cursor-not-allowed" : ""}`, children: opt.label })
|
|
121
621
|
] }, opt.value)) });
|
|
122
622
|
}
|
|
123
623
|
|
|
124
624
|
// src/Switch/Switch/Switch.tsx
|
|
125
625
|
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
126
|
-
function Switch({ label, checked, onChange }) {
|
|
127
|
-
|
|
128
|
-
|
|
626
|
+
function Switch({ label, checked, onChange, disabled }) {
|
|
627
|
+
const handleClick = () => {
|
|
628
|
+
if (!disabled) {
|
|
629
|
+
onChange(!checked);
|
|
630
|
+
}
|
|
631
|
+
};
|
|
632
|
+
return /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-[10px]", children: [
|
|
633
|
+
label && /* @__PURE__ */ jsx9("p", { className: `body-1 ${disabled ? "opacity-50 select-none" : ""}`, children: label }),
|
|
129
634
|
/* @__PURE__ */ jsx9(
|
|
130
635
|
"button",
|
|
131
636
|
{
|
|
132
637
|
type: "button",
|
|
133
|
-
onClick:
|
|
134
|
-
|
|
135
|
-
|
|
638
|
+
onClick: handleClick,
|
|
639
|
+
disabled,
|
|
640
|
+
"aria-disabled": disabled,
|
|
641
|
+
className: `
|
|
642
|
+
w-13 h-7 flex items-center rounded-full p-1 transition-colors duration-300
|
|
643
|
+
${checked ? "bg-blue-500" : "bg-gray-300"}
|
|
644
|
+
${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"}
|
|
645
|
+
`,
|
|
136
646
|
children: /* @__PURE__ */ jsx9(
|
|
137
647
|
"div",
|
|
138
648
|
{
|
|
139
649
|
className: `bg-white w-5 h-5 rounded-full shadow-md transform transition-transform duration-300
|
|
140
|
-
|
|
650
|
+
${checked ? "translate-x-6" : "translate-x-0"}`
|
|
141
651
|
}
|
|
142
652
|
)
|
|
143
653
|
}
|
|
@@ -169,54 +679,236 @@ function MenuNavBar({ menus, onClick }) {
|
|
|
169
679
|
] }, `menu_${menu.title}`)) });
|
|
170
680
|
}
|
|
171
681
|
|
|
682
|
+
// src/NavBar/MenuNavBar/Sidebar.tsx
|
|
683
|
+
import { IconChevronLeftPipe, IconChevronRightPipe } from "@tabler/icons-react";
|
|
684
|
+
import { createContext, useContext, useState } from "react";
|
|
685
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
686
|
+
var SidebarContext = createContext({ expanded: false });
|
|
687
|
+
function Sidebar({ children, logo }) {
|
|
688
|
+
const [expanded, setExpanded] = useState(true);
|
|
689
|
+
return /* @__PURE__ */ jsx11("aside", { className: "h-screen", children: /* @__PURE__ */ jsxs8("nav", { className: `h-full flex flex-col bg-white border-r shadow-sm duration-150 ${expanded ? "w-64" : "w-16"}`, children: [
|
|
690
|
+
/* @__PURE__ */ jsxs8("div", { className: "p-4 pb-2 flex justify-center items-center", children: [
|
|
691
|
+
expanded && logo && /* @__PURE__ */ jsx11("img", { src: logo, width: 120, className: "ml-auto" }),
|
|
692
|
+
/* @__PURE__ */ jsx11(
|
|
693
|
+
"button",
|
|
694
|
+
{
|
|
695
|
+
className: "p-1.5 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer ml-auto",
|
|
696
|
+
onClick: () => setExpanded((curr) => !curr),
|
|
697
|
+
children: expanded ? /* @__PURE__ */ jsx11(IconChevronLeftPipe, {}) : /* @__PURE__ */ jsx11(IconChevronRightPipe, {})
|
|
698
|
+
}
|
|
699
|
+
)
|
|
700
|
+
] }),
|
|
701
|
+
/* @__PURE__ */ jsx11(SidebarContext.Provider, { value: { expanded }, children: /* @__PURE__ */ jsx11("ul", { className: "flex-1 px-3", children }) })
|
|
702
|
+
] }) });
|
|
703
|
+
}
|
|
704
|
+
|
|
172
705
|
// src/NavBar/TopNavBar/TopNavBar.tsx
|
|
173
706
|
import { IconBellRinging } from "@tabler/icons-react";
|
|
174
|
-
import { jsx as
|
|
707
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
175
708
|
function TopNavBar({ onClickNoti, logo }) {
|
|
176
|
-
return /* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */
|
|
709
|
+
return /* @__PURE__ */ jsxs9("div", { className: "w-full h-full flex", children: [
|
|
710
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-[20px] p-[10px]", children: [
|
|
178
711
|
logo,
|
|
179
|
-
/* @__PURE__ */
|
|
712
|
+
/* @__PURE__ */ jsx12("p", { className: "subtitle-1", children: "Project Management" })
|
|
180
713
|
] }),
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
/* @__PURE__ */
|
|
714
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex items-center ml-auto gap-[20px] p-[10px]", children: [
|
|
715
|
+
/* @__PURE__ */ jsx12("div", { children: "Search" }),
|
|
716
|
+
/* @__PURE__ */ jsx12("div", { children: /* @__PURE__ */ jsx12(IconBellRinging, { onClick: onClickNoti, className: "cursor-pointer" }) }),
|
|
717
|
+
/* @__PURE__ */ jsx12("div", { className: "w-[40px] h-[40px] bg-gray-400 rounded-full cursor-pointer" })
|
|
185
718
|
] })
|
|
186
719
|
] });
|
|
187
720
|
}
|
|
188
721
|
|
|
189
722
|
// src/Table/DataTable/DataTable.tsx
|
|
190
|
-
import {
|
|
191
|
-
|
|
723
|
+
import { IconSelector, IconSortAscending, IconSortDescending } from "@tabler/icons-react";
|
|
724
|
+
import { useState as useState2 } from "react";
|
|
725
|
+
|
|
726
|
+
// src/Table/Pagination/Pagination.tsx
|
|
727
|
+
import { IconArrowLeft, IconArrowRight } from "@tabler/icons-react";
|
|
728
|
+
import { useMemo } from "react";
|
|
729
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
730
|
+
function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
731
|
+
const totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
732
|
+
const getPages = useMemo(() => {
|
|
733
|
+
if (totalPages <= 7) {
|
|
734
|
+
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
735
|
+
}
|
|
736
|
+
const pages = [];
|
|
737
|
+
pages.push(1);
|
|
738
|
+
if (currentPage > 3) {
|
|
739
|
+
pages.push("...");
|
|
740
|
+
}
|
|
741
|
+
const start = Math.max(2, currentPage - 1);
|
|
742
|
+
const end = Math.min(totalPages - 1, currentPage + 1);
|
|
743
|
+
for (let i = start; i <= end; i++) {
|
|
744
|
+
pages.push(i);
|
|
745
|
+
}
|
|
746
|
+
if (currentPage < totalPages - 2) {
|
|
747
|
+
pages.push("...");
|
|
748
|
+
}
|
|
749
|
+
pages.push(totalPages);
|
|
750
|
+
return pages;
|
|
751
|
+
}, [totalPages, currentPage]);
|
|
752
|
+
if (totalPages <= 1) return null;
|
|
753
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-center gap-2 mt-4 body-1", children: [
|
|
754
|
+
/* @__PURE__ */ jsxs10(
|
|
755
|
+
"button",
|
|
756
|
+
{
|
|
757
|
+
className: "px-3 py-1 disabled:opacity-50 flex gap-[8px] cursor-pointer",
|
|
758
|
+
disabled: currentPage === 1,
|
|
759
|
+
onClick: () => onPageChange(currentPage - 1),
|
|
760
|
+
children: [
|
|
761
|
+
/* @__PURE__ */ jsx13(IconArrowLeft, {}),
|
|
762
|
+
"\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A"
|
|
763
|
+
]
|
|
764
|
+
}
|
|
765
|
+
),
|
|
766
|
+
getPages.map(
|
|
767
|
+
(page, i) => typeof page === "string" ? /* @__PURE__ */ jsx13("span", { className: "px-2", children: page }, i) : /* @__PURE__ */ jsx13(
|
|
768
|
+
"button",
|
|
769
|
+
{
|
|
770
|
+
className: `w-[32px] h-[32px] rounded-[8px] px-3 py-1 cursor-pointer
|
|
771
|
+
${currentPage === page ? "bg-black text-white" : "hover:bg-gray-100"}`,
|
|
772
|
+
onClick: () => onPageChange(page),
|
|
773
|
+
children: page
|
|
774
|
+
},
|
|
775
|
+
i
|
|
776
|
+
)
|
|
777
|
+
),
|
|
778
|
+
/* @__PURE__ */ jsxs10(
|
|
779
|
+
"button",
|
|
780
|
+
{
|
|
781
|
+
className: "px-3 py-1 disabled:opacity-50 flex gap-[8px] cursor-pointer",
|
|
782
|
+
disabled: currentPage === totalPages,
|
|
783
|
+
onClick: () => onPageChange(currentPage + 1),
|
|
784
|
+
children: [
|
|
785
|
+
"\u0E16\u0E31\u0E14\u0E44\u0E1B",
|
|
786
|
+
/* @__PURE__ */ jsx13(IconArrowRight, {})
|
|
787
|
+
]
|
|
788
|
+
}
|
|
789
|
+
)
|
|
790
|
+
] });
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
// src/Table/DataTable/DataTable.tsx
|
|
794
|
+
import { Fragment, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
795
|
+
function DataTable({ columns, data, onSort, isLoading }) {
|
|
192
796
|
const cols = Math.max(1, columns.length);
|
|
193
797
|
const gridClass = "grid [grid-template-columns:repeat(var(--cols),minmax(0,1fr))]";
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
798
|
+
const [sortConfig, setSortConfig] = useState2(null);
|
|
799
|
+
const [page, setPage] = useState2(1);
|
|
800
|
+
const onSorting = (config) => {
|
|
801
|
+
if (config) {
|
|
802
|
+
setSortConfig({ key: config?.key, direction: config?.direction });
|
|
803
|
+
onSort();
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
return /* @__PURE__ */ jsxs11("div", { className: "border rounded-md w-full h-full", children: [
|
|
807
|
+
/* @__PURE__ */ jsx14("div", { className: `${gridClass} font-semibold border-b border-gray-200`, style: { ["--cols"]: cols }, children: columns.map((col, i) => {
|
|
808
|
+
const isActive = sortConfig?.key === col.accessor;
|
|
809
|
+
const direction = isActive ? sortConfig?.direction : null;
|
|
810
|
+
return /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-[8px] py-[8px] px-[16px] body-4 truncate", children: [
|
|
811
|
+
col.header,
|
|
812
|
+
col.sortable && /* @__PURE__ */ jsxs11(Fragment, { children: [
|
|
813
|
+
direction === null && /* @__PURE__ */ jsx14(
|
|
814
|
+
IconSelector,
|
|
815
|
+
{
|
|
816
|
+
size: 15,
|
|
817
|
+
className: "hover:text-red-400 cursor-pointer",
|
|
818
|
+
onClick: () => onSorting({ key: col.accessor, direction: "asc" })
|
|
819
|
+
}
|
|
820
|
+
),
|
|
821
|
+
direction === "asc" && /* @__PURE__ */ jsx14(
|
|
822
|
+
IconSortAscending,
|
|
823
|
+
{
|
|
824
|
+
size: 15,
|
|
825
|
+
className: "cursor-pointer text-red-500",
|
|
826
|
+
onClick: () => onSorting({ key: col.accessor, direction: "desc" })
|
|
827
|
+
}
|
|
828
|
+
),
|
|
829
|
+
direction === "desc" && /* @__PURE__ */ jsx14(
|
|
830
|
+
IconSortDescending,
|
|
831
|
+
{
|
|
832
|
+
size: 15,
|
|
833
|
+
className: "cursor-pointer text-red-500",
|
|
834
|
+
onClick: () => onSorting({ key: col.accessor, direction: null })
|
|
835
|
+
}
|
|
836
|
+
)
|
|
837
|
+
] })
|
|
838
|
+
] }, i);
|
|
839
|
+
}) }),
|
|
840
|
+
isLoading ? /* @__PURE__ */ jsx14("div", { className: "flex justify-center items-center w-full h-full", children: /* @__PURE__ */ jsx14(Loader, {}) }) : /* @__PURE__ */ jsx14(Fragment, { children: data.map((row, i) => /* @__PURE__ */ jsx14(
|
|
197
841
|
"div",
|
|
198
842
|
{
|
|
199
|
-
className: `${gridClass} border-b border-gray-200 items-center`,
|
|
843
|
+
className: `${gridClass} ${data.length - 1 !== i ? "border-b border-gray-200" : ""} items-center`,
|
|
200
844
|
style: { ["--cols"]: cols },
|
|
201
|
-
children: columns.map((col, c) => /* @__PURE__ */
|
|
845
|
+
children: columns.map((col, c) => /* @__PURE__ */ jsx14("div", { className: "py-[8px] px-[16px] body-3 truncate", children: typeof col.accessor === "function" ? col.accessor(row) : String(row[col.accessor]) }, c))
|
|
202
846
|
},
|
|
203
847
|
i
|
|
204
|
-
))
|
|
848
|
+
)) }),
|
|
849
|
+
/* @__PURE__ */ jsx14("div", { children: /* @__PURE__ */ jsx14(Pagination, { currentPage: page, itemsPerPage: 5, totalItems: 10, onPageChange: setPage }) })
|
|
205
850
|
] });
|
|
206
851
|
}
|
|
207
852
|
|
|
853
|
+
// src/Table/DataTable/AntDataTable.tsx
|
|
854
|
+
import { ConfigProvider, Table } from "antd";
|
|
855
|
+
import { useState as useState3 } from "react";
|
|
856
|
+
import { Fragment as Fragment2, jsx as jsx15 } from "react/jsx-runtime";
|
|
857
|
+
function AntDataTable({
|
|
858
|
+
dataSource,
|
|
859
|
+
columns,
|
|
860
|
+
pageSize = 10,
|
|
861
|
+
rowCheckbox,
|
|
862
|
+
onRowSelect,
|
|
863
|
+
width,
|
|
864
|
+
height
|
|
865
|
+
}) {
|
|
866
|
+
const [selectedRowKeys, setSelectedRowKeys] = useState3([]);
|
|
867
|
+
const rowSelection = {
|
|
868
|
+
selectedRowKeys,
|
|
869
|
+
onChange: (newSelectedRowKeys) => {
|
|
870
|
+
setSelectedRowKeys(newSelectedRowKeys);
|
|
871
|
+
onRowSelect && onRowSelect(newSelectedRowKeys);
|
|
872
|
+
}
|
|
873
|
+
};
|
|
874
|
+
return /* @__PURE__ */ jsx15(Fragment2, { children: /* @__PURE__ */ jsx15(
|
|
875
|
+
ConfigProvider,
|
|
876
|
+
{
|
|
877
|
+
theme: {
|
|
878
|
+
components: {},
|
|
879
|
+
token: {
|
|
880
|
+
fontFamily: "Kanit"
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
children: /* @__PURE__ */ jsx15(
|
|
884
|
+
Table,
|
|
885
|
+
{
|
|
886
|
+
dataSource,
|
|
887
|
+
columns,
|
|
888
|
+
rowSelection: rowCheckbox ? rowSelection : void 0,
|
|
889
|
+
pagination: { position: ["bottomCenter"], pageSize },
|
|
890
|
+
style: { width },
|
|
891
|
+
scroll: { y: height }
|
|
892
|
+
}
|
|
893
|
+
)
|
|
894
|
+
}
|
|
895
|
+
) });
|
|
896
|
+
}
|
|
897
|
+
|
|
208
898
|
// src/Calendar/Calendar/Calendar.tsx
|
|
209
|
-
import { useEffect, useRef, useState } from "react";
|
|
899
|
+
import { useEffect, useRef, useState as useState4 } from "react";
|
|
210
900
|
import FullCalendar from "@fullcalendar/react";
|
|
211
901
|
import dayGridPlugin from "@fullcalendar/daygrid";
|
|
212
902
|
import timeGridPlugin from "@fullcalendar/timegrid";
|
|
213
903
|
import interactionPlugin from "@fullcalendar/interaction";
|
|
214
|
-
import
|
|
215
|
-
import { IconChevronLeft, IconChevronRight } from "@tabler/icons-react";
|
|
216
|
-
import { Fragment, jsx as
|
|
904
|
+
import thLocale from "@fullcalendar/core/locales/th";
|
|
905
|
+
import { IconChevronLeft, IconChevronRight, IconX } from "@tabler/icons-react";
|
|
906
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
217
907
|
function Calendar({ events }) {
|
|
218
908
|
const calendarRef = useRef(null);
|
|
219
|
-
const [monthTitle, setMonthTitle] =
|
|
909
|
+
const [monthTitle, setMonthTitle] = useState4("");
|
|
910
|
+
const [openPopup, setOpenPopup] = useState4(false);
|
|
911
|
+
const [selectedEvent, setSelectedEvent] = useState4(null);
|
|
220
912
|
const updateTitle = () => {
|
|
221
913
|
const calendarApi = calendarRef.current?.getApi();
|
|
222
914
|
if (calendarApi) {
|
|
@@ -230,11 +922,11 @@ function Calendar({ events }) {
|
|
|
230
922
|
useEffect(() => {
|
|
231
923
|
updateTitle();
|
|
232
924
|
}, []);
|
|
233
|
-
return /* @__PURE__ */
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
-
/* @__PURE__ */
|
|
236
|
-
/* @__PURE__ */
|
|
237
|
-
/* @__PURE__ */
|
|
925
|
+
return /* @__PURE__ */ jsxs12("div", { className: "fc w-full h-full relative z-10", children: [
|
|
926
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex mb-[8px]", children: [
|
|
927
|
+
/* @__PURE__ */ jsx16("p", { className: "headline-5", children: monthTitle }),
|
|
928
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex gap-[10px] ml-auto", children: [
|
|
929
|
+
/* @__PURE__ */ jsx16(
|
|
238
930
|
"p",
|
|
239
931
|
{
|
|
240
932
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -245,7 +937,7 @@ function Calendar({ events }) {
|
|
|
245
937
|
children: "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49"
|
|
246
938
|
}
|
|
247
939
|
),
|
|
248
|
-
/* @__PURE__ */
|
|
940
|
+
/* @__PURE__ */ jsx16(
|
|
249
941
|
"p",
|
|
250
942
|
{
|
|
251
943
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -256,18 +948,18 @@ function Calendar({ events }) {
|
|
|
256
948
|
children: "Month"
|
|
257
949
|
}
|
|
258
950
|
),
|
|
259
|
-
/* @__PURE__ */
|
|
951
|
+
/* @__PURE__ */ jsx16(
|
|
260
952
|
"p",
|
|
261
953
|
{
|
|
262
954
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
263
955
|
onClick: () => {
|
|
264
|
-
changeView("
|
|
956
|
+
changeView("timeGridWeek");
|
|
265
957
|
updateTitle();
|
|
266
958
|
},
|
|
267
959
|
children: "Week"
|
|
268
960
|
}
|
|
269
961
|
),
|
|
270
|
-
/* @__PURE__ */
|
|
962
|
+
/* @__PURE__ */ jsx16(
|
|
271
963
|
"p",
|
|
272
964
|
{
|
|
273
965
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -278,7 +970,7 @@ function Calendar({ events }) {
|
|
|
278
970
|
children: "Day"
|
|
279
971
|
}
|
|
280
972
|
),
|
|
281
|
-
/* @__PURE__ */
|
|
973
|
+
/* @__PURE__ */ jsx16(
|
|
282
974
|
"button",
|
|
283
975
|
{
|
|
284
976
|
className: "cursor-pointer",
|
|
@@ -286,10 +978,10 @@ function Calendar({ events }) {
|
|
|
286
978
|
calendarRef.current?.getApi().prev();
|
|
287
979
|
updateTitle();
|
|
288
980
|
},
|
|
289
|
-
children: /* @__PURE__ */
|
|
981
|
+
children: /* @__PURE__ */ jsx16(IconChevronLeft, {})
|
|
290
982
|
}
|
|
291
983
|
),
|
|
292
|
-
/* @__PURE__ */
|
|
984
|
+
/* @__PURE__ */ jsx16(
|
|
293
985
|
"button",
|
|
294
986
|
{
|
|
295
987
|
className: "cursor-pointer",
|
|
@@ -297,44 +989,70 @@ function Calendar({ events }) {
|
|
|
297
989
|
calendarRef.current?.getApi().next();
|
|
298
990
|
updateTitle();
|
|
299
991
|
},
|
|
300
|
-
children: /* @__PURE__ */
|
|
992
|
+
children: /* @__PURE__ */ jsx16(IconChevronRight, {})
|
|
301
993
|
}
|
|
302
994
|
)
|
|
303
995
|
] })
|
|
304
996
|
] }),
|
|
305
|
-
/* @__PURE__ */
|
|
997
|
+
/* @__PURE__ */ jsx16("div", { className: "relative z-10", children: /* @__PURE__ */ jsx16(
|
|
306
998
|
FullCalendar,
|
|
307
999
|
{
|
|
308
1000
|
ref: calendarRef,
|
|
309
1001
|
plugins: [dayGridPlugin, timeGridPlugin, interactionPlugin],
|
|
310
1002
|
events,
|
|
311
|
-
locale:
|
|
1003
|
+
locale: thLocale,
|
|
312
1004
|
slotLabelFormat: {
|
|
313
1005
|
hour: "numeric",
|
|
314
1006
|
minute: "2-digit"
|
|
315
1007
|
},
|
|
316
1008
|
firstDay: 0,
|
|
317
1009
|
fixedWeekCount: false,
|
|
318
|
-
initialView: "dayGridMonth",
|
|
319
1010
|
headerToolbar: false,
|
|
1011
|
+
initialView: "dayGridMonth",
|
|
320
1012
|
dayMaxEventRows: 4,
|
|
321
|
-
moreLinkText: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",
|
|
322
1013
|
editable: true,
|
|
323
1014
|
eventDrop: (info) => {
|
|
324
1015
|
console.log("Event \u0E02\u0E2D\u0E07\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48:", info.event.startStr);
|
|
325
1016
|
},
|
|
1017
|
+
eventClick: (info) => {
|
|
1018
|
+
setOpenPopup(true);
|
|
1019
|
+
setSelectedEvent({
|
|
1020
|
+
title: info.event.title,
|
|
1021
|
+
start: info.event._instance?.range.start.toISOString(),
|
|
1022
|
+
end: info.event._instance?.range.end.toISOString()
|
|
1023
|
+
});
|
|
1024
|
+
},
|
|
326
1025
|
eventContent: (arg) => {
|
|
327
|
-
return /* @__PURE__ */
|
|
328
|
-
}
|
|
1026
|
+
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 }) });
|
|
1027
|
+
},
|
|
1028
|
+
moreLinkContent: (arg) => `+${arg.num} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`
|
|
329
1029
|
}
|
|
330
|
-
)
|
|
1030
|
+
) }),
|
|
1031
|
+
openPopup && /* @__PURE__ */ jsx16("div", { className: "fixed inset-0 flex justify-center items-center bg-black/50 z-50", children: /* @__PURE__ */ jsx16(EventPopUp, { event: selectedEvent, onClose: () => setOpenPopup(false) }) })
|
|
1032
|
+
] });
|
|
1033
|
+
}
|
|
1034
|
+
function EventPopUp({ event, onClose }) {
|
|
1035
|
+
return /* @__PURE__ */ jsxs12("div", { className: "w-[500px] h-auto rounded-2xl bg-white relative z-50 shadow-2xl overflow-hidden", children: [
|
|
1036
|
+
/* @__PURE__ */ jsx16("button", { className: "absolute top-3 right-3 rounded-full p-1 hover:bg-gray-200 transition", onClick: onClose, children: /* @__PURE__ */ jsx16(IconX, { className: "w-6 h-6 text-gray-600" }) }),
|
|
1037
|
+
/* @__PURE__ */ jsx16("div", { className: "bg-red-400 text-left text-white px-6 py-4 headline-5", children: /* @__PURE__ */ jsx16("h2", { className: "text-lg font-semibold", children: event.title }) }),
|
|
1038
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex flex-col w-full p-6 gap-3 text-gray-700 body-3", children: [
|
|
1039
|
+
/* @__PURE__ */ jsxs12("p", { children: [
|
|
1040
|
+
/* @__PURE__ */ jsx16("span", { className: "font-medium", children: "\u0E40\u0E23\u0E34\u0E48\u0E21: " }),
|
|
1041
|
+
event?.start?.toLocaleString?.() || String(event?.start)
|
|
1042
|
+
] }),
|
|
1043
|
+
/* @__PURE__ */ jsxs12("p", { children: [
|
|
1044
|
+
/* @__PURE__ */ jsx16("span", { className: "font-medium", children: "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14: " }),
|
|
1045
|
+
event?.end?.toLocaleString?.() || String(event?.end)
|
|
1046
|
+
] }),
|
|
1047
|
+
/* @__PURE__ */ jsx16("h3", { className: "text-sm font-semibold text-gray-500 uppercase mb-2 hover:underline cursor-pointer", children: "\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21" })
|
|
1048
|
+
] })
|
|
331
1049
|
] });
|
|
332
1050
|
}
|
|
333
1051
|
|
|
334
1052
|
// src/Input/TextInput/TextInput.tsx
|
|
335
1053
|
import { IconEye, IconEyeOff } from "@tabler/icons-react";
|
|
336
|
-
import { useState as
|
|
337
|
-
import { jsx as
|
|
1054
|
+
import { useState as useState5 } from "react";
|
|
1055
|
+
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
338
1056
|
function TextInput({
|
|
339
1057
|
label,
|
|
340
1058
|
placeholder,
|
|
@@ -343,55 +1061,1286 @@ function TextInput({
|
|
|
343
1061
|
required,
|
|
344
1062
|
error,
|
|
345
1063
|
value,
|
|
346
|
-
onChange
|
|
1064
|
+
onChange,
|
|
1065
|
+
disabled
|
|
347
1066
|
}) {
|
|
348
|
-
const [showPassword, setShowPassword] =
|
|
1067
|
+
const [showPassword, setShowPassword] = useState5(false);
|
|
349
1068
|
const onShowPassword = () => {
|
|
350
1069
|
setShowPassword(!showPassword);
|
|
351
1070
|
};
|
|
352
1071
|
const inputType = type === "password" ? showPassword ? "text" : "password" : "text";
|
|
353
|
-
return /* @__PURE__ */
|
|
354
|
-
/* @__PURE__ */
|
|
1072
|
+
return /* @__PURE__ */ jsxs13("div", { children: [
|
|
1073
|
+
label && /* @__PURE__ */ jsxs13("p", { className: "body-1 mb-[8px]", children: [
|
|
355
1074
|
label,
|
|
356
|
-
required && /* @__PURE__ */
|
|
1075
|
+
required && /* @__PURE__ */ jsx17("span", { className: "text-red-600", children: "\xA0*" })
|
|
357
1076
|
] }),
|
|
358
|
-
/* @__PURE__ */
|
|
1077
|
+
/* @__PURE__ */ jsxs13(
|
|
359
1078
|
"div",
|
|
360
1079
|
{
|
|
361
|
-
className: `border-[1px] rounded-[8px] w-full h-[40px] flex justify-center items-center
|
|
1080
|
+
className: `border-[1px] rounded-[8px] w-full h-[40px] flex justify-center items-center
|
|
1081
|
+
${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-600" : ""}`,
|
|
362
1082
|
children: [
|
|
363
|
-
/* @__PURE__ */
|
|
1083
|
+
/* @__PURE__ */ jsx17(
|
|
364
1084
|
"input",
|
|
365
1085
|
{
|
|
366
|
-
className:
|
|
1086
|
+
className: `w-full h-full px-[16px] ${disabled ? "cursor-not-allowed" : ""}`,
|
|
367
1087
|
style: { outline: "none" },
|
|
368
1088
|
placeholder,
|
|
369
1089
|
type: inputType,
|
|
370
1090
|
maxLength,
|
|
371
1091
|
value,
|
|
372
|
-
onChange: (e) => onChange(e.target.value)
|
|
1092
|
+
onChange: (e) => onChange(e.target.value),
|
|
1093
|
+
disabled
|
|
373
1094
|
}
|
|
374
1095
|
),
|
|
375
|
-
type === "password" && (showPassword ? /* @__PURE__ */
|
|
1096
|
+
type === "password" && (showPassword ? /* @__PURE__ */ jsx17(IconEye, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }) : /* @__PURE__ */ jsx17(IconEyeOff, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }))
|
|
376
1097
|
]
|
|
377
1098
|
}
|
|
378
1099
|
),
|
|
379
|
-
error && /* @__PURE__ */
|
|
1100
|
+
error && /* @__PURE__ */ jsx17("p", { className: "text-red-600 body-1", children: error })
|
|
1101
|
+
] });
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
// src/InputField/InputField.tsx
|
|
1105
|
+
import { ConfigProvider as ConfigProvider2, Input } from "antd";
|
|
1106
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1107
|
+
function InputField({
|
|
1108
|
+
value,
|
|
1109
|
+
onChange,
|
|
1110
|
+
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1111
|
+
title,
|
|
1112
|
+
require: require2,
|
|
1113
|
+
bottomText,
|
|
1114
|
+
disabled,
|
|
1115
|
+
showError,
|
|
1116
|
+
errorMessage,
|
|
1117
|
+
addonBefore,
|
|
1118
|
+
addonAfter,
|
|
1119
|
+
defaultValue,
|
|
1120
|
+
className
|
|
1121
|
+
}) {
|
|
1122
|
+
return /* @__PURE__ */ jsx18(
|
|
1123
|
+
ConfigProvider2,
|
|
1124
|
+
{
|
|
1125
|
+
theme: {
|
|
1126
|
+
token: {
|
|
1127
|
+
fontFamily: "Kanit"
|
|
1128
|
+
}
|
|
1129
|
+
},
|
|
1130
|
+
children: /* @__PURE__ */ jsxs14("div", { className: "container-input", children: [
|
|
1131
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
1132
|
+
/* @__PURE__ */ jsx18("span", { className: "body-1", children: title }),
|
|
1133
|
+
" ",
|
|
1134
|
+
require2 && /* @__PURE__ */ jsx18("span", { className: "text-red-500", children: "*" })
|
|
1135
|
+
] }),
|
|
1136
|
+
/* @__PURE__ */ jsx18(
|
|
1137
|
+
Input,
|
|
1138
|
+
{
|
|
1139
|
+
value,
|
|
1140
|
+
placeholder,
|
|
1141
|
+
disabled,
|
|
1142
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1143
|
+
onChange: (e) => onChange(e.target.value || void 0),
|
|
1144
|
+
allowClear: true,
|
|
1145
|
+
addonBefore,
|
|
1146
|
+
addonAfter,
|
|
1147
|
+
defaultValue
|
|
1148
|
+
}
|
|
1149
|
+
),
|
|
1150
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
1151
|
+
/* @__PURE__ */ jsx18("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1152
|
+
" ",
|
|
1153
|
+
showError && /* @__PURE__ */ jsx18("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1154
|
+
] })
|
|
1155
|
+
] })
|
|
1156
|
+
}
|
|
1157
|
+
);
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
// src/Input/TextArea/TextArea.tsx
|
|
1161
|
+
import { ConfigProvider as ConfigProvider3, Input as Input2 } from "antd";
|
|
1162
|
+
import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1163
|
+
var { TextArea } = Input2;
|
|
1164
|
+
function TextAreaInput({
|
|
1165
|
+
label,
|
|
1166
|
+
height = 4,
|
|
1167
|
+
placeholder,
|
|
1168
|
+
onChange,
|
|
1169
|
+
value,
|
|
1170
|
+
maxLength,
|
|
1171
|
+
resizable,
|
|
1172
|
+
showCount,
|
|
1173
|
+
required,
|
|
1174
|
+
error,
|
|
1175
|
+
disabled
|
|
1176
|
+
}) {
|
|
1177
|
+
return /* @__PURE__ */ jsx19(Fragment4, { children: /* @__PURE__ */ jsx19(
|
|
1178
|
+
ConfigProvider3,
|
|
1179
|
+
{
|
|
1180
|
+
theme: {
|
|
1181
|
+
components: {},
|
|
1182
|
+
token: {
|
|
1183
|
+
fontFamily: "Kanit"
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
children: /* @__PURE__ */ jsxs15("div", { children: [
|
|
1187
|
+
label && /* @__PURE__ */ jsxs15("p", { className: "body-1 mb-[8px]", children: [
|
|
1188
|
+
label,
|
|
1189
|
+
" ",
|
|
1190
|
+
required && /* @__PURE__ */ jsx19("span", { className: "text-red-500", children: "\xA0*" })
|
|
1191
|
+
] }),
|
|
1192
|
+
/* @__PURE__ */ jsx19(
|
|
1193
|
+
TextArea,
|
|
1194
|
+
{
|
|
1195
|
+
value,
|
|
1196
|
+
rows: height,
|
|
1197
|
+
style: {
|
|
1198
|
+
...error && resizable ? { borderColor: "red" } : {},
|
|
1199
|
+
...disabled || !resizable ? { resize: "none" } : {}
|
|
1200
|
+
},
|
|
1201
|
+
placeholder,
|
|
1202
|
+
maxLength,
|
|
1203
|
+
showCount,
|
|
1204
|
+
onChange: (e) => onChange(e.target.value),
|
|
1205
|
+
disabled
|
|
1206
|
+
}
|
|
1207
|
+
),
|
|
1208
|
+
error && /* @__PURE__ */ jsx19("p", { className: "text-red-600 body-1", children: error })
|
|
1209
|
+
] })
|
|
1210
|
+
}
|
|
1211
|
+
) });
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
// src/ColorPicker/ColorPicker.tsx
|
|
1215
|
+
import { ConfigProvider as ConfigProvider4, ColorPicker } from "antd";
|
|
1216
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1217
|
+
function ColorPickerBasic({
|
|
1218
|
+
value,
|
|
1219
|
+
onChange,
|
|
1220
|
+
require: require2,
|
|
1221
|
+
title,
|
|
1222
|
+
bottomText,
|
|
1223
|
+
showError,
|
|
1224
|
+
errorMessage,
|
|
1225
|
+
disabled,
|
|
1226
|
+
allowClear,
|
|
1227
|
+
defaultFormat,
|
|
1228
|
+
className,
|
|
1229
|
+
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
1230
|
+
}) {
|
|
1231
|
+
return /* @__PURE__ */ jsx20(
|
|
1232
|
+
ConfigProvider4,
|
|
1233
|
+
{
|
|
1234
|
+
theme: {
|
|
1235
|
+
token: {
|
|
1236
|
+
fontFamily: "Kanit"
|
|
1237
|
+
}
|
|
1238
|
+
},
|
|
1239
|
+
children: /* @__PURE__ */ jsxs16("div", { className: "container-input", children: [
|
|
1240
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
1241
|
+
/* @__PURE__ */ jsx20("span", { className: "body-1", children: title }),
|
|
1242
|
+
" ",
|
|
1243
|
+
require2 && /* @__PURE__ */ jsx20("span", { className: "text-red-500", children: "*" })
|
|
1244
|
+
] }),
|
|
1245
|
+
/* @__PURE__ */ jsx20(
|
|
1246
|
+
ColorPicker,
|
|
1247
|
+
{
|
|
1248
|
+
defaultFormat,
|
|
1249
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1250
|
+
value,
|
|
1251
|
+
defaultValue: "#ffff",
|
|
1252
|
+
onChange,
|
|
1253
|
+
allowClear,
|
|
1254
|
+
showText: (color) => {
|
|
1255
|
+
const hex = color.toHexString();
|
|
1256
|
+
if (!value) {
|
|
1257
|
+
return /* @__PURE__ */ jsx20("span", { children: placeholder });
|
|
1258
|
+
}
|
|
1259
|
+
return /* @__PURE__ */ jsxs16("span", { children: [
|
|
1260
|
+
"(",
|
|
1261
|
+
hex,
|
|
1262
|
+
")"
|
|
1263
|
+
] });
|
|
1264
|
+
},
|
|
1265
|
+
disabled
|
|
1266
|
+
}
|
|
1267
|
+
),
|
|
1268
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
1269
|
+
/* @__PURE__ */ jsx20("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1270
|
+
" ",
|
|
1271
|
+
showError && /* @__PURE__ */ jsx20("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1272
|
+
] })
|
|
1273
|
+
] })
|
|
1274
|
+
}
|
|
1275
|
+
);
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
// src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
|
|
1279
|
+
var import_dayjs = __toESM(require_dayjs_min());
|
|
1280
|
+
var import_th2 = __toESM(require_th());
|
|
1281
|
+
import { ConfigProvider as ConfigProvider5, DatePicker } from "antd";
|
|
1282
|
+
import thTH from "antd/locale/th_TH";
|
|
1283
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1284
|
+
function DatePickerBasic({
|
|
1285
|
+
value,
|
|
1286
|
+
onChange,
|
|
1287
|
+
require: require2,
|
|
1288
|
+
title,
|
|
1289
|
+
bottomText,
|
|
1290
|
+
showError,
|
|
1291
|
+
errorMessage,
|
|
1292
|
+
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
|
|
1293
|
+
disabled,
|
|
1294
|
+
defaultValue,
|
|
1295
|
+
minDate,
|
|
1296
|
+
maxDate,
|
|
1297
|
+
disabledDate,
|
|
1298
|
+
className,
|
|
1299
|
+
size
|
|
1300
|
+
}) {
|
|
1301
|
+
const dateFormat = "DD/MM/YYYY";
|
|
1302
|
+
import_dayjs.default.locale("th_TH");
|
|
1303
|
+
return /* @__PURE__ */ jsx21(
|
|
1304
|
+
ConfigProvider5,
|
|
1305
|
+
{
|
|
1306
|
+
locale: thTH,
|
|
1307
|
+
theme: {
|
|
1308
|
+
token: {
|
|
1309
|
+
fontFamily: "Kanit"
|
|
1310
|
+
}
|
|
1311
|
+
},
|
|
1312
|
+
children: /* @__PURE__ */ jsxs17("div", { className: "container-input", children: [
|
|
1313
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
1314
|
+
/* @__PURE__ */ jsx21("span", { className: "body-1", children: title }),
|
|
1315
|
+
" ",
|
|
1316
|
+
require2 && /* @__PURE__ */ jsx21("span", { className: "text-red-500", children: "*" })
|
|
1317
|
+
] }),
|
|
1318
|
+
/* @__PURE__ */ jsx21(
|
|
1319
|
+
DatePicker,
|
|
1320
|
+
{
|
|
1321
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1322
|
+
value,
|
|
1323
|
+
placeholder,
|
|
1324
|
+
onChange,
|
|
1325
|
+
allowClear: true,
|
|
1326
|
+
disabled,
|
|
1327
|
+
format: dateFormat,
|
|
1328
|
+
defaultValue,
|
|
1329
|
+
minDate,
|
|
1330
|
+
maxDate,
|
|
1331
|
+
disabledDate,
|
|
1332
|
+
size
|
|
1333
|
+
}
|
|
1334
|
+
),
|
|
1335
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
1336
|
+
/* @__PURE__ */ jsx21("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1337
|
+
" ",
|
|
1338
|
+
showError && /* @__PURE__ */ jsx21("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1339
|
+
] })
|
|
1340
|
+
] })
|
|
1341
|
+
}
|
|
1342
|
+
);
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
// src/DatePicker/DatePickerRangePicker/DatePickerRangePicker.tsx
|
|
1346
|
+
var import_th3 = __toESM(require_th());
|
|
1347
|
+
var import_customParseFormat = __toESM(require_customParseFormat());
|
|
1348
|
+
var import_dayjs2 = __toESM(require_dayjs_min());
|
|
1349
|
+
import { ConfigProvider as ConfigProvider6, DatePicker as DatePicker2 } from "antd";
|
|
1350
|
+
import thTH2 from "antd/locale/th_TH";
|
|
1351
|
+
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1352
|
+
import_dayjs2.default.extend(import_customParseFormat.default);
|
|
1353
|
+
function DatePickerRangePicker({
|
|
1354
|
+
value,
|
|
1355
|
+
onChange,
|
|
1356
|
+
placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
|
|
1357
|
+
title,
|
|
1358
|
+
require: require2,
|
|
1359
|
+
bottomText,
|
|
1360
|
+
showError,
|
|
1361
|
+
errorMessage,
|
|
1362
|
+
disabled,
|
|
1363
|
+
minDate,
|
|
1364
|
+
maxDate,
|
|
1365
|
+
disabledDate,
|
|
1366
|
+
size = "middle",
|
|
1367
|
+
className,
|
|
1368
|
+
onOpenChange,
|
|
1369
|
+
onCalendarChange
|
|
1370
|
+
}) {
|
|
1371
|
+
const dateFormat = "DD/MM/YYYY";
|
|
1372
|
+
import_dayjs2.default.locale("th_TH");
|
|
1373
|
+
return /* @__PURE__ */ jsx22(
|
|
1374
|
+
ConfigProvider6,
|
|
1375
|
+
{
|
|
1376
|
+
locale: thTH2,
|
|
1377
|
+
theme: {
|
|
1378
|
+
token: {
|
|
1379
|
+
fontFamily: "Kanit"
|
|
1380
|
+
}
|
|
1381
|
+
},
|
|
1382
|
+
children: /* @__PURE__ */ jsxs18("div", { className: "container-input", children: [
|
|
1383
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
1384
|
+
/* @__PURE__ */ jsx22("span", { className: "body-1", children: title }),
|
|
1385
|
+
" ",
|
|
1386
|
+
require2 && /* @__PURE__ */ jsx22("span", { className: "text-red-500", children: "*" })
|
|
1387
|
+
] }),
|
|
1388
|
+
/* @__PURE__ */ jsx22(
|
|
1389
|
+
DatePicker2.RangePicker,
|
|
1390
|
+
{
|
|
1391
|
+
format: dateFormat,
|
|
1392
|
+
value,
|
|
1393
|
+
placeholder,
|
|
1394
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1395
|
+
onChange,
|
|
1396
|
+
allowClear: true,
|
|
1397
|
+
disabled,
|
|
1398
|
+
minDate,
|
|
1399
|
+
maxDate,
|
|
1400
|
+
disabledDate,
|
|
1401
|
+
size,
|
|
1402
|
+
onOpenChange,
|
|
1403
|
+
onCalendarChange
|
|
1404
|
+
}
|
|
1405
|
+
),
|
|
1406
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
1407
|
+
/* @__PURE__ */ jsx22("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1408
|
+
" ",
|
|
1409
|
+
showError && /* @__PURE__ */ jsx22("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1410
|
+
] })
|
|
1411
|
+
] })
|
|
1412
|
+
}
|
|
1413
|
+
);
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
// src/TimePicker/TimePickerBasic/TimePickerBasic.tsx
|
|
1417
|
+
import { ConfigProvider as ConfigProvider7, TimePicker } from "antd";
|
|
1418
|
+
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1419
|
+
function TimePickerBasic({ value, onChange, require: require2, title, bottomText, showError, errorMessage, placeholder, disabled, className }) {
|
|
1420
|
+
return /* @__PURE__ */ jsx23(
|
|
1421
|
+
ConfigProvider7,
|
|
1422
|
+
{
|
|
1423
|
+
theme: {
|
|
1424
|
+
token: {
|
|
1425
|
+
fontFamily: "Kanit"
|
|
1426
|
+
}
|
|
1427
|
+
},
|
|
1428
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "container-input", children: [
|
|
1429
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
1430
|
+
/* @__PURE__ */ jsx23("span", { className: "body-1", children: title }),
|
|
1431
|
+
" ",
|
|
1432
|
+
require2 && /* @__PURE__ */ jsx23("span", { className: "text-red-500", children: "*" })
|
|
1433
|
+
] }),
|
|
1434
|
+
/* @__PURE__ */ jsx23(
|
|
1435
|
+
TimePicker,
|
|
1436
|
+
{
|
|
1437
|
+
format: "HH:mm",
|
|
1438
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1439
|
+
value,
|
|
1440
|
+
placeholder,
|
|
1441
|
+
onChange,
|
|
1442
|
+
allowClear: true,
|
|
1443
|
+
disabled
|
|
1444
|
+
}
|
|
1445
|
+
),
|
|
1446
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
1447
|
+
/* @__PURE__ */ jsx23("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1448
|
+
" ",
|
|
1449
|
+
showError && /* @__PURE__ */ jsx23("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1450
|
+
] })
|
|
1451
|
+
] })
|
|
1452
|
+
}
|
|
1453
|
+
);
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
// src/TimePicker/TimePickerRangePicker/TimerPickerRangePicker.tsx
|
|
1457
|
+
import { ConfigProvider as ConfigProvider8, TimePicker as TimePicker2 } from "antd";
|
|
1458
|
+
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1459
|
+
function TimePickerRangePicker({
|
|
1460
|
+
value,
|
|
1461
|
+
onChange,
|
|
1462
|
+
placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
|
|
1463
|
+
title,
|
|
1464
|
+
require: require2,
|
|
1465
|
+
bottomText,
|
|
1466
|
+
showError,
|
|
1467
|
+
errorMessage,
|
|
1468
|
+
disabled,
|
|
1469
|
+
className
|
|
1470
|
+
}) {
|
|
1471
|
+
return /* @__PURE__ */ jsx24(
|
|
1472
|
+
ConfigProvider8,
|
|
1473
|
+
{
|
|
1474
|
+
theme: {
|
|
1475
|
+
token: {
|
|
1476
|
+
fontFamily: "Kanit"
|
|
1477
|
+
}
|
|
1478
|
+
},
|
|
1479
|
+
children: /* @__PURE__ */ jsxs20("div", { className: "container-input", children: [
|
|
1480
|
+
/* @__PURE__ */ jsxs20("div", { children: [
|
|
1481
|
+
/* @__PURE__ */ jsx24("span", { className: "body-1", children: title }),
|
|
1482
|
+
" ",
|
|
1483
|
+
require2 && /* @__PURE__ */ jsx24("span", { className: "text-red-500", children: "*" })
|
|
1484
|
+
] }),
|
|
1485
|
+
/* @__PURE__ */ jsx24(
|
|
1486
|
+
TimePicker2.RangePicker,
|
|
1487
|
+
{
|
|
1488
|
+
format: "HH:mm",
|
|
1489
|
+
value,
|
|
1490
|
+
placeholder,
|
|
1491
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1492
|
+
onChange,
|
|
1493
|
+
allowClear: true,
|
|
1494
|
+
disabled
|
|
1495
|
+
}
|
|
1496
|
+
),
|
|
1497
|
+
/* @__PURE__ */ jsxs20("div", { children: [
|
|
1498
|
+
/* @__PURE__ */ jsx24("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1499
|
+
" ",
|
|
1500
|
+
showError && /* @__PURE__ */ jsx24("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1501
|
+
] })
|
|
1502
|
+
] })
|
|
1503
|
+
}
|
|
1504
|
+
);
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
// src/Select/SelectField/SelectField.tsx
|
|
1508
|
+
import { Select, ConfigProvider as ConfigProvider9 } from "antd";
|
|
1509
|
+
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1510
|
+
function SelectField({
|
|
1511
|
+
value,
|
|
1512
|
+
onChange,
|
|
1513
|
+
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1514
|
+
title,
|
|
1515
|
+
require: require2,
|
|
1516
|
+
bottomText,
|
|
1517
|
+
showError,
|
|
1518
|
+
errorMessage,
|
|
1519
|
+
disabled,
|
|
1520
|
+
defaultValue,
|
|
1521
|
+
options,
|
|
1522
|
+
mode,
|
|
1523
|
+
prefix,
|
|
1524
|
+
prefixSize = 20,
|
|
1525
|
+
handleSearch,
|
|
1526
|
+
className
|
|
1527
|
+
}) {
|
|
1528
|
+
return /* @__PURE__ */ jsx25(
|
|
1529
|
+
ConfigProvider9,
|
|
1530
|
+
{
|
|
1531
|
+
theme: {
|
|
1532
|
+
token: {
|
|
1533
|
+
fontFamily: "Kanit"
|
|
1534
|
+
}
|
|
1535
|
+
},
|
|
1536
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "container-input", children: [
|
|
1537
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
1538
|
+
/* @__PURE__ */ jsx25("span", { className: "body-1", children: title }),
|
|
1539
|
+
" ",
|
|
1540
|
+
require2 && /* @__PURE__ */ jsx25("span", { className: "text-red-500", children: "*" })
|
|
1541
|
+
] }),
|
|
1542
|
+
/* @__PURE__ */ jsx25(
|
|
1543
|
+
Select,
|
|
1544
|
+
{
|
|
1545
|
+
showSearch: true,
|
|
1546
|
+
value,
|
|
1547
|
+
defaultValue,
|
|
1548
|
+
onChange,
|
|
1549
|
+
className: `body-1 flex justify-center w-full ${className ?? ""}`,
|
|
1550
|
+
placeholder,
|
|
1551
|
+
optionFilterProp: "label",
|
|
1552
|
+
filterOption: (input, option) => (option?.label ?? "").toString().toLowerCase().includes(input.toLowerCase()),
|
|
1553
|
+
disabled,
|
|
1554
|
+
options,
|
|
1555
|
+
mode,
|
|
1556
|
+
onSearch: handleSearch,
|
|
1557
|
+
prefix: prefix ? /* @__PURE__ */ jsx25("span", { style: { width: prefixSize, height: prefixSize, display: "flex", alignItems: "center", justifyContent: "center" }, children: prefix }) : void 0,
|
|
1558
|
+
allowClear: true
|
|
1559
|
+
}
|
|
1560
|
+
),
|
|
1561
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
1562
|
+
/* @__PURE__ */ jsx25("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1563
|
+
" ",
|
|
1564
|
+
showError && /* @__PURE__ */ jsx25("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1565
|
+
] })
|
|
1566
|
+
] })
|
|
1567
|
+
}
|
|
1568
|
+
);
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
1572
|
+
import { Select as Select2, ConfigProvider as ConfigProvider10 } from "antd";
|
|
1573
|
+
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1574
|
+
function SelectFieldGroup({
|
|
1575
|
+
value,
|
|
1576
|
+
onChange,
|
|
1577
|
+
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1578
|
+
title,
|
|
1579
|
+
require: require2,
|
|
1580
|
+
bottomText,
|
|
1581
|
+
showError,
|
|
1582
|
+
errorMessage,
|
|
1583
|
+
disabled,
|
|
1584
|
+
defaultValue,
|
|
1585
|
+
options,
|
|
1586
|
+
mode,
|
|
1587
|
+
prefix,
|
|
1588
|
+
prefixSize = 20,
|
|
1589
|
+
handleSearch,
|
|
1590
|
+
className
|
|
1591
|
+
}) {
|
|
1592
|
+
return /* @__PURE__ */ jsx26(
|
|
1593
|
+
ConfigProvider10,
|
|
1594
|
+
{
|
|
1595
|
+
theme: {
|
|
1596
|
+
token: {
|
|
1597
|
+
fontFamily: "Kanit"
|
|
1598
|
+
}
|
|
1599
|
+
},
|
|
1600
|
+
children: /* @__PURE__ */ jsxs22("div", { className: "container-input", children: [
|
|
1601
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
1602
|
+
/* @__PURE__ */ jsx26("span", { className: "body-1", children: title }),
|
|
1603
|
+
" ",
|
|
1604
|
+
require2 && /* @__PURE__ */ jsx26("span", { className: "text-red-500", children: "*" })
|
|
1605
|
+
] }),
|
|
1606
|
+
/* @__PURE__ */ jsx26(
|
|
1607
|
+
Select2,
|
|
1608
|
+
{
|
|
1609
|
+
showSearch: true,
|
|
1610
|
+
value,
|
|
1611
|
+
defaultValue,
|
|
1612
|
+
onChange,
|
|
1613
|
+
className: `body-1 flex justify-center w-full ${className ?? ""}`,
|
|
1614
|
+
placeholder,
|
|
1615
|
+
optionFilterProp: "label",
|
|
1616
|
+
filterOption: (input, option) => (option?.label ?? "").toString().toLowerCase().includes(input.toLowerCase()),
|
|
1617
|
+
disabled,
|
|
1618
|
+
options,
|
|
1619
|
+
mode,
|
|
1620
|
+
onSearch: handleSearch,
|
|
1621
|
+
prefix: prefix ? /* @__PURE__ */ jsx26(
|
|
1622
|
+
"span",
|
|
1623
|
+
{
|
|
1624
|
+
style: {
|
|
1625
|
+
width: prefixSize,
|
|
1626
|
+
height: prefixSize,
|
|
1627
|
+
display: "flex",
|
|
1628
|
+
alignItems: "center",
|
|
1629
|
+
justifyContent: "center"
|
|
1630
|
+
},
|
|
1631
|
+
children: prefix
|
|
1632
|
+
}
|
|
1633
|
+
) : void 0,
|
|
1634
|
+
allowClear: true
|
|
1635
|
+
}
|
|
1636
|
+
),
|
|
1637
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
1638
|
+
/* @__PURE__ */ jsx26("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1639
|
+
" ",
|
|
1640
|
+
showError && /* @__PURE__ */ jsx26("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1641
|
+
] })
|
|
1642
|
+
] })
|
|
1643
|
+
}
|
|
1644
|
+
);
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
1648
|
+
import { Select as Select3, ConfigProvider as ConfigProvider11 } from "antd";
|
|
1649
|
+
|
|
1650
|
+
// src/Select/SelectFieldStatus/StatusMockup.ts
|
|
1651
|
+
var status = [
|
|
1652
|
+
{ value: "1", label: "\u0E40\u0E1B\u0E34\u0E14", color: "var(--color-gray-500)" },
|
|
1653
|
+
{ value: "2", label: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23", color: "var(--color-yellow-400)" },
|
|
1654
|
+
{ value: "3", label: "\u0E23\u0E2D\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A", color: "var(--color-red-400)" },
|
|
1655
|
+
{ value: "4", label: "\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E2A\u0E34\u0E49\u0E19", color: "var(--color-green-400)" },
|
|
1656
|
+
{ value: "5", label: "\u0E16\u0E39\u0E01\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01", color: "var(--color-gray-300)" }
|
|
1657
|
+
];
|
|
1658
|
+
|
|
1659
|
+
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
1660
|
+
import { DownOutlined } from "@ant-design/icons";
|
|
1661
|
+
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1662
|
+
function SelectFieldStatus({
|
|
1663
|
+
value,
|
|
1664
|
+
onChange,
|
|
1665
|
+
placeholder,
|
|
1666
|
+
title,
|
|
1667
|
+
require: require2,
|
|
1668
|
+
bottomText,
|
|
1669
|
+
disabled,
|
|
1670
|
+
showError,
|
|
1671
|
+
errorMessage,
|
|
1672
|
+
options,
|
|
1673
|
+
className
|
|
1674
|
+
}) {
|
|
1675
|
+
const selectedItem = status.find((s) => s.value === value);
|
|
1676
|
+
return /* @__PURE__ */ jsx27(
|
|
1677
|
+
ConfigProvider11,
|
|
1678
|
+
{
|
|
1679
|
+
theme: {
|
|
1680
|
+
components: {
|
|
1681
|
+
Select: {
|
|
1682
|
+
selectorBg: selectedItem?.color || "#ffff",
|
|
1683
|
+
hoverBorderColor: "#D9D9D9",
|
|
1684
|
+
activeBorderColor: "#D9D9D9",
|
|
1685
|
+
activeOutlineColor: "#D9D9D9"
|
|
1686
|
+
}
|
|
1687
|
+
},
|
|
1688
|
+
token: {
|
|
1689
|
+
fontFamily: "Kanit"
|
|
1690
|
+
}
|
|
1691
|
+
},
|
|
1692
|
+
children: /* @__PURE__ */ jsxs23("div", { className: "container-input", children: [
|
|
1693
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
1694
|
+
/* @__PURE__ */ jsx27("span", { className: "body-1", children: title }),
|
|
1695
|
+
" ",
|
|
1696
|
+
require2 && /* @__PURE__ */ jsx27("span", { className: "text-red-500", children: "*" })
|
|
1697
|
+
] }),
|
|
1698
|
+
/* @__PURE__ */ jsx27(
|
|
1699
|
+
Select3,
|
|
1700
|
+
{
|
|
1701
|
+
disabled,
|
|
1702
|
+
suffixIcon: /* @__PURE__ */ jsx27(DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
1703
|
+
value,
|
|
1704
|
+
onChange,
|
|
1705
|
+
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
1706
|
+
placeholder,
|
|
1707
|
+
optionFilterProp: "label",
|
|
1708
|
+
filterOption: (input, option) => (option?.label ?? "").toString().toLowerCase().includes(input.toLowerCase()),
|
|
1709
|
+
options
|
|
1710
|
+
}
|
|
1711
|
+
),
|
|
1712
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
1713
|
+
/* @__PURE__ */ jsx27("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1714
|
+
" ",
|
|
1715
|
+
showError && /* @__PURE__ */ jsx27("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1716
|
+
] })
|
|
1717
|
+
] })
|
|
1718
|
+
}
|
|
1719
|
+
);
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
1723
|
+
import { Select as Select4, ConfigProvider as ConfigProvider12 } from "antd";
|
|
1724
|
+
|
|
1725
|
+
// src/Select/SelectFieldStatusReport/StatusReportMockup.ts
|
|
1726
|
+
var status2 = [
|
|
1727
|
+
{ value: "1", label: "\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E2A\u0E34\u0E49\u0E19", color: "var(--color-green-400)" },
|
|
1728
|
+
{ value: "2", label: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E2A\u0E34\u0E49\u0E19", color: "var(--color-red-500)" }
|
|
1729
|
+
];
|
|
1730
|
+
|
|
1731
|
+
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
1732
|
+
import { DownOutlined as DownOutlined2 } from "@ant-design/icons";
|
|
1733
|
+
import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1734
|
+
function SelectFieldStatusReport({
|
|
1735
|
+
value,
|
|
1736
|
+
onChange,
|
|
1737
|
+
placeholder,
|
|
1738
|
+
title,
|
|
1739
|
+
require: require2,
|
|
1740
|
+
bottomText,
|
|
1741
|
+
disabled,
|
|
1742
|
+
showError,
|
|
1743
|
+
errorMessage,
|
|
1744
|
+
className
|
|
1745
|
+
}) {
|
|
1746
|
+
const selectedItem = status2.find((s) => s.value === value);
|
|
1747
|
+
return /* @__PURE__ */ jsx28(
|
|
1748
|
+
ConfigProvider12,
|
|
1749
|
+
{
|
|
1750
|
+
theme: {
|
|
1751
|
+
components: {
|
|
1752
|
+
Select: {
|
|
1753
|
+
selectorBg: selectedItem?.color || "#ffff",
|
|
1754
|
+
hoverBorderColor: "#D9D9D9",
|
|
1755
|
+
activeBorderColor: "#D9D9D9",
|
|
1756
|
+
activeOutlineColor: "#D9D9D9"
|
|
1757
|
+
}
|
|
1758
|
+
},
|
|
1759
|
+
token: {
|
|
1760
|
+
fontFamily: "Kanit"
|
|
1761
|
+
}
|
|
1762
|
+
},
|
|
1763
|
+
children: /* @__PURE__ */ jsxs24("div", { className: "container-input", children: [
|
|
1764
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
1765
|
+
/* @__PURE__ */ jsx28("span", { className: "body-1", children: title }),
|
|
1766
|
+
" ",
|
|
1767
|
+
require2 && /* @__PURE__ */ jsx28("span", { className: "text-red-500", children: "*" })
|
|
1768
|
+
] }),
|
|
1769
|
+
/* @__PURE__ */ jsx28(
|
|
1770
|
+
Select4,
|
|
1771
|
+
{
|
|
1772
|
+
disabled,
|
|
1773
|
+
suffixIcon: /* @__PURE__ */ jsx28(DownOutlined2, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
1774
|
+
value,
|
|
1775
|
+
onChange,
|
|
1776
|
+
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
1777
|
+
placeholder,
|
|
1778
|
+
optionFilterProp: "label",
|
|
1779
|
+
filterSort: (optionA, optionB) => (optionA?.label ?? "").toLowerCase().localeCompare((optionB?.label ?? "").toLowerCase()),
|
|
1780
|
+
options: status2.map((s) => ({
|
|
1781
|
+
value: s.value,
|
|
1782
|
+
label: s.label,
|
|
1783
|
+
color: s.color
|
|
1784
|
+
}))
|
|
1785
|
+
}
|
|
1786
|
+
),
|
|
1787
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
1788
|
+
/* @__PURE__ */ jsx28("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1789
|
+
" ",
|
|
1790
|
+
showError && /* @__PURE__ */ jsx28("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1791
|
+
] })
|
|
1792
|
+
] })
|
|
1793
|
+
}
|
|
1794
|
+
);
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
1798
|
+
import { Select as Select5, ConfigProvider as ConfigProvider13 } from "antd";
|
|
1799
|
+
import { useState as useState6 } from "react";
|
|
1800
|
+
import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1801
|
+
function SelectFieldTag({
|
|
1802
|
+
title,
|
|
1803
|
+
require: require2,
|
|
1804
|
+
bottomText,
|
|
1805
|
+
placeholder,
|
|
1806
|
+
options,
|
|
1807
|
+
showError,
|
|
1808
|
+
errorMessage,
|
|
1809
|
+
value: controlledValue,
|
|
1810
|
+
className,
|
|
1811
|
+
onChange
|
|
1812
|
+
}) {
|
|
1813
|
+
const [internalValue, setInternalValue] = useState6([]);
|
|
1814
|
+
const isControlled = controlledValue !== void 0;
|
|
1815
|
+
const value = isControlled ? controlledValue : internalValue;
|
|
1816
|
+
const [searchWord, setSearchWord] = useState6("");
|
|
1817
|
+
const handleChange = (val) => {
|
|
1818
|
+
const trimValue = val.map((v) => v.trim());
|
|
1819
|
+
const filtered = trimValue.filter((v) => v.trim() !== "");
|
|
1820
|
+
const latest = filtered.slice(-1);
|
|
1821
|
+
if (!isControlled) {
|
|
1822
|
+
setInternalValue(latest);
|
|
1823
|
+
}
|
|
1824
|
+
setSearchWord("");
|
|
1825
|
+
onChange?.(latest);
|
|
1826
|
+
};
|
|
1827
|
+
const handleSearch = (text) => {
|
|
1828
|
+
setSearchWord(text.trimStart());
|
|
1829
|
+
if (!isControlled) {
|
|
1830
|
+
setInternalValue([]);
|
|
1831
|
+
}
|
|
1832
|
+
onChange?.([]);
|
|
1833
|
+
};
|
|
1834
|
+
return /* @__PURE__ */ jsx29(
|
|
1835
|
+
ConfigProvider13,
|
|
1836
|
+
{
|
|
1837
|
+
theme: {
|
|
1838
|
+
token: {
|
|
1839
|
+
fontFamily: "Kanit"
|
|
1840
|
+
}
|
|
1841
|
+
},
|
|
1842
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "container-input", children: [
|
|
1843
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
1844
|
+
/* @__PURE__ */ jsx29("span", { className: "body-1", children: title }),
|
|
1845
|
+
" ",
|
|
1846
|
+
require2 && /* @__PURE__ */ jsx29("span", { className: "text-red-500", children: "*" })
|
|
1847
|
+
] }),
|
|
1848
|
+
/* @__PURE__ */ jsx29(
|
|
1849
|
+
Select5,
|
|
1850
|
+
{
|
|
1851
|
+
mode: "tags",
|
|
1852
|
+
className: `body-1 flex justify-center w-full ${className ?? ""}`,
|
|
1853
|
+
placeholder,
|
|
1854
|
+
value,
|
|
1855
|
+
onChange: handleChange,
|
|
1856
|
+
onSearch: handleSearch,
|
|
1857
|
+
filterOption: (input, option) => {
|
|
1858
|
+
if (!input.trim()) return true;
|
|
1859
|
+
return (option?.label).toLowerCase().includes(input.toLowerCase());
|
|
1860
|
+
},
|
|
1861
|
+
searchValue: searchWord,
|
|
1862
|
+
options,
|
|
1863
|
+
allowClear: true
|
|
1864
|
+
}
|
|
1865
|
+
),
|
|
1866
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
1867
|
+
/* @__PURE__ */ jsx29("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1868
|
+
" ",
|
|
1869
|
+
showError && /* @__PURE__ */ jsx29("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1870
|
+
] })
|
|
1871
|
+
] })
|
|
1872
|
+
}
|
|
1873
|
+
);
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
// src/SortFilter/SortFilter.tsx
|
|
1877
|
+
import { ConfigProvider as ConfigProvider14 } from "antd";
|
|
1878
|
+
import { CalendarOutlined } from "@ant-design/icons";
|
|
1879
|
+
|
|
1880
|
+
// src/SortFilter/DataMockSortFilter.ts
|
|
1881
|
+
var years = [
|
|
1882
|
+
{ value: "\u0E1B\u0E35 2566", label: "\u0E1B\u0E35 2566" },
|
|
1883
|
+
{ value: "\u0E1B\u0E35 2567", label: "\u0E1B\u0E35 2567" },
|
|
1884
|
+
{ value: "\u0E1B\u0E35 2568", label: "\u0E1B\u0E35 2568" }
|
|
1885
|
+
];
|
|
1886
|
+
var months = [
|
|
1887
|
+
{ value: "\u0E21\u0E01\u0E23\u0E32\u0E04\u0E21", label: "\u0E21\u0E01\u0E23\u0E32\u0E04\u0E21" },
|
|
1888
|
+
{ value: "\u0E01\u0E38\u0E21\u0E20\u0E32\u0E1E\u0E31\u0E19\u0E18\u0E4C", label: "\u0E01\u0E38\u0E21\u0E20\u0E32\u0E1E\u0E31\u0E19\u0E18\u0E4C" },
|
|
1889
|
+
{ value: "\u0E21\u0E35\u0E19\u0E32\u0E04\u0E21", label: "\u0E21\u0E35\u0E19\u0E32\u0E04\u0E21" },
|
|
1890
|
+
{ value: "\u0E40\u0E21\u0E29\u0E32\u0E22\u0E19", label: "\u0E40\u0E21\u0E29\u0E32\u0E22\u0E19" },
|
|
1891
|
+
{ value: "\u0E1E\u0E24\u0E29\u0E20\u0E32\u0E04\u0E21", label: "\u0E1E\u0E24\u0E29\u0E20\u0E32\u0E04\u0E21" },
|
|
1892
|
+
{ value: "\u0E21\u0E34\u0E16\u0E38\u0E19\u0E32\u0E22\u0E19", label: "\u0E21\u0E34\u0E16\u0E38\u0E19\u0E32\u0E22\u0E19" },
|
|
1893
|
+
{ value: "\u0E01\u0E23\u0E01\u0E0E\u0E32\u0E04\u0E21", label: "\u0E01\u0E23\u0E01\u0E0E\u0E32\u0E04\u0E21" },
|
|
1894
|
+
{ value: "\u0E2A\u0E34\u0E07\u0E2B\u0E32\u0E04\u0E21", label: "\u0E2A\u0E34\u0E07\u0E2B\u0E32\u0E04\u0E21" },
|
|
1895
|
+
{ value: "\u0E01\u0E31\u0E19\u0E22\u0E32\u0E22\u0E19", label: "\u0E01\u0E31\u0E19\u0E22\u0E32\u0E22\u0E19" },
|
|
1896
|
+
{ value: "\u0E15\u0E38\u0E25\u0E32\u0E04\u0E21", label: "\u0E15\u0E38\u0E25\u0E32\u0E04\u0E21" },
|
|
1897
|
+
{ value: "\u0E1E\u0E24\u0E28\u0E08\u0E34\u0E01\u0E32\u0E22\u0E19", label: "\u0E1E\u0E24\u0E28\u0E08\u0E34\u0E01\u0E32\u0E22\u0E19" },
|
|
1898
|
+
{ value: "\u0E18\u0E31\u0E19\u0E27\u0E32\u0E04\u0E21", label: "\u0E18\u0E31\u0E19\u0E27\u0E32\u0E04\u0E21" }
|
|
1899
|
+
];
|
|
1900
|
+
var quarters = [
|
|
1901
|
+
{ value: "\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A 1", label: "\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A 1" },
|
|
1902
|
+
{ value: "\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A 2", label: "\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A 2" },
|
|
1903
|
+
{ value: "\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A 3", label: "\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A 3" },
|
|
1904
|
+
{ value: "\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A 4", label: "\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A 4" }
|
|
1905
|
+
];
|
|
1906
|
+
|
|
1907
|
+
// src/SortFilter/SortFilter.tsx
|
|
1908
|
+
import { useState as useState7 } from "react";
|
|
1909
|
+
import { IconSortDescending as IconSortDescending2, IconFilter } from "@tabler/icons-react";
|
|
1910
|
+
import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1911
|
+
function SortFilter({
|
|
1912
|
+
showYear = true,
|
|
1913
|
+
showQuarter = true,
|
|
1914
|
+
showMonth = true,
|
|
1915
|
+
onSortClick,
|
|
1916
|
+
onFilterClick
|
|
1917
|
+
}) {
|
|
1918
|
+
const [yearValue, setYearValue] = useState7();
|
|
1919
|
+
const [monthValue, setMonthValue] = useState7();
|
|
1920
|
+
const [quarterValue, setQuartersValue] = useState7();
|
|
1921
|
+
return /* @__PURE__ */ jsx30(
|
|
1922
|
+
ConfigProvider14,
|
|
1923
|
+
{
|
|
1924
|
+
theme: {
|
|
1925
|
+
token: {
|
|
1926
|
+
fontFamily: "Kanit"
|
|
1927
|
+
}
|
|
1928
|
+
},
|
|
1929
|
+
children: /* @__PURE__ */ jsxs26("div", { className: "w-full flex items-center justify-between", children: [
|
|
1930
|
+
/* @__PURE__ */ jsxs26("div", { className: "w-full flex gap-[10px]", children: [
|
|
1931
|
+
showYear && /* @__PURE__ */ jsx30("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx30(
|
|
1932
|
+
SelectField,
|
|
1933
|
+
{
|
|
1934
|
+
prefix: /* @__PURE__ */ jsx30(CalendarOutlined, {}),
|
|
1935
|
+
onChange: setYearValue,
|
|
1936
|
+
options: years.map((s) => ({
|
|
1937
|
+
value: s.value,
|
|
1938
|
+
label: s.label
|
|
1939
|
+
})),
|
|
1940
|
+
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E1B\u0E35",
|
|
1941
|
+
value: yearValue
|
|
1942
|
+
}
|
|
1943
|
+
) }),
|
|
1944
|
+
showMonth && /* @__PURE__ */ jsx30("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx30(
|
|
1945
|
+
SelectField,
|
|
1946
|
+
{
|
|
1947
|
+
prefix: /* @__PURE__ */ jsx30(CalendarOutlined, {}),
|
|
1948
|
+
onChange: setMonthValue,
|
|
1949
|
+
options: months.map((s) => ({
|
|
1950
|
+
value: s.value,
|
|
1951
|
+
label: s.label
|
|
1952
|
+
})),
|
|
1953
|
+
value: monthValue,
|
|
1954
|
+
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
1955
|
+
}
|
|
1956
|
+
) }),
|
|
1957
|
+
showQuarter && /* @__PURE__ */ jsx30("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx30(
|
|
1958
|
+
SelectField,
|
|
1959
|
+
{
|
|
1960
|
+
prefix: /* @__PURE__ */ jsx30(CalendarOutlined, {}),
|
|
1961
|
+
onChange: setQuartersValue,
|
|
1962
|
+
options: quarters.map((s) => ({
|
|
1963
|
+
value: s.value,
|
|
1964
|
+
label: s.label
|
|
1965
|
+
})),
|
|
1966
|
+
value: quarterValue,
|
|
1967
|
+
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A"
|
|
1968
|
+
}
|
|
1969
|
+
) })
|
|
1970
|
+
] }),
|
|
1971
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex gap-[10px]", children: [
|
|
1972
|
+
/* @__PURE__ */ jsx30(
|
|
1973
|
+
IconSortDescending2,
|
|
1974
|
+
{
|
|
1975
|
+
size: 24,
|
|
1976
|
+
className: "cursor-pointer",
|
|
1977
|
+
onClick: onSortClick
|
|
1978
|
+
}
|
|
1979
|
+
),
|
|
1980
|
+
/* @__PURE__ */ jsx30(
|
|
1981
|
+
IconFilter,
|
|
1982
|
+
{
|
|
1983
|
+
size: 24,
|
|
1984
|
+
className: "cursor-pointer",
|
|
1985
|
+
onClick: onFilterClick
|
|
1986
|
+
}
|
|
1987
|
+
)
|
|
1988
|
+
] })
|
|
1989
|
+
] })
|
|
1990
|
+
}
|
|
1991
|
+
);
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
// src/Upload/FileUploader/FileUploader.tsx
|
|
1995
|
+
import { IconPaperclip, IconUpload, IconTrash } from "@tabler/icons-react";
|
|
1996
|
+
import { useRef as useRef2, useState as useState8 } from "react";
|
|
1997
|
+
import { Fragment as Fragment5, jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1998
|
+
function FileUploader({
|
|
1999
|
+
onUpload,
|
|
2000
|
+
onError,
|
|
2001
|
+
onRemove,
|
|
2002
|
+
accept,
|
|
2003
|
+
maxSize,
|
|
2004
|
+
disabled,
|
|
2005
|
+
mode = "drop",
|
|
2006
|
+
description,
|
|
2007
|
+
label
|
|
2008
|
+
}) {
|
|
2009
|
+
const [fileList, setFileList] = useState8([]);
|
|
2010
|
+
const [uploading, setUploading] = useState8(false);
|
|
2011
|
+
const [dragActive, setDragActive] = useState8(false);
|
|
2012
|
+
const inputRef = useRef2(null);
|
|
2013
|
+
const validateFile = (file) => {
|
|
2014
|
+
if (accept && !accept.includes(file.type)) {
|
|
2015
|
+
onError?.(`Invalid file type. file: ${file.name}`);
|
|
2016
|
+
throw new Error("Invalid file type");
|
|
2017
|
+
}
|
|
2018
|
+
if (maxSize && file.size > maxSize * 1024 * 1024) {
|
|
2019
|
+
onError?.(`Invalid file size. file: ${file.name}`);
|
|
2020
|
+
throw new Error("Invalid file size");
|
|
2021
|
+
}
|
|
2022
|
+
return true;
|
|
2023
|
+
};
|
|
2024
|
+
const handleUploadClick = () => {
|
|
2025
|
+
inputRef.current?.click();
|
|
2026
|
+
};
|
|
2027
|
+
const handleRemoveFile = async (index) => {
|
|
2028
|
+
try {
|
|
2029
|
+
if (onRemove) {
|
|
2030
|
+
await onRemove();
|
|
2031
|
+
}
|
|
2032
|
+
const updatedList = [...fileList];
|
|
2033
|
+
updatedList.splice(index, 1);
|
|
2034
|
+
setFileList(updatedList);
|
|
2035
|
+
} catch (error) {
|
|
2036
|
+
console.log(error);
|
|
2037
|
+
}
|
|
2038
|
+
};
|
|
2039
|
+
const handleUpload = (event) => {
|
|
2040
|
+
handleFileChange(event.target.files);
|
|
2041
|
+
};
|
|
2042
|
+
const handleDrop = (event) => {
|
|
2043
|
+
event.preventDefault();
|
|
2044
|
+
setDragActive(false);
|
|
2045
|
+
if (disabled) return;
|
|
2046
|
+
handleFileChange(event.dataTransfer.files);
|
|
2047
|
+
};
|
|
2048
|
+
const handleFileChange = async (files) => {
|
|
2049
|
+
if (!files) return;
|
|
2050
|
+
const fileArray = Array.from(files);
|
|
2051
|
+
for (const file of fileArray) {
|
|
2052
|
+
if (!validateFile(file)) continue;
|
|
2053
|
+
setUploading(true);
|
|
2054
|
+
try {
|
|
2055
|
+
if (onUpload) {
|
|
2056
|
+
await onUpload(file);
|
|
2057
|
+
}
|
|
2058
|
+
setFileList((prev) => [...prev, file]);
|
|
2059
|
+
} catch (err) {
|
|
2060
|
+
console.log("catch");
|
|
2061
|
+
console.error(err);
|
|
2062
|
+
} finally {
|
|
2063
|
+
setUploading(false);
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
if (inputRef.current) inputRef.current.value = "";
|
|
2067
|
+
};
|
|
2068
|
+
return /* @__PURE__ */ jsxs27("div", { className: "w-full", children: [
|
|
2069
|
+
label && /* @__PURE__ */ jsx31("p", { className: "body-1", children: label }),
|
|
2070
|
+
/* @__PURE__ */ jsxs27("div", { children: [
|
|
2071
|
+
mode === "upload" ? /* @__PURE__ */ jsx31(
|
|
2072
|
+
"button",
|
|
2073
|
+
{
|
|
2074
|
+
type: "button",
|
|
2075
|
+
onClick: handleUploadClick,
|
|
2076
|
+
className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
|
|
2077
|
+
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
2078
|
+
disabled: disabled ? disabled : uploading,
|
|
2079
|
+
children: uploading ? /* @__PURE__ */ jsxs27(Fragment5, { children: [
|
|
2080
|
+
/* @__PURE__ */ jsx31(Loader, { size: 15 }),
|
|
2081
|
+
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
2082
|
+
] }) : /* @__PURE__ */ jsxs27(Fragment5, { children: [
|
|
2083
|
+
/* @__PURE__ */ jsx31(IconUpload, { size: 15, className: "text-gray-400" }),
|
|
2084
|
+
" \u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C"
|
|
2085
|
+
] })
|
|
2086
|
+
}
|
|
2087
|
+
) : /* @__PURE__ */ jsx31(
|
|
2088
|
+
"div",
|
|
2089
|
+
{
|
|
2090
|
+
className: `min-w-[400px] min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
|
|
2091
|
+
${dragActive ? "border-primary-500 bg-primary-50" : "border-gray-300 bg-white"}
|
|
2092
|
+
${disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
|
|
2093
|
+
`,
|
|
2094
|
+
onClick: handleUploadClick,
|
|
2095
|
+
onDragOver: (e) => {
|
|
2096
|
+
e.preventDefault();
|
|
2097
|
+
if (!disabled) setDragActive(true);
|
|
2098
|
+
},
|
|
2099
|
+
onDragLeave: () => setDragActive(false),
|
|
2100
|
+
onDrop: handleDrop,
|
|
2101
|
+
children: uploading ? /* @__PURE__ */ jsxs27("div", { className: "flex justify-center items-center gap-2", children: [
|
|
2102
|
+
/* @__PURE__ */ jsx31(Loader, { size: 15 }),
|
|
2103
|
+
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
2104
|
+
] }) : /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-2", children: [
|
|
2105
|
+
/* @__PURE__ */ jsx31(IconUpload, { size: 20 }),
|
|
2106
|
+
/* @__PURE__ */ jsx31("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" }),
|
|
2107
|
+
/* @__PURE__ */ jsx31("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" })
|
|
2108
|
+
] })
|
|
2109
|
+
}
|
|
2110
|
+
),
|
|
2111
|
+
/* @__PURE__ */ jsx31(
|
|
2112
|
+
"input",
|
|
2113
|
+
{
|
|
2114
|
+
type: "file",
|
|
2115
|
+
multiple: true,
|
|
2116
|
+
ref: inputRef,
|
|
2117
|
+
onChange: handleUpload,
|
|
2118
|
+
style: { display: "none" },
|
|
2119
|
+
accept: accept?.join(","),
|
|
2120
|
+
disabled
|
|
2121
|
+
}
|
|
2122
|
+
)
|
|
2123
|
+
] }),
|
|
2124
|
+
description && /* @__PURE__ */ jsx31("p", { className: "text-gray-400 body-4", children: description }),
|
|
2125
|
+
/* @__PURE__ */ jsx31("div", { className: "mt-[8px]", children: fileList.length !== 0 && fileList.map((file, index) => /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2 rounded-[4px] px-[8px] py-[4px] body-1", children: [
|
|
2126
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
|
|
2127
|
+
/* @__PURE__ */ jsx31("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ jsx31(IconPaperclip, { size: 15 }) }),
|
|
2128
|
+
/* @__PURE__ */ jsx31("span", { className: "truncate", children: file.name })
|
|
2129
|
+
] }),
|
|
2130
|
+
/* @__PURE__ */ jsx31(
|
|
2131
|
+
IconTrash,
|
|
2132
|
+
{
|
|
2133
|
+
size: 20,
|
|
2134
|
+
className: "ml-auto hover:text-red-500 cursor-pointer",
|
|
2135
|
+
onClick: () => handleRemoveFile(index)
|
|
2136
|
+
}
|
|
2137
|
+
)
|
|
2138
|
+
] }, index)) })
|
|
380
2139
|
] });
|
|
381
2140
|
}
|
|
2141
|
+
|
|
2142
|
+
// src/Message/Message/Message.tsx
|
|
2143
|
+
var messageApi = null;
|
|
2144
|
+
function setMessageApi(api) {
|
|
2145
|
+
messageApi = api;
|
|
2146
|
+
}
|
|
2147
|
+
function messageSuccess(content) {
|
|
2148
|
+
messageApi?.success({ content, className: "message message-success" });
|
|
2149
|
+
}
|
|
2150
|
+
function messageError(content) {
|
|
2151
|
+
messageApi?.error({ content, className: "message message-error" });
|
|
2152
|
+
}
|
|
2153
|
+
function messageWarning(content) {
|
|
2154
|
+
messageApi?.warning({ content, className: "message message-warning" });
|
|
2155
|
+
}
|
|
2156
|
+
function messageInfo(content) {
|
|
2157
|
+
messageApi?.info({ content, className: "message message-info" });
|
|
2158
|
+
}
|
|
2159
|
+
function messageLoading(content, duration) {
|
|
2160
|
+
messageApi?.loading({ content, duration, className: "message message-loading" });
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
// src/Breadcrumb/Breadcrumb.tsx
|
|
2164
|
+
import { ConfigProvider as ConfigProvider15 } from "antd";
|
|
2165
|
+
import { Breadcrumb } from "antd";
|
|
2166
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2167
|
+
function Breadcrumbs({
|
|
2168
|
+
items,
|
|
2169
|
+
separator,
|
|
2170
|
+
itemRender,
|
|
2171
|
+
classname,
|
|
2172
|
+
params
|
|
2173
|
+
}) {
|
|
2174
|
+
return /* @__PURE__ */ jsx32(
|
|
2175
|
+
ConfigProvider15,
|
|
2176
|
+
{
|
|
2177
|
+
theme: {
|
|
2178
|
+
token: {
|
|
2179
|
+
fontFamily: "Kanit"
|
|
2180
|
+
}
|
|
2181
|
+
},
|
|
2182
|
+
children: /* @__PURE__ */ jsx32(
|
|
2183
|
+
Breadcrumb,
|
|
2184
|
+
{
|
|
2185
|
+
items,
|
|
2186
|
+
separator,
|
|
2187
|
+
itemRender,
|
|
2188
|
+
className: classname,
|
|
2189
|
+
params
|
|
2190
|
+
}
|
|
2191
|
+
)
|
|
2192
|
+
}
|
|
2193
|
+
);
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
// src/HeadingPage/HeadingPage.tsx
|
|
2197
|
+
import { ConfigProvider as ConfigProvider16 } from "antd";
|
|
2198
|
+
import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2199
|
+
function HeadingPage({ Heading }) {
|
|
2200
|
+
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
2201
|
+
weekday: "long",
|
|
2202
|
+
day: "numeric",
|
|
2203
|
+
month: "long",
|
|
2204
|
+
year: "numeric"
|
|
2205
|
+
});
|
|
2206
|
+
return /* @__PURE__ */ jsx33(
|
|
2207
|
+
ConfigProvider16,
|
|
2208
|
+
{
|
|
2209
|
+
theme: {
|
|
2210
|
+
token: {
|
|
2211
|
+
fontFamily: "Kanit"
|
|
2212
|
+
}
|
|
2213
|
+
},
|
|
2214
|
+
children: /* @__PURE__ */ jsxs28("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
|
|
2215
|
+
/* @__PURE__ */ jsx33("p", { className: "headline-5", children: Heading }),
|
|
2216
|
+
/* @__PURE__ */ jsxs28("p", { className: "body-1", children: [
|
|
2217
|
+
" \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
|
|
2218
|
+
today
|
|
2219
|
+
] })
|
|
2220
|
+
] })
|
|
2221
|
+
}
|
|
2222
|
+
);
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
// src/Progress/ProgressBar.tsx
|
|
2226
|
+
import { ConfigProvider as ConfigProvider17, Progress } from "antd";
|
|
2227
|
+
import { useEffect as useEffect2, useRef as useRef3, useState as useState9 } from "react";
|
|
2228
|
+
import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2229
|
+
function ProgressBar({
|
|
2230
|
+
percent = 0,
|
|
2231
|
+
size = "default",
|
|
2232
|
+
checkpoints = [],
|
|
2233
|
+
showInfo,
|
|
2234
|
+
trailColor = "#DBE0E5",
|
|
2235
|
+
type,
|
|
2236
|
+
strokeLinecap,
|
|
2237
|
+
strokeWidth,
|
|
2238
|
+
steps,
|
|
2239
|
+
isCheckPoints
|
|
2240
|
+
}) {
|
|
2241
|
+
const [barWidth, setBarWidth] = useState9(0);
|
|
2242
|
+
const progressRef = useRef3(null);
|
|
2243
|
+
let strokeColor = "--color-green-500";
|
|
2244
|
+
const defaultStrokeWidth = type === "circle" ? 13 : strokeWidth ?? 8;
|
|
2245
|
+
const defaultSize = type === "circle" ? 43 : size;
|
|
2246
|
+
if (percent < 100 && checkpoints.length > 0) {
|
|
2247
|
+
const minCheckpoint = Math.min(...checkpoints);
|
|
2248
|
+
strokeColor = percent >= minCheckpoint ? "var(--color-green-500)" : "var(--color-red-500)";
|
|
2249
|
+
}
|
|
2250
|
+
useEffect2(() => {
|
|
2251
|
+
const inner = progressRef.current?.querySelector(
|
|
2252
|
+
".ant-progress-inner"
|
|
2253
|
+
);
|
|
2254
|
+
if (!inner) return;
|
|
2255
|
+
const observer = new ResizeObserver(() => {
|
|
2256
|
+
setBarWidth(inner.offsetWidth);
|
|
2257
|
+
});
|
|
2258
|
+
observer.observe(inner);
|
|
2259
|
+
return () => observer.disconnect();
|
|
2260
|
+
}, []);
|
|
2261
|
+
return /* @__PURE__ */ jsx34(
|
|
2262
|
+
ConfigProvider17,
|
|
2263
|
+
{
|
|
2264
|
+
theme: {
|
|
2265
|
+
token: {
|
|
2266
|
+
fontFamily: "Kanit"
|
|
2267
|
+
}
|
|
2268
|
+
},
|
|
2269
|
+
children: /* @__PURE__ */ jsxs29("div", { className: "relative w-full", ref: progressRef, children: [
|
|
2270
|
+
/* @__PURE__ */ jsx34(
|
|
2271
|
+
Progress,
|
|
2272
|
+
{
|
|
2273
|
+
className: "w-full",
|
|
2274
|
+
percent,
|
|
2275
|
+
size: defaultSize,
|
|
2276
|
+
type,
|
|
2277
|
+
showInfo,
|
|
2278
|
+
trailColor,
|
|
2279
|
+
format: (percent2) => `${percent2}%`,
|
|
2280
|
+
strokeLinecap,
|
|
2281
|
+
strokeWidth: defaultStrokeWidth,
|
|
2282
|
+
steps,
|
|
2283
|
+
strokeColor
|
|
2284
|
+
}
|
|
2285
|
+
),
|
|
2286
|
+
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ jsx34(
|
|
2287
|
+
"div",
|
|
2288
|
+
{
|
|
2289
|
+
className: "checkpoint absolute top-0",
|
|
2290
|
+
style: {
|
|
2291
|
+
left: `${cp / 100 * barWidth}px`,
|
|
2292
|
+
width: 0,
|
|
2293
|
+
height: 0,
|
|
2294
|
+
borderLeft: "6px solid transparent",
|
|
2295
|
+
borderRight: "6px solid transparent",
|
|
2296
|
+
borderTop: "10px solid red",
|
|
2297
|
+
transform: "translateX(-50%)"
|
|
2298
|
+
}
|
|
2299
|
+
},
|
|
2300
|
+
cp
|
|
2301
|
+
))
|
|
2302
|
+
] })
|
|
2303
|
+
}
|
|
2304
|
+
);
|
|
2305
|
+
}
|
|
382
2306
|
export {
|
|
2307
|
+
AntDataTable,
|
|
2308
|
+
Breadcrumbs,
|
|
383
2309
|
Calendar,
|
|
384
2310
|
Checkbox,
|
|
385
2311
|
CheckboxGroup,
|
|
2312
|
+
ColorPickerBasic,
|
|
386
2313
|
DataTable,
|
|
2314
|
+
DatePickerBasic,
|
|
2315
|
+
DatePickerRangePicker,
|
|
2316
|
+
FileUploader,
|
|
387
2317
|
GhostButton,
|
|
2318
|
+
HeadingPage,
|
|
2319
|
+
InputField,
|
|
388
2320
|
Loader,
|
|
389
2321
|
MenuNavBar,
|
|
390
2322
|
PrimaryButton,
|
|
2323
|
+
ProgressBar,
|
|
391
2324
|
Radio,
|
|
392
2325
|
RadioGroup,
|
|
393
2326
|
SecondaryButton,
|
|
2327
|
+
SelectField,
|
|
2328
|
+
SelectFieldGroup,
|
|
2329
|
+
SelectFieldStatus,
|
|
2330
|
+
SelectFieldStatusReport,
|
|
2331
|
+
SelectFieldTag,
|
|
2332
|
+
Sidebar,
|
|
2333
|
+
SortFilter,
|
|
394
2334
|
Switch,
|
|
2335
|
+
TextAreaInput,
|
|
395
2336
|
TextInput,
|
|
396
|
-
|
|
2337
|
+
TimePickerBasic,
|
|
2338
|
+
TimePickerRangePicker,
|
|
2339
|
+
TopNavBar,
|
|
2340
|
+
messageError,
|
|
2341
|
+
messageInfo,
|
|
2342
|
+
messageLoading,
|
|
2343
|
+
messageSuccess,
|
|
2344
|
+
messageWarning,
|
|
2345
|
+
setMessageApi
|
|
397
2346
|
};
|