intergalactic 15.109.0-prerelease.1 → 15.110.0-prerelease.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -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 +9 -9
- package/base-trigger/lib/cjs/FilterTrigger.js.map +1 -1
- 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 +10 -10
- package/base-trigger/lib/es6/FilterTrigger.js.map +1 -1
- 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/lib/cjs/component/AbstractButton/AbstractButton.js +1 -1
- package/button/lib/cjs/component/AbstractButton/AbstractButton.js.map +1 -1
- package/button/lib/cjs/component/Button/Button.js +27 -27
- package/button/lib/cjs/component/ButtonLink/ButtonLink.js +20 -20
- package/button/lib/es6/component/AbstractButton/AbstractButton.js +1 -1
- package/button/lib/es6/component/AbstractButton/AbstractButton.js.map +1 -1
- package/button/lib/es6/component/Button/Button.js +27 -27
- package/button/lib/es6/component/ButtonLink/ButtonLink.js +20 -20
- package/button/package.json +1 -1
- package/card/lib/cjs/Card.js +6 -6
- package/card/lib/es6/Card.js +6 -6
- package/card/package.json +1 -1
- package/carousel/lib/cjs/Carousel.js +21 -21
- package/carousel/lib/es6/Carousel.js +21 -21
- package/carousel/package.json +1 -1
- 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/lib/cjs/Body.js +5 -3
- package/data-table/lib/cjs/Body.js.map +1 -1
- package/data-table/lib/cjs/DataTable.js +36 -36
- package/data-table/lib/es6/Body.js +5 -3
- package/data-table/lib/es6/Body.js.map +1 -1
- package/data-table/lib/es6/DataTable.js +36 -36
- package/data-table/package.json +1 -1
- package/date-picker/lib/cjs/DateRangeComparator.js +2 -4
- package/date-picker/lib/cjs/DateRangeComparator.js.map +1 -1
- package/date-picker/lib/cjs/components/Calendar.js +75 -47
- package/date-picker/lib/cjs/components/Calendar.js.map +1 -1
- package/date-picker/lib/cjs/components/DateRangeComparatorAbstract.js +42 -34
- package/date-picker/lib/cjs/components/DateRangeComparatorAbstract.js.map +1 -1
- package/date-picker/lib/cjs/components/InputTrigger.js +39 -37
- package/date-picker/lib/cjs/components/InputTrigger.js.map +1 -1
- package/date-picker/lib/cjs/components/PickerAbstract.js +47 -35
- package/date-picker/lib/cjs/components/PickerAbstract.js.map +1 -1
- package/date-picker/lib/cjs/components/RangePickerAbstract.js +54 -46
- package/date-picker/lib/cjs/components/RangePickerAbstract.js.map +1 -1
- package/date-picker/lib/cjs/components/index.js +5 -6
- package/date-picker/lib/cjs/components/index.js.map +1 -1
- package/date-picker/lib/cjs/style/calendar.shadow.css +17 -8
- package/date-picker/lib/cjs/translations/en.json +7 -2
- package/date-picker/lib/es6/DateRangeComparator.js +2 -4
- package/date-picker/lib/es6/DateRangeComparator.js.map +1 -1
- package/date-picker/lib/es6/components/Calendar.js +75 -47
- package/date-picker/lib/es6/components/Calendar.js.map +1 -1
- package/date-picker/lib/es6/components/DateRangeComparatorAbstract.js +42 -34
- package/date-picker/lib/es6/components/DateRangeComparatorAbstract.js.map +1 -1
- package/date-picker/lib/es6/components/InputTrigger.js +39 -37
- package/date-picker/lib/es6/components/InputTrigger.js.map +1 -1
- package/date-picker/lib/es6/components/PickerAbstract.js +47 -35
- package/date-picker/lib/es6/components/PickerAbstract.js.map +1 -1
- package/date-picker/lib/es6/components/RangePickerAbstract.js +54 -46
- package/date-picker/lib/es6/components/RangePickerAbstract.js.map +1 -1
- package/date-picker/lib/es6/components/index.js +5 -6
- package/date-picker/lib/es6/components/index.js.map +1 -1
- package/date-picker/lib/es6/style/calendar.shadow.css +17 -8
- package/date-picker/lib/es6/translations/en.json +7 -2
- 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/index.d.ts +15 -2
- package/dropdown/lib/cjs/AbstractDropdown.js +365 -0
- package/dropdown/lib/cjs/AbstractDropdown.js.map +1 -0
- package/dropdown/lib/cjs/Dropdown.js +79 -28
- package/dropdown/lib/cjs/Dropdown.js.map +1 -1
- package/dropdown/lib/cjs/DropdownItem.js +18 -0
- package/dropdown/lib/cjs/DropdownItem.js.map +1 -0
- package/dropdown/lib/cjs/index.d.js.map +1 -1
- package/dropdown/lib/cjs/index.js +19 -0
- package/dropdown/lib/cjs/index.js.map +1 -1
- package/dropdown/lib/cjs/style/dropdown.shadow.css +95 -0
- package/dropdown/lib/es6/AbstractDropdown.js +355 -0
- package/dropdown/lib/es6/AbstractDropdown.js.map +1 -0
- package/dropdown/lib/es6/Dropdown.js +80 -27
- package/dropdown/lib/es6/Dropdown.js.map +1 -1
- package/dropdown/lib/es6/DropdownItem.js +12 -0
- package/dropdown/lib/es6/DropdownItem.js.map +1 -0
- package/dropdown/lib/es6/index.d.js.map +1 -1
- package/dropdown/lib/es6/index.js +1 -0
- package/dropdown/lib/es6/index.js.map +1 -1
- package/dropdown/lib/es6/style/dropdown.shadow.css +95 -0
- package/dropdown/lib/types/index.d.ts +15 -2
- package/dropdown/package.json +1 -1
- package/dropdown-menu/index.d.ts +3 -11
- package/dropdown-menu/lib/cjs/DropdownMenu.js +167 -418
- package/dropdown-menu/lib/cjs/DropdownMenu.js.map +1 -1
- package/dropdown-menu/lib/cjs/index.d.js.map +1 -1
- package/dropdown-menu/lib/cjs/index.js +0 -7
- package/dropdown-menu/lib/cjs/index.js.map +1 -1
- package/dropdown-menu/lib/cjs/style/dropdown-menu.shadow.css +3 -91
- package/dropdown-menu/lib/cjs/translations/en.json +1 -3
- package/dropdown-menu/lib/es6/DropdownMenu.js +167 -419
- package/dropdown-menu/lib/es6/DropdownMenu.js.map +1 -1
- package/dropdown-menu/lib/es6/index.d.js.map +1 -1
- package/dropdown-menu/lib/es6/index.js +0 -1
- package/dropdown-menu/lib/es6/index.js.map +1 -1
- package/dropdown-menu/lib/es6/style/dropdown-menu.shadow.css +3 -91
- package/dropdown-menu/lib/es6/translations/en.json +1 -3
- package/dropdown-menu/lib/types/index.d.ts +3 -11
- 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/lib/cjs/InlineInput.js +14 -14
- package/inline-input/lib/es6/InlineInput.js +14 -14
- 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/InputMask.d.ts +4 -0
- package/input-mask/lib/cjs/InputMask.js +11 -9
- package/input-mask/lib/cjs/InputMask.js.map +1 -1
- package/input-mask/lib/es6/InputMask.js +11 -9
- package/input-mask/lib/es6/InputMask.js.map +1 -1
- package/input-mask/lib/types/InputMask.d.ts +4 -0
- 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/lib/cjs/InputTags.js +12 -12
- package/input-tags/lib/es6/InputTags.js +12 -12
- package/input-tags/package.json +1 -1
- package/link/lib/cjs/Link.js +13 -13
- package/link/lib/cjs/Link.js.map +1 -1
- package/link/lib/es6/Link.js +13 -13
- package/link/lib/es6/Link.js.map +1 -1
- 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 +10 -10
- package/pagination/lib/es6/Pagination.js +10 -10
- 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/index.d.ts +16 -2
- package/select/lib/cjs/InputSearch.js +12 -13
- package/select/lib/cjs/InputSearch.js.map +1 -1
- package/select/lib/cjs/Select.js +149 -119
- package/select/lib/cjs/Select.js.map +1 -1
- package/select/lib/cjs/index.d.js.map +1 -1
- package/select/lib/cjs/style/input-search.shadow.css +5 -1
- package/select/lib/cjs/style/select.shadow.css +1 -1
- package/select/lib/cjs/translations/en.json +1 -3
- package/select/lib/es6/InputSearch.js +12 -13
- package/select/lib/es6/InputSearch.js.map +1 -1
- package/select/lib/es6/Select.js +142 -112
- package/select/lib/es6/Select.js.map +1 -1
- package/select/lib/es6/index.d.js.map +1 -1
- package/select/lib/es6/style/input-search.shadow.css +5 -1
- package/select/lib/es6/style/select.shadow.css +1 -1
- package/select/lib/es6/translations/en.json +1 -3
- package/select/lib/types/index.d.ts +16 -2
- package/select/package.json +1 -1
- package/side-panel/lib/cjs/SidePanel.js +17 -17
- package/side-panel/lib/cjs/SidePanel.js.map +1 -1
- package/side-panel/lib/es6/SidePanel.js +17 -17
- package/side-panel/lib/es6/SidePanel.js.map +1 -1
- 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/lib/cjs/Tag.js +23 -23
- package/tag/lib/es6/Tag.js +23 -23
- 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/enhances/focusSourceEnhance.d.ts +2 -0
- package/utils/lib/enhances/focusSourceEnhance.js.map +1 -1
- package/utils/lib/enhances/focusSourceEnhance.mjs.map +1 -1
- package/utils/lib/getAccessibleName.d.ts +1 -0
- package/utils/lib/getAccessibleName.js +56 -0
- package/utils/lib/getAccessibleName.js.map +1 -0
- package/utils/lib/getAccessibleName.mjs +49 -0
- package/utils/lib/getAccessibleName.mjs.map +1 -0
- package/utils/lib/getEventTarget.js +38 -4
- package/utils/lib/getEventTarget.js.map +1 -1
- package/utils/lib/getEventTarget.mjs +37 -4
- package/utils/lib/getEventTarget.mjs.map +1 -1
- package/utils/lib/injectStyle.js +1 -1
- package/utils/lib/injectStyle.mjs +1 -1
- package/utils/lib/inputProps.d.ts +1 -1
- package/utils/lib/inputProps.js +3 -3
- package/utils/lib/inputProps.js.map +1 -1
- package/utils/lib/inputProps.mjs +2 -2
- package/utils/lib/inputProps.mjs.map +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/lib/cjs/Wizard.js +14 -14
- package/wizard/lib/cjs/Wizard.js.map +1 -1
- package/wizard/lib/es6/Wizard.js +14 -14
- package/wizard/lib/es6/Wizard.js.map +1 -1
- package/wizard/package.json +1 -1
- package/dropdown-menu/lib/cjs/DropdownMenuOld.js +0 -682
- package/dropdown-menu/lib/cjs/DropdownMenuOld.js.map +0 -1
- package/dropdown-menu/lib/cjs/style/dropdown-menu-old.shadow.css +0 -224
- package/dropdown-menu/lib/es6/DropdownMenuOld.js +0 -683
- package/dropdown-menu/lib/es6/DropdownMenuOld.js.map +0 -1
- package/dropdown-menu/lib/es6/style/dropdown-menu-old.shadow.css +0 -224
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"focusSourceEnhance.js","names":["_react","_interopRequireDefault","require","_assignProps","lastFocusSource","focusSourceListeners","useFocusSource","handleMouseDown","React","useCallback","forEach","listener","setFocusSource","handleKeyDown","focusSourceRef","useRef","source","current","subscribeListeners","document","addEventListener","capture","unsubscribeListeners","removeEventListener","useEffect","needToAddListeners","length","sourceListener","push","needToRemoveListeners","sourceListenerIndex","indexOf","splice","exports","focusSourceEnhance","props","assignProps","_default"],"sources":["../../src/enhances/focusSourceEnhance.tsx"],"sourcesContent":["import React from 'react';\nimport assignProps from '../assignProps';\n\nlet lastFocusSource: 'mouse' | 'keyboard' | 'none' = 'none';\nconst focusSourceListeners: {\n setFocusSource: (source: 'mouse' | 'keyboard' | 'none') => void;\n subscribeListeners: () => void;\n}[] = [];\nexport const useFocusSource = () => {\n const handleMouseDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('mouse')),\n [],\n );\n const handleKeyDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('keyboard')),\n [],\n );\n const focusSourceRef = React.useRef<'none' | 'mouse' | 'keyboard'>(lastFocusSource);\n const setFocusSource = React.useCallback((source: 'none' | 'mouse' | 'keyboard') => {\n focusSourceRef.current = source;\n lastFocusSource = source;\n }, []);\n const subscribeListeners = React.useCallback(() => {\n document.addEventListener('mousedown', handleMouseDown, { capture: true });\n document.addEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n const unsubscribeListeners = React.useCallback(() => {\n document.removeEventListener('mousedown', handleMouseDown, { capture: true });\n document.removeEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n\n React.useEffect(() => {\n const needToAddListeners = focusSourceListeners.length === 0;\n const sourceListener = { setFocusSource, subscribeListeners };\n focusSourceListeners.push(sourceListener);\n if (needToAddListeners) subscribeListeners();\n const needToRemoveListeners = needToAddListeners;\n\n return () => {\n const sourceListenerIndex = focusSourceListeners.indexOf(sourceListener);\n focusSourceListeners.splice(sourceListenerIndex, 1);\n if (needToRemoveListeners) unsubscribeListeners();\n if (needToRemoveListeners && focusSourceListeners.length > 0) {\n focusSourceListeners[0].subscribeListeners();\n }\n };\n }, []);\n\n return focusSourceRef;\n};\n\nexport type FocusSourceEnhanceHook = (props: {\n tabIndex?: number;\n disabled?: boolean;\n loading?: boolean;\n autoFocus?: boolean;\n}) => {\n tabIndex: number;\n keyboardFocused: boolean;\n onFocus: (e: React.FocusEvent) => void;\n onBlur: () => void;\n};\n\nconst focusSourceEnhance = (): FocusSourceEnhanceHook => {\n return (props) => {\n const focusSourceRef = useFocusSource();\n\n return assignProps(props, {\n focusSourceRef,\n });\n };\n};\n\nexport default focusSourceEnhance;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAIE,eAA8C,GAAG,MAAM;AAC3D,IAAMC,oBAGH,GAAG,EAAE;AACD,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAA,EAAS;EAClC,IAAMC,eAAe,GAAGC,iBAAK,CAACC,WAAW,CACvC;IAAA,OAAMJ,oBAAoB,CAACK,OAAO,CAAC,UAACC,QAAQ;MAAA,OAAKA,QAAQ,CAACC,cAAc,CAAC,OAAO,CAAC;IAAA,EAAC;EAAA,GAClF,EAAE,CACH;EACD,IAAMC,aAAa,GAAGL,iBAAK,CAACC,WAAW,CACrC;IAAA,OAAMJ,oBAAoB,CAACK,OAAO,CAAC,UAACC,QAAQ;MAAA,OAAKA,QAAQ,CAACC,cAAc,CAAC,UAAU,CAAC;IA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AAO,CAACJ,cAAc,CAAC;MACxEtB,oBAAoB,CAAC2B,MAAM,CAACF,mBAAmB,EAAE,CAAC,CAAC;MACnD,IAAID,qBAAqB,EAAEP,oBAAoB,EAAE;MACjD,IAAIO,qBAAqB,IAAIxB,oBAAoB,CAACqB,MAAM,GAAG,CAAC,EAAE;QAC5DrB,oBAAoB,CAAC,CAAC,CAAC,CAACa,kBAAkB,EAAE;MAC9C;IACF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOJ,cAAc;AACvB,CAAC;AAACmB,OAAA,CAAA3B,cAAA,GAAAA,cAAA;
|
1
|
+
{"version":3,"file":"focusSourceEnhance.js","names":["_react","_interopRequireDefault","require","_assignProps","lastFocusSource","focusSourceListeners","useFocusSource","handleMouseDown","React","useCallback","forEach","listener","setFocusSource","handleKeyDown","focusSourceRef","useRef","source","current","subscribeListeners","document","addEventListener","capture","unsubscribeListeners","removeEventListener","useEffect","needToAddListeners","length","sourceListener","push","needToRemoveListeners","sourceListenerIndex","indexOf","splice","exports","focusSourceEnhance","props","assignProps","_default"],"sources":["../../src/enhances/focusSourceEnhance.tsx"],"sourcesContent":["import React from 'react';\nimport assignProps from '../assignProps';\n\nlet lastFocusSource: 'mouse' | 'keyboard' | 'none' = 'none';\nconst focusSourceListeners: {\n setFocusSource: (source: 'mouse' | 'keyboard' | 'none') => void;\n subscribeListeners: () => void;\n}[] = [];\nexport const useFocusSource = () => {\n const handleMouseDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('mouse')),\n [],\n );\n const handleKeyDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('keyboard')),\n [],\n );\n const focusSourceRef = React.useRef<'none' | 'mouse' | 'keyboard'>(lastFocusSource);\n const setFocusSource = React.useCallback((source: 'none' | 'mouse' | 'keyboard') => {\n focusSourceRef.current = source;\n lastFocusSource = source;\n }, []);\n const subscribeListeners = React.useCallback(() => {\n document.addEventListener('mousedown', handleMouseDown, { capture: true });\n document.addEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n const unsubscribeListeners = React.useCallback(() => {\n document.removeEventListener('mousedown', handleMouseDown, { capture: true });\n document.removeEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n\n React.useEffect(() => {\n const needToAddListeners = focusSourceListeners.length === 0;\n const sourceListener = { setFocusSource, subscribeListeners };\n focusSourceListeners.push(sourceListener);\n if (needToAddListeners) subscribeListeners();\n const needToRemoveListeners = needToAddListeners;\n\n return () => {\n const sourceListenerIndex = focusSourceListeners.indexOf(sourceListener);\n focusSourceListeners.splice(sourceListenerIndex, 1);\n if (needToRemoveListeners) unsubscribeListeners();\n if (needToRemoveListeners && focusSourceListeners.length > 0) {\n focusSourceListeners[0].subscribeListeners();\n }\n };\n }, []);\n\n return focusSourceRef;\n};\n\nexport type FocusSourceEnhanceHook = (props: {\n tabIndex?: number;\n disabled?: boolean;\n loading?: boolean;\n autoFocus?: boolean;\n}) => {\n tabIndex: number;\n keyboardFocused: boolean;\n onFocus: (e: React.FocusEvent) => void;\n onBlur: () => void;\n focusSourceRef: React.MutableRefObject<typeof lastFocusSource>;\n};\n\nconst focusSourceEnhance = (): FocusSourceEnhanceHook => {\n return (props) => {\n const focusSourceRef = useFocusSource();\n\n return assignProps(props, {\n focusSourceRef,\n });\n };\n};\n\nexport default focusSourceEnhance;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAIE,eAA8C,GAAG,MAAM;AAC3D,IAAMC,oBAGH,GAAG,EAAE;AACD,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAA,EAAS;EAClC,IAAMC,eAAe,GAAGC,iBAAK,CAACC,WAAW,CACvC;IAAA,OAAMJ,oBAAoB,CAACK,OAAO,CAAC,UAACC,QAAQ;MAAA,OAAKA,QAAQ,CAACC,cAAc,CAAC,OAAO,CAAC;IAAA,E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AoB,CAACuB,IAAI,CAACD,cAAc,CAAC;IACzC,IAAIF,kBAAkB,EAAEP,kBAAkB,EAAE;IAC5C,IAAMW,qBAAqB,GAAGJ,kBAAkB;IAEhD,OAAO,YAAM;MACX,IAAMK,mBAAmB,GAAGzB,oBAAoB,CAAC0B,OAAO,CAACJ,cAAc,CAAC;MACxEtB,oBAAoB,CAAC2B,MAAM,CAACF,mBAAmB,EAAE,CAAC,CAAC;MACnD,IAAID,qBAAqB,EAAEP,oBAAoB,EAAE;MACjD,IAAIO,qBAAqB,IAAIxB,oBAAoB,CAACqB,MAAM,GAAG,CAAC,EAAE;QAC5DrB,oBAAoB,CAAC,CAAC,CAAC,CAACa,kBAAkB,EAAE;MAC9C;IACF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOJ,cAAc;AACvB,CAAC;AAACmB,OAAA,CAAA3B,cAAA,GAAAA,cAAA;AAeF,IAAM4B,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAA,EAAiC;EACvD,OAAO,UAACC,KAAK,EAAK;IAChB,IAAMrB,cAAc,GAAGR,cAAc,EAAE;IAEvC,OAAO,IAAA8B,uBAAW,EAACD,KAAK,EAAE;MACxBrB,cAAc,EAAdA;IACF,CAAC,CAAC;EACJ,CAAC;AACH,CAAC;AAAC,IAAAuB,QAAA,GAEaH,kBAAkB;AAAAD,OAAA,cAAAI,QAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"focusSourceEnhance.mjs","names":["React","assignProps","lastFocusSource","focusSourceListeners","useFocusSource","handleMouseDown","useCallback","forEach","listener","setFocusSource","handleKeyDown","focusSourceRef","useRef","source","current","subscribeListeners","document","addEventListener","capture","unsubscribeListeners","removeEventListener","useEffect","needToAddListeners","length","sourceListener","push","needToRemoveListeners","sourceListenerIndex","indexOf","splice","focusSourceEnhance","props"],"sources":["../../src/enhances/focusSourceEnhance.tsx"],"sourcesContent":["import React from 'react';\nimport assignProps from '../assignProps';\n\nlet lastFocusSource: 'mouse' | 'keyboard' | 'none' = 'none';\nconst focusSourceListeners: {\n setFocusSource: (source: 'mouse' | 'keyboard' | 'none') => void;\n subscribeListeners: () => void;\n}[] = [];\nexport const useFocusSource = () => {\n const handleMouseDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('mouse')),\n [],\n );\n const handleKeyDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('keyboard')),\n [],\n );\n const focusSourceRef = React.useRef<'none' | 'mouse' | 'keyboard'>(lastFocusSource);\n const setFocusSource = React.useCallback((source: 'none' | 'mouse' | 'keyboard') => {\n focusSourceRef.current = source;\n lastFocusSource = source;\n }, []);\n const subscribeListeners = React.useCallback(() => {\n document.addEventListener('mousedown', handleMouseDown, { capture: true });\n document.addEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n const unsubscribeListeners = React.useCallback(() => {\n document.removeEventListener('mousedown', handleMouseDown, { capture: true });\n document.removeEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n\n React.useEffect(() => {\n const needToAddListeners = focusSourceListeners.length === 0;\n const sourceListener = { setFocusSource, subscribeListeners };\n focusSourceListeners.push(sourceListener);\n if (needToAddListeners) subscribeListeners();\n const needToRemoveListeners = needToAddListeners;\n\n return () => {\n const sourceListenerIndex = focusSourceListeners.indexOf(sourceListener);\n focusSourceListeners.splice(sourceListenerIndex, 1);\n if (needToRemoveListeners) unsubscribeListeners();\n if (needToRemoveListeners && focusSourceListeners.length > 0) {\n focusSourceListeners[0].subscribeListeners();\n }\n };\n }, []);\n\n return focusSourceRef;\n};\n\nexport type FocusSourceEnhanceHook = (props: {\n tabIndex?: number;\n disabled?: boolean;\n loading?: boolean;\n autoFocus?: boolean;\n}) => {\n tabIndex: number;\n keyboardFocused: boolean;\n onFocus: (e: React.FocusEvent) => void;\n onBlur: () => void;\n};\n\nconst focusSourceEnhance = (): FocusSourceEnhanceHook => {\n return (props) => {\n const focusSourceRef = useFocusSource();\n\n return assignProps(props, {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AW,EAAEf,eAAe,EAAE;MAAEa,OAAO,EAAE;IAAK,CAAC,CAAC;IAC7EF,QAAQ,CAACI,mBAAmB,CAAC,SAAS,EAAEV,aAAa,EAAE;MAAEQ,OAAO,EAAE;IAAK,CAAC,CAAC;EAC3E,CAAC,EAAE,EAAE,CAAC;EAENlB,KAAK,CAACqB,SAAS,CAAC,YAAM;IACpB,IAAMC,kBAAkB,GAAGnB,oBAAoB,CAACoB,MAAM,KAAK,CAAC;IAC5D,IAAMC,cAAc,GAAG;MAAEf,cAAc,EAAdA,cAAc;MAAEM,kBAAkB,EAAlBA;IAAmB,CAAC;IAC7DZ,oBAAoB,CAACsB,IAAI,CAACD,cAAc,CAAC;IACzC,IAAIF,kBAAkB,EAAEP,kBAAkB,EAAE;IAC5C,IAAMW,qBAAqB,GAAGJ,kBAAkB;IAEhD,OAAO,YAAM;MACX,IAAMK,mBAAmB,GAAGxB,oBAAoB,CAACyB,OAAO,CAACJ,cAAc,CAAC;MACxErB,oBAAoB,CAAC0B,MAAM,CAACF,mBAAmB,EAAE,CAAC,CAAC;MACnD,IAAID,qBAAqB,EAAEP,oBAAoB,EAAE;MACjD,IAAIO,qBAAqB,IAAIvB,oBAAoB,CAACoB,MAAM,GAAG,CAAC,EAAE;QAC5DpB,oBAAoB,CAAC,CAAC,CAAC,CAACY,kBAAkB,EAAE;MAC9C;IACF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOJ,cAAc;AACvB,CAAC;
|
1
|
+
{"version":3,"file":"focusSourceEnhance.mjs","names":["React","assignProps","lastFocusSource","focusSourceListeners","useFocusSource","handleMouseDown","useCallback","forEach","listener","setFocusSource","handleKeyDown","focusSourceRef","useRef","source","current","subscribeListeners","document","addEventListener","capture","unsubscribeListeners","removeEventListener","useEffect","needToAddListeners","length","sourceListener","push","needToRemoveListeners","sourceListenerIndex","indexOf","splice","focusSourceEnhance","props"],"sources":["../../src/enhances/focusSourceEnhance.tsx"],"sourcesContent":["import React from 'react';\nimport assignProps from '../assignProps';\n\nlet lastFocusSource: 'mouse' | 'keyboard' | 'none' = 'none';\nconst focusSourceListeners: {\n setFocusSource: (source: 'mouse' | 'keyboard' | 'none') => void;\n subscribeListeners: () => void;\n}[] = [];\nexport const useFocusSource = () => {\n const handleMouseDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('mouse')),\n [],\n );\n const handleKeyDown = React.useCallback(\n () => focusSourceListeners.forEach((listener) => listener.setFocusSource('keyboard')),\n [],\n );\n const focusSourceRef = React.useRef<'none' | 'mouse' | 'keyboard'>(lastFocusSource);\n const setFocusSource = React.useCallback((source: 'none' | 'mouse' | 'keyboard') => {\n focusSourceRef.current = source;\n lastFocusSource = source;\n }, []);\n const subscribeListeners = React.useCallback(() => {\n document.addEventListener('mousedown', handleMouseDown, { capture: true });\n document.addEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n const unsubscribeListeners = React.useCallback(() => {\n document.removeEventListener('mousedown', handleMouseDown, { capture: true });\n document.removeEventListener('keydown', handleKeyDown, { capture: true });\n }, []);\n\n React.useEffect(() => {\n const needToAddListeners = focusSourceListeners.length === 0;\n const sourceListener = { setFocusSource, subscribeListeners };\n focusSourceListeners.push(sourceListener);\n if (needToAddListeners) subscribeListeners();\n const needToRemoveListeners = needToAddListeners;\n\n return () => {\n const sourceListenerIndex = focusSourceListeners.indexOf(sourceListener);\n focusSourceListeners.splice(sourceListenerIndex, 1);\n if (needToRemoveListeners) unsubscribeListeners();\n if (needToRemoveListeners && focusSourceListeners.length > 0) {\n focusSourceListeners[0].subscribeListeners();\n }\n };\n }, []);\n\n return focusSourceRef;\n};\n\nexport type FocusSourceEnhanceHook = (props: {\n tabIndex?: number;\n disabled?: boolean;\n loading?: boolean;\n autoFocus?: boolean;\n}) => {\n tabIndex: number;\n keyboardFocused: boolean;\n onFocus: (e: React.FocusEvent) => void;\n onBlur: () => void;\n focusSourceRef: React.MutableRefObject<typeof lastFocusSource>;\n};\n\nconst focusSourceEnhance = (): FocusSourceEnhanceHook => {\n return (props) => {\n const focusSourceRef = useFocusSource();\n\n return assignProps(props, {\n focusSourceRef,\n });\n };\n};\n\nexport default focusSourceEnhance;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,WAAW,MAAM,oBAAgB;AAExC,IAAIC,eAA8C,GAAG,MAAM;AAC3D,IAAMC,oBAGH,GAAG,EAAE;AACR,OAAO,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAA,EAAS;EAClC,IAAMC,eAAe,GAAGL,KAAK,CAACM,WAAW,CACvC;IAAA,OAAMH,oBAAoB,CAACI,OAAO,CAAC,UAACC,QAAQ;MAAA,OAAKA,QAAQ,CAACC,cAAc,CAAC,OAAO,CAAC;IAAA,EAAC;EAAA,GAClF,EAAE,CACH;EACD,IAAMC,aAAa,GAAGV,KAAK,CAACM,WAAW,CACrC;IAAA,OAAMH,oBAAoB,CAACI,OAAO,CAAC,UAACC,QAAQ;MAAA,OAAKA,QAAQ,CAACC,cAAc,CAAC,UAAU,CAAC;IAAA,EAAC;EAAA,GACrF,EAAE,CACH;EACD,IAAME,cAAc,GAAGX,KAAK,CAACY,MAAM,CAAgCV,eAAe,CAAC;EACnF,IAAMO,cAAc,GAAGT,KAAK,CAACM,WAAW,CAAC,UAACO,MAAqC,EAAK;IAClFF,cAAc,CAACG,OAAO,GAAGD,MAAM;IAC/BX,eAAe,GAAGW,MAAM;EAC1B,CAAC,EAAE,EAAE,CAAC;EACN,IAAME,kBAAkB,GAAGf,KAAK,CAACM,WAAW,CAAC,YAAM;IACjDU,QAAQ,CAACC,gBAAgB,CAAC,WAAW,EAAEZ,eAAe,EAAE;MAAEa,OAAO,EAAE;IAAK,CAAC,CAAC;IAC1EF,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAEP,aAAa,EAAE;MAAEQ,OAAO,EAAE;IAAK,CAAC,CAAC;EACxE,CAAC,EAAE,EAAE,CAAC;EACN,IAAMC,oBAAoB,GAA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BAAkB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function getAccessibleName(element: HTMLElement | null): string;
|
@@ -0,0 +1,56 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
exports.getAccessibleName = getAccessibleName;
|
8
|
+
var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
|
9
|
+
function getAccessibleName(element) {
|
10
|
+
var _ref, _ref2, _ref3, _getByLabelledBy;
|
11
|
+
if (element === null) {
|
12
|
+
return '';
|
13
|
+
}
|
14
|
+
return (_ref = (_ref2 = (_ref3 = (_getByLabelledBy = getByLabelledBy(element)) !== null && _getByLabelledBy !== void 0 ? _getByLabelledBy : getByAriaLabel(element)) !== null && _ref3 !== void 0 ? _ref3 : getByLabel(element)) !== null && _ref2 !== void 0 ? _ref2 : getByTitle(element)) !== null && _ref !== void 0 ? _ref : '';
|
15
|
+
}
|
16
|
+
function getByLabelledBy(element) {
|
17
|
+
var ariaLabelledBy = element.getAttribute('aria-labelledby');
|
18
|
+
if (!ariaLabelledBy) {
|
19
|
+
return null;
|
20
|
+
}
|
21
|
+
var idList = ariaLabelledBy.split(/\s/);
|
22
|
+
var result = [];
|
23
|
+
var _iterator = (0, _createForOfIteratorHelper2["default"])(idList),
|
24
|
+
_step;
|
25
|
+
try {
|
26
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
27
|
+
var id = _step.value;
|
28
|
+
var label = document.getElementById(id);
|
29
|
+
if (label) {
|
30
|
+
result.push((label.textContent || '').trim());
|
31
|
+
}
|
32
|
+
}
|
33
|
+
} catch (err) {
|
34
|
+
_iterator.e(err);
|
35
|
+
} finally {
|
36
|
+
_iterator.f();
|
37
|
+
}
|
38
|
+
return result.join(' ');
|
39
|
+
}
|
40
|
+
function getByAriaLabel(element) {
|
41
|
+
return element.getAttribute('aria-label');
|
42
|
+
}
|
43
|
+
function getByLabel(element) {
|
44
|
+
var labels = (element instanceof HTMLButtonElement || element instanceof HTMLInputElement) && element.labels;
|
45
|
+
if (!labels || !labels.length) {
|
46
|
+
return null;
|
47
|
+
}
|
48
|
+
var result = Array.prototype.map.call(labels, function (label) {
|
49
|
+
return (label.textContent || '').trim();
|
50
|
+
});
|
51
|
+
return result.join(' ');
|
52
|
+
}
|
53
|
+
function getByTitle(element) {
|
54
|
+
return element.title;
|
55
|
+
}
|
56
|
+
//# sourceMappingURL=getAccessibleName.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getAccessibleName.js","names":["getAccessibleName","element","_ref","_ref2","_ref3","_getByLabelledBy","getByLabelledBy","getByAriaLabel","getByLabel","getByTitle","ariaLabelledBy","getAttribute","idList","split","result","_iterator","_createForOfIteratorHelper2","_step","s","n","done","id","value","label","document","getElementById","push","textContent","trim","err","e","f","join","labels","HTMLButtonElement","HTMLInputElement","length","Array","prototype","map","call","title"],"sources":["../src/getAccessibleName.ts"],"sourcesContent":["export function getAccessibleName(element: HTMLElement | null): string {\n if (element === null) {\n return '';\n }\n\n return (\n getByLabelledBy(element) ??\n getByAriaLabel(element) ??\n getByLabel(element) ??\n getByTitle(element) ??\n ''\n );\n}\n\nfunction getByLabelledBy(element: HTMLElement): string | null {\n const ariaLabelledBy = element.getAttribute('aria-labelledby');\n\n if (!ariaLabelledBy) {\n return null;\n }\n\n const idList = ariaLabelledBy.split(/\\s/);\n const result: string[] = [];\n\n for (const id of idList) {\n const label = document.getElementById(id);\n\n if (label) {\n result.push((label.textContent || '').trim());\n }\n }\n\n return result.join(' ');\n}\nfunction getByAriaLabel(element: HTMLElement): string | null {\n return element.getAttribute('aria-label');\n}\nfunction getByLabel(element: HTMLElement): string | null {\n const labels =\n (element instanceof HTMLButtonElement || element instanceof HTMLInputElement) && element.labels;\n\n if (!labels || !labels.length) {\n return null;\n }\n\n const result = Array.prototype.map.call(labels, (label: HTMLLabelElement) => {\n return (label.textContent || '').trim();\n });\n\n return result.join(' ');\n}\n\nfunction getByTitle(element: HTMLElement): string | null {\n return element.title;\n}\n"],"mappings":";;;;;;;;AAAO,SAASA,iBAAiBA,CAACC,OAA2B,EAAU;EAAA,IAAAC,IAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,gBAAA;EACrE,IAAIJ,OAAO,KAAK,IAAI,EAAE;IACpB,OAAO,EAAE;EACX;EAEA,QAAAC,IAAA,IAAAC,KAAA,IAAAC,KAAA,IAAAC,gBAAA,GACEC,eAAe,CAACL,OAAO,CAAC,cAAAI,gBAAA,cAAAA,gBAAA,GACxBE,cAAc,CAACN,OAAO,CAAC,cAAAG,KAAA,cAAAA,KAAA,GACvBI,UAAU,CAACP,OAAO,CAAC,cAAAE,KAAA,cAAAA,KAAA,GACnBM,UAAU,CAACR,OAAO,CAAC,cAAAC,IAAA,cAAAA,IAAA,GACnB,EAAE;AAEN;AAEA,SAASI,eAAeA,CAACL,OAAoB,EAAiB;EAC5D,IAAMS,cAAc,GAAGT,OAAO,CAACU,YAAY,CAAC,iBAAiB,CAAC;EAE9D,IAAI,CAACD,cAAc,EAAE;IACnB,OAAO,IAAI;EACb;EAEA,IAAME,MAAM,GAAGF,cAAc,CAACG,KAAK,CAAC,IAAI,CAAC;EACzC,IAAMC,MAAgB,GAAG,EAAE;EAAC,IAAAC,SAAA,OAAAC,2BAAA,aAEXJ,MAAM;IAAAK,KAAA;EAAA;IAAvB,KAAAF,SAAA,CAAAG,CAAA,MAAAD,KAAA,GAAAF,SAAA,CAAAI,CAAA,IAAAC,IAAA,GAAyB;MAAA,IAAdC,EAAE,GAAAJ,KAAA,CAAAK,KAAA;MACX,IAAMC,KAAK,GAAGC,QAAQ,CAACC,cAAc,CAACJ,EAAE,CAAC;MAEzC,IAAIE,KAAK,EAAE;QACTT,MAAM,CAACY,IAAI,CAAC,CAACH,KAAK,CAACI,WAAW,IAAI,EAAE,EAAEC,IAAI,EAAE,CAAC;MAC/C;IACF;EAAC,SAAAC,GAAA;IAAAd,SAAA,CAAAe,CAAA,CAAAD,GAAA;EAAA;IAAAd,SAAA,CAAAgB,CAAA;EAAA;EAED,OAAOjB,MAAM,CAACkB,IAAI,CAAC,GAAG,CAAC;AACzB;AACA,SAASzB,cAAcA,CAACN,OAAoB,EAAiB;EAC3D,OAAOA,OAAO,CAACU,YAAY,CAAC,YAAY,CAAC;AAC3C;AACA,SAASH,UAAUA,CAACP,OAAoB,EAAiB;EACvD,IAAMgC,MAAM,GACV,CAAChC,OAAO,YAAYiC,iBAAiB,IAAIjC,OAAO,YAAYkC,gBAAgB,KAAKlC,OAAO,CAACgC,MAAM;EAEjG,IAAI,CAACA,MAAM,IAAI,CAACA,MAAM,CAACG,MAAM,EAAE;IAC7B,OAAO,IAAI;EACb;EAEA,IAAMtB,MAAM,GAAGuB,KAAK,CAACC,SAAS,CAACC,GAAG,CAACC,IAAI,CAACP,MAAM,EAAE,UAACV,KAAuB,EAAK;IAC3E,OAAO,CAACA,KAAK,CAACI,WAAW,IAAI,EAAE,EAAEC,IAAI,EAAE;EACzC,CAAC,CAAC;EAEF,OAAOd,MAAM,CAACkB,IAAI,CAAC,GAAG,CAAC;AACzB;AAEA,SAASvB,UAAUA,CAACR,OAAoB,EAAiB;EACvD,OAAOA,OAAO,CAACwC,KAAK;AACtB"}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import _createForOfIteratorHelper from "@babel/runtime/helpers/createForOfIteratorHelper";
|
2
|
+
export function getAccessibleName(element) {
|
3
|
+
var _ref, _ref2, _ref3, _getByLabelledBy;
|
4
|
+
if (element === null) {
|
5
|
+
return '';
|
6
|
+
}
|
7
|
+
return (_ref = (_ref2 = (_ref3 = (_getByLabelledBy = getByLabelledBy(element)) !== null && _getByLabelledBy !== void 0 ? _getByLabelledBy : getByAriaLabel(element)) !== null && _ref3 !== void 0 ? _ref3 : getByLabel(element)) !== null && _ref2 !== void 0 ? _ref2 : getByTitle(element)) !== null && _ref !== void 0 ? _ref : '';
|
8
|
+
}
|
9
|
+
function getByLabelledBy(element) {
|
10
|
+
var ariaLabelledBy = element.getAttribute('aria-labelledby');
|
11
|
+
if (!ariaLabelledBy) {
|
12
|
+
return null;
|
13
|
+
}
|
14
|
+
var idList = ariaLabelledBy.split(/\s/);
|
15
|
+
var result = [];
|
16
|
+
var _iterator = _createForOfIteratorHelper(idList),
|
17
|
+
_step;
|
18
|
+
try {
|
19
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
20
|
+
var id = _step.value;
|
21
|
+
var label = document.getElementById(id);
|
22
|
+
if (label) {
|
23
|
+
result.push((label.textContent || '').trim());
|
24
|
+
}
|
25
|
+
}
|
26
|
+
} catch (err) {
|
27
|
+
_iterator.e(err);
|
28
|
+
} finally {
|
29
|
+
_iterator.f();
|
30
|
+
}
|
31
|
+
return result.join(' ');
|
32
|
+
}
|
33
|
+
function getByAriaLabel(element) {
|
34
|
+
return element.getAttribute('aria-label');
|
35
|
+
}
|
36
|
+
function getByLabel(element) {
|
37
|
+
var labels = (element instanceof HTMLButtonElement || element instanceof HTMLInputElement) && element.labels;
|
38
|
+
if (!labels || !labels.length) {
|
39
|
+
return null;
|
40
|
+
}
|
41
|
+
var result = Array.prototype.map.call(labels, function (label) {
|
42
|
+
return (label.textContent || '').trim();
|
43
|
+
});
|
44
|
+
return result.join(' ');
|
45
|
+
}
|
46
|
+
function getByTitle(element) {
|
47
|
+
return element.title;
|
48
|
+
}
|
49
|
+
//# sourceMappingURL=getAccessibleName.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getAccessibleName.mjs","names":["getAccessibleName","element","_ref","_ref2","_ref3","_getByLabelledBy","getByLabelledBy","getByAriaLabel","getByLabel","getByTitle","ariaLabelledBy","getAttribute","idList","split","result","_iterator","_createForOfIteratorHelper","_step","s","n","done","id","value","label","document","getElementById","push","textContent","trim","err","e","f","join","labels","HTMLButtonElement","HTMLInputElement","length","Array","prototype","map","call","title"],"sources":["../src/getAccessibleName.ts"],"sourcesContent":["export function getAccessibleName(element: HTMLElement | null): string {\n if (element === null) {\n return '';\n }\n\n return (\n getByLabelledBy(element) ??\n getByAriaLabel(element) ??\n getByLabel(element) ??\n getByTitle(element) ??\n ''\n );\n}\n\nfunction getByLabelledBy(element: HTMLElement): string | null {\n const ariaLabelledBy = element.getAttribute('aria-labelledby');\n\n if (!ariaLabelledBy) {\n return null;\n }\n\n const idList = ariaLabelledBy.split(/\\s/);\n const result: string[] = [];\n\n for (const id of idList) {\n const label = document.getElementById(id);\n\n if (label) {\n result.push((label.textContent || '').trim());\n }\n }\n\n return result.join(' ');\n}\nfunction getByAriaLabel(element: HTMLElement): string | null {\n return element.getAttribute('aria-label');\n}\nfunction getByLabel(element: HTMLElement): string | null {\n const labels =\n (element instanceof HTMLButtonElement || element instanceof HTMLInputElement) && element.labels;\n\n if (!labels || !labels.length) {\n return null;\n }\n\n const result = Array.prototype.map.call(labels, (label: HTMLLabelElement) => {\n return (label.textContent || '').trim();\n });\n\n return result.join(' ');\n}\n\nfunction getByTitle(element: HTMLElement): string | null {\n return element.title;\n}\n"],"mappings":";AAAA,OAAO,SAASA,iBAAiBA,CAACC,OAA2B,EAAU;EAAA,IAAAC,IAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,gBAAA;EACrE,IAAIJ,OAAO,KAAK,IAAI,EAAE;IACpB,OAAO,EAAE;EACX;EAEA,QAAAC,IAAA,IAAAC,KAAA,IAAAC,KAAA,IAAAC,gBAAA,GACEC,eAAe,CAACL,OAAO,CAAC,cAAAI,gBAAA,cAAAA,gBAAA,GACxBE,cAAc,CAACN,OAAO,CAAC,cAAAG,KAAA,cAAAA,KAAA,GACvBI,UAAU,CAACP,OAAO,CAAC,cAAAE,KAAA,cAAAA,KAAA,GACnBM,UAAU,CAACR,OAAO,CAAC,cAAAC,IAAA,cAAAA,IAAA,GACnB,EAAE;AAEN;AAEA,SAASI,eAAeA,C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K;IAC3E,OAAO,CAACA,KAAK,CAACI,WAAW,IAAI,EAAE,EAAEC,IAAI,EAAE;EACzC,CAAC,CAAC;EAEF,OAAOd,MAAM,CAACkB,IAAI,CAAC,GAAG,CAAC;AACzB;AAEA,SAASvB,UAAUA,CAACR,OAAoB,EAAiB;EACvD,OAAOA,OAAO,CAACwC,KAAK;AACtB"}
|
@@ -1,17 +1,51 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
4
5
|
value: true
|
5
6
|
});
|
6
7
|
exports.getEventTarget = void 0;
|
8
|
+
var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
|
7
9
|
var getEventTarget = function getEventTarget(event) {
|
8
10
|
if ('composedPath' in event) {
|
9
|
-
var
|
10
|
-
|
11
|
+
var composedPath = event.composedPath();
|
12
|
+
if (composedPath) {
|
13
|
+
var _iterator = (0, _createForOfIteratorHelper2["default"])(composedPath),
|
14
|
+
_step;
|
15
|
+
try {
|
16
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
17
|
+
var element = _step.value;
|
18
|
+
if ('shadowRoot' in element && element.shadowRoot) {
|
19
|
+
return element;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
} catch (err) {
|
23
|
+
_iterator.e(err);
|
24
|
+
} finally {
|
25
|
+
_iterator.f();
|
26
|
+
}
|
27
|
+
}
|
28
|
+
return (composedPath === null || composedPath === void 0 ? void 0 : composedPath[0]) || event.target;
|
11
29
|
}
|
12
30
|
if (event.nativeEvent && 'composedPath' in event.nativeEvent) {
|
13
|
-
var
|
14
|
-
|
31
|
+
var _composedPath = event.nativeEvent.composedPath();
|
32
|
+
if (_composedPath) {
|
33
|
+
var _iterator2 = (0, _createForOfIteratorHelper2["default"])(_composedPath),
|
34
|
+
_step2;
|
35
|
+
try {
|
36
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
37
|
+
var _element = _step2.value;
|
38
|
+
if ('shadowRoot' in _element && _element.shadowRoot) {
|
39
|
+
return _element;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
} catch (err) {
|
43
|
+
_iterator2.e(err);
|
44
|
+
} finally {
|
45
|
+
_iterator2.f();
|
46
|
+
}
|
47
|
+
}
|
48
|
+
return (_composedPath === null || _composedPath === void 0 ? void 0 : _composedPath[0]) || event.target;
|
15
49
|
}
|
16
50
|
return event.target;
|
17
51
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getEventTarget.js","names":["getEventTarget","event","
|
1
|
+
{"version":3,"file":"getEventTarget.js","names":["getEventTarget","event","composedPath","_iterator","_createForOfIteratorHelper2","_step","s","n","done","element","value","shadowRoot","err","e","f","target","nativeEvent","_iterator2","_step2","exports"],"sources":["../src/getEventTarget.ts"],"sourcesContent":["export const getEventTarget = (event: React.SyntheticEvent | Event): EventTarget | null => {\n if ('composedPath' in event) {\n const composedPath = event.composedPath();\n\n if (composedPath) {\n for (const element of composedPath) {\n if ('shadowRoot' in element && element.shadowRoot) {\n return element;\n }\n }\n }\n\n return composedPath?.[0] || event.target;\n }\n if (event.nativeEvent && 'composedPath' in event.nativeEvent) {\n const composedPath = event.nativeEvent.composedPath();\n\n if (composedPath) {\n for (const element of composedPath) {\n if ('shadowRoot' in element && element.shadowRoot) {\n return element;\n }\n }\n }\n return composedPath?.[0] || event.target;\n }\n return event.target;\n};\n"],"mappings":";;;;;;;;AAAO,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAAmC,EAAyB;EACzF,IAAI,cAAc,IAAIA,KAAK,EAAE;IAC3B,IAAMC,YAAY,GAAGD,KAAK,CAACC,YAAY,EAAE;IAEzC,IAAIA,YAAY,EAAE;MAAA,IAAAC,SAAA,OAAAC,2BAAA,aACMF,YAAY;QAAAG,KAAA;MAAA;QAAlC,KAAAF,SAAA,CAAAG,CAAA,MAAAD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
1
2
|
export var getEventTarget = function getEventTarget(event) {
|
2
3
|
if ('composedPath' in event) {
|
3
|
-
var
|
4
|
-
|
4
|
+
var composedPath = event.composedPath();
|
5
|
+
if (composedPath) {
|
6
|
+
var _iterator = _createForOfIteratorHelper(composedPath),
|
7
|
+
_step;
|
8
|
+
try {
|
9
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
10
|
+
var element = _step.value;
|
11
|
+
if ('shadowRoot' in element && element.shadowRoot) {
|
12
|
+
return element;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
} catch (err) {
|
16
|
+
_iterator.e(err);
|
17
|
+
} finally {
|
18
|
+
_iterator.f();
|
19
|
+
}
|
20
|
+
}
|
21
|
+
return (composedPath === null || composedPath === void 0 ? void 0 : composedPath[0]) || event.target;
|
5
22
|
}
|
6
23
|
if (event.nativeEvent && 'composedPath' in event.nativeEvent) {
|
7
|
-
var
|
8
|
-
|
24
|
+
var _composedPath = event.nativeEvent.composedPath();
|
25
|
+
if (_composedPath) {
|
26
|
+
var _iterator2 = _createForOfIteratorHelper(_composedPath),
|
27
|
+
_step2;
|
28
|
+
try {
|
29
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
30
|
+
var _element = _step2.value;
|
31
|
+
if ('shadowRoot' in _element && _element.shadowRoot) {
|
32
|
+
return _element;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
} catch (err) {
|
36
|
+
_iterator2.e(err);
|
37
|
+
} finally {
|
38
|
+
_iterator2.f();
|
39
|
+
}
|
40
|
+
}
|
41
|
+
return (_composedPath === null || _composedPath === void 0 ? void 0 : _composedPath[0]) || event.target;
|
9
42
|
}
|
10
43
|
return event.target;
|
11
44
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getEventTarget.mjs","names":["getEventTarget","event","
|
1
|
+
{"version":3,"file":"getEventTarget.mjs","names":["getEventTarget","event","composedPath","_iterator","_createForOfIteratorHelper","_step","s","n","done","element","value","shadowRoot","err","e","f","target","nativeEvent","_iterator2","_step2"],"sources":["../src/getEventTarget.ts"],"sourcesContent":["export const getEventTarget = (event: React.SyntheticEvent | Event): EventTarget | null => {\n if ('composedPath' in event) {\n const composedPath = event.composedPath();\n\n if (composedPath) {\n for (const element of composedPath) {\n if ('shadowRoot' in element && element.shadowRoot) {\n return element;\n }\n }\n }\n\n return composedPath?.[0] || event.target;\n }\n if (event.nativeEvent && 'composedPath' in event.nativeEvent) {\n const composedPath = event.nativeEvent.composedPath();\n\n if (composedPath) {\n for (const element of composedPath) {\n if ('shadowRoot' in element && element.shadowRoot) {\n return element;\n }\n }\n }\n return composedPath?.[0] || event.target;\n }\n return event.target;\n};\n"],"mappings":";AAAA,OAAO,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAAmC,EAAyB;EACzF,IAAI,cAAc,IAAIA,KAAK,EAAE;IAC3B,IAAMC,YAAY,GAAGD,KAAK,CAACC,YAAY,EAAE;IAEzC,IAAIA,YAAY,EAAE;MAAA,IAAAC,SAAA,GAAAC,0BAAA,CACMF,YAAY;QAAAG,KAAA;MAAA;QAAlC,KAAAF,SAAA,CAAAG,CAAA,MAAAD,KAAA,GAAAF,SAAA,CAAAI,CAAA,IAAAC,IAAA,GAAoC;UAAA,IAAzBC,OAAO,GAAAJ,KAAA,CAAAK,KAAA;UAChB,IAAI,YAAY,IAAID,OAAO,IAAIA,OAAO,CAACE,UAAU,EAAE;YACjD,OAAOF,OAAO;UAChB;QACF;MAAC,SAAAG,GAAA;QAAAT,SAAA,CAAAU,CAAA,CAAAD,GAAA;MAAA;QAAAT,SAAA,CAAAW,CAAA;MAAA;IACH;IAEA,OAAO,CAAAZ,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAG,CAAC,CAAC,KAAID,KAAK,CAACc,MAAM;EAC1C;EACA,IAAId,KAAK,CAACe,WAAW,IAAI,cAAc,IAAIf,KAAK,CAACe,WAAW,EAAE;IAC5D,IAAMd,aAAY,GAAGD,KAAK,CAACe,WAAW,CAACd,YAAY,EAAE;IAErD,IAAIA,aAAY,EAAE;MAAA,IAAAe,UAAA,GAAAb,0BAAA,CACMF,aAAY;QAAAgB,MAAA;MAAA;QAAlC,KAAAD,UAAA,CAAAX,CAAA,MAAAY,MAAA,GAAAD,UAAA,CAAAV,CAAA,IAAAC,IAAA,GAAoC;UAAA,IAAzBC,QAAO,GAAAS,MAAA,CAAAR,KAAA;UAChB,IAAI,YAAY,IAAID,QAAO,IAAIA,QAAO,CAACE,UAAU,EAAE;YACjD,OAAOF,QAAO;UAChB;QACF;MAAC,SAAAG,GAAA;QAAAK,UAAA,CAAAJ,CAAA,CAAAD,GAAA;MAAA;QAAAK,UAAA,CAAAH,CAAA;MAAA;IACH;IACA,OAAO,CAAAZ,aAAY,aAAZA,aAAY,uBAAZA,aAAY,CAAG,CAAC,CAAC,KAAID,KAAK,CAACc,MAAM;EAC1C;EACA,OAAOd,KAAK,CAACc,MAAM;AACrB,CAAC"}
|
package/utils/lib/injectStyle.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
export declare const inputProps: string[];
|
2
|
-
export default function
|
2
|
+
export default function getInputProps<T extends Partial<Record<K[number], any>>, K extends Array<keyof T>>(props: T, propsList?: K, allAriaPropsToControl?: boolean): [Partial<Pick<T, Extract<keyof T, K[number]>>>, Partial<Pick<T, Exclude<keyof T, K[number]>>>];
|
package/utils/lib/inputProps.js
CHANGED
@@ -3,15 +3,15 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports["default"] =
|
6
|
+
exports["default"] = getInputProps;
|
7
7
|
exports.inputProps = void 0;
|
8
8
|
var inputProps = ['autoFocus', 'defaultChecked', 'checked', 'disabled', 'name', 'type', 'value', 'defaultValue', 'id', 'indeterminate', 'required', 'onInvalid', 'onChange', 'onFocus', 'onBlur', 'onKeyDown', 'onKeyPress', 'onKeyUp', 'tabIndex', 'data-ui-name'];
|
9
9
|
exports.inputProps = inputProps;
|
10
|
-
function
|
10
|
+
function getInputProps(props, propsList, allAriaPropsToControl) {
|
11
11
|
var result = [{}, {}];
|
12
12
|
var keysToSplit = propsList || inputProps;
|
13
13
|
for (var key in props) {
|
14
|
-
if (keysToSplit.includes(key)) {
|
14
|
+
if (keysToSplit.includes(key) || allAriaPropsToControl && key.startsWith('aria-')) {
|
15
15
|
result[0][key] = props[key];
|
16
16
|
} else {
|
17
17
|
result[1][key] = props[key];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"inputProps.js","names":["inputProps","exports","
|
1
|
+
{"version":3,"file":"inputProps.js","names":["inputProps","exports","getInputProps","props","propsList","allAriaPropsToControl","result","keysToSplit","key","includes","startsWith"],"sources":["../src/inputProps.ts"],"sourcesContent":["export const inputProps = [\n 'autoFocus',\n 'defaultChecked',\n 'checked',\n 'disabled',\n 'name',\n 'type',\n 'value',\n 'defaultValue',\n 'id',\n 'indeterminate',\n 'required',\n 'onInvalid',\n 'onChange',\n 'onFocus',\n 'onBlur',\n 'onKeyDown',\n 'onKeyPress',\n 'onKeyUp',\n 'tabIndex',\n 'data-ui-name',\n];\n\ntype ExtractedProps<T extends object, K extends Array<keyof T>> = Partial<\n Pick<T, Extract<keyof T, K[number]>>\n>;\ntype ExcludedProps<T extends object, K extends Array<keyof T>> = Partial<\n Pick<T, Exclude<keyof T, K[number]>>\n>;\n\nexport default function getInputProps<\n T extends Partial<Record<K[number], any>>,\n K extends Array<keyof T>,\n>(props: T, propsList?: K, allAriaPropsToControl?: boolean) {\n const result: [ExtractedProps<T, K>, ExcludedProps<T, K>] = [{}, {}];\n\n const keysToSplit = propsList || (inputProps as unknown as K);\n\n for (const key in props) {\n if (keysToSplit.includes(key) || (allAriaPropsToControl && key.startsWith('aria-'))) {\n result[0][key as unknown as keyof ExtractedProps<T, K>] = props[key];\n } else {\n result[1][key as unknown as keyof ExcludedProps<T, K>] = props[key];\n }\n }\n\n return result;\n}\n"],"mappings":";;;;;;;AAAO,IAAMA,UAAU,GAAG,CACxB,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,MAAM,EACN,MAAM,EACN,OAAO,EACP,cAAc,EACd,IAAI,EACJ,eAAe,EACf,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,cAAc,CACf;AAACC,OAAA,CAAAD,UAAA,GAAAA,UAAA;AASa,SAASE,aAAaA,CAGnCC,KAAQ,EAAEC,SAAa,EAAEC,qBAA+B,EAAE;EAC1D,IAAMC,MAAmD,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EAEpE,IAAMC,WAAW,GAAGH,SAAS,IAAKJ,UAA2B;EAE7D,KAAK,IAAMQ,GAAG,IAAIL,KAAK,EAAE;IACvB,IAAII,WAAW,CAACE,QAAQ,CAACD,GAAG,CAAC,IAAKH,qBAAqB,IAAIG,GAAG,CAACE,UAAU,CAAC,OAAO,CAAE,EAAE;MACnFJ,MAAM,CAAC,CAAC,CAAC,CAACE,GAAG,CAA0C,GAAGL,KAAK,CAACK,GAAG,CAAC;IACtE,CAAC,MAAM;MACLF,MAAM,CAAC,CAAC,CAAC,CAACE,GAAG,CAAyC,GAAGL,KAAK,CAACK,GAAG,CAAC;IACrE;EACF;EAEA,OAAOF,MAAM;AACf"}
|
package/utils/lib/inputProps.mjs
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
export var inputProps = ['autoFocus', 'defaultChecked', 'checked', 'disabled', 'name', 'type', 'value', 'defaultValue', 'id', 'indeterminate', 'required', 'onInvalid', 'onChange', 'onFocus', 'onBlur', 'onKeyDown', 'onKeyPress', 'onKeyUp', 'tabIndex', 'data-ui-name'];
|
2
|
-
export default function
|
2
|
+
export default function getInputProps(props, propsList, allAriaPropsToControl) {
|
3
3
|
var result = [{}, {}];
|
4
4
|
var keysToSplit = propsList || inputProps;
|
5
5
|
for (var key in props) {
|
6
|
-
if (keysToSplit.includes(key)) {
|
6
|
+
if (keysToSplit.includes(key) || allAriaPropsToControl && key.startsWith('aria-')) {
|
7
7
|
result[0][key] = props[key];
|
8
8
|
} else {
|
9
9
|
result[1][key] = props[key];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"inputProps.mjs","names":["inputProps","
|
1
|
+
{"version":3,"file":"inputProps.mjs","names":["inputProps","getInputProps","props","propsList","allAriaPropsToControl","result","keysToSplit","key","includes","startsWith"],"sources":["../src/inputProps.ts"],"sourcesContent":["export const inputProps = [\n 'autoFocus',\n 'defaultChecked',\n 'checked',\n 'disabled',\n 'name',\n 'type',\n 'value',\n 'defaultValue',\n 'id',\n 'indeterminate',\n 'required',\n 'onInvalid',\n 'onChange',\n 'onFocus',\n 'onBlur',\n 'onKeyDown',\n 'onKeyPress',\n 'onKeyUp',\n 'tabIndex',\n 'data-ui-name',\n];\n\ntype ExtractedProps<T extends object, K extends Array<keyof T>> = Partial<\n Pick<T, Extract<keyof T, K[number]>>\n>;\ntype ExcludedProps<T extends object, K extends Array<keyof T>> = Partial<\n Pick<T, Exclude<keyof T, K[number]>>\n>;\n\nexport default function getInputProps<\n T extends Partial<Record<K[number], any>>,\n K extends Array<keyof T>,\n>(props: T, propsList?: K, allAriaPropsToControl?: boolean) {\n const result: [ExtractedProps<T, K>, ExcludedProps<T, K>] = [{}, {}];\n\n const keysToSplit = propsList || (inputProps as unknown as K);\n\n for (const key in props) {\n if (keysToSplit.includes(key) || (allAriaPropsToControl && key.startsWith('aria-'))) {\n result[0][key as unknown as keyof ExtractedProps<T, K>] = props[key];\n } else {\n result[1][key as unknown as keyof ExcludedProps<T, K>] = props[key];\n }\n }\n\n return result;\n}\n"],"mappings":"AAAA,OAAO,IAAMA,UAAU,GAAG,CACxB,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,MAAM,EACN,MAAM,EACN,OAAO,EACP,cAAc,EACd,IAAI,EACJ,eAAe,EACf,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,cAAc,CACf;AASD,eAAe,SAASC,aAAaA,CAGnCC,KAAQ,EAAEC,SAAa,EAAEC,qBAA+B,EAAE;EAC1D,IAAMC,MAAmD,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EAEpE,IAAMC,WAAW,GAAGH,SAAS,IAAKH,UAA2B;EAE7D,KAAK,IAAMO,GAAG,IAAIL,KAAK,EAAE;IACvB,IAAII,WAAW,CAACE,QAAQ,CAACD,GAAG,CAAC,IAAKH,qBAAqB,IAAIG,GAAG,CAACE,UAAU,CAAC,OAAO,CAAE,EAAE;MACnFJ,MAAM,CAAC,CAAC,CAAC,CAACE,GAAG,CAA0C,GAAGL,KAAK,CAACK,GAAG,CAAC;IACtE,CAAC,MAAM;MACLF,MAAM,CAAC,CAAC,CAAC,CAACE,GAAG,CAAyC,GAAGL,KAAK,CAACK,GAAG,CAAC;IACrE;EACF;EAEA,OAAOF,MAAM;AACf"}
|
@@ -19,11 +19,11 @@ var _illustration = require("intergalactic/illustration");
|
|
19
19
|
var _flexBox = require("intergalactic/flex-box");
|
20
20
|
var _isNode = _interopRequireDefault(require("intergalactic/utils/lib/isNode"));
|
21
21
|
/*__reshadow-styles__:"./style/widget-empty.shadow.css"*/
|
22
|
-
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".
|
23
|
-
"__SWidgetEmpty": "
|
24
|
-
"__SImage": "
|
25
|
-
"__STitle": "
|
26
|
-
"__SDescription": "
|
22
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SWidgetEmpty_c16xm_gg_{flex-direction:column;justify-content:center;align-items:center;margin-bottom:var(--intergalactic-spacing-4x, 16px)}.___SImage_c16xm_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:var(--intergalactic-spacing-3x, 12px);width:80px;height:80px}.___SDescription_c16xm_gg_,.___STitle_c16xm_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___STitle_c16xm_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700)}.___SDescription_c16xm_gg_{text-align:center;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);max-width:400px}.___STitle_c16xm_gg_+.___SDescription_c16xm_gg_{margin-top:var(--intergalactic-spacing-1x, 4px)}.___SDescription_c16xm_gg_+.___SDescription_c16xm_gg_{margin-top:var(--intergalactic-spacing-2x, 8px)}" /*__inner_css_end__*/, "c16xm_gg_") /*__reshadow_css_end__*/, {
|
23
|
+
"__SWidgetEmpty": "___SWidgetEmpty_c16xm_gg_",
|
24
|
+
"__SImage": "___SImage_c16xm_gg_",
|
25
|
+
"__STitle": "___STitle_c16xm_gg_",
|
26
|
+
"__SDescription": "___SDescription_c16xm_gg_"
|
27
27
|
});
|
28
28
|
var getIconPath = function getIconPath(name) {
|
29
29
|
return (0, _illustration.getIllustrationPath)(name);
|
@@ -14,11 +14,11 @@ import { getIllustrationPath } from 'intergalactic/illustration';
|
|
14
14
|
import { Box, Flex } from 'intergalactic/flex-box';
|
15
15
|
import isNode from 'intergalactic/utils/lib/isNode';
|
16
16
|
/*__reshadow-styles__:"./style/widget-empty.shadow.css"*/
|
17
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
18
|
-
"__SWidgetEmpty": "
|
19
|
-
"__SImage": "
|
20
|
-
"__STitle": "
|
21
|
-
"__SDescription": "
|
17
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SWidgetEmpty_c16xm_gg_{flex-direction:column;justify-content:center;align-items:center;margin-bottom:var(--intergalactic-spacing-4x, 16px)}.___SImage_c16xm_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:var(--intergalactic-spacing-3x, 12px);width:80px;height:80px}.___SDescription_c16xm_gg_,.___STitle_c16xm_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___STitle_c16xm_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700)}.___SDescription_c16xm_gg_{text-align:center;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);max-width:400px}.___STitle_c16xm_gg_+.___SDescription_c16xm_gg_{margin-top:var(--intergalactic-spacing-1x, 4px)}.___SDescription_c16xm_gg_+.___SDescription_c16xm_gg_{margin-top:var(--intergalactic-spacing-2x, 8px)}" /*__inner_css_end__*/, "c16xm_gg_") /*__reshadow_css_end__*/, {
|
18
|
+
"__SWidgetEmpty": "___SWidgetEmpty_c16xm_gg_",
|
19
|
+
"__SImage": "___SImage_c16xm_gg_",
|
20
|
+
"__STitle": "___STitle_c16xm_gg_",
|
21
|
+
"__SDescription": "___SDescription_c16xm_gg_"
|
22
22
|
});
|
23
23
|
export var getIconPath = function getIconPath(name) {
|
24
24
|
return getIllustrationPath(name);
|
@@ -1 +1 @@
|
|
1
|
-
{"name":"intergalactic/widget-empty","description":"Semrush WidgetEmpty Component","version":"4.
|
1
|
+
{"name":"intergalactic/widget-empty","description":"Semrush WidgetEmpty Component","version":"4.36.0-prerelease.0","main":"lib/cjs/index.js","module":"lib/es6/index.js","typings":"lib/types/index.d.ts","sideEffects":false,"author":"UI-kit team <ui-kit-team@semrush.com>","license":"MIT","scripts":{"build":"pnpm semcore-builder --source=js"},"dependencies":{"@semcore/flex-box":"5.34.0-prerelease.0","@semcore/illustration":"2.35.0-prerelease.0","@semcore/utils":"4.38.0-prerelease.0"},"peerDependencies":{"@semcore/core":"^2.32.0-prerelease.0","react":"16.8 - 18","react-dom":"16.8 - 18"},"repository":{"type":"git","url":"https://github.com/semrush/intergalactic.git","directory":"semcore/widget-empty"},"devDependencies":{"@types/react":"18.0.21","@semcore/testing-utils":"1.0.0"}}
|
package/wizard/lib/cjs/Wizard.js
CHANGED
@@ -29,18 +29,18 @@ var _button = _interopRequireDefault(require("intergalactic/button"));
|
|
29
29
|
var _m2 = _interopRequireDefault(require("intergalactic/icon/ArrowRight/m"));
|
30
30
|
var _m3 = _interopRequireDefault(require("intergalactic/icon/ArrowLeft/m"));
|
31
31
|
/*__reshadow-styles__:"./style/wizard.shadow.css"*/
|
32
|
-
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".
|
33
|
-
"__SWizard": "
|
34
|
-
"__SStepNumber": "
|
35
|
-
"__SCompleted": "
|
36
|
-
"__SContent": "
|
37
|
-
"__SSidebarMenu": "
|
38
|
-
"__SSidebar": "
|
39
|
-
"__SSidebarHeader": "
|
40
|
-
"__SStepper": "
|
41
|
-
"_active": "
|
42
|
-
"_disabled": "
|
43
|
-
"__SStepDescription": "
|
32
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SWizard_gkj0i_gg_{max-width:980px;max-height:700px;display:flex;padding:0;background:0 0}.___SSidebar_gkj0i_gg_{background:var(--intergalactic-control-primary-advertising, #5925ab);color:var(--intergalactic-text-primary-invert, #ffffff);font-weight:var(--intergalactic-bold, 700);font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);padding:var(--intergalactic-spacing-10x, 40px) var(--intergalactic-spacing-2x, 8px) calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-05x, 2px));max-width:220px;flex-shrink:0;box-sizing:border-box;border-radius:var(--intergalactic-modal-rounded, 12px)0 0 var(--intergalactic-modal-rounded, 12px)}@media (max-width:1060px){.___SSidebar_gkj0i_gg_{width:44px}}.___SSidebarHeader_gkj0i_gg_{font-size:var(--intergalactic-fs-300, 16px);margin:0 var(--intergalactic-spacing-5x, 20px) var(--intergalactic-spacing-4x, 16px)}@media (max-width:1060px){.___SSidebarHeader_gkj0i_gg_{display:none}}.___SStepper_gkj0i_gg_{display:flex;font-size:var(--intergalactic-fs-200, 14px);border-radius:var(--intergalactic-control-rounded, 6px);padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-3x, 12px);cursor:pointer;position:relative;overflow:auto;line-height:var(--intergalactic-lh-200, 142%)}@media (hover:hover){.___SStepper_gkj0i_gg_:hover{background:var(--intergalactic-control-primary-advertising-hover, #421983);z-index:1}}.___SStepper_gkj0i_gg_.__active_gkj0i_gg_{background:var(--intergalactic-control-primary-advertising-active, #8649e1)}.___SStepper_gkj0i_gg_.__disabled_gkj0i_gg_,.___SStepper_gkj0i_gg_:disabled{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}@media (max-width:1060px){.___SStepper_gkj0i_gg_{padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-1x, 4px)}@media (hover:hover){.___SStepper_gkj0i_gg_:hover{width:-moz-fit-content;width:fit-content;max-width:220px}.___SStepper_gkj0i_gg_:hover .___SStepDescription_gkj0i_gg_{display:block;border-radius:var(--intergalactic-control-rounded, 6px);white-space:nowrap;overflow:auto}.___SStepper_gkj0i_gg_.__active_gkj0i_gg_:hover .___SStepDescription_gkj0i_gg_{background:var(--intergalactic-control-primary-advertising-active, #8649e1)}}}.___SStepNumber_gkj0i_gg_{display:inline-block;min-width:20px}.___SCompleted_gkj0i_gg_{margin-top:1px}@media (max-width:1060px){.___SStepDescription_gkj0i_gg_{display:none}}.___SContent_gkj0i_gg_{padding:var(--intergalactic-spacing-10x, 40px);width:100%;border-radius:0 var(--intergalactic-modal-rounded, 12px) var(--intergalactic-modal-rounded, 12px)0;background:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SSidebarMenu_gkj0i_gg_{display:contents}" /*__inner_css_end__*/, "gkj0i_gg_") /*__reshadow_css_end__*/, {
|
33
|
+
"__SWizard": "___SWizard_gkj0i_gg_",
|
34
|
+
"__SStepNumber": "___SStepNumber_gkj0i_gg_",
|
35
|
+
"__SCompleted": "___SCompleted_gkj0i_gg_",
|
36
|
+
"__SContent": "___SContent_gkj0i_gg_",
|
37
|
+
"__SSidebarMenu": "___SSidebarMenu_gkj0i_gg_",
|
38
|
+
"__SSidebar": "___SSidebar_gkj0i_gg_",
|
39
|
+
"__SSidebarHeader": "___SSidebarHeader_gkj0i_gg_",
|
40
|
+
"__SStepper": "___SStepper_gkj0i_gg_",
|
41
|
+
"_active": "__active_gkj0i_gg_",
|
42
|
+
"_disabled": "__disabled_gkj0i_gg_",
|
43
|
+
"__SStepDescription": "___SStepDescription_gkj0i_gg_"
|
44
44
|
});
|
45
45
|
var WizardRoot = /*#__PURE__*/function (_Component) {
|
46
46
|
(0, _inherits2["default"])(WizardRoot, _Component);
|
@@ -61,7 +61,7 @@ var WizardRoot = /*#__PURE__*/function (_Component) {
|
|
61
61
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "stepperRefs", []);
|
62
62
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "stepperFocusPrev", function (i) {
|
63
63
|
return function () {
|
64
|
-
var prevStep = _this._steps.get(
|
64
|
+
var prevStep = _this._steps.get(i);
|
65
65
|
if (!prevStep) return;
|
66
66
|
_this.setState({
|
67
67
|
highlighted: prevStep === null || prevStep === void 0 ? void 0 : prevStep.step
|
@@ -74,7 +74,7 @@ var WizardRoot = /*#__PURE__*/function (_Component) {
|
|
74
74
|
});
|
75
75
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "stepperFocusNext", function (i) {
|
76
76
|
return function () {
|
77
|
-
var nextStep = _this._steps.get(
|
77
|
+
var nextStep = _this._steps.get(i + 2);
|
78
78
|
if (!nextStep) return;
|
79
79
|
_this.setState({
|
80
80
|
highlighted: nextStep === null || nextStep === void 0 ? void 0 : nextStep.step
|