@cck-ui/core 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/cjs/components/button/button-group/button-group.cjs +61 -35
  2. package/cjs/components/button/button-group/button-group.cjs.map +1 -1
  3. package/cjs/components/button/button-group/button-group.utils.cjs +8 -0
  4. package/cjs/components/button/button-group/button-group.utils.cjs.map +1 -0
  5. package/cjs/components/button/button-group-section/button-group-section.cjs +55 -50
  6. package/cjs/components/button/button-group-section/button-group-section.cjs.map +1 -1
  7. package/cjs/components/button/button-group-section/button-group-section.utils.cjs +25 -0
  8. package/cjs/components/button/button-group-section/button-group-section.utils.cjs.map +1 -0
  9. package/cjs/components/button/index.cjs +8 -4
  10. package/cjs/components/button/index.cjs.map +1 -1
  11. package/cjs/components/group/group.cjs +78 -62
  12. package/cjs/components/group/group.cjs.map +1 -1
  13. package/cjs/components/group/group.utils.cjs +14 -0
  14. package/cjs/components/group/group.utils.cjs.map +1 -0
  15. package/cjs/components/group/index.cjs +5 -1
  16. package/cjs/components/group/index.cjs.map +1 -1
  17. package/cjs/components/loader/index.cjs +5 -1
  18. package/cjs/components/loader/index.cjs.map +1 -1
  19. package/cjs/components/loader/loader.cjs +50 -41
  20. package/cjs/components/loader/loader.cjs.map +1 -1
  21. package/cjs/components/loader/loader.utils.cjs +12 -0
  22. package/cjs/components/loader/loader.utils.cjs.map +1 -0
  23. package/cjs/components/simple-grid/index.cjs +4 -1
  24. package/cjs/components/simple-grid/index.cjs.map +1 -1
  25. package/cjs/components/simple-grid/simple-grid.cjs +46 -21
  26. package/cjs/components/simple-grid/simple-grid.cjs.map +1 -1
  27. package/cjs/components/text/index.cjs +5 -1
  28. package/cjs/components/text/index.cjs.map +1 -1
  29. package/cjs/components/text/text.cjs +46 -39
  30. package/cjs/components/text/text.cjs.map +1 -1
  31. package/cjs/components/text/text.utils.cjs +15 -0
  32. package/cjs/components/text/text.utils.cjs.map +1 -0
  33. package/cjs/components/unstyled-button/index.cjs +4 -1
  34. package/cjs/components/unstyled-button/index.cjs.map +1 -1
  35. package/cjs/components/unstyled-button/unstyled-button.cjs +6 -1
  36. package/cjs/components/unstyled-button/unstyled-button.cjs.map +1 -1
  37. package/esm/components/button/button-group/button-group.mjs +61 -35
  38. package/esm/components/button/button-group/button-group.mjs.map +1 -1
  39. package/esm/components/button/button-group/button-group.utils.mjs +9 -0
  40. package/esm/components/button/button-group/button-group.utils.mjs.map +1 -0
  41. package/esm/components/button/button-group-section/button-group-section.mjs +55 -50
  42. package/esm/components/button/button-group-section/button-group-section.mjs.map +1 -1
  43. package/esm/components/button/button-group-section/button-group-section.utils.mjs +26 -0
  44. package/esm/components/button/button-group-section/button-group-section.utils.mjs.map +1 -0
  45. package/esm/components/button/index.mjs +8 -4
  46. package/esm/components/button/index.mjs.map +1 -1
  47. package/esm/components/group/group.mjs +78 -62
  48. package/esm/components/group/group.mjs.map +1 -1
  49. package/esm/components/group/group.utils.mjs +15 -0
  50. package/esm/components/group/group.utils.mjs.map +1 -0
  51. package/esm/components/group/index.mjs +4 -2
  52. package/esm/components/group/index.mjs.map +1 -1
  53. package/esm/components/loader/index.mjs +4 -1
  54. package/esm/components/loader/index.mjs.map +1 -1
  55. package/esm/components/loader/loader.mjs +50 -41
  56. package/esm/components/loader/loader.mjs.map +1 -1
  57. package/esm/components/loader/loader.utils.mjs +13 -0
  58. package/esm/components/loader/loader.utils.mjs.map +1 -0
  59. package/esm/components/simple-grid/index.mjs +3 -2
  60. package/esm/components/simple-grid/index.mjs.map +1 -1
  61. package/esm/components/simple-grid/simple-grid.mjs +47 -22
  62. package/esm/components/simple-grid/simple-grid.mjs.map +1 -1
  63. package/esm/components/text/index.mjs +4 -2
  64. package/esm/components/text/index.mjs.map +1 -1
  65. package/esm/components/text/text.mjs +46 -39
  66. package/esm/components/text/text.mjs.map +1 -1
  67. package/esm/components/text/text.utils.mjs +16 -0
  68. package/esm/components/text/text.utils.mjs.map +1 -0
  69. package/esm/components/unstyled-button/index.mjs +3 -2
  70. package/esm/components/unstyled-button/index.mjs.map +1 -1
  71. package/esm/components/unstyled-button/unstyled-button.mjs +7 -2
  72. package/esm/components/unstyled-button/unstyled-button.mjs.map +1 -1
  73. package/lib/components/button/button-group/button-group.utils.d.ts +6 -0
  74. package/lib/components/button/button-group-section/button-group-section.utils.d.ts +7 -0
  75. package/lib/components/button/index.d.ts +5 -5
  76. package/lib/components/group/group.utils.d.ts +7 -0
  77. package/lib/components/group/index.d.ts +3 -2
  78. package/lib/components/loader/index.d.ts +3 -2
  79. package/lib/components/loader/loader.utils.d.ts +9 -0
  80. package/lib/components/simple-grid/index.d.ts +3 -2
  81. package/lib/components/stack/index.d.ts +6 -0
  82. package/lib/components/stack/stack.types.d.ts +29 -0
  83. package/lib/components/stack/stack.utils.d.ts +6 -0
  84. package/lib/components/text/index.d.ts +3 -2
  85. package/lib/components/text/text.utils.d.ts +8 -0
  86. package/lib/components/unstyled-button/index.d.ts +3 -2
  87. package/package.json +1 -1
  88. package/styles/stack.css +7 -0
  89. package/styles/stack.layer.css +8 -0
  90. package/styles.css +8 -0
  91. package/styles.layer.css +8 -0
  92. package/cjs/components/loader/use-loader.cjs +0 -10
  93. package/cjs/components/loader/use-loader.cjs.map +0 -1
  94. package/esm/components/loader/use-loader.mjs +0 -10
  95. package/esm/components/loader/use-loader.mjs.map +0 -1
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.mjs";
3
+ import { useComponentProps } from "../../core/config-provider/use-component-props/use-component-props.mjs";
3
4
  import { responsiveStyleManager } from "../../core/responsive-style-manager/responsive-style-manager.mjs";
4
5
  import { useRandomClassName } from "../../core/box/use-random-classname/use-random-classname.mjs";
5
6
  import { CBox } from "../../core/box/index.mjs";
6
7
  import { useStyles } from "../../core/styles-api/use-styles/use-styles.mjs";
7
8
  import simple_grid_module_default from "./simple-grid.module.mjs";
8
9
  import { useSimpleGridStyle } from "./simple-grid-custom.mjs";
9
- import { computed, createBlock, createVNode, defineComponent, mergeProps, normalizeProps, onUnmounted, openBlock, ref, renderSlot, watchEffect, withCtx } from "vue";
10
+ import { computed, createBlock, createVNode, defineComponent, mergeProps, onUnmounted, openBlock, ref, renderSlot, useAttrs, watchEffect, withCtx } from "vue";
10
11
  //#region packages/@cck-ui/core/src/components/simple-grid/simple-grid.vue
11
12
  const _sfc_main = /*@__PURE__*/ defineComponent({
12
13
  name: "CSimpleGrid",
@@ -14,13 +15,11 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
14
15
  props: {
15
16
  cols: {
16
17
  type: null,
17
- required: false,
18
- default: 1
18
+ required: false
19
19
  },
20
20
  spacing: {
21
21
  type: null,
22
- required: false,
23
- default: "md"
22
+ required: false
24
23
  },
25
24
  verticalSpacing: {
26
25
  type: null,
@@ -28,8 +27,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
28
27
  },
29
28
  type: {
30
29
  type: String,
31
- required: false,
32
- default: "media"
30
+ required: false
33
31
  },
34
32
  minColWidth: {
35
33
  type: null,
@@ -334,8 +332,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
334
332
  }
335
333
  },
336
334
  setup(__props, { expose: __expose }) {
337
- __expose();
338
- const props = __props;
335
+ const _container = ref(null);
336
+ const _root = ref(null);
337
+ const attrs = useAttrs();
338
+ const rawProps = __props;
339
+ const props = useComponentProps({
340
+ component: "CSimpleGrid",
341
+ defaultProps: {},
342
+ props: rawProps
343
+ });
339
344
  const knownProps = [
340
345
  "classNames",
341
346
  "className",
@@ -355,21 +360,27 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
355
360
  const getStyles = useStyles({
356
361
  name: "SimpleGrid",
357
362
  classes: simple_grid_module_default,
358
- props,
359
- className: props.className,
360
- style: props.style,
361
- classNames: props.classNames,
362
- styles: props.styles,
363
- unstyled: props.unstyled,
364
- attributes: props.attributes,
365
- vars: props.vars
363
+ props: {
364
+ ...props.value,
365
+ ...attrs
366
+ },
367
+ className: props.value.className,
368
+ style: props.value.style,
369
+ classNames: props.value.classNames,
370
+ styles: props.value.styles,
371
+ unstyled: props.value.unstyled,
372
+ attributes: props.value.attributes,
373
+ vars: props.value.vars
366
374
  });
367
375
  const responsiveClassname = useRandomClassName();
368
- const autoColsAttr = props.minColWidth !== void 0 ? props.autoFlow || "auto-fill" : void 0;
376
+ const autoColsAttr = props.value.minColWidth !== void 0 ? props.value.autoFlow || "auto-fill" : void 0;
369
377
  const rootAttrs = computed(() => getStyles("root", { className: responsiveClassname }));
370
378
  const mergedRootAttrs = computed(() => {
371
379
  const others = {};
372
- for (const key in props) if (!knownProps.includes(key)) others[key] = props[key];
380
+ const propsValue = props.value;
381
+ for (const key in propsValue) if (!knownProps.includes(key)) others[key] = propsValue[key];
382
+ const userMod = props.value.mod;
383
+ [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)];
373
384
  return {
374
385
  ...others,
375
386
  ...rootAttrs.value
@@ -395,7 +406,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
395
406
  onUnmounted(() => {
396
407
  if (currentStyleKey.value) responsiveStyleManager.unregister(currentStyleKey.value);
397
408
  });
409
+ __expose({
410
+ root: computed(() => _root.value?.root ?? null),
411
+ container: computed(() => _container.value?.root ?? null)
412
+ });
398
413
  const __returned__ = {
414
+ _container,
415
+ _root,
416
+ attrs,
417
+ rawProps,
399
418
  props,
400
419
  knownProps,
401
420
  getStyles,
@@ -418,13 +437,19 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
418
437
  }
419
438
  });
420
439
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
421
- return $props.type === "container" ? (openBlock(), createBlock($setup["CBox"], normalizeProps(mergeProps({ key: 0 }, $setup.containerAttrs)), {
422
- default: withCtx(() => [createVNode($setup["CBox"], mergeProps($setup.mergedRootAttrs, { "data-auto-cols": $setup.autoColsAttr }), {
440
+ return $props.type === "container" ? (openBlock(), createBlock($setup["CBox"], mergeProps({
441
+ key: 0,
442
+ ref: "_container"
443
+ }, $setup.containerAttrs), {
444
+ default: withCtx(() => [createVNode($setup["CBox"], mergeProps({ ref: "_root" }, $setup.mergedRootAttrs, { "data-auto-cols": $setup.autoColsAttr }), {
423
445
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
424
446
  _: 3
425
447
  }, 16, ["data-auto-cols"])]),
426
448
  _: 3
427
- }, 16)) : (openBlock(), createBlock($setup["CBox"], mergeProps({ key: 1 }, $setup.mergedRootAttrs, { "data-auto-cols": $setup.autoColsAttr }), {
449
+ }, 16)) : (openBlock(), createBlock($setup["CBox"], mergeProps({
450
+ key: 1,
451
+ ref: "_root"
452
+ }, $setup.mergedRootAttrs, { "data-auto-cols": $setup.autoColsAttr }), {
428
453
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
429
454
  _: 3
430
455
  }, 16, ["data-auto-cols"]));
@@ -1 +1 @@
1
- {"version":3,"file":"simple-grid.mjs","names":[],"sources":["../../../src/components/simple-grid/simple-grid.vue"],"sourcesContent":["<template>\n <c-box v-if=\"type === 'container'\" v-bind=\"containerAttrs\">\n <c-box v-bind=\"mergedRootAttrs\" :data-auto-cols=\"autoColsAttr\">\n <slot />\n </c-box>\n </c-box>\n <template v-else>\n <c-box v-bind=\"mergedRootAttrs\" :data-auto-cols=\"autoColsAttr\">\n <slot />\n </c-box>\n </template>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onUnmounted, ref, watchEffect } from 'vue'\nimport { CBox, responsiveStyleManager, useRandomClassName, useStyles } from '../../core'\nimport type { SimpleGridFactory, SimpleGridProps } from './simple-grid.types'\nimport classes from './simple-grid.module.css'\nimport { useSimpleGridStyle } from './simple-grid-custom'\n\ndefineOptions({\n name: 'CSimpleGrid',\n})\n\nconst props = withDefaults(defineProps<SimpleGridProps>(), {\n cols: 1,\n spacing: 'md',\n type: 'media',\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'cols',\n 'verticalSpacing',\n 'spacing',\n 'type',\n 'minColWidth',\n 'autoFlow',\n 'autoRows',\n 'attributes',\n]\n\nconst getStyles = useStyles<SimpleGridFactory>({\n name: 'SimpleGrid',\n classes,\n props,\n className: props.className,\n style: props.style,\n classNames: props.classNames,\n styles: props.styles,\n unstyled: props.unstyled,\n attributes: props.attributes,\n vars: props.vars,\n})\n\nconst responsiveClassname = useRandomClassName()\n\nconst autoColsAttr = props.minColWidth !== undefined ? props.autoFlow || 'auto-fill' : undefined\n\nconst rootAttrs = computed(() => getStyles('root', { className: responsiveClassname }))\nconst mergedRootAttrs = computed(() => {\n const others: Record<string, any> = {}\n for (const key in props) {\n if (!knownProps.includes(key)) {\n others[key] = props[key as keyof typeof props]\n }\n }\n return { ...others, ...rootAttrs.value }\n})\n\nconst containerAttrs = computed(() => getStyles('container'))\n\nconst gridStyle = useSimpleGridStyle({\n selector: responsiveClassname,\n ...props,\n})\n\nconst currentStyleKey = ref<string | null>(null)\nwatchEffect(() => {\n const cssText = gridStyle.value.queryStylesString\n if (cssText) {\n const newKey = responsiveStyleManager.register(cssText)\n if (currentStyleKey.value && currentStyleKey.value !== newKey) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n currentStyleKey.value = newKey\n } else if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n currentStyleKey.value = null\n }\n})\nonUnmounted(() => {\n if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;EACD,kBAAkB;GAChB,IAAI,gBAAgB,OAClB,uBAAuB,WAAW,gBAAgB,KAAK;EAE3D,CAAC;;;;;;;;;;;;;;;;;;;;;;;;QAnGc,OAAA,SAAI,eAAA,UAAA,GAAjB,YAIQ,OAAA,SAAA,eAAA,WAAA,EAAA,KAAA,EAAA,GAJmC,OAAA,cAAc,CAAA,GAAA;yBAG/C,CAFR,YAEQ,OAAA,SAFR,WAEQ,OAFO,iBAAe,EAAG,kBAAgB,OAAA,aAAY,CAAA,GAAA;0BACnD,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA;;;;yBAIV,YAEQ,OAAA,SAFR,WAEQ,EAAA,KAAA,EAAA,GAFO,OAAA,iBAAe,EAAG,kBAAgB,OAAA,aAAY,CAAA,GAAA;yBACnD,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"simple-grid.mjs","names":[],"sources":["../../../src/components/simple-grid/simple-grid.vue"],"sourcesContent":["<template>\n <c-box ref=\"_container\" v-if=\"type === 'container'\" v-bind=\"containerAttrs\">\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\" :data-auto-cols=\"autoColsAttr\">\n <slot />\n </c-box>\n </c-box>\n <template v-else>\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\" :data-auto-cols=\"autoColsAttr\">\n <slot />\n </c-box>\n </template>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onUnmounted, ref, useAttrs, watchEffect } from 'vue'\nimport {\n CBox,\n responsiveStyleManager,\n useComponentProps,\n useRandomClassName,\n useStyles,\n} from '../../core'\nimport type { SimpleGridFactory, SimpleGridProps } from './simple-grid.types'\nimport classes from './simple-grid.module.css'\nimport { useSimpleGridStyle } from './simple-grid-custom'\n\ndefineOptions({\n name: 'CSimpleGrid',\n})\n\nconst _container = ref<InstanceType<typeof CBox> | null>(null)\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<SimpleGridProps>()\n\nconst props = useComponentProps({\n component: 'CSimpleGrid',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'cols',\n 'verticalSpacing',\n 'spacing',\n 'type',\n 'minColWidth',\n 'autoFlow',\n 'autoRows',\n 'attributes',\n]\n\nconst getStyles = useStyles<SimpleGridFactory>({\n name: 'SimpleGrid',\n classes,\n props: { ...props.value, ...attrs } as SimpleGridProps,\n className: props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n})\n\nconst responsiveClassname = useRandomClassName()\n\nconst autoColsAttr =\n props.value.minColWidth !== undefined ? props.value.autoFlow || 'auto-fill' : undefined\n\nconst rootAttrs = computed(() => getStyles('root', { className: responsiveClassname }))\nconst mergedRootAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n for (const key in propsValue) {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n }\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return { ...others, ...rootAttrs.value }\n})\n\nconst containerAttrs = computed(() => getStyles('container'))\n\nconst gridStyle = useSimpleGridStyle({\n selector: responsiveClassname,\n ...props,\n})\n\nconst currentStyleKey = ref<string | null>(null)\nwatchEffect(() => {\n const cssText = gridStyle.value.queryStylesString\n if (cssText) {\n const newKey = responsiveStyleManager.register(cssText)\n if (currentStyleKey.value && currentStyleKey.value !== newKey) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n currentStyleKey.value = newKey\n } else if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n currentStyleKey.value = null\n }\n})\nonUnmounted(() => {\n if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n container: computed(() => _container.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BA,MAAM,aAAa,IAAsC,IAAI;EAC7D,MAAM,QAAQ,IAAsC,IAAI;EAExD,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,YAAY,UAA6B;GAC7C,MAAM;GACN,SAAA;GACA,OAAO;IAAE,GAAG,MAAM;IAAO,GAAG;GAAM;GAClC,WAAW,MAAM,MAAM;GACvB,OAAO,MAAM,MAAM;GACnB,YAAY,MAAM,MAAM;GACxB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;GACxB,MAAM,MAAM,MAAM;EACpB,CAAC;EAED,MAAM,sBAAsB,mBAAmB;EAE/C,MAAM,eACJ,MAAM,MAAM,gBAAgB,KAAA,IAAY,MAAM,MAAM,YAAY,cAAc,KAAA;EAEhF,MAAM,YAAY,eAAe,UAAU,QAAQ,EAAE,WAAW,oBAAoB,CAAC,CAAC;EACtF,MAAM,kBAAkB,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AQ,KAAA,QAAA,SAAA,CAAA,CAAA;;;;yBAIV,YAEQ,OAAA,SAFR,WAEQ;;EAFD,KAAI;IAAgB,OAAA,iBAAe,EAAG,kBAAgB,OAAA,aAAY,CAAA,GAAA;yBAC/D,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -1,8 +1,10 @@
1
1
  "use client";
2
2
  import { withInstall } from "../../core/utils/vue/install.mjs";
3
+ import { withClasses, withExtend, withPropsFactory, withVarsResolver } from "../../core/utils/vue/statics.mjs";
4
+ import text_module_default from "./text.module.mjs";
5
+ import { varsResolver } from "./text.utils.mjs";
3
6
  import text_default from "./text.mjs";
4
- //#region packages/@cck-ui/core/src/components/text/index.ts
5
- const CText = withInstall(text_default);
7
+ const CText = withInstall(withPropsFactory(withExtend(withVarsResolver(withClasses(text_default, text_module_default), varsResolver))));
6
8
  //#endregion
7
9
  export { CText, CText as default };
8
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Text"],"sources":["../../../src/components/text/index.ts"],"sourcesContent":["import { SFCWithInstall, withInstall } from '../../core'\nimport Text from './text.vue'\n\nexport const CText: SFCWithInstall<typeof Text> = withInstall(Text)\nexport default CText\n\nexport * from './text.types'\n"],"mappings":";;;;AAGA,MAAa,QAAqC,YAAYA,YAAI"}
1
+ {"version":3,"file":"index.mjs","names":["Text","classes"],"sources":["../../../src/components/text/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\nimport Text from './text.vue'\nimport classes from './text.module.css'\nimport { varsResolver } from './text.utils'\n\nconst TextWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(Text, classes), varsResolver))\n)\n\nexport const CText: SFCWithInstallAndClasses<typeof Text, typeof classes> =\n withInstall(TextWithStatic)\n\nexport default CText\n\nexport * from './text.types'\n"],"mappings":";;;;;;AAgBA,MAAa,QACX,YALqB,iBACrB,WAAW,iBAAiB,YAAYA,cAAMC,mBAAO,GAAG,YAAY,CAAC,CAIzD,CAAc"}
@@ -1,12 +1,11 @@
1
1
  "use client";
2
- import { getFontSize, getLineHeight } from "../../core/utils/get-size/get-size.mjs";
3
- import { getGradient } from "../../core/config-provider/color-functions/get-gradient/get-gradient.mjs";
4
2
  import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.mjs";
3
+ import { useComponentProps } from "../../core/config-provider/use-component-props/use-component-props.mjs";
5
4
  import { CBox } from "../../core/box/index.mjs";
6
- import { createVarsResolver } from "../../core/styles-api/create-vars-resolver/create-vars-resolver.mjs";
7
5
  import { useStyles } from "../../core/styles-api/use-styles/use-styles.mjs";
8
6
  import text_module_default from "./text.module.mjs";
9
- import { computed, createBlock, defineComponent, mergeProps, openBlock, renderSlot, withCtx } from "vue";
7
+ import { varsResolver } from "./text.utils.mjs";
8
+ import { computed, createBlock, defineComponent, mergeProps, openBlock, ref, renderSlot, useAttrs, withCtx } from "vue";
10
9
  //#region packages/@cck-ui/core/src/components/text/text.vue
11
10
  const _sfc_main = /*@__PURE__*/ defineComponent({
12
11
  name: "CText",
@@ -339,8 +338,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
339
338
  }
340
339
  },
341
340
  setup(__props, { expose: __expose }) {
342
- __expose();
343
- const props = __props;
341
+ const _root = ref(null);
342
+ const attrs = useAttrs();
343
+ const rawProps = __props;
344
+ const props = useComponentProps({
345
+ component: "CText",
346
+ defaultProps: {},
347
+ props: rawProps
348
+ });
344
349
  function getTextTruncate(truncate) {
345
350
  if (truncate === "start") return "start";
346
351
  if (truncate === "end" || truncate) return "end";
@@ -366,48 +371,52 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
366
371
  "attributes"
367
372
  ];
368
373
  const modList = computed(() => [{
369
- "data-truncate": getTextTruncate(props.truncate),
370
- "data-line-clamp": typeof props.lineClamp === "number",
371
- "data-inline": props.inline,
372
- "data-inherit": props.inherit
373
- }, props.mod]);
374
- const varsResolver = createVarsResolver((theme, { gradient, lineClamp, size, textWrap, variant }) => ({ root: {
375
- "--text-fz": getFontSize(size),
376
- "--text-lh": getLineHeight(size),
377
- "--text-gradient": variant === "gradient" ? getGradient(gradient, theme) : void 0,
378
- "--text-line-clamp": typeof lineClamp === "number" ? lineClamp.toString() : void 0,
379
- "--text-text-wrap": textWrap
380
- } }));
374
+ "data-truncate": getTextTruncate(props.value.truncate),
375
+ "data-line-clamp": typeof props.value.lineClamp === "number",
376
+ "data-inline": props.value.inline,
377
+ "data-inherit": props.value.inherit
378
+ }]);
381
379
  const getStyles = useStyles({
382
- name: ["Text", props.__staticSelector],
383
- props,
380
+ name: ["Text", props.value.__staticSelector],
381
+ props: {
382
+ ...props.value,
383
+ ...attrs
384
+ },
384
385
  classes: text_module_default,
385
- className: props.className,
386
- style: props.style,
387
- classNames: props.classNames,
388
- styles: props.styles,
389
- unstyled: props.unstyled,
390
- attributes: props.attributes,
391
- vars: props.vars,
386
+ className: props.value.className,
387
+ style: props.value.style,
388
+ classNames: props.value.classNames,
389
+ styles: props.value.styles,
390
+ unstyled: props.value.unstyled,
391
+ attributes: props.value.attributes,
392
+ vars: props.value.vars,
392
393
  varsResolver
393
394
  });
394
395
  const rootAttrs = computed(() => getStyles("root", { focusable: true }));
396
+ const mergedAttrs = computed(() => {
397
+ const others = {};
398
+ const propsValue = props.value;
399
+ for (const key in propsValue) if (!knownProps.includes(key)) others[key] = propsValue[key];
400
+ const userMod = props.value.mod;
401
+ const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean), ...modList.value || []];
402
+ return {
403
+ ...others,
404
+ mod: mergedMod,
405
+ ...rootAttrs.value
406
+ };
407
+ });
408
+ __expose({ root: computed(() => _root.value?.root ?? null) });
395
409
  const __returned__ = {
410
+ _root,
411
+ attrs,
412
+ rawProps,
396
413
  props,
397
414
  getTextTruncate,
398
415
  knownProps,
399
416
  modList,
400
- varsResolver,
401
417
  getStyles,
402
418
  rootAttrs,
403
- mergedAttrs: computed(() => {
404
- const others = {};
405
- for (const key in props) if (!knownProps.includes(key)) others[key] = props[key];
406
- return {
407
- ...others,
408
- ...rootAttrs.value
409
- };
410
- }),
419
+ mergedAttrs,
411
420
  get CBox() {
412
421
  return CBox;
413
422
  }
@@ -420,8 +429,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
420
429
  }
421
430
  });
422
431
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
423
- return openBlock(), createBlock($setup["CBox"], mergeProps($setup.mergedAttrs, {
424
- mod: $setup.modList,
432
+ return openBlock(), createBlock($setup["CBox"], mergeProps({ ref: "_root" }, $setup.mergedAttrs, {
425
433
  size: $setup.props.size,
426
434
  tag: $setup.props.span ? "span" : "p",
427
435
  variant: $setup.props.variant
@@ -429,7 +437,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
429
437
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
430
438
  _: 3
431
439
  }, 16, [
432
- "mod",
433
440
  "size",
434
441
  "tag",
435
442
  "variant"
@@ -1 +1 @@
1
- {"version":3,"file":"text.mjs","names":[],"sources":["../../../src/components/text/text.vue"],"sourcesContent":["<template>\n <c-box\n v-bind=\"mergedAttrs\"\n :mod=\"modList\"\n :size=\"props.size\"\n :tag=\"props.span ? 'span' : 'p'\"\n :variant=\"props.variant\"\n >\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport type { TextFactory, TextProps, TextTruncate } from './text.types.ts'\nimport classes from './text.module.css'\nimport {\n createVarsResolver,\n getFontSize,\n getGradient,\n getLineHeight,\n useStyles,\n CBox,\n} from '../../core'\n\ndefineOptions({\n name: 'CText',\n})\n\nconst props = defineProps<TextProps>()\n\nfunction getTextTruncate(truncate: TextTruncate | undefined) {\n if (truncate === 'start') {\n return 'start'\n }\n\n if (truncate === 'end' || truncate) {\n return 'end'\n }\n\n return undefined\n}\n\nconst knownProps = [\n 'lineClamp',\n 'truncate',\n 'inline',\n 'inherit',\n 'gradient',\n 'span',\n 'textWrap',\n '__staticSelector',\n 'vars',\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'variant',\n 'mod',\n 'size',\n 'attributes',\n]\n\nconst modList = computed(() => [\n {\n 'data-truncate': getTextTruncate(props.truncate),\n 'data-line-clamp': typeof props.lineClamp === 'number',\n 'data-inline': props.inline,\n 'data-inherit': props.inherit,\n },\n props.mod,\n])\n\nconst varsResolver = createVarsResolver<TextFactory>(\n (theme, { gradient, lineClamp, size, textWrap, variant }) => ({\n root: {\n '--text-fz': getFontSize(size),\n '--text-lh': getLineHeight(size),\n '--text-gradient': variant === 'gradient' ? getGradient(gradient, theme) : undefined,\n '--text-line-clamp': typeof lineClamp === 'number' ? lineClamp.toString() : undefined,\n '--text-text-wrap': textWrap,\n },\n })\n)\n\nconst getStyles = useStyles<TextFactory>({\n name: ['Text', props.__staticSelector],\n props,\n classes,\n className: props.className,\n style: props.style,\n classNames: props.classNames,\n styles: props.styles,\n unstyled: props.unstyled,\n attributes: props.attributes,\n vars: props.vars,\n varsResolver,\n})\n\nconst rootAttrs = computed(() => getStyles('root', { focusable: true }))\n\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n for (const key in props) {\n if (!knownProps.includes(key)) {\n others[key] = props[key as keyof typeof props]\n }\n }\n return { ...others, ...rootAttrs.value }\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,OAAA,SARR,WAQQ,OAPE,aAAW;EAClB,KAAK,OAAA;EACL,MAAM,OAAA,MAAM;EACZ,KAAK,OAAA,MAAM,OAAI,SAAA;EACf,SAAS,OAAA,MAAM;;yBAER,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"text.mjs","names":[],"sources":["../../../src/components/text/text.vue"],"sourcesContent":["<template>\n <c-box\n ref=\"_root\"\n v-bind=\"mergedAttrs\"\n :size=\"props.size\"\n :tag=\"props.span ? 'span' : 'p'\"\n :variant=\"props.variant\"\n >\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport type { TextFactory, TextProps, TextTruncate } from './text.types.ts'\nimport classes from './text.module.css'\nimport { useStyles, CBox, useComponentProps } from '../../core'\nimport { varsResolver } from './text.utils.js'\n\ndefineOptions({\n name: 'CText',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<TextProps>()\n\nconst props = useComponentProps({\n component: 'CText',\n defaultProps: {},\n props: rawProps,\n})\n\nfunction getTextTruncate(truncate: TextTruncate | undefined) {\n if (truncate === 'start') {\n return 'start'\n }\n\n if (truncate === 'end' || truncate) {\n return 'end'\n }\n\n return undefined\n}\n\nconst knownProps = [\n 'lineClamp',\n 'truncate',\n 'inline',\n 'inherit',\n 'gradient',\n 'span',\n 'textWrap',\n '__staticSelector',\n 'vars',\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'variant',\n 'mod',\n 'size',\n 'attributes',\n]\n\nconst modList = computed(() => [\n {\n 'data-truncate': getTextTruncate(props.value.truncate),\n 'data-line-clamp': typeof props.value.lineClamp === 'number',\n 'data-inline': props.value.inline,\n 'data-inherit': props.value.inherit,\n },\n])\n\nconst getStyles = useStyles<TextFactory>({\n name: ['Text', props.value.__staticSelector],\n props: { ...props.value, ...attrs } as TextProps,\n classes,\n className: props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n})\n\nconst rootAttrs = computed(() => getStyles('root', { focusable: true }))\n\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n for (const key in propsValue) {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n }\n const userMod = props.value.mod\n const mergedMod = [\n ...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)),\n ...(modList.value || []),\n ]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBA,MAAM,QAAQ,IAAsC,IAAI;EAExD,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,SAAS,gBAAgB,UAAoC;GAC3D,IAAI,aAAa,SACf,OAAO;GAGT,IAAI,aAAa,SAAS,UACxB,OAAO;EAIX;EAEA,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GAC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,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import { getFontSize, getLineHeight } from "../../core/utils/get-size/get-size.mjs";
3
+ import { getGradient } from "../../core/config-provider/color-functions/get-gradient/get-gradient.mjs";
4
+ import { createVarsResolver } from "../../core/styles-api/create-vars-resolver/create-vars-resolver.mjs";
5
+ //#region packages/@cck-ui/core/src/components/text/text.utils.ts
6
+ const varsResolver = createVarsResolver((theme, { gradient, lineClamp, size, textWrap, variant }) => ({ root: {
7
+ "--text-fz": getFontSize(size),
8
+ "--text-lh": getLineHeight(size),
9
+ "--text-gradient": variant === "gradient" ? getGradient(gradient, theme) : void 0,
10
+ "--text-line-clamp": typeof lineClamp === "number" ? lineClamp.toString() : void 0,
11
+ "--text-text-wrap": textWrap
12
+ } }));
13
+ //#endregion
14
+ export { varsResolver };
15
+
16
+ //# sourceMappingURL=text.utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.utils.mjs","names":[],"sources":["../../../src/components/text/text.utils.ts"],"sourcesContent":["import { createVarsResolver, getFontSize, getGradient, getLineHeight } from '../../core'\nimport { TextFactory } from './text.types'\n\nexport const varsResolver = createVarsResolver<TextFactory>(\n (theme, { gradient, lineClamp, size, textWrap, variant }) => ({\n root: {\n '--text-fz': getFontSize(size),\n '--text-lh': getLineHeight(size),\n '--text-gradient': variant === 'gradient' ? getGradient(gradient, theme) : undefined,\n '--text-line-clamp': typeof lineClamp === 'number' ? lineClamp.toString() : undefined,\n '--text-text-wrap': textWrap,\n },\n })\n)\n"],"mappings":";;;;;AAGA,MAAa,eAAe,oBACzB,OAAO,EAAE,UAAU,WAAW,MAAM,UAAU,eAAe,EAC5D,MAAM;CACJ,aAAa,YAAY,IAAI;CAC7B,aAAa,cAAc,IAAI;CAC/B,mBAAmB,YAAY,aAAa,YAAY,UAAU,KAAK,IAAI,KAAA;CAC3E,qBAAqB,OAAO,cAAc,WAAW,UAAU,SAAS,IAAI,KAAA;CAC5E,oBAAoB;AACtB,EACF,EACF"}
@@ -1,8 +1,9 @@
1
1
  "use client";
2
2
  import { withInstall } from "../../core/utils/vue/install.mjs";
3
+ import { withClasses, withExtend, withPropsFactory } from "../../core/utils/vue/statics.mjs";
4
+ import unstyled_button_module_default from "./unstyled-button.module.mjs";
3
5
  import unstyled_button_default from "./unstyled-button.mjs";
4
- //#region packages/@cck-ui/core/src/components/unstyled-button/index.ts
5
- const UnstyledButton = withInstall(unstyled_button_default);
6
+ const UnstyledButton = withInstall(withPropsFactory(withExtend(withClasses(unstyled_button_default, unstyled_button_module_default))));
6
7
  //#endregion
7
8
  export { UnstyledButton, UnstyledButton as default };
8
9
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["_UnstyledButton"],"sources":["../../../src/components/unstyled-button/index.ts"],"sourcesContent":["import { SFCWithInstall, withInstall } from '../../core'\nimport _UnstyledButton from './unstyled-button.vue'\n\nexport const UnstyledButton: SFCWithInstall<typeof _UnstyledButton> = withInstall(_UnstyledButton)\nexport default UnstyledButton\n\nexport * from './unstyled-button.types'\n"],"mappings":";;;;AAGA,MAAa,iBAAyD,YAAYA,uBAAe"}
1
+ {"version":3,"file":"index.mjs","names":["_UnstyledButton","classes"],"sources":["../../../src/components/unstyled-button/index.ts"],"sourcesContent":["import {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n} from '../../core'\nimport _UnstyledButton from './unstyled-button.vue'\nimport classes from './unstyled-button.module.css'\n\nconst UnstyledButtonWithStatic = withPropsFactory(withExtend(withClasses(_UnstyledButton, classes)))\n\nexport const UnstyledButton: SFCWithInstallAndClasses<typeof _UnstyledButton, typeof classes> =\n withInstall(UnstyledButtonWithStatic)\nexport default UnstyledButton\n\nexport * from './unstyled-button.types'\n"],"mappings":";;;;;AAYA,MAAa,iBACX,YAH+B,iBAAiB,WAAW,YAAYA,yBAAiBC,8BAAO,CAAC,CAGpF,CAAwB"}
@@ -4,7 +4,7 @@ import { useComponentProps } from "../../core/config-provider/use-component-prop
4
4
  import { CBox } from "../../core/box/index.mjs";
5
5
  import { useStyles } from "../../core/styles-api/use-styles/use-styles.mjs";
6
6
  import unstyled_button_module_default from "./unstyled-button.module.mjs";
7
- import { computed, createBlock, defineComponent, mergeProps, openBlock, ref, renderSlot, withCtx } from "vue";
7
+ import { computed, createBlock, defineComponent, mergeProps, openBlock, ref, renderSlot, useAttrs, withCtx } from "vue";
8
8
  //#region packages/@cck-ui/core/src/components/unstyled-button/unstyled-button.vue
9
9
  const _sfc_main = /*@__PURE__*/ defineComponent({
10
10
  name: "UnstyledButton",
@@ -313,6 +313,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
313
313
  }
314
314
  },
315
315
  setup(__props, { expose: __expose }) {
316
+ const attrs = useAttrs();
316
317
  const rawProps = __props;
317
318
  const props = useComponentProps({
318
319
  component: "UnstyledButton",
@@ -333,7 +334,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
333
334
  ];
334
335
  const getStyles = useStyles({
335
336
  name: props.value.__staticSelector,
336
- props: props.value,
337
+ props: {
338
+ ...props.value,
339
+ ...attrs
340
+ },
337
341
  classes: unstyled_button_module_default,
338
342
  className: props.value.className,
339
343
  style: props.value.style,
@@ -354,6 +358,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
354
358
  });
355
359
  __expose({ root: computed(() => _root.value?.root ?? null) });
356
360
  const __returned__ = {
361
+ attrs,
357
362
  rawProps,
358
363
  props,
359
364
  tag,
@@ -1 +1 @@
1
- {"version":3,"file":"unstyled-button.mjs","names":[],"sources":["../../../src/components/unstyled-button/unstyled-button.vue"],"sourcesContent":["<template>\n <c-box\n ref=\"_root\"\n v-bind=\"mergedAttrs\"\n :tag=\"tag\"\n :type=\"tag === 'button' ? 'button' : undefined\"\n >\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from 'vue'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport type { UnstyledButtonFactory, UnstyledButtonProps } from './unstyled-button.types'\nimport classes from './unstyled-button.module.css'\n\ndefineOptions({\n name: 'UnstyledButton',\n})\n\n// const props = withDefaults(defineProps<UnstyledButtonProps>(), {\n// __staticSelector: 'UnstyledButton',\n// })\n\nconst rawProps = defineProps<UnstyledButtonProps>()\n\nconst props = useComponentProps({\n component: 'UnstyledButton',\n defaultProps: {\n __staticSelector: 'UnstyledButton',\n },\n props: rawProps,\n})\n\nconst { tag = 'button' } = props.value\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst knownProps = [\n 'className',\n 'tag',\n '__staticSelector',\n 'unstyled',\n 'classNames',\n 'styles',\n 'style',\n 'attributes',\n]\n\nconst getStyles = useStyles<UnstyledButtonFactory>({\n name: props.value.__staticSelector!,\n props: props.value,\n classes,\n className: props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n})\n\nconst rootAttrs = computed(() => getStyles('root', { focusable: true }))\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n for (const key in propsValue) {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n }\n return { ...others, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBA,MAAM,WAAW;EAEjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc,EACZ,kBAAkB,iBACpB;GACA,OAAO;EACT,CAAC;EAED,MAAM,EAAE,MAAM,aAAa,MAAM;EAEjC,MAAM,QAAQ,IAAsC,IAAI;EAExD,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,YAAY,UAAiC;GACjD,MAAM,MAAM,MAAM;GAClB,OAAO,MAAM;GACb,SAAA;GACA,WAAW,MAAM,MAAM;GACvB,OAAO,MAAM,MAAM;GACnB,YAAY,MAAM,MAAM;GACxB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;EAC1B,CAAC;EAED,MAAM,YAAY,eAAe,UAAU,QAAQ,EAAE,WAAW,KAAK,CAAC,CAAC;EACvE,MAAM,cAAc,eAAe;GACjC,MAAM,SAA8B,CAAC;GACrC,MAAM,aAAa,MAAM;GACzB,KAAK,MAAM,OAAO,YAChB,IAAI,CAAC,WAAW,SAAS,GAAG,GAC1B,OAAO,OAAO,WAAW;GAG7B,OAAO;IAAE,GAAG;IAAQ,GAAG,UAAU;GAAM;EACzC,CAAC;EAED,SAAa,EACX,MAAM,eAAe,MAAM,OAAO,QAAQ,IAAI,EAChD,CAAC;;;;;;;;;;;;;;;;;;;;;;qBA3EC,YAOQ,OAAA,SAPR,WAOQ,EANN,KAAI,QAAO,GACH,OAAA,aAAW;EAClB,KAAK,OAAA;EACL,MAAM,OAAA,QAAG,WAAA,WAA2B,KAAA;;yBAE7B,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"unstyled-button.mjs","names":[],"sources":["../../../src/components/unstyled-button/unstyled-button.vue"],"sourcesContent":["<template>\n <c-box\n ref=\"_root\"\n v-bind=\"mergedAttrs\"\n :tag=\"tag\"\n :type=\"tag === 'button' ? 'button' : undefined\"\n >\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport type { UnstyledButtonFactory, UnstyledButtonProps } from './unstyled-button.types'\nimport classes from './unstyled-button.module.css'\n\ndefineOptions({\n name: 'UnstyledButton',\n})\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<UnstyledButtonProps>()\n\nconst props = useComponentProps({\n component: 'UnstyledButton',\n defaultProps: {\n __staticSelector: 'UnstyledButton',\n },\n props: rawProps,\n})\n\nconst { tag = 'button' } = props.value\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst knownProps = [\n 'className',\n 'tag',\n '__staticSelector',\n 'unstyled',\n 'classNames',\n 'styles',\n 'style',\n 'attributes',\n]\n\nconst getStyles = useStyles<UnstyledButtonFactory>({\n name: props.value.__staticSelector!,\n props: { ...props.value, ...attrs } as UnstyledButtonProps,\n classes,\n className: props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n})\n\nconst rootAttrs = computed(() => getStyles('root', { focusable: true }))\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n for (const key in propsValue) {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n }\n return { ...others, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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props: import("./button-group.types").ButtonGroupProps;
3
+ ref: HTMLDivElement;
4
+ stylesNames: import("./button-group.types").ButtonGroupStylesNames;
5
+ vars: import("./button-group.types").ButtonGroupCssVariables;
6
+ }>;
@@ -0,0 +1,7 @@
1
+ export declare const varsResolver: import("../../..").VarsResolver<{
2
+ props: import("./button-group-section.types").ButtonGroupSectionProps;
3
+ ref: HTMLDivElement;
4
+ stylesNames: import("./button-group-section.types").ButtonGroupSectionStylesNames;
5
+ vars: import("./button-group-section.types").ButtonGroupSectionCssVariables;
6
+ variant: import("..").ButtonVariant;
7
+ }>;
@@ -1,13 +1,13 @@
1
- import { type SFCWithInstall, type SFCWithInstallAndClasses } from '../../core';
1
+ import { type SFCWithInstallAndClasses } from '../../core';
2
2
  import ButtonGroup from './button-group/button-group.vue';
3
3
  import ButtonGroupSection from './button-group-section/button-group-section.vue';
4
4
  import Button from './button.vue';
5
5
  import classes from './button.module.css';
6
- export declare const CButtonGroup: SFCWithInstall<typeof ButtonGroup>;
7
- export declare const CButtonGroupSection: SFCWithInstall<typeof ButtonGroupSection>;
6
+ export declare const CButtonGroup: SFCWithInstallAndClasses<typeof ButtonGroup, typeof classes>;
7
+ export declare const CButtonGroupSection: SFCWithInstallAndClasses<typeof ButtonGroupSection, typeof classes>;
8
8
  export declare const CButton: SFCWithInstallAndClasses<typeof Button, typeof classes> & {
9
- ButtonGroup: typeof ButtonGroup;
10
- ButtonGroupSection: typeof ButtonGroupSection;
9
+ CButtonGroup: typeof CButtonGroup;
10
+ CButtonGroupSection: typeof CButtonGroupSection;
11
11
  };
12
12
  export default CButton;
13
13
  export * from './button-group-section/button-group-section.types';
@@ -0,0 +1,7 @@
1
+ export declare const varsResolver: import("../..").VarsResolver<{
2
+ props: import("./group.types").GroupProps;
3
+ ref: HTMLDivElement;
4
+ stylesNames: import("./group.types").GroupStylesNames;
5
+ vars: import("./group.types").GroupCssVariables;
6
+ ctx: import("./group.types").GroupStylesCtx;
7
+ }>;
@@ -1,5 +1,6 @@
1
- import { SFCWithInstall } from '../../core';
1
+ import { SFCWithInstallAndClasses } from '../../core';
2
2
  import Group from './group.vue';
3
- export declare const CGroup: SFCWithInstall<typeof Group>;
3
+ import classes from './group.module.css';
4
+ export declare const CGroup: SFCWithInstallAndClasses<typeof Group, typeof classes>;
4
5
  export default CGroup;
5
6
  export * from './group.types';
@@ -1,7 +1,8 @@
1
- import { SFCWithInstall } from '../../core';
1
+ import { SFCWithInstallAndClasses } from '../../core';
2
2
  import Loader from './loader.vue';
3
3
  import { CLoadersRecord } from './loader.types.js';
4
+ import classes from './loader.module.css';
4
5
  export declare const CDefaultLoaders: CLoadersRecord;
5
- export declare const CLoader: SFCWithInstall<typeof Loader>;
6
+ export declare const CLoader: SFCWithInstallAndClasses<typeof Loader, typeof classes>;
6
7
  export default CLoader;
7
8
  export * from './loader.types';
@@ -0,0 +1,9 @@
1
+ export declare const varsResolver: import("../..").VarsResolver<{
2
+ props: import("./loader.types").LoaderProps;
3
+ ref: SVGSVGElement;
4
+ stylesNames: import("./loader.types").LoaderStylesNames;
5
+ vars: import("./loader.types").LoaderCssVariables;
6
+ staticComponents: {
7
+ defaultLoaders: typeof import(".").CDefaultLoaders;
8
+ };
9
+ }>;
@@ -1,5 +1,6 @@
1
- import { SFCWithInstall } from '../../core';
1
+ import { SFCWithInstallAndClasses } from '../../core';
2
2
  import SimpleGrid from './simple-grid.vue';
3
- export declare const CSimpleGrid: SFCWithInstall<typeof SimpleGrid>;
3
+ import classes from './simple-grid.module.css';
4
+ export declare const CSimpleGrid: SFCWithInstallAndClasses<typeof SimpleGrid, typeof classes>;
4
5
  export default CSimpleGrid;
5
6
  export * from './simple-grid.types';
@@ -0,0 +1,6 @@
1
+ import Stack from './stack.vue';
2
+ import classes from './stack.module.css';
3
+ import { SFCWithInstallAndClasses } from '../../core';
4
+ export declare const CStack: SFCWithInstallAndClasses<typeof Stack, typeof classes>;
5
+ export default CStack;
6
+ export * from './stack.types';
@@ -0,0 +1,29 @@
1
+ import { Properties } from 'csstype';
2
+ import { BoxProps, CSpacing, ElementProps, Factory, StylesApiProps } from '../../core';
3
+ export type StackStylesNames = 'root';
4
+ export type StackCssVariables = {
5
+ root: '--stack-gap' | '--stack-align' | '--stack-justify';
6
+ };
7
+ export interface StackProps extends BoxProps, StylesApiProps<StackFactory>, /* @vue-ignore */ ElementProps<'div'> {
8
+ /**
9
+ * @description Key of `theme.spacing` or any valid CSS value to set `gap` property, numbers are converted to rem
10
+ * @default 'md'
11
+ */
12
+ gap?: CSpacing;
13
+ /**
14
+ * @description Controls `align-items` CSS property
15
+ * @default 'stretch'
16
+ */
17
+ align?: Properties['alignItems'];
18
+ /**
19
+ * @description Controls `justify-content` CSS property
20
+ * @default 'flex-start'
21
+ */
22
+ justify?: Properties['justifyContent'];
23
+ }
24
+ export type StackFactory = Factory<{
25
+ props: StackProps;
26
+ ref: HTMLDivElement;
27
+ stylesNames: StackStylesNames;
28
+ vars: StackCssVariables;
29
+ }>;
@@ -0,0 +1,6 @@
1
+ export declare const varsResolver: import("../..").VarsResolver<{
2
+ props: import("./stack.types").StackProps;
3
+ ref: HTMLDivElement;
4
+ stylesNames: import("./stack.types").StackStylesNames;
5
+ vars: import("./stack.types").StackCssVariables;
6
+ }>;
@@ -1,5 +1,6 @@
1
- import { SFCWithInstall } from '../../core';
1
+ import { SFCWithInstallAndClasses } from '../../core';
2
2
  import Text from './text.vue';
3
- export declare const CText: SFCWithInstall<typeof Text>;
3
+ import classes from './text.module.css';
4
+ export declare const CText: SFCWithInstallAndClasses<typeof Text, typeof classes>;
4
5
  export default CText;
5
6
  export * from './text.types';
@@ -0,0 +1,8 @@
1
+ export declare const varsResolver: import("../..").VarsResolver<{
2
+ props: import("./text.types").TextProps;
3
+ defaultComponent: "p";
4
+ defaultRef: HTMLParagraphElement;
5
+ stylesNames: import("./text.types").TextStylesNames;
6
+ vars: import("./text.types").TextCssVariables;
7
+ variant: import("./text.types").TextVariant;
8
+ }>;
@@ -1,5 +1,6 @@
1
- import { SFCWithInstall } from '../../core';
1
+ import { SFCWithInstallAndClasses } from '../../core';
2
2
  import _UnstyledButton from './unstyled-button.vue';
3
- export declare const UnstyledButton: SFCWithInstall<typeof _UnstyledButton>;
3
+ import classes from './unstyled-button.module.css';
4
+ export declare const UnstyledButton: SFCWithInstallAndClasses<typeof _UnstyledButton, typeof classes>;
4
5
  export default UnstyledButton;
5
6
  export * from './unstyled-button.types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cck-ui/core",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Vue component library focused on usability, accessibility and developer experience",
5
5
  "homepage": "https://cck-ui.jackatlas.xyz",
6
6
  "license": "ISC",