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.
- package/CHANGELOG.md +7 -1
- package/accordion/lib/cjs/Accordion.js +6 -6
- package/accordion/lib/es6/Accordion.js +6 -6
- package/animation/lib/cjs/Animation.js +11 -11
- package/animation/lib/cjs/Collapse.js +28 -28
- package/animation/lib/cjs/FadeInOut.js +28 -28
- package/animation/lib/cjs/Scale.js +28 -28
- package/animation/lib/cjs/Slide.js +28 -28
- package/animation/lib/cjs/Transform.js +28 -28
- package/animation/lib/es6/Animation.js +11 -11
- package/animation/lib/es6/Collapse.js +28 -28
- package/animation/lib/es6/FadeInOut.js +28 -28
- package/animation/lib/es6/Scale.js +28 -28
- package/animation/lib/es6/Slide.js +28 -28
- package/animation/lib/es6/Transform.js +28 -28
- package/badge/lib/cjs/Badge.js +6 -6
- package/badge/lib/es6/Badge.js +6 -6
- package/base-trigger/lib/cjs/BaseTrigger.js +18 -18
- package/base-trigger/lib/cjs/ButtonTrigger.js +3 -3
- package/base-trigger/lib/cjs/FilterTrigger.js +7 -7
- package/base-trigger/lib/cjs/LinkTrigger.js +12 -12
- package/base-trigger/lib/es6/BaseTrigger.js +18 -18
- package/base-trigger/lib/es6/ButtonTrigger.js +3 -3
- package/base-trigger/lib/es6/FilterTrigger.js +7 -7
- package/base-trigger/lib/es6/LinkTrigger.js +12 -12
- package/breadcrumbs/lib/cjs/Breadcrumbs.js +6 -6
- package/breadcrumbs/lib/es6/Breadcrumbs.js +6 -6
- package/button/lib/cjs/Button.js +26 -26
- package/button/lib/es6/Button.js +26 -26
- package/card/lib/cjs/Card.js +8 -8
- package/card/lib/es6/Card.js +8 -8
- package/carousel/lib/cjs/Carousel.js +16 -16
- package/carousel/lib/es6/Carousel.js +16 -16
- package/checkbox/lib/cjs/Checkbox.js +16 -16
- package/checkbox/lib/es6/Checkbox.js +16 -16
- package/color-picker/lib/cjs/ColorPicker.js +23 -23
- package/color-picker/lib/cjs/PaletteManager.js +23 -23
- package/color-picker/lib/cjs/components/InputColor.js +23 -23
- package/color-picker/lib/es6/ColorPicker.js +23 -23
- package/color-picker/lib/es6/PaletteManager.js +23 -23
- package/color-picker/lib/es6/components/InputColor.js +23 -23
- package/components.json +73 -72
- package/counter/lib/cjs/Counter.js +10 -10
- package/counter/lib/es6/Counter.js +10 -10
- package/d3-chart/lib/cjs/Area.js +9 -9
- package/d3-chart/lib/cjs/Axis.js +14 -14
- package/d3-chart/lib/cjs/Bar.js +8 -8
- package/d3-chart/lib/cjs/Bubble.js +10 -10
- package/d3-chart/lib/cjs/Donut.js +7 -7
- package/d3-chart/lib/cjs/Dots.js +8 -8
- package/d3-chart/lib/cjs/HorizontalBar.js +8 -8
- package/d3-chart/lib/cjs/Hover.js +3 -3
- package/d3-chart/lib/cjs/Line.js +9 -9
- package/d3-chart/lib/cjs/Plot.js +3 -3
- package/d3-chart/lib/cjs/Radar.js +17 -17
- package/d3-chart/lib/cjs/RadialTree.js +10 -10
- package/d3-chart/lib/cjs/ReferenceLine.js +9 -9
- package/d3-chart/lib/cjs/ScatterPlot.js +7 -7
- package/d3-chart/lib/cjs/Tooltip.js +8 -8
- package/d3-chart/lib/cjs/Venn.js +7 -7
- package/d3-chart/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/d3-chart/lib/cjs/a11y/PlotA11yView.js +2 -2
- package/d3-chart/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +15 -15
- package/d3-chart/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/d3-chart/lib/es6/Area.js +9 -9
- package/d3-chart/lib/es6/Axis.js +14 -14
- package/d3-chart/lib/es6/Bar.js +8 -8
- package/d3-chart/lib/es6/Bubble.js +10 -10
- package/d3-chart/lib/es6/Donut.js +7 -7
- package/d3-chart/lib/es6/Dots.js +8 -8
- package/d3-chart/lib/es6/HorizontalBar.js +8 -8
- package/d3-chart/lib/es6/Hover.js +3 -3
- package/d3-chart/lib/es6/Line.js +9 -9
- package/d3-chart/lib/es6/Plot.js +3 -3
- package/d3-chart/lib/es6/Radar.js +17 -17
- package/d3-chart/lib/es6/RadialTree.js +10 -10
- package/d3-chart/lib/es6/ReferenceLine.js +9 -9
- package/d3-chart/lib/es6/ScatterPlot.js +7 -7
- package/d3-chart/lib/es6/Tooltip.js +8 -8
- package/d3-chart/lib/es6/Venn.js +7 -7
- package/d3-chart/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/d3-chart/lib/es6/a11y/PlotA11yView.js +2 -2
- package/d3-chart/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +15 -15
- package/d3-chart/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/data-table/lib/cjs/Body.js +4 -4
- package/data-table/lib/cjs/DataTable.js +41 -41
- package/data-table/lib/cjs/Head.js +4 -4
- package/data-table/lib/es6/Body.js +4 -4
- package/data-table/lib/es6/DataTable.js +41 -41
- package/data-table/lib/es6/Head.js +4 -4
- package/date-picker/lib/cjs/components/ButtonTrigger.js +1 -5
- package/date-picker/lib/cjs/components/ButtonTrigger.js.map +1 -1
- package/date-picker/lib/cjs/components/Calendar.js +21 -21
- package/date-picker/lib/cjs/components/DateRangeComparatorAbstract.js +65 -42
- package/date-picker/lib/cjs/components/DateRangeComparatorAbstract.js.map +1 -1
- package/date-picker/lib/cjs/components/InputTrigger.js +26 -26
- package/date-picker/lib/cjs/components/PickerAbstract.js +80 -72
- package/date-picker/lib/cjs/components/PickerAbstract.js.map +1 -1
- package/date-picker/lib/cjs/components/RangePickerAbstract.js +97 -86
- package/date-picker/lib/cjs/components/RangePickerAbstract.js.map +1 -1
- package/date-picker/lib/es6/components/ButtonTrigger.js +1 -5
- package/date-picker/lib/es6/components/ButtonTrigger.js.map +1 -1
- package/date-picker/lib/es6/components/Calendar.js +21 -21
- package/date-picker/lib/es6/components/DateRangeComparatorAbstract.js +65 -42
- package/date-picker/lib/es6/components/DateRangeComparatorAbstract.js.map +1 -1
- package/date-picker/lib/es6/components/InputTrigger.js +26 -26
- package/date-picker/lib/es6/components/PickerAbstract.js +80 -72
- package/date-picker/lib/es6/components/PickerAbstract.js.map +1 -1
- package/date-picker/lib/es6/components/RangePickerAbstract.js +97 -86
- package/date-picker/lib/es6/components/RangePickerAbstract.js.map +1 -1
- package/divider/lib/cjs/Divider.js +9 -9
- package/divider/lib/es6/Divider.js +9 -9
- package/dot/lib/cjs/Dot.js +10 -10
- package/dot/lib/es6/Dot.js +10 -10
- package/drag-and-drop/lib/cjs/DragAndDrop.js +12 -12
- package/drag-and-drop/lib/es6/DragAndDrop.js +12 -12
- package/dropdown/lib/cjs/Dropdown.js +2 -2
- package/dropdown/lib/es6/Dropdown.js +2 -2
- package/dropdown-menu/lib/cjs/DropdownMenu.js +12 -12
- package/dropdown-menu/lib/cjs/styleScrollArea.js +6 -6
- package/dropdown-menu/lib/es6/DropdownMenu.js +12 -12
- package/dropdown-menu/lib/es6/styleScrollArea.js +6 -6
- package/ellipsis/lib/cjs/Ellipsis.js +10 -10
- package/ellipsis/lib/es6/Ellipsis.js +10 -10
- package/errors/lib/cjs/Error.js +9 -9
- package/errors/lib/es6/Error.js +9 -9
- package/feature-popover/lib/cjs/FeaturePopover.js +10 -10
- package/feature-popover/lib/es6/FeaturePopover.js +10 -10
- package/feedback-form/lib/cjs/FeedbackForm.js +7 -7
- package/feedback-form/lib/es6/FeedbackForm.js +7 -7
- package/flags/lib/cjs/Flags.js +3 -3
- package/flags/lib/cjs/Flags.js.map +1 -1
- package/flags/lib/es6/Flags.js +3 -3
- package/flags/lib/es6/Flags.js.map +1 -1
- package/flags/lib/sprites/sprite@1x.css +256 -256
- package/flags/lib/sprites/sprite@2x.css +257 -257
- package/flex-box/lib/cjs/Box/useBox.js +3 -3
- package/flex-box/lib/cjs/Flex/useFlex.js +3 -3
- package/flex-box/lib/es6/Box/useBox.js +3 -3
- package/flex-box/lib/es6/Flex/useFlex.js +3 -3
- package/format-text/lib/cjs/FormatText.js +5 -5
- package/format-text/lib/es6/FormatText.js +5 -5
- package/fullscreen-modal/lib/cjs/FullscreenModal.js +13 -13
- package/fullscreen-modal/lib/es6/FullscreenModal.js +13 -13
- package/grid/lib/cjs/Grid.js +114 -114
- package/grid/lib/es6/Grid.js +114 -114
- package/icon/color/Confluence/l/index.js +4 -4
- package/icon/color/Confluence/l/index.mjs +4 -4
- package/icon/color/Confluence/m/index.js +4 -4
- package/icon/color/Confluence/m/index.mjs +4 -4
- package/icon/color/MicrosoftOffice/l/index.js +10 -10
- package/icon/color/MicrosoftOffice/l/index.mjs +10 -10
- package/icon/color/MicrosoftOffice/m/index.js +10 -10
- package/icon/color/MicrosoftOffice/m/index.mjs +10 -10
- package/icon/lib/cjs/Icon.js +5 -5
- package/icon/lib/es6/Icon.js +5 -5
- package/icon/pay/Discover/l/index.js +1 -1
- package/icon/pay/Discover/l/index.mjs +1 -1
- package/icon/pay/Discover/m/index.js +1 -1
- package/icon/pay/Discover/m/index.mjs +1 -1
- package/icon/pay/JCB/l/index.js +10 -10
- package/icon/pay/JCB/l/index.mjs +10 -10
- package/icon/pay/JCB/m/index.js +10 -10
- package/icon/pay/JCB/m/index.mjs +10 -10
- package/icon/pay/Visa/l/index.js +2 -2
- package/icon/pay/Visa/l/index.mjs +2 -2
- package/icon/pay/Visa/m/index.js +2 -2
- package/icon/pay/Visa/m/index.mjs +2 -2
- package/illustration/lib/cjs/index.js +1 -1
- package/illustration/lib/cjs/index.js.map +1 -1
- package/illustration/lib/es6/index.js +1 -1
- package/illustration/lib/es6/index.js.map +1 -1
- package/inline-edit/lib/cjs/InlineEdit.js +4 -4
- package/inline-edit/lib/es6/InlineEdit.js +4 -4
- package/inline-input/lib/cjs/InlineInput.js +18 -18
- package/inline-input/lib/es6/InlineInput.js +18 -18
- package/input/lib/cjs/Input.js +17 -17
- package/input/lib/es6/Input.js +17 -17
- package/input-mask/lib/cjs/InputMask.js +6 -6
- package/input-mask/lib/es6/InputMask.js +6 -6
- package/input-number/lib/cjs/InputNumber.js +9 -9
- package/input-number/lib/es6/InputNumber.js +9 -9
- package/input-tags/lib/cjs/InputTags.js +12 -12
- package/input-tags/lib/es6/InputTags.js +12 -12
- package/link/lib/cjs/Link.js +12 -12
- package/link/lib/es6/Link.js +12 -12
- package/mini-chart/component/score/Donut.d.ts +12 -0
- package/mini-chart/component/score/Line.d.ts +15 -0
- package/mini-chart/component/score/Score.d.ts +20 -0
- package/mini-chart/component/score/index.d.ts +3 -0
- package/mini-chart/component/trend/Bar.d.ts +26 -0
- package/mini-chart/component/trend/Line.d.ts +29 -0
- package/mini-chart/component/trend/Trend.d.ts +36 -0
- package/mini-chart/component/trend/index.d.ts +3 -0
- package/mini-chart/index.d.ts +12 -0
- package/mini-chart/index.js +8 -0
- package/mini-chart/index.mjs +2 -0
- package/mini-chart/lib/cjs/component/score/Donut.js +123 -0
- package/mini-chart/lib/cjs/component/score/Donut.js.map +1 -0
- package/mini-chart/lib/cjs/component/score/Line.js +94 -0
- package/mini-chart/lib/cjs/component/score/Line.js.map +1 -0
- package/mini-chart/lib/cjs/component/score/Score.js +2 -0
- package/mini-chart/lib/cjs/component/score/Score.js.map +1 -0
- package/mini-chart/lib/cjs/component/score/donut.shadow.css +17 -0
- package/mini-chart/lib/cjs/component/score/index.js +26 -0
- package/mini-chart/lib/cjs/component/score/index.js.map +1 -0
- package/mini-chart/lib/cjs/component/score/line.shadow.css +66 -0
- package/mini-chart/lib/cjs/component/skeleton/skeleton.shadow.css +24 -0
- package/mini-chart/lib/cjs/component/trend/Bar.js +124 -0
- package/mini-chart/lib/cjs/component/trend/Bar.js.map +1 -0
- package/mini-chart/lib/cjs/component/trend/Line.js +166 -0
- package/mini-chart/lib/cjs/component/trend/Line.js.map +1 -0
- package/mini-chart/lib/cjs/component/trend/Trend.js +87 -0
- package/mini-chart/lib/cjs/component/trend/Trend.js.map +1 -0
- package/mini-chart/lib/cjs/component/trend/index.js +32 -0
- package/mini-chart/lib/cjs/component/trend/index.js.map +1 -0
- package/mini-chart/lib/cjs/index.js +20 -0
- package/mini-chart/lib/cjs/index.js.map +1 -0
- package/mini-chart/lib/es6/component/score/Donut.js +116 -0
- package/mini-chart/lib/es6/component/score/Donut.js.map +1 -0
- package/mini-chart/lib/es6/component/score/Line.js +87 -0
- package/mini-chart/lib/es6/component/score/Line.js.map +1 -0
- package/mini-chart/lib/es6/component/score/Score.js +2 -0
- package/mini-chart/lib/es6/component/score/Score.js.map +1 -0
- package/mini-chart/lib/es6/component/score/donut.shadow.css +17 -0
- package/mini-chart/lib/es6/component/score/index.js +4 -0
- package/mini-chart/lib/es6/component/score/index.js.map +1 -0
- package/mini-chart/lib/es6/component/score/line.shadow.css +66 -0
- package/mini-chart/lib/es6/component/skeleton/skeleton.shadow.css +24 -0
- package/mini-chart/lib/es6/component/trend/Bar.js +116 -0
- package/mini-chart/lib/es6/component/trend/Bar.js.map +1 -0
- package/mini-chart/lib/es6/component/trend/Line.js +158 -0
- package/mini-chart/lib/es6/component/trend/Line.js.map +1 -0
- package/mini-chart/lib/es6/component/trend/Trend.js +79 -0
- package/mini-chart/lib/es6/component/trend/Trend.js.map +1 -0
- package/mini-chart/lib/es6/component/trend/index.js +4 -0
- package/mini-chart/lib/es6/component/trend/index.js.map +1 -0
- package/mini-chart/lib/es6/index.js +13 -0
- package/mini-chart/lib/es6/index.js.map +1 -0
- package/mini-chart/lib/types/component/score/Donut.d.ts +12 -0
- package/mini-chart/lib/types/component/score/Line.d.ts +15 -0
- package/mini-chart/lib/types/component/score/Score.d.ts +20 -0
- package/mini-chart/lib/types/component/score/index.d.ts +3 -0
- package/mini-chart/lib/types/component/trend/Bar.d.ts +26 -0
- package/mini-chart/lib/types/component/trend/Line.d.ts +29 -0
- package/mini-chart/lib/types/component/trend/Trend.d.ts +36 -0
- package/mini-chart/lib/types/component/trend/index.d.ts +3 -0
- package/mini-chart/lib/types/index.d.ts +12 -0
- package/modal/lib/cjs/Modal.js +7 -7
- package/modal/lib/es6/Modal.js +7 -7
- package/notice/lib/cjs/Notice.js +13 -13
- package/notice/lib/es6/Notice.js +13 -13
- package/notice-bubble/lib/cjs/NoticeBubble.js +12 -12
- package/notice-bubble/lib/es6/NoticeBubble.js +12 -12
- package/notice-global/lib/cjs/NoticeGlobal.js +11 -11
- package/notice-global/lib/es6/NoticeGlobal.js +11 -11
- package/package.json +1 -1
- package/pagination/lib/cjs/Pagination.js +10 -10
- package/pagination/lib/es6/Pagination.js +10 -10
- package/pills/lib/cjs/Pills.js +17 -17
- package/pills/lib/es6/Pills.js +17 -17
- package/popper/lib/cjs/Popper.js +6 -6
- package/popper/lib/es6/Popper.js +6 -6
- package/product-head/lib/cjs/Info.js +4 -4
- package/product-head/lib/cjs/ProductHead.js +5 -5
- package/product-head/lib/cjs/Title.js +4 -4
- package/product-head/lib/es6/Info.js +4 -4
- package/product-head/lib/es6/ProductHead.js +5 -5
- package/product-head/lib/es6/Title.js +4 -4
- package/progress-bar/lib/cjs/ProgressBar.js +15 -15
- package/progress-bar/lib/es6/ProgressBar.js +15 -15
- package/radio/lib/cjs/Radio.js +14 -14
- package/radio/lib/es6/Radio.js +14 -14
- package/scroll-area/lib/cjs/ScrollArea.js +9 -9
- package/scroll-area/lib/cjs/ScrollBar.js +5 -5
- package/scroll-area/lib/es6/ScrollArea.js +9 -9
- package/scroll-area/lib/es6/ScrollBar.js +5 -5
- package/select/lib/cjs/InputSearch.js +6 -6
- package/select/lib/cjs/Select.js +7 -7
- package/select/lib/es6/InputSearch.js +6 -6
- package/select/lib/es6/Select.js +7 -7
- package/side-panel/lib/cjs/SidePanel.js +15 -15
- package/side-panel/lib/es6/SidePanel.js +15 -15
- package/skeleton/lib/cjs/Charts/Area.js +9 -9
- package/skeleton/lib/cjs/Charts/Bar.js +9 -9
- package/skeleton/lib/cjs/Charts/Bubble.js +9 -9
- package/skeleton/lib/cjs/Charts/Donut.js +9 -9
- package/skeleton/lib/cjs/Charts/Histogram.js +9 -9
- package/skeleton/lib/cjs/Charts/Line.js +9 -9
- package/skeleton/lib/cjs/Charts/RadialTree.js +9 -9
- package/skeleton/lib/cjs/Charts/ScatterPlot.js +9 -9
- package/skeleton/lib/cjs/Charts/Venn.js +9 -9
- package/skeleton/lib/cjs/Skeleton.js +8 -8
- package/skeleton/lib/es6/Charts/Area.js +9 -9
- package/skeleton/lib/es6/Charts/Bar.js +9 -9
- package/skeleton/lib/es6/Charts/Bubble.js +9 -9
- package/skeleton/lib/es6/Charts/Donut.js +9 -9
- package/skeleton/lib/es6/Charts/Histogram.js +9 -9
- package/skeleton/lib/es6/Charts/Line.js +9 -9
- package/skeleton/lib/es6/Charts/RadialTree.js +9 -9
- package/skeleton/lib/es6/Charts/ScatterPlot.js +9 -9
- package/skeleton/lib/es6/Charts/Venn.js +9 -9
- package/skeleton/lib/es6/Skeleton.js +8 -8
- package/slider/lib/cjs/Slider.js +7 -7
- package/slider/lib/es6/Slider.js +7 -7
- package/spin/lib/cjs/Spin.js +13 -13
- package/spin/lib/es6/Spin.js +13 -13
- package/spin-container/lib/cjs/SpinContainer.js +8 -8
- package/spin-container/lib/es6/SpinContainer.js +8 -8
- package/sticky/lib/cjs/Sticky.js +2 -2
- package/sticky/lib/es6/Sticky.js +2 -2
- package/switch/lib/cjs/Switch.js +21 -21
- package/switch/lib/es6/Switch.js +21 -21
- package/tab-line/lib/cjs/TabLine.js +13 -13
- package/tab-line/lib/es6/TabLine.js +13 -13
- package/tab-panel/lib/cjs/TabPanel.js +8 -8
- package/tab-panel/lib/es6/TabPanel.js +8 -8
- package/tag/lib/cjs/Tag.js +19 -19
- package/tag/lib/es6/Tag.js +19 -19
- package/textarea/lib/cjs/Textarea.js +8 -8
- package/textarea/lib/es6/Textarea.js +8 -8
- package/time-picker/lib/cjs/TimePicker.js +12 -12
- package/time-picker/lib/es6/TimePicker.js +12 -12
- package/tooltip/lib/cjs/Tooltip.js +6 -6
- package/tooltip/lib/es6/Tooltip.js +6 -6
- package/typography/lib/cjs/Blockquote.js +4 -4
- package/typography/lib/cjs/Hint.js +7 -7
- package/typography/lib/cjs/List.js +5 -5
- package/typography/lib/cjs/Text.js +34 -34
- package/typography/lib/es6/Blockquote.js +4 -4
- package/typography/lib/es6/Hint.js +7 -7
- package/typography/lib/es6/List.js +5 -5
- package/typography/lib/es6/Text.js +34 -34
- package/utils/lib/components/invalid-state-pattern/InvalidStatePattern.js +2 -2
- package/utils/lib/components/invalid-state-pattern/InvalidStatePattern.mjs +2 -2
- package/utils/lib/injectStyle.js +1 -1
- package/utils/lib/injectStyle.js.map +1 -1
- package/utils/lib/injectStyle.mjs +1 -1
- package/utils/lib/injectStyle.mjs.map +1 -1
- package/widget-empty/lib/cjs/WidgetEmpty.js +5 -5
- package/widget-empty/lib/es6/WidgetEmpty.js +5 -5
- package/wizard/lib/cjs/Wizard.js +11 -11
- package/wizard/lib/es6/Wizard.js +11 -11
@@ -0,0 +1,20 @@
|
|
1
|
+
export type CommonScoreProps = {
|
2
|
+
/**
|
3
|
+
* Value of score (in percents from 0 to 100) or count of selected segments (for Line with segments)
|
4
|
+
*/
|
5
|
+
value: number;
|
6
|
+
/**
|
7
|
+
* Color of value
|
8
|
+
*/
|
9
|
+
color?: string;
|
10
|
+
/**
|
11
|
+
* Flag to enable skeleton
|
12
|
+
* @default false
|
13
|
+
*/
|
14
|
+
loading?: boolean;
|
15
|
+
/**
|
16
|
+
* Flag to enable animate of charts
|
17
|
+
* @default true
|
18
|
+
*/
|
19
|
+
animate?: boolean;
|
20
|
+
};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { ComponentType } from 'intergalactic/core';
|
2
|
+
import resolveColorEnhance from 'intergalactic/utils/lib/enhances/resolveColorEnhance';
|
3
|
+
import { CommonTrendProps } from './Trend';
|
4
|
+
type BarItem = {
|
5
|
+
/**
|
6
|
+
* Value
|
7
|
+
*/
|
8
|
+
value: number;
|
9
|
+
/**
|
10
|
+
* Color of value
|
11
|
+
*/
|
12
|
+
color?: string;
|
13
|
+
};
|
14
|
+
export type TrendBarProps = CommonTrendProps & {
|
15
|
+
/**
|
16
|
+
* Data to bar chart
|
17
|
+
*/
|
18
|
+
data: BarItem[];
|
19
|
+
};
|
20
|
+
type Enhances = {
|
21
|
+
resolveColor: ReturnType<typeof resolveColorEnhance>;
|
22
|
+
isHistogram?: true;
|
23
|
+
};
|
24
|
+
export declare const TrendBar: ComponentType<TrendBarProps, {}, {}, Enhances>;
|
25
|
+
export declare const TrendHistogram: ComponentType<TrendBarProps, {}, {}, Enhances>;
|
26
|
+
export {};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { ComponentType } from 'intergalactic/core';
|
2
|
+
import resolveColorEnhance from 'intergalactic/utils/lib/enhances/resolveColorEnhance';
|
3
|
+
import { CommonTrendProps } from './Trend';
|
4
|
+
export type TrendLineProps = CommonTrendProps & {
|
5
|
+
/**
|
6
|
+
* List of values
|
7
|
+
*/
|
8
|
+
data: number[];
|
9
|
+
/**
|
10
|
+
* Color of line
|
11
|
+
*/
|
12
|
+
color?: string;
|
13
|
+
/**
|
14
|
+
* Color of last point in chart
|
15
|
+
*/
|
16
|
+
lastPointColor?: string;
|
17
|
+
/**
|
18
|
+
* Radius for last point item
|
19
|
+
*/
|
20
|
+
lastPointRadius?: number;
|
21
|
+
};
|
22
|
+
type Enhances = {
|
23
|
+
uid: string;
|
24
|
+
resolveColor: ReturnType<typeof resolveColorEnhance>;
|
25
|
+
withArea?: true;
|
26
|
+
};
|
27
|
+
export declare const TrendLine: ComponentType<TrendLineProps, {}, {}, Enhances>;
|
28
|
+
export declare const TrendArea: ComponentType<TrendLineProps, {}, {}, Enhances>;
|
29
|
+
export {};
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Component } from 'intergalactic/core';
|
3
|
+
import { BoxProps } from 'intergalactic/flex-box';
|
4
|
+
export type CommonTrendProps = BoxProps & {
|
5
|
+
/**
|
6
|
+
* Flag to enable animate of charts
|
7
|
+
* @default true
|
8
|
+
*/
|
9
|
+
animate?: boolean;
|
10
|
+
/**
|
11
|
+
* Flag to enable skeleton
|
12
|
+
* @default false
|
13
|
+
*/
|
14
|
+
loading?: boolean;
|
15
|
+
/**
|
16
|
+
* Data for chart
|
17
|
+
*/
|
18
|
+
data: any[];
|
19
|
+
};
|
20
|
+
export declare abstract class Trend<P extends CommonTrendProps, E> extends Component<P, {}, {
|
21
|
+
width: number;
|
22
|
+
height: number;
|
23
|
+
}, E> {
|
24
|
+
state: {
|
25
|
+
width: number;
|
26
|
+
height: number;
|
27
|
+
};
|
28
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
29
|
+
componentDidMount(): void;
|
30
|
+
componentDidUpdate(prevProps: P): void;
|
31
|
+
get defaultWidth(): number;
|
32
|
+
get defaultHeight(): number;
|
33
|
+
get svgWidth(): number;
|
34
|
+
get svgHeight(): number;
|
35
|
+
setSizes(): void;
|
36
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { ScoreLine, ScoreDonut, ScoreSemiDonut } from './component/score';
|
2
|
+
import { TrendLine, TrendArea, TrendBar, TrendHistogram } from './component/trend';
|
3
|
+
declare const miniCharts: {
|
4
|
+
TrendLine: typeof TrendLine;
|
5
|
+
TrendArea: typeof TrendArea;
|
6
|
+
TrendBar: typeof TrendBar;
|
7
|
+
TrendHistogram: typeof TrendHistogram;
|
8
|
+
ScoreSemiDonut: typeof ScoreSemiDonut;
|
9
|
+
ScoreDonut: typeof ScoreDonut;
|
10
|
+
ScoreLine: typeof ScoreLine;
|
11
|
+
};
|
12
|
+
export default miniCharts;
|
@@ -0,0 +1,123 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.ScoreSemiDonut = exports.ScoreDonut = void 0;
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
11
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
13
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
15
|
+
var _core = _interopRequireWildcard(require("intergalactic/core"));
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
17
|
+
var _flexBox = require("intergalactic/flex-box");
|
18
|
+
var _resolveColorEnhance = _interopRequireDefault(require("intergalactic/utils/lib/enhances/resolveColorEnhance"));
|
19
|
+
/*__reshadow-styles__:"./donut.shadow.css"*/
|
20
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/"@keyframes pulse_fe5yo{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_fe5yo_gg_.__loading_fe5yo_gg_,.___SLineGauge_fe5yo_gg_.__loading_fe5yo_gg_,.___STrendBar_fe5yo_gg_.__loading_fe5yo_gg_,.___STrendLine_fe5yo_gg_.__loading_fe5yo_gg_{animation-name:pulse_fe5yo;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}.___SDonutContainer_fe5yo_gg_.__semi_fe5yo_gg_ g{transform:rotate(180deg) translate(-24px,-24px)}.___SDonutContainer_fe5yo_gg_ g{transform:rotate(-90deg) translate(-24px)}.___SDonutContainer_fe5yo_gg_.__animate_fe5yo_gg_ circle{transition:all var(--intergalactic-duration-extra-slow, 500) ease-in-out}" /*__inner_css_end__*/, "fe5yo_gg_") /*__reshadow_css_end__*/, {
|
21
|
+
"__SLineGauge": "___SLineGauge_fe5yo_gg_",
|
22
|
+
"_loading": "__loading_fe5yo_gg_",
|
23
|
+
"__SDonutContainer": "___SDonutContainer_fe5yo_gg_",
|
24
|
+
"__STrendLine": "___STrendLine_fe5yo_gg_",
|
25
|
+
"__STrendBar": "___STrendBar_fe5yo_gg_",
|
26
|
+
"@pulse": "pulse_fe5yo",
|
27
|
+
"_animate": "__animate_fe5yo_gg_",
|
28
|
+
"_semi": "__semi_fe5yo_gg_"
|
29
|
+
});
|
30
|
+
var DonutRoot = /*#__PURE__*/function (_Component) {
|
31
|
+
(0, _inherits2["default"])(DonutRoot, _Component);
|
32
|
+
var _super = (0, _createSuper2["default"])(DonutRoot);
|
33
|
+
function DonutRoot() {
|
34
|
+
(0, _classCallCheck2["default"])(this, DonutRoot);
|
35
|
+
return _super.apply(this, arguments);
|
36
|
+
}
|
37
|
+
(0, _createClass2["default"])(DonutRoot, [{
|
38
|
+
key: "render",
|
39
|
+
value: function render() {
|
40
|
+
var _ref = this.asProps,
|
41
|
+
_ref2;
|
42
|
+
var SDonutContainer = _flexBox.Box;
|
43
|
+
var _this$asProps = this.asProps,
|
44
|
+
value = _this$asProps.value,
|
45
|
+
styles = _this$asProps.styles,
|
46
|
+
_this$asProps$color = _this$asProps.color,
|
47
|
+
color = _this$asProps$color === void 0 ? 'chart-palette-order-1' : _this$asProps$color,
|
48
|
+
resolveColor = _this$asProps.resolveColor,
|
49
|
+
isSemiDonut = _this$asProps.isSemiDonut,
|
50
|
+
loading = _this$asProps.loading;
|
51
|
+
var strokeWidth = isSemiDonut ? 6 : 4;
|
52
|
+
var radius = isSemiDonut ? 9 : 10;
|
53
|
+
var baseStrokeDasharray = isSemiDonut ? Math.PI * radius : Math.PI * 2 * radius;
|
54
|
+
var valueStrokeDasharray = baseStrokeDasharray * (value / 100);
|
55
|
+
var greyStrokeDasharray = baseStrokeDasharray * ((100 - value) / 100);
|
56
|
+
var offsetPoint = isSemiDonut ? baseStrokeDasharray / (100 / 3) : baseStrokeDasharray / 100;
|
57
|
+
var strokeDasharrayBetweenSpaces = "".concat(greyStrokeDasharray - 2 * offsetPoint, " ").concat(offsetPoint);
|
58
|
+
var spaceStrokeDasharray = "".concat(offsetPoint, " ").concat(value < 99 ? "".concat(strokeDasharrayBetweenSpaces) : '', " ").concat(baseStrokeDasharray);
|
59
|
+
if (isSemiDonut) {
|
60
|
+
spaceStrokeDasharray = "".concat(offsetPoint, " ").concat(value < 95 ? "".concat(strokeDasharrayBetweenSpaces) : '', " ").concat(baseStrokeDasharray);
|
61
|
+
}
|
62
|
+
var viewBox = isSemiDonut ? '0 0 24 12' : '0 0 24 24';
|
63
|
+
return _ref2 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SDonutContainer, _ref2.cn("SDonutContainer", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
64
|
+
"semi": isSemiDonut
|
65
|
+
}, _ref))), /*#__PURE__*/_react["default"].createElement("svg", _ref2.cn("svg", {
|
66
|
+
"width": '100%',
|
67
|
+
"height": '100%',
|
68
|
+
"viewBox": viewBox,
|
69
|
+
"fill": 'none'
|
70
|
+
}), /*#__PURE__*/_react["default"].createElement("g", _ref2.cn("g", {}), /*#__PURE__*/_react["default"].createElement("circle", _ref2.cn("circle", {
|
71
|
+
"cx": '12',
|
72
|
+
"cy": '12',
|
73
|
+
"r": radius,
|
74
|
+
"strokeWidth": strokeWidth,
|
75
|
+
"stroke": resolveColor('skeleton-bg'),
|
76
|
+
"strokeDasharray": loading ? undefined : "".concat(greyStrokeDasharray, " ").concat(baseStrokeDasharray),
|
77
|
+
"strokeDashoffset": -1 * valueStrokeDasharray
|
78
|
+
})), !loading && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("circle", _ref2.cn("circle", {
|
79
|
+
"cx": '12',
|
80
|
+
"cy": '12',
|
81
|
+
"r": radius,
|
82
|
+
"strokeWidth": strokeWidth,
|
83
|
+
"stroke": resolveColor(color),
|
84
|
+
"strokeDasharray": "".concat(valueStrokeDasharray, " ").concat(baseStrokeDasharray),
|
85
|
+
"strokeDashoffset": valueStrokeDasharray
|
86
|
+
}), /*#__PURE__*/_react["default"].createElement("animate", _ref2.cn("animate", {
|
87
|
+
"attributeName": 'stroke-dashoffset',
|
88
|
+
"values": "0;".concat(valueStrokeDasharray)
|
89
|
+
}))), value !== 100 && /*#__PURE__*/_react["default"].createElement("circle", _ref2.cn("circle", {
|
90
|
+
"cx": '12',
|
91
|
+
"cy": '12',
|
92
|
+
"r": radius,
|
93
|
+
"strokeWidth": strokeWidth,
|
94
|
+
"stroke": resolveColor('chart-grid-border'),
|
95
|
+
"strokeDasharray": spaceStrokeDasharray,
|
96
|
+
"strokeDashoffset": -1 * valueStrokeDasharray
|
97
|
+
}))))));
|
98
|
+
}
|
99
|
+
}]);
|
100
|
+
return DonutRoot;
|
101
|
+
}(_core.Component);
|
102
|
+
(0, _defineProperty2["default"])(DonutRoot, "enhance", [(0, _resolveColorEnhance["default"])()]);
|
103
|
+
(0, _defineProperty2["default"])(DonutRoot, "style", style);
|
104
|
+
(0, _defineProperty2["default"])(DonutRoot, "defaultProps", {
|
105
|
+
animate: true
|
106
|
+
});
|
107
|
+
var ScoreDonut = (0, _core["default"])(DonutRoot);
|
108
|
+
exports.ScoreDonut = ScoreDonut;
|
109
|
+
ScoreDonut.displayName = 'MiniChart.ScoreDonut';
|
110
|
+
var ScoreSemiDonut = (0, _core["default"])(DonutRoot, {}, {
|
111
|
+
enhancements: [function () {
|
112
|
+
return {
|
113
|
+
wrapperProps: function wrapperProps(props) {
|
114
|
+
return (0, _core.assignProps)(props, {
|
115
|
+
isSemiDonut: true
|
116
|
+
});
|
117
|
+
}
|
118
|
+
};
|
119
|
+
}]
|
120
|
+
});
|
121
|
+
exports.ScoreSemiDonut = ScoreSemiDonut;
|
122
|
+
ScoreSemiDonut.displayName = 'MiniChart.ScoreSemiDonut';
|
123
|
+
//# sourceMappingURL=Donut.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Donut.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_flexBox","_resolveColorEnhance","style","sstyled","insert","DonutRoot","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","render","_ref","asProps","_ref2","SDonutContainer","Box","_this$asProps","styles","_this$asProps$color","color","resolveColor","isSemiDonut","loading","strokeWidth","radius","baseStrokeDasharray","Math","PI","valueStrokeDasharray","greyStrokeDasharray","offsetPoint","strokeDasharrayBetweenSpaces","concat","spaceStrokeDasharray","viewBox","createElement","cn","_objectSpread2","assignProps","undefined","Fragment","Component","_defineProperty2","resolveColorEnhance","animate","ScoreDonut","createComponent","exports","displayName","ScoreSemiDonut","enhancements","wrapperProps","props"],"sources":["../../../../src/component/score/Donut.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled, ComponentType } from '@semcore/core';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';\nimport { assignProps } from '@semcore/core';\nimport { CommonScoreProps } from './Score';\n\nimport style from './donut.shadow.css';\n\nexport type ScoreDonutProps = BoxProps & CommonScoreProps;\n\ntype Enhances = {\n resolveColor: ReturnType<typeof resolveColorEnhance>;\n isSemiDonut?: true;\n};\n\nclass DonutRoot extends Component<ScoreDonutProps, {}, {}, Enhances> {\n static enhance = [resolveColorEnhance()];\n\n static style = style;\n\n static defaultProps = {\n animate: true,\n };\n\n render() {\n const SDonutContainer = Root;\n const {\n value,\n styles,\n color = 'chart-palette-order-1',\n resolveColor,\n isSemiDonut,\n loading,\n } = this.asProps;\n\n const strokeWidth = isSemiDonut ? 6 : 4;\n const radius = isSemiDonut ? 9 : 10;\n const baseStrokeDasharray = isSemiDonut ? Math.PI * radius : Math.PI * 2 * radius;\n const valueStrokeDasharray = baseStrokeDasharray * (value / 100);\n const greyStrokeDasharray = baseStrokeDasharray * ((100 - value) / 100);\n const offsetPoint = isSemiDonut ? baseStrokeDasharray / (100 / 3) : baseStrokeDasharray / 100;\n\n const strokeDasharrayBetweenSpaces = `${greyStrokeDasharray - 2 * offsetPoint} ${offsetPoint}`;\n\n let spaceStrokeDasharray = `${offsetPoint} ${\n value < 99 ? `${strokeDasharrayBetweenSpaces}` : ''\n } ${baseStrokeDasharray}`;\n\n if (isSemiDonut) {\n spaceStrokeDasharray = `${offsetPoint} ${\n value < 95 ? `${strokeDasharrayBetweenSpaces}` : ''\n } ${baseStrokeDasharray}`;\n }\n\n const viewBox = isSemiDonut ? '0 0 24 12' : '0 0 24 24';\n\n return sstyled(styles)(\n <SDonutContainer render={Box} semi={isSemiDonut}>\n <svg width='100%' height='100%' viewBox={viewBox} fill='none'>\n <g>\n <circle\n cx='12'\n cy='12'\n r={radius}\n strokeWidth={strokeWidth}\n stroke={resolveColor('skeleton-bg')}\n strokeDasharray={\n loading ? undefined : `${greyStrokeDasharray} ${baseStrokeDasharray}`\n }\n strokeDashoffset={-1 * valueStrokeDasharray}\n />\n {!loading && (\n <>\n <circle\n cx='12'\n cy='12'\n r={radius}\n strokeWidth={strokeWidth}\n stroke={resolveColor(color)}\n strokeDasharray={`${valueStrokeDasharray} ${baseStrokeDasharray}`}\n strokeDashoffset={valueStrokeDasharray}\n >\n <animate\n attributeName={'stroke-dashoffset'}\n values={`0;${valueStrokeDasharray}`}\n />\n </circle>\n {value !== 100 && (\n <circle\n cx='12'\n cy='12'\n r={radius}\n strokeWidth={strokeWidth}\n stroke={resolveColor('chart-grid-border')}\n strokeDasharray={spaceStrokeDasharray}\n strokeDashoffset={-1 * valueStrokeDasharray}\n />\n )}\n </>\n )}\n </g>\n </svg>\n </SDonutContainer>,\n );\n }\n}\n\nexport const ScoreDonut: ComponentType<ScoreDonutProps, {}, {}, Enhances> =\n createComponent(DonutRoot);\n\nScoreDonut.displayName = 'MiniChart.ScoreDonut';\n\nexport const ScoreSemiDonut: ComponentType<ScoreDonutProps, {}, {}, Enhances> = createComponent(\n DonutRoot,\n {},\n {\n enhancements: [\n () => {\n return {\n wrapperProps: (props: ScoreDonutProps) => {\n return assignProps(props, { isSemiDonut: true });\n },\n };\n },\n ],\n },\n);\n\nScoreSemiDonut.displayName = 'MiniChart.ScoreSemiDonut';\n"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAAkF;AAAA,IAAAK,KAAA,+BAAAP,KAAA,CAAAQ,OAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAa5EC,SAAS,0BAAAC,UAAA;EAAA,IAAAC,UAAA,aAAAF,SAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,SAAA;EAAA,SAAAA,UAAA;IAAA,IAAAK,gBAAA,mBAAAL,SAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAA,IAAAC,aAAA,aAAAR,SAAA;IAAAS,GAAA;IAAAC,KAAA,EASb,SAAAC,OAAA,EAAS;MAAA,IAAAC,IAAA,QAAAC,OAAA;QAAAC,KAAA;MACP,IAAMC,eAAe,GAgCMC,YAAG;MA/B9B,IAAAC,aAAA,GAOI,IAAI,CAACJ,OAAO;QANdH,KAAK,GAAAO,aAAA,CAALP,KAAK;QACLQ,MAAM,GAAAD,aAAA,CAANC,MAAM;QAAAC,mBAAA,GAAAF,aAAA,CACNG,KAAK;QAALA,KAAK,GAAAD,mBAAA,cAAG,uBAAuB,GAAAA,mBAAA;QAC/BE,YAAY,GAAAJ,aAAA,CAAZI,YAAY;QACZC,W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AmB,CAAC;QAAA,mBACxBa,oBAAoB;QAAA,oBACnB,CAAC,CAAC,GAAGL;MAAoB,GAE9C,CAEJ,CACC,CACA,CACU;IAEtB;EAAC;EAAA,OAAA7B,SAAA;AAAA,EAzFqB0C,eAAS;AAAA,IAAAC,gBAAA,aAA3B3C,SAAS,aACI,CAAC,IAAA4C,+BAAmB,GAAE,CAAC;AAAA,IAAAD,gBAAA,aADpC3C,SAAS,WAGEH,KAAK;AAAA,IAAA8C,gBAAA,aAHhB3C,SAAS,kBAKS;EACpB6C,OAAO,EAAE;AACX,CAAC;AAqFI,IAAMC,UAA4D,GACvE,IAAAC,gBAAe,EAAC/C,SAAS,CAAC;AAACgD,OAAA,CAAAF,UAAA,GAAAA,UAAA;AAE7BA,UAAU,CAACG,WAAW,GAAG,sBAAsB;AAExC,IAAMC,cAAgE,GAAG,IAAAH,gBAAe,EAC7F/C,SAAS,EACT,CAAC,CAAC,EACF;EACEmD,YAAY,EAAE,CACZ,YAAM;IACJ,OAAO;MACLC,YAAY,EAAE,SAAAA,aAACC,KAAsB,EAAK;QACxC,OAAO,IAAAd,iBAAW,EAACc,KAAK,EAAE;UAAE/B,WAAW,EAAE;QAAK,CAAC,CAAC;MAClD;IACF,CAAC;EACH,CAAC;AAEL,CAAC,CACF;AAAC0B,OAAA,CAAAE,cAAA,GAAAA,cAAA;AAEFA,cAAc,CAACD,WAAW,GAAG,0BAA0B"}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.ScoreLine = void 0;
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
11
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
13
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
15
|
+
var _core = _interopRequireWildcard(require("intergalactic/core"));
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
17
|
+
var _flexBox = require("intergalactic/flex-box");
|
18
|
+
var _resolveColorEnhance = _interopRequireDefault(require("intergalactic/utils/lib/enhances/resolveColorEnhance"));
|
19
|
+
/*__reshadow-styles__:"./line.shadow.css"*/
|
20
|
+
var style = ( /*__reshadow_css_start__*/_core.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__*/, {
|
21
|
+
"__SLineGauge": "___SLineGauge_5kfd2_gg_",
|
22
|
+
"_loading": "__loading_5kfd2_gg_",
|
23
|
+
"__SDonutContainer": "___SDonutContainer_5kfd2_gg_",
|
24
|
+
"__STrendLine": "___STrendLine_5kfd2_gg_",
|
25
|
+
"__STrendBar": "___STrendBar_5kfd2_gg_",
|
26
|
+
"@pulse": "pulse_5kfd2",
|
27
|
+
"_animate": "__animate_5kfd2_gg_",
|
28
|
+
"__SLineValue": "___SLineValue_5kfd2_gg_",
|
29
|
+
"_percent": "__percent_5kfd2_gg_",
|
30
|
+
"--percent": "--percent_5kfd2",
|
31
|
+
"_color": "__color_5kfd2_gg_",
|
32
|
+
"--color": "--color_5kfd2",
|
33
|
+
"_segments": "__segments_5kfd2_gg_",
|
34
|
+
"__SLineGaugeSegment": "___SLineGaugeSegment_5kfd2_gg_",
|
35
|
+
"__SLineSegmentItem": "___SLineSegmentItem_5kfd2_gg_",
|
36
|
+
"@move-line": "move-line_5kfd2"
|
37
|
+
});
|
38
|
+
var LineRoot = /*#__PURE__*/function (_Component) {
|
39
|
+
(0, _inherits2["default"])(LineRoot, _Component);
|
40
|
+
var _super = (0, _createSuper2["default"])(LineRoot);
|
41
|
+
function LineRoot() {
|
42
|
+
(0, _classCallCheck2["default"])(this, LineRoot);
|
43
|
+
return _super.apply(this, arguments);
|
44
|
+
}
|
45
|
+
(0, _createClass2["default"])(LineRoot, [{
|
46
|
+
key: "render",
|
47
|
+
value: function render() {
|
48
|
+
var _ref = this.asProps,
|
49
|
+
_ref3;
|
50
|
+
var SLineGauge = _flexBox.Box;
|
51
|
+
var SLineValue = _flexBox.Box;
|
52
|
+
var SLineGaugeSegment = _flexBox.Flex;
|
53
|
+
var SLineSegmentItem = _flexBox.Box;
|
54
|
+
var _this$asProps = this.asProps,
|
55
|
+
value = _this$asProps.value,
|
56
|
+
styles = _this$asProps.styles,
|
57
|
+
_this$asProps$color = _this$asProps.color,
|
58
|
+
color = _this$asProps$color === void 0 ? 'chart-palette-order-1' : _this$asProps$color,
|
59
|
+
resolveColor = _this$asProps.resolveColor,
|
60
|
+
segments = _this$asProps.segments,
|
61
|
+
loading = _this$asProps.loading;
|
62
|
+
var SegmentItems = [];
|
63
|
+
if (segments) {
|
64
|
+
for (var i = 0; i < segments; i++) {
|
65
|
+
var _ref2;
|
66
|
+
var width = "calc((100% - ".concat(segments - 1, "px) / ").concat(segments, ")");
|
67
|
+
SegmentItems.push((_ref2 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SLineSegmentItem, _ref2.cn("SLineSegmentItem", {
|
68
|
+
"key": i,
|
69
|
+
"color": i < value ? resolveColor(color) : undefined,
|
70
|
+
"w": width
|
71
|
+
}))));
|
72
|
+
}
|
73
|
+
}
|
74
|
+
var percent = "".concat(value, "%");
|
75
|
+
if (segments) {
|
76
|
+
percent = "".concat(value / segments * 100, "%");
|
77
|
+
}
|
78
|
+
return _ref3 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SLineGauge, _ref3.cn("SLineGauge", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({}, _ref))), !loading && /*#__PURE__*/_react["default"].createElement(SLineValue, _ref3.cn("SLineValue", {
|
79
|
+
"w": percent,
|
80
|
+
"color": resolveColor(color)
|
81
|
+
})), Boolean(SegmentItems.length) && /*#__PURE__*/_react["default"].createElement(SLineGaugeSegment, _ref3.cn("SLineGaugeSegment", {}), SegmentItems));
|
82
|
+
}
|
83
|
+
}]);
|
84
|
+
return LineRoot;
|
85
|
+
}(_core.Component);
|
86
|
+
(0, _defineProperty2["default"])(LineRoot, "enhance", [(0, _resolveColorEnhance["default"])()]);
|
87
|
+
(0, _defineProperty2["default"])(LineRoot, "style", style);
|
88
|
+
(0, _defineProperty2["default"])(LineRoot, "defaultProps", {
|
89
|
+
animate: true
|
90
|
+
});
|
91
|
+
var ScoreLine = (0, _core["default"])(LineRoot);
|
92
|
+
exports.ScoreLine = ScoreLine;
|
93
|
+
ScoreLine.displayName = 'MiniChart.ScoreLine';
|
94
|
+
//# sourceMappingURL=Line.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Line.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_flexBox","_resolveColorEnhance","style","sstyled","insert","LineRoot","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","render","_ref","asProps","_ref3","SLineGauge","Box","SLineValue","SLineGaugeSegment","Flex","SLineSegmentItem","_this$asProps","styles","_this$asProps$color","color","resolveColor","segments","loading","SegmentItems","i","_ref2","width","concat","push","createElement","cn","undefined","percent","_objectSpread2","assignProps","Boolean","length","Component","_defineProperty2","resolveColorEnhance","animate","ScoreLine","createComponent","exports","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":";;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAAkF;AAAA,IAAAK,KAAA,+BAAAP,KAAA,CAAAQ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/C,QAAQ,CAAC;AAACgD,OAAA,CAAAF,SAAA,GAAAA,SAAA;AAE5BA,SAAS,CAACG,WAAW,GAAG,qBAAqB"}
|
@@ -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,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
Object.defineProperty(exports, "ScoreDonut", {
|
7
|
+
enumerable: true,
|
8
|
+
get: function get() {
|
9
|
+
return _Donut.ScoreDonut;
|
10
|
+
}
|
11
|
+
});
|
12
|
+
Object.defineProperty(exports, "ScoreLine", {
|
13
|
+
enumerable: true,
|
14
|
+
get: function get() {
|
15
|
+
return _Line.ScoreLine;
|
16
|
+
}
|
17
|
+
});
|
18
|
+
Object.defineProperty(exports, "ScoreSemiDonut", {
|
19
|
+
enumerable: true,
|
20
|
+
get: function get() {
|
21
|
+
return _Donut.ScoreSemiDonut;
|
22
|
+
}
|
23
|
+
});
|
24
|
+
var _Donut = require("./Donut");
|
25
|
+
var _Line = require("./Line");
|
26
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Donut","require","_Line"],"sources":["../../../../src/component/score/index.ts"],"sourcesContent":["import { ScoreDonut, ScoreSemiDonut } from './Donut';\nimport { ScoreLine } from './Line';\n\nexport { ScoreDonut, ScoreSemiDonut, ScoreLine };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA"}
|
@@ -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
|
+
}
|