@waveso/ui 0.7.7 → 0.8.0
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 +2 -3
- package/dist/accordion.d.ts +1 -2
- package/dist/accordion.js +0 -2
- package/dist/action-bar.d.ts +1 -2
- package/dist/action-bar.js +23 -10
- package/dist/alert-dialog.d.ts +1 -2
- package/dist/alert-dialog.js +0 -2
- package/dist/alert.d.ts +1 -2
- package/dist/alert.js +2 -4
- package/dist/animate.d.ts +1 -2
- package/dist/animate.js +34 -8
- package/dist/aspect-ratio.d.ts +1 -2
- package/dist/aspect-ratio.js +0 -2
- package/dist/autocomplete.d.ts +1 -2
- package/dist/autocomplete.js +0 -2
- package/dist/avatar.d.ts +1 -2
- package/dist/avatar.js +1 -3
- package/dist/badge.d.ts +2 -3
- package/dist/badge.js +0 -2
- package/dist/breadcrumb.d.ts +1 -2
- package/dist/breadcrumb.js +0 -2
- package/dist/button-group.d.ts +1 -2
- package/dist/button-group.js +0 -2
- package/dist/button.d.ts +3 -4
- package/dist/button.js +0 -2
- package/dist/card.d.ts +1 -2
- package/dist/card.js +0 -2
- package/dist/checkbox.d.ts +1 -2
- package/dist/checkbox.js +6 -8
- package/dist/collapsible.d.ts +1 -2
- package/dist/collapsible.js +0 -2
- package/dist/combobox.d.ts +1 -2
- package/dist/combobox.js +0 -2
- package/dist/context-menu.d.ts +1 -2
- package/dist/context-menu.js +1 -3
- package/dist/count.d.ts +1 -2
- package/dist/count.js +10 -7
- package/dist/dialog.d.ts +1 -2
- package/dist/dialog.js +0 -2
- package/dist/drawer.d.ts +1 -2
- package/dist/drawer.js +0 -2
- package/dist/encrypted-text.d.ts +1 -2
- package/dist/encrypted-text.js +4 -5
- package/dist/field.d.ts +1 -2
- package/dist/field.js +2 -4
- package/dist/film-grain-shader.d.ts +1 -2
- package/dist/film-grain-shader.js +0 -2
- package/dist/film-grain-webgl.d.ts +1 -4
- package/dist/film-grain-webgl.js +7 -6
- package/dist/film-grain.d.ts +1 -2
- package/dist/film-grain.js +0 -3
- package/dist/form.d.ts +1 -2
- package/dist/form.js +0 -2
- package/dist/gradient-reveal-text.d.ts +1 -2
- package/dist/gradient-reveal-text.js +29 -7
- package/dist/hooks/use-mobile.d.ts +1 -2
- package/dist/hooks/use-mobile.js +0 -2
- package/dist/infinite-scroll.d.ts +1 -2
- package/dist/infinite-scroll.js +10 -5
- package/dist/input-group.d.ts +2 -3
- package/dist/input-group.js +1 -3
- package/dist/input-otp.d.ts +1 -2
- package/dist/input-otp.js +3 -5
- package/dist/input.d.ts +1 -2
- package/dist/input.js +0 -2
- package/dist/item.d.ts +1 -2
- package/dist/item.js +2 -4
- package/dist/kbd.d.ts +1 -2
- package/dist/kbd.js +0 -2
- package/dist/label.d.ts +1 -2
- package/dist/label.js +0 -2
- package/dist/lib/focus.d.ts +1 -2
- package/dist/lib/focus.js +0 -2
- package/dist/lib/internal-icons.d.ts +1 -2
- package/dist/lib/internal-icons.js +0 -2
- package/dist/lib/utils.d.ts +1 -2
- package/dist/lib/utils.js +0 -2
- package/dist/masonry.d.ts +1 -2
- package/dist/masonry.js +0 -2
- package/dist/menu.d.ts +1 -2
- package/dist/menu.js +1 -3
- package/dist/menubar.d.ts +1 -2
- package/dist/menubar.js +1 -3
- package/dist/pagination.d.ts +1 -2
- package/dist/pagination.js +0 -2
- package/dist/popover.d.ts +1 -2
- package/dist/popover.js +0 -2
- package/dist/preview-card.d.ts +1 -2
- package/dist/preview-card.js +0 -2
- package/dist/progress.d.ts +1 -2
- package/dist/progress.js +0 -2
- package/dist/radio-group.d.ts +1 -2
- package/dist/radio-group.js +0 -2
- package/dist/radio.d.ts +1 -2
- package/dist/radio.js +1 -3
- package/dist/scroll-area.d.ts +1 -2
- package/dist/scroll-area.js +0 -2
- package/dist/select.d.ts +1 -2
- package/dist/select.js +0 -3
- package/dist/separator.d.ts +1 -2
- package/dist/separator.js +0 -2
- package/dist/sidebar.d.ts +1 -2
- package/dist/sidebar.js +0 -2
- package/dist/skeleton.d.ts +1 -2
- package/dist/skeleton.js +0 -2
- package/dist/slider.d.ts +1 -2
- package/dist/slider.js +0 -2
- package/dist/spinner.d.ts +1 -2
- package/dist/spinner.js +0 -2
- package/dist/switch.d.ts +7 -5
- package/dist/switch.js +18 -6
- package/dist/table.d.ts +1 -2
- package/dist/table.js +0 -2
- package/dist/tabs.d.ts +1 -2
- package/dist/tabs.js +0 -2
- package/dist/textarea.d.ts +1 -2
- package/dist/textarea.js +0 -2
- package/dist/toast.d.ts +1 -2
- package/dist/toast.js +1 -3
- package/dist/toggle-group.d.ts +2 -2
- package/dist/toggle-group.js +5 -4
- package/dist/toggle.d.ts +1 -2
- package/dist/toggle.js +0 -2
- package/dist/tooltip.d.ts +1 -2
- package/dist/tooltip.js +0 -2
- package/dist/typewriter.d.ts +1 -2
- package/dist/typewriter.js +6 -2
- package/package.json +24 -8
- package/dist/accordion.d.ts.map +0 -1
- package/dist/accordion.js.map +0 -1
- package/dist/action-bar.d.ts.map +0 -1
- package/dist/action-bar.js.map +0 -1
- package/dist/alert-dialog.d.ts.map +0 -1
- package/dist/alert-dialog.js.map +0 -1
- package/dist/alert.d.ts.map +0 -1
- package/dist/alert.js.map +0 -1
- package/dist/animate.d.ts.map +0 -1
- package/dist/animate.js.map +0 -1
- package/dist/aspect-ratio.d.ts.map +0 -1
- package/dist/aspect-ratio.js.map +0 -1
- package/dist/autocomplete.d.ts.map +0 -1
- package/dist/autocomplete.js.map +0 -1
- package/dist/avatar.d.ts.map +0 -1
- package/dist/avatar.js.map +0 -1
- package/dist/badge.d.ts.map +0 -1
- package/dist/badge.js.map +0 -1
- package/dist/breadcrumb.d.ts.map +0 -1
- package/dist/breadcrumb.js.map +0 -1
- package/dist/button-group.d.ts.map +0 -1
- package/dist/button-group.js.map +0 -1
- package/dist/button.d.ts.map +0 -1
- package/dist/button.js.map +0 -1
- package/dist/card.d.ts.map +0 -1
- package/dist/card.js.map +0 -1
- package/dist/checkbox.d.ts.map +0 -1
- package/dist/checkbox.js.map +0 -1
- package/dist/collapsible.d.ts.map +0 -1
- package/dist/collapsible.js.map +0 -1
- package/dist/combobox.d.ts.map +0 -1
- package/dist/combobox.js.map +0 -1
- package/dist/context-menu.d.ts.map +0 -1
- package/dist/context-menu.js.map +0 -1
- package/dist/count.d.ts.map +0 -1
- package/dist/count.js.map +0 -1
- package/dist/dialog.d.ts.map +0 -1
- package/dist/dialog.js.map +0 -1
- package/dist/drawer.d.ts.map +0 -1
- package/dist/drawer.js.map +0 -1
- package/dist/encrypted-text.d.ts.map +0 -1
- package/dist/encrypted-text.js.map +0 -1
- package/dist/field.d.ts.map +0 -1
- package/dist/field.js.map +0 -1
- package/dist/film-grain-shader.d.ts.map +0 -1
- package/dist/film-grain-shader.js.map +0 -1
- package/dist/film-grain-webgl.d.ts.map +0 -1
- package/dist/film-grain-webgl.js.map +0 -1
- package/dist/film-grain.d.ts.map +0 -1
- package/dist/film-grain.js.map +0 -1
- package/dist/form.d.ts.map +0 -1
- package/dist/form.js.map +0 -1
- package/dist/gradient-reveal-text.d.ts.map +0 -1
- package/dist/gradient-reveal-text.js.map +0 -1
- package/dist/hooks/use-mobile.d.ts.map +0 -1
- package/dist/hooks/use-mobile.js.map +0 -1
- package/dist/infinite-scroll.d.ts.map +0 -1
- package/dist/infinite-scroll.js.map +0 -1
- package/dist/input-group.d.ts.map +0 -1
- package/dist/input-group.js.map +0 -1
- package/dist/input-otp.d.ts.map +0 -1
- package/dist/input-otp.js.map +0 -1
- package/dist/input.d.ts.map +0 -1
- package/dist/input.js.map +0 -1
- package/dist/item.d.ts.map +0 -1
- package/dist/item.js.map +0 -1
- package/dist/kbd.d.ts.map +0 -1
- package/dist/kbd.js.map +0 -1
- package/dist/label.d.ts.map +0 -1
- package/dist/label.js.map +0 -1
- package/dist/lib/focus.d.ts.map +0 -1
- package/dist/lib/focus.js.map +0 -1
- package/dist/lib/internal-icons.d.ts.map +0 -1
- package/dist/lib/internal-icons.js.map +0 -1
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js.map +0 -1
- package/dist/masonry.d.ts.map +0 -1
- package/dist/masonry.js.map +0 -1
- package/dist/menu.d.ts.map +0 -1
- package/dist/menu.js.map +0 -1
- package/dist/menubar.d.ts.map +0 -1
- package/dist/menubar.js.map +0 -1
- package/dist/pagination.d.ts.map +0 -1
- package/dist/pagination.js.map +0 -1
- package/dist/popover.d.ts.map +0 -1
- package/dist/popover.js.map +0 -1
- package/dist/preview-card.d.ts.map +0 -1
- package/dist/preview-card.js.map +0 -1
- package/dist/progress.d.ts.map +0 -1
- package/dist/progress.js.map +0 -1
- package/dist/radio-group.d.ts.map +0 -1
- package/dist/radio-group.js.map +0 -1
- package/dist/radio.d.ts.map +0 -1
- package/dist/radio.js.map +0 -1
- package/dist/scroll-area.d.ts.map +0 -1
- package/dist/scroll-area.js.map +0 -1
- package/dist/select.d.ts.map +0 -1
- package/dist/select.js.map +0 -1
- package/dist/separator.d.ts.map +0 -1
- package/dist/separator.js.map +0 -1
- package/dist/sidebar.d.ts.map +0 -1
- package/dist/sidebar.js.map +0 -1
- package/dist/skeleton.d.ts.map +0 -1
- package/dist/skeleton.js.map +0 -1
- package/dist/slider.d.ts.map +0 -1
- package/dist/slider.js.map +0 -1
- package/dist/spinner.d.ts.map +0 -1
- package/dist/spinner.js.map +0 -1
- package/dist/switch.d.ts.map +0 -1
- package/dist/switch.js.map +0 -1
- package/dist/table.d.ts.map +0 -1
- package/dist/table.js.map +0 -1
- package/dist/tabs.d.ts.map +0 -1
- package/dist/tabs.js.map +0 -1
- package/dist/textarea.d.ts.map +0 -1
- package/dist/textarea.js.map +0 -1
- package/dist/toast.d.ts.map +0 -1
- package/dist/toast.js.map +0 -1
- package/dist/toggle-group.d.ts.map +0 -1
- package/dist/toggle-group.js.map +0 -1
- package/dist/toggle.d.ts.map +0 -1
- package/dist/toggle.js.map +0 -1
- package/dist/tooltip.d.ts.map +0 -1
- package/dist/tooltip.js.map +0 -1
- package/dist/typewriter.d.ts.map +0 -1
- package/dist/typewriter.js.map +0 -1
package/README.md
CHANGED
|
@@ -137,11 +137,11 @@ npm install @waveso/ui @base-ui/react class-variance-authority clsx tailwind-mer
|
|
|
137
137
|
|
|
138
138
|
## Setup
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
Import Tailwind, then the Wave UI preset, in your CSS entry point:
|
|
141
141
|
|
|
142
142
|
```css
|
|
143
|
-
@import "@waveso/ui/styles.css";
|
|
144
143
|
@import "tailwindcss";
|
|
144
|
+
@import "@waveso/ui/styles.css";
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
The preset provides every CSS variable (colors, radii, motion, shadows) with light and dark support. Override any variable in your own `:root` / `.dark` blocks to customize the theme.
|
|
@@ -193,7 +193,6 @@ Some components have optional peer dependencies — install only what you use:
|
|
|
193
193
|
- **Form** — `react-hook-form`
|
|
194
194
|
- **Input OTP** — `input-otp`
|
|
195
195
|
- **Animations** — `motion`
|
|
196
|
-
- **Sidebar** — `usehooks-ts`
|
|
197
196
|
|
|
198
197
|
## Development
|
|
199
198
|
|
package/dist/accordion.d.ts
CHANGED
|
@@ -26,5 +26,4 @@ declare function AccordionContent({
|
|
|
26
26
|
...props
|
|
27
27
|
}: AccordionContentProps): _$react_jsx_runtime0.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
30
|
-
//# sourceMappingURL=accordion.d.ts.map
|
|
29
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
package/dist/accordion.js
CHANGED
package/dist/action-bar.d.ts
CHANGED
|
@@ -79,5 +79,4 @@ declare function useActionBar(id: string, entry: ActionBarEntry): void;
|
|
|
79
79
|
*/
|
|
80
80
|
declare function useActionBarGuard(navigate: (href: string) => void): (href: string) => boolean;
|
|
81
81
|
//#endregion
|
|
82
|
-
export { ActionBarEntry, ActionBarProvider, ActionBarProviderProps, useActionBar, useActionBarGuard };
|
|
83
|
-
//# sourceMappingURL=action-bar.d.ts.map
|
|
82
|
+
export { ActionBarEntry, ActionBarProvider, ActionBarProviderProps, useActionBar, useActionBarGuard };
|
package/dist/action-bar.js
CHANGED
|
@@ -49,12 +49,13 @@ function ActionBarProvider({ children, message = "You have unsaved changes", plu
|
|
|
49
49
|
const [, forceUpdate] = React.useState(0);
|
|
50
50
|
const [jiggleTransform, setJiggleTransform] = React.useState(null);
|
|
51
51
|
const jiggleTimerRef = React.useRef(null);
|
|
52
|
-
const
|
|
52
|
+
const blockedNoticeRafRef = React.useRef(null);
|
|
53
53
|
const isMac = useIsMac();
|
|
54
54
|
const prefersReducedMotion = useReducedMotion();
|
|
55
55
|
const reducedMotionRef = React.useRef(prefersReducedMotion);
|
|
56
56
|
reducedMotionRef.current = prefersReducedMotion;
|
|
57
57
|
const [blockedNotice, setBlockedNotice] = React.useState("");
|
|
58
|
+
const [saveError, setSaveError] = React.useState(false);
|
|
58
59
|
const register = React.useCallback((id, entry) => {
|
|
59
60
|
const prev = entriesRef.current.get(id);
|
|
60
61
|
entriesRef.current.set(id, entry);
|
|
@@ -69,7 +70,11 @@ function ActionBarProvider({ children, message = "You have unsaved changes", plu
|
|
|
69
70
|
}, []);
|
|
70
71
|
const jiggle = React.useCallback(() => {
|
|
71
72
|
setBlockedNotice("");
|
|
72
|
-
|
|
73
|
+
if (blockedNoticeRafRef.current !== null) cancelAnimationFrame(blockedNoticeRafRef.current);
|
|
74
|
+
blockedNoticeRafRef.current = requestAnimationFrame(() => {
|
|
75
|
+
blockedNoticeRafRef.current = null;
|
|
76
|
+
setBlockedNotice(blockedMessage);
|
|
77
|
+
});
|
|
73
78
|
if (reducedMotionRef.current) return;
|
|
74
79
|
if (jiggleTimerRef.current) return;
|
|
75
80
|
let step = 0;
|
|
@@ -87,6 +92,12 @@ function ActionBarProvider({ children, message = "You have unsaved changes", plu
|
|
|
87
92
|
}
|
|
88
93
|
tick();
|
|
89
94
|
}, [blockedMessage]);
|
|
95
|
+
React.useEffect(() => {
|
|
96
|
+
return () => {
|
|
97
|
+
if (jiggleTimerRef.current !== null) clearTimeout(jiggleTimerRef.current);
|
|
98
|
+
if (blockedNoticeRafRef.current !== null) cancelAnimationFrame(blockedNoticeRafRef.current);
|
|
99
|
+
};
|
|
100
|
+
}, []);
|
|
90
101
|
const dirty = [];
|
|
91
102
|
let anySaving = false;
|
|
92
103
|
for (const entry of entriesRef.current.values()) {
|
|
@@ -97,15 +108,20 @@ function ActionBarProvider({ children, message = "You have unsaved changes", plu
|
|
|
97
108
|
const dirtyCount = dirty.length;
|
|
98
109
|
const displayMessage = dirtyCount > 1 ? pluralMessage(dirtyCount) : message;
|
|
99
110
|
const handleSaveAll = React.useCallback(async () => {
|
|
111
|
+
setSaveError(false);
|
|
100
112
|
const saves = [...entriesRef.current.values()].filter((e) => e.hasChanges).map((e) => e.onSave());
|
|
101
|
-
|
|
113
|
+
try {
|
|
114
|
+
await Promise.all(saves);
|
|
115
|
+
} catch {
|
|
116
|
+
setSaveError(true);
|
|
117
|
+
}
|
|
102
118
|
}, []);
|
|
103
119
|
const handleResetAll = React.useCallback(() => {
|
|
104
120
|
for (const entry of entriesRef.current.values()) if (entry.hasChanges) entry.onReset();
|
|
105
121
|
}, []);
|
|
106
122
|
React.useEffect(() => {
|
|
107
123
|
function handleKeyDown(e) {
|
|
108
|
-
if ((e.metaKey || e.ctrlKey) && e.key === "s") {
|
|
124
|
+
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "s") {
|
|
109
125
|
e.preventDefault();
|
|
110
126
|
if (hasDirty()) handleSaveAll();
|
|
111
127
|
}
|
|
@@ -136,7 +152,6 @@ function ActionBarProvider({ children, message = "You have unsaved changes", plu
|
|
|
136
152
|
children: [
|
|
137
153
|
/* @__PURE__ */ jsx("div", {
|
|
138
154
|
"data-slot": "action-bar-shell",
|
|
139
|
-
ref: contentRef,
|
|
140
155
|
style: jiggleTransform ? { transform: jiggleTransform } : void 0,
|
|
141
156
|
children
|
|
142
157
|
}),
|
|
@@ -150,7 +165,7 @@ function ActionBarProvider({ children, message = "You have unsaved changes", plu
|
|
|
150
165
|
"data-slot": "action-bar-blocked-status",
|
|
151
166
|
"aria-live": "assertive",
|
|
152
167
|
className: "sr-only",
|
|
153
|
-
children: blockedNotice
|
|
168
|
+
children: saveError ? "Couldn't save your changes" : blockedNotice
|
|
154
169
|
}),
|
|
155
170
|
/* @__PURE__ */ jsx(AnimatePresence, { children: showBar && /* @__PURE__ */ jsx(motion.div, {
|
|
156
171
|
"data-slot": "action-bar",
|
|
@@ -185,8 +200,8 @@ function ActionBarProvider({ children, message = "You have unsaved changes", plu
|
|
|
185
200
|
className: cn("flex items-center gap-6 rounded-lg border border-line/60 bg-surface px-5 py-2.5 shadow-lg ring-1 ring-line backdrop-blur-sm", className),
|
|
186
201
|
children: [/* @__PURE__ */ jsx("span", {
|
|
187
202
|
"data-slot": "action-bar-message",
|
|
188
|
-
className: "whitespace-nowrap text-sm font-medium text-contrast",
|
|
189
|
-
children: displayMessage
|
|
203
|
+
className: cn("whitespace-nowrap text-sm font-medium", saveError ? "text-destructive" : "text-contrast"),
|
|
204
|
+
children: saveError ? "Couldn't save your changes" : displayMessage
|
|
190
205
|
}), /* @__PURE__ */ jsxs("div", {
|
|
191
206
|
"data-slot": "action-bar-actions",
|
|
192
207
|
className: "flex items-center gap-1.5",
|
|
@@ -260,5 +275,3 @@ function useActionBarGuard(navigate) {
|
|
|
260
275
|
}
|
|
261
276
|
//#endregion
|
|
262
277
|
export { ActionBarProvider, useActionBar, useActionBarGuard };
|
|
263
|
-
|
|
264
|
-
//# sourceMappingURL=action-bar.js.map
|
package/dist/alert-dialog.d.ts
CHANGED
|
@@ -67,5 +67,4 @@ declare function AlertDialogCancel({
|
|
|
67
67
|
...props
|
|
68
68
|
}: AlertDialogCancelProps): _$react_jsx_runtime0.JSX.Element;
|
|
69
69
|
//#endregion
|
|
70
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
|
71
|
-
//# sourceMappingURL=alert-dialog.d.ts.map
|
|
70
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
package/dist/alert-dialog.js
CHANGED
|
@@ -93,5 +93,3 @@ function AlertDialogCancel({ className, variant = "outline", size = "default", .
|
|
|
93
93
|
}
|
|
94
94
|
//#endregion
|
|
95
95
|
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
|
96
|
-
|
|
97
|
-
//# sourceMappingURL=alert-dialog.js.map
|
package/dist/alert.d.ts
CHANGED
|
@@ -29,5 +29,4 @@ declare function AlertAction({
|
|
|
29
29
|
...props
|
|
30
30
|
}: AlertActionProps): _$react_jsx_runtime0.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
|
-
export { Alert, AlertAction, AlertDescription, AlertTitle };
|
|
33
|
-
//# sourceMappingURL=alert.d.ts.map
|
|
32
|
+
export { Alert, AlertAction, AlertDescription, AlertTitle };
|
package/dist/alert.js
CHANGED
|
@@ -3,7 +3,7 @@ import "react";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
//#region src/alert.tsx
|
|
6
|
-
const alertVariants = cva("grid gap-0.5 rounded-md border border-edge px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-data-[icon]:grid-cols-[auto_1fr] has-data-[icon]:gap-x-2 *:[
|
|
6
|
+
const alertVariants = cva("grid gap-0.5 rounded-md border border-edge px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-data-[icon]:grid-cols-[auto_1fr] has-data-[icon]:gap-x-2 *:data-[icon]:col-start-1 *:data-[icon]:row-span-2 *:data-[icon]:translate-y-0.5 *:data-[icon]:text-current *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 w-full relative group/alert", {
|
|
7
7
|
variants: { variant: {
|
|
8
8
|
default: "bg-surface text-contrast",
|
|
9
9
|
destructive: "text-destructive bg-surface *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
@@ -28,7 +28,7 @@ function AlertTitle({ className, ...props }) {
|
|
|
28
28
|
function AlertDescription({ className, ...props }) {
|
|
29
29
|
return /* @__PURE__ */ jsx("div", {
|
|
30
30
|
"data-slot": "alert-description",
|
|
31
|
-
className: cn("text-muted [&_a]:hover:text-contrast text-sm text-balance md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4", className),
|
|
31
|
+
className: cn("text-muted [&_a]:hover:text-contrast group-has-data-[icon]/alert:col-start-2 text-sm text-balance md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4", className),
|
|
32
32
|
...props
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -41,5 +41,3 @@ function AlertAction({ className, ...props }) {
|
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
43
|
export { Alert, AlertAction, AlertDescription, AlertTitle };
|
|
44
|
-
|
|
45
|
-
//# sourceMappingURL=alert.js.map
|
package/dist/animate.d.ts
CHANGED
|
@@ -189,5 +189,4 @@ declare function Float({
|
|
|
189
189
|
paused
|
|
190
190
|
}: FloatProps): _$react_jsx_runtime0.JSX.Element;
|
|
191
191
|
//#endregion
|
|
192
|
-
export { AnimateIn, type AnimateInProps, AnimateOnView, type AnimateOnViewProps, type Direction, Float, type FloatProps, Pulse, type PulseProps, Stagger, type StaggerProps };
|
|
193
|
-
//# sourceMappingURL=animate.d.ts.map
|
|
192
|
+
export { AnimateIn, type AnimateInProps, AnimateOnView, type AnimateOnViewProps, type Direction, Float, type FloatProps, Pulse, type PulseProps, Stagger, type StaggerProps };
|
package/dist/animate.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Children, cloneElement, isValidElement, useEffect, useId, useRef, useState } from "react";
|
|
2
|
+
import { Children, cloneElement, isValidElement, useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { useInView, useReducedMotion } from "motion/react";
|
|
5
5
|
//#region src/animate.tsx
|
|
6
6
|
/**
|
|
7
|
+
* `useLayoutEffect` warns when run during SSR. Fall back to `useEffect` on the
|
|
8
|
+
* server so entrance components (which render on the server to avoid hydration
|
|
9
|
+
* mismatch) stay warning-free while still committing pre-paint in the browser.
|
|
10
|
+
*/
|
|
11
|
+
const useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
12
|
+
/**
|
|
7
13
|
* Direction map: `from` means where the element COMES FROM.
|
|
8
14
|
* `from="left"` = starts to the left, slides right into place.
|
|
9
15
|
*/
|
|
@@ -108,14 +114,23 @@ function buildTransitionStr(duration, ease, delay, hasFilter) {
|
|
|
108
114
|
function AnimateOnView({ children, delay = 0, from = "down", distance = 16, scale = false, blur = false, rotate = 0, flip = false, spring = false, once = true, transition }) {
|
|
109
115
|
const ref = useRef(null);
|
|
110
116
|
const [hydrated, setHydrated] = useState(false);
|
|
117
|
+
const [settled, setSettled] = useState(false);
|
|
111
118
|
const isInView = useInView(ref, {
|
|
112
119
|
once,
|
|
113
120
|
margin: "-50px"
|
|
114
121
|
});
|
|
115
122
|
const prefersReducedMotion = useReducedMotion();
|
|
116
|
-
|
|
123
|
+
useIsomorphicLayoutEffect(() => {
|
|
117
124
|
setHydrated(true);
|
|
118
125
|
}, []);
|
|
126
|
+
useEffect(() => {
|
|
127
|
+
if (!isInView) setSettled(false);
|
|
128
|
+
}, [isInView]);
|
|
129
|
+
const existingOnTransitionEnd = children.props?.onTransitionEnd;
|
|
130
|
+
const handleTransitionEnd = useCallback((event) => {
|
|
131
|
+
if (event.target === ref.current) setSettled(true);
|
|
132
|
+
existingOnTransitionEnd?.(event);
|
|
133
|
+
}, [existingOnTransitionEnd]);
|
|
119
134
|
if (!isValidElement(children)) return children;
|
|
120
135
|
const childProps = children.props;
|
|
121
136
|
const existingStyle = childProps.style ?? {};
|
|
@@ -141,11 +156,12 @@ function AnimateOnView({ children, delay = 0, from = "down", distance = 16, scal
|
|
|
141
156
|
const transitionStr = buildTransitionStr(duration, ease, delay, styles.hasFilter);
|
|
142
157
|
return cloneElement(children, {
|
|
143
158
|
ref: mergeRefs(ref, existingRef),
|
|
159
|
+
onTransitionEnd: handleTransitionEnd,
|
|
144
160
|
style: {
|
|
145
161
|
...existingStyle,
|
|
146
162
|
...currentStyle,
|
|
147
163
|
...isInView ? { transition: transitionStr } : {},
|
|
148
|
-
willChange: "opacity, transform"
|
|
164
|
+
...isInView && !settled ? { willChange: "opacity, transform" } : {}
|
|
149
165
|
}
|
|
150
166
|
});
|
|
151
167
|
}
|
|
@@ -165,12 +181,23 @@ function AnimateOnView({ children, delay = 0, from = "down", distance = 16, scal
|
|
|
165
181
|
function AnimateIn({ children, delay = 0, from = "down", distance = 4, scale = false, blur = false, rotate = 0, flip = false, spring = false, transition }) {
|
|
166
182
|
const ref = useRef(null);
|
|
167
183
|
const [visible, setVisible] = useState(false);
|
|
184
|
+
const [settled, setSettled] = useState(false);
|
|
168
185
|
const prefersReducedMotion = useReducedMotion();
|
|
169
186
|
useEffect(() => {
|
|
170
|
-
|
|
171
|
-
|
|
187
|
+
let inner = 0;
|
|
188
|
+
const outer = requestAnimationFrame(() => {
|
|
189
|
+
inner = requestAnimationFrame(() => setVisible(true));
|
|
172
190
|
});
|
|
191
|
+
return () => {
|
|
192
|
+
cancelAnimationFrame(outer);
|
|
193
|
+
cancelAnimationFrame(inner);
|
|
194
|
+
};
|
|
173
195
|
}, []);
|
|
196
|
+
const existingOnTransitionEnd = children.props?.onTransitionEnd;
|
|
197
|
+
const handleTransitionEnd = useCallback((event) => {
|
|
198
|
+
if (event.target === ref.current) setSettled(true);
|
|
199
|
+
existingOnTransitionEnd?.(event);
|
|
200
|
+
}, [existingOnTransitionEnd]);
|
|
174
201
|
if (!isValidElement(children)) return children;
|
|
175
202
|
const childProps = children.props;
|
|
176
203
|
const existingStyle = childProps.style ?? {};
|
|
@@ -195,11 +222,12 @@ function AnimateIn({ children, delay = 0, from = "down", distance = 4, scale = f
|
|
|
195
222
|
const transitionStr = buildTransitionStr(duration, ease, delay, styles.hasFilter);
|
|
196
223
|
return cloneElement(children, {
|
|
197
224
|
ref: mergeRefs(ref, existingRef),
|
|
225
|
+
onTransitionEnd: handleTransitionEnd,
|
|
198
226
|
style: {
|
|
199
227
|
...existingStyle,
|
|
200
228
|
...currentStyle,
|
|
201
229
|
...visible ? { transition: transitionStr } : {},
|
|
202
|
-
willChange: "opacity, transform"
|
|
230
|
+
...visible && !settled ? { willChange: "opacity, transform" } : {}
|
|
203
231
|
}
|
|
204
232
|
});
|
|
205
233
|
}
|
|
@@ -305,5 +333,3 @@ function Float({ children, distance = 6, duration = 3, rotate = 0, paused = fals
|
|
|
305
333
|
}
|
|
306
334
|
//#endregion
|
|
307
335
|
export { AnimateIn, AnimateOnView, Float, Pulse, Stagger };
|
|
308
|
-
|
|
309
|
-
//# sourceMappingURL=animate.js.map
|
package/dist/aspect-ratio.d.ts
CHANGED
package/dist/aspect-ratio.js
CHANGED
package/dist/autocomplete.d.ts
CHANGED
|
@@ -110,5 +110,4 @@ declare function AutocompleteContent({
|
|
|
110
110
|
...props
|
|
111
111
|
}: AutocompleteContentProps): _$react_jsx_runtime0.JSX.Element;
|
|
112
112
|
//#endregion
|
|
113
|
-
export { Autocomplete, AutocompleteArrow, AutocompleteBackdrop, AutocompleteClear, AutocompleteCollection, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteIcon, AutocompleteInput, AutocompleteItem, AutocompleteList, AutocompletePopup, AutocompletePortal, AutocompletePositioner, AutocompleteRow, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, AutocompleteValue };
|
|
114
|
-
//# sourceMappingURL=autocomplete.d.ts.map
|
|
113
|
+
export { Autocomplete, AutocompleteArrow, AutocompleteBackdrop, AutocompleteClear, AutocompleteCollection, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteIcon, AutocompleteInput, AutocompleteItem, AutocompleteList, AutocompletePopup, AutocompletePortal, AutocompletePositioner, AutocompleteRow, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, AutocompleteValue };
|
package/dist/autocomplete.js
CHANGED
|
@@ -156,5 +156,3 @@ function AutocompleteContent({ className, align = "start", alignOffset = 0, side
|
|
|
156
156
|
}
|
|
157
157
|
//#endregion
|
|
158
158
|
export { Autocomplete, AutocompleteArrow, AutocompleteBackdrop, AutocompleteClear, AutocompleteCollection, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteIcon, AutocompleteInput, AutocompleteItem, AutocompleteList, AutocompletePopup, AutocompletePortal, AutocompletePositioner, AutocompleteRow, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, AutocompleteValue };
|
|
159
|
-
|
|
160
|
-
//# sourceMappingURL=autocomplete.js.map
|
package/dist/avatar.d.ts
CHANGED
|
@@ -37,5 +37,4 @@ declare function AvatarGroupCount({
|
|
|
37
37
|
...props
|
|
38
38
|
}: AvatarGroupCountProps): _$react_jsx_runtime0.JSX.Element;
|
|
39
39
|
//#endregion
|
|
40
|
-
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|
|
41
|
-
//# sourceMappingURL=avatar.d.ts.map
|
|
40
|
+
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|
package/dist/avatar.js
CHANGED
|
@@ -29,7 +29,7 @@ function AvatarFallback({ className, ...props }) {
|
|
|
29
29
|
function AvatarBadge({ className, ...props }) {
|
|
30
30
|
return /* @__PURE__ */ jsx("span", {
|
|
31
31
|
"data-slot": "avatar-badge",
|
|
32
|
-
className: cn("bg-primary text-white ring-foundation absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full
|
|
32
|
+
className: cn("bg-primary text-white ring-foundation absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full ring-2 select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className),
|
|
33
33
|
...props
|
|
34
34
|
});
|
|
35
35
|
}
|
|
@@ -49,5 +49,3 @@ function AvatarGroupCount({ className, ...props }) {
|
|
|
49
49
|
}
|
|
50
50
|
//#endregion
|
|
51
51
|
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|
|
52
|
-
|
|
53
|
-
//# sourceMappingURL=avatar.js.map
|
package/dist/badge.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
5
5
|
|
|
6
6
|
//#region src/badge.d.ts
|
|
7
7
|
declare const badgeVariants: (props?: ({
|
|
8
|
-
variant?: "default" | "
|
|
8
|
+
variant?: "default" | "destructive" | "link" | "success" | "warning" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
9
9
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
10
10
|
type BadgeProps = useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>;
|
|
11
11
|
declare function Badge({
|
|
@@ -15,5 +15,4 @@ declare function Badge({
|
|
|
15
15
|
...props
|
|
16
16
|
}: BadgeProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
|
|
17
17
|
//#endregion
|
|
18
|
-
export { Badge, badgeVariants };
|
|
19
|
-
//# sourceMappingURL=badge.d.ts.map
|
|
18
|
+
export { Badge, badgeVariants };
|
package/dist/badge.js
CHANGED
package/dist/breadcrumb.d.ts
CHANGED
|
@@ -40,5 +40,4 @@ declare function BreadcrumbEllipsis({
|
|
|
40
40
|
...props
|
|
41
41
|
}: BreadcrumbEllipsisProps): _$react_jsx_runtime0.JSX.Element;
|
|
42
42
|
//#endregion
|
|
43
|
-
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
44
|
-
//# sourceMappingURL=breadcrumb.d.ts.map
|
|
43
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
package/dist/breadcrumb.js
CHANGED
package/dist/button-group.d.ts
CHANGED
|
@@ -28,5 +28,4 @@ declare function ButtonGroupSeparator({
|
|
|
28
28
|
...props
|
|
29
29
|
}: ButtonGroupSeparatorProps): _$react_jsx_runtime0.JSX.Element;
|
|
30
30
|
//#endregion
|
|
31
|
-
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
|
32
|
-
//# sourceMappingURL=button-group.d.ts.map
|
|
31
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
package/dist/button-group.js
CHANGED
package/dist/button.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
6
6
|
|
|
7
7
|
//#region src/button.d.ts
|
|
8
8
|
declare const buttonVariants: (props?: ({
|
|
9
|
-
variant?: "default" | "
|
|
10
|
-
size?: "default" | "
|
|
9
|
+
variant?: "default" | "destructive" | "link" | "success" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
10
|
+
size?: "default" | "xs" | "sm" | "icon-xs" | "icon-sm" | "icon" | "lg" | "xl" | "icon-lg" | null | undefined;
|
|
11
11
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
12
12
|
type ButtonProps = React.ComponentProps<typeof Button$1> & VariantProps<typeof buttonVariants>;
|
|
13
13
|
declare function Button({
|
|
@@ -17,5 +17,4 @@ declare function Button({
|
|
|
17
17
|
...props
|
|
18
18
|
}: ButtonProps): _$react_jsx_runtime0.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
|
-
export { Button, buttonVariants };
|
|
21
|
-
//# sourceMappingURL=button.d.ts.map
|
|
20
|
+
export { Button, buttonVariants };
|
package/dist/button.js
CHANGED
package/dist/card.d.ts
CHANGED
|
@@ -41,5 +41,4 @@ declare function CardFooter({
|
|
|
41
41
|
...props
|
|
42
42
|
}: CardFooterProps): _$react_jsx_runtime0.JSX.Element;
|
|
43
43
|
//#endregion
|
|
44
|
-
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
45
|
-
//# sourceMappingURL=card.d.ts.map
|
|
44
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
package/dist/card.js
CHANGED
package/dist/checkbox.d.ts
CHANGED
package/dist/checkbox.js
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "./lib/utils.js";
|
|
3
|
-
import { CheckIcon } from "./lib/internal-icons.js";
|
|
3
|
+
import { CheckIcon, MinusIcon } from "./lib/internal-icons.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
7
7
|
//#region src/checkbox.tsx
|
|
8
8
|
function Checkbox({ className, ...props }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
10
10
|
"data-slot": "checkbox",
|
|
11
|
-
className: cn("cursor-clickable border-edge dark:bg-edge/30 data-checked:bg-primary data-checked:text-white dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3", className),
|
|
11
|
+
className: cn("cursor-clickable border-edge dark:bg-edge/30 data-checked:bg-primary data-indeterminate:bg-primary data-checked:text-white data-indeterminate:text-white dark:data-checked:bg-primary dark:data-indeterminate:bg-primary data-checked:border-primary data-indeterminate:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3", className),
|
|
12
12
|
...props,
|
|
13
|
-
children: /* @__PURE__ */
|
|
13
|
+
children: /* @__PURE__ */ jsxs(Checkbox$1.Indicator, {
|
|
14
14
|
"data-slot": "checkbox-indicator",
|
|
15
|
-
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
16
|
-
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
15
|
+
className: "group/indicator grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
16
|
+
children: [/* @__PURE__ */ jsx(CheckIcon, { className: "col-start-1 row-start-1 group-data-indeterminate/indicator:hidden" }), /* @__PURE__ */ jsx(MinusIcon, { className: "col-start-1 row-start-1 hidden group-data-indeterminate/indicator:block" })]
|
|
17
17
|
})
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
21
|
export { Checkbox };
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=checkbox.js.map
|
package/dist/collapsible.d.ts
CHANGED
|
@@ -17,5 +17,4 @@ declare function CollapsibleContent({
|
|
|
17
17
|
...props
|
|
18
18
|
}: CollapsibleContentProps): _$react_jsx_runtime0.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
|
-
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
21
|
-
//# sourceMappingURL=collapsible.d.ts.map
|
|
20
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
package/dist/collapsible.js
CHANGED
package/dist/combobox.d.ts
CHANGED
|
@@ -104,5 +104,4 @@ declare function ComboboxChipsInput({
|
|
|
104
104
|
}: ComboboxChipsInputProps): _$react_jsx_runtime0.JSX.Element;
|
|
105
105
|
declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
|
|
106
106
|
//#endregion
|
|
107
|
-
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
|
|
108
|
-
//# sourceMappingURL=combobox.d.ts.map
|
|
107
|
+
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
|
package/dist/combobox.js
CHANGED
|
@@ -186,5 +186,3 @@ function useComboboxAnchor() {
|
|
|
186
186
|
}
|
|
187
187
|
//#endregion
|
|
188
188
|
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
|
|
189
|
-
|
|
190
|
-
//# sourceMappingURL=combobox.js.map
|
package/dist/context-menu.d.ts
CHANGED
|
@@ -104,5 +104,4 @@ declare function ContextMenuShortcut({
|
|
|
104
104
|
...props
|
|
105
105
|
}: ContextMenuShortcutProps): _$react_jsx_runtime0.JSX.Element;
|
|
106
106
|
//#endregion
|
|
107
|
-
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
|
|
108
|
-
//# sourceMappingURL=context-menu.d.ts.map
|
|
107
|
+
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
|
package/dist/context-menu.js
CHANGED
|
@@ -74,7 +74,7 @@ function ContextMenuSubTrigger({ className, inset, children, ...props }) {
|
|
|
74
74
|
return /* @__PURE__ */ jsxs(ContextMenu$1.SubmenuTrigger, {
|
|
75
75
|
"data-slot": "context-menu-sub-trigger",
|
|
76
76
|
"data-inset": inset,
|
|
77
|
-
className: cn("focus:bg-primary focus:text-white data-open:bg-primary data-open:text-white flex cursor-clickable items-center gap-1.5 rounded-sm px-1.5 py-1 text-sm outline-hidden select-none data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
77
|
+
className: cn("focus:bg-primary focus:text-white data-popup-open:bg-primary data-popup-open:text-white flex cursor-clickable items-center gap-1.5 rounded-sm px-1.5 py-1 text-sm outline-hidden select-none data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
78
78
|
...props,
|
|
79
79
|
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
|
|
80
80
|
});
|
|
@@ -139,5 +139,3 @@ function ContextMenuShortcut({ className, ...props }) {
|
|
|
139
139
|
}
|
|
140
140
|
//#endregion
|
|
141
141
|
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
|
|
142
|
-
|
|
143
|
-
//# sourceMappingURL=context-menu.js.map
|
package/dist/count.d.ts
CHANGED
|
@@ -83,5 +83,4 @@ declare function Count({
|
|
|
83
83
|
/** @deprecated Use `Count` instead */
|
|
84
84
|
declare const CountUp: typeof Count;
|
|
85
85
|
//#endregion
|
|
86
|
-
export { Count, type CountProps, CountUp, type CountUpProps, easeOut };
|
|
87
|
-
//# sourceMappingURL=count.d.ts.map
|
|
86
|
+
export { Count, type CountProps, CountUp, type CountUpProps, easeOut };
|
package/dist/count.js
CHANGED
|
@@ -160,16 +160,21 @@ function DateCount({ to, delay, format, prefix, suffix, children, once, onComple
|
|
|
160
160
|
]);
|
|
161
161
|
useEffect(() => {
|
|
162
162
|
if (!started) return;
|
|
163
|
+
let interval;
|
|
163
164
|
const tick = () => {
|
|
164
165
|
const ms = Math.max(0, to.getTime() - Date.now());
|
|
165
166
|
setRemaining(ms);
|
|
166
|
-
if (ms <= 0
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
if (ms <= 0) {
|
|
168
|
+
clearInterval(interval);
|
|
169
|
+
if (!completedRef.current) {
|
|
170
|
+
completedRef.current = true;
|
|
171
|
+
onComplete?.();
|
|
172
|
+
}
|
|
173
|
+
return true;
|
|
169
174
|
}
|
|
175
|
+
return false;
|
|
170
176
|
};
|
|
171
|
-
tick();
|
|
172
|
-
const interval = setInterval(tick, 1e3);
|
|
177
|
+
if (!tick()) interval = setInterval(tick, 1e3);
|
|
173
178
|
return () => clearInterval(interval);
|
|
174
179
|
}, [
|
|
175
180
|
started,
|
|
@@ -187,5 +192,3 @@ function DateCount({ to, delay, format, prefix, suffix, children, once, onComple
|
|
|
187
192
|
const CountUp = Count;
|
|
188
193
|
//#endregion
|
|
189
194
|
export { Count, CountUp, easeOut };
|
|
190
|
-
|
|
191
|
-
//# sourceMappingURL=count.js.map
|
package/dist/dialog.d.ts
CHANGED
|
@@ -71,5 +71,4 @@ declare function DialogDescription({
|
|
|
71
71
|
...props
|
|
72
72
|
}: DialogDescriptionProps): _$react_jsx_runtime0.JSX.Element;
|
|
73
73
|
//#endregion
|
|
74
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
75
|
-
//# sourceMappingURL=dialog.d.ts.map
|
|
74
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
package/dist/dialog.js
CHANGED
|
@@ -91,5 +91,3 @@ function DialogDescription({ className, ...props }) {
|
|
|
91
91
|
}
|
|
92
92
|
//#endregion
|
|
93
93
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
94
|
-
|
|
95
|
-
//# sourceMappingURL=dialog.js.map
|
package/dist/drawer.d.ts
CHANGED
|
@@ -55,5 +55,4 @@ declare function DrawerDescription({
|
|
|
55
55
|
...props
|
|
56
56
|
}: DrawerDescriptionProps): _$react_jsx_runtime0.JSX.Element;
|
|
57
57
|
//#endregion
|
|
58
|
-
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
|
|
59
|
-
//# sourceMappingURL=drawer.d.ts.map
|
|
58
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
|
package/dist/drawer.js
CHANGED
|
@@ -97,5 +97,3 @@ function DrawerDescription({ className, ...props }) {
|
|
|
97
97
|
}
|
|
98
98
|
//#endregion
|
|
99
99
|
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
|
|
100
|
-
|
|
101
|
-
//# sourceMappingURL=drawer.js.map
|