@sb1/ffe-chart-donut-react 8.1.3 → 9.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,3 @@
1
- :root,
2
- :host {
3
- --ffe-v-chart-donut-first-color: var(--ffe-farge-vann);
4
- --ffe-v-chart-donut-last-color: var(--ffe-farge-fjell);
5
- --ffe-v-chart-donut-text-color: var(--ffe-farge-koksgraa);
6
- }
7
- @media (prefers-color-scheme: dark) {
8
- :root .regard-color-scheme-preference,
9
- :host .regard-color-scheme-preference {
10
- --ffe-v-chart-donut-first-color: var(--ffe-farge-vann-30);
11
- --ffe-v-chart-donut-last-color: var(--ffe-farge-vann-70);
12
- --ffe-v-chart-donut-text-color: var(--ffe-farge-lysgraa);
13
- }
14
- }
15
1
  .ffe-chart-donut {
16
2
  display: grid;
17
3
  width: -webkit-fit-content;
@@ -24,10 +10,10 @@
24
10
  text-align: left;
25
11
  }
26
12
  .ffe-chart-donut--first {
27
- stroke: var(--ffe-v-chart-donut-first-color);
13
+ stroke: var(--ffe-color-default-brand-primary-subtle);
28
14
  }
29
15
  .ffe-chart-donut--last {
30
- stroke: var(--ffe-v-chart-donut-last-color);
16
+ stroke: var(--ffe-color-foreground-emphasis);
31
17
  }
32
18
  .ffe-chart-donut__circle,
33
19
  .ffe-chart-donut__description {
@@ -42,7 +28,7 @@
42
28
  z-index: 1;
43
29
  }
44
30
  .ffe-chart-donut__name {
45
- color: var(--ffe-v-chart-donut-text-color);
31
+ color: var(--ffe-color-foreground-emphasis);
46
32
  text-align: center;
47
33
  }
48
34
  .ffe-chart-donut__fractions {
@@ -57,7 +43,7 @@
57
43
  display: -webkit-box;
58
44
  display: -ms-flexbox;
59
45
  display: flex;
60
- background: var(--ffe-v-chart-donut-text-color);
46
+ background: var(--ffe-color-border-primary-subtle);
61
47
  height: 1lh;
62
48
  content: '';
63
49
  }
@@ -66,7 +52,7 @@
66
52
  place-items: center;
67
53
  }
68
54
  .ffe-chart-donut .ffe-chart-donut__amount {
69
- color: var(--ffe-v-chart-donut-text-color);
55
+ color: var(--ffe-color-foreground-default);
70
56
  }
71
57
  .ffe-chart-donut__fraction:first-of-type {
72
58
  grid-column: 1 / 2;
@@ -1,2 +1,73 @@
1
- @import 'theme';
2
- @import 'chart-donut';
1
+ .ffe-chart-donut {
2
+ display: grid;
3
+ width: fit-content;
4
+ grid-template-columns: auto;
5
+ grid-template-rows: auto;
6
+ place-items: center;
7
+ position: relative;
8
+ text-align: left;
9
+
10
+ &--first {
11
+ stroke: var(--ffe-color-default-brand-primary-subtle);
12
+ }
13
+
14
+ &--last {
15
+ stroke: var(--ffe-color-foreground-emphasis);
16
+ }
17
+
18
+ &__circle,
19
+ &__description {
20
+ grid-column: 1 e('/') 1;
21
+ grid-row: 1 e('/') 1;
22
+ }
23
+
24
+ &__circle {
25
+ width: 12.5rem;
26
+ aspect-ratio: 1;
27
+ }
28
+
29
+ &__description {
30
+ z-index: 1;
31
+ }
32
+
33
+ &__name {
34
+ color: var(--ffe-color-foreground-emphasis);
35
+ text-align: center;
36
+ }
37
+
38
+ &__fractions {
39
+ display: grid;
40
+ grid-template-columns: auto 1px auto;
41
+ grid-template-rows: auto auto;
42
+ grid-column-gap: var(--ffe-spacing-xs);
43
+
44
+ &::after {
45
+ grid-column: 2 e('/') 3;
46
+ grid-row: 1 e('/') 2;
47
+ display: flex;
48
+ // Using subtle border color for the separator
49
+ background: var(--ffe-color-border-primary-subtle);
50
+ height: 1lh;
51
+ content: '';
52
+ }
53
+ }
54
+
55
+ &__fraction {
56
+ display: grid;
57
+ place-items: center;
58
+ }
59
+
60
+ .ffe-chart-donut__amount {
61
+ color: var(--ffe-color-foreground-default);
62
+ }
63
+
64
+ &__fraction:first-of-type {
65
+ grid-column: 1 e('/') 2;
66
+ grid-row: 1 e('/') 3;
67
+ }
68
+
69
+ &__fraction:last-of-type {
70
+ grid-column: 3 e('/') 4;
71
+ grid-row: 1 e('/') 3;
72
+ }
73
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-chart-donut-react",
3
- "version": "8.1.3",
3
+ "version": "9.0.1",
4
4
  "description": "Donut chart in SVG",
5
5
  "keywords": [
6
6
  "ffe"
@@ -39,5 +39,5 @@
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
- "gitHead": "5a72f08b0873cc96b0d439dd029839db4d5d4ea9"
42
+ "gitHead": "abedc811686859a152f05182aeece4ac8667949a"
43
43
  }
@@ -1,70 +0,0 @@
1
- .ffe-chart-donut {
2
- display: grid;
3
- width: fit-content;
4
- grid-template-columns: auto;
5
- grid-template-rows: auto;
6
- place-items: center;
7
- position: relative;
8
- text-align: left;
9
-
10
- &--first {
11
- stroke: var(--ffe-v-chart-donut-first-color);
12
- }
13
-
14
- &--last {
15
- stroke: var(--ffe-v-chart-donut-last-color);
16
- }
17
-
18
- &__circle,
19
- &__description {
20
- grid-column: 1 e('/') 1;
21
- grid-row: 1 e('/') 1;
22
- }
23
-
24
- &__circle {
25
- width: 12.5rem;
26
- aspect-ratio: 1;
27
- }
28
-
29
- &__description {
30
- z-index: 1;
31
- }
32
-
33
- &__name {
34
- color: var(--ffe-v-chart-donut-text-color);
35
- text-align: center;
36
- }
37
-
38
- &__fractions {
39
- display: grid;
40
- grid-template-columns: auto 1px auto;
41
- grid-template-rows: auto auto;
42
- grid-column-gap: var(--ffe-spacing-xs);
43
- &::after {
44
- grid-column: 2 e('/') 3;
45
- grid-row: 1 e('/') 2;
46
- display: flex;
47
- background: var(--ffe-v-chart-donut-text-color);
48
- height: 1lh;
49
- content: '';
50
- }
51
- }
52
-
53
- &__fraction {
54
- display: grid;
55
- place-items: center;
56
- }
57
-
58
- .ffe-chart-donut__amount {
59
- color: var(--ffe-v-chart-donut-text-color);
60
- }
61
-
62
- &__fraction:first-of-type {
63
- grid-column: 1 e('/') 2;
64
- grid-row: 1 e('/') 3;
65
- }
66
- &__fraction:last-of-type {
67
- grid-column: 3 e('/') 4;
68
- grid-row: 1 e('/') 3;
69
- }
70
- }
package/less/theme.less DELETED
@@ -1,14 +0,0 @@
1
- :root,
2
- :host {
3
- --ffe-v-chart-donut-first-color: var(--ffe-farge-vann);
4
- --ffe-v-chart-donut-last-color: var(--ffe-farge-fjell);
5
- --ffe-v-chart-donut-text-color: var(--ffe-farge-koksgraa);
6
-
7
- @media (prefers-color-scheme: dark) {
8
- .regard-color-scheme-preference {
9
- --ffe-v-chart-donut-first-color: var(--ffe-farge-vann-30);
10
- --ffe-v-chart-donut-last-color: var(--ffe-farge-vann-70);
11
- --ffe-v-chart-donut-text-color: var(--ffe-farge-lysgraa);
12
- }
13
- }
14
- }