@salutejs/plasma-new-hope 0.389.0-dev.1 → 0.390.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/cjs/components/BottomSheet/BottomSheet.css +8 -8
- package/dist/css/cjs/components/BottomSheet/BottomSheet.js +7 -5
- package/dist/css/cjs/components/BottomSheet/BottomSheet.styles.js +5 -5
- package/dist/css/cjs/components/BottomSheet/{BottomSheet.styles_1d26yjd.css → BottomSheet.styles_i1yfau.css} +1 -1
- package/dist/css/cjs/components/BottomSheet/BottomSheet.tokens.js +1 -0
- package/dist/css/cjs/components/BottomSheet/hooks/useBottomSheetDrag.js +4 -1
- package/dist/css/cjs/components/BottomSheet/utils/index.js +0 -5
- package/dist/css/cjs/components/Editable/Editable.css +5 -5
- package/dist/css/cjs/components/Editable/Editable.js +19 -3
- package/dist/css/cjs/components/Editable/Editable.styles.js +2 -2
- package/dist/css/cjs/components/Editable/Editable.styles_1ts4ksj.css +4 -0
- package/dist/css/cjs/components/Editable/Editable.tokens.js +5 -1
- package/dist/css/cjs/components/Editable/variations/_size/base.js +1 -1
- package/dist/css/cjs/components/Editable/variations/_size/base_60mm8z.css +1 -0
- package/dist/css/cjs/components/Editable/variations/_view/base.js +1 -1
- package/dist/css/cjs/components/Editable/variations/_view/base_fulhkl.css +1 -0
- package/dist/css/cjs/components/Pagination/Pagination.css +13 -12
- package/dist/css/cjs/components/Pagination/Pagination.js +35 -19
- package/dist/css/cjs/components/Pagination/Pagination.styles.js +8 -2
- package/dist/css/cjs/components/Pagination/{Pagination.styles_6rozng.css → Pagination.styles_1af8kwt.css} +2 -1
- package/dist/css/cjs/components/Pagination/Pagination.tokens.js +3 -1
- package/dist/css/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.css +3 -3
- package/dist/css/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +49 -18
- package/dist/css/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +1 -1
- package/dist/css/cjs/components/Pagination/ui/PaginationQuickJumpToPage/{PaginationQuickJumpToPage.styles_1rsjxrs.css → PaginationQuickJumpToPage.styles_7bgblc.css} +1 -1
- package/dist/css/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
- package/dist/css/cjs/components/Pagination/utils/index.js +2 -0
- package/dist/css/cjs/components/Wheel/Wheel.css +22 -0
- package/dist/css/cjs/components/Wheel/Wheel.js +109 -0
- package/dist/css/cjs/components/Wheel/Wheel.styles.js +138 -0
- package/dist/css/cjs/components/Wheel/Wheel.styles_vgli5z.css +16 -0
- package/dist/css/cjs/components/Wheel/Wheel.tokens.js +79 -0
- package/dist/css/cjs/components/Wheel/hooks/useStaticTextAfter.js +58 -0
- package/dist/css/cjs/components/Wheel/hooks/useWheelAnimation.js +219 -0
- package/dist/css/cjs/components/Wheel/hooks/useWheelInteraction.js +178 -0
- package/dist/css/cjs/components/Wheel/ui/WheelColumn.css +18 -0
- package/dist/css/cjs/components/Wheel/ui/WheelColumn.js +166 -0
- package/dist/css/cjs/components/Wheel/ui/WheelColumnWidth.js +40 -0
- package/dist/css/cjs/components/Wheel/ui/WheelItem.css +16 -0
- package/dist/css/cjs/components/Wheel/ui/WheelItem.js +62 -0
- package/dist/css/cjs/components/Wheel/ui/WheelItemContent.js +26 -0
- package/dist/css/cjs/components/Wheel/utils.js +39 -0
- package/dist/css/cjs/components/Wheel/variations/_disabled/base.js +8 -0
- package/dist/css/cjs/components/Wheel/variations/_disabled/base_r9b0ts.css +1 -0
- package/dist/css/cjs/components/Wheel/variations/_size/base.js +8 -0
- package/dist/css/cjs/components/Wheel/variations/_size/base_x642ct.css +1 -0
- package/dist/css/cjs/components/Wheel/variations/_view/base.js +8 -0
- package/dist/css/cjs/components/Wheel/variations/_view/base_9e3071.css +1 -0
- package/dist/css/cjs/index.css +47 -25
- package/dist/css/cjs/index.js +8 -0
- package/dist/css/cjs/utils/getPanelZIndex.js +10 -0
- package/dist/css/es/components/BottomSheet/BottomSheet.css +8 -8
- package/dist/css/es/components/BottomSheet/BottomSheet.js +6 -4
- package/dist/css/es/components/BottomSheet/BottomSheet.styles.js +5 -5
- package/dist/css/es/components/BottomSheet/{BottomSheet.styles_1d26yjd.css → BottomSheet.styles_i1yfau.css} +1 -1
- package/dist/css/es/components/BottomSheet/BottomSheet.tokens.js +1 -0
- package/dist/css/es/components/BottomSheet/hooks/useBottomSheetDrag.js +4 -1
- package/dist/css/es/components/BottomSheet/utils/index.js +1 -5
- package/dist/css/es/components/Editable/Editable.css +5 -5
- package/dist/css/es/components/Editable/Editable.js +19 -4
- package/dist/css/es/components/Editable/Editable.styles.js +2 -2
- package/dist/css/es/components/Editable/Editable.styles_1ts4ksj.css +4 -0
- package/dist/css/es/components/Editable/Editable.tokens.js +5 -1
- package/dist/css/es/components/Editable/variations/_size/base.js +1 -1
- package/dist/css/es/components/Editable/variations/_size/base_60mm8z.css +1 -0
- package/dist/css/es/components/Editable/variations/_view/base.js +1 -1
- package/dist/css/es/components/Editable/variations/_view/base_fulhkl.css +1 -0
- package/dist/css/es/components/Pagination/Pagination.css +13 -12
- package/dist/css/es/components/Pagination/Pagination.js +36 -20
- package/dist/css/es/components/Pagination/Pagination.styles.js +8 -3
- package/dist/css/es/components/Pagination/{Pagination.styles_6rozng.css → Pagination.styles_1af8kwt.css} +2 -1
- package/dist/css/es/components/Pagination/Pagination.tokens.js +3 -1
- package/dist/css/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.css +3 -3
- package/dist/css/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +50 -19
- package/dist/css/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +1 -1
- package/dist/css/es/components/Pagination/ui/PaginationQuickJumpToPage/{PaginationQuickJumpToPage.styles_1rsjxrs.css → PaginationQuickJumpToPage.styles_7bgblc.css} +1 -1
- package/dist/css/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
- package/dist/css/es/components/Pagination/utils/index.js +2 -0
- package/dist/css/es/components/Wheel/Wheel.css +22 -0
- package/dist/css/es/components/Wheel/Wheel.js +99 -0
- package/dist/css/es/components/Wheel/Wheel.styles.js +119 -0
- package/dist/css/es/components/Wheel/Wheel.styles_vgli5z.css +16 -0
- package/dist/css/es/components/Wheel/Wheel.tokens.js +73 -0
- package/dist/css/es/components/Wheel/hooks/useStaticTextAfter.js +54 -0
- package/dist/css/es/components/Wheel/hooks/useWheelAnimation.js +215 -0
- package/dist/css/es/components/Wheel/hooks/useWheelInteraction.js +174 -0
- package/dist/css/es/components/Wheel/ui/WheelColumn.css +18 -0
- package/dist/css/es/components/Wheel/ui/WheelColumn.js +157 -0
- package/dist/css/es/components/Wheel/ui/WheelColumnWidth.js +32 -0
- package/dist/css/es/components/Wheel/ui/WheelItem.css +16 -0
- package/dist/css/es/components/Wheel/ui/WheelItem.js +54 -0
- package/dist/css/es/components/Wheel/ui/WheelItemContent.js +18 -0
- package/dist/css/es/components/Wheel/utils.js +32 -0
- package/dist/css/es/components/Wheel/variations/_disabled/base.js +4 -0
- package/dist/css/es/components/Wheel/variations/_disabled/base_r9b0ts.css +1 -0
- package/dist/css/es/components/Wheel/variations/_size/base.js +4 -0
- package/dist/css/es/components/Wheel/variations/_size/base_x642ct.css +1 -0
- package/dist/css/es/components/Wheel/variations/_view/base.js +4 -0
- package/dist/css/es/components/Wheel/variations/_view/base_9e3071.css +1 -0
- package/dist/css/es/index.css +47 -25
- package/dist/css/es/index.js +3 -0
- package/dist/css/es/utils/getPanelZIndex.js +6 -0
- package/dist/emotion/cjs/components/BottomSheet/BottomSheet.js +4 -5
- package/dist/emotion/cjs/components/BottomSheet/BottomSheet.styles.js +9 -9
- package/dist/emotion/cjs/components/BottomSheet/BottomSheet.tokens.js +1 -0
- package/dist/emotion/cjs/components/BottomSheet/hooks/useBottomSheetDrag.js +4 -1
- package/dist/emotion/cjs/components/BottomSheet/utils/index.js +0 -7
- package/dist/emotion/cjs/components/Editable/Editable.js +21 -3
- package/dist/emotion/cjs/components/Editable/Editable.styles.js +5 -5
- package/dist/emotion/cjs/components/Editable/Editable.tokens.js +5 -1
- package/dist/emotion/cjs/components/Editable/variations/_size/base.js +1 -1
- package/dist/emotion/cjs/components/Editable/variations/_view/base.js +1 -1
- package/dist/emotion/cjs/components/Pagination/Pagination.js +31 -19
- package/dist/emotion/cjs/components/Pagination/Pagination.styles.js +16 -9
- package/dist/emotion/cjs/components/Pagination/Pagination.tokens.js +3 -1
- package/dist/emotion/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +40 -15
- package/dist/emotion/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +4 -4
- package/dist/emotion/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
- package/dist/emotion/cjs/components/Pagination/utils/index.js +2 -0
- package/dist/emotion/cjs/components/Wheel/Wheel.js +136 -0
- package/dist/emotion/cjs/components/Wheel/Wheel.styles.js +137 -0
- package/dist/emotion/cjs/components/Wheel/Wheel.tokens.js +92 -0
- package/dist/emotion/cjs/components/Wheel/Wheel.types.js +4 -0
- package/dist/emotion/cjs/components/Wheel/hooks/useStaticTextAfter.js +63 -0
- package/dist/emotion/cjs/components/Wheel/hooks/useWheelAnimation.js +207 -0
- package/dist/emotion/cjs/components/Wheel/hooks/useWheelInteraction.js +165 -0
- package/dist/emotion/cjs/components/Wheel/index.js +26 -0
- package/dist/emotion/cjs/components/Wheel/ui/WheelColumn.js +186 -0
- package/dist/emotion/cjs/components/Wheel/ui/WheelColumnWidth.js +70 -0
- package/dist/emotion/cjs/components/Wheel/ui/WheelItem.js +88 -0
- package/dist/emotion/cjs/components/Wheel/ui/WheelItemContent.js +60 -0
- package/dist/emotion/cjs/components/Wheel/utils.js +43 -0
- package/dist/emotion/cjs/components/Wheel/variations/_disabled/base.js +14 -0
- package/dist/emotion/cjs/components/Wheel/variations/_size/base.js +12 -0
- package/dist/emotion/cjs/components/Wheel/variations/_view/base.js +13 -0
- package/dist/emotion/cjs/index.js +1 -0
- package/dist/emotion/cjs/utils/getPanelZIndex.js +14 -0
- package/dist/emotion/cjs/utils/index.js +4 -0
- package/dist/emotion/es/components/BottomSheet/BottomSheet.js +4 -5
- package/dist/emotion/es/components/BottomSheet/BottomSheet.styles.js +9 -9
- package/dist/emotion/es/components/BottomSheet/BottomSheet.tokens.js +1 -0
- package/dist/emotion/es/components/BottomSheet/hooks/useBottomSheetDrag.js +4 -1
- package/dist/emotion/es/components/BottomSheet/utils/index.js +0 -4
- package/dist/emotion/es/components/Editable/Editable.js +16 -3
- package/dist/emotion/es/components/Editable/Editable.styles.js +5 -5
- package/dist/emotion/es/components/Editable/Editable.tokens.js +5 -1
- package/dist/emotion/es/components/Editable/variations/_size/base.js +1 -1
- package/dist/emotion/es/components/Editable/variations/_view/base.js +1 -1
- package/dist/emotion/es/components/Pagination/Pagination.js +32 -20
- package/dist/emotion/es/components/Pagination/Pagination.styles.js +13 -9
- package/dist/emotion/es/components/Pagination/Pagination.tokens.js +3 -1
- package/dist/emotion/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +40 -15
- package/dist/emotion/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +4 -4
- package/dist/emotion/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
- package/dist/emotion/es/components/Pagination/utils/index.js +2 -0
- package/dist/emotion/es/components/Wheel/Wheel.js +72 -0
- package/dist/emotion/es/components/Wheel/Wheel.styles.js +73 -0
- package/dist/emotion/es/components/Wheel/Wheel.tokens.js +71 -0
- package/dist/emotion/es/components/Wheel/Wheel.types.js +3 -0
- package/dist/emotion/es/components/Wheel/hooks/useStaticTextAfter.js +53 -0
- package/dist/emotion/es/components/Wheel/hooks/useWheelAnimation.js +197 -0
- package/dist/emotion/es/components/Wheel/hooks/useWheelInteraction.js +155 -0
- package/dist/emotion/es/components/Wheel/index.js +2 -0
- package/dist/emotion/es/components/Wheel/ui/WheelColumn.js +130 -0
- package/dist/emotion/es/components/Wheel/ui/WheelColumnWidth.js +19 -0
- package/dist/emotion/es/components/Wheel/ui/WheelItem.js +37 -0
- package/dist/emotion/es/components/Wheel/ui/WheelItemContent.js +9 -0
- package/dist/emotion/es/components/Wheel/utils.js +19 -0
- package/dist/emotion/es/components/Wheel/variations/_disabled/base.js +4 -0
- package/dist/emotion/es/components/Wheel/variations/_size/base.js +2 -0
- package/dist/emotion/es/components/Wheel/variations/_view/base.js +3 -0
- package/dist/emotion/es/index.js +1 -0
- package/dist/emotion/es/utils/getPanelZIndex.js +4 -0
- package/dist/emotion/es/utils/index.js +1 -0
- package/dist/styled-components/cjs/components/BottomSheet/BottomSheet.js +4 -5
- package/dist/styled-components/cjs/components/BottomSheet/BottomSheet.styles.js +12 -10
- package/dist/styled-components/cjs/components/BottomSheet/BottomSheet.tokens.js +1 -0
- package/dist/styled-components/cjs/components/BottomSheet/hooks/useBottomSheetDrag.js +4 -1
- package/dist/styled-components/cjs/components/BottomSheet/utils/index.js +0 -7
- package/dist/styled-components/cjs/components/Editable/Editable.js +21 -3
- package/dist/styled-components/cjs/components/Editable/Editable.styles.js +18 -9
- package/dist/styled-components/cjs/components/Editable/Editable.tokens.js +5 -1
- package/dist/styled-components/cjs/components/Editable/variations/_size/base.js +7 -1
- package/dist/styled-components/cjs/components/Editable/variations/_view/base.js +5 -3
- package/dist/styled-components/cjs/components/Pagination/Pagination.js +31 -19
- package/dist/styled-components/cjs/components/Pagination/Pagination.styles.js +19 -9
- package/dist/styled-components/cjs/components/Pagination/Pagination.tokens.js +3 -1
- package/dist/styled-components/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +40 -15
- package/dist/styled-components/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +6 -5
- package/dist/styled-components/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
- package/dist/styled-components/cjs/components/Pagination/utils/index.js +2 -0
- package/dist/styled-components/cjs/components/Wheel/Wheel.js +136 -0
- package/dist/styled-components/cjs/components/Wheel/Wheel.styles.js +320 -0
- package/dist/styled-components/cjs/components/Wheel/Wheel.tokens.js +92 -0
- package/dist/styled-components/cjs/components/Wheel/Wheel.types.js +4 -0
- package/dist/styled-components/cjs/components/Wheel/hooks/useStaticTextAfter.js +63 -0
- package/dist/styled-components/cjs/components/Wheel/hooks/useWheelAnimation.js +207 -0
- package/dist/styled-components/cjs/components/Wheel/hooks/useWheelInteraction.js +165 -0
- package/dist/styled-components/cjs/components/Wheel/index.js +26 -0
- package/dist/styled-components/cjs/components/Wheel/ui/WheelColumn.js +186 -0
- package/dist/styled-components/cjs/components/Wheel/ui/WheelColumnWidth.js +70 -0
- package/dist/styled-components/cjs/components/Wheel/ui/WheelItem.js +88 -0
- package/dist/styled-components/cjs/components/Wheel/ui/WheelItemContent.js +60 -0
- package/dist/styled-components/cjs/components/Wheel/utils.js +43 -0
- package/dist/styled-components/cjs/components/Wheel/variations/_disabled/base.js +28 -0
- package/dist/styled-components/cjs/components/Wheel/variations/_size/base.js +14 -0
- package/dist/styled-components/cjs/components/Wheel/variations/_view/base.js +26 -0
- package/dist/styled-components/cjs/index.js +1 -0
- package/dist/styled-components/cjs/utils/getPanelZIndex.js +14 -0
- package/dist/styled-components/cjs/utils/index.js +4 -0
- package/dist/styled-components/es/components/BottomSheet/BottomSheet.js +4 -5
- package/dist/styled-components/es/components/BottomSheet/BottomSheet.styles.js +12 -10
- package/dist/styled-components/es/components/BottomSheet/BottomSheet.tokens.js +1 -0
- package/dist/styled-components/es/components/BottomSheet/hooks/useBottomSheetDrag.js +4 -1
- package/dist/styled-components/es/components/BottomSheet/utils/index.js +0 -4
- package/dist/styled-components/es/components/Editable/Editable.js +16 -3
- package/dist/styled-components/es/components/Editable/Editable.styles.js +18 -9
- package/dist/styled-components/es/components/Editable/Editable.tokens.js +5 -1
- package/dist/styled-components/es/components/Editable/variations/_size/base.js +7 -1
- package/dist/styled-components/es/components/Editable/variations/_view/base.js +5 -3
- package/dist/styled-components/es/components/Pagination/Pagination.js +32 -20
- package/dist/styled-components/es/components/Pagination/Pagination.styles.js +16 -9
- package/dist/styled-components/es/components/Pagination/Pagination.tokens.js +3 -1
- package/dist/styled-components/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +40 -15
- package/dist/styled-components/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +6 -5
- package/dist/styled-components/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
- package/dist/styled-components/es/components/Pagination/utils/index.js +2 -0
- package/dist/styled-components/es/components/Wheel/Wheel.js +72 -0
- package/dist/styled-components/es/components/Wheel/Wheel.styles.js +220 -0
- package/dist/styled-components/es/components/Wheel/Wheel.tokens.js +71 -0
- package/dist/styled-components/es/components/Wheel/Wheel.types.js +3 -0
- package/dist/styled-components/es/components/Wheel/hooks/useStaticTextAfter.js +53 -0
- package/dist/styled-components/es/components/Wheel/hooks/useWheelAnimation.js +197 -0
- package/dist/styled-components/es/components/Wheel/hooks/useWheelInteraction.js +155 -0
- package/dist/styled-components/es/components/Wheel/index.js +2 -0
- package/dist/styled-components/es/components/Wheel/ui/WheelColumn.js +130 -0
- package/dist/styled-components/es/components/Wheel/ui/WheelColumnWidth.js +19 -0
- package/dist/styled-components/es/components/Wheel/ui/WheelItem.js +37 -0
- package/dist/styled-components/es/components/Wheel/ui/WheelItemContent.js +9 -0
- package/dist/styled-components/es/components/Wheel/utils.js +19 -0
- package/dist/styled-components/es/components/Wheel/variations/_disabled/base.js +18 -0
- package/dist/styled-components/es/components/Wheel/variations/_size/base.js +4 -0
- package/dist/styled-components/es/components/Wheel/variations/_view/base.js +16 -0
- package/dist/styled-components/es/index.js +1 -0
- package/dist/styled-components/es/utils/getPanelZIndex.js +4 -0
- package/dist/styled-components/es/utils/index.js +1 -0
- package/package.json +3 -3
- package/types/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/types/components/BottomSheet/BottomSheet.styles.d.ts.map +1 -1
- package/types/components/BottomSheet/BottomSheet.tokens.d.ts +1 -0
- package/types/components/BottomSheet/BottomSheet.tokens.d.ts.map +1 -1
- package/types/components/BottomSheet/BottomSheet.types.d.ts +6 -0
- package/types/components/BottomSheet/BottomSheet.types.d.ts.map +1 -1
- package/types/components/BottomSheet/hooks/useBottomSheetDrag.d.ts.map +1 -1
- package/types/components/BottomSheet/utils/index.d.ts +0 -2
- package/types/components/BottomSheet/utils/index.d.ts.map +1 -1
- package/types/components/Editable/Editable.d.ts.map +1 -1
- package/types/components/Editable/Editable.styles.d.ts.map +1 -1
- package/types/components/Editable/Editable.tokens.d.ts +4 -0
- package/types/components/Editable/Editable.tokens.d.ts.map +1 -1
- package/types/components/Editable/Editable.types.d.ts +4 -0
- package/types/components/Editable/Editable.types.d.ts.map +1 -1
- package/types/components/Editable/variations/_size/base.d.ts.map +1 -1
- package/types/components/Editable/variations/_view/base.d.ts.map +1 -1
- package/types/components/Pagination/Pagination.d.ts.map +1 -1
- package/types/components/Pagination/Pagination.styles.d.ts +1 -0
- package/types/components/Pagination/Pagination.styles.d.ts.map +1 -1
- package/types/components/Pagination/Pagination.tokens.d.ts +4 -0
- package/types/components/Pagination/Pagination.tokens.d.ts.map +1 -1
- package/types/components/Pagination/Pagination.types.d.ts +10 -0
- package/types/components/Pagination/Pagination.types.d.ts.map +1 -1
- package/types/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.d.ts.map +1 -1
- package/types/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.types.d.ts +2 -0
- package/types/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.types.d.ts.map +1 -1
- package/types/components/Pagination/utils/index.d.ts +2 -0
- package/types/components/Pagination/utils/index.d.ts.map +1 -1
- package/types/components/Wheel/Wheel.d.ts +55 -0
- package/types/components/Wheel/Wheel.d.ts.map +1 -0
- package/types/components/Wheel/Wheel.styles.d.ts +25 -0
- package/types/components/Wheel/Wheel.styles.d.ts.map +1 -0
- package/types/components/Wheel/Wheel.tokens.d.ts +116 -0
- package/types/components/Wheel/Wheel.tokens.d.ts.map +1 -0
- package/types/components/Wheel/Wheel.types.d.ts +159 -0
- package/types/components/Wheel/Wheel.types.d.ts.map +1 -0
- package/types/components/Wheel/hooks/useStaticTextAfter.d.ts +7 -0
- package/types/components/Wheel/hooks/useStaticTextAfter.d.ts.map +1 -0
- package/types/components/Wheel/hooks/useWheelAnimation.d.ts +19 -0
- package/types/components/Wheel/hooks/useWheelAnimation.d.ts.map +1 -0
- package/types/components/Wheel/hooks/useWheelInteraction.d.ts +35 -0
- package/types/components/Wheel/hooks/useWheelInteraction.d.ts.map +1 -0
- package/types/components/Wheel/index.d.ts +4 -0
- package/types/components/Wheel/index.d.ts.map +1 -0
- package/types/components/Wheel/ui/WheelColumn.d.ts +13 -0
- package/types/components/Wheel/ui/WheelColumn.d.ts.map +1 -0
- package/types/components/Wheel/ui/WheelColumnWidth.d.ts +9 -0
- package/types/components/Wheel/ui/WheelColumnWidth.d.ts.map +1 -0
- package/types/components/Wheel/ui/WheelItem.d.ts +17 -0
- package/types/components/Wheel/ui/WheelItem.d.ts.map +1 -0
- package/types/components/Wheel/ui/WheelItemContent.d.ts +7 -0
- package/types/components/Wheel/ui/WheelItemContent.d.ts.map +1 -0
- package/types/components/Wheel/utils.d.ts +7 -0
- package/types/components/Wheel/utils.d.ts.map +1 -0
- package/types/components/Wheel/variations/_disabled/base.d.ts +2 -0
- package/types/components/Wheel/variations/_disabled/base.d.ts.map +1 -0
- package/types/components/Wheel/variations/_size/base.d.ts +2 -0
- package/types/components/Wheel/variations/_size/base.d.ts.map +1 -0
- package/types/components/Wheel/variations/_view/base.d.ts +2 -0
- package/types/components/Wheel/variations/_view/base.d.ts.map +1 -0
- package/types/examples/components/Editable/Editable.config.d.ts.map +1 -1
- package/types/examples/components/Pagination/Pagination.config.d.ts.map +1 -1
- package/types/examples/components/Wheel/Wheel.config.d.ts +29 -0
- package/types/examples/components/Wheel/Wheel.config.d.ts.map +1 -0
- package/types/examples/components/Wheel/Wheel.d.ts +46 -0
- package/types/examples/components/Wheel/Wheel.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/utils/getPanelZIndex.d.ts +3 -0
- package/types/utils/getPanelZIndex.d.ts.map +1 -0
- package/types/utils/index.d.ts +1 -0
- package/types/utils/index.d.ts.map +1 -1
- package/dist/css/cjs/components/Editable/Editable.styles_z2slj0.css +0 -4
- package/dist/css/cjs/components/Editable/variations/_size/base_1xzgyr1.css +0 -1
- package/dist/css/cjs/components/Editable/variations/_view/base_xbahf.css +0 -1
- package/dist/css/es/components/Editable/Editable.styles_z2slj0.css +0 -4
- package/dist/css/es/components/Editable/variations/_size/base_1xzgyr1.css +0 -1
- package/dist/css/es/components/Editable/variations/_view/base_xbahf.css +0 -1
|
@@ -34,6 +34,7 @@ export const useBottomSheetDrag = (args)=>{
|
|
|
34
34
|
let startY = 0;
|
|
35
35
|
let currentY = 0;
|
|
36
36
|
let startHeight = 0;
|
|
37
|
+
let renderedMaxHeight = Infinity;
|
|
37
38
|
let tracking = false;
|
|
38
39
|
const canStartDrag = (target)=>{
|
|
39
40
|
if (isInteractive(target)) {
|
|
@@ -52,6 +53,8 @@ export const useBottomSheetDrag = (args)=>{
|
|
|
52
53
|
startY = clientY;
|
|
53
54
|
currentY = clientY;
|
|
54
55
|
startHeight = panel.offsetHeight;
|
|
56
|
+
// max-height панели вычитает safe-area сверху, и панель бывает ниже запрошенной высоты
|
|
57
|
+
renderedMaxHeight = startHeight < parseFloat(panel.style.height) - 1 ? startHeight : Infinity;
|
|
55
58
|
panel.style.transition = 'none';
|
|
56
59
|
};
|
|
57
60
|
const moveDrag = (clientY, event)=>{
|
|
@@ -63,7 +66,7 @@ export const useBottomSheetDrag = (args)=>{
|
|
|
63
66
|
const points = snapPointsRef.current;
|
|
64
67
|
if (points?.length) {
|
|
65
68
|
const { pointsPx } = getSortedSnapPoints(points, window.innerHeight);
|
|
66
|
-
const maxHeight = pointsPx[pointsPx.length - 1];
|
|
69
|
+
const maxHeight = Math.min(pointsPx[pointsPx.length - 1], renderedMaxHeight);
|
|
67
70
|
// На верхней точке жест вверх отдаём нативному скроллу контента
|
|
68
71
|
if (deltaY < 0 && startHeight >= maxHeight) {
|
|
69
72
|
return;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { getSortedSnapPoints, resolveActiveSnapPoint } from "../../Sheet/utils";
|
|
2
|
-
export const getPanelZIndex = (zIndex)=>{
|
|
3
|
-
const numericZIndex = Number(zIndex);
|
|
4
|
-
return Number.isNaN(numericZIndex) ? zIndex : numericZIndex + 1;
|
|
5
|
-
};
|
|
6
2
|
export const applyHeight = (element, heightPx)=>{
|
|
7
3
|
element.style.height = `${heightPx}px`;
|
|
8
4
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef, useEffect, useRef, useState } from "react";
|
|
2
|
+
import cls from "classnames";
|
|
2
3
|
import { useForkRef } from "../../hooks";
|
|
3
4
|
import { constants } from "../../utils";
|
|
4
5
|
import { clearSelection, selectText } from "./utils";
|
|
@@ -6,10 +7,11 @@ import { classes } from "./Editable.tokens";
|
|
|
6
7
|
import { base, EditButton, StyledInput, StyledPlacehpolder } from "./Editable.styles";
|
|
7
8
|
import { base as viewCSS } from "./variations/_view/base";
|
|
8
9
|
import { base as sizeCSS } from "./variations/_size/base";
|
|
9
|
-
export const editableRoot = (typographyVariants)=>(Root)=>/*#__PURE__*/ forwardRef(({ textComponent, value, icon, maxLength, spellCheck = 'false', placeholder, name, onChange, onBlur, onPaste, ...props }, outerRef)=>{
|
|
10
|
+
export const editableRoot = (typographyVariants)=>(Root)=>/*#__PURE__*/ forwardRef(({ textComponent, value, icon, maxLength, spellCheck = 'false', placeholder, name, onChange, onBlur, onPaste, multiline, className, ...props }, outerRef)=>{
|
|
10
11
|
const Component = textComponent;
|
|
11
12
|
const [isEditing, setIsEditing] = useState(false);
|
|
12
13
|
const inputRef = useRef(null);
|
|
14
|
+
const textClipRef = useRef(null);
|
|
13
15
|
const innerRef = useForkRef(inputRef, outerRef);
|
|
14
16
|
const prevValueRef = useRef(value || '');
|
|
15
17
|
const handlePaste = (e)=>{
|
|
@@ -34,6 +36,11 @@ export const editableRoot = (typographyVariants)=>(Root)=>/*#__PURE__*/ forwardR
|
|
|
34
36
|
const handleBlur = (e)=>{
|
|
35
37
|
setIsEditing(false);
|
|
36
38
|
clearSelection();
|
|
39
|
+
// End scrolls the clip to the caret. The fade uses background-attachment: local,
|
|
40
|
+
// so a leftover scrollLeft shifts it after editing ends.
|
|
41
|
+
if (textClipRef.current) {
|
|
42
|
+
textClipRef.current.scrollLeft = 0;
|
|
43
|
+
}
|
|
37
44
|
// NOTE: Remove <br> tag inserted by Safari
|
|
38
45
|
const editableElement = inputRef.current;
|
|
39
46
|
if (editableElement && editableElement.innerHTML === '<br>') {
|
|
@@ -79,7 +86,13 @@ export const editableRoot = (typographyVariants)=>(Root)=>/*#__PURE__*/ forwardR
|
|
|
79
86
|
value,
|
|
80
87
|
textComponent
|
|
81
88
|
]);
|
|
82
|
-
return /*#__PURE__*/ React.createElement(Root,
|
|
89
|
+
return /*#__PURE__*/ React.createElement(Root, {
|
|
90
|
+
...props,
|
|
91
|
+
className: cls(className, multiline && classes.multiline)
|
|
92
|
+
}, /*#__PURE__*/ React.createElement("span", {
|
|
93
|
+
ref: textClipRef,
|
|
94
|
+
className: classes.textClip
|
|
95
|
+
}, /*#__PURE__*/ React.createElement(Component, {
|
|
83
96
|
ref: innerRef,
|
|
84
97
|
className: classes.editableTextBox,
|
|
85
98
|
role: "textbox",
|
|
@@ -91,7 +104,7 @@ export const editableRoot = (typographyVariants)=>(Root)=>/*#__PURE__*/ forwardR
|
|
|
91
104
|
onFocus: handleFocus,
|
|
92
105
|
onKeyDown: handleKeyDown,
|
|
93
106
|
"aria-label": placeholder
|
|
94
|
-
}), prevValueRef.current?.length === 0 && !isEditing && /*#__PURE__*/ React.createElement(Component, null, /*#__PURE__*/ React.createElement(StyledPlacehpolder, {
|
|
107
|
+
})), prevValueRef.current?.length === 0 && !isEditing && /*#__PURE__*/ React.createElement(Component, null, /*#__PURE__*/ React.createElement(StyledPlacehpolder, {
|
|
95
108
|
onClick: handleEditClick
|
|
96
109
|
}, placeholder)), /*#__PURE__*/ React.createElement(StyledInput, {
|
|
97
110
|
type: "hidden",
|
|
@@ -2,15 +2,15 @@ import styled from "@emotion/styled";
|
|
|
2
2
|
import { css } from "@emotion/react";
|
|
3
3
|
import { classes, tokens } from "./Editable.tokens";
|
|
4
4
|
export const EditButton = /*#__PURE__*/ styled("span", {
|
|
5
|
-
target: "
|
|
5
|
+
target: "ehdm6h90",
|
|
6
6
|
label: "EditButton"
|
|
7
|
-
})("position:relative;align-self:stretch;display:", ({ isHidden })=>isHidden ? 'none' : '', ";");
|
|
7
|
+
})("position:relative;align-self:stretch;flex-shrink:0;display:", ({ isHidden })=>isHidden ? 'none' : 'inline-flex', ";align-items:center;justify-content:center;");
|
|
8
8
|
export const StyledInput = /*#__PURE__*/ styled("input", {
|
|
9
|
-
target: "
|
|
9
|
+
target: "ehdm6h91",
|
|
10
10
|
label: "StyledInput"
|
|
11
11
|
})();
|
|
12
12
|
export const StyledPlacehpolder = /*#__PURE__*/ styled("span", {
|
|
13
|
-
target: "
|
|
13
|
+
target: "ehdm6h92",
|
|
14
14
|
label: "StyledPlacehpolder"
|
|
15
15
|
})("display:inline-block;color:var(", tokens.placeholderColor, ");");
|
|
16
|
-
export const base = /*#__PURE__*/ css("display:inline-flex;align-items:center;max-width:100%;cursor:pointer;.", classes.
|
|
16
|
+
export const base = /*#__PURE__*/ css("display:inline-flex;align-items:center;max-width:100%;cursor:pointer;.", classes.textClip, "{position:relative;min-width:0;max-width:100%;overflow:hidden;background-image:linear-gradient(currentColor,currentColor),linear-gradient(to right,currentColor,transparent),linear-gradient(currentColor,currentColor);background-size:4rem 100%,4rem 100%,calc(100% - 4rem) 100%;background-position:right top,right top,left top;background-repeat:no-repeat;background-attachment:local,scroll,scroll;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;}.", classes.editableTextBox, "{width:max-content;max-width:none;outline:none;white-space:nowrap;caret-color:var(", tokens.caretColor, ");}&:focus-within .", classes.textClip, "{background:none;-webkit-text-fill-color:currentColor;}&.", classes.multiline, "{gap:var(", tokens.iconGap, ");.", classes.textClip, "{margin-right:0;padding-right:0;background:none;-webkit-text-fill-color:currentColor;}.", classes.editableTextBox, "{width:auto;min-width:0;white-space:pre-wrap;overflow-wrap:break-word;}", EditButton, "{padding-left:0;background:var(", tokens.iconBackground, ",var(", tokens.editButtonBackground, "));}}", "base");
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
export const classes = {
|
|
2
|
-
|
|
2
|
+
textClip: 'editable-text-clip',
|
|
3
|
+
editableTextBox: 'editable-text-box',
|
|
4
|
+
multiline: 'editable-multiline'
|
|
3
5
|
};
|
|
4
6
|
export const tokens = {
|
|
5
7
|
editButtonBackground: '--plasma-editable-edit-button-background',
|
|
8
|
+
iconBackground: '--plasma-editable-icon-background',
|
|
6
9
|
editButtonColor: '--plasma-editable-edit-button-color',
|
|
7
10
|
editButtonColorHover: '--plasma-editable-edit-button-color-hover',
|
|
11
|
+
iconGap: '--plasma-editable-icon-gap',
|
|
8
12
|
editButtonPaddingLeft: '--plasma-editable-edit-button-padding-left',
|
|
9
13
|
placeholderColor: '--plasma-editable-placeholder-color',
|
|
10
14
|
caretColor: '--plasma-editable-caret-color',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { css } from "@emotion/react";
|
|
2
2
|
import { classes, tokens } from "../../Editable.tokens";
|
|
3
3
|
import { EditButton } from "../../Editable.styles";
|
|
4
|
-
export const base = /*#__PURE__*/ css(EditButton, "{padding-left:var(", tokens.editButtonPaddingLeft, ");}.", classes.
|
|
4
|
+
export const base = /*#__PURE__*/ css(tokens.editButtonPaddingLeft, ":var(", tokens.iconGap, ");", tokens.textBoxPaddingRight, ":var(", tokens.iconGap, ");", tokens.textBoxMarginRight, ":calc(var(", tokens.iconGap, ") * -1);", EditButton, "{padding-left:var(", tokens.editButtonPaddingLeft, ");}.", classes.textClip, "{margin-right:var(", tokens.textBoxMarginRight, ");padding-right:var(", tokens.textBoxPaddingRight, ");}", "base");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { css } from "@emotion/react";
|
|
2
2
|
import { tokens } from "../../Editable.tokens";
|
|
3
3
|
import { EditButton } from "../../Editable.styles";
|
|
4
|
-
export const base = /*#__PURE__*/ css(EditButton, "{background:var(\n
|
|
4
|
+
export const base = /*#__PURE__*/ css(EditButton, "{background:var(\n ", tokens.iconBackground, ",linear-gradient(\n to left,var(", tokens.editButtonBackground, ") calc(100% - var(", tokens.iconGap, ")),transparent\n )\n );color:var(", tokens.editButtonColor, ");}&:hover > ", EditButton, "{color:var(", tokens.editButtonColorHover, ");}", "base");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, forwardRef, Fragment, useRef, useEffect } from "react";
|
|
2
2
|
import { cx, isNumber } from "../../utils";
|
|
3
3
|
import { useForkRef } from "../../hooks";
|
|
4
|
-
import { PaginationPages, PaginationActions, PaginationButton, PaginationSection, PaginationButtonGroup, PaginationRoot, PaginationShorter, PaginationActionsLeft, PaginationHelperText } from "./Pagination.styles";
|
|
4
|
+
import { PaginationPages, PaginationActions, PaginationButton, PaginationSection, PaginationButtonGroup, PaginationRoot, PaginationShorter, PaginationActionsLeft, PaginationHelperText, PaginationQuickJumpGroup } from "./Pagination.styles";
|
|
5
5
|
import { getSections, defaultValues } from "./utils";
|
|
6
6
|
import { base as viewCSS } from "./variations/_view/base";
|
|
7
7
|
import { base as typeCSS } from "./variations/_type/base";
|
|
@@ -9,7 +9,7 @@ import { base as sizeCSS } from "./variations/_size/base";
|
|
|
9
9
|
import { classes } from "./Pagination.tokens";
|
|
10
10
|
import { PaginationQuickJumpToPage } from "./ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage";
|
|
11
11
|
import { PaginationSelectPerPage } from "./ui/PaginationSelectPerPage/PaginationSelectPerPage";
|
|
12
|
-
export const paginationRoot = (Root)=>/*#__PURE__*/ forwardRef(({ value: outerValue, defaultValue, helperText, singleLine, perPage: outerPerPage, defaultPerPage, slots = defaultValues.slots, view, viewCurrentPage, type = defaultValues.type, size, pilled = defaultValues.pilled, square = defaultValues.square, disabledPages = defaultValues.disabledPages, count = defaultValues.value, hasQuickJump = defaultValues.hasQuickJump, hasPerPage = defaultValues.hasPerPage, perPageList = defaultValues.perPageList, isCommonButtonStyles = defaultValues.isCommonButtonStyles, placeholderQuickJump = defaultValues.placeholderQuickJump, textQuickJump = defaultValues.textQuickJump, textPerPage = defaultValues.textPerPage, leftContent, rightContent, listWidth = 'fit-content', onChangePageValue, onChangePerPageValue, onChange, onFocusQuickJump, onBlurQuickJump, ...rest }, ref)=>{
|
|
12
|
+
export const paginationRoot = (Root)=>/*#__PURE__*/ forwardRef(({ value: outerValue, defaultValue, helperText, singleLine, perPage: outerPerPage, defaultPerPage, slots = defaultValues.slots, view, viewCurrentPage, type = defaultValues.type, size, pilled = defaultValues.pilled, square = defaultValues.square, disabledPages = defaultValues.disabledPages, count = defaultValues.value, hasQuickJump = defaultValues.hasQuickJump, hasPerPage = defaultValues.hasPerPage, hasPageRange = defaultValues.hasPageRange, hasTotalPages = defaultValues.hasTotalPages, perPageList = defaultValues.perPageList, isCommonButtonStyles = defaultValues.isCommonButtonStyles, placeholderQuickJump = defaultValues.placeholderQuickJump, textQuickJump = defaultValues.textQuickJump, textPerPage = defaultValues.textPerPage, leftContent, rightContent, listWidth = 'fit-content', onChangePageValue, onChangePerPageValue, onChange, onFocusQuickJump, onBlurQuickJump, ...rest }, ref)=>{
|
|
13
13
|
const [pageInner, setPageInner] = useState(defaultValue || defaultValues.value);
|
|
14
14
|
const pageValue = outerValue ?? pageInner;
|
|
15
15
|
const [perPageInner, setPerPageInner] = useState(hasPerPage ? defaultPerPage || defaultValues.perPage : undefined);
|
|
@@ -49,8 +49,11 @@ export const paginationRoot = (Root)=>/*#__PURE__*/ forwardRef(({ value: outerVa
|
|
|
49
49
|
onChangePageValue?.(newValue);
|
|
50
50
|
};
|
|
51
51
|
const handlerSetPerPage = (newPerPageValue)=>{
|
|
52
|
+
const newPages = Math.max(Math.ceil(count / newPerPageValue), 1);
|
|
53
|
+
const newPageValue = hasTotalPages ? Math.min(pageValue, newPages) : pageValue;
|
|
52
54
|
setPerPageInner(newPerPageValue);
|
|
53
|
-
|
|
55
|
+
setPageInner(newPageValue);
|
|
56
|
+
onChange?.(newPageValue, newPerPageValue);
|
|
54
57
|
onChangePerPageValue?.(newPerPageValue);
|
|
55
58
|
};
|
|
56
59
|
const handleClick = (currentPage)=>{
|
|
@@ -84,8 +87,28 @@ export const paginationRoot = (Root)=>/*#__PURE__*/ forwardRef(({ value: outerVa
|
|
|
84
87
|
observers.forEach((observer)=>observer.disconnect());
|
|
85
88
|
};
|
|
86
89
|
}, [
|
|
87
|
-
type
|
|
90
|
+
type,
|
|
91
|
+
hasPageRange
|
|
88
92
|
]);
|
|
93
|
+
const leftSlot = leftContent && /*#__PURE__*/ React.createElement(PaginationButtonGroup, {
|
|
94
|
+
isCommonButtonStyles: isCommonButtonStyles
|
|
95
|
+
}, leftContent);
|
|
96
|
+
const rightSlot = rightContent && /*#__PURE__*/ React.createElement(PaginationButtonGroup, {
|
|
97
|
+
isCommonButtonStyles: isCommonButtonStyles
|
|
98
|
+
}, rightContent);
|
|
99
|
+
// Без номеров страниц слоты возле поля быстрого перехода
|
|
100
|
+
const withQuickJumpGroup = !hasPageRange && (hasQuickJump || leftSlot || rightSlot);
|
|
101
|
+
const pagesOffset = hasPageRange ? pagesWidth : 0;
|
|
102
|
+
const quickJump = /*#__PURE__*/ React.createElement(PaginationQuickJumpToPage, {
|
|
103
|
+
prevPageValue: pageValue,
|
|
104
|
+
totalPages: Math.max(pages, 1),
|
|
105
|
+
hasTotalPages: hasTotalPages,
|
|
106
|
+
placeholderQuickJump: placeholderQuickJump,
|
|
107
|
+
textQuickJump: textQuickJump,
|
|
108
|
+
onChangeValue: handleSetPage,
|
|
109
|
+
onFocusQuickJump: onFocusQuickJump,
|
|
110
|
+
onBlurQuickJump: onBlurQuickJump
|
|
111
|
+
});
|
|
89
112
|
return /*#__PURE__*/ React.createElement(Root, {
|
|
90
113
|
size: size,
|
|
91
114
|
view: view,
|
|
@@ -95,11 +118,9 @@ export const paginationRoot = (Root)=>/*#__PURE__*/ forwardRef(({ value: outerVa
|
|
|
95
118
|
...rest
|
|
96
119
|
}, /*#__PURE__*/ React.createElement(PaginationRoot, {
|
|
97
120
|
className: typeClass
|
|
98
|
-
}, /*#__PURE__*/ React.createElement(PaginationPages, {
|
|
121
|
+
}, hasPageRange && /*#__PURE__*/ React.createElement(PaginationPages, {
|
|
99
122
|
ref: pagesRef
|
|
100
|
-
},
|
|
101
|
-
isCommonButtonStyles: isCommonButtonStyles
|
|
102
|
-
}, leftContent), sections && sections.map((section, indexSection)=>/*#__PURE__*/ React.createElement(Fragment, {
|
|
123
|
+
}, leftSlot, sections && sections.map((section, indexSection)=>/*#__PURE__*/ React.createElement(Fragment, {
|
|
103
124
|
key: indexSection
|
|
104
125
|
}, indexSection !== 0 && /*#__PURE__*/ React.createElement(PaginationShorter, {
|
|
105
126
|
stretching: "fixed",
|
|
@@ -112,25 +133,16 @@ export const paginationRoot = (Root)=>/*#__PURE__*/ forwardRef(({ value: outerVa
|
|
|
112
133
|
disabled: disabled.includes(currentPage),
|
|
113
134
|
square: square,
|
|
114
135
|
onClick: ()=>handleClick(currentPage)
|
|
115
|
-
}, currentPage))))),
|
|
116
|
-
isCommonButtonStyles: isCommonButtonStyles
|
|
117
|
-
}, rightContent)), /*#__PURE__*/ React.createElement(PaginationActions, {
|
|
136
|
+
}, currentPage))))), rightSlot), /*#__PURE__*/ React.createElement(PaginationActions, {
|
|
118
137
|
style: type === 'compact' ? {
|
|
119
138
|
minWidth: '0px'
|
|
120
139
|
} : {
|
|
121
|
-
width: `calc(100% - ${
|
|
140
|
+
width: `calc(100% - ${pagesOffset}px)`
|
|
122
141
|
},
|
|
123
142
|
className: cx(classes.actions, typeClass, withHasPerPageSelect, withHasQuickJump)
|
|
124
143
|
}, /*#__PURE__*/ React.createElement(PaginationActionsLeft, {
|
|
125
144
|
className: typeClass
|
|
126
|
-
}, hasQuickJump && /*#__PURE__*/ React.createElement(
|
|
127
|
-
prevPageValue: pageValue,
|
|
128
|
-
placeholderQuickJump: placeholderQuickJump,
|
|
129
|
-
textQuickJump: textQuickJump,
|
|
130
|
-
onChangeValue: handleSetPage,
|
|
131
|
-
onFocusQuickJump: onFocusQuickJump,
|
|
132
|
-
onBlurQuickJump: onBlurQuickJump
|
|
133
|
-
}), helperText && /*#__PURE__*/ React.createElement(PaginationHelperText, {
|
|
145
|
+
}, withQuickJumpGroup ? /*#__PURE__*/ React.createElement(PaginationQuickJumpGroup, null, leftSlot, hasQuickJump && quickJump, rightSlot) : hasQuickJump && quickJump, helperText && /*#__PURE__*/ React.createElement(PaginationHelperText, {
|
|
134
146
|
className: cx(typeClass, singleLine ? classes.ellipsisText : ''),
|
|
135
147
|
style: {
|
|
136
148
|
maxWidth: rootWidth
|
|
@@ -9,27 +9,27 @@ const Button = component(mergedButtonConfig);
|
|
|
9
9
|
const mergedButtonGroupConfig = mergeConfig(buttonGroupConfig);
|
|
10
10
|
const ButtonGroup = component(mergedButtonGroupConfig);
|
|
11
11
|
export const PaginationRoot = /*#__PURE__*/ styled("div", {
|
|
12
|
-
target: "
|
|
12
|
+
target: "e4i78u80",
|
|
13
13
|
label: "PaginationRoot"
|
|
14
14
|
})("display:flex;color:var(", tokens.paginationColor, ");&.", classes.compactType, "{flex-direction:column;gap:0.5rem;justify-content:flex-start;}&.", classes.defaultType, "{width:100%;justify-content:space-between;flex:0 0 100%;gap:1rem;flex-wrap:nowrap;}");
|
|
15
15
|
export const PaginationPages = /*#__PURE__*/ styled("div", {
|
|
16
|
-
target: "
|
|
16
|
+
target: "e4i78u81",
|
|
17
17
|
label: "PaginationPages"
|
|
18
18
|
})("display:flex;align-items:center;gap:0.25rem;flex-shrink:0;");
|
|
19
19
|
export const PaginationActions = /*#__PURE__*/ styled("div", {
|
|
20
|
-
target: "
|
|
20
|
+
target: "e4i78u82",
|
|
21
21
|
label: "PaginationActions"
|
|
22
22
|
})("display:flex;justify-content:space-between;flex-grow:1;align-items:center;gap:var(", tokens.paginationHelperTextGap, ");flex-shrink:1;flex-direction:row;&.", classes.compactType, "{width:100%;flex-wrap:wrap;&.", classes.withHasPerPageSelect, "{flex-direction:row-reverse;}&.", classes.withHasQuickJump, "{flex-direction:row;}}");
|
|
23
23
|
export const PaginationSection = /*#__PURE__*/ styled("div", {
|
|
24
|
-
target: "
|
|
24
|
+
target: "e4i78u83",
|
|
25
25
|
label: "PaginationSection"
|
|
26
26
|
})("display:flex;gap:0.125rem;");
|
|
27
27
|
export const PaginationButtonGroup = /*#__PURE__*/ styled(ButtonGroup, {
|
|
28
|
-
target: "
|
|
28
|
+
target: "e4i78u84",
|
|
29
29
|
label: "PaginationButtonGroup"
|
|
30
30
|
})(buttonGroupTokens.buttonColor, ":var(", tokens.buttonColor, ");", buttonGroupTokens.buttonBackgroundColor, ":var(", tokens.buttonBackgroundColor, ");", buttonGroupTokens.buttonColorHover, ":var(", tokens.buttonHoverColor, ");", buttonGroupTokens.buttonBackgroundColorHover, ":var(", tokens.buttonBackgroundColorHover, ");", buttonGroupTokens.buttonColorActive, ":var(", tokens.buttonActiveColor, ");", buttonGroupTokens.buttonBackgroundColorActive, ":var(", tokens.buttonBackgroundColorActive, ");", buttonGroupTokens.buttonFontFamily, ":var(", tokens.paginationFontFamily, ");", buttonGroupTokens.buttonFontSize, ":var(", tokens.paginationFontSize, ");", buttonGroupTokens.buttonFontStyle, ":var(", tokens.paginationFontStyle, ");", buttonGroupTokens.buttonFontWeight, ":var(", tokens.paginationFontWeight, ");", buttonGroupTokens.buttonLetterSpacing, ":var(", tokens.paginationLetterSpacing, ");", buttonGroupTokens.buttonLineHeight, ":var(", tokens.paginationLineHeight, ");", buttonGroupTokens.buttonWidth, ":var(", tokens.buttonWidth, ");", buttonGroupTokens.buttonHeight, ":var(", tokens.buttonHeight, ");", buttonGroupTokens.buttonDefaultRadius, ":var(", tokens.buttonRadius, ");", buttonGroupTokens.buttonSideRadius, ":var(", tokens.buttonRadius, ");", buttonGroupTokens.buttonSegmentedRadius, ":var(", tokens.buttonRadius, ");", buttonGroupTokens.buttonRadiusCircle, ":var(", tokens.buttonRadius, ");", buttonGroupTokens.buttonPadding, ":0;");
|
|
31
31
|
export const PaginationButton = /*#__PURE__*/ styled(Button, {
|
|
32
|
-
target: "
|
|
32
|
+
target: "e4i78u85",
|
|
33
33
|
label: "PaginationButton"
|
|
34
34
|
})(buttonTokens.buttonColor, ":var(", tokens.buttonColor, ");", buttonTokens.buttonBackgroundColor, ":var(", tokens.buttonBackgroundColor, ");", buttonTokens.buttonColorHover, ":var(", tokens.buttonHoverColor, ");", buttonTokens.buttonBackgroundColorHover, ":var(", tokens.buttonBackgroundColorHover, ");", buttonTokens.buttonColorActive, ":var(", tokens.buttonActiveColor, ");", buttonTokens.buttonBackgroundColorActive, ":var(", tokens.buttonBackgroundColorActive, ");", buttonTokens.buttonFontFamily, ":var(", tokens.paginationFontFamily, ");", buttonTokens.buttonFontSize, ":var(", tokens.paginationFontSize, ");", buttonTokens.buttonFontStyle, ":var(", tokens.paginationFontStyle, ");", buttonTokens.buttonFontWeight, ":var(", tokens.paginationFontWeight, ");", buttonTokens.buttonLetterSpacing, ":var(", tokens.paginationLetterSpacing, ");", buttonTokens.buttonLineHeight, ":var(", tokens.paginationLineHeight, ");", buttonTokens.buttonWidth, ":var(", tokens.buttonWidth, ");", buttonTokens.buttonHeight, ":var(", tokens.buttonHeight, ");", buttonTokens.buttonRadius, ":var(", tokens.buttonRadius, ");", buttonTokens.buttonDisabledOpacity, ":var(", tokens.buttonDisabledOpacity, ");", buttonTokens.buttonFocusColor, ":var(", tokens.buttonFocusColor, ");&.", classes.paginationPageButtonActive, "{", buttonTokens.buttonColor, ":var(", tokens.paginationCurrentButtonColor, ");", buttonTokens.buttonBackgroundColor, ":var(", tokens.paginationCurrentButtonBackgroundColor, ");", buttonTokens.buttonColorHover, ":var(", tokens.paginationCurrentButtonColor, ");", buttonTokens.buttonBackgroundColorHover, ":var(", tokens.paginationCurrentButtonBackgroundColor, ");", buttonTokens.buttonColorActive, ":var(", tokens.paginationCurrentButtonColor, ");", buttonTokens.buttonBackgroundColorActive, ":var(", tokens.paginationCurrentButtonBackgroundColor, ");cursor:default;}&.", classes.buttonDisabled, "{", buttonTokens.buttonColor, ":var(", tokens.paginationDisabledButtonColor, ",var(", tokens.buttonColor, "));", buttonTokens.buttonBackgroundColor, ":var(", tokens.paginationDisabledButtonBackgroundColor, ",var(", tokens.buttonBackgroundColor, "));}", addFocus({
|
|
35
35
|
outlineOffset: 'var(--plasma_private-btn-outline-size)',
|
|
@@ -38,14 +38,18 @@ export const PaginationButton = /*#__PURE__*/ styled(Button, {
|
|
|
38
38
|
outlineColor: `var(${tokens.buttonFocusColor})`
|
|
39
39
|
}));
|
|
40
40
|
export const PaginationShorter = /*#__PURE__*/ styled(PaginationButton, {
|
|
41
|
-
target: "
|
|
41
|
+
target: "e4i78u86",
|
|
42
42
|
label: "PaginationShorter"
|
|
43
43
|
})(buttonTokens.buttonWidth, ":var(", tokens.buttonWidthShorter, ");", buttonTokens.buttonPadding, ":0;");
|
|
44
44
|
export const PaginationActionsLeft = /*#__PURE__*/ styled("div", {
|
|
45
|
-
target: "
|
|
45
|
+
target: "e4i78u87",
|
|
46
46
|
label: "PaginationActionsLeft"
|
|
47
47
|
})("display:flex;align-items:center;flex-wrap:wrap;gap:var(", tokens.paginationHelperTextGap, ");.", classes.defaultType, " &{min-width:0;flex-wrap:nowrap;flex-shrink:1;}");
|
|
48
|
+
export const PaginationQuickJumpGroup = /*#__PURE__*/ styled("div", {
|
|
49
|
+
target: "e4i78u88",
|
|
50
|
+
label: "PaginationQuickJumpGroup"
|
|
51
|
+
})("display:flex;align-items:center;flex-shrink:0;gap:var(", tokens.paginationQuickJumpGap, ",0.75rem);");
|
|
48
52
|
export const PaginationHelperText = /*#__PURE__*/ styled("div", {
|
|
49
|
-
target: "
|
|
53
|
+
target: "e4i78u89",
|
|
50
54
|
label: "PaginationHelperText"
|
|
51
55
|
})("color:var(", tokens.paginationHelperTextColor, ");&.", classes.defaultType, "{min-width:0;", applyEllipsis(), " flex-shrink:1;}&.", classes.ellipsisText, "{", applyEllipsis(), "}");
|
|
@@ -76,5 +76,7 @@ export const tokens = {
|
|
|
76
76
|
inputHeight: '--plasma-pagination-input-height',
|
|
77
77
|
inputBorderColor: '--plasma-pagination-input-border-color',
|
|
78
78
|
inputBorderWidth: '--plasma-pagination-input-border-width',
|
|
79
|
-
inputPadding: '--plasma-pagination-input-padding'
|
|
79
|
+
inputPadding: '--plasma-pagination-input-padding',
|
|
80
|
+
paginationQuickJumpGap: '--plasma-pagination-quick-jump-gap',
|
|
81
|
+
paginationQuickJumpInnerGap: '--plasma-pagination-quick-jump-inner-gap'
|
|
80
82
|
};
|
|
@@ -1,29 +1,54 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { defaultValues } from "../../utils";
|
|
3
|
+
import { classes } from "../../Pagination.tokens";
|
|
3
4
|
import { QuickJumpToPageRoot, QuickJumpToPageTypography, QuickJumpToPageInput } from "./PaginationQuickJumpToPage.styles";
|
|
4
|
-
export const PaginationQuickJumpToPage = ({ placeholderQuickJump = defaultValues.placeholderQuickJump, textQuickJump = defaultValues.textQuickJump, onChangeValue, onFocusQuickJump, onBlurQuickJump, ...rest })=>{
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
export const PaginationQuickJumpToPage = ({ prevPageValue = defaultValues.value, totalPages = defaultValues.value, hasTotalPages, placeholderQuickJump = defaultValues.placeholderQuickJump, textQuickJump = defaultValues.textQuickJump, onChangeValue, onFocusQuickJump, onBlurQuickJump, ...rest })=>{
|
|
6
|
+
// С общим числом страниц поле показывает текущую страницу, без него — пустое
|
|
7
|
+
const currentValue = hasTotalPages ? String(prevPageValue) : '';
|
|
8
|
+
// Введённое значение; null — пользователь ничего не вводит, поле показывает currentValue.
|
|
9
|
+
// Так поле всегда синхронно с value из пропов, в том числе в контролируемом режиме
|
|
10
|
+
const [draft, setDraft] = useState(null);
|
|
11
|
+
const commit = ()=>{
|
|
12
|
+
if (draft === null) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
setDraft(null);
|
|
16
|
+
if (!hasTotalPages) {
|
|
17
|
+
if (draft) {
|
|
18
|
+
onChangeValue?.(Number(draft));
|
|
19
|
+
}
|
|
20
|
+
return;
|
|
10
21
|
}
|
|
11
|
-
|
|
22
|
+
const nextPage = Math.min(Math.max(Number(draft), 1), totalPages);
|
|
23
|
+
if (draft && nextPage !== prevPageValue) {
|
|
24
|
+
onChangeValue?.(nextPage);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const handleChangeInput = (event)=>{
|
|
28
|
+
setDraft(event.currentTarget.value.replace(/\D/g, ''));
|
|
12
29
|
};
|
|
13
30
|
const handleKeyPress = (event)=>{
|
|
14
31
|
if (event.key === 'Enter') {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
32
|
+
commit();
|
|
33
|
+
}
|
|
34
|
+
if (event.key === 'Escape') {
|
|
35
|
+
setDraft(null);
|
|
19
36
|
}
|
|
20
37
|
};
|
|
21
|
-
return /*#__PURE__*/ React.createElement(QuickJumpToPageRoot,
|
|
22
|
-
|
|
38
|
+
return /*#__PURE__*/ React.createElement(QuickJumpToPageRoot, {
|
|
39
|
+
className: classes.quickJump,
|
|
40
|
+
...rest
|
|
41
|
+
}, textQuickJump && /*#__PURE__*/ React.createElement(QuickJumpToPageTypography, null, textQuickJump), /*#__PURE__*/ React.createElement(QuickJumpToPageInput, {
|
|
42
|
+
value: draft ?? currentValue,
|
|
23
43
|
placeholder: placeholderQuickJump,
|
|
24
44
|
onKeyUp: handleKeyPress,
|
|
25
45
|
onChange: handleChangeInput,
|
|
26
46
|
onFocus: onFocusQuickJump,
|
|
27
|
-
onBlur:
|
|
28
|
-
|
|
47
|
+
onBlur: (event)=>{
|
|
48
|
+
if (hasTotalPages) {
|
|
49
|
+
commit();
|
|
50
|
+
}
|
|
51
|
+
onBlurQuickJump?.(event);
|
|
52
|
+
}
|
|
53
|
+
}), hasTotalPages && /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(QuickJumpToPageTypography, null, "/"), /*#__PURE__*/ React.createElement(QuickJumpToPageTypography, null, totalPages)));
|
|
29
54
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import { tokens } from "../../Pagination.tokens";
|
|
3
3
|
export const QuickJumpToPageRoot = /*#__PURE__*/ styled("div", {
|
|
4
|
-
target: "
|
|
4
|
+
target: "ewybg940",
|
|
5
5
|
label: "QuickJumpToPageRoot"
|
|
6
|
-
})("display:flex;align-items:center;gap:0.5rem;flex-shrink:0;font-family:var(", tokens.paginationFontFamily, ");font-size:var(", tokens.paginationFontSize, ");font-style:var(", tokens.paginationFontStyle, ");font-weight:var(", tokens.paginationFontWeight, ");letter-spacing:var(", tokens.paginationLetterSpacing, ");line-height:var(", tokens.paginationLineHeight, ");");
|
|
6
|
+
})("display:flex;align-items:center;gap:var(", tokens.paginationQuickJumpInnerGap, ",0.5rem);flex-shrink:0;font-family:var(", tokens.paginationFontFamily, ");font-size:var(", tokens.paginationFontSize, ");font-style:var(", tokens.paginationFontStyle, ");font-weight:var(", tokens.paginationFontWeight, ");letter-spacing:var(", tokens.paginationLetterSpacing, ");line-height:var(", tokens.paginationLineHeight, ");");
|
|
7
7
|
export const QuickJumpToPageTypography = /*#__PURE__*/ styled("div", {
|
|
8
|
-
target: "
|
|
8
|
+
target: "ewybg941",
|
|
9
9
|
label: "QuickJumpToPageTypography"
|
|
10
10
|
})("white-space:nowrap;");
|
|
11
11
|
export const QuickJumpToPageInput = /*#__PURE__*/ styled("input", {
|
|
12
|
-
target: "
|
|
12
|
+
target: "ewybg942",
|
|
13
13
|
label: "QuickJumpToPageInput"
|
|
14
14
|
})("background:var(", tokens.inputBackgroundColor, ");color:var(", tokens.inputColor, ");width:var(", tokens.inputWidth, ");height:var(", tokens.inputHeight, ");box-sizing:border-box;outline:none;border-radius:var(", tokens.inputBorderRadius, ");padding:var(", tokens.inputPadding, ");border-color:var(", tokens.inputBorderColor, ");border-width:var(", tokens.inputBorderWidth, ");border-style:solid;font-family:var(", tokens.paginationFontFamily, ");font-size:var(", tokens.paginationFontSize, ");font-style:var(", tokens.paginationFontStyle, ");font-weight:var(", tokens.paginationFontWeight, ");letter-spacing:var(", tokens.paginationLetterSpacing, ");line-height:var(", tokens.paginationLineHeight, ");&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}");
|
package/dist/emotion/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js
CHANGED
|
@@ -12,7 +12,7 @@ export const PaginationSelectPerPage = ({ perPageValue, perPageList = defaultVal
|
|
|
12
12
|
label: num.toString(),
|
|
13
13
|
value: num.toString()
|
|
14
14
|
}));
|
|
15
|
-
return /*#__PURE__*/ React.createElement(SelectPerPageRoot, rest, /*#__PURE__*/ React.createElement(SelectPerPageTypography, null, textPerPage), /*#__PURE__*/ React.createElement(SelectPerPageSelect, {
|
|
15
|
+
return /*#__PURE__*/ React.createElement(SelectPerPageRoot, rest, textPerPage && /*#__PURE__*/ React.createElement(SelectPerPageTypography, null, textPerPage), /*#__PURE__*/ React.createElement(SelectPerPageSelect, {
|
|
16
16
|
className: classes.selectWrapper,
|
|
17
17
|
items: transformedList,
|
|
18
18
|
value: perPageValue?.toString(),
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React, { Fragment, forwardRef } from "react";
|
|
2
|
+
import cls from "classnames";
|
|
3
|
+
import { WheelColumn } from "./ui/WheelColumn";
|
|
4
|
+
import { base, Separator } from "./Wheel.styles";
|
|
5
|
+
import { classes } from "./Wheel.tokens";
|
|
6
|
+
import { base as sizeCSS } from "./variations/_size/base";
|
|
7
|
+
import { base as viewCSS } from "./variations/_view/base";
|
|
8
|
+
import { base as disabledCSS } from "./variations/_disabled/base";
|
|
9
|
+
export const wheelRoot = (Root)=>/*#__PURE__*/ forwardRef(({ columns, value, onChange, disabled, hasControls = true, visibleItemsCount = 5, animated = true, textAfterMode = 'dynamic', align = 'center', separator = 'none', className, width, style, size, view, ...rest }, ref)=>{
|
|
10
|
+
const reserveDescription = columns.some((column)=>column.description != null);
|
|
11
|
+
const hasSeparator = separator != null && typeof separator !== 'boolean' && separator !== '' && separator !== 'none';
|
|
12
|
+
const isCustomSeparator = hasSeparator && separator !== 'dots' && separator !== 'divider';
|
|
13
|
+
const separatorClassName = cls(separator === 'dots' && classes.dots, separator === 'divider' && classes.divider, isCustomSeparator && classes.customSeparator);
|
|
14
|
+
return /*#__PURE__*/ React.createElement(Root, {
|
|
15
|
+
ref: ref,
|
|
16
|
+
role: "group",
|
|
17
|
+
"aria-disabled": disabled || undefined,
|
|
18
|
+
disabled: disabled,
|
|
19
|
+
size: size,
|
|
20
|
+
view: view,
|
|
21
|
+
style: {
|
|
22
|
+
width,
|
|
23
|
+
...style
|
|
24
|
+
},
|
|
25
|
+
className: cls(className, disabled && classes.disabled, reserveDescription && classes.hasDescription, separatorClassName, align === 'left' && classes.alignLeft, align === 'right' && classes.alignRight, align === 'mixed' && classes.alignMixed),
|
|
26
|
+
...rest
|
|
27
|
+
}, columns.map((column, index)=>/*#__PURE__*/ React.createElement(Fragment, {
|
|
28
|
+
key: column.name
|
|
29
|
+
}, index > 0 && hasSeparator && /*#__PURE__*/ React.createElement(Separator, {
|
|
30
|
+
"aria-hidden": isCustomSeparator ? undefined : true,
|
|
31
|
+
className: cls(classes.separator, separatorClassName, reserveDescription && classes.hasDescription)
|
|
32
|
+
}, isCustomSeparator && separator), /*#__PURE__*/ React.createElement(WheelColumn, {
|
|
33
|
+
...column,
|
|
34
|
+
value: value[column.name],
|
|
35
|
+
disabled: disabled || column.disabled,
|
|
36
|
+
hasControls: hasControls,
|
|
37
|
+
visibleItemsCount: visibleItemsCount,
|
|
38
|
+
animated: animated,
|
|
39
|
+
textAfterMode: textAfterMode,
|
|
40
|
+
reserveDescription: reserveDescription,
|
|
41
|
+
onChange: (nextValue)=>{
|
|
42
|
+
if (onChange) {
|
|
43
|
+
onChange({
|
|
44
|
+
...value,
|
|
45
|
+
[column.name]: nextValue
|
|
46
|
+
}, column.name);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}))));
|
|
50
|
+
});
|
|
51
|
+
export const wheelConfig = {
|
|
52
|
+
name: 'Wheel',
|
|
53
|
+
tag: 'div',
|
|
54
|
+
layout: wheelRoot,
|
|
55
|
+
base,
|
|
56
|
+
variations: {
|
|
57
|
+
size: {
|
|
58
|
+
css: sizeCSS
|
|
59
|
+
},
|
|
60
|
+
view: {
|
|
61
|
+
css: viewCSS
|
|
62
|
+
},
|
|
63
|
+
disabled: {
|
|
64
|
+
css: disabledCSS,
|
|
65
|
+
attrs: true
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
defaults: {
|
|
69
|
+
size: 'displayL',
|
|
70
|
+
view: 'default'
|
|
71
|
+
}
|
|
72
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { css } from "@emotion/react";
|
|
3
|
+
import { classes, privateTokens, tokens } from "./Wheel.tokens";
|
|
4
|
+
export const base = /*#__PURE__*/ css("display:inline-flex;width:max-content;vertical-align:top;align-items:stretch;gap:var(", tokens.columnGap, ");color:var(", tokens.color, ");box-sizing:border-box;-webkit-tap-highlight-color:transparent;&.", classes.dots, ",&.", classes.customSeparator, "{gap:var(", tokens.dotColumnGap, ");}&.", classes.divider, "{gap:var(", tokens.dividerColumnGap, ");}", "base");
|
|
5
|
+
export const Column = /*#__PURE__*/ styled("div", {
|
|
6
|
+
target: "ezew12h0",
|
|
7
|
+
label: "Column"
|
|
8
|
+
})(privateTokens.alignItems, ":center;", privateTokens.justifyItems, ":center;", privateTokens.textAlign, ":center;", privateTokens.itemContentDisplay, ":var(", tokens.itemContentDisplay, ",flex);display:flex;flex:", ({ $fixedWidth })=>$fixedWidth ? '0 0 auto' : '1 1 auto', ";flex-direction:column;justify-content:center;align-items:var(", privateTokens.alignItems, ",center);text-align:var(", privateTokens.textAlign, ",center);gap:var(", tokens.controlGap, ");min-width:0;box-sizing:border-box;.", classes.alignLeft, " > &,.", classes.alignMixed, " > &:last-child:not(:only-child){", privateTokens.alignItems, ":flex-start;", privateTokens.justifyItems, ":start;", privateTokens.textAlign, ":left;", privateTokens.itemContentDisplay, ":flex;}.", classes.alignRight, " > &,.", classes.alignMixed, " > &:first-child:not(:only-child){", privateTokens.alignItems, ":flex-end;", privateTokens.justifyItems, ":end;", privateTokens.textAlign, ":right;", privateTokens.itemContentDisplay, ":flex;}");
|
|
9
|
+
export const ColumnContent = /*#__PURE__*/ styled("div", {
|
|
10
|
+
target: "ezew12h1",
|
|
11
|
+
label: "ColumnContent"
|
|
12
|
+
})("display:grid;align-self:stretch;min-width:0;");
|
|
13
|
+
export const Items = /*#__PURE__*/ styled("div", {
|
|
14
|
+
target: "ezew12h2",
|
|
15
|
+
label: "Items"
|
|
16
|
+
})("position:relative;display:grid;grid-area:1 / 1;min-width:0;padding-inline:var(", privateTokens.staticTextAfterPadding, ",0px);box-sizing:border-box;overflow:hidden;gap:var(", tokens.itemGap, ");justify-items:var(", privateTokens.justifyItems, ",center);outline:none;touch-action:pan-x;user-select:none;-webkit-user-select:none;&:focus-visible{outline:0.125rem solid var(", tokens.focusColor, ");outline-offset:0.25rem;}");
|
|
17
|
+
export const ItemContent = /*#__PURE__*/ styled("div", {
|
|
18
|
+
target: "ezew12h3",
|
|
19
|
+
label: "ItemContent"
|
|
20
|
+
})("display:var(", privateTokens.itemContentDisplay, ",flex);grid-template-columns:1fr auto 1fr;align-items:center;justify-content:center;gap:var(", tokens.textAfterGap, ");transform-origin:center;");
|
|
21
|
+
export const ItemLabel = /*#__PURE__*/ styled("div", {
|
|
22
|
+
target: "ezew12h4",
|
|
23
|
+
label: "ItemLabel"
|
|
24
|
+
})("grid-column:2;&:only-child{grid-column:1 / -1;}");
|
|
25
|
+
const labelTypography = `
|
|
26
|
+
font-family: var(${tokens.fontFamily});
|
|
27
|
+
font-size: var(${tokens.fontSize});
|
|
28
|
+
font-style: var(${tokens.fontStyle});
|
|
29
|
+
font-weight: var(${tokens.fontWeight});
|
|
30
|
+
letter-spacing: var(${tokens.letterSpacing});
|
|
31
|
+
line-height: var(${tokens.lineHeight});
|
|
32
|
+
`;
|
|
33
|
+
export const Item = /*#__PURE__*/ styled("div", {
|
|
34
|
+
target: "ezew12h5",
|
|
35
|
+
label: "Item"
|
|
36
|
+
})("position:relative;grid-column:1;grid-row:", ({ $row })=>$row, ";display:flex;flex-direction:column;align-items:var(", privateTokens.alignItems, ",center);align-self:start;justify-content:center;min-height:calc(var(", tokens.lineHeight, ") + 2 * var(", tokens.itemVerticalPadding, ",0px));padding-block:var(", tokens.itemVerticalPadding, ",0px);box-sizing:border-box;", labelTypography, ";white-space:nowrap;cursor:pointer;.", classes.staticTextAfter, " [role='listbox'] > &:not([data-buffer]){width:var(", privateTokens.staticValueWidth, ");max-width:100%;}&[data-distance='1']{min-height:calc(\n var(", tokens.lineHeight, ") * var(", tokens.secondaryScale, ") + 2 *\n var(", tokens.secondaryItemVerticalPadding, ",var(", tokens.itemVerticalPadding, ",0px))\n );padding-block:var(", tokens.secondaryItemVerticalPadding, ",var(", tokens.itemVerticalPadding, ",0px));font-size:calc(var(", tokens.fontSize, ") * var(", tokens.secondaryScale, "));line-height:calc(var(", tokens.lineHeight, ") * var(", tokens.secondaryScale, "));", ItemContent, "{opacity:var(", tokens.secondaryOpacity, ");}}&[data-distance='2'],&[data-distance='3']{min-height:calc(\n var(", tokens.lineHeight, ") * var(", tokens.tertiaryScale, ") + 2 *\n var(", tokens.tertiaryItemVerticalPadding, ",var(", tokens.itemVerticalPadding, ",0px))\n );padding-block:var(", tokens.tertiaryItemVerticalPadding, ",var(", tokens.itemVerticalPadding, ",0px));font-size:calc(var(", tokens.fontSize, ") * var(", tokens.tertiaryScale, "));line-height:calc(var(", tokens.lineHeight, ") * var(", tokens.tertiaryScale, "));", ItemContent, "{opacity:var(", tokens.tertiaryOpacity, ");}}&[data-buffer]{position:absolute;left:var(", privateTokens.staticTextAfterPadding, ",0px);right:var(", privateTokens.staticTextAfterPadding, ",0px);pointer-events:none;", ItemContent, "{opacity:0;}}&[data-buffer='before']{bottom:calc(100% + var(", tokens.itemGap, "));}&[data-buffer='after']{top:calc(100% + var(", tokens.itemGap, "));}");
|
|
37
|
+
// Все значения участвуют в расчёте ширины в полном размере, не добавляя высоту колонке.
|
|
38
|
+
export const WidthMeasure = /*#__PURE__*/ styled("div", {
|
|
39
|
+
target: "ezew12h6",
|
|
40
|
+
label: "WidthMeasure"
|
|
41
|
+
})("display:grid;grid-area:1 / 1;height:0;overflow:hidden;visibility:hidden;pointer-events:none;", Item, "{grid-area:1 / 1;width:max-content;}");
|
|
42
|
+
export const ValueWidthMeasure = /*#__PURE__*/ styled("div", {
|
|
43
|
+
target: "ezew12h7",
|
|
44
|
+
label: "ValueWidthMeasure"
|
|
45
|
+
})("grid-area:1 / 1;width:max-content;padding-inline:var(", privateTokens.staticTextAfterPadding, ",0px);");
|
|
46
|
+
export const LabelWidthMeasure = /*#__PURE__*/ styled("div", {
|
|
47
|
+
target: "ezew12h8",
|
|
48
|
+
label: "LabelWidthMeasure"
|
|
49
|
+
})("display:grid;width:max-content;");
|
|
50
|
+
export const TextAfter = /*#__PURE__*/ styled("span", {
|
|
51
|
+
target: "ezew12h9",
|
|
52
|
+
label: "TextAfter"
|
|
53
|
+
})("color:var(", tokens.textAfterColor, ");");
|
|
54
|
+
export const StaticTextAfterWrapper = /*#__PURE__*/ styled("div", {
|
|
55
|
+
target: "ezew12h10",
|
|
56
|
+
label: "StaticTextAfterWrapper"
|
|
57
|
+
})("position:relative;grid-column:1;grid-row:", ({ $row })=>$row, ";justify-self:var(", privateTokens.justifyItems, ",center);align-self:start;width:var(", privateTokens.staticValueWidth, ");max-width:100%;height:0;pointer-events:none;", labelTypography, ";white-space:nowrap;", TextAfter, "{position:absolute;top:var(", tokens.itemVerticalPadding, ",0px);left:calc(100% + var(", tokens.textAfterGap, "));width:max-content;}");
|
|
58
|
+
export const DescriptionWrapper = /*#__PURE__*/ styled("div", {
|
|
59
|
+
target: "ezew12h11",
|
|
60
|
+
label: "DescriptionWrapper"
|
|
61
|
+
})("grid-column:1;grid-row:", ({ $row })=>$row, ";display:flex;align-self:start;justify-self:stretch;justify-content:var(", privateTokens.alignItems, ",center);padding-top:calc(\n var(", tokens.itemVerticalPadding, ",0px) + var(", tokens.lineHeight, ") + var(", tokens.descriptionGap, ")\n );padding-bottom:var(", tokens.itemVerticalPadding, ",0px);pointer-events:none;");
|
|
62
|
+
export const Description = /*#__PURE__*/ styled("div", {
|
|
63
|
+
target: "ezew12h12",
|
|
64
|
+
label: "Description"
|
|
65
|
+
})("flex-shrink:0;pointer-events:auto;font-family:var(", tokens.descriptionFontFamily, ");font-size:var(", tokens.descriptionFontSize, ");font-style:var(", tokens.descriptionFontStyle, ");font-weight:var(", tokens.descriptionFontWeight, ");letter-spacing:var(", tokens.descriptionLetterSpacing, ");line-height:var(", tokens.descriptionLineHeight, ");white-space:nowrap;");
|
|
66
|
+
export const Control = /*#__PURE__*/ styled("button", {
|
|
67
|
+
target: "ezew12h13",
|
|
68
|
+
label: "Control"
|
|
69
|
+
})("display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(", tokens.controlSize, ");height:var(", tokens.controlSize, ");padding:0;margin-inline:var(", privateTokens.staticTextAfterPadding, ",0px);border:0;background:transparent;color:var(", tokens.controlColor, ");cursor:pointer;&.", classes.previousControl, "{transform:rotate(180deg);}");
|
|
70
|
+
export const Separator = /*#__PURE__*/ styled("div", {
|
|
71
|
+
target: "ezew12h14",
|
|
72
|
+
label: "Separator"
|
|
73
|
+
})("display:flex;align-items:center;justify-content:center;align-self:stretch;flex-shrink:0;&.", classes.customSeparator, ",&.", classes.dots, "{", labelTypography, ";padding-inline:var(", tokens.separatorInlinePadding, ",0px);}&.", classes.customSeparator, "{&.", classes.hasDescription, "{padding-bottom:calc(var(", tokens.descriptionGap, ") + var(", tokens.descriptionLineHeight, "));}}&.", classes.dots, "{flex-direction:column;width:var(", tokens.dotSeparatorWidth, ",var(", tokens.dotSize, "));box-sizing:content-box;gap:var(", tokens.dotGap, ");&.", classes.hasDescription, "{padding-bottom:var(", tokens.dotOffset, ");}&::before,&::after{content:'';width:var(", tokens.dotSize, ");height:var(", tokens.dotSize, ");border-radius:50%;background:currentColor;}}&.", classes.divider, "{width:1px;background:var(", tokens.dividerColor, ");}");
|