intergalactic 15.86.0 → 15.87.0-prerelease.3
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 +24 -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 +6 -6
- package/breadcrumbs/lib/es6/Breadcrumbs.js +6 -6
- package/button/lib/cjs/Button.js +26 -26
- package/button/lib/cjs/style/button.shadow.css +2 -2
- package/button/lib/es6/Button.js +26 -26
- package/button/lib/es6/style/button.shadow.css +2 -2
- 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/lib/cjs/Counter.js +10 -10
- package/counter/lib/es6/Counter.js +10 -10
- 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/ReferenceLine.js +9 -9
- 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/ReferenceLine.js +9 -9
- 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/lib/cjs/DataTable.js +37 -37
- package/data-table/lib/es6/DataTable.js +37 -37
- 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 +29 -29
- package/date-picker/lib/cjs/components/PickerAbstract.js +29 -29
- package/date-picker/lib/cjs/components/RangePickerAbstract.js +29 -29
- 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 +29 -29
- package/date-picker/lib/es6/components/PickerAbstract.js +29 -29
- package/date-picker/lib/es6/components/RangePickerAbstract.js +29 -29
- 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/es6/FeaturePopover.js +10 -10
- package/feedback-form/component/checkbox-button/CheckboxButton.d.ts +4 -0
- package/feedback-form/component/feedback-item/FeedbackItem.d.ts +7 -0
- package/feedback-form/component/feedback-rating/FeedbackRating.d.ts +156 -0
- package/feedback-form/component/feedback-rating/FeedbackRating.type.d.ts +55 -0
- package/feedback-form/component/slider-rating/SliderRating.d.ts +14 -0
- package/feedback-form/component/submit-button/SubmitButton.d.ts +3 -0
- package/feedback-form/index.d.ts +4 -0
- package/feedback-form/lib/cjs/FeedbackForm.js +28 -86
- package/feedback-form/lib/cjs/FeedbackForm.js.map +1 -1
- package/feedback-form/lib/cjs/component/checkbox-button/CheckboxButton.js +58 -0
- package/feedback-form/lib/cjs/component/checkbox-button/CheckboxButton.js.map +1 -0
- package/feedback-form/lib/cjs/component/feedback-item/FeedbackItem.js +63 -0
- package/feedback-form/lib/cjs/component/feedback-item/FeedbackItem.js.map +1 -0
- package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.js +360 -0
- package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.js.map +1 -0
- package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.type.js +2 -0
- package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.type.js.map +1 -0
- package/feedback-form/lib/cjs/component/slider-rating/SliderRating.js +172 -0
- package/feedback-form/lib/cjs/component/slider-rating/SliderRating.js.map +1 -0
- package/feedback-form/lib/cjs/component/submit-button/SubmitButton.js +23 -0
- package/feedback-form/lib/cjs/component/submit-button/SubmitButton.js.map +1 -0
- package/feedback-form/lib/cjs/index.d.js +12 -0
- package/feedback-form/lib/cjs/index.d.js.map +1 -1
- package/feedback-form/lib/cjs/index.js +7 -0
- package/feedback-form/lib/cjs/index.js.map +1 -1
- package/feedback-form/lib/cjs/style/checkbox-button.shadow.css +21 -0
- package/feedback-form/lib/cjs/style/feedback-rating.shadow.css +9 -0
- package/feedback-form/lib/cjs/style/slider-rating.shadow.css +34 -0
- package/feedback-form/lib/cjs/translations/__intergalactic-dynamic-locales.js +39 -0
- package/feedback-form/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/feedback-form/lib/cjs/translations/de.json +7 -0
- package/feedback-form/lib/cjs/translations/en.json +8 -0
- package/feedback-form/lib/cjs/translations/es.json +7 -0
- package/feedback-form/lib/cjs/translations/fr.json +7 -0
- package/feedback-form/lib/cjs/translations/it.json +7 -0
- package/feedback-form/lib/cjs/translations/ja.json +7 -0
- package/feedback-form/lib/cjs/translations/ko.json +7 -0
- package/feedback-form/lib/cjs/translations/nl.json +7 -0
- package/feedback-form/lib/cjs/translations/pl.json +7 -0
- package/feedback-form/lib/cjs/translations/pt.json +7 -0
- package/feedback-form/lib/cjs/translations/sv.json +7 -0
- package/feedback-form/lib/cjs/translations/tr.json +7 -0
- package/feedback-form/lib/cjs/translations/vi.json +7 -0
- package/feedback-form/lib/cjs/translations/zh.json +7 -0
- package/feedback-form/lib/es6/FeedbackForm.js +28 -88
- package/feedback-form/lib/es6/FeedbackForm.js.map +1 -1
- package/feedback-form/lib/es6/component/checkbox-button/CheckboxButton.js +50 -0
- package/feedback-form/lib/es6/component/checkbox-button/CheckboxButton.js.map +1 -0
- package/feedback-form/lib/es6/component/feedback-item/FeedbackItem.js +56 -0
- package/feedback-form/lib/es6/component/feedback-item/FeedbackItem.js.map +1 -0
- package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.js +354 -0
- package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.js.map +1 -0
- package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.type.js +2 -0
- package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.type.js.map +1 -0
- package/feedback-form/lib/es6/component/slider-rating/SliderRating.js +165 -0
- package/feedback-form/lib/es6/component/slider-rating/SliderRating.js.map +1 -0
- package/feedback-form/lib/es6/component/submit-button/SubmitButton.js +17 -0
- package/feedback-form/lib/es6/component/submit-button/SubmitButton.js.map +1 -0
- package/feedback-form/lib/es6/index.d.js +5 -1
- package/feedback-form/lib/es6/index.d.js.map +1 -1
- package/feedback-form/lib/es6/index.js +2 -0
- package/feedback-form/lib/es6/index.js.map +1 -1
- package/feedback-form/lib/es6/style/checkbox-button.shadow.css +21 -0
- package/feedback-form/lib/es6/style/feedback-rating.shadow.css +9 -0
- package/feedback-form/lib/es6/style/slider-rating.shadow.css +34 -0
- package/feedback-form/lib/es6/translations/__intergalactic-dynamic-locales.js +31 -0
- package/feedback-form/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/feedback-form/lib/es6/translations/de.json +7 -0
- package/feedback-form/lib/es6/translations/en.json +8 -0
- package/feedback-form/lib/es6/translations/es.json +7 -0
- package/feedback-form/lib/es6/translations/fr.json +7 -0
- package/feedback-form/lib/es6/translations/it.json +7 -0
- package/feedback-form/lib/es6/translations/ja.json +7 -0
- package/feedback-form/lib/es6/translations/ko.json +7 -0
- package/feedback-form/lib/es6/translations/nl.json +7 -0
- package/feedback-form/lib/es6/translations/pl.json +7 -0
- package/feedback-form/lib/es6/translations/pt.json +7 -0
- package/feedback-form/lib/es6/translations/sv.json +7 -0
- package/feedback-form/lib/es6/translations/tr.json +7 -0
- package/feedback-form/lib/es6/translations/vi.json +7 -0
- package/feedback-form/lib/es6/translations/zh.json +7 -0
- package/feedback-form/lib/types/component/checkbox-button/CheckboxButton.d.ts +4 -0
- package/feedback-form/lib/types/component/feedback-item/FeedbackItem.d.ts +7 -0
- package/feedback-form/lib/types/component/feedback-rating/FeedbackRating.d.ts +156 -0
- package/feedback-form/lib/types/component/feedback-rating/FeedbackRating.type.d.ts +55 -0
- package/feedback-form/lib/types/component/slider-rating/SliderRating.d.ts +14 -0
- package/feedback-form/lib/types/component/submit-button/SubmitButton.d.ts +3 -0
- package/feedback-form/lib/types/index.d.ts +4 -0
- package/feedback-form/lib/types/translations/__intergalactic-dynamic-locales.d.ts +101 -0
- package/feedback-form/translations/__intergalactic-dynamic-locales.d.ts +101 -0
- package/flags/index.d.ts +1013 -1014
- package/flags/lib/cjs/Flags.js +4 -5
- package/flags/lib/cjs/Flags.js.map +1 -1
- package/flags/lib/cjs/index.d.js.map +1 -1
- package/flags/lib/es6/Flags.js +4 -5
- package/flags/lib/es6/Flags.js.map +1 -1
- package/flags/lib/es6/index.d.js.map +1 -1
- package/flags/lib/sprites/sprite@1x.css +256 -256
- package/flags/lib/sprites/sprite@2x.css +257 -257
- package/flags/lib/types/index.d.ts +1013 -1014
- 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 +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 +10 -10
- package/input-number/lib/cjs/InputNumber.js.map +1 -1
- package/input-number/lib/es6/InputNumber.js +10 -10
- package/input-number/lib/es6/InputNumber.js.map +1 -1
- 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/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 +2 -2
- 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 +9 -9
- package/tooltip/lib/es6/Tooltip.js +9 -9
- 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/enhances/keyboardFocusEnhance.d.ts +1 -0
- package/utils/lib/enhances/keyboardFocusEnhance.js +2 -2
- package/utils/lib/enhances/keyboardFocusEnhance.js.map +1 -1
- package/utils/lib/enhances/keyboardFocusEnhance.mjs +2 -2
- package/utils/lib/enhances/keyboardFocusEnhance.mjs.map +1 -1
- package/utils/lib/injectStyle.js +1 -1
- package/utils/lib/injectStyle.mjs +1 -1
- package/utils/lib/themes/auto.css +4 -0
- package/utils/lib/themes/default.css +4 -0
- package/utils/lib/themes/default.json +2 -0
- package/utils/lib/themes/light.css +4 -0
- package/utils/lib/themes/light.json +2 -0
- 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
@@ -8,33 +8,28 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
8
|
import _createSuper from "@babel/runtime/helpers/createSuper";
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
10
10
|
import { sstyled as _sstyled } from 'intergalactic/utils/lib/core/index';
|
11
|
-
import { assignProps as _assignProps5 } from 'intergalactic/core';
|
12
|
-
import { assignProps as _assignProps4 } from 'intergalactic/core';
|
13
11
|
import { assignProps as _assignProps3 } from 'intergalactic/core';
|
14
12
|
import { assignProps as _assignProps2 } from 'intergalactic/core';
|
15
13
|
import { assignProps as _assignProps } from 'intergalactic/core';
|
16
|
-
var _excluded = ["Children", "styles", "forwardRef", "loading", "background", "theme"]
|
17
|
-
_excluded2 = ["Children", "tag", "uid"],
|
18
|
-
_excluded3 = ["input", "meta"];
|
14
|
+
var _excluded = ["Children", "styles", "forwardRef", "loading", "background", "theme"];
|
19
15
|
import React from 'react';
|
20
16
|
import { Field, Form } from 'react-final-form';
|
21
17
|
import createFocusDecorator from 'final-form-focus';
|
22
18
|
import createComponent, { Component, sstyled, Root } from 'intergalactic/core';
|
23
19
|
import Button from 'intergalactic/button';
|
24
20
|
import SpinContainer from 'intergalactic/spin-container';
|
25
|
-
import Tooltip from 'intergalactic/tooltip';
|
26
21
|
import { NoticeSmart } from 'intergalactic/notice';
|
27
22
|
import { Box } from 'intergalactic/flex-box';
|
28
|
-
import
|
29
|
-
import
|
23
|
+
import { FeedbackItem } from './component/feedback-item/FeedbackItem';
|
24
|
+
import { SubmitButton } from './component/submit-button/SubmitButton';
|
30
25
|
/*__reshadow-styles__:"./style/feedback-form.shadow.css"*/
|
31
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
32
|
-
"__SFeedbackForm": "
|
33
|
-
"__SSubmit": "
|
34
|
-
"__SCancel": "
|
35
|
-
"__SNotice": "
|
36
|
-
"__SSuccess": "
|
37
|
-
"__SEmail": "
|
26
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SFeedbackForm_1srei_gg_{max-width:320px}.___SCancel_1srei_gg_,.___SSubmit_1srei_gg_{display:inline-flex;margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNotice_1srei_gg_{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-4x, 16px);border-width:1px 0 0;border-top-style:solid;border-radius:0 0 var(--intergalactic-surface-rounded, 6px) var(--intergalactic-surface-rounded, 6px)}.___SSuccess_1srei_gg_{display:flex;align-items:center;flex-direction:column;width:320px;padding:var(--intergalactic-spacing-10x, 40px);box-sizing:border-box}.___SEmail_1srei_gg_{margin-bottom:calc(var(--intergalactic-spacing-4x, 16px) + var(--intergalactic-spacing-05x, 2px));width:80px;height:80px;background-image:url(\"data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28.1632 6.00003C27.9554 5.99875 27.7493 6.03875 27.5571 6.11772C27.3648 6.19668 27.1902 6.31304 27.0432 6.46003L14.1332 19.38C7.645 25.8687 4 34.669 4 43.845C4 53.0211 7.645 61.8213 14.1332 68.31C17.3463 71.5242 21.1611 74.0738 25.3597 75.8134C29.5583 77.5529 34.0585 78.4482 38.6032 78.4482C43.1479 78.4482 47.6481 77.5529 51.8467 75.8134C56.0454 74.0738 59.8602 71.5242 63.0732 68.31L75.9832 55.4C76.1316 55.2536 76.2495 55.0792 76.3301 54.887C76.4108 54.6948 76.4526 54.4885 76.4532 54.28V6.89003C76.4506 6.65307 76.3546 6.42671 76.1861 6.26009C76.0176 6.09346 75.7902 6.00002 75.5532 6.00003H28.1632Z' fill='%2345E0A8'/%3E%3Cpath d='M29 45.2852L29.2 45.6352C35.39 42.1852 53.39 31.9652 56.73 35.1052C55.6 32.0052 39.7 35.4352 29 45.2852Z' fill='white'/%3E%3Cpath d='M28.44 31.6343C26.63 37.6343 19.23 56.1043 15 61.9443L18 62.8543L19.58 61.5343C23.8 51.9843 29.58 35.5343 29.89 30.0743C29.39 29.8143 28.93 30.2143 28.44 31.6343Z' fill='white'/%3E%3Cpath d='M15 62.0078C19.23 56.1678 26.63 37.7378 28.44 31.6678C30.25 25.5978 33.49 37.6678 31.67 42.7878' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M28 45.9424C38.68 35.5824 55.27 31.9424 56.43 35.1024C57.12 36.9924 43 41.3624 38.02 47.4224' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M44.45 21.93C41.21 20.77 35.86 19.04 33 18.24C37.12 16.41 70 4.24 72.67 3C71.75 7.11 67.75 21.28 65.96 27.93C61.13 26.25 56.23 24.78 53.03 23.74C51.0298 26.3907 49.2219 29.1812 47.62 32.09C46.44 28.23 45.29 23.77 44.45 21.93Z' fill='white' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M45 22.08L61.74 11' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M53 23.73L72.64 3' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48 32.58L55.86 25' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48.23 30.77L51.69 25.13L52.66 24L54.73 24.61L55.16 24.48L51.8 27.91L49.33 30.18L48 31.29L48.23 30.77Z' fill='black'/%3E%3Cpath d='M33.81 22L23 27.12' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M40.89 23L34 27.37' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M62.04 29L58 38.85' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M46.68 41C50.29 43.42 44.81 49.52 43 51.12' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M47.17 44C51.31 46.09 48.33 51.76 46 54.6' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48.86 49C54.37 53.48 36.31 72.72 35 73.78' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cmask id='mask0_11950_117175' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='4' y='6' width='73' height='73'%3E%3Cpath d='M28.1632 6.00003C27.9554 5.99875 27.7493 6.03875 27.5571 6.11772C27.3648 6.19668 27.1902 6.31304 27.0432 6.46003L14.1332 19.38C7.645 25.8687 4 34.669 4 43.845C4 53.0211 7.645 61.8213 14.1332 68.31C17.3463 71.5242 21.1611 74.0738 25.3597 75.8134C29.5583 77.5529 34.0585 78.4482 38.6032 78.4482C43.1479 78.4482 47.6481 77.5529 51.8467 75.8134C56.0454 74.0738 59.8602 71.5242 63.0732 68.31L75.9832 55.4C76.1316 55.2536 76.2495 55.0792 76.3301 54.887C76.4108 54.6948 76.4526 54.4885 76.4532 54.28V6.89003C76.4506 6.65307 76.3546 6.42671 76.1861 6.26009C76.0176 6.09346 75.7902 6.00002 75.5532 6.00003H28.1632Z' fill='%2345DFA7'/%3E%3C/mask%3E%3Cg mask='url(%23mask0_11950_117175)'%3E%3Cpath d='M5 74.6871C7.49 72.3471 13.24 63.6871 14.52 61.2471C28.18 59.1271 34.71 71.2471 34.98 74.7671C32.7234 79.651 30.1305 84.3723 27.22 88.8971' fill='black'/%3E%3Cpath d='M5 74.6871C7.49 72.3471 13.24 63.6871 14.52 61.2471C28.18 59.1271 34.71 71.2471 34.98 74.7671C32.7234 79.651 30.1305 84.3723 27.22 88.8971' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E%0A\")}" /*__inner_css_end__*/, "1srei_gg_") /*__reshadow_css_end__*/, {
|
27
|
+
"__SFeedbackForm": "___SFeedbackForm_1srei_gg_",
|
28
|
+
"__SSubmit": "___SSubmit_1srei_gg_",
|
29
|
+
"__SCancel": "___SCancel_1srei_gg_",
|
30
|
+
"__SNotice": "___SNotice_1srei_gg_",
|
31
|
+
"__SSuccess": "___SSuccess_1srei_gg_",
|
32
|
+
"__SEmail": "___SEmail_1srei_gg_"
|
38
33
|
});
|
39
34
|
var FeedbackForm = /*#__PURE__*/function (_Component) {
|
40
35
|
_inherits(FeedbackForm, _Component);
|
@@ -72,13 +67,13 @@ var FeedbackForm = /*#__PURE__*/function (_Component) {
|
|
72
67
|
return /*#__PURE__*/React.createElement(Form, _extends({
|
73
68
|
decorators: [this.focusDecorator]
|
74
69
|
}, other), function (api) {
|
75
|
-
var
|
76
|
-
return
|
70
|
+
var _ref4;
|
71
|
+
return _ref4 = sstyled(styles), /*#__PURE__*/React.createElement(SpinContainer, _ref4.cn("SpinContainer", {
|
77
72
|
"background": background,
|
78
73
|
"theme": theme,
|
79
74
|
"size": 'xl',
|
80
75
|
"loading": loading === undefined ? api.submitting : loading
|
81
|
-
}), /*#__PURE__*/React.createElement(SFeedbackForm,
|
76
|
+
}), /*#__PURE__*/React.createElement(SFeedbackForm, _ref4.cn("SFeedbackForm", _objectSpread(_objectSpread({
|
82
77
|
"tag": 'form',
|
83
78
|
"noValidate": true,
|
84
79
|
"method": 'POST',
|
@@ -86,7 +81,7 @@ var FeedbackForm = /*#__PURE__*/function (_Component) {
|
|
86
81
|
}, other), {}, {
|
87
82
|
"onSubmit": api.handleSubmit,
|
88
83
|
"title": 'This is feedback'
|
89
|
-
})), typeof Children.origin === 'function' ? Children.origin(api) : /*#__PURE__*/React.createElement(Children,
|
84
|
+
})), typeof Children.origin === 'function' ? Children.origin(api) : /*#__PURE__*/React.createElement(Children, _ref4.cn("Children", {}))));
|
90
85
|
});
|
91
86
|
}
|
92
87
|
}]);
|
@@ -121,103 +116,48 @@ _defineProperty(FeedbackForm, "validate", {
|
|
121
116
|
};
|
122
117
|
}
|
123
118
|
});
|
124
|
-
var TooltipProps = ['title', 'theme', 'strategy', 'modifiers', 'placement', 'interaction', 'timeout', 'visible', 'defaultVisible', 'onVisibleChange', 'offset', 'preventOverflow', 'arrow', 'flip', 'computeStyles', 'eventListeners', 'onFirstUpdate'];
|
125
|
-
function Item(_ref11) {
|
126
|
-
var _ref = arguments[0];
|
127
|
-
var Children = _ref11.Children,
|
128
|
-
tag = _ref11.tag,
|
129
|
-
uid = _ref11.uid,
|
130
|
-
props = _objectWithoutProperties(_ref11, _excluded2);
|
131
|
-
var tooltipProps = pick(props, TooltipProps);
|
132
|
-
var ItemRoot = tag;
|
133
|
-
var lastErrorRef = React.useRef(undefined);
|
134
|
-
return /*#__PURE__*/React.createElement(Field, props, function (_ref12) {
|
135
|
-
var _meta$error;
|
136
|
-
var input = _ref12.input,
|
137
|
-
meta = _ref12.meta,
|
138
|
-
other = _objectWithoutProperties(_ref12, _excluded3);
|
139
|
-
var showError = other.validateOnBlur === false ? meta.submitFailed : true;
|
140
|
-
var invalid = meta.invalid && meta.touched;
|
141
|
-
var errorState = showError && invalid;
|
142
|
-
var inputProps = _objectSpread(_objectSpread({}, input), {}, {
|
143
|
-
state: errorState ? 'invalid' : 'normal',
|
144
|
-
'aria-invalid': errorState ? true : false,
|
145
|
-
'aria-errormessage': uid
|
146
|
-
});
|
147
|
-
if (meta !== null && meta !== void 0 && meta.error) lastErrorRef.current = meta.error;
|
148
|
-
return /*#__PURE__*/React.createElement(Tooltip, _extends({
|
149
|
-
visible: errorState && meta.active,
|
150
|
-
theme: "warning",
|
151
|
-
placement: "left",
|
152
|
-
flip: {
|
153
|
-
fallbackPlacements: ['right', 'bottom']
|
154
|
-
}
|
155
|
-
}, tooltipProps), /*#__PURE__*/React.createElement(Tooltip.Trigger, {
|
156
|
-
inline: false,
|
157
|
-
role: undefined
|
158
|
-
}, tag && /*#__PURE__*/React.createElement(ItemRoot, _assignProps(_objectSpread({}, inputProps), _ref)), typeof Children.origin === 'function' && Children.origin(_objectSpread({
|
159
|
-
input: inputProps,
|
160
|
-
meta: meta
|
161
|
-
}, other))), /*#__PURE__*/React.createElement(Tooltip.Popper, {
|
162
|
-
id: uid,
|
163
|
-
ignorePortalsStacking: true
|
164
|
-
}, (_meta$error = meta.error) !== null && _meta$error !== void 0 ? _meta$error : lastErrorRef.current));
|
165
|
-
});
|
166
|
-
}
|
167
|
-
Item.enhance = [uniqueIDEnhancement()];
|
168
119
|
function Success(props) {
|
169
|
-
var
|
170
|
-
|
120
|
+
var _ref = arguments[0],
|
121
|
+
_ref5;
|
171
122
|
var Children = props.Children,
|
172
123
|
styles = props.styles;
|
173
124
|
var SSuccess = Box;
|
174
125
|
var SEmail = 'div';
|
175
|
-
return
|
126
|
+
return _ref5 = sstyled(styles), /*#__PURE__*/React.createElement(SSuccess, _ref5.cn("SSuccess", _objectSpread({}, _assignProps({}, _ref))), /*#__PURE__*/React.createElement(SEmail, _ref5.cn("SEmail", {
|
176
127
|
"aria-hidden": true
|
177
|
-
})), /*#__PURE__*/React.createElement("span",
|
128
|
+
})), /*#__PURE__*/React.createElement("span", _ref5.cn("span", {}), /*#__PURE__*/React.createElement(Children, _ref5.cn("Children", {}))));
|
178
129
|
}
|
179
130
|
// because it is used without a wrapper
|
180
131
|
Success.style = style;
|
181
|
-
function Submit(props) {
|
182
|
-
var _ref3 = arguments[0],
|
183
|
-
_ref8;
|
184
|
-
var styles = props.styles;
|
185
|
-
var SSubmit = Button;
|
186
|
-
return _ref8 = sstyled(styles), /*#__PURE__*/React.createElement(SSubmit, _ref8.cn("SSubmit", _objectSpread({}, _assignProps3({
|
187
|
-
"type": 'submit',
|
188
|
-
"use": 'primary',
|
189
|
-
"theme": 'success'
|
190
|
-
}, _ref3))));
|
191
|
-
}
|
192
132
|
function Cancel(props) {
|
193
|
-
var
|
194
|
-
|
133
|
+
var _ref2 = arguments[0],
|
134
|
+
_ref6;
|
195
135
|
var styles = props.styles;
|
196
136
|
var SCancel = Button;
|
197
|
-
return
|
137
|
+
return _ref6 = sstyled(styles), /*#__PURE__*/React.createElement(SCancel, _ref6.cn("SCancel", _objectSpread({}, _assignProps2({
|
198
138
|
"type": 'reset',
|
199
139
|
"use": 'secondary',
|
200
140
|
"theme": 'muted'
|
201
|
-
},
|
141
|
+
}, _ref2))));
|
202
142
|
}
|
203
143
|
function Notice(props) {
|
204
|
-
var
|
205
|
-
|
144
|
+
var _ref3 = arguments[0],
|
145
|
+
_ref7;
|
206
146
|
var styles = props.styles,
|
207
147
|
_props$theme = props.theme,
|
208
148
|
theme = _props$theme === void 0 ? 'bg-secondary-neutral' : _props$theme,
|
209
149
|
_props$use = props.use,
|
210
150
|
use = _props$use === void 0 ? 'secondary' : _props$use;
|
211
151
|
var SNotice = NoticeSmart;
|
212
|
-
return
|
152
|
+
return _ref7 = sstyled(styles), /*#__PURE__*/React.createElement(SNotice, _ref7.cn("SNotice", _objectSpread({}, _assignProps3({
|
213
153
|
"theme": theme,
|
214
154
|
"use": use
|
215
|
-
},
|
155
|
+
}, _ref3))));
|
216
156
|
}
|
217
157
|
export default createComponent(FeedbackForm, {
|
218
|
-
Item:
|
158
|
+
Item: FeedbackItem,
|
219
159
|
Success: Success,
|
220
|
-
Submit:
|
160
|
+
Submit: SubmitButton,
|
221
161
|
Cancel: Cancel,
|
222
162
|
Notice: Notice
|
223
163
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FeedbackForm.js","names":["React","Field","Form","createFocusDecorator","createComponent","Component","sstyled","Root","Button","SpinContainer","Tooltip","NoticeSmart","Box","pick","uniqueIDEnhancement","style","_sstyled","insert","FeedbackForm","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","key","value","getItemProps","validateOnBlur","asProps","render","SFeedbackForm","_this$asProps","Children","styles","forwardRef","loading","background","theme","other","_objectWithoutProperties","_excluded","createElement","_extends","decorators","focusDecorator","api","_ref6","cn","undefined","submitting","_objectSpread","handleSubmit","origin","onSubmit","description","error","words","split","symbols","join","email","test","String","toLowerCase","TooltipProps","Item","_ref11","_ref","arguments[0]","tag","uid","props","_excluded2","tooltipProps","ItemRoot","lastErrorRef","useRef","_ref12","_meta$error","input","meta","_excluded3","showError","submitFailed","invalid","touched","errorState","inputProps","state","current","visible","active","placement","flip","fallbackPlacements","Trigger","inline","role","_assignProps","Popper","id","ignorePortalsStacking","enhance","Success","_ref2","_ref7","SSuccess","SEmail","_assignProps2","Submit","_ref3","_ref8","SSubmit","_assignProps3","Cancel","_ref4","_ref9","SCancel","_assignProps4","Notice","_ref5","_ref10","_props$theme","_props$use","use","SNotice","_assignProps5"],"sources":["../../src/FeedbackForm.jsx"],"sourcesContent":["import React from 'react';\nimport { Field, Form } from 'react-final-form';\nimport createFocusDecorator from 'final-form-focus';\n\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport Button from '@semcore/button';\nimport SpinContainer from '@semcore/spin-container';\nimport Tooltip from '@semcore/tooltip';\nimport { NoticeSmart } from '@semcore/notice';\nimport { Box } from '@semcore/flex-box';\nimport pick from '@semcore/utils/lib/pick';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\n\nimport style from './style/feedback-form.shadow.css';\n\nclass FeedbackForm extends Component {\n static displayName = 'FeedbackForm';\n static style = style;\n static FinalForm = {\n Field,\n Form,\n };\n\n static defaultProps = {\n onSubmit: () => {},\n };\n\n static validate = {\n description: (error) => (value = '') => {\n const words = value.split(/\\s+/);\n const symbols = words.join(' ');\n if (symbols.length < 10 || words.length < 3) {\n return error;\n }\n },\n email: (error) => (value = '') => {\n if (!/.+@.+\\..+/i.test(String(value).toLowerCase())) {\n return error;\n }\n },\n };\n\n focusDecorator = createFocusDecorator();\n\n getItemProps() {\n const { validateOnBlur } = this.asProps;\n\n return {\n validateOnBlur,\n };\n }\n\n render() {\n const SFeedbackForm = Box;\n const { Children, styles, forwardRef, loading, background, theme, ...other } = this.asProps;\n\n return (\n <Form decorators={[this.focusDecorator]} {...other}>\n {(api) =>\n sstyled(styles)(\n <SpinContainer\n background={background}\n theme={theme}\n size='xl'\n loading={loading === undefined ? api.submitting : loading}\n >\n <SFeedbackForm\n tag='form'\n noValidate\n method='POST'\n ref={forwardRef}\n {...other}\n onSubmit={api.handleSubmit}\n title='This is feedback'\n >\n {typeof Children.origin === 'function' ? Children.origin(api) : <Children />}\n </SFeedbackForm>\n </SpinContainer>,\n )\n }\n </Form>\n );\n }\n}\n\nconst TooltipProps = [\n 'title',\n 'theme',\n 'strategy',\n 'modifiers',\n 'placement',\n 'interaction',\n 'timeout',\n 'visible',\n 'defaultVisible',\n 'onVisibleChange',\n 'offset',\n 'preventOverflow',\n 'arrow',\n 'flip',\n 'computeStyles',\n 'eventListeners',\n 'onFirstUpdate',\n];\n\nfunction Item({ Children, tag, uid, ...props }) {\n const tooltipProps = pick(props, TooltipProps);\n const ItemRoot = Root;\n\n const lastErrorRef = React.useRef(undefined);\n\n return (\n <Field {...props}>\n {({ input, meta, ...other }) => {\n const showError = other.validateOnBlur === false ? meta.submitFailed : true;\n const invalid = meta.invalid && meta.touched;\n const errorState = showError && invalid;\n const inputProps = {\n ...input,\n state: errorState ? 'invalid' : 'normal',\n 'aria-invalid': errorState ? true : false,\n 'aria-errormessage': uid,\n };\n if (meta?.error) lastErrorRef.current = meta.error;\n\n return (\n <Tooltip\n visible={errorState && meta.active}\n theme='warning'\n placement='left'\n flip={{\n fallbackPlacements: ['right', 'bottom'],\n }}\n {...tooltipProps}\n >\n <Tooltip.Trigger inline={false} role={undefined}>\n {tag && <ItemRoot render={tag} {...inputProps} />}\n {typeof Children.origin === 'function' &&\n Children.origin({\n input: inputProps,\n meta,\n ...other,\n })}\n </Tooltip.Trigger>\n <Tooltip.Popper id={uid} ignorePortalsStacking>\n {meta.error ?? lastErrorRef.current}\n </Tooltip.Popper>\n </Tooltip>\n );\n }}\n </Field>\n );\n}\nItem.enhance = [uniqueIDEnhancement()];\n\nfunction Success(props) {\n const { Children, styles } = props;\n const SSuccess = Root;\n const SEmail = 'div';\n\n return sstyled(styles)(\n <SSuccess render={Box}>\n <SEmail aria-hidden={true} />\n <span>\n <Children />\n </span>\n </SSuccess>,\n );\n}\n// because it is used without a wrapper\nSuccess.style = style;\n\nfunction Submit(props) {\n const { styles } = props;\n const SSubmit = Root;\n return sstyled(styles)(<SSubmit render={Button} type='submit' use='primary' theme='success' />);\n}\n\nfunction Cancel(props) {\n const { styles } = props;\n const SCancel = Root;\n return sstyled(styles)(<SCancel render={Button} type='reset' use='secondary' theme='muted' />);\n}\n\nfunction Notice(props) {\n const { styles, theme = 'bg-secondary-neutral', use = 'secondary' } = props;\n const SNotice = Root;\n return sstyled(styles)(<SNotice render={NoticeSmart} theme={theme} use={use} />);\n}\n\nexport default createComponent(FeedbackForm, {\n Item,\n Success,\n Submit,\n Cancel,\n Notice,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,IAAI,QAAQ,kBAAkB;AAC9C,OAAOC,oBAAoB,MAAM,kBAAkB;AAEnD,OAAOC,eAAe,IAAIC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,MAAM,MAAM,iBAAiB;AACpC,OAAOC,aAAa,MAAM,yBAAyB;AACnD,OAAOC,OAAO,MAAM,kBAAkB;AACtC,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,GAAG,QAAQ,mBAAmB;AACvC,OAAOC,IAAI,MAAM,yBAAyB;AAC1C,OAAOC,mBAAmB,MAAM,6BAA6B;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAIxDC,YAAY,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,YAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,YAAA;EAAA,SAAAA,aAAA;IAAA,IAAAK,KAAA;IAAAC,eAAA,OAAAN,YAAA;IAAA,SAAAO,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,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;EACPM,MAAM,EAANA,MAAM;EACNK,MAAM,EAANA,MAAM;EACNK,MAAM,EAANA;AACF,CAAC,CAAC"}
|
1
|
+
{"version":3,"file":"FeedbackForm.js","names":["React","Field","Form","createFocusDecorator","createComponent","Component","sstyled","Root","Button","SpinContainer","NoticeSmart","Box","FeedbackItem","SubmitButton","style","_sstyled","insert","FeedbackForm","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","key","value","getItemProps","validateOnBlur","asProps","render","SFeedbackForm","_this$asProps","Children","styles","forwardRef","loading","background","theme","other","_objectWithoutProperties","_excluded","createElement","_extends","decorators","focusDecorator","api","_ref4","cn","undefined","submitting","_objectSpread","handleSubmit","origin","onSubmit","description","error","words","split","symbols","join","email","test","String","toLowerCase","Success","props","_ref","arguments[0]","_ref5","SSuccess","SEmail","_assignProps","Cancel","_ref2","_ref6","SCancel","_assignProps2","Notice","_ref3","_ref7","_props$theme","_props$use","use","SNotice","_assignProps3","Item","Submit"],"sources":["../../src/FeedbackForm.jsx"],"sourcesContent":["import React from 'react';\nimport { Field, Form } from 'react-final-form';\nimport createFocusDecorator from 'final-form-focus';\n\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport Button from '@semcore/button';\nimport SpinContainer from '@semcore/spin-container';\nimport { NoticeSmart } from '@semcore/notice';\nimport { Box } from '@semcore/flex-box';\n\nimport { FeedbackItem } from './component/feedback-item/FeedbackItem';\nimport { SubmitButton } from './component/submit-button/SubmitButton';\n\nimport style from './style/feedback-form.shadow.css';\n\nclass FeedbackForm extends Component {\n static displayName = 'FeedbackForm';\n static style = style;\n static FinalForm = {\n Field,\n Form,\n };\n\n static defaultProps = {\n onSubmit: () => {},\n };\n\n static validate = {\n description: (error) => (value = '') => {\n const words = value.split(/\\s+/);\n const symbols = words.join(' ');\n if (symbols.length < 10 || words.length < 3) {\n return error;\n }\n },\n email: (error) => (value = '') => {\n if (!/.+@.+\\..+/i.test(String(value).toLowerCase())) {\n return error;\n }\n },\n };\n\n focusDecorator = createFocusDecorator();\n\n getItemProps() {\n const { validateOnBlur } = this.asProps;\n\n return {\n validateOnBlur,\n };\n }\n\n render() {\n const SFeedbackForm = Box;\n const { Children, styles, forwardRef, loading, background, theme, ...other } = this.asProps;\n\n return (\n <Form decorators={[this.focusDecorator]} {...other}>\n {(api) =>\n sstyled(styles)(\n <SpinContainer\n background={background}\n theme={theme}\n size='xl'\n loading={loading === undefined ? api.submitting : loading}\n >\n <SFeedbackForm\n tag='form'\n noValidate\n method='POST'\n ref={forwardRef}\n {...other}\n onSubmit={api.handleSubmit}\n title='This is feedback'\n >\n {typeof Children.origin === 'function' ? Children.origin(api) : <Children />}\n </SFeedbackForm>\n </SpinContainer>,\n )\n }\n </Form>\n );\n }\n}\n\nfunction Success(props) {\n const { Children, styles } = props;\n const SSuccess = Root;\n const SEmail = 'div';\n\n return sstyled(styles)(\n <SSuccess render={Box}>\n <SEmail aria-hidden={true} />\n <span>\n <Children />\n </span>\n </SSuccess>,\n );\n}\n// because it is used without a wrapper\nSuccess.style = style;\n\nfunction Cancel(props) {\n const { styles } = props;\n const SCancel = Root;\n return sstyled(styles)(<SCancel render={Button} type='reset' use='secondary' theme='muted' />);\n}\n\nfunction Notice(props) {\n const { styles, theme = 'bg-secondary-neutral', use = 'secondary' } = props;\n const SNotice = Root;\n return sstyled(styles)(<SNotice render={NoticeSmart} theme={theme} use={use} />);\n}\n\nexport default createComponent(FeedbackForm, {\n Item: FeedbackItem,\n Success,\n Submit: SubmitButton,\n Cancel,\n Notice,\n});\n"],"mappings":";;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,IAAI,QAAQ,kBAAkB;AAC9C,OAAOC,oBAAoB,MAAM,kBAAkB;AAEnD,OAAOC,eAAe,IAAIC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,MAAM,MA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eAAC7C,KAAA,CAAAqD,aAAA,CAAC0C,OAAO,EAAAJ,KAAA,CAAAhC,EAAA,YAAAG,aAAA,KAAAkC,aAAA;IAAA,SAA6B/C,KAAK;IAAA,OAAO6C;EAAG,GAAAJ,KAAA,IAAI;AACjF;AAEA,eAAetF,eAAe,CAACa,YAAY,EAAE;EAC3CgF,IAAI,EAAErF,YAAY;EAClBgE,OAAO,EAAPA,OAAO;EACPsB,MAAM,EAAErF,YAAY;EACpBuE,MAAM,EAANA,MAAM;EACNK,MAAM,EAANA;AACF,CAAC,CAAC"}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
4
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
6
|
+
import _createSuper from "@babel/runtime/helpers/createSuper";
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
8
|
+
import { sstyled as _sstyled } from 'intergalactic/utils/lib/core/index';
|
9
|
+
import { assignProps as _assignProps } from 'intergalactic/core';
|
10
|
+
var _excluded = ["styles", "id", "label"];
|
11
|
+
import React from 'react';
|
12
|
+
import createComponent, { Component, Root, sstyled } from 'intergalactic/core';
|
13
|
+
import { Box } from 'intergalactic/flex-box';
|
14
|
+
/*__reshadow-styles__:"../../style/checkbox-button.shadow.css"*/
|
15
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SCheckboxButton_oanqb_gg_{margin-top:var(--intergalactic-spacing-2x, 8px);border:1px solid var(--intergalactic-border-primary, #c4c7cf);border-radius:var(--intergalactic-rounded-medium, 6px)}.___SCheckboxButton_oanqb_gg_ label{width:100%;padding:var(--intergalactic-spacing-3x, 12px);box-sizing:border-box}.___SCheckboxButton_oanqb_gg_.__checked_oanqb_gg_{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}@media (hover:hover){.___SCheckboxButton_oanqb_gg_:hover{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}.___SCheckboxButton_oanqb_gg_.__checked_oanqb_gg_:hover{background-color:rgba(0,143,248,.2)}}" /*__inner_css_end__*/, "oanqb_gg_") /*__reshadow_css_end__*/, {
|
16
|
+
"__SCheckboxButton": "___SCheckboxButton_oanqb_gg_",
|
17
|
+
"_checked": "__checked_oanqb_gg_"
|
18
|
+
});
|
19
|
+
import Checkbox from 'intergalactic/checkbox';
|
20
|
+
var CheckboxButtonRoot = /*#__PURE__*/function (_Component) {
|
21
|
+
_inherits(CheckboxButtonRoot, _Component);
|
22
|
+
var _super = _createSuper(CheckboxButtonRoot);
|
23
|
+
function CheckboxButtonRoot() {
|
24
|
+
_classCallCheck(this, CheckboxButtonRoot);
|
25
|
+
return _super.apply(this, arguments);
|
26
|
+
}
|
27
|
+
_createClass(CheckboxButtonRoot, [{
|
28
|
+
key: "render",
|
29
|
+
value: function render() {
|
30
|
+
var _ref = this.asProps,
|
31
|
+
_ref2;
|
32
|
+
var _this$asProps = this.asProps,
|
33
|
+
styles = _this$asProps.styles,
|
34
|
+
id = _this$asProps.id,
|
35
|
+
label = _this$asProps.label,
|
36
|
+
other = _objectWithoutProperties(_this$asProps, _excluded);
|
37
|
+
var SCheckboxButton = Box;
|
38
|
+
return _ref2 = sstyled(styles), /*#__PURE__*/React.createElement(SCheckboxButton, _ref2.cn("SCheckboxButton", _objectSpread({}, _assignProps({
|
39
|
+
"__excludeProps": ['onChange', 'id']
|
40
|
+
}, _ref))), /*#__PURE__*/React.createElement(Checkbox, _ref2.cn("Checkbox", _objectSpread({}, other)), /*#__PURE__*/React.createElement(Checkbox.Value, {
|
41
|
+
id: id
|
42
|
+
}), /*#__PURE__*/React.createElement(Checkbox.Text, null, label)));
|
43
|
+
}
|
44
|
+
}]);
|
45
|
+
return CheckboxButtonRoot;
|
46
|
+
}(Component);
|
47
|
+
_defineProperty(CheckboxButtonRoot, "style", style);
|
48
|
+
var CheckboxButton = createComponent(CheckboxButtonRoot);
|
49
|
+
export default CheckboxButton;
|
50
|
+
//# sourceMappingURL=CheckboxButton.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CheckboxButton.js","names":["React","createComponent","Component","Root","sstyled","Box","style","_sstyled","insert","Checkbox","CheckboxButtonRoot","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_ref2","_this$asProps","styles","id","label","other","_objectWithoutProperties","_excluded","SCheckboxButton","createElement","cn","_objectSpread","_assignProps","Value","Text","_defineProperty","CheckboxButton"],"sources":["../../../../src/component/checkbox-button/CheckboxButton.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\n\nimport style from '../../style/checkbox-button.shadow.css';\nimport Checkbox, { CheckboxProps } from '@semcore/checkbox';\n\nclass CheckboxButtonRoot extends Component<CheckboxProps> {\n static style = style;\n\n render() {\n const { styles, id, label, ...other } = this.asProps;\n const SCheckboxButton = Root;\n return sstyled(styles)(\n <SCheckboxButton render={Box} __excludeProps={['onChange', 'id']}>\n <Checkbox {...other}>\n <Checkbox.Value id={id} />\n <Checkbox.Text>{label}</Checkbox.Text>\n </Checkbox>\n </SCheckboxButton>,\n );\n }\n}\n\nconst CheckboxButton = createComponent(CheckboxButtonRoot);\n\nexport default CheckboxButton;\n"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,SAAS,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AACzE,SAASC,GAAG,QAAQ,mBAAmB;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;AAAA;AAGxC,OAAOC,QAAQ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AAGvC,eAAe,CAACS,kBAAkB,CAAC;AAE1D,eAAe8B,cAAc"}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
4
|
+
var _excluded = ["Children", "tag", "uid", "tooltipProps"],
|
5
|
+
_excluded2 = ["input", "meta"];
|
6
|
+
import React from 'react';
|
7
|
+
import { Field } from 'react-final-form';
|
8
|
+
import Tooltip from 'intergalactic/tooltip';
|
9
|
+
import pick from 'intergalactic/utils/lib/pick';
|
10
|
+
import uniqueIDEnhancement from 'intergalactic/utils/lib/uniqueID';
|
11
|
+
var deafultTooltipPropsList = ['title', 'theme', 'strategy', 'modifiers', 'placement', 'interaction', 'timeout', 'visible', 'defaultVisible', 'onVisibleChange', 'offset', 'preventOverflow', 'arrow', 'flip', 'computeStyles', 'eventListeners', 'onFirstUpdate'];
|
12
|
+
export function FeedbackItem(_ref) {
|
13
|
+
var Children = _ref.Children,
|
14
|
+
tag = _ref.tag,
|
15
|
+
uid = _ref.uid,
|
16
|
+
_ref$tooltipProps = _ref.tooltipProps,
|
17
|
+
tooltipPropsList = _ref$tooltipProps === void 0 ? deafultTooltipPropsList : _ref$tooltipProps,
|
18
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
19
|
+
var tooltipProps = pick(props, tooltipPropsList);
|
20
|
+
var lastErrorRef = React.useRef(undefined);
|
21
|
+
return /*#__PURE__*/React.createElement(Field, props, function (_ref2) {
|
22
|
+
var _meta$error;
|
23
|
+
var input = _ref2.input,
|
24
|
+
meta = _ref2.meta,
|
25
|
+
other = _objectWithoutProperties(_ref2, _excluded2);
|
26
|
+
var showError = other.validateOnBlur === false ? meta.submitFailed : true;
|
27
|
+
var invalid = meta.invalid && meta.touched;
|
28
|
+
var errorState = showError && invalid;
|
29
|
+
var inputProps = _objectSpread(_objectSpread({}, input), {}, {
|
30
|
+
state: errorState ? 'invalid' : 'normal',
|
31
|
+
'aria-invalid': errorState ? true : false,
|
32
|
+
'aria-errormessage': uid
|
33
|
+
});
|
34
|
+
if (meta !== null && meta !== void 0 && meta.error) lastErrorRef.current = meta.error;
|
35
|
+
return /*#__PURE__*/React.createElement(Tooltip, _extends({
|
36
|
+
visible: errorState && meta.active,
|
37
|
+
theme: "warning",
|
38
|
+
placement: "left",
|
39
|
+
flip: {
|
40
|
+
fallbackPlacements: ['right', 'bottom']
|
41
|
+
}
|
42
|
+
}, tooltipProps), /*#__PURE__*/React.createElement(Tooltip.Trigger, _extends({
|
43
|
+
inline: false,
|
44
|
+
role: undefined,
|
45
|
+
tag: tag
|
46
|
+
}, tag ? inputProps : {}), typeof Children.origin === 'function' && Children.origin(_objectSpread({
|
47
|
+
input: inputProps,
|
48
|
+
meta: meta
|
49
|
+
}, other))), /*#__PURE__*/React.createElement(Tooltip.Popper, {
|
50
|
+
id: uid,
|
51
|
+
ignorePortalsStacking: true
|
52
|
+
}, (_meta$error = meta.error) !== null && _meta$error !== void 0 ? _meta$error : lastErrorRef.current));
|
53
|
+
});
|
54
|
+
}
|
55
|
+
FeedbackItem.enhance = [uniqueIDEnhancement()];
|
56
|
+
//# sourceMappingURL=FeedbackItem.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FeedbackItem.js","names":["React","Field","Tooltip","pick","uniqueIDEnhancement","deafultTooltipPropsList","FeedbackItem","_ref","Children","tag","uid","_ref$tooltipProps","tooltipProps","tooltipPropsList","props","_objectWithoutProperties","_excluded","lastErrorRef","useRef","undefined","createElement","_ref2","_meta$error","input","meta","other","_excluded2","showError","validateOnBlur","submitFailed","invalid","touched","errorState","inputProps","_objectSpread","state","error","current","_extends","visible","active","theme","placement","flip","fallbackPlacements","Trigger","inline","role","origin","Popper","id","ignorePortalsStacking","enhance"],"sources":["../../../../src/component/feedback-item/FeedbackItem.tsx"],"sourcesContent":["import React from 'react';\nimport { Field } from 'react-final-form';\nimport Tooltip from '@semcore/tooltip';\nimport pick from '@semcore/utils/lib/pick';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\n\nconst deafultTooltipPropsList = [\n 'title',\n 'theme',\n 'strategy',\n 'modifiers',\n 'placement',\n 'interaction',\n 'timeout',\n 'visible',\n 'defaultVisible',\n 'onVisibleChange',\n 'offset',\n 'preventOverflow',\n 'arrow',\n 'flip',\n 'computeStyles',\n 'eventListeners',\n 'onFirstUpdate',\n];\n\nexport function FeedbackItem({\n Children,\n tag,\n uid,\n tooltipProps: tooltipPropsList = deafultTooltipPropsList,\n ...props\n}: any) {\n const tooltipProps = pick(props, tooltipPropsList);\n const lastErrorRef = React.useRef(undefined);\n\n return (\n <Field {...props}>\n {({ input, meta, ...other }) => {\n const showError = other.validateOnBlur === false ? meta.submitFailed : true;\n const invalid = meta.invalid && meta.touched;\n const errorState = showError && invalid;\n const inputProps = {\n ...input,\n state: errorState ? 'invalid' : 'normal',\n 'aria-invalid': errorState ? true : false,\n 'aria-errormessage': uid,\n };\n if (meta?.error) lastErrorRef.current = meta.error;\n\n return (\n <Tooltip\n visible={errorState && meta.active}\n theme='warning'\n placement='left'\n flip={{\n fallbackPlacements: ['right', 'bottom'],\n }}\n {...tooltipProps}\n >\n <Tooltip.Trigger inline={false} role={undefined} tag={tag} {...(tag ? inputProps : {})}>\n {typeof Children.origin === 'function' &&\n Children.origin({\n input: inputProps,\n meta,\n ...other,\n })}\n </Tooltip.Trigger>\n <Tooltip.Popper id={uid} ignorePortalsStacking>\n {meta.error ?? lastErrorRef.current}\n </Tooltip.Popper>\n </Tooltip>\n );\n }}\n </Field>\n );\n}\nFeedbackItem.enhance = [uniqueIDEnhancement()];\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,QAAQ,kBAAkB;AACxC,OAAOC,OAAO,MAAM,kBAAkB;AACtC,OAAOC,IAAI,MAAM,yBAAyB;AAC1C,OAAOC,m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