rockin 0.0.34 → 0.0.35
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/chunk-3CZ2LLUN.js +198 -0
- package/dist/{chunk-7ZCRGTLA.js → chunk-54ZJAEO5.js} +5 -5
- package/dist/chunk-5GM3YR42.js +228 -0
- package/dist/chunk-6XUTSMTJ.js +183 -0
- package/dist/chunk-7JJBATB2.js +35 -0
- package/dist/chunk-BITCJZQZ.js +31 -0
- package/dist/chunk-COPQJFDI.js +158 -0
- package/dist/chunk-D6TULSM6.js +785 -0
- package/dist/chunk-DVNTJNDP.js +55 -0
- package/dist/chunk-EKDBYSMI.js +87 -0
- package/dist/chunk-FGWWRPMR.js +71 -0
- package/dist/chunk-G233W3IR.js +17 -0
- package/dist/chunk-G4NDAZTB.js +13 -0
- package/dist/chunk-GY2BX5SK.js +26 -0
- package/dist/chunk-MZBLIA6C.js +20 -0
- package/dist/chunk-OSVLAX37.js +101 -0
- package/dist/chunk-PRGKTXJU.js +20 -0
- package/dist/chunk-RUKQ532H.js +253 -0
- package/dist/chunk-S4H2HENE.js +113 -0
- package/dist/chunk-UHZTEDHK.js +61 -0
- package/dist/chunk-VFDNWPOI.js +293 -0
- package/dist/chunk-W4EIJWHF.js +150 -0
- package/dist/hooks/index.js +18 -9
- package/dist/index.js +4 -4
- package/dist/provider.js +3 -3
- package/dist/ui/accordion.js +95 -0
- package/dist/ui/alert-dialog.js +178 -0
- package/dist/ui/apple/english.js +7 -0
- package/dist/ui/apple/hindi.js +7 -0
- package/dist/ui/apple/index.js +52 -0
- package/dist/ui/apple/spanish.js +7 -0
- package/dist/ui/ariakit.js +7 -0
- package/dist/ui/autocomplete.js +296 -0
- package/dist/ui/avatar.js +106 -0
- package/dist/ui/badge.js +50 -0
- package/dist/ui/bridge.js +109 -0
- package/dist/ui/bubble.js +118 -0
- package/dist/ui/button-group.js +14 -0
- package/dist/ui/button.js +9 -0
- package/dist/ui/card.js +102 -0
- package/dist/ui/carousel.js +205 -0
- package/dist/ui/chart.js +253 -0
- package/dist/ui/checkbox.js +34 -0
- package/dist/ui/code-block.js +128 -0
- package/dist/ui/combobox.js +41 -0
- package/dist/ui/command.js +199 -0
- package/dist/ui/dashed.js +57 -0
- package/dist/ui/data-table/index.js +233 -0
- package/dist/ui/dialog.js +26 -0
- package/dist/ui/dock.js +86 -0
- package/dist/ui/drawer.js +216 -0
- package/dist/ui/dropdown-menu.js +35 -0
- package/dist/ui/empty.js +17 -0
- package/dist/ui/farmer/div.js +38 -0
- package/dist/ui/farmer/variants.js +314 -0
- package/dist/ui/field.js +224 -0
- package/dist/ui/filters.js +1524 -0
- package/dist/ui/image.js +88 -0
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +57 -8502
- package/dist/ui/input-group.js +20 -0
- package/dist/ui/input-otp.js +83 -0
- package/dist/ui/input.js +7 -0
- package/dist/ui/item.js +200 -0
- package/dist/ui/jelly.js +30 -0
- package/dist/ui/kbd.js +9 -0
- package/dist/ui/label.js +7 -0
- package/dist/ui/message-scroller.js +122 -0
- package/dist/ui/message.js +93 -0
- package/dist/ui/numberstepper.js +416 -0
- package/dist/ui/otp.js +403 -0
- package/dist/ui/popover.js +83 -0
- package/dist/ui/qr-code.js +124 -0
- package/dist/ui/quantity.js +48 -0
- package/dist/ui/radio-group.js +42 -0
- package/dist/ui/resizable.js +52 -0
- package/dist/ui/scroll-area.js +9 -0
- package/dist/ui/select.js +194 -0
- package/dist/ui/separator.js +7 -0
- package/dist/ui/skeleton.js +25 -0
- package/dist/ui/sonner.js +22 -0
- package/dist/ui/sortable.js +503 -0
- package/dist/ui/swipe-actions.js +45 -0
- package/dist/ui/switch.js +34 -0
- package/dist/ui/textarea.js +7 -0
- package/dist/ui/theme-toggle.js +141 -0
- package/dist/ui/tooltip.js +13 -0
- package/package.json +1 -1
- package/dist/chunk-4KFB6AJH.js +0 -1330
- /package/dist/{chunk-FYFBWCMJ.js → chunk-GBVAFFZR.js} +0 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
// src/ui/skeleton.tsx
|
|
2
|
+
import {
|
|
3
|
+
forwardRef,
|
|
4
|
+
useLayoutEffect
|
|
5
|
+
} from "react";
|
|
6
|
+
import { cn } from "cn";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
var componentThemeClassName = "[--ic-background:#ffffff] [--ic-foreground:#111111] [--ic-primary:#111111] [--ic-secondary:#646b75] [--ic-surface-border:#e9edf2] [--ic-border:#e3e7ec] [--ic-card:#ffffff] [--ic-card-foreground:#111111] [--ic-muted:#f5f7fa] [--ic-muted-foreground:#6d7480] [--ic-accent:#f3f5f8] [--color-accent:var(--ic-accent)] [--color-accent-foreground:var(--ic-accent-foreground)] [--ic-accent-foreground:#111111] [--ic-input:#e3e7ec] [--ic-ring:rgba(17,17,17,0.16)] [--ic-destructive:#dc2626] [--ic-paper:#fcfcfd] [--ic-popover-foreground:#111111] [--ic-brand:#0ea5e9] [--ic-brand-soft:#bae6fd] [--ic-shadow-soft:0_18px_38px_-24px_rgba(15,23,42,0.35)] [--ic-chart-1:oklch(0.52_0.19_254)] [--ic-chart-2:oklch(0.74_0.11_232)] [--ic-chart-3:oklch(0.42_0.16_262)] [--ic-chart-4:oklch(0.84_0.07_228)] [--ic-chart-5:oklch(0.62_0.14_240)] [--color-background:var(--ic-background)] [--color-foreground:var(--ic-foreground)] [--color-primary:var(--ic-primary)] [--color-secondary:var(--ic-secondary)] [--color-border:var(--ic-border)] [--color-card:var(--ic-card)] [--color-card-foreground:var(--ic-card-foreground)] [--color-muted:var(--ic-muted)] [--color-muted-foreground:var(--ic-muted-foreground)] [--color-accent:var(--ic-accent)] [--color-accent-foreground:var(--ic-accent-foreground)] [--color-input:var(--ic-input)] [--color-ring:var(--ic-ring)] [--color-destructive:var(--ic-destructive)] [--color-paper:var(--ic-paper)] [--color-popover-foreground:var(--ic-popover-foreground)] [--color-brand:var(--ic-brand)] [--color-brand-soft:var(--ic-brand-soft)] [--color-chart-1:var(--ic-chart-1)] [--color-chart-2:var(--ic-chart-2)] [--color-chart-3:var(--ic-chart-3)] [--color-chart-4:var(--ic-chart-4)] [--color-chart-5:var(--ic-chart-5)] dark:[--ic-background:#111111] dark:[--ic-foreground:#f6f3ec] dark:[--ic-primary:#f6f3ec] dark:[--ic-secondary:#cbc6bb] dark:[--ic-surface-border:#2a2a25] dark:[--ic-border:#2b2a25] dark:[--ic-card:#111111] dark:[--ic-card-foreground:#f6f3ec] dark:[--ic-muted:#171716] dark:[--ic-muted-foreground:#9a958a] dark:[--ic-accent:#1a1a18] [--color-accent:var(--ic-accent)] [--color-accent-foreground:var(--ic-accent-foreground)] dark:[--ic-accent-foreground:#f6f3ec] dark:[--ic-input:#2b2a25] dark:[--ic-ring:rgba(246,243,236,0.18)] dark:[--ic-destructive:#f87171] dark:[--ic-paper:#171716] dark:[--ic-popover-foreground:#f6f3ec] dark:[--ic-brand:#38bdf8] dark:[--ic-brand-soft:#0c4a6e] dark:[--ic-shadow-soft:0_20px_44px_-28px_rgba(0,0,0,0.6)] dark:[--ic-chart-1:oklch(0.68_0.17_250)] dark:[--ic-chart-2:oklch(0.82_0.09_225)] dark:[--ic-chart-3:oklch(0.58_0.15_260)] dark:[--ic-chart-4:oklch(0.75_0.12_235)] dark:[--ic-chart-5:oklch(0.88_0.06_220)]";
|
|
9
|
+
var STYLE_ID = "iconiq-skeleton-styles";
|
|
10
|
+
var SKELETON_CSS = `
|
|
11
|
+
@keyframes iconiq-skeleton-shimmer {
|
|
12
|
+
to {
|
|
13
|
+
transform: translateX(200%);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@keyframes iconiq-skeleton-fade {
|
|
18
|
+
0%,
|
|
19
|
+
100% {
|
|
20
|
+
opacity: 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
50% {
|
|
24
|
+
opacity: 0.38;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.iconiq-skeleton-surface {
|
|
29
|
+
background-color: #f5f7fa;
|
|
30
|
+
background-color: var(--ic-muted);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.iconiq-skeleton-shimmer {
|
|
34
|
+
background: linear-gradient(
|
|
35
|
+
90deg,
|
|
36
|
+
transparent 0%,
|
|
37
|
+
rgba(17, 17, 17, 0.06) 50%,
|
|
38
|
+
transparent 100%
|
|
39
|
+
);
|
|
40
|
+
background: linear-gradient(
|
|
41
|
+
90deg,
|
|
42
|
+
transparent 0%,
|
|
43
|
+
color-mix(in srgb, var(--ic-foreground) 6%, transparent) 50%,
|
|
44
|
+
transparent 100%
|
|
45
|
+
);
|
|
46
|
+
animation: iconiq-skeleton-shimmer var(--iconiq-skeleton-duration, 1.6s)
|
|
47
|
+
ease-in-out infinite;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.iconiq-skeleton-fade-root {
|
|
51
|
+
animation: iconiq-skeleton-fade var(--iconiq-skeleton-duration, 2.4s)
|
|
52
|
+
ease-in-out infinite;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@media (prefers-reduced-motion: reduce) {
|
|
56
|
+
.iconiq-skeleton-shimmer,
|
|
57
|
+
.iconiq-skeleton-fade-root {
|
|
58
|
+
animation: none;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
var skeletonRoundedClasses = {
|
|
63
|
+
none: "rounded-none",
|
|
64
|
+
sm: "rounded-sm",
|
|
65
|
+
md: "rounded-md",
|
|
66
|
+
lg: "rounded-lg",
|
|
67
|
+
full: "rounded-full"
|
|
68
|
+
};
|
|
69
|
+
var skeletonVariantDefaultDuration = {
|
|
70
|
+
shimmer: 1.6,
|
|
71
|
+
fade: 2.4
|
|
72
|
+
};
|
|
73
|
+
function getSkeletonVariantDuration(variant, duration = 1.6) {
|
|
74
|
+
if (duration !== 1.6) {
|
|
75
|
+
return duration;
|
|
76
|
+
}
|
|
77
|
+
return skeletonVariantDefaultDuration[variant];
|
|
78
|
+
}
|
|
79
|
+
function ensureSkeletonStyles() {
|
|
80
|
+
if (typeof document === "undefined") {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
let style = document.getElementById(STYLE_ID);
|
|
84
|
+
if (!style) {
|
|
85
|
+
style = document.createElement("style");
|
|
86
|
+
style.id = STYLE_ID;
|
|
87
|
+
document.head.appendChild(style);
|
|
88
|
+
}
|
|
89
|
+
style.textContent = SKELETON_CSS;
|
|
90
|
+
}
|
|
91
|
+
function resolveSkeletonA11yProps({
|
|
92
|
+
animate = true,
|
|
93
|
+
decorative = true,
|
|
94
|
+
label
|
|
95
|
+
}) {
|
|
96
|
+
if (decorative || label === null) {
|
|
97
|
+
return { "aria-hidden": true };
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
"aria-label": label ?? (animate ? "Loading" : "Placeholder"),
|
|
101
|
+
"aria-live": "polite",
|
|
102
|
+
role: "status"
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
var Skeleton = forwardRef(function Skeleton2({
|
|
106
|
+
animate = true,
|
|
107
|
+
className,
|
|
108
|
+
decorative = true,
|
|
109
|
+
duration = 1.6,
|
|
110
|
+
label,
|
|
111
|
+
rounded = "md",
|
|
112
|
+
style,
|
|
113
|
+
variant = "shimmer",
|
|
114
|
+
...props
|
|
115
|
+
}, ref) {
|
|
116
|
+
const variantDuration = getSkeletonVariantDuration(variant, duration);
|
|
117
|
+
const showShimmer = animate && variant === "shimmer";
|
|
118
|
+
const showFade = animate && variant === "fade";
|
|
119
|
+
useLayoutEffect(() => {
|
|
120
|
+
if (animate) {
|
|
121
|
+
ensureSkeletonStyles();
|
|
122
|
+
}
|
|
123
|
+
}, [animate]);
|
|
124
|
+
const animatedStyle = showShimmer || showFade ? {
|
|
125
|
+
...style,
|
|
126
|
+
"--iconiq-skeleton-duration": `${variantDuration}s`
|
|
127
|
+
} : style;
|
|
128
|
+
return /* @__PURE__ */ jsx(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
className: cn(
|
|
132
|
+
componentThemeClassName,
|
|
133
|
+
"iconiq-skeleton-surface relative block h-4 w-full overflow-hidden",
|
|
134
|
+
showFade && "iconiq-skeleton-fade-root",
|
|
135
|
+
skeletonRoundedClasses[rounded],
|
|
136
|
+
className
|
|
137
|
+
),
|
|
138
|
+
ref,
|
|
139
|
+
style: animatedStyle,
|
|
140
|
+
...resolveSkeletonA11yProps({ animate, decorative, label }),
|
|
141
|
+
...props,
|
|
142
|
+
children: showShimmer ? /* @__PURE__ */ jsx(
|
|
143
|
+
"span",
|
|
144
|
+
{
|
|
145
|
+
"aria-hidden": "true",
|
|
146
|
+
className: "iconiq-skeleton-shimmer pointer-events-none absolute inset-0 -translate-x-full"
|
|
147
|
+
}
|
|
148
|
+
) : null
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
});
|
|
152
|
+
Skeleton.displayName = "Skeleton";
|
|
153
|
+
function SkeletonAvatar({
|
|
154
|
+
className,
|
|
155
|
+
...props
|
|
156
|
+
}) {
|
|
157
|
+
return /* @__PURE__ */ jsx(
|
|
158
|
+
Skeleton,
|
|
159
|
+
{
|
|
160
|
+
className: cn("size-10", className),
|
|
161
|
+
decorative: true,
|
|
162
|
+
rounded: "full",
|
|
163
|
+
...props
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
function SkeletonText({ className, ...props }) {
|
|
168
|
+
return /* @__PURE__ */ jsx(Skeleton, { className: cn("h-3", className), decorative: true, ...props });
|
|
169
|
+
}
|
|
170
|
+
function SkeletonButton({
|
|
171
|
+
className,
|
|
172
|
+
...props
|
|
173
|
+
}) {
|
|
174
|
+
return /* @__PURE__ */ jsx(
|
|
175
|
+
Skeleton,
|
|
176
|
+
{
|
|
177
|
+
className: cn("h-9 w-24", className),
|
|
178
|
+
decorative: true,
|
|
179
|
+
rounded: "lg",
|
|
180
|
+
...props
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
var ShimmerSkeleton = Skeleton;
|
|
185
|
+
var skeleton_default = Skeleton;
|
|
186
|
+
|
|
187
|
+
export {
|
|
188
|
+
skeletonRoundedClasses,
|
|
189
|
+
skeletonVariantDefaultDuration,
|
|
190
|
+
getSkeletonVariantDuration,
|
|
191
|
+
resolveSkeletonA11yProps,
|
|
192
|
+
Skeleton,
|
|
193
|
+
SkeletonAvatar,
|
|
194
|
+
SkeletonText,
|
|
195
|
+
SkeletonButton,
|
|
196
|
+
ShimmerSkeleton,
|
|
197
|
+
skeleton_default
|
|
198
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./chunk-RT2YVQ2Y.js";
|
|
2
|
+
TooltipProvider
|
|
3
|
+
} from "./chunk-GBVAFFZR.js";
|
|
5
4
|
import {
|
|
6
5
|
TopLoader
|
|
7
6
|
} from "./chunk-3ZGQJTWY.js";
|
|
8
7
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
useFullscreen,
|
|
9
|
+
useNative
|
|
10
|
+
} from "./chunk-RT2YVQ2Y.js";
|
|
11
11
|
|
|
12
12
|
// src/provider.tsx
|
|
13
13
|
import { usePathname } from "next/navigation";
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Empty,
|
|
3
|
+
EmptyContent,
|
|
4
|
+
EmptyDescription,
|
|
5
|
+
EmptyHeader,
|
|
6
|
+
EmptyTitle
|
|
7
|
+
} from "./chunk-OSVLAX37.js";
|
|
8
|
+
import {
|
|
9
|
+
useMounted
|
|
10
|
+
} from "./chunk-G4NDAZTB.js";
|
|
11
|
+
import {
|
|
12
|
+
Button
|
|
13
|
+
} from "./chunk-DVNTJNDP.js";
|
|
14
|
+
|
|
15
|
+
// src/ui/jelly.tsx
|
|
16
|
+
import {
|
|
17
|
+
BlobSpeech,
|
|
18
|
+
JellyBlobMascot
|
|
19
|
+
} from "feral-blob";
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import { cn } from "cn";
|
|
22
|
+
import {
|
|
23
|
+
BlobSpeech as BlobSpeech2,
|
|
24
|
+
JellyBlobMascot as JellyBlobMascot2,
|
|
25
|
+
JellyBlobMascotDemo
|
|
26
|
+
} from "feral-blob";
|
|
27
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
28
|
+
function JellyBlob({ ...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsx("span", { className: "inline-block", children: /* @__PURE__ */ jsx(
|
|
30
|
+
JellyBlobMascot,
|
|
31
|
+
{
|
|
32
|
+
...props,
|
|
33
|
+
className: cn("h-auto w-full", props.className)
|
|
34
|
+
}
|
|
35
|
+
) });
|
|
36
|
+
}
|
|
37
|
+
var MOOD_GAZE = {
|
|
38
|
+
neutral: { x: 0, y: 8 },
|
|
39
|
+
happy: { x: 18, y: -6 },
|
|
40
|
+
sad: { x: 0, y: 14 },
|
|
41
|
+
angry: { x: 10, y: 2 },
|
|
42
|
+
hmm: { x: 10, y: -4 },
|
|
43
|
+
sideEye: { x: 30, y: 0 },
|
|
44
|
+
password: { x: -14, y: 16 },
|
|
45
|
+
curious: { x: 18, y: -8 },
|
|
46
|
+
surprised: { x: 0, y: -10 },
|
|
47
|
+
sleepy: { x: 0, y: 14 },
|
|
48
|
+
shy: { x: -12, y: 4 },
|
|
49
|
+
love: { x: 0, y: -4 },
|
|
50
|
+
wave: { x: 20, y: -8 }
|
|
51
|
+
};
|
|
52
|
+
function JellyMini({
|
|
53
|
+
mood = "neutral",
|
|
54
|
+
gaze,
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}) {
|
|
58
|
+
const { mounted } = useMounted();
|
|
59
|
+
return /* @__PURE__ */ jsx(
|
|
60
|
+
"span",
|
|
61
|
+
{
|
|
62
|
+
"aria-hidden": "true",
|
|
63
|
+
className: cn(
|
|
64
|
+
"inline-flex size-5 shrink-0 items-center justify-center select-none",
|
|
65
|
+
className
|
|
66
|
+
),
|
|
67
|
+
children: mounted ? /* @__PURE__ */ jsx(
|
|
68
|
+
JellyBlobMascot,
|
|
69
|
+
{
|
|
70
|
+
...props,
|
|
71
|
+
mood,
|
|
72
|
+
gaze: gaze ?? MOOD_GAZE[mood],
|
|
73
|
+
className: "h-auto w-full"
|
|
74
|
+
}
|
|
75
|
+
) : null
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
var JellyMascotContext = React.createContext(null);
|
|
80
|
+
function useJellyMood() {
|
|
81
|
+
const state = React.useContext(JellyMascotContext);
|
|
82
|
+
return React.useCallback(
|
|
83
|
+
(mood) => {
|
|
84
|
+
if (!mood || !state) return {};
|
|
85
|
+
return {
|
|
86
|
+
onPointerEnter: () => state.setPreview(mood),
|
|
87
|
+
onFocus: () => state.setPreview(mood),
|
|
88
|
+
onPointerLeave: () => state.setPreview(null),
|
|
89
|
+
onBlur: () => state.setPreview(null)
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
[state]
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
function withPreviewHandlers(preview, props) {
|
|
96
|
+
const handlers = preview(props.mood);
|
|
97
|
+
return {
|
|
98
|
+
onPointerEnter: props.onPointerEnter ?? handlers.onPointerEnter,
|
|
99
|
+
onPointerLeave: props.onPointerLeave ?? handlers.onPointerLeave,
|
|
100
|
+
onFocus: props.onFocus ?? handlers.onFocus,
|
|
101
|
+
onBlur: props.onBlur ?? handlers.onBlur
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function JellyAction({
|
|
105
|
+
mood,
|
|
106
|
+
...props
|
|
107
|
+
}) {
|
|
108
|
+
const preview = useJellyMood();
|
|
109
|
+
return /* @__PURE__ */ jsx(Button, { ...props, ...withPreviewHandlers(preview, { ...props, mood }) });
|
|
110
|
+
}
|
|
111
|
+
function JellyLink({
|
|
112
|
+
mood,
|
|
113
|
+
...props
|
|
114
|
+
}) {
|
|
115
|
+
const preview = useJellyMood();
|
|
116
|
+
return /* @__PURE__ */ jsx("a", { ...props, ...withPreviewHandlers(preview, { ...props, mood }) });
|
|
117
|
+
}
|
|
118
|
+
function JellyMascotProvider({
|
|
119
|
+
mood = "neutral",
|
|
120
|
+
speech,
|
|
121
|
+
children,
|
|
122
|
+
...blobProps
|
|
123
|
+
}) {
|
|
124
|
+
const { mounted } = useMounted();
|
|
125
|
+
const [previewMood, setPreviewMood] = React.useState(
|
|
126
|
+
null
|
|
127
|
+
);
|
|
128
|
+
const activeMood = previewMood ?? mood;
|
|
129
|
+
const value = {
|
|
130
|
+
mood: activeMood,
|
|
131
|
+
speech,
|
|
132
|
+
nod: blobProps.nod ?? false,
|
|
133
|
+
gaze: blobProps.gaze ?? MOOD_GAZE[activeMood],
|
|
134
|
+
mounted,
|
|
135
|
+
blobProps,
|
|
136
|
+
setPreview: setPreviewMood
|
|
137
|
+
};
|
|
138
|
+
return /* @__PURE__ */ jsx(JellyMascotContext.Provider, { value, children });
|
|
139
|
+
}
|
|
140
|
+
var SIZE_WRAPPER = {
|
|
141
|
+
sm: "w-20",
|
|
142
|
+
md: "w-28",
|
|
143
|
+
lg: "w-48",
|
|
144
|
+
auto: "w-auto"
|
|
145
|
+
};
|
|
146
|
+
function JellyMascotFace({
|
|
147
|
+
size = "md",
|
|
148
|
+
className
|
|
149
|
+
}) {
|
|
150
|
+
const mascot = React.useContext(JellyMascotContext);
|
|
151
|
+
if (!mascot) return null;
|
|
152
|
+
return /* @__PURE__ */ jsxs(
|
|
153
|
+
"div",
|
|
154
|
+
{
|
|
155
|
+
"aria-hidden": "true",
|
|
156
|
+
className: cn(
|
|
157
|
+
"flex flex-col items-center select-none",
|
|
158
|
+
SIZE_WRAPPER[size],
|
|
159
|
+
className
|
|
160
|
+
),
|
|
161
|
+
children: [
|
|
162
|
+
mascot.speech ? /* @__PURE__ */ jsx(
|
|
163
|
+
BlobSpeech,
|
|
164
|
+
{
|
|
165
|
+
mood: mascot.mood,
|
|
166
|
+
messages: { [mascot.mood]: mascot.speech }
|
|
167
|
+
}
|
|
168
|
+
) : null,
|
|
169
|
+
mascot.mounted ? /* @__PURE__ */ jsx(
|
|
170
|
+
JellyBlobMascot,
|
|
171
|
+
{
|
|
172
|
+
...mascot.blobProps,
|
|
173
|
+
mood: mascot.mood,
|
|
174
|
+
gaze: mascot.gaze,
|
|
175
|
+
nod: mascot.nod,
|
|
176
|
+
className: "h-auto w-full"
|
|
177
|
+
}
|
|
178
|
+
) : null
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
function JellyMascot({
|
|
184
|
+
size = "md",
|
|
185
|
+
className,
|
|
186
|
+
...config
|
|
187
|
+
}) {
|
|
188
|
+
const existing = React.useContext(JellyMascotContext);
|
|
189
|
+
if (existing) return /* @__PURE__ */ jsx(JellyMascotFace, { size, className });
|
|
190
|
+
return /* @__PURE__ */ jsx(JellyMascotProvider, { ...config, children: /* @__PURE__ */ jsx(JellyMascotFace, { size, className }) });
|
|
191
|
+
}
|
|
192
|
+
function JellyGroup({
|
|
193
|
+
children,
|
|
194
|
+
...config
|
|
195
|
+
}) {
|
|
196
|
+
return /* @__PURE__ */ jsx(JellyMascotProvider, { ...config, children });
|
|
197
|
+
}
|
|
198
|
+
function JellyEmpty({
|
|
199
|
+
title,
|
|
200
|
+
description,
|
|
201
|
+
actions,
|
|
202
|
+
size = "lg",
|
|
203
|
+
className,
|
|
204
|
+
...config
|
|
205
|
+
}) {
|
|
206
|
+
return /* @__PURE__ */ jsx(JellyMascotProvider, { ...config, children: /* @__PURE__ */ jsxs(Empty, { className: cn("gap-4", className), children: [
|
|
207
|
+
/* @__PURE__ */ jsxs(EmptyHeader, { className: "gap-2", children: [
|
|
208
|
+
/* @__PURE__ */ jsx(JellyMascotFace, { size }),
|
|
209
|
+
title ? /* @__PURE__ */ jsx(EmptyTitle, { className: "text-base font-semibold sm:text-lg", children: title }) : null,
|
|
210
|
+
description ? /* @__PURE__ */ jsx(EmptyDescription, { className: "max-w-sm", children: description }) : null
|
|
211
|
+
] }),
|
|
212
|
+
actions ? /* @__PURE__ */ jsx(EmptyContent, { children: actions }) : null
|
|
213
|
+
] }) });
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export {
|
|
217
|
+
JellyBlob,
|
|
218
|
+
JellyMini,
|
|
219
|
+
useJellyMood,
|
|
220
|
+
JellyAction,
|
|
221
|
+
JellyLink,
|
|
222
|
+
JellyMascot,
|
|
223
|
+
JellyGroup,
|
|
224
|
+
JellyEmpty,
|
|
225
|
+
BlobSpeech2 as BlobSpeech,
|
|
226
|
+
JellyBlobMascot2 as JellyBlobMascot,
|
|
227
|
+
JellyBlobMascotDemo
|
|
228
|
+
};
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
// src/ui/apple/hindi.tsx
|
|
2
|
+
import { motion } from "motion/react";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
var initialProps = {
|
|
6
|
+
pathLength: 0,
|
|
7
|
+
opacity: 0
|
|
8
|
+
};
|
|
9
|
+
var animateProps = {
|
|
10
|
+
pathLength: 1,
|
|
11
|
+
opacity: 1
|
|
12
|
+
};
|
|
13
|
+
function AppleHelloEffectHindi({
|
|
14
|
+
className,
|
|
15
|
+
durationScale = 0.8,
|
|
16
|
+
onAnimationComplete,
|
|
17
|
+
...props
|
|
18
|
+
}) {
|
|
19
|
+
const calc = (x) => x * durationScale;
|
|
20
|
+
return /* @__PURE__ */ jsxs(
|
|
21
|
+
motion.svg,
|
|
22
|
+
{
|
|
23
|
+
className: cn("h-20", className),
|
|
24
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25
|
+
viewBox: "0 0 605 273",
|
|
26
|
+
fill: "none",
|
|
27
|
+
stroke: "currentColor",
|
|
28
|
+
strokeWidth: "14.888",
|
|
29
|
+
strokeLinecap: "round",
|
|
30
|
+
initial: { opacity: 1 },
|
|
31
|
+
exit: { opacity: 0 },
|
|
32
|
+
transition: { duration: 0.5 },
|
|
33
|
+
...props,
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsx("title", { children: "\u0928\u092E\u0938\u094D\u0924\u0947" }),
|
|
36
|
+
/* @__PURE__ */ jsx(
|
|
37
|
+
motion.path,
|
|
38
|
+
{
|
|
39
|
+
d: "M42.3842 150.002C53.2928 153.473 60.4984 162.29 60.4984 175.561C60.4984 189.953 50.3247 201.119 36.677 201.119C24.022 201.119 14.8408 192.186 14.8408 179.035C14.8408 160.269 31.2182 148.265 56.5282 149.01C82.0863 149.754 103.723 163.663 120.367 185.069",
|
|
40
|
+
initial: initialProps,
|
|
41
|
+
animate: animateProps,
|
|
42
|
+
transition: {
|
|
43
|
+
duration: calc(0.6),
|
|
44
|
+
ease: "easeOut",
|
|
45
|
+
opacity: { duration: 0.2 }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ jsx(
|
|
50
|
+
motion.path,
|
|
51
|
+
{
|
|
52
|
+
d: "M133.502 93.5842C124.459 153.875 117.303 209.683 111.71 264.988",
|
|
53
|
+
initial: initialProps,
|
|
54
|
+
animate: animateProps,
|
|
55
|
+
transition: {
|
|
56
|
+
duration: calc(0.4),
|
|
57
|
+
ease: "easeOut",
|
|
58
|
+
delay: calc(0.6),
|
|
59
|
+
opacity: { duration: 0.2, delay: calc(0.6) }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ jsx(
|
|
64
|
+
motion.path,
|
|
65
|
+
{
|
|
66
|
+
d: "M216.556 90.9181C217.117 117.977 216.81 137.689 214.869 160.067C212.007 193.058 200.119 213.115 180.936 213.115C169.295 213.115 160.844 205.334 160.844 193.399C160.844 177.222 175.901 164.28 203.653 165.376C229.863 166.411 256.651 174.863 275.138 192.025",
|
|
67
|
+
initial: initialProps,
|
|
68
|
+
animate: animateProps,
|
|
69
|
+
transition: {
|
|
70
|
+
duration: calc(0.6),
|
|
71
|
+
ease: "easeOut",
|
|
72
|
+
delay: calc(1),
|
|
73
|
+
opacity: { duration: 0.2, delay: calc(1) }
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ jsx(
|
|
78
|
+
motion.path,
|
|
79
|
+
{
|
|
80
|
+
d: "M289.489 90.0085C280.255 150.162 272.672 207.783 267.379 263.003",
|
|
81
|
+
initial: initialProps,
|
|
82
|
+
animate: animateProps,
|
|
83
|
+
transition: {
|
|
84
|
+
duration: calc(0.4),
|
|
85
|
+
ease: "easeOut",
|
|
86
|
+
delay: calc(1.6),
|
|
87
|
+
opacity: { duration: 0.2, delay: calc(1.6) }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ jsx(
|
|
92
|
+
motion.path,
|
|
93
|
+
{
|
|
94
|
+
d: "M373.949 90.0198C394.816 102.051 408.098 128.602 408.098 154.079C408.098 185.141 387.465 205.586 358.47 205.586C330.249 205.586 311.145 186.038 317.527 170.35C322.864 157.231 341.378 156.812 356.237 168.861C374.674 183.811 382.044 216.764 385.021 261.169",
|
|
95
|
+
initial: initialProps,
|
|
96
|
+
animate: animateProps,
|
|
97
|
+
transition: {
|
|
98
|
+
duration: calc(0.6),
|
|
99
|
+
ease: "easeOut",
|
|
100
|
+
delay: calc(2),
|
|
101
|
+
opacity: { duration: 0.2, delay: calc(2) }
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ jsx(
|
|
106
|
+
motion.path,
|
|
107
|
+
{
|
|
108
|
+
d: "M403.474 177.549C418.085 183.32 439.163 184.314 458.424 179.805",
|
|
109
|
+
initial: initialProps,
|
|
110
|
+
animate: animateProps,
|
|
111
|
+
transition: {
|
|
112
|
+
duration: calc(0.4),
|
|
113
|
+
ease: "easeOut",
|
|
114
|
+
delay: calc(2.6),
|
|
115
|
+
opacity: { duration: 0.2, delay: calc(2.6) }
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
/* @__PURE__ */ jsx(
|
|
120
|
+
motion.path,
|
|
121
|
+
{
|
|
122
|
+
d: "M556.981 88.1333C546.807 149.619 538.371 207.01 531.919 262.906",
|
|
123
|
+
initial: initialProps,
|
|
124
|
+
animate: animateProps,
|
|
125
|
+
transition: {
|
|
126
|
+
duration: calc(0.4),
|
|
127
|
+
ease: "easeOut",
|
|
128
|
+
delay: calc(3),
|
|
129
|
+
opacity: { duration: 0.2, delay: calc(3) }
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
/* @__PURE__ */ jsx(
|
|
134
|
+
motion.path,
|
|
135
|
+
{
|
|
136
|
+
d: "M536.891 222.462C541.984 183.336 528.689 152.484 496.435 152.484C472.365 152.484 453.755 175.064 453.755 203.104C453.755 223.451 461.199 245.784 475.095 261.417",
|
|
137
|
+
initial: initialProps,
|
|
138
|
+
animate: animateProps,
|
|
139
|
+
transition: {
|
|
140
|
+
duration: calc(0.6),
|
|
141
|
+
ease: "easeOut",
|
|
142
|
+
delay: calc(3.4),
|
|
143
|
+
opacity: { duration: 0.2, delay: calc(3.4) }
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
),
|
|
147
|
+
/* @__PURE__ */ jsx(
|
|
148
|
+
motion.path,
|
|
149
|
+
{
|
|
150
|
+
d: "M521.259 45.4307C485.619 43.0134 474.856 32.3917 474.856 21.5298C474.856 12.832 482.71 7.04349 493.506 7.46568C518.289 8.37031 542.96 35.3336 555.578 70.4412",
|
|
151
|
+
initial: initialProps,
|
|
152
|
+
animate: animateProps,
|
|
153
|
+
transition: {
|
|
154
|
+
duration: calc(0.6),
|
|
155
|
+
ease: "easeOut",
|
|
156
|
+
delay: calc(4),
|
|
157
|
+
opacity: { duration: 0.2, delay: calc(4) }
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ jsx(
|
|
162
|
+
motion.path,
|
|
163
|
+
{
|
|
164
|
+
d: "M7.44434 88.6792C30.9102 88.8706 59.0093 89.2085 95.3706 89.2085C132.178 89.2085 208.165 89.2571 253.623 89.2047C295.091 89.1568 396.683 89.0223 452.784 89.0234C506.182 89.0244 552.847 88.4444 596.931 87.2836",
|
|
165
|
+
initial: initialProps,
|
|
166
|
+
animate: animateProps,
|
|
167
|
+
transition: {
|
|
168
|
+
duration: calc(0.8),
|
|
169
|
+
ease: "easeOut",
|
|
170
|
+
delay: calc(4.6),
|
|
171
|
+
opacity: { duration: 0.2, delay: calc(4.6) }
|
|
172
|
+
},
|
|
173
|
+
onAnimationComplete
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export {
|
|
182
|
+
AppleHelloEffectHindi
|
|
183
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// src/ui/input.tsx
|
|
2
|
+
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
function Input({
|
|
6
|
+
className,
|
|
7
|
+
type,
|
|
8
|
+
inputMode,
|
|
9
|
+
onWheel,
|
|
10
|
+
...props
|
|
11
|
+
}) {
|
|
12
|
+
const isNumberInput = type === "number";
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
InputPrimitive,
|
|
15
|
+
{
|
|
16
|
+
type,
|
|
17
|
+
"data-slot": "input",
|
|
18
|
+
inputMode: isNumberInput ? "decimal" : inputMode,
|
|
19
|
+
onWheel: isNumberInput ? (event) => {
|
|
20
|
+
event.currentTarget.blur();
|
|
21
|
+
onWheel?.(event);
|
|
22
|
+
} : onWheel,
|
|
23
|
+
className: cn(
|
|
24
|
+
"h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
25
|
+
isNumberInput && "[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
26
|
+
className
|
|
27
|
+
),
|
|
28
|
+
...props
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
Input
|
|
35
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// src/ui/kbd.tsx
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
function Kbd({ className, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
"kbd",
|
|
7
|
+
{
|
|
8
|
+
"data-slot": "kbd",
|
|
9
|
+
className: cn(
|
|
10
|
+
"pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3",
|
|
11
|
+
className
|
|
12
|
+
),
|
|
13
|
+
...props
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function KbdGroup({ className, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
"kbd",
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "kbd-group",
|
|
22
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
23
|
+
...props
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
Kbd,
|
|
30
|
+
KbdGroup
|
|
31
|
+
};
|