@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
package/es/engines/common.js
CHANGED
@@ -1,41 +1,7 @@
|
|
1
|
-
import { objectSpread2 as _objectSpread2, extends as _extends
|
1
|
+
import { objectSpread2 as _objectSpread2, extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
|
2
2
|
import React from 'react';
|
3
3
|
import { _component } from './linaria.js';
|
4
4
|
|
5
|
-
//
|
6
|
-
// Тип HTMLAttributesOmitOnChange требуется чтобы использовать компонент с кастомным пропсом onChange
|
7
|
-
//
|
8
|
-
|
9
|
-
var getStaticVariants = function getStaticVariants(config) {
|
10
|
-
if (!config.variations) {
|
11
|
-
return [];
|
12
|
-
}
|
13
|
-
var res = [];
|
14
|
-
var variations = config.variations;
|
15
|
-
|
16
|
-
// eslint-disable-next-line guard-for-in
|
17
|
-
for (var key in variations) {
|
18
|
-
var css = variations[key].css;
|
19
|
-
css && res.push(css);
|
20
|
-
}
|
21
|
-
return res;
|
22
|
-
};
|
23
|
-
var getDynamicVariants = function getDynamicVariants(config) {
|
24
|
-
return function (props) {
|
25
|
-
var res = [];
|
26
|
-
|
27
|
-
// eslint-disable-next-line guard-for-in
|
28
|
-
for (var key in config.variations) {
|
29
|
-
if (key in props) {
|
30
|
-
var variant = config.variations[key];
|
31
|
-
var css = variant[props[key]];
|
32
|
-
// no css for { modifier: true }
|
33
|
-
css && Array.isArray(css) ? res.push.apply(res, _toConsumableArray(css)) : res.push(css);
|
34
|
-
}
|
35
|
-
}
|
36
|
-
return res;
|
37
|
-
};
|
38
|
-
};
|
39
5
|
var mergeConfig = function mergeConfig(baseConfig, userConfig) {
|
40
6
|
var res = _objectSpread2(_objectSpread2({}, baseConfig), userConfig);
|
41
7
|
if (res.variations) {
|
@@ -72,5 +38,5 @@ function component(config) {
|
|
72
38
|
});
|
73
39
|
}
|
74
40
|
|
75
|
-
export { component,
|
41
|
+
export { component, mergeConfig };
|
76
42
|
//# sourceMappingURL=common.js.map
|
package/es/engines/common.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.js","sources":["../../src/engines/common.tsx"],"sourcesContent":["import React from 'react';\n\nimport { _component } from './linaria';\nimport type {\n ComponentConfig,\n
|
1
|
+
{"version":3,"file":"common.js","sources":["../../src/engines/common.tsx"],"sourcesContent":["import React from 'react';\n\nimport { _component } from './linaria';\nimport type {\n ComponentConfig,\n HTMLTagList,\n PropsType,\n Variants,\n HTMLAttributesWithoutOnChange,\n HTMLAttributesWithoutOnChangeAndDefaultValue,\n} from './types';\n\nexport const mergeConfig = <\n Tag extends HTMLTagList,\n VariantList extends Variants,\n VariantsProps extends PropsType<VariantList>,\n LayoutPropsBase extends\n | React.HTMLAttributes<HTMLElement>\n | HTMLAttributesWithoutOnChange<HTMLElement>\n | HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>,\n LayoutPropsUser extends\n | React.HTMLAttributes<HTMLElement>\n | HTMLAttributesWithoutOnChange<HTMLElement>\n | HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>\n | undefined = undefined\n>(\n baseConfig: ComponentConfig<Tag, Variants, PropsType & LayoutPropsBase, LayoutPropsBase>,\n userConfig?: Partial<ComponentConfig<Tag, VariantList, VariantsProps, LayoutPropsUser>>,\n) => {\n const res = { ...baseConfig, ...userConfig };\n\n if (res.variations) {\n // copy variations base css\n // eslint-disable-next-line guard-for-in\n for (const key in res.variations) {\n const variant = baseConfig.variations[key];\n\n res.variations[key].css = variant?.css;\n /* start of bad decision */\n if (!res.variations[key].true && variant?.true) {\n res.variations[key].true = variant.true;\n }\n /* end of bad decision */\n if (variant?.attrs) {\n res.variations[key].attrs = variant.attrs;\n }\n }\n }\n\n // eslint-disable-next-line guard-for-in\n for (const key in baseConfig.defaults || {}) {\n if (!(key in res.defaults)) {\n res.defaults[key] = baseConfig.defaults[key];\n }\n }\n\n return res as ComponentConfig<\n Tag,\n VariantList,\n PropsType<VariantList>,\n LayoutPropsUser extends undefined ? LayoutPropsBase : LayoutPropsUser\n >;\n};\n\nexport function component<\n Tag extends HTMLTagList,\n VariantList extends Variants,\n VariantsProps extends PropsType<VariantList>,\n LayoutProps extends\n | React.HTMLAttributes<HTMLElement>\n | HTMLAttributesWithoutOnChange<HTMLElement>\n | HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>\n>(\n config: ComponentConfig<Tag, VariantList, VariantsProps, LayoutProps>,\n): React.FunctionComponent<VariantsProps & LayoutProps> {\n const Comp = config.layout(_component((config as unknown) as ComponentConfig));\n\n return React.forwardRef<VariantsProps & LayoutProps, any>((props, ref) => (\n <Comp {...config?.defaults} {...props} ref={ref} />\n ));\n}\n"],"names":["mergeConfig","baseConfig","userConfig","res","_objectSpread","variations","key","variant","css","attrs","defaults","component","config","Comp","layout","_component","React","forwardRef","props","ref","createElement","_extends"],"mappings":";;;;AAYO,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAcpBC,UAAwF,EACxFC,UAAuF,EACtF;EACD,IAAMC,GAAG,GAAAC,cAAA,CAAAA,cAAA,CAAQH,EAAAA,EAAAA,UAAU,CAAKC,EAAAA,UAAU,CAAE,CAAA;EAE5C,IAAIC,GAAG,CAACE,UAAU,EAAE;AAChB;AACA;AACA,IAAA,KAAK,IAAMC,GAAG,IAAIH,GAAG,CAACE,UAAU,EAAE;AAC9B,MAAA,IAAME,OAAO,GAAGN,UAAU,CAACI,UAAU,CAACC,GAAG,CAAC,CAAA;AAE1CH,MAAAA,GAAG,CAACE,UAAU,CAACC,GAAG,CAAC,CAACE,GAAG,GAAGD,OAAO,KAAPA,IAAAA,IAAAA,OAAO,KAAPA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,OAAO,CAAEC,GAAG,CAAA;AACtC;AACA,MAAA,IAAI,CAACL,GAAG,CAACE,UAAU,CAACC,GAAG,CAAC,CAAK,MAAA,CAAA,IAAIC,OAAO,KAAPA,IAAAA,IAAAA,OAAO,KAAPA,KAAAA,CAAAA,IAAAA,OAAO,QAAM,EAAE;QAC5CJ,GAAG,CAACE,UAAU,CAACC,GAAG,CAAC,CAAK,MAAA,CAAA,GAAGC,OAAO,CAAK,MAAA,CAAA,CAAA;AAC3C,OAAA;AACA;AACA,MAAA,IAAIA,OAAO,KAAPA,IAAAA,IAAAA,OAAO,eAAPA,OAAO,CAAEE,KAAK,EAAE;QAChBN,GAAG,CAACE,UAAU,CAACC,GAAG,CAAC,CAACG,KAAK,GAAGF,OAAO,CAACE,KAAK,CAAA;AAC7C,OAAA;AACJ,KAAA;AACJ,GAAA;;AAEA;EACA,KAAK,IAAMH,IAAG,IAAIL,UAAU,CAACS,QAAQ,IAAI,EAAE,EAAE;AACzC,IAAA,IAAI,EAAEJ,IAAG,IAAIH,GAAG,CAACO,QAAQ,CAAC,EAAE;MACxBP,GAAG,CAACO,QAAQ,CAACJ,IAAG,CAAC,GAAGL,UAAU,CAACS,QAAQ,CAACJ,IAAG,CAAC,CAAA;AAChD,KAAA;AACJ,GAAA;AAEA,EAAA,OAAOH,GAAG,CAAA;AAMd,EAAC;AAEM,SAASQ,SAASA,CASrBC,MAAqE,EACjB;EACpD,IAAMC,IAAI,GAAGD,MAAM,CAACE,MAAM,CAACC,UAAU,CAAEH,MAAqC,CAAC,CAAC,CAAA;AAE9E,EAAA,oBAAOI,KAAK,CAACC,UAAU,CAAmC,UAACC,KAAK,EAAEC,GAAG,EAAA;AAAA,IAAA,oBACjEH,KAAA,CAAAI,aAAA,CAACP,IAAI,EAAAQ,QAAA,CAAA,EAAA,EAAKT,MAAM,KAAA,IAAA,IAANA,MAAM,KAANA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,MAAM,CAAEF,QAAQ,EAAMQ,KAAK,EAAA;AAAEC,MAAAA,GAAG,EAAEA,GAAAA;AAAI,KAAA,CAAE,CAAC,CAAA;AAAA,GACtD,CAAC,CAAA;AACN;;;;"}
|
package/es/engines/linaria.js
CHANGED
@@ -2,7 +2,7 @@ import { objectWithoutProperties as _objectWithoutProperties, toConsumableArray
|
|
2
2
|
import React, { forwardRef } from 'react';
|
3
3
|
import { cx } from '@linaria/core';
|
4
4
|
import 'focus-visible';
|
5
|
-
import { getStaticVariants, getDynamicVariants } from './
|
5
|
+
import { getStaticVariants, getDynamicVariants } from './utils.js';
|
6
6
|
|
7
7
|
var _excluded = ["className"];
|
8
8
|
/* eslint-disable no-underscore-dangle */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"linaria.js","sources":["../../src/engines/linaria.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { cx } from '@linaria/core';\n\n// TODO: #1008 Избавиться от импортов и переделать addFocus\nimport 'focus-visible';\nimport { getStaticVariants, getDynamicVariants } from './
|
1
|
+
{"version":3,"file":"linaria.js","sources":["../../src/engines/linaria.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { cx } from '@linaria/core';\n\n// TODO: #1008 Избавиться от импортов и переделать addFocus\nimport 'focus-visible';\nimport { getStaticVariants, getDynamicVariants } from './utils';\nimport type { ComponentConfig, HTMLAnyAttributes } from './types';\n\n/* eslint-disable no-underscore-dangle */\nexport const _component = (componentConfig: ComponentConfig) => {\n const { tag, base, name } = componentConfig;\n const staticVariants = getStaticVariants(componentConfig);\n const dynamicVariants = getDynamicVariants(componentConfig);\n const Root = tag as React.ElementType;\n\n const component = forwardRef<HTMLElement, HTMLAnyAttributes>((props, ref) => {\n const { className, ...rest } = props;\n const variants = dynamicVariants(rest);\n const cls = cx(className, base as string, ...(staticVariants as string[]), ...variants);\n\n // styled-components do it inside\n // filter props\n const baseProps: HTMLAnyAttributes = {};\n for (const key in rest) {\n if (!(key in componentConfig.variations)) {\n baseProps[key] = rest[key];\n }\n }\n\n baseProps.ref = ref;\n\n // styled-components do it inside\n // add props that should be attr( disabled for example)\n const htmlAttrs: HTMLAnyAttributes = {};\n for (const key in componentConfig.variations || {}) {\n if (key in rest) {\n const variant = componentConfig.variations[key];\n\n const { attrs } = variant;\n if (typeof attrs === 'boolean') {\n htmlAttrs[key] = rest[key];\n }\n }\n }\n\n return <Root className={cls} {...htmlAttrs} {...baseProps} />;\n });\n if (name) {\n component.displayName = name;\n }\n return component;\n};\n"],"names":["_component","componentConfig","tag","base","name","staticVariants","getStaticVariants","dynamicVariants","getDynamicVariants","Root","component","forwardRef","props","ref","className","rest","_objectWithoutProperties","_excluded","variants","cls","cx","apply","concat","_toConsumableArray","baseProps","key","variations","htmlAttrs","variant","attrs","React","createElement","_extends","displayName"],"mappings":";;;;;;;AAQA;IACaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,eAAgC,EAAK;AAC5D,EAAA,IAAQC,GAAG,GAAiBD,eAAe,CAAnCC,GAAG;IAAEC,IAAI,GAAWF,eAAe,CAA9BE,IAAI;IAAEC,IAAI,GAAKH,eAAe,CAAxBG,IAAI,CAAA;AACvB,EAAA,IAAMC,cAAc,GAAGC,iBAAiB,CAACL,eAAe,CAAC,CAAA;AACzD,EAAA,IAAMM,eAAe,GAAGC,kBAAkB,CAACP,eAAe,CAAC,CAAA;EAC3D,IAAMQ,IAAI,GAAGP,GAAwB,CAAA;EAErC,IAAMQ,SAAS,gBAAGC,UAAU,CAAiC,UAACC,KAAK,EAAEC,GAAG,EAAK;AACzE,IAAA,IAAQC,SAAS,GAAcF,KAAK,CAA5BE,SAAS;AAAKC,MAAAA,IAAI,GAAAC,wBAAA,CAAKJ,KAAK,EAAAK,SAAA,CAAA,CAAA;AACpC,IAAA,IAAMC,QAAQ,GAAGX,eAAe,CAACQ,IAAI,CAAC,CAAA;AACtC,IAAA,IAAMI,GAAG,GAAGC,EAAE,CAAAC,KAAA,CAAA,KAAA,CAAA,EAAA,CAACP,SAAS,EAAEX,IAAI,EAAAmB,MAAA,CAAAC,kBAAA,CAAgBlB,cAAc,GAAAkB,kBAAA,CAAkBL,QAAQ,CAAC,CAAA,CAAA,CAAA;;AAEvF;AACA;IACA,IAAMM,SAA4B,GAAG,EAAE,CAAA;AACvC,IAAA,KAAK,IAAMC,GAAG,IAAIV,IAAI,EAAE;AACpB,MAAA,IAAI,EAAEU,GAAG,IAAIxB,eAAe,CAACyB,UAAU,CAAC,EAAE;AACtCF,QAAAA,SAAS,CAACC,GAAG,CAAC,GAAGV,IAAI,CAACU,GAAG,CAAC,CAAA;AAC9B,OAAA;AACJ,KAAA;IAEAD,SAAS,CAACX,GAAG,GAAGA,GAAG,CAAA;;AAEnB;AACA;IACA,IAAMc,SAA4B,GAAG,EAAE,CAAA;IACvC,KAAK,IAAMF,IAAG,IAAIxB,eAAe,CAACyB,UAAU,IAAI,EAAE,EAAE;MAChD,IAAID,IAAG,IAAIV,IAAI,EAAE;AACb,QAAA,IAAMa,OAAO,GAAG3B,eAAe,CAACyB,UAAU,CAACD,IAAG,CAAC,CAAA;AAE/C,QAAA,IAAQI,KAAK,GAAKD,OAAO,CAAjBC,KAAK,CAAA;AACb,QAAA,IAAI,OAAOA,KAAK,KAAK,SAAS,EAAE;AAC5BF,UAAAA,SAAS,CAACF,IAAG,CAAC,GAAGV,IAAI,CAACU,IAAG,CAAC,CAAA;AAC9B,SAAA;AACJ,OAAA;AACJ,KAAA;AAEA,IAAA,oBAAOK,KAAA,CAAAC,aAAA,CAACtB,IAAI,EAAAuB,QAAA,CAAA;AAAClB,MAAAA,SAAS,EAAEK,GAAAA;AAAI,KAAA,EAAKQ,SAAS,EAAMH,SAAS,CAAG,CAAC,CAAA;AACjE,GAAC,CAAC,CAAA;AACF,EAAA,IAAIpB,IAAI,EAAE;IACNM,SAAS,CAACuB,WAAW,GAAG7B,IAAI,CAAA;AAChC,GAAA;AACA,EAAA,OAAOM,SAAS,CAAA;AACpB;;;;"}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { toConsumableArray as _toConsumableArray } from '../_virtual/_rollupPluginBabelHelpers.js';
|
2
|
+
|
3
|
+
var getStaticVariants = function getStaticVariants(config) {
|
4
|
+
if (!config.variations) {
|
5
|
+
return [];
|
6
|
+
}
|
7
|
+
var res = [];
|
8
|
+
var variations = config.variations;
|
9
|
+
|
10
|
+
// eslint-disable-next-line guard-for-in
|
11
|
+
for (var key in variations) {
|
12
|
+
var css = variations[key].css;
|
13
|
+
css && res.push(css);
|
14
|
+
}
|
15
|
+
return res;
|
16
|
+
};
|
17
|
+
var getDynamicVariants = function getDynamicVariants(config) {
|
18
|
+
return function (props) {
|
19
|
+
var res = [];
|
20
|
+
|
21
|
+
// eslint-disable-next-line guard-for-in
|
22
|
+
for (var key in config.variations) {
|
23
|
+
if (key in props) {
|
24
|
+
var variant = config.variations[key];
|
25
|
+
var css = variant[props[key]];
|
26
|
+
// no css for { modifier: true }
|
27
|
+
css && Array.isArray(css) ? res.push.apply(res, _toConsumableArray(css)) : res.push(css);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
return res;
|
31
|
+
};
|
32
|
+
};
|
33
|
+
|
34
|
+
export { getDynamicVariants, getStaticVariants };
|
35
|
+
//# sourceMappingURL=utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../src/engines/utils.ts"],"sourcesContent":["import type { ComponentConfig, HTMLAnyAttributes } from './types';\n\nexport const getStaticVariants = (config: ComponentConfig) => {\n if (!config.variations) {\n return [];\n }\n const res = [];\n const { variations } = config;\n\n // eslint-disable-next-line guard-for-in\n for (const key in variations) {\n const { css } = variations[key];\n css && res.push(css);\n }\n\n return res;\n};\n\nexport const getDynamicVariants = (config: ComponentConfig) => {\n return (props: HTMLAnyAttributes) => {\n const res = [];\n\n // eslint-disable-next-line guard-for-in\n for (const key in config.variations) {\n if (key in props) {\n const variant = config.variations[key];\n\n const css = variant[props[key]];\n // no css for { modifier: true }\n css && Array.isArray(css) ? res.push(...css) : res.push(css);\n }\n }\n\n return res;\n };\n};\n"],"names":["getStaticVariants","config","variations","res","key","css","push","getDynamicVariants","props","variant","Array","isArray","apply","_toConsumableArray"],"mappings":";;IAEaA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIC,MAAuB,EAAK;AAC1D,EAAA,IAAI,CAACA,MAAM,CAACC,UAAU,EAAE;AACpB,IAAA,OAAO,EAAE,CAAA;AACb,GAAA;EACA,IAAMC,GAAG,GAAG,EAAE,CAAA;AACd,EAAA,IAAQD,UAAU,GAAKD,MAAM,CAArBC,UAAU,CAAA;;AAElB;AACA,EAAA,KAAK,IAAME,GAAG,IAAIF,UAAU,EAAE;AAC1B,IAAA,IAAQG,GAAG,GAAKH,UAAU,CAACE,GAAG,CAAC,CAAvBC,GAAG,CAAA;AACXA,IAAAA,GAAG,IAAIF,GAAG,CAACG,IAAI,CAACD,GAAG,CAAC,CAAA;AACxB,GAAA;AAEA,EAAA,OAAOF,GAAG,CAAA;AACd,EAAC;IAEYI,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIN,MAAuB,EAAK;EAC3D,OAAO,UAACO,KAAwB,EAAK;IACjC,IAAML,GAAG,GAAG,EAAE,CAAA;;AAEd;AACA,IAAA,KAAK,IAAMC,GAAG,IAAIH,MAAM,CAACC,UAAU,EAAE;MACjC,IAAIE,GAAG,IAAII,KAAK,EAAE;AACd,QAAA,IAAMC,OAAO,GAAGR,MAAM,CAACC,UAAU,CAACE,GAAG,CAAC,CAAA;QAEtC,IAAMC,GAAG,GAAGI,OAAO,CAACD,KAAK,CAACJ,GAAG,CAAC,CAAC,CAAA;AAC/B;QACAC,GAAG,IAAIK,KAAK,CAACC,OAAO,CAACN,GAAG,CAAC,GAAGF,GAAG,CAACG,IAAI,CAAAM,KAAA,CAART,GAAG,EAAAU,kBAAA,CAASR,GAAG,CAAA,CAAC,GAAGF,GAAG,CAACG,IAAI,CAACD,GAAG,CAAC,CAAA;AAChE,OAAA;AACJ,KAAA;AAEA,IAAA,OAAOF,GAAG,CAAA;GACb,CAAA;AACL;;;;"}
|
package/es/index.css
CHANGED
@@ -123,10 +123,10 @@
|
|
123
123
|
.Radiobox_styles_520asv_s14xglkp__9ae15036{width:var(--plasma-radiobox-ellipse-size);height:var(--plasma-radiobox-ellipse-size);border-radius:var(--plasma-radiobox-ellipse-size);background-color:var(--plasma-radiobox-ellipse-color);-webkit-transition:-webkit-transform 0.3s ease-in-out;-webkit-transition:transform 0.3s ease-in-out;transition:transform 0.3s ease-in-out;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);}input:checked + label .Radiobox_styles_520asv_s14xglkp__9ae15036{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}
|
124
124
|
.Radiobox_styles_520asv_bdte4ex__9ae15036{--plasma-checkbox-label-font-family:var(--plasma-radiobox-label-font-family);--plasma-checkbox-label-font-size:var(--plasma-radiobox-label-font-size);--plasma-checkbox-label-font-style:var(--plasma-radiobox-label-font-style);--plasma-checkbox-label-font-weight:var(--plasma-radiobox-label-font-weight);--plasma-checkbox-label-letter-spacing:var(--plasma-radiobox-label-letter-spacing);--plasma-checkbox-label-line-height:var(--plasma-radiobox-label-line-height);--plasma-checkbox-description-margin-top:var(--plasma-checkbox-description-margin-top);--plasma-checkbox-description-font-family:var(--plasma-radiobox-description-font-family);--plasma-checkbox-description-font-size:var(--plasma-radiobox-description-font-size);--plasma-checkbox-description-font-style:var(--plasma-radiobox-description-font-style);--plasma-checkbox-description-font-weight:var(--plasma-radiobox-description-font-weight);--plasma-checkbox-description-letter-spacing:var(--plasma-radiobox-description-letter-spacing);--plasma-checkbox-description-line-height:var(--plasma-radiobox-description-line-height);--plasma-checkbox-fill-color:var(--plasma-radiobox-fill-color);--plasma-checkbox-description-color:var(--plasma-radiobox-description-color);--plasma-checkbox-trigger-border-color:var(--plasma-radiobox-trigger-border-color);--plasma-checkbox-trigger-background-color:var(--plasma-radiobox-trigger-background-color);--plasma-checkbox-content-top-offset:var(--plasma-radiobox-content-top-offset);--plasma-checkbox-content-left-offset:var(--plasma-radiobox-content-left-offset);--plasma-checkbox-trigger-size:var(--plasma-radiobox-trigger-size);--plasma-checkbox-trigger-border-radius:var(--plasma-radiobox-trigger-border-radius);--plasma-checkbox-trigger-margin:var(--plasma-radiobox-trigger-margin);margin:var(--plasma-radiobox-margin);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;}.Radiobox_styles_520asv_bdte4ex__9ae15036 .Radiobox_styles_520asv_singleLine__9ae15036{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
125
125
|
|
126
|
-
.
|
127
|
-
.
|
128
|
-
.
|
129
|
-
.
|
126
|
+
.Popover_styles_gh4xvw_s1g1xbt5__0bb7cc15{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;box-sizing:border-box;position:relative;}
|
127
|
+
.Popover_styles_gh4xvw_s12xwbyh__0bb7cc15{display:inline-block;}.Popover_styles_gh4xvw_s12xwbyh__0bb7cc15.Popover_styles_gh4xvw_popoverTargetAsRef__0bb7cc15{position:absolute;top:0;left:0;width:100%;height:100%;}.Popover_styles_gh4xvw_s12xwbyh__0bb7cc15.Popover_styles_gh4xvw_popoverTargetAsRef__0bb7cc15 .Popover_styles_gh4xvw_s1g1xbt5__0bb7cc15{width:100%;height:100%;display:block;}
|
128
|
+
.Popover_styles_gh4xvw_s1pd4d8a__0bb7cc15{width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);}.Popover_styles_gh4xvw_s1pd4d8a__0bb7cc15::before{position:absolute;width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);-webkit-mask-image:var(--plasma-popover-arrow-mask-image);mask-image:var(--plasma-popover-arrow-mask-image);background:var(--plasma-popover-arrow-background);content:'';-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}
|
129
|
+
.Popover_styles_gh4xvw_s16xlixz__0bb7cc15{position:absolute;z-index:var(--s16xlixz-0);}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15:before{content:'';display:block;position:absolute;background:transparent;}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='top'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15{bottom:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='bottom'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15{top:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='bottom'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='left'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15{right:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='left'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15::before{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='right'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15{left:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='right'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15::before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='top-start'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15{bottom:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='top-end'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15{bottom:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='bottom-start'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15{top:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='bottom-start'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='bottom-end'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15{top:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='bottom-end'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='left-start'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15,.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='right-start'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15{top:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='left-end'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15,.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='right-end'] > .Popover_styles_gh4xvw_popoverArrow__0bb7cc15{top:unset !important;bottom:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='top']:before,.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='top-start']:before,.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='top-end']:before{top:unset;left:0;right:0;height:var(--plasma-popover-arrow-height);bottom:calc(-1 * var(--plasma-popover-arrow-height));}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='bottom']:before,.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='bottom-start']:before,.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='bottom-end']:before{top:calc(-1 * var(--plasma-popover-arrow-height));left:0;right:0;bottom:var(--plasma-popover-arrow-height);height:var(--plasma-popover-arrow-height);}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='left']:before,.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='left-start']:before,.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='left-end']:before{width:var(--plasma-popover-arrow-height);height:100%;top:0;right:calc(-1 * var(--plasma-popover-arrow-height));bottom:0;}.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='right']:before,.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='right-start']:before,.Popover_styles_gh4xvw_s16xlixz__0bb7cc15[data-popper-placement^='right-end']:before{width:var(--plasma-popover-arrow-height);height:100%;top:0;left:calc(-1 * var(--plasma-popover-arrow-height));bottom:0;}
|
130
130
|
|
131
131
|
|
132
132
|
.TextArea_styles_ztsrpt_o1r1fvk8__c79165c1{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:var(--o1r1fvk8-0);}
|
package/package.json
CHANGED
@@ -1,10 +1,27 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.231.0-canary.1647.12467637991.0",
|
4
4
|
"description": "Salute Design System blueprint",
|
5
|
-
"main": "cjs/index.js",
|
6
|
-
"module": "es/index.js",
|
7
|
-
"types": "types/index.d.ts",
|
5
|
+
"main": "./cjs/index.js",
|
6
|
+
"module": "./es/index.js",
|
7
|
+
"types": "./types/index.d.ts",
|
8
|
+
"exports": {
|
9
|
+
".": {
|
10
|
+
"require": "./cjs/index.js",
|
11
|
+
"import": "./es/index.js",
|
12
|
+
"types": "./types/index.d.ts"
|
13
|
+
},
|
14
|
+
"./styled-components": {
|
15
|
+
"require": "./styled-components/cjs/index.js",
|
16
|
+
"import": "./styled-components/es/index.js",
|
17
|
+
"types": "./types/index.d.ts"
|
18
|
+
},
|
19
|
+
"./emotion": {
|
20
|
+
"require": "./emotion/cjs/index.js",
|
21
|
+
"import": "./emotion/es/index.js",
|
22
|
+
"types": "./types/index.d.ts"
|
23
|
+
}
|
24
|
+
},
|
8
25
|
"files": [
|
9
26
|
"cjs",
|
10
27
|
"es",
|
@@ -128,5 +145,5 @@
|
|
128
145
|
"sideEffects": [
|
129
146
|
"*.css"
|
130
147
|
],
|
131
|
-
"gitHead": "
|
148
|
+
"gitHead": "fc203c7c3b4fd9b49d427593fd8d378a7341d587"
|
132
149
|
}
|
@@ -11,6 +11,7 @@ var _base = /*#__PURE__*/require("./variations/_size/base");
|
|
11
11
|
var _base2 = /*#__PURE__*/require("./variations/_view/base");
|
12
12
|
var _Breadcrumbs = /*#__PURE__*/require("./Breadcrumbs.styles");
|
13
13
|
var _utils2 = /*#__PURE__*/require("./utils");
|
14
|
+
var _getShortItems = /*#__PURE__*/require("./utils/getShortItems");
|
14
15
|
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); }
|
15
16
|
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; }
|
16
17
|
var breadcrumbsRoot = exports.breadcrumbsRoot = function breadcrumbsRoot(Root) {
|
@@ -26,7 +27,7 @@ var breadcrumbsRoot = exports.breadcrumbsRoot = function breadcrumbsRoot(Root) {
|
|
26
27
|
color: "inherit",
|
27
28
|
size: (0, _utils2.convertIconSize)(size)
|
28
29
|
});
|
29
|
-
var renderItems = (0,
|
30
|
+
var renderItems = (0, _getShortItems.getRenderItems)(items, renderSeparator, showItems);
|
30
31
|
var itemsWithSeparator = (0, _utils2.addSeparator)(renderItems, renderSeparator);
|
31
32
|
return /*#__PURE__*/_react["default"].createElement(Root, {
|
32
33
|
ref: outerRootRef,
|
@@ -0,0 +1,42 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.shortItems = exports.getRenderItems = void 0;
|
7
|
+
var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
|
8
|
+
var _BreadcrumbShorter = /*#__PURE__*/require("../ui/BreadcrumbShorter/BreadcrumbShorter");
|
9
|
+
var _Breadcrumbs = /*#__PURE__*/require("../Breadcrumbs.styles");
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
11
|
+
var shortItems = exports.shortItems = function shortItems(items, renderSeparator, showItems) {
|
12
|
+
if (!showItems || showItems < 2 || items.length <= showItems) {
|
13
|
+
return items;
|
14
|
+
}
|
15
|
+
var leftSlice = Math.floor(showItems / 2);
|
16
|
+
var rightSlice = items.length - leftSlice - showItems % 2;
|
17
|
+
var renderItems = items.slice(leftSlice, rightSlice);
|
18
|
+
var shorter = /*#__PURE__*/_react["default"].createElement(_BreadcrumbShorter.BreadcrumbShorter, {
|
19
|
+
separator: renderSeparator
|
20
|
+
}, renderItems);
|
21
|
+
items.splice(leftSlice, rightSlice - leftSlice, shorter);
|
22
|
+
return items;
|
23
|
+
};
|
24
|
+
var getRenderItems = exports.getRenderItems = function getRenderItems(items, renderSeparator, showItems) {
|
25
|
+
var renderItems = shortItems(items.map(function (item) {
|
26
|
+
if (item.renderItem) {
|
27
|
+
return item.renderItem();
|
28
|
+
}
|
29
|
+
var title = item.title,
|
30
|
+
disabled = item.disabled,
|
31
|
+
href = item.href,
|
32
|
+
onClick = item.onClick;
|
33
|
+
return /*#__PURE__*/_react["default"].createElement(_Breadcrumbs.StyledLink, {
|
34
|
+
tabIndex: 0,
|
35
|
+
href: href,
|
36
|
+
disabled: disabled,
|
37
|
+
onClick: onClick,
|
38
|
+
isHref: Boolean(href || onClick)
|
39
|
+
}, title);
|
40
|
+
}), renderSeparator, showItems);
|
41
|
+
return renderItems;
|
42
|
+
};
|
@@ -3,24 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
7
|
-
var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
|
8
|
-
var _BreadcrumbShorter = /*#__PURE__*/require("../ui/BreadcrumbShorter/BreadcrumbShorter");
|
9
|
-
var _Breadcrumbs = /*#__PURE__*/require("../Breadcrumbs.styles");
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
11
|
-
var shortItems = exports.shortItems = function shortItems(items, renderSeparator, showItems) {
|
12
|
-
if (!showItems || showItems < 2 || items.length <= showItems) {
|
13
|
-
return items;
|
14
|
-
}
|
15
|
-
var leftSlice = Math.floor(showItems / 2);
|
16
|
-
var rightSlice = items.length - leftSlice - showItems % 2;
|
17
|
-
var renderItems = items.slice(leftSlice, rightSlice);
|
18
|
-
var shorter = /*#__PURE__*/_react["default"].createElement(_BreadcrumbShorter.BreadcrumbShorter, {
|
19
|
-
separator: renderSeparator
|
20
|
-
}, renderItems);
|
21
|
-
items.splice(leftSlice, rightSlice - leftSlice, shorter);
|
22
|
-
return items;
|
23
|
-
};
|
6
|
+
exports.convertIconSize = exports.addSeparator = void 0;
|
24
7
|
var convertIconSize = exports.convertIconSize = function convertIconSize(size) {
|
25
8
|
switch (size) {
|
26
9
|
case 's':
|
@@ -30,25 +13,6 @@ var convertIconSize = exports.convertIconSize = function convertIconSize(size) {
|
|
30
13
|
return 's';
|
31
14
|
}
|
32
15
|
};
|
33
|
-
var getRenderItems = exports.getRenderItems = function getRenderItems(items, renderSeparator, showItems) {
|
34
|
-
var renderItems = shortItems(items.map(function (item) {
|
35
|
-
if (item.renderItem) {
|
36
|
-
return item.renderItem();
|
37
|
-
}
|
38
|
-
var title = item.title,
|
39
|
-
disabled = item.disabled,
|
40
|
-
href = item.href,
|
41
|
-
onClick = item.onClick;
|
42
|
-
return /*#__PURE__*/_react["default"].createElement(_Breadcrumbs.StyledLink, {
|
43
|
-
tabIndex: 0,
|
44
|
-
href: href,
|
45
|
-
disabled: disabled,
|
46
|
-
onClick: onClick,
|
47
|
-
isHref: Boolean(href || onClick)
|
48
|
-
}, title);
|
49
|
-
}), renderSeparator, showItems);
|
50
|
-
return renderItems;
|
51
|
-
};
|
52
16
|
var addSeparator = exports.addSeparator = function addSeparator(items, renderSeparator) {
|
53
17
|
return items.flatMap(function (item, idx) {
|
54
18
|
return idx < items.length - 1 ? [item, renderSeparator] : [item];
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.getDatesWithModifications = void 0;
|
7
7
|
var _types = /*#__PURE__*/require("../store/types");
|
8
|
-
var
|
8
|
+
var _calendarGridHelper = /*#__PURE__*/require("./calendarGridHelper");
|
9
9
|
var dateOperationHandler = {
|
10
10
|
Days: {
|
11
11
|
add: function add(date) {
|
@@ -144,8 +144,8 @@ var getDatesWithModifications = exports.getDatesWithModifications = function get
|
|
144
144
|
includeEdgeDates = _ref3.includeEdgeDates,
|
145
145
|
min = _ref3.min,
|
146
146
|
max = _ref3.max;
|
147
|
-
var eventsMap = (0,
|
148
|
-
var disabledDatesMap = (0,
|
147
|
+
var eventsMap = (0, _calendarGridHelper.getPropsMap)(eventList);
|
148
|
+
var disabledDatesMap = (0, _calendarGridHelper.getPropsMap)(disabledList);
|
149
149
|
var filteredDates = type === _types.CalendarState.Days ? dates.filter(function (_ref4) {
|
150
150
|
var isDayInCurrentMonth = _ref4.isDayInCurrentMonth;
|
151
151
|
return isDayInCurrentMonth;
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.comboboxRoot = exports.comboboxConfig =
|
6
|
+
exports.comboboxRoot = exports.comboboxConfig = 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");
|
@@ -20,6 +20,7 @@ var _Combobox2 = /*#__PURE__*/require("./Combobox.styles");
|
|
20
20
|
var _base = /*#__PURE__*/require("./variations/_view/base");
|
21
21
|
var _base2 = /*#__PURE__*/require("./variations/_size/base");
|
22
22
|
var _SelectNative = /*#__PURE__*/require("./ui/SelectNative/SelectNative");
|
23
|
+
var _Combobox3 = /*#__PURE__*/require("./Combobox.context");
|
23
24
|
var _excluded = ["name", "multiple", "value", "onChange", "defaultValue", "isTargetAmount", "targetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "keepPlaceholder", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect", "renderValue", "zIndex", "beforeList", "afterList"];
|
24
25
|
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); }
|
25
26
|
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; }
|
@@ -37,8 +38,6 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
37
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
38
39
|
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; }
|
39
40
|
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; }
|
40
|
-
var Context = exports.Context = /*#__PURE__*/(0, _react.createContext)({});
|
41
|
-
|
42
41
|
/**
|
43
42
|
* Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.
|
44
43
|
*/
|
@@ -408,7 +407,7 @@ var comboboxRoot = exports.comboboxRoot = function comboboxRoot(Root) {
|
|
408
407
|
onChange: onChange,
|
409
408
|
onSetValue: setInternalValue,
|
410
409
|
ref: ref
|
411
|
-
}), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(Context.Provider, {
|
410
|
+
}), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Combobox3.Context.Provider, {
|
412
411
|
value: {
|
413
412
|
focusedPath: focusedPath,
|
414
413
|
checked: checked,
|
@@ -10,7 +10,7 @@ var _utils = /*#__PURE__*/require("../../../../utils");
|
|
10
10
|
var _Combobox = /*#__PURE__*/require("../../../../Combobox.tokens");
|
11
11
|
var _utils2 = /*#__PURE__*/require("../../../../../../../utils");
|
12
12
|
var _Icon = /*#__PURE__*/require("../../../../../../_Icon");
|
13
|
-
var _Combobox2 = /*#__PURE__*/require("../../../../Combobox");
|
13
|
+
var _Combobox2 = /*#__PURE__*/require("../../../../Combobox.context");
|
14
14
|
var _hooks = /*#__PURE__*/require("../../../../../../../hooks");
|
15
15
|
var _Item = /*#__PURE__*/require("./Item.styles");
|
16
16
|
var _StyledIndicator;
|
@@ -4,7 +4,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
5
5
|
value: true
|
6
6
|
});
|
7
|
-
exports.dropdownRoot = exports.dropdownConfig =
|
7
|
+
exports.dropdownRoot = exports.dropdownConfig = void 0;
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
9
|
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
10
10
|
var _utils = /*#__PURE__*/require("../../utils");
|
@@ -20,6 +20,7 @@ var _Dropdown2 = /*#__PURE__*/require("./Dropdown.tokens");
|
|
20
20
|
var _useKeyboardNavigation = /*#__PURE__*/require("./hooks/useKeyboardNavigation");
|
21
21
|
var _useHashMaps3 = /*#__PURE__*/require("./hooks/useHashMaps");
|
22
22
|
var _FloatingPopover = /*#__PURE__*/require("./FloatingPopover");
|
23
|
+
var _Dropdown3 = /*#__PURE__*/require("./Dropdown.context");
|
23
24
|
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "alwaysOpened", "portal", "renderItem", "zIndex", "beforeList", "afterList"];
|
24
25
|
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); }
|
25
26
|
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; }
|
@@ -32,8 +33,6 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
32
33
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
33
34
|
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; }
|
34
35
|
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; }
|
35
|
-
var Context = exports.Context = /*#__PURE__*/(0, _react.createContext)({});
|
36
|
-
|
37
36
|
/**
|
38
37
|
* Выпадающий список.
|
39
38
|
*/
|
@@ -136,7 +135,7 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
136
135
|
}),
|
137
136
|
onKeyDown = _useKeyNavigation.onKeyDown;
|
138
137
|
var isCurrentListOpen = alwaysOpened || Boolean(path[0]);
|
139
|
-
return /*#__PURE__*/_react["default"].createElement(Context.Provider, {
|
138
|
+
return /*#__PURE__*/_react["default"].createElement(_Dropdown3.Context.Provider, {
|
140
139
|
value: {
|
141
140
|
focusedPath: focusedPath,
|
142
141
|
size: size,
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.DropdownInner = void 0;
|
7
7
|
var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
|
8
8
|
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
9
|
-
var
|
9
|
+
var _DropdownItem = /*#__PURE__*/require("../DropdownItem/DropdownItem");
|
10
10
|
var _Dropdown = /*#__PURE__*/require("../../Dropdown.styles");
|
11
11
|
var _FloatingPopover = /*#__PURE__*/require("../../FloatingPopover");
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
@@ -44,7 +44,7 @@ var DropdownInner = exports.DropdownInner = function DropdownInner(_ref) {
|
|
44
44
|
opened: isCurrentListOpen,
|
45
45
|
onToggle: handleToggle,
|
46
46
|
trigger: trigger,
|
47
|
-
target: /*#__PURE__*/_react["default"].createElement(
|
47
|
+
target: /*#__PURE__*/_react["default"].createElement(_DropdownItem.DropdownItem, {
|
48
48
|
item: item,
|
49
49
|
index: index,
|
50
50
|
path: path,
|
@@ -77,7 +77,7 @@ var DropdownInner = exports.DropdownInner = function DropdownInner(_ref) {
|
|
77
77
|
});
|
78
78
|
})));
|
79
79
|
}
|
80
|
-
return /*#__PURE__*/_react["default"].createElement(
|
80
|
+
return /*#__PURE__*/_react["default"].createElement(_DropdownItem.DropdownItem, {
|
81
81
|
item: item,
|
82
82
|
path: path,
|
83
83
|
index: index,
|
@@ -9,7 +9,7 @@ var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react")
|
|
9
9
|
var _Dropdown = /*#__PURE__*/require("../../Dropdown.tokens");
|
10
10
|
var _utils = /*#__PURE__*/require("../../../../utils");
|
11
11
|
var _Icon = /*#__PURE__*/require("../../../_Icon");
|
12
|
-
var _Dropdown2 = /*#__PURE__*/require("../../Dropdown");
|
12
|
+
var _Dropdown2 = /*#__PURE__*/require("../../Dropdown.context");
|
13
13
|
var _utils2 = /*#__PURE__*/require("../../utils");
|
14
14
|
var _DropdownItem = /*#__PURE__*/require("./DropdownItem.styles");
|
15
15
|
var _excluded = ["value", "label", "disabled", "isDisabled", "contentLeft", "contentRight", "dividerBefore", "dividerAfter", "className"];
|
@@ -1,6 +1,5 @@
|
|
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
|
});
|
@@ -23,6 +22,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
23
22
|
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; }
|
24
23
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
25
24
|
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); }
|
25
|
+
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); }
|
26
26
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
27
27
|
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."); }
|
28
28
|
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); }
|
@@ -82,6 +82,7 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
|
|
82
82
|
var _useState3 = (0, _react.useState)(false),
|
83
83
|
_useState4 = _slicedToArray(_useState3, 2),
|
84
84
|
forceRender = _useState4[1];
|
85
|
+
var portalContainer = _typeof(target) === 'object' && target !== null && 'current' in target && target.current || undefined;
|
85
86
|
var isAutoArray = Array.isArray(placement);
|
86
87
|
var isAuto = isAutoArray || placement.startsWith('auto');
|
87
88
|
var initialStyles = {
|
@@ -181,7 +182,7 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
|
|
181
182
|
if (typeof frame !== 'string' && frame && frame.current) {
|
182
183
|
portal = frame.current;
|
183
184
|
}
|
184
|
-
if (!usePortal) {
|
185
|
+
if (!usePortal && /*#__PURE__*/(0, _react.isValidElement)(target)) {
|
185
186
|
portal = rootRef.current;
|
186
187
|
}
|
187
188
|
if (!portal) {
|
@@ -215,8 +216,11 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
|
|
215
216
|
*/
|
216
217
|
Promise.resolve().then(forceUpdate);
|
217
218
|
}, [innerIsOpen, children, forceUpdate]);
|
218
|
-
return /*#__PURE__*/_react["default"].createElement(
|
219
|
-
|
219
|
+
return /*#__PURE__*/_react["default"].createElement(_Portal.Portal, {
|
220
|
+
container: portalContainer,
|
221
|
+
disabled: /*#__PURE__*/(0, _react.isValidElement)(target)
|
222
|
+
}, /*#__PURE__*/_react["default"].createElement(_Popover.StyledWrapper, {
|
223
|
+
className: (0, _utils.cx)(_Popover2.classes.wrapper, ! /*#__PURE__*/(0, _react.isValidElement)(target) && _Popover2.classes.targetAsRef),
|
220
224
|
onMouseEnter: onMouseEnter,
|
221
225
|
onMouseLeave: onMouseLeave
|
222
226
|
}, /*#__PURE__*/_react["default"].createElement(_Popover.StyledRoot, {
|
@@ -225,7 +229,7 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
|
|
225
229
|
onFocus: onFocus,
|
226
230
|
onBlur: onBlur,
|
227
231
|
className: (0, _utils.cx)(className, _Popover2.classes.target)
|
228
|
-
}, target), children && portalRef.current && /*#__PURE__*/_react["default"].createElement(_Portal.Portal, {
|
232
|
+
}, /*#__PURE__*/(0, _react.isValidElement)(target) && target), children && portalRef.current && /*#__PURE__*/_react["default"].createElement(_Portal.Portal, {
|
229
233
|
container: portalRef.current
|
230
234
|
}, /*#__PURE__*/_react["default"].createElement(Root, _extends({
|
231
235
|
view: view,
|
@@ -241,7 +245,7 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
|
|
241
245
|
className: _Popover2.classes.arrow,
|
242
246
|
ref: setArrowElement,
|
243
247
|
style: styles.arrow
|
244
|
-
}, attributes.arrow)), children))));
|
248
|
+
}, attributes.arrow)), children)))));
|
245
249
|
});
|
246
250
|
};
|
247
251
|
var popoverConfig = exports.popoverConfig = {
|
@@ -8,12 +8,12 @@ var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/requir
|
|
8
8
|
var _utils = /*#__PURE__*/require("../Popup/utils");
|
9
9
|
var _Popover = /*#__PURE__*/require("./Popover.tokens");
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
11
|
-
var StyledWrapper = exports.StyledWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
12
|
-
componentId: "plasma-new-hope__sc-tnpyex-0"
|
13
|
-
})(["display:inline-block;"]);
|
14
11
|
var StyledRoot = exports.StyledRoot = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
15
|
-
componentId: "plasma-new-hope__sc-tnpyex-
|
12
|
+
componentId: "plasma-new-hope__sc-tnpyex-0"
|
16
13
|
})(["display:inline-flex;box-sizing:border-box;position:relative;"]);
|
14
|
+
var StyledWrapper = exports.StyledWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
15
|
+
componentId: "plasma-new-hope__sc-tnpyex-1"
|
16
|
+
})(["display:inline-block;&.", "{position:absolute;top:0;left:0;width:100%;height:100%;", "{width:100%;height:100%;display:block;}}"], _Popover.classes.targetAsRef, StyledRoot);
|
17
17
|
var StyledArrow = exports.StyledArrow = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
18
18
|
componentId: "plasma-new-hope__sc-tnpyex-2"
|
19
19
|
})(["width:var(", ");height:var(", ");&::before{position:absolute;width:var(", ");height:var(", ");mask-image:var(", ");background:var(", ");content:'';transform:rotate(0deg);}"], /*#__PURE__*/String(_Popover.tokens.arrowMaskWidth), /*#__PURE__*/String(_Popover.tokens.arrowMaskHeight), /*#__PURE__*/String(_Popover.tokens.arrowMaskWidth), /*#__PURE__*/String(_Popover.tokens.arrowMaskHeight), /*#__PURE__*/String(_Popover.tokens.arrowMaskImage), /*#__PURE__*/String(_Popover.tokens.arrowBackground));
|