@cck-ui/core 0.4.10 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/cjs/components/button/button-group/button-group.cjs +61 -35
  2. package/cjs/components/button/button-group/button-group.cjs.map +1 -1
  3. package/cjs/components/button/button-group/button-group.utils.cjs +8 -0
  4. package/cjs/components/button/button-group/button-group.utils.cjs.map +1 -0
  5. package/cjs/components/button/button-group-section/button-group-section.cjs +55 -50
  6. package/cjs/components/button/button-group-section/button-group-section.cjs.map +1 -1
  7. package/cjs/components/button/button-group-section/button-group-section.utils.cjs +25 -0
  8. package/cjs/components/button/button-group-section/button-group-section.utils.cjs.map +1 -0
  9. package/cjs/components/button/button.cjs +71 -63
  10. package/cjs/components/button/button.cjs.map +1 -1
  11. package/cjs/components/button/button.utils.cjs +28 -0
  12. package/cjs/components/button/button.utils.cjs.map +1 -0
  13. package/cjs/components/button/index.cjs +13 -5
  14. package/cjs/components/button/index.cjs.map +1 -1
  15. package/cjs/components/grid/col/col.cjs +33 -16
  16. package/cjs/components/grid/col/col.cjs.map +1 -1
  17. package/cjs/components/grid/grid.cjs +63 -34
  18. package/cjs/components/grid/grid.cjs.map +1 -1
  19. package/cjs/components/grid/grid.constants.cjs.map +1 -1
  20. package/cjs/components/grid/grid.utils.cjs +11 -0
  21. package/cjs/components/grid/grid.utils.cjs.map +1 -0
  22. package/cjs/components/grid/index.cjs +7 -2
  23. package/cjs/components/grid/index.cjs.map +1 -1
  24. package/cjs/components/group/group.cjs +78 -62
  25. package/cjs/components/group/group.cjs.map +1 -1
  26. package/cjs/components/group/group.utils.cjs +14 -0
  27. package/cjs/components/group/group.utils.cjs.map +1 -0
  28. package/cjs/components/group/index.cjs +5 -1
  29. package/cjs/components/group/index.cjs.map +1 -1
  30. package/cjs/components/loader/index.cjs +5 -1
  31. package/cjs/components/loader/index.cjs.map +1 -1
  32. package/cjs/components/loader/loader.cjs +50 -41
  33. package/cjs/components/loader/loader.cjs.map +1 -1
  34. package/cjs/components/loader/loader.module.cjs.map +1 -1
  35. package/cjs/components/loader/loader.utils.cjs +12 -0
  36. package/cjs/components/loader/loader.utils.cjs.map +1 -0
  37. package/cjs/components/loader/loaders/bars.cjs +6 -3
  38. package/cjs/components/loader/loaders/bars.cjs.map +1 -1
  39. package/cjs/components/loader/loaders/dots.cjs +6 -3
  40. package/cjs/components/loader/loaders/dots.cjs.map +1 -1
  41. package/cjs/components/loader/loaders/oval.cjs +6 -3
  42. package/cjs/components/loader/loaders/oval.cjs.map +1 -1
  43. package/cjs/components/simple-grid/index.cjs +4 -1
  44. package/cjs/components/simple-grid/index.cjs.map +1 -1
  45. package/cjs/components/simple-grid/simple-grid.cjs +46 -21
  46. package/cjs/components/simple-grid/simple-grid.cjs.map +1 -1
  47. package/cjs/components/text/index.cjs +5 -1
  48. package/cjs/components/text/index.cjs.map +1 -1
  49. package/cjs/components/text/text.cjs +46 -39
  50. package/cjs/components/text/text.cjs.map +1 -1
  51. package/cjs/components/text/text.utils.cjs +15 -0
  52. package/cjs/components/text/text.utils.cjs.map +1 -0
  53. package/cjs/components/unstyled-button/index.cjs +4 -1
  54. package/cjs/components/unstyled-button/index.cjs.map +1 -1
  55. package/cjs/components/unstyled-button/unstyled-button.cjs +37 -22
  56. package/cjs/components/unstyled-button/unstyled-button.cjs.map +1 -1
  57. package/cjs/core/box/box.cjs +39 -27
  58. package/cjs/core/box/box.cjs.map +1 -1
  59. package/cjs/core/box/get-box-style/get-box-style.cjs.map +1 -1
  60. package/cjs/core/box/style-props/extract-style-props/extract-style-props.cjs.map +1 -1
  61. package/cjs/core/box/style-props/parse-style-props/sort-media-queries.cjs.map +1 -1
  62. package/cjs/core/box/style-props/resolvers/border-resolver/border-resolver.cjs.map +1 -1
  63. package/cjs/core/box/style-props/resolvers/color-resolver/color-resolver.cjs.map +1 -1
  64. package/cjs/core/box/style-props/resolvers/font-family-resolver/font-family-resolver.cjs.map +1 -1
  65. package/cjs/core/box/style-props/resolvers/index.cjs.map +1 -1
  66. package/cjs/core/box/style-props/style-props-data.cjs.map +1 -1
  67. package/cjs/core/config-provider/color-functions/get-gradient/get-gradient.cjs +3 -3
  68. package/cjs/core/config-provider/color-functions/get-gradient/get-gradient.cjs.map +1 -1
  69. package/cjs/core/config-provider/color-functions/rgba/rgba.cjs +8 -0
  70. package/cjs/core/config-provider/color-functions/rgba/rgba.cjs.map +1 -1
  71. package/cjs/core/config-provider/color-functions/to-rgba/to-rgba.cjs.map +1 -1
  72. package/cjs/core/config-provider/config-provider.cjs +33 -22
  73. package/cjs/core/config-provider/config-provider.cjs.map +1 -1
  74. package/cjs/core/config-provider/default-colors.cjs.map +1 -1
  75. package/cjs/core/config-provider/index.cjs +5 -0
  76. package/cjs/core/config-provider/index.cjs.map +1 -1
  77. package/cjs/core/config-provider/merge-cck-theme/merge-cck-theme.cjs +2 -2
  78. package/cjs/core/config-provider/merge-cck-theme/merge-cck-theme.cjs.map +1 -1
  79. package/cjs/core/config-provider/merge-theme-overrides/merge-theme-overrides.cjs +10 -0
  80. package/cjs/core/config-provider/merge-theme-overrides/merge-theme-overrides.cjs.map +1 -0
  81. package/cjs/core/config-provider/use-component-props/use-component-props.cjs +35 -0
  82. package/cjs/core/config-provider/use-component-props/use-component-props.cjs.map +1 -0
  83. package/cjs/core/responsive-style-manager/css-object-to-string/css-object-to-string.cjs.map +1 -1
  84. package/cjs/core/responsive-style-manager/normalize-number-like-string-prop/normalize-number-like-string-prop.cjs +1 -1
  85. package/cjs/core/responsive-style-manager/normalize-number-like-string-prop/normalize-number-like-string-prop.cjs.map +1 -1
  86. package/cjs/core/responsive-style-manager/responsive-style-manager.cjs.map +1 -1
  87. package/cjs/core/responsive-style-manager/styles-to-string/styles-to-string.cjs.map +1 -1
  88. package/cjs/core/styles-api/use-styles/get-class-name/get-options-class-names/get-options-class-names.cjs.map +1 -1
  89. package/cjs/core/styles-api/use-styles/get-class-name/get-resolved-class-names/get-resolved-class-names.cjs.map +1 -1
  90. package/cjs/core/styles-api/use-styles/get-class-name/get-root-class-name/get-root-class-name.cjs.map +1 -1
  91. package/cjs/core/styles-api/use-styles/get-class-name/get-selector-class-name/get-selector-class-name.cjs.map +1 -1
  92. package/cjs/core/styles-api/use-styles/get-class-name/get-static-class-names/get-static-class-names.cjs.map +1 -1
  93. package/cjs/core/styles-api/use-styles/get-class-name/get-variant-class-name/get-variant-class-name.cjs.map +1 -1
  94. package/cjs/core/utils/deep-merge/deep-merge.cjs +18 -0
  95. package/cjs/core/utils/deep-merge/deep-merge.cjs.map +1 -0
  96. package/cjs/core/utils/get-breakpoint-value/get-breakpoint-value.cjs.map +1 -1
  97. package/cjs/core/utils/get-size/get-size.cjs +2 -2
  98. package/cjs/core/utils/get-size/get-size.cjs.map +1 -1
  99. package/cjs/core/utils/get-sorted-breakpoints/get-sorted-breakpoints.cjs.map +1 -1
  100. package/cjs/core/utils/number-like-string-to-number/number-like-string-to-number.cjs.map +1 -1
  101. package/cjs/core/utils/units-converters/px.cjs.map +1 -1
  102. package/cjs/core/utils/units-converters/rem.cjs.map +1 -1
  103. package/cjs/core/utils/vue/component.cjs.map +1 -1
  104. package/cjs/core/utils/vue/install.cjs +3 -3
  105. package/cjs/core/utils/vue/install.cjs.map +1 -1
  106. package/cjs/core/utils/vue/statics.cjs +38 -0
  107. package/cjs/core/utils/vue/statics.cjs.map +1 -0
  108. package/cjs/index.cjs +12 -6
  109. package/cjs/index.cjs.map +1 -1
  110. package/esm/components/button/button-group/button-group.mjs +61 -35
  111. package/esm/components/button/button-group/button-group.mjs.map +1 -1
  112. package/esm/components/button/button-group/button-group.utils.mjs +9 -0
  113. package/esm/components/button/button-group/button-group.utils.mjs.map +1 -0
  114. package/esm/components/button/button-group-section/button-group-section.mjs +55 -50
  115. package/esm/components/button/button-group-section/button-group-section.mjs.map +1 -1
  116. package/esm/components/button/button-group-section/button-group-section.utils.mjs +26 -0
  117. package/esm/components/button/button-group-section/button-group-section.utils.mjs.map +1 -0
  118. package/esm/components/button/button.mjs +71 -63
  119. package/esm/components/button/button.mjs.map +1 -1
  120. package/esm/components/button/button.utils.mjs +29 -0
  121. package/esm/components/button/button.utils.mjs.map +1 -0
  122. package/esm/components/button/index.mjs +13 -5
  123. package/esm/components/button/index.mjs.map +1 -1
  124. package/esm/components/grid/col/col.mjs +34 -17
  125. package/esm/components/grid/col/col.mjs.map +1 -1
  126. package/esm/components/grid/grid.constants.mjs.map +1 -1
  127. package/esm/components/grid/grid.mjs +63 -34
  128. package/esm/components/grid/grid.mjs.map +1 -1
  129. package/esm/components/grid/grid.utils.mjs +12 -0
  130. package/esm/components/grid/grid.utils.mjs.map +1 -0
  131. package/esm/components/grid/index.mjs +6 -2
  132. package/esm/components/grid/index.mjs.map +1 -1
  133. package/esm/components/group/group.mjs +78 -62
  134. package/esm/components/group/group.mjs.map +1 -1
  135. package/esm/components/group/group.utils.mjs +15 -0
  136. package/esm/components/group/group.utils.mjs.map +1 -0
  137. package/esm/components/group/index.mjs +4 -2
  138. package/esm/components/group/index.mjs.map +1 -1
  139. package/esm/components/loader/index.mjs +4 -1
  140. package/esm/components/loader/index.mjs.map +1 -1
  141. package/esm/components/loader/loader.mjs +50 -41
  142. package/esm/components/loader/loader.mjs.map +1 -1
  143. package/esm/components/loader/loader.module.mjs.map +1 -1
  144. package/esm/components/loader/loader.utils.mjs +13 -0
  145. package/esm/components/loader/loader.utils.mjs.map +1 -0
  146. package/esm/components/loader/loaders/bars.mjs +7 -4
  147. package/esm/components/loader/loaders/bars.mjs.map +1 -1
  148. package/esm/components/loader/loaders/dots.mjs +7 -4
  149. package/esm/components/loader/loaders/dots.mjs.map +1 -1
  150. package/esm/components/loader/loaders/oval.mjs +7 -4
  151. package/esm/components/loader/loaders/oval.mjs.map +1 -1
  152. package/esm/components/simple-grid/index.mjs +3 -2
  153. package/esm/components/simple-grid/index.mjs.map +1 -1
  154. package/esm/components/simple-grid/simple-grid.mjs +47 -22
  155. package/esm/components/simple-grid/simple-grid.mjs.map +1 -1
  156. package/esm/components/text/index.mjs +4 -2
  157. package/esm/components/text/index.mjs.map +1 -1
  158. package/esm/components/text/text.mjs +46 -39
  159. package/esm/components/text/text.mjs.map +1 -1
  160. package/esm/components/text/text.utils.mjs +16 -0
  161. package/esm/components/text/text.utils.mjs.map +1 -0
  162. package/esm/components/unstyled-button/index.mjs +3 -2
  163. package/esm/components/unstyled-button/index.mjs.map +1 -1
  164. package/esm/components/unstyled-button/unstyled-button.mjs +38 -23
  165. package/esm/components/unstyled-button/unstyled-button.mjs.map +1 -1
  166. package/esm/core/box/box.mjs +40 -28
  167. package/esm/core/box/box.mjs.map +1 -1
  168. package/esm/core/box/get-box-style/get-box-style.mjs.map +1 -1
  169. package/esm/core/box/style-props/extract-style-props/extract-style-props.mjs.map +1 -1
  170. package/esm/core/box/style-props/parse-style-props/sort-media-queries.mjs.map +1 -1
  171. package/esm/core/box/style-props/resolvers/border-resolver/border-resolver.mjs.map +1 -1
  172. package/esm/core/box/style-props/resolvers/color-resolver/color-resolver.mjs.map +1 -1
  173. package/esm/core/box/style-props/resolvers/font-family-resolver/font-family-resolver.mjs.map +1 -1
  174. package/esm/core/box/style-props/resolvers/index.mjs.map +1 -1
  175. package/esm/core/box/style-props/style-props-data.mjs.map +1 -1
  176. package/esm/core/config-provider/color-functions/get-gradient/get-gradient.mjs +3 -3
  177. package/esm/core/config-provider/color-functions/get-gradient/get-gradient.mjs.map +1 -1
  178. package/esm/core/config-provider/color-functions/rgba/rgba.mjs +8 -1
  179. package/esm/core/config-provider/color-functions/rgba/rgba.mjs.map +1 -1
  180. package/esm/core/config-provider/color-functions/to-rgba/to-rgba.mjs.map +1 -1
  181. package/esm/core/config-provider/config-provider.mjs +33 -22
  182. package/esm/core/config-provider/config-provider.mjs.map +1 -1
  183. package/esm/core/config-provider/default-colors.mjs.map +1 -1
  184. package/esm/core/config-provider/index.mjs +4 -2
  185. package/esm/core/config-provider/index.mjs.map +1 -1
  186. package/esm/core/config-provider/merge-cck-theme/merge-cck-theme.mjs +2 -2
  187. package/esm/core/config-provider/merge-cck-theme/merge-cck-theme.mjs.map +1 -1
  188. package/esm/core/config-provider/merge-theme-overrides/merge-theme-overrides.mjs +10 -0
  189. package/esm/core/config-provider/merge-theme-overrides/merge-theme-overrides.mjs.map +1 -0
  190. package/esm/core/config-provider/use-component-props/use-component-props.mjs +35 -0
  191. package/esm/core/config-provider/use-component-props/use-component-props.mjs.map +1 -0
  192. package/esm/core/responsive-style-manager/css-object-to-string/css-object-to-string.mjs.map +1 -1
  193. package/esm/core/responsive-style-manager/normalize-number-like-string-prop/normalize-number-like-string-prop.mjs +1 -1
  194. package/esm/core/responsive-style-manager/normalize-number-like-string-prop/normalize-number-like-string-prop.mjs.map +1 -1
  195. package/esm/core/responsive-style-manager/responsive-style-manager.mjs.map +1 -1
  196. package/esm/core/responsive-style-manager/styles-to-string/styles-to-string.mjs.map +1 -1
  197. package/esm/core/styles-api/use-styles/get-class-name/get-options-class-names/get-options-class-names.mjs.map +1 -1
  198. package/esm/core/styles-api/use-styles/get-class-name/get-resolved-class-names/get-resolved-class-names.mjs.map +1 -1
  199. package/esm/core/styles-api/use-styles/get-class-name/get-root-class-name/get-root-class-name.mjs.map +1 -1
  200. package/esm/core/styles-api/use-styles/get-class-name/get-selector-class-name/get-selector-class-name.mjs.map +1 -1
  201. package/esm/core/styles-api/use-styles/get-class-name/get-static-class-names/get-static-class-names.mjs.map +1 -1
  202. package/esm/core/styles-api/use-styles/get-class-name/get-variant-class-name/get-variant-class-name.mjs.map +1 -1
  203. package/esm/core/utils/deep-merge/deep-merge.mjs +18 -0
  204. package/esm/core/utils/deep-merge/deep-merge.mjs.map +1 -0
  205. package/esm/core/utils/get-breakpoint-value/get-breakpoint-value.mjs.map +1 -1
  206. package/esm/core/utils/get-size/get-size.mjs +2 -2
  207. package/esm/core/utils/get-size/get-size.mjs.map +1 -1
  208. package/esm/core/utils/get-sorted-breakpoints/get-sorted-breakpoints.mjs.map +1 -1
  209. package/esm/core/utils/number-like-string-to-number/number-like-string-to-number.mjs.map +1 -1
  210. package/esm/core/utils/units-converters/px.mjs.map +1 -1
  211. package/esm/core/utils/units-converters/rem.mjs.map +1 -1
  212. package/esm/core/utils/vue/component.mjs.map +1 -1
  213. package/esm/core/utils/vue/install.mjs +2 -2
  214. package/esm/core/utils/vue/install.mjs.map +1 -1
  215. package/esm/core/utils/vue/statics.mjs +35 -0
  216. package/esm/core/utils/vue/statics.mjs.map +1 -0
  217. package/esm/index.mjs +6 -4
  218. package/esm/index.mjs.map +1 -1
  219. package/lib/components/button/button-group/button-group.utils.d.ts +6 -0
  220. package/lib/components/button/button-group-section/button-group-section.utils.d.ts +7 -0
  221. package/lib/components/button/button.utils.d.ts +9 -0
  222. package/lib/components/button/index.d.ts +7 -7
  223. package/lib/components/grid/grid.utils.d.ts +9 -0
  224. package/lib/components/grid/index.d.ts +6 -5
  225. package/lib/components/group/group.utils.d.ts +7 -0
  226. package/lib/components/group/index.d.ts +3 -2
  227. package/lib/components/loader/index.d.ts +3 -2
  228. package/lib/components/loader/loader.utils.d.ts +9 -0
  229. package/lib/components/simple-grid/index.d.ts +3 -2
  230. package/lib/components/stack/index.d.ts +6 -0
  231. package/lib/components/stack/stack.types.d.ts +29 -0
  232. package/lib/components/stack/stack.utils.d.ts +6 -0
  233. package/lib/components/text/index.d.ts +3 -2
  234. package/lib/components/text/text.utils.d.ts +8 -0
  235. package/lib/components/unstyled-button/index.d.ts +3 -2
  236. package/lib/core/config-provider/color-functions/index.d.ts +1 -1
  237. package/lib/core/config-provider/color-functions/rgba/rgba.d.ts +1 -0
  238. package/lib/core/config-provider/index.d.ts +2 -0
  239. package/lib/core/config-provider/merge-theme-overrides/merge-theme-overrides.d.ts +2 -0
  240. package/lib/core/config-provider/use-component-props/use-component-props.d.ts +7 -0
  241. package/lib/core/responsive-style-manager/responsive-style-manager.d.ts +1 -0
  242. package/lib/core/styles-api/index.d.ts +1 -1
  243. package/lib/core/styles-api/use-styles/get-class-name/get-options-class-names/get-options-class-names.d.ts +1 -1
  244. package/lib/core/styles-api/use-styles/get-class-name/get-resolved-class-names/get-resolved-class-names.d.ts +1 -1
  245. package/lib/core/styles-api/use-styles/get-class-name/get-static-class-names/get-static-class-names.d.ts +1 -1
  246. package/lib/core/styles-api/use-styles/get-class-name/get-variant-class-name/get-variant-class-name.d.ts +1 -1
  247. package/lib/core/utils/deep-merge/deep-merge.d.ts +1 -0
  248. package/lib/core/utils/index.d.ts +4 -5
  249. package/lib/core/utils/vue/index.d.ts +1 -0
  250. package/lib/core/utils/vue/statics.d.ts +14 -0
  251. package/lib/core/utils/vue/typescript.d.ts +8 -0
  252. package/package.json +2 -1
  253. package/styles/loader.css +1 -2
  254. package/styles/loader.layer.css +1 -2
  255. package/styles/stack.css +7 -0
  256. package/styles/stack.layer.css +8 -0
  257. package/styles.css +9 -2
  258. package/styles.layer.css +9 -2
  259. package/cjs/components/loader/use-loader.cjs +0 -10
  260. package/cjs/components/loader/use-loader.cjs.map +0 -1
  261. package/cjs/core/utils/color.cjs +0 -112
  262. package/cjs/core/utils/color.cjs.map +0 -1
  263. package/cjs/core/utils/dom/style.cjs +0 -13
  264. package/cjs/core/utils/dom/style.cjs.map +0 -1
  265. package/esm/components/loader/use-loader.mjs +0 -10
  266. package/esm/components/loader/use-loader.mjs.map +0 -1
  267. package/esm/core/utils/color.mjs +0 -110
  268. package/esm/core/utils/color.mjs.map +0 -1
  269. package/esm/core/utils/dom/style.mjs +0 -12
  270. package/esm/core/utils/dom/style.mjs.map +0 -1
  271. package/lib/core/utils/color.d.ts +0 -11
  272. package/lib/core/utils/dom/index.d.ts +0 -1
  273. package/lib/core/utils/dom/style.d.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"button.cjs","names":[],"sources":["../../../src/components/button/button.vue"],"sourcesContent":["<template>\n <unstyled-button\n v-bind=\"mergedRootAttrs\"\n :disabled=\"disabled || loading\"\n :unstyled=\"unstyled\"\n :mod=\"modList\"\n >\n <c-transition\n v-if=\"typeof props.loading === 'boolean'\"\n :mounted=\"props.loading\"\n :transition=\"loaderTransition\"\n :duration=\"150\"\n >\n <template #default=\"{ styles }\">\n <c-box tag=\"span\" v-bind=\"getStyles('loader', { style: styles })\" aria-hidden=\"true\">\n <c-loader\n color=\"var(--button-color)\"\n size=\"calc(var(--button-height) / 1.8)\"\n v-bind=\"props.loaderProps\"\n ></c-loader>\n </c-box>\n </template>\n </c-transition>\n\n <c-box tag=\"span\" v-bind=\"innerAttrs\">\n <c-box\n v-if=\"$slots['left-section']\"\n v-bind=\"sectionAttrs\"\n tag=\"span\"\n :mod=\"{ position: 'left' }\"\n >\n <slot name=\"left-section\"></slot>\n </c-box>\n <c-box v-else-if=\"leftSection\" v-bind=\"sectionAttrs\" tag=\"span\" :mod=\"{ position: 'left' }\">\n <!-- TODO -->\n <component :is=\"leftSection\" />\n </c-box>\n <c-box v-bind=\"labelAttrs\" tag=\"span\" :mod=\"{ loading }\">\n <slot />\n </c-box>\n <c-box\n v-if=\"$slots['right-section']\"\n v-bind=\"sectionAttrs\"\n tag=\"span\"\n :mod=\"{ position: 'right' }\"\n >\n <slot name=\"right-section\"></slot>\n </c-box>\n <c-box v-else-if=\"rightSection\" v-bind=\"sectionAttrs\" tag=\"span\" :mod=\"{ position: 'right' }\">\n <!-- TODO -->\n <component :is=\"rightSection\" />\n </c-box>\n </c-box>\n </unstyled-button>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, useSlots } from 'vue'\nimport {\n CBox,\n createVarsResolver,\n getFontSize,\n getRadius,\n getSize,\n rem,\n useStyles,\n} from '../../core'\nimport { UnstyledButton } from '../unstyled-button'\nimport { ButtonFactory, type ButtonProps } from './button.types'\nimport classes from './button.module.css'\nimport { CLoader } from '../loader'\nimport { CTransition, CckTransition } from '../transition'\n\ndefineOptions({\n name: 'CButton',\n})\n\ndefineSlots<{\n 'left-section': any\n 'right-section': any\n default: any\n}>()\n\nconst slots = useSlots()\n\nconst hasLeftSlot = computed(() => !!slots['left-section'])\nconst hasRightSlot = computed(() => !!slots['right-section'])\n\nconst loaderTransition: CckTransition = {\n in: { opacity: 1, transform: `translate(-50%, calc(-50% + ${rem(1)}))` },\n out: { opacity: 0, transform: 'translate(-50%, -200%)' },\n common: { transformOrigin: 'center' },\n transitionProperty: 'transform, opacity',\n}\n\nconst varsResolver = createVarsResolver<ButtonFactory>(\n (theme, { radius, color, gradient, variant, size, justify, autoContrast }) => {\n const colors = theme.variantColorResolver({\n color: color || theme.primaryColor,\n theme,\n gradient,\n variant: variant || 'default',\n autoContrast,\n })\n\n return {\n root: {\n '--button-justify': justify,\n '--button-height': getSize(size, 'button-height'),\n '--button-padding-x': getSize(size, 'button-padding-x'),\n '--button-fz': size?.includes('compact')\n ? getFontSize(size.replace('compact-', ''))\n : getFontSize(size),\n '--button-radius': radius === undefined ? undefined : getRadius(radius),\n '--button-bg': color || variant ? colors.background : undefined,\n '--button-hover': color || variant ? colors.hover : undefined,\n '--button-color': colors.color,\n '--button-bd': color || variant ? colors.border : undefined,\n '--button-hover-color': color || variant ? colors.hoverColor : undefined,\n },\n }\n }\n)\n\nconst props = defineProps<ButtonProps>()\n\nconst knownProps = [\n 'style',\n 'vars',\n 'className',\n 'color',\n 'disabled',\n 'leftSection',\n 'rightSection',\n 'fullWidth',\n 'radius',\n 'loading',\n 'loaderProps',\n 'gradient',\n 'classNames',\n 'styles',\n 'unstyled',\n 'dataDisabled',\n 'autoContrast',\n 'mod',\n 'attributes',\n]\n\nconst getStyles = useStyles<ButtonFactory>({\n name: 'Button',\n props,\n classes,\n className: props.className,\n style: props.style,\n classNames: props.classNames,\n styles: props.styles,\n unstyled: props.unstyled,\n attributes: props.attributes,\n vars: props.vars,\n varsResolver,\n})\n\nconst rootAttrs = computed(() =>\n getStyles('root', { active: !props.disabled && !props.loading && !props.dataDisabled })\n)\nconst mergedRootAttrs = computed(() => {\n const others: Record<string, any> = {}\n for (const key in props) {\n if (!knownProps.includes(key)) {\n others[key] = props[key as keyof typeof props]\n }\n }\n return { ...others, ...rootAttrs.value }\n})\n\nconst innerAttrs = computed(() => getStyles('inner'))\nconst sectionAttrs = computed(() => getStyles('section'))\nconst labelAttrs = computed(() => getStyles('label'))\n\nconst modList = computed(() => [\n {\n disabled: props.disabled || props.dataDisabled,\n loading: props.loading,\n block: props.fullWidth,\n 'with-left-section': hasLeftSlot.value || !!props.leftSection,\n 'with-right-section': hasRightSlot.value || !!props.rightSection,\n },\n])\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmFA,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,eAAA,GAAA,IAAA,SAAA,OAA6B,CAAC,CAAC,MAAM,eAAe;EAC1D,MAAM,gBAAA,GAAA,IAAA,SAAA,OAA8B,CAAC,CAAC,MAAM,gBAAgB;EAE5D,MAAM,mBAAkC;GACtC,IAAI;IAAE,SAAS;IAAG,WAAW,+BAA+B,YAAA,IAAI,CAAC,EAAE;GAAI;GACvE,KAAK;IAAE,SAAS;IAAG,WAAW;GAAyB;GACvD,QAAQ,EAAE,iBAAiB,SAAS;GACpC,oBAAoB;EACtB;EAEA,MAAM,eAAe,6BAAA,oBAClB,OAAO,EAAE,QAAQ,OAAO,UAAU,SAAS,MAAM,SAAS,mBAAmB;GAC5E,MAAM,SAAS,MAAM,qB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EAAA,CAAA"}
1
+ {"version":3,"file":"button.cjs","names":[],"sources":["../../../src/components/button/button.vue"],"sourcesContent":["<template>\n <unstyled-button\n ref=\"_root\"\n v-bind=\"mergedRootAttrs\"\n :disabled=\"disabled || loading\"\n :unstyled=\"unstyled\"\n >\n <c-transition\n v-if=\"typeof props.loading === 'boolean'\"\n :mounted=\"props.loading\"\n :transition=\"loaderTransition\"\n :duration=\"150\"\n >\n <template #default=\"{ styles }\">\n <c-box\n ref=\"_inner\"\n tag=\"span\"\n v-bind=\"getStyles('loader', { style: styles })\"\n aria-hidden=\"true\"\n >\n <c-loader\n color=\"var(--button-color)\"\n size=\"calc(var(--button-height) / 1.8)\"\n v-bind=\"props.loaderProps\"\n ></c-loader>\n </c-box>\n </template>\n </c-transition>\n\n <c-box tag=\"span\" v-bind=\"innerAttrs\">\n <c-box\n v-if=\"$slots['left-section']\"\n v-bind=\"sectionAttrs\"\n tag=\"span\"\n :mod=\"{ position: 'left' }\"\n >\n <slot name=\"left-section\"></slot>\n </c-box>\n <c-box v-else-if=\"leftSection\" v-bind=\"sectionAttrs\" tag=\"span\" :mod=\"{ position: 'left' }\">\n <!-- TODO -->\n <component :is=\"leftSection\" />\n </c-box>\n <c-box ref=\"_label\" v-bind=\"labelAttrs\" tag=\"span\" :mod=\"{ loading }\">\n <slot />\n </c-box>\n <c-box\n v-if=\"$slots['right-section']\"\n v-bind=\"sectionAttrs\"\n tag=\"span\"\n :mod=\"{ position: 'right' }\"\n >\n <slot name=\"right-section\"></slot>\n </c-box>\n <c-box v-else-if=\"rightSection\" v-bind=\"sectionAttrs\" tag=\"span\" :mod=\"{ position: 'right' }\">\n <!-- TODO -->\n <component :is=\"rightSection\" />\n </c-box>\n </c-box>\n </unstyled-button>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots } from 'vue'\nimport { CBox, rem, useComponentProps, useStyles } from '../../core'\nimport { UnstyledButton } from '../unstyled-button'\nimport { ButtonFactory, type ButtonProps } from './button.types'\nimport { varsResolver } from './button.utils'\nimport classes from './button.module.css'\nimport { CLoader } from '../loader'\nimport { CTransition, CckTransition } from '../transition'\n\ndefineOptions({\n name: 'CButton',\n})\n\ndefineSlots<{\n 'left-section': any\n 'right-section': any\n default: any\n}>()\n\nconst _root = ref<InstanceType<typeof UnstyledButton> | null>(null)\nconst _inner = ref<HTMLSpanElement | null>(null)\nconst _label = ref<HTMLSpanElement | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst hasLeftSlot = computed(() => !!slots['left-section'])\nconst hasRightSlot = computed(() => !!slots['right-section'])\n\nconst loaderTransition: CckTransition = {\n in: { opacity: 1, transform: `translate(-50%, calc(-50% + ${rem(1)}))` },\n out: { opacity: 0, transform: 'translate(-50%, -200%)' },\n common: { transformOrigin: 'center' },\n transitionProperty: 'transform, opacity',\n}\n\nconst rawProps = defineProps<ButtonProps>()\n\nconst props = useComponentProps({\n component: 'CButton',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'style',\n 'vars',\n 'className',\n 'color',\n 'disabled',\n 'leftSection',\n 'rightSection',\n 'fullWidth',\n 'radius',\n 'loading',\n 'loaderProps',\n 'gradient',\n 'classNames',\n 'styles',\n 'unstyled',\n 'dataDisabled',\n 'autoContrast',\n 'mod',\n 'attributes',\n]\n\nconst getStyles = useStyles<ButtonFactory>({\n name: 'Button',\n props: { ...props.value, ...attrs } as ButtonProps,\n classes,\n className: props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n})\n\nconst modList = computed(() => [\n {\n disabled: props.value.disabled || props.value.dataDisabled,\n },\n { loading: props.value.loading },\n { block: props.value.fullWidth },\n { 'with-left-section': hasLeftSlot.value || !!props.value.leftSection },\n { 'with-right-section': hasRightSlot.value || !!props.value.rightSection },\n])\n\nconst rootAttrs = computed(() =>\n getStyles('root', {\n active: !props.value.disabled && !props.value.loading && !props.value.dataDisabled,\n })\n)\nconst mergedRootAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [\n ...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)),\n ...(modList.value || []),\n ]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\nconst innerAttrs = computed(() => getStyles('inner'))\nconst sectionAttrs = computed(() => getStyles('section'))\nconst labelAttrs = computed(() => getStyles('label'))\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n inner: _inner.value,\n label: _label.value,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiFA,MAAM,SAAA,GAAA,IAAA,IAAA,CAAwD,IAAI;EAClE,MAAM,UAAA,GAAA,IAAA,IAAA,CAAqC,IAAI;EAC/C,MAAM,UAAA,GAAA,IAAA,IAAA,CAAqC,IAAI;EAE/C,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EACvB,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,eAAA,GAAA,IAAA,SAAA,OAA6B,CAAC,CAAC,MAAM,eAAe;EAC1D,MAAM,gBAAA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IAAA,GAAA,IAAA,YAAA,CAMN,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA,EAAA,KAAA,EAAA,GALE,OAAA,cAAY;KACpB,KAAI;KACH,KAAK,EAAA,UAAA,QAAA;;qCAE4B,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,eAAA,CAAA,CAAA;;cAElB,OAAA,iBAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,CAGV,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA,EAAA,KAAA,EAAA,GAHgC,OAAA,cAAY;KAAE,KAAI;KAAQ,KAAK,EAAA,UAAA,QAAA;;qCACxD,EAAA,GAAA,IAAA,mBAAA,CAAb,QAAA,KAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,EAAA,GAAA,IAAA,wBAAA,CACgB,OAAA,YAAY,CAAA,EAAA,CAAA"}
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ const require_get_size = require("../../core/utils/get-size/get-size.cjs");
3
+ //#region packages/@cck-ui/core/src/components/button/button.utils.ts
4
+ const varsResolver = require("../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs").createVarsResolver((theme, { radius, color, gradient, variant, size, justify, autoContrast }) => {
5
+ const colors = theme.variantColorResolver({
6
+ color: color || theme.primaryColor,
7
+ theme,
8
+ gradient,
9
+ variant: variant || "default",
10
+ autoContrast
11
+ });
12
+ return { root: {
13
+ "--button-justify": justify,
14
+ "--button-height": require_get_size.getSize(size, "button-height"),
15
+ "--button-padding-x": require_get_size.getSize(size, "button-padding-x"),
16
+ "--button-fz": size?.includes("compact") ? require_get_size.getFontSize(size.replace("compact-", "")) : require_get_size.getFontSize(size),
17
+ "--button-radius": radius === void 0 ? void 0 : require_get_size.getRadius(radius),
18
+ "--button-bg": color || variant ? colors.background : void 0,
19
+ "--button-hover": color || variant ? colors.hover : void 0,
20
+ "--button-color": colors.color,
21
+ "--button-bd": color || variant ? colors.border : void 0,
22
+ "--button-hover-color": color || variant ? colors.hoverColor : void 0
23
+ } };
24
+ });
25
+ //#endregion
26
+ exports.varsResolver = varsResolver;
27
+
28
+ //# sourceMappingURL=button.utils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.utils.cjs","names":["createVarsResolver","getSize","getFontSize","getRadius"],"sources":["../../../src/components/button/button.utils.ts"],"sourcesContent":["import { createVarsResolver, getFontSize, getRadius, getSize } from '../../core'\nimport { ButtonFactory } from './button.types'\n\nexport const varsResolver = createVarsResolver<ButtonFactory>(\n (theme, { radius, color, gradient, variant, size, justify, autoContrast }) => {\n const colors = theme.variantColorResolver({\n color: color || theme.primaryColor,\n theme,\n gradient,\n variant: variant || 'default',\n autoContrast,\n })\n\n return {\n root: {\n '--button-justify': justify,\n '--button-height': getSize(size, 'button-height'),\n '--button-padding-x': getSize(size, 'button-padding-x'),\n '--button-fz': size?.includes('compact')\n ? getFontSize(size.replace('compact-', ''))\n : getFontSize(size),\n '--button-radius': radius === undefined ? undefined : getRadius(radius),\n '--button-bg': color || variant ? colors.background : undefined,\n '--button-hover': color || variant ? colors.hover : undefined,\n '--button-color': colors.color,\n '--button-bd': color || variant ? colors.border : undefined,\n '--button-hover-color': color || variant ? colors.hoverColor : undefined,\n },\n }\n }\n)\n"],"mappings":";;;AAGA,MAAa,4FAAeA,CAAAA,CAAAA,oBACzB,OAAO,EAAE,QAAQ,OAAO,UAAU,SAAS,MAAM,SAAS,mBAAmB;CAC5E,MAAM,SAAS,MAAM,qBAAqB;EACxC,OAAO,SAAS,MAAM;EACtB;EACA;EACA,SAAS,WAAW;EACpB;CACF,CAAC;CAED,OAAO,EACL,MAAM;EACJ,oBAAoB;EACpB,mBAAmBC,iBAAAA,QAAQ,MAAM,eAAe;EAChD,sBAAsBA,iBAAAA,QAAQ,MAAM,kBAAkB;EACtD,eAAe,MAAM,SAAS,SAAS,IACnCC,iBAAAA,YAAY,KAAK,QAAQ,YAAY,EAAE,CAAC,IACxCA,iBAAAA,YAAY,IAAI;EACpB,mBAAmB,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;EACtE,eAAe,SAAS,UAAU,OAAO,aAAa,KAAA;EACtD,kBAAkB,SAAS,UAAU,OAAO,QAAQ,KAAA;EACpD,kBAAkB,OAAO;EACzB,eAAe,SAAS,UAAU,OAAO,SAAS,KAAA;EAClD,wBAAwB,SAAS,UAAU,OAAO,aAAa,KAAA;CACjE,EACF;AACF,CACF"}
@@ -1,14 +1,22 @@
1
1
  "use client";
2
2
  const require_install = require("../../core/utils/vue/install.cjs");
3
+ const require_statics = require("../../core/utils/vue/statics.cjs");
4
+ const require_button_module = require("./button.module.cjs");
5
+ const require_button_utils = require("./button.utils.cjs");
3
6
  const require_button = require("./button.cjs");
7
+ const require_button_group_section_utils = require("./button-group-section/button-group-section.utils.cjs");
4
8
  const require_button_group_section = require("./button-group-section/button-group-section.cjs");
9
+ const require_button_group_utils = require("./button-group/button-group.utils.cjs");
5
10
  const require_button_group = require("./button-group/button-group.cjs");
6
11
  //#region packages/@cck-ui/core/src/components/button/index.ts
7
- const CButtonGroup = require_install.withInstall(require_button_group.default);
8
- const CButtonGroupSection = require_install.withInstall(require_button_group_section.default);
9
- const CButton = require_install.withInstall(require_button.default, {
10
- ButtonGroup: require_button_group.default,
11
- ButtonGroupSection: require_button_group_section.default
12
+ const ButtonGroupSectionWithStatic = require_statics.withPropsFactory(require_statics.withExtend(require_statics.withVarsResolver(require_statics.withClasses(require_button_group_section.default, require_button_module.default), require_button_group_section_utils.varsResolver)));
13
+ const ButtonGroupWithStatic = require_statics.withPropsFactory(require_statics.withExtend(require_statics.withVarsResolver(require_statics.withClasses(require_button_group.default, require_button_module.default), require_button_group_utils.varsResolver)));
14
+ const ButtonWithStatic = require_statics.withPropsFactory(require_statics.withExtend(require_statics.withVarsResolver(require_statics.withClasses(require_button.default, require_button_module.default), require_button_utils.varsResolver)));
15
+ const CButtonGroup = require_install.withInstall(ButtonGroupWithStatic);
16
+ const CButtonGroupSection = require_install.withInstall(ButtonGroupSectionWithStatic);
17
+ const CButton = require_install.withInstall(ButtonWithStatic, {
18
+ CButtonGroup,
19
+ CButtonGroupSection
12
20
  });
13
21
  //#endregion
14
22
  exports.CButton = CButton;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["withInstall","ButtonGroup","ButtonGroupSection","Button"],"sources":["../../../src/components/button/index.ts"],"sourcesContent":["import { type SFCWithInstall, withInstall } from '../../core'\nimport ButtonGroup from './button-group/button-group.vue'\nimport ButtonGroupSection from './button-group-section/button-group-section.vue'\nimport Button from './button.vue'\n\nexport const CButtonGroup: SFCWithInstall<typeof ButtonGroup> = withInstall(ButtonGroup)\nexport const CButtonGroupSection: SFCWithInstall<typeof ButtonGroupSection> =\n withInstall(ButtonGroupSection)\nexport const CButton: SFCWithInstall<typeof Button> & {\n ButtonGroup: typeof ButtonGroup\n} & { ButtonGroupSection: typeof ButtonGroupSection } = withInstall(Button, {\n ButtonGroup,\n ButtonGroupSection,\n})\nexport default CButton\n\nexport * from './button-group-section/button-group-section.types'\nexport * from './button-group/button-group.types'\nexport * from './button.types'\n"],"mappings":";;;;;;AAKA,MAAa,eAAmDA,gBAAAA,YAAYC,qBAAAA,OAAW;AACvF,MAAa,sBACXD,gBAAAA,YAAYE,6BAAAA,OAAkB;AAChC,MAAa,UAE2CF,gBAAAA,YAAYG,eAAAA,SAAQ;CAC1E,aAAA,qBAAA;CACA,oBAAA,6BAAA;AACF,CAAC"}
1
+ {"version":3,"file":"index.cjs","names":["withPropsFactory","withExtend","withVarsResolver","withClasses","ButtonGroupSection","classes","sectionVarsResolver","ButtonGroup","groupVarsResolver","Button","varsResolver","withInstall"],"sources":["../../../src/components/button/index.ts"],"sourcesContent":["import {\n type SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\nimport ButtonGroup from './button-group/button-group.vue'\nimport ButtonGroupSection from './button-group-section/button-group-section.vue'\nimport Button from './button.vue'\nimport classes from './button.module.css'\n\nimport { varsResolver as sectionVarsResolver } from './button-group-section/button-group-section.utils'\nimport { varsResolver as groupVarsResolver } from './button-group/button-group.utils'\nimport { varsResolver } from './button.utils'\n\nconst ButtonGroupSectionWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(ButtonGroupSection, classes), sectionVarsResolver))\n)\nconst ButtonGroupWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(ButtonGroup, classes), groupVarsResolver))\n)\nconst ButtonWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(Button, classes), varsResolver))\n)\n\nexport const CButtonGroup: SFCWithInstallAndClasses<typeof ButtonGroup, typeof classes> =\n withInstall(ButtonGroupWithStatic)\nexport const CButtonGroupSection: SFCWithInstallAndClasses<\n typeof ButtonGroupSection,\n typeof classes\n> = withInstall(ButtonGroupSectionWithStatic)\nexport const CButton: SFCWithInstallAndClasses<typeof Button, typeof classes> & {\n CButtonGroup: typeof CButtonGroup\n CButtonGroupSection: typeof CButtonGroupSection\n} = withInstall(ButtonWithStatic, {\n CButtonGroup,\n CButtonGroupSection,\n})\n\nexport default CButton\n\nexport * from './button-group-section/button-group-section.types'\nexport * from './button-group/button-group.types'\nexport * from './button.types'\n"],"mappings":";;;;;;;;;;;AAiBA,MAAM,+BAA+BA,gBAAAA,iBACnCC,gBAAAA,WAAWC,gBAAAA,iBAAiBC,gBAAAA,YAAYC,6BAAAA,SAAoBC,sBAAAA,OAAO,GAAGC,mCAAAA,YAAmB,CAAC,CAC5F;AACA,MAAM,wBAAwBN,gBAAAA,iBAC5BC,gBAAAA,WAAWC,gBAAAA,iBAAiBC,gBAAAA,YAAYI,qBAAAA,SAAaF,sBAAAA,OAAO,GAAGG,2BAAAA,YAAiB,CAAC,CACnF;AACA,MAAM,mBAAmBR,gBAAAA,iBACvBC,gBAAAA,WAAWC,gBAAAA,iBAAiBC,gBAAAA,YAAYM,eAAAA,SAAQJ,sBAAAA,OAAO,GAAGK,qBAAAA,YAAY,CAAC,CACzE;AAEA,MAAa,eACXC,gBAAAA,YAAY,qBAAqB;AACnC,MAAa,sBAGTA,gBAAAA,YAAY,4BAA4B;AAC5C,MAAa,UAGTA,gBAAAA,YAAY,kBAAkB;CAChC;CACA;AACF,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
3
3
  const require_export_helper = require("../../../_virtual/_/plugin-vue/export-helper.cjs");
4
+ const require_use_component_props = require("../../../core/config-provider/use-component-props/use-component-props.cjs");
4
5
  const require_responsive_style_manager = require("../../../core/responsive-style-manager/responsive-style-manager.cjs");
5
6
  const require_normalize_number_like_string_prop = require("../../../core/responsive-style-manager/normalize-number-like-string-prop/normalize-number-like-string-prop.cjs");
6
7
  const require_use_random_classname = require("../../../core/box/use-random-classname/use-random-classname.cjs");
@@ -17,8 +18,7 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
17
18
  props: {
18
19
  span: {
19
20
  type: null,
20
- required: false,
21
- default: 12
21
+ required: false
22
22
  },
23
23
  order: {
24
24
  type: null,
@@ -315,8 +315,13 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
315
315
  }
316
316
  },
317
317
  setup(__props, { expose: __expose }) {
318
- __expose();
319
- const props = __props;
318
+ const _col = (0, vue.ref)(null);
319
+ const rawProps = __props;
320
+ const props = require_use_component_props.useComponentProps({
321
+ component: "CCol",
322
+ defaultProps: { span: 12 },
323
+ props: rawProps
324
+ });
320
325
  const knownProps = [
321
326
  "classNames",
322
327
  "className",
@@ -329,29 +334,38 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
329
334
  "align"
330
335
  ];
331
336
  const gridContext = (0, vue.inject)(require_grid_constants.GRID_CONTEXT_KEY);
337
+ if (!gridContext) throw new Error("[@cck-ui/col] CCol component should be wrapped inside CGrid component.");
332
338
  const responsiveClassname = require_use_random_classname.useRandomClassName();
333
- const rootAttrs = (0, vue.computed)(() => gridContext.getStyles("col", {
334
- className: (0, clsx.default)(props.className, responsiveClassname),
335
- style: props.style,
336
- classNames: props.classNames,
337
- styles: props.styles
338
- }));
339
+ const rootAttrs = (0, vue.computed)(() => {
340
+ return gridContext.getStyles("col", {
341
+ className: (0, clsx.default)(props.value.className, responsiveClassname),
342
+ style: props.value.style,
343
+ classNames: props.value.classNames,
344
+ styles: props.value.styles
345
+ });
346
+ });
339
347
  const mergedAttrs = (0, vue.computed)(() => {
340
348
  const others = {};
341
- for (const key in props) if (!knownProps.includes(key)) others[key] = props[key];
349
+ const propsValue = props.value;
350
+ Object.keys(propsValue).forEach((key) => {
351
+ if (!knownProps.includes(key)) others[key] = propsValue[key];
352
+ });
353
+ const userMod = props.value.mod;
354
+ const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)];
342
355
  return {
343
356
  ...others,
357
+ mod: mergedMod,
344
358
  ...rootAttrs.value
345
359
  };
346
360
  });
347
- const _offset = require_normalize_number_like_string_prop.normalizeNumberLikeStringProp(props.offset);
348
- const _order = require_normalize_number_like_string_prop.normalizeNumberLikeStringProp(props.order);
361
+ const _offset = require_normalize_number_like_string_prop.normalizeNumberLikeStringProp(props.value.offset);
362
+ const _order = require_normalize_number_like_string_prop.normalizeNumberLikeStringProp(props.value.order);
349
363
  const colStyle = require_col_custom.useColCustomStyle({
350
364
  selector: responsiveClassname,
351
- align: props.align,
365
+ align: props.value.align,
352
366
  offset: _offset,
353
367
  order: _order,
354
- span: props.span
368
+ span: props.value.span
355
369
  }, gridContext);
356
370
  const currentStyleKey = (0, vue.ref)(null);
357
371
  (0, vue.watchEffect)(() => {
@@ -368,7 +382,10 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
368
382
  (0, vue.onUnmounted)(() => {
369
383
  if (currentStyleKey.value) require_responsive_style_manager.responsiveStyleManager.unregister(currentStyleKey.value);
370
384
  });
385
+ __expose({ root: (0, vue.computed)(() => _col.value?.root ?? null) });
371
386
  const __returned__ = {
387
+ _col,
388
+ rawProps,
372
389
  props,
373
390
  knownProps,
374
391
  gridContext,
@@ -391,7 +408,7 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
391
408
  }
392
409
  });
393
410
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
394
- return (0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.normalizeProps)((0, vue.guardReactiveProps)($setup.mergedAttrs)), {
411
+ return (0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({ ref: "_col" }, $setup.mergedAttrs), {
395
412
  default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
396
413
  _: 3
397
414
  }, 16);
@@ -1 +1 @@
1
- {"version":3,"file":"col.cjs","names":[],"sources":["../../../../src/components/grid/col/col.vue"],"sourcesContent":["<template>\n <c-box v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport cx from 'clsx'\nimport { computed, inject, onUnmounted, ref, watchEffect } from 'vue'\nimport {\n CBox,\n normalizeNumberLikeStringProp,\n responsiveStyleManager,\n useRandomClassName,\n} from '../../../core'\nimport type { ColProps } from './col.types'\nimport { useColCustomStyle } from './col-custom'\nimport { GridContextValue } from '../grid.context'\nimport { GRID_CONTEXT_KEY } from '../grid.constants'\n\ndefineOptions({\n name: 'CCol',\n})\n\nconst props = withDefaults(defineProps<ColProps>(), {\n span: 12,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'vars',\n 'span',\n 'order',\n 'offset',\n 'align',\n]\n\nconst gridContext = inject(GRID_CONTEXT_KEY) as GridContextValue\n\nconst responsiveClassname = useRandomClassName()\n\nconst rootAttrs = computed(() =>\n gridContext.getStyles('col', {\n className: cx(props.className, responsiveClassname),\n style: props.style,\n classNames: props.classNames,\n styles: props.styles,\n })\n)\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n for (const key in props) {\n if (!knownProps.includes(key)) {\n others[key] = props[key as keyof typeof props]\n }\n }\n return { ...others, ...rootAttrs.value }\n})\n\nconst _offset = normalizeNumberLikeStringProp(props.offset)\nconst _order = normalizeNumberLikeStringProp(props.order)\nconst colStyle = useColCustomStyle(\n {\n selector: responsiveClassname,\n align: props.align,\n offset: _offset,\n order: _order,\n span: props.span,\n },\n gridContext\n)\n\nconst currentStyleKey = ref<string | null>(null)\nwatchEffect(() => {\n const cssText = colStyle.value.queryStylesString\n if (cssText) {\n const newKey = responsiveStyleManager.register(cssText)\n if (currentStyleKey.value && currentStyleKey.value !== newKey) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n currentStyleKey.value = newKey\n } else if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n currentStyleKey.value = null\n }\n})\nonUnmounted(() => {\n if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBA,MAAM,QAAQ;EAId,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,eAAA,GAAA,IAAA,OAAA,CAAqB,uBAAA,gBAAgB;EAE3C,MAAM,sBAAsB,6BAAA,mBAAmB;EAE/C,MAAM,aAAA,GAAA,IAAA,SAAA,OACJ,YAAY,UAAU,OAAO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AAA,SAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"col.cjs","names":[],"sources":["../../../../src/components/grid/col/col.vue"],"sourcesContent":["<template>\n <c-box ref=\"_col\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport cx from 'clsx'\nimport { computed, inject, onUnmounted, ref, watchEffect } from 'vue'\nimport {\n CBox,\n normalizeNumberLikeStringProp,\n responsiveStyleManager,\n useComponentProps,\n useRandomClassName,\n} from '../../../core'\nimport type { ColProps } from './col.types'\nimport { useColCustomStyle } from './col-custom'\nimport { GRID_CONTEXT_KEY } from '../grid.constants'\n\ndefineOptions({\n name: 'CCol',\n})\n\nconst _col = ref<InstanceType<typeof CBox> | null>(null)\n\nconst rawProps = defineProps<ColProps>()\n\nconst props = useComponentProps({\n component: 'CCol',\n defaultProps: {\n span: 12,\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'vars',\n 'span',\n 'order',\n 'offset',\n 'align',\n]\n\nconst gridContext = inject(GRID_CONTEXT_KEY)\n\nif (!gridContext) {\n throw new Error('[@cck-ui/col] CCol component should be wrapped inside CGrid component.')\n}\n\nconst responsiveClassname = useRandomClassName()\n\nconst rootAttrs = computed(() => {\n return gridContext.getStyles('col', {\n className: cx(props.value.className, responsiveClassname),\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n })\n})\n\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\nconst _offset = normalizeNumberLikeStringProp(props.value.offset)\nconst _order = normalizeNumberLikeStringProp(props.value.order)\nconst colStyle = useColCustomStyle(\n {\n selector: responsiveClassname,\n align: props.value.align,\n offset: _offset,\n order: _order,\n span: props.value.span,\n },\n gridContext\n)\n\nconst currentStyleKey = ref<string | null>(null)\nwatchEffect(() => {\n const cssText = colStyle.value.queryStylesString\n if (cssText) {\n const newKey = responsiveStyleManager.register(cssText)\n if (currentStyleKey.value && currentStyleKey.value !== newKey) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n currentStyleKey.value = newKey\n } else if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n currentStyleKey.value = null\n }\n})\nonUnmounted(() => {\n if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n})\n\ndefineExpose({\n root: computed(() => _col.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBA,MAAM,QAAA,GAAA,IAAA,IAAA,CAA6C,IAAI;EAEvD,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX,cAAc,EACZ,MAAM,GACR;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,eAAA,GAAA,IAAA,OAAA,CAAqB,uBAAA,gBAAgB;EAE3C,IAAI,CAAC,aACH,MAAM,IAAI,MAAM,wEAAwE;EAG1F,MAAM,sBAAsB,6BAAA,mBAAmB;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WAAW,gBAAgB,KAAK;IACvD,gBAAgB,QAAQ;GAC1B;EACF,CAAC;EACD,CAAA,GAAA,IAAA,YAAA,OAAkB;GAChB,IAAI,gBAAgB,OAClB,iCAAA,uBAAuB,WAAW,gBAAgB,KAAK;EAE3D,CAAC;EAED,SAAa,EACX,OAAA,GAAA,IAAA,SAAA,OAAqB,KAAK,OAAO,QAAQ,IAAI,EAC/C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;mDA9GS,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA,EAFD,KAAI,OAAM,GAAS,OAAA,WAAW,GAAA;kCAC3B,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -1,14 +1,15 @@
1
1
  "use client";
2
2
  const require_is_number_like = require("../../core/utils/is-number-like/is-number-like.cjs");
3
3
  const require_export_helper = require("../../_virtual/_/plugin-vue/export-helper.cjs");
4
+ const require_use_component_props = require("../../core/config-provider/use-component-props/use-component-props.cjs");
4
5
  const require_responsive_style_manager = require("../../core/responsive-style-manager/responsive-style-manager.cjs");
5
6
  const require_use_random_classname = require("../../core/box/use-random-classname/use-random-classname.cjs");
6
7
  const require_index = require("../../core/box/index.cjs");
7
- const require_create_vars_resolver = require("../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs");
8
8
  const require_use_styles = require("../../core/styles-api/use-styles/use-styles.cjs");
9
9
  const require_grid_custom = require("./grid-custom.cjs");
10
10
  const require_grid_constants = require("./grid.constants.cjs");
11
11
  const require_grid_module = require("./grid.module.cjs");
12
+ const require_grid_utils = require("./grid.utils.cjs");
12
13
  let vue = require("vue");
13
14
  //#region packages/@cck-ui/core/src/components/grid/grid.vue
14
15
  const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
@@ -17,8 +18,7 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
17
18
  props: {
18
19
  gap: {
19
20
  type: null,
20
- required: false,
21
- default: "md"
21
+ required: false
22
22
  },
23
23
  rowGap: {
24
24
  type: null,
@@ -42,8 +42,7 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
42
42
  },
43
43
  columns: {
44
44
  type: [Number, String],
45
- required: false,
46
- default: 12
45
+ required: false
47
46
  },
48
47
  overflow: {
49
48
  type: null,
@@ -348,8 +347,19 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
348
347
  }
349
348
  },
350
349
  setup(__props, { expose: __expose }) {
351
- __expose();
352
- const props = __props;
350
+ const _container = (0, vue.ref)(null);
351
+ const _root = (0, vue.ref)(null);
352
+ const _inner = (0, vue.ref)(null);
353
+ const attrs = (0, vue.useAttrs)();
354
+ const rawProps = __props;
355
+ const props = require_use_component_props.useComponentProps({
356
+ component: "CGrid",
357
+ defaultProps: {
358
+ columns: 12,
359
+ gap: "md"
360
+ },
361
+ props: rawProps
362
+ });
353
363
  const knownProps = [
354
364
  "classNames",
355
365
  "className",
@@ -368,31 +378,35 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
368
378
  "type",
369
379
  "attributes"
370
380
  ];
371
- const varsResolver = require_create_vars_resolver.createVarsResolver((_, { justify, align, overflow }) => ({ root: {
372
- "--grid-align": align,
373
- "--grid-justify": justify,
374
- "--grid-overflow": overflow
375
- } }));
376
381
  const getStyles = require_use_styles.useStyles({
377
382
  name: "Grid",
378
383
  classes: require_grid_module.default,
379
- props,
380
- className: props.className,
381
- style: props.style,
382
- classNames: props.classNames,
383
- styles: props.styles,
384
- unstyled: props.unstyled,
385
- attributes: props.attributes,
386
- vars: props.vars,
387
- varsResolver
384
+ props: {
385
+ ...props.value,
386
+ ...attrs
387
+ },
388
+ className: props.value.className,
389
+ style: props.value.style,
390
+ classNames: props.value.classNames,
391
+ styles: props.value.styles,
392
+ unstyled: props.value.unstyled,
393
+ attributes: props.value.attributes,
394
+ vars: props.value.vars,
395
+ varsResolver: require_grid_utils.varsResolver
388
396
  });
389
397
  const responsiveClassname = require_use_random_classname.useRandomClassName();
390
398
  const rootAttrs = (0, vue.computed)(() => getStyles("root", { className: responsiveClassname }));
391
399
  const mergedRootAttrs = (0, vue.computed)(() => {
392
400
  const others = {};
393
- for (const key in props) if (!knownProps.includes(key)) others[key] = props[key];
401
+ const propsValue = props.value;
402
+ Object.keys(propsValue).forEach((key) => {
403
+ if (!knownProps.includes(key)) others[key] = propsValue[key];
404
+ });
405
+ const userMod = props.value.mod;
406
+ const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)];
394
407
  return {
395
408
  ...others,
409
+ mod: mergedMod,
396
410
  ...rootAttrs.value
397
411
  };
398
412
  });
@@ -417,16 +431,16 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
417
431
  (0, vue.onUnmounted)(() => {
418
432
  if (currentStyleKey.value) require_responsive_style_manager.responsiveStyleManager.unregister(currentStyleKey.value);
419
433
  });
420
- const _breakpoints = (0, vue.computed)(() => props.breakpoints);
434
+ const _breakpoints = (0, vue.computed)(() => props.value.breakpoints);
421
435
  const _columns = (0, vue.computed)(() => {
422
- if (!require_is_number_like.isNumberLike(props.columns)) {
423
- console.warn(`[C-Grid] columns should be number or number-like string, got ${props.columns}. Fallback to default columns 12.`);
436
+ if (!require_is_number_like.isNumberLike(props.value.columns)) {
437
+ console.warn(`[C-Grid] columns should be number or number-like string, got ${props.value.columns}. Fallback to default columns 12.`);
424
438
  return 12;
425
439
  }
426
- return Number(props.columns);
440
+ return Number(props.value.columns);
427
441
  });
428
- const _grow = (0, vue.computed)(() => props.grow);
429
- const _type = (0, vue.computed)(() => props.type);
442
+ const _grow = (0, vue.computed)(() => props.value.grow);
443
+ const _type = (0, vue.computed)(() => props.value.type);
430
444
  const context = {
431
445
  getStyles,
432
446
  get breakpoints() {
@@ -443,10 +457,19 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
443
457
  }
444
458
  };
445
459
  (0, vue.provide)(require_grid_constants.GRID_CONTEXT_KEY, context);
460
+ __expose({
461
+ container: (0, vue.computed)(() => _container.value?.root ?? null),
462
+ root: (0, vue.computed)(() => _root.value?.root ?? null),
463
+ inner: (0, vue.computed)(() => _inner.value?.root ?? null)
464
+ });
446
465
  const __returned__ = {
466
+ _container,
467
+ _root,
468
+ _inner,
469
+ attrs,
470
+ rawProps,
447
471
  props,
448
472
  knownProps,
449
- varsResolver,
450
473
  getStyles,
451
474
  responsiveClassname,
452
475
  rootAttrs,
@@ -472,17 +495,23 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
472
495
  }
473
496
  });
474
497
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
475
- return $props.type === "container" && $props.breakpoints ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.normalizeProps)((0, vue.mergeProps)({ key: 0 }, $setup.containerAttrs)), {
476
- default: (0, vue.withCtx)(() => [(0, vue.createVNode)($setup["CBox"], (0, vue.normalizeProps)((0, vue.guardReactiveProps)($setup.mergedRootAttrs)), {
477
- default: (0, vue.withCtx)(() => [(0, vue.createVNode)($setup["CBox"], (0, vue.normalizeProps)((0, vue.guardReactiveProps)($setup.innerAttrs)), {
498
+ return $props.type === "container" && $props.breakpoints ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({
499
+ key: 0,
500
+ ref: "_container"
501
+ }, $setup.containerAttrs), {
502
+ default: (0, vue.withCtx)(() => [(0, vue.createVNode)($setup["CBox"], (0, vue.mergeProps)({ ref: "_root" }, $setup.mergedRootAttrs), {
503
+ default: (0, vue.withCtx)(() => [(0, vue.createVNode)($setup["CBox"], (0, vue.mergeProps)({ ref: "_inner" }, $setup.innerAttrs), {
478
504
  default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
479
505
  _: 3
480
506
  }, 16)]),
481
507
  _: 3
482
508
  }, 16)]),
483
509
  _: 3
484
- }, 16)) : ((0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.normalizeProps)((0, vue.mergeProps)({ key: 1 }, $setup.mergedRootAttrs)), {
485
- default: (0, vue.withCtx)(() => [(0, vue.createVNode)($setup["CBox"], (0, vue.normalizeProps)((0, vue.guardReactiveProps)($setup.innerAttrs)), {
510
+ }, 16)) : ((0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({
511
+ key: 1,
512
+ ref: "_root"
513
+ }, $setup.mergedRootAttrs), {
514
+ default: (0, vue.withCtx)(() => [(0, vue.createVNode)($setup["CBox"], (0, vue.mergeProps)({ ref: "_inner" }, $setup.innerAttrs), {
486
515
  default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
487
516
  _: 3
488
517
  }, 16)]),
@@ -1 +1 @@
1
- {"version":3,"file":"grid.cjs","names":[],"sources":["../../../src/components/grid/grid.vue"],"sourcesContent":["<template>\n <c-box v-if=\"type === 'container' && breakpoints\" v-bind=\"containerAttrs\">\n <c-box v-bind=\"mergedRootAttrs\">\n <c-box v-bind=\"innerAttrs\">\n <slot />\n </c-box>\n </c-box>\n </c-box>\n <template v-else>\n <c-box v-bind=\"mergedRootAttrs\">\n <c-box v-bind=\"innerAttrs\">\n <slot />\n </c-box>\n </c-box>\n </template>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onUnmounted, provide, ref, watchEffect } from 'vue'\nimport {\n CBox,\n createVarsResolver,\n isNumberLike,\n responsiveStyleManager,\n useRandomClassName,\n useStyles,\n} from '../../core'\nimport { useGridCustomStyle } from './grid-custom'\nimport { DEFAULT_COLUMNS, GRID_CONTEXT_KEY } from './grid.constants'\nimport { GridContextValue } from './grid.context'\nimport type { GridFactory, GridProps } from './grid.types'\nimport classes from './grid.module.css'\n\ndefineOptions({\n name: 'CGrid',\n})\n\nconst props = withDefaults(defineProps<GridProps>(), {\n columns: DEFAULT_COLUMNS,\n gap: 'md',\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'grow',\n 'gap',\n 'rowGap',\n 'columnGap',\n 'columns',\n 'align',\n 'justify',\n 'breakpoints',\n 'type',\n 'attributes',\n]\n\nconst varsResolver = createVarsResolver<GridFactory>((_, { justify, align, overflow }) => ({\n root: {\n '--grid-align': align,\n '--grid-justify': justify,\n '--grid-overflow': overflow,\n },\n}))\n\nconst getStyles = useStyles<GridFactory>({\n name: 'Grid',\n classes,\n props,\n className: props.className,\n style: props.style,\n classNames: props.classNames,\n styles: props.styles,\n unstyled: props.unstyled,\n attributes: props.attributes,\n vars: props.vars,\n varsResolver,\n})\n\nconst responsiveClassname = useRandomClassName()\n\nconst rootAttrs = computed(() => getStyles('root', { className: responsiveClassname }))\nconst mergedRootAttrs = computed(() => {\n const others: Record<string, any> = {}\n for (const key in props) {\n if (!knownProps.includes(key)) {\n others[key] = props[key as keyof typeof props]\n }\n }\n return { ...others, ...rootAttrs.value }\n})\n\nconst innerAttrs = computed(() => getStyles('inner'))\n\nconst containerAttrs = computed(() => getStyles('container'))\n\nconst gridStyle = useGridCustomStyle({\n selector: responsiveClassname,\n ...props,\n})\n\nconst currentStyleKey = ref<string | null>(null)\nwatchEffect(() => {\n const cssText = gridStyle.value.queryStylesString\n if (cssText) {\n const newKey = responsiveStyleManager.register(cssText)\n if (currentStyleKey.value && currentStyleKey.value !== newKey) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n currentStyleKey.value = newKey\n } else if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n currentStyleKey.value = null\n }\n})\nonUnmounted(() => {\n if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n})\n\nconst _breakpoints = computed(() => props.breakpoints)\nconst _columns = computed(() => {\n if (!isNumberLike(props.columns)) {\n console.warn(\n `[C-Grid] columns should be number or number-like string, got ${props.columns}. Fallback to default columns ${DEFAULT_COLUMNS}.`\n )\n return DEFAULT_COLUMNS\n }\n\n return Number(props.columns)\n})\nconst _grow = computed(() => props.grow)\nconst _type = computed(() => props.type)\n\nconst context: GridContextValue = {\n getStyles,\n get breakpoints() {\n return _breakpoints.value\n },\n get columns() {\n return _columns.value\n },\n get grow() {\n return _grow.value\n },\n get type() {\n return _type.value\n },\n}\n\nprovide(GRID_CONTEXT_KEY, context)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCA,MAAM,QAAQ;EAKd,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,eAAe,6BAAA,oBAAiC,GAAG,EAAE,SAAS,OAAO,gBAAgB,EACzF,MAAM;GACJ,gBAAgB;GAChB,kBAAkB;GAClB,mBAAmB;EACrB,EACF,EAAE;EAEF,MAAM,YAAY,mBAAA,UAAuB;GACvC,MAAM;GACN,SAAA,oBAAA;GACA;GACA,WAAW,MAAM;GACjB,OAAO,MAAM;GACb,YAAY,MAAM;GAClB,QAAQ,MAAM;GACd,UAAU,MAAM;GAChB,YAAY,MAAM;GAClB,MAAM,MAAM;GACZ;EACF,CAAC;EAED,MAAM,sBAAsB,6BAAA,mBAAmB;EAE/C,MAAM,aAAA,GAAA,IAAA,SAAA,OAA2B,UAAU,QAAQ,EAAE,WAAW,oBAAoB,CAAC,CAAC;EACtF,MAAM,mBAAA,GAAA,IAA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" v-if=\"type === 'container' && breakpoints\" v-bind=\"containerAttrs\">\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\">\n <c-box ref=\"_inner\" v-bind=\"innerAttrs\">\n <slot />\n </c-box>\n </c-box>\n </c-box>\n <template v-else>\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\">\n <c-box ref=\"_inner\" v-bind=\"innerAttrs\">\n <slot />\n </c-box>\n </c-box>\n </template>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onUnmounted, provide, ref, useAttrs, watchEffect } from 'vue'\nimport {\n CBox,\n isNumberLike,\n responsiveStyleManager,\n useComponentProps,\n useRandomClassName,\n useStyles,\n} from '../../core'\nimport { useGridCustomStyle } from './grid-custom'\nimport { DEFAULT_COLUMNS, GRID_CONTEXT_KEY } from './grid.constants'\nimport { GridContextValue } from './grid.context'\nimport type { GridFactory, GridProps } from './grid.types'\nimport classes from './grid.module.css'\nimport { varsResolver } from './grid.utils'\n\ndefineOptions({\n name: 'CGrid',\n})\n\nconst _container = ref<InstanceType<typeof CBox> | null>(null)\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\nconst _inner = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<GridProps>()\n\nconst props = useComponentProps({\n component: 'CGrid',\n defaultProps: {\n columns: DEFAULT_COLUMNS,\n gap: 'md',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'grow',\n 'gap',\n 'rowGap',\n 'columnGap',\n 'columns',\n 'align',\n 'justify',\n 'breakpoints',\n 'type',\n 'attributes',\n]\n\nconst getStyles = useStyles<GridFactory>({\n name: 'Grid',\n classes,\n props: { ...props.value, ...attrs } as GridProps,\n className: props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n})\n\nconst responsiveClassname = useRandomClassName()\n\nconst rootAttrs = computed(() => getStyles('root', { className: responsiveClassname }))\n\nconst mergedRootAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\nconst innerAttrs = computed(() => getStyles('inner'))\n\nconst containerAttrs = computed(() => getStyles('container'))\n\nconst gridStyle = useGridCustomStyle({\n selector: responsiveClassname,\n ...props,\n})\n\nconst currentStyleKey = ref<string | null>(null)\nwatchEffect(() => {\n const cssText = gridStyle.value.queryStylesString\n if (cssText) {\n const newKey = responsiveStyleManager.register(cssText)\n if (currentStyleKey.value && currentStyleKey.value !== newKey) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n currentStyleKey.value = newKey\n } else if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n currentStyleKey.value = null\n }\n})\nonUnmounted(() => {\n if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n})\n\nconst _breakpoints = computed(() => props.value.breakpoints)\nconst _columns = computed(() => {\n if (!isNumberLike(props.value.columns)) {\n console.warn(\n `[C-Grid] columns should be number or number-like string, got ${props.value.columns}. Fallback to default columns ${DEFAULT_COLUMNS}.`\n )\n return DEFAULT_COLUMNS\n }\n\n return Number(props.value.columns)\n})\nconst _grow = computed(() => props.value.grow)\nconst _type = computed(() => props.value.type)\n\nconst context: GridContextValue = {\n getStyles,\n get breakpoints() {\n return _breakpoints.value\n },\n get columns() {\n return _columns.value\n },\n get grow() {\n return _grow.value\n },\n get type() {\n return _type.value\n },\n}\n\nprovide(GRID_CONTEXT_KEY, context)\n\ndefineExpose({\n container: computed(() => _container.value?.root ?? null),\n root: computed(() => _root.value?.root ?? null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AA,GAAA,IAAA,WAAA,CAAA,EAFD,KAAI,SAAQ,GAAS,OAAA,UAAU,GAAA;oCAC5B,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,SAAA,CAAA,CAAA;;;;;;uDASJ,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA;;EAJD,KAAI;IAAgB,OAAA,eAAe,GAAA;kCAGhC,EAAA,GAAA,IAAA,YAAA,CAAA,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA,EAFD,KAAI,SAAQ,GAAS,OAAA,UAAU,GAAA;mCAC5B,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"grid.constants.cjs","names":[],"sources":["../../../src/components/grid/grid.constants.ts"],"sourcesContent":["import { InjectionKey } from 'vue'\nimport { GridContextValue } from './grid.context'\n\nexport const GRID_CONTEXT_KEY: InjectionKey<GridContextValue> =\n Symbol('GridContext')\n\nexport const DEFAULT_COLUMNS = 12\n"],"mappings":";;AAGA,MAAa,mBACX,OAAO,aAAa"}
1
+ {"version":3,"file":"grid.constants.cjs","names":[],"sources":["../../../src/components/grid/grid.constants.ts"],"sourcesContent":["import { InjectionKey } from 'vue'\nimport { GridContextValue } from './grid.context'\n\nexport const GRID_CONTEXT_KEY: InjectionKey<GridContextValue> = Symbol('GridContext')\n\nexport const DEFAULT_COLUMNS = 12\n"],"mappings":";;AAGA,MAAa,mBAAmD,OAAO,aAAa"}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ //#region packages/@cck-ui/core/src/components/grid/grid.utils.ts
3
+ const varsResolver = require("../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs").createVarsResolver((_, { justify, align, overflow }) => ({ root: {
4
+ "--grid-align": align,
5
+ "--grid-justify": justify,
6
+ "--grid-overflow": overflow
7
+ } }));
8
+ //#endregion
9
+ exports.varsResolver = varsResolver;
10
+
11
+ //# sourceMappingURL=grid.utils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid.utils.cjs","names":["createVarsResolver"],"sources":["../../../src/components/grid/grid.utils.ts"],"sourcesContent":["import { createVarsResolver } from '../../core'\nimport { GridFactory } from './grid.types'\n\nexport const varsResolver = createVarsResolver<GridFactory>((_, { justify, align, overflow }) => ({\n root: {\n '--grid-align': align,\n '--grid-justify': justify,\n '--grid-overflow': overflow,\n },\n}))\n"],"mappings":";;AAGA,MAAa,4FAAeA,CAAAA,CAAAA,oBAAiC,GAAG,EAAE,SAAS,OAAO,gBAAgB,EAChG,MAAM;CACJ,gBAAgB;CAChB,kBAAkB;CAClB,mBAAmB;AACrB,EACF,EAAE"}
@@ -1,10 +1,15 @@
1
1
  "use client";
2
2
  const require_install = require("../../core/utils/vue/install.cjs");
3
+ const require_statics = require("../../core/utils/vue/statics.cjs");
4
+ const require_button_utils = require("../button/button.utils.cjs");
5
+ const require_grid_module = require("./grid.module.cjs");
3
6
  const require_grid = require("./grid.cjs");
4
7
  const require_col = require("./col/col.cjs");
5
8
  //#region packages/@cck-ui/core/src/components/grid/index.ts
6
- const CCol = require_install.withInstall(require_col.default);
7
- const CGrid = require_install.withInstall(require_grid.default, { Col: require_col.default });
9
+ const GridWithStatic = require_statics.withPropsFactory(require_statics.withExtend(require_statics.withVarsResolver(require_statics.withClasses(require_grid.default, require_grid_module.default), require_button_utils.varsResolver)));
10
+ const ColWithStatic = require_statics.withPropsFactory(require_statics.withExtend(require_statics.withClasses(require_col.default, require_grid_module.default)));
11
+ const CCol = require_install.withInstall(ColWithStatic);
12
+ const CGrid = require_install.withInstall(GridWithStatic, { Col: require_col.default });
8
13
  //#endregion
9
14
  exports.CCol = CCol;
10
15
  exports.CGrid = CGrid;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["withInstall","Col","Grid"],"sources":["../../../src/components/grid/index.ts"],"sourcesContent":["import { type SFCWithInstall, withInstall } from '../../core'\nimport Grid from './grid.vue'\nimport Col from './col/col.vue'\n\nexport const CCol: SFCWithInstall<typeof Col> = withInstall(Col)\nexport const CGrid: SFCWithInstall<typeof Grid> & { Col: typeof Col } = withInstall(Grid, { Col })\nexport default CGrid\n\nexport * from './col/col.types.js'\nexport * from './grid.types.js'\n"],"mappings":";;;;;AAIA,MAAa,OAAmCA,gBAAAA,YAAYC,YAAAA,OAAG;AAC/D,MAAa,QAA2DD,gBAAAA,YAAYE,aAAAA,SAAM,EAAE,KAAA,YAAA,QAAI,CAAC"}
1
+ {"version":3,"file":"index.cjs","names":["withPropsFactory","withExtend","withVarsResolver","withClasses","Grid","classes","varsResolver","Col","withInstall"],"sources":["../../../src/components/grid/index.ts"],"sourcesContent":["import {\n type SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\nimport Grid from './grid.vue'\nimport Col from './col/col.vue'\nimport classes from './grid.module.css'\nimport { varsResolver } from '../button/button.utils'\n\nconst GridWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(Grid, classes), varsResolver))\n)\nconst ColWithStatic = withPropsFactory(withExtend(withClasses(Col, classes)))\n\nexport const CCol: SFCWithInstallAndClasses<typeof Col> = withInstall(ColWithStatic)\nexport const CGrid: SFCWithInstallAndClasses<typeof Grid, typeof classes> & { Col: typeof Col } =\n withInstall(GridWithStatic, { Col })\nexport default CGrid\n\nexport * from './col/col.types'\nexport * from './grid.types'\n"],"mappings":";;;;;;;;AAaA,MAAM,iBAAiBA,gBAAAA,iBACrBC,gBAAAA,WAAWC,gBAAAA,iBAAiBC,gBAAAA,YAAYC,aAAAA,SAAMC,oBAAAA,OAAO,GAAGC,qBAAAA,YAAY,CAAC,CACvE;AACA,MAAM,gBAAgBN,gBAAAA,iBAAiBC,gBAAAA,WAAWE,gBAAAA,YAAYI,YAAAA,SAAKF,oBAAAA,OAAO,CAAC,CAAC;AAE5E,MAAa,OAA6CG,gBAAAA,YAAY,aAAa;AACnF,MAAa,QACXA,gBAAAA,YAAY,gBAAgB,EAAE,KAAA,YAAA,QAAI,CAAC"}