intergalactic 15.95.0 → 15.96.0-prerelease.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/accordion/lib/cjs/Accordion.js +7 -7
- package/accordion/lib/es6/Accordion.js +7 -7
- 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 +8 -8
- package/breadcrumbs/lib/es6/Breadcrumbs.js +8 -8
- 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 +19 -19
- package/carousel/lib/es6/Carousel.js +19 -19
- package/checkbox/lib/cjs/Checkbox.js +18 -18
- package/checkbox/lib/es6/Checkbox.js +18 -18
- 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 -73
- package/counter/index.d.ts +14 -1
- package/counter/lib/cjs/AnimatedNumber.js.map +1 -1
- package/counter/lib/cjs/Counter.js +15 -11
- package/counter/lib/cjs/Counter.js.map +1 -1
- package/counter/lib/cjs/index.d.js.map +1 -1
- package/counter/lib/cjs/style/counter.shadow.css +6 -3
- package/counter/lib/es6/AnimatedNumber.js.map +1 -1
- package/counter/lib/es6/Counter.js +15 -11
- package/counter/lib/es6/Counter.js.map +1 -1
- package/counter/lib/es6/index.d.js.map +1 -1
- package/counter/lib/es6/style/counter.shadow.css +6 -3
- package/counter/lib/types/index.d.ts +14 -1
- package/d3-chart/lib/cjs/Area.js +11 -11
- package/d3-chart/lib/cjs/Axis.js +14 -14
- package/d3-chart/lib/cjs/Bar.js +10 -10
- package/d3-chart/lib/cjs/Bubble.js +12 -12
- package/d3-chart/lib/cjs/Donut.js +9 -9
- package/d3-chart/lib/cjs/Dots.js +8 -8
- package/d3-chart/lib/cjs/HorizontalBar.js +10 -10
- 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 +19 -19
- package/d3-chart/lib/cjs/RadialTree.js +11 -11
- package/d3-chart/lib/cjs/Reference.js +12 -12
- package/d3-chart/lib/cjs/ScatterPlot.js +9 -9
- package/d3-chart/lib/cjs/Tooltip.js +9 -9
- package/d3-chart/lib/cjs/Venn.js +9 -9
- 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 +17 -17
- package/d3-chart/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/d3-chart/lib/es6/Area.js +11 -11
- package/d3-chart/lib/es6/Axis.js +14 -14
- package/d3-chart/lib/es6/Bar.js +10 -10
- package/d3-chart/lib/es6/Bubble.js +12 -12
- package/d3-chart/lib/es6/Donut.js +9 -9
- package/d3-chart/lib/es6/Dots.js +8 -8
- package/d3-chart/lib/es6/HorizontalBar.js +10 -10
- 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 +19 -19
- package/d3-chart/lib/es6/RadialTree.js +11 -11
- package/d3-chart/lib/es6/Reference.js +12 -12
- package/d3-chart/lib/es6/ScatterPlot.js +9 -9
- package/d3-chart/lib/es6/Tooltip.js +9 -9
- package/d3-chart/lib/es6/Venn.js +9 -9
- 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 +17 -17
- package/d3-chart/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/data-table/Body.d.ts +2 -0
- package/data-table/lib/cjs/Body.js +11 -2
- package/data-table/lib/cjs/Body.js.map +1 -1
- package/data-table/lib/cjs/DataTable.js +37 -37
- package/data-table/lib/es6/Body.js +11 -2
- package/data-table/lib/es6/Body.js.map +1 -1
- package/data-table/lib/es6/DataTable.js +37 -37
- package/data-table/lib/types/Body.d.ts +2 -0
- package/date-picker/lib/cjs/components/Calendar.js +21 -21
- package/date-picker/lib/cjs/components/DateRangeComparatorAbstract.js +29 -29
- package/date-picker/lib/cjs/components/InputTrigger.js +51 -35
- package/date-picker/lib/cjs/components/InputTrigger.js.map +1 -1
- package/date-picker/lib/cjs/components/PickerAbstract.js +32 -30
- package/date-picker/lib/cjs/components/PickerAbstract.js.map +1 -1
- package/date-picker/lib/cjs/components/RangePickerAbstract.js +32 -30
- package/date-picker/lib/cjs/components/RangePickerAbstract.js.map +1 -1
- package/date-picker/lib/es6/components/Calendar.js +21 -21
- package/date-picker/lib/es6/components/DateRangeComparatorAbstract.js +29 -29
- package/date-picker/lib/es6/components/InputTrigger.js +51 -35
- package/date-picker/lib/es6/components/InputTrigger.js.map +1 -1
- package/date-picker/lib/es6/components/PickerAbstract.js +32 -30
- package/date-picker/lib/es6/components/PickerAbstract.js.map +1 -1
- package/date-picker/lib/es6/components/RangePickerAbstract.js +32 -30
- 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 +16 -16
- package/drag-and-drop/lib/es6/DragAndDrop.js +16 -16
- package/dropdown/lib/cjs/Dropdown.js +2 -2
- package/dropdown/lib/es6/Dropdown.js +2 -2
- package/dropdown-menu/lib/cjs/DropdownMenu.js +16 -16
- package/dropdown-menu/lib/cjs/styleScrollArea.js +6 -6
- package/dropdown-menu/lib/es6/DropdownMenu.js +16 -16
- 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/cjs/style/feature-popover.shadow.css +1 -1
- package/feature-popover/lib/es6/FeaturePopover.js +10 -10
- package/feature-popover/lib/es6/style/feature-popover.shadow.css +1 -1
- package/feedback-form/lib/cjs/FeedbackForm.js +7 -7
- package/feedback-form/lib/cjs/component/checkbox-button/CheckboxButton.js +3 -3
- package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.js +2 -2
- package/feedback-form/lib/cjs/component/slider-rating/SliderRating.js +6 -6
- package/feedback-form/lib/es6/FeedbackForm.js +7 -7
- package/feedback-form/lib/es6/component/checkbox-button/CheckboxButton.js +3 -3
- package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.js +2 -2
- package/feedback-form/lib/es6/component/slider-rating/SliderRating.js +6 -6
- package/flags/lib/cjs/Flags.js +3 -3
- package/flags/lib/es6/Flags.js +3 -3
- 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/cjs/invalid-state-box/InvalidStateBox.js +2 -2
- package/flex-box/lib/es6/Box/useBox.js +3 -3
- package/flex-box/lib/es6/Flex/useFlex.js +3 -3
- package/flex-box/lib/es6/invalid-state-box/InvalidStateBox.js +2 -2
- 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/es6/index.js +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 +14 -14
- package/inline-input/lib/es6/InlineInput.js +14 -14
- 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/lib/cjs/component/score/Donut.js +9 -9
- package/mini-chart/lib/cjs/component/score/Line.js +17 -17
- package/mini-chart/lib/cjs/component/trend/Bar.js +7 -7
- package/mini-chart/lib/cjs/component/trend/Line.js +7 -7
- package/mini-chart/lib/es6/component/score/Donut.js +9 -9
- package/mini-chart/lib/es6/component/score/Line.js +17 -17
- package/mini-chart/lib/es6/component/trend/Bar.js +7 -7
- package/mini-chart/lib/es6/component/trend/Line.js +7 -7
- package/modal/lib/cjs/Modal.js +9 -9
- package/modal/lib/es6/Modal.js +9 -9
- package/notice/index.d.ts +1 -1
- package/notice/lib/cjs/Notice.js +13 -13
- package/notice/lib/cjs/index.d.js.map +1 -1
- package/notice/lib/es6/Notice.js +13 -13
- package/notice/lib/es6/index.d.js.map +1 -1
- package/notice/lib/types/index.d.ts +1 -1
- package/notice-bubble/lib/cjs/NoticeBubble.js +12 -12
- package/notice-bubble/lib/es6/NoticeBubble.js +12 -12
- package/notice-global/index.d.ts +1 -1
- package/notice-global/lib/cjs/NoticeGlobal.js +14 -12
- package/notice-global/lib/cjs/NoticeGlobal.js.map +1 -1
- package/notice-global/lib/cjs/index.d.js.map +1 -1
- package/notice-global/lib/es6/NoticeGlobal.js +14 -12
- package/notice-global/lib/es6/NoticeGlobal.js.map +1 -1
- package/notice-global/lib/es6/index.d.js.map +1 -1
- package/notice-global/lib/types/index.d.ts +1 -1
- 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 +13 -13
- package/pills/lib/es6/Pills.js +13 -13
- 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 +16 -16
- package/radio/lib/es6/Radio.js +16 -16
- package/scroll-area/lib/cjs/ScrollArea.js +21 -21
- package/scroll-area/lib/cjs/ScrollBar.js +6 -6
- package/scroll-area/lib/es6/ScrollArea.js +21 -21
- package/scroll-area/lib/es6/ScrollBar.js +6 -6
- package/select/lib/cjs/InputSearch.js +6 -6
- package/select/lib/cjs/Select.js +8 -8
- package/select/lib/es6/InputSearch.js +6 -6
- package/select/lib/es6/Select.js +8 -8
- 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 +8 -8
- package/slider/lib/es6/Slider.js +8 -8
- 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 +20 -20
- package/tag/lib/es6/Tag.js +20 -20
- 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 +8 -8
- package/tooltip/lib/es6/Tooltip.js +8 -8
- 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.mjs +1 -1
- package/utils/lib/themes/auto.css +2 -9
- package/utils/lib/themes/default.css +2 -9
- package/utils/lib/themes/default.json +1 -1
- package/utils/lib/themes/light.css +2 -9
- package/utils/lib/themes/light.json +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
@@ -14,29 +14,29 @@ import Input from 'intergalactic/input';
|
|
14
14
|
import CheckM from 'intergalactic/icon/Check/m';
|
15
15
|
import CloseM from 'intergalactic/icon/Close/m';
|
16
16
|
/*__reshadow-styles__:"../style/color-picker.shadow.css"*/
|
17
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
18
|
-
"__SColorPickerPopper": "
|
19
|
-
"__SItemContainer": "
|
20
|
-
"__SCloseIcon": "
|
21
|
-
"_keyboardFocused": "
|
22
|
-
"_selected": "
|
23
|
-
"__SColors": "
|
24
|
-
"__SPaletteManager": "
|
25
|
-
"__SInputContainer": "
|
26
|
-
"__SDefaultTrigger": "
|
27
|
-
"__STriggerCircle": "
|
28
|
-
"--data-value": "--data-
|
29
|
-
"__STriggerCircleLine": "
|
30
|
-
"__SLine": "
|
31
|
-
"__SLabel": "
|
32
|
-
"__SItemColor": "
|
33
|
-
"__SConfirmColor": "
|
34
|
-
"_hidden": "
|
35
|
-
"__SClearConfirm": "
|
36
|
-
"--value": "--
|
37
|
-
"_displayLabel": "
|
38
|
-
"_value": "
|
39
|
-
"__SPlusButton": "
|
17
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SColorPickerPopper_17fpg_gg_{max-width:calc(var(--intergalactic-spacing-4x, 16px)*2 + 28px*6 + 4px*6);padding:var(--intergalactic-spacing-4x, 16px)}.___SItemContainer_17fpg_gg_{position:relative;display:flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;border:1px solid transparent;outline:0;cursor:pointer}@media (hover:hover){.___SItemContainer_17fpg_gg_:hover{border:1px solid var(--intergalactic-border-secondary, #e0e1e9)}}.___SItemContainer_17fpg_gg_::after{content:\"\";position:absolute;width:22px;height:22px;border-radius:50%;box-shadow:inset 0 0 1px var(--intergalactic-border-secondary, #e0e1e9);background:var(--value_17fpg)}@media (hover:hover){.___SItemContainer_17fpg_gg_:hover>.___SCloseIcon_17fpg_gg_{opacity:1}}.___SItemContainer_17fpg_gg_.__keyboardFocused_17fpg_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SItemContainer_17fpg_gg_.__selected_17fpg_gg_{border:1px solid var(--intergalactic-border-info-active, #006dca)}.___SItemContainer_17fpg_gg_.__displayLabel_17fpg_gg_::after{background:var(--value_17fpg);opacity:.15}.___SItemContainer_17fpg_gg_:not(.__value_17fpg_gg_)::after{border:.9px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SColors_17fpg_gg_{display:flex;flex-wrap:wrap;align-items:center;gap:var(--intergalactic-spacing-1x, 4px)}.___SPaletteManager_17fpg_gg_{justify-content:space-between;margin-top:var(--intergalactic-spacing-3x, 12px);margin-left:calc(var(--intergalactic-spacing-1x, 4px) - 1px)}.___SInputContainer_17fpg_gg_,.___SPaletteManager_17fpg_gg_,.___SPlusButton_17fpg_gg_{display:flex;align-items:center}.___SPlusButton_17fpg_gg_{justify-content:center;width:28px;height:28px;border-radius:50%;cursor:pointer}@media (hover:hover){.___SPlusButton_17fpg_gg_:hover{background-color:var(--intergalactic-bg-secondary-neutral-hover, #e0e1e9)}}.___SDefaultTrigger_17fpg_gg_{display:inline-flex;align-items:center;outline:0;cursor:pointer;border:0;background:0 0;padding:0}.___SDefaultTrigger_17fpg_gg_.__keyboardFocused_17fpg_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___STriggerCircle_17fpg_gg_{position:relative;width:12px;height:12px;margin-right:calc(var(--intergalactic-spacing-1x, 4px) + 1px);border-radius:50%;background-color:var(--data-value_17fpg);border:1px solid transparent}.___STriggerCircle_17fpg_gg_:not([data-value]){border:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___STriggerCircleLine_17fpg_gg_{position:absolute;top:1px;left:1px}.___SCloseIcon_17fpg_gg_{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;width:12px;height:12px;border-radius:50%;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);opacity:0;z-index:1}.___SLine_17fpg_gg_{position:absolute}.___SLabel_17fpg_gg_{z-index:1;color:var(--data-value_17fpg);font-size:calc(var(--intergalactic-fs-100, 12px) + 1px);font-weight:var(--intergalactic-bold, 700)}.___SItemColor_17fpg_gg_{width:20px;height:20px;border-radius:50%;border:1px solid var(--intergalactic-border-secondary, #e0e1e9);background:var(--data-value_17fpg)}.___SClearConfirm_17fpg_gg_.__hidden_17fpg_gg_,.___SConfirmColor_17fpg_gg_.__hidden_17fpg_gg_{display:none}" /*__inner_css_end__*/, "17fpg_gg_") /*__reshadow_css_end__*/, {
|
18
|
+
"__SColorPickerPopper": "___SColorPickerPopper_17fpg_gg_",
|
19
|
+
"__SItemContainer": "___SItemContainer_17fpg_gg_",
|
20
|
+
"__SCloseIcon": "___SCloseIcon_17fpg_gg_",
|
21
|
+
"_keyboardFocused": "__keyboardFocused_17fpg_gg_",
|
22
|
+
"_selected": "__selected_17fpg_gg_",
|
23
|
+
"__SColors": "___SColors_17fpg_gg_",
|
24
|
+
"__SPaletteManager": "___SPaletteManager_17fpg_gg_",
|
25
|
+
"__SInputContainer": "___SInputContainer_17fpg_gg_",
|
26
|
+
"__SDefaultTrigger": "___SDefaultTrigger_17fpg_gg_",
|
27
|
+
"__STriggerCircle": "___STriggerCircle_17fpg_gg_",
|
28
|
+
"--data-value": "--data-value_17fpg",
|
29
|
+
"__STriggerCircleLine": "___STriggerCircleLine_17fpg_gg_",
|
30
|
+
"__SLine": "___SLine_17fpg_gg_",
|
31
|
+
"__SLabel": "___SLabel_17fpg_gg_",
|
32
|
+
"__SItemColor": "___SItemColor_17fpg_gg_",
|
33
|
+
"__SConfirmColor": "___SConfirmColor_17fpg_gg_",
|
34
|
+
"_hidden": "__hidden_17fpg_gg_",
|
35
|
+
"__SClearConfirm": "___SClearConfirm_17fpg_gg_",
|
36
|
+
"--value": "--value_17fpg",
|
37
|
+
"_displayLabel": "__displayLabel_17fpg_gg_",
|
38
|
+
"_value": "__value_17fpg_gg_",
|
39
|
+
"__SPlusButton": "___SPlusButton_17fpg_gg_"
|
40
40
|
});
|
41
41
|
function isValidHex(hex) {
|
42
42
|
if (hex[0] !== '#' && hex.length === 7) return false;
|
package/components.json
CHANGED
@@ -1,77 +1,77 @@
|
|
1
1
|
{
|
2
|
-
"@semcore/accordion": "5.
|
3
|
-
"@semcore/animation": "2.
|
4
|
-
"@semcore/badge": "4.
|
5
|
-
"@semcore/base-trigger": "4.
|
6
|
-
"@semcore/breadcrumbs": "5.
|
7
|
-
"@semcore/breakpoints": "1.
|
8
|
-
"@semcore/button": "5.
|
9
|
-
"@semcore/card": "5.
|
10
|
-
"@semcore/carousel": "3.
|
11
|
-
"@semcore/checkbox": "7.
|
12
|
-
"@semcore/color-picker": "2.
|
13
|
-
"@semcore/core": "2.
|
14
|
-
"@semcore/counter": "3.26.
|
15
|
-
"@semcore/data-table": "4.40.
|
16
|
-
"@semcore/date-picker": "4.46.
|
17
|
-
"@semcore/divider": "4.
|
18
|
-
"@semcore/dot": "5.
|
19
|
-
"@semcore/drag-and-drop": "3.
|
20
|
-
"@semcore/dropdown": "4.
|
21
|
-
"@semcore/dropdown-menu": "4.
|
22
|
-
"@semcore/d3-chart": "3.
|
23
|
-
"@semcore/ellipsis": "2.
|
2
|
+
"@semcore/accordion": "5.35.0",
|
3
|
+
"@semcore/animation": "2.28.0",
|
4
|
+
"@semcore/badge": "4.27.0",
|
5
|
+
"@semcore/base-trigger": "4.38.0",
|
6
|
+
"@semcore/breadcrumbs": "5.34.0",
|
7
|
+
"@semcore/breakpoints": "1.28.0",
|
8
|
+
"@semcore/button": "5.30.0",
|
9
|
+
"@semcore/card": "5.36.0",
|
10
|
+
"@semcore/carousel": "3.38.0",
|
11
|
+
"@semcore/checkbox": "7.31.0",
|
12
|
+
"@semcore/color-picker": "2.35.0",
|
13
|
+
"@semcore/core": "2.26.0",
|
14
|
+
"@semcore/counter": "3.26.3",
|
15
|
+
"@semcore/data-table": "4.40.3",
|
16
|
+
"@semcore/date-picker": "4.46.5",
|
17
|
+
"@semcore/divider": "4.27.0",
|
18
|
+
"@semcore/dot": "5.27.0",
|
19
|
+
"@semcore/drag-and-drop": "3.37.0",
|
20
|
+
"@semcore/dropdown": "4.32.0",
|
21
|
+
"@semcore/dropdown-menu": "4.34.0",
|
22
|
+
"@semcore/d3-chart": "3.47.0",
|
23
|
+
"@semcore/ellipsis": "2.29.0",
|
24
24
|
"@semcore/email": "1.0.2",
|
25
|
-
"@semcore/errors": "4.
|
26
|
-
"@semcore/feature-popover": "4.
|
27
|
-
"@semcore/feedback-form": "6.29.
|
28
|
-
"@semcore/flags": "4.
|
29
|
-
"@semcore/flex-box": "5.
|
30
|
-
"@semcore/format-text": "4.
|
31
|
-
"@semcore/fullscreen-modal": "3.
|
32
|
-
"@semcore/grid": "5.
|
33
|
-
"@semcore/icon": "4.
|
34
|
-
"@semcore/illustration": "2.
|
35
|
-
"@semcore/inline-input": "4.
|
36
|
-
"@semcore/inline-edit": "4.
|
37
|
-
"@semcore/input": "4.
|
38
|
-
"@semcore/input-mask": "5.
|
39
|
-
"@semcore/input-number": "5.
|
40
|
-
"@semcore/input-tags": "4.
|
41
|
-
"@semcore/link": "5.
|
42
|
-
"@semcore/mini-chart": "0.
|
43
|
-
"@semcore/modal": "4.
|
44
|
-
"@semcore/neighbor-location": "4.
|
45
|
-
"@semcore/notice": "5.34.
|
46
|
-
"@semcore/notice-global": "2.44.
|
47
|
-
"@semcore/notice-bubble": "5.
|
48
|
-
"@semcore/outside-click": "3.
|
49
|
-
"@semcore/pagination": "4.
|
50
|
-
"@semcore/pills": "5.
|
51
|
-
"@semcore/popper": "5.
|
52
|
-
"@semcore/portal": "3.
|
53
|
-
"@semcore/product-head": "4.
|
54
|
-
"@semcore/progress-bar": "4.
|
55
|
-
"@semcore/radio": "6.
|
56
|
-
"@semcore/scroll-area": "5.
|
57
|
-
"@semcore/select": "4.
|
58
|
-
"@semcore/side-panel": "3.
|
59
|
-
"@semcore/skeleton": "5.
|
60
|
-
"@semcore/slider": "4.
|
61
|
-
"@semcore/spin": "5.
|
62
|
-
"@semcore/spin-container": "7.
|
63
|
-
"@semcore/sticky": "3.
|
64
|
-
"@semcore/switch": "5.
|
65
|
-
"@semcore/tab-line": "4.
|
66
|
-
"@semcore/tab-panel": "4.
|
67
|
-
"@semcore/tag": "5.
|
68
|
-
"@semcore/textarea": "5.
|
69
|
-
"@semcore/time-picker": "4.
|
70
|
-
"@semcore/tooltip": "6.
|
71
|
-
"@semcore/typography": "5.
|
72
|
-
"@semcore/utils": "4.
|
73
|
-
"@semcore/widget-empty": "4.
|
74
|
-
"@semcore/wizard": "2.
|
75
|
-
"@semcore/i18n-unplugin": "0.17.
|
25
|
+
"@semcore/errors": "4.34.0",
|
26
|
+
"@semcore/feature-popover": "4.39.0",
|
27
|
+
"@semcore/feedback-form": "6.29.5",
|
28
|
+
"@semcore/flags": "4.27.0",
|
29
|
+
"@semcore/flex-box": "5.28.0",
|
30
|
+
"@semcore/format-text": "4.28.0",
|
31
|
+
"@semcore/fullscreen-modal": "3.38.0",
|
32
|
+
"@semcore/grid": "5.27.0",
|
33
|
+
"@semcore/icon": "4.38.0",
|
34
|
+
"@semcore/illustration": "2.28.0",
|
35
|
+
"@semcore/inline-input": "4.36.0",
|
36
|
+
"@semcore/inline-edit": "4.30.0",
|
37
|
+
"@semcore/input": "4.29.0",
|
38
|
+
"@semcore/input-mask": "5.30.0",
|
39
|
+
"@semcore/input-number": "5.30.0",
|
40
|
+
"@semcore/input-tags": "4.33.0",
|
41
|
+
"@semcore/link": "5.32.0",
|
42
|
+
"@semcore/mini-chart": "0.14.0",
|
43
|
+
"@semcore/modal": "4.38.0",
|
44
|
+
"@semcore/neighbor-location": "4.26.0",
|
45
|
+
"@semcore/notice": "5.34.3",
|
46
|
+
"@semcore/notice-global": "2.44.3",
|
47
|
+
"@semcore/notice-bubble": "5.35.0",
|
48
|
+
"@semcore/outside-click": "3.26.0",
|
49
|
+
"@semcore/pagination": "4.38.0",
|
50
|
+
"@semcore/pills": "5.29.0",
|
51
|
+
"@semcore/popper": "5.36.0",
|
52
|
+
"@semcore/portal": "3.28.0",
|
53
|
+
"@semcore/product-head": "4.28.0",
|
54
|
+
"@semcore/progress-bar": "4.27.0",
|
55
|
+
"@semcore/radio": "6.30.0",
|
56
|
+
"@semcore/scroll-area": "5.31.0",
|
57
|
+
"@semcore/select": "4.44.0",
|
58
|
+
"@semcore/side-panel": "3.36.0",
|
59
|
+
"@semcore/skeleton": "5.28.0",
|
60
|
+
"@semcore/slider": "4.27.0",
|
61
|
+
"@semcore/spin": "5.27.0",
|
62
|
+
"@semcore/spin-container": "7.28.0",
|
63
|
+
"@semcore/sticky": "3.27.0",
|
64
|
+
"@semcore/switch": "5.29.0",
|
65
|
+
"@semcore/tab-line": "4.27.0",
|
66
|
+
"@semcore/tab-panel": "4.29.0",
|
67
|
+
"@semcore/tag": "5.37.0",
|
68
|
+
"@semcore/textarea": "5.27.0",
|
69
|
+
"@semcore/time-picker": "4.44.0",
|
70
|
+
"@semcore/tooltip": "6.35.0",
|
71
|
+
"@semcore/typography": "5.36.0",
|
72
|
+
"@semcore/utils": "4.29.0",
|
73
|
+
"@semcore/widget-empty": "4.29.0",
|
74
|
+
"@semcore/wizard": "2.38.0",
|
75
|
+
"@semcore/i18n-unplugin": "0.17.23",
|
76
76
|
"@semcore/stylelint-plugin": "0.0.1"
|
77
77
|
}
|
package/counter/index.d.ts
CHANGED
@@ -5,7 +5,7 @@ import { BoxProps } from 'intergalactic/flex-box';
|
|
5
5
|
export interface ICounterProps extends CounterProps, UnknownProperties {}
|
6
6
|
export type CounterProps = BoxProps & {
|
7
7
|
/** Counter theme or custom color */
|
8
|
-
theme?: 'warning' | 'danger' | string;
|
8
|
+
theme?: 'warning' | 'danger' | 'info' | string;
|
9
9
|
|
10
10
|
/** Counter size
|
11
11
|
* @default m */
|
@@ -21,9 +21,22 @@ export type AnimatedNumberBaseProps = {
|
|
21
21
|
easing?: (t: number) => number;
|
22
22
|
/** Stringify number, receives a fraction value */
|
23
23
|
formatValue?: (value: number) => string;
|
24
|
+
/**
|
25
|
+
* Duration time in ms
|
26
|
+
* @default 200
|
27
|
+
* */
|
24
28
|
duration?: number;
|
29
|
+
/**
|
30
|
+
* Delay before animation in ms
|
31
|
+
* @default 0
|
32
|
+
* */
|
25
33
|
delay?: number;
|
34
|
+
/**
|
35
|
+
* The value from which to start the animation
|
36
|
+
* @default 0
|
37
|
+
* */
|
26
38
|
initValue?: number;
|
39
|
+
/** The value by which to end the animation */
|
27
40
|
value: number;
|
28
41
|
};
|
29
42
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AnimatedNumber.js","names":["_react","_interopRequireDefault","require","_useCssVariable","_useEnhancedEffect","_excluded","easeInOutSine","t","Math","cos","PI","defaultFormatValue","value","toFixed","AnimatedNumber","props","_props$tag","ref","React","useRef","defaultDurationStr","useCssVariable","defaultDuration","useMemo","parseInt","_props$easing","easing","_props$formatValue","formatValue","_props$duration","duration","_props$delay","delay","_props$initValue","initValue","restProps","_objectWithoutProperties2","Tag","tag","animationRef","animationStart","animationFrame","fromValue","toValue","handleNextAnimationFrame","useCallback","current","Date","now","valueBase","valueDiff","diffFraction","innerText","requestAnimationFrame","useEnhancedEffect","cancelAnimationFrame","createElement","_extends2","exports"],"sources":["../../src/AnimatedNumber.tsx"],"sourcesContent":["import React from 'react';\nimport { useCssVariable } from '@semcore/utils/lib/useCssVariable';\nimport useEnhancedEffect from '@semcore/utils/lib/use/useEnhancedEffect';\nimport { Intergalactic } from '@semcore/core';\
|
1
|
+
{"version":3,"file":"AnimatedNumber.js","names":["_react","_interopRequireDefault","require","_useCssVariable","_useEnhancedEffect","_excluded","easeInOutSine","t","Math","cos","PI","defaultFormatValue","value","toFixed","AnimatedNumber","props","_props$tag","ref","React","useRef","defaultDurationStr","useCssVariable","defaultDuration","useMemo","parseInt","_props$easing","easing","_props$formatValue","formatValue","_props$duration","duration","_props$delay","delay","_props$initValue","initValue","restProps","_objectWithoutProperties2","Tag","tag","animationRef","animationStart","animationFrame","fromValue","toValue","handleNextAnimationFrame","useCallback","current","Date","now","valueBase","valueDiff","diffFraction","innerText","requestAnimationFrame","useEnhancedEffect","cancelAnimationFrame","createElement","_extends2","exports"],"sources":["../../src/AnimatedNumber.tsx"],"sourcesContent":["import React from 'react';\nimport { useCssVariable } from '@semcore/utils/lib/useCssVariable';\nimport useEnhancedEffect from '@semcore/utils/lib/use/useEnhancedEffect';\nimport { Intergalactic } from '@semcore/core';\nimport { AnimatedNumberBaseProps } from './index';\n\nconst easeInOutSine = (t: number) => -(Math.cos(Math.PI * t) - 1) / 2;\nconst defaultFormatValue = (value: number) => value.toFixed(2);\n\nexport const AnimatedNumber = ((props) => {\n const ref = React.useRef<HTMLElement>(null);\n const defaultDurationStr = useCssVariable('--intergalactic-duration-counter', '200', ref);\n const defaultDuration = React.useMemo(\n () => parseInt(defaultDurationStr, 10),\n [defaultDurationStr],\n );\n const {\n easing = easeInOutSine,\n formatValue = defaultFormatValue,\n duration = defaultDuration,\n delay = 0,\n initValue = 0,\n value,\n ...restProps\n } = props;\n const Tag: any = props.tag ?? 'div';\n const animationRef = React.useRef({\n animationStart: -1,\n animationFrame: -1,\n fromValue: initValue,\n toValue: value,\n });\n const handleNextAnimationFrame = React.useCallback(() => {\n if (!ref.current) return;\n if (Date.now() - animationRef.current.animationStart > delay) {\n const valueBase = animationRef.current.fromValue;\n const valueDiff = animationRef.current.toValue - animationRef.current.fromValue;\n const diffFraction = easing(\n (Date.now() - animationRef.current.animationStart - delay) / duration,\n );\n const value = valueBase + valueDiff * diffFraction;\n ref.current.innerText = formatValue(value);\n }\n if (Date.now() - animationRef.current.animationStart - delay >= duration) {\n ref.current.innerText = formatValue(animationRef.current.toValue);\n animationRef.current.fromValue = animationRef.current.toValue;\n return;\n }\n animationRef.current.animationFrame = requestAnimationFrame(handleNextAnimationFrame);\n }, [easing, formatValue, duration, delay]);\n useEnhancedEffect(() => {\n ref.current!.innerText = formatValue(animationRef.current.fromValue);\n animationRef.current.toValue = value;\n animationRef.current.animationStart = Date.now();\n handleNextAnimationFrame();\n return () => cancelAnimationFrame(animationRef.current.animationFrame);\n }, [handleNextAnimationFrame, value]);\n\n return (\n <Tag ref={ref} {...restProps}>\n {formatValue(value)}\n </Tag>\n );\n}) as Intergalactic.Component<'div', AnimatedNumberBaseProps>;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAH,sBAA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Y,CAACO,OAAO,CAACH,OAAO;MAC7D;IACF;IACAJ,YAAY,CAACO,OAAO,CAACL,cAAc,GAAGY,qBAAqB,CAACT,wBAAwB,CAAC;EACvF,CAAC,EAAE,CAAClB,MAAM,EAAEE,WAAW,EAAEE,QAAQ,EAAEE,KAAK,CAAC,CAAC;EAC1C,IAAAsB,6BAAiB,EAAC,YAAM;IACtBrC,GAAG,CAAC6B,OAAO,CAAEM,SAAS,GAAGxB,WAAW,CAACW,YAAY,CAACO,OAAO,CAACJ,SAAS,CAAC;IACpEH,YAAY,CAACO,OAAO,CAACH,OAAO,GAAG/B,KAAK;IACpC2B,YAAY,CAACO,OAAO,CAACN,cAAc,GAAGO,IAAI,CAACC,GAAG,EAAE;IAChDJ,wBAAwB,EAAE;IAC1B,OAAO;MAAA,OAAMW,oBAAoB,CAAChB,YAAY,CAACO,OAAO,CAACL,cAAc,CAAC;IAAA;EACxE,CAAC,EAAE,CAACG,wBAAwB,EAAEhC,KAAK,CAAC,CAAC;EAErC,oBACEZ,MAAA,YAAAwD,aAAA,CAACnB,GAAG,MAAAoB,SAAA;IAACxC,GAAG,EAAEA;EAAI,GAAKkB,SAAS,GACzBP,WAAW,CAAChB,KAAK,CAAC,CACf;AAEV,CAA6D;AAAC8C,OAAA,CAAA5C,cAAA,GAAAA,cAAA"}
|
@@ -31,17 +31,21 @@ Object.keys(_AnimatedNumber).forEach(function (key) {
|
|
31
31
|
});
|
32
32
|
});
|
33
33
|
/*__reshadow-styles__:"./style/counter.shadow.css"*/
|
34
|
-
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".
|
35
|
-
"__SCounter": "
|
36
|
-
"_size_m": "
|
37
|
-
"_size_l": "
|
38
|
-
"_size_xl": "
|
39
|
-
"_theme": "
|
40
|
-
"--theme": "--
|
41
|
-
"__SText": "
|
42
|
-
"
|
43
|
-
"
|
34
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SCounter_13ed1_gg_{display:inline-flex;align-items:center;justify-content:center;line-height:normal;box-sizing:border-box;vertical-align:middle;border-radius:var(--intergalactic-counter-rounded, 12px);font-weight:var(--intergalactic-medium, 500);color:var(--intergalactic-text-secondary, #6c6e79);background-color:var(--intergalactic-bg-primary-neutral, #ffffff);border:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SCounter_13ed1_gg_._size_m_13ed1_gg_{height:16px;min-width:16px;font-size:var(--intergalactic-fs-50, 10px);padding:var(--intergalactic-spacing-1x, 4px)}.___SCounter_13ed1_gg_._size_l_13ed1_gg_,.___SCounter_13ed1_gg_._size_xl_13ed1_gg_{padding:var(--intergalactic-spacing-05x, 2px) calc(var(--intergalactic-spacing-05x, 2px) + var(--intergalactic-spacing-1x, 4px))}.___SCounter_13ed1_gg_._size_l_13ed1_gg_{height:20px;min-width:20px;font-size:var(--intergalactic-fs-100, 12px)}.___SCounter_13ed1_gg_._size_xl_13ed1_gg_{height:24px;min-width:24px;font-size:var(--intergalactic-fs-200, 14px)}.___SCounter_13ed1_gg_.__theme_13ed1_gg_{border-color:transparent;position:relative;background:var(--theme_13ed1);color:var(--theme_13ed1)}.___SCounter_13ed1_gg_.__theme_13ed1_gg_ .___SText_13ed1_gg_{filter:invert(1) saturate(0) contrast(10) brightness(10)}.___SText_13ed1_gg_{display:inline}.___SCounter_13ed1_gg_._theme_info_13ed1_gg_{border-color:transparent;background:var(--intergalactic-bg-primary-info, #008ff8)}.___SCounter_13ed1_gg_._theme_warning_13ed1_gg_{border-color:transparent;background:var(--intergalactic-bg-primary-warning, #ff642d)}.___SCounter_13ed1_gg_._theme_danger_13ed1_gg_{border-color:transparent;background:var(--intergalactic-bg-primary-critical, #ff4953)}" /*__inner_css_end__*/, "13ed1_gg_") /*__reshadow_css_end__*/, {
|
35
|
+
"__SCounter": "___SCounter_13ed1_gg_",
|
36
|
+
"_size_m": "_size_m_13ed1_gg_",
|
37
|
+
"_size_l": "_size_l_13ed1_gg_",
|
38
|
+
"_size_xl": "_size_xl_13ed1_gg_",
|
39
|
+
"_theme": "__theme_13ed1_gg_",
|
40
|
+
"--theme": "--theme_13ed1",
|
41
|
+
"__SText": "___SText_13ed1_gg_",
|
42
|
+
"_theme_info": "_theme_info_13ed1_gg_",
|
43
|
+
"_theme_warning": "_theme_warning_13ed1_gg_",
|
44
|
+
"_theme_danger": "_theme_danger_13ed1_gg_"
|
44
45
|
});
|
46
|
+
var enhance = {
|
47
|
+
resolveColor: (0, _resolveColorEnhance["default"])()
|
48
|
+
};
|
45
49
|
var Counter = /*#__PURE__*/function (_Component) {
|
46
50
|
(0, _inherits2["default"])(Counter, _Component);
|
47
51
|
var _super = (0, _createSuper2["default"])(Counter);
|
@@ -70,7 +74,7 @@ var Counter = /*#__PURE__*/function (_Component) {
|
|
70
74
|
return Counter;
|
71
75
|
}(_core.Component);
|
72
76
|
(0, _defineProperty2["default"])(Counter, "displayName", 'Counter');
|
73
|
-
(0, _defineProperty2["default"])(Counter, "enhance",
|
77
|
+
(0, _defineProperty2["default"])(Counter, "enhance", Object.values(enhance));
|
74
78
|
(0, _defineProperty2["default"])(Counter, "style", style);
|
75
79
|
(0, _defineProperty2["default"])(Counter, "defaultProps", {
|
76
80
|
size: 'm'
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Counter.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_flexBox","_resolveColorEnhance","_AnimatedNumber","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","style","_index","sstyled","insert","Counter","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","value","render","_ref","asProps","_ref2","SCounter","Box","SText","_this$asProps","styles","theme","
|
1
|
+
{"version":3,"file":"Counter.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_flexBox","_resolveColorEnhance","_AnimatedNumber","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","style","_index","sstyled","insert","enhance","resolveColor","resolveColorEnhance","Counter","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","value","render","_ref","asProps","_ref2","SCounter","Box","SText","_this$asProps","styles","theme","Children","colorBG","createElement","cn","_objectSpread2","assignProps","Component","_defineProperty2","values","size","_default","createComponent"],"sources":["../../src/Counter.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';\n\nimport style from './style/counter.shadow.css';\nimport { CounterProps } from './index';\n\nconst enhance = {\n resolveColor: resolveColorEnhance(),\n};\n\nclass Counter extends Component<CounterProps, {}, {}, typeof enhance> {\n static displayName = 'Counter';\n static enhance = Object.values(enhance);\n\n static style = style;\n\n static defaultProps = {\n size: 'm',\n };\n\n render() {\n const SCounter = Root;\n const SText = 'span';\n const { styles, theme, resolveColor, Children } = this.asProps;\n\n const colorBG = resolveColor(theme);\n\n return sstyled(styles)(\n <SCounter render={Box} use:theme={colorBG}>\n <SText>\n <Children />\n </SText>\n </SCounter>,\n );\n }\n}\n\nexport default createComponent(Counter);\nexport * from './AnimatedNumber';\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;AAqCA,IAAAK,eAAA,GAAAL,OAAA;AAAAM,MAAA,CAAAC,IAAA,CAAAF,eAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA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AoD,WAAA;QAAA,aAAyBJ;MAAO,GAAAV,IAAA,kBACvCnC,MAAA,YAAA8C,aAAA,CAACN,KAAK,EAAAH,KAAA,CAAAU,EAAA,4BACJ/C,MAAA,YAAA8C,aAAA,CAACF,QAAQ,EAAAP,KAAA,CAAAU,EAAA,iBAAG,CACN,CACC;IAEf;EAAC;EAAA,OAAAvB,OAAA;AAAA,EAxBmB0B,eAAS;AAAA,IAAAC,gBAAA,aAAzB3B,OAAO,iBACU,SAAS;AAAA,IAAA2B,gBAAA,aAD1B3B,OAAO,aAEMnB,MAAM,CAAC+C,MAAM,CAAC/B,OAAO,CAAC;AAAA,IAAA8B,gBAAA,aAFnC3B,OAAO,WAIIP,KAAK;AAAA,IAAAkC,gBAAA,aAJhB3B,OAAO,kBAMW;EACpB6B,IAAI,EAAE;AACR,CAAC;AAAA,IAAAC,QAAA,GAmBY,IAAAC,gBAAe,EAAC/B,OAAO,CAAC;AAAAX,OAAA,cAAAyC,QAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface ICounterProps extends CounterProps, UnknownProperties {}\nexport type CounterProps = BoxProps & {\n /** Counter theme or custom color */\n theme?: 'warning' | 'danger' | string;\n\n /** Counter size\n * @default m */\n size?: 'm' | 'l' | 'xl';\n};\n\ndeclare const Counter: Intergalactic.Component<'div', CounterProps>;\n\n/** @deprecated */\nexport interface IAnimatedNumberBaseProps extends AnimatedNumberBaseProps, UnknownProperties {}\nexport type AnimatedNumberBaseProps = {\n /** Animates number change, receives value between 0 and 1 and returns value in range from 0 to 1, e.g. for linear easing pass (t) => t */\n easing?: (t: number) => number;\n /** Stringify number, receives a fraction value */\n formatValue?: (value: number) => string;\n duration?: number;\n delay?: number;\n initValue?: number;\n value: number;\n};\n\nexport declare const AnimatedNumber: Intergalactic.Component<'div', AnimatedNumberBaseProps>;\n\nexport default Counter;\n"],"mappings":""}
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface ICounterProps extends CounterProps, UnknownProperties {}\nexport type CounterProps = BoxProps & {\n /** Counter theme or custom color */\n theme?: 'warning' | 'danger' | 'info' | string;\n\n /** Counter size\n * @default m */\n size?: 'm' | 'l' | 'xl';\n};\n\ndeclare const Counter: Intergalactic.Component<'div', CounterProps>;\n\n/** @deprecated */\nexport interface IAnimatedNumberBaseProps extends AnimatedNumberBaseProps, UnknownProperties {}\nexport type AnimatedNumberBaseProps = {\n /** Animates number change, receives value between 0 and 1 and returns value in range from 0 to 1, e.g. for linear easing pass (t) => t */\n easing?: (t: number) => number;\n /** Stringify number, receives a fraction value */\n formatValue?: (value: number) => string;\n /**\n * Duration time in ms\n * @default 200\n * */\n duration?: number;\n /**\n * Delay before animation in ms\n * @default 0\n * */\n delay?: number;\n /**\n * The value from which to start the animation\n * @default 0\n * */\n initValue?: number;\n /** The value by which to end the animation */\n value: number;\n};\n\nexport declare const AnimatedNumber: Intergalactic.Component<'div', AnimatedNumberBaseProps>;\n\nexport default Counter;\n"],"mappings":""}
|
@@ -49,14 +49,17 @@ SText {
|
|
49
49
|
display: inline;
|
50
50
|
}
|
51
51
|
|
52
|
+
SCounter[theme='info'] {
|
53
|
+
border-color: transparent;
|
54
|
+
background: var(--intergalactic-bg-primary-info, #008ff8);
|
55
|
+
}
|
56
|
+
|
52
57
|
SCounter[theme='warning'] {
|
53
58
|
border-color: transparent;
|
54
59
|
background: var(--intergalactic-bg-primary-warning, #ff642d);
|
55
|
-
color: var(--intergalactic-text-primary-invert, #ffffff);
|
56
60
|
}
|
57
61
|
|
58
62
|
SCounter[theme='danger'] {
|
59
63
|
border-color: transparent;
|
60
64
|
background: var(--intergalactic-bg-primary-critical, #ff4953);
|
61
|
-
|
62
|
-
}
|
65
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AnimatedNumber.js","names":["React","useCssVariable","useEnhancedEffect","easeInOutSine","t","Math","cos","PI","defaultFormatValue","value","toFixed","AnimatedNumber","props","_props$tag","ref","useRef","defaultDurationStr","defaultDuration","useMemo","parseInt","_props$easing","easing","_props$formatValue","formatValue","_props$duration","duration","_props$delay","delay","_props$initValue","initValue","restProps","_objectWithoutProperties","_excluded","Tag","tag","animationRef","animationStart","animationFrame","fromValue","toValue","handleNextAnimationFrame","useCallback","current","Date","now","valueBase","valueDiff","diffFraction","innerText","requestAnimationFrame","cancelAnimationFrame","createElement","_extends"],"sources":["../../src/AnimatedNumber.tsx"],"sourcesContent":["import React from 'react';\nimport { useCssVariable } from '@semcore/utils/lib/useCssVariable';\nimport useEnhancedEffect from '@semcore/utils/lib/use/useEnhancedEffect';\nimport { Intergalactic } from '@semcore/core';\
|
1
|
+
{"version":3,"file":"AnimatedNumber.js","names":["React","useCssVariable","useEnhancedEffect","easeInOutSine","t","Math","cos","PI","defaultFormatValue","value","toFixed","AnimatedNumber","props","_props$tag","ref","useRef","defaultDurationStr","defaultDuration","useMemo","parseInt","_props$easing","easing","_props$formatValue","formatValue","_props$duration","duration","_props$delay","delay","_props$initValue","initValue","restProps","_objectWithoutProperties","_excluded","Tag","tag","animationRef","animationStart","animationFrame","fromValue","toValue","handleNextAnimationFrame","useCallback","current","Date","now","valueBase","valueDiff","diffFraction","innerText","requestAnimationFrame","cancelAnimationFrame","createElement","_extends"],"sources":["../../src/AnimatedNumber.tsx"],"sourcesContent":["import React from 'react';\nimport { useCssVariable } from '@semcore/utils/lib/useCssVariable';\nimport useEnhancedEffect from '@semcore/utils/lib/use/useEnhancedEffect';\nimport { Intergalactic } from '@semcore/core';\nimport { AnimatedNumberBaseProps } from './index';\n\nconst easeInOutSine = (t: number) => -(Math.cos(Math.PI * t) - 1) / 2;\nconst defaultFormatValue = (value: number) => value.toFixed(2);\n\nexport const AnimatedNumber = ((props) => {\n const ref = React.useRef<HTMLElement>(null);\n const defaultDurationStr = useCssVariable('--intergalactic-duration-counter', '200', ref);\n const defaultDuration = React.useMemo(\n () => parseInt(defaultDurationStr, 10),\n [defaultDurationStr],\n );\n const {\n easing = easeInOutSine,\n formatValue = defaultFormatValue,\n duration = defaultDuration,\n delay = 0,\n initValue = 0,\n value,\n ...restProps\n } = props;\n const Tag: any = props.tag ?? 'div';\n const animationRef = React.useRef({\n animationStart: -1,\n animationFrame: -1,\n fromValue: initValue,\n toValue: value,\n });\n const handleNextAnimationFrame = React.useCallback(() => {\n if (!ref.current) return;\n if (Date.now() - animationRef.current.animationStart > delay) {\n const valueBase = animationRef.current.fromValue;\n const valueDiff = animationRef.current.toValue - animationRef.current.fromValue;\n const diffFraction = easing(\n (Date.now() - animationRef.current.animationStart - delay) / duration,\n );\n const value = valueBase + valueDiff * diffFraction;\n ref.current.innerText = formatValue(value);\n }\n if (Date.now() - animationRef.current.animationStart - delay >= duration) {\n ref.current.innerText = formatValue(animationRef.current.toValue);\n animationRef.current.fromValue = animationRef.current.toValue;\n return;\n }\n animationRef.current.animationFrame = requestAnimationFrame(handleNextAnimationFrame);\n }, [easing, formatValue, duration, delay]);\n useEnhancedEffect(() => {\n ref.current!.innerText = formatValue(animationRef.current.fromValue);\n animationRef.current.toValue = value;\n animationRef.current.animationStart = Date.now();\n handleNextAnimationFrame();\n return () => cancelAnimationFrame(animationRef.current.animationFrame);\n }, [handleNextAnimationFrame, value]);\n\n return (\n <Tag ref={ref} {...restProps}>\n {formatValue(value)}\n </Tag>\n );\n}) as Intergalactic.Component<'div', AnimatedNumberBaseProps>;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,mCAAmC;AAClE,OAAOC,iBAAiB,MAAM,0CAA0C;AAIxE,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,CAAS;EAA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;EACvF,CAAC,EAAE,CAACnB,MAAM,EAAEE,WAAW,EAAEE,QAAQ,EAAEE,KAAK,CAAC,CAAC;EAC1CzB,iBAAiB,CAAC,YAAM;IACtBY,GAAG,CAAC4B,OAAO,CAAEM,SAAS,GAAGzB,WAAW,CAACY,YAAY,CAACO,OAAO,CAACJ,SAAS,CAAC;IACpEH,YAAY,CAACO,OAAO,CAACH,OAAO,GAAG9B,KAAK;IACpC0B,YAAY,CAACO,OAAO,CAACN,cAAc,GAAGO,IAAI,CAACC,GAAG,EAAE;IAChDJ,wBAAwB,EAAE;IAC1B,OAAO;MAAA,OAAMU,oBAAoB,CAACf,YAAY,CAACO,OAAO,CAACL,cAAc,CAAC;IAAA;EACxE,CAAC,EAAE,CAACG,wBAAwB,EAAE/B,KAAK,CAAC,CAAC;EAErC,oBACET,KAAA,CAAAmD,aAAA,CAAClB,GAAG,EAAAmB,QAAA;IAACtC,GAAG,EAAEA;EAAI,GAAKgB,SAAS,GACzBP,WAAW,CAACd,KAAK,CAAC,CACf;AAEV,CAA6D"}
|
@@ -11,17 +11,21 @@ import createComponent, { Component, sstyled, Root } from 'intergalactic/core';
|
|
11
11
|
import { Box } from 'intergalactic/flex-box';
|
12
12
|
import resolveColorEnhance from 'intergalactic/utils/lib/enhances/resolveColorEnhance';
|
13
13
|
/*__reshadow-styles__:"./style/counter.shadow.css"*/
|
14
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
15
|
-
"__SCounter": "
|
16
|
-
"_size_m": "
|
17
|
-
"_size_l": "
|
18
|
-
"_size_xl": "
|
19
|
-
"_theme": "
|
20
|
-
"--theme": "--
|
21
|
-
"__SText": "
|
22
|
-
"
|
23
|
-
"
|
14
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SCounter_13ed1_gg_{display:inline-flex;align-items:center;justify-content:center;line-height:normal;box-sizing:border-box;vertical-align:middle;border-radius:var(--intergalactic-counter-rounded, 12px);font-weight:var(--intergalactic-medium, 500);color:var(--intergalactic-text-secondary, #6c6e79);background-color:var(--intergalactic-bg-primary-neutral, #ffffff);border:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SCounter_13ed1_gg_._size_m_13ed1_gg_{height:16px;min-width:16px;font-size:var(--intergalactic-fs-50, 10px);padding:var(--intergalactic-spacing-1x, 4px)}.___SCounter_13ed1_gg_._size_l_13ed1_gg_,.___SCounter_13ed1_gg_._size_xl_13ed1_gg_{padding:var(--intergalactic-spacing-05x, 2px) calc(var(--intergalactic-spacing-05x, 2px) + var(--intergalactic-spacing-1x, 4px))}.___SCounter_13ed1_gg_._size_l_13ed1_gg_{height:20px;min-width:20px;font-size:var(--intergalactic-fs-100, 12px)}.___SCounter_13ed1_gg_._size_xl_13ed1_gg_{height:24px;min-width:24px;font-size:var(--intergalactic-fs-200, 14px)}.___SCounter_13ed1_gg_.__theme_13ed1_gg_{border-color:transparent;position:relative;background:var(--theme_13ed1);color:var(--theme_13ed1)}.___SCounter_13ed1_gg_.__theme_13ed1_gg_ .___SText_13ed1_gg_{filter:invert(1) saturate(0) contrast(10) brightness(10)}.___SText_13ed1_gg_{display:inline}.___SCounter_13ed1_gg_._theme_info_13ed1_gg_{border-color:transparent;background:var(--intergalactic-bg-primary-info, #008ff8)}.___SCounter_13ed1_gg_._theme_warning_13ed1_gg_{border-color:transparent;background:var(--intergalactic-bg-primary-warning, #ff642d)}.___SCounter_13ed1_gg_._theme_danger_13ed1_gg_{border-color:transparent;background:var(--intergalactic-bg-primary-critical, #ff4953)}" /*__inner_css_end__*/, "13ed1_gg_") /*__reshadow_css_end__*/, {
|
15
|
+
"__SCounter": "___SCounter_13ed1_gg_",
|
16
|
+
"_size_m": "_size_m_13ed1_gg_",
|
17
|
+
"_size_l": "_size_l_13ed1_gg_",
|
18
|
+
"_size_xl": "_size_xl_13ed1_gg_",
|
19
|
+
"_theme": "__theme_13ed1_gg_",
|
20
|
+
"--theme": "--theme_13ed1",
|
21
|
+
"__SText": "___SText_13ed1_gg_",
|
22
|
+
"_theme_info": "_theme_info_13ed1_gg_",
|
23
|
+
"_theme_warning": "_theme_warning_13ed1_gg_",
|
24
|
+
"_theme_danger": "_theme_danger_13ed1_gg_"
|
24
25
|
});
|
26
|
+
var enhance = {
|
27
|
+
resolveColor: resolveColorEnhance()
|
28
|
+
};
|
25
29
|
var Counter = /*#__PURE__*/function (_Component) {
|
26
30
|
_inherits(Counter, _Component);
|
27
31
|
var _super = _createSuper(Counter);
|
@@ -50,7 +54,7 @@ var Counter = /*#__PURE__*/function (_Component) {
|
|
50
54
|
return Counter;
|
51
55
|
}(Component);
|
52
56
|
_defineProperty(Counter, "displayName", 'Counter');
|
53
|
-
_defineProperty(Counter, "enhance",
|
57
|
+
_defineProperty(Counter, "enhance", Object.values(enhance));
|
54
58
|
_defineProperty(Counter, "style", style);
|
55
59
|
_defineProperty(Counter, "defaultProps", {
|
56
60
|
size: 'm'
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Counter.js","names":["React","createComponent","Component","sstyled","Root","Box","resolveColorEnhance","style","_sstyled","insert","Counter","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_ref2","SCounter","SText","_this$asProps","styles","theme","
|
1
|
+
{"version":3,"file":"Counter.js","names":["React","createComponent","Component","sstyled","Root","Box","resolveColorEnhance","style","_sstyled","insert","enhance","resolveColor","Counter","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_ref2","SCounter","SText","_this$asProps","styles","theme","Children","colorBG","createElement","cn","_objectSpread","_assignProps","_defineProperty","Object","values","size"],"sources":["../../src/Counter.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';\n\nimport style from './style/counter.shadow.css';\nimport { CounterProps } from './index';\n\nconst enhance = {\n resolveColor: resolveColorEnhance(),\n};\n\nclass Counter extends Component<CounterProps, {}, {}, typeof enhance> {\n static displayName = 'Counter';\n static enhance = Object.values(enhance);\n\n static style = style;\n\n static defaultProps = {\n size: 'm',\n };\n\n render() {\n const SCounter = Root;\n const SText = 'span';\n const { styles, theme, resolveColor, Children } = this.asProps;\n\n const colorBG = resolveColor(theme);\n\n return sstyled(styles)(\n <SCounter render={Box} use:theme={colorBG}>\n <SText>\n <Children />\n </SText>\n </SCounter>,\n );\n }\n}\n\nexport default createComponent(Counter);\nexport * from './AnimatedNumber';\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,SAASC,GAAG,QAAQ,mBAAmB;AACvC,OAAOC,mBAAmB,MAAM,iDAAiD;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAKlF,IAAMC,OAAO,GAAG;EACdC,YAAY,EAAEL,mBAAmB;AACnC,CAAC;AAAC,IAEIM,OAAO,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,OAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,OAAA;EAAA,SAAAA,QAAA;IAAAK,eAAA,OAAAL,OAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAAC,YAAA,CAAAR,OAAA;IAAAS,GAAA;IAAAC,KAAA,EAUX,SAAAC,OAAA,EAAS;MAAA,IAAAC,IAAA,QAAAC,OAAA;QAAAC,KAAA;MACP,IAAMC,QAAQ,GAOMtB,GAAG;MANvB,IAAMuB,KAAK,GAAG,MAAM;MACpB,IAAAC,aAAA,GAAkD,IAAI,CAACJ,OAAO;QAAtDK,MAAM,GAAAD,aAAA,CAANC,MAAM;QAAEC,KAAK,GAAAF,aAAA,CAALE,KAAK;QAAEpB,YAAY,GAAAkB,aAAA,CAAZlB,YAAY;QAAEqB,QAAQ,GAAAH,aAAA,CAARG,QAAQ;MAE7C,IAAMC,OAAO,GAAGtB,YAAY,CAACoB,KAAK,CAAC;MAEnC,OAAAL,KAAA,GAAOvB,OAAO,CAAC2B,MAAM,CAAC,eACpB9B,KAAA,CAAAkC,aAAA,CAACP,QAAQ,EAAAD,KAAA,CAAAS,EAAA,aAAAC,aAAA,KAAAC,YAAA;QAAA,aAAyBJ;MAAO,GAAAT,IAAA,kBACvCxB,KAAA,CAAAkC,aAAA,CAACN,KAAK,EAAAF,KAAA,CAAAS,EAAA,4BACJnC,KAAA,CAAAkC,aAAA,CAACF,QAAQ,EAAAN,KAAA,CAAAS,EAAA,iBAAG,CACN,CACC;IAEf;EAAC;EAAA,OAAAvB,OAAA;AAAA,EAxBmBV,SAAS;AAAAoC,eAAA,CAAzB1B,OAAO,iBACU,SAAS;AAAA0B,eAAA,CAD1B1B,OAAO,aAEM2B,MAAM,CAACC,MAAM,CAAC9B,OAAO,CAAC;AAAA4B,eAAA,CAFnC1B,OAAO,WAIIL,KAAK;AAAA+B,eAAA,CAJhB1B,OAAO,kBAMW;EACpB6B,IAAI,EAAE;AACR,CAAC;AAmBH,eAAexC,eAAe,CAACW,OAAO,CAAC;AACvC,cAAc,kBAAkB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface ICounterProps extends CounterProps, UnknownProperties {}\nexport type CounterProps = BoxProps & {\n /** Counter theme or custom color */\n theme?: 'warning' | 'danger' | string;\n\n /** Counter size\n * @default m */\n size?: 'm' | 'l' | 'xl';\n};\n\ndeclare const Counter: Intergalactic.Component<'div', CounterProps>;\n\n/** @deprecated */\nexport interface IAnimatedNumberBaseProps extends AnimatedNumberBaseProps, UnknownProperties {}\nexport type AnimatedNumberBaseProps = {\n /** Animates number change, receives value between 0 and 1 and returns value in range from 0 to 1, e.g. for linear easing pass (t) => t */\n easing?: (t: number) => number;\n /** Stringify number, receives a fraction value */\n formatValue?: (value: number) => string;\n duration?: number;\n delay?: number;\n initValue?: number;\n value: number;\n};\n\nexport declare const AnimatedNumber: Intergalactic.Component<'div', AnimatedNumberBaseProps>;\n\nexport default Counter;\n"],"mappings":""}
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface ICounterProps extends CounterProps, UnknownProperties {}\nexport type CounterProps = BoxProps & {\n /** Counter theme or custom color */\n theme?: 'warning' | 'danger' | 'info' | string;\n\n /** Counter size\n * @default m */\n size?: 'm' | 'l' | 'xl';\n};\n\ndeclare const Counter: Intergalactic.Component<'div', CounterProps>;\n\n/** @deprecated */\nexport interface IAnimatedNumberBaseProps extends AnimatedNumberBaseProps, UnknownProperties {}\nexport type AnimatedNumberBaseProps = {\n /** Animates number change, receives value between 0 and 1 and returns value in range from 0 to 1, e.g. for linear easing pass (t) => t */\n easing?: (t: number) => number;\n /** Stringify number, receives a fraction value */\n formatValue?: (value: number) => string;\n /**\n * Duration time in ms\n * @default 200\n * */\n duration?: number;\n /**\n * Delay before animation in ms\n * @default 0\n * */\n delay?: number;\n /**\n * The value from which to start the animation\n * @default 0\n * */\n initValue?: number;\n /** The value by which to end the animation */\n value: number;\n};\n\nexport declare const AnimatedNumber: Intergalactic.Component<'div', AnimatedNumberBaseProps>;\n\nexport default Counter;\n"],"mappings":""}
|
@@ -49,14 +49,17 @@ SText {
|
|
49
49
|
display: inline;
|
50
50
|
}
|
51
51
|
|
52
|
+
SCounter[theme='info'] {
|
53
|
+
border-color: transparent;
|
54
|
+
background: var(--intergalactic-bg-primary-info, #008ff8);
|
55
|
+
}
|
56
|
+
|
52
57
|
SCounter[theme='warning'] {
|
53
58
|
border-color: transparent;
|
54
59
|
background: var(--intergalactic-bg-primary-warning, #ff642d);
|
55
|
-
color: var(--intergalactic-text-primary-invert, #ffffff);
|
56
60
|
}
|
57
61
|
|
58
62
|
SCounter[theme='danger'] {
|
59
63
|
border-color: transparent;
|
60
64
|
background: var(--intergalactic-bg-primary-critical, #ff4953);
|
61
|
-
|
62
|
-
}
|
65
|
+
}
|
@@ -5,7 +5,7 @@ import { BoxProps } from 'intergalactic/flex-box';
|
|
5
5
|
export interface ICounterProps extends CounterProps, UnknownProperties {}
|
6
6
|
export type CounterProps = BoxProps & {
|
7
7
|
/** Counter theme or custom color */
|
8
|
-
theme?: 'warning' | 'danger' | string;
|
8
|
+
theme?: 'warning' | 'danger' | 'info' | string;
|
9
9
|
|
10
10
|
/** Counter size
|
11
11
|
* @default m */
|
@@ -21,9 +21,22 @@ export type AnimatedNumberBaseProps = {
|
|
21
21
|
easing?: (t: number) => number;
|
22
22
|
/** Stringify number, receives a fraction value */
|
23
23
|
formatValue?: (value: number) => string;
|
24
|
+
/**
|
25
|
+
* Duration time in ms
|
26
|
+
* @default 200
|
27
|
+
* */
|
24
28
|
duration?: number;
|
29
|
+
/**
|
30
|
+
* Delay before animation in ms
|
31
|
+
* @default 0
|
32
|
+
* */
|
25
33
|
delay?: number;
|
34
|
+
/**
|
35
|
+
* The value from which to start the animation
|
36
|
+
* @default 0
|
37
|
+
* */
|
26
38
|
initValue?: number;
|
39
|
+
/** The value by which to end the animation */
|
27
40
|
value: number;
|
28
41
|
};
|
29
42
|
|