@sb1/ffe-chart-donut-react 5.3.0 → 5.3.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,8 +1,11 @@
1
1
  .ffe-chart-donut {
2
- height: 200px;
2
+ display: grid;
3
+ width: fit-content;
4
+ grid-template-columns: auto;
5
+ grid-template-rows: auto;
6
+ place-items: center;
3
7
  position: relative;
4
8
  text-align: left;
5
- width: 200px;
6
9
 
7
10
  &--first {
8
11
  stroke: var(--ffe-v-chart-donut-first-color);
@@ -12,27 +15,19 @@
12
15
  stroke: var(--ffe-v-chart-donut-last-color);
13
16
  }
14
17
 
15
- &__circle {
16
- height: 100%;
17
- margin: 0 auto;
18
- position: absolute;
19
- width: 100%;
18
+ &__circle,
19
+ &__description {
20
+ grid-column: 1/1;
21
+ grid-row: 1/1;
22
+ }
20
23
 
21
- @media (min-width: @breakpoint-md) {
22
- margin: inherit;
23
- width: 200px;
24
- }
24
+ &__circle {
25
+ width: 12.5rem;
26
+ aspect-ratio: 1;
25
27
  }
26
28
 
27
29
  &__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
- }
30
+ z-index: 1;
36
31
  }
37
32
 
38
33
  &__name {
@@ -41,31 +36,35 @@
41
36
  }
42
37
 
43
38
  &__fractions {
44
- display: flex;
45
- justify-content: space-around;
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/3;
45
+ grid-row: 1/2;
46
+ display: flex;
47
+ background: var(--ffe-v-chart-donut-text-color);
48
+ height: 1lh;
49
+ content: '';
50
+ }
46
51
  }
47
52
 
48
53
  &__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
- }
54
+ display: grid;
55
+ place-items: center;
56
+ }
58
57
 
59
- > .ffe-chart-donut__amount {
60
- border-left: 1px solid var(--ffe-farge-graa);
61
- padding-left: 20px;
58
+ .ffe-chart-donut__amount {
59
+ color: var(--ffe-v-chart-donut-text-color);
60
+ }
62
61
 
63
- .native & {
64
- @media (prefers-color-scheme: dark) {
65
- color: var(--ffe-v-chart-donut-text-color);
66
- }
67
- }
68
- }
69
- }
62
+ &__fraction:first-of-type {
63
+ grid-column: 1/2;
64
+ grid-row: 1/3;
65
+ }
66
+ &__fraction:last-of-type {
67
+ grid-column: 3/4;
68
+ grid-row: 1/3;
70
69
  }
71
70
  }
package/lib/ChartDonut.js CHANGED
@@ -97,5 +97,4 @@ ChartDonut.propTypes = {
97
97
  /** The percentage for the right-most value */
98
98
  percentage: _propTypes.number.isRequired
99
99
  };
100
- var _default = ChartDonut;
101
- exports.default = _default;
100
+ var _default = exports.default = ChartDonut;
package/lib/index.js CHANGED
@@ -6,5 +6,4 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _ChartDonut = _interopRequireDefault(require("./ChartDonut"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- var _default = _ChartDonut.default;
10
- exports.default = _default;
9
+ var _default = exports.default = _ChartDonut.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-chart-donut-react",
3
- "version": "5.3.0",
3
+ "version": "5.3.2",
4
4
  "description": "Donut chart in SVG",
5
5
  "keywords": [
6
6
  "ffe"
@@ -30,7 +30,7 @@
30
30
  "prop-types": "^15.7.2"
31
31
  },
32
32
  "devDependencies": {
33
- "@sb1/ffe-buildtool": "^0.5.0",
33
+ "@sb1/ffe-buildtool": "^0.5.1",
34
34
  "react": "^16.9.0",
35
35
  "react-dom": "^16.9.0"
36
36
  },
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "2717d62c2fe4125c7160d0253f4bcc56fde9e06e"
43
+ "gitHead": "5a97b2a67e41d2f06645cf8ece8ba15d5c4abc7c"
44
44
  }