@yamada-ui/react 2.2.0-next-20260407101455 → 2.2.0-next-20260408064030

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 (284) hide show
  1. package/dist/cjs/components/input/input.style.cjs +4 -4
  2. package/dist/cjs/components/input/input.style.cjs.map +1 -1
  3. package/dist/cjs/components/motion/transition.cjs +2 -2
  4. package/dist/cjs/components/motion/transition.cjs.map +1 -1
  5. package/dist/cjs/core/components/create-component.cjs.map +1 -1
  6. package/dist/cjs/core/components/props.cjs +1 -0
  7. package/dist/cjs/core/components/props.cjs.map +1 -1
  8. package/dist/cjs/core/css/conditions.cjs +2 -0
  9. package/dist/cjs/core/css/conditions.cjs.map +1 -1
  10. package/dist/cjs/core/css/styles.cjs.map +1 -1
  11. package/dist/esm/components/input/input.style.js +4 -4
  12. package/dist/esm/components/input/input.style.js.map +1 -1
  13. package/dist/esm/components/motion/transition.js +2 -2
  14. package/dist/esm/components/motion/transition.js.map +1 -1
  15. package/dist/esm/core/components/create-component.js.map +1 -1
  16. package/dist/esm/core/components/props.js +1 -0
  17. package/dist/esm/core/components/props.js.map +1 -1
  18. package/dist/esm/core/css/conditions.js +2 -0
  19. package/dist/esm/core/css/conditions.js.map +1 -1
  20. package/dist/esm/core/css/styles.js.map +1 -1
  21. package/dist/types/components/accordion/accordion.d.ts +2 -4
  22. package/dist/types/components/accordion/accordion.style.d.ts +1 -1
  23. package/dist/types/components/accordion/use-accordion.d.ts +11 -11
  24. package/dist/types/components/action-bar/action-bar.d.ts +2 -3
  25. package/dist/types/components/airy/airy.d.ts +2 -3
  26. package/dist/types/components/alert/alert.d.ts +2 -5
  27. package/dist/types/components/alert/alert.style.d.ts +1 -1
  28. package/dist/types/components/alpha-slider/alpha-slider.d.ts +2 -3
  29. package/dist/types/components/aspect-ratio/aspect-ratio.d.ts +2 -2
  30. package/dist/types/components/autocomplete/autocomplete.d.ts +2 -4
  31. package/dist/types/components/autocomplete/autocomplete.style.d.ts +52 -52
  32. package/dist/types/components/autocomplete/use-autocomplete.d.ts +5 -7
  33. package/dist/types/components/avatar/avatar.d.ts +5 -5
  34. package/dist/types/components/avatar/use-avatar-group.d.ts +2 -2
  35. package/dist/types/components/badge/badge.d.ts +2 -2
  36. package/dist/types/components/bleed/bleed.d.ts +2 -2
  37. package/dist/types/components/blockquote/blockquote.d.ts +2 -2
  38. package/dist/types/components/breadcrumb/breadcrumb.d.ts +2 -2
  39. package/dist/types/components/breadcrumb/breadcrumb.style.d.ts +1 -1
  40. package/dist/types/components/breadcrumb/use-breadcrumb.d.ts +2 -2
  41. package/dist/types/components/button/button-group.d.ts +0 -1
  42. package/dist/types/components/button/button.d.ts +2 -3
  43. package/dist/types/components/button/icon-button.d.ts +2 -2
  44. package/dist/types/components/calendar/calendar.d.ts +2 -3
  45. package/dist/types/components/calendar/calendar.style.d.ts +2 -2
  46. package/dist/types/components/calendar/use-calendar.d.ts +8 -9
  47. package/dist/types/components/card/card.d.ts +2 -2
  48. package/dist/types/components/carousel/carousel.d.ts +2 -3
  49. package/dist/types/components/carousel/carousel.style.d.ts +2 -2
  50. package/dist/types/components/carousel/use-carousel.d.ts +3 -3
  51. package/dist/types/components/center/center.d.ts +2 -2
  52. package/dist/types/components/chart/area-chart.d.ts +2 -2
  53. package/dist/types/components/chart/bar-chart.d.ts +2 -2
  54. package/dist/types/components/chart/chart.d.ts +5 -5
  55. package/dist/types/components/chart/composed-chart.d.ts +2 -2
  56. package/dist/types/components/chart/donut-chart.d.ts +2 -2
  57. package/dist/types/components/chart/line-chart.d.ts +2 -2
  58. package/dist/types/components/chart/radar-chart.d.ts +2 -2
  59. package/dist/types/components/chart/use-chart.d.ts +2 -2
  60. package/dist/types/components/checkbox/checkbox-group.d.ts +0 -2
  61. package/dist/types/components/checkbox/checkbox.d.ts +5 -6
  62. package/dist/types/components/checkbox/checkbox.style.d.ts +1 -1
  63. package/dist/types/components/checkbox/use-checkbox-group.d.ts +2 -3
  64. package/dist/types/components/checkbox/use-checkbox.d.ts +0 -1
  65. package/dist/types/components/checkbox-card/checkbox-card-group.d.ts +0 -3
  66. package/dist/types/components/checkbox-card/checkbox-card.d.ts +5 -7
  67. package/dist/types/components/checkbox-card/checkbox-card.style.d.ts +1 -1
  68. package/dist/types/components/circle-progress/circle-progress.d.ts +2 -3
  69. package/dist/types/components/close-button/close-button.d.ts +2 -3
  70. package/dist/types/components/code/code.d.ts +2 -2
  71. package/dist/types/components/collapse/collapse.d.ts +2 -3
  72. package/dist/types/components/color-picker/color-picker.d.ts +2 -6
  73. package/dist/types/components/color-picker/color-picker.style.d.ts +50 -50
  74. package/dist/types/components/color-picker/use-color-picker.d.ts +2 -5
  75. package/dist/types/components/color-selector/color-selector.d.ts +2 -6
  76. package/dist/types/components/color-selector/color-selector.style.d.ts +2 -2
  77. package/dist/types/components/color-selector/use-color-selector.d.ts +3 -5
  78. package/dist/types/components/color-swatch/color-swatch.d.ts +2 -2
  79. package/dist/types/components/container/container.d.ts +2 -2
  80. package/dist/types/components/data-list/data-list.d.ts +2 -2
  81. package/dist/types/components/data-list/data-list.style.d.ts +1 -1
  82. package/dist/types/components/date-picker/date-picker.d.ts +2 -5
  83. package/dist/types/components/date-picker/date-picker.style.d.ts +51 -51
  84. package/dist/types/components/date-picker/use-date-picker.d.ts +4 -7
  85. package/dist/types/components/drawer/drawer.d.ts +2 -5
  86. package/dist/types/components/drawer/use-drawer.d.ts +0 -2
  87. package/dist/types/components/dropzone/dropzone.d.ts +5 -8
  88. package/dist/types/components/dropzone/dropzone.style.d.ts +1 -1
  89. package/dist/types/components/dropzone/use-dropzone.d.ts +0 -1
  90. package/dist/types/components/editable/editable.d.ts +4 -5
  91. package/dist/types/components/editable/use-editable.d.ts +2 -3
  92. package/dist/types/components/em/em.d.ts +2 -2
  93. package/dist/types/components/empty-state/empty-state.d.ts +2 -2
  94. package/dist/types/components/empty-state/empty-state.style.d.ts +2 -2
  95. package/dist/types/components/fade/fade.d.ts +2 -3
  96. package/dist/types/components/fade-scale/fade-scale.d.ts +0 -1
  97. package/dist/types/components/field/field.d.ts +3 -3
  98. package/dist/types/components/field/use-field-props.d.ts +3 -3
  99. package/dist/types/components/fieldset/fieldset.d.ts +3 -4
  100. package/dist/types/components/file-button/file-button.d.ts +2 -4
  101. package/dist/types/components/file-button/use-file-button.d.ts +18 -20
  102. package/dist/types/components/file-input/file-input.d.ts +2 -4
  103. package/dist/types/components/file-input/file-input.style.d.ts +31 -31
  104. package/dist/types/components/file-input/use-file-input.d.ts +15 -16
  105. package/dist/types/components/flex/flex.d.ts +2 -2
  106. package/dist/types/components/flip/flip.d.ts +4 -5
  107. package/dist/types/components/flip/flip.style.d.ts +1 -1
  108. package/dist/types/components/float/float.d.ts +2 -2
  109. package/dist/types/components/form/form.d.ts +3 -4
  110. package/dist/types/components/form/form.style.d.ts +1 -1
  111. package/dist/types/components/format/format-byte.d.ts +4 -4
  112. package/dist/types/components/format/format-date-time.d.ts +4 -4
  113. package/dist/types/components/format/format-number.d.ts +2 -2
  114. package/dist/types/components/format/use-format-byte.d.ts +0 -1
  115. package/dist/types/components/format/use-format-date-time.d.ts +0 -1
  116. package/dist/types/components/format/use-format-number.d.ts +0 -1
  117. package/dist/types/components/grid/grid-item.d.ts +2 -2
  118. package/dist/types/components/grid/grid.d.ts +2 -2
  119. package/dist/types/components/group/group.d.ts +2 -3
  120. package/dist/types/components/group/use-group.d.ts +2 -2
  121. package/dist/types/components/heading/heading.d.ts +2 -2
  122. package/dist/types/components/highlight/highlight.d.ts +0 -2
  123. package/dist/types/components/hue-slider/hue-slider.d.ts +3 -4
  124. package/dist/types/components/icon/icon.d.ts +5 -5
  125. package/dist/types/components/image/image.d.ts +2 -2
  126. package/dist/types/components/indicator/indicator.d.ts +4 -5
  127. package/dist/types/components/infinite-scroll-area/infinite-scroll-area.d.ts +2 -2
  128. package/dist/types/components/input/input-addon.d.ts +2 -2
  129. package/dist/types/components/input/input-addon.style.d.ts +30 -30
  130. package/dist/types/components/input/input-element.d.ts +2 -2
  131. package/dist/types/components/input/input-group.d.ts +0 -2
  132. package/dist/types/components/input/input.d.ts +2 -3
  133. package/dist/types/components/input/input.style.d.ts +37 -37
  134. package/dist/types/components/kbd/kbd.d.ts +2 -2
  135. package/dist/types/components/link/link.d.ts +2 -2
  136. package/dist/types/components/link-box/link-box.d.ts +2 -2
  137. package/dist/types/components/list/list.d.ts +2 -2
  138. package/dist/types/components/list/list.style.d.ts +2 -2
  139. package/dist/types/components/loading/loading-provider.d.ts +2 -2
  140. package/dist/types/components/loading/loading.d.ts +3 -4
  141. package/dist/types/components/loading/use-loading-component.d.ts +0 -1
  142. package/dist/types/components/mark/mark.d.ts +2 -2
  143. package/dist/types/components/menu/menu.d.ts +2 -3
  144. package/dist/types/components/menu/menu.style.d.ts +2 -2
  145. package/dist/types/components/menu/use-menu.d.ts +11 -11
  146. package/dist/types/components/modal/modal.d.ts +2 -6
  147. package/dist/types/components/native-accordion/native-accordion.d.ts +2 -2
  148. package/dist/types/components/native-accordion/native-accordion.style.d.ts +2 -2
  149. package/dist/types/components/native-accordion/use-native-accordion.d.ts +2 -2
  150. package/dist/types/components/native-popover/native-popover.d.ts +2 -2
  151. package/dist/types/components/native-select/native-select.d.ts +2 -4
  152. package/dist/types/components/native-select/native-select.style.d.ts +51 -51
  153. package/dist/types/components/native-select/use-native-select.d.ts +0 -1
  154. package/dist/types/components/native-table/native-table.d.ts +4 -4
  155. package/dist/types/components/notice/notice.style.d.ts +1 -1
  156. package/dist/types/components/notice/use-notice.d.ts +0 -3
  157. package/dist/types/components/number-input/number-input.d.ts +2 -3
  158. package/dist/types/components/number-input/number-input.style.d.ts +61 -61
  159. package/dist/types/components/number-input/use-number-input.d.ts +0 -1
  160. package/dist/types/components/pagination/pagination.d.ts +2 -3
  161. package/dist/types/components/pagination/pagination.style.d.ts +1 -1
  162. package/dist/types/components/pagination/use-pagination.d.ts +2 -2
  163. package/dist/types/components/password-input/password-input.d.ts +2 -3
  164. package/dist/types/components/password-input/password-input.style.d.ts +61 -61
  165. package/dist/types/components/password-input/strength-meter.d.ts +2 -2
  166. package/dist/types/components/password-input/strength-meter.style.d.ts +1 -1
  167. package/dist/types/components/password-input/use-password-input.d.ts +2 -3
  168. package/dist/types/components/picture/picture.d.ts +0 -1
  169. package/dist/types/components/pin-input/pin-input.d.ts +2 -4
  170. package/dist/types/components/pin-input/use-pin-input.d.ts +7 -8
  171. package/dist/types/components/popover/popover.d.ts +2 -3
  172. package/dist/types/components/progress/progress.d.ts +4 -4
  173. package/dist/types/components/progress/use-progress.d.ts +706 -706
  174. package/dist/types/components/qr-code/qr-code.d.ts +2 -2
  175. package/dist/types/components/radio/radio-group.d.ts +0 -2
  176. package/dist/types/components/radio/radio.d.ts +5 -6
  177. package/dist/types/components/radio/radio.style.d.ts +1 -1
  178. package/dist/types/components/radio/use-radio-group.d.ts +2 -3
  179. package/dist/types/components/radio/use-radio.d.ts +0 -1
  180. package/dist/types/components/radio-card/radio-card-group.d.ts +0 -3
  181. package/dist/types/components/radio-card/radio-card.d.ts +5 -7
  182. package/dist/types/components/radio-card/radio-card.style.d.ts +1 -1
  183. package/dist/types/components/rating/rating.style.d.ts +2 -2
  184. package/dist/types/components/rating/use-rating.d.ts +7 -8
  185. package/dist/types/components/reorder/reorder.d.ts +2 -3
  186. package/dist/types/components/reorder/reorder.style.d.ts +1 -1
  187. package/dist/types/components/reorder/use-reorder.d.ts +3 -3
  188. package/dist/types/components/resizable/resizable.d.ts +2 -2
  189. package/dist/types/components/resizable/resizable.style.d.ts +2 -2
  190. package/dist/types/components/resizable/use-resizable.d.ts +2 -2
  191. package/dist/types/components/ripple/ripple.d.ts +2 -3
  192. package/dist/types/components/ripple/use-ripple.d.ts +2 -2
  193. package/dist/types/components/rotate/rotate.d.ts +2 -3
  194. package/dist/types/components/saturation-slider/saturation-slider.d.ts +2 -2
  195. package/dist/types/components/saturation-slider/use-saturation-slider.d.ts +2 -3
  196. package/dist/types/components/scroll-area/scroll-area.d.ts +2 -2
  197. package/dist/types/components/segmented-control/segmented-control.d.ts +2 -3
  198. package/dist/types/components/segmented-control/segmented-control.style.d.ts +2 -2
  199. package/dist/types/components/segmented-control/use-segmented-control.d.ts +9 -10
  200. package/dist/types/components/select/select.d.ts +2 -4
  201. package/dist/types/components/select/select.style.d.ts +52 -52
  202. package/dist/types/components/select/use-select.d.ts +4 -6
  203. package/dist/types/components/separator/separator.d.ts +2 -2
  204. package/dist/types/components/simple-grid/simple-grid.d.ts +2 -3
  205. package/dist/types/components/skeleton/skeleton.d.ts +2 -2
  206. package/dist/types/components/slide/slide.d.ts +2 -3
  207. package/dist/types/components/slide-fade/slide-fade.d.ts +2 -3
  208. package/dist/types/components/slider/slider.d.ts +2 -2
  209. package/dist/types/components/slider/use-slider.d.ts +2 -3
  210. package/dist/types/components/snacks/snacks.d.ts +0 -2
  211. package/dist/types/components/snacks/use-snacks.d.ts +0 -1
  212. package/dist/types/components/stack/h-stack.d.ts +2 -2
  213. package/dist/types/components/stack/stack.d.ts +2 -2
  214. package/dist/types/components/stack/v-stack.d.ts +2 -2
  215. package/dist/types/components/stack/z-stack.d.ts +2 -2
  216. package/dist/types/components/stat/stat.d.ts +2 -2
  217. package/dist/types/components/status/status.d.ts +2 -2
  218. package/dist/types/components/status/status.style.d.ts +2 -2
  219. package/dist/types/components/steps/steps.d.ts +2 -2
  220. package/dist/types/components/steps/steps.style.d.ts +1 -1
  221. package/dist/types/components/steps/use-steps.d.ts +10 -10
  222. package/dist/types/components/switch/switch.d.ts +2 -2
  223. package/dist/types/components/switch/use-switch.d.ts +0 -1
  224. package/dist/types/components/table/table.d.ts +2 -4
  225. package/dist/types/components/tabs/tabs.d.ts +2 -2
  226. package/dist/types/components/tabs/use-tabs.d.ts +16 -16
  227. package/dist/types/components/tag/tag.d.ts +2 -2
  228. package/dist/types/components/tag/tag.style.d.ts +1 -1
  229. package/dist/types/components/text/text.d.ts +2 -2
  230. package/dist/types/components/textarea/textarea.d.ts +2 -4
  231. package/dist/types/components/textarea/textarea.style.d.ts +30 -30
  232. package/dist/types/components/textarea/use-autosize.d.ts +2 -2
  233. package/dist/types/components/timeline/timeline.d.ts +5 -5
  234. package/dist/types/components/timeline/timeline.style.d.ts +1 -1
  235. package/dist/types/components/tip/tip.d.ts +0 -2
  236. package/dist/types/components/toggle/toggle-group.d.ts +1 -1
  237. package/dist/types/components/toggle/toggle.d.ts +3 -5
  238. package/dist/types/components/toggle/use-toggle-group.d.ts +2 -2
  239. package/dist/types/components/toggle/use-toggle.d.ts +2 -3
  240. package/dist/types/components/tooltip/tooltip.d.ts +2 -4
  241. package/dist/types/components/tree/tree.d.ts +2 -6
  242. package/dist/types/components/tree/tree.style.d.ts +1 -1
  243. package/dist/types/components/tree/use-tree.d.ts +182 -183
  244. package/dist/types/components/visually-hidden/visually-hidden.d.ts +2 -2
  245. package/dist/types/components/wrap/wrap.d.ts +2 -3
  246. package/dist/types/core/components/create-component.d.ts +11 -9
  247. package/dist/types/core/components/index.types.d.ts +1 -0
  248. package/dist/types/core/components/props.d.ts +6 -10
  249. package/dist/types/core/components/use-component-style.d.ts +2 -0
  250. package/dist/types/core/components/utils.d.ts +1 -0
  251. package/dist/types/core/constant.d.ts +1 -0
  252. package/dist/types/core/css/calc.d.ts +1 -0
  253. package/dist/types/core/css/conditions.d.ts +18 -2
  254. package/dist/types/core/css/config.d.ts +1 -0
  255. package/dist/types/core/css/css.d.ts +1 -0
  256. package/dist/types/core/css/index.types.d.ts +1 -0
  257. package/dist/types/core/css/styles.d.ts +603 -602
  258. package/dist/types/core/css/token.d.ts +1 -0
  259. package/dist/types/core/css/use-css.d.ts +1 -0
  260. package/dist/types/core/css/utils.d.ts +2 -0
  261. package/dist/types/core/generated-theme-tokens.types.d.ts +1 -0
  262. package/dist/types/core/index.d.ts +2 -0
  263. package/dist/types/core/system/color-mode-provider.d.ts +2 -2
  264. package/dist/types/core/system/config.d.ts +1 -0
  265. package/dist/types/core/system/create-system.d.ts +1 -0
  266. package/dist/types/core/system/factory.d.ts +1 -0
  267. package/dist/types/core/system/index.types.d.ts +1 -0
  268. package/dist/types/core/system/storage-script.d.ts +3 -3
  269. package/dist/types/core/system/styled.d.ts +3 -2
  270. package/dist/types/core/system/system-provider.d.ts +2 -2
  271. package/dist/types/core/system/var.d.ts +2 -0
  272. package/dist/types/hooks/use-async-callback/index.d.ts +0 -1
  273. package/dist/types/hooks/use-breakpoint/use-breakpoint-state.d.ts +2 -2
  274. package/dist/types/hooks/use-clickable/index.d.ts +7 -7
  275. package/dist/types/hooks/use-clipboard/index.d.ts +2 -2
  276. package/dist/types/hooks/use-combobox/index.d.ts +0 -1
  277. package/dist/types/hooks/use-field-sizing/index.d.ts +2 -2
  278. package/dist/types/hooks/use-hover/index.d.ts +2 -2
  279. package/dist/types/hooks/use-popper/index.d.ts +2 -2
  280. package/dist/types/index.d.ts +0 -104
  281. package/dist/types/providers/i18n-provider/i18n-provider.d.ts +3 -3
  282. package/dist/types/providers/ui-provider/ui-provider.d.ts +2 -3
  283. package/dist/types/utils/children.d.ts +2 -2
  284. package/package.json +1 -1
@@ -3,14 +3,14 @@ const require_config = require('../../core/system/config.cjs');
3
3
  require('../../core/index.cjs');
4
4
 
5
5
  //#region src/components/input/input.style.ts
6
- const getInputPaddingStartResetStyle = (key) => ({ "&:not([data-input-element] + &)": (0, require_utils_index.utils_exports.wrapWithKey)({ ps: "0px" }, key) });
7
- const getInputPaddingEndResetStyle = (key) => ({ "&:not(:has(+ [data-input-element]))": (0, require_utils_index.utils_exports.wrapWithKey)({ pe: "0px" }, key) });
6
+ const getInputPaddingStartResetStyle = (key) => ({ "&:not([data-input-element] ~ &)": (0, require_utils_index.utils_exports.wrapWithKey)({ ps: "0px" }, key) });
7
+ const getInputPaddingEndResetStyle = (key) => ({ "&:not(:has(~ [data-input-element]))": (0, require_utils_index.utils_exports.wrapWithKey)({ pe: "0px" }, key) });
8
8
  const getInputHeightStyle = (height, key) => ({
9
- "&:has(+ [data-input-element])": (0, require_utils_index.utils_exports.wrapWithKey)({ pe: height }, key),
9
+ "&:has(~ [data-input-element])": (0, require_utils_index.utils_exports.wrapWithKey)({ pe: height }, key),
10
10
  "& ~ [data-input-element]": { minW: height },
11
11
  "--height": height,
12
- "[data-input-element] + &": (0, require_utils_index.utils_exports.wrapWithKey)({ ps: height }, key),
13
12
  "[data-input-element]:has(~ &)": { minW: height },
13
+ "[data-input-element] ~ &": (0, require_utils_index.utils_exports.wrapWithKey)({ ps: height }, key),
14
14
  minH: height
15
15
  });
16
16
  const inputStyle = require_config.defineComponentStyle({
@@ -1 +1 @@
1
- {"version":3,"file":"input.style.cjs","names":["defineComponentStyle"],"sources":["../../../../src/components/input/input.style.ts"],"sourcesContent":["import type { CSSObject } from \"../../core\"\nimport { defineComponentStyle } from \"../../core\"\nimport { wrapWithKey } from \"../../utils\"\n\nexport const getInputPaddingStartResetStyle = (key?: string) =>\n ({\n \"&:not([data-input-element] + &)\": wrapWithKey({ ps: \"0px\" }, key),\n }) satisfies CSSObject\n\nexport const getInputPaddingEndResetStyle = (key?: string) =>\n ({\n \"&:not(:has(+ [data-input-element]))\": wrapWithKey({ pe: \"0px\" }, key),\n }) satisfies CSSObject\n\nexport const getInputHeightStyle = (height?: string, key?: string) =>\n ({\n \"&:has(+ [data-input-element])\": wrapWithKey({ pe: height }, key),\n \"& ~ [data-input-element]\": { minW: height },\n \"--height\": height,\n \"[data-input-element] + &\": wrapWithKey({ ps: height }, key),\n \"[data-input-element]:has(~ &)\": { minW: height },\n minH: height,\n }) satisfies CSSObject\n\nexport const inputStyle = defineComponentStyle({\n base: {\n \"--error-border-color\": \"colors.border.error\",\n \"--focus-border-color\": \"colorScheme.outline\",\n appearance: \"none\",\n minW: \"0\",\n position: \"relative\",\n rounded: \"l2\",\n textAlign: \"start\",\n transitionDuration: \"moderate\",\n transitionProperty: \"common\",\n w: \"full\",\n _disabled: {\n layerStyle: \"disabled\",\n },\n },\n\n variants: {\n filled: {\n bg: \"bg.panel\",\n border: \"1px solid transparent\",\n focusRingColor: \"{focus-border-color}\",\n focusVisibleRing: \"inside\",\n _container: [\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"elevated\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"elevated\"' },\n ],\n _invalid: {\n borderColor: \"{error-border-color}\",\n focusRingColor: \"{error-border-color}\",\n },\n },\n flushed: {\n bg: \"transparent\",\n borderBottomColor: \"colorScheme.muted\",\n borderBottomWidth: \"1px\",\n rounded: \"0px\",\n _focusVisible: {\n borderColor: \"{focus-border-color}\",\n boxShadow: \"0px 1px 0px 0px {focus-border-color}\",\n outline: \"none\",\n },\n _invalid: {\n borderColor: \"{error-border-color}\",\n _focusVisible: {\n boxShadow: \"0px 1px 0px 0px {error-border-color}\",\n },\n },\n },\n outline: {\n border: \"1px solid {colors.border}\",\n focusRingColor: \"{focus-border-color}\",\n focusVisibleRing: \"inside\",\n _container: [\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"elevated\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"elevated\"' },\n ],\n _invalid: {\n borderColor: \"{error-border-color}\",\n focusRingColor: \"{error-border-color}\",\n },\n },\n plain: {\n focusRingColor: \"{focus-border-color}\",\n focusVisibleRing: \"inside\",\n _invalid: {\n borderColor: \"{error-border-color}\",\n focusRingColor: \"{error-border-color}\",\n },\n },\n },\n\n sizes: {\n xs: {\n \"--space-x\": \"spaces.2\",\n \"--space-y\": \"spaces.1.5\",\n fontSize: \"xs\",\n px: \"{space-x}\",\n ...getInputHeightStyle(\"{sizes.8}\"),\n },\n sm: {\n \"--space-x\": \"spaces.2.5\",\n \"--space-y\": \"spaces.2\",\n fontSize: \"sm\",\n px: \"{space-x}\",\n ...getInputHeightStyle(\"{sizes.9}\"),\n },\n md: {\n \"--space-x\": \"spaces.3\",\n \"--space-y\": \"spaces.2\",\n fontSize: \"md\",\n px: \"{space-x}\",\n ...getInputHeightStyle(\"{sizes.10}\"),\n },\n lg: {\n \"--space-x\": \"spaces.3.5\",\n \"--space-y\": \"spaces.2.5\",\n fontSize: \"lg\",\n px: \"{space-x}\",\n ...getInputHeightStyle(\"{sizes.11}\"),\n },\n xl: {\n \"--space-x\": \"spaces.4\",\n \"--space-y\": \"spaces.3\",\n fontSize: \"xl\",\n px: \"{space-x}\",\n ...getInputHeightStyle(\"{sizes.12}\"),\n },\n \"2xl\": {\n \"--space-x\": \"spaces.4\",\n \"--space-y\": \"spaces.3\",\n fontSize: \"xl\",\n px: \"{space-x}\",\n ...getInputHeightStyle(\"{sizes.14}\"),\n },\n },\n\n compounds: [\n {\n css: {\n ...getInputPaddingStartResetStyle(),\n ...getInputPaddingEndResetStyle(),\n },\n variant: \"flushed\",\n layer: \"variant\",\n },\n ],\n\n defaultProps: {\n size: \"md\",\n variant: \"outline\",\n },\n})\n\nexport type InputStyle = typeof inputStyle\n"],"mappings":";;;;;AAIA,MAAa,kCAAkC,SAC5C,EACC,sFAA+C,EAAE,IAAI,OAAO,EAAE,IAAI,EACnE;AAEH,MAAa,gCAAgC,SAC1C,EACC,0FAAmD,EAAE,IAAI,OAAO,EAAE,IAAI,EACvE;AAEH,MAAa,uBAAuB,QAAiB,SAClD;CACC,oFAA6C,EAAE,IAAI,QAAQ,EAAE,IAAI;CACjE,4BAA4B,EAAE,MAAM,QAAQ;CAC5C,YAAY;CACZ,+EAAwC,EAAE,IAAI,QAAQ,EAAE,IAAI;CAC5D,iCAAiC,EAAE,MAAM,QAAQ;CACjD,MAAM;CACP;AAEH,MAAa,aAAaA,oCAAqB;CAC7C,MAAM;EACJ,wBAAwB;EACxB,wBAAwB;EACxB,YAAY;EACZ,MAAM;EACN,UAAU;EACV,SAAS;EACT,WAAW;EACX,o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aAAa;GACb,UAAU;GACV,IAAI;GACJ,GAAG,oBAAoB,aAAa;GACrC;EACD,IAAI;GACF,aAAa;GACb,aAAa;GACb,UAAU;GACV,IAAI;GACJ,GAAG,oBAAoB,aAAa;GACrC;EACD,IAAI;GACF,aAAa;GACb,aAAa;GACb,UAAU;GACV,IAAI;GACJ,GAAG,oBAAoB,aAAa;GACrC;EACD,OAAO;GACL,aAAa;GACb,aAAa;GACb,UAAU;GACV,IAAI;GACJ,GAAG,oBAAoB,aAAa;GACrC;EACF;CAED,WAAW,CACT;EACE,KAAK;GACH,GAAG,gCAAgC;GACnC,GAAG,8BAA8B;GAClC;EACD,SAAS;EACT,OAAO;EACR,CACF;CAED,cAAc;EACZ,MAAM;EACN,SAAS;EACV;CACF,CAAC"}
1
+ {"version":3,"file":"input.style.cjs","names":["defineComponentStyle"],"sources":["../../../../src/components/input/input.style.ts"],"sourcesContent":["import type { CSSObject } from \"../../core\"\nimport { defineComponentStyle } from \"../../core\"\nimport { wrapWithKey } from \"../../utils\"\n\nexport const getInputPaddingStartResetStyle = (key?: string) =>\n ({\n \"&:not([data-input-element] ~ &)\": wrapWithKey({ ps: \"0px\" }, key),\n }) satisfies CSSObject\n\nexport const getInputPaddingEndResetStyle = (key?: string) =>\n ({\n \"&:not(:has(~ [data-input-element]))\": wrapWithKey({ pe: \"0px\" }, key),\n }) satisfies CSSObject\n\nexport const getInputHeightStyle = (height?: string, key?: string) =>\n ({\n \"&:has(~ [data-input-element])\": wrapWithKey({ pe: height }, key),\n \"& ~ [data-input-element]\": { minW: height },\n \"--height\": height,\n \"[data-input-element]:has(~ &)\": { minW: height },\n \"[data-input-element] ~ &\": wrapWithKey({ ps: height }, key),\n minH: height,\n }) satisfies CSSObject\n\nexport const inputStyle = defineComponentStyle({\n base: {\n \"--error-border-color\": \"colors.border.error\",\n \"--focus-border-color\": \"colorScheme.outline\",\n appearance: \"none\",\n minW: \"0\",\n position: \"relative\",\n rounded: \"l2\",\n textAlign: \"start\",\n transitionDuration: \"moderate\",\n transitionProperty: \"common\",\n w: \"full\",\n _disabled: {\n layerStyle: \"disabled\",\n },\n },\n\n variants: {\n filled: {\n bg: \"bg.panel\",\n border: \"1px solid transparent\",\n focusRingColor: \"{focus-border-color}\",\n focusVisibleRing: \"inside\",\n _container: [\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"elevated\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"elevated\"' },\n ],\n _invalid: {\n borderColor: \"{error-border-color}\",\n focusRingColor: \"{error-border-color}\",\n },\n },\n flushed: {\n bg: \"transparent\",\n borderBottomColor: \"colorScheme.muted\",\n borderBottomWidth: \"1px\",\n rounded: \"0px\",\n _focusVisible: {\n borderColor: \"{focus-border-color}\",\n boxShadow: \"0px 1px 0px 0px {focus-border-color}\",\n outline: \"none\",\n },\n _invalid: {\n borderColor: \"{error-border-color}\",\n _focusVisible: {\n boxShadow: \"0px 1px 0px 0px {error-border-color}\",\n },\n },\n },\n outline: {\n border: \"1px solid {colors.border}\",\n focusRingColor: \"{focus-border-color}\",\n focusVisibleRing: \"inside\",\n _container: [\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"panel\"' },\n { css: { bg: \"bg\" }, style: '--form-group-variant: \"elevated\"' },\n { css: { bg: \"bg\" }, style: '--fieldset-root-variant: \"elevated\"' },\n ],\n _invalid: {\n borderColor: \"{error-border-color}\",\n focusRingColor: \"{error-border-color}\",\n },\n },\n plain: {\n focusRingColor: \"{focus-border-color}\",\n focusVisibleRing: \"inside\",\n _invalid: {\n borderColor: \"{error-border-color}\",\n focusRingColor: \"{error-border-color}\",\n },\n },\n },\n\n sizes: {\n xs: {\n \"--space-x\": \"spaces.2\",\n \"--space-y\": \"spaces.1.5\",\n fontSize: \"xs\",\n px: \"{space-x}\",\n ...getInputHeightStyle(\"{sizes.8}\"),\n },\n sm: {\n \"--space-x\": \"spaces.2.5\",\n \"--space-y\": \"spaces.2\",\n fontSize: \"sm\",\n px: \"{space-x}\",\n ...getInputHeightStyle(\"{sizes.9}\"),\n },\n md: {\n \"--space-x\": \"spaces.3\",\n \"--space-y\": \"spaces.2\",\n fontSize: \"md\",\n px: \"{space-x}\",\n ...getInputHeightStyle(\"{sizes.10}\"),\n },\n lg: {\n \"--space-x\": \"spaces.3.5\",\n \"--space-y\": \"spaces.2.5\",\n fontSize: \"lg\",\n px: \"{space-x}\",\n ...getInputHeightStyle(\"{sizes.11}\"),\n },\n xl: {\n \"--space-x\": \"spaces.4\",\n \"--space-y\": \"spaces.3\",\n fontSize: \"xl\",\n px: \"{space-x}\",\n ...getInputHeightStyle(\"{sizes.12}\"),\n },\n \"2xl\": {\n \"--space-x\": \"spaces.4\",\n \"--space-y\": \"spaces.3\",\n fontSize: \"xl\",\n px: \"{space-x}\",\n ...getInputHeightStyle(\"{sizes.14}\"),\n },\n },\n\n compounds: [\n {\n css: {\n ...getInputPaddingStartResetStyle(),\n ...getInputPaddingEndResetStyle(),\n },\n variant: \"flushed\",\n layer: \"variant\",\n },\n ],\n\n defaultProps: {\n size: \"md\",\n variant: \"outline\",\n },\n})\n\nexport type InputStyle = typeof inputStyle\n"],"mappings":";;;;;AAIA,MAAa,kCAAkC,SAC5C,EACC,sFAA+C,EAAE,IAAI,OAAO,EAAE,IAAI,EACnE;AAEH,MAAa,gCAAgC,SAC1C,EACC,0FAAmD,EAAE,IAAI,OAAO,EAAE,IAAI,EACvE;AAEH,MAAa,uBAAuB,QAAiB,SAClD;CACC,oFAA6C,EAAE,IAAI,QAAQ,EAAE,IAAI;CACjE,4BAA4B,EAAE,MAAM,QAAQ;CAC5C,YAAY;CACZ,iCAAiC,EAAE,MAAM,QAAQ;CACjD,+EAAwC,EAAE,IAAI,QAAQ,EAAE,IAAI;CAC5D,MAAM;CACP;AAEH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B,YAAY;GACpC;EACD,IAAI;GACF,aAAa;GACb,aAAa;GACb,UAAU;GACV,IAAI;GACJ,GAAG,oBAAoB,YAAY;GACpC;EACD,IAAI;GACF,aAAa;GACb,aAAa;GACb,UAAU;GACV,IAAI;GACJ,GAAG,oBAAoB,aAAa;GACrC;EACD,IAAI;GACF,aAAa;GACb,aAAa;GACb,UAAU;GACV,IAAI;GACJ,GAAG,oBAAoB,aAAa;GACrC;EACD,IAAI;GACF,aAAa;GACb,aAAa;GACb,UAAU;GACV,IAAI;GACJ,GAAG,oBAAoB,aAAa;GACrC;EACD,OAAO;GACL,aAAa;GACb,aAAa;GACb,UAAU;GACV,IAAI;GACJ,GAAG,oBAAoB,aAAa;GACrC;EACF;CAED,WAAW,CACT;EACE,KAAK;GACH,GAAG,gCAAgC;GACnC,GAAG,8BAA8B;GAClC;EACD,SAAS;EACT,OAAO;EACR,CACF;CAED,cAAc;EACZ,MAAM;EACN,SAAS;EACV;CACF,CAAC"}
@@ -14,7 +14,7 @@ const createTransition = {
14
14
  1
15
15
  ]
16
16
  },
17
- ...duration ? { duration: (0, require_utils_index.utils_exports.isNumber)(duration) ? duration : duration.enter } : {},
17
+ ...!(0, require_utils_index.utils_exports.isUndefined)(duration) ? { duration: (0, require_utils_index.utils_exports.isNumber)(duration) ? duration : duration.enter } : {},
18
18
  delay: (0, require_utils_index.utils_exports.isNumber)(delay) ? delay : delay?.enter
19
19
  };
20
20
  };
@@ -31,7 +31,7 @@ const createTransition = {
31
31
  1
32
32
  ]
33
33
  },
34
- ...duration ? { duration: (0, require_utils_index.utils_exports.isNumber)(duration) ? duration : duration.exit } : {},
34
+ ...!(0, require_utils_index.utils_exports.isUndefined)(duration) ? { duration: (0, require_utils_index.utils_exports.isNumber)(duration) ? duration : duration.exit } : {},
35
35
  delay: (0, require_utils_index.utils_exports.isNumber)(delay) ? delay : delay?.exit
36
36
  };
37
37
  };
@@ -1 +1 @@
1
- {"version":3,"file":"transition.cjs","names":[],"sources":["../../../../src/components/motion/transition.ts"],"sourcesContent":["import type { Transition } from \"motion/react\"\nimport type { MotionTransitionProps } from \"./index.types\"\nimport { isNumber } from \"../../utils\"\n\nexport const createTransition = {\n enter: function (transition?: Transition) {\n return function (\n delay?: MotionTransitionProps[\"delay\"],\n duration?: MotionTransitionProps[\"duration\"],\n ): Transition {\n return {\n ...(transition ?? {\n duration: 0.2,\n ease: [0, 0, 0.58, 1],\n }),\n ...(duration\n ? { duration: isNumber(duration) ? duration : duration.enter }\n : {}),\n delay: isNumber(delay) ? delay : delay?.enter,\n }\n }\n },\n exit: function (transition?: Transition) {\n return function (\n delay?: MotionTransitionProps[\"delay\"],\n duration?: MotionTransitionProps[\"duration\"],\n ): Transition {\n return {\n ...(transition ?? {\n duration: 0.2,\n ease: [0.42, 0, 1, 1],\n }),\n ...(duration\n ? { duration: isNumber(duration) ? duration : duration.exit }\n : {}),\n delay: isNumber(delay) ? delay : delay?.exit,\n }\n }\n },\n}\n"],"mappings":";;;AAIA,MAAa,mBAAmB;CAC9B,OAAO,SAAU,YAAyB;AACxC,SAAO,SACL,OACA,UACY;AACZ,UAAO;IACL,GAAI,cAAc;KAChB,UAAU;KACV,MAAM;MAAC;MAAG;MAAG;MAAM;MAAE;KACtB;IACD,GAAI,WACA,EAAE,0DAAmB,SAAS,GAAG,WAAW,SAAS,OAAO,GAC5D,EAAE;IACN,uDAAgB,MAAM,GAAG,QAAQ,OAAO;IACzC;;;CAGL,MAAM,SAAU,YAAyB;AACvC,SAAO,SACL,OACA,UACY;AACZ,UAAO;IACL,GAAI,cAAc;KAChB,UAAU;KACV,MAAM;MAAC;MAAM;MAAG;MAAG;MAAE;KACtB;IACD,GAAI,WACA,EAAE,0DAAmB,SAAS,GAAG,WAAW,SAAS,MAAM,GAC3D,EAAE;IACN,uDAAgB,MAAM,GAAG,QAAQ,OAAO;IACzC;;;CAGN"}
1
+ {"version":3,"file":"transition.cjs","names":[],"sources":["../../../../src/components/motion/transition.ts"],"sourcesContent":["import type { Transition } from \"motion/react\"\nimport type { MotionTransitionProps } from \"./index.types\"\nimport { isNumber, isUndefined } from \"../../utils\"\n\nexport const createTransition = {\n enter: function (transition?: Transition) {\n return function (\n delay?: MotionTransitionProps[\"delay\"],\n duration?: MotionTransitionProps[\"duration\"],\n ): Transition {\n return {\n ...(transition ?? {\n duration: 0.2,\n ease: [0, 0, 0.58, 1],\n }),\n ...(!isUndefined(duration)\n ? { duration: isNumber(duration) ? duration : duration.enter }\n : {}),\n delay: isNumber(delay) ? delay : delay?.enter,\n }\n }\n },\n exit: function (transition?: Transition) {\n return function (\n delay?: MotionTransitionProps[\"delay\"],\n duration?: MotionTransitionProps[\"duration\"],\n ): Transition {\n return {\n ...(transition ?? {\n duration: 0.2,\n ease: [0.42, 0, 1, 1],\n }),\n ...(!isUndefined(duration)\n ? { duration: isNumber(duration) ? duration : duration.exit }\n : {}),\n delay: isNumber(delay) ? delay : delay?.exit,\n }\n }\n },\n}\n"],"mappings":";;;AAIA,MAAa,mBAAmB;CAC9B,OAAO,SAAU,YAAyB;AACxC,SAAO,SACL,OACA,UACY;AACZ,UAAO;IACL,GAAI,cAAc;KAChB,UAAU;KACV,MAAM;MAAC;MAAG;MAAG;MAAM;MAAE;KACtB;IACD,GAAI,oDAAa,SAAS,GACtB,EAAE,0DAAmB,SAAS,GAAG,WAAW,SAAS,OAAO,GAC5D,EAAE;IACN,uDAAgB,MAAM,GAAG,QAAQ,OAAO;IACzC;;;CAGL,MAAM,SAAU,YAAyB;AACvC,SAAO,SACL,OACA,UACY;AACZ,UAAO;IACL,GAAI,cAAc;KAChB,UAAU;KACV,MAAM;MAAC;MAAM;MAAG;MAAG;MAAE;KACtB;IACD,GAAI,oDAAa,SAAS,GACtB,EAAE,0DAAmB,SAAS,GAAG,WAAW,SAAS,MAAM,GAC3D,EAAE;IACN,uDAAgB,MAAM,GAAG,QAAQ,OAAO;IACzC;;;CAGN"}
@@ -1 +1 @@
1
- {"version":3,"file":"create-component.cjs","names":["Fragment","styled","getDisplayName","createContext","useSystem","getClassName","name","useComponentStyle","withContext","mergeProps","chainProps","getSlotClassName","useComponentSlotStyle","style","mergeSlotCSS"],"sources":["../../../../src/core/components/create-component.tsx"],"sourcesContent":["\"use client\"\n\nimport type { FC, FunctionComponent } from \"react\"\nimport type { AnyString, Dict, Merge } from \"../../utils\"\nimport type { CSSObject, CSSSlotObject } from \"../css\"\nimport type {\n ComponentSlotStyle,\n ComponentStyle,\n StyledOptions,\n System,\n WithoutThemeProps,\n} from \"../system\"\nimport type {\n As,\n DOMElement,\n HTMLStyledProps,\n Component as OriginalComponent,\n} from \"./index.types\"\nimport { Fragment } from \"react\"\nimport {\n createContext,\n cx,\n isArray,\n isFunction,\n isObject,\n isString,\n runIfFn,\n toArray,\n toCamelCase,\n toPascalCase,\n} from \"../../utils\"\nimport { styled, useSystem } from \"../system\"\nimport { chainProps, mergeProps } from \"./props\"\nimport {\n getSlotClassName,\n mergeSlotCSS,\n useComponentSlotStyle,\n useComponentStyle,\n} from \"./use-component-style\"\nimport { getClassName, getDisplayName } from \"./utils\"\n\ntype AsWithFragment = \"fragment\" | As\ntype ClassName = ((system: System) => string) | string\n\ntype Component<\n Y extends AsWithFragment = AsWithFragment,\n M extends object = {},\n> = Y extends \"fragment\"\n ? FunctionComponent<M>\n : OriginalComponent<Exclude<Y, \"fragment\">, M>\n\nexport type ComponentSlotName<\n Y extends ComponentSlotStyle | ComponentStyle = ComponentSlotStyle,\n> = AnyString | Extract<keyof NonNullable<Y[\"base\"]>, string>\n\nexport type ComponentSlot<Y extends string> =\n | [Y, Y]\n | Y\n | { name: string; slot: [Y, Y] | Y }\n\nexport type InitialProps<Y extends Dict = Dict> =\n | ((props: Y) => any)\n | Partial<Y>\nexport type SuperProps<Y extends Dict = Dict> = ((props: Y) => any) | Y\n\nexport type SuperWithoutThemeProps<\n Y extends Dict = Dict,\n M extends Dict = Dict,\n D extends keyof Y = keyof Y,\n> = ((props: WithoutThemeProps<Y, M, D>) => any) | WithoutThemeProps<Y, M, D>\n\nexport interface UseComponentPropsOptions<\n Y extends number | string | symbol = string,\n> {\n className?: ClassName\n withContext?: boolean\n transferProps?: Y[]\n}\n\nexport interface ComponentOptions extends Omit<StyledOptions, \"transferProps\"> {\n className?: ClassName\n shouldStyleProps?: boolean\n}\n\ninterface classNameOptions<Y extends string = string> {\n className?: ClassName\n slot?: ComponentSlot<Y>\n}\n\nexport interface ComponentWithContextOptions<\n Y extends number | string | symbol = string,\n>\n extends ComponentOptions, UseComponentPropsOptions<Y> {}\n\nfunction createProxyComponent<\n Y extends AsWithFragment = \"div\",\n M extends Dict = Dict,\n>(el: FC<M> | Y, { shouldStyleProps, ...options }: ComponentOptions = {}) {\n options.shouldForwardProp ??= isFunction(el)\n shouldStyleProps ??= !isFunction(el)\n\n if (el === \"fragment\") el = Fragment\n\n if (shouldStyleProps || isString(el)) {\n const ProxyComponent = styled(el as As, options)\n\n ProxyComponent.displayName = \"ProxyComponent\"\n\n return ProxyComponent\n } else {\n el.displayName ??= \"ProxyComponent\"\n\n return el as FC<M>\n }\n}\n\nfunction withDisplayName<\n Y extends AsWithFragment = AsWithFragment,\n M extends object = {},\n>(Component: FC<M>, displayName: string) {\n Object.defineProperty(Component, \"name\", { value: displayName })\n Object.defineProperty(Component, \"displayName\", { value: displayName })\n\n return Component as Component<Y, M>\n}\n\nfunction getSlotKey<Y extends string>(slot?: ComponentSlot<Y>) {\n if (!slot) return \"unknown\"\n\n if (isArray(slot) || !isObject(slot)) {\n return toCamelCase(toArray(slot).join(\"-\"))\n } else {\n return toCamelCase(slot.name)\n }\n}\n\nfunction getSlotName<Y extends string>(slot?: ComponentSlot<Y>) {\n if (!slot) return \"\"\n\n if (isArray(slot)) {\n return slot.map((value) => toPascalCase(value as string)).join(\"\")\n } else if (isObject(slot)) {\n return toPascalCase(slot.name)\n } else {\n return toPascalCase(slot as string)\n }\n}\n\nexport function createComponent<\n Y extends object = {},\n M extends ComponentStyle = Dict,\n D extends Dict = Dict,\n>(name: string, style?: M) {\n const defaultClassName = style?.className\n const defaultDisplayName = getDisplayName(name)\n const [ComponentContext, useComponentContext] = createContext<D>({\n name: `${defaultDisplayName}Context`,\n })\n const [PropsContext, usePropsContext] = createContext<Partial<Y>>({\n name: `${defaultDisplayName}PropsContext`,\n strict: false,\n })\n\n function useClassName(name?: string, className?: ClassName) {\n const system = useSystem()\n\n className = runIfFn(className, system)\n className ??= getClassName(name, defaultClassName)(system)\n\n return className\n }\n\n function useComponentProps<H extends Y = Y, R extends keyof H = keyof H>(\n props: H,\n {\n className,\n withContext = true,\n transferProps,\n }: UseComponentPropsOptions<R> = {},\n ) {\n const system = useSystem()\n\n className = runIfFn(className, system)\n className ??= defaultClassName\n className ??= getClassName(name)(system)\n\n const contextProps = usePropsContext() ?? {}\n const mergedProps = withContext ? mergeProps(contextProps, props)() : props\n const [, rest] = useComponentStyle(mergedProps, {\n name,\n className,\n style,\n transferProps,\n })\n\n return rest\n }\n\n function component<D extends AsWithFragment = \"div\", H extends Dict = Y>(\n el: D | FC<H>,\n { name, className, ...options }: ComponentOptions = {},\n ) {\n const displayName = getDisplayName(name, defaultDisplayName)\n const ProxyComponent = createProxyComponent(el, options)\n\n return function (\n initialProps?: InitialProps<H>,\n ...superProps: SuperProps<H>[]\n ) {\n return withDisplayName<D, H>((props) => {\n className = useClassName(name, className)\n\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = chainProps<any>(...superProps)()(computedProps)\n\n return (\n <ProxyComponent\n {...mergedProps}\n className={cx(className, mergedProps.className)}\n />\n )\n }, displayName)\n }\n }\n\n function withContext<\n D extends AsWithFragment = \"div\",\n H extends Y = Y,\n R extends keyof H = keyof H,\n >(\n el: D | FC<WithoutThemeProps<H, M, R>>,\n {\n name,\n className,\n withContext,\n transferProps,\n ...options\n }: ComponentWithContextOptions<R> = {},\n ) {\n const displayName = getDisplayName(name, defaultDisplayName)\n const ProxyComponent = createProxyComponent(el, options)\n\n return function (\n initialProps?: InitialProps<H>,\n ...superProps: SuperWithoutThemeProps<H, M, R>[]\n ) {\n return withDisplayName<D, H>((props) => {\n className = useClassName(name, className)\n\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = useComponentProps(computedProps, {\n className,\n withContext,\n transferProps,\n })\n const rest = chainProps<any>(...toArray(superProps))()(mergedProps)\n\n return <ProxyComponent {...rest} />\n }, displayName)\n }\n }\n\n return {\n component,\n ComponentContext,\n PropsContext,\n useComponentContext,\n usePropsContext,\n withContext,\n useComponentProps,\n }\n}\n\nexport function createSlotComponent<\n Y extends object = {},\n M extends ComponentSlotStyle = Dict,\n D extends Dict = Dict,\n>(rootName: string, style?: M) {\n const rootClassName = style?.className\n const rootDisplayName = getDisplayName(rootName)\n const classNameMap = new Map<string, classNameOptions>()\n const [StyleContext, useStyleContext] = createContext<\n CSSSlotObject<ComponentSlotName<M>>\n >({\n name: `${rootDisplayName}StyleContext`,\n })\n const [ComponentContext, useComponentContext] = createContext<D>({\n name: `${rootDisplayName}Context`,\n })\n const [PropsContext, usePropsContext] = createContext<Partial<Y>>({\n name: `${rootDisplayName}PropsContext`,\n strict: false,\n })\n\n function useClassName(\n slot?: ComponentSlot<ComponentSlotName<M>>,\n className?: ClassName,\n ) {\n const system = useSystem()\n\n className = runIfFn(className, system)\n className ??= getSlotClassName(\n rootClassName ?? getClassName(rootName)(system),\n slot,\n )\n\n return className\n }\n\n function useClassNames() {\n const system = useSystem()\n const entries = classNameMap.entries().map(([key, { className, slot }]) => {\n className = runIfFn(className, system)\n className ??= getSlotClassName(\n rootClassName ?? getClassName(rootName)(system),\n slot,\n )\n\n return [key, className]\n })\n\n return Object.fromEntries(\n entries.filter(([_, className]) => className),\n ) as { [key: string]: string }\n }\n\n function useRootComponentProps<\n Y extends Dict = Dict,\n R extends keyof Y = keyof Y,\n >(\n props: Y,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n {\n className,\n withContext = true,\n transferProps,\n }: UseComponentPropsOptions<R> = {},\n ): [\n CSSSlotObject,\n Merge<WithoutThemeProps<Y, M, R>, { css?: CSSObject | CSSObject[] }>,\n ] {\n className = useClassName(slot, className)\n\n const contextProps = usePropsContext() ?? {}\n const mergedProps = withContext ? mergeProps(contextProps, props)() : props\n const [css, rest] = useComponentSlotStyle(mergedProps, {\n name: rootName,\n className,\n style,\n slot,\n transferProps,\n })\n\n return [css, rest]\n }\n\n function useSlotComponentProps<Y extends Dict = Dict>(\n props: Y,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n { className }: Omit<UseComponentPropsOptions, \"transferProps\"> = {},\n ) {\n className = useClassName(slot, className)\n\n const style = useStyleContext()\n\n return {\n ...props,\n className: cx(className, props.className),\n css: mergeSlotCSS(slot, style, props.css),\n }\n }\n\n function component<H extends AsWithFragment = \"div\", R extends Dict = Dict>(\n el: FC<R> | H,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n { name, className, ...options }: ComponentOptions = {},\n ) {\n const ProxyComponent = createProxyComponent(el, options)\n const slotKey = getSlotKey(slot)\n const slotName = getSlotName(slot)\n const displayName = getDisplayName(name, `${rootDisplayName}${slotName}`)\n\n classNameMap.set(slotKey, { className, slot })\n\n return function (\n initialProps?: InitialProps<R>,\n ...superProps: SuperProps<R>[]\n ) {\n return withDisplayName<H, R>((props) => {\n className = useClassName(slot, className)\n\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = chainProps(...superProps)()(computedProps)\n\n return (\n <ProxyComponent\n {...mergedProps}\n className={cx(className, mergedProps.className)}\n />\n )\n }, displayName)\n }\n }\n\n function withProvider<\n H extends AsWithFragment = \"div\",\n R extends Y = Y,\n T extends keyof R = keyof R,\n >(\n el: FC<WithoutThemeProps<R, M, T>> | H,\n slot: ComponentSlot<ComponentSlotName<M>> = \"root\" as ComponentSlot<\n ComponentSlotName<M>\n >,\n {\n name,\n className,\n withContext,\n transferProps,\n ...options\n }: ComponentWithContextOptions<T> = {},\n ) {\n const ProxyComponent = createProxyComponent(el, options)\n const slotKey = getSlotKey(slot)\n const slotName = getSlotName(slot)\n const displayName = getDisplayName(name, `${rootDisplayName}${slotName}`)\n\n classNameMap.set(slotKey, { className, slot })\n\n return function (\n initialProps?: InitialProps<R>,\n ...superProps: SuperWithoutThemeProps<R, M, T>[]\n ) {\n return withDisplayName<H, R>((props) => {\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const [context, mergedProps] = useRootComponentProps(\n computedProps,\n slot,\n {\n className,\n withContext,\n transferProps,\n },\n )\n const rest = chainProps<any>(...superProps)()(mergedProps)\n\n return (\n <StyleContext value={context}>\n <ProxyComponent {...rest} />\n </StyleContext>\n )\n }, displayName)\n }\n }\n\n function withContext<\n H extends AsWithFragment = \"div\",\n R extends Dict = H extends DOMElement ? HTMLStyledProps<H> : Dict,\n >(\n el: FC<R> | H,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n {\n name,\n className,\n withContext,\n ...options\n }: Omit<ComponentWithContextOptions, \"transferProps\"> = {},\n ) {\n const ProxyComponent = createProxyComponent(el, options)\n const slotKey = getSlotKey(slot)\n const slotName = getSlotName(slot)\n const displayName = getDisplayName(name, `${rootDisplayName}${slotName}`)\n\n classNameMap.set(slotKey, { className, slot })\n\n return function (\n initialProps?: InitialProps<R>,\n ...superProps: SuperProps<R>[]\n ) {\n return withDisplayName<H, R>((props) => {\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = useSlotComponentProps(computedProps, slot, {\n className,\n withContext,\n })\n const rest = chainProps(...superProps)()(mergedProps)\n\n return <ProxyComponent {...rest} />\n }, displayName)\n }\n }\n\n return {\n component,\n ComponentContext,\n PropsContext,\n StyleContext,\n useClassNames,\n useComponentContext,\n usePropsContext,\n useStyleContext,\n withContext,\n withProvider,\n useRootComponentProps,\n useSlotComponentProps,\n }\n}\n"],"mapp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AC,SAAS,eAAe,wEAHE,aAAa,GAC1C,aAAa,MAAM,GACnBO,yBAAW,gBAAgB,EAAE,EAAE,MAAM,EAAE,EAGzC,MACA;KACE;KACA;KACA;KACD,CACF;AAGD,WACE,2CAAC;KAAa,OAAO;eACnB,2CAAC,kBAAe,GAJPC,yBAAgB,GAAG,WAAW,EAAE,CAAC,YAAY,GAI1B;MACf;MAEhB,YAAY;;;CAInB,SAAS,YAIP,IACA,MACA,EACE,MACA,WACA,4BACA,GAAG,YACmD,EAAE,EAC1D;EACA,MAAM,iBAAiB,qBAAqB,IAAI,QAAQ;EACxD,MAAM,UAAU,WAAW,KAAK;EAEhC,MAAM,cAAcR,6BAAe,MAAM,GAAG,kBAD3B,YAAY,KAAK,GACuC;AAEzE,eAAa,IAAI,SAAS;GAAE;GAAW;GAAM,CAAC;AAE9C,SAAO,SACL,cACA,GAAG,YACH;AACA,UAAO,iBAAuB,UAAU;IAItC,MAAM,cAAc,wEAHa,aAAa,GAC1C,aAAa,MAAM,GACnBO,yBAAW,gBAAgB,EAAE,EAAE,MAAM,EAAE,EACc,MAAM;KAC7D;KACA;KACD,CAAC;AAGF,WAAO,2CAAC,kBAAe,GAFVC,yBAAW,GAAG,WAAW,EAAE,CAAC,YAAY,GAElB;MAClC,YAAY;;;AAInB,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
1
+ {"version":3,"file":"create-component.cjs","names":["Fragment","styled","getDisplayName","createContext","useSystem","getClassName","name","useComponentStyle","withContext","mergeProps","chainProps","getSlotClassName","useComponentSlotStyle","style","mergeSlotCSS"],"sources":["../../../../src/core/components/create-component.tsx"],"sourcesContent":["\"use client\"\n\nimport type { FC, FunctionComponent } from \"react\"\nimport type { AnyString, Dict, Merge } from \"../../utils\"\nimport type { CSSObject, CSSSlotObject } from \"../css\"\nimport type {\n ComponentSlotStyle,\n ComponentStyle,\n StyledOptions,\n System,\n WithoutThemeProps,\n} from \"../system\"\nimport type {\n As,\n DOMElement,\n HTMLStyledProps,\n Component as OriginalComponent,\n} from \"./index.types\"\nimport { Fragment } from \"react\"\nimport {\n createContext,\n cx,\n isArray,\n isFunction,\n isObject,\n isString,\n runIfFn,\n toArray,\n toCamelCase,\n toPascalCase,\n} from \"../../utils\"\nimport { styled, useSystem } from \"../system\"\nimport { chainProps, mergeProps } from \"./props\"\nimport {\n getSlotClassName,\n mergeSlotCSS,\n useComponentSlotStyle,\n useComponentStyle,\n} from \"./use-component-style\"\nimport { getClassName, getDisplayName } from \"./utils\"\n\ntype AsWithFragment = \"fragment\" | As\ntype ClassName = ((system: System) => string) | string\n\ntype Component<\n Y extends AsWithFragment = AsWithFragment,\n M extends object = {},\n> = Y extends \"fragment\"\n ? FunctionComponent<M>\n : OriginalComponent<Exclude<Y, \"fragment\">, M>\n\nexport type ComponentSlotName<\n Y extends ComponentSlotStyle | ComponentStyle = ComponentSlotStyle,\n> = AnyString | Extract<keyof NonNullable<Y[\"base\"]>, string>\n\nexport type ComponentSlot<Y extends string> =\n | [Y, Y]\n | Y\n | { name: string; slot: [Y, Y] | Y }\n\nexport type InitialProps<Y extends Dict = Dict> =\n | ((props: Y) => any)\n | Partial<Y>\nexport type SuperProps<Y extends Dict = Dict> = ((props: Y) => any) | Y\n\nexport type SuperWithoutThemeProps<\n Y extends Dict = Dict,\n M extends Dict = Dict,\n D extends keyof Y = keyof Y,\n> = ((props: WithoutThemeProps<Y, M, D>) => any) | WithoutThemeProps<Y, M, D>\n\nexport interface UseComponentPropsOptions<\n Y extends number | string | symbol = string,\n> {\n className?: ClassName\n withContext?: boolean\n transferProps?: Y[]\n}\n\nexport interface ComponentOptions extends Omit<StyledOptions, \"transferProps\"> {\n className?: ClassName\n shouldStyleProps?: boolean\n}\n\ninterface classNameOptions<Y extends string = string> {\n className?: ClassName\n slot?: ComponentSlot<Y>\n}\n\nexport interface ComponentWithContextOptions<\n Y extends number | string | symbol = string,\n>\n extends ComponentOptions, UseComponentPropsOptions<Y> {}\n\nfunction createProxyComponent<\n Y extends AsWithFragment = \"div\",\n M extends Dict = Dict,\n>(el: FC<M> | Y, { shouldStyleProps, ...options }: ComponentOptions = {}) {\n options.shouldForwardProp ??= isFunction(el)\n shouldStyleProps ??= !isFunction(el)\n\n if (el === \"fragment\") el = Fragment\n\n if (shouldStyleProps || isString(el)) {\n const ProxyComponent = styled(el as As, options)\n\n ProxyComponent.displayName = \"ProxyComponent\"\n\n return ProxyComponent\n } else {\n el.displayName ??= \"ProxyComponent\"\n\n return el as FC<M>\n }\n}\n\nfunction withDisplayName<\n Y extends AsWithFragment = AsWithFragment,\n M extends object = {},\n>(Component: FC<M>, displayName: string) {\n Object.defineProperty(Component, \"name\", { value: displayName })\n Object.defineProperty(Component, \"displayName\", { value: displayName })\n\n return Component as Component<Y, M>\n}\n\nfunction getSlotKey<Y extends string>(slot?: ComponentSlot<Y>) {\n if (!slot) return \"unknown\"\n\n if (isArray(slot) || !isObject(slot)) {\n return toCamelCase(toArray(slot).join(\"-\"))\n } else {\n return toCamelCase(slot.name)\n }\n}\n\nfunction getSlotName<Y extends string>(slot?: ComponentSlot<Y>) {\n if (!slot) return \"\"\n\n if (isArray(slot)) {\n return slot.map((value) => toPascalCase(value as string)).join(\"\")\n } else if (isObject(slot)) {\n return toPascalCase(slot.name)\n } else {\n return toPascalCase(slot as string)\n }\n}\n\nexport function createComponent<\n Y extends object = {},\n M extends ComponentStyle = Dict,\n D extends Dict = Dict,\n>(name: string, style?: M) {\n const defaultClassName = style?.className\n const defaultDisplayName = getDisplayName(name)\n const [ComponentContext, useComponentContext] = createContext<D>({\n name: `${defaultDisplayName}Context`,\n })\n const [PropsContext, usePropsContext] = createContext<Partial<Y>>({\n name: `${defaultDisplayName}PropsContext`,\n strict: false,\n })\n\n function useClassName(name?: string, className?: ClassName) {\n const system = useSystem()\n\n className = runIfFn(className, system)\n className ??= getClassName(name, defaultClassName)(system)\n\n return className\n }\n\n function useComponentProps<H extends Y = Y, R extends keyof H = keyof H>(\n props: H,\n {\n className,\n withContext = true,\n transferProps,\n }: UseComponentPropsOptions<R> = {},\n ) {\n const system = useSystem()\n\n className = runIfFn(className, system)\n className ??= defaultClassName\n className ??= getClassName(name)(system)\n\n const contextProps = usePropsContext() ?? {}\n const mergedProps = withContext\n ? (mergeProps(contextProps, props)() as H)\n : props\n const [, rest] = useComponentStyle(mergedProps, {\n name,\n className,\n style,\n transferProps,\n })\n\n return rest\n }\n\n function component<D extends AsWithFragment = \"div\", H extends Dict = Y>(\n el: D | FC<H>,\n { name, className, ...options }: ComponentOptions = {},\n ) {\n const displayName = getDisplayName(name, defaultDisplayName)\n const ProxyComponent = createProxyComponent(el, options)\n\n return function (\n initialProps?: InitialProps<H>,\n ...superProps: SuperProps<H>[]\n ) {\n return withDisplayName<D, H>((props) => {\n className = useClassName(name, className)\n\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = chainProps<any>(...superProps)()(computedProps)\n\n return (\n <ProxyComponent\n {...mergedProps}\n className={cx(className, mergedProps.className)}\n />\n )\n }, displayName)\n }\n }\n\n function withContext<\n D extends AsWithFragment = \"div\",\n H extends Y = Y,\n R extends keyof H = keyof H,\n >(\n el: D | FC<WithoutThemeProps<H, M, R>>,\n {\n name,\n className,\n withContext,\n transferProps,\n ...options\n }: ComponentWithContextOptions<R> = {},\n ) {\n const displayName = getDisplayName(name, defaultDisplayName)\n const ProxyComponent = createProxyComponent(el, options)\n\n return function (\n initialProps?: InitialProps<H>,\n ...superProps: SuperWithoutThemeProps<H, M, R>[]\n ) {\n return withDisplayName<D, H>((props) => {\n className = useClassName(name, className)\n\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = useComponentProps(computedProps, {\n className,\n withContext,\n transferProps,\n })\n const rest = chainProps<any>(...toArray(superProps))()(mergedProps)\n\n return <ProxyComponent {...rest} />\n }, displayName)\n }\n }\n\n return {\n component,\n ComponentContext,\n PropsContext,\n useComponentContext,\n usePropsContext,\n withContext,\n useComponentProps,\n }\n}\n\nexport function createSlotComponent<\n Y extends object = {},\n M extends ComponentSlotStyle = Dict,\n D extends Dict = Dict,\n>(rootName: string, style?: M) {\n const rootClassName = style?.className\n const rootDisplayName = getDisplayName(rootName)\n const classNameMap = new Map<string, classNameOptions>()\n const [StyleContext, useStyleContext] = createContext<\n CSSSlotObject<ComponentSlotName<M>>\n >({\n name: `${rootDisplayName}StyleContext`,\n })\n const [ComponentContext, useComponentContext] = createContext<D>({\n name: `${rootDisplayName}Context`,\n })\n const [PropsContext, usePropsContext] = createContext<Partial<Y>>({\n name: `${rootDisplayName}PropsContext`,\n strict: false,\n })\n\n function useClassName(\n slot?: ComponentSlot<ComponentSlotName<M>>,\n className?: ClassName,\n ) {\n const system = useSystem()\n\n className = runIfFn(className, system)\n className ??= getSlotClassName(\n rootClassName ?? getClassName(rootName)(system),\n slot,\n )\n\n return className\n }\n\n function useClassNames() {\n const system = useSystem()\n const entries = classNameMap.entries().map(([key, { className, slot }]) => {\n className = runIfFn(className, system)\n className ??= getSlotClassName(\n rootClassName ?? getClassName(rootName)(system),\n slot,\n )\n\n return [key, className]\n })\n\n return Object.fromEntries(\n entries.filter(([_, className]) => className),\n ) as { [key: string]: string }\n }\n\n function useRootComponentProps<\n Y extends Dict = {},\n R extends keyof Y = keyof Y,\n >(\n props: Y,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n {\n className,\n withContext = true,\n transferProps,\n }: UseComponentPropsOptions<R> = {},\n ): [\n CSSSlotObject,\n Merge<WithoutThemeProps<Y, M, R>, { css?: CSSObject | CSSObject[] }>,\n ] {\n className = useClassName(slot, className)\n\n const contextProps = usePropsContext() ?? {}\n const mergedProps = withContext\n ? (mergeProps(contextProps, props)() as Y)\n : props\n const [css, rest] = useComponentSlotStyle(mergedProps, {\n name: rootName,\n className,\n style,\n slot,\n transferProps,\n })\n\n return [css, rest]\n }\n\n function useSlotComponentProps<Y extends Dict = {}>(\n props: Y,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n { className }: Omit<UseComponentPropsOptions, \"transferProps\"> = {},\n ) {\n className = useClassName(slot, className)\n\n const style = useStyleContext()\n\n return {\n ...props,\n className: cx(className, props.className),\n css: mergeSlotCSS(slot, style, props.css),\n }\n }\n\n function component<H extends AsWithFragment = \"div\", R extends Dict = Dict>(\n el: FC<R> | H,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n { name, className, ...options }: ComponentOptions = {},\n ) {\n const ProxyComponent = createProxyComponent(el, options)\n const slotKey = getSlotKey(slot)\n const slotName = getSlotName(slot)\n const displayName = getDisplayName(name, `${rootDisplayName}${slotName}`)\n\n classNameMap.set(slotKey, { className, slot })\n\n return function (\n initialProps?: InitialProps<R>,\n ...superProps: SuperProps<R>[]\n ) {\n return withDisplayName<H, R>((props) => {\n className = useClassName(slot, className)\n\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = chainProps(...superProps)()(computedProps)\n\n return (\n <ProxyComponent\n {...mergedProps}\n className={cx(className, mergedProps.className)}\n />\n )\n }, displayName)\n }\n }\n\n function withProvider<\n H extends AsWithFragment = \"div\",\n R extends Y = Y,\n T extends keyof R = keyof R,\n >(\n el: FC<WithoutThemeProps<R, M, T>> | H,\n slot: ComponentSlot<ComponentSlotName<M>> = \"root\" as ComponentSlot<\n ComponentSlotName<M>\n >,\n {\n name,\n className,\n withContext,\n transferProps,\n ...options\n }: ComponentWithContextOptions<T> = {},\n ) {\n const ProxyComponent = createProxyComponent(el, options)\n const slotKey = getSlotKey(slot)\n const slotName = getSlotName(slot)\n const displayName = getDisplayName(name, `${rootDisplayName}${slotName}`)\n\n classNameMap.set(slotKey, { className, slot })\n\n return function (\n initialProps?: InitialProps<R>,\n ...superProps: SuperWithoutThemeProps<R, M, T>[]\n ) {\n return withDisplayName<H, R>((props) => {\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const [context, mergedProps] = useRootComponentProps(\n computedProps,\n slot,\n {\n className,\n withContext,\n transferProps,\n },\n )\n const rest = chainProps<any>(...superProps)()(mergedProps)\n\n return (\n <StyleContext value={context}>\n <ProxyComponent {...rest} />\n </StyleContext>\n )\n }, displayName)\n }\n }\n\n function withContext<\n H extends AsWithFragment = \"div\",\n R extends Dict = H extends DOMElement ? HTMLStyledProps<H> : Dict,\n >(\n el: FC<R> | H,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n {\n name,\n className,\n withContext,\n ...options\n }: Omit<ComponentWithContextOptions, \"transferProps\"> = {},\n ) {\n const ProxyComponent = createProxyComponent(el, options)\n const slotKey = getSlotKey(slot)\n const slotName = getSlotName(slot)\n const displayName = getDisplayName(name, `${rootDisplayName}${slotName}`)\n\n classNameMap.set(slotKey, { className, slot })\n\n return function (\n initialProps?: InitialProps<R>,\n ...superProps: SuperProps<R>[]\n ) {\n return withDisplayName<H, R>((props) => {\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = useSlotComponentProps(computedProps, slot, {\n className,\n withContext,\n })\n const rest = chainProps(...superProps)()(mergedProps)\n\n return <ProxyComponent {...rest} />\n }, displayName)\n }\n }\n\n return {\n component,\n ComponentContext,\n PropsContext,\n StyleContext,\n useClassNames,\n useComponentContext,\n usePropsContext,\n useStyleContext,\n withContext,\n withProvider,\n useRootComponentProps,\n useSlotComponentProps,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AA8FA,SAAS,qBAGP,IAAe,EAAE,kBAAkB,GAAG,YAA8B,EAAE,EAAE;AACxE,SAAQ,wEAAiC,GAAG;AAC5C,sBAAqB,mDAAY,GAAG;AAEpC,KAAI,OAAO,WAAY,MAAKA;AAE5B,KAAI,oEAA6B,GAAG,EAAE;EACpC,MAAM,iBAAiBC,uBAAO,IAAU,QAAQ;AAEhD,iBAAe,cAAc;AAE7B,SAAO;QACF;AACL,KAAG,g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ACA,GAAG,YACmD,EAAE,EAC1D;EACA,MAAM,iBAAiB,qBAAqB,IAAI,QAAQ;EACxD,MAAM,UAAU,WAAW,KAAK;EAEhC,MAAM,cAAcR,6BAAe,MAAM,GAAG,kBAD3B,YAAY,KAAK,GACuC;AAEzE,eAAa,IAAI,SAAS;GAAE;GAAW;GAAM,CAAC;AAE9C,SAAO,SACL,cACA,GAAG,YACH;AACA,UAAO,iBAAuB,UAAU;IAItC,MAAM,cAAc,wEAHa,aAAa,GAC1C,aAAa,MAAM,GACnBO,yBAAW,gBAAgB,EAAE,EAAE,MAAM,EAAE,EACc,MAAM;KAC7D;KACA;KACD,CAAC;AAGF,WAAO,2CAAC,kBAAe,GAFVC,yBAAW,GAAG,WAAW,EAAE,CAAC,YAAY,GAElB;MAClC,YAAY;;;AAInB,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
@@ -24,6 +24,7 @@ function mergeProps(...args) {
24
24
  return function({ mergeClassName = true, mergeCSS = true, mergeEvent = true, mergeRef = true, mergeStyle = true } = {}) {
25
25
  let result = {};
26
26
  for (const props of args) {
27
+ if ((0, require_utils_index.utils_exports.isUndefined)(props)) continue;
27
28
  for (const key in result) {
28
29
  if (mergeRef && key === "ref") {
29
30
  result[key] = require_ref.mergeRefs(result[key], props[key]);
@@ -1 +1 @@
1
- {"version":3,"file":"props.cjs","names":["conditionProperties","styleProperties","result: Dict","mergeRefs"],"sources":["../../../../src/core/components/props.ts"],"sourcesContent":["import type { Dict, Merge } from \"../../utils\"\nimport { useMemo } from \"react\"\nimport isEqual from \"react-fast-compare\"\nimport {\n cx,\n handlerAll,\n isArray,\n isEmptyObject,\n isFunction,\n isObject,\n isUndefined,\n merge,\n mergeRefs,\n omitObject,\n splitObject,\n} from \"../../utils\"\nimport { conditionProperties, styleProperties } from \"../css\"\n\ntype MergeAll<Y extends Dict[]> = Y extends [infer M]\n ? M\n : Y extends [infer D, ...infer H]\n ? H extends any[]\n ? Merge<D, MergeAll<H>>\n : D\n : never\n\nfunction isEvent(key: string) {\n return /^on[A-Z]/.test(key)\n}\n\nexport const cssProps = new Set<string>([\n ...conditionProperties,\n ...styleProperties,\n])\n\nexport type ShouldForwardProp = (prop: string) => boolean\n\nexport function createShouldForwardProp(\n forwardProps: string[] = [],\n): ShouldForwardProp {\n return function (prop: string): boolean {\n if (forwardProps.includes(prop)) return true\n\n if (prop.startsWith(\"--\")) return false\n\n return !cssProps.has(prop)\n }\n}\n\ninterface MergePropsOptions {\n mergeClassName?: boolean\n mergeCSS?: boolean\n mergeEvent?: boolean\n mergeRef?: boolean\n mergeStyle?: boolean\n}\n\nexport function mergeProps<Y extends Dict[]>(...args: Y) {\n return function ({\n mergeClassName = true,\n mergeCSS = true,\n mergeEvent = true,\n mergeRef = true,\n mergeStyle = true,\n }: MergePropsOptions = {}): MergeAll<Y> {\n let result: Dict = {}\n\n for (const props of args) {\n for (const key in result) {\n if (mergeRef && key === \"ref\") {\n result[key] = mergeRefs(result[key], props[key])\n\n continue\n }\n\n if (\n mergeEvent &&\n isEvent(key) &&\n isFunction(result[key]) &&\n isFunction(props[key])\n ) {\n result[key] = handlerAll(result[key], props[key])\n\n continue\n }\n\n if (mergeClassName && (key === \"className\" || key === \"class\")) {\n result[key] = cx(result[key], props[key])\n\n continue\n }\n\n if (mergeStyle && key === \"style\") {\n result[key] = merge(result[key] ?? {}, props[key] ?? {})\n\n continue\n }\n\n if (mergeCSS && key === \"css\") {\n if (isArray(result[key])) {\n result[key].push(props[key])\n } else {\n result[key] ??= []\n\n result[key] = [result[key], props[key]]\n }\n\n continue\n }\n\n result[key] = !isUndefined(props[key]) ? props[key] : result[key]\n }\n\n for (const key in props) {\n if (isUndefined(result[key])) result[key] = props[key]\n }\n }\n\n return result as any\n }\n}\n\ntype CallbackProps<Y extends Dict = Dict> = (props: Y) => Y\n\ntype PropsOrCallback<Y extends Dict = Dict> = CallbackProps<Y> | Y\n\nexport function chainProps<Y extends Dict = Dict>(\n ...props: PropsOrCallback<Y>[]\n) {\n return function (options: MergePropsOptions = {}) {\n if (!props.length) return (a: Y) => a\n\n if (props.length === 1)\n return function (b: Y) {\n const a = props[0] ?? {}\n const c = isFunction(a) ? a(b) : mergeProps(a, b)(options)\n\n return c\n } as CallbackProps<Y>\n\n return props.reduce(function (a, b) {\n return function (c: Y = {} as Y) {\n const d = isFunction(a) ? a(c) : mergeProps(a, c)(options)\n const f = isFunction(b) ? b(d) : mergeProps(b, d)(options)\n\n return f\n }\n }) as CallbackProps<Y>\n }\n}\n\nexport function isEqualProps<\n Y extends Dict,\n M extends Dict,\n D extends keyof M | keyof Y,\n>(a: Y, b: M, omitKeys: D[] = []) {\n return isEqual(\n omitObject(a, omitKeys as (keyof Y)[]),\n omitObject(b, omitKeys as (keyof M)[]),\n )\n}\n\nexport function useSplitProps<Y extends Dict, M extends keyof Y>(\n props: Y,\n keys: M[] | readonly M[],\n) {\n return useMemo(() => splitObject<Y, M>(props, keys), [props, keys])\n}\n\nexport function extractProps(props: Dict, keys: readonly string[] | string[]) {\n let result: Dict = {}\n\n Object.entries(props).forEach(([key, value]) => {\n if (!cssProps.has(key)) return\n\n if (keys.includes(key)) {\n result = merge(result, { [key]: value })\n } else if (isObject(value)) {\n value = extractProps(value, keys)\n\n if (isEmptyObject(value)) return\n\n result = merge(result, { [key]: value })\n }\n })\n\n return result\n}\n\nexport function useExtractProps(\n props: Dict,\n keys: readonly string[] | string[],\n) {\n return useMemo(() => extractProps(props, keys), [props, keys])\n}\n"],"mappings":";;;;;;;;;;;AA0BA,SAAS,QAAQ,KAAa;AAC5B,QAAO,WAAW,KAAK,IAAI;;AAG7B,MAAa,WAAW,IAAI,IAAY,CACtC,GAAGA,wCACH,GAAGC,+BACJ,CAAC;AAIF,SAAgB,wBACd,eAAyB,EAAE,EACR;AACnB,QAAO,SAAU,MAAuB;AACtC,MAAI,aAAa,SAAS,KAAK,CAAE,QAAO;AAExC,MAAI,KAAK,WAAW,KAAK,CAA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AE,GAAG,EAAE,EAAE,GAAG,WAAW,GAAG,EAAE,CAAC,QAAQ;;AAK9D,SAAO,MAAM,OAAO,SAAU,GAAG,GAAG;AAClC,UAAO,SAAU,IAAO,EAAE,EAAO;IAC/B,MAAM,sDAAe,EAAE,GAAG,EAAE,EAAE,GAAG,WAAW,GAAG,EAAE,CAAC,QAAQ;AAG1D,6DAFqB,EAAE,GAAG,EAAE,EAAE,GAAG,WAAW,GAAG,EAAE,CAAC,QAAQ;;IAI5D;;;AAIN,SAAgB,aAId,GAAM,GAAM,WAAgB,EAAE,EAAE;AAChC,0FACa,GAAG,SAAwB,oDAC3B,GAAG,SAAwB,CACvC;;AAGH,SAAgB,cACd,OACA,MACA;AACA,oFAAuC,OAAO,KAAK,EAAE,CAAC,OAAO,KAAK,CAAC;;AAGrE,SAAgB,aAAa,OAAa,MAAoC;CAC5E,IAAID,SAAe,EAAE;AAErB,QAAO,QAAQ,MAAM,CAAC,SAAS,CAAC,KAAK,WAAW;AAC9C,MAAI,CAAC,SAAS,IAAI,IAAI,CAAE;AAExB,MAAI,KAAK,SAAS,IAAI,CACpB,uDAAe,QAAQ,GAAG,MAAM,OAAO,CAAC;2DACtB,MAAM,EAAE;AAC1B,WAAQ,aAAa,OAAO,KAAK;AAEjC,4DAAkB,MAAM,CAAE;AAE1B,yDAAe,QAAQ,GAAG,MAAM,OAAO,CAAC;;GAE1C;AAEF,QAAO;;AAGT,SAAgB,gBACd,OACA,MACA;AACA,iCAAqB,aAAa,OAAO,KAAK,EAAE,CAAC,OAAO,KAAK,CAAC"}
1
+ {"version":3,"file":"props.cjs","names":["conditionProperties","styleProperties","result: Dict","mergeRefs"],"sources":["../../../../src/core/components/props.ts"],"sourcesContent":["import type { Dict, Merge } from \"../../utils\"\nimport { useMemo } from \"react\"\nimport isEqual from \"react-fast-compare\"\nimport {\n cx,\n handlerAll,\n isArray,\n isEmptyObject,\n isFunction,\n isObject,\n isUndefined,\n merge,\n mergeRefs,\n omitObject,\n splitObject,\n} from \"../../utils\"\nimport { conditionProperties, styleProperties } from \"../css\"\n\ntype Optionalize<Y> = [Extract<Y, undefined>] extends [never]\n ? Y\n : Partial<Exclude<Y, undefined>>\n\ntype MergeAll<Y extends (Dict | undefined)[]> = Y extends [infer M]\n ? Optionalize<M>\n : Y extends [infer D, ...infer H]\n ? H extends (Dict | undefined)[]\n ? Merge<Optionalize<D>, MergeAll<H>>\n : Optionalize<D>\n : never\n\nfunction isEvent(key: string) {\n return /^on[A-Z]/.test(key)\n}\n\nexport const cssProps = new Set<string>([\n ...conditionProperties,\n ...styleProperties,\n])\n\nexport type ShouldForwardProp = (prop: string) => boolean\n\nexport function createShouldForwardProp(\n forwardProps: string[] = [],\n): ShouldForwardProp {\n return function (prop: string): boolean {\n if (forwardProps.includes(prop)) return true\n\n if (prop.startsWith(\"--\")) return false\n\n return !cssProps.has(prop)\n }\n}\n\ninterface MergePropsOptions {\n mergeClassName?: boolean\n mergeCSS?: boolean\n mergeEvent?: boolean\n mergeRef?: boolean\n mergeStyle?: boolean\n}\n\nexport function mergeProps<Y extends Dict>(\n ...args: Y[]\n): (options?: MergePropsOptions) => Y\nexport function mergeProps<Y extends (Dict | undefined)[]>(\n ...args: Y\n): (options?: MergePropsOptions) => MergeAll<Y>\nexport function mergeProps(...args: (Dict | undefined)[]) {\n return function ({\n mergeClassName = true,\n mergeCSS = true,\n mergeEvent = true,\n mergeRef = true,\n mergeStyle = true,\n }: MergePropsOptions = {}) {\n let result: Dict = {}\n\n for (const props of args) {\n if (isUndefined(props)) continue\n\n for (const key in result) {\n if (mergeRef && key === \"ref\") {\n result[key] = mergeRefs(result[key], props[key])\n\n continue\n }\n\n if (\n mergeEvent &&\n isEvent(key) &&\n isFunction(result[key]) &&\n isFunction(props[key])\n ) {\n result[key] = handlerAll(result[key], props[key])\n\n continue\n }\n\n if (mergeClassName && (key === \"className\" || key === \"class\")) {\n result[key] = cx(result[key], props[key])\n\n continue\n }\n\n if (mergeStyle && key === \"style\") {\n result[key] = merge(result[key] ?? {}, props[key] ?? {})\n\n continue\n }\n\n if (mergeCSS && key === \"css\") {\n if (isArray(result[key])) {\n result[key].push(props[key])\n } else {\n result[key] ??= []\n\n result[key] = [result[key], props[key]]\n }\n\n continue\n }\n\n result[key] = !isUndefined(props[key]) ? props[key] : result[key]\n }\n\n for (const key in props) {\n if (isUndefined(result[key])) result[key] = props[key]\n }\n }\n\n return result as any\n }\n}\n\ntype CallbackProps<Y extends Dict = Dict> = (props: Y) => Y\n\ntype PropsOrCallback<Y extends Dict = Dict> = CallbackProps<Y> | Y\n\nexport function chainProps<Y extends Dict = Dict>(\n ...props: PropsOrCallback<Y>[]\n) {\n return function (options: MergePropsOptions = {}) {\n if (!props.length) return (a: Y) => a\n\n if (props.length === 1)\n return function (b: Y) {\n const a = props[0] ?? {}\n const c = isFunction(a) ? a(b) : mergeProps(a, b)(options)\n\n return c\n } as CallbackProps<Y>\n\n return props.reduce(function (a, b) {\n return function (c: Y = {} as Y) {\n const d = isFunction(a) ? a(c) : mergeProps(a, c)(options)\n const f = isFunction(b) ? b(d) : mergeProps(b, d)(options)\n\n return f\n }\n }) as CallbackProps<Y>\n }\n}\n\nexport function isEqualProps<\n Y extends Dict,\n M extends Dict,\n D extends keyof M | keyof Y,\n>(a: Y, b: M, omitKeys: D[] = []) {\n return isEqual(\n omitObject(a, omitKeys as (keyof Y)[]),\n omitObject(b, omitKeys as (keyof M)[]),\n )\n}\n\nexport function useSplitProps<Y extends Dict, M extends keyof Y>(\n props: Y,\n keys: M[] | readonly M[],\n) {\n return useMemo(() => splitObject<Y, M>(props, keys), [props, keys])\n}\n\nexport function extractProps(props: Dict, keys: readonly string[] | string[]) {\n let result: Dict = {}\n\n Object.entries(props).forEach(([key, value]) => {\n if (!cssProps.has(key)) return\n\n if (keys.includes(key)) {\n result = merge(result, { [key]: value })\n } else if (isObject(value)) {\n value = extractProps(value, keys)\n\n if (isEmptyObject(value)) return\n\n result = merge(result, { [key]: value })\n }\n })\n\n return result\n}\n\nexport function useExtractProps(\n props: Dict,\n keys: readonly string[] | string[],\n) {\n return useMemo(() => extractProps(props, keys), [props, keys])\n}\n"],"mappings":";;;;;;;;;;;AA8BA,SAAS,QAAQ,KAAa;AAC5B,QAAO,WAAW,KAAK,IAAI;;AAG7B,MAAa,WAAW,IAAI,IAAY,CACtC,GAAGA,wCACH,GAAGC,+BACJ,CAAC;AAIF,SAAgB,wBACd,eAAyB,EAAE,EACR;AACnB,QAAO,SAAU,MAAuB;AACtC,MAAI,aAAa,SAAS,KAAK,CAAE,QAAO;AAExC,MAAI,KAAK,WAAW,KAAK,CAAE,QAAO;AAElC,SAAO,CAAC,SAAS,IAAI,KAAK;;;AAkB9B,SAAgB,WAAW,GAAG,MAA4B;AACxD,QAAO,SAAU,EACf,iBAAiB,MACjB,WAAW,MACX,aAAa,MACb,WAAW,MACX,aAAa,SACQ,EAAE,EAAE;EACzB,IAAIC,SAAe,EAAE;AAErB,OAAK,MAAM,SAAS,MAAM;AACxB,0DAAgB,MAAM,CAAE;AAExB,QAAK,MAAM,OAAO,QAAQ;AACxB,QAAI,YAAY,QAAQ,OAAO;AAC7B,YAAO,OAAOC,sBAAU,OAAO,MAAM,MAAM,KAAK;AAEhD;;AAGF,QACE,cACA,QAAQ,IAAI,sDACD,OAAO,KAAK,sDACZ,MAAM,KAAK,EACtB;AACA,YAAO,yDAAkB,OAAO,MAAM,MAAM,KAAK;AAEjD;;AAGF,QAAI,mBAAmB,QAAQ,eAAe,QAAQ,UAAU;AAC9D,YAAO,iDAAU,OAAO,MAAM,MAAM,KAAK;AAEzC;;AAGF,QAAI,cAAc,QAAQ,SAAS;AACjC,YAAO,oDAAa,OAAO,QAAQ,EAAE,EAAE,MAAM,QAAQ,EAAE,CAAC;AAExD;;AAGF,QAAI,YAAY,QAAQ,OAAO;AAC7B,wDAAY,OAAO,KAAK,CACtB,QAAO,KAAK,KAAK,MAAM,KAAK;UACvB;AACL,aAAO,SAAS,EAAE;AAElB,aAAO,OAAO,C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Q,GAAG,MAAM,OAAO,CAAC;;GAE1C;AAEF,QAAO;;AAGT,SAAgB,gBACd,OACA,MACA;AACA,iCAAqB,aAAa,OAAO,KAAK,EAAE,CAAC,OAAO,KAAK,CAAC"}
@@ -144,6 +144,7 @@ const pseudoClassSelectors = Object.values(pseudoClasses);
144
144
  const groupAttributes = {
145
145
  _groupAccept: toGroup(attributes._accept),
146
146
  _groupActivedescendant: toGroup(pseudoClasses._activedescendant),
147
+ _groupAnimated: toGroup(attributes._animated),
147
148
  _groupBlank: toGroup(pseudoClasses._blank),
148
149
  _groupChecked: toGroup(pseudoClasses._checked),
149
150
  _groupCollapsed: toGroup(attributes._collapsed),
@@ -183,6 +184,7 @@ const groupAttributeSelectors = Object.values(groupAttributes);
183
184
  const peerAttributes = {
184
185
  _peer: toPeer(),
185
186
  _peerAccept: toPeer(attributes._accept),
187
+ _peerAnimated: toPeer(attributes._animated),
186
188
  _peerBlank: toPeer(pseudoClasses._blank),
187
189
  _peerChecked: toPeer(pseudoClasses._checked),
188
190
  _peerCollapsed: toPeer(attributes._collapsed),
@@ -1 +1 @@
1
- {"version":3,"file":"conditions.cjs","names":[],"sources":["../../../../src/core/css/conditions.ts"],"sourcesContent":["import type { Length } from \"../../utils\"\nimport type { DOMElement } from \"../components\"\nimport type { CSSObject } from \"./index.types\"\n\ntype ReplaceSelector<\n Y extends string[],\n M extends string,\n D extends string,\n> = Y extends [infer H extends string, ...infer R extends string[]]\n ? `${H}${M extends `&${infer T}` ? `${T} ${D}` : `${M} ${D}`}${Length<R> extends 0 ? \"\" : `, `}${ReplaceSelector<R, M, D>}`\n : \"\"\n\nconst toGroup = <Y extends string>(selector: Y) =>\n [\"[role=group]\", \"[data-group]\", \".group\"]\n .map((prefix) => `${prefix}${selector.slice(1)} &`)\n .join(\", \") as ReplaceSelector<\n [\"[role=group]\", \"[data-group]\", \".group\"],\n Y,\n \"&\"\n >\n\nconst toPeer = <Y extends string>(selector?: Y) =>\n [\n ...[\"[data-peer]\", \".peer\"].flatMap((prefix) => [\n selector\n ? `&:has(~ ${prefix}${selector.slice(1)})`\n : `&:has(~ ${prefix})`,\n selector ? `${prefix}${selector.slice(1)} ~ &` : `${prefix} ~ &`,\n ]),\n ...(selector\n ? [\"[data-peer]\", \".peer\"].flatMap((prefix) => [\n `&:has(~ ${prefix} *${selector.slice(1)})`,\n `${prefix}:has(*${selector.slice(1)}) ~ &`,\n ])\n : []),\n ].join(\", \") as ReplaceSelector<[\"[data-peer]\", \".peer\"], Y, \"~ &\">\n\nexport type AnySelector =\n | `${string}${\" \" | \"#\" | \"*\" | \"+\" | \",\" | \".\" | \":\" | \">\" | \"@\" | \"[\" | \"]\" | \"~\"}${string}`\n | DOMElement\n\nexport const attributes = {\n /**\n * The CSS `&[data-inactive]` attribute selector.\n */\n _inactive: \"&[data-inactive]\",\n /**\n * The CSS `&[data-accept]` attribute selector.\n */\n _accept: \"&[data-accept]\",\n /**\n * The CSS `&[data-animated]` attribute selector.\n */\n _animated: \"&[data-animated]\",\n /**\n * The CSS `&[data-between]` attribute selector.\n */\n _between: \"&[data-between]\",\n /**\n * The CSS `&:is([data-center], [data-group-center])` attribute selector.\n */\n _center: \"&:is([data-center], [data-group-center])\",\n /**\n * The CSS `&:is([data-collapsed], :not([data-expanded]), [aria-expanded=false])` attribute selector.\n */\n _collapsed:\n \"&:is([data-collapsed], :not([data-expanded]), [aria-expanded=false])\",\n /**\n * The CSS `&[data-complete]` attribute selector.\n */\n _complete: \"&[data-complete]\",\n /**\n * The CSS `&:is([aria-current], [data-current]):not([aria-current='false'])` attribute selector.\n */\n _current: \"&:is([aria-current], [data-current]):not([aria-current='false'])\",\n /**\n * Styles for when `data-mode` is applied to any parent of this component or element.\n */\n _dark:\n \".dark &:not([data-mode]), [data-mode=dark] &:not([data-mode]), &[data-mode=dark]\",\n /**\n * The CSS `&:is([data-end], [data-group-end])` attribute selector.\n */\n _end: \"&:is([data-end], [data-group-end])\",\n /**\n * The CSS `&:is([data-expanded], [aria-expanded=true])` attribute selector.\n */\n _expanded: \"&:is([data-expanded], [aria-expanded=true])\",\n /**\n * The CSS `&[data-fallback]` attribute selector.\n */\n _fallback: \"&[data-fallback]\",\n /**\n * The CSS `&[data-filled]` attribute selector.\n */\n _filled: \"&[data-filled]\",\n /**\n * The CSS `&:is([data-grabbed], [aria-grabbed=true])` attribute selector.\n */\n _grabbed: \"&:is([data-grabbed], [aria-grabbed=true])\",\n /**\n * The CSS `&:is([role=grid], [data-grid])` attribute selector.\n */\n _grid: \"&:is([role=grid], [data-grid])\",\n /**\n * The CSS `&:is(:has(> [role=group]), :has(> [data-group]), :has(> .group))` attribute selector.\n */\n _hasGroup: \"&:is(:has(> [role=group]), :has(> [data-group]), :has(> .group))\",\n /**\n * The CSS `&:has(> [data-icon])` attribute selector.\n */\n _hasIcon: \"&:has(> [data-icon])\",\n /**\n * The CSS `&[data-idle]` attribute selector.\n */\n _idle: \"&[data-idle]\",\n /**\n * The CSS `&[data-incomplete]` attribute selector.\n */\n _incomplete: \"&[data-incomplete]\",\n /**\n * Styles for when `data-mode` is applied to any parent of this component or element.\n */\n _light:\n \".light &:not([data-mode]), [data-mode=light] &:not([data-mode]), &[data-mode=light]\",\n /**\n * The CSS `&[data-loaded]` attribute selector.\n */\n _loaded: \"&[data-loaded]\",\n /**\n * The CSS `&:is([data-loading], [aria-busy=true])` attribute selector.\n */\n _loading: \"&:is([data-loading], [aria-busy=true])\",\n /**\n * The CSS `&[dir=ltr]` attribute selector.\n */\n _ltr: \"[dir=ltr] &\",\n /**\n * The CSS `&[hidden]` attribute selector.\n */\n _nativeHidden: \"&[hidden]\",\n /**\n * The CSS `&[data-not-allowed]` attribute selector.\n */\n _notAllowed: \"&[data-not-allowed]\",\n /**\n * The CSS `&[aria-current='false']` attribute selector.\n */\n _notCurrent: \"&:not([aria-current], [data-current]), &[aria-current='false']\",\n /**\n * The CSS `&:not([data-fallback])` attribute selector.\n */\n _notFallback: \"&:not([data-fallback])\",\n /**\n * The CSS `&:not(:has(> [role=group]), :has(> [data-group]), :has(> .group))` attribute selector.\n */\n _notHasGroup:\n \"&:not(:has(> [role=group]), :has(> [data-group]), :has(> .group))\",\n /**\n * The CSS `&:not([data-selected]):not([aria-selected=true])` attribute selector.\n */\n _notSelected: \"&:not([data-selected]):not([aria-selected=true])\",\n /**\n * The CSS `&[data-numeric]` attribute selector.\n */\n _numeric: \"&[data-numeric]\",\n /**\n * The CSS `&:is([open], [data-open])` attribute selector.\n */\n _open: \"&:is([open], [data-open])\",\n /**\n * The CSS `&:is([data-pressed], [aria-pressed=true])` attribute selector.\n */\n _pressed: \"&:is([data-pressed], [aria-pressed=true])\",\n /**\n * The CSS `&:is([data-range])` attribute selector.\n */\n _range: \"&:is([data-range])\",\n /**\n * The CSS `&[data-reject]` attribute selector.\n */\n _reject: \"&[data-reject]\",\n /**\n * The CSS `& .ui-ripple` attribute selector.\n */\n _ripple: \"& .ui-ripple\",\n /**\n * The CSS `&[dir=rtl]` attribute selector.\n */\n _rtl: \"[dir=rtl] &\",\n /**\n * The CSS `&:is([data-start], [data-group-start])` attribute selector.\n */\n _start: \"&:is([data-start], [data-group-start])\",\n /**\n * The CSS `&:is([data-selected], [aria-selected=true])` attribute selector.\n */\n _selected: \"&:is([data-selected], [aria-selected=true])\",\n /**\n * The CSS `&:is([hidden], [data-hidden])` attribute selector.\n */\n _hidden: \"&:is([hidden], [data-hidden])\",\n /**\n * The CSS `&[data-never]` attribute selector.\n */\n _never: \"&[data-never]\",\n} as const\n\nexport type Attributes = typeof attributes\nexport type AttributeProperty = keyof Attributes\nexport type AttributeProps = {\n [K in AttributeProperty]?: CSSObject\n}\n\nexport const attributeProperties = Object.keys(\n attributes,\n) as AttributeProperty[]\nexport const attributeSelectors = Object.values(attributes)\n\nexport const pseudoElements = {\n /**\n * The CSS `&::after` pseudo-element.\n */\n _after: \"&::after\",\n /**\n * The CSS `&::backdrop` pseudo-element.\n */\n _backdrop: \"&::backdrop\",\n /**\n * The CSS `&::before` pseudo-element.\n */\n _before: \"&::before\",\n /**\n * The CSS `&::cue` pseudo-element.\n */\n _cue: \"&::cue\",\n /**\n * The CSS `&::cue-region` pseudo-element.\n */\n _cueRegion: \"&::cue-region\",\n /**\n * The CSS `&::details-content` pseudo-element.\n */\n _detailsContent: \"&::details-content\",\n /**\n * The CSS `&::file-selector-button` pseudo-element.\n */\n _fileSelector: \"&::file-selector-button\",\n /**\n * The CSS `&::first-letter` pseudo-element.\n */\n _firstLetter: \"&::first-letter\",\n /**\n * The CSS `&::first-line` pseudo-element.\n */\n _firstLine: \"&::first-line\",\n /**\n * The CSS `&::marker` pseudo-element.\n */\n _marker: \"&::marker\",\n /**\n * The CSS `&::placeholder, &[data-placeholder]` pseudo-element.\n */\n _placeholder: \"&::placeholder, &[data-placeholder]\",\n /**\n * The CSS `&::-webkit-scrollbar, &[data-scrollbar]` pseudo-element.\n */\n _scrollbar: \"&::-webkit-scrollbar, &[data-scrollbar]\",\n /**\n * The CSS `&::-webkit-scrollbar-button` pseudo-element.\n */\n _scrollbarButton: \"&::-webkit-scrollbar-button\",\n /**\n * The CSS `&::-webkit-scrollbar-corner` pseudo-element.\n */\n _scrollbarCorner: \"&::-webkit-scrollbar-corner\",\n /**\n * The CSS `&::-webkit-scrollbar-thumb` pseudo-element.\n */\n _scrollbarThumb: \"&::-webkit-scrollbar-thumb\",\n /**\n * The CSS `&::-webkit-scrollbar-track` pseudo-element.\n */\n _scrollbarTrack: \"&::-webkit-scrollbar-track\",\n /**\n * The CSS `&::-webkit-scrollbar-track-piece` pseudo-element.\n */\n _scrollbarTrackPiece: \"&::-webkit-scrollbar-track-piece\",\n /**\n * The CSS `&::selection` pseudo-element.\n */\n _selection: \"&::selection\",\n} as const\n\nexport type PseudoElements = typeof pseudoElements\nexport type PseudoElementProperty = keyof PseudoElements\nexport type PseudoElementProps = {\n [K in PseudoElementProperty]?: CSSObject\n}\n\nexport const pseudoElementProperties = Object.keys(\n pseudoElements,\n) as PseudoElementProperty[]\nexport const pseudoElementSelectors = Object.values(pseudoElements)\n\nexport const pseudoClasses = {\n /**\n * The CSS `&:is([data-activedescendant])` pseudo-class.\n */\n _activedescendant: \"&:is([data-activedescendant])\",\n /**\n * The CSS `:any-link` pseudo-class.\n */\n _anyLink: \"&:is(:any-link, [data-any-link])\",\n /**\n * The CSS `&:autofill` pseudo-class.\n */\n _autofill: \"&:autofill\",\n /**\n * The CSS `&:is(:blank, [data-blank])` pseudo-class.\n */\n _blank: \"&:is(:blank, [data-blank])\",\n /**\n * The CSS `&:is(:checked, [data-checked], [aria-checked=true])` pseudo-class.\n */\n _checked: \"&:is(:checked, [data-checked], [aria-checked=true])\",\n /**\n * The CSS `& > *` child combinator selector.\n */\n _child: \"& > *\",\n /**\n * The CSS `& > [data-content]` child combinator attribute selector.\n */\n _content: \"& > [data-content]\",\n /**\n * The CSS `&:default` pseudo-class.\n */\n _default: \"&:default\",\n /**\n * The CSS `&:empty` pseudo-class.\n */\n _empty: \"&:empty\",\n /**\n * The CSS `&:is(:enabled, [data-enabled])` pseudo-class.\n */\n _enabled: \"&:is(:enabled, [data-enabled])\",\n /**\n * The CSS `&:nth-of-type(even)` pseudo-class.\n */\n _even: \"&:nth-of-type(even)\",\n /**\n * The CSS `&:first-of-type` pseudo-class.\n */\n _first: \"&:first-of-type\",\n /**\n * The CSS `& > *:first-child` pseudo-class.\n */\n _firstChild: \"& > *:first-child\",\n /**\n * The CSS `&:not(:focus-within, [data-focus-within])` pseudo-class.\n */\n _focusWithin: \"&:not(:focus-within, [data-focus-within])\",\n /**\n * The CSS `&:fullscreen` pseudo-class.\n */\n _fullScreen: \"&:fullscreen\",\n /**\n * The CSS `&:is([data-orientation=horizontal], [aria-orientation=horizontal])` pseudo-class.\n */\n _horizontal:\n \"&:is([data-orientation=horizontal], [aria-orientation=horizontal])\",\n /**\n * The CSS `&:where(svg:not([data-loading])), & > [data-icon]` pseudo-class.\n */\n _icon: \"&:where(svg:not([data-loading])), & > [data-icon]\",\n /**\n * The CSS `&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed])` pseudo-class.\n */\n _indeterminate:\n \"&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed])\",\n /**\n * The CSS `& > [data-indicator]` pseudo-class.\n */\n _indicator: \"& > [data-indicator]\",\n /**\n * The CSS `&:is(:in-range, [data-in-range])` pseudo-class.\n */\n _inRange: \"&:is(:in-range, [data-in-range])\",\n /**\n * The CSS `&:last-of-type` pseudo-class.\n */\n _last: \"&:last-of-type\",\n /**\n * The CSS `& > *:last-child` pseudo-class.\n */\n _lastChild: \"& > *:last-child\",\n /**\n * The CSS `&:is(:link, [data-link])` pseudo-class.\n */\n _link: \"&:is(:link, [data-link])\",\n /**\n * The CSS `&:modal` pseudo-class.\n */\n _modal: \"&:modal\",\n /**\n * The CSS `&:active` pseudo-class.\n */\n _nativeActive: \"&:active\",\n /**\n * The CSS `&:checked` pseudo-class.\n */\n _nativeChecked: \"&:checked\",\n /**\n * The CSS `&:is(disabled, [disabled])` pseudo-class.\n */\n _nativeDisabled: \"&:is(disabled, [disabled])\",\n /**\n * The CSS `&:focus` pseudo-class.\n */\n _nativeFocus: \"&:focus\",\n /**\n * The CSS `&:focus-visible` pseudo-class.\n */\n _nativeFocusVisible: \"&:focus-visible\",\n /**\n * The CSS `&:focus-within` pseudo-class.\n */\n _nativeFocusWithin: \"&:focus-within\",\n /**\n * The CSS `&:hover` pseudo-class.\n */\n _nativeHover: \"&:hover\",\n /**\n * The CSS `&:is([readonly], [aria-readonly=true])` pseudo-class.\n */\n _nativeReadOnly: \"&:is([readonly], [aria-readonly=true])\",\n /**\n * The CSS `&:target` pseudo-class.\n */\n _nativeTarget: \"&:target\",\n /**\n * The CSS `&:valid` pseudo-class.\n */\n _nativeValid: \"&:valid\",\n /**\n * The CSS `&:not(:checked):not([data-checked]):not([aria-checked=true])` pseudo-class.\n */\n _notChecked: \"&:not(:checked):not([data-checked]):not([aria-checked=true])\",\n /**\n * The CSS `&:not(:empty)` pseudo-class.\n */\n _notEmpty: \"&:not(:empty)\",\n /**\n * The CSS `&:not(:first-of-type)` pseudo-class.\n */\n _notFirst: \"&:not(:first-of-type)\",\n /**\n * The CSS `& > *:not(:first-child)` pseudo-class.\n */\n _notFirstChild: \"& > *:not(:first-child)\",\n /**\n * The CSS `&:not(:last-of-type)` pseudo-class.\n */\n _notLast: \"&:not(:last-of-type)\",\n /**\n * The CSS `& > *:not(:last-child)` pseudo-class.\n */\n _notLastChild: \"& > *:not(:last-child)\",\n /**\n * The CSS `&:not(:target)` pseudo-class.\n */\n _notTarget: \"&:not(:target)\",\n /**\n * The CSS `&:nth-of-type(odd)` pseudo-class.\n */\n _odd: \"&:nth-of-type(odd)\",\n /**\n * The CSS `&:only-of-type` pseudo-class.\n */\n _only: \"&:only-of-type\",\n /**\n * The CSS `&:only-child` pseudo-class.\n */\n _onlyChild: \"&:only-child\",\n /**\n * The CSS `&:is(:optional, [data-optional])` pseudo-class.\n */\n _optional: \"&:is(:optional, [data-optional])\",\n /**\n * The CSS `&:is(:out-of-range, [data-out-of-range])` pseudo-class.\n */\n _outRange: \"&:is(:out-of-range, [data-out-of-range])\",\n /**\n * The CSS `&:is(:paused, [data-paused])` pseudo-class.\n */\n _paused: \"&:is(:paused, [data-paused])\",\n /**\n * The CSS `&:picture-in-picture` pseudo-class.\n */\n _picture: \"&:picture-in-picture\",\n /**\n * The CSS `&:placeholder-shown` pseudo-class.\n */\n _placeholderShown: \"&:placeholder-shown\",\n /**\n * The CSS `&:is(:playing, [data-playing])` pseudo-class.\n */\n _playing: \"&:is(:playing, [data-playing])\",\n /**\n * The CSS `&:popover-open` pseudo-class.\n */\n _popoverOpen: \"&:popover-open\",\n /**\n * The CSS `&:is(:read-write, [data-read-write])` pseudo-class.\n */\n _readWrite: \"&:is(:read-write, [data-read-write])\",\n /**\n * The CSS `&:is(:required, [required])` pseudo-class.\n */\n _required: \"&:is(:required, [required])\",\n /**\n * The CSS `&:is(:target, [data-target])` pseudo-class.\n */\n _target: \"&:is(:target, [data-target])\",\n /**\n * The CSS `&:is(:user-invalid, [data-user-invalid])` pseudo-class.\n */\n _userInvalid: \"&:is(:user-invalid, [data-user-invalid])\",\n /**\n * The CSS `&:is(:valid, [data-valid])` pseudo-class.\n */\n _valid: \"&:is(:valid, [data-valid])\",\n /**\n * The CSS `&:is([data-orientation=vertical], [aria-orientation=vertical])` pseudo-class.\n */\n _vertical: \"&:is([data-orientation=vertical], [aria-orientation=vertical])\",\n /**\n * The CSS `&:visited` pseudo-class.\n */\n _visited: \"&:visited\",\n /**\n * The CSS `&:is(:hover, [data-hover])` pseudo-class.\n */\n _hover:\n \"&:is(:hover, [data-hover]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])\",\n /**\n * The CSS `&:is(:active, [data-active])` pseudo-class.\n */\n _active:\n \"&:is(:active, [data-active]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])\",\n /**\n * The CSS `&:is(:focus, [data-focus])` pseudo-class.\n */\n _focus: \"&:is(:focus, [data-focus])\",\n /**\n * The CSS `&:is(:focus-visible, [data-focus-visible])` pseudo-class.\n */\n _focusVisible: \"&:is(:focus-visible, [data-focus-visible])\",\n /**\n * The CSS `&:is([data-invalid], [aria-invalid=true])` attribute selector.\n */\n _invalid: \"&:is([data-invalid], [aria-invalid=true])\",\n /**\n * The CSS `&:is([readonly], [data-readonly], [aria-readonly=true])` pseudo-class.\n */\n _readOnly: \"&:is([readonly], [data-readonly], [aria-readonly=true])\",\n /**\n * The CSS `&:is(:disabled, [disabled], [data-disabled])` pseudo-class.\n */\n _disabled: \"&:is(:disabled, [disabled], [data-disabled])\",\n} as const\n\nexport type PseudoClasses = typeof pseudoClasses\nexport type PseudoClassProperty = keyof PseudoClasses\nexport type PseudoClassProps = {\n [K in PseudoClassProperty]?: CSSObject\n}\n\nexport const pseudoClassProperties = Object.keys(\n pseudoClasses,\n) as PseudoClassProperty[]\nexport const pseudoClassSelectors = Object.values(pseudoClasses)\n\nexport const groupAttributes = {\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is accepted.\n */\n _groupAccept: toGroup(attributes._accept),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is activedescendant.\n */\n _groupActivedescendant: toGroup(pseudoClasses._activedescendant),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is blank.\n */\n _groupBlank: toGroup(pseudoClasses._blank),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is checked.\n */\n _groupChecked: toGroup(pseudoClasses._checked),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is collapsed.\n */\n _groupCollapsed: toGroup(attributes._collapsed),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is complete.\n */\n _groupComplete: toGroup(attributes._complete),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is current.\n */\n _groupCurrent: toGroup(attributes._current),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is enabled.\n */\n _groupEnabled: toGroup(pseudoClasses._enabled),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is expanded.\n */\n _groupExpanded: toGroup(attributes._expanded),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is focus-within.\n */\n _groupFocusWithin: toGroup(pseudoClasses._focusWithin),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is grabbed.\n */\n _groupGrabbed: toGroup(attributes._grabbed),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is horizontal.\n */\n _groupHorizontal: toGroup(pseudoClasses._horizontal),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is idle.\n */\n _groupIdle: toGroup(attributes._idle),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is incomplete.\n */\n _groupIncomplete: toGroup(attributes._incomplete),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is loaded.\n */\n _groupLoaded: toGroup(attributes._loaded),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is loading.\n */\n _groupLoading: toGroup(attributes._loading),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is open.\n */\n _groupOpen: toGroup(attributes._open),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is optional.\n */\n _groupOptional: toGroup(pseudoClasses._optional),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` has a placeholder shown.\n */\n _groupPlaceholderShown: toGroup(pseudoClasses._placeholderShown),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is pressed.\n */\n _groupPressed: toGroup(attributes._pressed),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is range.\n */\n _groupRange: toGroup(attributes._range),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is read-write.\n */\n _groupReadWrite: toGroup(pseudoClasses._readWrite),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is rejected.\n */\n _groupReject: toGroup(attributes._reject),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is required.\n */\n _groupRequired: toGroup(pseudoClasses._required),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is user-invalid.\n */\n _groupUserInvalid: toGroup(pseudoClasses._userInvalid),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is valid.\n */\n _groupValid: toGroup(pseudoClasses._valid),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is vertical.\n */\n _groupVertical: toGroup(pseudoClasses._vertical),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is hovered.\n */\n _groupHover: toGroup(pseudoClasses._hover),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is active.\n */\n _groupActive: toGroup(pseudoClasses._active),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is focused.\n */\n _groupFocus: toGroup(pseudoClasses._focus),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is focused-visible.\n */\n _groupFocusVisible: toGroup(pseudoClasses._focusVisible),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is selected.\n */\n _groupSelected: toGroup(attributes._selected),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is invalid.\n */\n _groupInvalid: toGroup(pseudoClasses._invalid),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is read-only.\n */\n _groupReadOnly: toGroup(pseudoClasses._readOnly),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is disabled.\n */\n _groupDisabled: toGroup(pseudoClasses._disabled),\n} as const\n\nexport type GroupAttributes = typeof groupAttributes\nexport type GroupAttributeProperty = keyof GroupAttributes\nexport type GroupAttributeProps = {\n [K in GroupAttributeProperty]?: CSSObject\n}\n\nexport const groupAttributeProperties = Object.keys(\n groupAttributes,\n) as GroupAttributeProperty[]\nexport const groupAttributeSelectors = Object.values(groupAttributes)\n\nexport const peerAttributes = {\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` exists.\n */\n _peer: toPeer(),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is accepted.\n */\n _peerAccept: toPeer(attributes._accept),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is blank.\n */\n _peerBlank: toPeer(pseudoClasses._blank),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is checked.\n */\n _peerChecked: toPeer(pseudoClasses._checked),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is collapsed.\n */\n _peerCollapsed: toPeer(attributes._collapsed),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is complete.\n */\n _peerComplete: toPeer(attributes._complete),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is current.\n */\n _peerCurrent: toPeer(attributes._current),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is enabled.\n */\n _peerEnabled: toPeer(pseudoClasses._enabled),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is expanded.\n */\n _peerExpanded: toPeer(attributes._expanded),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is focus-within.\n */\n _peerFocusWithin: toPeer(pseudoClasses._focusWithin),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is grabbed.\n */\n _peerGrabbed: toPeer(attributes._grabbed),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is horizontal.\n */\n _peerHorizontal: toPeer(pseudoClasses._horizontal),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is idle.\n */\n _peerIdle: toPeer(attributes._idle),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is incomplete.\n */\n _peerIncomplete: toPeer(attributes._incomplete),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is loaded.\n */\n _peerLoaded: toPeer(attributes._loaded),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is loading.\n */\n _peerLoading: toPeer(attributes._loading),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is optional.\n */\n _peerOptional: toPeer(pseudoClasses._optional),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` has a placeholder shown.\n */\n _peerPlaceholderShown: toPeer(pseudoClasses._placeholderShown),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is pressed.\n */\n _peerPressed: toPeer(attributes._pressed),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is range.\n */\n _peerRange: toPeer(attributes._range),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is read-write.\n */\n _peerReadWrite: toPeer(pseudoClasses._readWrite),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is rejected.\n */\n _peerReject: toPeer(attributes._reject),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is required.\n */\n _peerRequired: toPeer(pseudoClasses._required),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is user-invalid.\n */\n _peerUserInvalid: toPeer(pseudoClasses._userInvalid),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is valid.\n */\n _peerValid: toPeer(pseudoClasses._valid),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is vertical.\n */\n _peerVertical: toPeer(pseudoClasses._vertical),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is hovered.\n */\n _peerHover: toPeer(pseudoClasses._hover),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is active.\n */\n _peerActive: toPeer(pseudoClasses._active),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is focused.\n */\n _peerFocus: toPeer(pseudoClasses._focus),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is focused-visible.\n */\n _peerFocusVisible: toPeer(pseudoClasses._focusVisible),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is selected.\n */\n _peerSelected: toPeer(attributes._selected),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is invalid.\n */\n _peerInvalid: toPeer(pseudoClasses._invalid),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is read-only.\n */\n _peerReadOnly: toPeer(pseudoClasses._readOnly),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is disabled.\n */\n _peerDisabled: toPeer(pseudoClasses._disabled),\n} as const\n\nexport type PeerAttributes = typeof peerAttributes\nexport type PeerAttributeProperty = keyof PeerAttributes\nexport type PeerAttributeProps = {\n [K in PeerAttributeProperty]?: CSSObject\n}\n\nexport const peerAttributeProperties = Object.keys(\n peerAttributes,\n) as PeerAttributeProperty[]\nexport const peerAttributeSelectors = Object.values(peerAttributes)\n\nexport const conditions = {\n ...pseudoElements,\n ...attributes,\n ...pseudoClasses,\n ...groupAttributes,\n ...peerAttributes,\n} as const\n\nexport type Conditions = typeof conditions\nexport type ConditionProperty = keyof Conditions\nexport type ConditionSelector = Conditions[ConditionProperty]\nexport type ConditionProps = {\n [K in keyof Conditions]?: CSSObject\n}\n\nexport const conditionProperties = Object.keys(\n conditions,\n) as ConditionProperty[]\nexport const conditionSelectors = Object.values(conditions)\n\nexport function getCondition(key: string) {\n return key in conditions ? conditions[key as ConditionProperty] : key\n}\n"],"mappings":";;AAYA,MAAM,WAA6B,aACjC;CAAC;CAAgB;CAAgB;CAAS,CACvC,KAAK,WAAW,GAAG,SAAS,SAAS,MAAM,EAAE,CAAC,IAAI,CAClD,KAAK,KAAK;AAMf,MAAM,UAA4B,aAChC,CACE,GAAG,CAAC,eAAe,QAAQ,CAAC,SAAS,WAAW,CAC9C,WACI,WAAW,SAAS,SAAS,MAAM,EAAE,CAAC,KACtC,WAAW,OAAO,IACtB,WAAW,GAAG,SAAS,SAAS,MAAM,EAAE,CAAC,QAAQ,GAAG,OAAO,MAC5D,CAAC,EACF,GAAI,WACA,CAAC,eAAe,QAAQ,CAAC,SAAS,WAAW,CAC3C,WAAW,OAAO,IAAI,SAAS,MAAM,EAAE,CAAC,IACxC,GAAG,OAAO,QAAQ,SAAS,MAAM,EAAE,CAAC,OACrC,CAAC,GACF,EAAE,CACP,CAAC,KAAK,KAAK;AAMd,MAAa,aAAa;CAIxB,WAAW;CAIX,SAAS;CAIT,WAAW;CAIX,UAAU;CAIV,SAAS;CAIT,YACE;CAIF,WAAW;CAIX,UAAU;CAIV,OACE;CAIF,MAAM;CAIN,WAAW;CAIX,WAAW;CAIX,SAAS;CAIT,UAAU;CAIV,OAAO;CAIP,WAAW;CAIX,UAAU;CAIV,OAAO;CAIP,aAAa;CAIb,QACE;CAIF,SAAS;CAIT,UAAU;CAIV,MAAM;CAIN,eAAe;CAIf,aAAa;CAIb,aAAa;CAIb,cAAc;CAId,cACE;CAIF,cAAc;CAId,UAAU;CAIV,OAAO;CAIP,UAAU;CAIV,QAAQ;CAIR,SAAS;CAIT,SAAS;CAIT,MAAM;CAIN,QAAQ;CAIR,WAAW;CAIX,SAAS;CAIT,QAAQ;CACT;AAQD,MAAa,sBAAsB,OAAO,KACxC,WACD;AACD,MAAa,qBAAqB,OAAO,OAAO,WAAW;AAE3D,M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yBAAyB,OAAO,OAAO,eAAe;AAEnE,MAAa,aAAa;CACxB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACJ;AASD,MAAa,sBAAsB,OAAO,KACxC,WACD;AACD,MAAa,qBAAqB,OAAO,OAAO,WAAW;AAE3D,SAAgB,aAAa,KAAa;AACxC,QAAO,OAAO,aAAa,WAAW,OAA4B"}
1
+ {"version":3,"file":"conditions.cjs","names":[],"sources":["../../../../src/core/css/conditions.ts"],"sourcesContent":["import type { Length } from \"../../utils\"\nimport type { DOMElement } from \"../components\"\nimport type { CSSObject } from \"./index.types\"\n\ntype ReplaceSelector<\n Y extends string[],\n M extends string,\n D extends string,\n> = Y extends [infer H extends string, ...infer R extends string[]]\n ? `${H}${M extends `&${infer T}` ? `${T} ${D}` : `${M} ${D}`}${Length<R> extends 0 ? \"\" : `, `}${ReplaceSelector<R, M, D>}`\n : \"\"\n\nconst toGroup = <Y extends string>(selector: Y) =>\n [\"[role=group]\", \"[data-group]\", \".group\"]\n .map((prefix) => `${prefix}${selector.slice(1)} &`)\n .join(\", \") as ReplaceSelector<\n [\"[role=group]\", \"[data-group]\", \".group\"],\n Y,\n \"&\"\n >\n\nconst toPeer = <Y extends string>(selector?: Y) =>\n [\n ...[\"[data-peer]\", \".peer\"].flatMap((prefix) => [\n selector\n ? `&:has(~ ${prefix}${selector.slice(1)})`\n : `&:has(~ ${prefix})`,\n selector ? `${prefix}${selector.slice(1)} ~ &` : `${prefix} ~ &`,\n ]),\n ...(selector\n ? [\"[data-peer]\", \".peer\"].flatMap((prefix) => [\n `&:has(~ ${prefix} *${selector.slice(1)})`,\n `${prefix}:has(*${selector.slice(1)}) ~ &`,\n ])\n : []),\n ].join(\", \") as ReplaceSelector<[\"[data-peer]\", \".peer\"], Y, \"~ &\">\n\nexport type AnySelector =\n | `${string}${\" \" | \"#\" | \"*\" | \"+\" | \",\" | \".\" | \":\" | \">\" | \"@\" | \"[\" | \"]\" | \"~\"}${string}`\n | DOMElement\n\nexport const attributes = {\n /**\n * The CSS `&[data-inactive]` attribute selector.\n */\n _inactive: \"&[data-inactive]\",\n /**\n * The CSS `&[data-accept]` attribute selector.\n */\n _accept: \"&[data-accept]\",\n /**\n * The CSS `&[data-animated]` attribute selector.\n */\n _animated: \"&[data-animated]\",\n /**\n * The CSS `&[data-between]` attribute selector.\n */\n _between: \"&[data-between]\",\n /**\n * The CSS `&:is([data-center], [data-group-center])` attribute selector.\n */\n _center: \"&:is([data-center], [data-group-center])\",\n /**\n * The CSS `&:is([data-collapsed], :not([data-expanded]), [aria-expanded=false])` attribute selector.\n */\n _collapsed:\n \"&:is([data-collapsed], :not([data-expanded]), [aria-expanded=false])\",\n /**\n * The CSS `&[data-complete]` attribute selector.\n */\n _complete: \"&[data-complete]\",\n /**\n * The CSS `&:is([aria-current], [data-current]):not([aria-current='false'])` attribute selector.\n */\n _current: \"&:is([aria-current], [data-current]):not([aria-current='false'])\",\n /**\n * Styles for when `data-mode` is applied to any parent of this component or element.\n */\n _dark:\n \".dark &:not([data-mode]), [data-mode=dark] &:not([data-mode]), &[data-mode=dark]\",\n /**\n * The CSS `&:is([data-end], [data-group-end])` attribute selector.\n */\n _end: \"&:is([data-end], [data-group-end])\",\n /**\n * The CSS `&:is([data-expanded], [aria-expanded=true])` attribute selector.\n */\n _expanded: \"&:is([data-expanded], [aria-expanded=true])\",\n /**\n * The CSS `&[data-fallback]` attribute selector.\n */\n _fallback: \"&[data-fallback]\",\n /**\n * The CSS `&[data-filled]` attribute selector.\n */\n _filled: \"&[data-filled]\",\n /**\n * The CSS `&:is([data-grabbed], [aria-grabbed=true])` attribute selector.\n */\n _grabbed: \"&:is([data-grabbed], [aria-grabbed=true])\",\n /**\n * The CSS `&:is([role=grid], [data-grid])` attribute selector.\n */\n _grid: \"&:is([role=grid], [data-grid])\",\n /**\n * The CSS `&:is(:has(> [role=group]), :has(> [data-group]), :has(> .group))` attribute selector.\n */\n _hasGroup: \"&:is(:has(> [role=group]), :has(> [data-group]), :has(> .group))\",\n /**\n * The CSS `&:has(> [data-icon])` attribute selector.\n */\n _hasIcon: \"&:has(> [data-icon])\",\n /**\n * The CSS `&[data-idle]` attribute selector.\n */\n _idle: \"&[data-idle]\",\n /**\n * The CSS `&[data-incomplete]` attribute selector.\n */\n _incomplete: \"&[data-incomplete]\",\n /**\n * Styles for when `data-mode` is applied to any parent of this component or element.\n */\n _light:\n \".light &:not([data-mode]), [data-mode=light] &:not([data-mode]), &[data-mode=light]\",\n /**\n * The CSS `&[data-loaded]` attribute selector.\n */\n _loaded: \"&[data-loaded]\",\n /**\n * The CSS `&:is([data-loading], [aria-busy=true])` attribute selector.\n */\n _loading: \"&:is([data-loading], [aria-busy=true])\",\n /**\n * The CSS `&[dir=ltr]` attribute selector.\n */\n _ltr: \"[dir=ltr] &\",\n /**\n * The CSS `&[hidden]` attribute selector.\n */\n _nativeHidden: \"&[hidden]\",\n /**\n * The CSS `&[data-not-allowed]` attribute selector.\n */\n _notAllowed: \"&[data-not-allowed]\",\n /**\n * The CSS `&[aria-current='false']` attribute selector.\n */\n _notCurrent: \"&:not([aria-current], [data-current]), &[aria-current='false']\",\n /**\n * The CSS `&:not([data-fallback])` attribute selector.\n */\n _notFallback: \"&:not([data-fallback])\",\n /**\n * The CSS `&:not(:has(> [role=group]), :has(> [data-group]), :has(> .group))` attribute selector.\n */\n _notHasGroup:\n \"&:not(:has(> [role=group]), :has(> [data-group]), :has(> .group))\",\n /**\n * The CSS `&:not([data-selected]):not([aria-selected=true])` attribute selector.\n */\n _notSelected: \"&:not([data-selected]):not([aria-selected=true])\",\n /**\n * The CSS `&[data-numeric]` attribute selector.\n */\n _numeric: \"&[data-numeric]\",\n /**\n * The CSS `&:is([open], [data-open])` attribute selector.\n */\n _open: \"&:is([open], [data-open])\",\n /**\n * The CSS `&:is([data-pressed], [aria-pressed=true])` attribute selector.\n */\n _pressed: \"&:is([data-pressed], [aria-pressed=true])\",\n /**\n * The CSS `&:is([data-range])` attribute selector.\n */\n _range: \"&:is([data-range])\",\n /**\n * The CSS `&[data-reject]` attribute selector.\n */\n _reject: \"&[data-reject]\",\n /**\n * The CSS `& .ui-ripple` attribute selector.\n */\n _ripple: \"& .ui-ripple\",\n /**\n * The CSS `&[dir=rtl]` attribute selector.\n */\n _rtl: \"[dir=rtl] &\",\n /**\n * The CSS `&:is([data-start], [data-group-start])` attribute selector.\n */\n _start: \"&:is([data-start], [data-group-start])\",\n /**\n * The CSS `&:is([data-selected], [aria-selected=true])` attribute selector.\n */\n _selected: \"&:is([data-selected], [aria-selected=true])\",\n /**\n * The CSS `&:is([hidden], [data-hidden])` attribute selector.\n */\n _hidden: \"&:is([hidden], [data-hidden])\",\n /**\n * The CSS `&[data-never]` attribute selector.\n */\n _never: \"&[data-never]\",\n} as const\n\nexport type Attributes = typeof attributes\nexport type AttributeProperty = keyof Attributes\nexport type AttributeProps = {\n [K in AttributeProperty]?: CSSObject\n}\n\nexport const attributeProperties = Object.keys(\n attributes,\n) as AttributeProperty[]\nexport const attributeSelectors = Object.values(attributes)\n\nexport const pseudoElements = {\n /**\n * The CSS `&::after` pseudo-element.\n */\n _after: \"&::after\",\n /**\n * The CSS `&::backdrop` pseudo-element.\n */\n _backdrop: \"&::backdrop\",\n /**\n * The CSS `&::before` pseudo-element.\n */\n _before: \"&::before\",\n /**\n * The CSS `&::cue` pseudo-element.\n */\n _cue: \"&::cue\",\n /**\n * The CSS `&::cue-region` pseudo-element.\n */\n _cueRegion: \"&::cue-region\",\n /**\n * The CSS `&::details-content` pseudo-element.\n */\n _detailsContent: \"&::details-content\",\n /**\n * The CSS `&::file-selector-button` pseudo-element.\n */\n _fileSelector: \"&::file-selector-button\",\n /**\n * The CSS `&::first-letter` pseudo-element.\n */\n _firstLetter: \"&::first-letter\",\n /**\n * The CSS `&::first-line` pseudo-element.\n */\n _firstLine: \"&::first-line\",\n /**\n * The CSS `&::marker` pseudo-element.\n */\n _marker: \"&::marker\",\n /**\n * The CSS `&::placeholder, &[data-placeholder]` pseudo-element.\n */\n _placeholder: \"&::placeholder, &[data-placeholder]\",\n /**\n * The CSS `&::-webkit-scrollbar, &[data-scrollbar]` pseudo-element.\n */\n _scrollbar: \"&::-webkit-scrollbar, &[data-scrollbar]\",\n /**\n * The CSS `&::-webkit-scrollbar-button` pseudo-element.\n */\n _scrollbarButton: \"&::-webkit-scrollbar-button\",\n /**\n * The CSS `&::-webkit-scrollbar-corner` pseudo-element.\n */\n _scrollbarCorner: \"&::-webkit-scrollbar-corner\",\n /**\n * The CSS `&::-webkit-scrollbar-thumb` pseudo-element.\n */\n _scrollbarThumb: \"&::-webkit-scrollbar-thumb\",\n /**\n * The CSS `&::-webkit-scrollbar-track` pseudo-element.\n */\n _scrollbarTrack: \"&::-webkit-scrollbar-track\",\n /**\n * The CSS `&::-webkit-scrollbar-track-piece` pseudo-element.\n */\n _scrollbarTrackPiece: \"&::-webkit-scrollbar-track-piece\",\n /**\n * The CSS `&::selection` pseudo-element.\n */\n _selection: \"&::selection\",\n} as const\n\nexport type PseudoElements = typeof pseudoElements\nexport type PseudoElementProperty = keyof PseudoElements\nexport type PseudoElementProps = {\n [K in PseudoElementProperty]?: CSSObject\n}\n\nexport const pseudoElementProperties = Object.keys(\n pseudoElements,\n) as PseudoElementProperty[]\nexport const pseudoElementSelectors = Object.values(pseudoElements)\n\nexport const pseudoClasses = {\n /**\n * The CSS `&:is([data-activedescendant])` pseudo-class.\n */\n _activedescendant: \"&:is([data-activedescendant])\",\n /**\n * The CSS `:any-link` pseudo-class.\n */\n _anyLink: \"&:is(:any-link, [data-any-link])\",\n /**\n * The CSS `&:autofill` pseudo-class.\n */\n _autofill: \"&:autofill\",\n /**\n * The CSS `&:is(:blank, [data-blank])` pseudo-class.\n */\n _blank: \"&:is(:blank, [data-blank])\",\n /**\n * The CSS `&:is(:checked, [data-checked], [aria-checked=true])` pseudo-class.\n */\n _checked: \"&:is(:checked, [data-checked], [aria-checked=true])\",\n /**\n * The CSS `& > *` child combinator selector.\n */\n _child: \"& > *\",\n /**\n * The CSS `& > [data-content]` child combinator attribute selector.\n */\n _content: \"& > [data-content]\",\n /**\n * The CSS `&:default` pseudo-class.\n */\n _default: \"&:default\",\n /**\n * The CSS `&:empty` pseudo-class.\n */\n _empty: \"&:empty\",\n /**\n * The CSS `&:is(:enabled, [data-enabled])` pseudo-class.\n */\n _enabled: \"&:is(:enabled, [data-enabled])\",\n /**\n * The CSS `&:nth-of-type(even)` pseudo-class.\n */\n _even: \"&:nth-of-type(even)\",\n /**\n * The CSS `&:first-of-type` pseudo-class.\n */\n _first: \"&:first-of-type\",\n /**\n * The CSS `& > *:first-child` pseudo-class.\n */\n _firstChild: \"& > *:first-child\",\n /**\n * The CSS `&:not(:focus-within, [data-focus-within])` pseudo-class.\n */\n _focusWithin: \"&:not(:focus-within, [data-focus-within])\",\n /**\n * The CSS `&:fullscreen` pseudo-class.\n */\n _fullScreen: \"&:fullscreen\",\n /**\n * The CSS `&:is([data-orientation=horizontal], [aria-orientation=horizontal])` pseudo-class.\n */\n _horizontal:\n \"&:is([data-orientation=horizontal], [aria-orientation=horizontal])\",\n /**\n * The CSS `&:where(svg:not([data-loading])), & > [data-icon]` pseudo-class.\n */\n _icon: \"&:where(svg:not([data-loading])), & > [data-icon]\",\n /**\n * The CSS `&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed])` pseudo-class.\n */\n _indeterminate:\n \"&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed])\",\n /**\n * The CSS `& > [data-indicator]` pseudo-class.\n */\n _indicator: \"& > [data-indicator]\",\n /**\n * The CSS `&:is(:in-range, [data-in-range])` pseudo-class.\n */\n _inRange: \"&:is(:in-range, [data-in-range])\",\n /**\n * The CSS `&:last-of-type` pseudo-class.\n */\n _last: \"&:last-of-type\",\n /**\n * The CSS `& > *:last-child` pseudo-class.\n */\n _lastChild: \"& > *:last-child\",\n /**\n * The CSS `&:is(:link, [data-link])` pseudo-class.\n */\n _link: \"&:is(:link, [data-link])\",\n /**\n * The CSS `&:modal` pseudo-class.\n */\n _modal: \"&:modal\",\n /**\n * The CSS `&:active` pseudo-class.\n */\n _nativeActive: \"&:active\",\n /**\n * The CSS `&:checked` pseudo-class.\n */\n _nativeChecked: \"&:checked\",\n /**\n * The CSS `&:is(disabled, [disabled])` pseudo-class.\n */\n _nativeDisabled: \"&:is(disabled, [disabled])\",\n /**\n * The CSS `&:focus` pseudo-class.\n */\n _nativeFocus: \"&:focus\",\n /**\n * The CSS `&:focus-visible` pseudo-class.\n */\n _nativeFocusVisible: \"&:focus-visible\",\n /**\n * The CSS `&:focus-within` pseudo-class.\n */\n _nativeFocusWithin: \"&:focus-within\",\n /**\n * The CSS `&:hover` pseudo-class.\n */\n _nativeHover: \"&:hover\",\n /**\n * The CSS `&:is([readonly], [aria-readonly=true])` pseudo-class.\n */\n _nativeReadOnly: \"&:is([readonly], [aria-readonly=true])\",\n /**\n * The CSS `&:target` pseudo-class.\n */\n _nativeTarget: \"&:target\",\n /**\n * The CSS `&:valid` pseudo-class.\n */\n _nativeValid: \"&:valid\",\n /**\n * The CSS `&:not(:checked):not([data-checked]):not([aria-checked=true])` pseudo-class.\n */\n _notChecked: \"&:not(:checked):not([data-checked]):not([aria-checked=true])\",\n /**\n * The CSS `&:not(:empty)` pseudo-class.\n */\n _notEmpty: \"&:not(:empty)\",\n /**\n * The CSS `&:not(:first-of-type)` pseudo-class.\n */\n _notFirst: \"&:not(:first-of-type)\",\n /**\n * The CSS `& > *:not(:first-child)` pseudo-class.\n */\n _notFirstChild: \"& > *:not(:first-child)\",\n /**\n * The CSS `&:not(:last-of-type)` pseudo-class.\n */\n _notLast: \"&:not(:last-of-type)\",\n /**\n * The CSS `& > *:not(:last-child)` pseudo-class.\n */\n _notLastChild: \"& > *:not(:last-child)\",\n /**\n * The CSS `&:not(:target)` pseudo-class.\n */\n _notTarget: \"&:not(:target)\",\n /**\n * The CSS `&:nth-of-type(odd)` pseudo-class.\n */\n _odd: \"&:nth-of-type(odd)\",\n /**\n * The CSS `&:only-of-type` pseudo-class.\n */\n _only: \"&:only-of-type\",\n /**\n * The CSS `&:only-child` pseudo-class.\n */\n _onlyChild: \"&:only-child\",\n /**\n * The CSS `&:is(:optional, [data-optional])` pseudo-class.\n */\n _optional: \"&:is(:optional, [data-optional])\",\n /**\n * The CSS `&:is(:out-of-range, [data-out-of-range])` pseudo-class.\n */\n _outRange: \"&:is(:out-of-range, [data-out-of-range])\",\n /**\n * The CSS `&:is(:paused, [data-paused])` pseudo-class.\n */\n _paused: \"&:is(:paused, [data-paused])\",\n /**\n * The CSS `&:picture-in-picture` pseudo-class.\n */\n _picture: \"&:picture-in-picture\",\n /**\n * The CSS `&:placeholder-shown` pseudo-class.\n */\n _placeholderShown: \"&:placeholder-shown\",\n /**\n * The CSS `&:is(:playing, [data-playing])` pseudo-class.\n */\n _playing: \"&:is(:playing, [data-playing])\",\n /**\n * The CSS `&:popover-open` pseudo-class.\n */\n _popoverOpen: \"&:popover-open\",\n /**\n * The CSS `&:is(:read-write, [data-read-write])` pseudo-class.\n */\n _readWrite: \"&:is(:read-write, [data-read-write])\",\n /**\n * The CSS `&:is(:required, [required])` pseudo-class.\n */\n _required: \"&:is(:required, [required])\",\n /**\n * The CSS `&:is(:target, [data-target])` pseudo-class.\n */\n _target: \"&:is(:target, [data-target])\",\n /**\n * The CSS `&:is(:user-invalid, [data-user-invalid])` pseudo-class.\n */\n _userInvalid: \"&:is(:user-invalid, [data-user-invalid])\",\n /**\n * The CSS `&:is(:valid, [data-valid])` pseudo-class.\n */\n _valid: \"&:is(:valid, [data-valid])\",\n /**\n * The CSS `&:is([data-orientation=vertical], [aria-orientation=vertical])` pseudo-class.\n */\n _vertical: \"&:is([data-orientation=vertical], [aria-orientation=vertical])\",\n /**\n * The CSS `&:visited` pseudo-class.\n */\n _visited: \"&:visited\",\n /**\n * The CSS `&:is(:hover, [data-hover])` pseudo-class.\n */\n _hover:\n \"&:is(:hover, [data-hover]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])\",\n /**\n * The CSS `&:is(:active, [data-active])` pseudo-class.\n */\n _active:\n \"&:is(:active, [data-active]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])\",\n /**\n * The CSS `&:is(:focus, [data-focus])` pseudo-class.\n */\n _focus: \"&:is(:focus, [data-focus])\",\n /**\n * The CSS `&:is(:focus-visible, [data-focus-visible])` pseudo-class.\n */\n _focusVisible: \"&:is(:focus-visible, [data-focus-visible])\",\n /**\n * The CSS `&:is([data-invalid], [aria-invalid=true])` attribute selector.\n */\n _invalid: \"&:is([data-invalid], [aria-invalid=true])\",\n /**\n * The CSS `&:is([readonly], [data-readonly], [aria-readonly=true])` pseudo-class.\n */\n _readOnly: \"&:is([readonly], [data-readonly], [aria-readonly=true])\",\n /**\n * The CSS `&:is(:disabled, [disabled], [data-disabled])` pseudo-class.\n */\n _disabled: \"&:is(:disabled, [disabled], [data-disabled])\",\n} as const\n\nexport type PseudoClasses = typeof pseudoClasses\nexport type PseudoClassProperty = keyof PseudoClasses\nexport type PseudoClassProps = {\n [K in PseudoClassProperty]?: CSSObject\n}\n\nexport const pseudoClassProperties = Object.keys(\n pseudoClasses,\n) as PseudoClassProperty[]\nexport const pseudoClassSelectors = Object.values(pseudoClasses)\n\nexport const groupAttributes = {\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is accepted.\n */\n _groupAccept: toGroup(attributes._accept),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is activedescendant.\n */\n _groupActivedescendant: toGroup(pseudoClasses._activedescendant),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is animated.\n */\n _groupAnimated: toGroup(attributes._animated),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is blank.\n */\n _groupBlank: toGroup(pseudoClasses._blank),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is checked.\n */\n _groupChecked: toGroup(pseudoClasses._checked),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is collapsed.\n */\n _groupCollapsed: toGroup(attributes._collapsed),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is complete.\n */\n _groupComplete: toGroup(attributes._complete),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is current.\n */\n _groupCurrent: toGroup(attributes._current),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is enabled.\n */\n _groupEnabled: toGroup(pseudoClasses._enabled),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is expanded.\n */\n _groupExpanded: toGroup(attributes._expanded),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is focus-within.\n */\n _groupFocusWithin: toGroup(pseudoClasses._focusWithin),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is grabbed.\n */\n _groupGrabbed: toGroup(attributes._grabbed),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is horizontal.\n */\n _groupHorizontal: toGroup(pseudoClasses._horizontal),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is idle.\n */\n _groupIdle: toGroup(attributes._idle),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is incomplete.\n */\n _groupIncomplete: toGroup(attributes._incomplete),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is loaded.\n */\n _groupLoaded: toGroup(attributes._loaded),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is loading.\n */\n _groupLoading: toGroup(attributes._loading),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is open.\n */\n _groupOpen: toGroup(attributes._open),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is optional.\n */\n _groupOptional: toGroup(pseudoClasses._optional),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` has a placeholder shown.\n */\n _groupPlaceholderShown: toGroup(pseudoClasses._placeholderShown),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is pressed.\n */\n _groupPressed: toGroup(attributes._pressed),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is range.\n */\n _groupRange: toGroup(attributes._range),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is read-write.\n */\n _groupReadWrite: toGroup(pseudoClasses._readWrite),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is rejected.\n */\n _groupReject: toGroup(attributes._reject),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is required.\n */\n _groupRequired: toGroup(pseudoClasses._required),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is user-invalid.\n */\n _groupUserInvalid: toGroup(pseudoClasses._userInvalid),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is valid.\n */\n _groupValid: toGroup(pseudoClasses._valid),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is vertical.\n */\n _groupVertical: toGroup(pseudoClasses._vertical),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is hovered.\n */\n _groupHover: toGroup(pseudoClasses._hover),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is active.\n */\n _groupActive: toGroup(pseudoClasses._active),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is focused.\n */\n _groupFocus: toGroup(pseudoClasses._focus),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is focused-visible.\n */\n _groupFocusVisible: toGroup(pseudoClasses._focusVisible),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is selected.\n */\n _groupSelected: toGroup(attributes._selected),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is invalid.\n */\n _groupInvalid: toGroup(pseudoClasses._invalid),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is read-only.\n */\n _groupReadOnly: toGroup(pseudoClasses._readOnly),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is disabled.\n */\n _groupDisabled: toGroup(pseudoClasses._disabled),\n} as const\n\nexport type GroupAttributes = typeof groupAttributes\nexport type GroupAttributeProperty = keyof GroupAttributes\nexport type GroupAttributeProps = {\n [K in GroupAttributeProperty]?: CSSObject\n}\n\nexport const groupAttributeProperties = Object.keys(\n groupAttributes,\n) as GroupAttributeProperty[]\nexport const groupAttributeSelectors = Object.values(groupAttributes)\n\nexport const peerAttributes = {\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` exists.\n */\n _peer: toPeer(),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is accepted.\n */\n _peerAccept: toPeer(attributes._accept),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is animated.\n */\n _peerAnimated: toPeer(attributes._animated),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is blank.\n */\n _peerBlank: toPeer(pseudoClasses._blank),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is checked.\n */\n _peerChecked: toPeer(pseudoClasses._checked),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is collapsed.\n */\n _peerCollapsed: toPeer(attributes._collapsed),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is complete.\n */\n _peerComplete: toPeer(attributes._complete),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is current.\n */\n _peerCurrent: toPeer(attributes._current),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is enabled.\n */\n _peerEnabled: toPeer(pseudoClasses._enabled),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is expanded.\n */\n _peerExpanded: toPeer(attributes._expanded),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is focus-within.\n */\n _peerFocusWithin: toPeer(pseudoClasses._focusWithin),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is grabbed.\n */\n _peerGrabbed: toPeer(attributes._grabbed),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is horizontal.\n */\n _peerHorizontal: toPeer(pseudoClasses._horizontal),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is idle.\n */\n _peerIdle: toPeer(attributes._idle),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is incomplete.\n */\n _peerIncomplete: toPeer(attributes._incomplete),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is loaded.\n */\n _peerLoaded: toPeer(attributes._loaded),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is loading.\n */\n _peerLoading: toPeer(attributes._loading),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is optional.\n */\n _peerOptional: toPeer(pseudoClasses._optional),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` has a placeholder shown.\n */\n _peerPlaceholderShown: toPeer(pseudoClasses._placeholderShown),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is pressed.\n */\n _peerPressed: toPeer(attributes._pressed),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is range.\n */\n _peerRange: toPeer(attributes._range),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is read-write.\n */\n _peerReadWrite: toPeer(pseudoClasses._readWrite),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is rejected.\n */\n _peerReject: toPeer(attributes._reject),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is required.\n */\n _peerRequired: toPeer(pseudoClasses._required),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is user-invalid.\n */\n _peerUserInvalid: toPeer(pseudoClasses._userInvalid),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is valid.\n */\n _peerValid: toPeer(pseudoClasses._valid),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is vertical.\n */\n _peerVertical: toPeer(pseudoClasses._vertical),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is hovered.\n */\n _peerHover: toPeer(pseudoClasses._hover),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is active.\n */\n _peerActive: toPeer(pseudoClasses._active),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is focused.\n */\n _peerFocus: toPeer(pseudoClasses._focus),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is focused-visible.\n */\n _peerFocusVisible: toPeer(pseudoClasses._focusVisible),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is selected.\n */\n _peerSelected: toPeer(attributes._selected),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is invalid.\n */\n _peerInvalid: toPeer(pseudoClasses._invalid),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is read-only.\n */\n _peerReadOnly: toPeer(pseudoClasses._readOnly),\n /**\n * Styles to apply when a sibling element with `data-peer` or `.peer` is disabled.\n */\n _peerDisabled: toPeer(pseudoClasses._disabled),\n} as const\n\nexport type PeerAttributes = typeof peerAttributes\nexport type PeerAttributeProperty = keyof PeerAttributes\nexport type PeerAttributeProps = {\n [K in PeerAttributeProperty]?: CSSObject\n}\n\nexport const peerAttributeProperties = Object.keys(\n peerAttributes,\n) as PeerAttributeProperty[]\nexport const peerAttributeSelectors = Object.values(peerAttributes)\n\nexport const conditions = {\n ...pseudoElements,\n ...attributes,\n ...pseudoClasses,\n ...groupAttributes,\n ...peerAttributes,\n} as const\n\nexport type Conditions = typeof conditions\nexport type ConditionProperty = keyof Conditions\nexport type ConditionSelector = Conditions[ConditionProperty]\nexport type ConditionProps = {\n [K in keyof Conditions]?: CSSObject\n}\n\nexport const conditionProperties = Object.keys(\n conditions,\n) as ConditionProperty[]\nexport const conditionSelectors = Object.values(conditions)\n\nexport function getCondition(key: string) {\n return key in conditions ? conditions[key as ConditionProperty] : key\n}\n"],"mappings":";;AAYA,MAAM,WAA6B,aACjC;CAAC;CAAgB;CAAgB;CAAS,CACvC,KAAK,WAAW,GAAG,SAAS,SAAS,MAAM,EAAE,CAAC,IAAI,CAClD,KAAK,KAAK;AAMf,MAAM,UAA4B,aAChC,CACE,GAAG,CAAC,eAAe,QAAQ,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