@unifiedsoftware/react-ui 1.0.5 → 1.0.7

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.mjs CHANGED
@@ -30,17 +30,51 @@ var __objRest = (source, exclude) => {
30
30
  return target;
31
31
  };
32
32
 
33
- // src/components/Button/Button.tsx
33
+ // src/components/Badge/Badge.tsx
34
34
  import clsx from "clsx";
35
- import { forwardRef } from "react";
36
- import { RiLoader4Line } from "react-icons/ri";
37
35
 
38
36
  // src/constants/index.ts
39
37
  var PREFIX_CLS = "us-";
40
38
 
41
- // src/components/Button/Button.tsx
39
+ // src/components/Badge/Badge.tsx
42
40
  import { jsx, jsxs } from "react/jsx-runtime";
43
- var Button = forwardRef(
41
+ var Badge = ({ children, placement, content }) => {
42
+ return /* @__PURE__ */ jsxs("div", { className: clsx(`${PREFIX_CLS}badge-wrapper`), children: [
43
+ children,
44
+ /* @__PURE__ */ jsx(
45
+ "div",
46
+ {
47
+ className: clsx(`${PREFIX_CLS}badge`, {
48
+ [`${PREFIX_CLS}badge--${placement}`]: placement
49
+ }),
50
+ children: content
51
+ }
52
+ )
53
+ ] });
54
+ };
55
+ var Badge_default = Badge;
56
+
57
+ // src/components/Button/Button.tsx
58
+ import clsx3 from "clsx";
59
+ import { forwardRef as forwardRef2 } from "react";
60
+ import { TbLoader2 } from "react-icons/tb";
61
+
62
+ // src/components/Icon/Icon.tsx
63
+ import clsx2 from "clsx";
64
+ import { Children, cloneElement, forwardRef } from "react";
65
+ var Icon = forwardRef(({ children, size }, ref) => {
66
+ const child = Children.only(children);
67
+ return cloneElement(child, __spreadProps(__spreadValues({
68
+ ref
69
+ }, child.props), {
70
+ className: clsx2(`${PREFIX_CLS}icon`, { [`${PREFIX_CLS}font-size-${size}`]: size }, child.props.className)
71
+ }));
72
+ });
73
+ var Icon_default = Icon;
74
+
75
+ // src/components/Button/Button.tsx
76
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
77
+ var Button = forwardRef2(
44
78
  (_a, ref) => {
45
79
  var _b = _a, {
46
80
  as: Component = "button",
@@ -50,8 +84,9 @@ var Button = forwardRef(
50
84
  variant = "text",
51
85
  color = "primary",
52
86
  size = "md",
53
- prefix,
54
- suffix,
87
+ iconOnly,
88
+ startContent,
89
+ endContent,
55
90
  loading
56
91
  } = _b, rest = __objRest(_b, [
57
92
  "as",
@@ -61,38 +96,73 @@ var Button = forwardRef(
61
96
  "variant",
62
97
  "color",
63
98
  "size",
64
- "prefix",
65
- "suffix",
99
+ "iconOnly",
100
+ "startContent",
101
+ "endContent",
66
102
  "loading"
67
103
  ]);
68
- return /* @__PURE__ */ jsxs(
104
+ return /* @__PURE__ */ jsxs2(
69
105
  Component,
70
106
  __spreadProps(__spreadValues({
71
107
  ref,
72
- className: clsx(
108
+ className: clsx3(
73
109
  `${PREFIX_CLS}button`,
74
110
  {
75
111
  [`${PREFIX_CLS}button--${variant}`]: variant,
76
112
  [`${PREFIX_CLS}button--${color}`]: color,
77
- [`${PREFIX_CLS}button--${size}`]: size
113
+ [`${PREFIX_CLS}button--${size}`]: size,
114
+ [`${PREFIX_CLS}button--icon-only`]: iconOnly
78
115
  },
79
116
  className
80
117
  ),
81
118
  role
82
119
  }, rest), {
83
120
  children: [
84
- /* @__PURE__ */ jsx("div", { className: `${PREFIX_CLS}overlay` }),
85
- loading ? /* @__PURE__ */ jsx(RiLoader4Line, { className: `${PREFIX_CLS}icon ${PREFIX_CLS}animation-spin` }) : prefix,
86
- /* @__PURE__ */ jsx("div", { className: `${PREFIX_CLS}button__content`, children }),
87
- suffix
121
+ /* @__PURE__ */ jsx2("div", { className: `${PREFIX_CLS}overlay` }),
122
+ /* @__PURE__ */ jsx2("div", { className: `${PREFIX_CLS}outline` }),
123
+ loading ? /* @__PURE__ */ jsx2(Icon_default, { children: /* @__PURE__ */ jsx2(TbLoader2, { className: `${PREFIX_CLS}animation-spin` }) }) : startContent,
124
+ /* @__PURE__ */ jsx2("div", { className: `${PREFIX_CLS}button__content`, children }),
125
+ endContent
88
126
  ]
89
127
  })
90
128
  );
91
129
  }
92
130
  );
93
131
 
132
+ // src/components/Chip/Chip.tsx
133
+ import clsx4 from "clsx";
134
+ import { forwardRef as forwardRef3 } from "react";
135
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
136
+ var Chip = forwardRef3(
137
+ (_a, ref) => {
138
+ var _b = _a, { as: Component = "div", children, className, variant, color, size } = _b, rest = __objRest(_b, ["as", "children", "className", "variant", "color", "size"]);
139
+ return /* @__PURE__ */ jsxs3(
140
+ Component,
141
+ __spreadProps(__spreadValues({
142
+ ref,
143
+ className: clsx4(
144
+ `${PREFIX_CLS}chip`,
145
+ {
146
+ [`${PREFIX_CLS}chip--${variant}`]: variant,
147
+ [`${PREFIX_CLS}chip--${color}`]: color,
148
+ [`${PREFIX_CLS}chip--${size}`]: size
149
+ },
150
+ className
151
+ )
152
+ }, rest), {
153
+ children: [
154
+ /* @__PURE__ */ jsx3("div", { className: clsx4(`${PREFIX_CLS}overlay`) }),
155
+ /* @__PURE__ */ jsx3("div", { className: `${PREFIX_CLS}outline` }),
156
+ children
157
+ ]
158
+ })
159
+ );
160
+ }
161
+ );
162
+ var Chip_default = Chip;
163
+
94
164
  // src/components/Collapse/Collapse.tsx
95
- import { Children, useEffect, useRef, useState } from "react";
165
+ import { Children as Children2, useEffect, useRef, useState } from "react";
96
166
 
97
167
  // src/components/Collapse/CollapseContext.tsx
98
168
  import { createContext, useContext } from "react";
@@ -107,12 +177,12 @@ var useCollapse = () => {
107
177
  var CollapseContext_default = CollapseContext;
108
178
 
109
179
  // src/components/Collapse/Collapse.tsx
110
- import { jsxs as jsxs2 } from "react/jsx-runtime";
180
+ import { jsxs as jsxs4 } from "react/jsx-runtime";
111
181
  var Collapse = ({ children, isOpen, onOpen, onClose, onToggle }) => {
112
182
  const collapseRef = useRef(null);
113
183
  const [selfIsOpen, setSelfIsOpen] = useState(isOpen != null ? isOpen : false);
114
184
  const [heightAuto, setHeightAuto] = useState(false);
115
- const [trigger, content] = Children.toArray(children);
185
+ const [trigger, content] = Children2.toArray(children);
116
186
  const handleOpen = () => {
117
187
  setSelfIsOpen(true);
118
188
  onOpen == null ? void 0 : onOpen();
@@ -137,7 +207,7 @@ var Collapse = ({ children, isOpen, onOpen, onClose, onToggle }) => {
137
207
  }
138
208
  }, 100);
139
209
  }, [isOpen]);
140
- return /* @__PURE__ */ jsxs2(
210
+ return /* @__PURE__ */ jsxs4(
141
211
  CollapseContext_default.Provider,
142
212
  {
143
213
  value: {
@@ -158,13 +228,13 @@ var Collapse = ({ children, isOpen, onOpen, onClose, onToggle }) => {
158
228
  var Collapse_default = Collapse;
159
229
 
160
230
  // src/components/Collapse/CollapseContent.tsx
161
- import clsx2 from "clsx";
162
- import { Children as Children2, cloneElement, forwardRef as forwardRef2 } from "react";
163
- var CollapseContent = forwardRef2(({ children }, ref) => {
231
+ import clsx5 from "clsx";
232
+ import { Children as Children3, cloneElement as cloneElement2, forwardRef as forwardRef4 } from "react";
233
+ var CollapseContent = forwardRef4(({ children }, ref) => {
164
234
  var _a, _b;
165
235
  const { collapseRef, isOpen, heightAuto } = useCollapse();
166
- const child = Children2.only(children);
167
- return cloneElement(child, __spreadProps(__spreadValues({}, child.props), {
236
+ const child = Children3.only(children);
237
+ return cloneElement2(child, __spreadProps(__spreadValues({}, child.props), {
168
238
  ref: (node) => {
169
239
  collapseRef.current = node;
170
240
  if (ref !== null) {
@@ -174,17 +244,17 @@ var CollapseContent = forwardRef2(({ children }, ref) => {
174
244
  style: __spreadProps(__spreadValues({}, child.props.style), {
175
245
  height: isOpen && heightAuto ? "auto" : isOpen ? (_a = collapseRef.current) == null ? void 0 : _a.scrollHeight : !isOpen && heightAuto ? (_b = collapseRef.current) == null ? void 0 : _b.scrollHeight : 0
176
246
  }),
177
- className: clsx2(`${PREFIX_CLS}collapse`, child.props.className)
247
+ className: clsx5(`${PREFIX_CLS}collapse`, child.props.className)
178
248
  }));
179
249
  });
180
250
  var CollapseContent_default = CollapseContent;
181
251
 
182
252
  // src/components/Collapse/CollapseTrigger.tsx
183
- import { Children as Children3, cloneElement as cloneElement2, forwardRef as forwardRef3 } from "react";
184
- var CollapseTrigger = forwardRef3(({ children }, ref) => {
253
+ import { Children as Children4, cloneElement as cloneElement3, forwardRef as forwardRef5 } from "react";
254
+ var CollapseTrigger = forwardRef5(({ children }, ref) => {
185
255
  const { collapseRef, onToggle } = useCollapse();
186
- const child = Children3.only(children);
187
- return cloneElement2(child, __spreadValues({
256
+ const child = Children4.only(children);
257
+ return cloneElement3(child, __spreadValues({
188
258
  ref,
189
259
  onClick: (event) => {
190
260
  var _a, _b;
@@ -199,7 +269,7 @@ var CollapseTrigger = forwardRef3(({ children }, ref) => {
199
269
  var CollapseTrigger_default = CollapseTrigger;
200
270
 
201
271
  // src/components/Menu/Menu.tsx
202
- import clsx6 from "clsx";
272
+ import clsx9 from "clsx";
203
273
  import { useEffect as useEffect3, useMemo as useMemo3, useState as useState2 } from "react";
204
274
 
205
275
  // src/components/Menu/MenuContext.tsx
@@ -215,12 +285,12 @@ var useMenu = () => {
215
285
  var MenuContext_default = MenuContext;
216
286
 
217
287
  // src/components/Menu/MenuGroup.tsx
218
- import clsx5 from "clsx";
288
+ import clsx8 from "clsx";
219
289
  import { useMemo as useMemo2 } from "react";
220
290
 
221
291
  // src/components/Menu/MenuItem.tsx
222
- import clsx3 from "clsx";
223
- import { forwardRef as forwardRef4, useContext as useContext4, useEffect as useEffect2 } from "react";
292
+ import clsx6 from "clsx";
293
+ import { forwardRef as forwardRef6, useContext as useContext4, useEffect as useEffect2 } from "react";
224
294
 
225
295
  // src/components/Menu/MenuValueContext.tsx
226
296
  import { createContext as createContext3, useContext as useContext3 } from "react";
@@ -235,8 +305,8 @@ var useMenuItemValue = () => {
235
305
  var MenuValueContext_default = MenuValueContext;
236
306
 
237
307
  // src/components/Menu/MenuItem.tsx
238
- import { jsx as jsx2, jsxs as jsxs3 } from "react/jsx-runtime";
239
- var MenuItem = forwardRef4((props, ref) => {
308
+ import { jsx as jsx4, jsxs as jsxs5 } from "react/jsx-runtime";
309
+ var MenuItem = forwardRef6((props, ref) => {
240
310
  const _a = props, { as: Component = "div", className, style, value, title, icon, level = 1, disabled, onClick } = _a, rest = __objRest(_a, ["as", "className", "style", "value", "title", "icon", "level", "disabled", "onClick"]);
241
311
  const { value: menuValue, originalValue, openMode, onChange, onOpen, onItemSelect } = useMenu();
242
312
  const values = useContext4(MenuValueContext_default);
@@ -254,11 +324,11 @@ var MenuItem = forwardRef4((props, ref) => {
254
324
  onChange(mergedValues);
255
325
  }
256
326
  }, [value, originalValue, openMode]);
257
- return /* @__PURE__ */ jsxs3(
327
+ return /* @__PURE__ */ jsxs5(
258
328
  Component,
259
329
  __spreadProps(__spreadValues({
260
330
  ref,
261
- className: clsx3(
331
+ className: clsx6(
262
332
  `${PREFIX_CLS}menu-item`,
263
333
  {
264
334
  [`${PREFIX_CLS}menu-item--selected`]: menuValue.includes(value),
@@ -272,9 +342,9 @@ var MenuItem = forwardRef4((props, ref) => {
272
342
  onClick: handleClick
273
343
  }, rest), {
274
344
  children: [
275
- /* @__PURE__ */ jsx2("div", { className: `${PREFIX_CLS}overlay`, children: /* @__PURE__ */ jsx2("div", { className: `${PREFIX_CLS}overlay__surface` }) }),
276
- icon && /* @__PURE__ */ jsx2("div", { className: `${PREFIX_CLS}menu-item__icon`, children: icon }),
277
- /* @__PURE__ */ jsx2("div", { className: `${PREFIX_CLS}menu-item__content`, children: /* @__PURE__ */ jsx2("span", { className: `${PREFIX_CLS}menu-item__title`, children: title }) })
345
+ /* @__PURE__ */ jsx4("div", { className: `${PREFIX_CLS}overlay`, children: /* @__PURE__ */ jsx4("div", { className: `${PREFIX_CLS}overlay__surface` }) }),
346
+ icon && /* @__PURE__ */ jsx4("div", { className: `${PREFIX_CLS}menu-item__icon`, children: icon }),
347
+ /* @__PURE__ */ jsx4("div", { className: `${PREFIX_CLS}menu-item__content`, children: /* @__PURE__ */ jsx4("span", { className: `${PREFIX_CLS}menu-item__title`, children: title }) })
278
348
  ]
279
349
  })
280
350
  );
@@ -283,7 +353,7 @@ MenuItem.displayName = "MenuItem";
283
353
  var MenuItem_default = MenuItem;
284
354
 
285
355
  // src/components/Menu/MenuSubmenu.tsx
286
- import clsx4 from "clsx";
356
+ import clsx7 from "clsx";
287
357
  import { useContext as useContext5, useMemo } from "react";
288
358
  import { MdKeyboardArrowDown, MdKeyboardArrowUp } from "react-icons/md";
289
359
 
@@ -311,7 +381,7 @@ var addOrRemoveValueInArray = (array, value) => {
311
381
  };
312
382
 
313
383
  // src/components/Menu/MenuSubmenu.tsx
314
- import { jsx as jsx3, jsxs as jsxs4 } from "react/jsx-runtime";
384
+ import { jsx as jsx5, jsxs as jsxs6 } from "react/jsx-runtime";
315
385
  var MenuSubmenu = (_a) => {
316
386
  var _b = _a, {
317
387
  children,
@@ -341,7 +411,7 @@ var MenuSubmenu = (_a) => {
341
411
  const content = useMemo(() => {
342
412
  return items == null ? void 0 : items.map((_a2, index) => {
343
413
  var _b2 = _a2, { type } = _b2, item = __objRest(_b2, ["type"]);
344
- return type === "item" ? /* @__PURE__ */ jsx3(MenuItem_default, __spreadValues({ level: level !== void 0 ? level + 1 : void 0 }, item), index) : type === "submenu" ? /* @__PURE__ */ jsx3(MenuSubmenu, __spreadValues({ level: level !== void 0 ? level + 1 : void 0 }, item), index) : type === "group" ? /* @__PURE__ */ jsx3(MenuGroup_default, __spreadValues({ level: level !== void 0 ? level + 1 : void 0 }, item), index) : /* @__PURE__ */ jsx3(MenuItem_default, __spreadValues({ level: level !== void 0 ? level + 1 : void 0 }, item), index);
414
+ return type === "item" ? /* @__PURE__ */ jsx5(MenuItem_default, __spreadValues({ level: level !== void 0 ? level + 1 : void 0 }, item), index) : type === "submenu" ? /* @__PURE__ */ jsx5(MenuSubmenu, __spreadValues({ level: level !== void 0 ? level + 1 : void 0 }, item), index) : type === "group" ? /* @__PURE__ */ jsx5(MenuGroup_default, __spreadValues({ level: level !== void 0 ? level + 1 : void 0 }, item), index) : /* @__PURE__ */ jsx5(MenuItem_default, __spreadValues({ level: level !== void 0 ? level + 1 : void 0 }, item), index);
345
415
  });
346
416
  }, [items]);
347
417
  const handleClick = (event) => {
@@ -359,11 +429,11 @@ var MenuSubmenu = (_a) => {
359
429
  }
360
430
  onClick == null ? void 0 : onClick(event);
361
431
  };
362
- return /* @__PURE__ */ jsx3(MenuValueContext_default.Provider, { value: mergedValues, children: /* @__PURE__ */ jsx3("div", { className: clsx4(`${PREFIX_CLS}menu-submenu`), children: /* @__PURE__ */ jsxs4(Collapse_default, { isOpen, children: [
363
- /* @__PURE__ */ jsx3(CollapseTrigger_default, { children: /* @__PURE__ */ jsxs4(
432
+ return /* @__PURE__ */ jsx5(MenuValueContext_default.Provider, { value: mergedValues, children: /* @__PURE__ */ jsx5("div", { className: clsx7(`${PREFIX_CLS}menu-submenu`), children: /* @__PURE__ */ jsxs6(Collapse_default, { isOpen, children: [
433
+ /* @__PURE__ */ jsx5(CollapseTrigger_default, { children: /* @__PURE__ */ jsxs6(
364
434
  "div",
365
435
  __spreadProps(__spreadValues({
366
- className: clsx4(
436
+ className: clsx7(
367
437
  `${PREFIX_CLS}menu-item`,
368
438
  {
369
439
  [`${PREFIX_CLS}menu-item--selected`]: menuValue.includes(value) || items && mergedValues.includes(menuValue)
@@ -376,17 +446,17 @@ var MenuSubmenu = (_a) => {
376
446
  onClick: handleClick
377
447
  }, rest), {
378
448
  children: [
379
- /* @__PURE__ */ jsx3("div", { className: `${PREFIX_CLS}overlay`, children: /* @__PURE__ */ jsx3("div", { className: `${PREFIX_CLS}overlay__surface` }) }),
380
- icon && /* @__PURE__ */ jsx3("div", { className: `${PREFIX_CLS}menu-item__icon`, children: icon }),
381
- /* @__PURE__ */ jsx3("div", { className: `${PREFIX_CLS}menu-item__content`, children: /* @__PURE__ */ jsx3("span", { className: `${PREFIX_CLS}menu-item__title`, children: title }) }),
382
- /* @__PURE__ */ jsx3("div", { className: `${PREFIX_CLS}menu-item__icon`, children: isOpen ? /* @__PURE__ */ jsx3(MdKeyboardArrowUp, { className: `${PREFIX_CLS}icon` }) : /* @__PURE__ */ jsx3(MdKeyboardArrowDown, { className: `${PREFIX_CLS}icon` }) })
449
+ /* @__PURE__ */ jsx5("div", { className: `${PREFIX_CLS}overlay`, children: /* @__PURE__ */ jsx5("div", { className: `${PREFIX_CLS}overlay__surface` }) }),
450
+ icon && /* @__PURE__ */ jsx5("div", { className: `${PREFIX_CLS}menu-item__icon`, children: icon }),
451
+ /* @__PURE__ */ jsx5("div", { className: `${PREFIX_CLS}menu-item__content`, children: /* @__PURE__ */ jsx5("span", { className: `${PREFIX_CLS}menu-item__title`, children: title }) }),
452
+ /* @__PURE__ */ jsx5("div", { className: `${PREFIX_CLS}menu-item__icon`, children: isOpen ? /* @__PURE__ */ jsx5(MdKeyboardArrowUp, { className: `${PREFIX_CLS}icon` }) : /* @__PURE__ */ jsx5(MdKeyboardArrowDown, { className: `${PREFIX_CLS}icon` }) })
383
453
  ]
384
454
  })
385
455
  ) }),
386
- /* @__PURE__ */ jsx3(CollapseContent_default, { children: /* @__PURE__ */ jsx3(
456
+ /* @__PURE__ */ jsx5(CollapseContent_default, { children: /* @__PURE__ */ jsx5(
387
457
  "ul",
388
458
  {
389
- className: clsx4(`${PREFIX_CLS}menu`, {
459
+ className: clsx7(`${PREFIX_CLS}menu`, {
390
460
  [`${PREFIX_CLS}menu-open`]: !open
391
461
  }),
392
462
  children: content || children
@@ -397,7 +467,7 @@ var MenuSubmenu = (_a) => {
397
467
  var MenuSubmenu_default = MenuSubmenu;
398
468
 
399
469
  // src/components/Menu/MenuGroup.tsx
400
- import { Fragment, jsx as jsx4, jsxs as jsxs5 } from "react/jsx-runtime";
470
+ import { Fragment, jsx as jsx6, jsxs as jsxs7 } from "react/jsx-runtime";
401
471
  var MenuGroup = (_a) => {
402
472
  var _b = _a, {
403
473
  children,
@@ -419,21 +489,21 @@ var MenuGroup = (_a) => {
419
489
  const content = useMemo2(() => {
420
490
  return items == null ? void 0 : items.map((_a2, index) => {
421
491
  var _b2 = _a2, { type } = _b2, item = __objRest(_b2, ["type"]);
422
- return type === "item" ? /* @__PURE__ */ jsx4(MenuItem_default, __spreadValues({}, item), index) : type === "submenu" ? /* @__PURE__ */ jsx4(MenuSubmenu_default, __spreadValues({}, item), index) : /* @__PURE__ */ jsx4(MenuItem_default, __spreadValues({}, item), index);
492
+ return type === "item" ? /* @__PURE__ */ jsx6(MenuItem_default, __spreadValues({}, item), index) : type === "submenu" ? /* @__PURE__ */ jsx6(MenuSubmenu_default, __spreadValues({}, item), index) : /* @__PURE__ */ jsx6(MenuItem_default, __spreadValues({}, item), index);
423
493
  });
424
494
  }, [items]);
425
- return /* @__PURE__ */ jsxs5(Fragment, { children: [
426
- /* @__PURE__ */ jsxs5(
495
+ return /* @__PURE__ */ jsxs7(Fragment, { children: [
496
+ /* @__PURE__ */ jsxs7(
427
497
  "div",
428
498
  __spreadProps(__spreadValues({
429
- className: clsx5(`${PREFIX_CLS}menu-group`, className),
499
+ className: clsx8(`${PREFIX_CLS}menu-group`, className),
430
500
  style: __spreadValues({
431
501
  paddingLeft: level <= 1 ? `var(--${PREFIX_CLS}menu-group-padding-x)` : `calc(${level} * var(--${PREFIX_CLS}menu-group-padding-level))`
432
502
  }, style)
433
503
  }, rest), {
434
504
  children: [
435
- icon && /* @__PURE__ */ jsx4("div", { className: `${PREFIX_CLS}menu-group__icon`, children: icon }),
436
- /* @__PURE__ */ jsx4("div", { className: `${PREFIX_CLS}menu-group__content`, children: /* @__PURE__ */ jsx4("span", { className: `${PREFIX_CLS}menu-group__title`, children: title }) })
505
+ icon && /* @__PURE__ */ jsx6("div", { className: `${PREFIX_CLS}menu-group__icon`, children: icon }),
506
+ /* @__PURE__ */ jsx6("div", { className: `${PREFIX_CLS}menu-group__content`, children: /* @__PURE__ */ jsx6("span", { className: `${PREFIX_CLS}menu-group__title`, children: title }) })
437
507
  ]
438
508
  })
439
509
  ),
@@ -443,7 +513,7 @@ var MenuGroup = (_a) => {
443
513
  var MenuGroup_default = MenuGroup;
444
514
 
445
515
  // src/components/Menu/Menu.tsx
446
- import { jsx as jsx5 } from "react/jsx-runtime";
516
+ import { jsx as jsx7 } from "react/jsx-runtime";
447
517
  var Menu = (_a) => {
448
518
  var _b = _a, {
449
519
  children,
@@ -474,7 +544,7 @@ var Menu = (_a) => {
474
544
  const content = useMemo3(() => {
475
545
  return items == null ? void 0 : items.map((_a3, index) => {
476
546
  var _b2 = _a3, { type } = _b2, item = __objRest(_b2, ["type"]);
477
- return type === "item" ? /* @__PURE__ */ jsx5(MenuItem_default, __spreadValues({}, item), index) : type === "submenu" ? /* @__PURE__ */ jsx5(MenuSubmenu_default, __spreadValues({}, item), index) : type === "group" ? /* @__PURE__ */ jsx5(MenuGroup_default, __spreadValues({}, item), index) : /* @__PURE__ */ jsx5(MenuItem_default, __spreadValues({}, item), index);
547
+ return type === "item" ? /* @__PURE__ */ jsx7(MenuItem_default, __spreadValues({}, item), index) : type === "submenu" ? /* @__PURE__ */ jsx7(MenuSubmenu_default, __spreadValues({}, item), index) : type === "group" ? /* @__PURE__ */ jsx7(MenuGroup_default, __spreadValues({}, item), index) : /* @__PURE__ */ jsx7(MenuItem_default, __spreadValues({}, item), index);
478
548
  });
479
549
  }, [items]);
480
550
  const handleChange = (value) => {
@@ -504,7 +574,7 @@ var Menu = (_a) => {
504
574
  setSelfOpenValues(openValuesProp);
505
575
  }
506
576
  }, [openValuesProp]);
507
- return /* @__PURE__ */ jsx5(
577
+ return /* @__PURE__ */ jsx7(
508
578
  MenuContext_default.Provider,
509
579
  {
510
580
  value: {
@@ -517,7 +587,7 @@ var Menu = (_a) => {
517
587
  onChange: handleChange,
518
588
  onItemSelect: handleItemSelect
519
589
  },
520
- children: /* @__PURE__ */ jsx5("div", __spreadProps(__spreadValues({ className: clsx6(`${PREFIX_CLS}menu`) }, rest), { children: content || children }))
590
+ children: /* @__PURE__ */ jsx7("div", __spreadProps(__spreadValues({ className: clsx9(`${PREFIX_CLS}menu`) }, rest), { children: content || children }))
521
591
  }
522
592
  );
523
593
  };
@@ -525,9 +595,10 @@ Menu.displayName = "Menu";
525
595
  var Menu_default = Menu;
526
596
 
527
597
  // src/components/Tabs/Tab.tsx
528
- import clsx7 from "clsx";
598
+ import clsx10 from "clsx";
529
599
  import mergeRefs from "merge-refs";
530
- import { forwardRef as forwardRef5, useEffect as useEffect4, useRef as useRef2 } from "react";
600
+ import { forwardRef as forwardRef7, useEffect as useEffect4, useRef as useRef2 } from "react";
601
+ import { TbX } from "react-icons/tb";
531
602
 
532
603
  // src/components/Tabs/TabsContext.ts
533
604
  import { createContext as createContext4, useContext as useContext6 } from "react";
@@ -541,12 +612,12 @@ var useTabs = () => {
541
612
  };
542
613
 
543
614
  // src/components/Tabs/Tab.tsx
544
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
545
- var Tab = forwardRef5(
615
+ import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
616
+ var Tab = forwardRef7(
546
617
  (_a, ref) => {
547
- var _b = _a, { as: Component = "div", children, className, role = "presentation", value, onClick } = _b, rest = __objRest(_b, ["as", "children", "className", "role", "value", "onClick"]);
618
+ var _b = _a, { as: Component = "div", children, className, role = "presentation", value, closable, disabled, onClick } = _b, rest = __objRest(_b, ["as", "children", "className", "role", "value", "closable", "disabled", "onClick"]);
548
619
  const tabRef = useRef2(null);
549
- const tabs = useTabs();
620
+ const _a2 = useTabs(), { onClose, registerItem } = _a2, tabs = __objRest(_a2, ["onClose", "registerItem"]);
550
621
  const handleClick = (event) => {
551
622
  const previousTab = tabs.previousTabRef.current;
552
623
  const currentTab = tabRef.current;
@@ -581,23 +652,35 @@ var Tab = forwardRef5(
581
652
  tabs.onChange(value);
582
653
  onClick == null ? void 0 : onClick(event);
583
654
  };
655
+ const handleClose = (event) => {
656
+ event.stopPropagation();
657
+ onClose(value);
658
+ };
584
659
  useEffect4(() => {
660
+ registerItem({ value, disabled });
585
661
  if (value === tabs.value) {
586
662
  tabs.previousTabRef.current = tabRef.current;
587
663
  }
588
- }, []);
589
- return /* @__PURE__ */ jsxs6(
664
+ }, [value, tabs.value]);
665
+ return /* @__PURE__ */ jsxs8(
590
666
  Component,
591
667
  __spreadProps(__spreadValues({
592
- ref: mergeRefs(tabRef, ref),
593
- className: clsx7(`${PREFIX_CLS}tab`, { [`${PREFIX_CLS}tab--selected`]: value === tabs.value }, className),
668
+ ref: mergeRefs(tabRef, ref, (el) => tabs.tabRefs.current[value] = el),
669
+ className: clsx10(
670
+ `${PREFIX_CLS}tab`,
671
+ { [`${PREFIX_CLS}tab--selected`]: value === tabs.value, [`${PREFIX_CLS}tab--disabled`]: disabled },
672
+ className
673
+ ),
594
674
  role,
595
675
  onClick: handleClick
596
676
  }, rest), {
597
677
  children: [
598
- /* @__PURE__ */ jsx6("div", { className: `${PREFIX_CLS}overlay` }),
599
- /* @__PURE__ */ jsx6("div", { className: `${PREFIX_CLS}tab__content`, children }),
600
- /* @__PURE__ */ jsx6("div", { className: `${PREFIX_CLS}tab__indicator` })
678
+ /* @__PURE__ */ jsx8("div", { className: `${PREFIX_CLS}overlay`, children: /* @__PURE__ */ jsx8("div", { className: `${PREFIX_CLS}overlay__surface` }) }),
679
+ /* @__PURE__ */ jsxs8("div", { className: `${PREFIX_CLS}tab__content`, children: [
680
+ children,
681
+ closable && /* @__PURE__ */ jsx8(Button, { variant: "text", color: "secondary", iconOnly: true, size: "xs", onClick: handleClose, children: /* @__PURE__ */ jsx8(Icon_default, { children: /* @__PURE__ */ jsx8(TbX, {}) }) })
682
+ ] }),
683
+ /* @__PURE__ */ jsx8("div", { className: `${PREFIX_CLS}tab__indicator` })
601
684
  ]
602
685
  })
603
686
  );
@@ -605,33 +688,125 @@ var Tab = forwardRef5(
605
688
  );
606
689
 
607
690
  // src/components/Tabs/Tabs.tsx
608
- import clsx8 from "clsx";
609
- import { useEffect as useEffect5, useRef as useRef3, useState as useState3 } from "react";
610
- import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
691
+ import clsx11 from "clsx";
692
+ import { Children as Children5, cloneElement as cloneElement4, isValidElement, useEffect as useEffect5, useRef as useRef3, useState as useState3 } from "react";
693
+
694
+ // src/utils/scroll.ts
695
+ var scrollToItem = (parentElement, currentElement) => {
696
+ const parentRect = parentElement.getBoundingClientRect();
697
+ const currentRect = currentElement.getBoundingClientRect();
698
+ const behavior = "smooth";
699
+ const previousElement = currentElement.previousSibling;
700
+ const previousRect = (previousElement == null ? void 0 : previousElement.getBoundingClientRect()) || currentRect;
701
+ if (parentRect.left > previousRect.left) {
702
+ let offset = 0;
703
+ if (previousElement) {
704
+ offset = previousRect.left - parentRect.left + parentElement.scrollLeft + previousRect.width / 4;
705
+ }
706
+ parentElement.scrollTo({ behavior, left: offset });
707
+ }
708
+ const nextElement = currentElement.nextSibling;
709
+ const nextRect = (nextElement == null ? void 0 : nextElement.getBoundingClientRect()) || currentRect;
710
+ if (parentRect.right < nextRect.right) {
711
+ let offset = parentElement.scrollWidth;
712
+ if (nextElement) {
713
+ offset = nextRect.right - parentRect.right + parentElement.scrollLeft - nextRect.width / 4;
714
+ }
715
+ parentElement.scrollTo({ behavior, left: offset });
716
+ }
717
+ };
718
+
719
+ // src/components/Tabs/Tabs.tsx
720
+ import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
611
721
  var prefixCls = "us-";
612
722
  var Tabs = (_a) => {
613
- var _b = _a, { children, className, value, defaultValue, onChange } = _b, rest = __objRest(_b, ["children", "className", "value", "defaultValue", "onChange"]);
723
+ var _b = _a, {
724
+ children,
725
+ className,
726
+ value,
727
+ defaultValue,
728
+ alignment = "start",
729
+ onChange,
730
+ onClose
731
+ } = _b, rest = __objRest(_b, [
732
+ "children",
733
+ "className",
734
+ "value",
735
+ "defaultValue",
736
+ "alignment",
737
+ "onChange",
738
+ "onClose"
739
+ ]);
740
+ const tabsRef = useRef3(null);
741
+ const tabRefs = useRef3({});
614
742
  const previousTabRef = useRef3(null);
615
743
  const [selfValue, setSelfValue] = useState3(value != null ? value : defaultValue);
744
+ const [items, setItems] = useState3([]);
745
+ const registerItem = (item) => {
746
+ setItems((prevItems) => {
747
+ const index = prevItems.findIndex((item2) => item2.value);
748
+ if (index === -1) {
749
+ prevItems.push(item);
750
+ }
751
+ return prevItems;
752
+ });
753
+ };
754
+ const scrollToTab = (value2) => {
755
+ const tabsEl = tabsRef.current;
756
+ if (!tabsEl)
757
+ return;
758
+ const currentTabEl = tabRefs.current[value2];
759
+ if (!currentTabEl)
760
+ return;
761
+ scrollToItem(tabsEl, currentTabEl);
762
+ };
616
763
  const handleChange = (value2) => {
617
764
  setSelfValue(value2);
618
765
  onChange == null ? void 0 : onChange(value2);
766
+ scrollToTab(value2);
767
+ };
768
+ const handleClose = (value2) => {
769
+ onClose == null ? void 0 : onClose(value2);
619
770
  };
620
771
  useEffect5(() => {
621
772
  if (value !== void 0) {
622
773
  setSelfValue(value);
774
+ scrollToTab(value);
623
775
  }
624
776
  }, [value]);
625
- return /* @__PURE__ */ jsxs7(TabsContext.Provider, { value: { previousTabRef, value: selfValue, onChange: handleChange }, children: [
626
- /* @__PURE__ */ jsx7("div", __spreadProps(__spreadValues({ className: clsx8(`${prefixCls}tabs`, className) }, rest), { children })),
627
- /* @__PURE__ */ jsx7("div", { className: `${prefixCls}divider` })
628
- ] });
777
+ useEffect5(() => {
778
+ if (value === void 0) {
779
+ const item = items.find((tab) => !tab.disabled);
780
+ setSelfValue(item == null ? void 0 : item.value);
781
+ }
782
+ }, [value, items]);
783
+ return /* @__PURE__ */ jsxs9(
784
+ TabsContext.Provider,
785
+ {
786
+ value: { previousTabRef, tabRefs, value: selfValue, onChange: handleChange, onClose: handleClose, registerItem },
787
+ children: [
788
+ /* @__PURE__ */ jsx9(
789
+ "div",
790
+ __spreadProps(__spreadValues({
791
+ ref: tabsRef,
792
+ className: clsx11(`${prefixCls}tabs`, { [`${PREFIX_CLS}tabs--${alignment}`]: alignment }, className)
793
+ }, rest), {
794
+ children: Children5.map(children, (child, index) => {
795
+ var _a2;
796
+ return !isValidElement(child) ? null : cloneElement4(child, __spreadProps(__spreadValues({}, child.props), { value: (_a2 = child.props.value) != null ? _a2 : index }));
797
+ })
798
+ })
799
+ ),
800
+ /* @__PURE__ */ jsx9("div", { className: `${prefixCls}divider` })
801
+ ]
802
+ }
803
+ );
629
804
  };
630
805
 
631
806
  // src/components/DropdownEnumList.tsx
632
807
  import { DropDownList } from "@progress/kendo-react-dropdowns";
633
808
  import { useEffect as useEffect6, useState as useState4 } from "react";
634
- import { Fragment as Fragment2, jsx as jsx8 } from "react/jsx-runtime";
809
+ import { Fragment as Fragment2, jsx as jsx10 } from "react/jsx-runtime";
635
810
  function parsearDataForComboBox(array, key, text, itemAll = false) {
636
811
  const dataForComboBox = [];
637
812
  if (itemAll)
@@ -684,7 +859,7 @@ var DropEnumList = ({ dataEnum, description, onChange, width, defaultValue }) =>
684
859
  onChange(e);
685
860
  setValue(e);
686
861
  };
687
- return /* @__PURE__ */ jsx8(Fragment2, { children: /* @__PURE__ */ jsx8(
862
+ return /* @__PURE__ */ jsx10(Fragment2, { children: /* @__PURE__ */ jsx10(
688
863
  DropDownList,
689
864
  {
690
865
  className: "d-inline-block align-middle mr-2",
@@ -778,7 +953,7 @@ function parseJSON(value) {
778
953
  }
779
954
 
780
955
  // src/contexts/BreadCrumbContext.tsx
781
- import { jsx as jsx9 } from "react/jsx-runtime";
956
+ import { jsx as jsx11 } from "react/jsx-runtime";
782
957
  var BreadCrumbContext = createContext5({});
783
958
  var BreadCrumbContextProvider = ({ children }) => {
784
959
  const [active, setActive] = useLocalStorage("@active", "");
@@ -786,7 +961,7 @@ var BreadCrumbContextProvider = ({ children }) => {
786
961
  const [goBack, setGoBack] = useLocalStorage("@goBack", false);
787
962
  const [pathChild, setPathChild] = useLocalStorage("@pathChild", "");
788
963
  const [routes, setRoutes] = useState6([]);
789
- return /* @__PURE__ */ jsx9(
964
+ return /* @__PURE__ */ jsx11(
790
965
  BreadCrumbContext.Provider,
791
966
  {
792
967
  value: {
@@ -808,16 +983,16 @@ var BreadCrumbContextProvider = ({ children }) => {
808
983
 
809
984
  // src/contexts/DrawerContext.tsx
810
985
  import { createContext as createContext6, useState as useState7 } from "react";
811
- import { jsx as jsx10 } from "react/jsx-runtime";
986
+ import { jsx as jsx12 } from "react/jsx-runtime";
812
987
  var DrawerContext = createContext6({});
813
988
  var DrawerContextProvider = ({ children }) => {
814
989
  const [active, setActive] = useState7(false);
815
- return /* @__PURE__ */ jsx10(DrawerContext.Provider, { value: { active, setActive }, children });
990
+ return /* @__PURE__ */ jsx12(DrawerContext.Provider, { value: { active, setActive }, children });
816
991
  };
817
992
 
818
993
  // src/contexts/HistoryContext.tsx
819
994
  import { createContext as createContext7 } from "react";
820
- import { jsx as jsx11 } from "react/jsx-runtime";
995
+ import { jsx as jsx13 } from "react/jsx-runtime";
821
996
  var HistoryContext = createContext7({});
822
997
  var HistoryContextProvider = ({ children }) => {
823
998
  const [list, setList] = useLocalStorage("@list_paths", []);
@@ -830,22 +1005,22 @@ var HistoryContextProvider = ({ children }) => {
830
1005
  })
831
1006
  );
832
1007
  };
833
- return /* @__PURE__ */ jsx11(HistoryContext.Provider, { value: { list, updateList }, children });
1008
+ return /* @__PURE__ */ jsx13(HistoryContext.Provider, { value: { list, updateList }, children });
834
1009
  };
835
1010
 
836
1011
  // src/contexts/SidebarMainContext.tsx
837
1012
  import { createContext as createContext8, useState as useState8 } from "react";
838
- import { jsx as jsx12 } from "react/jsx-runtime";
1013
+ import { jsx as jsx14 } from "react/jsx-runtime";
839
1014
  var SidebarMainContext = createContext8({});
840
1015
  var SidebarMainContextProvider = ({ children }) => {
841
1016
  const [open2, setOpen] = useState8(true);
842
- return /* @__PURE__ */ jsx12(SidebarMainContext.Provider, { value: { open: open2, setOpen }, children });
1017
+ return /* @__PURE__ */ jsx14(SidebarMainContext.Provider, { value: { open: open2, setOpen }, children });
843
1018
  };
844
1019
 
845
1020
  // src/contexts/GlobalProvider.tsx
846
- import { jsx as jsx13 } from "react/jsx-runtime";
1021
+ import { jsx as jsx15 } from "react/jsx-runtime";
847
1022
  function GlobalProvider({ children }) {
848
- return /* @__PURE__ */ jsx13(HistoryContextProvider, { children: /* @__PURE__ */ jsx13(BreadCrumbContextProvider, { children: /* @__PURE__ */ jsx13(SidebarMainContextProvider, { children: /* @__PURE__ */ jsx13(DrawerContextProvider, { children }) }) }) });
1023
+ return /* @__PURE__ */ jsx15(HistoryContextProvider, { children: /* @__PURE__ */ jsx15(BreadCrumbContextProvider, { children: /* @__PURE__ */ jsx15(SidebarMainContextProvider, { children: /* @__PURE__ */ jsx15(DrawerContextProvider, { children }) }) }) });
849
1024
  }
850
1025
 
851
1026
  // src/hooks/usePrevious.tsx
@@ -1327,7 +1502,7 @@ var CloseIcon = styled6.button`
1327
1502
  `;
1328
1503
 
1329
1504
  // src/layout/AppBreadcrumb.tsx
1330
- import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
1505
+ import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
1331
1506
  var AppBreadCrumb = ({ title, paths }) => {
1332
1507
  const { setRoutes } = useContext7(BreadCrumbContext);
1333
1508
  useEffect10(() => {
@@ -1335,7 +1510,7 @@ var AppBreadCrumb = ({ title, paths }) => {
1335
1510
  return;
1336
1511
  setRoutes(paths != null ? paths : []);
1337
1512
  }, []);
1338
- return /* @__PURE__ */ jsx14(BreadCrumbTitle, { children: title != null ? title : "Home" });
1513
+ return /* @__PURE__ */ jsx16(BreadCrumbTitle, { children: title != null ? title : "Home" });
1339
1514
  };
1340
1515
  var AppBreadCrumbNav = ({
1341
1516
  paths,
@@ -1349,26 +1524,26 @@ var AppBreadCrumbNav = ({
1349
1524
  useEffect10(() => {
1350
1525
  setRoutes(paths != null ? paths : []);
1351
1526
  }, [paths]);
1352
- return /* @__PURE__ */ jsxs8(Breadcrumb, { children: [
1353
- /* @__PURE__ */ jsxs8("div", { className: "d-flex align-items-center", children: [
1354
- /* @__PURE__ */ jsx14(Link3, { to: "/", className: "link", children: "HOME" }),
1355
- routes.length > 0 && /* @__PURE__ */ jsx14(VscChevronRight, { color: "black" }),
1527
+ return /* @__PURE__ */ jsxs10(Breadcrumb, { children: [
1528
+ /* @__PURE__ */ jsxs10("div", { className: "d-flex align-items-center", children: [
1529
+ /* @__PURE__ */ jsx16(Link3, { to: "/", className: "link", children: "HOME" }),
1530
+ routes.length > 0 && /* @__PURE__ */ jsx16(VscChevronRight, { color: "black" }),
1356
1531
  routes.length > 0 ? routes.map((i, idx, arr) => {
1357
1532
  if (i.route === -1) {
1358
- return /* @__PURE__ */ jsxs8("span", { className: "link", onClick: () => onPush(-1), children: [
1533
+ return /* @__PURE__ */ jsxs10("span", { className: "link", onClick: () => onPush(-1), children: [
1359
1534
  i.title,
1360
1535
  " ",
1361
- idx + 1 === arr.length ? "" : /* @__PURE__ */ jsx14(VscChevronRight, { color: "black" })
1536
+ idx + 1 === arr.length ? "" : /* @__PURE__ */ jsx16(VscChevronRight, { color: "black" })
1362
1537
  ] }, idx);
1363
1538
  }
1364
- return /* @__PURE__ */ jsxs8(Link3, { to: i.route, className: "link", children: [
1539
+ return /* @__PURE__ */ jsxs10(Link3, { to: i.route, className: "link", children: [
1365
1540
  i.title,
1366
1541
  " ",
1367
- idx + 1 === arr.length ? "" : /* @__PURE__ */ jsx14(VscChevronRight, { color: "black" })
1542
+ idx + 1 === arr.length ? "" : /* @__PURE__ */ jsx16(VscChevronRight, { color: "black" })
1368
1543
  ] }, idx);
1369
1544
  }) : ""
1370
1545
  ] }),
1371
- /* @__PURE__ */ jsx14(
1546
+ /* @__PURE__ */ jsx16(
1372
1547
  CloseIcon,
1373
1548
  {
1374
1549
  onClick: () => {
@@ -1379,7 +1554,7 @@ var AppBreadCrumbNav = ({
1379
1554
  }
1380
1555
  onPush(`${routes && routes[(routes == null ? void 0 : routes.length) - 2].route}`);
1381
1556
  },
1382
- children: /* @__PURE__ */ jsx14(MdClose, { fontSize: 20 })
1557
+ children: /* @__PURE__ */ jsx16(MdClose, { fontSize: 20 })
1383
1558
  }
1384
1559
  )
1385
1560
  ] });
@@ -1388,12 +1563,12 @@ var AppBreadCrumbNav = ({
1388
1563
  // src/layout/AppLoader.tsx
1389
1564
  import { useEffect as useEffect11 } from "react";
1390
1565
  import ReactDOM from "react-dom";
1391
- import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
1566
+ import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
1392
1567
  var LoaderGrid = () => {
1393
- const Loader = /* @__PURE__ */ jsxs9("div", { className: "k-loading-mask", children: [
1394
- /* @__PURE__ */ jsx15("span", { className: "k-loading-text", children: "Loading" }),
1395
- /* @__PURE__ */ jsx15("div", { className: "k-loading-image" }),
1396
- /* @__PURE__ */ jsx15("div", { className: "k-loading-color" })
1568
+ const Loader = /* @__PURE__ */ jsxs11("div", { className: "k-loading-mask", children: [
1569
+ /* @__PURE__ */ jsx17("span", { className: "k-loading-text", children: "Loading" }),
1570
+ /* @__PURE__ */ jsx17("div", { className: "k-loading-image" }),
1571
+ /* @__PURE__ */ jsx17("div", { className: "k-loading-color" })
1397
1572
  ] });
1398
1573
  const gridContent = document && document.querySelector(".k-grid-content");
1399
1574
  const reportContent = document && document.querySelector(".loading-report");
@@ -1402,10 +1577,10 @@ var LoaderGrid = () => {
1402
1577
  var AppLoader = (props) => {
1403
1578
  const { type = "grid", parent, minDuration } = props;
1404
1579
  const parentEl = type === "grid" ? document.querySelector(parent != null ? parent : ".k-grid-container") : parent ? document.querySelector(parent) : null;
1405
- const Loading = /* @__PURE__ */ jsxs9("div", { className: `${type}-loading k-loading-mask`, children: [
1406
- /* @__PURE__ */ jsx15("span", { className: "k-loading-text", children: "Loading" }),
1407
- /* @__PURE__ */ jsx15("div", { className: "k-loading-image" }),
1408
- /* @__PURE__ */ jsx15("div", { className: "k-loading-color" })
1580
+ const Loading = /* @__PURE__ */ jsxs11("div", { className: `${type}-loading k-loading-mask`, children: [
1581
+ /* @__PURE__ */ jsx17("span", { className: "k-loading-text", children: "Loading" }),
1582
+ /* @__PURE__ */ jsx17("div", { className: "k-loading-image" }),
1583
+ /* @__PURE__ */ jsx17("div", { className: "k-loading-color" })
1409
1584
  ] });
1410
1585
  useEffect11(() => {
1411
1586
  if (type === "button") {
@@ -1446,7 +1621,7 @@ var AppLoader = (props) => {
1446
1621
  import { Dropdown } from "react-bootstrap";
1447
1622
  import { BsArrowsFullscreen } from "react-icons/bs";
1448
1623
  import { FiCheckCircle, FiFilter, FiPlusSquare, FiRefreshCcw, FiSave } from "react-icons/fi";
1449
- import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
1624
+ import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
1450
1625
  var NavOptions = ({
1451
1626
  exportExcel,
1452
1627
  customButtons,
@@ -1456,27 +1631,27 @@ var NavOptions = ({
1456
1631
  onClear,
1457
1632
  onExpandScreen
1458
1633
  }) => {
1459
- return /* @__PURE__ */ jsxs10(MenuOptions, { children: [
1460
- onCreate && /* @__PURE__ */ jsxs10("button", { className: "button-option", onClick: onCreate, children: [
1461
- /* @__PURE__ */ jsx16(FiPlusSquare, { className: "icon" }),
1634
+ return /* @__PURE__ */ jsxs12(MenuOptions, { children: [
1635
+ onCreate && /* @__PURE__ */ jsxs12("button", { className: "button-option", onClick: onCreate, children: [
1636
+ /* @__PURE__ */ jsx18(FiPlusSquare, { className: "icon" }),
1462
1637
  " ",
1463
- /* @__PURE__ */ jsx16("span", { className: "text", children: "New" })
1638
+ /* @__PURE__ */ jsx18("span", { className: "text", children: "New" })
1464
1639
  ] }),
1465
- onRefresh && /* @__PURE__ */ jsxs10("button", { className: "button-option", onClick: onRefresh, children: [
1466
- /* @__PURE__ */ jsx16(FiRefreshCcw, { className: "icon" }),
1640
+ onRefresh && /* @__PURE__ */ jsxs12("button", { className: "button-option", onClick: onRefresh, children: [
1641
+ /* @__PURE__ */ jsx18(FiRefreshCcw, { className: "icon" }),
1467
1642
  " ",
1468
- /* @__PURE__ */ jsx16("span", { className: "text", children: "Refresh" })
1643
+ /* @__PURE__ */ jsx18("span", { className: "text", children: "Refresh" })
1469
1644
  ] }),
1470
- exportExcel && exportExcel.length > 0 && /* @__PURE__ */ jsxs10(Dropdown, { className: "button-option", children: [
1471
- /* @__PURE__ */ jsxs10(
1645
+ exportExcel && exportExcel.length > 0 && /* @__PURE__ */ jsxs12(Dropdown, { className: "button-option", children: [
1646
+ /* @__PURE__ */ jsxs12(
1472
1647
  Dropdown.Toggle,
1473
1648
  {
1474
1649
  id: "btnExport",
1475
1650
  className: "p-2 bg-light text-dark border-0 font-weight-bold",
1476
1651
  title: "Export to Excel",
1477
1652
  children: [
1478
- /* @__PURE__ */ jsx16(FiSave, { className: "icon" }),
1479
- /* @__PURE__ */ jsx16(
1653
+ /* @__PURE__ */ jsx18(FiSave, { className: "icon" }),
1654
+ /* @__PURE__ */ jsx18(
1480
1655
  "span",
1481
1656
  {
1482
1657
  style: {
@@ -1490,55 +1665,57 @@ var NavOptions = ({
1490
1665
  ]
1491
1666
  }
1492
1667
  ),
1493
- /* @__PURE__ */ jsx16(Dropdown.Menu, { children: exportExcel.map((item, index) => {
1494
- return /* @__PURE__ */ jsxs10(Dropdown.Item, { onClick: item.onAction, children: [
1495
- /* @__PURE__ */ jsx16("i", { className: `${item.classNameIcon} mr-2` }),
1668
+ /* @__PURE__ */ jsx18(Dropdown.Menu, { children: exportExcel.map((item, index) => {
1669
+ return /* @__PURE__ */ jsxs12(Dropdown.Item, { onClick: item.onAction, children: [
1670
+ /* @__PURE__ */ jsx18("i", { className: `${item.classNameIcon} mr-2` }),
1496
1671
  " ",
1497
1672
  item.title
1498
1673
  ] }, index);
1499
1674
  }) })
1500
1675
  ] }),
1501
- onSelect && /* @__PURE__ */ jsxs10("button", { className: "button-option", onClick: onSelect, children: [
1502
- /* @__PURE__ */ jsx16(FiCheckCircle, { className: "icon" }),
1676
+ onSelect && /* @__PURE__ */ jsxs12("button", { className: "button-option", onClick: onSelect, children: [
1677
+ /* @__PURE__ */ jsx18(FiCheckCircle, { className: "icon" }),
1503
1678
  " ",
1504
- /* @__PURE__ */ jsx16("span", { className: "text", children: "Select All" })
1679
+ /* @__PURE__ */ jsx18("span", { className: "text", children: "Select All" })
1505
1680
  ] }),
1506
- onClear && /* @__PURE__ */ jsxs10("button", { className: "button-option", onClick: onClear, children: [
1507
- /* @__PURE__ */ jsx16(FiFilter, { className: "icon" }),
1681
+ onClear && /* @__PURE__ */ jsxs12("button", { className: "button-option", onClick: onClear, children: [
1682
+ /* @__PURE__ */ jsx18(FiFilter, { className: "icon" }),
1508
1683
  " ",
1509
- /* @__PURE__ */ jsx16("span", { className: "text", children: "Clear Filters" })
1684
+ /* @__PURE__ */ jsx18("span", { className: "text", children: "Clear Filters" })
1510
1685
  ] }),
1511
- onExpandScreen && /* @__PURE__ */ jsxs10("button", { className: "button-option", onClick: onExpandScreen, children: [
1512
- /* @__PURE__ */ jsx16(BsArrowsFullscreen, { className: "icon" }),
1686
+ onExpandScreen && /* @__PURE__ */ jsxs12("button", { className: "button-option", onClick: onExpandScreen, children: [
1687
+ /* @__PURE__ */ jsx18(BsArrowsFullscreen, { className: "icon" }),
1513
1688
  " ",
1514
- /* @__PURE__ */ jsx16("span", { className: "text", children: "Full Page" })
1689
+ /* @__PURE__ */ jsx18("span", { className: "text", children: "Full Page" })
1515
1690
  ] }),
1516
1691
  customButtons == null ? void 0 : customButtons.map((custom, index) => {
1517
1692
  if (custom.render) {
1518
1693
  return custom.render;
1519
1694
  }
1520
- return /* @__PURE__ */ jsxs10("button", { className: "button-option", onClick: custom.onAction, children: [
1521
- custom.Icon !== void 0 && /* @__PURE__ */ jsx16(custom.Icon, { className: "icon" }),
1522
- /* @__PURE__ */ jsx16("span", { className: "text", children: custom.title })
1695
+ return /* @__PURE__ */ jsxs12("button", { className: "button-option", onClick: custom.onAction, children: [
1696
+ custom.Icon !== void 0 && /* @__PURE__ */ jsx18(custom.Icon, { className: "icon" }),
1697
+ /* @__PURE__ */ jsx18("span", { className: "text", children: custom.title })
1523
1698
  ] }, index);
1524
1699
  })
1525
1700
  ] });
1526
1701
  };
1527
1702
 
1528
1703
  // src/layout/title.tsx
1529
- import { jsx as jsx17 } from "react/jsx-runtime";
1704
+ import { jsx as jsx19 } from "react/jsx-runtime";
1530
1705
  var Title = ({ title }) => {
1531
- return /* @__PURE__ */ jsx17(TitlePage, { children: title != null ? title : "Home" });
1706
+ return /* @__PURE__ */ jsx19(TitlePage, { children: title != null ? title : "Home" });
1532
1707
  };
1533
1708
  export {
1534
1709
  AppBreadCrumb,
1535
1710
  AppBreadCrumbNav,
1536
1711
  AppLoader,
1712
+ Badge_default as Badge,
1537
1713
  BreadCrumbContext,
1538
1714
  BreadCrumbContextProvider,
1539
1715
  BreadCrumbTitle,
1540
1716
  Breadcrumb,
1541
1717
  Button,
1718
+ Chip_default as Chip,
1542
1719
  CloseIcon,
1543
1720
  Collapse_default as Collapse,
1544
1721
  CollapseContent_default as CollapseContent,