@codefast/ui 0.0.69 → 0.0.71

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 (182) hide show
  1. package/dist/{chunk-3COHZ24E.cjs → chunk-4OVSEUWU.cjs} +2 -2
  2. package/dist/chunk-4OVSEUWU.cjs.map +1 -0
  3. package/dist/chunk-5RJANBDJ.cjs.map +1 -1
  4. package/dist/{chunk-T3G5USVY.cjs → chunk-7A3KHJJC.cjs} +1 -1
  5. package/dist/chunk-7A3KHJJC.cjs.map +1 -0
  6. package/dist/{chunk-WKKCZQNO.cjs → chunk-AZBLH63J.cjs} +2 -2
  7. package/dist/chunk-AZBLH63J.cjs.map +1 -0
  8. package/dist/{chunk-AVEDWLNQ.js → chunk-E3N5D7SZ.js} +2 -2
  9. package/dist/chunk-E3N5D7SZ.js.map +1 -0
  10. package/dist/{chunk-WQFHFTYS.js → chunk-EAV2D4D7.js} +1 -1
  11. package/dist/chunk-EAV2D4D7.js.map +1 -0
  12. package/dist/{chunk-LOJBMYTH.cjs → chunk-EIQS2H2C.cjs} +1 -1
  13. package/dist/chunk-EIQS2H2C.cjs.map +1 -0
  14. package/dist/chunk-EW7DAPDC.cjs.map +1 -1
  15. package/dist/{chunk-4MTN7WZ2.cjs → chunk-FXS5BSTC.cjs} +1 -1
  16. package/dist/chunk-FXS5BSTC.cjs.map +1 -0
  17. package/dist/{chunk-JMM2MTPI.cjs → chunk-HHCUGAQW.cjs} +1 -1
  18. package/dist/chunk-HHCUGAQW.cjs.map +1 -0
  19. package/dist/{chunk-RBP4PBCK.js → chunk-LGVR62JW.js} +1 -1
  20. package/dist/chunk-LGVR62JW.js.map +1 -0
  21. package/dist/{chunk-VDVLCSO4.js → chunk-MH6I6OV5.js} +2 -2
  22. package/dist/chunk-MH6I6OV5.js.map +1 -0
  23. package/dist/chunk-NU6SK3FC.cjs.map +1 -1
  24. package/dist/{chunk-HDHZESSG.js → chunk-S5JZF45Z.js} +1 -1
  25. package/dist/chunk-S5JZF45Z.js.map +1 -0
  26. package/dist/{chunk-JNOLIDCD.js → chunk-UIYLYEVW.js} +1 -1
  27. package/dist/chunk-UIYLYEVW.js.map +1 -0
  28. package/dist/{chunk-5QETIFO4.js → chunk-WSAUKCX6.js} +1 -1
  29. package/dist/chunk-WSAUKCX6.js.map +1 -0
  30. package/dist/{chunk-6UQKMUZG.cjs → chunk-Z35GXHKF.cjs} +1 -1
  31. package/dist/{chunk-6UQKMUZG.cjs.map → chunk-Z35GXHKF.cjs.map} +1 -1
  32. package/dist/lib/utils.cjs.map +1 -1
  33. package/dist/react/accordion.cjs.map +1 -1
  34. package/dist/react/accordion.js.map +1 -1
  35. package/dist/react/alert-dialog.cjs +1 -1
  36. package/dist/react/alert-dialog.cjs.map +1 -1
  37. package/dist/react/alert-dialog.js +1 -1
  38. package/dist/react/alert-dialog.js.map +1 -1
  39. package/dist/react/alert.cjs.map +1 -1
  40. package/dist/react/alert.js.map +1 -1
  41. package/dist/react/aspect-ratio.cjs.map +1 -1
  42. package/dist/react/avatar.cjs.map +1 -1
  43. package/dist/react/avatar.js.map +1 -1
  44. package/dist/react/badge.cjs.map +1 -1
  45. package/dist/react/blockquote.cjs.map +1 -1
  46. package/dist/react/box.cjs.map +1 -1
  47. package/dist/react/breadcrumb.cjs.map +1 -1
  48. package/dist/react/breadcrumb.js.map +1 -1
  49. package/dist/react/button.cjs +1 -1
  50. package/dist/react/button.cjs.map +1 -1
  51. package/dist/react/button.js +1 -1
  52. package/dist/react/calendar.cjs +1 -1
  53. package/dist/react/calendar.cjs.map +1 -1
  54. package/dist/react/calendar.js +1 -1
  55. package/dist/react/calendar.js.map +1 -1
  56. package/dist/react/card.cjs.map +1 -1
  57. package/dist/react/card.js.map +1 -1
  58. package/dist/react/carousel.cjs +1 -1
  59. package/dist/react/carousel.cjs.map +1 -1
  60. package/dist/react/carousel.js +1 -1
  61. package/dist/react/carousel.js.map +1 -1
  62. package/dist/react/checkbox-cards.cjs.map +1 -1
  63. package/dist/react/checkbox-cards.js.map +1 -1
  64. package/dist/react/checkbox-group.cjs.map +1 -1
  65. package/dist/react/checkbox-group.js.map +1 -1
  66. package/dist/react/checkbox-group.primitive.cjs.map +1 -1
  67. package/dist/react/checkbox.cjs.map +1 -1
  68. package/dist/react/checkbox.js.map +1 -1
  69. package/dist/react/code.cjs.map +1 -1
  70. package/dist/react/collapsible.cjs.map +1 -1
  71. package/dist/react/collapsible.js.map +1 -1
  72. package/dist/react/command.cjs +1 -1
  73. package/dist/react/command.cjs.map +1 -1
  74. package/dist/react/command.js +1 -1
  75. package/dist/react/command.js.map +1 -1
  76. package/dist/react/container.cjs.map +1 -1
  77. package/dist/react/container.js.map +1 -1
  78. package/dist/react/context-menu.cjs.map +1 -1
  79. package/dist/react/context-menu.js.map +1 -1
  80. package/dist/react/data-table.cjs +1 -1
  81. package/dist/react/data-table.cjs.map +1 -1
  82. package/dist/react/data-table.js +1 -1
  83. package/dist/react/data-table.js.map +1 -1
  84. package/dist/react/dialog.cjs +1 -1
  85. package/dist/react/dialog.cjs.map +1 -1
  86. package/dist/react/dialog.js +1 -1
  87. package/dist/react/drawer.cjs.map +1 -1
  88. package/dist/react/drawer.js.map +1 -1
  89. package/dist/react/dropdown-menu.cjs +1 -1
  90. package/dist/react/dropdown-menu.cjs.map +1 -1
  91. package/dist/react/dropdown-menu.js +1 -1
  92. package/dist/react/em.cjs.map +1 -1
  93. package/dist/react/form.cjs +1 -1
  94. package/dist/react/form.cjs.map +1 -1
  95. package/dist/react/form.js +1 -1
  96. package/dist/react/form.js.map +1 -1
  97. package/dist/react/heading.cjs.map +1 -1
  98. package/dist/react/hover-card.cjs.map +1 -1
  99. package/dist/react/hover-card.js.map +1 -1
  100. package/dist/react/input-otp.cjs.map +1 -1
  101. package/dist/react/input-otp.js.map +1 -1
  102. package/dist/react/input.cjs +1 -1
  103. package/dist/react/input.cjs.map +1 -1
  104. package/dist/react/input.js +1 -1
  105. package/dist/react/kbd.cjs.map +1 -1
  106. package/dist/react/kbd.js.map +1 -1
  107. package/dist/react/label.cjs +1 -1
  108. package/dist/react/label.cjs.map +1 -1
  109. package/dist/react/label.js +1 -1
  110. package/dist/react/menubar.cjs.map +1 -1
  111. package/dist/react/menubar.js.map +1 -1
  112. package/dist/react/navigation-menu.cjs.map +1 -1
  113. package/dist/react/navigation-menu.js.map +1 -1
  114. package/dist/react/pagination.cjs +1 -1
  115. package/dist/react/pagination.cjs.map +1 -1
  116. package/dist/react/pagination.js +1 -1
  117. package/dist/react/pagination.js.map +1 -1
  118. package/dist/react/popover.cjs.map +1 -1
  119. package/dist/react/popover.js.map +1 -1
  120. package/dist/react/pre.cjs.map +1 -1
  121. package/dist/react/progress.cjs.map +1 -1
  122. package/dist/react/progress.js.map +1 -1
  123. package/dist/react/quote.cjs.map +1 -1
  124. package/dist/react/radio-cards.cjs.map +1 -1
  125. package/dist/react/radio-cards.js.map +1 -1
  126. package/dist/react/radio-group.cjs.map +1 -1
  127. package/dist/react/radio-group.js.map +1 -1
  128. package/dist/react/radio.cjs.map +1 -1
  129. package/dist/react/radio.js.map +1 -1
  130. package/dist/react/resizable.cjs.map +1 -1
  131. package/dist/react/resizable.js.map +1 -1
  132. package/dist/react/scroll-area.cjs.map +1 -1
  133. package/dist/react/scroll-area.js.map +1 -1
  134. package/dist/react/section.cjs.map +1 -1
  135. package/dist/react/select.cjs +1 -1
  136. package/dist/react/select.cjs.map +1 -1
  137. package/dist/react/select.js +1 -1
  138. package/dist/react/separator.cjs.map +1 -1
  139. package/dist/react/separator.js.map +1 -1
  140. package/dist/react/sheet.cjs.map +1 -1
  141. package/dist/react/sheet.js.map +1 -1
  142. package/dist/react/skeleton.cjs.map +1 -1
  143. package/dist/react/skeleton.js.map +1 -1
  144. package/dist/react/slider.cjs.map +1 -1
  145. package/dist/react/slider.js.map +1 -1
  146. package/dist/react/sonner.cjs.map +1 -1
  147. package/dist/react/spinner.cjs +1 -1
  148. package/dist/react/spinner.cjs.map +1 -1
  149. package/dist/react/spinner.js +1 -1
  150. package/dist/react/strong.cjs.map +1 -1
  151. package/dist/react/switch.cjs.map +1 -1
  152. package/dist/react/switch.js.map +1 -1
  153. package/dist/react/table.cjs.map +1 -1
  154. package/dist/react/table.js.map +1 -1
  155. package/dist/react/tabs.cjs.map +1 -1
  156. package/dist/react/tabs.js.map +1 -1
  157. package/dist/react/text-input.cjs +1 -1
  158. package/dist/react/text-input.cjs.map +1 -1
  159. package/dist/react/text-input.js +1 -1
  160. package/dist/react/text-input.js.map +1 -1
  161. package/dist/react/text.cjs.map +1 -1
  162. package/dist/react/textarea.cjs.map +1 -1
  163. package/dist/react/textarea.js.map +1 -1
  164. package/dist/react/toggle-group.cjs.map +1 -1
  165. package/dist/react/toggle-group.js.map +1 -1
  166. package/dist/react/toggle.cjs.map +1 -1
  167. package/dist/react/tooltip.cjs.map +1 -1
  168. package/dist/react/tooltip.js.map +1 -1
  169. package/package.json +3 -3
  170. package/dist/chunk-3COHZ24E.cjs.map +0 -1
  171. package/dist/chunk-4MTN7WZ2.cjs.map +0 -1
  172. package/dist/chunk-5QETIFO4.js.map +0 -1
  173. package/dist/chunk-AVEDWLNQ.js.map +0 -1
  174. package/dist/chunk-HDHZESSG.js.map +0 -1
  175. package/dist/chunk-JMM2MTPI.cjs.map +0 -1
  176. package/dist/chunk-JNOLIDCD.js.map +0 -1
  177. package/dist/chunk-LOJBMYTH.cjs.map +0 -1
  178. package/dist/chunk-RBP4PBCK.js.map +0 -1
  179. package/dist/chunk-T3G5USVY.cjs.map +0 -1
  180. package/dist/chunk-VDVLCSO4.js.map +0 -1
  181. package/dist/chunk-WKKCZQNO.cjs.map +0 -1
  182. package/dist/chunk-WQFHFTYS.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/text-input.tsx"],"names":["React","jsx","TextInput","className","loading","loaderPosition","prefix","suffix","inputSize","props","ref","Input","InputSlot"],"mappings":"0HAEA,UAAYA,MAAW,QAqBf,cAAAC,MAAA,oBAXR,IAAMC,EAAkB,aACtB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,eAAAC,EAAgB,OAAAC,EAAQ,OAAAC,EAAQ,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAE1ET,EAACU,EAAA,CACC,UAAWR,EACX,UAAWK,EACX,eAAgBH,EAChB,QAASD,EACT,OAAQE,EACR,OAAQC,EAER,SAAAN,EAACW,EAAA,CAAU,IAAKF,EAAM,GAAGD,EAAO,EAClC,CAGN,EAEAP,EAAU,YAAc","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Input, type InputProps, InputSlot, type InputSlotProps } from './input';\n\n/* -----------------------------------------------------------------------------\n * Component: TextInput\n * -------------------------------------------------------------------------- */\n\ntype TextInputElement = HTMLInputElement;\ninterface TextInputProps extends InputProps, Omit<InputSlotProps, 'prefix'> {}\n\nconst TextInput = React.forwardRef<TextInputElement, TextInputProps>(\n ({ className, loading, loaderPosition, prefix, suffix, inputSize, ...props }, ref) => {\n return (\n <Input\n className={className}\n inputSize={inputSize}\n loaderPosition={loaderPosition}\n loading={loading}\n prefix={prefix}\n suffix={suffix}\n >\n <InputSlot ref={ref} {...props} />\n </Input>\n );\n },\n);\n\nTextInput.displayName = 'TextInput';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { TextInput, type TextInputProps };\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/text-input.cjs","../../src/react/text-input.tsx"],"names":["TextInput","className","loading","loaderPosition","prefix","suffix","inputSize","props","ref","jsx","Input","InputSlot"],"mappings":"AAAA,uWAAY,CAAC,yDAAgD,iCAA8B,iCAA8B,uECElG,+CAqBf,IAXFA,CAAAA,CAAkB,CAAA,CAAA,UAAA,CACtB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,OAAA,CAAAC,CAAAA,CAAS,cAAA,CAAAC,CAAAA,CAAgB,MAAA,CAAAC,CAAAA,CAAQ,MAAA,CAAAC,CAAAA,CAAQ,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAE1EC,6BAAAA,mBAACC,CAAA,CACC,SAAA,CAAWT,CAAAA,CACX,SAAA,CAAWK,CAAAA,CACX,cAAA,CAAgBH,CAAAA,CAChB,OAAA,CAASD,CAAAA,CACT,MAAA,CAAQE,CAAAA,CACR,MAAA,CAAQC,CAAAA,CAER,QAAA,CAAAI,6BAAAA,mBAACE,CAAA,CAAU,GAAA,CAAKH,CAAAA,CAAM,GAAGD,CAAAA,CAAO,CAAA,CAClC,CAGN,CAAA,CAEAP,CAAAA,CAAU,WAAA,CAAc,WAAA,CAAA,sBAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/text-input.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport { Input, type InputProps, InputSlot, type InputSlotProps } from '@/react/input';\n\n/* -----------------------------------------------------------------------------\n * Component: TextInput\n * -------------------------------------------------------------------------- */\n\ntype TextInputElement = HTMLInputElement;\ninterface TextInputProps extends InputProps, Omit<InputSlotProps, 'prefix'> {}\n\nconst TextInput = React.forwardRef<TextInputElement, TextInputProps>(\n ({ className, loading, loaderPosition, prefix, suffix, inputSize, ...props }, ref) => {\n return (\n <Input\n className={className}\n inputSize={inputSize}\n loaderPosition={loaderPosition}\n loading={loading}\n prefix={prefix}\n suffix={suffix}\n >\n <InputSlot ref={ref} {...props} />\n </Input>\n );\n },\n);\n\nTextInput.displayName = 'TextInput';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { TextInput, type TextInputProps };\n"]}
@@ -1,2 +1,2 @@
1
- "use client";import{c as t,d as e}from"../chunk-AVEDWLNQ.js";import"../chunk-RBP4PBCK.js";import"../chunk-5UXVZTFG.js";import*as n from"react";import{jsx as p}from"react/jsx-runtime";var a=n.forwardRef(({className:o,loading:r,loaderPosition:u,prefix:s,suffix:I,inputSize:i,...l},x)=>p(t,{className:o,inputSize:i,loaderPosition:u,loading:r,prefix:s,suffix:I,children:p(e,{ref:x,...l})}));a.displayName="TextInput";export{a as TextInput};
1
+ "use client";import{c as t,d as e}from"../chunk-E3N5D7SZ.js";import"../chunk-LGVR62JW.js";import"../chunk-5UXVZTFG.js";import*as n from"react";import{jsx as p}from"react/jsx-runtime";var a=n.forwardRef(({className:o,loading:r,loaderPosition:u,prefix:s,suffix:I,inputSize:i,...l},x)=>p(t,{className:o,inputSize:i,loaderPosition:u,loading:r,prefix:s,suffix:I,children:p(e,{ref:x,...l})}));a.displayName="TextInput";export{a as TextInput};
2
2
  //# sourceMappingURL=text-input.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/text-input.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Input, type InputProps, InputSlot, type InputSlotProps } from './input';\n\n/* -----------------------------------------------------------------------------\n * Component: TextInput\n * -------------------------------------------------------------------------- */\n\ntype TextInputElement = HTMLInputElement;\ninterface TextInputProps extends InputProps, Omit<InputSlotProps, 'prefix'> {}\n\nconst TextInput = React.forwardRef<TextInputElement, TextInputProps>(\n ({ className, loading, loaderPosition, prefix, suffix, inputSize, ...props }, ref) => {\n return (\n <Input\n className={className}\n inputSize={inputSize}\n loaderPosition={loaderPosition}\n loading={loading}\n prefix={prefix}\n suffix={suffix}\n >\n <InputSlot ref={ref} {...props} />\n </Input>\n );\n },\n);\n\nTextInput.displayName = 'TextInput';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { TextInput, type TextInputProps };\n"],"mappings":"uHAEA,UAAYA,MAAW,QAqBf,cAAAC,MAAA,oBAXR,IAAMC,EAAkB,aACtB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,eAAAC,EAAgB,OAAAC,EAAQ,OAAAC,EAAQ,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAE1ET,EAACU,EAAA,CACC,UAAWR,EACX,UAAWK,EACX,eAAgBH,EAChB,QAASD,EACT,OAAQE,EACR,OAAQC,EAER,SAAAN,EAACW,EAAA,CAAU,IAAKF,EAAM,GAAGD,EAAO,EAClC,CAGN,EAEAP,EAAU,YAAc","names":["React","jsx","TextInput","className","loading","loaderPosition","prefix","suffix","inputSize","props","ref","Input","InputSlot"]}
1
+ {"version":3,"sources":["../../src/react/text-input.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Input, type InputProps, InputSlot, type InputSlotProps } from '@/react/input';\n\n/* -----------------------------------------------------------------------------\n * Component: TextInput\n * -------------------------------------------------------------------------- */\n\ntype TextInputElement = HTMLInputElement;\ninterface TextInputProps extends InputProps, Omit<InputSlotProps, 'prefix'> {}\n\nconst TextInput = React.forwardRef<TextInputElement, TextInputProps>(\n ({ className, loading, loaderPosition, prefix, suffix, inputSize, ...props }, ref) => {\n return (\n <Input\n className={className}\n inputSize={inputSize}\n loaderPosition={loaderPosition}\n loading={loading}\n prefix={prefix}\n suffix={suffix}\n >\n <InputSlot ref={ref} {...props} />\n </Input>\n );\n },\n);\n\nTextInput.displayName = 'TextInput';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { TextInput, type TextInputProps };\n"],"mappings":"uHAEA,UAAYA,MAAW,QAqBf,cAAAC,MAAA,oBAXR,IAAMC,EAAkB,aACtB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,eAAAC,EAAgB,OAAAC,EAAQ,OAAAC,EAAQ,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAE1ET,EAACU,EAAA,CACC,UAAWR,EACX,UAAWK,EACX,eAAgBH,EAChB,QAASD,EACT,OAAQE,EACR,OAAQC,EAER,SAAAN,EAACW,EAAA,CAAU,IAAKF,EAAM,GAAGD,EAAO,EAClC,CAGN,EAEAP,EAAU,YAAc","names":["React","jsx","TextInput","className","loading","loaderPosition","prefix","suffix","inputSize","props","ref","Input","InputSlot"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/text.tsx"],"names":["React","Slot","jsx","Text","Tag","asChild","props","forwardedRef"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAuBZ,cAAAC,MAAA,oBAHT,IAAMC,EAAa,aAAmC,CAAC,CAAE,GAAIC,EAAM,IAAK,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAGpFL,EAFWG,EAAUJ,EAAOG,EAE3B,CAAU,IAAKG,EAAe,GAAGD,EAAO,CACjD,EAEDH,EAAK,YAAc","sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\n/* -----------------------------------------------------------------------------\n * Component: Text\n * -------------------------------------------------------------------------- */\n\ntype TextElement = HTMLParagraphElement;\n\ninterface TextParagraphProps extends React.HTMLAttributes<HTMLParagraphElement> {\n as?: 'p';\n}\n\ninterface TextSpanProps extends React.HTMLAttributes<HTMLSpanElement> {\n as: 'span';\n}\n\ntype TextProps = (TextParagraphProps | TextSpanProps) & {\n asChild?: boolean;\n};\n\nconst Text = React.forwardRef<TextElement, TextProps>(({ as: Tag = 'p', asChild, ...props }, forwardedRef) => {\n const Component = asChild ? Slot : Tag;\n\n return <Component ref={forwardedRef} {...props} />;\n});\n\nText.displayName = 'Text';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Text, type TextProps };\n"]}
1
+ {"version":3,"sources":["../../src/react/text.tsx"],"names":["Text","Tag","asChild","props","forwardedRef","jsx","Slot"],"mappings":"AAAA,kaAAuB,iDACF,+CAuBZ,IAHHA,CAAAA,CAAa,CAAA,CAAA,UAAA,CAAmC,CAAC,CAAE,EAAA,CAAIC,CAAAA,CAAM,GAAA,CAAK,OAAA,CAAAC,CAAAA,CAAS,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAGpFC,6BAAAA,CAFWH,CAAUI,eAAAA,CAAOL,CAAAA,CAE3B,CAAU,GAAA,CAAKG,CAAAA,CAAe,GAAGD,CAAAA,CAAO,CACjD,CAAA,CAEDH,CAAAA,CAAK,WAAA,CAAc,MAAA,CAAA,iBAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/text.cjs","sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\n/* -----------------------------------------------------------------------------\n * Component: Text\n * -------------------------------------------------------------------------- */\n\ntype TextElement = HTMLParagraphElement;\n\ninterface TextParagraphProps extends React.HTMLAttributes<HTMLParagraphElement> {\n as?: 'p';\n}\n\ninterface TextSpanProps extends React.HTMLAttributes<HTMLSpanElement> {\n as: 'span';\n}\n\ntype TextProps = (TextParagraphProps | TextSpanProps) & {\n asChild?: boolean;\n};\n\nconst Text = React.forwardRef<TextElement, TextProps>(({ as: Tag = 'p', asChild, ...props }, forwardedRef) => {\n const Component = asChild ? Slot : Tag;\n\n return <Component ref={forwardedRef} {...props} />;\n});\n\nText.displayName = 'Text';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Text, type TextProps };\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/textarea.tsx"],"names":["React","jsx","Textarea","className","props","forwardedRef","cn"],"mappings":"0CAAA,UAAYA,MAAW,QAYnB,cAAAC,MAAA,oBAFJ,IAAMC,EAAiB,aAA2C,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAExFJ,EAAC,YACC,IAAKI,EACL,UAAWC,EACT,4PACAH,CACF,EACC,GAAGC,EACN,CAEH,EAEDF,EAAS,YAAc","sourcesContent":["import * as React from 'react';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Textarea\n * -------------------------------------------------------------------------- */\n\ntype TextareaElement = HTMLTextAreaElement;\ntype TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;\n\nconst Textarea = React.forwardRef<TextareaElement, TextareaProps>(({ className, ...props }, forwardedRef) => {\n return (\n <textarea\n ref={forwardedRef}\n className={cn(\n 'border-input placeholder:text-muted-foreground flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-50',\n className,\n )}\n {...props}\n />\n );\n});\n\nTextarea.displayName = 'Textarea';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Textarea, type TextareaProps };\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/textarea.cjs","../../src/react/textarea.tsx"],"names":["Textarea","className","props","forwardedRef","jsx","cn"],"mappings":"AAAA,oZAAyC,uECAlB,+CAYnB,IAFEA,CAAAA,CAAiB,CAAA,CAAA,UAAA,CAA2C,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAExFC,6BAAAA,UAAC,CAAA,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,iCAAAA,2PACT,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CAEH,CAAA,CAEDF,CAAAA,CAAS,WAAA,CAAc,UAAA,CAAA,qBAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/textarea.cjs","sourcesContent":[null,"import * as React from 'react';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Textarea\n * -------------------------------------------------------------------------- */\n\ntype TextareaElement = HTMLTextAreaElement;\ntype TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;\n\nconst Textarea = React.forwardRef<TextareaElement, TextareaProps>(({ className, ...props }, forwardedRef) => {\n return (\n <textarea\n ref={forwardedRef}\n className={cn(\n 'border-input placeholder:text-muted-foreground flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-50',\n className,\n )}\n {...props}\n />\n );\n});\n\nTextarea.displayName = 'Textarea';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Textarea, type TextareaProps };\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/textarea.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Textarea\n * -------------------------------------------------------------------------- */\n\ntype TextareaElement = HTMLTextAreaElement;\ntype TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;\n\nconst Textarea = React.forwardRef<TextareaElement, TextareaProps>(({ className, ...props }, forwardedRef) => {\n return (\n <textarea\n ref={forwardedRef}\n className={cn(\n 'border-input placeholder:text-muted-foreground flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-50',\n className,\n )}\n {...props}\n />\n );\n});\n\nTextarea.displayName = 'Textarea';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Textarea, type TextareaProps };\n"],"mappings":"yCAAA,UAAYA,MAAW,QAYnB,cAAAC,MAAA,oBAFJ,IAAMC,EAAiB,aAA2C,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAExFJ,EAAC,YACC,IAAKI,EACL,UAAWC,EACT,4PACAH,CACF,EACC,GAAGC,EACN,CAEH,EAEDF,EAAS,YAAc","names":["React","jsx","Textarea","className","props","forwardedRef","cn"]}
1
+ {"version":3,"sources":["../../src/react/textarea.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Textarea\n * -------------------------------------------------------------------------- */\n\ntype TextareaElement = HTMLTextAreaElement;\ntype TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;\n\nconst Textarea = React.forwardRef<TextareaElement, TextareaProps>(({ className, ...props }, forwardedRef) => {\n return (\n <textarea\n ref={forwardedRef}\n className={cn(\n 'border-input placeholder:text-muted-foreground flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-50',\n className,\n )}\n {...props}\n />\n );\n});\n\nTextarea.displayName = 'Textarea';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Textarea, type TextareaProps };\n"],"mappings":"yCAAA,UAAYA,MAAW,QAYnB,cAAAC,MAAA,oBAFJ,IAAMC,EAAiB,aAA2C,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAExFJ,EAAC,YACC,IAAKI,EACL,UAAWC,EACT,4PACAH,CACF,EACC,GAAGC,EACN,CAEH,EAEDF,EAAS,YAAc","names":["React","jsx","Textarea","className","props","forwardedRef","cn"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/toggle-group.tsx"],"names":["React","ToggleGroupPrimitive","createToggleGroupScope","createContextScope","jsx","TOGGLE_GROUP_NAME","createToggleGroupContext","useToggleGroupScope","ToggleGroupProvider","useToggleGroupContext","ToggleGroup","__scopeToggleGroup","children","className","variant","size","props","forwardedRef","toggleGroupScope","cn","TOGGLE_GROUP_ITEM_NAME","ToggleGroupItem","context","toggleVariants"],"mappings":"iGAEA,UAAYA,MAAW,QACvB,UAAYC,MAA0B,+BACtC,OAAS,0BAAAC,MAA8B,+BACvC,OAAS,sBAAAC,MAAsC,0BA8BvC,cAAAC,MAAA,oBAtBR,IAAMC,EAAoB,cAIpB,CAACC,CAAwB,EAAIH,EAAmBE,EAAmB,CAACH,CAAsB,CAAC,EAE3FK,EAAsBL,EAAuB,EAE7C,CAACM,EAAqBC,CAAqB,EAAIH,EAA8CD,CAAiB,EAK9GK,EAAoB,aACxB,CACE,CAAE,mBAAAC,EAAoB,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,GAAGC,CAAM,EACnEC,IACG,CACH,IAAMC,EAAmBX,EAAoBI,CAAkB,EAE/D,OACEP,EAACI,EAAA,CAAoB,MAAOG,EAAoB,KAAMI,EAAM,QAASD,EACnE,SAAAV,EAAsB,OAArB,CACC,IAAKa,EACL,UAAWE,EAAG,yCAA0CN,CAAS,EAChE,GAAGK,EACH,GAAGF,EAEH,SAAAJ,EACH,EACF,CAEJ,CACF,EAEAF,EAAY,YAAcL,EAM1B,IAAMe,EAAyB,kBAKzBC,EAAwB,aAC5B,CAAC,CAAE,mBAAAV,EAAoB,SAAAC,EAAU,UAAAC,EAAW,GAAGG,CAAM,EAAsCC,IAAiB,CAC1G,IAAMK,EAAUb,EAAsBW,EAAwBT,CAAkB,EAC1EO,EAAmBX,EAAoBI,CAAkB,EAE/D,OACEP,EAAsB,OAArB,CACC,IAAKa,EACL,UAAWM,EAAe,CAAE,GAAGD,EAAS,UAAAT,CAAU,CAAC,EAClD,GAAGK,EACH,GAAGF,EAEH,SAAAJ,EACH,CAEJ,CACF,EAEAS,EAAgB,YAAcD","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { createToggleGroupScope } from '@radix-ui/react-toggle-group';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { cn } from '../lib/utils';\nimport { toggleVariants, type ToggleVariantsProps } from './toggle';\n\n/* -----------------------------------------------------------------------------\n * Component: ToggleGroup\n * -------------------------------------------------------------------------- */\n\nconst TOGGLE_GROUP_NAME = 'ToggleGroup';\n\ntype ScopedProps<P> = P & { __scopeToggleGroup?: Scope };\n\nconst [createToggleGroupContext] = createContextScope(TOGGLE_GROUP_NAME, [createToggleGroupScope]);\n\nconst useToggleGroupScope = createToggleGroupScope();\n\nconst [ToggleGroupProvider, useToggleGroupContext] = createToggleGroupContext<ToggleVariantsProps>(TOGGLE_GROUP_NAME);\n\ntype ToggleGroupElement = React.ElementRef<typeof ToggleGroupPrimitive.Root>;\ntype ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> & ToggleVariantsProps;\n\nconst ToggleGroup = React.forwardRef<ToggleGroupElement, ToggleGroupProps>(\n (\n { __scopeToggleGroup, children, className, variant, size, ...props }: ScopedProps<ToggleGroupProps>,\n forwardedRef,\n ) => {\n const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);\n\n return (\n <ToggleGroupProvider scope={__scopeToggleGroup} size={size} variant={variant}>\n <ToggleGroupPrimitive.Root\n ref={forwardedRef}\n className={cn('flex items-center justify-center gap-1', className)}\n {...toggleGroupScope}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Root>\n </ToggleGroupProvider>\n );\n },\n);\n\nToggleGroup.displayName = TOGGLE_GROUP_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: ToggleGroupItem\n * -------------------------------------------------------------------------- */\n\nconst TOGGLE_GROUP_ITEM_NAME = 'ToggleGroupItem';\n\ntype ToggleGroupItemElement = React.ElementRef<typeof ToggleGroupPrimitive.Item>;\ntype ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;\n\nconst ToggleGroupItem = React.forwardRef<ToggleGroupItemElement, ToggleGroupItemProps>(\n ({ __scopeToggleGroup, children, className, ...props }: ScopedProps<ToggleGroupItemProps>, forwardedRef) => {\n const context = useToggleGroupContext(TOGGLE_GROUP_ITEM_NAME, __scopeToggleGroup);\n const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);\n\n return (\n <ToggleGroupPrimitive.Item\n ref={forwardedRef}\n className={toggleVariants({ ...context, className })}\n {...toggleGroupScope}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Item>\n );\n },\n);\n\nToggleGroupItem.displayName = TOGGLE_GROUP_ITEM_NAME;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { ToggleGroup, ToggleGroupItem, type ToggleGroupProps, type ToggleGroupItemProps };\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/toggle-group.cjs","../../src/react/toggle-group.tsx"],"names":["TOGGLE_GROUP_NAME","createToggleGroupContext","createContextScope","createToggleGroupScope","useToggleGroupScope","ToggleGroupProvider","useToggleGroupContext","ToggleGroup","__scopeToggleGroup","children","className","variant","size","props","forwardedRef","toggleGroupScope","jsx","cn","TOGGLE_GROUP_ITEM_NAME","ToggleGroupItem","context","toggleVariants"],"mappings":"AAAA,uWAAY,CAAC,yDAAyC,yDAA0C,uECEzE,oHACe,uDAES,+CA8BvC,IAtBFA,CAAAA,CAAoB,aAAA,CAIpB,CAACC,CAAwB,CAAA,CAAIC,8CAAAA,CAAmBF,CAAmB,CAACG,wCAAsB,CAAC,CAAA,CAE3FC,CAAAA,CAAsBD,sDAAAA,CAAuB,CAE7C,CAACE,CAAAA,CAAqBC,CAAqB,CAAA,CAAIL,CAAAA,CAA8CD,CAAiB,CAAA,CAK9GO,CAAAA,uBAAoB,CAAA,CAAA,UAAA,CACxB,CACE,CAAE,kBAAA,CAAAC,CAAAA,CAAoB,QAAA,CAAAC,CAAAA,CAAU,SAAA,CAAAC,CAAAA,CAAW,OAAA,CAAAC,CAAAA,CAAS,IAAA,CAAAC,CAAAA,CAAM,GAAGC,CAAM,CAAA,CACnEC,CAAAA,CAAAA,EACG,CACH,IAAMC,CAAAA,CAAmBX,CAAAA,CAAoBI,CAAkB,CAAA,CAE/D,OACEQ,6BAAAA,CAACX,CAAA,CAAoB,KAAA,CAAOG,CAAAA,CAAoB,IAAA,CAAMI,CAAAA,CAAM,OAAA,CAASD,CAAAA,CACnE,QAAA,CAAAK,6BAAAA,CAAsB,CAAA,IAAA,CAArB,CACC,GAAA,CAAKF,CAAAA,CACL,SAAA,CAAWG,iCAAAA,wCAAG,CAA0CP,CAAS,CAAA,CAChE,GAAGK,CAAAA,CACH,GAAGF,CAAAA,CAEH,QAAA,CAAAJ,CAAAA,CACH,CAAA,CACF,CAEJ,CACF,CAAA,CAEAF,CAAAA,CAAY,WAAA,CAAcP,CAAAA,CAM1B,IAAMkB,CAAAA,CAAyB,iBAAA,CAKzBC,CAAAA,2BAAwB,CAAA,CAAA,UAAA,CAC5B,CAAC,CAAE,kBAAA,CAAAX,CAAAA,CAAoB,QAAA,CAAAC,CAAAA,CAAU,SAAA,CAAAC,CAAAA,CAAW,GAAGG,CAAM,CAAA,CAAsCC,CAAAA,CAAAA,EAAiB,CAC1G,IAAMM,CAAAA,CAAUd,CAAAA,CAAsBY,CAAAA,CAAwBV,CAAkB,CAAA,CAC1EO,CAAAA,CAAmBX,CAAAA,CAAoBI,CAAkB,CAAA,CAE/D,OACEQ,6BAAAA,CAAsB,CAAA,IAAA,CAArB,CACC,GAAA,CAAKF,CAAAA,CACL,SAAA,CAAWO,iCAAAA,CAAiB,GAAGD,CAAAA,CAAS,SAAA,CAAAV,CAAU,CAAC,CAAA,CAClD,GAAGK,CAAAA,CACH,GAAGF,CAAAA,CAEH,QAAA,CAAAJ,CAAAA,CACH,CAEJ,CACF,CAAA,CAEAU,CAAAA,CAAgB,WAAA,CAAcD,CAAAA,CAAAA,qDAAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/toggle-group.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { createToggleGroupScope } from '@radix-ui/react-toggle-group';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { cn } from '@/lib/utils';\nimport { toggleVariants, type ToggleVariantsProps } from '@/react/toggle';\n\n/* -----------------------------------------------------------------------------\n * Component: ToggleGroup\n * -------------------------------------------------------------------------- */\n\nconst TOGGLE_GROUP_NAME = 'ToggleGroup';\n\ntype ScopedProps<P> = P & { __scopeToggleGroup?: Scope };\n\nconst [createToggleGroupContext] = createContextScope(TOGGLE_GROUP_NAME, [createToggleGroupScope]);\n\nconst useToggleGroupScope = createToggleGroupScope();\n\nconst [ToggleGroupProvider, useToggleGroupContext] = createToggleGroupContext<ToggleVariantsProps>(TOGGLE_GROUP_NAME);\n\ntype ToggleGroupElement = React.ElementRef<typeof ToggleGroupPrimitive.Root>;\ntype ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> & ToggleVariantsProps;\n\nconst ToggleGroup = React.forwardRef<ToggleGroupElement, ToggleGroupProps>(\n (\n { __scopeToggleGroup, children, className, variant, size, ...props }: ScopedProps<ToggleGroupProps>,\n forwardedRef,\n ) => {\n const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);\n\n return (\n <ToggleGroupProvider scope={__scopeToggleGroup} size={size} variant={variant}>\n <ToggleGroupPrimitive.Root\n ref={forwardedRef}\n className={cn('flex items-center justify-center gap-1', className)}\n {...toggleGroupScope}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Root>\n </ToggleGroupProvider>\n );\n },\n);\n\nToggleGroup.displayName = TOGGLE_GROUP_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: ToggleGroupItem\n * -------------------------------------------------------------------------- */\n\nconst TOGGLE_GROUP_ITEM_NAME = 'ToggleGroupItem';\n\ntype ToggleGroupItemElement = React.ElementRef<typeof ToggleGroupPrimitive.Item>;\ntype ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;\n\nconst ToggleGroupItem = React.forwardRef<ToggleGroupItemElement, ToggleGroupItemProps>(\n ({ __scopeToggleGroup, children, className, ...props }: ScopedProps<ToggleGroupItemProps>, forwardedRef) => {\n const context = useToggleGroupContext(TOGGLE_GROUP_ITEM_NAME, __scopeToggleGroup);\n const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);\n\n return (\n <ToggleGroupPrimitive.Item\n ref={forwardedRef}\n className={toggleVariants({ ...context, className })}\n {...toggleGroupScope}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Item>\n );\n },\n);\n\nToggleGroupItem.displayName = TOGGLE_GROUP_ITEM_NAME;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { ToggleGroup, ToggleGroupItem, type ToggleGroupProps, type ToggleGroupItemProps };\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/toggle-group.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { createToggleGroupScope } from '@radix-ui/react-toggle-group';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { cn } from '../lib/utils';\nimport { toggleVariants, type ToggleVariantsProps } from './toggle';\n\n/* -----------------------------------------------------------------------------\n * Component: ToggleGroup\n * -------------------------------------------------------------------------- */\n\nconst TOGGLE_GROUP_NAME = 'ToggleGroup';\n\ntype ScopedProps<P> = P & { __scopeToggleGroup?: Scope };\n\nconst [createToggleGroupContext] = createContextScope(TOGGLE_GROUP_NAME, [createToggleGroupScope]);\n\nconst useToggleGroupScope = createToggleGroupScope();\n\nconst [ToggleGroupProvider, useToggleGroupContext] = createToggleGroupContext<ToggleVariantsProps>(TOGGLE_GROUP_NAME);\n\ntype ToggleGroupElement = React.ElementRef<typeof ToggleGroupPrimitive.Root>;\ntype ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> & ToggleVariantsProps;\n\nconst ToggleGroup = React.forwardRef<ToggleGroupElement, ToggleGroupProps>(\n (\n { __scopeToggleGroup, children, className, variant, size, ...props }: ScopedProps<ToggleGroupProps>,\n forwardedRef,\n ) => {\n const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);\n\n return (\n <ToggleGroupProvider scope={__scopeToggleGroup} size={size} variant={variant}>\n <ToggleGroupPrimitive.Root\n ref={forwardedRef}\n className={cn('flex items-center justify-center gap-1', className)}\n {...toggleGroupScope}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Root>\n </ToggleGroupProvider>\n );\n },\n);\n\nToggleGroup.displayName = TOGGLE_GROUP_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: ToggleGroupItem\n * -------------------------------------------------------------------------- */\n\nconst TOGGLE_GROUP_ITEM_NAME = 'ToggleGroupItem';\n\ntype ToggleGroupItemElement = React.ElementRef<typeof ToggleGroupPrimitive.Item>;\ntype ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;\n\nconst ToggleGroupItem = React.forwardRef<ToggleGroupItemElement, ToggleGroupItemProps>(\n ({ __scopeToggleGroup, children, className, ...props }: ScopedProps<ToggleGroupItemProps>, forwardedRef) => {\n const context = useToggleGroupContext(TOGGLE_GROUP_ITEM_NAME, __scopeToggleGroup);\n const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);\n\n return (\n <ToggleGroupPrimitive.Item\n ref={forwardedRef}\n className={toggleVariants({ ...context, className })}\n {...toggleGroupScope}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Item>\n );\n },\n);\n\nToggleGroupItem.displayName = TOGGLE_GROUP_ITEM_NAME;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { ToggleGroup, ToggleGroupItem, type ToggleGroupProps, type ToggleGroupItemProps };\n"],"mappings":"+FAEA,UAAYA,MAAW,QACvB,UAAYC,MAA0B,+BACtC,OAAS,0BAAAC,MAA8B,+BACvC,OAAS,sBAAAC,MAAsC,0BA8BvC,cAAAC,MAAA,oBAtBR,IAAMC,EAAoB,cAIpB,CAACC,CAAwB,EAAIC,EAAmBF,EAAmB,CAACG,CAAsB,CAAC,EAE3FC,EAAsBD,EAAuB,EAE7C,CAACE,EAAqBC,CAAqB,EAAIL,EAA8CD,CAAiB,EAK9GO,EAAoB,aACxB,CACE,CAAE,mBAAAC,EAAoB,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,GAAGC,CAAM,EACnEC,IACG,CACH,IAAMC,EAAmBX,EAAoBI,CAAkB,EAE/D,OACET,EAACM,EAAA,CAAoB,MAAOG,EAAoB,KAAMI,EAAM,QAASD,EACnE,SAAAZ,EAAsB,OAArB,CACC,IAAKe,EACL,UAAWE,EAAG,yCAA0CN,CAAS,EAChE,GAAGK,EACH,GAAGF,EAEH,SAAAJ,EACH,EACF,CAEJ,CACF,EAEAF,EAAY,YAAcP,EAM1B,IAAMiB,EAAyB,kBAKzBC,EAAwB,aAC5B,CAAC,CAAE,mBAAAV,EAAoB,SAAAC,EAAU,UAAAC,EAAW,GAAGG,CAAM,EAAsCC,IAAiB,CAC1G,IAAMK,EAAUb,EAAsBW,EAAwBT,CAAkB,EAC1EO,EAAmBX,EAAoBI,CAAkB,EAE/D,OACET,EAAsB,OAArB,CACC,IAAKe,EACL,UAAWM,EAAe,CAAE,GAAGD,EAAS,UAAAT,CAAU,CAAC,EAClD,GAAGK,EACH,GAAGF,EAEH,SAAAJ,EACH,CAEJ,CACF,EAEAS,EAAgB,YAAcD","names":["React","ToggleGroupPrimitive","createToggleGroupScope","createContextScope","jsx","TOGGLE_GROUP_NAME","createToggleGroupContext","createContextScope","createToggleGroupScope","useToggleGroupScope","ToggleGroupProvider","useToggleGroupContext","ToggleGroup","__scopeToggleGroup","children","className","variant","size","props","forwardedRef","toggleGroupScope","cn","TOGGLE_GROUP_ITEM_NAME","ToggleGroupItem","context","toggleVariants"]}
1
+ {"version":3,"sources":["../../src/react/toggle-group.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { createToggleGroupScope } from '@radix-ui/react-toggle-group';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { cn } from '@/lib/utils';\nimport { toggleVariants, type ToggleVariantsProps } from '@/react/toggle';\n\n/* -----------------------------------------------------------------------------\n * Component: ToggleGroup\n * -------------------------------------------------------------------------- */\n\nconst TOGGLE_GROUP_NAME = 'ToggleGroup';\n\ntype ScopedProps<P> = P & { __scopeToggleGroup?: Scope };\n\nconst [createToggleGroupContext] = createContextScope(TOGGLE_GROUP_NAME, [createToggleGroupScope]);\n\nconst useToggleGroupScope = createToggleGroupScope();\n\nconst [ToggleGroupProvider, useToggleGroupContext] = createToggleGroupContext<ToggleVariantsProps>(TOGGLE_GROUP_NAME);\n\ntype ToggleGroupElement = React.ElementRef<typeof ToggleGroupPrimitive.Root>;\ntype ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> & ToggleVariantsProps;\n\nconst ToggleGroup = React.forwardRef<ToggleGroupElement, ToggleGroupProps>(\n (\n { __scopeToggleGroup, children, className, variant, size, ...props }: ScopedProps<ToggleGroupProps>,\n forwardedRef,\n ) => {\n const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);\n\n return (\n <ToggleGroupProvider scope={__scopeToggleGroup} size={size} variant={variant}>\n <ToggleGroupPrimitive.Root\n ref={forwardedRef}\n className={cn('flex items-center justify-center gap-1', className)}\n {...toggleGroupScope}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Root>\n </ToggleGroupProvider>\n );\n },\n);\n\nToggleGroup.displayName = TOGGLE_GROUP_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: ToggleGroupItem\n * -------------------------------------------------------------------------- */\n\nconst TOGGLE_GROUP_ITEM_NAME = 'ToggleGroupItem';\n\ntype ToggleGroupItemElement = React.ElementRef<typeof ToggleGroupPrimitive.Item>;\ntype ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;\n\nconst ToggleGroupItem = React.forwardRef<ToggleGroupItemElement, ToggleGroupItemProps>(\n ({ __scopeToggleGroup, children, className, ...props }: ScopedProps<ToggleGroupItemProps>, forwardedRef) => {\n const context = useToggleGroupContext(TOGGLE_GROUP_ITEM_NAME, __scopeToggleGroup);\n const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);\n\n return (\n <ToggleGroupPrimitive.Item\n ref={forwardedRef}\n className={toggleVariants({ ...context, className })}\n {...toggleGroupScope}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Item>\n );\n },\n);\n\nToggleGroupItem.displayName = TOGGLE_GROUP_ITEM_NAME;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { ToggleGroup, ToggleGroupItem, type ToggleGroupProps, type ToggleGroupItemProps };\n"],"mappings":"+FAEA,UAAYA,MAAW,QACvB,UAAYC,MAA0B,+BACtC,OAAS,0BAAAC,MAA8B,+BACvC,OAAS,sBAAAC,MAAsC,0BA8BvC,cAAAC,MAAA,oBAtBR,IAAMC,EAAoB,cAIpB,CAACC,CAAwB,EAAIC,EAAmBF,EAAmB,CAACG,CAAsB,CAAC,EAE3FC,EAAsBD,EAAuB,EAE7C,CAACE,EAAqBC,CAAqB,EAAIL,EAA8CD,CAAiB,EAK9GO,EAAoB,aACxB,CACE,CAAE,mBAAAC,EAAoB,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,GAAGC,CAAM,EACnEC,IACG,CACH,IAAMC,EAAmBX,EAAoBI,CAAkB,EAE/D,OACET,EAACM,EAAA,CAAoB,MAAOG,EAAoB,KAAMI,EAAM,QAASD,EACnE,SAAAZ,EAAsB,OAArB,CACC,IAAKe,EACL,UAAWE,EAAG,yCAA0CN,CAAS,EAChE,GAAGK,EACH,GAAGF,EAEH,SAAAJ,EACH,EACF,CAEJ,CACF,EAEAF,EAAY,YAAcP,EAM1B,IAAMiB,EAAyB,kBAKzBC,EAAwB,aAC5B,CAAC,CAAE,mBAAAV,EAAoB,SAAAC,EAAU,UAAAC,EAAW,GAAGG,CAAM,EAAsCC,IAAiB,CAC1G,IAAMK,EAAUb,EAAsBW,EAAwBT,CAAkB,EAC1EO,EAAmBX,EAAoBI,CAAkB,EAE/D,OACET,EAAsB,OAArB,CACC,IAAKe,EACL,UAAWM,EAAe,CAAE,GAAGD,EAAS,UAAAT,CAAU,CAAC,EAClD,GAAGK,EACH,GAAGF,EAEH,SAAAJ,EACH,CAEJ,CACF,EAEAS,EAAgB,YAAcD","names":["React","ToggleGroupPrimitive","createToggleGroupScope","createContextScope","jsx","TOGGLE_GROUP_NAME","createToggleGroupContext","createContextScope","createToggleGroupScope","useToggleGroupScope","ToggleGroupProvider","useToggleGroupContext","ToggleGroup","__scopeToggleGroup","children","className","variant","size","props","forwardedRef","toggleGroupScope","cn","TOGGLE_GROUP_ITEM_NAME","ToggleGroupItem","context","toggleVariants"]}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/toggle.cjs"],"names":[],"mappings":"AAAA,qFAAY,CAAC,yDAAsC,mFAAwC","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/toggle.cjs"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/tooltip.tsx"],"names":["React","TooltipPrimitive","jsx","TooltipProvider","Tooltip","TooltipTrigger","TooltipContent","className","sideOffset","props","forwardedRef","cn","TooltipArrow"],"mappings":"uDAEA,UAAYA,MAAW,QACvB,UAAYC,MAAsB,0BAkC5B,cAAAC,MAAA,oBA1BN,IAAMC,EAAmC,WAOnCC,EAA2B,OAO3BC,EAAkC,UASlCC,EAAuB,aAC3B,CAAC,CAAE,UAAAC,EAAW,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,IACxCR,EAAkB,SAAjB,CACC,SAAAA,EAAkB,UAAjB,CACC,IAAKQ,EACL,UAAWC,EACT,qwBACAJ,CACF,EACA,WAAYC,EACX,GAAGC,EACN,EACF,CAEJ,EAEAH,EAAe,YAA+B,UAAQ,YAStD,IAAMM,EAAqB,aACzB,CAAC,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAGC,IACxBR,EAAkB,QAAjB,CAAuB,IAAKQ,EAAc,UAAWC,EAAG,eAAgBJ,CAAS,EAAI,GAAGE,EAAO,CAEpG,EAEAG,EAAa,YAA+B,QAAM","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipProvider\n * -------------------------------------------------------------------------- */\n\ntype TooltipProviderProps = React.ComponentProps<typeof TooltipPrimitive.Provider>;\nconst TooltipProvider = TooltipPrimitive.Provider;\n\n/* -----------------------------------------------------------------------------\n * Component: Tooltip\n * -------------------------------------------------------------------------- */\n\ntype TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root>;\nconst Tooltip = TooltipPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipTrigger\n * -------------------------------------------------------------------------- */\n\ntype TooltipTriggerProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>;\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipContent\n * -------------------------------------------------------------------------- */\n\ntype TooltipContentElement = React.ElementRef<typeof TooltipPrimitive.Content>;\ntype TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>;\n\nconst TooltipContent = React.forwardRef<TooltipContentElement, TooltipContentProps>(\n ({ className, sideOffset = 6, ...props }, forwardedRef) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in data-[state=delayed-open]:zoom-in-95 data-[state=delayed-open]:data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:data-[side=right]:slide-in-from-left-2 data-[state=delayed-open]:data-[side=bottom]:slide-in-from-top-2 data-[state=delayed-open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 rounded-md border px-3 py-1.5 text-xs',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </TooltipPrimitive.Portal>\n ),\n);\n\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipArrow\n * -------------------------------------------------------------------------- */\n\ntype TooltipArrowElement = React.ElementRef<typeof TooltipPrimitive.Arrow>;\ntype TooltipArrowProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>;\n\nconst TooltipArrow = React.forwardRef<TooltipArrowElement, TooltipArrowProps>(\n ({ className, ...props }, forwardedRef) => (\n <TooltipPrimitive.Arrow ref={forwardedRef} className={cn('fill-primary', className)} {...props} />\n ),\n);\n\nTooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n TooltipProvider,\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n TooltipArrow,\n type TooltipProviderProps,\n type TooltipProps,\n type TooltipTriggerProps,\n type TooltipContentProps,\n type TooltipArrowProps,\n};\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/tooltip.cjs","../../src/react/tooltip.tsx"],"names":["TooltipProvider","Tooltip","TooltipTrigger","TooltipContent","className","sideOffset","props","forwardedRef","jsx","cn","TooltipArrow"],"mappings":"AAAA,uWAAY,CAAC,yDAAyC,uECE/B,uGACW,+CAkC5B,IA1BAA,CAAAA,CAAmC,CAAA,CAAA,QAAA,CAOnCC,CAAAA,mBAA2B,CAAA,CAAA,IAAA,CAO3BC,CAAAA,0BAAkC,CAAA,CAAA,OAAA,CASlCC,CAAAA,0BAAuB,CAAA,CAAA,UAAA,CAC3B,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,UAAA,CAAAC,CAAAA,CAAa,CAAA,CAAG,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxCC,6BAAAA,CAAkB,CAAA,MAAA,CAAjB,CACC,QAAA,CAAAA,6BAAAA,CAAkB,CAAA,OAAA,CAAjB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,iCAAAA,owBACT,CACAL,CACF,CAAA,CACA,UAAA,CAAYC,CAAAA,CACX,GAAGC,CAAAA,CACN,CAAA,CACF,CAEJ,CAAA,CAEAH,CAAAA,CAAe,WAAA,CAA+B,CAAA,CAAA,OAAA,CAAQ,WAAA,CAStD,IAAMO,CAAAA,CAAqB,CAAA,CAAA,UAAA,CACzB,CAAC,CAAE,SAAA,CAAAN,CAAAA,CAAW,GAAGE,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,CAAkB,CAAA,KAAA,CAAjB,CAAuB,GAAA,CAAKD,CAAAA,CAAc,SAAA,CAAWE,iCAAAA,cAAG,CAAgBL,CAAS,CAAA,CAAI,GAAGE,CAAAA,CAAO,CAEpG,CAAA,CAEAI,CAAAA,CAAa,WAAA,CAA+B,CAAA,CAAA,KAAA,CAAM,WAAA,CAAA,mIAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/tooltip.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipProvider\n * -------------------------------------------------------------------------- */\n\ntype TooltipProviderProps = React.ComponentProps<typeof TooltipPrimitive.Provider>;\nconst TooltipProvider = TooltipPrimitive.Provider;\n\n/* -----------------------------------------------------------------------------\n * Component: Tooltip\n * -------------------------------------------------------------------------- */\n\ntype TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root>;\nconst Tooltip = TooltipPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipTrigger\n * -------------------------------------------------------------------------- */\n\ntype TooltipTriggerProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>;\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipContent\n * -------------------------------------------------------------------------- */\n\ntype TooltipContentElement = React.ElementRef<typeof TooltipPrimitive.Content>;\ntype TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>;\n\nconst TooltipContent = React.forwardRef<TooltipContentElement, TooltipContentProps>(\n ({ className, sideOffset = 6, ...props }, forwardedRef) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in data-[state=delayed-open]:zoom-in-95 data-[state=delayed-open]:data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:data-[side=right]:slide-in-from-left-2 data-[state=delayed-open]:data-[side=bottom]:slide-in-from-top-2 data-[state=delayed-open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 rounded-md border px-3 py-1.5 text-xs',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </TooltipPrimitive.Portal>\n ),\n);\n\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipArrow\n * -------------------------------------------------------------------------- */\n\ntype TooltipArrowElement = React.ElementRef<typeof TooltipPrimitive.Arrow>;\ntype TooltipArrowProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>;\n\nconst TooltipArrow = React.forwardRef<TooltipArrowElement, TooltipArrowProps>(\n ({ className, ...props }, forwardedRef) => (\n <TooltipPrimitive.Arrow ref={forwardedRef} className={cn('fill-primary', className)} {...props} />\n ),\n);\n\nTooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n TooltipProvider,\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n TooltipArrow,\n type TooltipProviderProps,\n type TooltipProps,\n type TooltipTriggerProps,\n type TooltipContentProps,\n type TooltipArrowProps,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipProvider\n * -------------------------------------------------------------------------- */\n\ntype TooltipProviderProps = React.ComponentProps<typeof TooltipPrimitive.Provider>;\nconst TooltipProvider = TooltipPrimitive.Provider;\n\n/* -----------------------------------------------------------------------------\n * Component: Tooltip\n * -------------------------------------------------------------------------- */\n\ntype TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root>;\nconst Tooltip = TooltipPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipTrigger\n * -------------------------------------------------------------------------- */\n\ntype TooltipTriggerProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>;\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipContent\n * -------------------------------------------------------------------------- */\n\ntype TooltipContentElement = React.ElementRef<typeof TooltipPrimitive.Content>;\ntype TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>;\n\nconst TooltipContent = React.forwardRef<TooltipContentElement, TooltipContentProps>(\n ({ className, sideOffset = 6, ...props }, forwardedRef) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in data-[state=delayed-open]:zoom-in-95 data-[state=delayed-open]:data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:data-[side=right]:slide-in-from-left-2 data-[state=delayed-open]:data-[side=bottom]:slide-in-from-top-2 data-[state=delayed-open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 rounded-md border px-3 py-1.5 text-xs',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </TooltipPrimitive.Portal>\n ),\n);\n\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipArrow\n * -------------------------------------------------------------------------- */\n\ntype TooltipArrowElement = React.ElementRef<typeof TooltipPrimitive.Arrow>;\ntype TooltipArrowProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>;\n\nconst TooltipArrow = React.forwardRef<TooltipArrowElement, TooltipArrowProps>(\n ({ className, ...props }, forwardedRef) => (\n <TooltipPrimitive.Arrow ref={forwardedRef} className={cn('fill-primary', className)} {...props} />\n ),\n);\n\nTooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n TooltipProvider,\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n TooltipArrow,\n type TooltipProviderProps,\n type TooltipProps,\n type TooltipTriggerProps,\n type TooltipContentProps,\n type TooltipArrowProps,\n};\n"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,UAAYC,MAAsB,0BAkC5B,cAAAC,MAAA,oBA1BN,IAAMC,EAAmC,WAOnCC,EAA2B,OAO3BC,EAAkC,UASlCC,EAAuB,aAC3B,CAAC,CAAE,UAAAC,EAAW,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,IACxCR,EAAkB,SAAjB,CACC,SAAAA,EAAkB,UAAjB,CACC,IAAKQ,EACL,UAAWC,EACT,qwBACAJ,CACF,EACA,WAAYC,EACX,GAAGC,EACN,EACF,CAEJ,EAEAH,EAAe,YAA+B,UAAQ,YAStD,IAAMM,EAAqB,aACzB,CAAC,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAGC,IACxBR,EAAkB,QAAjB,CAAuB,IAAKQ,EAAc,UAAWC,EAAG,eAAgBJ,CAAS,EAAI,GAAGE,EAAO,CAEpG,EAEAG,EAAa,YAA+B,QAAM","names":["React","TooltipPrimitive","jsx","TooltipProvider","Tooltip","TooltipTrigger","TooltipContent","className","sideOffset","props","forwardedRef","cn","TooltipArrow"]}
1
+ {"version":3,"sources":["../../src/react/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipProvider\n * -------------------------------------------------------------------------- */\n\ntype TooltipProviderProps = React.ComponentProps<typeof TooltipPrimitive.Provider>;\nconst TooltipProvider = TooltipPrimitive.Provider;\n\n/* -----------------------------------------------------------------------------\n * Component: Tooltip\n * -------------------------------------------------------------------------- */\n\ntype TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root>;\nconst Tooltip = TooltipPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipTrigger\n * -------------------------------------------------------------------------- */\n\ntype TooltipTriggerProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>;\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipContent\n * -------------------------------------------------------------------------- */\n\ntype TooltipContentElement = React.ElementRef<typeof TooltipPrimitive.Content>;\ntype TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>;\n\nconst TooltipContent = React.forwardRef<TooltipContentElement, TooltipContentProps>(\n ({ className, sideOffset = 6, ...props }, forwardedRef) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in data-[state=delayed-open]:zoom-in-95 data-[state=delayed-open]:data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:data-[side=right]:slide-in-from-left-2 data-[state=delayed-open]:data-[side=bottom]:slide-in-from-top-2 data-[state=delayed-open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 rounded-md border px-3 py-1.5 text-xs',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </TooltipPrimitive.Portal>\n ),\n);\n\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: TooltipArrow\n * -------------------------------------------------------------------------- */\n\ntype TooltipArrowElement = React.ElementRef<typeof TooltipPrimitive.Arrow>;\ntype TooltipArrowProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>;\n\nconst TooltipArrow = React.forwardRef<TooltipArrowElement, TooltipArrowProps>(\n ({ className, ...props }, forwardedRef) => (\n <TooltipPrimitive.Arrow ref={forwardedRef} className={cn('fill-primary', className)} {...props} />\n ),\n);\n\nTooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n TooltipProvider,\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n TooltipArrow,\n type TooltipProviderProps,\n type TooltipProps,\n type TooltipTriggerProps,\n type TooltipContentProps,\n type TooltipArrowProps,\n};\n"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,UAAYC,MAAsB,0BAkC5B,cAAAC,MAAA,oBA1BN,IAAMC,EAAmC,WAOnCC,EAA2B,OAO3BC,EAAkC,UASlCC,EAAuB,aAC3B,CAAC,CAAE,UAAAC,EAAW,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,IACxCR,EAAkB,SAAjB,CACC,SAAAA,EAAkB,UAAjB,CACC,IAAKQ,EACL,UAAWC,EACT,qwBACAJ,CACF,EACA,WAAYC,EACX,GAAGC,EACN,EACF,CAEJ,EAEAH,EAAe,YAA+B,UAAQ,YAStD,IAAMM,EAAqB,aACzB,CAAC,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAGC,IACxBR,EAAkB,QAAjB,CAAuB,IAAKQ,EAAc,UAAWC,EAAG,eAAgBJ,CAAS,EAAI,GAAGE,EAAO,CAEpG,EAEAG,EAAa,YAA+B,QAAM","names":["React","TooltipPrimitive","jsx","TooltipProvider","Tooltip","TooltipTrigger","TooltipContent","className","sideOffset","props","forwardedRef","cn","TooltipArrow"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codefast/ui",
3
- "version": "0.0.69",
3
+ "version": "0.0.71",
4
4
  "license": "MIT",
5
5
  "sideEffects": [
6
6
  "**/*.css"
@@ -391,9 +391,9 @@
391
391
  "postcss": "^8.4.39",
392
392
  "react": "^18.3.1",
393
393
  "tailwindcss": "^3.4.4",
394
- "tsup": "8.1.0",
394
+ "tsup": "^8.1.2",
395
395
  "typescript": "^5.5.3",
396
- "@codefast/config-tailwind": "0.0.3",
396
+ "@codefast/config-tailwind": "0.0.5",
397
397
  "@codefast/config-typescript": "0.0.1",
398
398
  "@codefast/eslint-config": "0.0.33"
399
399
  },
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/input.tsx"],"names":["React","tv","createContextScope","useComposedRefs","jsx","jsxs","inputVariants","root","slot","INPUT_NAME","createInputContext","createInputScope","InputProvider","useInputContext","Input","__scopeInput","className","prefix","suffix","loading","loaderPosition","inputSize","children","props","inputRef","handlePointerDown","event","inputElement","Spinner","INPUT_SLOT_NAME","InputSlot","forwardedRef","context","composedInputRef"],"mappings":"yCAEA,UAAYA,MAAW,QACvB,OAAS,MAAAC,MAA6B,oBACtC,OAAS,sBAAAC,MAAsC,0BAC/C,OAAS,mBAAAC,MAAuB,+BAkG1B,OAC4C,OAAAC,EAD5C,QAAAC,MAAA,oBA3FN,IAAMC,EAAgBL,EAAG,CACvB,MAAO,CACL,KAAM,2RACN,KAAM,gLACR,EACA,SAAU,CACR,UAAW,CACT,QAAS,CACP,KAAM,MACR,EACA,GAAI,CACF,KAAM,KACR,EACA,GAAI,CACF,KAAM,KACR,EACA,GAAI,CACF,KAAM,MACR,CACF,CACF,EACA,gBAAiB,CACf,UAAW,SACb,CACF,CAAC,EAIK,CAAE,KAAAM,EAAM,KAAAC,CAAK,EAAIF,EAAc,EAM/BG,EAAa,QAGb,CAACC,EAAoBC,CAAgB,EAAIT,EAAmBO,CAAU,EAOtE,CAACG,EAAeC,CAAe,EAAIH,EAAsCD,CAAU,EAczF,SAASK,EAAM,CACb,aAAAC,EACA,UAAAC,EACA,OAAAC,EACA,OAAAC,EACA,QAAAC,EACA,eAAAC,EACA,UAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EAA+C,CAC7C,IAAMC,EAAiB,SAAyB,IAAI,EAE9CC,EAAgEC,GAAU,CAG9E,GAFeA,EAAM,OAEV,QAAQ,kBAAkB,EACnC,OAGF,IAAMC,EAAeH,EAAS,QAEzBG,GAIL,sBAAsB,IAAM,CAC1BA,EAAa,MAAM,CACrB,CAAC,CACH,EAEA,OACEvB,EAACQ,EAAA,CAAc,SAAUY,EAAU,MAAOT,EACxC,SAAAV,EAAC,OAAI,UAAWE,EAAK,CAAE,UAAAc,EAAW,UAAAL,CAAU,CAAC,EAAI,GAAGO,EAAO,KAAK,eAAe,cAAeE,EAC3F,UAAAN,GAAWC,IAAmB,SAAWhB,EAACwB,EAAA,EAAQ,EAAKX,EACvDK,EACAH,GAAWC,IAAmB,SAAWhB,EAACwB,EAAA,EAAQ,EAAKV,GAC1D,EACF,CAEJ,CAMA,IAAMW,EAAkB,YAKlBC,EAAkB,aACtB,CAAC,CAAE,aAAAf,EAAc,UAAAC,EAAW,GAAGO,CAAM,EAAgCQ,IAAiB,CACpF,IAAMC,EAAUnB,EAAgBgB,EAAiBd,CAAY,EACvDkB,EAAmB9B,EAAgB4B,EAAcC,EAAQ,QAAQ,EAEvE,OAAO5B,EAAC,SAAM,IAAK6B,EAAkB,UAAWzB,EAAK,CAAE,UAAAQ,CAAU,CAAC,EAAG,KAAK,OAAQ,GAAGO,EAAO,CAC9F,CACF,EAEAO,EAAU,YAAc","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { tv, type VariantProps } from 'tailwind-variants';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { Spinner } from './spinner';\n\n/* -----------------------------------------------------------------------------\n * Variant: Input\n * -------------------------------------------------------------------------- */\n\nconst inputVariants = tv({\n slots: {\n root: 'border-input inline-flex w-full cursor-text items-center gap-3 rounded-md border bg-transparent px-3 shadow-sm transition focus-within:outline focus-within:outline-2 focus-within:outline-offset-2 has-[input[disabled]]:cursor-default has-[input[disabled]]:opacity-50 [&_svg]:size-4',\n slot: 'placeholder:text-muted-foreground size-full flex-1 bg-transparent text-sm outline-none file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:cursor-default',\n },\n variants: {\n inputSize: {\n default: {\n root: 'h-10',\n },\n xs: {\n root: 'h-8',\n },\n sm: {\n root: 'h-9',\n },\n lg: {\n root: 'h-11',\n },\n },\n },\n defaultVariants: {\n inputSize: 'default',\n },\n});\n\ntype InputVariantsProps = VariantProps<typeof inputVariants>;\n\nconst { root, slot } = inputVariants();\n\n/* -----------------------------------------------------------------------------\n * Context: Input\n * -------------------------------------------------------------------------- */\n\nconst INPUT_NAME = 'Input';\n\ntype ScopedProps<P> = P & { __scopeInput?: Scope };\nconst [createInputContext, createInputScope] = createContextScope(INPUT_NAME);\n\ninterface InputContextValue {\n inputRef: React.RefObject<HTMLInputElement>;\n disabled?: boolean;\n}\n\nconst [InputProvider, useInputContext] = createInputContext<InputContextValue>(INPUT_NAME);\n\n/* -----------------------------------------------------------------------------\n * Component: Input\n * -------------------------------------------------------------------------- */\n\ninterface InputProps extends React.PropsWithChildren, InputVariantsProps {\n className?: string | undefined;\n loaderPosition?: 'prefix' | 'suffix';\n loading?: boolean;\n prefix?: React.ReactNode;\n suffix?: React.ReactNode;\n}\n\nfunction Input({\n __scopeInput,\n className,\n prefix,\n suffix,\n loading,\n loaderPosition,\n inputSize,\n children,\n ...props\n}: ScopedProps<InputProps>): React.JSX.Element {\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n const handlePointerDown: React.PointerEventHandler<HTMLDivElement> = (event) => {\n const target = event.target as HTMLElement;\n\n if (target.closest('input, a, button')) {\n return;\n }\n\n const inputElement = inputRef.current;\n\n if (!inputElement) {\n return;\n }\n\n requestAnimationFrame(() => {\n inputElement.focus();\n });\n };\n\n return (\n <InputProvider inputRef={inputRef} scope={__scopeInput}>\n <div className={root({ inputSize, className })} {...props} role=\"presentation\" onPointerDown={handlePointerDown}>\n {loading && loaderPosition === 'prefix' ? <Spinner /> : prefix}\n {children}\n {loading && loaderPosition === 'suffix' ? <Spinner /> : suffix}\n </div>\n </InputProvider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: InputSlot\n * -------------------------------------------------------------------------- */\n\nconst INPUT_SLOT_NAME = 'InputSlot';\n\ntype InputSlotElement = HTMLInputElement;\ntype InputSlotProps = React.InputHTMLAttributes<HTMLInputElement>;\n\nconst InputSlot = React.forwardRef<InputSlotElement, InputSlotProps>(\n ({ __scopeInput, className, ...props }: ScopedProps<InputSlotProps>, forwardedRef) => {\n const context = useInputContext(INPUT_SLOT_NAME, __scopeInput);\n const composedInputRef = useComposedRefs(forwardedRef, context.inputRef);\n\n return <input ref={composedInputRef} className={slot({ className })} type=\"text\" {...props} />;\n },\n);\n\nInputSlot.displayName = 'Input';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n createInputScope,\n Input,\n InputSlot,\n inputVariants,\n type InputProps,\n type InputSlotProps,\n type InputVariantsProps,\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/dialog.tsx"],"names":["React","DialogPrimitive","Cross2Icon","jsx","jsxs","Dialog","DialogTrigger","DialogClose","DialogContent","children","className","props","forwardedRef","cn","DialogHeader","DialogBody","DialogFooter","DialogTitle","DialogDescription"],"mappings":"oCAEA,UAAYA,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,cAAAC,MAAkB,wBA4CjB,OACE,OAAAC,EADF,QAAAC,MAAA,oBApCV,IAAMC,EAAyB,OAOzBC,EAAgC,UAOhCC,EAA8B,QAS9BC,EAAsB,aAC1B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAClCT,EAAiB,SAAhB,CACC,SAAAA,EAAiB,UAAhB,CAAwB,UAAU,mPACjC,SAAAC,EAAiB,UAAhB,CACC,IAAKQ,EACL,UAAWC,EACT,yVACAH,CACF,EACC,GAAGC,EAEH,UAAAF,EACDL,EAAiB,QAAhB,CAAsB,UAAU,8PAC/B,UAAAD,EAACD,EAAA,CAAW,UAAU,SAAS,EAC/BC,EAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,EACF,EACF,CAEJ,EAEAK,EAAc,YAA8B,UAAQ,YAQpD,SAASM,EAAa,CAAE,UAAAJ,EAAW,GAAGC,CAAM,EAAyC,CACnF,OACER,EAAC,UACC,UAAWU,EAAG,yEAA0EH,CAAS,EAChG,GAAGC,EACN,CAEJ,CAQA,SAASI,EAAW,CAAE,UAAAL,EAAW,GAAGC,CAAM,EAAuC,CAC/E,OAAOR,EAAC,QAAK,UAAWU,EAAG,0BAA2BH,CAAS,EAAI,GAAGC,EAAO,CAC/E,CAQA,SAASK,EAAa,CAAE,UAAAN,EAAW,GAAGC,CAAM,EAAyC,CACnF,OACER,EAAC,UACC,UAAWU,EAAG,iFAAkFH,CAAS,EACxG,GAAGC,EACN,CAEJ,CASA,IAAMM,EAAoB,aAAiD,CAAC,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAGC,IACnGT,EAAiB,QAAhB,CACC,IAAKS,EACL,UAAWC,EAAG,oDAAqDH,CAAS,EAC3E,GAAGC,EACN,CACD,EAEDM,EAAY,YAA8B,QAAM,YAShD,IAAMC,EAA0B,aAC9B,CAAC,CAAE,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,cAAhB,CACC,IAAKS,EACL,UAAWC,EAAG,gCAAiCH,CAAS,EACvD,GAAGC,EACN,CAEJ,EAEAO,EAAkB,YAA8B,cAAY","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { Cross2Icon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Dialog\n * -------------------------------------------------------------------------- */\n\ntype DialogProps = React.ComponentProps<typeof DialogPrimitive.Root>;\nconst Dialog = DialogPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTrigger\n * -------------------------------------------------------------------------- */\n\ntype DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;\nconst DialogTrigger = DialogPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogClose\n * -------------------------------------------------------------------------- */\n\ntype DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;\nconst DialogClose = DialogPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogContent\n * -------------------------------------------------------------------------- */\n\ntype DialogContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;\n\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay className=\"data-[state=open]:animate-duration-200 data-[state=closed]:animate-duration-200 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 grid place-items-center overflow-auto bg-black/80 p-4 sm:pb-12 sm:pt-8\">\n <DialogPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95 data-[state=open]:animate-duration-200 data-[state=closed]:animate-duration-200 data-[state=open]:fade-in data-[state=closed]:animate-out data-[state=closed]:fade-out relative z-50 flex w-full max-w-lg flex-col rounded-lg border shadow-lg',\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm p-1 opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPrimitive.Overlay>\n </DialogPrimitive.Portal>\n ),\n);\n\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogHeader\n * -------------------------------------------------------------------------- */\n\ntype DialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogHeader({ className, ...props }: DialogHeaderProps): React.JSX.Element {\n return (\n <header\n className={cn('flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogBody\n * -------------------------------------------------------------------------- */\n\ntype DialogBodyProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogBody({ className, ...props }: DialogBodyProps): React.JSX.Element {\n return <main className={cn('overflow-auto px-6 py-2', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogFooter\n * -------------------------------------------------------------------------- */\n\ntype DialogFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogFooter({ className, ...props }: DialogFooterProps): React.JSX.Element {\n return (\n <footer\n className={cn('flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTitle\n * -------------------------------------------------------------------------- */\n\ntype DialogTitleElement = React.ElementRef<typeof DialogPrimitive.Title>;\ntype DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;\n\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>(({ className, ...props }, forwardedRef) => (\n <DialogPrimitive.Title\n ref={forwardedRef}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n));\n\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogDescription\n * -------------------------------------------------------------------------- */\n\ntype DialogDescriptionElement = React.ElementRef<typeof DialogPrimitive.Description>;\ntype DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;\n\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>(\n ({ className, ...props }, forwardedRef) => (\n <DialogPrimitive.Description\n ref={forwardedRef}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n ),\n);\n\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Dialog,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogBody,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n type DialogProps,\n type DialogTriggerProps,\n type DialogCloseProps,\n type DialogContentProps,\n type DialogHeaderProps,\n type DialogBodyProps,\n type DialogFooterProps,\n type DialogTitleProps,\n type DialogDescriptionProps,\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/select.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { CaretSortIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon } from '@radix-ui/react-icons';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Select\n * -------------------------------------------------------------------------- */\n\ntype SelectProps = React.ComponentProps<typeof SelectPrimitive.Root>;\nconst Select = SelectPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectGroup\n * -------------------------------------------------------------------------- */\n\ntype SelectGroupProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Group>;\nconst SelectGroup = SelectPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectValue\n * -------------------------------------------------------------------------- */\n\ntype SelectValueProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Value>;\nconst SelectValue = SelectPrimitive.Value;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectTrigger\n * -------------------------------------------------------------------------- */\n\ntype SelectTriggerElement = React.ElementRef<typeof SelectPrimitive.Trigger>;\ntype SelectTriggerProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>;\n\nconst SelectTrigger = React.forwardRef<SelectTriggerElement, SelectTriggerProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <SelectPrimitive.Trigger\n ref={forwardedRef}\n className={cn(\n 'border-input placeholder:text-muted-foreground flex h-10 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border bg-transparent px-3 text-sm shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:truncate',\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <CaretSortIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n ),\n);\n\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectScrollUpButton\n * -------------------------------------------------------------------------- */\n\ntype SelectScrollUpButtonElement = React.ElementRef<typeof SelectPrimitive.ScrollUpButton>;\ntype SelectScrollUpButtonProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>;\n\nconst SelectScrollUpButton = React.forwardRef<SelectScrollUpButtonElement, SelectScrollUpButtonProps>(\n ({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.ScrollUpButton\n ref={forwardedRef}\n className={cn('flex cursor-pointer items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUpIcon />\n </SelectPrimitive.ScrollUpButton>\n ),\n);\n\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectScrollDownButton\n * -------------------------------------------------------------------------- */\n\ntype SelectScrollDownButtonElement = React.ElementRef<typeof SelectPrimitive.ScrollDownButton>;\ntype SelectScrollDownButtonProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>;\n\nconst SelectScrollDownButton = React.forwardRef<SelectScrollDownButtonElement, SelectScrollDownButtonProps>(\n ({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.ScrollDownButton\n ref={forwardedRef}\n className={cn('flex cursor-pointer items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDownIcon />\n </SelectPrimitive.ScrollDownButton>\n ),\n);\n\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectContent\n * -------------------------------------------------------------------------- */\n\ntype SelectContentElement = React.ElementRef<typeof SelectPrimitive.Content>;\ntype SelectContentProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>;\n\nconst SelectContent = React.forwardRef<SelectContentElement, SelectContentProps>(\n ({ children, className, position = 'popper', ...props }, forwardedRef) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n ),\n);\n\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectLabel\n * -------------------------------------------------------------------------- */\n\ntype SelectLabelElement = React.ElementRef<typeof SelectPrimitive.Label>;\ntype SelectLabelProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>;\n\nconst SelectLabel = React.forwardRef<SelectLabelElement, SelectLabelProps>(({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.Label ref={forwardedRef} className={cn('px-2 py-1.5 text-sm font-semibold', className)} {...props} />\n));\n\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectItem\n * -------------------------------------------------------------------------- */\n\ntype SelectItemElement = React.ElementRef<typeof SelectPrimitive.Item>;\ntype SelectItemProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>;\n\nconst SelectItem = React.forwardRef<SelectItemElement, SelectItemProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <SelectPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n ),\n);\n\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectSeparator\n * -------------------------------------------------------------------------- */\n\ntype SelectSeparatorElement = React.ElementRef<typeof SelectPrimitive.Separator>;\ntype SelectSeparatorProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>;\n\nconst SelectSeparator = React.forwardRef<SelectSeparatorElement, SelectSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.Separator ref={forwardedRef} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n ),\n);\n\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n type SelectProps,\n type SelectGroupProps,\n type SelectValueProps,\n type SelectTriggerProps,\n type SelectContentProps,\n type SelectLabelProps,\n type SelectItemProps,\n type SelectSeparatorProps,\n type SelectScrollUpButtonProps,\n type SelectScrollDownButtonProps,\n};\n"],"mappings":"wCAEA,UAAYA,MAAW,QACvB,OAAS,iBAAAC,EAAe,aAAAC,EAAW,mBAAAC,EAAiB,iBAAAC,MAAqB,wBACzE,UAAYC,MAAqB,yBAiC7B,OAUI,OAAAC,EAVJ,QAAAC,MAAA,oBAzBJ,IAAMC,EAAyB,OAOzBC,EAA8B,QAO9BC,EAA8B,QAS9BC,EAAsB,aAC1B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAClCR,EAAiB,UAAhB,CACC,IAAKQ,EACL,UAAWC,EACT,gVACAH,CACF,EACC,GAAGC,EAEH,UAAAF,EACDN,EAAiB,OAAhB,CAAqB,QAAO,GAC3B,SAAAA,EAACW,EAAA,CAAc,UAAU,oBAAoB,EAC/C,GACF,CAEJ,EAEAN,EAAc,YAA8B,UAAQ,YASpD,IAAMO,EAA6B,aACjC,CAAC,CAAE,UAAAL,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,iBAAhB,CACC,IAAKS,EACL,UAAWC,EAAG,uDAAwDH,CAAS,EAC9E,GAAGC,EAEJ,SAAAR,EAACa,EAAA,EAAc,EACjB,CAEJ,EAEAD,EAAqB,YAA8B,iBAAe,YASlE,IAAME,EAA+B,aACnC,CAAC,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,mBAAhB,CACC,IAAKS,EACL,UAAWC,EAAG,uDAAwDH,CAAS,EAC9E,GAAGC,EAEJ,SAAAR,EAACe,EAAA,EAAgB,EACnB,CAEJ,EAEAD,EAAuB,YAA8B,mBAAiB,YAStE,IAAME,EAAsB,aAC1B,CAAC,CAAE,SAAAV,EAAU,UAAAC,EAAW,SAAAU,EAAW,SAAU,GAAGT,CAAM,EAAGC,IACvDT,EAAiB,SAAhB,CACC,SAAAC,EAAiB,UAAhB,CACC,IAAKQ,EACL,UAAWC,EACT,8uBACAO,IAAa,UACX,kIACFV,CACF,EACA,SAAUU,EACT,GAAGT,EAEJ,UAAAR,EAACY,EAAA,EAAqB,EACtBZ,EAAiB,WAAhB,CACC,UAAWU,EACT,MACAO,IAAa,UACX,yFACJ,EAEC,SAAAX,EACH,EACAN,EAACc,EAAA,EAAuB,GAC1B,EACF,CAEJ,EAEAE,EAAc,YAA8B,UAAQ,YASpD,IAAME,EAAoB,aAAiD,CAAC,CAAE,UAAAX,EAAW,GAAGC,CAAM,EAAGC,IACnGT,EAAiB,QAAhB,CAAsB,IAAKS,EAAc,UAAWC,EAAG,oCAAqCH,CAAS,EAAI,GAAGC,EAAO,CACrH,EAEDU,EAAY,YAA8B,QAAM,YAShD,IAAMC,EAAmB,aACvB,CAAC,CAAE,SAAAb,EAAU,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAClCR,EAAiB,OAAhB,CACC,IAAKQ,EACL,UAAWC,EACT,8NACAH,CACF,EACC,GAAGC,EAEJ,UAAAR,EAAC,QAAK,UAAU,6DACd,SAAAA,EAAiB,gBAAhB,CACC,SAAAA,EAACoB,EAAA,CAAU,UAAU,SAAS,EAChC,EACF,EACApB,EAAiB,WAAhB,CAA0B,SAAAM,EAAS,GACtC,CAEJ,EAEAa,EAAW,YAA8B,OAAK,YAS9C,IAAME,EAAwB,aAC5B,CAAC,CAAE,UAAAd,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,YAAhB,CAA0B,IAAKS,EAAc,UAAWC,EAAG,2BAA4BH,CAAS,EAAI,GAAGC,EAAO,CAEnH,EAEAa,EAAgB,YAA8B,YAAU","names":["React","CaretSortIcon","CheckIcon","ChevronDownIcon","ChevronUpIcon","SelectPrimitive","jsx","jsxs","Select","SelectGroup","SelectValue","SelectTrigger","children","className","props","forwardedRef","cn","CaretSortIcon","SelectScrollUpButton","ChevronUpIcon","SelectScrollDownButton","ChevronDownIcon","SelectContent","position","SelectLabel","SelectItem","CheckIcon","SelectSeparator"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/input.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { tv, type VariantProps } from 'tailwind-variants';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { Spinner } from './spinner';\n\n/* -----------------------------------------------------------------------------\n * Variant: Input\n * -------------------------------------------------------------------------- */\n\nconst inputVariants = tv({\n slots: {\n root: 'border-input inline-flex w-full cursor-text items-center gap-3 rounded-md border bg-transparent px-3 shadow-sm transition focus-within:outline focus-within:outline-2 focus-within:outline-offset-2 has-[input[disabled]]:cursor-default has-[input[disabled]]:opacity-50 [&_svg]:size-4',\n slot: 'placeholder:text-muted-foreground size-full flex-1 bg-transparent text-sm outline-none file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:cursor-default',\n },\n variants: {\n inputSize: {\n default: {\n root: 'h-10',\n },\n xs: {\n root: 'h-8',\n },\n sm: {\n root: 'h-9',\n },\n lg: {\n root: 'h-11',\n },\n },\n },\n defaultVariants: {\n inputSize: 'default',\n },\n});\n\ntype InputVariantsProps = VariantProps<typeof inputVariants>;\n\nconst { root, slot } = inputVariants();\n\n/* -----------------------------------------------------------------------------\n * Context: Input\n * -------------------------------------------------------------------------- */\n\nconst INPUT_NAME = 'Input';\n\ntype ScopedProps<P> = P & { __scopeInput?: Scope };\nconst [createInputContext, createInputScope] = createContextScope(INPUT_NAME);\n\ninterface InputContextValue {\n inputRef: React.RefObject<HTMLInputElement>;\n disabled?: boolean;\n}\n\nconst [InputProvider, useInputContext] = createInputContext<InputContextValue>(INPUT_NAME);\n\n/* -----------------------------------------------------------------------------\n * Component: Input\n * -------------------------------------------------------------------------- */\n\ninterface InputProps extends React.PropsWithChildren, InputVariantsProps {\n className?: string | undefined;\n loaderPosition?: 'prefix' | 'suffix';\n loading?: boolean;\n prefix?: React.ReactNode;\n suffix?: React.ReactNode;\n}\n\nfunction Input({\n __scopeInput,\n className,\n prefix,\n suffix,\n loading,\n loaderPosition,\n inputSize,\n children,\n ...props\n}: ScopedProps<InputProps>): React.JSX.Element {\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n const handlePointerDown: React.PointerEventHandler<HTMLDivElement> = (event) => {\n const target = event.target as HTMLElement;\n\n if (target.closest('input, a, button')) {\n return;\n }\n\n const inputElement = inputRef.current;\n\n if (!inputElement) {\n return;\n }\n\n requestAnimationFrame(() => {\n inputElement.focus();\n });\n };\n\n return (\n <InputProvider inputRef={inputRef} scope={__scopeInput}>\n <div className={root({ inputSize, className })} {...props} role=\"presentation\" onPointerDown={handlePointerDown}>\n {loading && loaderPosition === 'prefix' ? <Spinner /> : prefix}\n {children}\n {loading && loaderPosition === 'suffix' ? <Spinner /> : suffix}\n </div>\n </InputProvider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: InputSlot\n * -------------------------------------------------------------------------- */\n\nconst INPUT_SLOT_NAME = 'InputSlot';\n\ntype InputSlotElement = HTMLInputElement;\ntype InputSlotProps = React.InputHTMLAttributes<HTMLInputElement>;\n\nconst InputSlot = React.forwardRef<InputSlotElement, InputSlotProps>(\n ({ __scopeInput, className, ...props }: ScopedProps<InputSlotProps>, forwardedRef) => {\n const context = useInputContext(INPUT_SLOT_NAME, __scopeInput);\n const composedInputRef = useComposedRefs(forwardedRef, context.inputRef);\n\n return <input ref={composedInputRef} className={slot({ className })} type=\"text\" {...props} />;\n },\n);\n\nInputSlot.displayName = 'Input';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n createInputScope,\n Input,\n InputSlot,\n inputVariants,\n type InputProps,\n type InputSlotProps,\n type InputVariantsProps,\n};\n"],"mappings":"wCAEA,UAAYA,MAAW,QACvB,OAAS,MAAAC,MAA6B,oBACtC,OAAS,sBAAAC,MAAsC,0BAC/C,OAAS,mBAAAC,MAAuB,+BAkG1B,OAC4C,OAAAC,EAD5C,QAAAC,MAAA,oBA3FN,IAAMC,EAAgBC,EAAG,CACvB,MAAO,CACL,KAAM,2RACN,KAAM,gLACR,EACA,SAAU,CACR,UAAW,CACT,QAAS,CACP,KAAM,MACR,EACA,GAAI,CACF,KAAM,KACR,EACA,GAAI,CACF,KAAM,KACR,EACA,GAAI,CACF,KAAM,MACR,CACF,CACF,EACA,gBAAiB,CACf,UAAW,SACb,CACF,CAAC,EAIK,CAAE,KAAAC,EAAM,KAAAC,CAAK,EAAIH,EAAc,EAM/BI,EAAa,QAGb,CAACC,EAAoBC,CAAgB,EAAIC,EAAmBH,CAAU,EAOtE,CAACI,EAAeC,CAAe,EAAIJ,EAAsCD,CAAU,EAczF,SAASM,EAAM,CACb,aAAAC,EACA,UAAAC,EACA,OAAAC,EACA,OAAAC,EACA,QAAAC,EACA,eAAAC,EACA,UAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EAA+C,CAC7C,IAAMC,EAAiB,SAAyB,IAAI,EAE9CC,EAAgEC,GAAU,CAG9E,GAFeA,EAAM,OAEV,QAAQ,kBAAkB,EACnC,OAGF,IAAMC,EAAeH,EAAS,QAEzBG,GAIL,sBAAsB,IAAM,CAC1BA,EAAa,MAAM,CACrB,CAAC,CACH,EAEA,OACEzB,EAACU,EAAA,CAAc,SAAUY,EAAU,MAAOT,EACxC,SAAAZ,EAAC,OAAI,UAAWG,EAAK,CAAE,UAAAe,EAAW,UAAAL,CAAU,CAAC,EAAI,GAAGO,EAAO,KAAK,eAAe,cAAeE,EAC3F,UAAAN,GAAWC,IAAmB,SAAWlB,EAAC0B,EAAA,EAAQ,EAAKX,EACvDK,EACAH,GAAWC,IAAmB,SAAWlB,EAAC0B,EAAA,EAAQ,EAAKV,GAC1D,EACF,CAEJ,CAMA,IAAMW,EAAkB,YAKlBC,EAAkB,aACtB,CAAC,CAAE,aAAAf,EAAc,UAAAC,EAAW,GAAGO,CAAM,EAAgCQ,IAAiB,CACpF,IAAMC,EAAUnB,EAAgBgB,EAAiBd,CAAY,EACvDkB,EAAmBC,EAAgBH,EAAcC,EAAQ,QAAQ,EAEvE,OAAO9B,EAAC,SAAM,IAAK+B,EAAkB,UAAW1B,EAAK,CAAE,UAAAS,CAAU,CAAC,EAAG,KAAK,OAAQ,GAAGO,EAAO,CAC9F,CACF,EAEAO,EAAU,YAAc","names":["React","tv","createContextScope","useComposedRefs","jsx","jsxs","inputVariants","tv","root","slot","INPUT_NAME","createInputContext","createInputScope","createContextScope","InputProvider","useInputContext","Input","__scopeInput","className","prefix","suffix","loading","loaderPosition","inputSize","children","props","inputRef","handlePointerDown","event","inputElement","Spinner","INPUT_SLOT_NAME","InputSlot","forwardedRef","context","composedInputRef","useComposedRefs"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/dialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { Cross2Icon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Dialog\n * -------------------------------------------------------------------------- */\n\ntype DialogProps = React.ComponentProps<typeof DialogPrimitive.Root>;\nconst Dialog = DialogPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTrigger\n * -------------------------------------------------------------------------- */\n\ntype DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;\nconst DialogTrigger = DialogPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogClose\n * -------------------------------------------------------------------------- */\n\ntype DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;\nconst DialogClose = DialogPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogContent\n * -------------------------------------------------------------------------- */\n\ntype DialogContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;\n\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay className=\"data-[state=open]:animate-duration-200 data-[state=closed]:animate-duration-200 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 grid place-items-center overflow-auto bg-black/80 p-4 sm:pb-12 sm:pt-8\">\n <DialogPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95 data-[state=open]:animate-duration-200 data-[state=closed]:animate-duration-200 data-[state=open]:fade-in data-[state=closed]:animate-out data-[state=closed]:fade-out relative z-50 flex w-full max-w-lg flex-col rounded-lg border shadow-lg',\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm p-1 opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPrimitive.Overlay>\n </DialogPrimitive.Portal>\n ),\n);\n\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogHeader\n * -------------------------------------------------------------------------- */\n\ntype DialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogHeader({ className, ...props }: DialogHeaderProps): React.JSX.Element {\n return (\n <header\n className={cn('flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogBody\n * -------------------------------------------------------------------------- */\n\ntype DialogBodyProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogBody({ className, ...props }: DialogBodyProps): React.JSX.Element {\n return <main className={cn('overflow-auto px-6 py-2', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogFooter\n * -------------------------------------------------------------------------- */\n\ntype DialogFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogFooter({ className, ...props }: DialogFooterProps): React.JSX.Element {\n return (\n <footer\n className={cn('flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTitle\n * -------------------------------------------------------------------------- */\n\ntype DialogTitleElement = React.ElementRef<typeof DialogPrimitive.Title>;\ntype DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;\n\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>(({ className, ...props }, forwardedRef) => (\n <DialogPrimitive.Title\n ref={forwardedRef}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n));\n\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogDescription\n * -------------------------------------------------------------------------- */\n\ntype DialogDescriptionElement = React.ElementRef<typeof DialogPrimitive.Description>;\ntype DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;\n\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>(\n ({ className, ...props }, forwardedRef) => (\n <DialogPrimitive.Description\n ref={forwardedRef}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n ),\n);\n\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Dialog,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogBody,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n type DialogProps,\n type DialogTriggerProps,\n type DialogCloseProps,\n type DialogContentProps,\n type DialogHeaderProps,\n type DialogBodyProps,\n type DialogFooterProps,\n type DialogTitleProps,\n type DialogDescriptionProps,\n};\n"],"mappings":"mCAEA,UAAYA,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,cAAAC,MAAkB,wBA4CjB,OACE,OAAAC,EADF,QAAAC,MAAA,oBApCV,IAAMC,EAAyB,OAOzBC,EAAgC,UAOhCC,EAA8B,QAS9BC,EAAsB,aAC1B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAClCT,EAAiB,SAAhB,CACC,SAAAA,EAAiB,UAAhB,CAAwB,UAAU,mPACjC,SAAAC,EAAiB,UAAhB,CACC,IAAKQ,EACL,UAAWC,EACT,yVACAH,CACF,EACC,GAAGC,EAEH,UAAAF,EACDL,EAAiB,QAAhB,CAAsB,UAAU,8PAC/B,UAAAD,EAACW,EAAA,CAAW,UAAU,SAAS,EAC/BX,EAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,EACF,EACF,CAEJ,EAEAK,EAAc,YAA8B,UAAQ,YAQpD,SAASO,EAAa,CAAE,UAAAL,EAAW,GAAGC,CAAM,EAAyC,CACnF,OACER,EAAC,UACC,UAAWU,EAAG,yEAA0EH,CAAS,EAChG,GAAGC,EACN,CAEJ,CAQA,SAASK,EAAW,CAAE,UAAAN,EAAW,GAAGC,CAAM,EAAuC,CAC/E,OAAOR,EAAC,QAAK,UAAWU,EAAG,0BAA2BH,CAAS,EAAI,GAAGC,EAAO,CAC/E,CAQA,SAASM,EAAa,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAyC,CACnF,OACER,EAAC,UACC,UAAWU,EAAG,iFAAkFH,CAAS,EACxG,GAAGC,EACN,CAEJ,CASA,IAAMO,EAAoB,aAAiD,CAAC,CAAE,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IACnGT,EAAiB,QAAhB,CACC,IAAKS,EACL,UAAWC,EAAG,oDAAqDH,CAAS,EAC3E,GAAGC,EACN,CACD,EAEDO,EAAY,YAA8B,QAAM,YAShD,IAAMC,EAA0B,aAC9B,CAAC,CAAE,UAAAT,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,cAAhB,CACC,IAAKS,EACL,UAAWC,EAAG,gCAAiCH,CAAS,EACvD,GAAGC,EACN,CAEJ,EAEAQ,EAAkB,YAA8B,cAAY","names":["React","DialogPrimitive","Cross2Icon","jsx","jsxs","Dialog","DialogTrigger","DialogClose","DialogContent","children","className","props","forwardedRef","cn","Cross2Icon","DialogHeader","DialogBody","DialogFooter","DialogTitle","DialogDescription"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/dropdown-menu.tsx"],"names":["React","DropdownMenuPrimitive","CheckIcon","ChevronRightIcon","DotFilledIcon","jsx","jsxs","DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","children","className","inset","props","forwardedRef","cn","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":"yCAEA,UAAYA,MAAW,QACvB,UAAYC,MAA2B,gCACvC,OAAS,aAAAC,EAAW,oBAAAC,EAAkB,iBAAAC,MAAqB,wBAkDvD,OAUE,OAAAC,EAVF,QAAAC,MAAA,oBA1CJ,IAAMC,EAAqC,OAOrCC,EAA4C,UAO5CC,EAA0C,QAO1CC,EAAwC,MAOxCC,EAA+C,aAY/CC,EAA+B,aACnC,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IACzCX,EAAuB,aAAtB,CACC,IAAKW,EACL,UAAWC,EACT,6IACAH,GAAS,OACTD,CACF,EACC,GAAGE,EAEH,UAAAH,EACDR,EAACF,EAAA,CAAiB,UAAU,iBAAiB,GAC/C,CAEJ,EAEAS,EAAuB,YAAoC,aAAW,YAQtE,IAAMO,EAA+B,aAGnC,CAAC,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAGC,IAC1BZ,EAAuB,SAAtB,CACC,SAAAA,EAAuB,aAAtB,CACC,IAAKY,EACL,UAAWC,EACT,gtBACAJ,CACF,EACC,GAAGE,EACN,EACF,CACD,EAEDG,EAAuB,YAAoC,aAAW,YAStE,IAAMC,EAA4B,aAChC,CAAC,CAAE,UAAAN,EAAW,WAAAO,EAAa,EAAG,GAAGL,CAAM,EAAGC,IACxCZ,EAAuB,SAAtB,CACC,SAAAA,EAAuB,UAAtB,CACC,IAAKY,EACL,UAAWC,EACT,gtBACAJ,CACF,EACA,WAAYO,EACX,GAAGL,EACN,EACF,CAEJ,EAEAI,EAAoB,YAAoC,UAAQ,YAYhE,IAAME,EAAyB,aAC7B,CAAC,CAAE,UAAAR,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IAC/BZ,EAAuB,OAAtB,CACC,IAAKY,EACL,UAAWC,EACT,6NACAH,GAAS,OACTD,CACF,EACC,GAAGE,EACN,CAEJ,EAEAM,EAAiB,YAAoC,OAAK,YAS1D,IAAMC,EAAiC,aACrC,CAAC,CAAE,SAAAV,EAAU,UAAAC,EAAW,QAAAU,EAAS,GAAGR,CAAM,EAAGC,IAC3CX,EAAuB,eAAtB,CACC,IAAKW,EACL,QAASO,EACT,UAAWN,EACT,kOACAJ,CACF,EACC,GAAGE,EAEJ,UAAAX,EAAC,QAAK,UAAU,4DACd,SAAAA,EAAuB,gBAAtB,CACC,SAAAA,EAACH,EAAA,CAAU,UAAU,SAAS,EAChC,EACF,EACCW,GACH,CAEJ,EAEAU,EAAyB,YAAoC,eAAa,YAS1E,IAAME,EAA8B,aAClC,CAAC,CAAE,SAAAZ,EAAU,UAAAC,EAAW,GAAGE,CAAM,EAAGC,IAClCX,EAAuB,YAAtB,CACC,IAAKW,EACL,UAAWC,EACT,kOACAJ,CACF,EACC,GAAGE,EAEJ,UAAAX,EAAC,QAAK,UAAU,4DACd,SAAAA,EAAuB,gBAAtB,CACC,SAAAA,EAACD,EAAA,CAAc,UAAU,sBAAsB,EACjD,EACF,EACCS,GACH,CAEJ,EAEAY,EAAsB,YAAoC,YAAU,YAYpE,IAAMC,EAA0B,aAC9B,CAAC,CAAE,UAAAZ,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IAC/BZ,EAAuB,QAAtB,CACC,IAAKY,EACL,UAAWC,EAAG,oCAAqCH,GAAS,OAAQD,CAAS,EAC5E,GAAGE,EACN,CAEJ,EAEAU,EAAkB,YAAoC,QAAM,YAS5D,IAAMC,EAA8B,aAClC,CAAC,CAAE,UAAAb,EAAW,GAAGE,CAAM,EAAGC,IACxBZ,EAAuB,YAAtB,CACC,IAAKY,EACL,UAAWC,EAAG,2BAA4BJ,CAAS,EAClD,GAAGE,EACN,CAEJ,EAEAW,EAAsB,YAAoC,YAAU,YAQpE,SAASC,EAAqB,CAAE,UAAAd,EAAW,GAAGE,CAAM,EAAiD,CACnG,OAAOX,EAAC,QAAK,UAAWa,EAAG,6CAA8CJ,CAAS,EAAI,GAAGE,EAAO,CAClG","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenu\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuProps = React.ComponentProps<typeof DropdownMenuPrimitive.Root>;\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuTrigger\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuTriggerProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuGroup\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuGroupProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSub\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSubProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub>;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSubTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>;\n\ninterface DropdownMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst DropdownMenuSubTrigger = React.forwardRef<DropdownMenuSubTriggerElement, DropdownMenuSubTriggerProps>(\n ({ children, className, inset, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent data-[state=open]:bg-accent flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n ),\n);\n\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubContent\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSubContentProps = DropdownMenuPrimitive.DropdownMenuSubContentProps;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n DropdownMenuSubContentProps\n>(({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.SubContent\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\n\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuContent\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuContentElement = React.ElementRef<typeof DropdownMenuPrimitive.Content>;\ntype DropdownMenuContentProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>;\n\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n ({ className, sideOffset = 6, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n ),\n);\n\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuItem\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuItemElement = React.ElementRef<typeof DropdownMenuPrimitive.Item>;\n\ninterface DropdownMenuItemProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {\n inset?: boolean;\n}\n\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n ),\n);\n\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>;\ntype DropdownMenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<DropdownMenuCheckboxItemElement, DropdownMenuCheckboxItemProps>(\n ({ children, className, checked, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={forwardedRef}\n checked={checked}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n ),\n);\n\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuRadioItem\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>;\ntype DropdownMenuRadioItemProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>;\n\nconst DropdownMenuRadioItem = React.forwardRef<DropdownMenuRadioItemElement, DropdownMenuRadioItemProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.RadioItem\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n ),\n);\n\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuLabel\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof DropdownMenuPrimitive.Label>;\n\ninterface DropdownMenuLabelProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {\n inset?: boolean;\n}\n\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Label\n ref={forwardedRef}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n ),\n);\n\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSeparator\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof DropdownMenuPrimitive.Separator>;\ntype DropdownMenuSeparatorProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>;\n\nconst DropdownMenuSeparator = React.forwardRef<DropdownMenuSeparatorElement, DropdownMenuSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Separator\n ref={forwardedRef}\n className={cn('bg-muted -mx-1 my-1 h-px', className)}\n {...props}\n />\n ),\n);\n\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuShortcut\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps): React.JSX.Element {\n return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n type DropdownMenuProps,\n type DropdownMenuTriggerProps,\n type DropdownMenuContentProps,\n type DropdownMenuItemProps,\n type DropdownMenuCheckboxItemProps,\n type DropdownMenuRadioItemProps,\n type DropdownMenuLabelProps,\n type DropdownMenuSeparatorProps,\n type DropdownMenuShortcutProps,\n type DropdownMenuGroupProps,\n type DropdownMenuSubProps,\n type DropdownMenuSubContentProps,\n type DropdownMenuSubTriggerProps,\n type DropdownMenuRadioGroupProps,\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/label.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Label\n * -------------------------------------------------------------------------- */\n\ntype LabelElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype LabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst Label = React.forwardRef<LabelElement, LabelProps>(({ className, ...props }, forwardedRef) => (\n <LabelPrimitive.Root\n ref={forwardedRef}\n className={cn(\n 'text-sm font-medium leading-none peer-disabled:pointer-events-none peer-disabled:opacity-70',\n className,\n )}\n {...props}\n />\n));\n\nLabel.displayName = LabelPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Label, type LabelProps };\n"],"mappings":"wCAEA,UAAYA,MAAW,QACvB,UAAYC,MAAoB,wBAW9B,cAAAC,MAAA,oBADF,IAAMC,EAAc,aAAqC,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACjFJ,EAAgB,OAAf,CACC,IAAKI,EACL,UAAWC,EACT,8FACAH,CACF,EACC,GAAGC,EACN,CACD,EAEDF,EAAM,YAA6B,OAAK","names":["React","LabelPrimitive","jsx","Label","className","props","forwardedRef","cn"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/spinner.tsx"],"names":["React","VisuallyHidden","jsx","jsxs","spinnerCount","Spinner","children","className","loading","props","forwardedRef","spinner","cn","_","i"],"mappings":"yCAAA,UAAYA,MAAW,QACvB,OAAS,kBAAAC,MAAsB,kCA4BrB,cAAAC,EAqBJ,QAAAC,MArBI,oBArBV,IAAMC,EAAe,EAQfC,EAAgB,aACpB,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAU,GAAM,GAAGC,CAAM,EAAGC,IAAiB,CACnE,GAAI,CAACF,EACH,OAAOF,EAGT,IAAMK,EACJT,EAAC,QACC,IAAKQ,EACL,UAAWE,EAAG,8DAA+DL,CAAS,EACrF,GAAGE,EAEH,eAAM,KAAK,CAAE,OAAQL,CAAa,EAAG,CAACS,EAAGC,IACxCZ,EAAC,QAEC,UAAU,kSACV,MACE,CACE,MAAO,IAAI,IAAME,GAAc,SAAS,CAAC,IACzC,kBAAmB,MAAMA,EAAeU,GAAK,KAAK,SAAS,CAAC,KAC5D,mBAAoB,IAAK,IAAMV,EAAgBU,GAAG,SAAS,CAAC,MAC5D,qBAAsB,IAAIV,EAAe,KAAK,SAAS,CAAC,IAC1D,GARGU,CAUP,CACD,EACH,EAGF,OAAIR,IAAa,OACRK,EAIPR,EAAC,QAAK,UAAU,WACd,UAAAD,EAAC,QAAK,cAAW,GAAC,UAAU,qBACzB,SAAAI,EACH,EACAJ,EAACD,EAAA,CAAgB,SAAAK,EAAS,EAC1BJ,EAAC,QAAK,UAAU,oDAAqD,SAAAS,EAAQ,GAC/E,CAEJ,CACF,EAEAN,EAAQ,YAAc","sourcesContent":["import * as React from 'react';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Spinner\n * -------------------------------------------------------------------------- */\n\nconst spinnerCount = 8;\n\ntype SpinnerElement = HTMLSpanElement;\n\ninterface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {\n loading?: boolean;\n}\n\nconst Spinner = React.forwardRef<SpinnerElement, SpinnerProps>(\n ({ children, className, loading = true, ...props }, forwardedRef) => {\n if (!loading) {\n return children;\n }\n\n const spinner = (\n <span\n ref={forwardedRef}\n className={cn('relative flex size-4 items-center justify-center opacity-60', className)}\n {...props}\n >\n {Array.from({ length: spinnerCount }, (_, i) => (\n <span\n key={i}\n className=\"before:fade-out-25 before:animate-out before:animate-repeat-infinite before:animate-delay-[var(--spinner-delay)] before:animate-duration-[var(--spinner-duration)] absolute h-full rotate-[var(--spinner-rotate)] before:block before:h-1/3 before:w-full before:rounded-full before:bg-current\"\n style={\n {\n width: `${(100 / spinnerCount).toString()}%`,\n '--spinner-delay': `-${((spinnerCount - i) * 100).toString()}ms`,\n '--spinner-rotate': `${((360 / spinnerCount) * i).toString()}deg`,\n '--spinner-duration': `${(spinnerCount * 100).toString()}ms`,\n } as React.CSSProperties\n }\n />\n ))}\n </span>\n );\n\n if (children === undefined) {\n return spinner;\n }\n\n return (\n <span className=\"relative\">\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">{spinner}</span>\n </span>\n );\n },\n);\n\nSpinner.displayName = 'Spinner';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Spinner, type SpinnerProps };\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/spinner.tsx"],"sourcesContent":["import * as React from 'react';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Spinner\n * -------------------------------------------------------------------------- */\n\nconst spinnerCount = 8;\n\ntype SpinnerElement = HTMLSpanElement;\n\ninterface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {\n loading?: boolean;\n}\n\nconst Spinner = React.forwardRef<SpinnerElement, SpinnerProps>(\n ({ children, className, loading = true, ...props }, forwardedRef) => {\n if (!loading) {\n return children;\n }\n\n const spinner = (\n <span\n ref={forwardedRef}\n className={cn('relative flex size-4 items-center justify-center opacity-60', className)}\n {...props}\n >\n {Array.from({ length: spinnerCount }, (_, i) => (\n <span\n key={i}\n className=\"before:fade-out-25 before:animate-out before:animate-repeat-infinite before:animate-delay-[var(--spinner-delay)] before:animate-duration-[var(--spinner-duration)] absolute h-full rotate-[var(--spinner-rotate)] before:block before:h-1/3 before:w-full before:rounded-full before:bg-current\"\n style={\n {\n width: `${(100 / spinnerCount).toString()}%`,\n '--spinner-delay': `-${((spinnerCount - i) * 100).toString()}ms`,\n '--spinner-rotate': `${((360 / spinnerCount) * i).toString()}deg`,\n '--spinner-duration': `${(spinnerCount * 100).toString()}ms`,\n } as React.CSSProperties\n }\n />\n ))}\n </span>\n );\n\n if (children === undefined) {\n return spinner;\n }\n\n return (\n <span className=\"relative\">\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">{spinner}</span>\n </span>\n );\n },\n);\n\nSpinner.displayName = 'Spinner';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Spinner, type SpinnerProps };\n"],"mappings":"wCAAA,UAAYA,MAAW,QACvB,OAAS,kBAAAC,MAAsB,kCA4BrB,cAAAC,EAqBJ,QAAAC,MArBI,oBArBV,IAAMC,EAAe,EAQfC,EAAgB,aACpB,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAU,GAAM,GAAGC,CAAM,EAAGC,IAAiB,CACnE,GAAI,CAACF,EACH,OAAOF,EAGT,IAAMK,EACJT,EAAC,QACC,IAAKQ,EACL,UAAWE,EAAG,8DAA+DL,CAAS,EACrF,GAAGE,EAEH,eAAM,KAAK,CAAE,OAAQL,CAAa,EAAG,CAACS,EAAGC,IACxCZ,EAAC,QAEC,UAAU,kSACV,MACE,CACE,MAAO,IAAI,IAAME,GAAc,SAAS,CAAC,IACzC,kBAAmB,MAAMA,EAAeU,GAAK,KAAK,SAAS,CAAC,KAC5D,mBAAoB,IAAK,IAAMV,EAAgBU,GAAG,SAAS,CAAC,MAC5D,qBAAsB,IAAIV,EAAe,KAAK,SAAS,CAAC,IAC1D,GARGU,CAUP,CACD,EACH,EAGF,OAAIR,IAAa,OACRK,EAIPR,EAAC,QAAK,UAAU,WACd,UAAAD,EAAC,QAAK,cAAW,GAAC,UAAU,qBACzB,SAAAI,EACH,EACAJ,EAACa,EAAA,CAAgB,SAAAT,EAAS,EAC1BJ,EAAC,QAAK,UAAU,oDAAqD,SAAAS,EAAQ,GAC/E,CAEJ,CACF,EAEAN,EAAQ,YAAc","names":["React","VisuallyHidden","jsx","jsxs","spinnerCount","Spinner","children","className","loading","props","forwardedRef","spinner","cn","_","i","VisuallyHidden"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/label.tsx"],"names":["React","LabelPrimitive","jsx","Label","className","props","forwardedRef","cn"],"mappings":"yCAEA,UAAYA,MAAW,QACvB,UAAYC,MAAoB,wBAW9B,cAAAC,MAAA,oBADF,IAAMC,EAAc,aAAqC,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACjFJ,EAAgB,OAAf,CACC,IAAKI,EACL,UAAWC,EACT,8FACAH,CACF,EACC,GAAGC,EACN,CACD,EAEDF,EAAM,YAA6B,OAAK","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Label\n * -------------------------------------------------------------------------- */\n\ntype LabelElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype LabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst Label = React.forwardRef<LabelElement, LabelProps>(({ className, ...props }, forwardedRef) => (\n <LabelPrimitive.Root\n ref={forwardedRef}\n className={cn(\n 'text-sm font-medium leading-none peer-disabled:pointer-events-none peer-disabled:opacity-70',\n className,\n )}\n {...props}\n />\n));\n\nLabel.displayName = LabelPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Label, type LabelProps };\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport { tv, type VariantProps } from 'tailwind-variants';\nimport { Spinner } from './spinner';\n\n/* -----------------------------------------------------------------------------\n * Variant: Button\n * -------------------------------------------------------------------------- */\n\nconst buttonVariants = tv({\n base: 'inline-flex select-none items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50',\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90 shadow',\n destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm',\n ghost: 'text-foreground hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n outline:\n 'border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground border shadow-sm',\n secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm',\n },\n size: {\n default: 'h-10 gap-2 px-4',\n xs: 'h-8 gap-1 px-2',\n sm: 'h-9 gap-2 px-3',\n lg: 'h-11 gap-2 px-8',\n icon: 'size-10',\n 'icon-xs': 'size-8',\n 'icon-sm': 'size-9',\n 'icon-lg': 'size-11',\n },\n loading: {\n true: 'relative',\n },\n },\n defaultVariants: {\n size: 'default',\n variant: 'default',\n loading: false,\n },\n});\n\ntype ButtonVariantsProps = VariantProps<typeof buttonVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Button\n * -------------------------------------------------------------------------- */\n\ntype ButtonElement = HTMLButtonElement;\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, ButtonVariantsProps {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<ButtonElement, ButtonProps>(\n ({ children, className, variant, size, loading = false, asChild = false, ...props }, forwardedRef) => {\n const Component = asChild ? Slot : 'button';\n const ComponentLoading = asChild ? 'span' : React.Fragment;\n const disabled = loading || props.disabled;\n\n return (\n <Component\n ref={forwardedRef}\n className={buttonVariants({ variant, size, loading, className })}\n type={asChild ? undefined : 'button'}\n {...props}\n disabled={disabled}\n >\n {loading ? (\n <ComponentLoading>\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">\n <Spinner />\n </span>\n </ComponentLoading>\n ) : (\n children\n )}\n </Component>\n );\n },\n);\n\nButton.displayName = 'Button';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Button, buttonVariants, type ButtonProps, type ButtonVariantsProps };\n"],"mappings":"mCAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,kBAAAC,MAAsB,kCAC/B,OAAS,MAAAC,MAA6B,oBAmE5B,OACE,OAAAC,EADF,QAAAC,MAAA,oBA5DV,IAAMC,EAAiBC,EAAG,CACxB,KAAM,gPACN,SAAU,CACR,QAAS,CACP,QAAS,gEACT,YAAa,+EACb,MAAO,+DACP,KAAM,kDACN,QACE,2GACF,UAAW,wEACb,EACA,KAAM,CACJ,QAAS,kBACT,GAAI,iBACJ,GAAI,iBACJ,GAAI,kBACJ,KAAM,UACN,UAAW,SACX,UAAW,SACX,UAAW,SACb,EACA,QAAS,CACP,KAAM,UACR,CACF,EACA,gBAAiB,CACf,KAAM,UACN,QAAS,UACT,QAAS,EACX,CACF,CAAC,EAcKC,EAAe,aACnB,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,IAAiB,CACpG,IAAMC,EAAYH,EAAUI,EAAO,SAC7BC,EAAmBL,EAAU,OAAe,WAC5CM,EAAWP,GAAWE,EAAM,SAElC,OACEX,EAACa,EAAA,CACC,IAAKD,EACL,UAAWV,EAAe,CAAE,QAAAK,EAAS,KAAAC,EAAM,QAAAC,EAAS,UAAAH,CAAU,CAAC,EAC/D,KAAMI,EAAU,OAAY,SAC3B,GAAGC,EACJ,SAAUK,EAET,SAAAP,EACCR,EAACc,EAAA,CACC,UAAAf,EAAC,QAAK,cAAW,GAAC,UAAU,qBACzB,SAAAK,EACH,EACAL,EAACiB,EAAA,CAAgB,SAAAZ,EAAS,EAC1BL,EAAC,QAAK,UAAU,oDACd,SAAAA,EAACkB,EAAA,EAAQ,EACX,GACF,EAEAb,EAEJ,CAEJ,CACF,EAEAD,EAAO,YAAc","names":["React","Slot","VisuallyHidden","tv","jsx","jsxs","buttonVariants","tv","Button","children","className","variant","size","loading","asChild","props","forwardedRef","Component","Slot","ComponentLoading","disabled","VisuallyHidden","Spinner"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/button.tsx"],"names":["React","Slot","VisuallyHidden","tv","jsx","jsxs","buttonVariants","Button","children","className","variant","size","loading","asChild","props","forwardedRef","Component","ComponentLoading","disabled","Spinner"],"mappings":"oCAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,kBAAAC,MAAsB,kCAC/B,OAAS,MAAAC,MAA6B,oBAmE5B,OACE,OAAAC,EADF,QAAAC,MAAA,oBA5DV,IAAMC,EAAiBH,EAAG,CACxB,KAAM,gPACN,SAAU,CACR,QAAS,CACP,QAAS,gEACT,YAAa,+EACb,MAAO,+DACP,KAAM,kDACN,QACE,2GACF,UAAW,wEACb,EACA,KAAM,CACJ,QAAS,kBACT,GAAI,iBACJ,GAAI,iBACJ,GAAI,kBACJ,KAAM,UACN,UAAW,SACX,UAAW,SACX,UAAW,SACb,EACA,QAAS,CACP,KAAM,UACR,CACF,EACA,gBAAiB,CACf,KAAM,UACN,QAAS,UACT,QAAS,EACX,CACF,CAAC,EAcKI,EAAe,aACnB,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,IAAiB,CACpG,IAAMC,EAAYH,EAAUZ,EAAO,SAC7BgB,EAAmBJ,EAAU,OAAe,WAC5CK,EAAWN,GAAWE,EAAM,SAElC,OACEV,EAACY,EAAA,CACC,IAAKD,EACL,UAAWT,EAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,QAAAC,EAAS,UAAAH,CAAU,CAAC,EAC/D,KAAMI,EAAU,OAAY,SAC3B,GAAGC,EACJ,SAAUI,EAET,SAAAN,EACCP,EAACY,EAAA,CACC,UAAAb,EAAC,QAAK,cAAW,GAAC,UAAU,qBACzB,SAAAI,EACH,EACAJ,EAACF,EAAA,CAAgB,SAAAM,EAAS,EAC1BJ,EAAC,QAAK,UAAU,oDACd,SAAAA,EAACe,EAAA,EAAQ,EACX,GACF,EAEAX,EAEJ,CAEJ,CACF,EAEAD,EAAO,YAAc","sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport { tv, type VariantProps } from 'tailwind-variants';\nimport { Spinner } from './spinner';\n\n/* -----------------------------------------------------------------------------\n * Variant: Button\n * -------------------------------------------------------------------------- */\n\nconst buttonVariants = tv({\n base: 'inline-flex select-none items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50',\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90 shadow',\n destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm',\n ghost: 'text-foreground hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n outline:\n 'border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground border shadow-sm',\n secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm',\n },\n size: {\n default: 'h-10 gap-2 px-4',\n xs: 'h-8 gap-1 px-2',\n sm: 'h-9 gap-2 px-3',\n lg: 'h-11 gap-2 px-8',\n icon: 'size-10',\n 'icon-xs': 'size-8',\n 'icon-sm': 'size-9',\n 'icon-lg': 'size-11',\n },\n loading: {\n true: 'relative',\n },\n },\n defaultVariants: {\n size: 'default',\n variant: 'default',\n loading: false,\n },\n});\n\ntype ButtonVariantsProps = VariantProps<typeof buttonVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Button\n * -------------------------------------------------------------------------- */\n\ntype ButtonElement = HTMLButtonElement;\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, ButtonVariantsProps {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<ButtonElement, ButtonProps>(\n ({ children, className, variant, size, loading = false, asChild = false, ...props }, forwardedRef) => {\n const Component = asChild ? Slot : 'button';\n const ComponentLoading = asChild ? 'span' : React.Fragment;\n const disabled = loading || props.disabled;\n\n return (\n <Component\n ref={forwardedRef}\n className={buttonVariants({ variant, size, loading, className })}\n type={asChild ? undefined : 'button'}\n {...props}\n disabled={disabled}\n >\n {loading ? (\n <ComponentLoading>\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">\n <Spinner />\n </span>\n </ComponentLoading>\n ) : (\n children\n )}\n </Component>\n );\n },\n);\n\nButton.displayName = 'Button';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Button, buttonVariants, type ButtonProps, type ButtonVariantsProps };\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/dropdown-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenu\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuProps = React.ComponentProps<typeof DropdownMenuPrimitive.Root>;\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuTrigger\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuTriggerProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuGroup\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuGroupProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSub\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSubProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub>;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSubTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>;\n\ninterface DropdownMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst DropdownMenuSubTrigger = React.forwardRef<DropdownMenuSubTriggerElement, DropdownMenuSubTriggerProps>(\n ({ children, className, inset, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent data-[state=open]:bg-accent flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n ),\n);\n\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubContent\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSubContentProps = DropdownMenuPrimitive.DropdownMenuSubContentProps;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n DropdownMenuSubContentProps\n>(({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.SubContent\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\n\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuContent\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuContentElement = React.ElementRef<typeof DropdownMenuPrimitive.Content>;\ntype DropdownMenuContentProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>;\n\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n ({ className, sideOffset = 6, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n ),\n);\n\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuItem\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuItemElement = React.ElementRef<typeof DropdownMenuPrimitive.Item>;\n\ninterface DropdownMenuItemProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {\n inset?: boolean;\n}\n\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n ),\n);\n\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>;\ntype DropdownMenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<DropdownMenuCheckboxItemElement, DropdownMenuCheckboxItemProps>(\n ({ children, className, checked, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={forwardedRef}\n checked={checked}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n ),\n);\n\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuRadioItem\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>;\ntype DropdownMenuRadioItemProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>;\n\nconst DropdownMenuRadioItem = React.forwardRef<DropdownMenuRadioItemElement, DropdownMenuRadioItemProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.RadioItem\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n ),\n);\n\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuLabel\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof DropdownMenuPrimitive.Label>;\n\ninterface DropdownMenuLabelProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {\n inset?: boolean;\n}\n\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Label\n ref={forwardedRef}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n ),\n);\n\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSeparator\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof DropdownMenuPrimitive.Separator>;\ntype DropdownMenuSeparatorProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>;\n\nconst DropdownMenuSeparator = React.forwardRef<DropdownMenuSeparatorElement, DropdownMenuSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Separator\n ref={forwardedRef}\n className={cn('bg-muted -mx-1 my-1 h-px', className)}\n {...props}\n />\n ),\n);\n\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuShortcut\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps): React.JSX.Element {\n return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n type DropdownMenuProps,\n type DropdownMenuTriggerProps,\n type DropdownMenuContentProps,\n type DropdownMenuItemProps,\n type DropdownMenuCheckboxItemProps,\n type DropdownMenuRadioItemProps,\n type DropdownMenuLabelProps,\n type DropdownMenuSeparatorProps,\n type DropdownMenuShortcutProps,\n type DropdownMenuGroupProps,\n type DropdownMenuSubProps,\n type DropdownMenuSubContentProps,\n type DropdownMenuSubTriggerProps,\n type DropdownMenuRadioGroupProps,\n};\n"],"mappings":"wCAEA,UAAYA,MAAW,QACvB,UAAYC,MAA2B,gCACvC,OAAS,aAAAC,EAAW,oBAAAC,EAAkB,iBAAAC,MAAqB,wBAkDvD,OAUE,OAAAC,EAVF,QAAAC,MAAA,oBA1CJ,IAAMC,EAAqC,OAOrCC,EAA4C,UAO5CC,EAA0C,QAO1CC,EAAwC,MAOxCC,EAA+C,aAY/CC,EAA+B,aACnC,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IACzCX,EAAuB,aAAtB,CACC,IAAKW,EACL,UAAWC,EACT,6IACAH,GAAS,OACTD,CACF,EACC,GAAGE,EAEH,UAAAH,EACDR,EAACc,EAAA,CAAiB,UAAU,iBAAiB,GAC/C,CAEJ,EAEAP,EAAuB,YAAoC,aAAW,YAQtE,IAAMQ,EAA+B,aAGnC,CAAC,CAAE,UAAAN,EAAW,GAAGE,CAAM,EAAGC,IAC1BZ,EAAuB,SAAtB,CACC,SAAAA,EAAuB,aAAtB,CACC,IAAKY,EACL,UAAWC,EACT,gtBACAJ,CACF,EACC,GAAGE,EACN,EACF,CACD,EAEDI,EAAuB,YAAoC,aAAW,YAStE,IAAMC,EAA4B,aAChC,CAAC,CAAE,UAAAP,EAAW,WAAAQ,EAAa,EAAG,GAAGN,CAAM,EAAGC,IACxCZ,EAAuB,SAAtB,CACC,SAAAA,EAAuB,UAAtB,CACC,IAAKY,EACL,UAAWC,EACT,gtBACAJ,CACF,EACA,WAAYQ,EACX,GAAGN,EACN,EACF,CAEJ,EAEAK,EAAoB,YAAoC,UAAQ,YAYhE,IAAME,EAAyB,aAC7B,CAAC,CAAE,UAAAT,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IAC/BZ,EAAuB,OAAtB,CACC,IAAKY,EACL,UAAWC,EACT,6NACAH,GAAS,OACTD,CACF,EACC,GAAGE,EACN,CAEJ,EAEAO,EAAiB,YAAoC,OAAK,YAS1D,IAAMC,EAAiC,aACrC,CAAC,CAAE,SAAAX,EAAU,UAAAC,EAAW,QAAAW,EAAS,GAAGT,CAAM,EAAGC,IAC3CX,EAAuB,eAAtB,CACC,IAAKW,EACL,QAASQ,EACT,UAAWP,EACT,kOACAJ,CACF,EACC,GAAGE,EAEJ,UAAAX,EAAC,QAAK,UAAU,4DACd,SAAAA,EAAuB,gBAAtB,CACC,SAAAA,EAACqB,EAAA,CAAU,UAAU,SAAS,EAChC,EACF,EACCb,GACH,CAEJ,EAEAW,EAAyB,YAAoC,eAAa,YAS1E,IAAMG,EAA8B,aAClC,CAAC,CAAE,SAAAd,EAAU,UAAAC,EAAW,GAAGE,CAAM,EAAGC,IAClCX,EAAuB,YAAtB,CACC,IAAKW,EACL,UAAWC,EACT,kOACAJ,CACF,EACC,GAAGE,EAEJ,UAAAX,EAAC,QAAK,UAAU,4DACd,SAAAA,EAAuB,gBAAtB,CACC,SAAAA,EAACuB,EAAA,CAAc,UAAU,sBAAsB,EACjD,EACF,EACCf,GACH,CAEJ,EAEAc,EAAsB,YAAoC,YAAU,YAYpE,IAAME,EAA0B,aAC9B,CAAC,CAAE,UAAAf,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IAC/BZ,EAAuB,QAAtB,CACC,IAAKY,EACL,UAAWC,EAAG,oCAAqCH,GAAS,OAAQD,CAAS,EAC5E,GAAGE,EACN,CAEJ,EAEAa,EAAkB,YAAoC,QAAM,YAS5D,IAAMC,EAA8B,aAClC,CAAC,CAAE,UAAAhB,EAAW,GAAGE,CAAM,EAAGC,IACxBZ,EAAuB,YAAtB,CACC,IAAKY,EACL,UAAWC,EAAG,2BAA4BJ,CAAS,EAClD,GAAGE,EACN,CAEJ,EAEAc,EAAsB,YAAoC,YAAU,YAQpE,SAASC,EAAqB,CAAE,UAAAjB,EAAW,GAAGE,CAAM,EAAiD,CACnG,OAAOX,EAAC,QAAK,UAAWa,EAAG,6CAA8CJ,CAAS,EAAI,GAAGE,EAAO,CAClG","names":["React","DropdownMenuPrimitive","CheckIcon","ChevronRightIcon","DotFilledIcon","jsx","jsxs","DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","children","className","inset","props","forwardedRef","cn","ChevronRightIcon","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","CheckIcon","DropdownMenuRadioItem","DotFilledIcon","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"]}