@sesionario/blocks 1.1.0 → 1.2.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/dist/index.d.cts CHANGED
@@ -69,6 +69,21 @@ type EmptyStateProps = {
69
69
  };
70
70
  declare function EmptyState({ title, description, action, icon: Icon, variant, className, }: EmptyStateProps): React.JSX.Element;
71
71
 
72
+ type ConfirmDestructiveDialogProps = {
73
+ open: boolean;
74
+ onOpenChange: (open: boolean) => void;
75
+ title: string;
76
+ description: string;
77
+ confirmLabel?: string;
78
+ cancelLabel?: string;
79
+ onConfirm: () => void;
80
+ };
81
+ /**
82
+ * Shared confirm step for destructive actions (delete, mute, etc.).
83
+ * Prefer this over window.confirm so focus stays in the app and copy is clear.
84
+ */
85
+ declare function ConfirmDestructiveDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, onConfirm, }: ConfirmDestructiveDialogProps): React.JSX.Element;
86
+
72
87
  declare function Empty({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
73
88
  declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
74
89
  declare const emptyMediaVariants: (props?: ({
@@ -763,4 +778,4 @@ declare function ChatMessageList({ messages, currentUserId, emptyTitle, emptyDes
763
778
 
764
779
  declare function cn(...inputs: ClassValue[]): string;
765
780
 
766
- export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, type DescribedPlaybackError, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PhoneInput, type PhoneInputProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, bubbleVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, markerVariants, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, usePlaybackStats, useSearchHotkey };
781
+ export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type DescribedPlaybackError, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PhoneInput, type PhoneInputProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, bubbleVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, markerVariants, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, usePlaybackStats, useSearchHotkey };
package/dist/index.d.ts CHANGED
@@ -69,6 +69,21 @@ type EmptyStateProps = {
69
69
  };
70
70
  declare function EmptyState({ title, description, action, icon: Icon, variant, className, }: EmptyStateProps): React.JSX.Element;
71
71
 
72
+ type ConfirmDestructiveDialogProps = {
73
+ open: boolean;
74
+ onOpenChange: (open: boolean) => void;
75
+ title: string;
76
+ description: string;
77
+ confirmLabel?: string;
78
+ cancelLabel?: string;
79
+ onConfirm: () => void;
80
+ };
81
+ /**
82
+ * Shared confirm step for destructive actions (delete, mute, etc.).
83
+ * Prefer this over window.confirm so focus stays in the app and copy is clear.
84
+ */
85
+ declare function ConfirmDestructiveDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, onConfirm, }: ConfirmDestructiveDialogProps): React.JSX.Element;
86
+
72
87
  declare function Empty({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
73
88
  declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
74
89
  declare const emptyMediaVariants: (props?: ({
@@ -763,4 +778,4 @@ declare function ChatMessageList({ messages, currentUserId, emptyTitle, emptyDes
763
778
 
764
779
  declare function cn(...inputs: ClassValue[]): string;
765
780
 
766
- export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, type DescribedPlaybackError, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PhoneInput, type PhoneInputProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, bubbleVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, markerVariants, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, usePlaybackStats, useSearchHotkey };
781
+ export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type DescribedPlaybackError, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PhoneInput, type PhoneInputProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, bubbleVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, markerVariants, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, usePlaybackStats, useSearchHotkey };
package/dist/index.js CHANGED
@@ -6,10 +6,11 @@ import { clsx } from 'clsx';
6
6
  import { twMerge } from 'tailwind-merge';
7
7
  import { cva } from 'class-variance-authority';
8
8
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
10
+ import { Slot } from '@radix-ui/react-slot';
9
11
  import { useTheme } from 'next-themes';
10
- import { AnimatePresence, motion } from 'framer-motion';
12
+ import { useReducedMotion, AnimatePresence, motion } from 'framer-motion';
11
13
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
12
- import { Slot } from '@radix-ui/react-slot';
13
14
  import * as SliderPrimitive from '@radix-ui/react-slider';
14
15
  import * as TogglePrimitive from '@radix-ui/react-toggle';
15
16
  import * as DialogPrimitive from '@radix-ui/react-dialog';
@@ -212,6 +213,217 @@ function EmptyState({
212
213
  }
213
214
  );
214
215
  }
216
+ var buttonVariants = cva(
217
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
218
+ {
219
+ variants: {
220
+ variant: {
221
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
222
+ destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
223
+ outline: "border bg-background text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:text-foreground dark:hover:bg-muted dark:hover:text-foreground",
224
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
225
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 dark:hover:text-foreground",
226
+ link: "text-primary underline-offset-4 hover:underline"
227
+ },
228
+ size: {
229
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
230
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
231
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
232
+ icon: "size-9",
233
+ "icon-sm": "size-8",
234
+ "icon-lg": "size-10"
235
+ }
236
+ },
237
+ defaultVariants: {
238
+ variant: "default",
239
+ size: "default"
240
+ }
241
+ }
242
+ );
243
+ function Button({
244
+ className,
245
+ variant = "default",
246
+ size = "default",
247
+ asChild = false,
248
+ ...props
249
+ }) {
250
+ const Comp = asChild ? Slot : "button";
251
+ return /* @__PURE__ */ jsx(
252
+ Comp,
253
+ {
254
+ "data-slot": "button",
255
+ "data-variant": variant,
256
+ "data-size": size,
257
+ className: cn(buttonVariants({ variant, size, className })),
258
+ ...props
259
+ }
260
+ );
261
+ }
262
+ function AlertDialog({
263
+ ...props
264
+ }) {
265
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
266
+ }
267
+ function AlertDialogPortal({
268
+ ...props
269
+ }) {
270
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
271
+ }
272
+ function AlertDialogOverlay({
273
+ className,
274
+ ...props
275
+ }) {
276
+ return /* @__PURE__ */ jsx(
277
+ AlertDialogPrimitive.Overlay,
278
+ {
279
+ "data-slot": "alert-dialog-overlay",
280
+ className: cn(
281
+ "fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
282
+ className
283
+ ),
284
+ ...props
285
+ }
286
+ );
287
+ }
288
+ function AlertDialogContent({
289
+ className,
290
+ size = "default",
291
+ ...props
292
+ }) {
293
+ return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
294
+ /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
295
+ /* @__PURE__ */ jsx(
296
+ AlertDialogPrimitive.Content,
297
+ {
298
+ "data-slot": "alert-dialog-content",
299
+ "data-size": size,
300
+ className: cn(
301
+ "group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg",
302
+ className
303
+ ),
304
+ ...props
305
+ }
306
+ )
307
+ ] });
308
+ }
309
+ function AlertDialogHeader({
310
+ className,
311
+ ...props
312
+ }) {
313
+ return /* @__PURE__ */ jsx(
314
+ "div",
315
+ {
316
+ "data-slot": "alert-dialog-header",
317
+ className: cn(
318
+ "flex flex-col gap-1.5 text-center sm:text-left",
319
+ className
320
+ ),
321
+ ...props
322
+ }
323
+ );
324
+ }
325
+ function AlertDialogFooter({
326
+ className,
327
+ ...props
328
+ }) {
329
+ return /* @__PURE__ */ jsx(
330
+ "div",
331
+ {
332
+ "data-slot": "alert-dialog-footer",
333
+ className: cn(
334
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
335
+ className
336
+ ),
337
+ ...props
338
+ }
339
+ );
340
+ }
341
+ function AlertDialogTitle({
342
+ className,
343
+ ...props
344
+ }) {
345
+ return /* @__PURE__ */ jsx(
346
+ AlertDialogPrimitive.Title,
347
+ {
348
+ "data-slot": "alert-dialog-title",
349
+ className: cn("text-lg font-semibold", className),
350
+ ...props
351
+ }
352
+ );
353
+ }
354
+ function AlertDialogDescription({
355
+ className,
356
+ ...props
357
+ }) {
358
+ return /* @__PURE__ */ jsx(
359
+ AlertDialogPrimitive.Description,
360
+ {
361
+ "data-slot": "alert-dialog-description",
362
+ className: cn("text-sm text-muted-foreground", className),
363
+ ...props
364
+ }
365
+ );
366
+ }
367
+ function AlertDialogAction({
368
+ className,
369
+ variant = "default",
370
+ size = "default",
371
+ ...props
372
+ }) {
373
+ return /* @__PURE__ */ jsx(Button, { variant, size, asChild: true, children: /* @__PURE__ */ jsx(
374
+ AlertDialogPrimitive.Action,
375
+ {
376
+ "data-slot": "alert-dialog-action",
377
+ className: cn(className),
378
+ ...props
379
+ }
380
+ ) });
381
+ }
382
+ function AlertDialogCancel({
383
+ className,
384
+ variant = "outline",
385
+ size = "default",
386
+ ...props
387
+ }) {
388
+ return /* @__PURE__ */ jsx(Button, { variant, size, asChild: true, children: /* @__PURE__ */ jsx(
389
+ AlertDialogPrimitive.Cancel,
390
+ {
391
+ "data-slot": "alert-dialog-cancel",
392
+ className: cn(className),
393
+ ...props
394
+ }
395
+ ) });
396
+ }
397
+ function ConfirmDestructiveDialog({
398
+ open,
399
+ onOpenChange,
400
+ title,
401
+ description,
402
+ confirmLabel = "Eliminar",
403
+ cancelLabel = "Cancelar",
404
+ onConfirm
405
+ }) {
406
+ return /* @__PURE__ */ jsx(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(AlertDialogContent, { size: "sm", children: [
407
+ /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [
408
+ /* @__PURE__ */ jsx(AlertDialogTitle, { children: title }),
409
+ /* @__PURE__ */ jsx(AlertDialogDescription, { children: description })
410
+ ] }),
411
+ /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [
412
+ /* @__PURE__ */ jsx(AlertDialogCancel, { children: cancelLabel }),
413
+ /* @__PURE__ */ jsx(
414
+ AlertDialogAction,
415
+ {
416
+ variant: "destructive",
417
+ onClick: () => {
418
+ onConfirm();
419
+ onOpenChange(false);
420
+ },
421
+ children: confirmLabel
422
+ }
423
+ )
424
+ ] })
425
+ ] }) });
426
+ }
215
427
  var miniMenuContentClassName = "max-h-none overflow-x-visible overflow-y-visible";
216
428
  var miniMenuContentDefaults = {
217
429
  sideOffset: 8,
@@ -318,52 +530,6 @@ function DropdownMenuShortcut({
318
530
  }
319
531
  );
320
532
  }
321
- var buttonVariants = cva(
322
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
323
- {
324
- variants: {
325
- variant: {
326
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
327
- destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
328
- outline: "border bg-background text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:text-foreground dark:hover:bg-muted dark:hover:text-foreground",
329
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
330
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 dark:hover:text-foreground",
331
- link: "text-primary underline-offset-4 hover:underline"
332
- },
333
- size: {
334
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
335
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
336
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
337
- icon: "size-9",
338
- "icon-sm": "size-8",
339
- "icon-lg": "size-10"
340
- }
341
- },
342
- defaultVariants: {
343
- variant: "default",
344
- size: "default"
345
- }
346
- }
347
- );
348
- function Button({
349
- className,
350
- variant = "default",
351
- size = "default",
352
- asChild = false,
353
- ...props
354
- }) {
355
- const Comp = asChild ? Slot : "button";
356
- return /* @__PURE__ */ jsx(
357
- Comp,
358
- {
359
- "data-slot": "button",
360
- "data-variant": variant,
361
- "data-size": size,
362
- className: cn(buttonVariants({ variant, size, className })),
363
- ...props
364
- }
365
- );
366
- }
367
533
  var defaultLabels = {
368
534
  theme: "Theme",
369
535
  system: "System",
@@ -413,6 +579,7 @@ function ThemeSwitcher({
413
579
  }) {
414
580
  const { theme, setTheme } = useTheme();
415
581
  const [mounted, setMounted] = useState(false);
582
+ const reduceMotion = useReducedMotion();
416
583
  const sizes = sizeClasses[size];
417
584
  const shapeClass = shapeClasses[shape];
418
585
  const labels = { ...defaultLabels, ...userLabels };
@@ -496,11 +663,17 @@ function ThemeSwitcher({
496
663
  "button",
497
664
  {
498
665
  "aria-label": labels[key],
666
+ "aria-pressed": isActive,
499
667
  className: cn("relative", sizes.button, shapeClass),
500
668
  onClick: () => handleThemeClick(key),
501
669
  type: "button",
502
670
  children: [
503
- /* @__PURE__ */ jsx(AnimatePresence, { children: isActive && /* @__PURE__ */ jsx(
671
+ reduceMotion ? isActive ? /* @__PURE__ */ jsx(
672
+ "div",
673
+ {
674
+ className: cn("absolute inset-0 bg-secondary", shapeClass)
675
+ }
676
+ ) : null : /* @__PURE__ */ jsx(AnimatePresence, { children: isActive && /* @__PURE__ */ jsx(
504
677
  motion.div,
505
678
  {
506
679
  className: cn("absolute inset-0 bg-secondary", shapeClass),
@@ -765,6 +938,7 @@ function LanguageSwitcher({
765
938
  const onLanguageChange = propOnLanguageChange ?? context?.setLanguage;
766
939
  const sizes = sizeClasses2[size];
767
940
  const shapeClass = shapeClasses2[shape];
941
+ const reduceMotion = useReducedMotion();
768
942
  const defaultLabels4 = {
769
943
  language: labels.language ?? "Language"
770
944
  };
@@ -826,11 +1000,17 @@ function LanguageSwitcher({
826
1000
  "button",
827
1001
  {
828
1002
  "aria-label": label,
1003
+ "aria-pressed": isActive,
829
1004
  className: cn("relative font-semibold", sizes.button, shapeClass),
830
1005
  onClick: () => onLanguageChange?.(key),
831
1006
  type: "button",
832
1007
  children: [
833
- /* @__PURE__ */ jsx(AnimatePresence, { children: isActive && /* @__PURE__ */ jsx(
1008
+ reduceMotion ? isActive ? /* @__PURE__ */ jsx(
1009
+ "div",
1010
+ {
1011
+ className: cn("absolute inset-0 bg-secondary", shapeClass)
1012
+ }
1013
+ ) : null : /* @__PURE__ */ jsx(AnimatePresence, { children: isActive && /* @__PURE__ */ jsx(
834
1014
  motion.div,
835
1015
  {
836
1016
  className: cn("absolute inset-0 bg-secondary", shapeClass),
@@ -4580,6 +4760,6 @@ function ChatMessageList({
4580
4760
  ] }) });
4581
4761
  }
4582
4762
 
4583
- export { AvatarEditor, AvatarEditorDialog, Bubble, BubbleContent, BubbleGroup, BubbleReactions, ChatMessageList, EmojiPicker, EmojiPickerPopover, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, ErrorState, LanguageContext, LanguageSwitcher, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, OrgSwitcher, PhoneInput, SearchCommand, ThemeSwitcher, VerifiedProfessionalBadge, VideoPlayer, bubbleVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, markerVariants, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, usePlaybackStats, useSearchHotkey };
4763
+ export { AvatarEditor, AvatarEditorDialog, Bubble, BubbleContent, BubbleGroup, BubbleReactions, ChatMessageList, ConfirmDestructiveDialog, EmojiPicker, EmojiPickerPopover, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, ErrorState, LanguageContext, LanguageSwitcher, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, OrgSwitcher, PhoneInput, SearchCommand, ThemeSwitcher, VerifiedProfessionalBadge, VideoPlayer, bubbleVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, markerVariants, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, usePlaybackStats, useSearchHotkey };
4584
4764
  //# sourceMappingURL=index.js.map
4585
4765
  //# sourceMappingURL=index.js.map