@cck-ui/core 0.20.1 → 0.20.3
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/action-icon/action-icon-group/action-icon-group.cjs +2 -2
- package/cjs/components/action-icon/action-icon-group/action-icon-group.cjs.map +1 -1
- package/cjs/components/action-icon/action-icon-group-section/action-icon-group-section.cjs +2 -2
- package/cjs/components/action-icon/action-icon-group-section/action-icon-group-section.cjs.map +1 -1
- package/cjs/components/action-icon/action-icon.cjs +2 -2
- package/cjs/components/action-icon/action-icon.cjs.map +1 -1
- package/cjs/components/alert/alert.cjs +2 -2
- package/cjs/components/alert/alert.cjs.map +1 -1
- package/cjs/components/aspect-ratio/aspect-ratio.cjs +2 -2
- package/cjs/components/aspect-ratio/aspect-ratio.cjs.map +1 -1
- package/cjs/components/button/button-group/button-group.cjs +2 -2
- package/cjs/components/button/button-group/button-group.cjs.map +1 -1
- package/cjs/components/button/button-group-section/button-group-section.cjs +2 -2
- package/cjs/components/button/button-group-section/button-group-section.cjs.map +1 -1
- package/cjs/components/button/button.cjs +2 -2
- package/cjs/components/button/button.cjs.map +1 -1
- package/cjs/components/center/center.cjs +2 -2
- package/cjs/components/center/center.cjs.map +1 -1
- package/cjs/components/close-button/close-button.cjs +2 -2
- package/cjs/components/close-button/close-button.cjs.map +1 -1
- package/cjs/components/container/container.cjs +2 -2
- package/cjs/components/container/container.cjs.map +1 -1
- package/cjs/components/empty-state/empty-state.cjs +2 -2
- package/cjs/components/empty-state/empty-state.cjs.map +1 -1
- package/cjs/components/file-button/file-button.cjs +116 -0
- package/cjs/components/file-button/file-button.cjs.map +1 -0
- package/cjs/components/file-button/index.cjs +10 -0
- package/cjs/components/file-button/index.cjs.map +1 -0
- package/cjs/components/flex/flex.cjs +2 -2
- package/cjs/components/flex/flex.cjs.map +1 -1
- package/cjs/components/grid/grid.cjs +2 -2
- package/cjs/components/grid/grid.cjs.map +1 -1
- package/cjs/components/group/group.cjs +2 -2
- package/cjs/components/group/group.cjs.map +1 -1
- package/cjs/components/image/image.cjs +2 -2
- package/cjs/components/image/image.cjs.map +1 -1
- package/cjs/components/loader/loader.cjs +2 -2
- package/cjs/components/loader/loader.cjs.map +1 -1
- package/cjs/components/paper/paper.cjs +2 -2
- package/cjs/components/paper/paper.cjs.map +1 -1
- package/cjs/components/semi-circle-progress/semi-circle-progress.cjs +2 -2
- package/cjs/components/semi-circle-progress/semi-circle-progress.cjs.map +1 -1
- package/cjs/components/simple-grid/simple-grid.cjs +2 -2
- package/cjs/components/simple-grid/simple-grid.cjs.map +1 -1
- package/cjs/components/skeleton/skeleton.cjs +2 -2
- package/cjs/components/skeleton/skeleton.cjs.map +1 -1
- package/cjs/components/space/space.cjs +2 -2
- package/cjs/components/space/space.cjs.map +1 -1
- package/cjs/components/splitter/splitter.cjs +2 -2
- package/cjs/components/splitter/splitter.cjs.map +1 -1
- package/cjs/components/stack/stack.cjs +2 -2
- package/cjs/components/stack/stack.cjs.map +1 -1
- package/cjs/components/text/text.cjs +2 -2
- package/cjs/components/text/text.cjs.map +1 -1
- package/cjs/components/unstyled-button/unstyled-button.cjs +2 -2
- package/cjs/components/unstyled-button/unstyled-button.cjs.map +1 -1
- package/cjs/core/styles-api/use-styles/use-styles.cjs +4 -2
- package/cjs/core/styles-api/use-styles/use-styles.cjs.map +1 -1
- package/cjs/index.cjs +43 -40
- package/cjs/index.cjs.map +1 -1
- package/esm/components/action-icon/action-icon-group/action-icon-group.mjs +2 -2
- package/esm/components/action-icon/action-icon-group/action-icon-group.mjs.map +1 -1
- package/esm/components/action-icon/action-icon-group-section/action-icon-group-section.mjs +2 -2
- package/esm/components/action-icon/action-icon-group-section/action-icon-group-section.mjs.map +1 -1
- package/esm/components/action-icon/action-icon.mjs +2 -2
- package/esm/components/action-icon/action-icon.mjs.map +1 -1
- package/esm/components/alert/alert.mjs +2 -2
- package/esm/components/alert/alert.mjs.map +1 -1
- package/esm/components/aspect-ratio/aspect-ratio.mjs +2 -2
- package/esm/components/aspect-ratio/aspect-ratio.mjs.map +1 -1
- package/esm/components/button/button-group/button-group.mjs +2 -2
- package/esm/components/button/button-group/button-group.mjs.map +1 -1
- package/esm/components/button/button-group-section/button-group-section.mjs +2 -2
- package/esm/components/button/button-group-section/button-group-section.mjs.map +1 -1
- package/esm/components/button/button.mjs +2 -2
- package/esm/components/button/button.mjs.map +1 -1
- package/esm/components/center/center.mjs +2 -2
- package/esm/components/center/center.mjs.map +1 -1
- package/esm/components/close-button/close-button.mjs +2 -2
- package/esm/components/close-button/close-button.mjs.map +1 -1
- package/esm/components/container/container.mjs +2 -2
- package/esm/components/container/container.mjs.map +1 -1
- package/esm/components/empty-state/empty-state.mjs +2 -2
- package/esm/components/empty-state/empty-state.mjs.map +1 -1
- package/esm/components/file-button/file-button.mjs +116 -0
- package/esm/components/file-button/file-button.mjs.map +1 -0
- package/esm/components/file-button/index.mjs +9 -0
- package/esm/components/file-button/index.mjs.map +1 -0
- package/esm/components/flex/flex.mjs +2 -2
- package/esm/components/flex/flex.mjs.map +1 -1
- package/esm/components/grid/grid.mjs +2 -2
- package/esm/components/grid/grid.mjs.map +1 -1
- package/esm/components/group/group.mjs +2 -2
- package/esm/components/group/group.mjs.map +1 -1
- package/esm/components/image/image.mjs +2 -2
- package/esm/components/image/image.mjs.map +1 -1
- package/esm/components/loader/loader.mjs +2 -2
- package/esm/components/loader/loader.mjs.map +1 -1
- package/esm/components/paper/paper.mjs +2 -2
- package/esm/components/paper/paper.mjs.map +1 -1
- package/esm/components/semi-circle-progress/semi-circle-progress.mjs +2 -2
- package/esm/components/semi-circle-progress/semi-circle-progress.mjs.map +1 -1
- package/esm/components/simple-grid/simple-grid.mjs +2 -2
- package/esm/components/simple-grid/simple-grid.mjs.map +1 -1
- package/esm/components/skeleton/skeleton.mjs +2 -2
- package/esm/components/skeleton/skeleton.mjs.map +1 -1
- package/esm/components/space/space.mjs +2 -2
- package/esm/components/space/space.mjs.map +1 -1
- package/esm/components/splitter/splitter.mjs +2 -2
- package/esm/components/splitter/splitter.mjs.map +1 -1
- package/esm/components/stack/stack.mjs +2 -2
- package/esm/components/stack/stack.mjs.map +1 -1
- package/esm/components/text/text.mjs +2 -2
- package/esm/components/text/text.mjs.map +1 -1
- package/esm/components/unstyled-button/unstyled-button.mjs +2 -2
- package/esm/components/unstyled-button/unstyled-button.mjs.map +1 -1
- package/esm/core/styles-api/use-styles/use-styles.mjs +4 -2
- package/esm/core/styles-api/use-styles/use-styles.mjs.map +1 -1
- package/esm/index.mjs +3 -1
- package/esm/index.mjs.map +1 -1
- package/lib/components/file-button/file-button.types.d.ts +31 -0
- package/lib/components/file-button/index.d.ts +3 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/core/styles-api/use-styles/use-styles.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_export_helper = require("../../_virtual/_/plugin-vue/export-helper.cjs");
|
|
3
|
+
const require_use_component_props = require("../../core/config-provider/use-component-props/use-component-props.cjs");
|
|
4
|
+
let vue = require("vue");
|
|
5
|
+
//#region packages/@cck-ui/core/src/components/file-button/file-button.vue
|
|
6
|
+
const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
7
|
+
name: "CFileButton",
|
|
8
|
+
__name: "file-button",
|
|
9
|
+
props: {
|
|
10
|
+
multiple: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
required: false
|
|
13
|
+
},
|
|
14
|
+
accept: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: false
|
|
17
|
+
},
|
|
18
|
+
name: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: false
|
|
21
|
+
},
|
|
22
|
+
form: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: false
|
|
25
|
+
},
|
|
26
|
+
disabled: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
required: false
|
|
29
|
+
},
|
|
30
|
+
capture: {
|
|
31
|
+
type: [Boolean, String],
|
|
32
|
+
required: false
|
|
33
|
+
},
|
|
34
|
+
inputProps: {
|
|
35
|
+
type: Object,
|
|
36
|
+
required: false
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
emits: ["change"],
|
|
40
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
41
|
+
const inputRef = (0, vue.ref)(null);
|
|
42
|
+
const rawProps = __props;
|
|
43
|
+
const emit = __emit;
|
|
44
|
+
const defaultProps = {
|
|
45
|
+
multiple: false,
|
|
46
|
+
disabled: false
|
|
47
|
+
};
|
|
48
|
+
const props = require_use_component_props.useComponentProps({
|
|
49
|
+
component: "CFileButton",
|
|
50
|
+
defaultProps,
|
|
51
|
+
props: rawProps
|
|
52
|
+
});
|
|
53
|
+
const handleClick = () => {
|
|
54
|
+
if (!props.value.disabled) inputRef.value?.click();
|
|
55
|
+
};
|
|
56
|
+
const handleChange = (event) => {
|
|
57
|
+
const target = event.target;
|
|
58
|
+
if (target.files === null) {
|
|
59
|
+
emit("change", props.value.multiple ? [] : null);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (props.value.multiple !== false && props.value.multiple !== void 0) emit("change", Array.from(target.files));
|
|
63
|
+
else emit("change", target.files[0] || null);
|
|
64
|
+
};
|
|
65
|
+
const reset = () => {
|
|
66
|
+
if (inputRef.value) inputRef.value.value = "";
|
|
67
|
+
};
|
|
68
|
+
__expose({
|
|
69
|
+
input: inputRef,
|
|
70
|
+
reset
|
|
71
|
+
});
|
|
72
|
+
const __returned__ = {
|
|
73
|
+
inputRef,
|
|
74
|
+
rawProps,
|
|
75
|
+
emit,
|
|
76
|
+
defaultProps,
|
|
77
|
+
props,
|
|
78
|
+
handleClick,
|
|
79
|
+
handleChange,
|
|
80
|
+
reset
|
|
81
|
+
};
|
|
82
|
+
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
83
|
+
enumerable: false,
|
|
84
|
+
value: true
|
|
85
|
+
});
|
|
86
|
+
return __returned__;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
const _hoisted_1 = [
|
|
90
|
+
"accept",
|
|
91
|
+
"capture",
|
|
92
|
+
"disabled",
|
|
93
|
+
"form",
|
|
94
|
+
"multiple",
|
|
95
|
+
"name"
|
|
96
|
+
];
|
|
97
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
98
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, null, [(0, vue.createElementVNode)("input", (0, vue.mergeProps)({
|
|
99
|
+
ref: "inputRef",
|
|
100
|
+
style: { "display": "none" },
|
|
101
|
+
type: "file"
|
|
102
|
+
}, $setup.props.inputProps, {
|
|
103
|
+
accept: $setup.props.accept,
|
|
104
|
+
capture: $setup.props.capture,
|
|
105
|
+
disabled: $setup.props.disabled,
|
|
106
|
+
form: $setup.props.form,
|
|
107
|
+
multiple: $setup.props.multiple,
|
|
108
|
+
name: $setup.props.name,
|
|
109
|
+
onChange: $setup.handleChange
|
|
110
|
+
}), null, 16, _hoisted_1), (0, vue.renderSlot)(_ctx.$slots, "default", { onClick: $setup.handleClick })], 64);
|
|
111
|
+
}
|
|
112
|
+
var file_button_default = /*#__PURE__*/ require_export_helper.default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/file-button/file-button.vue"]]);
|
|
113
|
+
//#endregion
|
|
114
|
+
exports.default = file_button_default;
|
|
115
|
+
|
|
116
|
+
//# sourceMappingURL=file-button.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-button.cjs","names":[],"sources":["../../../src/components/file-button/file-button.vue"],"sourcesContent":["<template>\n <input\n ref=\"inputRef\"\n style=\"display: none\"\n type=\"file\"\n v-bind=\"props.inputProps\"\n :accept=\"props.accept\"\n :capture=\"props.capture\"\n :disabled=\"props.disabled\"\n :form=\"props.form\"\n :multiple=\"props.multiple\"\n :name=\"props.name\"\n @change=\"handleChange\"\n />\n <slot :on-click=\"handleClick\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { useComponentProps } from '../../core'\nimport { FileButtonProps } from './file-button.types'\n\ndefineOptions({\n name: 'CFileButton',\n})\n\nconst inputRef = ref<HTMLInputElement | null>(null)\n\nconst rawProps = defineProps<FileButtonProps>()\n\nconst emit = defineEmits<{\n (e: 'change', payload: File | File[] | null): void\n}>()\n\nconst defaultProps = {\n multiple: false,\n disabled: false,\n} satisfies Partial<FileButtonProps>\n\nconst props = useComponentProps({\n component: 'CFileButton',\n defaultProps,\n props: rawProps,\n})\n\nconst handleClick = () => {\n if (!props.value.disabled) {\n inputRef.value?.click()\n }\n}\n\nconst handleChange = (event: Event) => {\n const target = event.target as HTMLInputElement\n if (target.files === null) {\n emit('change', props.value.multiple ? [] : null)\n return\n }\n\n if (props.value.multiple !== false && props.value.multiple !== undefined) {\n emit('change', Array.from(target.files))\n } else {\n emit('change', target.files[0] || null)\n }\n}\n\nconst reset = () => {\n if (inputRef.value) {\n inputRef.value.value = ''\n }\n}\n\ndefineExpose({\n input: inputRef,\n reset,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BA,MAAM,YAAA,GAAA,IAAA,IAAA,CAAwC,IAAI;EAElD,MAAM,WAAW;EAEjB,MAAM,OAAO;EAIb,MAAM,eAAe;GACnB,UAAU;GACV,UAAU;EACZ;EAEA,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX;GACA,OAAO;EACT,CAAC;EAED,MAAM,oBAAoB;GACxB,IAAI,CAAC,MAAM,MAAM,UACf,SAAS,OAAO,MAAM;EAE1B;EAEA,MAAM,gBAAgB,UAAiB;GACrC,MAAM,SAAS,MAAM;GACrB,IAAI,OAAO,UAAU,MAAM;IACzB,KAAK,UAAU,MAAM,MAAM,WAAW,CAAC,IAAI,IAAI;IAC/C;GACF;GAEA,IAAI,MAAM,MAAM,aAAa,SAAS,MAAM,MAAM,aAAa,KAAA,GAC7D,KAAK,UAAU,MAAM,KAAK,OAAO,KAAK,CAAC;QAEvC,KAAK,UAAU,OAAO,MAAM,MAAM,IAAI;EAE1C;EAEA,MAAM,cAAc;GAClB,IAAI,SAAS,OACX,SAAS,MAAM,QAAQ;EAE3B;EAEA,SAAa;GACX,OAAO;GACP;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;2GA7DG,UAAA,GAAA,IAAA,WAAA,CAAA;EAXA,KAAI;EACJ,OAAA,EAAA,WAAA,OAAA;EACA,MAAK;IACG,OAAA,MAAM,YAAU;EACvB,QAAQ,OAAA,MAAM;EACd,SAAS,OAAA,MAAM;EACf,UAAU,OAAA,MAAM;EAChB,MAAM,OAAA,MAAM;EACZ,UAAU,OAAA,MAAM;EAChB,MAAM,OAAA,MAAM;EACZ,UAAQ,OAAA;gDAEqB,KAAA,QAAA,WAAA,EAAzB,SAAU,OAAA,YAAW,CAAA,CAAA,GAAA,EAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_install = require("../../core/utils/vue/install.cjs");
|
|
3
|
+
const require_file_button = require("./file-button.cjs");
|
|
4
|
+
//#region packages/@cck-ui/core/src/components/file-button/index.ts
|
|
5
|
+
const CFileButton = require_install.withInstall(require_file_button.default);
|
|
6
|
+
//#endregion
|
|
7
|
+
exports.CFileButton = CFileButton;
|
|
8
|
+
exports.default = CFileButton;
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["withInstall","FileButton"],"sources":["../../../src/components/file-button/index.ts"],"sourcesContent":["import { withInstall } from '../../core'\nimport FileButton from './file-button.vue'\n\nexport const CFileButton = withInstall(FileButton)\n\nexport default CFileButton\n\nexport * from './file-button.types'\n"],"mappings":";;;;AAGA,MAAa,cAAcA,gBAAAA,YAAYC,oBAAAA,OAAU"}
|
|
@@ -370,8 +370,8 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
|
370
370
|
name: "Flex",
|
|
371
371
|
classes: require_flex_module.default,
|
|
372
372
|
props: styleProps,
|
|
373
|
-
className: props.value.className,
|
|
374
|
-
style: props.value.style,
|
|
373
|
+
className: () => props.value.className,
|
|
374
|
+
style: () => props.value.style,
|
|
375
375
|
classNames: props.value.classNames,
|
|
376
376
|
styles: props.value.styles,
|
|
377
377
|
unstyled: props.value.unstyled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flex.cjs","names":[],"sources":["../../../src/components/flex/flex.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onUnmounted, ref, useAttrs, watchEffect } from 'vue'\nimport {\n CBox,\n CStyleProp,\n filterProps,\n hashStyleProps,\n parseStyleProps,\n responsiveStyleManager,\n stylesToString,\n useCckTheme,\n useComponentProps,\n useRandomClassName,\n useStyles,\n} from '../../core'\nimport classes from './flex.module.css'\nimport { FlexFactory, FlexProps } from './flex.types'\nimport { FLEX_STYLE_PROPS_DATA } from './flex-props'\n\ndefineOptions({\n name: 'CFlex',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<FlexProps>()\n\nconst props = useComponentProps({\n component: 'CFlex',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'gap',\n 'rowGap',\n 'columnGap',\n 'align',\n 'justify',\n 'wrap',\n 'direction',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<FlexFactory>({\n name: 'Flex',\n classes,\n props: styleProps,\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 theme = useCckTheme()\nconst randomClassName = useRandomClassName()\n\nconst parsedStyleProps = parseStyleProps({\n styleProps: {\n gap: props.value.gap,\n rowGap: props.value.rowGap,\n columnGap: props.value.columnGap,\n align: props.value.align,\n justify: props.value.justify,\n wrap: props.value.wrap,\n direction: props.value.direction,\n },\n theme: theme.value,\n data: FLEX_STYLE_PROPS_DATA,\n})\n\nconst responsiveClassName = parsedStyleProps.hasResponsiveStyles\n ? hashStyleProps(parsedStyleProps.styles, parsedStyleProps.media)\n : randomClassName\n\nconst rootAttrs = computed(() => getStyles('root', { className: responsiveClassName }))\n\nconst mergedStyle = computed(() => {\n const rootStyle = rootAttrs.value.style || {}\n const inlineStyles = filterProps(parsedStyleProps.inlineStyles)\n return { ...rootStyle, ...inlineStyles }\n})\n\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return {\n ...others,\n mod: mergedMod,\n ...rootAttrs.value,\n style: mergedStyle.value,\n }\n})\n\nconst queryStyles = {\n styles: parsedStyleProps.styles,\n media: parsedStyleProps.media,\n selector: responsiveClassName,\n}\n\nconst queryStylesString = stylesToString(queryStyles)\n\nconst currentStyleKey = ref<string | null>(null)\nwatchEffect(() => {\n if (queryStylesString) {\n const newKey = responsiveStyleManager.register(queryStylesString)\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})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BA,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,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,cAAA,GAAA,IAAA,SAAA,QAA6B;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,mBAAA,UAAuB;GACvC,MAAM;GACN,SAAA,oBAAA;GACA,OAAO;GACP,
|
|
1
|
+
{"version":3,"file":"flex.cjs","names":[],"sources":["../../../src/components/flex/flex.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onUnmounted, ref, useAttrs, watchEffect } from 'vue'\nimport {\n CBox,\n CStyleProp,\n filterProps,\n hashStyleProps,\n parseStyleProps,\n responsiveStyleManager,\n stylesToString,\n useCckTheme,\n useComponentProps,\n useRandomClassName,\n useStyles,\n} from '../../core'\nimport classes from './flex.module.css'\nimport { FlexFactory, FlexProps } from './flex.types'\nimport { FLEX_STYLE_PROPS_DATA } from './flex-props'\n\ndefineOptions({\n name: 'CFlex',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<FlexProps>()\n\nconst props = useComponentProps({\n component: 'CFlex',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'gap',\n 'rowGap',\n 'columnGap',\n 'align',\n 'justify',\n 'wrap',\n 'direction',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<FlexFactory>({\n name: 'Flex',\n classes,\n props: styleProps,\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 theme = useCckTheme()\nconst randomClassName = useRandomClassName()\n\nconst parsedStyleProps = parseStyleProps({\n styleProps: {\n gap: props.value.gap,\n rowGap: props.value.rowGap,\n columnGap: props.value.columnGap,\n align: props.value.align,\n justify: props.value.justify,\n wrap: props.value.wrap,\n direction: props.value.direction,\n },\n theme: theme.value,\n data: FLEX_STYLE_PROPS_DATA,\n})\n\nconst responsiveClassName = parsedStyleProps.hasResponsiveStyles\n ? hashStyleProps(parsedStyleProps.styles, parsedStyleProps.media)\n : randomClassName\n\nconst rootAttrs = computed(() => getStyles('root', { className: responsiveClassName }))\n\nconst mergedStyle = computed(() => {\n const rootStyle = rootAttrs.value.style || {}\n const inlineStyles = filterProps(parsedStyleProps.inlineStyles)\n return { ...rootStyle, ...inlineStyles }\n})\n\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return {\n ...others,\n mod: mergedMod,\n ...rootAttrs.value,\n style: mergedStyle.value,\n }\n})\n\nconst queryStyles = {\n styles: parsedStyleProps.styles,\n media: parsedStyleProps.media,\n selector: responsiveClassName,\n}\n\nconst queryStylesString = stylesToString(queryStyles)\n\nconst currentStyleKey = ref<string | null>(null)\nwatchEffect(() => {\n if (queryStylesString) {\n const newKey = responsiveStyleManager.register(queryStylesString)\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})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BA,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CA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,GAAA,IAAA,WAAA,CAAA,EAFD,KAAI,QAAO,GAAS,OAAA,WAAW,GAAA;kCAC5B,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -387,8 +387,8 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
|
387
387
|
name: "Grid",
|
|
388
388
|
classes: require_grid_module.default,
|
|
389
389
|
props: styleProps,
|
|
390
|
-
className: props.value.className,
|
|
391
|
-
style: props.value.style,
|
|
390
|
+
className: () => props.value.className,
|
|
391
|
+
style: () => props.value.style,
|
|
392
392
|
classNames: props.value.classNames,
|
|
393
393
|
styles: props.value.styles,
|
|
394
394
|
unstyled: props.value.unstyled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.cjs","names":[],"sources":["../../../src/components/grid/grid.vue"],"sourcesContent":["<template>\n <c-box ref=\"_container\" v-if=\"type === 'container' && breakpoints\" v-bind=\"containerAttrs\">\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\">\n <c-box ref=\"_inner\" v-bind=\"innerAttrs\">\n <slot />\n </c-box>\n </c-box>\n </c-box>\n <template v-else>\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\">\n <c-box ref=\"_inner\" v-bind=\"innerAttrs\">\n <slot />\n </c-box>\n </c-box>\n </template>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onUnmounted, provide, ref, useAttrs, watchEffect } from 'vue'\nimport {\n CBox,\n CStyleProp,\n isNumberLike,\n responsiveStyleManager,\n useComponentProps,\n useRandomClassName,\n useStyles,\n} from '../../core'\nimport { useGridCustomStyle } from './grid-custom'\nimport { DEFAULT_COLUMNS, GRID_CONTEXT_KEY } from './grid.constants'\nimport { GridContextValue } from './grid.context'\nimport type { GridFactory, GridProps } from './grid.types'\nimport classes from './grid.module.css'\nimport { varsResolver } from './grid.utils'\n\ndefineOptions({\n name: 'CGrid',\n})\n\nconst _container = ref<InstanceType<typeof CBox> | null>(null)\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\nconst _inner = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<GridProps>()\n\nconst props = useComponentProps({\n component: 'CGrid',\n defaultProps: {\n columns: DEFAULT_COLUMNS,\n gap: 'md',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'grow',\n 'gap',\n 'rowGap',\n 'columnGap',\n 'columns',\n 'align',\n 'justify',\n 'breakpoints',\n 'type',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<GridFactory>({\n name: 'Grid',\n classes,\n props: styleProps,\n className: props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n})\n\nconst responsiveClassname = useRandomClassName()\n\nconst rootAttrs = computed(() => getStyles('root', { className: responsiveClassname }))\n\nconst mergedRootAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\nconst innerAttrs = computed(() => getStyles('inner'))\n\nconst containerAttrs = computed(() => getStyles('container'))\n\nconst gridStyle = useGridCustomStyle({\n selector: responsiveClassname,\n ...props.value,\n})\n\nconst currentStyleKey = ref<string | null>(null)\nwatchEffect(() => {\n const cssText = gridStyle.value.queryStylesString\n if (cssText) {\n const newKey = responsiveStyleManager.register(cssText)\n if (currentStyleKey.value && currentStyleKey.value !== newKey) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n currentStyleKey.value = newKey\n } else if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n currentStyleKey.value = null\n }\n})\nonUnmounted(() => {\n if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n})\n\nconst _breakpoints = computed(() => props.value.breakpoints)\nconst _columns = computed(() => {\n if (!isNumberLike(props.value.columns)) {\n console.warn(\n `[C-Grid] columns should be number or number-like string, got ${props.value.columns}. Fallback to default columns ${DEFAULT_COLUMNS}.`\n )\n return DEFAULT_COLUMNS\n }\n\n return Number(props.value.columns)\n})\nconst _grow = computed(() => props.value.grow)\nconst _type = computed(() => props.value.type)\n\nconst context: GridContextValue = {\n getStyles,\n get breakpoints() {\n return _breakpoints.value\n },\n get columns() {\n return _columns.value\n },\n get grow() {\n return _grow.value\n },\n get type() {\n return _type.value\n },\n}\n\nprovide(GRID_CONTEXT_KEY, context)\n\ndefineExpose({\n container: computed(() => _container.value?.root ?? null),\n root: computed(() => _root.value?.root ?? null),\n inner: computed(() => _inner.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCA,MAAM,cAAA,GAAA,IAAA,IAAA,CAAmD,IAAI;EAC7D,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EACxD,MAAM,UAAA,GAAA,IAAA,IAAA,CAA+C,IAAI;EAEzD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX,cAAc;IACZ,SAAA;IACA,KAAK;GACP;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,cAAA,GAAA,IAAA,SAAA,QAA6B;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,mBAAA,UAAuB;GACvC,MAAM;GACN,SAAA,oBAAA;GACA,OAAO;GACP,
|
|
1
|
+
{"version":3,"file":"grid.cjs","names":[],"sources":["../../../src/components/grid/grid.vue"],"sourcesContent":["<template>\n <c-box ref=\"_container\" v-if=\"type === 'container' && breakpoints\" v-bind=\"containerAttrs\">\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\">\n <c-box ref=\"_inner\" v-bind=\"innerAttrs\">\n <slot />\n </c-box>\n </c-box>\n </c-box>\n <template v-else>\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\">\n <c-box ref=\"_inner\" v-bind=\"innerAttrs\">\n <slot />\n </c-box>\n </c-box>\n </template>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onUnmounted, provide, ref, useAttrs, watchEffect } from 'vue'\nimport {\n CBox,\n CStyleProp,\n isNumberLike,\n responsiveStyleManager,\n useComponentProps,\n useRandomClassName,\n useStyles,\n} from '../../core'\nimport { useGridCustomStyle } from './grid-custom'\nimport { DEFAULT_COLUMNS, GRID_CONTEXT_KEY } from './grid.constants'\nimport { GridContextValue } from './grid.context'\nimport type { GridFactory, GridProps } from './grid.types'\nimport classes from './grid.module.css'\nimport { varsResolver } from './grid.utils'\n\ndefineOptions({\n name: 'CGrid',\n})\n\nconst _container = ref<InstanceType<typeof CBox> | null>(null)\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\nconst _inner = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<GridProps>()\n\nconst props = useComponentProps({\n component: 'CGrid',\n defaultProps: {\n columns: DEFAULT_COLUMNS,\n gap: 'md',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'grow',\n 'gap',\n 'rowGap',\n 'columnGap',\n 'columns',\n 'align',\n 'justify',\n 'breakpoints',\n 'type',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<GridFactory>({\n name: 'Grid',\n classes,\n props: styleProps,\n className: () => props.value.className,\n style: () => props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n})\n\nconst responsiveClassname = useRandomClassName()\n\nconst rootAttrs = computed(() => getStyles('root', { className: responsiveClassname }))\n\nconst mergedRootAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\nconst innerAttrs = computed(() => getStyles('inner'))\n\nconst containerAttrs = computed(() => getStyles('container'))\n\nconst gridStyle = useGridCustomStyle({\n selector: responsiveClassname,\n ...props.value,\n})\n\nconst currentStyleKey = ref<string | null>(null)\nwatchEffect(() => {\n const cssText = gridStyle.value.queryStylesString\n if (cssText) {\n const newKey = responsiveStyleManager.register(cssText)\n if (currentStyleKey.value && currentStyleKey.value !== newKey) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n currentStyleKey.value = newKey\n } else if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n currentStyleKey.value = null\n }\n})\nonUnmounted(() => {\n if (currentStyleKey.value) {\n responsiveStyleManager.unregister(currentStyleKey.value)\n }\n})\n\nconst _breakpoints = computed(() => props.value.breakpoints)\nconst _columns = computed(() => {\n if (!isNumberLike(props.value.columns)) {\n console.warn(\n `[C-Grid] columns should be number or number-like string, got ${props.value.columns}. Fallback to default columns ${DEFAULT_COLUMNS}.`\n )\n return DEFAULT_COLUMNS\n }\n\n return Number(props.value.columns)\n})\nconst _grow = computed(() => props.value.grow)\nconst _type = computed(() => props.value.type)\n\nconst context: GridContextValue = {\n getStyles,\n get breakpoints() {\n return _breakpoints.value\n },\n get columns() {\n return _columns.value\n },\n get grow() {\n return _grow.value\n },\n get type() {\n return _type.value\n },\n}\n\nprovide(GRID_CONTEXT_KEY, context)\n\ndefineExpose({\n container: computed(() => _container.value?.root ?? null),\n root: computed(() => _root.value?.root ?? null),\n inner: computed(() => _inner.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCA,MAAM,cAAA,GAAA,IAAA,IAAA,CAAmD,IAAI;EAC7D,MAAM,SAAA,GAAA,IAAA,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E__*/ (0, vue.defineComponent)({
|
|
|
375
375
|
name: "Group",
|
|
376
376
|
props: styleProps,
|
|
377
377
|
stylesCtx,
|
|
378
|
-
className: props.value.className,
|
|
379
|
-
style: props.value.style,
|
|
378
|
+
className: () => props.value.className,
|
|
379
|
+
style: () => props.value.style,
|
|
380
380
|
classes: require_group_module.default,
|
|
381
381
|
classNames: props.value.classNames,
|
|
382
382
|
styles: props.value.styles,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.cjs","names":[],"sources":["../../../src/components/group/group.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\" :size=\"__size\" :variant=\"variant\">\n <!-- TODO: filter falsy children -->\n <!-- <component v-for=\"(node, index) in filteredChildren\" :key=\"node.key || index\" :is=\"node\" /> -->\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots } from 'vue'\nimport type { GroupFactory, GroupProps, GroupStylesCtx } from './group.types'\nimport { filterFalsyChildren } from './filter-falsy-children/filter-falsy-children'\nimport { getSpacing, useStyles, CBox, useComponentProps, CStyleProp } from '../../core'\nimport classes from './group.module.css'\nimport { varsResolver } from './group.utils'\n\ndefineOptions({\n name: 'CGroup',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst rawProps = defineProps<GroupProps>()\n\nconst props = useComponentProps({\n component: 'CGroup',\n defaultProps: {\n preventGrowOverflow: true,\n gap: 'md',\n align: 'center',\n justify: 'flex-start',\n wrap: 'wrap',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'gap',\n 'align',\n 'justify',\n 'wrap',\n 'grow',\n 'preventGrowOverflow',\n 'vars',\n 'variant',\n '__size',\n 'mod',\n 'attributes',\n]\n\nconst filteredChildren = filterFalsyChildren(slots.default?.())\nconst childrenCount = filteredChildren.length\nconst resolvedGap = getSpacing(props.value.gap)\nconst childWidth = `calc(${100 / childrenCount}% - (${resolvedGap} - ${resolvedGap} / ${childrenCount}))`\n\nconst stylesCtx: GroupStylesCtx = { childWidth }\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<GroupFactory>({\n name: 'Group',\n props: styleProps,\n stylesCtx,\n className: props.value.className,\n style: props.value.style,\n classes,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n})\n\nconst modList = computed(() => [{ grow: props.value.grow }])\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 = [\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBA,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EACvB,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX,cAAc;IACZ,qBAAqB;IACrB,KAAK;IACL,OAAO;IACP,SAAS;IACT,MAAM;GACR;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,mBAAmB,8BAAA,oBAAoB,MAAM,UAAU,CAAC;EAC9D,MAAM,gBAAgB,iBAAiB;EACvC,MAAM,cAAc,iBAAA,WAAW,MAAM,MAAM,GAAG;EAC9C,MAAM,aAAa,QAAQ,MAAM,cAAc,OAAO,YAAY,KAAK,YAAY,KAAK,cAAc;EAEtG,MAAM,YAA4B,EAAE,WAAW;EAE/C,MAAM,cAAA,GAAA,IAAA,SAAA,QAA6B;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,mBAAA,UAAwB;GACxC,MAAM;GACN,OAAO;GACP;GACA,
|
|
1
|
+
{"version":3,"file":"group.cjs","names":[],"sources":["../../../src/components/group/group.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\" :size=\"__size\" :variant=\"variant\">\n <!-- TODO: filter falsy children -->\n <!-- <component v-for=\"(node, index) in filteredChildren\" :key=\"node.key || index\" :is=\"node\" /> -->\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots } from 'vue'\nimport type { GroupFactory, GroupProps, GroupStylesCtx } from './group.types'\nimport { filterFalsyChildren } from './filter-falsy-children/filter-falsy-children'\nimport { getSpacing, useStyles, CBox, useComponentProps, CStyleProp } from '../../core'\nimport classes from './group.module.css'\nimport { varsResolver } from './group.utils'\n\ndefineOptions({\n name: 'CGroup',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst rawProps = defineProps<GroupProps>()\n\nconst props = useComponentProps({\n component: 'CGroup',\n defaultProps: {\n preventGrowOverflow: true,\n gap: 'md',\n align: 'center',\n justify: 'flex-start',\n wrap: 'wrap',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'gap',\n 'align',\n 'justify',\n 'wrap',\n 'grow',\n 'preventGrowOverflow',\n 'vars',\n 'variant',\n '__size',\n 'mod',\n 'attributes',\n]\n\nconst filteredChildren = filterFalsyChildren(slots.default?.())\nconst childrenCount = filteredChildren.length\nconst resolvedGap = getSpacing(props.value.gap)\nconst childWidth = `calc(${100 / childrenCount}% - (${resolvedGap} - ${resolvedGap} / ${childrenCount}))`\n\nconst stylesCtx: GroupStylesCtx = { childWidth }\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<GroupFactory>({\n name: 'Group',\n props: styleProps,\n stylesCtx,\n className: () => props.value.className,\n style: () => props.value.style,\n classes,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n})\n\nconst modList = computed(() => [{ grow: props.value.grow }])\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 = [\n ...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)),\n ...(modList.value || []),\n ]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: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351
|
name: "Image",
|
|
352
352
|
classes: require_image_module.default,
|
|
353
353
|
props: styleProps,
|
|
354
|
-
className: props.value.className,
|
|
354
|
+
className: () => props.value.className,
|
|
355
355
|
classNames: props.value.classNames,
|
|
356
|
-
style: props.value.style,
|
|
356
|
+
style: () => props.value.style,
|
|
357
357
|
styles: props.value.styles,
|
|
358
358
|
unstyled: props.value.unstyled,
|
|
359
359
|
attributes: props.value.attributes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.cjs","names":[],"sources":["../../../src/components/image/image.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" tag=\"img\" v-bind=\"mergedAttrs\" :src=\"currentSrc\" @error=\"handleError\"></c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport { ImageFactory, ImageProps } from './image.types'\nimport { varsResolver } from './image.utils'\nimport classes from './image.module.css'\n\ndefineOptions({\n name: 'CImage',\n})\n\nconst emits = defineEmits<{\n error: [event: Event]\n}>()\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ImageProps>()\n\nconst props = useComponentProps({\n component: 'CImage',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'src',\n 'radius',\n 'fit',\n 'fallbackSrc',\n 'mod',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<ImageFactory>({\n name: 'Image',\n classes,\n props: styleProps,\n className: props.value.className,\n classNames: props.value.classNames,\n style: props.value.style,\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 hasError = ref(!props.value.src)\n\nwatch(\n () => props.value.src,\n (newSrc) => {\n hasError.value = !newSrc\n }\n)\n\nconst currentSrc = computed(() => {\n if (hasError.value && props.value.fallbackSrc) {\n return props.value.fallbackSrc\n }\n return props.value.src\n})\n\nconst handleError = (event: Event) => {\n emits('error', event)\n hasError.value = true\n}\n\nconst modList = computed(() => {\n if (hasError.value && props.value.fallbackSrc) {\n return ['fallback']\n }\n return []\n})\n\nconst rootAttrs = computed(() => getStyles('root'))\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAeA,MAAM,QAAQ;EAId,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,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;EACF;EAEA,MAAM,cAAA,GAAA,IAAA,SAAA,QAA6B;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,mBAAA,UAAwB;GACxC,MAAM;GACN,SAAA,qBAAA;GACA,OAAO;GACP,
|
|
1
|
+
{"version":3,"file":"image.cjs","names":[],"sources":["../../../src/components/image/image.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" tag=\"img\" v-bind=\"mergedAttrs\" :src=\"currentSrc\" @error=\"handleError\"></c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport { ImageFactory, ImageProps } from './image.types'\nimport { varsResolver } from './image.utils'\nimport classes from './image.module.css'\n\ndefineOptions({\n name: 'CImage',\n})\n\nconst emits = defineEmits<{\n error: [event: Event]\n}>()\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ImageProps>()\n\nconst props = useComponentProps({\n component: 'CImage',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'src',\n 'radius',\n 'fit',\n 'fallbackSrc',\n 'mod',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<ImageFactory>({\n name: 'Image',\n classes,\n props: styleProps,\n className: () => props.value.className,\n classNames: props.value.classNames,\n style: () => props.value.style,\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 hasError = ref(!props.value.src)\n\nwatch(\n () => props.value.src,\n (newSrc) => {\n hasError.value = !newSrc\n }\n)\n\nconst currentSrc = computed(() => {\n if (hasError.value && props.value.fallbackSrc) {\n return props.value.fallbackSrc\n }\n return props.value.src\n})\n\nconst handleError = (event: Event) => {\n emits('error', event)\n hasError.value = true\n}\n\nconst modList = computed(() => {\n if (hasError.value && props.value.fallbackSrc) {\n return ['fallback']\n }\n return []\n})\n\nconst rootAttrs = computed(() => getStyles('root'))\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAeA,MAAM,QAAQ;EAId,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,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;EACF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AAU,CAAC,OAAO,CAAC,CAAC,OAAO,OAAO,GAC/D,GAAI,QAAQ,SAAS,CAAC,CACxB;GACA,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,UAAU;GAAM;EACzD,CAAC;EAED,SAAa,EACX,OAAA,GAAA,IAAA,SAAA,OAAqB,MAAM,OAAO,QAAQ,IAAI,EAChD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;mDAjHkG,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA;EAA1F,KAAI;EAAQ,KAAI;IAAc,OAAA,aAAW;EAAG,KAAK,OAAA;EAAa,SAAO,OAAA"}
|
|
@@ -355,8 +355,8 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
|
355
355
|
name: "Loader",
|
|
356
356
|
props: styleProps,
|
|
357
357
|
classes: require_loader_module.default,
|
|
358
|
-
className: props.value.className,
|
|
359
|
-
style: props.value.style,
|
|
358
|
+
className: () => props.value.className,
|
|
359
|
+
style: () => props.value.style,
|
|
360
360
|
classNames: props.value.classNames,
|
|
361
361
|
styles: props.value.styles,
|
|
362
362
|
unstyled: props.value.unstyled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.cjs","names":[],"sources":["../../../src/components/loader/loader.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\">\n <slot v-if=\"$slots.default\" />\n <component\n v-else\n v-bind=\"componentAttrs\"\n :is=\"props.loaders![props.type!]\"\n :variant=\"variant\"\n :size=\"size\"\n ></component>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport type { LoaderProps } from './loader.types'\nimport { CDefaultLoaders, LoaderFactory } from '.'\nimport classes from './loader.module.css'\nimport { varsResolver } from './loader.utils'\n\ndefineOptions({\n name: 'CLoader',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<LoaderProps>()\n\nconst props = useComponentProps({\n component: 'CLoader',\n defaultProps: {\n loaders: CDefaultLoaders,\n type: 'oval',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'color',\n 'type',\n 'vars',\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'loaders',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<LoaderFactory>({\n name: 'Loader',\n props: styleProps,\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\nconst componentAttrs = computed(() => {\n const { className, mod, ...rest } = mergedAttrs.value\n return rest\n})\n\ndefineExpose({\n /** @description loader html element */\n root: computed(() => _root.value?.root ?? null),\n /** @description loader size */\n size: props.value.size,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBA,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX,cAAc;IACZ,SAAS,gBAAA;IACT,MAAM;GACR;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,cAAA,GAAA,IAAA,SAAA,QAA6B;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,mBAAA,UAAyB;GACzC,MAAM;GACN,OAAO;GACP,SAAA,sBAAA;GACA,
|
|
1
|
+
{"version":3,"file":"loader.cjs","names":[],"sources":["../../../src/components/loader/loader.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\">\n <slot v-if=\"$slots.default\" />\n <component\n v-else\n v-bind=\"componentAttrs\"\n :is=\"props.loaders![props.type!]\"\n :variant=\"variant\"\n :size=\"size\"\n ></component>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport type { LoaderProps } from './loader.types'\nimport { CDefaultLoaders, LoaderFactory } from '.'\nimport classes from './loader.module.css'\nimport { varsResolver } from './loader.utils'\n\ndefineOptions({\n name: 'CLoader',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<LoaderProps>()\n\nconst props = useComponentProps({\n component: 'CLoader',\n defaultProps: {\n loaders: CDefaultLoaders,\n type: 'oval',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'color',\n 'type',\n 'vars',\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'loaders',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<LoaderFactory>({\n name: 'Loader',\n props: styleProps,\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\nconst componentAttrs = computed(() => {\n const { className, mod, ...rest } = mergedAttrs.value\n return rest\n})\n\ndefineExpose({\n /** @description loader html element */\n root: computed(() => _root.value?.root ?? null),\n /** @description loader size */\n size: props.value.size,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBA,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAEx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T,CAAC;EAED,SAAa;;GAEX,OAAA,GAAA,IAAA,SAAA,OAAqB,MAAM,OAAO,QAAQ,IAAI;;GAE9C,MAAM,MAAM,MAAM;EACpB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;mDAxFS,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA,EATD,KAAI,QAAO,GAAS,OAAA,WAAW,GAAA;kCACN,CAAlB,KAAA,OAAO,WAAA,GAAA,IAAA,WAAA,CAAW,KAAA,QAAA,WAAA,EAAA,KAAA,EAAA,CAAA,MAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,EAAA,GAAA,IAAA,wBAAA,CAIvB,OAAA,MAAM,QAAS,OAAA,MAAM,KAAI,IAAA,GAAA,IAAA,WAAA,CAGnB,EAAA,KAAA,EAAA,GAJH,OAAA,gBAAc;GAErB,SAAS,OAAA;GACT,MAAM,OAAA"}
|
|
@@ -346,8 +346,8 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
|
346
346
|
name: "Paper",
|
|
347
347
|
props: styleProps,
|
|
348
348
|
classes: require_paper_module.default,
|
|
349
|
-
className: props.value.className,
|
|
350
|
-
style: props.value.style,
|
|
349
|
+
className: () => props.value.className,
|
|
350
|
+
style: () => props.value.style,
|
|
351
351
|
classNames: props.value.classNames,
|
|
352
352
|
styles: props.value.styles,
|
|
353
353
|
unstyled: props.value.unstyled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paper.cjs","names":[],"sources":["../../../src/components/paper/paper.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 classes from './paper.module.css'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport { PaperFactory, PaperProps } from './paper.types'\nimport { varsResolver } from './paper.utils'\n\ndefineOptions({\n name: 'CPaper',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<PaperProps>()\n\nconst props = useComponentProps({\n component: 'CPaper',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'withBorder',\n 'vars',\n 'radius',\n 'shadow',\n 'variant',\n 'mod',\n 'attributes',\n]\n\nconst modList = computed(() => [\n {\n 'data-with-border': props.value.withBorder,\n },\n])\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<PaperFactory>({\n name: 'Paper',\n props: styleProps,\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 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBA,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,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;EACF;EAEA,MAAM,WAAA,GAAA,IAAA,SAAA,OAAyB,CAC7B,EACE,oBAAoB,MAAM,MAAM,WAClC,CACF,CAAC;EAED,MAAM,cAAA,GAAA,IAAA,SAAA,QAA6B;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,mBAAA,UAAwB;GACxC,MAAM;GACN,OAAO;GACP,SAAA,qBAAA;GACA,
|
|
1
|
+
{"version":3,"file":"paper.cjs","names":[],"sources":["../../../src/components/paper/paper.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 classes from './paper.module.css'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport { PaperFactory, PaperProps } from './paper.types'\nimport { varsResolver } from './paper.utils'\n\ndefineOptions({\n name: 'CPaper',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<PaperProps>()\n\nconst props = useComponentProps({\n component: 'CPaper',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'withBorder',\n 'vars',\n 'radius',\n 'shadow',\n 'variant',\n 'mod',\n 'attributes',\n]\n\nconst modList = computed(() => [\n {\n 'data-with-border': props.value.withBorder,\n },\n])\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<PaperFactory>({\n name: 'Paper',\n props: styleProps,\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 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBA,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX,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AAA,EAFD,KAAI,QAAO,GAAS,OAAA,aAAW,EAAG,SAAS,OAAA,MAAM,QAAA,CAAA,GAAA;kCAC9C,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -382,8 +382,8 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
|
382
382
|
name: "SemiCircleProgress",
|
|
383
383
|
props: styleProps,
|
|
384
384
|
classes: require_semi_circle_progress_module.default,
|
|
385
|
-
className: props.value.className,
|
|
386
|
-
style: props.value.style,
|
|
385
|
+
className: () => props.value.className,
|
|
386
|
+
style: () => props.value.style,
|
|
387
387
|
classNames: props.value.classNames,
|
|
388
388
|
styles: props.value.styles,
|
|
389
389
|
unstyled: props.value.unstyled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semi-circle-progress.cjs","names":[],"sources":["../../../src/components/semi-circle-progress/semi-circle-progress.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\" :size=\"props.size\">\n <c-box\n v-bind=\"labelAttrs\"\n v-if=\"$slots.label\"\n :data-position=\"props.labelPosition\"\n :data-orientation=\"props.orientation\"\n >\n <slot name=\"label\" />\n </c-box>\n\n <svg\n v-bind=\"svgAttrs.rest\"\n :class=\"svgAttrs.className\"\n :style=\"svgAttrs.style\"\n :width=\"props.size\"\n :height=\"props.size! / 2\"\n :viewBox=\"`0 0 ${props.size} ${props.size! / 2}`\"\n >\n <circle\n fill=\"none\"\n stroke=\"var(--scp-empty-segment-color)\"\n v-bind=\"emptySegmentAttrs.rest\"\n :class=\"emptySegmentAttrs.className\"\n :style=\"emptySegmentAttrs.style\"\n :cx=\"coordinateForCircle\"\n :cy=\"coordinateForCircle\"\n :r=\"radius\"\n :stroke-width=\"props.thickness\"\n :stroke-dasharray=\"circumference\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"var(--scp-filled-segment-color)\"\n v-bind=\"filledSegmentAttrs.rest\"\n :class=\"filledSegmentAttrs.className\"\n :style=\"filledSegmentAttrs.style\"\n :cx=\"coordinateForCircle\"\n :cy=\"coordinateForCircle\"\n :r=\"radius\"\n :stroke-width=\"props.thickness\"\n :stroke-dasharray=\"circumference\"\n />\n </svg>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport { SemiCircleProgressFactory, SemiCircleProgressProps } from './semi-circle-progress.types'\nimport classes from './semi-circle-progress.module.css'\nimport { varsResolver } from './semi-circle-progress.utils'\nimport { clamp } from 'es-toolkit'\n\ndefineOptions({\n name: 'CSemiCircleProgress',\n})\n\nconst rawProps = defineProps<SemiCircleProgressProps>()\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst defaultProps = {\n size: 200,\n thickness: 12,\n orientation: 'up',\n fillDirection: 'left-to-right',\n labelPosition: 'bottom',\n} satisfies Partial<SemiCircleProgressProps>\n\nconst props = useComponentProps({\n component: 'CSemiCircleProgress',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'size',\n 'thickness',\n 'value',\n 'orientation',\n 'fillDirection',\n 'filledSegmentColor',\n 'emptySegmentColor',\n 'transitionDuration',\n 'label',\n 'labelPosition',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<SemiCircleProgressFactory>({\n name: 'SemiCircleProgress',\n props: styleProps,\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 coordinateForCircle = computed(() => props.value.size! / 2)\nconst radius = computed(() => (props.value.size! - 2 * props.value.thickness!) / 2)\nconst circumference = computed(() => Math.PI * radius.value)\nconst semiCirclePercentage = computed(\n () => clamp(props.value.value, 0, 100) * (circumference.value / 100)\n)\n\nconst rootAttrs = computed(() => getStyles('root'))\nconst labelAttrs = computed(() => getStyles('label'))\n\nconst svgAttrs = computed(() => {\n const attrsResult = getStyles('svg')\n const { className, style, ...rest } = attrsResult\n return { className, style: style as any, rest }\n})\n\nconst emptySegmentAttrs = computed(() => {\n const attrsResult = getStyles('emptySegment', {\n style: { strokeDashoffset: circumference.value },\n })\n const { className, style, ...rest } = attrsResult\n return { className, style: style as any, rest }\n})\nconst filledSegmentAttrs = computed(() => {\n const attrsResult = getStyles('filledSegment', {\n style: {\n strokeDashoffset: semiCirclePercentage.value,\n ...(semiCirclePercentage.value === 0 ? { strokeOpacity: 0 } : null),\n },\n })\n const { className, style, ...rest } = attrsResult\n return { className, style: style as any, rest }\n})\n\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, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DA,MAAM,WAAW;EAEjB,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,eAAe;GACnB,MAAM;GACN,WAAW;GACX,aAAa;GACb,eAAe;GACf,eAAe;EACjB;EAEA,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,cAAA,GAAA,IAAA,SAAA,QAA6B;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,mBAAA,UAAqC;GACrD,MAAM;GACN,OAAO;GACP,SAAA,oCAAA;GACA,
|
|
1
|
+
{"version":3,"file":"semi-circle-progress.cjs","names":[],"sources":["../../../src/components/semi-circle-progress/semi-circle-progress.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\" :size=\"props.size\">\n <c-box\n v-bind=\"labelAttrs\"\n v-if=\"$slots.label\"\n :data-position=\"props.labelPosition\"\n :data-orientation=\"props.orientation\"\n >\n <slot name=\"label\" />\n </c-box>\n\n <svg\n v-bind=\"svgAttrs.rest\"\n :class=\"svgAttrs.className\"\n :style=\"svgAttrs.style\"\n :width=\"props.size\"\n :height=\"props.size! / 2\"\n :viewBox=\"`0 0 ${props.size} ${props.size! / 2}`\"\n >\n <circle\n fill=\"none\"\n stroke=\"var(--scp-empty-segment-color)\"\n v-bind=\"emptySegmentAttrs.rest\"\n :class=\"emptySegmentAttrs.className\"\n :style=\"emptySegmentAttrs.style\"\n :cx=\"coordinateForCircle\"\n :cy=\"coordinateForCircle\"\n :r=\"radius\"\n :stroke-width=\"props.thickness\"\n :stroke-dasharray=\"circumference\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"var(--scp-filled-segment-color)\"\n v-bind=\"filledSegmentAttrs.rest\"\n :class=\"filledSegmentAttrs.className\"\n :style=\"filledSegmentAttrs.style\"\n :cx=\"coordinateForCircle\"\n :cy=\"coordinateForCircle\"\n :r=\"radius\"\n :stroke-width=\"props.thickness\"\n :stroke-dasharray=\"circumference\"\n />\n </svg>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport { SemiCircleProgressFactory, SemiCircleProgressProps } from './semi-circle-progress.types'\nimport classes from './semi-circle-progress.module.css'\nimport { varsResolver } from './semi-circle-progress.utils'\nimport { clamp } from 'es-toolkit'\n\ndefineOptions({\n name: 'CSemiCircleProgress',\n})\n\nconst rawProps = defineProps<SemiCircleProgressProps>()\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst defaultProps = {\n size: 200,\n thickness: 12,\n orientation: 'up',\n fillDirection: 'left-to-right',\n labelPosition: 'bottom',\n} satisfies Partial<SemiCircleProgressProps>\n\nconst props = useComponentProps({\n component: 'CSemiCircleProgress',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'size',\n 'thickness',\n 'value',\n 'orientation',\n 'fillDirection',\n 'filledSegmentColor',\n 'emptySegmentColor',\n 'transitionDuration',\n 'label',\n 'labelPosition',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<SemiCircleProgressFactory>({\n name: 'SemiCircleProgress',\n props: styleProps,\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 coordinateForCircle = computed(() => props.value.size! / 2)\nconst radius = computed(() => (props.value.size! - 2 * props.value.thickness!) / 2)\nconst circumference = computed(() => Math.PI * radius.value)\nconst semiCirclePercentage = computed(\n () => clamp(props.value.value, 0, 100) * (circumference.value / 100)\n)\n\nconst rootAttrs = computed(() => getStyles('root'))\nconst labelAttrs = computed(() => getStyles('label'))\n\nconst svgAttrs = computed(() => {\n const attrsResult = getStyles('svg')\n const { className, style, ...rest } = attrsResult\n return { className, style: style as any, rest }\n})\n\nconst emptySegmentAttrs = computed(() => {\n const attrsResult = getStyles('emptySegment', {\n style: { strokeDashoffset: circumference.value },\n })\n const { className, style, ...rest } = attrsResult\n return { className, style: style as any, rest }\n})\nconst filledSegmentAttrs = computed(() => {\n const attrsResult = getStyles('filledSegment', {\n style: {\n strokeDashoffset: semiCirclePercentage.value,\n ...(semiCirclePercentage.value === 0 ? { strokeOpacity: 0 } : null),\n },\n })\n const { className, style, ...rest } = attrsResult\n return { className, style: style as any, rest }\n})\n\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, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
name: "SimpleGrid",
|
|
367
367
|
classes: require_simple_grid_module.default,
|
|
368
368
|
props: styleProps,
|
|
369
|
-
className: props.value.className,
|
|
370
|
-
style: props.value.style,
|
|
369
|
+
className: () => props.value.className,
|
|
370
|
+
style: () => props.value.style,
|
|
371
371
|
classNames: props.value.classNames,
|
|
372
372
|
styles: props.value.styles,
|
|
373
373
|
unstyled: props.value.unstyled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simple-grid.cjs","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 CStyleProp,\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 styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<SimpleGridFactory>({\n name: 'SimpleGrid',\n classes,\n props: styleProps,\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.value,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BA,MAAM,cAAA,GAAA,IAAA,IAAA,CAAmD,IAAI;EAC7D,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,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,cAAA,GAAA,IAAA,SAAA,QAA6B;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,mBAAA,UAA6B;GAC7C,MAAM;GACN,SAAA,2BAAA;GACA,OAAO;GACP,
|
|
1
|
+
{"version":3,"file":"simple-grid.cjs","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 CStyleProp,\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 styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<SimpleGridFactory>({\n name: 'SimpleGrid',\n classes,\n props: styleProps,\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.value,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BA,MAAM,cAAA,GAAA,IAAA,IAAA,CAAmD,IAAI;EAC7D,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,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,cAAA,GAAA,IAAA,SAAA,QAA6B;GACjC,GAAG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AAS,gBAAgB,UAAU,QACrD,iCAAA,uBAAuB,WAAW,gBAAgB,KAAK;IAEzD,gBAAgB,QAAQ;GAC1B,OAAO,IAAI,gBAAgB,OAAO;IAChC,iCAAA,uBAAuB,WAAW,gBAAgB,KAAK;IACvD,gBAAgB,QAAQ;GAC1B;EACF,CAAC;EACD,CAAA,GAAA,IAAA,YAAA,OAAkB;GAChB,IAAI,gBAAgB,OAClB,iCAAA,uBAAuB,WAAW,gBAAgB,KAAK;EAE3D,CAAC;EAED,SAAa;GACX,OAAA,GAAA,IAAA,SAAA,OAAqB,MAAM,OAAO,QAAQ,IAAI;GAC9C,YAAA,GAAA,IAAA,SAAA,OAA0B,WAAW,OAAO,QAAQ,IAAI;EAC1D,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAhI+B,OAAA,SAAI,gBAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,CAI1B,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA;;EAJD,KAAI;IAAiD,OAAA,cAAc,GAAA;kCAGhE,EAAA,GAAA,IAAA,YAAA,CAAA,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA,EAFD,KAAI,QAAO,GAAS,OAAA,iBAAe,EAAG,kBAAgB,OAAA,aAAY,CAAA,GAAA;mCAC/D,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,SAAA,CAAA,CAAA;;;;uDAMF,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA;;EAFD,KAAI;IAAgB,OAAA,iBAAe,EAAG,kBAAgB,OAAA,aAAY,CAAA,GAAA;kCAC/D,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -361,8 +361,8 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
|
361
361
|
name: "Skeleton",
|
|
362
362
|
classes: require_skeleton_module.default,
|
|
363
363
|
props: styleProps,
|
|
364
|
-
className: props.value.className,
|
|
365
|
-
style: props.value.style,
|
|
364
|
+
className: () => props.value.className,
|
|
365
|
+
style: () => props.value.style,
|
|
366
366
|
classNames: props.value.classNames,
|
|
367
367
|
styles: props.value.styles,
|
|
368
368
|
unstyled: props.value.unstyled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.cjs","names":[],"sources":["../../../src/components/skeleton/skeleton.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport { SkeletonFactory, SkeletonProps } from './skeleton.types'\nimport classes from './skeleton.module.css'\nimport { varsResolver } from './skeleton.utils'\nimport { computed, ref, useAttrs } from 'vue'\n\ndefineOptions({\n name: 'CSkeleton',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = withDefaults(defineProps<SkeletonProps>(), {\n animate: true,\n visible: true,\n})\n\nconst props = useComponentProps({\n component: 'CSkeleton',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'width',\n 'height',\n 'circle',\n 'visible',\n 'radius',\n 'animate',\n 'mod',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<SkeletonFactory>({\n name: 'Skeleton',\n classes,\n props: styleProps,\n className: props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n})\n\nconst modList = computed(() => [{ visible: props.value.visible }, { animate: props.value.animate }])\n\nconst rootAttrs = computed(() => getStyles('root'))\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBA,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAKjB,MAAM,QAAQ,4BAAA,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,cAAA,GAAA,IAAA,SAAA,QAA6B;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,mBAAA,UAA2B;GAC3C,MAAM;GACN,SAAA,wBAAA;GACA,OAAO;GACP,
|
|
1
|
+
{"version":3,"file":"skeleton.cjs","names":[],"sources":["../../../src/components/skeleton/skeleton.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport { SkeletonFactory, SkeletonProps } from './skeleton.types'\nimport classes from './skeleton.module.css'\nimport { varsResolver } from './skeleton.utils'\nimport { computed, ref, useAttrs } from 'vue'\n\ndefineOptions({\n name: 'CSkeleton',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = withDefaults(defineProps<SkeletonProps>(), {\n animate: true,\n visible: true,\n})\n\nconst props = useComponentProps({\n component: 'CSkeleton',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'width',\n 'height',\n 'circle',\n 'visible',\n 'radius',\n 'animate',\n 'mod',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<SkeletonFactory>({\n name: 'Skeleton',\n classes,\n props: styleProps,\n className: () => props.value.className,\n style: () => props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n})\n\nconst modList = computed(() => [{ visible: props.value.visible }, { animate: props.value.animate }])\n\nconst rootAttrs = computed(() => getStyles('root'))\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"],"mapp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AA,GAAA,IAAA,SAAA,OAA2B,UAAU,MAAM,CAAC;EAElD,MAAM,eAAA,GAAA,IAAA,SAAA,OAA6B;GACjC,MAAM,SAA8B,CAAC;GACrC,MAAM,aAAa,MAAM;GACzB,KAAK,MAAM,OAAO,YAChB,IAAI,CAAC,WAAW,SAAS,GAAG,GAC1B,OAAO,OAAO,WAAW;GAG7B,MAAM,UAAU,MAAM,MAAM;GAC5B,MAAM,YAAY,CAChB,GAAI,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,OAAO,GAC/D,GAAI,QAAQ,SAAS,CAAC,CACxB;GACA,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,UAAU;GAAM;EACzD,CAAC;EAED,SAAa,EACX,OAAA,GAAA,IAAA,SAAA,OAAqB,MAAM,OAAO,QAAQ,IAAI,EAChD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;mDAxFS,OAAA,UAAA,GAAA,IAAA,WAAA,CAAA,EAFD,KAAI,QAAO,GAAS,OAAA,WAAW,GAAA;kCAC5B,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -331,8 +331,8 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
|
331
331
|
name: "Space",
|
|
332
332
|
props: styleProps,
|
|
333
333
|
classes: require_space_module.default,
|
|
334
|
-
className: props.value.className,
|
|
335
|
-
style: props.value.style,
|
|
334
|
+
className: () => props.value.className,
|
|
335
|
+
style: () => props.value.style,
|
|
336
336
|
classNames: props.value.classNames,
|
|
337
337
|
styles: props.value.styles,
|
|
338
338
|
unstyled: props.value.unstyled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space.cjs","names":[],"sources":["../../../src/components/space/space.vue"],"sourcesContent":["<template>\n <c-box\n ref=\"_root\"\n v-bind=\"mergedAttrs\"\n :w=\"props.w\"\n :miw=\"props.miw ?? props.w\"\n :h=\"props.h\"\n :mih=\"props.mih ?? props.h\"\n >\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport { SpaceFactory, SpaceProps } from './space.types'\nimport classes from './space.module.css'\n\ndefineOptions({\n name: 'CSpace',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<SpaceProps>()\n\nconst props = useComponentProps({\n component: 'CSpace',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'w',\n 'h',\n 'miw',\n 'mih',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<SpaceFactory>({\n name: 'Space',\n props: styleProps,\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})\n\nconst rootAttrs = computed(() => getStyles('root'))\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 = [...(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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBA,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,cAAA,GAAA,IAAA,SAAA,QAA6B;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,mBAAA,UAAwB;GACxC,MAAM;GACN,OAAO;GACP,SAAA,qBAAA;GACA,
|
|
1
|
+
{"version":3,"file":"space.cjs","names":[],"sources":["../../../src/components/space/space.vue"],"sourcesContent":["<template>\n <c-box\n ref=\"_root\"\n v-bind=\"mergedAttrs\"\n :w=\"props.w\"\n :miw=\"props.miw ?? props.w\"\n :h=\"props.h\"\n :mih=\"props.mih ?? props.h\"\n >\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport { SpaceFactory, SpaceProps } from './space.types'\nimport classes from './space.module.css'\n\ndefineOptions({\n name: 'CSpace',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<SpaceProps>()\n\nconst props = useComponentProps({\n component: 'CSpace',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'w',\n 'h',\n 'miw',\n 'mih',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<SpaceFactory>({\n name: 'Space',\n props: styleProps,\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})\n\nconst rootAttrs = computed(() => getStyles('root'))\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 = [...(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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBA,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8C,IAAI;EAExD,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;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KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -411,8 +411,8 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
|
411
411
|
name: "Splitter",
|
|
412
412
|
classes: require_splitter_module.default,
|
|
413
413
|
props: styleProps,
|
|
414
|
-
className: props.value.className,
|
|
415
|
-
style: props.value.style,
|
|
414
|
+
className: () => props.value.className,
|
|
415
|
+
style: () => props.value.style,
|
|
416
416
|
classNames: props.value.classNames,
|
|
417
417
|
styles: props.value.styles,
|
|
418
418
|
unstyled: props.value.unstyled,
|