@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
|
@@ -15,6 +15,7 @@ export const tokens = {
|
|
|
15
15
|
overlayColor: '--plasma-bottom-sheet-overlay-color',
|
|
16
16
|
overlayWithBlurColor: '--plasma-bottom-sheet-overlay-with-blur-color',
|
|
17
17
|
contentBackgroundColor: '--plasma-bottom-sheet-content-background-color',
|
|
18
|
+
contentPaddingHorizontal: '--plasma-bottom-sheet-content-padding-horizontal',
|
|
18
19
|
borderRadius: '--plasma-bottom-sheet-border-radius',
|
|
19
20
|
handleBackgroundColor: '--plasma-bottom-sheet-handle-background-color',
|
|
20
21
|
handleWidth: '--plasma-bottom-sheet-handle-width',
|
|
@@ -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,26 +2,35 @@ import styled, { css } from "styled-components";
|
|
|
2
2
|
import { classes, tokens } from "./Editable.tokens";
|
|
3
3
|
export const EditButton = styled.span.withConfig({
|
|
4
4
|
displayName: "Editable.styles__EditButton",
|
|
5
|
-
componentId: "sc-
|
|
5
|
+
componentId: "sc-b99fc7f9-0"
|
|
6
6
|
})([
|
|
7
|
-
`position:relative;align-self:stretch;display:`,
|
|
8
|
-
|
|
9
|
-
], ({ isHidden })=>isHidden ? 'none' : '');
|
|
7
|
+
`position:relative;align-self:stretch;flex-shrink:0;display:`,
|
|
8
|
+
`;align-items:center;justify-content:center;`
|
|
9
|
+
], ({ isHidden })=>isHidden ? 'none' : 'inline-flex');
|
|
10
10
|
export const StyledInput = styled.input.withConfig({
|
|
11
11
|
displayName: "Editable.styles__StyledInput",
|
|
12
|
-
componentId: "sc-
|
|
12
|
+
componentId: "sc-b99fc7f9-1"
|
|
13
13
|
})([
|
|
14
14
|
``
|
|
15
15
|
]);
|
|
16
16
|
export const StyledPlacehpolder = styled.span.withConfig({
|
|
17
17
|
displayName: "Editable.styles__StyledPlacehpolder",
|
|
18
|
-
componentId: "sc-
|
|
18
|
+
componentId: "sc-b99fc7f9-2"
|
|
19
19
|
})([
|
|
20
20
|
`display:inline-block;color:var(`,
|
|
21
21
|
`);`
|
|
22
22
|
], tokens.placeholderColor);
|
|
23
23
|
export const base = css([
|
|
24
24
|
`display:inline-flex;align-items:center;max-width:100%;cursor:pointer;.`,
|
|
25
|
-
`{
|
|
26
|
-
`
|
|
27
|
-
|
|
25
|
+
`{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;}.`,
|
|
26
|
+
`{width:max-content;max-width:none;outline:none;white-space:nowrap;caret-color:var(`,
|
|
27
|
+
`);}&:focus-within .`,
|
|
28
|
+
`{background:none;-webkit-text-fill-color:currentColor;}&.`,
|
|
29
|
+
`{gap:var(`,
|
|
30
|
+
`);.`,
|
|
31
|
+
`{margin-right:0;padding-right:0;background:none;-webkit-text-fill-color:currentColor;}.`,
|
|
32
|
+
`{width:auto;min-width:0;white-space:pre-wrap;overflow-wrap:break-word;}`,
|
|
33
|
+
`{padding-left:0;background:var(`,
|
|
34
|
+
`,var(`,
|
|
35
|
+
`));}}`
|
|
36
|
+
], classes.textClip, classes.editableTextBox, tokens.caretColor, classes.textClip, classes.multiline, tokens.iconGap, classes.textClip, classes.editableTextBox, EditButton, tokens.iconBackground, tokens.editButtonBackground);
|
|
@@ -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',
|
|
@@ -3,9 +3,15 @@ import { classes, tokens } from "../../Editable.tokens";
|
|
|
3
3
|
import { EditButton } from "../../Editable.styles";
|
|
4
4
|
export const base = css([
|
|
5
5
|
``,
|
|
6
|
+
`:var(`,
|
|
7
|
+
`);`,
|
|
8
|
+
`:var(`,
|
|
9
|
+
`);`,
|
|
10
|
+
`:calc(var(`,
|
|
11
|
+
`) * -1);`,
|
|
6
12
|
`{padding-left:var(`,
|
|
7
13
|
`);}.`,
|
|
8
14
|
`{margin-right:var(`,
|
|
9
15
|
`);padding-right:var(`,
|
|
10
16
|
`);}`
|
|
11
|
-
], EditButton, tokens.editButtonPaddingLeft, classes.
|
|
17
|
+
], tokens.editButtonPaddingLeft, tokens.iconGap, tokens.textBoxPaddingRight, tokens.iconGap, tokens.textBoxMarginRight, tokens.iconGap, EditButton, tokens.editButtonPaddingLeft, classes.textClip, tokens.textBoxMarginRight, tokens.textBoxPaddingRight);
|
|
@@ -3,9 +3,11 @@ import { tokens } from "../../Editable.tokens";
|
|
|
3
3
|
import { EditButton } from "../../Editable.styles";
|
|
4
4
|
export const base = css([
|
|
5
5
|
``,
|
|
6
|
-
`{background:var(
|
|
7
|
-
|
|
6
|
+
`{background:var( `,
|
|
7
|
+
`,linear-gradient( to left,var(`,
|
|
8
|
+
`) calc(100% - var(`,
|
|
9
|
+
`)),transparent ) );color:var(`,
|
|
8
10
|
`);}&:hover > `,
|
|
9
11
|
`{color:var(`,
|
|
10
12
|
`);}`
|
|
11
|
-
], EditButton, tokens.editButtonBackground, tokens.editButtonColor, EditButton, tokens.editButtonColorHover);
|
|
13
|
+
], EditButton, tokens.iconBackground, tokens.editButtonBackground, tokens.iconGap, tokens.editButtonColor, EditButton, tokens.editButtonColorHover);
|
|
@@ -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
|
|
@@ -10,7 +10,7 @@ const mergedButtonGroupConfig = mergeConfig(buttonGroupConfig);
|
|
|
10
10
|
const ButtonGroup = component(mergedButtonGroupConfig);
|
|
11
11
|
export const PaginationRoot = styled.div.withConfig({
|
|
12
12
|
displayName: "Pagination.styles__PaginationRoot",
|
|
13
|
-
componentId: "sc-
|
|
13
|
+
componentId: "sc-e41a539f-0"
|
|
14
14
|
})([
|
|
15
15
|
`display:flex;color:var(`,
|
|
16
16
|
`);&.`,
|
|
@@ -19,13 +19,13 @@ export const PaginationRoot = styled.div.withConfig({
|
|
|
19
19
|
], tokens.paginationColor, classes.compactType, classes.defaultType);
|
|
20
20
|
export const PaginationPages = styled.div.withConfig({
|
|
21
21
|
displayName: "Pagination.styles__PaginationPages",
|
|
22
|
-
componentId: "sc-
|
|
22
|
+
componentId: "sc-e41a539f-1"
|
|
23
23
|
})([
|
|
24
24
|
`display:flex;align-items:center;gap:0.25rem;flex-shrink:0;`
|
|
25
25
|
]);
|
|
26
26
|
export const PaginationActions = styled.div.withConfig({
|
|
27
27
|
displayName: "Pagination.styles__PaginationActions",
|
|
28
|
-
componentId: "sc-
|
|
28
|
+
componentId: "sc-e41a539f-2"
|
|
29
29
|
})([
|
|
30
30
|
`display:flex;justify-content:space-between;flex-grow:1;align-items:center;gap:var(`,
|
|
31
31
|
`);flex-shrink:1;flex-direction:row;&.`,
|
|
@@ -35,13 +35,13 @@ export const PaginationActions = styled.div.withConfig({
|
|
|
35
35
|
], tokens.paginationHelperTextGap, classes.compactType, classes.withHasPerPageSelect, classes.withHasQuickJump);
|
|
36
36
|
export const PaginationSection = styled.div.withConfig({
|
|
37
37
|
displayName: "Pagination.styles__PaginationSection",
|
|
38
|
-
componentId: "sc-
|
|
38
|
+
componentId: "sc-e41a539f-3"
|
|
39
39
|
})([
|
|
40
40
|
`display:flex;gap:0.125rem;`
|
|
41
41
|
]);
|
|
42
42
|
export const PaginationButtonGroup = styled(ButtonGroup).withConfig({
|
|
43
43
|
displayName: "Pagination.styles__PaginationButtonGroup",
|
|
44
|
-
componentId: "sc-
|
|
44
|
+
componentId: "sc-e41a539f-4"
|
|
45
45
|
})([
|
|
46
46
|
``,
|
|
47
47
|
`:var(`,
|
|
@@ -84,7 +84,7 @@ export const PaginationButtonGroup = styled(ButtonGroup).withConfig({
|
|
|
84
84
|
], buttonGroupTokens.buttonColor, tokens.buttonColor, buttonGroupTokens.buttonBackgroundColor, tokens.buttonBackgroundColor, buttonGroupTokens.buttonColorHover, tokens.buttonHoverColor, buttonGroupTokens.buttonBackgroundColorHover, tokens.buttonBackgroundColorHover, buttonGroupTokens.buttonColorActive, tokens.buttonActiveColor, buttonGroupTokens.buttonBackgroundColorActive, tokens.buttonBackgroundColorActive, buttonGroupTokens.buttonFontFamily, tokens.paginationFontFamily, buttonGroupTokens.buttonFontSize, tokens.paginationFontSize, buttonGroupTokens.buttonFontStyle, tokens.paginationFontStyle, buttonGroupTokens.buttonFontWeight, tokens.paginationFontWeight, buttonGroupTokens.buttonLetterSpacing, tokens.paginationLetterSpacing, buttonGroupTokens.buttonLineHeight, tokens.paginationLineHeight, buttonGroupTokens.buttonWidth, tokens.buttonWidth, buttonGroupTokens.buttonHeight, tokens.buttonHeight, buttonGroupTokens.buttonDefaultRadius, tokens.buttonRadius, buttonGroupTokens.buttonSideRadius, tokens.buttonRadius, buttonGroupTokens.buttonSegmentedRadius, tokens.buttonRadius, buttonGroupTokens.buttonRadiusCircle, tokens.buttonRadius, buttonGroupTokens.buttonPadding);
|
|
85
85
|
export const PaginationButton = styled(Button).withConfig({
|
|
86
86
|
displayName: "Pagination.styles__PaginationButton",
|
|
87
|
-
componentId: "sc-
|
|
87
|
+
componentId: "sc-e41a539f-5"
|
|
88
88
|
})([
|
|
89
89
|
``,
|
|
90
90
|
`:var(`,
|
|
@@ -150,7 +150,7 @@ export const PaginationButton = styled(Button).withConfig({
|
|
|
150
150
|
}));
|
|
151
151
|
export const PaginationShorter = styled(PaginationButton).withConfig({
|
|
152
152
|
displayName: "Pagination.styles__PaginationShorter",
|
|
153
|
-
componentId: "sc-
|
|
153
|
+
componentId: "sc-e41a539f-6"
|
|
154
154
|
})([
|
|
155
155
|
``,
|
|
156
156
|
`:var(`,
|
|
@@ -159,15 +159,22 @@ export const PaginationShorter = styled(PaginationButton).withConfig({
|
|
|
159
159
|
], buttonTokens.buttonWidth, tokens.buttonWidthShorter, buttonTokens.buttonPadding);
|
|
160
160
|
export const PaginationActionsLeft = styled.div.withConfig({
|
|
161
161
|
displayName: "Pagination.styles__PaginationActionsLeft",
|
|
162
|
-
componentId: "sc-
|
|
162
|
+
componentId: "sc-e41a539f-7"
|
|
163
163
|
})([
|
|
164
164
|
`display:flex;align-items:center;flex-wrap:wrap;gap:var(`,
|
|
165
165
|
`);.`,
|
|
166
166
|
` &{min-width:0;flex-wrap:nowrap;flex-shrink:1;}`
|
|
167
167
|
], tokens.paginationHelperTextGap, classes.defaultType);
|
|
168
|
+
export const PaginationQuickJumpGroup = styled.div.withConfig({
|
|
169
|
+
displayName: "Pagination.styles__PaginationQuickJumpGroup",
|
|
170
|
+
componentId: "sc-e41a539f-8"
|
|
171
|
+
})([
|
|
172
|
+
`display:flex;align-items:center;flex-shrink:0;gap:var(`,
|
|
173
|
+
`,0.75rem);`
|
|
174
|
+
], tokens.paginationQuickJumpGap);
|
|
168
175
|
export const PaginationHelperText = styled.div.withConfig({
|
|
169
176
|
displayName: "Pagination.styles__PaginationHelperText",
|
|
170
|
-
componentId: "sc-
|
|
177
|
+
componentId: "sc-e41a539f-9"
|
|
171
178
|
})([
|
|
172
179
|
`color:var(`,
|
|
173
180
|
`);&.`,
|
|
@@ -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
|
};
|
|
@@ -2,25 +2,26 @@ import styled from "styled-components";
|
|
|
2
2
|
import { tokens } from "../../Pagination.tokens";
|
|
3
3
|
export const QuickJumpToPageRoot = styled.div.withConfig({
|
|
4
4
|
displayName: "PaginationQuickJumpToPage.styles__QuickJumpToPageRoot",
|
|
5
|
-
componentId: "sc-
|
|
5
|
+
componentId: "sc-2f4416fb-0"
|
|
6
6
|
})([
|
|
7
|
-
`display:flex;align-items:center;gap:
|
|
7
|
+
`display:flex;align-items:center;gap:var(`,
|
|
8
|
+
`,0.5rem);flex-shrink:0;font-family:var(`,
|
|
8
9
|
`);font-size:var(`,
|
|
9
10
|
`);font-style:var(`,
|
|
10
11
|
`);font-weight:var(`,
|
|
11
12
|
`);letter-spacing:var(`,
|
|
12
13
|
`);line-height:var(`,
|
|
13
14
|
`);`
|
|
14
|
-
], tokens.paginationFontFamily, tokens.paginationFontSize, tokens.paginationFontStyle, tokens.paginationFontWeight, tokens.paginationLetterSpacing, tokens.paginationLineHeight);
|
|
15
|
+
], tokens.paginationQuickJumpInnerGap, tokens.paginationFontFamily, tokens.paginationFontSize, tokens.paginationFontStyle, tokens.paginationFontWeight, tokens.paginationLetterSpacing, tokens.paginationLineHeight);
|
|
15
16
|
export const QuickJumpToPageTypography = styled.div.withConfig({
|
|
16
17
|
displayName: "PaginationQuickJumpToPage.styles__QuickJumpToPageTypography",
|
|
17
|
-
componentId: "sc-
|
|
18
|
+
componentId: "sc-2f4416fb-1"
|
|
18
19
|
})([
|
|
19
20
|
`white-space:nowrap;`
|
|
20
21
|
]);
|
|
21
22
|
export const QuickJumpToPageInput = styled.input.withConfig({
|
|
22
23
|
displayName: "PaginationQuickJumpToPage.styles__QuickJumpToPageInput",
|
|
23
|
-
componentId: "sc-
|
|
24
|
+
componentId: "sc-2f4416fb-2"
|
|
24
25
|
})([
|
|
25
26
|
`background:var(`,
|
|
26
27
|
`);color:var(`,
|
|
@@ -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
|
+
};
|