@selfdecode/sd-component-library 4.0.81 → 4.0.83

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 (155) hide show
  1. package/lib/components/accordions/sublist-accordion/interfaces.d.ts +6 -13
  2. package/lib/components/accordions/sublist-accordion/sublist-accordian.stories.d.ts +0 -1
  3. package/lib/core/functions.d.ts +2 -0
  4. package/lib/sd-component-library.js +392 -390
  5. package/lib/sd-component-library101.js +4 -4
  6. package/lib/sd-component-library107.js +1 -1
  7. package/lib/sd-component-library113.js +1 -1
  8. package/lib/sd-component-library121.js +1 -1
  9. package/lib/sd-component-library122.js +1 -1
  10. package/lib/sd-component-library15.js +1 -1
  11. package/lib/sd-component-library161.js +1 -1
  12. package/lib/sd-component-library166.js +1 -1
  13. package/lib/sd-component-library190.js +3 -3
  14. package/lib/sd-component-library195.js +57 -2
  15. package/lib/sd-component-library195.js.map +1 -1
  16. package/lib/sd-component-library196.js +25 -30
  17. package/lib/sd-component-library196.js.map +1 -1
  18. package/lib/sd-component-library197.js +18 -598
  19. package/lib/sd-component-library197.js.map +1 -1
  20. package/lib/sd-component-library198.js +5 -25
  21. package/lib/sd-component-library198.js.map +1 -1
  22. package/lib/sd-component-library199.js +5 -19
  23. package/lib/sd-component-library199.js.map +1 -1
  24. package/lib/sd-component-library200.js +65 -5
  25. package/lib/sd-component-library200.js.map +1 -1
  26. package/lib/sd-component-library201.js +18 -5
  27. package/lib/sd-component-library201.js.map +1 -1
  28. package/lib/sd-component-library202.js +2 -57
  29. package/lib/sd-component-library202.js.map +1 -1
  30. package/lib/sd-component-library203.js +30 -65
  31. package/lib/sd-component-library203.js.map +1 -1
  32. package/lib/sd-component-library204.js +599 -18
  33. package/lib/sd-component-library204.js.map +1 -1
  34. package/lib/sd-component-library216.js +3 -46
  35. package/lib/sd-component-library216.js.map +1 -1
  36. package/lib/sd-component-library217.js +52 -3
  37. package/lib/sd-component-library217.js.map +1 -1
  38. package/lib/sd-component-library218.js +45 -51
  39. package/lib/sd-component-library218.js.map +1 -1
  40. package/lib/sd-component-library219.js +61 -12
  41. package/lib/sd-component-library219.js.map +1 -1
  42. package/lib/sd-component-library220.js +3 -65
  43. package/lib/sd-component-library220.js.map +1 -1
  44. package/lib/sd-component-library221.js +16 -3
  45. package/lib/sd-component-library221.js.map +1 -1
  46. package/lib/sd-component-library222.js +26 -3
  47. package/lib/sd-component-library222.js.map +1 -1
  48. package/lib/sd-component-library223.js +3 -26
  49. package/lib/sd-component-library223.js.map +1 -1
  50. package/lib/sd-component-library225.js +19 -129
  51. package/lib/sd-component-library225.js.map +1 -1
  52. package/lib/sd-component-library226.js +19 -42
  53. package/lib/sd-component-library226.js.map +1 -1
  54. package/lib/sd-component-library227.js +28 -47
  55. package/lib/sd-component-library227.js.map +1 -1
  56. package/lib/sd-component-library228.js +32 -7
  57. package/lib/sd-component-library228.js.map +1 -1
  58. package/lib/sd-component-library229.js +3 -3
  59. package/lib/sd-component-library229.js.map +1 -1
  60. package/lib/sd-component-library23.js +2 -2
  61. package/lib/sd-component-library230.js +129 -19
  62. package/lib/sd-component-library230.js.map +1 -1
  63. package/lib/sd-component-library231.js +42 -19
  64. package/lib/sd-component-library231.js.map +1 -1
  65. package/lib/sd-component-library232.js +47 -28
  66. package/lib/sd-component-library232.js.map +1 -1
  67. package/lib/sd-component-library233.js +7 -32
  68. package/lib/sd-component-library233.js.map +1 -1
  69. package/lib/sd-component-library234.js +20 -47
  70. package/lib/sd-component-library234.js.map +1 -1
  71. package/lib/sd-component-library235.js +101 -67
  72. package/lib/sd-component-library235.js.map +1 -1
  73. package/lib/sd-component-library236.js +46 -63
  74. package/lib/sd-component-library236.js.map +1 -1
  75. package/lib/sd-component-library237.js +24 -43
  76. package/lib/sd-component-library237.js.map +1 -1
  77. package/lib/sd-component-library238.js +52 -12
  78. package/lib/sd-component-library238.js.map +1 -1
  79. package/lib/sd-component-library239.js +63 -28
  80. package/lib/sd-component-library239.js.map +1 -1
  81. package/lib/sd-component-library24.js +2 -2
  82. package/lib/sd-component-library240.js +43 -3
  83. package/lib/sd-component-library240.js.map +1 -1
  84. package/lib/sd-component-library241.js +12 -23
  85. package/lib/sd-component-library241.js.map +1 -1
  86. package/lib/sd-component-library242.js +48 -3
  87. package/lib/sd-component-library242.js.map +1 -1
  88. package/lib/sd-component-library243.js +74 -324
  89. package/lib/sd-component-library243.js.map +1 -1
  90. package/lib/sd-component-library244.js +41 -5
  91. package/lib/sd-component-library244.js.map +1 -1
  92. package/lib/sd-component-library245.js +27 -2
  93. package/lib/sd-component-library245.js.map +1 -1
  94. package/lib/sd-component-library246.js +323 -19
  95. package/lib/sd-component-library246.js.map +1 -1
  96. package/lib/sd-component-library247.js +5 -20
  97. package/lib/sd-component-library247.js.map +1 -1
  98. package/lib/sd-component-library248.js +2 -21
  99. package/lib/sd-component-library248.js.map +1 -1
  100. package/lib/sd-component-library249.js +19 -107
  101. package/lib/sd-component-library249.js.map +1 -1
  102. package/lib/sd-component-library25.js +1 -1
  103. package/lib/sd-component-library250.js +20 -47
  104. package/lib/sd-component-library250.js.map +1 -1
  105. package/lib/sd-component-library251.js +28 -23
  106. package/lib/sd-component-library251.js.map +1 -1
  107. package/lib/sd-component-library252.js +3 -53
  108. package/lib/sd-component-library252.js.map +1 -1
  109. package/lib/sd-component-library253.js +17 -18
  110. package/lib/sd-component-library253.js.map +1 -1
  111. package/lib/sd-component-library254.js +3 -22
  112. package/lib/sd-component-library254.js.map +1 -1
  113. package/lib/sd-component-library255.js +23 -39
  114. package/lib/sd-component-library255.js.map +1 -1
  115. package/lib/sd-component-library256.js +20 -25
  116. package/lib/sd-component-library256.js.map +1 -1
  117. package/lib/sd-component-library259.js +1 -1
  118. package/lib/sd-component-library309.js +88 -20
  119. package/lib/sd-component-library309.js.map +1 -1
  120. package/lib/sd-component-library310.js +50 -34
  121. package/lib/sd-component-library310.js.map +1 -1
  122. package/lib/sd-component-library311.js +34 -50
  123. package/lib/sd-component-library311.js.map +1 -1
  124. package/lib/sd-component-library312.js +20 -88
  125. package/lib/sd-component-library312.js.map +1 -1
  126. package/lib/sd-component-library32.js +1 -1
  127. package/lib/sd-component-library33.js +1 -1
  128. package/lib/sd-component-library4.js +15 -10
  129. package/lib/sd-component-library4.js.map +1 -1
  130. package/lib/sd-component-library49.js +1 -1
  131. package/lib/sd-component-library50.js +1 -1
  132. package/lib/sd-component-library59.js +1 -1
  133. package/lib/sd-component-library6.js +41 -44
  134. package/lib/sd-component-library6.js.map +1 -1
  135. package/lib/sd-component-library60.js +1 -1
  136. package/lib/sd-component-library69.js +2 -2
  137. package/lib/sd-component-library70.js +3 -3
  138. package/lib/sd-component-library71.js +1 -1
  139. package/lib/sd-component-library72.js +1 -1
  140. package/lib/sd-component-library74.js +1 -1
  141. package/lib/sd-component-library75.js +1 -1
  142. package/lib/sd-component-library80.js +1 -1
  143. package/lib/sd-component-library81.js +5 -5
  144. package/lib/sd-component-library82.js +1 -1
  145. package/lib/sd-component-library83.js +1 -1
  146. package/lib/sd-component-library84.js +4 -4
  147. package/lib/sd-component-library87.js +5 -5
  148. package/lib/sd-component-library89.js +6 -6
  149. package/lib/sd-component-library93.js +2 -2
  150. package/lib/sd-component-library94.js +3 -3
  151. package/lib/sd-component-library95.js +2 -2
  152. package/lib/sd-component-library96.js +3 -3
  153. package/lib/sd-component-library97.js +2 -2
  154. package/lib/sd-component-library99.js +4 -4
  155. package/package.json +1 -1
@@ -1,32 +1,67 @@
1
- import { j as n } from "./sd-component-library190.js";
2
- import { Button as a } from "./sd-component-library25.js";
3
- const u = (r) => {
1
+ import { j as a } from "./sd-component-library190.js";
2
+ import { getCoordinateForArc as i } from "./sd-component-library86.js";
3
+ import { defaultTextBottomMargin as X } from "./sd-component-library223.js";
4
+ import { getRangeProperties as Y } from "./sd-component-library313.js";
5
+ import { BaseOutlineArc as b } from "./sd-component-library312.js";
6
+ import { DiscreteMeterLabelPointer as w } from "./sd-component-library314.js";
7
+ function z(s) {
4
8
  const {
5
- borderColor: e,
6
- borderStyle: o,
7
- borderWidth: i,
8
- fill: d,
9
- width: l,
10
- height: h,
11
- disabled: t
12
- } = r;
13
- return /* @__PURE__ */ n.jsx(
14
- a,
15
- {
16
- ...r,
17
- width: l || ["30px"],
18
- height: h || ["30px"],
19
- borderColor: t ? "cl_lightGrey" : e || "#4668F8",
20
- borderStyle: o || "solid",
21
- borderWidth: i || "2px",
22
- fill: t ? "cl_lightGrey" : d || "#4668F8",
23
- "data-testid": "square-button",
24
- variant: "_square",
25
- children: r.children
26
- }
27
- );
28
- };
9
+ color: n,
10
+ idx: c,
11
+ gaugeWidth: d,
12
+ diameter: g,
13
+ arc: m,
14
+ distanceBetweenRanges: l,
15
+ totalRanges: p,
16
+ showLabel: h,
17
+ label: o,
18
+ isMatchedRange: x,
19
+ pointerWidth: f,
20
+ pointerLength: A,
21
+ horizontal: u
22
+ } = s, t = g / 2, { rangeArcStart: r, rangeArcEnd: e } = Y(
23
+ m,
24
+ p,
25
+ l,
26
+ c
27
+ ), { x: R, y: j } = i(
28
+ t,
29
+ r
30
+ ), { x: B, y: E } = i(
31
+ t,
32
+ e
33
+ ), M = (r + e) / 2;
34
+ return /* @__PURE__ */ a.jsxs("g", { children: [
35
+ /* @__PURE__ */ a.jsx(
36
+ b,
37
+ {
38
+ startX: R,
39
+ startY: j,
40
+ endX: B,
41
+ endY: E,
42
+ startAlpha: r,
43
+ endAlpha: e,
44
+ color: n,
45
+ radius: t,
46
+ width: d
47
+ }
48
+ ),
49
+ h && o && !x && /* @__PURE__ */ a.jsx(
50
+ w,
51
+ {
52
+ alpha: M,
53
+ pointerLength: A,
54
+ pointerWidth: f,
55
+ radius: t,
56
+ color: n,
57
+ textBottomMargin: X,
58
+ label: o,
59
+ horizontal: u
60
+ }
61
+ )
62
+ ] });
63
+ }
29
64
  export {
30
- u as SquareButton
65
+ z as DiscreteRange
31
66
  };
32
67
  //# sourceMappingURL=sd-component-library239.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sd-component-library239.js","sources":["../src/components/buttons/partials/square-button/square-button.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Button } from \"../../button\";\nimport { SquareButtonProps } from \"./interfaces\";\n\n/**\n * The circle button.\n */\nexport const SquareButton: React.FC<SquareButtonProps> = (props) => {\n const {\n borderColor,\n borderStyle,\n borderWidth,\n fill,\n width,\n height,\n disabled,\n } = props;\n return (\n <Button\n {...props}\n width={width || [\"30px\"]}\n height={height || [\"30px\"]}\n borderColor={!disabled ? borderColor || \"#4668F8\" : \"cl_lightGrey\"}\n borderStyle={borderStyle || \"solid\"}\n borderWidth={borderWidth || \"2px\"}\n fill={!disabled ? fill || \"#4668F8\" : \"cl_lightGrey\"}\n data-testid=\"square-button\"\n variant=\"_square\"\n >\n {props.children}\n </Button>\n );\n};\n"],"names":["SquareButton","props","borderColor","borderStyle","borderWidth","fill","width","height","disabled","jsx","Button"],"mappings":";;AAQa,MAAAA,IAA4C,CAACC,MAAU;AAC5D,QAAA;AAAA,IACJ,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,EACE,IAAAP;AAEF,SAAAQ,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACE,GAAGT;AAAA,MACJ,OAAOK,KAAS,CAAC,MAAM;AAAA,MACvB,QAAQC,KAAU,CAAC,MAAM;AAAA,MACzB,aAAcC,IAAsC,iBAA3BN,KAAe;AAAA,MACxC,aAAaC,KAAe;AAAA,MAC5B,aAAaC,KAAe;AAAA,MAC5B,MAAOI,IAA+B,iBAApBH,KAAQ;AAAA,MAC1B,eAAY;AAAA,MACZ,SAAQ;AAAA,MAEP,UAAMJ,EAAA;AAAA,IAAA;AAAA,EAAA;AAGb;"}
1
+ {"version":3,"file":"sd-component-library239.js","sources":["../src/components/meters/multi-option-discrete-outline-meter/partials/discrete-range/discrete-range.tsx"],"sourcesContent":["import React, { PropsWithChildren } from \"react\";\n\nimport { BaseOutlineArc } from \"../../../outline-meter/partials/base-outline-arc\";\nimport { getCoordinateForArc } from \"../../../outline-meter/utils\";\nimport { defaultTextBottomMargin } from \"../../constants\";\nimport { getRangeProperties } from \"../../utils\";\nimport { DiscreteMeterLabelPointer } from \"../discrete-meter-label-pointer\";\nimport { DiscreteRangeProps as Props } from \"./interfaces\";\n\nexport function DiscreteRange<T>(props: PropsWithChildren<Props<T>>) {\n const {\n color,\n idx,\n gaugeWidth,\n diameter,\n arc,\n distanceBetweenRanges,\n totalRanges,\n showLabel,\n label,\n isMatchedRange,\n pointerWidth,\n pointerLength,\n horizontal,\n } = props;\n\n const radius = diameter / 2;\n\n const { rangeArcStart, rangeArcEnd } = getRangeProperties(\n arc,\n totalRanges,\n distanceBetweenRanges,\n idx\n );\n\n const { x: rangeStartX, y: rangeStartY } = getCoordinateForArc(\n radius,\n rangeArcStart\n );\n const { x: rangeEndX, y: rangeEndY } = getCoordinateForArc(\n radius,\n rangeArcEnd\n );\n\n const middleArcAlpha = (rangeArcStart + rangeArcEnd) / 2;\n\n return (\n <g>\n <BaseOutlineArc\n startX={rangeStartX}\n startY={rangeStartY}\n endX={rangeEndX}\n endY={rangeEndY}\n startAlpha={rangeArcStart}\n endAlpha={rangeArcEnd}\n color={color}\n radius={radius}\n width={gaugeWidth}\n />\n\n {showLabel && label && !isMatchedRange && (\n <DiscreteMeterLabelPointer\n alpha={middleArcAlpha}\n pointerLength={pointerLength}\n pointerWidth={pointerWidth}\n radius={radius}\n color={color}\n textBottomMargin={defaultTextBottomMargin}\n label={label}\n horizontal={horizontal}\n />\n )}\n </g>\n );\n}\n"],"names":["DiscreteRange","props","color","idx","gaugeWidth","diameter","arc","distanceBetweenRanges","totalRanges","showLabel","label","isMatchedRange","pointerWidth","pointerLength","horizontal","radius","rangeArcStart","rangeArcEnd","getRangeProperties","rangeStartX","rangeStartY","getCoordinateForArc","rangeEndX","rangeEndY","middleArcAlpha","jsx","B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;"}
@@ -1,6 +1,6 @@
1
1
  import { j as o } from "./sd-component-library190.js";
2
- import { LogoButton as e } from "./sd-component-library199.js";
3
- import { ReactComponent as r } from "./sd-component-library201.js";
2
+ import { LogoButton as e } from "./sd-component-library197.js";
3
+ import { ReactComponent as r } from "./sd-component-library199.js";
4
4
  const p = (t) => /* @__PURE__ */ o.jsx(
5
5
  e,
6
6
  {
@@ -1,6 +1,46 @@
1
- import * as a from "react";
2
- const e = (t) => /* @__PURE__ */ a.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 7, height: 13, viewBox: "0 0 7 13", ...t }, /* @__PURE__ */ a.createElement("path", { id: "Forma_1_copy_3", "data-name": "Forma 1 copy 3", d: "M8009.72,5251.88l-5.6-6.08a0.435,0.435,0,0,1,0-.6l5.6-6.08a0.354,0.354,0,0,1,.28-0.13,0.349,0.349,0,0,1,.27.13l0.61,0.65a0.435,0.435,0,0,1,0,.6l-4.73,5.13,4.73,5.13a0.423,0.423,0,0,1,.12.3,0.441,0.441,0,0,1-.12.3l-0.61.65a0.349,0.349,0,0,1-.27.13A0.354,0.354,0,0,1,8009.72,5251.88Z", transform: "translate(-8004 -5239)" }));
1
+ import { j as M } from "./sd-component-library190.js";
2
+ import { getInnerX as T, getInnerY as W, degToRad as r, getCoordinateForArc as y } from "./sd-component-library86.js";
3
+ import { BaseNeedle as B } from "./sd-component-library311.js";
4
+ function E(p) {
5
+ const {
6
+ needleColor: u,
7
+ options: n,
8
+ value: h,
9
+ needleWidth: e,
10
+ innerCircleRadius: m,
11
+ innerCircleStrokeWidth: x,
12
+ diameter: R,
13
+ arc: a,
14
+ distanceBetweenRanges: c,
15
+ distanceFromRange: s,
16
+ gaugeWidth: i
17
+ } = p, o = n.findIndex(
18
+ (F) => h === F.value
19
+ ), d = R / 2, f = (360 - a) / 2, l = a - (n.length - 1) * c, g = o / n.length, v = (o + 1) / n.length, A = l * (v - g), t = f + c * o + l * g + A / 2, { x: C, y: I } = y(d, t), S = T(
20
+ C,
21
+ r(t),
22
+ s + i + e / 2
23
+ ), X = W(
24
+ I,
25
+ r(t),
26
+ s + i + e / 2
27
+ ), Y = e / 2 * Math.cos(r(t)), j = e / 2 * Math.sin(r(t));
28
+ return /* @__PURE__ */ M.jsx(
29
+ B,
30
+ {
31
+ dx: Y,
32
+ dy: j,
33
+ color: u,
34
+ radius: d,
35
+ tipX: S,
36
+ tipY: X,
37
+ innerCircleStrokeWidth: x,
38
+ innerCircleRadius: m,
39
+ needleWidth: e
40
+ }
41
+ );
42
+ }
3
43
  export {
4
- e as ReactComponent
44
+ E as DiscreteMeterNeedle
5
45
  };
6
46
  //# sourceMappingURL=sd-component-library240.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sd-component-library240.js","sources":["../src/components/page-selectors/page-selector/assets/previous.svg"],"sourcesContent":["export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI3IiBoZWlnaHQ9IjEzIiB2aWV3Qm94PSIwIDAgNyAxMyI+CiAgPHBhdGggaWQ9IkZvcm1hXzFfY29weV8zIiBkYXRhLW5hbWU9IkZvcm1hIDEgY29weSAzIiBkPSJNODAwOS43Miw1MjUxLjg4bC01LjYtNi4wOGEwLjQzNSwwLjQzNSwwLDAsMSwwLS42bDUuNi02LjA4YTAuMzU0LDAuMzU0LDAsMCwxLC4yOC0wLjEzLDAuMzQ5LDAuMzQ5LDAsMCwxLC4yNy4xM2wwLjYxLDAuNjVhMC40MzUsMC40MzUsMCwwLDEsMCwuNmwtNC43Myw1LjEzLDQuNzMsNS4xM2EwLjQyMywwLjQyMywwLDAsMSwuMTIuMywwLjQ0MSwwLjQ0MSwwLDAsMS0uMTIuM2wtMC42MS42NWEwLjM0OSwwLjM0OSwwLDAsMS0uMjcuMTNBMC4zNTQsMC4zNTQsMCwwLDEsODAwOS43Miw1MjUxLjg4WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTgwMDQgLTUyMzkpIi8+Cjwvc3ZnPgo=\""],"names":["SvgPrevious","props","React"],"mappings":";AACK,MAACA,IAAc,CAACC,MAA0B,gBAAAC,EAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,OAAO,GAAG,QAAQ,IAAI,SAAS,YAAY,GAAGD,EAAO,GAAkB,gBAAAC,EAAM,cAAc,QAAQ,EAAE,IAAI,kBAAkB,aAAa,kBAAkB,GAAG,6RAA6R,WAAW,yBAAwB,CAAE,CAAC;"}
1
+ {"version":3,"file":"sd-component-library240.js","sources":["../src/components/meters/multi-option-discrete-outline-meter/partials/discrete-meter-needle/discrete-meter-needle.tsx"],"sourcesContent":["import React, { PropsWithChildren } from \"react\";\n\nimport { BaseNeedle } from \"../../../outline-meter/partials/base-needle\";\nimport {\n degToRad,\n getCoordinateForArc,\n getInnerX,\n getInnerY,\n} from \"../../../outline-meter/utils\";\nimport { DiscreteMeterNeedleProps as Props } from \"./interfaces\";\n\nexport function DiscreteMeterNeedle<T>(props: PropsWithChildren<Props<T>>) {\n const {\n needleColor,\n options,\n value,\n needleWidth,\n innerCircleRadius,\n innerCircleStrokeWidth,\n diameter,\n arc,\n distanceBetweenRanges,\n distanceFromRange,\n gaugeWidth,\n } = props;\n\n const matchingRangeIndex = options.findIndex(\n (option) => value === option.value\n );\n\n const radius = diameter / 2;\n\n const arcStart = (360 - arc) / 2;\n const arcForRanges = arc - (options.length - 1) * distanceBetweenRanges;\n\n const start = matchingRangeIndex / options.length;\n const end = (matchingRangeIndex + 1) / options.length;\n\n const rangeArc = arcForRanges * (end - start);\n\n const rangeArcStart =\n arcStart +\n distanceBetweenRanges * matchingRangeIndex +\n arcForRanges * start;\n\n const valueAlpha = rangeArcStart + rangeArc / 2;\n const { x: valueX, y: valueY } = getCoordinateForArc(radius, valueAlpha);\n\n const needleTipX = getInnerX(\n valueX,\n degToRad(valueAlpha),\n distanceFromRange + gaugeWidth + needleWidth / 2\n );\n const needleTipY = getInnerY(\n valueY,\n degToRad(valueAlpha),\n distanceFromRange + gaugeWidth + needleWidth / 2\n );\n\n const dx = (needleWidth / 2) * Math.cos(degToRad(valueAlpha));\n const dy = (needleWidth / 2) * Math.sin(degToRad(valueAlpha));\n\n return (\n <BaseNeedle\n dx={dx}\n dy={dy}\n color={needleColor}\n radius={radius}\n tipX={needleTipX}\n tipY={needleTipY}\n innerCircleStrokeWidth={innerCircleStrokeWidth}\n innerCircleRadius={innerCircleRadius}\n needleWidth={needleWidth}\n />\n );\n}\n"],"names":["DiscreteMeterNeedle","props","needleColor","options","value","needleWidth","innerCircleRadius","innerCircleStrokeWidth","diameter","arc","distanceBetweenRanges","distanceFromRange","gaugeWidth","matchingRangeIndex","option","radius","arcStart","arcForRanges","start","end","rangeArc","valueAlpha","valueX","valueY","getCoordinateForArc","needleTipX","getInnerX","degToRad","needleTipY","getInnerY","dx","dy","jsx","BaseNeedle"],"mappings":";;;AAWO,SAASA,EAAuBC,GAAoC;AACnE,QAAA;AAAA,IACJ,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,KAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,YAAAC;AAAA,EACE,IAAAX,GAEEY,IAAqBV,EAAQ;AAAA,IACjC,CAACW,MAAWV,MAAUU,EAAO;AAAA,EAAA,GAGzBC,IAASP,IAAW,GAEpBQ,KAAY,MAAMP,KAAO,GACzBQ,IAAeR,KAAON,EAAQ,SAAS,KAAKO,GAE5CQ,IAAQL,IAAqBV,EAAQ,QACrCgB,KAAON,IAAqB,KAAKV,EAAQ,QAEzCiB,IAAWH,KAAgBE,IAAMD,IAOjCG,IAJJL,IACAN,IAAwBG,IACxBI,IAAeC,IAEkBE,IAAW,GACxC,EAAE,GAAGE,GAAQ,GAAGC,MAAWC,EAAoBT,GAAQM,CAAU,GAEjEI,IAAaC;AAAA,IACjBJ;AAAA,IACAK,EAASN,CAAU;AAAA,IACnBV,IAAoBC,IAAaP,IAAc;AAAA,EAAA,GAE3CuB,IAAaC;AAAA,IACjBN;AAAA,IACAI,EAASN,CAAU;AAAA,IACnBV,IAAoBC,IAAaP,IAAc;AAAA,EAAA,GAG3CyB,IAAMzB,IAAc,IAAK,KAAK,IAAIsB,EAASN,CAAU,CAAC,GACtDU,IAAM1B,IAAc,IAAK,KAAK,IAAIsB,EAASN,CAAU,CAAC;AAG1D,SAAAW,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAAH;AAAA,MACA,IAAAC;AAAA,MACA,OAAO7B;AAAA,MACP,QAAAa;AAAA,MACA,MAAMU;AAAA,MACN,MAAMG;AAAA,MACN,wBAAArB;AAAA,MACA,mBAAAD;AAAA,MACA,aAAAD;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,27 +1,16 @@
1
- import { j as t } from "./sd-component-library190.js";
2
- import { ResponsiveTextV2 as o } from "./sd-component-library144.js";
3
- const s = (e) => {
4
- const { currentPage: r } = e;
5
- return /* @__PURE__ */ t.jsx(
6
- o,
7
- {
8
- fontSizeWeight: [14, "regular"],
9
- sx: {
10
- display: "flex",
11
- alignItems: "center",
12
- justifyContent: "center",
13
- borderColor: "cl_lightGrey",
14
- borderWidth: 1,
15
- borderStyle: "solid",
16
- borderRadius: "3px",
17
- height: "30px",
18
- minWidth: "30px"
19
- },
20
- children: r
21
- }
22
- );
1
+ import { j as g } from "./sd-component-library190.js";
2
+ import { getRangeProperties as d } from "./sd-component-library313.js";
3
+ import { MatchedRangeLabelBox as x } from "./sd-component-library309.js";
4
+ const h = (e) => {
5
+ const { idx: t, totalRanges: a, distanceBetweenRanges: r, arc: n } = e, { rangeArcStart: o, rangeArcEnd: s } = d(
6
+ n,
7
+ a,
8
+ r,
9
+ t
10
+ ), c = Math.round((o + s) / 2);
11
+ return /* @__PURE__ */ g.jsx(x, { ...e, alpha: c, round: !0 });
23
12
  };
24
13
  export {
25
- s as CurrentPage
14
+ h as MatchedRangeLabelBox
26
15
  };
27
16
  //# sourceMappingURL=sd-component-library241.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sd-component-library241.js","sources":["../src/components/page-selectors/page-selector/partials/current-page/current-page.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { ResponsiveTextV2 } from \"../../../../texts\";\nimport { CurrentPageProps as Props } from \"./interfaces\";\n\nexport const CurrentPage: React.FC<Props> = (props) => {\n const { currentPage } = props;\n\n return (\n <ResponsiveTextV2\n fontSizeWeight={[14, \"regular\"]}\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderColor: \"cl_lightGrey\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderRadius: \"3px\",\n height: \"30px\",\n minWidth: \"30px\",\n }}\n >\n {currentPage}\n </ResponsiveTextV2>\n );\n};\n"],"names":["CurrentPage","props","currentPage","jsx","ResponsiveTextV2"],"mappings":";;AAKa,MAAAA,IAA+B,CAACC,MAAU;AAC/C,QAAA,EAAE,aAAAC,EAAgB,IAAAD;AAGtB,SAAAE,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,gBAAgB,CAAC,IAAI,SAAS;AAAA,MAC9B,IAAI;AAAA,QACF,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,gBAAgB;AAAA,QAChB,aAAa;AAAA,QACb,aAAa;AAAA,QACb,aAAa;AAAA,QACb,cAAc;AAAA,QACd,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MAEC,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP;"}
1
+ {"version":3,"file":"sd-component-library241.js","sources":["../src/components/meters/multi-option-discrete-outline-meter/partials/matched-range-label-box/matched-range-label-box.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { MatchedRangeLabelBox as LabelBox } from \"../../../common-outline-meter-partials\";\nimport { getRangeProperties } from \"../../utils\";\nimport { MatchedRangeLabelBoxProps as Props } from \"./interfaces\";\n\nexport const MatchedRangeLabelBox: React.FC<Props> = (props) => {\n const { idx, totalRanges, distanceBetweenRanges, arc } = props;\n\n const { rangeArcStart, rangeArcEnd } = getRangeProperties(\n arc,\n totalRanges,\n distanceBetweenRanges,\n idx\n );\n\n const alpha = Math.round((rangeArcStart + rangeArcEnd) / 2);\n\n return <LabelBox {...props} alpha={alpha} round />;\n};\n"],"names":["MatchedRangeLabelBox","props","idx","totalRanges","distanceBetweenRanges","arc","rangeArcStart","rangeArcEnd","getRangeProperties","alpha","LabelBox"],"mappings":";;;AAMa,MAAAA,IAAwC,CAACC,MAAU;AAC9D,QAAM,EAAE,KAAAC,GAAK,aAAAC,GAAa,uBAAAC,GAAuB,KAAAC,MAAQJ,GAEnD,EAAE,eAAAK,GAAe,aAAAC,EAAA,IAAgBC;AAAA,IACrCH;AAAA,IACAF;AAAA,IACAC;AAAA,IACAF;AAAA,EAAA,GAGIO,IAAQ,KAAK,OAAOH,IAAgBC,KAAe,CAAC;AAE1D,+BAAQG,GAAU,EAAA,GAAGT,GAAO,OAAAQ,GAAc,OAAK,GAAC,CAAA;AAClD;"}
@@ -1,6 +1,51 @@
1
- import * as a from "react";
2
- const e = (t) => /* @__PURE__ */ a.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 7, height: 13, viewBox: "0 0 7 13", ...t }, /* @__PURE__ */ a.createElement("path", { id: "Forma_1_copy_3", "data-name": "Forma 1 copy 3", d: "M8105.27,5251.88l5.6-6.08a0.435,0.435,0,0,0,0-.6l-5.6-6.08a0.349,0.349,0,0,0-.27-0.13,0.354,0.354,0,0,0-.28.13l-0.6.65a0.435,0.435,0,0,0,0,.6l4.72,5.13-4.72,5.13a0.423,0.423,0,0,0-.12.3,0.441,0.441,0,0,0,.12.3l0.6,0.65a0.354,0.354,0,0,0,.28.13A0.349,0.349,0,0,0,8105.27,5251.88Z", transform: "translate(-8104 -5239)" }));
1
+ import { getCoordinateForArc as s } from "./sd-component-library86.js";
2
+ const v = (r) => {
3
+ const a = `Received ${r.map(
4
+ ({ start: e, end: t }) => `(${e},${t})`
5
+ )}`, n = (e) => console.error(e, a);
6
+ if (r.some(
7
+ ({ start: e, end: t }) => [e, t].some((o) => o < 0 || o > 1)
8
+ ))
9
+ return n("Segment values should be between 0 and 1"), !1;
10
+ if (r.reduce(
11
+ (e, { start: t }) => e + (t === 0 ? 1 : 0),
12
+ 0
13
+ ) !== 1)
14
+ return n("One segment should start from 0"), !1;
15
+ if (r.reduce((e, { end: t }) => e + (t === 1 ? 1 : 0), 0) !== 1)
16
+ return n("One segment should end by 1"), !1;
17
+ if (r.some(({ start: e, end: t }) => e >= t))
18
+ return n("Segment start should be smaller than end"), !1;
19
+ for (let e = 1; e < r.length; e++) {
20
+ const t = r[e];
21
+ if (r[e - 1].end !== t.start)
22
+ return n("Previous segment end should be equal to next segment start"), !1;
23
+ }
24
+ return !0;
25
+ }, x = ({ start: r, end: a }, n, e) => {
26
+ const t = n - e, o = Math.round(r * 360), c = Math.round(a * 360), d = c - o, { x: l, y: u } = s(n, o), { x: f, y: m } = s(
27
+ t,
28
+ o,
29
+ n
30
+ ), { x: h, y: i } = s(n, c), { x: g, y: S } = s(
31
+ t,
32
+ c,
33
+ n
34
+ );
35
+ return {
36
+ startX: l,
37
+ startY: u,
38
+ endX: h,
39
+ endY: i,
40
+ startInnerX: f,
41
+ startInnerY: m,
42
+ endInnerX: g,
43
+ endInnerY: S,
44
+ arc: d
45
+ };
46
+ };
3
47
  export {
4
- e as ReactComponent
48
+ v as areSegmentsValid,
49
+ x as getSegmentCoordinates
5
50
  };
6
51
  //# sourceMappingURL=sd-component-library242.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sd-component-library242.js","sources":["../src/components/page-selectors/page-selector/assets/next.svg"],"sourcesContent":["export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI3IiBoZWlnaHQ9IjEzIiB2aWV3Qm94PSIwIDAgNyAxMyI+CiAgPHBhdGggaWQ9IkZvcm1hXzFfY29weV8zIiBkYXRhLW5hbWU9IkZvcm1hIDEgY29weSAzIiBkPSJNODEwNS4yNyw1MjUxLjg4bDUuNi02LjA4YTAuNDM1LDAuNDM1LDAsMCwwLDAtLjZsLTUuNi02LjA4YTAuMzQ5LDAuMzQ5LDAsMCwwLS4yNy0wLjEzLDAuMzU0LDAuMzU0LDAsMCwwLS4yOC4xM2wtMC42LjY1YTAuNDM1LDAuNDM1LDAsMCwwLDAsLjZsNC43Miw1LjEzLTQuNzIsNS4xM2EwLjQyMywwLjQyMywwLDAsMC0uMTIuMywwLjQ0MSwwLjQ0MSwwLDAsMCwuMTIuM2wwLjYsMC42NWEwLjM1NCwwLjM1NCwwLDAsMCwuMjguMTNBMC4zNDksMC4zNDksMCwwLDAsODEwNS4yNyw1MjUxLjg4WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTgxMDQgLTUyMzkpIi8+Cjwvc3ZnPgo=\""],"names":["SvgNext","props","React"],"mappings":";AACK,MAACA,IAAU,CAACC,MAA0B,gBAAAC,EAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,OAAO,GAAG,QAAQ,IAAI,SAAS,YAAY,GAAGD,EAAO,GAAkB,gBAAAC,EAAM,cAAc,QAAQ,EAAE,IAAI,kBAAkB,aAAa,kBAAkB,GAAG,0RAA0R,WAAW,yBAAwB,CAAE,CAAC;"}
1
+ {"version":3,"file":"sd-component-library242.js","sources":["../src/components/meters/donut-diagram/utils.ts"],"sourcesContent":["import { getCoordinateForArc } from \"../outline-meter/utils\";\nimport { DonutSegment } from \"./interfaces\";\n\nexport const areSegmentsValid = (\n segments: Pick<DonutSegment, \"start\" | \"end\">[]\n): boolean => {\n const receivedSegments = `Received ${segments.map(\n ({ start, end }) => `(${start},${end})`\n )}`;\n const showError = (text: string) => console.error(text, receivedSegments);\n\n if (\n segments.some(({ start, end }) =>\n [start, end].some((point) => point < 0 || point > 1)\n )\n ) {\n showError(\"Segment values should be between 0 and 1\");\n return false;\n }\n\n if (\n segments.reduce<number>(\n (acc, { start }) => acc + (start === 0 ? 1 : 0),\n 0\n ) !== 1\n ) {\n showError(\"One segment should start from 0\");\n return false;\n }\n\n if (\n segments.reduce<number>((acc, { end }) => acc + (end === 1 ? 1 : 0), 0) !==\n 1\n ) {\n showError(\"One segment should end by 1\");\n return false;\n }\n\n if (segments.some(({ start, end }) => start >= end)) {\n showError(\"Segment start should be smaller than end\");\n return false;\n }\n\n for (let i = 1; i < segments.length; i++) {\n const currentSegment = segments[i];\n const prevSegment = segments[i - 1];\n if (prevSegment.end !== currentSegment.start) {\n showError(\"Previous segment end should be equal to next segment start\");\n return false;\n }\n }\n\n return true;\n};\n\nexport const getSegmentCoordinates = (\n { start, end }: Pick<DonutSegment, \"start\" | \"end\">,\n radius: number,\n segmentWidth: number\n) => {\n const innerRadius = radius - segmentWidth;\n\n const startAlpha = Math.round(start * 360);\n const endAlpha = Math.round(end * 360);\n const arc = endAlpha - startAlpha;\n\n const { x: startX, y: startY } = getCoordinateForArc(radius, startAlpha);\n const { x: startInnerX, y: startInnerY } = getCoordinateForArc(\n innerRadius,\n startAlpha,\n radius\n );\n\n const { x: endX, y: endY } = getCoordinateForArc(radius, endAlpha);\n const { x: endInnerX, y: endInnerY } = getCoordinateForArc(\n innerRadius,\n endAlpha,\n radius\n );\n return {\n startX,\n startY,\n endX,\n endY,\n startInnerX,\n startInnerY,\n endInnerX,\n endInnerY,\n arc,\n };\n};\n"],"names":["areSegmentsValid","segments","receivedSegments","start","end","showError","text","point","acc","i","currentSegment","getSegmentCoordinates","radius","segmentWidth","innerRadius","startAlpha","endAlpha","arc","startX","startY","getCoordinateForArc","startInnerX","startInnerY","endX","endY","endInnerX","endInnerY"],"mappings":";AAGa,MAAAA,IAAmB,CAC9BC,MACY;AACN,QAAAC,IAAmB,YAAYD,EAAS;AAAA,IAC5C,CAAC,EAAE,OAAAE,GAAO,KAAAC,QAAU,IAAID,C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