@sb1/ffe-chart-donut-react 9.0.0 → 9.0.2

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;
@@ -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": "9.0.0",
3
+ "version": "9.0.2",
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": "c5ef203829fe683c55998343386b8c9cba91f68d"
42
+ "gitHead": "d6c86c57a6cc85b0fd722ebcc999cf52ac3108d4"
43
43
  }
@@ -1,73 +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-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/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
- }