@cck-ui/core 0.4.9 → 0.5.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 (197) hide show
  1. package/cjs/components/button/button.cjs +71 -63
  2. package/cjs/components/button/button.cjs.map +1 -1
  3. package/cjs/components/button/button.utils.cjs +28 -0
  4. package/cjs/components/button/button.utils.cjs.map +1 -0
  5. package/cjs/components/button/index.cjs +5 -1
  6. package/cjs/components/button/index.cjs.map +1 -1
  7. package/cjs/components/grid/col/col.cjs +33 -16
  8. package/cjs/components/grid/col/col.cjs.map +1 -1
  9. package/cjs/components/grid/grid.cjs +63 -34
  10. package/cjs/components/grid/grid.cjs.map +1 -1
  11. package/cjs/components/grid/grid.constants.cjs.map +1 -1
  12. package/cjs/components/grid/grid.utils.cjs +11 -0
  13. package/cjs/components/grid/grid.utils.cjs.map +1 -0
  14. package/cjs/components/grid/index.cjs +7 -2
  15. package/cjs/components/grid/index.cjs.map +1 -1
  16. package/cjs/components/loader/loader.module.cjs.map +1 -1
  17. package/cjs/components/loader/loaders/bars.cjs +6 -3
  18. package/cjs/components/loader/loaders/bars.cjs.map +1 -1
  19. package/cjs/components/loader/loaders/dots.cjs +6 -3
  20. package/cjs/components/loader/loaders/dots.cjs.map +1 -1
  21. package/cjs/components/loader/loaders/oval.cjs +6 -3
  22. package/cjs/components/loader/loaders/oval.cjs.map +1 -1
  23. package/cjs/components/transition/transition.cjs +1 -1
  24. package/cjs/components/unstyled-button/unstyled-button.cjs +32 -22
  25. package/cjs/components/unstyled-button/unstyled-button.cjs.map +1 -1
  26. package/cjs/core/box/box.cjs +40 -28
  27. package/cjs/core/box/box.cjs.map +1 -1
  28. package/cjs/core/box/get-box-style/get-box-style.cjs.map +1 -1
  29. package/cjs/core/box/style-props/extract-style-props/extract-style-props.cjs.map +1 -1
  30. package/cjs/core/box/style-props/parse-style-props/sort-media-queries.cjs.map +1 -1
  31. package/cjs/core/box/style-props/resolvers/border-resolver/border-resolver.cjs.map +1 -1
  32. package/cjs/core/box/style-props/resolvers/color-resolver/color-resolver.cjs.map +1 -1
  33. package/cjs/core/box/style-props/resolvers/font-family-resolver/font-family-resolver.cjs.map +1 -1
  34. package/cjs/core/box/style-props/resolvers/index.cjs.map +1 -1
  35. package/cjs/core/box/style-props/style-props-data.cjs.map +1 -1
  36. package/cjs/core/config-provider/cck-classes-style/cck-classes-style.cjs +58 -0
  37. package/cjs/core/config-provider/cck-classes-style/cck-classes-style.cjs.map +1 -0
  38. package/cjs/core/config-provider/color-functions/get-gradient/get-gradient.cjs +3 -3
  39. package/cjs/core/config-provider/color-functions/get-gradient/get-gradient.cjs.map +1 -1
  40. package/cjs/core/config-provider/color-functions/rgba/rgba.cjs +8 -0
  41. package/cjs/core/config-provider/color-functions/rgba/rgba.cjs.map +1 -1
  42. package/cjs/core/config-provider/color-functions/to-rgba/to-rgba.cjs.map +1 -1
  43. package/cjs/core/config-provider/config-provider.cjs +39 -24
  44. package/cjs/core/config-provider/config-provider.cjs.map +1 -1
  45. package/cjs/core/config-provider/default-colors.cjs.map +1 -1
  46. package/cjs/core/config-provider/index.cjs +6 -1
  47. package/cjs/core/config-provider/index.cjs.map +1 -1
  48. package/cjs/core/config-provider/merge-cck-theme/merge-cck-theme.cjs +2 -2
  49. package/cjs/core/config-provider/merge-cck-theme/merge-cck-theme.cjs.map +1 -1
  50. package/cjs/core/config-provider/merge-theme-overrides/merge-theme-overrides.cjs +10 -0
  51. package/cjs/core/config-provider/merge-theme-overrides/merge-theme-overrides.cjs.map +1 -0
  52. package/cjs/core/config-provider/use-component-props/use-component-props.cjs +35 -0
  53. package/cjs/core/config-provider/use-component-props/use-component-props.cjs.map +1 -0
  54. package/cjs/core/responsive-style-manager/css-object-to-string/css-object-to-string.cjs.map +1 -1
  55. package/cjs/core/responsive-style-manager/normalize-number-like-string-prop/normalize-number-like-string-prop.cjs +1 -1
  56. package/cjs/core/responsive-style-manager/normalize-number-like-string-prop/normalize-number-like-string-prop.cjs.map +1 -1
  57. package/cjs/core/responsive-style-manager/responsive-style-manager.cjs.map +1 -1
  58. package/cjs/core/responsive-style-manager/styles-to-string/styles-to-string.cjs.map +1 -1
  59. package/cjs/core/styles-api/use-styles/get-class-name/get-options-class-names/get-options-class-names.cjs.map +1 -1
  60. package/cjs/core/styles-api/use-styles/get-class-name/get-resolved-class-names/get-resolved-class-names.cjs.map +1 -1
  61. package/cjs/core/styles-api/use-styles/get-class-name/get-root-class-name/get-root-class-name.cjs.map +1 -1
  62. package/cjs/core/styles-api/use-styles/get-class-name/get-selector-class-name/get-selector-class-name.cjs.map +1 -1
  63. package/cjs/core/styles-api/use-styles/get-class-name/get-static-class-names/get-static-class-names.cjs.map +1 -1
  64. package/cjs/core/styles-api/use-styles/get-class-name/get-variant-class-name/get-variant-class-name.cjs.map +1 -1
  65. package/cjs/core/utils/deep-merge/deep-merge.cjs +18 -0
  66. package/cjs/core/utils/deep-merge/deep-merge.cjs.map +1 -0
  67. package/cjs/core/utils/get-breakpoint-value/get-breakpoint-value.cjs.map +1 -1
  68. package/cjs/core/utils/get-size/get-size.cjs +2 -2
  69. package/cjs/core/utils/get-size/get-size.cjs.map +1 -1
  70. package/cjs/core/utils/get-sorted-breakpoints/get-sorted-breakpoints.cjs.map +1 -1
  71. package/cjs/core/utils/number-like-string-to-number/number-like-string-to-number.cjs.map +1 -1
  72. package/cjs/core/utils/units-converters/px.cjs.map +1 -1
  73. package/cjs/core/utils/units-converters/rem.cjs.map +1 -1
  74. package/cjs/core/utils/vue/component.cjs.map +1 -1
  75. package/cjs/core/utils/vue/install.cjs +3 -3
  76. package/cjs/core/utils/vue/install.cjs.map +1 -1
  77. package/cjs/core/utils/vue/statics.cjs +38 -0
  78. package/cjs/core/utils/vue/statics.cjs.map +1 -0
  79. package/cjs/index.cjs +13 -7
  80. package/cjs/index.cjs.map +1 -1
  81. package/esm/components/button/button.mjs +71 -63
  82. package/esm/components/button/button.mjs.map +1 -1
  83. package/esm/components/button/button.utils.mjs +29 -0
  84. package/esm/components/button/button.utils.mjs.map +1 -0
  85. package/esm/components/button/index.mjs +5 -1
  86. package/esm/components/button/index.mjs.map +1 -1
  87. package/esm/components/grid/col/col.mjs +34 -17
  88. package/esm/components/grid/col/col.mjs.map +1 -1
  89. package/esm/components/grid/grid.constants.mjs.map +1 -1
  90. package/esm/components/grid/grid.mjs +63 -34
  91. package/esm/components/grid/grid.mjs.map +1 -1
  92. package/esm/components/grid/grid.utils.mjs +12 -0
  93. package/esm/components/grid/grid.utils.mjs.map +1 -0
  94. package/esm/components/grid/index.mjs +6 -2
  95. package/esm/components/grid/index.mjs.map +1 -1
  96. package/esm/components/loader/loader.module.mjs.map +1 -1
  97. package/esm/components/loader/loaders/bars.mjs +7 -4
  98. package/esm/components/loader/loaders/bars.mjs.map +1 -1
  99. package/esm/components/loader/loaders/dots.mjs +7 -4
  100. package/esm/components/loader/loaders/dots.mjs.map +1 -1
  101. package/esm/components/loader/loaders/oval.mjs +7 -4
  102. package/esm/components/loader/loaders/oval.mjs.map +1 -1
  103. package/esm/components/transition/transition.mjs +1 -1
  104. package/esm/components/unstyled-button/unstyled-button.mjs +33 -23
  105. package/esm/components/unstyled-button/unstyled-button.mjs.map +1 -1
  106. package/esm/core/box/box.mjs +41 -29
  107. package/esm/core/box/box.mjs.map +1 -1
  108. package/esm/core/box/get-box-style/get-box-style.mjs.map +1 -1
  109. package/esm/core/box/style-props/extract-style-props/extract-style-props.mjs.map +1 -1
  110. package/esm/core/box/style-props/parse-style-props/sort-media-queries.mjs.map +1 -1
  111. package/esm/core/box/style-props/resolvers/border-resolver/border-resolver.mjs.map +1 -1
  112. package/esm/core/box/style-props/resolvers/color-resolver/color-resolver.mjs.map +1 -1
  113. package/esm/core/box/style-props/resolvers/font-family-resolver/font-family-resolver.mjs.map +1 -1
  114. package/esm/core/box/style-props/resolvers/index.mjs.map +1 -1
  115. package/esm/core/box/style-props/style-props-data.mjs.map +1 -1
  116. package/esm/core/config-provider/cck-classes-style/cck-classes-style.mjs +58 -0
  117. package/esm/core/config-provider/cck-classes-style/cck-classes-style.mjs.map +1 -0
  118. package/esm/core/config-provider/color-functions/get-gradient/get-gradient.mjs +3 -3
  119. package/esm/core/config-provider/color-functions/get-gradient/get-gradient.mjs.map +1 -1
  120. package/esm/core/config-provider/color-functions/rgba/rgba.mjs +8 -1
  121. package/esm/core/config-provider/color-functions/rgba/rgba.mjs.map +1 -1
  122. package/esm/core/config-provider/color-functions/to-rgba/to-rgba.mjs.map +1 -1
  123. package/esm/core/config-provider/config-provider.mjs +40 -25
  124. package/esm/core/config-provider/config-provider.mjs.map +1 -1
  125. package/esm/core/config-provider/default-colors.mjs.map +1 -1
  126. package/esm/core/config-provider/index.mjs +5 -3
  127. package/esm/core/config-provider/index.mjs.map +1 -1
  128. package/esm/core/config-provider/merge-cck-theme/merge-cck-theme.mjs +2 -2
  129. package/esm/core/config-provider/merge-cck-theme/merge-cck-theme.mjs.map +1 -1
  130. package/esm/core/config-provider/merge-theme-overrides/merge-theme-overrides.mjs +10 -0
  131. package/esm/core/config-provider/merge-theme-overrides/merge-theme-overrides.mjs.map +1 -0
  132. package/esm/core/config-provider/use-component-props/use-component-props.mjs +35 -0
  133. package/esm/core/config-provider/use-component-props/use-component-props.mjs.map +1 -0
  134. package/esm/core/responsive-style-manager/css-object-to-string/css-object-to-string.mjs.map +1 -1
  135. package/esm/core/responsive-style-manager/normalize-number-like-string-prop/normalize-number-like-string-prop.mjs +1 -1
  136. package/esm/core/responsive-style-manager/normalize-number-like-string-prop/normalize-number-like-string-prop.mjs.map +1 -1
  137. package/esm/core/responsive-style-manager/responsive-style-manager.mjs.map +1 -1
  138. package/esm/core/responsive-style-manager/styles-to-string/styles-to-string.mjs.map +1 -1
  139. package/esm/core/styles-api/use-styles/get-class-name/get-options-class-names/get-options-class-names.mjs.map +1 -1
  140. package/esm/core/styles-api/use-styles/get-class-name/get-resolved-class-names/get-resolved-class-names.mjs.map +1 -1
  141. package/esm/core/styles-api/use-styles/get-class-name/get-root-class-name/get-root-class-name.mjs.map +1 -1
  142. package/esm/core/styles-api/use-styles/get-class-name/get-selector-class-name/get-selector-class-name.mjs.map +1 -1
  143. package/esm/core/styles-api/use-styles/get-class-name/get-static-class-names/get-static-class-names.mjs.map +1 -1
  144. package/esm/core/styles-api/use-styles/get-class-name/get-variant-class-name/get-variant-class-name.mjs.map +1 -1
  145. package/esm/core/utils/deep-merge/deep-merge.mjs +18 -0
  146. package/esm/core/utils/deep-merge/deep-merge.mjs.map +1 -0
  147. package/esm/core/utils/get-breakpoint-value/get-breakpoint-value.mjs.map +1 -1
  148. package/esm/core/utils/get-size/get-size.mjs +2 -2
  149. package/esm/core/utils/get-size/get-size.mjs.map +1 -1
  150. package/esm/core/utils/get-sorted-breakpoints/get-sorted-breakpoints.mjs.map +1 -1
  151. package/esm/core/utils/number-like-string-to-number/number-like-string-to-number.mjs.map +1 -1
  152. package/esm/core/utils/units-converters/px.mjs.map +1 -1
  153. package/esm/core/utils/units-converters/rem.mjs.map +1 -1
  154. package/esm/core/utils/vue/component.mjs.map +1 -1
  155. package/esm/core/utils/vue/install.mjs +2 -2
  156. package/esm/core/utils/vue/install.mjs.map +1 -1
  157. package/esm/core/utils/vue/statics.mjs +35 -0
  158. package/esm/core/utils/vue/statics.mjs.map +1 -0
  159. package/esm/index.mjs +7 -5
  160. package/esm/index.mjs.map +1 -1
  161. package/lib/components/button/button.utils.d.ts +9 -0
  162. package/lib/components/button/index.d.ts +3 -3
  163. package/lib/components/grid/grid.utils.d.ts +9 -0
  164. package/lib/components/grid/index.d.ts +6 -5
  165. package/lib/core/config-provider/cck-classes-style/index.d.ts +2 -0
  166. package/lib/core/config-provider/color-functions/index.d.ts +1 -1
  167. package/lib/core/config-provider/color-functions/rgba/rgba.d.ts +1 -0
  168. package/lib/core/config-provider/index.d.ts +2 -0
  169. package/lib/core/config-provider/merge-theme-overrides/merge-theme-overrides.d.ts +2 -0
  170. package/lib/core/config-provider/use-component-props/use-component-props.d.ts +7 -0
  171. package/lib/core/responsive-style-manager/responsive-style-manager.d.ts +1 -0
  172. package/lib/core/styles-api/index.d.ts +1 -1
  173. package/lib/core/styles-api/use-styles/get-class-name/get-options-class-names/get-options-class-names.d.ts +1 -1
  174. package/lib/core/styles-api/use-styles/get-class-name/get-resolved-class-names/get-resolved-class-names.d.ts +1 -1
  175. package/lib/core/styles-api/use-styles/get-class-name/get-static-class-names/get-static-class-names.d.ts +1 -1
  176. package/lib/core/styles-api/use-styles/get-class-name/get-variant-class-name/get-variant-class-name.d.ts +1 -1
  177. package/lib/core/utils/deep-merge/deep-merge.d.ts +1 -0
  178. package/lib/core/utils/index.d.ts +4 -5
  179. package/lib/core/utils/vue/index.d.ts +1 -0
  180. package/lib/core/utils/vue/statics.d.ts +14 -0
  181. package/lib/core/utils/vue/typescript.d.ts +8 -0
  182. package/package.json +2 -1
  183. package/styles/loader.css +1 -2
  184. package/styles/loader.layer.css +1 -2
  185. package/styles.css +1 -2
  186. package/styles.layer.css +1 -2
  187. package/cjs/core/utils/color.cjs +0 -112
  188. package/cjs/core/utils/color.cjs.map +0 -1
  189. package/cjs/core/utils/dom/style.cjs +0 -13
  190. package/cjs/core/utils/dom/style.cjs.map +0 -1
  191. package/esm/core/utils/color.mjs +0 -110
  192. package/esm/core/utils/color.mjs.map +0 -1
  193. package/esm/core/utils/dom/style.mjs +0 -12
  194. package/esm/core/utils/dom/style.mjs.map +0 -1
  195. package/lib/core/utils/color.d.ts +0 -11
  196. package/lib/core/utils/dom/index.d.ts +0 -1
  197. package/lib/core/utils/dom/style.d.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"style-props-data.cjs","names":[],"sources":["../../../../src/core/box/style-props/style-props-data.ts"],"sourcesContent":["import { StylePropType } from './resolvers'\nimport { CStyleProps } from './style-props.types'\n\nexport interface SystemPropData {\n type: StylePropType\n property: string | string[]\n}\n\nexport const STYLE_PROPS_DATA: Record<keyof CStyleProps, SystemPropData> = {\n m: { type: 'spacing', property: 'margin' },\n mt: { type: 'spacing', property: 'marginTop' },\n mb: { type: 'spacing', property: 'marginBottom' },\n ml: { type: 'spacing', property: 'marginLeft' },\n mr: { type: 'spacing', property: 'marginRight' },\n ms: { type: 'spacing', property: 'marginInlineStart' },\n me: { type: 'spacing', property: 'marginInlineEnd' },\n mis: { type: 'spacing', property: 'marginInlineStart' },\n mie: { type: 'spacing', property: 'marginInlineEnd' },\n mx: { type: 'spacing', property: 'marginInline' },\n my: { type: 'spacing', property: 'marginBlock' },\n\n p: { type: 'spacing', property: 'padding' },\n pt: { type: 'spacing', property: 'paddingTop' },\n pb: { type: 'spacing', property: 'paddingBottom' },\n pl: { type: 'spacing', property: 'paddingLeft' },\n pr: { type: 'spacing', property: 'paddingRight' },\n ps: { type: 'spacing', property: 'paddingInlineStart' },\n pe: { type: 'spacing', property: 'paddingInlineEnd' },\n pis: { type: 'spacing', property: 'paddingInlineStart' },\n pie: { type: 'spacing', property: 'paddingInlineEnd' },\n px: { type: 'spacing', property: 'paddingInline' },\n py: { type: 'spacing', property: 'paddingBlock' },\n\n bd: { type: 'border', property: 'border' },\n bdrs: { type: 'radius', property: 'borderRadius' },\n bg: { type: 'color', property: 'background' },\n c: { type: 'textColor', property: 'color' },\n opacity: { type: 'identity', property: 'opacity' },\n\n ff: { type: 'fontFamily', property: 'fontFamily' },\n fz: { type: 'fontSize', property: 'fontSize' },\n fw: { type: 'identity', property: 'fontWeight' },\n lts: { type: 'size', property: 'letterSpacing' },\n ta: { type: 'identity', property: 'textAlign' },\n lh: { type: 'lineHeight', property: 'lineHeight' },\n fs: { type: 'identity', property: 'fontStyle' },\n tt: { type: 'identity', property: 'textTransform' },\n td: { type: 'identity', property: 'textDecoration' },\n\n w: { type: 'spacing', property: 'width' },\n miw: { type: 'spacing', property: 'minWidth' },\n maw: { type: 'spacing', property: 'maxWidth' },\n h: { type: 'spacing', property: 'height' },\n mih: { type: 'spacing', property: 'minHeight' },\n mah: { type: 'spacing', property: 'maxHeight' },\n\n bgsz: { type: 'size', property: 'backgroundSize' },\n bgp: { type: 'identity', property: 'backgroundPosition' },\n bgr: { type: 'identity', property: 'backgroundRepeat' },\n bga: { type: 'identity', property: 'backgroundAttachment' },\n\n pos: { type: 'identity', property: 'position' },\n top: { type: 'size', property: 'top' },\n left: { type: 'size', property: 'left' },\n bottom: { type: 'size', property: 'bottom' },\n right: { type: 'size', property: 'right' },\n inset: { type: 'size', property: 'inset' },\n\n display: { type: 'identity', property: 'display' },\n flex: { type: 'identity', property: 'flex' }\n}\n"],"mappings":";;AAQA,MAAa,mBAA8D;CACzE,GAAG;EAAE,MAAM;EAAW,UAAU;CAAS;CACzC,IAAI;EAAE,MAAM;EAAW,UAAU;CAAY;CAC7C,IAAI;EAAE,MAAM;EAAW,UAAU;CAAe;CAChD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAa;CAC9C,IAAI;EAAE,MAAM;EAAW,UAAU;CAAc;CAC/C,IAAI;EAAE,MAAM;EAAW,UAAU;CAAoB;CACrD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAkB;CACnD,KAAK;EAAE,MAAM;EAAW,UAAU;CAAoB;CACtD,KAAK;EAAE,MAAM;EAAW,UAAU;CAAkB;CACpD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAe;CAChD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAc;CAE/C,GAAG;EAAE,MAAM;EAAW,UAAU;CAAU;CAC1C,IAAI;EAAE,MAAM;EAAW,UAAU;CAAa;CAC9C,IAAI;EAAE,MAAM;EAAW,UAAU;CAAgB;CACjD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAc;CAC/C,IAAI;EAAE,MAAM;EAAW,UAAU;CAAe;CAChD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAqB;CACtD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAmB;CACpD,KAAK;EAAE,MAAM;EAAW,UAAU;CAAqB;CACvD,KAAK;EAAE,MAAM;EAAW,UAAU;CAAmB;CACrD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAgB;CACjD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAe;CAEhD,IAAI;EAAE,MAAM;EAAU,UAAU;CAAS;CACzC,MAAM;EAAE,MAAM;EAAU,UAAU;CAAe;CACjD,IAAI;EAAE,MAAM;EAAS,UAAU;CAAa;CAC5C,GAAG;EAAE,MAAM;EAAa,UAAU;CAAQ;CAC1C,SAAS;EAAE,MAAM;EAAY,UAAU;CAAU;CAEjD,IAAI;EAAE,MAAM;EAAc,UAAU;CAAa;CACjD,IAAI;EAAE,MAAM;EAAY,UAAU;CAAW;CAC7C,IAAI;EAAE,MAAM;EAAY,UAAU;CAAa;CAC/C,KAAK;EAAE,MAAM;EAAQ,UAAU;CAAgB;CAC/C,IAAI;EAAE,MAAM;EAAY,UAAU;CAAY;CAC9C,IAAI;EAAE,MAAM;EAAc,UAAU;CAAa;CACjD,IAAI;EAAE,MAAM;EAAY,UAAU;CAAY;CAC9C,IAAI;EAAE,MAAM;EAAY,UAAU;CAAgB;CAClD,IAAI;EAAE,MAAM;EAAY,UAAU;CAAiB;CAEnD,GAAG;EAAE,MAAM;EAAW,UAAU;CAAQ;CACxC,KAAK;EAAE,MAAM;EAAW,UAAU;CAAW;CAC7C,KAAK;EAAE,MAAM;EAAW,UAAU;CAAW;CAC7C,GAAG;EAAE,MAAM;EAAW,UAAU;CAAS;CACzC,KAAK;EAAE,MAAM;EAAW,UAAU;CAAY;CAC9C,KAAK;EAAE,MAAM;EAAW,UAAU;CAAY;CAE9C,MAAM;EAAE,MAAM;EAAQ,UAAU;CAAiB;CACjD,KAAK;EAAE,MAAM;EAAY,UAAU;CAAqB;CACxD,KAAK;EAAE,MAAM;EAAY,UAAU;CAAmB;CACtD,KAAK;EAAE,MAAM;EAAY,UAAU;CAAuB;CAE1D,KAAK;EAAE,MAAM;EAAY,UAAU;CAAW;CAC9C,KAAK;EAAE,MAAM;EAAQ,UAAU;CAAM;CACrC,MAAM;EAAE,MAAM;EAAQ,UAAU;CAAO;CACvC,QAAQ;EAAE,MAAM;EAAQ,UAAU;CAAS;CAC3C,OAAO;EAAE,MAAM;EAAQ,UAAU;CAAQ;CACzC,OAAO;EAAE,MAAM;EAAQ,UAAU;CAAQ;CAEzC,SAAS;EAAE,MAAM;EAAY,UAAU;CAAU;CACjD,MAAM;EAAE,MAAM;EAAY,UAAU;CAAO;AAC7C"}
1
+ {"version":3,"file":"style-props-data.cjs","names":[],"sources":["../../../../src/core/box/style-props/style-props-data.ts"],"sourcesContent":["import { StylePropType } from './resolvers'\nimport { CStyleProps } from './style-props.types'\n\nexport interface SystemPropData {\n type: StylePropType\n property: string | string[]\n}\n\nexport const STYLE_PROPS_DATA: Record<keyof CStyleProps, SystemPropData> = {\n m: { type: 'spacing', property: 'margin' },\n mt: { type: 'spacing', property: 'marginTop' },\n mb: { type: 'spacing', property: 'marginBottom' },\n ml: { type: 'spacing', property: 'marginLeft' },\n mr: { type: 'spacing', property: 'marginRight' },\n ms: { type: 'spacing', property: 'marginInlineStart' },\n me: { type: 'spacing', property: 'marginInlineEnd' },\n mis: { type: 'spacing', property: 'marginInlineStart' },\n mie: { type: 'spacing', property: 'marginInlineEnd' },\n mx: { type: 'spacing', property: 'marginInline' },\n my: { type: 'spacing', property: 'marginBlock' },\n\n p: { type: 'spacing', property: 'padding' },\n pt: { type: 'spacing', property: 'paddingTop' },\n pb: { type: 'spacing', property: 'paddingBottom' },\n pl: { type: 'spacing', property: 'paddingLeft' },\n pr: { type: 'spacing', property: 'paddingRight' },\n ps: { type: 'spacing', property: 'paddingInlineStart' },\n pe: { type: 'spacing', property: 'paddingInlineEnd' },\n pis: { type: 'spacing', property: 'paddingInlineStart' },\n pie: { type: 'spacing', property: 'paddingInlineEnd' },\n px: { type: 'spacing', property: 'paddingInline' },\n py: { type: 'spacing', property: 'paddingBlock' },\n\n bd: { type: 'border', property: 'border' },\n bdrs: { type: 'radius', property: 'borderRadius' },\n bg: { type: 'color', property: 'background' },\n c: { type: 'textColor', property: 'color' },\n opacity: { type: 'identity', property: 'opacity' },\n\n ff: { type: 'fontFamily', property: 'fontFamily' },\n fz: { type: 'fontSize', property: 'fontSize' },\n fw: { type: 'identity', property: 'fontWeight' },\n lts: { type: 'size', property: 'letterSpacing' },\n ta: { type: 'identity', property: 'textAlign' },\n lh: { type: 'lineHeight', property: 'lineHeight' },\n fs: { type: 'identity', property: 'fontStyle' },\n tt: { type: 'identity', property: 'textTransform' },\n td: { type: 'identity', property: 'textDecoration' },\n\n w: { type: 'spacing', property: 'width' },\n miw: { type: 'spacing', property: 'minWidth' },\n maw: { type: 'spacing', property: 'maxWidth' },\n h: { type: 'spacing', property: 'height' },\n mih: { type: 'spacing', property: 'minHeight' },\n mah: { type: 'spacing', property: 'maxHeight' },\n\n bgsz: { type: 'size', property: 'backgroundSize' },\n bgp: { type: 'identity', property: 'backgroundPosition' },\n bgr: { type: 'identity', property: 'backgroundRepeat' },\n bga: { type: 'identity', property: 'backgroundAttachment' },\n\n pos: { type: 'identity', property: 'position' },\n top: { type: 'size', property: 'top' },\n left: { type: 'size', property: 'left' },\n bottom: { type: 'size', property: 'bottom' },\n right: { type: 'size', property: 'right' },\n inset: { type: 'size', property: 'inset' },\n\n display: { type: 'identity', property: 'display' },\n flex: { type: 'identity', property: 'flex' },\n}\n"],"mappings":";;AAQA,MAAa,mBAA8D;CACzE,GAAG;EAAE,MAAM;EAAW,UAAU;CAAS;CACzC,IAAI;EAAE,MAAM;EAAW,UAAU;CAAY;CAC7C,IAAI;EAAE,MAAM;EAAW,UAAU;CAAe;CAChD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAa;CAC9C,IAAI;EAAE,MAAM;EAAW,UAAU;CAAc;CAC/C,IAAI;EAAE,MAAM;EAAW,UAAU;CAAoB;CACrD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAkB;CACnD,KAAK;EAAE,MAAM;EAAW,UAAU;CAAoB;CACtD,KAAK;EAAE,MAAM;EAAW,UAAU;CAAkB;CACpD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAe;CAChD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAc;CAE/C,GAAG;EAAE,MAAM;EAAW,UAAU;CAAU;CAC1C,IAAI;EAAE,MAAM;EAAW,UAAU;CAAa;CAC9C,IAAI;EAAE,MAAM;EAAW,UAAU;CAAgB;CACjD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAc;CAC/C,IAAI;EAAE,MAAM;EAAW,UAAU;CAAe;CAChD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAqB;CACtD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAmB;CACpD,KAAK;EAAE,MAAM;EAAW,UAAU;CAAqB;CACvD,KAAK;EAAE,MAAM;EAAW,UAAU;CAAmB;CACrD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAgB;CACjD,IAAI;EAAE,MAAM;EAAW,UAAU;CAAe;CAEhD,IAAI;EAAE,MAAM;EAAU,UAAU;CAAS;CACzC,MAAM;EAAE,MAAM;EAAU,UAAU;CAAe;CACjD,IAAI;EAAE,MAAM;EAAS,UAAU;CAAa;CAC5C,GAAG;EAAE,MAAM;EAAa,UAAU;CAAQ;CAC1C,SAAS;EAAE,MAAM;EAAY,UAAU;CAAU;CAEjD,IAAI;EAAE,MAAM;EAAc,UAAU;CAAa;CACjD,IAAI;EAAE,MAAM;EAAY,UAAU;CAAW;CAC7C,IAAI;EAAE,MAAM;EAAY,UAAU;CAAa;CAC/C,KAAK;EAAE,MAAM;EAAQ,UAAU;CAAgB;CAC/C,IAAI;EAAE,MAAM;EAAY,UAAU;CAAY;CAC9C,IAAI;EAAE,MAAM;EAAc,UAAU;CAAa;CACjD,IAAI;EAAE,MAAM;EAAY,UAAU;CAAY;CAC9C,IAAI;EAAE,MAAM;EAAY,UAAU;CAAgB;CAClD,IAAI;EAAE,MAAM;EAAY,UAAU;CAAiB;CAEnD,GAAG;EAAE,MAAM;EAAW,UAAU;CAAQ;CACxC,KAAK;EAAE,MAAM;EAAW,UAAU;CAAW;CAC7C,KAAK;EAAE,MAAM;EAAW,UAAU;CAAW;CAC7C,GAAG;EAAE,MAAM;EAAW,UAAU;CAAS;CACzC,KAAK;EAAE,MAAM;EAAW,UAAU;CAAY;CAC9C,KAAK;EAAE,MAAM;EAAW,UAAU;CAAY;CAE9C,MAAM;EAAE,MAAM;EAAQ,UAAU;CAAiB;CACjD,KAAK;EAAE,MAAM;EAAY,UAAU;CAAqB;CACxD,KAAK;EAAE,MAAM;EAAY,UAAU;CAAmB;CACtD,KAAK;EAAE,MAAM;EAAY,UAAU;CAAuB;CAE1D,KAAK;EAAE,MAAM;EAAY,UAAU;CAAW;CAC9C,KAAK;EAAE,MAAM;EAAQ,UAAU;CAAM;CACrC,MAAM;EAAE,MAAM;EAAQ,UAAU;CAAO;CACvC,QAAQ;EAAE,MAAM;EAAQ,UAAU;CAAS;CAC3C,OAAO;EAAE,MAAM;EAAQ,UAAU;CAAQ;CACzC,OAAO;EAAE,MAAM;EAAQ,UAAU;CAAQ;CAEzC,SAAS;EAAE,MAAM;EAAY,UAAU;CAAU;CACjD,MAAM;EAAE,MAAM;EAAY,UAAU;CAAO;AAC7C"}
@@ -0,0 +1,58 @@
1
+ "use client";
2
+ const require_px = require("../../utils/units-converters/px.cjs");
3
+ const require_rem = require("../../utils/units-converters/rem.cjs");
4
+ const require_keys = require("../../utils/keys/keys.cjs");
5
+ const require_config_provider_context = require("../config-provider.context.cjs");
6
+ const require_export_helper = require("../../../_virtual/_/plugin-vue/export-helper.cjs");
7
+ let vue = require("vue");
8
+ //#region packages/@cck-ui/core/src/core/config-provider/cck-classes-style/cck-classes-style.vue
9
+ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
10
+ __name: "cck-classes-style",
11
+ setup(__props, { expose: __expose }) {
12
+ __expose();
13
+ const theme = require_config_provider_context.useCckTheme().value;
14
+ const nonce = require_config_provider_context.useCckStyleNonce();
15
+ const styleEl = (0, vue.ref)(null);
16
+ const generateClasses = () => {
17
+ return require_keys.keys(theme.breakpoints).reduce((acc, breakpoint) => {
18
+ const isPxBreakpoint = theme.breakpoints[breakpoint].includes("px");
19
+ const pxValue = require_px.px(theme.breakpoints[breakpoint]);
20
+ return `${acc}$media (max-width: ${isPxBreakpoint ? `${pxValue - .1}px` : require_rem.em(pxValue - .1)}) {.c-visible-from-${breakpoint} {display:none !important;}}@media (min-width: ${isPxBreakpoint ? `${pxValue}px` : require_rem.em(pxValue)}) {.c-hidden-from-${breakpoint} {display:none !important;}}`;
21
+ }, "");
22
+ };
23
+ const updateStyles = () => {
24
+ if (!styleEl.value) {
25
+ const el = document.createElement("style");
26
+ el.dataset.cStyles = "classes";
27
+ const nonceVal = nonce?.();
28
+ if (nonceVal) el.nonce = nonceVal;
29
+ document.head.appendChild(el);
30
+ styleEl.value = el;
31
+ }
32
+ styleEl.value.innerHTML = generateClasses();
33
+ };
34
+ (0, vue.onMounted)(() => {
35
+ updateStyles();
36
+ });
37
+ const __returned__ = {
38
+ theme,
39
+ nonce,
40
+ styleEl,
41
+ generateClasses,
42
+ updateStyles
43
+ };
44
+ Object.defineProperty(__returned__, "__isScriptSetup", {
45
+ enumerable: false,
46
+ value: true
47
+ });
48
+ return __returned__;
49
+ }
50
+ });
51
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
52
+ return null;
53
+ }
54
+ var cck_classes_style_default = /*#__PURE__*/ require_export_helper.default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/core/config-provider/cck-classes-style/cck-classes-style.vue"]]);
55
+ //#endregion
56
+ exports.default = cck_classes_style_default;
57
+
58
+ //# sourceMappingURL=cck-classes-style.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cck-classes-style.cjs","names":[],"sources":["../../../../src/core/config-provider/cck-classes-style/cck-classes-style.vue"],"sourcesContent":["<template></template>\n\n<script setup lang=\"ts\">\nimport { onMounted, ref } from 'vue'\nimport { useCckStyleNonce, useCckTheme } from '../config-provider.context'\nimport { em, keys, px } from '../../utils'\n\nconst theme = useCckTheme().value\nconst nonce = useCckStyleNonce()\n\nconst styleEl = ref<HTMLStyleElement | null>(null)\n\nconst generateClasses = () => {\n return keys(theme.breakpoints).reduce<string>((acc, breakpoint) => {\n const isPxBreakpoint = theme.breakpoints[breakpoint].includes('px')\n const pxValue = px(theme.breakpoints[breakpoint]) as number\n const maxWidthBreakpoint = isPxBreakpoint ? `${pxValue - 0.1}px` : em(pxValue - 0.1)\n const minWidthBreakpoint = isPxBreakpoint ? `${pxValue}px` : em(pxValue)\n\n return `${acc}$media (max-width: ${maxWidthBreakpoint}) {.c-visible-from-${breakpoint} {display:none !important;}}@media (min-width: ${minWidthBreakpoint}) {.c-hidden-from-${breakpoint} {display:none !important;}}`\n }, '')\n}\n\nconst updateStyles = () => {\n if (!styleEl.value) {\n const el = document.createElement('style')\n el.dataset.cStyles = 'classes'\n const nonceVal = nonce?.()\n if (nonceVal) {\n el.nonce = nonceVal\n }\n document.head.appendChild(el)\n styleEl.value = el\n }\n styleEl.value.innerHTML = generateClasses()\n}\n\nonMounted(() => {\n updateStyles()\n})\n</script>\n"],"mappings":";;;;;;;;;;;;EAOA,MAAM,QAAQ,gCAAA,YAAY,CAAC,CAAC;EAC5B,MAAM,QAAQ,gCAAA,iBAAiB;EAE/B,MAAM,WAAA,GAAA,IAAA,IAAA,CAAuC,IAAI;EAEjD,MAAM,wBAAwB;GAC5B,OAAO,aAAA,KAAK,MAAM,WAAW,CAAC,CAAC,QAAgB,KAAK,eAAe;IACjE,MAAM,iBAAiB,MAAM,YAAY,WAAW,CAAC,SAAS,IAAI;IAClE,MAAM,UAAU,WAAA,GAAG,MAAM,YAAY,WAAW;IAIhD,OAAO,GAAG,IAAI,qBAHa,iBAAiB,GAAG,UAAU,GAAI,MAAM,YAAA,GAAG,UAAU,EAAG,EAG7B,qBAAqB,WAAW,iDAF3D,iBAAiB,GAAG,QAAQ,MAAM,YAAA,GAAG,OAAO,EAEmF,oBAAoB,WAAW;GAC3L,GAAG,EAAE;EACP;EAEA,MAAM,qBAAqB;GACzB,IAAI,CAAC,QAAQ,OAAO;IAClB,MAAM,KAAK,SAAS,cAAc,OAAO;IACzC,GAAG,QAAQ,UAAU;IACrB,MAAM,WAAW,QAAQ;IACzB,IAAI,UACF,GAAG,QAAQ;IAEb,SAAS,KAAK,YAAY,EAAE;IAC5B,QAAQ,QAAQ;GAClB;GACA,QAAQ,MAAM,YAAY,gBAAgB;EAC5C;EAEA,CAAA,GAAA,IAAA,UAAA,OAAgB;GACd,aAAa;EACf,CAAC"}
@@ -3,9 +3,9 @@ const require_get_theme_color = require("../get-theme-color/get-theme-color.cjs"
3
3
  //#region packages/@cck-ui/core/src/core/config-provider/color-functions/get-gradient/get-gradient.ts
4
4
  function getGradient(gradient, theme) {
5
5
  const merged = {
6
- from: gradient?.from || theme.defaultGradient.from,
7
- to: gradient?.to || theme.defaultGradient.to,
8
- deg: gradient?.deg || theme.defaultGradient.deg
6
+ from: gradient?.from ?? theme.defaultGradient.from,
7
+ to: gradient?.to ?? theme.defaultGradient.to,
8
+ deg: gradient?.deg ?? theme.defaultGradient.deg
9
9
  };
10
10
  const fromColor = require_get_theme_color.getThemeColor(merged.from, theme);
11
11
  const toColor = require_get_theme_color.getThemeColor(merged.to, theme);
@@ -1 +1 @@
1
- {"version":3,"file":"get-gradient.cjs","names":["getThemeColor"],"sources":["../../../../../src/core/config-provider/color-functions/get-gradient/get-gradient.ts"],"sourcesContent":["import { CGradient, CTheme } from '../../'\nimport { getThemeColor } from '../get-theme-color/get-theme-color'\n\nexport function getGradient(gradient: CGradient | undefined, theme: CTheme) {\n const merged = {\n from: gradient?.from || theme.defaultGradient.from,\n to: gradient?.to || theme.defaultGradient.to,\n deg: gradient?.deg || theme.defaultGradient.deg,\n }\n\n const fromColor = getThemeColor(merged.from, theme)\n const toColor = getThemeColor(merged.to, theme)\n\n return `linear-gradient(${merged.deg}deg, ${fromColor} 0%, ${toColor} 100%)`\n}\n"],"mappings":";;;AAGA,SAAgB,YAAY,UAAiC,OAAe;CAC1E,MAAM,SAAS;EACb,MAAM,UAAU,QAAQ,MAAM,gBAAgB;EAC9C,IAAI,UAAU,MAAM,MAAM,gBAAgB;EAC1C,KAAK,UAAU,OAAO,MAAM,gBAAgB;CAC9C;CAEA,MAAM,YAAYA,wBAAAA,cAAc,OAAO,MAAM,KAAK;CAClD,MAAM,UAAUA,wBAAAA,cAAc,OAAO,IAAI,KAAK;CAE9C,OAAO,mBAAmB,OAAO,IAAI,OAAO,UAAU,OAAO,QAAQ;AACvE"}
1
+ {"version":3,"file":"get-gradient.cjs","names":["getThemeColor"],"sources":["../../../../../src/core/config-provider/color-functions/get-gradient/get-gradient.ts"],"sourcesContent":["import { CGradient, CTheme } from '../../'\nimport { getThemeColor } from '../get-theme-color/get-theme-color'\n\nexport function getGradient(gradient: CGradient | undefined, theme: CTheme) {\n const merged = {\n from: gradient?.from ?? theme.defaultGradient.from,\n to: gradient?.to ?? theme.defaultGradient.to,\n deg: gradient?.deg ?? theme.defaultGradient.deg,\n }\n\n const fromColor = getThemeColor(merged.from, theme)\n const toColor = getThemeColor(merged.to, theme)\n\n return `linear-gradient(${merged.deg}deg, ${fromColor} 0%, ${toColor} 100%)`\n}\n"],"mappings":";;;AAGA,SAAgB,YAAY,UAAiC,OAAe;CAC1E,MAAM,SAAS;EACb,MAAM,UAAU,QAAQ,MAAM,gBAAgB;EAC9C,IAAI,UAAU,MAAM,MAAM,gBAAgB;EAC1C,KAAK,UAAU,OAAO,MAAM,gBAAgB;CAC9C;CAEA,MAAM,YAAYA,wBAAAA,cAAc,OAAO,MAAM,KAAK;CAClD,MAAM,UAAUA,wBAAAA,cAAc,OAAO,IAAI,KAAK;CAE9C,OAAO,mBAAmB,OAAO,IAAI,OAAO,UAAU,OAAO,QAAQ;AACvE"}
@@ -1,5 +1,12 @@
1
1
  const require_to_rgba = require("../to-rgba/to-rgba.cjs");
2
2
  //#region packages/@cck-ui/core/src/core/config-provider/color-functions/rgba/rgba.ts
3
+ function rgb(color) {
4
+ if (typeof color !== "string") return "rgb(0, 0, 0)";
5
+ if (color.startsWith("var(")) return color;
6
+ if (color.startsWith("oklch")) return color;
7
+ const { r, g, b } = require_to_rgba.toRgba(color);
8
+ return `rgb(${r}, ${g}, ${b})`;
9
+ }
3
10
  function rgba(color, alpha) {
4
11
  if (typeof color !== "string" || alpha > 1 || alpha < 0) return `rgba(0, 0, 0, 1)`;
5
12
  if (color.startsWith("var(")) return `color-mix(in srgb, ${color}, transparent ${(1 - alpha) * 100}%)`;
@@ -13,6 +20,7 @@ function rgba(color, alpha) {
13
20
  const alpha = rgba;
14
21
  //#endregion
15
22
  exports.alpha = alpha;
23
+ exports.rgb = rgb;
16
24
  exports.rgba = rgba;
17
25
 
18
26
  //# sourceMappingURL=rgba.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rgba.cjs","names":["toRgba"],"sources":["../../../../../src/core/config-provider/color-functions/rgba/rgba.ts"],"sourcesContent":["import { toRgba } from '../to-rgba/to-rgba'\n\nexport function rgba(color: string, alpha: number) {\n if (typeof color !== 'string' || alpha > 1 || alpha < 0) {\n return `rgba(0, 0, 0, 1)`\n }\n\n if (color.startsWith('var(')) {\n const mixPercentage = (1 - alpha) * 100\n return `color-mix(in srgb, ${color}, transparent ${mixPercentage}%)`\n }\n\n if (color.startsWith('oklch')) {\n if (color.includes('/')) {\n return color.replace(/\\/\\s*[\\d.]+\\s*\\)/, `/ ${alpha})`)\n }\n\n return color.replace(')', ` / ${alpha})`)\n }\n\n const { r, g, b } = toRgba(color)\n return `rgba(${r}, ${g}, ${b}, ${alpha})`\n}\n\nexport const alpha = rgba\n"],"mappings":";;AAEA,SAAgB,KAAK,OAAe,OAAe;CACjD,IAAI,OAAO,UAAU,YAAY,QAAQ,KAAK,QAAQ,GACpD,OAAO;CAGT,IAAI,MAAM,WAAW,MAAM,GAEzB,OAAO,sBAAsB,MAAM,iBADZ,IAAI,SAAS,IAC6B;CAGnE,IAAI,MAAM,WAAW,OAAO,GAAG;EAC7B,IAAI,MAAM,SAAS,GAAG,GACpB,OAAO,MAAM,QAAQ,oBAAoB,KAAK,MAAM,EAAE;EAGxD,OAAO,MAAM,QAAQ,KAAK,MAAM,MAAM,EAAE;CAC1C;CAEA,MAAM,EAAE,GAAG,GAAG,MAAMA,gBAAAA,OAAO,KAAK;CAChC,OAAO,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,MAAM;AACzC;AAEA,MAAa,QAAQ"}
1
+ {"version":3,"file":"rgba.cjs","names":["toRgba"],"sources":["../../../../../src/core/config-provider/color-functions/rgba/rgba.ts"],"sourcesContent":["import { toRgba } from '../to-rgba/to-rgba'\n\nexport function rgb(color: string): string {\n if (typeof color !== 'string') {\n return 'rgb(0, 0, 0)'\n }\n\n if (color.startsWith('var(')) {\n return color\n }\n\n if (color.startsWith('oklch')) {\n return color\n }\n\n const { r, g, b } = toRgba(color)\n return `rgb(${r}, ${g}, ${b})`\n}\n\nexport function rgba(color: string, alpha: number) {\n if (typeof color !== 'string' || alpha > 1 || alpha < 0) {\n return `rgba(0, 0, 0, 1)`\n }\n\n if (color.startsWith('var(')) {\n const mixPercentage = (1 - alpha) * 100\n return `color-mix(in srgb, ${color}, transparent ${mixPercentage}%)`\n }\n\n if (color.startsWith('oklch')) {\n if (color.includes('/')) {\n return color.replace(/\\/\\s*[\\d.]+\\s*\\)/, `/ ${alpha})`)\n }\n\n return color.replace(')', ` / ${alpha})`)\n }\n\n const { r, g, b } = toRgba(color)\n return `rgba(${r}, ${g}, ${b}, ${alpha})`\n}\n\nexport const alpha = rgba\n"],"mappings":";;AAEA,SAAgB,IAAI,OAAuB;CACzC,IAAI,OAAO,UAAU,UACnB,OAAO;CAGT,IAAI,MAAM,WAAW,MAAM,GACzB,OAAO;CAGT,IAAI,MAAM,WAAW,OAAO,GAC1B,OAAO;CAGT,MAAM,EAAE,GAAG,GAAG,MAAMA,gBAAAA,OAAO,KAAK;CAChC,OAAO,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE;AAC9B;AAEA,SAAgB,KAAK,OAAe,OAAe;CACjD,IAAI,OAAO,UAAU,YAAY,QAAQ,KAAK,QAAQ,GACpD,OAAO;CAGT,IAAI,MAAM,WAAW,MAAM,GAEzB,OAAO,sBAAsB,MAAM,iBADZ,IAAI,SAAS,IAC6B;CAGnE,IAAI,MAAM,WAAW,OAAO,GAAG;EAC7B,IAAI,MAAM,SAAS,GAAG,GACpB,OAAO,MAAM,QAAQ,oBAAoB,KAAK,MAAM,EAAE;EAGxD,OAAO,MAAM,QAAQ,KAAK,MAAM,MAAM,EAAE;CAC1C;CAEA,MAAM,EAAE,GAAG,GAAG,MAAMA,gBAAAA,OAAO,KAAK;CAChC,OAAO,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,MAAM;AACzC;AAEA,MAAa,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"to-rgba.cjs","names":[],"sources":["../../../../../src/core/config-provider/color-functions/to-rgba/to-rgba.ts"],"sourcesContent":["export interface RGBA {\n r: number\n g: number\n b: number\n a: number\n}\n\nfunction isHexColor(hex: string): boolean {\n const HEX_REGEXP = /^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i\n\n return HEX_REGEXP.test(hex)\n}\n\nfunction hexToRgba(color: string): RGBA {\n let hexString = color.replace('#', '')\n\n if (hexString.length === 3) {\n const shorthandHex = hexString.split('')\n hexString = [\n shorthandHex[0],\n shorthandHex[0],\n shorthandHex[1],\n shorthandHex[1],\n shorthandHex[2],\n shorthandHex[2]\n ].join('')\n }\n\n if (hexString.length === 8) {\n const alpha = Number.parseInt(hexString.slice(6, 8), 16) / 255\n\n return {\n r: Number.parseInt(hexString.slice(0, 2), 16),\n g: Number.parseInt(hexString.slice(2, 4), 16),\n b: Number.parseInt(hexString.slice(4, 6), 16),\n a: alpha\n }\n }\n\n const parsed = Number.parseInt(hexString, 16)\n const r = (parsed >> 16) & 255\n const g = (parsed >> 8) & 255\n const b = parsed & 255\n\n return {\n r,\n g,\n b,\n a: 1\n }\n}\n\nfunction rgbStringToRgba(color: string): RGBA {\n const [r, g, b, a] = color\n .replace(/[^0-9,./]/g, '')\n .split(/[/,]/)\n .map(Number)\n\n return { r, g, b, a: a === undefined ? 1 : a }\n}\n\nfunction hslStringToRgba(hslaString: string): RGBA {\n const hslaRegex =\n /^hsla?\\(\\s*(\\d+)\\s*,\\s*(\\d+%)\\s*,\\s*(\\d+%)\\s*(,\\s*(0?\\.\\d+|\\d+(\\.\\d+)?))?\\s*\\)$/i\n\n const matches = hslaString.match(hslaRegex)\n if (!matches) {\n return {\n r: 0,\n g: 0,\n b: 0,\n a: 1\n }\n }\n\n const h = Number.parseInt(matches[1], 10)\n const s = Number.parseInt(matches[2], 10) / 100\n const l = Number.parseInt(matches[3], 10) / 100\n const a = matches[5] ? Number.parseFloat(matches[5]) : undefined\n\n const chroma = (1 - Math.abs(2 * l - 1)) * s\n const huePrime = h / 60\n const x = chroma * (1 - Math.abs((huePrime % 2) - 1))\n const m = l - chroma / 2\n\n let r: number\n let g: number\n let b: number\n\n if (huePrime >= 0 && huePrime < 1) {\n r = chroma\n g = x\n b = 0\n } else if (huePrime >= 1 && huePrime < 2) {\n r = x\n g = chroma\n b = 0\n } else if (huePrime >= 2 && huePrime < 3) {\n r = 0\n g = chroma\n b = x\n } else if (huePrime >= 3 && huePrime < 4) {\n r = 0\n g = x\n b = chroma\n } else if (huePrime >= 4 && huePrime < 5) {\n r = x\n g = 0\n b = chroma\n } else {\n r = chroma\n g = 0\n b = x\n }\n\n return {\n r: Math.round((r + m) * 255),\n g: Math.round((g + m) * 255),\n b: Math.round((b + m) * 255),\n a: a || 1\n }\n}\n\nexport function toRgba(color: string): RGBA {\n if (isHexColor(color)) {\n return hexToRgba(color)\n }\n\n if (color.startsWith('rgb')) {\n return rgbStringToRgba(color)\n }\n\n if (color.startsWith('hsl')) {\n return hslStringToRgba(color)\n }\n\n return {\n r: 0,\n g: 0,\n b: 0,\n a: 1\n }\n}\n"],"mappings":";;AAOA,SAAS,WAAW,KAAsB;CAGxC,OAAO,wCAAW,KAAK,GAAG;AAC5B;AAEA,SAAS,UAAU,OAAqB;CACtC,IAAI,YAAY,MAAM,QAAQ,KAAK,EAAE;CAErC,IAAI,UAAU,WAAW,GAAG;EAC1B,MAAM,eAAe,UAAU,MAAM,EAAE;EACvC,YAAY;GACV,aAAa;GACb,aAAa;GACb,aAAa;GACb,aAAa;GACb,aAAa;GACb,aAAa;EACf,CAAC,CAAC,KAAK,EAAE;CACX;CAEA,IAAI,UAAU,WAAW,GAAG;EAC1B,MAAM,QAAQ,OAAO,SAAS,UAAU,MAAM,GAAG,CAAC,GAAG,EAAE,IAAI;EAE3D,OAAO;GACL,GAAG,OAAO,SAAS,UAAU,MAAM,GAAG,CAAC,GAAG,EAAE;GAC5C,GAAG,OAAO,SAAS,UAAU,MAAM,GAAG,CAAC,GAAG,EAAE;GAC5C,GAAG,OAAO,SAAS,UAAU,MAAM,GAAG,CAAC,GAAG,EAAE;GAC5C,GAAG;EACL;CACF;CAEA,MAAM,SAAS,OAAO,SAAS,WAAW,EAAE;CAK5C,OAAO;EACL,GALS,UAAU,KAAM;EAMzB,GALS,UAAU,IAAK;EAMxB,GALQ,SAAS;EAMjB,GAAG;CACL;AACF;AAEA,SAAS,gBAAgB,OAAqB;CAC5C,MAAM,CAAC,GAAG,GAAG,GAAG,KAAK,MAClB,QAAQ,cAAc,EAAE,CAAC,CACzB,MAAM,MAAM,CAAC,CACb,IAAI,MAAM;CAEb,OAAO;EAAE;EAAG;EAAG;EAAG,GAAG,MAAM,KAAA,IAAY,IAAI;CAAE;AAC/C;AAEA,SAAS,gBAAgB,YAA0B;CAIjD,MAAM,UAAU,WAAW,MAAM,kFAAS;CAC1C,IAAI,CAAC,SACH,OAAO;EACL,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;CACL;CAGF,MAAM,IAAI,OAAO,SAAS,QAAQ,IAAI,EAAE;CACxC,MAAM,IAAI,OAAO,SAAS,QAAQ,IAAI,EAAE,IAAI;CAC5C,MAAM,IAAI,OAAO,SAAS,QAAQ,IAAI,EAAE,IAAI;CAC5C,MAAM,IAAI,QAAQ,KAAK,OAAO,WAAW,QAAQ,EAAE,IAAI,KAAA;CAEvD,MAAM,UAAU,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK;CAC3C,MAAM,WAAW,IAAI;CACrB,MAAM,IAAI,UAAU,IAAI,KAAK,IAAK,WAAW,IAAK,CAAC;CACnD,MAAM,IAAI,IAAI,SAAS;CAEvB,IAAI;CACJ,IAAI;CACJ,IAAI;CAEJ,IAAI,YAAY,KAAK,WAAW,GAAG;EACjC,IAAI;EACJ,IAAI;EACJ,IAAI;CACN,OAAO,IAAI,YAAY,KAAK,WAAW,GAAG;EACxC,IAAI;EACJ,IAAI;EACJ,IAAI;CACN,OAAO,IAAI,YAAY,KAAK,WAAW,GAAG;EACxC,IAAI;EACJ,IAAI;EACJ,IAAI;CACN,OAAO,IAAI,YAAY,KAAK,WAAW,GAAG;EACxC,IAAI;EACJ,IAAI;EACJ,IAAI;CACN,OAAO,IAAI,YAAY,KAAK,WAAW,GAAG;EACxC,IAAI;EACJ,IAAI;EACJ,IAAI;CACN,OAAO;EACL,IAAI;EACJ,IAAI;EACJ,IAAI;CACN;CAEA,OAAO;EACL,GAAG,KAAK,OAAO,IAAI,KAAK,GAAG;EAC3B,GAAG,KAAK,OAAO,IAAI,KAAK,GAAG;EAC3B,GAAG,KAAK,OAAO,IAAI,KAAK,GAAG;EAC3B,GAAG,KAAK;CACV;AACF;AAEA,SAAgB,OAAO,OAAqB;CAC1C,IAAI,WAAW,KAAK,GAClB,OAAO,UAAU,KAAK;CAGxB,IAAI,MAAM,WAAW,KAAK,GACxB,OAAO,gBAAgB,KAAK;CAG9B,IAAI,MAAM,WAAW,KAAK,GACxB,OAAO,gBAAgB,KAAK;CAG9B,OAAO;EACL,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;CACL;AACF"}
1
+ {"version":3,"file":"to-rgba.cjs","names":[],"sources":["../../../../../src/core/config-provider/color-functions/to-rgba/to-rgba.ts"],"sourcesContent":["export interface RGBA {\n r: number\n g: number\n b: number\n a: number\n}\n\nfunction isHexColor(hex: string): boolean {\n const HEX_REGEXP = /^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i\n\n return HEX_REGEXP.test(hex)\n}\n\nfunction hexToRgba(color: string): RGBA {\n let hexString = color.replace('#', '')\n\n if (hexString.length === 3) {\n const shorthandHex = hexString.split('')\n hexString = [\n shorthandHex[0],\n shorthandHex[0],\n shorthandHex[1],\n shorthandHex[1],\n shorthandHex[2],\n shorthandHex[2],\n ].join('')\n }\n\n if (hexString.length === 8) {\n const alpha = Number.parseInt(hexString.slice(6, 8), 16) / 255\n\n return {\n r: Number.parseInt(hexString.slice(0, 2), 16),\n g: Number.parseInt(hexString.slice(2, 4), 16),\n b: Number.parseInt(hexString.slice(4, 6), 16),\n a: alpha,\n }\n }\n\n const parsed = Number.parseInt(hexString, 16)\n const r = (parsed >> 16) & 255\n const g = (parsed >> 8) & 255\n const b = parsed & 255\n\n return {\n r,\n g,\n b,\n a: 1,\n }\n}\n\nfunction rgbStringToRgba(color: string): RGBA {\n const [r, g, b, a] = color\n .replace(/[^0-9,./]/g, '')\n .split(/[/,]/)\n .map(Number)\n\n return { r, g, b, a: a === undefined ? 1 : a }\n}\n\nfunction hslStringToRgba(hslaString: string): RGBA {\n const hslaRegex =\n /^hsla?\\(\\s*(\\d+)\\s*,\\s*(\\d+%)\\s*,\\s*(\\d+%)\\s*(,\\s*(0?\\.\\d+|\\d+(\\.\\d+)?))?\\s*\\)$/i\n\n const matches = hslaString.match(hslaRegex)\n if (!matches) {\n return {\n r: 0,\n g: 0,\n b: 0,\n a: 1,\n }\n }\n\n const h = Number.parseInt(matches[1], 10)\n const s = Number.parseInt(matches[2], 10) / 100\n const l = Number.parseInt(matches[3], 10) / 100\n const a = matches[5] ? Number.parseFloat(matches[5]) : undefined\n\n const chroma = (1 - Math.abs(2 * l - 1)) * s\n const huePrime = h / 60\n const x = chroma * (1 - Math.abs((huePrime % 2) - 1))\n const m = l - chroma / 2\n\n let r: number\n let g: number\n let b: number\n\n if (huePrime >= 0 && huePrime < 1) {\n r = chroma\n g = x\n b = 0\n } else if (huePrime >= 1 && huePrime < 2) {\n r = x\n g = chroma\n b = 0\n } else if (huePrime >= 2 && huePrime < 3) {\n r = 0\n g = chroma\n b = x\n } else if (huePrime >= 3 && huePrime < 4) {\n r = 0\n g = x\n b = chroma\n } else if (huePrime >= 4 && huePrime < 5) {\n r = x\n g = 0\n b = chroma\n } else {\n r = chroma\n g = 0\n b = x\n }\n\n return {\n r: Math.round((r + m) * 255),\n g: Math.round((g + m) * 255),\n b: Math.round((b + m) * 255),\n a: a || 1,\n }\n}\n\nexport function toRgba(color: string): RGBA {\n if (isHexColor(color)) {\n return hexToRgba(color)\n }\n\n if (color.startsWith('rgb')) {\n return rgbStringToRgba(color)\n }\n\n if (color.startsWith('hsl')) {\n return hslStringToRgba(color)\n }\n\n return {\n r: 0,\n g: 0,\n b: 0,\n a: 1,\n }\n}\n"],"mappings":"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"}
@@ -4,11 +4,13 @@ const require_use_provider_color_scheme = require("./use-cck-color-scheme/use-pr
4
4
  const require_local_storage_manager = require("./color-scheme-managers/local-storage-manager.cjs");
5
5
  const require_use_respect_reduce_motion = require("./use-respect-reduce-motion/use-respect-reduce-motion.cjs");
6
6
  const require_default_theme = require("./default-theme.cjs");
7
+ const require_export_helper = require("../../_virtual/_/plugin-vue/export-helper.cjs");
8
+ const require_cck_classes_style = require("./cck-classes-style/cck-classes-style.cjs");
7
9
  const require_merge_cck_theme = require("./merge-cck-theme/merge-cck-theme.cjs");
10
+ const require_use_component_props = require("./use-component-props/use-component-props.cjs");
8
11
  require("./baseline.cjs");
9
12
  require("./global.cjs");
10
13
  require("./default-css-variables.cjs");
11
- const require_export_helper = require("../../_virtual/_/plugin-vue/export-helper.cjs");
12
14
  let vue = require("vue");
13
15
  //#region packages/@cck-ui/core/src/core/config-provider/config-provider.vue
14
16
  const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
@@ -21,13 +23,11 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
21
23
  },
22
24
  colorSchemeManager: {
23
25
  type: Object,
24
- required: false,
25
- default: () => require_local_storage_manager.localStorageColorSchemeManager()
26
+ required: false
26
27
  },
27
28
  defaultColorScheme: {
28
29
  type: String,
29
- required: false,
30
- default: "light"
30
+ required: false
31
31
  },
32
32
  forceColorScheme: {
33
33
  type: String,
@@ -35,33 +35,27 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
35
35
  },
36
36
  cssVariablesSelector: {
37
37
  type: String,
38
- required: false,
39
- default: ":root"
38
+ required: false
40
39
  },
41
40
  withCssVariables: {
42
41
  type: Boolean,
43
- required: false,
44
- default: true
42
+ required: false
45
43
  },
46
44
  getRootElement: {
47
45
  type: Function,
48
- required: false,
49
- default: () => document.documentElement
46
+ required: false
50
47
  },
51
48
  classNamesPrefix: {
52
49
  type: String,
53
- required: false,
54
- default: "c"
50
+ required: false
55
51
  },
56
52
  withStaticClasses: {
57
53
  type: Boolean,
58
- required: false,
59
- default: true
54
+ required: false
60
55
  },
61
56
  withGlobalClasses: {
62
57
  type: Boolean,
63
- required: false,
64
- default: true
58
+ required: false
65
59
  },
66
60
  stylesTransform: {
67
61
  type: Object,
@@ -74,8 +68,22 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
74
68
  },
75
69
  setup(__props, { expose: __expose }) {
76
70
  __expose();
77
- const config = __props;
78
- const { defaultColorScheme, forceColorScheme, colorSchemeManager, getRootElement, theme: userTheme } = config;
71
+ const rawProps = __props;
72
+ const props = require_use_component_props.useComponentProps({
73
+ component: "ConfigProvider",
74
+ defaultProps: {
75
+ withStaticClasses: true,
76
+ withGlobalClasses: true,
77
+ withCssVariables: true,
78
+ classNamesPrefix: "c",
79
+ defaultColorScheme: "light",
80
+ cssVariablesSelector: ":root",
81
+ colorSchemeManager: require_local_storage_manager.localStorageColorSchemeManager(),
82
+ getRootElement: () => document.documentElement
83
+ },
84
+ props: rawProps
85
+ });
86
+ const { defaultColorScheme, forceColorScheme, colorSchemeManager, getRootElement, theme: userTheme } = props.value;
79
87
  const finalTheme = (0, vue.computed)(() => {
80
88
  if (userTheme) return require_merge_cck_theme.mergeCckTheme(require_default_theme.DEFAULT_THEME, userTheme);
81
89
  return require_default_theme.DEFAULT_THEME;
@@ -87,19 +95,23 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
87
95
  getRootElement
88
96
  });
89
97
  require_use_respect_reduce_motion.useRespectReduceMotion({
90
- respectReduceMotion: config.theme?.respectReducedMotion || false,
98
+ respectReduceMotion: props.value.theme?.respectReducedMotion || false,
91
99
  getRootElement
92
100
  });
93
- const { theme: _excludedTheme, ...configWithoutTheme } = config;
101
+ const { theme: _excludedTheme, ...configWithoutTheme } = props.value;
94
102
  (0, vue.provide)(require_config_provider_types.CONFIG_KEY, {
95
103
  ...configWithoutTheme,
104
+ getRootElement,
105
+ classNamesPrefix: props.value.classNamesPrefix,
96
106
  colorScheme,
107
+ cssVariablesSelector: props.value.cssVariablesSelector,
97
108
  setColorScheme,
98
109
  clearColorScheme
99
110
  });
100
111
  (0, vue.provide)(require_config_provider_types.THEME_KEY, finalTheme);
101
112
  const __returned__ = {
102
- config,
113
+ rawProps,
114
+ props,
103
115
  defaultColorScheme,
104
116
  forceColorScheme,
105
117
  colorSchemeManager,
@@ -110,7 +122,10 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
110
122
  setColorScheme,
111
123
  clearColorScheme,
112
124
  _excludedTheme,
113
- configWithoutTheme
125
+ configWithoutTheme,
126
+ get CckClassesStyle() {
127
+ return require_cck_classes_style.default;
128
+ }
114
129
  };
115
130
  Object.defineProperty(__returned__, "__isScriptSetup", {
116
131
  enumerable: false,
@@ -120,7 +135,7 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
120
135
  }
121
136
  });
122
137
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
123
- return (0, vue.renderSlot)(_ctx.$slots, "default");
138
+ return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, null, [$setup.props.withGlobalClasses ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["CckClassesStyle"], { key: 0 })) : (0, vue.createCommentVNode)("v-if", true), (0, vue.renderSlot)(_ctx.$slots, "default")], 64);
124
139
  }
125
140
  var config_provider_default = /*#__PURE__*/ require_export_helper.default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/core/config-provider/config-provider.vue"]]);
126
141
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"config-provider.cjs","names":[],"sources":["../../../src/core/config-provider/config-provider.vue"],"sourcesContent":["<template>\n <slot />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, provide } from 'vue'\nimport { CONFIG_KEY, type ConfigProviderProps, THEME_KEY } from './config-provider.types'\nimport { useProviderColorScheme } from './use-cck-color-scheme/use-provider-color-scheme'\nimport { localStorageColorSchemeManager } from './color-scheme-managers'\nimport { useRespectReduceMotion } from './use-respect-reduce-motion/use-respect-reduce-motion'\nimport { DEFAULT_THEME } from './default-theme'\nimport { mergeCckTheme } from './merge-cck-theme'\nimport { CContextValue } from './config-provider.context'\nimport './baseline.css'\nimport './global.css'\nimport './default-css-variables.css'\n\ndefineOptions({\n name: 'CckConfigProvider',\n})\n\nconst config = withDefaults(defineProps<ConfigProviderProps>(), {\n withStaticClasses: true,\n withGlobalClasses: true,\n withCssVariables: true,\n classNamesPrefix: 'c',\n defaultColorScheme: 'light',\n cssVariablesSelector: ':root',\n colorSchemeManager: () => localStorageColorSchemeManager(),\n getRootElement: () => document.documentElement,\n})\n\nconst {\n defaultColorScheme,\n forceColorScheme,\n colorSchemeManager,\n getRootElement,\n theme: userTheme,\n} = config\n\nconst finalTheme = computed(() => {\n if (userTheme) {\n return mergeCckTheme(DEFAULT_THEME, userTheme)\n }\n\n return DEFAULT_THEME\n})\n\nconst { colorScheme, setColorScheme, clearColorScheme } = useProviderColorScheme({\n defaultColorScheme,\n forceColorScheme,\n manager: colorSchemeManager,\n getRootElement,\n})\n\nuseRespectReduceMotion({\n respectReduceMotion: config.theme?.respectReducedMotion || false,\n getRootElement,\n})\n\nconst { theme: _excludedTheme, ...configWithoutTheme } = config\nprovide<CContextValue>(CONFIG_KEY, {\n ...configWithoutTheme,\n colorScheme,\n setColorScheme,\n clearColorScheme,\n})\nprovide(THEME_KEY, finalTheme)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBA,MAAM,SAAS;EAWf,MAAM,EACJ,oBACA,kBACA,oBACA,gBACA,OAAO,cACL;EAEJ,MAAM,cAAA,GAAA,IAAA,SAAA,OAA4B;GAChC,IAAI,WACF,OAAO,wBAAA,cAAc,sBAAA,eAAe,SAAS;GAG/C,OAAO,sBAAA;EACT,CAAC;EAED,MAAM,EAAE,aAAa,gBAAgB,qBAAqB,kCAAA,uBAAuB;GAC/E;GACA;GACA,SAAS;GACT;EACF,CAAC;EAED,kCAAA,uBAAuB;GACrB,qBAAqB,OAAO,OAAO,wBAAwB;GAC3D;EACF,CAAC;EAED,MAAM,EAAE,OAAO,gBAAgB,GAAG,uBAAuB;EACzD,CAAA,GAAA,IAAA,QAAA,CAAuB,8BAAA,YAAY;GACjC,GAAG;GACH;GACA;GACA;EACF,CAAC;EACD,CAAA,GAAA,IAAA,QAAA,CAAQ,8BAAA,WAAW,UAAU;;;;;;;;;;;;;;;;;;;;;;;4BAlEnB,KAAA,QAAA,SAAA"}
1
+ {"version":3,"file":"config-provider.cjs","names":[],"sources":["../../../src/core/config-provider/config-provider.vue"],"sourcesContent":["<template>\n <cck-classes-style v-if=\"props.withGlobalClasses\" />\n <slot />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, provide } from 'vue'\nimport { CONFIG_KEY, type ConfigProviderProps, THEME_KEY } from './config-provider.types'\nimport { useProviderColorScheme } from './use-cck-color-scheme/use-provider-color-scheme'\nimport { localStorageColorSchemeManager } from './color-scheme-managers'\nimport { useRespectReduceMotion } from './use-respect-reduce-motion/use-respect-reduce-motion'\nimport { CckClassesStyle } from './cck-classes-style'\nimport { DEFAULT_THEME } from './default-theme'\nimport { mergeCckTheme } from './merge-cck-theme'\nimport { CContextValue } from './config-provider.context'\nimport { useComponentProps } from './use-component-props/use-component-props'\nimport './baseline.css'\nimport './global.css'\nimport './default-css-variables.css'\n\ndefineOptions({\n name: 'CckConfigProvider',\n})\n\nconst rawProps = defineProps<ConfigProviderProps>()\n\nconst props = useComponentProps({\n component: 'ConfigProvider',\n defaultProps: {\n withStaticClasses: true,\n withGlobalClasses: true,\n withCssVariables: true,\n classNamesPrefix: 'c',\n defaultColorScheme: 'light',\n cssVariablesSelector: ':root',\n colorSchemeManager: localStorageColorSchemeManager(),\n getRootElement: () => document.documentElement,\n },\n props: rawProps,\n})\n\nconst {\n defaultColorScheme,\n forceColorScheme,\n colorSchemeManager,\n getRootElement,\n theme: userTheme,\n} = props.value\n\nconst finalTheme = computed(() => {\n if (userTheme) {\n return mergeCckTheme(DEFAULT_THEME, userTheme)\n }\n\n return DEFAULT_THEME\n})\n\nconst { colorScheme, setColorScheme, clearColorScheme } = useProviderColorScheme({\n defaultColorScheme: defaultColorScheme!,\n forceColorScheme,\n manager: colorSchemeManager!,\n getRootElement: getRootElement!,\n})\n\nuseRespectReduceMotion({\n respectReduceMotion: props.value.theme?.respectReducedMotion || false,\n getRootElement: getRootElement!,\n})\n\nconst { theme: _excludedTheme, ...configWithoutTheme } = props.value\nprovide<CContextValue>(CONFIG_KEY, {\n ...configWithoutTheme,\n getRootElement: getRootElement!,\n classNamesPrefix: props.value.classNamesPrefix!,\n colorScheme: colorScheme!,\n cssVariablesSelector: props.value.cssVariablesSelector!,\n setColorScheme,\n clearColorScheme,\n})\nprovide(THEME_KEY, finalTheme)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBA,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX,cAAc;IACZ,mBAAmB;IACnB,mBAAmB;IACnB,kBAAkB;IAClB,kBAAkB;IAClB,oBAAoB;IACpB,sBAAsB;IACtB,oBAAoB,8BAAA,+BAA+B;IACnD,sBAAsB,SAAS;GACjC;GACA,OAAO;EACT,CAAC;EAED,MAAM,EACJ,oBACA,kBACA,oBACA,gBACA,OAAO,cACL,MAAM;EAEV,MAAM,cAAA,GAAA,IAAA,SAAA,OAA4B;GAChC,IAAI,WACF,OAAO,wBAAA,cAAc,sBAAA,eAAe,SAAS;GAG/C,OAAO,sBAAA;EACT,CAAC;EAED,MAAM,EAAE,aAAa,gBAAgB,qBAAqB,kCAAA,uBAAuB;GAC3D;GACpB;GACA,SAAS;GACO;EAClB,CAAC;EAED,kCAAA,uBAAuB;GACrB,qBAAqB,MAAM,MAAM,OAAO,wBAAwB;GAChD;EAClB,CAAC;EAED,MAAM,EAAE,OAAO,gBAAgB,GAAG,uBAAuB,MAAM;EAC/D,CAAA,GAAA,IAAA,QAAA,CAAuB,8BAAA,YAAY;GACjC,GAAG;GACa;GAChB,kBAAkB,MAAM,MAAM;GACjB;GACb,sBAAsB,MAAM,MAAM;GAClC;GACA;EACF,CAAC;EACD,CAAA,GAAA,IAAA,QAAA,CAAQ,8BAAA,WAAW,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;+EA9EF,OAAA,MAAM,sBAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,CAAqB,OAAA,oBAAA,EAAA,KAAA,EAAA,CAAA,MAAA,GAAA,IAAA,mBAAA,CAAA,QAAA,IAAA,IAAA,GAAA,IAAA,WAAA,CAC5C,KAAA,QAAA,SAAA,CAAA,GAAA,EAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"default-colors.cjs","names":[],"sources":["../../../src/core/config-provider/default-colors.ts"],"sourcesContent":["import type { CThemeColors } from './theme.types'\n\nexport const DEFAULT_COLORS: CThemeColors = {\n dark: [\n '#C9C9C9',\n '#b8b8b8',\n '#828282',\n '#696969',\n '#424242',\n '#3b3b3b',\n '#2e2e2e',\n '#242424',\n '#1f1f1f',\n '#141414'\n ],\n\n gray: [\n '#f8f9fa',\n '#f1f3f5',\n '#e9ecef',\n '#dee2e6',\n '#ced4da',\n '#adb5bd',\n '#868e96',\n '#495057',\n '#343a40',\n '#212529'\n ],\n\n red: [\n '#fff5f5',\n '#ffe3e3',\n '#ffc9c9',\n '#ffa8a8',\n '#ff8787',\n '#ff6b6b',\n '#fa5252',\n '#f03e3e',\n '#e03131',\n '#c92a2a'\n ],\n\n pink: [\n '#fff0f6',\n '#ffdeeb',\n '#fcc2d7',\n '#faa2c1',\n '#f783ac',\n '#f06595',\n '#e64980',\n '#d6336c',\n '#c2255c',\n '#a61e4d'\n ],\n\n grape: [\n '#f8f0fc',\n '#f3d9fa',\n '#eebefa',\n '#e599f7',\n '#da77f2',\n '#cc5de8',\n '#be4bdb',\n '#ae3ec9',\n '#9c36b5',\n '#862e9c'\n ],\n\n violet: [\n '#f3f0ff',\n '#e5dbff',\n '#d0bfff',\n '#b197fc',\n '#9775fa',\n '#845ef7',\n '#7950f2',\n '#7048e8',\n '#6741d9',\n '#5f3dc4'\n ],\n\n indigo: [\n '#edf2ff',\n '#dbe4ff',\n '#bac8ff',\n '#91a7ff',\n '#748ffc',\n '#5c7cfa',\n '#4c6ef5',\n '#4263eb',\n '#3b5bdb',\n '#364fc7'\n ],\n\n blue: [\n '#e7f5ff',\n '#d0ebff',\n '#a5d8ff',\n '#74c0fc',\n '#4dabf7',\n '#339af0',\n '#228be6',\n '#1c7ed6',\n '#1971c2',\n '#1864ab'\n ],\n\n cyan: [\n '#e3fafc',\n '#c5f6fa',\n '#99e9f2',\n '#66d9e8',\n '#3bc9db',\n '#22b8cf',\n '#15aabf',\n '#1098ad',\n '#0c8599',\n '#0b7285'\n ],\n\n teal: [\n '#e6fcf5',\n '#c3fae8',\n '#96f2d7',\n '#63e6be',\n '#38d9a9',\n '#20c997',\n '#12b886',\n '#0ca678',\n '#099268',\n '#087f5b'\n ],\n\n green: [\n '#ebfbee',\n '#d3f9d8',\n '#b2f2bb',\n '#8ce99a',\n '#69db7c',\n '#51cf66',\n '#40c057',\n '#37b24d',\n '#2f9e44',\n '#2b8a3e'\n ],\n\n lime: [\n '#f4fce3',\n '#e9fac8',\n '#d8f5a2',\n '#c0eb75',\n '#a9e34b',\n '#94d82d',\n '#82c91e',\n '#74b816',\n '#66a80f',\n '#5c940d'\n ],\n\n yellow: [\n '#fff9db',\n '#fff3bf',\n '#ffec99',\n '#ffe066',\n '#ffd43b',\n '#fcc419',\n '#fab005',\n '#f59f00',\n '#f08c00',\n '#e67700'\n ],\n\n orange: [\n '#fff4e6',\n '#ffe8cc',\n '#ffd8a8',\n '#ffc078',\n '#ffa94d',\n '#ff922b',\n '#fd7e14',\n '#f76707',\n '#e8590c',\n '#d9480f'\n ]\n}\n"],"mappings":";AAEA,MAAa,iBAA+B;CAC1C,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,KAAK;EACH;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"default-colors.cjs","names":[],"sources":["../../../src/core/config-provider/default-colors.ts"],"sourcesContent":["import type { CThemeColors } from './theme.types'\n\nexport const DEFAULT_COLORS: CThemeColors = {\n dark: [\n '#C9C9C9',\n '#b8b8b8',\n '#828282',\n '#696969',\n '#424242',\n '#3b3b3b',\n '#2e2e2e',\n '#242424',\n '#1f1f1f',\n '#141414',\n ],\n\n gray: [\n '#f8f9fa',\n '#f1f3f5',\n '#e9ecef',\n '#dee2e6',\n '#ced4da',\n '#adb5bd',\n '#868e96',\n '#495057',\n '#343a40',\n '#212529',\n ],\n\n red: [\n '#fff5f5',\n '#ffe3e3',\n '#ffc9c9',\n '#ffa8a8',\n '#ff8787',\n '#ff6b6b',\n '#fa5252',\n '#f03e3e',\n '#e03131',\n '#c92a2a',\n ],\n\n pink: [\n '#fff0f6',\n '#ffdeeb',\n '#fcc2d7',\n '#faa2c1',\n '#f783ac',\n '#f06595',\n '#e64980',\n '#d6336c',\n '#c2255c',\n '#a61e4d',\n ],\n\n grape: [\n '#f8f0fc',\n '#f3d9fa',\n '#eebefa',\n '#e599f7',\n '#da77f2',\n '#cc5de8',\n '#be4bdb',\n '#ae3ec9',\n '#9c36b5',\n '#862e9c',\n ],\n\n violet: [\n '#f3f0ff',\n '#e5dbff',\n '#d0bfff',\n '#b197fc',\n '#9775fa',\n '#845ef7',\n '#7950f2',\n '#7048e8',\n '#6741d9',\n '#5f3dc4',\n ],\n\n indigo: [\n '#edf2ff',\n '#dbe4ff',\n '#bac8ff',\n '#91a7ff',\n '#748ffc',\n '#5c7cfa',\n '#4c6ef5',\n '#4263eb',\n '#3b5bdb',\n '#364fc7',\n ],\n\n blue: [\n '#e7f5ff',\n '#d0ebff',\n '#a5d8ff',\n '#74c0fc',\n '#4dabf7',\n '#339af0',\n '#228be6',\n '#1c7ed6',\n '#1971c2',\n '#1864ab',\n ],\n\n cyan: [\n '#e3fafc',\n '#c5f6fa',\n '#99e9f2',\n '#66d9e8',\n '#3bc9db',\n '#22b8cf',\n '#15aabf',\n '#1098ad',\n '#0c8599',\n '#0b7285',\n ],\n\n teal: [\n '#e6fcf5',\n '#c3fae8',\n '#96f2d7',\n '#63e6be',\n '#38d9a9',\n '#20c997',\n '#12b886',\n '#0ca678',\n '#099268',\n '#087f5b',\n ],\n\n green: [\n '#ebfbee',\n '#d3f9d8',\n '#b2f2bb',\n '#8ce99a',\n '#69db7c',\n '#51cf66',\n '#40c057',\n '#37b24d',\n '#2f9e44',\n '#2b8a3e',\n ],\n\n lime: [\n '#f4fce3',\n '#e9fac8',\n '#d8f5a2',\n '#c0eb75',\n '#a9e34b',\n '#94d82d',\n '#82c91e',\n '#74b816',\n '#66a80f',\n '#5c940d',\n ],\n\n yellow: [\n '#fff9db',\n '#fff3bf',\n '#ffec99',\n '#ffe066',\n '#ffd43b',\n '#fcc419',\n '#fab005',\n '#f59f00',\n '#f08c00',\n '#e67700',\n ],\n\n orange: [\n '#fff4e6',\n '#ffe8cc',\n '#ffd8a8',\n '#ffc078',\n '#ffa94d',\n '#ff922b',\n '#fd7e14',\n '#f76707',\n '#e8590c',\n '#d9480f',\n ],\n}\n"],"mappings":";AAEA,MAAa,iBAA+B;CAC1C,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,KAAK;EACH;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAEA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -13,13 +13,15 @@ const require_get_theme_color = require("./color-functions/get-theme-color/get-t
13
13
  const require_get_gradient = require("./color-functions/get-gradient/get-gradient.cjs");
14
14
  const require_default_variant_colors_resolver = require("./color-functions/default-variant-colors-resolver/default-variant-colors-resolver.cjs");
15
15
  const require_default_theme = require("./default-theme.cjs");
16
+ const require_config_provider_context = require("./config-provider.context.cjs");
17
+ const require_use_component_props = require("./use-component-props/use-component-props.cjs");
16
18
  const require_config_provider = require("./config-provider.cjs");
17
19
  const require_virtual_color = require("./cck-css-variables/virtual-color/virtual-color.cjs");
18
20
  const require_get_css_color_variables = require("./cck-css-variables/get-css-color-variables.cjs");
19
21
  const require_default_css_variables_resolver = require("./cck-css-variables/default-css-variables-resolver.cjs");
20
- const require_config_provider_context = require("./config-provider.context.cjs");
21
22
  const require_create_theme = require("./create-theme/create-theme.cjs");
22
23
  const require_use_cck_color_scheme = require("./use-cck-color-scheme/use-cck-color-scheme.cjs");
24
+ const require_merge_theme_overrides = require("./merge-theme-overrides/merge-theme-overrides.cjs");
23
25
  //#region packages/@cck-ui/core/src/core/config-provider/index.ts
24
26
  const CckConfigProvider = require_install.withInstall(require_config_provider.default);
25
27
  //#endregion
@@ -41,7 +43,9 @@ exports.getThemeColor = require_get_theme_color.getThemeColor;
41
43
  exports.isLightColor = require_luminance.isLightColor;
42
44
  exports.isVirtualColor = require_virtual_color.isVirtualColor;
43
45
  exports.luminance = require_luminance.luminance;
46
+ exports.mergeThemeOverrides = require_merge_theme_overrides.mergeThemeOverrides;
44
47
  exports.parseThemeColor = require_parse_theme_color.parseThemeColor;
48
+ exports.rgb = require_rgba.rgb;
45
49
  exports.rgba = require_rgba.rgba;
46
50
  exports.toRgba = require_to_rgba.toRgba;
47
51
  exports.useCckClassNamesPrefix = require_config_provider_context.useCckClassNamesPrefix;
@@ -54,6 +58,7 @@ exports.useCckStylesTransform = require_config_provider_context.useCckStylesTran
54
58
  exports.useCckSxTransform = require_config_provider_context.useCckSxTransform;
55
59
  exports.useCckTheme = require_config_provider_context.useCckTheme;
56
60
  exports.useCckWithStaticClasses = require_config_provider_context.useCckWithStaticClasses;
61
+ exports.useComponentProps = require_use_component_props.useComponentProps;
57
62
  exports.useConfigContext = require_config_provider_context.useConfigContext;
58
63
  exports.useProviderColorScheme = require_use_provider_color_scheme.useProviderColorScheme;
59
64
  exports.virtualColor = require_virtual_color.virtualColor;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["withInstall","ConfigProvider"],"sources":["../../../src/core/config-provider/index.ts"],"sourcesContent":["import { SFCWithInstall, withInstall } from '../utils'\nimport ConfigProvider from './config-provider.vue'\n\nexport * from './cck-css-variables'\nexport * from './color-functions'\nexport * from './config-provider.context'\nexport * from './config-provider.types'\nexport * from './create-theme/create-theme'\nexport * from './default-theme'\nexport * from './theme.types'\nexport * from './use-cck-color-scheme'\n\nexport const CckConfigProvider: SFCWithInstall<typeof ConfigProvider> = withInstall(ConfigProvider)\nexport default CckConfigProvider\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAa,oBAA2DA,gBAAAA,YAAYC,wBAAAA,OAAc"}
1
+ {"version":3,"file":"index.cjs","names":["withInstall","ConfigProvider"],"sources":["../../../src/core/config-provider/index.ts"],"sourcesContent":["import { SFCWithInstall, withInstall } from '../utils'\nimport ConfigProvider from './config-provider.vue'\n\nexport * from './cck-css-variables'\nexport * from './color-functions'\nexport * from './config-provider.context'\nexport * from './config-provider.types'\nexport * from './create-theme/create-theme'\nexport * from './default-theme'\nexport * from './theme.types'\nexport * from './use-cck-color-scheme'\nexport { useComponentProps } from './use-component-props/use-component-props'\nexport { mergeThemeOverrides } from './merge-theme-overrides/merge-theme-overrides'\n\nexport const CckConfigProvider: SFCWithInstall<typeof ConfigProvider> = withInstall(ConfigProvider)\nexport default CckConfigProvider\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAcA,MAAa,oBAA2DA,gBAAAA,YAAYC,wBAAAA,OAAc"}
@@ -1,4 +1,4 @@
1
- let es_toolkit = require("es-toolkit");
1
+ const require_deep_merge = require("../../utils/deep-merge/deep-merge.cjs");
2
2
  //#region packages/@cck-ui/core/src/core/config-provider/merge-cck-theme/merge-cck-theme.ts
3
3
  const INVALID_PRIMARY_COLOR_ERROR = "[@cck-ui/core] ConfigProvider: Invalid theme.primaryColor, it accepts only key of theme.colors";
4
4
  const INVALID_PRIMARY_SHADE_ERROR = "[@cck-ui/core] ConfigProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";
@@ -18,7 +18,7 @@ function mergeCckTheme(currentTheme, themeOverride) {
18
18
  validateCckTheme(currentTheme);
19
19
  return currentTheme;
20
20
  }
21
- const result = (0, es_toolkit.merge)(currentTheme, themeOverride);
21
+ const result = require_deep_merge.deepMerge(currentTheme, themeOverride);
22
22
  if (themeOverride.fontFamily && !themeOverride.headings?.fontFamily) result.headings = {
23
23
  ...result.headings,
24
24
  fontFamily: themeOverride.fontFamily
@@ -1 +1 @@
1
- {"version":3,"file":"merge-cck-theme.cjs","names":[],"sources":["../../../../src/core/config-provider/merge-cck-theme/merge-cck-theme.ts"],"sourcesContent":["import { merge } from 'es-toolkit'\nimport type { CTheme, CThemeOverride } from '../theme.types'\n\nexport const INVALID_PRIMARY_COLOR_ERROR =\n '[@cck-ui/core] ConfigProvider: Invalid theme.primaryColor, it accepts only key of theme.colors'\n\nexport const INVALID_PRIMARY_SHADE_ERROR =\n '[@cck-ui/core] ConfigProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }'\n\nfunction isValidPrimaryShade(shade: number) {\n if (shade < 0 || shade > 9) {\n return false\n }\n\n return parseInt(shade.toString(), 10) === shade\n}\n\nexport function validateCckTheme(theme: CTheme): asserts theme is CTheme {\n if (!(theme.primaryColor in theme.colors)) {\n throw new Error(INVALID_PRIMARY_COLOR_ERROR)\n }\n\n if (typeof theme.primaryShade === 'object') {\n if (\n !isValidPrimaryShade(theme.primaryShade.dark) ||\n !isValidPrimaryShade(theme.primaryShade.light)\n ) {\n throw new Error(INVALID_PRIMARY_SHADE_ERROR)\n }\n }\n\n if (typeof theme.primaryShade === 'number' && !isValidPrimaryShade(theme.primaryShade)) {\n throw new Error(INVALID_PRIMARY_SHADE_ERROR)\n }\n}\n\nexport function mergeCckTheme(currentTheme: CTheme, themeOverride?: CThemeOverride) {\n if (!themeOverride) {\n validateCckTheme(currentTheme)\n return currentTheme\n }\n\n const result = merge(currentTheme, themeOverride)\n\n if (themeOverride.fontFamily && !themeOverride.headings?.fontFamily) {\n result.headings = { ...result.headings, fontFamily: themeOverride.fontFamily }\n }\n\n validateCckTheme(result)\n return result\n}\n"],"mappings":";;AAGA,MAAa,8BACX;AAEF,MAAa,8BACX;AAEF,SAAS,oBAAoB,OAAe;CAC1C,IAAI,QAAQ,KAAK,QAAQ,GACvB,OAAO;CAGT,OAAO,SAAS,MAAM,SAAS,GAAG,EAAE,MAAM;AAC5C;AAEA,SAAgB,iBAAiB,OAAwC;CACvE,IAAI,EAAE,MAAM,gBAAgB,MAAM,SAChC,MAAM,IAAI,MAAM,2BAA2B;CAG7C,IAAI,OAAO,MAAM,iBAAiB;MAE9B,CAAC,oBAAoB,MAAM,aAAa,IAAI,KAC5C,CAAC,oBAAoB,MAAM,aAAa,KAAK,GAE7C,MAAM,IAAI,MAAM,2BAA2B;CAAA;CAI/C,IAAI,OAAO,MAAM,iBAAiB,YAAY,CAAC,oBAAoB,MAAM,YAAY,GACnF,MAAM,IAAI,MAAM,2BAA2B;AAE/C;AAEA,SAAgB,cAAc,cAAsB,eAAgC;CAClF,IAAI,CAAC,eAAe;EAClB,iBAAiB,YAAY;EAC7B,OAAO;CACT;CAEA,MAAM,UAAA,GAAA,WAAA,MAAA,CAAe,cAAc,aAAa;CAEhD,IAAI,cAAc,cAAc,CAAC,cAAc,UAAU,YACvD,OAAO,WAAW;EAAE,GAAG,OAAO;EAAU,YAAY,cAAc;CAAW;CAG/E,iBAAiB,MAAM;CACvB,OAAO;AACT"}
1
+ {"version":3,"file":"merge-cck-theme.cjs","names":["deepMerge"],"sources":["../../../../src/core/config-provider/merge-cck-theme/merge-cck-theme.ts"],"sourcesContent":["import { deepMerge } from '../../utils'\nimport type { CTheme, CThemeOverride } from '../theme.types'\n\nexport const INVALID_PRIMARY_COLOR_ERROR =\n '[@cck-ui/core] ConfigProvider: Invalid theme.primaryColor, it accepts only key of theme.colors'\n\nexport const INVALID_PRIMARY_SHADE_ERROR =\n '[@cck-ui/core] ConfigProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }'\n\nfunction isValidPrimaryShade(shade: number) {\n if (shade < 0 || shade > 9) {\n return false\n }\n\n return parseInt(shade.toString(), 10) === shade\n}\n\nexport function validateCckTheme(theme: CTheme): asserts theme is CTheme {\n if (!(theme.primaryColor in theme.colors)) {\n throw new Error(INVALID_PRIMARY_COLOR_ERROR)\n }\n\n if (typeof theme.primaryShade === 'object') {\n if (\n !isValidPrimaryShade(theme.primaryShade.dark) ||\n !isValidPrimaryShade(theme.primaryShade.light)\n ) {\n throw new Error(INVALID_PRIMARY_SHADE_ERROR)\n }\n }\n\n if (typeof theme.primaryShade === 'number' && !isValidPrimaryShade(theme.primaryShade)) {\n throw new Error(INVALID_PRIMARY_SHADE_ERROR)\n }\n}\n\nexport function mergeCckTheme(currentTheme: CTheme, themeOverride?: CThemeOverride) {\n if (!themeOverride) {\n validateCckTheme(currentTheme)\n return currentTheme\n }\n\n const result = deepMerge(currentTheme, themeOverride)\n\n if (themeOverride.fontFamily && !themeOverride.headings?.fontFamily) {\n result.headings = { ...result.headings, fontFamily: themeOverride.fontFamily }\n }\n\n validateCckTheme(result)\n return result\n}\n"],"mappings":";;AAGA,MAAa,8BACX;AAEF,MAAa,8BACX;AAEF,SAAS,oBAAoB,OAAe;CAC1C,IAAI,QAAQ,KAAK,QAAQ,GACvB,OAAO;CAGT,OAAO,SAAS,MAAM,SAAS,GAAG,EAAE,MAAM;AAC5C;AAEA,SAAgB,iBAAiB,OAAwC;CACvE,IAAI,EAAE,MAAM,gBAAgB,MAAM,SAChC,MAAM,IAAI,MAAM,2BAA2B;CAG7C,IAAI,OAAO,MAAM,iBAAiB;MAE9B,CAAC,oBAAoB,MAAM,aAAa,IAAI,KAC5C,CAAC,oBAAoB,MAAM,aAAa,KAAK,GAE7C,MAAM,IAAI,MAAM,2BAA2B;CAAA;CAI/C,IAAI,OAAO,MAAM,iBAAiB,YAAY,CAAC,oBAAoB,MAAM,YAAY,GACnF,MAAM,IAAI,MAAM,2BAA2B;AAE/C;AAEA,SAAgB,cAAc,cAAsB,eAAgC;CAClF,IAAI,CAAC,eAAe;EAClB,iBAAiB,YAAY;EAC7B,OAAO;CACT;CAEA,MAAM,SAASA,mBAAAA,UAAU,cAAc,aAAa;CAEpD,IAAI,cAAc,cAAc,CAAC,cAAc,UAAU,YACvD,OAAO,WAAW;EAAE,GAAG,OAAO;EAAU,YAAY,cAAc;CAAW;CAG/E,iBAAiB,MAAM;CACvB,OAAO;AACT"}
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ const require_deep_merge = require("../../utils/deep-merge/deep-merge.cjs");
3
+ //#region packages/@cck-ui/core/src/core/config-provider/merge-theme-overrides/merge-theme-overrides.ts
4
+ function mergeThemeOverrides(...overrides) {
5
+ return overrides.reduce((acc, override) => require_deep_merge.deepMerge(acc, override), {});
6
+ }
7
+ //#endregion
8
+ exports.mergeThemeOverrides = mergeThemeOverrides;
9
+
10
+ //# sourceMappingURL=merge-theme-overrides.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-theme-overrides.cjs","names":["deepMerge"],"sources":["../../../../src/core/config-provider/merge-theme-overrides/merge-theme-overrides.ts"],"sourcesContent":["import { deepMerge } from '../../utils'\nimport { CThemeOverride } from '../theme.types'\n\nexport function mergeThemeOverrides(...overrides: CThemeOverride[]): CThemeOverride {\n return overrides.reduce((acc, override) => deepMerge(acc, override), {})\n}\n"],"mappings":";;;AAGA,SAAgB,oBAAoB,GAAG,WAA6C;CAClF,OAAO,UAAU,QAAQ,KAAK,aAAaA,mBAAAA,UAAU,KAAK,QAAQ,GAAG,CAAC,CAAC;AACzE"}
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ const require_config_provider_context = require("../config-provider.context.cjs");
3
+ let vue = require("vue");
4
+ //#region packages/@cck-ui/core/src/core/config-provider/use-component-props/use-component-props.ts
5
+ function useComponentProps(options) {
6
+ const { component, defaultProps = {}, props } = options;
7
+ const theme = require_config_provider_context.useCckTheme();
8
+ const names = Array.isArray(component) ? component : [component];
9
+ const contextProps = (0, vue.computed)(() => {
10
+ const components = theme.value.components;
11
+ if (!components) return {};
12
+ let result = {};
13
+ for (const name of names) if (name) {
14
+ const config = components[name];
15
+ if (config?.defaultProps) result = {
16
+ ...result,
17
+ ...config.defaultProps
18
+ };
19
+ }
20
+ return result;
21
+ });
22
+ return (0, vue.computed)(() => {
23
+ const filteredProps = {};
24
+ for (const key in props) if (props[key] !== void 0) filteredProps[key] = props[key];
25
+ return {
26
+ ...defaultProps,
27
+ ...contextProps.value,
28
+ ...filteredProps
29
+ };
30
+ });
31
+ }
32
+ //#endregion
33
+ exports.useComponentProps = useComponentProps;
34
+
35
+ //# sourceMappingURL=use-component-props.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-component-props.cjs","names":["useCckTheme"],"sources":["../../../../src/core/config-provider/use-component-props/use-component-props.ts"],"sourcesContent":["import { computed, ComputedRef } from 'vue'\nimport { useCckTheme } from '../config-provider.context'\n\nexport interface UseComponentPropsOptions<\n T extends Record<string, any>,\n U extends Partial<T> | null = {},\n> {\n component: string | (string | undefined)[]\n defaultProps: U\n props: T\n}\n\nexport function useComponentProps<T extends Record<string, any>, U extends Partial<T> | null = {}>(\n options: UseComponentPropsOptions<T, U>\n): ComputedRef<T> {\n const { component, defaultProps = {} as U, props } = options\n\n const theme = useCckTheme()\n const names = Array.isArray(component) ? component : [component]\n\n const contextProps = computed(() => {\n const components = theme.value.components\n if (!components) {\n return {} as Partial<T>\n }\n\n let result: Partial<T> = {}\n for (const name of names) {\n if (name) {\n const config = components[name]\n if (config?.defaultProps) {\n result = { ...result, ...config.defaultProps }\n }\n }\n }\n return result\n })\n\n const mergedProps = computed(() => {\n const filteredProps: Partial<T> = {}\n for (const key in props) {\n if (props[key] !== undefined) {\n filteredProps[key] = props[key]\n }\n }\n return {\n ...(defaultProps as any),\n ...contextProps.value,\n ...filteredProps,\n }\n }) as ComputedRef<T>\n\n return mergedProps\n}\n"],"mappings":";;;;AAYA,SAAgB,kBACd,SACgB;CAChB,MAAM,EAAE,WAAW,eAAe,CAAC,GAAQ,UAAU;CAErD,MAAM,QAAQA,gCAAAA,YAAY;CAC1B,MAAM,QAAQ,MAAM,QAAQ,SAAS,IAAI,YAAY,CAAC,SAAS;CAE/D,MAAM,gBAAA,GAAA,IAAA,SAAA,OAA8B;EAClC,MAAM,aAAa,MAAM,MAAM;EAC/B,IAAI,CAAC,YACH,OAAO,CAAC;EAGV,IAAI,SAAqB,CAAC;EAC1B,KAAK,MAAM,QAAQ,OACjB,IAAI,MAAM;GACR,MAAM,SAAS,WAAW;GAC1B,IAAI,QAAQ,cACV,SAAS;IAAE,GAAG;IAAQ,GAAG,OAAO;GAAa;EAEjD;EAEF,OAAO;CACT,CAAC;CAgBD,QAAA,GAAA,IAAA,SAAA,OAdmC;EACjC,MAAM,gBAA4B,CAAC;EACnC,KAAK,MAAM,OAAO,OAChB,IAAI,MAAM,SAAS,KAAA,GACjB,cAAc,OAAO,MAAM;EAG/B,OAAO;GACL,GAAI;GACJ,GAAG,aAAa;GAChB,GAAG;EACL;CACF,CAEiB;AACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"css-object-to-string.cjs","names":["keys","camelToKebabCase"],"sources":["../../../../src/core/responsive-style-manager/css-object-to-string/css-object-to-string.ts"],"sourcesContent":["import { Properties } from 'csstype'\nimport { camelToKebabCase, keys } from '../../utils'\n\nexport function cssObjectToString(css: Properties) {\n return keys(css)\n .reduce(\n (acc, rule) =>\n css[rule] !== undefined\n ? `${acc}${camelToKebabCase(rule)}:${css[rule]};`\n : acc,\n ''\n )\n .trim()\n}\n"],"mappings":";;;;AAGA,SAAgB,kBAAkB,KAAiB;CACjD,OAAOA,aAAAA,KAAK,GAAG,CAAC,CACb,QACE,KAAK,SACJ,IAAI,UAAU,KAAA,IACV,GAAG,MAAMC,4BAAAA,iBAAiB,IAAI,EAAE,GAAG,IAAI,MAAM,KAC7C,KACN,EACF,CAAC,CACA,KAAK;AACV"}
1
+ {"version":3,"file":"css-object-to-string.cjs","names":["keys","camelToKebabCase"],"sources":["../../../../src/core/responsive-style-manager/css-object-to-string/css-object-to-string.ts"],"sourcesContent":["import { Properties } from 'csstype'\nimport { camelToKebabCase, keys } from '../../utils'\n\nexport function cssObjectToString(css: Properties) {\n return keys(css)\n .reduce(\n (acc, rule) =>\n css[rule] !== undefined ? `${acc}${camelToKebabCase(rule)}:${css[rule]};` : acc,\n ''\n )\n .trim()\n}\n"],"mappings":";;;;AAGA,SAAgB,kBAAkB,KAAiB;CACjD,OAAOA,aAAAA,KAAK,GAAG,CAAC,CACb,QACE,KAAK,SACJ,IAAI,UAAU,KAAA,IAAY,GAAG,MAAMC,4BAAAA,iBAAiB,IAAI,EAAE,GAAG,IAAI,MAAM,KAAK,KAC9E,EACF,CAAC,CACA,KAAK;AACV"}
@@ -2,7 +2,7 @@
2
2
  const require_number_like_string_to_number = require("../../utils/number-like-string-to-number/number-like-string-to-number.cjs");
3
3
  //#region packages/@cck-ui/core/src/core/responsive-style-manager/normalize-number-like-string-prop/normalize-number-like-string-prop.ts
4
4
  function normalizeNumberLikeStringProp(prop) {
5
- if (prop === void 0 || prop === null) return void 0;
5
+ if (prop === void 0 || prop === null) return;
6
6
  if (typeof prop === "number" || typeof prop === "string") return require_number_like_string_to_number.numberLikeStringToNumber(prop);
7
7
  const normalized = {};
8
8
  for (const [key, value] of Object.entries(prop)) if (value !== void 0) normalized[key] = require_number_like_string_to_number.numberLikeStringToNumber(value);
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-number-like-string-prop.cjs","names":["numberLikeStringToNumber"],"sources":["../../../../src/core/responsive-style-manager/normalize-number-like-string-prop/normalize-number-like-string-prop.ts"],"sourcesContent":["import { NumberLikeString, StyleProp } from '../../box'\nimport { CBreakpoint } from '../../config-provider'\nimport { numberLikeStringToNumber } from '../../utils'\n\nexport function normalizeNumberLikeStringProp(\n prop: StyleProp<NumberLikeString | undefined>\n): StyleProp<number> | undefined {\n if (prop === undefined || prop === null) return undefined\n\n if (typeof prop === 'number' || typeof prop === 'string')\n return numberLikeStringToNumber(prop)\n\n const normalized: Partial<Record<CBreakpoint | (string & {}), number>> = {}\n for (const [key, value] of Object.entries(prop)) {\n if (value !== undefined) {\n normalized[key] = numberLikeStringToNumber(value as NumberLikeString)\n }\n }\n return normalized\n}\n"],"mappings":";;;AAIA,SAAgB,8BACd,MAC+B;CAC/B,IAAI,SAAS,KAAA,KAAa,SAAS,MAAM,OAAO,KAAA;CAEhD,IAAI,OAAO,SAAS,YAAY,OAAO,SAAS,UAC9C,OAAOA,qCAAAA,yBAAyB,IAAI;CAEtC,MAAM,aAAmE,CAAC;CAC1E,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,IAAI,GAC5C,IAAI,UAAU,KAAA,GACZ,WAAW,OAAOA,qCAAAA,yBAAyB,KAAyB;CAGxE,OAAO;AACT"}
1
+ {"version":3,"file":"normalize-number-like-string-prop.cjs","names":["numberLikeStringToNumber"],"sources":["../../../../src/core/responsive-style-manager/normalize-number-like-string-prop/normalize-number-like-string-prop.ts"],"sourcesContent":["import { NumberLikeString, StyleProp } from '../../box'\nimport { CBreakpoint } from '../../config-provider'\nimport { numberLikeStringToNumber } from '../../utils'\n\nexport function normalizeNumberLikeStringProp(\n prop: StyleProp<NumberLikeString | undefined>\n): StyleProp<number> | undefined {\n if (prop === undefined || prop === null) {\n return undefined\n }\n\n if (typeof prop === 'number' || typeof prop === 'string') {\n return numberLikeStringToNumber(prop)\n }\n\n const normalized: Partial<Record<CBreakpoint | (string & {}), number>> = {}\n for (const [key, value] of Object.entries(prop)) {\n if (value !== undefined) {\n normalized[key] = numberLikeStringToNumber(value as NumberLikeString)\n }\n }\n return normalized\n}\n"],"mappings":";;;AAIA,SAAgB,8BACd,MAC+B;CAC/B,IAAI,SAAS,KAAA,KAAa,SAAS,MACjC;CAGF,IAAI,OAAO,SAAS,YAAY,OAAO,SAAS,UAC9C,OAAOA,qCAAAA,yBAAyB,IAAI;CAGtC,MAAM,aAAmE,CAAC;CAC1E,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,IAAI,GAC5C,IAAI,UAAU,KAAA,GACZ,WAAW,OAAOA,qCAAAA,yBAAyB,KAAyB;CAGxE,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"responsive-style-manager.cjs","names":[],"sources":["../../../src/core/responsive-style-manager/responsive-style-manager.ts"],"sourcesContent":["export interface StyleManagerEntry {\n refCount: number\n styleEl: HTMLStyleElement\n cssText: string\n}\n\nfunction hashString(str: string): string {\n let hash = 0\n for (let i = 0; i < str.length; i++) {\n hash = (hash << 5) - hash + str.charCodeAt(i)\n hash = Math.trunc(hash)\n }\n return `rsp_${Math.abs(hash)}`\n}\n\nclass ResponsiveStyleManager {\n private styleMap: Map<string, StyleManagerEntry> = new Map()\n\n public register(cssText: string, key?: string): string {\n const finalKey = key || hashString(cssText)\n const existing = this.styleMap.get(finalKey)\n\n if (existing) {\n existing.refCount++\n return finalKey\n }\n\n if (typeof document !== 'undefined') {\n const styleEl = document.createElement('style')\n styleEl.textContent = cssText\n document.head.appendChild(styleEl)\n\n this.styleMap.set(finalKey, {\n refCount: 1,\n styleEl,\n cssText\n })\n } else {\n this.styleMap.set(finalKey, {\n refCount: 1,\n styleEl: null as any,\n cssText\n })\n }\n\n return finalKey\n }\n\n public unregister(styleKey: string): void {\n const entry = this.styleMap.get(styleKey)\n if (!entry) return\n\n entry.refCount--\n if (entry.refCount === 0) {\n if (typeof document !== 'undefined' && entry.styleEl.parentNode) {\n entry.styleEl.parentNode.removeChild(entry.styleEl)\n }\n this.styleMap.delete(styleKey)\n }\n }\n}\n\nexport const responsiveStyleManager = new ResponsiveStyleManager()\n"],"mappings":";;AAMA,SAAS,WAAW,KAAqB;CACvC,IAAI,OAAO;CACX,KAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;EACnC,QAAQ,QAAQ,KAAK,OAAO,IAAI,WAAW,CAAC;EAC5C,OAAO,KAAK,MAAM,IAAI;CACxB;CACA,OAAO,OAAO,KAAK,IAAI,IAAI;AAC7B;AAEA,IAAM,yBAAN,MAA6B;;kCACwB,IAAI,IAAI;;CAE3D,SAAgB,SAAiB,KAAsB;EACrD,MAAM,WAAW,OAAO,WAAW,OAAO;EAC1C,MAAM,WAAW,KAAK,SAAS,IAAI,QAAQ;EAE3C,IAAI,UAAU;GACZ,SAAS;GACT,OAAO;EACT;EAEA,IAAI,OAAO,aAAa,aAAa;GACnC,MAAM,UAAU,SAAS,cAAc,OAAO;GAC9C,QAAQ,cAAc;GACtB,SAAS,KAAK,YAAY,OAAO;GAEjC,KAAK,SAAS,IAAI,UAAU;IAC1B,UAAU;IACV;IACA;GACF,CAAC;EACH,OACE,KAAK,SAAS,IAAI,UAAU;GAC1B,UAAU;GACV,SAAS;GACT;EACF,CAAC;EAGH,OAAO;CACT;CAEA,WAAkB,UAAwB;EACxC,MAAM,QAAQ,KAAK,SAAS,IAAI,QAAQ;EACxC,IAAI,CAAC,OAAO;EAEZ,MAAM;EACN,IAAI,MAAM,aAAa,GAAG;GACxB,IAAI,OAAO,aAAa,eAAe,MAAM,QAAQ,YACnD,MAAM,QAAQ,WAAW,YAAY,MAAM,OAAO;GAEpD,KAAK,SAAS,OAAO,QAAQ;EAC/B;CACF;AACF;AAEA,MAAa,yBAAyB,IAAI,uBAAuB"}
1
+ {"version":3,"file":"responsive-style-manager.cjs","names":[],"sources":["../../../src/core/responsive-style-manager/responsive-style-manager.ts"],"sourcesContent":["export interface StyleManagerEntry {\n refCount: number\n styleEl: HTMLStyleElement\n cssText: string\n}\n\nfunction hashString(str: string): string {\n let hash = 0\n for (let i = 0; i < str.length; i++) {\n hash = (hash << 5) - hash + str.charCodeAt(i)\n hash = Math.trunc(hash)\n }\n return `rsp_${Math.abs(hash)}`\n}\n\nclass ResponsiveStyleManager {\n private styleMap: Map<string, StyleManagerEntry>\n\n constructor() {\n this.styleMap = new Map()\n }\n\n public register(cssText: string, key?: string): string {\n const finalKey = key || hashString(cssText)\n const existing = this.styleMap.get(finalKey)\n\n if (existing) {\n existing.refCount++\n return finalKey\n }\n\n if (typeof document !== 'undefined') {\n const styleEl = document.createElement('style')\n styleEl.textContent = cssText\n document.head.appendChild(styleEl)\n\n this.styleMap.set(finalKey, {\n refCount: 1,\n styleEl,\n cssText,\n })\n } else {\n this.styleMap.set(finalKey, {\n refCount: 1,\n styleEl: null as any,\n cssText,\n })\n }\n\n return finalKey\n }\n\n public unregister(styleKey: string): void {\n const entry = this.styleMap.get(styleKey)\n if (!entry) {\n return\n }\n\n entry.refCount--\n if (entry.refCount === 0) {\n if (typeof document !== 'undefined' && entry.styleEl.parentNode) {\n entry.styleEl.parentNode.removeChild(entry.styleEl)\n }\n this.styleMap.delete(styleKey)\n }\n }\n}\n\nexport const responsiveStyleManager = new ResponsiveStyleManager()\n"],"mappings":";;AAMA,SAAS,WAAW,KAAqB;CACvC,IAAI,OAAO;CACX,KAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;EACnC,QAAQ,QAAQ,KAAK,OAAO,IAAI,WAAW,CAAC;EAC5C,OAAO,KAAK,MAAM,IAAI;CACxB;CACA,OAAO,OAAO,KAAK,IAAI,IAAI;AAC7B;AAEA,IAAM,yBAAN,MAA6B;CAG3B,cAAc;EACZ,KAAK,2BAAW,IAAI,IAAI;CAC1B;CAEA,SAAgB,SAAiB,KAAsB;EACrD,MAAM,WAAW,OAAO,WAAW,OAAO;EAC1C,MAAM,WAAW,KAAK,SAAS,IAAI,QAAQ;EAE3C,IAAI,UAAU;GACZ,SAAS;GACT,OAAO;EACT;EAEA,IAAI,OAAO,aAAa,aAAa;GACnC,MAAM,UAAU,SAAS,cAAc,OAAO;GAC9C,QAAQ,cAAc;GACtB,SAAS,KAAK,YAAY,OAAO;GAEjC,KAAK,SAAS,IAAI,UAAU;IAC1B,UAAU;IACV;IACA;GACF,CAAC;EACH,OACE,KAAK,SAAS,IAAI,UAAU;GAC1B,UAAU;GACV,SAAS;GACT;EACF,CAAC;EAGH,OAAO;CACT;CAEA,WAAkB,UAAwB;EACxC,MAAM,QAAQ,KAAK,SAAS,IAAI,QAAQ;EACxC,IAAI,CAAC,OACH;EAGF,MAAM;EACN,IAAI,MAAM,aAAa,GAAG;GACxB,IAAI,OAAO,aAAa,eAAe,MAAM,QAAQ,YACnD,MAAM,QAAQ,WAAW,YAAY,MAAM,OAAO;GAEpD,KAAK,SAAS,OAAO,QAAQ;EAC/B;CACF;AACF;AAEA,MAAa,yBAAyB,IAAI,uBAAuB"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles-to-string.cjs","names":["cssObjectToString"],"sources":["../../../../src/core/responsive-style-manager/styles-to-string/styles-to-string.ts"],"sourcesContent":["import { Properties } from 'csstype'\nimport { cssObjectToString } from '../css-object-to-string/css-object-to-string'\n\nexport interface StylesMediaQuery {\n query: string\n styles: Properties\n}\n\nexport interface StylesInput {\n selector: string\n styles?: Properties\n media?: StylesMediaQuery[]\n container?: StylesMediaQuery[]\n}\n\nexport function stylesToString({\n container,\n media,\n selector,\n styles\n}: StylesInput) {\n const baseStyles = styles ? cssObjectToString(styles) : ''\n\n const mediaQueryStyles = !Array.isArray(media)\n ? []\n : media.map(\n (item) =>\n `@media${item.query}{.${selector}{${cssObjectToString(item.styles)}}}`\n )\n const containerStyles = !Array.isArray(container)\n ? []\n : container.map(\n (item) =>\n `@container ${item.query}{.${selector}{${cssObjectToString(item.styles)}}}`\n )\n\n return `${baseStyles ? `.${selector}{${baseStyles}}` : ''}${mediaQueryStyles.join('')}${containerStyles.join('')}`.trim()\n}\n"],"mappings":";;;AAeA,SAAgB,eAAe,EAC7B,WACA,OACA,UACA,UACc;CACd,MAAM,aAAa,SAASA,6BAAAA,kBAAkB,MAAM,IAAI;CAExD,MAAM,mBAAmB,CAAC,MAAM,QAAQ,KAAK,IACzC,CAAC,IACD,MAAM,KACH,SACC,SAAS,KAAK,MAAM,IAAI,SAAS,GAAGA,6BAAAA,kBAAkB,KAAK,MAAM,EAAE,GACvE;CACJ,MAAM,kBAAkB,CAAC,MAAM,QAAQ,SAAS,IAC5C,CAAC,IACD,UAAU,KACP,SACC,cAAc,KAAK,MAAM,IAAI,SAAS,GAAGA,6BAAAA,kBAAkB,KAAK,MAAM,EAAE,GAC5E;CAEJ,OAAO,GAAG,aAAa,IAAI,SAAS,GAAG,WAAW,KAAK,KAAK,iBAAiB,KAAK,EAAE,IAAI,gBAAgB,KAAK,EAAE,IAAI,KAAK;AAC1H"}
1
+ {"version":3,"file":"styles-to-string.cjs","names":["cssObjectToString"],"sources":["../../../../src/core/responsive-style-manager/styles-to-string/styles-to-string.ts"],"sourcesContent":["import { Properties } from 'csstype'\nimport { cssObjectToString } from '../css-object-to-string/css-object-to-string'\n\nexport interface StylesMediaQuery {\n query: string\n styles: Properties\n}\n\nexport interface StylesInput {\n selector: string\n styles?: Properties\n media?: StylesMediaQuery[]\n container?: StylesMediaQuery[]\n}\n\nexport function stylesToString({ container, media, selector, styles }: StylesInput) {\n const baseStyles = styles ? cssObjectToString(styles) : ''\n\n const mediaQueryStyles = !Array.isArray(media)\n ? []\n : media.map((item) => `@media${item.query}{.${selector}{${cssObjectToString(item.styles)}}}`)\n const containerStyles = !Array.isArray(container)\n ? []\n : container.map(\n (item) => `@container ${item.query}{.${selector}{${cssObjectToString(item.styles)}}}`\n )\n\n return `${baseStyles ? `.${selector}{${baseStyles}}` : ''}${mediaQueryStyles.join('')}${containerStyles.join('')}`.trim()\n}\n"],"mappings":";;;AAeA,SAAgB,eAAe,EAAE,WAAW,OAAO,UAAU,UAAuB;CAClF,MAAM,aAAa,SAASA,6BAAAA,kBAAkB,MAAM,IAAI;CAExD,MAAM,mBAAmB,CAAC,MAAM,QAAQ,KAAK,IACzC,CAAC,IACD,MAAM,KAAK,SAAS,SAAS,KAAK,MAAM,IAAI,SAAS,GAAGA,6BAAAA,kBAAkB,KAAK,MAAM,EAAE,GAAG;CAC9F,MAAM,kBAAkB,CAAC,MAAM,QAAQ,SAAS,IAC5C,CAAC,IACD,UAAU,KACP,SAAS,cAAc,KAAK,MAAM,IAAI,SAAS,GAAGA,6BAAAA,kBAAkB,KAAK,MAAM,EAAE,GACpF;CAEJ,OAAO,GAAG,aAAa,IAAI,SAAS,GAAG,WAAW,KAAK,KAAK,iBAAiB,KAAK,EAAE,IAAI,gBAAgB,KAAK,EAAE,IAAI,KAAK;AAC1H"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-options-class-names.cjs","names":["resolveClassNames"],"sources":["../../../../../../src/core/styles-api/use-styles/get-class-name/get-options-class-names/get-options-class-names.ts"],"sourcesContent":["import { GetStylesApiOptions } from '../../../styles-api.types'\nimport {\n ResolveClassNamesInput,\n resolveClassNames\n} from '../resolve-class-names/resolve-class-names'\n\ninterface GetOptionsClassNamesInput extends Omit<\n ResolveClassNamesInput,\n 'classNames'\n> {\n selector: string\n options: GetStylesApiOptions | undefined\n}\n\nexport function getOptionsClassNames({\n selector,\n stylesCtx,\n options,\n props,\n theme\n}: GetOptionsClassNamesInput) {\n return resolveClassNames({\n theme,\n classNames: options?.classNames,\n props: options?.props || props,\n stylesCtx\n })[selector]\n}\n"],"mappings":";;;AAcA,SAAgB,qBAAqB,EACnC,UACA,WACA,SACA,OACA,SAC4B;CAC5B,OAAOA,4BAAAA,kBAAkB;EACvB;EACA,YAAY,SAAS;EACrB,OAAO,SAAS,SAAS;EACzB;CACF,CAAC,CAAC,CAAC;AACL"}
1
+ {"version":3,"file":"get-options-class-names.cjs","names":["resolveClassNames"],"sources":["../../../../../../src/core/styles-api/use-styles/get-class-name/get-options-class-names/get-options-class-names.ts"],"sourcesContent":["import { GetStylesApiOptions } from '../../../styles-api.types'\nimport {\n ResolveClassNamesInput,\n resolveClassNames,\n} from '../resolve-class-names/resolve-class-names'\n\ninterface GetOptionsClassNamesInput extends Omit<ResolveClassNamesInput, 'classNames'> {\n selector: string\n options: GetStylesApiOptions | undefined\n}\n\nexport function getOptionsClassNames({\n selector,\n stylesCtx,\n options,\n props,\n theme,\n}: GetOptionsClassNamesInput) {\n return resolveClassNames({\n theme,\n classNames: options?.classNames,\n props: options?.props || props,\n stylesCtx,\n })[selector]\n}\n"],"mappings":";;;AAWA,SAAgB,qBAAqB,EACnC,UACA,WACA,SACA,OACA,SAC4B;CAC5B,OAAOA,4BAAAA,kBAAkB;EACvB;EACA,YAAY,SAAS;EACrB,OAAO,SAAS,SAAS;EACzB;CACF,CAAC,CAAC,CAAC;AACL"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-resolved-class-names.cjs","names":["resolveClassNames"],"sources":["../../../../../../src/core/styles-api/use-styles/get-class-name/get-resolved-class-names/get-resolved-class-names.ts"],"sourcesContent":["import {\n ResolveClassNamesInput,\n resolveClassNames\n} from '../resolve-class-names/resolve-class-names'\n\ninterface GetResolvedClassNamesOptions extends ResolveClassNamesInput {\n selector: string\n}\n\nexport function getResolvedClassNames({\n selector,\n stylesCtx,\n theme,\n classNames,\n props\n}: GetResolvedClassNamesOptions) {\n return resolveClassNames({ theme, classNames, props, stylesCtx })[selector]\n}\n"],"mappings":";;;AASA,SAAgB,sBAAsB,EACpC,UACA,WACA,OACA,YACA,SAC+B;CAC/B,OAAOA,4BAAAA,kBAAkB;EAAE;EAAO;EAAY;EAAO;CAAU,CAAC,CAAC,CAAC;AACpE"}
1
+ {"version":3,"file":"get-resolved-class-names.cjs","names":["resolveClassNames"],"sources":["../../../../../../src/core/styles-api/use-styles/get-class-name/get-resolved-class-names/get-resolved-class-names.ts"],"sourcesContent":["import {\n ResolveClassNamesInput,\n resolveClassNames,\n} from '../resolve-class-names/resolve-class-names'\n\ninterface GetResolvedClassNamesOptions extends ResolveClassNamesInput {\n selector: string\n}\n\nexport function getResolvedClassNames({\n selector,\n stylesCtx,\n theme,\n classNames,\n props,\n}: GetResolvedClassNamesOptions) {\n return resolveClassNames({ theme, classNames, props, stylesCtx })[selector]\n}\n"],"mappings":";;;AASA,SAAgB,sBAAsB,EACpC,UACA,WACA,OACA,YACA,SAC+B;CAC/B,OAAOA,4BAAAA,kBAAkB;EAAE;EAAO;EAAY;EAAO;CAAU,CAAC,CAAC,CAAC;AACpE"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-root-class-name.cjs","names":[],"sources":["../../../../../../src/core/styles-api/use-styles/get-class-name/get-root-class-name/get-root-class-name.ts"],"sourcesContent":["interface GetRootClassNameInput {\n rootSelector: string\n selector: string\n className: string | undefined\n}\n\nexport function getRootClassName({\n rootSelector,\n selector,\n className\n}: GetRootClassNameInput) {\n return rootSelector === selector ? className : undefined\n}\n"],"mappings":";;AAMA,SAAgB,iBAAiB,EAC/B,cACA,UACA,aACwB;CACxB,OAAO,iBAAiB,WAAW,YAAY,KAAA;AACjD"}
1
+ {"version":3,"file":"get-root-class-name.cjs","names":[],"sources":["../../../../../../src/core/styles-api/use-styles/get-class-name/get-root-class-name/get-root-class-name.ts"],"sourcesContent":["interface GetRootClassNameInput {\n rootSelector: string\n selector: string\n className: string | undefined\n}\n\nexport function getRootClassName({ rootSelector, selector, className }: GetRootClassNameInput) {\n return rootSelector === selector ? className : undefined\n}\n"],"mappings":";;AAMA,SAAgB,iBAAiB,EAAE,cAAc,UAAU,aAAoC;CAC7F,OAAO,iBAAiB,WAAW,YAAY,KAAA;AACjD"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-selector-class-name.cjs","names":[],"sources":["../../../../../../src/core/styles-api/use-styles/get-class-name/get-selector-class-name/get-selector-class-name.ts"],"sourcesContent":["interface GetSelectorClassNameInput {\n selector: string\n classes: Record<string, string>\n unstyled: boolean | undefined\n}\n\nexport function getSelectorClassName({\n selector,\n classes,\n unstyled\n}: GetSelectorClassNameInput) {\n return unstyled ? undefined : classes[selector]\n}\n"],"mappings":";;AAMA,SAAgB,qBAAqB,EACnC,UACA,SACA,YAC4B;CAC5B,OAAO,WAAW,KAAA,IAAY,QAAQ;AACxC"}
1
+ {"version":3,"file":"get-selector-class-name.cjs","names":[],"sources":["../../../../../../src/core/styles-api/use-styles/get-class-name/get-selector-class-name/get-selector-class-name.ts"],"sourcesContent":["interface GetSelectorClassNameInput {\n selector: string\n classes: Record<string, string>\n unstyled: boolean | undefined\n}\n\nexport function getSelectorClassName({ selector, classes, unstyled }: GetSelectorClassNameInput) {\n return unstyled ? undefined : classes[selector]\n}\n"],"mappings":";;AAMA,SAAgB,qBAAqB,EAAE,UAAU,SAAS,YAAuC;CAC/F,OAAO,WAAW,KAAA,IAAY,QAAQ;AACxC"}