@esic-lab/data-core-ui 0.0.18 → 0.0.20
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-ADYYAPS3.svg → STO-logo-KFQUNTJ3.svg} +92 -92
- package/dist/assets/STO-logo.svg +92 -92
- package/dist/index.d.mts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +911 -128
- package/dist/index.mjs +904 -122
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1235,7 +1235,8 @@ function ColorPickerBasic({
|
|
|
1235
1235
|
{
|
|
1236
1236
|
theme: {
|
|
1237
1237
|
token: {
|
|
1238
|
-
fontFamily: "Kanit"
|
|
1238
|
+
fontFamily: "Kanit",
|
|
1239
|
+
fontSize: 16
|
|
1239
1240
|
}
|
|
1240
1241
|
},
|
|
1241
1242
|
children: /* @__PURE__ */ jsxs16("div", { className: "container-input", children: [
|
|
@@ -1508,9 +1509,789 @@ function TimePickerRangePicker({
|
|
|
1508
1509
|
);
|
|
1509
1510
|
}
|
|
1510
1511
|
|
|
1511
|
-
// src/
|
|
1512
|
-
import {
|
|
1512
|
+
// src/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
1513
|
+
import { ConfigProvider as ConfigProvider9, ColorPicker as ColorPicker2, theme } from "antd";
|
|
1514
|
+
|
|
1515
|
+
// node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1516
|
+
function _typeof(o) {
|
|
1517
|
+
"@babel/helpers - typeof";
|
|
1518
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
|
1519
|
+
return typeof o2;
|
|
1520
|
+
} : function(o2) {
|
|
1521
|
+
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
1522
|
+
}, _typeof(o);
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
// node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
1526
|
+
function toPrimitive(t, r) {
|
|
1527
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
1528
|
+
var e = t[Symbol.toPrimitive];
|
|
1529
|
+
if (void 0 !== e) {
|
|
1530
|
+
var i = e.call(t, r || "default");
|
|
1531
|
+
if ("object" != _typeof(i)) return i;
|
|
1532
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1533
|
+
}
|
|
1534
|
+
return ("string" === r ? String : Number)(t);
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
// node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
1538
|
+
function toPropertyKey(t) {
|
|
1539
|
+
var i = toPrimitive(t, "string");
|
|
1540
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
// node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
1544
|
+
function _defineProperty(e, r, t) {
|
|
1545
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
1546
|
+
value: t,
|
|
1547
|
+
enumerable: true,
|
|
1548
|
+
configurable: true,
|
|
1549
|
+
writable: true
|
|
1550
|
+
}) : e[r] = t, e;
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
// node_modules/@ant-design/fast-color/es/FastColor.js
|
|
1554
|
+
var round = Math.round;
|
|
1555
|
+
function splitColorStr(str, parseNum) {
|
|
1556
|
+
const match = str.replace(/^[^(]*\((.*)/, "$1").replace(/\).*/, "").match(/\d*\.?\d+%?/g) || [];
|
|
1557
|
+
const numList = match.map((item) => parseFloat(item));
|
|
1558
|
+
for (let i = 0; i < 3; i += 1) {
|
|
1559
|
+
numList[i] = parseNum(numList[i] || 0, match[i] || "", i);
|
|
1560
|
+
}
|
|
1561
|
+
if (match[3]) {
|
|
1562
|
+
numList[3] = match[3].includes("%") ? numList[3] / 100 : numList[3];
|
|
1563
|
+
} else {
|
|
1564
|
+
numList[3] = 1;
|
|
1565
|
+
}
|
|
1566
|
+
return numList;
|
|
1567
|
+
}
|
|
1568
|
+
var parseHSVorHSL = (num, _, index) => index === 0 ? num : num / 100;
|
|
1569
|
+
function limitRange(value, max) {
|
|
1570
|
+
const mergedMax = max || 255;
|
|
1571
|
+
if (value > mergedMax) {
|
|
1572
|
+
return mergedMax;
|
|
1573
|
+
}
|
|
1574
|
+
if (value < 0) {
|
|
1575
|
+
return 0;
|
|
1576
|
+
}
|
|
1577
|
+
return value;
|
|
1578
|
+
}
|
|
1579
|
+
var FastColor = class _FastColor {
|
|
1580
|
+
constructor(input) {
|
|
1581
|
+
_defineProperty(this, "isValid", true);
|
|
1582
|
+
_defineProperty(this, "r", 0);
|
|
1583
|
+
_defineProperty(this, "g", 0);
|
|
1584
|
+
_defineProperty(this, "b", 0);
|
|
1585
|
+
_defineProperty(this, "a", 1);
|
|
1586
|
+
_defineProperty(this, "_h", void 0);
|
|
1587
|
+
_defineProperty(this, "_s", void 0);
|
|
1588
|
+
_defineProperty(this, "_l", void 0);
|
|
1589
|
+
_defineProperty(this, "_v", void 0);
|
|
1590
|
+
_defineProperty(this, "_max", void 0);
|
|
1591
|
+
_defineProperty(this, "_min", void 0);
|
|
1592
|
+
_defineProperty(this, "_brightness", void 0);
|
|
1593
|
+
function matchFormat(str) {
|
|
1594
|
+
return str[0] in input && str[1] in input && str[2] in input;
|
|
1595
|
+
}
|
|
1596
|
+
if (!input) {
|
|
1597
|
+
} else if (typeof input === "string") {
|
|
1598
|
+
let matchPrefix2 = function(prefix) {
|
|
1599
|
+
return trimStr.startsWith(prefix);
|
|
1600
|
+
};
|
|
1601
|
+
var matchPrefix = matchPrefix2;
|
|
1602
|
+
const trimStr = input.trim();
|
|
1603
|
+
if (/^#?[A-F\d]{3,8}$/i.test(trimStr)) {
|
|
1604
|
+
this.fromHexString(trimStr);
|
|
1605
|
+
} else if (matchPrefix2("rgb")) {
|
|
1606
|
+
this.fromRgbString(trimStr);
|
|
1607
|
+
} else if (matchPrefix2("hsl")) {
|
|
1608
|
+
this.fromHslString(trimStr);
|
|
1609
|
+
} else if (matchPrefix2("hsv") || matchPrefix2("hsb")) {
|
|
1610
|
+
this.fromHsvString(trimStr);
|
|
1611
|
+
}
|
|
1612
|
+
} else if (input instanceof _FastColor) {
|
|
1613
|
+
this.r = input.r;
|
|
1614
|
+
this.g = input.g;
|
|
1615
|
+
this.b = input.b;
|
|
1616
|
+
this.a = input.a;
|
|
1617
|
+
this._h = input._h;
|
|
1618
|
+
this._s = input._s;
|
|
1619
|
+
this._l = input._l;
|
|
1620
|
+
this._v = input._v;
|
|
1621
|
+
} else if (matchFormat("rgb")) {
|
|
1622
|
+
this.r = limitRange(input.r);
|
|
1623
|
+
this.g = limitRange(input.g);
|
|
1624
|
+
this.b = limitRange(input.b);
|
|
1625
|
+
this.a = typeof input.a === "number" ? limitRange(input.a, 1) : 1;
|
|
1626
|
+
} else if (matchFormat("hsl")) {
|
|
1627
|
+
this.fromHsl(input);
|
|
1628
|
+
} else if (matchFormat("hsv")) {
|
|
1629
|
+
this.fromHsv(input);
|
|
1630
|
+
} else {
|
|
1631
|
+
throw new Error("@ant-design/fast-color: unsupported input " + JSON.stringify(input));
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
// ======================= Setter =======================
|
|
1635
|
+
setR(value) {
|
|
1636
|
+
return this._sc("r", value);
|
|
1637
|
+
}
|
|
1638
|
+
setG(value) {
|
|
1639
|
+
return this._sc("g", value);
|
|
1640
|
+
}
|
|
1641
|
+
setB(value) {
|
|
1642
|
+
return this._sc("b", value);
|
|
1643
|
+
}
|
|
1644
|
+
setA(value) {
|
|
1645
|
+
return this._sc("a", value, 1);
|
|
1646
|
+
}
|
|
1647
|
+
setHue(value) {
|
|
1648
|
+
const hsv = this.toHsv();
|
|
1649
|
+
hsv.h = value;
|
|
1650
|
+
return this._c(hsv);
|
|
1651
|
+
}
|
|
1652
|
+
// ======================= Getter =======================
|
|
1653
|
+
/**
|
|
1654
|
+
* Returns the perceived luminance of a color, from 0-1.
|
|
1655
|
+
* @see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
|
|
1656
|
+
*/
|
|
1657
|
+
getLuminance() {
|
|
1658
|
+
function adjustGamma(raw) {
|
|
1659
|
+
const val = raw / 255;
|
|
1660
|
+
return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);
|
|
1661
|
+
}
|
|
1662
|
+
const R = adjustGamma(this.r);
|
|
1663
|
+
const G = adjustGamma(this.g);
|
|
1664
|
+
const B = adjustGamma(this.b);
|
|
1665
|
+
return 0.2126 * R + 0.7152 * G + 0.0722 * B;
|
|
1666
|
+
}
|
|
1667
|
+
getHue() {
|
|
1668
|
+
if (typeof this._h === "undefined") {
|
|
1669
|
+
const delta = this.getMax() - this.getMin();
|
|
1670
|
+
if (delta === 0) {
|
|
1671
|
+
this._h = 0;
|
|
1672
|
+
} else {
|
|
1673
|
+
this._h = round(60 * (this.r === this.getMax() ? (this.g - this.b) / delta + (this.g < this.b ? 6 : 0) : this.g === this.getMax() ? (this.b - this.r) / delta + 2 : (this.r - this.g) / delta + 4));
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
return this._h;
|
|
1677
|
+
}
|
|
1678
|
+
getSaturation() {
|
|
1679
|
+
if (typeof this._s === "undefined") {
|
|
1680
|
+
const delta = this.getMax() - this.getMin();
|
|
1681
|
+
if (delta === 0) {
|
|
1682
|
+
this._s = 0;
|
|
1683
|
+
} else {
|
|
1684
|
+
this._s = delta / this.getMax();
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
return this._s;
|
|
1688
|
+
}
|
|
1689
|
+
getLightness() {
|
|
1690
|
+
if (typeof this._l === "undefined") {
|
|
1691
|
+
this._l = (this.getMax() + this.getMin()) / 510;
|
|
1692
|
+
}
|
|
1693
|
+
return this._l;
|
|
1694
|
+
}
|
|
1695
|
+
getValue() {
|
|
1696
|
+
if (typeof this._v === "undefined") {
|
|
1697
|
+
this._v = this.getMax() / 255;
|
|
1698
|
+
}
|
|
1699
|
+
return this._v;
|
|
1700
|
+
}
|
|
1701
|
+
/**
|
|
1702
|
+
* Returns the perceived brightness of the color, from 0-255.
|
|
1703
|
+
* Note: this is not the b of HSB
|
|
1704
|
+
* @see http://www.w3.org/TR/AERT#color-contrast
|
|
1705
|
+
*/
|
|
1706
|
+
getBrightness() {
|
|
1707
|
+
if (typeof this._brightness === "undefined") {
|
|
1708
|
+
this._brightness = (this.r * 299 + this.g * 587 + this.b * 114) / 1e3;
|
|
1709
|
+
}
|
|
1710
|
+
return this._brightness;
|
|
1711
|
+
}
|
|
1712
|
+
// ======================== Func ========================
|
|
1713
|
+
darken(amount = 10) {
|
|
1714
|
+
const h = this.getHue();
|
|
1715
|
+
const s = this.getSaturation();
|
|
1716
|
+
let l = this.getLightness() - amount / 100;
|
|
1717
|
+
if (l < 0) {
|
|
1718
|
+
l = 0;
|
|
1719
|
+
}
|
|
1720
|
+
return this._c({
|
|
1721
|
+
h,
|
|
1722
|
+
s,
|
|
1723
|
+
l,
|
|
1724
|
+
a: this.a
|
|
1725
|
+
});
|
|
1726
|
+
}
|
|
1727
|
+
lighten(amount = 10) {
|
|
1728
|
+
const h = this.getHue();
|
|
1729
|
+
const s = this.getSaturation();
|
|
1730
|
+
let l = this.getLightness() + amount / 100;
|
|
1731
|
+
if (l > 1) {
|
|
1732
|
+
l = 1;
|
|
1733
|
+
}
|
|
1734
|
+
return this._c({
|
|
1735
|
+
h,
|
|
1736
|
+
s,
|
|
1737
|
+
l,
|
|
1738
|
+
a: this.a
|
|
1739
|
+
});
|
|
1740
|
+
}
|
|
1741
|
+
/**
|
|
1742
|
+
* Mix the current color a given amount with another color, from 0 to 100.
|
|
1743
|
+
* 0 means no mixing (return current color).
|
|
1744
|
+
*/
|
|
1745
|
+
mix(input, amount = 50) {
|
|
1746
|
+
const color = this._c(input);
|
|
1747
|
+
const p = amount / 100;
|
|
1748
|
+
const calc = (key) => (color[key] - this[key]) * p + this[key];
|
|
1749
|
+
const rgba = {
|
|
1750
|
+
r: round(calc("r")),
|
|
1751
|
+
g: round(calc("g")),
|
|
1752
|
+
b: round(calc("b")),
|
|
1753
|
+
a: round(calc("a") * 100) / 100
|
|
1754
|
+
};
|
|
1755
|
+
return this._c(rgba);
|
|
1756
|
+
}
|
|
1757
|
+
/**
|
|
1758
|
+
* Mix the color with pure white, from 0 to 100.
|
|
1759
|
+
* Providing 0 will do nothing, providing 100 will always return white.
|
|
1760
|
+
*/
|
|
1761
|
+
tint(amount = 10) {
|
|
1762
|
+
return this.mix({
|
|
1763
|
+
r: 255,
|
|
1764
|
+
g: 255,
|
|
1765
|
+
b: 255,
|
|
1766
|
+
a: 1
|
|
1767
|
+
}, amount);
|
|
1768
|
+
}
|
|
1769
|
+
/**
|
|
1770
|
+
* Mix the color with pure black, from 0 to 100.
|
|
1771
|
+
* Providing 0 will do nothing, providing 100 will always return black.
|
|
1772
|
+
*/
|
|
1773
|
+
shade(amount = 10) {
|
|
1774
|
+
return this.mix({
|
|
1775
|
+
r: 0,
|
|
1776
|
+
g: 0,
|
|
1777
|
+
b: 0,
|
|
1778
|
+
a: 1
|
|
1779
|
+
}, amount);
|
|
1780
|
+
}
|
|
1781
|
+
onBackground(background) {
|
|
1782
|
+
const bg = this._c(background);
|
|
1783
|
+
const alpha = this.a + bg.a * (1 - this.a);
|
|
1784
|
+
const calc = (key) => {
|
|
1785
|
+
return round((this[key] * this.a + bg[key] * bg.a * (1 - this.a)) / alpha);
|
|
1786
|
+
};
|
|
1787
|
+
return this._c({
|
|
1788
|
+
r: calc("r"),
|
|
1789
|
+
g: calc("g"),
|
|
1790
|
+
b: calc("b"),
|
|
1791
|
+
a: alpha
|
|
1792
|
+
});
|
|
1793
|
+
}
|
|
1794
|
+
// ======================= Status =======================
|
|
1795
|
+
isDark() {
|
|
1796
|
+
return this.getBrightness() < 128;
|
|
1797
|
+
}
|
|
1798
|
+
isLight() {
|
|
1799
|
+
return this.getBrightness() >= 128;
|
|
1800
|
+
}
|
|
1801
|
+
// ======================== MISC ========================
|
|
1802
|
+
equals(other) {
|
|
1803
|
+
return this.r === other.r && this.g === other.g && this.b === other.b && this.a === other.a;
|
|
1804
|
+
}
|
|
1805
|
+
clone() {
|
|
1806
|
+
return this._c(this);
|
|
1807
|
+
}
|
|
1808
|
+
// ======================= Format =======================
|
|
1809
|
+
toHexString() {
|
|
1810
|
+
let hex = "#";
|
|
1811
|
+
const rHex = (this.r || 0).toString(16);
|
|
1812
|
+
hex += rHex.length === 2 ? rHex : "0" + rHex;
|
|
1813
|
+
const gHex = (this.g || 0).toString(16);
|
|
1814
|
+
hex += gHex.length === 2 ? gHex : "0" + gHex;
|
|
1815
|
+
const bHex = (this.b || 0).toString(16);
|
|
1816
|
+
hex += bHex.length === 2 ? bHex : "0" + bHex;
|
|
1817
|
+
if (typeof this.a === "number" && this.a >= 0 && this.a < 1) {
|
|
1818
|
+
const aHex = round(this.a * 255).toString(16);
|
|
1819
|
+
hex += aHex.length === 2 ? aHex : "0" + aHex;
|
|
1820
|
+
}
|
|
1821
|
+
return hex;
|
|
1822
|
+
}
|
|
1823
|
+
/** CSS support color pattern */
|
|
1824
|
+
toHsl() {
|
|
1825
|
+
return {
|
|
1826
|
+
h: this.getHue(),
|
|
1827
|
+
s: this.getSaturation(),
|
|
1828
|
+
l: this.getLightness(),
|
|
1829
|
+
a: this.a
|
|
1830
|
+
};
|
|
1831
|
+
}
|
|
1832
|
+
/** CSS support color pattern */
|
|
1833
|
+
toHslString() {
|
|
1834
|
+
const h = this.getHue();
|
|
1835
|
+
const s = round(this.getSaturation() * 100);
|
|
1836
|
+
const l = round(this.getLightness() * 100);
|
|
1837
|
+
return this.a !== 1 ? `hsla(${h},${s}%,${l}%,${this.a})` : `hsl(${h},${s}%,${l}%)`;
|
|
1838
|
+
}
|
|
1839
|
+
/** Same as toHsb */
|
|
1840
|
+
toHsv() {
|
|
1841
|
+
return {
|
|
1842
|
+
h: this.getHue(),
|
|
1843
|
+
s: this.getSaturation(),
|
|
1844
|
+
v: this.getValue(),
|
|
1845
|
+
a: this.a
|
|
1846
|
+
};
|
|
1847
|
+
}
|
|
1848
|
+
toRgb() {
|
|
1849
|
+
return {
|
|
1850
|
+
r: this.r,
|
|
1851
|
+
g: this.g,
|
|
1852
|
+
b: this.b,
|
|
1853
|
+
a: this.a
|
|
1854
|
+
};
|
|
1855
|
+
}
|
|
1856
|
+
toRgbString() {
|
|
1857
|
+
return this.a !== 1 ? `rgba(${this.r},${this.g},${this.b},${this.a})` : `rgb(${this.r},${this.g},${this.b})`;
|
|
1858
|
+
}
|
|
1859
|
+
toString() {
|
|
1860
|
+
return this.toRgbString();
|
|
1861
|
+
}
|
|
1862
|
+
// ====================== Privates ======================
|
|
1863
|
+
/** Return a new FastColor object with one channel changed */
|
|
1864
|
+
_sc(rgb, value, max) {
|
|
1865
|
+
const clone = this.clone();
|
|
1866
|
+
clone[rgb] = limitRange(value, max);
|
|
1867
|
+
return clone;
|
|
1868
|
+
}
|
|
1869
|
+
_c(input) {
|
|
1870
|
+
return new this.constructor(input);
|
|
1871
|
+
}
|
|
1872
|
+
getMax() {
|
|
1873
|
+
if (typeof this._max === "undefined") {
|
|
1874
|
+
this._max = Math.max(this.r, this.g, this.b);
|
|
1875
|
+
}
|
|
1876
|
+
return this._max;
|
|
1877
|
+
}
|
|
1878
|
+
getMin() {
|
|
1879
|
+
if (typeof this._min === "undefined") {
|
|
1880
|
+
this._min = Math.min(this.r, this.g, this.b);
|
|
1881
|
+
}
|
|
1882
|
+
return this._min;
|
|
1883
|
+
}
|
|
1884
|
+
fromHexString(trimStr) {
|
|
1885
|
+
const withoutPrefix = trimStr.replace("#", "");
|
|
1886
|
+
function connectNum(index1, index2) {
|
|
1887
|
+
return parseInt(withoutPrefix[index1] + withoutPrefix[index2 || index1], 16);
|
|
1888
|
+
}
|
|
1889
|
+
if (withoutPrefix.length < 6) {
|
|
1890
|
+
this.r = connectNum(0);
|
|
1891
|
+
this.g = connectNum(1);
|
|
1892
|
+
this.b = connectNum(2);
|
|
1893
|
+
this.a = withoutPrefix[3] ? connectNum(3) / 255 : 1;
|
|
1894
|
+
} else {
|
|
1895
|
+
this.r = connectNum(0, 1);
|
|
1896
|
+
this.g = connectNum(2, 3);
|
|
1897
|
+
this.b = connectNum(4, 5);
|
|
1898
|
+
this.a = withoutPrefix[6] ? connectNum(6, 7) / 255 : 1;
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
fromHsl({
|
|
1902
|
+
h,
|
|
1903
|
+
s,
|
|
1904
|
+
l,
|
|
1905
|
+
a
|
|
1906
|
+
}) {
|
|
1907
|
+
this._h = h % 360;
|
|
1908
|
+
this._s = s;
|
|
1909
|
+
this._l = l;
|
|
1910
|
+
this.a = typeof a === "number" ? a : 1;
|
|
1911
|
+
if (s <= 0) {
|
|
1912
|
+
const rgb = round(l * 255);
|
|
1913
|
+
this.r = rgb;
|
|
1914
|
+
this.g = rgb;
|
|
1915
|
+
this.b = rgb;
|
|
1916
|
+
}
|
|
1917
|
+
let r = 0, g = 0, b = 0;
|
|
1918
|
+
const huePrime = h / 60;
|
|
1919
|
+
const chroma = (1 - Math.abs(2 * l - 1)) * s;
|
|
1920
|
+
const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
1921
|
+
if (huePrime >= 0 && huePrime < 1) {
|
|
1922
|
+
r = chroma;
|
|
1923
|
+
g = secondComponent;
|
|
1924
|
+
} else if (huePrime >= 1 && huePrime < 2) {
|
|
1925
|
+
r = secondComponent;
|
|
1926
|
+
g = chroma;
|
|
1927
|
+
} else if (huePrime >= 2 && huePrime < 3) {
|
|
1928
|
+
g = chroma;
|
|
1929
|
+
b = secondComponent;
|
|
1930
|
+
} else if (huePrime >= 3 && huePrime < 4) {
|
|
1931
|
+
g = secondComponent;
|
|
1932
|
+
b = chroma;
|
|
1933
|
+
} else if (huePrime >= 4 && huePrime < 5) {
|
|
1934
|
+
r = secondComponent;
|
|
1935
|
+
b = chroma;
|
|
1936
|
+
} else if (huePrime >= 5 && huePrime < 6) {
|
|
1937
|
+
r = chroma;
|
|
1938
|
+
b = secondComponent;
|
|
1939
|
+
}
|
|
1940
|
+
const lightnessModification = l - chroma / 2;
|
|
1941
|
+
this.r = round((r + lightnessModification) * 255);
|
|
1942
|
+
this.g = round((g + lightnessModification) * 255);
|
|
1943
|
+
this.b = round((b + lightnessModification) * 255);
|
|
1944
|
+
}
|
|
1945
|
+
fromHsv({
|
|
1946
|
+
h,
|
|
1947
|
+
s,
|
|
1948
|
+
v,
|
|
1949
|
+
a
|
|
1950
|
+
}) {
|
|
1951
|
+
this._h = h % 360;
|
|
1952
|
+
this._s = s;
|
|
1953
|
+
this._v = v;
|
|
1954
|
+
this.a = typeof a === "number" ? a : 1;
|
|
1955
|
+
const vv = round(v * 255);
|
|
1956
|
+
this.r = vv;
|
|
1957
|
+
this.g = vv;
|
|
1958
|
+
this.b = vv;
|
|
1959
|
+
if (s <= 0) {
|
|
1960
|
+
return;
|
|
1961
|
+
}
|
|
1962
|
+
const hh = h / 60;
|
|
1963
|
+
const i = Math.floor(hh);
|
|
1964
|
+
const ff = hh - i;
|
|
1965
|
+
const p = round(v * (1 - s) * 255);
|
|
1966
|
+
const q = round(v * (1 - s * ff) * 255);
|
|
1967
|
+
const t = round(v * (1 - s * (1 - ff)) * 255);
|
|
1968
|
+
switch (i) {
|
|
1969
|
+
case 0:
|
|
1970
|
+
this.g = t;
|
|
1971
|
+
this.b = p;
|
|
1972
|
+
break;
|
|
1973
|
+
case 1:
|
|
1974
|
+
this.r = q;
|
|
1975
|
+
this.b = p;
|
|
1976
|
+
break;
|
|
1977
|
+
case 2:
|
|
1978
|
+
this.r = p;
|
|
1979
|
+
this.b = t;
|
|
1980
|
+
break;
|
|
1981
|
+
case 3:
|
|
1982
|
+
this.r = p;
|
|
1983
|
+
this.g = q;
|
|
1984
|
+
break;
|
|
1985
|
+
case 4:
|
|
1986
|
+
this.r = t;
|
|
1987
|
+
this.g = p;
|
|
1988
|
+
break;
|
|
1989
|
+
case 5:
|
|
1990
|
+
default:
|
|
1991
|
+
this.g = p;
|
|
1992
|
+
this.b = q;
|
|
1993
|
+
break;
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
fromHsvString(trimStr) {
|
|
1997
|
+
const cells = splitColorStr(trimStr, parseHSVorHSL);
|
|
1998
|
+
this.fromHsv({
|
|
1999
|
+
h: cells[0],
|
|
2000
|
+
s: cells[1],
|
|
2001
|
+
v: cells[2],
|
|
2002
|
+
a: cells[3]
|
|
2003
|
+
});
|
|
2004
|
+
}
|
|
2005
|
+
fromHslString(trimStr) {
|
|
2006
|
+
const cells = splitColorStr(trimStr, parseHSVorHSL);
|
|
2007
|
+
this.fromHsl({
|
|
2008
|
+
h: cells[0],
|
|
2009
|
+
s: cells[1],
|
|
2010
|
+
l: cells[2],
|
|
2011
|
+
a: cells[3]
|
|
2012
|
+
});
|
|
2013
|
+
}
|
|
2014
|
+
fromRgbString(trimStr) {
|
|
2015
|
+
const cells = splitColorStr(trimStr, (num, txt) => (
|
|
2016
|
+
// Convert percentage to number. e.g. 50% -> 128
|
|
2017
|
+
txt.includes("%") ? round(num / 100 * 255) : num
|
|
2018
|
+
));
|
|
2019
|
+
this.r = cells[0];
|
|
2020
|
+
this.g = cells[1];
|
|
2021
|
+
this.b = cells[2];
|
|
2022
|
+
this.a = cells[3];
|
|
2023
|
+
}
|
|
2024
|
+
};
|
|
2025
|
+
|
|
2026
|
+
// node_modules/@ant-design/colors/es/generate.js
|
|
2027
|
+
var hueStep = 2;
|
|
2028
|
+
var saturationStep = 0.16;
|
|
2029
|
+
var saturationStep2 = 0.05;
|
|
2030
|
+
var brightnessStep1 = 0.05;
|
|
2031
|
+
var brightnessStep2 = 0.15;
|
|
2032
|
+
var lightColorCount = 5;
|
|
2033
|
+
var darkColorCount = 4;
|
|
2034
|
+
var darkColorMap = [{
|
|
2035
|
+
index: 7,
|
|
2036
|
+
amount: 15
|
|
2037
|
+
}, {
|
|
2038
|
+
index: 6,
|
|
2039
|
+
amount: 25
|
|
2040
|
+
}, {
|
|
2041
|
+
index: 5,
|
|
2042
|
+
amount: 30
|
|
2043
|
+
}, {
|
|
2044
|
+
index: 5,
|
|
2045
|
+
amount: 45
|
|
2046
|
+
}, {
|
|
2047
|
+
index: 5,
|
|
2048
|
+
amount: 65
|
|
2049
|
+
}, {
|
|
2050
|
+
index: 5,
|
|
2051
|
+
amount: 85
|
|
2052
|
+
}, {
|
|
2053
|
+
index: 4,
|
|
2054
|
+
amount: 90
|
|
2055
|
+
}, {
|
|
2056
|
+
index: 3,
|
|
2057
|
+
amount: 95
|
|
2058
|
+
}, {
|
|
2059
|
+
index: 2,
|
|
2060
|
+
amount: 97
|
|
2061
|
+
}, {
|
|
2062
|
+
index: 1,
|
|
2063
|
+
amount: 98
|
|
2064
|
+
}];
|
|
2065
|
+
function getHue(hsv, i, light) {
|
|
2066
|
+
var hue;
|
|
2067
|
+
if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
|
|
2068
|
+
hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
|
|
2069
|
+
} else {
|
|
2070
|
+
hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
|
|
2071
|
+
}
|
|
2072
|
+
if (hue < 0) {
|
|
2073
|
+
hue += 360;
|
|
2074
|
+
} else if (hue >= 360) {
|
|
2075
|
+
hue -= 360;
|
|
2076
|
+
}
|
|
2077
|
+
return hue;
|
|
2078
|
+
}
|
|
2079
|
+
function getSaturation(hsv, i, light) {
|
|
2080
|
+
if (hsv.h === 0 && hsv.s === 0) {
|
|
2081
|
+
return hsv.s;
|
|
2082
|
+
}
|
|
2083
|
+
var saturation;
|
|
2084
|
+
if (light) {
|
|
2085
|
+
saturation = hsv.s - saturationStep * i;
|
|
2086
|
+
} else if (i === darkColorCount) {
|
|
2087
|
+
saturation = hsv.s + saturationStep;
|
|
2088
|
+
} else {
|
|
2089
|
+
saturation = hsv.s + saturationStep2 * i;
|
|
2090
|
+
}
|
|
2091
|
+
if (saturation > 1) {
|
|
2092
|
+
saturation = 1;
|
|
2093
|
+
}
|
|
2094
|
+
if (light && i === lightColorCount && saturation > 0.1) {
|
|
2095
|
+
saturation = 0.1;
|
|
2096
|
+
}
|
|
2097
|
+
if (saturation < 0.06) {
|
|
2098
|
+
saturation = 0.06;
|
|
2099
|
+
}
|
|
2100
|
+
return Math.round(saturation * 100) / 100;
|
|
2101
|
+
}
|
|
2102
|
+
function getValue(hsv, i, light) {
|
|
2103
|
+
var value;
|
|
2104
|
+
if (light) {
|
|
2105
|
+
value = hsv.v + brightnessStep1 * i;
|
|
2106
|
+
} else {
|
|
2107
|
+
value = hsv.v - brightnessStep2 * i;
|
|
2108
|
+
}
|
|
2109
|
+
value = Math.max(0, Math.min(1, value));
|
|
2110
|
+
return Math.round(value * 100) / 100;
|
|
2111
|
+
}
|
|
2112
|
+
function generate(color) {
|
|
2113
|
+
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2114
|
+
var patterns = [];
|
|
2115
|
+
var pColor = new FastColor(color);
|
|
2116
|
+
var hsv = pColor.toHsv();
|
|
2117
|
+
for (var i = lightColorCount; i > 0; i -= 1) {
|
|
2118
|
+
var c = new FastColor({
|
|
2119
|
+
h: getHue(hsv, i, true),
|
|
2120
|
+
s: getSaturation(hsv, i, true),
|
|
2121
|
+
v: getValue(hsv, i, true)
|
|
2122
|
+
});
|
|
2123
|
+
patterns.push(c);
|
|
2124
|
+
}
|
|
2125
|
+
patterns.push(pColor);
|
|
2126
|
+
for (var _i = 1; _i <= darkColorCount; _i += 1) {
|
|
2127
|
+
var _c = new FastColor({
|
|
2128
|
+
h: getHue(hsv, _i),
|
|
2129
|
+
s: getSaturation(hsv, _i),
|
|
2130
|
+
v: getValue(hsv, _i)
|
|
2131
|
+
});
|
|
2132
|
+
patterns.push(_c);
|
|
2133
|
+
}
|
|
2134
|
+
if (opts.theme === "dark") {
|
|
2135
|
+
return darkColorMap.map(function(_ref) {
|
|
2136
|
+
var index = _ref.index, amount = _ref.amount;
|
|
2137
|
+
return new FastColor(opts.backgroundColor || "#141414").mix(patterns[index], amount).toHexString();
|
|
2138
|
+
});
|
|
2139
|
+
}
|
|
2140
|
+
return patterns.map(function(c2) {
|
|
2141
|
+
return c2.toHexString();
|
|
2142
|
+
});
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
// node_modules/@ant-design/colors/es/presets.js
|
|
2146
|
+
var red = ["#fff1f0", "#ffccc7", "#ffa39e", "#ff7875", "#ff4d4f", "#f5222d", "#cf1322", "#a8071a", "#820014", "#5c0011"];
|
|
2147
|
+
red.primary = red[5];
|
|
2148
|
+
var volcano = ["#fff2e8", "#ffd8bf", "#ffbb96", "#ff9c6e", "#ff7a45", "#fa541c", "#d4380d", "#ad2102", "#871400", "#610b00"];
|
|
2149
|
+
volcano.primary = volcano[5];
|
|
2150
|
+
var orange = ["#fff7e6", "#ffe7ba", "#ffd591", "#ffc069", "#ffa940", "#fa8c16", "#d46b08", "#ad4e00", "#873800", "#612500"];
|
|
2151
|
+
orange.primary = orange[5];
|
|
2152
|
+
var gold = ["#fffbe6", "#fff1b8", "#ffe58f", "#ffd666", "#ffc53d", "#faad14", "#d48806", "#ad6800", "#874d00", "#613400"];
|
|
2153
|
+
gold.primary = gold[5];
|
|
2154
|
+
var yellow = ["#feffe6", "#ffffb8", "#fffb8f", "#fff566", "#ffec3d", "#fadb14", "#d4b106", "#ad8b00", "#876800", "#614700"];
|
|
2155
|
+
yellow.primary = yellow[5];
|
|
2156
|
+
var lime = ["#fcffe6", "#f4ffb8", "#eaff8f", "#d3f261", "#bae637", "#a0d911", "#7cb305", "#5b8c00", "#3f6600", "#254000"];
|
|
2157
|
+
lime.primary = lime[5];
|
|
2158
|
+
var green = ["#f6ffed", "#d9f7be", "#b7eb8f", "#95de64", "#73d13d", "#52c41a", "#389e0d", "#237804", "#135200", "#092b00"];
|
|
2159
|
+
green.primary = green[5];
|
|
2160
|
+
var cyan = ["#e6fffb", "#b5f5ec", "#87e8de", "#5cdbd3", "#36cfc9", "#13c2c2", "#08979c", "#006d75", "#00474f", "#002329"];
|
|
2161
|
+
cyan.primary = cyan[5];
|
|
2162
|
+
var blue = ["#e6f4ff", "#bae0ff", "#91caff", "#69b1ff", "#4096ff", "#1677ff", "#0958d9", "#003eb3", "#002c8c", "#001d66"];
|
|
2163
|
+
blue.primary = blue[5];
|
|
2164
|
+
var geekblue = ["#f0f5ff", "#d6e4ff", "#adc6ff", "#85a5ff", "#597ef7", "#2f54eb", "#1d39c4", "#10239e", "#061178", "#030852"];
|
|
2165
|
+
geekblue.primary = geekblue[5];
|
|
2166
|
+
var purple = ["#f9f0ff", "#efdbff", "#d3adf7", "#b37feb", "#9254de", "#722ed1", "#531dab", "#391085", "#22075e", "#120338"];
|
|
2167
|
+
purple.primary = purple[5];
|
|
2168
|
+
var magenta = ["#fff0f6", "#ffd6e7", "#ffadd2", "#ff85c0", "#f759ab", "#eb2f96", "#c41d7f", "#9e1068", "#780650", "#520339"];
|
|
2169
|
+
magenta.primary = magenta[5];
|
|
2170
|
+
var grey = ["#a6a6a6", "#999999", "#8c8c8c", "#808080", "#737373", "#666666", "#404040", "#1a1a1a", "#000000", "#000000"];
|
|
2171
|
+
grey.primary = grey[5];
|
|
2172
|
+
var presetPalettes = {
|
|
2173
|
+
red,
|
|
2174
|
+
volcano,
|
|
2175
|
+
orange,
|
|
2176
|
+
gold,
|
|
2177
|
+
yellow,
|
|
2178
|
+
lime,
|
|
2179
|
+
green,
|
|
2180
|
+
cyan,
|
|
2181
|
+
blue,
|
|
2182
|
+
geekblue,
|
|
2183
|
+
purple,
|
|
2184
|
+
magenta,
|
|
2185
|
+
grey
|
|
2186
|
+
};
|
|
2187
|
+
var redDark = ["#2a1215", "#431418", "#58181c", "#791a1f", "#a61d24", "#d32029", "#e84749", "#f37370", "#f89f9a", "#fac8c3"];
|
|
2188
|
+
redDark.primary = redDark[5];
|
|
2189
|
+
var volcanoDark = ["#2b1611", "#441d12", "#592716", "#7c3118", "#aa3e19", "#d84a1b", "#e87040", "#f3956a", "#f8b692", "#fad4bc"];
|
|
2190
|
+
volcanoDark.primary = volcanoDark[5];
|
|
2191
|
+
var orangeDark = ["#2b1d11", "#442a11", "#593815", "#7c4a15", "#aa6215", "#d87a16", "#e89a3c", "#f3b765", "#f8cf8d", "#fae3b7"];
|
|
2192
|
+
orangeDark.primary = orangeDark[5];
|
|
2193
|
+
var goldDark = ["#2b2111", "#443111", "#594214", "#7c5914", "#aa7714", "#d89614", "#e8b339", "#f3cc62", "#f8df8b", "#faedb5"];
|
|
2194
|
+
goldDark.primary = goldDark[5];
|
|
2195
|
+
var yellowDark = ["#2b2611", "#443b11", "#595014", "#7c6e14", "#aa9514", "#d8bd14", "#e8d639", "#f3ea62", "#f8f48b", "#fafab5"];
|
|
2196
|
+
yellowDark.primary = yellowDark[5];
|
|
2197
|
+
var limeDark = ["#1f2611", "#2e3c10", "#3e4f13", "#536d13", "#6f9412", "#8bbb11", "#a9d134", "#c9e75d", "#e4f88b", "#f0fab5"];
|
|
2198
|
+
limeDark.primary = limeDark[5];
|
|
2199
|
+
var greenDark = ["#162312", "#1d3712", "#274916", "#306317", "#3c8618", "#49aa19", "#6abe39", "#8fd460", "#b2e58b", "#d5f2bb"];
|
|
2200
|
+
greenDark.primary = greenDark[5];
|
|
2201
|
+
var cyanDark = ["#112123", "#113536", "#144848", "#146262", "#138585", "#13a8a8", "#33bcb7", "#58d1c9", "#84e2d8", "#b2f1e8"];
|
|
2202
|
+
cyanDark.primary = cyanDark[5];
|
|
2203
|
+
var blueDark = ["#111a2c", "#112545", "#15325b", "#15417e", "#1554ad", "#1668dc", "#3c89e8", "#65a9f3", "#8dc5f8", "#b7dcfa"];
|
|
2204
|
+
blueDark.primary = blueDark[5];
|
|
2205
|
+
var geekblueDark = ["#131629", "#161d40", "#1c2755", "#203175", "#263ea0", "#2b4acb", "#5273e0", "#7f9ef3", "#a8c1f8", "#d2e0fa"];
|
|
2206
|
+
geekblueDark.primary = geekblueDark[5];
|
|
2207
|
+
var purpleDark = ["#1a1325", "#24163a", "#301c4d", "#3e2069", "#51258f", "#642ab5", "#854eca", "#ab7ae0", "#cda8f0", "#ebd7fa"];
|
|
2208
|
+
purpleDark.primary = purpleDark[5];
|
|
2209
|
+
var magentaDark = ["#291321", "#40162f", "#551c3b", "#75204f", "#a02669", "#cb2b83", "#e0529c", "#f37fb7", "#f8a8cc", "#fad2e3"];
|
|
2210
|
+
magentaDark.primary = magentaDark[5];
|
|
2211
|
+
var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a", "#6a6a6a", "#7b7b7b", "#888888", "#969696"];
|
|
2212
|
+
greyDark.primary = greyDark[5];
|
|
2213
|
+
|
|
2214
|
+
// src/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
1513
2215
|
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2216
|
+
function genPresets(presets = presetPalettes) {
|
|
2217
|
+
return Object.entries(presets).map(([label, colors]) => ({
|
|
2218
|
+
label,
|
|
2219
|
+
colors,
|
|
2220
|
+
key: label
|
|
2221
|
+
}));
|
|
2222
|
+
}
|
|
2223
|
+
function ColorPalettePickerBasic({
|
|
2224
|
+
value,
|
|
2225
|
+
onChange,
|
|
2226
|
+
require: require2,
|
|
2227
|
+
title,
|
|
2228
|
+
bottomText,
|
|
2229
|
+
showError,
|
|
2230
|
+
errorMessage,
|
|
2231
|
+
disabled,
|
|
2232
|
+
allowClear,
|
|
2233
|
+
defaultFormat,
|
|
2234
|
+
className,
|
|
2235
|
+
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
2236
|
+
}) {
|
|
2237
|
+
const { token } = theme.useToken();
|
|
2238
|
+
const presets = genPresets({
|
|
2239
|
+
primary: generate(token.colorPrimary),
|
|
2240
|
+
red,
|
|
2241
|
+
green
|
|
2242
|
+
});
|
|
2243
|
+
return /* @__PURE__ */ jsx25(
|
|
2244
|
+
ConfigProvider9,
|
|
2245
|
+
{
|
|
2246
|
+
theme: {
|
|
2247
|
+
token: {
|
|
2248
|
+
fontFamily: "Kanit",
|
|
2249
|
+
fontSize: 16
|
|
2250
|
+
}
|
|
2251
|
+
},
|
|
2252
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "container-input", children: [
|
|
2253
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
2254
|
+
/* @__PURE__ */ jsx25("span", { className: "body-1", children: title }),
|
|
2255
|
+
" ",
|
|
2256
|
+
require2 && /* @__PURE__ */ jsx25("span", { className: "text-red-500", children: "*" })
|
|
2257
|
+
] }),
|
|
2258
|
+
/* @__PURE__ */ jsx25(
|
|
2259
|
+
ColorPicker2,
|
|
2260
|
+
{
|
|
2261
|
+
defaultFormat,
|
|
2262
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
2263
|
+
presets,
|
|
2264
|
+
value,
|
|
2265
|
+
defaultValue: "#ffff",
|
|
2266
|
+
onChange,
|
|
2267
|
+
allowClear,
|
|
2268
|
+
showText: (color) => {
|
|
2269
|
+
const hex = color.toHexString();
|
|
2270
|
+
if (!value) {
|
|
2271
|
+
return /* @__PURE__ */ jsx25("span", { children: placeholder });
|
|
2272
|
+
}
|
|
2273
|
+
return /* @__PURE__ */ jsxs21("span", { children: [
|
|
2274
|
+
"(",
|
|
2275
|
+
hex,
|
|
2276
|
+
")"
|
|
2277
|
+
] });
|
|
2278
|
+
},
|
|
2279
|
+
disabled
|
|
2280
|
+
}
|
|
2281
|
+
),
|
|
2282
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
2283
|
+
/* @__PURE__ */ jsx25("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2284
|
+
" ",
|
|
2285
|
+
showError && /* @__PURE__ */ jsx25("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
2286
|
+
] })
|
|
2287
|
+
] })
|
|
2288
|
+
}
|
|
2289
|
+
);
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2292
|
+
// src/Select/SelectField/SelectField.tsx
|
|
2293
|
+
import { Select, ConfigProvider as ConfigProvider10 } from "antd";
|
|
2294
|
+
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1514
2295
|
function SelectField({
|
|
1515
2296
|
value,
|
|
1516
2297
|
onChange,
|
|
@@ -1529,8 +2310,8 @@ function SelectField({
|
|
|
1529
2310
|
handleSearch,
|
|
1530
2311
|
className
|
|
1531
2312
|
}) {
|
|
1532
|
-
return /* @__PURE__ */
|
|
1533
|
-
|
|
2313
|
+
return /* @__PURE__ */ jsx26(
|
|
2314
|
+
ConfigProvider10,
|
|
1534
2315
|
{
|
|
1535
2316
|
theme: {
|
|
1536
2317
|
token: {
|
|
@@ -1538,13 +2319,13 @@ function SelectField({
|
|
|
1538
2319
|
fontSize: 16
|
|
1539
2320
|
}
|
|
1540
2321
|
},
|
|
1541
|
-
children: /* @__PURE__ */
|
|
1542
|
-
/* @__PURE__ */
|
|
1543
|
-
/* @__PURE__ */
|
|
2322
|
+
children: /* @__PURE__ */ jsxs22("div", { className: "container-input", children: [
|
|
2323
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
2324
|
+
/* @__PURE__ */ jsx26("span", { className: "body-1", children: title }),
|
|
1544
2325
|
" ",
|
|
1545
|
-
require2 && /* @__PURE__ */
|
|
2326
|
+
require2 && /* @__PURE__ */ jsx26("span", { className: "text-red-500", children: "*" })
|
|
1546
2327
|
] }),
|
|
1547
|
-
/* @__PURE__ */
|
|
2328
|
+
/* @__PURE__ */ jsx26(
|
|
1548
2329
|
Select,
|
|
1549
2330
|
{
|
|
1550
2331
|
showSearch: true,
|
|
@@ -1559,14 +2340,14 @@ function SelectField({
|
|
|
1559
2340
|
options,
|
|
1560
2341
|
mode,
|
|
1561
2342
|
onSearch: handleSearch,
|
|
1562
|
-
prefix: prefix ? /* @__PURE__ */
|
|
2343
|
+
prefix: prefix ? /* @__PURE__ */ jsx26("span", { style: { width: prefixSize, height: prefixSize, display: "flex", alignItems: "center", justifyContent: "center" }, children: prefix }) : void 0,
|
|
1563
2344
|
allowClear: true
|
|
1564
2345
|
}
|
|
1565
2346
|
),
|
|
1566
|
-
/* @__PURE__ */
|
|
1567
|
-
/* @__PURE__ */
|
|
2347
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
2348
|
+
/* @__PURE__ */ jsx26("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1568
2349
|
" ",
|
|
1569
|
-
showError && /* @__PURE__ */
|
|
2350
|
+
showError && /* @__PURE__ */ jsx26("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1570
2351
|
] })
|
|
1571
2352
|
] })
|
|
1572
2353
|
}
|
|
@@ -1574,8 +2355,8 @@ function SelectField({
|
|
|
1574
2355
|
}
|
|
1575
2356
|
|
|
1576
2357
|
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
1577
|
-
import { Select as Select2, ConfigProvider as
|
|
1578
|
-
import { jsx as
|
|
2358
|
+
import { Select as Select2, ConfigProvider as ConfigProvider11 } from "antd";
|
|
2359
|
+
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1579
2360
|
function SelectFieldGroup({
|
|
1580
2361
|
value,
|
|
1581
2362
|
onChange,
|
|
@@ -1594,21 +2375,21 @@ function SelectFieldGroup({
|
|
|
1594
2375
|
handleSearch,
|
|
1595
2376
|
className
|
|
1596
2377
|
}) {
|
|
1597
|
-
return /* @__PURE__ */
|
|
1598
|
-
|
|
2378
|
+
return /* @__PURE__ */ jsx27(
|
|
2379
|
+
ConfigProvider11,
|
|
1599
2380
|
{
|
|
1600
2381
|
theme: {
|
|
1601
2382
|
token: {
|
|
1602
2383
|
fontFamily: "Kanit"
|
|
1603
2384
|
}
|
|
1604
2385
|
},
|
|
1605
|
-
children: /* @__PURE__ */
|
|
1606
|
-
/* @__PURE__ */
|
|
1607
|
-
/* @__PURE__ */
|
|
2386
|
+
children: /* @__PURE__ */ jsxs23("div", { className: "container-input", children: [
|
|
2387
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
2388
|
+
/* @__PURE__ */ jsx27("span", { className: "body-1", children: title }),
|
|
1608
2389
|
" ",
|
|
1609
|
-
require2 && /* @__PURE__ */
|
|
2390
|
+
require2 && /* @__PURE__ */ jsx27("span", { className: "text-red-500", children: "*" })
|
|
1610
2391
|
] }),
|
|
1611
|
-
/* @__PURE__ */
|
|
2392
|
+
/* @__PURE__ */ jsx27(
|
|
1612
2393
|
Select2,
|
|
1613
2394
|
{
|
|
1614
2395
|
showSearch: true,
|
|
@@ -1623,7 +2404,7 @@ function SelectFieldGroup({
|
|
|
1623
2404
|
options,
|
|
1624
2405
|
mode,
|
|
1625
2406
|
onSearch: handleSearch,
|
|
1626
|
-
prefix: prefix ? /* @__PURE__ */
|
|
2407
|
+
prefix: prefix ? /* @__PURE__ */ jsx27(
|
|
1627
2408
|
"span",
|
|
1628
2409
|
{
|
|
1629
2410
|
style: {
|
|
@@ -1639,10 +2420,10 @@ function SelectFieldGroup({
|
|
|
1639
2420
|
allowClear: true
|
|
1640
2421
|
}
|
|
1641
2422
|
),
|
|
1642
|
-
/* @__PURE__ */
|
|
1643
|
-
/* @__PURE__ */
|
|
2423
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
2424
|
+
/* @__PURE__ */ jsx27("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1644
2425
|
" ",
|
|
1645
|
-
showError && /* @__PURE__ */
|
|
2426
|
+
showError && /* @__PURE__ */ jsx27("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1646
2427
|
] })
|
|
1647
2428
|
] })
|
|
1648
2429
|
}
|
|
@@ -1650,7 +2431,7 @@ function SelectFieldGroup({
|
|
|
1650
2431
|
}
|
|
1651
2432
|
|
|
1652
2433
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
1653
|
-
import { Select as Select3, ConfigProvider as
|
|
2434
|
+
import { Select as Select3, ConfigProvider as ConfigProvider12 } from "antd";
|
|
1654
2435
|
|
|
1655
2436
|
// src/Select/SelectFieldStatus/StatusMockup.ts
|
|
1656
2437
|
var status = [
|
|
@@ -1663,7 +2444,7 @@ var status = [
|
|
|
1663
2444
|
|
|
1664
2445
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
1665
2446
|
import { DownOutlined } from "@ant-design/icons";
|
|
1666
|
-
import { jsx as
|
|
2447
|
+
import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1667
2448
|
function SelectFieldStatus({
|
|
1668
2449
|
value,
|
|
1669
2450
|
onChange,
|
|
@@ -1678,8 +2459,8 @@ function SelectFieldStatus({
|
|
|
1678
2459
|
className
|
|
1679
2460
|
}) {
|
|
1680
2461
|
const selectedItem = status.find((s) => s.value === value);
|
|
1681
|
-
return /* @__PURE__ */
|
|
1682
|
-
|
|
2462
|
+
return /* @__PURE__ */ jsx28(
|
|
2463
|
+
ConfigProvider12,
|
|
1683
2464
|
{
|
|
1684
2465
|
theme: {
|
|
1685
2466
|
components: {
|
|
@@ -1694,17 +2475,17 @@ function SelectFieldStatus({
|
|
|
1694
2475
|
fontFamily: "Kanit"
|
|
1695
2476
|
}
|
|
1696
2477
|
},
|
|
1697
|
-
children: /* @__PURE__ */
|
|
1698
|
-
/* @__PURE__ */
|
|
1699
|
-
/* @__PURE__ */
|
|
2478
|
+
children: /* @__PURE__ */ jsxs24("div", { className: "container-input", children: [
|
|
2479
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
2480
|
+
/* @__PURE__ */ jsx28("span", { className: "body-1", children: title }),
|
|
1700
2481
|
" ",
|
|
1701
|
-
require2 && /* @__PURE__ */
|
|
2482
|
+
require2 && /* @__PURE__ */ jsx28("span", { className: "text-red-500", children: "*" })
|
|
1702
2483
|
] }),
|
|
1703
|
-
/* @__PURE__ */
|
|
2484
|
+
/* @__PURE__ */ jsx28(
|
|
1704
2485
|
Select3,
|
|
1705
2486
|
{
|
|
1706
2487
|
disabled,
|
|
1707
|
-
suffixIcon: /* @__PURE__ */
|
|
2488
|
+
suffixIcon: /* @__PURE__ */ jsx28(DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
1708
2489
|
value,
|
|
1709
2490
|
onChange,
|
|
1710
2491
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -1714,10 +2495,10 @@ function SelectFieldStatus({
|
|
|
1714
2495
|
options
|
|
1715
2496
|
}
|
|
1716
2497
|
),
|
|
1717
|
-
/* @__PURE__ */
|
|
1718
|
-
/* @__PURE__ */
|
|
2498
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
2499
|
+
/* @__PURE__ */ jsx28("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1719
2500
|
" ",
|
|
1720
|
-
showError && /* @__PURE__ */
|
|
2501
|
+
showError && /* @__PURE__ */ jsx28("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1721
2502
|
] })
|
|
1722
2503
|
] })
|
|
1723
2504
|
}
|
|
@@ -1725,7 +2506,7 @@ function SelectFieldStatus({
|
|
|
1725
2506
|
}
|
|
1726
2507
|
|
|
1727
2508
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
1728
|
-
import { Select as Select4, ConfigProvider as
|
|
2509
|
+
import { Select as Select4, ConfigProvider as ConfigProvider13 } from "antd";
|
|
1729
2510
|
|
|
1730
2511
|
// src/Select/SelectFieldStatusReport/StatusReportMockup.ts
|
|
1731
2512
|
var status2 = [
|
|
@@ -1735,7 +2516,7 @@ var status2 = [
|
|
|
1735
2516
|
|
|
1736
2517
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
1737
2518
|
import { DownOutlined as DownOutlined2 } from "@ant-design/icons";
|
|
1738
|
-
import { jsx as
|
|
2519
|
+
import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1739
2520
|
function SelectFieldStatusReport({
|
|
1740
2521
|
value,
|
|
1741
2522
|
onChange,
|
|
@@ -1749,8 +2530,8 @@ function SelectFieldStatusReport({
|
|
|
1749
2530
|
className
|
|
1750
2531
|
}) {
|
|
1751
2532
|
const selectedItem = status2.find((s) => s.value === value);
|
|
1752
|
-
return /* @__PURE__ */
|
|
1753
|
-
|
|
2533
|
+
return /* @__PURE__ */ jsx29(
|
|
2534
|
+
ConfigProvider13,
|
|
1754
2535
|
{
|
|
1755
2536
|
theme: {
|
|
1756
2537
|
components: {
|
|
@@ -1765,17 +2546,17 @@ function SelectFieldStatusReport({
|
|
|
1765
2546
|
fontFamily: "Kanit"
|
|
1766
2547
|
}
|
|
1767
2548
|
},
|
|
1768
|
-
children: /* @__PURE__ */
|
|
1769
|
-
/* @__PURE__ */
|
|
1770
|
-
/* @__PURE__ */
|
|
2549
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "container-input", children: [
|
|
2550
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
2551
|
+
/* @__PURE__ */ jsx29("span", { className: "body-1", children: title }),
|
|
1771
2552
|
" ",
|
|
1772
|
-
require2 && /* @__PURE__ */
|
|
2553
|
+
require2 && /* @__PURE__ */ jsx29("span", { className: "text-red-500", children: "*" })
|
|
1773
2554
|
] }),
|
|
1774
|
-
/* @__PURE__ */
|
|
2555
|
+
/* @__PURE__ */ jsx29(
|
|
1775
2556
|
Select4,
|
|
1776
2557
|
{
|
|
1777
2558
|
disabled,
|
|
1778
|
-
suffixIcon: /* @__PURE__ */
|
|
2559
|
+
suffixIcon: /* @__PURE__ */ jsx29(DownOutlined2, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
1779
2560
|
value,
|
|
1780
2561
|
onChange,
|
|
1781
2562
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -1789,10 +2570,10 @@ function SelectFieldStatusReport({
|
|
|
1789
2570
|
}))
|
|
1790
2571
|
}
|
|
1791
2572
|
),
|
|
1792
|
-
/* @__PURE__ */
|
|
1793
|
-
/* @__PURE__ */
|
|
2573
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
2574
|
+
/* @__PURE__ */ jsx29("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1794
2575
|
" ",
|
|
1795
|
-
showError && /* @__PURE__ */
|
|
2576
|
+
showError && /* @__PURE__ */ jsx29("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1796
2577
|
] })
|
|
1797
2578
|
] })
|
|
1798
2579
|
}
|
|
@@ -1800,9 +2581,9 @@ function SelectFieldStatusReport({
|
|
|
1800
2581
|
}
|
|
1801
2582
|
|
|
1802
2583
|
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
1803
|
-
import { Select as Select5, ConfigProvider as
|
|
2584
|
+
import { Select as Select5, ConfigProvider as ConfigProvider14 } from "antd";
|
|
1804
2585
|
import { useState as useState6 } from "react";
|
|
1805
|
-
import { jsx as
|
|
2586
|
+
import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1806
2587
|
function SelectFieldTag({
|
|
1807
2588
|
title,
|
|
1808
2589
|
require: require2,
|
|
@@ -1836,21 +2617,21 @@ function SelectFieldTag({
|
|
|
1836
2617
|
}
|
|
1837
2618
|
onChange?.([]);
|
|
1838
2619
|
};
|
|
1839
|
-
return /* @__PURE__ */
|
|
1840
|
-
|
|
2620
|
+
return /* @__PURE__ */ jsx30(
|
|
2621
|
+
ConfigProvider14,
|
|
1841
2622
|
{
|
|
1842
2623
|
theme: {
|
|
1843
2624
|
token: {
|
|
1844
2625
|
fontFamily: "Kanit"
|
|
1845
2626
|
}
|
|
1846
2627
|
},
|
|
1847
|
-
children: /* @__PURE__ */
|
|
1848
|
-
/* @__PURE__ */
|
|
1849
|
-
/* @__PURE__ */
|
|
2628
|
+
children: /* @__PURE__ */ jsxs26("div", { className: "container-input", children: [
|
|
2629
|
+
/* @__PURE__ */ jsxs26("div", { children: [
|
|
2630
|
+
/* @__PURE__ */ jsx30("span", { className: "body-1", children: title }),
|
|
1850
2631
|
" ",
|
|
1851
|
-
require2 && /* @__PURE__ */
|
|
2632
|
+
require2 && /* @__PURE__ */ jsx30("span", { className: "text-red-500", children: "*" })
|
|
1852
2633
|
] }),
|
|
1853
|
-
/* @__PURE__ */
|
|
2634
|
+
/* @__PURE__ */ jsx30(
|
|
1854
2635
|
Select5,
|
|
1855
2636
|
{
|
|
1856
2637
|
mode: "tags",
|
|
@@ -1868,10 +2649,10 @@ function SelectFieldTag({
|
|
|
1868
2649
|
allowClear: true
|
|
1869
2650
|
}
|
|
1870
2651
|
),
|
|
1871
|
-
/* @__PURE__ */
|
|
1872
|
-
/* @__PURE__ */
|
|
2652
|
+
/* @__PURE__ */ jsxs26("div", { children: [
|
|
2653
|
+
/* @__PURE__ */ jsx30("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1873
2654
|
" ",
|
|
1874
|
-
showError && /* @__PURE__ */
|
|
2655
|
+
showError && /* @__PURE__ */ jsx30("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1875
2656
|
] })
|
|
1876
2657
|
] })
|
|
1877
2658
|
}
|
|
@@ -1879,7 +2660,7 @@ function SelectFieldTag({
|
|
|
1879
2660
|
}
|
|
1880
2661
|
|
|
1881
2662
|
// src/SortFilter/SortFilter.tsx
|
|
1882
|
-
import { ConfigProvider as
|
|
2663
|
+
import { ConfigProvider as ConfigProvider15 } from "antd";
|
|
1883
2664
|
import { CalendarOutlined } from "@ant-design/icons";
|
|
1884
2665
|
|
|
1885
2666
|
// src/SortFilter/DataMockSortFilter.ts
|
|
@@ -1912,7 +2693,7 @@ var quarters = [
|
|
|
1912
2693
|
// src/SortFilter/SortFilter.tsx
|
|
1913
2694
|
import { useState as useState7 } from "react";
|
|
1914
2695
|
import { IconSortDescending as IconSortDescending2, IconFilter } from "@tabler/icons-react";
|
|
1915
|
-
import { jsx as
|
|
2696
|
+
import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1916
2697
|
function SortFilter({
|
|
1917
2698
|
showYear = true,
|
|
1918
2699
|
showQuarter = true,
|
|
@@ -1923,20 +2704,20 @@ function SortFilter({
|
|
|
1923
2704
|
const [yearValue, setYearValue] = useState7();
|
|
1924
2705
|
const [monthValue, setMonthValue] = useState7();
|
|
1925
2706
|
const [quarterValue, setQuartersValue] = useState7();
|
|
1926
|
-
return /* @__PURE__ */
|
|
1927
|
-
|
|
2707
|
+
return /* @__PURE__ */ jsx31(
|
|
2708
|
+
ConfigProvider15,
|
|
1928
2709
|
{
|
|
1929
2710
|
theme: {
|
|
1930
2711
|
token: {
|
|
1931
2712
|
fontFamily: "Kanit"
|
|
1932
2713
|
}
|
|
1933
2714
|
},
|
|
1934
|
-
children: /* @__PURE__ */
|
|
1935
|
-
/* @__PURE__ */
|
|
1936
|
-
showYear && /* @__PURE__ */
|
|
2715
|
+
children: /* @__PURE__ */ jsxs27("div", { className: "w-full flex items-center justify-between", children: [
|
|
2716
|
+
/* @__PURE__ */ jsxs27("div", { className: "w-full flex gap-[10px]", children: [
|
|
2717
|
+
showYear && /* @__PURE__ */ jsx31("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx31(
|
|
1937
2718
|
SelectField,
|
|
1938
2719
|
{
|
|
1939
|
-
prefix: /* @__PURE__ */
|
|
2720
|
+
prefix: /* @__PURE__ */ jsx31(CalendarOutlined, {}),
|
|
1940
2721
|
onChange: setYearValue,
|
|
1941
2722
|
options: years.map((s) => ({
|
|
1942
2723
|
value: s.value,
|
|
@@ -1946,10 +2727,10 @@ function SortFilter({
|
|
|
1946
2727
|
value: yearValue
|
|
1947
2728
|
}
|
|
1948
2729
|
) }),
|
|
1949
|
-
showMonth && /* @__PURE__ */
|
|
2730
|
+
showMonth && /* @__PURE__ */ jsx31("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx31(
|
|
1950
2731
|
SelectField,
|
|
1951
2732
|
{
|
|
1952
|
-
prefix: /* @__PURE__ */
|
|
2733
|
+
prefix: /* @__PURE__ */ jsx31(CalendarOutlined, {}),
|
|
1953
2734
|
onChange: setMonthValue,
|
|
1954
2735
|
options: months.map((s) => ({
|
|
1955
2736
|
value: s.value,
|
|
@@ -1959,10 +2740,10 @@ function SortFilter({
|
|
|
1959
2740
|
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
1960
2741
|
}
|
|
1961
2742
|
) }),
|
|
1962
|
-
showQuarter && /* @__PURE__ */
|
|
2743
|
+
showQuarter && /* @__PURE__ */ jsx31("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx31(
|
|
1963
2744
|
SelectField,
|
|
1964
2745
|
{
|
|
1965
|
-
prefix: /* @__PURE__ */
|
|
2746
|
+
prefix: /* @__PURE__ */ jsx31(CalendarOutlined, {}),
|
|
1966
2747
|
onChange: setQuartersValue,
|
|
1967
2748
|
options: quarters.map((s) => ({
|
|
1968
2749
|
value: s.value,
|
|
@@ -1973,8 +2754,8 @@ function SortFilter({
|
|
|
1973
2754
|
}
|
|
1974
2755
|
) })
|
|
1975
2756
|
] }),
|
|
1976
|
-
/* @__PURE__ */
|
|
1977
|
-
/* @__PURE__ */
|
|
2757
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex gap-[10px]", children: [
|
|
2758
|
+
/* @__PURE__ */ jsx31(
|
|
1978
2759
|
IconSortDescending2,
|
|
1979
2760
|
{
|
|
1980
2761
|
size: 24,
|
|
@@ -1982,7 +2763,7 @@ function SortFilter({
|
|
|
1982
2763
|
onClick: onSortClick
|
|
1983
2764
|
}
|
|
1984
2765
|
),
|
|
1985
|
-
/* @__PURE__ */
|
|
2766
|
+
/* @__PURE__ */ jsx31(
|
|
1986
2767
|
IconFilter,
|
|
1987
2768
|
{
|
|
1988
2769
|
size: 24,
|
|
@@ -1999,7 +2780,7 @@ function SortFilter({
|
|
|
1999
2780
|
// src/Upload/FileUploader/FileUploader.tsx
|
|
2000
2781
|
import { IconPaperclip, IconUpload, IconTrash } from "@tabler/icons-react";
|
|
2001
2782
|
import { useRef as useRef2, useState as useState8 } from "react";
|
|
2002
|
-
import { Fragment as Fragment5, jsx as
|
|
2783
|
+
import { Fragment as Fragment5, jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2003
2784
|
function FileUploader({
|
|
2004
2785
|
onUpload,
|
|
2005
2786
|
onError,
|
|
@@ -2070,10 +2851,10 @@ function FileUploader({
|
|
|
2070
2851
|
}
|
|
2071
2852
|
if (inputRef.current) inputRef.current.value = "";
|
|
2072
2853
|
};
|
|
2073
|
-
return /* @__PURE__ */
|
|
2074
|
-
label && /* @__PURE__ */
|
|
2075
|
-
/* @__PURE__ */
|
|
2076
|
-
mode === "upload" ? /* @__PURE__ */
|
|
2854
|
+
return /* @__PURE__ */ jsxs28("div", { className: "w-full", children: [
|
|
2855
|
+
label && /* @__PURE__ */ jsx32("p", { className: "body-1", children: label }),
|
|
2856
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
2857
|
+
mode === "upload" ? /* @__PURE__ */ jsx32(
|
|
2077
2858
|
"button",
|
|
2078
2859
|
{
|
|
2079
2860
|
type: "button",
|
|
@@ -2081,15 +2862,15 @@ function FileUploader({
|
|
|
2081
2862
|
className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
|
|
2082
2863
|
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
2083
2864
|
disabled: disabled ? disabled : uploading,
|
|
2084
|
-
children: uploading ? /* @__PURE__ */
|
|
2085
|
-
/* @__PURE__ */
|
|
2865
|
+
children: uploading ? /* @__PURE__ */ jsxs28(Fragment5, { children: [
|
|
2866
|
+
/* @__PURE__ */ jsx32(Loader, { size: 15 }),
|
|
2086
2867
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
2087
|
-
] }) : /* @__PURE__ */
|
|
2088
|
-
/* @__PURE__ */
|
|
2868
|
+
] }) : /* @__PURE__ */ jsxs28(Fragment5, { children: [
|
|
2869
|
+
/* @__PURE__ */ jsx32(IconUpload, { size: 15, className: "text-gray-400" }),
|
|
2089
2870
|
" \u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C"
|
|
2090
2871
|
] })
|
|
2091
2872
|
}
|
|
2092
|
-
) : /* @__PURE__ */
|
|
2873
|
+
) : /* @__PURE__ */ jsx32(
|
|
2093
2874
|
"div",
|
|
2094
2875
|
{
|
|
2095
2876
|
className: `min-w-[400px] min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
|
|
@@ -2103,17 +2884,17 @@ function FileUploader({
|
|
|
2103
2884
|
},
|
|
2104
2885
|
onDragLeave: () => setDragActive(false),
|
|
2105
2886
|
onDrop: handleDrop,
|
|
2106
|
-
children: uploading ? /* @__PURE__ */
|
|
2107
|
-
/* @__PURE__ */
|
|
2887
|
+
children: uploading ? /* @__PURE__ */ jsxs28("div", { className: "flex justify-center items-center gap-2", children: [
|
|
2888
|
+
/* @__PURE__ */ jsx32(Loader, { size: 15 }),
|
|
2108
2889
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
2109
|
-
] }) : /* @__PURE__ */
|
|
2110
|
-
/* @__PURE__ */
|
|
2111
|
-
/* @__PURE__ */
|
|
2112
|
-
/* @__PURE__ */
|
|
2890
|
+
] }) : /* @__PURE__ */ jsxs28("div", { className: "flex flex-col items-center gap-2", children: [
|
|
2891
|
+
/* @__PURE__ */ jsx32(IconUpload, { size: 20 }),
|
|
2892
|
+
/* @__PURE__ */ jsx32("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" }),
|
|
2893
|
+
/* @__PURE__ */ jsx32("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" })
|
|
2113
2894
|
] })
|
|
2114
2895
|
}
|
|
2115
2896
|
),
|
|
2116
|
-
/* @__PURE__ */
|
|
2897
|
+
/* @__PURE__ */ jsx32(
|
|
2117
2898
|
"input",
|
|
2118
2899
|
{
|
|
2119
2900
|
type: "file",
|
|
@@ -2126,13 +2907,13 @@ function FileUploader({
|
|
|
2126
2907
|
}
|
|
2127
2908
|
)
|
|
2128
2909
|
] }),
|
|
2129
|
-
description && /* @__PURE__ */
|
|
2130
|
-
/* @__PURE__ */
|
|
2131
|
-
/* @__PURE__ */
|
|
2132
|
-
/* @__PURE__ */
|
|
2133
|
-
/* @__PURE__ */
|
|
2910
|
+
description && /* @__PURE__ */ jsx32("p", { className: "text-gray-400 body-4", children: description }),
|
|
2911
|
+
/* @__PURE__ */ jsx32("div", { className: "mt-[8px]", children: fileList.length !== 0 && fileList.map((file, index) => /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2 rounded-[4px] px-[8px] py-[4px] body-1", children: [
|
|
2912
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
|
|
2913
|
+
/* @__PURE__ */ jsx32("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ jsx32(IconPaperclip, { size: 15 }) }),
|
|
2914
|
+
/* @__PURE__ */ jsx32("span", { className: "truncate", children: file.name })
|
|
2134
2915
|
] }),
|
|
2135
|
-
/* @__PURE__ */
|
|
2916
|
+
/* @__PURE__ */ jsx32(
|
|
2136
2917
|
IconTrash,
|
|
2137
2918
|
{
|
|
2138
2919
|
size: 20,
|
|
@@ -2166,9 +2947,9 @@ function messageLoading(content, duration) {
|
|
|
2166
2947
|
}
|
|
2167
2948
|
|
|
2168
2949
|
// src/Breadcrumb/Breadcrumb.tsx
|
|
2169
|
-
import { ConfigProvider as
|
|
2950
|
+
import { ConfigProvider as ConfigProvider16 } from "antd";
|
|
2170
2951
|
import { Breadcrumb } from "antd";
|
|
2171
|
-
import { jsx as
|
|
2952
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2172
2953
|
function Breadcrumbs({
|
|
2173
2954
|
items,
|
|
2174
2955
|
separator,
|
|
@@ -2176,15 +2957,15 @@ function Breadcrumbs({
|
|
|
2176
2957
|
classname,
|
|
2177
2958
|
params
|
|
2178
2959
|
}) {
|
|
2179
|
-
return /* @__PURE__ */
|
|
2180
|
-
|
|
2960
|
+
return /* @__PURE__ */ jsx33(
|
|
2961
|
+
ConfigProvider16,
|
|
2181
2962
|
{
|
|
2182
2963
|
theme: {
|
|
2183
2964
|
token: {
|
|
2184
2965
|
fontFamily: "Kanit"
|
|
2185
2966
|
}
|
|
2186
2967
|
},
|
|
2187
|
-
children: /* @__PURE__ */
|
|
2968
|
+
children: /* @__PURE__ */ jsx33(
|
|
2188
2969
|
Breadcrumb,
|
|
2189
2970
|
{
|
|
2190
2971
|
items,
|
|
@@ -2199,8 +2980,8 @@ function Breadcrumbs({
|
|
|
2199
2980
|
}
|
|
2200
2981
|
|
|
2201
2982
|
// src/HeadingPage/HeadingPage.tsx
|
|
2202
|
-
import { ConfigProvider as
|
|
2203
|
-
import { jsx as
|
|
2983
|
+
import { ConfigProvider as ConfigProvider17 } from "antd";
|
|
2984
|
+
import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2204
2985
|
function HeadingPage({ Heading }) {
|
|
2205
2986
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
2206
2987
|
weekday: "long",
|
|
@@ -2208,17 +2989,17 @@ function HeadingPage({ Heading }) {
|
|
|
2208
2989
|
month: "long",
|
|
2209
2990
|
year: "numeric"
|
|
2210
2991
|
});
|
|
2211
|
-
return /* @__PURE__ */
|
|
2212
|
-
|
|
2992
|
+
return /* @__PURE__ */ jsx34(
|
|
2993
|
+
ConfigProvider17,
|
|
2213
2994
|
{
|
|
2214
2995
|
theme: {
|
|
2215
2996
|
token: {
|
|
2216
2997
|
fontFamily: "Kanit"
|
|
2217
2998
|
}
|
|
2218
2999
|
},
|
|
2219
|
-
children: /* @__PURE__ */
|
|
2220
|
-
/* @__PURE__ */
|
|
2221
|
-
/* @__PURE__ */
|
|
3000
|
+
children: /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
|
|
3001
|
+
/* @__PURE__ */ jsx34("p", { className: "headline-5", children: Heading }),
|
|
3002
|
+
/* @__PURE__ */ jsxs29("p", { className: "body-1", children: [
|
|
2222
3003
|
" \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
|
|
2223
3004
|
today
|
|
2224
3005
|
] })
|
|
@@ -2228,9 +3009,9 @@ function HeadingPage({ Heading }) {
|
|
|
2228
3009
|
}
|
|
2229
3010
|
|
|
2230
3011
|
// src/Progress/ProgressBar.tsx
|
|
2231
|
-
import { ConfigProvider as
|
|
3012
|
+
import { ConfigProvider as ConfigProvider18, Progress } from "antd";
|
|
2232
3013
|
import { useEffect as useEffect2, useRef as useRef3, useState as useState9 } from "react";
|
|
2233
|
-
import { jsx as
|
|
3014
|
+
import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2234
3015
|
function ProgressBar({
|
|
2235
3016
|
percent = 0,
|
|
2236
3017
|
size = "default",
|
|
@@ -2263,16 +3044,16 @@ function ProgressBar({
|
|
|
2263
3044
|
observer.observe(inner);
|
|
2264
3045
|
return () => observer.disconnect();
|
|
2265
3046
|
}, []);
|
|
2266
|
-
return /* @__PURE__ */
|
|
2267
|
-
|
|
3047
|
+
return /* @__PURE__ */ jsx35(
|
|
3048
|
+
ConfigProvider18,
|
|
2268
3049
|
{
|
|
2269
3050
|
theme: {
|
|
2270
3051
|
token: {
|
|
2271
3052
|
fontFamily: "Kanit"
|
|
2272
3053
|
}
|
|
2273
3054
|
},
|
|
2274
|
-
children: /* @__PURE__ */
|
|
2275
|
-
/* @__PURE__ */
|
|
3055
|
+
children: /* @__PURE__ */ jsxs30("div", { className: "relative w-full", ref: progressRef, children: [
|
|
3056
|
+
/* @__PURE__ */ jsx35(
|
|
2276
3057
|
Progress,
|
|
2277
3058
|
{
|
|
2278
3059
|
className: "w-full",
|
|
@@ -2288,7 +3069,7 @@ function ProgressBar({
|
|
|
2288
3069
|
strokeColor
|
|
2289
3070
|
}
|
|
2290
3071
|
),
|
|
2291
|
-
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */
|
|
3072
|
+
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ jsx35(
|
|
2292
3073
|
"div",
|
|
2293
3074
|
{
|
|
2294
3075
|
className: "checkpoint absolute top-0",
|
|
@@ -2314,6 +3095,7 @@ export {
|
|
|
2314
3095
|
Calendar,
|
|
2315
3096
|
Checkbox,
|
|
2316
3097
|
CheckboxGroup,
|
|
3098
|
+
ColorPalettePickerBasic,
|
|
2317
3099
|
ColorPickerBasic,
|
|
2318
3100
|
DataTable,
|
|
2319
3101
|
DatePickerBasic,
|