@waveso/ui 0.7.7 → 0.8.1
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 +1 -3
- package/dist/action-bar.d.ts +1 -2
- package/dist/action-bar.js +24 -11
- package/dist/alert-dialog.d.ts +1 -2
- package/dist/alert-dialog.js +2 -4
- 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 +4 -6
- 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 +3 -4
- package/dist/button-group.js +1 -2
- package/dist/button.d.ts +3 -4
- package/dist/button.js +1 -3
- 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 +2 -4
- package/dist/context-menu.d.ts +1 -2
- package/dist/context-menu.js +3 -5
- package/dist/count.d.ts +1 -2
- package/dist/count.js +10 -7
- package/dist/dialog.d.ts +1 -2
- package/dist/dialog.js +1 -3
- package/dist/drawer.d.ts +1 -2
- package/dist/drawer.js +2 -4
- 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 +3 -5
- 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 +1 -3
- package/dist/item.d.ts +2 -3
- package/dist/item.js +3 -5
- package/dist/kbd.d.ts +2 -2
- package/dist/kbd.js +1 -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 +3 -10
- package/dist/lib/internal-icons.js +3 -12
- 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 +3 -5
- 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 +1 -3
- package/dist/select.d.ts +1 -2
- package/dist/select.js +1 -4
- package/dist/separator.d.ts +1 -2
- package/dist/separator.js +0 -2
- package/dist/sidebar.d.ts +1 -2
- package/dist/sidebar.js +1 -3
- package/dist/skeleton.d.ts +2 -2
- package/dist/skeleton.js +1 -2
- package/dist/slider.d.ts +1 -2
- package/dist/slider.js +0 -2
- package/dist/spinner.d.ts +2 -2
- package/dist/spinner.js +1 -2
- package/dist/styles.css +13 -9
- 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 +1 -3
- package/dist/textarea.d.ts +1 -2
- package/dist/textarea.js +1 -3
- package/dist/toast.d.ts +2 -3
- package/dist/toast.js +5 -7
- 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 +1 -3
- 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
|
@@ -25,7 +25,7 @@ function AccordionTrigger({ className, children, ...props }) {
|
|
|
25
25
|
className: "flex",
|
|
26
26
|
children: /* @__PURE__ */ jsxs(Accordion$1.Trigger, {
|
|
27
27
|
"data-slot": "accordion-trigger",
|
|
28
|
-
className: cn("cursor-clickable focus-visible:ring-focus/50 focus-visible:border-focus focus-visible:after:border-focus **:data-[slot=accordion-trigger-icon]:text-muted group/accordion-trigger relative flex flex-1 items-start justify-between rounded-md border border-transparent py-2.5 text-left text-sm font-medium motion-color outline-
|
|
28
|
+
className: cn("cursor-clickable focus-visible:ring-focus/50 focus-visible:border-focus focus-visible:after:border-focus **:data-[slot=accordion-trigger-icon]:text-muted group/accordion-trigger relative flex flex-1 items-start justify-between rounded-md border border-transparent py-2.5 text-left text-sm font-medium motion-color outline-hidden hover:underline focus-visible:ring-3 aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4", className),
|
|
29
29
|
...props,
|
|
30
30
|
children: [
|
|
31
31
|
children,
|
|
@@ -55,5 +55,3 @@ function AccordionContent({ className, children, ...props }) {
|
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
57
57
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
58
|
-
|
|
59
|
-
//# sourceMappingURL=accordion.js.map
|
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",
|
|
@@ -182,11 +197,11 @@ function ActionBarProvider({ children, message = "You have unsaved changes", plu
|
|
|
182
197
|
className: "fixed bottom-6 left-1/2 z-50",
|
|
183
198
|
children: /* @__PURE__ */ jsxs("div", {
|
|
184
199
|
"data-slot": "action-bar-content",
|
|
185
|
-
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
|
|
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", 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
|
@@ -34,7 +34,7 @@ function AlertDialogContent({ className, size = "default", ...props }) {
|
|
|
34
34
|
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog$1.Popup, {
|
|
35
35
|
"data-slot": "alert-dialog-content",
|
|
36
36
|
"data-size": size,
|
|
37
|
-
className: cn("motion-scale-lg bg-foundation ring-contrast/10 group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg p-4 ring-1 outline-
|
|
37
|
+
className: cn("motion-scale-lg bg-foundation ring-contrast/10 group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg p-4 ring-1 outline-hidden data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=lg]:max-w-lg data-[size=xl]:max-w-xl data-[size=default]:sm:max-w-sm data-[size=lg]:sm:max-w-lg data-[size=xl]:sm:max-w-xl", className),
|
|
38
38
|
...props
|
|
39
39
|
})] });
|
|
40
40
|
}
|
|
@@ -76,7 +76,7 @@ function AlertDialogDescription({ className, ...props }) {
|
|
|
76
76
|
function AlertDialogAction({ className, ...props }) {
|
|
77
77
|
return /* @__PURE__ */ jsx(Button, {
|
|
78
78
|
"data-slot": "alert-dialog-action",
|
|
79
|
-
className
|
|
79
|
+
className,
|
|
80
80
|
...props
|
|
81
81
|
});
|
|
82
82
|
}
|
|
@@ -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
|
@@ -13,7 +13,7 @@ function Autocomplete({ ...props }) {
|
|
|
13
13
|
function AutocompleteInput({ className, ...props }) {
|
|
14
14
|
return /* @__PURE__ */ jsx(Autocomplete$1.Input, {
|
|
15
15
|
"data-slot": "autocomplete-input",
|
|
16
|
-
className: cn("dark:bg-edge/30 border-edge focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-edge/50 dark:disabled:bg-edge/80 placeholder:text-soft h-8 w-full min-w-0 rounded-md border bg-transparent px-2.5 py-1 text-base transition-colors outline-
|
|
16
|
+
className: cn("dark:bg-edge/30 border-edge focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-edge/50 dark:disabled:bg-edge/80 placeholder:text-soft h-8 w-full min-w-0 rounded-md border bg-transparent px-2.5 py-1 text-base transition-colors outline-hidden focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 md:text-sm", className),
|
|
17
17
|
...props
|
|
18
18
|
});
|
|
19
19
|
}
|
|
@@ -47,7 +47,7 @@ function AutocompleteValue({ ...props }) {
|
|
|
47
47
|
function AutocompletePortal({ className, ...props }) {
|
|
48
48
|
return /* @__PURE__ */ jsx(Autocomplete$1.Portal, {
|
|
49
49
|
"data-slot": "autocomplete-portal",
|
|
50
|
-
className
|
|
50
|
+
className,
|
|
51
51
|
...props
|
|
52
52
|
});
|
|
53
53
|
}
|
|
@@ -61,7 +61,7 @@ function AutocompleteBackdrop({ className, ...props }) {
|
|
|
61
61
|
function AutocompletePositioner({ className, ...props }) {
|
|
62
62
|
return /* @__PURE__ */ jsx(Autocomplete$1.Positioner, {
|
|
63
63
|
"data-slot": "autocomplete-positioner",
|
|
64
|
-
className
|
|
64
|
+
className,
|
|
65
65
|
...props
|
|
66
66
|
});
|
|
67
67
|
}
|
|
@@ -103,7 +103,7 @@ function AutocompleteList({ className, ...props }) {
|
|
|
103
103
|
function AutocompleteRow({ className, ...props }) {
|
|
104
104
|
return /* @__PURE__ */ jsx(Autocomplete$1.Row, {
|
|
105
105
|
"data-slot": "autocomplete-row",
|
|
106
|
-
className
|
|
106
|
+
className,
|
|
107
107
|
...props
|
|
108
108
|
});
|
|
109
109
|
}
|
|
@@ -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" | "success" | "destructive" | "warning" | "secondary" | "outline" | "ghost" | "link" | 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Separator } from "./separator.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
@@ -21,12 +21,11 @@ declare function ButtonGroupText({
|
|
|
21
21
|
className,
|
|
22
22
|
render,
|
|
23
23
|
...props
|
|
24
|
-
}: ButtonGroupTextProps):
|
|
24
|
+
}: ButtonGroupTextProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
25
25
|
declare function ButtonGroupSeparator({
|
|
26
26
|
className,
|
|
27
27
|
orientation,
|
|
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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "./lib/utils.js";
|
|
3
3
|
import { Separator } from "./separator.js";
|
|
4
|
+
import "react";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
import { cva } from "class-variance-authority";
|
|
6
7
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
@@ -40,5 +41,3 @@ function ButtonGroupSeparator({ className, orientation = "vertical", ...props })
|
|
|
40
41
|
}
|
|
41
42
|
//#endregion
|
|
42
43
|
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=button-group.js.map
|
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" | "success" | "destructive" | "secondary" | "outline" | "ghost" | "link" | null | undefined;
|
|
10
|
+
size?: "default" | "xs" | "sm" | "lg" | "xl" | "icon" | "icon-xs" | "icon-sm" | "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
|
@@ -5,7 +5,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
7
|
//#region src/button.tsx
|
|
8
|
-
const buttonVariants = cva("cursor-clickable focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap motion-color disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-
|
|
8
|
+
const buttonVariants = cva("cursor-clickable focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap motion-color disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-hidden group/button select-none", {
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default: "bg-primary text-white hover:bg-primary/80",
|
|
@@ -46,5 +46,3 @@ function Button({ className, variant = "default", size = "default", ...props })
|
|
|
46
46
|
}
|
|
47
47
|
//#endregion
|
|
48
48
|
export { Button, buttonVariants };
|
|
49
|
-
|
|
50
|
-
//# sourceMappingURL=button.js.map
|
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-
|
|
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-hidden 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 };
|