nexaas-ui-components 1.0.34 → 1.0.36

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.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var React4 = require('react');
3
+ var React5 = require('react');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var clsx9 = require('clsx');
6
6
  var datetime2 = require('@blueprintjs/datetime2');
@@ -42,7 +42,7 @@ function _interopNamespace(e) {
42
42
  return Object.freeze(n);
43
43
  }
44
44
 
45
- var React4__namespace = /*#__PURE__*/_interopNamespace(React4);
45
+ var React5__namespace = /*#__PURE__*/_interopNamespace(React5);
46
46
  var clsx9__default = /*#__PURE__*/_interopDefault(clsx9);
47
47
  var IntlCurrencyInputRaw__default = /*#__PURE__*/_interopDefault(IntlCurrencyInputRaw);
48
48
  var lodashNamespace__namespace = /*#__PURE__*/_interopNamespace(lodashNamespace);
@@ -169,7 +169,7 @@ var Button = ({
169
169
  const appliedSize = sizes[size];
170
170
  const appliedPadding = props.icon ? paddingConfig[size].icon : paddingConfig[size].normal;
171
171
  const gapText = applyGap ? "gap-[6px]" : "gap-0";
172
- React4.useEffect(() => {
172
+ React5.useEffect(() => {
173
173
  if (!hotkey || !props.onClick) return;
174
174
  const handleKeyDown = (event) => {
175
175
  var _a;
@@ -314,7 +314,7 @@ var variants2 = {
314
314
  text: "shadow-button rounded-3xl border border-blue-700 text-blue-500 bg-blue-100 shadow-button hover:bg-blue-700 hover:text-white active:text-white active:bg-blue-900 active:border-blue-900 focus:text-white focus:bg-blue-900 focus:border-blue-900"
315
315
  }
316
316
  };
317
- var ButtonLink = React4.forwardRef(
317
+ var ButtonLink = React5.forwardRef(
318
318
  ({
319
319
  size = "md",
320
320
  icon,
@@ -332,7 +332,7 @@ var ButtonLink = React4.forwardRef(
332
332
  }, ref) => {
333
333
  var _a;
334
334
  const applyGap = icon;
335
- React4.useEffect(() => {
335
+ React5.useEffect(() => {
336
336
  if (!hotkey) return;
337
337
  const handleKeyDown = (event) => {
338
338
  var _a2;
@@ -440,13 +440,14 @@ var Input = ({
440
440
  }) => {
441
441
  const fieldValidationMessages = [error == null ? void 0 : error.message];
442
442
  const hasError = fieldValidationMessages.some((item) => item !== void 0);
443
+ const [showPassword, setShowPassword] = React5__namespace.default.useState(false);
443
444
  const styles = {
444
445
  input: `text-p-md pl-2 peer shadow-input border rounded-lg outline-none block pb-[10px] h-[46px] w-full disabled:bg-neutral-100 focus-visible:border-1 focus-visible:border-blue-500 ${label ? "pt-[22px]" : "pt-[10px]"}
445
446
  ${!hasError ? "border-neutral-300" : ""}`,
446
447
  icon: `absolute bg-neutral-100 h-[44px] top-[1px] left-[1.5px] w-[38px] rounded-l-lg text-[20px] ${hasError ? "text-dangerous-500" : "text-label peer-focus:text-blue-500"} peer-focus:border-blue-500`,
447
448
  rightIcon: "absolute h-[44px] top-[1px] right-[1.5px] w-[38px] text-[22px]",
448
449
  label: "absolute text-label top-[0.80rem] z-10 origin-[0] transform -translate-y-3 scale-75 duration-300 text-sm peer-focus:text-blue-500 peer-focus:scale-75 peer-focus:-translate-y-3 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0",
449
- clear: "absolute top-[8px] right-[8px] cursor-pointer text-label text-[22px]",
450
+ clear: "absolute top-[8.3px] cursor-pointer text-label text-[22px]",
450
451
  error: "border-dangerous-500 text-dangerous-500"
451
452
  };
452
453
  const inlineStyles = {
@@ -460,7 +461,7 @@ var Input = ({
460
461
  "input",
461
462
  {
462
463
  id: name,
463
- type,
464
+ type: type === "password" ? showPassword ? "text" : "password" : type,
464
465
  name,
465
466
  value,
466
467
  defaultValue,
@@ -518,15 +519,26 @@ var Input = ({
518
519
  ]
519
520
  }
520
521
  ),
521
- clearField && value && value !== "" && !disabled && /* @__PURE__ */ jsxRuntime.jsx(
522
+ type === "password" && /* @__PURE__ */ jsxRuntime.jsx(
522
523
  "i",
523
524
  {
525
+ onClick: () => setShowPassword(!showPassword),
524
526
  className: clsx9__default.default(
527
+ " text-label cursor-pointer text-[20px] absolute right-2 top-[11px]",
525
528
  {
526
- [styles.clear]: true
527
- },
528
- "uil uil-times clear-icon"
529
- ),
529
+ "uil-eye-slash": showPassword,
530
+ "uil-eye": !showPassword
531
+ }
532
+ )
533
+ }
534
+ ),
535
+ clearField && value && value !== "" && !disabled && /* @__PURE__ */ jsxRuntime.jsx(
536
+ "i",
537
+ {
538
+ className: clsx9__default.default(styles.clear, "uil uil-times clear-icon", {
539
+ "right-9": type === "password",
540
+ "right-2": type !== "password"
541
+ }),
530
542
  onClick: () => {
531
543
  if (input) {
532
544
  input == null ? void 0 : input.focus();
@@ -647,7 +659,7 @@ var useFieldErrorsStore = zustand.create(
647
659
  }))
648
660
  })
649
661
  );
650
- var DatePickerInput = React4.forwardRef(
662
+ var DatePickerInput = React5.forwardRef(
651
663
  ({
652
664
  icon,
653
665
  label,
@@ -668,12 +680,12 @@ var DatePickerInput = React4.forwardRef(
668
680
  popoverOffset
669
681
  }, ref) => {
670
682
  var _a;
671
- const [invalidDate, setInvalidDate] = React4.useState(false);
672
- const [showCalendar, setShowCalendar] = React4.useState(false);
673
- const [inputWidth, setInputWidth] = React4.useState(0);
674
- const inputContainerRef = React4.useRef(null);
683
+ const [invalidDate, setInvalidDate] = React5.useState(false);
684
+ const [showCalendar, setShowCalendar] = React5.useState(false);
685
+ const [inputWidth, setInputWidth] = React5.useState(0);
686
+ const inputContainerRef = React5.useRef(null);
675
687
  const dateFnsFormat = "dd/MM/yyyy";
676
- React4.useEffect(() => {
688
+ React5.useEffect(() => {
677
689
  const updateWidth = () => {
678
690
  if (inputContainerRef.current) {
679
691
  setInputWidth(inputContainerRef.current.offsetWidth + 10);
@@ -1154,8 +1166,8 @@ var FilterCalendar = ({
1154
1166
  filterOpen: "rounded-3xl shadow-input border border-blue-500 bg-blue-100 text-blue-500",
1155
1167
  filterActive: "rounded-3xl border border-blue-500 text-blue-500 bg-blue-100 shadow-input hover:bg-blue-500 hover:text-white active:text-white active:bg-blue-600 active:border-blue-600"
1156
1168
  };
1157
- const [currentValue, setCurrentValue] = React4.useState([]);
1158
- const [calendarLabel, setCalendarLabel] = React4.useState("");
1169
+ const [currentValue, setCurrentValue] = React5.useState([]);
1170
+ const [calendarLabel, setCalendarLabel] = React5.useState("");
1159
1171
  const isMobileSize = (window == null ? void 0 : window.innerWidth) < 768;
1160
1172
  const shorcuts = [
1161
1173
  {
@@ -1316,7 +1328,7 @@ var FilterCalendar = ({
1316
1328
  ]
1317
1329
  }
1318
1330
  ];
1319
- const [selectedShortcut, setSelectedShortcut] = React4.useState(
1331
+ const [selectedShortcut, setSelectedShortcut] = React5.useState(
1320
1332
  defaultShortcut || shorcuts[0]
1321
1333
  );
1322
1334
  const calendar = /* @__PURE__ */ jsxRuntime.jsx("div", { id: "group-input-calendar", className: "relative", children: rangeCalendar ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -1455,7 +1467,7 @@ var FilterCalendar = ({
1455
1467
  setCurrentValue(field.value);
1456
1468
  close();
1457
1469
  };
1458
- React4.useEffect(() => {
1470
+ React5.useEffect(() => {
1459
1471
  setCurrentValue(field.value);
1460
1472
  }, [open]);
1461
1473
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
@@ -1531,7 +1543,7 @@ function InputSmall({
1531
1543
  onClear,
1532
1544
  collapsed
1533
1545
  }) {
1534
- const inputRef = React4.useRef(null);
1546
+ const inputRef = React5.useRef(null);
1535
1547
  const styles = {
1536
1548
  input: `text-p-md text-paragraph w-full outline-none placeholder:text-label`,
1537
1549
  icon: "text-label group-focus-within:text-neutral-600 m-[10px]",
@@ -1614,13 +1626,13 @@ var FilterOptions = ({
1614
1626
  filterOpen: "rounded-3xl shadow-input border border-blue-500 bg-blue-100 text-blue-500",
1615
1627
  filterActive: "rounded-3xl border border-blue-500 text-blue-500 bg-blue-100 shadow-input hover:bg-blue-500 hover:text-white active:text-white active:bg-blue-600 active:border-blue-600"
1616
1628
  };
1617
- const [currentValue, setCurrentValue] = React4.useState(isMulti ? [] : {});
1618
- const [data, setData] = React4.useState(() => options);
1619
- const [filter, setFilter] = React4.useState("");
1620
- const [subFilter, setSubFilter] = React4.useState(
1629
+ const [currentValue, setCurrentValue] = React5.useState(isMulti ? [] : {});
1630
+ const [data, setData] = React5.useState(() => options);
1631
+ const [filter, setFilter] = React5.useState("");
1632
+ const [subFilter, setSubFilter] = React5.useState(
1621
1633
  (subFilters == null ? void 0 : subFilters.length) > 0 ? subFilters[0].id : null
1622
1634
  );
1623
- const [loading, setLoading] = React4.useState(false);
1635
+ const [loading, setLoading] = React5.useState(false);
1624
1636
  const search = async () => {
1625
1637
  if ((filter == null ? void 0 : filter.length) > 0 || (options == null ? void 0 : options.length) > 0) {
1626
1638
  if (fetch) {
@@ -1643,7 +1655,7 @@ var FilterOptions = ({
1643
1655
  }
1644
1656
  setLoading(false);
1645
1657
  };
1646
- React4.useEffect(() => {
1658
+ React5.useEffect(() => {
1647
1659
  setLoading(true);
1648
1660
  const timeout = setTimeout(() => {
1649
1661
  search();
@@ -1656,7 +1668,7 @@ var FilterOptions = ({
1656
1668
  {
1657
1669
  disabled: option.disabled,
1658
1670
  value: option,
1659
- as: React4.Fragment,
1671
+ as: React5.Fragment,
1660
1672
  children: /* @__PURE__ */ jsxRuntime.jsxs(
1661
1673
  "div",
1662
1674
  {
@@ -1787,7 +1799,7 @@ var FilterOptions = ({
1787
1799
  setCurrentValue(field.value);
1788
1800
  close();
1789
1801
  };
1790
- React4.useEffect(() => {
1802
+ React5.useEffect(() => {
1791
1803
  setCurrentValue(field.value);
1792
1804
  }, [open]);
1793
1805
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
@@ -2120,13 +2132,13 @@ function InputNumber({
2120
2132
  buttonsWrapper: "absolute top-[7px] right-[10px] cursor-pointer text-label flex flex-col gap-[2px]",
2121
2133
  button: "border-[0.5px] border-neutral-300 rounded shadow-input h-4 w-4 flex items-center justify-center"
2122
2134
  };
2123
- const [debouncedCount, setDebouncedCount] = React4.useState(0);
2135
+ const [debouncedCount, setDebouncedCount] = React5.useState(0);
2124
2136
  const save = () => {
2125
2137
  if (onBlur) {
2126
2138
  onBlur(value);
2127
2139
  }
2128
2140
  };
2129
- const updateCount = React4.useMemo(() => {
2141
+ const updateCount = React5.useMemo(() => {
2130
2142
  return debounce_default(() => {
2131
2143
  save();
2132
2144
  }, 1e3);
@@ -2431,7 +2443,7 @@ var MaskedInput = ({
2431
2443
  defaultValue,
2432
2444
  disabled
2433
2445
  }) => {
2434
- const ref = React4.useRef(null);
2446
+ const ref = React5.useRef(null);
2435
2447
  return /* @__PURE__ */ jsxRuntime.jsx(
2436
2448
  reactHookForm.Controller,
2437
2449
  {
@@ -2524,7 +2536,9 @@ var ModalDialog = ({
2524
2536
  size = "sm",
2525
2537
  info,
2526
2538
  description,
2527
- children
2539
+ children,
2540
+ showFooter = true,
2541
+ showHeader = true
2528
2542
  }) => {
2529
2543
  const customStyles6 = {
2530
2544
  content: {
@@ -2544,7 +2558,7 @@ var ModalDialog = ({
2544
2558
  zIndex: 9999
2545
2559
  }
2546
2560
  };
2547
- const trigger = triggerButton ? React4.cloneElement(triggerButton, {
2561
+ const trigger = triggerButton ? React5.cloneElement(triggerButton, {
2548
2562
  onClick: () => {
2549
2563
  onOpen();
2550
2564
  }
@@ -2560,15 +2574,22 @@ var ModalDialog = ({
2560
2574
  style: customStyles6,
2561
2575
  contentLabel: "Example Modal",
2562
2576
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx9__default.default(sizes3[size]), children: [
2563
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pb-[6px] border-b border-b-neutral-200 flex items-center justify-between", children: [
2577
+ showHeader && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pb-[6px] border-b border-b-neutral-200 flex items-center justify-between", children: [
2564
2578
  /* @__PURE__ */ jsxRuntime.jsxs("h3", { className: "text-[24px] font-bold flex items-center gap-2", children: [
2565
2579
  alertType && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx9__default.default([alertTypes[alertType]], "text-[30px]"), children: icon }),
2566
2580
  title
2567
2581
  ] }),
2568
- /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onCancel, className: "text-neutral-500 text-[24px]", children: /* @__PURE__ */ jsxRuntime.jsx("i", { className: "uil uil-times" }) })
2582
+ /* @__PURE__ */ jsxRuntime.jsx(
2583
+ "button",
2584
+ {
2585
+ onClick: onCancel,
2586
+ className: "text-neutral-500 text-[24px]",
2587
+ children: /* @__PURE__ */ jsxRuntime.jsx("i", { className: "uil uil-times" })
2588
+ }
2589
+ )
2569
2590
  ] }),
2570
2591
  /* @__PURE__ */ jsxRuntime.jsx("div", { children }),
2571
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-6 border-t border-t-neutral-200 flex w-full items-center justify-between", children: [
2592
+ showFooter && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-6 border-t border-t-neutral-200 flex w-full items-center justify-between", children: [
2572
2593
  /* @__PURE__ */ jsxRuntime.jsx(
2573
2594
  "div",
2574
2595
  {
@@ -2767,13 +2788,13 @@ var SelectField = ({
2767
2788
  }) => {
2768
2789
  var _a;
2769
2790
  const { Option, DropdownIndicator, ClearIndicator, SingleValue } = Select.components;
2770
- const selectRef = React4.useRef(null);
2771
- const [inputValue, setInputValue] = React4.useState("");
2772
- const [loading, setLoading] = React4.useState(false);
2773
- const [options, setOptions] = React4.useState(() => optionsList || []);
2774
- const [availableHeight, setAvailableHeight] = React4.useState(300);
2775
- const [isFocused, setIsFocused] = React4.useState(false);
2776
- React4.useEffect(() => {
2791
+ const selectRef = React5.useRef(null);
2792
+ const [inputValue, setInputValue] = React5.useState("");
2793
+ const [loading, setLoading] = React5.useState(false);
2794
+ const [options, setOptions] = React5.useState(() => optionsList || []);
2795
+ const [availableHeight, setAvailableHeight] = React5.useState(300);
2796
+ const [isFocused, setIsFocused] = React5.useState(false);
2797
+ React5.useEffect(() => {
2777
2798
  const updateAvailableHeight = () => {
2778
2799
  var _a2, _b;
2779
2800
  if ((_a2 = selectRef == null ? void 0 : selectRef.current) == null ? void 0 : _a2.getBoundingClientRect) {
@@ -2821,7 +2842,7 @@ var SelectField = ({
2821
2842
  const hasIcon = {
2822
2843
  hasIcon: icon
2823
2844
  };
2824
- React4.useEffect(() => {
2845
+ React5.useEffect(() => {
2825
2846
  setOptions(() => optionsList);
2826
2847
  }, [optionsList]);
2827
2848
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -3128,7 +3149,7 @@ var customStyles2 = {
3128
3149
  margin: "none"
3129
3150
  })
3130
3151
  };
3131
- var SelectFieldBip = React4.forwardRef(({
3152
+ var SelectFieldBip = React5.forwardRef(({
3132
3153
  name,
3133
3154
  label,
3134
3155
  error,
@@ -3155,11 +3176,11 @@ var SelectFieldBip = React4.forwardRef(({
3155
3176
  }, ref) => {
3156
3177
  var _a;
3157
3178
  const { Option, SingleValue } = Select.components;
3158
- const selectRef = React4.useRef(null);
3159
- const [inputValue, setInputValue] = React4.useState("");
3160
- const [loading, setLoading] = React4.useState(false);
3161
- const [cachedOptions, setCachedOptions] = React4.useState([]);
3162
- React4.useImperativeHandle(ref, () => ({
3179
+ const selectRef = React5.useRef(null);
3180
+ const [inputValue, setInputValue] = React5.useState("");
3181
+ const [loading, setLoading] = React5.useState(false);
3182
+ const [cachedOptions, setCachedOptions] = React5.useState([]);
3183
+ React5.useImperativeHandle(ref, () => ({
3163
3184
  focus: () => {
3164
3185
  var _a2;
3165
3186
  return (_a2 = selectRef.current) == null ? void 0 : _a2.focus();
@@ -3201,12 +3222,12 @@ var SelectFieldBip = React4.forwardRef(({
3201
3222
  hasIcon: icon
3202
3223
  };
3203
3224
  const iconStyle = `z-[70] absolute bg-neutral-100 h-[44px] top-[1px] left-[1px] rounded-l-lg flex justify-center items-center w-[38px] text-[22px] ${hasError.hasError ? "text-dangerous-500" : "text-label"}`;
3204
- const debouncedFetchOptions = React4.useMemo(() => {
3225
+ const debouncedFetchOptions = React5.useMemo(() => {
3205
3226
  return debounce_default((value, callback) => {
3206
3227
  fetchOptions(value).then(callback);
3207
3228
  }, 300);
3208
3229
  }, [filterOptions]);
3209
- React4.useEffect(() => {
3230
+ React5.useEffect(() => {
3210
3231
  return () => {
3211
3232
  debouncedFetchOptions.cancel();
3212
3233
  };
@@ -3530,22 +3551,22 @@ function PaginationSelect({
3530
3551
  id: index,
3531
3552
  name: index
3532
3553
  }));
3533
- const [pageSizeSelected, setPageSizeSelected] = React4.useState({
3554
+ const [pageSizeSelected, setPageSizeSelected] = React5.useState({
3534
3555
  id: ((_a = JSON.parse(sessionStorage.getItem("pageSize"))) == null ? void 0 : _a.id) || 20,
3535
3556
  name: ((_b = JSON.parse(sessionStorage.getItem("pageSize"))) == null ? void 0 : _b.name) || 20
3536
3557
  });
3537
- const [pageSelected, setPageSelected] = React4.useState({
3558
+ const [pageSelected, setPageSelected] = React5.useState({
3538
3559
  id: ((_d = (_c = table == null ? void 0 : table.getState()) == null ? void 0 : _c.pagination) == null ? void 0 : _d.pageIndex) || 0,
3539
3560
  name: ((_f = (_e = table == null ? void 0 : table.getState()) == null ? void 0 : _e.pagination) == null ? void 0 : _f.pageIndex) || 0
3540
3561
  });
3541
- const [pagesOptions, setPagesOptions] = React4.useState(() => options);
3542
- const [pageSizesOptions, setPagesSizesOptions] = React4.useState(
3562
+ const [pagesOptions, setPagesOptions] = React5.useState(() => options);
3563
+ const [pageSizesOptions, setPagesSizesOptions] = React5.useState(
3543
3564
  pageSizeOptions == null ? void 0 : pageSizeOptions.map((item) => ({
3544
3565
  id: item,
3545
3566
  name: item
3546
3567
  }))
3547
3568
  );
3548
- const [query, setQuery] = React4.useState("");
3569
+ const [query, setQuery] = React5.useState("");
3549
3570
  const filter = () => {
3550
3571
  let copy = [...options];
3551
3572
  setPagesOptions(
@@ -3557,10 +3578,10 @@ function PaginationSelect({
3557
3578
  const saveSessionStorage = (key, values) => {
3558
3579
  sessionStorage.setItem(key, JSON.stringify(values));
3559
3580
  };
3560
- React4.useEffect(() => {
3581
+ React5.useEffect(() => {
3561
3582
  filter();
3562
3583
  }, [query]);
3563
- React4.useEffect(() => {
3584
+ React5.useEffect(() => {
3564
3585
  saveSessionStorage("pageSize", pageSizeSelected);
3565
3586
  table.setPageSize(pageSizeSelected == null ? void 0 : pageSizeSelected.id);
3566
3587
  table.setPageIndex(0);
@@ -3569,7 +3590,7 @@ function PaginationSelect({
3569
3590
  name: 0
3570
3591
  });
3571
3592
  }, [pageSizeSelected]);
3572
- React4.useEffect(() => {
3593
+ React5.useEffect(() => {
3573
3594
  setPagesOptions(
3574
3595
  pageCount ? [...Array(pageCount)].map((item, index) => ({
3575
3596
  id: index,
@@ -3577,7 +3598,7 @@ function PaginationSelect({
3577
3598
  })) : []
3578
3599
  );
3579
3600
  }, [table == null ? void 0 : table.getPageCount()]);
3580
- React4.useEffect(() => {
3601
+ React5.useEffect(() => {
3581
3602
  var _a2, _b2, _c2, _d2, _e2, _f2;
3582
3603
  if (((_b2 = (_a2 = table == null ? void 0 : table.getState()) == null ? void 0 : _a2.pagination) == null ? void 0 : _b2.pageIndex) >= 0) {
3583
3604
  setPageSelected({
@@ -3702,7 +3723,7 @@ function PaginationSelect({
3702
3723
  ] })
3703
3724
  ] });
3704
3725
  }
3705
- var Table = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3726
+ var Table = React5__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3706
3727
  "table",
3707
3728
  {
3708
3729
  ref,
@@ -3715,7 +3736,7 @@ var Table = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @_
3715
3736
  }
3716
3737
  ));
3717
3738
  Table.displayName = "Table";
3718
- var TableHeader = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3739
+ var TableHeader = React5__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3719
3740
  "thead",
3720
3741
  {
3721
3742
  ref,
@@ -3724,9 +3745,9 @@ var TableHeader = React4__namespace.forwardRef(({ className, ...props }, ref) =>
3724
3745
  }
3725
3746
  ));
3726
3747
  TableHeader.displayName = "TableHeader";
3727
- var TableBody = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ref, className: clsx9.clsx(className), ...props }));
3748
+ var TableBody = React5__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ref, className: clsx9.clsx(className), ...props }));
3728
3749
  TableBody.displayName = "TableBody";
3729
- var TableFooter = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3750
+ var TableFooter = React5__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3730
3751
  "div",
3731
3752
  {
3732
3753
  ref,
@@ -3738,9 +3759,9 @@ var TableFooter = React4__namespace.forwardRef(({ className, ...props }, ref) =>
3738
3759
  }
3739
3760
  ));
3740
3761
  TableFooter.displayName = "TableFooter";
3741
- var TableRow = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tr", { ref, className: clsx9.clsx(className), ...props }));
3762
+ var TableRow = React5__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tr", { ref, className: clsx9.clsx(className), ...props }));
3742
3763
  TableRow.displayName = "TableRow";
3743
- var TableHead = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3764
+ var TableHead = React5__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3744
3765
  "th",
3745
3766
  {
3746
3767
  ref,
@@ -3755,7 +3776,7 @@ var TableHead = React4__namespace.forwardRef(({ className, ...props }, ref) => /
3755
3776
  }
3756
3777
  ));
3757
3778
  TableHead.displayName = "TableHead";
3758
- var TableCell = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3779
+ var TableCell = React5__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3759
3780
  "td",
3760
3781
  {
3761
3782
  ref,
@@ -3767,7 +3788,7 @@ var TableCell = React4__namespace.forwardRef(({ className, ...props }, ref) => /
3767
3788
  }
3768
3789
  ));
3769
3790
  TableCell.displayName = "TableCell";
3770
- var TableCaption = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3791
+ var TableCaption = React5__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3771
3792
  "caption",
3772
3793
  {
3773
3794
  ref,
@@ -3880,7 +3901,7 @@ function DataTablePagination({
3880
3901
  pagesArray.map((elem, index) => {
3881
3902
  const checkPageIndexLimit = index <= limitPagePositive && index >= limitPageNegative;
3882
3903
  const isSelectedPage = index === selectedPage;
3883
- return /* @__PURE__ */ jsxRuntime.jsx(React4.Fragment, { children: checkPageIndexLimit && /* @__PURE__ */ jsxRuntime.jsx(
3904
+ return /* @__PURE__ */ jsxRuntime.jsx(React5.Fragment, { children: checkPageIndexLimit && /* @__PURE__ */ jsxRuntime.jsx(
3884
3905
  Button,
3885
3906
  {
3886
3907
  onClick: () => table.setPageIndex(index),
@@ -3990,22 +4011,22 @@ function DataTable({
3990
4011
  onFinishFetch
3991
4012
  }) {
3992
4013
  var _a, _b, _c, _d, _e, _f;
3993
- const tableRef = React4.useRef(null);
3994
- const [columnVisibility, setColumnVisibility] = React4.useState({});
3995
- const [columnFilters, setColumnFilters] = React4.useState([]);
3996
- const [sorting, setSorting] = React4.useState([]);
3997
- const [arrRowSelected, setArrRowSelected] = React4.useState([]);
3998
- const [globalFilter, setGlobalFilter] = React4.useState("");
3999
- const [dataTable, setDataTable] = React4.useState([]);
4000
- const [loading, setLoading] = React4.useState(true);
4001
- const [expanded, setExpanded] = React4.useState({});
4002
- const [total, setTotal] = React4.useState(() => totalData);
4003
- const [{ pageIndex, pageSize }, setPagination] = React4.useState({
4014
+ const tableRef = React5.useRef(null);
4015
+ const [columnVisibility, setColumnVisibility] = React5.useState({});
4016
+ const [columnFilters, setColumnFilters] = React5.useState([]);
4017
+ const [sorting, setSorting] = React5.useState([]);
4018
+ const [arrRowSelected, setArrRowSelected] = React5.useState([]);
4019
+ const [globalFilter, setGlobalFilter] = React5.useState("");
4020
+ const [dataTable, setDataTable] = React5.useState([]);
4021
+ const [loading, setLoading] = React5.useState(true);
4022
+ const [expanded, setExpanded] = React5.useState({});
4023
+ const [total, setTotal] = React5.useState(() => totalData);
4024
+ const [{ pageIndex, pageSize }, setPagination] = React5.useState({
4004
4025
  pageIndex: 0,
4005
4026
  pageSize: hidePagination ? 999999 : perPage ? perPage : 20
4006
4027
  });
4007
- const [paginationScroll, setPaginationScroll] = React4.useState();
4008
- const pagination = React4.useMemo(
4028
+ const [paginationScroll, setPaginationScroll] = React5.useState();
4029
+ const pagination = React5.useMemo(
4009
4030
  () => ({
4010
4031
  pageIndex,
4011
4032
  pageSize
@@ -4060,7 +4081,7 @@ function DataTable({
4060
4081
  pageCount: Number(pageSize2)
4061
4082
  };
4062
4083
  };
4063
- React4.useEffect(() => {
4084
+ React5.useEffect(() => {
4064
4085
  if (!(tableContainerRef == null ? void 0 : tableContainerRef.current)) return;
4065
4086
  const resizeObserver = new ResizeObserver(() => {
4066
4087
  var _a2;
@@ -4069,12 +4090,12 @@ function DataTable({
4069
4090
  resizeObserver.observe(tableContainerRef == null ? void 0 : tableContainerRef.current);
4070
4091
  return () => resizeObserver.disconnect();
4071
4092
  }, []);
4072
- React4.useEffect(() => {
4093
+ React5.useEffect(() => {
4073
4094
  if (fetchData || autoPagination) {
4074
4095
  fetch();
4075
4096
  }
4076
4097
  }, [pageIndex, pageSize, sorting]);
4077
- React4.useEffect(() => {
4098
+ React5.useEffect(() => {
4078
4099
  if (totalData !== total) {
4079
4100
  setPagination({
4080
4101
  pageIndex: 0,
@@ -4083,7 +4104,7 @@ function DataTable({
4083
4104
  setTotal(totalData);
4084
4105
  }
4085
4106
  }, [totalData]);
4086
- React4.useEffect(() => {
4107
+ React5.useEffect(() => {
4087
4108
  if (data) {
4088
4109
  setDataTable(
4089
4110
  () => autoPagination ? data.slice(0, pageSize) : data
@@ -4130,7 +4151,7 @@ function DataTable({
4130
4151
  getRowStyles: rowClassName
4131
4152
  }
4132
4153
  });
4133
- React4.useEffect(() => {
4154
+ React5.useEffect(() => {
4134
4155
  if (enableRowSelection && rowSelection) {
4135
4156
  setArrRowSelected(Object.keys(rowSelection));
4136
4157
  }
@@ -4183,7 +4204,7 @@ function DataTable({
4183
4204
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
4184
4205
  }
4185
4206
  }
4186
- React4.useEffect(() => {
4207
+ React5.useEffect(() => {
4187
4208
  if (rowSelection && Object.keys(rowSelection).length == 0) {
4188
4209
  const elements = document.getElementsByClassName("th-shadow");
4189
4210
  Object.keys(elements).forEach((index) => {
@@ -4288,7 +4309,7 @@ function DataTable({
4288
4309
  );
4289
4310
  }) }, headerGroup.id + headerIndex + "header")) }),
4290
4311
  /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: (_f = (_e = table == null ? void 0 : table.getRowModel()) == null ? void 0 : _e.rows) == null ? void 0 : _f.map((row, rowIndex) => {
4291
- return /* @__PURE__ */ jsxRuntime.jsx(React4__namespace.default.Fragment, { children: !row.original._destroy && /* @__PURE__ */ jsxRuntime.jsxs(React4__namespace.default.Fragment, { children: [
4312
+ return /* @__PURE__ */ jsxRuntime.jsx(React5__namespace.default.Fragment, { children: !row.original._destroy && /* @__PURE__ */ jsxRuntime.jsxs(React5__namespace.default.Fragment, { children: [
4292
4313
  /* @__PURE__ */ jsxRuntime.jsx(
4293
4314
  TableRow,
4294
4315
  {
@@ -4342,7 +4363,7 @@ function DataTable({
4342
4363
  ] });
4343
4364
  }
4344
4365
  var Accordion = ({ title, children, open = false }) => {
4345
- const [isOpen, setOpen] = React4.useState(open);
4366
+ const [isOpen, setOpen] = React5.useState(open);
4346
4367
  return /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(
4347
4368
  "div",
4348
4369
  {
@@ -4402,7 +4423,7 @@ var Accordion = ({ title, children, open = false }) => {
4402
4423
  ) });
4403
4424
  };
4404
4425
  function CopyPopover({ children, valueToCopy }) {
4405
- const [copied, setCopied] = React4.useState(false);
4426
+ const [copied, setCopied] = React5.useState(false);
4406
4427
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
4407
4428
  "div",
4408
4429
  {
@@ -4455,7 +4476,7 @@ var Menu = ({ triggerElement, children, className }) => {
4455
4476
  /* @__PURE__ */ jsxRuntime.jsx(
4456
4477
  react.Transition,
4457
4478
  {
4458
- as: React4.Fragment,
4479
+ as: React5.Fragment,
4459
4480
  enter: "transition ease-out duration-200",
4460
4481
  enterFrom: "transform opacity-0 scale-95",
4461
4482
  enterTo: "transform opacity-100 scale-100",
@@ -4498,7 +4519,7 @@ var EditableButton = ({
4498
4519
  button,
4499
4520
  onClose
4500
4521
  }) => {
4501
- const [showModal, setShowModal] = React4.useState(false);
4522
+ const [showModal, setShowModal] = React5.useState(false);
4502
4523
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col relative", children: [
4503
4524
  /* @__PURE__ */ jsxRuntime.jsx(
4504
4525
  "div",
@@ -4546,7 +4567,7 @@ var EditableText = ({
4546
4567
  hideEditIcon,
4547
4568
  truncate
4548
4569
  }) => {
4549
- const [showModal, setShowModal] = React4.useState(false);
4570
+ const [showModal, setShowModal] = React5.useState(false);
4550
4571
  const truncateText = (str, max, len) => {
4551
4572
  return str.length > max ? str.substring(0, len) + "..." : str;
4552
4573
  };
@@ -4648,9 +4669,9 @@ var EditableTextSelect = ({
4648
4669
  showInputSeach,
4649
4670
  onChangeValue
4650
4671
  }) => {
4651
- const [showModal, setShowModal] = React4.useState(false);
4652
- const [optionsList, setOptionsList] = React4.useState(() => options);
4653
- const [inputSearch, setInputSearch] = React4.useState("");
4672
+ const [showModal, setShowModal] = React5.useState(false);
4673
+ const [optionsList, setOptionsList] = React5.useState(() => options);
4674
+ const [inputSearch, setInputSearch] = React5.useState("");
4654
4675
  const optionsFuse = {
4655
4676
  includeScore: false,
4656
4677
  keys: ["name"]
@@ -4664,10 +4685,10 @@ var EditableTextSelect = ({
4664
4685
  }
4665
4686
  setOptionsList(results);
4666
4687
  };
4667
- React4.useEffect(() => {
4688
+ React5.useEffect(() => {
4668
4689
  setOptionsList(() => options);
4669
4690
  }, [options]);
4670
- React4.useEffect(() => {
4691
+ React5.useEffect(() => {
4671
4692
  filter();
4672
4693
  }, [inputSearch]);
4673
4694
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -4788,7 +4809,7 @@ var EditableTextSelect = ({
4788
4809
  );
4789
4810
  };
4790
4811
  function ImagePreview({ open, setOpen, previewImage }) {
4791
- return /* @__PURE__ */ jsxRuntime.jsx(react.Transition.Root, { show: open, as: React4.Fragment, children: /* @__PURE__ */ jsxRuntime.jsxs(
4812
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Transition.Root, { show: open, as: React5.Fragment, children: /* @__PURE__ */ jsxRuntime.jsxs(
4792
4813
  react.Dialog,
4793
4814
  {
4794
4815
  as: "div",
@@ -4798,7 +4819,7 @@ function ImagePreview({ open, setOpen, previewImage }) {
4798
4819
  /* @__PURE__ */ jsxRuntime.jsx(
4799
4820
  react.Transition.Child,
4800
4821
  {
4801
- as: React4.Fragment,
4822
+ as: React5.Fragment,
4802
4823
  enter: "ease-out duration-300",
4803
4824
  enterFrom: "opacity-0",
4804
4825
  enterTo: "opacity-100",
@@ -4811,7 +4832,7 @@ function ImagePreview({ open, setOpen, previewImage }) {
4811
4832
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 z-10 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0", children: /* @__PURE__ */ jsxRuntime.jsx(
4812
4833
  react.Transition.Child,
4813
4834
  {
4814
- as: React4.Fragment,
4835
+ as: React5.Fragment,
4815
4836
  enter: "ease-out duration-300",
4816
4837
  enterFrom: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
4817
4838
  enterTo: "opacity-100 translate-y-0 sm:scale-100",
@@ -4867,8 +4888,8 @@ var FileStatus = ({
4867
4888
  ) });
4868
4889
  };
4869
4890
  var ImageFile = ({ isLoading, name, size, onRemove, image }) => {
4870
- const [imagePreviewModal, setImagePreviewModal] = React4.useState(false);
4871
- const [previewImage, setPreviewImage] = React4.useState();
4891
+ const [imagePreviewModal, setImagePreviewModal] = React5.useState(false);
4892
+ const [previewImage, setPreviewImage] = React5.useState();
4872
4893
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "group h-[130px] w-[130px] flex justify-between border border-neutral-300 rounded-[8px]", children: !isLoading && image ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full h-full relative", children: [
4873
4894
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden group-hover:block absolute top-3 left-3", children: [
4874
4895
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -5082,15 +5103,15 @@ var FileUpload = ({
5082
5103
  limitMessage
5083
5104
  }) => {
5084
5105
  var _a;
5085
- const [state, dispatch] = React4.useReducer(reducer, initialState);
5086
- const [dragging, setDragging] = React4.useState(false);
5087
- const [loading, setLoading] = React4.useState(false);
5106
+ const [state, dispatch] = React5.useReducer(reducer, initialState);
5107
+ const [dragging, setDragging] = React5.useState(false);
5108
+ const [loading, setLoading] = React5.useState(false);
5088
5109
  const { readString } = reactPapaparse.usePapaParse();
5089
5110
  const fieldValidationMessages = [error == null ? void 0 : error.message];
5090
5111
  const hasError = {
5091
5112
  hasError: fieldValidationMessages.some((item) => item !== void 0)
5092
5113
  };
5093
- React4.useEffect(() => {
5114
+ React5.useEffect(() => {
5094
5115
  var _a2;
5095
5116
  if ((_a2 = state == null ? void 0 : state.files) == null ? void 0 : _a2.some((file) => file.loading === true)) {
5096
5117
  setLoading(true);
@@ -5098,12 +5119,12 @@ var FileUpload = ({
5098
5119
  setLoading(false);
5099
5120
  }
5100
5121
  }, [state == null ? void 0 : state.files]);
5101
- React4.useEffect(() => {
5122
+ React5.useEffect(() => {
5102
5123
  if (!files || files.length == 0) {
5103
5124
  state.files = [];
5104
5125
  }
5105
5126
  }, [files]);
5106
- React4.useEffect(() => {
5127
+ React5.useEffect(() => {
5107
5128
  var _a2;
5108
5129
  if (!multiple && ((_a2 = state == null ? void 0 : state.files) == null ? void 0 : _a2.length) === 0 || multiple) {
5109
5130
  window.addEventListener("dragover", handleDragOver);
@@ -5715,7 +5736,7 @@ var InputTag = ({
5715
5736
  placeholder,
5716
5737
  blockSpaces = false
5717
5738
  }) => {
5718
- const [inputValue, setInputValue] = React4.useState("");
5739
+ const [inputValue, setInputValue] = React5.useState("");
5719
5740
  const fieldValidationMessages = [error == null ? void 0 : error.message];
5720
5741
  const hasError = {
5721
5742
  hasError: fieldValidationMessages.some((item) => item !== void 0)
@@ -5945,8 +5966,8 @@ var MultiSelectBottom = ({
5945
5966
  filterOptions,
5946
5967
  debounce: debounce2 = 0
5947
5968
  }) => {
5948
- const [loading, setLoading] = React4.useState(false);
5949
- const [optionsList, setOptionsList] = React4.useState(() => options || []);
5969
+ const [loading, setLoading] = React5.useState(false);
5970
+ const [optionsList, setOptionsList] = React5.useState(() => options || []);
5950
5971
  const fieldValidationMessages = [error == null ? void 0 : error.message];
5951
5972
  const hasError = {
5952
5973
  hasError: fieldValidationMessages.some((item) => item !== void 0)
@@ -6178,7 +6199,7 @@ var ProgressBar = ({
6178
6199
  variant = "primary",
6179
6200
  status
6180
6201
  }) => {
6181
- const [barPercentage, setBarPercentage] = React4.useState(() => fixPercentage());
6202
+ const [barPercentage, setBarPercentage] = React5.useState(() => fixPercentage());
6182
6203
  function fixPercentage() {
6183
6204
  if (percentage > 100) {
6184
6205
  return 100;
@@ -6186,7 +6207,7 @@ var ProgressBar = ({
6186
6207
  return percentage;
6187
6208
  }
6188
6209
  }
6189
- React4.useEffect(() => {
6210
+ React5.useEffect(() => {
6190
6211
  setBarPercentage(fixPercentage());
6191
6212
  }, [percentage]);
6192
6213
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-y-[2px] min-w-[170px]", children: [
@@ -6208,7 +6229,7 @@ var ProgressBar = ({
6208
6229
  ] });
6209
6230
  };
6210
6231
  function SimpleTab({ tabs, onClick }) {
6211
- const [currentTab, setCurrentTab] = React4.useState(0);
6232
+ const [currentTab, setCurrentTab] = React5.useState(0);
6212
6233
  function isCurrentTab(index) {
6213
6234
  return index === currentTab;
6214
6235
  }
@@ -6466,7 +6487,7 @@ var Tabs = ({
6466
6487
  onSave,
6467
6488
  showNextStep = true
6468
6489
  }) => {
6469
- const [selectedTab, setSelectedTab] = React4.useState(0);
6490
+ const [selectedTab, setSelectedTab] = React5.useState(0);
6470
6491
  const ShowSaveButton = saveButton ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: saveButton }) : /* @__PURE__ */ jsxRuntime.jsx(
6471
6492
  Button,
6472
6493
  {
@@ -6587,7 +6608,7 @@ var TextArea = ({
6587
6608
  inputProps,
6588
6609
  name
6589
6610
  }) => {
6590
- const inputRef = React4.useRef(null);
6611
+ const inputRef = React5.useRef(null);
6591
6612
  const fieldValidationMessages = [error == null ? void 0 : error.message];
6592
6613
  const hasError = fieldValidationMessages.some((item) => item !== void 0);
6593
6614
  const styles = {
@@ -6734,7 +6755,7 @@ function ControlledInput({
6734
6755
  control,
6735
6756
  searchOnClick
6736
6757
  }) {
6737
- let inputRef = React4.useRef(null);
6758
+ let inputRef = React5.useRef(null);
6738
6759
  const fieldValidationMessages = [error == null ? void 0 : error.message];
6739
6760
  const hasError = fieldValidationMessages.some((item) => item !== void 0);
6740
6761
  const styles = {