@oztix/roadie-components 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/dist/Accordion.d.ts +37 -0
  2. package/dist/Accordion.js +3 -0
  3. package/dist/Accordion.js.map +1 -0
  4. package/dist/Autocomplete.d.ts +131 -0
  5. package/dist/Autocomplete.js +3 -0
  6. package/dist/Autocomplete.js.map +1 -0
  7. package/dist/Badge.d.ts +22 -0
  8. package/dist/Badge.js +2 -0
  9. package/dist/Badge.js.map +1 -0
  10. package/dist/Breadcrumb.d.ts +43 -0
  11. package/dist/Breadcrumb.js +2 -0
  12. package/dist/Breadcrumb.js.map +1 -0
  13. package/dist/Button-DagX1D_q.d.ts +19 -0
  14. package/dist/Button.d.ts +11 -15
  15. package/dist/Button.js +1 -1
  16. package/dist/Card.d.ts +51 -0
  17. package/dist/Card.js +2 -0
  18. package/dist/Card.js.map +1 -0
  19. package/dist/Code.d.ts +14 -24
  20. package/dist/Code.js +1 -1
  21. package/dist/Combobox.d.ts +137 -0
  22. package/dist/Combobox.js +3 -0
  23. package/dist/Combobox.js.map +1 -0
  24. package/dist/Field.d.ts +71 -0
  25. package/dist/Field.js +3 -0
  26. package/dist/Field.js.map +1 -0
  27. package/dist/Fieldset.d.ts +36 -0
  28. package/dist/Fieldset.js +3 -0
  29. package/dist/Fieldset.js.map +1 -0
  30. package/dist/Highlight.d.ts +14 -36
  31. package/dist/Highlight.js +1 -1
  32. package/dist/Indicator.d.ts +17 -0
  33. package/dist/Indicator.js +2 -0
  34. package/dist/Indicator.js.map +1 -0
  35. package/dist/Input.d.ts +18 -0
  36. package/dist/Input.js +3 -0
  37. package/dist/Input.js.map +1 -0
  38. package/dist/Label.d.ts +11 -0
  39. package/dist/Label.js +2 -0
  40. package/dist/Label.js.map +1 -0
  41. package/dist/LinkButton.d.ts +35 -0
  42. package/dist/LinkButton.js +2 -0
  43. package/dist/LinkButton.js.map +1 -0
  44. package/dist/Mark.d.ts +15 -26
  45. package/dist/Mark.js +1 -1
  46. package/dist/Marquee.d.ts +21 -0
  47. package/dist/Marquee.js +3 -0
  48. package/dist/Marquee.js.map +1 -0
  49. package/dist/Prose.d.ts +22 -0
  50. package/dist/Prose.js +2 -0
  51. package/dist/Prose.js.map +1 -0
  52. package/dist/RadioGroup.d.ts +59 -0
  53. package/dist/RadioGroup.js +3 -0
  54. package/dist/RadioGroup.js.map +1 -0
  55. package/dist/Select.d.ts +144 -0
  56. package/dist/Select.js +3 -0
  57. package/dist/Select.js.map +1 -0
  58. package/dist/Separator.d.ts +16 -0
  59. package/dist/Separator.js +2 -0
  60. package/dist/Separator.js.map +1 -0
  61. package/dist/SpotIllustration.d.ts +59 -24
  62. package/dist/SpotIllustration.js +2 -1
  63. package/dist/SpotIllustration.js.map +1 -1
  64. package/dist/Steps.d.ts +105 -0
  65. package/dist/Steps.js +3 -0
  66. package/dist/Steps.js.map +1 -0
  67. package/dist/Textarea.d.ts +19 -0
  68. package/dist/Textarea.js +3 -0
  69. package/dist/Textarea.js.map +1 -0
  70. package/dist/_chunks/chunk-2MBFDJ6K.js +3 -0
  71. package/dist/_chunks/chunk-2MBFDJ6K.js.map +1 -0
  72. package/dist/_chunks/chunk-3HWPLULJ.js +2 -0
  73. package/dist/_chunks/chunk-3HWPLULJ.js.map +1 -0
  74. package/dist/_chunks/chunk-3NU36NBL.js +3 -0
  75. package/dist/_chunks/chunk-3NU36NBL.js.map +1 -0
  76. package/dist/_chunks/chunk-42UB7PQB.js +3 -0
  77. package/dist/_chunks/chunk-42UB7PQB.js.map +1 -0
  78. package/dist/_chunks/chunk-4LGCF3SN.js +3 -0
  79. package/dist/_chunks/chunk-4LGCF3SN.js.map +1 -0
  80. package/dist/_chunks/chunk-A6JSYXKN.js +2 -0
  81. package/dist/_chunks/chunk-A6JSYXKN.js.map +1 -0
  82. package/dist/_chunks/chunk-AFSDN4WI.js +2 -0
  83. package/dist/_chunks/chunk-AFSDN4WI.js.map +1 -0
  84. package/dist/_chunks/chunk-DRVUAPKN.js +2 -0
  85. package/dist/_chunks/chunk-DRVUAPKN.js.map +1 -0
  86. package/dist/_chunks/chunk-EKOEXSAP.js +2 -0
  87. package/dist/_chunks/chunk-EKOEXSAP.js.map +1 -0
  88. package/dist/_chunks/chunk-FQNVMKKV.js +7 -0
  89. package/dist/_chunks/chunk-FQNVMKKV.js.map +1 -0
  90. package/dist/_chunks/chunk-FSO4EAAY.js +3 -0
  91. package/dist/_chunks/chunk-FSO4EAAY.js.map +1 -0
  92. package/dist/_chunks/chunk-IEDKSZAQ.js +3 -0
  93. package/dist/_chunks/chunk-IEDKSZAQ.js.map +1 -0
  94. package/dist/_chunks/chunk-JBHYUOI2.js +3 -0
  95. package/dist/_chunks/chunk-JBHYUOI2.js.map +1 -0
  96. package/dist/_chunks/chunk-JGTZ3GCR.js +2 -0
  97. package/dist/_chunks/chunk-JGTZ3GCR.js.map +1 -0
  98. package/dist/_chunks/chunk-LHNOY24C.js +2 -0
  99. package/dist/_chunks/chunk-LHNOY24C.js.map +1 -0
  100. package/dist/_chunks/chunk-LMV3JECI.js +3 -0
  101. package/dist/_chunks/chunk-LMV3JECI.js.map +1 -0
  102. package/dist/_chunks/chunk-M4FEKBLW.js +2 -0
  103. package/dist/_chunks/chunk-M4FEKBLW.js.map +1 -0
  104. package/dist/_chunks/chunk-MDRAL676.js +3 -0
  105. package/dist/_chunks/chunk-MDRAL676.js.map +1 -0
  106. package/dist/_chunks/chunk-N2HGY7W7.js +3 -0
  107. package/dist/_chunks/chunk-N2HGY7W7.js.map +1 -0
  108. package/dist/_chunks/chunk-OIAETOZT.js +3 -0
  109. package/dist/_chunks/chunk-OIAETOZT.js.map +1 -0
  110. package/dist/_chunks/chunk-RXMWFJ6W.js +3 -0
  111. package/dist/_chunks/chunk-RXMWFJ6W.js.map +1 -0
  112. package/dist/_chunks/chunk-VSKUGXQG.js +3 -0
  113. package/dist/_chunks/chunk-VSKUGXQG.js.map +1 -0
  114. package/dist/_chunks/chunk-WOU2B425.js +3 -0
  115. package/dist/_chunks/chunk-WOU2B425.js.map +1 -0
  116. package/dist/_chunks/chunk-Y6TDYPCZ.js +3 -0
  117. package/dist/_chunks/chunk-Y6TDYPCZ.js.map +1 -0
  118. package/dist/_chunks/chunk-ZXR32FYA.js +2 -0
  119. package/dist/_chunks/chunk-ZXR32FYA.js.map +1 -0
  120. package/dist/index.d.ts +60 -15
  121. package/dist/index.js +34 -1
  122. package/dist/index.js.map +1 -1
  123. package/package.json +18 -22
  124. package/dist/Container.d.ts +0 -34
  125. package/dist/Container.js +0 -2
  126. package/dist/Container.js.map +0 -1
  127. package/dist/Heading.d.ts +0 -45
  128. package/dist/Heading.js +0 -2
  129. package/dist/Heading.js.map +0 -1
  130. package/dist/Text.d.ts +0 -47
  131. package/dist/Text.js +0 -2
  132. package/dist/Text.js.map +0 -1
  133. package/dist/View.d.ts +0 -12
  134. package/dist/View.js +0 -2
  135. package/dist/View.js.map +0 -1
  136. package/dist/_chunks/chunk-AZZHYO2A.js +0 -3
  137. package/dist/_chunks/chunk-AZZHYO2A.js.map +0 -1
  138. package/dist/_chunks/chunk-JOQJCXYF.js +0 -2
  139. package/dist/_chunks/chunk-JOQJCXYF.js.map +0 -1
  140. package/dist/_chunks/chunk-NMGF2AP6.js +0 -2
  141. package/dist/_chunks/chunk-NMGF2AP6.js.map +0 -1
  142. package/dist/_chunks/chunk-OH4JYS35.js +0 -3
  143. package/dist/_chunks/chunk-OH4JYS35.js.map +0 -1
  144. package/dist/_chunks/chunk-P5L5LN6E.js +0 -2
  145. package/dist/_chunks/chunk-P5L5LN6E.js.map +0 -1
  146. package/dist/_chunks/chunk-RJEJUZ3O.js +0 -2
  147. package/dist/_chunks/chunk-RJEJUZ3O.js.map +0 -1
  148. package/dist/_chunks/chunk-SUDUTP6A.js +0 -3
  149. package/dist/_chunks/chunk-SUDUTP6A.js.map +0 -1
  150. package/dist/_chunks/chunk-YNF56IUK.js +0 -2
  151. package/dist/_chunks/chunk-YNF56IUK.js.map +0 -1
  152. package/dist/_chunks/chunk-ZXS7U3VJ.js +0 -2
  153. package/dist/_chunks/chunk-ZXS7U3VJ.js.map +0 -1
  154. package/dist/hooks/index.d.ts +0 -27
  155. package/dist/hooks/index.js +0 -2
  156. package/dist/hooks/index.js.map +0 -1
  157. package/src/components/Button/Button.test.tsx +0 -156
  158. package/src/components/Button/Button.tsx +0 -12
  159. package/src/components/Button/IconButton.test.tsx +0 -234
  160. package/src/components/Button/IconButton.tsx +0 -14
  161. package/src/components/Button/index.tsx +0 -2
  162. package/src/components/Code/Code.test.tsx +0 -85
  163. package/src/components/Code/index.tsx +0 -37
  164. package/src/components/Container/Container.test.tsx +0 -241
  165. package/src/components/Container/index.tsx +0 -34
  166. package/src/components/Heading/Heading.test.tsx +0 -128
  167. package/src/components/Heading/index.tsx +0 -49
  168. package/src/components/Highlight/Highlight.test.tsx +0 -113
  169. package/src/components/Highlight/index.tsx +0 -96
  170. package/src/components/Mark/Mark.test.tsx +0 -82
  171. package/src/components/Mark/index.tsx +0 -33
  172. package/src/components/SpotIllustration/ArrowUpRight.tsx +0 -9
  173. package/src/components/SpotIllustration/CowboyHat.tsx +0 -6
  174. package/src/components/SpotIllustration/Cursor.tsx +0 -6
  175. package/src/components/SpotIllustration/FlowerSpiral.tsx +0 -9
  176. package/src/components/SpotIllustration/Football.tsx +0 -6
  177. package/src/components/SpotIllustration/Hand.tsx +0 -6
  178. package/src/components/SpotIllustration/Heart.tsx +0 -6
  179. package/src/components/SpotIllustration/HighFive.tsx +0 -6
  180. package/src/components/SpotIllustration/MapPin.tsx +0 -6
  181. package/src/components/SpotIllustration/NoteMusic.tsx +0 -6
  182. package/src/components/SpotIllustration/README.md +0 -280
  183. package/src/components/SpotIllustration/SpotIllustration.test.tsx +0 -179
  184. package/src/components/SpotIllustration/SpotIllustration.tsx +0 -96
  185. package/src/components/SpotIllustration/Ticket.tsx +0 -6
  186. package/src/components/SpotIllustration/WineGlass.tsx +0 -6
  187. package/src/components/SpotIllustration/createSpotIllustration.tsx +0 -46
  188. package/src/components/SpotIllustration/index.tsx +0 -42
  189. package/src/components/SpotIllustration/json/arrow-up-right.json +0 -34
  190. package/src/components/SpotIllustration/json/cowboy-hat.json +0 -34
  191. package/src/components/SpotIllustration/json/cursor.json +0 -34
  192. package/src/components/SpotIllustration/json/flower-spiral.json +0 -38
  193. package/src/components/SpotIllustration/json/football.json +0 -46
  194. package/src/components/SpotIllustration/json/hand.json +0 -22
  195. package/src/components/SpotIllustration/json/heart.json +0 -26
  196. package/src/components/SpotIllustration/json/high-five.json +0 -62
  197. package/src/components/SpotIllustration/json/map-pin.json +0 -26
  198. package/src/components/SpotIllustration/json/note-music.json +0 -42
  199. package/src/components/SpotIllustration/json/ticket.json +0 -42
  200. package/src/components/SpotIllustration/json/wine-glass.json +0 -34
  201. package/src/components/SpotIllustration/svgs/arrow-up-right.svg +0 -9
  202. package/src/components/SpotIllustration/svgs/cowboy-hat.svg +0 -9
  203. package/src/components/SpotIllustration/svgs/cursor.svg +0 -9
  204. package/src/components/SpotIllustration/svgs/flower-spiral.svg +0 -10
  205. package/src/components/SpotIllustration/svgs/football.svg +0 -12
  206. package/src/components/SpotIllustration/svgs/hand.svg +0 -6
  207. package/src/components/SpotIllustration/svgs/heart.svg +0 -7
  208. package/src/components/SpotIllustration/svgs/high-five.svg +0 -16
  209. package/src/components/SpotIllustration/svgs/map-pin.svg +0 -7
  210. package/src/components/SpotIllustration/svgs/note-music.svg +0 -11
  211. package/src/components/SpotIllustration/svgs/ticket.svg +0 -11
  212. package/src/components/SpotIllustration/svgs/wine-glass.svg +0 -9
  213. package/src/components/Text/Text.test.tsx +0 -121
  214. package/src/components/Text/index.tsx +0 -51
  215. package/src/components/View/View.test.tsx +0 -161
  216. package/src/components/View/index.tsx +0 -12
  217. package/src/components/index.ts +0 -17
  218. package/src/hooks/index.ts +0 -1
  219. package/src/hooks/useColorMode.ts +0 -37
  220. package/src/index.test.tsx +0 -37
  221. package/src/index.tsx +0 -9
@@ -0,0 +1,2 @@
1
+ import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var p=cva(["text-prose text-normal","[&_a]:underline [&_a]:underline-offset-2","[&_ul]:list-disc [&_ul]:pl-6","[&_ol]:list-decimal [&_ol]:pl-6","[&_blockquote]:border-l-[3px] [&_blockquote]:border-normal [&_blockquote]:pl-4 [&_blockquote]:text-subtle","[&_:not(pre)>code]:bg-subtler [&_:not(pre)>code]:rounded-md [&_:not(pre)>code]:px-1.5 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:text-[0.9em] [&_:not(pre)>code]:font-mono","[&_pre]:bg-sunken [&_pre]:rounded-lg [&_pre]:overflow-x-auto [&_pre]:font-mono","[&_img]:rounded-lg","[&_table]:w-full","[&_th]:text-left [&_th]:font-semibold [&_th]:border-b [&_th]:border-subtle","[&_td]:border-b [&_td]:border-subtler","[&_strong]:font-semibold [&_strong]:text-strong"],{variants:{size:{sm:["text-sm","[&>*+*]:mt-2","[&_h1]:text-display-ui-2 [&_h1]:text-strong [&_h1]:mt-4","[&_h2]:text-display-ui-3 [&_h2]:text-strong [&_h2]:mt-4","[&_h3]:text-display-ui-4 [&_h3]:text-strong [&_h3]:mt-3","[&_h4]:text-display-ui-5 [&_h4]:text-strong [&_h4]:mt-3","[&_h5]:text-display-ui-6 [&_h5]:text-strong [&_h5]:mt-2","[&_h6]:text-display-ui-6 [&_h6]:text-strong [&_h6]:mt-2","[&_ul>li+li]:mt-0.5 [&_ol>li+li]:mt-0.5","[&_pre]:p-3 [&_pre]:text-xs","[&_th]:py-1.5 [&_th]:pr-3 [&_td]:py-1.5 [&_td]:pr-3","[&_hr]:my-4"],md:["[&>*+*]:mt-4","[&_h1]:text-display-prose-1 [&_h1]:text-strong [&_h1]:mt-8","[&_h2]:text-display-prose-2 [&_h2]:text-strong [&_h2]:mt-8","[&_h3]:text-display-prose-3 [&_h3]:text-strong [&_h3]:mt-6","[&_h4]:text-display-prose-4 [&_h4]:text-strong [&_h4]:mt-6","[&_h5]:text-display-prose-5 [&_h5]:text-strong [&_h5]:mt-4","[&_h6]:text-display-prose-6 [&_h6]:text-strong [&_h6]:mt-4","[&_ul>li+li]:mt-1 [&_ol>li+li]:mt-1","[&_pre]:p-4 [&_pre]:text-sm","[&_th]:py-2 [&_th]:pr-4 [&_td]:py-2 [&_td]:pr-4","[&_hr]:my-8"],lg:["text-lg","[&>*+*]:mt-6","[&_h1]:text-display-prose-1 [&_h1]:text-strong [&_h1]:mt-12","[&_h2]:text-display-prose-2 [&_h2]:text-strong [&_h2]:mt-10","[&_h3]:text-display-prose-3 [&_h3]:text-strong [&_h3]:mt-8","[&_h4]:text-display-prose-4 [&_h4]:text-strong [&_h4]:mt-6","[&_h5]:text-display-prose-5 [&_h5]:text-strong [&_h5]:mt-6","[&_h6]:text-display-prose-6 [&_h6]:text-strong [&_h6]:mt-4","[&_ul>li+li]:mt-2 [&_ol>li+li]:mt-2","[&_pre]:p-6 [&_pre]:text-sm","[&_th]:py-3 [&_th]:pr-4 [&_td]:py-3 [&_td]:pr-4","[&_hr]:my-12"]}},defaultVariants:{size:"md"}});function l({as:t,className:e,size:o,..._}){return jsx(t||"div",{className:cn(p({size:o,className:e})),..._})}l.displayName="Prose";export{p as a,l as b};//# sourceMappingURL=chunk-ZXR32FYA.js.map
2
+ //# sourceMappingURL=chunk-ZXR32FYA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Prose/index.tsx"],"names":["proseVariants","cva","Prose","as","className","size","props","jsx","cn"],"mappings":"yHAMO,IAAMA,CAAAA,CAAgBC,GAAAA,CAC3B,CACE,wBAAA,CAEA,0CAAA,CAEA,8BAAA,CACA,iCAAA,CAEA,2GAAA,CAEA,8KAAA,CAEA,gFAAA,CAEA,oBAAA,CAEA,kBAAA,CACA,4EAAA,CACA,uCAAA,CAEA,iDACF,CAAA,CACA,CACE,SAAU,CACR,IAAA,CAAM,CACJ,EAAA,CAAI,CACF,SAAA,CACA,cAAA,CACA,yDAAA,CACA,yDAAA,CACA,yDAAA,CACA,yDAAA,CACA,yDAAA,CACA,yDAAA,CACA,yCAAA,CACA,6BAAA,CACA,qDAAA,CACA,aACF,CAAA,CACA,EAAA,CAAI,CACF,cAAA,CACA,4DAAA,CACA,4DAAA,CACA,4DAAA,CACA,4DAAA,CACA,4DAAA,CACA,4DAAA,CACA,qCAAA,CACA,6BAAA,CACA,iDAAA,CACA,aACF,CAAA,CACA,EAAA,CAAI,CACF,SAAA,CACA,cAAA,CACA,6DAAA,CACA,6DAAA,CACA,4DAAA,CACA,4DAAA,CACA,4DAAA,CACA,4DAAA,CACA,qCAAA,CACA,6BAAA,CACA,iDAAA,CACA,cACF,CACF,CACF,CAAA,CACA,eAAA,CAAiB,CACf,IAAA,CAAM,IACR,CACF,CACF,EAYO,SAASC,CAAAA,CAAqC,CACnD,EAAA,CAAAC,CAAAA,CACA,UAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAkB,CAEhB,OACEC,GAAAA,CAFgBJ,CAAAA,EAAM,KAAA,CAErB,CAAU,SAAA,CAAWK,EAAAA,CAAGR,CAAAA,CAAc,CAAE,IAAA,CAAAK,CAAAA,CAAM,SAAA,CAAAD,CAAU,CAAC,CAAC,CAAA,CAAI,GAAGE,CAAAA,CAAO,CAE7E,CAEAJ,CAAAA,CAAM,WAAA,CAAc,OAAA","file":"chunk-ZXR32FYA.js","sourcesContent":["import type { ComponentProps, ElementType } from 'react'\n\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nexport const proseVariants = cva(\n [\n 'text-prose text-normal',\n // Links\n '[&_a]:underline [&_a]:underline-offset-2',\n // Lists\n '[&_ul]:list-disc [&_ul]:pl-6',\n '[&_ol]:list-decimal [&_ol]:pl-6',\n // Blockquote\n '[&_blockquote]:border-l-[3px] [&_blockquote]:border-normal [&_blockquote]:pl-4 [&_blockquote]:text-subtle',\n // Code\n '[&_:not(pre)>code]:bg-subtler [&_:not(pre)>code]:rounded-md [&_:not(pre)>code]:px-1.5 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:text-[0.9em] [&_:not(pre)>code]:font-mono',\n // Pre\n '[&_pre]:bg-sunken [&_pre]:rounded-lg [&_pre]:overflow-x-auto [&_pre]:font-mono',\n // Images\n '[&_img]:rounded-lg',\n // Tables\n '[&_table]:w-full',\n '[&_th]:text-left [&_th]:font-semibold [&_th]:border-b [&_th]:border-subtle',\n '[&_td]:border-b [&_td]:border-subtler',\n // Strong/em\n '[&_strong]:font-semibold [&_strong]:text-strong'\n ],\n {\n variants: {\n size: {\n sm: [\n 'text-sm',\n '[&>*+*]:mt-2',\n '[&_h1]:text-display-ui-2 [&_h1]:text-strong [&_h1]:mt-4',\n '[&_h2]:text-display-ui-3 [&_h2]:text-strong [&_h2]:mt-4',\n '[&_h3]:text-display-ui-4 [&_h3]:text-strong [&_h3]:mt-3',\n '[&_h4]:text-display-ui-5 [&_h4]:text-strong [&_h4]:mt-3',\n '[&_h5]:text-display-ui-6 [&_h5]:text-strong [&_h5]:mt-2',\n '[&_h6]:text-display-ui-6 [&_h6]:text-strong [&_h6]:mt-2',\n '[&_ul>li+li]:mt-0.5 [&_ol>li+li]:mt-0.5',\n '[&_pre]:p-3 [&_pre]:text-xs',\n '[&_th]:py-1.5 [&_th]:pr-3 [&_td]:py-1.5 [&_td]:pr-3',\n '[&_hr]:my-4'\n ],\n md: [\n '[&>*+*]:mt-4',\n '[&_h1]:text-display-prose-1 [&_h1]:text-strong [&_h1]:mt-8',\n '[&_h2]:text-display-prose-2 [&_h2]:text-strong [&_h2]:mt-8',\n '[&_h3]:text-display-prose-3 [&_h3]:text-strong [&_h3]:mt-6',\n '[&_h4]:text-display-prose-4 [&_h4]:text-strong [&_h4]:mt-6',\n '[&_h5]:text-display-prose-5 [&_h5]:text-strong [&_h5]:mt-4',\n '[&_h6]:text-display-prose-6 [&_h6]:text-strong [&_h6]:mt-4',\n '[&_ul>li+li]:mt-1 [&_ol>li+li]:mt-1',\n '[&_pre]:p-4 [&_pre]:text-sm',\n '[&_th]:py-2 [&_th]:pr-4 [&_td]:py-2 [&_td]:pr-4',\n '[&_hr]:my-8'\n ],\n lg: [\n 'text-lg',\n '[&>*+*]:mt-6',\n '[&_h1]:text-display-prose-1 [&_h1]:text-strong [&_h1]:mt-12',\n '[&_h2]:text-display-prose-2 [&_h2]:text-strong [&_h2]:mt-10',\n '[&_h3]:text-display-prose-3 [&_h3]:text-strong [&_h3]:mt-8',\n '[&_h4]:text-display-prose-4 [&_h4]:text-strong [&_h4]:mt-6',\n '[&_h5]:text-display-prose-5 [&_h5]:text-strong [&_h5]:mt-6',\n '[&_h6]:text-display-prose-6 [&_h6]:text-strong [&_h6]:mt-4',\n '[&_ul>li+li]:mt-2 [&_ol>li+li]:mt-2',\n '[&_pre]:p-6 [&_pre]:text-sm',\n '[&_th]:py-3 [&_th]:pr-4 [&_td]:py-3 [&_td]:pr-4',\n '[&_hr]:my-12'\n ]\n }\n },\n defaultVariants: {\n size: 'md'\n }\n }\n)\n\nexport type ProseProps<T extends ElementType = 'div'> = {\n as?: T\n className?: string\n} & VariantProps<typeof proseVariants> &\n Omit<ComponentProps<T>, 'as' | 'className' | 'size'>\n\n/**\n * Prose container for long-form/rich content (CMS output, markdown, user HTML).\n * Applies semantic typography styles to nested HTML elements.\n */\nexport function Prose<T extends ElementType = 'div'>({\n as,\n className,\n size,\n ...props\n}: ProseProps<T>) {\n const Component = as || 'div'\n return (\n <Component className={cn(proseVariants({ size, className }))} {...props} />\n )\n}\n\nProse.displayName = 'Prose'\n"]}
package/dist/index.d.ts CHANGED
@@ -1,16 +1,61 @@
1
- export { Button, ButtonProps, IconButton, IconButtonProps } from './Button.js';
2
- export { Code, CodeProps } from './Code.js';
3
- export { Container, ContainerProps } from './Container.js';
4
- export { Heading, HeadingProps } from './Heading.js';
1
+ export { B as Button, a as ButtonProps, b as buttonVariants } from './Button-DagX1D_q.js';
2
+ export { IconButton, IconButtonProps } from './Button.js';
3
+ export { LinkButton, LinkButtonProps, LinkIconButton, LinkIconButtonProps } from './LinkButton.js';
4
+ export { Code, CodeProps, codeVariants } from './Code.js';
5
5
  export { Highlight, HighlightProps } from './Highlight.js';
6
- export { Mark, MarkProps } from './Mark.js';
7
- export { ArrowUpRight, ArrowUpRightProps, CowboyHat, CowboyHatProps, Cursor, CursorProps, FlowerSpiral, FlowerSpiralProps, Football, FootballProps, Hand, HandProps, Heart, HeartProps, HighFive, HighFiveProps, MapPin, MapPinProps, NoteMusic, NoteMusicProps, SpotIllustration, SpotIllustrationComponentProps, SpotIllustrationProps, Ticket, TicketProps, WineGlass, WineGlassProps, createSpotIllustration } from './SpotIllustration.js';
8
- export { Text, TextProps } from './Text.js';
9
- export { View, ViewProps } from './View.js';
10
- export { HighlightChunk, UseHighlightProps, useHighlight } from '@ark-ui/react/highlight';
11
- import '@oztix/roadie-core/jsx';
12
- import 'react';
13
- import 'react/jsx-runtime';
14
- import '@oztix/roadie-core';
15
- import '@oztix/roadie-core/recipes';
16
- import '@oztix/roadie-core/types';
6
+ export { Mark, MarkProps, markVariants } from './Mark.js';
7
+ export { Prose, ProseProps, proseVariants } from './Prose.js';
8
+ export { Accordion, AccordionProps, accordionVariants } from './Accordion.js';
9
+ export { Badge, BadgeProps, badgeVariants } from './Badge.js';
10
+ export { Breadcrumb, BreadcrumbSeparatorProps } from './Breadcrumb.js';
11
+ export { Card, CardProps, cardVariants } from './Card.js';
12
+ export { Separator, SeparatorProps, separatorVariants } from './Separator.js';
13
+ export { Marquee, MarqueeProps } from './Marquee.js';
14
+ export { Steps, StepsItemProps, StepsProps, stepsVariants } from './Steps.js';
15
+ export { OptionalIndicator, OptionalIndicatorProps, RequiredIndicator, RequiredIndicatorProps } from './Indicator.js';
16
+ export { Label, LabelProps } from './Label.js';
17
+ export { Input, InputProps, inputVariants } from './Input.js';
18
+ export { Textarea, TextareaProps, textareaVariants } from './Textarea.js';
19
+ export { Field, FieldErrorTextProps, FieldHelperTextProps, FieldLabelProps, FieldProps, useFieldContext, useFieldInputProps } from './Field.js';
20
+ export { Select, SelectContentProps, SelectErrorTextProps, SelectGroupLabelProps, SelectGroupProps, SelectHelperTextProps, SelectIconProps, SelectItemIndicatorProps, SelectItemProps, SelectItemTextProps, SelectLabelProps, SelectPopupProps, SelectPortalProps, SelectPositionerProps, SelectProps, SelectRootProps, SelectScrollDownArrowProps, SelectScrollUpArrowProps, SelectTriggerVariantProps as SelectTriggerProps, SelectValueProps, selectTriggerVariants } from './Select.js';
21
+ export { Combobox, ComboboxClearProps, ComboboxCollectionProps, ComboboxEmptyProps, ComboboxGroupLabelProps, ComboboxGroupProps, ComboboxInputGroupProps, ComboboxInputProps, ComboboxItemIndicatorProps, ComboboxItemProps, ComboboxLabelProps, ComboboxListProps, ComboboxPopupProps, ComboboxPortalProps, ComboboxPositionerProps, ComboboxProps, ComboboxRootProps, ComboboxStatusProps, ComboboxTriggerProps, comboboxInputGroupVariants, useFilter } from './Combobox.js';
22
+ export { Autocomplete, AutocompleteClearProps, AutocompleteCollectionProps, AutocompleteEmptyProps, AutocompleteGroupLabelProps, AutocompleteGroupProps, AutocompleteInputGroupProps, AutocompleteInputProps, AutocompleteItemProps, AutocompleteListProps, AutocompletePopupProps, AutocompletePortalProps, AutocompletePositionerProps, AutocompleteProps, AutocompleteRootProps, AutocompleteStatusProps, AutocompleteTriggerProps, AutocompleteValueProps, autocompleteInputGroupVariants, useFilteredItems } from './Autocomplete.js';
23
+ export { RadioGroup, RadioGroupErrorTextProps, RadioGroupHelperTextProps, RadioGroupItemProps, RadioGroupLabelProps, RadioGroupProps, radioGroupItemVariants, radioGroupVariants } from './RadioGroup.js';
24
+ export { Fieldset, FieldsetErrorTextProps, FieldsetHelperTextProps, FieldsetLegendProps, FieldsetProps } from './Fieldset.js';
25
+ import * as react_jsx_runtime from 'react/jsx-runtime';
26
+ import * as react from 'react';
27
+ export { UseStepsProps, UseStepsReturn, useSteps } from '@ark-ui/react/steps';
28
+ export { ComboboxFilter as Filter, ComboboxFilterOptions as FilterOptions } from '@base-ui/react/combobox';
29
+ export { getThemeScript } from '@oztix/roadie-core/theme';
30
+ import 'class-variance-authority/types';
31
+ import '@base-ui/react/button';
32
+ import 'class-variance-authority';
33
+ import '@base-ui/react/select';
34
+ import '@base-ui/react/autocomplete';
35
+ import '@base-ui/react/radio';
36
+ import '@base-ui/react/radio-group';
37
+
38
+ interface ThemeContextType {
39
+ accentColor: string;
40
+ setAccentColor: (color: string) => void;
41
+ isDark: boolean;
42
+ setDark: (dark: boolean) => void;
43
+ }
44
+ interface ThemeProviderProps {
45
+ children: react.ReactNode;
46
+ defaultAccentColor?: string;
47
+ /** Initial dark mode state when no stored preference exists (default: false) */
48
+ defaultDark?: boolean;
49
+ /** Respect prefers-color-scheme when no explicit user choice is stored (default: false) */
50
+ followSystem?: boolean;
51
+ }
52
+ /**
53
+ * Generate a <style> tag string for server-side rendering.
54
+ * Sets --accent-hue and --accent-chroma for CSS-native theming,
55
+ * plus hex fallbacks for older browsers.
56
+ */
57
+ declare function getAccentStyleTag(accentHex: string, id?: string): Promise<string>;
58
+ declare function ThemeProvider({ children, defaultAccentColor, defaultDark, followSystem }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
59
+ declare function useTheme(): ThemeContextType;
60
+
61
+ export { ThemeProvider, type ThemeProviderProps, getAccentStyleTag, useTheme };
package/dist/index.js CHANGED
@@ -1,2 +1,35 @@
1
- export{c as ArrowUpRight,d as CowboyHat,e as Cursor,f as FlowerSpiral,g as Football,h as Hand,i as Heart,j as HighFive,k as MapPin,l as NoteMusic,a as SpotIllustration,m as Ticket,n as WineGlass,b as createSpotIllustration}from'./_chunks/chunk-SUDUTP6A.js';export{a as Text}from'./_chunks/chunk-ZXS7U3VJ.js';export{a as View}from'./_chunks/chunk-RJEJUZ3O.js';export{a as Button,b as IconButton}from'./_chunks/chunk-NMGF2AP6.js';export{a as Code}from'./_chunks/chunk-P5L5LN6E.js';export{a as Container}from'./_chunks/chunk-JOQJCXYF.js';export{a as Heading}from'./_chunks/chunk-YNF56IUK.js';export{a as Highlight,b as useHighlight}from'./_chunks/chunk-AZZHYO2A.js';export{a as Mark}from'./_chunks/chunk-OH4JYS35.js';//# sourceMappingURL=index.js.map
1
+ export{a as Marquee}from'./_chunks/chunk-FQNVMKKV.js';export{b as Prose,a as proseVariants}from'./_chunks/chunk-ZXR32FYA.js';export{c as RadioGroup,b as radioGroupItemVariants,a as radioGroupVariants}from'./_chunks/chunk-3NU36NBL.js';export{t as Select,a as selectTriggerVariants}from'./_chunks/chunk-RXMWFJ6W.js';export{b as Separator,a as separatorVariants}from'./_chunks/chunk-JGTZ3GCR.js';export{c as Steps,b as stepsVariants,a as useSteps}from'./_chunks/chunk-2MBFDJ6K.js';export{t as Combobox,b as comboboxInputGroupVariants,a as useFilter}from'./_chunks/chunk-FSO4EAAY.js';export{a as Fieldset}from'./_chunks/chunk-42UB7PQB.js';export{a as Highlight}from'./_chunks/chunk-JBHYUOI2.js';export{b as Mark,a as markVariants}from'./_chunks/chunk-WOU2B425.js';export{a as LinkButton,b as LinkIconButton}from'./_chunks/chunk-A6JSYXKN.js';export{b as Accordion,a as accordionVariants}from'./_chunks/chunk-MDRAL676.js';export{t as Autocomplete,c as autocompleteInputGroupVariants,b as useFilteredItems}from'./_chunks/chunk-Y6TDYPCZ.js';export{c as Field,a as useFieldContext,b as useFieldInputProps}from'./_chunks/chunk-N2HGY7W7.js';export{b as Textarea,a as textareaVariants}from'./_chunks/chunk-OIAETOZT.js';export{b as OptionalIndicator,a as RequiredIndicator}from'./_chunks/chunk-LMV3JECI.js';export{b as Input,a as inputVariants}from'./_chunks/chunk-VSKUGXQG.js';export{a as Label}from'./_chunks/chunk-IEDKSZAQ.js';export{b as Badge,a as badgeVariants}from'./_chunks/chunk-AFSDN4WI.js';export{a as Breadcrumb}from'./_chunks/chunk-EKOEXSAP.js';export{a as IconButton}from'./_chunks/chunk-M4FEKBLW.js';export{b as Button,a as buttonVariants}from'./_chunks/chunk-3HWPLULJ.js';export{b as Card,a as cardVariants}from'./_chunks/chunk-LHNOY24C.js';export{b as Code,a as codeVariants}from'./_chunks/chunk-DRVUAPKN.js';import'./_chunks/chunk-4LGCF3SN.js';import*as t from'react';import {generateAccentScale,generateNeutralScale,getOklchHue,getOklchChroma}from'@oztix/roadie-core/colors';export{getThemeScript}from'@oztix/roadie-core/theme';import {jsx}from'react/jsx-runtime';var Ae="#0091EB",A="theme",$e=typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("color","oklch(0 0 0)"),$=t.createContext(void 0);async function Ee(o,y="roadie-accent-theme"){let u=await generateAccentScale(o),l=await generateNeutralScale(o),a=Math.round(await getOklchHue(o)),P=+(await getOklchChroma(o)).toFixed(4),m=u.light.map((e,p)=>`--color-accent-${p}: ${e};`).join(`
2
+ `),s=u.dark.map((e,p)=>`--color-accent-${p}: ${e};`).join(`
3
+ `),d=l.light.map((e,p)=>`--color-neutral-${p}: ${e};`).join(`
4
+ `),x=l.dark.map((e,p)=>`--color-neutral-${p}: ${e};`).join(`
5
+ `);return `<style id="${y.replace(/[<>"&]/g,"")}">
6
+ :root {
7
+ --accent-hue: ${a};
8
+ --accent-chroma: ${P};
9
+ ${d}
10
+ ${m}
11
+ }
12
+ .dark {
13
+ ${x}
14
+ ${s}
15
+ }
16
+ </style>`}function h(o){document.documentElement.classList.toggle("dark",o),document.documentElement.style.colorScheme=o?"dark":"light";}function S(){try{return localStorage.getItem(A)}catch{return null}}function Ve(o){try{localStorage.setItem(A,o?"dark":"light");}catch{}}function Re({children:o,defaultAccentColor:y=Ae,defaultDark:u=false,followSystem:l=false}){let[a,P]=t.useState(y),[m,s]=t.useState(u);t.useEffect(()=>{let r=S();if(r){s(r==="dark");return}if(l){let e=window.matchMedia("(prefers-color-scheme: dark)").matches;s(e),h(e);}else {let e=document.documentElement.classList.contains("dark");s(e);}},[]),t.useEffect(()=>{if(!l)return;let r=window.matchMedia("(prefers-color-scheme: dark)"),e=p=>{S()||(s(p.matches),h(p.matches));};return r.addEventListener("change",e),()=>r.removeEventListener("change",e)},[l]);let d=t.useCallback(r=>{s(r),h(r),Ve(r);},[]);t.useEffect(()=>{let r=false;async function e(){let p=Math.round(await getOklchHue(a)),E=+(await getOklchChroma(a)).toFixed(4);if(r||document.getElementById("roadie-accent-theme")?.textContent?.includes(`--accent-hue: ${p}`))return;let f;if($e)f=`
17
+ :root {
18
+ --accent-hue: ${p};
19
+ --accent-chroma: ${E};
20
+ }
21
+ `;else {let b=await generateAccentScale(a),g=await generateNeutralScale(a);if(r)return;let V=b.light.map((n,c)=>`--color-accent-${c}: ${n};`).join(`
22
+ `),R=b.dark.map((n,c)=>`--color-accent-${c}: ${n};`).join(`
23
+ `),L=g.light.map((n,c)=>`--color-neutral-${c}: ${n};`).join(`
24
+ `),F=g.dark.map((n,c)=>`--color-neutral-${c}: ${n};`).join(`
25
+ `);f=`
26
+ :root {
27
+ ${L}
28
+ ${V}
29
+ }
30
+ .dark {
31
+ ${F}
32
+ ${R}
33
+ }
34
+ `;}let i=document.getElementById("roadie-accent-theme");i||(i=document.createElement("style"),i.id="roadie-accent-theme",document.head.appendChild(i)),i.textContent=f;}return e(),()=>{r=true;}},[a]);let x=t.useMemo(()=>({accentColor:a,setAccentColor:P,isDark:m,setDark:d}),[a,m,d]);return jsx($.Provider,{value:x,children:o})}function Le(){let o=t.useContext($);if(!o)throw new Error("useTheme must be used within a ThemeProvider");return o}export{Re as ThemeProvider,Ee as getAccentStyleTag,Le as useTheme};//# sourceMappingURL=index.js.map
2
35
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
1
+ {"version":3,"sources":["../src/providers/ThemeProvider.tsx"],"names":["DEFAULT_ACCENT","THEME_STORAGE_KEY","supportsOklch","ThemeContext","getAccentStyleTag","accentHex","id","result","generateAccentScale","neutral","generateNeutralScale","hue","getOklchHue","chroma","getOklchChroma","accentVars","hex","i","darkAccentVars","neutralVars","darkNeutralVars","applyDark","dark","getStoredTheme","storeTheme","ThemeProvider","children","defaultAccentColor","defaultDark","followSystem","accentColor","setAccentColor","isDark","setIsDarkState","stored","prefersDark","domDark","mq","handler","e","setDark","cancelled","updateAccent","css","style","value","jsx","useTheme","context"],"mappings":"shEAaA,IAAMA,EAAAA,CAAiB,SAAA,CACjBC,CAAAA,CAAoB,QAEpBC,EAAAA,CACJ,OAAO,IAAQ,GAAA,EACf,OAAO,IAAI,QAAA,EAAa,UAAA,EACxB,IAAI,QAAA,CAAS,OAAA,CAAS,cAAc,CAAA,CAahCC,CAAAA,CAAqB,gBACzB,MACF,CAAA,CAoBA,eAAsBC,EAAAA,CACpBC,CAAAA,CACAC,CAAAA,CAAK,qBAAA,CACY,CACjB,IAAMC,CAAAA,CAAS,MAAMC,mBAAAA,CAAoBH,CAAS,EAC5CI,CAAAA,CAAU,MAAMC,qBAAqBL,CAAS,CAAA,CAC9CM,EAAM,IAAA,CAAK,KAAA,CAAM,MAAMC,WAAAA,CAAYP,CAAS,CAAC,CAAA,CAC7CQ,CAAAA,CAAS,CAAA,CAAE,MAAMC,eAAeT,CAAS,CAAA,EAAG,QAAQ,CAAC,CAAA,CAGrDU,EAAaR,CAAAA,CAAO,KAAA,CACvB,IAAI,CAACS,CAAAA,CAAKC,IAAM,CAAA,eAAA,EAAkBA,CAAC,KAAKD,CAAG,CAAA,CAAA,CAAG,EAC9C,IAAA,CAAK;AAAA,IAAA,CAAQ,CAAA,CACVE,CAAAA,CAAiBX,CAAAA,CAAO,IAAA,CAC3B,IAAI,CAACS,CAAAA,CAAKC,CAAAA,GAAM,CAAA,eAAA,EAAkBA,CAAC,CAAA,EAAA,EAAKD,CAAG,CAAA,CAAA,CAAG,EAC9C,IAAA,CAAK;AAAA,IAAA,CAAQ,CAAA,CAEVG,CAAAA,CAAcV,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AA,CAAQ,QAAA,CAAAnB,CAAAA,CAAS,CACxD,CAMO,SAASqB,IAAW,CACzB,IAAMC,EAAgB,CAAA,CAAA,UAAA,CAAW7C,CAAY,EAC7C,GAAI,CAAC6C,EACH,MAAM,IAAI,MAAM,8CAA8C,CAAA,CAEhE,OAAOA,CACT","file":"index.js","sourcesContent":["'use client'\n\nimport * as React from 'react'\n\nimport {\n generateAccentScale,\n generateNeutralScale,\n getOklchChroma,\n getOklchHue\n} from '@oztix/roadie-core/colors'\n\nexport { getThemeScript } from '@oztix/roadie-core/theme'\n\nconst DEFAULT_ACCENT = '#0091EB' // Oztix Blue\nconst THEME_STORAGE_KEY = 'theme'\n\nconst supportsOklch =\n typeof CSS !== 'undefined' &&\n typeof CSS.supports === 'function' &&\n CSS.supports('color', 'oklch(0 0 0)')\n\n// ---------------------------------------------------------------------------\n// Theme context (accent color + dark mode)\n// ---------------------------------------------------------------------------\n\ninterface ThemeContextType {\n accentColor: string\n setAccentColor: (color: string) => void\n isDark: boolean\n setDark: (dark: boolean) => void\n}\n\nconst ThemeContext = React.createContext<ThemeContextType | undefined>(\n undefined\n)\n\nexport interface ThemeProviderProps {\n children: React.ReactNode\n defaultAccentColor?: string\n /** Initial dark mode state when no stored preference exists (default: false) */\n defaultDark?: boolean\n /** Respect prefers-color-scheme when no explicit user choice is stored (default: false) */\n followSystem?: boolean\n}\n\n// ---------------------------------------------------------------------------\n// SSR helpers\n// ---------------------------------------------------------------------------\n\n/**\n * Generate a <style> tag string for server-side rendering.\n * Sets --accent-hue and --accent-chroma for CSS-native theming,\n * plus hex fallbacks for older browsers.\n */\nexport async function getAccentStyleTag(\n accentHex: string,\n id = 'roadie-accent-theme'\n): Promise<string> {\n const result = await generateAccentScale(accentHex)\n const neutral = await generateNeutralScale(accentHex)\n const hue = Math.round(await getOklchHue(accentHex))\n const chroma = +(await getOklchChroma(accentHex)).toFixed(4)\n\n // Hex fallbacks for accent (non-oklch browsers)\n const accentVars = result.light\n .map((hex, i) => `--color-accent-${i}: ${hex};`)\n .join('\\n ')\n const darkAccentVars = result.dark\n .map((hex, i) => `--color-accent-${i}: ${hex};`)\n .join('\\n ')\n // Hex fallbacks for neutral (non-oklch browsers)\n const neutralVars = neutral.light\n .map((hex, i) => `--color-neutral-${i}: ${hex};`)\n .join('\\n ')\n const darkNeutralVars = neutral.dark\n .map((hex, i) => `--color-neutral-${i}: ${hex};`)\n .join('\\n ')\n\n const safeId = id.replace(/[<>\"&]/g, '')\n return `<style id=\"${safeId}\">\n :root {\n --accent-hue: ${hue};\n --accent-chroma: ${chroma};\n ${neutralVars}\n ${accentVars}\n }\n .dark {\n ${darkNeutralVars}\n ${darkAccentVars}\n }\n</style>`\n}\n\n// ---------------------------------------------------------------------------\n// Dark mode helpers\n// ---------------------------------------------------------------------------\n\nfunction applyDark(dark: boolean) {\n document.documentElement.classList.toggle('dark', dark)\n document.documentElement.style.colorScheme = dark ? 'dark' : 'light'\n}\n\nfunction getStoredTheme(): string | null {\n try {\n return localStorage.getItem(THEME_STORAGE_KEY)\n } catch {\n return null\n }\n}\n\nfunction storeTheme(dark: boolean) {\n try {\n localStorage.setItem(THEME_STORAGE_KEY, dark ? 'dark' : 'light')\n } catch {\n // localStorage unavailable\n }\n}\n\n// ---------------------------------------------------------------------------\n// ThemeProvider\n// ---------------------------------------------------------------------------\n\nexport function ThemeProvider({\n children,\n defaultAccentColor = DEFAULT_ACCENT,\n defaultDark = false,\n followSystem = false\n}: ThemeProviderProps) {\n const [accentColor, setAccentColor] = React.useState(defaultAccentColor)\n\n // Initialise dark mode from prop — inline script may have already set .dark\n const [isDark, setIsDarkState] = React.useState(defaultDark)\n\n // Sync with DOM on mount\n React.useEffect(() => {\n const stored = getStoredTheme()\n if (stored) {\n setIsDarkState(stored === 'dark')\n return\n }\n\n // No stored preference — check OS preference or DOM state\n if (followSystem) {\n const prefersDark = window.matchMedia(\n '(prefers-color-scheme: dark)'\n ).matches\n setIsDarkState(prefersDark)\n applyDark(prefersDark)\n } else {\n const domDark = document.documentElement.classList.contains('dark')\n setIsDarkState(domDark)\n }\n }, []) // mount-only: followSystem/defaultDark are expected to be static\n\n // Listen for OS preference changes when followSystem is true\n React.useEffect(() => {\n if (!followSystem) return\n\n const mq = window.matchMedia('(prefers-color-scheme: dark)')\n const handler = (e: MediaQueryListEvent) => {\n // Only follow system if user hasn't explicitly chosen\n if (getStoredTheme()) return\n setIsDarkState(e.matches)\n applyDark(e.matches)\n }\n mq.addEventListener('change', handler)\n return () => mq.removeEventListener('change', handler)\n }, [followSystem])\n\n // Explicit toggle — persists to localStorage and applies to DOM\n const setDark = React.useCallback((dark: boolean) => {\n setIsDarkState(dark)\n applyDark(dark)\n storeTheme(dark)\n }, [])\n\n // Accent color effect — skip if SSR already injected matching values\n React.useEffect(() => {\n let cancelled = false\n\n async function updateAccent() {\n const hue = Math.round(await getOklchHue(accentColor))\n const chroma = +(await getOklchChroma(accentColor)).toFixed(4)\n\n if (cancelled) return\n\n // Skip regeneration if existing style tag already has matching values\n const existing = document.getElementById('roadie-accent-theme')\n if (existing?.textContent?.includes(`--accent-hue: ${hue}`)) {\n return\n }\n\n let css: string\n\n if (supportsOklch) {\n css = `\n :root {\n --accent-hue: ${hue};\n --accent-chroma: ${chroma};\n }\n `\n } else {\n const result = await generateAccentScale(accentColor)\n const neutral = await generateNeutralScale(accentColor)\n\n if (cancelled) return\n\n const accentVars = result.light\n .map((hex, i) => `--color-accent-${i}: ${hex};`)\n .join('\\n')\n const darkAccentVars = result.dark\n .map((hex, i) => `--color-accent-${i}: ${hex};`)\n .join('\\n')\n const neutralVars = neutral.light\n .map((hex, i) => `--color-neutral-${i}: ${hex};`)\n .join('\\n')\n const darkNeutralVars = neutral.dark\n .map((hex, i) => `--color-neutral-${i}: ${hex};`)\n .join('\\n')\n\n css = `\n :root {\n ${neutralVars}\n ${accentVars}\n }\n .dark {\n ${darkNeutralVars}\n ${darkAccentVars}\n }\n `\n }\n\n let style = document.getElementById('roadie-accent-theme')\n if (!style) {\n style = document.createElement('style')\n style.id = 'roadie-accent-theme'\n document.head.appendChild(style)\n }\n style.textContent = css\n }\n\n updateAccent()\n return () => {\n cancelled = true\n }\n }, [accentColor])\n\n const value = React.useMemo(\n () => ({ accentColor, setAccentColor, isDark, setDark }),\n [accentColor, isDark, setDark]\n )\n\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>\n}\n\n// ---------------------------------------------------------------------------\n// Hooks\n// ---------------------------------------------------------------------------\n\nexport function useTheme() {\n const context = React.useContext(ThemeContext)\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider')\n }\n return context\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oztix/roadie-components",
3
- "version": "1.2.0",
4
- "description": "The components for Roadie Design System at Oztix",
3
+ "version": "2.0.0",
4
+ "description": "React components for the Roadie Design System",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
@@ -13,42 +13,35 @@
13
13
  "exports": {
14
14
  ".": {
15
15
  "types": "./dist/index.d.ts",
16
- "import": "./dist/index.js",
17
- "require": "./dist/index.js"
18
- },
19
- "./hooks": {
20
- "types": "./dist/hooks/index.d.ts",
21
- "import": "./dist/hooks/index.js",
22
- "require": "./dist/hooks/index.js"
16
+ "import": "./dist/index.js"
23
17
  },
24
18
  "./spot-illustrations": {
25
19
  "types": "./dist/SpotIllustration.d.ts",
26
- "import": "./dist/SpotIllustration.js",
27
- "require": "./dist/SpotIllustration.js"
28
- },
29
- "./src/*": {
30
- "types": "./src/*",
31
- "import": "./src/*"
20
+ "import": "./dist/SpotIllustration.js"
32
21
  }
33
22
  },
34
23
  "sideEffects": false,
35
24
  "files": [
36
- "dist",
37
- "src"
25
+ "dist"
38
26
  ],
39
27
  "publishConfig": {
40
28
  "access": "public"
41
29
  },
42
30
  "peerDependencies": {
31
+ "@ark-ui/react": "^5.0.0",
32
+ "@phosphor-icons/react": "^2.0.0",
43
33
  "react": "^19.0.0",
44
34
  "react-dom": "^19.0.0"
45
35
  },
46
36
  "dependencies": {
47
- "@ark-ui/react": "5.26.2",
48
- "@oztix/roadie-core": "1.2.0"
37
+ "@base-ui/react": "^1.0.0",
38
+ "class-variance-authority": "^0.7.1",
39
+ "@oztix/roadie-core": "2.0.0"
49
40
  },
50
41
  "devDependencies": {
51
- "@pandacss/dev": "1.4.3",
42
+ "@ark-ui/react": "5.35.0",
43
+ "@phosphor-icons/react": "^2.1.10",
44
+ "@size-limit/preset-small-lib": "12.0.1",
52
45
  "@testing-library/jest-dom": "6.9.1",
53
46
  "@testing-library/react": "16.3.0",
54
47
  "@testing-library/user-event": "14.6.1",
@@ -59,6 +52,7 @@
59
52
  "@vitest/coverage-v8": "4.0.4",
60
53
  "@vitest/ui": "4.0.4",
61
54
  "jsdom": "27.0.1",
55
+ "size-limit": "12.0.1",
62
56
  "svgo": "4.0.0",
63
57
  "tsup": "8.5.0",
64
58
  "vitest": "4.0.4"
@@ -82,7 +76,7 @@
82
76
  "build": "tsup",
83
77
  "build:spotillustration": "node scripts/svg-to-spot-illustration.cjs",
84
78
  "clean": "rm -rf node_modules dist",
85
- "dev": "node scripts/svg-to-spot-illustration.cjs --watch & tsup --watch",
79
+ "dev": "tsup --watch",
86
80
  "test": "vitest run",
87
81
  "test:watch": "vitest",
88
82
  "test:coverage": "vitest run --coverage",
@@ -91,6 +85,8 @@
91
85
  "format:check": "prettier --ignore-path ../../.prettierignore --check \"**/*.{ts,tsx,js,jsx,json,css,md}\"",
92
86
  "lint": "eslint .",
93
87
  "lint:fix": "eslint . --fix",
94
- "typecheck": "tsc --noEmit"
88
+ "typecheck": "tsc --noEmit",
89
+ "size": "size-limit",
90
+ "size:check": "size-limit --limit"
95
91
  }
96
92
  }
@@ -1,34 +0,0 @@
1
- import * as _oztix_roadie_core_jsx from '@oztix/roadie-core/jsx';
2
- import { Container as Container$1 } from '@oztix/roadie-core/jsx';
3
-
4
- /**
5
- * A foundational layout component that provides a centered container with responsive padding
6
- * and a constrained max-width by default. Perfect for page layouts and content sections.
7
- *
8
- * By default, Container has:
9
- * - Centered content with `mx: auto`
10
- * - Responsive horizontal padding (300 on mobile, 400 on tablet, 600 on desktop)
11
- * - Max-width constraint of 7xl (80rem)
12
- *
13
- * @example
14
- * ```tsx
15
- * // Basic usage - constrained width by default
16
- * <Container>
17
- * <h1>Page Title</h1>
18
- * <p>Content with readable max-width</p>
19
- * </Container>
20
- * ```
21
- *
22
- * @example
23
- * ```tsx
24
- * // Full-width container
25
- * <Container contain={false}>
26
- * <h1>Hero Section</h1>
27
- * <p>This content spans the full width</p>
28
- * </Container>
29
- * ```
30
- */
31
- declare const Container: FunctionComponent<_oztix_roadie_core_jsx.ContainerProps>;
32
- type ContainerProps = React.ComponentProps<typeof Container$1>;
33
-
34
- export { Container, type ContainerProps };
package/dist/Container.js DELETED
@@ -1,2 +0,0 @@
1
- export{a as Container}from'./_chunks/chunk-JOQJCXYF.js';//# sourceMappingURL=Container.js.map
2
- //# sourceMappingURL=Container.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"Container.js"}
package/dist/Heading.d.ts DELETED
@@ -1,45 +0,0 @@
1
- import * as _oztix_roadie_core_types from '@oztix/roadie-core/types';
2
- import { JsxStyleProps } from '@oztix/roadie-core/types';
3
- import { ReactNode } from 'react';
4
- import { ColorPalette } from '@oztix/roadie-core';
5
- import { HTMLStyledProps } from '@oztix/roadie-core/jsx';
6
- import { HeadingVariantProps } from '@oztix/roadie-core/recipes';
7
-
8
- type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label';
9
- type HeadingStyle = Extract<JsxStyleProps['textStyle'], `display.${string}`>;
10
- /**
11
- * A heading component that uses display styles for titles and section headers
12
- */
13
- interface HeadingProps extends HTMLStyledProps<'h2'> {
14
- /**
15
- * The heading element to render
16
- * @default 'h2'
17
- */
18
- as?: HeadingElement;
19
- /**
20
- * The text style to use for the heading
21
- * @default 'display.ui'
22
- */
23
- textStyle?: HeadingStyle;
24
- /**
25
- * The color palette to use for the heading
26
- * @default 'neutral'
27
- */
28
- colorPalette?: ColorPalette;
29
- /**
30
- * Set a sepecific empahasis level for differen fonts like subtitles
31
- * @default 'default'
32
- */
33
- emphasis?: HeadingVariantProps['emphasis'];
34
- /**
35
- * The content to display
36
- */
37
- children?: ReactNode;
38
- }
39
- declare const Heading: _oztix_roadie_core_types.StyledComponent<any, {
40
- [x: string]: unknown;
41
- [x: number]: unknown;
42
- emphasis?: unknown;
43
- }>;
44
-
45
- export { Heading, type HeadingProps };
package/dist/Heading.js DELETED
@@ -1,2 +0,0 @@
1
- export{a as Heading}from'./_chunks/chunk-YNF56IUK.js';//# sourceMappingURL=Heading.js.map
2
- //# sourceMappingURL=Heading.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"Heading.js"}
package/dist/Text.d.ts DELETED
@@ -1,47 +0,0 @@
1
- import * as _oztix_roadie_core_jsx from '@oztix/roadie-core/jsx';
2
- import { HTMLStyledProps } from '@oztix/roadie-core/jsx';
3
- import { ReactNode } from 'react';
4
- import { ColorPalette } from '@oztix/roadie-core';
5
- import { TextVariantProps } from '@oztix/roadie-core/recipes';
6
-
7
- /**
8
- * Text component for displaying content with various styling options
9
- */
10
- interface TextProps extends HTMLStyledProps<'p'> {
11
- /**
12
- * The visual emphasis of the text
13
- * @default 'default'
14
- */
15
- emphasis?: TextVariantProps['emphasis'];
16
- /**
17
- * Whether the text is interactive
18
- * @default false
19
- */
20
- interactive?: TextVariantProps['interactive'];
21
- /**
22
- * The HTML element to render the text as
23
- * @default 'p'
24
- */
25
- as?: HTMLStyledProps<'p'>['as'];
26
- /**
27
- * The color palette to use for the text
28
- * @default 'neutral'
29
- */
30
- colorPalette?: ColorPalette;
31
- /**
32
- * When true, the component will pass props to its child component
33
- */
34
- asChild?: boolean;
35
- /**
36
- * The content to display
37
- */
38
- children?: ReactNode;
39
- }
40
- declare const Text: _oztix_roadie_core_jsx.StyledComponent<any, {
41
- [x: string]: unknown;
42
- [x: number]: unknown;
43
- emphasis?: unknown;
44
- interactive?: unknown;
45
- }>;
46
-
47
- export { Text, type TextProps };
package/dist/Text.js DELETED
@@ -1,2 +0,0 @@
1
- export{a as Text}from'./_chunks/chunk-ZXS7U3VJ.js';//# sourceMappingURL=Text.js.map
2
- //# sourceMappingURL=Text.js.map
package/dist/Text.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"Text.js"}
package/dist/View.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import * as _oztix_roadie_core_jsx from '@oztix/roadie-core/jsx';
2
- import { View as View$1 } from '@oztix/roadie-core/jsx';
3
-
4
- /**
5
- * A foundational layout component that provides a flexible container with sensible defaults.
6
- * Based on the Panda CSS Box pattern but with better defaults for application UI layout.
7
- *
8
- */
9
- declare const View: FunctionComponent<_oztix_roadie_core_jsx.ViewProps>;
10
- type ViewProps = React.ComponentProps<typeof View$1>;
11
-
12
- export { View, type ViewProps };
package/dist/View.js DELETED
@@ -1,2 +0,0 @@
1
- export{a as View}from'./_chunks/chunk-RJEJUZ3O.js';//# sourceMappingURL=View.js.map
2
- //# sourceMappingURL=View.js.map
package/dist/View.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"View.js"}
@@ -1,3 +0,0 @@
1
- "use client";
2
- import {a}from'./chunk-OH4JYS35.js';import {Fragment as Fragment$1}from'react';import {useHighlight}from'@ark-ui/react/highlight';export{useHighlight as b}from'@ark-ui/react/highlight';import {jsx,Fragment}from'react/jsx-runtime';var f=({text:o,query:t,exactMatch:g=false,ignoreCase:h=true,matchAll:m=true,colorPalette:s="information",...p})=>{if(!t||Array.isArray(t)&&t.length===0||t==="")return jsx(Fragment,{children:o});let n=useHighlight({query:t,text:o,exactMatch:g,ignoreCase:h,matchAll:m});return jsx(Fragment,{children:n.map((r,i)=>r.match?jsx(a,{colorPalette:s,...p,children:r.text},i):jsx(Fragment$1,{children:r.text},i))})};f.displayName="Highlight";export{f as a};//# sourceMappingURL=chunk-AZZHYO2A.js.map
3
- //# sourceMappingURL=chunk-AZZHYO2A.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/Highlight/index.tsx"],"names":["Highlight","text","query","exactMatch","ignoreCase","matchAll","colorPalette","props","jsx","Fragment","chunks","useHighlight","chunk","index","Mark"],"mappings":"sOAuDO,IAAMA,CAAAA,CAAY,CAAC,CACxB,IAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CAAa,MACb,UAAA,CAAAC,CAAAA,CAAa,IAAA,CACb,QAAA,CAAAC,CAAAA,CAAW,IAAA,CACX,aAAAC,CAAAA,CAAe,aAAA,CACf,GAAGC,CACL,CAAA,GAAoC,CAKlC,GAFE,CAACL,CAAAA,EAAU,KAAA,CAAM,OAAA,CAAQA,CAAK,CAAA,EAAKA,CAAAA,CAAM,MAAA,GAAW,CAAA,EAAMA,CAAAA,GAAU,EAAA,CAGpE,OAAOM,GAAAA,CAAAC,QAAAA,CAAA,CAAG,QAAA,CAAAR,CAAAA,CAAK,CAAA,CAGjB,IAAMS,CAAAA,CAASC,YAAAA,CAAa,CAC1B,KAAA,CAAAT,CAAAA,CACA,IAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,WAAAC,CAAAA,CACA,QAAA,CAAAC,CACF,CAAC,CAAA,CAED,OACEG,GAAAA,CAAAC,QAAAA,CAAA,CACG,QAAA,CAAAC,CAAAA,CAAO,GAAA,CAAI,CAACE,CAAAA,CAAOC,IAClBD,CAAAA,CAAM,KAAA,CACJJ,GAAAA,CAACM,CAAAA,CAAA,CAAiB,YAAA,CAAcR,EAAe,GAAGC,CAAAA,CAC/C,QAAA,CAAAK,CAAAA,CAAM,IAAA,CAAA,CADEC,CAEX,EAEAL,GAAAA,CAACC,UAAAA,CAAA,CAAsB,QAAA,CAAAG,CAAAA,CAAM,IAAA,CAAA,CAAdC,CAAmB,CAEtC,CAAA,CACF,CAEJ,EAEAb,CAAAA,CAAU,WAAA,CAAc,WAAA","file":"chunk-AZZHYO2A.js","sourcesContent":["'use client'\n\nimport { Fragment, type ReactElement } from 'react'\n\nimport { useHighlight } from '@ark-ui/react/highlight'\n\nimport type { ColorPalette } from '@oztix/roadie-core'\nimport type { HTMLStyledProps } from '@oztix/roadie-core/jsx'\n\nimport { Mark } from '../Mark'\n\n// Re-export Ark UI types and hook for advanced use cases\nexport { useHighlight } from '@ark-ui/react/highlight'\nexport type { HighlightChunk, UseHighlightProps } from '@ark-ui/react/highlight'\n\n/**\n * Highlight component for highlighting substrings within text\n */\nexport interface HighlightProps\n extends Omit<HTMLStyledProps<'mark'>, 'children'> {\n /**\n * The text content to display and potentially highlight\n */\n text: string\n\n /**\n * The query string(s) to highlight within the text\n */\n query: string | string[]\n\n /**\n * Whether to match whole words only\n * @default false\n */\n exactMatch?: boolean\n\n /**\n * Whether to ignore case while matching\n * @default true\n */\n ignoreCase?: boolean\n\n /**\n * Whether to match multiple instances of the query\n * @default true\n */\n matchAll?: boolean\n\n /**\n * The color palette to use for the highlight\n * @default 'information'\n */\n colorPalette?: ColorPalette\n}\n\nexport const Highlight = ({\n text,\n query,\n exactMatch = false,\n ignoreCase = true,\n matchAll = true,\n colorPalette = 'information',\n ...props\n}: HighlightProps): ReactElement => {\n // Fast path: if query is empty, just return the text\n const isQueryEmpty =\n !query || (Array.isArray(query) && query.length === 0) || query === ''\n\n if (isQueryEmpty) {\n return <>{text}</>\n }\n\n const chunks = useHighlight({\n query,\n text,\n exactMatch,\n ignoreCase,\n matchAll\n })\n\n return (\n <>\n {chunks.map((chunk, index) =>\n chunk.match ? (\n <Mark key={index} colorPalette={colorPalette} {...props}>\n {chunk.text}\n </Mark>\n ) : (\n <Fragment key={index}>{chunk.text}</Fragment>\n )\n )}\n </>\n )\n}\n\nHighlight.displayName = 'Highlight'\n"]}
@@ -1,2 +0,0 @@
1
- import {Container}from'@oztix/roadie-core/jsx';var n=Container;n.displayName="Container";export{n as a};//# sourceMappingURL=chunk-JOQJCXYF.js.map
2
- //# sourceMappingURL=chunk-JOQJCXYF.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/Container/index.tsx"],"names":["Container","ContainerPattern"],"mappings":"mDA6BaA,CAAAA,CAAYC,UAIzBD,EAAU,WAAA,CAAc,WAAA","file":"chunk-JOQJCXYF.js","sourcesContent":["import { Container as ContainerPattern } from '@oztix/roadie-core/jsx'\n\n/**\n * A foundational layout component that provides a centered container with responsive padding\n * and a constrained max-width by default. Perfect for page layouts and content sections.\n *\n * By default, Container has:\n * - Centered content with `mx: auto`\n * - Responsive horizontal padding (300 on mobile, 400 on tablet, 600 on desktop)\n * - Max-width constraint of 7xl (80rem)\n *\n * @example\n * ```tsx\n * // Basic usage - constrained width by default\n * <Container>\n * <h1>Page Title</h1>\n * <p>Content with readable max-width</p>\n * </Container>\n * ```\n *\n * @example\n * ```tsx\n * // Full-width container\n * <Container contain={false}>\n * <h1>Hero Section</h1>\n * <p>This content spans the full width</p>\n * </Container>\n * ```\n */\nexport const Container = ContainerPattern\n\nexport type ContainerProps = React.ComponentProps<typeof ContainerPattern>\n\nContainer.displayName = 'Container'\n"]}
@@ -1,2 +0,0 @@
1
- import {ark}from'@ark-ui/react/factory';import {styled}from'@oztix/roadie-core/jsx';import {button}from'@oztix/roadie-core/recipes';import {jsx}from'react/jsx-runtime';var o=styled(ark.button,button);o.displayName="Button";var e=t=>jsx(o,{px:"0",py:"0",_icon:{fontSize:"1.2em"},...t});e.displayName="IconButton";export{o as a,e as b};//# sourceMappingURL=chunk-NMGF2AP6.js.map
2
- //# sourceMappingURL=chunk-NMGF2AP6.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/Button/Button.tsx","../../src/components/Button/IconButton.tsx"],"names":["Button","styled","ark","button","IconButton","props","jsx"],"mappings":"wKAOO,IAAMA,EAASC,MAAAA,CAAOC,GAAAA,CAAI,OAAQC,MAAM,EAE/CH,EAAO,WAAA,CAAc,QAAA,KCARI,CAAAA,CAAcC,CAAAA,EAClBC,IAACN,CAAAA,CAAA,CAAO,GAAG,GAAA,CAAI,EAAA,CAAG,IAAI,KAAA,CAAO,CAAE,SAAU,OAAQ,CAAA,CAAI,GAAGK,CAAAA,CAAO,EAGxED,EAAW,WAAA,CAAc,YAAA","file":"chunk-NMGF2AP6.js","sourcesContent":["import type { ComponentProps } from 'react'\n\nimport { ark } from '@ark-ui/react/factory'\n\nimport { styled } from '@oztix/roadie-core/jsx'\nimport { button } from '@oztix/roadie-core/recipes'\n\nexport const Button = styled(ark.button, button)\n\nButton.displayName = 'Button'\n\nexport type ButtonProps = ComponentProps<typeof Button>\n","import type { ComponentProps } from 'react'\n\nimport { Button } from './Button'\n\nexport interface IconButtonProps\n extends Omit<ComponentProps<typeof Button>, 'aria-label'> {\n 'aria-label': string\n}\n\nexport const IconButton = (props: IconButtonProps) => {\n return <Button px='0' py='0' _icon={{ fontSize: '1.2em' }} {...props} />\n}\n\nIconButton.displayName = 'IconButton'\n"]}
@@ -1,3 +0,0 @@
1
- "use client";
2
- import {ark}from'@ark-ui/react/factory';import {styled}from'@oztix/roadie-core/jsx';import {mark}from'@oztix/roadie-core/recipes';var t=styled(ark.mark,mark);t.displayName="Mark";export{t as a};//# sourceMappingURL=chunk-OH4JYS35.js.map
3
- //# sourceMappingURL=chunk-OH4JYS35.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/Mark/index.tsx"],"names":["Mark","styled","ark","mark"],"mappings":"kIA8BO,IAAMA,EAAOC,MAAAA,CAAOC,GAAAA,CAAI,KAAMC,IAAI,EAEzCH,EAAK,WAAA,CAAc,MAAA","file":"chunk-OH4JYS35.js","sourcesContent":["import type { ReactNode } from 'react'\n\nimport { ark } from '@ark-ui/react/factory'\n\nimport type { ColorPalette } from '@oztix/roadie-core'\nimport { styled } from '@oztix/roadie-core/jsx'\nimport type { HTMLStyledProps } from '@oztix/roadie-core/jsx'\nimport { mark } from '@oztix/roadie-core/recipes'\n\n/**\n * Mark component for highlighting text content\n */\nexport interface MarkProps extends HTMLStyledProps<'mark'> {\n /**\n * The color palette to use for the mark\n * @default 'information'\n */\n colorPalette?: ColorPalette\n\n /**\n * When true, the component will pass props to its child component\n */\n asChild?: boolean\n\n /**\n * The content to mark\n */\n children?: ReactNode\n}\n\nexport const Mark = styled(ark.mark, mark)\n\nMark.displayName = 'Mark'\n"]}
@@ -1,2 +0,0 @@
1
- import {ark}from'@ark-ui/react/factory';import {styled}from'@oztix/roadie-core/jsx';import {code}from'@oztix/roadie-core/recipes';var t=styled(ark.code,code);t.displayName="Code";export{t as a};//# sourceMappingURL=chunk-P5L5LN6E.js.map
2
- //# sourceMappingURL=chunk-P5L5LN6E.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/Code/index.tsx"],"names":["Code","styled","ark","code"],"mappings":"kIA+BO,IAAMA,EAAOC,MAAAA,CAClBC,GAAAA,CAAI,KACJC,IACF,EAEAH,EAAK,WAAA,CAAc,MAAA","file":"chunk-P5L5LN6E.js","sourcesContent":["import type { ReactNode } from 'react'\n\nimport { ark } from '@ark-ui/react/factory'\n\nimport type { ColorPalette } from '@oztix/roadie-core'\nimport { styled } from '@oztix/roadie-core/jsx'\nimport type { HTMLStyledProps } from '@oztix/roadie-core/jsx'\nimport { type CodeVariantProps, code } from '@oztix/roadie-core/recipes'\n\n/**\n * A code component that inherits from Text and renders as a code element\n */\nexport interface CodeProps extends HTMLStyledProps<'code'> {\n /**\n * The appearance of the code block\n * @default 'default'\n */\n emphasis?: CodeVariantProps['emphasis']\n\n /**\n * The color palette to use for the code\n * @default 'neutral'\n */\n colorPalette?: ColorPalette\n\n /**\n * The content to display\n */\n children?: ReactNode\n}\n\nexport const Code = styled(\n ark.code,\n code\n) as React.ForwardRefExoticComponent<CodeProps>\n\nCode.displayName = 'Code'\n"]}
@@ -1,2 +0,0 @@
1
- import {View}from'@oztix/roadie-core/jsx';var t=View;t.displayName="View";export{t as a};//# sourceMappingURL=chunk-RJEJUZ3O.js.map
2
- //# sourceMappingURL=chunk-RJEJUZ3O.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/View/index.tsx"],"names":["View","ViewPattern"],"mappings":"8CAOaA,CAAAA,CAAOC,KAIpBD,EAAK,WAAA,CAAc,MAAA","file":"chunk-RJEJUZ3O.js","sourcesContent":["import { View as ViewPattern } from '@oztix/roadie-core/jsx'\n\n/**\n * A foundational layout component that provides a flexible container with sensible defaults.\n * Based on the Panda CSS Box pattern but with better defaults for application UI layout.\n *\n */\nexport const View = ViewPattern\n\nexport type ViewProps = React.ComponentProps<typeof ViewPattern>\n\nView.displayName = 'View'\n"]}