@cck-ui/core 0.5.0 → 0.6.1
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.
- package/cjs/components/button/button-group/button-group.cjs +61 -35
- package/cjs/components/button/button-group/button-group.cjs.map +1 -1
- package/cjs/components/button/button-group/button-group.utils.cjs +8 -0
- package/cjs/components/button/button-group/button-group.utils.cjs.map +1 -0
- package/cjs/components/button/button-group-section/button-group-section.cjs +55 -50
- package/cjs/components/button/button-group-section/button-group-section.cjs.map +1 -1
- package/cjs/components/button/button-group-section/button-group-section.utils.cjs +25 -0
- package/cjs/components/button/button-group-section/button-group-section.utils.cjs.map +1 -0
- package/cjs/components/button/index.cjs +8 -4
- package/cjs/components/button/index.cjs.map +1 -1
- package/cjs/components/group/group.cjs +78 -62
- package/cjs/components/group/group.cjs.map +1 -1
- package/cjs/components/group/group.utils.cjs +14 -0
- package/cjs/components/group/group.utils.cjs.map +1 -0
- package/cjs/components/group/index.cjs +5 -1
- package/cjs/components/group/index.cjs.map +1 -1
- package/cjs/components/loader/index.cjs +5 -1
- package/cjs/components/loader/index.cjs.map +1 -1
- package/cjs/components/loader/loader.cjs +50 -41
- package/cjs/components/loader/loader.cjs.map +1 -1
- package/cjs/components/loader/loader.utils.cjs +12 -0
- package/cjs/components/loader/loader.utils.cjs.map +1 -0
- package/cjs/components/simple-grid/index.cjs +4 -1
- package/cjs/components/simple-grid/index.cjs.map +1 -1
- package/cjs/components/simple-grid/simple-grid.cjs +46 -21
- package/cjs/components/simple-grid/simple-grid.cjs.map +1 -1
- package/cjs/components/stack/index.cjs +14 -0
- package/cjs/components/stack/index.cjs.map +1 -0
- package/cjs/components/stack/stack.cjs +406 -0
- package/cjs/components/stack/stack.cjs.map +1 -0
- package/cjs/components/stack/stack.module.cjs +7 -0
- package/cjs/components/stack/stack.module.cjs.map +1 -0
- package/cjs/components/stack/stack.utils.cjs +12 -0
- package/cjs/components/stack/stack.utils.cjs.map +1 -0
- package/cjs/components/text/index.cjs +5 -1
- package/cjs/components/text/index.cjs.map +1 -1
- package/cjs/components/text/text.cjs +46 -39
- package/cjs/components/text/text.cjs.map +1 -1
- package/cjs/components/text/text.utils.cjs +15 -0
- package/cjs/components/text/text.utils.cjs.map +1 -0
- package/cjs/components/unstyled-button/index.cjs +4 -1
- package/cjs/components/unstyled-button/index.cjs.map +1 -1
- package/cjs/components/unstyled-button/unstyled-button.cjs +6 -1
- package/cjs/components/unstyled-button/unstyled-button.cjs.map +1 -1
- package/cjs/index.cjs +6 -3
- package/cjs/index.cjs.map +1 -1
- package/esm/components/button/button-group/button-group.mjs +61 -35
- package/esm/components/button/button-group/button-group.mjs.map +1 -1
- package/esm/components/button/button-group/button-group.utils.mjs +9 -0
- package/esm/components/button/button-group/button-group.utils.mjs.map +1 -0
- package/esm/components/button/button-group-section/button-group-section.mjs +55 -50
- package/esm/components/button/button-group-section/button-group-section.mjs.map +1 -1
- package/esm/components/button/button-group-section/button-group-section.utils.mjs +26 -0
- package/esm/components/button/button-group-section/button-group-section.utils.mjs.map +1 -0
- package/esm/components/button/index.mjs +8 -4
- package/esm/components/button/index.mjs.map +1 -1
- package/esm/components/group/group.mjs +78 -62
- package/esm/components/group/group.mjs.map +1 -1
- package/esm/components/group/group.utils.mjs +15 -0
- package/esm/components/group/group.utils.mjs.map +1 -0
- package/esm/components/group/index.mjs +4 -2
- package/esm/components/group/index.mjs.map +1 -1
- package/esm/components/loader/index.mjs +4 -1
- package/esm/components/loader/index.mjs.map +1 -1
- package/esm/components/loader/loader.mjs +50 -41
- package/esm/components/loader/loader.mjs.map +1 -1
- package/esm/components/loader/loader.utils.mjs +13 -0
- package/esm/components/loader/loader.utils.mjs.map +1 -0
- package/esm/components/simple-grid/index.mjs +3 -2
- package/esm/components/simple-grid/index.mjs.map +1 -1
- package/esm/components/simple-grid/simple-grid.mjs +47 -22
- package/esm/components/simple-grid/simple-grid.mjs.map +1 -1
- package/esm/components/stack/index.mjs +11 -0
- package/esm/components/stack/index.mjs.map +1 -0
- package/esm/components/stack/stack.mjs +406 -0
- package/esm/components/stack/stack.mjs.map +1 -0
- package/esm/components/stack/stack.module.mjs +7 -0
- package/esm/components/stack/stack.module.mjs.map +1 -0
- package/esm/components/stack/stack.utils.mjs +13 -0
- package/esm/components/stack/stack.utils.mjs.map +1 -0
- package/esm/components/text/index.mjs +4 -2
- package/esm/components/text/index.mjs.map +1 -1
- package/esm/components/text/text.mjs +46 -39
- package/esm/components/text/text.mjs.map +1 -1
- package/esm/components/text/text.utils.mjs +16 -0
- package/esm/components/text/text.utils.mjs.map +1 -0
- package/esm/components/unstyled-button/index.mjs +3 -2
- package/esm/components/unstyled-button/index.mjs.map +1 -1
- package/esm/components/unstyled-button/unstyled-button.mjs +7 -2
- package/esm/components/unstyled-button/unstyled-button.mjs.map +1 -1
- package/esm/index.mjs +3 -1
- package/esm/index.mjs.map +1 -1
- package/lib/components/button/button-group/button-group.utils.d.ts +6 -0
- package/lib/components/button/button-group-section/button-group-section.utils.d.ts +7 -0
- package/lib/components/button/index.d.ts +5 -5
- package/lib/components/group/group.utils.d.ts +7 -0
- package/lib/components/group/index.d.ts +3 -2
- package/lib/components/index.d.ts +1 -0
- package/lib/components/loader/index.d.ts +3 -2
- package/lib/components/loader/loader.utils.d.ts +9 -0
- package/lib/components/simple-grid/index.d.ts +3 -2
- package/lib/components/stack/index.d.ts +6 -0
- package/lib/components/stack/stack.types.d.ts +29 -0
- package/lib/components/stack/stack.utils.d.ts +6 -0
- package/lib/components/text/index.d.ts +3 -2
- package/lib/components/text/text.utils.d.ts +8 -0
- package/lib/components/unstyled-button/index.d.ts +3 -2
- package/package.json +1 -1
- package/styles/stack.css +7 -0
- package/styles/stack.layer.css +8 -0
- package/styles.css +8 -0
- package/styles.layer.css +8 -0
- package/cjs/components/loader/use-loader.cjs +0 -10
- package/cjs/components/loader/use-loader.cjs.map +0 -1
- package/esm/components/loader/use-loader.mjs +0 -10
- 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,
|
|
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
|
-
|
|
338
|
-
const
|
|
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
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
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
|
-
|
|
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"],
|
|
422
|
-
|
|
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({
|
|
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 {
|
|
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":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { withInstall } from "../../core/utils/vue/install.mjs";
|
|
3
|
+
import { withClasses, withExtend, withPropsFactory, withVarsResolver } from "../../core/utils/vue/statics.mjs";
|
|
4
|
+
import stack_module_default from "./stack.module.mjs";
|
|
5
|
+
import { varsResolver } from "./stack.utils.mjs";
|
|
6
|
+
import stack_default from "./stack.mjs";
|
|
7
|
+
const CStack = withInstall(withPropsFactory(withExtend(withVarsResolver(withClasses(stack_default, stack_module_default), varsResolver))));
|
|
8
|
+
//#endregion
|
|
9
|
+
export { CStack, CStack as default };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["Stack","classes"],"sources":["../../../src/components/stack/index.ts"],"sourcesContent":["import Stack from './stack.vue'\nimport classes from './stack.module.css'\nimport { varsResolver } from './stack.utils'\nimport {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\n\nconst StackWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(Stack, classes), varsResolver))\n)\n\nexport const CStack: SFCWithInstallAndClasses<typeof Stack, typeof classes> =\n withInstall(StackWithStatic)\n\nexport default CStack\n\nexport * from './stack.types'\n"],"mappings":";;;;;;AAgBA,MAAa,SACX,YALsB,iBACtB,WAAW,iBAAiB,YAAYA,eAAOC,oBAAO,GAAG,YAAY,CAAC,CAI1D,CAAe"}
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
"use client";
|
|
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";
|
|
4
|
+
import { CBox } from "../../core/box/index.mjs";
|
|
5
|
+
import { useStyles } from "../../core/styles-api/use-styles/use-styles.mjs";
|
|
6
|
+
import stack_module_default from "./stack.module.mjs";
|
|
7
|
+
import { varsResolver } from "./stack.utils.mjs";
|
|
8
|
+
import { computed, createBlock, defineComponent, mergeProps, openBlock, ref, renderSlot, useAttrs, withCtx } from "vue";
|
|
9
|
+
//#region packages/@cck-ui/core/src/components/stack/stack.vue
|
|
10
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
11
|
+
name: "CStack",
|
|
12
|
+
__name: "stack",
|
|
13
|
+
props: {
|
|
14
|
+
gap: {
|
|
15
|
+
type: null,
|
|
16
|
+
required: false
|
|
17
|
+
},
|
|
18
|
+
align: {
|
|
19
|
+
type: null,
|
|
20
|
+
required: false
|
|
21
|
+
},
|
|
22
|
+
justify: {
|
|
23
|
+
type: null,
|
|
24
|
+
required: false
|
|
25
|
+
},
|
|
26
|
+
className: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: false
|
|
29
|
+
},
|
|
30
|
+
style: {
|
|
31
|
+
type: [
|
|
32
|
+
Object,
|
|
33
|
+
Function,
|
|
34
|
+
Array
|
|
35
|
+
],
|
|
36
|
+
required: false,
|
|
37
|
+
skipCheck: true
|
|
38
|
+
},
|
|
39
|
+
__vars: {
|
|
40
|
+
type: null,
|
|
41
|
+
required: false
|
|
42
|
+
},
|
|
43
|
+
__size: {
|
|
44
|
+
type: String,
|
|
45
|
+
required: false
|
|
46
|
+
},
|
|
47
|
+
hiddenFrom: {
|
|
48
|
+
type: null,
|
|
49
|
+
required: false
|
|
50
|
+
},
|
|
51
|
+
visibleFrom: {
|
|
52
|
+
type: null,
|
|
53
|
+
required: false
|
|
54
|
+
},
|
|
55
|
+
lightHidden: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
required: false
|
|
58
|
+
},
|
|
59
|
+
darkHidden: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
required: false
|
|
62
|
+
},
|
|
63
|
+
mod: {
|
|
64
|
+
type: [
|
|
65
|
+
Object,
|
|
66
|
+
String,
|
|
67
|
+
Array
|
|
68
|
+
],
|
|
69
|
+
required: false
|
|
70
|
+
},
|
|
71
|
+
m: {
|
|
72
|
+
type: null,
|
|
73
|
+
required: false
|
|
74
|
+
},
|
|
75
|
+
my: {
|
|
76
|
+
type: null,
|
|
77
|
+
required: false
|
|
78
|
+
},
|
|
79
|
+
mx: {
|
|
80
|
+
type: null,
|
|
81
|
+
required: false
|
|
82
|
+
},
|
|
83
|
+
mt: {
|
|
84
|
+
type: null,
|
|
85
|
+
required: false
|
|
86
|
+
},
|
|
87
|
+
mb: {
|
|
88
|
+
type: null,
|
|
89
|
+
required: false
|
|
90
|
+
},
|
|
91
|
+
ms: {
|
|
92
|
+
type: null,
|
|
93
|
+
required: false
|
|
94
|
+
},
|
|
95
|
+
me: {
|
|
96
|
+
type: null,
|
|
97
|
+
required: false
|
|
98
|
+
},
|
|
99
|
+
mis: {
|
|
100
|
+
type: null,
|
|
101
|
+
required: false
|
|
102
|
+
},
|
|
103
|
+
mie: {
|
|
104
|
+
type: null,
|
|
105
|
+
required: false
|
|
106
|
+
},
|
|
107
|
+
ml: {
|
|
108
|
+
type: null,
|
|
109
|
+
required: false
|
|
110
|
+
},
|
|
111
|
+
mr: {
|
|
112
|
+
type: null,
|
|
113
|
+
required: false
|
|
114
|
+
},
|
|
115
|
+
p: {
|
|
116
|
+
type: null,
|
|
117
|
+
required: false
|
|
118
|
+
},
|
|
119
|
+
py: {
|
|
120
|
+
type: null,
|
|
121
|
+
required: false
|
|
122
|
+
},
|
|
123
|
+
px: {
|
|
124
|
+
type: null,
|
|
125
|
+
required: false
|
|
126
|
+
},
|
|
127
|
+
pt: {
|
|
128
|
+
type: null,
|
|
129
|
+
required: false
|
|
130
|
+
},
|
|
131
|
+
pb: {
|
|
132
|
+
type: null,
|
|
133
|
+
required: false
|
|
134
|
+
},
|
|
135
|
+
ps: {
|
|
136
|
+
type: null,
|
|
137
|
+
required: false
|
|
138
|
+
},
|
|
139
|
+
pe: {
|
|
140
|
+
type: null,
|
|
141
|
+
required: false
|
|
142
|
+
},
|
|
143
|
+
pis: {
|
|
144
|
+
type: null,
|
|
145
|
+
required: false
|
|
146
|
+
},
|
|
147
|
+
pie: {
|
|
148
|
+
type: null,
|
|
149
|
+
required: false
|
|
150
|
+
},
|
|
151
|
+
pl: {
|
|
152
|
+
type: null,
|
|
153
|
+
required: false
|
|
154
|
+
},
|
|
155
|
+
pr: {
|
|
156
|
+
type: null,
|
|
157
|
+
required: false
|
|
158
|
+
},
|
|
159
|
+
bd: {
|
|
160
|
+
type: null,
|
|
161
|
+
required: false
|
|
162
|
+
},
|
|
163
|
+
bdrs: {
|
|
164
|
+
type: null,
|
|
165
|
+
required: false
|
|
166
|
+
},
|
|
167
|
+
bg: {
|
|
168
|
+
type: null,
|
|
169
|
+
required: false
|
|
170
|
+
},
|
|
171
|
+
c: {
|
|
172
|
+
type: null,
|
|
173
|
+
required: false
|
|
174
|
+
},
|
|
175
|
+
opacity: {
|
|
176
|
+
type: [
|
|
177
|
+
String,
|
|
178
|
+
Object,
|
|
179
|
+
Number
|
|
180
|
+
],
|
|
181
|
+
required: false
|
|
182
|
+
},
|
|
183
|
+
ff: {
|
|
184
|
+
type: [String, Object],
|
|
185
|
+
required: false
|
|
186
|
+
},
|
|
187
|
+
fz: {
|
|
188
|
+
type: null,
|
|
189
|
+
required: false
|
|
190
|
+
},
|
|
191
|
+
fw: {
|
|
192
|
+
type: null,
|
|
193
|
+
required: false
|
|
194
|
+
},
|
|
195
|
+
lts: {
|
|
196
|
+
type: null,
|
|
197
|
+
required: false
|
|
198
|
+
},
|
|
199
|
+
ta: {
|
|
200
|
+
type: [String, Object],
|
|
201
|
+
required: false
|
|
202
|
+
},
|
|
203
|
+
lh: {
|
|
204
|
+
type: null,
|
|
205
|
+
required: false
|
|
206
|
+
},
|
|
207
|
+
fs: {
|
|
208
|
+
type: null,
|
|
209
|
+
required: false
|
|
210
|
+
},
|
|
211
|
+
tt: {
|
|
212
|
+
type: [String, Object],
|
|
213
|
+
required: false
|
|
214
|
+
},
|
|
215
|
+
td: {
|
|
216
|
+
type: null,
|
|
217
|
+
required: false
|
|
218
|
+
},
|
|
219
|
+
w: {
|
|
220
|
+
type: null,
|
|
221
|
+
required: false
|
|
222
|
+
},
|
|
223
|
+
miw: {
|
|
224
|
+
type: null,
|
|
225
|
+
required: false
|
|
226
|
+
},
|
|
227
|
+
maw: {
|
|
228
|
+
type: null,
|
|
229
|
+
required: false
|
|
230
|
+
},
|
|
231
|
+
h: {
|
|
232
|
+
type: null,
|
|
233
|
+
required: false
|
|
234
|
+
},
|
|
235
|
+
mih: {
|
|
236
|
+
type: null,
|
|
237
|
+
required: false
|
|
238
|
+
},
|
|
239
|
+
mah: {
|
|
240
|
+
type: null,
|
|
241
|
+
required: false
|
|
242
|
+
},
|
|
243
|
+
bgsz: {
|
|
244
|
+
type: null,
|
|
245
|
+
required: false
|
|
246
|
+
},
|
|
247
|
+
bgp: {
|
|
248
|
+
type: null,
|
|
249
|
+
required: false
|
|
250
|
+
},
|
|
251
|
+
bgr: {
|
|
252
|
+
type: null,
|
|
253
|
+
required: false
|
|
254
|
+
},
|
|
255
|
+
bga: {
|
|
256
|
+
type: null,
|
|
257
|
+
required: false
|
|
258
|
+
},
|
|
259
|
+
pos: {
|
|
260
|
+
type: [String, Object],
|
|
261
|
+
required: false
|
|
262
|
+
},
|
|
263
|
+
top: {
|
|
264
|
+
type: null,
|
|
265
|
+
required: false
|
|
266
|
+
},
|
|
267
|
+
left: {
|
|
268
|
+
type: null,
|
|
269
|
+
required: false
|
|
270
|
+
},
|
|
271
|
+
bottom: {
|
|
272
|
+
type: null,
|
|
273
|
+
required: false
|
|
274
|
+
},
|
|
275
|
+
right: {
|
|
276
|
+
type: null,
|
|
277
|
+
required: false
|
|
278
|
+
},
|
|
279
|
+
inset: {
|
|
280
|
+
type: null,
|
|
281
|
+
required: false
|
|
282
|
+
},
|
|
283
|
+
display: {
|
|
284
|
+
type: null,
|
|
285
|
+
required: false
|
|
286
|
+
},
|
|
287
|
+
flex: {
|
|
288
|
+
type: null,
|
|
289
|
+
required: false
|
|
290
|
+
},
|
|
291
|
+
unstyled: {
|
|
292
|
+
type: Boolean,
|
|
293
|
+
required: false
|
|
294
|
+
},
|
|
295
|
+
variant: {
|
|
296
|
+
type: null,
|
|
297
|
+
required: false
|
|
298
|
+
},
|
|
299
|
+
classNames: {
|
|
300
|
+
type: null,
|
|
301
|
+
required: false
|
|
302
|
+
},
|
|
303
|
+
styles: {
|
|
304
|
+
type: null,
|
|
305
|
+
required: false
|
|
306
|
+
},
|
|
307
|
+
vars: {
|
|
308
|
+
type: Function,
|
|
309
|
+
required: false
|
|
310
|
+
},
|
|
311
|
+
attributes: {
|
|
312
|
+
type: null,
|
|
313
|
+
required: false
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
setup(__props, { expose: __expose }) {
|
|
317
|
+
const _root = ref(null);
|
|
318
|
+
const attrs = useAttrs();
|
|
319
|
+
const rawProps = __props;
|
|
320
|
+
const defaultProps = {
|
|
321
|
+
gap: "md",
|
|
322
|
+
align: "stretch",
|
|
323
|
+
justify: "flex-start"
|
|
324
|
+
};
|
|
325
|
+
const props = useComponentProps({
|
|
326
|
+
component: "CStack",
|
|
327
|
+
defaultProps,
|
|
328
|
+
props: rawProps
|
|
329
|
+
});
|
|
330
|
+
const knownProps = [
|
|
331
|
+
"classNames",
|
|
332
|
+
"className",
|
|
333
|
+
"style",
|
|
334
|
+
"styles",
|
|
335
|
+
"unstyled",
|
|
336
|
+
"vars",
|
|
337
|
+
"align",
|
|
338
|
+
"justify",
|
|
339
|
+
"gap",
|
|
340
|
+
"variant",
|
|
341
|
+
"attributes"
|
|
342
|
+
];
|
|
343
|
+
const getStyles = useStyles({
|
|
344
|
+
name: "Stack",
|
|
345
|
+
props: {
|
|
346
|
+
...props.value,
|
|
347
|
+
...attrs
|
|
348
|
+
},
|
|
349
|
+
classes: stack_module_default,
|
|
350
|
+
className: props.value.className,
|
|
351
|
+
style: props.value.style,
|
|
352
|
+
classNames: props.value.classNames,
|
|
353
|
+
styles: props.value.styles,
|
|
354
|
+
unstyled: props.value.unstyled,
|
|
355
|
+
attributes: props.value.attributes,
|
|
356
|
+
vars: props.value.vars,
|
|
357
|
+
varsResolver
|
|
358
|
+
});
|
|
359
|
+
const rootAttrs = computed(() => getStyles("root"));
|
|
360
|
+
const mergedAttrs = computed(() => {
|
|
361
|
+
const others = {};
|
|
362
|
+
const propsValue = props.value;
|
|
363
|
+
Object.keys(propsValue).forEach((key) => {
|
|
364
|
+
if (!knownProps.includes(key)) others[key] = propsValue[key];
|
|
365
|
+
});
|
|
366
|
+
const userMod = props.value.mod;
|
|
367
|
+
const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)];
|
|
368
|
+
return {
|
|
369
|
+
...others,
|
|
370
|
+
mod: mergedMod,
|
|
371
|
+
...rootAttrs.value
|
|
372
|
+
};
|
|
373
|
+
});
|
|
374
|
+
__expose({ root: computed(() => _root.value?.root ?? null) });
|
|
375
|
+
const __returned__ = {
|
|
376
|
+
_root,
|
|
377
|
+
attrs,
|
|
378
|
+
rawProps,
|
|
379
|
+
defaultProps,
|
|
380
|
+
props,
|
|
381
|
+
knownProps,
|
|
382
|
+
getStyles,
|
|
383
|
+
rootAttrs,
|
|
384
|
+
mergedAttrs,
|
|
385
|
+
get CBox() {
|
|
386
|
+
return CBox;
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
390
|
+
enumerable: false,
|
|
391
|
+
value: true
|
|
392
|
+
});
|
|
393
|
+
return __returned__;
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
397
|
+
return openBlock(), createBlock($setup["CBox"], mergeProps({ ref: "_root" }, $setup.mergedAttrs, { variant: $setup.props.variant }), {
|
|
398
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
399
|
+
_: 3
|
|
400
|
+
}, 16, ["variant"]);
|
|
401
|
+
}
|
|
402
|
+
var stack_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/stack/stack.vue"]]);
|
|
403
|
+
//#endregion
|
|
404
|
+
export { stack_default as default };
|
|
405
|
+
|
|
406
|
+
//# sourceMappingURL=stack.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack.mjs","names":[],"sources":["../../../src/components/stack/stack.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\" :variant=\"props.variant\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { StackFactory, StackProps } from './stack.types'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport classes from './stack.module.css'\nimport { varsResolver } from './stack.utils'\n\ndefineOptions({\n name: 'CStack',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<StackProps>()\n\nconst defaultProps = {\n gap: 'md',\n align: 'stretch',\n justify: 'flex-start',\n} satisfies Partial<StackProps>\n\nconst props = useComponentProps({\n component: 'CStack',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'align',\n 'justify',\n 'gap',\n 'variant',\n 'attributes',\n]\n\nconst getStyles = useStyles<StackFactory>({\n name: 'Stack',\n props: { ...props.value, ...attrs } as StackProps,\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'))\n\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBA,MAAM,QAAQ,IAAsC,IAAI;EAExD,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,eAAe;GACnB,KAAK;GACL,OAAO;GACP,SAAS;EACX;EAEA,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,YAAY,UAAwB;GACxC,MAAM;GACN,OAAO;IAAE,GAAG,MAAM;IAAO,GAAG;GAAM;GAClC,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;GACxB,MAAM,MAAM,MAAM;GAClB;EACF,CAAC;EAED,MAAM,YAAY,eAAe,UAAU,MAAM,CAAC;EAElD,MAAM,cAAc,eAAe;GACjC,MAAM,SAA8B,CAAC;GACrC,MAAM,aAAa,MAAM;GACzB,OAAO,KAAK,UAAU,CAAC,CAAC,SAAS,QAAQ;IACvC,IAAI,CAAC,WAAW,SAAS,GAAG,GAC1B,OAAO,OAAO,WAAW;GAE7B,CAAC;GACD,MAAM,UAAU,MAAM,MAAM;GAC5B,MAAM,YAAY,CAAC,GAAI,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,OAAO,CAAE;GACpF,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,UAAU;GAAM;EACzD,CAAC;EAED,SAAa,EACX,MAAM,eAAe,MAAM,OAAO,QAAQ,IAAI,EAChD,CAAC;;;;;;;;;;;;;;;;;;;;;;;qBA/EC,YAEQ,OAAA,SAFR,WAEQ,EAFD,KAAI,QAAO,GAAS,OAAA,aAAW,EAAG,SAAS,OAAA,MAAM,QAAA,CAAA,GAAA;yBAC9C,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack.module.mjs","names":[],"sources":["../../../src/components/stack/stack.module.css"],"sourcesContent":[".root {\n display: flex;\n flex-direction: column;\n align-items: var(--stack-align, stretch);\n justify-content: var(--stack-justify, flex-start);\n gap: var(--stack-gap, var(--c-spacing-md));\n}\n"],"mappings":";;AAAA,IAAA,uBAAe,EAAC,QAAO,aAAY"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { getSpacing } from "../../core/utils/get-size/get-size.mjs";
|
|
3
|
+
import { createVarsResolver } from "../../core/styles-api/create-vars-resolver/create-vars-resolver.mjs";
|
|
4
|
+
//#region packages/@cck-ui/core/src/components/stack/stack.utils.ts
|
|
5
|
+
const varsResolver = createVarsResolver((_, { gap, align, justify }) => ({ root: {
|
|
6
|
+
"--stack-align": align,
|
|
7
|
+
"--stack-gap": getSpacing(gap),
|
|
8
|
+
"--stack-justify": justify
|
|
9
|
+
} }));
|
|
10
|
+
//#endregion
|
|
11
|
+
export { varsResolver };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=stack.utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack.utils.mjs","names":[],"sources":["../../../src/components/stack/stack.utils.ts"],"sourcesContent":["import { createVarsResolver, getSpacing } from '../../core'\nimport { StackFactory } from './stack.types'\n\nexport const varsResolver = createVarsResolver<StackFactory>((_, { gap, align, justify }) => ({\n root: {\n '--stack-align': align,\n '--stack-gap': getSpacing(gap),\n '--stack-justify': justify,\n },\n}))\n"],"mappings":";;;;AAGA,MAAa,eAAe,oBAAkC,GAAG,EAAE,KAAK,OAAO,eAAe,EAC5F,MAAM;CACJ,iBAAiB;CACjB,eAAe,WAAW,GAAG;CAC7B,mBAAmB;AACrB,EACF,EAAE"}
|
|
@@ -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
|
-
|
|
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 {
|
|
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"}
|