periplo-ui 4.16.1 → 4.16.2

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.
Files changed (55) hide show
  1. package/dist/components/data-display/DataTable/components/DataTableCell.js +1 -1
  2. package/dist/components/data-display/DataTable/components/DataTableCell.js.map +1 -1
  3. package/dist/components/data-display/DataTable/components/DataTableGroupRow.js +1 -1
  4. package/dist/components/data-display/DataTable/components/DataTableGroupRow.js.map +1 -1
  5. package/dist/components/data-display/Marquee/Marquee.js +2 -2
  6. package/dist/components/data-display/Marquee/Marquee.js.map +1 -1
  7. package/dist/components/data-display/NotificationBadge/NotificationBadge.js +1 -1
  8. package/dist/components/data-display/NotificationBadge/NotificationBadge.js.map +1 -1
  9. package/dist/components/data-display/Tooltip/Tooltip.js +1 -1
  10. package/dist/components/data-display/Tooltip/Tooltip.js.map +1 -1
  11. package/dist/components/feedback/Dialog/Dialog.js +2 -2
  12. package/dist/components/feedback/Dialog/Dialog.js.map +1 -1
  13. package/dist/components/feedback/Progress/Progress.js +1 -1
  14. package/dist/components/feedback/Progress/Progress.js.map +1 -1
  15. package/dist/components/feedback/Skeleton/Skeleton.js +1 -1
  16. package/dist/components/feedback/Skeleton/Skeleton.js.map +1 -1
  17. package/dist/components/inputs/Checkbox/Checkbox.js +1 -1
  18. package/dist/components/inputs/Checkbox/Checkbox.js.map +1 -1
  19. package/dist/components/inputs/Input/Input.js +1 -1
  20. package/dist/components/inputs/Input/Input.js.map +1 -1
  21. package/dist/components/inputs/InputDate/InputDate.js +1 -1
  22. package/dist/components/inputs/InputDate/InputDate.js.map +1 -1
  23. package/dist/components/inputs/RadioGroup/RadioGroup.js +1 -1
  24. package/dist/components/inputs/RadioGroup/RadioGroup.js.map +1 -1
  25. package/dist/components/inputs/Select/Select.js +1 -1
  26. package/dist/components/inputs/Select/Select.js.map +1 -1
  27. package/dist/components/inputs/Textarea/Textarea.js +1 -1
  28. package/dist/components/inputs/Textarea/Textarea.js.map +1 -1
  29. package/dist/components/navigation/DropdownMenu/DropdownMenu.js +2 -2
  30. package/dist/components/navigation/DropdownMenu/DropdownMenu.js.map +1 -1
  31. package/dist/components/navigation/Sheet/Sheet.js +2 -2
  32. package/dist/components/navigation/Sheet/Sheet.js.map +1 -1
  33. package/dist/components/navigation/Sidebar/Sidebar.js +6 -2
  34. package/dist/components/navigation/Sidebar/Sidebar.js.map +1 -1
  35. package/dist/components/navigation/Sidebar/SidebarMenu.js +28 -54
  36. package/dist/components/navigation/Sidebar/SidebarMenu.js.map +1 -1
  37. package/dist/components/navigation/Sidebar/SidebarUser.d.ts +3 -1
  38. package/dist/components/navigation/Sidebar/SidebarUser.js +17 -4
  39. package/dist/components/navigation/Sidebar/SidebarUser.js.map +1 -1
  40. package/dist/components/navigation/Sidebar/index.js +2 -2
  41. package/dist/components/navigation/Sidebar/styles.d.ts +1 -1
  42. package/dist/components/navigation/Sidebar/styles.js +1 -1
  43. package/dist/components/navigation/Sidebar/styles.js.map +1 -1
  44. package/dist/components/navigation/Tabs/Tabs.js +1 -1
  45. package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
  46. package/dist/components/surface/Accordion/Accordion.js +3 -3
  47. package/dist/components/surface/Accordion/Accordion.js.map +1 -1
  48. package/dist/components/utils/Popover/Popover.js +1 -1
  49. package/dist/components/utils/Popover/Popover.js.map +1 -1
  50. package/dist/index.js +2 -2
  51. package/dist/lib/useSlidingIndicator.d.ts +22 -0
  52. package/dist/lib/useSlidingIndicator.js +65 -0
  53. package/dist/lib/useSlidingIndicator.js.map +1 -0
  54. package/dist/theme.css +46 -26
  55. package/package.json +1 -1
@@ -12,7 +12,7 @@ function DataTableCell({ columnId, isCollapsible = false, isOpen = true, classNa
12
12
  className: "p-0",
13
13
  ...tableCellProps,
14
14
  children: isCollapsible ? /* @__PURE__ */ jsx("div", {
15
- className: cn("grid transition-[grid-template-rows] duration-200 ease-in-out", isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
15
+ className: cn("ease-out-strong grid transition-[grid-template-rows] duration-200 motion-reduce:transition-none", isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
16
16
  children: /* @__PURE__ */ jsx("div", {
17
17
  className: "min-w-max overflow-hidden",
18
18
  children: content
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableCell.js","names":[],"sources":["../../../../../src/components/data-display/DataTable/components/DataTableCell.tsx"],"sourcesContent":["import { ComponentProps, ReactNode } from 'react'\n\nimport { TableCell } from '../../Table'\n\nimport { getDataTableCellClassName } from './dataTableCellStyles'\n\nimport { cn } from '@/lib/utils'\n\ntype DataTableCellProps = {\n readonly columnId: string\n readonly isCollapsible?: boolean\n readonly isOpen?: boolean\n readonly className?: string\n readonly children: ReactNode\n} & Omit<ComponentProps<typeof TableCell>, 'className' | 'children'>\n\nexport function DataTableCell({\n columnId,\n isCollapsible = false,\n isOpen = true,\n className,\n children,\n ...tableCellProps\n}: DataTableCellProps) {\n const content = <div className={cn(getDataTableCellClassName({ columnId }), className)}>{children}</div>\n\n return (\n <TableCell className=\"p-0\" {...tableCellProps}>\n {isCollapsible ? (\n <div\n className={cn(\n 'grid transition-[grid-template-rows] duration-200 ease-in-out',\n isOpen ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]',\n )}\n >\n <div className=\"min-w-max overflow-hidden\">{content}</div>\n </div>\n ) : (\n content\n )}\n </TableCell>\n )\n}\n"],"mappings":";;;;;AAgBA,SAAgB,cAAc,EAC5B,UACA,gBAAgB,OAChB,SAAS,MACT,WACA,UACA,GAAG,kBACkB;CACrB,MAAM,UAAU,oBAAC,OAAD;EAAK,WAAW,GAAG,0BAA0B,EAAE,SAAS,CAAC,GAAG,SAAS;EAAI;CAAc,CAAA;CAEvG,OACE,oBAAC,WAAD;EAAW,WAAU;EAAM,GAAI;EAC5B,UAAA,gBACC,oBAAC,OAAD;GACE,WAAW,GACT,iEACA,SAAS,oBAAoB,iBAC/B;GAEA,UAAA,oBAAC,OAAD;IAAK,WAAU;IAA6B,UAAA;GAAa,CAAA;EACtD,CAAA,IAEL;CAEO,CAAA;AAEf"}
1
+ {"version":3,"file":"DataTableCell.js","names":[],"sources":["../../../../../src/components/data-display/DataTable/components/DataTableCell.tsx"],"sourcesContent":["import { ComponentProps, ReactNode } from 'react'\n\nimport { TableCell } from '../../Table'\n\nimport { getDataTableCellClassName } from './dataTableCellStyles'\n\nimport { cn } from '@/lib/utils'\n\ntype DataTableCellProps = {\n readonly columnId: string\n readonly isCollapsible?: boolean\n readonly isOpen?: boolean\n readonly className?: string\n readonly children: ReactNode\n} & Omit<ComponentProps<typeof TableCell>, 'className' | 'children'>\n\nexport function DataTableCell({\n columnId,\n isCollapsible = false,\n isOpen = true,\n className,\n children,\n ...tableCellProps\n}: DataTableCellProps) {\n const content = <div className={cn(getDataTableCellClassName({ columnId }), className)}>{children}</div>\n\n return (\n <TableCell className=\"p-0\" {...tableCellProps}>\n {isCollapsible ? (\n <div\n className={cn(\n 'ease-out-strong grid transition-[grid-template-rows] duration-200 motion-reduce:transition-none',\n isOpen ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]',\n )}\n >\n <div className=\"min-w-max overflow-hidden\">{content}</div>\n </div>\n ) : (\n content\n )}\n </TableCell>\n )\n}\n"],"mappings":";;;;;AAgBA,SAAgB,cAAc,EAC5B,UACA,gBAAgB,OAChB,SAAS,MACT,WACA,UACA,GAAG,kBACkB;CACrB,MAAM,UAAU,oBAAC,OAAD;EAAK,WAAW,GAAG,0BAA0B,EAAE,SAAS,CAAC,GAAG,SAAS;EAAI;CAAc,CAAA;CAEvG,OACE,oBAAC,WAAD;EAAW,WAAU;EAAM,GAAI;EAC5B,UAAA,gBACC,oBAAC,OAAD;GACE,WAAW,GACT,mGACA,SAAS,oBAAoB,iBAC/B;GAEA,UAAA,oBAAC,OAAD;IAAK,WAAU;IAA6B,UAAA;GAAa,CAAA;EACtD,CAAA,IAEL;CAEO,CAAA;AAEf"}
@@ -25,7 +25,7 @@ function DataTableGroupRow({ colSpan, selector, content, isOpen, onToggle }) {
25
25
  children: /* @__PURE__ */ jsx(CaretRightIcon, {
26
26
  size: 16,
27
27
  weight: "bold",
28
- className: cn("shrink-0 transition-transform", isOpen && "rotate-90")
28
+ className: cn("ease-out-strong shrink-0 transition-transform duration-200 motion-reduce:transition-none", isOpen && "rotate-90")
29
29
  })
30
30
  })]
31
31
  })
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableGroupRow.js","names":[],"sources":["../../../../../src/components/data-display/DataTable/components/DataTableGroupRow.tsx"],"sourcesContent":["import { CaretRightIcon } from '@phosphor-icons/react/dist/ssr/CaretRight'\nimport { ReactNode } from 'react'\n\nimport { TableCell, TableRow } from '../../Table'\n\nimport { ACTIONS_COLUMN_ID, getDataTableCellClassName } from './dataTableCellStyles'\n\nimport { cn } from '@/lib/utils'\n\ntype DataTableGroupRowProps = {\n readonly colSpan: number\n readonly selector?: ReactNode\n readonly content: ReactNode\n readonly isOpen: boolean\n readonly onToggle: () => void\n}\n\nexport function DataTableGroupRow({ colSpan, selector, content, isOpen, onToggle }: DataTableGroupRowProps) {\n return (\n <TableRow onClick={onToggle} aria-expanded={isOpen} className=\"cursor-pointer bg-white hover:bg-neutral-50\">\n <TableCell colSpan={colSpan} className=\"p-0\">\n <div className=\"flex items-stretch justify-between\">\n <div className={cn(getDataTableCellClassName({ columnId: 'default', kind: 'group-label' }), 'gap-3')}>\n {selector}\n {content}\n </div>\n <div\n className={cn(\n getDataTableCellClassName({ columnId: ACTIONS_COLUMN_ID }),\n 'sticky right-0 shrink-0 bg-inherit',\n )}\n >\n <CaretRightIcon\n size={16}\n weight=\"bold\"\n className={cn('shrink-0 transition-transform', isOpen && 'rotate-90')}\n />\n </div>\n </div>\n </TableCell>\n </TableRow>\n )\n}\n"],"mappings":";;;;;;AAiBA,SAAgB,kBAAkB,EAAE,SAAS,UAAU,SAAS,QAAQ,YAAoC;CAC1G,OACE,oBAAC,UAAD;EAAU,SAAS;EAAU,iBAAe;EAAQ,WAAU;EAC5D,UAAA,oBAAC,WAAD;GAAoB;GAAS,WAAU;GACrC,UAAA,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,qBAAC,OAAD;KAAK,WAAW,GAAG,0BAA0B;MAAE,UAAU;MAAW,MAAM;KAAc,CAAC,GAAG,OAAO;KAAnG,UAAA,CACG,UACA,OACE;IACL,CAAA,GAAA,oBAAC,OAAD;KACE,WAAW,GACT,0BAA0B,EAAE,UAAU,kBAAkB,CAAC,GACzD,oCACF;KAEA,UAAA,oBAAC,gBAAD;MACE,MAAM;MACN,QAAO;MACP,WAAW,GAAG,iCAAiC,UAAU,WAAW;KACrE,CAAA;IACE,CAAA,CACF;;EACI,CAAA;CACH,CAAA;AAEd"}
1
+ {"version":3,"file":"DataTableGroupRow.js","names":[],"sources":["../../../../../src/components/data-display/DataTable/components/DataTableGroupRow.tsx"],"sourcesContent":["import { CaretRightIcon } from '@phosphor-icons/react/dist/ssr/CaretRight'\nimport { ReactNode } from 'react'\n\nimport { TableCell, TableRow } from '../../Table'\n\nimport { ACTIONS_COLUMN_ID, getDataTableCellClassName } from './dataTableCellStyles'\n\nimport { cn } from '@/lib/utils'\n\ntype DataTableGroupRowProps = {\n readonly colSpan: number\n readonly selector?: ReactNode\n readonly content: ReactNode\n readonly isOpen: boolean\n readonly onToggle: () => void\n}\n\nexport function DataTableGroupRow({ colSpan, selector, content, isOpen, onToggle }: DataTableGroupRowProps) {\n return (\n <TableRow onClick={onToggle} aria-expanded={isOpen} className=\"cursor-pointer bg-white hover:bg-neutral-50\">\n <TableCell colSpan={colSpan} className=\"p-0\">\n <div className=\"flex items-stretch justify-between\">\n <div className={cn(getDataTableCellClassName({ columnId: 'default', kind: 'group-label' }), 'gap-3')}>\n {selector}\n {content}\n </div>\n <div\n className={cn(\n getDataTableCellClassName({ columnId: ACTIONS_COLUMN_ID }),\n 'sticky right-0 shrink-0 bg-inherit',\n )}\n >\n <CaretRightIcon\n size={16}\n weight=\"bold\"\n className={cn(\n 'ease-out-strong shrink-0 transition-transform duration-200 motion-reduce:transition-none',\n isOpen && 'rotate-90',\n )}\n />\n </div>\n </div>\n </TableCell>\n </TableRow>\n )\n}\n"],"mappings":";;;;;;AAiBA,SAAgB,kBAAkB,EAAE,SAAS,UAAU,SAAS,QAAQ,YAAoC;CAC1G,OACE,oBAAC,UAAD;EAAU,SAAS;EAAU,iBAAe;EAAQ,WAAU;EAC5D,UAAA,oBAAC,WAAD;GAAoB;GAAS,WAAU;GACrC,UAAA,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,qBAAC,OAAD;KAAK,WAAW,GAAG,0BAA0B;MAAE,UAAU;MAAW,MAAM;KAAc,CAAC,GAAG,OAAO;KAAnG,UAAA,CACG,UACA,OACE;IACL,CAAA,GAAA,oBAAC,OAAD;KACE,WAAW,GACT,0BAA0B,EAAE,UAAU,kBAAkB,CAAC,GACzD,oCACF;KAEA,UAAA,oBAAC,gBAAD;MACE,MAAM;MACN,QAAO;MACP,WAAW,GACT,4FACA,UAAU,WACZ;KACD,CAAA;IACE,CAAA,CACF;;EACI,CAAA;CACH,CAAA;AAEd"}
@@ -10,8 +10,8 @@ function Marquee({ className, reverse = false, pauseOnHover = false, children, v
10
10
  }, className),
11
11
  children: new Array(repeat).fill(0).map((_unused, index) => /* @__PURE__ */ jsx("div", {
12
12
  className: cn("flex shrink-0 justify-around gap-(--gap)", {
13
- "animate-marquee flex-row": !vertical,
14
- "animate-marquee-vertical flex-col": vertical,
13
+ "animate-marquee flex-row motion-reduce:animate-none": !vertical,
14
+ "animate-marquee-vertical flex-col motion-reduce:animate-none": vertical,
15
15
  "group-hover:paused": pauseOnHover,
16
16
  "direction-[reverse]": reverse
17
17
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"Marquee.js","names":[],"sources":["../../../../src/components/data-display/Marquee/Marquee.tsx"],"sourcesContent":["import { ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ntype MarqueeProps = {\n /**\n * Optional CSS class name to apply custom styles\n */\n className?: string\n /**\n * Whether to reverse the animation direction\n * @default false\n */\n reverse?: boolean\n /**\n * Whether to pause the animation on hover\n * @default false\n */\n pauseOnHover?: boolean\n /**\n * Content to be displayed in the marquee\n */\n children: React.ReactNode\n /**\n * Whether to animate vertically instead of horizontally\n * @default false\n */\n vertical?: boolean\n /**\n * Number of times to repeat the content\n * @default 4\n */\n repeat?: number\n /**\n * Animation duration (e.g., \"40s\", \"2000ms\")\n * @default \"40s\"\n */\n duration?: string\n} & ComponentPropsWithoutRef<'div'>\n\nexport function Marquee({\n className,\n reverse = false,\n pauseOnHover = false,\n children,\n vertical = false,\n repeat = 4,\n duration = '40s',\n ...props\n}: MarqueeProps) {\n return (\n <div\n {...props}\n className={cn(\n 'group flex gap-(--gap) overflow-hidden p-2 [--gap:1rem]',\n {\n 'flex-row': !vertical,\n 'flex-col': vertical,\n },\n className,\n )}\n >\n {new Array(repeat).fill(0).map((_unused, index) => (\n <div\n key={`marquee-element-${index}`} // NOSONAR: fixed-length list of unnamed, unreorderable stars; index is the only stable identity there is\n className={cn('flex shrink-0 justify-around gap-(--gap)', {\n 'animate-marquee flex-row': !vertical,\n 'animate-marquee-vertical flex-col': vertical,\n 'group-hover:paused': pauseOnHover,\n 'direction-[reverse]': reverse,\n })}\n style={{ animationDuration: duration }}\n >\n {children}\n </div>\n ))}\n </div>\n )\n}\n"],"mappings":";;;AAwCA,SAAgB,QAAQ,EACtB,WACA,UAAU,OACV,eAAe,OACf,UACA,WAAW,OACX,SAAS,GACT,WAAW,OACX,GAAG,SACY;CACf,OACE,oBAAC,OAAD;EACE,GAAI;EACJ,WAAW,GACT,2DACA;GACE,YAAY,CAAC;GACb,YAAY;EACd,GACA,SACF;EAEC,UAAA,IAAI,MAAM,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,UACvC,oBAAC,OAAD;GAEE,WAAW,GAAG,4CAA4C;IACxD,4BAA4B,CAAC;IAC7B,qCAAqC;IACrC,sBAAsB;IACtB,uBAAuB;GACzB,CAAC;GACD,OAAO,EAAE,mBAAmB,SAAS;GAEpC;EACE,GAVE,mBAAmB,OAUrB,CACN;CACE,CAAA;AAET"}
1
+ {"version":3,"file":"Marquee.js","names":[],"sources":["../../../../src/components/data-display/Marquee/Marquee.tsx"],"sourcesContent":["import { ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ntype MarqueeProps = {\n /**\n * Optional CSS class name to apply custom styles\n */\n className?: string\n /**\n * Whether to reverse the animation direction\n * @default false\n */\n reverse?: boolean\n /**\n * Whether to pause the animation on hover\n * @default false\n */\n pauseOnHover?: boolean\n /**\n * Content to be displayed in the marquee\n */\n children: React.ReactNode\n /**\n * Whether to animate vertically instead of horizontally\n * @default false\n */\n vertical?: boolean\n /**\n * Number of times to repeat the content\n * @default 4\n */\n repeat?: number\n /**\n * Animation duration (e.g., \"40s\", \"2000ms\")\n * @default \"40s\"\n */\n duration?: string\n} & ComponentPropsWithoutRef<'div'>\n\nexport function Marquee({\n className,\n reverse = false,\n pauseOnHover = false,\n children,\n vertical = false,\n repeat = 4,\n duration = '40s',\n ...props\n}: MarqueeProps) {\n return (\n <div\n {...props}\n className={cn(\n 'group flex gap-(--gap) overflow-hidden p-2 [--gap:1rem]',\n {\n 'flex-row': !vertical,\n 'flex-col': vertical,\n },\n className,\n )}\n >\n {new Array(repeat).fill(0).map((_unused, index) => (\n <div\n key={`marquee-element-${index}`} // NOSONAR: fixed-length list of unnamed, unreorderable stars; index is the only stable identity there is\n className={cn('flex shrink-0 justify-around gap-(--gap)', {\n 'animate-marquee flex-row motion-reduce:animate-none': !vertical,\n 'animate-marquee-vertical flex-col motion-reduce:animate-none': vertical,\n 'group-hover:paused': pauseOnHover,\n 'direction-[reverse]': reverse,\n })}\n style={{ animationDuration: duration }}\n >\n {children}\n </div>\n ))}\n </div>\n )\n}\n"],"mappings":";;;AAwCA,SAAgB,QAAQ,EACtB,WACA,UAAU,OACV,eAAe,OACf,UACA,WAAW,OACX,SAAS,GACT,WAAW,OACX,GAAG,SACY;CACf,OACE,oBAAC,OAAD;EACE,GAAI;EACJ,WAAW,GACT,2DACA;GACE,YAAY,CAAC;GACb,YAAY;EACd,GACA,SACF;EAEC,UAAA,IAAI,MAAM,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,UACvC,oBAAC,OAAD;GAEE,WAAW,GAAG,4CAA4C;IACxD,uDAAuD,CAAC;IACxD,gEAAgE;IAChE,sBAAsB;IACtB,uBAAuB;GACzB,CAAC;GACD,OAAO,EAAE,mBAAmB,SAAS;GAEpC;EACE,GAVE,mBAAmB,OAUrB,CACN;CACE,CAAA;AAET"}
@@ -75,7 +75,7 @@ var NotificationBadge = React$1.forwardRef(({ className, color = "accent", size
75
75
  }), !count && sizeClasses, className),
76
76
  ref,
77
77
  ...props,
78
- children: [ping && /* @__PURE__ */ jsx("span", { className: cn(notificationBadgeVariants({ color }), "absolute inline-flex h-full w-full animate-ping opacity-75") }), /* @__PURE__ */ jsx("span", {
78
+ children: [ping && /* @__PURE__ */ jsx("span", { className: cn(notificationBadgeVariants({ color }), "absolute inline-flex h-full w-full animate-ping opacity-75 motion-reduce:animate-none") }), /* @__PURE__ */ jsx("span", {
79
79
  className: cn(notificationBadgeVariants({ color }), "relative inline-flex h-full w-full items-center justify-center"),
80
80
  children: count
81
81
  })]
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationBadge.js","names":["React"],"sources":["../../../../src/components/data-display/NotificationBadge/NotificationBadge.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { cn } from '../../../lib/utils'\n\nconst notificationBadgeVariants = cva('rounded-full', {\n variants: {\n color: {\n neutral: 'bg-neutral text-neutral-foreground',\n accent: 'bg-accent text-accent-foreground',\n primary: 'bg-primary text-primary-foreground',\n success: 'bg-success text-success-foreground ',\n warning: 'bg-warning text-warning-foreground',\n error: 'bg-error text-error-foreground',\n },\n size: {\n sm: 'h-2 w-2',\n md: 'h-3 w-3',\n lg: 'h-4 w-4',\n },\n position: {\n 'top-right': 'right-0 top-0',\n 'top-left': 'left-0 top-0',\n 'bottom-right': 'right-0 bottom-0',\n 'bottom-left': 'left-0 bottom-0',\n },\n numeric: {\n true: 'min-w-4 h-4 px-1 flex items-center justify-center text-[10px] font-medium',\n false: '',\n },\n },\n defaultVariants: {\n color: 'primary',\n size: 'md',\n position: 'top-right',\n numeric: false,\n },\n})\n\nexport type NotificationBadgeProps = {\n /**\n * Controls the visibility of the pulsing animation effect\n * @default true\n */\n ping?: boolean\n\n /**\n * The color variant of the badge\n * @default 'accent'\n */\n color?: 'neutral' | 'accent' | 'primary' | 'success' | 'warning' | 'error'\n\n /**\n * The size of the badge\n * @default 'md'\n */\n size?: 'sm' | 'md' | 'lg'\n\n /**\n * The position of the badge relative to its container\n * @default 'top-right'\n */\n position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'\n\n /**\n * The number to display in the badge\n */\n count?: number\n} & React.HTMLAttributes<HTMLElement>\n\n/**\n * A dot or counter positioned absolutely over an icon or avatar, used to\n * show a notification, status, or draw attention to an element.\n *\n * @example\n * ```tsx\n * // Simple notification badge\n * <div className=\"relative\">\n * <Bell className=\"h-6 w-6\" />\n * <NotificationBadge color=\"error\" />\n * </div>\n *\n * // Custom size and position\n * <div className=\"relative\">\n * <Avatar />\n * <NotificationBadge\n * color=\"success\"\n * size=\"sm\"\n * position=\"bottom-right\"\n * ping={false}\n * />\n * </div>\n * ```\n */\nconst NotificationBadge = React.forwardRef<HTMLSpanElement, NotificationBadgeProps>(\n ({ className, color = 'accent', size = 'md', position = 'top-right', ping = true, count, ...props }, ref) => {\n const sizeClasses = {\n sm: 'h-2 w-2',\n md: 'h-3 w-3',\n lg: 'h-4 w-4',\n }[size]\n\n return (\n <span\n data-testid=\"notification-badge\"\n className={cn(\n 'absolute flex',\n notificationBadgeVariants({ color, position, numeric: !!count }),\n !count && sizeClasses,\n className,\n )}\n ref={ref}\n {...props}\n >\n {ping && (\n <span\n className={cn(\n notificationBadgeVariants({ color }),\n 'absolute inline-flex h-full w-full animate-ping opacity-75',\n )}\n />\n )}\n <span\n className={cn(\n notificationBadgeVariants({ color }),\n 'relative inline-flex h-full w-full items-center justify-center',\n )}\n >\n {count}\n </span>\n </span>\n )\n },\n)\n\nNotificationBadge.displayName = 'NotificationBadge'\n\nexport { NotificationBadge, notificationBadgeVariants }\n"],"mappings":";;;;;AAKA,IAAM,4BAA4B,IAAI,gBAAgB;CACpD,UAAU;EACR,OAAO;GACL,SAAS;GACT,QAAQ;GACR,SAAS;GACT,SAAS;GACT,SAAS;GACT,OAAO;EACT;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;EACA,UAAU;GACR,aAAa;GACb,YAAY;GACZ,gBAAgB;GAChB,eAAe;EACjB;EACA,SAAS;GACP,MAAM;GACN,OAAO;EACT;CACF;CACA,iBAAiB;EACf,OAAO;EACP,MAAM;EACN,UAAU;EACV,SAAS;CACX;AACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAyDD,IAAM,oBAAoBA,QAAM,YAC7B,EAAE,WAAW,QAAQ,UAAU,OAAO,MAAM,WAAW,aAAa,OAAO,MAAM,OAAO,GAAG,SAAS,QAAQ;CAC3G,MAAM,cAAc;EAClB,IAAI;EACJ,IAAI;EACJ,IAAI;CACN,EAAE;CAEF,OACE,qBAAC,QAAD;EACE,eAAY;EACZ,WAAW,GACT,iBACA,0BAA0B;GAAE;GAAO;GAAU,SAAS,CAAC,CAAC;EAAM,CAAC,GAC/D,CAAC,SAAS,aACV,SACF;EACK;EACL,GAAI;EATN,UAAA,CAWG,QACC,oBAAC,QAAD,EACE,WAAW,GACT,0BAA0B,EAAE,MAAM,CAAC,GACnC,4DACF,EACD,CAAA,GAEH,oBAAC,QAAD;GACE,WAAW,GACT,0BAA0B,EAAE,MAAM,CAAC,GACnC,gEACF;GAEC,UAAA;EACG,CAAA,CACF;;AAEV,CACF;AAEA,kBAAkB,cAAc"}
1
+ {"version":3,"file":"NotificationBadge.js","names":["React"],"sources":["../../../../src/components/data-display/NotificationBadge/NotificationBadge.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { cn } from '../../../lib/utils'\n\nconst notificationBadgeVariants = cva('rounded-full', {\n variants: {\n color: {\n neutral: 'bg-neutral text-neutral-foreground',\n accent: 'bg-accent text-accent-foreground',\n primary: 'bg-primary text-primary-foreground',\n success: 'bg-success text-success-foreground ',\n warning: 'bg-warning text-warning-foreground',\n error: 'bg-error text-error-foreground',\n },\n size: {\n sm: 'h-2 w-2',\n md: 'h-3 w-3',\n lg: 'h-4 w-4',\n },\n position: {\n 'top-right': 'right-0 top-0',\n 'top-left': 'left-0 top-0',\n 'bottom-right': 'right-0 bottom-0',\n 'bottom-left': 'left-0 bottom-0',\n },\n numeric: {\n true: 'min-w-4 h-4 px-1 flex items-center justify-center text-[10px] font-medium',\n false: '',\n },\n },\n defaultVariants: {\n color: 'primary',\n size: 'md',\n position: 'top-right',\n numeric: false,\n },\n})\n\nexport type NotificationBadgeProps = {\n /**\n * Controls the visibility of the pulsing animation effect\n * @default true\n */\n ping?: boolean\n\n /**\n * The color variant of the badge\n * @default 'accent'\n */\n color?: 'neutral' | 'accent' | 'primary' | 'success' | 'warning' | 'error'\n\n /**\n * The size of the badge\n * @default 'md'\n */\n size?: 'sm' | 'md' | 'lg'\n\n /**\n * The position of the badge relative to its container\n * @default 'top-right'\n */\n position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'\n\n /**\n * The number to display in the badge\n */\n count?: number\n} & React.HTMLAttributes<HTMLElement>\n\n/**\n * A dot or counter positioned absolutely over an icon or avatar, used to\n * show a notification, status, or draw attention to an element.\n *\n * @example\n * ```tsx\n * // Simple notification badge\n * <div className=\"relative\">\n * <Bell className=\"h-6 w-6\" />\n * <NotificationBadge color=\"error\" />\n * </div>\n *\n * // Custom size and position\n * <div className=\"relative\">\n * <Avatar />\n * <NotificationBadge\n * color=\"success\"\n * size=\"sm\"\n * position=\"bottom-right\"\n * ping={false}\n * />\n * </div>\n * ```\n */\nconst NotificationBadge = React.forwardRef<HTMLSpanElement, NotificationBadgeProps>(\n ({ className, color = 'accent', size = 'md', position = 'top-right', ping = true, count, ...props }, ref) => {\n const sizeClasses = {\n sm: 'h-2 w-2',\n md: 'h-3 w-3',\n lg: 'h-4 w-4',\n }[size]\n\n return (\n <span\n data-testid=\"notification-badge\"\n className={cn(\n 'absolute flex',\n notificationBadgeVariants({ color, position, numeric: !!count }),\n !count && sizeClasses,\n className,\n )}\n ref={ref}\n {...props}\n >\n {ping && (\n <span\n className={cn(\n notificationBadgeVariants({ color }),\n 'absolute inline-flex h-full w-full animate-ping opacity-75 motion-reduce:animate-none',\n )}\n />\n )}\n <span\n className={cn(\n notificationBadgeVariants({ color }),\n 'relative inline-flex h-full w-full items-center justify-center',\n )}\n >\n {count}\n </span>\n </span>\n )\n },\n)\n\nNotificationBadge.displayName = 'NotificationBadge'\n\nexport { NotificationBadge, notificationBadgeVariants }\n"],"mappings":";;;;;AAKA,IAAM,4BAA4B,IAAI,gBAAgB;CACpD,UAAU;EACR,OAAO;GACL,SAAS;GACT,QAAQ;GACR,SAAS;GACT,SAAS;GACT,SAAS;GACT,OAAO;EACT;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;EACA,UAAU;GACR,aAAa;GACb,YAAY;GACZ,gBAAgB;GAChB,eAAe;EACjB;EACA,SAAS;GACP,MAAM;GACN,OAAO;EACT;CACF;CACA,iBAAiB;EACf,OAAO;EACP,MAAM;EACN,UAAU;EACV,SAAS;CACX;AACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAyDD,IAAM,oBAAoBA,QAAM,YAC7B,EAAE,WAAW,QAAQ,UAAU,OAAO,MAAM,WAAW,aAAa,OAAO,MAAM,OAAO,GAAG,SAAS,QAAQ;CAC3G,MAAM,cAAc;EAClB,IAAI;EACJ,IAAI;EACJ,IAAI;CACN,EAAE;CAEF,OACE,qBAAC,QAAD;EACE,eAAY;EACZ,WAAW,GACT,iBACA,0BAA0B;GAAE;GAAO;GAAU,SAAS,CAAC,CAAC;EAAM,CAAC,GAC/D,CAAC,SAAS,aACV,SACF;EACK;EACL,GAAI;EATN,UAAA,CAWG,QACC,oBAAC,QAAD,EACE,WAAW,GACT,0BAA0B,EAAE,MAAM,CAAC,GACnC,uFACF,EACD,CAAA,GAEH,oBAAC,QAAD;GACE,WAAW,GACT,0BAA0B,EAAE,MAAM,CAAC,GACnC,gEACF;GAEC,UAAA;EACG,CAAA,CACF;;AAEV,CACF;AAEA,kBAAkB,cAAc"}
@@ -26,7 +26,7 @@ var TooltipContent = React$1.forwardRef(({ className, sideOffset = 4, collisionP
26
26
  ref,
27
27
  sideOffset,
28
28
  collisionPadding,
29
- className: cn("z-50 rounded-lg bg-white px-3 py-1.5 text-sm", "shadow-tooltip", "animate-in fade-in-0 zoom-in-95", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", "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", className),
29
+ className: cn("z-50 rounded-lg bg-white px-3 py-1.5 text-sm", "shadow-tooltip", "animate-in fade-in-0 zoom-in-95 ease-out-strong origin-(--radix-tooltip-content-transform-origin)", "motion-reduce:zoom-in-100 motion-reduce:data-[state=closed]:zoom-out-100", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", "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", "motion-reduce:data-[side=bottom]:slide-in-from-top-0 motion-reduce:data-[side=left]:slide-in-from-right-0 motion-reduce:data-[side=right]:slide-in-from-left-0 motion-reduce:data-[side=top]:slide-in-from-bottom-0", className),
30
30
  ...props,
31
31
  children: [children, arrow && /* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { fill: "white" })]
32
32
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","names":["React"],"sources":["../../../../src/components/data-display/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as TooltipPrimitive from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { Popover } from '../../utils/Popover/Popover'\n\nimport { useIsTouchDevice } from '@/lib/useTouchDevice'\nimport { cn } from '@/lib/utils'\n\n/**\n * Provider component that wraps all tooltip instances.\n * Controls the delay duration and positioning of tooltips app-wide.\n */\nconst TooltipProvider = TooltipPrimitive.Provider\n\n/**\n * The root component that wraps the trigger and content.\n * Manages the open state and hover interactions.\n */\nconst TooltipRoot = TooltipPrimitive.Root\n\n/**\n * The element that triggers the tooltip when hovered or focused.\n * Wrap with asChild to use custom components as triggers.\n */\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipPortal = TooltipPrimitive.Portal\n\ntype TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {\n arrow?: boolean\n /**\n * Container for the portal. When provided, the tooltip is portaled into this element instead of `document.body`.\n * Pass `null` to disable portaling and render inline (legacy behavior).\n */\n container?: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Portal>['container'] | null\n}\n\nconst TooltipContent = React.forwardRef<React.ComponentRef<typeof TooltipPrimitive.Content>, TooltipContentProps>(\n ({ className, sideOffset = 4, collisionPadding = 8, arrow, container, children, ...props }, ref) => {\n const content = (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n className={cn(\n 'z-50 rounded-lg bg-white px-3 py-1.5 text-sm',\n 'shadow-tooltip',\n 'animate-in fade-in-0 zoom-in-95',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n >\n {children}\n {arrow && <TooltipPrimitive.Arrow fill=\"white\" />}\n </TooltipPrimitive.Content>\n )\n\n if (container === null) return content\n return <TooltipPrimitive.Portal container={container ?? undefined}>{content}</TooltipPrimitive.Portal>\n },\n)\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport type TooltipProps = {\n /**\n * The content to be displayed inside the tooltip\n */\n children: React.ReactElement | string\n\n /**\n * The element that triggers the tooltip on hover\n */\n triggerElement: React.ReactElement | string\n\n /**\n * The preferred side of the trigger to render the tooltip\n */\n side?: 'top' | 'right' | 'bottom' | 'left'\n\n /**\n * Optional custom className for additional styling\n */\n className?: string\n\n /**\n * Delay duration for showing the tooltip in milliseconds\n * @default 300\n */\n delayDuration?: number\n\n /**\n * Whether to show an arrow pointer on the tooltip\n * @default false\n */\n arrow?: boolean\n\n /**\n * The preferred side of the trigger to render the mobile\n */\n mobileSide?: 'top' | 'right' | 'bottom' | 'left'\n\n /**\n * The preferred alignment of the mobile\n */\n mobileAlign?: 'start' | 'center' | 'end'\n\n /**\n * The preferred side offset of the mobile\n */\n mobileSideOffset?: number\n\n /**\n * The container to position the mobile\n */\n container?: HTMLElement\n\n /**\n * The minimum distance in pixels to keep between the tooltip and the boundary (usually the viewport) edges.\n * Can be a single number applied to all sides, or an object to configure each side individually.\n * @default 8\n */\n collisionPadding?: number | Partial<Record<'top' | 'right' | 'bottom' | 'left', number>>\n}\n\n/**\n * A versatile tooltip component that shows additional information on hover.\n * Built on top of Radix UI's tooltip primitives with custom styling and animations.\n *\n * @example\n * // Basic usage\n * <Tooltip triggerElement={<button>Hover me</button>} side=\"top\">\n * Helpful information\n * </Tooltip>\n *\n * @example\n * // With custom delay and className\n * <Tooltip\n * triggerElement={<Icon />}\n * side=\"right\"\n * delayDuration={300}\n * className=\"custom-tooltip\"\n * >\n * Icon description\n * </Tooltip>\n */\nexport function Tooltip({\n triggerElement,\n children,\n side = 'top',\n className,\n delayDuration = 300,\n arrow = false,\n mobileSide,\n mobileAlign,\n mobileSideOffset,\n container,\n collisionPadding,\n ...props\n}: Readonly<TooltipProps>) {\n const isTouchDevice = useIsTouchDevice()\n\n return isTouchDevice ? (\n <Popover\n side={mobileSide}\n className={className}\n align={mobileAlign}\n sideOffset={mobileSideOffset}\n triggerElement={triggerElement}\n container={container}\n collisionPadding={collisionPadding}\n {...props}\n >\n {children}\n </Popover>\n ) : (\n <TooltipProvider>\n <TooltipRoot delayDuration={delayDuration}>\n <TooltipTrigger asChild>{triggerElement}</TooltipTrigger>\n <TooltipContent\n side={side}\n className={className}\n arrow={arrow}\n container={container}\n collisionPadding={collisionPadding}\n >\n {children}\n </TooltipContent>\n </TooltipRoot>\n </TooltipProvider>\n )\n}\n\n/**\n * Export primitive components for custom tooltip implementations.\n * Use these when you need more control over the tooltip behavior and styling.\n *\n * @example\n * // Custom implementation using primitives\n * <TooltipProvider>\n * <TooltipRoot>\n * <TooltipTrigger asChild>\n * <button>Hover</button>\n * </TooltipTrigger>\n * <TooltipContent>Custom tooltip</TooltipContent>\n * </TooltipRoot>\n * </TooltipProvider>\n */\nexport { TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger }\n"],"mappings":";;;;;;;;;;;AAYA,IAAM,kBAAkB,iBAAiB;;;;;AAMzC,IAAM,cAAc,iBAAiB;;;;;AAMrC,IAAM,iBAAiB,iBAAiB;AAExC,IAAM,gBAAgB,iBAAiB;AAWvC,IAAM,iBAAiBA,QAAM,YAC1B,EAAE,WAAW,aAAa,GAAG,mBAAmB,GAAG,OAAO,WAAW,UAAU,GAAG,SAAS,QAAQ;CAClG,MAAM,UACJ,qBAAC,iBAAiB,SAAlB;EACO;EACO;EACM;EAClB,WAAW,GACT,gDACA,kBACA,mCACA,kGACA,0CACA,0CACA,0CACA,0CACA,SACF;EACA,GAAI;EAfN,UAAA,CAiBG,UACA,SAAS,oBAAC,iBAAiB,OAAlB,EAAwB,MAAK,QAAS,CAAA,CACxB;;CAG5B,IAAI,cAAc,MAAM,OAAO;CAC/B,OAAO,oBAAC,iBAAiB,QAAlB;EAAyB,WAAW,aAAa,KAAA;EAAY,UAAA;CAAiC,CAAA;AACvG,CACF;AACA,eAAe,cAAc,iBAAiB,QAAQ;;;;;;;;;;;;;;;;;;;;;;AAoFtD,SAAgB,QAAQ,EACtB,gBACA,UACA,OAAO,OACP,WACA,gBAAgB,KAChB,QAAQ,OACR,YACA,aACA,kBACA,WACA,kBACA,GAAG,SACsB;CAGzB,OAFsB,iBAEf,IACL,oBAAC,SAAD;EACE,MAAM;EACK;EACX,OAAO;EACP,YAAY;EACI;EACL;EACO;EAClB,GAAI;EAEH;CACM,CAAA,IAET,oBAAC,iBAAD,EAAA,UACE,qBAAC,aAAD;EAA4B;EAA5B,UAAA,CACE,oBAAC,gBAAD;GAAgB,SAAA;GAAS,UAAA;EAA+B,CAAA,GACxD,oBAAC,gBAAD;GACQ;GACK;GACJ;GACI;GACO;GAEjB;EACa,CAAA,CACL;CACE,CAAA,EAAA,CAAA;AAErB"}
1
+ {"version":3,"file":"Tooltip.js","names":["React"],"sources":["../../../../src/components/data-display/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as TooltipPrimitive from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { Popover } from '../../utils/Popover/Popover'\n\nimport { useIsTouchDevice } from '@/lib/useTouchDevice'\nimport { cn } from '@/lib/utils'\n\n/**\n * Provider component that wraps all tooltip instances.\n * Controls the delay duration and positioning of tooltips app-wide.\n */\nconst TooltipProvider = TooltipPrimitive.Provider\n\n/**\n * The root component that wraps the trigger and content.\n * Manages the open state and hover interactions.\n */\nconst TooltipRoot = TooltipPrimitive.Root\n\n/**\n * The element that triggers the tooltip when hovered or focused.\n * Wrap with asChild to use custom components as triggers.\n */\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipPortal = TooltipPrimitive.Portal\n\ntype TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {\n arrow?: boolean\n /**\n * Container for the portal. When provided, the tooltip is portaled into this element instead of `document.body`.\n * Pass `null` to disable portaling and render inline (legacy behavior).\n */\n container?: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Portal>['container'] | null\n}\n\nconst TooltipContent = React.forwardRef<React.ComponentRef<typeof TooltipPrimitive.Content>, TooltipContentProps>(\n ({ className, sideOffset = 4, collisionPadding = 8, arrow, container, children, ...props }, ref) => {\n const content = (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n className={cn(\n 'z-50 rounded-lg bg-white px-3 py-1.5 text-sm',\n 'shadow-tooltip',\n 'animate-in fade-in-0 zoom-in-95 ease-out-strong origin-(--radix-tooltip-content-transform-origin)',\n 'motion-reduce:zoom-in-100 motion-reduce:data-[state=closed]:zoom-out-100',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n 'motion-reduce:data-[side=bottom]:slide-in-from-top-0 motion-reduce:data-[side=left]:slide-in-from-right-0 motion-reduce:data-[side=right]:slide-in-from-left-0 motion-reduce:data-[side=top]:slide-in-from-bottom-0',\n className,\n )}\n {...props}\n >\n {children}\n {arrow && <TooltipPrimitive.Arrow fill=\"white\" />}\n </TooltipPrimitive.Content>\n )\n\n if (container === null) return content\n return <TooltipPrimitive.Portal container={container ?? undefined}>{content}</TooltipPrimitive.Portal>\n },\n)\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport type TooltipProps = {\n /**\n * The content to be displayed inside the tooltip\n */\n children: React.ReactElement | string\n\n /**\n * The element that triggers the tooltip on hover\n */\n triggerElement: React.ReactElement | string\n\n /**\n * The preferred side of the trigger to render the tooltip\n */\n side?: 'top' | 'right' | 'bottom' | 'left'\n\n /**\n * Optional custom className for additional styling\n */\n className?: string\n\n /**\n * Delay duration for showing the tooltip in milliseconds\n * @default 300\n */\n delayDuration?: number\n\n /**\n * Whether to show an arrow pointer on the tooltip\n * @default false\n */\n arrow?: boolean\n\n /**\n * The preferred side of the trigger to render the mobile\n */\n mobileSide?: 'top' | 'right' | 'bottom' | 'left'\n\n /**\n * The preferred alignment of the mobile\n */\n mobileAlign?: 'start' | 'center' | 'end'\n\n /**\n * The preferred side offset of the mobile\n */\n mobileSideOffset?: number\n\n /**\n * The container to position the mobile\n */\n container?: HTMLElement\n\n /**\n * The minimum distance in pixels to keep between the tooltip and the boundary (usually the viewport) edges.\n * Can be a single number applied to all sides, or an object to configure each side individually.\n * @default 8\n */\n collisionPadding?: number | Partial<Record<'top' | 'right' | 'bottom' | 'left', number>>\n}\n\n/**\n * A versatile tooltip component that shows additional information on hover.\n * Built on top of Radix UI's tooltip primitives with custom styling and animations.\n *\n * @example\n * // Basic usage\n * <Tooltip triggerElement={<button>Hover me</button>} side=\"top\">\n * Helpful information\n * </Tooltip>\n *\n * @example\n * // With custom delay and className\n * <Tooltip\n * triggerElement={<Icon />}\n * side=\"right\"\n * delayDuration={300}\n * className=\"custom-tooltip\"\n * >\n * Icon description\n * </Tooltip>\n */\nexport function Tooltip({\n triggerElement,\n children,\n side = 'top',\n className,\n delayDuration = 300,\n arrow = false,\n mobileSide,\n mobileAlign,\n mobileSideOffset,\n container,\n collisionPadding,\n ...props\n}: Readonly<TooltipProps>) {\n const isTouchDevice = useIsTouchDevice()\n\n return isTouchDevice ? (\n <Popover\n side={mobileSide}\n className={className}\n align={mobileAlign}\n sideOffset={mobileSideOffset}\n triggerElement={triggerElement}\n container={container}\n collisionPadding={collisionPadding}\n {...props}\n >\n {children}\n </Popover>\n ) : (\n <TooltipProvider>\n <TooltipRoot delayDuration={delayDuration}>\n <TooltipTrigger asChild>{triggerElement}</TooltipTrigger>\n <TooltipContent\n side={side}\n className={className}\n arrow={arrow}\n container={container}\n collisionPadding={collisionPadding}\n >\n {children}\n </TooltipContent>\n </TooltipRoot>\n </TooltipProvider>\n )\n}\n\n/**\n * Export primitive components for custom tooltip implementations.\n * Use these when you need more control over the tooltip behavior and styling.\n *\n * @example\n * // Custom implementation using primitives\n * <TooltipProvider>\n * <TooltipRoot>\n * <TooltipTrigger asChild>\n * <button>Hover</button>\n * </TooltipTrigger>\n * <TooltipContent>Custom tooltip</TooltipContent>\n * </TooltipRoot>\n * </TooltipProvider>\n */\nexport { TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger }\n"],"mappings":";;;;;;;;;;;AAYA,IAAM,kBAAkB,iBAAiB;;;;;AAMzC,IAAM,cAAc,iBAAiB;;;;;AAMrC,IAAM,iBAAiB,iBAAiB;AAExC,IAAM,gBAAgB,iBAAiB;AAWvC,IAAM,iBAAiBA,QAAM,YAC1B,EAAE,WAAW,aAAa,GAAG,mBAAmB,GAAG,OAAO,WAAW,UAAU,GAAG,SAAS,QAAQ;CAClG,MAAM,UACJ,qBAAC,iBAAiB,SAAlB;EACO;EACO;EACM;EAClB,WAAW,GACT,gDACA,kBACA,qGACA,4EACA,kGACA,0CACA,0CACA,0CACA,0CACA,uNACA,SACF;EACA,GAAI;EAjBN,UAAA,CAmBG,UACA,SAAS,oBAAC,iBAAiB,OAAlB,EAAwB,MAAK,QAAS,CAAA,CACxB;;CAG5B,IAAI,cAAc,MAAM,OAAO;CAC/B,OAAO,oBAAC,iBAAiB,QAAlB;EAAyB,WAAW,aAAa,KAAA;EAAY,UAAA;CAAiC,CAAA;AACvG,CACF;AACA,eAAe,cAAc,iBAAiB,QAAQ;;;;;;;;;;;;;;;;;;;;;;AAoFtD,SAAgB,QAAQ,EACtB,gBACA,UACA,OAAO,OACP,WACA,gBAAgB,KAChB,QAAQ,OACR,YACA,aACA,kBACA,WACA,kBACA,GAAG,SACsB;CAGzB,OAFsB,iBAEf,IACL,oBAAC,SAAD;EACE,MAAM;EACK;EACX,OAAO;EACP,YAAY;EACI;EACL;EACO;EAClB,GAAI;EAEH;CACM,CAAA,IAET,oBAAC,iBAAD,EAAA,UACE,qBAAC,aAAD;EAA4B;EAA5B,UAAA,CACE,oBAAC,gBAAD;GAAgB,SAAA;GAAS,UAAA;EAA+B,CAAA,GACxD,oBAAC,gBAAD;GACQ;GACK;GACJ;GACI;GACO;GAEjB;EACa,CAAA,CACL;CACE,CAAA,EAAA,CAAA;AAErB"}
@@ -10,7 +10,7 @@ var DialogPortal = DialogPrimitive.Portal;
10
10
  var DialogClose = DialogPrimitive.Close;
11
11
  var DialogOverlay = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Overlay, {
12
12
  ref,
13
- className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-neutral-950/32", className),
13
+ className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 ease-out-strong fixed inset-0 z-50 bg-neutral-950/32", className),
14
14
  ...props
15
15
  }));
16
16
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
@@ -18,7 +18,7 @@ var DialogContent = React$1.forwardRef(({ className, children, closable = true,
18
18
  container,
19
19
  children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
20
20
  ref,
21
- className: cn("bg-background-100 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg", className),
21
+ className: cn("bg-background-100 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 motion-reduce:data-[state=closed]:zoom-out-100 motion-reduce:data-[state=open]:zoom-in-100 ease-out-strong fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg", className),
22
22
  onPointerDownOutside: (event) => {
23
23
  if (!closable) event.preventDefault();
24
24
  },
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","names":["React"],"sources":["../../../../src/components/feedback/Dialog/Dialog.tsx"],"sourcesContent":["import { XIcon } from '@phosphor-icons/react/dist/ssr/X'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n closable?: boolean\n container?: HTMLElement | null\n}\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-neutral-950/32',\n className,\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<React.ComponentRef<typeof DialogPrimitive.Content>, DialogContentProps>(\n ({ className, children, closable = true, container, ...props }, ref) => (\n <DialogPortal container={container}>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background-100 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg',\n className,\n )}\n onPointerDownOutside={(event) => {\n if (!closable) {\n event.preventDefault()\n }\n }}\n onEscapeKeyDown={(event) => {\n if (!closable) {\n event.preventDefault()\n }\n }}\n {...props}\n >\n {children}\n {closable ? (\n <DialogPrimitive.Close className=\"data-[state=open]:text-muted-foreground ring-offset-background focus:ring-ring data-[state=open]:bg-accent absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none\">\n <XIcon size={24} weight=\"bold\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n ) : null}\n </DialogPrimitive.Content>\n </DialogPortal>\n ),\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg leading-none font-semibold tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],"mappings":";;;;;;AAWA,IAAM,SAAS,gBAAgB;AAE/B,IAAM,gBAAgB,gBAAgB;AAEtC,IAAM,eAAe,gBAAgB;AAErC,IAAM,cAAc,gBAAgB;AAEpC,IAAM,gBAAgBA,QAAM,YAGzB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,SAAjB;CACO;CACL,WAAW,GACT,gKACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,IAAM,gBAAgBA,QAAM,YACzB,EAAE,WAAW,UAAU,WAAW,MAAM,WAAW,GAAG,SAAS,QAC9D,qBAAC,cAAD;CAAyB;CAAzB,UAAA,CACE,oBAAC,eAAD,CAAgB,CAAA,GAChB,qBAAC,gBAAgB,SAAjB;EACO;EACL,WAAW,GACT,2VACA,SACF;EACA,uBAAuB,UAAU;GAC/B,IAAI,CAAC,UACH,MAAM,eAAe;EAEzB;EACA,kBAAkB,UAAU;GAC1B,IAAI,CAAC,UACH,MAAM,eAAe;EAEzB;EACA,GAAI;EAhBN,UAAA,CAkBG,UACA,WACC,qBAAC,gBAAgB,OAAjB;GAAuB,WAAU;GAAjC,UAAA,CACE,oBAAC,OAAD;IAAO,MAAM;IAAI,QAAO;GAAQ,CAAA,GAChC,oBAAC,QAAD;IAAM,WAAU;IAAU,UAAA;GAAW,CAAA,CAChB;EACrB,CAAA,IAAA,IACmB;CACb,CAAA,CAAA;AAElB,CAAA,CAAA;AACA,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,IAAM,gBAAgB,EAAE,WAAW,GAAG,YACpC,oBAAC,OAAD;CAAK,WAAW,GAAG,sDAAsD,SAAS;CAAG,GAAI;AAAQ,CAAA;AAEnG,aAAa,cAAc;AAE3B,IAAM,gBAAgB,EAAE,WAAW,GAAG,YACpC,oBAAC,OAAD;CAAK,WAAW,GAAG,iEAAiE,SAAS;CAAG,GAAI;AAAQ,CAAA;AAE9G,aAAa,cAAc;AAE3B,IAAM,cAAcA,QAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,OAAjB;CACO;CACL,WAAW,GAAG,qDAAqD,SAAS;CAC5E,GAAI;AACL,CAAA,CACF;AACD,YAAY,cAAc,gBAAgB,MAAM;AAEhD,IAAM,oBAAoBA,QAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,aAAjB;CAAkC;CAAK,WAAW,GAAG,iCAAiC,SAAS;CAAG,GAAI;AAAQ,CAAA,CAC/G;AACD,kBAAkB,cAAc,gBAAgB,YAAY"}
1
+ {"version":3,"file":"Dialog.js","names":["React"],"sources":["../../../../src/components/feedback/Dialog/Dialog.tsx"],"sourcesContent":["import { XIcon } from '@phosphor-icons/react/dist/ssr/X'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n closable?: boolean\n container?: HTMLElement | null\n}\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 ease-out-strong fixed inset-0 z-50 bg-neutral-950/32',\n className,\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<React.ComponentRef<typeof DialogPrimitive.Content>, DialogContentProps>(\n ({ className, children, closable = true, container, ...props }, ref) => (\n <DialogPortal container={container}>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background-100 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 motion-reduce:data-[state=closed]:zoom-out-100 motion-reduce:data-[state=open]:zoom-in-100 ease-out-strong fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg',\n className,\n )}\n onPointerDownOutside={(event) => {\n if (!closable) {\n event.preventDefault()\n }\n }}\n onEscapeKeyDown={(event) => {\n if (!closable) {\n event.preventDefault()\n }\n }}\n {...props}\n >\n {children}\n {closable ? (\n <DialogPrimitive.Close className=\"data-[state=open]:text-muted-foreground ring-offset-background focus:ring-ring data-[state=open]:bg-accent absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none\">\n <XIcon size={24} weight=\"bold\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n ) : null}\n </DialogPrimitive.Content>\n </DialogPortal>\n ),\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg leading-none font-semibold tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],"mappings":";;;;;;AAWA,IAAM,SAAS,gBAAgB;AAE/B,IAAM,gBAAgB,gBAAgB;AAEtC,IAAM,eAAe,gBAAgB;AAErC,IAAM,cAAc,gBAAgB;AAEpC,IAAM,gBAAgBA,QAAM,YAGzB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,SAAjB;CACO;CACL,WAAW,GACT,gLACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,IAAM,gBAAgBA,QAAM,YACzB,EAAE,WAAW,UAAU,WAAW,MAAM,WAAW,GAAG,SAAS,QAC9D,qBAAC,cAAD;CAAyB;CAAzB,UAAA,CACE,oBAAC,eAAD,CAAgB,CAAA,GAChB,qBAAC,gBAAgB,SAAjB;EACO;EACL,WAAW,GACT,scACA,SACF;EACA,uBAAuB,UAAU;GAC/B,IAAI,CAAC,UACH,MAAM,eAAe;EAEzB;EACA,kBAAkB,UAAU;GAC1B,IAAI,CAAC,UACH,MAAM,eAAe;EAEzB;EACA,GAAI;EAhBN,UAAA,CAkBG,UACA,WACC,qBAAC,gBAAgB,OAAjB;GAAuB,WAAU;GAAjC,UAAA,CACE,oBAAC,OAAD;IAAO,MAAM;IAAI,QAAO;GAAQ,CAAA,GAChC,oBAAC,QAAD;IAAM,WAAU;IAAU,UAAA;GAAW,CAAA,CAChB;EACrB,CAAA,IAAA,IACmB;CACb,CAAA,CAAA;AAElB,CAAA,CAAA;AACA,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,IAAM,gBAAgB,EAAE,WAAW,GAAG,YACpC,oBAAC,OAAD;CAAK,WAAW,GAAG,sDAAsD,SAAS;CAAG,GAAI;AAAQ,CAAA;AAEnG,aAAa,cAAc;AAE3B,IAAM,gBAAgB,EAAE,WAAW,GAAG,YACpC,oBAAC,OAAD;CAAK,WAAW,GAAG,iEAAiE,SAAS;CAAG,GAAI;AAAQ,CAAA;AAE9G,aAAa,cAAc;AAE3B,IAAM,cAAcA,QAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,OAAjB;CACO;CACL,WAAW,GAAG,qDAAqD,SAAS;CAC5E,GAAI;AACL,CAAA,CACF;AACD,YAAY,cAAc,gBAAgB,MAAM;AAEhD,IAAM,oBAAoBA,QAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,aAAjB;CAAkC;CAAK,WAAW,GAAG,iCAAiC,SAAS;CAAG,GAAI;AAAQ,CAAA,CAC/G;AACD,kBAAkB,cAAc,gBAAgB,YAAY"}
@@ -41,7 +41,7 @@ var Progress = React$1.forwardRef(({ className, value, variant = "default", size
41
41
  className: cn(progressVariants({ radius }), "animate-indeterminate bg-primary h-full w-full flex-1", indicatorColor),
42
42
  style: { transform: "translateX(-50%)" }
43
43
  }) : /* @__PURE__ */ jsx(ProgressPrimitive.Indicator, {
44
- className: cn(progressVariants({ radius }), "h-full w-full flex-1 transition-all", indicatorColor),
44
+ className: cn(progressVariants({ radius }), "h-full w-full flex-1 transition-transform", indicatorColor),
45
45
  style: { transform: `translateX(-${(100 - (progressValue ?? 0)).toString()}%)` }
46
46
  })
47
47
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Progress.js","names":["React"],"sources":["../../../../src/components/feedback/Progress/Progress.tsx"],"sourcesContent":["import * as ProgressPrimitive from '@radix-ui/react-progress'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { useFakeProgress } from '@/components/feedback/Progress/hooks/useFakeProgress'\nimport { cn } from '@/lib/utils'\n\nconst progressVariants = cva('relative w-full overflow-hidden bg-background-300', {\n variants: {\n size: {\n sm: 'h-2',\n md: 'h-4',\n lg: 'h-6',\n },\n radius: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n full: 'rounded-full',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n})\n\nexport type ProgressProps = {\n /**\n * The variant of the progress bar.\n * 'default': A standard progress bar that requires a `value` prop.\n * 'fake': A progress bar that simulates progress over a given `duration`.\n * 'indeterminate': A progress bar for when the progress is unknown.\n * @default 'default'\n */\n variant?: 'default' | 'fake' | 'indeterminate'\n /**\n * The color of the progress indicator. Should be a Tailwind CSS background color class.\n * @default 'bg-accent'\n */\n indicatorColor?: string\n /**\n * The total duration of the fake progress in milliseconds.\n * Only used when `variant` is 'fake'.\n * @default 10000\n */\n duration?: number\n /**\n * A callback function to be called when the fake progress is complete.\n * Only used when `variant` is 'fake'.\n */\n onComplete?: () => void\n /**\n * Whether to start the fake progress automatically.\n * Only used when `variant` is 'fake'.\n * @default true\n */\n autoStart?: boolean\n /**\n * The border radius of the progress bar and indicator.\n * @default 'full'\n */\n radius?: 'none' | 'sm' | 'md' | 'lg' | 'full'\n} & React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> &\n VariantProps<typeof progressVariants>\n\nconst Progress = React.forwardRef<React.ComponentRef<typeof ProgressPrimitive.Root>, ProgressProps>(\n (\n {\n className,\n value,\n variant = 'default',\n size,\n indicatorColor = 'bg-accent',\n duration = 10000,\n onComplete,\n autoStart = true,\n radius = 'full',\n ...props\n },\n ref,\n ) => {\n const { progress: fakeProgressValue } = useFakeProgress({\n duration,\n onComplete,\n autoStart: variant === 'fake' ? autoStart : false,\n })\n\n const progressValue = variant === 'fake' ? fakeProgressValue : value\n\n return (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(progressVariants({ size, radius }), className)}\n {...props}\n value={progressValue}\n >\n {variant === 'indeterminate' ? (\n <ProgressPrimitive.Indicator\n className={cn(\n progressVariants({ radius }),\n 'animate-indeterminate bg-primary h-full w-full flex-1',\n indicatorColor,\n )}\n style={{\n transform: 'translateX(-50%)',\n }}\n />\n ) : (\n <ProgressPrimitive.Indicator\n className={cn(progressVariants({ radius }), 'h-full w-full flex-1 transition-all', indicatorColor)}\n style={{ transform: `translateX(-${(100 - (progressValue ?? 0)).toString()}%)` }}\n />\n )}\n </ProgressPrimitive.Root>\n )\n },\n)\nProgress.displayName = ProgressPrimitive.Root.displayName\n\nexport { Progress }\n"],"mappings":";;;;;;;AAOA,IAAM,mBAAmB,IAAI,qDAAqD;CAChF,UAAU;EACR,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;EACA,QAAQ;GACN,MAAM;GACN,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,MAAM;EACR;CACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC;AAyCD,IAAM,WAAWA,QAAM,YAEnB,EACE,WACA,OACA,UAAU,WACV,MACA,iBAAiB,aACjB,WAAW,KACX,YACA,YAAY,MACZ,SAAS,QACT,GAAG,SAEL,QACG;CACH,MAAM,EAAE,UAAU,sBAAsB,gBAAgB;EACtD;EACA;EACA,WAAW,YAAY,SAAS,YAAY;CAC9C,CAAC;CAED,MAAM,gBAAgB,YAAY,SAAS,oBAAoB;CAE/D,OACE,oBAAC,kBAAkB,MAAnB;EACO;EACL,WAAW,GAAG,iBAAiB;GAAE;GAAM;EAAO,CAAC,GAAG,SAAS;EAC3D,GAAI;EACJ,OAAO;EAEN,UAAA,YAAY,kBACX,oBAAC,kBAAkB,WAAnB;GACE,WAAW,GACT,iBAAiB,EAAE,OAAO,CAAC,GAC3B,yDACA,cACF;GACA,OAAO,EACL,WAAW,mBACb;EACD,CAAA,IAED,oBAAC,kBAAkB,WAAnB;GACE,WAAW,GAAG,iBAAiB,EAAE,OAAO,CAAC,GAAG,uCAAuC,cAAc;GACjG,OAAO,EAAE,WAAW,gBAAgB,OAAO,iBAAiB,GAAA,CAAI,SAAS,EAAE,IAAI;EAChF,CAAA;CAEmB,CAAA;AAE5B,CACF;AACA,SAAS,cAAc,kBAAkB,KAAK"}
1
+ {"version":3,"file":"Progress.js","names":["React"],"sources":["../../../../src/components/feedback/Progress/Progress.tsx"],"sourcesContent":["import * as ProgressPrimitive from '@radix-ui/react-progress'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { useFakeProgress } from '@/components/feedback/Progress/hooks/useFakeProgress'\nimport { cn } from '@/lib/utils'\n\nconst progressVariants = cva('relative w-full overflow-hidden bg-background-300', {\n variants: {\n size: {\n sm: 'h-2',\n md: 'h-4',\n lg: 'h-6',\n },\n radius: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n full: 'rounded-full',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n})\n\nexport type ProgressProps = {\n /**\n * The variant of the progress bar.\n * 'default': A standard progress bar that requires a `value` prop.\n * 'fake': A progress bar that simulates progress over a given `duration`.\n * 'indeterminate': A progress bar for when the progress is unknown.\n * @default 'default'\n */\n variant?: 'default' | 'fake' | 'indeterminate'\n /**\n * The color of the progress indicator. Should be a Tailwind CSS background color class.\n * @default 'bg-accent'\n */\n indicatorColor?: string\n /**\n * The total duration of the fake progress in milliseconds.\n * Only used when `variant` is 'fake'.\n * @default 10000\n */\n duration?: number\n /**\n * A callback function to be called when the fake progress is complete.\n * Only used when `variant` is 'fake'.\n */\n onComplete?: () => void\n /**\n * Whether to start the fake progress automatically.\n * Only used when `variant` is 'fake'.\n * @default true\n */\n autoStart?: boolean\n /**\n * The border radius of the progress bar and indicator.\n * @default 'full'\n */\n radius?: 'none' | 'sm' | 'md' | 'lg' | 'full'\n} & React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> &\n VariantProps<typeof progressVariants>\n\nconst Progress = React.forwardRef<React.ComponentRef<typeof ProgressPrimitive.Root>, ProgressProps>(\n (\n {\n className,\n value,\n variant = 'default',\n size,\n indicatorColor = 'bg-accent',\n duration = 10000,\n onComplete,\n autoStart = true,\n radius = 'full',\n ...props\n },\n ref,\n ) => {\n const { progress: fakeProgressValue } = useFakeProgress({\n duration,\n onComplete,\n autoStart: variant === 'fake' ? autoStart : false,\n })\n\n const progressValue = variant === 'fake' ? fakeProgressValue : value\n\n return (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(progressVariants({ size, radius }), className)}\n {...props}\n value={progressValue}\n >\n {variant === 'indeterminate' ? (\n <ProgressPrimitive.Indicator\n className={cn(\n progressVariants({ radius }),\n 'animate-indeterminate bg-primary h-full w-full flex-1',\n indicatorColor,\n )}\n style={{\n transform: 'translateX(-50%)',\n }}\n />\n ) : (\n <ProgressPrimitive.Indicator\n className={cn(progressVariants({ radius }), 'h-full w-full flex-1 transition-transform', indicatorColor)}\n style={{ transform: `translateX(-${(100 - (progressValue ?? 0)).toString()}%)` }}\n />\n )}\n </ProgressPrimitive.Root>\n )\n },\n)\nProgress.displayName = ProgressPrimitive.Root.displayName\n\nexport { Progress }\n"],"mappings":";;;;;;;AAOA,IAAM,mBAAmB,IAAI,qDAAqD;CAChF,UAAU;EACR,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;EACA,QAAQ;GACN,MAAM;GACN,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,MAAM;EACR;CACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC;AAyCD,IAAM,WAAWA,QAAM,YAEnB,EACE,WACA,OACA,UAAU,WACV,MACA,iBAAiB,aACjB,WAAW,KACX,YACA,YAAY,MACZ,SAAS,QACT,GAAG,SAEL,QACG;CACH,MAAM,EAAE,UAAU,sBAAsB,gBAAgB;EACtD;EACA;EACA,WAAW,YAAY,SAAS,YAAY;CAC9C,CAAC;CAED,MAAM,gBAAgB,YAAY,SAAS,oBAAoB;CAE/D,OACE,oBAAC,kBAAkB,MAAnB;EACO;EACL,WAAW,GAAG,iBAAiB;GAAE;GAAM;EAAO,CAAC,GAAG,SAAS;EAC3D,GAAI;EACJ,OAAO;EAEN,UAAA,YAAY,kBACX,oBAAC,kBAAkB,WAAnB;GACE,WAAW,GACT,iBAAiB,EAAE,OAAO,CAAC,GAC3B,yDACA,cACF;GACA,OAAO,EACL,WAAW,mBACb;EACD,CAAA,IAED,oBAAC,kBAAkB,WAAnB;GACE,WAAW,GAAG,iBAAiB,EAAE,OAAO,CAAC,GAAG,6CAA6C,cAAc;GACvG,OAAO,EAAE,WAAW,gBAAgB,OAAO,iBAAiB,GAAA,CAAI,SAAS,EAAE,IAAI;EAChF,CAAA;CAEmB,CAAA;AAE5B,CACF;AACA,SAAS,cAAc,kBAAkB,KAAK"}
@@ -4,7 +4,7 @@ import { jsx } from "react/jsx-runtime";
4
4
  function Skeleton({ className, ...props }) {
5
5
  return /* @__PURE__ */ jsx("div", {
6
6
  "data-testid": "skeleton",
7
- className: cn("animate-pulse rounded-lg bg-neutral-100", className),
7
+ className: cn("animate-pulse rounded-lg bg-neutral-100 motion-reduce:animate-none", className),
8
8
  ...props
9
9
  });
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton.js","names":[],"sources":["../../../../src/components/feedback/Skeleton/Skeleton.tsx"],"sourcesContent":["import { cn } from '@/lib/utils'\n\nfunction Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n return <div data-testid=\"skeleton\" className={cn('animate-pulse rounded-lg bg-neutral-100', className)} {...props} />\n}\n\nexport { Skeleton }\n"],"mappings":";;;AAEA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA+C;CAC/E,OAAO,oBAAC,OAAD;EAAK,eAAY;EAAW,WAAW,GAAG,2CAA2C,SAAS;EAAG,GAAI;CAAQ,CAAA;AACtH"}
1
+ {"version":3,"file":"Skeleton.js","names":[],"sources":["../../../../src/components/feedback/Skeleton/Skeleton.tsx"],"sourcesContent":["import { cn } from '@/lib/utils'\n\nfunction Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n data-testid=\"skeleton\"\n className={cn('animate-pulse rounded-lg bg-neutral-100 motion-reduce:animate-none', className)}\n {...props}\n />\n )\n}\n\nexport { Skeleton }\n"],"mappings":";;;AAEA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA+C;CAC/E,OACE,oBAAC,OAAD;EACE,eAAY;EACZ,WAAW,GAAG,sEAAsE,SAAS;EAC7F,GAAI;CACL,CAAA;AAEL"}
@@ -31,7 +31,7 @@ var Checkbox = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__
31
31
  className: cn("peer relative h-5 w-5 shrink-0 rounded border border-neutral-300 bg-white transition-colors", "focus-visible:ring-accent-400 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none", "disabled:cursor-not-allowed disabled:border-neutral-200 disabled:bg-neutral-100 disabled:opacity-50", "data-[state=checked]:border-neutral-600 data-[state=checked]:bg-white", "data-[state=indeterminate]:border-neutral-600 data-[state=indeterminate]:bg-white", "hover:border-neutral-600 disabled:hover:border-neutral-200 data-[state=checked]:hover:border-neutral-600", className),
32
32
  ...props,
33
33
  children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, {
34
- className: cn("absolute inset-0 flex items-center justify-center"),
34
+ className: cn("absolute inset-0 flex items-center justify-center", "animate-in fade-in-0 zoom-in-90 ease-out-strong motion-reduce:zoom-in-100 duration-150"),
35
35
  children: props.checked === "indeterminate" ? /* @__PURE__ */ jsx(MinusIcon, {
36
36
  className: "h-3.5 w-3.5 text-neutral-600",
37
37
  weight: "bold"
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","names":["React"],"sources":["../../../../src/components/inputs/Checkbox/Checkbox.tsx"],"sourcesContent":["import { CheckIcon } from '@phosphor-icons/react/dist/ssr/Check'\nimport { MinusIcon } from '@phosphor-icons/react/dist/ssr/Minus'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\ntype CheckboxProps = {\n /** Additional CSS classes to be applied to the checkbox */\n className?: string\n /** The controlled checked state of the checkbox. `'indeterminate'` renders a partial (dash) state. */\n checked?: CheckboxPrimitive.CheckedState\n /** The default checked state when initially rendered */\n defaultChecked?: boolean\n /** Whether the checkbox is disabled */\n disabled?: boolean\n /** Whether the checkbox is required in a form */\n required?: boolean\n /** The name of the checkbox when used in a form */\n name?: string\n /** The value of the checkbox when used in a form */\n value?: string\n /** Handler called when the checked state changes */\n onCheckedChange?: (checked: boolean) => void\n} & React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n\n/**\n * A controlled checkbox component built on top of Radix UI Checkbox.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <Checkbox />\n *\n * // With controlled state\n * <Checkbox checked={checked} onCheckedChange={setChecked} />\n *\n * // With form integration\n * <Checkbox name=\"terms\" required />\n *\n * // With label\n * <div className=\"flex items-center gap-2\">\n * <Checkbox id=\"terms\" />\n * <label htmlFor=\"terms\">Accept terms</label>\n * </div>\n * ```\n */\nconst Checkbox = React.forwardRef<React.ComponentRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer relative h-5 w-5 shrink-0 rounded border border-neutral-300 bg-white transition-colors',\n 'focus-visible:ring-accent-400 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none',\n 'disabled:cursor-not-allowed disabled:border-neutral-200 disabled:bg-neutral-100 disabled:opacity-50',\n 'data-[state=checked]:border-neutral-600 data-[state=checked]:bg-white',\n 'data-[state=indeterminate]:border-neutral-600 data-[state=indeterminate]:bg-white',\n 'hover:border-neutral-600 disabled:hover:border-neutral-200 data-[state=checked]:hover:border-neutral-600',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={cn('absolute inset-0 flex items-center justify-center')}>\n {props.checked === 'indeterminate' ? (\n <MinusIcon className=\"h-3.5 w-3.5 text-neutral-600\" weight=\"bold\" />\n ) : (\n <CheckIcon className=\"h-3.5 w-3.5 text-neutral-600\" weight=\"bold\" />\n )}\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n ),\n)\n\nCheckbox.displayName = 'Checkbox'\n\nexport type { CheckboxProps }\nexport { Checkbox }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,IAAM,WAAWA,QAAM,YACpB,EAAE,WAAW,GAAG,SAAS,QACxB,oBAAC,kBAAkB,MAAnB;CACO;CACL,WAAW,GACT,+FACA,6GACA,uGACA,yEACA,qFACA,4GACA,SACF;CACA,GAAI;CAEJ,UAAA,oBAAC,kBAAkB,WAAnB;EAA6B,WAAW,GAAG,mDAAmD;EAC3F,UAAA,MAAM,YAAY,kBACjB,oBAAC,WAAD;GAAW,WAAU;GAA+B,QAAO;EAAQ,CAAA,IAEnE,oBAAC,WAAD;GAAW,WAAU;GAA+B,QAAO;EAAQ,CAAA;CAE1C,CAAA;AACP,CAAA,CAE5B;AAEA,SAAS,cAAc"}
1
+ {"version":3,"file":"Checkbox.js","names":["React"],"sources":["../../../../src/components/inputs/Checkbox/Checkbox.tsx"],"sourcesContent":["import { CheckIcon } from '@phosphor-icons/react/dist/ssr/Check'\nimport { MinusIcon } from '@phosphor-icons/react/dist/ssr/Minus'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\ntype CheckboxProps = {\n /** Additional CSS classes to be applied to the checkbox */\n className?: string\n /** The controlled checked state of the checkbox. `'indeterminate'` renders a partial (dash) state. */\n checked?: CheckboxPrimitive.CheckedState\n /** The default checked state when initially rendered */\n defaultChecked?: boolean\n /** Whether the checkbox is disabled */\n disabled?: boolean\n /** Whether the checkbox is required in a form */\n required?: boolean\n /** The name of the checkbox when used in a form */\n name?: string\n /** The value of the checkbox when used in a form */\n value?: string\n /** Handler called when the checked state changes */\n onCheckedChange?: (checked: boolean) => void\n} & React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n\n/**\n * A controlled checkbox component built on top of Radix UI Checkbox.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <Checkbox />\n *\n * // With controlled state\n * <Checkbox checked={checked} onCheckedChange={setChecked} />\n *\n * // With form integration\n * <Checkbox name=\"terms\" required />\n *\n * // With label\n * <div className=\"flex items-center gap-2\">\n * <Checkbox id=\"terms\" />\n * <label htmlFor=\"terms\">Accept terms</label>\n * </div>\n * ```\n */\nconst Checkbox = React.forwardRef<React.ComponentRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer relative h-5 w-5 shrink-0 rounded border border-neutral-300 bg-white transition-colors',\n 'focus-visible:ring-accent-400 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none',\n 'disabled:cursor-not-allowed disabled:border-neutral-200 disabled:bg-neutral-100 disabled:opacity-50',\n 'data-[state=checked]:border-neutral-600 data-[state=checked]:bg-white',\n 'data-[state=indeterminate]:border-neutral-600 data-[state=indeterminate]:bg-white',\n 'hover:border-neutral-600 disabled:hover:border-neutral-200 data-[state=checked]:hover:border-neutral-600',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn(\n 'absolute inset-0 flex items-center justify-center',\n 'animate-in fade-in-0 zoom-in-90 ease-out-strong motion-reduce:zoom-in-100 duration-150',\n )}\n >\n {props.checked === 'indeterminate' ? (\n <MinusIcon className=\"h-3.5 w-3.5 text-neutral-600\" weight=\"bold\" />\n ) : (\n <CheckIcon className=\"h-3.5 w-3.5 text-neutral-600\" weight=\"bold\" />\n )}\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n ),\n)\n\nCheckbox.displayName = 'Checkbox'\n\nexport type { CheckboxProps }\nexport { Checkbox }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,IAAM,WAAWA,QAAM,YACpB,EAAE,WAAW,GAAG,SAAS,QACxB,oBAAC,kBAAkB,MAAnB;CACO;CACL,WAAW,GACT,+FACA,6GACA,uGACA,yEACA,qFACA,4GACA,SACF;CACA,GAAI;CAEJ,UAAA,oBAAC,kBAAkB,WAAnB;EACE,WAAW,GACT,qDACA,wFACF;EAEC,UAAA,MAAM,YAAY,kBACjB,oBAAC,WAAD;GAAW,WAAU;GAA+B,QAAO;EAAQ,CAAA,IAEnE,oBAAC,WAAD;GAAW,WAAU;GAA+B,QAAO;EAAQ,CAAA;CAE1C,CAAA;AACP,CAAA,CAE5B;AAEA,SAAS,cAAc"}
@@ -143,7 +143,7 @@ var Input = React$1.forwardRef(({ className, htmlType = "text", placeholder, sta
143
143
  ]
144
144
  })]
145
145
  }), typeof error === "string" && /* @__PURE__ */ jsx("span", {
146
- className: "text-error-500 text-sm",
146
+ className: "text-error-500 animate-in fade-in-0 slide-in-from-top-1 ease-out-strong motion-reduce:slide-in-from-top-0 text-sm duration-150",
147
147
  children: error
148
148
  })]
149
149
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","names":["React"],"sources":["../../../../src/components/inputs/Input/Input.tsx"],"sourcesContent":["import { EyeIcon } from '@phosphor-icons/react/dist/ssr/Eye'\nimport { EyeSlashIcon } from '@phosphor-icons/react/dist/ssr/EyeSlash'\nimport { MinusIcon } from '@phosphor-icons/react/dist/ssr/Minus'\nimport { PlusIcon } from '@phosphor-icons/react/dist/ssr/Plus'\nimport { WarningCircleIcon } from '@phosphor-icons/react/dist/ssr/WarningCircle'\nimport { XIcon } from '@phosphor-icons/react/dist/ssr/X'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nexport type InputProps = {\n htmlType?: 'text' | 'tel' | 'email' | 'number' | 'password' | 'url'\n startContent?: React.ReactElement\n endContent?: React.ReactElement\n groupText?: string\n disabled?: boolean\n error?: boolean | string\n stepControls?: boolean\n inputClassName?: string\n /** Callback function executed when the clear button is clicked. When provided, an X button will appear on hover to clear the input. */\n onClear?: boolean | (() => void)\n} & React.InputHTMLAttributes<HTMLInputElement>\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n (\n {\n className,\n htmlType = 'text',\n placeholder,\n startContent,\n endContent,\n groupText,\n disabled,\n error,\n stepControls,\n value: controlledValue,\n onChange: controlledOnChange,\n inputClassName,\n onClear = true,\n ...props\n },\n ref,\n ) => {\n const isHtmlTypePassword = htmlType === 'password'\n const isHtmlTypeNumber = htmlType === 'number'\n const hasStepControls = stepControls && isHtmlTypeNumber\n\n const [type, setType] = React.useState(htmlType)\n const [internalValue, setInternalValue] = React.useState(controlledValue)\n const [isHovered, setIsHovered] = React.useState(false)\n\n React.useEffect(() => {\n setInternalValue(controlledValue)\n }, [controlledValue])\n\n const toggleType = () => {\n setType(type === 'password' ? 'text' : 'password')\n }\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n setInternalValue(event.target.value)\n if (controlledOnChange) {\n controlledOnChange(event)\n }\n }\n\n const handleStepChange = (increment: number) => {\n const currentValue = Number(internalValue ?? 0)\n const newValue = currentValue + increment\n if (newValue >= 0) {\n const event = {\n target: { value: newValue.toString() },\n } as React.ChangeEvent<HTMLInputElement>\n handleChange(event)\n }\n }\n\n const handleClear = () => {\n const event = {\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>\n handleChange(event)\n\n if (typeof onClear === 'function') {\n onClear()\n }\n }\n\n const renderPasswordEye = () => {\n if (!isHtmlTypePassword) return null\n\n return (\n <button\n type=\"button\"\n className=\"flex aspect-square items-center justify-center rounded-full p-2 transition-colors hover:bg-neutral-50\"\n onClick={() => toggleType()}\n >\n {type === 'password' ? (\n <EyeSlashIcon size={20} data-testid=\"password-eye-closed\" />\n ) : (\n <EyeIcon size={20} data-testid=\"password-eye-open\" />\n )}\n </button>\n )\n }\n\n const renderErrorIcon = () => {\n if (isHtmlTypePassword || !error || hasStepControls) return null\n return (\n <div>\n <WarningCircleIcon\n data-testid=\"exclaim-icon\"\n className={cn(\n 'text-error-500 transition-opacity duration-150',\n showClearIcon ? 'opacity-0' : 'opacity-100',\n )}\n size={18}\n />\n </div>\n )\n }\n\n const renderStepControlsIncrement = () => {\n if (!hasStepControls) return null\n return (\n <button\n type=\"button\"\n disabled={disabled}\n onClick={() => handleStepChange(1)}\n className=\"p-2\"\n aria-label=\"Increment\"\n >\n <PlusIcon data-testid=\"increment-button\" />\n </button>\n )\n }\n\n const renderEndContent = () => {\n if (isHtmlTypePassword || error || hasStepControls || !endContent) return null\n return (\n <div\n className={cn(\n 'text-neutral-300 transition-opacity duration-150',\n showClearIcon ? 'opacity-0' : 'opacity-100',\n )}\n >\n {endContent}\n </div>\n )\n }\n\n const renderClearIcon = () => {\n if (disabled || hasStepControls || isHtmlTypePassword || !onClear) return null\n\n return (\n <div\n className={cn(\n 'absolute right-3 z-10 flex h-full w-10 items-center justify-end rounded-r-lg',\n !endContent && !error\n ? 'bg-linear-to-l from-white from-60% via-white/80 via-80% to-transparent transition-opacity duration-150'\n : 'bg-transparent',\n showClearIcon ? 'opacity-100' : 'opacity-0',\n )}\n >\n <XIcon\n data-testid=\"clear-button\"\n className={cn(\n 'h-4 w-4 shrink-0 cursor-pointer transition-opacity duration-150',\n showClearIcon ? 'opacity-100 hover:opacity-70' : 'opacity-0',\n )}\n onClick={handleClear}\n />\n </div>\n )\n }\n\n const renderStartContent = () => {\n if (!startContent) return null\n return <div className=\"text-neutral-300\">{startContent}</div>\n }\n\n const renderStepControlsDecrement = () => {\n if (!hasStepControls) return null\n return (\n <button\n type=\"button\"\n disabled={disabled}\n onClick={() => handleStepChange(-1)}\n className=\"p-2\"\n aria-label=\"Decrement\"\n >\n <MinusIcon data-testid=\"decrement-button\" />\n </button>\n )\n }\n\n const hasValue = Boolean(internalValue && String(internalValue).trim() !== '')\n const showClearIcon = onClear && hasValue && isHovered && !disabled && !isHtmlTypePassword && !hasStepControls\n\n return (\n <div className=\"flex w-full flex-col gap-1\">\n <div className=\"flex w-full items-center\">\n {groupText && (\n <div\n className={cn(\n 'flex h-12 items-center rounded-l-lg border-y border-l border-neutral-200 bg-neutral-50 pr-2 pl-4 text-neutral-300',\n )}\n >\n {groupText}\n </div>\n )}\n <div\n className={cn(\n 'relative flex h-12 w-full items-center rounded-lg border border-neutral-200 bg-white px-3 transition-colors focus-within:border-neutral-950',\n groupText && 'rounded-l-none',\n disabled && 'bg-neutral-50',\n error && 'border-error-400 focus-within:border-error-700',\n className,\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n >\n {renderStartContent()}\n {renderStepControlsDecrement()}\n <input\n type={type}\n className={cn(\n 'w-full bg-transparent px-2 outline-0 transition-colors placeholder:text-neutral-300 disabled:cursor-not-allowed disabled:opacity-50',\n hasStepControls && 'text-center',\n inputClassName,\n )}\n ref={ref}\n onChange={handleChange}\n placeholder={placeholder}\n disabled={disabled}\n value={internalValue}\n onKeyDown={(event) => {\n if (isHtmlTypeNumber && (event.key === 'e' || event.key === 'E' || event.key === '-')) {\n event.preventDefault()\n }\n }}\n {...props}\n />\n {renderPasswordEye()}\n {renderClearIcon()}\n {renderErrorIcon()}\n {renderStepControlsIncrement()}\n {renderEndContent()}\n </div>\n </div>\n {typeof error === 'string' && <span className=\"text-error-500 text-sm\">{error}</span>}\n </div>\n )\n },\n)\nInput.displayName = 'Input'\n\nexport { Input }\n"],"mappings":";;;;;;;;;;AAuBA,IAAM,QAAQA,QAAM,YAEhB,EACE,WACA,WAAW,QACX,aAC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M,gBAAgB,WAAW,YAAY,aAAa,CAAC,YAAY,CAAC,sBAAsB,CAAC;CAE/F,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACG,aACC,oBAAC,OAAD;IACE,WAAW,GACT,mHACF;IAEC,UAAA;GACE,CAAA,GAEP,qBAAC,OAAD;IACE,WAAW,GACT,+IACA,aAAa,kBACb,YAAY,iBACZ,SAAS,kDACT,SACF;IACA,oBAAoB,aAAa,IAAI;IACrC,oBAAoB,aAAa,KAAK;IATxC,UAAA;KAWG,mBAAmB;KACnB,4BAA4B;KAC7B,oBAAC,SAAD;MACQ;MACN,WAAW,GACT,uIACA,mBAAmB,eACnB,cACF;MACK;MACL,UAAU;MACG;MACH;MACV,OAAO;MACP,YAAY,UAAU;OACpB,IAAI,qBAAqB,MAAM,QAAQ,OAAO,MAAM,QAAQ,OAAO,MAAM,QAAQ,MAC/E,MAAM,eAAe;MAEzB;MACA,GAAI;KACL,CAAA;KACA,kBAAkB;KAClB,gBAAgB;KAChB,gBAAgB;KAChB,4BAA4B;KAC5B,iBAAiB;IACf;GACF,CAAA,CAAA;EACJ,CAAA,GAAA,OAAO,UAAU,YAAY,oBAAC,QAAD;GAAM,WAAU;GAA0B,UAAA;EAAY,CAAA,CACjF;;AAET,CACF;AACA,MAAM,cAAc"}
1
+ {"version":3,"file":"Input.js","names":["React"],"sources":["../../../../src/components/inputs/Input/Input.tsx"],"sourcesContent":["import { EyeIcon } from '@phosphor-icons/react/dist/ssr/Eye'\nimport { EyeSlashIcon } from '@phosphor-icons/react/dist/ssr/EyeSlash'\nimport { MinusIcon } from '@phosphor-icons/react/dist/ssr/Minus'\nimport { PlusIcon } from '@phosphor-icons/react/dist/ssr/Plus'\nimport { WarningCircleIcon } from '@phosphor-icons/react/dist/ssr/WarningCircle'\nimport { XIcon } from '@phosphor-icons/react/dist/ssr/X'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nexport type InputProps = {\n htmlType?: 'text' | 'tel' | 'email' | 'number' | 'password' | 'url'\n startContent?: React.ReactElement\n endContent?: React.ReactElement\n groupText?: string\n disabled?: boolean\n error?: boolean | string\n stepControls?: boolean\n inputClassName?: string\n /** Callback function executed when the clear button is clicked. When provided, an X button will appear on hover to clear the input. */\n onClear?: boolean | (() => void)\n} & React.InputHTMLAttributes<HTMLInputElement>\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n (\n {\n className,\n htmlType = 'text',\n placeholder,\n startContent,\n endContent,\n groupText,\n disabled,\n error,\n stepControls,\n value: controlledValue,\n onChange: controlledOnChange,\n inputClassName,\n onClear = true,\n ...props\n },\n ref,\n ) => {\n const isHtmlTypePassword = htmlType === 'password'\n const isHtmlTypeNumber = htmlType === 'number'\n const hasStepControls = stepControls && isHtmlTypeNumber\n\n const [type, setType] = React.useState(htmlType)\n const [internalValue, setInternalValue] = React.useState(controlledValue)\n const [isHovered, setIsHovered] = React.useState(false)\n\n React.useEffect(() => {\n setInternalValue(controlledValue)\n }, [controlledValue])\n\n const toggleType = () => {\n setType(type === 'password' ? 'text' : 'password')\n }\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n setInternalValue(event.target.value)\n if (controlledOnChange) {\n controlledOnChange(event)\n }\n }\n\n const handleStepChange = (increment: number) => {\n const currentValue = Number(internalValue ?? 0)\n const newValue = currentValue + increment\n if (newValue >= 0) {\n const event = {\n target: { value: newValue.toString() },\n } as React.ChangeEvent<HTMLInputElement>\n handleChange(event)\n }\n }\n\n const handleClear = () => {\n const event = {\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>\n handleChange(event)\n\n if (typeof onClear === 'function') {\n onClear()\n }\n }\n\n const renderPasswordEye = () => {\n if (!isHtmlTypePassword) return null\n\n return (\n <button\n type=\"button\"\n className=\"flex aspect-square items-center justify-center rounded-full p-2 transition-colors hover:bg-neutral-50\"\n onClick={() => toggleType()}\n >\n {type === 'password' ? (\n <EyeSlashIcon size={20} data-testid=\"password-eye-closed\" />\n ) : (\n <EyeIcon size={20} data-testid=\"password-eye-open\" />\n )}\n </button>\n )\n }\n\n const renderErrorIcon = () => {\n if (isHtmlTypePassword || !error || hasStepControls) return null\n return (\n <div>\n <WarningCircleIcon\n data-testid=\"exclaim-icon\"\n className={cn(\n 'text-error-500 transition-opacity duration-150',\n showClearIcon ? 'opacity-0' : 'opacity-100',\n )}\n size={18}\n />\n </div>\n )\n }\n\n const renderStepControlsIncrement = () => {\n if (!hasStepControls) return null\n return (\n <button\n type=\"button\"\n disabled={disabled}\n onClick={() => handleStepChange(1)}\n className=\"p-2\"\n aria-label=\"Increment\"\n >\n <PlusIcon data-testid=\"increment-button\" />\n </button>\n )\n }\n\n const renderEndContent = () => {\n if (isHtmlTypePassword || error || hasStepControls || !endContent) return null\n return (\n <div\n className={cn(\n 'text-neutral-300 transition-opacity duration-150',\n showClearIcon ? 'opacity-0' : 'opacity-100',\n )}\n >\n {endContent}\n </div>\n )\n }\n\n const renderClearIcon = () => {\n if (disabled || hasStepControls || isHtmlTypePassword || !onClear) return null\n\n return (\n <div\n className={cn(\n 'absolute right-3 z-10 flex h-full w-10 items-center justify-end rounded-r-lg',\n !endContent && !error\n ? 'bg-linear-to-l from-white from-60% via-white/80 via-80% to-transparent transition-opacity duration-150'\n : 'bg-transparent',\n showClearIcon ? 'opacity-100' : 'opacity-0',\n )}\n >\n <XIcon\n data-testid=\"clear-button\"\n className={cn(\n 'h-4 w-4 shrink-0 cursor-pointer transition-opacity duration-150',\n showClearIcon ? 'opacity-100 hover:opacity-70' : 'opacity-0',\n )}\n onClick={handleClear}\n />\n </div>\n )\n }\n\n const renderStartContent = () => {\n if (!startContent) return null\n return <div className=\"text-neutral-300\">{startContent}</div>\n }\n\n const renderStepControlsDecrement = () => {\n if (!hasStepControls) return null\n return (\n <button\n type=\"button\"\n disabled={disabled}\n onClick={() => handleStepChange(-1)}\n className=\"p-2\"\n aria-label=\"Decrement\"\n >\n <MinusIcon data-testid=\"decrement-button\" />\n </button>\n )\n }\n\n const hasValue = Boolean(internalValue && String(internalValue).trim() !== '')\n const showClearIcon = onClear && hasValue && isHovered && !disabled && !isHtmlTypePassword && !hasStepControls\n\n return (\n <div className=\"flex w-full flex-col gap-1\">\n <div className=\"flex w-full items-center\">\n {groupText && (\n <div\n className={cn(\n 'flex h-12 items-center rounded-l-lg border-y border-l border-neutral-200 bg-neutral-50 pr-2 pl-4 text-neutral-300',\n )}\n >\n {groupText}\n </div>\n )}\n <div\n className={cn(\n 'relative flex h-12 w-full items-center rounded-lg border border-neutral-200 bg-white px-3 transition-colors focus-within:border-neutral-950',\n groupText && 'rounded-l-none',\n disabled && 'bg-neutral-50',\n error && 'border-error-400 focus-within:border-error-700',\n className,\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n >\n {renderStartContent()}\n {renderStepControlsDecrement()}\n <input\n type={type}\n className={cn(\n 'w-full bg-transparent px-2 outline-0 transition-colors placeholder:text-neutral-300 disabled:cursor-not-allowed disabled:opacity-50',\n hasStepControls && 'text-center',\n inputClassName,\n )}\n ref={ref}\n onChange={handleChange}\n placeholder={placeholder}\n disabled={disabled}\n value={internalValue}\n onKeyDown={(event) => {\n if (isHtmlTypeNumber && (event.key === 'e' || event.key === 'E' || event.key === '-')) {\n event.preventDefault()\n }\n }}\n {...props}\n />\n {renderPasswordEye()}\n {renderClearIcon()}\n {renderErrorIcon()}\n {renderStepControlsIncrement()}\n {renderEndContent()}\n </div>\n </div>\n {typeof error === 'string' && (\n <span className=\"text-error-500 animate-in fade-in-0 slide-in-from-top-1 ease-out-strong motion-reduce:slide-in-from-top-0 text-sm duration-150\">\n {error}\n </span>\n )}\n </div>\n )\n },\n)\nInput.displayName = 'Input'\n\nexport { Input }\n"],"mappings":";;;;;;;;;;AAuBA,IAAM,QAAQA,QAAM,YAEhB,EACE,WACA,WAAW,QACX,aACA,cACA,YACA,WACA,UACA,OACA,cACA,OAAO,iBAC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CAAC,sBAAsB,CAAC;CAE/F,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACG,aACC,oBAAC,OAAD;IACE,WAAW,GACT,mHACF;IAEC,UAAA;GACE,CAAA,GAEP,qBAAC,OAAD;IACE,WAAW,GACT,+IACA,aAAa,kBACb,YAAY,iBACZ,SAAS,kDACT,SACF;IACA,oBAAoB,aAAa,IAAI;IACrC,oBAAoB,aAAa,KAAK;IATxC,UAAA;KAWG,mBAAmB;KACnB,4BAA4B;KAC7B,oBAAC,SAAD;MACQ;MACN,WAAW,GACT,uIACA,mBAAmB,eACnB,cACF;MACK;MACL,UAAU;MACG;MACH;MACV,OAAO;MACP,YAAY,UAAU;OACpB,IAAI,qBAAqB,MAAM,QAAQ,OAAO,MAAM,QAAQ,OAAO,MAAM,QAAQ,MAC/E,MAAM,eAAe;MAEzB;MACA,GAAI;KACL,CAAA;KACA,kBAAkB;KAClB,gBAAgB;KAChB,gBAAgB;KAChB,4BAA4B;KAC5B,iBAAiB;IACf;GACF,CAAA,CAAA;EACJ,CAAA,GAAA,OAAO,UAAU,YAChB,oBAAC,QAAD;GAAM,WAAU;GACb,UAAA;EACG,CAAA,CAEL;;AAET,CACF;AACA,MAAM,cAAc"}
@@ -79,7 +79,7 @@ var InputDate = React$1.forwardRef(({ className, disabled, error, errorMessage,
79
79
  })
80
80
  })
81
81
  }), resolvedErrorMessage && /* @__PURE__ */ jsx("span", {
82
- className: "text-error-500 text-sm",
82
+ className: "text-error-500 animate-in fade-in-0 slide-in-from-top-1 ease-out-strong motion-reduce:slide-in-from-top-0 text-sm duration-150",
83
83
  children: resolvedErrorMessage
84
84
  })]
85
85
  });
@@ -1 +1 @@
1
- {"version":3,"file":"InputDate.js","names":["React"],"sources":["../../../../src/components/inputs/InputDate/InputDate.tsx"],"sourcesContent":["import { CalendarBlankIcon } from '@phosphor-icons/react/dist/ssr/CalendarBlank'\nimport { WarningCircleIcon } from '@phosphor-icons/react/dist/ssr/WarningCircle'\nimport { XIcon } from '@phosphor-icons/react/dist/ssr/X'\nimport * as React from 'react'\nimport { I18nProvider } from 'react-aria'\nimport { DateField, DateInput, DateSegment, Group, type DateValue } from 'react-aria-components'\n\nimport { cn } from '@/lib/utils'\n\nexport type InputDateProps = {\n className?: string\n disabled?: boolean\n error?: boolean | string\n errorMessage?: string\n inputClassName?: string\n locale?: string\n onClear?: boolean | (() => void)\n value?: DateValue | null\n onChange?: (date: DateValue | null) => void\n} & Omit<React.ComponentPropsWithoutRef<typeof DateField<DateValue>>, 'value' | 'onChange'>\n\nconst InputDate = React.forwardRef<HTMLDivElement, InputDateProps>(\n (\n {\n className,\n disabled,\n error,\n errorMessage,\n value: controlledValue,\n onChange: controlledOnChange,\n inputClassName,\n onClear = true,\n locale,\n ...props\n },\n ref,\n ) => {\n const [dateValue, setDateValue] = React.useState<DateValue | null>(() => controlledValue ?? null)\n const [isHovered, setIsHovered] = React.useState(false)\n const internalChange = React.useRef(false)\n\n React.useEffect(() => {\n if (internalChange.current) {\n internalChange.current = false\n return\n }\n setDateValue(controlledValue ?? null)\n }, [controlledValue])\n\n const handleRacChange = (date: DateValue | null) => {\n internalChange.current = true\n setDateValue(date)\n controlledOnChange?.(date)\n }\n\n const handleClear = () => {\n internalChange.current = true\n setDateValue(null)\n controlledOnChange?.(null)\n if (typeof onClear === 'function') onClear()\n }\n\n const hasValue = dateValue !== null\n const showClearIcon = Boolean(onClear && hasValue && isHovered && !disabled)\n const resolvedErrorMessage = typeof error === 'string' ? error : errorMessage\n const hasError = Boolean(error ?? resolvedErrorMessage)\n\n const inner = (\n <div className=\"flex w-full flex-col gap-1\">\n <div className=\"flex w-full items-center\">\n <DateField\n ref={ref}\n value={dateValue}\n onChange={handleRacChange}\n isDisabled={disabled}\n isInvalid={hasError}\n granularity=\"day\"\n className=\"w-full\"\n {...props}\n >\n <Group\n data-testid=\"input-date-mask-control\"\n className={cn(\n 'relative flex h-12 w-full items-center rounded-lg border border-neutral-200 bg-white px-3 transition-colors focus-within:border-neutral-950',\n disabled && 'bg-neutral-50',\n hasError && 'border-error-400 focus-within:border-error-700',\n className,\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n >\n <CalendarBlankIcon size={20} />\n <DateInput className={cn('flex flex-1 items-center justify-center px-2', inputClassName)}>\n {(segment) => (\n <DateSegment\n segment={segment}\n className={cn(\n segment.type === 'literal'\n ? 'text-neutral-400 select-none'\n : cn(\n 'min-w-[1ch] rounded-sm bg-transparent px-0.5 py-px text-center outline-0 transition-colors',\n 'caret-neutral-900',\n 'data-placeholder:text-neutral-300',\n 'data-focused:bg-neutral-100 data-focused:text-neutral-900',\n 'data-disabled:cursor-not-allowed data-disabled:opacity-50',\n ),\n )}\n />\n )}\n </DateInput>\n {hasError && (\n <div>\n <WarningCircleIcon\n data-testid=\"exclaim-icon\"\n className={cn(\n 'text-error-500 transition-opacity duration-150',\n showClearIcon ? 'opacity-0' : 'opacity-100',\n )}\n size={18}\n />\n </div>\n )}\n {onClear && !disabled && (\n <div\n className={cn(\n 'absolute right-3 z-10 flex h-full w-10 items-center justify-end rounded-r-lg',\n hasError\n ? 'bg-transparent'\n : 'bg-linear-to-l from-white from-60% via-white/80 via-80% to-transparent transition-opacity duration-150',\n showClearIcon ? 'opacity-100' : 'opacity-0',\n )}\n >\n <XIcon\n data-testid=\"clear-button\"\n className={cn(\n 'h-4 w-4 shrink-0 cursor-pointer transition-opacity duration-150',\n showClearIcon ? 'opacity-100 hover:opacity-70' : 'opacity-0',\n )}\n onClick={(event) => {\n event.stopPropagation()\n handleClear()\n }}\n />\n </div>\n )}\n </Group>\n </DateField>\n </div>\n {resolvedErrorMessage && <span className=\"text-error-500 text-sm\">{resolvedErrorMessage}</span>}\n </div>\n )\n\n return locale ? <I18nProvider locale={locale}>{inner}</I18nProvider> : inner\n },\n)\n\nInputDate.displayName = 'InputDate'\n\nexport { InputDate }\n"],"mappings":";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AAA,YACA,oBAAC,aAAD;QACW;QACT,WAAW,GACT,QAAQ,SAAS,YACb,iCACA,GACE,8FACA,qBACA,qCACA,6DACA,2DACF,CACN;OACD,CAAA;MAEM,CAAA;MACV,YACC,oBAAC,OAAD,EAAA,UACE,oBAAC,mBAAD;OACE,eAAY;OACZ,WAAW,GACT,kDACA,gBAAgB,cAAc,aAChC;OACA,MAAM;MACP,CAAA,EACE,CAAA;MAEN,WAAW,CAAC,YACX,oBAAC,OAAD;OACE,WAAW,GACT,gFACA,WACI,mBACA,0GACJ,gBAAgB,gBAAgB,WAClC;OAEA,UAAA,oBAAC,OAAD;QACE,eAAY;QACZ,WAAW,GACT,mEACA,gBAAgB,iCAAiC,WACnD;QACA,UAAU,UAAU;SAClB,MAAM,gBAAgB;SACtB,YAAY;QACd;OACD,CAAA;MACE,CAAA;KAEF;;GACE,CAAA;EACR,CAAA,GACJ,wBAAwB,oBAAC,QAAD;GAAM,WAAU;GAA0B,UAAA;EAA2B,CAAA,CAC3F;;CAGP,OAAO,SAAS,oBAAC,cAAD;EAAsB;EAAS,UAAA;CAAoB,CAAA,IAAI;AACzE,CACF;AAEA,UAAU,cAAc"}
1
+ {"version":3,"file":"InputDate.js","names":["React"],"sources":["../../../../src/components/inputs/InputDate/InputDate.tsx"],"sourcesContent":["import { CalendarBlankIcon } from '@phosphor-icons/react/dist/ssr/CalendarBlank'\nimport { WarningCircleIcon } from '@phosphor-icons/react/dist/ssr/WarningCircle'\nimport { XIcon } from '@phosphor-icons/react/dist/ssr/X'\nimport * as React from 'react'\nimport { I18nProvider } from 'react-aria'\nimport { DateField, DateInput, DateSegment, Group, type DateValue } from 'react-aria-components'\n\nimport { cn } from '@/lib/utils'\n\nexport type InputDateProps = {\n className?: string\n disabled?: boolean\n error?: boolean | string\n errorMessage?: string\n inputClassName?: string\n locale?: string\n onClear?: boolean | (() => void)\n value?: DateValue | null\n onChange?: (date: DateValue | null) => void\n} & Omit<React.ComponentPropsWithoutRef<typeof DateField<DateValue>>, 'value' | 'onChange'>\n\nconst InputDate = React.forwardRef<HTMLDivElement, InputDateProps>(\n (\n {\n className,\n disabled,\n error,\n errorMessage,\n value: controlledValue,\n onChange: controlledOnChange,\n inputClassName,\n onClear = true,\n locale,\n ...props\n },\n ref,\n ) => {\n const [dateValue, setDateValue] = React.useState<DateValue | null>(() => controlledValue ?? null)\n const [isHovered, setIsHovered] = React.useState(false)\n const internalChange = React.useRef(false)\n\n React.useEffect(() => {\n if (internalChange.current) {\n internalChange.current = false\n return\n }\n setDateValue(controlledValue ?? null)\n }, [controlledValue])\n\n const handleRacChange = (date: DateValue | null) => {\n internalChange.current = true\n setDateValue(date)\n controlledOnChange?.(date)\n }\n\n const handleClear = () => {\n internalChange.current = true\n setDateValue(null)\n controlledOnChange?.(null)\n if (typeof onClear === 'function') onClear()\n }\n\n const hasValue = dateValue !== null\n const showClearIcon = Boolean(onClear && hasValue && isHovered && !disabled)\n const resolvedErrorMessage = typeof error === 'string' ? error : errorMessage\n const hasError = Boolean(error ?? resolvedErrorMessage)\n\n const inner = (\n <div className=\"flex w-full flex-col gap-1\">\n <div className=\"flex w-full items-center\">\n <DateField\n ref={ref}\n value={dateValue}\n onChange={handleRacChange}\n isDisabled={disabled}\n isInvalid={hasError}\n granularity=\"day\"\n className=\"w-full\"\n {...props}\n >\n <Group\n data-testid=\"input-date-mask-control\"\n className={cn(\n 'relative flex h-12 w-full items-center rounded-lg border border-neutral-200 bg-white px-3 transition-colors focus-within:border-neutral-950',\n disabled && 'bg-neutral-50',\n hasError && 'border-error-400 focus-within:border-error-700',\n className,\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n >\n <CalendarBlankIcon size={20} />\n <DateInput className={cn('flex flex-1 items-center justify-center px-2', inputClassName)}>\n {(segment) => (\n <DateSegment\n segment={segment}\n className={cn(\n segment.type === 'literal'\n ? 'text-neutral-400 select-none'\n : cn(\n 'min-w-[1ch] rounded-sm bg-transparent px-0.5 py-px text-center outline-0 transition-colors',\n 'caret-neutral-900',\n 'data-placeholder:text-neutral-300',\n 'data-focused:bg-neutral-100 data-focused:text-neutral-900',\n 'data-disabled:cursor-not-allowed data-disabled:opacity-50',\n ),\n )}\n />\n )}\n </DateInput>\n {hasError && (\n <div>\n <WarningCircleIcon\n data-testid=\"exclaim-icon\"\n className={cn(\n 'text-error-500 transition-opacity duration-150',\n showClearIcon ? 'opacity-0' : 'opacity-100',\n )}\n size={18}\n />\n </div>\n )}\n {onClear && !disabled && (\n <div\n className={cn(\n 'absolute right-3 z-10 flex h-full w-10 items-center justify-end rounded-r-lg',\n hasError\n ? 'bg-transparent'\n : 'bg-linear-to-l from-white from-60% via-white/80 via-80% to-transparent transition-opacity duration-150',\n showClearIcon ? 'opacity-100' : 'opacity-0',\n )}\n >\n <XIcon\n data-testid=\"clear-button\"\n className={cn(\n 'h-4 w-4 shrink-0 cursor-pointer transition-opacity duration-150',\n showClearIcon ? 'opacity-100 hover:opacity-70' : 'opacity-0',\n )}\n onClick={(event) => {\n event.stopPropagation()\n handleClear()\n }}\n />\n </div>\n )}\n </Group>\n </DateField>\n </div>\n {resolvedErrorMessage && (\n <span className=\"text-error-500 animate-in fade-in-0 slide-in-from-top-1 ease-out-strong motion-reduce:slide-in-from-top-0 text-sm duration-150\">\n {resolvedErrorMessage}\n </span>\n )}\n </div>\n )\n\n return locale ? <I18nProvider locale={locale}>{inner}</I18nProvider> : inner\n },\n)\n\nInputDate.displayName = 'InputDate'\n\nexport { InputDate }\n"],"mappings":";;;;;;;;;AAqBA,IAAM,YAAYA,QAAM,YAEpB,EACE,WACA,UACA,OACA,cACA,OAAO,iBACP,UAAU,oBACV,gBACA,UAAU,MACV,QACA,GAAG,SAEL,QACG;CACH,MAAM,CAAC,WAAW,gBAAgBA,QAAM,eAAiC,mBAAmB,IAAI;CAChG,MAAM,CAAC,WAAW,gBAAgBA,QAAM,SAAS,KAAK;CACtD,MAAM,iBAAiBA,QAAM,OAAO,KAAK;CAEzC,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BAAC,OAAD;OACE,WAAW,GACT,gFACA,WACI,mBACA,0GACJ,gBAAgB,gBAAgB,WAClC;OAEA,UAAA,oBAAC,OAAD;QACE,eAAY;QACZ,WAAW,GACT,mEACA,gBAAgB,iCAAiC,WACnD;QACA,UAAU,UAAU;SAClB,MAAM,gBAAgB;SACtB,YAAY;QACd;OACD,CAAA;MACE,CAAA;KAEF;;GACE,CAAA;EACR,CAAA,GACJ,wBACC,oBAAC,QAAD;GAAM,WAAU;GACb,UAAA;EACG,CAAA,CAEL;;CAGP,OAAO,SAAS,oBAAC,cAAD;EAAsB;EAAS,UAAA;CAAoB,CAAA,IAAI;AACzE,CACF;AAEA,UAAU,cAAc"}
@@ -45,7 +45,7 @@ var RadioGroupItem = React$1.forwardRef(({ className, label, helperText, error,
45
45
  className: cn("group aspect-square h-4 w-4 shrink-0 rounded-full border transition-colors", "focus-visible:ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", "disabled:cursor-not-allowed", controlColorClasses, className),
46
46
  ...props,
47
47
  children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, {
48
- className: "flex items-center justify-center",
48
+ className: "animate-in fade-in-0 ease-out-strong motion-reduce:zoom-in-100 zoom-in-50 flex items-center justify-center duration-150",
49
49
  children: /* @__PURE__ */ jsx("span", { className: cn("block h-2 w-2 rounded-full", dotColorClasses) })
50
50
  })
51
51
  });
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.js","names":["React"],"sources":["../../../../src/components/inputs/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport * as React from 'react'\nimport type { ReactNode } from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst RadioGroup = React.forwardRef<\n React.ComponentRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RADIO_COLOR_CLASSES = {\n default: {\n control: 'border-neutral-500 hover:border-neutral-800 focus-visible:ring-primary',\n dot: 'bg-neutral-500 group-hover:bg-neutral-800',\n },\n error: {\n control: 'border-error-400 hover:border-error-500 focus-visible:ring-error-400',\n dot: 'bg-error-400 group-hover:bg-error-500',\n },\n disabled: {\n control: 'border-neutral-200 bg-neutral-50',\n dot: 'bg-neutral-200',\n },\n} as const\n\nexport type RadioGroupItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item> & {\n /** Label displayed next to the radio control. */\n label?: ReactNode\n\n /** Informational text displayed below the label. Not shown while `error` is set. */\n helperText?: ReactNode\n\n /**\n * Marks the item as invalid and applies error styling. Pass a string to\n * also display it as the message below the label, replacing `helperText`.\n */\n error?: boolean | string\n}\n\nconst RadioGroupItem = React.forwardRef<React.ComponentRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(\n ({ className, label, helperText, error, id, disabled, ...props }, ref) => {\n const generatedId = React.useId()\n const isError = Boolean(error)\n\n let secondaryText: ReactNode\n if (isError) {\n secondaryText = typeof error === 'string' ? error : undefined\n } else {\n secondaryText = helperText\n }\n\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- an explicit empty string must still count as \"no content\"\n const hasContent = Boolean(label || secondaryText)\n const itemId = id ?? (hasContent ? generatedId : undefined)\n const disabledTextClass = disabled ? 'opacity-50' : undefined\n\n let colorState: keyof typeof RADIO_COLOR_CLASSES = 'default'\n if (disabled) {\n colorState = 'disabled'\n } else if (isError) {\n colorState = 'error'\n }\n const { control: controlColorClasses, dot: dotColorClasses } = RADIO_COLOR_CLASSES[colorState]\n\n const item = (\n <RadioGroupPrimitive.Item\n ref={ref}\n id={itemId}\n disabled={disabled}\n className={cn(\n 'group aspect-square h-4 w-4 shrink-0 rounded-full border transition-colors',\n 'focus-visible:ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2',\n 'disabled:cursor-not-allowed',\n controlColorClasses,\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <span className={cn('block h-2 w-2 rounded-full', dotColorClasses)} />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n\n if (!hasContent) {\n return item\n }\n\n return (\n <div className=\"flex items-start gap-2\">\n <span className=\"mt-0.5 inline-flex\">{item}</span>\n <div className=\"flex flex-col gap-0.5\">\n {label ? (\n <label htmlFor={itemId} className={cn('text-sm text-neutral-950', disabledTextClass)}>\n {label}\n </label>\n ) : null}\n {secondaryText ? (\n <span className={cn('text-xs', isError ? 'text-error-500' : 'text-neutral-500', disabledTextClass)}>\n {secondaryText}\n </span>\n ) : null}\n </div>\n </div>\n )\n },\n)\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\n"],"mappings":";;;;;AAMA,IAAM,aAAaA,QAAM,YAGtB,EAAE,WAAW,GAAG,SAAS,QAAQ;CAClC,OAAO,oBAAC,oBAAoB,MAArB;EAA0B,WAAW,GAAG,cAAc,SAAS;EAAG,GAAI;EAAY;CAAM,CAAA;AACjG,CAAC;AACD,WAAW,cAAc,oBAAoB,KAAK;AAElD,IAAM,sBAAsB;CAC1B,SAAS;EACP,SAAS;EACT,KAAK;CACP;CACA,OAAO;EACL,SAAS;EACT,KAAK;CACP;CACA,UAAU;EACR,SAAS;EACT,KAAK;CACP;AACF;AAgBA,IAAM,iBAAiBA,QAAM,YAC1B,EAAE,WAAW,OAAO,YAAY,OAAO,IAAI,UAAU,GAAG,SAAS,QAAQ;CACxE,MAAM,cAAcA,QAAM,MAAM;CAChC,MAAM,UAAU,QAAQ,KAAK;CAE7B,IAAI;CACJ,IAAI,SACF,gBAAgB,OAAO,UAAU,WAAW,QAAQ,KAAA;MAEpD,gBAAgB;CAIlB,MAAM,aAAa,QAAQ,SAAS,aAAa;CACjD,MAAM,SAAS,OAAO,aAAa,cAAc,KAAA;CACjD,MAAM,oBAAoB,WAAW,eAAe,KAAA;CAEpD,IAAI,aAA+C;CACnD,IAAI,UACF,aAAa;MACR,IAAI,SACT,aAAa;CAEf,MAAM,EAAE,SAAS,qBAAqB,KAAK,oBAAoB,oBAAoB;CAEnF,MAAM,OACJ,oBAAC,oBAAoB,MAArB;EACO;EACL,IAAI;EACM;EACV,WAAW,GACT,8EACA,4GACA,+BACA,qBACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAAC,oBAAoB,WAArB;GAA+B,WAAU;GACvC,UAAA,oBAAC,QAAD,EAAM,WAAW,GAAG,8BAA8B,eAAe,EAAI,CAAA;EACxC,CAAA;CACP,CAAA;CAG5B,IAAI,CAAC,YACH,OAAO;CAGT,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAAC,QAAD;GAAM,WAAU;GAAsB,UAAA;EAAW,CAAA,GACjD,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACG,QACC,oBAAC,SAAD;IAAO,SAAS;IAAQ,WAAW,GAAG,4BAA4B,iBAAiB;IAChF,UAAA;GACI,CAAA,IACL,MACH,gBACC,oBAAC,QAAD;IAAM,WAAW,GAAG,WAAW,UAAU,mBAAmB,oBAAoB,iBAAiB;IAC9F,UAAA;GACG,CAAA,IACJ,IACD;EACF,CAAA,CAAA;;AAET,CACF;AACA,eAAe,cAAc,oBAAoB,KAAK"}
1
+ {"version":3,"file":"RadioGroup.js","names":["React"],"sources":["../../../../src/components/inputs/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport * as React from 'react'\nimport type { ReactNode } from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst RadioGroup = React.forwardRef<\n React.ComponentRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RADIO_COLOR_CLASSES = {\n default: {\n control: 'border-neutral-500 hover:border-neutral-800 focus-visible:ring-primary',\n dot: 'bg-neutral-500 group-hover:bg-neutral-800',\n },\n error: {\n control: 'border-error-400 hover:border-error-500 focus-visible:ring-error-400',\n dot: 'bg-error-400 group-hover:bg-error-500',\n },\n disabled: {\n control: 'border-neutral-200 bg-neutral-50',\n dot: 'bg-neutral-200',\n },\n} as const\n\nexport type RadioGroupItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item> & {\n /** Label displayed next to the radio control. */\n label?: ReactNode\n\n /** Informational text displayed below the label. Not shown while `error` is set. */\n helperText?: ReactNode\n\n /**\n * Marks the item as invalid and applies error styling. Pass a string to\n * also display it as the message below the label, replacing `helperText`.\n */\n error?: boolean | string\n}\n\nconst RadioGroupItem = React.forwardRef<React.ComponentRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(\n ({ className, label, helperText, error, id, disabled, ...props }, ref) => {\n const generatedId = React.useId()\n const isError = Boolean(error)\n\n let secondaryText: ReactNode\n if (isError) {\n secondaryText = typeof error === 'string' ? error : undefined\n } else {\n secondaryText = helperText\n }\n\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- an explicit empty string must still count as \"no content\"\n const hasContent = Boolean(label || secondaryText)\n const itemId = id ?? (hasContent ? generatedId : undefined)\n const disabledTextClass = disabled ? 'opacity-50' : undefined\n\n let colorState: keyof typeof RADIO_COLOR_CLASSES = 'default'\n if (disabled) {\n colorState = 'disabled'\n } else if (isError) {\n colorState = 'error'\n }\n const { control: controlColorClasses, dot: dotColorClasses } = RADIO_COLOR_CLASSES[colorState]\n\n const item = (\n <RadioGroupPrimitive.Item\n ref={ref}\n id={itemId}\n disabled={disabled}\n className={cn(\n 'group aspect-square h-4 w-4 shrink-0 rounded-full border transition-colors',\n 'focus-visible:ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2',\n 'disabled:cursor-not-allowed',\n controlColorClasses,\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"animate-in fade-in-0 ease-out-strong motion-reduce:zoom-in-100 zoom-in-50 flex items-center justify-center duration-150\">\n <span className={cn('block h-2 w-2 rounded-full', dotColorClasses)} />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n\n if (!hasContent) {\n return item\n }\n\n return (\n <div className=\"flex items-start gap-2\">\n <span className=\"mt-0.5 inline-flex\">{item}</span>\n <div className=\"flex flex-col gap-0.5\">\n {label ? (\n <label htmlFor={itemId} className={cn('text-sm text-neutral-950', disabledTextClass)}>\n {label}\n </label>\n ) : null}\n {secondaryText ? (\n <span className={cn('text-xs', isError ? 'text-error-500' : 'text-neutral-500', disabledTextClass)}>\n {secondaryText}\n </span>\n ) : null}\n </div>\n </div>\n )\n },\n)\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\n"],"mappings":";;;;;AAMA,IAAM,aAAaA,QAAM,YAGtB,EAAE,WAAW,GAAG,SAAS,QAAQ;CAClC,OAAO,oBAAC,oBAAoB,MAArB;EAA0B,WAAW,GAAG,cAAc,SAAS;EAAG,GAAI;EAAY;CAAM,CAAA;AACjG,CAAC;AACD,WAAW,cAAc,oBAAoB,KAAK;AAElD,IAAM,sBAAsB;CAC1B,SAAS;EACP,SAAS;EACT,KAAK;CACP;CACA,OAAO;EACL,SAAS;EACT,KAAK;CACP;CACA,UAAU;EACR,SAAS;EACT,KAAK;CACP;AACF;AAgBA,IAAM,iBAAiBA,QAAM,YAC1B,EAAE,WAAW,OAAO,YAAY,OAAO,IAAI,UAAU,GAAG,SAAS,QAAQ;CACxE,MAAM,cAAcA,QAAM,MAAM;CAChC,MAAM,UAAU,QAAQ,KAAK;CAE7B,IAAI;CACJ,IAAI,SACF,gBAAgB,OAAO,UAAU,WAAW,QAAQ,KAAA;MAEpD,gBAAgB;CAIlB,MAAM,aAAa,QAAQ,SAAS,aAAa;CACjD,MAAM,SAAS,OAAO,aAAa,cAAc,KAAA;CACjD,MAAM,oBAAoB,WAAW,eAAe,KAAA;CAEpD,IAAI,aAA+C;CACnD,IAAI,UACF,aAAa;MACR,IAAI,SACT,aAAa;CAEf,MAAM,EAAE,SAAS,qBAAqB,KAAK,oBAAoB,oBAAoB;CAEnF,MAAM,OACJ,oBAAC,oBAAoB,MAArB;EACO;EACL,IAAI;EACM;EACV,WAAW,GACT,8EACA,4GACA,+BACA,qBACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAAC,oBAAoB,WAArB;GAA+B,WAAU;GACvC,UAAA,oBAAC,QAAD,EAAM,WAAW,GAAG,8BAA8B,eAAe,EAAI,CAAA;EACxC,CAAA;CACP,CAAA;CAG5B,IAAI,CAAC,YACH,OAAO;CAGT,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAAC,QAAD;GAAM,WAAU;GAAsB,UAAA;EAAW,CAAA,GACjD,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACG,QACC,oBAAC,SAAD;IAAO,SAAS;IAAQ,WAAW,GAAG,4BAA4B,iBAAiB;IAChF,UAAA;GACI,CAAA,IACL,MACH,gBACC,oBAAC,QAAD;IAAM,WAAW,GAAG,WAAW,UAAU,mBAAmB,oBAAoB,iBAAiB;IAC9F,UAAA;GACG,CAAA,IACJ,IACD;EACF,CAAA,CAAA;;AAET,CACF;AACA,eAAe,cAAc,oBAAoB,KAAK"}
@@ -40,7 +40,7 @@ var SelectContent = React$1.forwardRef(({ className, children, position = "poppe
40
40
  children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, {
41
41
  ref,
42
42
  sideOffset: 4,
43
- className: cn(SURFACE_LIST, "text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 relative z-50 max-h-(--radix-select-content-available-height,300px) min-w-32 overflow-hidden border bg-[#fff] shadow-md", className),
43
+ className: cn(SURFACE_LIST, "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 ease-out-strong motion-reduce:data-[state=closed]:zoom-out-100 motion-reduce:data-[state=open]:zoom-in-100 motion-reduce:data-[side=bottom]:slide-in-from-top-0 motion-reduce:data-[side=left]:slide-in-from-right-0 motion-reduce:data-[side=right]:slide-in-from-left-0 motion-reduce:data-[side=top]:slide-in-from-bottom-0", "text-popover-foreground relative z-50 max-h-(--radix-select-content-available-height,300px) min-w-32 origin-(--radix-select-content-transform-origin) overflow-hidden border bg-[#fff] shadow-md", className),
44
44
  position,
45
45
  ...props,
46
46
  children: [
@@ -1 +1 @@
1
- {"version":3,"file":"Select.js","names":["React"],"sources":["../../../../src/components/inputs/Select/Select.tsx"],"sourcesContent":["import { CaretDownIcon } from '@phosphor-icons/react/dist/ssr/CaretDown'\nimport { CaretUpIcon } from '@phosphor-icons/react/dist/ssr/CaretUp'\nimport { CheckIcon } from '@phosphor-icons/react/dist/ssr/Check'\nimport * as SelectPrimitive from '@radix-ui/react-select'\nimport * as React from 'react'\n\nimport { buttonVariants } from '../Button'\n\nimport { SURFACE_ITEM, SURFACE_LIST } from '@/lib/surface'\nimport { cn } from '@/lib/utils'\n\nconst SelectRoot = SelectPrimitive.Root\n\nconst SelectGroup = SelectPrimitive.Group\n\nconst SelectValue = SelectPrimitive.Value\n\nconst SelectTrigger = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger ref={ref} className={className} {...props}>\n {children}\n <SelectPrimitive.Icon asChild>\n <CaretDownIcon className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n))\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <CaretUpIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <CaretDownIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n))\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> & {\n container?: HTMLElement\n }\n>(({ className, children, position = 'popper', container, ...props }, ref) => (\n <SelectPrimitive.Portal container={container}>\n <SelectPrimitive.Content\n ref={ref}\n sideOffset={4}\n className={cn(\n SURFACE_LIST,\n 'text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 relative z-50 max-h-(--radix-select-content-available-height,300px) min-w-32 overflow-hidden border bg-[#fff] shadow-md',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-(--surface-inset)',\n position === 'popper' && 'w-(--radix-select-trigger-width) md:w-auto md:min-w-(--radix-select-trigger-width)',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label ref={ref} className={cn('py-1.5 pr-2 pl-8 text-sm font-semibold', className)} {...props} />\n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n SURFACE_ITEM,\n 'focus:text-accent-foreground relative flex min-h-10 w-full items-center py-2 pr-3 pl-10 text-sm outline-none select-none focus:bg-neutral-100 data-disabled:pointer-events-none data-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-3 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectSeparator = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport type Option = {\n value: string\n label: React.ReactElement | string | number\n}\n\nexport {\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectRoot,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n\ntype Props = {\n onValueChange?: (value: string) => void\n defaultValue?: string\n value?: string\n placeholder?: string\n options: Array<Option>\n className?: string\n disabled?: boolean\n error?: boolean | string\n id?: string\n onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void\n container?: HTMLElement\n renderOption?: (option: Option) => React.ReactNode\n}\n\nexport function Select({\n onValueChange,\n defaultValue,\n value,\n options,\n placeholder,\n className,\n disabled = false,\n error,\n id,\n onKeyDown,\n container,\n renderOption,\n ...props\n}: Readonly<Props>) {\n const [open, setOpen] = React.useState(false)\n\n const handleOpenChange = React.useCallback(\n (nextOpen: boolean) => {\n if (!disabled) setOpen(nextOpen)\n },\n [disabled],\n )\n\n return (\n <div className=\"flex w-full flex-col gap-1\">\n <SelectRoot\n {...props}\n open={open}\n onOpenChange={handleOpenChange}\n onValueChange={onValueChange}\n value={value}\n defaultValue={defaultValue}\n disabled={disabled}\n >\n <SelectTrigger\n id={id}\n onKeyDown={onKeyDown}\n aria-invalid={error ? 'true' : 'false'}\n className={cn(\n buttonVariants({ variant: 'input', size: 'lg' }),\n 'flex justify-between',\n error && 'ring-error-400 focus-within:ring-error-700 border-none ring-1',\n className,\n )}\n onPointerDown={(event) => {\n event.stopPropagation()\n if (open) {\n setOpen(false)\n event.preventDefault()\n } else {\n setOpen(true)\n }\n }}\n onClick={(event) => {\n event.preventDefault()\n event.stopPropagation()\n }}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent\n container={container}\n onPointerDownOutside={(event) => {\n if (!container) return\n const original = (event as unknown as Record<string, unknown>).detail as\n { originalEvent?: PointerEvent } | undefined\n if (!original?.originalEvent?.composedPath) return\n if (original.originalEvent.composedPath().includes(container)) {\n event.preventDefault()\n }\n }}\n >\n {options.map((option) =>\n renderOption ? (\n <SelectPrimitive.Item\n key={option.value}\n value={option.value}\n data-testid={option.value}\n textValue={typeof option.label === 'string' ? option.label : undefined}\n className={cn(\n SURFACE_ITEM,\n 'focus:text-accent-foreground relative flex min-h-10 w-full items-start px-3 py-2 text-sm outline-none select-none focus:bg-neutral-100 data-disabled:pointer-events-none data-disabled:opacity-50',\n )}\n >\n <span className=\"hidden\">\n <SelectPrimitive.ItemText>{option.label}</SelectPrimitive.ItemText>\n </span>\n {renderOption(option)}\n </SelectPrimitive.Item>\n ) : (\n <SelectItem key={option.value} value={option.value} data-testid={option.value}>\n {option.label}\n </SelectItem>\n ),\n )}\n </SelectContent>\n </SelectRoot>\n {typeof error === 'string' && <span className=\"text-error-500 text-sm\">{error}</span>}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;AAWA,IAAM,aAAa,gBAAgB;AAEnC,IAAM,cAAc,gBAAgB;AAEpC,IAAM,cAAc,gBAAgB;AAEpC,IAAM,gBAAgBA,QAAM,YAGzB,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,qBAAC,gBAAgB,SAAjB;CAA8B;CAAgB;CAAW,GAAI;CAA7D,UAAA,CACG,UACD,oBAAC,gBAAgB,MAAjB;EAAsB,SAAA;EACpB,UAAA,oBAAC,eAAD,EAAe,WAAU,qBAAsB,CAAA;CAC3B,CAAA,CACC;AAC1B,CAAA,CAAA;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,IAAM,uBAAuBA,QAAM,YAGhC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,gBAAjB;CAC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AAM,WAAY,MAA6C;KAE/D,IAAI,CAAC,UAAU,eAAe,cAAc;KAC5C,IAAI,SAAS,cAAc,aAAa,CAAC,CAAC,SAAS,SAAS,GAC1D,MAAM,eAAe;IAEzB;IAEC,UAAA,QAAQ,KAAK,WACZ,eACE,qBAAC,gBAAgB,MAAjB;KAEE,OAAO,OAAO;KACd,eAAa,OAAO;KACpB,WAAW,OAAO,OAAO,UAAU,WAAW,OAAO,QAAQ,KAAA;KAC7D,WAAW,GACT,cACA,mMACF;KARF,UAAA,CAUE,oBAAC,QAAD;MAAM,WAAU;MACd,UAAA,oBAAC,gBAAgB,UAAjB,EAAA,UAA2B,OAAO,MAAgC,CAAA;KAC9D,CAAA,GACL,aAAa,MAAM,CACA;IAbf,GAAA,OAAO,KAaQ,IAEtB,oBAAC,YAAD;KAA+B,OAAO,OAAO;KAAO,eAAa,OAAO;KACrE,UAAA,OAAO;IACE,GAFK,OAAO,KAEZ,CAEhB;GACa,CAAA,CACL;EACX,CAAA,GAAA,OAAO,UAAU,YAAY,oBAAC,QAAD;GAAM,WAAU;GAA0B,UAAA;EAAY,CAAA,CACjF;;AAET"}
1
+ {"version":3,"file":"Select.js","names":["React"],"sources":["../../../../src/components/inputs/Select/Select.tsx"],"sourcesContent":["import { CaretDownIcon } from '@phosphor-icons/react/dist/ssr/CaretDown'\nimport { CaretUpIcon } from '@phosphor-icons/react/dist/ssr/CaretUp'\nimport { CheckIcon } from '@phosphor-icons/react/dist/ssr/Check'\nimport * as SelectPrimitive from '@radix-ui/react-select'\nimport * as React from 'react'\n\nimport { buttonVariants } from '../Button'\n\nimport { SURFACE_ITEM, SURFACE_LIST } from '@/lib/surface'\nimport { cn } from '@/lib/utils'\n\nconst SelectRoot = SelectPrimitive.Root\n\nconst SelectGroup = SelectPrimitive.Group\n\nconst SelectValue = SelectPrimitive.Value\n\nconst SelectTrigger = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger ref={ref} className={className} {...props}>\n {children}\n <SelectPrimitive.Icon asChild>\n <CaretDownIcon className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n))\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <CaretUpIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <CaretDownIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n))\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> & {\n container?: HTMLElement\n }\n>(({ className, children, position = 'popper', container, ...props }, ref) => (\n <SelectPrimitive.Portal container={container}>\n <SelectPrimitive.Content\n ref={ref}\n sideOffset={4}\n className={cn(\n SURFACE_LIST,\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 ease-out-strong motion-reduce:data-[state=closed]:zoom-out-100 motion-reduce:data-[state=open]:zoom-in-100 motion-reduce:data-[side=bottom]:slide-in-from-top-0 motion-reduce:data-[side=left]:slide-in-from-right-0 motion-reduce:data-[side=right]:slide-in-from-left-0 motion-reduce:data-[side=top]:slide-in-from-bottom-0',\n 'text-popover-foreground relative z-50 max-h-(--radix-select-content-available-height,300px) min-w-32 origin-(--radix-select-content-transform-origin) overflow-hidden border bg-[#fff] shadow-md',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-(--surface-inset)',\n position === 'popper' && 'w-(--radix-select-trigger-width) md:w-auto md:min-w-(--radix-select-trigger-width)',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label ref={ref} className={cn('py-1.5 pr-2 pl-8 text-sm font-semibold', className)} {...props} />\n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n SURFACE_ITEM,\n 'focus:text-accent-foreground relative flex min-h-10 w-full items-center py-2 pr-3 pl-10 text-sm outline-none select-none focus:bg-neutral-100 data-disabled:pointer-events-none data-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-3 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectSeparator = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport type Option = {\n value: string\n label: React.ReactElement | string | number\n}\n\nexport {\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectRoot,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n\ntype Props = {\n onValueChange?: (value: string) => void\n defaultValue?: string\n value?: string\n placeholder?: string\n options: Array<Option>\n className?: string\n disabled?: boolean\n error?: boolean | string\n id?: string\n onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void\n container?: HTMLElement\n renderOption?: (option: Option) => React.ReactNode\n}\n\nexport function Select({\n onValueChange,\n defaultValue,\n value,\n options,\n placeholder,\n className,\n disabled = false,\n error,\n id,\n onKeyDown,\n container,\n renderOption,\n ...props\n}: Readonly<Props>) {\n const [open, setOpen] = React.useState(false)\n\n const handleOpenChange = React.useCallback(\n (nextOpen: boolean) => {\n if (!disabled) setOpen(nextOpen)\n },\n [disabled],\n )\n\n return (\n <div className=\"flex w-full flex-col gap-1\">\n <SelectRoot\n {...props}\n open={open}\n onOpenChange={handleOpenChange}\n onValueChange={onValueChange}\n value={value}\n defaultValue={defaultValue}\n disabled={disabled}\n >\n <SelectTrigger\n id={id}\n onKeyDown={onKeyDown}\n aria-invalid={error ? 'true' : 'false'}\n className={cn(\n buttonVariants({ variant: 'input', size: 'lg' }),\n 'flex justify-between',\n error && 'ring-error-400 focus-within:ring-error-700 border-none ring-1',\n className,\n )}\n onPointerDown={(event) => {\n event.stopPropagation()\n if (open) {\n setOpen(false)\n event.preventDefault()\n } else {\n setOpen(true)\n }\n }}\n onClick={(event) => {\n event.preventDefault()\n event.stopPropagation()\n }}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent\n container={container}\n onPointerDownOutside={(event) => {\n if (!container) return\n const original = (event as unknown as Record<string, unknown>).detail as\n { originalEvent?: PointerEvent } | undefined\n if (!original?.originalEvent?.composedPath) return\n if (original.originalEvent.composedPath().includes(container)) {\n event.preventDefault()\n }\n }}\n >\n {options.map((option) =>\n renderOption ? (\n <SelectPrimitive.Item\n key={option.value}\n value={option.value}\n data-testid={option.value}\n textValue={typeof option.label === 'string' ? option.label : undefined}\n className={cn(\n SURFACE_ITEM,\n 'focus:text-accent-foreground relative flex min-h-10 w-full items-start px-3 py-2 text-sm outline-none select-none focus:bg-neutral-100 data-disabled:pointer-events-none data-disabled:opacity-50',\n )}\n >\n <span className=\"hidden\">\n <SelectPrimitive.ItemText>{option.label}</SelectPrimitive.ItemText>\n </span>\n {renderOption(option)}\n </SelectPrimitive.Item>\n ) : (\n <SelectItem key={option.value} value={option.value} data-testid={option.value}>\n {option.label}\n </SelectItem>\n ),\n )}\n </SelectContent>\n </SelectRoot>\n {typeof error === 'string' && <span className=\"text-error-500 text-sm\">{error}</span>}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;AAWA,IAAM,aAAa,gBAAgB;AAEnC,IAAM,cAAc,gBAAgB;AAEpC,IAAM,cAAc,gBAAgB;AAEpC,IAAM,gBAAgBA,QAAM,YAGzB,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,qBAAC,gBAAgB,SAAjB;CAA8B;CAAgB;CAAW,GAAI;CAA7D,UAAA,CACG,UACD,oBAAC,gBAAgB,MAAjB;EAAsB,SAAA;EACpB,UAAA,oBAAC,eAAD,EAAe,WAAU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AAU,UAAU;KAClB,MAAM,eAAe;KACrB,MAAM,gBAAgB;IACxB;IAEA,UAAA,oBAAC,aAAD,EAA0B,YAAc,CAAA;GAC3B,CAAA,GACf,oBAAC,eAAD;IACa;IACX,uBAAuB,UAAU;KAC/B,IAAI,CAAC,WAAW;KAChB,MAAM,WAAY,MAA6C;KAE/D,IAAI,CAAC,UAAU,eAAe,cAAc;KAC5C,IAAI,SAAS,cAAc,aAAa,CAAC,CAAC,SAAS,SAAS,GAC1D,MAAM,eAAe;IAEzB;IAEC,UAAA,QAAQ,KAAK,WACZ,eACE,qBAAC,gBAAgB,MAAjB;KAEE,OAAO,OAAO;KACd,eAAa,OAAO;KACpB,WAAW,OAAO,OAAO,UAAU,WAAW,OAAO,QAAQ,KAAA;KAC7D,WAAW,GACT,cACA,mMACF;KARF,UAAA,CAUE,oBAAC,QAAD;MAAM,WAAU;MACd,UAAA,oBAAC,gBAAgB,UAAjB,EAAA,UAA2B,OAAO,MAAgC,CAAA;KAC9D,CAAA,GACL,aAAa,MAAM,CACA;IAbf,GAAA,OAAO,KAaQ,IAEtB,oBAAC,YAAD;KAA+B,OAAO,OAAO;KAAO,eAAa,OAAO;KACrE,UAAA,OAAO;IACE,GAFK,OAAO,KAEZ,CAEhB;GACa,CAAA,CACL;EACX,CAAA,GAAA,OAAO,UAAU,YAAY,oBAAC,QAAD;GAAM,WAAU;GAA0B,UAAA;EAAY,CAAA,CACjF;;AAET"}
@@ -25,7 +25,7 @@ var Textarea = React$1.forwardRef(({ className, disabled, error, resize = false,
25
25
  })]
26
26
  })
27
27
  }), typeof error === "string" && /* @__PURE__ */ jsx("span", {
28
- className: "text-error-500 text-sm",
28
+ className: "text-error-500 animate-in fade-in-0 slide-in-from-top-1 ease-out-strong motion-reduce:slide-in-from-top-0 text-sm duration-150",
29
29
  children: error
30
30
  })]
31
31
  });