intergalactic 15.51.0-prerelease.0-prerelease-677bb0c2 → 15.52.0-prerelease-e6d2b891

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 (345) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/accordion/lib/cjs/Accordion.js +6 -6
  3. package/accordion/lib/es6/Accordion.js +6 -6
  4. package/animation/lib/cjs/Animation.js +11 -11
  5. package/animation/lib/cjs/Collapse.js +28 -28
  6. package/animation/lib/cjs/FadeInOut.js +28 -28
  7. package/animation/lib/cjs/Scale.js +28 -28
  8. package/animation/lib/cjs/Slide.js +28 -28
  9. package/animation/lib/cjs/Transform.js +28 -28
  10. package/animation/lib/es6/Animation.js +11 -11
  11. package/animation/lib/es6/Collapse.js +28 -28
  12. package/animation/lib/es6/FadeInOut.js +28 -28
  13. package/animation/lib/es6/Scale.js +28 -28
  14. package/animation/lib/es6/Slide.js +28 -28
  15. package/animation/lib/es6/Transform.js +28 -28
  16. package/badge/lib/cjs/Badge.js +6 -6
  17. package/badge/lib/es6/Badge.js +6 -6
  18. package/base-trigger/lib/cjs/BaseTrigger.js +18 -18
  19. package/base-trigger/lib/cjs/ButtonTrigger.js +3 -3
  20. package/base-trigger/lib/cjs/FilterTrigger.js +7 -7
  21. package/base-trigger/lib/cjs/LinkTrigger.js +12 -12
  22. package/base-trigger/lib/es6/BaseTrigger.js +18 -18
  23. package/base-trigger/lib/es6/ButtonTrigger.js +3 -3
  24. package/base-trigger/lib/es6/FilterTrigger.js +7 -7
  25. package/base-trigger/lib/es6/LinkTrigger.js +12 -12
  26. package/breadcrumbs/lib/cjs/Breadcrumbs.js +6 -6
  27. package/breadcrumbs/lib/es6/Breadcrumbs.js +6 -6
  28. package/button/lib/cjs/Button.js +26 -26
  29. package/button/lib/es6/Button.js +26 -26
  30. package/card/lib/cjs/Card.js +8 -8
  31. package/card/lib/es6/Card.js +8 -8
  32. package/carousel/lib/cjs/Carousel.js +16 -16
  33. package/carousel/lib/es6/Carousel.js +16 -16
  34. package/checkbox/lib/cjs/Checkbox.js +16 -16
  35. package/checkbox/lib/es6/Checkbox.js +16 -16
  36. package/color-picker/lib/cjs/ColorPicker.js +23 -23
  37. package/color-picker/lib/cjs/PaletteManager.js +23 -23
  38. package/color-picker/lib/cjs/components/InputColor.js +23 -23
  39. package/color-picker/lib/es6/ColorPicker.js +23 -23
  40. package/color-picker/lib/es6/PaletteManager.js +23 -23
  41. package/color-picker/lib/es6/components/InputColor.js +23 -23
  42. package/components.json +73 -72
  43. package/counter/lib/cjs/Counter.js +10 -10
  44. package/counter/lib/es6/Counter.js +10 -10
  45. package/d3-chart/lib/cjs/Area.js +9 -9
  46. package/d3-chart/lib/cjs/Axis.js +14 -14
  47. package/d3-chart/lib/cjs/Bar.js +8 -8
  48. package/d3-chart/lib/cjs/Bubble.js +10 -10
  49. package/d3-chart/lib/cjs/Donut.js +7 -7
  50. package/d3-chart/lib/cjs/Dots.js +8 -8
  51. package/d3-chart/lib/cjs/HorizontalBar.js +8 -8
  52. package/d3-chart/lib/cjs/Hover.js +3 -3
  53. package/d3-chart/lib/cjs/Line.js +9 -9
  54. package/d3-chart/lib/cjs/Plot.js +3 -3
  55. package/d3-chart/lib/cjs/Radar.js +17 -17
  56. package/d3-chart/lib/cjs/RadialTree.js +10 -10
  57. package/d3-chart/lib/cjs/ReferenceLine.js +9 -9
  58. package/d3-chart/lib/cjs/ScatterPlot.js +7 -7
  59. package/d3-chart/lib/cjs/Tooltip.js +8 -8
  60. package/d3-chart/lib/cjs/Venn.js +7 -7
  61. package/d3-chart/lib/cjs/a11y/PlotA11yModule.js +2 -2
  62. package/d3-chart/lib/cjs/a11y/PlotA11yView.js +2 -2
  63. package/d3-chart/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  64. package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +15 -15
  65. package/d3-chart/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
  66. package/d3-chart/lib/es6/Area.js +9 -9
  67. package/d3-chart/lib/es6/Axis.js +14 -14
  68. package/d3-chart/lib/es6/Bar.js +8 -8
  69. package/d3-chart/lib/es6/Bubble.js +10 -10
  70. package/d3-chart/lib/es6/Donut.js +7 -7
  71. package/d3-chart/lib/es6/Dots.js +8 -8
  72. package/d3-chart/lib/es6/HorizontalBar.js +8 -8
  73. package/d3-chart/lib/es6/Hover.js +3 -3
  74. package/d3-chart/lib/es6/Line.js +9 -9
  75. package/d3-chart/lib/es6/Plot.js +3 -3
  76. package/d3-chart/lib/es6/Radar.js +17 -17
  77. package/d3-chart/lib/es6/RadialTree.js +10 -10
  78. package/d3-chart/lib/es6/ReferenceLine.js +9 -9
  79. package/d3-chart/lib/es6/ScatterPlot.js +7 -7
  80. package/d3-chart/lib/es6/Tooltip.js +8 -8
  81. package/d3-chart/lib/es6/Venn.js +7 -7
  82. package/d3-chart/lib/es6/a11y/PlotA11yModule.js +2 -2
  83. package/d3-chart/lib/es6/a11y/PlotA11yView.js +2 -2
  84. package/d3-chart/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  85. package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +15 -15
  86. package/d3-chart/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
  87. package/data-table/lib/cjs/Body.js +4 -4
  88. package/data-table/lib/cjs/DataTable.js +41 -41
  89. package/data-table/lib/cjs/Head.js +4 -4
  90. package/data-table/lib/es6/Body.js +4 -4
  91. package/data-table/lib/es6/DataTable.js +41 -41
  92. package/data-table/lib/es6/Head.js +4 -4
  93. package/date-picker/lib/cjs/components/ButtonTrigger.js +1 -5
  94. package/date-picker/lib/cjs/components/ButtonTrigger.js.map +1 -1
  95. package/date-picker/lib/cjs/components/Calendar.js +21 -21
  96. package/date-picker/lib/cjs/components/DateRangeComparatorAbstract.js +65 -42
  97. package/date-picker/lib/cjs/components/DateRangeComparatorAbstract.js.map +1 -1
  98. package/date-picker/lib/cjs/components/InputTrigger.js +26 -26
  99. package/date-picker/lib/cjs/components/PickerAbstract.js +80 -72
  100. package/date-picker/lib/cjs/components/PickerAbstract.js.map +1 -1
  101. package/date-picker/lib/cjs/components/RangePickerAbstract.js +97 -86
  102. package/date-picker/lib/cjs/components/RangePickerAbstract.js.map +1 -1
  103. package/date-picker/lib/es6/components/ButtonTrigger.js +1 -5
  104. package/date-picker/lib/es6/components/ButtonTrigger.js.map +1 -1
  105. package/date-picker/lib/es6/components/Calendar.js +21 -21
  106. package/date-picker/lib/es6/components/DateRangeComparatorAbstract.js +65 -42
  107. package/date-picker/lib/es6/components/DateRangeComparatorAbstract.js.map +1 -1
  108. package/date-picker/lib/es6/components/InputTrigger.js +26 -26
  109. package/date-picker/lib/es6/components/PickerAbstract.js +80 -72
  110. package/date-picker/lib/es6/components/PickerAbstract.js.map +1 -1
  111. package/date-picker/lib/es6/components/RangePickerAbstract.js +97 -86
  112. package/date-picker/lib/es6/components/RangePickerAbstract.js.map +1 -1
  113. package/divider/lib/cjs/Divider.js +9 -9
  114. package/divider/lib/es6/Divider.js +9 -9
  115. package/dot/lib/cjs/Dot.js +10 -10
  116. package/dot/lib/es6/Dot.js +10 -10
  117. package/drag-and-drop/lib/cjs/DragAndDrop.js +12 -12
  118. package/drag-and-drop/lib/es6/DragAndDrop.js +12 -12
  119. package/dropdown/lib/cjs/Dropdown.js +2 -2
  120. package/dropdown/lib/es6/Dropdown.js +2 -2
  121. package/dropdown-menu/lib/cjs/DropdownMenu.js +12 -12
  122. package/dropdown-menu/lib/cjs/styleScrollArea.js +6 -6
  123. package/dropdown-menu/lib/es6/DropdownMenu.js +12 -12
  124. package/dropdown-menu/lib/es6/styleScrollArea.js +6 -6
  125. package/ellipsis/lib/cjs/Ellipsis.js +10 -10
  126. package/ellipsis/lib/es6/Ellipsis.js +10 -10
  127. package/errors/lib/cjs/Error.js +9 -9
  128. package/errors/lib/es6/Error.js +9 -9
  129. package/feature-popover/lib/cjs/FeaturePopover.js +10 -10
  130. package/feature-popover/lib/es6/FeaturePopover.js +10 -10
  131. package/feedback-form/lib/cjs/FeedbackForm.js +7 -7
  132. package/feedback-form/lib/es6/FeedbackForm.js +7 -7
  133. package/flags/lib/cjs/Flags.js +3 -3
  134. package/flags/lib/cjs/Flags.js.map +1 -1
  135. package/flags/lib/es6/Flags.js +3 -3
  136. package/flags/lib/es6/Flags.js.map +1 -1
  137. package/flags/lib/sprites/sprite@1x.css +256 -256
  138. package/flags/lib/sprites/sprite@2x.css +257 -257
  139. package/flex-box/lib/cjs/Box/useBox.js +3 -3
  140. package/flex-box/lib/cjs/Flex/useFlex.js +3 -3
  141. package/flex-box/lib/es6/Box/useBox.js +3 -3
  142. package/flex-box/lib/es6/Flex/useFlex.js +3 -3
  143. package/format-text/lib/cjs/FormatText.js +5 -5
  144. package/format-text/lib/es6/FormatText.js +5 -5
  145. package/fullscreen-modal/lib/cjs/FullscreenModal.js +13 -13
  146. package/fullscreen-modal/lib/es6/FullscreenModal.js +13 -13
  147. package/grid/lib/cjs/Grid.js +114 -114
  148. package/grid/lib/es6/Grid.js +114 -114
  149. package/icon/color/Confluence/l/index.js +4 -4
  150. package/icon/color/Confluence/l/index.mjs +4 -4
  151. package/icon/color/Confluence/m/index.js +4 -4
  152. package/icon/color/Confluence/m/index.mjs +4 -4
  153. package/icon/color/MicrosoftOffice/l/index.js +10 -10
  154. package/icon/color/MicrosoftOffice/l/index.mjs +10 -10
  155. package/icon/color/MicrosoftOffice/m/index.js +10 -10
  156. package/icon/color/MicrosoftOffice/m/index.mjs +10 -10
  157. package/icon/lib/cjs/Icon.js +5 -5
  158. package/icon/lib/es6/Icon.js +5 -5
  159. package/icon/pay/Discover/l/index.js +1 -1
  160. package/icon/pay/Discover/l/index.mjs +1 -1
  161. package/icon/pay/Discover/m/index.js +1 -1
  162. package/icon/pay/Discover/m/index.mjs +1 -1
  163. package/icon/pay/JCB/l/index.js +10 -10
  164. package/icon/pay/JCB/l/index.mjs +10 -10
  165. package/icon/pay/JCB/m/index.js +10 -10
  166. package/icon/pay/JCB/m/index.mjs +10 -10
  167. package/icon/pay/Visa/l/index.js +2 -2
  168. package/icon/pay/Visa/l/index.mjs +2 -2
  169. package/icon/pay/Visa/m/index.js +2 -2
  170. package/icon/pay/Visa/m/index.mjs +2 -2
  171. package/illustration/lib/cjs/index.js +1 -1
  172. package/illustration/lib/cjs/index.js.map +1 -1
  173. package/illustration/lib/es6/index.js +1 -1
  174. package/illustration/lib/es6/index.js.map +1 -1
  175. package/inline-edit/lib/cjs/InlineEdit.js +4 -4
  176. package/inline-edit/lib/es6/InlineEdit.js +4 -4
  177. package/inline-input/lib/cjs/InlineInput.js +18 -18
  178. package/inline-input/lib/es6/InlineInput.js +18 -18
  179. package/input/lib/cjs/Input.js +17 -17
  180. package/input/lib/es6/Input.js +17 -17
  181. package/input-mask/lib/cjs/InputMask.js +6 -6
  182. package/input-mask/lib/es6/InputMask.js +6 -6
  183. package/input-number/lib/cjs/InputNumber.js +9 -9
  184. package/input-number/lib/es6/InputNumber.js +9 -9
  185. package/input-tags/lib/cjs/InputTags.js +12 -12
  186. package/input-tags/lib/es6/InputTags.js +12 -12
  187. package/link/lib/cjs/Link.js +12 -12
  188. package/link/lib/es6/Link.js +12 -12
  189. package/mini-chart/component/score/Donut.d.ts +12 -0
  190. package/mini-chart/component/score/Line.d.ts +15 -0
  191. package/mini-chart/component/score/Score.d.ts +20 -0
  192. package/mini-chart/component/score/index.d.ts +3 -0
  193. package/mini-chart/component/trend/Bar.d.ts +26 -0
  194. package/mini-chart/component/trend/Line.d.ts +29 -0
  195. package/mini-chart/component/trend/Trend.d.ts +36 -0
  196. package/mini-chart/component/trend/index.d.ts +3 -0
  197. package/mini-chart/index.d.ts +12 -0
  198. package/mini-chart/index.js +8 -0
  199. package/mini-chart/index.mjs +2 -0
  200. package/mini-chart/lib/cjs/component/score/Donut.js +123 -0
  201. package/mini-chart/lib/cjs/component/score/Donut.js.map +1 -0
  202. package/mini-chart/lib/cjs/component/score/Line.js +94 -0
  203. package/mini-chart/lib/cjs/component/score/Line.js.map +1 -0
  204. package/mini-chart/lib/cjs/component/score/Score.js +2 -0
  205. package/mini-chart/lib/cjs/component/score/Score.js.map +1 -0
  206. package/mini-chart/lib/cjs/component/score/donut.shadow.css +17 -0
  207. package/mini-chart/lib/cjs/component/score/index.js +26 -0
  208. package/mini-chart/lib/cjs/component/score/index.js.map +1 -0
  209. package/mini-chart/lib/cjs/component/score/line.shadow.css +66 -0
  210. package/mini-chart/lib/cjs/component/skeleton/skeleton.shadow.css +24 -0
  211. package/mini-chart/lib/cjs/component/trend/Bar.js +124 -0
  212. package/mini-chart/lib/cjs/component/trend/Bar.js.map +1 -0
  213. package/mini-chart/lib/cjs/component/trend/Line.js +166 -0
  214. package/mini-chart/lib/cjs/component/trend/Line.js.map +1 -0
  215. package/mini-chart/lib/cjs/component/trend/Trend.js +87 -0
  216. package/mini-chart/lib/cjs/component/trend/Trend.js.map +1 -0
  217. package/mini-chart/lib/cjs/component/trend/index.js +32 -0
  218. package/mini-chart/lib/cjs/component/trend/index.js.map +1 -0
  219. package/mini-chart/lib/cjs/index.js +20 -0
  220. package/mini-chart/lib/cjs/index.js.map +1 -0
  221. package/mini-chart/lib/es6/component/score/Donut.js +116 -0
  222. package/mini-chart/lib/es6/component/score/Donut.js.map +1 -0
  223. package/mini-chart/lib/es6/component/score/Line.js +87 -0
  224. package/mini-chart/lib/es6/component/score/Line.js.map +1 -0
  225. package/mini-chart/lib/es6/component/score/Score.js +2 -0
  226. package/mini-chart/lib/es6/component/score/Score.js.map +1 -0
  227. package/mini-chart/lib/es6/component/score/donut.shadow.css +17 -0
  228. package/mini-chart/lib/es6/component/score/index.js +4 -0
  229. package/mini-chart/lib/es6/component/score/index.js.map +1 -0
  230. package/mini-chart/lib/es6/component/score/line.shadow.css +66 -0
  231. package/mini-chart/lib/es6/component/skeleton/skeleton.shadow.css +24 -0
  232. package/mini-chart/lib/es6/component/trend/Bar.js +116 -0
  233. package/mini-chart/lib/es6/component/trend/Bar.js.map +1 -0
  234. package/mini-chart/lib/es6/component/trend/Line.js +158 -0
  235. package/mini-chart/lib/es6/component/trend/Line.js.map +1 -0
  236. package/mini-chart/lib/es6/component/trend/Trend.js +79 -0
  237. package/mini-chart/lib/es6/component/trend/Trend.js.map +1 -0
  238. package/mini-chart/lib/es6/component/trend/index.js +4 -0
  239. package/mini-chart/lib/es6/component/trend/index.js.map +1 -0
  240. package/mini-chart/lib/es6/index.js +13 -0
  241. package/mini-chart/lib/es6/index.js.map +1 -0
  242. package/mini-chart/lib/types/component/score/Donut.d.ts +12 -0
  243. package/mini-chart/lib/types/component/score/Line.d.ts +15 -0
  244. package/mini-chart/lib/types/component/score/Score.d.ts +20 -0
  245. package/mini-chart/lib/types/component/score/index.d.ts +3 -0
  246. package/mini-chart/lib/types/component/trend/Bar.d.ts +26 -0
  247. package/mini-chart/lib/types/component/trend/Line.d.ts +29 -0
  248. package/mini-chart/lib/types/component/trend/Trend.d.ts +36 -0
  249. package/mini-chart/lib/types/component/trend/index.d.ts +3 -0
  250. package/mini-chart/lib/types/index.d.ts +12 -0
  251. package/modal/lib/cjs/Modal.js +7 -7
  252. package/modal/lib/es6/Modal.js +7 -7
  253. package/notice/lib/cjs/Notice.js +13 -13
  254. package/notice/lib/es6/Notice.js +13 -13
  255. package/notice-bubble/lib/cjs/NoticeBubble.js +12 -12
  256. package/notice-bubble/lib/es6/NoticeBubble.js +12 -12
  257. package/notice-global/lib/cjs/NoticeGlobal.js +11 -11
  258. package/notice-global/lib/es6/NoticeGlobal.js +11 -11
  259. package/package.json +1 -1
  260. package/pagination/lib/cjs/Pagination.js +10 -10
  261. package/pagination/lib/es6/Pagination.js +10 -10
  262. package/pills/lib/cjs/Pills.js +17 -17
  263. package/pills/lib/es6/Pills.js +17 -17
  264. package/popper/lib/cjs/Popper.js +6 -6
  265. package/popper/lib/es6/Popper.js +6 -6
  266. package/product-head/lib/cjs/Info.js +4 -4
  267. package/product-head/lib/cjs/ProductHead.js +5 -5
  268. package/product-head/lib/cjs/Title.js +4 -4
  269. package/product-head/lib/es6/Info.js +4 -4
  270. package/product-head/lib/es6/ProductHead.js +5 -5
  271. package/product-head/lib/es6/Title.js +4 -4
  272. package/progress-bar/lib/cjs/ProgressBar.js +15 -15
  273. package/progress-bar/lib/es6/ProgressBar.js +15 -15
  274. package/radio/lib/cjs/Radio.js +14 -14
  275. package/radio/lib/es6/Radio.js +14 -14
  276. package/scroll-area/lib/cjs/ScrollArea.js +9 -9
  277. package/scroll-area/lib/cjs/ScrollBar.js +5 -5
  278. package/scroll-area/lib/es6/ScrollArea.js +9 -9
  279. package/scroll-area/lib/es6/ScrollBar.js +5 -5
  280. package/select/lib/cjs/InputSearch.js +6 -6
  281. package/select/lib/cjs/Select.js +7 -7
  282. package/select/lib/es6/InputSearch.js +6 -6
  283. package/select/lib/es6/Select.js +7 -7
  284. package/side-panel/lib/cjs/SidePanel.js +15 -15
  285. package/side-panel/lib/es6/SidePanel.js +15 -15
  286. package/skeleton/lib/cjs/Charts/Area.js +9 -9
  287. package/skeleton/lib/cjs/Charts/Bar.js +9 -9
  288. package/skeleton/lib/cjs/Charts/Bubble.js +9 -9
  289. package/skeleton/lib/cjs/Charts/Donut.js +9 -9
  290. package/skeleton/lib/cjs/Charts/Histogram.js +9 -9
  291. package/skeleton/lib/cjs/Charts/Line.js +9 -9
  292. package/skeleton/lib/cjs/Charts/RadialTree.js +9 -9
  293. package/skeleton/lib/cjs/Charts/ScatterPlot.js +9 -9
  294. package/skeleton/lib/cjs/Charts/Venn.js +9 -9
  295. package/skeleton/lib/cjs/Skeleton.js +8 -8
  296. package/skeleton/lib/es6/Charts/Area.js +9 -9
  297. package/skeleton/lib/es6/Charts/Bar.js +9 -9
  298. package/skeleton/lib/es6/Charts/Bubble.js +9 -9
  299. package/skeleton/lib/es6/Charts/Donut.js +9 -9
  300. package/skeleton/lib/es6/Charts/Histogram.js +9 -9
  301. package/skeleton/lib/es6/Charts/Line.js +9 -9
  302. package/skeleton/lib/es6/Charts/RadialTree.js +9 -9
  303. package/skeleton/lib/es6/Charts/ScatterPlot.js +9 -9
  304. package/skeleton/lib/es6/Charts/Venn.js +9 -9
  305. package/skeleton/lib/es6/Skeleton.js +8 -8
  306. package/slider/lib/cjs/Slider.js +7 -7
  307. package/slider/lib/es6/Slider.js +7 -7
  308. package/spin/lib/cjs/Spin.js +13 -13
  309. package/spin/lib/es6/Spin.js +13 -13
  310. package/spin-container/lib/cjs/SpinContainer.js +8 -8
  311. package/spin-container/lib/es6/SpinContainer.js +8 -8
  312. package/sticky/lib/cjs/Sticky.js +2 -2
  313. package/sticky/lib/es6/Sticky.js +2 -2
  314. package/switch/lib/cjs/Switch.js +21 -21
  315. package/switch/lib/es6/Switch.js +21 -21
  316. package/tab-line/lib/cjs/TabLine.js +13 -13
  317. package/tab-line/lib/es6/TabLine.js +13 -13
  318. package/tab-panel/lib/cjs/TabPanel.js +8 -8
  319. package/tab-panel/lib/es6/TabPanel.js +8 -8
  320. package/tag/lib/cjs/Tag.js +19 -19
  321. package/tag/lib/es6/Tag.js +19 -19
  322. package/textarea/lib/cjs/Textarea.js +8 -8
  323. package/textarea/lib/es6/Textarea.js +8 -8
  324. package/time-picker/lib/cjs/TimePicker.js +12 -12
  325. package/time-picker/lib/es6/TimePicker.js +12 -12
  326. package/tooltip/lib/cjs/Tooltip.js +6 -6
  327. package/tooltip/lib/es6/Tooltip.js +6 -6
  328. package/typography/lib/cjs/Blockquote.js +4 -4
  329. package/typography/lib/cjs/Hint.js +7 -7
  330. package/typography/lib/cjs/List.js +5 -5
  331. package/typography/lib/cjs/Text.js +34 -34
  332. package/typography/lib/es6/Blockquote.js +4 -4
  333. package/typography/lib/es6/Hint.js +7 -7
  334. package/typography/lib/es6/List.js +5 -5
  335. package/typography/lib/es6/Text.js +34 -34
  336. package/utils/lib/components/invalid-state-pattern/InvalidStatePattern.js +2 -2
  337. package/utils/lib/components/invalid-state-pattern/InvalidStatePattern.mjs +2 -2
  338. package/utils/lib/injectStyle.js +1 -1
  339. package/utils/lib/injectStyle.js.map +1 -1
  340. package/utils/lib/injectStyle.mjs +1 -1
  341. package/utils/lib/injectStyle.mjs.map +1 -1
  342. package/widget-empty/lib/cjs/WidgetEmpty.js +5 -5
  343. package/widget-empty/lib/es6/WidgetEmpty.js +5 -5
  344. package/wizard/lib/cjs/Wizard.js +11 -11
  345. package/wizard/lib/es6/Wizard.js +11 -11
@@ -0,0 +1,87 @@
1
+ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
+ import _createClass from "@babel/runtime/helpers/createClass";
4
+ import _inherits from "@babel/runtime/helpers/inherits";
5
+ import _createSuper from "@babel/runtime/helpers/createSuper";
6
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
+ import { sstyled as _sstyled } from 'intergalactic/core';
8
+ import { assignProps as _assignProps } from 'intergalactic/core';
9
+ import React from 'react';
10
+ import createComponent, { Component, Root, sstyled } from 'intergalactic/core';
11
+ import { Box, Flex } from 'intergalactic/flex-box';
12
+ import resolveColorEnhance from 'intergalactic/utils/lib/enhances/resolveColorEnhance';
13
+ /*__reshadow-styles__:"./line.shadow.css"*/
14
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes pulse_5kfd2{0%,to{opacity:1}50%{opacity:.4}}@keyframes move-line_5kfd2{0%{transform:translateX(-100%)}to{transform:translateX(0)}}.___SDonutContainer_5kfd2_gg_.__loading_5kfd2_gg_,.___SLineGauge_5kfd2_gg_.__loading_5kfd2_gg_,.___STrendBar_5kfd2_gg_.__loading_5kfd2_gg_,.___STrendLine_5kfd2_gg_.__loading_5kfd2_gg_{animation-name:pulse_5kfd2;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}.___SLineGauge_5kfd2_gg_{height:8px;background-color:var(--intergalactic-skeleton-bg, rgba(224, 225, 233, 0.8));border-radius:var(--intergalactic-chart-rounded, 2px);overflow:hidden;position:relative}.___SLineGauge_5kfd2_gg_.__animate_5kfd2_gg_ .___SLineValue_5kfd2_gg_{transition:all var(--intergalactic-duration-extra-slow, 500) ease-in-out;animation-name:move-line_5kfd2;animation-duration:.5s;animation-timing-function:ease-in-out}.___SLineValue_5kfd2_gg_{height:8px;background-color:var(--intergalactic-chart-palette-order-1, #2bb3ff);border-radius:var(--intergalactic-chart-rounded, 2px)0 0 var(--intergalactic-chart-rounded, 2px)}.___SLineValue_5kfd2_gg_.__percent_5kfd2_gg_{width:var(--percent_5kfd2)}.___SLineValue_5kfd2_gg_.__color_5kfd2_gg_{background-color:var(--color_5kfd2, var(--intergalactic-chart-palette-order-1, #2bb3ff))}.___SLineGauge_5kfd2_gg_.__segments_5kfd2_gg_{border-radius:var(--intergalactic-progress-bar-rounded, 6px)}.___SLineGauge_5kfd2_gg_.__segments_5kfd2_gg_ .___SLineValue_5kfd2_gg_{border-radius:var(--intergalactic-progress-bar-rounded, 6px)0 0 var(--intergalactic-progress-bar-rounded, 6px)}.___SLineGaugeSegment_5kfd2_gg_{position:absolute;top:0;left:0;right:0;bottom:0}.___SLineSegmentItem_5kfd2_gg_:last-child{margin-right:0;border-right:none}.___SLineSegmentItem_5kfd2_gg_{height:8px;background:0 0;margin-right:1px;border-right-color:var(--intergalactic-chart-grid-border, #ffffff);border-right-style:solid;border-right-width:1px;box-sizing:content-box}" /*__inner_css_end__*/, "5kfd2_gg_") /*__reshadow_css_end__*/, {
15
+ "__SLineGauge": "___SLineGauge_5kfd2_gg_",
16
+ "_loading": "__loading_5kfd2_gg_",
17
+ "__SDonutContainer": "___SDonutContainer_5kfd2_gg_",
18
+ "__STrendLine": "___STrendLine_5kfd2_gg_",
19
+ "__STrendBar": "___STrendBar_5kfd2_gg_",
20
+ "@pulse": "pulse_5kfd2",
21
+ "_animate": "__animate_5kfd2_gg_",
22
+ "__SLineValue": "___SLineValue_5kfd2_gg_",
23
+ "_percent": "__percent_5kfd2_gg_",
24
+ "--percent": "--percent_5kfd2",
25
+ "_color": "__color_5kfd2_gg_",
26
+ "--color": "--color_5kfd2",
27
+ "_segments": "__segments_5kfd2_gg_",
28
+ "__SLineGaugeSegment": "___SLineGaugeSegment_5kfd2_gg_",
29
+ "__SLineSegmentItem": "___SLineSegmentItem_5kfd2_gg_",
30
+ "@move-line": "move-line_5kfd2"
31
+ });
32
+ var LineRoot = /*#__PURE__*/function (_Component) {
33
+ _inherits(LineRoot, _Component);
34
+ var _super = _createSuper(LineRoot);
35
+ function LineRoot() {
36
+ _classCallCheck(this, LineRoot);
37
+ return _super.apply(this, arguments);
38
+ }
39
+ _createClass(LineRoot, [{
40
+ key: "render",
41
+ value: function render() {
42
+ var _ref = this.asProps,
43
+ _ref3;
44
+ var SLineGauge = Box;
45
+ var SLineValue = Box;
46
+ var SLineGaugeSegment = Flex;
47
+ var SLineSegmentItem = Box;
48
+ var _this$asProps = this.asProps,
49
+ value = _this$asProps.value,
50
+ styles = _this$asProps.styles,
51
+ _this$asProps$color = _this$asProps.color,
52
+ color = _this$asProps$color === void 0 ? 'chart-palette-order-1' : _this$asProps$color,
53
+ resolveColor = _this$asProps.resolveColor,
54
+ segments = _this$asProps.segments,
55
+ loading = _this$asProps.loading;
56
+ var SegmentItems = [];
57
+ if (segments) {
58
+ for (var i = 0; i < segments; i++) {
59
+ var _ref2;
60
+ var width = "calc((100% - ".concat(segments - 1, "px) / ").concat(segments, ")");
61
+ SegmentItems.push((_ref2 = sstyled(styles), /*#__PURE__*/React.createElement(SLineSegmentItem, _ref2.cn("SLineSegmentItem", {
62
+ "key": i,
63
+ "color": i < value ? resolveColor(color) : undefined,
64
+ "w": width
65
+ }))));
66
+ }
67
+ }
68
+ var percent = "".concat(value, "%");
69
+ if (segments) {
70
+ percent = "".concat(value / segments * 100, "%");
71
+ }
72
+ return _ref3 = sstyled(styles), /*#__PURE__*/React.createElement(SLineGauge, _ref3.cn("SLineGauge", _objectSpread({}, _assignProps({}, _ref))), !loading && /*#__PURE__*/React.createElement(SLineValue, _ref3.cn("SLineValue", {
73
+ "w": percent,
74
+ "color": resolveColor(color)
75
+ })), Boolean(SegmentItems.length) && /*#__PURE__*/React.createElement(SLineGaugeSegment, _ref3.cn("SLineGaugeSegment", {}), SegmentItems));
76
+ }
77
+ }]);
78
+ return LineRoot;
79
+ }(Component);
80
+ _defineProperty(LineRoot, "enhance", [resolveColorEnhance()]);
81
+ _defineProperty(LineRoot, "style", style);
82
+ _defineProperty(LineRoot, "defaultProps", {
83
+ animate: true
84
+ });
85
+ export var ScoreLine = createComponent(LineRoot);
86
+ ScoreLine.displayName = 'MiniChart.ScoreLine';
87
+ //# sourceMappingURL=Line.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Line.js","names":["React","createComponent","Component","Root","sstyled","Box","Flex","resolveColorEnhance","style","_sstyled","insert","LineRoot","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_ref3","SLineGauge","SLineValue","SLineGaugeSegment","SLineSegmentItem","_this$asProps","styles","_this$asProps$color","color","resolveColor","segments","loading","SegmentItems","i","_ref2","width","concat","push","createElement","cn","undefined","percent","_objectSpread","_assignProps","Boolean","length","_defineProperty","animate","ScoreLine","displayName"],"sources":["../../../../src/component/score/Line.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled, ComponentType } from '@semcore/core';\nimport { Box, Flex, BoxProps } from '@semcore/flex-box';\nimport resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';\nimport { CommonScoreProps } from './Score';\n\nimport style from './line.shadow.css';\n\nexport type ScoreLineGaugeProps = BoxProps &\n CommonScoreProps & {\n /**\n * Count of line segments\n */\n segments?: number;\n };\n\ntype Enhances = {\n resolveColor: ReturnType<typeof resolveColorEnhance>;\n};\n\nclass LineRoot extends Component<ScoreLineGaugeProps, {}, {}, Enhances> {\n static enhance = [resolveColorEnhance()];\n\n static style = style;\n\n static defaultProps = {\n animate: true,\n };\n\n render() {\n const SLineGauge = Root;\n const SLineValue = Box;\n const SLineGaugeSegment = Flex;\n const SLineSegmentItem = Box;\n const {\n value,\n styles,\n color = 'chart-palette-order-1',\n resolveColor,\n segments,\n loading,\n } = this.asProps;\n\n const SegmentItems = [];\n\n if (segments) {\n for (let i = 0; i < segments; i++) {\n const width = `calc((100% - ${segments - 1}px) / ${segments})`;\n\n SegmentItems.push(\n sstyled(styles)(\n <SLineSegmentItem\n key={i}\n color={i < value ? resolveColor(color) : undefined}\n w={width}\n />,\n ),\n );\n }\n }\n\n let percent = `${value}%`;\n\n if (segments) {\n percent = `${(value / segments) * 100}%`;\n }\n\n return sstyled(styles)(\n <SLineGauge render={Box}>\n {!loading && <SLineValue w={percent} color={resolveColor(color)} />}\n {Boolean(SegmentItems.length) && <SLineGaugeSegment>{SegmentItems}</SLineGaugeSegment>}\n </SLineGauge>,\n );\n }\n}\n\nexport const ScoreLine: ComponentType<ScoreLineGaugeProps, {}, {}, Enhances> =\n createComponent(LineRoot);\n\nScoreLine.displayName = 'MiniChart.ScoreLine';\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,SAAS,EAAEC,IAAI,EAAEC,OAAO,QAAuB,eAAe;AACxF,SAASC,GAAG,EAAEC,IAAI,QAAkB,mBAAmB;AACvD,OAAOC,mBAAmB,MAAM,iDAAiD;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAiB5EC,QAAQ,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,QAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,QAAA;EAAA,SAAAA,SAAA;IAAAK,eAAA,OAAAL,QAAA;IAAA,OAAAG,MAAA,CA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zB,IAAIc,QAAQ,EAAE;QACZW,OAAO,MAAAL,MAAA,CAAOpB,KAAK,GAAGc,QAAQ,GAAI,GAAG,MAAG;MAC1C;MAEA,OAAAV,KAAA,GAAOrB,OAAO,CAAC2B,MAAM,CAAC,eACpB/B,KAAA,CAAA2C,aAAA,CAACjB,UAAU,EAAAD,KAAA,CAAAmB,EAAA,eAAAG,aAAA,KAAAC,YAAA,KAAAzB,IAAA,KACR,CAACa,OAAO,iBAAIpC,KAAA,CAAA2C,aAAA,CAAChB,UAAU,EAAAF,KAAA,CAAAmB,EAAA;QAAA,KAAIE,OAAO;QAAA,SAASZ,YAAY,CAACD,KAAK;MAAC,GAAI,EAClEgB,OAAO,CAACZ,YAAY,CAACa,MAAM,CAAC,iBAAIlD,KAAA,CAAA2C,aAAA,CAACf,iBAAiB,EAAAH,KAAA,CAAAmB,EAAA,2BAAEP,YAAY,CAAqB,CAC3E;IAEjB;EAAC;EAAA,OAAA1B,QAAA;AAAA,EArDoBT,SAAS;AAAAiD,eAAA,CAA1BxC,QAAQ,aACK,CAACJ,mBAAmB,EAAE,CAAC;AAAA4C,eAAA,CADpCxC,QAAQ,WAGGH,KAAK;AAAA2C,eAAA,CAHhBxC,QAAQ,kBAKU;EACpByC,OAAO,EAAE;AACX,CAAC;AAiDH,OAAO,IAAMC,SAA+D,GAC1EpD,eAAe,CAACU,QAAQ,CAAC;AAE3B0C,SAAS,CAACC,WAAW,GAAG,qBAAqB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Score.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Score.js","names":[],"sources":["../../../../src/component/score/Score.ts"],"sourcesContent":["export type CommonScoreProps = {\n /**\n * Value of score (in percents from 0 to 100) or count of selected segments (for Line with segments)\n */\n value: number;\n\n /**\n * Color of value\n */\n color?: string;\n\n /**\n * Flag to enable skeleton\n * @default false\n */\n loading?: boolean;\n\n /**\n * Flag to enable animate of charts\n * @default true\n */\n animate?: boolean;\n};\n"],"mappings":""}
@@ -0,0 +1,17 @@
1
+ @import '../skeleton/skeleton.shadow.css';
2
+
3
+ SDonutContainer[semi] {
4
+ g {
5
+ transform: rotate(180deg) translate(-24px, -24px);
6
+ }
7
+ }
8
+
9
+ SDonutContainer {
10
+ g {
11
+ transform: rotate(-90deg) translate(-24px)
12
+ }
13
+ }
14
+
15
+ SDonutContainer[animate] circle {
16
+ transition: all var(--intergalactic-duration-extra-slow, 500) ease-in-out;
17
+ }
@@ -0,0 +1,4 @@
1
+ import { ScoreDonut, ScoreSemiDonut } from './Donut';
2
+ import { ScoreLine } from './Line';
3
+ export { ScoreDonut, ScoreSemiDonut, ScoreLine };
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["ScoreDonut","ScoreSemiDonut","ScoreLine"],"sources":["../../../../src/component/score/index.ts"],"sourcesContent":["import { ScoreDonut, ScoreSemiDonut } from './Donut';\nimport { ScoreLine } from './Line';\n\nexport { ScoreDonut, ScoreSemiDonut, ScoreLine };\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,cAAc,QAAQ,SAAS;AACpD,SAASC,SAAS,QAAQ,QAAQ;AAElC,SAASF,UAAU,EAAEC,cAAc,EAAEC,SAAS"}
@@ -0,0 +1,66 @@
1
+ @import '../skeleton/skeleton.shadow.css';
2
+
3
+ SLineGauge {
4
+ height: 8px;
5
+ background-color: var(--intergalactic-skeleton-bg, rgba(224, 225, 233, 0.8));
6
+ border-radius: var(--intergalactic-chart-rounded, 2px);
7
+ overflow: hidden;
8
+ position: relative;
9
+ }
10
+
11
+ SLineGauge[animate] SLineValue {
12
+ transition: all var(--intergalactic-duration-extra-slow, 500) ease-in-out;
13
+ animation-name: move-line;
14
+ animation-duration: 0.5s;
15
+ animation-timing-function: ease-in-out;
16
+ }
17
+
18
+ SLineValue {
19
+ height: 8px;
20
+ background-color: var(--intergalactic-chart-palette-order-1, #2bb3ff);
21
+ border-radius: var(--intergalactic-chart-rounded, 2px) 0 0 var(--intergalactic-chart-rounded, 2px);
22
+ }
23
+
24
+ SLineValue[percent] {
25
+ width: var(--percent);
26
+ }
27
+
28
+ SLineValue[color] {
29
+ background-color: var(--color, var(--intergalactic-chart-palette-order-1, #2bb3ff));
30
+ }
31
+
32
+ SLineGauge[segments] {
33
+ border-radius: var(--intergalactic-progress-bar-rounded, 6px);
34
+ }
35
+
36
+ SLineGauge[segments] SLineValue {
37
+ border-radius: var(--intergalactic-progress-bar-rounded, 6px) 0 0 var(--intergalactic-progress-bar-rounded, 6px);
38
+ }
39
+
40
+ SLineGaugeSegment {
41
+ position: absolute;
42
+ top: 0;
43
+ left: 0;
44
+ right: 0;
45
+ bottom: 0;
46
+ }
47
+
48
+ SLineSegmentItem:last-child {
49
+ margin-right: 0;
50
+ border-right: none;
51
+ }
52
+
53
+ SLineSegmentItem {
54
+ height: 8px;
55
+ background: transparent;
56
+ margin-right: 1px;
57
+ border-right-color: var(--intergalactic-chart-grid-border, #ffffff);
58
+ border-right-style: solid;
59
+ border-right-width: 1px;
60
+ box-sizing: content-box;
61
+ }
62
+
63
+ @keyframes move-line {
64
+ 0% {transform: translateX(-100%);}
65
+ 100% {transform: translateX(0);}
66
+ }
@@ -0,0 +1,24 @@
1
+ SLineGauge[loading],
2
+ SDonutContainer[loading],
3
+ STrendLine[loading],
4
+ STrendBar[loading] {
5
+ animation-name: pulse;
6
+ animation-iteration-count: infinite;
7
+ animation-timing-function: ease-in-out;
8
+ animation-duration: 1.6s;
9
+ will-change: opacity;
10
+ }
11
+
12
+ @keyframes pulse {
13
+ 0% {
14
+ opacity: 1;
15
+ }
16
+
17
+ 50% {
18
+ opacity: 0.4;
19
+ }
20
+
21
+ 100% {
22
+ opacity: 1;
23
+ }
24
+ }
@@ -0,0 +1,116 @@
1
+ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
+ import _createClass from "@babel/runtime/helpers/createClass";
4
+ import _inherits from "@babel/runtime/helpers/inherits";
5
+ import _createSuper from "@babel/runtime/helpers/createSuper";
6
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
+ import { sstyled as _sstyled } from 'intergalactic/core';
8
+ import { assignProps as _assignProps } from 'intergalactic/core';
9
+ import React from 'react';
10
+ import createComponent, { assignProps, Root, sstyled } from 'intergalactic/core';
11
+ import resolveColorEnhance from 'intergalactic/utils/lib/enhances/resolveColorEnhance';
12
+ import { Trend } from './Trend';
13
+ import { Box } from 'intergalactic/flex-box';
14
+ /*__reshadow-styles__:"../skeleton/skeleton.shadow.css"*/
15
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes pulse_179om{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_179om_gg_.__loading_179om_gg_,.___SLineGauge_179om_gg_.__loading_179om_gg_,.___STrendBar_179om_gg_.__loading_179om_gg_,.___STrendLine_179om_gg_.__loading_179om_gg_{animation-name:pulse_179om;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}" /*__inner_css_end__*/, "179om_gg_") /*__reshadow_css_end__*/, {
16
+ "__SLineGauge": "___SLineGauge_179om_gg_",
17
+ "_loading": "__loading_179om_gg_",
18
+ "__SDonutContainer": "___SDonutContainer_179om_gg_",
19
+ "__STrendLine": "___STrendLine_179om_gg_",
20
+ "__STrendBar": "___STrendBar_179om_gg_",
21
+ "@pulse": "pulse_179om"
22
+ });
23
+ var TrendBarRoot = /*#__PURE__*/function (_Trend) {
24
+ _inherits(TrendBarRoot, _Trend);
25
+ var _super = _createSuper(TrendBarRoot);
26
+ function TrendBarRoot() {
27
+ _classCallCheck(this, TrendBarRoot);
28
+ return _super.apply(this, arguments);
29
+ }
30
+ _createClass(TrendBarRoot, [{
31
+ key: "defaultData",
32
+ get: function get() {
33
+ return [{
34
+ value: 20
35
+ }, {
36
+ value: 80
37
+ }, {
38
+ value: 45
39
+ }, {
40
+ value: 10
41
+ }];
42
+ }
43
+ }, {
44
+ key: "data",
45
+ get: function get() {
46
+ var _this$asProps = this.asProps,
47
+ data = _this$asProps.data,
48
+ loading = _this$asProps.loading;
49
+ if (loading) {
50
+ return this.defaultData;
51
+ }
52
+ return data;
53
+ }
54
+ }, {
55
+ key: "render",
56
+ value: function render() {
57
+ var _ref = this.asProps,
58
+ _ref2,
59
+ _this = this;
60
+ var STrendBar = Box;
61
+ var _this$asProps2 = this.asProps,
62
+ styles = _this$asProps2.styles,
63
+ resolveColor = _this$asProps2.resolveColor,
64
+ isHistogram = _this$asProps2.isHistogram,
65
+ animate = _this$asProps2.animate,
66
+ loading = _this$asProps2.loading;
67
+ var step = this.defaultWidth / this.data.length;
68
+ return _ref2 = sstyled(styles), /*#__PURE__*/React.createElement(STrendBar, _ref2.cn("STrendBar", _objectSpread({}, _assignProps({
69
+ "ref": this.containerRef,
70
+ "__excludeProps": ['data']
71
+ }, _ref))), /*#__PURE__*/React.createElement("svg", _ref2.cn("svg", {
72
+ "width": '100%',
73
+ "height": '100%',
74
+ "viewBox": "0 0 ".concat(this.svgWidth, " ").concat(this.svgHeight)
75
+ }), this.data.map(function (barItem, index) {
76
+ var color = resolveColor('skeleton-bg');
77
+ if (barItem.color) {
78
+ color = resolveColor(barItem.color);
79
+ }
80
+ return /*#__PURE__*/React.createElement("rect", {
81
+ key: index,
82
+ x: step * index,
83
+ y: _this.defaultHeight - barItem.value,
84
+ width: isHistogram ? step : step * 0.8,
85
+ height: barItem.value,
86
+ fill: color
87
+ }, animate && !loading && /*#__PURE__*/React.createElement("animate", {
88
+ attributeName: 'y',
89
+ values: "".concat(_this.defaultHeight, ";").concat(_this.defaultHeight - barItem.value),
90
+ dur: '500ms'
91
+ }));
92
+ })));
93
+ }
94
+ }]);
95
+ return TrendBarRoot;
96
+ }(Trend);
97
+ _defineProperty(TrendBarRoot, "enhance", [resolveColorEnhance()]);
98
+ _defineProperty(TrendBarRoot, "style", style);
99
+ _defineProperty(TrendBarRoot, "defaultProps", {
100
+ animate: true
101
+ });
102
+ export var TrendBar = createComponent(TrendBarRoot);
103
+ TrendBar.displayName = 'MiniChart.TrendBar';
104
+ export var TrendHistogram = createComponent(TrendBarRoot, {}, {
105
+ enhancements: [function () {
106
+ return {
107
+ wrapperProps: function wrapperProps(props) {
108
+ return assignProps(props, {
109
+ isHistogram: true
110
+ });
111
+ }
112
+ };
113
+ }]
114
+ });
115
+ TrendBar.displayName = 'MiniChart.TrendHistogram';
116
+ //# sourceMappingURL=Bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bar.js","names":["React","createComponent","assignProps","Root","sstyled","resolveColorEnhance","Trend","Box","style","_sstyled","insert","TrendBarRoot","_Trend","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","get","value","_this$asProps","asProps","data","loading","defaultData","render","_ref","_ref2","_this","STrendBar","_this$asProps2","styles","resolveColor","isHistogram","animate","step","defaultWidth","length","createElement","cn","_objectSpread","_assignProps","containerRef","concat","svgWidth","svgHeight","map","barItem","index","color","x","y","defaultHeight","width","height","fill","attributeName","values","dur","_defineProperty","TrendBar","displayName","TrendHistogram","enhancements","wrapperProps","props"],"sources":["../../../../src/component/trend/Bar.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { ComponentType, assignProps, Root, sstyled } from '@semcore/core';\nimport resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';\nimport { Trend, CommonTrendProps } from './Trend';\nimport { Box } from '@semcore/flex-box';\n\nimport style from '../skeleton/skeleton.shadow.css';\n\ntype BarItem = {\n /**\n * Value\n */\n value: number;\n /**\n * Color of value\n */\n color?: string;\n};\n\nexport type TrendBarProps = CommonTrendProps & {\n /**\n * Data to bar chart\n */\n data: BarItem[];\n};\n\ntype Enhances = {\n resolveColor: ReturnType<typeof resolveColorEnhance>;\n isHistogram?: true;\n};\n\nclass TrendBarRoot extends Trend<TrendBarProps, Enhances> {\n static enhance = [resolveColorEnhance()];\n\n static style = style;\n\n static defaultProps = {\n animate: true,\n };\n\n get defaultData(): BarItem[] {\n return [{ value: 20 }, { value: 80 }, { value: 45 }, { value: 10 }];\n }\n\n get data(): BarItem[] {\n const { data, loading } = this.asProps;\n\n if (loading) {\n return this.defaultData;\n }\n\n return data;\n }\n\n render() {\n const STrendBar = Root;\n const { styles, resolveColor, isHistogram, animate, loading } = this.asProps;\n const step = this.defaultWidth / this.data.length;\n\n return sstyled(styles)(\n <STrendBar render={Box} ref={this.containerRef} __excludeProps={['data']}>\n <svg width='100%' height='100%' viewBox={`0 0 ${this.svgWidth} ${this.svgHeight}`}>\n {this.data.map((barItem, index) => {\n let color = resolveColor('skeleton-bg');\n\n if (barItem.color) {\n color = resolveColor(barItem.color);\n }\n\n return (\n <rect\n key={index}\n x={step * index}\n y={this.defaultHeight - barItem.value}\n width={isHistogram ? step : step * 0.8}\n height={barItem.value}\n fill={color}\n >\n {animate && !loading && (\n <animate\n attributeName={'y'}\n values={`${this.defaultHeight};${this.defaultHeight - barItem.value}`}\n dur={'500ms'}\n />\n )}\n </rect>\n );\n })}\n </svg>\n </STrendBar>,\n );\n }\n}\n\nexport const TrendBar: ComponentType<TrendBarProps, {}, {}, Enhances> =\n createComponent(TrendBarRoot);\n\nTrendBar.displayName = 'MiniChart.TrendBar';\n\nexport const TrendHistogram: ComponentType<TrendBarProps, {}, {}, Enhances> = createComponent(\n TrendBarRoot,\n {},\n {\n enhancements: [\n () => {\n return {\n wrapperProps: (props: TrendBarProps) => {\n return assignProps(props, { isHistogram: true });\n },\n };\n },\n ],\n },\n);\n\nTrendBar.displayName = 'MiniChart.TrendHistogram';\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAmBC,WAAW,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AAC1F,OAAOC,mBAAmB,MAAM,iDAAiD;AACjF,SAASC,KAAK,QAA0B,SAAS;AACjD,SAASC,GAAG,QAAQ,mBAAmB;AAAC;AAAA,IA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,GAAG,EAAE;QAAQ,EAEhB,CACI;MAEX,CAAC,CAAC,CACE,CACI;IAEhB;EAAC;EAAA,OAAAlD,YAAA;AAAA,EA5DwBL,KAAK;AAAAwD,eAAA,CAA1BnD,YAAY,aACC,CAACN,mBAAmB,EAAE,CAAC;AAAAyD,eAAA,CADpCnD,YAAY,WAGDH,KAAK;AAAAsD,eAAA,CAHhBnD,YAAY,kBAKM;EACpB0B,OAAO,EAAE;AACX,CAAC;AAwDH,OAAO,IAAM0B,QAAwD,GACnE9D,eAAe,CAACU,YAAY,CAAC;AAE/BoD,QAAQ,CAACC,WAAW,GAAG,oBAAoB;AAE3C,OAAO,IAAMC,cAA8D,GAAGhE,eAAe,CAC3FU,YAAY,EACZ,CAAC,CAAC,EACF;EACEuD,YAAY,EAAE,CACZ,YAAM;IACJ,OAAO;MACLC,YAAY,EAAE,SAAAA,aAACC,KAAoB,EAAK;QACtC,OAAOlE,WAAW,CAACkE,KAAK,EAAE;UAAEhC,WAAW,EAAE;QAAK,CAAC,CAAC;MAClD;IACF,CAAC;EACH,CAAC;AAEL,CAAC,CACF;AAED2B,QAAQ,CAACC,WAAW,GAAG,0BAA0B"}
@@ -0,0 +1,158 @@
1
+ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
+ import _createClass from "@babel/runtime/helpers/createClass";
4
+ import _inherits from "@babel/runtime/helpers/inherits";
5
+ import _createSuper from "@babel/runtime/helpers/createSuper";
6
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
+ import { sstyled as _sstyled } from 'intergalactic/core';
8
+ import { assignProps as _assignProps } from 'intergalactic/core';
9
+ import React from 'react';
10
+ import createComponent, { assignProps, Root, sstyled } from 'intergalactic/core';
11
+ import resolveColorEnhance from 'intergalactic/utils/lib/enhances/resolveColorEnhance';
12
+ import uniqueIDEnhancement from 'intergalactic/utils/lib/uniqueID';
13
+ import { Trend } from './Trend';
14
+ import { Box } from 'intergalactic/flex-box';
15
+ /*__reshadow-styles__:"../skeleton/skeleton.shadow.css"*/
16
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes pulse_179om{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_179om_gg_.__loading_179om_gg_,.___SLineGauge_179om_gg_.__loading_179om_gg_,.___STrendBar_179om_gg_.__loading_179om_gg_,.___STrendLine_179om_gg_.__loading_179om_gg_{animation-name:pulse_179om;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}" /*__inner_css_end__*/, "179om_gg_") /*__reshadow_css_end__*/, {
17
+ "__SLineGauge": "___SLineGauge_179om_gg_",
18
+ "_loading": "__loading_179om_gg_",
19
+ "__SDonutContainer": "___SDonutContainer_179om_gg_",
20
+ "__STrendLine": "___STrendLine_179om_gg_",
21
+ "__STrendBar": "___STrendBar_179om_gg_",
22
+ "@pulse": "pulse_179om"
23
+ });
24
+ var TrendLineRoot = /*#__PURE__*/function (_Trend) {
25
+ _inherits(TrendLineRoot, _Trend);
26
+ var _super = _createSuper(TrendLineRoot);
27
+ function TrendLineRoot() {
28
+ _classCallCheck(this, TrendLineRoot);
29
+ return _super.apply(this, arguments);
30
+ }
31
+ _createClass(TrendLineRoot, [{
32
+ key: "defaultData",
33
+ get: function get() {
34
+ return [15, 70, 20, 85, 20];
35
+ }
36
+ }, {
37
+ key: "lastPointRadius",
38
+ get: function get() {
39
+ var _this$asProps$lastPoi;
40
+ return (_this$asProps$lastPoi = this.asProps.lastPointRadius) !== null && _this$asProps$lastPoi !== void 0 ? _this$asProps$lastPoi : 6;
41
+ }
42
+ }, {
43
+ key: "data",
44
+ get: function get() {
45
+ var _this$asProps = this.asProps,
46
+ data = _this$asProps.data,
47
+ loading = _this$asProps.loading;
48
+ if (loading) {
49
+ return this.defaultData;
50
+ }
51
+ return data;
52
+ }
53
+ }, {
54
+ key: "svgWidth",
55
+ get: function get() {
56
+ return this.asProps.lastPointColor ? this.defaultWidth + this.lastPointRadius : this.defaultWidth;
57
+ }
58
+ }, {
59
+ key: "svgHeight",
60
+ get: function get() {
61
+ return this.asProps.lastPointColor ? this.defaultHeight + this.lastPointRadius : this.defaultHeight;
62
+ }
63
+ }, {
64
+ key: "color",
65
+ get: function get() {
66
+ var _this$asProps2 = this.asProps,
67
+ resolveColor = _this$asProps2.resolveColor,
68
+ _this$asProps2$color = _this$asProps2.color,
69
+ color = _this$asProps2$color === void 0 ? 'chart-palette-order-1' : _this$asProps2$color,
70
+ loading = _this$asProps2.loading;
71
+ if (loading) {
72
+ return resolveColor('skeleton-bg');
73
+ }
74
+ return resolveColor(color);
75
+ }
76
+ }, {
77
+ key: "render",
78
+ value: function render() {
79
+ var _ref = this.asProps,
80
+ _ref2;
81
+ var STrendLine = Box;
82
+ var _this$asProps3 = this.asProps,
83
+ uid = _this$asProps3.uid,
84
+ withArea = _this$asProps3.withArea,
85
+ animate = _this$asProps3.animate,
86
+ lastPointColor = _this$asProps3.lastPointColor,
87
+ resolveColor = _this$asProps3.resolveColor,
88
+ loading = _this$asProps3.loading,
89
+ styles = _this$asProps3.styles;
90
+ var points = [];
91
+ var length = this.data.length;
92
+ var step = this.defaultWidth / (length - 1);
93
+ for (var i = 0; i < length; i++) {
94
+ points.push("".concat(step * i, ",").concat(this.defaultHeight - this.data[i]));
95
+ }
96
+ return _ref2 = sstyled(styles), /*#__PURE__*/React.createElement(STrendLine, _ref2.cn("STrendLine", _objectSpread({}, _assignProps({
97
+ "ref": this.containerRef,
98
+ "__excludeProps": ['data']
99
+ }, _ref))), /*#__PURE__*/React.createElement("svg", _ref2.cn("svg", {
100
+ "width": '100%',
101
+ "height": '100%',
102
+ "viewBox": "0 0 ".concat(this.svgWidth, " ").concat(this.svgHeight)
103
+ }), /*#__PURE__*/React.createElement("polyline", _ref2.cn("polyline", {
104
+ "points": points.join(' '),
105
+ "stroke": this.color,
106
+ "strokeWidth": '4',
107
+ "fill": 'none',
108
+ "clipPath": "url(#".concat(uid, ")")
109
+ })), withArea && /*#__PURE__*/React.createElement("polyline", _ref2.cn("polyline", {
110
+ "points": "0,".concat(this.defaultHeight, " ").concat(points.join(' '), " ").concat(this.defaultWidth, ",").concat(this.defaultHeight),
111
+ "fill": this.color,
112
+ "fillOpacity": 0.2,
113
+ "clipPath": "url(#".concat(uid, ")")
114
+ })), lastPointColor && !loading && /*#__PURE__*/React.createElement("circle", _ref2.cn("circle", {
115
+ "cx": step * (length - 1),
116
+ "cy": this.defaultHeight - this.data[length - 1],
117
+ "r": this.lastPointRadius,
118
+ "fill": resolveColor(lastPointColor),
119
+ "stroke": resolveColor('chart-grid-border'),
120
+ "strokeWidth": 4,
121
+ "clipPath": "url(#".concat(uid, ")")
122
+ })), animate && !loading && /*#__PURE__*/React.createElement("clipPath", _ref2.cn("clipPath", {
123
+ "id": uid
124
+ }), /*#__PURE__*/React.createElement("rect", _ref2.cn("rect", {
125
+ "x": '0',
126
+ "y": '0',
127
+ "width": '100%',
128
+ "height": '100%',
129
+ "fill": 'black'
130
+ }), /*#__PURE__*/React.createElement("animate", _ref2.cn("animate", {
131
+ "dur": '500ms',
132
+ "attributeName": 'width',
133
+ "values": '0;100%'
134
+ }))))));
135
+ }
136
+ }]);
137
+ return TrendLineRoot;
138
+ }(Trend);
139
+ _defineProperty(TrendLineRoot, "enhance", [resolveColorEnhance(), uniqueIDEnhancement()]);
140
+ _defineProperty(TrendLineRoot, "style", style);
141
+ _defineProperty(TrendLineRoot, "defaultProps", {
142
+ animate: true
143
+ });
144
+ export var TrendLine = createComponent(TrendLineRoot);
145
+ TrendLine.displayName = 'MiniChart.TrendLine';
146
+ export var TrendArea = createComponent(TrendLineRoot, {}, {
147
+ enhancements: [function () {
148
+ return {
149
+ wrapperProps: function wrapperProps(props) {
150
+ return assignProps(props, {
151
+ withArea: true
152
+ });
153
+ }
154
+ };
155
+ }]
156
+ });
157
+ TrendArea.displayName = 'MiniChart.TrendArea';
158
+ //# sourceMappingURL=Line.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Line.js","names":["React","createComponent","assignProps","Root","sstyled","resolveColorEnhance","uniqueIDEnhancement","Trend","Box","style","_sstyled","insert","TrendLineRoot","_Trend","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","get","_this$asProps$lastPoi","asProps","lastPointRadius","_this$asProps","data","loading","defaultData","lastPointColor","defaultWidth","defaultHeight","_this$asProps2","resolveColor","_this$asProps2$color","color","value","render","_ref","_ref2","STrendLine","_this$asProps3","uid","withArea","animate","styles","points","length","step","i","push","concat","createElement","cn","_objectSpread","_assignProps","containerRef","svgWidth","svgHeight","join","_defineProperty","TrendLine","displayName","TrendArea","enhancements","wrapperProps","props"],"sources":["../../../../src/component/trend/Line.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { ComponentType, assignProps, Root, sstyled } from '@semcore/core';\nimport resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport { Trend, CommonTrendProps } from './Trend';\nimport { Box } from '@semcore/flex-box';\n\nimport style from '../skeleton/skeleton.shadow.css';\n\nexport type TrendLineProps = CommonTrendProps & {\n /**\n * List of values\n */\n data: number[];\n\n /**\n * Color of line\n */\n color?: string;\n\n /**\n * Color of last point in chart\n */\n lastPointColor?: string;\n\n /**\n * Radius for last point item\n */\n lastPointRadius?: number;\n};\n\ntype Enhances = {\n uid: string;\n resolveColor: ReturnType<typeof resolveColorEnhance>;\n withArea?: true;\n};\n\nclass TrendLineRoot extends Trend<TrendLineProps, Enhances> {\n static enhance = [resolveColorEnhance(), uniqueIDEnhancement()];\n\n static style = style;\n\n static defaultProps = {\n animate: true,\n };\n\n get defaultData(): number[] {\n return [15, 70, 20, 85, 20];\n }\n\n get lastPointRadius(): number {\n return this.asProps.lastPointRadius ?? 6;\n }\n\n get data(): number[] {\n const { data, loading } = this.asProps;\n\n if (loading) {\n return this.defaultData;\n }\n\n return data;\n }\n\n override get svgWidth(): number {\n return this.asProps.lastPointColor\n ? this.defaultWidth + this.lastPointRadius\n : this.defaultWidth;\n }\n\n override get svgHeight(): number {\n return this.asProps.lastPointColor\n ? this.defaultHeight + this.lastPointRadius\n : this.defaultHeight;\n }\n\n get color() {\n const { resolveColor, color = 'chart-palette-order-1', loading } = this.asProps;\n\n if (loading) {\n return resolveColor('skeleton-bg');\n }\n\n return resolveColor(color);\n }\n\n render() {\n const STrendLine = Root;\n const { uid, withArea, animate, lastPointColor, resolveColor, loading, styles } = this.asProps;\n\n const points: string[] = [];\n const length = this.data.length;\n const step = this.defaultWidth / (length - 1);\n\n for (let i = 0; i < length; i++) {\n points.push(`${step * i},${this.defaultHeight - this.data[i]}`);\n }\n\n return sstyled(styles)(\n <STrendLine render={Box} ref={this.containerRef} __excludeProps={['data']}>\n <svg width='100%' height='100%' viewBox={`0 0 ${this.svgWidth} ${this.svgHeight}`}>\n <polyline\n points={points.join(' ')}\n stroke={this.color}\n strokeWidth='4'\n fill={'none'}\n clipPath={`url(#${uid})`}\n />\n {withArea && (\n <polyline\n points={`0,${this.defaultHeight} ${points.join(' ')} ${this.defaultWidth},${\n this.defaultHeight\n }`}\n fill={this.color}\n fillOpacity={0.2}\n clipPath={`url(#${uid})`}\n />\n )}\n {lastPointColor && !loading && (\n <circle\n cx={step * (length - 1)}\n cy={this.defaultHeight - this.data[length - 1]}\n r={this.lastPointRadius}\n fill={resolveColor(lastPointColor)}\n stroke={resolveColor('chart-grid-border')}\n strokeWidth={4}\n clipPath={`url(#${uid})`}\n />\n )}\n\n {animate && !loading && (\n <clipPath id={uid}>\n <rect x='0' y='0' width='100%' height='100%' fill={'black'}>\n <animate dur='500ms' attributeName='width' values='0;100%' />\n </rect>\n </clipPath>\n )}\n </svg>\n </STrendLine>,\n );\n }\n}\n\nexport const TrendLine: ComponentType<TrendLineProps, {}, {}, Enhances> =\n createComponent(TrendLineRoot);\n\nTrendLine.displayName = 'MiniChart.TrendLine';\n\nexport const TrendArea: ComponentType<TrendLineProps, {}, {}, Enhances> = createComponent(\n TrendLineRoot,\n {},\n {\n enhancements: [\n () => {\n return {\n wrapperProps: (props: TrendLineProps) => {\n return assignProps(props, { withArea: true });\n },\n };\n },\n ],\n },\n);\n\nTrendArea.displayName = 'MiniChart.TrendArea';\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAmBC,WAAW,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AAC1F,OAAOC,mBAAmB,MAAM,iDAAiD;AACjF,OAAOC,mBAAmB,MAAM,6BAA6B;AAC7D,SAASC,KAAK,QAA0B,SAAS;AACjD,SAASC,GAAG,QAAQ,mBAAmB;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAgClCC,aAAa,0BAAAC,MAAA;EAAAC,SAAA,CAAAF,aAAA,EAAAC,MAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,aAAA;EAAA,SAAAA,cAAA;IAAAK,eAAA,OAAAL,aAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAAC,YAAA,CAAAR,aAAA;IAAAS,GAAA;IAAAC,GAAA,EASjB,SAAAA,IAAA,EAA4B;MAC1B,OAAO,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IAC7B;EAAC;IAAAD,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAA8B;MAAA,IAAAC,qBAAA;MAC5B,QAAAA,qBAAA,GAAO,IAAI,CAACC,OAAO,CAACC,eAAe,cAAAF,qBAAA,cAAAA,qBAAA,GAAI,CAAC;IAC1C;EAAC;IAAAF,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAqB;MACnB,IAAAI,aAAA,GAA0B,IAAI,CAACF,OAAO;QAA9BG,IAAI,GAAAD,aA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A,CAD3DjD,aAAa,WAGFH,KAAK;AAAAoD,eAAA,CAHhBjD,aAAa,kBAKK;EACpBiC,OAAO,EAAE;AACX,CAAC;AAmGH,OAAO,IAAMiB,SAA0D,GACrE7D,eAAe,CAACW,aAAa,CAAC;AAEhCkD,SAAS,CAACC,WAAW,GAAG,qBAAqB;AAE7C,OAAO,IAAMC,SAA0D,GAAG/D,eAAe,CACvFW,aAAa,EACb,CAAC,CAAC,EACF;EACEqD,YAAY,EAAE,CACZ,YAAM;IACJ,OAAO;MACLC,YAAY,EAAE,SAAAA,aAACC,KAAqB,EAAK;QACvC,OAAOjE,WAAW,CAACiE,KAAK,EAAE;UAAEvB,QAAQ,EAAE;QAAK,CAAC,CAAC;MAC/C;IACF,CAAC;EACH,CAAC;AAEL,CAAC,CACF;AAEDoB,SAAS,CAACD,WAAW,GAAG,qBAAqB"}
@@ -0,0 +1,79 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/createClass";
3
+ import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
+ import _inherits from "@babel/runtime/helpers/inherits";
5
+ import _createSuper from "@babel/runtime/helpers/createSuper";
6
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
+ import React from 'react';
8
+ import { Component } from 'intergalactic/core';
9
+ export var Trend = /*#__PURE__*/function (_Component) {
10
+ _inherits(Trend, _Component);
11
+ var _super = _createSuper(Trend);
12
+ function Trend() {
13
+ var _this;
14
+ _classCallCheck(this, Trend);
15
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
16
+ args[_key] = arguments[_key];
17
+ }
18
+ _this = _super.call.apply(_super, [this].concat(args));
19
+ _defineProperty(_assertThisInitialized(_this), "state", {
20
+ width: 200,
21
+ height: 100
22
+ });
23
+ _defineProperty(_assertThisInitialized(_this), "containerRef", /*#__PURE__*/React.createRef());
24
+ return _this;
25
+ }
26
+ _createClass(Trend, [{
27
+ key: "componentDidMount",
28
+ value: function componentDidMount() {
29
+ this.setSizes();
30
+ }
31
+ }, {
32
+ key: "componentDidUpdate",
33
+ value: function componentDidUpdate(prevProps) {
34
+ if (prevProps.w !== this.props.w || prevProps.h !== this.props.h || prevProps.data !== this.props.data) {
35
+ this.setSizes();
36
+ }
37
+ }
38
+ }, {
39
+ key: "defaultWidth",
40
+ get: function get() {
41
+ var _this$state = this.state,
42
+ width = _this$state.width,
43
+ height = _this$state.height;
44
+ return width / height * this.defaultHeight;
45
+ }
46
+ }, {
47
+ key: "defaultHeight",
48
+ get: function get() {
49
+ return 100;
50
+ }
51
+ }, {
52
+ key: "svgWidth",
53
+ get: function get() {
54
+ return this.defaultWidth;
55
+ }
56
+ }, {
57
+ key: "svgHeight",
58
+ get: function get() {
59
+ return this.defaultHeight;
60
+ }
61
+ }, {
62
+ key: "setSizes",
63
+ value: function setSizes() {
64
+ if (this.containerRef.current) {
65
+ var boundingClientRect = this.containerRef.current.getBoundingClientRect();
66
+ var width = boundingClientRect.width,
67
+ height = boundingClientRect.height;
68
+ if (width > 0 && height > 0) {
69
+ this.setState({
70
+ width: width,
71
+ height: height
72
+ });
73
+ }
74
+ }
75
+ }
76
+ }]);
77
+ return Trend;
78
+ }(Component);
79
+ //# sourceMappingURL=Trend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Trend.js","names":["React","Component","Trend","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","width","height","createRef","_createClass","key","value","componentDidMount","setSizes","componentDidUpdate","prevProps","w","props","h","data","get","_this$state","state","defaultHeight","defaultWidth","containerRef","current","boundingClientRect","getBoundingClientRect","setState"],"sources":["../../../../src/component/trend/Trend.tsx"],"sourcesContent":["import React from 'react';\nimport { Component } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\nexport type CommonTrendProps = BoxProps & {\n /**\n * Flag to enable animate of charts\n * @default true\n */\n animate?: boolean;\n\n /**\n * Flag to enable skeleton\n * @default false\n */\n loading?: boolean;\n\n /**\n * Data for chart\n */\n data: any[];\n};\n\nexport abstract class Trend<P extends CommonTrendProps, E> extends Component<\n P,\n {},\n { width: number; height: number },\n E\n> {\n state = {\n width: 200,\n height: 100,\n };\n\n containerRef = React.createRef<HTMLDivElement>();\n\n componentDidMount() {\n this.setSizes();\n }\n componentDidUpdate(prevProps: P) {\n if (\n prevProps.w !== this.props.w ||\n prevProps.h !== this.props.h ||\n prevProps.data !== this.props.data\n ) {\n this.setSizes();\n }\n }\n\n get defaultWidth(): number {\n const { width, height } = this.state;\n\n return (width / height) * this.defaultHeight;\n }\n\n get defaultHeight(): number {\n return 100;\n }\n\n get svgWidth(): number {\n return this.defaultWidth;\n }\n\n get svgHeight(): number {\n return this.defaultHeight;\n }\n\n setSizes() {\n if (this.containerRef.current) {\n const boundingClientRect = this.containerRef.current.getBoundingClientRect();\n\n const { width, height } = boundingClientRect;\n\n if (width > 0 && height > 0) {\n this.setState({ width, height });\n }\n }\n }\n}\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,eAAe;AAsBzC,WAAsBC,KAAK,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,KAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,KAAA;EAAA,SAAAA,MAAA;IAAA,IAAAK,KAAA;IAAAC,eAAA,OAAAN,KAAA;IAAA,SAAAO,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAP,KAAA,GAAAF,MAAA,CAAAU,IAAA,CAAAC,KAAA,CAAAX,MAAA,SAAAY,MAAA,CAAAL,IAAA;IAAAM,eAAA,CAAAC,sBAAA,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B,IAAMC,kBAAkB,GAAG,IAAI,CAACF,YAAY,CAACC,OAAO,CAACE,qBAAqB,EAAE;QAE5E,IAAQtB,KAAK,GAAaqB,kBAAkB,CAApCrB,KAAK;UAAEC,MAAM,GAAKoB,kBAAkB,CAA7BpB,MAAM;QAErB,IAAID,KAAK,GAAG,CAAC,IAAIC,MAAM,GAAG,CAAC,EAAE;UAC3B,IAAI,CAACsB,QAAQ,CAAC;YAAEvB,KAAK,EAALA,KAAK;YAAEC,MAAM,EAANA;UAAO,CAAC,CAAC;QAClC;MACF;IACF;EAAC;EAAA,OAAAnB,KAAA;AAAA,EAtDgED,SAAS"}
@@ -0,0 +1,4 @@
1
+ import { TrendLine, TrendArea } from './Line';
2
+ import { TrendBar, TrendHistogram } from './Bar';
3
+ export { TrendLine, TrendArea, TrendBar, TrendHistogram };
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["TrendLine","TrendArea","TrendBar","TrendHistogram"],"sources":["../../../../src/component/trend/index.ts"],"sourcesContent":["import { TrendLine, TrendArea } from './Line';\nimport { TrendBar, TrendHistogram } from './Bar';\n\nexport { TrendLine, TrendArea, TrendBar, TrendHistogram };\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,SAAS,QAAQ,QAAQ;AAC7C,SAASC,QAAQ,EAAEC,cAAc,QAAQ,OAAO;AAEhD,SAASH,SAAS,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,cAAc"}