@cck-ui/core 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/cjs/components/empty-state/empty-state.cjs +10 -2
  2. package/cjs/components/empty-state/empty-state.cjs.map +1 -1
  3. package/cjs/components/empty-state/empty-state.module.cjs.map +1 -1
  4. package/cjs/components/semi-circle-progress/index.cjs +14 -0
  5. package/cjs/components/semi-circle-progress/index.cjs.map +1 -0
  6. package/cjs/components/semi-circle-progress/semi-circle-progress.cjs +530 -0
  7. package/cjs/components/semi-circle-progress/semi-circle-progress.cjs.map +1 -0
  8. package/cjs/components/semi-circle-progress/semi-circle-progress.module.cjs +12 -0
  9. package/cjs/components/semi-circle-progress/semi-circle-progress.module.cjs.map +1 -0
  10. package/cjs/components/semi-circle-progress/semi-circle-progress.utils.cjs +26 -0
  11. package/cjs/components/semi-circle-progress/semi-circle-progress.utils.cjs.map +1 -0
  12. package/cjs/index.cjs +20 -17
  13. package/cjs/index.cjs.map +1 -1
  14. package/esm/components/empty-state/empty-state.mjs +10 -2
  15. package/esm/components/empty-state/empty-state.mjs.map +1 -1
  16. package/esm/components/empty-state/empty-state.module.mjs.map +1 -1
  17. package/esm/components/semi-circle-progress/index.mjs +11 -0
  18. package/esm/components/semi-circle-progress/index.mjs.map +1 -0
  19. package/esm/components/semi-circle-progress/semi-circle-progress.mjs +530 -0
  20. package/esm/components/semi-circle-progress/semi-circle-progress.mjs.map +1 -0
  21. package/esm/components/semi-circle-progress/semi-circle-progress.module.mjs +12 -0
  22. package/esm/components/semi-circle-progress/semi-circle-progress.module.mjs.map +1 -0
  23. package/esm/components/semi-circle-progress/semi-circle-progress.utils.mjs +26 -0
  24. package/esm/components/semi-circle-progress/semi-circle-progress.utils.mjs.map +1 -0
  25. package/esm/index.mjs +3 -1
  26. package/esm/index.mjs.map +1 -1
  27. package/lib/components/empty-state/empty-state.types.d.ts +4 -0
  28. package/lib/components/index.d.ts +1 -0
  29. package/lib/components/semi-circle-progress/index.d.ts +6 -0
  30. package/lib/components/semi-circle-progress/semi-circle-progress.types.d.ts +57 -0
  31. package/lib/components/semi-circle-progress/semi-circle-progress.utils.d.ts +7 -0
  32. package/package.json +1 -1
  33. package/styles/empty-state.css +1 -1
  34. package/styles/empty-state.layer.css +1 -1
  35. package/styles/semi-circle-progress.css +58 -0
  36. package/styles/semi-circle-progress.layer.css +59 -0
  37. package/styles.css +60 -1
  38. package/styles.layer.css +60 -1
@@ -32,6 +32,10 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
32
32
  type: null,
33
33
  required: false
34
34
  },
35
+ order: {
36
+ type: Number,
37
+ required: false
38
+ },
35
39
  withIndicatorBackground: {
36
40
  type: Boolean,
37
41
  required: false
@@ -346,6 +350,7 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
346
350
  "align",
347
351
  "variant",
348
352
  "color",
353
+ "order",
349
354
  "withIndicatorBackground",
350
355
  "mod",
351
356
  "attributes"
@@ -427,10 +432,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
427
432
  _: 3
428
433
  })) : (0, vue.createCommentVNode)("v-if", true), $setup.hasBodyContent ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.normalizeProps)((0, vue.mergeProps)({ key: 1 }, $setup.bodyAttrs)), {
429
434
  default: (0, vue.withCtx)(() => [
430
- _ctx.$slots.title ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["EmptyStateTitle"], { key: 0 }, {
435
+ _ctx.$slots.title ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["EmptyStateTitle"], {
436
+ key: 0,
437
+ order: $setup.props.order
438
+ }, {
431
439
  default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "title")]),
432
440
  _: 3
433
- })) : (0, vue.createCommentVNode)("v-if", true),
441
+ }, 8, ["order"])) : (0, vue.createCommentVNode)("v-if", true),
434
442
  _ctx.$slots.description ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["EmptyStateDescription"], { key: 1 }, {
435
443
  default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "description")]),
436
444
  _: 3
@@ -1 +1 @@
1
- {"version":3,"file":"empty-state.cjs","names":[],"sources":["../../../src/components/empty-state/empty-state.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\" :variant=\"props.variant\">\n <empty-state-indicator v-if=\"$slots.icon\">\n <slot name=\"icon\" />\n </empty-state-indicator>\n <c-box v-if=\"hasBodyContent\" v-bind=\"bodyAttrs\">\n <empty-state-title v-if=\"$slots.title\">\n <slot name=\"title\" />\n </empty-state-title>\n <empty-state-description v-if=\"$slots.description\">\n <slot name=\"description\" />\n </empty-state-description>\n <slot />\n <empty-state-actions v-if=\"$slots.actions\">\n <slot name=\"actions\" />\n </empty-state-actions>\n </c-box>\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 { EmptyStateFactory, EmptyStateProps } from './empty-state.types'\nimport classes from './empty-state.module.css'\nimport { varsResolver } from './empty-state.utils'\nimport { provideEmptyStateContext } from './empty-state.context'\nimport EmptyStateActions from './empty-state-actions/empty-state-actions.vue'\nimport EmptyStateDescription from './empty-state-description/empty-state-description.vue'\nimport EmptyStateIndicator from './empty-state-indicator/empty-state-indicator.vue'\nimport EmptyStateTitle from './empty-state-title/empty-state-title.vue'\n\ndefineOptions({\n name: 'CEmptyState',\n})\n\ndefineSlots<{\n actions: any\n default: any\n description: any\n icon: any\n title: any\n}>()\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst rawProps = defineProps<EmptyStateProps>()\n\nconst defaultProps = {\n size: 'md',\n align: 'center',\n} satisfies Partial<EmptyStateProps>\n\nconst props = useComponentProps({\n component: 'CEmptyState',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'align',\n 'variant',\n 'color',\n 'withIndicatorBackground',\n 'mod',\n 'attributes',\n]\n\nconst modList = computed(() => [\n {\n align: props.value.align,\n },\n])\n\nconst getStyles = useStyles<EmptyStateFactory>({\n name: 'EmptyState',\n classes,\n props: { ...props.value, ...attrs } as EmptyStateProps,\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 withIndicatorBackground = computed(\n () => props.value.withIndicatorBackground || !!props.value.variant\n)\n\nprovideEmptyStateContext({\n getStyles,\n withIndicatorBackground,\n})\n\nconst hasBodyContent = computed(() => {\n return !!(slots.actions || slots.default || slots.description || slots.title)\n})\n\nconst rootAttrs = computed(() => getStyles('root', { variant: props.value.variant }))\nconst bodyAttrs = computed(() => getStyles('body'))\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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qCADG,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,OAAA,CAAA,CAAA;;;IAEQ,KAAA,OAAO,gBAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,CAEZ,OAAA,0BAAA,EAAA,KAAA,EAAA,GAAA;qCADG,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,aAAA,CAAA,CAAA;;;wBAErB,KAAA,QAAA,SAAA;IACmB,KAAA,OAAO,YAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,CAEZ,OAAA,sBAAA,EAAA,KAAA,EAAA,GAAA;qCADG,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,SAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"empty-state.cjs","names":[],"sources":["../../../src/components/empty-state/empty-state.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedRootAttrs\" :variant=\"props.variant\">\n <empty-state-indicator v-if=\"$slots.icon\">\n <slot name=\"icon\" />\n </empty-state-indicator>\n <c-box v-if=\"hasBodyContent\" v-bind=\"bodyAttrs\">\n <empty-state-title v-if=\"$slots.title\" :order=\"props.order\">\n <slot name=\"title\" />\n </empty-state-title>\n <empty-state-description v-if=\"$slots.description\">\n <slot name=\"description\" />\n </empty-state-description>\n <slot />\n <empty-state-actions v-if=\"$slots.actions\">\n <slot name=\"actions\" />\n </empty-state-actions>\n </c-box>\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 { EmptyStateFactory, EmptyStateProps } from './empty-state.types'\nimport classes from './empty-state.module.css'\nimport { varsResolver } from './empty-state.utils'\nimport { provideEmptyStateContext } from './empty-state.context'\nimport EmptyStateActions from './empty-state-actions/empty-state-actions.vue'\nimport EmptyStateDescription from './empty-state-description/empty-state-description.vue'\nimport EmptyStateIndicator from './empty-state-indicator/empty-state-indicator.vue'\nimport EmptyStateTitle from './empty-state-title/empty-state-title.vue'\n\ndefineOptions({\n name: 'CEmptyState',\n})\n\ndefineSlots<{\n actions: any\n default: any\n description: any\n icon: any\n title: any\n}>()\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst rawProps = defineProps<EmptyStateProps>()\n\nconst defaultProps = {\n size: 'md',\n align: 'center',\n} satisfies Partial<EmptyStateProps>\n\nconst props = useComponentProps({\n component: 'CEmptyState',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'align',\n 'variant',\n 'color',\n 'order',\n 'withIndicatorBackground',\n 'mod',\n 'attributes',\n]\n\nconst modList = computed(() => [\n {\n align: props.value.align,\n },\n])\n\nconst getStyles = useStyles<EmptyStateFactory>({\n name: 'EmptyState',\n classes,\n props: { ...props.value, ...attrs } as EmptyStateProps,\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 withIndicatorBackground = computed(\n () => props.value.withIndicatorBackground || !!props.value.variant\n)\n\nprovideEmptyStateContext({\n getStyles,\n withIndicatorBackground,\n})\n\nconst hasBodyContent = computed(() => {\n return !!(slots.actions || slots.default || slots.description || slots.title)\n})\n\nconst rootAttrs = computed(() => getStyles('root', { variant: props.value.variant }))\nconst bodyAttrs = computed(() => getStyles('body'))\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\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QAAA,MAAA,CAAA,CAAA;;mDAET,OAAA,mBAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,CAWL,OAAA,UAAA,GAAA,IAAA,eAAA,EAAA,GAAA,IAAA,WAAA,CAAA,EAAA,KAAA,EAAA,GAX6B,OAAA,SAAS,CAAA,GAAA;mCAGxB;IAFK,KAAA,OAAO,UAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,CAEZ,OAAA,oBAAA;;KAFoB,OAAO,OAAA,MAAM;;qCAC9B,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,OAAA,CAAA,CAAA;;;IAEQ,KAAA,OAAO,gBAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,CAEZ,OAAA,0BAAA,EAAA,KAAA,EAAA,GAAA;qCADG,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,aAAA,CAAA,CAAA;;;wBAErB,KAAA,QAAA,SAAA;IACmB,KAAA,OAAO,YAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,CAEZ,OAAA,sBAAA,EAAA,KAAA,EAAA,GAAA;qCADG,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"empty-state.module.cjs","names":[],"sources":["../../../src/components/empty-state/empty-state.module.css"],"sourcesContent":[".root {\n --empty-state-indicator-size-xs: 32px;\n --empty-state-indicator-size-sm: 40px;\n --empty-state-indicator-size-md: 48px;\n --empty-state-indicator-size-lg: 60px;\n --empty-state-indicator-size-xl: 72px;\n\n --empty-state-gap-xs: 6px;\n --empty-state-gap-sm: 8px;\n --empty-state-gap-md: 10px;\n --empty-state-gap-lg: 12px;\n --empty-state-gap-xl: 16px;\n\n --empty-state-title-fz-xs: var(--c-font-size-sm);\n --empty-state-title-fz-sm: var(--c-font-size-md);\n --empty-state-title-fz-md: var(--c-font-size-lg);\n --empty-state-title-fz-lg: var(--c-font-size-xl);\n --empty-state-title-fz-xl: calc(var(--c-font-size-xl) * 1.2);\n\n --empty-state-description-fz-xs: var(--c-font-size-xs);\n --empty-state-description-fz-sm: var(--c-font-size-sm);\n --empty-state-description-fz-md: var(--c-font-size-sm);\n --empty-state-description-fz-lg: var(--c-font-size-md);\n --empty-state-description-fz-xl: var(--c-font-size-lg);\n\n display: flex;\n gap: var(--empty-state-gap, var(--empty-state-gap-md));\n\n &[data-align='center'] {\n flex-direction: column;\n align-items: center;\n }\n\n &[data-align='left'] {\n flex-direction: row;\n align-items: flex-start;\n }\n\n &[data-align='right'] {\n flex-direction: row-reverse;\n align-items: flex-start;\n }\n}\n\n.body {\n display: flex;\n flex-direction: column;\n gap: var(--empty-state-gap, var(--empty-state-gap-md));\n min-width: 0;\n\n [data-align='center'] > & {\n align-items: center;\n text-align: center;\n }\n\n [data-align='left'] > & {\n align-items: flex-start;\n text-align: left;\n }\n\n [data-align='right'] > & {\n align-items: flex-end;\n text-align: right;\n }\n}\n\n.indicator {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: var(--emtpy-state-indicator-color, var(--c-color-dimmed));\n font-size: var(--empty-state-indicator-size, var(--empty-state-indicator-size-md));\n line-height: 1;\n\n & > svg {\n width: 1em;\n height: 1em;\n }\n\n &[data-with-background] {\n @mixin light {\n --empty-state-indicator-default-bg: var(--c-color-gray-1);\n }\n\n @mixin dark {\n --empty-state-indicator-default-bg: var(--c-color-dark-6);\n }\n\n width: 2em;\n height: 2em;\n border-radius: 1000px;\n background-color: var(--empty-state-indicator-bg, var(--empty-state-indicator-default-bg));\n }\n}\n\n.title {\n font-size: var(--empty-state-title-fz, var(--empty-state-title-fz-md));\n font-weight: 600;\n line-height: 1.3;\n color: var(--c-color-bright);\n margin: 0;\n text-wrap: balance;\n}\n\n.description {\n font-size: var(--empty-state-description-fz, var(--empty-state-description-fz-md));\n line-height: 1.55;\n color: var(--c-color-dimmed);\n margin: 0;\n max-width: 32rem;\n text-wrap: pretty;\n}\n\n.actions {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--c-spacing-sm);\n}\n"],"mappings":";;AAAA,IAAA,6BAAe;CAAC,QAAO;CAAa,QAAO;CAAa,aAAY;CAAY,SAAQ;CAAa,eAAc;CAAa,WAAU;AAAY"}
1
+ {"version":3,"file":"empty-state.module.cjs","names":[],"sources":["../../../src/components/empty-state/empty-state.module.css"],"sourcesContent":[".root {\n --empty-state-indicator-size-xs: 32px;\n --empty-state-indicator-size-sm: 40px;\n --empty-state-indicator-size-md: 48px;\n --empty-state-indicator-size-lg: 60px;\n --empty-state-indicator-size-xl: 72px;\n\n --empty-state-gap-xs: 6px;\n --empty-state-gap-sm: 8px;\n --empty-state-gap-md: 10px;\n --empty-state-gap-lg: 12px;\n --empty-state-gap-xl: 16px;\n\n --empty-state-title-fz-xs: var(--c-font-size-sm);\n --empty-state-title-fz-sm: var(--c-font-size-md);\n --empty-state-title-fz-md: var(--c-font-size-lg);\n --empty-state-title-fz-lg: var(--c-font-size-xl);\n --empty-state-title-fz-xl: calc(var(--c-font-size-xl) * 1.2);\n\n --empty-state-description-fz-xs: var(--c-font-size-xs);\n --empty-state-description-fz-sm: var(--c-font-size-sm);\n --empty-state-description-fz-md: var(--c-font-size-sm);\n --empty-state-description-fz-lg: var(--c-font-size-md);\n --empty-state-description-fz-xl: var(--c-font-size-lg);\n\n display: flex;\n gap: var(--empty-state-gap, var(--empty-state-gap-md));\n\n &[data-align='center'] {\n flex-direction: column;\n align-items: center;\n }\n\n &[data-align='left'] {\n flex-direction: row;\n align-items: flex-start;\n }\n\n &[data-align='right'] {\n flex-direction: row-reverse;\n align-items: flex-start;\n }\n}\n\n.body {\n display: flex;\n flex-direction: column;\n gap: var(--empty-state-gap, var(--empty-state-gap-md));\n min-width: 0;\n\n [data-align='center'] > & {\n align-items: center;\n text-align: center;\n }\n\n [data-align='left'] > & {\n align-items: flex-start;\n text-align: left;\n }\n\n [data-align='right'] > & {\n align-items: flex-end;\n text-align: right;\n }\n}\n\n.indicator {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: var(--empty-state-indicator-color, var(--c-color-dimmed));\n font-size: var(--empty-state-indicator-size, var(--empty-state-indicator-size-md));\n line-height: 1;\n\n & > svg {\n width: 1em;\n height: 1em;\n }\n\n &[data-with-background] {\n @mixin light {\n --empty-state-indicator-default-bg: var(--c-color-gray-1);\n }\n\n @mixin dark {\n --empty-state-indicator-default-bg: var(--c-color-dark-6);\n }\n\n width: 2em;\n height: 2em;\n border-radius: 1000px;\n background-color: var(--empty-state-indicator-bg, var(--empty-state-indicator-default-bg));\n }\n}\n\n.title {\n font-size: var(--empty-state-title-fz, var(--empty-state-title-fz-md));\n font-weight: 600;\n line-height: 1.3;\n color: var(--c-color-bright);\n margin: 0;\n text-wrap: balance;\n}\n\n.description {\n font-size: var(--empty-state-description-fz, var(--empty-state-description-fz-md));\n line-height: 1.55;\n color: var(--c-color-dimmed);\n margin: 0;\n max-width: 32rem;\n text-wrap: pretty;\n}\n\n.actions {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--c-spacing-sm);\n}\n"],"mappings":";;AAAA,IAAA,6BAAe;CAAC,QAAO;CAAa,QAAO;CAAa,aAAY;CAAY,SAAQ;CAAa,eAAc;CAAa,WAAU;AAAY"}
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ const require_install = require("../../core/utils/vue/install.cjs");
3
+ const require_statics = require("../../core/utils/vue/statics.cjs");
4
+ const require_semi_circle_progress_module = require("./semi-circle-progress.module.cjs");
5
+ const require_semi_circle_progress_utils = require("./semi-circle-progress.utils.cjs");
6
+ const require_semi_circle_progress = require("./semi-circle-progress.cjs");
7
+ //#region packages/@cck-ui/core/src/components/semi-circle-progress/index.ts
8
+ const SemiCircleProgressWithStatic = require_statics.withPropsFactory(require_statics.withExtend(require_statics.withVarsResolver(require_statics.withClasses(require_semi_circle_progress.default, require_semi_circle_progress_module.default), require_semi_circle_progress_utils.varsResolver)));
9
+ const CSemiCircleProgress = require_install.withInstall(SemiCircleProgressWithStatic);
10
+ //#endregion
11
+ exports.CSemiCircleProgress = CSemiCircleProgress;
12
+ exports.default = CSemiCircleProgress;
13
+
14
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["withPropsFactory","withExtend","withVarsResolver","withClasses","SemiCircleProgress","classes","varsResolver","withInstall"],"sources":["../../../src/components/semi-circle-progress/index.ts"],"sourcesContent":["import SemiCircleProgress from './semi-circle-progress.vue'\nimport classes from './semi-circle-progress.module.css'\nimport { varsResolver } from './semi-circle-progress.utils'\nimport {\n SFCWithInstallAndClasses,\n withClasses,\n withExtend,\n withInstall,\n withPropsFactory,\n withVarsResolver,\n} from '../../core'\n\nconst SemiCircleProgressWithStatic = withPropsFactory(\n withExtend(withVarsResolver(withClasses(SemiCircleProgress, classes), varsResolver))\n)\n\nexport const CSemiCircleProgress: SFCWithInstallAndClasses<\n typeof SemiCircleProgress,\n typeof classes\n> = withInstall(SemiCircleProgressWithStatic)\n\nexport default CSemiCircleProgress\n\nexport * from './semi-circle-progress.types'\n"],"mappings":";;;;;;;AAYA,MAAM,+BAA+BA,gBAAAA,iBACnCC,gBAAAA,WAAWC,gBAAAA,iBAAiBC,gBAAAA,YAAYC,6BAAAA,SAAoBC,oCAAAA,OAAO,GAAGC,mCAAAA,YAAY,CAAC,CACrF;AAEA,MAAa,sBAGTC,gBAAAA,YAAY,4BAA4B"}
@@ -0,0 +1,530 @@
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
+ const require_index = require("../../core/box/index.cjs");
5
+ const require_use_styles = require("../../core/styles-api/use-styles/use-styles.cjs");
6
+ const require_semi_circle_progress_module = require("./semi-circle-progress.module.cjs");
7
+ const require_semi_circle_progress_utils = require("./semi-circle-progress.utils.cjs");
8
+ let es_toolkit = require("es-toolkit");
9
+ let vue = require("vue");
10
+ //#region packages/@cck-ui/core/src/components/semi-circle-progress/semi-circle-progress.vue
11
+ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
12
+ name: "CSemiCircleProgress",
13
+ __name: "semi-circle-progress",
14
+ props: {
15
+ value: {
16
+ type: Number,
17
+ required: true
18
+ },
19
+ size: {
20
+ type: Number,
21
+ required: false
22
+ },
23
+ thickness: {
24
+ type: Number,
25
+ required: false
26
+ },
27
+ orientation: {
28
+ type: String,
29
+ required: false
30
+ },
31
+ fillDirection: {
32
+ type: String,
33
+ required: false
34
+ },
35
+ filledSegmentColor: {
36
+ type: null,
37
+ required: false
38
+ },
39
+ emptySegmentColor: {
40
+ type: null,
41
+ required: false
42
+ },
43
+ transitionDuration: {
44
+ type: Number,
45
+ required: false
46
+ },
47
+ labelPosition: {
48
+ type: String,
49
+ required: false
50
+ },
51
+ className: {
52
+ type: String,
53
+ required: false
54
+ },
55
+ style: {
56
+ type: [
57
+ Object,
58
+ Function,
59
+ Array
60
+ ],
61
+ required: false,
62
+ skipCheck: true
63
+ },
64
+ __vars: {
65
+ type: null,
66
+ required: false
67
+ },
68
+ __size: {
69
+ type: String,
70
+ required: false
71
+ },
72
+ hiddenFrom: {
73
+ type: null,
74
+ required: false
75
+ },
76
+ visibleFrom: {
77
+ type: null,
78
+ required: false
79
+ },
80
+ lightHidden: {
81
+ type: Boolean,
82
+ required: false
83
+ },
84
+ darkHidden: {
85
+ type: Boolean,
86
+ required: false
87
+ },
88
+ mod: {
89
+ type: [
90
+ Object,
91
+ String,
92
+ Array
93
+ ],
94
+ required: false
95
+ },
96
+ m: {
97
+ type: null,
98
+ required: false
99
+ },
100
+ my: {
101
+ type: null,
102
+ required: false
103
+ },
104
+ mx: {
105
+ type: null,
106
+ required: false
107
+ },
108
+ mt: {
109
+ type: null,
110
+ required: false
111
+ },
112
+ mb: {
113
+ type: null,
114
+ required: false
115
+ },
116
+ ms: {
117
+ type: null,
118
+ required: false
119
+ },
120
+ me: {
121
+ type: null,
122
+ required: false
123
+ },
124
+ mis: {
125
+ type: null,
126
+ required: false
127
+ },
128
+ mie: {
129
+ type: null,
130
+ required: false
131
+ },
132
+ ml: {
133
+ type: null,
134
+ required: false
135
+ },
136
+ mr: {
137
+ type: null,
138
+ required: false
139
+ },
140
+ p: {
141
+ type: null,
142
+ required: false
143
+ },
144
+ py: {
145
+ type: null,
146
+ required: false
147
+ },
148
+ px: {
149
+ type: null,
150
+ required: false
151
+ },
152
+ pt: {
153
+ type: null,
154
+ required: false
155
+ },
156
+ pb: {
157
+ type: null,
158
+ required: false
159
+ },
160
+ ps: {
161
+ type: null,
162
+ required: false
163
+ },
164
+ pe: {
165
+ type: null,
166
+ required: false
167
+ },
168
+ pis: {
169
+ type: null,
170
+ required: false
171
+ },
172
+ pie: {
173
+ type: null,
174
+ required: false
175
+ },
176
+ pl: {
177
+ type: null,
178
+ required: false
179
+ },
180
+ pr: {
181
+ type: null,
182
+ required: false
183
+ },
184
+ bd: {
185
+ type: null,
186
+ required: false
187
+ },
188
+ bdrs: {
189
+ type: null,
190
+ required: false
191
+ },
192
+ bg: {
193
+ type: null,
194
+ required: false
195
+ },
196
+ c: {
197
+ type: null,
198
+ required: false
199
+ },
200
+ opacity: {
201
+ type: [
202
+ String,
203
+ Object,
204
+ Number
205
+ ],
206
+ required: false
207
+ },
208
+ ff: {
209
+ type: [String, Object],
210
+ required: false
211
+ },
212
+ fz: {
213
+ type: null,
214
+ required: false
215
+ },
216
+ fw: {
217
+ type: null,
218
+ required: false
219
+ },
220
+ lts: {
221
+ type: null,
222
+ required: false
223
+ },
224
+ ta: {
225
+ type: [String, Object],
226
+ required: false
227
+ },
228
+ lh: {
229
+ type: null,
230
+ required: false
231
+ },
232
+ fs: {
233
+ type: null,
234
+ required: false
235
+ },
236
+ tt: {
237
+ type: [String, Object],
238
+ required: false
239
+ },
240
+ td: {
241
+ type: null,
242
+ required: false
243
+ },
244
+ w: {
245
+ type: null,
246
+ required: false
247
+ },
248
+ miw: {
249
+ type: null,
250
+ required: false
251
+ },
252
+ maw: {
253
+ type: null,
254
+ required: false
255
+ },
256
+ h: {
257
+ type: null,
258
+ required: false
259
+ },
260
+ mih: {
261
+ type: null,
262
+ required: false
263
+ },
264
+ mah: {
265
+ type: null,
266
+ required: false
267
+ },
268
+ bgsz: {
269
+ type: null,
270
+ required: false
271
+ },
272
+ bgp: {
273
+ type: null,
274
+ required: false
275
+ },
276
+ bgr: {
277
+ type: null,
278
+ required: false
279
+ },
280
+ bga: {
281
+ type: null,
282
+ required: false
283
+ },
284
+ pos: {
285
+ type: [String, Object],
286
+ required: false
287
+ },
288
+ top: {
289
+ type: null,
290
+ required: false
291
+ },
292
+ left: {
293
+ type: null,
294
+ required: false
295
+ },
296
+ bottom: {
297
+ type: null,
298
+ required: false
299
+ },
300
+ right: {
301
+ type: null,
302
+ required: false
303
+ },
304
+ inset: {
305
+ type: null,
306
+ required: false
307
+ },
308
+ display: {
309
+ type: null,
310
+ required: false
311
+ },
312
+ flex: {
313
+ type: null,
314
+ required: false
315
+ },
316
+ unstyled: {
317
+ type: Boolean,
318
+ required: false
319
+ },
320
+ variant: {
321
+ type: null,
322
+ required: false
323
+ },
324
+ classNames: {
325
+ type: null,
326
+ required: false
327
+ },
328
+ styles: {
329
+ type: null,
330
+ required: false
331
+ },
332
+ vars: {
333
+ type: Function,
334
+ required: false
335
+ },
336
+ attributes: {
337
+ type: null,
338
+ required: false
339
+ }
340
+ },
341
+ setup(__props, { expose: __expose }) {
342
+ const rawProps = __props;
343
+ const _root = (0, vue.ref)(null);
344
+ const attrs = (0, vue.useAttrs)();
345
+ const defaultProps = {
346
+ size: 200,
347
+ thickness: 12,
348
+ orientation: "up",
349
+ fillDirection: "left-to-right",
350
+ labelPosition: "bottom"
351
+ };
352
+ const props = require_use_component_props.useComponentProps({
353
+ component: "CSemiCircleProgress",
354
+ defaultProps,
355
+ props: rawProps
356
+ });
357
+ const knownProps = [
358
+ "classNames",
359
+ "className",
360
+ "style",
361
+ "styles",
362
+ "unstyled",
363
+ "vars",
364
+ "size",
365
+ "thickness",
366
+ "value",
367
+ "orientation",
368
+ "fillDirection",
369
+ "filledSegmentColor",
370
+ "emptySegmentColor",
371
+ "transitionDuration",
372
+ "label",
373
+ "labelPosition",
374
+ "attributes"
375
+ ];
376
+ const getStyles = require_use_styles.useStyles({
377
+ name: "SemiCircleProgress",
378
+ props: {
379
+ ...props.value,
380
+ ...attrs
381
+ },
382
+ classes: require_semi_circle_progress_module.default,
383
+ className: props.value.className,
384
+ style: props.value.style,
385
+ classNames: props.value.classNames,
386
+ styles: props.value.styles,
387
+ unstyled: props.value.unstyled,
388
+ attributes: props.value.attributes,
389
+ vars: props.value.vars,
390
+ varsResolver: require_semi_circle_progress_utils.varsResolver
391
+ });
392
+ const coordinateForCircle = (0, vue.computed)(() => props.value.size / 2);
393
+ const radius = (0, vue.computed)(() => (props.value.size - 2 * props.value.thickness) / 2);
394
+ const circumference = (0, vue.computed)(() => Math.PI * radius.value);
395
+ const semiCirclePercentage = (0, vue.computed)(() => (0, es_toolkit.clamp)(props.value.value, 0, 100) * (circumference.value / 100));
396
+ const rootAttrs = (0, vue.computed)(() => getStyles("root"));
397
+ const labelAttrs = (0, vue.computed)(() => getStyles("label"));
398
+ const svgAttrs = (0, vue.computed)(() => {
399
+ const { className, style, ...rest } = getStyles("svg");
400
+ return {
401
+ className,
402
+ style,
403
+ rest
404
+ };
405
+ });
406
+ const emptySegmentAttrs = (0, vue.computed)(() => {
407
+ const { className, style, ...rest } = getStyles("emptySegment", { style: { strokeDashoffset: circumference.value } });
408
+ return {
409
+ className,
410
+ style,
411
+ rest
412
+ };
413
+ });
414
+ const filledSegmentAttrs = (0, vue.computed)(() => {
415
+ const { className, style, ...rest } = getStyles("filledSegment", { style: {
416
+ strokeDashoffset: semiCirclePercentage.value,
417
+ ...semiCirclePercentage.value === 0 ? { strokeOpacity: 0 } : null
418
+ } });
419
+ return {
420
+ className,
421
+ style,
422
+ rest
423
+ };
424
+ });
425
+ const mergedRootAttrs = (0, vue.computed)(() => {
426
+ const others = {};
427
+ const propsValue = props.value;
428
+ for (const key in propsValue) if (!knownProps.includes(key)) others[key] = propsValue[key];
429
+ const userMod = props.value.mod;
430
+ const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)];
431
+ return {
432
+ ...others,
433
+ mod: mergedMod,
434
+ ...rootAttrs.value
435
+ };
436
+ });
437
+ __expose({ root: (0, vue.computed)(() => _root.value?.root ?? null) });
438
+ const __returned__ = {
439
+ rawProps,
440
+ _root,
441
+ attrs,
442
+ defaultProps,
443
+ props,
444
+ knownProps,
445
+ getStyles,
446
+ coordinateForCircle,
447
+ radius,
448
+ circumference,
449
+ semiCirclePercentage,
450
+ rootAttrs,
451
+ labelAttrs,
452
+ svgAttrs,
453
+ emptySegmentAttrs,
454
+ filledSegmentAttrs,
455
+ mergedRootAttrs,
456
+ get CBox() {
457
+ return require_index.CBox;
458
+ }
459
+ };
460
+ Object.defineProperty(__returned__, "__isScriptSetup", {
461
+ enumerable: false,
462
+ value: true
463
+ });
464
+ return __returned__;
465
+ }
466
+ });
467
+ const _hoisted_1 = [
468
+ "width",
469
+ "height",
470
+ "viewBox"
471
+ ];
472
+ const _hoisted_2 = [
473
+ "cx",
474
+ "cy",
475
+ "r",
476
+ "stroke-width",
477
+ "stroke-dasharray"
478
+ ];
479
+ const _hoisted_3 = [
480
+ "cx",
481
+ "cy",
482
+ "r",
483
+ "stroke-width",
484
+ "stroke-dasharray"
485
+ ];
486
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
487
+ return (0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({ ref: "_root" }, $setup.mergedRootAttrs, { size: $setup.props.size }), {
488
+ default: (0, vue.withCtx)(() => [_ctx.$slots.label ? ((0, vue.openBlock)(), (0, vue.createBlock)($setup["CBox"], (0, vue.mergeProps)({ key: 0 }, $setup.labelAttrs, {
489
+ "data-position": $setup.props.labelPosition,
490
+ "data-orientation": $setup.props.orientation
491
+ }), {
492
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "label")]),
493
+ _: 3
494
+ }, 16, ["data-position", "data-orientation"])) : (0, vue.createCommentVNode)("v-if", true), ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", (0, vue.mergeProps)($setup.svgAttrs.rest, {
495
+ class: $setup.svgAttrs.className,
496
+ style: $setup.svgAttrs.style,
497
+ width: $setup.props.size,
498
+ height: $setup.props.size / 2,
499
+ viewBox: `0 0 ${$setup.props.size} ${$setup.props.size / 2}`
500
+ }), [(0, vue.createElementVNode)("circle", (0, vue.mergeProps)({
501
+ fill: "none",
502
+ stroke: "var(--scp-empty-segment-color)"
503
+ }, $setup.emptySegmentAttrs.rest, {
504
+ class: $setup.emptySegmentAttrs.className,
505
+ style: $setup.emptySegmentAttrs.style,
506
+ cx: $setup.coordinateForCircle,
507
+ cy: $setup.coordinateForCircle,
508
+ r: $setup.radius,
509
+ "stroke-width": $setup.props.thickness,
510
+ "stroke-dasharray": $setup.circumference
511
+ }), null, 16, _hoisted_2), (0, vue.createElementVNode)("circle", (0, vue.mergeProps)({
512
+ fill: "none",
513
+ stroke: "var(--scp-filled-segment-color)"
514
+ }, $setup.filledSegmentAttrs.rest, {
515
+ class: $setup.filledSegmentAttrs.className,
516
+ style: $setup.filledSegmentAttrs.style,
517
+ cx: $setup.coordinateForCircle,
518
+ cy: $setup.coordinateForCircle,
519
+ r: $setup.radius,
520
+ "stroke-width": $setup.props.thickness,
521
+ "stroke-dasharray": $setup.circumference
522
+ }), null, 16, _hoisted_3)], 16, _hoisted_1))]),
523
+ _: 3
524
+ }, 16, ["size"]);
525
+ }
526
+ var semi_circle_progress_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/semi-circle-progress/semi-circle-progress.vue"]]);
527
+ //#endregion
528
+ exports.default = semi_circle_progress_default;
529
+
530
+ //# sourceMappingURL=semi-circle-progress.cjs.map
@@ -0,0 +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, 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 getStyles = useStyles<SemiCircleProgressFactory>({\n name: 'SemiCircleProgress',\n props: { ...props.value, ...attrs } as SemiCircleProgressProps,\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,YAAY,mBAAA,UAAqC;GACrD,MAAM;GACN,OAAO;I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,KAAI,GAAI,OAAA,MAAM,OAAI;mCAavC,WAAA,GAAA,IAAA,WAAA,CAAA;GAVA,MAAK;GACL,QAAO;KACC,OAAA,kBAAkB,MAAI;GAC7B,OAAO,OAAA,kBAAkB;GACzB,OAAO,OAAA,kBAAkB;GACzB,IAAI,OAAA;GACJ,IAAI,OAAA;GACJ,GAAG,OAAA;GACH,gBAAc,OAAA,MAAM;GACpB,oBAAkB,OAAA;yDAcnB,WAAA,GAAA,IAAA,WAAA,CAAA;GAVA,MAAK;GACL,QAAO;KACC,OAAA,mBAAmB,MAAI;GAC9B,OAAO,OAAA,mBAAmB;GAC1B,OAAO,OAAA,mBAAmB;GAC1B,IAAI,OAAA;GACJ,IAAI,OAAA;GACJ,GAAG,OAAA;GACH,gBAAc,OAAA,MAAM;GACpB,oBAAkB,OAAA"}
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ //#region packages/@cck-ui/core/src/components/semi-circle-progress/semi-circle-progress.module.css
3
+ var semi_circle_progress_module_default = {
4
+ "root": "m_6f2f9f44",
5
+ "svg": "m_8ff94bc2",
6
+ "filledSegment": "m_e500074f",
7
+ "label": "m_76692cd2"
8
+ };
9
+ //#endregion
10
+ exports.default = semi_circle_progress_module_default;
11
+
12
+ //# sourceMappingURL=semi-circle-progress.module.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semi-circle-progress.module.cjs","names":[],"sources":["../../../src/components/semi-circle-progress/semi-circle-progress.module.css"],"sourcesContent":[".root {\n --scp-filled-segment-color: var(--c-primary-color-filled);\n --scp-transition-duration: 0ms;\n --scp-thickness: 12px;\n\n @mixin where-light {\n --scp-empty-segment-color: var(--c-color-gray-2);\n }\n\n @mixin where-dark {\n --scp-empty-segment-color: var(--c-color-dark-4);\n }\n\n position: relative;\n width: fit-content;\n}\n\n.svg {\n display: block;\n transform: var(--scp-rotation);\n overflow: hidden;\n}\n\n.filledSegment {\n transition:\n stroke-dashoffset var(--scp-transition-duration) ease,\n stroke-dasharray var(--scp-transition-duration) ease,\n stroke-opacity var(--scp-transition-duration) ease,\n stroke var(--scp-transition-duration);\n}\n\n.label {\n position: absolute;\n margin: 0;\n padding: 0;\n inset-inline: 0;\n text-align: center;\n z-index: 1;\n\n &:where([data-position='bottom']) {\n bottom: 0;\n padding-inline: calc(var(--scp-thickness) * 2);\n\n &:where([data-orientation='down']) {\n bottom: auto;\n top: 0;\n }\n }\n\n &:where([data-position='center']) {\n top: 50%;\n transform: translateY(-50%);\n padding-inline: calc(var(--scp-thickness) * 3);\n }\n}\n"],"mappings":";;AAAA,IAAA,sCAAe;CAAC,QAAO;CAAa,OAAM;CAAa,iBAAgB;CAAa,SAAQ;AAAY"}