@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.
- package/cjs/components/empty-state/empty-state.cjs +10 -2
- package/cjs/components/empty-state/empty-state.cjs.map +1 -1
- package/cjs/components/empty-state/empty-state.module.cjs.map +1 -1
- package/cjs/components/semi-circle-progress/index.cjs +14 -0
- package/cjs/components/semi-circle-progress/index.cjs.map +1 -0
- package/cjs/components/semi-circle-progress/semi-circle-progress.cjs +530 -0
- package/cjs/components/semi-circle-progress/semi-circle-progress.cjs.map +1 -0
- package/cjs/components/semi-circle-progress/semi-circle-progress.module.cjs +12 -0
- package/cjs/components/semi-circle-progress/semi-circle-progress.module.cjs.map +1 -0
- package/cjs/components/semi-circle-progress/semi-circle-progress.utils.cjs +26 -0
- package/cjs/components/semi-circle-progress/semi-circle-progress.utils.cjs.map +1 -0
- package/cjs/index.cjs +20 -17
- package/cjs/index.cjs.map +1 -1
- package/esm/components/empty-state/empty-state.mjs +10 -2
- package/esm/components/empty-state/empty-state.mjs.map +1 -1
- package/esm/components/empty-state/empty-state.module.mjs.map +1 -1
- package/esm/components/semi-circle-progress/index.mjs +11 -0
- package/esm/components/semi-circle-progress/index.mjs.map +1 -0
- package/esm/components/semi-circle-progress/semi-circle-progress.mjs +530 -0
- package/esm/components/semi-circle-progress/semi-circle-progress.mjs.map +1 -0
- package/esm/components/semi-circle-progress/semi-circle-progress.module.mjs +12 -0
- package/esm/components/semi-circle-progress/semi-circle-progress.module.mjs.map +1 -0
- package/esm/components/semi-circle-progress/semi-circle-progress.utils.mjs +26 -0
- package/esm/components/semi-circle-progress/semi-circle-progress.utils.mjs.map +1 -0
- package/esm/index.mjs +3 -1
- package/esm/index.mjs.map +1 -1
- package/lib/components/empty-state/empty-state.types.d.ts +4 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/semi-circle-progress/index.d.ts +6 -0
- package/lib/components/semi-circle-progress/semi-circle-progress.types.d.ts +57 -0
- package/lib/components/semi-circle-progress/semi-circle-progress.utils.d.ts +7 -0
- package/package.json +1 -1
- package/styles/empty-state.css +1 -1
- package/styles/empty-state.layer.css +1 -1
- package/styles/semi-circle-progress.css +58 -0
- package/styles/semi-circle-progress.layer.css +59 -0
- package/styles.css +60 -1
- package/styles.layer.css +60 -1
|
@@ -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
|
+
}>;
|
package/package.json
CHANGED
package/styles/empty-state.css
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
align-items: center;
|
|
70
70
|
justify-content: center;
|
|
71
71
|
flex-shrink: 0;
|
|
72
|
-
color: var(--
|
|
72
|
+
color: var(--empty-state-indicator-color, var(--c-color-dimmed));
|
|
73
73
|
font-size: var(--empty-state-indicator-size, var(--empty-state-indicator-size-md));
|
|
74
74
|
line-height: 1;
|
|
75
75
|
}
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
align-items: center;
|
|
70
70
|
justify-content: center;
|
|
71
71
|
flex-shrink: 0;
|
|
72
|
-
color: var(--
|
|
72
|
+
color: var(--empty-state-indicator-color, var(--c-color-dimmed));
|
|
73
73
|
font-size: var(--empty-state-indicator-size, var(--empty-state-indicator-size-md));
|
|
74
74
|
line-height: 1;
|
|
75
75
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.m_6f2f9f44 {
|
|
2
|
+
--scp-filled-segment-color: var(--c-primary-color-filled);
|
|
3
|
+
--scp-transition-duration: 0ms;
|
|
4
|
+
--scp-thickness: calc(0.75rem * var(--c-scale));
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:where([data-c-color-scheme='light']) .m_6f2f9f44 {
|
|
8
|
+
--scp-empty-segment-color: var(--c-color-gray-2);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:where([data-c-color-scheme='dark']) .m_6f2f9f44 {
|
|
12
|
+
--scp-empty-segment-color: var(--c-color-dark-4);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.m_6f2f9f44 {
|
|
16
|
+
|
|
17
|
+
position: relative;
|
|
18
|
+
width: fit-content;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.m_8ff94bc2 {
|
|
22
|
+
display: block;
|
|
23
|
+
transform: var(--scp-rotation);
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.m_e500074f {
|
|
28
|
+
transition:
|
|
29
|
+
stroke-dashoffset var(--scp-transition-duration) ease,
|
|
30
|
+
stroke-dasharray var(--scp-transition-duration) ease,
|
|
31
|
+
stroke-opacity var(--scp-transition-duration) ease,
|
|
32
|
+
stroke var(--scp-transition-duration);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.m_76692cd2 {
|
|
36
|
+
position: absolute;
|
|
37
|
+
margin: 0;
|
|
38
|
+
padding: 0;
|
|
39
|
+
inset-inline: 0;
|
|
40
|
+
text-align: center;
|
|
41
|
+
z-index: 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.m_76692cd2:where([data-position='bottom']) {
|
|
45
|
+
bottom: 0;
|
|
46
|
+
padding-inline: calc(var(--scp-thickness) * 2);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.m_76692cd2:where([data-position='bottom']):where([data-orientation='down']) {
|
|
50
|
+
bottom: auto;
|
|
51
|
+
top: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.m_76692cd2:where([data-position='center']) {
|
|
55
|
+
top: 50%;
|
|
56
|
+
transform: translateY(-50%);
|
|
57
|
+
padding-inline: calc(var(--scp-thickness) * 3);
|
|
58
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@layer cck {.m_6f2f9f44 {
|
|
2
|
+
--scp-filled-segment-color: var(--c-primary-color-filled);
|
|
3
|
+
--scp-transition-duration: 0ms;
|
|
4
|
+
--scp-thickness: calc(0.75rem * var(--c-scale));
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:where([data-c-color-scheme='light']) .m_6f2f9f44 {
|
|
8
|
+
--scp-empty-segment-color: var(--c-color-gray-2);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:where([data-c-color-scheme='dark']) .m_6f2f9f44 {
|
|
12
|
+
--scp-empty-segment-color: var(--c-color-dark-4);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.m_6f2f9f44 {
|
|
16
|
+
|
|
17
|
+
position: relative;
|
|
18
|
+
width: fit-content;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.m_8ff94bc2 {
|
|
22
|
+
display: block;
|
|
23
|
+
transform: var(--scp-rotation);
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.m_e500074f {
|
|
28
|
+
transition:
|
|
29
|
+
stroke-dashoffset var(--scp-transition-duration) ease,
|
|
30
|
+
stroke-dasharray var(--scp-transition-duration) ease,
|
|
31
|
+
stroke-opacity var(--scp-transition-duration) ease,
|
|
32
|
+
stroke var(--scp-transition-duration);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.m_76692cd2 {
|
|
36
|
+
position: absolute;
|
|
37
|
+
margin: 0;
|
|
38
|
+
padding: 0;
|
|
39
|
+
inset-inline: 0;
|
|
40
|
+
text-align: center;
|
|
41
|
+
z-index: 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.m_76692cd2:where([data-position='bottom']) {
|
|
45
|
+
bottom: 0;
|
|
46
|
+
padding-inline: calc(var(--scp-thickness) * 2);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.m_76692cd2:where([data-position='bottom']):where([data-orientation='down']) {
|
|
50
|
+
bottom: auto;
|
|
51
|
+
top: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.m_76692cd2:where([data-position='center']) {
|
|
55
|
+
top: 50%;
|
|
56
|
+
transform: translateY(-50%);
|
|
57
|
+
padding-inline: calc(var(--scp-thickness) * 3);
|
|
58
|
+
}
|
|
59
|
+
}
|
package/styles.css
CHANGED
|
@@ -1157,7 +1157,7 @@ fieldset:disabled .c-active:active {
|
|
|
1157
1157
|
align-items: center;
|
|
1158
1158
|
justify-content: center;
|
|
1159
1159
|
flex-shrink: 0;
|
|
1160
|
-
color: var(--
|
|
1160
|
+
color: var(--empty-state-indicator-color, var(--c-color-dimmed));
|
|
1161
1161
|
font-size: var(--empty-state-indicator-size, var(--empty-state-indicator-size-md));
|
|
1162
1162
|
line-height: 1;
|
|
1163
1163
|
}
|
|
@@ -1379,6 +1379,65 @@ fieldset:disabled .c-active:active {
|
|
|
1379
1379
|
animation: m_1309882b 1.2s linear infinite;
|
|
1380
1380
|
}
|
|
1381
1381
|
|
|
1382
|
+
.m_6f2f9f44 {
|
|
1383
|
+
--scp-filled-segment-color: var(--c-primary-color-filled);
|
|
1384
|
+
--scp-transition-duration: 0ms;
|
|
1385
|
+
--scp-thickness: calc(0.75rem * var(--c-scale));
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
:where([data-c-color-scheme='light']) .m_6f2f9f44 {
|
|
1389
|
+
--scp-empty-segment-color: var(--c-color-gray-2);
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
:where([data-c-color-scheme='dark']) .m_6f2f9f44 {
|
|
1393
|
+
--scp-empty-segment-color: var(--c-color-dark-4);
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
.m_6f2f9f44 {
|
|
1397
|
+
|
|
1398
|
+
position: relative;
|
|
1399
|
+
width: fit-content;
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
.m_8ff94bc2 {
|
|
1403
|
+
display: block;
|
|
1404
|
+
transform: var(--scp-rotation);
|
|
1405
|
+
overflow: hidden;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
.m_e500074f {
|
|
1409
|
+
transition:
|
|
1410
|
+
stroke-dashoffset var(--scp-transition-duration) ease,
|
|
1411
|
+
stroke-dasharray var(--scp-transition-duration) ease,
|
|
1412
|
+
stroke-opacity var(--scp-transition-duration) ease,
|
|
1413
|
+
stroke var(--scp-transition-duration);
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
.m_76692cd2 {
|
|
1417
|
+
position: absolute;
|
|
1418
|
+
margin: 0;
|
|
1419
|
+
padding: 0;
|
|
1420
|
+
inset-inline: 0;
|
|
1421
|
+
text-align: center;
|
|
1422
|
+
z-index: 1;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
.m_76692cd2:where([data-position='bottom']) {
|
|
1426
|
+
bottom: 0;
|
|
1427
|
+
padding-inline: calc(var(--scp-thickness) * 2);
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
.m_76692cd2:where([data-position='bottom']):where([data-orientation='down']) {
|
|
1431
|
+
bottom: auto;
|
|
1432
|
+
top: 0;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
.m_76692cd2:where([data-position='center']) {
|
|
1436
|
+
top: 50%;
|
|
1437
|
+
transform: translateY(-50%);
|
|
1438
|
+
padding-inline: calc(var(--scp-thickness) * 3);
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1382
1441
|
.m_cd6f7c35 {
|
|
1383
1442
|
container: simple-grid / inline-size;
|
|
1384
1443
|
}
|
package/styles.layer.css
CHANGED
|
@@ -1157,7 +1157,7 @@ fieldset:disabled .c-active:active {
|
|
|
1157
1157
|
align-items: center;
|
|
1158
1158
|
justify-content: center;
|
|
1159
1159
|
flex-shrink: 0;
|
|
1160
|
-
color: var(--
|
|
1160
|
+
color: var(--empty-state-indicator-color, var(--c-color-dimmed));
|
|
1161
1161
|
font-size: var(--empty-state-indicator-size, var(--empty-state-indicator-size-md));
|
|
1162
1162
|
line-height: 1;
|
|
1163
1163
|
}
|
|
@@ -1379,6 +1379,65 @@ fieldset:disabled .c-active:active {
|
|
|
1379
1379
|
animation: m_1309882b 1.2s linear infinite;
|
|
1380
1380
|
}
|
|
1381
1381
|
|
|
1382
|
+
.m_6f2f9f44 {
|
|
1383
|
+
--scp-filled-segment-color: var(--c-primary-color-filled);
|
|
1384
|
+
--scp-transition-duration: 0ms;
|
|
1385
|
+
--scp-thickness: calc(0.75rem * var(--c-scale));
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
:where([data-c-color-scheme='light']) .m_6f2f9f44 {
|
|
1389
|
+
--scp-empty-segment-color: var(--c-color-gray-2);
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
:where([data-c-color-scheme='dark']) .m_6f2f9f44 {
|
|
1393
|
+
--scp-empty-segment-color: var(--c-color-dark-4);
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
.m_6f2f9f44 {
|
|
1397
|
+
|
|
1398
|
+
position: relative;
|
|
1399
|
+
width: fit-content;
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
.m_8ff94bc2 {
|
|
1403
|
+
display: block;
|
|
1404
|
+
transform: var(--scp-rotation);
|
|
1405
|
+
overflow: hidden;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
.m_e500074f {
|
|
1409
|
+
transition:
|
|
1410
|
+
stroke-dashoffset var(--scp-transition-duration) ease,
|
|
1411
|
+
stroke-dasharray var(--scp-transition-duration) ease,
|
|
1412
|
+
stroke-opacity var(--scp-transition-duration) ease,
|
|
1413
|
+
stroke var(--scp-transition-duration);
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
.m_76692cd2 {
|
|
1417
|
+
position: absolute;
|
|
1418
|
+
margin: 0;
|
|
1419
|
+
padding: 0;
|
|
1420
|
+
inset-inline: 0;
|
|
1421
|
+
text-align: center;
|
|
1422
|
+
z-index: 1;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
.m_76692cd2:where([data-position='bottom']) {
|
|
1426
|
+
bottom: 0;
|
|
1427
|
+
padding-inline: calc(var(--scp-thickness) * 2);
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
.m_76692cd2:where([data-position='bottom']):where([data-orientation='down']) {
|
|
1431
|
+
bottom: auto;
|
|
1432
|
+
top: 0;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
.m_76692cd2:where([data-position='center']) {
|
|
1436
|
+
top: 50%;
|
|
1437
|
+
transform: translateY(-50%);
|
|
1438
|
+
padding-inline: calc(var(--scp-thickness) * 3);
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1382
1441
|
.m_cd6f7c35 {
|
|
1383
1442
|
container: simple-grid / inline-size;
|
|
1384
1443
|
}
|