@cck-ui/core 0.14.1 → 0.16.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 (50) hide show
  1. package/cjs/components/semi-circle-progress/index.cjs +14 -0
  2. package/cjs/components/semi-circle-progress/index.cjs.map +1 -0
  3. package/cjs/components/semi-circle-progress/semi-circle-progress.cjs +530 -0
  4. package/cjs/components/semi-circle-progress/semi-circle-progress.cjs.map +1 -0
  5. package/cjs/components/semi-circle-progress/semi-circle-progress.module.cjs +12 -0
  6. package/cjs/components/semi-circle-progress/semi-circle-progress.module.cjs.map +1 -0
  7. package/cjs/components/semi-circle-progress/semi-circle-progress.utils.cjs +26 -0
  8. package/cjs/components/semi-circle-progress/semi-circle-progress.utils.cjs.map +1 -0
  9. package/cjs/components/skeleton/index.cjs +14 -0
  10. package/cjs/components/skeleton/index.cjs.map +1 -0
  11. package/cjs/components/skeleton/skeleton.cjs +416 -0
  12. package/cjs/components/skeleton/skeleton.cjs.map +1 -0
  13. package/cjs/components/skeleton/skeleton.module.cjs +10 -0
  14. package/cjs/components/skeleton/skeleton.module.cjs.map +1 -0
  15. package/cjs/components/skeleton/skeleton.utils.cjs +13 -0
  16. package/cjs/components/skeleton/skeleton.utils.cjs.map +1 -0
  17. package/cjs/index.cjs +23 -17
  18. package/cjs/index.cjs.map +1 -1
  19. package/esm/components/semi-circle-progress/index.mjs +11 -0
  20. package/esm/components/semi-circle-progress/index.mjs.map +1 -0
  21. package/esm/components/semi-circle-progress/semi-circle-progress.mjs +530 -0
  22. package/esm/components/semi-circle-progress/semi-circle-progress.mjs.map +1 -0
  23. package/esm/components/semi-circle-progress/semi-circle-progress.module.mjs +12 -0
  24. package/esm/components/semi-circle-progress/semi-circle-progress.module.mjs.map +1 -0
  25. package/esm/components/semi-circle-progress/semi-circle-progress.utils.mjs +26 -0
  26. package/esm/components/semi-circle-progress/semi-circle-progress.utils.mjs.map +1 -0
  27. package/esm/components/skeleton/index.mjs +11 -0
  28. package/esm/components/skeleton/index.mjs.map +1 -0
  29. package/esm/components/skeleton/skeleton.mjs +416 -0
  30. package/esm/components/skeleton/skeleton.mjs.map +1 -0
  31. package/esm/components/skeleton/skeleton.module.mjs +10 -0
  32. package/esm/components/skeleton/skeleton.module.mjs.map +1 -0
  33. package/esm/components/skeleton/skeleton.utils.mjs +14 -0
  34. package/esm/components/skeleton/skeleton.utils.mjs.map +1 -0
  35. package/esm/index.mjs +5 -1
  36. package/esm/index.mjs.map +1 -1
  37. package/lib/components/index.d.ts +2 -0
  38. package/lib/components/semi-circle-progress/index.d.ts +6 -0
  39. package/lib/components/semi-circle-progress/semi-circle-progress.types.d.ts +57 -0
  40. package/lib/components/semi-circle-progress/semi-circle-progress.utils.d.ts +7 -0
  41. package/lib/components/skeleton/index.d.ts +6 -0
  42. package/lib/components/skeleton/skeleton.types.d.ts +44 -0
  43. package/lib/components/skeleton/skeleton.utils.d.ts +6 -0
  44. package/package.json +1 -1
  45. package/styles/semi-circle-progress.css +58 -0
  46. package/styles/semi-circle-progress.layer.css +59 -0
  47. package/styles/skeleton.css +50 -0
  48. package/styles/skeleton.layer.css +51 -0
  49. package/styles.css +110 -0
  50. package/styles.layer.css +110 -0
@@ -0,0 +1,416 @@
1
+ "use client";
2
+ import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.mjs";
3
+ import { useComponentProps } from "../../core/config-provider/use-component-props/use-component-props.mjs";
4
+ import { CBox } from "../../core/box/index.mjs";
5
+ import { useStyles } from "../../core/styles-api/use-styles/use-styles.mjs";
6
+ import skeleton_module_default from "./skeleton.module.mjs";
7
+ import { varsResolver } from "./skeleton.utils.mjs";
8
+ import { computed, createBlock, defineComponent, mergeProps, openBlock, ref, renderSlot, useAttrs, withCtx } from "vue";
9
+ //#region packages/@cck-ui/core/src/components/skeleton/skeleton.vue
10
+ const _sfc_main = /*@__PURE__*/ defineComponent({
11
+ name: "CSkeleton",
12
+ __name: "skeleton",
13
+ props: {
14
+ visible: {
15
+ type: Boolean,
16
+ required: false,
17
+ default: true
18
+ },
19
+ height: {
20
+ type: null,
21
+ required: false
22
+ },
23
+ width: {
24
+ type: null,
25
+ required: false
26
+ },
27
+ circle: {
28
+ type: Boolean,
29
+ required: false
30
+ },
31
+ radius: {
32
+ type: null,
33
+ required: false
34
+ },
35
+ animate: {
36
+ type: Boolean,
37
+ required: false,
38
+ default: true
39
+ },
40
+ className: {
41
+ type: String,
42
+ required: false
43
+ },
44
+ style: {
45
+ type: [
46
+ Object,
47
+ Function,
48
+ Array
49
+ ],
50
+ required: false,
51
+ skipCheck: true
52
+ },
53
+ __vars: {
54
+ type: null,
55
+ required: false
56
+ },
57
+ __size: {
58
+ type: String,
59
+ required: false
60
+ },
61
+ hiddenFrom: {
62
+ type: null,
63
+ required: false
64
+ },
65
+ visibleFrom: {
66
+ type: null,
67
+ required: false
68
+ },
69
+ lightHidden: {
70
+ type: Boolean,
71
+ required: false
72
+ },
73
+ darkHidden: {
74
+ type: Boolean,
75
+ required: false
76
+ },
77
+ mod: {
78
+ type: [
79
+ Object,
80
+ String,
81
+ Array
82
+ ],
83
+ required: false
84
+ },
85
+ m: {
86
+ type: null,
87
+ required: false
88
+ },
89
+ my: {
90
+ type: null,
91
+ required: false
92
+ },
93
+ mx: {
94
+ type: null,
95
+ required: false
96
+ },
97
+ mt: {
98
+ type: null,
99
+ required: false
100
+ },
101
+ mb: {
102
+ type: null,
103
+ required: false
104
+ },
105
+ ms: {
106
+ type: null,
107
+ required: false
108
+ },
109
+ me: {
110
+ type: null,
111
+ required: false
112
+ },
113
+ mis: {
114
+ type: null,
115
+ required: false
116
+ },
117
+ mie: {
118
+ type: null,
119
+ required: false
120
+ },
121
+ ml: {
122
+ type: null,
123
+ required: false
124
+ },
125
+ mr: {
126
+ type: null,
127
+ required: false
128
+ },
129
+ p: {
130
+ type: null,
131
+ required: false
132
+ },
133
+ py: {
134
+ type: null,
135
+ required: false
136
+ },
137
+ px: {
138
+ type: null,
139
+ required: false
140
+ },
141
+ pt: {
142
+ type: null,
143
+ required: false
144
+ },
145
+ pb: {
146
+ type: null,
147
+ required: false
148
+ },
149
+ ps: {
150
+ type: null,
151
+ required: false
152
+ },
153
+ pe: {
154
+ type: null,
155
+ required: false
156
+ },
157
+ pis: {
158
+ type: null,
159
+ required: false
160
+ },
161
+ pie: {
162
+ type: null,
163
+ required: false
164
+ },
165
+ pl: {
166
+ type: null,
167
+ required: false
168
+ },
169
+ pr: {
170
+ type: null,
171
+ required: false
172
+ },
173
+ bd: {
174
+ type: null,
175
+ required: false
176
+ },
177
+ bdrs: {
178
+ type: null,
179
+ required: false
180
+ },
181
+ bg: {
182
+ type: null,
183
+ required: false
184
+ },
185
+ c: {
186
+ type: null,
187
+ required: false
188
+ },
189
+ opacity: {
190
+ type: [
191
+ String,
192
+ Object,
193
+ Number
194
+ ],
195
+ required: false
196
+ },
197
+ ff: {
198
+ type: [String, Object],
199
+ required: false
200
+ },
201
+ fz: {
202
+ type: null,
203
+ required: false
204
+ },
205
+ fw: {
206
+ type: null,
207
+ required: false
208
+ },
209
+ lts: {
210
+ type: null,
211
+ required: false
212
+ },
213
+ ta: {
214
+ type: [String, Object],
215
+ required: false
216
+ },
217
+ lh: {
218
+ type: null,
219
+ required: false
220
+ },
221
+ fs: {
222
+ type: null,
223
+ required: false
224
+ },
225
+ tt: {
226
+ type: [String, Object],
227
+ required: false
228
+ },
229
+ td: {
230
+ type: null,
231
+ required: false
232
+ },
233
+ w: {
234
+ type: null,
235
+ required: false
236
+ },
237
+ miw: {
238
+ type: null,
239
+ required: false
240
+ },
241
+ maw: {
242
+ type: null,
243
+ required: false
244
+ },
245
+ h: {
246
+ type: null,
247
+ required: false
248
+ },
249
+ mih: {
250
+ type: null,
251
+ required: false
252
+ },
253
+ mah: {
254
+ type: null,
255
+ required: false
256
+ },
257
+ bgsz: {
258
+ type: null,
259
+ required: false
260
+ },
261
+ bgp: {
262
+ type: null,
263
+ required: false
264
+ },
265
+ bgr: {
266
+ type: null,
267
+ required: false
268
+ },
269
+ bga: {
270
+ type: null,
271
+ required: false
272
+ },
273
+ pos: {
274
+ type: [String, Object],
275
+ required: false
276
+ },
277
+ top: {
278
+ type: null,
279
+ required: false
280
+ },
281
+ left: {
282
+ type: null,
283
+ required: false
284
+ },
285
+ bottom: {
286
+ type: null,
287
+ required: false
288
+ },
289
+ right: {
290
+ type: null,
291
+ required: false
292
+ },
293
+ inset: {
294
+ type: null,
295
+ required: false
296
+ },
297
+ display: {
298
+ type: null,
299
+ required: false
300
+ },
301
+ flex: {
302
+ type: null,
303
+ required: false
304
+ },
305
+ unstyled: {
306
+ type: Boolean,
307
+ required: false
308
+ },
309
+ variant: {
310
+ type: null,
311
+ required: false
312
+ },
313
+ classNames: {
314
+ type: null,
315
+ required: false
316
+ },
317
+ styles: {
318
+ type: null,
319
+ required: false
320
+ },
321
+ vars: {
322
+ type: Function,
323
+ required: false
324
+ },
325
+ attributes: {
326
+ type: null,
327
+ required: false
328
+ }
329
+ },
330
+ setup(__props, { expose: __expose }) {
331
+ const _root = ref(null);
332
+ const attrs = useAttrs();
333
+ const rawProps = __props;
334
+ const props = useComponentProps({
335
+ component: "CSkeleton",
336
+ props: rawProps
337
+ });
338
+ const knownProps = [
339
+ "classNames",
340
+ "className",
341
+ "style",
342
+ "styles",
343
+ "unstyled",
344
+ "vars",
345
+ "width",
346
+ "height",
347
+ "circle",
348
+ "visible",
349
+ "radius",
350
+ "animate",
351
+ "mod",
352
+ "attributes"
353
+ ];
354
+ const getStyles = useStyles({
355
+ name: "Skeleton",
356
+ classes: skeleton_module_default,
357
+ props: {
358
+ ...props.value,
359
+ ...attrs
360
+ },
361
+ className: props.value.className,
362
+ style: props.value.style,
363
+ classNames: props.value.classNames,
364
+ styles: props.value.styles,
365
+ unstyled: props.value.unstyled,
366
+ attributes: props.value.attributes,
367
+ vars: props.value.vars,
368
+ varsResolver
369
+ });
370
+ const modList = computed(() => [{ visible: props.value.visible }, { animate: props.value.animate }]);
371
+ const rootAttrs = computed(() => getStyles("root"));
372
+ const mergedAttrs = computed(() => {
373
+ const others = {};
374
+ const propsValue = props.value;
375
+ for (const key in propsValue) if (!knownProps.includes(key)) others[key] = propsValue[key];
376
+ const userMod = props.value.mod;
377
+ const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean), ...modList.value || []];
378
+ return {
379
+ ...others,
380
+ mod: mergedMod,
381
+ ...rootAttrs.value
382
+ };
383
+ });
384
+ __expose({ root: computed(() => _root.value?.root ?? null) });
385
+ const __returned__ = {
386
+ _root,
387
+ attrs,
388
+ rawProps,
389
+ props,
390
+ knownProps,
391
+ getStyles,
392
+ modList,
393
+ rootAttrs,
394
+ mergedAttrs,
395
+ get CBox() {
396
+ return CBox;
397
+ }
398
+ };
399
+ Object.defineProperty(__returned__, "__isScriptSetup", {
400
+ enumerable: false,
401
+ value: true
402
+ });
403
+ return __returned__;
404
+ }
405
+ });
406
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
407
+ return openBlock(), createBlock($setup["CBox"], mergeProps({ ref: "_root" }, $setup.mergedAttrs), {
408
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
409
+ _: 3
410
+ }, 16);
411
+ }
412
+ var skeleton_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/cck-ui/cck-ui/packages/@cck-ui/core/src/components/skeleton/skeleton.vue"]]);
413
+ //#endregion
414
+ export { skeleton_default as default };
415
+
416
+ //# sourceMappingURL=skeleton.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.mjs","names":[],"sources":["../../../src/components/skeleton/skeleton.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport { SkeletonFactory, SkeletonProps } from './skeleton.types'\nimport classes from './skeleton.module.css'\nimport { varsResolver } from './skeleton.utils'\nimport { computed, ref, useAttrs } from 'vue'\n\ndefineOptions({\n name: 'CSkeleton',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = withDefaults(defineProps<SkeletonProps>(), {\n animate: true,\n visible: true,\n})\n\nconst props = useComponentProps({\n component: 'CSkeleton',\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'width',\n 'height',\n 'circle',\n 'visible',\n 'radius',\n 'animate',\n 'mod',\n 'attributes',\n]\n\nconst getStyles = useStyles<SkeletonFactory>({\n name: 'Skeleton',\n classes,\n props: { ...props.value, ...attrs } as SkeletonProps,\n className: props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n})\n\nconst modList = computed(() => [{ visible: props.value.visible }, { animate: props.value.animate }])\n\nconst rootAttrs = computed(() => getStyles('root'))\n\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n for (const key in propsValue) {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n }\n const userMod = props.value.mod\n const mergedMod = [\n ...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)),\n ...(modList.value || []),\n ]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBA,MAAM,QAAQ,IAAsC,IAAI;EAExD,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAKjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,YAAY,UAA2B;GAC3C,MAAM;GACN,SAAA;GACA,OAAO;IAAE,GAAG,MAAM;IAAO,GAAG;GAAM;GAClC,WAAW,MAAM,MAAM;GACvB,OAAO,MAAM,MAAM;GACnB,YAAY,MAAM,MAAM;GACxB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;GACxB,MAAM,MAAM,MAAM;GAClB;EACF,CAAC;EAED,MAAM,UAAU,eAAe,CAAC,EAAE,SAAS,MAAM,MAAM,QAAQ,GAAG,EAAE,SAAS,MAAM,MAAM,QAAQ,CAAC,CAAC;EAEnG,MAAM,YAAY,eAAe,UAAU,MAAM,CAAC;EAElD,MAAM,cAAc,eAAe;GACjC,MAAM,SAA8B,CAAC;GACrC,MAAM,aAAa,MAAM;GACzB,KAAK,MAAM,OAAO,YAChB,IAAI,CAAC,WAAW,SAAS,GAAG,GAC1B,OAAO,OAAO,WAAW;GAG7B,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;;;;;;;;;;;;;;;;;;;;;;;qBAnFC,YAEQ,OAAA,SAFR,WAEQ,EAFD,KAAI,QAAO,GAAS,OAAA,WAAW,GAAA;yBAC5B,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ //#region packages/@cck-ui/core/src/components/skeleton/skeleton.module.css
3
+ var skeleton_module_default = {
4
+ "root": "m_e892d262",
5
+ "skeleton-fade": "m_fa53867c"
6
+ };
7
+ //#endregion
8
+ export { skeleton_module_default as default };
9
+
10
+ //# sourceMappingURL=skeleton.module.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.module.mjs","names":[],"sources":["../../../src/components/skeleton/skeleton.module.css"],"sourcesContent":["@keyframes skeleton-fade {\n 0%,\n 100% {\n opacity: 0.4;\n }\n\n 50% {\n opacity: 1;\n }\n}\n\n.root {\n height: var(--skeleton-height, auto);\n width: var(--skeleton-width, 100%);\n border-radius: var(--skeleton-radius, var(--c-radius-default));\n position: relative;\n transform: translateZ(0);\n -webkit-transform: translateZ(0);\n\n &:where([data-animate])::after {\n animation: skeleton-fade 1500ms linear infinite;\n }\n\n &:where([data-visible]) {\n overflow: hidden;\n\n &::before {\n position: absolute;\n content: '';\n inset: 0;\n z-index: 10;\n background-color: var(--c-color-body);\n }\n\n &::after {\n position: absolute;\n content: '';\n inset: 0;\n z-index: 11;\n\n @mixin where-light {\n background-color: var(--c-color-gray-3);\n }\n\n @mixin where-dark {\n background-color: var(--c-color-dark-4);\n }\n }\n }\n}\n"],"mappings":";;AAAA,IAAA,0BAAe;CAAC,QAAO;CAAa,iBAAgB;AAAY"}
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import { rem } from "../../core/utils/units-converters/rem.mjs";
3
+ import { getRadius } from "../../core/utils/get-size/get-size.mjs";
4
+ import { createVarsResolver } from "../../core/styles-api/create-vars-resolver/create-vars-resolver.mjs";
5
+ //#region packages/@cck-ui/core/src/components/skeleton/skeleton.utils.ts
6
+ const varsResolver = createVarsResolver((_, { width, height, radius, circle }) => ({ root: {
7
+ "--skeleton-height": rem(height),
8
+ "--skeleton-radius": circle ? "1000px" : radius === void 0 ? void 0 : getRadius(radius),
9
+ "--skeleton-width": circle ? rem(height) : rem(width)
10
+ } }));
11
+ //#endregion
12
+ export { varsResolver };
13
+
14
+ //# sourceMappingURL=skeleton.utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.utils.mjs","names":[],"sources":["../../../src/components/skeleton/skeleton.utils.ts"],"sourcesContent":["import { createVarsResolver, getRadius, rem } from '../../core'\nimport { SkeletonFactory } from './skeleton.types'\n\nexport const varsResolver = createVarsResolver<SkeletonFactory>(\n (_, { width, height, radius, circle }) => ({\n root: {\n '--skeleton-height': rem(height),\n '--skeleton-radius': circle ? '1000px' : radius === undefined ? undefined : getRadius(radius),\n '--skeleton-width': circle ? rem(height) : rem(width),\n },\n })\n)\n"],"mappings":";;;;;AAGA,MAAa,eAAe,oBACzB,GAAG,EAAE,OAAO,QAAQ,QAAQ,cAAc,EACzC,MAAM;CACJ,qBAAqB,IAAI,MAAM;CAC/B,qBAAqB,SAAS,WAAW,WAAW,KAAA,IAAY,KAAA,IAAY,UAAU,MAAM;CAC5F,oBAAoB,SAAS,IAAI,MAAM,IAAI,IAAI,KAAK;AACtD,EACF,EACF"}
package/esm/index.mjs CHANGED
@@ -65,7 +65,9 @@ import { CEmptyState, CEmptyStateActions, CEmptyStateDescription, CEmptyStateInd
65
65
  import { CFlex } from "./components/flex/index.mjs";
66
66
  import { CCol, CGrid } from "./components/grid/index.mjs";
67
67
  import { CGroup } from "./components/group/index.mjs";
68
+ import { CSemiCircleProgress } from "./components/semi-circle-progress/index.mjs";
68
69
  import { CSimpleGrid } from "./components/simple-grid/index.mjs";
70
+ import { CSkeleton } from "./components/skeleton/index.mjs";
69
71
  import { CSpace } from "./components/space/index.mjs";
70
72
  import { CSplitter, CSplitterPane } from "./components/splitter/index.mjs";
71
73
  import { CStack } from "./components/stack/index.mjs";
@@ -93,7 +95,9 @@ const components = [
93
95
  CGrid,
94
96
  CGroup,
95
97
  CLoader,
98
+ CSemiCircleProgress,
96
99
  CSimpleGrid,
100
+ CSkeleton,
97
101
  CSpace,
98
102
  CSplitter,
99
103
  CSplitterPane,
@@ -110,6 +114,6 @@ const CckUI = { install(app) {
110
114
  });
111
115
  } };
112
116
  //#endregion
113
- export { CAlert, CAspectRatio, CBox, CButton, CButtonGroup, CButtonGroupSection, transitions as CCK_TRANSITIONS, CCenter, CCloseButton, CCol, CContainer, CDefaultLoaders, CEmptyState, CEmptyStateActions, CEmptyStateDescription, CEmptyStateIndicator, CEmptyStateTitle, CFlex, CGrid, CGroup, CLoader, CONFIG_KEY, CSimpleGrid, CSpace, CSplitter, CSplitterPane, CStack, CText, CTransition, CckConfigProvider, CckUI, CckUI as default, DEFAULT_THEME, FOCUS_CLASS_NAMES, STYLE_PROPS_DATA, THEME_KEY, UnstyledButton, alpha, camelToKebabCase, colorsTuple, createTheme, createVarsResolver, darken, deepMerge, defaultCssVariablesResolver, defaultVariantColorsResolver, em, extractStyleProps, filterProps, getBaseValue, getBreakpointValue, getCSSColorVariables, getComponentName, getFontSize, getGradient, getLineHeight, getPrimaryShade, getRadius, getShadow, getSize, getSortedBreakpoints, getSpacing, getThemeColor, getTransitionProps, hashStyleProps, isLightColor, isNumber, isNumberLike, isString, isStringNumber, isUndefined, isVirtualColor, keys, luminance, mergeThemeOverrides, normalizeNumberLikeStringProp, numberLikeStringToNumber, parseStyleProps, parseThemeColor, px, rem, resolveClassNames, resolveStyles, responsiveStyleManager, rgb, rgba, stylesToString, toRgba, useCckClassNamesPrefix, useCckColorScheme, useCckCssVariablesResolver, useCckEnv, useCckIsHeadless, useCckStyleNonce, useCckStylesTransform, useCckSxTransform, useCckTheme, useCckWithStaticClasses, useComponentProps, useConfigContext, useProviderColorScheme, useRandomClassName, useStyles, virtualColor, withClasses, withExtend, withInstall, withPropsDefaultSetter, withPropsFactory, withVarsResolver };
117
+ export { CAlert, CAspectRatio, CBox, CButton, CButtonGroup, CButtonGroupSection, transitions as CCK_TRANSITIONS, CCenter, CCloseButton, CCol, CContainer, CDefaultLoaders, CEmptyState, CEmptyStateActions, CEmptyStateDescription, CEmptyStateIndicator, CEmptyStateTitle, CFlex, CGrid, CGroup, CLoader, CONFIG_KEY, CSemiCircleProgress, CSimpleGrid, CSkeleton, CSpace, CSplitter, CSplitterPane, CStack, CText, CTransition, CckConfigProvider, CckUI, CckUI as default, DEFAULT_THEME, FOCUS_CLASS_NAMES, STYLE_PROPS_DATA, THEME_KEY, UnstyledButton, alpha, camelToKebabCase, colorsTuple, createTheme, createVarsResolver, darken, deepMerge, defaultCssVariablesResolver, defaultVariantColorsResolver, em, extractStyleProps, filterProps, getBaseValue, getBreakpointValue, getCSSColorVariables, getComponentName, getFontSize, getGradient, getLineHeight, getPrimaryShade, getRadius, getShadow, getSize, getSortedBreakpoints, getSpacing, getThemeColor, getTransitionProps, hashStyleProps, isLightColor, isNumber, isNumberLike, isString, isStringNumber, isUndefined, isVirtualColor, keys, luminance, mergeThemeOverrides, normalizeNumberLikeStringProp, numberLikeStringToNumber, parseStyleProps, parseThemeColor, px, rem, resolveClassNames, resolveStyles, responsiveStyleManager, rgb, rgba, stylesToString, toRgba, useCckClassNamesPrefix, useCckColorScheme, useCckCssVariablesResolver, useCckEnv, useCckIsHeadless, useCckStyleNonce, useCckStylesTransform, useCckSxTransform, useCckTheme, useCckWithStaticClasses, useComponentProps, useConfigContext, useProviderColorScheme, useRandomClassName, useStyles, virtualColor, withClasses, withExtend, withInstall, withPropsDefaultSetter, withPropsFactory, withVarsResolver };
114
118
 
115
119
  //# sourceMappingURL=index.mjs.map
package/esm/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport {\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFlex,\n CGrid,\n CGroup,\n CLoader,\n CSimpleGrid,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n UnstyledButton,\n} from './components'\nimport { CckConfigProvider, CBox } from './core'\n\nconst INSTALLED_KEY = Symbol('INSTALLED_KEY')\n\nconst components = [\n CckConfigProvider,\n CBox,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFlex,\n CGrid,\n CGroup,\n CLoader,\n CSimpleGrid,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n UnstyledButton,\n]\n\nconst CckUI: Plugin = {\n install(app: App) {\n if ((app as any)[INSTALLED_KEY]) {\n return\n }\n ;(app as any)[INSTALLED_KEY] = true\n components.forEach((c) => {\n if (c.name) {\n app.component(c.name, c)\n }\n })\n },\n}\n\nexport default CckUI\nexport { CckUI }\n\nexport * from './components'\nexport * from './core'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,gBAAgB,OAAO,eAAe;AAE5C,MAAM,aAAa;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,QAAgB,EACpB,QAAQ,KAAU;CAChB,IAAK,IAAY,gBACf;CAED,IAAa,iBAAiB;CAC/B,WAAW,SAAS,MAAM;EACxB,IAAI,EAAE,MACJ,IAAI,UAAU,EAAE,MAAM,CAAC;CAE3B,CAAC;AACH,EACF"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport {\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFlex,\n CGrid,\n CGroup,\n CLoader,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n UnstyledButton,\n} from './components'\nimport { CckConfigProvider, CBox } from './core'\n\nconst INSTALLED_KEY = Symbol('INSTALLED_KEY')\n\nconst components = [\n CckConfigProvider,\n CBox,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFlex,\n CGrid,\n CGroup,\n CLoader,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n UnstyledButton,\n]\n\nconst CckUI: Plugin = {\n install(app: App) {\n if ((app as any)[INSTALLED_KEY]) {\n return\n }\n ;(app as any)[INSTALLED_KEY] = true\n components.forEach((c) => {\n if (c.name) {\n app.component(c.name, c)\n }\n })\n },\n}\n\nexport default CckUI\nexport { CckUI }\n\nexport * from './components'\nexport * from './core'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAM,gBAAgB,OAAO,eAAe;AAE5C,MAAM,aAAa;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,QAAgB,EACpB,QAAQ,KAAU;CAChB,IAAK,IAAY,gBACf;CAED,IAAa,iBAAiB;CAC/B,WAAW,SAAS,MAAM;EACxB,IAAI,EAAE,MACJ,IAAI,UAAU,EAAE,MAAM,CAAC;CAE3B,CAAC;AACH,EACF"}
@@ -9,7 +9,9 @@ export * from './flex';
9
9
  export * from './grid';
10
10
  export * from './group';
11
11
  export * from './loader';
12
+ export * from './semi-circle-progress';
12
13
  export * from './simple-grid';
14
+ export * from './skeleton';
13
15
  export * from './space';
14
16
  export * from './splitter';
15
17
  export * from './stack';
@@ -0,0 +1,6 @@
1
+ import SemiCircleProgress from './semi-circle-progress.vue';
2
+ import classes from './semi-circle-progress.module.css';
3
+ import { SFCWithInstallAndClasses } from '../../core';
4
+ export declare const CSemiCircleProgress: SFCWithInstallAndClasses<typeof SemiCircleProgress, typeof classes>;
5
+ export default CSemiCircleProgress;
6
+ export * from './semi-circle-progress.types';
@@ -0,0 +1,57 @@
1
+ import { BoxProps, CColor, ElementProps, Factory, StylesApiProps } from '../../core';
2
+ export type SemiCircleProgressStylesNames = 'root' | 'svg' | 'emptySegment' | 'filledSegment' | 'label';
3
+ export type SemiCircleProgressCssVariables = {
4
+ root: '--scp-filled-segment-color' | '--scp-empty-segment-color' | '--scp-rotation' | '--scp-transition-duration' | '--scp-thickness';
5
+ };
6
+ export interface SemiCircleProgressProps extends BoxProps, StylesApiProps<SemiCircleProgressFactory>, ElementProps<'div'> {
7
+ /**
8
+ * @description Progress value from `0` to `100`
9
+ */
10
+ value: number;
11
+ /**
12
+ * @description Width of the component and diameter of the full circle in px. The visible SVG height will be size / 2
13
+ * @default 200
14
+ */
15
+ size?: number;
16
+ /**
17
+ * @description Stroke width of the circle segments in px
18
+ * @default 12
19
+ */
20
+ thickness?: number;
21
+ /**
22
+ * @description Orientation of the circle
23
+ * @default 'up'
24
+ */
25
+ orientation?: 'up' | 'down';
26
+ /**
27
+ * @description Direction from which the circle is filled
28
+ * @default 'left-to-right'
29
+ */
30
+ fillDirection?: 'right-to-left' | 'left-to-right';
31
+ /**
32
+ * @description Key of `theme.colors` or any valid CSS color value
33
+ * @default theme.primaryColor
34
+ */
35
+ filledSegmentColor?: CColor;
36
+ /**
37
+ * @description Key of `theme.colors` or any valid CSS color value
38
+ * @default 'gray.2' in light mode, 'dark.4' in dark mode
39
+ */
40
+ emptySegmentColor?: CColor;
41
+ /**
42
+ * @description Transition duration for the filled segment progress changes in ms. Does not affect color transitions
43
+ * @default 0
44
+ */
45
+ transitionDuration?: number;
46
+ /**
47
+ * @description Label position relative to the circle center
48
+ * @default 'bottom'
49
+ */
50
+ labelPosition?: 'center' | 'bottom';
51
+ }
52
+ export type SemiCircleProgressFactory = Factory<{
53
+ props: SemiCircleProgressProps;
54
+ ref: HTMLDivElement;
55
+ stylesNames: SemiCircleProgressStylesNames;
56
+ vars: SemiCircleProgressCssVariables;
57
+ }>;
@@ -0,0 +1,7 @@
1
+ import { SemiCircleProgressProps } from './semi-circle-progress.types';
2
+ export declare const varsResolver: import("../..").VarsResolver<{
3
+ props: SemiCircleProgressProps;
4
+ ref: HTMLDivElement;
5
+ stylesNames: import("./semi-circle-progress.types").SemiCircleProgressStylesNames;
6
+ vars: import("./semi-circle-progress.types").SemiCircleProgressCssVariables;
7
+ }>;
@@ -0,0 +1,6 @@
1
+ import Skeleton from './skeleton.vue';
2
+ import classes from './skeleton.module.css';
3
+ import { SFCWithInstallAndClasses } from '../../core';
4
+ export declare const CSkeleton: SFCWithInstallAndClasses<typeof Skeleton, typeof classes>;
5
+ export default CSkeleton;
6
+ export * from './skeleton.types';
@@ -0,0 +1,44 @@
1
+ import { Properties } from 'csstype';
2
+ import { BoxProps, ElementProps, Factory, StylesApiProps } from '../../core';
3
+ export type SkeletonStylesNames = 'root';
4
+ export type SkeletonCssVariables = {
5
+ root: '--skeleton-width' | '--skeleton-height' | '--skeleton-radius';
6
+ };
7
+ export interface SkeletonProps extends BoxProps, StylesApiProps<SkeletonFactory>, /* @vue-ignore */ ElementProps<'div'> {
8
+ /**
9
+ * @description Determines whether Skeleton overlay should be displayed
10
+ * @default true
11
+ */
12
+ visible?: boolean;
13
+ /**
14
+ * @description Skeleton `height`, numbers are converted to rem
15
+ * @default auto
16
+ */
17
+ height?: Properties['height'];
18
+ /**
19
+ * @description Skeleton `width`, numbers are converted to rem, ignored when `circle` prop is set.
20
+ * @default 100%
21
+ */
22
+ width?: Properties['width'];
23
+ /**
24
+ * @description If set, Skeleton `width` and `border-radius` are equal to its `height`
25
+ * @default false
26
+ */
27
+ circle?: boolean;
28
+ /**
29
+ * @description Key of `theme.radius` or any valid CSS value to set border-radius. Numbers are converted to rem.
30
+ * @default theme.defaultRadius
31
+ */
32
+ radius?: Properties['borderRadius'];
33
+ /**
34
+ * @description Enables animation
35
+ * @default true
36
+ */
37
+ animate?: boolean;
38
+ }
39
+ export type SkeletonFactory = Factory<{
40
+ props: SkeletonProps;
41
+ ref: HTMLDivElement;
42
+ stylesNames: SkeletonStylesNames;
43
+ vars: SkeletonCssVariables;
44
+ }>;
@@ -0,0 +1,6 @@
1
+ export declare const varsResolver: import("../..").VarsResolver<{
2
+ props: import("./skeleton.types").SkeletonProps;
3
+ ref: HTMLDivElement;
4
+ stylesNames: import("./skeleton.types").SkeletonStylesNames;
5
+ vars: import("./skeleton.types").SkeletonCssVariables;
6
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cck-ui/core",
3
- "version": "0.14.1",
3
+ "version": "0.16.0",
4
4
  "description": "Vue component library focused on usability, accessibility and developer experience",
5
5
  "homepage": "https://cck-ui.jackatlas.xyz",
6
6
  "license": "ISC",