@salutejs/plasma-new-hope 0.71.3-canary.1161.8619854344.0 → 0.72.0-canary.1160.8612911363.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Cell/Cell.js +0 -2
- package/cjs/components/Cell/Cell.js.map +1 -1
- package/cjs/components/Combobox/Combobox.css +10 -10
- package/cjs/components/Combobox/Combobox.styles.js +5 -5
- package/cjs/components/Combobox/Combobox.styles.js.map +1 -1
- package/cjs/components/Combobox/{Combobox.styles_dw6hnk.css → Combobox.styles_17ei5vn.css} +1 -1
- package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +4 -4
- package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +4 -4
- package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +4 -4
- package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +4 -4
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.css +4 -4
- package/cjs/components/Dropdown/Dropdown.css +4 -4
- package/cjs/components/Dropdown/Dropdown.js +1 -0
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +9 -9
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +9 -9
- package/cjs/components/Popover/Popover.css +4 -4
- package/cjs/components/Popover/Popover.js +43 -33
- package/cjs/components/Popover/Popover.js.map +1 -1
- package/cjs/components/Popover/Popover.styles.js +1 -1
- package/cjs/components/Popover/Popover.styles.js.map +1 -1
- package/cjs/components/Popover/{Popover.styles_1ggb66y.css → Popover.styles_1rk9t6z.css} +1 -1
- package/cjs/components/Select/Select.css +9 -9
- package/cjs/components/Select/Select.styles.js +7 -7
- package/cjs/components/Select/Select.styles.js.map +1 -1
- package/{es/components/Select/Select.styles_1q3i6gw.css → cjs/components/Select/Select.styles_ls547o.css} +1 -1
- package/cjs/components/Select/ui/SelectItem/SelectItem.css +4 -4
- package/cjs/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
- package/cjs/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
- package/cjs/components/TextField/TextField.js +166 -40
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/TextField.styles.js +27 -11
- package/cjs/components/TextField/TextField.styles.js.map +1 -1
- package/cjs/components/TextField/TextField.styles_1b1mddp.css +8 -0
- package/cjs/components/TextField/TextField.tokens.js +68 -20
- package/cjs/components/TextField/TextField.tokens.js.map +1 -1
- package/cjs/components/TextField/TextField_wctd2m.css +1 -0
- package/cjs/components/TextField/hooks/useKeyNavigation.js +131 -0
- package/cjs/components/TextField/hooks/useKeyNavigation.js.map +1 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.css +19 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +38 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +26 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles_1y8n7la.css +1 -0
- package/cjs/components/{Select/ui/SelectDivider/variations/_view → TextField/variations/_disabled}/base.js +2 -2
- package/cjs/components/TextField/variations/_disabled/base.js.map +1 -0
- package/cjs/components/TextField/variations/_disabled/base_1tnjoy9.css +1 -0
- package/cjs/components/TextField/{_label-placement → variations/_label-placement}/base.js +1 -1
- package/cjs/components/TextField/variations/_label-placement/base.js.map +1 -0
- package/cjs/components/TextField/{_label-placement → variations/_label-placement}/inner.js +2 -2
- package/cjs/components/TextField/variations/_label-placement/inner.js.map +1 -0
- package/cjs/components/TextField/variations/_label-placement/inner_gqlcj2.css +1 -0
- package/cjs/components/TextField/{_label-placement → variations/_label-placement}/outer.js +2 -2
- package/cjs/components/TextField/variations/_label-placement/outer.js.map +1 -0
- package/cjs/components/TextField/variations/_label-placement/outer_is41nj.css +1 -0
- package/cjs/components/{Select/ui/SelectFooter/variations/_size → TextField/variations/_read-only}/base.js +2 -2
- package/cjs/components/TextField/variations/_read-only/base.js.map +1 -0
- package/cjs/components/TextField/variations/_read-only/base_134hshp.css +1 -0
- package/cjs/components/{Select/ui/SelectFooter/variations/_view → TextField/variations/_size}/base.js +2 -2
- package/cjs/components/TextField/variations/_size/base.js.map +1 -0
- package/cjs/components/TextField/variations/_size/base_1khzr9t.css +1 -0
- package/cjs/components/{Select/ui/SelectDivider/variations/_size → TextField/variations/_view}/base.js +2 -2
- package/cjs/components/TextField/variations/_view/base.js.map +1 -0
- package/cjs/components/TextField/variations/_view/base_1qd77x6.css +1 -0
- package/cjs/index.css +49 -42
- package/cjs/index.js +6 -41
- package/cjs/index.js.map +1 -1
- package/cjs/utils/index.js +1 -13
- package/cjs/utils/index.js.map +1 -1
- package/cjs/utils/react.js +2 -12
- package/cjs/utils/react.js.map +1 -1
- package/es/components/Cell/Cell.js +0 -2
- package/es/components/Cell/Cell.js.map +1 -1
- package/es/components/Combobox/Combobox.css +10 -10
- package/es/components/Combobox/Combobox.styles.js +5 -5
- package/es/components/Combobox/Combobox.styles.js.map +1 -1
- package/es/components/Combobox/{Combobox.styles_dw6hnk.css → Combobox.styles_17ei5vn.css} +1 -1
- package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +4 -4
- package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +4 -4
- package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +4 -4
- package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +4 -4
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.css +4 -4
- package/es/components/Dropdown/Dropdown.css +4 -4
- package/es/components/Dropdown/Dropdown.js +1 -0
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Pagination/Pagination.css +9 -9
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +9 -9
- package/es/components/Popover/Popover.css +4 -4
- package/es/components/Popover/Popover.js +43 -33
- package/es/components/Popover/Popover.js.map +1 -1
- package/es/components/Popover/Popover.styles.js +1 -1
- package/es/components/Popover/Popover.styles.js.map +1 -1
- package/es/components/Popover/{Popover.styles_1ggb66y.css → Popover.styles_1rk9t6z.css} +1 -1
- package/es/components/Select/Select.css +9 -9
- package/es/components/Select/Select.styles.js +7 -7
- package/es/components/Select/Select.styles.js.map +1 -1
- package/{cjs/components/Select/Select.styles_1q3i6gw.css → es/components/Select/Select.styles_ls547o.css} +1 -1
- package/es/components/Select/ui/SelectItem/SelectItem.css +4 -4
- package/es/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
- package/es/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
- package/es/components/TextField/TextField.js +169 -44
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/TextField.styles.js +25 -12
- package/es/components/TextField/TextField.styles.js.map +1 -1
- package/es/components/TextField/TextField.styles_1b1mddp.css +8 -0
- package/es/components/TextField/TextField.tokens.js +68 -21
- package/es/components/TextField/TextField.tokens.js.map +1 -1
- package/es/components/TextField/TextField_wctd2m.css +1 -0
- package/es/components/TextField/hooks/useKeyNavigation.js +126 -0
- package/es/components/TextField/hooks/useKeyNavigation.js.map +1 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.css +19 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +34 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +22 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles_1y8n7la.css +1 -0
- package/es/components/TextField/variations/_disabled/base.js +5 -0
- package/es/components/TextField/variations/_disabled/base.js.map +1 -0
- package/es/components/TextField/variations/_disabled/base_1tnjoy9.css +1 -0
- package/es/components/TextField/{_label-placement → variations/_label-placement}/base.js +1 -1
- package/es/components/TextField/variations/_label-placement/base.js.map +1 -0
- package/es/components/TextField/variations/_label-placement/inner.js +5 -0
- package/es/components/TextField/variations/_label-placement/inner.js.map +1 -0
- package/es/components/TextField/variations/_label-placement/inner_gqlcj2.css +1 -0
- package/es/components/TextField/variations/_label-placement/outer.js +5 -0
- package/es/components/TextField/variations/_label-placement/outer.js.map +1 -0
- package/es/components/TextField/variations/_label-placement/outer_is41nj.css +1 -0
- package/es/components/TextField/variations/_read-only/base.js +5 -0
- package/es/components/TextField/variations/_read-only/base.js.map +1 -0
- package/es/components/TextField/variations/_read-only/base_134hshp.css +1 -0
- package/es/components/TextField/variations/_size/base.js +5 -0
- package/es/components/TextField/variations/_size/base.js.map +1 -0
- package/es/components/TextField/variations/_size/base_1khzr9t.css +1 -0
- package/es/components/{Select/ui/SelectDivider/variations/_size → TextField/variations/_view}/base.js +2 -2
- package/es/components/TextField/variations/_view/base.js.map +1 -0
- package/es/components/TextField/variations/_view/base_1qd77x6.css +1 -0
- package/es/index.css +49 -42
- package/es/index.js +2 -15
- package/es/index.js.map +1 -1
- package/es/utils/index.js +2 -11
- package/es/utils/index.js.map +1 -1
- package/es/utils/react.js +2 -9
- package/es/utils/react.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Cell/Cell.js +0 -2
- package/styled-components/cjs/components/Combobox/Combobox.styles.js +1 -1
- package/styled-components/cjs/components/Dropdown/Dropdown.js +1 -0
- package/styled-components/cjs/components/Popover/Popover.js +43 -33
- package/styled-components/cjs/components/Popover/Popover.styles.js +1 -1
- package/styled-components/cjs/components/Select/Select.styles.js +1 -1
- package/styled-components/cjs/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
- package/styled-components/cjs/components/TextField/TextField.js +173 -43
- package/styled-components/cjs/components/TextField/TextField.styles.js +18 -10
- package/styled-components/cjs/components/TextField/TextField.template-doc.mdx +24 -0
- package/styled-components/cjs/components/TextField/TextField.tokens.js +68 -21
- package/styled-components/cjs/components/TextField/hooks/index.js +12 -0
- package/styled-components/cjs/components/TextField/hooks/useKeyNavigation.js +137 -0
- package/styled-components/cjs/components/TextField/index.js +2 -2
- package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +39 -0
- package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +25 -0
- package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.types.js +5 -0
- package/styled-components/cjs/components/TextField/ui/index.js +12 -0
- package/styled-components/cjs/components/TextField/variations/_disabled/base.js +10 -0
- package/styled-components/cjs/components/TextField/variations/_label-placement/inner.js +10 -0
- package/styled-components/cjs/components/TextField/{_label-placement → variations/_label-placement}/outer.js +3 -3
- package/styled-components/cjs/components/TextField/variations/_read-only/base.js +10 -0
- package/styled-components/cjs/components/TextField/variations/_read-only/tokens.json +1 -0
- package/styled-components/cjs/components/TextField/variations/_size/base.js +10 -0
- package/styled-components/cjs/components/TextField/variations/_view/base.js +10 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +43 -0
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.js +11 -0
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +133 -0
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +40 -0
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.js +11 -0
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +133 -0
- package/styled-components/cjs/examples/sds_engineer/components/TextField/TextField.config.js +43 -0
- package/styled-components/cjs/examples/sds_engineer/components/TextField/TextField.js +11 -0
- package/styled-components/cjs/examples/sds_engineer/components/TextField/TextField.stories.tsx +133 -0
- package/styled-components/cjs/index.js +0 -22
- package/styled-components/es/components/Cell/Cell.js +0 -2
- package/styled-components/es/components/Combobox/Combobox.styles.js +1 -1
- package/styled-components/es/components/Dropdown/Dropdown.js +1 -0
- package/styled-components/es/components/Popover/Popover.js +43 -33
- package/styled-components/es/components/Popover/Popover.styles.js +1 -1
- package/styled-components/es/components/Select/Select.styles.js +1 -1
- package/styled-components/es/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
- package/styled-components/es/components/TextField/TextField.js +177 -47
- package/styled-components/es/components/TextField/TextField.styles.js +17 -9
- package/styled-components/es/components/TextField/TextField.template-doc.mdx +24 -0
- package/styled-components/es/components/TextField/TextField.tokens.js +67 -20
- package/styled-components/es/components/TextField/hooks/index.js +1 -0
- package/styled-components/es/components/TextField/hooks/useKeyNavigation.js +131 -0
- package/styled-components/es/components/TextField/index.js +2 -2
- package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +30 -0
- package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +19 -0
- package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.types.js +1 -0
- package/styled-components/es/components/TextField/ui/index.js +1 -0
- package/styled-components/es/components/TextField/variations/_disabled/base.js +4 -0
- package/styled-components/es/components/TextField/variations/_label-placement/inner.js +4 -0
- package/styled-components/es/components/TextField/variations/_label-placement/outer.js +4 -0
- package/styled-components/es/components/TextField/variations/_read-only/base.js +4 -0
- package/styled-components/es/components/TextField/variations/_read-only/tokens.json +1 -0
- package/styled-components/es/components/TextField/variations/_size/base.js +4 -0
- package/styled-components/es/components/TextField/variations/_view/base.js +4 -0
- package/styled-components/es/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +37 -0
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.js +5 -0
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +133 -0
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +34 -0
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.js +5 -0
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +133 -0
- package/styled-components/es/examples/sds_engineer/components/TextField/TextField.config.js +37 -0
- package/styled-components/es/examples/sds_engineer/components/TextField/TextField.js +5 -0
- package/styled-components/es/examples/sds_engineer/components/TextField/TextField.stories.tsx +133 -0
- package/styled-components/es/index.js +0 -2
- package/types/components/Cell/Cell.d.ts.map +1 -1
- package/types/components/Combobox/Combobox.styles.d.ts +8 -2
- package/types/components/Combobox/Combobox.styles.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.styles.d.ts +7 -1
- package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
- package/types/components/Popover/Popover.d.ts +2 -2
- package/types/components/Popover/Popover.d.ts.map +1 -1
- package/types/components/Popover/Popover.styles.d.ts.map +1 -1
- package/types/components/Popover/Popover.types.d.ts +19 -12
- package/types/components/Popover/Popover.types.d.ts.map +1 -1
- package/types/components/Select/Select.styles.d.ts +8 -2
- package/types/components/Select/Select.styles.d.ts.map +1 -1
- package/types/components/Select/ui/SelectTarget/SelectTarget.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts +8 -3
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/components/TextField/TextField.styles.d.ts +6 -3
- package/types/components/TextField/TextField.styles.d.ts.map +1 -1
- package/types/components/TextField/TextField.tokens.d.ts +57 -8
- package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
- package/types/components/TextField/TextField.types.d.ts +45 -3
- package/types/components/TextField/TextField.types.d.ts.map +1 -1
- package/types/components/TextField/hooks/index.d.ts +2 -0
- package/types/components/TextField/hooks/index.d.ts.map +1 -0
- package/types/components/TextField/hooks/useKeyNavigation.d.ts +17 -0
- package/types/components/TextField/hooks/useKeyNavigation.d.ts.map +1 -0
- package/types/components/TextField/index.d.ts +3 -2
- package/types/components/TextField/index.d.ts.map +1 -1
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts +7 -0
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts.map +1 -0
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.styles.d.ts +3 -0
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.styles.d.ts.map +1 -0
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.types.d.ts +37 -0
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.types.d.ts.map +1 -0
- package/types/components/TextField/ui/index.d.ts +2 -0
- package/types/components/TextField/ui/index.d.ts.map +1 -0
- package/types/components/TextField/variations/_disabled/base.d.ts.map +1 -0
- package/types/components/TextField/variations/_label-placement/base.d.ts.map +1 -0
- package/types/components/TextField/variations/_label-placement/index.d.ts.map +1 -0
- package/types/components/TextField/variations/_label-placement/inner.d.ts.map +1 -0
- package/types/components/TextField/variations/_label-placement/outer.d.ts.map +1 -0
- package/types/components/TextField/variations/_read-only/base.d.ts.map +1 -0
- package/types/components/TextField/variations/_size/base.d.ts.map +1 -0
- package/types/components/TextField/variations/_view/base.d.ts +2 -0
- package/types/components/TextField/variations/_view/base.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Popover/Popover.d.ts +7 -1
- package/types/examples/plasma_b2c/components/Popover/Popover.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts +32 -0
- package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +26 -0
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Popover/Popover.d.ts +7 -1
- package/types/examples/plasma_web/components/Popover/Popover.d.ts.map +1 -1
- package/types/examples/plasma_web/components/TextField/TextField.config.d.ts +32 -0
- package/types/examples/plasma_web/components/TextField/TextField.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/TextField/TextField.d.ts +26 -0
- package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -0
- package/types/examples/sds_engineer/components/Popover/Popover.d.ts +7 -1
- package/types/examples/sds_engineer/components/Popover/Popover.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/TextField/TextField.config.d.ts +32 -0
- package/types/examples/sds_engineer/components/TextField/TextField.config.d.ts.map +1 -0
- package/types/examples/sds_engineer/components/TextField/TextField.d.ts +26 -0
- package/types/examples/sds_engineer/components/TextField/TextField.d.ts.map +1 -0
- package/types/index.d.ts +0 -2
- package/types/index.d.ts.map +1 -1
- package/cjs/components/Select/ui/SelectDivider/SelectDivider.css +0 -23
- package/cjs/components/Select/ui/SelectDivider/SelectDivider.js +0 -40
- package/cjs/components/Select/ui/SelectDivider/SelectDivider.js.map +0 -1
- package/cjs/components/Select/ui/SelectDivider/SelectDivider.styles.js +0 -12
- package/cjs/components/Select/ui/SelectDivider/SelectDivider.styles.js.map +0 -1
- package/cjs/components/Select/ui/SelectDivider/SelectDivider.styles_673hj6.css +0 -1
- package/cjs/components/Select/ui/SelectDivider/variations/_size/base.js.map +0 -1
- package/cjs/components/Select/ui/SelectDivider/variations/_view/base.js.map +0 -1
- package/cjs/components/Select/ui/SelectFooter/SelectFooter.css +0 -23
- package/cjs/components/Select/ui/SelectFooter/SelectFooter.js +0 -40
- package/cjs/components/Select/ui/SelectFooter/SelectFooter.js.map +0 -1
- package/cjs/components/Select/ui/SelectFooter/SelectFooter.styles.js +0 -12
- package/cjs/components/Select/ui/SelectFooter/SelectFooter.styles.js.map +0 -1
- package/cjs/components/Select/ui/SelectFooter/SelectFooter.styles_11hk6tt.css +0 -1
- package/cjs/components/Select/ui/SelectFooter/variations/_size/base.js.map +0 -1
- package/cjs/components/Select/ui/SelectFooter/variations/_size/base_x642ct.css +0 -1
- package/cjs/components/Select/ui/SelectFooter/variations/_view/base.js.map +0 -1
- package/cjs/components/Select/ui/SelectFooter/variations/_view/base_x642ct.css +0 -1
- package/cjs/components/Select/ui/SelectGroup/SelectGroup.css +0 -23
- package/cjs/components/Select/ui/SelectGroup/SelectGroup.js +0 -40
- package/cjs/components/Select/ui/SelectGroup/SelectGroup.js.map +0 -1
- package/cjs/components/Select/ui/SelectGroup/SelectGroup.styles.js +0 -12
- package/cjs/components/Select/ui/SelectGroup/SelectGroup.styles.js.map +0 -1
- package/cjs/components/Select/ui/SelectGroup/SelectGroup.styles_mktu7e.css +0 -1
- package/cjs/components/Select/ui/SelectGroup/variations/_size/base.js +0 -9
- package/cjs/components/Select/ui/SelectGroup/variations/_size/base.js.map +0 -1
- package/cjs/components/Select/ui/SelectGroup/variations/_size/base_x642ct.css +0 -1
- package/cjs/components/Select/ui/SelectGroup/variations/_view/base.js +0 -9
- package/cjs/components/Select/ui/SelectGroup/variations/_view/base.js.map +0 -1
- package/cjs/components/Select/ui/SelectGroup/variations/_view/base_x642ct.css +0 -1
- package/cjs/components/Select/ui/SelectHeader/SelectHeader.css +0 -23
- package/cjs/components/Select/ui/SelectHeader/SelectHeader.js +0 -40
- package/cjs/components/Select/ui/SelectHeader/SelectHeader.js.map +0 -1
- package/cjs/components/Select/ui/SelectHeader/SelectHeader.styles.js +0 -12
- package/cjs/components/Select/ui/SelectHeader/SelectHeader.styles.js.map +0 -1
- package/cjs/components/Select/ui/SelectHeader/SelectHeader.styles_24gqog.css +0 -1
- package/cjs/components/Select/ui/SelectHeader/variations/_size/base.js +0 -9
- package/cjs/components/Select/ui/SelectHeader/variations/_size/base.js.map +0 -1
- package/cjs/components/Select/ui/SelectHeader/variations/_size/base_x642ct.css +0 -1
- package/cjs/components/Select/ui/SelectHeader/variations/_view/base.js +0 -9
- package/cjs/components/Select/ui/SelectHeader/variations/_view/base.js.map +0 -1
- package/cjs/components/Select/ui/SelectHeader/variations/_view/base_x642ct.css +0 -1
- package/cjs/components/TextField/TextField.styles_2qw1n8.css +0 -5
- package/cjs/components/TextField/TextField_1lzb2r1.css +0 -1
- package/cjs/components/TextField/_disabled/base.js +0 -9
- package/cjs/components/TextField/_disabled/base.js.map +0 -1
- package/cjs/components/TextField/_disabled/base_so3w81.css +0 -1
- package/cjs/components/TextField/_label-placement/base.js.map +0 -1
- package/cjs/components/TextField/_label-placement/base_x642ct.css +0 -1
- package/cjs/components/TextField/_label-placement/inner.js.map +0 -1
- package/cjs/components/TextField/_label-placement/inner_1tyuicp.css +0 -1
- package/cjs/components/TextField/_label-placement/outer.js.map +0 -1
- package/cjs/components/TextField/_label-placement/outer_19ekaek.css +0 -1
- package/cjs/components/TextField/_size/base.js +0 -9
- package/cjs/components/TextField/_size/base.js.map +0 -1
- package/cjs/components/TextField/_size/base_b5smyu.css +0 -1
- package/cjs/components/TextField/_view/base.js +0 -9
- package/cjs/components/TextField/_view/base.js.map +0 -1
- package/cjs/components/TextField/_view/base_5bqzed.css +0 -1
- package/es/components/Select/ui/SelectDivider/SelectDivider.css +0 -23
- package/es/components/Select/ui/SelectDivider/SelectDivider.js +0 -35
- package/es/components/Select/ui/SelectDivider/SelectDivider.js.map +0 -1
- package/es/components/Select/ui/SelectDivider/SelectDivider.styles.js +0 -7
- package/es/components/Select/ui/SelectDivider/SelectDivider.styles.js.map +0 -1
- package/es/components/Select/ui/SelectDivider/SelectDivider.styles_673hj6.css +0 -1
- package/es/components/Select/ui/SelectDivider/variations/_size/base.js.map +0 -1
- package/es/components/Select/ui/SelectDivider/variations/_size/base_x642ct.css +0 -1
- package/es/components/Select/ui/SelectDivider/variations/_view/base.js +0 -5
- package/es/components/Select/ui/SelectDivider/variations/_view/base.js.map +0 -1
- package/es/components/Select/ui/SelectDivider/variations/_view/base_x642ct.css +0 -1
- package/es/components/Select/ui/SelectFooter/SelectFooter.css +0 -23
- package/es/components/Select/ui/SelectFooter/SelectFooter.js +0 -35
- package/es/components/Select/ui/SelectFooter/SelectFooter.js.map +0 -1
- package/es/components/Select/ui/SelectFooter/SelectFooter.styles.js +0 -7
- package/es/components/Select/ui/SelectFooter/SelectFooter.styles.js.map +0 -1
- package/es/components/Select/ui/SelectFooter/SelectFooter.styles_11hk6tt.css +0 -1
- package/es/components/Select/ui/SelectFooter/variations/_size/base.js +0 -5
- package/es/components/Select/ui/SelectFooter/variations/_size/base.js.map +0 -1
- package/es/components/Select/ui/SelectFooter/variations/_size/base_x642ct.css +0 -1
- package/es/components/Select/ui/SelectFooter/variations/_view/base.js +0 -5
- package/es/components/Select/ui/SelectFooter/variations/_view/base.js.map +0 -1
- package/es/components/Select/ui/SelectFooter/variations/_view/base_x642ct.css +0 -1
- package/es/components/Select/ui/SelectGroup/SelectGroup.css +0 -23
- package/es/components/Select/ui/SelectGroup/SelectGroup.js +0 -35
- package/es/components/Select/ui/SelectGroup/SelectGroup.js.map +0 -1
- package/es/components/Select/ui/SelectGroup/SelectGroup.styles.js +0 -7
- package/es/components/Select/ui/SelectGroup/SelectGroup.styles.js.map +0 -1
- package/es/components/Select/ui/SelectGroup/SelectGroup.styles_mktu7e.css +0 -1
- package/es/components/Select/ui/SelectGroup/variations/_size/base.js +0 -5
- package/es/components/Select/ui/SelectGroup/variations/_size/base.js.map +0 -1
- package/es/components/Select/ui/SelectGroup/variations/_size/base_x642ct.css +0 -1
- package/es/components/Select/ui/SelectGroup/variations/_view/base.js +0 -5
- package/es/components/Select/ui/SelectGroup/variations/_view/base.js.map +0 -1
- package/es/components/Select/ui/SelectGroup/variations/_view/base_x642ct.css +0 -1
- package/es/components/Select/ui/SelectHeader/SelectHeader.css +0 -23
- package/es/components/Select/ui/SelectHeader/SelectHeader.js +0 -35
- package/es/components/Select/ui/SelectHeader/SelectHeader.js.map +0 -1
- package/es/components/Select/ui/SelectHeader/SelectHeader.styles.js +0 -7
- package/es/components/Select/ui/SelectHeader/SelectHeader.styles.js.map +0 -1
- package/es/components/Select/ui/SelectHeader/SelectHeader.styles_24gqog.css +0 -1
- package/es/components/Select/ui/SelectHeader/variations/_size/base.js +0 -5
- package/es/components/Select/ui/SelectHeader/variations/_size/base.js.map +0 -1
- package/es/components/Select/ui/SelectHeader/variations/_size/base_x642ct.css +0 -1
- package/es/components/Select/ui/SelectHeader/variations/_view/base.js +0 -5
- package/es/components/Select/ui/SelectHeader/variations/_view/base.js.map +0 -1
- package/es/components/Select/ui/SelectHeader/variations/_view/base_x642ct.css +0 -1
- package/es/components/TextField/TextField.styles_2qw1n8.css +0 -5
- package/es/components/TextField/TextField_1lzb2r1.css +0 -1
- package/es/components/TextField/_disabled/base.js +0 -5
- package/es/components/TextField/_disabled/base.js.map +0 -1
- package/es/components/TextField/_disabled/base_so3w81.css +0 -1
- package/es/components/TextField/_label-placement/base.js.map +0 -1
- package/es/components/TextField/_label-placement/base_x642ct.css +0 -1
- package/es/components/TextField/_label-placement/inner.js +0 -5
- package/es/components/TextField/_label-placement/inner.js.map +0 -1
- package/es/components/TextField/_label-placement/inner_1tyuicp.css +0 -1
- package/es/components/TextField/_label-placement/outer.js +0 -5
- package/es/components/TextField/_label-placement/outer.js.map +0 -1
- package/es/components/TextField/_label-placement/outer_19ekaek.css +0 -1
- package/es/components/TextField/_size/base.js +0 -5
- package/es/components/TextField/_size/base.js.map +0 -1
- package/es/components/TextField/_size/base_b5smyu.css +0 -1
- package/es/components/TextField/_view/base.js +0 -5
- package/es/components/TextField/_view/base.js.map +0 -1
- package/es/components/TextField/_view/base_5bqzed.css +0 -1
- package/styled-components/cjs/components/TextField/_disabled/base.js +0 -9
- package/styled-components/cjs/components/TextField/_label-placement/inner.js +0 -10
- package/styled-components/cjs/components/TextField/_size/base.js +0 -10
- package/styled-components/cjs/components/TextField/_view/base.js +0 -10
- package/styled-components/es/components/TextField/_disabled/base.js +0 -3
- package/styled-components/es/components/TextField/_label-placement/inner.js +0 -4
- package/styled-components/es/components/TextField/_label-placement/outer.js +0 -4
- package/styled-components/es/components/TextField/_size/base.js +0 -4
- package/styled-components/es/components/TextField/_view/base.js +0 -4
- package/types/components/TextField/_disabled/base.d.ts.map +0 -1
- package/types/components/TextField/_label-placement/base.d.ts.map +0 -1
- package/types/components/TextField/_label-placement/index.d.ts.map +0 -1
- package/types/components/TextField/_label-placement/inner.d.ts.map +0 -1
- package/types/components/TextField/_label-placement/outer.d.ts.map +0 -1
- package/types/components/TextField/_size/base.d.ts.map +0 -1
- package/types/components/TextField/_view/base.d.ts.map +0 -1
- /package/cjs/components/{Select/ui/SelectDivider/variations/_size → TextField/variations/_label-placement}/base_x642ct.css +0 -0
- /package/{cjs/components/Select/ui/SelectDivider/variations/_view → es/components/TextField/variations/_label-placement}/base_x642ct.css +0 -0
- /package/styled-components/cjs/components/TextField/{_disabled → variations/_disabled}/tokens.json +0 -0
- /package/styled-components/cjs/components/TextField/{_label-placement → variations/_label-placement}/base.js +0 -0
- /package/styled-components/cjs/components/TextField/{_label-placement → variations/_label-placement}/index.js +0 -0
- /package/styled-components/cjs/components/TextField/{_size → variations/_size}/tokens.json +0 -0
- /package/styled-components/cjs/components/TextField/{_view → variations/_view}/tokens.json +0 -0
- /package/styled-components/es/components/TextField/{_disabled → variations/_disabled}/tokens.json +0 -0
- /package/styled-components/es/components/TextField/{_label-placement → variations/_label-placement}/base.js +0 -0
- /package/styled-components/es/components/TextField/{_label-placement → variations/_label-placement}/index.js +0 -0
- /package/styled-components/es/components/TextField/{_size → variations/_size}/tokens.json +0 -0
- /package/styled-components/es/components/TextField/{_view → variations/_view}/tokens.json +0 -0
- /package/types/components/TextField/{_disabled → variations/_disabled}/base.d.ts +0 -0
- /package/types/components/TextField/{_label-placement → variations/_label-placement}/base.d.ts +0 -0
- /package/types/components/TextField/{_label-placement → variations/_label-placement}/index.d.ts +0 -0
- /package/types/components/TextField/{_label-placement → variations/_label-placement}/inner.d.ts +0 -0
- /package/types/components/TextField/{_label-placement → variations/_label-placement}/outer.d.ts +0 -0
- /package/types/components/TextField/{_size → variations/_read-only}/base.d.ts +0 -0
- /package/types/components/TextField/{_view → variations/_size}/base.d.ts +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popover.js","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import React, { useRef, useCallback, useEffect, useState, forwardRef } from 'react';\nimport type { CSSProperties } from 'react';\nimport ReactDOM from 'react-dom';\nimport { usePopper } from 'react-popper';\nimport { useFocusTrap, useForkRef } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines/types';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport type { PopoverPlacement, PopoverProps } from './Popover.types';\nimport { StyledArrow, StyledPopover, StyledRoot, StyledWrapper } from './Popover.styles';\nimport { classes } from './Popover.tokens';\n\nexport const ESCAPE_KEYCODE = 27;\nexport const POPOVER_PORTAL_ID = 'plasma-popover-root';\n\n/**\n * Всплывающее окно с возможностью позиционирования\n * и вызова по клику либо ховеру.\n */\nexport const popoverRoot = (Root: RootProps<HTMLDivElement, PopoverProps>) =>\n forwardRef<HTMLDivElement, PopoverProps>(\n (\n {\n target,\n children,\n isOpen,\n trigger = 'click',\n hasArrow,\n frame = 'document',\n className,\n placement = 'auto',\n offset = [0, 0],\n zIndex,\n isFocusTrapped = true,\n closeOnEsc = true,\n preventOverflow = true,\n usePortal = false,\n view,\n onToggle,\n closeOnOverlayClick,\n ...rest\n },\n outerRootRef,\n ) => {\n const rootRef = useRef<HTMLDivElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n const portalRef = useRef<HTMLElement | null>(null);\n\n const trapRef = useFocusTrap(isOpen && isFocusTrapped);\n\n const popoverForkRef = useForkRef<HTMLDivElement>(popoverRef, trapRef);\n\n const [arrowElement, setArrowElement] = useState<HTMLSpanElement | null>(null);\n\n const [, forceRender] = useState(false);\n\n const isAutoArray = Array.isArray(placement);\n const isAuto = isAutoArray || (placement as PopoverPlacement).startsWith('auto');\n\n const initialStyles = {\n visibility: isOpen ? 'visible' : 'hidden',\n opacity: isOpen ? 1 : 0,\n } as CSSProperties;\n\n const { styles, attributes, forceUpdate } = usePopper(rootRef.current, popoverRef.current, {\n // TODO: #1121\n // eslint-disable-next-line no-nested-ternary\n placement: isAutoArray\n ? placement[0]?.endsWith('start')\n ? 'auto-start'\n : 'auto'\n : (placement as PopoverPlacement),\n modifiers: [\n {\n name: 'preventOverflow',\n options: {\n mainAxis: preventOverflow,\n },\n },\n { name: 'offset', options: { offset: [offset[0], offset[1]] } },\n {\n name: 'flip',\n enabled: isAuto,\n options: {\n allowedAutoPlacements: isAutoArray ? (placement as PopoverPlacement[]) : [],\n },\n },\n {\n name: 'arrow',\n options: {\n element: arrowElement,\n },\n },\n ],\n });\n\n const onEscape = useCallback(\n (event: KeyboardEvent) => {\n if (isOpen && closeOnEsc && event.keyCode === ESCAPE_KEYCODE) {\n onToggle?.(false, event);\n }\n },\n [closeOnEsc, isOpen, onToggle],\n );\n\n const onDocumentClick = useCallback(\n (event: MouseEvent) => {\n if (isOpen && closeOnOverlayClick && onToggle) {\n const targetIsRoot = event.target === rootRef.current;\n const rootHasTarget = rootRef.current?.contains(event.target as Element);\n\n if (!targetIsRoot && !rootHasTarget) {\n onToggle(false, event);\n }\n }\n },\n [closeOnOverlayClick, isOpen, onToggle],\n );\n\n const onClick = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'click') {\n const targetIsPopover = event.target === popoverRef.current;\n const rootHasTarget = popoverRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n onToggle?.(!isOpen, event);\n }\n }\n },\n [trigger, isOpen, onToggle],\n );\n\n const onMouseEnter = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onMouseLeave = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onFocus = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onBlur = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n useEffect(() => {\n document.addEventListener('click', onDocumentClick);\n return () => document.removeEventListener('click', onDocumentClick);\n }, [isOpen, onToggle]);\n\n useEffect(() => {\n window.addEventListener('keydown', onEscape);\n return () => window.removeEventListener('keydown', onEscape);\n }, [closeOnEsc, isOpen, onToggle]);\n\n useEffect(() => {\n let portal = document.getElementById(POPOVER_PORTAL_ID);\n\n if (typeof frame !== 'string' && frame && frame.current) {\n portal = frame.current;\n }\n\n if (!usePortal) {\n portal = rootRef.current;\n }\n\n if (!portal) {\n portal = document.createElement('div');\n portal.setAttribute('id', POPOVER_PORTAL_ID);\n\n if (typeof frame === 'string' && frame !== 'document') {\n document.getElementById(frame)?.appendChild(portal);\n } else {\n document.body.appendChild(portal);\n }\n }\n\n portalRef.current = portal;\n\n /**\n * Изменение стейта нужно для того, чтобы Popup\n * отобразился после записи DOM элемента в portalRef.current\n */\n forceRender(true);\n }, []);\n\n useEffect(() => {\n if (!isOpen || !forceUpdate) {\n return;\n }\n\n /*\n * INFO: Метод forceUpdate содержит в себе flushSync и приводит\n * к повторному рендеру компонента, который уже находится в процессе рендера.\n * Данный хак, нужен для того, чтобы это поведение избежать и перенаправить\n * вызов метода в очередь микрозадач.\n */\n Promise.resolve().then(forceUpdate);\n }, [isOpen, children, forceUpdate]);\n\n return (\n <StyledWrapper className={classes.wrapper} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>\n <StyledRoot\n ref={handleRef}\n onClick={onClick}\n onFocus={onFocus}\n onBlur={onBlur}\n className={cx(className, classes.target)}\n >\n {target}\n </StyledRoot>\n {children &&\n portalRef.current &&\n ReactDOM.createPortal(\n <Root view={view} className={className} {...rest}>\n <StyledPopover\n {...attributes.popper}\n className={classes.root}\n ref={popoverForkRef}\n style={{\n ...styles.popper,\n ...{ display: isOpen ? 'block' : 'none' },\n ...initialStyles,\n }}\n zIndex={zIndex}\n >\n {hasArrow && (\n <StyledArrow\n className={classes.arrow}\n ref={setArrowElement}\n style={styles.arrow}\n {...attributes.arrow}\n />\n )}\n {children}\n </StyledPopover>\n </Root>,\n portalRef.current,\n )}\n </StyledWrapper>\n );\n },\n );\n\nexport const popoverConfig = {\n name: 'Popover',\n tag: 'div',\n layout: popoverRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'default',\n },\n};\n"],"names":["ESCAPE_KEYCODE","POPOVER_PORTAL_ID","popoverRoot","Root","forwardRef","_ref","outerRootRef","_placement$","target","children","isOpen","_ref$trigger","trigger","hasArrow","_ref$frame","frame","className","_ref$placement","placement","_ref$offset","offset","zIndex","_ref$isFocusTrapped","isFocusTrapped","_ref$closeOnEsc","closeOnEsc","_ref$preventOverflow","preventOverflow","_ref$usePortal","usePortal","view","onToggle","closeOnOverlayClick","rest","_objectWithoutProperties","_excluded","rootRef","useRef","popoverRef","handleRef","useForkRef","portalRef","trapRef","useFocusTrap","popoverForkRef","_useState","useState","_useState2","_slicedToArray","arrowElement","setArrowElement","_useState3","_useState4","forceRender","isAutoArray","Array","isArray","isAuto","startsWith","initialStyles","visibility","opacity","_usePopper","usePopper","current","endsWith","modifiers","name","options","mainAxis","enabled","allowedAutoPlacements","element","styles","attributes","forceUpdate","onEscape","useCallback","event","keyCode","onDocumentClick","_rootRef$current","targetIsRoot","rootHasTarget","contains","onClick","_popoverRef$current","targetIsPopover","onMouseEnter","onMouseLeave","onFocus","onBlur","useEffect","document","addEventListener","removeEventListener","window","portal","getElementById","createElement","setAttribute","_document$getElementB","appendChild","body","Promise","resolve","then","React","StyledWrapper","classes","wrapper","StyledRoot","ref","cx","ReactDOM","createPortal","_extends","StyledPopover","popper","root","style","_objectSpread","display","StyledArrow","arrow","popoverConfig","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;AAcO,IAAMA,cAAc,GAAG,GAAE;AACzB,IAAMC,iBAAiB,GAAG,sBAAqB;;AAEtD;AACA;AACA;AACA;IACaC,WAAW,GAAG,SAAdA,WAAWA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBACrEC,UAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA,IAAA,IAAAC,WAAA,CAAA;AAAA,IAA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GAAG,EAAE9D,eAAgB;MACrBsE,KAAK,EAAE/C,MAAM,CAACmD,KAAAA;AAAM,KAAA,EAChBlD,UAAU,CAACkD,KAAK,CACvB,CACJ,EACAnH,QACU,CACb,CAAC,EACPgC,SAAS,CAACuB,OACd,CACO,CAAC,CAAA;AAExB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM6D,aAAa,GAAG;AACzB1D,EAAAA,IAAI,EAAE,SAAS;AACf2D,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE7H,WAAW;AACnB8H,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRnG,IAAAA,IAAI,EAAE;AACFoG,MAAAA,GAAG,EAAEC,IAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNtG,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;"}
|
1
|
+
{"version":3,"file":"Popover.js","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import React, { useRef, useCallback, useEffect, useState, forwardRef } from 'react';\nimport type { CSSProperties } from 'react';\nimport ReactDOM from 'react-dom';\nimport { usePopper } from 'react-popper';\nimport { useFocusTrap, useForkRef } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines/types';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport type { PopoverPlacement, PopoverProps } from './Popover.types';\nimport { StyledArrow, StyledPopover, StyledRoot, StyledWrapper } from './Popover.styles';\nimport { classes } from './Popover.tokens';\n\nexport const ESCAPE_KEYCODE = 27;\nexport const POPOVER_PORTAL_ID = 'plasma-popover-root';\n\n/**\n * Всплывающее окно с возможностью позиционирования\n * и вызова по клику либо ховеру.\n */\nexport const popoverRoot = (Root: RootProps<HTMLDivElement, PopoverProps>) =>\n forwardRef<HTMLDivElement, PopoverProps>((props, outerRootRef) => {\n const {\n target,\n children,\n isOpen,\n trigger = 'click',\n hasArrow,\n frame = 'document',\n className,\n placement = 'auto',\n offset = [0, 0],\n zIndex,\n isFocusTrapped = true,\n closeOnEsc = true,\n preventOverflow = true,\n usePortal = false,\n view,\n onToggle,\n ...rest\n } = props;\n\n let closeOnOverlayClick = true;\n let closeOnBeyondTargetHover = true;\n\n if (props.trigger === 'click' && props.closeOnOverlayClick === false) {\n closeOnOverlayClick = false;\n }\n if (props.trigger === 'hover' && props.closeOnBeyondTargetHover === false) {\n closeOnBeyondTargetHover = false;\n }\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n const portalRef = useRef<HTMLElement | null>(null);\n\n const trapRef = useFocusTrap(isOpen && isFocusTrapped);\n\n const popoverForkRef = useForkRef<HTMLDivElement>(popoverRef, trapRef);\n\n const [arrowElement, setArrowElement] = useState<HTMLSpanElement | null>(null);\n\n const [, forceRender] = useState(false);\n\n const isAutoArray = Array.isArray(placement);\n const isAuto = isAutoArray || (placement as PopoverPlacement).startsWith('auto');\n\n const initialStyles = {\n visibility: isOpen ? 'visible' : 'hidden',\n opacity: isOpen ? 1 : 0,\n } as CSSProperties;\n\n const { styles, attributes, forceUpdate } = usePopper(rootRef.current, popoverRef.current, {\n // TODO: #1121\n // eslint-disable-next-line no-nested-ternary\n placement: isAutoArray\n ? placement[0]?.endsWith('start')\n ? 'auto-start'\n : 'auto'\n : (placement as PopoverPlacement),\n modifiers: [\n {\n name: 'preventOverflow',\n options: {\n mainAxis: preventOverflow,\n },\n },\n { name: 'offset', options: { offset: [offset[0], offset[1]] } },\n {\n name: 'flip',\n enabled: isAuto,\n options: {\n allowedAutoPlacements: isAutoArray ? (placement as PopoverPlacement[]) : [],\n },\n },\n {\n name: 'arrow',\n options: {\n element: arrowElement,\n },\n },\n ],\n });\n\n const onEscape = useCallback(\n (event: KeyboardEvent) => {\n if (isOpen && closeOnEsc && event.keyCode === ESCAPE_KEYCODE) {\n onToggle?.(false, event);\n }\n },\n [closeOnEsc, isOpen, onToggle],\n );\n\n const onDocumentClick = useCallback(\n (event: MouseEvent) => {\n if (isOpen && closeOnOverlayClick && onToggle) {\n const targetIsRoot = event.target === rootRef.current;\n const rootHasTarget = rootRef.current?.contains(event.target as Element);\n\n if (!targetIsRoot && !rootHasTarget) {\n onToggle(false, event);\n }\n }\n },\n [closeOnOverlayClick, isOpen, onToggle],\n );\n\n const onClick = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'click') {\n const targetIsPopover = event.target === popoverRef.current;\n const rootHasTarget = popoverRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n onToggle?.(!isOpen, event);\n }\n }\n },\n [trigger, isOpen, onToggle],\n );\n\n const onMouseEnter = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onMouseLeave = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onFocus = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onBlur = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n useEffect(() => {\n document.addEventListener('click', onDocumentClick);\n return () => document.removeEventListener('click', onDocumentClick);\n }, [closeOnOverlayClick, isOpen, onToggle]);\n\n useEffect(() => {\n window.addEventListener('keydown', onEscape);\n return () => window.removeEventListener('keydown', onEscape);\n }, [closeOnEsc, isOpen, onToggle]);\n\n useEffect(() => {\n let portal = document.getElementById(POPOVER_PORTAL_ID);\n\n if (typeof frame !== 'string' && frame && frame.current) {\n portal = frame.current;\n }\n\n if (!usePortal) {\n portal = rootRef.current;\n }\n\n if (!portal) {\n portal = document.createElement('div');\n portal.setAttribute('id', POPOVER_PORTAL_ID);\n\n if (typeof frame === 'string' && frame !== 'document') {\n document.getElementById(frame)?.appendChild(portal);\n } else {\n document.body.appendChild(portal);\n }\n }\n\n portalRef.current = portal;\n\n /**\n * Изменение стейта нужно для того, чтобы Popup\n * отобразился после записи DOM элемента в portalRef.current\n */\n forceRender(true);\n }, []);\n\n useEffect(() => {\n if (!isOpen || !forceUpdate) {\n return;\n }\n\n /*\n * INFO: Метод forceUpdate содержит в себе flushSync и приводит\n * к повторному рендеру компонента, который уже находится в процессе рендера.\n * Данный хак, нужен для того, чтобы это поведение избежать и перенаправить\n * вызов метода в очередь микрозадач.\n */\n Promise.resolve().then(forceUpdate);\n }, [isOpen, children, forceUpdate]);\n\n return (\n <StyledWrapper className={classes.wrapper}>\n <StyledRoot\n ref={handleRef}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onFocus={onFocus}\n onBlur={onBlur}\n className={cx(className, classes.target)}\n >\n {target}\n </StyledRoot>\n {children &&\n portalRef.current &&\n ReactDOM.createPortal(\n <Root\n view={view}\n className={className}\n {...rest}\n onMouseEnter={closeOnBeyondTargetHover ? undefined : onMouseEnter}\n onMouseLeave={closeOnBeyondTargetHover ? undefined : onMouseEnter}\n >\n <StyledPopover\n {...attributes.popper}\n className={classes.root}\n ref={popoverForkRef}\n style={{\n ...styles.popper,\n ...{ display: isOpen ? 'block' : 'none' },\n ...initialStyles,\n }}\n zIndex={zIndex}\n >\n {hasArrow && (\n <StyledArrow\n className={classes.arrow}\n ref={setArrowElement}\n style={styles.arrow}\n {...attributes.arrow}\n />\n )}\n {children}\n </StyledPopover>\n </Root>,\n portalRef.current,\n )}\n </StyledWrapper>\n );\n });\n\nexport const popoverConfig = {\n name: 'Popover',\n tag: 'div',\n layout: popoverRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'default',\n },\n};\n"],"names":["ESCAPE_KEYCODE","POPOVER_PORTAL_ID","popoverRoot","Root","forwardRef","props","outerRootRef","_placement$","target","children","isOpen","_props$trigger","trigger","hasArrow","_props$frame","frame","className","_props$placement","placement","_props$offset","offset","zIndex","_props$isFocusTrapped","isFocusTrapped","_props$closeOnEsc","closeOnEsc","_props$preventOverflo","preventOverflow","_props$usePortal","usePortal","view","onToggle","rest","_objectWithoutProperties","_excluded","closeOnOverlayClick","closeOnBeyondTargetHover","rootRef","useRef","popoverRef","handleRef","useForkRef","portalRef","trapRef","useFocusTrap","popoverForkRef","_useState","useState","_useState2","_slicedToArray","arrowElement","setArrowElement","_useState3","_useState4","forceRender","isAutoArray","Array","isArray","isAuto","startsWith","initialStyles","visibility","opacity","_usePopper","usePopper","current","endsWith","modifiers","name","options","mainAxis","enabled","allowedAutoPlacements","element","styles","attributes","forceUpdate","onEscape","useCallback","event","keyCode","onDocumentClick","_rootRef$current","targetIsRoot","rootHasTarget","contains","onClick","_popoverRef$current","targetIsPopover","onMouseEnter","onMouseLeave","onFocus","onBlur","useEffect","document","addEventListener","removeEventListener","window","portal","getElementById","createElement","setAttribute","_document$getElementB","appendChild","body","Promise","resolve","then","React","StyledWrapper","classes","wrapper","StyledRoot","ref","cx","ReactDOM","createPortal","_extends","undefined","StyledPopover","popper","root","style","_objectSpread","display","StyledArrow","arrow","popoverConfig","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;AAcO,IAAMA,cAAc,GAAG,GAAE;AACzB,IAAMC,iBAAiB,GAAG,sBAAqB;;AAEtD;AACA;AACA;AACA;IACaC,WAAW,GAAG,SAAdA,WAAWA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBACrEC,UAAU,CAA+B,UAACC,KAAK,EAAEC,YAAY,EAAK;AAAA,IAAA,IAAAC,WAAA,CAAA;AAC9D,IAAA,IACIC,MAAM,GAiBNH,KAAK,CAjBLG,MAAM;MACNC,QAAQ,GAgBRJ,KAAK,CAhBLI,QAAQ;MACRC,MAAM,GAeNL,KAAK,CAfLK,MAAM;MAAAC,cAAA,GAe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AAA,CAAAA,cAAA,CAAAA,cAAA,CACEjD,EAAAA,EAAAA,MAAM,CAAC8C,MAAM,CACb,EAAA;AAAEI,QAAAA,OAAO,EAAElH,MAAM,GAAG,OAAO,GAAG,MAAA;OAAQ,CAAA,EACtCkD,aAAa,CAClB;AACFvC,MAAAA,MAAM,EAAEA,MAAAA;KAEPR,CAAAA,EAAAA,QAAQ,iBACL+F,KAAA,CAAAR,aAAA,CAACyB,WAAW,EAAAR,QAAA,CAAA;MACRrG,SAAS,EAAE8F,OAAO,CAACgB,KAAM;AACzBb,MAAAA,GAAG,EAAE9D,eAAgB;MACrBuE,KAAK,EAAEhD,MAAM,CAACoD,KAAAA;AAAM,KAAA,EAChBnD,UAAU,CAACmD,KAAK,CACvB,CACJ,EACArH,QACU,CACb,CAAC,EACPiC,SAAS,CAACuB,OACd,CACO,CAAC,CAAA;AAExB,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAM8D,aAAa,GAAG;AACzB3D,EAAAA,IAAI,EAAE,SAAS;AACf4D,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE/H,WAAW;AACnBgI,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRrG,IAAAA,IAAI,EAAE;AACFsG,MAAAA,GAAG,EAAEC,IAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNxG,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popover.styles.js","sources":["../../../src/components/Popover/Popover.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { DEFAULT_Z_INDEX } from '../Popup/utils';\n\nimport { classes, tokens } from './Popover.tokens';\nimport { PopoverProps } from './Popover.types';\n\nexport const StyledWrapper = styled.div
|
1
|
+
{"version":3,"file":"Popover.styles.js","sources":["../../../src/components/Popover/Popover.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { DEFAULT_Z_INDEX } from '../Popup/utils';\n\nimport { classes, tokens } from './Popover.tokens';\nimport { PopoverProps } from './Popover.types';\n\nexport const StyledWrapper = styled.div``;\nexport const StyledRoot = styled.div`\n display: inline-flex;\n box-sizing: border-box;\n position: relative;\n`;\n\nexport const StyledArrow = styled.div`\n width: var(${String(tokens.arrowMaskWidth)});\n height: var(${String(tokens.arrowMaskHeight)});\n\n &::before {\n position: absolute;\n width: var(${String(tokens.arrowMaskWidth)});\n height: var(${String(tokens.arrowMaskHeight)});\n mask-image: var(${String(tokens.arrowMaskImage)});\n background: var(${String(tokens.arrowBackground)});\n\n content: '';\n transform: rotate(0deg);\n }\n`;\n\nexport const StyledPopover = styled.div<Pick<PopoverProps, 'zIndex'>>`\n position: absolute;\n z-index: ${({ zIndex }) => zIndex || DEFAULT_Z_INDEX};\n\n &[data-popper-placement^='top'] > .${classes.arrow} {\n bottom: calc(0px - var(${String(tokens.arrowHeight)}));\n }\n\n &[data-popper-placement^='bottom'] > .${classes.arrow} {\n top: calc(0px - var(${String(tokens.arrowHeight)}));\n &::before {\n transform: rotate(180deg);\n }\n }\n\n &[data-popper-placement^='left'] > .${classes.arrow} {\n right: calc(0px - var(${String(tokens.arrowHeight)}));\n &::before {\n transform: rotate(-90deg);\n }\n }\n\n &[data-popper-placement^='right'] > .${classes.arrow} {\n left: calc(0px - var(${String(tokens.arrowHeight)}));\n &::before {\n transform: rotate(90deg);\n }\n }\n\n &[data-popper-placement^='top-start'] > .${classes.arrow} {\n bottom: calc(0px - var(${String(tokens.arrowHeight)}));\n left: var(${String(tokens.arrowEdgeMargin)}) !important;\n transform: unset !important;\n }\n\n &[data-popper-placement^='top-end'] > .${classes.arrow} {\n bottom: calc(0px - var(${String(tokens.arrowHeight)}));\n left: unset !important;\n right: var(${String(tokens.arrowEdgeMargin)}) !important;\n transform: unset !important;\n }\n\n &[data-popper-placement^='bottom-start'] > .${classes.arrow} {\n top: calc(0px - var(${String(tokens.arrowHeight)}));\n left: var(${String(tokens.arrowEdgeMargin)}) !important;\n transform: unset !important;\n\n &::before {\n transform: rotate(180deg);\n }\n }\n\n &[data-popper-placement^='bottom-end'] > .${classes.arrow} {\n top: calc(0px - var(${String(tokens.arrowHeight)}));\n left: unset !important;\n right: var(${String(tokens.arrowEdgeMargin)}) !important;\n transform: unset !important;\n\n &::before {\n transform: rotate(180deg);\n }\n }\n`;\n"],"names":["StyledWrapper","styled","name","class","propsAsIs","StyledRoot","StyledArrow","_exp7","_ref","zIndex","DEFAULT_Z_INDEX","StyledPopover","vars"],"mappings":";;;AAOO,IAAMA,aAAa,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAAM,EAAA;AAClC,IAAMC,UAAU,gBAAGJ,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAI/B,EAAA;AAEM,IAAME,WAAW,gBAAGL,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAchC,EAAA;AAAC,IAAAG,KAAA,GA3BgBA,SA2BhBA,KAAAA,GAAA;AAAA,EAAA,OAIa,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,MAAAA,GAAAA,IAAAA,CAAAA,MAAAA,CAAAA;IAAAA,OAAaA,MAAM,IAAIC,eAAe,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAFjD,IAAMC,aAAa,gBAAGV,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAQ,EAAAA,IAAA,EAAA;AAAA,IAAA,YAAA,EAAA,cAEpBL,KAAyC,EAAA,CAAA;AAAA,GAAA;AAAA,CA4DvD;;;;"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
|
2
2
|
.s12xwbyh{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;box-sizing:border-box;position:relative;}
|
3
3
|
.s1pd4d8a{width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);}.s1pd4d8a::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);}
|
4
4
|
.s16xlixz{position:absolute;z-index:var(--s16xlixz-0);}.s16xlixz[data-popper-placement^='top'] > .popover-arrow{bottom:calc(0px - var(--plasma-popover-arrow-height));}.s16xlixz[data-popper-placement^='bottom'] > .popover-arrow{top:calc(0px - var(--plasma-popover-arrow-height));}.s16xlixz[data-popper-placement^='bottom'] > .popover-arrow::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.s16xlixz[data-popper-placement^='left'] > .popover-arrow{right:calc(0px - var(--plasma-popover-arrow-height));}.s16xlixz[data-popper-placement^='left'] > .popover-arrow::before{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.s16xlixz[data-popper-placement^='right'] > .popover-arrow{left:calc(0px - var(--plasma-popover-arrow-height));}.s16xlixz[data-popper-placement^='right'] > .popover-arrow::before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.s16xlixz[data-popper-placement^='top-start'] > .popover-arrow{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;}.s16xlixz[data-popper-placement^='top-end'] > .popover-arrow{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;}.s16xlixz[data-popper-placement^='bottom-start'] > .popover-arrow{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;}.s16xlixz[data-popper-placement^='bottom-start'] > .popover-arrow::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.s16xlixz[data-popper-placement^='bottom-end'] > .popover-arrow{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;}.s16xlixz[data-popper-placement^='bottom-end'] > .popover-arrow::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}
|
@@ -75,12 +75,12 @@
|
|
75
75
|
.SelectTarget_styles_hb1tns_s11wt6x2__864110c9{overflow:visible;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-select-chip-gap);position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
76
76
|
.SelectTarget_styles_hb1tns_s1xu52l7__864110c9{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;position:absolute;pointer-events:none;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transition:all 0.1s ease-in-out;transition:all 0.1s ease-in-out;-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;width:100%;height:auto;color:var(--plasma-select-target-label-color);font-family:var(--plasma-select-target-font-family);font-size:var(--plasma-select-target-font-size);font-style:var(--plasma-select-target-font-style);font-weight:var(--plasma-select-target-font-weight);-webkit-letter-spacing:var(--plasma-select-target-letter-spacing);-moz-letter-spacing:var(--plasma-select-target-letter-spacing);-ms-letter-spacing:var(--plasma-select-target-letter-spacing);letter-spacing:var(--plasma-select-target-letter-spacing);line-height:var(--plasma-select-target-line-height);}
|
77
77
|
|
78
|
-
|
79
|
-
.
|
80
|
-
.
|
81
|
-
.
|
82
|
-
|
83
|
-
.
|
84
|
-
.
|
85
|
-
.
|
86
|
-
.
|
78
|
+
|
79
|
+
.Popover_styles_1rk9t6z_s12xwbyh__96f55a53{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;box-sizing:border-box;position:relative;}
|
80
|
+
.Popover_styles_1rk9t6z_s1pd4d8a__96f55a53{width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);}.Popover_styles_1rk9t6z_s1pd4d8a__96f55a53::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);}
|
81
|
+
.Popover_styles_1rk9t6z_s16xlixz__96f55a53{position:absolute;z-index:var(--s16xlixz-0);}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='top'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{bottom:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='bottom'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{top:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='bottom'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='left'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{right:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='left'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53::before{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='right'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{left:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='right'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53::before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='top-start'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{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_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='top-end'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{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_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='bottom-start'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{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_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='bottom-start'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='bottom-end'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{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_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='bottom-end'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}
|
82
|
+
|
83
|
+
.Select_styles_ls547o_spxbau6__1b68d3c1{width:100%;position:relative;}.Select_styles_ls547o_spxbau6__1b68d3c1 .Select_styles_ls547o_nativeSelectVisible__1b68d3c1{display:block;}
|
84
|
+
.Select_styles_ls547o_s1yey2x3__1b68d3c1{box-sizing:border-box;overflow-y:auto;background:var(--plasma-select-background);box-shadow:var(--plasma-select-box-shadow);border-radius:var(--plasma-select-border-radius);width:var(--plasma-select-width);height:var(--plasma-select-height);padding:var(--plasma-select-padding-top) var(--plasma-select-padding-right) var(--plasma-select-padding-bottom) var(--plasma-select-padding-left);}
|
85
|
+
.Select_styles_ls547o_svro45w__1b68d3c1{display:block;}.Select_styles_ls547o_svro45w__1b68d3c1 .Select_styles_ls547o_popoverRoot__1b68d3c1,.Select_styles_ls547o_svro45w__1b68d3c1 .Select_styles_ls547o_popoverTarget__1b68d3c1{width:var(--svro45w-0);}
|
86
|
+
.Select_styles_ls547o_sgpldc9__1b68d3c1{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-moz-appearance:none;-webkit-appearance:none;background:transparent;color:transparent;border:none;outline:none;opacity:1;position:absolute;inset:-0.125rem;z-index:1;cursor:var(--sgpldc9-0);font-size:1rem;}.Select_styles_ls547o_sgpldc9__1b68d3c1:hover:not(:disabled) + .Select_styles_ls547o_popoverWrapper__1b68d3c1 .Select_styles_ls547o_selectTarget__1b68d3c1{background:var(--plasma-select-target-background-color-hover);}.Select_styles_ls547o_sgpldc9__1b68d3c1:focus-visible{border-radius:var(--plasma-select-border-radius);box-shadow:0 0 0 0.0625rem var(--plasma-select-focus-color);}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import './Select.
|
1
|
+
import './Select.styles_ls547o.css';
|
2
2
|
import { styled } from '@linaria/react';
|
3
3
|
import '@linaria/core';
|
4
4
|
import { component } from '../../engines/common.js';
|
@@ -17,25 +17,25 @@ var StyledSelect = /*#__PURE__*/styled('div')({
|
|
17
17
|
|
18
18
|
// issue #823
|
19
19
|
var Popover = /*#__PURE__*/component(popoverConfig);
|
20
|
-
var
|
20
|
+
var _exp11 = function _exp11() {
|
21
21
|
return Popover;
|
22
22
|
};
|
23
|
-
var
|
23
|
+
var _exp14 = function _exp14() {
|
24
24
|
return function (_ref) {
|
25
25
|
var usePortal = _ref.usePortal,
|
26
26
|
selectWidth = _ref.selectWidth;
|
27
27
|
return usePortal ? "".concat(selectWidth, "px") : '100%';
|
28
28
|
};
|
29
29
|
};
|
30
|
-
var StyledPopover = /*#__PURE__*/styled(
|
30
|
+
var StyledPopover = /*#__PURE__*/styled(_exp11())({
|
31
31
|
name: "StyledPopover",
|
32
32
|
"class": "svro45w",
|
33
33
|
propsAsIs: true,
|
34
34
|
vars: {
|
35
|
-
"svro45w-0": [/*#__PURE__*/
|
35
|
+
"svro45w-0": [/*#__PURE__*/_exp14()]
|
36
36
|
}
|
37
37
|
});
|
38
|
-
var
|
38
|
+
var _exp15 = function _exp15() {
|
39
39
|
return function (_ref2) {
|
40
40
|
var disabled = _ref2.disabled;
|
41
41
|
return disabled ? 'not-allowed' : 'pointer';
|
@@ -46,7 +46,7 @@ var StyledNativeSelect = /*#__PURE__*/styled('select')({
|
|
46
46
|
"class": "sgpldc9",
|
47
47
|
propsAsIs: false,
|
48
48
|
vars: {
|
49
|
-
"sgpldc9-0": [/*#__PURE__*/
|
49
|
+
"sgpldc9-0": [/*#__PURE__*/_exp15()]
|
50
50
|
}
|
51
51
|
});
|
52
52
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Select.styles.js","sources":["../../../src/components/Select/Select.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component } from '../../engines';\nimport { popoverClasses, popoverConfig } from '../Popover';\n\nimport { tokens, classes } from './Select.tokens';\n\nconst { nativeSelectVisible, selectTarget } = classes;\n\nexport const StyledRoot = styled.div`\n width: 100%;\n position: relative;\n\n .${String(nativeSelectVisible)} {\n display: block;\n }\n
|
1
|
+
{"version":3,"file":"Select.styles.js","sources":["../../../src/components/Select/Select.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component } from '../../engines';\nimport { popoverClasses, popoverConfig } from '../Popover';\n\nimport { tokens, classes } from './Select.tokens';\n\nconst { nativeSelectVisible, selectTarget } = classes;\n\nexport const StyledRoot = styled.div`\n width: 100%;\n position: relative;\n\n .${String(nativeSelectVisible)} {\n display: block;\n }\n`;\n\nexport const StyledSelect = styled.div`\n box-sizing: border-box;\n overflow-y: auto;\n\n background: var(${tokens.background});\n box-shadow: var(${tokens.boxShadow});\n\n border-radius: var(${tokens.borderRadius});\n width: var(${tokens.width});\n height: var(${tokens.height});\n\n padding: var(${tokens.paddingTop}) var(${tokens.paddingRight}) var(${tokens.paddingBottom})\n var(${tokens.paddingLeft});\n`;\n\n// issue #823\nconst Popover = component(popoverConfig);\n\nexport const StyledPopover = styled(Popover)<{ selectWidth?: number }>`\n display: block;\n\n .${String(popoverClasses.root)}, .${String(popoverClasses.target)} {\n width: ${({ usePortal, selectWidth }) => (usePortal ? `${selectWidth}px` : '100%')};\n }\n`;\n\nexport const StyledNativeSelect = styled.select`\n display: none;\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n background: transparent;\n color: transparent;\n border: none;\n outline: none;\n opacity: 1;\n position: absolute;\n inset: -0.125rem;\n z-index: 1;\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};\n font-size: 1rem;\n\n &:hover:not(:disabled) + .${String(popoverClasses.wrapper)} .${String(selectTarget)} {\n background: var(${tokens.targetBackgroundColorHover});\n }\n\n &:focus-visible {\n border-radius: var(${tokens.borderRadius});\n box-shadow: 0 0 0 0.0625rem var(${tokens.focusColor});\n }\n`;\n"],"names":["StyledRoot","styled","name","class","propsAsIs","StyledSelect","Popover","component","popoverConfig","_exp11","_exp14","_ref","usePortal","selectWidth","concat","StyledPopover","vars","_exp15","_ref2","disabled","StyledNativeSelect"],"mappings":";;;;;AASO,IAAMA,UAAU,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAO/B,EAAA;AAEM,IAAMC,YAAY,gBAAGJ,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAajC,EAAA;;AAED;AACA,IAAME,OAAO,gBAAGC,SAAS,CAACC,aAAa,CAAC,CAAA;AAAC,IAAAC,MAAA,GAjCvBA,SAiCuBA,MAAAA,GAAA;AAAA,EAAA,OAELH,OAAO,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAI,MAAA,GAnCzBA,SAmCyBA,MAAAA,GAAA;AAAA,EAAA,OAI1B,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,SAAS,GAAAD,IAAA,CAATC,SAAS;MAAEC,WAAAA,GAAAA,IAAAA,CAAAA,WAAAA,CAAAA;AAAAA,IAAAA,OAAmBD,SAAS,GAAAE,EAAAA,CAAAA,MAAA,CAAMD,WAAY,UAAM,MAAO,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAJnF,IAAME,aAAa,gBAAGd,MAAM,CAAAQ,MAAA,EAAA,CAAA,CAAA;AAAAP,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAAY,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAIlBN,MAAyE,EAAA,CAAA;AAAA,GAAA;AAAA,CAEzF,EAAA;AAAC,IAAAO,MAAA,GAzCgBA,SAyChBA,MAAAA,GAAA;AAAA,EAAA,OAeY,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,QAAAA,GAAAA,KAAAA,CAAAA,QAAAA,CAAAA;AAAAA,IAAAA,OAAgBA,QAAQ,GAAG,aAAa,GAAG,SAAU,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAb/D,IAAMC,kBAAkB,gBAAGnB,MAAM,CAAA,QAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,oBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAY,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAa1BC,MAAwD,EAAA,CAAA;AAAA,GAAA;AAAA,CAWrE;;;;"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
.spxbau6{width:100%;position:relative;}.spxbau6 .native-select-visible{display:block;}
|
1
|
+
.spxbau6{width:100%;position:relative;}.spxbau6 .native-select-visible{display:block;}
|
2
2
|
.s1yey2x3{box-sizing:border-box;overflow-y:auto;background:var(--plasma-select-background);box-shadow:var(--plasma-select-box-shadow);border-radius:var(--plasma-select-border-radius);width:var(--plasma-select-width);height:var(--plasma-select-height);padding:var(--plasma-select-padding-top) var(--plasma-select-padding-right) var(--plasma-select-padding-bottom) var(--plasma-select-padding-left);}
|
3
3
|
.svro45w{display:block;}.svro45w .popover-root,.svro45w .popover-target{width:var(--svro45w-0);}
|
4
4
|
.sgpldc9{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-moz-appearance:none;-webkit-appearance:none;background:transparent;color:transparent;border:none;outline:none;opacity:1;position:absolute;inset:-0.125rem;z-index:1;cursor:var(--sgpldc9-0);font-size:1rem;}.sgpldc9:hover:not(:disabled) + .popover-wrapper .select-target{background:var(--plasma-select-target-background-color-hover);}.sgpldc9:focus-visible{border-radius:var(--plasma-select-border-radius);box-shadow:0 0 0 0.0625rem var(--plasma-select-focus-color);}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
|
2
|
-
.
|
3
|
-
.
|
4
|
-
.
|
1
|
+
|
2
|
+
.Popover_styles_1rk9t6z_s12xwbyh__96f55a53{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;box-sizing:border-box;position:relative;}
|
3
|
+
.Popover_styles_1rk9t6z_s1pd4d8a__96f55a53{width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);}.Popover_styles_1rk9t6z_s1pd4d8a__96f55a53::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);}
|
4
|
+
.Popover_styles_1rk9t6z_s16xlixz__96f55a53{position:absolute;z-index:var(--s16xlixz-0);}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='top'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{bottom:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='bottom'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{top:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='bottom'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='left'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{right:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='left'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53::before{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='right'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{left:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='right'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53::before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='top-start'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{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_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='top-end'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{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_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='bottom-start'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{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_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='bottom-start'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='bottom-end'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53{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_1rk9t6z_s16xlixz__96f55a53[data-popper-placement^='bottom-end'] > .Popover_styles_1rk9t6z_popoverArrow__96f55a53::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}
|
5
5
|
|
6
6
|
.Dropdown_styles_1daxhqh_sn7uamp__488e0a19 .Dropdown_styles_1daxhqh_popoverTarget__488e0a19{display:block;}
|
7
7
|
.Dropdown_styles_1daxhqh_sjr7fmv__488e0a19{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
|
@@ -104,8 +104,7 @@ var SelectTarget = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
104
104
|
"aria-label": label,
|
105
105
|
className: cx(withInnerLabelUp, withHasChips, withNoFocus, selectTarget),
|
106
106
|
onWheel: onWheel,
|
107
|
-
onKeyDown: onKeyDown
|
108
|
-
stretching: "filled"
|
107
|
+
onKeyDown: onKeyDown
|
109
108
|
}), hasText && (enumerationType === 'comma' || target === 'button-like' ? /*#__PURE__*/React.createElement(StyledText, {
|
110
109
|
className: selectTargeText
|
111
110
|
}, textContent) : /*#__PURE__*/React.createElement(StyledChipsWrapper, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SelectTarget.js","sources":["../../../../../src/components/Select/ui/SelectTarget/SelectTarget.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useRef } from 'react';\n\nimport { classes } from '../../Select.tokens';\nimport { cx } from '../../../../utils';\nimport { SelectChip } from '../SelectChip/SelectChip';\nimport type { SelectPrimitiveValue } from '../../Select.types';\nimport { Keys } from '../../hooks/useKeyNavigation';\n\nimport {\n StyledArrow,\n StyledChips,\n StyledChipsWrapper,\n StyledLabel,\n StyledSelectTarget,\n StyledText,\n} from './SelectTarget.styles';\nimport type { SelectTargetProps } from './SelectTarget.types';\n\nconst {\n hasNoFocus,\n hasChips,\n innerLabelUp,\n arrowInverse,\n selectTarget,\n selectTargetArrow,\n selectTargeText,\n selectTargetLabel,\n} = classes;\n\n/**\n * Элемент для выпадающего списка\n */\nexport const SelectTarget = forwardRef<HTMLButtonElement, SelectTargetProps>(\n (\n {\n values,\n target = 'textField-like',\n label,\n opened,\n readOnly,\n disabled,\n enumerationType,\n size,\n id,\n chipsRefs,\n onChange,\n onKeyDown,\n ...rest\n },\n ref,\n ) => {\n const hasText = Boolean(values?.some(([value]) => value));\n\n const hasLabel = label && size !== 'xs' && target === 'textField-like';\n const textContent = values?.map(([, text]) => text).join(', ');\n const contentRef = useRef<HTMLDivElement>(null);\n\n const withArrowInverse = opened ? arrowInverse : undefined;\n const withInnerLabelUp = hasLabel && hasText ? innerLabelUp : undefined;\n const withHasChips =\n hasText && enumerationType === 'chip' && target === 'textField-like' ? hasChips : undefined;\n\n const withNoFocus = target === 'textField-like' ? hasNoFocus : undefined;\n\n const isLabelVisible = !hasText || (hasLabel && enumerationType === 'comma');\n\n const onChipClick = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation();\n }, []);\n\n const onChipClear = useCallback(\n (value: SelectPrimitiveValue, text: SelectPrimitiveValue, index: number) => {\n const newValue = values\n ?.filter(([itemValue, itemText]) => !(itemValue === value && itemText === text))\n .map(([itemValue]) => itemValue);\n\n chipsRefs?.current.splice(index, 1);\n onChange?.(newValue);\n },\n [values, onChange],\n );\n\n const onChipKeyDown = useCallback(\n (\n value: SelectPrimitiveValue,\n text: SelectPrimitiveValue,\n index: number,\n event: React.KeyboardEvent<HTMLButtonElement>,\n ) => {\n const { code, shiftKey } = event;\n\n if (code === Keys.Tab || (code === Keys.Tab && shiftKey)) {\n event.preventDefault();\n }\n\n if (code === Keys.Backspace) {\n onChipClear(value, text, index);\n }\n },\n [onChipClear],\n );\n\n const onWheel = useCallback((event: React.WheelEvent<HTMLButtonElement>) => {\n const { deltaY } = event;\n\n if (contentRef.current) {\n contentRef.current.scrollLeft += Math.round(deltaY);\n }\n }, []);\n\n const getRef = useCallback((element: HTMLButtonElement | null, index: number) => {\n if (element && chipsRefs && chipsRefs.current) {\n chipsRefs.current[index] = element;\n }\n }, []);\n\n // INFO: Нужно очищать на каждый ререндер компонента для актуализации состояния рефов\n if (chipsRefs) {\n chipsRefs.current = [];\n }\n\n return (\n <StyledSelectTarget\n {...rest}\n ref={ref}\n opened={opened}\n target={target}\n readOnly={readOnly}\n disabled={disabled}\n title={textContent}\n aria-label={label}\n className={cx(withInnerLabelUp, withHasChips, withNoFocus, selectTarget)}\n onWheel={onWheel}\n onKeyDown={onKeyDown}\n stretching=\"filled\"\n >\n {hasText &&\n (enumerationType === 'comma' || target === 'button-like' ? (\n <StyledText className={selectTargeText}>{textContent}</StyledText>\n ) : (\n <StyledChipsWrapper ref={contentRef}>\n <StyledChips>\n {values?.map(([value, text], index) => (\n <SelectChip\n index={index}\n ref={(element) => getRef(element, index)}\n key={`${value}_${text}`}\n disabled={disabled}\n readOnly={readOnly}\n value={value}\n text={text}\n onClear={(v, t) => onChipClear(v, t, index)}\n onClick={onChipClick}\n onKeyDown={onChipKeyDown}\n />\n ))}\n </StyledChips>\n </StyledChipsWrapper>\n ))}\n {isLabelVisible && (\n <StyledLabel className={selectTargetLabel} htmlFor={id}>\n {label}\n </StyledLabel>\n )}\n <StyledArrow size=\"s\" color=\"inherit\" className={cx(selectTargetArrow, withArrowInverse)} />\n </StyledSelectTarget>\n );\n },\n);\n"],"names":["hasNoFocus","classes","hasChips","innerLabelUp","arrowInverse","selectTarget","selectTargetArrow","selectTargeText","selectTargetLabel","SelectTarget","forwardRef","_ref","ref","values","_ref$target","target","label","opened","readOnly","disabled","enumerationType","size","id","chipsRefs","onChange","onKeyDown","rest","_objectWithoutProperties","_excluded","hasText","Boolean","some","_ref2","_ref3","_slicedToArray","value","hasLabel","textContent","map","_ref4","_ref5","text","join","contentRef","useRef","withArrowInverse","undefined","withInnerLabelUp","withHasChips","withNoFocus","isLabelVisible","onChipClick","useCallback","event","stopPropagation","onChipClear","index","newValue","filter","_ref6","_ref7","itemValue","itemText","_ref8","_ref9","current","splice","onChipKeyDown","code","shiftKey","Keys","Tab","preventDefault","Backspace","onWheel","deltaY","scrollLeft","Math","round","getRef","element","React","createElement","StyledSelectTarget","_extends","title","className","cx","stretching","StyledText","StyledChipsWrapper","StyledChips","_ref10","_ref11","SelectChip","key","concat","onClear","v","t","onClick","StyledLabel","htmlFor","StyledArrow","color"],"mappings":";;;;;;;;;AAkBA,IACIA,UAAU,GAQVC,OAAO,CARPD,UAAU;EACVE,QAAQ,GAORD,OAAO,CAPPC,QAAQ;EACRC,YAAY,GAMZF,OAAO,CANPE,YAAY;EACZC,YAAY,GAKZH,OAAO,CALPG,YAAY;EACZC,YAAY,GAIZJ,OAAO,CAJPI,YAAY;EACZC,iBAAiB,GAGjBL,OAAO,CAHPK,iBAAiB;EACjBC,eAAe,GAEfN,OAAO,CAFPM,eAAe;EACfC,iBAAiB,GACjBP,OAAO,CADPO,iBAAiB,CAAA;;AAGrB;AACA;AACA;AACO,IAAMC,YAAY,gBAAGC,UAAU,CAClC,UAAAC,IAAA,EAgBIC,GAAG,EACF;AAAA,EAAA,IAfGC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAAC,WAAA,GAAAH,IAAA,CACNI,MAAM;AAANA,IAAAA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,gBAAgB,GAAAA,WAAA;IACzBE,KAAK,GAAAL,IAAA,CAALK,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,aAAA,CAACmB,WAAW,EAAA;AAACf,IAAAA,SAAS,EAAE9E,iBAAkB;AAAC8F,IAAAA,OAAO,EAAEhF,EAAAA;AAAG,GAAA,EAClDN,KACQ,CAChB,eACDiE,KAAA,CAAAC,aAAA,CAACqB,WAAW,EAAA;AAAClF,IAAAA,IAAI,EAAC,GAAG;AAACmF,IAAAA,KAAK,EAAC,SAAS;AAAClB,IAAAA,SAAS,EAAEC,EAAE,CAACjF,iBAAiB,EAAEuC,gBAAgB,CAAA;AAAE,GAAE,CAC3E,CAAC,CAAA;AAE7B,CACJ;;;;"}
|
1
|
+
{"version":3,"file":"SelectTarget.js","sources":["../../../../../src/components/Select/ui/SelectTarget/SelectTarget.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useRef } from 'react';\n\nimport { classes } from '../../Select.tokens';\nimport { cx } from '../../../../utils';\nimport { SelectChip } from '../SelectChip/SelectChip';\nimport type { SelectPrimitiveValue } from '../../Select.types';\nimport { Keys } from '../../hooks/useKeyNavigation';\n\nimport {\n StyledArrow,\n StyledChips,\n StyledChipsWrapper,\n StyledLabel,\n StyledSelectTarget,\n StyledText,\n} from './SelectTarget.styles';\nimport type { SelectTargetProps } from './SelectTarget.types';\n\nconst {\n hasNoFocus,\n hasChips,\n innerLabelUp,\n arrowInverse,\n selectTarget,\n selectTargetArrow,\n selectTargeText,\n selectTargetLabel,\n} = classes;\n\n/**\n * Элемент для выпадающего списка\n */\nexport const SelectTarget = forwardRef<HTMLButtonElement, SelectTargetProps>(\n (\n {\n values,\n target = 'textField-like',\n label,\n opened,\n readOnly,\n disabled,\n enumerationType,\n size,\n id,\n chipsRefs,\n onChange,\n onKeyDown,\n ...rest\n },\n ref,\n ) => {\n const hasText = Boolean(values?.some(([value]) => value));\n\n const hasLabel = label && size !== 'xs' && target === 'textField-like';\n const textContent = values?.map(([, text]) => text).join(', ');\n const contentRef = useRef<HTMLDivElement>(null);\n\n const withArrowInverse = opened ? arrowInverse : undefined;\n const withInnerLabelUp = hasLabel && hasText ? innerLabelUp : undefined;\n const withHasChips =\n hasText && enumerationType === 'chip' && target === 'textField-like' ? hasChips : undefined;\n\n const withNoFocus = target === 'textField-like' ? hasNoFocus : undefined;\n\n const isLabelVisible = !hasText || (hasLabel && enumerationType === 'comma');\n\n const onChipClick = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation();\n }, []);\n\n const onChipClear = useCallback(\n (value: SelectPrimitiveValue, text: SelectPrimitiveValue, index: number) => {\n const newValue = values\n ?.filter(([itemValue, itemText]) => !(itemValue === value && itemText === text))\n .map(([itemValue]) => itemValue);\n\n chipsRefs?.current.splice(index, 1);\n onChange?.(newValue);\n },\n [values, onChange],\n );\n\n const onChipKeyDown = useCallback(\n (\n value: SelectPrimitiveValue,\n text: SelectPrimitiveValue,\n index: number,\n event: React.KeyboardEvent<HTMLButtonElement>,\n ) => {\n const { code, shiftKey } = event;\n\n if (code === Keys.Tab || (code === Keys.Tab && shiftKey)) {\n event.preventDefault();\n }\n\n if (code === Keys.Backspace) {\n onChipClear(value, text, index);\n }\n },\n [onChipClear],\n );\n\n const onWheel = useCallback((event: React.WheelEvent<HTMLButtonElement>) => {\n const { deltaY } = event;\n\n if (contentRef.current) {\n contentRef.current.scrollLeft += Math.round(deltaY);\n }\n }, []);\n\n const getRef = useCallback((element: HTMLButtonElement | null, index: number) => {\n if (element && chipsRefs && chipsRefs.current) {\n chipsRefs.current[index] = element;\n }\n }, []);\n\n // INFO: Нужно очищать на каждый ререндер компонента для актуализации состояния рефов\n if (chipsRefs) {\n chipsRefs.current = [];\n }\n\n return (\n <StyledSelectTarget\n {...rest}\n ref={ref}\n opened={opened}\n target={target}\n readOnly={readOnly}\n disabled={disabled}\n title={textContent}\n aria-label={label}\n className={cx(withInnerLabelUp, withHasChips, withNoFocus, selectTarget)}\n onWheel={onWheel}\n onKeyDown={onKeyDown}\n >\n {hasText &&\n (enumerationType === 'comma' || target === 'button-like' ? (\n <StyledText className={selectTargeText}>{textContent}</StyledText>\n ) : (\n <StyledChipsWrapper ref={contentRef}>\n <StyledChips>\n {values?.map(([value, text], index) => (\n <SelectChip\n index={index}\n ref={(element) => getRef(element, index)}\n key={`${value}_${text}`}\n disabled={disabled}\n readOnly={readOnly}\n value={value}\n text={text}\n onClear={(v, t) => onChipClear(v, t, index)}\n onClick={onChipClick}\n onKeyDown={onChipKeyDown}\n />\n ))}\n </StyledChips>\n </StyledChipsWrapper>\n ))}\n {isLabelVisible && (\n <StyledLabel className={selectTargetLabel} htmlFor={id}>\n {label}\n </StyledLabel>\n )}\n <StyledArrow size=\"s\" color=\"inherit\" className={cx(selectTargetArrow, withArrowInverse)} />\n </StyledSelectTarget>\n );\n },\n);\n"],"names":["hasNoFocus","classes","hasChips","innerLabelUp","arrowInverse","selectTarget","selectTargetArrow","selectTargeText","selectTargetLabel","SelectTarget","forwardRef","_ref","ref","values","_ref$target","target","label","opened","readOnly","disabled","enumerationType","size","id","chipsRefs","onChange","onKeyDown","rest","_objectWithoutProperties","_excluded","hasText","Boolean","some","_ref2","_ref3","_slicedToArray","value","hasLabel","textContent","map","_ref4","_ref5","text","join","contentRef","useRef","withArrowInverse","undefined","withInnerLabelUp","withHasChips","withNoFocus","isLabelVisible","onChipClick","useCallback","event","stopPropagation","onChipClear","index","newValue","filter","_ref6","_ref7","itemValue","itemText","_ref8","_ref9","current","splice","onChipKeyDown","code","shiftKey","Keys","Tab","preventDefault","Backspace","onWheel","deltaY","scrollLeft","Math","round","getRef","element","React","createElement","StyledSelectTarget","_extends","title","className","cx","StyledText","StyledChipsWrapper","StyledChips","_ref10","_ref11","SelectChip","key","concat","onClear","v","t","onClick","StyledLabel","htmlFor","StyledArrow","color"],"mappings":";;;;;;;;;AAkBA,IACIA,UAAU,GAQVC,OAAO,CARPD,UAAU;EACVE,QAAQ,GAORD,OAAO,CAPPC,QAAQ;EACRC,YAAY,GAMZF,OAAO,CANPE,YAAY;EACZC,YAAY,GAKZH,OAAO,CALPG,YAAY;EACZC,YAA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