intergalactic 15.52.0-prerelease.0-prerelease-3f2a94a7 → 15.53.0-prerelease-dfe34e97

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 (203) hide show
  1. package/CHANGELOG.md +31 -4
  2. package/accordion/lib/cjs/Accordion.js +7 -6
  3. package/accordion/lib/cjs/Accordion.js.map +1 -1
  4. package/accordion/lib/cjs/style/accordion.shadow.css +2 -2
  5. package/accordion/lib/es6/Accordion.js +7 -6
  6. package/accordion/lib/es6/Accordion.js.map +1 -1
  7. package/accordion/lib/es6/style/accordion.shadow.css +2 -2
  8. package/components.json +12 -12
  9. package/d3-chart/Pattern.d.ts +336 -0
  10. package/d3-chart/Plot.d.ts +4 -0
  11. package/d3-chart/RadialTree.d.ts +7 -2
  12. package/d3-chart/component/Chart/AbstractChart.type.d.ts +3 -0
  13. package/d3-chart/component/ChartLegend/BaseLegend.type.d.ts +3 -0
  14. package/d3-chart/component/ChartLegend/LegendItem/LegendItem.type.d.ts +7 -1
  15. package/d3-chart/index.d.ts +3 -0
  16. package/d3-chart/lib/cjs/Area.js +25 -13
  17. package/d3-chart/lib/cjs/Area.js.map +1 -1
  18. package/d3-chart/lib/cjs/Bar.js +23 -12
  19. package/d3-chart/lib/cjs/Bar.js.map +1 -1
  20. package/d3-chart/lib/cjs/Bubble.js +25 -13
  21. package/d3-chart/lib/cjs/Bubble.js.map +1 -1
  22. package/d3-chart/lib/cjs/Donut.js +28 -12
  23. package/d3-chart/lib/cjs/Donut.js.map +1 -1
  24. package/d3-chart/lib/cjs/Dots.js +55 -28
  25. package/d3-chart/lib/cjs/Dots.js.map +1 -1
  26. package/d3-chart/lib/cjs/GroupBar.js +4 -2
  27. package/d3-chart/lib/cjs/GroupBar.js.map +1 -1
  28. package/d3-chart/lib/cjs/HorizontalBar.js +23 -12
  29. package/d3-chart/lib/cjs/HorizontalBar.js.map +1 -1
  30. package/d3-chart/lib/cjs/Hover.js +6 -3
  31. package/d3-chart/lib/cjs/Hover.js.map +1 -1
  32. package/d3-chart/lib/cjs/Line.js +14 -6
  33. package/d3-chart/lib/cjs/Line.js.map +1 -1
  34. package/d3-chart/lib/cjs/Pattern.js +540 -0
  35. package/d3-chart/lib/cjs/Pattern.js.map +1 -0
  36. package/d3-chart/lib/cjs/Plot.js +4 -2
  37. package/d3-chart/lib/cjs/Plot.js.map +1 -1
  38. package/d3-chart/lib/cjs/Radar.js +126 -83
  39. package/d3-chart/lib/cjs/Radar.js.map +1 -1
  40. package/d3-chart/lib/cjs/RadialTree.js +126 -100
  41. package/d3-chart/lib/cjs/RadialTree.js.map +1 -1
  42. package/d3-chart/lib/cjs/ScatterPlot.js +22 -10
  43. package/d3-chart/lib/cjs/ScatterPlot.js.map +1 -1
  44. package/d3-chart/lib/cjs/StackBar.js +8 -4
  45. package/d3-chart/lib/cjs/StackBar.js.map +1 -1
  46. package/d3-chart/lib/cjs/StackedArea.js +4 -1
  47. package/d3-chart/lib/cjs/StackedArea.js.map +1 -1
  48. package/d3-chart/lib/cjs/Tooltip.js +21 -11
  49. package/d3-chart/lib/cjs/Tooltip.js.map +1 -1
  50. package/d3-chart/lib/cjs/Venn.js +28 -12
  51. package/d3-chart/lib/cjs/Venn.js.map +1 -1
  52. package/d3-chart/lib/cjs/component/Chart/AbstractChart.js +7 -3
  53. package/d3-chart/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
  54. package/d3-chart/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
  55. package/d3-chart/lib/cjs/component/ChartLegend/BaseLegend.js +4 -2
  56. package/d3-chart/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
  57. package/d3-chart/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
  58. package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +80 -53
  59. package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  60. package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
  61. package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  62. package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/legend-item.shadow.css +17 -3
  63. package/d3-chart/lib/cjs/index.js +19 -0
  64. package/d3-chart/lib/cjs/index.js.map +1 -1
  65. package/d3-chart/lib/cjs/style/area.shadow.css +6 -1
  66. package/d3-chart/lib/cjs/style/bar.shadow.css +7 -1
  67. package/d3-chart/lib/cjs/style/bubble.shadow.css +8 -1
  68. package/d3-chart/lib/cjs/style/donut.shadow.css +7 -1
  69. package/d3-chart/lib/cjs/style/dot.shadow.css +2 -2
  70. package/d3-chart/lib/cjs/style/radar.shadow.css +7 -1
  71. package/d3-chart/lib/cjs/style/radial-tree.shadow.css +5 -0
  72. package/d3-chart/lib/cjs/style/scatterplot.shadow.css +8 -1
  73. package/d3-chart/lib/cjs/style/tooltip.shadow.css +6 -6
  74. package/d3-chart/lib/cjs/style/venn.shadow.css +11 -0
  75. package/d3-chart/lib/cjs/types/Plot.d.js.map +1 -1
  76. package/d3-chart/lib/cjs/types/index.d.js +12 -0
  77. package/d3-chart/lib/cjs/types/index.d.js.map +1 -1
  78. package/d3-chart/lib/es6/Area.js +25 -13
  79. package/d3-chart/lib/es6/Area.js.map +1 -1
  80. package/d3-chart/lib/es6/Bar.js +23 -12
  81. package/d3-chart/lib/es6/Bar.js.map +1 -1
  82. package/d3-chart/lib/es6/Bubble.js +25 -13
  83. package/d3-chart/lib/es6/Bubble.js.map +1 -1
  84. package/d3-chart/lib/es6/Donut.js +28 -12
  85. package/d3-chart/lib/es6/Donut.js.map +1 -1
  86. package/d3-chart/lib/es6/Dots.js +56 -29
  87. package/d3-chart/lib/es6/Dots.js.map +1 -1
  88. package/d3-chart/lib/es6/GroupBar.js +4 -2
  89. package/d3-chart/lib/es6/GroupBar.js.map +1 -1
  90. package/d3-chart/lib/es6/HorizontalBar.js +23 -12
  91. package/d3-chart/lib/es6/HorizontalBar.js.map +1 -1
  92. package/d3-chart/lib/es6/Hover.js +6 -3
  93. package/d3-chart/lib/es6/Hover.js.map +1 -1
  94. package/d3-chart/lib/es6/Line.js +15 -7
  95. package/d3-chart/lib/es6/Line.js.map +1 -1
  96. package/d3-chart/lib/es6/Pattern.js +534 -0
  97. package/d3-chart/lib/es6/Pattern.js.map +1 -0
  98. package/d3-chart/lib/es6/Plot.js +4 -2
  99. package/d3-chart/lib/es6/Plot.js.map +1 -1
  100. package/d3-chart/lib/es6/Radar.js +126 -83
  101. package/d3-chart/lib/es6/Radar.js.map +1 -1
  102. package/d3-chart/lib/es6/RadialTree.js +127 -101
  103. package/d3-chart/lib/es6/RadialTree.js.map +1 -1
  104. package/d3-chart/lib/es6/ScatterPlot.js +22 -10
  105. package/d3-chart/lib/es6/ScatterPlot.js.map +1 -1
  106. package/d3-chart/lib/es6/StackBar.js +8 -4
  107. package/d3-chart/lib/es6/StackBar.js.map +1 -1
  108. package/d3-chart/lib/es6/StackedArea.js +4 -1
  109. package/d3-chart/lib/es6/StackedArea.js.map +1 -1
  110. package/d3-chart/lib/es6/Tooltip.js +22 -11
  111. package/d3-chart/lib/es6/Tooltip.js.map +1 -1
  112. package/d3-chart/lib/es6/Venn.js +28 -12
  113. package/d3-chart/lib/es6/Venn.js.map +1 -1
  114. package/d3-chart/lib/es6/component/Chart/AbstractChart.js +7 -3
  115. package/d3-chart/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  116. package/d3-chart/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
  117. package/d3-chart/lib/es6/component/ChartLegend/BaseLegend.js +4 -2
  118. package/d3-chart/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
  119. package/d3-chart/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
  120. package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +80 -53
  121. package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  122. package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
  123. package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  124. package/d3-chart/lib/es6/component/ChartLegend/LegendItem/legend-item.shadow.css +17 -3
  125. package/d3-chart/lib/es6/index.js +1 -0
  126. package/d3-chart/lib/es6/index.js.map +1 -1
  127. package/d3-chart/lib/es6/style/area.shadow.css +6 -1
  128. package/d3-chart/lib/es6/style/bar.shadow.css +7 -1
  129. package/d3-chart/lib/es6/style/bubble.shadow.css +8 -1
  130. package/d3-chart/lib/es6/style/donut.shadow.css +7 -1
  131. package/d3-chart/lib/es6/style/dot.shadow.css +2 -2
  132. package/d3-chart/lib/es6/style/radar.shadow.css +7 -1
  133. package/d3-chart/lib/es6/style/radial-tree.shadow.css +5 -0
  134. package/d3-chart/lib/es6/style/scatterplot.shadow.css +8 -1
  135. package/d3-chart/lib/es6/style/tooltip.shadow.css +6 -6
  136. package/d3-chart/lib/es6/style/venn.shadow.css +11 -0
  137. package/d3-chart/lib/es6/types/Plot.d.js.map +1 -1
  138. package/d3-chart/lib/es6/types/index.d.js +3 -0
  139. package/d3-chart/lib/es6/types/index.d.js.map +1 -1
  140. package/d3-chart/lib/types/Pattern.d.ts +336 -0
  141. package/d3-chart/lib/types/Plot.d.ts +4 -0
  142. package/d3-chart/lib/types/RadialTree.d.ts +7 -2
  143. package/d3-chart/lib/types/component/Chart/AbstractChart.type.d.ts +3 -0
  144. package/d3-chart/lib/types/component/ChartLegend/BaseLegend.type.d.ts +3 -0
  145. package/d3-chart/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +7 -1
  146. package/d3-chart/lib/types/index.d.ts +3 -0
  147. package/date-picker/lib/cjs/components/RangePickerAbstract.js +8 -4
  148. package/date-picker/lib/cjs/components/RangePickerAbstract.js.map +1 -1
  149. package/date-picker/lib/es6/components/RangePickerAbstract.js +8 -4
  150. package/date-picker/lib/es6/components/RangePickerAbstract.js.map +1 -1
  151. package/drag-and-drop/index.d.ts +13 -2
  152. package/drag-and-drop/lib/cjs/DragAndDrop.js +96 -44
  153. package/drag-and-drop/lib/cjs/DragAndDrop.js.map +1 -1
  154. package/drag-and-drop/lib/cjs/index.d.js.map +1 -1
  155. package/drag-and-drop/lib/cjs/translations/de.json +5 -0
  156. package/drag-and-drop/lib/cjs/translations/en.json +5 -0
  157. package/drag-and-drop/lib/cjs/translations/es.json +5 -0
  158. package/drag-and-drop/lib/cjs/translations/fr.json +5 -0
  159. package/drag-and-drop/lib/cjs/translations/it.json +5 -0
  160. package/drag-and-drop/lib/cjs/translations/ja.json +5 -0
  161. package/drag-and-drop/lib/cjs/translations/ko.json +5 -0
  162. package/drag-and-drop/lib/cjs/translations/nl.json +5 -0
  163. package/drag-and-drop/lib/cjs/translations/pl.json +5 -0
  164. package/drag-and-drop/lib/cjs/translations/pt.json +5 -0
  165. package/drag-and-drop/lib/cjs/translations/sv.json +5 -0
  166. package/drag-and-drop/lib/cjs/translations/tr.json +5 -0
  167. package/drag-and-drop/lib/cjs/translations/vi.json +5 -0
  168. package/drag-and-drop/lib/cjs/translations/zh.json +5 -0
  169. package/drag-and-drop/lib/es6/DragAndDrop.js +96 -44
  170. package/drag-and-drop/lib/es6/DragAndDrop.js.map +1 -1
  171. package/drag-and-drop/lib/es6/index.d.js.map +1 -1
  172. package/drag-and-drop/lib/es6/translations/de.json +5 -0
  173. package/drag-and-drop/lib/es6/translations/en.json +5 -0
  174. package/drag-and-drop/lib/es6/translations/es.json +5 -0
  175. package/drag-and-drop/lib/es6/translations/fr.json +5 -0
  176. package/drag-and-drop/lib/es6/translations/it.json +5 -0
  177. package/drag-and-drop/lib/es6/translations/ja.json +5 -0
  178. package/drag-and-drop/lib/es6/translations/ko.json +5 -0
  179. package/drag-and-drop/lib/es6/translations/nl.json +5 -0
  180. package/drag-and-drop/lib/es6/translations/pl.json +5 -0
  181. package/drag-and-drop/lib/es6/translations/pt.json +5 -0
  182. package/drag-and-drop/lib/es6/translations/sv.json +5 -0
  183. package/drag-and-drop/lib/es6/translations/tr.json +5 -0
  184. package/drag-and-drop/lib/es6/translations/vi.json +5 -0
  185. package/drag-and-drop/lib/es6/translations/zh.json +5 -0
  186. package/drag-and-drop/lib/types/index.d.ts +13 -2
  187. package/package.json +1 -1
  188. package/pills/lib/cjs/Pills.js +44 -57
  189. package/pills/lib/cjs/Pills.js.map +1 -1
  190. package/pills/lib/cjs/style/pills.shadow.css +3 -9
  191. package/pills/lib/es6/Pills.js +44 -57
  192. package/pills/lib/es6/Pills.js.map +1 -1
  193. package/pills/lib/es6/style/pills.shadow.css +3 -9
  194. package/utils/lib/enhances/a11yEnhance.d.ts +9 -3
  195. package/utils/lib/enhances/a11yEnhance.js +11 -11
  196. package/utils/lib/enhances/a11yEnhance.js.map +1 -1
  197. package/utils/lib/enhances/a11yEnhance.mjs +11 -11
  198. package/utils/lib/enhances/a11yEnhance.mjs.map +1 -1
  199. package/utils/lib/themes/auto.css +3 -3
  200. package/utils/lib/themes/dark.css +2 -2
  201. package/utils/lib/themes/dark.json +1 -1
  202. package/utils/lib/themes/default.css +1 -1
  203. package/utils/lib/themes/light.css +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"BaseLegend.type.js","names":[],"sources":["../../../../src/component/ChartLegend/BaseLegend.type.ts"],"sourcesContent":["import { BoxProps, FlexProps } from '@semcore/flex-box';\nimport { LegendItem, LegendItemKey, ShapeType } from './LegendItem/LegendItem.type';\nimport { DataStructureHints } from '../../a11y/hints';\n\nexport type LSize = 'm' | 'l';\n\nexport type BaseChartLegendProps = FlexProps & {\n /**\n * Size for legend items\n */\n size?: LSize;\n /**\n * Shape of data item on Legend panel\n */\n shape?: ShapeType;\n /**\n * Handler for change visible for data items. Doesn't work if Shape one of 'Circle' | 'Line' | 'Square'\n */\n onChangeVisibleItem?: (key: LegendItemKey, isVisible: boolean) => void;\n\n onMouseEnterItem?: (key: LegendItemKey, e?: React.SyntheticEvent) => void;\n\n onMouseLeaveItem?: (key: LegendItemKey, e?: React.SyntheticEvent) => void;\n\n dataHints?: DataStructureHints;\n};\n\nexport type LegendProps = BoxProps &\n BaseChartLegendProps & {\n /**\n * Legend items\n */\n items: LegendItem[];\n };\n"],"mappings":""}
1
+ {"version":3,"file":"BaseLegend.type.js","names":[],"sources":["../../../../src/component/ChartLegend/BaseLegend.type.ts"],"sourcesContent":["import { BoxProps, FlexProps } from '@semcore/flex-box';\nimport { LegendItem, LegendItemKey, ShapeType } from './LegendItem/LegendItem.type';\nimport { DataStructureHints } from '../../a11y/hints';\nimport type { PatternsConfig } from '../../Pattern';\n\nexport type LSize = 'm' | 'l';\n\nexport type BaseChartLegendProps = FlexProps & {\n /**\n * Size for legend items\n */\n size?: LSize;\n /**\n * Shape of data item on Legend panel\n */\n shape?: ShapeType;\n /**\n * Handler for change visible for data items. Doesn't work if Shape one of 'Circle' | 'Line' | 'Square'\n */\n onChangeVisibleItem?: (key: LegendItemKey, isVisible: boolean) => void;\n\n onMouseEnterItem?: (key: LegendItemKey, e?: React.SyntheticEvent) => void;\n\n onMouseLeaveItem?: (key: LegendItemKey, e?: React.SyntheticEvent) => void;\n\n dataHints?: DataStructureHints;\n};\n\nexport type LegendProps = BoxProps &\n BaseChartLegendProps & {\n /**\n * Legend items\n */\n items: LegendItem[];\n\n /** Enables charts patterns that enhances charts accessability */\n patterns?: PatternsConfig;\n };\n"],"mappings":""}
@@ -19,24 +19,28 @@ import { Flex, Box } from 'intergalactic/flex-box';
19
19
  import Checkbox from 'intergalactic/checkbox';
20
20
  import { Text as TypographyText } from 'intergalactic/typography';
21
21
  /*__reshadow-styles__:"./legend-item.shadow.css"*/
22
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SLegendItem_2zs4w_gg_{min-width:0;align-items:flex-start}@media (hover:hover){.___SLegendItem_2zs4w_gg_:hover{cursor:pointer}.___SLegendItem_2zs4w_gg_.__disabled_2zs4w_gg_:hover{cursor:default}}.___SPointShape_2zs4w_gg_.__color_2zs4w_gg_{background-color:var(--color_2zs4w);margin-right:8px;flex-shrink:0}.___SPointShape_2zs4w_gg_._shape_Circle_2zs4w_gg_._size_l_2zs4w_gg_{width:16px;height:16px;border-radius:8px;margin-top:4px}.___SPointShape_2zs4w_gg_._shape_Circle_2zs4w_gg_._size_m_2zs4w_gg_{width:12px;height:12px;border-radius:6px;margin-top:4px}.___SPointShape_2zs4w_gg_._shape_Line_2zs4w_gg_._size_l_2zs4w_gg_{width:16px;height:4px;border-radius:3px;margin-top:9px}.___SPointShape_2zs4w_gg_._shape_Line_2zs4w_gg_._size_m_2zs4w_gg_{width:12px;height:4px;border-radius:3px;margin-top:8px}.___SPointShape_2zs4w_gg_._shape_Square_2zs4w_gg_._size_l_2zs4w_gg_{width:16px;height:16px;border-radius:2px;margin-top:4px}.___SPointShape_2zs4w_gg_._shape_Square_2zs4w_gg_._size_m_2zs4w_gg_{width:12px;height:12px;border-radius:2px;margin-top:4px}.___SIcon_2zs4w_gg_{line-height:0;margin-right:4px}.___SIcon_2zs4w_gg_._size_l_2zs4w_gg_{margin-top:4px}.___SIcon_2zs4w_gg_._size_m_2zs4w_gg_{margin-top:2px}.___SLabel_2zs4w_gg_{min-width:0}.___SAdditionalLabel_2zs4w_gg_._size_l_2zs4w_gg_,.___SCount_2zs4w_gg_._size_l_2zs4w_gg_,.___SLabel_2zs4w_gg_._size_l_2zs4w_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SAdditionalLabel_2zs4w_gg_._size_m_2zs4w_gg_,.___SCount_2zs4w_gg_._size_m_2zs4w_gg_,.___SLabel_2zs4w_gg_._size_m_2zs4w_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SAdditionalLabel_2zs4w_gg_,.___SCount_2zs4w_gg_{margin-left:4px}.___SAdditionalLabel_2zs4w_gg_{white-space:nowrap;display:flex;align-items:flex-start}.___SAdditionalLabel_2zs4w_gg_::before{content:\"\";display:inline-block;background-color:var(--intergalactic-text-secondary, #6c6e79);height:4px;width:4px;border-radius:2px;margin-right:4px}.___SAdditionalLabel_2zs4w_gg_._size_l_2zs4w_gg_::before{margin-top:10px}.___SAdditionalLabel_2zs4w_gg_._size_m_2zs4w_gg_::before{margin-top:8px}" /*__inner_css_end__*/, "2zs4w_gg_") /*__reshadow_css_end__*/, {
23
- "__SLegendItem": "___SLegendItem_2zs4w_gg_",
24
- "_disabled": "__disabled_2zs4w_gg_",
25
- "__SPointShape": "___SPointShape_2zs4w_gg_",
26
- "_color": "__color_2zs4w_gg_",
27
- "--color": "--color_2zs4w",
28
- "_shape_Circle": "_shape_Circle_2zs4w_gg_",
29
- "_size_l": "_size_l_2zs4w_gg_",
30
- "_size_m": "_size_m_2zs4w_gg_",
31
- "_shape_Line": "_shape_Line_2zs4w_gg_",
32
- "_shape_Square": "_shape_Square_2zs4w_gg_",
33
- "__SIcon": "___SIcon_2zs4w_gg_",
34
- "__SLabel": "___SLabel_2zs4w_gg_",
35
- "__SAdditionalLabel": "___SAdditionalLabel_2zs4w_gg_",
36
- "__SCount": "___SCount_2zs4w_gg_"
22
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SLegendItem_siahs_gg_{min-width:0;align-items:flex-start}@media (hover:hover){.___SLegendItem_siahs_gg_:hover{cursor:pointer}.___SLegendItem_siahs_gg_.__disabled_siahs_gg_:hover{cursor:default}}.___SPointShape_siahs_gg_.__color_siahs_gg_{background-color:var(--color_siahs);margin-right:8px;flex-shrink:0}.___SPointShape_siahs_gg_._shape_Circle_siahs_gg_._size_l_siahs_gg_{width:16px;height:16px;border-radius:8px;margin-top:4px}.___SPointShape_siahs_gg_._shape_Circle_siahs_gg_._size_m_siahs_gg_{width:12px;height:12px;border-radius:6px;margin-top:4px}.___SPointShape_siahs_gg_._shape_Line_siahs_gg_._size_l_siahs_gg_{width:16px;height:4px;border-radius:3px;margin-top:9px}.___SPointShape_siahs_gg_._shape_Line_siahs_gg_._size_m_siahs_gg_{width:12px;height:4px;border-radius:3px;margin-top:8px}.___SPointShape_siahs_gg_._shape_Square_siahs_gg_._size_l_siahs_gg_{width:16px;height:16px;border-radius:2px;margin-top:4px}.___SPointShape_siahs_gg_._shape_Square_siahs_gg_._size_m_siahs_gg_{width:12px;height:12px;border-radius:2px;margin-top:4px}.___SPointShape_siahs_gg_._shape_Pattern_siahs_gg_{background-color:transparent;margin-right:4px}.___SIcon_siahs_gg_{line-height:0;margin-right:4px}.___SIcon_siahs_gg_._size_l_siahs_gg_{margin-top:4px}.___SIcon_siahs_gg_._size_m_siahs_gg_{margin-top:2px}.___SLabel_siahs_gg_{min-width:0}.___SAdditionalLabel_siahs_gg_._size_l_siahs_gg_,.___SCount_siahs_gg_._size_l_siahs_gg_,.___SLabel_siahs_gg_._size_l_siahs_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SAdditionalLabel_siahs_gg_._size_m_siahs_gg_,.___SCount_siahs_gg_._size_m_siahs_gg_,.___SLabel_siahs_gg_._size_m_siahs_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SAdditionalLabel_siahs_gg_,.___SCount_siahs_gg_{margin-left:4px}.___SAdditionalLabel_siahs_gg_{white-space:nowrap;display:flex;align-items:flex-start}.___SAdditionalLabel_siahs_gg_::before{content:\"\";display:inline-block;background-color:var(--intergalactic-text-secondary, #6c6e79);height:4px;width:4px;border-radius:2px;margin-right:4px}.___SAdditionalLabel_siahs_gg_._size_l_siahs_gg_::before{margin-top:10px}.___SAdditionalLabel_siahs_gg_._size_m_siahs_gg_::before{margin-top:8px}.___SPatternSymbol_siahs_gg_{transform:scale(.8)}" /*__inner_css_end__*/, "siahs_gg_") /*__reshadow_css_end__*/, {
23
+ "__SLegendItem": "___SLegendItem_siahs_gg_",
24
+ "_disabled": "__disabled_siahs_gg_",
25
+ "__SPointShape": "___SPointShape_siahs_gg_",
26
+ "_color": "__color_siahs_gg_",
27
+ "--color": "--color_siahs",
28
+ "_shape_Circle": "_shape_Circle_siahs_gg_",
29
+ "_size_l": "_size_l_siahs_gg_",
30
+ "_size_m": "_size_m_siahs_gg_",
31
+ "_shape_Line": "_shape_Line_siahs_gg_",
32
+ "_shape_Square": "_shape_Square_siahs_gg_",
33
+ "_shape_Pattern": "_shape_Pattern_siahs_gg_",
34
+ "__SIcon": "___SIcon_siahs_gg_",
35
+ "__SLabel": "___SLabel_siahs_gg_",
36
+ "__SAdditionalLabel": "___SAdditionalLabel_siahs_gg_",
37
+ "__SCount": "___SCount_siahs_gg_",
38
+ "__SPatternSymbol": "___SPatternSymbol_siahs_gg_"
37
39
  });
38
40
  import { StaticShapes } from './LegendItem.type';
39
41
  import resolveColorEnhance from 'intergalactic/utils/lib/enhances/resolveColorEnhance';
42
+ import { PatternSymbol } from '../../../Pattern';
43
+ import { getChartDefaultColorName } from '../../../utils';
40
44
  var LegendItemRoot = /*#__PURE__*/function (_Component) {
41
45
  _inherits(LegendItemRoot, _Component);
42
46
  var _super = _createSuper(LegendItemRoot);
@@ -55,13 +59,16 @@ var LegendItemRoot = /*#__PURE__*/function (_Component) {
55
59
  id = _this$asProps.id,
56
60
  size = _this$asProps.size,
57
61
  onClick = _this$asProps.onClick,
58
- resolveColor = _this$asProps.resolveColor;
62
+ resolveColor = _this$asProps.resolveColor,
63
+ patterns = _this$asProps.patterns;
59
64
  return {
60
65
  id: id,
61
66
  label: label,
62
67
  shape: shape,
63
68
  checked: checked,
64
69
  color: resolveColor(color),
70
+ patternKey: color,
71
+ patterns: patterns,
65
72
  size: size,
66
73
  onKeyUp: function onKeyUp(e) {
67
74
  if (onClick && e.key === ' ') {
@@ -136,89 +143,109 @@ _defineProperty(LegendItemRoot, "defaultProps", function () {
136
143
  });
137
144
  function Shape(props) {
138
145
  var _ref2 = arguments[0],
139
- _ref8;
146
+ _ref10;
140
147
  var SPointShape = Box;
148
+ var SPatternSymbol = PatternSymbol;
141
149
  var styles = props.styles,
142
150
  size = props.size,
143
151
  shape = props.shape,
144
152
  checked = props.checked,
145
153
  color = props.color,
154
+ _props$patternKey = props.patternKey,
155
+ patternKey = _props$patternKey === void 0 ? getChartDefaultColorName(0) : _props$patternKey,
146
156
  Children = props.Children,
147
157
  hasChildren = props.children,
148
158
  onKeyUp = props.onKeyUp,
149
- label = props.label;
159
+ label = props.label,
160
+ patterns = props.patterns;
150
161
  if (hasChildren) {
151
162
  return /*#__PURE__*/React.createElement(Children, null);
152
163
  }
164
+ if (shape === 'Pattern') {
165
+ var _ref8;
166
+ return _ref8 = sstyled(styles), /*#__PURE__*/React.createElement(Box, _ref8.cn("Box", {
167
+ "mr": 1
168
+ }), /*#__PURE__*/React.createElement(SPatternSymbol, _ref8.cn("SPatternSymbol", {
169
+ "color": color,
170
+ "patternKey": patternKey
171
+ })));
172
+ }
153
173
  if (shape === 'Checkbox') {
154
- return /*#__PURE__*/React.createElement(Checkbox, {
155
- size: size,
156
- checked: checked,
157
- theme: checked ? color : undefined,
158
- onKeyUp: onKeyUp,
174
+ var _ref9;
175
+ return _ref9 = sstyled(styles), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Checkbox, _ref9.cn("Checkbox", {
176
+ "size": size,
177
+ "checked": checked,
178
+ "theme": checked ? color : undefined,
179
+ "onKeyUp": onKeyUp,
159
180
  "aria-label": label
160
- });
181
+ })), patterns && /*#__PURE__*/React.createElement(Box, _ref9.cn("Box", {
182
+ "mt": '2px',
183
+ "mr": 1
184
+ }), /*#__PURE__*/React.createElement(SPatternSymbol, _ref9.cn("SPatternSymbol", {
185
+ "color": color,
186
+ "patternKey": patternKey
187
+ }))));
161
188
  }
162
- return _ref8 = sstyled(styles), /*#__PURE__*/React.createElement(SPointShape, _ref8.cn("SPointShape", _objectSpread({}, _assignProps2({}, _ref2))), /*#__PURE__*/React.createElement(Children, _ref8.cn("Children", {})));
189
+ return _ref10 = sstyled(styles), /*#__PURE__*/React.createElement(SPointShape, _ref10.cn("SPointShape", _objectSpread({}, _assignProps2({}, _ref2))), /*#__PURE__*/React.createElement(Children, _ref10.cn("Children", {})));
163
190
  }
164
- function Icon(_ref13) {
191
+ function Icon(_ref15) {
165
192
  var _ref3 = arguments[0],
166
- _ref9;
167
- var styles = _ref13.styles,
168
- hasChildren = _ref13.children,
169
- Children = _ref13.Children;
193
+ _ref11;
194
+ var styles = _ref15.styles,
195
+ hasChildren = _ref15.children,
196
+ Children = _ref15.Children;
170
197
  var SIcon = Box;
171
198
  if (!hasChildren) {
172
199
  return null;
173
200
  }
174
- return _ref9 = sstyled(styles), /*#__PURE__*/React.createElement(SIcon, _ref9.cn("SIcon", _objectSpread({}, _assignProps3({
201
+ return _ref11 = sstyled(styles), /*#__PURE__*/React.createElement(SIcon, _ref11.cn("SIcon", _objectSpread({}, _assignProps3({
175
202
  "tag": 'span'
176
- }, _ref3))), /*#__PURE__*/React.createElement(Children, _ref9.cn("Children", {})));
203
+ }, _ref3))), /*#__PURE__*/React.createElement(Children, _ref11.cn("Children", {})));
177
204
  }
178
205
  Icon.displayName = 'Icon';
179
- function Label(_ref14) {
206
+ function Label(_ref16) {
180
207
  var _ref4 = arguments[0],
181
- _ref10;
182
- var styles = _ref14.styles,
183
- hasChildren = _ref14.children,
184
- Children = _ref14.Children;
208
+ _ref12;
209
+ var styles = _ref16.styles,
210
+ hasChildren = _ref16.children,
211
+ Children = _ref16.Children;
185
212
  var SLabel = TypographyText;
186
213
  if (!hasChildren) {
187
214
  return null;
188
215
  }
189
- return _ref10 = sstyled(styles), /*#__PURE__*/React.createElement(SLabel, _ref10.cn("SLabel", _objectSpread({}, _assignProps4({
216
+ return _ref12 = sstyled(styles), /*#__PURE__*/React.createElement(SLabel, _ref12.cn("SLabel", _objectSpread({}, _assignProps4({
190
217
  "use": 'primary'
191
- }, _ref4))), /*#__PURE__*/React.createElement(Children, _ref10.cn("Children", {})));
218
+ }, _ref4))), /*#__PURE__*/React.createElement(Children, _ref12.cn("Children", {})));
192
219
  }
193
220
  Label.displayName = 'Label';
194
- function AdditionalLabel(_ref15) {
221
+ function AdditionalLabel(_ref17) {
195
222
  var _ref5 = arguments[0],
196
- _ref11;
197
- var styles = _ref15.styles,
198
- hasChildren = _ref15.children,
199
- Children = _ref15.Children;
223
+ _ref13;
224
+ var styles = _ref17.styles,
225
+ hasChildren = _ref17.children,
226
+ Children = _ref17.Children;
200
227
  var SAdditionalLabel = TypographyText;
201
228
  if (!hasChildren) {
202
229
  return null;
203
230
  }
204
- return _ref11 = sstyled(styles), /*#__PURE__*/React.createElement(SAdditionalLabel, _ref11.cn("SAdditionalLabel", _objectSpread({}, _assignProps5({
231
+ return _ref13 = sstyled(styles), /*#__PURE__*/React.createElement(SAdditionalLabel, _ref13.cn("SAdditionalLabel", _objectSpread({}, _assignProps5({
205
232
  "use": 'secondary'
206
- }, _ref5))), /*#__PURE__*/React.createElement(Children, _ref11.cn("Children", {})));
233
+ }, _ref5))), /*#__PURE__*/React.createElement(Children, _ref13.cn("Children", {})));
207
234
  }
208
235
  AdditionalLabel.displayName = 'AdditionalLabel';
209
- function Count(_ref16) {
236
+ function Count(_ref18) {
210
237
  var _ref6 = arguments[0],
211
- _ref12;
212
- var styles = _ref16.styles,
213
- hasChildren = _ref16.children,
214
- Children = _ref16.Children;
238
+ _ref14;
239
+ var styles = _ref18.styles,
240
+ hasChildren = _ref18.children,
241
+ Children = _ref18.Children;
215
242
  var SCount = TypographyText;
216
243
  if (!hasChildren) {
217
244
  return null;
218
245
  }
219
- return _ref12 = sstyled(styles), /*#__PURE__*/React.createElement(SCount, _ref12.cn("SCount", _objectSpread({}, _assignProps6({
246
+ return _ref14 = sstyled(styles), /*#__PURE__*/React.createElement(SCount, _ref14.cn("SCount", _objectSpread({}, _assignProps6({
220
247
  "use": 'secondary'
221
- }, _ref6))), /*#__PURE__*/React.createElement(Children, _ref12.cn("Children", {})));
248
+ }, _ref6))), /*#__PURE__*/React.createElement(Children, _ref14.cn("Children", {})));
222
249
  }
223
250
  Count.displayName = 'Count';
224
251
  export var LegendItemComponent = createComponent(LegendItemRoot, {
@@ -1 +1 @@
1
- {"version":3,"file":"LegendItem.js","names":["React","createComponent","Component","sstyled","Root","Flex","Box","Checkbox","Text","TypographyText","style","_sstyled","insert","StaticShapes","resolveColorEnhance","LegendItemRoot","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","getShapeProps","_this$asProps","asProps","checked","color","shape","label","id","size","onClick","resolveColor","onKeyUp","e","getIconProps","props","_objectSpread","children","icon","getLabelProps","_this$asProps2","_objectWithoutProperties","_excluded","getAdditionalLabelProps","additionalInfo","concat","undefined","getCountProps","count","render","_ref","_ref7","SLegendItem","_this$asProps3","styles","Children","disabled","includes","createElement","cn","_assignProps","_defineProperty","Fragment","LegendItemComponent","Shape","Icon","Label","AdditionalLabel","Count","_ref2","arguments[0]","_ref8","SPointShape","hasChildren","theme","_assignProps2","_ref13","_ref3","_ref9","SIcon","_assignProps3","displayName","_ref14","_ref4","_ref10","SLabel","_assignProps4","_ref15","_ref5","_ref11","SAdditionalLabel","_assignProps5","_ref16","_ref6","_ref12","SCount","_assignProps6"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.tsx"],"sourcesContent":["import React, { DOMAttributes } from 'react';\nimport createComponent, { Component, sstyled, Root, IRootComponentProps } from '@semcore/core';\nimport { Flex, Box } from '@semcore/flex-box';\nimport Checkbox from '@semcore/checkbox';\nimport { Text as TypographyText } from '@semcore/typography';\n\nimport style from './legend-item.shadow.css';\nimport {\n ShapeProps,\n LegendItemProps,\n LegendItemType,\n LegendItem,\n StaticShapes,\n} from './LegendItem.type';\nimport resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';\n\nclass LegendItemRoot extends Component<\n LegendItemProps & { resolveColor: ReturnType<typeof resolveColorEnhance> }\n> {\n static displayName = 'LegendItem';\n static style = style;\n\n static enhance = [resolveColorEnhance()];\n\n static defaultProps = () => ({\n children: (\n <>\n <LegendItemComponent.Shape />\n <LegendItemComponent.Icon />\n <LegendItemComponent.Label />\n <LegendItemComponent.AdditionalLabel />\n <LegendItemComponent.Count />\n </>\n ),\n });\n\n getShapeProps(): ShapeProps & DOMAttributes<HTMLLabelElement> {\n const { checked, color, shape, label, id, size, onClick, resolveColor } = this.asProps;\n\n return {\n id,\n label,\n shape,\n checked,\n color: resolveColor(color),\n size,\n onKeyUp: (e: React.KeyboardEvent<HTMLLabelElement>) => {\n if (onClick && e.key === ' ') {\n onClick();\n }\n },\n };\n }\n\n getIconProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n return {\n ...props,\n children: props.icon,\n };\n }\n\n getLabelProps(): Omit<LegendItem, 'color'> & IRootComponentProps {\n const { color, ...props } = this.asProps;\n\n return {\n ...props,\n children: props.label,\n };\n }\n\n getAdditionalLabelProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children: additionalInfo && 'label' in additionalInfo ? `${additionalInfo.label}` : undefined,\n };\n }\n\n getCountProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children:\n additionalInfo && 'count' in additionalInfo ? `(${additionalInfo.count})` : undefined,\n };\n }\n\n render() {\n const SLegendItem = Root;\n const { styles, Children, shape } = this.asProps;\n\n // @ts-ignore\n const disabled = StaticShapes.includes(shape);\n\n return sstyled(styles)(\n <SLegendItem render={Flex} disabled={disabled}>\n <Children />\n </SLegendItem>,\n );\n }\n}\n\nfunction Shape(props: IRootComponentProps & ShapeProps & DOMAttributes<HTMLLabelElement>) {\n const SPointShape = Root;\n const {\n styles,\n size,\n shape,\n checked,\n color,\n Children,\n children: hasChildren,\n onKeyUp,\n label,\n } = props;\n\n if (hasChildren) {\n return <Children />;\n }\n\n if (shape === 'Checkbox') {\n return (\n <Checkbox\n size={size}\n checked={checked}\n theme={checked ? color : undefined}\n onKeyUp={onKeyUp}\n aria-label={label}\n />\n );\n }\n\n return sstyled(styles)(\n <SPointShape render={Box}>\n <Children />\n </SPointShape>,\n );\n}\n\nfunction Icon({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SIcon = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SIcon render={Box} tag={'span'}>\n <Children />\n </SIcon>,\n );\n}\nIcon.displayName = 'Icon';\n\nfunction Label({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SLabel render={TypographyText} use={'primary'}>\n <Children />\n </SLabel>,\n );\n}\nLabel.displayName = 'Label';\n\nfunction AdditionalLabel({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SAdditionalLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SAdditionalLabel render={TypographyText} use={'secondary'}>\n <Children />\n </SAdditionalLabel>,\n );\n}\nAdditionalLabel.displayName = 'AdditionalLabel';\n\nfunction Count({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SCount = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SCount render={TypographyText} use={'secondary'}>\n <Children />\n </SCount>,\n );\n}\nCount.displayName = 'Count';\n\nexport const LegendItemComponent: LegendItemType = createComponent(LegendItemRoot, {\n Shape,\n Icon,\n Label,\n AdditionalLabel,\n Count,\n});\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAyB,OAAO;AAC5C,OAAOC,eAAe,IAAIC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAA6B,eAAe;AAC9F,SAASC,IAAI,EAAEC,GAAG,QAAQ,mBAAmB;AAC7C,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,SAASC,IAAI,IAAIC,cAAc,QAAQ,qBAAqB;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAA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":["React","createComponent","Component","sstyled","Root","Flex","Box","Checkbox","Text","TypographyText","style","_sstyled","insert","StaticShapes","resolveColorEnhance","PatternSymbol","getChartDefaultColorName","LegendItemRoot","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","getShapeProps","_this$asProps","asProps","checked","color","shape","label","id","size","onClick","resolveColor","patterns","patternKey","onKeyUp","e","getIconProps","props","_objectSpread","children","icon","getLabelProps","_this$asProps2","_objectWithoutProperties","_excluded","getAdditionalLabelProps","additionalInfo","concat","undefined","getCountProps","count","render","_ref","_ref7","SLegendItem","_this$asProps3","styles","Children","disabled","includes","createElement","cn","_assignProps","_defineProperty","Fragment","LegendItemComponent","Shape","Icon","Label","AdditionalLabel","Count","_ref2","arguments[0]","_ref10","SPointShape","SPatternSymbol","_props$patternKey","hasChildren","_ref8","_ref9","_assignProps2","_ref15","_ref3","_ref11","SIcon","_assignProps3","displayName","_ref16","_ref4","_ref12","SLabel","_assignProps4","_ref17","_ref5","_ref13","SAdditionalLabel","_assignProps5","_ref18","_ref6","_ref14","SCount","_assignProps6"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.tsx"],"sourcesContent":["import React, { DOMAttributes } from 'react';\nimport createComponent, { Component, sstyled, Root, IRootComponentProps } from '@semcore/core';\nimport { Flex, Box } from '@semcore/flex-box';\nimport Checkbox from '@semcore/checkbox';\nimport { Text as TypographyText } from '@semcore/typography';\n\nimport style from './legend-item.shadow.css';\nimport {\n ShapeProps,\n LegendItemProps,\n LegendItemType,\n LegendItem,\n StaticShapes,\n} from './LegendItem.type';\nimport resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';\nimport { PatternSymbol } from '../../../Pattern';\nimport { getChartDefaultColorName } from '../../../utils';\n\nclass LegendItemRoot extends Component<\n LegendItemProps & { resolveColor: ReturnType<typeof resolveColorEnhance> }\n> {\n static displayName = 'LegendItem';\n static style = style;\n\n static enhance = [resolveColorEnhance()];\n\n static defaultProps = () => ({\n children: (\n <>\n <LegendItemComponent.Shape />\n <LegendItemComponent.Icon />\n <LegendItemComponent.Label />\n <LegendItemComponent.AdditionalLabel />\n <LegendItemComponent.Count />\n </>\n ),\n });\n\n getShapeProps(): ShapeProps & DOMAttributes<HTMLLabelElement> {\n const { checked, color, shape, label, id, size, onClick, resolveColor, patterns } =\n this.asProps;\n\n return {\n id,\n label,\n shape,\n checked,\n color: resolveColor(color),\n patternKey: color,\n patterns,\n size,\n onKeyUp: (e: React.KeyboardEvent<HTMLLabelElement>) => {\n if (onClick && e.key === ' ') {\n onClick();\n }\n },\n };\n }\n\n getIconProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n return {\n ...props,\n children: props.icon,\n };\n }\n\n getLabelProps(): Omit<LegendItem, 'color'> & IRootComponentProps {\n const { color, ...props } = this.asProps;\n\n return {\n ...props,\n children: props.label,\n };\n }\n\n getAdditionalLabelProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children: additionalInfo && 'label' in additionalInfo ? `${additionalInfo.label}` : undefined,\n };\n }\n\n getCountProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children:\n additionalInfo && 'count' in additionalInfo ? `(${additionalInfo.count})` : undefined,\n };\n }\n\n render() {\n const SLegendItem = Root;\n const { styles, Children, shape } = this.asProps;\n\n // @ts-ignore\n const disabled = StaticShapes.includes(shape);\n\n return sstyled(styles)(\n <SLegendItem render={Flex} disabled={disabled}>\n <Children />\n </SLegendItem>,\n );\n }\n}\n\nfunction Shape(props: IRootComponentProps & ShapeProps & DOMAttributes<HTMLLabelElement>) {\n const SPointShape = Root;\n const SPatternSymbol = PatternSymbol;\n const {\n styles,\n size,\n shape,\n checked,\n color,\n patternKey = getChartDefaultColorName(0),\n Children,\n children: hasChildren,\n onKeyUp,\n label,\n patterns,\n } = props;\n\n if (hasChildren) {\n return <Children />;\n }\n\n if (shape === 'Pattern') {\n return sstyled(styles)(\n <Box mr={1}>\n <SPatternSymbol color={color} patternKey={patternKey} />\n </Box>,\n );\n }\n\n if (shape === 'Checkbox') {\n return sstyled(styles)(\n <>\n <Checkbox\n size={size}\n checked={checked}\n theme={checked ? color : undefined}\n onKeyUp={onKeyUp}\n aria-label={label}\n />\n {patterns && (\n <Box mt={'2px'} mr={1}>\n <SPatternSymbol color={color} patternKey={patternKey} />\n </Box>\n )}\n </>,\n );\n }\n\n return sstyled(styles)(\n <SPointShape render={Box}>\n <Children />\n </SPointShape>,\n );\n}\n\nfunction Icon({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SIcon = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SIcon render={Box} tag={'span'}>\n <Children />\n </SIcon>,\n );\n}\nIcon.displayName = 'Icon';\n\nfunction Label({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SLabel render={TypographyText} use={'primary'}>\n <Children />\n </SLabel>,\n );\n}\nLabel.displayName = 'Label';\n\nfunction AdditionalLabel({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SAdditionalLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SAdditionalLabel render={TypographyText} use={'secondary'}>\n <Children />\n </SAdditionalLabel>,\n );\n}\nAdditionalLabel.displayName = 'AdditionalLabel';\n\nfunction Count({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SCount = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SCount render={TypographyText} use={'secondary'}>\n <Children />\n </SCount>,\n );\n}\nCount.displayName = 'Count';\n\nexport const LegendItemComponent: LegendItemType = createComponent(LegendItemRoot, {\n Shape,\n Icon,\n Label,\n AdditionalLabel,\n Count,\n});\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAyB,OAAO;AAC5C,OAAOC,eA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,KAAK;EACLC,IAAI,EAAJA,IAAI;EACJC,KAAK,EAALA,KAAK;EACLC,eAAe,EAAfA,eAAe;EACfC,KAAK,EAALA;AACF,CAAC,CAAC"}
@@ -2,5 +2,5 @@
2
2
  * Key of chart data item
3
3
  */
4
4
 
5
- export var StaticShapes = ['Circle', 'Line', 'Square'];
5
+ export var StaticShapes = ['Circle', 'Line', 'Square', 'Pattern'];
6
6
  //# sourceMappingURL=LegendItem.type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LegendItem.type.js","names":["StaticShapes"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.type.ts"],"sourcesContent":["import { Flex } from '@semcore/flex-box';\nimport { Intergalactic, Root } from '@semcore/core';\nimport Icon from '@semcore/icon';\nimport { Text } from '@semcore/typography';\nimport { LSize } from '../BaseLegend.type';\n\n/**\n * Key of chart data item\n */\nexport type LegendItemKey = string;\n\nexport type LegendItem = {\n /**\n * One of keys from data set\n */\n id: LegendItemKey;\n /**\n * Label for data item in Legend\n */\n label: string;\n /**\n * Flag for selected data item\n */\n checked: boolean;\n /**\n * Color of data item\n */\n color: string;\n /**\n * Icon before label\n */\n icon?: typeof Icon;\n /**\n * Additional info with sub-label or count\n */\n additionalInfo?: { label: string } | { count: number };\n};\n\nexport type LegendItemProps = LegendItem & {\n /**\n * Size for legend item\n */\n size: LSize;\n /**\n * Shape of data item on Legend panel\n */\n shape: ShapeType;\n /**\n * Handler for select/deselect legend item.\n * !Need to redefine onClick, because we don't have `event` in it.\n */\n onClick: () => void;\n};\n\nexport type ShapeProps = LegendItem & {\n size: LSize;\n shape: ShapeType;\n};\n\nexport const StaticShapes = ['Circle', 'Line', 'Square'] as const;\n\nexport type ShapeType = 'Checkbox' | typeof StaticShapes[number];\n\nexport type LegendItemType = Intergalactic.Component<typeof Flex, Partial<LegendItemProps>> & {\n Shape: Intergalactic.Component<typeof Root, Partial<ShapeProps>>;\n Icon: Intergalactic.Component<typeof Icon, Partial<LegendItem>>;\n Label: Intergalactic.Component<typeof Text, Partial<Omit<LegendItem, 'theme'>>>;\n AdditionalLabel: Intergalactic.Component<typeof Text, Partial<LegendItem>>;\n Count: Intergalactic.Component<typeof Text, Partial<LegendItem>>;\n};\n"],"mappings":"AAMA;AACA;AACA;;AAmDA,OAAO,IAAMA,YAAY,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAU"}
1
+ {"version":3,"file":"LegendItem.type.js","names":["StaticShapes"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.type.ts"],"sourcesContent":["import { Flex } from '@semcore/flex-box';\nimport { Intergalactic, Root } from '@semcore/core';\nimport Icon from '@semcore/icon';\nimport { Text } from '@semcore/typography';\nimport { LSize } from '../BaseLegend.type';\nimport { PatternsConfig } from '../../../Pattern';\n\n/**\n * Key of chart data item\n */\nexport type LegendItemKey = string;\n\nexport type LegendItem = {\n /**\n * One of keys from data set\n */\n id: LegendItemKey;\n /**\n * Label for data item in Legend\n */\n label: string;\n /**\n * Flag for selected data item\n */\n checked: boolean;\n /**\n * Color of data item\n */\n color: string;\n /**\n * Icon before label\n */\n icon?: typeof Icon;\n /**\n * Additional info with sub-label or count\n */\n additionalInfo?: { label: string } | { count: number };\n\n patternKey?: string;\n\n /** Enables patterns symbols that enhances charts accessability */\n patterns?: PatternsConfig;\n};\n\nexport type LegendItemProps = LegendItem & {\n /**\n * Size for legend item\n */\n size: LSize;\n /**\n * Shape of data item on Legend panel\n */\n shape: ShapeType;\n /**\n * Handler for select/deselect legend item.\n * !Need to redefine onClick, because we don't have `event` in it.\n */\n onClick: () => void;\n\n /** Enables patterns symbols that enhances charts accessability */\n patterns?: PatternsConfig;\n};\n\nexport type ShapeProps = LegendItem & {\n size: LSize;\n shape: ShapeType;\n};\n\nexport const StaticShapes = ['Circle', 'Line', 'Square', 'Pattern'] as const;\n\nexport type ShapeType = 'Checkbox' | typeof StaticShapes[number];\n\nexport type LegendItemType = Intergalactic.Component<typeof Flex, Partial<LegendItemProps>> & {\n Shape: Intergalactic.Component<typeof Root, Partial<ShapeProps>>;\n Icon: Intergalactic.Component<typeof Icon, Partial<LegendItem>>;\n Label: Intergalactic.Component<typeof Text, Partial<Omit<LegendItem, 'theme'>>>;\n AdditionalLabel: Intergalactic.Component<typeof Text, Partial<LegendItem>>;\n Count: Intergalactic.Component<typeof Text, Partial<LegendItem>>;\n};\n"],"mappings":"AAOA;AACA;AACA;;AA2DA,OAAO,IAAMA,YAAY,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAU"}
@@ -59,6 +59,11 @@ SPointShape[shape='Square'][size='m'] {
59
59
  margin-top: 4px;
60
60
  }
61
61
 
62
+ SPointShape[shape='Pattern'] {
63
+ background-color: transparent;
64
+ margin-right: 4px;
65
+ }
66
+
62
67
  SIcon {
63
68
  line-height: 0;
64
69
  margin-right: 4px;
@@ -76,17 +81,22 @@ SLabel {
76
81
  min-width: 0;
77
82
  }
78
83
 
79
- SLabel[size='l'], SAdditionalLabel[size='l'], SCount[size='l'] {
84
+ SLabel[size='l'],
85
+ SAdditionalLabel[size='l'],
86
+ SCount[size='l'] {
80
87
  font-size: var(--intergalactic-fs-300, 16px);
81
88
  line-height: var(--intergalactic-lh-300, 150%);
82
89
  }
83
90
 
84
- SLabel[size='m'], SAdditionalLabel[size='m'], SCount[size='m'] {
91
+ SLabel[size='m'],
92
+ SAdditionalLabel[size='m'],
93
+ SCount[size='m'] {
85
94
  font-size: var(--intergalactic-fs-200, 14px);
86
95
  line-height: var(--intergalactic-lh-200, 142%);
87
96
  }
88
97
 
89
- SAdditionalLabel, SCount {
98
+ SAdditionalLabel,
99
+ SCount {
90
100
  margin-left: 4px;
91
101
  }
92
102
 
@@ -113,3 +123,7 @@ SAdditionalLabel[size='l']::before {
113
123
  SAdditionalLabel[size='m']::before {
114
124
  margin-top: 8px;
115
125
  }
126
+
127
+ SPatternSymbol {
128
+ transform: scale(0.8);
129
+ }
@@ -22,4 +22,5 @@ export { HoverLine, HoverRect } from './Hover';
22
22
  export { minMax, interpolateValue } from './utils';
23
23
  export { colors } from './color';
24
24
  export { makeDataHintsContainer } from './a11y/hints';
25
+ export { PatternFill, PatternSymbol, getPatternSymbolSize } from './Pattern';
25
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","Plot","ChartLegend","ChartLegendTable","Chart","XAxis","YAxis","Line","Bar","HorizontalBar","GroupBar","StackBar","Area","StackedArea","ScatterPlot","Bubble","RadialTree","Donut","Venn","Radar","getLabelOffsetPosition","Tooltip","ResponsiveContainer","ReferenceLine","HoverLine","HoverRect","minMax","interpolateValue","colors","makeDataHintsContainer"],"sources":["../../src/index.js"],"sourcesContent":["export { default as Plot } from './Plot';\nexport { ChartLegend, ChartLegendTable } from './component/ChartLegend';\nexport { default as Chart } from './component/Chart';\nexport { XAxis, YAxis } from './Axis';\n\nexport { default as Line } from './Line';\n\nexport { default as Bar } from './Bar';\nexport { default as HorizontalBar } from './HorizontalBar';\nexport { default as GroupBar } from './GroupBar';\nexport { default as StackBar } from './StackBar';\nexport { default as Area } from './Area';\nexport { default as StackedArea } from './StackedArea';\nexport { default as ScatterPlot } from './ScatterPlot';\nexport { default as Bubble } from './Bubble';\nexport { default as RadialTree } from './RadialTree';\nexport { default as Donut } from './Donut';\nexport { default as Venn } from './Venn';\nexport { default as Radar, getLabelOffsetPosition } from './Radar';\n\nexport { default as Tooltip } from './Tooltip';\n\nexport { default as ResponsiveContainer } from './ResponsiveContainer';\nexport { default as ReferenceLine } from './ReferenceLine';\n\nexport { HoverLine, HoverRect } from './Hover';\n\nexport { minMax, interpolateValue } from './utils';\nexport { colors } from './color';\n\nexport { makeDataHintsContainer } from './a11y/hints';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,IAAI,QAAQ,QAAQ;AACxC,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,yBAAyB;AACvE,SAASH,OAAO,IAAII,KAAK,QAAQ,mBAAmB;AACpD,SAASC,KAAK,EAAEC,KAAK,QAAQ,QAAQ;AAErC,SAASN,OAAO,IAAIO,IAAI,QAAQ,QAAQ;AAExC,SAASP,OAAO,IAAIQ,GAAG,QAAQ,OAAO;AACtC,SAASR,OAAO,IAAIS,aAAa,QAAQ,iBAAiB;AAC1D,SAAST,OAAO,IAAIU,QAAQ,QAAQ,YAAY;AAChD,SAASV,OAAO,IAAIW,QAAQ,QAAQ,YAAY;AAChD,SAASX,OAAO,IAAIY,IAAI,QAAQ,QAAQ;AACxC,SAASZ,OAAO,IAAIa,WAAW,QAAQ,eAAe;AACtD,SAASb,OAAO,IAAIc,WAAW,QAAQ,eAAe;AACtD,SAASd,OAAO,IAAIe,MAAM,QAAQ,UAAU;AAC5C,SAASf,OAAO,IAAIgB,UAAU,QAAQ,cAAc;AACpD,SAAShB,OAAO,IAAIiB,KAAK,QAAQ,SAAS;AAC1C,SAASjB,OAAO,IAAIkB,IAAI,QAAQ,QAAQ;AACxC,SAASlB,OAAO,IAAImB,KAAK,EAAEC,sBAAsB,QAAQ,SAAS;AAElE,SAASpB,OAAO,IAAIqB,OAAO,QAAQ,WAAW;AAE9C,SAASrB,OAAO,IAAIsB,mBAAmB,QAAQ,uBAAuB;AACtE,SAAStB,OAAO,IAAIuB,aAAa,QAAQ,iBAAiB;AAE1D,SAASC,SAAS,EAAEC,SAAS,QAAQ,SAAS;AAE9C,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,SAAS;AAClD,SAASC,MAAM,QAAQ,SAAS;AAEhC,SAASC,sBAAsB,QAAQ,cAAc"}
1
+ {"version":3,"file":"index.js","names":["default","Plot","ChartLegend","ChartLegendTable","Chart","XAxis","YAxis","Line","Bar","HorizontalBar","GroupBar","StackBar","Area","StackedArea","ScatterPlot","Bubble","RadialTree","Donut","Venn","Radar","getLabelOffsetPosition","Tooltip","ResponsiveContainer","ReferenceLine","HoverLine","HoverRect","minMax","interpolateValue","colors","makeDataHintsContainer","PatternFill","PatternSymbol","getPatternSymbolSize"],"sources":["../../src/index.js"],"sourcesContent":["export { default as Plot } from './Plot';\nexport { ChartLegend, ChartLegendTable } from './component/ChartLegend';\nexport { default as Chart } from './component/Chart';\nexport { XAxis, YAxis } from './Axis';\n\nexport { default as Line } from './Line';\n\nexport { default as Bar } from './Bar';\nexport { default as HorizontalBar } from './HorizontalBar';\nexport { default as GroupBar } from './GroupBar';\nexport { default as StackBar } from './StackBar';\nexport { default as Area } from './Area';\nexport { default as StackedArea } from './StackedArea';\nexport { default as ScatterPlot } from './ScatterPlot';\nexport { default as Bubble } from './Bubble';\nexport { default as RadialTree } from './RadialTree';\nexport { default as Donut } from './Donut';\nexport { default as Venn } from './Venn';\nexport { default as Radar, getLabelOffsetPosition } from './Radar';\n\nexport { default as Tooltip } from './Tooltip';\n\nexport { default as ResponsiveContainer } from './ResponsiveContainer';\nexport { default as ReferenceLine } from './ReferenceLine';\n\nexport { HoverLine, HoverRect } from './Hover';\n\nexport { minMax, interpolateValue } from './utils';\nexport { colors } from './color';\n\nexport { makeDataHintsContainer } from './a11y/hints';\n\nexport { PatternFill, PatternSymbol, getPatternSymbolSize } from './Pattern';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,IAAI,QAAQ,QAAQ;AACxC,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,yBAAyB;AACvE,SAASH,OAAO,IAAII,KAAK,QAAQ,mBAAmB;AACpD,SAASC,KAAK,EAAEC,KAAK,QAAQ,QAAQ;AAErC,SAASN,OAAO,IAAIO,IAAI,QAAQ,QAAQ;AAExC,SAASP,OAAO,IAAIQ,GAAG,QAAQ,OAAO;AACtC,SAASR,OAAO,IAAIS,aAAa,QAAQ,iBAAiB;AAC1D,SAAST,OAAO,IAAIU,QAAQ,QAAQ,YAAY;AAChD,SAASV,OAAO,IAAIW,QAAQ,QAAQ,YAAY;AAChD,SAASX,OAAO,IAAIY,IAAI,QAAQ,QAAQ;AACxC,SAASZ,OAAO,IAAIa,WAAW,QAAQ,eAAe;AACtD,SAASb,OAAO,IAAIc,WAAW,QAAQ,eAAe;AACtD,SAASd,OAAO,IAAIe,MAAM,QAAQ,UAAU;AAC5C,SAASf,OAAO,IAAIgB,UAAU,QAAQ,cAAc;AACpD,SAAShB,OAAO,IAAIiB,KAAK,QAAQ,SAAS;AAC1C,SAASjB,OAAO,IAAIkB,IAAI,QAAQ,QAAQ;AACxC,SAASlB,OAAO,IAAImB,KAAK,EAAEC,sBAAsB,QAAQ,SAAS;AAElE,SAASpB,OAAO,IAAIqB,OAAO,QAAQ,WAAW;AAE9C,SAASrB,OAAO,IAAIsB,mBAAmB,QAAQ,uBAAuB;AACtE,SAAStB,OAAO,IAAIuB,aAAa,QAAQ,iBAAiB;AAE1D,SAASC,SAAS,EAAEC,SAAS,QAAQ,SAAS;AAE9C,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,SAAS;AAClD,SAASC,MAAM,QAAQ,SAAS;AAEhC,SAASC,sBAAsB,QAAQ,cAAc;AAErD,SAASC,WAAW,EAAEC,aAAa,EAAEC,oBAAoB,QAAQ,WAAW"}
@@ -9,6 +9,11 @@ SArea[color] {
9
9
  fill: var(--color);
10
10
  }
11
11
 
12
+ SArea[pattern] {
13
+ fill: var(--pattern);
14
+ fill-opacity: 0.7;
15
+ }
16
+
12
17
  SArea[transparent] {
13
18
  opacity: 0.3;
14
19
  }
@@ -42,4 +47,4 @@ SNull {
42
47
 
43
48
  SNull[hide] {
44
49
  display: none;
45
- }
50
+ }
@@ -11,6 +11,12 @@ SBar[color] {
11
11
  fill: var(--color);
12
12
  }
13
13
 
14
+ SBar[pattern][color] {
15
+ fill: var(--pattern);
16
+ stroke: var(--color);
17
+ stroke-width: 1px;
18
+ }
19
+
14
20
  SBar[hide] {
15
21
  display: none;
16
22
  }
@@ -21,4 +27,4 @@ SBar[transparent] {
21
27
 
22
28
  SBackground {
23
29
  fill: var(--intergalactic-chart-palette-order-other-data, #c4c7cf);
24
- }
30
+ }
@@ -8,6 +8,7 @@ SBubble {
8
8
  transition-duration: var(--duration);
9
9
  transition-timing-function: ease-in-out;
10
10
  opacity: 0.5;
11
+
11
12
  &:hover {
12
13
  opacity: 0.8;
13
14
  }
@@ -17,6 +18,12 @@ SBubble[color] {
17
18
  fill: var(--color);
18
19
  }
19
20
 
21
+ SBubble[pattern][color] {
22
+ fill: var(--pattern);
23
+ stroke: var(--color);
24
+ stroke-width: 1px;
25
+ }
26
+
20
27
  SBubble[transparent] {
21
28
  opacity: 0.3;
22
29
  }
@@ -54,4 +61,4 @@ SLabel[color] {
54
61
 
55
62
  SLabel[transparent] {
56
63
  opacity: 0.3;
57
- }
64
+ }
@@ -9,6 +9,12 @@ SPie[color] {
9
9
  fill: var(--color);
10
10
  }
11
11
 
12
+ SPie[pattern][color] {
13
+ fill: var(--pattern);
14
+ stroke: var(--color);
15
+ stroke-width: 1px;
16
+ }
17
+
12
18
  SPie[transparent] {
13
19
  opacity: 0.3;
14
20
  }
@@ -27,4 +33,4 @@ SLabel {
27
33
  font-size: var(--intergalactic-fs-200, 14px);
28
34
  line-height: var(--intergalactic-lh-200, 142%);
29
35
 
30
- }
36
+ }
@@ -7,10 +7,10 @@ SDots {
7
7
  }
8
8
 
9
9
  SDot {
10
- stroke-width: 2px;
10
+ stroke-width: 1px;
11
11
  stroke: var(--intergalactic-chart-grid-border, #ffffff);
12
12
  fill: var(--intergalactic-chart-palette-order-1, #2bb3ff);
13
- transition-property: cx, cy;
13
+ transition-property: cx, cy, x, y;
14
14
  transition-timing-function: ease-in-out;
15
15
  }
16
16
 
@@ -39,6 +39,12 @@ SPolygon[color] {
39
39
  fill: var(--color);
40
40
  }
41
41
 
42
+ SPolygon[pattern][color] {
43
+ fill: var(--pattern);
44
+ stroke: var(--color);
45
+ stroke-width: 1px;
46
+ }
47
+
42
48
  SPolygonDot {
43
49
  stroke-width: 2px;
44
50
  stroke: var(--intergalactic-chart-grid-border, #ffffff);
@@ -70,4 +76,4 @@ SPolygonLine[color] {
70
76
 
71
77
  SPieRect {
72
78
  fill: var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3));
73
- }
79
+ }
@@ -21,6 +21,11 @@ SCap {
21
21
  transition: r 0.1s;
22
22
  }
23
23
 
24
+ SCap[pattern] {
25
+ stroke: var(--intergalactic-chart-grid-border, #ffffff);
26
+ stroke-width: 1px;
27
+ }
28
+
24
29
  SCap[transparent] {
25
30
  opacity: 0.3;
26
31
  }
@@ -6,6 +6,7 @@ SScatterPlot {
6
6
  transition-duration: var(--duration);
7
7
  transition-timing-function: ease-in-out;
8
8
  opacity: 0.5;
9
+
9
10
  &:hover {
10
11
  opacity: 0.8;
11
12
  }
@@ -15,6 +16,12 @@ SScatterPlot[color] {
15
16
  fill: var(--color);
16
17
  }
17
18
 
19
+ SScatterPlot[pattern][color] {
20
+ fill: var(--pattern);
21
+ stroke: var(--color);
22
+ stroke-width: 1px;
23
+ }
24
+
18
25
  SScatterPlot[transparent] {
19
26
  opacity: 0.3;
20
27
  }
@@ -31,4 +38,4 @@ SValue[color] {
31
38
 
32
39
  SValue[transparent] {
33
40
  opacity: 0.3;
34
- }
41
+ }
@@ -23,17 +23,17 @@ SDotGroup {
23
23
  }
24
24
 
25
25
  SDot {
26
- width: 8px;
27
- height: 8px;
28
- border-radius: 50%;
29
26
  margin-right: var(--intergalactic-spacing-2x, 8px);
30
- background: var(--intergalactic-icon-secondary-info, #2bb3ff);
31
27
  }
32
28
 
33
- SDot[color] {
34
- background: var(--color);
29
+ SDotCircle[color] {
30
+ background-color: var(--color);
31
+ width: 12px;
32
+ height: 12px;
33
+ border-radius: 50%;
35
34
  }
36
35
 
36
+
37
37
  SFooter {
38
38
  background: var(--intergalactic-bg-secondary-neutral, #f4f5f9);
39
39
  padding: var(--intergalactic-spacing-1x, 4px) var(--intergalactic-spacing-3x, 12px);
@@ -18,6 +18,17 @@ SCircle[color] {
18
18
  fill: var(--color);
19
19
  }
20
20
 
21
+ SCircle[pattern][color] {
22
+ fill: var(--pattern);
23
+ fill-opacity: 0.7;
24
+ stroke: var(--color);
25
+ stroke-width: 1px;
26
+
27
+ &:hover {
28
+ fill-opacity: 0.85;
29
+ }
30
+ }
31
+
21
32
  SCircle[transparent] {
22
33
  opacity: 0.3;
23
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Plot.d.js","names":[],"sources":["../../../src/types/Plot.d.ts"],"sourcesContent":["import { BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Context } from './context';\nimport { DataStructureHints } from './a11y/hints';\n\n/** @deprecated */\nexport interface IPlotProps extends PlotProps, UnknownProperties {}\nexport type PlotProps = Context &\n BoxProps & {\n /** Width of the svg element\n * @default 0*/\n width?: number;\n /** Height of the svg element\n * @default 0*/\n height?: number;\n /** Human readable chart name (e.g \"Last market trends\") */\n label?: string;\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Optional container for data hints (use it if you have a legend component upper in tree)\n */\n dataHints?: DataStructureHints;\n /** Optional prop to tune up alt text generating for charts */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /** @deprecated */\n eventEmitter?: unknown;\n };\n\nexport type PlotSummarizerConfig = {\n /** Totally disable automatic data summarization */\n disable?: boolean;\n /** Disable automatic data summarization and use provided text */\n override?: string;\n /** Tuning up time series trends analyzing. Represents angle tangens of time series change of different strength */\n trendTangens?: {\n /** Angle tangens of time series that have meaningful trending change\n * @default 1/15\n */\n static?: number;\n /** Angle tangens of time series that have weak trending change\n * @default 1/10\n */\n weak?: number;\n /** Angle tangens of time series that have medium trending change\n * @default 1/5\n */\n medium?: number;\n /** Angle tangens of time series that have strong trending change\n * @default Infinity\n */\n strong?: number;\n };\n /** Tuning up time series local trends detection based on moving averages */\n movingAverage?: {\n /** Frame size of long moving average\n * @default Math.sqrt(data.length)\n */\n longSize?: number;\n /** Frame size of short moving average\n * @default Math.sqrt(data.length)/2\n */\n shortSize?: number;\n /** Absolute difference between values on moving averages crossing to\n * be handled as local trend change.\n * @default StandardDeviation/10\n */\n notableDiff?: number;\n };\n /** The way data to be interpreted as. By default is based on used used Plot elements and data structure.\n */\n dataType?: 'time-series' | 'points-cloud' | 'values-set';\n /** Grid size to split data of point clouds into clusters.\n */\n clustersGridSize?: number;\n /** Limits some output lists in chart alt text\n * @default 100\n * **/\n maxListSymbols?: number;\n /** Always add time to dates in chart alt text **/\n datesWithTime?: boolean;\n /** Described clusters count before text \"and X more\"\n * @default false\n * **/\n clustersLimit?: number;\n /** Described values count before text \"and X more\"\n * @default false\n * **/\n valuesLimit?: number;\n /** Described grouped value groups count before text \"and X more\"\n * @default false\n * **/\n groupsLimit?: number;\n /** Additional field for extra text description to the data\n * **/\n additionalFields?: string[];\n};\n\n/** @deprecated */\nexport type MapProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?:\n | ((props: Props & Ctx, handlers: UCProps) => Props | React.PropsWithChildren)\n | React.ReactNode;\n};\n\nexport type IntergalacticD3Component<BaseTag extends Intergalactic.Tag, Props, Context = {}> = (<\n Tag extends Intergalactic.Tag = BaseTag,\n>(\n props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<Tag, Props, Context>,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<BaseTag, BaseTag, Props>;\n\ndeclare const Plot: IntergalacticD3Component<'svg', PlotProps, Context>;\nexport default Plot;\n"],"mappings":""}
1
+ {"version":3,"file":"Plot.d.js","names":[],"sources":["../../../src/types/Plot.d.ts"],"sourcesContent":["import { BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Context } from './context';\nimport { DataStructureHints } from './a11y/hints';\nimport { PatternsConfig } from '../Pattern';\n\n/** @deprecated */\nexport interface IPlotProps extends PlotProps, UnknownProperties {}\nexport type PlotProps = Context &\n BoxProps & {\n /** Width of the svg element\n * @default 0*/\n width?: number;\n /** Height of the svg element\n * @default 0*/\n height?: number;\n /** Human readable chart name (e.g \"Last market trends\") */\n label?: string;\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Optional container for data hints (use it if you have a legend component upper in tree)\n */\n dataHints?: DataStructureHints;\n /** Optional prop to tune up alt text generating for charts */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /** Enables charts patterns that enhances charts accessability */\n patterns?: PatternsConfig;\n\n /** @deprecated */\n eventEmitter?: unknown;\n };\n\nexport type PlotSummarizerConfig = {\n /** Totally disable automatic data summarization */\n disable?: boolean;\n /** Disable automatic data summarization and use provided text */\n override?: string;\n /** Tuning up time series trends analyzing. Represents angle tangens of time series change of different strength */\n trendTangens?: {\n /** Angle tangens of time series that have meaningful trending change\n * @default 1/15\n */\n static?: number;\n /** Angle tangens of time series that have weak trending change\n * @default 1/10\n */\n weak?: number;\n /** Angle tangens of time series that have medium trending change\n * @default 1/5\n */\n medium?: number;\n /** Angle tangens of time series that have strong trending change\n * @default Infinity\n */\n strong?: number;\n };\n /** Tuning up time series local trends detection based on moving averages */\n movingAverage?: {\n /** Frame size of long moving average\n * @default Math.sqrt(data.length)\n */\n longSize?: number;\n /** Frame size of short moving average\n * @default Math.sqrt(data.length)/2\n */\n shortSize?: number;\n /** Absolute difference between values on moving averages crossing to\n * be handled as local trend change.\n * @default StandardDeviation/10\n */\n notableDiff?: number;\n };\n /** The way data to be interpreted as. By default is based on used used Plot elements and data structure.\n */\n dataType?: 'time-series' | 'points-cloud' | 'values-set';\n /** Grid size to split data of point clouds into clusters.\n */\n clustersGridSize?: number;\n /** Limits some output lists in chart alt text\n * @default 100\n * **/\n maxListSymbols?: number;\n /** Always add time to dates in chart alt text **/\n datesWithTime?: boolean;\n /** Described clusters count before text \"and X more\"\n * @default false\n * **/\n clustersLimit?: number;\n /** Described values count before text \"and X more\"\n * @default false\n * **/\n valuesLimit?: number;\n /** Described grouped value groups count before text \"and X more\"\n * @default false\n * **/\n groupsLimit?: number;\n /** Additional field for extra text description to the data\n * **/\n additionalFields?: string[];\n};\n\n/** @deprecated */\nexport type MapProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?:\n | ((props: Props & Ctx, handlers: UCProps) => Props | React.PropsWithChildren)\n | React.ReactNode;\n};\n\nexport type IntergalacticD3Component<BaseTag extends Intergalactic.Tag, Props, Context = {}> = (<\n Tag extends Intergalactic.Tag = BaseTag,\n>(\n props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<Tag, Props, Context>,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<BaseTag, BaseTag, Props>;\n\ndeclare const Plot: IntergalacticD3Component<'svg', PlotProps, Context>;\nexport default Plot;\n"],"mappings":""}
@@ -60,6 +60,9 @@ export * from './component/ChartLegend/LegendFlex/LegendFlex.type';
60
60
  export * from './component/ChartLegend/LegendTable/LegendTable.type';
61
61
  // @ts-ignore
62
62
  export * from './component/ChartLegend/LegendItem/LegendItem.type';
63
+
64
+ // @ts-ignore
65
+ export * from './Pattern';
63
66
  export { default as Chart } from './component/Chart';
64
67
  export * from './component/Chart/AbstractChart.type';
65
68
  export * from './component/Chart/LineChart.type';