@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.js
CHANGED
|
@@ -466,6 +466,7 @@ __export(index_exports, {
|
|
|
466
466
|
Calendar: () => Calendar,
|
|
467
467
|
Checkbox: () => Checkbox,
|
|
468
468
|
CheckboxGroup: () => CheckboxGroup,
|
|
469
|
+
ColorPalettePickerBasic: () => ColorPalettePickerBasic,
|
|
469
470
|
ColorPickerBasic: () => ColorPickerBasic,
|
|
470
471
|
DataTable: () => DataTable,
|
|
471
472
|
DatePickerBasic: () => DatePickerBasic,
|
|
@@ -1559,9 +1560,789 @@ function TimePickerRangePicker({
|
|
|
1559
1560
|
);
|
|
1560
1561
|
}
|
|
1561
1562
|
|
|
1562
|
-
// src/
|
|
1563
|
+
// src/ColorPalettePicker/ColorPalettePicker.tsx
|
|
1563
1564
|
var import_antd9 = require("antd");
|
|
1565
|
+
|
|
1566
|
+
// node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1567
|
+
function _typeof(o) {
|
|
1568
|
+
"@babel/helpers - typeof";
|
|
1569
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
|
1570
|
+
return typeof o2;
|
|
1571
|
+
} : function(o2) {
|
|
1572
|
+
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
1573
|
+
}, _typeof(o);
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
// node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
1577
|
+
function toPrimitive(t, r) {
|
|
1578
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
1579
|
+
var e = t[Symbol.toPrimitive];
|
|
1580
|
+
if (void 0 !== e) {
|
|
1581
|
+
var i = e.call(t, r || "default");
|
|
1582
|
+
if ("object" != _typeof(i)) return i;
|
|
1583
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1584
|
+
}
|
|
1585
|
+
return ("string" === r ? String : Number)(t);
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
// node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
1589
|
+
function toPropertyKey(t) {
|
|
1590
|
+
var i = toPrimitive(t, "string");
|
|
1591
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
// node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
1595
|
+
function _defineProperty(e, r, t) {
|
|
1596
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
1597
|
+
value: t,
|
|
1598
|
+
enumerable: true,
|
|
1599
|
+
configurable: true,
|
|
1600
|
+
writable: true
|
|
1601
|
+
}) : e[r] = t, e;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
// node_modules/@ant-design/fast-color/es/FastColor.js
|
|
1605
|
+
var round = Math.round;
|
|
1606
|
+
function splitColorStr(str, parseNum) {
|
|
1607
|
+
const match = str.replace(/^[^(]*\((.*)/, "$1").replace(/\).*/, "").match(/\d*\.?\d+%?/g) || [];
|
|
1608
|
+
const numList = match.map((item) => parseFloat(item));
|
|
1609
|
+
for (let i = 0; i < 3; i += 1) {
|
|
1610
|
+
numList[i] = parseNum(numList[i] || 0, match[i] || "", i);
|
|
1611
|
+
}
|
|
1612
|
+
if (match[3]) {
|
|
1613
|
+
numList[3] = match[3].includes("%") ? numList[3] / 100 : numList[3];
|
|
1614
|
+
} else {
|
|
1615
|
+
numList[3] = 1;
|
|
1616
|
+
}
|
|
1617
|
+
return numList;
|
|
1618
|
+
}
|
|
1619
|
+
var parseHSVorHSL = (num, _, index) => index === 0 ? num : num / 100;
|
|
1620
|
+
function limitRange(value, max) {
|
|
1621
|
+
const mergedMax = max || 255;
|
|
1622
|
+
if (value > mergedMax) {
|
|
1623
|
+
return mergedMax;
|
|
1624
|
+
}
|
|
1625
|
+
if (value < 0) {
|
|
1626
|
+
return 0;
|
|
1627
|
+
}
|
|
1628
|
+
return value;
|
|
1629
|
+
}
|
|
1630
|
+
var FastColor = class _FastColor {
|
|
1631
|
+
constructor(input) {
|
|
1632
|
+
_defineProperty(this, "isValid", true);
|
|
1633
|
+
_defineProperty(this, "r", 0);
|
|
1634
|
+
_defineProperty(this, "g", 0);
|
|
1635
|
+
_defineProperty(this, "b", 0);
|
|
1636
|
+
_defineProperty(this, "a", 1);
|
|
1637
|
+
_defineProperty(this, "_h", void 0);
|
|
1638
|
+
_defineProperty(this, "_s", void 0);
|
|
1639
|
+
_defineProperty(this, "_l", void 0);
|
|
1640
|
+
_defineProperty(this, "_v", void 0);
|
|
1641
|
+
_defineProperty(this, "_max", void 0);
|
|
1642
|
+
_defineProperty(this, "_min", void 0);
|
|
1643
|
+
_defineProperty(this, "_brightness", void 0);
|
|
1644
|
+
function matchFormat(str) {
|
|
1645
|
+
return str[0] in input && str[1] in input && str[2] in input;
|
|
1646
|
+
}
|
|
1647
|
+
if (!input) {
|
|
1648
|
+
} else if (typeof input === "string") {
|
|
1649
|
+
let matchPrefix2 = function(prefix) {
|
|
1650
|
+
return trimStr.startsWith(prefix);
|
|
1651
|
+
};
|
|
1652
|
+
var matchPrefix = matchPrefix2;
|
|
1653
|
+
const trimStr = input.trim();
|
|
1654
|
+
if (/^#?[A-F\d]{3,8}$/i.test(trimStr)) {
|
|
1655
|
+
this.fromHexString(trimStr);
|
|
1656
|
+
} else if (matchPrefix2("rgb")) {
|
|
1657
|
+
this.fromRgbString(trimStr);
|
|
1658
|
+
} else if (matchPrefix2("hsl")) {
|
|
1659
|
+
this.fromHslString(trimStr);
|
|
1660
|
+
} else if (matchPrefix2("hsv") || matchPrefix2("hsb")) {
|
|
1661
|
+
this.fromHsvString(trimStr);
|
|
1662
|
+
}
|
|
1663
|
+
} else if (input instanceof _FastColor) {
|
|
1664
|
+
this.r = input.r;
|
|
1665
|
+
this.g = input.g;
|
|
1666
|
+
this.b = input.b;
|
|
1667
|
+
this.a = input.a;
|
|
1668
|
+
this._h = input._h;
|
|
1669
|
+
this._s = input._s;
|
|
1670
|
+
this._l = input._l;
|
|
1671
|
+
this._v = input._v;
|
|
1672
|
+
} else if (matchFormat("rgb")) {
|
|
1673
|
+
this.r = limitRange(input.r);
|
|
1674
|
+
this.g = limitRange(input.g);
|
|
1675
|
+
this.b = limitRange(input.b);
|
|
1676
|
+
this.a = typeof input.a === "number" ? limitRange(input.a, 1) : 1;
|
|
1677
|
+
} else if (matchFormat("hsl")) {
|
|
1678
|
+
this.fromHsl(input);
|
|
1679
|
+
} else if (matchFormat("hsv")) {
|
|
1680
|
+
this.fromHsv(input);
|
|
1681
|
+
} else {
|
|
1682
|
+
throw new Error("@ant-design/fast-color: unsupported input " + JSON.stringify(input));
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
// ======================= Setter =======================
|
|
1686
|
+
setR(value) {
|
|
1687
|
+
return this._sc("r", value);
|
|
1688
|
+
}
|
|
1689
|
+
setG(value) {
|
|
1690
|
+
return this._sc("g", value);
|
|
1691
|
+
}
|
|
1692
|
+
setB(value) {
|
|
1693
|
+
return this._sc("b", value);
|
|
1694
|
+
}
|
|
1695
|
+
setA(value) {
|
|
1696
|
+
return this._sc("a", value, 1);
|
|
1697
|
+
}
|
|
1698
|
+
setHue(value) {
|
|
1699
|
+
const hsv = this.toHsv();
|
|
1700
|
+
hsv.h = value;
|
|
1701
|
+
return this._c(hsv);
|
|
1702
|
+
}
|
|
1703
|
+
// ======================= Getter =======================
|
|
1704
|
+
/**
|
|
1705
|
+
* Returns the perceived luminance of a color, from 0-1.
|
|
1706
|
+
* @see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
|
|
1707
|
+
*/
|
|
1708
|
+
getLuminance() {
|
|
1709
|
+
function adjustGamma(raw) {
|
|
1710
|
+
const val = raw / 255;
|
|
1711
|
+
return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);
|
|
1712
|
+
}
|
|
1713
|
+
const R = adjustGamma(this.r);
|
|
1714
|
+
const G = adjustGamma(this.g);
|
|
1715
|
+
const B = adjustGamma(this.b);
|
|
1716
|
+
return 0.2126 * R + 0.7152 * G + 0.0722 * B;
|
|
1717
|
+
}
|
|
1718
|
+
getHue() {
|
|
1719
|
+
if (typeof this._h === "undefined") {
|
|
1720
|
+
const delta = this.getMax() - this.getMin();
|
|
1721
|
+
if (delta === 0) {
|
|
1722
|
+
this._h = 0;
|
|
1723
|
+
} else {
|
|
1724
|
+
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));
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
return this._h;
|
|
1728
|
+
}
|
|
1729
|
+
getSaturation() {
|
|
1730
|
+
if (typeof this._s === "undefined") {
|
|
1731
|
+
const delta = this.getMax() - this.getMin();
|
|
1732
|
+
if (delta === 0) {
|
|
1733
|
+
this._s = 0;
|
|
1734
|
+
} else {
|
|
1735
|
+
this._s = delta / this.getMax();
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
return this._s;
|
|
1739
|
+
}
|
|
1740
|
+
getLightness() {
|
|
1741
|
+
if (typeof this._l === "undefined") {
|
|
1742
|
+
this._l = (this.getMax() + this.getMin()) / 510;
|
|
1743
|
+
}
|
|
1744
|
+
return this._l;
|
|
1745
|
+
}
|
|
1746
|
+
getValue() {
|
|
1747
|
+
if (typeof this._v === "undefined") {
|
|
1748
|
+
this._v = this.getMax() / 255;
|
|
1749
|
+
}
|
|
1750
|
+
return this._v;
|
|
1751
|
+
}
|
|
1752
|
+
/**
|
|
1753
|
+
* Returns the perceived brightness of the color, from 0-255.
|
|
1754
|
+
* Note: this is not the b of HSB
|
|
1755
|
+
* @see http://www.w3.org/TR/AERT#color-contrast
|
|
1756
|
+
*/
|
|
1757
|
+
getBrightness() {
|
|
1758
|
+
if (typeof this._brightness === "undefined") {
|
|
1759
|
+
this._brightness = (this.r * 299 + this.g * 587 + this.b * 114) / 1e3;
|
|
1760
|
+
}
|
|
1761
|
+
return this._brightness;
|
|
1762
|
+
}
|
|
1763
|
+
// ======================== Func ========================
|
|
1764
|
+
darken(amount = 10) {
|
|
1765
|
+
const h = this.getHue();
|
|
1766
|
+
const s = this.getSaturation();
|
|
1767
|
+
let l = this.getLightness() - amount / 100;
|
|
1768
|
+
if (l < 0) {
|
|
1769
|
+
l = 0;
|
|
1770
|
+
}
|
|
1771
|
+
return this._c({
|
|
1772
|
+
h,
|
|
1773
|
+
s,
|
|
1774
|
+
l,
|
|
1775
|
+
a: this.a
|
|
1776
|
+
});
|
|
1777
|
+
}
|
|
1778
|
+
lighten(amount = 10) {
|
|
1779
|
+
const h = this.getHue();
|
|
1780
|
+
const s = this.getSaturation();
|
|
1781
|
+
let l = this.getLightness() + amount / 100;
|
|
1782
|
+
if (l > 1) {
|
|
1783
|
+
l = 1;
|
|
1784
|
+
}
|
|
1785
|
+
return this._c({
|
|
1786
|
+
h,
|
|
1787
|
+
s,
|
|
1788
|
+
l,
|
|
1789
|
+
a: this.a
|
|
1790
|
+
});
|
|
1791
|
+
}
|
|
1792
|
+
/**
|
|
1793
|
+
* Mix the current color a given amount with another color, from 0 to 100.
|
|
1794
|
+
* 0 means no mixing (return current color).
|
|
1795
|
+
*/
|
|
1796
|
+
mix(input, amount = 50) {
|
|
1797
|
+
const color = this._c(input);
|
|
1798
|
+
const p = amount / 100;
|
|
1799
|
+
const calc = (key) => (color[key] - this[key]) * p + this[key];
|
|
1800
|
+
const rgba = {
|
|
1801
|
+
r: round(calc("r")),
|
|
1802
|
+
g: round(calc("g")),
|
|
1803
|
+
b: round(calc("b")),
|
|
1804
|
+
a: round(calc("a") * 100) / 100
|
|
1805
|
+
};
|
|
1806
|
+
return this._c(rgba);
|
|
1807
|
+
}
|
|
1808
|
+
/**
|
|
1809
|
+
* Mix the color with pure white, from 0 to 100.
|
|
1810
|
+
* Providing 0 will do nothing, providing 100 will always return white.
|
|
1811
|
+
*/
|
|
1812
|
+
tint(amount = 10) {
|
|
1813
|
+
return this.mix({
|
|
1814
|
+
r: 255,
|
|
1815
|
+
g: 255,
|
|
1816
|
+
b: 255,
|
|
1817
|
+
a: 1
|
|
1818
|
+
}, amount);
|
|
1819
|
+
}
|
|
1820
|
+
/**
|
|
1821
|
+
* Mix the color with pure black, from 0 to 100.
|
|
1822
|
+
* Providing 0 will do nothing, providing 100 will always return black.
|
|
1823
|
+
*/
|
|
1824
|
+
shade(amount = 10) {
|
|
1825
|
+
return this.mix({
|
|
1826
|
+
r: 0,
|
|
1827
|
+
g: 0,
|
|
1828
|
+
b: 0,
|
|
1829
|
+
a: 1
|
|
1830
|
+
}, amount);
|
|
1831
|
+
}
|
|
1832
|
+
onBackground(background) {
|
|
1833
|
+
const bg = this._c(background);
|
|
1834
|
+
const alpha = this.a + bg.a * (1 - this.a);
|
|
1835
|
+
const calc = (key) => {
|
|
1836
|
+
return round((this[key] * this.a + bg[key] * bg.a * (1 - this.a)) / alpha);
|
|
1837
|
+
};
|
|
1838
|
+
return this._c({
|
|
1839
|
+
r: calc("r"),
|
|
1840
|
+
g: calc("g"),
|
|
1841
|
+
b: calc("b"),
|
|
1842
|
+
a: alpha
|
|
1843
|
+
});
|
|
1844
|
+
}
|
|
1845
|
+
// ======================= Status =======================
|
|
1846
|
+
isDark() {
|
|
1847
|
+
return this.getBrightness() < 128;
|
|
1848
|
+
}
|
|
1849
|
+
isLight() {
|
|
1850
|
+
return this.getBrightness() >= 128;
|
|
1851
|
+
}
|
|
1852
|
+
// ======================== MISC ========================
|
|
1853
|
+
equals(other) {
|
|
1854
|
+
return this.r === other.r && this.g === other.g && this.b === other.b && this.a === other.a;
|
|
1855
|
+
}
|
|
1856
|
+
clone() {
|
|
1857
|
+
return this._c(this);
|
|
1858
|
+
}
|
|
1859
|
+
// ======================= Format =======================
|
|
1860
|
+
toHexString() {
|
|
1861
|
+
let hex = "#";
|
|
1862
|
+
const rHex = (this.r || 0).toString(16);
|
|
1863
|
+
hex += rHex.length === 2 ? rHex : "0" + rHex;
|
|
1864
|
+
const gHex = (this.g || 0).toString(16);
|
|
1865
|
+
hex += gHex.length === 2 ? gHex : "0" + gHex;
|
|
1866
|
+
const bHex = (this.b || 0).toString(16);
|
|
1867
|
+
hex += bHex.length === 2 ? bHex : "0" + bHex;
|
|
1868
|
+
if (typeof this.a === "number" && this.a >= 0 && this.a < 1) {
|
|
1869
|
+
const aHex = round(this.a * 255).toString(16);
|
|
1870
|
+
hex += aHex.length === 2 ? aHex : "0" + aHex;
|
|
1871
|
+
}
|
|
1872
|
+
return hex;
|
|
1873
|
+
}
|
|
1874
|
+
/** CSS support color pattern */
|
|
1875
|
+
toHsl() {
|
|
1876
|
+
return {
|
|
1877
|
+
h: this.getHue(),
|
|
1878
|
+
s: this.getSaturation(),
|
|
1879
|
+
l: this.getLightness(),
|
|
1880
|
+
a: this.a
|
|
1881
|
+
};
|
|
1882
|
+
}
|
|
1883
|
+
/** CSS support color pattern */
|
|
1884
|
+
toHslString() {
|
|
1885
|
+
const h = this.getHue();
|
|
1886
|
+
const s = round(this.getSaturation() * 100);
|
|
1887
|
+
const l = round(this.getLightness() * 100);
|
|
1888
|
+
return this.a !== 1 ? `hsla(${h},${s}%,${l}%,${this.a})` : `hsl(${h},${s}%,${l}%)`;
|
|
1889
|
+
}
|
|
1890
|
+
/** Same as toHsb */
|
|
1891
|
+
toHsv() {
|
|
1892
|
+
return {
|
|
1893
|
+
h: this.getHue(),
|
|
1894
|
+
s: this.getSaturation(),
|
|
1895
|
+
v: this.getValue(),
|
|
1896
|
+
a: this.a
|
|
1897
|
+
};
|
|
1898
|
+
}
|
|
1899
|
+
toRgb() {
|
|
1900
|
+
return {
|
|
1901
|
+
r: this.r,
|
|
1902
|
+
g: this.g,
|
|
1903
|
+
b: this.b,
|
|
1904
|
+
a: this.a
|
|
1905
|
+
};
|
|
1906
|
+
}
|
|
1907
|
+
toRgbString() {
|
|
1908
|
+
return this.a !== 1 ? `rgba(${this.r},${this.g},${this.b},${this.a})` : `rgb(${this.r},${this.g},${this.b})`;
|
|
1909
|
+
}
|
|
1910
|
+
toString() {
|
|
1911
|
+
return this.toRgbString();
|
|
1912
|
+
}
|
|
1913
|
+
// ====================== Privates ======================
|
|
1914
|
+
/** Return a new FastColor object with one channel changed */
|
|
1915
|
+
_sc(rgb, value, max) {
|
|
1916
|
+
const clone = this.clone();
|
|
1917
|
+
clone[rgb] = limitRange(value, max);
|
|
1918
|
+
return clone;
|
|
1919
|
+
}
|
|
1920
|
+
_c(input) {
|
|
1921
|
+
return new this.constructor(input);
|
|
1922
|
+
}
|
|
1923
|
+
getMax() {
|
|
1924
|
+
if (typeof this._max === "undefined") {
|
|
1925
|
+
this._max = Math.max(this.r, this.g, this.b);
|
|
1926
|
+
}
|
|
1927
|
+
return this._max;
|
|
1928
|
+
}
|
|
1929
|
+
getMin() {
|
|
1930
|
+
if (typeof this._min === "undefined") {
|
|
1931
|
+
this._min = Math.min(this.r, this.g, this.b);
|
|
1932
|
+
}
|
|
1933
|
+
return this._min;
|
|
1934
|
+
}
|
|
1935
|
+
fromHexString(trimStr) {
|
|
1936
|
+
const withoutPrefix = trimStr.replace("#", "");
|
|
1937
|
+
function connectNum(index1, index2) {
|
|
1938
|
+
return parseInt(withoutPrefix[index1] + withoutPrefix[index2 || index1], 16);
|
|
1939
|
+
}
|
|
1940
|
+
if (withoutPrefix.length < 6) {
|
|
1941
|
+
this.r = connectNum(0);
|
|
1942
|
+
this.g = connectNum(1);
|
|
1943
|
+
this.b = connectNum(2);
|
|
1944
|
+
this.a = withoutPrefix[3] ? connectNum(3) / 255 : 1;
|
|
1945
|
+
} else {
|
|
1946
|
+
this.r = connectNum(0, 1);
|
|
1947
|
+
this.g = connectNum(2, 3);
|
|
1948
|
+
this.b = connectNum(4, 5);
|
|
1949
|
+
this.a = withoutPrefix[6] ? connectNum(6, 7) / 255 : 1;
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
fromHsl({
|
|
1953
|
+
h,
|
|
1954
|
+
s,
|
|
1955
|
+
l,
|
|
1956
|
+
a
|
|
1957
|
+
}) {
|
|
1958
|
+
this._h = h % 360;
|
|
1959
|
+
this._s = s;
|
|
1960
|
+
this._l = l;
|
|
1961
|
+
this.a = typeof a === "number" ? a : 1;
|
|
1962
|
+
if (s <= 0) {
|
|
1963
|
+
const rgb = round(l * 255);
|
|
1964
|
+
this.r = rgb;
|
|
1965
|
+
this.g = rgb;
|
|
1966
|
+
this.b = rgb;
|
|
1967
|
+
}
|
|
1968
|
+
let r = 0, g = 0, b = 0;
|
|
1969
|
+
const huePrime = h / 60;
|
|
1970
|
+
const chroma = (1 - Math.abs(2 * l - 1)) * s;
|
|
1971
|
+
const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
1972
|
+
if (huePrime >= 0 && huePrime < 1) {
|
|
1973
|
+
r = chroma;
|
|
1974
|
+
g = secondComponent;
|
|
1975
|
+
} else if (huePrime >= 1 && huePrime < 2) {
|
|
1976
|
+
r = secondComponent;
|
|
1977
|
+
g = chroma;
|
|
1978
|
+
} else if (huePrime >= 2 && huePrime < 3) {
|
|
1979
|
+
g = chroma;
|
|
1980
|
+
b = secondComponent;
|
|
1981
|
+
} else if (huePrime >= 3 && huePrime < 4) {
|
|
1982
|
+
g = secondComponent;
|
|
1983
|
+
b = chroma;
|
|
1984
|
+
} else if (huePrime >= 4 && huePrime < 5) {
|
|
1985
|
+
r = secondComponent;
|
|
1986
|
+
b = chroma;
|
|
1987
|
+
} else if (huePrime >= 5 && huePrime < 6) {
|
|
1988
|
+
r = chroma;
|
|
1989
|
+
b = secondComponent;
|
|
1990
|
+
}
|
|
1991
|
+
const lightnessModification = l - chroma / 2;
|
|
1992
|
+
this.r = round((r + lightnessModification) * 255);
|
|
1993
|
+
this.g = round((g + lightnessModification) * 255);
|
|
1994
|
+
this.b = round((b + lightnessModification) * 255);
|
|
1995
|
+
}
|
|
1996
|
+
fromHsv({
|
|
1997
|
+
h,
|
|
1998
|
+
s,
|
|
1999
|
+
v,
|
|
2000
|
+
a
|
|
2001
|
+
}) {
|
|
2002
|
+
this._h = h % 360;
|
|
2003
|
+
this._s = s;
|
|
2004
|
+
this._v = v;
|
|
2005
|
+
this.a = typeof a === "number" ? a : 1;
|
|
2006
|
+
const vv = round(v * 255);
|
|
2007
|
+
this.r = vv;
|
|
2008
|
+
this.g = vv;
|
|
2009
|
+
this.b = vv;
|
|
2010
|
+
if (s <= 0) {
|
|
2011
|
+
return;
|
|
2012
|
+
}
|
|
2013
|
+
const hh = h / 60;
|
|
2014
|
+
const i = Math.floor(hh);
|
|
2015
|
+
const ff = hh - i;
|
|
2016
|
+
const p = round(v * (1 - s) * 255);
|
|
2017
|
+
const q = round(v * (1 - s * ff) * 255);
|
|
2018
|
+
const t = round(v * (1 - s * (1 - ff)) * 255);
|
|
2019
|
+
switch (i) {
|
|
2020
|
+
case 0:
|
|
2021
|
+
this.g = t;
|
|
2022
|
+
this.b = p;
|
|
2023
|
+
break;
|
|
2024
|
+
case 1:
|
|
2025
|
+
this.r = q;
|
|
2026
|
+
this.b = p;
|
|
2027
|
+
break;
|
|
2028
|
+
case 2:
|
|
2029
|
+
this.r = p;
|
|
2030
|
+
this.b = t;
|
|
2031
|
+
break;
|
|
2032
|
+
case 3:
|
|
2033
|
+
this.r = p;
|
|
2034
|
+
this.g = q;
|
|
2035
|
+
break;
|
|
2036
|
+
case 4:
|
|
2037
|
+
this.r = t;
|
|
2038
|
+
this.g = p;
|
|
2039
|
+
break;
|
|
2040
|
+
case 5:
|
|
2041
|
+
default:
|
|
2042
|
+
this.g = p;
|
|
2043
|
+
this.b = q;
|
|
2044
|
+
break;
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
fromHsvString(trimStr) {
|
|
2048
|
+
const cells = splitColorStr(trimStr, parseHSVorHSL);
|
|
2049
|
+
this.fromHsv({
|
|
2050
|
+
h: cells[0],
|
|
2051
|
+
s: cells[1],
|
|
2052
|
+
v: cells[2],
|
|
2053
|
+
a: cells[3]
|
|
2054
|
+
});
|
|
2055
|
+
}
|
|
2056
|
+
fromHslString(trimStr) {
|
|
2057
|
+
const cells = splitColorStr(trimStr, parseHSVorHSL);
|
|
2058
|
+
this.fromHsl({
|
|
2059
|
+
h: cells[0],
|
|
2060
|
+
s: cells[1],
|
|
2061
|
+
l: cells[2],
|
|
2062
|
+
a: cells[3]
|
|
2063
|
+
});
|
|
2064
|
+
}
|
|
2065
|
+
fromRgbString(trimStr) {
|
|
2066
|
+
const cells = splitColorStr(trimStr, (num, txt) => (
|
|
2067
|
+
// Convert percentage to number. e.g. 50% -> 128
|
|
2068
|
+
txt.includes("%") ? round(num / 100 * 255) : num
|
|
2069
|
+
));
|
|
2070
|
+
this.r = cells[0];
|
|
2071
|
+
this.g = cells[1];
|
|
2072
|
+
this.b = cells[2];
|
|
2073
|
+
this.a = cells[3];
|
|
2074
|
+
}
|
|
2075
|
+
};
|
|
2076
|
+
|
|
2077
|
+
// node_modules/@ant-design/colors/es/generate.js
|
|
2078
|
+
var hueStep = 2;
|
|
2079
|
+
var saturationStep = 0.16;
|
|
2080
|
+
var saturationStep2 = 0.05;
|
|
2081
|
+
var brightnessStep1 = 0.05;
|
|
2082
|
+
var brightnessStep2 = 0.15;
|
|
2083
|
+
var lightColorCount = 5;
|
|
2084
|
+
var darkColorCount = 4;
|
|
2085
|
+
var darkColorMap = [{
|
|
2086
|
+
index: 7,
|
|
2087
|
+
amount: 15
|
|
2088
|
+
}, {
|
|
2089
|
+
index: 6,
|
|
2090
|
+
amount: 25
|
|
2091
|
+
}, {
|
|
2092
|
+
index: 5,
|
|
2093
|
+
amount: 30
|
|
2094
|
+
}, {
|
|
2095
|
+
index: 5,
|
|
2096
|
+
amount: 45
|
|
2097
|
+
}, {
|
|
2098
|
+
index: 5,
|
|
2099
|
+
amount: 65
|
|
2100
|
+
}, {
|
|
2101
|
+
index: 5,
|
|
2102
|
+
amount: 85
|
|
2103
|
+
}, {
|
|
2104
|
+
index: 4,
|
|
2105
|
+
amount: 90
|
|
2106
|
+
}, {
|
|
2107
|
+
index: 3,
|
|
2108
|
+
amount: 95
|
|
2109
|
+
}, {
|
|
2110
|
+
index: 2,
|
|
2111
|
+
amount: 97
|
|
2112
|
+
}, {
|
|
2113
|
+
index: 1,
|
|
2114
|
+
amount: 98
|
|
2115
|
+
}];
|
|
2116
|
+
function getHue(hsv, i, light) {
|
|
2117
|
+
var hue;
|
|
2118
|
+
if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
|
|
2119
|
+
hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
|
|
2120
|
+
} else {
|
|
2121
|
+
hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
|
|
2122
|
+
}
|
|
2123
|
+
if (hue < 0) {
|
|
2124
|
+
hue += 360;
|
|
2125
|
+
} else if (hue >= 360) {
|
|
2126
|
+
hue -= 360;
|
|
2127
|
+
}
|
|
2128
|
+
return hue;
|
|
2129
|
+
}
|
|
2130
|
+
function getSaturation(hsv, i, light) {
|
|
2131
|
+
if (hsv.h === 0 && hsv.s === 0) {
|
|
2132
|
+
return hsv.s;
|
|
2133
|
+
}
|
|
2134
|
+
var saturation;
|
|
2135
|
+
if (light) {
|
|
2136
|
+
saturation = hsv.s - saturationStep * i;
|
|
2137
|
+
} else if (i === darkColorCount) {
|
|
2138
|
+
saturation = hsv.s + saturationStep;
|
|
2139
|
+
} else {
|
|
2140
|
+
saturation = hsv.s + saturationStep2 * i;
|
|
2141
|
+
}
|
|
2142
|
+
if (saturation > 1) {
|
|
2143
|
+
saturation = 1;
|
|
2144
|
+
}
|
|
2145
|
+
if (light && i === lightColorCount && saturation > 0.1) {
|
|
2146
|
+
saturation = 0.1;
|
|
2147
|
+
}
|
|
2148
|
+
if (saturation < 0.06) {
|
|
2149
|
+
saturation = 0.06;
|
|
2150
|
+
}
|
|
2151
|
+
return Math.round(saturation * 100) / 100;
|
|
2152
|
+
}
|
|
2153
|
+
function getValue(hsv, i, light) {
|
|
2154
|
+
var value;
|
|
2155
|
+
if (light) {
|
|
2156
|
+
value = hsv.v + brightnessStep1 * i;
|
|
2157
|
+
} else {
|
|
2158
|
+
value = hsv.v - brightnessStep2 * i;
|
|
2159
|
+
}
|
|
2160
|
+
value = Math.max(0, Math.min(1, value));
|
|
2161
|
+
return Math.round(value * 100) / 100;
|
|
2162
|
+
}
|
|
2163
|
+
function generate(color) {
|
|
2164
|
+
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2165
|
+
var patterns = [];
|
|
2166
|
+
var pColor = new FastColor(color);
|
|
2167
|
+
var hsv = pColor.toHsv();
|
|
2168
|
+
for (var i = lightColorCount; i > 0; i -= 1) {
|
|
2169
|
+
var c = new FastColor({
|
|
2170
|
+
h: getHue(hsv, i, true),
|
|
2171
|
+
s: getSaturation(hsv, i, true),
|
|
2172
|
+
v: getValue(hsv, i, true)
|
|
2173
|
+
});
|
|
2174
|
+
patterns.push(c);
|
|
2175
|
+
}
|
|
2176
|
+
patterns.push(pColor);
|
|
2177
|
+
for (var _i = 1; _i <= darkColorCount; _i += 1) {
|
|
2178
|
+
var _c = new FastColor({
|
|
2179
|
+
h: getHue(hsv, _i),
|
|
2180
|
+
s: getSaturation(hsv, _i),
|
|
2181
|
+
v: getValue(hsv, _i)
|
|
2182
|
+
});
|
|
2183
|
+
patterns.push(_c);
|
|
2184
|
+
}
|
|
2185
|
+
if (opts.theme === "dark") {
|
|
2186
|
+
return darkColorMap.map(function(_ref) {
|
|
2187
|
+
var index = _ref.index, amount = _ref.amount;
|
|
2188
|
+
return new FastColor(opts.backgroundColor || "#141414").mix(patterns[index], amount).toHexString();
|
|
2189
|
+
});
|
|
2190
|
+
}
|
|
2191
|
+
return patterns.map(function(c2) {
|
|
2192
|
+
return c2.toHexString();
|
|
2193
|
+
});
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
// node_modules/@ant-design/colors/es/presets.js
|
|
2197
|
+
var red = ["#fff1f0", "#ffccc7", "#ffa39e", "#ff7875", "#ff4d4f", "#f5222d", "#cf1322", "#a8071a", "#820014", "#5c0011"];
|
|
2198
|
+
red.primary = red[5];
|
|
2199
|
+
var volcano = ["#fff2e8", "#ffd8bf", "#ffbb96", "#ff9c6e", "#ff7a45", "#fa541c", "#d4380d", "#ad2102", "#871400", "#610b00"];
|
|
2200
|
+
volcano.primary = volcano[5];
|
|
2201
|
+
var orange = ["#fff7e6", "#ffe7ba", "#ffd591", "#ffc069", "#ffa940", "#fa8c16", "#d46b08", "#ad4e00", "#873800", "#612500"];
|
|
2202
|
+
orange.primary = orange[5];
|
|
2203
|
+
var gold = ["#fffbe6", "#fff1b8", "#ffe58f", "#ffd666", "#ffc53d", "#faad14", "#d48806", "#ad6800", "#874d00", "#613400"];
|
|
2204
|
+
gold.primary = gold[5];
|
|
2205
|
+
var yellow = ["#feffe6", "#ffffb8", "#fffb8f", "#fff566", "#ffec3d", "#fadb14", "#d4b106", "#ad8b00", "#876800", "#614700"];
|
|
2206
|
+
yellow.primary = yellow[5];
|
|
2207
|
+
var lime = ["#fcffe6", "#f4ffb8", "#eaff8f", "#d3f261", "#bae637", "#a0d911", "#7cb305", "#5b8c00", "#3f6600", "#254000"];
|
|
2208
|
+
lime.primary = lime[5];
|
|
2209
|
+
var green = ["#f6ffed", "#d9f7be", "#b7eb8f", "#95de64", "#73d13d", "#52c41a", "#389e0d", "#237804", "#135200", "#092b00"];
|
|
2210
|
+
green.primary = green[5];
|
|
2211
|
+
var cyan = ["#e6fffb", "#b5f5ec", "#87e8de", "#5cdbd3", "#36cfc9", "#13c2c2", "#08979c", "#006d75", "#00474f", "#002329"];
|
|
2212
|
+
cyan.primary = cyan[5];
|
|
2213
|
+
var blue = ["#e6f4ff", "#bae0ff", "#91caff", "#69b1ff", "#4096ff", "#1677ff", "#0958d9", "#003eb3", "#002c8c", "#001d66"];
|
|
2214
|
+
blue.primary = blue[5];
|
|
2215
|
+
var geekblue = ["#f0f5ff", "#d6e4ff", "#adc6ff", "#85a5ff", "#597ef7", "#2f54eb", "#1d39c4", "#10239e", "#061178", "#030852"];
|
|
2216
|
+
geekblue.primary = geekblue[5];
|
|
2217
|
+
var purple = ["#f9f0ff", "#efdbff", "#d3adf7", "#b37feb", "#9254de", "#722ed1", "#531dab", "#391085", "#22075e", "#120338"];
|
|
2218
|
+
purple.primary = purple[5];
|
|
2219
|
+
var magenta = ["#fff0f6", "#ffd6e7", "#ffadd2", "#ff85c0", "#f759ab", "#eb2f96", "#c41d7f", "#9e1068", "#780650", "#520339"];
|
|
2220
|
+
magenta.primary = magenta[5];
|
|
2221
|
+
var grey = ["#a6a6a6", "#999999", "#8c8c8c", "#808080", "#737373", "#666666", "#404040", "#1a1a1a", "#000000", "#000000"];
|
|
2222
|
+
grey.primary = grey[5];
|
|
2223
|
+
var presetPalettes = {
|
|
2224
|
+
red,
|
|
2225
|
+
volcano,
|
|
2226
|
+
orange,
|
|
2227
|
+
gold,
|
|
2228
|
+
yellow,
|
|
2229
|
+
lime,
|
|
2230
|
+
green,
|
|
2231
|
+
cyan,
|
|
2232
|
+
blue,
|
|
2233
|
+
geekblue,
|
|
2234
|
+
purple,
|
|
2235
|
+
magenta,
|
|
2236
|
+
grey
|
|
2237
|
+
};
|
|
2238
|
+
var redDark = ["#2a1215", "#431418", "#58181c", "#791a1f", "#a61d24", "#d32029", "#e84749", "#f37370", "#f89f9a", "#fac8c3"];
|
|
2239
|
+
redDark.primary = redDark[5];
|
|
2240
|
+
var volcanoDark = ["#2b1611", "#441d12", "#592716", "#7c3118", "#aa3e19", "#d84a1b", "#e87040", "#f3956a", "#f8b692", "#fad4bc"];
|
|
2241
|
+
volcanoDark.primary = volcanoDark[5];
|
|
2242
|
+
var orangeDark = ["#2b1d11", "#442a11", "#593815", "#7c4a15", "#aa6215", "#d87a16", "#e89a3c", "#f3b765", "#f8cf8d", "#fae3b7"];
|
|
2243
|
+
orangeDark.primary = orangeDark[5];
|
|
2244
|
+
var goldDark = ["#2b2111", "#443111", "#594214", "#7c5914", "#aa7714", "#d89614", "#e8b339", "#f3cc62", "#f8df8b", "#faedb5"];
|
|
2245
|
+
goldDark.primary = goldDark[5];
|
|
2246
|
+
var yellowDark = ["#2b2611", "#443b11", "#595014", "#7c6e14", "#aa9514", "#d8bd14", "#e8d639", "#f3ea62", "#f8f48b", "#fafab5"];
|
|
2247
|
+
yellowDark.primary = yellowDark[5];
|
|
2248
|
+
var limeDark = ["#1f2611", "#2e3c10", "#3e4f13", "#536d13", "#6f9412", "#8bbb11", "#a9d134", "#c9e75d", "#e4f88b", "#f0fab5"];
|
|
2249
|
+
limeDark.primary = limeDark[5];
|
|
2250
|
+
var greenDark = ["#162312", "#1d3712", "#274916", "#306317", "#3c8618", "#49aa19", "#6abe39", "#8fd460", "#b2e58b", "#d5f2bb"];
|
|
2251
|
+
greenDark.primary = greenDark[5];
|
|
2252
|
+
var cyanDark = ["#112123", "#113536", "#144848", "#146262", "#138585", "#13a8a8", "#33bcb7", "#58d1c9", "#84e2d8", "#b2f1e8"];
|
|
2253
|
+
cyanDark.primary = cyanDark[5];
|
|
2254
|
+
var blueDark = ["#111a2c", "#112545", "#15325b", "#15417e", "#1554ad", "#1668dc", "#3c89e8", "#65a9f3", "#8dc5f8", "#b7dcfa"];
|
|
2255
|
+
blueDark.primary = blueDark[5];
|
|
2256
|
+
var geekblueDark = ["#131629", "#161d40", "#1c2755", "#203175", "#263ea0", "#2b4acb", "#5273e0", "#7f9ef3", "#a8c1f8", "#d2e0fa"];
|
|
2257
|
+
geekblueDark.primary = geekblueDark[5];
|
|
2258
|
+
var purpleDark = ["#1a1325", "#24163a", "#301c4d", "#3e2069", "#51258f", "#642ab5", "#854eca", "#ab7ae0", "#cda8f0", "#ebd7fa"];
|
|
2259
|
+
purpleDark.primary = purpleDark[5];
|
|
2260
|
+
var magentaDark = ["#291321", "#40162f", "#551c3b", "#75204f", "#a02669", "#cb2b83", "#e0529c", "#f37fb7", "#f8a8cc", "#fad2e3"];
|
|
2261
|
+
magentaDark.primary = magentaDark[5];
|
|
2262
|
+
var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a", "#6a6a6a", "#7b7b7b", "#888888", "#969696"];
|
|
2263
|
+
greyDark.primary = greyDark[5];
|
|
2264
|
+
|
|
2265
|
+
// src/ColorPalettePicker/ColorPalettePicker.tsx
|
|
1564
2266
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2267
|
+
function genPresets(presets = presetPalettes) {
|
|
2268
|
+
return Object.entries(presets).map(([label, colors]) => ({
|
|
2269
|
+
label,
|
|
2270
|
+
colors,
|
|
2271
|
+
key: label
|
|
2272
|
+
}));
|
|
2273
|
+
}
|
|
2274
|
+
function ColorPalettePickerBasic({
|
|
2275
|
+
value,
|
|
2276
|
+
onChange,
|
|
2277
|
+
require: require2,
|
|
2278
|
+
title,
|
|
2279
|
+
bottomText,
|
|
2280
|
+
showError,
|
|
2281
|
+
errorMessage,
|
|
2282
|
+
disabled,
|
|
2283
|
+
allowClear,
|
|
2284
|
+
defaultFormat,
|
|
2285
|
+
className,
|
|
2286
|
+
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
2287
|
+
}) {
|
|
2288
|
+
const { token } = import_antd9.theme.useToken();
|
|
2289
|
+
const presets = genPresets({
|
|
2290
|
+
primary: generate(token.colorPrimary),
|
|
2291
|
+
red,
|
|
2292
|
+
green
|
|
2293
|
+
});
|
|
2294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2295
|
+
import_antd9.ConfigProvider,
|
|
2296
|
+
{
|
|
2297
|
+
theme: {
|
|
2298
|
+
token: {
|
|
2299
|
+
fontFamily: "Kanit",
|
|
2300
|
+
fontSize: 16
|
|
2301
|
+
}
|
|
2302
|
+
},
|
|
2303
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "container-input", children: [
|
|
2304
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
|
|
2305
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "body-1", children: title }),
|
|
2306
|
+
" ",
|
|
2307
|
+
require2 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2308
|
+
] }),
|
|
2309
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2310
|
+
import_antd9.ColorPicker,
|
|
2311
|
+
{
|
|
2312
|
+
defaultFormat,
|
|
2313
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
2314
|
+
presets,
|
|
2315
|
+
value,
|
|
2316
|
+
defaultValue: "#ffff",
|
|
2317
|
+
onChange,
|
|
2318
|
+
allowClear,
|
|
2319
|
+
showText: (color) => {
|
|
2320
|
+
const hex = color.toHexString();
|
|
2321
|
+
if (!value) {
|
|
2322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: placeholder });
|
|
2323
|
+
}
|
|
2324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { children: [
|
|
2325
|
+
"(",
|
|
2326
|
+
hex,
|
|
2327
|
+
")"
|
|
2328
|
+
] });
|
|
2329
|
+
},
|
|
2330
|
+
disabled
|
|
2331
|
+
}
|
|
2332
|
+
),
|
|
2333
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
|
|
2334
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2335
|
+
" ",
|
|
2336
|
+
showError && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
2337
|
+
] })
|
|
2338
|
+
] })
|
|
2339
|
+
}
|
|
2340
|
+
);
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
// src/Select/SelectField/SelectField.tsx
|
|
2344
|
+
var import_antd10 = require("antd");
|
|
2345
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1565
2346
|
function SelectField({
|
|
1566
2347
|
value,
|
|
1567
2348
|
onChange,
|
|
@@ -1580,8 +2361,8 @@ function SelectField({
|
|
|
1580
2361
|
handleSearch,
|
|
1581
2362
|
className
|
|
1582
2363
|
}) {
|
|
1583
|
-
return /* @__PURE__ */ (0,
|
|
1584
|
-
|
|
2364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2365
|
+
import_antd10.ConfigProvider,
|
|
1585
2366
|
{
|
|
1586
2367
|
theme: {
|
|
1587
2368
|
token: {
|
|
@@ -1589,14 +2370,14 @@ function SelectField({
|
|
|
1589
2370
|
fontSize: 16
|
|
1590
2371
|
}
|
|
1591
2372
|
},
|
|
1592
|
-
children: /* @__PURE__ */ (0,
|
|
1593
|
-
/* @__PURE__ */ (0,
|
|
1594
|
-
/* @__PURE__ */ (0,
|
|
2373
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "container-input", children: [
|
|
2374
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
|
|
2375
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "body-1", children: title }),
|
|
1595
2376
|
" ",
|
|
1596
|
-
require2 && /* @__PURE__ */ (0,
|
|
2377
|
+
require2 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1597
2378
|
] }),
|
|
1598
|
-
/* @__PURE__ */ (0,
|
|
1599
|
-
|
|
2379
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2380
|
+
import_antd10.Select,
|
|
1600
2381
|
{
|
|
1601
2382
|
showSearch: true,
|
|
1602
2383
|
value,
|
|
@@ -1610,14 +2391,14 @@ function SelectField({
|
|
|
1610
2391
|
options,
|
|
1611
2392
|
mode,
|
|
1612
2393
|
onSearch: handleSearch,
|
|
1613
|
-
prefix: prefix ? /* @__PURE__ */ (0,
|
|
2394
|
+
prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { style: { width: prefixSize, height: prefixSize, display: "flex", alignItems: "center", justifyContent: "center" }, children: prefix }) : void 0,
|
|
1614
2395
|
allowClear: true
|
|
1615
2396
|
}
|
|
1616
2397
|
),
|
|
1617
|
-
/* @__PURE__ */ (0,
|
|
1618
|
-
/* @__PURE__ */ (0,
|
|
2398
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
|
|
2399
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1619
2400
|
" ",
|
|
1620
|
-
showError && /* @__PURE__ */ (0,
|
|
2401
|
+
showError && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1621
2402
|
] })
|
|
1622
2403
|
] })
|
|
1623
2404
|
}
|
|
@@ -1625,8 +2406,8 @@ function SelectField({
|
|
|
1625
2406
|
}
|
|
1626
2407
|
|
|
1627
2408
|
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
1628
|
-
var
|
|
1629
|
-
var
|
|
2409
|
+
var import_antd11 = require("antd");
|
|
2410
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1630
2411
|
function SelectFieldGroup({
|
|
1631
2412
|
value,
|
|
1632
2413
|
onChange,
|
|
@@ -1645,22 +2426,22 @@ function SelectFieldGroup({
|
|
|
1645
2426
|
handleSearch,
|
|
1646
2427
|
className
|
|
1647
2428
|
}) {
|
|
1648
|
-
return /* @__PURE__ */ (0,
|
|
1649
|
-
|
|
2429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2430
|
+
import_antd11.ConfigProvider,
|
|
1650
2431
|
{
|
|
1651
2432
|
theme: {
|
|
1652
2433
|
token: {
|
|
1653
2434
|
fontFamily: "Kanit"
|
|
1654
2435
|
}
|
|
1655
2436
|
},
|
|
1656
|
-
children: /* @__PURE__ */ (0,
|
|
1657
|
-
/* @__PURE__ */ (0,
|
|
1658
|
-
/* @__PURE__ */ (0,
|
|
2437
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "container-input", children: [
|
|
2438
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
|
|
2439
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "body-1", children: title }),
|
|
1659
2440
|
" ",
|
|
1660
|
-
require2 && /* @__PURE__ */ (0,
|
|
2441
|
+
require2 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1661
2442
|
] }),
|
|
1662
|
-
/* @__PURE__ */ (0,
|
|
1663
|
-
|
|
2443
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2444
|
+
import_antd11.Select,
|
|
1664
2445
|
{
|
|
1665
2446
|
showSearch: true,
|
|
1666
2447
|
value,
|
|
@@ -1674,7 +2455,7 @@ function SelectFieldGroup({
|
|
|
1674
2455
|
options,
|
|
1675
2456
|
mode,
|
|
1676
2457
|
onSearch: handleSearch,
|
|
1677
|
-
prefix: prefix ? /* @__PURE__ */ (0,
|
|
2458
|
+
prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1678
2459
|
"span",
|
|
1679
2460
|
{
|
|
1680
2461
|
style: {
|
|
@@ -1690,10 +2471,10 @@ function SelectFieldGroup({
|
|
|
1690
2471
|
allowClear: true
|
|
1691
2472
|
}
|
|
1692
2473
|
),
|
|
1693
|
-
/* @__PURE__ */ (0,
|
|
1694
|
-
/* @__PURE__ */ (0,
|
|
2474
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
|
|
2475
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1695
2476
|
" ",
|
|
1696
|
-
showError && /* @__PURE__ */ (0,
|
|
2477
|
+
showError && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1697
2478
|
] })
|
|
1698
2479
|
] })
|
|
1699
2480
|
}
|
|
@@ -1701,7 +2482,7 @@ function SelectFieldGroup({
|
|
|
1701
2482
|
}
|
|
1702
2483
|
|
|
1703
2484
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
1704
|
-
var
|
|
2485
|
+
var import_antd12 = require("antd");
|
|
1705
2486
|
|
|
1706
2487
|
// src/Select/SelectFieldStatus/StatusMockup.ts
|
|
1707
2488
|
var status = [
|
|
@@ -1714,7 +2495,7 @@ var status = [
|
|
|
1714
2495
|
|
|
1715
2496
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
1716
2497
|
var import_icons = require("@ant-design/icons");
|
|
1717
|
-
var
|
|
2498
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1718
2499
|
function SelectFieldStatus({
|
|
1719
2500
|
value,
|
|
1720
2501
|
onChange,
|
|
@@ -1729,8 +2510,8 @@ function SelectFieldStatus({
|
|
|
1729
2510
|
className
|
|
1730
2511
|
}) {
|
|
1731
2512
|
const selectedItem = status.find((s) => s.value === value);
|
|
1732
|
-
return /* @__PURE__ */ (0,
|
|
1733
|
-
|
|
2513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2514
|
+
import_antd12.ConfigProvider,
|
|
1734
2515
|
{
|
|
1735
2516
|
theme: {
|
|
1736
2517
|
components: {
|
|
@@ -1745,17 +2526,17 @@ function SelectFieldStatus({
|
|
|
1745
2526
|
fontFamily: "Kanit"
|
|
1746
2527
|
}
|
|
1747
2528
|
},
|
|
1748
|
-
children: /* @__PURE__ */ (0,
|
|
1749
|
-
/* @__PURE__ */ (0,
|
|
1750
|
-
/* @__PURE__ */ (0,
|
|
2529
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "container-input", children: [
|
|
2530
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
|
|
2531
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "body-1", children: title }),
|
|
1751
2532
|
" ",
|
|
1752
|
-
require2 && /* @__PURE__ */ (0,
|
|
2533
|
+
require2 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1753
2534
|
] }),
|
|
1754
|
-
/* @__PURE__ */ (0,
|
|
1755
|
-
|
|
2535
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2536
|
+
import_antd12.Select,
|
|
1756
2537
|
{
|
|
1757
2538
|
disabled,
|
|
1758
|
-
suffixIcon: /* @__PURE__ */ (0,
|
|
2539
|
+
suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_icons.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
1759
2540
|
value,
|
|
1760
2541
|
onChange,
|
|
1761
2542
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -1765,10 +2546,10 @@ function SelectFieldStatus({
|
|
|
1765
2546
|
options
|
|
1766
2547
|
}
|
|
1767
2548
|
),
|
|
1768
|
-
/* @__PURE__ */ (0,
|
|
1769
|
-
/* @__PURE__ */ (0,
|
|
2549
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
|
|
2550
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1770
2551
|
" ",
|
|
1771
|
-
showError && /* @__PURE__ */ (0,
|
|
2552
|
+
showError && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1772
2553
|
] })
|
|
1773
2554
|
] })
|
|
1774
2555
|
}
|
|
@@ -1776,7 +2557,7 @@ function SelectFieldStatus({
|
|
|
1776
2557
|
}
|
|
1777
2558
|
|
|
1778
2559
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
1779
|
-
var
|
|
2560
|
+
var import_antd13 = require("antd");
|
|
1780
2561
|
|
|
1781
2562
|
// src/Select/SelectFieldStatusReport/StatusReportMockup.ts
|
|
1782
2563
|
var status2 = [
|
|
@@ -1786,7 +2567,7 @@ var status2 = [
|
|
|
1786
2567
|
|
|
1787
2568
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
1788
2569
|
var import_icons2 = require("@ant-design/icons");
|
|
1789
|
-
var
|
|
2570
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1790
2571
|
function SelectFieldStatusReport({
|
|
1791
2572
|
value,
|
|
1792
2573
|
onChange,
|
|
@@ -1800,8 +2581,8 @@ function SelectFieldStatusReport({
|
|
|
1800
2581
|
className
|
|
1801
2582
|
}) {
|
|
1802
2583
|
const selectedItem = status2.find((s) => s.value === value);
|
|
1803
|
-
return /* @__PURE__ */ (0,
|
|
1804
|
-
|
|
2584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2585
|
+
import_antd13.ConfigProvider,
|
|
1805
2586
|
{
|
|
1806
2587
|
theme: {
|
|
1807
2588
|
components: {
|
|
@@ -1816,17 +2597,17 @@ function SelectFieldStatusReport({
|
|
|
1816
2597
|
fontFamily: "Kanit"
|
|
1817
2598
|
}
|
|
1818
2599
|
},
|
|
1819
|
-
children: /* @__PURE__ */ (0,
|
|
1820
|
-
/* @__PURE__ */ (0,
|
|
1821
|
-
/* @__PURE__ */ (0,
|
|
2600
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "container-input", children: [
|
|
2601
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
|
|
2602
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "body-1", children: title }),
|
|
1822
2603
|
" ",
|
|
1823
|
-
require2 && /* @__PURE__ */ (0,
|
|
2604
|
+
require2 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1824
2605
|
] }),
|
|
1825
|
-
/* @__PURE__ */ (0,
|
|
1826
|
-
|
|
2606
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2607
|
+
import_antd13.Select,
|
|
1827
2608
|
{
|
|
1828
2609
|
disabled,
|
|
1829
|
-
suffixIcon: /* @__PURE__ */ (0,
|
|
2610
|
+
suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons2.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
1830
2611
|
value,
|
|
1831
2612
|
onChange,
|
|
1832
2613
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -1840,10 +2621,10 @@ function SelectFieldStatusReport({
|
|
|
1840
2621
|
}))
|
|
1841
2622
|
}
|
|
1842
2623
|
),
|
|
1843
|
-
/* @__PURE__ */ (0,
|
|
1844
|
-
/* @__PURE__ */ (0,
|
|
2624
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
|
|
2625
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1845
2626
|
" ",
|
|
1846
|
-
showError && /* @__PURE__ */ (0,
|
|
2627
|
+
showError && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1847
2628
|
] })
|
|
1848
2629
|
] })
|
|
1849
2630
|
}
|
|
@@ -1851,9 +2632,9 @@ function SelectFieldStatusReport({
|
|
|
1851
2632
|
}
|
|
1852
2633
|
|
|
1853
2634
|
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
1854
|
-
var
|
|
2635
|
+
var import_antd14 = require("antd");
|
|
1855
2636
|
var import_react8 = require("react");
|
|
1856
|
-
var
|
|
2637
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1857
2638
|
function SelectFieldTag({
|
|
1858
2639
|
title,
|
|
1859
2640
|
require: require2,
|
|
@@ -1887,22 +2668,22 @@ function SelectFieldTag({
|
|
|
1887
2668
|
}
|
|
1888
2669
|
onChange?.([]);
|
|
1889
2670
|
};
|
|
1890
|
-
return /* @__PURE__ */ (0,
|
|
1891
|
-
|
|
2671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2672
|
+
import_antd14.ConfigProvider,
|
|
1892
2673
|
{
|
|
1893
2674
|
theme: {
|
|
1894
2675
|
token: {
|
|
1895
2676
|
fontFamily: "Kanit"
|
|
1896
2677
|
}
|
|
1897
2678
|
},
|
|
1898
|
-
children: /* @__PURE__ */ (0,
|
|
1899
|
-
/* @__PURE__ */ (0,
|
|
1900
|
-
/* @__PURE__ */ (0,
|
|
2679
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "container-input", children: [
|
|
2680
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
2681
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "body-1", children: title }),
|
|
1901
2682
|
" ",
|
|
1902
|
-
require2 && /* @__PURE__ */ (0,
|
|
2683
|
+
require2 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1903
2684
|
] }),
|
|
1904
|
-
/* @__PURE__ */ (0,
|
|
1905
|
-
|
|
2685
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2686
|
+
import_antd14.Select,
|
|
1906
2687
|
{
|
|
1907
2688
|
mode: "tags",
|
|
1908
2689
|
className: `body-1 flex justify-center w-full ${className ?? ""}`,
|
|
@@ -1919,10 +2700,10 @@ function SelectFieldTag({
|
|
|
1919
2700
|
allowClear: true
|
|
1920
2701
|
}
|
|
1921
2702
|
),
|
|
1922
|
-
/* @__PURE__ */ (0,
|
|
1923
|
-
/* @__PURE__ */ (0,
|
|
2703
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
2704
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1924
2705
|
" ",
|
|
1925
|
-
showError && /* @__PURE__ */ (0,
|
|
2706
|
+
showError && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1926
2707
|
] })
|
|
1927
2708
|
] })
|
|
1928
2709
|
}
|
|
@@ -1930,7 +2711,7 @@ function SelectFieldTag({
|
|
|
1930
2711
|
}
|
|
1931
2712
|
|
|
1932
2713
|
// src/SortFilter/SortFilter.tsx
|
|
1933
|
-
var
|
|
2714
|
+
var import_antd15 = require("antd");
|
|
1934
2715
|
var import_icons3 = require("@ant-design/icons");
|
|
1935
2716
|
|
|
1936
2717
|
// src/SortFilter/DataMockSortFilter.ts
|
|
@@ -1963,7 +2744,7 @@ var quarters = [
|
|
|
1963
2744
|
// src/SortFilter/SortFilter.tsx
|
|
1964
2745
|
var import_react9 = require("react");
|
|
1965
2746
|
var import_icons_react8 = require("@tabler/icons-react");
|
|
1966
|
-
var
|
|
2747
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1967
2748
|
function SortFilter({
|
|
1968
2749
|
showYear = true,
|
|
1969
2750
|
showQuarter = true,
|
|
@@ -1974,20 +2755,20 @@ function SortFilter({
|
|
|
1974
2755
|
const [yearValue, setYearValue] = (0, import_react9.useState)();
|
|
1975
2756
|
const [monthValue, setMonthValue] = (0, import_react9.useState)();
|
|
1976
2757
|
const [quarterValue, setQuartersValue] = (0, import_react9.useState)();
|
|
1977
|
-
return /* @__PURE__ */ (0,
|
|
1978
|
-
|
|
2758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2759
|
+
import_antd15.ConfigProvider,
|
|
1979
2760
|
{
|
|
1980
2761
|
theme: {
|
|
1981
2762
|
token: {
|
|
1982
2763
|
fontFamily: "Kanit"
|
|
1983
2764
|
}
|
|
1984
2765
|
},
|
|
1985
|
-
children: /* @__PURE__ */ (0,
|
|
1986
|
-
/* @__PURE__ */ (0,
|
|
1987
|
-
showYear && /* @__PURE__ */ (0,
|
|
2766
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "w-full flex items-center justify-between", children: [
|
|
2767
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "w-full flex gap-[10px]", children: [
|
|
2768
|
+
showYear && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1988
2769
|
SelectField,
|
|
1989
2770
|
{
|
|
1990
|
-
prefix: /* @__PURE__ */ (0,
|
|
2771
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons3.CalendarOutlined, {}),
|
|
1991
2772
|
onChange: setYearValue,
|
|
1992
2773
|
options: years.map((s) => ({
|
|
1993
2774
|
value: s.value,
|
|
@@ -1997,10 +2778,10 @@ function SortFilter({
|
|
|
1997
2778
|
value: yearValue
|
|
1998
2779
|
}
|
|
1999
2780
|
) }),
|
|
2000
|
-
showMonth && /* @__PURE__ */ (0,
|
|
2781
|
+
showMonth && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2001
2782
|
SelectField,
|
|
2002
2783
|
{
|
|
2003
|
-
prefix: /* @__PURE__ */ (0,
|
|
2784
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2004
2785
|
onChange: setMonthValue,
|
|
2005
2786
|
options: months.map((s) => ({
|
|
2006
2787
|
value: s.value,
|
|
@@ -2010,10 +2791,10 @@ function SortFilter({
|
|
|
2010
2791
|
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
2011
2792
|
}
|
|
2012
2793
|
) }),
|
|
2013
|
-
showQuarter && /* @__PURE__ */ (0,
|
|
2794
|
+
showQuarter && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2014
2795
|
SelectField,
|
|
2015
2796
|
{
|
|
2016
|
-
prefix: /* @__PURE__ */ (0,
|
|
2797
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2017
2798
|
onChange: setQuartersValue,
|
|
2018
2799
|
options: quarters.map((s) => ({
|
|
2019
2800
|
value: s.value,
|
|
@@ -2024,8 +2805,8 @@ function SortFilter({
|
|
|
2024
2805
|
}
|
|
2025
2806
|
) })
|
|
2026
2807
|
] }),
|
|
2027
|
-
/* @__PURE__ */ (0,
|
|
2028
|
-
/* @__PURE__ */ (0,
|
|
2808
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex gap-[10px]", children: [
|
|
2809
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2029
2810
|
import_icons_react8.IconSortDescending,
|
|
2030
2811
|
{
|
|
2031
2812
|
size: 24,
|
|
@@ -2033,7 +2814,7 @@ function SortFilter({
|
|
|
2033
2814
|
onClick: onSortClick
|
|
2034
2815
|
}
|
|
2035
2816
|
),
|
|
2036
|
-
/* @__PURE__ */ (0,
|
|
2817
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2037
2818
|
import_icons_react8.IconFilter,
|
|
2038
2819
|
{
|
|
2039
2820
|
size: 24,
|
|
@@ -2050,7 +2831,7 @@ function SortFilter({
|
|
|
2050
2831
|
// src/Upload/FileUploader/FileUploader.tsx
|
|
2051
2832
|
var import_icons_react9 = require("@tabler/icons-react");
|
|
2052
2833
|
var import_react10 = require("react");
|
|
2053
|
-
var
|
|
2834
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2054
2835
|
function FileUploader({
|
|
2055
2836
|
onUpload,
|
|
2056
2837
|
onError,
|
|
@@ -2121,10 +2902,10 @@ function FileUploader({
|
|
|
2121
2902
|
}
|
|
2122
2903
|
if (inputRef.current) inputRef.current.value = "";
|
|
2123
2904
|
};
|
|
2124
|
-
return /* @__PURE__ */ (0,
|
|
2125
|
-
label && /* @__PURE__ */ (0,
|
|
2126
|
-
/* @__PURE__ */ (0,
|
|
2127
|
-
mode === "upload" ? /* @__PURE__ */ (0,
|
|
2905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "w-full", children: [
|
|
2906
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "body-1", children: label }),
|
|
2907
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
|
|
2908
|
+
mode === "upload" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2128
2909
|
"button",
|
|
2129
2910
|
{
|
|
2130
2911
|
type: "button",
|
|
@@ -2132,15 +2913,15 @@ function FileUploader({
|
|
|
2132
2913
|
className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
|
|
2133
2914
|
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
2134
2915
|
disabled: disabled ? disabled : uploading,
|
|
2135
|
-
children: uploading ? /* @__PURE__ */ (0,
|
|
2136
|
-
/* @__PURE__ */ (0,
|
|
2916
|
+
children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
2917
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Loader, { size: 15 }),
|
|
2137
2918
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
2138
|
-
] }) : /* @__PURE__ */ (0,
|
|
2139
|
-
/* @__PURE__ */ (0,
|
|
2919
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
2920
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_icons_react9.IconUpload, { size: 15, className: "text-gray-400" }),
|
|
2140
2921
|
" \u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C"
|
|
2141
2922
|
] })
|
|
2142
2923
|
}
|
|
2143
|
-
) : /* @__PURE__ */ (0,
|
|
2924
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2144
2925
|
"div",
|
|
2145
2926
|
{
|
|
2146
2927
|
className: `min-w-[400px] min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
|
|
@@ -2154,17 +2935,17 @@ function FileUploader({
|
|
|
2154
2935
|
},
|
|
2155
2936
|
onDragLeave: () => setDragActive(false),
|
|
2156
2937
|
onDrop: handleDrop,
|
|
2157
|
-
children: uploading ? /* @__PURE__ */ (0,
|
|
2158
|
-
/* @__PURE__ */ (0,
|
|
2938
|
+
children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex justify-center items-center gap-2", children: [
|
|
2939
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Loader, { size: 15 }),
|
|
2159
2940
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
2160
|
-
] }) : /* @__PURE__ */ (0,
|
|
2161
|
-
/* @__PURE__ */ (0,
|
|
2162
|
-
/* @__PURE__ */ (0,
|
|
2163
|
-
/* @__PURE__ */ (0,
|
|
2941
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
|
|
2942
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_icons_react9.IconUpload, { size: 20 }),
|
|
2943
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("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" }),
|
|
2944
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("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" })
|
|
2164
2945
|
] })
|
|
2165
2946
|
}
|
|
2166
2947
|
),
|
|
2167
|
-
/* @__PURE__ */ (0,
|
|
2948
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2168
2949
|
"input",
|
|
2169
2950
|
{
|
|
2170
2951
|
type: "file",
|
|
@@ -2177,13 +2958,13 @@ function FileUploader({
|
|
|
2177
2958
|
}
|
|
2178
2959
|
)
|
|
2179
2960
|
] }),
|
|
2180
|
-
description && /* @__PURE__ */ (0,
|
|
2181
|
-
/* @__PURE__ */ (0,
|
|
2182
|
-
/* @__PURE__ */ (0,
|
|
2183
|
-
/* @__PURE__ */ (0,
|
|
2184
|
-
/* @__PURE__ */ (0,
|
|
2961
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-gray-400 body-4", children: description }),
|
|
2962
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "mt-[8px]", children: fileList.length !== 0 && fileList.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-2 rounded-[4px] px-[8px] py-[4px] body-1", children: [
|
|
2963
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
|
|
2964
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_icons_react9.IconPaperclip, { size: 15 }) }),
|
|
2965
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "truncate", children: file.name })
|
|
2185
2966
|
] }),
|
|
2186
|
-
/* @__PURE__ */ (0,
|
|
2967
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2187
2968
|
import_icons_react9.IconTrash,
|
|
2188
2969
|
{
|
|
2189
2970
|
size: 20,
|
|
@@ -2217,9 +2998,9 @@ function messageLoading(content, duration) {
|
|
|
2217
2998
|
}
|
|
2218
2999
|
|
|
2219
3000
|
// src/Breadcrumb/Breadcrumb.tsx
|
|
2220
|
-
var import_antd15 = require("antd");
|
|
2221
3001
|
var import_antd16 = require("antd");
|
|
2222
|
-
var
|
|
3002
|
+
var import_antd17 = require("antd");
|
|
3003
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2223
3004
|
function Breadcrumbs({
|
|
2224
3005
|
items,
|
|
2225
3006
|
separator,
|
|
@@ -2227,16 +3008,16 @@ function Breadcrumbs({
|
|
|
2227
3008
|
classname,
|
|
2228
3009
|
params
|
|
2229
3010
|
}) {
|
|
2230
|
-
return /* @__PURE__ */ (0,
|
|
2231
|
-
|
|
3011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3012
|
+
import_antd16.ConfigProvider,
|
|
2232
3013
|
{
|
|
2233
3014
|
theme: {
|
|
2234
3015
|
token: {
|
|
2235
3016
|
fontFamily: "Kanit"
|
|
2236
3017
|
}
|
|
2237
3018
|
},
|
|
2238
|
-
children: /* @__PURE__ */ (0,
|
|
2239
|
-
|
|
3019
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3020
|
+
import_antd17.Breadcrumb,
|
|
2240
3021
|
{
|
|
2241
3022
|
items,
|
|
2242
3023
|
separator,
|
|
@@ -2250,8 +3031,8 @@ function Breadcrumbs({
|
|
|
2250
3031
|
}
|
|
2251
3032
|
|
|
2252
3033
|
// src/HeadingPage/HeadingPage.tsx
|
|
2253
|
-
var
|
|
2254
|
-
var
|
|
3034
|
+
var import_antd18 = require("antd");
|
|
3035
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2255
3036
|
function HeadingPage({ Heading }) {
|
|
2256
3037
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
2257
3038
|
weekday: "long",
|
|
@@ -2259,17 +3040,17 @@ function HeadingPage({ Heading }) {
|
|
|
2259
3040
|
month: "long",
|
|
2260
3041
|
year: "numeric"
|
|
2261
3042
|
});
|
|
2262
|
-
return /* @__PURE__ */ (0,
|
|
2263
|
-
|
|
3043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3044
|
+
import_antd18.ConfigProvider,
|
|
2264
3045
|
{
|
|
2265
3046
|
theme: {
|
|
2266
3047
|
token: {
|
|
2267
3048
|
fontFamily: "Kanit"
|
|
2268
3049
|
}
|
|
2269
3050
|
},
|
|
2270
|
-
children: /* @__PURE__ */ (0,
|
|
2271
|
-
/* @__PURE__ */ (0,
|
|
2272
|
-
/* @__PURE__ */ (0,
|
|
3051
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
|
|
3052
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "headline-5", children: Heading }),
|
|
3053
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("p", { className: "body-1", children: [
|
|
2273
3054
|
" \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
|
|
2274
3055
|
today
|
|
2275
3056
|
] })
|
|
@@ -2279,9 +3060,9 @@ function HeadingPage({ Heading }) {
|
|
|
2279
3060
|
}
|
|
2280
3061
|
|
|
2281
3062
|
// src/Progress/ProgressBar.tsx
|
|
2282
|
-
var
|
|
3063
|
+
var import_antd19 = require("antd");
|
|
2283
3064
|
var import_react11 = require("react");
|
|
2284
|
-
var
|
|
3065
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2285
3066
|
function ProgressBar({
|
|
2286
3067
|
percent = 0,
|
|
2287
3068
|
size = "default",
|
|
@@ -2314,17 +3095,17 @@ function ProgressBar({
|
|
|
2314
3095
|
observer.observe(inner);
|
|
2315
3096
|
return () => observer.disconnect();
|
|
2316
3097
|
}, []);
|
|
2317
|
-
return /* @__PURE__ */ (0,
|
|
2318
|
-
|
|
3098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3099
|
+
import_antd19.ConfigProvider,
|
|
2319
3100
|
{
|
|
2320
3101
|
theme: {
|
|
2321
3102
|
token: {
|
|
2322
3103
|
fontFamily: "Kanit"
|
|
2323
3104
|
}
|
|
2324
3105
|
},
|
|
2325
|
-
children: /* @__PURE__ */ (0,
|
|
2326
|
-
/* @__PURE__ */ (0,
|
|
2327
|
-
|
|
3106
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "relative w-full", ref: progressRef, children: [
|
|
3107
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3108
|
+
import_antd19.Progress,
|
|
2328
3109
|
{
|
|
2329
3110
|
className: "w-full",
|
|
2330
3111
|
percent,
|
|
@@ -2339,7 +3120,7 @@ function ProgressBar({
|
|
|
2339
3120
|
strokeColor
|
|
2340
3121
|
}
|
|
2341
3122
|
),
|
|
2342
|
-
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ (0,
|
|
3123
|
+
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2343
3124
|
"div",
|
|
2344
3125
|
{
|
|
2345
3126
|
className: "checkpoint absolute top-0",
|
|
@@ -2366,6 +3147,7 @@ function ProgressBar({
|
|
|
2366
3147
|
Calendar,
|
|
2367
3148
|
Checkbox,
|
|
2368
3149
|
CheckboxGroup,
|
|
3150
|
+
ColorPalettePickerBasic,
|
|
2369
3151
|
ColorPickerBasic,
|
|
2370
3152
|
DataTable,
|
|
2371
3153
|
DatePickerBasic,
|