@okshaun/components 0.5.4 → 0.5.6

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.ts CHANGED
@@ -1058,6 +1058,7 @@ export declare const Spinner: React.FC<SpinnerProps>;
1058
1058
  export declare type SpinnerProps = Omit<BoxProps, keyof SpinnerVariantProps> & SpinnerVariantProps & {
1059
1059
  size?: 'standard' | 'small' | 'large';
1060
1060
  className?: string;
1061
+ inverse?: boolean;
1061
1062
  };
1062
1063
 
1063
1064
  export declare const splitProps: (props: Record<string, any>) => [string, Record<string, any>];
package/dist/index.js CHANGED
@@ -731,6 +731,9 @@ const spinnerVariantMap = {
731
731
  "standard",
732
732
  "small",
733
733
  "large"
734
+ ],
735
+ "inverse": [
736
+ "true"
734
737
  ]
735
738
  };
736
739
  const spinnerVariantKeys = Object.keys(spinnerVariantMap);
@@ -2267,6 +2270,7 @@ const Text = ({
2267
2270
  };
2268
2271
  const Spinner = ({
2269
2272
  size: size2,
2273
+ inverse,
2270
2274
  ...props
2271
2275
  }) => {
2272
2276
  const [className, otherProps] = splitProps(props);
@@ -2274,7 +2278,7 @@ const Spinner = ({
2274
2278
  Box,
2275
2279
  {
2276
2280
  as: "div",
2277
- className: cx(spinner({ size: size2 }), className),
2281
+ className: cx(spinner({ size: size2, inverse }), className),
2278
2282
  ...otherProps
2279
2283
  }
2280
2284
  );
@@ -2671,7 +2675,12 @@ const Button = React.forwardRef(
2671
2675
  right: "0",
2672
2676
  bottom: "0",
2673
2677
  placeItems: "center",
2674
- children: /* @__PURE__ */ jsx(Spinner, {})
2678
+ children: /* @__PURE__ */ jsx(
2679
+ Spinner,
2680
+ {
2681
+ ...appearance === "primary" ? { inverse: true } : {}
2682
+ }
2683
+ )
2675
2684
  }
2676
2685
  )
2677
2686
  ] })
@@ -2878,7 +2887,12 @@ const IconButton = React.forwardRef(
2878
2887
  right: "0",
2879
2888
  bottom: "0",
2880
2889
  placeItems: "center",
2881
- children: /* @__PURE__ */ jsx(Spinner, {})
2890
+ children: /* @__PURE__ */ jsx(
2891
+ Spinner,
2892
+ {
2893
+ ...appearance === "primary" ? { inverse: true } : {}
2894
+ }
2895
+ )
2882
2896
  }
2883
2897
  )
2884
2898
  ] })
@@ -8449,7 +8463,10 @@ const Menu = ({
8449
8463
  };
8450
8464
  const highlightText$1 = (text2, match) => {
8451
8465
  if (!match || typeof text2 !== "string") return text2;
8452
- const regex = new RegExp(`(${match.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`, "gi");
8466
+ const regex = new RegExp(
8467
+ `(${match.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`,
8468
+ "gi"
8469
+ );
8453
8470
  const parts = text2.split(regex);
8454
8471
  return parts.map(
8455
8472
  (part, i) => regex.test(part) ? /* @__PURE__ */ jsx("mark", { children: part }, i) : part
@@ -8513,7 +8530,7 @@ const MenuItem = ({
8513
8530
  }
8514
8531
  ) });
8515
8532
  }
8516
- return /* @__PURE__ */ jsx(Box, { className: classes.menuItemIndicator, children: selected && /* @__PURE__ */ jsx(Icon, { name: "check", size: "20" }) });
8533
+ return /* @__PURE__ */ jsx(Box, { className: classes.menuItemIndicator, children: selected && /* @__PURE__ */ jsx(Icon, { name: "check", size: "24" }) });
8517
8534
  };
8518
8535
  const renderLabel = () => {
8519
8536
  const labelContent = typeof label2 === "string" && highlightMatch ? highlightText$1(label2, highlightMatch) : label2;
@@ -8600,7 +8617,10 @@ const MenuList = React__default.forwardRef(
8600
8617
  MenuList.displayName = "MenuList";
8601
8618
  const highlightText = (text2, match) => {
8602
8619
  if (!match || typeof text2 !== "string") return text2;
8603
- const regex = new RegExp(`(${match.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`, "gi");
8620
+ const regex = new RegExp(
8621
+ `(${match.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`,
8622
+ "gi"
8623
+ );
8604
8624
  const parts = text2.split(regex);
8605
8625
  return parts.map(
8606
8626
  (part, i) => regex.test(part) ? /* @__PURE__ */ jsx("mark", { children: part }, i) : part
@@ -8652,7 +8672,7 @@ const MenuListItem = React__default.forwardRef(
8652
8672
  }
8653
8673
  ) });
8654
8674
  }
8655
- return /* @__PURE__ */ jsx(Box, { className: classes.menuItemIndicator, children: selected && /* @__PURE__ */ jsx(Icon, { name: "check", size: "20" }) });
8675
+ return /* @__PURE__ */ jsx(Box, { className: classes.menuItemIndicator, children: selected && /* @__PURE__ */ jsx(Icon, { name: "check", size: "24" }) });
8656
8676
  };
8657
8677
  const renderLabel = () => {
8658
8678
  const labelContent = typeof label2 === "string" && highlightMatch ? highlightText(label2, highlightMatch) : label2;