@zentauri-ui/zentauri-components 0.0.84 → 0.0.92
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/README.md +47 -29
- package/dist/chunk-BZSIXBA7.js +70 -0
- package/dist/chunk-BZSIXBA7.js.map +1 -0
- package/dist/chunk-E5UX537J.js +11 -0
- package/dist/chunk-E5UX537J.js.map +1 -0
- package/dist/chunk-MEWYFWBX.mjs +14 -0
- package/dist/chunk-MEWYFWBX.mjs.map +1 -0
- package/dist/chunk-VJHD7QZH.mjs +73 -0
- package/dist/chunk-VJHD7QZH.mjs.map +1 -0
- package/dist/ui/accordion.d.mts +70 -0
- package/dist/ui/accordion.d.ts +70 -0
- package/dist/ui/accordion.js +280 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/accordion.mjs +282 -0
- package/dist/ui/accordion.mjs.map +1 -0
- package/dist/ui/alert.d.mts +66 -0
- package/dist/ui/alert.d.ts +66 -0
- package/dist/ui/alert.js +218 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/alert.mjs +220 -0
- package/dist/ui/alert.mjs.map +1 -0
- package/dist/ui/badge.d.mts +37 -0
- package/dist/ui/badge.d.ts +37 -0
- package/dist/ui/badge.js +159 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/badge.mjs +161 -0
- package/dist/ui/badge.mjs.map +1 -0
- package/dist/ui/buttons.d.mts +27 -0
- package/dist/ui/buttons.d.ts +27 -0
- package/dist/ui/buttons.js +107 -0
- package/dist/ui/buttons.js.map +1 -0
- package/dist/ui/buttons.mjs +109 -0
- package/dist/ui/buttons.mjs.map +1 -0
- package/dist/ui/card.d.mts +77 -0
- package/dist/ui/card.d.ts +77 -0
- package/dist/ui/card.js +252 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/card.mjs +254 -0
- package/dist/ui/card.mjs.map +1 -0
- package/dist/ui/divider.d.mts +39 -0
- package/dist/ui/divider.d.ts +39 -0
- package/dist/ui/divider.js +194 -0
- package/dist/ui/divider.js.map +1 -0
- package/dist/ui/divider.mjs +196 -0
- package/dist/ui/divider.mjs.map +1 -0
- package/dist/ui/drawer.d.mts +81 -0
- package/dist/ui/drawer.d.ts +81 -0
- package/dist/ui/drawer.js +377 -0
- package/dist/ui/drawer.js.map +1 -0
- package/dist/ui/drawer.mjs +379 -0
- package/dist/ui/drawer.mjs.map +1 -0
- package/dist/ui/dropdown.d.mts +50 -0
- package/dist/ui/dropdown.d.ts +50 -0
- package/dist/ui/dropdown.js +272 -0
- package/dist/ui/dropdown.js.map +1 -0
- package/dist/ui/dropdown.mjs +274 -0
- package/dist/ui/dropdown.mjs.map +1 -0
- package/dist/ui/empty-state.d.mts +55 -0
- package/dist/ui/empty-state.d.ts +55 -0
- package/dist/ui/empty-state.js +148 -0
- package/dist/ui/empty-state.js.map +1 -0
- package/dist/ui/empty-state.mjs +150 -0
- package/dist/ui/empty-state.mjs.map +1 -0
- package/dist/ui/inputs.d.mts +35 -0
- package/dist/ui/inputs.d.ts +35 -0
- package/dist/ui/inputs.js +426 -0
- package/dist/ui/inputs.js.map +1 -0
- package/dist/ui/inputs.mjs +428 -0
- package/dist/ui/inputs.mjs.map +1 -0
- package/dist/ui/modal.d.mts +84 -0
- package/dist/ui/modal.d.ts +84 -0
- package/dist/ui/modal.js +378 -0
- package/dist/ui/modal.js.map +1 -0
- package/dist/ui/modal.mjs +380 -0
- package/dist/ui/modal.mjs.map +1 -0
- package/dist/ui/pagination.d.mts +114 -0
- package/dist/ui/pagination.d.ts +114 -0
- package/dist/ui/pagination.js +425 -0
- package/dist/ui/pagination.js.map +1 -0
- package/dist/ui/pagination.mjs +427 -0
- package/dist/ui/pagination.mjs.map +1 -0
- package/dist/ui/progress.d.mts +61 -0
- package/dist/ui/progress.d.ts +61 -0
- package/dist/ui/progress.js +231 -0
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/progress.mjs +233 -0
- package/dist/ui/progress.mjs.map +1 -0
- package/dist/ui/select.d.mts +73 -0
- package/dist/ui/select.d.ts +73 -0
- package/dist/ui/select.js +321 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/select.mjs +323 -0
- package/dist/ui/select.mjs.map +1 -0
- package/dist/ui/skeleton.d.mts +90 -0
- package/dist/ui/skeleton.d.ts +90 -0
- package/dist/ui/skeleton.js +538 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/skeleton.mjs +540 -0
- package/dist/ui/skeleton.mjs.map +1 -0
- package/dist/ui/spinner.d.mts +27 -0
- package/dist/ui/spinner.d.ts +27 -0
- package/dist/ui/spinner.js +187 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/spinner.mjs +189 -0
- package/dist/ui/spinner.mjs.map +1 -0
- package/dist/ui/table.d.mts +81 -0
- package/dist/ui/table.d.ts +81 -0
- package/dist/ui/table.js +287 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/table.mjs +289 -0
- package/dist/ui/table.mjs.map +1 -0
- package/dist/ui/tabs.d.mts +58 -0
- package/dist/ui/tabs.d.ts +58 -0
- package/dist/ui/tabs.js +268 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/tabs.mjs +270 -0
- package/dist/ui/tabs.mjs.map +1 -0
- package/dist/ui/toast.d.mts +86 -0
- package/dist/ui/toast.d.ts +86 -0
- package/dist/ui/toast.js +252 -0
- package/dist/ui/toast.js.map +1 -0
- package/dist/ui/toast.mjs +254 -0
- package/dist/ui/toast.mjs.map +1 -0
- package/dist/ui/toggle.d.mts +37 -0
- package/dist/ui/toggle.d.ts +37 -0
- package/dist/ui/toggle.js +152 -0
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/toggle.mjs +154 -0
- package/dist/ui/toggle.mjs.map +1 -0
- package/dist/ui/tooltip.d.mts +46 -0
- package/dist/ui/tooltip.d.ts +46 -0
- package/dist/ui/tooltip.js +208 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/ui/tooltip.mjs +210 -0
- package/dist/ui/tooltip.mjs.map +1 -0
- package/dist/variants-Dd9pe-ov.d.mts +8 -0
- package/dist/variants-Dd9pe-ov.d.ts +8 -0
- package/package.json +15 -14
- package/dist/ui/index.cjs +0 -5764
- package/dist/ui/index.cjs.map +0 -1
- package/dist/ui/index.d.cts +0 -1164
- package/dist/ui/index.d.ts +0 -1164
- package/dist/ui/index.js +0 -5626
- package/dist/ui/index.js.map +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { HTMLMotionProps } from 'framer-motion';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
|
+
|
|
7
|
+
declare const emptyStateVariants: (props?: ({
|
|
8
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
9
|
+
appearance?: "default" | "ghost" | "card" | null | undefined;
|
|
10
|
+
align?: "start" | "center" | "end" | null | undefined;
|
|
11
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
|
+
declare const emptyStateTitleVariants: (props?: ({
|
|
13
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
+
declare const emptyStateDescriptionVariants: (props?: ({
|
|
16
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
17
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
18
|
+
|
|
19
|
+
type EmptyStateAnimation = "none" | "float" | "fade" | "slide-up";
|
|
20
|
+
type EmptyStateVariantProps = VariantProps<typeof emptyStateVariants>;
|
|
21
|
+
type EmptyStateProps = EmptyStateVariantProps & Omit<HTMLMotionProps<"div">, "children"> & {
|
|
22
|
+
animation?: EmptyStateAnimation;
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
};
|
|
25
|
+
type EmptyStateSectionProps = {
|
|
26
|
+
className?: string;
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
declare function EmptyState(props: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
31
|
+
declare namespace EmptyState {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
34
|
+
declare function EmptyStateIcon({ className, children }: EmptyStateSectionProps): react_jsx_runtime.JSX.Element;
|
|
35
|
+
declare namespace EmptyStateIcon {
|
|
36
|
+
var displayName: string;
|
|
37
|
+
}
|
|
38
|
+
declare function EmptyStateTitle({ className, children }: EmptyStateSectionProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
declare namespace EmptyStateTitle {
|
|
40
|
+
var displayName: string;
|
|
41
|
+
}
|
|
42
|
+
declare function EmptyStateDescription({ className, children, }: EmptyStateSectionProps): react_jsx_runtime.JSX.Element;
|
|
43
|
+
declare namespace EmptyStateDescription {
|
|
44
|
+
var displayName: string;
|
|
45
|
+
}
|
|
46
|
+
declare function EmptyStateAction({ className, children }: EmptyStateSectionProps): react_jsx_runtime.JSX.Element;
|
|
47
|
+
declare namespace EmptyStateAction {
|
|
48
|
+
var displayName: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
type EmptyStatePresetMotionProps = Pick<HTMLMotionProps<"div">, "initial" | "animate" | "transition" | "whileHover">;
|
|
52
|
+
type EmptyStateAnimationPresets = Record<EmptyStateAnimation, EmptyStatePresetMotionProps>;
|
|
53
|
+
declare const emptyStateAnimationPresets: EmptyStateAnimationPresets;
|
|
54
|
+
|
|
55
|
+
export { EmptyState, EmptyStateAction, type EmptyStateAnimation, EmptyStateDescription, EmptyStateIcon, type EmptyStateProps, type EmptyStateSectionProps, EmptyStateTitle, emptyStateAnimationPresets, emptyStateDescriptionVariants, emptyStateTitleVariants, emptyStateVariants };
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
|
+
|
|
3
|
+
var _chunkE5UX537Jjs = require('../chunk-E5UX537J.js');
|
|
4
|
+
|
|
5
|
+
// src/ui/empty-state/empty-state.tsx
|
|
6
|
+
var _react = require('react');
|
|
7
|
+
var _framermotion = require('framer-motion');
|
|
8
|
+
|
|
9
|
+
// src/ui/empty-state/animations.ts
|
|
10
|
+
var emptyStateAnimationPresets = {
|
|
11
|
+
none: {},
|
|
12
|
+
float: {
|
|
13
|
+
whileHover: { y: -4 },
|
|
14
|
+
transition: { type: "spring", stiffness: 260, damping: 22 }
|
|
15
|
+
},
|
|
16
|
+
fade: {
|
|
17
|
+
initial: { opacity: 0, y: 8 },
|
|
18
|
+
animate: { opacity: 1, y: 0 },
|
|
19
|
+
transition: { duration: 0.25, ease: "easeOut" }
|
|
20
|
+
},
|
|
21
|
+
"slide-up": {
|
|
22
|
+
initial: { opacity: 0, y: 16 },
|
|
23
|
+
animate: { opacity: 1, y: 0 },
|
|
24
|
+
transition: { type: "spring", stiffness: 380, damping: 28 }
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// src/ui/empty-state/variants.ts
|
|
29
|
+
var _classvarianceauthority = require('class-variance-authority');
|
|
30
|
+
var emptyStateVariants = _classvarianceauthority.cva.call(void 0, "flex w-full flex-col items-center text-center", {
|
|
31
|
+
variants: {
|
|
32
|
+
size: {
|
|
33
|
+
sm: "gap-2 p-4 text-sm",
|
|
34
|
+
md: "gap-3 p-6 text-sm",
|
|
35
|
+
lg: "gap-4 p-8 text-base"
|
|
36
|
+
},
|
|
37
|
+
appearance: {
|
|
38
|
+
default: "text-slate-50",
|
|
39
|
+
ghost: "text-slate-200",
|
|
40
|
+
card: "rounded-2xl border border-white/10 bg-white/5 p-8 text-slate-50 shadow-[0_18px_48px_rgba(15,23,42,0.35)]"
|
|
41
|
+
},
|
|
42
|
+
align: {
|
|
43
|
+
start: "items-start text-left",
|
|
44
|
+
center: "items-center text-center",
|
|
45
|
+
end: "items-end text-right"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
defaultVariants: {
|
|
49
|
+
size: "md",
|
|
50
|
+
appearance: "default",
|
|
51
|
+
align: "center"
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
var emptyStateTitleVariants = _classvarianceauthority.cva.call(void 0, "font-semibold tracking-tight", {
|
|
55
|
+
variants: {
|
|
56
|
+
size: {
|
|
57
|
+
sm: "text-base",
|
|
58
|
+
md: "text-lg",
|
|
59
|
+
lg: "text-xl"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
defaultVariants: { size: "md" }
|
|
63
|
+
});
|
|
64
|
+
var emptyStateDescriptionVariants = _classvarianceauthority.cva.call(void 0, "max-w-md text-slate-400", {
|
|
65
|
+
variants: {
|
|
66
|
+
size: {
|
|
67
|
+
sm: "text-xs",
|
|
68
|
+
md: "text-sm",
|
|
69
|
+
lg: "text-base"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
defaultVariants: { size: "md" }
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// src/ui/empty-state/empty-state.tsx
|
|
76
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
77
|
+
var EmptyStateSizeContext = _react.createContext.call(void 0, "md");
|
|
78
|
+
function useEmptyStateSize() {
|
|
79
|
+
return _react.useContext.call(void 0, EmptyStateSizeContext);
|
|
80
|
+
}
|
|
81
|
+
function EmptyState(props) {
|
|
82
|
+
const {
|
|
83
|
+
className,
|
|
84
|
+
size = "md",
|
|
85
|
+
appearance,
|
|
86
|
+
align,
|
|
87
|
+
animation = "none",
|
|
88
|
+
children,
|
|
89
|
+
ref,
|
|
90
|
+
...rest
|
|
91
|
+
} = props;
|
|
92
|
+
const motionProps = emptyStateAnimationPresets[animation];
|
|
93
|
+
const ctx = _react.useMemo.call(void 0, () => _nullishCoalesce(size, () => ( "md")), [size]);
|
|
94
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmptyStateSizeContext.Provider, { value: ctx, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
95
|
+
_framermotion.motion.section,
|
|
96
|
+
{
|
|
97
|
+
ref,
|
|
98
|
+
"data-slot": "empty-state",
|
|
99
|
+
"aria-live": "polite",
|
|
100
|
+
className: _chunkE5UX537Jjs.cn.call(void 0, emptyStateVariants({ size, appearance, align }), className),
|
|
101
|
+
initial: animation === "none" ? false : void 0,
|
|
102
|
+
...motionProps,
|
|
103
|
+
...rest,
|
|
104
|
+
children
|
|
105
|
+
}
|
|
106
|
+
) });
|
|
107
|
+
}
|
|
108
|
+
EmptyState.displayName = "EmptyState";
|
|
109
|
+
function EmptyStateIcon({ className, children }) {
|
|
110
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { "data-slot": "empty-state-icon", className: _chunkE5UX537Jjs.cn.call(void 0, "text-slate-300", className), children });
|
|
111
|
+
}
|
|
112
|
+
EmptyStateIcon.displayName = "EmptyStateIcon";
|
|
113
|
+
function EmptyStateTitle({ className, children }) {
|
|
114
|
+
const size = useEmptyStateSize();
|
|
115
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { "data-slot": "empty-state-title", className: _chunkE5UX537Jjs.cn.call(void 0, emptyStateTitleVariants({ size }), className), children });
|
|
116
|
+
}
|
|
117
|
+
EmptyStateTitle.displayName = "EmptyStateTitle";
|
|
118
|
+
function EmptyStateDescription({
|
|
119
|
+
className,
|
|
120
|
+
children
|
|
121
|
+
}) {
|
|
122
|
+
const size = useEmptyStateSize();
|
|
123
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
124
|
+
"p",
|
|
125
|
+
{
|
|
126
|
+
"data-slot": "empty-state-description",
|
|
127
|
+
className: _chunkE5UX537Jjs.cn.call(void 0, emptyStateDescriptionVariants({ size }), className),
|
|
128
|
+
children
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
EmptyStateDescription.displayName = "EmptyStateDescription";
|
|
133
|
+
function EmptyStateAction({ className, children }) {
|
|
134
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { "data-slot": "empty-state-action", className: _chunkE5UX537Jjs.cn.call(void 0, "mt-2", className), children });
|
|
135
|
+
}
|
|
136
|
+
EmptyStateAction.displayName = "EmptyStateAction";
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
exports.EmptyState = EmptyState; exports.EmptyStateAction = EmptyStateAction; exports.EmptyStateDescription = EmptyStateDescription; exports.EmptyStateIcon = EmptyStateIcon; exports.EmptyStateTitle = EmptyStateTitle; exports.emptyStateAnimationPresets = emptyStateAnimationPresets; exports.emptyStateDescriptionVariants = emptyStateDescriptionVariants; exports.emptyStateTitleVariants = emptyStateTitleVariants; exports.emptyStateVariants = emptyStateVariants;
|
|
148
|
+
//# sourceMappingURL=empty-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/shubham/Desktop/Repos/NEXT%20JS/zentauri-ui/packages/components/dist/ui/empty-state.js"],"names":[],"mappings":"AAAA;AACE;AACF,uDAA6B;AAC7B;AACA;AACA,8BAA0D;AAC1D,6CAAsC;AACtC;AACA;AACA,IAAI,2BAA2B,EAAE;AACjC,EAAE,IAAI,EAAE,CAAC,CAAC;AACV,EAAE,KAAK,EAAE;AACT,IAAI,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACzB,IAAI,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG;AAC9D,EAAE,CAAC;AACH,EAAE,IAAI,EAAE;AACR,IAAI,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;AACjC,IAAI,O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,EAAE,uBAAuB;AAC3D,SAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE;AACnD,EAAE,uBAAuB,6BAAG,KAAM,EAAE,EAAE,WAAW,EAAE,oBAAoB,EAAE,SAAS,EAAE,iCAAE,MAAO,EAAE,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC;AACtH;AACA,gBAAgB,CAAC,YAAY,EAAE,kBAAkB;AACjD;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,4cAAC","file":"/Users/shubham/Desktop/Repos/NEXT JS/zentauri-ui/packages/components/dist/ui/empty-state.js","sourcesContent":[null]}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
cn
|
|
5
|
+
} from "../chunk-MEWYFWBX.mjs";
|
|
6
|
+
|
|
7
|
+
// src/ui/empty-state/empty-state.tsx
|
|
8
|
+
import { createContext, useContext, useMemo } from "react";
|
|
9
|
+
import { motion } from "framer-motion";
|
|
10
|
+
|
|
11
|
+
// src/ui/empty-state/animations.ts
|
|
12
|
+
var emptyStateAnimationPresets = {
|
|
13
|
+
none: {},
|
|
14
|
+
float: {
|
|
15
|
+
whileHover: { y: -4 },
|
|
16
|
+
transition: { type: "spring", stiffness: 260, damping: 22 }
|
|
17
|
+
},
|
|
18
|
+
fade: {
|
|
19
|
+
initial: { opacity: 0, y: 8 },
|
|
20
|
+
animate: { opacity: 1, y: 0 },
|
|
21
|
+
transition: { duration: 0.25, ease: "easeOut" }
|
|
22
|
+
},
|
|
23
|
+
"slide-up": {
|
|
24
|
+
initial: { opacity: 0, y: 16 },
|
|
25
|
+
animate: { opacity: 1, y: 0 },
|
|
26
|
+
transition: { type: "spring", stiffness: 380, damping: 28 }
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// src/ui/empty-state/variants.ts
|
|
31
|
+
import { cva } from "class-variance-authority";
|
|
32
|
+
var emptyStateVariants = cva("flex w-full flex-col items-center text-center", {
|
|
33
|
+
variants: {
|
|
34
|
+
size: {
|
|
35
|
+
sm: "gap-2 p-4 text-sm",
|
|
36
|
+
md: "gap-3 p-6 text-sm",
|
|
37
|
+
lg: "gap-4 p-8 text-base"
|
|
38
|
+
},
|
|
39
|
+
appearance: {
|
|
40
|
+
default: "text-slate-50",
|
|
41
|
+
ghost: "text-slate-200",
|
|
42
|
+
card: "rounded-2xl border border-white/10 bg-white/5 p-8 text-slate-50 shadow-[0_18px_48px_rgba(15,23,42,0.35)]"
|
|
43
|
+
},
|
|
44
|
+
align: {
|
|
45
|
+
start: "items-start text-left",
|
|
46
|
+
center: "items-center text-center",
|
|
47
|
+
end: "items-end text-right"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
size: "md",
|
|
52
|
+
appearance: "default",
|
|
53
|
+
align: "center"
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
var emptyStateTitleVariants = cva("font-semibold tracking-tight", {
|
|
57
|
+
variants: {
|
|
58
|
+
size: {
|
|
59
|
+
sm: "text-base",
|
|
60
|
+
md: "text-lg",
|
|
61
|
+
lg: "text-xl"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
defaultVariants: { size: "md" }
|
|
65
|
+
});
|
|
66
|
+
var emptyStateDescriptionVariants = cva("max-w-md text-slate-400", {
|
|
67
|
+
variants: {
|
|
68
|
+
size: {
|
|
69
|
+
sm: "text-xs",
|
|
70
|
+
md: "text-sm",
|
|
71
|
+
lg: "text-base"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
defaultVariants: { size: "md" }
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// src/ui/empty-state/empty-state.tsx
|
|
78
|
+
import { jsx } from "react/jsx-runtime";
|
|
79
|
+
var EmptyStateSizeContext = createContext("md");
|
|
80
|
+
function useEmptyStateSize() {
|
|
81
|
+
return useContext(EmptyStateSizeContext);
|
|
82
|
+
}
|
|
83
|
+
function EmptyState(props) {
|
|
84
|
+
const {
|
|
85
|
+
className,
|
|
86
|
+
size = "md",
|
|
87
|
+
appearance,
|
|
88
|
+
align,
|
|
89
|
+
animation = "none",
|
|
90
|
+
children,
|
|
91
|
+
ref,
|
|
92
|
+
...rest
|
|
93
|
+
} = props;
|
|
94
|
+
const motionProps = emptyStateAnimationPresets[animation];
|
|
95
|
+
const ctx = useMemo(() => size ?? "md", [size]);
|
|
96
|
+
return /* @__PURE__ */ jsx(EmptyStateSizeContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
|
|
97
|
+
motion.section,
|
|
98
|
+
{
|
|
99
|
+
ref,
|
|
100
|
+
"data-slot": "empty-state",
|
|
101
|
+
"aria-live": "polite",
|
|
102
|
+
className: cn(emptyStateVariants({ size, appearance, align }), className),
|
|
103
|
+
initial: animation === "none" ? false : void 0,
|
|
104
|
+
...motionProps,
|
|
105
|
+
...rest,
|
|
106
|
+
children
|
|
107
|
+
}
|
|
108
|
+
) });
|
|
109
|
+
}
|
|
110
|
+
EmptyState.displayName = "EmptyState";
|
|
111
|
+
function EmptyStateIcon({ className, children }) {
|
|
112
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "empty-state-icon", className: cn("text-slate-300", className), children });
|
|
113
|
+
}
|
|
114
|
+
EmptyStateIcon.displayName = "EmptyStateIcon";
|
|
115
|
+
function EmptyStateTitle({ className, children }) {
|
|
116
|
+
const size = useEmptyStateSize();
|
|
117
|
+
return /* @__PURE__ */ jsx("h2", { "data-slot": "empty-state-title", className: cn(emptyStateTitleVariants({ size }), className), children });
|
|
118
|
+
}
|
|
119
|
+
EmptyStateTitle.displayName = "EmptyStateTitle";
|
|
120
|
+
function EmptyStateDescription({
|
|
121
|
+
className,
|
|
122
|
+
children
|
|
123
|
+
}) {
|
|
124
|
+
const size = useEmptyStateSize();
|
|
125
|
+
return /* @__PURE__ */ jsx(
|
|
126
|
+
"p",
|
|
127
|
+
{
|
|
128
|
+
"data-slot": "empty-state-description",
|
|
129
|
+
className: cn(emptyStateDescriptionVariants({ size }), className),
|
|
130
|
+
children
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
EmptyStateDescription.displayName = "EmptyStateDescription";
|
|
135
|
+
function EmptyStateAction({ className, children }) {
|
|
136
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "empty-state-action", className: cn("mt-2", className), children });
|
|
137
|
+
}
|
|
138
|
+
EmptyStateAction.displayName = "EmptyStateAction";
|
|
139
|
+
export {
|
|
140
|
+
EmptyState,
|
|
141
|
+
EmptyStateAction,
|
|
142
|
+
EmptyStateDescription,
|
|
143
|
+
EmptyStateIcon,
|
|
144
|
+
EmptyStateTitle,
|
|
145
|
+
emptyStateAnimationPresets,
|
|
146
|
+
emptyStateDescriptionVariants,
|
|
147
|
+
emptyStateTitleVariants,
|
|
148
|
+
emptyStateVariants
|
|
149
|
+
};
|
|
150
|
+
//# sourceMappingURL=empty-state.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/empty-state/empty-state.tsx","../../src/ui/empty-state/animations.ts","../../src/ui/empty-state/variants.ts"],"sourcesContent":["\"use client\";\n\nimport { createContext, useContext, useMemo } from \"react\";\nimport { motion } from \"framer-motion\";\n\nimport { cn } from \"../../lib/utils\";\n\nimport { emptyStateAnimationPresets } from \"./animations\";\nimport type { EmptyStateProps, EmptyStateSectionProps } from \"./types\";\nimport {\n emptyStateDescriptionVariants,\n emptyStateTitleVariants,\n emptyStateVariants,\n} from \"./variants\";\n\ntype EmptyStateSize = NonNullable<EmptyStateProps[\"size\"]>;\n\nconst EmptyStateSizeContext = createContext<EmptyStateSize>(\"md\");\n\nfunction useEmptyStateSize(): EmptyStateSize {\n return useContext(EmptyStateSizeContext);\n}\n\nexport function EmptyState(props: EmptyStateProps) {\n const {\n className,\n size = \"md\",\n appearance,\n align,\n animation = \"none\",\n children,\n ref,\n ...rest\n } = props;\n const motionProps = emptyStateAnimationPresets[animation];\n const ctx = useMemo(() => size ?? \"md\", [size]);\n\n return (\n <EmptyStateSizeContext.Provider value={ctx}>\n <motion.section\n ref={ref}\n data-slot=\"empty-state\"\n aria-live=\"polite\"\n className={cn(emptyStateVariants({ size, appearance, align }), className)}\n initial={animation === \"none\" ? false : undefined}\n {...motionProps}\n {...rest}\n >\n {children}\n </motion.section>\n </EmptyStateSizeContext.Provider>\n );\n}\n\nEmptyState.displayName = \"EmptyState\";\n\nexport function EmptyStateIcon({ className, children }: EmptyStateSectionProps) {\n return (\n <div data-slot=\"empty-state-icon\" className={cn(\"text-slate-300\", className)}>\n {children}\n </div>\n );\n}\n\nEmptyStateIcon.displayName = \"EmptyStateIcon\";\n\nexport function EmptyStateTitle({ className, children }: EmptyStateSectionProps) {\n const size = useEmptyStateSize();\n return (\n <h2 data-slot=\"empty-state-title\" className={cn(emptyStateTitleVariants({ size }), className)}>\n {children}\n </h2>\n );\n}\n\nEmptyStateTitle.displayName = \"EmptyStateTitle\";\n\nexport function EmptyStateDescription({\n className,\n children,\n}: EmptyStateSectionProps) {\n const size = useEmptyStateSize();\n return (\n <p\n data-slot=\"empty-state-description\"\n className={cn(emptyStateDescriptionVariants({ size }), className)}\n >\n {children}\n </p>\n );\n}\n\nEmptyStateDescription.displayName = \"EmptyStateDescription\";\n\nexport function EmptyStateAction({ className, children }: EmptyStateSectionProps) {\n return (\n <div data-slot=\"empty-state-action\" className={cn(\"mt-2\", className)}>\n {children}\n </div>\n );\n}\n\nEmptyStateAction.displayName = \"EmptyStateAction\";\n","import type { HTMLMotionProps } from \"framer-motion\";\n\nimport type { EmptyStateAnimation } from \"./types\";\n\ntype EmptyStatePresetMotionProps = Pick<\n HTMLMotionProps<\"div\">,\n \"initial\" | \"animate\" | \"transition\" | \"whileHover\"\n>;\n\nexport type EmptyStateAnimationPresets = Record<\n EmptyStateAnimation,\n EmptyStatePresetMotionProps\n>;\n\nexport const emptyStateAnimationPresets: EmptyStateAnimationPresets = {\n none: {},\n float: {\n whileHover: { y: -4 },\n transition: { type: \"spring\", stiffness: 260, damping: 22 },\n },\n fade: {\n initial: { opacity: 0, y: 8 },\n animate: { opacity: 1, y: 0 },\n transition: { duration: 0.25, ease: \"easeOut\" },\n },\n \"slide-up\": {\n initial: { opacity: 0, y: 16 },\n animate: { opacity: 1, y: 0 },\n transition: { type: \"spring\", stiffness: 380, damping: 28 },\n },\n};\n","import { cva } from \"class-variance-authority\";\n\nexport const emptyStateVariants = cva(\"flex w-full flex-col items-center text-center\", {\n variants: {\n size: {\n sm: \"gap-2 p-4 text-sm\",\n md: \"gap-3 p-6 text-sm\",\n lg: \"gap-4 p-8 text-base\",\n },\n appearance: {\n default: \"text-slate-50\",\n ghost: \"text-slate-200\",\n card: \"rounded-2xl border border-white/10 bg-white/5 p-8 text-slate-50 shadow-[0_18px_48px_rgba(15,23,42,0.35)]\",\n },\n align: {\n start: \"items-start text-left\",\n center: \"items-center text-center\",\n end: \"items-end text-right\",\n },\n },\n defaultVariants: {\n size: \"md\",\n appearance: \"default\",\n align: \"center\",\n },\n});\n\nexport const emptyStateTitleVariants = cva(\"font-semibold tracking-tight\", {\n variants: {\n size: {\n sm: \"text-base\",\n md: \"text-lg\",\n lg: \"text-xl\",\n },\n },\n defaultVariants: { size: \"md\" },\n});\n\nexport const emptyStateDescriptionVariants = cva(\"max-w-md text-slate-400\", {\n variants: {\n size: {\n sm: \"text-xs\",\n md: \"text-sm\",\n lg: \"text-base\",\n },\n },\n defaultVariants: { size: \"md\" },\n});\n"],"mappings":";;;;;;;AAEA,SAAS,eAAe,YAAY,eAAe;AACnD,SAAS,cAAc;;;ACWhB,IAAM,6BAAyD;AAAA,EACpE,MAAM,CAAC;AAAA,EACP,OAAO;AAAA,IACL,YAAY,EAAE,GAAG,GAAG;AAAA,IACpB,YAAY,EAAE,MAAM,UAAU,WAAW,KAAK,SAAS,GAAG;AAAA,EAC5D;AAAA,EACA,MAAM;AAAA,IACJ,SAAS,EAA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GAA2B;AAChF,SACE,oBAAC,SAAI,aAAU,sBAAqB,WAAW,GAAG,QAAQ,SAAS,GAChE,UACH;AAEJ;AAEA,iBAAiB,cAAc;","names":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { HTMLMotionProps } from 'framer-motion';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
declare const inputVariants: (props?: ({
|
|
7
|
+
as?: "input" | "textarea" | "file" | "checkbox" | "radio" | null | undefined;
|
|
8
|
+
appearance?: "default" | "warning" | "error" | "success" | "info" | "violet" | "amber" | "pink" | "indigo" | "orange" | null | undefined;
|
|
9
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
10
|
+
ring?: boolean | null | undefined;
|
|
11
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
|
+
|
|
13
|
+
type InputAnimation = "none" | "lift" | "press" | "glow" | "tilt" | "bounce";
|
|
14
|
+
type InputSharedProps = Omit<VariantProps<typeof inputVariants>, "as"> & {
|
|
15
|
+
animation?: InputAnimation;
|
|
16
|
+
errorMessage?: string;
|
|
17
|
+
};
|
|
18
|
+
/** Motion props applied by presets on `motion.input` / `motion.textarea`. */
|
|
19
|
+
type InputPresetMotionProps = Pick<HTMLMotionProps<"input">, "style" | "transition" | "whileHover" | "whileTap" | "whileFocus">;
|
|
20
|
+
/** Omit native `size` (character width) so the design-system `size` variant can use the same name. */
|
|
21
|
+
type InputProps = (InputSharedProps & Omit<HTMLMotionProps<"input">, "size" | "as"> & {
|
|
22
|
+
as?: "input" | "file" | "checkbox" | "radio";
|
|
23
|
+
}) | (InputSharedProps & Omit<HTMLMotionProps<"textarea">, "size" | "as"> & {
|
|
24
|
+
as: "textarea";
|
|
25
|
+
});
|
|
26
|
+
type InputAnimationPresets = Record<InputAnimation, InputPresetMotionProps>;
|
|
27
|
+
|
|
28
|
+
declare const inputAnimationPresets: InputAnimationPresets;
|
|
29
|
+
|
|
30
|
+
declare const Input: {
|
|
31
|
+
(props: InputProps): react_jsx_runtime.JSX.Element;
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { Input, type InputAnimation, type InputAnimationPresets, type InputProps, inputAnimationPresets, inputVariants };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { HTMLMotionProps } from 'framer-motion';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
declare const inputVariants: (props?: ({
|
|
7
|
+
as?: "input" | "textarea" | "file" | "checkbox" | "radio" | null | undefined;
|
|
8
|
+
appearance?: "default" | "warning" | "error" | "success" | "info" | "violet" | "amber" | "pink" | "indigo" | "orange" | null | undefined;
|
|
9
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
10
|
+
ring?: boolean | null | undefined;
|
|
11
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
|
+
|
|
13
|
+
type InputAnimation = "none" | "lift" | "press" | "glow" | "tilt" | "bounce";
|
|
14
|
+
type InputSharedProps = Omit<VariantProps<typeof inputVariants>, "as"> & {
|
|
15
|
+
animation?: InputAnimation;
|
|
16
|
+
errorMessage?: string;
|
|
17
|
+
};
|
|
18
|
+
/** Motion props applied by presets on `motion.input` / `motion.textarea`. */
|
|
19
|
+
type InputPresetMotionProps = Pick<HTMLMotionProps<"input">, "style" | "transition" | "whileHover" | "whileTap" | "whileFocus">;
|
|
20
|
+
/** Omit native `size` (character width) so the design-system `size` variant can use the same name. */
|
|
21
|
+
type InputProps = (InputSharedProps & Omit<HTMLMotionProps<"input">, "size" | "as"> & {
|
|
22
|
+
as?: "input" | "file" | "checkbox" | "radio";
|
|
23
|
+
}) | (InputSharedProps & Omit<HTMLMotionProps<"textarea">, "size" | "as"> & {
|
|
24
|
+
as: "textarea";
|
|
25
|
+
});
|
|
26
|
+
type InputAnimationPresets = Record<InputAnimation, InputPresetMotionProps>;
|
|
27
|
+
|
|
28
|
+
declare const inputAnimationPresets: InputAnimationPresets;
|
|
29
|
+
|
|
30
|
+
declare const Input: {
|
|
31
|
+
(props: InputProps): react_jsx_runtime.JSX.Element;
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { Input, type InputAnimation, type InputAnimationPresets, type InputProps, inputAnimationPresets, inputVariants };
|