@stevederico/skateboard-ui 3.10.0 → 3.12.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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # CHANGELOG
2
2
 
3
+ 3.12.0
4
+
5
+ Fix asChild button
6
+ Infer nativeButton semantics
7
+
8
+ 3.11.0
9
+
10
+ Restore spinner animation
11
+ Bridge orientation variants
12
+ Restore sidebar sizes
13
+ Restore overlay background
14
+ Remove inert classes
15
+ Guard context hooks
16
+ Remove global augmentations
17
+ Compose drawer handlers
18
+ Slim package tarball
19
+
3
20
  3.10.0
4
21
 
5
22
  Convert package to TypeScript
@@ -1,6 +1,18 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React, { createContext, useContext, useReducer, useEffect } from 'react';
3
3
  const context = createContext(undefined);
4
+ /**
5
+ * Internal hook: read the skateboard context and fail loudly when the
6
+ * provider is missing, instead of letting callers destructure undefined.
7
+ *
8
+ * @throws {Error} If called outside a ContextProvider
9
+ */
10
+ function useSkateboardContext() {
11
+ const ctx = useContext(context);
12
+ if (!ctx)
13
+ throw new Error('skateboard-ui components must be rendered inside ContextProvider (createSkateboardApp does this automatically)');
14
+ return ctx;
15
+ }
4
16
  // Store dispatch reference for programmatic access outside components
5
17
  let _dispatch = null;
6
18
  /**
@@ -176,7 +188,7 @@ export function ContextProvider({ children, constants }) {
176
188
  * }
177
189
  */
178
190
  export function getState() {
179
- return useContext(context);
191
+ return useSkateboardContext();
180
192
  }
181
193
  /**
182
194
  * Hook to access only the current user.
@@ -196,7 +208,7 @@ export function getState() {
196
208
  * }
197
209
  */
198
210
  export function useUser() {
199
- const { state } = useContext(context);
211
+ const { state } = useSkateboardContext();
200
212
  return state.user;
201
213
  }
202
214
  /**
@@ -216,6 +228,6 @@ export function useUser() {
216
228
  * }
217
229
  */
218
230
  export function useDispatch() {
219
- const { dispatch } = useContext(context);
231
+ const { dispatch } = useSkateboardContext();
220
232
  return dispatch;
221
233
  }
@@ -98,22 +98,6 @@ export interface UsageData {
98
98
  export interface ApiRequestOptions extends RequestInit {
99
99
  timeout?: number;
100
100
  }
101
- declare global {
102
- interface ImportMetaEnv {
103
- DEV: boolean;
104
- }
105
- interface ImportMeta {
106
- readonly env: ImportMetaEnv;
107
- }
108
- interface Window {
109
- /** App constants stash — survives Vite module duplication. */
110
- __SKATEBOARD_CONSTANTS__?: SkateboardConstants | null;
111
- /** Present inside native WebKit wrappers (iOS/macOS) — see isAppMode(). */
112
- webkit?: {
113
- messageHandlers?: Record<string, unknown>;
114
- };
115
- }
116
- }
117
101
  /**
118
102
  * Initialize skateboard-ui utilities with app constants.
119
103
  *
@@ -5,7 +5,8 @@ import { getDispatch } from './Context.js';
5
5
  // Use window object to avoid module duplication issues with Vite
6
6
  let _constants = null;
7
7
  if (typeof window !== 'undefined') {
8
- window.__SKATEBOARD_CONSTANTS__ = window.__SKATEBOARD_CONSTANTS__ || null;
8
+ const win = window;
9
+ win.__SKATEBOARD_CONSTANTS__ = win.__SKATEBOARD_CONSTANTS__ || null;
9
10
  }
10
11
  // Check if localStorage is available (respects private mode, etc.)
11
12
  let _localStorageAvailable = null;
@@ -110,8 +111,10 @@ export function initializeUtilities(constants) {
110
111
  */
111
112
  export function getConstants() {
112
113
  // Check window object first (handles module duplication)
113
- if (typeof window !== 'undefined' && window.__SKATEBOARD_CONSTANTS__) {
114
- return window.__SKATEBOARD_CONSTANTS__;
114
+ if (typeof window !== 'undefined') {
115
+ const stashed = window.__SKATEBOARD_CONSTANTS__;
116
+ if (stashed)
117
+ return stashed;
115
118
  }
116
119
  if (!_constants) {
117
120
  throw new Error('Utilities not initialized. Call initializeUtilities(constants) first.');
@@ -233,8 +236,10 @@ export function isAuthOverlayEnabled() {
233
236
  * // Prod: "https://api.myapp.com/api/signup"
234
237
  */
235
238
  export function getBackendURL() {
236
- let result = import.meta.env.DEV ? getConstants().devBackendURL : getConstants().backendURL;
237
- return result;
239
+ // Typed locally (no global ImportMeta augmentation) and guarded at runtime:
240
+ // outside Vite, import.meta.env is undefined — fall back to production URL.
241
+ const env = import.meta.env;
242
+ return env?.DEV ? getConstants().devBackendURL : getConstants().backendURL;
238
243
  }
239
244
  /**
240
245
  * Check if the app is running inside a native WebKit wrapper (iOS/macOS).
@@ -242,10 +247,10 @@ export function getBackendURL() {
242
247
  * @returns {boolean} True if webkit.messageHandlers is available
243
248
  */
244
249
  export function isAppMode() {
245
- let a = !!(typeof window !== 'undefined' &&
246
- window.webkit &&
247
- window.webkit.messageHandlers);
248
- return a;
250
+ if (typeof window === 'undefined')
251
+ return false;
252
+ const { webkit } = window;
253
+ return !!(webkit && webkit.messageHandlers);
249
254
  }
250
255
  /**
251
256
  * Fetch the current authenticated user from the backend.
@@ -3309,4 +3309,3 @@ const mergeArrayProperties = (baseObject, mergeObject, key) => {
3309
3309
  const extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);
3310
3310
  const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
3311
3311
  export { createTailwindMerge, extendTailwindMerge, fromTheme, getDefaultConfig, mergeConfigs, twJoin, twMerge, validators };
3312
- //# sourceMappingURL=bundle-mjs.mjs.map
@@ -17,7 +17,7 @@ function AlertDialogOverlay({ className, ...props }) {
17
17
  return (_jsx(AlertDialogPrimitive.Backdrop, { "data-slot": "alert-dialog-overlay", className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className), ...props }));
18
18
  }
19
19
  function AlertDialogContent({ className, size = "default", ...props }) {
20
- return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Popup, { "data-slot": "alert-dialog-content", "data-size": size, className: cn("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-6 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props })] }));
20
+ return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Popup, { "data-slot": "alert-dialog-content", "data-size": size, className: cn("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-6 rounded-xl bg-background p-6 text-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props })] }));
21
21
  }
22
22
  function AlertDialogHeader({ className, ...props }) {
23
23
  return (_jsx("div", { "data-slot": "alert-dialog-header", className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className), ...props }));
@@ -29,7 +29,7 @@ function AlertDialogMedia({ className, ...props }) {
29
29
  return (_jsx("div", { "data-slot": "alert-dialog-media", className: cn("mb-2 inline-flex size-16 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8", className), ...props }));
30
30
  }
31
31
  function AlertDialogTitle({ className, ...props }) {
32
- return (_jsx(AlertDialogPrimitive.Title, { "data-slot": "alert-dialog-title", className: cn("cn-font-heading text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className), ...props }));
32
+ return (_jsx(AlertDialogPrimitive.Title, { "data-slot": "alert-dialog-title", className: cn("text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className), ...props }));
33
33
  }
34
34
  function AlertDialogDescription({ className, ...props }) {
35
35
  return (_jsx(AlertDialogPrimitive.Description, { "data-slot": "alert-dialog-description", className: cn("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className), ...props }));
@@ -41,7 +41,12 @@ function Button({ className, variant = "default", size = "default", asChild = fa
41
41
  // `asChild` API so `<Button asChild><a .../></Button>` renders the child element
42
42
  // (merged with button props) instead of leaking `asChild` onto the DOM <button>.
43
43
  if (asChild) {
44
- return (_jsx(ButtonPrimitive, { "data-slot": "button", className: classes, render: Children.only(children), ...props }));
44
+ const child = Children.only(children);
45
+ // Base UI defaults `nativeButton` to true and warns when the rendered element
46
+ // isn't a real <button>. Infer it from the child so `<Button asChild><a/></Button>`
47
+ // reports the correct semantics; an explicit `nativeButton` in props still wins.
48
+ const isNativeButton = child.type === "button";
49
+ return (_jsx(ButtonPrimitive, { "data-slot": "button", className: classes, nativeButton: isNativeButton, render: child, ...props }));
45
50
  }
46
51
  return (_jsx(ButtonPrimitive, { "data-slot": "button", className: classes, ...props, children: children }));
47
52
  }
@@ -8,7 +8,7 @@ function CardHeader({ className, ...props }) {
8
8
  return (_jsx("div", { "data-slot": "card-header", className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", className), ...props }));
9
9
  }
10
10
  function CardTitle({ className, ...props }) {
11
- return (_jsx("div", { "data-slot": "card-title", className: cn("cn-font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm", className), ...props }));
11
+ return (_jsx("div", { "data-slot": "card-title", className: cn("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm", className), ...props }));
12
12
  }
13
13
  function CardDescription({ className, ...props }) {
14
14
  return (_jsx("div", { "data-slot": "card-description", className: cn("text-sm text-muted-foreground", className), ...props }));
@@ -14,7 +14,7 @@ function ContextMenuTrigger({ className, ...props }) {
14
14
  return (_jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", className: cn("select-none", className), ...props }));
15
15
  }
16
16
  function ContextMenuContent({ className, align = "start", alignOffset = 4, side = "right", sideOffset = 0, ...props }) {
17
- return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(ContextMenuPrimitive.Popup, { "data-slot": "context-menu-content", className: cn("cn-menu-target cn-menu-translucent z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }) }) }));
17
+ return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(ContextMenuPrimitive.Popup, { "data-slot": "context-menu-content", className: cn("z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }) }) }));
18
18
  }
19
19
  function ContextMenuGroup({ ...props }) {
20
20
  return (_jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props }));
@@ -32,7 +32,7 @@ function ContextMenuSubTrigger({ className, inset, children, ...props }) {
32
32
  return (_jsxs(ContextMenuPrimitive.SubmenuTrigger, { "data-slot": "context-menu-sub-trigger", "data-inset": inset, className: cn("flex cursor-pointer items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(ChevronRightIcon, {})] }));
33
33
  }
34
34
  function ContextMenuSubContent({ ...props }) {
35
- return (_jsx(ContextMenuContent, { "data-slot": "context-menu-sub-content", className: "cn-menu-target cn-menu-translucent shadow-lg", side: "right", ...props }));
35
+ return (_jsx(ContextMenuContent, { "data-slot": "context-menu-sub-content", className: "shadow-lg", side: "right", ...props }));
36
36
  }
37
37
  function ContextMenuCheckboxItem({ className, children, checked, inset, ...props }) {
38
38
  return (_jsxs(ContextMenuPrimitive.CheckboxItem, { "data-slot": "context-menu-checkbox-item", "data-inset": inset, className: cn("relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute right-2", children: _jsx(ContextMenuPrimitive.CheckboxItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
@@ -21,7 +21,7 @@ function DialogOverlay({ className, ...props }) {
21
21
  return (_jsx(DialogPrimitive.Backdrop, { "data-slot": "dialog-overlay", className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className), ...props }));
22
22
  }
23
23
  function DialogContent({ className, children, showCloseButton = true, ...props }) {
24
- return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Popup, { "data-slot": "dialog-content", className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-4 right-4", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
24
+ return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Popup, { "data-slot": "dialog-content", className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-background p-6 text-sm text-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-4 right-4", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
25
25
  }
26
26
  function DialogHeader({ className, ...props }) {
27
27
  return (_jsx("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2", className), ...props }));
@@ -30,7 +30,7 @@ function DialogFooter({ className, showCloseButton = false, children, ...props }
30
30
  return (_jsxs("div", { "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props, children: [children, showCloseButton && (_jsx(DialogPrimitive.Close, { render: _jsx(Button, { variant: "outline" }), children: "Close" }))] }));
31
31
  }
32
32
  function DialogTitle({ className, ...props }) {
33
- return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn("cn-font-heading leading-none font-medium", className), ...props }));
33
+ return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn("leading-none font-medium", className), ...props }));
34
34
  }
35
35
  function DialogDescription({ className, ...props }) {
36
36
  return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className), ...props }));
@@ -5,7 +5,7 @@ declare function DrawerTrigger(props: React.ComponentProps<typeof DialogPrimitiv
5
5
  declare function DrawerPortal(props: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element;
6
6
  declare function DrawerClose(props: React.ComponentProps<typeof DialogPrimitive.Close>): React.JSX.Element;
7
7
  declare function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Backdrop>): React.JSX.Element;
8
- declare function DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Popup>): React.JSX.Element;
8
+ declare function DrawerContent({ className, children, ref, onPointerDown, onPointerMove, onPointerUp, onPointerCancel, ...props }: React.ComponentProps<typeof DialogPrimitive.Popup>): React.JSX.Element;
9
9
  declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
10
  declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
11
  declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element;
@@ -53,10 +53,21 @@ function DrawerClose(props) {
53
53
  function DrawerOverlay({ className, ...props }) {
54
54
  return (_jsx(DialogPrimitive.Backdrop, { "data-slot": "drawer-overlay", className: cn("drawer-backdrop fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs", className), ...props }));
55
55
  }
56
- function DrawerContent({ className, children, ...props }) {
56
+ function DrawerContent({ className, children, ref, onPointerDown, onPointerMove, onPointerUp, onPointerCancel, ...props }) {
57
57
  const popupRef = React.useRef(null);
58
58
  const ctx = React.useContext(DrawerCtx);
59
59
  const dragState = React.useRef({ dragging: false, startY: 0, height: 0, startTime: 0 });
60
+ // Merge the internal popup ref with a consumer-supplied ref (function or
61
+ // object form) so passing `ref` doesn't disconnect the drag machinery.
62
+ const mergedRef = React.useCallback((node) => {
63
+ popupRef.current = node;
64
+ if (typeof ref === "function") {
65
+ ref(node);
66
+ }
67
+ else if (ref) {
68
+ ref.current = node;
69
+ }
70
+ }, [ref]);
60
71
  const snapBack = React.useCallback(() => {
61
72
  const el = popupRef.current;
62
73
  if (!el)
@@ -133,7 +144,42 @@ function DrawerContent({ className, children, ...props }) {
133
144
  dragState.current.dragging = false;
134
145
  snapBack();
135
146
  }, [snapBack]);
136
- return (_jsxs(DrawerPortal, { children: [_jsx(DrawerOverlay, {}), _jsxs(DialogPrimitive.Popup, { ref: popupRef, "data-slot": "drawer-content", className: cn("drawer-popup bg-background text-sm", className), onPointerDown: handlePointerDown, onPointerMove: handlePointerMove, onPointerUp: handlePointerUp, onPointerCancel: handlePointerCancel, ...props, children: [_jsx("div", { className: "bg-muted mx-auto mt-4 h-1.5 w-[100px] shrink-0 rounded-full" }), children] })] }));
147
+ // Chain consumer pointer handlers with the internal drag handlers instead of
148
+ // letting {...props} clobber them: consumer runs first and can opt out of
149
+ // the drag logic via event.preventDefault().
150
+ const composedPointerDown = React.useCallback((event) => {
151
+ if (onPointerDown) {
152
+ onPointerDown(event);
153
+ if (event.defaultPrevented)
154
+ return;
155
+ }
156
+ handlePointerDown(event);
157
+ }, [onPointerDown, handlePointerDown]);
158
+ const composedPointerMove = React.useCallback((event) => {
159
+ if (onPointerMove) {
160
+ onPointerMove(event);
161
+ if (event.defaultPrevented)
162
+ return;
163
+ }
164
+ handlePointerMove(event);
165
+ }, [onPointerMove, handlePointerMove]);
166
+ const composedPointerUp = React.useCallback((event) => {
167
+ if (onPointerUp) {
168
+ onPointerUp(event);
169
+ if (event.defaultPrevented)
170
+ return;
171
+ }
172
+ handlePointerUp(event);
173
+ }, [onPointerUp, handlePointerUp]);
174
+ const composedPointerCancel = React.useCallback((event) => {
175
+ if (onPointerCancel) {
176
+ onPointerCancel(event);
177
+ if (event.defaultPrevented)
178
+ return;
179
+ }
180
+ handlePointerCancel();
181
+ }, [onPointerCancel, handlePointerCancel]);
182
+ return (_jsxs(DrawerPortal, { children: [_jsx(DrawerOverlay, {}), _jsxs(DialogPrimitive.Popup, { ref: mergedRef, "data-slot": "drawer-content", className: cn("drawer-popup bg-background text-sm", className), onPointerDown: composedPointerDown, onPointerMove: composedPointerMove, onPointerUp: composedPointerUp, onPointerCancel: composedPointerCancel, ...props, children: [_jsx("div", { className: "bg-muted mx-auto mt-4 h-1.5 w-[100px] shrink-0 rounded-full" }), children] })] }));
137
183
  }
138
184
  function DrawerHeader({ className, ...props }) {
139
185
  return (_jsx("div", { "data-slot": "drawer-header", className: cn("gap-0.5 p-4 text-center md:gap-1.5 md:text-left flex flex-col", className), ...props }));
@@ -14,7 +14,7 @@ function DropdownMenuTrigger({ ...props }) {
14
14
  return _jsx(MenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
15
15
  }
16
16
  function DropdownMenuContent({ align = "start", alignOffset = 0, side = "bottom", sideOffset = 4, className, ...props }) {
17
- return (_jsx(MenuPrimitive.Portal, { children: _jsx(MenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(MenuPrimitive.Popup, { "data-slot": "dropdown-menu-content", className: cn("cn-menu-target cn-menu-translucent z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }) }) }));
17
+ return (_jsx(MenuPrimitive.Portal, { children: _jsx(MenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(MenuPrimitive.Popup, { "data-slot": "dropdown-menu-content", className: cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }) }) }));
18
18
  }
19
19
  function DropdownMenuGroup({ ...props }) {
20
20
  return _jsx(MenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
@@ -32,7 +32,7 @@ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
32
32
  return (_jsxs(MenuPrimitive.SubmenuTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn("flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(ChevronRightIcon, {})] }));
33
33
  }
34
34
  function DropdownMenuSubContent({ align = "start", alignOffset = -3, side = "right", sideOffset = 0, className, ...props }) {
35
- return (_jsx(DropdownMenuContent, { "data-slot": "dropdown-menu-sub-content", className: cn("cn-menu-target cn-menu-translucent w-auto min-w-[96px] rounded-md bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, ...props }));
35
+ return (_jsx(DropdownMenuContent, { "data-slot": "dropdown-menu-sub-content", className: cn("w-auto min-w-[96px] rounded-md bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, ...props }));
36
36
  }
37
37
  function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }) {
38
38
  return (_jsxs(MenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", "data-inset": inset, className: cn("relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute right-2 flex items-center justify-center", "data-slot": "dropdown-menu-checkbox-item-indicator", children: _jsx(MenuPrimitive.CheckboxItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
@@ -22,7 +22,7 @@ function EmptyMedia({ className, variant = "default", ...props }) {
22
22
  return (_jsx("div", { "data-slot": "empty-icon", "data-variant": variant, className: cn(emptyMediaVariants({ variant, className })), ...props }));
23
23
  }
24
24
  function EmptyTitle({ className, ...props }) {
25
- return (_jsx("div", { "data-slot": "empty-title", className: cn("cn-font-heading text-lg font-medium tracking-tight", className), ...props }));
25
+ return (_jsx("div", { "data-slot": "empty-title", className: cn("text-lg font-medium tracking-tight", className), ...props }));
26
26
  }
27
27
  function EmptyDescription({ className, ...props }) {
28
28
  return (_jsx("div", { "data-slot": "empty-description", className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className), ...props }));
@@ -22,7 +22,7 @@ function MenubarTrigger({ className, ...props }) {
22
22
  return (_jsx(DropdownMenuTrigger, { "data-slot": "menubar-trigger", className: cn("cursor-pointer flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted", className), ...props }));
23
23
  }
24
24
  function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) {
25
- return (_jsx(DropdownMenuContent, { "data-slot": "menubar-content", align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("cn-menu-target cn-menu-translucent min-w-36 rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", className), ...props }));
25
+ return (_jsx(DropdownMenuContent, { "data-slot": "menubar-content", align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("min-w-36 rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", className), ...props }));
26
26
  }
27
27
  function MenubarItem({ className, inset, variant = "default", ...props }) {
28
28
  return (_jsx(DropdownMenuItem, { "data-slot": "menubar-item", "data-inset": inset, "data-variant": variant, className: cn("group/menubar-item gap-2 rounded-sm px-2 py-1.5 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!", className), ...props }));
@@ -52,6 +52,6 @@ function MenubarSubTrigger({ className, inset, ...props }) {
52
52
  return (_jsx(DropdownMenuSubTrigger, { "data-slot": "menubar-sub-trigger", "data-inset": inset, className: cn("gap-2 rounded-sm px-2 py-1.5 text-sm focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4", className), ...props }));
53
53
  }
54
54
  function MenubarSubContent({ className, ...props }) {
55
- return (_jsx(DropdownMenuSubContent, { "data-slot": "menubar-sub-content", className: cn("cn-menu-target cn-menu-translucent min-w-32 rounded-md bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }));
55
+ return (_jsx(DropdownMenuSubContent, { "data-slot": "menubar-sub-content", className: cn("min-w-32 rounded-md bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }));
56
56
  }
57
57
  export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, };
@@ -15,7 +15,7 @@ function SelectTrigger({ className, size = "default", children, ...props }) {
15
15
  return (_jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn("flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { render: _jsx(ChevronDownIcon, {}) })] }));
16
16
  }
17
17
  function SelectContent({ className, children, side = "bottom", sideOffset = 4, align = "center", alignOffset = 0, alignItemWithTrigger = true, ...props }) {
18
- return (_jsx(SelectPrimitive.Portal, { children: _jsx(SelectPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, alignItemWithTrigger: alignItemWithTrigger, className: "isolate z-50", children: _jsxs(SelectPrimitive.Popup, { "data-slot": "select-content", "data-align-trigger": alignItemWithTrigger, className: cn("cn-menu-target cn-menu-translucent relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.List, { children: children }), _jsx(SelectScrollDownButton, {})] }) }) }));
18
+ return (_jsx(SelectPrimitive.Portal, { children: _jsx(SelectPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, alignItemWithTrigger: alignItemWithTrigger, className: "isolate z-50", children: _jsxs(SelectPrimitive.Popup, { "data-slot": "select-content", "data-align-trigger": alignItemWithTrigger, className: cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.List, { children: children }), _jsx(SelectScrollDownButton, {})] }) }) }));
19
19
  }
20
20
  function SelectLabel({ className, ...props }) {
21
21
  return (_jsx(SelectPrimitive.GroupLabel, { "data-slot": "select-label", className: cn("px-2 py-1.5 text-xs text-muted-foreground", className), ...props }));
@@ -21,7 +21,7 @@ function SheetOverlay({ className, ...props }) {
21
21
  return (_jsx(SheetPrimitive.Backdrop, { "data-slot": "sheet-overlay", className: cn("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs", className), ...props }));
22
22
  }
23
23
  function SheetContent({ className, children, side = "right", showCloseButton = true, ...props }) {
24
- return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Popup, { "data-slot": "sheet-content", "data-side": side, className: cn("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className), ...props, children: [children, showCloseButton && (_jsxs(SheetPrimitive.Close, { "data-slot": "sheet-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-4 right-4", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
24
+ return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Popup, { "data-slot": "sheet-content", "data-side": side, className: cn("fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm text-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className), ...props, children: [children, showCloseButton && (_jsxs(SheetPrimitive.Close, { "data-slot": "sheet-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-4 right-4", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
25
25
  }
26
26
  function SheetHeader({ className, ...props }) {
27
27
  return (_jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5 p-4", className), ...props }));
@@ -30,7 +30,7 @@ function SheetFooter({ className, ...props }) {
30
30
  return (_jsx("div", { "data-slot": "sheet-footer", className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props }));
31
31
  }
32
32
  function SheetTitle({ className, ...props }) {
33
- return (_jsx(SheetPrimitive.Title, { "data-slot": "sheet-title", className: cn("cn-font-heading font-medium text-foreground", className), ...props }));
33
+ return (_jsx(SheetPrimitive.Title, { "data-slot": "sheet-title", className: cn("font-medium text-foreground", className), ...props }));
34
34
  }
35
35
  function SheetDescription({ className, ...props }) {
36
36
  return (_jsx(SheetPrimitive.Description, { "data-slot": "sheet-description", className: cn("text-sm text-muted-foreground", className), ...props }));
@@ -95,7 +95,7 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
95
95
  // Adjust the padding for floating and inset variants.
96
96
  variant === "floating" || variant === "inset"
97
97
  ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"
98
- : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className), ...props, children: _jsx("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border", children: children }) })] }));
98
+ : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)", className), ...props, children: _jsx("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border", children: children }) })] }));
99
99
  }
100
100
  function SidebarTrigger({ className, onClick, ...props }) {
101
101
  const { toggleSidebar } = useSidebar();
@@ -115,7 +115,7 @@ function SidebarInput({ className, ...props }) {
115
115
  return (_jsx(Input, { "data-slot": "sidebar-input", "data-sidebar": "input", className: cn("h-8 w-full bg-background shadow-none", className), ...props }));
116
116
  }
117
117
  function SidebarHeader({ className, ...props }) {
118
- return (_jsx("div", { "data-slot": "sidebar-header", "data-sidebar": "header", className: cn("flex flex-col gap-2 p-2", className), ...props }));
118
+ return (_jsx("div", { "data-slot": "sidebar-header", "data-sidebar": "header", className: cn("gap-2 px-2 pb-2 flex flex-col", className), ...props }));
119
119
  }
120
120
  function SidebarFooter({ className, ...props }) {
121
121
  return (_jsx("div", { "data-slot": "sidebar-footer", "data-sidebar": "footer", className: cn("flex flex-col gap-2 p-2", className), ...props }));
@@ -171,9 +171,9 @@ const sidebarMenuButtonVariants = cva("cursor-pointer peer/menu-button group/men
171
171
  outline: "bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]",
172
172
  },
173
173
  size: {
174
- default: "h-8 text-sm",
175
- sm: "h-7 text-xs",
176
- lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!",
174
+ default: "h-10 text-base",
175
+ sm: "h-8 text-sm",
176
+ lg: "h-14 text-base group-data-[collapsible=icon]:p-0!",
177
177
  },
178
178
  },
179
179
  defaultVariants: {
@@ -2,6 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/utils.js";
3
3
  import { Loader2Icon } from "../../icons/index.js";
4
4
  function Spinner({ className, ...props }) {
5
- return (_jsx(Loader2Icon, {}));
5
+ return (_jsx(Loader2Icon, { role: "status", "aria-label": "Loading", className: cn("size-4 animate-spin", className), ...props }));
6
6
  }
7
7
  export { Spinner };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stevederico/skateboard-ui",
3
3
  "private": false,
4
- "version": "3.10.0",
4
+ "version": "3.12.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -160,7 +160,7 @@
160
160
  }
161
161
  },
162
162
  "scripts": {
163
- "clean": "node -e \"fs.rmSync('dist',{recursive:true,force:true})\"",
163
+ "clean": "node -e \"fs.rmSync('dist',{recursive:true,force:true});fs.rmSync('.tsbuildinfo.json',{force:true})\"",
164
164
  "build": "tsc -p tsconfig.json && node scripts/copy-dist-assets.js",
165
165
  "typecheck": "tsc -p tsconfig.json --noEmit",
166
166
  "prepack": "npm run clean && npm run build",
package/styles.css CHANGED
@@ -120,6 +120,12 @@
120
120
 
121
121
  @custom-variant dark (&:is(.dark *));
122
122
 
123
+ /* base-vega bridge: base-ui emits data-orientation="horizontal|vertical",
124
+ these variants let components use data-horizontal:/data-vertical: utilities
125
+ (group-* and has-* compound forms derive automatically). */
126
+ @custom-variant data-horizontal (&[data-orientation=horizontal]);
127
+ @custom-variant data-vertical (&[data-orientation=vertical]);
128
+
123
129
  @theme {
124
130
  --color-app: var(--color-blue-500);
125
131
  }