@kushagradhawan/kookie-ui 0.1.17 → 0.1.19

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 (276) hide show
  1. package/components.css +3730 -1072
  2. package/dist/cjs/components/_internal/base-button.d.ts.map +1 -1
  3. package/dist/cjs/components/_internal/base-button.js +1 -1
  4. package/dist/cjs/components/_internal/base-button.js.map +3 -3
  5. package/dist/cjs/components/_internal/base-button.props.d.ts +9 -0
  6. package/dist/cjs/components/_internal/base-button.props.d.ts.map +1 -1
  7. package/dist/cjs/components/_internal/base-button.props.js +1 -1
  8. package/dist/cjs/components/_internal/base-button.props.js.map +3 -3
  9. package/dist/cjs/components/_internal/base-menu.props.d.ts +5 -0
  10. package/dist/cjs/components/_internal/base-menu.props.d.ts.map +1 -1
  11. package/dist/cjs/components/_internal/base-menu.props.js +1 -1
  12. package/dist/cjs/components/_internal/base-menu.props.js.map +3 -3
  13. package/dist/cjs/components/_internal/base-tab-list.props.d.ts +5 -0
  14. package/dist/cjs/components/_internal/base-tab-list.props.d.ts.map +1 -1
  15. package/dist/cjs/components/_internal/base-tab-list.props.js +1 -1
  16. package/dist/cjs/components/_internal/base-tab-list.props.js.map +3 -3
  17. package/dist/cjs/components/alert-dialog.d.ts.map +1 -1
  18. package/dist/cjs/components/alert-dialog.js +1 -1
  19. package/dist/cjs/components/alert-dialog.js.map +3 -3
  20. package/dist/cjs/components/avatar.d.ts.map +1 -1
  21. package/dist/cjs/components/avatar.js +1 -1
  22. package/dist/cjs/components/avatar.js.map +3 -3
  23. package/dist/cjs/components/avatar.props.d.ts +6 -1
  24. package/dist/cjs/components/avatar.props.d.ts.map +1 -1
  25. package/dist/cjs/components/avatar.props.js +1 -1
  26. package/dist/cjs/components/avatar.props.js.map +3 -3
  27. package/dist/cjs/components/badge.d.ts.map +1 -1
  28. package/dist/cjs/components/badge.js +1 -1
  29. package/dist/cjs/components/badge.js.map +3 -3
  30. package/dist/cjs/components/badge.props.d.ts +6 -1
  31. package/dist/cjs/components/badge.props.d.ts.map +1 -1
  32. package/dist/cjs/components/badge.props.js +1 -1
  33. package/dist/cjs/components/badge.props.js.map +2 -2
  34. package/dist/cjs/components/callout.d.ts.map +1 -1
  35. package/dist/cjs/components/callout.js +1 -1
  36. package/dist/cjs/components/callout.js.map +3 -3
  37. package/dist/cjs/components/callout.props.d.ts +5 -0
  38. package/dist/cjs/components/callout.props.d.ts.map +1 -1
  39. package/dist/cjs/components/callout.props.js +1 -1
  40. package/dist/cjs/components/callout.props.js.map +3 -3
  41. package/dist/cjs/components/card.d.ts.map +1 -1
  42. package/dist/cjs/components/card.js +1 -1
  43. package/dist/cjs/components/card.js.map +3 -3
  44. package/dist/cjs/components/card.props.d.ts +11 -2
  45. package/dist/cjs/components/card.props.d.ts.map +1 -1
  46. package/dist/cjs/components/card.props.js +1 -1
  47. package/dist/cjs/components/card.props.js.map +3 -3
  48. package/dist/cjs/components/context-menu.d.ts.map +1 -1
  49. package/dist/cjs/components/context-menu.js +1 -1
  50. package/dist/cjs/components/context-menu.js.map +3 -3
  51. package/dist/cjs/components/dialog.d.ts.map +1 -1
  52. package/dist/cjs/components/dialog.js +1 -1
  53. package/dist/cjs/components/dialog.js.map +3 -3
  54. package/dist/cjs/components/dialog.props.d.ts +5 -0
  55. package/dist/cjs/components/dialog.props.d.ts.map +1 -1
  56. package/dist/cjs/components/dialog.props.js +1 -1
  57. package/dist/cjs/components/dialog.props.js.map +3 -3
  58. package/dist/cjs/components/dropdown-menu.d.ts.map +1 -1
  59. package/dist/cjs/components/dropdown-menu.js +1 -1
  60. package/dist/cjs/components/dropdown-menu.js.map +3 -3
  61. package/dist/cjs/components/image.d.ts +6 -1
  62. package/dist/cjs/components/image.d.ts.map +1 -1
  63. package/dist/cjs/components/image.js +1 -1
  64. package/dist/cjs/components/image.js.map +3 -3
  65. package/dist/cjs/components/popover.d.ts.map +1 -1
  66. package/dist/cjs/components/popover.js +1 -1
  67. package/dist/cjs/components/popover.js.map +3 -3
  68. package/dist/cjs/components/popover.props.d.ts +5 -0
  69. package/dist/cjs/components/popover.props.d.ts.map +1 -1
  70. package/dist/cjs/components/popover.props.js +1 -1
  71. package/dist/cjs/components/popover.props.js.map +3 -3
  72. package/dist/cjs/components/select.d.ts.map +1 -1
  73. package/dist/cjs/components/select.js +1 -1
  74. package/dist/cjs/components/select.js.map +3 -3
  75. package/dist/cjs/components/select.props.d.ts +6 -1
  76. package/dist/cjs/components/select.props.d.ts.map +1 -1
  77. package/dist/cjs/components/select.props.js +1 -1
  78. package/dist/cjs/components/select.props.js.map +2 -2
  79. package/dist/cjs/components/sidebar.d.ts +17 -6
  80. package/dist/cjs/components/sidebar.d.ts.map +1 -1
  81. package/dist/cjs/components/sidebar.js +1 -1
  82. package/dist/cjs/components/sidebar.js.map +3 -3
  83. package/dist/cjs/components/sidebar.props.d.ts +5 -0
  84. package/dist/cjs/components/sidebar.props.d.ts.map +1 -1
  85. package/dist/cjs/components/sidebar.props.js +1 -1
  86. package/dist/cjs/components/sidebar.props.js.map +2 -2
  87. package/dist/cjs/components/tabs.d.ts.map +1 -1
  88. package/dist/cjs/components/tabs.js +1 -1
  89. package/dist/cjs/components/tabs.js.map +3 -3
  90. package/dist/cjs/components/text-area.d.ts.map +1 -1
  91. package/dist/cjs/components/text-area.js +1 -1
  92. package/dist/cjs/components/text-area.js.map +3 -3
  93. package/dist/cjs/components/text-area.props.d.ts +6 -1
  94. package/dist/cjs/components/text-area.props.d.ts.map +1 -1
  95. package/dist/cjs/components/text-area.props.js +1 -1
  96. package/dist/cjs/components/text-area.props.js.map +3 -3
  97. package/dist/cjs/components/text-field.d.ts.map +1 -1
  98. package/dist/cjs/components/text-field.js +2 -2
  99. package/dist/cjs/components/text-field.js.map +3 -3
  100. package/dist/cjs/components/text-field.props.d.ts +6 -1
  101. package/dist/cjs/components/text-field.props.d.ts.map +1 -1
  102. package/dist/cjs/components/text-field.props.js +1 -1
  103. package/dist/cjs/components/text-field.props.js.map +3 -3
  104. package/dist/cjs/components/theme.d.ts.map +1 -1
  105. package/dist/cjs/components/theme.js +1 -1
  106. package/dist/cjs/components/theme.js.map +2 -2
  107. package/dist/cjs/helpers/map-prop-values.js +1 -1
  108. package/dist/cjs/helpers/map-prop-values.js.map +2 -2
  109. package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
  110. package/dist/esm/components/_internal/base-button.js +1 -1
  111. package/dist/esm/components/_internal/base-button.js.map +3 -3
  112. package/dist/esm/components/_internal/base-button.props.d.ts +9 -0
  113. package/dist/esm/components/_internal/base-button.props.d.ts.map +1 -1
  114. package/dist/esm/components/_internal/base-button.props.js +1 -1
  115. package/dist/esm/components/_internal/base-button.props.js.map +3 -3
  116. package/dist/esm/components/_internal/base-menu.props.d.ts +5 -0
  117. package/dist/esm/components/_internal/base-menu.props.d.ts.map +1 -1
  118. package/dist/esm/components/_internal/base-menu.props.js +1 -1
  119. package/dist/esm/components/_internal/base-menu.props.js.map +3 -3
  120. package/dist/esm/components/_internal/base-tab-list.props.d.ts +5 -0
  121. package/dist/esm/components/_internal/base-tab-list.props.d.ts.map +1 -1
  122. package/dist/esm/components/_internal/base-tab-list.props.js +1 -1
  123. package/dist/esm/components/_internal/base-tab-list.props.js.map +3 -3
  124. package/dist/esm/components/alert-dialog.d.ts.map +1 -1
  125. package/dist/esm/components/alert-dialog.js +1 -1
  126. package/dist/esm/components/alert-dialog.js.map +3 -3
  127. package/dist/esm/components/avatar.d.ts.map +1 -1
  128. package/dist/esm/components/avatar.js +1 -1
  129. package/dist/esm/components/avatar.js.map +3 -3
  130. package/dist/esm/components/avatar.props.d.ts +6 -1
  131. package/dist/esm/components/avatar.props.d.ts.map +1 -1
  132. package/dist/esm/components/avatar.props.js +1 -1
  133. package/dist/esm/components/avatar.props.js.map +3 -3
  134. package/dist/esm/components/badge.d.ts.map +1 -1
  135. package/dist/esm/components/badge.js +1 -1
  136. package/dist/esm/components/badge.js.map +3 -3
  137. package/dist/esm/components/badge.props.d.ts +6 -1
  138. package/dist/esm/components/badge.props.d.ts.map +1 -1
  139. package/dist/esm/components/badge.props.js +1 -1
  140. package/dist/esm/components/badge.props.js.map +2 -2
  141. package/dist/esm/components/callout.d.ts.map +1 -1
  142. package/dist/esm/components/callout.js +1 -1
  143. package/dist/esm/components/callout.js.map +3 -3
  144. package/dist/esm/components/callout.props.d.ts +5 -0
  145. package/dist/esm/components/callout.props.d.ts.map +1 -1
  146. package/dist/esm/components/callout.props.js +1 -1
  147. package/dist/esm/components/callout.props.js.map +3 -3
  148. package/dist/esm/components/card.d.ts.map +1 -1
  149. package/dist/esm/components/card.js +1 -1
  150. package/dist/esm/components/card.js.map +3 -3
  151. package/dist/esm/components/card.props.d.ts +11 -2
  152. package/dist/esm/components/card.props.d.ts.map +1 -1
  153. package/dist/esm/components/card.props.js +1 -1
  154. package/dist/esm/components/card.props.js.map +3 -3
  155. package/dist/esm/components/context-menu.d.ts.map +1 -1
  156. package/dist/esm/components/context-menu.js +1 -1
  157. package/dist/esm/components/context-menu.js.map +3 -3
  158. package/dist/esm/components/dialog.d.ts.map +1 -1
  159. package/dist/esm/components/dialog.js +1 -1
  160. package/dist/esm/components/dialog.js.map +3 -3
  161. package/dist/esm/components/dialog.props.d.ts +5 -0
  162. package/dist/esm/components/dialog.props.d.ts.map +1 -1
  163. package/dist/esm/components/dialog.props.js +1 -1
  164. package/dist/esm/components/dialog.props.js.map +3 -3
  165. package/dist/esm/components/dropdown-menu.d.ts.map +1 -1
  166. package/dist/esm/components/dropdown-menu.js +1 -1
  167. package/dist/esm/components/dropdown-menu.js.map +3 -3
  168. package/dist/esm/components/image.d.ts +6 -1
  169. package/dist/esm/components/image.d.ts.map +1 -1
  170. package/dist/esm/components/image.js +1 -1
  171. package/dist/esm/components/image.js.map +3 -3
  172. package/dist/esm/components/popover.d.ts.map +1 -1
  173. package/dist/esm/components/popover.js +1 -1
  174. package/dist/esm/components/popover.js.map +3 -3
  175. package/dist/esm/components/popover.props.d.ts +5 -0
  176. package/dist/esm/components/popover.props.d.ts.map +1 -1
  177. package/dist/esm/components/popover.props.js +1 -1
  178. package/dist/esm/components/popover.props.js.map +3 -3
  179. package/dist/esm/components/select.d.ts.map +1 -1
  180. package/dist/esm/components/select.js +1 -1
  181. package/dist/esm/components/select.js.map +3 -3
  182. package/dist/esm/components/select.props.d.ts +6 -1
  183. package/dist/esm/components/select.props.d.ts.map +1 -1
  184. package/dist/esm/components/select.props.js +1 -1
  185. package/dist/esm/components/select.props.js.map +2 -2
  186. package/dist/esm/components/sidebar.d.ts +17 -6
  187. package/dist/esm/components/sidebar.d.ts.map +1 -1
  188. package/dist/esm/components/sidebar.js +1 -1
  189. package/dist/esm/components/sidebar.js.map +3 -3
  190. package/dist/esm/components/sidebar.props.d.ts +5 -0
  191. package/dist/esm/components/sidebar.props.d.ts.map +1 -1
  192. package/dist/esm/components/sidebar.props.js +1 -1
  193. package/dist/esm/components/sidebar.props.js.map +2 -2
  194. package/dist/esm/components/tabs.d.ts.map +1 -1
  195. package/dist/esm/components/tabs.js +1 -1
  196. package/dist/esm/components/tabs.js.map +3 -3
  197. package/dist/esm/components/text-area.d.ts.map +1 -1
  198. package/dist/esm/components/text-area.js +1 -1
  199. package/dist/esm/components/text-area.js.map +3 -3
  200. package/dist/esm/components/text-area.props.d.ts +6 -1
  201. package/dist/esm/components/text-area.props.d.ts.map +1 -1
  202. package/dist/esm/components/text-area.props.js +1 -1
  203. package/dist/esm/components/text-area.props.js.map +3 -3
  204. package/dist/esm/components/text-field.d.ts.map +1 -1
  205. package/dist/esm/components/text-field.js +2 -2
  206. package/dist/esm/components/text-field.js.map +3 -3
  207. package/dist/esm/components/text-field.props.d.ts +6 -1
  208. package/dist/esm/components/text-field.props.d.ts.map +1 -1
  209. package/dist/esm/components/text-field.props.js +1 -1
  210. package/dist/esm/components/text-field.props.js.map +3 -3
  211. package/dist/esm/components/theme.d.ts.map +1 -1
  212. package/dist/esm/components/theme.js +1 -1
  213. package/dist/esm/components/theme.js.map +2 -2
  214. package/dist/esm/helpers/map-prop-values.js +1 -1
  215. package/dist/esm/helpers/map-prop-values.js.map +2 -2
  216. package/package.json +1 -1
  217. package/src/components/_internal/base-button.css +518 -110
  218. package/src/components/_internal/base-button.props.ts +5 -0
  219. package/src/components/_internal/base-button.tsx +4 -0
  220. package/src/components/_internal/base-card.css +59 -11
  221. package/src/components/_internal/base-dialog.css +26 -9
  222. package/src/components/_internal/base-menu.css +192 -21
  223. package/src/components/_internal/base-menu.props.ts +7 -0
  224. package/src/components/_internal/base-tab-list.css +56 -5
  225. package/src/components/_internal/base-tab-list.props.ts +3 -0
  226. package/src/components/alert-dialog.tsx +22 -7
  227. package/src/components/animations.css +31 -0
  228. package/src/components/avatar.css +436 -9
  229. package/src/components/avatar.props.tsx +4 -1
  230. package/src/components/avatar.tsx +19 -6
  231. package/src/components/badge.css +222 -7
  232. package/src/components/badge.props.tsx +3 -1
  233. package/src/components/badge.tsx +3 -2
  234. package/src/components/button.css +17 -17
  235. package/src/components/callout.css +75 -6
  236. package/src/components/callout.props.tsx +3 -0
  237. package/src/components/callout.tsx +6 -5
  238. package/src/components/card.css +361 -44
  239. package/src/components/card.props.tsx +7 -2
  240. package/src/components/card.tsx +7 -1
  241. package/src/components/context-menu.tsx +47 -22
  242. package/src/components/dialog.props.tsx +3 -0
  243. package/src/components/dialog.tsx +22 -7
  244. package/src/components/dropdown-menu.css +10 -10
  245. package/src/components/dropdown-menu.tsx +37 -11
  246. package/src/components/icon-button.css +36 -8
  247. package/src/components/image.tsx +92 -73
  248. package/src/components/kbd.css +122 -54
  249. package/src/components/popover.css +22 -3
  250. package/src/components/popover.props.tsx +3 -0
  251. package/src/components/popover.tsx +15 -8
  252. package/src/components/select.css +386 -95
  253. package/src/components/select.props.tsx +7 -1
  254. package/src/components/select.tsx +21 -13
  255. package/src/components/sidebar.css +201 -86
  256. package/src/components/sidebar.props.tsx +15 -3
  257. package/src/components/sidebar.tsx +313 -242
  258. package/src/components/tabs.css +3 -1
  259. package/src/components/tabs.tsx +8 -3
  260. package/src/components/text-area.css +323 -32
  261. package/src/components/text-area.props.tsx +4 -1
  262. package/src/components/text-area.tsx +3 -2
  263. package/src/components/text-field.css +336 -15
  264. package/src/components/text-field.props.tsx +4 -1
  265. package/src/components/text-field.tsx +5 -7
  266. package/src/components/theme.tsx +11 -9
  267. package/src/helpers/map-prop-values.ts +1 -1
  268. package/src/styles/tokens/color.css +19 -5
  269. package/src/styles/tokens/constants.css +118 -0
  270. package/src/styles/tokens/index.css +1 -0
  271. package/src/styles/tokens/radius.css +9 -6
  272. package/src/styles/tokens/shadow.css +10 -10
  273. package/src/styles/tokens/transition.css +33 -1
  274. package/styles.css +3846 -1089
  275. package/tokens/base.css +51 -22
  276. package/tokens.css +133 -34
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/text-field.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { composeRefs } from 'radix-ui/internal';\n\nimport { textFieldRootPropDefs, textFieldSlotPropDefs } from './text-field.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { NotInputTextualAttributes } from '../helpers/input-attributes.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TextFieldRootElement = React.ElementRef<'input'>;\ntype TextFieldRootOwnProps = GetPropDefTypes<typeof textFieldRootPropDefs> & {\n defaultValue?: string | number;\n value?: string | number;\n type?:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'hidden'\n | 'month'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url'\n | 'week';\n};\ntype TextFieldInputProps = ComponentPropsWithout<\n 'input',\n NotInputTextualAttributes | 'color' | 'defaultValue' | 'size' | 'type' | 'value'\n>;\ninterface TextFieldRootProps extends TextFieldInputProps, MarginProps, TextFieldRootOwnProps {}\nconst TextFieldRoot = React.forwardRef<TextFieldRootElement, TextFieldRootProps>(\n (props, forwardedRef) => {\n const inputRef = React.useRef<HTMLInputElement>(null);\n const { children, className, color, radius, style, ...inputProps } = extractProps(\n props,\n textFieldRootPropDefs,\n marginPropDefs\n );\n return (\n <div\n data-accent-color={color}\n data-radius={radius}\n style={style}\n className={classNames('rt-TextFieldRoot', className)}\n onPointerDown={(event) => {\n const target = event.target as HTMLElement;\n if (target.closest('input, button, a')) return;\n\n const input = inputRef.current;\n if (!input) return;\n\n // Same selector as in the CSS to find the right slot\n const isRightSlot = target.closest(`\n .rt-TextFieldSlot[data-side='right'],\n .rt-TextFieldSlot:not([data-side='right']) ~ .rt-TextFieldSlot:not([data-side='left'])\n `);\n\n const cursorPosition = isRightSlot ? input.value.length : 0;\n\n requestAnimationFrame(() => {\n // Only some input types support this, browsers will throw an error if not supported\n // See: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange#:~:text=Note%20that%20according,not%20support%20selection%22.\n try {\n input.setSelectionRange(cursorPosition, cursorPosition);\n } catch {}\n input.focus();\n });\n }}\n >\n <input\n spellCheck=\"false\"\n {...inputProps}\n ref={composeRefs(inputRef, forwardedRef)}\n className=\"rt-reset rt-TextFieldInput\"\n />\n {children}\n </div>\n );\n }\n);\nTextFieldRoot.displayName = 'TextField.Root';\n\ntype TextFieldSlotElement = React.ElementRef<'div'>;\ntype TextFieldSlotOwnProps = GetPropDefTypes<typeof textFieldSlotPropDefs>;\ninterface TextFieldSlotProps\n extends ComponentPropsWithout<'div', RemovedProps>,\n TextFieldSlotOwnProps {}\nconst TextFieldSlot = React.forwardRef<TextFieldSlotElement, TextFieldSlotProps>(\n (props, forwardedRef) => {\n const { className, color, side, ...slotProps } = extractProps(props, textFieldSlotPropDefs);\n return (\n <div\n data-accent-color={color}\n data-side={side}\n {...slotProps}\n ref={forwardedRef}\n className={classNames('rt-TextFieldSlot', className)}\n />\n );\n }\n);\nTextFieldSlot.displayName = 'TextField.Slot';\n\nexport { TextFieldRoot as Root, TextFieldSlot as Slot };\nexport type { TextFieldRootProps as RootProps, TextFieldSlotProps as SlotProps };\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,EAAA,SAAAC,IAAA,eAAAC,EAAAJ,GAEA,IAAAK,EAAuB,oBACvBC,EAAuB,yBACvBC,EAA4B,6BAE5BC,EAA6D,iCAC7DC,EAA6B,uCAC7BC,EAA+B,oCA+B/B,MAAMR,EAAgBG,EAAM,WAC1B,CAACM,EAAOC,IAAiB,CACvB,MAAMC,EAAWR,EAAM,OAAyB,IAAI,EAC9C,CAAE,SAAAS,EAAU,UAAAC,EAAW,MAAAC,EAAO,OAAAC,EAAQ,MAAAC,EAAO,GAAGC,CAAW,KAAI,gBACnER,EACA,wBACA,gBACF,EACA,OACEN,EAAA,cAAC,OACC,oBAAmBW,EACnB,cAAaC,EACb,MAAOC,EACP,aAAW,EAAAE,SAAW,mBAAoBL,CAAS,EACnD,cAAgBM,GAAU,CACxB,MAAMC,EAASD,EAAM,OACrB,GAAIC,EAAO,QAAQ,kBAAkB,EAAG,OAExC,MAAMC,EAAQV,EAAS,QACvB,GAAI,CAACU,EAAO,OAQZ,MAAMC,EALcF,EAAO,QAAQ;AAAA;AAAA;AAAA,WAGlC,EAEoCC,EAAM,MAAM,OAAS,EAE1D,sBAAsB,IAAM,CAG1B,GAAI,CACFA,EAAM,kBAAkBC,EAAgBA,CAAc,CACxD,MAAQ,CAAC,CACTD,EAAM,MAAM,CACd,CAAC,CACH,GAEAlB,EAAA,cAAC,SACC,WAAW,QACV,GAAGc,EACJ,OAAK,eAAYN,EAAUD,CAAY,EACvC,UAAU,6BACZ,EACCE,CACH,CAEJ,CACF,EACAZ,EAAc,YAAc,iBAO5B,MAAMC,EAAgBE,EAAM,WAC1B,CAACM,EAAOC,IAAiB,CACvB,KAAM,CAAE,UAAAG,EAAW,MAAAC,EAAO,KAAAS,EAAM,GAAGC,CAAU,KAAI,gBAAaf,EAAO,uBAAqB,EAC1F,OACEN,EAAA,cAAC,OACC,oBAAmBW,EACnB,YAAWS,EACV,GAAGC,EACJ,IAAKd,EACL,aAAW,EAAAQ,SAAW,mBAAoBL,CAAS,EACrD,CAEJ,CACF,EACAZ,EAAc,YAAc",
6
- "names": ["text_field_exports", "__export", "TextFieldRoot", "TextFieldSlot", "__toCommonJS", "React", "import_classnames", "import_internal", "import_text_field_props", "import_extract_props", "import_margin_props", "props", "forwardedRef", "inputRef", "children", "className", "color", "radius", "style", "inputProps", "classNames", "event", "target", "input", "cursorPosition", "side", "slotProps"]
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { composeRefs } from 'radix-ui/internal';\n\nimport { textFieldRootPropDefs, textFieldSlotPropDefs } from './text-field.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { NotInputTextualAttributes } from '../helpers/input-attributes.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TextFieldRootElement = React.ElementRef<'input'>;\ntype TextFieldRootOwnProps = GetPropDefTypes<typeof textFieldRootPropDefs> & {\n defaultValue?: string | number;\n value?: string | number;\n type?:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'hidden'\n | 'month'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url'\n | 'week';\n};\ntype TextFieldInputProps = ComponentPropsWithout<\n 'input',\n NotInputTextualAttributes | 'color' | 'defaultValue' | 'size' | 'type' | 'value'\n>;\ninterface TextFieldRootProps extends TextFieldInputProps, MarginProps, TextFieldRootOwnProps {}\nconst TextFieldRoot = React.forwardRef<TextFieldRootElement, TextFieldRootProps>(\n (props, forwardedRef) => {\n const inputRef = React.useRef<HTMLInputElement>(null);\n const { children, className, color, radius, panelBackground, style, ...inputProps } =\n extractProps(props, textFieldRootPropDefs, marginPropDefs);\n return (\n <div\n data-accent-color={color}\n data-radius={radius}\n data-panel-background={panelBackground}\n style={style}\n className={classNames('rt-TextFieldRoot', className)}\n onPointerDown={(event) => {\n const target = event.target as HTMLElement;\n if (target.closest('input, button, a')) return;\n\n const input = inputRef.current;\n if (!input) return;\n\n // Same selector as in the CSS to find the right slot\n const isRightSlot = target.closest(`\n .rt-TextFieldSlot[data-side='right'],\n .rt-TextFieldSlot:not([data-side='right']) ~ .rt-TextFieldSlot:not([data-side='left'])\n `);\n\n const cursorPosition = isRightSlot ? input.value.length : 0;\n\n requestAnimationFrame(() => {\n // Only some input types support this, browsers will throw an error if not supported\n // See: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange#:~:text=Note%20that%20according,not%20support%20selection%22.\n try {\n input.setSelectionRange(cursorPosition, cursorPosition);\n } catch {}\n input.focus();\n });\n }}\n >\n <input\n spellCheck=\"false\"\n {...inputProps}\n ref={composeRefs(inputRef, forwardedRef)}\n className=\"rt-reset rt-TextFieldInput\"\n />\n {children}\n </div>\n );\n },\n);\nTextFieldRoot.displayName = 'TextField.Root';\n\ntype TextFieldSlotElement = React.ElementRef<'div'>;\ntype TextFieldSlotOwnProps = GetPropDefTypes<typeof textFieldSlotPropDefs>;\ninterface TextFieldSlotProps\n extends ComponentPropsWithout<'div', RemovedProps>,\n TextFieldSlotOwnProps {}\nconst TextFieldSlot = React.forwardRef<TextFieldSlotElement, TextFieldSlotProps>(\n (props, forwardedRef) => {\n const { className, color, side, ...slotProps } = extractProps(props, textFieldSlotPropDefs);\n return (\n <div\n data-accent-color={color}\n data-side={side}\n {...slotProps}\n ref={forwardedRef}\n className={classNames('rt-TextFieldSlot', className)}\n />\n );\n },\n);\nTextFieldSlot.displayName = 'TextField.Slot';\n\nexport { TextFieldRoot as Root, TextFieldSlot as Slot };\nexport type { Text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EAAO,uBAAqB,EAC1F,OACEN,EAAA,cAAC,OACC,oBAAmBW,EACnB,YAAWU,EACV,GAAGC,EACJ,IAAKf,EACL,aAAW,EAAAS,SAAW,mBAAoBN,CAAS,EACrD,CAEJ,CACF,EACAZ,EAAc,YAAc",
6
+ "names": ["text_field_exports", "__export", "TextFieldRoot", "TextFieldSlot", "__toCommonJS", "React", "import_classnames", "import_internal", "import_text_field_props", "import_extract_props", "import_margin_props", "props", "forwardedRef", "inputRef", "children", "className", "color", "radius", "panelBackground", "style", "inputProps", "classNames", "event", "target", "input", "cursorPosition", "side", "slotProps"]
7
7
  }
@@ -1,4 +1,9 @@
1
1
  declare const textFieldRootPropDefs: {
2
+ panelBackground: {
3
+ type: "enum";
4
+ values: readonly ["solid", "translucent"];
5
+ default: undefined;
6
+ };
2
7
  radius: {
3
8
  type: "enum";
4
9
  values: readonly ["none", "small", "medium", "large", "full"];
@@ -19,7 +24,7 @@ declare const textFieldRootPropDefs: {
19
24
  variant: {
20
25
  type: "enum";
21
26
  className: string;
22
- values: readonly ["classic", "surface", "soft"];
27
+ values: readonly ["classic", "surface", "soft", "ghost", "outline"];
23
28
  default: "surface";
24
29
  };
25
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"text-field.props.d.ts","sourceRoot":"","sources":["../../../src/components/text-field.props.tsx"],"names":[],"mappings":"AAUA,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;CAQ1B,CAAC;AAIF,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa1B,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAC"}
1
+ {"version":3,"file":"text-field.props.d.ts","sourceRoot":"","sources":["../../../src/components/text-field.props.tsx"],"names":[],"mappings":"AAWA,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAU1B,CAAC;AAIF,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa1B,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";var t=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var D=(s,e)=>{for(var o in e)t(s,o,{get:e[o],enumerable:!0})},P=(s,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of c(e))!u.call(s,p)&&p!==o&&t(s,p,{get:()=>e[p],enumerable:!(a=m(e,p))||a.enumerable});return s};var y=s=>P(t({},"__esModule",{value:!0}),s);var z={};D(z,{textFieldRootPropDefs:()=>l,textFieldSlotPropDefs:()=>d});module.exports=y(z);var f=require("../props/color.prop.js"),r=require("../props/padding.props.js"),i=require("../props/radius.prop.js"),n=require("./flex.props.js");const g=["1","2","3"],v=["classic","surface","soft"],l={size:{type:"enum",className:"rt-r-size",values:g,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:v,default:"surface"},...f.colorPropDef,...i.radiusPropDef},x=["left","right"],d={side:{type:"enum",values:x},...f.colorPropDef,gap:n.flexPropDefs.gap,px:r.paddingPropDefs.px,pl:r.paddingPropDefs.pl,pr:r.paddingPropDefs.pr};
1
+ "use strict";var t=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var D=(s,e)=>{for(var o in e)t(s,o,{get:e[o],enumerable:!0})},P=(s,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of c(e))!m.call(s,p)&&p!==o&&t(s,p,{get:()=>e[p],enumerable:!(n=u(e,p))||n.enumerable});return s};var g=s=>P(t({},"__esModule",{value:!0}),s);var b={};D(b,{textFieldRootPropDefs:()=>d,textFieldSlotPropDefs:()=>l});module.exports=g(b);var a=require("../props/color.prop.js"),r=require("../props/padding.props.js"),f=require("../props/radius.prop.js"),i=require("./flex.props.js");const y=["1","2","3"],v=["classic","surface","soft","ghost","outline"],x=["solid","translucent"],d={size:{type:"enum",className:"rt-r-size",values:y,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:v,default:"surface"},...a.colorPropDef,...f.radiusPropDef,panelBackground:{type:"enum",values:x,default:void 0}},z=["left","right"],l={side:{type:"enum",values:z},...a.colorPropDef,gap:i.flexPropDefs.gap,px:r.paddingPropDefs.px,pl:r.paddingPropDefs.pl,pr:r.paddingPropDefs.pr};
2
2
  //# sourceMappingURL=text-field.props.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/text-field.props.tsx"],
4
- "sourcesContent": ["import { colorPropDef } from '../props/color.prop.js';\nimport { paddingPropDefs } from '../props/padding.props.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\nimport { flexPropDefs } from './flex.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\nconst variants = ['classic', 'surface', 'soft'] as const;\n\nconst textFieldRootPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'surface' },\n ...colorPropDef,\n ...radiusPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nconst sides = ['left', 'right'] as const;\n\nconst textFieldSlotPropDefs = {\n side: { type: 'enum', values: sides },\n ...colorPropDef,\n gap: flexPropDefs.gap,\n px: paddingPropDefs.px,\n pl: paddingPropDefs.pl,\n pr: paddingPropDefs.pr,\n} satisfies {\n side: PropDef<(typeof sides)[number]>;\n gap: typeof flexPropDefs.gap;\n px: typeof paddingPropDefs.px;\n pl: typeof paddingPropDefs.pl;\n pr: typeof paddingPropDefs.pr;\n};\n\nexport { textFieldRootPropDefs, textFieldSlotPropDefs };\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,2BAAAE,EAAA,0BAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAA6B,kCAC7BC,EAAgC,qCAChCC,EAA8B,mCAC9BC,EAA6B,2BAI7B,MAAMC,EAAQ,CAAC,IAAK,IAAK,GAAG,EACtBC,EAAW,CAAC,UAAW,UAAW,MAAM,EAExCR,EAAwB,CAC5B,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQO,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,SAAU,EACvF,GAAG,eACH,GAAG,eACL,EAKMC,EAAQ,CAAC,OAAQ,OAAO,EAExBR,EAAwB,CAC5B,KAAM,CAAE,KAAM,OAAQ,OAAQQ,CAAM,EACpC,GAAG,eACH,IAAK,eAAa,IAClB,GAAI,kBAAgB,GACpB,GAAI,kBAAgB,GACpB,GAAI,kBAAgB,EACtB",
6
- "names": ["text_field_props_exports", "__export", "textFieldRootPropDefs", "textFieldSlotPropDefs", "__toCommonJS", "import_color_prop", "import_padding_props", "import_radius_prop", "import_flex_props", "sizes", "variants", "sides"]
4
+ "sourcesContent": ["import { colorPropDef } from '../props/color.prop.js';\nimport { paddingPropDefs } from '../props/padding.props.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\nimport { flexPropDefs } from './flex.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\nconst variants = ['classic', 'surface', 'soft', 'ghost', 'outline'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst textFieldRootPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'surface' },\n ...colorPropDef,\n ...radiusPropDef,\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\nconst sides = ['left', 'right'] as const;\n\nconst textFieldSlotPropDefs = {\n side: { type: 'enum', values: sides },\n ...colorPropDef,\n gap: flexPropDefs.gap,\n px: paddingPropDefs.px,\n pl: paddingPropDefs.pl,\n pr: paddingPropDefs.pr,\n} satisfies {\n side: PropDef<(typeof sides)[number]>;\n gap: typeof flexPropDefs.gap;\n px: typeof paddingPropDefs.px;\n pl: typeof paddingPropDefs.pl;\n pr: typeof paddingPropDefs.pr;\n};\n\nexport { textFieldRootPropDefs, textFieldSlotPropDefs };\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,2BAAAE,EAAA,0BAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAA6B,kCAC7BC,EAAgC,qCAChCC,EAA8B,mCAC9BC,EAA6B,2BAI7B,MAAMC,EAAQ,CAAC,IAAK,IAAK,GAAG,EACtBC,EAAW,CAAC,UAAW,UAAW,OAAQ,QAAS,SAAS,EAC5DC,EAAmB,CAAC,QAAS,aAAa,EAE1CT,EAAwB,CAC5B,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQO,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,SAAU,EACvF,GAAG,eACH,GAAG,gBACH,gBAAiB,CAAE,KAAM,OAAQ,OAAQC,EAAkB,QAAS,MAAU,CAChF,EAMMC,EAAQ,CAAC,OAAQ,OAAO,EAExBT,EAAwB,CAC5B,KAAM,CAAE,KAAM,OAAQ,OAAQS,CAAM,EACpC,GAAG,eACH,IAAK,eAAa,IAClB,GAAI,kBAAgB,GACpB,GAAI,kBAAgB,GACpB,GAAI,kBAAgB,EACtB",
6
+ "names": ["text_field_props_exports", "__export", "textFieldRootPropDefs", "textFieldSlotPropDefs", "__toCommonJS", "import_color_prop", "import_padding_props", "import_radius_prop", "import_flex_props", "sizes", "variants", "panelBackgrounds", "sides"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/components/theme.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAIzF,KAAK,eAAe,GAAG,CAAC,OAAO,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AACxE,KAAK,gBAAgB,GAAG,CAAC,OAAO,aAAa,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAC1E,KAAK,cAAc,GAAG,CAAC,OAAO,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AACtE,KAAK,oBAAoB,GAAG,CAAC,OAAO,aAAa,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAClF,KAAK,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAChE,KAAK,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,UAAU,mBAAmB;IAC3B,kBAAkB,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,IAAI,CAAC;IAC1D,mBAAmB,EAAE,CAAC,WAAW,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7D,iBAAiB,EAAE,CAAC,SAAS,EAAE,cAAc,KAAK,IAAI,CAAC;IACvD,uBAAuB,EAAE,CAAC,eAAe,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACzE,cAAc,EAAE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AG,KAAK,CAAC,EACxD,aAAa;CAAG;AAgGpB,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAChD,YAAY,EAAE,UAAU,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var M=Object.create;var R=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var W=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var z=(o,r)=>{for(var a in r)R(o,a,{get:r[a],enumerable:!0})},E=(o,r,a,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of V(r))!q.call(o,t)&&t!==a&&R(o,t,{get:()=>r[t],enumerable:!(s=O(r,t))||s.enumerable});return o};var G=(o,r,a)=>(a=o!=null?M(W(o)):{},E(r||!o||!o.__esModule?R(a,"default",{value:o,enumerable:!0}):a,o)),F=o=>E(R({},"__esModule",{value:!0}),o);var J={};z(J,{Theme:()=>S,ThemeContext:()=>u,useThemeContext:()=>H});module.exports=F(J);var e=G(require("react")),w=G(require("classnames")),h=require("radix-ui"),N=require("../helpers/get-matching-gray-color.js"),n=require("./theme.props.js");const d=()=>{},u=e.createContext(void 0);function H(){const o=e.useContext(u);if(o===void 0)throw new Error("`useThemeContext` must be used within a `Theme`");return o}const S=e.forwardRef((o,r)=>e.useContext(u)===void 0?e.createElement(h.Tooltip.Provider,{delayDuration:200},e.createElement(h.Direction.Provider,{dir:"ltr"},e.createElement(D,{...o,ref:r}))):e.createElement(I,{...o,ref:r}));S.displayName="Theme";const D=e.forwardRef((o,r)=>{const{appearance:a=n.themePropDefs.appearance.default,accentColor:s=n.themePropDefs.accentColor.default,grayColor:t=n.themePropDefs.grayColor.default,panelBackground:p=n.themePropDefs.panelBackground.default,radius:c=n.themePropDefs.radius.default,scaling:l=n.themePropDefs.scaling.default,hasBackground:i=n.themePropDefs.hasBackground.default,...g}=o,[C,m]=e.useState(a);e.useEffect(()=>m(a),[a]);const[v,f]=e.useState(s);e.useEffect(()=>f(s),[s]);const[k,T]=e.useState(t);e.useEffect(()=>T(t),[t]);const[B,P]=e.useState(p);e.useEffect(()=>P(p),[p]);const[x,b]=e.useState(c);e.useEffect(()=>b(c),[c]);const[y,A]=e.useState(l);return e.useEffect(()=>A(l),[l]),e.createElement(I,{...g,ref:r,isRoot:!0,hasBackground:i,appearance:C,accentColor:v,grayColor:k,panelBackground:B,radius:x,scaling:y,onAppearanceChange:m,onAccentColorChange:f,onGrayColorChange:T,onPanelBackgroundChange:P,onRadiusChange:b,onScalingChange:A})});D.displayName="ThemeRoot";const I=e.forwardRef((o,r)=>{const a=e.useContext(u),{asChild:s,isRoot:t,hasBackground:p,appearance:c=a?.appearance??n.themePropDefs.appearance.default,accentColor:l=a?.accentColor??n.themePropDefs.accentColor.default,grayColor:i=a?.resolvedGrayColor??n.themePropDefs.grayColor.default,panelBackground:g=a?.panelBackground??n.themePropDefs.panelBackground.default,radius:C=a?.radius??n.themePropDefs.radius.default,scaling:m=a?.scaling??n.themePropDefs.scaling.default,onAppearanceChange:v=d,onAccentColorChange:f=d,onGrayColorChange:k=d,onPanelBackgroundChange:T=d,onRadiusChange:B=d,onScalingChange:P=d,...x}=o,b=s?h.Slot.Root:"div",y=i==="auto"?(0,N.getMatchingGrayColor)(l):i,A=o.appearance==="light"||o.appearance==="dark",j=p===void 0?t||A:p;return e.createElement(u.Provider,{value:e.useMemo(()=>({appearance:c,accentColor:l,grayColor:i,resolvedGrayColor:y,panelBackground:g,radius:C,scaling:m,onAppearanceChange:v,onAccentColorChange:f,onGrayColorChange:k,onPanelBackgroundChange:T,onRadiusChange:B,onScalingChange:P}),[c,l,i,y,g,C,m,v,f,k,T,B,P])},e.createElement(b,{"data-is-root-theme":t?"true":"false","data-accent-color":l,"data-gray-color":y,"data-has-background":j?"true":"false","data-panel-background":g,"data-radius":C,"data-scaling":m,ref:r,...x,className:(0,w.default)("radix-themes",{light:c==="light",dark:c==="dark"},x.className)}))});I.displayName="ThemeImpl";
1
+ "use strict";"use client";var M=Object.create;var R=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var W=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var z=(e,r)=>{for(var o in r)R(e,o,{get:r[o],enumerable:!0})},E=(e,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of V(r))!q.call(e,t)&&t!==o&&R(e,t,{get:()=>r[t],enumerable:!(c=O(r,t))||c.enumerable});return e};var G=(e,r,o)=>(o=e!=null?M(W(e)):{},E(r||!e||!e.__esModule?R(o,"default",{value:e,enumerable:!0}):o,e)),F=e=>E(R({},"__esModule",{value:!0}),e);var J={};z(J,{Theme:()=>S,ThemeContext:()=>u,useThemeContext:()=>H});module.exports=F(J);var a=G(require("react")),w=G(require("classnames")),h=require("radix-ui"),N=require("../helpers/get-matching-gray-color.js"),n=require("./theme.props.js");const m=()=>{},u=a.createContext(void 0);function H(){const e=a.useContext(u);if(e===void 0)throw new Error("`useThemeContext` must be used within a `Theme`");return e}const S=a.forwardRef((e,r)=>a.useContext(u)===void 0?a.createElement(h.Tooltip.Provider,{delayDuration:200},a.createElement(h.Direction.Provider,{dir:"ltr"},a.createElement(D,{...e,ref:r}))):a.createElement(I,{...e,ref:r}));S.displayName="Theme";const D=a.forwardRef((e,r)=>{const{appearance:o=n.themePropDefs.appearance.default,accentColor:c=n.themePropDefs.accentColor.default,grayColor:t=n.themePropDefs.grayColor.default,panelBackground:p=n.themePropDefs.panelBackground.default,radius:l=n.themePropDefs.radius.default,scaling:s=n.themePropDefs.scaling.default,hasBackground:i=n.themePropDefs.hasBackground.default,...g}=e,[C,d]=a.useState(o);a.useEffect(()=>d(o),[o]);const[k,f]=a.useState(c);a.useEffect(()=>f(c),[c]);const[v,T]=a.useState(t);a.useEffect(()=>T(t),[t]);const[B,P]=a.useState(p);a.useEffect(()=>P(p),[p]);const[x,b]=a.useState(l);a.useEffect(()=>b(l),[l]);const[y,A]=a.useState(s);return a.useEffect(()=>A(s),[s]),a.createElement(I,{...g,ref:r,isRoot:!0,hasBackground:i,appearance:C,accentColor:k,grayColor:v,panelBackground:B,radius:x,scaling:y,onAppearanceChange:d,onAccentColorChange:f,onGrayColorChange:T,onPanelBackgroundChange:P,onRadiusChange:b,onScalingChange:A})});D.displayName="ThemeRoot";const I=a.forwardRef((e,r)=>{const o=a.useContext(u),{asChild:c,isRoot:t,hasBackground:p,appearance:l=e.appearance??o?.appearance??n.themePropDefs.appearance.default,accentColor:s=e.accentColor??o?.accentColor??n.themePropDefs.accentColor.default,grayColor:i=e.grayColor??o?.resolvedGrayColor??n.themePropDefs.grayColor.default,panelBackground:g=e.panelBackground??o?.panelBackground??n.themePropDefs.panelBackground.default,radius:C=e.radius??o?.radius??n.themePropDefs.radius.default,scaling:d=e.scaling??o?.scaling??n.themePropDefs.scaling.default,onAppearanceChange:k=m,onAccentColorChange:f=m,onGrayColorChange:v=m,onPanelBackgroundChange:T=m,onRadiusChange:B=m,onScalingChange:P=m,...x}=e,b=c?h.Slot.Root:"div",y=i==="auto"?(0,N.getMatchingGrayColor)(s):i,A=e.appearance==="light"||e.appearance==="dark",j=p===void 0?t||A:p;return a.createElement(u.Provider,{value:a.useMemo(()=>({appearance:l,accentColor:s,grayColor:i,resolvedGrayColor:y,panelBackground:g,radius:C,scaling:d,onAppearanceChange:k,onAccentColorChange:f,onGrayColorChange:v,onPanelBackgroundChange:T,onRadiusChange:B,onScalingChange:P}),[l,s,i,y,g,C,d,k,f,v,T,B,P])},a.createElement(b,{"data-is-root-theme":t?"true":"false","data-accent-color":s,"data-gray-color":y,"data-has-background":j?"true":"false","data-panel-background":g,"data-radius":C,"data-scaling":d,ref:r,...x,className:(0,w.default)("radix-themes",{light:l==="light",dark:l==="dark"},x.className)}))});I.displayName="ThemeImpl";
2
2
  //# sourceMappingURL=theme.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/theme.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Direction, Slot, Tooltip as TooltipPrimitive } from 'radix-ui';\n\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ThemeOwnProps } from './theme.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\nconst noop = () => {};\n\ntype ThemeAppearance = (typeof themePropDefs.appearance.values)[number];\ntype ThemeAccentColor = (typeof themePropDefs.accentColor.values)[number];\ntype ThemeGrayColor = (typeof themePropDefs.grayColor.values)[number];\ntype ThemePanelBackground = (typeof themePropDefs.panelBackground.values)[number];\ntype ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeScaling = (typeof themePropDefs.scaling.values)[number];\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onPanelBackgroundChange: (panelBackground: ThemePanelBackground) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onScalingChange: (scaling: ThemeScaling) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n panelBackground: ThemePanelBackground;\n radius: ThemeRadius;\n scaling: ThemeScaling;\n}\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(undefined);\n\nfunction useThemeContext() {\n const context = React.useContext(ThemeContext);\n if (context === undefined) {\n throw new Error('`useThemeContext` must be used within a `Theme`');\n }\n return context;\n}\n\ninterface ThemeProps extends ThemeImplPublicProps {}\nconst Theme = React.forwardRef<ThemeImplElement, ThemeProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <TooltipPrimitive.Provider delayDuration={200}>\n <Direction.Provider dir=\"ltr\">\n <ThemeRoot {...props} ref={forwardedRef} />\n </Direction.Provider>\n </TooltipPrimitive.Provider>\n );\n }\n return <ThemeImpl {...props} ref={forwardedRef} />;\n});\nTheme.displayName = 'Theme';\n\nconst ThemeRoot = React.forwardRef<ThemeImplElement, ThemeImplPublicProps>(\n (props, forwardedRef) => {\n const {\n appearance: appearanceProp = themePropDefs.appearance.default,\n accentColor: accentColorProp = themePropDefs.accentColor.default,\n grayColor: grayColorProp = themePropDefs.grayColor.default,\n panelBackground: panelBackgroundProp = themePropDefs.panelBackground.default,\n radius: radiusProp = themePropDefs.radius.default,\n scaling: scalingProp = themePropDefs.scaling.default,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\n const [appearance, setAppearance] = React.useState(appearanceProp);\n React.useEffect(() => setAppearance(appearanceProp), [appearanceProp]);\n\n const [accentColor, setAccentColor] = React.useState(accentColorProp);\n React.useEffect(() => setAccentColor(accentColorProp), [accentColorProp]);\n\n const [grayColor, setGrayColor] = React.useState(grayColorProp);\n React.useEffect(() => setGrayColor(grayColorProp), [grayColorProp]);\n\n const [panelBackground, setPanelBackground] = React.useState(panelBackgroundProp);\n React.useEffect(() => setPanelBackground(panelBackgroundProp), [panelBackgroundProp]);\n\n const [radius, setRadius] = React.useState(radiusProp);\n React.useEffect(() => setRadius(radiusProp), [radiusProp]);\n\n const [scaling, setScaling] = React.useState(scalingProp);\n React.useEffect(() => setScaling(scalingProp), [scalingProp]);\n\n return (\n <ThemeImpl\n {...rootProps}\n ref={forwardedRef}\n isRoot\n hasBackground={hasBackground}\n //\n appearance={appearance}\n accentColor={accentColor}\n grayColor={grayColor}\n panelBackground={panelBackground}\n radius={radius}\n scaling={scaling}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onPanelBackgroundChange={setPanelBackground}\n onRadiusChange={setRadius}\n onScalingChange={setScaling}\n />\n );\n }\n);\nThemeRoot.displayName = 'ThemeRoot';\n\ntype ThemeImplElement = React.ElementRef<'div'>;\ninterface ThemeImplProps extends ThemeImplPublicProps, ThemeImplPrivateProps {}\ninterface ThemeImplPublicProps\n extends ComponentPropsWithout<'div', RemovedProps | 'dir'>,\n ThemeOwnProps {}\ninterface ThemeImplPrivateProps extends Partial<ThemeChangeHandlers> {\n isRoot?: boolean;\n}\nconst ThemeImpl = React.forwardRef<ThemeImplElement, ThemeImplProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const {\n asChild,\n isRoot,\n hasBackground: hasBackgroundProp,\n //\n appearance = context?.appearance ?? themePropDefs.appearance.default,\n accentColor = context?.accentColor ?? themePropDefs.accentColor.default,\n grayColor = context?.resolvedGrayColor ?? themePropDefs.grayColor.default,\n panelBackground = context?.panelBackground ?? themePropDefs.panelBackground.default,\n radius = context?.radius ?? themePropDefs.radius.default,\n scaling = context?.scaling ?? themePropDefs.scaling.default,\n //\n onAppearanceChange = noop,\n onAccentColorChange = noop,\n onGrayColorChange = noop,\n onPanelBackgroundChange = noop,\n onRadiusChange = noop,\n onScalingChange = noop,\n //\n ...themeProps\n } = props;\n const Comp = asChild ? Slot.Root : 'div';\n const resolvedGrayColor = grayColor === 'auto' ? getMatchingGrayColor(accentColor) : grayColor;\n const isExplicitAppearance = props.appearance === 'light' || props.appearance === 'dark';\n const hasBackground =\n hasBackgroundProp === undefined ? isRoot || isExplicitAppearance : hasBackgroundProp;\n return (\n <ThemeContext.Provider\n value={React.useMemo(\n () => ({\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n panelBackground,\n radius,\n scaling,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n panelBackground,\n radius,\n scaling,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n ]\n )}\n >\n <Comp\n data-is-root-theme={isRoot ? 'true' : 'false'}\n data-accent-color={accentColor}\n data-gray-color={resolvedGrayColor}\n // for nested `Theme` background\n data-has-background={hasBackground ? 'true' : 'false'}\n data-panel-background={panelBackground}\n data-radius={radius}\n data-scaling={scaling}\n ref={forwardedRef}\n {...themeProps}\n className={classNames(\n 'radix-themes',\n {\n light: appearance === 'light',\n dark: appearance === 'dark',\n },\n themeProps.className\n )}\n />\n </ThemeContext.Provider>\n );\n});\nThemeImpl.displayName = 'ThemeImpl';\n\nexport { Theme, ThemeContext, useThemeContext };\nexport type { ThemeProps };\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,iBAAAC,EAAA,oBAAAC,IAAA,eAAAC,EAAAL,GAEA,IAAAM,EAAuB,oBACvBC,EAAuB,yBACvBC,EAA6D,oBAE7DC,EAAqC,iDACrCC,EAA8B,4BAK9B,MAAMC,EAAO,IAAM,CAAC,EA2BdR,EAAeG,EAAM,cAA6C,MAAS,EAEjF,SAASF,GAAkB,CACzB,MAAMQ,EAAUN,EAAM,WAAWH,CAAY,EAC7C,GAAIS,IAAY,OACd,MAAM,IAAI,MAAM,iDAAiD,EAEnE,OAAOA,CACT,CAGA,MAAMV,EAAQI,EAAM,WAAyC,CAACO,EAAOC,IACnDR,EAAM,WAAWH,CAAY,IAClB,OAGvBG,EAAA,cAAC,EAAAS,QAAiB,SAAjB,CAA0B,cAAe,KACxCT,EAAA,cAAC,YAAU,SAAV,CAAmB,IAAI,OACtBA,EAAA,cAACU,EAAA,CAAW,GAAGH,EAAO,IAAKC,EAAc,CAC3C,CACF,EAGGR,EAAA,cAACW,EAAA,CAAW,GAAGJ,EAAO,IAAKC,EAAc,CACjD,EACDZ,EAAM,YAAc,QAEpB,MAAMc,EAAYV,EAAM,WACtB,CAACO,EAAOC,IAAiB,CACvB,KAAM,CACJ,WAAYI,EAAiB,gBAAc,WAAW,QACtD,YAAaC,EAAkB,gBAAc,YAAY,QACzD,UAAWC,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EAAgB,OAAS,QAC9C,wBAAuBQ,EACvB,cAAaE,EACb,eAAcE,EACd,IAAKtB,EACJ,GAAGiC,EACJ,aAAW,EAAAI,SACT,eACA,CACE,MAAOzB,IAAe,QACtB,KAAMA,IAAe,MACvB,EACAqB,EAAW,SACb,EACF,CACF,CAEJ,CAAC,EACD9B,EAAU,YAAc",
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Direction, Slot, Tooltip as TooltipPrimitive } from 'radix-ui';\n\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ThemeOwnProps } from './theme.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\nconst noop = () => {};\n\ntype ThemeAppearance = (typeof themePropDefs.appearance.values)[number];\ntype ThemeAccentColor = (typeof themePropDefs.accentColor.values)[number];\ntype ThemeGrayColor = (typeof themePropDefs.grayColor.values)[number];\ntype ThemePanelBackground = (typeof themePropDefs.panelBackground.values)[number];\ntype ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeScaling = (typeof themePropDefs.scaling.values)[number];\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onPanelBackgroundChange: (panelBackground: ThemePanelBackground) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onScalingChange: (scaling: ThemeScaling) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n panelBackground: ThemePanelBackground;\n radius: ThemeRadius;\n scaling: ThemeScaling;\n}\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(undefined);\n\nfunction useThemeContext() {\n const context = React.useContext(ThemeContext);\n if (context === undefined) {\n throw new Error('`useThemeContext` must be used within a `Theme`');\n }\n return context;\n}\n\ninterface ThemeProps extends ThemeImplPublicProps {}\nconst Theme = React.forwardRef<ThemeImplElement, ThemeProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <TooltipPrimitive.Provider delayDuration={200}>\n <Direction.Provider dir=\"ltr\">\n <ThemeRoot {...props} ref={forwardedRef} />\n </Direction.Provider>\n </TooltipPrimitive.Provider>\n );\n }\n return <ThemeImpl {...props} ref={forwardedRef} />;\n});\nTheme.displayName = 'Theme';\n\nconst ThemeRoot = React.forwardRef<ThemeImplElement, ThemeImplPublicProps>(\n (props, forwardedRef) => {\n const {\n appearance: appearanceProp = themePropDefs.appearance.default,\n accentColor: accentColorProp = themePropDefs.accentColor.default,\n grayColor: grayColorProp = themePropDefs.grayColor.default,\n panelBackground: panelBackgroundProp = themePropDefs.panelBackground.default,\n radius: radiusProp = themePropDefs.radius.default,\n scaling: scalingProp = themePropDefs.scaling.default,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\n const [appearance, setAppearance] = React.useState(appearanceProp);\n React.useEffect(() => setAppearance(appearanceProp), [appearanceProp]);\n\n const [accentColor, setAccentColor] = React.useState(accentColorProp);\n React.useEffect(() => setAccentColor(accentColorProp), [accentColorProp]);\n\n const [grayColor, setGrayColor] = React.useState(grayColorProp);\n React.useEffect(() => setGrayColor(grayColorProp), [grayColorProp]);\n\n const [panelBackground, setPanelBackground] = React.useState(panelBackgroundProp);\n React.useEffect(() => setPanelBackground(panelBackgroundProp), [panelBackgroundProp]);\n\n const [radius, setRadius] = React.useState(radiusProp);\n React.useEffect(() => setRadius(radiusProp), [radiusProp]);\n\n const [scaling, setScaling] = React.useState(scalingProp);\n React.useEffect(() => setScaling(scalingProp), [scalingProp]);\n\n return (\n <ThemeImpl\n {...rootProps}\n ref={forwardedRef}\n isRoot\n hasBackground={hasBackground}\n //\n appearance={appearance}\n accentColor={accentColor}\n grayColor={grayColor}\n panelBackground={panelBackground}\n radius={radius}\n scaling={scaling}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onPanelBackgroundChange={setPanelBackground}\n onRadiusChange={setRadius}\n onScalingChange={setScaling}\n />\n );\n },\n);\nThemeRoot.displayName = 'ThemeRoot';\n\ntype ThemeImplElement = React.ElementRef<'div'>;\ninterface ThemeImplProps extends ThemeImplPublicProps, ThemeImplPrivateProps {}\ninterface ThemeImplPublicProps\n extends ComponentPropsWithout<'div', RemovedProps | 'dir'>,\n ThemeOwnProps {}\ninterface ThemeImplPrivateProps extends Partial<ThemeChangeHandlers> {\n isRoot?: boolean;\n}\nconst ThemeImpl = React.forwardRef<ThemeImplElement, ThemeImplProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const {\n asChild,\n isRoot,\n hasBackground: hasBackgroundProp,\n //\n appearance = props.appearance ?? context?.appearance ?? themePropDefs.appearance.default,\n accentColor = props.accentColor ?? context?.accentColor ?? themePropDefs.accentColor.default,\n grayColor = props.grayColor ?? context?.resolvedGrayColor ?? themePropDefs.grayColor.default,\n panelBackground = props.panelBackground ??\n context?.panelBackground ??\n themePropDefs.panelBackground.default,\n radius = props.radius ?? context?.radius ?? themePropDefs.radius.default,\n scaling = props.scaling ?? context?.scaling ?? themePropDefs.scaling.default,\n //\n onAppearanceChange = noop,\n onAccentColorChange = noop,\n onGrayColorChange = noop,\n onPanelBackgroundChange = noop,\n onRadiusChange = noop,\n onScalingChange = noop,\n //\n ...themeProps\n } = props;\n const Comp = asChild ? Slot.Root : 'div';\n const resolvedGrayColor = grayColor === 'auto' ? getMatchingGrayColor(accentColor) : grayColor;\n const isExplicitAppearance = props.appearance === 'light' || props.appearance === 'dark';\n const hasBackground =\n hasBackgroundProp === undefined ? isRoot || isExplicitAppearance : hasBackgroundProp;\n return (\n <ThemeContext.Provider\n value={React.useMemo(\n () => ({\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n panelBackground,\n radius,\n scaling,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n panelBackground,\n radius,\n scaling,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n ],\n )}\n >\n <Comp\n data-is-root-theme={isRoot ? 'true' : 'false'}\n data-accent-color={accentColor}\n data-gray-color={resolvedGrayColor}\n // for nested `Theme` background\n data-has-background={hasBackground ? 'true' : 'false'}\n data-panel-background={panelBackground}\n data-radius={radius}\n data-scaling={scaling}\n ref={forwardedRef}\n {...themeProps}\n className={classNames(\n 'radix-themes',\n {\n light: appearance === 'light',\n dark: appearance === 'dark',\n },\n themeProps.className,\n )}\n />\n </ThemeContext.Provider>\n );\n});\nThemeImpl.displayName = 'ThemeImpl';\n\nexport { Theme, ThemeContext, useThemeContext };\nexport type { ThemeProps };\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,iBAAAC,EAAA,oBAAAC,IAAA,eAAAC,EAAAL,GAEA,IAAAM,EAAuB,oBACvBC,EAAuB,yBACvBC,EAA6D,oBAE7DC,EAAqC,iDACrCC,EAA8B,4BAK9B,MAAMC,EAAO,IAAM,CAAC,EA2BdR,EAAeG,EAAM,cAA6C,MAAS,EAEjF,SAASF,GAAkB,CACzB,MAAMQ,EAAUN,EAAM,WAAWH,CAAY,EAC7C,GAAIS,IAAY,OACd,MAAM,IAAI,MAAM,iDAAiD,EAEnE,OAAOA,CACT,CAGA,MAAMV,EAAQI,EAAM,WAAyC,CAACO,EAAOC,IACnDR,EAAM,WAAWH,CAAY,IAClB,OAGvBG,EAAA,cAAC,EAAAS,QAAiB,SAAjB,CAA0B,cAAe,KACxCT,EAAA,cAAC,YAAU,SAAV,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QACX,KAAO,CACL,WAAAoB,EACA,YAAAE,EACA,UAAAE,EACA,kBAAAmB,EACA,gBAAAjB,EACA,OAAAE,EACA,QAAAE,EAEA,mBAAAK,EACA,oBAAAC,EACA,kBAAAC,EACA,wBAAAC,EACA,eAAAC,EACA,gBAAAC,CACF,GACA,CACEpB,EACAE,EACAE,EACAmB,EACAjB,EACAE,EACAE,EAEAK,EACAC,EACAC,EACAC,EACAC,EACAC,CACF,CACF,GAEAxC,EAAA,cAAC0C,EAAA,CACC,qBAAoBT,EAAS,OAAS,QACtC,oBAAmBX,EACnB,kBAAiBqB,EAEjB,sBAAqBzB,EAAgB,OAAS,QAC9C,wBAAuBQ,EACvB,cAAaE,EACb,eAAcE,EACd,IAAKtB,EACJ,GAAGiC,EACJ,aAAW,EAAAI,SACT,eACA,CACE,MAAOzB,IAAe,QACtB,KAAMA,IAAe,MACvB,EACAqB,EAAW,SACb,EACF,CACF,CAEJ,CAAC,EACD9B,EAAU,YAAc",
6
6
  "names": ["theme_exports", "__export", "Theme", "ThemeContext", "useThemeContext", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "import_get_matching_gray_color", "import_theme_props", "noop", "context", "props", "forwardedRef", "TooltipPrimitive", "ThemeRoot", "ThemeImpl", "appearanceProp", "accentColorProp", "grayColorProp", "panelBackgroundProp", "radiusProp", "scalingProp", "hasBackground", "rootProps", "appearance", "setAppearance", "accentColor", "setAccentColor", "grayColor", "setGrayColor", "panelBackground", "setPanelBackground", "radius", "setRadius", "scaling", "setScaling", "asChild", "isRoot", "hasBackgroundProp", "onAppearanceChange", "onAccentColorChange", "onGrayColorChange", "onPanelBackgroundChange", "onRadiusChange", "onScalingChange", "themeProps", "Comp", "resolvedGrayColor", "isExplicitAppearance", "classNames"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var p=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var a=(e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})},b=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of m(t))!c.call(e,o)&&o!==n&&p(e,o,{get:()=>t[o],enumerable:!(s=f(t,o))||s.enumerable});return e};var d=e=>b(p({},"__esModule",{value:!0}),e);var l={};a(l,{mapButtonSizeToSpinnerSize:()=>u,mapCalloutSizeToTextSize:()=>i,mapResponsiveProp:()=>r});module.exports=d(l);function r(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([n,s])=>[n,t(s)]))}function i(e){return e==="3"?"3":"2"}function u(e){switch(e){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}
1
+ "use strict";var p=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var a=(e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})},b=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of m(t))!c.call(e,o)&&o!==n&&p(e,o,{get:()=>t[o],enumerable:!(s=f(t,o))||s.enumerable});return e};var d=e=>b(p({},"__esModule",{value:!0}),e);var l={};a(l,{mapButtonSizeToSpinnerSize:()=>i,mapCalloutSizeToTextSize:()=>u,mapResponsiveProp:()=>r});module.exports=d(l);function r(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([n,s])=>[n,t(s)]))}function u(e){return e==="3"?"3":e==="1"?"1":"2"}function i(e){switch(e){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}
2
2
  //# sourceMappingURL=map-prop-values.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/helpers/map-prop-values.ts"],
4
- "sourcesContent": ["import type { baseButtonPropDefs } from '../components/_internal/base-button.props.js';\nimport type { calloutRootPropDefs } from '../components/callout.props.js';\nimport type { spinnerPropDefs } from '../components/spinner.props.js';\nimport type { textPropDefs } from '../components/text.props.js';\nimport type { Responsive } from '../props/prop-def.js';\n\nfunction mapResponsiveProp<Input extends string, Output>(\n propValue: Responsive<Input> | undefined,\n mapValue: (value: Input) => Output\n): Responsive<Output> | undefined {\n if (propValue === undefined) return undefined;\n if (typeof propValue === 'string') {\n return mapValue(propValue);\n }\n return Object.fromEntries(\n Object.entries(propValue).map(([key, value]) => [key, mapValue(value)])\n );\n}\n\nfunction mapCalloutSizeToTextSize(\n size: (typeof calloutRootPropDefs.size.values)[number]\n): (typeof textPropDefs.size.values)[number] {\n return size === '3' ? '3' : '2';\n}\n\nfunction mapButtonSizeToSpinnerSize(\n size: (typeof baseButtonPropDefs.size.values)[number]\n): (typeof spinnerPropDefs.size.values)[number] {\n switch (size) {\n case '1':\n return '1';\n case '2':\n case '3':\n return '2';\n case '4':\n return '3';\n }\n}\n\nexport { mapResponsiveProp, mapCalloutSizeToTextSize, mapButtonSizeToSpinnerSize };\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,EAAA,6BAAAC,EAAA,sBAAAC,IAAA,eAAAC,EAAAL,GAMA,SAASI,EACPE,EACAC,EACgC,CAChC,GAAID,IAAc,OAClB,OAAI,OAAOA,GAAc,SAChBC,EAASD,CAAS,EAEpB,OAAO,YACZ,OAAO,QAAQA,CAAS,EAAE,IAAI,CAAC,CAACE,EAAKC,CAAK,IAAM,CAACD,EAAKD,EAASE,CAAK,CAAC,CAAC,CACxE,CACF,CAEA,SAASN,EACPO,EAC2C,CAC3C,OAAOA,IAAS,IAAM,IAAM,GAC9B,CAEA,SAASR,EACPQ,EAC8C,CAC9C,OAAQA,EAAM,CACZ,IAAK,IACH,MAAO,IACT,IAAK,IACL,IAAK,IACH,MAAO,IACT,IAAK,IACH,MAAO,GACX,CACF",
4
+ "sourcesContent": ["import type { baseButtonPropDefs } from '../components/_internal/base-button.props.js';\nimport type { calloutRootPropDefs } from '../components/callout.props.js';\nimport type { spinnerPropDefs } from '../components/spinner.props.js';\nimport type { textPropDefs } from '../components/text.props.js';\nimport type { Responsive } from '../props/prop-def.js';\n\nfunction mapResponsiveProp<Input extends string, Output>(\n propValue: Responsive<Input> | undefined,\n mapValue: (value: Input) => Output\n): Responsive<Output> | undefined {\n if (propValue === undefined) return undefined;\n if (typeof propValue === 'string') {\n return mapValue(propValue);\n }\n return Object.fromEntries(\n Object.entries(propValue).map(([key, value]) => [key, mapValue(value)])\n );\n}\n\nfunction mapCalloutSizeToTextSize(\n size: (typeof calloutRootPropDefs.size.values)[number]\n): (typeof textPropDefs.size.values)[number] {\n return size === '3' ? '3' : size === '1' ? '1' : '2';\n}\n\nfunction mapButtonSizeToSpinnerSize(\n size: (typeof baseButtonPropDefs.size.values)[number]\n): (typeof spinnerPropDefs.size.values)[number] {\n switch (size) {\n case '1':\n return '1';\n case '2':\n case '3':\n return '2';\n case '4':\n return '3';\n }\n}\n\nexport { mapResponsiveProp, mapCalloutSizeToTextSize, mapButtonSizeToSpinnerSize };\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,EAAA,6BAAAC,EAAA,sBAAAC,IAAA,eAAAC,EAAAL,GAMA,SAASI,EACPE,EACAC,EACgC,CAChC,GAAID,IAAc,OAClB,OAAI,OAAOA,GAAc,SAChBC,EAASD,CAAS,EAEpB,OAAO,YACZ,OAAO,QAAQA,CAAS,EAAE,IAAI,CAAC,CAACE,EAAKC,CAAK,IAAM,CAACD,EAAKD,EAASE,CAAK,CAAC,CAAC,CACxE,CACF,CAEA,SAASN,EACPO,EAC2C,CAC3C,OAAOA,IAAS,IAAM,IAAMA,IAAS,IAAM,IAAM,GACnD,CAEA,SAASR,EACPQ,EAC8C,CAC9C,OAAQA,EAAM,CACZ,IAAK,IACH,MAAO,IACT,IAAK,IACL,IAAK,IACH,MAAO,IACT,IAAK,IACH,MAAO,GACX,CACF",
6
6
  "names": ["map_prop_values_exports", "__export", "mapButtonSizeToSpinnerSize", "mapCalloutSizeToTextSize", "mapResponsiveProp", "__toCommonJS", "propValue", "mapValue", "key", "value", "size"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"base-button.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAQ5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAGrE,KAAK,0BAA0B,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,IAAI;IACxE,EAAE,CAAC,EAAE,CAAC,CAAC;CACR,GAAG,kBAAkB,GACpB,WAAW,GACX,qBAAqB,CAAC,CAAC,EAAE,YAAY,GAAG,MAAM,kBAAkB,GAAG,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC;AAE/F,UAAU,eAAgB,SAAQ,0BAA0B;CAAG;AAE/D,QAAA,MAAM,UAAU,2FA8Ed,CAAC;AAGH,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"base-button.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAQ5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAGrE,KAAK,0BAA0B,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,IAAI;IACxE,EAAE,CAAC,EAAE,CAAC,CAAC;CACR,GAAG,kBAAkB,GACpB,WAAW,GACX,qBAAqB,CAAC,CAAC,EAAE,YAAY,GAAG,MAAM,kBAAkB,GAAG,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC;AAE/F,UAAU,eAAgB,SAAQ,0BAA0B;CAAG;AAE/D,QAAA,MAAM,UAAU,2FAkFd,CAAC;AAGH,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import*as e from"react";import h from"classnames";import{Slot as g}from"radix-ui";import{baseButtonPropDefs as i}from"./base-button.props.js";import{Flex as C}from"../flex.js";import{Spinner as x}from"../spinner.js";import{VisuallyHidden as w}from"../visually-hidden.js";import{extractProps as D}from"../../helpers/extract-props.js";import{mapResponsiveProp as z,mapButtonSizeToSpinnerSize as S}from"../../helpers/map-prop-values.js";import{marginPropDefs as T}from"../../props/margin.props.js";const p=e.forwardRef((o,d)=>{const{size:l=i.size.default}=o,{className:m,children:t,asChild:n,as:s,color:u,radius:B,disabled:r=o.loading,...f}=D(o,i,T),y=n?g.Root:s||"button",P=n||!s||["button","input","textarea","select"].includes(s),c=e.useId(),a=o.loading?`${c}-loading`:void 0,b=o.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":a}:{};return e.createElement(y,{"data-disabled":r||void 0,"data-accent-color":u,"data-radius":B,...f,...b,ref:d,className:h("rt-reset","rt-BaseButton",m),...P&&{disabled:r}},o.loading?e.createElement(e.Fragment,null,e.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},t),e.createElement(w,null,e.createElement("span",{id:a},"Loading, please wait..."),t),e.createElement(C,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},e.createElement("span",null,e.createElement(x,{size:z(l,S),"aria-hidden":"true"})))):t)});p.displayName="BaseButton";export{p as BaseButton};
1
+ import*as e from"react";import C from"classnames";import{Slot as x}from"radix-ui";import{baseButtonPropDefs as i}from"./base-button.props.js";import{Flex as w}from"../flex.js";import{Spinner as D}from"../spinner.js";import{VisuallyHidden as z}from"../visually-hidden.js";import{extractProps as S}from"../../helpers/extract-props.js";import{mapResponsiveProp as T,mapButtonSizeToSpinnerSize as j}from"../../helpers/map-prop-values.js";import{marginPropDefs as k}from"../../props/margin.props.js";const p=e.forwardRef((o,d)=>{const{size:l=i.size.default}=o,{className:u,children:t,asChild:n,as:s,color:m,radius:f,panelBackground:B,flush:c,disabled:a=o.loading,...y}=S(o,i,k),P=n?x.Root:s||"button",b=n||!s||["button","input","textarea","select"].includes(s),h=e.useId(),r=o.loading?`${h}-loading`:void 0,g=o.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":r}:{};return e.createElement(P,{"data-disabled":a||void 0,"data-accent-color":m,"data-radius":f,"data-panel-background":B,"data-flush":c?"true":void 0,...y,...g,ref:d,className:C("rt-reset","rt-BaseButton",u),...b&&{disabled:a}},o.loading?e.createElement(e.Fragment,null,e.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},t),e.createElement(z,null,e.createElement("span",{id:r},"Loading, please wait..."),t),e.createElement(w,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},e.createElement("span",null,e.createElement(D,{size:T(l,j),"aria-hidden":"true"})))):t)});p.displayName="BaseButton";export{p as BaseButton};
2
2
  //# sourceMappingURL=base-button.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/base-button.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { mapResponsiveProp, mapButtonSizeToSpinnerSize } from '../../helpers/map-prop-values.js';\nimport { marginPropDefs } from '../../props/margin.props.js';\n\nimport type { MarginProps } from '../../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../../props/prop-def.js';\n\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\n\n// Polymorphic types using the proper ComponentPropsWithout pattern\ntype PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {\n as?: C;\n} & BaseButtonOwnProps &\n MarginProps &\n ComponentPropsWithout<C, RemovedProps | keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;\n\ninterface BaseButtonProps extends PolymorphicBaseButtonProps {}\n\nconst BaseButton = React.forwardRef<BaseButtonElement, BaseButtonProps>((props, forwardedRef) => {\n const { size = baseButtonPropDefs.size.default } = props;\n const {\n className,\n children,\n asChild,\n as,\n color,\n radius,\n disabled = props.loading,\n ...baseButtonProps\n } = extractProps(props, baseButtonPropDefs, marginPropDefs);\n\n // asChild takes precedence over as prop\n const Comp = asChild ? Slot.Root : as || 'button';\n\n // Only pass disabled for elements that support it\n const shouldPassDisabled =\n asChild || !as || ['button', 'input', 'textarea', 'select'].includes(as);\n\n // Generate unique ID for loading announcements\n const loadingId = React.useId();\n const describedById = props.loading ? `${loadingId}-loading` : undefined;\n\n // Enhanced accessibility props for loading state\n const accessibilityProps = props.loading\n ? {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'aria-describedby': describedById,\n }\n : {};\n\n return (\n <Comp\n // The `data-disabled` attribute enables correct styles when doing `<Button asChild disabled>`\n data-disabled={disabled || undefined}\n data-accent-color={color}\n data-radius={radius}\n {...baseButtonProps}\n {...accessibilityProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseButton', className)}\n {...(shouldPassDisabled && { disabled })}\n >\n {props.loading ? (\n <>\n {/**\n * We need a wrapper to set `visibility: hidden` to hide the button content whilst we show the `Spinner`.\n * The button is a flex container with a `gap`, so we use `display: contents` to ensure the correct flex layout.\n *\n * However, `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden` and re-add it in the tree with `VisuallyHidden`\n */}\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n\n {/* Enhanced accessibility for loading state */}\n <VisuallyHidden>\n <span id={describedById}>Loading, please wait...</span>\n {children}\n </VisuallyHidden>\n\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>\n <Spinner\n size={mapResponsiveProp(size, mapButtonSizeToSpinnerSize)}\n aria-hidden=\"true\"\n />\n </span>\n </Flex>\n </>\n ) : (\n children\n )}\n </Comp>\n );\n});\nBaseButton.displayName = 'BaseButton';\n\nexport { BaseButton };\nexport type { BaseButtonProps };\n"],
5
- "mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,WAErB,OAAS,sBAAAC,MAA0B,yBACnC,OAAS,QAAAC,MAAY,aACrB,OAAS,WAAAC,MAAe,gBACxB,OAAS,kBAAAC,MAAsB,wBAC/B,OAAS,gBAAAC,MAAoB,iCAC7B,OAAS,qBAAAC,EAAmB,8BAAAC,MAAkC,mCAC9D,OAAS,kBAAAC,MAAsB,8BAkB/B,MAAMC,EAAaX,EAAM,WAA+C,CAACY,EAAOC,IAAiB,CAC/F,KAAM,CAAE,KAAAC,EAAOX,EAAmB,KAAK,OAAQ,EAAIS,EAC7C,CACJ,UAAAG,EACA,SAAAC,EACA,QAAAC,EACA,GAAAC,EACA,MAAAC,EACA,OAAAC,EACA,SAAAC,EAAWT,EAAM,QACjB,GAAGU,CACL,EAAIf,EAAaK,EAAOT,EAAoBO,CAAc,EAGpDa,EAAON,EAAUf,EAAK,KAAOgB,GAAM,SAGnCM,EACJP,GAAW,CAACC,GAAM,CAAC,SAAU,QAAS,WAAY,QAAQ,EAAE,SAASA,CAAE,EAGnEO,EAAYzB,EAAM,MAAM,EACxB0B,EAAgBd,EAAM,QAAU,GAAGa,CAAS,WAAa,OAGzDE,EAAqBf,EAAM,QAC7B,CACE,YAAa,GACb,gBAAiB,GACjB,mBAAoBc,CACtB,EACA,CAAC,EAEL,OACE1B,EAAA,cAACuB,EAAA,CAEC,gBAAeF,GAAY,OAC3B,oBAAmBF,EACnB,cAAaC,EACZ,GAAGE,EACH,GAAGK,EACJ,IAAKd,EACL,UAAWZ,EAAW,WAAY,gBAAiBc,CAAS,EAC3D,GAAIS,GAAsB,CAAE,SAAAH,CAAS,GAErCT,EAAM,QACLZ,EAAA,cAAAA,EAAA,cAQEA,EAAA,cAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,IACpEgB,CACH,EAGAhB,EAAA,cAACM,EAAA,KACCN,EAAA,cAAC,QAAK,GAAI0B,GAAe,yBAAuB,EAC/CV,CACH,EAEAhB,EAAA,cAACI,EAAA,CAAK,QAAO,GAAC,MAAM,SAAS,QAAQ,SAAS,SAAS,WAAW,MAAM,KACtEJ,EAAA,cAAC,YACCA,EAAA,cAACK,EAAA,CACC,KAAMG,EAAkBM,EAAML,CAA0B,EACxD,cAAY,OACd,CACF,CACF,CACF,EAEAO,CAEJ,CAEJ,CAAC,EACDL,EAAW,YAAc",
6
- "names": ["React", "classNames", "Slot", "baseButtonPropDefs", "Flex", "Spinner", "VisuallyHidden", "extractProps", "mapResponsiveProp", "mapButtonSizeToSpinnerSize", "marginPropDefs", "BaseButton", "props", "forwardedRef", "size", "className", "children", "asChild", "as", "color", "radius", "disabled", "baseButtonProps", "Comp", "shouldPassDisabled", "loadingId", "describedById", "accessibilityProps"]
4
+ "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { mapResponsiveProp, mapButtonSizeToSpinnerSize } from '../../helpers/map-prop-values.js';\nimport { marginPropDefs } from '../../props/margin.props.js';\n\nimport type { MarginProps } from '../../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../../props/prop-def.js';\n\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\n\n// Polymorphic types using the proper ComponentPropsWithout pattern\ntype PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {\n as?: C;\n} & BaseButtonOwnProps &\n MarginProps &\n ComponentPropsWithout<C, RemovedProps | keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;\n\ninterface BaseButtonProps extends PolymorphicBaseButtonProps {}\n\nconst BaseButton = React.forwardRef<BaseButtonElement, BaseButtonProps>((props, forwardedRef) => {\n const { size = baseButtonPropDefs.size.default } = props;\n const {\n className,\n children,\n asChild,\n as,\n color,\n radius,\n panelBackground,\n flush,\n disabled = props.loading,\n ...baseButtonProps\n } = extractProps(props, baseButtonPropDefs, marginPropDefs);\n\n // asChild takes precedence over as prop\n const Comp = asChild ? Slot.Root : as || 'button';\n\n // Only pass disabled for elements that support it\n const shouldPassDisabled =\n asChild || !as || ['button', 'input', 'textarea', 'select'].includes(as);\n\n // Generate unique ID for loading announcements\n const loadingId = React.useId();\n const describedById = props.loading ? `${loadingId}-loading` : undefined;\n\n // Enhanced accessibility props for loading state\n const accessibilityProps = props.loading\n ? {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'aria-describedby': describedById,\n }\n : {};\n\n return (\n <Comp\n // The `data-disabled` attribute enables correct styles when doing `<Button asChild disabled>`\n data-disabled={disabled || undefined}\n data-accent-color={color}\n data-radius={radius}\n data-panel-background={panelBackground}\n data-flush={flush ? 'true' : undefined}\n {...baseButtonProps}\n {...accessibilityProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseButton', className)}\n {...(shouldPassDisabled && { disabled })}\n >\n {props.loading ? (\n <>\n {/**\n * We need a wrapper to set `visibility: hidden` to hide the button content whilst we show the `Spinner`.\n * The button is a flex container with a `gap`, so we use `display: contents` to ensure the correct flex layout.\n *\n * However, `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden` and re-add it in the tree with `VisuallyHidden`\n */}\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n\n {/* Enhanced accessibility for loading state */}\n <VisuallyHidden>\n <span id={describedById}>Loading, please wait...</span>\n {children}\n </VisuallyHidden>\n\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>\n <Spinner\n size={mapResponsiveProp(size, mapButtonSizeToSpinnerSize)}\n aria-hidden=\"true\"\n />\n </span>\n </Flex>\n </>\n ) : (\n children\n )}\n </Comp>\n );\n});\nBaseButton.displayName = 'BaseButton';\n\nexport { BaseButton };\nexport type { BaseButtonProps };\n"],
5
+ "mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,WAErB,OAAS,sBAAAC,MAA0B,yBACnC,OAAS,QAAAC,MAAY,aACrB,OAAS,WAAAC,MAAe,gBACxB,OAAS,kBAAAC,MAAsB,wBAC/B,OAAS,gBAAAC,MAAoB,iCAC7B,OAAS,qBAAAC,EAAmB,8BAAAC,MAAkC,mCAC9D,OAAS,kBAAAC,MAAsB,8BAkB/B,MAAMC,EAAaX,EAAM,WAA+C,CAACY,EAAOC,IAAiB,CAC/F,KAAM,CAAE,KAAAC,EAAOX,EAAmB,KAAK,OAAQ,EAAIS,EAC7C,CACJ,UAAAG,EACA,SAAAC,EACA,QAAAC,EACA,GAAAC,EACA,MAAAC,EACA,OAAAC,EACA,gBAAAC,EACA,MAAAC,EACA,SAAAC,EAAWX,EAAM,QACjB,GAAGY,CACL,EAAIjB,EAAaK,EAAOT,EAAoBO,CAAc,EAGpDe,EAAOR,EAAUf,EAAK,KAAOgB,GAAM,SAGnCQ,EACJT,GAAW,CAACC,GAAM,CAAC,SAAU,QAAS,WAAY,QAAQ,EAAE,SAASA,CAAE,EAGnES,EAAY3B,EAAM,MAAM,EACxB4B,EAAgBhB,EAAM,QAAU,GAAGe,CAAS,WAAa,OAGzDE,EAAqBjB,EAAM,QAC7B,CACE,YAAa,GACb,gBAAiB,GACjB,mBAAoBgB,CACtB,EACA,CAAC,EAEL,OACE5B,EAAA,cAACyB,EAAA,CAEC,gBAAeF,GAAY,OAC3B,oBAAmBJ,EACnB,cAAaC,EACb,wBAAuBC,EACvB,aAAYC,EAAQ,OAAS,OAC5B,GAAGE,EACH,GAAGK,EACJ,IAAKhB,EACL,UAAWZ,EAAW,WAAY,gBAAiBc,CAAS,EAC3D,GAAIW,GAAsB,CAAE,SAAAH,CAAS,GAErCX,EAAM,QACLZ,EAAA,cAAAA,EAAA,cAQEA,EAAA,cAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,IACpEgB,CACH,EAGAhB,EAAA,cAACM,EAAA,KACCN,EAAA,cAAC,QAAK,GAAI4B,GAAe,yBAAuB,EAC/CZ,CACH,EAEAhB,EAAA,cAACI,EAAA,CAAK,QAAO,GAAC,MAAM,SAAS,QAAQ,SAAS,SAAS,WAAW,MAAM,KACtEJ,EAAA,cAAC,YACCA,EAAA,cAACK,EAAA,CACC,KAAMG,EAAkBM,EAAML,CAA0B,EACxD,cAAY,OACd,CACF,CACF,CACF,EAEAO,CAEJ,CAEJ,CAAC,EACDL,EAAW,YAAc",
6
+ "names": ["React", "classNames", "Slot", "baseButtonPropDefs", "Flex", "Spinner", "VisuallyHidden", "extractProps", "mapResponsiveProp", "mapButtonSizeToSpinnerSize", "marginPropDefs", "BaseButton", "props", "forwardedRef", "size", "className", "children", "asChild", "as", "color", "radius", "panelBackground", "flush", "disabled", "baseButtonProps", "Comp", "shouldPassDisabled", "loadingId", "describedById", "accessibilityProps"]
7
7
  }
@@ -9,6 +9,15 @@ declare const baseButtonPropDefs: {
9
9
  className: string;
10
10
  default: false;
11
11
  };
12
+ panelBackground: {
13
+ type: "enum";
14
+ values: readonly ["solid", "translucent"];
15
+ default: undefined;
16
+ };
17
+ flush: {
18
+ type: "boolean";
19
+ default: false;
20
+ };
12
21
  radius: {
13
22
  type: "enum";
14
23
  values: readonly ["none", "small", "medium", "large", "full"];
@@ -1 +1 @@
1
- {"version":3,"file":"base-button.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.props.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcvB,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"base-button.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.props.ts"],"names":[],"mappings":"AAWA,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBvB,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{asChildPropDef as e}from"../../props/as-child.prop.js";import{accentColorPropDef as o}from"../../props/color.prop.js";import{highContrastPropDef as s}from"../../props/high-contrast.prop.js";import{radiusPropDef as t}from"../../props/radius.prop.js";const a=["1","2","3","4"],r=["classic","solid","soft","surface","outline","ghost"],i={...e,size:{type:"enum",className:"rt-r-size",values:a,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:r,default:"solid"},...o,...s,...t,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1}};export{i as baseButtonPropDefs};
1
+ import{asChildPropDef as e}from"../../props/as-child.prop.js";import{accentColorPropDef as o}from"../../props/color.prop.js";import{highContrastPropDef as a}from"../../props/high-contrast.prop.js";import{radiusPropDef as s}from"../../props/radius.prop.js";const t=["1","2","3","4"],r=["classic","solid","soft","surface","outline","ghost"],n=["solid","translucent"],l={...e,size:{type:"enum",className:"rt-r-size",values:t,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:r,default:"solid"},...o,...a,...s,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1},panelBackground:{type:"enum",values:n,default:void 0},flush:{type:"boolean",default:!1}};export{l as baseButtonPropDefs};
2
2
  //# sourceMappingURL=base-button.props.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/base-button.props.ts"],
4
- "sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline', 'ghost'] as const;\n\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n"],
5
- "mappings": "AAAA,OAAS,kBAAAA,MAAsB,+BAC/B,OAAS,sBAAAC,MAA0B,4BACnC,OAAS,uBAAAC,MAA2B,oCACpC,OAAS,iBAAAC,MAAqB,6BAI9B,MAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,UAAW,QAAS,OAAQ,UAAW,UAAW,OAAO,EAErEC,EAAqB,CACzB,GAAGN,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQI,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,OAAQ,EACrF,GAAGJ,EACH,GAAGC,EACH,GAAGC,EACH,QAAS,CAAE,KAAM,UAAW,UAAW,aAAc,QAAS,EAAM,EACpE,UAAW,CAAE,KAAM,UAAW,UAAW,gBAAiB,QAAS,EAAM,CAC3E",
6
- "names": ["asChildPropDef", "accentColorPropDef", "highContrastPropDef", "radiusPropDef", "sizes", "variants", "baseButtonPropDefs"]
4
+ "sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline', 'ghost'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n flush: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n"],
5
+ "mappings": "AAAA,OAAS,kBAAAA,MAAsB,+BAC/B,OAAS,sBAAAC,MAA0B,4BACnC,OAAS,uBAAAC,MAA2B,oCACpC,OAAS,iBAAAC,MAAqB,6BAI9B,MAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,UAAW,QAAS,OAAQ,UAAW,UAAW,OAAO,EACrEC,EAAmB,CAAC,QAAS,aAAa,EAE1CC,EAAqB,CACzB,GAAGP,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQI,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,OAAQ,EACrF,GAAGJ,EACH,GAAGC,EACH,GAAGC,EACH,QAAS,CAAE,KAAM,UAAW,UAAW,aAAc,QAAS,EAAM,EACpE,UAAW,CAAE,KAAM,UAAW,UAAW,gBAAiB,QAAS,EAAM,EACzE,gBAAiB,CAAE,KAAM,OAAQ,OAAQG,EAAkB,QAAS,MAAU,EAC9E,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,CAC3C",
6
+ "names": ["asChildPropDef", "accentColorPropDef", "highContrastPropDef", "radiusPropDef", "sizes", "variants", "panelBackgrounds", "baseButtonPropDefs"]
7
7
  }
@@ -22,6 +22,11 @@ declare const baseMenuContentPropDefs: {
22
22
  values: readonly ["solid", "soft"];
23
23
  default: "solid";
24
24
  };
25
+ panelBackground: {
26
+ type: "enum";
27
+ values: readonly ["solid", "translucent"];
28
+ default: undefined;
29
+ };
25
30
  };
26
31
  declare const baseMenuItemPropDefs: {
27
32
  shortcut: {
@@ -1 +1 @@
1
- {"version":3,"file":"base-menu.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-menu.props.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;CAmB5B,CAAC;AAEF,QAAA,MAAM,oBAAoB;;;;;;;;;;;;CAMzB,CAAC;AAEF,QAAA,MAAM,4BAA4B;;;;;;;;;CAKjC,CAAC;AAEF,QAAA,MAAM,yBAAyB;;;;;;CAE9B,CAAC;AAEF,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,4BAA4B,EAC5B,yBAAyB,GAC1B,CAAC"}
1
+ {"version":3,"file":"base-menu.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-menu.props.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyB5B,CAAC;AAEF,QAAA,MAAM,oBAAoB;;;;;;;;;;;;CAMzB,CAAC;AAEF,QAAA,MAAM,4BAA4B;;;;;;;;;CAKjC,CAAC;AAEF,QAAA,MAAM,yBAAyB;;;;;;CAE9B,CAAC;AAEF,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,4BAA4B,EAC5B,yBAAyB,GAC1B,CAAC"}
@@ -1,2 +1,2 @@
1
- import{asChildPropDef as e}from"../../props/as-child.prop.js";import{colorPropDef as t}from"../../props/color.prop.js";import{highContrastPropDef as s}from"../../props/high-contrast.prop.js";const o=["1","2"],r=["solid","soft"],n={size:{type:"enum",className:"rt-r-size",values:o,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:r,default:"solid"},...t,...s},a={...e,...t,shortcut:{type:"string"}},i={...t,shortcut:{type:"string"}},p={...t};export{i as baseMenuCheckboxItemPropDefs,n as baseMenuContentPropDefs,a as baseMenuItemPropDefs,p as baseMenuRadioItemPropDefs};
1
+ import{asChildPropDef as t}from"../../props/as-child.prop.js";import{colorPropDef as e}from"../../props/color.prop.js";import{highContrastPropDef as s}from"../../props/high-contrast.prop.js";const o=["1","2"],n=["solid","soft"],r=["solid","translucent"],a={size:{type:"enum",className:"rt-r-size",values:o,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:n,default:"solid"},panelBackground:{type:"enum",values:r,default:void 0},...e,...s},p={...t,...e,shortcut:{type:"string"}},i={...e,shortcut:{type:"string"}},f={...e};export{i as baseMenuCheckboxItemPropDefs,a as baseMenuContentPropDefs,p as baseMenuItemPropDefs,f as baseMenuRadioItemPropDefs};
2
2
  //# sourceMappingURL=base-menu.props.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/base-menu.props.ts"],
4
- "sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { colorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst contentSizes = ['1', '2'] as const;\nconst contentVariants = ['solid', 'soft'] as const;\n\nconst baseMenuContentPropDefs = {\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: contentVariants,\n default: 'solid',\n },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n variant: PropDef<(typeof contentVariants)[number]>;\n};\n\nconst baseMenuItemPropDefs = {\n ...asChildPropDef,\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuCheckboxItemPropDefs = {\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuRadioItemPropDefs = {\n ...colorPropDef,\n};\n\nexport {\n baseMenuContentPropDefs,\n baseMenuItemPropDefs,\n baseMenuCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs,\n};\n"],
5
- "mappings": "AAAA,OAAS,kBAAAA,MAAsB,+BAC/B,OAAS,gBAAAC,MAAoB,4BAC7B,OAAS,uBAAAC,MAA2B,oCAIpC,MAAMC,EAAe,CAAC,IAAK,GAAG,EACxBC,EAAkB,CAAC,QAAS,MAAM,EAElCC,EAA0B,CAC9B,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQF,EACR,QAAS,IACT,WAAY,EACd,EACA,QAAS,CACP,KAAM,OACN,UAAW,aACX,OAAQC,EACR,QAAS,OACX,EACA,GAAGH,EACH,GAAGC,CACL,EAKMI,EAAuB,CAC3B,GAAGN,EACH,GAAGC,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMM,EAA+B,CACnC,GAAGN,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMO,EAA4B,CAChC,GAAGP,CACL",
6
- "names": ["asChildPropDef", "colorPropDef", "highContrastPropDef", "contentSizes", "contentVariants", "baseMenuContentPropDefs", "baseMenuItemPropDefs", "baseMenuCheckboxItemPropDefs", "baseMenuRadioItemPropDefs"]
4
+ "sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { colorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst contentSizes = ['1', '2'] as const;\nconst contentVariants = ['solid', 'soft'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst baseMenuContentPropDefs = {\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: contentVariants,\n default: 'solid',\n },\n panelBackground: {\n type: 'enum',\n values: panelBackgrounds,\n default: undefined,\n },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n variant: PropDef<(typeof contentVariants)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\nconst baseMenuItemPropDefs = {\n ...asChildPropDef,\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuCheckboxItemPropDefs = {\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuRadioItemPropDefs = {\n ...colorPropDef,\n};\n\nexport {\n baseMenuContentPropDefs,\n baseMenuItemPropDefs,\n baseMenuCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs,\n};\n"],
5
+ "mappings": "AAAA,OAAS,kBAAAA,MAAsB,+BAC/B,OAAS,gBAAAC,MAAoB,4BAC7B,OAAS,uBAAAC,MAA2B,oCAIpC,MAAMC,EAAe,CAAC,IAAK,GAAG,EACxBC,EAAkB,CAAC,QAAS,MAAM,EAClCC,EAAmB,CAAC,QAAS,aAAa,EAE1CC,EAA0B,CAC9B,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQH,EACR,QAAS,IACT,WAAY,EACd,EACA,QAAS,CACP,KAAM,OACN,UAAW,aACX,OAAQC,EACR,QAAS,OACX,EACA,gBAAiB,CACf,KAAM,OACN,OAAQC,EACR,QAAS,MACX,EACA,GAAGJ,EACH,GAAGC,CACL,EAMMK,EAAuB,CAC3B,GAAGP,EACH,GAAGC,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMO,EAA+B,CACnC,GAAGP,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMQ,EAA4B,CAChC,GAAGR,CACL",
6
+ "names": ["asChildPropDef", "colorPropDef", "highContrastPropDef", "contentSizes", "contentVariants", "panelBackgrounds", "baseMenuContentPropDefs", "baseMenuItemPropDefs", "baseMenuCheckboxItemPropDefs", "baseMenuRadioItemPropDefs"]
7
7
  }
@@ -1,4 +1,9 @@
1
1
  declare const baseTabListPropDefs: {
2
+ panelBackground: {
3
+ type: "enum";
4
+ values: readonly ["solid", "translucent"];
5
+ default: undefined;
6
+ };
2
7
  highContrast: {
3
8
  type: "boolean";
4
9
  className: string;
@@ -1 +1 @@
1
- {"version":3,"file":"base-tab-list.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-tab-list.props.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBxB,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"base-tab-list.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-tab-list.props.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBxB,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{colorPropDef as e}from"../../props/color.prop.js";import{highContrastPropDef as s}from"../../props/high-contrast.prop.js";const r=["1","2"],t=["nowrap","wrap","wrap-reverse"],o=["start","center","end"],p={size:{type:"enum",className:"rt-r-size",values:r,default:"2",responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:t,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:o,responsive:!0},...e,...s};export{p as baseTabListPropDefs};
1
+ import{colorPropDef as e}from"../../props/color.prop.js";import{highContrastPropDef as s}from"../../props/high-contrast.prop.js";const r=["1","2"],t=["nowrap","wrap","wrap-reverse"],o=["start","center","end"],a=["solid","translucent"],p={size:{type:"enum",className:"rt-r-size",values:r,default:"2",responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:t,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:o,responsive:!0},...e,...s,panelBackground:{type:"enum",values:a,default:void 0}};export{p as baseTabListPropDefs};
2
2
  //# sourceMappingURL=base-tab-list.props.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/base-tab-list.props.ts"],
4
- "sourcesContent": ["import { colorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2'] as const;\nconst wrapValues = ['nowrap', 'wrap', 'wrap-reverse'] as const;\nconst justifyValues = ['start', 'center', 'end'] as const;\n\nconst baseTabListPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n wrap: {\n type: 'enum',\n className: 'rt-r-fw',\n values: wrapValues,\n responsive: true,\n },\n justify: {\n type: 'enum',\n className: 'rt-r-jc',\n values: justifyValues,\n responsive: true,\n },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n wrap: PropDef<(typeof wrapValues)[number]>;\n justify: PropDef<(typeof justifyValues)[number]>;\n};\n\nexport { baseTabListPropDefs };\n"],
5
- "mappings": "AAAA,OAAS,gBAAAA,MAAoB,4BAC7B,OAAS,uBAAAC,MAA2B,oCAIpC,MAAMC,EAAQ,CAAC,IAAK,GAAG,EACjBC,EAAa,CAAC,SAAU,OAAQ,cAAc,EAC9CC,EAAgB,CAAC,QAAS,SAAU,KAAK,EAEzCC,EAAsB,CAC1B,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQH,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,KAAM,CACJ,KAAM,OACN,UAAW,UACX,OAAQC,EACR,WAAY,EACd,EACA,QAAS,CACP,KAAM,OACN,UAAW,UACX,OAAQC,EACR,WAAY,EACd,EACA,GAAGJ,EACH,GAAGC,CACL",
6
- "names": ["colorPropDef", "highContrastPropDef", "sizes", "wrapValues", "justifyValues", "baseTabListPropDefs"]
4
+ "sourcesContent": ["import { colorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2'] as const;\nconst wrapValues = ['nowrap', 'wrap', 'wrap-reverse'] as const;\nconst justifyValues = ['start', 'center', 'end'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst baseTabListPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n wrap: {\n type: 'enum',\n className: 'rt-r-fw',\n values: wrapValues,\n responsive: true,\n },\n justify: {\n type: 'enum',\n className: 'rt-r-jc',\n values: justifyValues,\n responsive: true,\n },\n ...colorPropDef,\n ...highContrastPropDef,\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n wrap: PropDef<(typeof wrapValues)[number]>;\n justify: PropDef<(typeof justifyValues)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\nexport { baseTabListPropDefs };\n"],
5
+ "mappings": "AAAA,OAAS,gBAAAA,MAAoB,4BAC7B,OAAS,uBAAAC,MAA2B,oCAIpC,MAAMC,EAAQ,CAAC,IAAK,GAAG,EACjBC,EAAa,CAAC,SAAU,OAAQ,cAAc,EAC9CC,EAAgB,CAAC,QAAS,SAAU,KAAK,EACzCC,EAAmB,CAAC,QAAS,aAAa,EAE1CC,EAAsB,CAC1B,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQJ,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,KAAM,CACJ,KAAM,OACN,UAAW,UACX,OAAQC,EACR,WAAY,EACd,EACA,QAAS,CACP,KAAM,OACN,UAAW,UACX,OAAQC,EACR,WAAY,EACd,EACA,GAAGJ,EACH,GAAGC,EACH,gBAAiB,CAAE,KAAM,OAAQ,OAAQI,EAAkB,QAAS,MAAU,CAChF",
6
+ "names": ["colorPropDef", "highContrastPropDef", "sizes", "wrapValues", "justifyValues", "panelBackgrounds", "baseTabListPropDefs"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/alert-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAA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 @@
1
- import*as e from"react";import T from"classnames";import{AlertDialog as r}from"radix-ui";import{alertDialogContentPropDefs as R}from"./alert-dialog.props.js";import{Heading as h}from"./heading.js";import{Text as E}from"./text.js";import{Theme as N}from"./theme.js";import{extractProps as a}from"../helpers/extract-props.js";import{requireReactElement as l}from"../helpers/require-react-element.js";const n=t=>e.createElement(r.Root,{...t});n.displayName="AlertDialog.Root";const s=e.forwardRef(({children:t,...o},i)=>e.createElement(r.Trigger,{...o,ref:i,asChild:!0},l(t)));s.displayName="AlertDialog.Trigger";const p=e.forwardRef(({align:t,...o},i)=>{const{align:P,...c}=R,{className:f}=a({align:t},{align:P}),{className:C,forceMount:d,container:y,...v}=a(o,c);return e.createElement(r.Portal,{container:y,forceMount:d},e.createElement(N,{asChild:!0},e.createElement(r.Overlay,{className:"rt-BaseDialogOverlay rt-AlertDialogOverlay"},e.createElement("div",{className:"rt-BaseDialogScroll rt-AlertDialogScroll"},e.createElement("div",{className:`rt-BaseDialogScrollPadding rt-AlertDialogScrollPadding ${f}`},e.createElement(r.Content,{...v,ref:i,className:T("rt-BaseDialogContent","rt-AlertDialogContent",C)}))))))});p.displayName="AlertDialog.Content";const g=e.forwardRef((t,o)=>e.createElement(r.Title,{asChild:!0},e.createElement(h,{size:"5",mb:"3",trim:"start",...t,asChild:!1,ref:o})));g.displayName="AlertDialog.Title";const m=e.forwardRef((t,o)=>e.createElement(r.Description,{asChild:!0},e.createElement(E,{as:"p",size:"3",...t,asChild:!1,ref:o})));m.displayName="AlertDialog.Description";const D=e.forwardRef(({children:t,...o},i)=>e.createElement(r.Action,{...o,ref:i,asChild:!0},l(t)));D.displayName="AlertDialog.Action";const A=e.forwardRef(({children:t,...o},i)=>e.createElement(r.Cancel,{...o,ref:i,asChild:!0},l(t)));A.displayName="AlertDialog.Cancel";export{D as Action,A as Cancel,p as Content,m as Description,n as Root,g as Title,s as Trigger};
1
+ import*as e from"react";import h from"classnames";import{AlertDialog as r}from"radix-ui";import{alertDialogContentPropDefs as u}from"./alert-dialog.props.js";import{Heading as E}from"./heading.js";import{Text as N}from"./text.js";import{Theme as B}from"./theme.js";import{extractProps as l}from"../helpers/extract-props.js";import{requireReactElement as a}from"../helpers/require-react-element.js";const n=o=>e.createElement(r.Root,{...o});n.displayName="AlertDialog.Root";const s=e.forwardRef(({children:o,...t},i)=>e.createElement(r.Trigger,{...t,ref:i,asChild:!0},a(o)));s.displayName="AlertDialog.Trigger";const p=e.forwardRef(({align:o,...t},i)=>{const{align:c,panelBackground:P,...f}=u,{className:d}=l({align:o},{align:c}),{panelBackground:C}=l({panelBackground:t.panelBackground},{panelBackground:P}),{className:y,forceMount:v,container:T,panelBackground:x,...R}=l(t,f);return e.createElement(r.Portal,{container:T,forceMount:v},e.createElement(B,{asChild:!0},e.createElement(r.Overlay,{className:"rt-BaseDialogOverlay rt-AlertDialogOverlay"},e.createElement("div",{className:"rt-BaseDialogScroll rt-AlertDialogScroll"},e.createElement("div",{className:`rt-BaseDialogScrollPadding rt-AlertDialogScrollPadding ${d}`},e.createElement(r.Content,{...R,ref:i,className:h("rt-BaseDialogContent","rt-AlertDialogContent",y),"data-panel-background":C}))))))});p.displayName="AlertDialog.Content";const g=e.forwardRef((o,t)=>e.createElement(r.Title,{asChild:!0},e.createElement(E,{size:"5",mb:"3",trim:"start",...o,asChild:!1,ref:t})));g.displayName="AlertDialog.Title";const m=e.forwardRef((o,t)=>e.createElement(r.Description,{asChild:!0},e.createElement(N,{as:"p",size:"3",...o,asChild:!1,ref:t})));m.displayName="AlertDialog.Description";const D=e.forwardRef(({children:o,...t},i)=>e.createElement(r.Action,{...t,ref:i,asChild:!0},a(o)));D.displayName="AlertDialog.Action";const A=e.forwardRef(({children:o,...t},i)=>e.createElement(r.Cancel,{...t,ref:i,asChild:!0},a(o)));A.displayName="AlertDialog.Cancel";export{D as Action,A as Cancel,p as Content,m as Description,n as Root,g as Title,s as Trigger};
2
2
  //# sourceMappingURL=alert-dialog.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/alert-dialog.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { AlertDialog as AlertDialogPrimitive } from 'radix-ui';\n\nimport { alertDialogContentPropDefs } from './alert-dialog.props.js';\nimport { Heading } from './heading.js';\nimport { Text } from './text.js';\nimport { Theme } from './theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\n\nimport type { AlertDialogContentOwnProps } from './alert-dialog.props.js';\nimport type {\n ComponentPropsWithout,\n RemovedProps,\n ComponentPropsAs,\n} from '../helpers/component-props.js';\n\ninterface AlertDialogRootProps\n extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Root> {}\nconst AlertDialogRoot: React.FC<AlertDialogRootProps> = (props) => (\n <AlertDialogPrimitive.Root {...props} />\n);\nAlertDialogRoot.displayName = 'AlertDialog.Root';\n\ntype AlertDialogTriggerElement = React.ElementRef<typeof AlertDialogPrimitive.Trigger>;\ninterface AlertDialogTriggerProps\n extends ComponentPropsWithout<typeof AlertDialogPrimitive.Trigger, RemovedProps> {}\nconst AlertDialogTrigger = React.forwardRef<AlertDialogTriggerElement, AlertDialogTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </AlertDialogPrimitive.Trigger>\n )\n);\nAlertDialogTrigger.displayName = 'AlertDialog.Trigger';\n\ntype AlertDialogContentElement = React.ElementRef<typeof AlertDialogPrimitive.Content>;\ninterface AlertDialogContentProps\n extends ComponentPropsWithout<typeof AlertDialogPrimitive.Content, RemovedProps>,\n AlertDialogContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Portal>['container'];\n}\nconst AlertDialogContent = React.forwardRef<AlertDialogContentElement, AlertDialogContentProps>(\n ({ align, ...props }, forwardedRef) => {\n const { align: alignPropDef, ...propDefs } = alertDialogContentPropDefs;\n const { className: alignClassName } = extractProps({ align }, { align: alignPropDef });\n const { className, forceMount, container, ...contentProps } = extractProps(props, propDefs);\n return (\n <AlertDialogPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <AlertDialogPrimitive.Overlay className=\"rt-BaseDialogOverlay rt-AlertDialogOverlay\">\n <div className=\"rt-BaseDialogScroll rt-AlertDialogScroll\">\n <div\n className={`rt-BaseDialogScrollPadding rt-AlertDialogScrollPadding ${alignClassName}`}\n >\n <AlertDialogPrimitive.Content\n {...contentProps}\n ref={forwardedRef}\n className={classNames('rt-BaseDialogContent', 'rt-AlertDialogContent', className)}\n />\n </div>\n </div>\n </AlertDialogPrimitive.Overlay>\n </Theme>\n </AlertDialogPrimitive.Portal>\n );\n }\n);\nAlertDialogContent.displayName = 'AlertDialog.Content';\n\ntype AlertDialogTitleElement = React.ElementRef<typeof Heading>;\ntype AlertDialogTitleProps = ComponentPropsWithout<typeof Heading, 'asChild'>;\nconst AlertDialogTitle = React.forwardRef<AlertDialogTitleElement, AlertDialogTitleProps>(\n (props, forwardedRef) => (\n <AlertDialogPrimitive.Title asChild>\n <Heading size=\"5\" mb=\"3\" trim=\"start\" {...props} asChild={false} ref={forwardedRef} />\n </AlertDialogPrimitive.Title>\n )\n);\nAlertDialogTitle.displayName = 'AlertDialog.Title';\n\ntype AlertDialogDescriptionElement = HTMLParagraphElement;\ntype AlertDialogDescriptionProps = ComponentPropsAs<typeof Text, 'p'>;\nconst AlertDialogDescription = React.forwardRef<\n AlertDialogDescriptionElement,\n AlertDialogDescriptionProps\n>((props, forwardedRef) => (\n <AlertDialogPrimitive.Description asChild>\n <Text as=\"p\" size=\"3\" {...props} asChild={false} ref={forwardedRef} />\n </AlertDialogPrimitive.Description>\n));\nAlertDialogDescription.displayName = 'AlertDialog.Description';\n\ntype AlertDialogActionElement = React.ElementRef<typeof AlertDialogPrimitive.Action>;\ninterface AlertDialogActionProps\n extends ComponentPropsWithout<typeof AlertDialogPrimitive.Action, RemovedProps> {}\nconst AlertDialogAction = React.forwardRef<AlertDialogActionElement, AlertDialogActionProps>(\n ({ children, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Action {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </AlertDialogPrimitive.Action>\n )\n);\nAlertDialogAction.displayName = 'AlertDialog.Action';\n\ntype AlertDialogCancelElement = React.ElementRef<typeof AlertDialogPrimitive.Cancel>;\ninterface AlertDialogCancelProps\n extends ComponentPropsWithout<typeof AlertDialogPrimitive.Cancel, RemovedProps> {}\nconst AlertDialogCancel = React.forwardRef<AlertDialogCancelElement, AlertDialogCancelProps>(\n ({ children, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Cancel {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </AlertDialogPrimitive.Cancel>\n )\n);\nAlertDialogCancel.displayName = 'AlertDialog.Cancel';\n\nexport {\n AlertDialogRoot as Root,\n AlertDialogTrigger as Trigger,\n AlertDialogContent as Content,\n AlertDialogTitle as Title,\n AlertDialogDescription as Description,\n AlertDialogAction as Action,\n AlertDialogCancel as Cancel,\n};\n\nexport type {\n AlertDialogRootProps as RootProps,\n AlertDialogTriggerProps as TriggerProps,\n AlertDialogContentProps as ContentProps,\n AlertDialogTitleProps as TitleProps,\n AlertDialogDescriptionProps as DescriptionProps,\n AlertDialogActionProps as ActionProps,\n AlertDialogCancelProps as CancelProps,\n};\n"],
5
- "mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,eAAeC,MAA4B,WAEpD,OAAS,8BAAAC,MAAkC,0BAC3C,OAAS,WAAAC,MAAe,eACxB,OAAS,QAAAC,MAAY,YACrB,OAAS,SAAAC,MAAa,aACtB,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,uBAAAC,MAA2B,sCAWpC,MAAMC,EAAmDC,GACvDV,EAAA,cAACE,EAAqB,KAArB,CAA2B,GAAGQ,EAAO,EAExCD,EAAgB,YAAc,mBAK9B,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E,EAAqB,YAArB,CAAiC,QAAO,IACvCF,EAAA,cAACK,EAAA,CAAK,GAAG,IAAI,KAAK,IAAK,GAAGK,EAAO,QAAS,GAAO,IAAKG,EAAc,CACtE,CACD,EACDW,EAAuB,YAAc,0BAKrC,MAAMC,EAAoBzB,EAAM,WAC9B,CAAC,CAAE,SAAAY,EAAU,GAAGF,CAAM,EAAGG,IACvBb,EAAA,cAACE,EAAqB,OAArB,CAA6B,GAAGQ,EAAO,IAAKG,EAAc,QAAO,IAC/DL,EAAoBI,CAAQ,CAC/B,CAEJ,EACAa,EAAkB,YAAc,qBAKhC,MAAMC,EAAoB1B,EAAM,WAC9B,CAAC,CAAE,SAAAY,EAAU,GAAGF,CAAM,EAAGG,IACvBb,EAAA,cAACE,EAAqB,OAArB,CAA6B,GAAGQ,EAAO,IAAKG,EAAc,QAAO,IAC/DL,EAAoBI,CAAQ,CAC/B,CAEJ,EACAc,EAAkB,YAAc",
6
- "names": ["React", "classNames", "AlertDialogPrimitive", "alertDialogContentPropDefs", "Heading", "Text", "Theme", "extractProps", "requireReactElement", "AlertDialogRoot", "props", "AlertDialogTrigger", "children", "forwardedRef", "AlertDialogContent", "align", "alignPropDef", "propDefs", "alignClassName", "className", "forceMount", "container", "contentProps", "AlertDialogTitle", "AlertDialogDescription", "AlertDialogAction", "AlertDialogCancel"]
4
+ "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { AlertDialog as AlertDialogPrimitive } from 'radix-ui';\n\nimport { alertDialogContentPropDefs } from './alert-dialog.props.js';\nimport { Heading } from './heading.js';\nimport { Text } from './text.js';\nimport { Theme } from './theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\n\nimport type { AlertDialogContentOwnProps } from './alert-dialog.props.js';\nimport type {\n ComponentPropsWithout,\n RemovedProps,\n ComponentPropsAs,\n} from '../helpers/component-props.js';\n\ninterface AlertDialogRootProps\n extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Root> {}\nconst AlertDialogRoot: React.FC<AlertDialogRootProps> = (props) => (\n <AlertDialogPrimitive.Root {...props} />\n);\nAlertDialogRoot.displayName = 'AlertDialog.Root';\n\ntype AlertDialogTriggerElement = React.ElementRef<typeof AlertDialogPrimitive.Trigger>;\ninterface AlertDialogTriggerProps\n extends ComponentPropsWithout<typeof AlertDialogPrimitive.Trigger, RemovedProps> {}\nconst AlertDialogTrigger = React.forwardRef<AlertDialogTriggerElement, AlertDialogTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </AlertDialogPrimitive.Trigger>\n ),\n);\nAlertDialogTrigger.displayName = 'AlertDialog.Trigger';\n\ntype AlertDialogContentElement = React.ElementRef<typeof AlertDialogPrimitive.Content>;\ninterface AlertDialogContentProps\n extends ComponentPropsWithout<typeof AlertDialogPrimitive.Content, RemovedProps>,\n AlertDialogContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Portal>['container'];\n}\nconst AlertDialogContent = React.forwardRef<AlertDialogContentElement, AlertDialogContentProps>(\n ({ align, ...props }, forwardedRef) => {\n const {\n align: alignPropDef,\n panelBackground: panelBackgroundPropDef,\n ...propDefs\n } = alertDialogContentPropDefs;\n const { className: alignClassName } = extractProps({ align }, { align: alignPropDef });\n const { panelBackground } = extractProps(\n { panelBackground: props.panelBackground },\n { panelBackground: panelBackgroundPropDef },\n );\n const {\n className,\n forceMount,\n container,\n panelBackground: _,\n ...contentProps\n } = extractProps(props, propDefs);\n return (\n <AlertDialogPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <AlertDialogPrimitive.Overlay className=\"rt-BaseDialogOverlay rt-AlertDialogOverlay\">\n <div className=\"rt-BaseDialogScroll rt-AlertDialogScroll\">\n <div\n className={`rt-BaseDialogScrollPadding rt-AlertDialogScrollPadding ${alignClassName}`}\n >\n <AlertDialogPrimitive.Content\n {...contentProps}\n ref={forwardedRef}\n className={classNames('rt-BaseDialogContent', 'rt-AlertDialogContent', className)}\n data-panel-background={panelBackground}\n />\n </div>\n </div>\n </AlertDialogPrimitive.Overlay>\n </Theme>\n </AlertDialogPrimitive.Portal>\n );\n },\n);\nAlertDialogContent.displayName = 'AlertDialog.Content';\n\ntype AlertDialogTitleElement = React.ElementRef<typeof Heading>;\ntype AlertDialogTitleProps = ComponentPropsWithout<typeof Heading, 'asChild'>;\nconst AlertDialogTitle = React.forwardRef<AlertDialogTitleElement, AlertDialogTitleProps>(\n (props, forwardedRef) => (\n <AlertDialogPrimitive.Title asChild>\n <Heading size=\"5\" mb=\"3\" trim=\"start\" {...props} asChild={false} ref={forwardedRef} />\n </AlertDialogPrimitive.Title>\n ),\n);\nAlertDialogTitle.displayName = 'AlertDialog.Title';\n\ntype AlertDialogDescriptionElement = HTMLParagraphElement;\ntype AlertDialogDescriptionProps = ComponentPropsAs<typeof Text, 'p'>;\nconst AlertDialogDescription = React.forwardRef<\n AlertDialogDescriptionElement,\n AlertDialogDescriptionProps\n>((props, forwardedRef) => (\n <AlertDialogPrimitive.Description asChild>\n <Text as=\"p\" size=\"3\" {...props} asChild={false} ref={forwardedRef} />\n </AlertDialogPrimitive.Description>\n));\nAlertDialogDescription.displayName = 'AlertDialog.Description';\n\ntype AlertDialogActionElement = React.ElementRef<typeof AlertDialogPrimitive.Action>;\ninterface AlertDialogActionProps\n extends ComponentPropsWithout<typeof AlertDialogPrimitive.Action, RemovedProps> {}\nconst AlertDialogAction = React.forwardRef<AlertDialogActionElement, AlertDialogActionProps>(\n ({ children, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Action {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </AlertDialogPrimitive.Action>\n ),\n);\nAlertDialogAction.displayName = 'AlertDialog.Action';\n\ntype AlertDialogCancelElement = React.ElementRef<typeof AlertDialogPrimitive.Cancel>;\ninterface AlertDialogCancelProps\n extends ComponentPropsWithout<typeof AlertDialogPrimitive.Cancel, RemovedProps> {}\nconst AlertDialogCancel = React.forwardRef<AlertDialogCancelElement, AlertDialogCancelProps>(\n ({ children, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Cancel {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </AlertDialogPrimitive.Cancel>\n ),\n);\nAlertDialogCancel.displayName = 'AlertDialog.Cancel';\n\nexport {\n AlertDialogRoot as Root,\n AlertDialogTrigger as Trigger,\n AlertDialogContent as Content,\n AlertDialogTitle as Title,\n AlertDialogDescription as Description,\n AlertDialogAction as Action,\n AlertDialogCancel as Cancel,\n};\n\nexport type {\n AlertDialogRootProps as RootProps,\n AlertDialogTriggerProps as TriggerProps,\n AlertDialogContentProps as ContentProps,\n AlertDialogTitleProps as TitleProps,\n AlertDialogDescriptionProps as DescriptionProps,\n AlertDialogActionProps as ActionProps,\n AlertDialogCancelProps as CancelProps,\n};\n"],
5
+ "mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,eAAeC,MAA4B,WAEpD,OAAS,8BAAAC,MAAkC,0BAC3C,OAAS,WAAAC,MAAe,eACxB,OAAS,QAAAC,MAAY,YACrB,OAAS,SAAAC,MAAa,aACtB,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,uBAAAC,MAA2B,sCAWpC,MAAMC,EAAmDC,GACvDV,EAAA,cAACE,EAAqB,KAArB,CAA2B,GAAGQ,EAAO,EAExCD,EAAgB,YAAc,mBAK9B,MAAME,EAAqBX,EAAM,WAC/B,CAAC,CAAE,SAAAY,EAAU,GAAGF,CAAM,EAAGG,IACvBb,EAAA,cAACE,EAAqB,QAArB,CAA8B,GAAGQ,EAAO,IAAKG,EAAc,QAAO,IAChEL,EAAoBI,CAAQ,CAC/B,CAEJ,EACAD,EAAmB,YAAc,sBAQjC,MAAMG,EAAqBd,EAAM,WAC/B,CAAC,CAAE,MAAAe,EAAO,GAAGL,CAAM,EAAGG,IAAiB,CACrC,KAAM,CACJ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,MAAMC,EAAoB5B,EAAM,WAC9B,CAAC,CAAE,SAAAY,EAAU,GAAGF,CAAM,EAAGG,IACvBb,EAAA,cAACE,EAAqB,OAArB,CAA6B,GAAGQ,EAAO,IAAKG,EAAc,QAAO,IAC/DL,EAAoBI,CAAQ,CAC/B,CAEJ,EACAgB,EAAkB,YAAc,qBAKhC,MAAMC,EAAoB7B,EAAM,WAC9B,CAAC,CAAE,SAAAY,EAAU,GAAGF,CAAM,EAAGG,IACvBb,EAAA,cAACE,EAAqB,OAArB,CAA6B,GAAGQ,EAAO,IAAKG,EAAc,QAAO,IAC/DL,EAAoBI,CAAQ,CAC/B,CAEJ,EACAiB,EAAkB,YAAc",
6
+ "names": ["React", "classNames", "AlertDialogPrimitive", "alertDialogContentPropDefs", "Heading", "Text", "Theme", "extractProps", "requireReactElement", "AlertDialogRoot", "props", "AlertDialogTrigger", "children", "forwardedRef", "AlertDialogContent", "align", "alignPropDef", "panelBackgroundPropDef", "propDefs", "alignClassName", "panelBackground", "className", "forceMount", "container", "_", "contentProps", "AlertDialogTitle", "AlertDialogDescription", "AlertDialogAction", "AlertDialogCancel"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,UAAU,WAAY,SAAQ,WAAW,EAAE,eAAe;CAAG;AAC7D,QAAA,MAAM,MAAM,sFAmBV,CAAC;AAIH,KAAK,cAAc,GAAG,eAAe,CAAC,OAAO,cAAc,CAAC,CAAC;AAE7D,UAAU,eACR,SAAQ,qBAAqB,CAAC,OAAO,eAAe,CAAC,KAAK,EAAE,YAAY,CAAC,EACvE,cAAc;IAEhB,QAAQ,EAAE,WAAW,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC;CACnD;AAqCD,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,UAAU,WAAY,SAAQ,WAAW,EAAE,eAAe;CAAG;AAC7D,QAAA,MAAM,MAAM,sFA+BV,CAAC;AAIH,KAAK,cAAc,GAAG,eAAe,CAAC,OAAO,cAAc,CAAC,CAAC;AAE7D,UAAU,eACR,SAAQ,qBAAqB,CAAC,OAAO,eAAe,CAAC,KAAK,EAAE,YAAY,CAAC,EACvE,cAAc;IAEhB,QAAQ,EAAE,WAAW,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC;CACnD;AAsCD,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- "use client";import*as r from"react";import l from"classnames";import{Avatar as m}from"radix-ui";import{avatarPropDefs as A}from"./avatar.props.js";import{extractProps as P}from"../helpers/extract-props.js";import{getSubtree as g}from"../helpers/get-subtree.js";import{marginPropDefs as y}from"../props/margin.props.js";const i=r.forwardRef((t,e)=>{const{asChild:o,children:a,className:s,style:p,color:v,radius:f,...d}=P(t,A,y);return r.createElement(m.Root,{"data-accent-color":v,"data-radius":f,className:l("rt-reset","rt-AvatarRoot",s),style:p,asChild:o},g({asChild:o,children:a},r.createElement(n,{ref:e,...d})))});i.displayName="Avatar";const n=r.forwardRef(({fallback:t,...e},o)=>{const[a,s]=r.useState("idle");return r.createElement(r.Fragment,null,a==="idle"||a==="loading"?r.createElement("span",{className:"rt-AvatarFallback"}):null,a==="error"?r.createElement(m.Fallback,{className:l("rt-AvatarFallback",{"rt-one-letter":typeof t=="string"&&t.length===1,"rt-two-letters":typeof t=="string"&&t.length===2}),delayMs:0},t):null,r.createElement(m.Image,{ref:o,className:"rt-AvatarImage",...e,onLoadingStatusChange:p=>{e.onLoadingStatusChange?.(p),s(p)}}))});n.displayName="AvatarImpl";export{i as Avatar};
1
+ "use client";import*as r from"react";import n from"classnames";import{Avatar as l}from"radix-ui";import{avatarPropDefs as c}from"./avatar.props.js";import{extractProps as g}from"../helpers/extract-props.js";import{getSubtree as y}from"../helpers/get-subtree.js";import{marginPropDefs as I}from"../props/margin.props.js";const m=r.forwardRef((t,o)=>{const{asChild:e,children:a,className:p,style:s,color:v,radius:f,panelBackground:P,...A}=g(t,c,I),u=r.useMemo(()=>{if(!e||!a)return!1;if(r.isValidElement(a)){const i=a.props;return i.disabled===!0||i["data-disabled"]===!0}return!1},[e,a]);return r.createElement(l.Root,{"data-accent-color":v,"data-radius":f,"data-panel-background":P,"data-disabled":u||void 0,className:n("rt-reset","rt-AvatarRoot",p),style:s,asChild:e},y({asChild:e,children:a},r.createElement(d,{ref:o,...A})))});m.displayName="Avatar";const d=r.forwardRef(({fallback:t,...o},e)=>{const[a,p]=r.useState("idle");return r.createElement(r.Fragment,null,a==="idle"||a==="loading"?r.createElement("span",{className:"rt-AvatarFallback"}):null,a==="error"?r.createElement(l.Fallback,{className:n("rt-AvatarFallback",{"rt-one-letter":typeof t=="string"&&t.length===1,"rt-two-letters":typeof t=="string"&&t.length===2}),delayMs:0},t):null,r.createElement(l.Image,{ref:e,className:"rt-AvatarImage",...o,onLoadingStatusChange:s=>{o.onLoadingStatusChange?.(s),p(s)}}))});d.displayName="AvatarImpl";export{m as Avatar};
2
2
  //# sourceMappingURL=avatar.js.map