@lidofinance/lido-ui 3.31.0 → 3.32.0

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 (56) hide show
  1. package/dist/cjs/chart-line/ChartLine.js +4 -3
  2. package/dist/cjs/chart-line/ChartLine.js.map +1 -1
  3. package/dist/cjs/chart-line/ChartLineLabel.js +5 -2
  4. package/dist/cjs/chart-line/ChartLineLabel.js.map +1 -1
  5. package/dist/cjs/chart-line/types.js.map +1 -1
  6. package/dist/cjs/chart-line/utils/constants.js +2 -2
  7. package/dist/cjs/chart-line/utils/constants.js.map +1 -1
  8. package/dist/cjs/chart-line/utils/handlePositioning.js +6 -5
  9. package/dist/cjs/chart-line/utils/handlePositioning.js.map +1 -1
  10. package/dist/cjs/chart-line/utils/processData.js +4 -2
  11. package/dist/cjs/chart-line/utils/processData.js.map +1 -1
  12. package/dist/cjs/index.js +35 -33
  13. package/dist/cjs/index.js.map +1 -1
  14. package/dist/cjs/modal/Modal.js +4 -0
  15. package/dist/cjs/modal/Modal.js.map +1 -1
  16. package/dist/cjs/modal/ModalStyles.js +16 -2
  17. package/dist/cjs/modal/ModalStyles.js.map +1 -1
  18. package/dist/cjs/modal/types.js +13 -0
  19. package/dist/cjs/modal/types.js.map +1 -0
  20. package/dist/esm/chart-line/ChartLine.mjs +5 -4
  21. package/dist/esm/chart-line/ChartLine.mjs.map +1 -1
  22. package/dist/esm/chart-line/ChartLineLabel.mjs +5 -2
  23. package/dist/esm/chart-line/ChartLineLabel.mjs.map +1 -1
  24. package/dist/esm/chart-line/types.mjs.map +1 -1
  25. package/dist/esm/chart-line/utils/constants.mjs +2 -2
  26. package/dist/esm/chart-line/utils/constants.mjs.map +1 -1
  27. package/dist/esm/chart-line/utils/handlePositioning.mjs +7 -6
  28. package/dist/esm/chart-line/utils/handlePositioning.mjs.map +1 -1
  29. package/dist/esm/chart-line/utils/processData.mjs +4 -2
  30. package/dist/esm/chart-line/utils/processData.mjs.map +1 -1
  31. package/dist/esm/index.mjs +1 -0
  32. package/dist/esm/index.mjs.map +1 -1
  33. package/dist/esm/modal/Modal.mjs +4 -0
  34. package/dist/esm/modal/Modal.mjs.map +1 -1
  35. package/dist/esm/modal/ModalStyles.mjs +16 -3
  36. package/dist/esm/modal/ModalStyles.mjs.map +1 -1
  37. package/dist/esm/modal/types.mjs +9 -0
  38. package/dist/esm/modal/types.mjs.map +1 -0
  39. package/dist/types/chart-line/ChartLine.d.ts.map +1 -1
  40. package/dist/types/chart-line/ChartLineLabel.d.ts +2 -1
  41. package/dist/types/chart-line/ChartLineLabel.d.ts.map +1 -1
  42. package/dist/types/chart-line/types.d.ts +1 -0
  43. package/dist/types/chart-line/types.d.ts.map +1 -1
  44. package/dist/types/chart-line/utils/constants.d.ts +1 -1
  45. package/dist/types/chart-line/utils/constants.d.ts.map +1 -1
  46. package/dist/types/chart-line/utils/handlePositioning.d.ts +1 -0
  47. package/dist/types/chart-line/utils/handlePositioning.d.ts.map +1 -1
  48. package/dist/types/chart-line/utils/processData.d.ts +1 -1
  49. package/dist/types/chart-line/utils/processData.d.ts.map +1 -1
  50. package/dist/types/modal/Modal.d.ts +5 -0
  51. package/dist/types/modal/Modal.d.ts.map +1 -1
  52. package/dist/types/modal/ModalStyles.d.ts +7 -0
  53. package/dist/types/modal/ModalStyles.d.ts.map +1 -1
  54. package/dist/types/modal/types.d.ts +9 -0
  55. package/dist/types/modal/types.d.ts.map +1 -1
  56. package/package.json +1 -1
@@ -6,7 +6,6 @@ const React = require('react');
6
6
  require('../loaders/Loader.js');
7
7
  const InlineLoader = require('../loaders/InlineLoader.js');
8
8
  const ChartLineLabel = require('./ChartLineLabel.js');
9
- const constants = require('./utils/constants.js');
10
9
  const getContainerSize = require('./utils/getContainerSize.js');
11
10
  const processData = require('./utils/processData.js');
12
11
  const ChartLineStyles = require('./ChartLineStyles.js');
@@ -26,10 +25,11 @@ const ChartLine = /*#__PURE__*/React.forwardRef((props, ref) => {
26
25
  ...rest
27
26
  } = props;
28
27
  const [containerSize, setContainerSize] = React.useState(null);
28
+ const containerId = React.useId();
29
29
  const {
30
30
  data: processedData,
31
31
  ids
32
- } = React.useMemo(() => processData.processData(data, maxValue), [data, maxValue]);
32
+ } = React.useMemo(() => processData.processData(data, containerId, maxValue), [data, maxValue, containerId]);
33
33
  const allPreviousIds = React.useMemo(() => ids.map((_, index) => ids.slice(0, index)), [ids]);
34
34
  React.useLayoutEffect(() => {
35
35
  if (!showLabels) {
@@ -52,7 +52,7 @@ const ChartLine = /*#__PURE__*/React.forwardRef((props, ref) => {
52
52
  }
53
53
 
54
54
  return /*#__PURE__*/jsxRuntime.jsx(ChartLineStyles.ContainerStyle, {
55
- id: constants.CHART_LINE_CONTAINER_ID,
55
+ id: containerId,
56
56
  $alignItems: containerSize?.isCenterAlign ? 'center' : 'flex-start',
57
57
  $height: containerSize?.size ?? 0,
58
58
  children: /*#__PURE__*/jsxRuntime.jsx(ChartLineStyles.WrapperStyle, {
@@ -79,6 +79,7 @@ const ChartLine = /*#__PURE__*/React.forwardRef((props, ref) => {
79
79
  previousIds: previousIds,
80
80
  height: height,
81
81
  thresholdType: thresholdType,
82
+ containerId: containerId,
82
83
  ...item
83
84
  })
84
85
  }, id);
@@ -1 +1 @@
1
- {"version":3,"file":"ChartLine.js","sources":["../../../packages/chart-line/ChartLine.tsx"],"sourcesContent":["import {\n ForwardedRef,\n forwardRef,\n useMemo,\n useLayoutEffect,\n useState,\n} from 'react'\n\nimport { InlineLoader } from '../loaders/index.js'\n\nimport { ChartLineLabel } from './ChartLineLabel.js'\nimport {\n CHART_LINE_CONTAINER_ID,\n getContainerSize,\n processData,\n} from './utils/index.js'\nimport { ContainerStyle, LineStyle, WrapperStyle } from './ChartLineStyles.js'\nimport { ChartLineProps } from './types.js'\n\nexport const ChartLine = forwardRef(\n (props: ChartLineProps, ref?: ForwardedRef<HTMLDivElement>) => {\n const {\n loading = false,\n onClick,\n children,\n height,\n border,\n data,\n showLabels,\n maxValue,\n thresholdType,\n ...rest\n } = props\n\n const [containerSize, setContainerSize] = useState<{\n size: number\n isCenterAlign: boolean\n } | null>(null)\n\n const { data: processedData, ids } = useMemo(\n () => processData(data, maxValue),\n [data, maxValue],\n )\n\n const allPreviousIds = useMemo(\n () => ids.map((_, index) => ids.slice(0, index)),\n [ids],\n )\n\n useLayoutEffect(() => {\n if (!showLabels) {\n setContainerSize(null)\n return\n }\n const containerSize = getContainerSize(ids)\n setContainerSize(containerSize)\n }, [ids, showLabels])\n\n if (loading) {\n return (\n <WrapperStyle $border={border} $height={height} ref={ref} {...rest}>\n <InlineLoader />\n </WrapperStyle>\n )\n }\n\n return (\n <ContainerStyle\n id={CHART_LINE_CONTAINER_ID}\n $alignItems={containerSize?.isCenterAlign ? 'center' : 'flex-start'}\n $height={containerSize?.size ?? 0}\n >\n <WrapperStyle $border={border} $height={height} ref={ref} {...rest}>\n {processedData.map((item, index) => {\n const { color, id, width } = item\n const previousIds = allPreviousIds[index]\n\n return (\n <LineStyle\n key={id}\n $width={`${width}%`}\n $backgroundColor={color}\n $zIndex={processedData.length - index}\n $border={border}\n $isFullWidth={width === 100}\n >\n <ChartLineLabel\n zIndex={processedData.length - index}\n show={showLabels}\n previousIds={previousIds}\n height={height}\n thresholdType={thresholdType}\n {...item}\n />\n </LineStyle>\n )\n })}\n </WrapperStyle>\n </ContainerStyle>\n )\n },\n)\nChartLine.displayName = 'ChartLine'\n"],"names":["ChartLine","forwardRef","props","ref","loading","onClick","children","height","border","data","showLabels","maxValue","thresholdType","rest","containerSize","setContainerSize","useState","processedData","ids","useMemo","processData","allPreviousIds","map","_","index","slice","useLayoutEffect","getContainerSize","_jsx","WrapperStyle","InlineLoader","ContainerStyle","CHART_LINE_CONTAINER_ID","isCenterAlign","size","item","color","id","width","previousIds","LineStyle","length","ChartLineLabel","displayName"],"mappings":";;;;;;;;;;;;;;AAmBO,MAAMA,SAAS,gBAAGC,gBAAU,CACjC,CAACC,KAAD,EAAwBC,GAAxB,KAA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A;AADH,KAAA,CAAA;GANJ,CAAA,CAAA;AAkCD,CAjFgC,EAA5B;AAmFPrC,SAAS,CAAC2C,WAAV,GAAwB,WAAxB;;;;"}
1
+ {"version":3,"file":"ChartLine.js","sources":["../../../packages/chart-line/ChartLine.tsx"],"sourcesContent":["import {\n ForwardedRef,\n forwardRef,\n useMemo,\n useLayoutEffect,\n useState,\n useId,\n} from 'react'\n\nimport { InlineLoader } from '../loaders/index.js'\n\nimport { ChartLineLabel } from './ChartLineLabel.js'\nimport { getContainerSize, processData } from './utils/index.js'\nimport { ContainerStyle, LineStyle, WrapperStyle } from './ChartLineStyles.js'\nimport { ChartLineProps } from './types.js'\n\nexport const ChartLine = forwardRef(\n (props: ChartLineProps, ref?: ForwardedRef<HTMLDivElement>) => {\n const {\n loading = false,\n onClick,\n children,\n height,\n border,\n data,\n showLabels,\n maxValue,\n thresholdType,\n ...rest\n } = props\n\n const [containerSize, setContainerSize] = useState<{\n size: number\n isCenterAlign: boolean\n } | null>(null)\n const containerId = useId()\n\n const { data: processedData, ids } = useMemo(\n () => processData(data, containerId, maxValue),\n [data, maxValue, containerId],\n )\n\n const allPreviousIds = useMemo(\n () => ids.map((_, index) => ids.slice(0, index)),\n [ids],\n )\n\n useLayoutEffect(() => {\n if (!showLabels) {\n setContainerSize(null)\n return\n }\n const containerSize = getContainerSize(ids)\n setContainerSize(containerSize)\n }, [ids, showLabels])\n\n if (loading) {\n return (\n <WrapperStyle $border={border} $height={height} ref={ref} {...rest}>\n <InlineLoader />\n </WrapperStyle>\n )\n }\n\n return (\n <ContainerStyle\n id={containerId}\n $alignItems={containerSize?.isCenterAlign ? 'center' : 'flex-start'}\n $height={containerSize?.size ?? 0}\n >\n <WrapperStyle $border={border} $height={height} ref={ref} {...rest}>\n {processedData.map((item, index) => {\n const { color, id, width } = item\n const previousIds = allPreviousIds[index]\n\n return (\n <LineStyle\n key={id}\n $width={`${width}%`}\n $backgroundColor={color}\n $zIndex={processedData.length - index}\n $border={border}\n $isFullWidth={width === 100}\n >\n <ChartLineLabel\n zIndex={processedData.length - index}\n show={showLabels}\n previousIds={previousIds}\n height={height}\n thresholdType={thresholdType}\n containerId={containerId}\n {...item}\n />\n </LineStyle>\n )\n })}\n </WrapperStyle>\n </ContainerStyle>\n )\n },\n)\nChartLine.displayName = 'ChartLine'\n"],"names":["ChartLine","forwardRef","props","ref","loading","onClick","children","height","border","data","showLabels","maxValue","thresholdType","rest","containerSize","setContainerSize","useState","containerId","useId","processedData","ids","useMemo","processData","allPreviousIds","map","_","index","slice","useLayoutEffect","getContainerSize","_jsx","WrapperStyle","InlineLoader","ContainerStyle","isCenterAlign","size","item","color","id","width","previousIds","LineStyle","length","ChartLineLabel","displayName"],"mappings":";;;;;;;;;;;;;AAgBO,MAAMA,SAAS,gBAAGC,gBAAU,CACjC,CAACC,KAAD,EAAwBC,GAAxB,KAA+D;EAC7D,MAAM;AACJC,IAAAA,OAAO,GAAG,KADN;IAEJC,OAFI;IAGJC,QAHI;IAIJC,MAJI;IAKJC,MALI;IAMJC,IANI;IAOJC,UAPI;IAQJC,QARI;IASJC,aATI;IAUJ,GAAGC,IAAAA;AAVC,GAAA,GAWFX,KAXJ,CAAA;EAaA,MAAM,CAACY,aAAD,EAAgBC,gBAAhB,IAAoCC,cAAQ,CAGxC,IAHwC,CAAlD,CAAA;EAIA,MAAMC,WAAW,GAAGC,WAAK,EAAzB,CAAA;EAEA,MAAM;AAAET,IAAAA,IAAI,EAAEU,aAAR;AAAuBC,IAAAA,GAAAA;AAAvB,GAAA,GAA+BC,aAAO,CAC1C,MAAMC,uBAAW,CAACb,IAAD,EAAOQ,WAAP,EAAoBN,QAApB,CADyB,EAE1C,CAACF,IAAD,EAAOE,QAAP,EAAiBM,WAAjB,CAF0C,CAA5C,CAAA;EAKA,MAAMM,cAAc,GAAGF,aAAO,CAC5B,MAAMD,GAAG,CAACI,GAAJ,CAAQ,CAACC,CAAD,EAAIC,KAAJ,KAAcN,GAAG,CAACO,KAAJ,CAAU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GAAGjB,cAAc,CAACG,KAAD,CAAlC,CAAA;AAEA,QAAA,oBACEI,eAACW,yBAAD,EAAA;UAEE,MAAM,EAAG,CAAEF,EAAAA,KAAM,CAFnB,CAAA,CAAA;AAGE,UAAA,gBAAgB,EAAEF,KAHpB;AAIE,UAAA,OAAO,EAAElB,aAAa,CAACuB,MAAd,GAAuBhB,KAJlC;AAKE,UAAA,OAAO,EAAElB,MALX;UAME,YAAY,EAAE+B,KAAK,KAAK,GAN1B;AAAA,UAAA,QAAA,eAQET,eAACa,6BAAD,EAAA;AACE,YAAA,MAAM,EAAExB,aAAa,CAACuB,MAAd,GAAuBhB,KADjC;AAEE,YAAA,IAAI,EAAEhB,UAFR;AAGE,YAAA,WAAW,EAAE8B,WAHf;AAIE,YAAA,MAAM,EAAEjC,MAJV;AAKE,YAAA,aAAa,EAAEK,aALjB;AAME,YAAA,WAAW,EAAEK,WANf;YAAA,GAOMmB,IAAAA;AAPN,WAAA,CAAA;AARF,SAAA,EACOE,EADP,CADF,CAAA;OAJD,CAAA;AADH,KAAA,CAAA;GANJ,CAAA,CAAA;AAmCD,CAnFgC,EAA5B;AAqFPtC,SAAS,CAAC4C,WAAV,GAAwB,WAAxB;;;;"}
@@ -19,6 +19,7 @@ const ChartLineLabel = /*#__PURE__*/React.forwardRef((props, ref) => {
19
19
  thresholdType,
20
20
  height,
21
21
  threshold,
22
+ containerId,
22
23
  ...rest
23
24
  } = props;
24
25
  React.useLayoutEffect(() => {
@@ -28,15 +29,17 @@ const ChartLineLabel = /*#__PURE__*/React.forwardRef((props, ref) => {
28
29
  handlePositioning.handlePositioning({
29
30
  previousIds,
30
31
  id,
32
+ containerId,
31
33
  reset: true
32
34
  });
33
35
  } else {
34
36
  handlePositioning.handlePositioning({
35
37
  previousIds,
36
- id
38
+ id,
39
+ containerId
37
40
  });
38
41
  }
39
- }, [previousIds, id, show, thresholdType]);
42
+ }, [previousIds, id, show, thresholdType, containerId]);
40
43
  if (!show) return null;
41
44
  const backgroundColor = threshold.color || color;
42
45
  const content = threshold.descriptionElement || threshold.description;
@@ -1 +1 @@
1
- {"version":3,"file":"ChartLineLabel.js","sources":["../../../packages/chart-line/ChartLineLabel.tsx"],"sourcesContent":["import { ForwardedRef, forwardRef, useLayoutEffect } from 'react'\n\nimport { ChartLineLabelProps, ChartLineThresholdType } from './types.js'\nimport { ThresholdLabelStyle, ThresholdStyle } from './ChartLineStyles.js'\nimport { handlePositioning } from './utils/index.js'\n\nexport const ChartLineLabel = forwardRef(\n (props: ChartLineLabelProps, ref?: ForwardedRef<HTMLDivElement>) => {\n const {\n previousIds,\n id,\n color,\n zIndex,\n show,\n labelPosition,\n thresholdType,\n height,\n threshold,\n ...rest\n } = props\n\n useLayoutEffect(() => {\n if (!show) return\n if (thresholdType !== ChartLineThresholdType.flag) {\n handlePositioning({ previousIds, id, reset: true })\n } else {\n handlePositioning({ previousIds, id })\n }\n }, [previousIds, id, show, thresholdType])\n\n if (!show) return null\n\n const backgroundColor = threshold.color || color\n const content = threshold.descriptionElement || threshold.description\n\n return (\n <ThresholdStyle\n ref={ref}\n id={id}\n data-label-position={labelPosition}\n $labelPosition={labelPosition}\n $thresholdType={thresholdType}\n $height={height}\n $backgroundColor={backgroundColor}\n $zIndex={zIndex}\n {...rest}\n >\n {thresholdType === ChartLineThresholdType.flag && (\n <ThresholdLabelStyle\n style={{ backgroundColor }}\n id={`${id}-description`}\n $labelPosition={labelPosition}\n >\n {content}\n </ThresholdLabelStyle>\n )}\n </ThresholdStyle>\n )\n },\n)\nChartLineLabel.displayName = 'ChartLineLabel'\n"],"names":["ChartLineLabel","forwardRef","props","ref","previousIds","id","color","zIndex","show","labelPosition","thresholdType","height","threshold","rest","useLayoutEffect","ChartLineThresholdType","flag","handlePositioning","reset","backgroundColor","content","descriptionElement","description","_jsx","ThresholdStyle","ThresholdLabelStyle","displayName"],"mappings":";;;;;;;;;;AAMO,MAAMA,cAAc,gBAAGC,gBAAU,CACtC,CAACC,KAAD,EAA6BC,GAA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AAD,EAAA;AACE,MAAA,KAAK,EAAE;AAAEN,QAAAA,eAAAA;OADX;MAEE,EAAE,EAAG,CAAEd,EAAAA,EAAG,CAFZ,YAAA,CAAA;AAGE,MAAA,cAAc,EAAEI,aAHlB;MAAA,QAKGW,EAAAA,OAAAA;AALH,KAAA,CAAA;GAbN,CAAA,CAAA;AAuBD,CApDqC,EAAjC;AAsDPpB,cAAc,CAAC0B,WAAf,GAA6B,gBAA7B;;;;"}
1
+ {"version":3,"file":"ChartLineLabel.js","sources":["../../../packages/chart-line/ChartLineLabel.tsx"],"sourcesContent":["import { ForwardedRef, forwardRef, useLayoutEffect } from 'react'\n\nimport { ChartLineLabelProps, ChartLineThresholdType } from './types.js'\nimport { ThresholdLabelStyle, ThresholdStyle } from './ChartLineStyles.js'\nimport { handlePositioning } from './utils/index.js'\n\nexport const ChartLineLabel = forwardRef(\n (props: ChartLineLabelProps, ref?: ForwardedRef<HTMLDivElement>) => {\n const {\n previousIds,\n id,\n color,\n zIndex,\n show,\n labelPosition,\n thresholdType,\n height,\n threshold,\n containerId,\n ...rest\n } = props\n\n useLayoutEffect(() => {\n if (!show) return\n if (thresholdType !== ChartLineThresholdType.flag) {\n handlePositioning({ previousIds, id, containerId, reset: true })\n } else {\n handlePositioning({ previousIds, id, containerId })\n }\n }, [previousIds, id, show, thresholdType, containerId])\n\n if (!show) return null\n\n const backgroundColor = threshold.color || color\n const content = threshold.descriptionElement || threshold.description\n\n return (\n <ThresholdStyle\n ref={ref}\n id={id}\n data-label-position={labelPosition}\n $labelPosition={labelPosition}\n $thresholdType={thresholdType}\n $height={height}\n $backgroundColor={backgroundColor}\n $zIndex={zIndex}\n {...rest}\n >\n {thresholdType === ChartLineThresholdType.flag && (\n <ThresholdLabelStyle\n style={{ backgroundColor }}\n id={`${id}-description`}\n $labelPosition={labelPosition}\n >\n {content}\n </ThresholdLabelStyle>\n )}\n </ThresholdStyle>\n )\n },\n)\nChartLineLabel.displayName = 'ChartLineLabel'\n"],"names":["ChartLineLabel","forwardRef","props","ref","previousIds","id","color","zIndex","show","labelPosition","thresholdType","height","threshold","containerId","rest","useLayoutEffect","ChartLineThresholdType","flag","handlePositioning","reset","backgroundColor","content","descriptionElement","description","_jsx","ThresholdStyle","ThresholdLabelStyle","displayName"],"mappings":";;;;;;;;;;AAMO,MAAMA,cAAc,gBAAGC,gBAAU,CACtC,CAACC,KAAD,EAA6BC,GAA7B,KAAoE;EAClE,MAAM;IACJC,WADI;IAEJC,EAFI;IAGJC,KAHI;IAIJC,MAJI;IAKJC,IALI;IAMJC,aANI;IAOJC,aAPI;IAQJC,MARI;IASJC,SATI;IAUJC,WAVI;IAWJ,GAAGC,IAAAA;AAXC,GAAA,GAYFZ,KAZJ,CAAA;AAcAa,EAAAA,qBAAe,CAAC,MAAM;IACpB,IAAI,CAACP,IAAL,EAAW,OAAA;;AACX,IAAA,IAAIE,aAAa,KAAKM,4BAAsB,CAACC,IAA7C,EAAmD;AACjDC,MAAAA,mCAAiB,CAAC;QAAEd,WAAF;QAAeC,EAAf;QAAmBQ,WAAnB;AAAgCM,QAAAA,KAAK,EAAE,IAAA;AAAvC,OAAD,CAAjB,CAAA;AACD,KAFD,MAEO;AACLD,MAAAA,mCAAiB,CAAC;QAAEd,WAAF;QAAeC,EAAf;AAAmBQ,QAAAA,WAAAA;AAAnB,OAAD,CAAjB,CAAA;AACD,KAAA;AACF,GAPc,EAOZ,CAACT,WAAD,EAAcC,EAAd,EAAkBG,IAAlB,EAAwBE,aAAxB,EAAuCG,WAAvC,CAPY,CAAf,CAAA;AASA,EAAA,IAAI,CAACL,IAAL,EAAW,OAAO,IAAP,CAAA;AAEX,EAAA,MAAMY,eAAe,GAAGR,SAAS,CAACN,KAAV,IAAmBA,KAA3C,CAAA;EACA,MAAMe,OAAO,GAAGT,SAAS,CAACU,kBAAV,IAAgCV,SAAS,CAACW,WAA1D,CAAA;AAEA,EAAA,oBACEC,eAACC,8BAAD,EAAA;AACE,IAAA,GAAG,EAAEtB,GADP;AAEE,IAAA,EAAE,EAAEE,EAFN;AAGE,IAAA,qBAAA,EAAqBI,aAHvB;AAIE,IAAA,cAAc,EAAEA,aAJlB;AAKE,IAAA,cAAc,EAAEC,aALlB;AAME,IAAA,OAAO,EAAEC,MANX;AAOE,IAAA,gBAAgB,EAAES,eAPpB;AAQE,IAAA,OAAO,EAAEb,MARX;AAAA,IAAA,GASMO,IATN;AAAA,IAAA,QAAA,EAWGJ,aAAa,KAAKM,4BAAsB,CAACC,IAAzC,iBACCO,eAACE,mCAAD,EAAA;AACE,MAAA,KAAK,EAAE;AAAEN,QAAAA,eAAAA;OADX;MAEE,EAAE,EAAG,CAAEf,EAAAA,EAAG,CAFZ,YAAA,CAAA;AAGE,MAAA,cAAc,EAAEI,aAHlB;MAAA,QAKGY,EAAAA,OAAAA;AALH,KAAA,CAAA;GAbN,CAAA,CAAA;AAuBD,CArDqC,EAAjC;AAuDPrB,cAAc,CAAC2B,WAAf,GAA6B,gBAA7B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sources":["../../../packages/chart-line/types.tsx"],"sourcesContent":["import { LidoComponentProps } from '../utils/index.js'\nexport type { Theme } from '../theme/index.js'\n\nexport enum ChartLineThresholdType {\n dash = 'dash',\n flag = 'flag',\n}\nexport type ChartLineThresholdTypes = keyof typeof ChartLineThresholdType\nexport enum ChartLineBorderType {\n rounded = 'rounded',\n square = 'square',\n}\nexport type ChartLineBorderTypes = keyof typeof ChartLineBorderType\n\nexport type ChartLineConfig = {\n loading?: boolean\n data: LineData[]\n thresholdType: ChartLineThresholdType\n height: number\n border: ChartLineBorderType\n maxValue?: number\n showLabels?: boolean\n}\n\nexport type LineData = {\n color?: string\n labelPosition?: 'top' | 'bottom'\n threshold: {\n value: number\n color?: string\n label: string\n description: string\n descriptionElement?: React.ReactNode\n }\n}\n\nexport type ChartLineProps = LidoComponentProps<'div', ChartLineConfig>\n\nexport type ChartLineLabelProps = LidoComponentProps<\n 'div',\n {\n id: string\n previousIds?: string[]\n zIndex: number\n show?: boolean\n height: number\n thresholdType: ChartLineThresholdType\n } & LineData\n>\n"],"names":["ChartLineThresholdType","ChartLineBorderType"],"mappings":";;;;AAGYA,IAAAA,sBAAZ,0BAAYA,sBAAZ,EAAA;EAAYA,sBAAZ,CAAA,MAAA,CAAA,GAAA,MAAA,CAAA;EAAYA,sBAAZ,CAAA,MAAA,CAAA,GAAA,MAAA,CAAA;AAAA,EAAA,OAAYA,sBAAZ,CAAA;AAAA,CAAA,CAAA,EAAA,EAAA;AAKYC,IAAAA,mBAAZ,0BAAYA,mBAAZ,EAAA;EAAYA,mBAAZ,CAAA,SAAA,CAAA,GAAA,SAAA,CAAA;EAAYA,mBAAZ,CAAA,QAAA,CAAA,GAAA,QAAA,CAAA;AAAA,EAAA,OAAYA,mBAAZ,CAAA;AAAA,CAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"types.js","sources":["../../../packages/chart-line/types.tsx"],"sourcesContent":["import { LidoComponentProps } from '../utils/index.js'\nexport type { Theme } from '../theme/index.js'\n\nexport enum ChartLineThresholdType {\n dash = 'dash',\n flag = 'flag',\n}\nexport type ChartLineThresholdTypes = keyof typeof ChartLineThresholdType\nexport enum ChartLineBorderType {\n rounded = 'rounded',\n square = 'square',\n}\nexport type ChartLineBorderTypes = keyof typeof ChartLineBorderType\n\nexport type ChartLineConfig = {\n loading?: boolean\n data: LineData[]\n thresholdType: ChartLineThresholdType\n height: number\n border: ChartLineBorderType\n maxValue?: number\n showLabels?: boolean\n}\n\nexport type LineData = {\n color?: string\n labelPosition?: 'top' | 'bottom'\n threshold: {\n value: number\n color?: string\n label: string\n description: string\n descriptionElement?: React.ReactNode\n }\n}\n\nexport type ChartLineProps = LidoComponentProps<'div', ChartLineConfig>\n\nexport type ChartLineLabelProps = LidoComponentProps<\n 'div',\n {\n id: string\n previousIds?: string[]\n zIndex: number\n show?: boolean\n height: number\n thresholdType: ChartLineThresholdType\n containerId: string\n } & LineData\n>\n"],"names":["ChartLineThresholdType","ChartLineBorderType"],"mappings":";;;;AAGYA,IAAAA,sBAAZ,0BAAYA,sBAAZ,EAAA;EAAYA,sBAAZ,CAAA,MAAA,CAAA,GAAA,MAAA,CAAA;EAAYA,sBAAZ,CAAA,MAAA,CAAA,GAAA,MAAA,CAAA;AAAA,EAAA,OAAYA,sBAAZ,CAAA;AAAA,CAAA,CAAA,EAAA,EAAA;AAKYC,IAAAA,mBAAZ,0BAAYA,mBAAZ,EAAA;EAAYA,mBAAZ,CAAA,SAAA,CAAA,GAAA,SAAA,CAAA;EAAYA,mBAAZ,CAAA,QAAA,CAAA,GAAA,QAAA,CAAA;AAAA,EAAA,OAAYA,mBAAZ,CAAA;AAAA,CAAA,CAAA,EAAA;;;;;"}
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
5
  const VIEWPORT_MARGIN = 8;
6
- const CHART_LINE_CONTAINER_ID = 'chart-line-container';
6
+ const CHART_LINE_LABEL_ID = 'chart-line-label';
7
7
  const LABEL_HEIGHT_INCREASE = 36;
8
8
 
9
- exports.CHART_LINE_CONTAINER_ID = CHART_LINE_CONTAINER_ID;
9
+ exports.CHART_LINE_LABEL_ID = CHART_LINE_LABEL_ID;
10
10
  exports.LABEL_HEIGHT_INCREASE = LABEL_HEIGHT_INCREASE;
11
11
  exports.VIEWPORT_MARGIN = VIEWPORT_MARGIN;
12
12
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../packages/chart-line/utils/constants.ts"],"sourcesContent":["export const VIEWPORT_MARGIN = 8\nexport const CHART_LINE_CONTAINER_ID = 'chart-line-container'\nexport const LABEL_HEIGHT_INCREASE = 36\n"],"names":["VIEWPORT_MARGIN","CHART_LINE_CONTAINER_ID","LABEL_HEIGHT_INCREASE"],"mappings":";;;;AAAO,MAAMA,eAAe,GAAG,EAAxB;AACA,MAAMC,uBAAuB,GAAG,uBAAhC;AACA,MAAMC,qBAAqB,GAAG;;;;;;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../packages/chart-line/utils/constants.ts"],"sourcesContent":["export const VIEWPORT_MARGIN = 8\nexport const CHART_LINE_LABEL_ID = 'chart-line-label'\nexport const LABEL_HEIGHT_INCREASE = 36\n"],"names":["VIEWPORT_MARGIN","CHART_LINE_LABEL_ID","LABEL_HEIGHT_INCREASE"],"mappings":";;;;AAAO,MAAMA,eAAe,GAAG,EAAxB;AACA,MAAMC,mBAAmB,GAAG,mBAA5B;AACA,MAAMC,qBAAqB,GAAG;;;;;;"}
@@ -6,11 +6,11 @@ const checkViewport = require('./checkViewport.js');
6
6
  const constants = require('./constants.js');
7
7
 
8
8
  // Get elements and their rects in one go
9
- const getElementData = id => {
9
+ const getElementData = (id, containerId) => {
10
10
  const threshold = document.getElementById(id);
11
11
  const label = document.getElementById(`${id}-description`);
12
12
  if (!threshold || !label) return null;
13
- const container = document.getElementById(constants.CHART_LINE_CONTAINER_ID);
13
+ const container = document.getElementById(containerId);
14
14
  if (!container) return null; // Temporarily reset transform to get original positions
15
15
 
16
16
  const originalTransform = label.style.transform;
@@ -112,7 +112,8 @@ const handlePositioning = props => {
112
112
  const {
113
113
  previousIds = [],
114
114
  id,
115
- reset
115
+ reset,
116
+ containerId
116
117
  } = props; // Check if we are in browser (not SSR)
117
118
 
118
119
  if (typeof window === 'undefined') return;
@@ -122,7 +123,7 @@ const handlePositioning = props => {
122
123
  return;
123
124
  }
124
125
 
125
- const currentData = getElementData(id);
126
+ const currentData = getElementData(id, containerId);
126
127
  if (!currentData) return;
127
128
  const {
128
129
  elements: currentElements,
@@ -146,7 +147,7 @@ const handlePositioning = props => {
146
147
 
147
148
  const previousId = getPreviousThreshold(previousIds, id);
148
149
  if (!previousId) return;
149
- const previousData = getElementData(previousId);
150
+ const previousData = getElementData(previousId, containerId);
150
151
  if (!previousData) return;
151
152
  const {
152
153
  rects: previousRects,
@@ -1 +1 @@
1
- {"version":3,"file":"handlePositioning.js","sources":["../../../../packages/chart-line/utils/handlePositioning.ts"],"sourcesContent":["import { checkViewportOverflow } from './checkViewport.js'\nimport {\n CHART_LINE_CONTAINER_ID,\n LABEL_HEIGHT_INCREASE,\n VIEWPORT_MARGIN,\n} from './constants.js'\n\ntype HandlePositioningProps = {\n previousIds?: string[]\n id: string\n reset?: boolean\n}\n\ntype PositioningData = {\n elements: {\n threshold: HTMLElement\n label: HTMLElement\n }\n rects: {\n threshold: DOMRect\n label: DOMRect\n }\n containerRect: DOMRect\n}\n\n// Get elements and their rects in one go\nconst getElementData = (id: string): PositioningData | null => {\n const threshold = document.getElementById(id)\n const label = document.getElementById(`${id}-description`)\n\n if (!threshold || !label) return null\n\n const container = document.getElementById(CHART_LINE_CONTAINER_ID)\n if (!container) return null\n\n // Temporarily reset transform to get original positions\n const originalTransform = label.style.transform\n label.style.removeProperty('transform')\n\n const thresholdRect = threshold.getBoundingClientRect()\n const labelRect = label.getBoundingClientRect()\n const containerRect = container.getBoundingClientRect()\n\n // Restore transform if it existed\n if (originalTransform) {\n label.style.setProperty('transform', originalTransform)\n }\n\n return {\n elements: { threshold, label },\n rects: { threshold: thresholdRect, label: labelRect },\n containerRect,\n }\n}\n\n// Calculate offset needed to keep label within viewport bounds\nconst calculateLabelOffset = (\n thresholdRect: DOMRect,\n labelRect: DOMRect,\n containerRect: DOMRect,\n isInverted: boolean,\n): number => {\n if (isInverted) {\n // Label positioned with left: 0 (extends right from threshold)\n // Check if label extends beyond container right boundary\n const labelRightEdge = thresholdRect.left + labelRect.width\n const containerRightEdge = containerRect.right - VIEWPORT_MARGIN\n\n if (labelRightEdge > containerRightEdge) {\n return labelRightEdge - containerRightEdge\n }\n } else {\n // Label positioned with right: 0 (extends left from threshold - default behavior)\n // Check if label left edge goes beyond container left boundary\n const labelLeftEdge = thresholdRect.right - labelRect.width\n const containerLeftEdge = containerRect.left + VIEWPORT_MARGIN\n\n if (labelLeftEdge < containerLeftEdge) {\n return containerLeftEdge - labelLeftEdge\n }\n }\n return 0\n}\n\n// Calculate if flag should be inverted based on viewport overflow\nconst shouldInvertLabel = (\n thresholdRect: DOMRect,\n labelRect: DOMRect,\n containerRect: DOMRect,\n viewportWidth: number,\n): boolean => {\n const position = containerRect.right - thresholdRect.right\n\n const isInverted = checkViewportOverflow(\n position,\n labelRect.width,\n viewportWidth,\n )\n\n return isInverted\n}\n\nexport const resetThresholdHeight = (threshold: HTMLElement | null): void => {\n if (!threshold) return\n\n threshold.style.removeProperty('height')\n}\n\n// Apply label positioning based on inversion\nconst applyLabelPosition = (label: HTMLElement, isInverted: boolean): void => {\n if (isInverted) {\n label.style.setProperty('left', '0px')\n label.style.setProperty('right', 'auto')\n label.dataset.isInverted = 'true'\n } else {\n label.style.setProperty('right', '0px')\n label.style.setProperty('left', 'auto')\n label.dataset.isInverted = 'false'\n }\n}\n\n// Calculate distance between two thresholds considering label inversion\nconst calculateFlagDistance = (\n currentRect: DOMRect,\n previousRect: DOMRect,\n currentLabelRect: DOMRect,\n isPreviousInverted: boolean,\n): number => {\n return isPreviousInverted\n ? currentRect.left - previousRect.left - currentLabelRect.width\n : currentRect.left - previousRect.left\n}\n\n// Get first previous threshold on the same position as the current threshold\nconst getPreviousThreshold = (\n previousIds: string[],\n currentId: string,\n): string | null => {\n const currentElement = document.getElementById(currentId)\n if (!currentElement) return null\n\n const currentLabelPosition = currentElement.dataset.labelPosition\n\n for (let i = previousIds.length - 1; i >= 0; i--) {\n const id = previousIds[i]\n const element = document.getElementById(id)\n if (element?.dataset.labelPosition === currentLabelPosition) {\n return id\n }\n }\n\n return null\n}\n\nexport const handlePositioning = (props: HandlePositioningProps): void => {\n const { previousIds = [], id, reset } = props\n\n // Check if we are in browser (not SSR)\n if (typeof window === 'undefined') return\n\n if (reset) {\n resetThresholdHeight(document.getElementById(id))\n return\n }\n\n const currentData = getElementData(id)\n if (!currentData) return\n\n const {\n elements: currentElements,\n rects: currentRects,\n containerRect,\n } = currentData\n\n // Calculate inversion for current label using container width\n const currentIsInverted = shouldInvertLabel(\n currentRects.threshold,\n currentRects.label,\n containerRect,\n containerRect.width,\n )\n\n // Apply positioning for current label\n applyLabelPosition(currentElements.label, currentIsInverted)\n\n // Calculate offset needed to keep label within bounds\n const currentOffset = calculateLabelOffset(\n currentRects.threshold,\n currentRects.label,\n containerRect,\n currentIsInverted,\n )\n\n // Apply offset if needed\n if (currentOffset > 0) {\n const direction = currentIsInverted ? -currentOffset : currentOffset\n currentElements.label.style.setProperty(\n 'transform',\n `translateX(${direction}px)`,\n )\n } else {\n currentElements.label.style.removeProperty('transform')\n }\n\n // Handle previous threshold positioning if exists\n const previousId = getPreviousThreshold(previousIds, id)\n if (!previousId) return\n\n const previousData = getElementData(previousId)\n if (!previousData) return\n\n const { rects: previousRects, elements: previousElements } = previousData\n\n // Calculate inversion for previous flag using window width (as in original)\n const previousIsInverted =\n previousElements.label.dataset.isInverted === 'true'\n\n // Calculate distance and adjust height if needed\n const distance = calculateFlagDistance(\n currentRects.threshold,\n previousRects.threshold,\n currentRects.label,\n previousIsInverted,\n )\n\n if (distance < currentRects.label.width) {\n const newHeight = previousRects.threshold.height + LABEL_HEIGHT_INCREASE\n currentElements.threshold.style.setProperty('height', `${newHeight}px`)\n }\n}\n"],"names":["getElementData","id","threshold","document","getElementById","label","container","CHART_LINE_CONTAINER_ID","originalTransform","style","transform","removeProperty","thresholdRect","getBoundingClientRect","labelRect","containerRect","setProperty","elements","rects","calculateLabelOffset","isInverted","labelRightEdge","left","width","containerRightEdge","right","VIEWPORT_MARGIN","labelLeftEdge","containerLeftEdge","shouldInvertLabel","viewportWidth","position","checkViewportOverflow","resetThresholdHeight","applyLabelPosition","dataset","calculateFlagDistance","currentRect","previousRect","currentLabelRect","isPreviousInverted","getPreviousThreshold","previousIds","currentId","currentElement","currentLabelPosition","labelPosition","i","length","element","handlePositioning","props","reset","window","currentData","currentElements","currentRects","currentIsInverted","currentOffset","direction","previousId","previousData","previousRects","previousElements","previousIsInverted","distance","newHeight","height","LABEL_HE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aAAa,CAAC5D,SAAd,CAAwBiE,MAAxB,GAAiCC,+BAAnD,CAAA;IACAb,eAAe,CAACrD,SAAhB,CAA0BO,KAA1B,CAAgCO,WAAhC,CAA4C,QAA5C,EAAuD,CAAEkD,EAAAA,SAAU,CAAnE,EAAA,CAAA,CAAA,CAAA;AACD,GAAA;AACF;;;;;"}
1
+ {"version":3,"file":"handlePositioning.js","sources":["../../../../packages/chart-line/utils/handlePositioning.ts"],"sourcesContent":["import { checkViewportOverflow } from './checkViewport.js'\nimport { LABEL_HEIGHT_INCREASE, VIEWPORT_MARGIN } from './constants.js'\n\ntype HandlePositioningProps = {\n previousIds?: string[]\n id: string\n reset?: boolean\n containerId: string\n}\n\ntype PositioningData = {\n elements: {\n threshold: HTMLElement\n label: HTMLElement\n }\n rects: {\n threshold: DOMRect\n label: DOMRect\n }\n containerRect: DOMRect\n}\n\n// Get elements and their rects in one go\nconst getElementData = (\n id: string,\n containerId: string,\n): PositioningData | null => {\n const threshold = document.getElementById(id)\n const label = document.getElementById(`${id}-description`)\n\n if (!threshold || !label) return null\n\n const container = document.getElementById(containerId)\n if (!container) return null\n\n // Temporarily reset transform to get original positions\n const originalTransform = label.style.transform\n label.style.removeProperty('transform')\n\n const thresholdRect = threshold.getBoundingClientRect()\n const labelRect = label.getBoundingClientRect()\n const containerRect = container.getBoundingClientRect()\n\n // Restore transform if it existed\n if (originalTransform) {\n label.style.setProperty('transform', originalTransform)\n }\n\n return {\n elements: { threshold, label },\n rects: { threshold: thresholdRect, label: labelRect },\n containerRect,\n }\n}\n\n// Calculate offset needed to keep label within viewport bounds\nconst calculateLabelOffset = (\n thresholdRect: DOMRect,\n labelRect: DOMRect,\n containerRect: DOMRect,\n isInverted: boolean,\n): number => {\n if (isInverted) {\n // Label positioned with left: 0 (extends right from threshold)\n // Check if label extends beyond container right boundary\n const labelRightEdge = thresholdRect.left + labelRect.width\n const containerRightEdge = containerRect.right - VIEWPORT_MARGIN\n\n if (labelRightEdge > containerRightEdge) {\n return labelRightEdge - containerRightEdge\n }\n } else {\n // Label positioned with right: 0 (extends left from threshold - default behavior)\n // Check if label left edge goes beyond container left boundary\n const labelLeftEdge = thresholdRect.right - labelRect.width\n const containerLeftEdge = containerRect.left + VIEWPORT_MARGIN\n\n if (labelLeftEdge < containerLeftEdge) {\n return containerLeftEdge - labelLeftEdge\n }\n }\n return 0\n}\n\n// Calculate if flag should be inverted based on viewport overflow\nconst shouldInvertLabel = (\n thresholdRect: DOMRect,\n labelRect: DOMRect,\n containerRect: DOMRect,\n viewportWidth: number,\n): boolean => {\n const position = containerRect.right - thresholdRect.right\n\n const isInverted = checkViewportOverflow(\n position,\n labelRect.width,\n viewportWidth,\n )\n\n return isInverted\n}\n\nexport const resetThresholdHeight = (threshold: HTMLElement | null): void => {\n if (!threshold) return\n\n threshold.style.removeProperty('height')\n}\n\n// Apply label positioning based on inversion\nconst applyLabelPosition = (label: HTMLElement, isInverted: boolean): void => {\n if (isInverted) {\n label.style.setProperty('left', '0px')\n label.style.setProperty('right', 'auto')\n label.dataset.isInverted = 'true'\n } else {\n label.style.setProperty('right', '0px')\n label.style.setProperty('left', 'auto')\n label.dataset.isInverted = 'false'\n }\n}\n\n// Calculate distance between two thresholds considering label inversion\nconst calculateFlagDistance = (\n currentRect: DOMRect,\n previousRect: DOMRect,\n currentLabelRect: DOMRect,\n isPreviousInverted: boolean,\n): number => {\n return isPreviousInverted\n ? currentRect.left - previousRect.left - currentLabelRect.width\n : currentRect.left - previousRect.left\n}\n\n// Get first previous threshold on the same position as the current threshold\nconst getPreviousThreshold = (\n previousIds: string[],\n currentId: string,\n): string | null => {\n const currentElement = document.getElementById(currentId)\n if (!currentElement) return null\n\n const currentLabelPosition = currentElement.dataset.labelPosition\n\n for (let i = previousIds.length - 1; i >= 0; i--) {\n const id = previousIds[i]\n const element = document.getElementById(id)\n if (element?.dataset.labelPosition === currentLabelPosition) {\n return id\n }\n }\n\n return null\n}\n\nexport const handlePositioning = (props: HandlePositioningProps): void => {\n const { previousIds = [], id, reset, containerId } = props\n\n // Check if we are in browser (not SSR)\n if (typeof window === 'undefined') return\n\n if (reset) {\n resetThresholdHeight(document.getElementById(id))\n return\n }\n\n const currentData = getElementData(id, containerId)\n if (!currentData) return\n\n const {\n elements: currentElements,\n rects: currentRects,\n containerRect,\n } = currentData\n\n // Calculate inversion for current label using container width\n const currentIsInverted = shouldInvertLabel(\n currentRects.threshold,\n currentRects.label,\n containerRect,\n containerRect.width,\n )\n\n // Apply positioning for current label\n applyLabelPosition(currentElements.label, currentIsInverted)\n\n // Calculate offset needed to keep label within bounds\n const currentOffset = calculateLabelOffset(\n currentRects.threshold,\n currentRects.label,\n containerRect,\n currentIsInverted,\n )\n\n // Apply offset if needed\n if (currentOffset > 0) {\n const direction = currentIsInverted ? -currentOffset : currentOffset\n currentElements.label.style.setProperty(\n 'transform',\n `translateX(${direction}px)`,\n )\n } else {\n currentElements.label.style.removeProperty('transform')\n }\n\n // Handle previous threshold positioning if exists\n const previousId = getPreviousThreshold(previousIds, id)\n if (!previousId) return\n\n const previousData = getElementData(previousId, containerId)\n if (!previousData) return\n\n const { rects: previousRects, elements: previousElements } = previousData\n\n // Calculate inversion for previous flag using window width (as in original)\n const previousIsInverted =\n previousElements.label.dataset.isInverted === 'true'\n\n // Calculate distance and adjust height if needed\n const distance = calculateFlagDistance(\n currentRects.threshold,\n previousRects.threshold,\n currentRects.label,\n previousIsInverted,\n )\n\n if (distance < currentRects.label.width) {\n const newHeight = previousRects.threshold.height + LABEL_HEIGHT_INCREASE\n currentElements.threshold.style.setProperty('height', `${newHeight}px`)\n }\n}\n"],"names":["getElementData","id","containerId","threshold","document","getElementById","label","container","originalTransform","style","transform","removeProperty","thresholdRect","getBoundingClientRect","labelRect","containerRect","setProperty","elements","rects","calculateLabelOffset","isInverted","labelRightEdge","left","width","containerRightEdge","right","VIEWPORT_MARGIN","labelLeftEdge","containerLeftEdge","shouldInvertLabel","viewportWidth","position","checkViewportOverflow","resetThresholdHeight","applyLabelPosition","dataset","calculateFlagDistance","currentRect","previousRect","currentLabelRect","isPreviousInverted","getPreviousThreshold","previousIds","currentId","currentElement","currentLabelPosition","labelPosition","i","length","element","handlePositioning","props","reset","window","currentData","currentElements","currentRects","currentIsInverted","currentOffset","direction","previousId","previousData","previousRects","previousElements","previousIsInverted","distance","newHeight","height","LABEL_HEIGHT_INCREASE"],"mappings":";;;;;;;AAsBA;AACA,MAAMA,cAAc,GAAG,CACrBC,EADqB,EAErBC,WAFqB,KAGM;AAC3B,EAAA,MAAMC,SAAS,GAAGC,QAAQ,CAACC,cAAT,CAAwBJ,EAAxB,CAAlB,CAAA;EACA,MAAMK,KAAK,GAAGF,QAAQ,CAACC,cAAT,CAAyB,CAAA,EAAEJ,EAAG,CAAA,YAAA,CAA9B,CAAd,CAAA;AAEA,EAAA,IAAI,CAACE,SAAD,IAAc,CAACG,KAAnB,EAA0B,OAAO,IAAP,CAAA;AAE1B,EAAA,MAAMC,SAAS,GAAGH,QAAQ,CAACC,cAAT,CAAwBH,WAAxB,CAAlB,CAAA;AACA,EAAA,IAAI,CAACK,SAAL,EAAgB,OAAO,IAAP,CAPW;;AAU3B,EAAA,MAAMC,iBAAiB,GAAGF,KAAK,CAACG,KAAN,CAAYC,SAAtC,CAAA;AACAJ,EAAAA,KAAK,CAACG,KAAN,CAAYE,cAAZ,CAA2B,WAA3B,CAAA,CAAA;AAEA,EAAA,MAAMC,aAAa,GAAGT,SAAS,CAACU,qBAAV,EAAtB,CAAA;AACA,EAAA,MAAMC,SAAS,GAAGR,KAAK,CAACO,qBAAN,EAAlB,CAAA;AACA,EAAA,MAAME,aAAa,GAAGR,SAAS,CAACM,qBAAV,EAAtB,CAf2B;;AAkB3B,EAAA,IAAIL,iBAAJ,EAAuB;AACrBF,IAAAA,KAAK,CAACG,KAAN,CAAYO,WAAZ,CAAwB,WAAxB,EAAqCR,iBAArC,CAAA,CAAA;AACD,GAAA;;EAED,OAAO;AACLS,IAAAA,QAAQ,EAAE;MAAEd,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D,CA5DwE;;AAgExE,EAAA,MAAM6C,QAAQ,GAAG7B,qBAAqB,CACpCoB,YAAY,CAACrD,SADuB,EAEpC2D,aAAa,CAAC3D,SAFsB,EAGpCqD,YAAY,CAAClD,KAHuB,EAIpC0D,kBAJoC,CAAtC,CAAA;;AAOA,EAAA,IAAIC,QAAQ,GAAGT,YAAY,CAAClD,KAAb,CAAmBiB,KAAlC,EAAyC;IACvC,MAAM2C,SAAS,GAAGJ,aAAa,CAAC3D,SAAd,CAAwBgE,MAAxB,GAAiCC,+BAAnD,CAAA;IACAb,eAAe,CAACpD,SAAhB,CAA0BM,KAA1B,CAAgCO,WAAhC,CAA4C,QAA5C,EAAuD,CAAEkD,EAAAA,SAAU,CAAnE,EAAA,CAAA,CAAA,CAAA;AACD,GAAA;AACF;;;;;"}
@@ -2,14 +2,16 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const processData = (data, maxValue) => {
5
+ const constants = require('./constants.js');
6
+
7
+ const processData = (data, containerId, maxValue) => {
6
8
  // Calculate maxValue once if not provided
7
9
  const calculatedMaxValue = maxValue ?? Math.max(...data.map(item => item.threshold.value));
8
10
  return data.sort((a, b) => a.threshold.value - b.threshold.value).reduce((acc, item, index) => {
9
11
  const {
10
12
  threshold
11
13
  } = item;
12
- const id = `chart-percent-line-group-${index}-${threshold.label}`;
14
+ const id = `${containerId}-${constants.CHART_LINE_LABEL_ID}-${index}-${threshold.label}`;
13
15
  const width = threshold.value / (calculatedMaxValue / 100);
14
16
  const processedItem = { ...item,
15
17
  id,
@@ -1 +1 @@
1
- {"version":3,"file":"processData.js","sources":["../../../../packages/chart-line/utils/processData.ts"],"sourcesContent":["import { LineData } from '../types.js'\n\ntype ProcessedLineData = LineData & {\n id: string\n index: number\n width: number\n}\n\ntype ProcessedData = {\n data: ProcessedLineData[]\n ids: string[]\n}\n\nexport const processData = (\n data: LineData[],\n maxValue?: number,\n): ProcessedData => {\n // Calculate maxValue once if not provided\n const calculatedMaxValue =\n maxValue ?? Math.max(...data.map((item) => item.threshold.value))\n\n return data\n .sort((a, b) => a.threshold.value - b.threshold.value)\n .reduce<ProcessedData>(\n (acc, item, index) => {\n const { threshold } = item\n const id = `chart-percent-line-group-${index}-${threshold.label}`\n const width = threshold.value / (calculatedMaxValue / 100)\n\n const processedItem: ProcessedLineData = {\n ...item,\n id,\n index,\n width,\n }\n\n acc.data.push(processedItem)\n acc.ids.push(id)\n\n return acc\n },\n { data: [], ids: [] },\n )\n}\n"],"names":["processData","data","maxValue","calculatedMaxValue","Math","max","map","item","threshold","value","sort","a","b","reduce","acc","index","id","label","width","processedItem","push","ids"],"mappings":";;;;MAaaA,WAAW,GAAG,CACzBC,IADyB,EAEzBC,QAFyB,KAGP;AAClB;EACA,MAAMC,kBAAkB,GACtBD,QAAQ,IAAIE,IAAI,CAACC,GAAL,CAAS,GAAGJ,IAAI,CAACK,GAAL,CAAUC,IAAD,IAAUA,IAAI,CAACC,SAAL,CAAeC,KAAlC,CAAZ,CADd,CAAA;AAGA,EAAA,OAAOR,IAAI,CACRS,IADI,CACC,CAACC,CAAD,EAAIC,CAAJ,KAAUD,CAAC,CAACH,SAAF,CAAYC,KAAZ,GAAoBG,CAAC,CAACJ,SAAF,CAAYC,KAD3C,CAEJI,CAAAA,MAFI,CAGH,CAACC,GAAD,EAAMP,IAAN,EAAYQ,KAAZ,KAAsB;IACpB,MAAM;AAAEP,MAAAA,SAAAA;AAAF,KAAA,GAAgBD,IAAtB,CAAA;IACA,MAAMS,EAAE,GAAI,CAA2BD,yBAAAA,EAAAA,KAAM,IAAGP,SAAS,CAACS,KAAM,CAAhE,CAAA,CAAA;IACA,MAAMC,KAAK,GAAGV,SAAS,CAACC,KAAV,IAAmBN,kBAAkB,GAAG,GAAxC,CAAd,CAAA;AAEA,IAAA,MAAMgB,aAAgC,GAAG,EACvC,GAAGZ,IADoC;MAEvCS,EAFuC;MAGvCD,KAHuC;AAIvCG,MAAAA,KAAAA;KAJF,CAAA;AAOAJ,IAAAA,GAAG,CAACb,IAAJ,CAASmB,IAAT,CAAcD,aAAd,CAAA,CAAA;AACAL,IAAAA,GAAG,CAACO,GAAJ,CAAQD,IAAR,CAAaJ,EAAb,CAAA,CAAA;AAEA,IAAA,OAAOF,GAAP,CAAA;AACD,GAnBE,EAoBH;AAAEb,IAAAA,IAAI,EAAE,EAAR;AAAYoB,IAAAA,GAAG,EAAE,EAAA;AAAjB,GApBG,CAAP,CAAA;AAsBD;;;;"}
1
+ {"version":3,"file":"processData.js","sources":["../../../../packages/chart-line/utils/processData.ts"],"sourcesContent":["import { CHART_LINE_LABEL_ID } from './constants.js'\nimport { LineData } from '../types.js'\n\ntype ProcessedLineData = LineData & {\n id: string\n index: number\n width: number\n}\n\ntype ProcessedData = {\n data: ProcessedLineData[]\n ids: string[]\n}\n\nexport const processData = (\n data: LineData[],\n containerId: string,\n maxValue?: number,\n): ProcessedData => {\n // Calculate maxValue once if not provided\n const calculatedMaxValue =\n maxValue ?? Math.max(...data.map((item) => item.threshold.value))\n\n return data\n .sort((a, b) => a.threshold.value - b.threshold.value)\n .reduce<ProcessedData>(\n (acc, item, index) => {\n const { threshold } = item\n const id = `${containerId}-${CHART_LINE_LABEL_ID}-${index}-${threshold.label}`\n const width = threshold.value / (calculatedMaxValue / 100)\n\n const processedItem: ProcessedLineData = {\n ...item,\n id,\n index,\n width,\n }\n\n acc.data.push(processedItem)\n acc.ids.push(id)\n\n return acc\n },\n { data: [], ids: [] },\n )\n}\n"],"names":["processData","data","containerId","maxValue","calculatedMaxValue","Math","max","map","item","threshold","value","sort","a","b","reduce","acc","index","id","CHART_LINE_LABEL_ID","label","width","processedItem","push","ids"],"mappings":";;;;;;AAcO,MAAMA,WAAW,GAAG,CACzBC,IADyB,EAEzBC,WAFyB,EAGzBC,QAHyB,KAIP;AAClB;EACA,MAAMC,kBAAkB,GACtBD,QAAQ,IAAIE,IAAI,CAACC,GAAL,CAAS,GAAGL,IAAI,CAACM,GAAL,CAAUC,IAAD,IAAUA,IAAI,CAACC,SAAL,CAAeC,KAAlC,CAAZ,CADd,CAAA;AAGA,EAAA,OAAOT,IAAI,CACRU,IADI,CACC,CAACC,CAAD,EAAIC,CAAJ,KAAUD,CAAC,CAACH,SAAF,CAAYC,KAAZ,GAAoBG,CAAC,CAACJ,SAAF,CAAYC,KAD3C,CAEJI,CAAAA,MAFI,CAGH,CAACC,GAAD,EAAMP,IAAN,EAAYQ,KAAZ,KAAsB;IACpB,MAAM;AAAEP,MAAAA,SAAAA;AAAF,KAAA,GAAgBD,IAAtB,CAAA;AACA,IAAA,MAAMS,EAAE,GAAI,CAAEf,EAAAA,WAAY,CAAGgB,CAAAA,EAAAA,6BAAoB,CAAGF,CAAAA,EAAAA,KAAM,CAAGP,CAAAA,EAAAA,SAAS,CAACU,KAAM,CAA7E,CAAA,CAAA;IACA,MAAMC,KAAK,GAAGX,SAAS,CAACC,KAAV,IAAmBN,kBAAkB,GAAG,GAAxC,CAAd,CAAA;AAEA,IAAA,MAAMiB,aAAgC,GAAG,EACvC,GAAGb,IADoC;MAEvCS,EAFuC;MAGvCD,KAHuC;AAIvCI,MAAAA,KAAAA;KAJF,CAAA;AAOAL,IAAAA,GAAG,CAACd,IAAJ,CAASqB,IAAT,CAAcD,aAAd,CAAA,CAAA;AACAN,IAAAA,GAAG,CAACQ,GAAJ,CAAQD,IAAR,CAAaL,EAAb,CAAA,CAAA;AAEA,IAAA,OAAOF,GAAP,CAAA;AACD,GAnBE,EAoBH;AAAEd,IAAAA,IAAI,EAAE,EAAR;AAAYsB,IAAAA,GAAG,EAAE,EAAA;AAAjB,GApBG,CAAP,CAAA;AAsBD;;;;"}
package/dist/cjs/index.js CHANGED
@@ -52,26 +52,27 @@ const Modal = require('./modal/Modal.js');
52
52
  const ModalExtra = require('./modal/ModalExtra.js');
53
53
  const ModalOverlay = require('./modal/ModalOverlay.js');
54
54
  const ModalButton = require('./modal/ModalButton.js');
55
+ const types$9 = require('./modal/types.js');
55
56
  const Pagination = require('./pagination/Pagination.js');
56
57
  const PaginationItem = require('./pagination/PaginationItem.js');
57
- const types$9 = require('./pagination/types.js');
58
+ const types$a = require('./pagination/types.js');
58
59
  const constants = require('./popover/constants.js');
59
60
  const Popover = require('./popover/Popover.js');
60
- const types$a = require('./popover/types.js');
61
+ const types$b = require('./popover/types.js');
61
62
  const PopupMenu = require('./popup-menu/PopupMenu.js');
62
63
  const PopupMenuItem = require('./popup-menu/PopupMenuItem.js');
63
- const types$b = require('./popup-menu/types.js');
64
+ const types$c = require('./popup-menu/types.js');
64
65
  const Section = require('./section/Section.js');
65
66
  const Select = require('./select/Select.js');
66
67
  const SelectIcon = require('./select/SelectIcon.js');
67
68
  const Option = require('./select/Option.js');
68
- const types$c = require('./select/types.js');
69
+ const types$d = require('./select/types.js');
69
70
  const ServicePage = require('./service-page/ServicePage.js');
70
71
  const Stack = require('./stack/Stack.js');
71
72
  const StackItem = require('./stack/StackItem.js');
72
73
  const HStack = require('./stack/HStack.js');
73
74
  const VStack = require('./stack/VStack.js');
74
- const types$d = require('./stack/types.js');
75
+ const types$e = require('./stack/types.js');
75
76
  const withStyledSystem = require('./styled-system/withStyledSystem.js');
76
77
  const Table = require('./table/Table.js');
77
78
  const Thead = require('./table/Thead.js');
@@ -80,9 +81,9 @@ const Tfoot = require('./table/Tfoot.js');
80
81
  const Tr = require('./table/Tr.js');
81
82
  const Th = require('./table/Th.js');
82
83
  const Td = require('./table/Td.js');
83
- const types$e = require('./table/types.js');
84
+ const types$f = require('./table/types.js');
84
85
  const Text = require('./text/Text.js');
85
- const types$f = require('./text/types.js');
86
+ const types$g = require('./text/types.js');
86
87
  const cookieThemeProvider = require('./theme/cookie-theme-provider.js');
87
88
  const themeProvider = require('./theme/theme-provider.js');
88
89
  const index$1 = require('./theme/document-head-contents/index.js');
@@ -97,7 +98,7 @@ const ToastError = require('./toast/ToastError.js');
97
98
  const ToastInfo = require('./toast/ToastInfo.js');
98
99
  const ToastPending = require('./toast/ToastPending.js');
99
100
  const ToastSuccess = require('./toast/ToastSuccess.js');
100
- const types$g = require('./toast/types.js');
101
+ const types$h = require('./toast/types.js');
101
102
  const Tooltip = require('./tooltip/Tooltip.js');
102
103
  const withTransition = require('./transition/withTransition.js');
103
104
  const index$2 = require('./utils/index.js');
@@ -107,9 +108,9 @@ const cookiesTooltip = require('./cookies-tooltip/cookies-tooltip.js');
107
108
  const utils = require('./cookies-tooltip/utils.js');
108
109
  const ChartLine = require('./chart-line/ChartLine.js');
109
110
  const ChartLineLabel = require('./chart-line/ChartLineLabel.js');
110
- const types$h = require('./chart-line/types.js');
111
+ const types$i = require('./chart-line/types.js');
111
112
  const ChartProportion = require('./chart-proportion/ChartProportion.js');
112
- const types$i = require('./chart-proportion/types.js');
113
+ const types$j = require('./chart-proportion/types.js');
113
114
  const modalRoot = require('./utils/modalRoot.js');
114
115
  const elementFonts = require('./theme/document-head-contents/element-fonts.js');
115
116
  const getTopLevelDomain = require('./utils/get-top-level-domain.js');
@@ -263,32 +264,33 @@ exports.Modal = Modal.Modal;
263
264
  exports.ModalExtra = ModalExtra.ModalExtra;
264
265
  exports.ModalOverlay = ModalOverlay.ModalOverlay;
265
266
  exports.ModalButton = ModalButton.ModalButton;
267
+ exports.ModalWindowSize = types$9.ModalWindowSize;
266
268
  exports.Pagination = Pagination.Pagination;
267
269
  exports.PaginationItem = PaginationItem.PaginationItem;
268
- exports.PaginationItemVariant = types$9.PaginationItemVariant;
270
+ exports.PaginationItemVariant = types$a.PaginationItemVariant;
269
271
  exports.DEFAULT_PLACEMENT = constants.DEFAULT_PLACEMENT;
270
272
  exports.INITIAL_STYLE = constants.INITIAL_STYLE;
271
273
  exports.Popover = Popover.Popover;
272
- exports.PopoverOffset = types$a.PopoverOffset;
273
- exports.PopoverPlacement = types$a.PopoverPlacement;
274
+ exports.PopoverOffset = types$b.PopoverOffset;
275
+ exports.PopoverPlacement = types$b.PopoverPlacement;
274
276
  exports.PopupMenu = PopupMenu.PopupMenu;
275
277
  exports.PopupMenuItem = PopupMenuItem.PopupMenuItem;
276
- exports.PopupMenuVariant = types$b.PopupMenuVariant;
278
+ exports.PopupMenuVariant = types$c.PopupMenuVariant;
277
279
  exports.Section = Section.Section;
278
280
  exports.Select = Select.Select;
279
281
  exports.SelectIcon = SelectIcon.SelectIcon;
280
282
  exports.Option = Option.Option;
281
- exports.SelectArrow = types$c.SelectArrow;
283
+ exports.SelectArrow = types$d.SelectArrow;
282
284
  exports.ServicePage = ServicePage.ServicePage;
283
285
  exports.Stack = Stack.Stack;
284
286
  exports.StackItem = StackItem.StackItem;
285
287
  exports.HStack = HStack.HStack;
286
288
  exports.VStack = VStack.VStack;
287
- exports.StackAlign = types$d.StackAlign;
288
- exports.StackDirection = types$d.StackDirection;
289
- exports.StackJustify = types$d.StackJustify;
290
- exports.StackSpacing = types$d.StackSpacing;
291
- exports.StackWrap = types$d.StackWrap;
289
+ exports.StackAlign = types$e.StackAlign;
290
+ exports.StackDirection = types$e.StackDirection;
291
+ exports.StackJustify = types$e.StackJustify;
292
+ exports.StackSpacing = types$e.StackSpacing;
293
+ exports.StackWrap = types$e.StackWrap;
292
294
  exports.withStyledSystem = withStyledSystem;
293
295
  exports.Table = Table.Table;
294
296
  exports.Thead = Thead.Thead;
@@ -297,14 +299,14 @@ exports.Tfoot = Tfoot.Tfoot;
297
299
  exports.Tr = Tr.Tr;
298
300
  exports.Th = Th.Th;
299
301
  exports.Td = Td.Td;
300
- exports.TableAlign = types$e.TableAlign;
301
- exports.TableTextColor = types$e.TableTextColor;
302
- exports.ThSortDir = types$e.ThSortDir;
303
- exports.ThTdVariant = types$e.ThTdVariant;
304
- exports.TrHighlight = types$e.TrHighlight;
302
+ exports.TableAlign = types$f.TableAlign;
303
+ exports.TableTextColor = types$f.TableTextColor;
304
+ exports.ThSortDir = types$f.ThSortDir;
305
+ exports.ThTdVariant = types$f.ThTdVariant;
306
+ exports.TrHighlight = types$f.TrHighlight;
305
307
  exports.Text = Text.Text;
306
- exports.TextColor = types$f.TextColor;
307
- exports.TextSize = types$f.TextSize;
308
+ exports.TextColor = types$g.TextColor;
309
+ exports.TextSize = types$g.TextSize;
308
310
  exports.CookieThemeProvider = cookieThemeProvider.CookieThemeProvider;
309
311
  exports.ThemeToggleContext = cookieThemeProvider.ThemeToggleContext;
310
312
  exports.DarkThemeProvider = themeProvider.DarkThemeProvider;
@@ -335,7 +337,7 @@ exports.ToastError = ToastError.ToastError;
335
337
  exports.ToastInfo = ToastInfo.ToastInfo;
336
338
  exports.ToastPending = ToastPending.ToastPending;
337
339
  exports.ToastSuccess = ToastSuccess.ToastSuccess;
338
- exports.ToastPosition = types$g.ToastPosition;
340
+ exports.ToastPosition = types$h.ToastPosition;
339
341
  exports.Tooltip = Tooltip.Tooltip;
340
342
  exports.withTransition = withTransition.withTransition;
341
343
  exports.VOID_FN = index$2.VOID_FN;
@@ -345,12 +347,12 @@ exports.CookiesTooltip = cookiesTooltip.CookiesTooltip;
345
347
  exports.migrationAllowCookieToCrossDomainCookieClientSide = utils.migrationAllowCookieToCrossDomainCookieClientSide;
346
348
  exports.ChartLine = ChartLine.ChartLine;
347
349
  exports.ChartLineLabel = ChartLineLabel.ChartLineLabel;
348
- exports.ChartLineBorderType = types$h.ChartLineBorderType;
349
- exports.ChartLineThresholdType = types$h.ChartLineThresholdType;
350
+ exports.ChartLineBorderType = types$i.ChartLineBorderType;
351
+ exports.ChartLineThresholdType = types$i.ChartLineThresholdType;
350
352
  exports.ChartProportion = ChartProportion.ChartProportion;
351
- exports.ChartProportionBorderSize = types$i.ChartProportionBorderSize;
352
- exports.ChartProportionBorderType = types$i.ChartProportionBorderType;
353
- exports.MarginSize = types$i.MarginSize;
353
+ exports.ChartProportionBorderSize = types$j.ChartProportionBorderSize;
354
+ exports.ChartProportionBorderType = types$j.ChartProportionBorderType;
355
+ exports.MarginSize = types$j.MarginSize;
354
356
  exports.modalRoot = modalRoot;
355
357
  exports.Fonts = elementFonts.Fonts;
356
358
  exports.getTopLevelDomain = getTopLevelDomain.getTopLevelDomain;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -18,6 +18,8 @@ const Modal = /*#__PURE__*/React.forwardRef((_ref, ref) => {
18
18
  open,
19
19
  onClose,
20
20
  onBack,
21
+ windowSize = 'sm',
22
+ windowProps,
21
23
  ...rest
22
24
  } = _ref;
23
25
  const withTitleIcon = !!titleIcon;
@@ -53,6 +55,8 @@ const Modal = /*#__PURE__*/React.forwardRef((_ref, ref) => {
53
55
  ...rest,
54
56
  children: /*#__PURE__*/jsxRuntime.jsxs(ModalStyles.ModalStyle, {
55
57
  $center: center,
58
+ $size: windowSize,
59
+ ...windowProps,
56
60
  children: [/*#__PURE__*/jsxRuntime.jsxs(ModalStyles.ModalBaseStyle, {
57
61
  children: [modalHeader, withSubtitle && /*#__PURE__*/jsxRuntime.jsx(ModalStyles.ModalSubtitleStyle, {
58
62
  children: subtitle
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","sources":["../../../packages/modal/Modal.tsx"],"sourcesContent":["import { ForwardedRef, forwardRef } from 'react'\nimport {\n ModalStyle,\n ModalBaseStyle,\n ModalHeaderStyle,\n ModalTitleStyle,\n ModalTitleIconStyle,\n ModalTitleTextStyle,\n ModalCloseStyle,\n ModalContentStyle,\n ModalBackStyle,\n ModalSubtitleStyle,\n} from './ModalStyles.js'\nimport { ModalProps } from './types.js'\nimport { ModalOverlay } from './ModalOverlay.js'\n\nexport const Modal = forwardRef(\n (\n {\n children,\n title,\n titleIcon,\n subtitle,\n center = false,\n extra,\n open,\n onClose,\n onBack,\n ...rest\n }: ModalProps,\n ref?: ForwardedRef<HTMLDivElement>,\n ) => {\n const withTitleIcon = !!titleIcon\n const withSubtitle = !!subtitle\n const withCloseButton = !!onClose\n const withBackButton = !!onBack\n\n const modalHeader = (\n <ModalHeaderStyle $short={!title}>\n {withBackButton && <ModalBackStyle onClick={onBack} />}\n <ModalTitleStyle\n $center={center}\n $withTitleIcon={withTitleIcon}\n $withCloseButton={withCloseButton}\n $withBackButton={withBackButton}\n >\n {withTitleIcon && (\n <ModalTitleIconStyle $center={center}>\n {titleIcon}\n </ModalTitleIconStyle>\n )}\n <ModalTitleTextStyle>{title}</ModalTitleTextStyle>\n </ModalTitleStyle>\n {withCloseButton && <ModalCloseStyle onClick={onClose} />}\n </ModalHeaderStyle>\n )\n\n return (\n <ModalOverlay\n ref={ref}\n in={open}\n onClose={onClose}\n onBack={onBack}\n {...rest}\n >\n <ModalStyle $center={center}>\n <ModalBaseStyle>\n {modalHeader}\n {withSubtitle && (\n <ModalSubtitleStyle>{subtitle}</ModalSubtitleStyle>\n )}\n <ModalContentStyle>{children}</ModalContentStyle>\n </ModalBaseStyle>\n {extra}\n </ModalStyle>\n </ModalOverlay>\n )\n },\n)\nModal.displayName = 'Modal'\n"],"names":["Modal","forwardRef","ref","children","title","titleIcon","subtitle","center","extra","open","onClose","onBack","rest","withTitleIcon","withSubtitle","withCloseButton","withBackButton","modalHeader","_jsxs","ModalHeaderStyle","_jsx","ModalBackStyle","ModalTitleStyle","ModalTitleIconStyle","ModalTitleTextStyle","ModalCloseStyle","ModalOverlay","ModalStyle","ModalBaseStyle","ModalSubtitleStyle","ModalContentStyle","displayName"],"mappings":";;;;;;;;;MAgBaA,KAAK,gBAAGC,gBAAU,CAC7B,CAAA,IAAA,EAaEC,GAbF,KAcK;EAAA,IAbH;IACEC,QADF;IAEEC,KAFF;IAGEC,SAHF;IAIEC,QAJF;AAKEC,IAAAA,MAAM,GAAG,KALX;IAMEC,KANF;IAOEC,IAPF;IAQEC,OARF;IASEC,MATF;IAUE,GAAGC,IAAAA;GAGF,GAAA,IAAA,CAAA;AACH,EAAA,MAAMC,aAAa,GAAG,CAAC,CAACR,SAAxB,CAAA;AACA,EAAA,MAAMS,YAAY,GAAG,CAAC,CAACR,QAAvB,CAAA;AACA,EAAA,MAAMS,eAAe,GAAG,CAAC,CAACL,OAA1B,CAAA;AACA,EAAA,MAAMM,cAAc,GAAG,CAAC,CAACL,MAAzB,CAAA;;EAEA,MAAMM,WAAW,gBACfC,eAAA,CAACC,4BAAD,EAAA;IAAkB,MAAM,EAAE,CAACf,KAA3B;IAAA,QACGY,EAAAA,CAAAA,cAAc,iBAAII,cAAA,CAACC,0BAAD,EAAA;AAAgB,MAAA,OAAO,EAAEV,MAAAA;KAD9C,CAAA,eAEEO,gBAACI,2BAAD,EAAA;AACE,MAAA,OAAO,EAAEf,MADX;AAEE,MAAA,cAAc,EAAEM,aAFlB;AAGE,MAAA,gBAAgB,EAAEE,eAHpB;AAIE,MAAA,eAAe,EAAEC,cAJnB;MAAA,QAMGH,EAAAA,CAAAA,aAAa,iBACZO,cAAA,CAACG,+BAAD,EAAA;AAAqB,QAAA,OAAO,EAAEhB,MAA9B;QAAA,QACGF,EAAAA,SAAAA;OARP,CAAA,eAWEe,eAACI,+BAAD,EAAA;QAAA,QAAsBpB,EAAAA,KAAAA;OAXxB,CAAA,CAAA;AAAA,KAAA,CAFF,EAeGW,eAAe,iBAAIK,cAAA,CAACK,2BAAD,EAAA;AAAiB,MAAA,OAAO,EAAEf,OAAAA;KAfhD,CAAA,CAAA;GADF,CAAA,CAAA;;AAoBA,EAAA,oBACEU,eAACM,yBAAD,EAAA;AACE,IAAA,GAAG,EAAExB,GADP;AAEE,IAAA,EAAE,EAAEO,IAFN;AAGE,IAAA,OAAO,EAAEC,OAHX;AAIE,IAAA,MAAM,EAAEC,MAJV;AAAA,IAAA,GAKMC,IALN;AAAA,IAAA,QAAA,eAOEM,gBAACS,sBAAD,EAAA;AAAY,MAAA,OAAO,EAAEpB,MAArB;AAAA,MAAA,QAAA,EAAA,cACEW,gBAACU,0BAAD,EAAA;AAAA,QAAA,QAAA,EAAA,CACGX,WADH,EAEGH,YAAY,iBACXM,eAACS,8BAAD,EAAA;UAAA,QAAqBvB,EAAAA,QAAAA;SAHzB,CAAA,eAKEc,eAACU,6BAAD,EAAA;UAAA,QAAoB3B,EAAAA,QAAAA;SALtB,CAAA,CAAA;AAAA,OAAA,CADF,EAQGK,KARH,CAAA;AAAA,KAAA,CAAA;GARJ,CAAA,CAAA;AAoBD,CA7D4B,EAAxB;AA+DPR,KAAK,CAAC+B,WAAN,GAAoB,OAApB;;;;"}
1
+ {"version":3,"file":"Modal.js","sources":["../../../packages/modal/Modal.tsx"],"sourcesContent":["import { ForwardedRef, forwardRef } from 'react'\nimport {\n ModalStyle,\n ModalBaseStyle,\n ModalHeaderStyle,\n ModalTitleStyle,\n ModalTitleIconStyle,\n ModalTitleTextStyle,\n ModalCloseStyle,\n ModalContentStyle,\n ModalBackStyle,\n ModalSubtitleStyle,\n} from './ModalStyles.js'\nimport { ModalProps } from './types.js'\nimport { ModalOverlay } from './ModalOverlay.js'\n\nexport const Modal = forwardRef(\n (\n {\n children,\n title,\n titleIcon,\n subtitle,\n center = false,\n extra,\n open,\n onClose,\n onBack,\n windowSize = 'sm',\n windowProps,\n ...rest\n }: ModalProps,\n ref?: ForwardedRef<HTMLDivElement>,\n ) => {\n const withTitleIcon = !!titleIcon\n const withSubtitle = !!subtitle\n const withCloseButton = !!onClose\n const withBackButton = !!onBack\n\n const modalHeader = (\n <ModalHeaderStyle $short={!title}>\n {withBackButton && <ModalBackStyle onClick={onBack} />}\n <ModalTitleStyle\n $center={center}\n $withTitleIcon={withTitleIcon}\n $withCloseButton={withCloseButton}\n $withBackButton={withBackButton}\n >\n {withTitleIcon && (\n <ModalTitleIconStyle $center={center}>\n {titleIcon}\n </ModalTitleIconStyle>\n )}\n <ModalTitleTextStyle>{title}</ModalTitleTextStyle>\n </ModalTitleStyle>\n {withCloseButton && <ModalCloseStyle onClick={onClose} />}\n </ModalHeaderStyle>\n )\n\n return (\n <ModalOverlay\n ref={ref}\n in={open}\n onClose={onClose}\n onBack={onBack}\n {...rest}\n >\n <ModalStyle $center={center} $size={windowSize} {...windowProps}>\n <ModalBaseStyle>\n {modalHeader}\n {withSubtitle && (\n <ModalSubtitleStyle>{subtitle}</ModalSubtitleStyle>\n )}\n <ModalContentStyle>{children}</ModalContentStyle>\n </ModalBaseStyle>\n {extra}\n </ModalStyle>\n </ModalOverlay>\n )\n },\n)\nModal.displayName = 'Modal'\n"],"names":["Modal","forwardRef","ref","children","title","titleIcon","subtitle","center","extra","open","onClose","onBack","windowSize","windowProps","rest","withTitleIcon","withSubtitle","withCloseButton","withBackButton","modalHeader","_jsxs","ModalHeaderStyle","_jsx","ModalBackStyle","ModalTitleStyle","ModalTitleIconStyle","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,iBAAIK,cAAA,CAACK,2BAAD,EAAA;AAAiB,MAAA,OAAO,EAAEjB,OAAAA;KAfhD,CAAA,CAAA;GADF,CAAA,CAAA;;AAoBA,EAAA,oBACEY,eAACM,yBAAD,EAAA;AACE,IAAA,GAAG,EAAE1B,GADP;AAEE,IAAA,EAAE,EAAEO,IAFN;AAGE,IAAA,OAAO,EAAEC,OAHX;AAIE,IAAA,MAAM,EAAEC,MAJV;AAAA,IAAA,GAKMG,IALN;AAAA,IAAA,QAAA,eAOEM,gBAACS,sBAAD,EAAA;AAAY,MAAA,OAAO,EAAEtB,MAArB;AAA6B,MAAA,KAAK,EAAEK,UAApC;AAAA,MAAA,GAAoDC,WAApD;AAAA,MAAA,QAAA,EAAA,cACEO,gBAACU,0BAAD,EAAA;AAAA,QAAA,QAAA,EAAA,CACGX,WADH,EAEGH,YAAY,iBACXM,eAACS,8BAAD,EAAA;UAAA,QAAqBzB,EAAAA,QAAAA;SAHzB,CAAA,eAKEgB,eAACU,6BAAD,EAAA;UAAA,QAAoB7B,EAAAA,QAAAA;SALtB,CAAA,CAAA;AAAA,OAAA,CADF,EAQGK,KARH,CAAA;AAAA,KAAA,CAAA;GARJ,CAAA,CAAA;AAoBD,CA/D4B,EAAxB;AAiEPR,KAAK,CAACiC,WAAN,GAAoB,OAApB;;;;"}
@@ -9,6 +9,17 @@ const ButtonIcon = require('../button/ButtonIcon.js');
9
9
  const jsxRuntime = require('react/jsx-runtime');
10
10
  const _styled = require('styled-components');
11
11
 
12
+ const ModalWindowSizesMap = {
13
+ sm: _styled.css`
14
+ width: 432px;
15
+ `,
16
+ md: _styled.css`
17
+ width: 520px;
18
+ `,
19
+ lg: _styled.css`
20
+ width: 960px;
21
+ `
22
+ };
12
23
  const ModalStyle = styledComponentsWrapper.default.div`
13
24
  ${_ref => {
14
25
  let {
@@ -18,10 +29,10 @@ const ModalStyle = styledComponentsWrapper.default.div`
18
29
  colors,
19
30
  boxShadows
20
31
  },
21
- $center
32
+ $center,
33
+ $size
22
34
  } = _ref;
23
35
  return _styled.css`
24
- width: 432px;
25
36
  max-width: 100%;
26
37
  font-weight: 400;
27
38
  font-size: ${fontSizesMap.xs}px;
@@ -29,6 +40,8 @@ const ModalStyle = styledComponentsWrapper.default.div`
29
40
  text-align: ${$center ? 'center' : 'left'};
30
41
  border-radius: ${borderRadiusesMap.xl}px;
31
42
  box-shadow: ${boxShadows.xxl} ${colors.shadowDark};
43
+
44
+ ${ModalWindowSizesMap[$size]}
32
45
  `;
33
46
  }}
34
47
  `;
@@ -214,4 +227,5 @@ exports.ModalSubtitleStyle = ModalSubtitleStyle;
214
227
  exports.ModalTitleIconStyle = ModalTitleIconStyle;
215
228
  exports.ModalTitleStyle = ModalTitleStyle;
216
229
  exports.ModalTitleTextStyle = ModalTitleTextStyle;
230
+ exports.ModalWindowSizesMap = ModalWindowSizesMap;
217
231
  //# sourceMappingURL=ModalStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModalStyles.js","sources":["../../../packages/modal/ModalStyles.tsx"],"sourcesContent":["import styled, { css } from '../utils/styled-components-wrapper.js'\nimport { Close, ArrowBack } from '../icons/index.js'\nimport { ButtonIcon } from '../button/index.js'\n\nexport const ModalStyle = styled.div<{ $center: boolean }>`\n ${({\n theme: { fontSizesMap, borderRadiusesMap, colors, boxShadows },\n $center,\n }) => css`\n width: 432px;\n max-width: 100%;\n font-weight: 400;\n font-size: ${fontSizesMap.xs}px;\n line-height: 1.5em;\n text-align: ${$center ? 'center' : 'left'};\n border-radius: ${borderRadiusesMap.xl}px;\n box-shadow: ${boxShadows.xxl} ${colors.shadowDark};\n `}\n`\n\nexport const ModalBaseStyle = styled.div`\n ${({ theme: { colors } }) => css`\n color: ${colors.text};\n background: ${colors.foreground};\n border-radius: inherit;\n position: relative;\n z-index: 1;\n `}\n`\n\nexport const ModalHeaderStyle = styled.div<{\n $short: boolean\n}>`\n ${({ theme: { spaceMap, fontSizesMap, mediaQueries }, $short }) => css`\n display: flex;\n align-items: flex-start;\n min-height: 32px;\n margin-bottom: ${$short ? -spaceMap.md : 0}px;\n padding: ${spaceMap.xl}px ${spaceMap.xxl}px;\n font-size: ${fontSizesMap.md}px;\n line-height: 1.5em;\n\n ${mediaQueries.md} {\n padding: ${spaceMap.lg}px;\n }\n `}\n`\n\nexport const ModalTitleStyle = styled.div<{\n $center: boolean\n $withTitleIcon: boolean\n $withCloseButton: boolean\n $withBackButton: boolean\n}>`\n ${({\n theme: { fontSizesMap, spaceMap, mediaQueries },\n $center,\n $withBackButton,\n $withCloseButton,\n $withTitleIcon,\n }) => css`\n font-size: ${fontSizesMap.sm}px;\n line-height: 1.5em;\n font-weight: 700;\n margin-left: ${$center && !$withBackButton ? spaceMap.xxl : '0'}px;\n margin-right: ${$center && !$withCloseButton ? spaceMap.xxl : '0'}px;\n padding-top: ${$withTitleIcon ? spaceMap.sm : '0'}px;\n padding-left: 0;\n padding-right: ${spaceMap.sm}px;\n flex-grow: 1;\n align-self: center;\n\n ${mediaQueries.md} {\n padding-right: ${spaceMap.xs}px;\n }\n `}\n`\n\nexport const ModalTitleIconStyle = styled.div<{\n $center: boolean\n}>`\n ${({ theme: { spaceMap }, $center }) => css`\n display: ${$center ? 'flex' : 'block'};\n justify-content: ${$center ? 'center' : 'flex-start'};\n line-height: 0.7;\n margin-bottom: ${spaceMap.md}px;\n `}\n`\n\nexport const ModalTitleTextStyle = styled.div`\n margin: ${({ theme }) => theme.spaceMap.xs}px 0;\n`\n\nexport const ModalSubtitleStyle = styled.div`\n ${({ theme: { colors, fontSizesMap, spaceMap, mediaQueries } }) => css`\n color: ${colors.textSecondary};\n font-size: ${fontSizesMap.xs}px;\n font-weight: 400;\n line-height: 24px;\n margin-top: -${spaceMap.xl}px;\n padding: 0 ${spaceMap.xxl}px ${spaceMap.sm}px;\n\n ${mediaQueries.md} {\n padding-left: ${spaceMap.xl}px;\n padding-right: ${spaceMap.xl}px;\n }\n `}\n`\n\nexport const ModalContentStyle = styled.div`\n ${({ theme: { spaceMap, mediaQueries } }) => css`\n padding: 0 ${spaceMap.xxl}px ${spaceMap.xxl}px;\n\n ${mediaQueries.md} {\n padding: 0 ${spaceMap.lg}px ${spaceMap.lg}px;\n }\n `}\n`\n\nexport const ModalCloseStyle = styled(ButtonIcon).attrs({\n icon: <Close />,\n color: 'secondary',\n variant: 'ghost',\n size: 'xs',\n})`\n margin: 0 -10px 0 0;\n color: var(--lido-color-textSecondary);\n flex-shrink: 0;\n border-radius: 50%;\n`\n\nexport const ModalBackStyle = styled(ButtonIcon).attrs({\n icon: <ArrowBack />,\n color: 'secondary',\n variant: 'ghost',\n size: 'xs',\n})`\n ${({ theme: { colors, spaceMap } }) => css`\n color: ${colors.textSecondary};\n flex-shrink: 0;\n margin: 0 ${spaceMap.sm}px 0 -6px;\n border-radius: 50%;\n background: transparent !important;\n `}\n`\n"],"names":["ModalStyle","styled","div","theme","fontSizesMap","borderRadiusesMap","colors","boxShadows","$center","css","xs","xl","xxl","shadowDark","ModalBaseStyle","text","foreground","ModalHeaderStyle","spaceMap","mediaQueries","$short","md","lg","ModalTitleStyle","$withBackButton","$withCloseButton","$withTitleIcon","sm","ModalTitleIconStyle","ModalTitleTextStyle","ModalSubtitleStyle","textSecondary","ModalContentStyle","ModalCloseStyle","ButtonIcon","attrs","icon","_jsx","Close","color","variant","size","ModalBackStyle","ArrowBack"],"mappings":";;;;;;;;;;;AAIaA,MAAAA,UAAU,GAAGC,+BAAM,CAACC,GAA0B,CAAA;AAC3D,EAAI,EAAA,IAAA,IAAA;EAAA,IAAC;AACDC,IAAAA,KAAK,EAAE;MAAEC,YAAF;MAAgBC,iBAAhB;MAAmCC,MAAnC;AAA2CC,MAAAA,UAAAA;KADjD;AAEDC,IAAAA,OAAAA;GAFA,GAAA,IAAA,CAAA;AAAA,EAAA,OAGIC,WAAI,CAAA;AACZ;AACA;AACA;AACA,eAAiBL,EAAAA,YAAY,CAACM,EAAG,CAAA;AACjC;AACA,gBAAA,EAAkBF,OAAO,GAAG,QAAH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":"ModalStyles.js","sources":["../../../packages/modal/ModalStyles.tsx"],"sourcesContent":["import styled, { css } from '../utils/styled-components-wrapper.js'\nimport { Close, ArrowBack } from '../icons/index.js'\nimport { ButtonIcon } from '../button/index.js'\nimport { ModalWindowSizes } from './types.js'\n\nexport const ModalWindowSizesMap = {\n sm: css`\n width: 432px;\n `,\n md: css`\n width: 520px;\n `,\n lg: css`\n width: 960px;\n `,\n}\n\nexport const ModalStyle = styled.div<{\n $center: boolean\n $size: ModalWindowSizes\n}>`\n ${({\n theme: { fontSizesMap, borderRadiusesMap, colors, boxShadows },\n $center,\n $size,\n }) => css`\n max-width: 100%;\n font-weight: 400;\n font-size: ${fontSizesMap.xs}px;\n line-height: 1.5em;\n text-align: ${$center ? 'center' : 'left'};\n border-radius: ${borderRadiusesMap.xl}px;\n box-shadow: ${boxShadows.xxl} ${colors.shadowDark};\n\n ${ModalWindowSizesMap[$size]}\n `}\n`\n\nexport const ModalBaseStyle = styled.div`\n ${({ theme: { colors } }) => css`\n color: ${colors.text};\n background: ${colors.foreground};\n border-radius: inherit;\n position: relative;\n z-index: 1;\n `}\n`\n\nexport const ModalHeaderStyle = styled.div<{\n $short: boolean\n}>`\n ${({ theme: { spaceMap, fontSizesMap, mediaQueries }, $short }) => css`\n display: flex;\n align-items: flex-start;\n min-height: 32px;\n margin-bottom: ${$short ? -spaceMap.md : 0}px;\n padding: ${spaceMap.xl}px ${spaceMap.xxl}px;\n font-size: ${fontSizesMap.md}px;\n line-height: 1.5em;\n\n ${mediaQueries.md} {\n padding: ${spaceMap.lg}px;\n }\n `}\n`\n\nexport const ModalTitleStyle = styled.div<{\n $center: boolean\n $withTitleIcon: boolean\n $withCloseButton: boolean\n $withBackButton: boolean\n}>`\n ${({\n theme: { fontSizesMap, spaceMap, mediaQueries },\n $center,\n $withBackButton,\n $withCloseButton,\n $withTitleIcon,\n }) => css`\n font-size: ${fontSizesMap.sm}px;\n line-height: 1.5em;\n font-weight: 700;\n margin-left: ${$center && !$withBackButton ? spaceMap.xxl : '0'}px;\n margin-right: ${$center && !$withCloseButton ? spaceMap.xxl : '0'}px;\n padding-top: ${$withTitleIcon ? spaceMap.sm : '0'}px;\n padding-left: 0;\n padding-right: ${spaceMap.sm}px;\n flex-grow: 1;\n align-self: center;\n\n ${mediaQueries.md} {\n padding-right: ${spaceMap.xs}px;\n }\n `}\n`\n\nexport const ModalTitleIconStyle = styled.div<{\n $center: boolean\n}>`\n ${({ theme: { spaceMap }, $center }) => css`\n display: ${$center ? 'flex' : 'block'};\n justify-content: ${$center ? 'center' : 'flex-start'};\n line-height: 0.7;\n margin-bottom: ${spaceMap.md}px;\n `}\n`\n\nexport const ModalTitleTextStyle = styled.div`\n margin: ${({ theme }) => theme.spaceMap.xs}px 0;\n`\n\nexport const ModalSubtitleStyle = styled.div`\n ${({ theme: { colors, fontSizesMap, spaceMap, mediaQueries } }) => css`\n color: ${colors.textSecondary};\n font-size: ${fontSizesMap.xs}px;\n font-weight: 400;\n line-height: 24px;\n margin-top: -${spaceMap.xl}px;\n padding: 0 ${spaceMap.xxl}px ${spaceMap.sm}px;\n\n ${mediaQueries.md} {\n padding-left: ${spaceMap.xl}px;\n padding-right: ${spaceMap.xl}px;\n }\n `}\n`\n\nexport const ModalContentStyle = styled.div`\n ${({ theme: { spaceMap, mediaQueries } }) => css`\n padding: 0 ${spaceMap.xxl}px ${spaceMap.xxl}px;\n\n ${mediaQueries.md} {\n padding: 0 ${spaceMap.lg}px ${spaceMap.lg}px;\n }\n `}\n`\n\nexport const ModalCloseStyle = styled(ButtonIcon).attrs({\n icon: <Close />,\n color: 'secondary',\n variant: 'ghost',\n size: 'xs',\n})`\n margin: 0 -10px 0 0;\n color: var(--lido-color-textSecondary);\n flex-shrink: 0;\n border-radius: 50%;\n`\n\nexport const ModalBackStyle = styled(ButtonIcon).attrs({\n icon: <ArrowBack />,\n color: 'secondary',\n variant: 'ghost',\n size: 'xs',\n})`\n ${({ theme: { colors, spaceMap } }) => css`\n color: ${colors.textSecondary};\n flex-shrink: 0;\n margin: 0 ${spaceMap.sm}px 0 -6px;\n border-radius: 50%;\n background: transparent !important;\n `}\n`\n"],"names":["ModalWindowSizesMap","sm","css","md","lg","ModalStyle","styled","div","theme","fontSizesMap","borderRadiusesMap","colors","boxShadows","$center","$size","xs","xl","xxl","shadowDark","ModalBaseStyle","text","foreground","ModalHeaderStyle","spaceMap","mediaQueries","$short","ModalTitleStyle","$withBackButton","$withCloseButton","$withTitleIcon","ModalTitleIconStyle","ModalTitleTextStyle","ModalSubtitleStyle","textSecondary","ModalContentStyle","ModalCloseStyle","ButtonIcon","attrs","icon","_jsx","Close","color","variant","size","ModalBackStyle","ArrowBack"],"mappings":";;;;;;;;;;;AAKO,MAAMA,mBAAmB,GAAG;AACjCC,EAAAA,EAAE,EAAEC,WAAI,CAAA;AACV;AACA,EAHmC,CAAA;AAIjCC,EAAAA,EAAE,EAAED,WAAI,CAAA;AACV;AACA,EANmC,CAAA;AAOjCE,EAAAA,EAAE,EAAEF,WAAI,CAAA;AACV;AACA,EAAA,CAAA;AATmC,EAA5B;AAYMG,MAAAA,UAAU,GAAGC,+BAAM,CAACC,GAG9B,CAAA;AACH,EAAI,EAAA,IAAA,IAAA;EAAA,IAAC;AACDC,IAAAA,KAAK,EAAE;MAAEC,YAAF;MAAgBC,iBAAhB;MAAmCC,MAAnC;AAA2CC,MAAAA,UAAAA;KADjD;IAEDC,OAFC;AAGDC,IAAAA,KAAAA;GAHA,GAAA,IAAA,CAAA;AAAA,EAAA,OAIIZ,WAAI,CAAA;AACZ;AACA;AACA,eAAiBO,EAAAA,YAAY,CAACM,EAAG,CAAA;AACjC;AACA,gBAAA,EAAkBF,OAAO,GAAG,QAAH,GAAc,MAAO,CAAA;AAC9C,mBAAqBH,EAAAA,iBAAiB,CAACM,EAAG,CAAA;AAC1C,gBAAA,EAAkBJ,UAAU,CAACK,GAAI,CAAGN,CAAAA,EAAAA,MAAM,CAACO,UAAW,CAAA;AACtD;AACA,IAAMlB,E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