@salutejs/plasma-new-hope 0.230.0-canary.1670.12462995068.0 → 0.231.0-canary.1647.12467637991.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Autocomplete/Autocomplete.css +4 -4
- package/cjs/components/Breadcrumbs/Breadcrumbs.js +2 -1
- package/cjs/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/cjs/components/Breadcrumbs/ui/BreadcrumbShorter/BreadcrumbShorter.css +3 -0
- package/cjs/components/Breadcrumbs/utils/getShortItems.js +44 -0
- package/cjs/components/Breadcrumbs/utils/getShortItems.js.map +1 -0
- package/cjs/components/Breadcrumbs/utils/index.js +0 -38
- package/cjs/components/Breadcrumbs/utils/index.js.map +1 -1
- package/cjs/components/Calendar/utils/getDateWithModification.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.context.js +10 -0
- package/cjs/components/Combobox/ComboboxNew/Combobox.context.js.map +1 -0
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +4 -4
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +2 -3
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +0 -75
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +0 -112
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -2
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/Combobox.css +4 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +4 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +4 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +4 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +4 -4
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +4 -4
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +4 -4
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +4 -4
- package/cjs/components/Dropdown/Dropdown.context.js +10 -0
- package/cjs/components/Dropdown/Dropdown.context.js.map +1 -0
- package/cjs/components/Dropdown/Dropdown.css +4 -4
- package/cjs/components/Dropdown/Dropdown.js +2 -3
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.css +27 -0
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +0 -25
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -2
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.css +4 -4
- package/cjs/components/Pagination/Pagination.css +4 -4
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +4 -4
- package/cjs/components/Popover/Popover.css +4 -4
- package/cjs/components/Popover/Popover.js +9 -5
- package/cjs/components/Popover/Popover.js.map +1 -1
- package/cjs/components/Popover/Popover.styles.js +7 -7
- package/cjs/components/Popover/Popover.styles.js.map +1 -1
- package/{es/components/Popover/Popover.styles_mzmbre.css → cjs/components/Popover/Popover.styles_gh4xvw.css} +2 -2
- package/cjs/components/Popover/Popover.tokens.js +2 -1
- package/cjs/components/Popover/Popover.tokens.js.map +1 -1
- package/cjs/components/Portal/Portal.js +1 -1
- package/cjs/components/Portal/Portal.js.map +1 -1
- package/cjs/components/Range/Range.css +4 -4
- package/cjs/components/Select/Select.context.js +10 -0
- package/cjs/components/Select/Select.context.js.map +1 -0
- package/cjs/components/Select/Select.css +4 -4
- package/cjs/components/Select/Select.js +2 -3
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/ui/Inner/Inner.css +0 -109
- package/cjs/components/Select/ui/Inner/Inner.js +1 -1
- package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.css +0 -112
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js +2 -2
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Select/ui/Target/Target.css +4 -4
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +4 -4
- package/cjs/components/Slider/Slider.css +4 -4
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +4 -11
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
- package/cjs/components/TextArea/TextArea.js +0 -1
- package/cjs/components/TextArea/TextArea.js.map +1 -1
- package/cjs/components/TextArea/ui/Hint/Hint.css +4 -4
- package/cjs/components/TextField/TextField.js +0 -1
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/ui/Hint/Hint.css +4 -4
- package/cjs/engines/common.js +0 -36
- package/cjs/engines/common.js.map +1 -1
- package/cjs/engines/linaria.js +3 -3
- package/cjs/engines/linaria.js.map +1 -1
- package/cjs/engines/utils.js +40 -0
- package/cjs/engines/utils.js.map +1 -0
- package/cjs/index.css +4 -4
- package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.js +2 -1
- package/emotion/cjs/components/Breadcrumbs/utils/getShortItems.js +42 -0
- package/emotion/cjs/components/Breadcrumbs/utils/index.js +1 -37
- package/emotion/cjs/components/Calendar/utils/getDateWithModification.js +3 -3
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.context.js +8 -0
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +3 -4
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
- package/emotion/cjs/components/Dropdown/Dropdown.context.js +8 -0
- package/emotion/cjs/components/Dropdown/Dropdown.js +3 -4
- package/emotion/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +3 -3
- package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
- package/emotion/cjs/components/Popover/Popover.js +10 -6
- package/emotion/cjs/components/Popover/Popover.styles.js +8 -16
- package/emotion/cjs/components/Popover/Popover.template-doc.mdx +128 -43
- package/emotion/cjs/components/Popover/Popover.tokens.js +2 -1
- package/emotion/cjs/components/Portal/Portal.js +1 -1
- package/emotion/cjs/components/Select/Select.context.js +8 -0
- package/emotion/cjs/components/Select/Select.js +3 -4
- package/emotion/cjs/components/Select/ui/Inner/Inner.js +3 -3
- package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -1
- package/emotion/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +3 -3
- package/emotion/cjs/components/TextArea/TextArea.js +1 -2
- package/emotion/cjs/components/TextField/TextField.js +1 -2
- package/emotion/cjs/engines/common.js +2 -42
- package/emotion/cjs/engines/emotion.js +4 -4
- package/emotion/cjs/engines/utils.js +42 -0
- package/emotion/es/components/Breadcrumbs/Breadcrumbs.js +2 -1
- package/emotion/es/components/Breadcrumbs/utils/getShortItems.js +35 -0
- package/emotion/es/components/Breadcrumbs/utils/index.js +0 -35
- package/emotion/es/components/Calendar/utils/getDateWithModification.js +1 -1
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.context.js +2 -0
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +2 -2
- package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
- package/emotion/es/components/Dropdown/Dropdown.context.js +2 -0
- package/emotion/es/components/Dropdown/Dropdown.js +2 -2
- package/emotion/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
- package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
- package/emotion/es/components/Popover/Popover.js +11 -7
- package/emotion/es/components/Popover/Popover.styles.js +8 -16
- package/emotion/es/components/Popover/Popover.template-doc.mdx +128 -43
- package/emotion/es/components/Popover/Popover.tokens.js +2 -1
- package/emotion/es/components/Portal/Portal.js +1 -1
- package/emotion/es/components/Select/Select.context.js +2 -0
- package/emotion/es/components/Select/Select.js +2 -2
- package/emotion/es/components/Select/ui/Inner/Inner.js +1 -1
- package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +1 -1
- package/emotion/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +1 -1
- package/emotion/es/components/TextArea/TextArea.js +1 -2
- package/emotion/es/components/TextField/TextField.js +1 -2
- package/emotion/es/engines/common.js +0 -40
- package/emotion/es/engines/emotion.js +2 -2
- package/emotion/es/engines/utils.js +36 -0
- package/es/components/Autocomplete/Autocomplete.css +4 -4
- package/es/components/Breadcrumbs/Breadcrumbs.js +2 -1
- package/es/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/es/components/Breadcrumbs/ui/BreadcrumbShorter/BreadcrumbShorter.css +3 -0
- package/es/components/Breadcrumbs/utils/getShortItems.js +39 -0
- package/es/components/Breadcrumbs/utils/getShortItems.js.map +1 -0
- package/es/components/Breadcrumbs/utils/index.js +1 -37
- package/es/components/Breadcrumbs/utils/index.js.map +1 -1
- package/es/components/Calendar/utils/getDateWithModification.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.context.js +6 -0
- package/es/components/Combobox/ComboboxNew/Combobox.context.js.map +1 -0
- package/es/components/Combobox/ComboboxNew/Combobox.css +4 -4
- package/es/components/Combobox/ComboboxNew/Combobox.js +3 -3
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +0 -75
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +0 -112
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/Combobox.css +4 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +4 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +4 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +4 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +4 -4
- package/es/components/DatePicker/RangeDate/RangeDate.css +4 -4
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +4 -4
- package/es/components/DatePicker/SingleDate/SingleDate.css +4 -4
- package/es/components/Dropdown/Dropdown.context.js +6 -0
- package/es/components/Dropdown/Dropdown.context.js.map +1 -0
- package/es/components/Dropdown/Dropdown.css +4 -4
- package/es/components/Dropdown/Dropdown.js +3 -3
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.css +27 -0
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +0 -25
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownOld/DropdownOld.css +4 -4
- package/es/components/Pagination/Pagination.css +4 -4
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +4 -4
- package/es/components/Popover/Popover.css +4 -4
- package/es/components/Popover/Popover.js +11 -7
- package/es/components/Popover/Popover.js.map +1 -1
- package/es/components/Popover/Popover.styles.js +7 -7
- package/es/components/Popover/Popover.styles.js.map +1 -1
- package/{cjs/components/Popover/Popover.styles_mzmbre.css → es/components/Popover/Popover.styles_gh4xvw.css} +2 -2
- package/es/components/Popover/Popover.tokens.js +2 -1
- package/es/components/Popover/Popover.tokens.js.map +1 -1
- package/es/components/Portal/Portal.js +1 -1
- package/es/components/Portal/Portal.js.map +1 -1
- package/es/components/Range/Range.css +4 -4
- package/es/components/Select/Select.context.js +6 -0
- package/es/components/Select/Select.context.js.map +1 -0
- package/es/components/Select/Select.css +4 -4
- package/es/components/Select/Select.js +3 -3
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/ui/Inner/Inner.css +0 -109
- package/es/components/Select/ui/Inner/Inner.js +1 -1
- package/es/components/Select/ui/Inner/Inner.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.css +0 -112
- package/es/components/Select/ui/Inner/ui/Item/Item.js +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Select/ui/Target/Target.css +4 -4
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +4 -4
- package/es/components/Slider/Slider.css +4 -4
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +4 -11
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
- package/es/components/TextArea/TextArea.js +0 -1
- package/es/components/TextArea/TextArea.js.map +1 -1
- package/es/components/TextArea/ui/Hint/Hint.css +4 -4
- package/es/components/TextField/TextField.js +0 -1
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/ui/Hint/Hint.css +4 -4
- package/es/engines/common.js +2 -36
- package/es/engines/common.js.map +1 -1
- package/es/engines/linaria.js +1 -1
- package/es/engines/linaria.js.map +1 -1
- package/es/engines/utils.js +35 -0
- package/es/engines/utils.js.map +1 -0
- package/es/index.css +4 -4
- package/package.json +22 -5
- package/styled-components/cjs/components/Breadcrumbs/Breadcrumbs.js +2 -1
- package/styled-components/cjs/components/Breadcrumbs/utils/getShortItems.js +42 -0
- package/styled-components/cjs/components/Breadcrumbs/utils/index.js +1 -37
- package/styled-components/cjs/components/Calendar/utils/getDateWithModification.js +3 -3
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.context.js +8 -0
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +3 -4
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
- package/styled-components/cjs/components/Dropdown/Dropdown.context.js +8 -0
- package/styled-components/cjs/components/Dropdown/Dropdown.js +3 -4
- package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +3 -3
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
- package/styled-components/cjs/components/Popover/Popover.js +10 -6
- package/styled-components/cjs/components/Popover/Popover.styles.js +4 -4
- package/styled-components/cjs/components/Popover/Popover.template-doc.mdx +128 -43
- package/styled-components/cjs/components/Popover/Popover.tokens.js +2 -1
- package/styled-components/cjs/components/Portal/Portal.js +1 -1
- package/styled-components/cjs/components/Select/Select.context.js +8 -0
- package/styled-components/cjs/components/Select/Select.js +3 -4
- package/styled-components/cjs/components/Select/ui/Inner/Inner.js +3 -3
- package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -1
- package/styled-components/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +3 -3
- package/styled-components/cjs/components/TextArea/TextArea.js +0 -1
- package/styled-components/cjs/components/TextField/TextField.js +0 -1
- package/styled-components/cjs/engines/common.js +2 -42
- package/styled-components/cjs/engines/styled-components.js +3 -3
- package/styled-components/cjs/engines/utils.js +42 -0
- package/styled-components/es/components/Breadcrumbs/Breadcrumbs.js +2 -1
- package/styled-components/es/components/Breadcrumbs/utils/getShortItems.js +35 -0
- package/styled-components/es/components/Breadcrumbs/utils/index.js +0 -35
- package/styled-components/es/components/Calendar/utils/getDateWithModification.js +1 -1
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.context.js +2 -0
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +2 -2
- package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
- package/styled-components/es/components/Dropdown/Dropdown.context.js +2 -0
- package/styled-components/es/components/Dropdown/Dropdown.js +2 -2
- package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
- package/styled-components/es/components/Popover/Popover.js +11 -7
- package/styled-components/es/components/Popover/Popover.styles.js +4 -4
- package/styled-components/es/components/Popover/Popover.template-doc.mdx +128 -43
- package/styled-components/es/components/Popover/Popover.tokens.js +2 -1
- package/styled-components/es/components/Portal/Portal.js +1 -1
- package/styled-components/es/components/Select/Select.context.js +2 -0
- package/styled-components/es/components/Select/Select.js +2 -2
- package/styled-components/es/components/Select/ui/Inner/Inner.js +1 -1
- package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +1 -1
- package/styled-components/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +1 -1
- package/styled-components/es/components/TextArea/TextArea.js +0 -1
- package/styled-components/es/components/TextField/TextField.js +0 -1
- package/styled-components/es/engines/common.js +0 -40
- package/styled-components/es/engines/styled-components.js +1 -1
- package/styled-components/es/engines/utils.js +36 -0
- package/types/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/types/components/Breadcrumbs/utils/getShortItems.d.ts +6 -0
- package/types/components/Breadcrumbs/utils/getShortItems.d.ts.map +1 -0
- package/types/components/Breadcrumbs/utils/index.d.ts +2 -5
- package/types/components/Breadcrumbs/utils/index.d.ts.map +1 -1
- package/types/components/Calendar/utils/getDateWithModification.d.ts +1 -1
- package/types/components/Calendar/utils/getDateWithModification.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.context.d.ts +4 -0
- package/types/components/Combobox/ComboboxNew/Combobox.context.d.ts.map +1 -0
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts +1 -2
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.context.d.ts +4 -0
- package/types/components/Dropdown/Dropdown.context.d.ts.map +1 -0
- package/types/components/Dropdown/Dropdown.d.ts +1 -2
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Popover/Popover.d.ts.map +1 -1
- package/types/components/Popover/Popover.styles.d.ts +1 -1
- package/types/components/Popover/Popover.styles.d.ts.map +1 -1
- package/types/components/Popover/Popover.tokens.d.ts +1 -0
- package/types/components/Popover/Popover.tokens.d.ts.map +1 -1
- package/types/components/Popover/Popover.types.d.ts +4 -4
- package/types/components/Popover/Popover.types.d.ts.map +1 -1
- package/types/components/Portal/Portal.types.d.ts +1 -1
- package/types/components/Portal/Portal.types.d.ts.map +1 -1
- package/types/components/Select/Select.context.d.ts +4 -0
- package/types/components/Select/Select.context.d.ts.map +1 -0
- package/types/components/Select/Select.d.ts +1 -2
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/engines/common.d.ts +1 -3
- package/types/engines/common.d.ts.map +1 -1
- package/types/engines/utils.d.ts +4 -0
- package/types/engines/utils.d.ts.map +1 -0
- package/cjs/components/Slider/components/Double/Double.css +0 -91
- package/es/components/Slider/components/Double/Double.css +0 -91
- /package/cjs/components/Breadcrumbs/utils/{index.css → getShortItems.css} +0 -0
- /package/es/components/Breadcrumbs/utils/{index.css → getShortItems.css} +0 -0
@@ -6,7 +6,7 @@ import React, { useEffect, useRef, useContext } from 'react';
|
|
6
6
|
import { classes } from '../../Dropdown.tokens';
|
7
7
|
import { cx } from '../../../../utils';
|
8
8
|
import { IconDisclosureRight } from '../../../_Icon';
|
9
|
-
import { Context } from '../../Dropdown';
|
9
|
+
import { Context } from '../../Dropdown.context';
|
10
10
|
import { getItemId } from '../../utils';
|
11
11
|
import { Wrapper, DisclosureIconWrapper, Divider, CellWrapper, StyledCell, RenderItemWrapper } from './DropdownItem.styles';
|
12
12
|
export var DropdownItem = function DropdownItem(_ref) {
|
@@ -1,4 +1,3 @@
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
1
|
var _excluded = ["target", "children", "isOpen", "opened", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle", "closeOnOverlayClick"];
|
3
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
@@ -6,6 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
6
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
7
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
8
7
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
9
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
10
10
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
11
11
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
@@ -14,7 +14,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
14
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
15
15
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
16
16
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
17
|
-
import React, { useRef, useCallback, useEffect, useState, forwardRef } from 'react';
|
17
|
+
import React, { useRef, useCallback, useEffect, useState, forwardRef, isValidElement } from 'react';
|
18
18
|
import { usePopper } from 'react-popper';
|
19
19
|
import { useForkRef } from '@salutejs/plasma-core';
|
20
20
|
import { useFocusTrap } from '../../hooks';
|
@@ -74,6 +74,7 @@ export var popoverRoot = function popoverRoot(Root) {
|
|
74
74
|
var _useState3 = useState(false),
|
75
75
|
_useState4 = _slicedToArray(_useState3, 2),
|
76
76
|
forceRender = _useState4[1];
|
77
|
+
var portalContainer = _typeof(target) === 'object' && target !== null && 'current' in target && target.current || undefined;
|
77
78
|
var isAutoArray = Array.isArray(placement);
|
78
79
|
var isAuto = isAutoArray || placement.startsWith('auto');
|
79
80
|
var initialStyles = {
|
@@ -173,7 +174,7 @@ export var popoverRoot = function popoverRoot(Root) {
|
|
173
174
|
if (typeof frame !== 'string' && frame && frame.current) {
|
174
175
|
portal = frame.current;
|
175
176
|
}
|
176
|
-
if (!usePortal) {
|
177
|
+
if (!usePortal && /*#__PURE__*/isValidElement(target)) {
|
177
178
|
portal = rootRef.current;
|
178
179
|
}
|
179
180
|
if (!portal) {
|
@@ -207,8 +208,11 @@ export var popoverRoot = function popoverRoot(Root) {
|
|
207
208
|
*/
|
208
209
|
Promise.resolve().then(forceUpdate);
|
209
210
|
}, [innerIsOpen, children, forceUpdate]);
|
210
|
-
return /*#__PURE__*/React.createElement(
|
211
|
-
|
211
|
+
return /*#__PURE__*/React.createElement(Portal, {
|
212
|
+
container: portalContainer,
|
213
|
+
disabled: /*#__PURE__*/isValidElement(target)
|
214
|
+
}, /*#__PURE__*/React.createElement(StyledWrapper, {
|
215
|
+
className: cx(classes.wrapper, ! /*#__PURE__*/isValidElement(target) && classes.targetAsRef),
|
212
216
|
onMouseEnter: onMouseEnter,
|
213
217
|
onMouseLeave: onMouseLeave
|
214
218
|
}, /*#__PURE__*/React.createElement(StyledRoot, {
|
@@ -217,7 +221,7 @@ export var popoverRoot = function popoverRoot(Root) {
|
|
217
221
|
onFocus: onFocus,
|
218
222
|
onBlur: onBlur,
|
219
223
|
className: cx(className, classes.target)
|
220
|
-
}, target), children && portalRef.current && /*#__PURE__*/React.createElement(Portal, {
|
224
|
+
}, /*#__PURE__*/isValidElement(target) && target), children && portalRef.current && /*#__PURE__*/React.createElement(Portal, {
|
221
225
|
container: portalRef.current
|
222
226
|
}, /*#__PURE__*/React.createElement(Root, _extends({
|
223
227
|
view: view,
|
@@ -233,7 +237,7 @@ export var popoverRoot = function popoverRoot(Root) {
|
|
233
237
|
className: classes.arrow,
|
234
238
|
ref: setArrowElement,
|
235
239
|
style: styles.arrow
|
236
|
-
}, attributes.arrow)), children))));
|
240
|
+
}, attributes.arrow)), children)))));
|
237
241
|
});
|
238
242
|
};
|
239
243
|
export var popoverConfig = {
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import styled from 'styled-components';
|
2
2
|
import { DEFAULT_Z_INDEX } from '../Popup/utils';
|
3
3
|
import { classes, tokens } from './Popover.tokens';
|
4
|
-
export var StyledWrapper = /*#__PURE__*/styled.div.withConfig({
|
5
|
-
componentId: "plasma-new-hope__sc-tnpyex-0"
|
6
|
-
})(["display:inline-block;"]);
|
7
4
|
export var StyledRoot = /*#__PURE__*/styled.div.withConfig({
|
8
|
-
componentId: "plasma-new-hope__sc-tnpyex-
|
5
|
+
componentId: "plasma-new-hope__sc-tnpyex-0"
|
9
6
|
})(["display:inline-flex;box-sizing:border-box;position:relative;"]);
|
7
|
+
export var StyledWrapper = /*#__PURE__*/styled.div.withConfig({
|
8
|
+
componentId: "plasma-new-hope__sc-tnpyex-1"
|
9
|
+
})(["display:inline-block;&.", "{position:absolute;top:0;left:0;width:100%;height:100%;", "{width:100%;height:100%;display:block;}}"], classes.targetAsRef, StyledRoot);
|
10
10
|
export var StyledArrow = /*#__PURE__*/styled.div.withConfig({
|
11
11
|
componentId: "plasma-new-hope__sc-tnpyex-2"
|
12
12
|
})(["width:var(", ");height:var(", ");&::before{position:absolute;width:var(", ");height:var(", ");mask-image:var(", ");background:var(", ");content:'';transform:rotate(0deg);}"], /*#__PURE__*/String(tokens.arrowMaskWidth), /*#__PURE__*/String(tokens.arrowMaskHeight), /*#__PURE__*/String(tokens.arrowMaskWidth), /*#__PURE__*/String(tokens.arrowMaskHeight), /*#__PURE__*/String(tokens.arrowMaskImage), /*#__PURE__*/String(tokens.arrowBackground));
|
@@ -4,51 +4,136 @@ title: Popover
|
|
4
4
|
---
|
5
5
|
|
6
6
|
import { PropsTable, Description } from '@site/src/components';
|
7
|
+
import Tabs from '@theme/Tabs';
|
8
|
+
import TabItem from '@theme/TabItem';
|
7
9
|
|
8
10
|
# Popover
|
9
11
|
<Description name="Popover" />
|
10
12
|
<PropsTable name="Popover" />
|
11
13
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
14
|
+
:::info
|
15
|
+
`target` может быть как ReactNode, так и RefObject:
|
16
|
+
:::
|
17
|
+
|
18
|
+
<Tabs>
|
19
|
+
<TabItem value="reactNode" label="React Node" default>
|
20
|
+
```tsx live
|
21
|
+
import React from 'react';
|
22
|
+
import styled from "styled-components";
|
23
|
+
import { surfaceSolidTertiary } from "@salutejs/{{ vertical }}/tokens";
|
24
|
+
import { Popover, Button } from '@salutejs/{{ package }}';
|
25
|
+
|
26
|
+
export function App() {
|
27
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
28
|
+
|
29
|
+
const StyledContent = styled.div`
|
30
|
+
background: ${surfaceSolidTertiary};
|
31
|
+
padding: 1rem;
|
32
|
+
|
33
|
+
display: flex;
|
34
|
+
flex-direction: column;
|
35
|
+
align-items: center;
|
36
|
+
`;
|
37
|
+
|
38
|
+
return (
|
39
|
+
<section style=\{{width: '20rem', height: '15rem'}}>
|
40
|
+
<Popover
|
41
|
+
opened={isOpen}
|
42
|
+
onToggle={(is) => setIsOpen(is)}
|
43
|
+
role="presentation"
|
44
|
+
id="popover"
|
45
|
+
target={<Button>Target</Button>}
|
46
|
+
offset={[0, 6]}
|
47
|
+
placement='bottom'
|
48
|
+
trigger='click'
|
49
|
+
hasArrow
|
50
|
+
closeOnOverlayClick
|
51
|
+
closeOnEsc
|
52
|
+
isFocusTrapped
|
53
|
+
>
|
54
|
+
<StyledContent>
|
55
|
+
<>Content</>
|
56
|
+
<Button onClick={() => setIsOpen(false)}>close</Button>
|
57
|
+
</StyledContent>
|
58
|
+
</Popover>
|
59
|
+
</section>
|
60
|
+
);
|
61
|
+
}
|
62
|
+
```
|
63
|
+
</TabItem>
|
64
|
+
<TabItem value="refObject" label="RefObject">
|
65
|
+
```tsx live
|
66
|
+
import React, { useRef, useState } from 'react';
|
67
|
+
import styled from "styled-components";
|
68
|
+
import { surfaceSolidTertiary } from "@salutejs/{{ vertical }}/tokens";
|
69
|
+
import { Popover, Button } from '@salutejs/{{ package }}';
|
70
|
+
|
71
|
+
export function App() {
|
72
|
+
const [isOpen, setIsOpen] = useState(false);
|
73
|
+
|
74
|
+
const targetRef = useRef<HTMLButtonElement | null>(null);
|
75
|
+
const targetRef2 = useRef<HTMLButtonElement | null>(null);
|
76
|
+
const targetRef3 = useRef<HTMLButtonElement | null>(null);
|
77
|
+
|
78
|
+
const refs = [targetRef, targetRef2, targetRef3];
|
79
|
+
|
80
|
+
const [currRefIndex, setCurrentRefIndex] = useState(0);
|
81
|
+
const [currentRef, setCurrentRef] = useState(targetRef);
|
82
|
+
|
83
|
+
const changeRef = () => {
|
84
|
+
let ind = currRefIndex + 1;
|
85
|
+
|
86
|
+
if (ind > refs.length - 1) {
|
87
|
+
setCurrentRefIndex(0);
|
88
|
+
ind = 0;
|
89
|
+
}
|
90
|
+
|
91
|
+
setCurrentRefIndex(ind);
|
92
|
+
setCurrentRef(refs[ind]);
|
93
|
+
};
|
94
|
+
|
95
|
+
const StyledContent = styled.div`
|
96
|
+
background: ${surfaceSolidTertiary};
|
97
|
+
padding: 1rem;
|
98
|
+
|
99
|
+
display: flex;
|
100
|
+
flex-direction: column;
|
101
|
+
align-items: center;
|
102
|
+
`;
|
103
|
+
|
104
|
+
return (
|
105
|
+
<>
|
106
|
+
<Button ref={targetRef}>Target 0</Button>
|
107
|
+
<Button style=\{{ margin: '0 5rem' }} onClick={changeRef}>
|
108
|
+
Change targetAsRef to Target {currRefIndex + 1 > refs.length - 1 ? 0 : currRefIndex + 1}
|
109
|
+
</Button>
|
110
|
+
<Button ref={targetRef2}>Target 1</Button>
|
111
|
+
<Popover
|
112
|
+
opened={isOpen}
|
113
|
+
onToggle={(is) => setIsOpen(is)}
|
114
|
+
role="presentation"
|
115
|
+
id="popover"
|
116
|
+
target={currentRef}
|
117
|
+
offset={[0, 6]}
|
118
|
+
placement='bottom'
|
119
|
+
trigger='click'
|
120
|
+
hasArrow
|
121
|
+
closeOnOverlayClick
|
122
|
+
closeOnEsc
|
123
|
+
isFocusTrapped
|
124
|
+
>
|
125
|
+
<StyledContent>
|
126
|
+
<>Content</>
|
127
|
+
<Button onClick={() => setIsOpen(false)}>Close</Button>
|
128
|
+
</StyledContent>
|
129
|
+
</Popover>
|
130
|
+
|
131
|
+
<div style=\{{ padding: '5rem' }}>Current Target: {currRefIndex}</div>
|
132
|
+
<Button ref={targetRef3}>Target 2</Button>
|
133
|
+
</>
|
134
|
+
);
|
135
|
+
}
|
136
|
+
```
|
137
|
+
</TabItem>
|
138
|
+
</Tabs>
|
139
|
+
|
@@ -2,7 +2,8 @@ export var classes = {
|
|
2
2
|
wrapper: 'popover-wrapper',
|
3
3
|
root: 'popover-root',
|
4
4
|
target: 'popover-target',
|
5
|
-
arrow: 'popover-arrow'
|
5
|
+
arrow: 'popover-arrow',
|
6
|
+
targetAsRef: 'popover-target-as-ref'
|
6
7
|
};
|
7
8
|
export var tokens = {
|
8
9
|
arrowMaskWidth: '--plasma-popover-arrow-mask-width',
|
@@ -14,5 +14,5 @@ export var Portal = function Portal(_ref) {
|
|
14
14
|
return null;
|
15
15
|
}
|
16
16
|
var portalContainer = typeof container === 'function' ? container() : container;
|
17
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, disabled && children, !disabled && /*#__PURE__*/ReactDOM.createPortal(children, portalContainer));
|
17
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, (disabled || !portalContainer) && children, !disabled && portalContainer && /*#__PURE__*/ReactDOM.createPortal(children, portalContainer));
|
18
18
|
};
|
@@ -9,7 +9,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
9
9
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
12
|
-
import React, { forwardRef, useState, useReducer, useMemo,
|
12
|
+
import React, { forwardRef, useState, useReducer, useMemo, useLayoutEffect, useRef } from 'react';
|
13
13
|
import { safeUseId } from '@salutejs/plasma-core';
|
14
14
|
import { isEmpty } from '../../utils';
|
15
15
|
import { useOutsideClick } from '../../hooks';
|
@@ -21,7 +21,7 @@ import { usePathMaps } from './hooks/usePathMaps';
|
|
21
21
|
import { Ul, base } from './Select.styles';
|
22
22
|
import { FloatingPopover } from './FloatingPopover';
|
23
23
|
import { SelectNative } from './ui/SelectNative/SelectNative';
|
24
|
-
|
24
|
+
import { Context } from './Select.context';
|
25
25
|
|
26
26
|
/**
|
27
27
|
* Выпадающий список. Поддерживает выбор одного или нескольких значений.
|
@@ -3,7 +3,7 @@ import { safeUseId } from '@salutejs/plasma-core';
|
|
3
3
|
import { isEmpty } from '../../../../utils';
|
4
4
|
import { Ul } from '../../Select.styles';
|
5
5
|
import { FloatingPopover } from '../../FloatingPopover';
|
6
|
-
import { Item } from './ui';
|
6
|
+
import { Item } from './ui/Item/Item';
|
7
7
|
export var Inner = function Inner(_ref) {
|
8
8
|
var item = _ref.item,
|
9
9
|
currentLevel = _ref.currentLevel,
|
@@ -8,7 +8,7 @@ import { sizeToIconSize, getItemId } from '../../../../utils';
|
|
8
8
|
import { classes } from '../../../../Select.tokens';
|
9
9
|
import { cx, isEmpty } from '../../../../../../utils';
|
10
10
|
import { IconDisclosureRightCentered, IconDone } from '../../../../../_Icon';
|
11
|
-
import { Context } from '../../../../Select';
|
11
|
+
import { Context } from '../../../../Select.context';
|
12
12
|
import { useDidMountEffect } from '../../../../../../hooks';
|
13
13
|
import { StyledWrapper, StyledCell, StyledCheckbox, StyledIndicator, DisclosureIconWrapper, IconWrapper, StyledText, Wrapper, StyledCheckboxWrapper } from './Item.styles';
|
14
14
|
export var Item = function Item(_ref) {
|
package/styled-components/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js
CHANGED
@@ -6,7 +6,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
6
6
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
7
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
8
8
|
import React, { useState, useCallback } from 'react';
|
9
|
-
import { DoubleSlider } from '../
|
9
|
+
import { DoubleSlider } from '../Double/Double';
|
10
10
|
export var DoubleUncontrolled = function DoubleUncontrolled(props) {
|
11
11
|
var defaultValue = props.defaultValue,
|
12
12
|
min = props.min,
|
@@ -302,7 +302,6 @@ export var textAreaRoot = function textAreaRoot(Root) {
|
|
302
302
|
applyCustomWidth: applyCustomWidth,
|
303
303
|
ref: mergeRefs(outerRef, innerRef),
|
304
304
|
disabled: disabled,
|
305
|
-
required: required,
|
306
305
|
height: applyAutoResize ? minAuto : height,
|
307
306
|
width: width,
|
308
307
|
placeholder: placeholderLabel,
|
@@ -389,7 +389,6 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
389
389
|
ref: inputForkRef,
|
390
390
|
id: innerId,
|
391
391
|
value: outerValue,
|
392
|
-
required: required,
|
393
392
|
"aria-labelledby": labelId,
|
394
393
|
"aria-describedby": helperTextId,
|
395
394
|
placeholder: innerPlaceholderValue,
|
@@ -5,48 +5,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
7
7
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
9
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
10
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
11
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
12
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
13
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
14
8
|
import React from 'react';
|
15
9
|
import { _component } from './styled-components';
|
16
|
-
//
|
17
|
-
// Тип HTMLAttributesOmitOnChange требуется чтобы использовать компонент с кастомным пропсом onChange
|
18
|
-
//
|
19
|
-
|
20
|
-
export var getStaticVariants = function getStaticVariants(config) {
|
21
|
-
if (!config.variations) {
|
22
|
-
return [];
|
23
|
-
}
|
24
|
-
var res = [];
|
25
|
-
var variations = config.variations;
|
26
|
-
|
27
|
-
// eslint-disable-next-line guard-for-in
|
28
|
-
for (var key in variations) {
|
29
|
-
var css = variations[key].css;
|
30
|
-
css && res.push(css);
|
31
|
-
}
|
32
|
-
return res;
|
33
|
-
};
|
34
|
-
export var getDynamicVariants = function getDynamicVariants(config) {
|
35
|
-
return function (props) {
|
36
|
-
var res = [];
|
37
|
-
|
38
|
-
// eslint-disable-next-line guard-for-in
|
39
|
-
for (var key in config.variations) {
|
40
|
-
if (key in props) {
|
41
|
-
var variant = config.variations[key];
|
42
|
-
var css = variant[props[key]];
|
43
|
-
// no css for { modifier: true }
|
44
|
-
css && Array.isArray(css) ? res.push.apply(res, _toConsumableArray(css)) : res.push(css);
|
45
|
-
}
|
46
|
-
}
|
47
|
-
return res;
|
48
|
-
};
|
49
|
-
};
|
50
10
|
export var mergeConfig = function mergeConfig(baseConfig, userConfig) {
|
51
11
|
var res = _objectSpread(_objectSpread({}, baseConfig), userConfig);
|
52
12
|
if (res.variations) {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
2
2
|
import React, { forwardRef } from 'react';
|
3
3
|
import styled, { css } from 'styled-components';
|
4
|
-
import { getStaticVariants, getDynamicVariants } from './
|
4
|
+
import { getStaticVariants, getDynamicVariants } from './utils';
|
5
5
|
export { styled, css };
|
6
6
|
var Root = /*#__PURE__*/styled.div.withConfig({
|
7
7
|
componentId: "plasma-new-hope__sc-1xug4g9-0"
|
@@ -0,0 +1,36 @@
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
6
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
7
|
+
export var getStaticVariants = function getStaticVariants(config) {
|
8
|
+
if (!config.variations) {
|
9
|
+
return [];
|
10
|
+
}
|
11
|
+
var res = [];
|
12
|
+
var variations = config.variations;
|
13
|
+
|
14
|
+
// eslint-disable-next-line guard-for-in
|
15
|
+
for (var key in variations) {
|
16
|
+
var css = variations[key].css;
|
17
|
+
css && res.push(css);
|
18
|
+
}
|
19
|
+
return res;
|
20
|
+
};
|
21
|
+
export var getDynamicVariants = function getDynamicVariants(config) {
|
22
|
+
return function (props) {
|
23
|
+
var res = [];
|
24
|
+
|
25
|
+
// eslint-disable-next-line guard-for-in
|
26
|
+
for (var key in config.variations) {
|
27
|
+
if (key in props) {
|
28
|
+
var variant = config.variations[key];
|
29
|
+
var css = variant[props[key]];
|
30
|
+
// no css for { modifier: true }
|
31
|
+
css && Array.isArray(css) ? res.push.apply(res, _toConsumableArray(css)) : res.push(css);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
return res;
|
35
|
+
};
|
36
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAO5D,eAAO,MAAM,eAAe,SAAU,UAAU,cAAc,EAAE,gBAAgB,CAAC;;;;;;wCAe5E,CAAC;AAEN,eAAO,MAAM,iBAAiB;;;mBAjBQ,UAAU,cAAc,EAAE,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;CAkChF,CAAC"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { ReactNode } from 'react';
|
3
|
+
import { BreadcrumbsItem } from '../Breadcrumbs.types';
|
4
|
+
export declare const shortItems: (items: ReactNode[], renderSeparator: ReactNode, showItems?: number | undefined) => React.ReactNode[];
|
5
|
+
export declare const getRenderItems: (items: BreadcrumbsItem[], renderSeparator: ReactNode, showItems?: number | undefined) => React.ReactNode[];
|
6
|
+
//# sourceMappingURL=getShortItems.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getShortItems.d.ts","sourceRoot":"","sources":["../../../../src/components/Breadcrumbs/utils/getShortItems.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,eAAO,MAAM,UAAU,UAAW,SAAS,EAAE,mBAAmB,SAAS,sDAYxE,CAAC;AAEF,eAAO,MAAM,cAAc,UAAW,eAAe,EAAE,mBAAmB,SAAS,sDA0BlF,CAAC"}
|
@@ -1,7 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import { BreadcrumbsItem } from '../Breadcrumbs.types';
|
3
|
-
export declare const shortItems: (items: ReactNode[], renderSeparator: ReactNode, showItems?: number | undefined) => React.ReactNode[];
|
1
|
+
import { ReactNode } from 'react';
|
4
2
|
export declare const convertIconSize: (size?: string | undefined) => "s" | "xs";
|
5
|
-
export declare const
|
6
|
-
export declare const addSeparator: (items: ReactNode[], renderSeparator: ReactNode) => React.ReactNode[];
|
3
|
+
export declare const addSeparator: (items: ReactNode[], renderSeparator: ReactNode) => ReactNode[];
|
7
4
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Breadcrumbs/utils/index.
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Breadcrumbs/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,eAAO,MAAM,eAAe,2CAQ3B,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,SAAS,EAAE,mBAAmB,SAAS,gBAE1E,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { DateItem, DisabledDay, EventDay } from '../Calendar.types';
|
2
|
-
import
|
2
|
+
import { CalendarStateType } from '../store/types';
|
3
3
|
declare type GetDatesWithModificationsArgs = {
|
4
4
|
dates: DateItem[];
|
5
5
|
type: CalendarStateType;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getDateWithModification.d.ts","sourceRoot":"","sources":["../../../../src/components/Calendar/utils/getDateWithModification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAc,WAAW,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACrF,OAAO,
|
1
|
+
{"version":3,"file":"getDateWithModification.d.ts","sourceRoot":"","sources":["../../../../src/components/Calendar/utils/getDateWithModification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAc,WAAW,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAiB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIlE,aAAK,6BAA6B,GAAG;IACjC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,GAAG,CAAC,EAAE,IAAI,CAAC;CACd,CAAC;AAuJF;;GAEG;AACH,eAAO,MAAM,yBAAyB,0EAQnC,6BAA6B,eA6C/B,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Combobox.context.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.context.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,eAAO,MAAM,OAAO,sCAAgD,CAAC"}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { RootProps } from '../../../engines';
|
3
|
-
import type {
|
4
|
-
export declare const Context: React.Context<ItemContext>;
|
3
|
+
import type { ComboboxProps } from './Combobox.types';
|
5
4
|
/**
|
6
5
|
* Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.
|
7
6
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAIlG,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAqB7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAOtD;;GAEG;AAEH,eAAO,MAAM,YAAY,SAAU,UAAU,gBAAgB,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC,+IAsdtF,CAAC;AAEP,eAAO,MAAM,cAAc;;;mBAxdQ,UAAU,gBAAgB,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;CA6e3F,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Dropdown.context.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.context.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,eAAO,MAAM,OAAO,sCAAgD,CAAC"}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { RootProps } from '../../engines';
|
3
|
-
import type { DropdownProps
|
4
|
-
export declare const Context: React.Context<ItemContext>;
|
3
|
+
import type { DropdownProps } from './Dropdown.types';
|
5
4
|
/**
|
6
5
|
* Выпадающий список.
|
7
6
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAG9D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAW1C,OAAO,KAAK,EAAE,aAAa,EAA0B,MAAM,kBAAkB,CAAC;AAO9E;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,UAAU,cAAc,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;+EAmKrF,CAAC;AAEN,eAAO,MAAM,cAAc;;;mBArKQ,UAAU,cAAc,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsLzF,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+E,MAAM,OAAO,CAAC;AAKpG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAMrD,OAAO,KAAK,EAAoB,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAItE,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,WAAW,SAAU,UAAU,cAAc,EAAE,YAAY,CAAC,+JAoQpE,CAAC;AAEN,eAAO,MAAM,aAAa;;;mBAtQQ,UAAU,cAAc,EAAE,YAAY,CAAC;;;;;;;;;;CAmRxE,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { PopoverProps } from './Popover.types';
|
3
|
-
export declare const StyledWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
4
3
|
export declare const StyledRoot: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
4
|
+
export declare const StyledWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
5
5
|
export declare const StyledArrow: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
6
6
|
export declare const StyledPopover: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Pick<PopoverProps, "zIndex">>;
|
7
7
|
//# sourceMappingURL=Popover.styles.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popover.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.styles.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,eAAO,MAAM,
|
1
|
+
{"version":3,"file":"Popover.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.styles.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,eAAO,MAAM,UAAU,qKAItB,CAAC;AAEF,eAAO,MAAM,aAAa,qKAgBzB,CAAC;AAEF,eAAO,MAAM,WAAW,qKAcvB,CAAC;AAEF,eAAO,MAAM,aAAa,2KAuIzB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popover.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO
|
1
|
+
{"version":3,"file":"Popover.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;CAMnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;CAOlB,CAAC"}
|