@apexcura/ui-components 0.0.15-Beta21 → 0.0.15-Beta23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -106,7 +106,7 @@ declare const ButtonElement: (props: ElementType) => React$1.JSX.Element;
106
106
 
107
107
  declare const AddMoreTable: (props: ElementType) => React$1.JSX.Element;
108
108
 
109
- declare const Sidebar: React$1.FC;
109
+ declare const Sidebar: (props: ElementType) => React$1.JSX.Element;
110
110
 
111
111
  declare const Navbar: (props: ElementType) => React$1.JSX.Element;
112
112
 
package/dist/index.d.ts CHANGED
@@ -106,7 +106,7 @@ declare const ButtonElement: (props: ElementType) => React$1.JSX.Element;
106
106
 
107
107
  declare const AddMoreTable: (props: ElementType) => React$1.JSX.Element;
108
108
 
109
- declare const Sidebar: React$1.FC;
109
+ declare const Sidebar: (props: ElementType) => React$1.JSX.Element;
110
110
 
111
111
  declare const Navbar: (props: ElementType) => React$1.JSX.Element;
112
112
 
package/dist/index.js CHANGED
@@ -91973,7 +91973,25 @@ var AddMoreTable = (props) => {
91973
91973
  // src/Components/Sidebar.tsx
91974
91974
  var import_react145 = __toESM(require_react());
91975
91975
  var Sidebar = (props) => {
91976
- return /* @__PURE__ */ import_react145.default.createElement("div", { id: "nav-bar" }, /* @__PURE__ */ import_react145.default.createElement("input", { type: "checkbox", id: "nav-toggle" }), /* @__PURE__ */ import_react145.default.createElement("div", { id: "nav-header" }, /* @__PURE__ */ import_react145.default.createElement("img", { src: props.img, alt: "logo", className: props.iconsClassName }), /* @__PURE__ */ import_react145.default.createElement("label", { htmlFor: "nav-toggle" }, /* @__PURE__ */ import_react145.default.createElement("span", { id: "nav-toggle-burger" })), /* @__PURE__ */ import_react145.default.createElement("hr", null)), /* @__PURE__ */ import_react145.default.createElement("div", { id: "nav-content" }, props.items && props.items.map((eachItem) => /* @__PURE__ */ import_react145.default.createElement("div", { className: "nav-button", key: eachItem.label }, icons[eachItem.icon], /* @__PURE__ */ import_react145.default.createElement("span", null, eachItem.label))), /* @__PURE__ */ import_react145.default.createElement("div", { id: "nav-content-highlight" })));
91976
+ const handleChange = (item) => {
91977
+ if (props.onChange) {
91978
+ props.onChange(item);
91979
+ }
91980
+ };
91981
+ return /* @__PURE__ */ import_react145.default.createElement(import_react145.default.Fragment, { key: props.name }, /* @__PURE__ */ import_react145.default.createElement("div", { className: props.imgClassName }, /* @__PURE__ */ import_react145.default.createElement("img", { src: props.img, alt: "logo" })), /* @__PURE__ */ import_react145.default.createElement("div", { className: props.listClassName }, _optionalChain([props, 'access', _30 => _30.items, 'optionalAccess', _31 => _31.map, 'call', _32 => _32((item) => {
91982
+ return /* @__PURE__ */ import_react145.default.createElement(import_react145.default.Fragment, { key: item.label }, /* @__PURE__ */ import_react145.default.createElement(
91983
+ ButtonElement,
91984
+ {
91985
+ ...item,
91986
+ className: item.active ? props.activeClassName : props.className,
91987
+ iconsClassName: props.iconsClassName,
91988
+ onClick: (e) => {
91989
+ e.preventDefault();
91990
+ handleChange(item);
91991
+ }
91992
+ }
91993
+ ));
91994
+ })])));
91977
91995
  };
91978
91996
 
91979
91997
  // src/Components/Navbar.tsx
@@ -92245,36 +92263,36 @@ var DropDownGroup = (props) => {
92245
92263
  });
92246
92264
  const handleFirstChange = (value) => {
92247
92265
  console.log(selectedValue.temp);
92248
- const filterOption2 = _optionalChain([props, 'access', _30 => _30.firstOptions, 'optionalAccess', _31 => _31.find, 'call', _32 => _32(
92266
+ const filterOption2 = _optionalChain([props, 'access', _33 => _33.firstOptions, 'optionalAccess', _34 => _34.find, 'call', _35 => _35(
92249
92267
  (eachOption) => eachOption.value === value
92250
92268
  )]);
92251
92269
  setSelectedValue((prev2) => {
92252
92270
  const newValue = { ...prev2, firstValue: filterOption2 };
92253
92271
  const { temp, ...rest } = newValue;
92254
92272
  if (newValue.firstValue) {
92255
- _optionalChain([props, 'access', _33 => _33.onChange, 'optionalCall', _34 => _34(rest)]);
92273
+ _optionalChain([props, 'access', _36 => _36.onChange, 'optionalCall', _37 => _37(rest)]);
92256
92274
  }
92257
92275
  return newValue;
92258
92276
  });
92259
92277
  };
92260
92278
  const handleSecondChange = (value) => {
92261
- const filterOption2 = _optionalChain([props, 'access', _35 => _35.secondOptions, 'optionalAccess', _36 => _36.find, 'call', _37 => _37(
92279
+ const filterOption2 = _optionalChain([props, 'access', _38 => _38.secondOptions, 'optionalAccess', _39 => _39.find, 'call', _40 => _40(
92262
92280
  (eachOption) => eachOption.value === value
92263
92281
  )]);
92264
92282
  setSelectedValue((prev2) => {
92265
92283
  const newValue = { ...prev2, secondValue: filterOption2 };
92266
92284
  const { temp, ...rest } = newValue;
92267
92285
  if (newValue.secondValue) {
92268
- _optionalChain([props, 'access', _38 => _38.onChange, 'optionalCall', _39 => _39(rest)]);
92286
+ _optionalChain([props, 'access', _41 => _41.onChange, 'optionalCall', _42 => _42(rest)]);
92269
92287
  }
92270
92288
  return newValue;
92271
92289
  });
92272
92290
  };
92273
92291
  const firstFilterOptions = (input, option) => {
92274
- return (_nullishCoalesce(_optionalChain([option, 'optionalAccess', _40 => _40.label]), () => ( ""))).toLowerCase().includes(input.toLowerCase());
92292
+ return (_nullishCoalesce(_optionalChain([option, 'optionalAccess', _43 => _43.label]), () => ( ""))).toLowerCase().includes(input.toLowerCase());
92275
92293
  };
92276
92294
  const secondFilterOptions = (input, option) => {
92277
- return (_nullishCoalesce(_optionalChain([option, 'optionalAccess', _41 => _41.label]), () => ( ""))).toLowerCase().includes(input.toLowerCase());
92295
+ return (_nullishCoalesce(_optionalChain([option, 'optionalAccess', _44 => _44.label]), () => ( ""))).toLowerCase().includes(input.toLowerCase());
92278
92296
  };
92279
92297
  return /* @__PURE__ */ import_react155.default.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ import_react155.default.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ import_react155.default.createElement("div", { className: props.subContainerClassName }, /* @__PURE__ */ import_react155.default.createElement(
92280
92298
  select_default,
@@ -92343,7 +92361,7 @@ var import_react157 = __toESM(require_react());
92343
92361
  var TabsElement = (props) => {
92344
92362
  const handleChange = (key) => {
92345
92363
  if (props.onChange) {
92346
- props.onChange(_optionalChain([props, 'access', _42 => _42.options, 'optionalAccess', _43 => _43.find, 'call', _44 => _44((eachOption) => eachOption.key === key)]));
92364
+ props.onChange(_optionalChain([props, 'access', _45 => _45.options, 'optionalAccess', _46 => _46.find, 'call', _47 => _47((eachOption) => eachOption.key === key)]));
92347
92365
  }
92348
92366
  };
92349
92367
  return /* @__PURE__ */ import_react157.default.createElement(tabs_default, { className: props.containerClassName, items: props.options, onChange: handleChange });
@@ -92397,13 +92415,13 @@ var OtpElement = (props) => {
92397
92415
  setOtp(newOtp);
92398
92416
  props.onChange && props.onChange(newOtp.join(""));
92399
92417
  if (value && index3 < length2 - 1) {
92400
- _optionalChain([inputRefs, 'access', _45 => _45.current, 'access', _46 => _46[index3 + 1], 'optionalAccess', _47 => _47.focus, 'call', _48 => _48()]);
92418
+ _optionalChain([inputRefs, 'access', _48 => _48.current, 'access', _49 => _49[index3 + 1], 'optionalAccess', _50 => _50.focus, 'call', _51 => _51()]);
92401
92419
  }
92402
92420
  }
92403
92421
  };
92404
92422
  const handleKeyDown = (e, index3) => {
92405
92423
  if (e.key === "Backspace" && !otp[index3] && index3 > 0) {
92406
- _optionalChain([inputRefs, 'access', _49 => _49.current, 'access', _50 => _50[index3 - 1], 'optionalAccess', _51 => _51.focus, 'call', _52 => _52()]);
92424
+ _optionalChain([inputRefs, 'access', _52 => _52.current, 'access', _53 => _53[index3 - 1], 'optionalAccess', _54 => _54.focus, 'call', _55 => _55()]);
92407
92425
  }
92408
92426
  };
92409
92427
  const handlePaste = (e) => {
@@ -92415,13 +92433,13 @@ var OtpElement = (props) => {
92415
92433
  props.onChange && props.onChange(newOtp.join(""));
92416
92434
  newOtp.forEach((_, idx) => {
92417
92435
  if (inputRefs.current[idx]) {
92418
- _optionalChain([inputRefs, 'access', _53 => _53.current, 'access', _54 => _54[idx], 'optionalAccess', _55 => _55.focus, 'call', _56 => _56()]);
92436
+ _optionalChain([inputRefs, 'access', _56 => _56.current, 'access', _57 => _57[idx], 'optionalAccess', _58 => _58.focus, 'call', _59 => _59()]);
92419
92437
  }
92420
92438
  });
92421
92439
  }
92422
92440
  };
92423
92441
  (0, import_react160.useEffect)(() => {
92424
- _optionalChain([inputRefs, 'access', _57 => _57.current, 'access', _58 => _58[0], 'optionalAccess', _59 => _59.focus, 'call', _60 => _60()]);
92442
+ _optionalChain([inputRefs, 'access', _60 => _60.current, 'access', _61 => _61[0], 'optionalAccess', _62 => _62.focus, 'call', _63 => _63()]);
92425
92443
  }, []);
92426
92444
  return /* @__PURE__ */ import_react160.default.createElement("div", { className: props.containerClassName }, Array.from({ length: length2 }).map((_, index3) => /* @__PURE__ */ import_react160.default.createElement(
92427
92445
  input_default,