sag_components 1.0.27 → 1.0.28

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.
Files changed (109) hide show
  1. package/dist/stories/Benchmark.stories.js +122 -0
  2. package/dist/stories/Benchmark.style.js +50 -0
  3. package/dist/stories/TotalDoughnutChart.stories.js +1 -1
  4. package/dist/stories/components/Benchmark.js +80 -0
  5. package/package.json +1 -1
  6. package/src/stories/Benchmark.stories.jsx +111 -0
  7. package/src/stories/Benchmark.style.js +82 -0
  8. package/src/stories/TotalDoughnutChart.stories.js +1 -1
  9. package/src/stories/components/Benchmark.jsx +75 -0
  10. package/storybook-static/256.47510a7e.iframe.bundle.js +0 -2
  11. package/storybook-static/256.47510a7e.iframe.bundle.js.LICENSE.txt +0 -9
  12. package/storybook-static/333.c94a363a.iframe.bundle.js +0 -1
  13. package/storybook-static/383.2aff9f43.iframe.bundle.js +0 -1
  14. package/storybook-static/385.7e265f0d.iframe.bundle.js +0 -402
  15. package/storybook-static/385.7e265f0d.iframe.bundle.js.LICENSE.txt +0 -53
  16. package/storybook-static/385.7e265f0d.iframe.bundle.js.map +0 -1
  17. package/storybook-static/433.06d7c436.iframe.bundle.js +0 -1
  18. package/storybook-static/446.dd9a0d77.iframe.bundle.js +0 -1
  19. package/storybook-static/463.60fe9b8e.iframe.bundle.js +0 -44
  20. package/storybook-static/463.60fe9b8e.iframe.bundle.js.map +0 -1
  21. package/storybook-static/537.29807a20.iframe.bundle.js +0 -121
  22. package/storybook-static/537.29807a20.iframe.bundle.js.map +0 -1
  23. package/storybook-static/55.d0744d52.iframe.bundle.js +0 -76
  24. package/storybook-static/55.d0744d52.iframe.bundle.js.LICENSE.txt +0 -26
  25. package/storybook-static/55.d0744d52.iframe.bundle.js.map +0 -1
  26. package/storybook-static/58.676f9d84.iframe.bundle.js +0 -1
  27. package/storybook-static/661.14a42934.iframe.bundle.js +0 -1
  28. package/storybook-static/720.f79ea110.iframe.bundle.js +0 -1
  29. package/storybook-static/923.47c94418.iframe.bundle.js +0 -1
  30. package/storybook-static/ButtonText-stories.ac096281.iframe.bundle.js +0 -1
  31. package/storybook-static/Dropdown-stories.825dde1a.iframe.bundle.js +0 -8
  32. package/storybook-static/Dropdown-stories.825dde1a.iframe.bundle.js.map +0 -1
  33. package/storybook-static/Introduction-mdx.f8264230.iframe.bundle.js +0 -2
  34. package/storybook-static/Introduction-mdx.f8264230.iframe.bundle.js.LICENSE.txt +0 -9
  35. package/storybook-static/OneColumnContainer-stories.65049871.iframe.bundle.js +0 -36
  36. package/storybook-static/OneColumnContainer-stories.65049871.iframe.bundle.js.LICENSE.txt +0 -18
  37. package/storybook-static/OneColumnContainer-stories.65049871.iframe.bundle.js.map +0 -1
  38. package/storybook-static/favicon.svg +0 -7
  39. package/storybook-static/iframe.html +0 -355
  40. package/storybook-static/index.html +0 -138
  41. package/storybook-static/index.json +0 -1
  42. package/storybook-static/main.612c6447.iframe.bundle.js +0 -1
  43. package/storybook-static/project.json +0 -1
  44. package/storybook-static/runtime~main.55585f00.iframe.bundle.js +0 -1
  45. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +0 -4
  46. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
  47. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js.map +0 -7
  48. package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js +0 -13
  49. package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
  50. package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js.map +0 -7
  51. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +0 -117
  52. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +0 -18
  53. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.map +0 -7
  54. package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js +0 -4
  55. package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js.LEGAL.txt +0 -0
  56. package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js.map +0 -7
  57. package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js +0 -4
  58. package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js.LEGAL.txt +0 -0
  59. package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js.map +0 -7
  60. package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js +0 -4
  61. package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js.LEGAL.txt +0 -0
  62. package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js.map +0 -7
  63. package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js +0 -4
  64. package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js.LEGAL.txt +0 -0
  65. package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js.map +0 -7
  66. package/storybook-static/sb-addons/interactions-8/manager-bundle.js +0 -31
  67. package/storybook-static/sb-addons/interactions-8/manager-bundle.js.LEGAL.txt +0 -18
  68. package/storybook-static/sb-addons/interactions-8/manager-bundle.js.map +0 -7
  69. package/storybook-static/sb-addons/links-0/manager-bundle.js +0 -4
  70. package/storybook-static/sb-addons/links-0/manager-bundle.js.LEGAL.txt +0 -0
  71. package/storybook-static/sb-addons/links-0/manager-bundle.js.map +0 -7
  72. package/storybook-static/sb-addons/storybook-10/manager-bundle.js +0 -4
  73. package/storybook-static/sb-addons/storybook-10/manager-bundle.js.LEGAL.txt +0 -0
  74. package/storybook-static/sb-addons/storybook-10/manager-bundle.js.map +0 -7
  75. package/storybook-static/sb-addons/storysource-9/manager-bundle.js +0 -23
  76. package/storybook-static/sb-addons/storysource-9/manager-bundle.js.LEGAL.txt +0 -14
  77. package/storybook-static/sb-addons/storysource-9/manager-bundle.js.map +0 -7
  78. package/storybook-static/sb-common-assets/fonts.css +0 -31
  79. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  80. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  81. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  82. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  83. package/storybook-static/sb-manager/GlobalScrollAreaStyles-XIHNDKUY-F4JIPIHL.js +0 -1
  84. package/storybook-static/sb-manager/OverlayScrollbars-VAV6LJAB-K3TMPSMY.js +0 -6
  85. package/storybook-static/sb-manager/WithTooltip-FBT32F6Q-7QJ37TCY.js +0 -1
  86. package/storybook-static/sb-manager/chunk-3FAXWWKG.js +0 -15
  87. package/storybook-static/sb-manager/chunk-54KM6K5Z.js +0 -7
  88. package/storybook-static/sb-manager/chunk-AS2AMEUR.js +0 -1
  89. package/storybook-static/sb-manager/chunk-F3MVQVF6.js +0 -207
  90. package/storybook-static/sb-manager/chunk-FENICTK6.js +0 -1
  91. package/storybook-static/sb-manager/chunk-GQDEE62S.js +0 -406
  92. package/storybook-static/sb-manager/chunk-PUVLCKJJ.js +0 -140
  93. package/storybook-static/sb-manager/chunk-QPL63VNK.js +0 -1
  94. package/storybook-static/sb-manager/formatter-S4K5WUZV-4LPR5OBX.js +0 -156
  95. package/storybook-static/sb-manager/globals.js +0 -1
  96. package/storybook-static/sb-manager/index.js +0 -1
  97. package/storybook-static/sb-manager/runtime.js +0 -1
  98. package/storybook-static/sb-manager/syntaxhighlighter-QTQ2UBB4-F5YUFYAB.js +0 -1
  99. package/storybook-static/sb-preview/globals.js +0 -1
  100. package/storybook-static/sb-preview/runtime.js +0 -105
  101. package/storybook-static/static/media/code-brackets.2e1112d7.svg +0 -1
  102. package/storybook-static/static/media/colors.a4bd0486.svg +0 -1
  103. package/storybook-static/static/media/comments.a3859089.svg +0 -1
  104. package/storybook-static/static/media/direction.b770f9af.svg +0 -1
  105. package/storybook-static/static/media/flow.edad2ac1.svg +0 -1
  106. package/storybook-static/static/media/plugin.d494b228.svg +0 -1
  107. package/storybook-static/static/media/repo.6d496322.svg +0 -1
  108. package/storybook-static/static/media/stackalt.dba9fbb3.svg +0 -1
  109. package/storybook-static/stories.json +0 -1
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = exports.LessAvarage = exports.GreaterAvarage = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _Benchmark = require("./components/Benchmark");
10
+ var _default = {
11
+ title: "SAG BI/Benchmark",
12
+ component: _Benchmark.Benchmark,
13
+ tags: ["autodocs"],
14
+ argTypes: {
15
+ currentValue: {
16
+ name: "currentValue",
17
+ control: {
18
+ type: "number",
19
+ min: 0,
20
+ max: 100000000000000
21
+ },
22
+ description: "curent value (<=100%) "
23
+ },
24
+ totalValue: {
25
+ name: "totalValue",
26
+ control: {
27
+ type: "number",
28
+ min: 0,
29
+ max: 100000000000000
30
+ },
31
+ description: "total value (100%) "
32
+ },
33
+ width: {
34
+ name: "width",
35
+ control: {
36
+ type: "number",
37
+ min: 0,
38
+ max: 600
39
+ },
40
+ description: "width of the control (in px)"
41
+ },
42
+ height: {
43
+ name: "height",
44
+ control: {
45
+ type: "number",
46
+ min: 0,
47
+ max: 600
48
+ },
49
+ description: "height of the control (in px)"
50
+ },
51
+ color: {
52
+ name: "color",
53
+ description: "Sets the color of current value when it is greater then 50% of total value",
54
+ control: {
55
+ type: "color",
56
+ presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"]
57
+ }
58
+ },
59
+ linearGradientColor: {
60
+ name: "linearGradientColor",
61
+ description: "Sets the linear-Gradient color of current value when it is greater then 50% of total value",
62
+ control: {
63
+ type: "color",
64
+ presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"]
65
+ }
66
+ },
67
+ underAvarageColor: {
68
+ name: "underAvarageColor",
69
+ description: "Sets the color of current value when it is under 50% of total value",
70
+ control: {
71
+ type: "color",
72
+ presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"]
73
+ }
74
+ },
75
+ linearGradientUnderAvarageColor: {
76
+ name: "linearGradientUnderAvarageColor",
77
+ description: "Sets the linear-Gradient color of current value when it is under 50% of total value",
78
+ control: {
79
+ type: "color",
80
+ presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"]
81
+ }
82
+ },
83
+ backgroundColor: {
84
+ name: "backgroundColor",
85
+ description: "Sets the background color of the control",
86
+ control: {
87
+ type: "color",
88
+ presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"]
89
+ }
90
+ }
91
+ }
92
+ };
93
+ exports.default = _default;
94
+ var Template = function Template(args) {
95
+ return /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, args);
96
+ };
97
+ var GreaterAvarage = Template.bind({});
98
+ exports.GreaterAvarage = GreaterAvarage;
99
+ GreaterAvarage.args = {
100
+ totalValue: 100000,
101
+ currentValue: 60000,
102
+ width: 100,
103
+ height: 12,
104
+ color: "#79DB95",
105
+ linearGradientColor: "#C3EFD0",
106
+ underAvarageColor: "#FD5959",
107
+ linearGradientUnderAvarageColor: "#FDB1B1",
108
+ backgroundColor: "#F2F2F2"
109
+ };
110
+ var LessAvarage = Template.bind({});
111
+ exports.LessAvarage = LessAvarage;
112
+ LessAvarage.args = {
113
+ totalValue: 1000,
114
+ currentValue: 400,
115
+ width: 100,
116
+ height: 12,
117
+ color: "#79DB95",
118
+ linearGradientColor: "#C3EFD0",
119
+ underAvarageColor: "#FD5959",
120
+ linearGradientUnderAvarageColor: "#FDB1B1",
121
+ backgroundColor: "#F2F2F2"
122
+ };
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.CurrentValueRectangle = exports.ControlsContainer = exports.Controls = exports.BackgroundValueRectangle = exports.AvarageDelimiter = void 0;
8
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
9
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
10
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
11
+ var ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n position: relative;\n margin: 0px 0 0px;\n font-family: \"Lato\", sans-serif;\n font-style: normal;\n width: ", ";\n height: ", ";\n //box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);\n border-radius: 100px;\n //border: 1px solid red;\n"])), function (props) {
12
+ return props.width.toString().concat("", "px");
13
+ }, function (props) {
14
+ return props.height.toString().concat("", "px");
15
+ });
16
+ exports.ControlsContainer = ControlsContainer;
17
+ var Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n border-radius: 100px;\n width: ", ";\n height: ", ";\n //background: #ffffff;\n //border: 1px solid blue;\n"])), function (props) {
18
+ return props.width.toString().concat("", "px");
19
+ }, function (props) {
20
+ return props.height.toString().concat("", "px");
21
+ });
22
+ exports.Controls = Controls;
23
+ var BackgroundValueRectangle = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: ", ";\n height: ", ";\n top: 0px;\n left: 0px;\n border-radius: 100px;\n background: ", ";\n //border: 1px solid orange;\n"])), function (props) {
24
+ return props.width.toString().concat("", "px");
25
+ }, function (props) {
26
+ return props.height.toString().concat("", "px");
27
+ }, function (props) {
28
+ return props.color;
29
+ });
30
+ exports.BackgroundValueRectangle = BackgroundValueRectangle;
31
+ var CurrentValueRectangle = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: ", ";\n height: ", ";\n top: 0px;\n left: 0px;\n border-radius: 100px;\n background: linear-gradient(\n 90deg,\n ", " 0%,\n ", " 100%\n );\n //border: 1px solid green;\n"])), function (props) {
32
+ return props.width.toString().concat("", "px");
33
+ }, function (props) {
34
+ return props.height.toString().concat("", "px");
35
+ }, function (props) {
36
+ return props.linearGradientColor;
37
+ }, function (props) {
38
+ return props.color;
39
+ });
40
+ exports.CurrentValueRectangle = CurrentValueRectangle;
41
+ var AvarageDelimiter = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n height: ", ";\n width: ", ";\n top: ", ";\n left: ", ";\n border: 1px solid #212121;\n"])), function (props) {
42
+ return props.height.toString().concat("", "px");
43
+ }, function (props) {
44
+ return props.width.toString().concat("", "px");
45
+ }, function (props) {
46
+ return props.top.toString().concat("", "px");
47
+ }, function (props) {
48
+ return props.left.toString().concat("", "px");
49
+ });
50
+ exports.AvarageDelimiter = AvarageDelimiter;
@@ -32,7 +32,7 @@ var arrLegendDat3rows = [{
32
32
  // { name: "My test 2", value: 35000, color: "#79DB95"},
33
33
  ];
34
34
  var _default = {
35
- title: "SAG/TotalDoughnutChart",
35
+ title: "SAG BI/TotalDoughnutChart",
36
36
  component: _TotalDoughnutChart.TotalDoughnutChart,
37
37
  tags: ["autodocs"],
38
38
  argTypes: {
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = exports.Benchmark = void 0;
8
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _BenchmarkStyle = require("../Benchmark.style.js");
11
+ var _excluded = ["totalValue", "currentValue", "width", "height", "color", "linearGradientColor", "underAvarageColor", "linearGradientUnderAvarageColor", "backgroundColor"];
12
+ /*Benchmark*/
13
+ var Benchmark = function Benchmark(_ref) {
14
+ var _ref$totalValue = _ref.totalValue,
15
+ totalValue = _ref$totalValue === void 0 ? 100 : _ref$totalValue,
16
+ _ref$currentValue = _ref.currentValue,
17
+ currentValue = _ref$currentValue === void 0 ? 60 : _ref$currentValue,
18
+ _ref$width = _ref.width,
19
+ width = _ref$width === void 0 ? 100 : _ref$width,
20
+ _ref$height = _ref.height,
21
+ height = _ref$height === void 0 ? 12 : _ref$height,
22
+ _ref$color = _ref.color,
23
+ color = _ref$color === void 0 ? "#79DB95" : _ref$color,
24
+ _ref$linearGradientCo = _ref.linearGradientColor,
25
+ linearGradientColor = _ref$linearGradientCo === void 0 ? "#C3EFD0" : _ref$linearGradientCo,
26
+ _ref$underAvarageColo = _ref.underAvarageColor,
27
+ underAvarageColor = _ref$underAvarageColo === void 0 ? "#FD5959" : _ref$underAvarageColo,
28
+ _ref$linearGradientUn = _ref.linearGradientUnderAvarageColor,
29
+ linearGradientUnderAvarageColor = _ref$linearGradientUn === void 0 ? "#FDB1B1" : _ref$linearGradientUn,
30
+ _ref$backgroundColor = _ref.backgroundColor,
31
+ backgroundColor = _ref$backgroundColor === void 0 ? "#F2F2F2" : _ref$backgroundColor,
32
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
33
+ var getCurrentValueRectangleWidth = function getCurrentValueRectangleWidth() {
34
+ if (!totalValue) return 0;
35
+ if (currentValue > totalValue) return width;
36
+ return currentValue / totalValue * width;
37
+ };
38
+ var getUnderAvarageColor = function getUnderAvarageColor() {
39
+ if (!totalValue) return backgroundColor;
40
+ if (currentValue > totalValue) return color;
41
+ if (currentValue / totalValue <= 0.5) {
42
+ return underAvarageColor;
43
+ } else {
44
+ return color;
45
+ }
46
+ };
47
+ var getUnderAvaragelinearGradientColor = function getUnderAvaragelinearGradientColor() {
48
+ if (!totalValue) return backgroundColor;
49
+ if (currentValue > totalValue) return linearGradientColor;
50
+ if (currentValue / totalValue <= 0.5) {
51
+ return linearGradientUnderAvarageColor;
52
+ } else {
53
+ return linearGradientColor;
54
+ }
55
+ };
56
+ return /*#__PURE__*/_react.default.createElement(_BenchmarkStyle.ControlsContainer, {
57
+ height: height,
58
+ width: width
59
+ }, /*#__PURE__*/_react.default.createElement(_BenchmarkStyle.Controls, {
60
+ height: height,
61
+ width: width
62
+ }, /*#__PURE__*/_react.default.createElement(_BenchmarkStyle.BackgroundValueRectangle, {
63
+ height: height,
64
+ width: width,
65
+ color: backgroundColor
66
+ }), /*#__PURE__*/_react.default.createElement(_BenchmarkStyle.CurrentValueRectangle, {
67
+ height: height,
68
+ width: getCurrentValueRectangleWidth(),
69
+ color: getUnderAvarageColor(),
70
+ linearGradientColor: getUnderAvaragelinearGradientColor()
71
+ }), /*#__PURE__*/_react.default.createElement(_BenchmarkStyle.AvarageDelimiter, {
72
+ height: height + 4,
73
+ width: 0,
74
+ top: -2,
75
+ left: width / 2
76
+ })));
77
+ };
78
+ exports.Benchmark = Benchmark;
79
+ var _default = Benchmark;
80
+ exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -0,0 +1,111 @@
1
+ import React from "react";
2
+ import { Benchmark } from "./components/Benchmark";
3
+
4
+ export default {
5
+ title: "SAG BI/Benchmark",
6
+ component: Benchmark,
7
+ tags: ["autodocs"],
8
+
9
+ argTypes: {
10
+ currentValue: {
11
+ name: "currentValue",
12
+ control: { type: "number", min: 0, max: 100000000000000 },
13
+ description: "curent value (<=100%) ",
14
+ },
15
+
16
+ totalValue: {
17
+ name: "totalValue",
18
+ control: { type: "number", min: 0, max: 100000000000000 },
19
+ description: "total value (100%) ",
20
+ },
21
+
22
+ width: {
23
+ name: "width",
24
+ control: { type: "number", min: 0, max: 600 },
25
+ description: "width of the control (in px)",
26
+ },
27
+
28
+ height: {
29
+ name: "height",
30
+ control: { type: "number", min: 0, max: 600 },
31
+ description: "height of the control (in px)",
32
+ },
33
+
34
+ color: {
35
+ name: "color",
36
+ description:
37
+ "Sets the color of current value when it is greater then 50% of total value",
38
+ control: {
39
+ type: "color",
40
+ presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"],
41
+ },
42
+ },
43
+
44
+ linearGradientColor: {
45
+ name: "linearGradientColor",
46
+ description:
47
+ "Sets the linear-Gradient color of current value when it is greater then 50% of total value",
48
+ control: {
49
+ type: "color",
50
+ presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"],
51
+ },
52
+ },
53
+
54
+ underAvarageColor: {
55
+ name: "underAvarageColor",
56
+ description:
57
+ "Sets the color of current value when it is under 50% of total value",
58
+ control: {
59
+ type: "color",
60
+ presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"],
61
+ },
62
+ },
63
+
64
+ linearGradientUnderAvarageColor: {
65
+ name: "linearGradientUnderAvarageColor",
66
+ description:
67
+ "Sets the linear-Gradient color of current value when it is under 50% of total value",
68
+ control: {
69
+ type: "color",
70
+ presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"],
71
+ },
72
+ },
73
+
74
+ backgroundColor: {
75
+ name: "backgroundColor",
76
+ description: "Sets the background color of the control",
77
+ control: {
78
+ type: "color",
79
+ presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"],
80
+ },
81
+ },
82
+ },
83
+ };
84
+
85
+ const Template = (args) => <Benchmark {...args} />;
86
+
87
+ export const GreaterAvarage = Template.bind({});
88
+ GreaterAvarage.args = {
89
+ totalValue: 100000,
90
+ currentValue: 60000,
91
+ width: 100,
92
+ height: 12,
93
+ color: "#79DB95",
94
+ linearGradientColor: "#C3EFD0",
95
+ underAvarageColor: "#FD5959",
96
+ linearGradientUnderAvarageColor: "#FDB1B1",
97
+ backgroundColor: "#F2F2F2",
98
+ };
99
+
100
+ export const LessAvarage = Template.bind({});
101
+ LessAvarage.args = {
102
+ totalValue: 1000,
103
+ currentValue: 400,
104
+ width: 100,
105
+ height: 12,
106
+ color: "#79DB95",
107
+ linearGradientColor: "#C3EFD0",
108
+ underAvarageColor: "#FD5959",
109
+ linearGradientUnderAvarageColor: "#FDB1B1",
110
+ backgroundColor: "#F2F2F2",
111
+ };
@@ -0,0 +1,82 @@
1
+ import styled from "styled-components";
2
+
3
+ export const ControlsContainer = styled.div`
4
+ display: flex;
5
+ position: relative;
6
+ margin: 0px 0 0px;
7
+ font-family: "Lato", sans-serif;
8
+ font-style: normal;
9
+ width: ${(props) => {
10
+ return props.width.toString().concat("", "px");
11
+ }};
12
+ height: ${(props) => {
13
+ return props.height.toString().concat("", "px");
14
+ }};
15
+ //box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
16
+ border-radius: 100px;
17
+ //border: 1px solid red;
18
+ `;
19
+
20
+ export const Controls = styled.div`
21
+ position: relative;
22
+ border-radius: 100px;
23
+ width: ${(props) => {
24
+ return props.width.toString().concat("", "px");
25
+ }};
26
+ height: ${(props) => {
27
+ return props.height.toString().concat("", "px");
28
+ }};
29
+ //background: #ffffff;
30
+ //border: 1px solid blue;
31
+ `;
32
+
33
+ export const BackgroundValueRectangle = styled.div`
34
+ position: absolute;
35
+ width: ${(props) => {
36
+ return props.width.toString().concat("", "px");
37
+ }};
38
+ height: ${(props) => {
39
+ return props.height.toString().concat("", "px");
40
+ }};
41
+ top: 0px;
42
+ left: 0px;
43
+ border-radius: 100px;
44
+ background: ${(props) => props.color};
45
+ //border: 1px solid orange;
46
+ `;
47
+
48
+ export const CurrentValueRectangle = styled.div`
49
+ position: absolute;
50
+ width: ${(props) => {
51
+ return props.width.toString().concat("", "px");
52
+ }};
53
+ height: ${(props) => {
54
+ return props.height.toString().concat("", "px");
55
+ }};
56
+ top: 0px;
57
+ left: 0px;
58
+ border-radius: 100px;
59
+ background: linear-gradient(
60
+ 90deg,
61
+ ${(props) => props.linearGradientColor} 0%,
62
+ ${(props) => props.color} 100%
63
+ );
64
+ //border: 1px solid green;
65
+ `;
66
+
67
+ export const AvarageDelimiter = styled.div`
68
+ position: absolute;
69
+ height: ${(props) => {
70
+ return props.height.toString().concat("", "px");
71
+ }};
72
+ width: ${(props) => {
73
+ return props.width.toString().concat("", "px");
74
+ }};
75
+ top: ${(props) => {
76
+ return props.top.toString().concat("", "px");
77
+ }};
78
+ left: ${(props) => {
79
+ return props.left.toString().concat("", "px");
80
+ }};
81
+ border: 1px solid #212121;
82
+ `;
@@ -15,7 +15,7 @@ const arrLegendDat3rows = [
15
15
 
16
16
 
17
17
  export default {
18
- title: "SAG/TotalDoughnutChart",
18
+ title: "SAG BI/TotalDoughnutChart",
19
19
  component: TotalDoughnutChart,
20
20
  tags: ["autodocs"],
21
21
 
@@ -0,0 +1,75 @@
1
+ import React from "react";
2
+
3
+ import {
4
+ ControlsContainer,
5
+ Controls,
6
+ BackgroundValueRectangle,
7
+ CurrentValueRectangle,
8
+ AvarageDelimiter,
9
+ } from "../Benchmark.style.js";
10
+
11
+ /*Benchmark*/
12
+ export const Benchmark = ({
13
+ totalValue = 100,
14
+ currentValue = 60,
15
+ width = 100,
16
+ height = 12,
17
+ color = "#79DB95",
18
+ linearGradientColor = "#C3EFD0",
19
+ underAvarageColor = "#FD5959",
20
+ linearGradientUnderAvarageColor = "#FDB1B1",
21
+ backgroundColor = "#F2F2F2",
22
+ ...props
23
+ }) => {
24
+ const getCurrentValueRectangleWidth = () => {
25
+ if (!totalValue) return 0;
26
+ if (currentValue > totalValue) return width;
27
+ return (currentValue / totalValue) * width;
28
+ };
29
+
30
+ const getUnderAvarageColor = () => {
31
+ if (!totalValue) return backgroundColor;
32
+ if (currentValue > totalValue) return color;
33
+ if (currentValue / totalValue <= 0.5) {
34
+ return underAvarageColor;
35
+ } else {
36
+ return color;
37
+ }
38
+ };
39
+
40
+ const getUnderAvaragelinearGradientColor = () => {
41
+ if (!totalValue) return backgroundColor;
42
+ if (currentValue > totalValue) return linearGradientColor;
43
+ if (currentValue / totalValue <= 0.5) {
44
+ return linearGradientUnderAvarageColor;
45
+ } else {
46
+ return linearGradientColor;
47
+ }
48
+ };
49
+
50
+ return (
51
+ <ControlsContainer height={height} width={width}>
52
+ <Controls height={height} width={width}>
53
+ <BackgroundValueRectangle
54
+ height={height}
55
+ width={width}
56
+ color={backgroundColor}
57
+ />
58
+ <CurrentValueRectangle
59
+ height={height}
60
+ width={getCurrentValueRectangleWidth()}
61
+ color={getUnderAvarageColor()}
62
+ linearGradientColor={getUnderAvaragelinearGradientColor()}
63
+ />
64
+ <AvarageDelimiter
65
+ height={height + 4}
66
+ width={0}
67
+ top={-2}
68
+ left={width / 2}
69
+ />
70
+ </Controls>
71
+ </ControlsContainer>
72
+ );
73
+ };
74
+
75
+ export default Benchmark;
@@ -1,2 +0,0 @@
1
- /*! For license information please see 256.47510a7e.iframe.bundle.js.LICENSE.txt */
2
- (self.webpackChunksag_storybook=self.webpackChunksag_storybook||[]).push([[256],{"./node_modules/react-is/cjs/react-is.production.min.js":function(__unused_webpack_module,exports){"use strict";var u,b=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h=Symbol.for("react.context"),k=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),n=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),t=Symbol.for("react.offscreen");function v(a){if("object"==typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}u=Symbol.for("react.module.reference"),exports.isValidElementType=function(a){return"string"==typeof a||"function"==typeof a||a===d||a===f||a===e||a===m||a===n||a===t||"object"==typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)},exports.typeOf=v},"./node_modules/react-is/index.js":function(module,__unused_webpack_exports,__webpack_require__){"use strict";module.exports=__webpack_require__("./node_modules/react-is/cjs/react-is.production.min.js")},"./node_modules/shallowequal/index.js":function(module){module.exports=function shallowEqual(objA,objB,compare,compareContext){var ret=compare?compare.call(compareContext,objA,objB):void 0;if(void 0!==ret)return!!ret;if(objA===objB)return!0;if("object"!=typeof objA||!objA||"object"!=typeof objB||!objB)return!1;var keysA=Object.keys(objA),keysB=Object.keys(objB);if(keysA.length!==keysB.length)return!1;for(var bHasOwnProperty=Object.prototype.hasOwnProperty.bind(objB),idx=0;idx<keysA.length;idx++){var key=keysA[idx];if(!bHasOwnProperty(key))return!1;var valueA=objA[key],valueB=objB[key];if(!1===(ret=compare?compare.call(compareContext,valueA,valueB,key):void 0)||void 0===ret&&valueA!==valueB)return!1}return!0}},"./node_modules/styled-components/dist/styled-components.browser.esm.js":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{ZP:function(){return styled_components_browser_esm}});var react_is=__webpack_require__("./node_modules/react-is/index.js"),react=__webpack_require__("./node_modules/react/index.js"),shallowequal=__webpack_require__("./node_modules/shallowequal/index.js"),shallowequal_default=__webpack_require__.n(shallowequal);var stylis_browser_esm=function stylis_min(W){function M(d,c,e,h,a){for(var q,g,k,y,C,m=0,b=0,v=0,n=0,x=0,K=0,u=k=q=0,l=0,r=0,I=0,t=0,B=e.length,J=B-1,f="",p="",F="",G="";l<B;){if(g=e.charCodeAt(l),l===J&&0!==b+n+v+m&&(0!==b&&(g=47===b?10:47),n=v=m=0,B++,J++),0===b+n+v+m){if(l===J&&(0<r&&(f=f.replace(N,"")),0<f.trim().length)){switch(g){case 32:case 9:case 59:case 13:case 10:break;default:f+=e.charAt(l)}g=59}switch(g){case 123:for(q=(f=f.trim()).charCodeAt(0),k=1,t=++l;l<B;){switch(g=e.charCodeAt(l)){case 123:k++;break;case 125:k--;break;case 47:switch(g=e.charCodeAt(l+1)){case 42:case 47:a:{for(u=l+1;u<J;++u)switch(e.charCodeAt(u)){case 47:if(42===g&&42===e.charCodeAt(u-1)&&l+2!==u){l=u+1;break a}break;case 10:if(47===g){l=u+1;break a}}l=u}}break;case 91:g++;case 40:g++;case 34:case 39:for(;l++<J&&e.charCodeAt(l)!==g;);}if(0===k)break;l++}if(k=e.substring(t,l),0===q&&(q=(f=f.replace(ca,"").trim()).charCodeAt(0)),64===q){switch(0<r&&(f=f.replace(N,"")),g=f.charCodeAt(1)){case 100:case 109:case 115:case 45:r=c;break;default:r=O}if(t=(k=M(c,r,k,g,a+1)).length,0<A&&(C=H(3,k,r=X(O,f,I),c,D,z,t,g,a,h),f=r.join(""),void 0!==C&&0===(t=(k=C.trim()).length)&&(g=0,k="")),0<t)switch(g){case 115:f=f.replace(da,ea);case 100:case 109:case 45:k=f+"{"+k+"}";break;case 107:k=(f=f.replace(fa,"$1 $2"))+"{"+k+"}",k=1===w||2===w&&L("@"+k,3)?"@-webkit-"+k+"@"+k:"@"+k;break;default:k=f+k,112===h&&(p+=k,k="")}else k=""}else k=M(c,X(c,f,I),k,h,a+1);F+=k,k=I=r=u=q=0,f="",g=e.charCodeAt(++l);break;case 125:case 59:if(1<(t=(f=(0<r?f.replace(N,""):f).trim()).length))switch(0===u&&(q=f.charCodeAt(0),45===q||96<q&&123>q)&&(t=(f=f.replace(" ",":")).length),0<A&&void 0!==(C=H(1,f,c,d,D,z,p.length,h,a,h))&&0===(t=(f=C.trim()).length)&&(f="\0\0"),q=f.charCodeAt(0),g=f.charCodeAt(1),q){case 0:break;case 64:if(105===g||99===g){G+=f+e.charAt(l);break}default:58!==f.charCodeAt(t-1)&&(p+=P(f,q,g,f.charCodeAt(2)))}I=r=u=q=0,f="",g=e.charCodeAt(++l)}}switch(g){case 13:case 10:47===b?b=0:0===1+q&&107!==h&&0<f.length&&(r=1,f+="\0"),0<A*Y&&H(0,f,c,d,D,z,p.length,h,a,h),z=1,D++;break;case 59:case 125:if(0===b+n+v+m){z++;break}default:switch(z++,y=e.charAt(l),g){case 9:case 32:if(0===n+m+b)switch(x){case 44:case 58:case 9:case 32:y="";break;default:32!==g&&(y=" ")}break;case 0:y="\\0";break;case 12:y="\\f";break;case 11:y="\\v";break;case 38:0===n+b+m&&(r=I=1,y="\f"+y);break;case 108:if(0===n+b+m+E&&0<u)switch(l-u){case 2:112===x&&58===e.charCodeAt(l-3)&&(E=x);case 8:111===K&&(E=K)}break;case 58:0===n+b+m&&(u=l);break;case 44:0===b+v+n+m&&(r=1,y+="\r");break;case 34:case 39:0===b&&(n=n===g?0:0===n?g:n);break;case 91:0===n+b+v&&m++;break;case 93:0===n+b+v&&m--;break;case 41:0===n+b+m&&v--;break;case 40:if(0===n+b+m){if(0===q)if(2*x+3*K==533);else q=1;v++}break;case 64:0===b+v+n+m+u+k&&(k=1);break;case 42:case 47:if(!(0<n+m+v))switch(b){case 0:switch(2*g+3*e.charCodeAt(l+1)){case 235:b=47;break;case 220:t=l,b=42}break;case 42:47===g&&42===x&&t+2!==l&&(33===e.charCodeAt(t+2)&&(p+=e.substring(t,l+1)),y="",b=0)}}0===b&&(f+=y)}K=x,x=g,l++}if(0<(t=p.length)){if(r=c,0<A&&(void 0!==(C=H(2,p,r,d,D,z,t,h,a,h))&&0===(p=C).length))return G+p+F;if(p=r.join(",")+"{"+p+"}",0!=w*E){switch(2!==w||L(p,2)||(E=0),E){case 111:p=p.replace(ha,":-moz-$1")+p;break;case 112:p=p.replace(Q,"::-webkit-input-$1")+p.replace(Q,"::-moz-$1")+p.replace(Q,":-ms-input-$1")+p}E=0}}return G+p+F}function X(d,c,e){var h=c.trim().split(ia);c=h;var a=h.length,m=d.length;switch(m){case 0:case 1:var b=0;for(d=0===m?"":d[0]+" ";b<a;++b)c[b]=Z(d,c[b],e).trim();break;default:var v=b=0;for(c=[];b<a;++b)for(var n=0;n<m;++n)c[v++]=Z(d[n]+" ",h[b],e).trim()}return c}function Z(d,c,e){var h=c.charCodeAt(0);switch(33>h&&(h=(c=c.trim()).charCodeAt(0)),h){case 38:return c.replace(F,"$1"+d.trim());case 58:return d.trim()+c.replace(F,"$1"+d.trim());default:if(0<1*e&&0<c.indexOf("\f"))return c.replace(F,(58===d.charCodeAt(0)?"":"$1")+d.trim())}return d+c}function P(d,c,e,h){var a=d+";",m=2*c+3*e+4*h;if(944===m){d=a.indexOf(":",9)+1;var b=a.substring(d,a.length-1).trim();return b=a.substring(0,d).trim()+b+";",1===w||2===w&&L(b,1)?"-webkit-"+b+b:b}if(0===w||2===w&&!L(a,1))return a;switch(m){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(ja,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(b=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+b+a;case 1005:return ka.test(a)?a.replace(aa,":-webkit-")+a.replace(aa,":-moz-")+a:a;case 1e3:switch(c=(b=a.substring(13).trim()).indexOf("-")+1,b.charCodeAt(0)+b.charCodeAt(c)){case 226:b=a.replace(G,"tb");break;case 232:b=a.replace(G,"tb-rl");break;case 220:b=a.replace(G,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+b+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(c=(a=d).length-10,m=(b=(33===a.charCodeAt(c)?a.substring(0,c):a).substring(d.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|b.charCodeAt(7))){case 203:if(111>b.charCodeAt(8))break;case 115:a=a.replace(b,"-webkit-"+b)+";"+a;break;case 207:case 102:a=a.replace(b,"-webkit-"+(102<m?"inline-":"")+"box")+";"+a.replace(b,"-webkit-"+b)+";"+a.replace(b,"-ms-"+b+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return b=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+b+"-ms-flex-"+b+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(ba,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(ba,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===la.test(d))return 115===(b=d.substring(d.indexOf(":")+1)).charCodeAt(0)?P(d.replace("stretch","fill-available"),c,e,h).replace(":fill-available",":stretch"):a.replace(b,"-webkit-"+b)+a.replace(b,"-moz-"+b.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===e+h&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(ma,"$1-webkit-$2")+a}return a}function L(d,c){var e=d.indexOf(1===c?":":"{"),h=d.substring(0,3!==c?e:10);return e=d.substring(e+1,d.length-1),R(2!==c?h:h.replace(na,"$1"),e,c)}function ea(d,c){var e=P(c,c.charCodeAt(0),c.charCodeAt(1),c.charCodeAt(2));return e!==c+";"?e.replace(oa," or ($1)").substring(4):"("+c+")"}function H(d,c,e,h,a,m,b,v,n,q){for(var w,g=0,x=c;g<A;++g)switch(w=S[g].call(B,d,x,e,h,a,m,b,v,n,q)){case void 0:case!1:case!0:case null:break;default:x=w}if(x!==c)return x}function U(d){return void 0!==(d=d.prefix)&&(R=null,d?"function"!=typeof d?w=1:(w=2,R=d):w=0),U}function B(d,c){var e=d;if(33>e.charCodeAt(0)&&(e=e.trim()),e=[e],0<A){var h=H(-1,c,e,e,D,z,0,0,0,0);void 0!==h&&"string"==typeof h&&(c=h)}var a=M(O,e,c,0,0);return 0<A&&(void 0!==(h=H(-2,a,e,e,D,z,a.length,0,0,0))&&(a=h)),"",E=0,z=D=1,a}var ca=/^\0+/g,N=/[\0\r\f]/g,aa=/: */g,ka=/zoo|gra/,ma=/([,: ])(transform)/g,ia=/,\r+?/g,F=/([\t\r\n ])*\f?&/g,fa=/@(k\w+)\s*(\S*)\s*/,Q=/::(place)/g,ha=/:(read-only)/g,G=/[svh]\w+-[tblr]{2}/,da=/\(\s*(.*)\s*\)/g,oa=/([\s\S]*?);/g,ba=/-self|flex-/g,na=/[^]*?(:[rp][el]a[\w-]+)[^]*/,la=/stretch|:\s*\w+\-(?:conte|avail)/,ja=/([^-])(image-set\()/,z=1,D=1,E=0,w=1,O=[],S=[],A=0,R=null,Y=0;return B.use=function T(d){switch(d){case void 0:case null:A=S.length=0;break;default:if("function"==typeof d)S[A++]=d;else if("object"==typeof d)for(var c=0,e=d.length;c<e;++c)T(d[c]);else Y=0|!!d}return T},B.set=U,void 0!==W&&U(W),B},unitless_browser_esm={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},emotion_is_prop_valid_esm=__webpack_require__("./node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js"),hoist_non_react_statics_cjs=__webpack_require__("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),hoist_non_react_statics_cjs_default=__webpack_require__.n(hoist_non_react_statics_cjs),process=__webpack_require__("./node_modules/process/browser.js");function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var g=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},S=function(t){return null!==t&&"object"==typeof t&&"[object Object]"===(t.toString?t.toString():Object.prototype.toString.call(t))&&!(0,react_is.typeOf)(t)},w=Object.freeze([]),E=Object.freeze({});function b(e){return"function"==typeof e}function _(e){return e.displayName||e.name||"Component"}function N(e){return e&&"string"==typeof e.styledComponentId}var A=void 0!==process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",I="undefined"!=typeof window&&"HTMLElement"in window,P=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==process&&void 0!==process.env&&(void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&("false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY)));function j(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var T=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&j(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=0,c=t.length;a<c;a++)this.tag.insertRule(i,t[a])&&(this.groupSizes[e]++,i++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+=this.tag.getRule(s)+"/*!sc*/\n";return t},e}(),x=new Map,k=new Map,V=1,B=function(e){if(x.has(e))return x.get(e);for(;k.has(V);)V++;var t=V++;return x.set(e,t),k.set(t,e),t},z=function(e){return k.get(e)},M=function(e,t){t>=V&&(V=t+1),x.set(e,t),k.set(t,e)},G="style["+A+'][data-styled-version="5.3.10"]',L=new RegExp("^"+A+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),F=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},Y=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],o=0,s=n.length;o<s;o++){var i=n[o].trim();if(i){var a=i.match(L);if(a){var c=0|parseInt(a[1],10),u=a[2];0!==c&&(M(u,c),F(e,u,a[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(i)}}},q=function(){return __webpack_require__.nc},H=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(A))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(A,"active"),r.setAttribute("data-styled-version","5.3.10");var i=q();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},$=function(){function e(e){var t=this.element=H(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}j(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),W=function(){function e(e){var t=this.element=H(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),U=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),J=I,X={isServer:!I,useCSSOMInjection:!P},Z=function(){function e(e,t,n){void 0===e&&(e=E),void 0===t&&(t={}),this.options=v({},X,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&I&&J&&(J=!1,function(e){for(var t=document.querySelectorAll(G),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(A)&&(Y(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return B(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(v({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new U(o):r?new $(o):new W(o),new T(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(B(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(B(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(B(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var s=z(o);if(void 0!==s){var i=e.names.get(s),a=t.getGroup(o);if(i&&a&&i.size){var c=A+".g"+o+'[id="'+s+'"]',u="";void 0!==i&&i.forEach((function(e){e.length>0&&(u+=e+",")})),r+=""+a+c+'{content:"'+u+'"}/*!sc*/\n'}}}return r}(this)},e}(),K=/(a)(d)/gi,Q=function(e){return String.fromCharCode(e+(e>25?39:97))};function ee(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Q(t%52)+n;return(Q(t%52)+n).replace(K,"$1-$2")}var te=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},ne=function(e){return te(5381,e)};function re(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(b(n)&&!N(n))return!1}return!0}var oe=ne("5.3.10"),se=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&re(e),this.componentId=t,this.baseHash=te(oe,t),this.baseStyle=n,Z.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var s=Ne(this.rules,e,t,n).join(""),i=ee(te(this.baseHash,s)>>>0);if(!t.hasNameForId(r,i)){var a=n(s,"."+i,void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,u=te(this.baseHash,n.hash),l="",d=0;d<c;d++){var h=this.rules[d];if("string"==typeof h)l+=h;else if(h){var p=Ne(h,e,t,n),f=Array.isArray(p)?p.join(""):p;u=te(u,f+d),l+=f}}if(l){var m=ee(u>>>0);if(!t.hasNameForId(r,m)){var y=n(l,"."+m,void 0,r);t.insertRules(r,m,y)}o.push(m)}}return o.join(" ")},e}(),ie=/^\s*\/\/.*$/gm,ae=[":","[",".","#"];function ce(e){var t,n,r,o,s=void 0===e?E:e,i=s.options,a=void 0===i?E:i,c=s.plugins,u=void 0===c?w:c,l=new stylis_browser_esm(a),d=[],h=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,s,i,a,c,u,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){d.push(e)})),f=function(e,r,s){return 0===r&&-1!==ae.indexOf(s[n.length])||s.match(o)?e:"."+t};function m(e,s,i,a){void 0===a&&(a="&");var c=e.replace(ie,""),u=s&&i?i+" "+s+" { "+c+" }":c;return t=a,n=s,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),l(i||!s?"":s,u)}return l.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f))},h,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||j(15),te(e,t.name)}),5381).toString():"",m}var ue=react.createContext(),de=(ue.Consumer,react.createContext()),he=(de.Consumer,new Z),pe=ce();function fe(){return(0,react.useContext)(ue)||he}function me(){return(0,react.useContext)(de)||pe}function ye(e){var t=(0,react.useState)(e.stylisPlugins),n=t[0],s=t[1],c=fe(),u=(0,react.useMemo)((function(){var t=c;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=(0,react.useMemo)((function(){return ce({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,react.useEffect)((function(){shallowequal_default()(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),react.createElement(ue.Provider,{value:u},react.createElement(de.Provider,{value:l},e.children))}var ve=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=pe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return j(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=pe),this.name+e.hash},e}(),ge=/([A-Z])/,Se=/([A-Z])/g,we=/^ms-/,Ee=function(e){return"-"+e.toLowerCase()};function be(e){return ge.test(e)?e.replace(Se,Ee).replace(we,"-ms-"):e}var _e=function(e){return null==e||!1===e||""===e};function Ne(e,n,r,o){if(Array.isArray(e)){for(var s,i=[],a=0,c=e.length;a<c;a+=1)""!==(s=Ne(e[a],n,r,o))&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));return i}return _e(e)?"":N(e)?"."+e.styledComponentId:b(e)?"function"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!n?e:Ne(e(n),n,r,o):e instanceof ve?r?(e.inject(r,o),e.getName(o)):e:S(e)?function e(t,n){var r,o,s=[];for(var i in t)t.hasOwnProperty(i)&&!_e(t[i])&&(Array.isArray(t[i])&&t[i].isCss||b(t[i])?s.push(be(i)+":",t[i],";"):S(t[i])?s.push.apply(s,e(t[i],i)):s.push(be(i)+": "+(r=i,(null==(o=t[i])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in unitless_browser_esm||r.startsWith("--")?String(o).trim():o+"px")+";")));return n?[n+" {"].concat(s,["}"]):s}(e):e.toString();var l}var Ae=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Ce(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return b(e)||S(e)?Ae(Ne(g(w,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:Ae(Ne(g(e,n)))}new Set;var Re=function(e,t,n){return void 0===n&&(n=E),e.theme!==n.theme&&e.theme||t||n.theme},De=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,je=/(^-|-$)/g;function Te(e){return e.replace(De,"-").replace(je,"")}var xe=function(e){return ee(ne(e)>>>0)};function ke(e){return"string"==typeof e&&!0}var Ve=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Be=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function ze(e,t,n){var r=e[n];Ve(t)&&Ve(r)?Me(r,t):e[n]=t}function Me(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,s=n;o<s.length;o++){var i=s[o];if(Ve(i))for(var a in i)Be(a)&&ze(e,i[a],a)}return e}var Ge=react.createContext();Ge.Consumer;var Ye={};function qe(e,t,n){var o=N(e),i=!ke(e),a=t.attrs,c=void 0===a?w:a,d=t.componentId,h=void 0===d?function(e,t){var n="string"!=typeof e?"sc":Te(e);Ye[n]=(Ye[n]||0)+1;var r=n+"-"+xe("5.3.10"+n+Ye[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):d,p=t.displayName,f=void 0===p?function(e){return ke(e)?"styled."+e:"Styled("+_(e)+")"}(e):p,g=t.displayName&&t.componentId?Te(t.displayName)+"-"+t.componentId:t.componentId||h,S=o&&e.attrs?Array.prototype.concat(e.attrs,c).filter(Boolean):c,A=t.shouldForwardProp;o&&e.shouldForwardProp&&(A=t.shouldForwardProp?function(n,r,o){return e.shouldForwardProp(n,r,o)&&t.shouldForwardProp(n,r,o)}:e.shouldForwardProp);var C,I=new se(n,g,o?e.componentStyle:void 0),P=I.isStatic&&0===c.length,O=function(e,t){return function(e,t,n,r){var o=e.attrs,i=e.componentStyle,a=e.defaultProps,c=e.foldedComponentIds,d=e.shouldForwardProp,h=e.styledComponentId,p=e.target,f=function(e,t,n){void 0===e&&(e=E);var r=v({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,s,i=e;for(t in b(i)&&(i=i(r)),i)r[t]=o[t]="className"===t?(n=o[t],s=i[t],n&&s?n+" "+s:n||s):i[t]})),[r,o]}(Re(t,(0,react.useContext)(Ge),a)||E,t,o),y=f[0],g=f[1],S=function(e,t,n,r){var o=fe(),s=me();return t?e.generateAndInjectStyles(E,o,s):e.generateAndInjectStyles(n,o,s)}(i,r,y),w=n,_=g.$as||t.$as||g.as||t.as||p,N=ke(_),A=g!==t?v({},t,{},g):t,C={};for(var I in A)"$"!==I[0]&&"as"!==I&&("forwardedAs"===I?C.as=A[I]:(d?d(I,emotion_is_prop_valid_esm.Z,_):!N||(0,emotion_is_prop_valid_esm.Z)(I))&&(C[I]=A[I]));return t.style&&g.style!==t.style&&(C.style=v({},t.style,{},g.style)),C.className=Array.prototype.concat(c,h,S!==h?S:null,t.className,g.className).filter(Boolean).join(" "),C.ref=w,(0,react.createElement)(_,C)}(C,e,t,P)};return O.displayName=f,(C=react.forwardRef(O)).attrs=S,C.componentStyle=I,C.displayName=f,C.shouldForwardProp=A,C.foldedComponentIds=o?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):w,C.styledComponentId=g,C.target=o?e.target:e,C.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["componentId"]),s=r&&r+"-"+(ke(e)?e:Te(_(e)));return qe(e,v({},o,{attrs:S,componentId:s}),n)},Object.defineProperty(C,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=o?Me({},e.defaultProps,t):t}}),Object.defineProperty(C,"toString",{value:function(){return"."+C.styledComponentId}}),i&&hoist_non_react_statics_cjs_default()(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),C}var He=function(e){return function e(t,r,o){if(void 0===o&&(o=E),!(0,react_is.isValidElementType)(r))return j(1,String(r));var s=function(){return t(r,o,Ce.apply(void 0,arguments))};return s.withConfig=function(n){return e(t,r,v({},o,{},n))},s.attrs=function(n){return e(t,r,v({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},s}(qe,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){He[e]=He(e)}));!function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=re(e),Z.registerId(this.componentId+1)}var t=e.prototype;t.createStyles=function(e,t,n,r){var o=r(Ne(this.rules,t,n,r).join(""),""),s=this.componentId+e;n.insertRules(s,s,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&Z.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}();!function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=q();return"<style "+[n&&'nonce="'+n+'"',A+'="true"','data-styled-version="5.3.10"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?j(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return j(2);var n=((t={})[A]="",t["data-styled-version"]="5.3.10",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=q();return o&&(n.nonce=o),[react.createElement("style",v({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new Z({isServer:!0}),this.sealed=!1}var t=e.prototype;t.collectStyles=function(e){return this.sealed?j(2):react.createElement(ye,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return j(3)}}();var styled_components_browser_esm=He}}]);
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-is.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */