nexaas-ui-components 1.0.65 → 1.0.67

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
@@ -148,27 +148,33 @@ var variants = {
148
148
  var paddingConfig = {
149
149
  xxs: {
150
150
  normal: "",
151
- icon: ""
151
+ icon: "",
152
+ iconOnly: ""
152
153
  },
153
154
  xxsm: {
154
155
  normal: "p-[5px]",
155
- icon: "p-[5px]"
156
+ icon: "p-[5px]",
157
+ iconOnly: "p-[5px]"
156
158
  },
157
159
  xs: {
158
160
  normal: "p-2",
159
- icon: "p-2"
161
+ icon: "p-2",
162
+ iconOnly: "p-2"
160
163
  },
161
164
  sm: {
162
165
  normal: "px-3 py-[6px]",
163
- icon: "py-[6px] pl-2 pr-3"
166
+ icon: "py-[6px] pl-2 pr-3",
167
+ iconOnly: "p-[6px]"
164
168
  },
165
169
  md: {
166
170
  normal: "py-2 px-4",
167
- icon: "py-2 pl-3 pr-4"
171
+ icon: "py-2 pl-3 pr-4",
172
+ iconOnly: "p-2"
168
173
  },
169
174
  lg: {
170
175
  normal: "py-3 px-4",
171
- icon: "p-3 pr-4"
176
+ icon: "p-3 pr-4",
177
+ iconOnly: "p-3"
172
178
  }
173
179
  };
174
180
  var Button = ({
@@ -181,7 +187,7 @@ var Button = ({
181
187
  const applyGap = props.icon && props.children;
182
188
  const appliedVariant = variants[variant].text;
183
189
  const appliedSize = sizes[size];
184
- const appliedPadding = props.icon ? paddingConfig[size].icon : paddingConfig[size].normal;
190
+ const appliedPadding = props.icon ? props.children ? paddingConfig[size].icon : paddingConfig[size].iconOnly : paddingConfig[size].normal;
185
191
  const gapText = applyGap ? "gap-[6px]" : "gap-0";
186
192
  React5.useEffect(() => {
187
193
  if (!hotkey || !props.onClick) return;
@@ -212,7 +218,8 @@ var Button = ({
212
218
  {
213
219
  className: clsx9__default.default("inline-flex gap-[8px]", {
214
220
  "flex-col items-center": hotkeyPosition === "top" || hotkeyPosition === "bottom",
215
- "flex-row items-center": hotkeyPosition === "left" || hotkeyPosition === "right"
221
+ "flex-row items-center": hotkeyPosition === "left" || hotkeyPosition === "right",
222
+ "cursor-not-allowed": props.disabled || props.loading
216
223
  }),
217
224
  children: [
218
225
  hotkey && (hotkeyPosition === "top" || hotkeyPosition === "left") && /* @__PURE__ */ jsxRuntime.jsx(
@@ -236,7 +243,7 @@ var Button = ({
236
243
  ${appliedSize.text}
237
244
  ${appliedPadding}
238
245
  ${gapText}
239
- whitespace-nowrap group rounded-lg font-bold disabled:shadow-none active:shadow-none flex items-center
246
+ whitespace-nowrap group rounded-lg font-bold disabled:shadow-none active:shadow-none flex items-center disabled:pointer-events-none
240
247
  `,
241
248
  children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
242
249
  props.icon && /* @__PURE__ */ jsxRuntime.jsx(
@@ -569,7 +576,7 @@ var Input = ({
569
576
  {
570
577
  onClick: () => setShowPassword(!showPassword),
571
578
  className: clsx9__default.default(
572
- " text-label cursor-pointer text-[20px] absolute right-2 top-[11px]",
579
+ "uil text-label cursor-pointer text-[20px] absolute right-2 top-1/2 -translate-y-1/2",
573
580
  {
574
581
  "uil-eye-slash": showPassword,
575
582
  "uil-eye": !showPassword
@@ -2660,23 +2667,33 @@ var ModalDialog = ({
2660
2667
  shouldCloseOnEsc: closeOnOverlayClick,
2661
2668
  style: customStyles6,
2662
2669
  contentLabel: "Example Modal",
2663
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx9__default.default(sizes3[size]), children: [
2664
- showHeader && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pb-[6px] border-b border-b-neutral-200 flex items-center justify-between", children: [
2665
- /* @__PURE__ */ jsxRuntime.jsxs("h3", { className: "text-[24px] font-bold flex items-center gap-2", children: [
2666
- alertType && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx9__default.default([alertTypes[alertType]], "text-[30px]"), children: icon }),
2670
+ closeTimeoutMS: 200,
2671
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx9__default.default("modal-inner", sizes3[size]), children: [
2672
+ showHeader && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-b-neutral-200 flex items-center justify-between ", children: [
2673
+ /* @__PURE__ */ jsxRuntime.jsxs("h3", { className: "font-title text-t-sm font-bold flex items-center gap-2", children: [
2674
+ alertType && /* @__PURE__ */ jsxRuntime.jsx(
2675
+ "div",
2676
+ {
2677
+ className: clsx9__default.default(
2678
+ alertTypes[alertType],
2679
+ "w-[26px] h-[26px] text-[26px] flex items-center justify-center shrink-0"
2680
+ ),
2681
+ children: icon
2682
+ }
2683
+ ),
2667
2684
  title
2668
2685
  ] }),
2669
- /* @__PURE__ */ jsxRuntime.jsx(
2686
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline", children: /* @__PURE__ */ jsxRuntime.jsx(
2670
2687
  Button,
2671
2688
  {
2672
2689
  onClick: onCancel,
2673
2690
  variant: "ghost",
2674
- size: "xs",
2675
- icon: /* @__PURE__ */ jsxRuntime.jsx("i", { className: "uil uil-times" })
2691
+ size: "md",
2692
+ icon: /* @__PURE__ */ jsxRuntime.jsx("i", { className: "uil uil-times text-neutral-400" })
2676
2693
  }
2677
- )
2694
+ ) })
2678
2695
  ] }),
2679
- /* @__PURE__ */ jsxRuntime.jsx("div", { children }),
2696
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4", children }),
2680
2697
  showFooter && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-6 flex w-full items-center justify-between", children: [
2681
2698
  /* @__PURE__ */ jsxRuntime.jsx(
2682
2699
  "div",
@@ -6600,54 +6617,55 @@ var SkeletonRegister = ({ loading, ...props }) => {
6600
6617
  };
6601
6618
  var variants5 = {
6602
6619
  success: {
6603
- small: "bg-success-600",
6604
- big: "bg-success-100"
6620
+ small: "bg-success-500",
6621
+ big: "border border-[1px] border-success-500"
6605
6622
  },
6606
6623
  dangerous: {
6607
- small: "bg-dangerous-600",
6608
- big: "bg-dangerous-100"
6624
+ small: "bg-dangerous-500",
6625
+ big: "border border-[1px] border-dangerous-500"
6609
6626
  },
6610
6627
  warning: {
6611
- small: "bg-warning-600",
6612
- big: "bg-warning-100"
6628
+ small: "bg-warning-500",
6629
+ big: "border border-[1px] border-warning-500"
6613
6630
  },
6614
6631
  info: {
6615
6632
  small: "bg-blue-500",
6616
- big: "bg-blue-100"
6633
+ big: "border border-[1px] border-blue-500"
6617
6634
  },
6618
6635
  gray: {
6619
6636
  small: "bg-neutral-300",
6620
- big: "bg-neutral-100"
6637
+ big: "border border-[1px] border-neutral-300"
6621
6638
  }
6622
6639
  };
6623
- var StatusBall = ({ label, variant = "info" }) => {
6624
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
6625
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
6626
- /* @__PURE__ */ jsxRuntime.jsx(
6627
- "div",
6628
- {
6629
- className: clsx9__default.default(
6630
- {
6631
- [variants5[variant].big]: true
6632
- },
6633
- "h-3 w-3 rounded-full"
6634
- )
6635
- }
6636
- ),
6637
- /* @__PURE__ */ jsxRuntime.jsx(
6638
- "div",
6639
- {
6640
- className: clsx9__default.default(
6641
- {
6642
- [variants5[variant].small]: true
6643
- },
6644
- "h-2 w-2 rounded-full absolute z-30 top-[2px] left-[2px]"
6645
- )
6646
- }
6647
- )
6648
- ] }),
6649
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-p-md text-paragraph font-normal", children: label })
6640
+ var StatusBall = ({
6641
+ label,
6642
+ variant = "info",
6643
+ labelPosition = "right"
6644
+ }) => {
6645
+ const ball = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative shrink-0 h-3 w-3", children: [
6646
+ /* @__PURE__ */ jsxRuntime.jsx(
6647
+ "div",
6648
+ {
6649
+ className: clsx9__default.default(variants5[variant].big, "h-3 w-3 rounded-full")
6650
+ }
6651
+ ),
6652
+ /* @__PURE__ */ jsxRuntime.jsx(
6653
+ "div",
6654
+ {
6655
+ className: clsx9__default.default(
6656
+ variants5[variant].small,
6657
+ "h-[8px] w-[8px] rounded-full absolute z-30 top-[2px] left-[2px]"
6658
+ )
6659
+ }
6660
+ )
6650
6661
  ] });
6662
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center gap-2", children: labelPosition === "right" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6663
+ ball,
6664
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-p-md text-paragraph font-normal", children: label })
6665
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6666
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-p-md text-paragraph font-normal", children: label }),
6667
+ ball
6668
+ ] }) });
6651
6669
  };
6652
6670
  var Tabs = ({
6653
6671
  tabs,