@dilipod/ui 0.2.14 → 0.2.15
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/components/select.d.ts.map +1 -1
- package/dist/components/toast.d.ts +2 -2
- package/dist/components/toast.d.ts.map +1 -1
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
- package/src/components/dialog.stories.tsx +91 -0
- package/src/components/dialog.tsx +2 -2
- package/src/components/dropdown-menu.stories.tsx +102 -0
- package/src/components/dropdown-menu.tsx +2 -2
- package/src/components/select.tsx +2 -1
- package/src/components/toast.tsx +4 -1
- package/src/styles/globals.css +99 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAChF,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAChF,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,QAAA,MAAM,MAAM,uFAuBX,CAAA;AAGD,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -4,7 +4,7 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
|
|
5
5
|
declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
6
6
|
declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
7
|
-
variant?: "default" | "success" | "warning" | "error" | null | undefined;
|
|
7
|
+
variant?: "default" | "success" | "warning" | "error" | "info" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
|
|
9
9
|
declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
10
|
declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -13,7 +13,7 @@ declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimit
|
|
|
13
13
|
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
|
|
14
14
|
type ToastActionElement = React.ReactElement<typeof ToastAction>;
|
|
15
15
|
declare const ToastIcon: ({ variant }: {
|
|
16
|
-
variant?: "default" | "success" | "error" | "warning";
|
|
16
|
+
variant?: "default" | "success" | "error" | "warning" | "info";
|
|
17
17
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, ToastIcon, };
|
|
19
19
|
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../src/components/toast.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,aAAa,8CAA2B,CAAA;AAE9C,QAAA,MAAM,aAAa,kKAYjB,CAAA;
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../src/components/toast.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,aAAa,8CAA2B,CAAA;AAE9C,QAAA,MAAM,aAAa,kKAYjB,CAAA;AAqBF,QAAA,MAAM,KAAK;;qHAYT,CAAA;AAGF,QAAA,MAAM,WAAW,kKAYf,CAAA;AAGF,QAAA,MAAM,UAAU,iKAed,CAAA;AAGF,QAAA,MAAM,UAAU,2JASd,CAAA;AAGF,QAAA,MAAM,gBAAgB,iKASpB,CAAA;AAGF,KAAK,UAAU,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,KAAK,CAAC,CAAA;AAE9D,KAAK,kBAAkB,GAAG,KAAK,CAAC,YAAY,CAAC,OAAO,WAAW,CAAC,CAAA;AAGhE,QAAA,MAAM,SAAS,GAAI,aAAa;IAAE,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;CAAE,4CAajG,CAAA;AAED,OAAO,EACL,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,aAAa,EACb,aAAa,EACb,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,SAAS,GACV,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1182,10 +1182,11 @@ var Select = React25__namespace.forwardRef(
|
|
|
1182
1182
|
{
|
|
1183
1183
|
ref,
|
|
1184
1184
|
className: cn(
|
|
1185
|
-
"
|
|
1185
|
+
"h-10 w-full rounded-sm border bg-white px-3 py-2 text-base text-[var(--black)] ring-offset-background",
|
|
1186
1186
|
"placeholder:text-gray-500",
|
|
1187
1187
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
1188
1188
|
"disabled:cursor-not-allowed disabled:opacity-50 md:text-sm transition-colors",
|
|
1189
|
+
`appearance-none bg-[url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23374151'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E")] bg-[length:16px_16px] bg-[right_12px_center] bg-no-repeat pr-10`,
|
|
1189
1190
|
error ? "border-red-500 focus-visible:ring-red-500" : "border-gray-300 focus-visible:ring-[var(--cyan)]",
|
|
1190
1191
|
className
|
|
1191
1192
|
),
|
|
@@ -1491,7 +1492,7 @@ var DropdownMenuSubContent = React25__namespace.forwardRef(({ className, ...prop
|
|
|
1491
1492
|
{
|
|
1492
1493
|
ref,
|
|
1493
1494
|
className: cn(
|
|
1494
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-sm border bg-popover p-1 text-popover-foreground shadow-lg
|
|
1495
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-sm border bg-popover p-1 text-popover-foreground shadow-lg",
|
|
1495
1496
|
className
|
|
1496
1497
|
),
|
|
1497
1498
|
...props
|
|
@@ -1504,7 +1505,7 @@ var DropdownMenuContent = React25__namespace.forwardRef(({ className, sideOffset
|
|
|
1504
1505
|
ref,
|
|
1505
1506
|
sideOffset,
|
|
1506
1507
|
className: cn(
|
|
1507
|
-
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-sm border bg-popover p-1.5 text-popover-foreground shadow-md
|
|
1508
|
+
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-sm border bg-popover p-1.5 text-popover-foreground shadow-md",
|
|
1508
1509
|
className
|
|
1509
1510
|
),
|
|
1510
1511
|
...props
|
|
@@ -1951,7 +1952,7 @@ var DialogOverlay = React25__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
1951
1952
|
{
|
|
1952
1953
|
ref,
|
|
1953
1954
|
className: cn(
|
|
1954
|
-
"fixed inset-0 z-50 bg-black/60
|
|
1955
|
+
"fixed inset-0 z-50 bg-black/60",
|
|
1955
1956
|
className
|
|
1956
1957
|
),
|
|
1957
1958
|
...props
|
|
@@ -1965,7 +1966,7 @@ var DialogContent = React25__namespace.forwardRef(({ className, children, ...pro
|
|
|
1965
1966
|
{
|
|
1966
1967
|
ref,
|
|
1967
1968
|
className: cn(
|
|
1968
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg
|
|
1969
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg gap-4 border border-border bg-white p-6 shadow-lg rounded-sm",
|
|
1969
1970
|
className
|
|
1970
1971
|
),
|
|
1971
1972
|
...props,
|
|
@@ -2050,7 +2051,8 @@ var toastVariants = classVarianceAuthority.cva(
|
|
|
2050
2051
|
default: "bg-[var(--black)] text-white",
|
|
2051
2052
|
success: "bg-[var(--black)] text-white",
|
|
2052
2053
|
error: "bg-[var(--black)] text-white",
|
|
2053
|
-
warning: "bg-[var(--black)] text-white"
|
|
2054
|
+
warning: "bg-[var(--black)] text-white",
|
|
2055
|
+
info: "bg-[var(--black)] text-white"
|
|
2054
2056
|
}
|
|
2055
2057
|
},
|
|
2056
2058
|
defaultVariants: {
|
|
@@ -2121,6 +2123,8 @@ var ToastIcon = ({ variant }) => {
|
|
|
2121
2123
|
return /* @__PURE__ */ jsxRuntime.jsx(react_star.WarningCircle, { size: 18, weight: "fill", className: "text-red-400" });
|
|
2122
2124
|
case "warning":
|
|
2123
2125
|
return /* @__PURE__ */ jsxRuntime.jsx(react_star.WarningCircle, { size: 18, weight: "fill", className: "text-amber-400" });
|
|
2126
|
+
case "info":
|
|
2127
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react_star.Info, { size: 18, weight: "fill", className: "text-[var(--cyan)]" });
|
|
2124
2128
|
default:
|
|
2125
2129
|
return /* @__PURE__ */ jsxRuntime.jsx(react_star.Info, { size: 18, weight: "fill", className: "text-white/70" });
|
|
2126
2130
|
}
|