nexaas-ui-components 1.0.35 → 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
  {
@@ -2546,7 +2558,7 @@ var ModalDialog = ({
2546
2558
  zIndex: 9999
2547
2559
  }
2548
2560
  };
2549
- const trigger = triggerButton ? React4.cloneElement(triggerButton, {
2561
+ const trigger = triggerButton ? React5.cloneElement(triggerButton, {
2550
2562
  onClick: () => {
2551
2563
  onOpen();
2552
2564
  }
@@ -2776,13 +2788,13 @@ var SelectField = ({
2776
2788
  }) => {
2777
2789
  var _a;
2778
2790
  const { Option, DropdownIndicator, ClearIndicator, SingleValue } = Select.components;
2779
- const selectRef = React4.useRef(null);
2780
- const [inputValue, setInputValue] = React4.useState("");
2781
- const [loading, setLoading] = React4.useState(false);
2782
- const [options, setOptions] = React4.useState(() => optionsList || []);
2783
- const [availableHeight, setAvailableHeight] = React4.useState(300);
2784
- const [isFocused, setIsFocused] = React4.useState(false);
2785
- 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(() => {
2786
2798
  const updateAvailableHeight = () => {
2787
2799
  var _a2, _b;
2788
2800
  if ((_a2 = selectRef == null ? void 0 : selectRef.current) == null ? void 0 : _a2.getBoundingClientRect) {
@@ -2830,7 +2842,7 @@ var SelectField = ({
2830
2842
  const hasIcon = {
2831
2843
  hasIcon: icon
2832
2844
  };
2833
- React4.useEffect(() => {
2845
+ React5.useEffect(() => {
2834
2846
  setOptions(() => optionsList);
2835
2847
  }, [optionsList]);
2836
2848
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -3137,7 +3149,7 @@ var customStyles2 = {
3137
3149
  margin: "none"
3138
3150
  })
3139
3151
  };
3140
- var SelectFieldBip = React4.forwardRef(({
3152
+ var SelectFieldBip = React5.forwardRef(({
3141
3153
  name,
3142
3154
  label,
3143
3155
  error,
@@ -3164,11 +3176,11 @@ var SelectFieldBip = React4.forwardRef(({
3164
3176
  }, ref) => {
3165
3177
  var _a;
3166
3178
  const { Option, SingleValue } = Select.components;
3167
- const selectRef = React4.useRef(null);
3168
- const [inputValue, setInputValue] = React4.useState("");
3169
- const [loading, setLoading] = React4.useState(false);
3170
- const [cachedOptions, setCachedOptions] = React4.useState([]);
3171
- 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, () => ({
3172
3184
  focus: () => {
3173
3185
  var _a2;
3174
3186
  return (_a2 = selectRef.current) == null ? void 0 : _a2.focus();
@@ -3210,12 +3222,12 @@ var SelectFieldBip = React4.forwardRef(({
3210
3222
  hasIcon: icon
3211
3223
  };
3212
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"}`;
3213
- const debouncedFetchOptions = React4.useMemo(() => {
3225
+ const debouncedFetchOptions = React5.useMemo(() => {
3214
3226
  return debounce_default((value, callback) => {
3215
3227
  fetchOptions(value).then(callback);
3216
3228
  }, 300);
3217
3229
  }, [filterOptions]);
3218
- React4.useEffect(() => {
3230
+ React5.useEffect(() => {
3219
3231
  return () => {
3220
3232
  debouncedFetchOptions.cancel();
3221
3233
  };
@@ -3539,22 +3551,22 @@ function PaginationSelect({
3539
3551
  id: index,
3540
3552
  name: index
3541
3553
  }));
3542
- const [pageSizeSelected, setPageSizeSelected] = React4.useState({
3554
+ const [pageSizeSelected, setPageSizeSelected] = React5.useState({
3543
3555
  id: ((_a = JSON.parse(sessionStorage.getItem("pageSize"))) == null ? void 0 : _a.id) || 20,
3544
3556
  name: ((_b = JSON.parse(sessionStorage.getItem("pageSize"))) == null ? void 0 : _b.name) || 20
3545
3557
  });
3546
- const [pageSelected, setPageSelected] = React4.useState({
3558
+ const [pageSelected, setPageSelected] = React5.useState({
3547
3559
  id: ((_d = (_c = table == null ? void 0 : table.getState()) == null ? void 0 : _c.pagination) == null ? void 0 : _d.pageIndex) || 0,
3548
3560
  name: ((_f = (_e = table == null ? void 0 : table.getState()) == null ? void 0 : _e.pagination) == null ? void 0 : _f.pageIndex) || 0
3549
3561
  });
3550
- const [pagesOptions, setPagesOptions] = React4.useState(() => options);
3551
- const [pageSizesOptions, setPagesSizesOptions] = React4.useState(
3562
+ const [pagesOptions, setPagesOptions] = React5.useState(() => options);
3563
+ const [pageSizesOptions, setPagesSizesOptions] = React5.useState(
3552
3564
  pageSizeOptions == null ? void 0 : pageSizeOptions.map((item) => ({
3553
3565
  id: item,
3554
3566
  name: item
3555
3567
  }))
3556
3568
  );
3557
- const [query, setQuery] = React4.useState("");
3569
+ const [query, setQuery] = React5.useState("");
3558
3570
  const filter = () => {
3559
3571
  let copy = [...options];
3560
3572
  setPagesOptions(
@@ -3566,10 +3578,10 @@ function PaginationSelect({
3566
3578
  const saveSessionStorage = (key, values) => {
3567
3579
  sessionStorage.setItem(key, JSON.stringify(values));
3568
3580
  };
3569
- React4.useEffect(() => {
3581
+ React5.useEffect(() => {
3570
3582
  filter();
3571
3583
  }, [query]);
3572
- React4.useEffect(() => {
3584
+ React5.useEffect(() => {
3573
3585
  saveSessionStorage("pageSize", pageSizeSelected);
3574
3586
  table.setPageSize(pageSizeSelected == null ? void 0 : pageSizeSelected.id);
3575
3587
  table.setPageIndex(0);
@@ -3578,7 +3590,7 @@ function PaginationSelect({
3578
3590
  name: 0
3579
3591
  });
3580
3592
  }, [pageSizeSelected]);
3581
- React4.useEffect(() => {
3593
+ React5.useEffect(() => {
3582
3594
  setPagesOptions(
3583
3595
  pageCount ? [...Array(pageCount)].map((item, index) => ({
3584
3596
  id: index,
@@ -3586,7 +3598,7 @@ function PaginationSelect({
3586
3598
  })) : []
3587
3599
  );
3588
3600
  }, [table == null ? void 0 : table.getPageCount()]);
3589
- React4.useEffect(() => {
3601
+ React5.useEffect(() => {
3590
3602
  var _a2, _b2, _c2, _d2, _e2, _f2;
3591
3603
  if (((_b2 = (_a2 = table == null ? void 0 : table.getState()) == null ? void 0 : _a2.pagination) == null ? void 0 : _b2.pageIndex) >= 0) {
3592
3604
  setPageSelected({
@@ -3711,7 +3723,7 @@ function PaginationSelect({
3711
3723
  ] })
3712
3724
  ] });
3713
3725
  }
3714
- var Table = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3726
+ var Table = React5__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3715
3727
  "table",
3716
3728
  {
3717
3729
  ref,
@@ -3724,7 +3736,7 @@ var Table = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @_
3724
3736
  }
3725
3737
  ));
3726
3738
  Table.displayName = "Table";
3727
- var TableHeader = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3739
+ var TableHeader = React5__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3728
3740
  "thead",
3729
3741
  {
3730
3742
  ref,
@@ -3733,9 +3745,9 @@ var TableHeader = React4__namespace.forwardRef(({ className, ...props }, ref) =>
3733
3745
  }
3734
3746
  ));
3735
3747
  TableHeader.displayName = "TableHeader";
3736
- 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 }));
3737
3749
  TableBody.displayName = "TableBody";
3738
- var TableFooter = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3750
+ var TableFooter = React5__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3739
3751
  "div",
3740
3752
  {
3741
3753
  ref,
@@ -3747,9 +3759,9 @@ var TableFooter = React4__namespace.forwardRef(({ className, ...props }, ref) =>
3747
3759
  }
3748
3760
  ));
3749
3761
  TableFooter.displayName = "TableFooter";
3750
- 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 }));
3751
3763
  TableRow.displayName = "TableRow";
3752
- var TableHead = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3764
+ var TableHead = React5__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3753
3765
  "th",
3754
3766
  {
3755
3767
  ref,
@@ -3764,7 +3776,7 @@ var TableHead = React4__namespace.forwardRef(({ className, ...props }, ref) => /
3764
3776
  }
3765
3777
  ));
3766
3778
  TableHead.displayName = "TableHead";
3767
- var TableCell = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3779
+ var TableCell = React5__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3768
3780
  "td",
3769
3781
  {
3770
3782
  ref,
@@ -3776,7 +3788,7 @@ var TableCell = React4__namespace.forwardRef(({ className, ...props }, ref) => /
3776
3788
  }
3777
3789
  ));
3778
3790
  TableCell.displayName = "TableCell";
3779
- var TableCaption = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3791
+ var TableCaption = React5__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3780
3792
  "caption",
3781
3793
  {
3782
3794
  ref,
@@ -3889,7 +3901,7 @@ function DataTablePagination({
3889
3901
  pagesArray.map((elem, index) => {
3890
3902
  const checkPageIndexLimit = index <= limitPagePositive && index >= limitPageNegative;
3891
3903
  const isSelectedPage = index === selectedPage;
3892
- return /* @__PURE__ */ jsxRuntime.jsx(React4.Fragment, { children: checkPageIndexLimit && /* @__PURE__ */ jsxRuntime.jsx(
3904
+ return /* @__PURE__ */ jsxRuntime.jsx(React5.Fragment, { children: checkPageIndexLimit && /* @__PURE__ */ jsxRuntime.jsx(
3893
3905
  Button,
3894
3906
  {
3895
3907
  onClick: () => table.setPageIndex(index),
@@ -3999,22 +4011,22 @@ function DataTable({
3999
4011
  onFinishFetch
4000
4012
  }) {
4001
4013
  var _a, _b, _c, _d, _e, _f;
4002
- const tableRef = React4.useRef(null);
4003
- const [columnVisibility, setColumnVisibility] = React4.useState({});
4004
- const [columnFilters, setColumnFilters] = React4.useState([]);
4005
- const [sorting, setSorting] = React4.useState([]);
4006
- const [arrRowSelected, setArrRowSelected] = React4.useState([]);
4007
- const [globalFilter, setGlobalFilter] = React4.useState("");
4008
- const [dataTable, setDataTable] = React4.useState([]);
4009
- const [loading, setLoading] = React4.useState(true);
4010
- const [expanded, setExpanded] = React4.useState({});
4011
- const [total, setTotal] = React4.useState(() => totalData);
4012
- 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({
4013
4025
  pageIndex: 0,
4014
4026
  pageSize: hidePagination ? 999999 : perPage ? perPage : 20
4015
4027
  });
4016
- const [paginationScroll, setPaginationScroll] = React4.useState();
4017
- const pagination = React4.useMemo(
4028
+ const [paginationScroll, setPaginationScroll] = React5.useState();
4029
+ const pagination = React5.useMemo(
4018
4030
  () => ({
4019
4031
  pageIndex,
4020
4032
  pageSize
@@ -4069,7 +4081,7 @@ function DataTable({
4069
4081
  pageCount: Number(pageSize2)
4070
4082
  };
4071
4083
  };
4072
- React4.useEffect(() => {
4084
+ React5.useEffect(() => {
4073
4085
  if (!(tableContainerRef == null ? void 0 : tableContainerRef.current)) return;
4074
4086
  const resizeObserver = new ResizeObserver(() => {
4075
4087
  var _a2;
@@ -4078,12 +4090,12 @@ function DataTable({
4078
4090
  resizeObserver.observe(tableContainerRef == null ? void 0 : tableContainerRef.current);
4079
4091
  return () => resizeObserver.disconnect();
4080
4092
  }, []);
4081
- React4.useEffect(() => {
4093
+ React5.useEffect(() => {
4082
4094
  if (fetchData || autoPagination) {
4083
4095
  fetch();
4084
4096
  }
4085
4097
  }, [pageIndex, pageSize, sorting]);
4086
- React4.useEffect(() => {
4098
+ React5.useEffect(() => {
4087
4099
  if (totalData !== total) {
4088
4100
  setPagination({
4089
4101
  pageIndex: 0,
@@ -4092,7 +4104,7 @@ function DataTable({
4092
4104
  setTotal(totalData);
4093
4105
  }
4094
4106
  }, [totalData]);
4095
- React4.useEffect(() => {
4107
+ React5.useEffect(() => {
4096
4108
  if (data) {
4097
4109
  setDataTable(
4098
4110
  () => autoPagination ? data.slice(0, pageSize) : data
@@ -4139,7 +4151,7 @@ function DataTable({
4139
4151
  getRowStyles: rowClassName
4140
4152
  }
4141
4153
  });
4142
- React4.useEffect(() => {
4154
+ React5.useEffect(() => {
4143
4155
  if (enableRowSelection && rowSelection) {
4144
4156
  setArrRowSelected(Object.keys(rowSelection));
4145
4157
  }
@@ -4192,7 +4204,7 @@ function DataTable({
4192
4204
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
4193
4205
  }
4194
4206
  }
4195
- React4.useEffect(() => {
4207
+ React5.useEffect(() => {
4196
4208
  if (rowSelection && Object.keys(rowSelection).length == 0) {
4197
4209
  const elements = document.getElementsByClassName("th-shadow");
4198
4210
  Object.keys(elements).forEach((index) => {
@@ -4297,7 +4309,7 @@ function DataTable({
4297
4309
  );
4298
4310
  }) }, headerGroup.id + headerIndex + "header")) }),
4299
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) => {
4300
- 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: [
4301
4313
  /* @__PURE__ */ jsxRuntime.jsx(
4302
4314
  TableRow,
4303
4315
  {
@@ -4351,7 +4363,7 @@ function DataTable({
4351
4363
  ] });
4352
4364
  }
4353
4365
  var Accordion = ({ title, children, open = false }) => {
4354
- const [isOpen, setOpen] = React4.useState(open);
4366
+ const [isOpen, setOpen] = React5.useState(open);
4355
4367
  return /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(
4356
4368
  "div",
4357
4369
  {
@@ -4411,7 +4423,7 @@ var Accordion = ({ title, children, open = false }) => {
4411
4423
  ) });
4412
4424
  };
4413
4425
  function CopyPopover({ children, valueToCopy }) {
4414
- const [copied, setCopied] = React4.useState(false);
4426
+ const [copied, setCopied] = React5.useState(false);
4415
4427
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
4416
4428
  "div",
4417
4429
  {
@@ -4464,7 +4476,7 @@ var Menu = ({ triggerElement, children, className }) => {
4464
4476
  /* @__PURE__ */ jsxRuntime.jsx(
4465
4477
  react.Transition,
4466
4478
  {
4467
- as: React4.Fragment,
4479
+ as: React5.Fragment,
4468
4480
  enter: "transition ease-out duration-200",
4469
4481
  enterFrom: "transform opacity-0 scale-95",
4470
4482
  enterTo: "transform opacity-100 scale-100",
@@ -4507,7 +4519,7 @@ var EditableButton = ({
4507
4519
  button,
4508
4520
  onClose
4509
4521
  }) => {
4510
- const [showModal, setShowModal] = React4.useState(false);
4522
+ const [showModal, setShowModal] = React5.useState(false);
4511
4523
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col relative", children: [
4512
4524
  /* @__PURE__ */ jsxRuntime.jsx(
4513
4525
  "div",
@@ -4555,7 +4567,7 @@ var EditableText = ({
4555
4567
  hideEditIcon,
4556
4568
  truncate
4557
4569
  }) => {
4558
- const [showModal, setShowModal] = React4.useState(false);
4570
+ const [showModal, setShowModal] = React5.useState(false);
4559
4571
  const truncateText = (str, max, len) => {
4560
4572
  return str.length > max ? str.substring(0, len) + "..." : str;
4561
4573
  };
@@ -4657,9 +4669,9 @@ var EditableTextSelect = ({
4657
4669
  showInputSeach,
4658
4670
  onChangeValue
4659
4671
  }) => {
4660
- const [showModal, setShowModal] = React4.useState(false);
4661
- const [optionsList, setOptionsList] = React4.useState(() => options);
4662
- 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("");
4663
4675
  const optionsFuse = {
4664
4676
  includeScore: false,
4665
4677
  keys: ["name"]
@@ -4673,10 +4685,10 @@ var EditableTextSelect = ({
4673
4685
  }
4674
4686
  setOptionsList(results);
4675
4687
  };
4676
- React4.useEffect(() => {
4688
+ React5.useEffect(() => {
4677
4689
  setOptionsList(() => options);
4678
4690
  }, [options]);
4679
- React4.useEffect(() => {
4691
+ React5.useEffect(() => {
4680
4692
  filter();
4681
4693
  }, [inputSearch]);
4682
4694
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -4797,7 +4809,7 @@ var EditableTextSelect = ({
4797
4809
  );
4798
4810
  };
4799
4811
  function ImagePreview({ open, setOpen, previewImage }) {
4800
- 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(
4801
4813
  react.Dialog,
4802
4814
  {
4803
4815
  as: "div",
@@ -4807,7 +4819,7 @@ function ImagePreview({ open, setOpen, previewImage }) {
4807
4819
  /* @__PURE__ */ jsxRuntime.jsx(
4808
4820
  react.Transition.Child,
4809
4821
  {
4810
- as: React4.Fragment,
4822
+ as: React5.Fragment,
4811
4823
  enter: "ease-out duration-300",
4812
4824
  enterFrom: "opacity-0",
4813
4825
  enterTo: "opacity-100",
@@ -4820,7 +4832,7 @@ function ImagePreview({ open, setOpen, previewImage }) {
4820
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(
4821
4833
  react.Transition.Child,
4822
4834
  {
4823
- as: React4.Fragment,
4835
+ as: React5.Fragment,
4824
4836
  enter: "ease-out duration-300",
4825
4837
  enterFrom: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
4826
4838
  enterTo: "opacity-100 translate-y-0 sm:scale-100",
@@ -4876,8 +4888,8 @@ var FileStatus = ({
4876
4888
  ) });
4877
4889
  };
4878
4890
  var ImageFile = ({ isLoading, name, size, onRemove, image }) => {
4879
- const [imagePreviewModal, setImagePreviewModal] = React4.useState(false);
4880
- const [previewImage, setPreviewImage] = React4.useState();
4891
+ const [imagePreviewModal, setImagePreviewModal] = React5.useState(false);
4892
+ const [previewImage, setPreviewImage] = React5.useState();
4881
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: [
4882
4894
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden group-hover:block absolute top-3 left-3", children: [
4883
4895
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -5091,15 +5103,15 @@ var FileUpload = ({
5091
5103
  limitMessage
5092
5104
  }) => {
5093
5105
  var _a;
5094
- const [state, dispatch] = React4.useReducer(reducer, initialState);
5095
- const [dragging, setDragging] = React4.useState(false);
5096
- 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);
5097
5109
  const { readString } = reactPapaparse.usePapaParse();
5098
5110
  const fieldValidationMessages = [error == null ? void 0 : error.message];
5099
5111
  const hasError = {
5100
5112
  hasError: fieldValidationMessages.some((item) => item !== void 0)
5101
5113
  };
5102
- React4.useEffect(() => {
5114
+ React5.useEffect(() => {
5103
5115
  var _a2;
5104
5116
  if ((_a2 = state == null ? void 0 : state.files) == null ? void 0 : _a2.some((file) => file.loading === true)) {
5105
5117
  setLoading(true);
@@ -5107,12 +5119,12 @@ var FileUpload = ({
5107
5119
  setLoading(false);
5108
5120
  }
5109
5121
  }, [state == null ? void 0 : state.files]);
5110
- React4.useEffect(() => {
5122
+ React5.useEffect(() => {
5111
5123
  if (!files || files.length == 0) {
5112
5124
  state.files = [];
5113
5125
  }
5114
5126
  }, [files]);
5115
- React4.useEffect(() => {
5127
+ React5.useEffect(() => {
5116
5128
  var _a2;
5117
5129
  if (!multiple && ((_a2 = state == null ? void 0 : state.files) == null ? void 0 : _a2.length) === 0 || multiple) {
5118
5130
  window.addEventListener("dragover", handleDragOver);
@@ -5724,7 +5736,7 @@ var InputTag = ({
5724
5736
  placeholder,
5725
5737
  blockSpaces = false
5726
5738
  }) => {
5727
- const [inputValue, setInputValue] = React4.useState("");
5739
+ const [inputValue, setInputValue] = React5.useState("");
5728
5740
  const fieldValidationMessages = [error == null ? void 0 : error.message];
5729
5741
  const hasError = {
5730
5742
  hasError: fieldValidationMessages.some((item) => item !== void 0)
@@ -5954,8 +5966,8 @@ var MultiSelectBottom = ({
5954
5966
  filterOptions,
5955
5967
  debounce: debounce2 = 0
5956
5968
  }) => {
5957
- const [loading, setLoading] = React4.useState(false);
5958
- const [optionsList, setOptionsList] = React4.useState(() => options || []);
5969
+ const [loading, setLoading] = React5.useState(false);
5970
+ const [optionsList, setOptionsList] = React5.useState(() => options || []);
5959
5971
  const fieldValidationMessages = [error == null ? void 0 : error.message];
5960
5972
  const hasError = {
5961
5973
  hasError: fieldValidationMessages.some((item) => item !== void 0)
@@ -6187,7 +6199,7 @@ var ProgressBar = ({
6187
6199
  variant = "primary",
6188
6200
  status
6189
6201
  }) => {
6190
- const [barPercentage, setBarPercentage] = React4.useState(() => fixPercentage());
6202
+ const [barPercentage, setBarPercentage] = React5.useState(() => fixPercentage());
6191
6203
  function fixPercentage() {
6192
6204
  if (percentage > 100) {
6193
6205
  return 100;
@@ -6195,7 +6207,7 @@ var ProgressBar = ({
6195
6207
  return percentage;
6196
6208
  }
6197
6209
  }
6198
- React4.useEffect(() => {
6210
+ React5.useEffect(() => {
6199
6211
  setBarPercentage(fixPercentage());
6200
6212
  }, [percentage]);
6201
6213
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-y-[2px] min-w-[170px]", children: [
@@ -6217,7 +6229,7 @@ var ProgressBar = ({
6217
6229
  ] });
6218
6230
  };
6219
6231
  function SimpleTab({ tabs, onClick }) {
6220
- const [currentTab, setCurrentTab] = React4.useState(0);
6232
+ const [currentTab, setCurrentTab] = React5.useState(0);
6221
6233
  function isCurrentTab(index) {
6222
6234
  return index === currentTab;
6223
6235
  }
@@ -6475,7 +6487,7 @@ var Tabs = ({
6475
6487
  onSave,
6476
6488
  showNextStep = true
6477
6489
  }) => {
6478
- const [selectedTab, setSelectedTab] = React4.useState(0);
6490
+ const [selectedTab, setSelectedTab] = React5.useState(0);
6479
6491
  const ShowSaveButton = saveButton ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: saveButton }) : /* @__PURE__ */ jsxRuntime.jsx(
6480
6492
  Button,
6481
6493
  {
@@ -6596,7 +6608,7 @@ var TextArea = ({
6596
6608
  inputProps,
6597
6609
  name
6598
6610
  }) => {
6599
- const inputRef = React4.useRef(null);
6611
+ const inputRef = React5.useRef(null);
6600
6612
  const fieldValidationMessages = [error == null ? void 0 : error.message];
6601
6613
  const hasError = fieldValidationMessages.some((item) => item !== void 0);
6602
6614
  const styles = {
@@ -6743,7 +6755,7 @@ function ControlledInput({
6743
6755
  control,
6744
6756
  searchOnClick
6745
6757
  }) {
6746
- let inputRef = React4.useRef(null);
6758
+ let inputRef = React5.useRef(null);
6747
6759
  const fieldValidationMessages = [error == null ? void 0 : error.message];
6748
6760
  const hasError = fieldValidationMessages.some((item) => item !== void 0);
6749
6761
  const styles = {