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