@sofya-ds/react 1.1.15 → 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
@@ -33,15 +33,25 @@ interface AvatarProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps
33
33
  }
34
34
  declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
35
35
 
36
- declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
37
- declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
36
+ declare const accordionAppearanceOptions: readonly ["default", "card"];
37
+ type AccordionAppearance = (typeof accordionAppearanceOptions)[number];
38
+ type AccordionPrimitiveRootProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root>;
39
+ type AccordionProps = React.PropsWithChildren<AccordionPrimitiveRootProps & {
40
+ appearance?: AccordionAppearance;
41
+ className?: string;
42
+ }>;
38
43
  interface AccordionTriggerProps extends React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> {
44
+ description?: React.ReactNode;
45
+ hideIndicator?: boolean;
39
46
  indicator?: React.ReactNode;
47
+ leading?: React.ReactNode;
40
48
  }
41
- declare const AccordionTrigger: React.ForwardRefExoticComponent<AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>;
42
49
  interface AccordionContentProps extends React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content> {
43
50
  contentClassName?: string;
44
51
  }
52
+ declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
53
+ declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
54
+ declare const AccordionTrigger: React.ForwardRefExoticComponent<AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>;
45
55
  declare const AccordionContent: React.ForwardRefExoticComponent<AccordionContentProps & React.RefAttributes<HTMLDivElement>>;
46
56
 
47
57
  declare const alertToneOptions: readonly ["default", "info", "success", "warning", "destructive"];
@@ -240,6 +250,7 @@ declare const legacyIconToTablerNameMap: {
240
250
  readonly "caret-up": "IconChevronUp";
241
251
  readonly "caret-left": "IconChevronLeft";
242
252
  readonly "caret-right": "IconChevronRight";
253
+ readonly logout: "IconLogout";
243
254
  readonly "users-group": "IconUsersGroup";
244
255
  readonly archive: "IconArchive";
245
256
  readonly folder: "IconFolder";
@@ -250,6 +261,7 @@ declare const legacyIconToTablerNameMap: {
250
261
  readonly delete: "IconTrash";
251
262
  readonly remove: "IconTrashX";
252
263
  readonly lixeira: "IconTrash";
264
+ readonly settings: "IconSettings";
253
265
  };
254
266
  type IconName = keyof typeof legacyIconToTablerNameMap;
255
267
  declare const iconNames: IconName[];
@@ -523,7 +535,12 @@ interface SpinnerProps extends Omit<React.ComponentPropsWithoutRef<"svg">, "chil
523
535
  }
524
536
  declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<SVGSVGElement>>;
525
537
 
526
- declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
538
+ declare const switchSizeOptions: readonly ["default", "sm"];
539
+ type SwitchSize = (typeof switchSizeOptions)[number];
540
+ interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {
541
+ size?: SwitchSize;
542
+ }
543
+ declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
527
544
 
528
545
  declare const tableCellVariantOptions: readonly ["default", "primary", "muted"];
529
546
  declare const tableStatusToneOptions: readonly ["active", "inactive", "warning"];
@@ -618,4 +635,4 @@ interface SofyaProviderProps extends React.HTMLAttributes<HTMLDivElement> {
618
635
  }
619
636
  declare function SofyaProvider({ preset, overrides, className, style, children, ...props }: SofyaProviderProps): react_jsx_runtime.JSX.Element;
620
637
 
621
- export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertProps, type AlertSize, AlertTitle, type AlertTone, Avatar, type AvatarProps, Badge, type BadgeAlert, type BadgePillTone, type BadgeProps, type BadgeVariant, Button, type ButtonLanguageLocale, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Checkbox, type CheckboxProps, Dialog, DialogCancel, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dropdown, type DropdownItem, type DropdownProps, type DropdownVariant, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, type EmptyMediaProps, type EmptyProps, EmptyTitle, Icon, type IconColor, type IconName, type IconProps, type IconSize, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, type InputVariant, Label, Link, type LinkProps, Logo, type LogoProps, type LogoSize, type LogoVariant, type NotificationVariant, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverDescription, PopoverPortal, PopoverTitle, PopoverTrigger, Progress, type ProgressProps, type ProgressSize, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupOrientation, ScrollArea, ScrollAreaCorner, type ScrollAreaOrientation, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaViewport, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, type SelectSize, SelectTrigger, SelectValue, Separator, Skeleton, type SkeletonProps, Slider, type SliderProps, SofyaProvider, type SofyaProviderProps, Spinner, type SpinnerProps, type SpinnerSize, Surface, type SurfaceVariant, Switch, Table, TableActionButton, type TableActionButtonProps, TableActions, TableBody, TableCaption, TableCell, type TableCellProps, TableFooter, TableHead, TableHeader, TableRow, TableStatusBadge, type TableStatusBadgeProps, Tabs, type TabsItem, type TabsProps, Text, type TextProps, type TextSize, type TextSplitType, type TextVariant, Textarea, type TextareaProps, Toaster, type ToasterProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadKind, alertSizeOptions, alertToneOptions, avatarSizeOptions, avatarVariants, badgeAlertOptions, badgeAlertVariants, badgePillToneOptions, badgePillVariants, badgeVariantOptions, badgeVariants, buttonLanguageLocaleOptions, buttonSizeOptions, buttonVariantOptions, buttonVariants, cardVariants, dropdownLanguageItems, dropdownVariantOptions, emptyMediaVariantOptions, iconColorOptions, iconNames, iconSizeMap, iconSizeOptions, inputVariantOptions, isTextContent, logoSizeOptions, logoVariants, notificationVariantOptions, paginationLinkVariants, progressSizeOptions, radioGroupOrientationOptions, renderTextContent, scrollAreaOrientationOptions, selectSizeOptions, spinnerSizeOptions, tableActionToneOptions, tableCellVariantOptions, tableStatusToneOptions, textSizeOptions, textSplitTypeOptions, textVariantOptions, uploadKindOptions };
638
+ export { Accordion, type AccordionAppearance, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertProps, type AlertSize, AlertTitle, type AlertTone, Avatar, type AvatarProps, Badge, type BadgeAlert, type BadgePillTone, type BadgeProps, type BadgeVariant, Button, type ButtonLanguageLocale, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Checkbox, type CheckboxProps, Dialog, DialogCancel, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dropdown, type DropdownItem, type DropdownProps, type DropdownVariant, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, type EmptyMediaProps, type EmptyProps, EmptyTitle, Icon, type IconColor, type IconName, type IconProps, type IconSize, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, type InputVariant, Label, Link, type LinkProps, Logo, type LogoProps, type LogoSize, type LogoVariant, type NotificationVariant, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverDescription, PopoverPortal, PopoverTitle, PopoverTrigger, Progress, type ProgressProps, type ProgressSize, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupOrientation, ScrollArea, ScrollAreaCorner, type ScrollAreaOrientation, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaViewport, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, type SelectSize, SelectTrigger, SelectValue, Separator, Skeleton, type SkeletonProps, Slider, type SliderProps, SofyaProvider, type SofyaProviderProps, Spinner, type SpinnerProps, type SpinnerSize, Surface, type SurfaceVariant, Switch, type SwitchProps, type SwitchSize, Table, TableActionButton, type TableActionButtonProps, TableActions, TableBody, TableCaption, TableCell, type TableCellProps, TableFooter, TableHead, TableHeader, TableRow, TableStatusBadge, type TableStatusBadgeProps, Tabs, type TabsItem, type TabsProps, Text, type TextProps, type TextSize, type TextSplitType, type TextVariant, Textarea, type TextareaProps, Toaster, type ToasterProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadKind, accordionAppearanceOptions, alertSizeOptions, alertToneOptions, avatarSizeOptions, avatarVariants, badgeAlertOptions, badgeAlertVariants, badgePillToneOptions, badgePillVariants, badgeVariantOptions, badgeVariants, buttonLanguageLocaleOptions, buttonSizeOptions, buttonVariantOptions, buttonVariants, cardVariants, dropdownLanguageItems, dropdownVariantOptions, emptyMediaVariantOptions, iconColorOptions, iconNames, iconSizeMap, iconSizeOptions, inputVariantOptions, isTextContent, logoSizeOptions, logoVariants, notificationVariantOptions, paginationLinkVariants, progressSizeOptions, radioGroupOrientationOptions, renderTextContent, scrollAreaOrientationOptions, selectSizeOptions, spinnerSizeOptions, switchSizeOptions, tableActionToneOptions, tableCellVariantOptions, tableStatusToneOptions, textSizeOptions, textSplitTypeOptions, textVariantOptions, uploadKindOptions };
package/dist/index.d.ts CHANGED
@@ -33,15 +33,25 @@ interface AvatarProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps
33
33
  }
34
34
  declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
35
35
 
36
- declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
37
- declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
36
+ declare const accordionAppearanceOptions: readonly ["default", "card"];
37
+ type AccordionAppearance = (typeof accordionAppearanceOptions)[number];
38
+ type AccordionPrimitiveRootProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root>;
39
+ type AccordionProps = React.PropsWithChildren<AccordionPrimitiveRootProps & {
40
+ appearance?: AccordionAppearance;
41
+ className?: string;
42
+ }>;
38
43
  interface AccordionTriggerProps extends React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> {
44
+ description?: React.ReactNode;
45
+ hideIndicator?: boolean;
39
46
  indicator?: React.ReactNode;
47
+ leading?: React.ReactNode;
40
48
  }
41
- declare const AccordionTrigger: React.ForwardRefExoticComponent<AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>;
42
49
  interface AccordionContentProps extends React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content> {
43
50
  contentClassName?: string;
44
51
  }
52
+ declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
53
+ declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
54
+ declare const AccordionTrigger: React.ForwardRefExoticComponent<AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>;
45
55
  declare const AccordionContent: React.ForwardRefExoticComponent<AccordionContentProps & React.RefAttributes<HTMLDivElement>>;
46
56
 
47
57
  declare const alertToneOptions: readonly ["default", "info", "success", "warning", "destructive"];
@@ -240,6 +250,7 @@ declare const legacyIconToTablerNameMap: {
240
250
  readonly "caret-up": "IconChevronUp";
241
251
  readonly "caret-left": "IconChevronLeft";
242
252
  readonly "caret-right": "IconChevronRight";
253
+ readonly logout: "IconLogout";
243
254
  readonly "users-group": "IconUsersGroup";
244
255
  readonly archive: "IconArchive";
245
256
  readonly folder: "IconFolder";
@@ -250,6 +261,7 @@ declare const legacyIconToTablerNameMap: {
250
261
  readonly delete: "IconTrash";
251
262
  readonly remove: "IconTrashX";
252
263
  readonly lixeira: "IconTrash";
264
+ readonly settings: "IconSettings";
253
265
  };
254
266
  type IconName = keyof typeof legacyIconToTablerNameMap;
255
267
  declare const iconNames: IconName[];
@@ -523,7 +535,12 @@ interface SpinnerProps extends Omit<React.ComponentPropsWithoutRef<"svg">, "chil
523
535
  }
524
536
  declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<SVGSVGElement>>;
525
537
 
526
- declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
538
+ declare const switchSizeOptions: readonly ["default", "sm"];
539
+ type SwitchSize = (typeof switchSizeOptions)[number];
540
+ interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {
541
+ size?: SwitchSize;
542
+ }
543
+ declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
527
544
 
528
545
  declare const tableCellVariantOptions: readonly ["default", "primary", "muted"];
529
546
  declare const tableStatusToneOptions: readonly ["active", "inactive", "warning"];
@@ -618,4 +635,4 @@ interface SofyaProviderProps extends React.HTMLAttributes<HTMLDivElement> {
618
635
  }
619
636
  declare function SofyaProvider({ preset, overrides, className, style, children, ...props }: SofyaProviderProps): react_jsx_runtime.JSX.Element;
620
637
 
621
- export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertProps, type AlertSize, AlertTitle, type AlertTone, Avatar, type AvatarProps, Badge, type BadgeAlert, type BadgePillTone, type BadgeProps, type BadgeVariant, Button, type ButtonLanguageLocale, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Checkbox, type CheckboxProps, Dialog, DialogCancel, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dropdown, type DropdownItem, type DropdownProps, type DropdownVariant, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, type EmptyMediaProps, type EmptyProps, EmptyTitle, Icon, type IconColor, type IconName, type IconProps, type IconSize, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, type InputVariant, Label, Link, type LinkProps, Logo, type LogoProps, type LogoSize, type LogoVariant, type NotificationVariant, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverDescription, PopoverPortal, PopoverTitle, PopoverTrigger, Progress, type ProgressProps, type ProgressSize, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupOrientation, ScrollArea, ScrollAreaCorner, type ScrollAreaOrientation, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaViewport, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, type SelectSize, SelectTrigger, SelectValue, Separator, Skeleton, type SkeletonProps, Slider, type SliderProps, SofyaProvider, type SofyaProviderProps, Spinner, type SpinnerProps, type SpinnerSize, Surface, type SurfaceVariant, Switch, Table, TableActionButton, type TableActionButtonProps, TableActions, TableBody, TableCaption, TableCell, type TableCellProps, TableFooter, TableHead, TableHeader, TableRow, TableStatusBadge, type TableStatusBadgeProps, Tabs, type TabsItem, type TabsProps, Text, type TextProps, type TextSize, type TextSplitType, type TextVariant, Textarea, type TextareaProps, Toaster, type ToasterProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadKind, alertSizeOptions, alertToneOptions, avatarSizeOptions, avatarVariants, badgeAlertOptions, badgeAlertVariants, badgePillToneOptions, badgePillVariants, badgeVariantOptions, badgeVariants, buttonLanguageLocaleOptions, buttonSizeOptions, buttonVariantOptions, buttonVariants, cardVariants, dropdownLanguageItems, dropdownVariantOptions, emptyMediaVariantOptions, iconColorOptions, iconNames, iconSizeMap, iconSizeOptions, inputVariantOptions, isTextContent, logoSizeOptions, logoVariants, notificationVariantOptions, paginationLinkVariants, progressSizeOptions, radioGroupOrientationOptions, renderTextContent, scrollAreaOrientationOptions, selectSizeOptions, spinnerSizeOptions, tableActionToneOptions, tableCellVariantOptions, tableStatusToneOptions, textSizeOptions, textSplitTypeOptions, textVariantOptions, uploadKindOptions };
638
+ export { Accordion, type AccordionAppearance, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertProps, type AlertSize, AlertTitle, type AlertTone, Avatar, type AvatarProps, Badge, type BadgeAlert, type BadgePillTone, type BadgeProps, type BadgeVariant, Button, type ButtonLanguageLocale, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Checkbox, type CheckboxProps, Dialog, DialogCancel, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dropdown, type DropdownItem, type DropdownProps, type DropdownVariant, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, type EmptyMediaProps, type EmptyProps, EmptyTitle, Icon, type IconColor, type IconName, type IconProps, type IconSize, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, type InputVariant, Label, Link, type LinkProps, Logo, type LogoProps, type LogoSize, type LogoVariant, type NotificationVariant, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverDescription, PopoverPortal, PopoverTitle, PopoverTrigger, Progress, type ProgressProps, type ProgressSize, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupOrientation, ScrollArea, ScrollAreaCorner, type ScrollAreaOrientation, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaViewport, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, type SelectSize, SelectTrigger, SelectValue, Separator, Skeleton, type SkeletonProps, Slider, type SliderProps, SofyaProvider, type SofyaProviderProps, Spinner, type SpinnerProps, type SpinnerSize, Surface, type SurfaceVariant, Switch, type SwitchProps, type SwitchSize, Table, TableActionButton, type TableActionButtonProps, TableActions, TableBody, TableCaption, TableCell, type TableCellProps, TableFooter, TableHead, TableHeader, TableRow, TableStatusBadge, type TableStatusBadgeProps, Tabs, type TabsItem, type TabsProps, Text, type TextProps, type TextSize, type TextSplitType, type TextVariant, Textarea, type TextareaProps, Toaster, type ToasterProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadKind, accordionAppearanceOptions, alertSizeOptions, alertToneOptions, avatarSizeOptions, avatarVariants, badgeAlertOptions, badgeAlertVariants, badgePillToneOptions, badgePillVariants, badgeVariantOptions, badgeVariants, buttonLanguageLocaleOptions, buttonSizeOptions, buttonVariantOptions, buttonVariants, cardVariants, dropdownLanguageItems, dropdownVariantOptions, emptyMediaVariantOptions, iconColorOptions, iconNames, iconSizeMap, iconSizeOptions, inputVariantOptions, isTextContent, logoSizeOptions, logoVariants, notificationVariantOptions, paginationLinkVariants, progressSizeOptions, radioGroupOrientationOptions, renderTextContent, scrollAreaOrientationOptions, selectSizeOptions, spinnerSizeOptions, switchSizeOptions, tableActionToneOptions, tableCellVariantOptions, tableStatusToneOptions, textSizeOptions, textSplitTypeOptions, textVariantOptions, uploadKindOptions };
package/dist/index.js CHANGED
@@ -142,6 +142,8 @@ import {
142
142
  IconTrashOff,
143
143
  IconTrashX,
144
144
  IconChevronRight,
145
+ IconLogout,
146
+ IconSettings,
145
147
  IconX
146
148
  } from "@tabler/icons-react";
147
149
  var tablerIconRegistry = {
@@ -181,6 +183,8 @@ var tablerIconRegistry = {
181
183
  IconTrashOff,
182
184
  IconTrashX,
183
185
  IconChevronRight,
186
+ IconLogout,
187
+ IconSettings,
184
188
  IconX
185
189
  };
186
190
  var tablerIconNames = Object.keys(tablerIconRegistry).sort(
@@ -224,6 +228,7 @@ var legacyIconToTablerNameMap = {
224
228
  "caret-up": "IconChevronUp",
225
229
  "caret-left": "IconChevronLeft",
226
230
  "caret-right": "IconChevronRight",
231
+ "logout": "IconLogout",
227
232
  "users-group": "IconUsersGroup",
228
233
  "archive": "IconArchive",
229
234
  "folder": "IconFolder",
@@ -233,7 +238,8 @@ var legacyIconToTablerNameMap = {
233
238
  "trash-x": "IconTrashX",
234
239
  "delete": "IconTrash",
235
240
  "remove": "IconTrashX",
236
- "lixeira": "IconTrash"
241
+ "lixeira": "IconTrash",
242
+ "settings": "IconSettings"
237
243
  };
238
244
  var iconNames = Object.keys(legacyIconToTablerNameMap);
239
245
  var iconRegistry = Object.fromEntries(
@@ -594,67 +600,154 @@ function renderTextContent(children, { as, className, size = "body", style, vari
594
600
 
595
601
  // src/components/accordion.tsx
596
602
  import { jsx as jsx4, jsxs } from "react/jsx-runtime";
597
- var Accordion = AccordionPrimitive.Root;
598
- var AccordionItem = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
599
- AccordionPrimitive.Item,
603
+ var accordionAppearanceOptions = ["default", "card"];
604
+ var AccordionAppearanceContext = React4.createContext("default");
605
+ var accordionItemClasses = {
606
+ default: "group/accordion-item border-b border-border bg-transparent text-foreground",
607
+ card: "group/accordion-item bg-transparent text-foreground"
608
+ };
609
+ var accordionTriggerClasses = {
610
+ default: "sofya-accordion-trigger flex flex-1 items-center justify-between gap-4 py-4 text-left [font-family:var(--sofya-text-body-font-family)] text-[length:var(--sofya-text-body-font-size)] font-medium leading-[var(--sofya-text-body-line-height)] tracking-[var(--sofya-text-body-letter-spacing)] text-foreground transition-colors duration-sofya ease-sofya focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",
611
+ card: "sofya-accordion-trigger flex w-full items-center justify-between gap-4 rounded-[16px] border border-secondary bg-[color:var(--sofya-background)] px-6 py-4 text-left text-foreground transition-[background-color,border-color,box-shadow,color] duration-sofya ease-sofya hover:border-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--sofya-focus-ring-soft)] focus-visible:ring-offset-0 disabled:pointer-events-none disabled:opacity-50"
612
+ };
613
+ var accordionContentClasses = {
614
+ default: "sofya-accordion-content overflow-hidden text-sm text-muted-foreground",
615
+ card: "sofya-accordion-content overflow-hidden text-foreground"
616
+ };
617
+ var accordionContentBodyClasses = {
618
+ default: "pb-4 pr-10",
619
+ card: "flex flex-col gap-4 rounded-[8px] border border-border bg-[color:var(--sofya-background)] p-6"
620
+ };
621
+ function useAccordionAppearance() {
622
+ return React4.useContext(AccordionAppearanceContext);
623
+ }
624
+ var Accordion = React4.forwardRef(({ appearance = "default", className, ...props }, ref) => /* @__PURE__ */ jsx4(AccordionAppearanceContext.Provider, { value: appearance, children: /* @__PURE__ */ jsx4(
625
+ AccordionPrimitive.Root,
600
626
  {
601
627
  ref,
602
- className: cn(
603
- "group/accordion-item border-b border-border bg-transparent text-foreground",
604
- className
605
- ),
628
+ "data-appearance": appearance === "card" ? appearance : void 0,
629
+ className: cn(appearance === "card" && "flex flex-col gap-4", className),
606
630
  ...props
607
631
  }
608
- ));
632
+ ) }));
633
+ Accordion.displayName = AccordionPrimitive.Root.displayName;
634
+ var AccordionItem = React4.forwardRef(({ className, ...props }, ref) => {
635
+ const appearance = useAccordionAppearance();
636
+ return /* @__PURE__ */ jsx4(
637
+ AccordionPrimitive.Item,
638
+ {
639
+ ref,
640
+ "data-appearance": appearance === "card" ? appearance : void 0,
641
+ className: cn(accordionItemClasses[appearance], className),
642
+ ...props
643
+ }
644
+ );
645
+ });
609
646
  AccordionItem.displayName = AccordionPrimitive.Item.displayName;
610
- var AccordionTrigger = React4.forwardRef(({ className, children, indicator, ...props }, ref) => /* @__PURE__ */ jsx4(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
611
- AccordionPrimitive.Trigger,
612
- {
613
- ref,
614
- className: cn(
615
- "sofya-accordion-trigger flex flex-1 items-center justify-between gap-4 py-4 text-left [font-family:var(--sofya-text-body-font-family)] text-[length:var(--sofya-text-body-font-size)] font-medium leading-[var(--sofya-text-body-line-height)] tracking-[var(--sofya-text-body-letter-spacing)] text-foreground transition-colors duration-sofya ease-sofya focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",
616
- className
617
- ),
618
- ...props,
619
- children: [
620
- /* @__PURE__ */ jsx4("span", { className: "min-w-0 flex-1", children: renderTextContent(children, {
621
- as: "span",
622
- className: "block text-foreground",
623
- size: "body",
624
- style: {
625
- color: "inherit",
626
- fontFamily: "inherit",
627
- fontSize: "inherit",
628
- fontWeight: "inherit",
629
- letterSpacing: "inherit",
630
- lineHeight: "inherit"
631
- }
632
- }) }),
633
- /* @__PURE__ */ jsx4(
634
- "span",
647
+ var AccordionTrigger = React4.forwardRef(
648
+ ({
649
+ className,
650
+ children,
651
+ description,
652
+ hideIndicator,
653
+ indicator,
654
+ leading,
655
+ ...props
656
+ }, ref) => {
657
+ const appearance = useAccordionAppearance();
658
+ const hasDescription = description !== void 0 && description !== null;
659
+ const resolvedHideIndicator = hideIndicator ?? appearance === "card";
660
+ const indicatorNode = indicator !== void 0 ? indicator : /* @__PURE__ */ jsx4(Icon, { name: "caret-down", size: 12 });
661
+ const shouldRenderIndicator = !resolvedHideIndicator && indicatorNode != null;
662
+ return /* @__PURE__ */ jsx4(
663
+ AccordionPrimitive.Header,
664
+ {
665
+ "data-appearance": appearance === "card" ? appearance : void 0,
666
+ className: cn("flex", appearance === "card" && "w-full"),
667
+ children: /* @__PURE__ */ jsxs(
668
+ AccordionPrimitive.Trigger,
669
+ {
670
+ ref,
671
+ "data-appearance": appearance === "card" ? appearance : void 0,
672
+ className: cn(accordionTriggerClasses[appearance], className),
673
+ ...props,
674
+ children: [
675
+ /* @__PURE__ */ jsxs("span", { className: cn("min-w-0 flex-1", leading && "flex items-center gap-4"), children: [
676
+ leading ? /* @__PURE__ */ jsx4("span", { className: "flex shrink-0 items-center justify-center", children: leading }) : null,
677
+ /* @__PURE__ */ jsxs(
678
+ "span",
679
+ {
680
+ className: cn(
681
+ "min-w-0 flex-1",
682
+ (appearance === "card" || hasDescription) && "flex flex-col gap-2"
683
+ ),
684
+ children: [
685
+ renderTextContent(children, {
686
+ as: "span",
687
+ className: "block min-w-0 text-foreground",
688
+ size: appearance === "card" ? "h5" : "body",
689
+ style: appearance === "card" ? void 0 : {
690
+ color: "inherit",
691
+ fontFamily: "inherit",
692
+ fontSize: "inherit",
693
+ fontWeight: "inherit",
694
+ letterSpacing: "inherit",
695
+ lineHeight: "inherit"
696
+ }
697
+ }),
698
+ hasDescription ? renderTextContent(description, {
699
+ as: "span",
700
+ className: "block min-w-0 text-muted-foreground",
701
+ size: "body"
702
+ }) : null
703
+ ]
704
+ }
705
+ )
706
+ ] }),
707
+ shouldRenderIndicator ? /* @__PURE__ */ jsx4(
708
+ "span",
709
+ {
710
+ "aria-hidden": "true",
711
+ className: cn(
712
+ "sofya-accordion-indicator flex h-5 w-5 shrink-0 items-center justify-center text-muted-foreground transition-transform duration-sofya ease-sofya",
713
+ appearance === "card" && "text-secondary"
714
+ ),
715
+ children: indicatorNode
716
+ }
717
+ ) : null
718
+ ]
719
+ }
720
+ )
721
+ }
722
+ );
723
+ }
724
+ );
725
+ AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
726
+ var AccordionContent = React4.forwardRef(({ className, children, contentClassName, ...props }, ref) => {
727
+ const appearance = useAccordionAppearance();
728
+ return /* @__PURE__ */ jsx4(
729
+ AccordionPrimitive.Content,
730
+ {
731
+ ref,
732
+ "data-appearance": appearance === "card" ? appearance : void 0,
733
+ className: cn(accordionContentClasses[appearance], className),
734
+ ...props,
735
+ children: /* @__PURE__ */ jsx4(
736
+ "div",
635
737
  {
636
- "aria-hidden": "true",
637
738
  className: cn(
638
- "sofya-accordion-indicator flex h-5 w-5 shrink-0 items-center justify-center text-muted-foreground transition-transform duration-sofya ease-sofya"
739
+ "sofya-accordion-content-body",
740
+ accordionContentBodyClasses[appearance],
741
+ contentClassName
639
742
  ),
640
- children: indicator ?? /* @__PURE__ */ jsx4(Icon, { name: "caret-down", size: 12 })
743
+ children: renderTextContent(children, {
744
+ className: appearance === "card" ? "text-foreground" : "text-muted-foreground"
745
+ })
641
746
  }
642
747
  )
643
- ]
644
- }
645
- ) }));
646
- AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
647
- var AccordionContent = React4.forwardRef(({ className, children, contentClassName, ...props }, ref) => /* @__PURE__ */ jsx4(
648
- AccordionPrimitive.Content,
649
- {
650
- ref,
651
- className: cn("sofya-accordion-content overflow-hidden text-sm text-muted-foreground", className),
652
- ...props,
653
- children: /* @__PURE__ */ jsx4("div", { className: cn("pb-4 pr-10", contentClassName), children: renderTextContent(children, {
654
- className: "text-muted-foreground"
655
- }) })
656
- }
657
- ));
748
+ }
749
+ );
750
+ });
658
751
  AccordionContent.displayName = AccordionPrimitive.Content.displayName;
659
752
 
660
753
  // src/components/alert.tsx
@@ -4237,12 +4330,22 @@ Spinner.displayName = "Spinner";
4237
4330
  import * as React31 from "react";
4238
4331
  import * as SwitchPrimitives from "@radix-ui/react-switch";
4239
4332
  import { jsx as jsx33 } from "react/jsx-runtime";
4240
- var Switch = React31.forwardRef(({ className, ...props }, ref) => {
4333
+ var switchSizeOptions = ["default", "sm"];
4334
+ var switchRootSizeClasses = {
4335
+ default: "h-6 w-11",
4336
+ sm: "h-5 w-9"
4337
+ };
4338
+ var switchThumbSizeClasses = {
4339
+ default: "h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
4340
+ sm: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
4341
+ };
4342
+ var Switch = React31.forwardRef(({ className, size = "default", ...props }, ref) => {
4241
4343
  return /* @__PURE__ */ jsx33(
4242
4344
  SwitchPrimitives.Root,
4243
4345
  {
4244
4346
  className: cn(
4245
- "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-sofya ease-sofya focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted",
4347
+ "peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-sofya ease-sofya focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted",
4348
+ switchRootSizeClasses[size],
4246
4349
  className
4247
4350
  ),
4248
4351
  ...props,
@@ -4250,7 +4353,10 @@ var Switch = React31.forwardRef(({ className, ...props }, ref) => {
4250
4353
  children: /* @__PURE__ */ jsx33(
4251
4354
  SwitchPrimitives.Thumb,
4252
4355
  {
4253
- className: "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-sm ring-0 transition-transform duration-sofya ease-sofya data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
4356
+ className: cn(
4357
+ "pointer-events-none block rounded-full bg-background shadow-sm ring-0 transition-transform duration-sofya ease-sofya",
4358
+ switchThumbSizeClasses[size]
4359
+ )
4254
4360
  }
4255
4361
  )
4256
4362
  }
@@ -4895,6 +5001,7 @@ export {
4895
5001
  TooltipContent,
4896
5002
  TooltipProvider,
4897
5003
  TooltipTrigger,
5004
+ accordionAppearanceOptions,
4898
5005
  alertSizeOptions,
4899
5006
  alertToneOptions,
4900
5007
  avatarSizeOptions,
@@ -4943,6 +5050,7 @@ export {
4943
5050
  sofyaSurfaceNames,
4944
5051
  sofyaTextStyleNames,
4945
5052
  spinnerSizeOptions,
5053
+ switchSizeOptions,
4946
5054
  tableActionToneOptions,
4947
5055
  tableCellVariantOptions,
4948
5056
  tableStatusToneOptions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sofya-ds/react",
3
- "version": "1.1.15",
3
+ "version": "1.2.0",
4
4
  "description": "Sofya React design system with official brand tokens, provider and UI components.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -59,7 +59,7 @@
59
59
  "motion": "^12.38.0",
60
60
  "sonner": "^2.0.7",
61
61
  "tailwind-merge": "^3.5.0",
62
- "@sofya-ds/tokens": "1.1.15"
62
+ "@sofya-ds/tokens": "1.2.0"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@testing-library/jest-dom": "^6.9.1",