@arolariu/components 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/EXAMPLES.md +1035 -1035
  2. package/changelog.md +9 -0
  3. package/dist/components/ui/accordion.js.map +1 -1
  4. package/dist/components/ui/alert-dialog.js.map +1 -1
  5. package/dist/components/ui/alert.d.ts.map +1 -1
  6. package/dist/components/ui/alert.js.map +1 -1
  7. package/dist/components/ui/aspect-ratio.js.map +1 -1
  8. package/dist/components/ui/avatar.d.ts.map +1 -1
  9. package/dist/components/ui/avatar.js.map +1 -1
  10. package/dist/components/ui/background-beams.js.map +1 -1
  11. package/dist/components/ui/badge.js.map +1 -1
  12. package/dist/components/ui/breadcrumb.js.map +1 -1
  13. package/dist/components/ui/bubble-background.js.map +1 -1
  14. package/dist/components/ui/button-group.js.map +1 -1
  15. package/dist/components/ui/button.js.map +1 -1
  16. package/dist/components/ui/calendar.d.ts.map +1 -1
  17. package/dist/components/ui/calendar.js.map +1 -1
  18. package/dist/components/ui/card.js.map +1 -1
  19. package/dist/components/ui/carousel.js +1 -1
  20. package/dist/components/ui/carousel.js.map +1 -1
  21. package/dist/components/ui/chart.d.ts.map +1 -1
  22. package/dist/components/ui/chart.js.map +1 -1
  23. package/dist/components/ui/checkbox.js +2 -2
  24. package/dist/components/ui/checkbox.js.map +1 -1
  25. package/dist/components/ui/collapsible.js.map +1 -1
  26. package/dist/components/ui/command.d.ts.map +1 -1
  27. package/dist/components/ui/command.js.map +1 -1
  28. package/dist/components/ui/context-menu.js.map +1 -1
  29. package/dist/components/ui/counting-number.js.map +1 -1
  30. package/dist/components/ui/dialog.js.map +1 -1
  31. package/dist/components/ui/dot-background.js.map +1 -1
  32. package/dist/components/ui/drawer.js.map +1 -1
  33. package/dist/components/ui/dropdown-menu.js.map +1 -1
  34. package/dist/components/ui/dropdrawer.js.map +1 -1
  35. package/dist/components/ui/empty.js.map +1 -1
  36. package/dist/components/ui/field.js +2 -2
  37. package/dist/components/ui/field.js.map +1 -1
  38. package/dist/components/ui/fireworks-background.js.map +1 -1
  39. package/dist/components/ui/flip-button.js.map +1 -1
  40. package/dist/components/ui/form.d.ts.map +1 -1
  41. package/dist/components/ui/form.js +5 -4
  42. package/dist/components/ui/form.js.map +1 -1
  43. package/dist/components/ui/gradient-background.js.map +1 -1
  44. package/dist/components/ui/gradient-text.js.map +1 -1
  45. package/dist/components/ui/highlight-text.js.map +1 -1
  46. package/dist/components/ui/hole-background.js.map +1 -1
  47. package/dist/components/ui/hover-card.js.map +1 -1
  48. package/dist/components/ui/input-group.d.ts.map +1 -1
  49. package/dist/components/ui/input-group.js.map +1 -1
  50. package/dist/components/ui/input-otp.d.ts.map +1 -1
  51. package/dist/components/ui/input-otp.js +1 -1
  52. package/dist/components/ui/input-otp.js.map +1 -1
  53. package/dist/components/ui/input.js.map +1 -1
  54. package/dist/components/ui/item.js.map +1 -1
  55. package/dist/components/ui/kbd.js.map +1 -1
  56. package/dist/components/ui/label.js.map +1 -1
  57. package/dist/components/ui/menubar.js.map +1 -1
  58. package/dist/components/ui/navigation-menu.d.ts.map +1 -1
  59. package/dist/components/ui/navigation-menu.js +0 -1
  60. package/dist/components/ui/navigation-menu.js.map +1 -1
  61. package/dist/components/ui/pagination.d.ts.map +1 -1
  62. package/dist/components/ui/pagination.js.map +1 -1
  63. package/dist/components/ui/popover.js.map +1 -1
  64. package/dist/components/ui/progress.js.map +1 -1
  65. package/dist/components/ui/radio-group.js.map +1 -1
  66. package/dist/components/ui/resizable.d.ts +3 -2
  67. package/dist/components/ui/resizable.d.ts.map +1 -1
  68. package/dist/components/ui/resizable.js +2 -1
  69. package/dist/components/ui/resizable.js.map +1 -1
  70. package/dist/components/ui/ripple-button.js.map +1 -1
  71. package/dist/components/ui/scratcher.js.map +1 -1
  72. package/dist/components/ui/scroll-area.js.map +1 -1
  73. package/dist/components/ui/select.js.map +1 -1
  74. package/dist/components/ui/separator.js.map +1 -1
  75. package/dist/components/ui/sheet.js.map +1 -1
  76. package/dist/components/ui/sidebar.d.ts.map +1 -1
  77. package/dist/components/ui/sidebar.js +3 -2
  78. package/dist/components/ui/sidebar.js.map +1 -1
  79. package/dist/components/ui/skeleton.js.map +1 -1
  80. package/dist/components/ui/slider.d.ts.map +1 -1
  81. package/dist/components/ui/slider.js.map +1 -1
  82. package/dist/components/ui/sonner.js.map +1 -1
  83. package/dist/components/ui/spinner.js.map +1 -1
  84. package/dist/components/ui/switch.js.map +1 -1
  85. package/dist/components/ui/table.d.ts.map +1 -1
  86. package/dist/components/ui/table.js.map +1 -1
  87. package/dist/components/ui/tabs.js.map +1 -1
  88. package/dist/components/ui/textarea.js.map +1 -1
  89. package/dist/components/ui/toggle-group.js.map +1 -1
  90. package/dist/components/ui/toggle.js.map +1 -1
  91. package/dist/components/ui/tooltip.js.map +1 -1
  92. package/dist/components/ui/typewriter.js +6 -2
  93. package/dist/components/ui/typewriter.js.map +1 -1
  94. package/dist/hooks/useIsMobile.js.map +1 -1
  95. package/dist/hooks/useWindowSize.js.map +1 -1
  96. package/dist/index.css +25 -1779
  97. package/dist/index.css.map +1 -1
  98. package/dist/lib/utilities.js.map +1 -1
  99. package/package.json +2 -15
  100. package/src/components/ui/accordion.tsx +3 -3
  101. package/src/components/ui/alert-dialog.tsx +6 -6
  102. package/src/components/ui/alert.tsx +1 -0
  103. package/src/components/ui/avatar.tsx +12 -11
  104. package/src/components/ui/calendar.tsx +2 -0
  105. package/src/components/ui/carousel.tsx +1 -1
  106. package/src/components/ui/chart.tsx +2 -0
  107. package/src/components/ui/checkbox.tsx +3 -3
  108. package/src/components/ui/command.tsx +8 -7
  109. package/src/components/ui/context-menu.tsx +8 -8
  110. package/src/components/ui/dialog.tsx +4 -4
  111. package/src/components/ui/drawer.tsx +4 -4
  112. package/src/components/ui/dropdown-menu.tsx +8 -8
  113. package/src/components/ui/field.tsx +5 -4
  114. package/src/components/ui/form.tsx +12 -8
  115. package/src/components/ui/hover-card.tsx +1 -1
  116. package/src/components/ui/input-group.tsx +2 -0
  117. package/src/components/ui/input-otp.tsx +5 -5
  118. package/src/components/ui/label.tsx +1 -1
  119. package/src/components/ui/menubar.tsx +10 -10
  120. package/src/components/ui/navigation-menu.tsx +6 -7
  121. package/src/components/ui/pagination.tsx +1 -0
  122. package/src/components/ui/popover.tsx +1 -1
  123. package/src/components/ui/progress.tsx +1 -1
  124. package/src/components/ui/radio-group.tsx +2 -2
  125. package/src/components/ui/resizable.tsx +2 -1
  126. package/src/components/ui/scroll-area.tsx +2 -2
  127. package/src/components/ui/select.tsx +7 -7
  128. package/src/components/ui/separator.tsx +1 -1
  129. package/src/components/ui/sheet.tsx +4 -4
  130. package/src/components/ui/sidebar.tsx +22 -14
  131. package/src/components/ui/slider.tsx +14 -13
  132. package/src/components/ui/switch.tsx +1 -1
  133. package/src/components/ui/table.tsx +2 -0
  134. package/src/components/ui/tabs.tsx +3 -3
  135. package/src/components/ui/toggle-group.tsx +2 -2
  136. package/src/components/ui/toggle.tsx +1 -1
  137. package/src/components/ui/tooltip.tsx +1 -1
  138. package/src/components/ui/typewriter.tsx +2 -2
  139. package/src/index.css +6 -6
  140. package/dist/components/ui/field.d.ts +0 -25
  141. package/dist/components/ui/field.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\chart.js","sources":["webpack://@arolariu/components/./src/components/ui/chart.tsx"],"sourcesContent":["\r\n\r\nimport * as React from \"react\";\r\nimport * as RechartsPrimitive from \"recharts\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\n// Format: { THEME_NAME: CSS_SELECTOR }\r\nconst THEMES = {light: \"\", dark: \".dark\"} as const;\r\n\r\nexport type ChartConfig = {\r\n [k in string]: {\r\n label?: React.ReactNode;\r\n icon?: React.ComponentType;\r\n } & ({color?: string; theme?: never} | {color?: never; theme: Record<keyof typeof THEMES, string>});\r\n};\r\n\r\ntype ChartContextProps = {\r\n config: ChartConfig;\r\n};\r\n\r\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\r\n\r\nfunction useChart() {\r\n const context = React.useContext(ChartContext);\r\n\r\n if (!context) {\r\n throw new Error(\"useChart must be used within a <ChartContainer />\");\r\n }\r\n\r\n return context;\r\n}\r\n\r\nconst ChartContainer = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentProps<\"div\"> & {\r\n config: ChartConfig;\r\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>[\"children\"];\r\n }\r\n>(({id, className, children, config, ...props}, ref) => {\r\n const uniqueId = React.useId();\r\n const chartId = `chart-${id || uniqueId.replace(/:/g, \"\")}`;\r\n\r\n return (\r\n <ChartContext.Provider value={{config}}>\r\n <div\r\n data-chart={chartId}\r\n ref={ref}\r\n className={cn(\r\n \"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-sector]:outline-none [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-none\",\r\n className,\r\n )}\r\n {...props}>\r\n <ChartStyle\r\n id={chartId}\r\n config={config}\r\n />\r\n <RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>\r\n </div>\r\n </ChartContext.Provider>\r\n );\r\n});\r\nChartContainer.displayName = \"Chart\";\r\n\r\nconst ChartStyle = ({id, config}: {id: string; config: ChartConfig}) => {\r\n const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color);\r\n\r\n if (!colorConfig.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n <style\r\n dangerouslySetInnerHTML={{\r\n __html: Object.entries(THEMES)\r\n .map(\r\n ([theme, prefix]) => `\r\n${prefix} [data-chart=${id}] {\r\n${colorConfig\r\n .map(([key, itemConfig]) => {\r\n const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] || itemConfig.color;\r\n return color ? ` --color-${key}: ${color};` : null;\r\n })\r\n .join(\"\")}\r\n}\r\n`,\r\n )\r\n .join(\"\"),\r\n }}\r\n />\r\n );\r\n};\r\n\r\nconst ChartTooltip = RechartsPrimitive.Tooltip;\r\n\r\nconst ChartTooltipContent = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentProps<typeof RechartsPrimitive.Tooltip>\r\n & React.ComponentProps<\"div\"> & {\r\n hideLabel?: boolean;\r\n hideIndicator?: boolean;\r\n indicator?: \"line\" | \"dot\" | \"dashed\";\r\n nameKey?: string;\r\n labelKey?: string;\r\n }\r\n>(\r\n (\r\n {\r\n active,\r\n payload,\r\n className,\r\n indicator = \"dot\",\r\n hideLabel = false,\r\n hideIndicator = false,\r\n label,\r\n labelFormatter,\r\n labelClassName,\r\n formatter,\r\n color,\r\n nameKey,\r\n labelKey,\r\n },\r\n ref,\r\n ) => {\r\n const {config} = useChart();\r\n\r\n const tooltipLabel = React.useMemo(() => {\r\n if (hideLabel || !payload?.length) {\r\n return null;\r\n }\r\n\r\n const [item] = payload;\r\n const key = `${labelKey || item?.dataKey || item?.name || \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n const value = !labelKey && typeof label === \"string\" ? config[label as keyof typeof config]?.label || label : itemConfig?.label;\r\n\r\n if (labelFormatter) {\r\n return <div className={cn(\"font-medium\", labelClassName)}>{labelFormatter(value, payload)}</div>;\r\n }\r\n\r\n if (!value) {\r\n return null;\r\n }\r\n\r\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>;\r\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\r\n\r\n if (!active || !payload?.length) {\r\n return null;\r\n }\r\n\r\n const nestLabel = payload.length === 1 && indicator !== \"dot\";\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(\r\n \"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-neutral-200 border-neutral-200/50 bg-white px-2.5 py-1.5 text-xs shadow-xl dark:border-neutral-800 dark:border-neutral-800/50 dark:bg-neutral-950\",\r\n className,\r\n )}>\r\n {!nestLabel ? tooltipLabel : null}\r\n <div className='grid gap-1.5'>\r\n {payload\r\n .filter((item) => item.type !== \"none\")\r\n .map((item, index) => {\r\n const key = `${nameKey || item.name || item.dataKey || \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n const indicatorColor = color || item.payload.fill || item.color;\r\n\r\n return (\r\n <div\r\n key={item.dataKey}\r\n className={cn(\r\n \"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-neutral-500 dark:[&>svg]:text-neutral-400\",\r\n indicator === \"dot\" && \"items-center\",\r\n )}>\r\n {formatter && item?.value !== undefined && item.name ? (\r\n formatter(item.value, item.name, item, index, item.payload)\r\n ) : (\r\n <>\r\n {itemConfig?.icon ? (\r\n <itemConfig.icon />\r\n ) : (\r\n !hideIndicator && (\r\n <div\r\n className={cn(\"shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]\", {\r\n \"h-2.5 w-2.5\": indicator === \"dot\",\r\n \"w-1\": indicator === \"line\",\r\n \"w-0 border-[1.5px] border-dashed bg-transparent\": indicator === \"dashed\",\r\n \"my-0.5\": nestLabel && indicator === \"dashed\",\r\n })}\r\n style={\r\n {\r\n \"--color-bg\": indicatorColor,\r\n \"--color-border\": indicatorColor,\r\n } as React.CSSProperties\r\n }\r\n />\r\n )\r\n )}\r\n <div className={cn(\"flex flex-1 justify-between leading-none\", nestLabel ? \"items-end\" : \"items-center\")}>\r\n <div className='grid gap-1.5'>\r\n {nestLabel ? tooltipLabel : null}\r\n <span className='text-neutral-500 dark:text-neutral-400'>{itemConfig?.label || item.name}</span>\r\n </div>\r\n {item.value && (\r\n <span className='font-mono font-medium text-neutral-950 tabular-nums dark:text-neutral-50'>\r\n {item.value.toLocaleString()}\r\n </span>\r\n )}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n );\r\n })}\r\n </div>\r\n </div>\r\n );\r\n },\r\n);\r\nChartTooltipContent.displayName = \"ChartTooltip\";\r\n\r\nconst ChartLegend = RechartsPrimitive.Legend;\r\n\r\nconst ChartLegendContent = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentProps<\"div\">\r\n & Pick<RechartsPrimitive.LegendProps, \"payload\" | \"verticalAlign\"> & {\r\n hideIcon?: boolean;\r\n nameKey?: string;\r\n }\r\n>(({className, hideIcon = false, payload, verticalAlign = \"bottom\", nameKey}, ref) => {\r\n const {config} = useChart();\r\n\r\n if (!payload?.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(\"flex items-center justify-center gap-4\", verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\", className)}>\r\n {payload\r\n .filter((item) => item.type !== \"none\")\r\n .map((item) => {\r\n const key = `${nameKey || item.dataKey || \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n\r\n return (\r\n <div\r\n key={item.value}\r\n className={cn(\"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-neutral-500 dark:[&>svg]:text-neutral-400\")}>\r\n {itemConfig?.icon && !hideIcon ? (\r\n <itemConfig.icon />\r\n ) : (\r\n <div\r\n className='h-2 w-2 shrink-0 rounded-[2px]'\r\n style={{\r\n backgroundColor: item.color,\r\n }}\r\n />\r\n )}\r\n {itemConfig?.label}\r\n </div>\r\n );\r\n })}\r\n </div>\r\n );\r\n});\r\nChartLegendContent.displayName = \"ChartLegend\";\r\n\r\n// Helper to extract item config from a payload.\r\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\r\n if (typeof payload !== \"object\" || payload === null) {\r\n return undefined;\r\n }\r\n\r\n const payloadPayload =\r\n \"payload\" in payload && typeof payload.payload === \"object\" && payload.payload !== null ? payload.payload : undefined;\r\n\r\n let configLabelKey: string = key;\r\n\r\n if (key in payload && typeof payload[key as keyof typeof payload] === \"string\") {\r\n configLabelKey = payload[key as keyof typeof payload] as string;\r\n } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\") {\r\n configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string;\r\n }\r\n\r\n return configLabelKey in config ? config[configLabelKey] : config[key as keyof typeof config];\r\n}\r\n\r\nexport {ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent};\r\n"],"names":["THEMES","ChartContext","React","useChart","context","Error","ChartContainer","id","className","children","config","props","ref","uniqueId","chartId","cn","ChartStyle","RechartsPrimitive","colorConfig","Object","theme","prefix","key","itemConfig","color","ChartTooltip","ChartTooltipContent","active","payload","indicator","hideLabel","hideIndicator","label","labelFormatter","labelClassName","formatter","nameKey","labelKey","tooltipLabel","item","getPayloadConfigFromPayload","value","nestLabel","index","indicatorColor","undefined","ChartLegend","ChartLegendContent","hideIcon","verticalAlign","payloadPayload","configLabelKey"],"mappings":";;;;;AAQA,MAAMA,SAAS;IAAC,OAAO;IAAI,MAAM;AAAO;AAaxC,MAAMC,eAAe,WAAfA,GAAeC,cAA8C;AAEnE,SAASC;IACP,MAAMC,UAAUF,WAAiBD;IAEjC,IAAI,CAACG,SACH,MAAM,IAAIC,MAAM;IAGlB,OAAOD;AACT;AAEA,MAAME,iBAAiB,WAAjBA,GAAiBJ,WAMrB,CAAC,EAACK,EAAE,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,OAAM,EAAEC;IAC9C,MAAMC,WAAWX;IACjB,MAAMY,UAAU,CAAC,MAAM,EAAEP,MAAMM,SAAS,OAAO,CAAC,MAAM,KAAK;IAE3D,OAAO,WA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,MAAMjB;YAE7D,OAAO,WAAP,GACE,KAAC;gBAEC,WAAWP,GAAG;;oBACbQ,YAAY,QAAQ,CAACyB,WAAW,WAAXA,GACpB,IAACzB,WAAW,IAAI,sBAEhB,IAAC;wBACC,WAAU;wBACV,OAAO;4BACL,iBAAiBgB,KAAK,KAAK;wBAC7B;;oBAGHhB,YAAY;;eAZRgB,KAAK,KAAK;QAerB;;AAGR;AACAQ,mBAAmB,WAAW,GAAG;AAGjC,SAASP,4BAA4B9B,MAAmB,EAAEkB,OAAgB,EAAEN,GAAW;IACrF,IAAI,mBAAOM,WAAwBA,SAAAA,SACjC;IAGF,MAAMsB,iBACJ,aAAatB,WAAW,mBAAOA,QAAQ,OAAO,IAAiBA,SAAAA,QAAQ,OAAO,GAAYA,QAAQ,OAAO,GAAGiB;IAE9G,IAAIM,iBAAyB7B;IAE7B,IAAIA,OAAOM,WAAW,mBAAOA,OAAO,CAACN,IAA4B,EAC/D6B,iBAAiBvB,OAAO,CAACN,IAA4B;SAChD,IAAI4B,kBAAkB5B,OAAO4B,kBAAkB,mBAAOA,cAAc,CAAC5B,IAAmC,EAC7G6B,iBAAiBD,cAAc,CAAC5B,IAAmC;IAGrE,OAAO6B,kBAAkBzC,SAASA,MAAM,CAACyC,eAAe,GAAGzC,MAAM,CAACY,IAA2B;AAC/F"}
1
+ {"version":3,"file":"components/ui/chart.js","sources":["../../../src/components/ui/chart.tsx"],"sourcesContent":["\"use client\";\r\n\r\n/* eslint-disable */\r\n\r\nimport * as React from \"react\";\r\nimport * as RechartsPrimitive from \"recharts\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\n// Format: { THEME_NAME: CSS_SELECTOR }\r\nconst THEMES = {light: \"\", dark: \".dark\"} as const;\r\n\r\nexport type ChartConfig = {\r\n [k in string]: {\r\n label?: React.ReactNode;\r\n icon?: React.ComponentType;\r\n } & ({color?: string; theme?: never} | {color?: never; theme: Record<keyof typeof THEMES, string>});\r\n};\r\n\r\ntype ChartContextProps = {\r\n config: ChartConfig;\r\n};\r\n\r\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\r\n\r\nfunction useChart() {\r\n const context = React.useContext(ChartContext);\r\n\r\n if (!context) {\r\n throw new Error(\"useChart must be used within a <ChartContainer />\");\r\n }\r\n\r\n return context;\r\n}\r\n\r\nconst ChartContainer = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentProps<\"div\"> & {\r\n config: ChartConfig;\r\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>[\"children\"];\r\n }\r\n>(({id, className, children, config, ...props}, ref) => {\r\n const uniqueId = React.useId();\r\n const chartId = `chart-${id || uniqueId.replace(/:/g, \"\")}`;\r\n\r\n return (\r\n <ChartContext.Provider value={{config}}>\r\n <div\r\n data-chart={chartId}\r\n ref={ref}\r\n className={cn(\r\n \"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-sector]:outline-none [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-none\",\r\n className,\r\n )}\r\n {...props}>\r\n <ChartStyle\r\n id={chartId}\r\n config={config}\r\n />\r\n <RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>\r\n </div>\r\n </ChartContext.Provider>\r\n );\r\n});\r\nChartContainer.displayName = \"Chart\";\r\n\r\nconst ChartStyle = ({id, config}: {id: string; config: ChartConfig}) => {\r\n const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color);\r\n\r\n if (!colorConfig.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n <style\r\n dangerouslySetInnerHTML={{\r\n __html: Object.entries(THEMES)\r\n .map(\r\n ([theme, prefix]) => `\r\n${prefix} [data-chart=${id}] {\r\n${colorConfig\r\n .map(([key, itemConfig]) => {\r\n const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] || itemConfig.color;\r\n return color ? ` --color-${key}: ${color};` : null;\r\n })\r\n .join(\"\")}\r\n}\r\n`,\r\n )\r\n .join(\"\"),\r\n }}\r\n />\r\n );\r\n};\r\n\r\nconst ChartTooltip = RechartsPrimitive.Tooltip;\r\n\r\nconst ChartTooltipContent = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentProps<typeof RechartsPrimitive.Tooltip>\r\n & React.ComponentProps<\"div\"> & {\r\n hideLabel?: boolean;\r\n hideIndicator?: boolean;\r\n indicator?: \"line\" | \"dot\" | \"dashed\";\r\n nameKey?: string;\r\n labelKey?: string;\r\n }\r\n>(\r\n (\r\n {\r\n active,\r\n payload,\r\n className,\r\n indicator = \"dot\",\r\n hideLabel = false,\r\n hideIndicator = false,\r\n label,\r\n labelFormatter,\r\n labelClassName,\r\n formatter,\r\n color,\r\n nameKey,\r\n labelKey,\r\n },\r\n ref,\r\n ) => {\r\n const {config} = useChart();\r\n\r\n const tooltipLabel = React.useMemo(() => {\r\n if (hideLabel || !payload?.length) {\r\n return null;\r\n }\r\n\r\n const [item] = payload;\r\n const key = `${labelKey || item?.dataKey || item?.name || \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n const value = !labelKey && typeof label === \"string\" ? config[label as keyof typeof config]?.label || label : itemConfig?.label;\r\n\r\n if (labelFormatter) {\r\n return <div className={cn(\"font-medium\", labelClassName)}>{labelFormatter(value, payload)}</div>;\r\n }\r\n\r\n if (!value) {\r\n return null;\r\n }\r\n\r\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>;\r\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\r\n\r\n if (!active || !payload?.length) {\r\n return null;\r\n }\r\n\r\n const nestLabel = payload.length === 1 && indicator !== \"dot\";\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(\r\n \"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-neutral-200 border-neutral-200/50 bg-white px-2.5 py-1.5 text-xs shadow-xl dark:border-neutral-800 dark:border-neutral-800/50 dark:bg-neutral-950\",\r\n className,\r\n )}>\r\n {!nestLabel ? tooltipLabel : null}\r\n <div className='grid gap-1.5'>\r\n {payload\r\n .filter((item) => item.type !== \"none\")\r\n .map((item, index) => {\r\n const key = `${nameKey || item.name || item.dataKey || \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n const indicatorColor = color || item.payload.fill || item.color;\r\n\r\n return (\r\n <div\r\n key={item.dataKey}\r\n className={cn(\r\n \"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-neutral-500 dark:[&>svg]:text-neutral-400\",\r\n indicator === \"dot\" && \"items-center\",\r\n )}>\r\n {formatter && item?.value !== undefined && item.name ? (\r\n formatter(item.value, item.name, item, index, item.payload)\r\n ) : (\r\n <>\r\n {itemConfig?.icon ? (\r\n <itemConfig.icon />\r\n ) : (\r\n !hideIndicator && (\r\n <div\r\n className={cn(\"shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]\", {\r\n \"h-2.5 w-2.5\": indicator === \"dot\",\r\n \"w-1\": indicator === \"line\",\r\n \"w-0 border-[1.5px] border-dashed bg-transparent\": indicator === \"dashed\",\r\n \"my-0.5\": nestLabel && indicator === \"dashed\",\r\n })}\r\n style={\r\n {\r\n \"--color-bg\": indicatorColor,\r\n \"--color-border\": indicatorColor,\r\n } as React.CSSProperties\r\n }\r\n />\r\n )\r\n )}\r\n <div className={cn(\"flex flex-1 justify-between leading-none\", nestLabel ? \"items-end\" : \"items-center\")}>\r\n <div className='grid gap-1.5'>\r\n {nestLabel ? tooltipLabel : null}\r\n <span className='text-neutral-500 dark:text-neutral-400'>{itemConfig?.label || item.name}</span>\r\n </div>\r\n {item.value && (\r\n <span className='font-mono font-medium text-neutral-950 tabular-nums dark:text-neutral-50'>\r\n {item.value.toLocaleString()}\r\n </span>\r\n )}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n );\r\n })}\r\n </div>\r\n </div>\r\n );\r\n },\r\n);\r\nChartTooltipContent.displayName = \"ChartTooltip\";\r\n\r\nconst ChartLegend = RechartsPrimitive.Legend;\r\n\r\nconst ChartLegendContent = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentProps<\"div\">\r\n & Pick<RechartsPrimitive.LegendProps, \"payload\" | \"verticalAlign\"> & {\r\n hideIcon?: boolean;\r\n nameKey?: string;\r\n }\r\n>(({className, hideIcon = false, payload, verticalAlign = \"bottom\", nameKey}, ref) => {\r\n const {config} = useChart();\r\n\r\n if (!payload?.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(\"flex items-center justify-center gap-4\", verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\", className)}>\r\n {payload\r\n .filter((item) => item.type !== \"none\")\r\n .map((item) => {\r\n const key = `${nameKey || item.dataKey || \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n\r\n return (\r\n <div\r\n key={item.value}\r\n className={cn(\"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-neutral-500 dark:[&>svg]:text-neutral-400\")}>\r\n {itemConfig?.icon && !hideIcon ? (\r\n <itemConfig.icon />\r\n ) : (\r\n <div\r\n className='h-2 w-2 shrink-0 rounded-[2px]'\r\n style={{\r\n backgroundColor: item.color,\r\n }}\r\n />\r\n )}\r\n {itemConfig?.label}\r\n </div>\r\n );\r\n })}\r\n </div>\r\n );\r\n});\r\nChartLegendContent.displayName = \"ChartLegend\";\r\n\r\n// Helper to extract item config from a payload.\r\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\r\n if (typeof payload !== \"object\" || payload === null) {\r\n return undefined;\r\n }\r\n\r\n const payloadPayload =\r\n \"payload\" in payload && typeof payload.payload === \"object\" && payload.payload !== null ? payload.payload : undefined;\r\n\r\n let configLabelKey: string = key;\r\n\r\n if (key in payload && typeof payload[key as keyof typeof payload] === \"string\") {\r\n configLabelKey = payload[key as keyof typeof payload] as string;\r\n } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\") {\r\n configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string;\r\n }\r\n\r\n return configLabelKey in config ? config[configLabelKey] : config[key as keyof typeof config];\r\n}\r\n\r\nexport {ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent};\r\n"],"names":["THEMES","ChartContext","React","useChart","context","Error","ChartContainer","id","className","children","config","props","ref","uniqueId","chartId","cn","ChartStyle","RechartsPrimitive","colorConfig","Object","theme","prefix","key","itemConfig","color","ChartTooltip","ChartTooltipContent","active","payload","indicator","hideLabel","hideIndicator","label","labelFormatter","labelClassName","formatter","nameKey","labelKey","tooltipLabel","item","getPayloadConfigFromPayload","value","nestLabel","index","indicatorColor","undefined","ChartLegend","ChartLegendContent","hideIcon","verticalAlign","payloadPayload","configLabelKey"],"mappings":";;;;;AAUA,MAAMA,SAAS;IAAC,OAAO;IAAI,MAAM;AAAO;AAaxC,MAAMC,eAAe,WAAfA,GAAeC,cAA8C;AAEnE,SAASC;IACP,MAAMC,UAAUF,WAAiBD;IAEjC,IAAI,CAACG,SACH,MAAM,IAAIC,MAAM;IAGlB,OAAOD;AACT;AAEA,MAAME,iBAAiB,WAAjBA,GAAiBJ,WAMrB,CAAC,EAACK,EAAE,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,OAAM,EAAEC;IAC9C,MAAMC,WAAWX;IACjB,MAAMY,UAAU,CAAC,MAAM,EAAEP,MAAMM,SAAS,OAAO,CAA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G,CAAC,CAACA;YACJ,MAAMjB,MAAM,GAAGc,WAAWG,KAAK,OAAO,IAAI,SAAS;YACnD,MAAMhB,aAAaiB,4BAA4B9B,QAAQ6B,MAAMjB;YAE7D,OAAO,WAAP,GACE,KAAC;gBAEC,WAAWP,GAAG;;oBACbQ,YAAY,QAAQ,CAACyB,WAAW,WAAXA,GACpB,IAACzB,WAAW,IAAI,sBAEhB,IAAC;wBACC,WAAU;wBACV,OAAO;4BACL,iBAAiBgB,KAAK,KAAK;wBAC7B;;oBAGHhB,YAAY;;eAZRgB,KAAK,KAAK;QAerB;;AAGR;AACAQ,mBAAmB,WAAW,GAAG;AAGjC,SAASP,4BAA4B9B,MAAmB,EAAEkB,OAAgB,EAAEN,GAAW;IACrF,IAAI,AAAmB,YAAnB,OAAOM,WAAwBA,AAAY,SAAZA,SACjC;IAGF,MAAMsB,iBACJ,aAAatB,WAAW,AAA2B,YAA3B,OAAOA,QAAQ,OAAO,IAAiBA,AAAoB,SAApBA,QAAQ,OAAO,GAAYA,QAAQ,OAAO,GAAGiB;IAE9G,IAAIM,iBAAyB7B;IAE7B,IAAIA,OAAOM,WAAW,AAAgD,YAAhD,OAAOA,OAAO,CAACN,IAA4B,EAC/D6B,iBAAiBvB,OAAO,CAACN,IAA4B;SAChD,IAAI4B,kBAAkB5B,OAAO4B,kBAAkB,AAA8D,YAA9D,OAAOA,cAAc,CAAC5B,IAAmC,EAC7G6B,iBAAiBD,cAAc,CAAC5B,IAAmC;IAGrE,OAAO6B,kBAAkBzC,SAASA,MAAM,CAACyC,eAAe,GAAGzC,MAAM,CAACY,IAA2B;AAC/F"}
@@ -6,10 +6,10 @@ import { forwardRef } from "react";
6
6
  import { cn } from "../../lib/utilities.js";
7
7
  const Checkbox = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Root, {
8
8
  ref: ref,
9
- className: cn("peer h-4 w-4 shrink-0 rounded-sm border border-neutral-200 border-neutral-900 shadow focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:border-neutral-50 dark:border-neutral-800 dark:focus-visible:ring-neutral-300 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900", className),
9
+ className: cn("peer grid h-4 w-4 shrink-0 place-content-center rounded-sm border border-neutral-200 border-neutral-900 shadow focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:border-neutral-50 dark:border-neutral-800 dark:focus-visible:ring-neutral-300 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900", className),
10
10
  ...props,
11
11
  children: /*#__PURE__*/ jsx(Indicator, {
12
- className: cn("flex items-center justify-center text-current"),
12
+ className: cn("grid place-content-center text-current"),
13
13
  children: /*#__PURE__*/ jsx(Check, {
14
14
  className: "h-4 w-4"
15
15
  })
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\checkbox.js","sources":["webpack://@arolariu/components/./src/components/ui/checkbox.tsx"],"sourcesContent":["\r\n\r\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\r\nimport {Check} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Checkbox = React.forwardRef<\r\n React.ElementRef<typeof CheckboxPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\r\n>(({className, ...props}, ref) => (\r\n <CheckboxPrimitive.Root\r\n ref={ref}\r\n className={cn(\r\n \"peer h-4 w-4 shrink-0 rounded-sm border border-neutral-200 border-neutral-900 shadow focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:border-neutral-50 dark:border-neutral-800 dark:focus-visible:ring-neutral-300 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900\",\r\n className,\r\n )}\r\n {...props}>\r\n <CheckboxPrimitive.Indicator className={cn(\"flex items-center justify-center text-current\")}>\r\n <Check className='h-4 w-4' />\r\n </CheckboxPrimitive.Indicator>\r\n </CheckboxPrimitive.Root>\r\n));\r\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\r\n\r\nexport {Checkbox};\r\n"],"names":["Checkbox","React","className","props","ref","CheckboxPrimitive","cn","Check"],"mappings":";;;;;;AAQA,MAAMA,WAAW,WAAXA,GAAWC,WAGf,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,MAAsB;QACrB,KAAKD;QACL,WAAWE,GACT,scACAJ;QAED,GAAGC,KAAK;kBACT,kBAACE,WAA2B;YAAC,WAAWC,GAAG;sBACzC,kBAACC,OAAKA;gBAAC,WAAU;;;;AAIvBP,SAAS,WAAW,GAAGK,KAAAA,WAAkC"}
1
+ {"version":3,"file":"components/ui/checkbox.js","sources":["../../../src/components/ui/checkbox.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\r\nimport {Check} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Checkbox = React.forwardRef<\r\n React.ComponentRef<typeof CheckboxPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\r\n>(({className, ...props}, ref) => (\r\n <CheckboxPrimitive.Root\r\n ref={ref}\r\n className={cn(\r\n \"peer grid h-4 w-4 shrink-0 place-content-center rounded-sm border border-neutral-200 border-neutral-900 shadow focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:border-neutral-50 dark:border-neutral-800 dark:focus-visible:ring-neutral-300 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900\",\r\n className,\r\n )}\r\n {...props}>\r\n <CheckboxPrimitive.Indicator className={cn(\"grid place-content-center text-current\")}>\r\n <Check className='h-4 w-4' />\r\n </CheckboxPrimitive.Indicator>\r\n </CheckboxPrimitive.Root>\r\n));\r\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\r\n\r\nexport {Checkbox};\r\n"],"names":["Checkbox","React","className","props","ref","CheckboxPrimitive","cn","Check"],"mappings":";;;;;;AAQA,MAAMA,WAAW,WAAXA,GAAWC,WAGf,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,MAAsB;QACrB,KAAKD;QACL,WAAWE,GACT,geACAJ;QAED,GAAGC,KAAK;kBACT,kBAACE,WAA2B;YAAC,WAAWC,GAAG;sBACzC,kBAACC,OAAKA;gBAAC,WAAU;;;;AAIvBP,SAAS,WAAW,GAAGK,KAAAA,WAAkC"}
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\collapsible.js","sources":["webpack://@arolariu/components/./src/components/ui/collapsible.tsx"],"sourcesContent":["\r\n\r\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\r\n\r\nconst Collapsible = CollapsiblePrimitive.Root;\r\n\r\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\r\n\r\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;\r\n\r\nexport {Collapsible, CollapsibleContent, CollapsibleTrigger};\r\n"],"names":["Collapsible","CollapsiblePrimitive","CollapsibleTrigger","CollapsibleContent"],"mappings":";;AAIA,MAAMA,cAAcC;AAEpB,MAAMC,iCAAqBD;AAE3B,MAAME,iCAAqBF"}
1
+ {"version":3,"file":"components/ui/collapsible.js","sources":["../../../src/components/ui/collapsible.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\r\n\r\nconst Collapsible = CollapsiblePrimitive.Root;\r\n\r\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\r\n\r\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;\r\n\r\nexport {Collapsible, CollapsibleContent, CollapsibleTrigger};\r\n"],"names":["Collapsible","CollapsiblePrimitive","CollapsibleTrigger","CollapsibleContent"],"mappings":";;AAIA,MAAMA,cAAcC;AAEpB,MAAMC,iCAAqBD;AAE3B,MAAME,iCAAqBF"}
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/components/ui/command.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAGxD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;sFAWZ,CAAC;AAGF,QAAA,MAAM,aAAa,GAAI,wBAAsB,WAAW,4CAUvD,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;0FAiBhB,CAAC;AAIH,QAAA,MAAM,WAAW;;;;;;;;sFASf,CAAC;AAIH,QAAA,MAAM,YAAY;;;;;;uJAShB,CAAC;AAIH,QAAA,MAAM,YAAY;;;;;;;;;;sFAYhB,CAAC;AAIH,QAAA,MAAM,gBAAgB;;;;;;sFASpB,CAAC;AAGH,QAAA,MAAM,WAAW;;;;;;;;;;;;sFAYf,CAAC;AAIH,QAAA,MAAM,eAAe;8BAA2B,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAOpF,CAAC;AAGF,OAAO,EAAC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAC,CAAC"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/components/ui/command.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAGxD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;sFAWZ,CAAC;AAGF,QAAA,MAAM,aAAa,GAAI,wBAAsB,WAAW,4CAUvD,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;0FAkBhB,CAAC;AAIH,QAAA,MAAM,WAAW;;;;;;;;sFASf,CAAC;AAIH,QAAA,MAAM,YAAY;;;;;;uJAShB,CAAC;AAIH,QAAA,MAAM,YAAY;;;;;;;;;;sFAYhB,CAAC;AAIH,QAAA,MAAM,gBAAgB;;;;;;sFASpB,CAAC;AAGH,QAAA,MAAM,WAAW;;;;;;;;;;;;sFAYf,CAAC;AAIH,QAAA,MAAM,eAAe;8BAA2B,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAOpF,CAAC;AAGF,OAAO,EAAC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\command.js","sources":["webpack://@arolariu/components/./src/components/ui/command.tsx"],"sourcesContent":["\r\n\r\nimport type {DialogProps} from \"@radix-ui/react-dialog\";\r\nimport {Command as CommandPrimitive} from \"cmdk\";\r\nimport {Search} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {Dialog, DialogContent} from \"@/components/ui/dialog\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Command = React.forwardRef<React.ElementRef<typeof CommandPrimitive>, React.ComponentPropsWithoutRef<typeof CommandPrimitive>>(\r\n ({className, ...props}, ref) => (\r\n <CommandPrimitive\r\n ref={ref}\r\n className={cn(\r\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n ),\r\n);\r\nCommand.displayName = CommandPrimitive.displayName;\r\n\r\nconst CommandDialog = ({children, ...props}: DialogProps) => {\r\n return (\r\n <Dialog {...props}>\r\n <DialogContent className='overflow-hidden p-0'>\r\n <Command className='[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:[&_[cmdk-group-heading]]:text-neutral-400 [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5'>\r\n {children}\r\n </Command>\r\n </DialogContent>\r\n </Dialog>\r\n );\r\n};\r\n\r\nconst CommandInput = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.Input>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\r\n>(({className, ...props}, ref) => (\r\n <div\r\n className='flex items-center border-b px-3'\r\n cmdk-input-wrapper=''>\r\n <Search className='mr-2 h-4 w-4 shrink-0 opacity-50' />\r\n <CommandPrimitive.Input\r\n ref={ref}\r\n className={cn(\r\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </div>\r\n));\r\n\r\nCommandInput.displayName = CommandPrimitive.Input.displayName;\r\n\r\nconst CommandList = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.List>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.List\r\n ref={ref}\r\n className={cn(\"max-h-[300px] overflow-x-hidden overflow-y-auto\", className)}\r\n {...props}\r\n />\r\n));\r\n\r\nCommandList.displayName = CommandPrimitive.List.displayName;\r\n\r\nconst CommandEmpty = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.Empty>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\r\n>((props, ref) => (\r\n <CommandPrimitive.Empty\r\n ref={ref}\r\n className='py-6 text-center text-sm'\r\n {...props}\r\n />\r\n));\r\n\r\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\r\n\r\nconst CommandGroup = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.Group>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.Group\r\n ref={ref}\r\n className={cn(\r\n \"overflow-hidden p-1 text-neutral-950 dark:text-neutral-50 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:[&_[cmdk-group-heading]]:text-neutral-400\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\n\r\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\r\n\r\nconst CommandSeparator = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.Separator\r\n ref={ref}\r\n className={cn(\"-mx-1 h-px bg-neutral-200 dark:bg-neutral-800\", className)}\r\n {...props}\r\n />\r\n));\r\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\r\n\r\nconst CommandItem = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-neutral-100 data-[selected=true]:text-neutral-900 dark:data-[selected=true]:bg-neutral-800 dark:data-[selected=true]:text-neutral-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\n\r\nCommandItem.displayName = CommandPrimitive.Item.displayName;\r\n\r\nconst CommandShortcut = ({className, ...props}: React.HTMLAttributes<HTMLSpanElement>) => {\r\n return (\r\n <span\r\n className={cn(\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nCommandShortcut.displayName = \"CommandShortcut\";\r\n\r\nexport {Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut};\r\n"],"names":["Command","React","className","props","ref","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut"],"mappings":";;;;;;;AAUA,MAAMA,kBAAU,WAAHA,GAAGC,WACd,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACtB,IAACC,SAAgBA;QACf,KAAKD;QACL,WAAWE,GACT,6HACAJ;QAED,GAAGC,KAAK;;AAIfH,gBAAQ,WAAW,GAAGK,QAAAA,WAA4B;AAElD,MAAME,gBAAgB,CAAC,EAACC,QAAQ,EAAE,GAAGL,OAAmB,GAC/C,WAAP,GACE,IAACM,QAAMA;QAAE,GAAGN,KAAK;kBACf,kBAACO,eAAaA;YAAC,WAAU;sBACvB,kBAACV,iBAAOA;gBAAC,WAAU;0BAChBQ;;;;AAOX,MAAMG,eAAe,WAAfA,GAAeV,WAGnB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,KAAC;QACC,WAAU;QACV,s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IAACC,QAAAA,IAAqB;QACpB,KAAKD;QACL,WAAWE,GACT,6YACAJ;QAED,GAAGC,KAAK;;AAIbc,YAAY,WAAW,GAAGZ,QAAAA,IAAAA,CAAAA,WAAiC;AAE3D,MAAMa,kBAAkB,CAAC,EAAChB,SAAS,EAAE,GAAGC,OAA6C,GAC5E,WAAP,GACE,IAAC;QACC,WAAWG,GAAG,0EAA0EJ;QACvF,GAAGC,KAAK;;AAIfe,gBAAgB,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/command.js","sources":["../../../src/components/ui/command.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport type {DialogProps} from \"@radix-ui/react-dialog\";\r\nimport {Command as CommandPrimitive} from \"cmdk\";\r\nimport {Search} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {Dialog, DialogContent} from \"@/components/ui/dialog\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Command = React.forwardRef<React.ComponentRef<typeof CommandPrimitive>, React.ComponentPropsWithoutRef<typeof CommandPrimitive>>(\r\n ({className, ...props}, ref) => (\r\n <CommandPrimitive\r\n ref={ref}\r\n className={cn(\r\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n ),\r\n);\r\nCommand.displayName = CommandPrimitive.displayName;\r\n\r\nconst CommandDialog = ({children, ...props}: DialogProps) => {\r\n return (\r\n <Dialog {...props}>\r\n <DialogContent className='overflow-hidden p-0'>\r\n <Command className='[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:[&_[cmdk-group-heading]]:text-neutral-400 [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5'>\r\n {children}\r\n </Command>\r\n </DialogContent>\r\n </Dialog>\r\n );\r\n};\r\n\r\nconst CommandInput = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Input>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\r\n>(({className, ...props}, ref) => (\r\n <div\r\n className='flex items-center border-b px-3'\r\n // eslint-disable-next-line react/no-unknown-property -- cmdk specific attribute\r\n cmdk-input-wrapper=''>\r\n <Search className='mr-2 h-4 w-4 shrink-0 opacity-50' />\r\n <CommandPrimitive.Input\r\n ref={ref}\r\n className={cn(\r\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </div>\r\n));\r\n\r\nCommandInput.displayName = CommandPrimitive.Input.displayName;\r\n\r\nconst CommandList = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.List>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.List\r\n ref={ref}\r\n className={cn(\"max-h-[300px] overflow-x-hidden overflow-y-auto\", className)}\r\n {...props}\r\n />\r\n));\r\n\r\nCommandList.displayName = CommandPrimitive.List.displayName;\r\n\r\nconst CommandEmpty = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Empty>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\r\n>((props, ref) => (\r\n <CommandPrimitive.Empty\r\n ref={ref}\r\n className='py-6 text-center text-sm'\r\n {...props}\r\n />\r\n));\r\n\r\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\r\n\r\nconst CommandGroup = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Group>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.Group\r\n ref={ref}\r\n className={cn(\r\n \"overflow-hidden p-1 text-neutral-950 dark:text-neutral-50 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:[&_[cmdk-group-heading]]:text-neutral-400\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\n\r\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\r\n\r\nconst CommandSeparator = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.Separator\r\n ref={ref}\r\n className={cn(\"-mx-1 h-px bg-neutral-200 dark:bg-neutral-800\", className)}\r\n {...props}\r\n />\r\n));\r\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\r\n\r\nconst CommandItem = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-neutral-100 data-[selected=true]:text-neutral-900 dark:data-[selected=true]:bg-neutral-800 dark:data-[selected=true]:text-neutral-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\n\r\nCommandItem.displayName = CommandPrimitive.Item.displayName;\r\n\r\nconst CommandShortcut = ({className, ...props}: React.HTMLAttributes<HTMLSpanElement>) => {\r\n return (\r\n <span\r\n className={cn(\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nCommandShortcut.displayName = \"CommandShortcut\";\r\n\r\nexport {Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut};\r\n"],"names":["Command","React","className","props","ref","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut"],"mappings":";;;;;;;AAUA,MAAMA,kBAAU,WAAHA,GAAGC,WACd,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACtB,IAACC,SAAgBA;QACf,KAAKD;QACL,WAAWE,GACT,6HACAJ;QAED,GAAGC,KAAK;;AAIfH,gBAAQ,WAAW,GAAGK,QAAAA,WAA4B;AAElD,MAAME,gBAAgB,CAAC,EAACC,QAAQ,EAAE,GAAGL,OAAmB,GAC/C,WAAP,GACE,IAACM,QAAMA;QAAE,GAAGN,KAAK;kBACf,kBAACO,eAAaA;YAAC,WAAU;sBACvB,kBAACV,iBAAOA;gBAAC,WAAU;0BAChBQ;;;;AAOX,MAAMG,eAAe,WAAfA,GAAeV,WAGnB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,KAAC;QACC,WAAU;QAEV,sBAAmB;;0BACnB,IAACQ,QAAMA;gBAAC,WAAU;;0BAClB,IAACP,QAAAA,KAAsB;gBACrB,KAAKD;gBACL,WAAWE,GACT,uLACAJ;gBAED,GAAGC,KAAK;;;;AAKfQ,aAAa,WAAW,GAAGN,QAAAA,KAAAA,CAAAA,WAAkC;AAE7D,MAAMQ,cAAc,WAAdA,GAAcZ,WAGlB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,QAAAA,IAAqB;QACpB,KAAKD;QACL,WAAWE,GAAG,mDAAmDJ;QA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./src/components/ui/context-menu.tsx"],"sourcesContent":["\r\n\r\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\r\nimport {Check, ChevronRight, Circle} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst ContextMenu = ContextMenuPrimitive.Root;\r\n\r\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\r\n\r\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\r\n\r\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\r\n\r\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\r\n\r\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\r\n\r\nconst ContextMenuSubTrigger = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, children, ...props}, ref) => (\r\n <ContextMenuPrimitive.SubTrigger\r\n ref={ref}\r\n className={cn(\r\n \"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}>\r\n {children}\r\n <ChevronRight className='ml-auto h-4 w-4' />\r\n </ContextMenuPrimitive.SubTrigger>\r\n));\r\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\r\n\r\nconst ContextMenuSubContent = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.SubContent>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.SubContent\r\n ref={ref}\r\n className={cn(\r\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 z-50 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\r\n\r\nconst ContextMenuContent = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.Portal>\r\n <ContextMenuPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\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 z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-x-hidden overflow-y-auto rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </ContextMenuPrimitive.Portal>\r\n));\r\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\r\n\r\nconst ContextMenuItem = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <ContextMenuPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\r\n\r\nconst ContextMenuCheckboxItem = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>\r\n>(({className, children, checked, ...props}, ref) => (\r\n <ContextMenuPrimitive.CheckboxItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n checked={checked}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <ContextMenuPrimitive.ItemIndicator>\r\n <Check className='h-4 w-4' />\r\n </ContextMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </ContextMenuPrimitive.CheckboxItem>\r\n));\r\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;\r\n\r\nconst ContextMenuRadioItem = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>\r\n>(({className, children, ...props}, ref) => (\r\n <ContextMenuPrimitive.RadioItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <ContextMenuPrimitive.ItemIndicator>\r\n <Circle className='h-4 w-4 fill-current' />\r\n </ContextMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </ContextMenuPrimitive.RadioItem>\r\n));\r\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\r\n\r\nconst ContextMenuLabel = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.Label>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <ContextMenuPrimitive.Label\r\n ref={ref}\r\n className={cn(\"px-2 py-1.5 text-sm font-semibold text-neutral-950 dark:text-neutral-50\", inset && \"pl-8\", className)}\r\n {...props}\r\n />\r\n));\r\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\r\n\r\nconst ContextMenuSeparator = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.Separator\r\n ref={ref}\r\n className={cn(\"-mx-1 my-1 h-px bg-neutral-200 dark:bg-neutral-800\", className)}\r\n {...props}\r\n />\r\n));\r\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\r\n\r\nconst ContextMenuShortcut = ({className, ...props}: React.HTMLAttributes<HTMLSpanElement>) => {\r\n return (\r\n <span\r\n className={cn(\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\r\n\r\nexport {\r\n ContextMenu,\r\n ContextMenuCheckboxItem,\r\n ContextMenuContent,\r\n ContextMenuGroup,\r\n ContextMenuItem,\r\n ContextMenuLabel,\r\n ContextMenuPortal,\r\n ContextMenuRadioGroup,\r\n ContextMenuRadioItem,\r\n ContextMenuSeparator,\r\n ContextMenuShortcut,\r\n ContextMenuSub,\r\n ContextMenuSubContent,\r\n ContextMenuSubTrigger,\r\n ContextMenuTrigger,\r\n};\r\n"],"names":["ContextMenu","ContextMenuPrimitive","ContextMenuTrigger","ContextMenuGroup","ContextMenuPortal","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","React","className","inset","children","props","ref","cn","ChevronRight","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","Check","ContextMenuRadioItem","Circle","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut"],"mappings":";;;;;;AAQA,MAAMA,cAAcC;AAEpB,MAAMC,qBAAqBD;AAE3B,MAAME,mBAAmBF;AAEzB,MAAMG,oBAAoBH;AAE1B,MAAMI,iBAAiBJ;AAEvB,MAAMK,wBAAwBL;AAE9B,MAAMM,wBAAwB,WAAxBA,GAAwBC,WAK5B,CAAC,EAACC,SAAS,EAAEC,KAAK,EAAEC,QAAQ,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACzC,KAACZ,YAA+B;QAC9B,KAAKY;QACL,WAAWC,GACT,8UACAJ,SAAS,QACTD;QAED,GAAGG,KAAK;;YACRD;0BACD,IAACI,cAAYA;gBAAC,WAAU;;;;AAG5BR,sBAAsB,WAAW,GAAGN,WAAAA,WAA2C;AAE/E,MAAMe,wBAAwB,WAAxBA,GAAwBR,WAG5B,CAAC,EAACC,SAAS,EAAE,GAAGG,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACZ,YAA+B;QAC9B,KAAKY;QACL,WAAWC,GACT,2jBACAL;QAED,GAAGG,KAAK;;AAGbI,sBAAsB,WAAW,GAAGf,WAA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E,MAAMuB,mBAAmB,WAAnBA,GAAmBhB,WAKvB,CAAC,EAACC,SAAS,EAAEC,KAAK,EAAE,GAAGE,OAAM,EAAEC,MAAAA,WAAAA,GAC/B,IAACZ,OAA0B;QACzB,KAAKY;QACL,WAAWC,GAAG,2EAA2EJ,SAAS,QAAQD;QACzG,GAAGG,KAAK;;AAGbY,iBAAiB,WAAW,GAAGvB,MAAAA,WAAsC;AAErE,MAAMwB,uBAAuB,WAAvBA,GAAuBjB,WAG3B,CAAC,EAACC,SAAS,EAAE,GAAGG,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACZ,WAA8B;QAC7B,KAAKY;QACL,WAAWC,GAAG,sDAAsDL;QACnE,GAAGG,KAAK;;AAGba,qBAAqB,WAAW,GAAGxB,UAAAA,WAA0C;AAE7E,MAAMyB,sBAAsB,CAAC,EAACjB,SAAS,EAAE,GAAGG,OAA6C,GAChF,WAAP,GACE,IAAC;QACC,WAAWE,GAAG,0EAA0EL;QACvF,GAAGG,KAAK;;AAIfc,oBAAoB,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/context-menu.js","sources":["../../../src/components/ui/context-menu.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\r\nimport {Check, ChevronRight, Circle} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst ContextMenu = ContextMenuPrimitive.Root;\r\n\r\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\r\n\r\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\r\n\r\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\r\n\r\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\r\n\r\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\r\n\r\nconst ContextMenuSubTrigger = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.SubTrigger>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, children, ...props}, ref) => (\r\n <ContextMenuPrimitive.SubTrigger\r\n ref={ref}\r\n className={cn(\r\n \"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}>\r\n {children}\r\n <ChevronRight className='ml-auto h-4 w-4' />\r\n </ContextMenuPrimitive.SubTrigger>\r\n));\r\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\r\n\r\nconst ContextMenuSubContent = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.SubContent>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.SubContent\r\n ref={ref}\r\n className={cn(\r\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 z-50 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\r\n\r\nconst ContextMenuContent = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.Portal>\r\n <ContextMenuPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\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 z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-x-hidden overflow-y-auto rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </ContextMenuPrimitive.Portal>\r\n));\r\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\r\n\r\nconst ContextMenuItem = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <ContextMenuPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\r\n\r\nconst ContextMenuCheckboxItem = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.CheckboxItem>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>\r\n>(({className, children, checked, ...props}, ref) => (\r\n <ContextMenuPrimitive.CheckboxItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n checked={checked}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <ContextMenuPrimitive.ItemIndicator>\r\n <Check className='h-4 w-4' />\r\n </ContextMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </ContextMenuPrimitive.CheckboxItem>\r\n));\r\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;\r\n\r\nconst ContextMenuRadioItem = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.RadioItem>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>\r\n>(({className, children, ...props}, ref) => (\r\n <ContextMenuPrimitive.RadioItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <ContextMenuPrimitive.ItemIndicator>\r\n <Circle className='h-4 w-4 fill-current' />\r\n </ContextMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </ContextMenuPrimitive.RadioItem>\r\n));\r\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\r\n\r\nconst ContextMenuLabel = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Label>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <ContextMenuPrimitive.Label\r\n ref={ref}\r\n className={cn(\"px-2 py-1.5 text-sm font-semibold text-neutral-950 dark:text-neutral-50\", inset && \"pl-8\", className)}\r\n {...props}\r\n />\r\n));\r\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\r\n\r\nconst ContextMenuSeparator = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.Separator\r\n ref={ref}\r\n className={cn(\"-mx-1 my-1 h-px bg-neutral-200 dark:bg-neutral-800\", className)}\r\n {...props}\r\n />\r\n));\r\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\r\n\r\nconst ContextMenuShortcut = ({className, ...props}: React.HTMLAttributes<HTMLSpanElement>) => {\r\n return (\r\n <span\r\n className={cn(\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\r\n\r\nexport {\r\n ContextMenu,\r\n ContextMenuCheckboxItem,\r\n ContextMenuContent,\r\n ContextMenuGroup,\r\n ContextMenuItem,\r\n ContextMenuLabel,\r\n ContextMenuPortal,\r\n ContextMenuRadioGroup,\r\n ContextMenuRadioItem,\r\n ContextMenuSeparator,\r\n ContextMenuShortcut,\r\n ContextMenuSub,\r\n ContextMenuSubContent,\r\n ContextMenuSubTrigger,\r\n ContextMenuTrigger,\r\n};\r\n"],"names":["ContextMenu","ContextMenuPrimitive","ContextMenuTrigger","ContextMenuGroup","ContextMenuPortal","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","React","className","inset","children","props","ref","cn","ChevronRight","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","Check","ContextMenuRadioItem","Circle","ContextMenuLabel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C,EAACjB,SAAS,EAAE,GAAGG,OAA6C,GAChF,WAAP,GACE,IAAC;QACC,WAAWE,GAAG,0EAA0EL;QACvF,GAAGG,KAAK;;AAIfc,oBAAoB,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\counting-number.js","sources":["webpack://@arolariu/components/./src/components/ui/counting-number.tsx"],"sourcesContent":["\r\n\r\nimport {type SpringOptions, type UseInViewOptions, useInView, useMotionValue, useSpring} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\ninterface CountingNumberProps extends React.HTMLAttributes<HTMLSpanElement> {\r\n number: number;\r\n fromNumber?: number;\r\n padStart?: boolean;\r\n inView?: boolean;\r\n inViewMargin?: UseInViewOptions[\"margin\"];\r\n inViewOnce?: boolean;\r\n decimalSeparator?: string;\r\n transition?: SpringOptions;\r\n decimalPlaces?: number;\r\n}\r\n\r\nconst CountingNumber = React.forwardRef<HTMLSpanElement, CountingNumberProps>(\r\n (\r\n {\r\n number,\r\n fromNumber = 0,\r\n padStart = false,\r\n inView = false,\r\n inViewMargin = \"0px\",\r\n inViewOnce = true,\r\n decimalSeparator = \".\",\r\n transition = {stiffness: 90, damping: 50},\r\n decimalPlaces = 0,\r\n className,\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const localRef = React.useRef<HTMLSpanElement>(null);\r\n React.useImperativeHandle(ref, () => localRef.current as HTMLSpanElement);\r\n\r\n const numberStr = number.toString();\r\n const decimals = typeof decimalPlaces === \"number\" ? decimalPlaces : numberStr.includes(\".\") ? numberStr?.split(\".\")[1].length : 0;\r\n\r\n const motionVal = useMotionValue(fromNumber);\r\n const springVal = useSpring(motionVal, transition);\r\n const inViewResult = useInView(localRef, {\r\n once: inViewOnce,\r\n margin: inViewMargin,\r\n });\r\n const isInView = !inView || inViewResult;\r\n\r\n React.useEffect(() => {\r\n if (isInView) motionVal.set(number);\r\n }, [isInView, number, motionVal]);\r\n\r\n React.useEffect(() => {\r\n const unsubscribe = springVal.on(\"change\", (latest) => {\r\n if (localRef.current) {\r\n let formatted = decimals > 0 ? latest.toFixed(decimals) : Math.round(latest).toString();\r\n\r\n if (decimals > 0) {\r\n formatted = formatted.replace(\".\", decimalSeparator);\r\n }\r\n\r\n if (padStart) {\r\n const finalIntLength = Math.floor(Math.abs(number)).toString().length;\r\n const [intPart, fracPart] = formatted.split(decimalSeparator);\r\n const paddedInt = intPart.padStart(finalIntLength, \"0\");\r\n formatted = fracPart ? `${paddedInt}${decimalSeparator}${fracPart}` : paddedInt;\r\n }\r\n\r\n localRef.current.textContent = formatted;\r\n }\r\n });\r\n return () => unsubscribe();\r\n }, [springVal, decimals, padStart, number, decimalSeparator]);\r\n\r\n const finalIntLength = Math.floor(Math.abs(number)).toString().length;\r\n const suffix = decimals > 0 ? `${decimalSeparator}${\"0\".repeat(decimals)}` : \"\";\r\n const initialText = padStart ? `${\"0\".padStart(finalIntLength, \"0\")}${suffix}` : `0${suffix}`;\r\n\r\n return (\r\n <span\r\n ref={localRef}\r\n className={className}\r\n {...props}>\r\n {initialText}\r\n </span>\r\n );\r\n },\r\n);\r\n\r\nCountingNumber.displayName = \"CountingNumber\";\r\n\r\nexport {CountingNumber, type CountingNumberProps};\r\n"],"names":["CountingNumber","React","number","fromNumber","padStart","inView","inViewMargin","inViewOnce","decimalSeparator","transition","decimalPlaces","className","props","ref","localRef","numberStr","decimals","motionVal","useMotionValue","springVal","useSpring","inViewResult","useInView","isInView","unsubscribe","latest","formatted","Math","finalIntLength","intPart","fracPart","paddedInt","suffix","initialText"],"mappings":";;;;AAiBA,MAAMA,iBAAiB,WAAjBA,GAAiBC,WACrB,CACE,EACEC,MAAM,EACNC,aAAa,CAAC,EACdC,WAAW,KAAK,EAChBC,SAAS,KAAK,EACdC,eAAe,KAAK,EACpBC,aAAa,IAAI,EACjBC,mBAAmB,GAAG,EACtBC,aAAa;IAAC,WAAW;IAAI,SAAS;AAAE,CAAC,EACzCC,gBAAgB,CAAC,EACjBC,SAAS,EACT,GAAGC,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,GAAG,MAAM;IACrE,MAAM8B,SAAShB,WAAW,IAAI,GAAGR,mBAAmB,IAAI,MAAM,CAACQ,WAAW,GAAG;IAC7E,MAAMiB,cAAc7B,WAAW,GAAG,IAAI,QAAQ,CAACwB,gBAAgB,OAAOI,QAAQ,GAAG,CAAC,CAAC,EAAEA,QAAQ;IAE7F,OAAO,WAAP,GACE,IAAC;QACC,KAAKlB;QACL,WAAWH;QACV,GAAGC,KAAK;kBACRqB;;AAGP;AAGFjC,eAAe,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/counting-number.js","sources":["../../../src/components/ui/counting-number.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {type SpringOptions, type UseInViewOptions, useInView, useMotionValue, useSpring} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\ninterface CountingNumberProps extends React.HTMLAttributes<HTMLSpanElement> {\r\n number: number;\r\n fromNumber?: number;\r\n padStart?: boolean;\r\n inView?: boolean;\r\n inViewMargin?: UseInViewOptions[\"margin\"];\r\n inViewOnce?: boolean;\r\n decimalSeparator?: string;\r\n transition?: SpringOptions;\r\n decimalPlaces?: number;\r\n}\r\n\r\nconst CountingNumber = React.forwardRef<HTMLSpanElement, CountingNumberProps>(\r\n (\r\n {\r\n number,\r\n fromNumber = 0,\r\n padStart = false,\r\n inView = false,\r\n inViewMargin = \"0px\",\r\n inViewOnce = true,\r\n decimalSeparator = \".\",\r\n transition = {stiffness: 90, damping: 50},\r\n decimalPlaces = 0,\r\n className,\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const localRef = React.useRef<HTMLSpanElement>(null);\r\n React.useImperativeHandle(ref, () => localRef.current as HTMLSpanElement);\r\n\r\n const numberStr = number.toString();\r\n const decimals = typeof decimalPlaces === \"number\" ? decimalPlaces : numberStr.includes(\".\") ? numberStr?.split(\".\")[1].length : 0;\r\n\r\n const motionVal = useMotionValue(fromNumber);\r\n const springVal = useSpring(motionVal, transition);\r\n const inViewResult = useInView(localRef, {\r\n once: inViewOnce,\r\n margin: inViewMargin,\r\n });\r\n const isInView = !inView || inViewResult;\r\n\r\n React.useEffect(() => {\r\n if (isInView) motionVal.set(number);\r\n }, [isInView, number, motionVal]);\r\n\r\n React.useEffect(() => {\r\n const unsubscribe = springVal.on(\"change\", (latest) => {\r\n if (localRef.current) {\r\n let formatted = decimals > 0 ? latest.toFixed(decimals) : Math.round(latest).toString();\r\n\r\n if (decimals > 0) {\r\n formatted = formatted.replace(\".\", decimalSeparator);\r\n }\r\n\r\n if (padStart) {\r\n const finalIntLength = Math.floor(Math.abs(number)).toString().length;\r\n const [intPart, fracPart] = formatted.split(decimalSeparator);\r\n const paddedInt = intPart.padStart(finalIntLength, \"0\");\r\n formatted = fracPart ? `${paddedInt}${decimalSeparator}${fracPart}` : paddedInt;\r\n }\r\n\r\n localRef.current.textContent = formatted;\r\n }\r\n });\r\n return () => unsubscribe();\r\n }, [springVal, decimals, padStart, number, decimalSeparator]);\r\n\r\n const finalIntLength = Math.floor(Math.abs(number)).toString().length;\r\n const suffix = decimals > 0 ? `${decimalSeparator}${\"0\".repeat(decimals)}` : \"\";\r\n const initialText = padStart ? `${\"0\".padStart(finalIntLength, \"0\")}${suffix}` : `0${suffix}`;\r\n\r\n return (\r\n <span\r\n ref={localRef}\r\n className={className}\r\n {...props}>\r\n {initialText}\r\n </span>\r\n );\r\n },\r\n);\r\n\r\nCountingNumber.displayName = \"CountingNumber\";\r\n\r\nexport {CountingNumber, type CountingNumberProps};\r\n"],"names":["CountingNumber","React","number","fromNumber","padStart","inView","inViewMargin","inViewOnce","decimalSeparator","transition","decimalPlaces","className","props","ref","localRef","numberStr","decimals","motionVal","useMotionValue","springVal","useSpring","inViewResult","useInView","isInView","unsubscribe","latest","formatted","Math","finalIntLength","intPart","fracPart","paddedInt","suffix","initialText"],"mappings":";;;;AAiBA,MAAMA,iBAAiB,WAAjBA,GAAiBC,WACrB,CACE,EACEC,MAAM,EACNC,aAAa,CAAC,EACdC,WAAW,KAAK,EAChBC,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AAO,CAAC,WAAW,GAAGY;YACjC;QACF;QACA,OAAO,IAAMF;IACf,GAAG;QAACL;QAAWH;QAAUZ;QAAUF;QAAQM;KAAiB;IAE5D,MAAMoB,iBAAiBD,KAAK,KAAK,CAACA,KAAK,GAAG,CAACzB,SAAS,QAAQ,GAAG,MAAM;IACrE,MAAM8B,SAAShB,WAAW,IAAI,GAAGR,mBAAmB,IAAI,MAAM,CAACQ,WAAW,GAAG;IAC7E,MAAMiB,cAAc7B,WAAW,GAAG,IAAI,QAAQ,CAACwB,gBAAgB,OAAOI,QAAQ,GAAG,CAAC,CAAC,EAAEA,QAAQ;IAE7F,OAAO,WAAP,GACE,IAAC;QACC,KAAKlB;QACL,WAAWH;QACV,GAAGC,KAAK;kBACRqB;;AAGP;AAGFjC,eAAe,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\dialog.js","sources":["webpack://@arolariu/components/./src/components/ui/dialog.tsx"],"sourcesContent":["\r\n\r\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\r\nimport {X} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Dialog = DialogPrimitive.Root;\r\n\r\nconst DialogTrigger = DialogPrimitive.Trigger;\r\n\r\nconst DialogPortal = DialogPrimitive.Portal;\r\n\r\nconst DialogClose = DialogPrimitive.Close;\r\n\r\nconst DialogOverlay = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Overlay>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\r\n>(({className, ...props}, ref) => (\r\n <DialogPrimitive.Overlay\r\n ref={ref}\r\n className={cn(\r\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-black/80\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\r\n\r\nconst DialogContent = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\r\n>(({className, children, ...props}, ref) => (\r\n <DialogPortal>\r\n <DialogOverlay />\r\n <DialogPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950\",\r\n className,\r\n )}\r\n {...props}>\r\n {children}\r\n <DialogPrimitive.Close className='absolute top-4 right-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400'>\r\n <X className='h-4 w-4' />\r\n <span className='sr-only'>Close</span>\r\n </DialogPrimitive.Close>\r\n </DialogPrimitive.Content>\r\n </DialogPortal>\r\n));\r\nDialogContent.displayName = DialogPrimitive.Content.displayName;\r\n\r\nconst DialogHeader = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"flex flex-col space-y-1.5 text-center sm:text-left\", className)}\r\n {...props}\r\n />\r\n);\r\nDialogHeader.displayName = \"DialogHeader\";\r\n\r\nconst DialogFooter = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\r\n {...props}\r\n />\r\n);\r\nDialogFooter.displayName = \"DialogFooter\";\r\n\r\nconst DialogTitle = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Title>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\r\n>(({className, ...props}, ref) => (\r\n <DialogPrimitive.Title\r\n ref={ref}\r\n className={cn(\"text-lg leading-none font-semibold tracking-tight\", className)}\r\n {...props}\r\n />\r\n));\r\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\r\n\r\nconst DialogDescription = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Description>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\r\n>(({className, ...props}, ref) => (\r\n <DialogPrimitive.Description\r\n ref={ref}\r\n className={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n));\r\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\r\n\r\nexport {\r\n Dialog,\r\n DialogClose,\r\n DialogContent,\r\n DialogDescription,\r\n DialogFooter,\r\n DialogHeader,\r\n DialogOverlay,\r\n DialogPortal,\r\n DialogTitle,\r\n DialogTrigger,\r\n};\r\n"],"names":["Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","React","className","props","ref","cn","DialogContent","children","X","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;;;AAQA,MAAMA,SAASC;AAEf,MAAMC,gBAAgBD;AAEtB,MAAME,eAAeF;AAErB,MAAMG,cAAcH;AAEpB,MAAMI,gBAAgB,WAAhBA,GAAgBC,WAGpB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACR,SAAuB;QACtB,KAAKQ;QACL,WAAWC,GACT,0JACAH;QAED,GAAGC,KAAK;;AAGbH,cAAc,WAAW,GAAGJ,QAAAA,WAAmC;AAE/D,MAAMU,gBAAgB,WAAhBA,GAAgBL,WAGpB,CAAC,EAACC,SAAS,EAAEK,QAAQ,EAAE,GAAGJ,OAAM,EAAEC,MAAAA,WAAAA,GAClC,KAACN,cAAAA;;0BACC,IAACE,eAAAA,CAAAA;0BACD,KAACJ,SAAuB;gBACtB,KAAKQ;gBACL,WAAWC,GACT,yjBACAH;gBAED,GAAGC,KAAK;;oBACRI;kCACD,KAACX,OAAqB;wBAAC,WAAU;;0CAC/B,IAACY,GAACA;gCAAC,WAAU;;0CACb,IAAC;gCAAK,WAAU;0CAAU;;;;;;;;AAKlCF,cAAc,WAAW,GAAGV,QAAAA,WAAmC;AAE/D,MAAMa,eAAe,CAAC,EAACP,SAAS,EAAE,GAAGC,OAA4C,iBAC/E,IAAC;QACC,WAAWE,GAAG,sDAAsDH;QACnE,GAAGC,KAAK;;AAGbM,aAAa,WAAW,GAAG;AAE3B,MAAMC,eAAe,CAAC,EAACR,SAAS,EAAE,GAAGC,OAA4C,iBAC/E,IAAC;QACC,WAAWE,GAAG,iEAAiEH;QAC9E,GAAGC,KAAK;;AAGbO,aAAa,WAAW,GAAG;AAE3B,MAAMC,cAAc,WAAdA,GAAcV,WAGlB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACR,OAAqB;QACpB,KAAKQ;QACL,WAAWC,GAAG,qDAAqDH;QAClE,GAAGC,KAAK;;AAGbQ,YAAY,WAAW,GAAGf,MAAAA,WAAiC;AAE3D,MAAMgB,oBAAoB,WAApBA,GAAoBX,WAGxB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACR,aAA2B;QAC1B,KAAKQ;QACL,WAAWC,GAAG,kDAAkDH;QAC/D,GAAGC,KAAK;;AAGbS,kBAAkB,WAAW,GAAGhB,YAAAA,WAAuC"}
1
+ {"version":3,"file":"components/ui/dialog.js","sources":["../../../src/components/ui/dialog.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\r\nimport {X} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Dialog = DialogPrimitive.Root;\r\n\r\nconst DialogTrigger = DialogPrimitive.Trigger;\r\n\r\nconst DialogPortal = DialogPrimitive.Portal;\r\n\r\nconst DialogClose = DialogPrimitive.Close;\r\n\r\nconst DialogOverlay = React.forwardRef<\r\n React.ComponentRef<typeof DialogPrimitive.Overlay>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\r\n>(({className, ...props}, ref) => (\r\n <DialogPrimitive.Overlay\r\n ref={ref}\r\n className={cn(\r\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-black/80\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\r\n\r\nconst DialogContent = React.forwardRef<\r\n React.ComponentRef<typeof DialogPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\r\n>(({className, children, ...props}, ref) => (\r\n <DialogPortal>\r\n <DialogOverlay />\r\n <DialogPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950\",\r\n className,\r\n )}\r\n {...props}>\r\n {children}\r\n <DialogPrimitive.Close className='absolute top-4 right-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400'>\r\n <X className='h-4 w-4' />\r\n <span className='sr-only'>Close</span>\r\n </DialogPrimitive.Close>\r\n </DialogPrimitive.Content>\r\n </DialogPortal>\r\n));\r\nDialogContent.displayName = DialogPrimitive.Content.displayName;\r\n\r\nconst DialogHeader = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"flex flex-col space-y-1.5 text-center sm:text-left\", className)}\r\n {...props}\r\n />\r\n);\r\nDialogHeader.displayName = \"DialogHeader\";\r\n\r\nconst DialogFooter = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\r\n {...props}\r\n />\r\n);\r\nDialogFooter.displayName = \"DialogFooter\";\r\n\r\nconst DialogTitle = React.forwardRef<\r\n React.ComponentRef<typeof DialogPrimitive.Title>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\r\n>(({className, ...props}, ref) => (\r\n <DialogPrimitive.Title\r\n ref={ref}\r\n className={cn(\"text-lg leading-none font-semibold tracking-tight\", className)}\r\n {...props}\r\n />\r\n));\r\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\r\n\r\nconst DialogDescription = React.forwardRef<\r\n React.ComponentRef<typeof DialogPrimitive.Description>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\r\n>(({className, ...props}, ref) => (\r\n <DialogPrimitive.Description\r\n ref={ref}\r\n className={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n));\r\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\r\n\r\nexport {\r\n Dialog,\r\n DialogClose,\r\n DialogContent,\r\n DialogDescription,\r\n DialogFooter,\r\n DialogHeader,\r\n DialogOverlay,\r\n DialogPortal,\r\n DialogTitle,\r\n DialogTrigger,\r\n};\r\n"],"names":["Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","React","className","props","ref","cn","DialogContent","children","X","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;;;AAQA,MAAMA,SAASC;AAEf,MAAMC,gBAAgBD;AAEtB,MAAME,eAAeF;AAErB,MAAMG,cAAcH;AAEpB,MAAMI,gBAAgB,WAAhBA,GAAgBC,WAGpB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACR,SAAuB;QACtB,KAAKQ;QACL,WAAWC,GACT,0JACAH;QAED,GAAGC,KAAK;;AAGbH,cAAc,WAAW,GAAGJ,QAAAA,WAAmC;AAE/D,MAAMU,gBAAgB,WAAhBA,GAAgBL,WAGpB,CAAC,EAACC,SAAS,EAAEK,QAAQ,EAAE,GAAGJ,OAAM,EAAEC,MAAAA,WAAAA,GAClC,KAACN,cAAAA;;0BACC,IAACE,eAAAA,CAAAA;0BACD,KAACJ,SAAuB;gBACtB,KAAKQ;gBACL,WAAWC,GACT,yjBACAH;gBAED,GAAGC,KAAK;;oBACRI;kCACD,KAACX,OAAqB;wBAAC,WAAU;;0CAC/B,IAACY,GAACA;gCAAC,WAAU;;0CACb,IAAC;gCAAK,WAAU;0CAAU;;;;;;;;AAKlCF,cAAc,WAAW,GAAGV,QAAAA,WAAmC;AAE/D,MAAMa,eAAe,CAAC,EAACP,SAAS,EAAE,GAAGC,OAA4C,iBAC/E,IAAC;QACC,WAAWE,GAAG,sDAAsDH;QACnE,GAAGC,KAAK;;AAGbM,aAAa,WAAW,GAAG;AAE3B,MAAMC,eAAe,CAAC,EAACR,SAAS,EAAE,GAAGC,OAA4C,iBAC/E,IAAC;QACC,WAAWE,GAAG,iEAAiEH;QAC9E,GAAGC,KAAK;;AAGbO,aAAa,WAAW,GAAG;AAE3B,MAAMC,cAAc,WAAdA,GAAcV,WAGlB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACR,OAAqB;QACpB,KAAKQ;QACL,WAAWC,GAAG,qDAAqDH;QAClE,GAAGC,KAAK;;AAGbQ,YAAY,WAAW,GAAGf,MAAAA,WAAiC;AAE3D,MAAMgB,oBAAoB,WAApBA,GAAoBX,WAGxB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACR,aAA2B;QAC1B,KAAKQ;QACL,WAAWC,GAAG,kDAAkDH;QAC/D,GAAGC,KAAK;;AAGbS,kBAAkB,WAAW,GAAGhB,YAAAA,WAAuC"}
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\dot-background.js","sources":["webpack://@arolariu/components/./src/components/ui/dot-background.tsx"],"sourcesContent":["\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport {motion} from \"motion/react\";\r\nimport React, {useEffect, useId, useRef, useState} from \"react\";\r\n\r\n/**\r\n * DotBackground Component Props\r\n * @param width The horizontal spacing between dots\r\n * @param height The vertical spacing between dots\r\n * @param x The x-offset of the entire pattern\r\n * @param y The y-offset of the entire pattern\r\n * @param cx The x-offset of individual dots\r\n * @param cy The y-offset of individual dots\r\n * @param cr The radius of each dot\r\n * @param className Additional CSS classes to apply to the SVG container\r\n * @param glow Whether dots should have a glowing animation effect\r\n */\r\ninterface DotBackgroundProps extends React.SVGProps<SVGSVGElement> {\r\n width?: number;\r\n height?: number;\r\n x?: number;\r\n y?: number;\r\n cx?: number;\r\n cy?: number;\r\n cr?: number;\r\n className?: string;\r\n glow?: boolean;\r\n [key: string]: unknown;\r\n}\r\n\r\n/**\r\n * DotBackground Component\r\n * A React component that creates an animated or static dot pattern background using SVG.\r\n * The pattern automatically adjusts to fill its container and can optionally display glowing dots.\r\n * @see DotBackgroundProps for the props interface.\r\n * @example\r\n * // Basic usage\r\n * <DotBackground />\r\n *\r\n * // With glowing effect and custom spacing\r\n * <DotBackground\r\n * width={20}\r\n * height={20}\r\n * glow={true}\r\n * className=\"opacity-50\"\r\n * />\r\n *@summary Summary:\r\n * - The component is client-side only (\"use client\")\r\n * - Automatically responds to container size changes\r\n * - When glow is enabled, dots will animate with random delays and durations\r\n * - Uses Motion for animations\r\n * - Dots color can be controlled via the text color utility classes\r\n */\r\n\r\nexport function DotBackground({\r\n width = 16,\r\n height = 16,\r\n x = 0,\r\n y = 0,\r\n cx = 1,\r\n cy = 1,\r\n cr = 1,\r\n className,\r\n glow = false,\r\n ...props\r\n}: DotBackgroundProps) {\r\n const id = useId();\r\n const containerRef = useRef<SVGSVGElement>(null);\r\n const [dimensions, setDimensions] = useState({width: 0, height: 0});\r\n\r\n useEffect(() => {\r\n const updateDimensions = () => {\r\n if (containerRef.current) {\r\n const {width, height} = containerRef.current.getBoundingClientRect();\r\n setDimensions({width, height});\r\n }\r\n };\r\n\r\n updateDimensions();\r\n window.addEventListener(\"resize\", updateDimensions);\r\n return () => window.removeEventListener(\"resize\", updateDimensions);\r\n }, []);\r\n\r\n const dots = Array.from(\r\n {\r\n length: Math.ceil(dimensions.width / width) * Math.ceil(dimensions.height / height),\r\n },\r\n (_, i) => {\r\n const col = i % Math.ceil(dimensions.width / width);\r\n const row = Math.floor(i / Math.ceil(dimensions.width / width));\r\n return {\r\n x: col * width + cx,\r\n y: row * height + cy,\r\n delay: Math.random() * 5,\r\n duration: Math.random() * 3 + 2,\r\n };\r\n },\r\n );\r\n\r\n return (\r\n <svg\r\n ref={containerRef}\r\n aria-hidden='true'\r\n className={cn(\"pointer-events-none absolute inset-0 h-full w-full\", className)}\r\n {...props}>\r\n <defs>\r\n <radialGradient id={`${id}-gradient`}>\r\n <stop\r\n offset='0%'\r\n stopColor='currentColor'\r\n stopOpacity='1'\r\n />\r\n <stop\r\n offset='100%'\r\n stopColor='currentColor'\r\n stopOpacity='0'\r\n />\r\n </radialGradient>\r\n </defs>\r\n {dots.map((dot) => (\r\n <motion.circle\r\n key={`${dot.x}-${dot.y}`}\r\n cx={dot.x}\r\n cy={dot.y}\r\n r={cr}\r\n fill={glow ? `url(#${id}-gradient)` : \"currentColor\"}\r\n className='text-neutral-400/80'\r\n initial={glow ? {opacity: 0.4, scale: 1} : {}}\r\n animate={\r\n glow\r\n ? {\r\n opacity: [0.4, 1, 0.4],\r\n scale: [1, 1.5, 1],\r\n }\r\n : {}\r\n }\r\n transition={\r\n glow\r\n ? {\r\n duration: dot.duration,\r\n repeat: Infinity,\r\n repeatType: \"reverse\",\r\n delay: dot.delay,\r\n ease: \"easeInOut\",\r\n }\r\n : {}\r\n }\r\n />\r\n ))}\r\n </svg>\r\n );\r\n}\r\n"],"names":["DotBackground","width","height","x","y","cx","cy","cr","className","glow","props","id","useId","containerRef","useRef","dimensions","setDimensions","useState","useEffect","updateDimensions","window","dots","Array","Math","_","i","col","row","cn","dot","motion","Infinity"],"mappings":";;;;;AAuDO,SAASA,cAAc,EAC5BC,QAAQ,EAAE,EACVC,SAAS,EAAE,EACXC,IAAI,CAAC,EACLC,IAAI,CAAC,EACLC,KAAK,CAAC,EACNC,KAAK,CAAC,EACNC,KAAK,CAAC,EACNC,SAAS,EACTC,OAAO,KAAK,EACZ,GAAGC,OACgB;IACnB,MAAMC,KAAKC;IACX,MAAMC,eAAeC,OAAsB;IAC3C,MAAM,CAACC,YAAYC,cAAc,GAAGC,SAAS;QAAC,OAAO;QAAG,QAAQ;IAAC;IAEjEC,UAAU;QACR,MAAMC,mBAAmB;YACvB,IAAIN,aAAa,OAAO,EAAE;gBACxB,MAAM,EAACZ,KAAK,EAAEC,MAAM,EAAC,GAAGW,aAAa,OAAO,CAAC,qBAAqB;gBAClEG,cAAc;oBAACf;oBAAOC;gBAAM;YAC9B;QACF;QAEAiB;QACAC,OAAO,gBAAgB,CAAC,UAAUD;QAClC,OAAO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tB,QAAQE;wBACR,YAAY;wBACZ,OAAOF,IAAI,KAAK;wBAChB,MAAM;oBACR,IACA,CAAC;mBAxBF,GAAGA,IAAI,CAAC,CAAC,CAAC,EAAEA,IAAI,CAAC,EAAE;;;AA8BlC"}
1
+ {"version":3,"file":"components/ui/dot-background.js","sources":["../../../src/components/ui/dot-background.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport {motion} from \"motion/react\";\r\nimport React, {useEffect, useId, useRef, useState} from \"react\";\r\n\r\n/**\r\n * DotBackground Component Props\r\n * @param width The horizontal spacing between dots\r\n * @param height The vertical spacing between dots\r\n * @param x The x-offset of the entire pattern\r\n * @param y The y-offset of the entire pattern\r\n * @param cx The x-offset of individual dots\r\n * @param cy The y-offset of individual dots\r\n * @param cr The radius of each dot\r\n * @param className Additional CSS classes to apply to the SVG container\r\n * @param glow Whether dots should have a glowing animation effect\r\n */\r\ninterface DotBackgroundProps extends React.SVGProps<SVGSVGElement> {\r\n width?: number;\r\n height?: number;\r\n x?: number;\r\n y?: number;\r\n cx?: number;\r\n cy?: number;\r\n cr?: number;\r\n className?: string;\r\n glow?: boolean;\r\n [key: string]: unknown;\r\n}\r\n\r\n/**\r\n * DotBackground Component\r\n * A React component that creates an animated or static dot pattern background using SVG.\r\n * The pattern automatically adjusts to fill its container and can optionally display glowing dots.\r\n * @see DotBackgroundProps for the props interface.\r\n * @example\r\n * // Basic usage\r\n * <DotBackground />\r\n *\r\n * // With glowing effect and custom spacing\r\n * <DotBackground\r\n * width={20}\r\n * height={20}\r\n * glow={true}\r\n * className=\"opacity-50\"\r\n * />\r\n *@summary Summary:\r\n * - The component is client-side only (\"use client\")\r\n * - Automatically responds to container size changes\r\n * - When glow is enabled, dots will animate with random delays and durations\r\n * - Uses Motion for animations\r\n * - Dots color can be controlled via the text color utility classes\r\n */\r\n\r\nexport function DotBackground({\r\n width = 16,\r\n height = 16,\r\n x = 0,\r\n y = 0,\r\n cx = 1,\r\n cy = 1,\r\n cr = 1,\r\n className,\r\n glow = false,\r\n ...props\r\n}: DotBackgroundProps) {\r\n const id = useId();\r\n const containerRef = useRef<SVGSVGElement>(null);\r\n const [dimensions, setDimensions] = useState({width: 0, height: 0});\r\n\r\n useEffect(() => {\r\n const updateDimensions = () => {\r\n if (containerRef.current) {\r\n const {width, height} = containerRef.current.getBoundingClientRect();\r\n setDimensions({width, height});\r\n }\r\n };\r\n\r\n updateDimensions();\r\n window.addEventListener(\"resize\", updateDimensions);\r\n return () => window.removeEventListener(\"resize\", updateDimensions);\r\n }, []);\r\n\r\n const dots = Array.from(\r\n {\r\n length: Math.ceil(dimensions.width / width) * Math.ceil(dimensions.height / height),\r\n },\r\n (_, i) => {\r\n const col = i % Math.ceil(dimensions.width / width);\r\n const row = Math.floor(i / Math.ceil(dimensions.width / width));\r\n return {\r\n x: col * width + cx,\r\n y: row * height + cy,\r\n delay: Math.random() * 5,\r\n duration: Math.random() * 3 + 2,\r\n };\r\n },\r\n );\r\n\r\n return (\r\n <svg\r\n ref={containerRef}\r\n aria-hidden='true'\r\n className={cn(\"pointer-events-none absolute inset-0 h-full w-full\", className)}\r\n {...props}>\r\n <defs>\r\n <radialGradient id={`${id}-gradient`}>\r\n <stop\r\n offset='0%'\r\n stopColor='currentColor'\r\n stopOpacity='1'\r\n />\r\n <stop\r\n offset='100%'\r\n stopColor='currentColor'\r\n stopOpacity='0'\r\n />\r\n </radialGradient>\r\n </defs>\r\n {dots.map((dot) => (\r\n <motion.circle\r\n key={`${dot.x}-${dot.y}`}\r\n cx={dot.x}\r\n cy={dot.y}\r\n r={cr}\r\n fill={glow ? `url(#${id}-gradient)` : \"currentColor\"}\r\n className='text-neutral-400/80'\r\n initial={glow ? {opacity: 0.4, scale: 1} : {}}\r\n animate={\r\n glow\r\n ? {\r\n opacity: [0.4, 1, 0.4],\r\n scale: [1, 1.5, 1],\r\n }\r\n : {}\r\n }\r\n transition={\r\n glow\r\n ? {\r\n duration: dot.duration,\r\n repeat: Infinity,\r\n repeatType: \"reverse\",\r\n delay: dot.delay,\r\n ease: \"easeInOut\",\r\n }\r\n : {}\r\n }\r\n />\r\n ))}\r\n </svg>\r\n );\r\n}\r\n"],"names":["DotBackground","width","height","x","y","cx","cy","cr","className","glow","props","id","useId","containerRef","useRef","dimensions","setDimensions","useState","useEffect","updateDimensions","window","dots","Array","Math","_","i","col","row","cn","dot","motion","Infinity"],"mappings":";;;;;AAuDO,SAASA,cAAc,EAC5BC,QAAQ,EAAE,EACVC,SAAS,EAAE,EACXC,IAAI,CAAC,EACLC,IAAI,CAAC,EACLC,KAAK,CAAC,EACNC,KAAK,CAAC,EACNC,KAAK,CAAC,EACNC,SAAS,EACTC,OAAO,KAAK,EACZ,GAAGC,OACgB;IACnB,MAAMC,KAAKC;IACX,MAAMC,eAAeC,OAAsB;IAC3C,MAAM,CAACC,YAAYC,cAAc,GAAGC,SAAS;QAAC,OAAO;QAAG,QAAQ;IAAC;IAEjEC,UAAU;QACR,MAAMC,mBAAmB;YACvB,IAAIN,aAAa,OAAO,EAAE;gBACxB,MAAM,EAACZ,KAAK,EAAEC,MAAM,EAAC,GAAGW,aAAa,OAAO,CAAC,qBAAqB;gBAClEG,cAAc;oBAACf;oBAAOC;gBAAM;YAC9B;QACF;QAEAiB;QACAC,OAAO,gBAAgB,CAAC,UAAUD;QAClC,OAAO,IAAMC,OAAO,mBAAmB,CAAC,UAAUD;IACpD,GAAG,EAAE;IAEL,MAAME,OAAOC,MAAM,IAAI,CACrB;QACE,QAAQC,KAAK,IAAI,CAACR,WAAW,KAAK,GAAGd,SAASsB,KAAK,IAAI,CAACR,WAAW,MAAM,GAAGb;IAC9E,GACA,CAACsB,GAAGC;QACF,MAAMC,MAAMD,IAAIF,KAAK,IAAI,CAACR,WAAW,KAAK,GAAGd;QAC7C,MAAM0B,MAAMJ,KAAK,KAAK,CAACE,IAAIF,KAAK,IAAI,CAACR,WAAW,KAAK,GAAGd;QACxD,OAAO;YACL,GAAGyB,MAAMzB,QAAQI;YACjB,GAAGsB,MAAMzB,SAASI;YAClB,OAAOiB,AAAgB,IAAhBA,KAAK,MAAM;YAClB,UAAUA,AAAgB,IAAhBA,KAAK,MAAM,KAAS;QAChC;IACF;IAGF,OAAO,WAAP,GACE,KAAC;QACC,KAAKV;QACL,eAAY;QACZ,WAAWe,GAAG,sDAAsDpB;QACnE,GAAGE,KAAK;;0BACT,IAAC;0BACC,mBAAC;oBAAe,IAAI,GAAGC,GAAG,SAAS,CAAC;;sCAClC,IAAC;4BACC,QAAO;4BACP,WAAU;4BACV,aAAY;;sCAEd,IAAC;4BACC,QAAO;4BACP,WAAU;4BACV,aAAY;;;;;YAIjBU,KAAK,GAAG,CAAC,CAACQ,MAAAA,WAAAA,GACT,IAACC,OAAO,MAAM;oBAEZ,IAAID,IAAI,CAAC;oBACT,IAAIA,IAAI,CAAC;oBACT,GAAGtB;oBACH,MAAME,OAAO,CAAC,KAAK,EAAEE,GAAG,UAAU,CAAC,GAAG;oBACtC,WAAU;oBACV,SAASF,OAAO;wBAAC,SAAS;wBAAK,OAAO;oBAAC,IAAI,CAAC;oBAC5C,SACEA,OACI;wBACE,SAAS;4BAAC;4BAAK;4BAAG;yBAAI;wBACtB,OAAO;4BAAC;4BAAG;4BAAK;yBAAE;oBACpB,IACA,CAAC;oBAEP,YACEA,OACI;wBACE,UAAUoB,IAAI,QAAQ;wBACtB,QAAQE;wBACR,YAAY;wBACZ,OAAOF,IAAI,KAAK;wBAChB,MAAM;oBACR,IACA,CAAC;mBAxBF,GAAGA,IAAI,CAAC,CAAC,CAAC,EAAEA,IAAI,CAAC,EAAE;;;AA8BlC"}
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\drawer.js","sources":["webpack://@arolariu/components/./src/components/ui/drawer.tsx"],"sourcesContent":["\r\n\r\nimport * as React from \"react\";\r\nimport {Drawer as DrawerPrimitive} from \"vaul\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Drawer = ({shouldScaleBackground = true, ...props}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\r\n <DrawerPrimitive.Root\r\n shouldScaleBackground={shouldScaleBackground}\r\n {...props}\r\n />\r\n);\r\nDrawer.displayName = \"Drawer\";\r\n\r\nconst DrawerTrigger = DrawerPrimitive.Trigger;\r\n\r\nconst DrawerPortal = DrawerPrimitive.Portal;\r\n\r\nconst DrawerClose = DrawerPrimitive.Close;\r\n\r\nconst DrawerOverlay = React.forwardRef<\r\n React.ElementRef<typeof DrawerPrimitive.Overlay>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\r\n>(({className, ...props}, ref) => (\r\n <DrawerPrimitive.Overlay\r\n ref={ref}\r\n className={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\r\n {...props}\r\n />\r\n));\r\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;\r\n\r\nconst DrawerContent = React.forwardRef<\r\n React.ElementRef<typeof DrawerPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\r\n>(({className, children, ...props}, ref) => (\r\n <DrawerPortal>\r\n <DrawerOverlay />\r\n <DrawerPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-950\",\r\n className,\r\n )}\r\n {...props}>\r\n <div className='mx-auto mt-4 h-2 w-[100px] rounded-full bg-neutral-100 dark:bg-neutral-800' />\r\n {children}\r\n </DrawerPrimitive.Content>\r\n </DrawerPortal>\r\n));\r\nDrawerContent.displayName = \"DrawerContent\";\r\n\r\nconst DrawerHeader = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\r\n {...props}\r\n />\r\n);\r\nDrawerHeader.displayName = \"DrawerHeader\";\r\n\r\nconst DrawerFooter = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\r\n {...props}\r\n />\r\n);\r\nDrawerFooter.displayName = \"DrawerFooter\";\r\n\r\nconst DrawerTitle = React.forwardRef<\r\n React.ElementRef<typeof DrawerPrimitive.Title>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\r\n>(({className, ...props}, ref) => (\r\n <DrawerPrimitive.Title\r\n ref={ref}\r\n className={cn(\"text-lg leading-none font-semibold tracking-tight\", className)}\r\n {...props}\r\n />\r\n));\r\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\r\n\r\nconst DrawerDescription = React.forwardRef<\r\n React.ElementRef<typeof DrawerPrimitive.Description>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\r\n>(({className, ...props}, ref) => (\r\n <DrawerPrimitive.Description\r\n ref={ref}\r\n className={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n));\r\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\r\n\r\nexport {\r\n Drawer,\r\n DrawerClose,\r\n DrawerContent,\r\n DrawerDescription,\r\n DrawerFooter,\r\n DrawerHeader,\r\n DrawerOverlay,\r\n DrawerPortal,\r\n DrawerTitle,\r\n DrawerTrigger,\r\n};\r\n"],"names":["Drawer","shouldScaleBackground","props","DrawerPrimitive","DrawerTrigger","DrawerPortal","DrawerClose","DrawerOverlay","React","className","ref","cn","DrawerContent","children","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":";;;;;AAOA,MAAMA,gBAAS,CAAC,EAACC,wBAAwB,IAAI,EAAE,GAAGC,OAAyD,iBACzG,IAACC,OAAAA,IAAoB;QACnB,uBAAuBF;QACtB,GAAGC,KAAK;;AAGbF,cAAO,WAAW,GAAG;AAErB,MAAMI,gBAAgBD,OAAAA,OAAuB;AAE7C,MAAME,eAAeF,OAAAA,MAAsB;AAE3C,MAAMG,cAAcH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,GACxB,IAACP,OAAAA,WAA2B;QAC1B,KAAKO;QACL,WAAWC,GAAG,kDAAkDF;QAC/D,GAAGP,KAAK;;AAGbe,kBAAkB,WAAW,GAAGd,OAAAA,WAAAA,CAAAA,WAAuC"}
1
+ {"version":3,"file":"components/ui/drawer.js","sources":["../../../src/components/ui/drawer.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport {Drawer as DrawerPrimitive} from \"vaul\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Drawer = ({shouldScaleBackground = true, ...props}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\r\n <DrawerPrimitive.Root\r\n shouldScaleBackground={shouldScaleBackground}\r\n {...props}\r\n />\r\n);\r\nDrawer.displayName = \"Drawer\";\r\n\r\nconst DrawerTrigger = DrawerPrimitive.Trigger;\r\n\r\nconst DrawerPortal = DrawerPrimitive.Portal;\r\n\r\nconst DrawerClose = DrawerPrimitive.Close;\r\n\r\nconst DrawerOverlay = React.forwardRef<\r\n React.ComponentRef<typeof DrawerPrimitive.Overlay>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\r\n>(({className, ...props}, ref) => (\r\n <DrawerPrimitive.Overlay\r\n ref={ref}\r\n className={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\r\n {...props}\r\n />\r\n));\r\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;\r\n\r\nconst DrawerContent = React.forwardRef<\r\n React.ComponentRef<typeof DrawerPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\r\n>(({className, children, ...props}, ref) => (\r\n <DrawerPortal>\r\n <DrawerOverlay />\r\n <DrawerPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-950\",\r\n className,\r\n )}\r\n {...props}>\r\n <div className='mx-auto mt-4 h-2 w-[100px] rounded-full bg-neutral-100 dark:bg-neutral-800' />\r\n {children}\r\n </DrawerPrimitive.Content>\r\n </DrawerPortal>\r\n));\r\nDrawerContent.displayName = \"DrawerContent\";\r\n\r\nconst DrawerHeader = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\r\n {...props}\r\n />\r\n);\r\nDrawerHeader.displayName = \"DrawerHeader\";\r\n\r\nconst DrawerFooter = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\r\n {...props}\r\n />\r\n);\r\nDrawerFooter.displayName = \"DrawerFooter\";\r\n\r\nconst DrawerTitle = React.forwardRef<\r\n React.ComponentRef<typeof DrawerPrimitive.Title>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\r\n>(({className, ...props}, ref) => (\r\n <DrawerPrimitive.Title\r\n ref={ref}\r\n className={cn(\"text-lg leading-none font-semibold tracking-tight\", className)}\r\n {...props}\r\n />\r\n));\r\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\r\n\r\nconst DrawerDescription = React.forwardRef<\r\n React.ComponentRef<typeof DrawerPrimitive.Description>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\r\n>(({className, ...props}, ref) => (\r\n <DrawerPrimitive.Description\r\n ref={ref}\r\n className={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n));\r\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\r\n\r\nexport {\r\n Drawer,\r\n DrawerClose,\r\n DrawerContent,\r\n DrawerDescription,\r\n DrawerFooter,\r\n DrawerHeader,\r\n DrawerOverlay,\r\n DrawerPortal,\r\n DrawerTitle,\r\n DrawerTrigger,\r\n};\r\n"],"names":["Drawer","shouldScaleBackground","props","DrawerPrimitive","DrawerTrigger","DrawerPortal","DrawerClose","DrawerOverlay","React","className","ref","cn","DrawerContent","children","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":";;;;;AAOA,MAAMA,gBAAS,CAAC,EAACC,wBAAwB,IAAI,EAAE,GAAGC,OAAyD,iBACzG,IAACC,OAAAA,IAAoB;QACnB,uBAAuBF;QACtB,GAAGC,KAAK;;AAGbF,cAAO,WAAW,GAAG;AAErB,MAAMI,gBAAgBD,OAAAA,OAAuB;AAE7C,MAAME,eAAeF,OAAAA,MAAsB;AAE3C,MAAMG,cAAcH,OAAAA,KAAqB;AAEzC,MAAMI,gBAAgB,WAAhBA,GAAgBC,WAGpB,CAAC,EAACC,SAAS,EAAE,GAAGP,OAAM,EAAEQ,MAAAA,WAAAA,GACxB,IAACP,OAAAA,OAAuB;QACtB,KAAKO;QACL,WAAWC,GAAG,kCAAkCF;QAC/C,GAAGP,KAAK;;AAGbK,cAAc,WAAW,GAAGJ,OAAAA,OAAAA,CAAAA,WAAmC;AAE/D,MAAMS,gBAAgB,WAAhBA,GAAgBJ,WAGpB,CAAC,EAACC,SAAS,EAAEI,QAAQ,EAAE,GAAGX,OAAM,EAAEQ,MAAAA,WAAAA,GAClC,KAACL,cAAAA;;0BACC,IAACE,eAAAA,CAAAA;0BACD,KAACJ,OAAAA,OAAuB;gBACtB,KAAKO;gBACL,WAAWC,GACT,4JACAF;gBAED,GAAGP,KAAK;;kCACT,IAAC;wBAAI,WAAU;;oBACdW;;;;;AAIPD,cAAc,WAAW,GAAG;AAE5B,MAAME,eAAe,CAAC,EAACL,SAAS,EAAE,GAAGP,OAA4C,iBAC/E,IAAC;QACC,WAAWS,GAAG,6CAA6CF;QAC1D,GAAGP,KAAK;;AAGbY,aAAa,WAAW,GAAG;AAE3B,MAAMC,eAAe,CAAC,EAACN,SAAS,EAAE,GAAGP,OAA4C,iBAC/E,IAAC;QACC,WAAWS,GAAG,mCAAmCF;QAChD,GAAGP,KAAK;;AAGba,aAAa,WAAW,GAAG;AAE3B,MAAMC,cAAc,WAAdA,GAAcR,WAGlB,CAAC,EAACC,SAAS,EAAE,GAAGP,OAAM,EAAEQ,MAAAA,WAAAA,GACxB,IAACP,OAAAA,KAAqB;QACpB,KAAKO;QACL,WAAWC,GAAG,qDAAqDF;QAClE,GAAGP,KAAK;;AAGbc,YAAY,WAAW,GAAGb,OAAAA,KAAAA,CAAAA,WAAiC;AAE3D,MAAMc,oBAAoB,WAApBA,GAAoBT,WAGxB,CAAC,EAACC,SAAS,EAAE,GAAGP,OAAM,EAAEQ,MAAAA,WAAAA,GACxB,IAACP,OAAAA,WAA2B;QAC1B,KAAKO;QACL,WAAWC,GAAG,kDAAkDF;QAC/D,GAAGP,KAAK;;AAGbe,kBAAkB,WAAW,GAAGd,OAAAA,WAAAA,CAAAA,WAAuC"}
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\dropdown-menu.js","sources":["webpack://@arolariu/components/./src/components/ui/dropdown-menu.tsx"],"sourcesContent":["\r\n\r\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\r\nimport {Check, ChevronRight, Circle} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst DropdownMenu = DropdownMenuPrimitive.Root;\r\n\r\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\r\n\r\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\r\n\r\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\r\n\r\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\r\n\r\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\r\n\r\nconst DropdownMenuSubTrigger = React.forwardRef<\r\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, children, ...props}, ref) => (\r\n <DropdownMenuPrimitive.SubTrigger\r\n ref={ref}\r\n className={cn(\r\n \"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 data-[state=open]:bg-neutral-100 dark:focus:bg-neutral-800 dark:data-[state=open]:bg-neutral-800 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}>\r\n {children}\r\n <ChevronRight className='ml-auto' />\r\n </DropdownMenuPrimitive.SubTrigger>\r\n));\r\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\r\n\r\nconst DropdownMenuSubContent = React.forwardRef<\r\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\r\n>(({className, ...props}, ref) => (\r\n <DropdownMenuPrimitive.SubContent\r\n ref={ref}\r\n className={cn(\r\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 z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\r\n\r\nconst DropdownMenuContent = React.forwardRef<\r\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\r\n>(({className, sideOffset = 4, ...props}, ref) => (\r\n <DropdownMenuPrimitive.Portal>\r\n <DropdownMenuPrimitive.Content\r\n ref={ref}\r\n sideOffset={sideOffset}\r\n className={cn(\r\n \"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\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 origin-[--radix-dropdown-menu-content-transform-origin]\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </DropdownMenuPrimitive.Portal>\r\n));\r\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\r\n\r\nconst DropdownMenuItem = React.forwardRef<\r\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <DropdownMenuPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 [&>svg]:size-4 [&>svg]:shrink-0\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\r\n\r\nconst DropdownMenuCheckboxItem = React.forwardRef<\r\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\r\n>(({className, children, checked, ...props}, ref) => (\r\n <DropdownMenuPrimitive.CheckboxItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n checked={checked}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <DropdownMenuPrimitive.ItemIndicator>\r\n <Check className='h-4 w-4' />\r\n </DropdownMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </DropdownMenuPrimitive.CheckboxItem>\r\n));\r\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\r\n\r\nconst DropdownMenuRadioItem = React.forwardRef<\r\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\r\n>(({className, children, ...props}, ref) => (\r\n <DropdownMenuPrimitive.RadioItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <DropdownMenuPrimitive.ItemIndicator>\r\n <Circle className='h-2 w-2 fill-current' />\r\n </DropdownMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </DropdownMenuPrimitive.RadioItem>\r\n));\r\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\r\n\r\nconst DropdownMenuLabel = React.forwardRef<\r\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <DropdownMenuPrimitive.Label\r\n ref={ref}\r\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", inset && \"pl-8\", className)}\r\n {...props}\r\n />\r\n));\r\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\r\n\r\nconst DropdownMenuSeparator = React.forwardRef<\r\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\r\n>(({className, ...props}, ref) => (\r\n <DropdownMenuPrimitive.Separator\r\n ref={ref}\r\n className={cn(\"-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800\", className)}\r\n {...props}\r\n />\r\n));\r\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\r\n\r\nconst DropdownMenuShortcut = ({className, ...props}: React.HTMLAttributes<HTMLSpanElement>) => {\r\n return (\r\n <span\r\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\r\n\r\nexport {\r\n DropdownMenu,\r\n DropdownMenuCheckboxItem,\r\n DropdownMenuContent,\r\n DropdownMenuGroup,\r\n DropdownMenuItem,\r\n DropdownMenuLabel,\r\n DropdownMenuPortal,\r\n DropdownMenuRadioGroup,\r\n DropdownMenuRadioItem,\r\n DropdownMenuSeparator,\r\n DropdownMenuShortcut,\r\n DropdownMenuSub,\r\n DropdownMenuSubContent,\r\n DropdownMenuSubTrigger,\r\n DropdownMenuTrigger,\r\n};\r\n"],"names":["DropdownMenu","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","React","className","inset","children","props","ref","cn","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMen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E,GAAGG,KAAK;;AAGbc,sBAAsB,WAAW,GAAGzB,UAAAA,WAA2C;AAE/E,MAAM0B,uBAAuB,CAAC,EAAClB,SAAS,EAAE,GAAGG,OAA6C,GACjF,WAAP,GACE,IAAC;QACC,WAAWE,GAAG,8CAA8CL;QAC3D,GAAGG,KAAK;;AAIfe,qBAAqB,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/dropdown-menu.js","sources":["../../../src/components/ui/dropdown-menu.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\r\nimport {Check, ChevronRight, Circle} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst DropdownMenu = DropdownMenuPrimitive.Root;\r\n\r\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\r\n\r\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\r\n\r\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\r\n\r\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\r\n\r\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\r\n\r\nconst DropdownMenuSubTrigger = React.forwardRef<\r\n React.ComponentRef<typeof DropdownMenuPrimitive.SubTrigger>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, children, ...props}, ref) => (\r\n <DropdownMenuPrimitive.SubTrigger\r\n ref={ref}\r\n className={cn(\r\n \"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 data-[state=open]:bg-neutral-100 dark:focus:bg-neutral-800 dark:data-[state=open]:bg-neutral-800 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}>\r\n {children}\r\n <ChevronRight className='ml-auto' />\r\n </DropdownMenuPrimitive.SubTrigger>\r\n));\r\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\r\n\r\nconst DropdownMenuSubContent = React.forwardRef<\r\n React.ComponentRef<typeof DropdownMenuPrimitive.SubContent>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\r\n>(({className, ...props}, ref) => (\r\n <DropdownMenuPrimitive.SubContent\r\n ref={ref}\r\n className={cn(\r\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 z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\r\n\r\nconst DropdownMenuContent = React.forwardRef<\r\n React.ComponentRef<typeof DropdownMenuPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\r\n>(({className, sideOffset = 4, ...props}, ref) => (\r\n <DropdownMenuPrimitive.Portal>\r\n <DropdownMenuPrimitive.Content\r\n ref={ref}\r\n sideOffset={sideOffset}\r\n className={cn(\r\n \"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\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 origin-[--radix-dropdown-menu-content-transform-origin]\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </DropdownMenuPrimitive.Portal>\r\n));\r\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\r\n\r\nconst DropdownMenuItem = React.forwardRef<\r\n React.ComponentRef<typeof DropdownMenuPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <DropdownMenuPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 [&>svg]:size-4 [&>svg]:shrink-0\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\r\n\r\nconst DropdownMenuCheckboxItem = React.forwardRef<\r\n React.ComponentRef<typeof DropdownMenuPrimitive.CheckboxItem>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\r\n>(({className, children, checked, ...props}, ref) => (\r\n <DropdownMenuPrimitive.CheckboxItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n checked={checked}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <DropdownMenuPrimitive.ItemIndicator>\r\n <Check className='h-4 w-4' />\r\n </DropdownMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </DropdownMenuPrimitive.CheckboxItem>\r\n));\r\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\r\n\r\nconst DropdownMenuRadioItem = React.forwardRef<\r\n React.ComponentRef<typeof DropdownMenuPrimitive.RadioItem>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\r\n>(({className, children, ...props}, ref) => (\r\n <DropdownMenuPrimitive.RadioItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <DropdownMenuPrimitive.ItemIndicator>\r\n <Circle className='h-2 w-2 fill-current' />\r\n </DropdownMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </DropdownMenuPrimitive.RadioItem>\r\n));\r\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\r\n\r\nconst DropdownMenuLabel = React.forwardRef<\r\n React.ComponentRef<typeof DropdownMenuPrimitive.Label>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <DropdownMenuPrimitive.Label\r\n ref={ref}\r\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", inset && \"pl-8\", className)}\r\n {...props}\r\n />\r\n));\r\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\r\n\r\nconst DropdownMenuSeparator = React.forwardRef<\r\n React.ComponentRef<typeof DropdownMenuPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\r\n>(({className, ...props}, ref) => (\r\n <DropdownMenuPrimitive.Separator\r\n ref={ref}\r\n className={cn(\"-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800\", className)}\r\n {...props}\r\n />\r\n));\r\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\r\n\r\nconst DropdownMenuShortcut = ({className, ...props}: React.HTMLAttributes<HTMLSpanElement>) => {\r\n return (\r\n <span\r\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\r\n\r\nexport {\r\n DropdownMenu,\r\n DropdownMenuCheckboxItem,\r\n DropdownMenuContent,\r\n DropdownMenuGroup,\r\n DropdownMenuItem,\r\n DropdownMenuLabel,\r\n DropdownMenuPortal,\r\n DropdownMenuRadioGroup,\r\n DropdownMenuRadioItem,\r\n DropdownMenuSeparator,\r\n DropdownMenuShortcut,\r\n DropdownMenuSub,\r\n DropdownMenuSubContent,\r\n DropdownMenuSubTrigger,\r\n DropdownMenuTrigger,\r\n};\r\n"],"names":["DropdownMenu","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","React","className","inset","children","props","ref","cn","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":";;;;;;AAQA,MAAMA,eAAeC;AAErB,MAAMC,sBAAsBD;AAE5B,MAAME,oBAAoBF;AAE1B,MAAMG,qBAAqBH;AAE3B,MAAMI,kBAAkBJ;AAExB,MAAMK,yBAAyBL;AAE/B,MAAMM,yBAAyB,WAAzBA,GAAyBC,WAK7B,CAAC,E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