@cck-ui/core 0.20.0 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/action-icon/action-icon-group/action-icon-group.cjs +7 -4
- 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 +8 -6
- 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 +7 -4
- package/cjs/components/action-icon/action-icon.cjs.map +1 -1
- package/cjs/components/alert/alert.cjs +7 -4
- package/cjs/components/alert/alert.cjs.map +1 -1
- package/cjs/components/aspect-ratio/aspect-ratio.cjs +7 -4
- package/cjs/components/aspect-ratio/aspect-ratio.cjs.map +1 -1
- package/cjs/components/button/button-group/button-group.cjs +7 -4
- package/cjs/components/button/button-group/button-group.cjs.map +1 -1
- package/cjs/components/button/button-group-section/button-group-section.cjs +7 -4
- package/cjs/components/button/button-group-section/button-group-section.cjs.map +1 -1
- package/cjs/components/button/button.cjs +7 -4
- package/cjs/components/button/button.cjs.map +1 -1
- package/cjs/components/center/center.cjs +7 -4
- package/cjs/components/center/center.cjs.map +1 -1
- package/cjs/components/close-button/close-button.cjs +7 -4
- package/cjs/components/close-button/close-button.cjs.map +1 -1
- package/cjs/components/container/container.cjs +7 -4
- package/cjs/components/container/container.cjs.map +1 -1
- package/cjs/components/empty-state/empty-state.cjs +7 -4
- package/cjs/components/empty-state/empty-state.cjs.map +1 -1
- package/cjs/components/flex/flex.cjs +7 -4
- package/cjs/components/flex/flex.cjs.map +1 -1
- package/cjs/components/grid/grid.cjs +7 -4
- package/cjs/components/grid/grid.cjs.map +1 -1
- package/cjs/components/group/group.cjs +7 -4
- package/cjs/components/group/group.cjs.map +1 -1
- package/cjs/components/image/image.cjs +7 -4
- package/cjs/components/image/image.cjs.map +1 -1
- package/cjs/components/loader/loader.cjs +7 -4
- package/cjs/components/loader/loader.cjs.map +1 -1
- package/cjs/components/paper/paper.cjs +7 -4
- package/cjs/components/paper/paper.cjs.map +1 -1
- package/cjs/components/semi-circle-progress/semi-circle-progress.cjs +7 -4
- package/cjs/components/semi-circle-progress/semi-circle-progress.cjs.map +1 -1
- package/cjs/components/simple-grid/simple-grid.cjs +7 -4
- package/cjs/components/simple-grid/simple-grid.cjs.map +1 -1
- package/cjs/components/skeleton/skeleton.cjs +8 -4
- package/cjs/components/skeleton/skeleton.cjs.map +1 -1
- package/cjs/components/space/space.cjs +7 -4
- package/cjs/components/space/space.cjs.map +1 -1
- package/cjs/components/splitter/splitter.cjs +7 -4
- package/cjs/components/splitter/splitter.cjs.map +1 -1
- package/cjs/components/stack/stack.cjs +7 -4
- package/cjs/components/stack/stack.cjs.map +1 -1
- package/cjs/components/text/text.cjs +7 -4
- package/cjs/components/text/text.cjs.map +1 -1
- package/cjs/components/unstyled-button/unstyled-button.cjs +7 -4
- package/cjs/components/unstyled-button/unstyled-button.cjs.map +1 -1
- package/cjs/core/styles-api/use-styles/use-styles.cjs +75 -70
- package/cjs/core/styles-api/use-styles/use-styles.cjs.map +1 -1
- package/cjs/core/styles-api/use-styles/use-transformed-styles.cjs +7 -4
- package/cjs/core/styles-api/use-styles/use-transformed-styles.cjs.map +1 -1
- package/esm/components/action-icon/action-icon-group/action-icon-group.mjs +7 -4
- 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 +8 -6
- 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 +7 -4
- package/esm/components/action-icon/action-icon.mjs.map +1 -1
- package/esm/components/alert/alert.mjs +7 -4
- package/esm/components/alert/alert.mjs.map +1 -1
- package/esm/components/aspect-ratio/aspect-ratio.mjs +7 -4
- package/esm/components/aspect-ratio/aspect-ratio.mjs.map +1 -1
- package/esm/components/button/button-group/button-group.mjs +7 -4
- package/esm/components/button/button-group/button-group.mjs.map +1 -1
- package/esm/components/button/button-group-section/button-group-section.mjs +7 -4
- package/esm/components/button/button-group-section/button-group-section.mjs.map +1 -1
- package/esm/components/button/button.mjs +7 -4
- package/esm/components/button/button.mjs.map +1 -1
- package/esm/components/center/center.mjs +7 -4
- package/esm/components/center/center.mjs.map +1 -1
- package/esm/components/close-button/close-button.mjs +7 -4
- package/esm/components/close-button/close-button.mjs.map +1 -1
- package/esm/components/container/container.mjs +7 -4
- package/esm/components/container/container.mjs.map +1 -1
- package/esm/components/empty-state/empty-state.mjs +7 -4
- package/esm/components/empty-state/empty-state.mjs.map +1 -1
- package/esm/components/flex/flex.mjs +7 -4
- package/esm/components/flex/flex.mjs.map +1 -1
- package/esm/components/grid/grid.mjs +7 -4
- package/esm/components/grid/grid.mjs.map +1 -1
- package/esm/components/group/group.mjs +7 -4
- package/esm/components/group/group.mjs.map +1 -1
- package/esm/components/image/image.mjs +7 -4
- package/esm/components/image/image.mjs.map +1 -1
- package/esm/components/loader/loader.mjs +7 -4
- package/esm/components/loader/loader.mjs.map +1 -1
- package/esm/components/paper/paper.mjs +7 -4
- package/esm/components/paper/paper.mjs.map +1 -1
- package/esm/components/semi-circle-progress/semi-circle-progress.mjs +7 -4
- package/esm/components/semi-circle-progress/semi-circle-progress.mjs.map +1 -1
- package/esm/components/simple-grid/simple-grid.mjs +7 -4
- package/esm/components/simple-grid/simple-grid.mjs.map +1 -1
- package/esm/components/skeleton/skeleton.mjs +8 -4
- package/esm/components/skeleton/skeleton.mjs.map +1 -1
- package/esm/components/space/space.mjs +7 -4
- package/esm/components/space/space.mjs.map +1 -1
- package/esm/components/splitter/splitter.mjs +7 -4
- package/esm/components/splitter/splitter.mjs.map +1 -1
- package/esm/components/stack/stack.mjs +7 -4
- package/esm/components/stack/stack.mjs.map +1 -1
- package/esm/components/text/text.mjs +7 -4
- package/esm/components/text/text.mjs.map +1 -1
- package/esm/components/unstyled-button/unstyled-button.mjs +7 -4
- package/esm/components/unstyled-button/unstyled-button.mjs.map +1 -1
- package/esm/core/styles-api/use-styles/use-styles.mjs +75 -70
- package/esm/core/styles-api/use-styles/use-styles.mjs.map +1 -1
- package/esm/core/styles-api/use-styles/use-transformed-styles.mjs +7 -4
- package/esm/core/styles-api/use-styles/use-transformed-styles.mjs.map +1 -1
- package/lib/core/styles-api/use-styles/use-styles.d.ts +3 -2
- package/package.json +1 -1
|
@@ -337,18 +337,19 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
337
337
|
"styles",
|
|
338
338
|
"unstyled",
|
|
339
339
|
"vars",
|
|
340
|
-
"variant",
|
|
341
340
|
"gradient",
|
|
342
341
|
"radius",
|
|
343
342
|
"autoContrast",
|
|
344
343
|
"attributes"
|
|
345
344
|
];
|
|
345
|
+
const styleProps = computed(() => ({
|
|
346
|
+
...props.value,
|
|
347
|
+
...attrs,
|
|
348
|
+
style: attrs.style ?? props.value.style
|
|
349
|
+
}));
|
|
346
350
|
const getStyles = useStyles({
|
|
347
351
|
name: "ActionIconGroupSection",
|
|
348
|
-
props:
|
|
349
|
-
...props.value,
|
|
350
|
-
...attrs
|
|
351
|
-
},
|
|
352
|
+
props: styleProps,
|
|
352
353
|
classes: action_icon_module_default,
|
|
353
354
|
className: props.value.className,
|
|
354
355
|
style: props.value.style,
|
|
@@ -364,7 +365,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
364
365
|
const mergedAttrs = computed(() => {
|
|
365
366
|
const others = {};
|
|
366
367
|
const propsValue = props.value;
|
|
367
|
-
for (const key in propsValue) others[key] = propsValue[key];
|
|
368
|
+
for (const key in propsValue) if (!knownProps.includes(key)) others[key] = propsValue[key];
|
|
368
369
|
const userMod = props.value.mod;
|
|
369
370
|
const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)];
|
|
370
371
|
return {
|
|
@@ -380,6 +381,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
380
381
|
rawProps,
|
|
381
382
|
props,
|
|
382
383
|
knownProps,
|
|
384
|
+
styleProps,
|
|
383
385
|
getStyles,
|
|
384
386
|
sectionAttrs,
|
|
385
387
|
mergedAttrs,
|
package/esm/components/action-icon/action-icon-group-section/action-icon-group-section.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-icon-group-section.mjs","names":[],"sources":["../../../../src/components/action-icon/action-icon-group-section/action-icon-group-section.vue"],"sourcesContent":["<template>\n <c-box ref=\"_section\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, useComponentProps, useStyles } from '../../../core'\nimport classes from '../action-icon.module.css'\nimport {\n ActionIconGroupSectionFactory,\n ActionIconGroupSectionProps,\n} from './action-icon-group-section.types'\nimport { varsResolver } from './action-icon-group-section.utils'\n\ndefineOptions({\n name: 'CActionIconGroupSection',\n})\n\nconst _section = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ActionIconGroupSectionProps>()\n\nconst props = useComponentProps({\n component: 'CActionIconGroupSection',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'vars',\n '
|
|
1
|
+
{"version":3,"file":"action-icon-group-section.mjs","names":[],"sources":["../../../../src/components/action-icon/action-icon-group-section/action-icon-group-section.vue"],"sourcesContent":["<template>\n <c-box ref=\"_section\" v-bind=\"mergedAttrs\">\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 classes from '../action-icon.module.css'\nimport {\n ActionIconGroupSectionFactory,\n ActionIconGroupSectionProps,\n} from './action-icon-group-section.types'\nimport { varsResolver } from './action-icon-group-section.utils'\n\ndefineOptions({\n name: 'CActionIconGroupSection',\n})\n\nconst _section = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ActionIconGroupSectionProps>()\n\nconst props = useComponentProps({\n component: 'CActionIconGroupSection',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'vars',\n 'gradient',\n 'radius',\n 'autoContrast',\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<ActionIconGroupSectionFactory>({\n name: 'ActionIconGroupSection',\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 rootSelector: 'groupSection',\n})\n\nconst sectionAttrs = computed(() => getStyles('groupSection'))\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, ...sectionAttrs.value }\n})\n\ndefineExpose({\n section: computed(() => _section.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -374,12 +374,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
374
374
|
"mod",
|
|
375
375
|
"attributes"
|
|
376
376
|
];
|
|
377
|
+
const styleProps = computed(() => ({
|
|
378
|
+
...props.value,
|
|
379
|
+
...attrs,
|
|
380
|
+
style: attrs.style ?? props.value.style
|
|
381
|
+
}));
|
|
377
382
|
const getStyles = useStyles({
|
|
378
383
|
name: ["ActionIcon", props.value.__staticSelector],
|
|
379
|
-
props:
|
|
380
|
-
...props.value,
|
|
381
|
-
...attrs
|
|
382
|
-
},
|
|
384
|
+
props: styleProps,
|
|
383
385
|
classes: action_icon_module_default,
|
|
384
386
|
className: props.value.className,
|
|
385
387
|
style: props.value.style,
|
|
@@ -415,6 +417,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
415
417
|
rawProps,
|
|
416
418
|
props,
|
|
417
419
|
knownProps,
|
|
420
|
+
styleProps,
|
|
418
421
|
getStyles,
|
|
419
422
|
modList,
|
|
420
423
|
rootAttrs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-icon.mjs","names":[],"sources":["../../../src/components/action-icon/action-icon.vue"],"sourcesContent":["<template>\n <unstyled-button\n ref=\"_root\"\n v-bind=\"mergedRootAttrs\"\n :aria-busy=\"props.loading || undefined\"\n :disabled=\"props.disabled || props.loading\"\n :size=\"props.size\"\n :unstyled=\"props.unstyled\"\n >\n <c-transition\n transition=\"slide-down\"\n v-if=\"typeof props.loading === 'boolean'\"\n :duration=\"150\"\n :mounted=\"props.loading\"\n >\n <template #default=\"{ styles }\">\n <c-box\n aria-hidden=\"true\"\n ref=\"_inner\"\n tag=\"span\"\n v-bind=\"getStyles('loader', { style: styles })\"\n >\n <c-loader\n color=\"var(--ai-color)\"\n size=\"calc(var(--ai-size) * 0.55)\"\n v-bind=\"props.loaderProps\"\n ></c-loader>\n </c-box>\n </template>\n </c-transition>\n\n <c-box tag=\"span\" v-bind=\"getStyles('icon')\" :mod=\"{ loading: props.loading }\">\n <slot />\n </c-box>\n </unstyled-button>\n</template>\n\n<script setup lang=\"ts\">\nimport UnstyledButton from '../unstyled-button'\nimport { CLoader } from '../loader'\nimport { CTransition } from '../transition'\nimport { computed, ref, useAttrs } from 'vue'\nimport { ActionIconFactory, ActionIconProps } from './action-icon.types'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport classes from './action-icon.module.css'\nimport { varsResolver } from './action-icon.utils'\n\ndefineOptions({\n name: 'CActionIcon',\n})\n\nconst _root = ref<InstanceType<typeof UnstyledButton> | null>(null)\nconst _inner = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ActionIconProps>()\n\nconst props = useComponentProps({\n component: 'CActionIcon',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'classNames',\n 'style',\n 'styles',\n 'unstyled',\n 'loading',\n 'loaderProps',\n 'size',\n 'color',\n 'radius',\n '__staticSelector',\n 'gradient',\n 'vars',\n 'disabled',\n 'dataDisabled',\n 'autoContrast',\n 'mod',\n 'attributes',\n]\n\nconst getStyles = useStyles<ActionIconFactory>({\n name: ['ActionIcon', props.value.__staticSelector],\n props:
|
|
1
|
+
{"version":3,"file":"action-icon.mjs","names":[],"sources":["../../../src/components/action-icon/action-icon.vue"],"sourcesContent":["<template>\n <unstyled-button\n ref=\"_root\"\n v-bind=\"mergedRootAttrs\"\n :aria-busy=\"props.loading || undefined\"\n :disabled=\"props.disabled || props.loading\"\n :size=\"props.size\"\n :unstyled=\"props.unstyled\"\n >\n <c-transition\n transition=\"slide-down\"\n v-if=\"typeof props.loading === 'boolean'\"\n :duration=\"150\"\n :mounted=\"props.loading\"\n >\n <template #default=\"{ styles }\">\n <c-box\n aria-hidden=\"true\"\n ref=\"_inner\"\n tag=\"span\"\n v-bind=\"getStyles('loader', { style: styles })\"\n >\n <c-loader\n color=\"var(--ai-color)\"\n size=\"calc(var(--ai-size) * 0.55)\"\n v-bind=\"props.loaderProps\"\n ></c-loader>\n </c-box>\n </template>\n </c-transition>\n\n <c-box tag=\"span\" v-bind=\"getStyles('icon')\" :mod=\"{ loading: props.loading }\">\n <slot />\n </c-box>\n </unstyled-button>\n</template>\n\n<script setup lang=\"ts\">\nimport UnstyledButton from '../unstyled-button'\nimport { CLoader } from '../loader'\nimport { CTransition } from '../transition'\nimport { computed, ref, useAttrs } from 'vue'\nimport { ActionIconFactory, ActionIconProps } from './action-icon.types'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport classes from './action-icon.module.css'\nimport { varsResolver } from './action-icon.utils'\n\ndefineOptions({\n name: 'CActionIcon',\n})\n\nconst _root = ref<InstanceType<typeof UnstyledButton> | null>(null)\nconst _inner = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ActionIconProps>()\n\nconst props = useComponentProps({\n component: 'CActionIcon',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'classNames',\n 'style',\n 'styles',\n 'unstyled',\n 'loading',\n 'loaderProps',\n 'size',\n 'color',\n 'radius',\n '__staticSelector',\n 'gradient',\n 'vars',\n 'disabled',\n 'dataDisabled',\n 'autoContrast',\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<ActionIconFactory>({\n name: ['ActionIcon', props.value.__staticSelector],\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 modList = computed(() => [\n { disabled: props.value.disabled || props.value.dataDisabled },\n { loading: props.value.loading },\n])\n\nconst rootAttrs = computed(() =>\n getStyles('root', {\n active: !props.value.disabled && !props.value.loading && !props.value.dataDisabled,\n })\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 = [\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 inner: computed(() => _inner.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDA,MAAM,QAAQ,IAAgD,IAAI;EAClE,MAAM,SAAS,IAAsC,IAAI;EAEzD,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,aAAa,gBAAgB;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,UAA6B;GAC7C,MAAM,CAAC,c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UAAU,OAAA,MAAM;;yBAsBF,CAAA,OAlBA,OAAA,MAAM,YAAO,aAAA,UAAA,GAF5B,YAoBe,OAAA,gBAAA;;GAnBb,YAAW;GAEV,UAAU;GACV,SAAS,OAAA,MAAM;;GAEL,SAAO,SAYR,EAZY,aAAM,CAC1B,YAWQ,OAAA,SAXR,WAWQ;IAVN,eAAY;IACZ,KAAI;IACJ,KAAI;MACI,OAAA,UAAS,UAAA,EAAA,OAAoB,OAAM,CAAA,CAAA,GAAA;2BAM/B,CAJZ,YAIY,OAAA,YAJZ,WAIY;KAHV,OAAM;KACN,MAAK;OACG,OAAA,MAAM,WAAW,GAAA,MAAA,EAAA,CAAA,CAAA;;;;0DAMjC,YAEQ,OAAA,SAFR,WAEQ,EAFD,KAAI,OAAM,GAAS,OAAA,UAAS,MAAA,GAAA,EAAW,KAAG,EAAA,SAAa,OAAA,MAAM,QAAO,EAAA,CAAA,GAAA;0BACjE,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -355,12 +355,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
355
355
|
"role",
|
|
356
356
|
"attributes"
|
|
357
357
|
];
|
|
358
|
+
const styleProps = computed(() => ({
|
|
359
|
+
...props.value,
|
|
360
|
+
...attrs,
|
|
361
|
+
style: attrs.style ?? props.value.style
|
|
362
|
+
}));
|
|
358
363
|
const getStyles = useStyles({
|
|
359
364
|
name: "Alert",
|
|
360
|
-
props:
|
|
361
|
-
...props.value,
|
|
362
|
-
...attrs
|
|
363
|
-
},
|
|
365
|
+
props: styleProps,
|
|
364
366
|
classes: alert_module_default,
|
|
365
367
|
className: props.value.className,
|
|
366
368
|
style: props.value.style,
|
|
@@ -402,6 +404,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
402
404
|
rawProps,
|
|
403
405
|
props,
|
|
404
406
|
knownProps,
|
|
407
|
+
styleProps,
|
|
405
408
|
getStyles,
|
|
406
409
|
rootId,
|
|
407
410
|
titleId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.mjs","names":[],"sources":["../../../src/components/alert/alert.vue"],"sourcesContent":["<template>\n <c-box\n ref=\"_root\"\n v-bind=\"mergedRootAttrs\"\n :aria-describedby=\"$slots.default ? bodyId : undefined\"\n :aria-labelledby=\"$slots.title ? titleId : undefined\"\n :id=\"rootId\"\n :role=\"props.role || 'alert'\"\n :variant=\"props.variant\"\n >\n <c-box v-bind=\"wrapperAttrs\">\n <c-box v-bind=\"iconAttrs\" v-if=\"$slots.icon\">\n <slot name=\"icon\" />\n </c-box>\n\n <c-box v-bind=\"bodyAttrs\">\n <c-box\n v-bind=\"titleAttrs\"\n v-if=\"$slots.title\"\n :data-with-close-button=\"props.withCloseButton || undefined\"\n >\n <c-box tag=\"span\" :id=\"titleId\" v-bind=\"labelAttrs\">\n <slot name=\"title\" />\n </c-box>\n </c-box>\n\n <c-box\n v-bind=\"messageAttrs\"\n v-if=\"$slots.default\"\n :data-variant=\"props.variant\"\n :id=\"bodyId\"\n >\n <slot />\n </c-box>\n </c-box>\n\n <c-close-button\n v-bind=\"closeButtonAttrs\"\n v-if=\"props.withCloseButton\"\n :aria-label=\"closeButtonLabel\"\n :icon-size=\"16\"\n :size=\"16\"\n :unstyled=\"props.unstyled\"\n variant=\"transparent\"\n @click=\"props.onClose\"\n ></c-close-button>\n </c-box>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useId } from '@cck-ui/hooks'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport classes from './alert.module.css'\nimport { AlertFactory, type AlertProps } from './alert.types'\nimport { varsResolver } from './alert.utils'\nimport CCloseButton from '../close-button'\n\ndefineOptions({\n name: 'CAlert',\n})\n\nconst slots = defineSlots<{\n default: any\n icon: any\n title: any\n}>()\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<AlertProps>()\n\nconst props = useComponentProps({\n component: 'CAlert',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'style',\n 'className',\n 'styles',\n 'classNames',\n 'unstyled',\n 'vars',\n 'radius',\n 'color',\n 'id',\n 'withCloseButton',\n 'onClose',\n 'closeButtonLabel',\n 'variant',\n 'autoContrast',\n 'role',\n 'attributes',\n]\n\nconst getStyles = useStyles<AlertFactory>({\n name: 'Alert',\n props:
|
|
1
|
+
{"version":3,"file":"alert.mjs","names":[],"sources":["../../../src/components/alert/alert.vue"],"sourcesContent":["<template>\n <c-box\n ref=\"_root\"\n v-bind=\"mergedRootAttrs\"\n :aria-describedby=\"$slots.default ? bodyId : undefined\"\n :aria-labelledby=\"$slots.title ? titleId : undefined\"\n :id=\"rootId\"\n :role=\"props.role || 'alert'\"\n :variant=\"props.variant\"\n >\n <c-box v-bind=\"wrapperAttrs\">\n <c-box v-bind=\"iconAttrs\" v-if=\"$slots.icon\">\n <slot name=\"icon\" />\n </c-box>\n\n <c-box v-bind=\"bodyAttrs\">\n <c-box\n v-bind=\"titleAttrs\"\n v-if=\"$slots.title\"\n :data-with-close-button=\"props.withCloseButton || undefined\"\n >\n <c-box tag=\"span\" :id=\"titleId\" v-bind=\"labelAttrs\">\n <slot name=\"title\" />\n </c-box>\n </c-box>\n\n <c-box\n v-bind=\"messageAttrs\"\n v-if=\"$slots.default\"\n :data-variant=\"props.variant\"\n :id=\"bodyId\"\n >\n <slot />\n </c-box>\n </c-box>\n\n <c-close-button\n v-bind=\"closeButtonAttrs\"\n v-if=\"props.withCloseButton\"\n :aria-label=\"closeButtonLabel\"\n :icon-size=\"16\"\n :size=\"16\"\n :unstyled=\"props.unstyled\"\n variant=\"transparent\"\n @click=\"props.onClose\"\n ></c-close-button>\n </c-box>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useId } from '@cck-ui/hooks'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport classes from './alert.module.css'\nimport { AlertFactory, type AlertProps } from './alert.types'\nimport { varsResolver } from './alert.utils'\nimport CCloseButton from '../close-button'\n\ndefineOptions({\n name: 'CAlert',\n})\n\nconst slots = defineSlots<{\n default: any\n icon: any\n title: any\n}>()\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<AlertProps>()\n\nconst props = useComponentProps({\n component: 'CAlert',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'style',\n 'className',\n 'styles',\n 'classNames',\n 'unstyled',\n 'vars',\n 'radius',\n 'color',\n 'id',\n 'withCloseButton',\n 'onClose',\n 'closeButtonLabel',\n 'variant',\n 'autoContrast',\n 'role',\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<AlertFactory>({\n name: 'Alert',\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 rootId = useId(props.value.id).value\nconst titleId = (slots.title && `${rootId}-title`) || undefined\nconst bodyId = `${rootId}-body`\n\nconst rootAttrs = computed(() => getStyles('root'))\nconst wrapperAttrs = computed(() => getStyles('wrapper'))\nconst iconAttrs = computed(() => getStyles('icon'))\nconst bodyAttrs = computed(() => getStyles('body'))\nconst titleAttrs = computed(() => getStyles('title'))\nconst labelAttrs = computed(() => getStyles('label'))\nconst messageAttrs = computed(() => getStyles('message'))\nconst closeButtonAttrs = computed(() => getStyles('close-button'))\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])]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+DA,MAAM,QAAQ,SAAA;EAMd,MAAM,QAAQ,IAAsC,IAAI;EAExD,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,aAAa,gBAAgB;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,UAAwB;GACxC,MAAM;GACN,OAAO;GACP,SAAA;GACA,WAAW,MAAM,MAAM;GACvB,OAAO,MAAM,MAAM;GACnB,YAAY,MAAM,MAAM;GACxB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;GACxB,MAAM,MAAM,MAAM;GAClB;EACF,CAAC;EAED,MAAM,SAAS,QAAM,MAAM,MAAM,EAAE,CAAC,CAAC;EACrC,MAAM,UAAW,MAAM,SAAS,GAAG,OAA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,eAAA,WAAA,EAAA,KAAA,EAAA,GAFO,OAAA,SAAS,CAAA,GAAA;4BACF,CAApB,WAAoB,KAAA,QAAA,MAAA,CAAA,CAAA;;;IAGtB,YAmBQ,OAAA,SAAA,eAAA,mBAnBO,OAAA,SAAS,CAAA,GAAA;4BASd,CANA,KAAA,OAAO,SAAA,UAAA,GAFf,YAQQ,OAAA,SARR,WAQQ,EAAA,KAAA,EAAA,GAPE,OAAA,YAAU,EAEjB,0BAAwB,OAAA,MAAM,mBAAmB,KAAA,EAAA,CAAA,GAAA;6BAI1C,CAFR,YAEQ,OAAA,SAFR,WAEQ;OAFD,KAAI;OAAQ,IAAI,OAAA;SAAiB,OAAA,UAAU,GAAA;8BAC3B,CAArB,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA;;;;6EAMjB,KAAA,OAAO,WAAA,UAAA,GAFf,YAOQ,OAAA,SAPR,WAOQ,EAAA,KAAA,EAAA,GANE,OAAA,cAAY;MAEnB,gBAAc,OAAA,MAAM;MACpB,IAAI,OAAA;;6BAEG,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA;;;;;IAMJ,OAAA,MAAM,mBAAA,UAAA,GAFd,YASkB,OAAA,iBATlB,WASkB,EAAA,KAAA,EAAA,GARR,OAAA,kBAAgB;KAEvB,cAAY,OAAA;KACZ,aAAW;KACX,MAAM;KACN,UAAU,OAAA,MAAM;KACjB,SAAQ;KACP,SAAO,OAAA,MAAM"}
|
|
@@ -324,12 +324,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
324
324
|
"ratio",
|
|
325
325
|
"attributes"
|
|
326
326
|
];
|
|
327
|
+
const styleProps = computed(() => ({
|
|
328
|
+
...props.value,
|
|
329
|
+
...attrs,
|
|
330
|
+
style: attrs.style ?? props.value.style
|
|
331
|
+
}));
|
|
327
332
|
const getStyles = useStyles({
|
|
328
333
|
name: "AspectRatio",
|
|
329
|
-
props:
|
|
330
|
-
...props.value,
|
|
331
|
-
...attrs
|
|
332
|
-
},
|
|
334
|
+
props: styleProps,
|
|
333
335
|
classes: aspect_ratio_module_default,
|
|
334
336
|
className: props.value.className,
|
|
335
337
|
classNames: props.value.classNames,
|
|
@@ -362,6 +364,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
362
364
|
rawProps,
|
|
363
365
|
props,
|
|
364
366
|
knownProps,
|
|
367
|
+
styleProps,
|
|
365
368
|
getStyles,
|
|
366
369
|
rootAttrs,
|
|
367
370
|
mergedAttrs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aspect-ratio.mjs","names":[],"sources":["../../../src/components/aspect-ratio/aspect-ratio.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, ref, useAttrs } from 'vue'\nimport { AspectRatioFactory, AspectRatioProps } from './aspect-ratio.types'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport classes from './aspect-ratio.module.css'\nimport { varsResolver } from './aspect-ratio.utils'\n\ndefineOptions({\n name: 'CAspectRatio',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<AspectRatioProps>()\n\nconst props = useComponentProps({\n component: 'CAspectRatio',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'ratio',\n 'attributes',\n]\n\nconst getStyles = useStyles<AspectRatioFactory>({\n name: 'AspectRatio',\n props:
|
|
1
|
+
{"version":3,"file":"aspect-ratio.mjs","names":[],"sources":["../../../src/components/aspect-ratio/aspect-ratio.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, ref, useAttrs } from 'vue'\nimport { AspectRatioFactory, AspectRatioProps } from './aspect-ratio.types'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport classes from './aspect-ratio.module.css'\nimport { varsResolver } from './aspect-ratio.utils'\n\ndefineOptions({\n name: 'CAspectRatio',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<AspectRatioProps>()\n\nconst props = useComponentProps({\n component: 'CAspectRatio',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'ratio',\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<AspectRatioFactory>({\n name: 'AspectRatio',\n props: styleProps,\n classes,\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 rootAttrs = computed(() => getStyles('root'))\n\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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SAFR,WAEQ,EAFD,KAAI,QAAO,GAAS,OAAA,WAAW,GAAA;yBAC5B,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -332,12 +332,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
332
332
|
"mod",
|
|
333
333
|
"attributes"
|
|
334
334
|
];
|
|
335
|
+
const styleProps = computed(() => ({
|
|
336
|
+
...props.value,
|
|
337
|
+
...attrs,
|
|
338
|
+
style: attrs.style ?? props.value.style
|
|
339
|
+
}));
|
|
335
340
|
const getStyles = useStyles({
|
|
336
341
|
name: "ButtonGroup",
|
|
337
|
-
props:
|
|
338
|
-
...props.value,
|
|
339
|
-
...attrs
|
|
340
|
-
},
|
|
342
|
+
props: styleProps,
|
|
341
343
|
classes: button_module_default,
|
|
342
344
|
className: props.value.className,
|
|
343
345
|
style: props.value.style,
|
|
@@ -374,6 +376,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
374
376
|
rawProps,
|
|
375
377
|
props,
|
|
376
378
|
knownProps,
|
|
379
|
+
styleProps,
|
|
377
380
|
getStyles,
|
|
378
381
|
modList,
|
|
379
382
|
groupAttrs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group.mjs","names":[],"sources":["../../../../src/components/button/button-group/button-group.vue"],"sourcesContent":["<template>\n <c-box ref=\"_group\" role=\"group\" v-bind=\"mergedAttrs\">\n <template v-for=\"(child, index) in validChildren\" :key=\"child.key ?? index\">\n <component :is=\"child\" />\n </template>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots } from 'vue'\nimport { CBox, useComponentProps, useStyles } from '../../../core'\nimport classes from '../button.module.css'\nimport { ButtonGroupFactory, type ButtonGroupProps } from './button-group.types'\nimport { useButtonGroup } from './use-button-group'\nimport { varsResolver } from './button-group.utils'\n\ndefineOptions({\n name: 'CButtonGroup',\n})\n\nconst _group = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst rawProps = defineProps<ButtonGroupProps>()\n\nconst props = useComponentProps({\n component: 'CButtonGroup',\n defaultProps: {\n orientation: 'horizontal',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'orientation',\n 'vars',\n 'borderWidth',\n 'mod',\n 'attributes',\n]\n\nconst getStyles = useStyles<ButtonGroupFactory>({\n name: 'ButtonGroup',\n props:
|
|
1
|
+
{"version":3,"file":"button-group.mjs","names":[],"sources":["../../../../src/components/button/button-group/button-group.vue"],"sourcesContent":["<template>\n <c-box ref=\"_group\" role=\"group\" v-bind=\"mergedAttrs\">\n <template v-for=\"(child, index) in validChildren\" :key=\"child.key ?? index\">\n <component :is=\"child\" />\n </template>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../../core'\nimport classes from '../button.module.css'\nimport { ButtonGroupFactory, type ButtonGroupProps } from './button-group.types'\nimport { useButtonGroup } from './use-button-group'\nimport { varsResolver } from './button-group.utils'\n\ndefineOptions({\n name: 'CButtonGroup',\n})\n\nconst _group = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst rawProps = defineProps<ButtonGroupProps>()\n\nconst props = useComponentProps({\n component: 'CButtonGroup',\n defaultProps: {\n orientation: 'horizontal',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'orientation',\n 'vars',\n 'borderWidth',\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<ButtonGroupFactory>({\n name: 'ButtonGroup',\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 rootSelector: 'group',\n})\n\nconst modList = computed(() => [\n {\n orientation: props.value.orientation,\n },\n])\n\nconst groupAttrs = computed(() => getStyles('group'))\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, ...groupAttrs.value }\n})\n\nconst { validChildren } = useButtonGroup(slots)\n\ndefineExpose({\n group: computed(() => _group.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBA,MAAM,SAAS,IAAsC,IAAI;EAEzD,MAAM,QAAQ,SAAS;EACvB,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc,EACZ,aAAa,aACf;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,aAAa,gBAAgB;GACjC,GAAG,MAAM;GACT,GAAG;GAC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
@@ -338,12 +338,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
338
338
|
"autoContrast",
|
|
339
339
|
"attributes"
|
|
340
340
|
];
|
|
341
|
+
const styleProps = computed(() => ({
|
|
342
|
+
...props.value,
|
|
343
|
+
...attrs,
|
|
344
|
+
style: attrs.style ?? props.value.style
|
|
345
|
+
}));
|
|
341
346
|
const getStyles = useStyles({
|
|
342
347
|
name: "ButtonGroupSection",
|
|
343
|
-
props:
|
|
344
|
-
...props.value,
|
|
345
|
-
...attrs
|
|
346
|
-
},
|
|
348
|
+
props: styleProps,
|
|
347
349
|
classes: button_module_default,
|
|
348
350
|
className: props.value.className,
|
|
349
351
|
style: props.value.style,
|
|
@@ -377,6 +379,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
377
379
|
rawProps,
|
|
378
380
|
props,
|
|
379
381
|
knownProps,
|
|
382
|
+
styleProps,
|
|
380
383
|
getStyles,
|
|
381
384
|
sectionAttrs,
|
|
382
385
|
mergedAttrs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group-section.mjs","names":[],"sources":["../../../../src/components/button/button-group-section/button-group-section.vue"],"sourcesContent":["<template>\n <c-box ref=\"_section\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, useComponentProps, useStyles } from '../../../core'\nimport type {\n ButtonGroupSectionFactory,\n ButtonGroupSectionProps,\n} from './button-group-section.types'\nimport classes from '../button.module.css'\nimport { varsResolver } from './button-group-section.utils'\n\ndefineOptions({\n name: 'CButtonGroupSection',\n})\n\nconst _section = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ButtonGroupSectionProps>()\n\nconst props = useComponentProps({\n component: 'CButtonGroupSection',\n defaultProps: {\n variant: 'default',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'vars',\n 'gradient',\n 'radius',\n 'autoContrast',\n 'attributes',\n]\n\nconst getStyles = useStyles<ButtonGroupSectionFactory>({\n name: 'ButtonGroupSection',\n props:
|
|
1
|
+
{"version":3,"file":"button-group-section.mjs","names":[],"sources":["../../../../src/components/button/button-group-section/button-group-section.vue"],"sourcesContent":["<template>\n <c-box ref=\"_section\" v-bind=\"mergedAttrs\">\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 type {\n ButtonGroupSectionFactory,\n ButtonGroupSectionProps,\n} from './button-group-section.types'\nimport classes from '../button.module.css'\nimport { varsResolver } from './button-group-section.utils'\n\ndefineOptions({\n name: 'CButtonGroupSection',\n})\n\nconst _section = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ButtonGroupSectionProps>()\n\nconst props = useComponentProps({\n component: 'CButtonGroupSection',\n defaultProps: {\n variant: 'default',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'vars',\n 'gradient',\n 'radius',\n 'autoContrast',\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<ButtonGroupSectionFactory>({\n name: 'ButtonGroupSection',\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 rootSelector: 'groupSection',\n})\n\nconst sectionAttrs = computed(() => getStyles('groupSection'))\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, ...sectionAttrs.value }\n})\n\ndefineExpose({\n section: computed(() => _section.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBA,MAAM,WAAW,IAAsC,IAAI;EAE3D,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc,EACZ,SAAS,UACX;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,aAAa,gBAAgB;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,UAAqC;GACrD,MAAM;GACN,OAAO;GACP,SAAA;GACA,WAAW,MAAM,MAAM;GACvB,OAAO,MAAM,MAAM;GACnB,YAAY,MAAM,MAAM;GACxB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;GACxB,MAAM,MAAM,MAAM;GAClB;GACA,cAAc;EAChB,CAAC;EAED,MAAM,eAAe,eAAe,UAAU,cAAc,CAAC;EAC7D,MAAM,cAAc,eAAe;GACjC,MAAM,SAA8B,CAAC;GACrC,MAAM,aAAa,MAAM;GACzB,OAAO,KAAK,UAAU,CAAC,CAAC,SAAS,QAAQ;IACvC,IAAI,CAAC,WAAW,SAAS,GAAG,GAC1B,OAAO,OAAO,WAAW;GAE7B,CAAC;GACD,MAAM,UAAU,MAAM,MAAM;GAC5B,MAAM,YAAY,CAAC,GAAI,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,OAAO,CAAE;GACpF,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,aAAa;GAAM;EAC5D,CAAC;EAED,SAAa,EACX,SAAS,eAAe,SAAS,OAAO,QAAQ,IAAI,EACtD,CAAC;;;;;;;;;;;;;;;;;;;;;;;qBAnFC,YAEQ,OAAA,SAFR,WAEQ,EAFD,KAAI,WAAU,GAAS,OAAA,WAAW,GAAA;yBAC/B,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -404,12 +404,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
404
404
|
"mod",
|
|
405
405
|
"attributes"
|
|
406
406
|
];
|
|
407
|
+
const styleProps = computed(() => ({
|
|
408
|
+
...props.value,
|
|
409
|
+
...attrs,
|
|
410
|
+
style: attrs.style ?? props.value.style
|
|
411
|
+
}));
|
|
407
412
|
const getStyles = useStyles({
|
|
408
413
|
name: "Button",
|
|
409
|
-
props:
|
|
410
|
-
...props.value,
|
|
411
|
-
...attrs
|
|
412
|
-
},
|
|
414
|
+
props: styleProps,
|
|
413
415
|
classes: button_module_default,
|
|
414
416
|
className: props.value.className,
|
|
415
417
|
style: props.value.style,
|
|
@@ -462,6 +464,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
462
464
|
rawProps,
|
|
463
465
|
props,
|
|
464
466
|
knownProps,
|
|
467
|
+
styleProps,
|
|
465
468
|
getStyles,
|
|
466
469
|
modList,
|
|
467
470
|
rootAttrs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.mjs","names":[],"sources":["../../../src/components/button/button.vue"],"sourcesContent":["<template>\n <unstyled-button\n ref=\"_root\"\n v-bind=\"mergedRootAttrs\"\n :disabled=\"disabled || loading\"\n :unstyled=\"unstyled\"\n >\n <c-transition\n v-if=\"typeof props.loading === 'boolean'\"\n :mounted=\"props.loading\"\n :transition=\"loaderTransition\"\n :duration=\"150\"\n >\n <template #default=\"{ styles }\">\n <c-box\n ref=\"_inner\"\n tag=\"span\"\n v-bind=\"getStyles('loader', { style: styles })\"\n aria-hidden=\"true\"\n >\n <c-loader\n color=\"var(--button-color)\"\n size=\"calc(var(--button-height) / 1.8)\"\n v-bind=\"props.loaderProps\"\n ></c-loader>\n </c-box>\n </template>\n </c-transition>\n\n <c-box tag=\"span\" v-bind=\"innerAttrs\">\n <c-box\n v-if=\"$slots['left-section']\"\n v-bind=\"sectionAttrs\"\n tag=\"span\"\n :mod=\"{ position: 'left' }\"\n >\n <slot name=\"left-section\"></slot>\n </c-box>\n <c-box v-else-if=\"leftSection\" v-bind=\"sectionAttrs\" tag=\"span\" :mod=\"{ position: 'left' }\">\n <!-- TODO -->\n <component :is=\"leftSection\" />\n </c-box>\n <c-box ref=\"_label\" v-bind=\"labelAttrs\" tag=\"span\" :mod=\"{ loading }\">\n <slot />\n </c-box>\n <c-box\n v-if=\"$slots['right-section']\"\n v-bind=\"sectionAttrs\"\n tag=\"span\"\n :mod=\"{ position: 'right' }\"\n >\n <slot name=\"right-section\"></slot>\n </c-box>\n <c-box v-else-if=\"rightSection\" v-bind=\"sectionAttrs\" tag=\"span\" :mod=\"{ position: 'right' }\">\n <!-- TODO -->\n <component :is=\"rightSection\" />\n </c-box>\n </c-box>\n </unstyled-button>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots } from 'vue'\nimport { CBox, rem, useComponentProps, useStyles } from '../../core'\nimport { UnstyledButton } from '../unstyled-button'\nimport { ButtonFactory, type ButtonProps } from './button.types'\nimport { varsResolver } from './button.utils'\nimport classes from './button.module.css'\nimport { CLoader } from '../loader'\nimport { CTransition, CckTransition } from '../transition'\n\ndefineOptions({\n name: 'CButton',\n})\n\ndefineSlots<{\n 'left-section': any\n 'right-section': any\n default: any\n}>()\n\nconst _root = ref<InstanceType<typeof UnstyledButton> | null>(null)\nconst _inner = ref<HTMLSpanElement | null>(null)\nconst _label = ref<HTMLSpanElement | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst hasLeftSlot = computed(() => !!slots['left-section'])\nconst hasRightSlot = computed(() => !!slots['right-section'])\n\nconst loaderTransition: CckTransition = {\n in: { opacity: 1, transform: `translate(-50%, calc(-50% + ${rem(1)}))` },\n out: { opacity: 0, transform: 'translate(-50%, -200%)' },\n common: { transformOrigin: 'center' },\n transitionProperty: 'transform, opacity',\n}\n\nconst rawProps = defineProps<ButtonProps>()\n\nconst props = useComponentProps({\n component: 'CButton',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'style',\n 'vars',\n 'className',\n 'color',\n 'disabled',\n 'leftSection',\n 'rightSection',\n 'fullWidth',\n 'radius',\n 'loading',\n 'loaderProps',\n 'gradient',\n 'classNames',\n 'styles',\n 'unstyled',\n 'dataDisabled',\n 'autoContrast',\n 'mod',\n 'attributes',\n]\n\nconst getStyles = useStyles<ButtonFactory>({\n name: 'Button',\n props:
|
|
1
|
+
{"version":3,"file":"button.mjs","names":[],"sources":["../../../src/components/button/button.vue"],"sourcesContent":["<template>\n <unstyled-button\n ref=\"_root\"\n v-bind=\"mergedRootAttrs\"\n :disabled=\"disabled || loading\"\n :unstyled=\"unstyled\"\n >\n <c-transition\n v-if=\"typeof props.loading === 'boolean'\"\n :mounted=\"props.loading\"\n :transition=\"loaderTransition\"\n :duration=\"150\"\n >\n <template #default=\"{ styles }\">\n <c-box\n ref=\"_inner\"\n tag=\"span\"\n v-bind=\"getStyles('loader', { style: styles })\"\n aria-hidden=\"true\"\n >\n <c-loader\n color=\"var(--button-color)\"\n size=\"calc(var(--button-height) / 1.8)\"\n v-bind=\"props.loaderProps\"\n ></c-loader>\n </c-box>\n </template>\n </c-transition>\n\n <c-box tag=\"span\" v-bind=\"innerAttrs\">\n <c-box\n v-if=\"$slots['left-section']\"\n v-bind=\"sectionAttrs\"\n tag=\"span\"\n :mod=\"{ position: 'left' }\"\n >\n <slot name=\"left-section\"></slot>\n </c-box>\n <c-box v-else-if=\"leftSection\" v-bind=\"sectionAttrs\" tag=\"span\" :mod=\"{ position: 'left' }\">\n <!-- TODO -->\n <component :is=\"leftSection\" />\n </c-box>\n <c-box ref=\"_label\" v-bind=\"labelAttrs\" tag=\"span\" :mod=\"{ loading }\">\n <slot />\n </c-box>\n <c-box\n v-if=\"$slots['right-section']\"\n v-bind=\"sectionAttrs\"\n tag=\"span\"\n :mod=\"{ position: 'right' }\"\n >\n <slot name=\"right-section\"></slot>\n </c-box>\n <c-box v-else-if=\"rightSection\" v-bind=\"sectionAttrs\" tag=\"span\" :mod=\"{ position: 'right' }\">\n <!-- TODO -->\n <component :is=\"rightSection\" />\n </c-box>\n </c-box>\n </unstyled-button>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots } from 'vue'\nimport { CBox, CStyleProp, rem, useComponentProps, useStyles } from '../../core'\nimport { UnstyledButton } from '../unstyled-button'\nimport { ButtonFactory, type ButtonProps } from './button.types'\nimport { varsResolver } from './button.utils'\nimport classes from './button.module.css'\nimport { CLoader } from '../loader'\nimport { CTransition, CckTransition } from '../transition'\n\ndefineOptions({\n name: 'CButton',\n})\n\ndefineSlots<{\n 'left-section': any\n 'right-section': any\n default: any\n}>()\n\nconst _root = ref<InstanceType<typeof UnstyledButton> | null>(null)\nconst _inner = ref<HTMLSpanElement | null>(null)\nconst _label = ref<HTMLSpanElement | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst hasLeftSlot = computed(() => !!slots['left-section'])\nconst hasRightSlot = computed(() => !!slots['right-section'])\n\nconst loaderTransition: CckTransition = {\n in: { opacity: 1, transform: `translate(-50%, calc(-50% + ${rem(1)}))` },\n out: { opacity: 0, transform: 'translate(-50%, -200%)' },\n common: { transformOrigin: 'center' },\n transitionProperty: 'transform, opacity',\n}\n\nconst rawProps = defineProps<ButtonProps>()\n\nconst props = useComponentProps({\n component: 'CButton',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'style',\n 'vars',\n 'className',\n 'color',\n 'disabled',\n 'leftSection',\n 'rightSection',\n 'fullWidth',\n 'radius',\n 'loading',\n 'loaderProps',\n 'gradient',\n 'classNames',\n 'styles',\n 'unstyled',\n 'dataDisabled',\n 'autoContrast',\n 'mod',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<ButtonFactory>({\n name: 'Button',\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 modList = computed(() => [\n {\n disabled: props.value.disabled || props.value.dataDisabled,\n },\n { loading: props.value.loading },\n { block: props.value.fullWidth },\n { 'with-left-section': hasLeftSlot.value || !!props.value.leftSection },\n { 'with-right-section': hasRightSlot.value || !!props.value.rightSection },\n])\n\nconst rootAttrs = computed(() =>\n getStyles('root', {\n active: !props.value.disabled && !props.value.loading && !props.value.dataDisabled,\n })\n)\nconst mergedRootAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [\n ...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)),\n ...(modList.value || []),\n ]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\nconst innerAttrs = computed(() => getStyles('inner'))\nconst sectionAttrs = computed(() => getStyles('section'))\nconst labelAttrs = computed(() => getStyles('label'))\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n inner: _inner.value,\n label: _label.value,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiFA,MAAM,QAAQ,IAAgD,IAAI;EAClE,MAAM,SAAS,IAA4B,IAAI;EAC/C,MAAM,SAAS,IAA4B,IAAI;EAE/C,MAAM,QAAQ,SAAS;EACvB,MAAM,QAAQ,SAAS;EAEvB,MAAM,cAAc,eAAe,CAAC,CAAC,MAAM,eAAe;EAC1D,MAAM,eAAe,eAAe,CAAC,CAAC,MAAM,gBAAgB;EAE5D,MAAM,mBAAkC;GACtC,IAAI;IAAE,SAAS;IAAG,WAAW,+BAA+B,IAAI,CAAC,EAAE;GAAI;GACvE,KAAK;IAAE,SAAS;IAAG,WAAW;GAAyB;GACvD,QAAQ,EAAE,iBAAiB,SAAS;GACpC,oBAAoB;EACtB;EAEA,MAAM,WAAW;EAEjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA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KAAI;KAAQ,KAAK,EAAA,UAAA,OAAA;;4BACvD,CAAb,mBAAA,QAAA,IAAA,UAAA,GACA,YAA+B,wBAAf,OAAA,WAAW,CAAA,EAAA,CAAA;;;IAE7B,YAEQ,OAAA,SAFR,WAEQ,EAFD,KAAI,SAAQ,GAAS,OAAA,YAAU;KAAE,KAAI;KAAQ,KAAG,EAAA,SAAI,OAAA,QAAO;;4BACxD,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA;;;IAGF,KAAA,OAAM,oBAAA,UAAA,GADd,YAOQ,OAAA,SAPR,WAOQ,EAAA,KAAA,EAAA,GALE,OAAA,cAAY;KACpB,KAAI;KACH,KAAK,EAAA,UAAA,QAAA;;4BAE4B,CAAlC,WAAkC,KAAA,QAAA,eAAA,CAAA,CAAA;;cAElB,OAAA,gBAAA,UAAA,GAAlB,YAGQ,OAAA,SAHR,WAGQ,EAAA,KAAA,EAAA,GAHgC,OAAA,cAAY;KAAE,KAAI;KAAQ,KAAK,EAAA,UAAA,QAAA;;4BACxD,CAAb,mBAAA,QAAA,IAAA,UAAA,GACA,YAAgC,wBAAhB,OAAA,YAAY,CAAA,EAAA,CAAA"}
|
|
@@ -324,12 +324,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
324
324
|
"mod",
|
|
325
325
|
"attributes"
|
|
326
326
|
];
|
|
327
|
+
const styleProps = computed(() => ({
|
|
328
|
+
...props.value,
|
|
329
|
+
...attrs,
|
|
330
|
+
style: attrs.style ?? props.value.style
|
|
331
|
+
}));
|
|
327
332
|
const getStyles = useStyles({
|
|
328
333
|
name: "Center",
|
|
329
|
-
props:
|
|
330
|
-
...props.value,
|
|
331
|
-
...attrs
|
|
332
|
-
},
|
|
334
|
+
props: styleProps,
|
|
333
335
|
classes: center_module_default,
|
|
334
336
|
className: props.value.className,
|
|
335
337
|
style: props.value.style,
|
|
@@ -362,6 +364,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
362
364
|
rawProps,
|
|
363
365
|
props,
|
|
364
366
|
knownProps,
|
|
367
|
+
styleProps,
|
|
365
368
|
getStyles,
|
|
366
369
|
modList,
|
|
367
370
|
rootAttrs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"center.mjs","names":[],"sources":["../../../src/components/center/center.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, ref, useAttrs } from 'vue'\nimport { CenterFactory, CenterProps } from './center.types'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport classes from './center.module.css'\n\ndefineOptions({\n name: 'CCenter',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<CenterProps>()\n\nconst props = useComponentProps({\n component: 'CCenter',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'inline',\n 'mod',\n 'attributes',\n]\n\nconst getStyles = useStyles<CenterFactory>({\n name: 'Center',\n props:
|
|
1
|
+
{"version":3,"file":"center.mjs","names":[],"sources":["../../../src/components/center/center.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, ref, useAttrs } from 'vue'\nimport { CenterFactory, CenterProps } from './center.types'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport classes from './center.module.css'\n\ndefineOptions({\n name: 'CCenter',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<CenterProps>()\n\nconst props = useComponentProps({\n component: 'CCenter',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'inline',\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<CenterFactory>({\n name: 'Center',\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 modList = computed(() => [{ inline: props.value.inline }])\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,QAAQ,IAAsC,IAAI;EAExD,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GAC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|
358
358
|
];
|
|
359
|
+
const styleProps = computed(() => ({
|
|
360
|
+
...props.value,
|
|
361
|
+
...attrs,
|
|
362
|
+
style: attrs.style ?? props.value.style
|
|
363
|
+
}));
|
|
359
364
|
const getStyles = useStyles({
|
|
360
365
|
name: props.value.__staticSelector || "CloseButton",
|
|
361
|
-
props:
|
|
362
|
-
...props.value,
|
|
363
|
-
...attrs
|
|
364
|
-
},
|
|
366
|
+
props: styleProps,
|
|
365
367
|
classes: close_button_module_default,
|
|
366
368
|
className: props.value.className,
|
|
367
369
|
classNames: props.value.classNames,
|
|
@@ -397,6 +399,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
397
399
|
defaultProps,
|
|
398
400
|
props,
|
|
399
401
|
knownProps,
|
|
402
|
+
styleProps,
|
|
400
403
|
getStyles,
|
|
401
404
|
modList,
|
|
402
405
|
rootAttrs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"close-button.mjs","names":[],"sources":["../../../src/components/close-button/close-button.vue"],"sourcesContent":["<template>\n <unstyled-button\n ref=\"_root\"\n v-bind=\"mergedAttrs\"\n :disabled=\"props.disabled || props.dataDisabled\"\n :unstyled=\"props.unstyled\"\n :variant=\"props.variant\"\n >\n <slot name=\"icon\">\n <close-icon></close-icon>\n </slot>\n <slot />\n </unstyled-button>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CloseButtonFactory, CloseButtonProps } from './close-button.types'\nimport UnstyledButton from '../unstyled-button'\nimport CloseIcon from './close-icon.vue'\nimport classes from './close-button.module.css'\nimport { useComponentProps, useStyles } from '../../core'\nimport { varsResolver } from './close-button.utils'\n\ndefineOptions({\n name: 'CCloseButton',\n})\n\ndefineSlots<{\n icon: any\n default: any\n}>()\n\nconst _root = ref<InstanceType<typeof UnstyledButton> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<CloseButtonProps>()\n\nconst defaultProps = {\n variant: 'subtle',\n} satisfies Partial<CloseButtonProps>\n\nconst props = useComponentProps({\n component: 'CCloseButton',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'iconSize',\n 'vars',\n 'radius',\n 'className',\n 'classNames',\n 'style',\n 'styles',\n 'unstyled',\n 'dataDisabled',\n 'disabled',\n 'variant',\n 'mod',\n 'attributes',\n '__staticSelector',\n]\n\nconst getStyles = useStyles<CloseButtonFactory>({\n name: props.value.__staticSelector || 'CloseButton',\n props:
|
|
1
|
+
{"version":3,"file":"close-button.mjs","names":[],"sources":["../../../src/components/close-button/close-button.vue"],"sourcesContent":["<template>\n <unstyled-button\n ref=\"_root\"\n v-bind=\"mergedAttrs\"\n :disabled=\"props.disabled || props.dataDisabled\"\n :unstyled=\"props.unstyled\"\n :variant=\"props.variant\"\n >\n <slot name=\"icon\">\n <close-icon></close-icon>\n </slot>\n <slot />\n </unstyled-button>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CloseButtonFactory, CloseButtonProps } from './close-button.types'\nimport UnstyledButton from '../unstyled-button'\nimport CloseIcon from './close-icon.vue'\nimport classes from './close-button.module.css'\nimport { CStyleProp, useComponentProps, useStyles } from '../../core'\nimport { varsResolver } from './close-button.utils'\n\ndefineOptions({\n name: 'CCloseButton',\n})\n\ndefineSlots<{\n icon: any\n default: any\n}>()\n\nconst _root = ref<InstanceType<typeof UnstyledButton> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<CloseButtonProps>()\n\nconst defaultProps = {\n variant: 'subtle',\n} satisfies Partial<CloseButtonProps>\n\nconst props = useComponentProps({\n component: 'CCloseButton',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'iconSize',\n 'vars',\n 'radius',\n 'className',\n 'classNames',\n 'style',\n 'styles',\n 'unstyled',\n 'dataDisabled',\n 'disabled',\n 'variant',\n 'mod',\n 'attributes',\n '__staticSelector',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<CloseButtonFactory>({\n name: props.value.__staticSelector || 'CloseButton',\n props: styleProps,\n classes,\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 modList = computed(() => [\n {\n disabled: props.value.disabled || props.value.dataDisabled,\n },\n])\n\nconst rootAttrs = computed(() =>\n getStyles('root', {\n variant: props.value.variant,\n active: !props.value.disabled && !props.value.dataDisabled,\n })\n)\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCA,MAAM,QAAQ,IAAgD,IAAI;EAElE,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,eAAe,EACnB,SAAS,SACX;EAEA,MAAM,QAAQ,kBA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B,OAAA,mBAXlB,WAWkB,EAVhB,KAAI,QAAO,GACH,OAAA,aAAW;EAClB,UAAU,OAAA,MAAM,YAAY,OAAA,MAAM;EAClC,UAAU,OAAA,MAAM;EAChB,SAAS,OAAA,MAAM;;yBAIT,CAFP,WAEO,KAAA,QAAA,QAAA,CAAA,SAAA,CADL,YAAyB,OAAA,YAAA,CAAA,CAAA,GAE3B,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -339,16 +339,18 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
339
339
|
"attributes",
|
|
340
340
|
"strategy"
|
|
341
341
|
];
|
|
342
|
+
const styleProps = computed(() => ({
|
|
343
|
+
...props.value,
|
|
344
|
+
...attrs,
|
|
345
|
+
style: attrs.style ?? props.value.style
|
|
346
|
+
}));
|
|
342
347
|
const modList = computed(() => [{
|
|
343
348
|
fluid: props.value.fluid,
|
|
344
349
|
strategy: props.value.strategy
|
|
345
350
|
}]);
|
|
346
351
|
const getStyles = useStyles({
|
|
347
352
|
name: "Container",
|
|
348
|
-
props:
|
|
349
|
-
...props.value,
|
|
350
|
-
...attrs
|
|
351
|
-
},
|
|
353
|
+
props: styleProps,
|
|
352
354
|
classes: container_module_default,
|
|
353
355
|
className: props.value.className,
|
|
354
356
|
style: props.value.style,
|
|
@@ -380,6 +382,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
380
382
|
defaultProps,
|
|
381
383
|
props,
|
|
382
384
|
knownProps,
|
|
385
|
+
styleProps,
|
|
383
386
|
modList,
|
|
384
387
|
getStyles,
|
|
385
388
|
rootAttrs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.mjs","names":[],"sources":["../../../src/components/container/container.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport { ContainerFactory, ContainerProps } from './container.types'\nimport { varsResolver } from './container.utils'\nimport classes from './container.module.css'\n\ndefineOptions({\n name: 'CContainer',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ContainerProps>()\n\nconst defaultProps = {\n strategy: 'block',\n} satisfies Partial<ContainerProps>\n\nconst props = useComponentProps({\n component: 'CContainer',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'fluid',\n 'mod',\n 'attributes',\n 'strategy',\n]\n\nconst modList = computed(() => [{ fluid: props.value.fluid, strategy: props.value.strategy }])\n\nconst getStyles = useStyles<ContainerFactory>({\n name: 'Container',\n props:
|
|
1
|
+
{"version":3,"file":"container.mjs","names":[],"sources":["../../../src/components/container/container.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\">\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 { ContainerFactory, ContainerProps } from './container.types'\nimport { varsResolver } from './container.utils'\nimport classes from './container.module.css'\n\ndefineOptions({\n name: 'CContainer',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ContainerProps>()\n\nconst defaultProps = {\n strategy: 'block',\n} satisfies Partial<ContainerProps>\n\nconst props = useComponentProps({\n component: 'CContainer',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'fluid',\n 'mod',\n 'attributes',\n 'strategy',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst modList = computed(() => [{ fluid: props.value.fluid, strategy: props.value.strategy }])\n\nconst getStyles = useStyles<ContainerFactory>({\n name: 'Container',\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 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 = [\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,QAAQ,IAAsC,IAAI;EAExD,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,eAAe,EACnB,UAAU,QACZ;EAEA,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,aAAa,gBAAgB;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,UAAU,eAAe,CAAC;GAAE,OAAO,MAAM,MAAM;GAAO,UAAU,MAAM,MAAM;EAAS,CAAC,CAAC;EAE7F,MAAM,YAAY,UAA4B;GAC5C,MAAM;GACN,OAAO;GACP,SAAA;GACA,WAAW,MAAM,MAAM;GACvB,OAAO,MAAM,MAAM;GACnB,YAAY,MAAM,MAAM;GACxB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;GACxB,MAAM,MAAM,MAAM;GAClB;EACF,CAAC;EAED,MAAM,YAAY,eAAe,UAAU,MAAM,CAAC;EAElD,MAAM,kBAAkB,eAAe;GACrC,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,MAAM,eAAe,MAAM,OAAO,QAAQ,IAAI,EAChD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;qBAvFC,YAEQ,OAAA,SAFR,WAEQ,EAFD,KAAI,QAAO,GAAS,OAAA,eAAe,GAAA;yBAChC,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -356,13 +356,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
356
356
|
"attributes"
|
|
357
357
|
];
|
|
358
358
|
const modList = computed(() => [{ align: props.value.align }]);
|
|
359
|
+
const styleProps = computed(() => ({
|
|
360
|
+
...props.value,
|
|
361
|
+
...attrs,
|
|
362
|
+
style: attrs.style ?? props.value.style
|
|
363
|
+
}));
|
|
359
364
|
const getStyles = useStyles({
|
|
360
365
|
name: "EmptyState",
|
|
361
366
|
classes: empty_state_module_default,
|
|
362
|
-
props:
|
|
363
|
-
...props.value,
|
|
364
|
-
...attrs
|
|
365
|
-
},
|
|
367
|
+
props: styleProps,
|
|
366
368
|
className: props.value.className,
|
|
367
369
|
style: props.value.style,
|
|
368
370
|
classNames: props.value.classNames,
|
|
@@ -404,6 +406,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
404
406
|
props,
|
|
405
407
|
knownProps,
|
|
406
408
|
modList,
|
|
409
|
+
styleProps,
|
|
407
410
|
getStyles,
|
|
408
411
|
withIndicatorBackground,
|
|
409
412
|
hasBodyContent,
|