@sb1/ffe-chart-donut-react 5.1.2 → 5.2.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.
@@ -0,0 +1,71 @@
1
+ .ffe-chart-donut {
2
+ height: 200px;
3
+ position: relative;
4
+ text-align: left;
5
+ width: 200px;
6
+
7
+ &--first {
8
+ stroke: var(--ffe-v-chart-donut-first-color);
9
+ }
10
+
11
+ &--last {
12
+ stroke: var(--ffe-v-chart-donut-last-color);
13
+ }
14
+
15
+ &__circle {
16
+ height: 100%;
17
+ margin: 0 auto;
18
+ position: absolute;
19
+ width: 100%;
20
+
21
+ @media (min-width: @breakpoint-md) {
22
+ margin: inherit;
23
+ width: 200px;
24
+ }
25
+ }
26
+
27
+ &__description {
28
+ left: calc(~'50% - 75px');
29
+ position: absolute;
30
+ top: 60px;
31
+ width: 150px;
32
+
33
+ @media (min-width: @breakpoint-md) {
34
+ left: 25px;
35
+ }
36
+ }
37
+
38
+ &__name {
39
+ color: var(--ffe-v-chart-donut-text-color);
40
+ text-align: center;
41
+ }
42
+
43
+ &__fractions {
44
+ display: flex;
45
+ justify-content: space-around;
46
+ }
47
+
48
+ &__fraction {
49
+ > .ffe-chart-donut__amount {
50
+ color: var(--ffe-v-chart-donut-text-color);
51
+ text-align: center;
52
+ }
53
+
54
+ &:last-child {
55
+ > .ffe-chart-donut__type {
56
+ padding-left: 20px;
57
+ }
58
+
59
+ > .ffe-chart-donut__amount {
60
+ border-left: 1px solid var(--ffe-farge-graa);
61
+ padding-left: 20px;
62
+
63
+ .native & {
64
+ @media (prefers-color-scheme: dark) {
65
+ color: var(--ffe-v-chart-donut-text-color);
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
@@ -1,93 +1,2 @@
1
- .ffe-chart-donut {
2
- height: 200px;
3
- position: relative;
4
- text-align: left;
5
- width: 200px;
6
-
7
- &--first {
8
- stroke: @ffe-farge-vann;
9
- .native & {
10
- @media (prefers-color-scheme: dark) {
11
- stroke: @ffe-farge-vann-30;
12
- }
13
- }
14
- }
15
-
16
- &--last {
17
- stroke: @ffe-farge-fjell;
18
- .native & {
19
- @media (prefers-color-scheme: dark) {
20
- stroke: @ffe-farge-vann-70;
21
- }
22
- }
23
- }
24
-
25
- &__circle {
26
- height: 100%;
27
- margin: 0 auto;
28
- position: absolute;
29
- width: 100%;
30
-
31
- @media (min-width: @breakpoint-md) {
32
- margin: inherit;
33
- width: 200px;
34
- }
35
- }
36
-
37
- &__description {
38
- left: calc(~'50% - 75px');
39
- position: absolute;
40
- top: 60px;
41
- width: 150px;
42
-
43
- @media (min-width: @breakpoint-md) {
44
- left: 25px;
45
- }
46
- }
47
-
48
- &__name {
49
- color: @ffe-farge-koksgraa;
50
- text-align: center;
51
-
52
- .native & {
53
- @media (prefers-color-scheme: dark) {
54
- color: @ffe-farge-lysgraa;
55
- }
56
- }
57
- }
58
-
59
- &__fractions {
60
- display: flex;
61
- justify-content: space-around;
62
- }
63
-
64
- &__fraction {
65
- > .ffe-chart-donut__amount {
66
- color: @ffe-farge-koksgraa;
67
- text-align: center;
68
-
69
- .native & {
70
- @media (prefers-color-scheme: dark) {
71
- color: @ffe-farge-lysgraa;
72
- }
73
- }
74
- }
75
-
76
- &:last-child {
77
- > .ffe-chart-donut__type {
78
- padding-left: 20px;
79
- }
80
-
81
- > .ffe-chart-donut__amount {
82
- border-left: 1px solid @ffe-farge-graa;
83
- padding-left: 20px;
84
-
85
- .native & {
86
- @media (prefers-color-scheme: dark) {
87
- color: @ffe-farge-lysgraa;
88
- }
89
- }
90
- }
91
- }
92
- }
93
- }
1
+ @import 'theme';
2
+ @import 'chart-donut';
@@ -0,0 +1,13 @@
1
+ :root {
2
+ --ffe-v-chart-donut-first-color: var(--ffe-farge-vann);
3
+ --ffe-v-chart-donut-last-color: var(--ffe-farge-fjell);
4
+ --ffe-v-chart-donut-text-color: var(--ffe-farge-koksgraa);
5
+
6
+ @media (prefers-color-scheme: dark) {
7
+ .native {
8
+ --ffe-v-chart-donut-first-color: var(--ffe-farge-vann-30);
9
+ --ffe-v-chart-donut-last-color: var(--ffe-farge-vann-70);
10
+ --ffe-v-chart-donut-text-color: var(--ffe-farge-lysgraa);
11
+ }
12
+ }
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-chart-donut-react",
3
- "version": "5.1.2",
3
+ "version": "5.2.0",
4
4
  "description": "Donut chart in SVG",
5
5
  "keywords": [
6
6
  "ffe"
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "816e0f967f7b2d8fd6cca41bb9d363a4c7933116"
43
+ "gitHead": "e83965243dcaf2003fd0b19025115685fbe18e05"
44
44
  }