@cmdniels/uikit 1.3.0 → 1.3.2

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.
@@ -0,0 +1,2 @@
1
+ import type { ComponentProps } from "react";
2
+ export default function Empty({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import cn from "../../cn";
14
+ export default function Empty(_a) {
15
+ var { className } = _a, props = __rest(_a, ["className"]);
16
+ return (_jsx("div", Object.assign({ "data-slot": "empty", className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg border-dashed p-6 text-center text-balance", className) }, props)));
17
+ }
@@ -0,0 +1,2 @@
1
+ import type { ComponentProps } from "react";
2
+ export default function EmptyContent({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import cn from "../../cn";
14
+ export default function EmptyContent(_a) {
15
+ var { className } = _a, props = __rest(_a, ["className"]);
16
+ return (_jsx("div", Object.assign({ "data-slot": "empty-content", className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance", className) }, props)));
17
+ }
@@ -0,0 +1,2 @@
1
+ import type { ComponentProps } from "react";
2
+ export default function EmptyDescription({ className, ...props }: ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import cn from "../../cn";
14
+ export default function EmptyDescription(_a) {
15
+ var { className } = _a, props = __rest(_a, ["className"]);
16
+ return (_jsx("div", Object.assign({ "data-slot": "empty-description", className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className) }, props)));
17
+ }
@@ -0,0 +1,2 @@
1
+ import type { ComponentProps } from "react";
2
+ export default function EmptyHeader({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import cn from "../../cn";
14
+ export default function EmptyHeader(_a) {
15
+ var { className } = _a, props = __rest(_a, ["className"]);
16
+ return (_jsx("div", Object.assign({ "data-slot": "empty-header", className: cn("flex max-w-sm flex-col items-center gap-2", className) }, props)));
17
+ }
@@ -0,0 +1,4 @@
1
+ import { emptyMediaVariants } from "./emptyMediaVariants";
2
+ import type { VariantProps } from "class-variance-authority";
3
+ import type { ComponentProps } from "react";
4
+ export default function EmptyMedia({ className, variant, ...props }: ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import cn from "../../cn";
14
+ import { emptyMediaVariants } from "./emptyMediaVariants";
15
+ export default function EmptyMedia(_a) {
16
+ var { className, variant = "default" } = _a, props = __rest(_a, ["className", "variant"]);
17
+ return (_jsx("div", Object.assign({ "data-slot": "empty-icon", "data-variant": variant, className: cn(emptyMediaVariants({ variant, className })) }, props)));
18
+ }
@@ -0,0 +1,2 @@
1
+ import type { ComponentProps } from "react";
2
+ export default function EmptyTitle({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import cn from "../../cn";
14
+ export default function EmptyTitle(_a) {
15
+ var { className } = _a, props = __rest(_a, ["className"]);
16
+ return _jsx("div", Object.assign({ "data-slot": "empty-title", className: cn("text-sm font-medium tracking-tight", className) }, props));
17
+ }
@@ -0,0 +1,3 @@
1
+ export declare const emptyMediaVariants: (props?: ({
2
+ variant?: "default" | "icon" | null | undefined;
3
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -0,0 +1,12 @@
1
+ import { cva } from "class-variance-authority";
2
+ export const emptyMediaVariants = cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
3
+ variants: {
4
+ variant: {
5
+ default: "bg-transparent",
6
+ icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4",
7
+ },
8
+ },
9
+ defaultVariants: {
10
+ variant: "default",
11
+ },
12
+ });
@@ -25,13 +25,17 @@ export default function Toaster(_a) {
25
25
  error: _jsx(IconAlertOctagon, { className: "size-4" }),
26
26
  loading: _jsx(IconLoader, { className: "size-4 animate-spin" }),
27
27
  }, style: {
28
- "--normal-bg": "var(--popover)",
29
- "--normal-text": "var(--popover-foreground)",
28
+ "--normal-bg": "var(--card)",
29
+ "--normal-text": "var(--card-foreground)",
30
30
  "--normal-border": "var(--border)",
31
31
  "--border-radius": "var(--radius)",
32
32
  }, toastOptions: {
33
33
  classNames: {
34
- toast: "cn-toast",
34
+ toast: "cn-toast backdrop-blur-xs",
35
+ success: "bg-green-50/80! text-green-700! border-green-300! dark:bg-green-950/80! dark:text-green-300! dark:border-green-700!",
36
+ error: "bg-red-50/80! text-red-700! border-red-300! dark:bg-red-950/80! dark:text-red-300! dark:border-red-700!",
37
+ warning: "bg-yellow-50/80! text-yellow-700! border-yellow-300! dark:bg-yellow-950/80! dark:text-yellow-300! dark:border-yellow-700!",
38
+ info: "bg-blue-50/80! text-blue-700! border-blue-300! dark:bg-blue-950/80! dark:text-blue-300! dark:border-blue-700!",
35
39
  },
36
40
  } }, props)));
37
41
  }
package/out/index.d.ts CHANGED
@@ -100,6 +100,12 @@ export { default as DropdownMenuSub } from "./components/dropdown-menu/DropdownM
100
100
  export { default as DropdownMenuSubContent } from "./components/dropdown-menu/DropdownMenuSubContent";
101
101
  export { default as DropdownMenuSubTrigger } from "./components/dropdown-menu/DropdownMenuSubTrigger";
102
102
  export { default as DropdownMenuTrigger } from "./components/dropdown-menu/DropdownMenuTrigger";
103
+ export { default as Empty } from "./components/empty/Empty";
104
+ export { default as EmptyContent } from "./components/empty/EmptyContent";
105
+ export { default as EmptyDescription } from "./components/empty/EmptyDescription";
106
+ export { default as EmptyHeader } from "./components/empty/EmptyHeader";
107
+ export { default as EmptyMedia } from "./components/empty/EmptyMedia";
108
+ export { default as EmptyTitle } from "./components/empty/EmptyTitle";
103
109
  export { default as Error } from "./components/error/Error";
104
110
  export { default as Field } from "./components/field/Field";
105
111
  export { default as FieldContent } from "./components/field/FieldContent";
package/out/index.js CHANGED
@@ -115,6 +115,13 @@ export { default as DropdownMenuSub } from "./components/dropdown-menu/DropdownM
115
115
  export { default as DropdownMenuSubContent } from "./components/dropdown-menu/DropdownMenuSubContent";
116
116
  export { default as DropdownMenuSubTrigger } from "./components/dropdown-menu/DropdownMenuSubTrigger";
117
117
  export { default as DropdownMenuTrigger } from "./components/dropdown-menu/DropdownMenuTrigger";
118
+ // Empty
119
+ export { default as Empty } from "./components/empty/Empty";
120
+ export { default as EmptyContent } from "./components/empty/EmptyContent";
121
+ export { default as EmptyDescription } from "./components/empty/EmptyDescription";
122
+ export { default as EmptyHeader } from "./components/empty/EmptyHeader";
123
+ export { default as EmptyMedia } from "./components/empty/EmptyMedia";
124
+ export { default as EmptyTitle } from "./components/empty/EmptyTitle";
118
125
  // Error
119
126
  export { default as Error } from "./components/error/Error";
120
127
  // Field
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmdniels/uikit",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",