@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
@@ -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
|
+
|
@@ -8,7 +8,8 @@ var classes = exports.classes = {
|
|
8
8
|
wrapper: 'popover-wrapper',
|
9
9
|
root: 'popover-root',
|
10
10
|
target: 'popover-target',
|
11
|
-
arrow: 'popover-arrow'
|
11
|
+
arrow: 'popover-arrow',
|
12
|
+
targetAsRef: 'popover-target-as-ref'
|
12
13
|
};
|
13
14
|
var tokens = exports.tokens = {
|
14
15
|
arrowMaskWidth: '--plasma-popover-arrow-mask-width',
|
@@ -21,5 +21,5 @@ var Portal = exports.Portal = function Portal(_ref) {
|
|
21
21
|
return null;
|
22
22
|
}
|
23
23
|
var portalContainer = typeof container === 'function' ? container() : container;
|
24
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, disabled && children, !disabled && /*#__PURE__*/_reactDom["default"].createPortal(children, portalContainer));
|
24
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (disabled || !portalContainer) && children, !disabled && portalContainer && /*#__PURE__*/_reactDom["default"].createPortal(children, portalContainer));
|
25
25
|
};
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.selectRoot = exports.selectConfig =
|
6
|
+
exports.selectRoot = exports.selectConfig = void 0;
|
7
7
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
8
8
|
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
9
9
|
var _utils = /*#__PURE__*/require("../../utils");
|
@@ -16,6 +16,7 @@ var _usePathMaps3 = /*#__PURE__*/require("./hooks/usePathMaps");
|
|
16
16
|
var _Select = /*#__PURE__*/require("./Select.styles");
|
17
17
|
var _FloatingPopover = /*#__PURE__*/require("./FloatingPopover");
|
18
18
|
var _SelectNative = /*#__PURE__*/require("./ui/SelectNative/SelectNative");
|
19
|
+
var _Select2 = /*#__PURE__*/require("./Select.context");
|
19
20
|
var _excluded = ["value", "onChange", "target", "items", "placement", "label", "labelPlacement", "placeholder", "helperText", "disabled", "view", "size", "listOverflow", "listHeight", "listWidth", "contentLeft", "onScrollBottom", "chipView", "variant", "portal", "renderValue", "renderItem", "status", "onItemSelect", "separator", "closeAfterSelect", "isTargetAmount", "beforeList", "afterList", "zIndex", "name", "defaultValue"];
|
20
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
21
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
@@ -29,8 +30,6 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
29
30
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
30
31
|
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; }
|
31
32
|
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; }
|
32
|
-
var Context = exports.Context = /*#__PURE__*/(0, _react.createContext)({});
|
33
|
-
|
34
33
|
/**
|
35
34
|
* Выпадающий список. Поддерживает выбор одного или нескольких значений.
|
36
35
|
*/
|
@@ -309,7 +308,7 @@ var selectRoot = exports.selectRoot = function selectRoot(Root) {
|
|
309
308
|
onChange: onChange,
|
310
309
|
onSetValue: setInternalValue,
|
311
310
|
ref: ref
|
312
|
-
}), /*#__PURE__*/_react["default"].createElement(Context.Provider, {
|
311
|
+
}), /*#__PURE__*/_react["default"].createElement(_Select2.Context.Provider, {
|
313
312
|
value: {
|
314
313
|
focusedPath: focusedPath,
|
315
314
|
checked: checked,
|
@@ -9,7 +9,7 @@ var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
|
9
9
|
var _utils = /*#__PURE__*/require("../../../../utils");
|
10
10
|
var _Select = /*#__PURE__*/require("../../Select.styles");
|
11
11
|
var _FloatingPopover = /*#__PURE__*/require("../../FloatingPopover");
|
12
|
-
var
|
12
|
+
var _Item = /*#__PURE__*/require("./ui/Item/Item");
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
14
14
|
var Inner = exports.Inner = function Inner(_ref) {
|
15
15
|
var item = _ref.item,
|
@@ -43,7 +43,7 @@ var Inner = exports.Inner = function Inner(_ref) {
|
|
43
43
|
opened: isCurrentListOpen,
|
44
44
|
onToggle: handleToggle,
|
45
45
|
offset: 2,
|
46
|
-
target: /*#__PURE__*/_react["default"].createElement(
|
46
|
+
target: /*#__PURE__*/_react["default"].createElement(_Item.Item, {
|
47
47
|
item: item,
|
48
48
|
path: path,
|
49
49
|
currentLevel: currentLevel,
|
@@ -70,7 +70,7 @@ var Inner = exports.Inner = function Inner(_ref) {
|
|
70
70
|
});
|
71
71
|
})));
|
72
72
|
}
|
73
|
-
return /*#__PURE__*/_react["default"].createElement(
|
73
|
+
return /*#__PURE__*/_react["default"].createElement(_Item.Item, {
|
74
74
|
item: item,
|
75
75
|
path: path,
|
76
76
|
index: index,
|
@@ -10,7 +10,7 @@ var _utils = /*#__PURE__*/require("../../../../utils");
|
|
10
10
|
var _Select = /*#__PURE__*/require("../../../../Select.tokens");
|
11
11
|
var _utils2 = /*#__PURE__*/require("../../../../../../utils");
|
12
12
|
var _Icon = /*#__PURE__*/require("../../../../../_Icon");
|
13
|
-
var _Select2 = /*#__PURE__*/require("../../../../Select");
|
13
|
+
var _Select2 = /*#__PURE__*/require("../../../../Select.context");
|
14
14
|
var _hooks = /*#__PURE__*/require("../../../../../../hooks");
|
15
15
|
var _Item = /*#__PURE__*/require("./Item.styles");
|
16
16
|
var _StyledIndicator;
|
package/styled-components/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js
CHANGED
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.DoubleUncontrolled = void 0;
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
|
-
var
|
9
|
+
var _Double = /*#__PURE__*/require("../Double/Double");
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
11
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
12
12
|
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); }
|
@@ -90,10 +90,10 @@ var DoubleUncontrolled = exports.DoubleUncontrolled = function DoubleUncontrolle
|
|
90
90
|
setSliderValue(sortValue);
|
91
91
|
}
|
92
92
|
}, [name, value, onChange, sortValues]);
|
93
|
-
return value ? /*#__PURE__*/_react["default"].createElement(
|
93
|
+
return value ? /*#__PURE__*/_react["default"].createElement(_Double.DoubleSlider, _extends({}, props, {
|
94
94
|
value: value,
|
95
95
|
onChange: onChange
|
96
|
-
})) : /*#__PURE__*/_react["default"].createElement(
|
96
|
+
})) : /*#__PURE__*/_react["default"].createElement(_Double.DoubleSlider, _extends({
|
97
97
|
value: sliderValue,
|
98
98
|
onKeyDownTextField: onKeyDownTextField,
|
99
99
|
onBlurTextField: onBlurTextField,
|
@@ -310,7 +310,6 @@ var textAreaRoot = exports.textAreaRoot = function textAreaRoot(Root) {
|
|
310
310
|
applyCustomWidth: applyCustomWidth,
|
311
311
|
ref: (0, _utils.mergeRefs)(outerRef, innerRef),
|
312
312
|
disabled: disabled,
|
313
|
-
required: required,
|
314
313
|
height: applyAutoResize ? minAuto : height,
|
315
314
|
width: width,
|
316
315
|
placeholder: placeholderLabel,
|
@@ -398,7 +398,6 @@ var textFieldRoot = exports.textFieldRoot = function textFieldRoot(Root) {
|
|
398
398
|
ref: inputForkRef,
|
399
399
|
id: innerId,
|
400
400
|
value: outerValue,
|
401
|
-
required: required,
|
402
401
|
"aria-labelledby": labelId,
|
403
402
|
"aria-describedby": helperTextId,
|
404
403
|
placeholder: innerPlaceholderValue,
|
@@ -1,60 +1,20 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
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); }
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
5
4
|
value: true
|
6
5
|
});
|
7
6
|
exports.component = component;
|
8
|
-
exports.mergeConfig =
|
7
|
+
exports.mergeConfig = void 0;
|
9
8
|
var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
|
10
9
|
var _styledComponents = /*#__PURE__*/require("./styled-components");
|
11
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
11
|
+
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); }
|
12
12
|
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); }
|
13
13
|
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; }
|
14
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
15
15
|
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; }
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
17
17
|
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); }
|
18
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
19
|
-
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."); }
|
20
|
-
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); }
|
21
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
22
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
23
|
-
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; }
|
24
|
-
//
|
25
|
-
// Тип HTMLAttributesOmitOnChange требуется чтобы использовать компонент с кастомным пропсом onChange
|
26
|
-
//
|
27
|
-
|
28
|
-
var getStaticVariants = exports.getStaticVariants = function getStaticVariants(config) {
|
29
|
-
if (!config.variations) {
|
30
|
-
return [];
|
31
|
-
}
|
32
|
-
var res = [];
|
33
|
-
var variations = config.variations;
|
34
|
-
|
35
|
-
// eslint-disable-next-line guard-for-in
|
36
|
-
for (var key in variations) {
|
37
|
-
var css = variations[key].css;
|
38
|
-
css && res.push(css);
|
39
|
-
}
|
40
|
-
return res;
|
41
|
-
};
|
42
|
-
var getDynamicVariants = exports.getDynamicVariants = function getDynamicVariants(config) {
|
43
|
-
return function (props) {
|
44
|
-
var res = [];
|
45
|
-
|
46
|
-
// eslint-disable-next-line guard-for-in
|
47
|
-
for (var key in config.variations) {
|
48
|
-
if (key in props) {
|
49
|
-
var variant = config.variations[key];
|
50
|
-
var css = variant[props[key]];
|
51
|
-
// no css for { modifier: true }
|
52
|
-
css && Array.isArray(css) ? res.push.apply(res, _toConsumableArray(css)) : res.push(css);
|
53
|
-
}
|
54
|
-
}
|
55
|
-
return res;
|
56
|
-
};
|
57
|
-
};
|
58
18
|
var mergeConfig = exports.mergeConfig = function mergeConfig(baseConfig, userConfig) {
|
59
19
|
var res = _objectSpread(_objectSpread({}, baseConfig), userConfig);
|
60
20
|
if (res.variations) {
|
@@ -19,7 +19,7 @@ Object.defineProperty(exports, "styled", {
|
|
19
19
|
});
|
20
20
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
21
21
|
var _styledComponents = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("styled-components"));
|
22
|
-
var
|
22
|
+
var _utils = /*#__PURE__*/require("./utils");
|
23
23
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
24
24
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
25
25
|
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); }
|
@@ -40,8 +40,8 @@ var Root = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
40
40
|
var _component = exports._component = function _component(componentConfig) {
|
41
41
|
var tag = componentConfig.tag,
|
42
42
|
base = componentConfig.base;
|
43
|
-
var staticVariants = (0,
|
44
|
-
var dynamicVariants = (0,
|
43
|
+
var staticVariants = (0, _utils.getStaticVariants)(componentConfig);
|
44
|
+
var dynamicVariants = (0, _utils.getDynamicVariants)(componentConfig);
|
45
45
|
return /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
46
46
|
return /*#__PURE__*/_react["default"].createElement(Root, _extends({
|
47
47
|
as: tag,
|
@@ -0,0 +1,42 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.getStaticVariants = exports.getDynamicVariants = void 0;
|
7
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
8
|
+
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."); }
|
9
|
+
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); }
|
10
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
11
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
12
|
+
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; }
|
13
|
+
var getStaticVariants = exports.getStaticVariants = function getStaticVariants(config) {
|
14
|
+
if (!config.variations) {
|
15
|
+
return [];
|
16
|
+
}
|
17
|
+
var res = [];
|
18
|
+
var variations = config.variations;
|
19
|
+
|
20
|
+
// eslint-disable-next-line guard-for-in
|
21
|
+
for (var key in variations) {
|
22
|
+
var css = variations[key].css;
|
23
|
+
css && res.push(css);
|
24
|
+
}
|
25
|
+
return res;
|
26
|
+
};
|
27
|
+
var getDynamicVariants = exports.getDynamicVariants = function getDynamicVariants(config) {
|
28
|
+
return function (props) {
|
29
|
+
var res = [];
|
30
|
+
|
31
|
+
// eslint-disable-next-line guard-for-in
|
32
|
+
for (var key in config.variations) {
|
33
|
+
if (key in props) {
|
34
|
+
var variant = config.variations[key];
|
35
|
+
var css = variant[props[key]];
|
36
|
+
// no css for { modifier: true }
|
37
|
+
css && Array.isArray(css) ? res.push.apply(res, _toConsumableArray(css)) : res.push(css);
|
38
|
+
}
|
39
|
+
}
|
40
|
+
return res;
|
41
|
+
};
|
42
|
+
};
|
@@ -3,7 +3,8 @@ import { cx } from '../../utils';
|
|
3
3
|
import { base as sizeCSS } from './variations/_size/base';
|
4
4
|
import { base as viewCSS } from './variations/_view/base';
|
5
5
|
import { base, Separator } from './Breadcrumbs.styles';
|
6
|
-
import { addSeparator, convertIconSize
|
6
|
+
import { addSeparator, convertIconSize } from './utils';
|
7
|
+
import { getRenderItems } from './utils/getShortItems';
|
7
8
|
export var breadcrumbsRoot = function breadcrumbsRoot(Root) {
|
8
9
|
return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
|
9
10
|
var view = _ref.view,
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { BreadcrumbShorter } from '../ui/BreadcrumbShorter/BreadcrumbShorter';
|
3
|
+
import { StyledLink } from '../Breadcrumbs.styles';
|
4
|
+
export var shortItems = function shortItems(items, renderSeparator, showItems) {
|
5
|
+
if (!showItems || showItems < 2 || items.length <= showItems) {
|
6
|
+
return items;
|
7
|
+
}
|
8
|
+
var leftSlice = Math.floor(showItems / 2);
|
9
|
+
var rightSlice = items.length - leftSlice - showItems % 2;
|
10
|
+
var renderItems = items.slice(leftSlice, rightSlice);
|
11
|
+
var shorter = /*#__PURE__*/React.createElement(BreadcrumbShorter, {
|
12
|
+
separator: renderSeparator
|
13
|
+
}, renderItems);
|
14
|
+
items.splice(leftSlice, rightSlice - leftSlice, shorter);
|
15
|
+
return items;
|
16
|
+
};
|
17
|
+
export var getRenderItems = function getRenderItems(items, renderSeparator, showItems) {
|
18
|
+
var renderItems = shortItems(items.map(function (item) {
|
19
|
+
if (item.renderItem) {
|
20
|
+
return item.renderItem();
|
21
|
+
}
|
22
|
+
var title = item.title,
|
23
|
+
disabled = item.disabled,
|
24
|
+
href = item.href,
|
25
|
+
onClick = item.onClick;
|
26
|
+
return /*#__PURE__*/React.createElement(StyledLink, {
|
27
|
+
tabIndex: 0,
|
28
|
+
href: href,
|
29
|
+
disabled: disabled,
|
30
|
+
onClick: onClick,
|
31
|
+
isHref: Boolean(href || onClick)
|
32
|
+
}, title);
|
33
|
+
}), renderSeparator, showItems);
|
34
|
+
return renderItems;
|
35
|
+
};
|
@@ -1,19 +1,3 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { BreadcrumbShorter } from '../ui/BreadcrumbShorter/BreadcrumbShorter';
|
3
|
-
import { StyledLink } from '../Breadcrumbs.styles';
|
4
|
-
export var shortItems = function shortItems(items, renderSeparator, showItems) {
|
5
|
-
if (!showItems || showItems < 2 || items.length <= showItems) {
|
6
|
-
return items;
|
7
|
-
}
|
8
|
-
var leftSlice = Math.floor(showItems / 2);
|
9
|
-
var rightSlice = items.length - leftSlice - showItems % 2;
|
10
|
-
var renderItems = items.slice(leftSlice, rightSlice);
|
11
|
-
var shorter = /*#__PURE__*/React.createElement(BreadcrumbShorter, {
|
12
|
-
separator: renderSeparator
|
13
|
-
}, renderItems);
|
14
|
-
items.splice(leftSlice, rightSlice - leftSlice, shorter);
|
15
|
-
return items;
|
16
|
-
};
|
17
1
|
export var convertIconSize = function convertIconSize(size) {
|
18
2
|
switch (size) {
|
19
3
|
case 's':
|
@@ -23,25 +7,6 @@ export var convertIconSize = function convertIconSize(size) {
|
|
23
7
|
return 's';
|
24
8
|
}
|
25
9
|
};
|
26
|
-
export var getRenderItems = function getRenderItems(items, renderSeparator, showItems) {
|
27
|
-
var renderItems = shortItems(items.map(function (item) {
|
28
|
-
if (item.renderItem) {
|
29
|
-
return item.renderItem();
|
30
|
-
}
|
31
|
-
var title = item.title,
|
32
|
-
disabled = item.disabled,
|
33
|
-
href = item.href,
|
34
|
-
onClick = item.onClick;
|
35
|
-
return /*#__PURE__*/React.createElement(StyledLink, {
|
36
|
-
tabIndex: 0,
|
37
|
-
href: href,
|
38
|
-
disabled: disabled,
|
39
|
-
onClick: onClick,
|
40
|
-
isHref: Boolean(href || onClick)
|
41
|
-
}, title);
|
42
|
-
}), renderSeparator, showItems);
|
43
|
-
return renderItems;
|
44
|
-
};
|
45
10
|
export var addSeparator = function addSeparator(items, renderSeparator) {
|
46
11
|
return items.flatMap(function (item, idx) {
|
47
12
|
return idx < items.length - 1 ? [item, renderSeparator] : [item];
|
@@ -13,7 +13,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
14
14
|
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; }
|
15
15
|
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; }
|
16
|
-
import React, { forwardRef, useState, useReducer, useMemo,
|
16
|
+
import React, { forwardRef, useState, useReducer, useMemo, useLayoutEffect, useRef } from 'react';
|
17
17
|
import { safeUseId, useForkRef } from '@salutejs/plasma-core';
|
18
18
|
import { isEmpty } from '../../../utils';
|
19
19
|
import { useOutsideClick } from '../../../hooks';
|
@@ -29,7 +29,7 @@ import { Ul, base, StyledArrow, IconArrowWrapper, StyledEmptyState } from './Com
|
|
29
29
|
import { base as viewCSS } from './variations/_view/base';
|
30
30
|
import { base as sizeCSS } from './variations/_size/base';
|
31
31
|
import { SelectNative } from './ui/SelectNative/SelectNative';
|
32
|
-
|
32
|
+
import { Context } from './Combobox.context';
|
33
33
|
|
34
34
|
/**
|
35
35
|
* Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.
|
@@ -8,7 +8,7 @@ import { sizeToIconSize, getItemId } from '../../../../utils';
|
|
8
8
|
import { classes } from '../../../../Combobox.tokens';
|
9
9
|
import { cx, isEmpty } from '../../../../../../../utils';
|
10
10
|
import { IconDisclosureRightCentered, IconDone } from '../../../../../../_Icon';
|
11
|
-
import { Context } from '../../../../Combobox';
|
11
|
+
import { Context } from '../../../../Combobox.context';
|
12
12
|
import { useDidMountEffect } from '../../../../../../../hooks';
|
13
13
|
import { StyledWrapper, StyledText, Wrapper, DisclosureIconWrapper, StyledCheckbox, IconWrapper, StyledIndicator, StyledCheckboxWrapper, StyledCell } from './Item.styles';
|
14
14
|
export var Item = function Item(_ref) {
|
@@ -8,7 +8,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
8
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
9
9
|
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; }
|
10
10
|
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; }
|
11
|
-
import React, {
|
11
|
+
import React, { forwardRef, useReducer, useRef } from 'react';
|
12
12
|
import { safeUseId } from '@salutejs/plasma-core';
|
13
13
|
import { cx } from '../../utils';
|
14
14
|
import { useOutsideClick } from '../../hooks';
|
@@ -23,7 +23,7 @@ import { classes } from './Dropdown.tokens';
|
|
23
23
|
import { useKeyNavigation } from './hooks/useKeyboardNavigation';
|
24
24
|
import { useHashMaps } from './hooks/useHashMaps';
|
25
25
|
import { FloatingPopover } from './FloatingPopover';
|
26
|
-
|
26
|
+
import { Context } from './Dropdown.context';
|
27
27
|
|
28
28
|
/**
|
29
29
|
* Выпадающий список.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { safeUseId } from '@salutejs/plasma-core';
|
3
|
-
import { DropdownItem } from '
|
3
|
+
import { DropdownItem } from '../DropdownItem/DropdownItem';
|
4
4
|
import { Ul } from '../../Dropdown.styles';
|
5
5
|
import { FloatingPopover } from '../../FloatingPopover';
|
6
6
|
var DropdownInner = function DropdownInner(_ref) {
|