@ctlyst.id/internal-ui 3.3.15 → 3.4.0

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.js CHANGED
@@ -1287,26 +1287,32 @@ var getCommonPinningStyles = (column) => {
1287
1287
  ...isLastLeftPinnedColumn ? {
1288
1288
  padding: "16px 8px 16px 8px",
1289
1289
  "&:after": {
1290
+ transition: "all 0.3s",
1290
1291
  content: "''",
1291
1292
  position: "absolute",
1292
1293
  width: "30px",
1293
1294
  right: "0px",
1294
1295
  bottom: "-1px",
1295
1296
  top: 0,
1296
- transform: "translateX(100%)",
1297
+ transform: "translateX(100%)"
1298
+ },
1299
+ "[pin-left=true] &:after": {
1297
1300
  boxShadow: "inset 14px 0px 20px -10px #00000010"
1298
1301
  }
1299
1302
  } : {},
1300
1303
  ...isFirstRightPinnedColumn ? {
1301
1304
  padding: "16px 8px 16px 8px",
1302
1305
  "&:after": {
1306
+ transition: "all 0.3s",
1303
1307
  content: "''",
1304
1308
  position: "absolute",
1305
1309
  width: "30px",
1306
1310
  left: "0%",
1307
1311
  top: 0,
1308
1312
  bottom: "-1px",
1309
- transform: "translateX(-100%)",
1313
+ transform: "translateX(-100%)"
1314
+ },
1315
+ "[pin-right=true] &:after": {
1310
1316
  boxShadow: "inset -14px 0px 20px -10px #00000010"
1311
1317
  }
1312
1318
  } : {}
@@ -1406,22 +1412,39 @@ var useDataTable = ({
1406
1412
  };
1407
1413
  };
1408
1414
  var DataTable = React5.forwardRef((props, ref) => {
1409
- var _a, _b;
1415
+ var _a, _b, _c;
1410
1416
  const { isLoading, styles, headerSticky, onRowClick, container, columnPinning } = props;
1411
1417
  const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);
1418
+ const refTable = React5.useRef(null);
1412
1419
  React5.useImperativeHandle(ref, () => ({
1413
1420
  toggleAllRowsSelected
1414
1421
  }));
1422
+ let lastPinnedColumn = 0;
1423
+ (_a = refTable.current) == null ? void 0 : _a.addEventListener("scroll", (s) => {
1424
+ var _a2, _b2, _c2, _d;
1425
+ const element = s.currentTarget;
1426
+ if (element.scrollLeft > 0) {
1427
+ (_a2 = refTable.current) == null ? void 0 : _a2.setAttribute("pin-left", "true");
1428
+ } else {
1429
+ (_b2 = refTable.current) == null ? void 0 : _b2.removeAttribute("pin-left");
1430
+ }
1431
+ if (element.scrollLeft < element.scrollWidth - (lastPinnedColumn + element.offsetWidth)) {
1432
+ (_c2 = refTable.current) == null ? void 0 : _c2.setAttribute("pin-right", "true");
1433
+ } else {
1434
+ (_d = refTable.current) == null ? void 0 : _d.removeAttribute("pin-right");
1435
+ }
1436
+ });
1415
1437
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1416
1438
  import_react28.Box,
1417
1439
  {
1418
1440
  overflowX: "auto",
1419
1441
  overflowY: "hidden",
1420
1442
  position: "relative",
1421
- pl: ((_a = columnPinning == null ? void 0 : columnPinning.left) == null ? void 0 : _a.length) ? 0 : 4,
1422
- pr: ((_b = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _b.length) ? 0 : 4,
1443
+ pl: ((_b = columnPinning == null ? void 0 : columnPinning.left) == null ? void 0 : _b.length) ? 0 : 4,
1444
+ pr: ((_c = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _c.length) ? 0 : 4,
1423
1445
  maxW: "100%",
1424
1446
  w: "full",
1447
+ ref: refTable,
1425
1448
  ...container,
1426
1449
  children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react28.Table, { ...styles == null ? void 0 : styles.table, "data-loading": "true", children: [
1427
1450
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Thead, { ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
@@ -1451,7 +1474,10 @@ var DataTable = React5.forwardRef((props, ref) => {
1451
1474
  maxH: "50px",
1452
1475
  ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}),
1453
1476
  children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Tr, { bg: (0, import_react28.useColorModeValue)("initial", "ebony-clay.700"), ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => {
1454
- var _a2;
1477
+ var _a2, _b2;
1478
+ if (!!((_a2 = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _a2.length) && header.column.getIsFirstColumn("right")) {
1479
+ lastPinnedColumn = header.column.getAfter("right");
1480
+ }
1455
1481
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1456
1482
  import_react28.Th,
1457
1483
  {
@@ -1478,10 +1504,10 @@ var DataTable = React5.forwardRef((props, ref) => {
1478
1504
  cursor: header.column.getCanSort() ? "pointer" : "default",
1479
1505
  "data-test-id": `CT_Container_SortingIcon_${header.id}`,
1480
1506
  onClick: header.column.getToggleSortingHandler(),
1481
- children: (_a2 = header.column.getCanSort() && {
1507
+ children: (_b2 = header.column.getCanSort() && {
1482
1508
  asc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronUpIcon, { h: 4, w: 4, color: "neutral.500" }),
1483
1509
  desc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronDownIcon, { h: 4, w: 4, color: "neutral.500" })
1484
- }[header.column.getIsSorted()]) != null ? _a2 : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Box, { display: "flex", justifyContent: "center", alignItems: "center", boxSize: 4, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.UpDownIcon, { color: "neutral.500" }) })
1510
+ }[header.column.getIsSorted()]) != null ? _b2 : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Box, { display: "flex", justifyContent: "center", alignItems: "center", boxSize: 4, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.UpDownIcon, { color: "neutral.500" }) })
1485
1511
  }
1486
1512
  )
1487
1513
  ]
@@ -1578,6 +1604,539 @@ var import_shared_utils8 = require("@chakra-ui/shared-utils");
1578
1604
  var import_internal_icon6 = require("@ctlyst.id/internal-icon");
1579
1605
  var import_react_datepicker = __toESM(require("react-datepicker"));
1580
1606
 
1607
+ // ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs
1608
+ function buildFormatLongFn(args) {
1609
+ return (options = {}) => {
1610
+ const width = options.width ? String(options.width) : args.defaultWidth;
1611
+ const format = args.formats[width] || args.formats[args.defaultWidth];
1612
+ return format;
1613
+ };
1614
+ }
1615
+
1616
+ // ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs
1617
+ function buildLocalizeFn(args) {
1618
+ return (value, options) => {
1619
+ const context = (options == null ? void 0 : options.context) ? String(options.context) : "standalone";
1620
+ let valuesArray;
1621
+ if (context === "formatting" && args.formattingValues) {
1622
+ const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
1623
+ const width = (options == null ? void 0 : options.width) ? String(options.width) : defaultWidth;
1624
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
1625
+ } else {
1626
+ const defaultWidth = args.defaultWidth;
1627
+ const width = (options == null ? void 0 : options.width) ? String(options.width) : args.defaultWidth;
1628
+ valuesArray = args.values[width] || args.values[defaultWidth];
1629
+ }
1630
+ const index = args.argumentCallback ? args.argumentCallback(value) : value;
1631
+ return valuesArray[index];
1632
+ };
1633
+ }
1634
+
1635
+ // ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildMatchFn.mjs
1636
+ function buildMatchFn(args) {
1637
+ return (string, options = {}) => {
1638
+ const width = options.width;
1639
+ const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
1640
+ const matchResult = string.match(matchPattern);
1641
+ if (!matchResult) {
1642
+ return null;
1643
+ }
1644
+ const matchedString = matchResult[0];
1645
+ const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
1646
+ const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
1647
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
1648
+ findKey(parsePatterns, (pattern) => pattern.test(matchedString))
1649
+ );
1650
+ let value;
1651
+ value = args.valueCallback ? args.valueCallback(key) : key;
1652
+ value = options.valueCallback ? (
1653
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
1654
+ options.valueCallback(value)
1655
+ ) : value;
1656
+ const rest = string.slice(matchedString.length);
1657
+ return { value, rest };
1658
+ };
1659
+ }
1660
+ function findKey(object, predicate) {
1661
+ for (const key in object) {
1662
+ if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
1663
+ return key;
1664
+ }
1665
+ }
1666
+ return void 0;
1667
+ }
1668
+ function findIndex(array, predicate) {
1669
+ for (let key = 0; key < array.length; key++) {
1670
+ if (predicate(array[key])) {
1671
+ return key;
1672
+ }
1673
+ }
1674
+ return void 0;
1675
+ }
1676
+
1677
+ // ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs
1678
+ function buildMatchPatternFn(args) {
1679
+ return (string, options = {}) => {
1680
+ const matchResult = string.match(args.matchPattern);
1681
+ if (!matchResult) return null;
1682
+ const matchedString = matchResult[0];
1683
+ const parseResult = string.match(args.parsePattern);
1684
+ if (!parseResult) return null;
1685
+ let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
1686
+ value = options.valueCallback ? options.valueCallback(value) : value;
1687
+ const rest = string.slice(matchedString.length);
1688
+ return { value, rest };
1689
+ };
1690
+ }
1691
+
1692
+ // ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/id/_lib/formatDistance.mjs
1693
+ var formatDistanceLocale = {
1694
+ lessThanXSeconds: {
1695
+ one: "kurang dari 1 detik",
1696
+ other: "kurang dari {{count}} detik"
1697
+ },
1698
+ xSeconds: {
1699
+ one: "1 detik",
1700
+ other: "{{count}} detik"
1701
+ },
1702
+ halfAMinute: "setengah menit",
1703
+ lessThanXMinutes: {
1704
+ one: "kurang dari 1 menit",
1705
+ other: "kurang dari {{count}} menit"
1706
+ },
1707
+ xMinutes: {
1708
+ one: "1 menit",
1709
+ other: "{{count}} menit"
1710
+ },
1711
+ aboutXHours: {
1712
+ one: "sekitar 1 jam",
1713
+ other: "sekitar {{count}} jam"
1714
+ },
1715
+ xHours: {
1716
+ one: "1 jam",
1717
+ other: "{{count}} jam"
1718
+ },
1719
+ xDays: {
1720
+ one: "1 hari",
1721
+ other: "{{count}} hari"
1722
+ },
1723
+ aboutXWeeks: {
1724
+ one: "sekitar 1 minggu",
1725
+ other: "sekitar {{count}} minggu"
1726
+ },
1727
+ xWeeks: {
1728
+ one: "1 minggu",
1729
+ other: "{{count}} minggu"
1730
+ },
1731
+ aboutXMonths: {
1732
+ one: "sekitar 1 bulan",
1733
+ other: "sekitar {{count}} bulan"
1734
+ },
1735
+ xMonths: {
1736
+ one: "1 bulan",
1737
+ other: "{{count}} bulan"
1738
+ },
1739
+ aboutXYears: {
1740
+ one: "sekitar 1 tahun",
1741
+ other: "sekitar {{count}} tahun"
1742
+ },
1743
+ xYears: {
1744
+ one: "1 tahun",
1745
+ other: "{{count}} tahun"
1746
+ },
1747
+ overXYears: {
1748
+ one: "lebih dari 1 tahun",
1749
+ other: "lebih dari {{count}} tahun"
1750
+ },
1751
+ almostXYears: {
1752
+ one: "hampir 1 tahun",
1753
+ other: "hampir {{count}} tahun"
1754
+ }
1755
+ };
1756
+ var formatDistance = (token, count, options) => {
1757
+ let result;
1758
+ const tokenValue = formatDistanceLocale[token];
1759
+ if (typeof tokenValue === "string") {
1760
+ result = tokenValue;
1761
+ } else if (count === 1) {
1762
+ result = tokenValue.one;
1763
+ } else {
1764
+ result = tokenValue.other.replace("{{count}}", count.toString());
1765
+ }
1766
+ if (options == null ? void 0 : options.addSuffix) {
1767
+ if (options.comparison && options.comparison > 0) {
1768
+ return "dalam waktu " + result;
1769
+ } else {
1770
+ return result + " yang lalu";
1771
+ }
1772
+ }
1773
+ return result;
1774
+ };
1775
+
1776
+ // ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/id/_lib/formatLong.mjs
1777
+ var dateFormats = {
1778
+ full: "EEEE, d MMMM yyyy",
1779
+ long: "d MMMM yyyy",
1780
+ medium: "d MMM yyyy",
1781
+ short: "d/M/yyyy"
1782
+ };
1783
+ var timeFormats = {
1784
+ full: "HH.mm.ss",
1785
+ long: "HH.mm.ss",
1786
+ medium: "HH.mm",
1787
+ short: "HH.mm"
1788
+ };
1789
+ var dateTimeFormats = {
1790
+ full: "{{date}} 'pukul' {{time}}",
1791
+ long: "{{date}} 'pukul' {{time}}",
1792
+ medium: "{{date}}, {{time}}",
1793
+ short: "{{date}}, {{time}}"
1794
+ };
1795
+ var formatLong = {
1796
+ date: buildFormatLongFn({
1797
+ formats: dateFormats,
1798
+ defaultWidth: "full"
1799
+ }),
1800
+ time: buildFormatLongFn({
1801
+ formats: timeFormats,
1802
+ defaultWidth: "full"
1803
+ }),
1804
+ dateTime: buildFormatLongFn({
1805
+ formats: dateTimeFormats,
1806
+ defaultWidth: "full"
1807
+ })
1808
+ };
1809
+
1810
+ // ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/id/_lib/formatRelative.mjs
1811
+ var formatRelativeLocale = {
1812
+ lastWeek: "eeee 'lalu pukul' p",
1813
+ yesterday: "'Kemarin pukul' p",
1814
+ today: "'Hari ini pukul' p",
1815
+ tomorrow: "'Besok pukul' p",
1816
+ nextWeek: "eeee 'pukul' p",
1817
+ other: "P"
1818
+ };
1819
+ var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
1820
+
1821
+ // ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/id/_lib/localize.mjs
1822
+ var eraValues = {
1823
+ narrow: ["SM", "M"],
1824
+ abbreviated: ["SM", "M"],
1825
+ wide: ["Sebelum Masehi", "Masehi"]
1826
+ };
1827
+ var quarterValues = {
1828
+ narrow: ["1", "2", "3", "4"],
1829
+ abbreviated: ["K1", "K2", "K3", "K4"],
1830
+ wide: ["Kuartal ke-1", "Kuartal ke-2", "Kuartal ke-3", "Kuartal ke-4"]
1831
+ };
1832
+ var monthValues = {
1833
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
1834
+ abbreviated: [
1835
+ "Jan",
1836
+ "Feb",
1837
+ "Mar",
1838
+ "Apr",
1839
+ "Mei",
1840
+ "Jun",
1841
+ "Jul",
1842
+ "Agt",
1843
+ "Sep",
1844
+ "Okt",
1845
+ "Nov",
1846
+ "Des"
1847
+ ],
1848
+ wide: [
1849
+ "Januari",
1850
+ "Februari",
1851
+ "Maret",
1852
+ "April",
1853
+ "Mei",
1854
+ "Juni",
1855
+ "Juli",
1856
+ "Agustus",
1857
+ "September",
1858
+ "Oktober",
1859
+ "November",
1860
+ "Desember"
1861
+ ]
1862
+ };
1863
+ var dayValues = {
1864
+ narrow: ["M", "S", "S", "R", "K", "J", "S"],
1865
+ short: ["Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
1866
+ abbreviated: ["Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
1867
+ wide: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"]
1868
+ };
1869
+ var dayPeriodValues = {
1870
+ narrow: {
1871
+ am: "AM",
1872
+ pm: "PM",
1873
+ midnight: "tengah malam",
1874
+ noon: "tengah hari",
1875
+ morning: "pagi",
1876
+ afternoon: "siang",
1877
+ evening: "sore",
1878
+ night: "malam"
1879
+ },
1880
+ abbreviated: {
1881
+ am: "AM",
1882
+ pm: "PM",
1883
+ midnight: "tengah malam",
1884
+ noon: "tengah hari",
1885
+ morning: "pagi",
1886
+ afternoon: "siang",
1887
+ evening: "sore",
1888
+ night: "malam"
1889
+ },
1890
+ wide: {
1891
+ am: "AM",
1892
+ pm: "PM",
1893
+ midnight: "tengah malam",
1894
+ noon: "tengah hari",
1895
+ morning: "pagi",
1896
+ afternoon: "siang",
1897
+ evening: "sore",
1898
+ night: "malam"
1899
+ }
1900
+ };
1901
+ var formattingDayPeriodValues = {
1902
+ narrow: {
1903
+ am: "AM",
1904
+ pm: "PM",
1905
+ midnight: "tengah malam",
1906
+ noon: "tengah hari",
1907
+ morning: "pagi",
1908
+ afternoon: "siang",
1909
+ evening: "sore",
1910
+ night: "malam"
1911
+ },
1912
+ abbreviated: {
1913
+ am: "AM",
1914
+ pm: "PM",
1915
+ midnight: "tengah malam",
1916
+ noon: "tengah hari",
1917
+ morning: "pagi",
1918
+ afternoon: "siang",
1919
+ evening: "sore",
1920
+ night: "malam"
1921
+ },
1922
+ wide: {
1923
+ am: "AM",
1924
+ pm: "PM",
1925
+ midnight: "tengah malam",
1926
+ noon: "tengah hari",
1927
+ morning: "pagi",
1928
+ afternoon: "siang",
1929
+ evening: "sore",
1930
+ night: "malam"
1931
+ }
1932
+ };
1933
+ var ordinalNumber = (dirtyNumber, _options) => {
1934
+ const number = Number(dirtyNumber);
1935
+ return "ke-" + number;
1936
+ };
1937
+ var localize = {
1938
+ ordinalNumber,
1939
+ era: buildLocalizeFn({
1940
+ values: eraValues,
1941
+ defaultWidth: "wide"
1942
+ }),
1943
+ quarter: buildLocalizeFn({
1944
+ values: quarterValues,
1945
+ defaultWidth: "wide",
1946
+ argumentCallback: (quarter) => quarter - 1
1947
+ }),
1948
+ month: buildLocalizeFn({
1949
+ values: monthValues,
1950
+ defaultWidth: "wide"
1951
+ }),
1952
+ day: buildLocalizeFn({
1953
+ values: dayValues,
1954
+ defaultWidth: "wide"
1955
+ }),
1956
+ dayPeriod: buildLocalizeFn({
1957
+ values: dayPeriodValues,
1958
+ defaultWidth: "wide",
1959
+ formattingValues: formattingDayPeriodValues,
1960
+ defaultFormattingWidth: "wide"
1961
+ })
1962
+ };
1963
+
1964
+ // ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/id/_lib/match.mjs
1965
+ var matchOrdinalNumberPattern = /^ke-(\d+)?/i;
1966
+ var parseOrdinalNumberPattern = /\d+/i;
1967
+ var matchEraPatterns = {
1968
+ narrow: /^(sm|m)/i,
1969
+ abbreviated: /^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,
1970
+ wide: /^(sebelum masehi|sebelum era umum|masehi|era umum)/i
1971
+ };
1972
+ var parseEraPatterns = {
1973
+ any: [/^s/i, /^(m|e)/i]
1974
+ };
1975
+ var matchQuarterPatterns = {
1976
+ narrow: /^[1234]/i,
1977
+ abbreviated: /^K-?\s[1234]/i,
1978
+ wide: /^Kuartal ke-?\s?[1234]/i
1979
+ };
1980
+ var parseQuarterPatterns = {
1981
+ any: [/1/i, /2/i, /3/i, /4/i]
1982
+ };
1983
+ var matchMonthPatterns = {
1984
+ narrow: /^[jfmasond]/i,
1985
+ abbreviated: /^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,
1986
+ wide: /^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i
1987
+ };
1988
+ var parseMonthPatterns = {
1989
+ narrow: [
1990
+ /^j/i,
1991
+ /^f/i,
1992
+ /^m/i,
1993
+ /^a/i,
1994
+ /^m/i,
1995
+ /^j/i,
1996
+ /^j/i,
1997
+ /^a/i,
1998
+ /^s/i,
1999
+ /^o/i,
2000
+ /^n/i,
2001
+ /^d/i
2002
+ ],
2003
+ any: [
2004
+ /^ja/i,
2005
+ /^f/i,
2006
+ /^ma/i,
2007
+ /^ap/i,
2008
+ /^me/i,
2009
+ /^jun/i,
2010
+ /^jul/i,
2011
+ /^ag/i,
2012
+ /^s/i,
2013
+ /^o/i,
2014
+ /^n/i,
2015
+ /^d/i
2016
+ ]
2017
+ };
2018
+ var matchDayPatterns = {
2019
+ narrow: /^[srkjm]/i,
2020
+ short: /^(min|sen|sel|rab|kam|jum|sab)/i,
2021
+ abbreviated: /^(min|sen|sel|rab|kam|jum|sab)/i,
2022
+ wide: /^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i
2023
+ };
2024
+ var parseDayPatterns = {
2025
+ narrow: [/^m/i, /^s/i, /^s/i, /^r/i, /^k/i, /^j/i, /^s/i],
2026
+ any: [/^m/i, /^sen/i, /^sel/i, /^r/i, /^k/i, /^j/i, /^sa/i]
2027
+ };
2028
+ var matchDayPeriodPatterns = {
2029
+ narrow: /^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,
2030
+ any: /^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i
2031
+ };
2032
+ var parseDayPeriodPatterns = {
2033
+ any: {
2034
+ am: /^a/i,
2035
+ pm: /^pm/i,
2036
+ midnight: /^tengah m/i,
2037
+ noon: /^tengah h/i,
2038
+ morning: /pagi/i,
2039
+ afternoon: /siang/i,
2040
+ evening: /sore/i,
2041
+ night: /malam/i
2042
+ }
2043
+ };
2044
+ var match = {
2045
+ ordinalNumber: buildMatchPatternFn({
2046
+ matchPattern: matchOrdinalNumberPattern,
2047
+ parsePattern: parseOrdinalNumberPattern,
2048
+ valueCallback: (value) => parseInt(value, 10)
2049
+ }),
2050
+ era: buildMatchFn({
2051
+ matchPatterns: matchEraPatterns,
2052
+ defaultMatchWidth: "wide",
2053
+ parsePatterns: parseEraPatterns,
2054
+ defaultParseWidth: "any"
2055
+ }),
2056
+ quarter: buildMatchFn({
2057
+ matchPatterns: matchQuarterPatterns,
2058
+ defaultMatchWidth: "wide",
2059
+ parsePatterns: parseQuarterPatterns,
2060
+ defaultParseWidth: "any",
2061
+ valueCallback: (index) => index + 1
2062
+ }),
2063
+ month: buildMatchFn({
2064
+ matchPatterns: matchMonthPatterns,
2065
+ defaultMatchWidth: "wide",
2066
+ parsePatterns: parseMonthPatterns,
2067
+ defaultParseWidth: "any"
2068
+ }),
2069
+ day: buildMatchFn({
2070
+ matchPatterns: matchDayPatterns,
2071
+ defaultMatchWidth: "wide",
2072
+ parsePatterns: parseDayPatterns,
2073
+ defaultParseWidth: "any"
2074
+ }),
2075
+ dayPeriod: buildMatchFn({
2076
+ matchPatterns: matchDayPeriodPatterns,
2077
+ defaultMatchWidth: "any",
2078
+ parsePatterns: parseDayPeriodPatterns,
2079
+ defaultParseWidth: "any"
2080
+ })
2081
+ };
2082
+
2083
+ // ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/id.mjs
2084
+ var id = {
2085
+ code: "id",
2086
+ formatDistance,
2087
+ formatLong,
2088
+ formatRelative,
2089
+ localize,
2090
+ match,
2091
+ options: {
2092
+ weekStartsOn: 1,
2093
+ firstWeekContainsDate: 1
2094
+ }
2095
+ };
2096
+
2097
+ // src/utils/locale/_lib/buildLocalizeFn/index.ts
2098
+ function buildLocalizeFn2(args) {
2099
+ return (value, options) => {
2100
+ const context = (options == null ? void 0 : options.context) ? String(options.context) : "standalone";
2101
+ let valuesArray;
2102
+ if (context === "formatting" && args.formattingValues) {
2103
+ const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
2104
+ const width = (options == null ? void 0 : options.width) ? String(options.width) : defaultWidth;
2105
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
2106
+ } else {
2107
+ const { defaultWidth } = args;
2108
+ const width = (options == null ? void 0 : options.width) ? String(options.width) : args.defaultWidth;
2109
+ valuesArray = args.values[width] || args.values[defaultWidth];
2110
+ }
2111
+ const index = args.argumentCallback ? args.argumentCallback(value) : value;
2112
+ return valuesArray[index];
2113
+ };
2114
+ }
2115
+
2116
+ // src/utils/locale/id/index.ts
2117
+ var monthValues2 = {
2118
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
2119
+ abbreviated: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Agu", "Sep", "Okt", "Nov", "Des"],
2120
+ wide: [
2121
+ "Januari",
2122
+ "Februari",
2123
+ "Maret",
2124
+ "April",
2125
+ "Mei",
2126
+ "Juni",
2127
+ "Juli",
2128
+ "Agustus",
2129
+ "September",
2130
+ "Oktober",
2131
+ "November",
2132
+ "Desember"
2133
+ ]
2134
+ };
2135
+ id.localize.month = buildLocalizeFn2({
2136
+ values: monthValues2,
2137
+ defaultWidth: "wide"
2138
+ });
2139
+
1581
2140
  // src/components/datepicker/components/styles.tsx
1582
2141
  var import_system6 = require("@chakra-ui/system");
1583
2142
  var import_react30 = require("@emotion/react");
@@ -2476,7 +3035,7 @@ var time_input_default = TimeInput;
2476
3035
  // src/components/datepicker/components/datepicker.tsx
2477
3036
  var import_jsx_runtime27 = require("react/jsx-runtime");
2478
3037
  var Datepicker = ({
2479
- id,
3038
+ id: id2,
2480
3039
  label,
2481
3040
  error,
2482
3041
  isError,
@@ -2488,11 +3047,12 @@ var Datepicker = ({
2488
3047
  onClear,
2489
3048
  showMonth,
2490
3049
  shortMonth,
3050
+ timezoneLabel,
2491
3051
  ...props
2492
3052
  }) => {
2493
3053
  var _a, _b;
2494
3054
  const selected = value ? new Date(value) : void 0;
2495
- const dateFormat = ((_a = props.dateFormat) != null ? _a : withTime) ? "dd MMMM yyyy, HH:mm" : "dd MMMM yyyy";
3055
+ const dateFormat = ((_a = props.dateFormat) != null ? _a : withTime) ? `dd MMM yyyy, HH:mm '${timezoneLabel}'` : "dd MMM yyyy";
2496
3056
  const getTimeProps = () => {
2497
3057
  if (!withTime) return {};
2498
3058
  return {
@@ -2507,7 +3067,7 @@ var Datepicker = ({
2507
3067
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2508
3068
  import_react_datepicker.default,
2509
3069
  {
2510
- id,
3070
+ id: id2,
2511
3071
  name,
2512
3072
  selected,
2513
3073
  customInput: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
@@ -2545,6 +3105,7 @@ var Datepicker = ({
2545
3105
  shouldCloseOnSelect: !(props.selectsRange || withTime),
2546
3106
  useShortMonthInDropdown: showMonth ? shortMonth : false,
2547
3107
  dateFormat,
3108
+ locale: id,
2548
3109
  ...getTimeProps(),
2549
3110
  ...props
2550
3111
  }
@@ -5162,7 +5723,7 @@ var useToast = () => {
5162
5723
  style: { backgroundColor: style == null ? void 0 : style.backgroundColor, color: style == null ? void 0 : style.color }
5163
5724
  });
5164
5725
  },
5165
- dismiss: (id) => import_react_toastify.toast.dismiss(id)
5726
+ dismiss: (id2) => import_react_toastify.toast.dismiss(id2)
5166
5727
  };
5167
5728
  };
5168
5729