@pixpilot/shadcn 1.2.6 → 1.2.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.
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from "class-variance-authority";
2
2
  import * as React from "react";
3
- import * as react_jsx_runtime5 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
4
4
  import * as class_variance_authority_types0 from "class-variance-authority/types";
5
5
 
6
6
  //#region src/components/ui/alert.d.ts
@@ -11,14 +11,14 @@ declare function Alert({
11
11
  className,
12
12
  variant,
13
13
  ...props
14
- }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): react_jsx_runtime5.JSX.Element;
14
+ }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): react_jsx_runtime9.JSX.Element;
15
15
  declare function AlertTitle({
16
16
  className,
17
17
  ...props
18
- }: React.ComponentProps<'div'>): react_jsx_runtime5.JSX.Element;
18
+ }: React.ComponentProps<'div'>): react_jsx_runtime9.JSX.Element;
19
19
  declare function AlertDescription({
20
20
  className,
21
21
  ...props
22
- }: React.ComponentProps<'div'>): react_jsx_runtime5.JSX.Element;
22
+ }: React.ComponentProps<'div'>): react_jsx_runtime9.JSX.Element;
23
23
  //#endregion
24
24
  export { Alert, AlertDescription, AlertTitle };
@@ -716,14 +716,15 @@ function ColorPickerSwatch(props) {
716
716
  const format = useStore((state) => state.format);
717
717
  const color = React.useMemo(() => {
718
718
  if (colorProp === void 0) return storeColor;
719
- return parseColorString(colorProp) ?? storeColor;
719
+ return parseColorString(colorProp);
720
720
  }, [colorProp, storeColor]);
721
721
  const backgroundStyle = React.useMemo(() => {
722
+ if (!color) return { backgroundColor: colorProp };
722
723
  const colorString = `rgba(${color.r}, ${color.g}, ${color.b}, ${color.a})`;
723
724
  if (color.a < 1) return { background: `linear-gradient(${colorString}, ${colorString}), repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 0% 50% / 8px 8px` };
724
725
  return { backgroundColor: colorString };
725
- }, [color]);
726
- const ariaLabel = `Current color: ${colorToString(color, format)}`;
726
+ }, [color, colorProp]);
727
+ const ariaLabel = color ? `Current color: ${colorToString(color, format)}` : colorProp ? `Current color: ${colorProp}` : "No color selected";
727
728
  return /* @__PURE__ */ jsx(asChild ? Slot : "div", {
728
729
  role: "img",
729
730
  "aria-label": ariaLabel,
@@ -1,23 +1,23 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime8 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
3
3
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
4
4
 
5
5
  //#region src/components/ui/tooltip.d.ts
6
6
  declare function TooltipProvider({
7
7
  delayDuration,
8
8
  ...props
9
- }: React.ComponentProps<typeof TooltipPrimitive.Provider>): react_jsx_runtime8.JSX.Element;
9
+ }: React.ComponentProps<typeof TooltipPrimitive.Provider>): react_jsx_runtime5.JSX.Element;
10
10
  declare function Tooltip({
11
11
  ...props
12
- }: React.ComponentProps<typeof TooltipPrimitive.Root>): react_jsx_runtime8.JSX.Element;
12
+ }: React.ComponentProps<typeof TooltipPrimitive.Root>): react_jsx_runtime5.JSX.Element;
13
13
  declare function TooltipTrigger({
14
14
  ...props
15
- }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): react_jsx_runtime8.JSX.Element;
15
+ }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): react_jsx_runtime5.JSX.Element;
16
16
  declare function TooltipContent({
17
17
  className,
18
18
  sideOffset,
19
19
  children,
20
20
  ...props
21
- }: React.ComponentProps<typeof TooltipPrimitive.Content>): react_jsx_runtime8.JSX.Element;
21
+ }: React.ComponentProps<typeof TooltipPrimitive.Content>): react_jsx_runtime5.JSX.Element;
22
22
  //#endregion
23
23
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/shadcn",
3
3
  "type": "module",
4
- "version": "1.2.6",
4
+ "version": "1.2.7",
5
5
  "description": "A collection of reusable UI components built with shadcn/ui and Radix UI primitives.",
6
6
  "author": "m.doaie <m.doaie@hotmail.com>",
7
7
  "license": "MIT",