intergalactic 15.107.0-prerelease.0 → 15.108.0-prerelease.1
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 +53 -0
- package/accordion/lib/cjs/Accordion.js +9 -9
- package/accordion/lib/es6/Accordion.js +9 -9
- package/accordion/package.json +1 -1
- 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/animation/package.json +1 -1
- package/badge/lib/cjs/Badge.js +6 -6
- package/badge/lib/es6/Badge.js +6 -6
- package/badge/package.json +1 -1
- 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/base-trigger/package.json +1 -1
- package/breadcrumbs/lib/cjs/Breadcrumbs.js +8 -8
- package/breadcrumbs/lib/es6/Breadcrumbs.js +8 -8
- package/breadcrumbs/package.json +1 -1
- package/breakpoints/package.json +1 -1
- package/button/component/AbstractButton/AbstractButton.d.ts +24 -0
- package/button/component/AbstractButton/AbstractButton.type.d.ts +39 -0
- package/button/component/AbstractButton/SpinButton.d.ts +3 -0
- package/button/component/Button/Button.d.ts +3 -0
- package/button/component/Button/Button.type.d.ts +39 -0
- package/button/component/ButtonLink/ButtonLink.d.ts +2 -0
- package/button/component/ButtonLink/ButtonLink.type.d.ts +25 -0
- package/button/index.d.ts +5 -68
- package/button/lib/cjs/component/AbstractButton/AbstractButton.js +182 -0
- package/button/lib/cjs/component/AbstractButton/AbstractButton.js.map +1 -0
- package/button/lib/cjs/component/AbstractButton/AbstractButton.type.js +2 -0
- package/button/lib/cjs/component/AbstractButton/AbstractButton.type.js.map +1 -0
- package/button/lib/cjs/component/AbstractButton/SpinButton.js.map +1 -0
- package/button/lib/cjs/component/Button/Button.js +94 -0
- package/button/lib/cjs/component/Button/Button.js.map +1 -0
- package/button/lib/cjs/component/Button/Button.type.js +2 -0
- package/button/lib/cjs/component/Button/Button.type.js.map +1 -0
- package/button/lib/cjs/{style → component/Button}/button.shadow.css +1 -1
- package/button/lib/cjs/component/ButtonLink/ButtonLink.js +92 -0
- package/button/lib/cjs/component/ButtonLink/ButtonLink.js.map +1 -0
- package/button/lib/cjs/component/ButtonLink/ButtonLink.type.js +2 -0
- package/button/lib/cjs/component/ButtonLink/ButtonLink.type.js.map +1 -0
- package/button/lib/cjs/component/ButtonLink/buttonLink.shadow.css +160 -0
- package/button/lib/cjs/index.js +40 -6
- package/button/lib/cjs/index.js.map +1 -1
- package/button/lib/es6/component/AbstractButton/AbstractButton.js +175 -0
- package/button/lib/es6/component/AbstractButton/AbstractButton.js.map +1 -0
- package/button/lib/es6/component/AbstractButton/AbstractButton.type.js +2 -0
- package/button/lib/es6/component/AbstractButton/AbstractButton.type.js.map +1 -0
- package/button/lib/es6/component/AbstractButton/SpinButton.js.map +1 -0
- package/button/lib/es6/component/Button/Button.js +87 -0
- package/button/lib/es6/component/Button/Button.js.map +1 -0
- package/button/lib/es6/component/Button/Button.type.js +2 -0
- package/button/lib/es6/component/Button/Button.type.js.map +1 -0
- package/button/lib/es6/{style → component/Button}/button.shadow.css +1 -1
- package/button/lib/es6/component/ButtonLink/ButtonLink.js +85 -0
- package/button/lib/es6/component/ButtonLink/ButtonLink.js.map +1 -0
- package/button/lib/es6/component/ButtonLink/ButtonLink.type.js +2 -0
- package/button/lib/es6/component/ButtonLink/ButtonLink.type.js.map +1 -0
- package/button/lib/es6/component/ButtonLink/buttonLink.shadow.css +160 -0
- package/button/lib/es6/index.js +5 -2
- package/button/lib/es6/index.js.map +1 -1
- package/button/lib/types/component/AbstractButton/AbstractButton.d.ts +24 -0
- package/button/lib/types/component/AbstractButton/AbstractButton.type.d.ts +39 -0
- package/button/lib/types/component/AbstractButton/SpinButton.d.ts +3 -0
- package/button/lib/types/component/Button/Button.d.ts +3 -0
- package/button/lib/types/component/Button/Button.type.d.ts +39 -0
- package/button/lib/types/component/ButtonLink/ButtonLink.d.ts +2 -0
- package/button/lib/types/component/ButtonLink/ButtonLink.type.d.ts +25 -0
- package/button/lib/types/index.d.ts +5 -68
- package/button/package.json +1 -1
- package/card/lib/cjs/Card.js +19 -22
- package/card/lib/cjs/Card.js.map +1 -1
- package/card/lib/cjs/style/card.shadow.css +13 -15
- package/card/lib/es6/Card.js +19 -22
- package/card/lib/es6/Card.js.map +1 -1
- package/card/lib/es6/style/card.shadow.css +13 -15
- package/card/package.json +1 -1
- package/carousel/lib/cjs/Carousel.js +79 -57
- package/carousel/lib/cjs/Carousel.js.map +1 -1
- package/carousel/lib/cjs/style/carousel.shadow.css +48 -4
- package/carousel/lib/cjs/translations/de.json +4 -2
- package/carousel/lib/cjs/translations/en.json +4 -2
- package/carousel/lib/cjs/translations/es.json +4 -2
- package/carousel/lib/cjs/translations/fr.json +4 -2
- package/carousel/lib/cjs/translations/it.json +4 -2
- package/carousel/lib/cjs/translations/ja.json +4 -2
- package/carousel/lib/cjs/translations/ko.json +4 -2
- package/carousel/lib/cjs/translations/nl.json +4 -2
- package/carousel/lib/cjs/translations/pl.json +4 -2
- package/carousel/lib/cjs/translations/pt.json +4 -2
- package/carousel/lib/cjs/translations/sv.json +4 -2
- package/carousel/lib/cjs/translations/tr.json +4 -2
- package/carousel/lib/cjs/translations/vi.json +4 -2
- package/carousel/lib/cjs/translations/zh.json +4 -2
- package/carousel/lib/es6/Carousel.js +79 -57
- package/carousel/lib/es6/Carousel.js.map +1 -1
- package/carousel/lib/es6/style/carousel.shadow.css +48 -4
- package/carousel/lib/es6/translations/de.json +4 -2
- package/carousel/lib/es6/translations/en.json +4 -2
- package/carousel/lib/es6/translations/es.json +4 -2
- package/carousel/lib/es6/translations/fr.json +4 -2
- package/carousel/lib/es6/translations/it.json +4 -2
- package/carousel/lib/es6/translations/ja.json +4 -2
- package/carousel/lib/es6/translations/ko.json +4 -2
- package/carousel/lib/es6/translations/nl.json +4 -2
- package/carousel/lib/es6/translations/pl.json +4 -2
- package/carousel/lib/es6/translations/pt.json +4 -2
- package/carousel/lib/es6/translations/sv.json +4 -2
- package/carousel/lib/es6/translations/tr.json +4 -2
- package/carousel/lib/es6/translations/vi.json +4 -2
- package/carousel/lib/es6/translations/zh.json +4 -2
- package/carousel/lib/types/translations/__intergalactic-dynamic-locales.d.ts +28 -0
- package/carousel/package.json +1 -1
- package/carousel/translations/__intergalactic-dynamic-locales.d.ts +28 -0
- package/checkbox/lib/cjs/Checkbox.js +18 -18
- package/checkbox/lib/es6/Checkbox.js +18 -18
- package/checkbox/package.json +1 -1
- package/color-picker/lib/cjs/ColorPicker.js +24 -24
- package/color-picker/lib/cjs/PaletteManager.js +24 -24
- package/color-picker/lib/cjs/components/InputColor.js +24 -24
- package/color-picker/lib/es6/ColorPicker.js +24 -24
- package/color-picker/lib/es6/PaletteManager.js +24 -24
- package/color-picker/lib/es6/components/InputColor.js +24 -24
- package/color-picker/package.json +1 -1
- package/components.json +73 -73
- package/core/package.json +1 -1
- package/counter/lib/cjs/Counter.js +11 -11
- package/counter/lib/es6/Counter.js +11 -11
- package/counter/package.json +1 -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 +16 -16
- package/d3-chart/lib/cjs/Bubble.js +12 -12
- package/d3-chart/lib/cjs/CompactHorizontalBar.js +16 -16
- 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 +16 -16
- 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 +12 -12
- 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 +16 -16
- package/d3-chart/lib/es6/Bubble.js +12 -12
- package/d3-chart/lib/es6/CompactHorizontalBar.js +16 -16
- 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 +16 -16
- 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 +12 -12
- 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/d3-chart/package.json +1 -1
- package/data-table/Body.d.ts +4 -1
- package/data-table/DataTable.d.ts +15 -58
- package/data-table/Head.d.ts +8 -2
- package/data-table/lib/cjs/Body.js +62 -12
- package/data-table/lib/cjs/Body.js.map +1 -1
- package/data-table/lib/cjs/DataTable.js +206 -45
- package/data-table/lib/cjs/DataTable.js.map +1 -1
- package/data-table/lib/cjs/Head.js +87 -16
- package/data-table/lib/cjs/Head.js.map +1 -1
- package/data-table/lib/cjs/style/data-table.shadow.css +14 -0
- package/data-table/lib/cjs/translations/__intergalactic-dynamic-locales.js +39 -0
- package/data-table/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/data-table/lib/cjs/translations/de.json +3 -0
- package/data-table/lib/cjs/translations/en.json +3 -0
- package/data-table/lib/cjs/translations/es.json +3 -0
- package/data-table/lib/cjs/translations/fr.json +3 -0
- package/data-table/lib/cjs/translations/it.json +3 -0
- package/data-table/lib/cjs/translations/ja.json +3 -0
- package/data-table/lib/cjs/translations/ko.json +3 -0
- package/data-table/lib/cjs/translations/nl.json +3 -0
- package/data-table/lib/cjs/translations/pl.json +3 -0
- package/data-table/lib/cjs/translations/pt.json +3 -0
- package/data-table/lib/cjs/translations/sv.json +3 -0
- package/data-table/lib/cjs/translations/tr.json +3 -0
- package/data-table/lib/cjs/translations/vi.json +3 -0
- package/data-table/lib/cjs/translations/zh.json +3 -0
- package/data-table/lib/cjs/types.js.map +1 -1
- package/data-table/lib/es6/Body.js +62 -12
- package/data-table/lib/es6/Body.js.map +1 -1
- package/data-table/lib/es6/DataTable.js +207 -45
- package/data-table/lib/es6/DataTable.js.map +1 -1
- package/data-table/lib/es6/Head.js +87 -16
- package/data-table/lib/es6/Head.js.map +1 -1
- package/data-table/lib/es6/style/data-table.shadow.css +14 -0
- package/data-table/lib/es6/translations/__intergalactic-dynamic-locales.js +31 -0
- package/data-table/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/data-table/lib/es6/translations/de.json +3 -0
- package/data-table/lib/es6/translations/en.json +3 -0
- package/data-table/lib/es6/translations/es.json +3 -0
- package/data-table/lib/es6/translations/fr.json +3 -0
- package/data-table/lib/es6/translations/it.json +3 -0
- package/data-table/lib/es6/translations/ja.json +3 -0
- package/data-table/lib/es6/translations/ko.json +3 -0
- package/data-table/lib/es6/translations/nl.json +3 -0
- package/data-table/lib/es6/translations/pl.json +3 -0
- package/data-table/lib/es6/translations/pt.json +3 -0
- package/data-table/lib/es6/translations/sv.json +3 -0
- package/data-table/lib/es6/translations/tr.json +3 -0
- package/data-table/lib/es6/translations/vi.json +3 -0
- package/data-table/lib/es6/translations/zh.json +3 -0
- package/data-table/lib/es6/types.js.map +1 -1
- package/data-table/lib/types/Body.d.ts +4 -1
- package/data-table/lib/types/DataTable.d.ts +15 -58
- package/data-table/lib/types/Head.d.ts +8 -2
- package/data-table/lib/types/translations/__intergalactic-dynamic-locales.d.ts +44 -0
- package/data-table/lib/types/types.d.ts +2 -0
- package/data-table/package.json +1 -1
- package/data-table/translations/__intergalactic-dynamic-locales.d.ts +44 -0
- package/data-table/types.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 +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/date-picker/package.json +1 -1
- package/divider/lib/cjs/Divider.js +10 -10
- package/divider/lib/es6/Divider.js +10 -10
- package/divider/package.json +1 -1
- package/dot/lib/cjs/Dot.js +10 -10
- package/dot/lib/es6/Dot.js +10 -10
- package/dot/package.json +1 -1
- package/drag-and-drop/lib/cjs/DragAndDrop.js +16 -16
- package/drag-and-drop/lib/es6/DragAndDrop.js +16 -16
- package/drag-and-drop/package.json +1 -1
- package/dropdown/lib/cjs/Dropdown.js +2 -2
- package/dropdown/lib/es6/Dropdown.js +2 -2
- package/dropdown/package.json +1 -1
- package/dropdown-menu/lib/cjs/DropdownMenu.js +25 -25
- package/dropdown-menu/lib/cjs/DropdownMenuOld.js +21 -21
- package/dropdown-menu/lib/es6/DropdownMenu.js +25 -25
- package/dropdown-menu/lib/es6/DropdownMenuOld.js +21 -21
- package/dropdown-menu/package.json +1 -1
- package/ellipsis/lib/cjs/Ellipsis.js +10 -10
- package/ellipsis/lib/es6/Ellipsis.js +10 -10
- package/ellipsis/package.json +1 -1
- package/errors/lib/cjs/Error.js +9 -9
- package/errors/lib/es6/Error.js +9 -9
- package/errors/package.json +1 -1
- package/feature-popover/lib/cjs/FeaturePopover.js +11 -11
- package/feature-popover/lib/es6/FeaturePopover.js +11 -11
- package/feature-popover/package.json +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/feedback-form/package.json +1 -1
- 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/flags/package.json +1 -1
- 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/flex-box/package.json +1 -1
- package/format-text/lib/cjs/FormatText.js +5 -5
- package/format-text/lib/es6/FormatText.js +5 -5
- package/format-text/package.json +1 -1
- package/fullscreen-modal/lib/cjs/FullscreenModal.js +13 -13
- package/fullscreen-modal/lib/es6/FullscreenModal.js +13 -13
- package/fullscreen-modal/package.json +1 -1
- package/grid/lib/cjs/Grid.js +114 -114
- package/grid/lib/es6/Grid.js +114 -114
- package/grid/package.json +1 -1
- package/i18n-unplugin/package.json +1 -1
- 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 +6 -6
- package/icon/lib/es6/Icon.js +6 -6
- package/icon/package.json +1 -1
- 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/illustration/package.json +1 -1
- package/inline-edit/lib/cjs/InlineEdit.js +4 -4
- package/inline-edit/lib/es6/InlineEdit.js +4 -4
- package/inline-edit/package.json +1 -1
- package/inline-input/index.d.ts +11 -2
- package/inline-input/lib/cjs/InlineInput.js +31 -35
- package/inline-input/lib/cjs/InlineInput.js.map +1 -1
- package/inline-input/lib/cjs/index.d.js.map +1 -1
- package/inline-input/lib/cjs/style/inline-input.shadow.css +1 -1
- package/inline-input/lib/es6/InlineInput.js +31 -35
- package/inline-input/lib/es6/InlineInput.js.map +1 -1
- package/inline-input/lib/es6/index.d.js.map +1 -1
- package/inline-input/lib/es6/style/inline-input.shadow.css +1 -1
- package/inline-input/lib/types/index.d.ts +11 -2
- package/inline-input/package.json +1 -1
- package/input/lib/cjs/Input.js +17 -17
- package/input/lib/es6/Input.js +17 -17
- package/input/package.json +1 -1
- package/input-mask/lib/cjs/InputMask.js +6 -6
- package/input-mask/lib/es6/InputMask.js +6 -6
- package/input-mask/package.json +1 -1
- package/input-number/lib/cjs/InputNumber.js +9 -9
- package/input-number/lib/es6/InputNumber.js +9 -9
- package/input-number/package.json +1 -1
- package/input-tags/InputTags.d.ts +1 -0
- package/input-tags/lib/cjs/InputTags.js +67 -36
- package/input-tags/lib/cjs/InputTags.js.map +1 -1
- package/input-tags/lib/cjs/style/input-tag.shadow.css +2 -2
- package/input-tags/lib/cjs/translations/__intergalactic-dynamic-locales.js +39 -0
- package/input-tags/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/input-tags/lib/cjs/translations/de.json +3 -0
- package/input-tags/lib/cjs/translations/en.json +3 -0
- package/input-tags/lib/cjs/translations/es.json +3 -0
- package/input-tags/lib/cjs/translations/fr.json +3 -0
- package/input-tags/lib/cjs/translations/it.json +3 -0
- package/input-tags/lib/cjs/translations/ja.json +3 -0
- package/input-tags/lib/cjs/translations/ko.json +3 -0
- package/input-tags/lib/cjs/translations/nl.json +3 -0
- package/input-tags/lib/cjs/translations/pl.json +3 -0
- package/input-tags/lib/cjs/translations/pt.json +3 -0
- package/input-tags/lib/cjs/translations/sv.json +3 -0
- package/input-tags/lib/cjs/translations/tr.json +3 -0
- package/input-tags/lib/cjs/translations/vi.json +3 -0
- package/input-tags/lib/cjs/translations/zh.json +3 -0
- package/input-tags/lib/es6/InputTags.js +68 -36
- package/input-tags/lib/es6/InputTags.js.map +1 -1
- package/input-tags/lib/es6/style/input-tag.shadow.css +2 -2
- package/input-tags/lib/es6/translations/__intergalactic-dynamic-locales.js +31 -0
- package/input-tags/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/input-tags/lib/es6/translations/de.json +3 -0
- package/input-tags/lib/es6/translations/en.json +3 -0
- package/input-tags/lib/es6/translations/es.json +3 -0
- package/input-tags/lib/es6/translations/fr.json +3 -0
- package/input-tags/lib/es6/translations/it.json +3 -0
- package/input-tags/lib/es6/translations/ja.json +3 -0
- package/input-tags/lib/es6/translations/ko.json +3 -0
- package/input-tags/lib/es6/translations/nl.json +3 -0
- package/input-tags/lib/es6/translations/pl.json +3 -0
- package/input-tags/lib/es6/translations/pt.json +3 -0
- package/input-tags/lib/es6/translations/sv.json +3 -0
- package/input-tags/lib/es6/translations/tr.json +3 -0
- package/input-tags/lib/es6/translations/vi.json +3 -0
- package/input-tags/lib/es6/translations/zh.json +3 -0
- package/input-tags/lib/types/InputTags.d.ts +1 -0
- package/input-tags/lib/types/translations/__intergalactic-dynamic-locales.d.ts +44 -0
- package/input-tags/package.json +1 -1
- package/input-tags/translations/__intergalactic-dynamic-locales.d.ts +44 -0
- package/link/lib/cjs/Link.js +12 -12
- package/link/lib/es6/Link.js +12 -12
- package/link/package.json +1 -1
- 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/mini-chart/package.json +1 -1
- package/modal/lib/cjs/Modal.js +8 -8
- package/modal/lib/es6/Modal.js +8 -8
- package/modal/package.json +1 -1
- package/neighbor-location/package.json +1 -1
- package/notice/lib/cjs/Notice.js +14 -14
- package/notice/lib/es6/Notice.js +14 -14
- package/notice/package.json +1 -1
- package/notice-bubble/lib/cjs/NoticeBubble.js +15 -15
- package/notice-bubble/lib/es6/NoticeBubble.js +15 -15
- package/notice-bubble/package.json +1 -1
- package/notice-global/lib/cjs/NoticeGlobal.js +11 -11
- package/notice-global/lib/es6/NoticeGlobal.js +11 -11
- package/notice-global/package.json +1 -1
- package/outside-click/package.json +1 -1
- package/package.json +1 -1
- package/pagination/lib/cjs/Pagination.js +12 -16
- package/pagination/lib/cjs/Pagination.js.map +1 -1
- package/pagination/lib/es6/Pagination.js +12 -16
- package/pagination/lib/es6/Pagination.js.map +1 -1
- package/pagination/package.json +1 -1
- package/pills/lib/cjs/Pills.js +13 -13
- package/pills/lib/es6/Pills.js +13 -13
- package/pills/package.json +1 -1
- package/popper/lib/cjs/Popper.js +6 -6
- package/popper/lib/es6/Popper.js +6 -6
- package/popper/package.json +1 -1
- package/portal/package.json +1 -1
- 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/product-head/package.json +1 -1
- package/progress-bar/lib/cjs/ProgressBar.js +15 -15
- package/progress-bar/lib/es6/ProgressBar.js +15 -15
- package/progress-bar/package.json +1 -1
- package/radio/lib/cjs/Radio.js +16 -16
- package/radio/lib/es6/Radio.js +16 -16
- package/radio/package.json +1 -1
- 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/scroll-area/package.json +1 -1
- 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/select/package.json +1 -1
- package/side-panel/lib/cjs/SidePanel.js +23 -28
- package/side-panel/lib/cjs/SidePanel.js.map +1 -1
- package/side-panel/lib/cjs/style/side-panel.shadow.css +8 -30
- package/side-panel/lib/es6/SidePanel.js +23 -28
- package/side-panel/lib/es6/SidePanel.js.map +1 -1
- package/side-panel/lib/es6/style/side-panel.shadow.css +8 -30
- package/side-panel/package.json +1 -1
- 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/CompactHorizontalBar.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/CompactHorizontalBar.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/skeleton/package.json +1 -1
- package/slider/lib/cjs/Slider.js +8 -8
- package/slider/lib/es6/Slider.js +8 -8
- package/slider/package.json +1 -1
- package/spin/lib/cjs/Spin.js +13 -13
- package/spin/lib/es6/Spin.js +13 -13
- package/spin/package.json +1 -1
- package/spin-container/lib/cjs/SpinContainer.js +8 -8
- package/spin-container/lib/es6/SpinContainer.js +8 -8
- package/spin-container/package.json +1 -1
- package/sticky/lib/cjs/Sticky.js +2 -2
- package/sticky/lib/es6/Sticky.js +2 -2
- package/sticky/package.json +1 -1
- package/switch/lib/cjs/Switch.js +21 -21
- package/switch/lib/es6/Switch.js +21 -21
- package/switch/package.json +1 -1
- package/tab-line/lib/cjs/TabLine.js +13 -13
- package/tab-line/lib/es6/TabLine.js +13 -13
- package/tab-line/package.json +1 -1
- package/tab-panel/lib/cjs/TabPanel.js +8 -8
- package/tab-panel/lib/es6/TabPanel.js +8 -8
- package/tab-panel/package.json +1 -1
- package/tag/index.d.ts +2 -0
- package/tag/lib/cjs/Tag.js +167 -95
- package/tag/lib/cjs/Tag.js.map +1 -1
- package/tag/lib/cjs/index.d.js.map +1 -1
- package/tag/lib/cjs/style/tag.shadow.css +125 -90
- package/tag/lib/cjs/translations/de.json +1 -1
- package/tag/lib/cjs/translations/en.json +1 -1
- package/tag/lib/cjs/translations/es.json +1 -1
- package/tag/lib/cjs/translations/fr.json +1 -1
- package/tag/lib/cjs/translations/it.json +1 -1
- package/tag/lib/cjs/translations/ja.json +1 -1
- package/tag/lib/cjs/translations/ko.json +1 -1
- package/tag/lib/cjs/translations/nl.json +1 -1
- package/tag/lib/cjs/translations/pl.json +1 -1
- package/tag/lib/cjs/translations/pt.json +1 -1
- package/tag/lib/cjs/translations/sv.json +1 -1
- package/tag/lib/cjs/translations/tr.json +1 -1
- package/tag/lib/cjs/translations/vi.json +1 -1
- package/tag/lib/cjs/translations/zh.json +1 -1
- package/tag/lib/es6/Tag.js +168 -95
- package/tag/lib/es6/Tag.js.map +1 -1
- package/tag/lib/es6/index.d.js.map +1 -1
- package/tag/lib/es6/style/tag.shadow.css +125 -90
- package/tag/lib/es6/translations/de.json +1 -1
- package/tag/lib/es6/translations/en.json +1 -1
- package/tag/lib/es6/translations/es.json +1 -1
- package/tag/lib/es6/translations/fr.json +1 -1
- package/tag/lib/es6/translations/it.json +1 -1
- package/tag/lib/es6/translations/ja.json +1 -1
- package/tag/lib/es6/translations/ko.json +1 -1
- package/tag/lib/es6/translations/nl.json +1 -1
- package/tag/lib/es6/translations/pl.json +1 -1
- package/tag/lib/es6/translations/pt.json +1 -1
- package/tag/lib/es6/translations/sv.json +1 -1
- package/tag/lib/es6/translations/tr.json +1 -1
- package/tag/lib/es6/translations/vi.json +1 -1
- package/tag/lib/es6/translations/zh.json +1 -1
- package/tag/lib/types/index.d.ts +2 -0
- package/tag/package.json +1 -1
- package/textarea/lib/cjs/Textarea.js +8 -8
- package/textarea/lib/es6/Textarea.js +8 -8
- package/textarea/package.json +1 -1
- package/time-picker/lib/cjs/TimePicker.js +12 -12
- package/time-picker/lib/es6/TimePicker.js +12 -12
- package/time-picker/package.json +1 -1
- package/tooltip/lib/cjs/Tooltip.js +9 -9
- package/tooltip/lib/es6/Tooltip.js +9 -9
- package/tooltip/package.json +1 -1
- 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/typography/package.json +1 -1
- 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/focus-lock/isFocusable.js +6 -1
- package/utils/lib/focus-lock/isFocusable.js.map +1 -1
- package/utils/lib/focus-lock/isFocusable.mjs +6 -1
- package/utils/lib/focus-lock/isFocusable.mjs.map +1 -1
- package/utils/lib/injectStyle.js +1 -1
- package/utils/lib/injectStyle.mjs +1 -1
- package/widget-empty/lib/cjs/WidgetEmpty.js +5 -5
- package/widget-empty/lib/es6/WidgetEmpty.js +5 -5
- package/widget-empty/package.json +1 -1
- package/wizard/index.d.ts +17 -0
- package/wizard/lib/cjs/Wizard.js +201 -47
- package/wizard/lib/cjs/Wizard.js.map +1 -1
- package/wizard/lib/cjs/index.d.js.map +1 -1
- package/wizard/lib/cjs/style/wizard.shadow.css +4 -0
- package/wizard/lib/cjs/translations/de.json +3 -1
- package/wizard/lib/cjs/translations/en.json +3 -1
- package/wizard/lib/cjs/translations/es.json +3 -1
- package/wizard/lib/cjs/translations/fr.json +3 -1
- package/wizard/lib/cjs/translations/it.json +3 -1
- package/wizard/lib/cjs/translations/ja.json +3 -1
- package/wizard/lib/cjs/translations/ko.json +3 -1
- package/wizard/lib/cjs/translations/nl.json +3 -1
- package/wizard/lib/cjs/translations/pl.json +3 -1
- package/wizard/lib/cjs/translations/pt.json +3 -1
- package/wizard/lib/cjs/translations/sv.json +3 -1
- package/wizard/lib/cjs/translations/tr.json +3 -1
- package/wizard/lib/cjs/translations/vi.json +3 -1
- package/wizard/lib/cjs/translations/zh.json +3 -1
- package/wizard/lib/es6/Wizard.js +203 -47
- package/wizard/lib/es6/Wizard.js.map +1 -1
- package/wizard/lib/es6/index.d.js.map +1 -1
- package/wizard/lib/es6/style/wizard.shadow.css +4 -0
- package/wizard/lib/es6/translations/de.json +3 -1
- package/wizard/lib/es6/translations/en.json +3 -1
- package/wizard/lib/es6/translations/es.json +3 -1
- package/wizard/lib/es6/translations/fr.json +3 -1
- package/wizard/lib/es6/translations/it.json +3 -1
- package/wizard/lib/es6/translations/ja.json +3 -1
- package/wizard/lib/es6/translations/ko.json +3 -1
- package/wizard/lib/es6/translations/nl.json +3 -1
- package/wizard/lib/es6/translations/pl.json +3 -1
- package/wizard/lib/es6/translations/pt.json +3 -1
- package/wizard/lib/es6/translations/sv.json +3 -1
- package/wizard/lib/es6/translations/tr.json +3 -1
- package/wizard/lib/es6/translations/vi.json +3 -1
- package/wizard/lib/es6/translations/zh.json +3 -1
- package/wizard/lib/types/index.d.ts +17 -0
- package/wizard/package.json +1 -1
- package/button/lib/cjs/Button.js +0 -237
- package/button/lib/cjs/Button.js.map +0 -1
- package/button/lib/cjs/SpinButton.js.map +0 -1
- package/button/lib/cjs/index.d.js +0 -2
- package/button/lib/cjs/index.d.js.map +0 -1
- package/button/lib/es6/Button.js +0 -231
- package/button/lib/es6/Button.js.map +0 -1
- package/button/lib/es6/SpinButton.js.map +0 -1
- package/button/lib/es6/index.d.js +0 -2
- package/button/lib/es6/index.d.js.map +0 -1
- /package/button/lib/cjs/{SpinButton.js → component/AbstractButton/SpinButton.js} +0 -0
- /package/button/lib/es6/{SpinButton.js → component/AbstractButton/SpinButton.js} +0 -0
@@ -0,0 +1,182 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
exports.MAP_USE_DEFAULT_THEME = exports.AbstractButton = void 0;
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
9
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
10
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
11
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
13
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
15
|
+
var _core = require("intergalactic/core");
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
17
|
+
var _flexBox = require("intergalactic/flex-box");
|
18
|
+
var _tooltip = require("intergalactic/tooltip");
|
19
|
+
var _neighborLocation = _interopRequireDefault(require("intergalactic/neighbor-location"));
|
20
|
+
var _addonTextChildren = _interopRequireDefault(require("intergalactic/utils/lib/addonTextChildren"));
|
21
|
+
var _logger = _interopRequireDefault(require("intergalactic/utils/lib/logger"));
|
22
|
+
var _SpinButton = _interopRequireDefault(require("./SpinButton"));
|
23
|
+
var _hasLabels = _interopRequireDefault(require("intergalactic/utils/lib/hasLabels"));
|
24
|
+
var MAP_USE_DEFAULT_THEME = {
|
25
|
+
primary: 'info',
|
26
|
+
secondary: 'muted',
|
27
|
+
tertiary: 'info'
|
28
|
+
};
|
29
|
+
exports.MAP_USE_DEFAULT_THEME = MAP_USE_DEFAULT_THEME;
|
30
|
+
var AbstractButton = /*#__PURE__*/function (_Component) {
|
31
|
+
(0, _inherits2["default"])(AbstractButton, _Component);
|
32
|
+
var _super = (0, _createSuper2["default"])(AbstractButton);
|
33
|
+
function AbstractButton() {
|
34
|
+
var _this;
|
35
|
+
(0, _classCallCheck2["default"])(this, AbstractButton);
|
36
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
37
|
+
args[_key] = arguments[_key];
|
38
|
+
}
|
39
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
40
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "containerRef", /*#__PURE__*/_react["default"].createRef());
|
41
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
|
42
|
+
ariaLabelledByContent: null
|
43
|
+
});
|
44
|
+
return _this;
|
45
|
+
}
|
46
|
+
(0, _createClass2["default"])(AbstractButton, [{
|
47
|
+
key: "getTextProps",
|
48
|
+
value: function getTextProps() {
|
49
|
+
var size = this.asProps.size;
|
50
|
+
return {
|
51
|
+
size: size
|
52
|
+
};
|
53
|
+
}
|
54
|
+
}, {
|
55
|
+
key: "getAddonProps",
|
56
|
+
value: function getAddonProps() {
|
57
|
+
var size = this.asProps.size;
|
58
|
+
return {
|
59
|
+
size: size
|
60
|
+
};
|
61
|
+
}
|
62
|
+
}, {
|
63
|
+
key: "componentDidMount",
|
64
|
+
value: function componentDidMount() {
|
65
|
+
var _this2 = this;
|
66
|
+
if (process.env.NODE_ENV !== 'production') {
|
67
|
+
_logger["default"].warn(this.containerRef.current && !(0, _hasLabels["default"])(this.containerRef.current) && !this.asProps.title, "'title' or 'aria-label' or 'aria-labelledby' are required props for buttons without text content", this.asProps['data-ui-name'] || AbstractButton.displayName);
|
68
|
+
}
|
69
|
+
var ariaLabelledby = this.asProps['aria-labelledby'];
|
70
|
+
if (ariaLabelledby) {
|
71
|
+
setTimeout(function () {
|
72
|
+
var _document$getElementB, _document$getElementB2;
|
73
|
+
_this2.setState({
|
74
|
+
ariaLabelledByContent: (_document$getElementB = (_document$getElementB2 = document.getElementById(ariaLabelledby)) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2.textContent) !== null && _document$getElementB !== void 0 ? _document$getElementB : ''
|
75
|
+
});
|
76
|
+
}, 0);
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}, {
|
80
|
+
key: "renderButton",
|
81
|
+
value: function renderButton(_ref6) {
|
82
|
+
var _ref = this.asProps,
|
83
|
+
_ref3;
|
84
|
+
var buttonProps = _ref6.buttonProps,
|
85
|
+
children = _ref6.children;
|
86
|
+
var styles = this.asProps.styles;
|
87
|
+
var SButton = _flexBox.Box;
|
88
|
+
return _ref3 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SButton, _ref3.cn("SButton", (0, _objectSpread2["default"])({}, (0, _core.assignProps)((0, _objectSpread2["default"])({}, buttonProps), _ref))), children);
|
89
|
+
}
|
90
|
+
}, {
|
91
|
+
key: "renderButtonWithHint",
|
92
|
+
value: function renderButtonWithHint(_ref7) {
|
93
|
+
var _ref2 = this.asProps,
|
94
|
+
_ref4;
|
95
|
+
var buttonProps = _ref7.buttonProps,
|
96
|
+
children = _ref7.children,
|
97
|
+
hintProps = _ref7.hintProps;
|
98
|
+
var styles = this.asProps.styles;
|
99
|
+
var SButton = _tooltip.Hint;
|
100
|
+
return _ref4 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SButton, _ref4.cn("SButton", (0, _objectSpread2["default"])({}, (0, _core.assignProps)((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, buttonProps), hintProps), _ref2))), children);
|
101
|
+
}
|
102
|
+
}, {
|
103
|
+
key: "render",
|
104
|
+
value: function render() {
|
105
|
+
var _ref8,
|
106
|
+
_ref9,
|
107
|
+
_this3 = this;
|
108
|
+
var _this$asProps = this.asProps,
|
109
|
+
styles = _this$asProps.styles,
|
110
|
+
use = _this$asProps.use,
|
111
|
+
_this$asProps$theme = _this$asProps.theme,
|
112
|
+
theme = _this$asProps$theme === void 0 ? typeof use === 'string' && MAP_USE_DEFAULT_THEME[use] : _this$asProps$theme,
|
113
|
+
loading = _this$asProps.loading,
|
114
|
+
_this$asProps$disable = _this$asProps.disabled,
|
115
|
+
disabled = _this$asProps$disable === void 0 ? loading : _this$asProps$disable,
|
116
|
+
size = _this$asProps.size,
|
117
|
+
neighborLocation = _this$asProps.neighborLocation,
|
118
|
+
hasChildren = _this$asProps.children,
|
119
|
+
title = _this$asProps.title,
|
120
|
+
ariaLabel = _this$asProps['aria-label'],
|
121
|
+
Children = _this$asProps.Children,
|
122
|
+
AddonLeft = _this$asProps.addonLeft,
|
123
|
+
AddonRight = _this$asProps.addonRight,
|
124
|
+
hintPlacement = _this$asProps.hintPlacement;
|
125
|
+
// @ts-ignore
|
126
|
+
var Button = this[_core.CORE_INSTANCE];
|
127
|
+
var useTheme = use && theme ? "".concat(use, "-").concat(theme) : false;
|
128
|
+
var SInner = _flexBox.Box;
|
129
|
+
var SSpin = _flexBox.Box;
|
130
|
+
var buttonAriaLabel = (_ref8 = (_ref9 = title !== null && title !== void 0 ? title : ariaLabel) !== null && _ref9 !== void 0 ? _ref9 : this.state.ariaLabelledByContent) !== null && _ref8 !== void 0 ? _ref8 : '';
|
131
|
+
var buttonProps = {
|
132
|
+
type: 'button',
|
133
|
+
tag: 'button',
|
134
|
+
disabled: disabled,
|
135
|
+
'use:theme': useTheme,
|
136
|
+
ref: this.containerRef,
|
137
|
+
'text-color': this.getTextColor(),
|
138
|
+
'aria-busy': loading,
|
139
|
+
'aria-disabled': disabled,
|
140
|
+
__excludeProps: ['title']
|
141
|
+
};
|
142
|
+
var hintProps = {
|
143
|
+
title: buttonAriaLabel,
|
144
|
+
timeout: [250, 50],
|
145
|
+
placement: hintPlacement,
|
146
|
+
theme: theme === 'invert' ? 'invert' : undefined,
|
147
|
+
__excludeProps: []
|
148
|
+
};
|
149
|
+
return /*#__PURE__*/_react["default"].createElement(_neighborLocation["default"].Detect, {
|
150
|
+
neighborLocation: neighborLocation
|
151
|
+
}, function (neighborLocation) {
|
152
|
+
var _ref5;
|
153
|
+
var children = (_ref5 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(SInner, _ref5.cn("SInner", {
|
154
|
+
"tag": 'span',
|
155
|
+
"loading": loading
|
156
|
+
}), AddonLeft ? /*#__PURE__*/_react["default"].createElement(Button.Addon, null, /*#__PURE__*/_react["default"].createElement(AddonLeft, _ref5.cn("AddonLeft", {}))) : null, (0, _addonTextChildren["default"])(Children, Button.Text, Button.Addon), AddonRight ? /*#__PURE__*/_react["default"].createElement(Button.Addon, null, /*#__PURE__*/_react["default"].createElement(AddonRight, _ref5.cn("AddonRight", {}))) : null), loading && /*#__PURE__*/_react["default"].createElement(SSpin, _ref5.cn("SSpin", {
|
157
|
+
"tag": 'span'
|
158
|
+
}), /*#__PURE__*/_react["default"].createElement(_SpinButton["default"], _ref5.cn("SpinButton", {
|
159
|
+
"centered": true,
|
160
|
+
"size": size,
|
161
|
+
"theme": useTheme
|
162
|
+
})))));
|
163
|
+
buttonProps.neighborLocation = neighborLocation;
|
164
|
+
if (!hasChildren || title) {
|
165
|
+
return _this3.renderButtonWithHint({
|
166
|
+
buttonProps: buttonProps,
|
167
|
+
hintProps: hintProps,
|
168
|
+
children: children
|
169
|
+
});
|
170
|
+
}
|
171
|
+
return _this3.renderButton({
|
172
|
+
buttonProps: buttonProps,
|
173
|
+
children: children
|
174
|
+
});
|
175
|
+
});
|
176
|
+
}
|
177
|
+
}]);
|
178
|
+
return AbstractButton;
|
179
|
+
}(_core.Component);
|
180
|
+
exports.AbstractButton = AbstractButton;
|
181
|
+
(0, _defineProperty2["default"])(AbstractButton, "displayName", 'AbstractButton');
|
182
|
+
//# sourceMappingURL=AbstractButton.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AbstractButton.js","names":["_core","require","_react","_interopRequireDefault","_flexBox","_tooltip","_neighborLocation","_addonTextChildren","_logger","_SpinButton","_hasLabels","MAP_USE_DEFAULT_THEME","primary","secondary","tertiary","exports","AbstractButton","_Component","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","React","createRef","ariaLabelledByContent","_createClass2","key","value","getTextProps","size","asProps","getAddonProps","componentDidMount","_this2","process","env","NODE_ENV","logger","warn","containerRef","current","hasLabels","title","displayName","ariaLabelledby","setTimeout","_document$getElementB","_document$getElementB2","setState","document","getElementById","textContent","renderButton","_ref6","_ref","_ref3","buttonProps","children","styles","SButton","Box","sstyled","createElement","cn","_objectSpread2","assignProps","renderButtonWithHint","_ref7","_ref2","_ref4","hintProps","Hint","render","_ref8","_ref9","_this3","_this$asProps","use","_this$asProps$theme","theme","loading","_this$asProps$disable","disabled","neighborLocation","hasChildren","ariaLabel","Children","AddonLeft","addonLeft","AddonRight","addonRight","hintPlacement","Button","CORE_INSTANCE","useTheme","SInner","SSpin","buttonAriaLabel","state","type","tag","ref","getTextColor","__excludeProps","timeout","placement","undefined","Detect","_ref5","Fragment","Addon","addonTextChildren","Text","Component"],"sources":["../../../../src/component/AbstractButton/AbstractButton.tsx"],"sourcesContent":["import React from 'react';\nimport { Box } from '@semcore/flex-box';\nimport { Hint } from '@semcore/tooltip';\nimport NeighborLocation from '@semcore/neighbor-location';\nimport addonTextChildren from '@semcore/utils/lib/addonTextChildren';\nimport logger from '@semcore/utils/lib/logger';\nimport SpinButton from './SpinButton';\nimport hasLabels from '@semcore/utils/lib/hasLabels';\nimport { AbstractButtonProps } from './AbstractButton.type';\nimport { Component, CORE_INSTANCE, Root, sstyled } from '@semcore/core';\n\nexport const MAP_USE_DEFAULT_THEME: Record<string, string> = {\n primary: 'info',\n secondary: 'muted',\n tertiary: 'info',\n};\n\ntype Props = AbstractButtonProps<any, any, any>;\n\nexport abstract class AbstractButton extends Component<Props, {}, {}> {\n static displayName = 'AbstractButton';\n\n containerRef = React.createRef<HTMLButtonElement>();\n\n state = {\n ariaLabelledByContent: null,\n };\n\n protected abstract getTextColor(): string | undefined;\n\n getTextProps() {\n const { size } = this.asProps;\n\n return {\n size,\n };\n }\n\n getAddonProps() {\n const { size } = this.asProps;\n return {\n size,\n };\n }\n\n componentDidMount() {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(\n this.containerRef.current && !hasLabels(this.containerRef.current) && !this.asProps.title,\n `'title' or 'aria-label' or 'aria-labelledby' are required props for buttons without text content`,\n this.asProps['data-ui-name'] || AbstractButton.displayName,\n );\n }\n\n const ariaLabelledby = this.asProps['aria-labelledby'];\n\n if (ariaLabelledby) {\n setTimeout(() => {\n this.setState({\n ariaLabelledByContent: document.getElementById(ariaLabelledby)?.textContent ?? '',\n });\n }, 0);\n }\n }\n\n renderButton({ buttonProps, children }: any) {\n const { styles } = this.asProps;\n const SButton = Root;\n\n return sstyled(styles)(\n <SButton render={Box} {...buttonProps}>\n {children}\n </SButton>,\n );\n }\n\n renderButtonWithHint({ buttonProps, children, hintProps }: any) {\n const { styles } = this.asProps;\n const SButton = Root;\n\n return sstyled(styles)(\n <SButton render={Hint} {...buttonProps} {...hintProps}>\n {children}\n </SButton>,\n );\n }\n\n render() {\n const {\n styles,\n use,\n theme = typeof use === 'string' && MAP_USE_DEFAULT_THEME[use],\n loading,\n disabled = loading,\n size,\n neighborLocation,\n children: hasChildren,\n title,\n ['aria-label']: ariaLabel,\n Children,\n addonLeft: AddonLeft,\n addonRight: AddonRight,\n hintPlacement,\n } = this.asProps;\n // @ts-ignore\n const Button = this[CORE_INSTANCE];\n const useTheme = use && theme ? `${use}-${theme}` : false;\n const SInner = Box;\n const SSpin = Box;\n const buttonAriaLabel = title ?? ariaLabel ?? this.state.ariaLabelledByContent ?? '';\n\n const buttonProps: Record<string, any> = {\n type: 'button',\n tag: 'button',\n disabled,\n 'use:theme': useTheme,\n ref: this.containerRef,\n 'text-color': this.getTextColor(),\n 'aria-busy': loading,\n 'aria-disabled': disabled,\n __excludeProps: ['title'],\n };\n\n const hintProps = {\n title: buttonAriaLabel,\n timeout: [250, 50],\n placement: hintPlacement,\n theme: theme === 'invert' ? 'invert' : undefined,\n __excludeProps: [],\n };\n\n return (\n <NeighborLocation.Detect neighborLocation={neighborLocation}>\n {(neighborLocation) => {\n const children = sstyled(styles)(\n <>\n {/* @ts-ignore */}\n <SInner tag='span' loading={loading}>\n {AddonLeft ? (\n <Button.Addon>\n <AddonLeft />\n </Button.Addon>\n ) : null}\n {addonTextChildren(Children, Button.Text, Button.Addon)}\n {AddonRight ? (\n <Button.Addon>\n <AddonRight />\n </Button.Addon>\n ) : null}\n </SInner>\n {loading && (\n <SSpin tag='span'>\n <SpinButton centered size={size} theme={useTheme} />\n </SSpin>\n )}\n </>,\n );\n buttonProps.neighborLocation = neighborLocation;\n\n if (!hasChildren || title) {\n return this.renderButtonWithHint({ buttonProps, hintProps, children });\n }\n\n return this.renderButton({ buttonProps, children });\n }}\n </NeighborLocation.Detect>\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AASA,IAAAA,KAAA,GAAAC,OAAA;AATA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,kBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,OAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,WAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,UAAA,GAAAP,sBAAA,CAAAF,OAAA;AAIO,IAAMU,qBAA6C,GAAG;EAC3DC,OAAO,EAAE,MAAM;EACfC,SAAS,EAAE,OAAO;EAClBC,QAAQ,EAAE;AACZ,CAAC;AAACC,OAAA,CAAAJ,qBAAA,GAAAA,qBAAA;AAAA,IAIoBK,cAAc,0BAAAC,UAAA;EAAA,IAAAC,UAAA,aAAAF,cAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,cAAA;EAAA,SAAAA,eAAA;IAAA,IAAAK,KAAA;IAAA,IAAAC,gBAAA,mBAAAN,cAAA;IAAA,SAAAO,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA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ton/AbstractButton.type.ts"],"sourcesContent":["import React from 'react';\nimport { PropGetterFn } from '@semcore/core';\nimport { KeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport { BoxProps } from '@semcore/flex-box';\nimport { NeighborItemProps } from '@semcore/neighbor-location';\nimport { TooltipHintProps } from '@semcore/tooltip';\n\nexport type AbstractButtonProps<S, U, T> = BoxProps &\n NeighborItemProps &\n KeyboardFocusProps & {\n /** Button activity state */\n active?: boolean;\n /** Disabled button state */\n disabled?: boolean;\n /** Loading button state */\n loading?: boolean;\n /** Tag for the left Addon */\n addonLeft?: React.ElementType;\n /** Tag for the right Addon */\n addonRight?: React.ElementType;\n /**\n * Placement for hint\n * @default top\n */\n hintPlacement?: TooltipHintProps['placement'];\n\n /** Button type. Defined in Button.type or ButtonLink.type */\n size?: S;\n /** Button usage. Defined in Button.type or ButtonLink.type */\n use?: U;\n /** Button theme. Defined in Button.type or ButtonLink.type */\n theme?: T;\n };\n\nexport type AbstractButtonAddonProps<S> = BoxProps & {\n size?: S;\n};\n\nexport type AbstractButtonTextProps<S> = BoxProps & {\n size?: S;\n};\n\nexport type AbstractButtonContext = {\n getTextProps: PropGetterFn;\n getAddonProps: PropGetterFn;\n};\n"],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SpinButton.js","names":["_react","_interopRequireDefault","require","_spin","_excluded","SPIN_SIZE_MAP","xl","l","m","s","exports","SpinButton","_ref","theme","size","others","_objectWithoutProperties2","createElement","_extends2"],"sources":["../../../../src/component/AbstractButton/SpinButton.tsx"],"sourcesContent":["import React from 'react';\nimport Spin from '@semcore/spin';\n\nexport const SPIN_SIZE_MAP: Record<string, string> = {\n xl: 'm',\n l: 's',\n m: 'xs',\n s: 'xxs',\n};\n\nexport default function SpinButton({ theme, size, ...others }: any) {\n return (\n <Spin\n size={typeof size === 'string' ? SPIN_SIZE_MAP[size] : size}\n theme='currentColor'\n {...others}\n />\n );\n}\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAiC,IAAAE,SAAA;AAE1B,IAAMC,aAAqC,GAAG;EACnDC,EAAE,EAAE,GAAG;EACPC,CAAC,EAAE,GAAG;EACNC,CAAC,EAAE,IAAI;EACPC,CAAC,EAAE;AACL,CAAC;AAACC,OAAA,CAAAL,aAAA,GAAAA,aAAA;AAEa,SAASM,UAAUA,CAAAC,IAAA,EAAkC;EAAA,IAA/BC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAKC,MAAM,OAAAC,yBAAA,aAAAJ,IAAA,EAAAR,SAAA;EACzD,oBACEJ,MAAA,YAAAiB,aAAA,CAACd,KAAA,WAAI,MAAAe,SAAA;IACHJ,IAAI,EAAE,OAAOA,IAAI,KAAK,QAAQ,GAAGT,aAAa,CAACS,IAAI,CAAC,GAAGA,IAAK;IAC5DD,KAAK,EAAC;EAAc,GAChBE,MAAM,EACV;AAEN"}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports["default"] = void 0;
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
11
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
13
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
15
|
+
var _index = require("intergalactic/utils/lib/core/index");
|
16
|
+
var _core = _interopRequireWildcard(require("intergalactic/core"));
|
17
|
+
var _react = _interopRequireDefault(require("react"));
|
18
|
+
var _flexBox = require("intergalactic/flex-box");
|
19
|
+
var _keyboardFocusEnhance = _interopRequireDefault(require("intergalactic/utils/lib/enhances/keyboardFocusEnhance"));
|
20
|
+
var _AbstractButton2 = require("../AbstractButton/AbstractButton");
|
21
|
+
/*__reshadow-styles__:"./button.shadow.css"*/
|
22
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SButton_1dunw_gg_{position:relative;display:inline-block;align-items:center;justify-content:center;padding:0;margin:0;white-space:nowrap;font-family:inherit;line-height:normal;-webkit-text-decoration:none;text-decoration:none;text-align:center;vertical-align:middle;border:1px solid transparent;outline:0;box-shadow:none;cursor:pointer;box-sizing:border-box;overflow:visible;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-weight:var(--intergalactic-medium, 500);color:var(--intergalactic-text-secondary, #6c6e79);min-width:-moz-fit-content;min-width:fit-content}.___SButton_1dunw_gg_::-moz-focus-inner{padding:0;border:0}.___SButton_1dunw_gg_:active,.___SButton_1dunw_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SButton_1dunw_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___SButton_1dunw_gg_.__keyboardFocused_1dunw_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));z-index:1}.___SButton_1dunw_gg_.__disabled_1dunw_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none;box-shadow:none;z-index:0}.___SButton_1dunw_gg_._size_s_1dunw_gg_{width:var(--intergalactic-form-control-s, 20px);height:var(--intergalactic-form-control-s, 20px);border-radius:var(--intergalactic-addon-rounded, 4px)}.___SButton_1dunw_gg_._size_m_1dunw_gg_{height:var(--intergalactic-form-control-m, 28px);border-radius:var(--intergalactic-control-rounded, 6px);font-size:var(--intergalactic-fs-200, 14px)}.___SButton_1dunw_gg_._size_l_1dunw_gg_{height:var(--intergalactic-form-control-l, 40px);border-radius:var(--intergalactic-control-rounded, 6px);font-size:var(--intergalactic-fs-300, 16px)}.___SButton_1dunw_gg_._theme_primary-info_1dunw_gg_{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-control-primary-info, #008ff8)}@media (hover:hover){.___SButton_1dunw_gg_._theme_primary-info_1dunw_gg_:hover{background-color:var(--intergalactic-control-primary-info-hover, #006dca)}}.___SButton_1dunw_gg_._theme_primary-info_1dunw_gg_.__active_1dunw_gg_,.___SButton_1dunw_gg_._theme_primary-info_1dunw_gg_:active{background-color:var(--intergalactic-control-primary-info-active, #044792)}.___SButton_1dunw_gg_._theme_primary-success_1dunw_gg_{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-control-primary-success, #009f81)}@media (hover:hover){.___SButton_1dunw_gg_._theme_primary-success_1dunw_gg_:hover{background-color:var(--intergalactic-control-primary-success-hover, #007c65)}}.___SButton_1dunw_gg_._theme_primary-success_1dunw_gg_.__active_1dunw_gg_,.___SButton_1dunw_gg_._theme_primary-success_1dunw_gg_:active{background-color:var(--intergalactic-control-primary-success-active, #055345)}.___SButton_1dunw_gg_._theme_primary-warning_1dunw_gg_{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-control-primary-brand, #ff642d)}@media (hover:hover){.___SButton_1dunw_gg_._theme_primary-warning_1dunw_gg_:hover{background-color:var(--intergalactic-control-primary-brand-hover, #c33909)}}.___SButton_1dunw_gg_._theme_primary-warning_1dunw_gg_.__active_1dunw_gg_,.___SButton_1dunw_gg_._theme_primary-warning_1dunw_gg_:active{background-color:var(--intergalactic-control-primary-brand-active, #c33909)}.___SButton_1dunw_gg_._theme_primary-danger_1dunw_gg_{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-control-primary-critical, #ff4953)}@media (hover:hover){.___SButton_1dunw_gg_._theme_primary-danger_1dunw_gg_:hover{background-color:var(--intergalactic-control-primary-critical-hover, #d1002f)}}.___SButton_1dunw_gg_._theme_primary-danger_1dunw_gg_.__active_1dunw_gg_,.___SButton_1dunw_gg_._theme_primary-danger_1dunw_gg_:active{background-color:var(--intergalactic-control-primary-critical-active, #8e0016)}.___SButton_1dunw_gg_._theme_primary-invert_1dunw_gg_{color:var(--intergalactic-text-primary, #191b23);background-color:var(--intergalactic-control-primary-invert, #ffffff)}@media (hover:hover){.___SButton_1dunw_gg_._theme_primary-invert_1dunw_gg_:hover{background-color:var(--intergalactic-control-primary-invert-hover, #f4f5f9)}}.___SButton_1dunw_gg_._theme_primary-invert_1dunw_gg_.__active_1dunw_gg_,.___SButton_1dunw_gg_._theme_primary-invert_1dunw_gg_:active{background-color:var(--intergalactic-control-primary-invert-active, #e0e1e9)}.___SButton_1dunw_gg_._theme_secondary-muted_1dunw_gg_{color:var(--intergalactic-text-secondary, #6c6e79);border-color:var(--intergalactic-border-primary, #c4c7cf);background-color:var(--intergalactic-control-secondary-neutral, rgba(138, 142, 155, 0.1))}@media (hover:hover){.___SButton_1dunw_gg_._theme_secondary-muted_1dunw_gg_:hover{background-color:var(--intergalactic-control-secondary-neutral-hover,\n rgba(138, 142, 155, 0.2));color:var(--intergalactic-text-primary, #191b23)}}.___SButton_1dunw_gg_._theme_secondary-muted_1dunw_gg_.__active_1dunw_gg_,.___SButton_1dunw_gg_._theme_secondary-muted_1dunw_gg_:active{background-color:var(--intergalactic-control-secondary-neutral-active,\n rgba(138, 142, 155, 0.3));color:var(--intergalactic-text-primary, #191b23)}.___SButton_1dunw_gg_._theme_secondary-info_1dunw_gg_{background-color:var(--intergalactic-control-secondary-info, rgba(0, 143, 248, 0.1));color:var(--intergalactic-text-link, #006dca);border-color:var(--intergalactic-control-primary-info, #008ff8)}@media (hover:hover){.___SButton_1dunw_gg_._theme_secondary-info_1dunw_gg_:hover{background-color:var(--intergalactic-control-secondary-info-hover, rgba(0, 143, 248, 0.2))}}.___SButton_1dunw_gg_._theme_secondary-info_1dunw_gg_.__active_1dunw_gg_,.___SButton_1dunw_gg_._theme_secondary-info_1dunw_gg_:active{background-color:var(--intergalactic-control-secondary-info-active, rgba(0, 143, 248, 0.3))}.___SButton_1dunw_gg_._theme_secondary-invert_1dunw_gg_{color:var(--intergalactic-text-primary-invert, #ffffff);border-color:var(--intergalactic-border-primary-invert, #ffffff);background-color:var(--intergalactic-control-secondary-invert, rgba(255, 255, 255, 0.05))}@media (hover:hover){.___SButton_1dunw_gg_._theme_secondary-invert_1dunw_gg_:hover{background-color:var(--intergalactic-control-secondary-invert-hover, rgba(255, 255, 255, 0.1))}}.___SButton_1dunw_gg_._theme_secondary-invert_1dunw_gg_.__active_1dunw_gg_,.___SButton_1dunw_gg_._theme_secondary-invert_1dunw_gg_:active{background-color:var(--intergalactic-control-secondary-invert-active,\n rgba(255, 255, 255, 0.3))}.___SButton_1dunw_gg_._theme_tertiary-info_1dunw_gg_{color:var(--intergalactic-text-link, #006dca);background-color:var(--intergalactic-control-tertiary-info, rgba(0, 143, 248, 0))}@media (hover:hover){.___SButton_1dunw_gg_._theme_tertiary-info_1dunw_gg_:hover{background-color:var(--intergalactic-control-tertiary-info-hover, rgba(0, 143, 248, 0.2))}}.___SButton_1dunw_gg_._theme_tertiary-info_1dunw_gg_.__active_1dunw_gg_,.___SButton_1dunw_gg_._theme_tertiary-info_1dunw_gg_:active{background-color:var(--intergalactic-control-tertiary-info-active, rgba(0, 143, 248, 0.3))}.___SButton_1dunw_gg_._theme_tertiary-muted_1dunw_gg_{color:var(--intergalactic-text-secondary, #6c6e79);background-color:var(--intergalactic-control-tertiary-neutral, rgba(138, 142, 155, 0))}@media (hover:hover){.___SButton_1dunw_gg_._theme_tertiary-muted_1dunw_gg_:hover{background-color:var(--intergalactic-control-tertiary-neutral-hover, rgba(138, 142, 155, 0.2));color:var(--intergalactic-text-primary, #191b23)}}.___SButton_1dunw_gg_._theme_tertiary-muted_1dunw_gg_.__active_1dunw_gg_,.___SButton_1dunw_gg_._theme_tertiary-muted_1dunw_gg_:active{background-color:var(--intergalactic-control-tertiary-neutral-active,\n rgba(138, 142, 155, 0.3));color:var(--intergalactic-text-primary, #191b23)}.___SButton_1dunw_gg_._theme_tertiary-invert_1dunw_gg_{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-control-tertiary-invert, rgba(255, 255, 255, 0))}@media (hover:hover){.___SButton_1dunw_gg_._theme_tertiary-invert_1dunw_gg_:hover{background-color:var(--intergalactic-control-tertiary-invert-hover, rgba(255, 255, 255, 0.1))}}.___SButton_1dunw_gg_._theme_tertiary-invert_1dunw_gg_.__active_1dunw_gg_,.___SButton_1dunw_gg_._theme_tertiary-invert_1dunw_gg_:active{background-color:var(--intergalactic-control-tertiary-invert-active, rgba(255, 255, 255, 0.3))}.___SButton_1dunw_gg_._neighborLocation_right_1dunw_gg_{border-top-right-radius:0;border-bottom-right-radius:0}.___SButton_1dunw_gg_._neighborLocation_both_1dunw_gg_{border-radius:0;margin-left:-1px}.___SButton_1dunw_gg_._neighborLocation_left_1dunw_gg_{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}.___SButton_1dunw_gg_._neighborLocation_both_1dunw_gg_,.___SButton_1dunw_gg_._neighborLocation_left_1dunw_gg_{position:relative}.___SButton_1dunw_gg_._neighborLocation_both_1dunw_gg_:after,.___SButton_1dunw_gg_._neighborLocation_left_1dunw_gg_:after{background-color:var(--intergalactic-text-primary-invert, #ffffff)}.___SButton_1dunw_gg_._neighborLocation_both_1dunw_gg_._theme_secondary-muted_1dunw_gg_:after,.___SButton_1dunw_gg_._neighborLocation_left_1dunw_gg_._theme_secondary-muted_1dunw_gg_:after{background-color:var(--intergalactic-border-primary, #c4c7cf)}.___SButton_1dunw_gg_+.___SButton_1dunw_gg_._neighborLocation_both_1dunw_gg_:after,.___SButton_1dunw_gg_+.___SButton_1dunw_gg_._neighborLocation_left_1dunw_gg_:after{content:\"\";position:absolute;top:-1px;left:-1px;width:1px;height:calc(100% + 2px)}.___SSpin_1dunw_gg_{position:absolute;top:0;left:0;width:100%;height:100%;display:flex}.___SInner_1dunw_gg_{display:inline-flex;align-items:center;justify-content:center;height:100%;width:100%}.___SInner_1dunw_gg_.__loading_1dunw_gg_{visibility:hidden}.___SText_1dunw_gg_{display:inline-flex}.___SText_1dunw_gg_._size_l_1dunw_gg_,.___SText_1dunw_gg_._size_m_1dunw_gg_{margin-left:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SText_1dunw_gg_._size_m_1dunw_gg_{line-height:var(--intergalactic-lh-200, 142%)}.___SText_1dunw_gg_._size_l_1dunw_gg_{line-height:var(--intergalactic-lh-300, 150%)}.___SText_1dunw_gg_._size_l_1dunw_gg_:only-child{margin-left:var(--intergalactic-spacing-3x, 12px);margin-right:var(--intergalactic-spacing-3x, 12px)}.___SText_1dunw_gg_._size_l_1dunw_gg_:first-child{margin-left:var(--intergalactic-spacing-3x, 12px)}.___SText_1dunw_gg_._size_l_1dunw_gg_:last-child{margin-right:var(--intergalactic-spacing-3x, 12px)}.___SAddon_1dunw_gg_{display:inline-flex;align-items:center;justify-content:center}.___SAddon_1dunw_gg_._size_m_1dunw_gg_:not(:only-child):first-child{margin-left:calc(var(--intergalactic-spacing-2x, 8px) - 1px)}.___SAddon_1dunw_gg_._size_m_1dunw_gg_:not(:only-child):last-child{margin-right:calc(var(--intergalactic-spacing-2x, 8px) - 1px)}.___SAddon_1dunw_gg_._size_m_1dunw_gg_:only-child{margin-left:calc(1.5*var(--intergalactic-spacing-1x, 4px) - 1px);margin-right:calc(1.5*var(--intergalactic-spacing-1x, 4px) - 1px)}.___SAddon_1dunw_gg_._size_l_1dunw_gg_:not(:only-child):first-child{margin-left:calc(var(--intergalactic-spacing-3x, 12px) - 1px)}.___SAddon_1dunw_gg_._size_l_1dunw_gg_:not(:only-child):last-child{margin-right:calc(var(--intergalactic-spacing-3x, 12px) - 1px)}.___SAddon_1dunw_gg_._size_l_1dunw_gg_:only-child{margin-left:calc(3*var(--intergalactic-spacing-1x, 4px) - 1px);margin-right:calc(3*var(--intergalactic-spacing-1x, 4px) - 1px)}" /*__inner_css_end__*/, "1dunw_gg_") /*__reshadow_css_end__*/, {
|
23
|
+
"__SButton": "___SButton_1dunw_gg_",
|
24
|
+
"_keyboardFocused": "__keyboardFocused_1dunw_gg_",
|
25
|
+
"_disabled": "__disabled_1dunw_gg_",
|
26
|
+
"_size_s": "_size_s_1dunw_gg_",
|
27
|
+
"_size_m": "_size_m_1dunw_gg_",
|
28
|
+
"_size_l": "_size_l_1dunw_gg_",
|
29
|
+
"_neighborLocation_right": "_neighborLocation_right_1dunw_gg_",
|
30
|
+
"_neighborLocation_both": "_neighborLocation_both_1dunw_gg_",
|
31
|
+
"_neighborLocation_left": "_neighborLocation_left_1dunw_gg_",
|
32
|
+
"__SSpin": "___SSpin_1dunw_gg_",
|
33
|
+
"__SInner": "___SInner_1dunw_gg_",
|
34
|
+
"_loading": "__loading_1dunw_gg_",
|
35
|
+
"__SText": "___SText_1dunw_gg_",
|
36
|
+
"__SAddon": "___SAddon_1dunw_gg_",
|
37
|
+
"_theme_primary-info": "_theme_primary-info_1dunw_gg_",
|
38
|
+
"_active": "__active_1dunw_gg_",
|
39
|
+
"_theme_primary-success": "_theme_primary-success_1dunw_gg_",
|
40
|
+
"_theme_primary-warning": "_theme_primary-warning_1dunw_gg_",
|
41
|
+
"_theme_primary-danger": "_theme_primary-danger_1dunw_gg_",
|
42
|
+
"_theme_primary-invert": "_theme_primary-invert_1dunw_gg_",
|
43
|
+
"_theme_secondary-muted": "_theme_secondary-muted_1dunw_gg_",
|
44
|
+
"_theme_secondary-info": "_theme_secondary-info_1dunw_gg_",
|
45
|
+
"_theme_secondary-invert": "_theme_secondary-invert_1dunw_gg_",
|
46
|
+
"_theme_tertiary-info": "_theme_tertiary-info_1dunw_gg_",
|
47
|
+
"_theme_tertiary-muted": "_theme_tertiary-muted_1dunw_gg_",
|
48
|
+
"_theme_tertiary-invert": "_theme_tertiary-invert_1dunw_gg_"
|
49
|
+
});
|
50
|
+
var RootButton = /*#__PURE__*/function (_AbstractButton) {
|
51
|
+
(0, _inherits2["default"])(RootButton, _AbstractButton);
|
52
|
+
var _super = (0, _createSuper2["default"])(RootButton);
|
53
|
+
function RootButton() {
|
54
|
+
(0, _classCallCheck2["default"])(this, RootButton);
|
55
|
+
return _super.apply(this, arguments);
|
56
|
+
}
|
57
|
+
(0, _createClass2["default"])(RootButton, [{
|
58
|
+
key: "getTextColor",
|
59
|
+
value: function getTextColor() {
|
60
|
+
return undefined;
|
61
|
+
}
|
62
|
+
}]);
|
63
|
+
return RootButton;
|
64
|
+
}(_AbstractButton2.AbstractButton);
|
65
|
+
(0, _defineProperty2["default"])(RootButton, "displayName", 'Button');
|
66
|
+
(0, _defineProperty2["default"])(RootButton, "enhance", [(0, _keyboardFocusEnhance["default"])()]);
|
67
|
+
(0, _defineProperty2["default"])(RootButton, "style", style);
|
68
|
+
(0, _defineProperty2["default"])(RootButton, "defaultProps", {
|
69
|
+
use: 'secondary',
|
70
|
+
size: 'm'
|
71
|
+
});
|
72
|
+
function Text(props) {
|
73
|
+
var _ref = arguments[0],
|
74
|
+
_ref3;
|
75
|
+
var SText = _flexBox.Box;
|
76
|
+
return _ref3 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SText, _ref3.cn("SText", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
77
|
+
"tag": 'span'
|
78
|
+
}, _ref))));
|
79
|
+
}
|
80
|
+
function Addon(props) {
|
81
|
+
var _ref2 = arguments[0],
|
82
|
+
_ref4;
|
83
|
+
var SAddon = _flexBox.Box;
|
84
|
+
return _ref4 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SAddon, _ref4.cn("SAddon", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
85
|
+
"tag": 'span'
|
86
|
+
}, _ref2))));
|
87
|
+
}
|
88
|
+
var Button = (0, _core["default"])(RootButton, {
|
89
|
+
Text: Text,
|
90
|
+
Addon: Addon
|
91
|
+
});
|
92
|
+
var _default = Button;
|
93
|
+
exports["default"] = _default;
|
94
|
+
//# sourceMappingURL=Button.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Button.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_flexBox","_keyboardFocusEnhance","_AbstractButton2","style","_index","sstyled","insert","RootButton","_AbstractButton","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","getTextColor","undefined","AbstractButton","_defineProperty2","keyboardFocusEnhance","use","size","Text","props","_ref","arguments[0]","_ref3","SText","Box","styles","createElement","cn","_objectSpread2","assignProps","Addon","_ref2","_ref4","SAddon","Button","createComponent","_default","exports"],"sources":["../../../../src/component/Button/Button.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\n\nimport style from './button.shadow.css';\nimport { AbstractButton } from '../AbstractButton/AbstractButton';\nimport {\n ButtonAddonProps,\n ButtonChildren,\n ButtonComponent,\n ButtonProps,\n ButtonTextProps,\n} from './Button.type';\n\nclass RootButton extends AbstractButton {\n static displayName = 'Button';\n static enhance = [keyboardFocusEnhance()];\n static style = style;\n static defaultProps = {\n use: 'secondary',\n size: 'm',\n };\n\n protected getTextColor(): string | undefined {\n return undefined;\n }\n}\n\nfunction Text(props: ButtonTextProps) {\n const SText = Root;\n return sstyled(props.styles)(<SText render={Box} tag='span' />);\n}\n\nfunction Addon(props: ButtonAddonProps) {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} tag='span' />);\n}\n\nconst Button = create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IAAA,GAAAC,YAAA;IAAAC,KAAA;EACpC,IAAMC,KAAK,GACiCC,YAAG;EAA/C,OAAAF,KAAA,GAAO,IAAAxB,aAAO,EAACqB,KAAK,CAACM,MAAM,CAAC,eAAClC,MAAA,YAAAmC,aAAA,CAACH,KAAK,EAAAD,KAAA,CAAAK,EAAA,cAAAC,cAAA,qBAAAxC,KAAA,CAAAyC,WAAA;IAAA,OAAkB;EAAM,GAAAT,IAAA,IAAG;AAChE;AAEA,SAASU,KAAKA,CAACX,KAAuB,EAAE;EAAA,IAAAY,KAAA,GAAAV,YAAA;IAAAW,KAAA;EACtC,IAAMC,MAAM,GACiCT,YAAG;EAAhD,OAAAQ,KAAA,GAAO,IAAAlC,aAAO,EAACqB,KAAK,CAACM,MAAM,CAAC,eAAClC,MAAA,YAAAmC,aAAA,CAACO,MAAM,EAAAD,KAAA,CAAAL,EAAA,eAAAC,cAAA,qBAAAxC,KAAA,CAAAyC,WAAA;IAAA,OAAkB;EAAM,GAAAE,KAAA,IAAG;AACjE;AAEA,IAAMG,MAAM,GAAG,IAAAC,gBAAe,EAACnC,UAAU,EAAE;EACzCkB,IAAI,EAAJA,IAAI;EACJY,KAAK,EAALA;AACF,CAAC,CAAoB;AAAC,IAAAM,QAAA,GAEPF,MAAM;AAAAG,OAAA,cAAAD,QAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Button.type.js","names":[],"sources":["../../../../src/component/Button/Button.type.ts"],"sourcesContent":["import { UnknownProperties, Intergalactic } from '@semcore/core';\n\nimport {\n AbstractButtonAddonProps,\n AbstractButtonContext,\n AbstractButtonTextProps,\n AbstractButtonProps,\n} from '../AbstractButton/AbstractButton.type';\n\n/**\n * Button size\n * @default m\n */\nexport type ButtonSize = 'l' | 'm';\n/**\n * Button type\n * @default secondary\n */\ntype Use = 'primary' | 'secondary' | 'tertiary';\n\n/** Button theme */\ntype Theme = 'info' | 'success' | 'warning' | 'danger' | 'muted' | 'invert';\n\n/** @deprecated */\nexport interface IButtonProps extends ButtonProps, UnknownProperties {}\nexport type ButtonProps = AbstractButtonProps<ButtonSize, Use, Theme>;\n\n/** @deprecated */\nexport interface IButtonTextProps extends ButtonTextProps, UnknownProperties {}\nexport type ButtonTextProps = AbstractButtonTextProps<ButtonSize>;\n\n/** @deprecated */\nexport interface IButtonAddonProps extends ButtonAddonProps, UnknownProperties {}\nexport type ButtonAddonProps = AbstractButtonAddonProps<ButtonSize>;\n\n/** @deprecated */\nexport interface IButtonContext extends ButtonContext, UnknownProperties {}\nexport type ButtonContext = AbstractButtonContext;\n\nexport type ButtonChildren = {\n Text: Intergalactic.Component<'span', ButtonTextProps>;\n Addon: Intergalactic.Component<'span', ButtonAddonProps>;\n};\n\nexport type ButtonComponent = Intergalactic.Component<'button', ButtonProps, ButtonContext> & {\n Text: Intergalactic.Component<'span', ButtonTextProps>;\n Addon: Intergalactic.Component<'span', ButtonAddonProps>;\n};\n"],"mappings":""}
|
@@ -0,0 +1,92 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.ButtonLink = void 0;
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
11
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
13
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
15
|
+
var _index = require("intergalactic/utils/lib/core/index");
|
16
|
+
var _core = _interopRequireWildcard(require("intergalactic/core"));
|
17
|
+
var _react = _interopRequireDefault(require("react"));
|
18
|
+
var _keyboardFocusEnhance = _interopRequireDefault(require("intergalactic/utils/lib/enhances/keyboardFocusEnhance"));
|
19
|
+
var _flexBox = require("intergalactic/flex-box");
|
20
|
+
var _AbstractButton2 = require("../AbstractButton/AbstractButton");
|
21
|
+
var _resolveColorEnhance = _interopRequireDefault(require("intergalactic/utils/lib/enhances/resolveColorEnhance"));
|
22
|
+
/*__reshadow-styles__:"./buttonLink.shadow.css"*/
|
23
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SButton_dvl3l_gg_{display:inline-block;font-family:inherit;font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-link, #006dca);line-height:normal;position:relative;cursor:pointer;-webkit-text-decoration:none;text-decoration:none;border:0;padding:0;margin:0;box-shadow:none;-webkit-tap-highlight-color:transparent;outline:0;background:0 0;transition:color .15s ease-in-out}.___SButton_dvl3l_gg_:active,.___SButton_dvl3l_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SButton_dvl3l_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___SButton_dvl3l_gg_::-moz-focus-inner{border:0;padding:0}.___SButton_dvl3l_gg_.__active_dvl3l_gg_,.___SButton_dvl3l_gg_:active{color:var(--intergalactic-text-link-hover-active, #044792)}@media (hover:hover){.___SButton_dvl3l_gg_:hover{color:var(--intergalactic-text-link-hover-active, #044792)}}.___SButton_dvl3l_gg_.__active_dvl3l_gg_ .___SText_dvl3l_gg_,.___SButton_dvl3l_gg_:active .___SText_dvl3l_gg_{border-color:currentColor}@media (hover:hover){.___SButton_dvl3l_gg_:hover .___SText_dvl3l_gg_{border-color:currentColor}}.___SButton_dvl3l_gg_.__enableVisited_dvl3l_gg_:visited{color:var(--intergalactic-text-link-visited, #8649e1)}@media (hover:hover){.___SButton_dvl3l_gg_.__enableVisited_dvl3l_gg_:visited:hover{color:var(--intergalactic-text-link-visited, #8649e1)}}.___SButton_dvl3l_gg_ .___SText_dvl3l_gg_{border-bottom-width:1px;border-bottom-style:solid;border-color:transparent;transition:border-bottom-color .15s ease-in-out}.___SButton_dvl3l_gg_.__keyboardFocused_dvl3l_gg_{outline-color:var(--intergalactic-keyboard-focus-outline, rgba(0, 143, 248, 0.5));outline-style:solid;outline-width:3px}.___SButton_dvl3l_gg_.__visually-disabled_dvl3l_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SButton_dvl3l_gg_._use_secondary_dvl3l_gg_{color:var(--intergalactic-text-hint, #6c6e79)}.___SButton_dvl3l_gg_._use_secondary_dvl3l_gg_.__active_dvl3l_gg_,.___SButton_dvl3l_gg_._use_secondary_dvl3l_gg_:active{color:var(--intergalactic-text-hint-hover-active, #484a54)}@media (hover:hover){.___SButton_dvl3l_gg_._use_secondary_dvl3l_gg_:hover{color:var(--intergalactic-text-hint-hover-active, #484a54)}}.___SButton_dvl3l_gg_._use_secondary_dvl3l_gg_ .___SText_dvl3l_gg_{border-bottom-width:1px;border-bottom-style:dashed;border-color:currentColor}.___SAddon_dvl3l_gg_{display:inline-flex;justify-content:center;align-items:center;margin-bottom:var(--intergalactic-spacing-05x, 2px);vertical-align:middle}.___SButton_dvl3l_gg_ .___SAddon_dvl3l_gg_:not(:only-child):first-child{margin-right:var(--intergalactic-spacing-1x, 4px)}.___SButton_dvl3l_gg_ .___SAddon_dvl3l_gg_:not(:only-child):last-child{margin-left:var(--intergalactic-spacing-1x, 4px)}.___SButton_dvl3l_gg_.__text-color_dvl3l_gg_{color:var(--text-color_dvl3l)}.___SButton_dvl3l_gg_.__text-color_dvl3l_gg_.__active_dvl3l_gg_,.___SButton_dvl3l_gg_.__text-color_dvl3l_gg_:active{color:var(--text-color_dvl3l);filter:brightness(.8)}@media (hover:hover){.___SButton_dvl3l_gg_.__text-color_dvl3l_gg_:hover{color:var(--text-color_dvl3l);filter:brightness(.8)}}.___SButton_dvl3l_gg_._size_100_dvl3l_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%)}.___SButton_dvl3l_gg_._size_200_dvl3l_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SButton_dvl3l_gg_._size_300_dvl3l_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SButton_dvl3l_gg_._size_400_dvl3l_gg_{font-size:var(--intergalactic-fs-400, 20px);line-height:var(--intergalactic-lh-400, 120%)}.___SButton_dvl3l_gg_._size_500_dvl3l_gg_{font-size:var(--intergalactic-fs-500, 24px);line-height:var(--intergalactic-lh-500, 117%)}.___SButton_dvl3l_gg_._size_600_dvl3l_gg_{font-size:var(--intergalactic-fs-600, 32px);line-height:var(--intergalactic-lh-600, 125%)}.___SButton_dvl3l_gg_._size_700_dvl3l_gg_{font-size:var(--intergalactic-fs-700, 36px);line-height:var(--intergalactic-lh-700, 110%)}.___SButton_dvl3l_gg_._size_800_dvl3l_gg_{font-size:var(--intergalactic-fs-800, 48px);line-height:var(--intergalactic-lh-800, 117%)}@media (prefers-reduced-motion){.___SButton_dvl3l_gg_,.___SText_dvl3l_gg_{transition:none}}" /*__inner_css_end__*/, "dvl3l_gg_") /*__reshadow_css_end__*/, {
|
24
|
+
"__SButton": "___SButton_dvl3l_gg_",
|
25
|
+
"_keyboardFocused": "__keyboardFocused_dvl3l_gg_",
|
26
|
+
"_visually-disabled": "__visually-disabled_dvl3l_gg_",
|
27
|
+
"__SAddon": "___SAddon_dvl3l_gg_",
|
28
|
+
"_size_100": "_size_100_dvl3l_gg_",
|
29
|
+
"_size_200": "_size_200_dvl3l_gg_",
|
30
|
+
"_size_300": "_size_300_dvl3l_gg_",
|
31
|
+
"_size_400": "_size_400_dvl3l_gg_",
|
32
|
+
"_size_500": "_size_500_dvl3l_gg_",
|
33
|
+
"_size_600": "_size_600_dvl3l_gg_",
|
34
|
+
"_size_700": "_size_700_dvl3l_gg_",
|
35
|
+
"_size_800": "_size_800_dvl3l_gg_",
|
36
|
+
"__SText": "___SText_dvl3l_gg_",
|
37
|
+
"_active": "__active_dvl3l_gg_",
|
38
|
+
"_enableVisited": "__enableVisited_dvl3l_gg_",
|
39
|
+
"_use_secondary": "_use_secondary_dvl3l_gg_",
|
40
|
+
"_text-color": "__text-color_dvl3l_gg_",
|
41
|
+
"--text-color": "--text-color_dvl3l"
|
42
|
+
});
|
43
|
+
var enhance = {
|
44
|
+
keyboardFocused: (0, _keyboardFocusEnhance["default"])(),
|
45
|
+
resolveColor: (0, _resolveColorEnhance["default"])()
|
46
|
+
};
|
47
|
+
var RootButtonLink = /*#__PURE__*/function (_AbstractButton) {
|
48
|
+
(0, _inherits2["default"])(RootButtonLink, _AbstractButton);
|
49
|
+
var _super = (0, _createSuper2["default"])(RootButtonLink);
|
50
|
+
function RootButtonLink() {
|
51
|
+
(0, _classCallCheck2["default"])(this, RootButtonLink);
|
52
|
+
return _super.apply(this, arguments);
|
53
|
+
}
|
54
|
+
(0, _createClass2["default"])(RootButtonLink, [{
|
55
|
+
key: "getTextColor",
|
56
|
+
value: function getTextColor() {
|
57
|
+
var _ref5 = this.asProps,
|
58
|
+
color = _ref5.color,
|
59
|
+
resolveColor = _ref5.resolveColor;
|
60
|
+
return resolveColor(color);
|
61
|
+
}
|
62
|
+
}]);
|
63
|
+
return RootButtonLink;
|
64
|
+
}(_AbstractButton2.AbstractButton);
|
65
|
+
(0, _defineProperty2["default"])(RootButtonLink, "displayName", 'ButtonLink');
|
66
|
+
(0, _defineProperty2["default"])(RootButtonLink, "enhance", Object.values(enhance));
|
67
|
+
(0, _defineProperty2["default"])(RootButtonLink, "style", style);
|
68
|
+
(0, _defineProperty2["default"])(RootButtonLink, "defaultProps", {
|
69
|
+
use: 'primary'
|
70
|
+
});
|
71
|
+
function Text(props) {
|
72
|
+
var _ref = arguments[0],
|
73
|
+
_ref3;
|
74
|
+
var SText = _flexBox.Box;
|
75
|
+
return _ref3 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SText, _ref3.cn("SText", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
76
|
+
"tag": 'span'
|
77
|
+
}, _ref))));
|
78
|
+
}
|
79
|
+
function Addon(props) {
|
80
|
+
var _ref2 = arguments[0],
|
81
|
+
_ref4;
|
82
|
+
var SAddon = _flexBox.Box;
|
83
|
+
return _ref4 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SAddon, _ref4.cn("SAddon", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
84
|
+
"tag": 'span'
|
85
|
+
}, _ref2))));
|
86
|
+
}
|
87
|
+
var ButtonLink = (0, _core["default"])(RootButtonLink, {
|
88
|
+
Text: Text,
|
89
|
+
Addon: Addon
|
90
|
+
});
|
91
|
+
exports.ButtonLink = ButtonLink;
|
92
|
+
//# sourceMappingURL=ButtonLink.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ButtonLink.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_keyboardFocusEnhance","_flexBox","_AbstractButton2","_resolveColorEnhance","style","_index","sstyled","insert","enhance","keyboardFocused","keyboardFocusEnhance","resolveColor","resolveColorEnhance","RootButtonLink","_AbstractButton","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","getTextColor","_ref5","asProps","color","AbstractButton","_defineProperty2","Object","values","use","Text","props","_ref","arguments[0]","_ref3","SText","Box","styles","createElement","cn","_objectSpread2","assignProps","Addon","_ref2","_ref4","SAddon","ButtonLink","createComponent","exports"],"sources":["../../../../src/component/ButtonLink/ButtonLink.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { sstyled, Root } from '@semcore/core';\nimport style from './buttonLink.shadow.css';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport { Box } from '@semcore/flex-box';\nimport { AbstractButton } from '../AbstractButton/AbstractButton';\nimport resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';\nimport { ButtonLinkAddonProps, ButtonLinkComponent, ButtonLinkTextProps } from './ButtonLink.type';\n\nconst enhance = {\n keyboardFocused: keyboardFocusEnhance(),\n resolveColor: resolveColorEnhance(),\n};\n\nclass RootButtonLink extends AbstractButton {\n static displayName = 'ButtonLink';\n static enhance = Object.values(enhance);\n static style = style;\n static defaultProps = {\n use: 'primary',\n };\n\n protected getTextColor(): string | undefined {\n const { color, resolveColor } = this.asProps as any;\n return resolveColor(color);\n }\n}\n\nfunction Text(props: ButtonLinkTextProps) {\n const SText = Root;\n return sstyled(props.styles)(<SText render={Box} tag='span' />);\n}\n\nfunction Addon(props: ButtonLinkAddonProps) {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} tag='span' />);\n}\n\nexport const ButtonLink = createComponent(RootButtonLink, {\n Text,\n Addon,\n}) as ButtonLinkComponent;\n"],"mappings":";;;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAGA,IAAAG,qBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAAkF;AAAA,IAAAO,KAAA,+BAAAC,MAAA,CAAAC,OAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAGlF,IAAMC,OAAO,GAAG;EACdC,eAAe,EAAE,IAAAC,gCAAoB,GAAE;EACvCC,YAAY,EAAE,IAAAC,+BAAmB;AACnC,CAAC;AAAC,IAEIC,cAAc,0BAAAC,eAAA;EAAA,IAAAC,U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,IAAAzC,aAAO,EAAC4B,KAAK,CAACM,MAAM,CAAC,eAAC1C,MAAA,YAAA2C,aAAA,CAACO,MAAM,EAAAD,KAAA,CAAAL,EAAA,eAAAC,cAAA,qBAAAhD,KAAA,CAAAiD,WAAA;IAAA,OAAkB;EAAM,GAAAE,KAAA,IAAG;AACjE;AAEO,IAAMG,UAAU,GAAG,IAAAC,gBAAe,EAACrC,cAAc,EAAE;EACxDoB,IAAI,EAAJA,IAAI;EACJY,KAAK,EAALA;AACF,CAAC,CAAwB;AAACM,OAAA,CAAAF,UAAA,GAAAA,UAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ButtonLink.type.js","names":[],"sources":["../../../../src/component/ButtonLink/ButtonLink.type.ts"],"sourcesContent":["import { UnknownProperties, Intergalactic } from '@semcore/core';\n\nimport {\n AbstractButtonAddonProps,\n AbstractButtonContext,\n AbstractButtonTextProps,\n AbstractButtonProps,\n} from '../AbstractButton/AbstractButton.type';\n\n/**\n * Button link size\n * @default m\n */\nexport type ButtonLinkSize = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;\n/**\n * Button link type\n * @default primary\n */\ntype Use = 'primary' | 'secondary';\n\nexport type ButtonLinkProps = AbstractButtonProps<ButtonLinkSize, Use, never>;\n\nexport type ButtonLinkTextProps = AbstractButtonTextProps<ButtonLinkSize>;\n\nexport type ButtonLinkAddonProps = AbstractButtonAddonProps<ButtonLinkSize>;\n\nexport type ButtonLinkContext = AbstractButtonContext;\n\nexport type ButtonLinkChildren = {\n Text: Intergalactic.Component<'span', ButtonLinkTextProps>;\n Addon: Intergalactic.Component<'span', ButtonLinkAddonProps>;\n};\n\nexport type ButtonLinkComponent = Intergalactic.Component<\n 'button',\n ButtonLinkProps,\n ButtonLinkContext\n> & {\n Text: Intergalactic.Component<'span', ButtonLinkTextProps>;\n Addon: Intergalactic.Component<'span', ButtonLinkAddonProps>;\n};\n"],"mappings":""}
|