@salutejs/plasma-new-hope 0.177.1-canary.1502.11573459466.0 → 0.178.0-canary.1506.11573062130.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Autocomplete/Autocomplete.css +1 -1
- package/cjs/components/Autocomplete/Autocomplete.tokens.js +1 -0
- package/cjs/components/Autocomplete/Autocomplete.tokens.js.map +1 -1
- package/cjs/components/Autocomplete/ui/TextField/TextField.styles.js +1 -1
- package/cjs/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
- package/cjs/components/Autocomplete/ui/TextField/{TextField.styles_1csckkd.css → TextField.styles_kcgaix.css} +1 -1
- package/cjs/components/Calendar/Calendar.tokens.js +4 -0
- package/cjs/components/Calendar/Calendar.tokens.js.map +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.css +16 -15
- package/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js.map +1 -1
- package/{es/components/Calendar/CalendarBase/CalendarBase.styles_1m6uih1.css → cjs/components/Calendar/CalendarBase/CalendarBase.styles_ni8729.css} +1 -1
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.css +16 -15
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.css +4 -4
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.css +9 -8
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +3 -4
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +11 -1
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
- package/{es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_1jfelqf.css → cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_zgya4j.css} +1 -0
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.css +4 -4
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.css +4 -4
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.css +4 -4
- package/cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.css +4 -4
- package/cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +1 -1
- package/cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js.map +1 -1
- package/{es/components/Calendar/ui/DateStructureItem/DateStructureItem.styles_1nxxafr.css → cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.styles_uzh6dj.css} +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +12 -12
- package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js +2 -2
- package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/{Combobox.styles_1s09ifw.css → Combobox.styles_18a8p75.css} +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +4 -26
- package/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +12 -12
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +12 -12
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/{Item.styles_y71664.css → Item.styles_1kzr84z.css} +2 -2
- package/cjs/components/Combobox/ComboboxOld/Combobox.css +5 -5
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +5 -5
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +5 -5
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +5 -5
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +5 -5
- package/cjs/components/DatePicker/DatePicker.tokens.js +6 -0
- package/cjs/components/DatePicker/DatePicker.tokens.js.map +1 -1
- package/cjs/components/DatePicker/DatePickerBase.styles.js +1 -1
- package/cjs/components/DatePicker/DatePickerBase.styles.js.map +1 -1
- package/cjs/components/DatePicker/DatePickerBase.styles_1g7mpqf.css +2 -0
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +20 -19
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +18 -17
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_lzydb6.css +2 -0
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +20 -19
- package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +1 -1
- package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
- package/cjs/components/DatePicker/SingleDate/{SingleDate.styles_1rrq00l.css → SingleDate.styles_e72b5o.css} +1 -1
- package/cjs/components/Dropdown/Dropdown.css +5 -5
- package/cjs/components/Dropdown/Dropdown.styles.js +1 -1
- package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/cjs/components/Dropdown/{Dropdown.styles_1ix6io8.css → Dropdown.styles_dh7ns1.css} +1 -1
- package/cjs/components/Dropdown/Dropdown.tokens.js +2 -0
- package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +5 -5
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_17va0nk.css → DropdownItem.styles_1b439rx.css} +1 -1
- package/cjs/components/Notification/Notification.css +11 -11
- package/cjs/components/Notification/Notification.js +3 -3
- package/cjs/components/Notification/Notification.js.map +1 -1
- package/cjs/components/Notification/Notification.styles.js +17 -17
- package/cjs/components/Notification/Notification.styles.js.map +1 -1
- package/cjs/components/Notification/{Notification.styles_e6274r.css → Notification.styles_ob8hsa.css} +2 -2
- package/cjs/components/Notification/Notification.tokens.js +5 -1
- package/cjs/components/Notification/Notification.tokens.js.map +1 -1
- package/cjs/components/Notification/NotificationsProvider.css +11 -11
- package/cjs/components/Pagination/Pagination.css +10 -10
- package/cjs/components/Pagination/Pagination.js +5 -5
- package/cjs/components/Pagination/Pagination.js.map +1 -1
- package/cjs/components/Pagination/Pagination.styles.js +3 -3
- package/cjs/components/Pagination/Pagination.styles.js.map +1 -1
- package/cjs/components/Pagination/{Pagination.styles_y6gcva.css → Pagination.styles_1w5oej6.css} +1 -1
- package/cjs/components/Pagination/Pagination.tokens.js +4 -1
- package/cjs/components/Pagination/Pagination.tokens.js.map +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +3 -3
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/{PaginationSelectPerPage.styles_187mk6b.css → PaginationSelectPerPage.styles_1fesyfv.css} +1 -1
- package/cjs/components/Tabs/createTabsController.js.map +1 -1
- package/cjs/components/Tabs/tokens.js +7 -3
- package/cjs/components/Tabs/tokens.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +5 -5
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +1 -3
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/{HorizontalTabItem.styles_hfqv5b.css → HorizontalTabItem.styles_uaaqqg.css} +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.css +5 -5
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +8 -20
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/{HorizontalTabs.styles_p9rk79.css → HorizontalTabs.styles_16kuvxt.css} +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/{base_4ob3q5.css → base_9miwn.css} +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +5 -5
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/{VerticalTabItem.styles_16d3lah.css → VerticalTabItem.styles_1g7zipg.css} +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.css +4 -4
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +6 -7
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js.map +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/{VerticalTabs.styles_1r1hidh.css → VerticalTabs.styles_1fr5ovg.css} +1 -1
- package/cjs/components/Toast/Toast.css +5 -5
- package/cjs/components/Toast/Toast.js +3 -3
- package/cjs/components/Toast/Toast.js.map +1 -1
- package/cjs/components/Toast/Toast.styles.js +3 -3
- package/cjs/components/Toast/Toast.styles.js.map +1 -1
- package/{es/components/Toast/Toast.styles_1v9oj7f.css → cjs/components/Toast/Toast.styles_1nei944.css} +1 -1
- package/cjs/components/Toast/Toast.tokens.js +3 -1
- package/cjs/components/Toast/Toast.tokens.js.map +1 -1
- package/cjs/components/Toast/ToastController.css +5 -5
- package/cjs/index.css +85 -84
- package/emotion/cjs/components/Autocomplete/Autocomplete.tokens.js +1 -0
- package/emotion/cjs/components/Autocomplete/ui/TextField/TextField.styles.js +1 -1
- package/emotion/cjs/components/Calendar/Calendar.tokens.js +4 -0
- package/emotion/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js +2 -2
- package/emotion/cjs/components/Calendar/mixins/selected.js +3 -2
- package/emotion/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +3 -3
- package/emotion/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +22 -17
- package/emotion/cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +5 -4
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.styles.js +7 -7
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +4 -4
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +12 -12
- package/emotion/cjs/components/DatePicker/DatePicker.tokens.js +6 -0
- package/emotion/cjs/components/DatePicker/DatePickerBase.styles.js +3 -3
- package/emotion/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +5 -5
- package/emotion/cjs/components/Dropdown/Dropdown.styles.js +2 -2
- package/emotion/cjs/components/Dropdown/Dropdown.tokens.js +2 -1
- package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +6 -6
- package/emotion/cjs/components/Notification/Notification.js +4 -4
- package/emotion/cjs/components/Notification/Notification.styles.js +11 -11
- package/emotion/cjs/components/Notification/Notification.tokens.js +5 -1
- package/emotion/cjs/components/Pagination/Pagination.js +5 -5
- package/emotion/cjs/components/Pagination/Pagination.styles.js +8 -8
- package/emotion/cjs/components/Pagination/Pagination.tokens.js +4 -1
- package/emotion/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +3 -3
- package/emotion/cjs/components/Tabs/tokens.js +7 -3
- package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +1 -3
- package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +5 -5
- package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +8 -20
- package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js +4 -4
- package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js +1 -1
- package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +5 -5
- package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +6 -7
- package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +4 -4
- package/emotion/cjs/components/Toast/Toast.js +4 -4
- package/emotion/cjs/components/Toast/Toast.styles.js +6 -6
- package/emotion/cjs/components/Toast/Toast.tokens.js +3 -1
- package/emotion/cjs/examples/plasma_b2c/components/Autocomplete/Autocomplete.config.js +12 -12
- package/emotion/cjs/examples/plasma_b2c/components/Calendar/CalendarBase.config.js +5 -5
- package/emotion/cjs/examples/plasma_b2c/components/Calendar/CalendarDouble.config.js +5 -5
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
- package/emotion/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.config.js +7 -7
- package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
- package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.config.js +5 -5
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +33 -72
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -15
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabs.config.js +15 -15
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabs.config.js +6 -6
- package/emotion/cjs/examples/plasma_b2c/components/Toast/Toast.config.js +5 -5
- package/emotion/cjs/examples/plasma_web/components/Autocomplete/Autocomplete.config.js +12 -12
- package/emotion/cjs/examples/plasma_web/components/Calendar/CalendarBase.config.js +5 -5
- package/emotion/cjs/examples/plasma_web/components/Calendar/CalendarDouble.config.js +5 -5
- package/emotion/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +12 -12
- package/emotion/cjs/examples/plasma_web/components/DatePicker/DatePicker.config.js +7 -7
- package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
- package/emotion/cjs/examples/plasma_web/components/Notification/Notification.config.js +5 -5
- package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +33 -72
- package/emotion/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -15
- package/emotion/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabs.config.js +15 -15
- package/emotion/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabs.config.js +6 -6
- package/emotion/cjs/examples/plasma_web/components/Toast/Toast.config.js +5 -5
- package/emotion/es/components/Autocomplete/Autocomplete.tokens.js +1 -0
- package/emotion/es/components/Autocomplete/ui/TextField/TextField.styles.js +1 -1
- package/emotion/es/components/Calendar/Calendar.tokens.js +4 -0
- package/emotion/es/components/Calendar/CalendarBase/CalendarBase.styles.js +2 -2
- package/emotion/es/components/Calendar/mixins/selected.js +3 -2
- package/emotion/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -5
- package/emotion/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +21 -16
- package/emotion/es/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +5 -4
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.styles.js +7 -7
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.tokens.js +4 -4
- package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +12 -12
- package/emotion/es/components/DatePicker/DatePicker.tokens.js +6 -0
- package/emotion/es/components/DatePicker/DatePickerBase.styles.js +3 -3
- package/emotion/es/components/DatePicker/SingleDate/SingleDate.styles.js +5 -5
- package/emotion/es/components/Dropdown/Dropdown.styles.js +2 -2
- package/emotion/es/components/Dropdown/Dropdown.tokens.js +2 -1
- package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +6 -6
- package/emotion/es/components/Notification/Notification.js +4 -4
- package/emotion/es/components/Notification/Notification.styles.js +11 -11
- package/emotion/es/components/Notification/Notification.tokens.js +5 -1
- package/emotion/es/components/Pagination/Pagination.js +5 -5
- package/emotion/es/components/Pagination/Pagination.styles.js +8 -8
- package/emotion/es/components/Pagination/Pagination.tokens.js +4 -1
- package/emotion/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +3 -3
- package/emotion/es/components/Tabs/tokens.js +7 -3
- package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +1 -3
- package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +5 -5
- package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +9 -21
- package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js +4 -4
- package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js +1 -1
- package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +5 -5
- package/emotion/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +7 -8
- package/emotion/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +4 -4
- package/emotion/es/components/Toast/Toast.js +4 -4
- package/emotion/es/components/Toast/Toast.styles.js +6 -6
- package/emotion/es/components/Toast/Toast.tokens.js +3 -1
- package/emotion/es/examples/plasma_b2c/components/Autocomplete/Autocomplete.config.js +12 -12
- package/emotion/es/examples/plasma_b2c/components/Calendar/CalendarBase.config.js +5 -5
- package/emotion/es/examples/plasma_b2c/components/Calendar/CalendarDouble.config.js +5 -5
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
- package/emotion/es/examples/plasma_b2c/components/DatePicker/DatePicker.config.js +7 -7
- package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
- package/emotion/es/examples/plasma_b2c/components/Notification/Notification.config.js +5 -5
- package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +33 -72
- package/emotion/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -15
- package/emotion/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabs.config.js +15 -15
- package/emotion/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabs.config.js +6 -6
- package/emotion/es/examples/plasma_b2c/components/Toast/Toast.config.js +5 -5
- package/emotion/es/examples/plasma_web/components/Autocomplete/Autocomplete.config.js +12 -12
- package/emotion/es/examples/plasma_web/components/Calendar/CalendarBase.config.js +5 -5
- package/emotion/es/examples/plasma_web/components/Calendar/CalendarDouble.config.js +5 -5
- package/emotion/es/examples/plasma_web/components/Combobox/Combobox.config.js +12 -12
- package/emotion/es/examples/plasma_web/components/DatePicker/DatePicker.config.js +7 -7
- package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
- package/emotion/es/examples/plasma_web/components/Notification/Notification.config.js +5 -5
- package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +33 -72
- package/emotion/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -15
- package/emotion/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabs.config.js +15 -15
- package/emotion/es/examples/plasma_web/components/Tabs/vertical/VerticalTabs.config.js +6 -6
- package/emotion/es/examples/plasma_web/components/Toast/Toast.config.js +5 -5
- package/es/components/Autocomplete/Autocomplete.css +1 -1
- package/es/components/Autocomplete/Autocomplete.tokens.js +1 -0
- package/es/components/Autocomplete/Autocomplete.tokens.js.map +1 -1
- package/es/components/Autocomplete/ui/TextField/TextField.styles.js +1 -1
- package/es/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
- package/es/components/Autocomplete/ui/TextField/{TextField.styles_1csckkd.css → TextField.styles_kcgaix.css} +1 -1
- package/es/components/Calendar/Calendar.tokens.js +4 -0
- package/es/components/Calendar/Calendar.tokens.js.map +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.css +16 -15
- package/es/components/Calendar/CalendarBase/CalendarBase.styles.js +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.styles.js.map +1 -1
- package/{cjs/components/Calendar/CalendarBase/CalendarBase.styles_1m6uih1.css → es/components/Calendar/CalendarBase/CalendarBase.styles_ni8729.css} +1 -1
- package/es/components/Calendar/CalendarDouble/CalendarDouble.css +16 -15
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.css +4 -4
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.css +9 -8
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +4 -5
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +11 -2
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
- package/{cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_1jfelqf.css → es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_zgya4j.css} +1 -0
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.css +4 -4
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.css +4 -4
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.css +4 -4
- package/es/components/Calendar/ui/DateStructureItem/DateStructureItem.css +4 -4
- package/es/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +1 -1
- package/es/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js.map +1 -1
- package/{cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.styles_1nxxafr.css → es/components/Calendar/ui/DateStructureItem/DateStructureItem.styles_uzh6dj.css} +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.css +12 -12
- package/es/components/Combobox/ComboboxNew/Combobox.styles.js +3 -3
- package/es/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/{Combobox.styles_1s09ifw.css → Combobox.styles_18a8p75.css} +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.tokens.js +5 -26
- package/es/components/Combobox/ComboboxNew/Combobox.tokens.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +12 -12
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +12 -12
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/{Item.styles_y71664.css → Item.styles_1kzr84z.css} +2 -2
- package/es/components/Combobox/ComboboxOld/Combobox.css +5 -5
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +5 -5
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +5 -5
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +5 -5
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +5 -5
- package/es/components/DatePicker/DatePicker.tokens.js +6 -0
- package/es/components/DatePicker/DatePicker.tokens.js.map +1 -1
- package/es/components/DatePicker/DatePickerBase.styles.js +1 -1
- package/es/components/DatePicker/DatePickerBase.styles.js.map +1 -1
- package/es/components/DatePicker/DatePickerBase.styles_1g7mpqf.css +2 -0
- package/es/components/DatePicker/RangeDate/RangeDate.css +20 -19
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +18 -17
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +1 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_lzydb6.css +2 -0
- package/es/components/DatePicker/SingleDate/SingleDate.css +20 -19
- package/es/components/DatePicker/SingleDate/SingleDate.styles.js +1 -1
- package/es/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
- package/es/components/DatePicker/SingleDate/{SingleDate.styles_1rrq00l.css → SingleDate.styles_e72b5o.css} +1 -1
- package/es/components/Dropdown/Dropdown.css +5 -5
- package/es/components/Dropdown/Dropdown.styles.js +1 -1
- package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/es/components/Dropdown/{Dropdown.styles_1ix6io8.css → Dropdown.styles_dh7ns1.css} +1 -1
- package/es/components/Dropdown/Dropdown.tokens.js +2 -0
- package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +5 -5
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_17va0nk.css → DropdownItem.styles_1b439rx.css} +1 -1
- package/es/components/Notification/Notification.css +11 -11
- package/es/components/Notification/Notification.js +4 -4
- package/es/components/Notification/Notification.js.map +1 -1
- package/es/components/Notification/Notification.styles.js +17 -17
- package/es/components/Notification/Notification.styles.js.map +1 -1
- package/es/components/Notification/{Notification.styles_e6274r.css → Notification.styles_ob8hsa.css} +2 -2
- package/es/components/Notification/Notification.tokens.js +5 -1
- package/es/components/Notification/Notification.tokens.js.map +1 -1
- package/es/components/Notification/NotificationsProvider.css +11 -11
- package/es/components/Pagination/Pagination.css +10 -10
- package/es/components/Pagination/Pagination.js +5 -5
- package/es/components/Pagination/Pagination.js.map +1 -1
- package/es/components/Pagination/Pagination.styles.js +3 -3
- package/es/components/Pagination/Pagination.styles.js.map +1 -1
- package/es/components/Pagination/{Pagination.styles_y6gcva.css → Pagination.styles_1w5oej6.css} +1 -1
- package/es/components/Pagination/Pagination.tokens.js +4 -1
- package/es/components/Pagination/Pagination.tokens.js.map +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +3 -3
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/{PaginationSelectPerPage.styles_187mk6b.css → PaginationSelectPerPage.styles_1fesyfv.css} +1 -1
- package/es/components/Tabs/createTabsController.js.map +1 -1
- package/es/components/Tabs/tokens.js +7 -3
- package/es/components/Tabs/tokens.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +5 -5
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +1 -3
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/{HorizontalTabItem.styles_hfqv5b.css → HorizontalTabItem.styles_uaaqqg.css} +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.css +5 -5
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +9 -21
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/{HorizontalTabs.styles_p9rk79.css → HorizontalTabs.styles_16kuvxt.css} +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/{base_4ob3q5.css → base_9miwn.css} +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +5 -5
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabItem/{VerticalTabItem.styles_16d3lah.css → VerticalTabItem.styles_1g7zipg.css} +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.css +4 -4
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +7 -8
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js.map +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabs/{VerticalTabs.styles_1r1hidh.css → VerticalTabs.styles_1fr5ovg.css} +1 -1
- package/es/components/Toast/Toast.css +5 -5
- package/es/components/Toast/Toast.js +4 -4
- package/es/components/Toast/Toast.js.map +1 -1
- package/es/components/Toast/Toast.styles.js +3 -3
- package/es/components/Toast/Toast.styles.js.map +1 -1
- package/{cjs/components/Toast/Toast.styles_1v9oj7f.css → es/components/Toast/Toast.styles_1nei944.css} +1 -1
- package/es/components/Toast/Toast.tokens.js +3 -1
- package/es/components/Toast/Toast.tokens.js.map +1 -1
- package/es/components/Toast/ToastController.css +5 -5
- package/es/index.css +85 -84
- package/package.json +2 -2
- package/styled-components/cjs/components/Autocomplete/Autocomplete.tokens.js +1 -0
- package/styled-components/cjs/components/Autocomplete/ui/TextField/TextField.styles.js +1 -1
- package/styled-components/cjs/components/Calendar/Calendar.tokens.js +4 -0
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js +1 -1
- package/styled-components/cjs/components/Calendar/mixins/selected.js +3 -2
- package/styled-components/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +3 -3
- package/styled-components/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +6 -2
- package/styled-components/cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +1 -0
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.styles.js +2 -2
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +4 -4
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +2 -2
- package/styled-components/cjs/components/DatePicker/DatePicker.tokens.js +6 -0
- package/styled-components/cjs/components/DatePicker/DatePickerBase.styles.js +1 -1
- package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +1 -1
- package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +2 -2
- package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +2 -1
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -1
- package/styled-components/cjs/components/Notification/Notification.js +4 -4
- package/styled-components/cjs/components/Notification/Notification.styles.js +2 -2
- package/styled-components/cjs/components/Notification/Notification.tokens.js +5 -1
- package/styled-components/cjs/components/Pagination/Pagination.js +5 -5
- package/styled-components/cjs/components/Pagination/Pagination.styles.js +1 -1
- package/styled-components/cjs/components/Pagination/Pagination.tokens.js +4 -1
- package/styled-components/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/styled-components/cjs/components/Tabs/tokens.js +7 -3
- package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +1 -3
- package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
- package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +8 -20
- package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js +2 -2
- package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js +1 -1
- package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +1 -1
- package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +6 -7
- package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +2 -2
- package/styled-components/cjs/components/Toast/Toast.js +4 -4
- package/styled-components/cjs/components/Toast/Toast.styles.js +1 -1
- package/styled-components/cjs/components/Toast/Toast.tokens.js +3 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Autocomplete/Autocomplete.config.js +4 -4
- package/styled-components/cjs/examples/plasma_b2c/components/Calendar/CalendarBase.config.js +5 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Calendar/CalendarDouble.config.js +5 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +4 -4
- package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.config.js +5 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.config.js +2 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +33 -72
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +2 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabs.config.js +3 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabs.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Toast/Toast.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Autocomplete/Autocomplete.config.js +4 -4
- package/styled-components/cjs/examples/plasma_web/components/Calendar/CalendarBase.config.js +5 -5
- package/styled-components/cjs/examples/plasma_web/components/Calendar/CalendarDouble.config.js +5 -5
- package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +4 -4
- package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.config.js +5 -5
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.config.js +2 -2
- package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +33 -72
- package/styled-components/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +2 -2
- package/styled-components/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabs.config.js +3 -3
- package/styled-components/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabs.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Toast/Toast.config.js +1 -1
- package/styled-components/es/components/Autocomplete/Autocomplete.tokens.js +1 -0
- package/styled-components/es/components/Autocomplete/ui/TextField/TextField.styles.js +1 -1
- package/styled-components/es/components/Calendar/Calendar.tokens.js +4 -0
- package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.styles.js +1 -1
- package/styled-components/es/components/Calendar/mixins/selected.js +3 -2
- package/styled-components/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -5
- package/styled-components/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +5 -1
- package/styled-components/es/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +1 -0
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.styles.js +2 -2
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.tokens.js +4 -4
- package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +2 -2
- package/styled-components/es/components/DatePicker/DatePicker.tokens.js +6 -0
- package/styled-components/es/components/DatePicker/DatePickerBase.styles.js +1 -1
- package/styled-components/es/components/DatePicker/SingleDate/SingleDate.styles.js +1 -1
- package/styled-components/es/components/Dropdown/Dropdown.styles.js +2 -2
- package/styled-components/es/components/Dropdown/Dropdown.tokens.js +2 -1
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -1
- package/styled-components/es/components/Notification/Notification.js +4 -4
- package/styled-components/es/components/Notification/Notification.styles.js +2 -2
- package/styled-components/es/components/Notification/Notification.tokens.js +5 -1
- package/styled-components/es/components/Pagination/Pagination.js +5 -5
- package/styled-components/es/components/Pagination/Pagination.styles.js +1 -1
- package/styled-components/es/components/Pagination/Pagination.tokens.js +4 -1
- package/styled-components/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/styled-components/es/components/Tabs/tokens.js +7 -3
- package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +1 -3
- package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
- package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +9 -21
- package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.js +2 -2
- package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.js +1 -1
- package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +1 -1
- package/styled-components/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +7 -8
- package/styled-components/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +2 -2
- package/styled-components/es/components/Toast/Toast.js +4 -4
- package/styled-components/es/components/Toast/Toast.styles.js +1 -1
- package/styled-components/es/components/Toast/Toast.tokens.js +3 -1
- package/styled-components/es/examples/plasma_b2c/components/Autocomplete/Autocomplete.config.js +4 -4
- package/styled-components/es/examples/plasma_b2c/components/Calendar/CalendarBase.config.js +5 -5
- package/styled-components/es/examples/plasma_b2c/components/Calendar/CalendarDouble.config.js +5 -5
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +4 -4
- package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.config.js +5 -5
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.config.js +2 -2
- package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +33 -72
- package/styled-components/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +2 -2
- package/styled-components/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabs.config.js +3 -3
- package/styled-components/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabs.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Toast/Toast.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Autocomplete/Autocomplete.config.js +4 -4
- package/styled-components/es/examples/plasma_web/components/Calendar/CalendarBase.config.js +5 -5
- package/styled-components/es/examples/plasma_web/components/Calendar/CalendarDouble.config.js +5 -5
- package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.config.js +4 -4
- package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.config.js +5 -5
- package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Notification/Notification.config.js +2 -2
- package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +33 -72
- package/styled-components/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +2 -2
- package/styled-components/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabs.config.js +3 -3
- package/styled-components/es/examples/plasma_web/components/Tabs/vertical/VerticalTabs.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Toast/Toast.config.js +1 -1
- package/types/components/Autocomplete/Autocomplete.tokens.d.ts +1 -0
- package/types/components/Autocomplete/Autocomplete.tokens.d.ts.map +1 -1
- package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts.map +1 -1
- package/types/components/Calendar/Calendar.tokens.d.ts +4 -0
- package/types/components/Calendar/Calendar.tokens.d.ts.map +1 -1
- package/types/components/Calendar/CalendarBase/CalendarBase.styles.d.ts.map +1 -1
- package/types/components/Calendar/mixins/selected.d.ts +4 -0
- package/types/components/Calendar/mixins/selected.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.d.ts +1 -0
- package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.d.ts.map +1 -1
- package/types/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.tokens.d.ts +3 -3
- package/types/components/Combobox/ComboboxNew/Combobox.tokens.d.ts.map +1 -1
- package/types/components/DatePicker/DatePicker.tokens.d.ts +6 -0
- package/types/components/DatePicker/DatePicker.tokens.d.ts.map +1 -1
- package/types/components/DatePicker/DatePickerBase.styles.d.ts.map +1 -1
- package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.tokens.d.ts +2 -1
- package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
- package/types/components/Notification/Notification.styles.d.ts.map +1 -1
- package/types/components/Notification/Notification.tokens.d.ts +4 -0
- package/types/components/Notification/Notification.tokens.d.ts.map +1 -1
- package/types/components/Pagination/Pagination.d.ts.map +1 -1
- package/types/components/Pagination/Pagination.styles.d.ts.map +1 -1
- package/types/components/Pagination/Pagination.tokens.d.ts +3 -0
- package/types/components/Pagination/Pagination.tokens.d.ts.map +1 -1
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
- package/types/components/Tabs/TabItem.types.d.ts +8 -50
- package/types/components/Tabs/TabItem.types.d.ts.map +1 -1
- package/types/components/Tabs/Tabs.types.d.ts +2 -44
- package/types/components/Tabs/Tabs.types.d.ts.map +1 -1
- package/types/components/Tabs/createTabsController.d.ts +2 -2
- package/types/components/Tabs/createTabsController.d.ts.map +1 -1
- package/types/components/Tabs/index.d.ts +2 -2
- package/types/components/Tabs/index.d.ts.map +1 -1
- package/types/components/Tabs/tokens.d.ts +6 -2
- package/types/components/Tabs/tokens.d.ts.map +1 -1
- package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.d.ts.map +1 -1
- package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.d.ts.map +1 -1
- package/types/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.d.ts +2 -2
- package/types/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.d.ts.map +1 -1
- package/types/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.d.ts.map +1 -1
- package/types/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.d.ts.map +1 -1
- package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.d.ts.map +1 -1
- package/types/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.d.ts.map +1 -1
- package/types/components/Toast/Toast.tokens.d.ts +2 -0
- package/types/components/Toast/Toast.tokens.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Calendar/CalendarBase.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Calendar/CalendarDouble.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Combobox/Combobox.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/DatePicker/DatePicker.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Notification/Notification.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts +6 -21
- package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/Tabs.d.ts +2 -2
- package/types/examples/plasma_b2c/components/Tabs/Tabs.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabs.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabs.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Toast/Toast.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Autocomplete/Autocomplete.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Calendar/CalendarBase.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Calendar/CalendarDouble.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Combobox/Combobox.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/DatePicker/DatePicker.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Dropdown/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Notification/Notification.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/TabItem.d.ts +6 -21
- package/types/examples/plasma_web/components/Tabs/TabItem.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/Tabs.d.ts +2 -2
- package/types/examples/plasma_web/components/Tabs/Tabs.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/horizontal/HorizontalTabs.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/vertical/VerticalTabs.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Toast/Toast.config.d.ts.map +1 -1
- package/cjs/components/DatePicker/DatePickerBase.styles_mjc9xz.css +0 -2
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_1gljtdv.css +0 -2
- package/es/components/DatePicker/DatePickerBase.styles_mjc9xz.css +0 -2
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_1gljtdv.css +0 -2
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
.base_1sq08yf_bxoicu2__bb7a4868{width:var(--plasma-tabs-width);height:var(--plasma-tabs-height);--plasma_private-outline-radius:var(--plasma-tabs-border-radius);border-radius:var(--plasma-tabs-border-radius);}
|
4
4
|
|
5
|
-
.
|
5
|
+
.base_9miwn_bupjtit__d014f2e9{background-color:var(--plasma-tabs-background-color);}.base_9miwn_bupjtit__d014f2e9::after{content:'';position:absolute;bottom:0.125rem;left:0.125rem;right:0.125rem;background:var(--plasma-tabs-divider-color);height:var(--plasma-tabs-divider-height);border-radius:var(--plasma-tabs-divider-border-radius);}.base_9miwn_bupjtit__d014f2e9.base_9miwn_tabsHasLeftArrow__d014f2e9::after{left:1.5rem;}.base_9miwn_bupjtit__d014f2e9.base_9miwn_tabsHasRightArrow__d014f2e9::after{right:1.5rem;}
|
6
6
|
|
7
7
|
.base_j9bg3m_bbh58a1__de7491f9{opacity:var(--plasma-tabs-disabled-opacity);}
|
8
8
|
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
.base_1j9ii1x_b1eicxhd__666b97df.base_1j9ii1x_tabsStretched__666b97df{width:100%;}.base_1j9ii1x_b1eicxhd__666b97df.base_1j9ii1x_tabsStretched__666b97df .base_1j9ii1x_s158pfyo__666b97df,.base_1j9ii1x_b1eicxhd__666b97df.base_1j9ii1x_tabsStretched__666b97df .base_1j9ii1x_s191iwmt__666b97df,.base_1j9ii1x_b1eicxhd__666b97df.base_1j9ii1x_tabsStretched__666b97df .base_1j9ii1x_s191iwmt__666b97df > button{width:100%;margin-left:0;}
|
12
12
|
|
13
|
-
.
|
14
|
-
.
|
15
|
-
.
|
16
|
-
.
|
13
|
+
.HorizontalTabs_styles_16kuvxt_b7gl603__73e81f22{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:0.125rem;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;}
|
14
|
+
.HorizontalTabs_styles_16kuvxt_s191iwmt__73e81f22{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
15
|
+
.HorizontalTabs_styles_16kuvxt_s158pfyo__73e81f22{margin:-0.125rem;padding:0.25rem;box-sizing:content-box;position:relative;height:100%;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;z-index:1;}.HorizontalTabs_styles_16kuvxt_s158pfyo__73e81f22.HorizontalTabs_styles_16kuvxt_tabsClipScroll__73e81f22{overflow:scroll;-webkit-scroll-padding:0.25rem;-moz-scroll-padding:0.25rem;-ms-scroll-padding:0.25rem;scroll-padding:0.25rem;overscroll-behavior:contain;-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;}.HorizontalTabs_styles_16kuvxt_s158pfyo__73e81f22.HorizontalTabs_styles_16kuvxt_tabsClipScroll__73e81f22::-webkit-scrollbar{display:none;}.HorizontalTabs_styles_16kuvxt_s158pfyo__73e81f22.HorizontalTabs_styles_16kuvxt_tabsClipShowAll__73e81f22{overflow:visible;}
|
16
|
+
.HorizontalTabs_styles_16kuvxt_s1in38wj__73e81f22{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;border:none;background-color:transparent;padding:0;outline:none;position:relative;--plasma_private-outer-padding:var(--s1in38wj-0);padding-right:var(--s1in38wj-1);padding-left:var(--s1in38wj-2);}.HorizontalTabs_styles_16kuvxt_s1in38wj__73e81f22::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma_private-outline-radius) - 0.063rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.HorizontalTabs_styles_16kuvxt_s1in38wj__73e81f22.HorizontalTabs_styles_16kuvxt_focusVisible__73e81f22:focus::before,.HorizontalTabs_styles_16kuvxt_s1in38wj__73e81f22[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-tabs-outline-focus-color);}.HorizontalTabs_styles_16kuvxt_s1in38wj__73e81f22[disabled]{cursor:not-allowed;}
|
@@ -17,19 +17,14 @@ var HorizontalTabs_styles = require('./HorizontalTabs.styles.js');
|
|
17
17
|
var IconDisclosureLeft = require('../../../../_Icon/Icons/IconDisclosureLeft.js');
|
18
18
|
var IconDisclosureRight = require('../../../../_Icon/Icons/IconDisclosureRight.js');
|
19
19
|
|
20
|
-
var _excluded = ["id", "stretch", "disabled", "clip", "size", "view", "children", "pilled", "index", "className"
|
20
|
+
var _excluded = ["id", "stretch", "disabled", "clip", "size", "view", "children", "pilled", "index", "className"];
|
21
21
|
var Keys = /*#__PURE__*/function (Keys) {
|
22
22
|
Keys[Keys["end"] = 35] = "end";
|
23
23
|
Keys[Keys["home"] = 36] = "home";
|
24
24
|
Keys[Keys["left"] = 37] = "left";
|
25
25
|
Keys[Keys["right"] = 39] = "right";
|
26
26
|
return Keys;
|
27
|
-
}(Keys || {});
|
28
|
-
var getIconSize = function getIconSize(size) {
|
29
|
-
return size === 'h1' || size === 'h2' ? 'm' : 's';
|
30
|
-
};
|
31
|
-
|
32
|
-
// TODO: https://github.com/salute-developers/plasma/issues/1474
|
27
|
+
}(Keys || {}); // TODO: https://github.com/salute-developers/plasma/issues/1474
|
33
28
|
var horizontalTabsRoot = function horizontalTabsRoot(Root) {
|
34
29
|
return /*#__PURE__*/React.forwardRef(function (props, outerRef) {
|
35
30
|
var id = props.id,
|
@@ -46,8 +41,6 @@ var horizontalTabsRoot = function horizontalTabsRoot(Root) {
|
|
46
41
|
pilled = _props$pilled === void 0 ? false : _props$pilled,
|
47
42
|
index$1 = props.index,
|
48
43
|
className = props.className,
|
49
|
-
_props$hasDivider = props.hasDivider,
|
50
|
-
hasDivider = _props$hasDivider === void 0 ? true : _props$hasDivider,
|
51
44
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(props, _excluded);
|
52
45
|
var _useState = React.useState(true),
|
53
46
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
@@ -65,7 +58,6 @@ var horizontalTabsRoot = function horizontalTabsRoot(Root) {
|
|
65
58
|
var isFilled = view === 'filled'; // outer padding is only for filled view
|
66
59
|
var pilledAttr = view !== 'clear' && pilled;
|
67
60
|
var pilledClass = pilledAttr ? tokens.classes.tabsPilled : undefined;
|
68
|
-
var noDividerClass = !hasDivider ? tokens.classes.tabsNoDivider : undefined;
|
69
61
|
var stretchClass = firstItemVisible && lastItemVisible && stretch ? tokens.classes.tabsStretch : undefined;
|
70
62
|
var hasLeftArrowClass = !firstItemVisible ? tokens.classes.tabsHasLeftArrow : undefined;
|
71
63
|
var hasRightArrowClass = !lastItemVisible ? tokens.classes.tabsHasRightArrow : undefined;
|
@@ -121,10 +113,9 @@ var horizontalTabsRoot = function horizontalTabsRoot(Root) {
|
|
121
113
|
ref: leftArrowRef,
|
122
114
|
isLeftArrow: true
|
123
115
|
}, /*#__PURE__*/React.createElement(IconDisclosureLeft.IconDisclosureLeft, {
|
124
|
-
|
125
|
-
color: "inherit"
|
116
|
+
color: "var(".concat(tokens.tokens.arrowColor, ")")
|
126
117
|
}));
|
127
|
-
}, [onPrev,
|
118
|
+
}, [onPrev, disabled, isFilled]);
|
128
119
|
var NextButton = React.useMemo(function () {
|
129
120
|
return /*#__PURE__*/React.createElement(HorizontalTabs_styles.StyledArrow, {
|
130
121
|
type: "button",
|
@@ -134,10 +125,9 @@ var horizontalTabsRoot = function horizontalTabsRoot(Root) {
|
|
134
125
|
disabled: disabled,
|
135
126
|
isFilled: isFilled
|
136
127
|
}, /*#__PURE__*/React.createElement(IconDisclosureRight.IconDisclosureRight, {
|
137
|
-
|
138
|
-
color: "inherit"
|
128
|
+
color: "var(".concat(tokens.tokens.arrowColor, ")")
|
139
129
|
}));
|
140
|
-
}, [onNext,
|
130
|
+
}, [onNext, disabled, isFilled]);
|
141
131
|
var handleScroll = React.useCallback(function (event) {
|
142
132
|
event.stopPropagation();
|
143
133
|
var maxScrollLeft = event.currentTarget.scrollWidth - event.currentTarget.clientWidth;
|
@@ -197,15 +187,13 @@ var horizontalTabsRoot = function horizontalTabsRoot(Root) {
|
|
197
187
|
value: refs
|
198
188
|
}, /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
|
199
189
|
view: view,
|
200
|
-
role: "tablist"
|
201
|
-
// TODO: убрать каст any, когда будут удалены deprecated props
|
202
|
-
,
|
190
|
+
role: "tablist",
|
203
191
|
size: size,
|
204
192
|
pilled: pilled,
|
205
193
|
id: tabsId,
|
206
194
|
ref: outerRef,
|
207
195
|
disabled: disabled,
|
208
|
-
className: index.cx(pilledClass, stretchClass, hasLeftArrowClass, hasRightArrowClass,
|
196
|
+
className: index.cx(pilledClass, stretchClass, hasLeftArrowClass, hasRightArrowClass, className),
|
209
197
|
onKeyDown: onKeyDown
|
210
198
|
}, rest), !firstItemVisible && PreviousButton, /*#__PURE__*/React.createElement(HorizontalTabs_styles.StyledContentWrapper, {
|
211
199
|
className: index.cx(clipScrollClass, clipShowAllClass),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"HorizontalTabs.js","sources":["../../../../../../src/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo, useState, useEffect, useRef, KeyboardEvent } from 'react';\nimport type { MutableRefObject } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../../../../engines/types';\nimport { IconDisclosureLeft, IconDisclosureRight } from '../../../../_Icon';\nimport { classes } from '../../../tokens';\nimport { cx } from '../../../../../utils';\nimport { TabItemRefs, TabsContext } from '../../../TabsContext';\nimport type { HorizontalTabsProps } from '../../../Tabs.types';\n\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as pilledCSS } from './variations/_pilled/base';\nimport { base as stretchCSS } from './variations/_stretch/base';\nimport { StyledArrow, StyledContent, StyledContentWrapper, base } from './HorizontalTabs.styles';\n\nenum Keys {\n end = 35,\n home = 36,\n left = 37,\n right = 39,\n}\n\nconst getIconSize = (size?: string) => {\n return size === 'h1' || size === 'h2' ? 'm' : 's';\n};\n\n// TODO: https://github.com/salute-developers/plasma/issues/1474\nexport const horizontalTabsRoot = (Root: RootProps<HTMLDivElement, HorizontalTabsProps>) =>\n forwardRef<HTMLDivElement, HorizontalTabsProps>((props, outerRef) => {\n const {\n id,\n stretch = false,\n disabled = false,\n clip = 'scroll',\n size,\n view,\n children,\n pilled = false,\n index,\n className,\n hasDivider = true,\n ...rest\n } = props;\n const [firstItemVisible, setFirstItemVisible] = useState(true);\n const [lastItemVisible, setLastItemVisible] = useState(true);\n\n const refs = useMemo(() => new TabItemRefs(index), []);\n\n const uniqId = safeUseId();\n const tabsId = id || uniqId;\n\n const isFilled = view === 'filled'; // outer padding is only for filled view\n const pilledAttr = view !== 'clear' && pilled;\n const pilledClass = pilledAttr ? classes.tabsPilled : undefined;\n\n const noDividerClass = !hasDivider ? classes.tabsNoDivider : undefined;\n const stretchClass = firstItemVisible && lastItemVisible && stretch ? classes.tabsStretch : undefined;\n const hasLeftArrowClass = !firstItemVisible ? classes.tabsHasLeftArrow : undefined;\n const hasRightArrowClass = !lastItemVisible ? classes.tabsHasRightArrow : undefined;\n const clipScrollClass = clip === 'scroll' ? classes.tabsClipScroll : undefined;\n const clipShowAllClass = clip === 'showAll' ? classes.tabsClipShowAll : undefined;\n\n const scrollRef = useRef<HTMLElement | null>(null);\n const trackRef = useRef<HTMLElement | null>(null);\n const leftArrowRef = useRef<HTMLButtonElement | null>(null);\n\n const onPrev = useCallback(() => {\n if (disabled || !scrollRef.current) {\n return;\n }\n\n const scrollLeft = Math.round(scrollRef.current.scrollLeft);\n const firstOverflowingTab = refs.items\n .slice()\n .reverse()\n .find((item: MutableRefObject<HTMLElement | null>) => {\n if (!item.current || item.current.offsetLeft === undefined) {\n return;\n }\n const tabStartX = item.current.offsetLeft;\n\n return tabStartX < scrollLeft;\n });\n\n firstOverflowingTab?.current?.scrollIntoView({ block: 'nearest', inline: 'start' });\n }, [disabled, scrollRef, refs]);\n\n const onNext = useCallback(() => {\n if (disabled || !scrollRef.current) {\n return;\n }\n\n const scrollRight = Math.round(scrollRef.current.scrollLeft + scrollRef.current.clientWidth);\n const lastOverflowingTab = refs.items.find((item: MutableRefObject<HTMLElement | null>) => {\n if (!item.current || item.current.offsetLeft === undefined) {\n return;\n }\n const tabEndX = item.current.offsetLeft + item.current.offsetWidth;\n\n return tabEndX > scrollRight;\n });\n\n lastOverflowingTab?.current?.scrollIntoView({ block: 'nearest', inline: 'end' });\n }, [disabled, scrollRef, refs]);\n\n const PreviousButton = useMemo(\n () => (\n <StyledArrow\n type=\"button\"\n aria-label=\"Предыдущий таб\"\n onClick={onPrev}\n tabIndex={disabled ? -1 : 0}\n disabled={disabled}\n isFilled={isFilled}\n ref={leftArrowRef}\n isLeftArrow\n >\n <IconDisclosureLeft size={getIconSize(size)} color=\"inherit\" />\n </StyledArrow>\n ),\n [onPrev, size, disabled, isFilled],\n );\n\n const NextButton = useMemo(\n () => (\n <StyledArrow\n type=\"button\"\n aria-label=\"Следующий таб\"\n onClick={onNext}\n tabIndex={disabled ? -1 : 0}\n disabled={disabled}\n isFilled={isFilled}\n >\n <IconDisclosureRight size={getIconSize(size)} color=\"inherit\" />\n </StyledArrow>\n ),\n [onNext, size, disabled, isFilled],\n );\n\n const handleScroll = useCallback(\n (event: React.UIEvent<HTMLElement>): void => {\n event.stopPropagation();\n const maxScrollLeft = event.currentTarget.scrollWidth - event.currentTarget.clientWidth;\n const scrollLeft = Math.round(event.currentTarget.scrollLeft);\n\n setFirstItemVisible(scrollLeft <= 0);\n setLastItemVisible(scrollLeft >= maxScrollLeft);\n },\n [setFirstItemVisible, setLastItemVisible],\n );\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (index === undefined) {\n return;\n }\n\n const minIndex = 0;\n const maxIndex = refs.items.length - 1;\n let nextIndex: number;\n\n switch (event.keyCode) {\n case Keys.end:\n nextIndex = maxIndex;\n break;\n case Keys.left:\n nextIndex = index > minIndex ? index - 1 : index;\n break;\n case Keys.right:\n nextIndex = index < maxIndex ? index + 1 : index;\n break;\n case Keys.home:\n nextIndex = minIndex;\n break;\n default:\n return;\n }\n\n if (nextIndex !== index) {\n event.preventDefault();\n refs.items[nextIndex].current?.focus();\n refs.items[nextIndex].current?.scrollIntoView({\n block: 'nearest',\n inline: 'center',\n behavior: 'smooth',\n });\n }\n },\n [index],\n );\n\n useEffect(() => {\n setLastItemVisible(scrollRef.current?.scrollWidth === scrollRef.current?.clientWidth);\n }, []);\n\n // Этот хук компенсирует появление левой стрелки при прокрутке\n useEffect(() => {\n if (firstItemVisible || !scrollRef.current || !leftArrowRef.current) {\n return;\n }\n\n scrollRef.current.scrollTo({\n left: Math.round(scrollRef.current.scrollLeft + leftArrowRef.current.clientWidth),\n });\n }, [firstItemVisible, scrollRef, leftArrowRef]);\n\n return (\n <TabsContext.Provider value={refs}>\n <Root\n view={view}\n role=\"tablist\"\n // TODO: убрать каст any, когда будут удалены deprecated props\n size={size as any}\n pilled={pilled}\n id={tabsId}\n ref={outerRef}\n disabled={disabled}\n className={cx(\n pilledClass,\n stretchClass,\n hasLeftArrowClass,\n hasRightArrowClass,\n noDividerClass,\n className,\n )}\n onKeyDown={onKeyDown}\n {...rest}\n >\n {!firstItemVisible && PreviousButton}\n <StyledContentWrapper\n className={cx(clipScrollClass, clipShowAllClass)}\n ref={scrollRef as MutableRefObject<HTMLDivElement | null>}\n onScroll={handleScroll}\n >\n <StyledContent ref={trackRef as MutableRefObject<HTMLDivElement | null>}>\n {children}\n </StyledContent>\n </StyledContentWrapper>\n {!lastItemVisible && NextButton}\n </Root>\n </TabsContext.Provider>\n );\n });\n\nexport const horizontalTabsConfig = {\n name: 'HorizontalTabs',\n tag: 'div',\n layout: horizontalTabsRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n stretch: {\n css: stretchCSS,\n attrs: true,\n },\n pilled: {\n css: pilledCSS,\n },\n },\n defaults: {\n view: 'clear',\n size: 'xs',\n },\n};\n"],"names":["Keys","getIconSize","size","horizontalTabsRoot","Root","forwardRef","props","outerRef","id","_props$stretch","stretch","_props$disabled","disabled","_props$clip","clip","view","children","_props$pilled","pilled","index","className","_props$hasDivider","hasDivider","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","firstItemVisible","setFirstItemVisible","_useState3","_useState4","lastItemVisible","setLastItemVisible","refs","useMemo","TabItemRefs","uniqId","safeUseId","tabsId","isFilled","pilledAttr","pilledClass","classes","tabsPilled","undefined","noDividerClass","tabsNoDivider","stretchClass","tabsStretch","hasLeftArrowClass","tabsHasLeftArrow","hasRightArrowClass","tabsHasRightArrow","clipScrollClass","tabsClipScroll","clipShowAllClass","tabsClipShowAll","scrollRef","useRef","trackRef","leftArrowRef","onPrev","useCallback","_firstOverflowingTab$","current","scrollLeft","Math","round","firstOverflowingTab","items","slice","reverse","find","item","offsetLeft","tabStartX","scrollIntoView","block","inline","onNext","_lastOverflowingTab$c","scrollRight","clientWidth","lastOverflowingTab","tabEndX","offsetWidth","PreviousButton","React","createElement","StyledArrow","type","onClick","tabIndex","ref","isLeftArrow","IconDisclosureLeft","color","NextButton","IconDisclosureRight","handleScroll","event","stopPropagation","maxScrollLeft","currentTarget","scrollWidth","onKeyDown","minIndex","maxIndex","length","nextIndex","keyCode","end","left","right","home","_refs$items$nextIndex","_refs$items$nextIndex2","preventDefault","focus","behavior","useEffect","_scrollRef$current","_scrollRef$current2","scrollTo","TabsContext","Provider","value","_extends","role","cx","StyledContentWrapper","onScroll","StyledContent","horizontalTabsConfig","name","tag","layout","base","variations","css","sizeCSS","viewCSS","disabledCSS","attrs","stretchCSS","pilledCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgBiG,IAE5FA,IAAI,0BAAJA,IAAI,EAAA;AAAJA,EAAAA,IAAI,CAAJA,IAAI,CAAA,KAAA,CAAA,GAAA,EAAA,CAAA,GAAA,KAAA,CAAA;AAAJA,EAAAA,IAAI,CAAJA,IAAI,CAAA,MAAA,CAAA,GAAA,EAAA,CAAA,GAAA,MAAA,CAAA;AAAJA,EAAAA,IAAI,CAAJA,IAAI,CAAA,MAAA,CAAA,GAAA,EAAA,CAAA,GAAA,MAAA,CAAA;AAAJA,EAAAA,IAAI,CAAJA,IAAI,CAAA,OAAA,CAAA,GAAA,EAAA,CAAA,GAAA,OAAA,CAAA;AAAA,EAAA,OAAJA,IAAI,CAAA;AAAA,CAAA,CAAJA,IAAI,IAAA,EAAA,CAAA,CAAA;AAOT,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAIC,IAAa,EAAK;EACnC,OAAOA,IAAI,KAAK,IAAI,IAAIA,IAAI,KAAK,IAAI,GAAG,GAAG,GAAG,GAAG,CAAA;AACrD,CAAC,CAAA;;AAED;IACaC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,IAAoD,EAAA;A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f9C,EAAAA,QACU,CACG,CAAC,EACtB,CAACkB,eAAe,IAAIkE,UACnB,CACY,CAAC,CAAA;AAE/B,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMoC,oBAAoB,GAAG;AAChCC,EAAAA,IAAI,EAAE,gBAAgB;AACtBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAExI,kBAAkB;AAC1ByI,EAAAA,IAAI,EAAJA,0BAAI;AACJC,EAAAA,UAAU,EAAE;AACR3I,IAAAA,IAAI,EAAE;AACF4I,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDhI,IAAAA,IAAI,EAAE;AACF+H,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACDpI,IAAAA,QAAQ,EAAE;AACNkI,MAAAA,GAAG,EAAEG,WAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDxI,IAAAA,OAAO,EAAE;AACLoI,MAAAA,GAAG,EAAEK,WAAU;AACfD,MAAAA,KAAK,EAAE,IAAA;KACV;AACDhI,IAAAA,MAAM,EAAE;AACJ4H,MAAAA,GAAG,EAAEM,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNtI,IAAAA,IAAI,EAAE,OAAO;AACbb,IAAAA,IAAI,EAAE,IAAA;AACV,GAAA;AACJ;;;;;"}
|
1
|
+
{"version":3,"file":"HorizontalTabs.js","sources":["../../../../../../src/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo, useState, useEffect, useRef, KeyboardEvent } from 'react';\nimport type { MutableRefObject } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../../../../engines/types';\nimport { IconDisclosureLeft, IconDisclosureRight } from '../../../../_Icon';\nimport { classes, tokens } from '../../../tokens';\nimport { cx } from '../../../../../utils';\nimport { TabItemRefs, TabsContext } from '../../../TabsContext';\nimport type { HorizontalTabsProps } from '../../../Tabs.types';\n\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as pilledCSS } from './variations/_pilled/base';\nimport { base as stretchCSS } from './variations/_stretch/base';\nimport { StyledArrow, StyledContent, StyledContentWrapper, base } from './HorizontalTabs.styles';\n\nenum Keys {\n end = 35,\n home = 36,\n left = 37,\n right = 39,\n}\n\n// TODO: https://github.com/salute-developers/plasma/issues/1474\nexport const horizontalTabsRoot = (Root: RootProps<HTMLDivElement, HorizontalTabsProps>) =>\n forwardRef<HTMLDivElement, HorizontalTabsProps>((props, outerRef) => {\n const {\n id,\n stretch = false,\n disabled = false,\n clip = 'scroll',\n size,\n view,\n children,\n pilled = false,\n index,\n className,\n ...rest\n } = props;\n const [firstItemVisible, setFirstItemVisible] = useState(true);\n const [lastItemVisible, setLastItemVisible] = useState(true);\n\n const refs = useMemo(() => new TabItemRefs(index), []);\n\n const uniqId = safeUseId();\n const tabsId = id || uniqId;\n\n const isFilled = view === 'filled'; // outer padding is only for filled view\n const pilledAttr = view !== 'clear' && pilled;\n const pilledClass = pilledAttr ? classes.tabsPilled : undefined;\n\n const stretchClass = firstItemVisible && lastItemVisible && stretch ? classes.tabsStretch : undefined;\n const hasLeftArrowClass = !firstItemVisible ? classes.tabsHasLeftArrow : undefined;\n const hasRightArrowClass = !lastItemVisible ? classes.tabsHasRightArrow : undefined;\n const clipScrollClass = clip === 'scroll' ? classes.tabsClipScroll : undefined;\n const clipShowAllClass = clip === 'showAll' ? classes.tabsClipShowAll : undefined;\n\n const scrollRef = useRef<HTMLElement | null>(null);\n const trackRef = useRef<HTMLElement | null>(null);\n const leftArrowRef = useRef<HTMLButtonElement | null>(null);\n\n const onPrev = useCallback(() => {\n if (disabled || !scrollRef.current) {\n return;\n }\n\n const scrollLeft = Math.round(scrollRef.current.scrollLeft);\n const firstOverflowingTab = refs.items\n .slice()\n .reverse()\n .find((item: MutableRefObject<HTMLElement | null>) => {\n if (!item.current || item.current.offsetLeft === undefined) {\n return;\n }\n const tabStartX = item.current.offsetLeft;\n\n return tabStartX < scrollLeft;\n });\n\n firstOverflowingTab?.current?.scrollIntoView({ block: 'nearest', inline: 'start' });\n }, [disabled, scrollRef, refs]);\n\n const onNext = useCallback(() => {\n if (disabled || !scrollRef.current) {\n return;\n }\n\n const scrollRight = Math.round(scrollRef.current.scrollLeft + scrollRef.current.clientWidth);\n const lastOverflowingTab = refs.items.find((item: MutableRefObject<HTMLElement | null>) => {\n if (!item.current || item.current.offsetLeft === undefined) {\n return;\n }\n const tabEndX = item.current.offsetLeft + item.current.offsetWidth;\n\n return tabEndX > scrollRight;\n });\n\n lastOverflowingTab?.current?.scrollIntoView({ block: 'nearest', inline: 'end' });\n }, [disabled, scrollRef, refs]);\n\n const PreviousButton = useMemo(\n () => (\n <StyledArrow\n type=\"button\"\n aria-label=\"Предыдущий таб\"\n onClick={onPrev}\n tabIndex={disabled ? -1 : 0}\n disabled={disabled}\n isFilled={isFilled}\n ref={leftArrowRef}\n isLeftArrow\n >\n <IconDisclosureLeft color={`var(${tokens.arrowColor})`} />\n </StyledArrow>\n ),\n [onPrev, disabled, isFilled],\n );\n\n const NextButton = useMemo(\n () => (\n <StyledArrow\n type=\"button\"\n aria-label=\"Следующий таб\"\n onClick={onNext}\n tabIndex={disabled ? -1 : 0}\n disabled={disabled}\n isFilled={isFilled}\n >\n <IconDisclosureRight color={`var(${tokens.arrowColor})`} />\n </StyledArrow>\n ),\n [onNext, disabled, isFilled],\n );\n\n const handleScroll = useCallback(\n (event: React.UIEvent<HTMLElement>): void => {\n event.stopPropagation();\n const maxScrollLeft = event.currentTarget.scrollWidth - event.currentTarget.clientWidth;\n const scrollLeft = Math.round(event.currentTarget.scrollLeft);\n\n setFirstItemVisible(scrollLeft <= 0);\n setLastItemVisible(scrollLeft >= maxScrollLeft);\n },\n [setFirstItemVisible, setLastItemVisible],\n );\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (index === undefined) {\n return;\n }\n\n const minIndex = 0;\n const maxIndex = refs.items.length - 1;\n let nextIndex: number;\n\n switch (event.keyCode) {\n case Keys.end:\n nextIndex = maxIndex;\n break;\n case Keys.left:\n nextIndex = index > minIndex ? index - 1 : index;\n break;\n case Keys.right:\n nextIndex = index < maxIndex ? index + 1 : index;\n break;\n case Keys.home:\n nextIndex = minIndex;\n break;\n default:\n return;\n }\n\n if (nextIndex !== index) {\n event.preventDefault();\n refs.items[nextIndex].current?.focus();\n refs.items[nextIndex].current?.scrollIntoView({\n block: 'nearest',\n inline: 'center',\n behavior: 'smooth',\n });\n }\n },\n [index],\n );\n\n useEffect(() => {\n setLastItemVisible(scrollRef.current?.scrollWidth === scrollRef.current?.clientWidth);\n }, []);\n\n // Этот хук компенсирует появление левой стрелки при прокрутке\n useEffect(() => {\n if (firstItemVisible || !scrollRef.current || !leftArrowRef.current) {\n return;\n }\n\n scrollRef.current.scrollTo({\n left: Math.round(scrollRef.current.scrollLeft + leftArrowRef.current.clientWidth),\n });\n }, [firstItemVisible, scrollRef, leftArrowRef]);\n\n return (\n <TabsContext.Provider value={refs}>\n <Root\n view={view}\n role=\"tablist\"\n size={size}\n pilled={pilled}\n id={tabsId}\n ref={outerRef}\n disabled={disabled}\n className={cx(pilledClass, stretchClass, hasLeftArrowClass, hasRightArrowClass, className)}\n onKeyDown={onKeyDown}\n {...rest}\n >\n {!firstItemVisible && PreviousButton}\n <StyledContentWrapper\n className={cx(clipScrollClass, clipShowAllClass)}\n ref={scrollRef as MutableRefObject<HTMLDivElement | null>}\n onScroll={handleScroll}\n >\n <StyledContent ref={trackRef as MutableRefObject<HTMLDivElement | null>}>\n {children}\n </StyledContent>\n </StyledContentWrapper>\n {!lastItemVisible && NextButton}\n </Root>\n </TabsContext.Provider>\n );\n });\n\nexport const horizontalTabsConfig = {\n name: 'HorizontalTabs',\n tag: 'div',\n layout: horizontalTabsRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n stretch: {\n css: stretchCSS,\n attrs: true,\n },\n pilled: {\n css: pilledCSS,\n },\n },\n defaults: {\n view: 'clear',\n size: 'xs',\n },\n};\n"],"names":["Keys","horizontalTabsRoot","Root","forwardRef","props","outerRef","id","_props$stretch","stretch","_props$disabled","disabled","_props$clip","clip","size","view","children","_props$pilled","pilled","index","className","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","firstItemVisible","setFirstItemVisible","_useState3","_useState4","lastItemVisible","setLastItemVisible","refs","useMemo","TabItemRefs","uniqId","safeUseId","tabsId","isFilled","pilledAttr","pilledClass","classes","tabsPilled","undefined","stretchClass","tabsStretch","hasLeftArrowClass","tabsHasLeftArrow","hasRightArrowClass","tabsHasRightArrow","clipScrollClass","tabsClipScroll","clipShowAllClass","tabsClipShowAll","scrollRef","useRef","trackRef","leftArrowRef","onPrev","useCallback","_firstOverflowingTab$","current","scrollLeft","Math","round","firstOverflowingTab","items","slice","reverse","find","item","offsetLeft","tabStartX","scrollIntoView","block","inline","onNext","_lastOverflowingTab$c","scrollRight","clientWidth","lastOverflowingTab","tabEndX","offsetWidth","PreviousButton","React","createElement","StyledArrow","type","onClick","tabIndex","ref","isLeftArrow","IconDisclosureLeft","color","concat","tokens","arrowColor","NextButton","IconDisclosureRight","handleScroll","event","stopPropagation","maxScrollLeft","currentTarget","scrollWidth","onKeyDown","minIndex","maxIndex","length","nextIndex","keyCode","end","left","right","home","_refs$items$nextIndex","_refs$items$nextIndex2","preventDefault","focus","behavior","useEffect","_scrollRef$current","_scrollRef$current2","scrollTo","TabsContext","Provider","value","_extends","role","cx","StyledContentWrapper","onScroll","StyledContent","horizontalTabsConfig","name","tag","layout","base","variations","css","sizeCSS","viewCSS","disabledCSS","attrs","stretchCSS","pilledCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgBiG,IAE5FA,IAAI,0BAAJA,IAAI,EA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EAAA;AACjBhH,MAAAA,SAAS,EAAE+G,QAAE,CAAC/E,eAAe,EAAEE,gBAAgB,CAAE;AACjDsC,MAAAA,GAAG,EAAEpC,SAAqD;AAC1D6E,MAAAA,QAAQ,EAAEhC,YAAAA;AAAa,KAAA,eAEvBf,KAAA,CAAAC,aAAA,CAAC+C,mCAAa,EAAA;AAAC1C,MAAAA,GAAG,EAAElC,QAAAA;KACf1C,EAAAA,QACU,CACG,CAAC,EACtB,CAACgB,eAAe,IAAImE,UACnB,CACY,CAAC,CAAA;AAE/B,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMoC,oBAAoB,GAAG;AAChCC,EAAAA,IAAI,EAAE,gBAAgB;AACtBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAExI,kBAAkB;AAC1ByI,EAAAA,IAAI,EAAJA,0BAAI;AACJC,EAAAA,UAAU,EAAE;AACR9H,IAAAA,IAAI,EAAE;AACF+H,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD/H,IAAAA,IAAI,EAAE;AACF8H,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACDpI,IAAAA,QAAQ,EAAE;AACNkI,MAAAA,GAAG,EAAEG,WAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDxI,IAAAA,OAAO,EAAE;AACLoI,MAAAA,GAAG,EAAEK,WAAU;AACfD,MAAAA,KAAK,EAAE,IAAA;KACV;AACD/H,IAAAA,MAAM,EAAE;AACJ2H,MAAAA,GAAG,EAAEM,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNrI,IAAAA,IAAI,EAAE,OAAO;AACbD,IAAAA,IAAI,EAAE,IAAA;AACV,GAAA;AACJ;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"HorizontalTabs.styles.js","sources":["../../../../../../src/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { addFocus } from '../../../../../mixins';\nimport { classes, tokens } from '../../../tokens';\n\nexport const base = css`\n display: flex;\n gap: 0.125rem;\n align-items: center;\n position: relative;\n`;\n\nexport const StyledContent = styled.div`\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n`;\n\nexport const StyledContentWrapper = styled.div`\n /* allows correctly display outline focus on tabs item */\n margin: -0.125rem;\n padding: 0.25rem;\n\n box-sizing: content-box;\n position: relative;\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n\n z-index: 1;\n\n &.${classes.tabsClipScroll} {\n overflow: scroll;\n scroll-padding: 0.25rem;\n overscroll-behavior: contain;\n\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n }\n\n &.${classes.tabsClipShowAll} {\n overflow: visible;\n }\n`;\n\nexport const StyledArrow = styled.button<{ isLeftArrow?: boolean; isFilled?: boolean }>`\n display: flex;\n cursor: pointer;\n border: none;\n background-color: transparent;\n padding: 0;\n outline: none;\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.outlineFocusColor})`,\n outlineRadius: 'calc(var(--plasma_private-outline-radius) - 0.063rem)',\n })};\n\n &[disabled] {\n cursor: not-allowed;\n }\n\n --plasma_private-outer-padding: ${({ isFilled }) => (isFilled ? `var(${tokens.arrowOuterPadding})` : '')};\n\n padding-right: ${({ isLeftArrow }) =>\n isLeftArrow ? `var(${tokens.arrowInnerPadding})` : 'var(--plasma_private-outer-padding)'};\n padding-left: ${({ isLeftArrow }) =>\n isLeftArrow ? 'var(--plasma_private-outer-padding)' : `var(${tokens.arrowInnerPadding})`};\n
|
1
|
+
{"version":3,"file":"HorizontalTabs.styles.js","sources":["../../../../../../src/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { addFocus } from '../../../../../mixins';\nimport { classes, tokens } from '../../../tokens';\n\nexport const base = css`\n display: flex;\n gap: 0.125rem;\n align-items: center;\n position: relative;\n`;\n\nexport const StyledContent = styled.div`\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n`;\n\nexport const StyledContentWrapper = styled.div`\n /* allows correctly display outline focus on tabs item */\n margin: -0.125rem;\n padding: 0.25rem;\n\n box-sizing: content-box;\n position: relative;\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n\n z-index: 1;\n\n &.${classes.tabsClipScroll} {\n overflow: scroll;\n scroll-padding: 0.25rem;\n overscroll-behavior: contain;\n\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n }\n\n &.${classes.tabsClipShowAll} {\n overflow: visible;\n }\n`;\n\nexport const StyledArrow = styled.button<{ isLeftArrow?: boolean; isFilled?: boolean }>`\n display: flex;\n cursor: pointer;\n border: none;\n background-color: transparent;\n padding: 0;\n outline: none;\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.outlineFocusColor})`,\n outlineRadius: 'calc(var(--plasma_private-outline-radius) - 0.063rem)',\n })};\n\n &[disabled] {\n cursor: not-allowed;\n }\n\n --plasma_private-outer-padding: ${({ isFilled }) => (isFilled ? `var(${tokens.arrowOuterPadding})` : '')};\n\n padding-right: ${({ isLeftArrow }) =>\n isLeftArrow ? `var(${tokens.arrowInnerPadding})` : 'var(--plasma_private-outer-padding)'};\n padding-left: ${({ isLeftArrow }) =>\n isLeftArrow ? 'var(--plasma_private-outer-padding)' : `var(${tokens.arrowInnerPadding})`};\n`;\n"],"names":["base","StyledContent","styled","name","class","propsAsIs","StyledContentWrapper","_exp4","_ref","isFilled","concat","tokens","arrowOuterPadding","_exp5","_ref2","isLeftArrow","arrowInnerPadding","_exp6","_ref3","StyledArrow","vars"],"mappings":";;;;;;;AAMO,IAAMA,IAAI,GAKhB,UAAA;AAEM,IAAMC,aAAa,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAA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AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAe,EAAAA,IAAA,EAAA;AAAA,IAAA,YAAA,EAAA,cAmBKb,KAAsE,EAAA,CAAA;AAAA,IAAA,YAAA,EAAA,cAEvFM,KAC2E,EAAA,CAAA;AAAA,IAAA,YAAA,EAAA,cAC5EI,KAC4E,EAAA,CAAA;AAAA,GAAA;AAAA,CAC/F;;;;;;;"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
.b7gl603{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:0.125rem;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;}
|
2
2
|
.s191iwmt{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
3
3
|
.s158pfyo{margin:-0.125rem;padding:0.25rem;box-sizing:content-box;position:relative;height:100%;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;z-index:1;}.s158pfyo.tabs-clip-scroll{overflow:scroll;-webkit-scroll-padding:0.25rem;-moz-scroll-padding:0.25rem;-ms-scroll-padding:0.25rem;scroll-padding:0.25rem;overscroll-behavior:contain;-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;}.s158pfyo.tabs-clip-scroll::-webkit-scrollbar{display:none;}.s158pfyo.tabs-clip-show-all{overflow:visible;}
|
4
|
-
.s1in38wj{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;border:none;background-color:transparent;padding:0;outline:none;position:relative;--plasma_private-outer-padding:var(--s1in38wj-0);padding-right:var(--s1in38wj-1);padding-left:var(--s1in38wj-2);
|
4
|
+
.s1in38wj{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;border:none;background-color:transparent;padding:0;outline:none;position:relative;--plasma_private-outer-padding:var(--s1in38wj-0);padding-right:var(--s1in38wj-1);padding-left:var(--s1in38wj-2);}.s1in38wj::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma_private-outline-radius) - 0.063rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.s1in38wj.focus-visible:focus::before,.s1in38wj[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-tabs-outline-focus-color);}.s1in38wj[disabled]{cursor:not-allowed;}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"base.js","sources":["../../../../../../../../src/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from '../../../../../tokens';\n\nexport const base = css`\n background-color: var(${tokens.tabsBackgroundColor});\n\n &::after {\n content: '';\n position: absolute;\n bottom: 0.125rem;\n left: 0.125rem;\n right: 0.125rem;\n background: var(${tokens.tabsDividerColor});\n height: var(${tokens.tabsDividerHeight});\n border-radius: var(${tokens.tabsDividerBorderRadius});\n }\n\n &.${classes.tabsHasLeftArrow} {\n &::after {\n left: 1.5rem;\n }\n }\n\n &.${classes.tabsHasRightArrow} {\n &::after {\n right: 1.5rem;\n }\n }\n
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../../../../src/components/Tabs/ui/horizontal/HorizontalTabs/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from '../../../../../tokens';\n\nexport const base = css`\n background-color: var(${tokens.tabsBackgroundColor});\n\n &::after {\n content: '';\n position: absolute;\n bottom: 0.125rem;\n left: 0.125rem;\n right: 0.125rem;\n background: var(${tokens.tabsDividerColor});\n height: var(${tokens.tabsDividerHeight});\n border-radius: var(${tokens.tabsDividerBorderRadius});\n }\n\n &.${classes.tabsHasLeftArrow} {\n &::after {\n left: 1.5rem;\n }\n }\n\n &.${classes.tabsHasRightArrow} {\n &::after {\n right: 1.5rem;\n }\n }\n`;\n"],"names":["base"],"mappings":";;;;AAIO,IAAMA,IAAI,GAyBhB;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
.bupjtit{background-color:var(--plasma-tabs-background-color);}.bupjtit::after{content:'';position:absolute;bottom:0.125rem;left:0.125rem;right:0.125rem;background:var(--plasma-tabs-divider-color);height:var(--plasma-tabs-divider-height);border-radius:var(--plasma-tabs-divider-border-radius);}.bupjtit.tabs-has-left-arrow::after{left:1.5rem;}.bupjtit.tabs-has-right-arrow::after{right:1.5rem;}
|
1
|
+
.bupjtit{background-color:var(--plasma-tabs-background-color);}.bupjtit::after{content:'';position:absolute;bottom:0.125rem;left:0.125rem;right:0.125rem;background:var(--plasma-tabs-divider-color);height:var(--plasma-tabs-divider-height);border-radius:var(--plasma-tabs-divider-border-radius);}.bupjtit.tabs-has-left-arrow::after{left:1.5rem;}.bupjtit.tabs-has-right-arrow::after{right:1.5rem;}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
.
|
2
|
-
.
|
3
|
-
.
|
4
|
-
.
|
5
|
-
.
|
1
|
+
.VerticalTabItem_styles_1g7zipg_b1vnvg8i__043363c5{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;box-sizing:border-box;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-tab-item-content-gap);padding:var(--plasma-tab-item-padding-orientation-vertical);-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;outline:none;cursor:pointer;-webkit-tap-highlight-color:transparent;position:relative;}.VerticalTabItem_styles_1g7zipg_b1vnvg8i__043363c5::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma_private-outline-radius) + 0.063rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.VerticalTabItem_styles_1g7zipg_b1vnvg8i__043363c5.VerticalTabItem_styles_1g7zipg_focusVisible__043363c5:focus::before,.VerticalTabItem_styles_1g7zipg_b1vnvg8i__043363c5[data-focus-visible-added]::before{z-index:1;outline:none;box-shadow:0 0 0 0.063rem var(--plasma-tabs-outline-focus-color);}
|
2
|
+
.VerticalTabItem_styles_1g7zipg_s4s0t81__043363c5{display:inline-block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0 var(--plasma-tab-item-content-padding-clear,var(--plasma-tab-item-content-padding));}
|
3
|
+
.VerticalTabItem_styles_1g7zipg_tur46hh__043363c5{color:var(--plasma-tab-item-value-color);font-family:var(--plasma-tab-item-value-font-family,var(--plasma-tab-item-font-family));font-size:var(--plasma-tab-item-value-font-size,var(--plasma-tab-item-font-size));font-style:var(--plasma-tab-item-value-font-style,var(--plasma-tab-item-font-style));font-weight:var(--plasma-tab-item-value-font-weight,var(--plasma-tab-item-font-weight));-webkit-letter-spacing:var(--plasma-tab-item-value-letter-spacing,var(--plasma-tab-item-letter-spacing));-moz-letter-spacing:var(--plasma-tab-item-value-letter-spacing,var(--plasma-tab-item-letter-spacing));-ms-letter-spacing:var(--plasma-tab-item-value-letter-spacing,var(--plasma-tab-item-letter-spacing));letter-spacing:var(--plasma-tab-item-value-letter-spacing,var(--plasma-tab-item-letter-spacing));line-height:var(--plasma-tab-item-value-lineheight,var(--plasma-tab-item-lineheight));}
|
4
|
+
.VerticalTabItem_styles_1g7zipg_r1ms3p4x__043363c5{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;color:inherit;}.VerticalTabItem_styles_1g7zipg_r1ms3p4x__043363c5:hover{color:inherit;}
|
5
|
+
.VerticalTabItem_styles_1g7zipg_l1yz2xa4__043363c5{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;color:inherit;}.VerticalTabItem_styles_1g7zipg_l1yz2xa4__043363c5:hover{color:inherit;}
|
6
6
|
|
7
7
|
.base_fueiq8_byyhn69__02004398{color:var(--plasma-tab-item-color);background-color:var(--plasma-tab-item-background-color);}.base_fueiq8_byyhn69__02004398:hover{color:var(--plasma-tab-item-color-hover);background-color:var(--plasma-tab-item-background-color-hover);}.base_fueiq8_byyhn69__02004398:hover .base_fueiq8_tur46hh__02004398{color:var(--plasma-tab-item-value-color-hover);}.base_fueiq8_byyhn69__02004398:active{color:var(--plasma-tab-item-color-active);}.base_fueiq8_byyhn69__02004398:active .base_fueiq8_tur46hh__02004398{color:var(--plasma-tab-item-value-color-active);}.base_fueiq8_byyhn69__02004398.base_fueiq8_tabItemAnimated__02004398{-webkit-transition:var(--plasma-tab-item-background-transition);transition:var(--plasma-tab-item-background-transition);}.base_fueiq8_byyhn69__02004398.base_fueiq8_selectedTabsItem__02004398{color:var(--plasma-tab-item-selected-color);background-color:var(--plasma-tab-item-selected-background-color);}.base_fueiq8_byyhn69__02004398.base_fueiq8_selectedTabsItem__02004398:hover{color:var(--plasma-tab-item-selected-color-hover);background-color:var(--plasma-tab-item-selected-background-color-hover);}.base_fueiq8_byyhn69__02004398.base_fueiq8_selectedTabsItem__02004398:hover::after{background:var(--plasma-tab-item-selected-hover-divider-color);}.base_fueiq8_byyhn69__02004398.base_fueiq8_selectedTabsItem__02004398 .base_fueiq8_tur46hh__02004398{color:var(--plasma-tab-item-selected-value-color-hover);}.base_fueiq8_byyhn69__02004398.base_fueiq8_selectedTabsItem__02004398 .base_fueiq8_tur46hh__02004398:hover{color:var(--plasma-tab-item-selected-value-color-hover);}.base_fueiq8_byyhn69__02004398.base_fueiq8_selectedTabsItem__02004398::after{content:'';position:absolute;top:0;left:0;bottom:0;background:var(--plasma-tab-item-selected-divider-color);width:var(--plasma-tab-item-selected-divider-width);border-radius:0.063rem;}
|
8
8
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VerticalTabItem.styles.js","sources":["../../../../../../src/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { addFocus } from '../../../../../mixins';\nimport { tokens } from '../../../tokens';\n\nexport const base = css`\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n box-sizing: border-box;\n align-items: center;\n\n gap: var(${tokens.itemContentGap});\n padding: var(${tokens.itemPaddingOrientationVertical});\n\n appearance: none;\n border: none;\n outline: none;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.outlineFocusColor})`,\n outlineRadius: 'calc(var(--plasma_private-outline-radius) + 0.063rem)',\n customFocusRules: `\n &.focus-visible:focus,\n &[data-focus-visible-added] {\n &::before {\n z-index: 1;\n outline: none;\n box-shadow: 0 0 0 0.063rem var(${tokens.outlineFocusColor});\n }\n }\n `,\n })};\n`;\n\nexport const StyledContent = styled.div`\n display: inline-block;\n width: fit-content;\n\n padding: 0 var(${tokens.itemContentPaddingClear}, var(${tokens.itemContentPadding}));\n`;\n\nexport const TabItemValue = styled.span`\n color: var(${tokens.itemValueColor});\n`;\n\nexport const RightContent = styled.div`\n display: flex;\n color: inherit;\n\n &:hover {\n color: inherit;\n }\n`;\n\nexport const LeftContent = styled.div`\n display: flex;\n color: inherit;\n\n &:hover {\n color: inherit;\n }\n`;\n"],"names":["base","StyledContent","styled","name","class","propsAsIs","TabItemValue","RightContent","LeftContent"],"mappings":";;;;;;AAMO,IAAMA,IAAI,GAiChB,WAAA;AAEM,IAAMC,aAAa,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAKlC,EAAA;AAEM,IAAMC,YAAY,gBAAGJ,YAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,
|
1
|
+
{"version":3,"file":"VerticalTabItem.styles.js","sources":["../../../../../../src/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { addFocus } from '../../../../../mixins';\nimport { tokens } from '../../../tokens';\n\nexport const base = css`\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n box-sizing: border-box;\n align-items: center;\n\n gap: var(${tokens.itemContentGap});\n padding: var(${tokens.itemPaddingOrientationVertical});\n\n appearance: none;\n border: none;\n outline: none;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.outlineFocusColor})`,\n outlineRadius: 'calc(var(--plasma_private-outline-radius) + 0.063rem)',\n customFocusRules: `\n &.focus-visible:focus,\n &[data-focus-visible-added] {\n &::before {\n z-index: 1;\n outline: none;\n box-shadow: 0 0 0 0.063rem var(${tokens.outlineFocusColor});\n }\n }\n `,\n })};\n`;\n\nexport const StyledContent = styled.div`\n display: inline-block;\n width: fit-content;\n\n padding: 0 var(${tokens.itemContentPaddingClear}, var(${tokens.itemContentPadding}));\n`;\n\nexport const TabItemValue = styled.span`\n color: var(${tokens.itemValueColor});\n\n font-family: var(${tokens.valueFontFamily}, var(${tokens.fontFamily}));\n font-size: var(${tokens.valueFontSize}, var(${tokens.fontSize}));\n font-style: var(${tokens.valueFontStyle}, var(${tokens.fontStyle}));\n font-weight: var(${tokens.valueFontWeight}, var(${tokens.fontWeight}));\n letter-spacing: var(${tokens.valueLetterSpacing}, var(${tokens.letterSpacing}));\n line-height: var(${tokens.valueLineHeight}, var(${tokens.lineHeight}));\n`;\n\nexport const RightContent = styled.div`\n display: flex;\n color: inherit;\n\n &:hover {\n color: inherit;\n }\n`;\n\nexport const LeftContent = styled.div`\n display: flex;\n color: inherit;\n\n &:hover {\n color: inherit;\n }\n`;\n"],"names":["base","StyledContent","styled","name","class","propsAsIs","TabItemValue","RightContent","LeftContent"],"mappings":";;;;;;AAMO,IAAMA,IAAI,GAiChB,WAAA;AAEM,IAAMC,aAAa,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAKlC,EAAA;AAEM,IAAMC,YAAY,gBAAGJ,YAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CASjC,EAAA;AAEM,IAAME,YAAY,gBAAGL,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAOjC,EAAA;AAEM,IAAMG,WAAW,gBAAGN,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAOhC;;;;;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
.b1vnvg8i{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;box-sizing:border-box;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-tab-item-content-gap);padding:var(--plasma-tab-item-padding-orientation-vertical);-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;outline:none;cursor:pointer;-webkit-tap-highlight-color:transparent;position:relative;}.b1vnvg8i::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma_private-outline-radius) + 0.063rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.b1vnvg8i.focus-visible:focus::before,.b1vnvg8i[data-focus-visible-added]::before{z-index:1;outline:none;box-shadow:0 0 0 0.063rem var(--plasma-tabs-outline-focus-color);}
|
2
2
|
.s4s0t81{display:inline-block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0 var(--plasma-tab-item-content-padding-clear,var(--plasma-tab-item-content-padding));}
|
3
|
-
.tur46hh{color:var(--plasma-tab-item-value-color);}
|
3
|
+
.tur46hh{color:var(--plasma-tab-item-value-color);font-family:var(--plasma-tab-item-value-font-family,var(--plasma-tab-item-font-family));font-size:var(--plasma-tab-item-value-font-size,var(--plasma-tab-item-font-size));font-style:var(--plasma-tab-item-value-font-style,var(--plasma-tab-item-font-style));font-weight:var(--plasma-tab-item-value-font-weight,var(--plasma-tab-item-font-weight));-webkit-letter-spacing:var(--plasma-tab-item-value-letter-spacing,var(--plasma-tab-item-letter-spacing));-moz-letter-spacing:var(--plasma-tab-item-value-letter-spacing,var(--plasma-tab-item-letter-spacing));-ms-letter-spacing:var(--plasma-tab-item-value-letter-spacing,var(--plasma-tab-item-letter-spacing));letter-spacing:var(--plasma-tab-item-value-letter-spacing,var(--plasma-tab-item-letter-spacing));line-height:var(--plasma-tab-item-value-lineheight,var(--plasma-tab-item-lineheight));}
|
4
4
|
.r1ms3p4x{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;color:inherit;}.r1ms3p4x:hover{color:inherit;}
|
5
5
|
.l1yz2xa4{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;color:inherit;}.l1yz2xa4:hover{color:inherit;}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
.IconRoot_7pl7ig_svvlqhf__32c458a1{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:var(--svvlqhf-0);height:var(--svvlqhf-0);-webkit-flex:0 0 var(--svvlqhf-0);-ms-flex:0 0 var(--svvlqhf-0);flex:0 0 var(--svvlqhf-0);}
|
2
2
|
|
3
|
-
.
|
4
|
-
.
|
5
|
-
.
|
6
|
-
.
|
3
|
+
.VerticalTabs_styles_1fr5ovg_b2r261u__3eaab5a9{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:0.125rem;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
4
|
+
.VerticalTabs_styles_1fr5ovg_s1tfgc53__3eaab5a9{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;}
|
5
|
+
.VerticalTabs_styles_1fr5ovg_s16g9t9z__3eaab5a9{margin:-0.125rem;padding:0.25rem;box-sizing:content-box;position:relative;height:100%;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;z-index:1;}.VerticalTabs_styles_1fr5ovg_s16g9t9z__3eaab5a9.VerticalTabs_styles_1fr5ovg_tabsClipScroll__3eaab5a9{overflow:scroll;-webkit-scroll-padding:0.25rem;-moz-scroll-padding:0.25rem;-ms-scroll-padding:0.25rem;scroll-padding:0.25rem;overscroll-behavior:contain;-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;}.VerticalTabs_styles_1fr5ovg_s16g9t9z__3eaab5a9.VerticalTabs_styles_1fr5ovg_tabsClipScroll__3eaab5a9::-webkit-scrollbar{display:none;}.VerticalTabs_styles_1fr5ovg_s16g9t9z__3eaab5a9.VerticalTabs_styles_1fr5ovg_tabsClipScroll__3eaab5a9 .VerticalTabs_styles_1fr5ovg_s1tfgc53__3eaab5a9{margin-top:auto;}.VerticalTabs_styles_1fr5ovg_s16g9t9z__3eaab5a9.VerticalTabs_styles_1fr5ovg_tabsClipShowAll__3eaab5a9{overflow:visible;}
|
6
|
+
.VerticalTabs_styles_1fr5ovg_s81cx4__3eaab5a9{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;border:none;background-color:transparent;padding:0;outline:none;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);position:relative;}.VerticalTabs_styles_1fr5ovg_s81cx4__3eaab5a9::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma_private-outline-radius) - 0.063rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.VerticalTabs_styles_1fr5ovg_s81cx4__3eaab5a9.VerticalTabs_styles_1fr5ovg_focusVisible__3eaab5a9:focus::before,.VerticalTabs_styles_1fr5ovg_s81cx4__3eaab5a9[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-tabs-outline-focus-color);}.VerticalTabs_styles_1fr5ovg_s81cx4__3eaab5a9[disabled]{cursor:not-allowed;}
|
7
7
|
|
8
8
|
.base_1sekozo_b1t51iwr__491bf88c{width:var(--plasma-tabs-width);height:var(--plasma-tabs-height);--plasma_private-outline-radius:var(--plasma-tabs-border-radius);border-radius:var(--plasma-tabs-border-radius);}
|
9
9
|
|
@@ -15,7 +15,6 @@ var base$2 = require('./variations/_disabled/base.js');
|
|
15
15
|
var IconDisclosureLeft = require('../../../../_Icon/Icons/IconDisclosureLeft.js');
|
16
16
|
var IconDisclosureRight = require('../../../../_Icon/Icons/IconDisclosureRight.js');
|
17
17
|
|
18
|
-
var _IconDisclosureLeft, _IconDisclosureRight;
|
19
18
|
var _excluded = ["id", "disabled", "clip", "size", "view", "children", "index", "className", "orientation", "hasDivider"];
|
20
19
|
var Keys = /*#__PURE__*/function (Keys) {
|
21
20
|
Keys[Keys["end"] = 35] = "end";
|
@@ -104,18 +103,18 @@ var verticalTabsRoot = function verticalTabsRoot(Root) {
|
|
104
103
|
tabIndex: disabled ? -1 : 0,
|
105
104
|
disabled: disabled,
|
106
105
|
ref: upArrowRef
|
107
|
-
},
|
108
|
-
color: "
|
109
|
-
}))
|
106
|
+
}, /*#__PURE__*/React.createElement(IconDisclosureLeft.IconDisclosureLeft, {
|
107
|
+
color: "var(".concat(tokens.tokens.arrowColor, ")")
|
108
|
+
}));
|
110
109
|
var NextButton = /*#__PURE__*/React.createElement(VerticalTabs_styles.StyledArrow, {
|
111
110
|
type: "button",
|
112
111
|
"aria-label": "\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0442\u0430\u0431",
|
113
112
|
onClick: onNext,
|
114
113
|
tabIndex: disabled ? -1 : 0,
|
115
114
|
disabled: disabled
|
116
|
-
},
|
117
|
-
color: "
|
118
|
-
}))
|
115
|
+
}, /*#__PURE__*/React.createElement(IconDisclosureRight.IconDisclosureRight, {
|
116
|
+
color: "var(".concat(tokens.tokens.arrowColor, ")")
|
117
|
+
}));
|
119
118
|
var handleScroll = React.useCallback(function (event) {
|
120
119
|
event.stopPropagation();
|
121
120
|
var maxScrollTop = event.currentTarget.scrollHeight - event.currentTarget.clientHeight;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VerticalTabs.js","sources":["../../../../../../src/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo, useState, useEffect, useRef, KeyboardEvent } from 'react';\nimport type { MutableRefObject } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../../../../engines/types';\nimport { classes } from '../../../tokens';\nimport { cx } from '../../../../../utils';\nimport { TabItemRefs, TabsContext } from '../../../TabsContext';\nimport type { VerticalTabsProps } from '../../../Tabs.types';\nimport { IconDisclosureLeft, IconDisclosureRight } from '../../../../_Icon';\n\nimport { base, StyledArrow, StyledContent, StyledContentWrapper } from './VerticalTabs.styles';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\n\nenum Keys {\n end = 35,\n home = 36,\n up = 38,\n down = 40,\n}\n\n// TODO: https://github.com/salute-developers/plasma/issues/1474\nexport const verticalTabsRoot = (Root: RootProps<HTMLDivElement, VerticalTabsProps>) =>\n forwardRef<HTMLDivElement, VerticalTabsProps>((props, outerRef) => {\n const {\n id,\n disabled = false,\n clip = 'showAll',\n size,\n view,\n children,\n index,\n className,\n orientation,\n hasDivider = true,\n ...rest\n } = props;\n\n const [firstItemVisible, setFirstItemVisible] = useState(true);\n const [lastItemVisible, setLastItemVisible] = useState(true);\n\n const refs = useMemo(() => new TabItemRefs(index), []);\n\n const uniqId = safeUseId();\n const tabsId = id || uniqId;\n\n const noDividerClass = !hasDivider ? classes.tabsNoDivider : undefined;\n const hasTopArrowClass = !firstItemVisible ? classes.tabsHasTopArrow : undefined;\n const hasBottomArrowClass = !lastItemVisible ? classes.tabsHasBottomArrow : undefined;\n const clipScrollClass = clip === 'scroll' ? classes.tabsClipScroll : undefined;\n const clipShowAllClass = clip === 'showAll' ? classes.tabsClipShowAll : undefined;\n\n const scrollRef = useRef<HTMLElement | null>(null);\n const trackRef = useRef<HTMLElement | null>(null);\n const upArrowRef = useRef<HTMLButtonElement | null>(null);\n\n const onPrev = useCallback(() => {\n if (disabled || !scrollRef.current) {\n return;\n }\n\n const scrollTop = Math.round(scrollRef.current.scrollTop);\n const firstOverflowingTab = refs.items\n .slice()\n .reverse()\n .find((item: MutableRefObject<HTMLElement | null>) => {\n if (!item.current || item.current.offsetTop === undefined) {\n return;\n }\n const tabStartY = item.current.offsetTop;\n\n return tabStartY < scrollTop;\n });\n\n firstOverflowingTab?.current?.scrollIntoView({ block: 'start', inline: 'nearest' });\n }, [disabled, scrollRef, refs]);\n\n const onNext = useCallback(() => {\n if (disabled || !scrollRef.current) {\n return;\n }\n\n const scrollBottom = Math.round(scrollRef.current.scrollTop + scrollRef.current.clientHeight);\n const lastOverflowingTab = refs.items.find((item: MutableRefObject<HTMLElement | null>) => {\n if (!item.current || item.current.offsetTop === undefined) {\n return;\n }\n const tabEndY = item.current.offsetTop + item.current.offsetHeight;\n\n return tabEndY > scrollBottom;\n });\n\n lastOverflowingTab?.current?.scrollIntoView({ block: 'end', inline: 'nearest' });\n }, [disabled, scrollRef, refs]);\n\n const PreviousButton = (\n <StyledArrow\n type=\"button\"\n aria-label=\"Предыдущий таб\"\n onClick={onPrev}\n tabIndex={disabled ? -1 : 0}\n disabled={disabled}\n ref={upArrowRef}\n >\n <IconDisclosureLeft color=\"inherit\" />\n </StyledArrow>\n );\n\n const NextButton = (\n <StyledArrow\n type=\"button\"\n aria-label=\"Следующий таб\"\n onClick={onNext}\n tabIndex={disabled ? -1 : 0}\n disabled={disabled}\n >\n <IconDisclosureRight color=\"inherit\" />\n </StyledArrow>\n );\n\n const handleScroll = useCallback(\n (event: React.UIEvent<HTMLElement>): void => {\n event.stopPropagation();\n const maxScrollTop = event.currentTarget.scrollHeight - event.currentTarget.clientHeight;\n const scrollTop = Math.round(event.currentTarget.scrollTop);\n\n setFirstItemVisible(scrollTop <= 0);\n setLastItemVisible(scrollTop >= maxScrollTop);\n },\n [setFirstItemVisible, setLastItemVisible],\n );\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (index === undefined) {\n return;\n }\n\n const minIndex = 0;\n const maxIndex = refs.items.length - 1;\n let nextIndex: number;\n\n switch (event.keyCode) {\n case Keys.end:\n nextIndex = maxIndex;\n break;\n case Keys.up:\n nextIndex = index > minIndex ? index - 1 : index;\n break;\n case Keys.down:\n nextIndex = index < maxIndex ? index + 1 : index;\n break;\n case Keys.home:\n nextIndex = minIndex;\n break;\n default:\n return;\n }\n\n if (nextIndex !== index) {\n event.preventDefault();\n refs.items[nextIndex].current?.focus();\n refs.items[nextIndex].current?.scrollIntoView({\n block: 'nearest',\n inline: 'nearest',\n behavior: 'smooth',\n });\n }\n },\n [index],\n );\n\n useEffect(() => {\n setLastItemVisible(scrollRef.current?.scrollHeight === scrollRef.current?.clientHeight);\n }, []);\n\n // Этот хук компенсирует появление верхней стрелки при прокрутке\n useEffect(() => {\n if (firstItemVisible || !scrollRef.current || !upArrowRef.current) {\n return;\n }\n\n scrollRef.current.scrollTo({\n top: Math.round(scrollRef.current.scrollTop + upArrowRef.current.clientHeight),\n });\n }, [firstItemVisible, scrollRef, upArrowRef]);\n\n return (\n <TabsContext.Provider value={refs}>\n <Root\n view={view}\n role=\"tablist\"\n size={size}\n id={tabsId}\n ref={outerRef}\n disabled={disabled}\n className={cx(hasTopArrowClass, hasBottomArrowClass, noDividerClass, className)}\n onKeyDown={onKeyDown}\n orientation={orientation}\n {...rest}\n >\n {!firstItemVisible && PreviousButton}\n <StyledContentWrapper\n className={cx(clipScrollClass, clipShowAllClass)}\n ref={scrollRef as MutableRefObject<HTMLDivElement | null>}\n onScroll={handleScroll}\n >\n <StyledContent ref={trackRef as MutableRefObject<HTMLDivElement | null>}>\n {children}\n </StyledContent>\n </StyledContentWrapper>\n {!lastItemVisible && NextButton}\n </Root>\n </TabsContext.Provider>\n );\n });\n\nexport const verticalTabsConfig = {\n name: 'VerticalTabs',\n tag: 'div',\n layout: verticalTabsRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n },\n defaults: {\n view: 'divider',\n size: 'xs',\n },\n};\n"],"names":["Keys","verticalTabsRoot","Root","forwardRef","props","outerRef","id","_props$disabled","disabled","_props$clip","clip","size","view","children","index","className","orientation","_props$hasDivider","hasDivider","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","firstItemVisible","setFirstItemVisible","_useState3","_useState4","lastItemVisible","setLastItemVisible","refs","useMemo","TabItemRefs","uniqId","safeUseId","tabsId","noDividerClass","classes","tabsNoDivider","undefined","hasTopArrowClass","tabsHasTopArrow","hasBottomArrowClass","tabsHasBottomArrow","clipScrollClass","tabsClipScroll","clipShowAllClass","tabsClipShowAll","scrollRef","useRef","trackRef","upArrowRef","onPrev","useCallback","_firstOverflowingTab$","current","scrollTop","Math","round","firstOverflowingTab","items","slice","reverse","find","item","offsetTop","tabStartY","scrollIntoView","block","inline","onNext","_lastOverflowingTab$c","scrollBottom","clientHeight","lastOverflowingTab","tabEndY","offsetHeight","PreviousButton","React","createElement","StyledArrow","type","onClick","tabIndex","ref","_IconDisclosureLeft","IconDisclosureLeft","color","NextButton","_IconDisclosureRight","IconDisclosureRight","handleScroll","event","stopPropagation","maxScrollTop","currentTarget","scrollHeight","onKeyDown","minIndex","maxIndex","length","nextIndex","keyCode","end","up","down","home","_refs$items$nextIndex","_refs$items$nextIndex2","preventDefault","focus","behavior","useEffect","_scrollRef$current","_scrollRef$current2","scrollTo","top","TabsContext","Provider","value","_extends","role","cx","StyledContentWrapper","onScroll","StyledContent","verticalTabsConfig","name","tag","layout","base","variations","css","sizeCSS","viewCSS","disabledCSS","attrs","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;AAckE,IAE7DA,IAAI,0BAAJA,IAAI,EAAA;AAAJA,EAAAA,IAAI,CAAJA,IAAI,CAAA,KAAA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;AAChBC,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN/H,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,IAAA;AACV,GAAA;AACJ;;;;;"}
|
1
|
+
{"version":3,"file":"VerticalTabs.js","sources":["../../../../../../src/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo, useState, useEffect, useRef, KeyboardEvent } from 'react';\nimport type { MutableRefObject } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../../../../engines/types';\nimport { classes, tokens } from '../../../tokens';\nimport { cx } from '../../../../../utils';\nimport { TabItemRefs, TabsContext } from '../../../TabsContext';\nimport type { VerticalTabsProps } from '../../../Tabs.types';\nimport { IconDisclosureLeft, IconDisclosureRight } from '../../../../_Icon';\n\nimport { base, StyledArrow, StyledContent, StyledContentWrapper } from './VerticalTabs.styles';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\n\nenum Keys {\n end = 35,\n home = 36,\n up = 38,\n down = 40,\n}\n\n// TODO: https://github.com/salute-developers/plasma/issues/1474\nexport const verticalTabsRoot = (Root: RootProps<HTMLDivElement, VerticalTabsProps>) =>\n forwardRef<HTMLDivElement, VerticalTabsProps>((props, outerRef) => {\n const {\n id,\n disabled = false,\n clip = 'showAll',\n size,\n view,\n children,\n index,\n className,\n orientation,\n hasDivider = true,\n ...rest\n } = props;\n\n const [firstItemVisible, setFirstItemVisible] = useState(true);\n const [lastItemVisible, setLastItemVisible] = useState(true);\n\n const refs = useMemo(() => new TabItemRefs(index), []);\n\n const uniqId = safeUseId();\n const tabsId = id || uniqId;\n\n const noDividerClass = !hasDivider ? classes.tabsNoDivider : undefined;\n const hasTopArrowClass = !firstItemVisible ? classes.tabsHasTopArrow : undefined;\n const hasBottomArrowClass = !lastItemVisible ? classes.tabsHasBottomArrow : undefined;\n const clipScrollClass = clip === 'scroll' ? classes.tabsClipScroll : undefined;\n const clipShowAllClass = clip === 'showAll' ? classes.tabsClipShowAll : undefined;\n\n const scrollRef = useRef<HTMLElement | null>(null);\n const trackRef = useRef<HTMLElement | null>(null);\n const upArrowRef = useRef<HTMLButtonElement | null>(null);\n\n const onPrev = useCallback(() => {\n if (disabled || !scrollRef.current) {\n return;\n }\n\n const scrollTop = Math.round(scrollRef.current.scrollTop);\n const firstOverflowingTab = refs.items\n .slice()\n .reverse()\n .find((item: MutableRefObject<HTMLElement | null>) => {\n if (!item.current || item.current.offsetTop === undefined) {\n return;\n }\n const tabStartY = item.current.offsetTop;\n\n return tabStartY < scrollTop;\n });\n\n firstOverflowingTab?.current?.scrollIntoView({ block: 'start', inline: 'nearest' });\n }, [disabled, scrollRef, refs]);\n\n const onNext = useCallback(() => {\n if (disabled || !scrollRef.current) {\n return;\n }\n\n const scrollBottom = Math.round(scrollRef.current.scrollTop + scrollRef.current.clientHeight);\n const lastOverflowingTab = refs.items.find((item: MutableRefObject<HTMLElement | null>) => {\n if (!item.current || item.current.offsetTop === undefined) {\n return;\n }\n const tabEndY = item.current.offsetTop + item.current.offsetHeight;\n\n return tabEndY > scrollBottom;\n });\n\n lastOverflowingTab?.current?.scrollIntoView({ block: 'end', inline: 'nearest' });\n }, [disabled, scrollRef, refs]);\n\n const PreviousButton = (\n <StyledArrow\n type=\"button\"\n aria-label=\"Предыдущий таб\"\n onClick={onPrev}\n tabIndex={disabled ? -1 : 0}\n disabled={disabled}\n ref={upArrowRef}\n >\n <IconDisclosureLeft color={`var(${tokens.arrowColor})`} />\n </StyledArrow>\n );\n\n const NextButton = (\n <StyledArrow\n type=\"button\"\n aria-label=\"Следующий таб\"\n onClick={onNext}\n tabIndex={disabled ? -1 : 0}\n disabled={disabled}\n >\n <IconDisclosureRight color={`var(${tokens.arrowColor})`} />\n </StyledArrow>\n );\n\n const handleScroll = useCallback(\n (event: React.UIEvent<HTMLElement>): void => {\n event.stopPropagation();\n const maxScrollTop = event.currentTarget.scrollHeight - event.currentTarget.clientHeight;\n const scrollTop = Math.round(event.currentTarget.scrollTop);\n\n setFirstItemVisible(scrollTop <= 0);\n setLastItemVisible(scrollTop >= maxScrollTop);\n },\n [setFirstItemVisible, setLastItemVisible],\n );\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (index === undefined) {\n return;\n }\n\n const minIndex = 0;\n const maxIndex = refs.items.length - 1;\n let nextIndex: number;\n\n switch (event.keyCode) {\n case Keys.end:\n nextIndex = maxIndex;\n break;\n case Keys.up:\n nextIndex = index > minIndex ? index - 1 : index;\n break;\n case Keys.down:\n nextIndex = index < maxIndex ? index + 1 : index;\n break;\n case Keys.home:\n nextIndex = minIndex;\n break;\n default:\n return;\n }\n\n if (nextIndex !== index) {\n event.preventDefault();\n refs.items[nextIndex].current?.focus();\n refs.items[nextIndex].current?.scrollIntoView({\n block: 'nearest',\n inline: 'nearest',\n behavior: 'smooth',\n });\n }\n },\n [index],\n );\n\n useEffect(() => {\n setLastItemVisible(scrollRef.current?.scrollHeight === scrollRef.current?.clientHeight);\n }, []);\n\n // Этот хук компенсирует появление верхней стрелки при прокрутке\n useEffect(() => {\n if (firstItemVisible || !scrollRef.current || !upArrowRef.current) {\n return;\n }\n\n scrollRef.current.scrollTo({\n top: Math.round(scrollRef.current.scrollTop + upArrowRef.current.clientHeight),\n });\n }, [firstItemVisible, scrollRef, upArrowRef]);\n\n return (\n <TabsContext.Provider value={refs}>\n <Root\n view={view}\n role=\"tablist\"\n size={size}\n id={tabsId}\n ref={outerRef}\n disabled={disabled}\n className={cx(hasTopArrowClass, hasBottomArrowClass, noDividerClass, className)}\n onKeyDown={onKeyDown}\n orientation={orientation}\n {...rest}\n >\n {!firstItemVisible && PreviousButton}\n <StyledContentWrapper\n className={cx(clipScrollClass, clipShowAllClass)}\n ref={scrollRef as MutableRefObject<HTMLDivElement | null>}\n onScroll={handleScroll}\n >\n <StyledContent ref={trackRef as MutableRefObject<HTMLDivElement | null>}>\n {children}\n </StyledContent>\n </StyledContentWrapper>\n {!lastItemVisible && NextButton}\n </Root>\n </TabsContext.Provider>\n );\n });\n\nexport const verticalTabsConfig = {\n name: 'VerticalTabs',\n tag: 'div',\n layout: verticalTabsRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n },\n defaults: {\n view: 'divider',\n size: 'xs',\n },\n};\n"],"names":["Keys","verticalTabsRoot","Root","forwardRef","props","outerRef","id","_props$disabled","disabled","_props$clip","clip","size","view","children","index","className","orientation","_props$hasDivider","hasDivider","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","firstItemVisible","setFirstItemVisible","_useState3","_useState4","lastItemVisible","setLastItemVisible","refs","useMemo","TabItemRefs","uniqId","safeUseId","tabsId","noDividerClass","classes","tabsNoDivider","undefined","hasTopArrowClass","tabsHasTopArrow","hasBottomArrowClass","tabsHasBottomArrow","clipScrollClass","tabsClipScroll","clipShowAllClass","tabsClipShowAll","scrollRef","useRef","trackRef","upArrowRef","onPrev","useCallback","_firstOverflowingTab$","current","scrollTop","Math","round","firstOverflowingTab","items","slice","reverse","find","item","offsetTop","tabStartY","scrollIntoView","block","inline","onNext","_lastOverflowingTab$c","scrollBottom","clientHeight","lastOverflowingTab","tabEndY","offsetHeight","PreviousButton","React","createElement","StyledArrow","type","onClick","tabIndex","ref","IconDisclosureLeft","color","concat","tokens","arrowColor","NextButton","IconDisclosureRight","handleScroll","event","stopPropagation","maxScrollTop","currentTarget","scrollHeight","onKeyDown","minIndex","maxIndex","length","nextIndex","keyCode","end","up","down","home","_refs$items$nextIndex","_refs$items$nextIndex2","preventDefault","focus","behavior","useEffect","_scrollRef$current","_scrollRef$current2","scrollTo","top","TabsContext","Provider","value","_extends","role","cx","StyledContentWrapper","onScroll","StyledContent","verticalTabsConf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,IAAI,EAAJA,wBAAI;AACJC,EAAAA,UAAU,EAAE;AACR3H,IAAAA,IAAI,EAAE;AACF4H,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD5H,IAAAA,IAAI,EAAE;AACF2H,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACDjI,IAAAA,QAAQ,EAAE;AACN+H,MAAAA,GAAG,EAAEG,WAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNhI,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,IAAA;AACV,GAAA;AACJ;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VerticalTabs.styles.js","sources":["../../../../../../src/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { addFocus } from '../../../../../mixins';\nimport { classes, tokens } from '../../../tokens';\n\nexport const base = css`\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 0.125rem;\n align-items: center;\n`;\n\nexport const StyledContent = styled.div<{ hasDivider?: boolean }>`\n display: inline-flex;\n flex-direction: column;\n align-items: start;\n`;\n\nexport const StyledContentWrapper = styled.div`\n /* allows correctly display outline focus on tabs item */\n margin: -0.125rem;\n padding: 0.25rem;\n\n box-sizing: content-box;\n position: relative;\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n\n z-index: 1;\n\n &.${classes.tabsClipScroll} {\n overflow: scroll;\n scroll-padding: 0.25rem;\n overscroll-behavior: contain;\n\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n\n ${StyledContent} {\n margin-top: auto;\n }\n }\n\n &.${classes.tabsClipShowAll} {\n overflow: visible;\n }\n`;\n\nexport const StyledArrow = styled.button`\n display: flex;\n cursor: pointer;\n border: none;\n background-color: transparent;\n padding: 0;\n outline: none;\n transform: rotate(90deg);\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.outlineFocusColor})`,\n outlineRadius: 'calc(var(--plasma_private-outline-radius) - 0.063rem)',\n })};\n\n &[disabled] {\n cursor: not-allowed;\n }\n
|
1
|
+
{"version":3,"file":"VerticalTabs.styles.js","sources":["../../../../../../src/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { addFocus } from '../../../../../mixins';\nimport { classes, tokens } from '../../../tokens';\n\nexport const base = css`\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 0.125rem;\n align-items: center;\n`;\n\nexport const StyledContent = styled.div<{ hasDivider?: boolean }>`\n display: inline-flex;\n flex-direction: column;\n align-items: start;\n`;\n\nexport const StyledContentWrapper = styled.div`\n /* allows correctly display outline focus on tabs item */\n margin: -0.125rem;\n padding: 0.25rem;\n\n box-sizing: content-box;\n position: relative;\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n\n z-index: 1;\n\n &.${classes.tabsClipScroll} {\n overflow: scroll;\n scroll-padding: 0.25rem;\n overscroll-behavior: contain;\n\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n\n ${StyledContent} {\n margin-top: auto;\n }\n }\n\n &.${classes.tabsClipShowAll} {\n overflow: visible;\n }\n`;\n\nexport const StyledArrow = styled.button`\n display: flex;\n cursor: pointer;\n border: none;\n background-color: transparent;\n padding: 0;\n outline: none;\n transform: rotate(90deg);\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.outlineFocusColor})`,\n outlineRadius: 'calc(var(--plasma_private-outline-radius) - 0.063rem)',\n })};\n\n &[disabled] {\n cursor: not-allowed;\n }\n`;\n"],"names":["base","StyledContent","styled","name","class","propsAsIs","StyledContentWrapper","StyledArrow"],"mappings":";;;;;;AAMO,IAAMA,IAAI,GAMhB,UAAA;AAEM,IAAMC,aAAa,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAIlC,EAAA;AAEM,IAAMC,oBAAoB,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,sBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAgCzC,EAAA;AAEM,IAAME,WAAW,gBAAGL,YAAM,CAAA,QAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,QAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAmBhC;;;;;;;"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
.b2r261u{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:0.125rem;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
2
2
|
.s1tfgc53{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;}
|
3
3
|
.s16g9t9z{margin:-0.125rem;padding:0.25rem;box-sizing:content-box;position:relative;height:100%;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;z-index:1;}.s16g9t9z.tabs-clip-scroll{overflow:scroll;-webkit-scroll-padding:0.25rem;-moz-scroll-padding:0.25rem;-ms-scroll-padding:0.25rem;scroll-padding:0.25rem;overscroll-behavior:contain;-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;}.s16g9t9z.tabs-clip-scroll::-webkit-scrollbar{display:none;}.s16g9t9z.tabs-clip-scroll .s1tfgc53{margin-top:auto;}.s16g9t9z.tabs-clip-show-all{overflow:visible;}
|
4
|
-
.s81cx4{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;border:none;background-color:transparent;padding:0;outline:none;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);position:relative;
|
4
|
+
.s81cx4{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;border:none;background-color:transparent;padding:0;outline:none;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);position:relative;}.s81cx4::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma_private-outline-radius) - 0.063rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.s81cx4.focus-visible:focus::before,.s81cx4[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-tabs-outline-focus-color);}.s81cx4[disabled]{cursor:not-allowed;}
|