@douyinfe/semi-ui 2.22.0-alpha.0 → 2.22.0-beta.1
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/semi.css +450 -38
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +5068 -6354
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/_base/baseComponent.js +3 -0
- package/lib/cjs/_cssAnimation/index.d.ts +39 -0
- package/lib/cjs/_cssAnimation/index.js +133 -0
- package/lib/cjs/anchor/index.d.ts +2 -2
- package/lib/cjs/anchor/link.d.ts +1 -1
- package/lib/cjs/autoComplete/index.d.ts +6 -7
- package/lib/cjs/autoComplete/option.d.ts +1 -1
- package/lib/cjs/banner/index.d.ts +2 -2
- package/lib/cjs/breadcrumb/index.d.ts +3 -3
- package/lib/cjs/breadcrumb/item.d.ts +3 -3
- package/lib/cjs/button/index.d.ts +2 -2
- package/lib/cjs/calendar/dayCalendar.d.ts +2 -2
- package/lib/cjs/calendar/index.d.ts +2 -2
- package/lib/cjs/calendar/monthCalendar.d.ts +2 -2
- package/lib/cjs/calendar/rangeCalendar.d.ts +2 -2
- package/lib/cjs/calendar/weekCalendar.d.ts +2 -2
- package/lib/cjs/card/cardGroup.d.ts +1 -1
- package/lib/cjs/carousel/index.d.ts +1 -1
- package/lib/cjs/cascader/index.d.ts +7 -8
- package/lib/cjs/cascader/index.js +8 -6
- package/lib/cjs/checkbox/checkbox.d.ts +5 -1
- package/lib/cjs/checkbox/checkbox.js +24 -0
- package/lib/cjs/checkbox/checkboxGroup.js +2 -2
- package/lib/cjs/checkbox/context.d.ts +1 -2
- package/lib/cjs/collapse/collapse-context.d.ts +1 -2
- package/lib/cjs/collapse/index.d.ts +3 -3
- package/lib/cjs/collapse/item.d.ts +2 -2
- package/lib/cjs/collapsible/index.d.ts +32 -19
- package/lib/cjs/collapsible/index.js +157 -121
- package/lib/cjs/configProvider/index.d.ts +1 -1
- package/lib/cjs/datePicker/dateInput.d.ts +3 -3
- package/lib/cjs/datePicker/datePicker.d.ts +10 -7
- package/lib/cjs/datePicker/datePicker.js +11 -13
- package/lib/cjs/datePicker/month.d.ts +1 -1
- package/lib/cjs/datePicker/month.js +5 -1
- package/lib/cjs/datePicker/monthsGrid.d.ts +6 -5
- package/lib/cjs/datePicker/monthsGrid.js +9 -26
- package/lib/cjs/datePicker/yearAndMonth.js +13 -8
- package/lib/cjs/descriptions/index.d.ts +1 -1
- package/lib/cjs/dropdown/dropdownItem.d.ts +2 -1
- package/lib/cjs/dropdown/dropdownItem.js +3 -1
- package/lib/cjs/dropdown/dropdownMenu.d.ts +1 -0
- package/lib/cjs/dropdown/index.d.ts +5 -5
- package/lib/cjs/form/baseForm.d.ts +6 -4
- package/lib/cjs/form/errorMessage.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +3 -1
- package/lib/cjs/form/label.d.ts +1 -1
- package/lib/cjs/grid/col.d.ts +6 -6
- package/lib/cjs/grid/row.d.ts +1 -1
- package/lib/cjs/iconButton/index.d.ts +2 -2
- package/lib/cjs/image/image.d.ts +4 -4
- package/lib/cjs/image/preview.d.ts +2 -1
- package/lib/cjs/image/previewImage.d.ts +1 -1
- package/lib/cjs/image/previewImage.js +8 -5
- package/lib/cjs/image/previewInner.d.ts +1 -1
- package/lib/cjs/image/previewInner.js +3 -3
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +8 -0
- package/lib/cjs/input/index.d.ts +1 -0
- package/lib/cjs/input/textarea.js +1 -1
- package/lib/cjs/inputNumber/index.d.ts +2 -2
- package/lib/cjs/locale/source/ro.d.ts +3 -3
- package/lib/cjs/modal/Modal.d.ts +6 -6
- package/lib/cjs/modal/Modal.js +80 -56
- package/lib/cjs/modal/ModalContent.js +6 -5
- package/lib/cjs/modal/confirm.d.ts +10 -10
- package/lib/cjs/modal/confirm.js +1 -15
- package/lib/cjs/modal/useModal/HookModal.d.ts +0 -2
- package/lib/cjs/modal/useModal/HookModal.js +6 -18
- package/lib/cjs/navigation/Footer.d.ts +1 -1
- package/lib/cjs/navigation/Header.d.ts +3 -3
- package/lib/cjs/navigation/Item.d.ts +4 -4
- package/lib/cjs/navigation/Item.js +11 -5
- package/lib/cjs/navigation/OpenIconTransition.d.ts +1 -15
- package/lib/cjs/navigation/OpenIconTransition.js +1 -82
- package/lib/cjs/navigation/SubNav.d.ts +4 -4
- package/lib/cjs/navigation/SubNav.js +43 -27
- package/lib/cjs/navigation/index.d.ts +8 -11
- package/lib/cjs/notification/index.d.ts +0 -1
- package/lib/cjs/notification/index.js +25 -15
- package/lib/cjs/notification/notice.d.ts +3 -1
- package/lib/cjs/notification/notice.js +3 -1
- package/lib/cjs/popconfirm/index.d.ts +4 -5
- package/lib/cjs/popover/index.d.ts +7 -7
- package/lib/cjs/popover/index.js +1 -1
- package/lib/cjs/progress/index.d.ts +4 -4
- package/lib/cjs/rating/index.d.ts +1 -1
- package/lib/cjs/rating/item.d.ts +1 -1
- package/lib/cjs/scrollList/index.d.ts +1 -1
- package/lib/cjs/scrollList/scrollItem.d.ts +3 -3
- package/lib/cjs/scrollList/scrollItem.js +2 -2
- package/lib/cjs/select/index.d.ts +10 -5
- package/lib/cjs/select/index.js +108 -60
- package/lib/cjs/select/option.d.ts +1 -1
- package/lib/cjs/select/optionGroup.d.ts +1 -1
- package/lib/cjs/sideSheet/SideSheetContent.d.ts +8 -0
- package/lib/cjs/sideSheet/SideSheetContent.js +10 -6
- package/lib/cjs/sideSheet/index.d.ts +4 -4
- package/lib/cjs/sideSheet/index.js +69 -39
- package/lib/cjs/slider/index.js +2 -2
- package/lib/cjs/space/index.d.ts +1 -1
- package/lib/cjs/spin/index.d.ts +1 -0
- package/lib/cjs/spin/index.js +1 -4
- package/lib/cjs/table/Body/BaseRow.d.ts +5 -5
- package/lib/cjs/table/Body/ExpandedRow.d.ts +3 -3
- package/lib/cjs/table/Body/SectionRow.d.ts +3 -3
- package/lib/cjs/table/Column.d.ts +4 -4
- package/lib/cjs/table/ColumnShape.d.ts +4 -4
- package/lib/cjs/table/ColumnSorter.d.ts +1 -1
- package/lib/cjs/table/CustomExpandIcon.d.ts +1 -1
- package/lib/cjs/table/CustomExpandIcon.js +13 -5
- package/lib/cjs/table/Table.d.ts +15 -15
- package/lib/cjs/table/Table.js +20 -1
- package/lib/cjs/table/TableCell.d.ts +4 -4
- package/lib/cjs/table/TableHeaderRow.d.ts +3 -2
- package/lib/cjs/table/TablePagination.d.ts +1 -1
- package/lib/cjs/table/index.d.ts +15 -15
- package/lib/cjs/table/interface.d.ts +2 -0
- package/lib/cjs/tabs/TabPane.d.ts +2 -8
- package/lib/cjs/tabs/TabPane.js +40 -38
- package/lib/cjs/tabs/index.d.ts +5 -3
- package/lib/cjs/tabs/index.js +26 -4
- package/lib/cjs/tabs/interface.d.ts +2 -0
- package/lib/cjs/tag/group.d.ts +1 -0
- package/lib/cjs/tag/group.js +6 -3
- package/lib/cjs/tag/index.d.ts +1 -1
- package/lib/cjs/tag/index.js +1 -0
- package/lib/cjs/tag/interface.d.ts +3 -1
- package/lib/cjs/tagInput/index.d.ts +3 -3
- package/lib/cjs/timePicker/Combobox.js +4 -8
- package/lib/cjs/timePicker/PanelShape.d.ts +2 -2
- package/lib/cjs/timePicker/TimePicker.d.ts +11 -11
- package/lib/cjs/timePicker/TimePicker.js +3 -1
- package/lib/cjs/timePicker/TimeShape.d.ts +1 -1
- package/lib/cjs/timePicker/index.d.ts +10 -9
- package/lib/cjs/timeline/index.d.ts +1 -1
- package/lib/cjs/toast/index.d.ts +2 -4
- package/lib/cjs/toast/index.js +29 -14
- package/lib/cjs/toast/toast.d.ts +4 -2
- package/lib/cjs/toast/toast.js +3 -1
- package/lib/cjs/tooltip/index.d.ts +7 -11
- package/lib/cjs/tooltip/index.js +30 -39
- package/lib/cjs/transfer/index.d.ts +1 -1
- package/lib/cjs/tree/autoSizer.d.ts +2 -2
- package/lib/cjs/tree/index.d.ts +5 -5
- package/lib/cjs/tree/nodeCollapsible.d.ts +11 -0
- package/lib/cjs/tree/nodeCollapsible.js +50 -0
- package/lib/cjs/tree/nodeList.js +6 -5
- package/lib/cjs/tree/treeNode.d.ts +1 -1
- package/lib/cjs/treeSelect/index.d.ts +12 -9
- package/lib/cjs/treeSelect/index.js +23 -9
- package/lib/cjs/trigger/index.d.ts +1 -1
- package/lib/cjs/typography/base.d.ts +8 -8
- package/lib/cjs/typography/index.d.ts +2 -0
- package/lib/cjs/typography/index.js +3 -0
- package/lib/cjs/typography/interface.d.ts +2 -0
- package/lib/cjs/typography/numeral.d.ts +68 -0
- package/lib/cjs/typography/numeral.js +106 -0
- package/lib/cjs/typography/paragraph.d.ts +3 -3
- package/lib/cjs/typography/text.d.ts +4 -4
- package/lib/cjs/typography/title.d.ts +3 -3
- package/lib/cjs/upload/fileCard.d.ts +1 -1
- package/lib/es/_base/baseComponent.js +3 -0
- package/lib/es/_cssAnimation/index.d.ts +39 -0
- package/lib/es/_cssAnimation/index.js +122 -0
- package/lib/es/anchor/index.d.ts +2 -2
- package/lib/es/anchor/link.d.ts +1 -1
- package/lib/es/autoComplete/index.d.ts +6 -7
- package/lib/es/autoComplete/option.d.ts +1 -1
- package/lib/es/banner/index.d.ts +2 -2
- package/lib/es/breadcrumb/index.d.ts +3 -3
- package/lib/es/breadcrumb/item.d.ts +3 -3
- package/lib/es/button/index.d.ts +2 -2
- package/lib/es/calendar/dayCalendar.d.ts +2 -2
- package/lib/es/calendar/index.d.ts +2 -2
- package/lib/es/calendar/monthCalendar.d.ts +2 -2
- package/lib/es/calendar/rangeCalendar.d.ts +2 -2
- package/lib/es/calendar/weekCalendar.d.ts +2 -2
- package/lib/es/card/cardGroup.d.ts +1 -1
- package/lib/es/carousel/index.d.ts +1 -1
- package/lib/es/cascader/index.d.ts +7 -8
- package/lib/es/cascader/index.js +8 -6
- package/lib/es/checkbox/checkbox.d.ts +5 -1
- package/lib/es/checkbox/checkbox.js +24 -0
- package/lib/es/checkbox/checkboxGroup.js +2 -2
- package/lib/es/checkbox/context.d.ts +1 -2
- package/lib/es/collapse/collapse-context.d.ts +1 -2
- package/lib/es/collapse/index.d.ts +3 -3
- package/lib/es/collapse/item.d.ts +2 -2
- package/lib/es/collapsible/index.d.ts +32 -19
- package/lib/es/collapsible/index.js +158 -119
- package/lib/es/configProvider/index.d.ts +1 -1
- package/lib/es/datePicker/dateInput.d.ts +3 -3
- package/lib/es/datePicker/datePicker.d.ts +10 -7
- package/lib/es/datePicker/datePicker.js +11 -13
- package/lib/es/datePicker/month.d.ts +1 -1
- package/lib/es/datePicker/month.js +5 -1
- package/lib/es/datePicker/monthsGrid.d.ts +6 -5
- package/lib/es/datePicker/monthsGrid.js +9 -26
- package/lib/es/datePicker/yearAndMonth.js +13 -8
- package/lib/es/descriptions/index.d.ts +1 -1
- package/lib/es/dropdown/dropdownItem.d.ts +2 -1
- package/lib/es/dropdown/dropdownItem.js +3 -1
- package/lib/es/dropdown/dropdownMenu.d.ts +1 -0
- package/lib/es/dropdown/index.d.ts +5 -5
- package/lib/es/form/baseForm.d.ts +6 -4
- package/lib/es/form/errorMessage.d.ts +1 -1
- package/lib/es/form/field.d.ts +3 -1
- package/lib/es/form/label.d.ts +1 -1
- package/lib/es/grid/col.d.ts +6 -6
- package/lib/es/grid/row.d.ts +1 -1
- package/lib/es/iconButton/index.d.ts +2 -2
- package/lib/es/image/image.d.ts +4 -4
- package/lib/es/image/preview.d.ts +2 -1
- package/lib/es/image/previewImage.d.ts +1 -1
- package/lib/es/image/previewImage.js +8 -5
- package/lib/es/image/previewInner.d.ts +1 -1
- package/lib/es/image/previewInner.js +3 -3
- package/lib/es/index.d.ts +1 -0
- package/lib/es/index.js +1 -0
- package/lib/es/input/index.d.ts +1 -0
- package/lib/es/input/textarea.js +1 -1
- package/lib/es/inputNumber/index.d.ts +2 -2
- package/lib/es/locale/source/ro.d.ts +3 -3
- package/lib/es/modal/Modal.d.ts +6 -6
- package/lib/es/modal/Modal.js +79 -56
- package/lib/es/modal/ModalContent.js +6 -5
- package/lib/es/modal/confirm.d.ts +10 -10
- package/lib/es/modal/confirm.js +1 -14
- package/lib/es/modal/useModal/HookModal.d.ts +0 -2
- package/lib/es/modal/useModal/HookModal.js +7 -19
- package/lib/es/navigation/Footer.d.ts +1 -1
- package/lib/es/navigation/Header.d.ts +3 -3
- package/lib/es/navigation/Item.d.ts +4 -4
- package/lib/es/navigation/Item.js +11 -5
- package/lib/es/navigation/OpenIconTransition.d.ts +1 -15
- package/lib/es/navigation/OpenIconTransition.js +1 -66
- package/lib/es/navigation/SubNav.d.ts +4 -4
- package/lib/es/navigation/SubNav.js +43 -28
- package/lib/es/navigation/index.d.ts +8 -11
- package/lib/es/notification/index.d.ts +0 -1
- package/lib/es/notification/index.js +24 -14
- package/lib/es/notification/notice.d.ts +3 -1
- package/lib/es/notification/notice.js +3 -1
- package/lib/es/popconfirm/index.d.ts +4 -5
- package/lib/es/popover/index.d.ts +7 -7
- package/lib/es/popover/index.js +1 -1
- package/lib/es/progress/index.d.ts +4 -4
- package/lib/es/rating/index.d.ts +1 -1
- package/lib/es/rating/item.d.ts +1 -1
- package/lib/es/scrollList/index.d.ts +1 -1
- package/lib/es/scrollList/scrollItem.d.ts +3 -3
- package/lib/es/scrollList/scrollItem.js +3 -3
- package/lib/es/select/index.d.ts +10 -5
- package/lib/es/select/index.js +108 -60
- package/lib/es/select/option.d.ts +1 -1
- package/lib/es/select/optionGroup.d.ts +1 -1
- package/lib/es/sideSheet/SideSheetContent.d.ts +8 -0
- package/lib/es/sideSheet/SideSheetContent.js +10 -6
- package/lib/es/sideSheet/index.d.ts +4 -4
- package/lib/es/sideSheet/index.js +67 -37
- package/lib/es/slider/index.js +2 -2
- package/lib/es/space/index.d.ts +1 -1
- package/lib/es/spin/index.d.ts +1 -0
- package/lib/es/spin/index.js +1 -4
- package/lib/es/table/Body/BaseRow.d.ts +5 -5
- package/lib/es/table/Body/ExpandedRow.d.ts +3 -3
- package/lib/es/table/Body/SectionRow.d.ts +3 -3
- package/lib/es/table/Column.d.ts +4 -4
- package/lib/es/table/ColumnShape.d.ts +4 -4
- package/lib/es/table/ColumnSorter.d.ts +1 -1
- package/lib/es/table/CustomExpandIcon.d.ts +1 -1
- package/lib/es/table/CustomExpandIcon.js +13 -5
- package/lib/es/table/Table.d.ts +15 -15
- package/lib/es/table/Table.js +18 -1
- package/lib/es/table/TableCell.d.ts +4 -4
- package/lib/es/table/TableHeaderRow.d.ts +3 -2
- package/lib/es/table/TablePagination.d.ts +1 -1
- package/lib/es/table/index.d.ts +15 -15
- package/lib/es/table/interface.d.ts +2 -0
- package/lib/es/tabs/TabPane.d.ts +2 -8
- package/lib/es/tabs/TabPane.js +40 -38
- package/lib/es/tabs/index.d.ts +5 -3
- package/lib/es/tabs/index.js +26 -4
- package/lib/es/tabs/interface.d.ts +2 -0
- package/lib/es/tag/group.d.ts +1 -0
- package/lib/es/tag/group.js +6 -3
- package/lib/es/tag/index.d.ts +1 -1
- package/lib/es/tag/index.js +1 -0
- package/lib/es/tag/interface.d.ts +3 -1
- package/lib/es/tagInput/index.d.ts +3 -3
- package/lib/es/timePicker/Combobox.js +4 -8
- package/lib/es/timePicker/PanelShape.d.ts +2 -2
- package/lib/es/timePicker/TimePicker.d.ts +11 -11
- package/lib/es/timePicker/TimePicker.js +3 -1
- package/lib/es/timePicker/TimeShape.d.ts +1 -1
- package/lib/es/timePicker/index.d.ts +10 -9
- package/lib/es/timeline/index.d.ts +1 -1
- package/lib/es/toast/index.d.ts +2 -4
- package/lib/es/toast/index.js +27 -13
- package/lib/es/toast/toast.d.ts +4 -2
- package/lib/es/toast/toast.js +3 -1
- package/lib/es/tooltip/index.d.ts +7 -11
- package/lib/es/tooltip/index.js +27 -38
- package/lib/es/transfer/index.d.ts +1 -1
- package/lib/es/tree/autoSizer.d.ts +2 -2
- package/lib/es/tree/index.d.ts +5 -5
- package/lib/es/tree/nodeCollapsible.d.ts +11 -0
- package/lib/es/tree/nodeCollapsible.js +35 -0
- package/lib/es/tree/nodeList.js +6 -5
- package/lib/es/tree/treeNode.d.ts +1 -1
- package/lib/es/treeSelect/index.d.ts +12 -9
- package/lib/es/treeSelect/index.js +22 -8
- package/lib/es/trigger/index.d.ts +1 -1
- package/lib/es/typography/base.d.ts +8 -8
- package/lib/es/typography/index.d.ts +2 -0
- package/lib/es/typography/index.js +2 -0
- package/lib/es/typography/interface.d.ts +2 -0
- package/lib/es/typography/numeral.d.ts +68 -0
- package/lib/es/typography/numeral.js +86 -0
- package/lib/es/typography/paragraph.d.ts +3 -3
- package/lib/es/typography/text.d.ts +4 -4
- package/lib/es/typography/title.d.ts +3 -3
- package/lib/es/upload/fileCard.d.ts +1 -1
- package/package.json +7 -8
- package/lib/cjs/motions/Rotate.d.ts +0 -23
- package/lib/cjs/motions/Rotate.js +0 -76
- package/lib/cjs/navigation/SubNavTransition.d.ts +0 -17
- package/lib/cjs/navigation/SubNavTransition.js +0 -83
- package/lib/cjs/notification/NoticeTransition.d.ts +0 -10
- package/lib/cjs/notification/NoticeTransition.js +0 -85
- package/lib/cjs/sideSheet/SideSheetTransition.d.ts +0 -12
- package/lib/cjs/sideSheet/SideSheetTransition.js +0 -115
- package/lib/cjs/tabs/TabPaneTransition.d.ts +0 -4
- package/lib/cjs/tabs/TabPaneTransition.js +0 -114
- package/lib/cjs/toast/ToastTransition.d.ts +0 -7
- package/lib/cjs/toast/ToastTransition.js +0 -66
- package/lib/cjs/tooltip/TooltipStyledTransition.d.ts +0 -9
- package/lib/cjs/tooltip/TooltipStyledTransition.js +0 -52
- package/lib/cjs/tree/collapse.d.ts +0 -29
- package/lib/cjs/tree/collapse.js +0 -155
- package/lib/es/motions/Rotate.d.ts +0 -23
- package/lib/es/motions/Rotate.js +0 -60
- package/lib/es/navigation/SubNavTransition.d.ts +0 -17
- package/lib/es/navigation/SubNavTransition.js +0 -66
- package/lib/es/notification/NoticeTransition.d.ts +0 -10
- package/lib/es/notification/NoticeTransition.js +0 -74
- package/lib/es/sideSheet/SideSheetTransition.d.ts +0 -12
- package/lib/es/sideSheet/SideSheetTransition.js +0 -102
- package/lib/es/tabs/TabPaneTransition.d.ts +0 -4
- package/lib/es/tabs/TabPaneTransition.js +0 -103
- package/lib/es/toast/ToastTransition.d.ts +0 -7
- package/lib/es/toast/ToastTransition.js +0 -55
- package/lib/es/tooltip/TooltipStyledTransition.d.ts +0 -9
- package/lib/es/tooltip/TooltipStyledTransition.js +0 -38
- package/lib/es/tree/collapse.d.ts +0 -29
- package/lib/es/tree/collapse.js +0 -136
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.22.0-
|
|
3
|
+
"version": "2.22.0-beta.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@douyinfe/semi-animation": "2.12.0",
|
|
21
|
-
"@douyinfe/semi-animation-react": "2.22.0-
|
|
22
|
-
"@douyinfe/semi-foundation": "2.22.0-
|
|
23
|
-
"@douyinfe/semi-icons": "2.22.0-
|
|
21
|
+
"@douyinfe/semi-animation-react": "2.22.0-beta.1",
|
|
22
|
+
"@douyinfe/semi-foundation": "2.22.0-beta.1",
|
|
23
|
+
"@douyinfe/semi-icons": "2.22.0-beta.1",
|
|
24
24
|
"@douyinfe/semi-illustrations": "2.15.0",
|
|
25
|
-
"@douyinfe/semi-theme-default": "2.22.0-
|
|
25
|
+
"@douyinfe/semi-theme-default": "2.22.0-beta.1",
|
|
26
26
|
"async-validator": "^3.5.0",
|
|
27
27
|
"classnames": "^2.2.6",
|
|
28
28
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -69,13 +69,13 @@
|
|
|
69
69
|
],
|
|
70
70
|
"author": "",
|
|
71
71
|
"license": "MIT",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "9a2f03bc364267912d063baf07625a6de40f50e8",
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
75
75
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
76
76
|
"@babel/preset-env": "^7.15.8",
|
|
77
77
|
"@babel/preset-react": "^7.14.5",
|
|
78
|
-
"@douyinfe/semi-scss-compile": "2.22.0-
|
|
78
|
+
"@douyinfe/semi-scss-compile": "2.22.0-beta.1",
|
|
79
79
|
"@storybook/addon-knobs": "^6.3.1",
|
|
80
80
|
"@types/lodash": "^4.14.176",
|
|
81
81
|
"@types/react": ">=16.0.0",
|
|
@@ -97,7 +97,6 @@
|
|
|
97
97
|
"jsdom": "^15.2.1",
|
|
98
98
|
"merge2": "^1.4.1",
|
|
99
99
|
"null-loader": "^3.0.0",
|
|
100
|
-
"prop-types": "15.7.2",
|
|
101
100
|
"react-dnd": "^9.5.1",
|
|
102
101
|
"react-infinite-scroller": "^1.2.4",
|
|
103
102
|
"react-storybook-addon-props-combinations": "^1.1.0",
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
export interface TransitionStyle {
|
|
4
|
-
rotate?: number;
|
|
5
|
-
}
|
|
6
|
-
export interface OpenIconTransitionProps {
|
|
7
|
-
isOpen?: boolean;
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
enterDeg?: number;
|
|
10
|
-
fromDeg?: number;
|
|
11
|
-
duration?: number;
|
|
12
|
-
}
|
|
13
|
-
declare function OpenIconTransition(props?: OpenIconTransitionProps): React.ReactElement;
|
|
14
|
-
declare namespace OpenIconTransition {
|
|
15
|
-
var propTypes: {
|
|
16
|
-
isOpen: PropTypes.Validator<boolean>;
|
|
17
|
-
children: PropTypes.Validator<any>;
|
|
18
|
-
enterDeg: PropTypes.Requireable<number>;
|
|
19
|
-
fromDeg: PropTypes.Requireable<number>;
|
|
20
|
-
duration: PropTypes.Requireable<number>;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export default OpenIconTransition;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
var _semiAnimationReact = require("@douyinfe/semi-animation-react");
|
|
11
|
-
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
|
|
18
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
|
|
20
|
-
const formatStyle = function formatStyle(_ref) {
|
|
21
|
-
let {
|
|
22
|
-
rotate = 0
|
|
23
|
-
} = _ref;
|
|
24
|
-
return {
|
|
25
|
-
transform: "rotate(".concat(rotate, "deg)")
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
function OpenIconTransition() {
|
|
30
|
-
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
31
|
-
const {
|
|
32
|
-
children,
|
|
33
|
-
isOpen,
|
|
34
|
-
enterDeg = 180,
|
|
35
|
-
fromDeg = 0,
|
|
36
|
-
duration = 150
|
|
37
|
-
} = props;
|
|
38
|
-
const [immediate, setImmediate] = (0, _react.useState)(true);
|
|
39
|
-
(0, _react.useEffect)(() => {
|
|
40
|
-
// eslint-disable-next-line @typescript-eslint/no-implied-eval
|
|
41
|
-
setImmediate(false);
|
|
42
|
-
}, [isOpen]);
|
|
43
|
-
return /*#__PURE__*/_react.default.createElement(_semiAnimationReact.Transition, {
|
|
44
|
-
immediate: immediate,
|
|
45
|
-
state: isOpen ? 'enter' : 'leave',
|
|
46
|
-
from: {
|
|
47
|
-
rotate: fromDeg
|
|
48
|
-
},
|
|
49
|
-
enter: {
|
|
50
|
-
rotate: {
|
|
51
|
-
val: enterDeg,
|
|
52
|
-
duration,
|
|
53
|
-
easing: 'cubic-bezier(.62, .05, .36, .95)'
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
leave: {
|
|
57
|
-
rotate: {
|
|
58
|
-
val: fromDeg,
|
|
59
|
-
duration,
|
|
60
|
-
easing: 'cubic-bezier(.62, .05, .36, .95)'
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}, transitionStyle => _react.Children.map(children, child => /*#__PURE__*/(0, _react.isValidElement)(child) ? /*#__PURE__*/(0, _react.cloneElement)(child, Object.assign(Object.assign({}, child.props), {
|
|
64
|
-
style: Object.assign(Object.assign({}, child.props.style), formatStyle(transitionStyle))
|
|
65
|
-
})) : child));
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
OpenIconTransition.propTypes = {
|
|
69
|
-
isOpen: _propTypes.default.bool.isRequired,
|
|
70
|
-
children: _propTypes.default.any.isRequired,
|
|
71
|
-
enterDeg: _propTypes.default.number,
|
|
72
|
-
fromDeg: _propTypes.default.number,
|
|
73
|
-
duration: _propTypes.default.number
|
|
74
|
-
};
|
|
75
|
-
var _default = OpenIconTransition;
|
|
76
|
-
exports.default = _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Motion } from '@douyinfe/semi-foundation/lib/cjs/utils/type';
|
|
4
|
-
export interface SubNavTransitionProps {
|
|
5
|
-
children?: React.ReactNode | ((transitionProps?: any) => React.ReactNode);
|
|
6
|
-
isCollapsed?: boolean;
|
|
7
|
-
maxHeight?: number;
|
|
8
|
-
motion?: Motion;
|
|
9
|
-
}
|
|
10
|
-
declare function SubNavTransition(props?: SubNavTransitionProps): JSX.Element;
|
|
11
|
-
declare namespace SubNavTransition {
|
|
12
|
-
var propTypes: {
|
|
13
|
-
children: PropTypes.Requireable<any>;
|
|
14
|
-
isCollapsed: PropTypes.Requireable<boolean>;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export default SubNavTransition;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _semiAnimationReact = require("@douyinfe/semi-animation-react");
|
|
9
|
-
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
|
|
16
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
|
-
const ease = 'cubicBezier(.25,.1,.25,1)';
|
|
21
|
-
|
|
22
|
-
const formatStyle = function formatStyle(_ref) {
|
|
23
|
-
let {
|
|
24
|
-
maxHeight,
|
|
25
|
-
opacity
|
|
26
|
-
} = _ref;
|
|
27
|
-
return {
|
|
28
|
-
maxHeight,
|
|
29
|
-
opacity
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
function SubNavTransition() {
|
|
34
|
-
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
35
|
-
const {
|
|
36
|
-
children,
|
|
37
|
-
isCollapsed,
|
|
38
|
-
maxHeight = 999
|
|
39
|
-
} = props; // eslint-disable-next-line no-unused-vars
|
|
40
|
-
|
|
41
|
-
const [immediate, setImmediate] = (0, _react.useState)(false); // useEffect(() => {
|
|
42
|
-
// setImmediate(isCollapsed);
|
|
43
|
-
// }, [isCollapsed]);
|
|
44
|
-
|
|
45
|
-
return /*#__PURE__*/_react.default.createElement(_semiAnimationReact.Transition, {
|
|
46
|
-
from: {
|
|
47
|
-
maxHeight: 0,
|
|
48
|
-
opacity: 0
|
|
49
|
-
},
|
|
50
|
-
enter: {
|
|
51
|
-
maxHeight: {
|
|
52
|
-
val: maxHeight,
|
|
53
|
-
easing: 'easeInQuad',
|
|
54
|
-
duration: 250
|
|
55
|
-
},
|
|
56
|
-
opacity: {
|
|
57
|
-
val: 1,
|
|
58
|
-
duration: 200,
|
|
59
|
-
easing: 'cubic-bezier(0.5, -0.1, 1, 0.4)'
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
leave: {
|
|
63
|
-
maxHeight: {
|
|
64
|
-
val: 0,
|
|
65
|
-
easing: ease,
|
|
66
|
-
duration: 250
|
|
67
|
-
},
|
|
68
|
-
opacity: {
|
|
69
|
-
val: 0,
|
|
70
|
-
duration: isCollapsed ? 1 : 200,
|
|
71
|
-
easing: 'cubic-bezier(0.5, -0.1, 1, 0.4)'
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
immediate: immediate
|
|
75
|
-
}, typeof children === 'function' ? transitionStyle => children(formatStyle(transitionStyle)) : children);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
SubNavTransition.propTypes = {
|
|
79
|
-
children: _propTypes.default.any,
|
|
80
|
-
isCollapsed: _propTypes.default.bool
|
|
81
|
-
};
|
|
82
|
-
var _default = SubNavTransition;
|
|
83
|
-
exports.default = _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { NoticePosition } from '@douyinfe/semi-foundation/lib/cjs/notification/notificationFoundation';
|
|
3
|
-
import { Motion } from '../_base/base';
|
|
4
|
-
export declare type ArgsType<T> = T extends (...args: infer A) => any ? A : never;
|
|
5
|
-
export interface NoticeTransitionProps {
|
|
6
|
-
position?: NoticePosition;
|
|
7
|
-
motion?: Motion<NoticeTransitionProps>;
|
|
8
|
-
children?: React.ReactNode | ((TransitionProps?: any) => React.ReactNode);
|
|
9
|
-
}
|
|
10
|
-
export default function NoticeTransition(props?: NoticeTransitionProps): JSX.Element;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = NoticeTransition;
|
|
7
|
-
|
|
8
|
-
var _semiAnimationReact = require("@douyinfe/semi-animation-react");
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
// @ts-ignore Currently there is no types for semi-animation-react
|
|
15
|
-
function NoticeTransition() {
|
|
16
|
-
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
17
|
-
let {
|
|
18
|
-
motion = {}
|
|
19
|
-
} = props;
|
|
20
|
-
const {
|
|
21
|
-
position = 'topRight'
|
|
22
|
-
} = props;
|
|
23
|
-
|
|
24
|
-
const formatStyle = function formatStyle(_ref) {
|
|
25
|
-
let {
|
|
26
|
-
translate,
|
|
27
|
-
opacity
|
|
28
|
-
} = _ref;
|
|
29
|
-
let transform = "translateX(".concat(translate, "%)");
|
|
30
|
-
|
|
31
|
-
if (position && typeof position === 'string') {
|
|
32
|
-
if (/left/i.test(position)) {
|
|
33
|
-
transform = "translateX(".concat(-translate, "%)");
|
|
34
|
-
} else if (/right/i.test(position)) {
|
|
35
|
-
transform = "translateX(".concat(translate, "%)");
|
|
36
|
-
} else if (/top/i.test(position)) {
|
|
37
|
-
transform = "translateY(".concat(-translate, "%)");
|
|
38
|
-
} else {
|
|
39
|
-
transform = "translateY(".concat(translate, "%)");
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return {
|
|
44
|
-
transform,
|
|
45
|
-
opacity
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
if (typeof motion === 'function') {
|
|
50
|
-
motion = motion(props);
|
|
51
|
-
} else if (!motion || typeof motion !== 'object') {
|
|
52
|
-
motion = {};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return /*#__PURE__*/_react.default.createElement(_semiAnimationReact.Transition // onFrame={style => console.log(formatStyle(style))}
|
|
56
|
-
, Object.assign({
|
|
57
|
-
// onFrame={style => console.log(formatStyle(style))}
|
|
58
|
-
from: {
|
|
59
|
-
translate: 100,
|
|
60
|
-
opacity: 0
|
|
61
|
-
},
|
|
62
|
-
enter: {
|
|
63
|
-
translate: {
|
|
64
|
-
val: 0,
|
|
65
|
-
tension: 560,
|
|
66
|
-
friction: 32
|
|
67
|
-
},
|
|
68
|
-
opacity: {
|
|
69
|
-
val: 1,
|
|
70
|
-
duration: 200
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
leave: {
|
|
74
|
-
translate: {
|
|
75
|
-
val: 100,
|
|
76
|
-
easing: 'easeOutCubic',
|
|
77
|
-
duration: 300
|
|
78
|
-
},
|
|
79
|
-
opacity: {
|
|
80
|
-
val: 0,
|
|
81
|
-
duration: 200
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}, motion), typeof props.children === 'function' ? transitionStyle => props.children(formatStyle(transitionStyle)) : props.children);
|
|
85
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Motion } from '../_base/base';
|
|
3
|
-
export interface SideSheetTransitionProps {
|
|
4
|
-
children?: React.ReactNode | ((TransitionProps: any) => React.ReactNode);
|
|
5
|
-
motion?: Motion<SideSheetTransitionProps>;
|
|
6
|
-
controlled?: boolean;
|
|
7
|
-
visible?: boolean;
|
|
8
|
-
placement?: 'left' | 'top' | 'right' | 'bottom';
|
|
9
|
-
}
|
|
10
|
-
export default class SideSheetTransition extends React.PureComponent<SideSheetTransitionProps> {
|
|
11
|
-
render(): JSX.Element;
|
|
12
|
-
}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _semiAnimationReact = require("@douyinfe/semi-animation-react");
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
// @ts-ignore Currently there is no types definition for semi-animation-react;
|
|
15
|
-
// eslint-disable-next-line max-len
|
|
16
|
-
const formatStyles = function formatStyles() {
|
|
17
|
-
let styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
18
|
-
let props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
19
|
-
const {
|
|
20
|
-
placement
|
|
21
|
-
} = props;
|
|
22
|
-
const {
|
|
23
|
-
translate
|
|
24
|
-
} = styles;
|
|
25
|
-
const {
|
|
26
|
-
opacity
|
|
27
|
-
} = styles;
|
|
28
|
-
let transform = '';
|
|
29
|
-
|
|
30
|
-
switch (placement) {
|
|
31
|
-
case 'left':
|
|
32
|
-
transform = "translateX(-".concat(translate, "%)");
|
|
33
|
-
break;
|
|
34
|
-
|
|
35
|
-
case 'top':
|
|
36
|
-
transform = "translateY(-".concat(translate, "%)");
|
|
37
|
-
break;
|
|
38
|
-
|
|
39
|
-
case 'right':
|
|
40
|
-
transform = "translateX(".concat(translate, "%)");
|
|
41
|
-
break;
|
|
42
|
-
|
|
43
|
-
case 'bottom':
|
|
44
|
-
transform = "translateY(".concat(translate, "%)");
|
|
45
|
-
break;
|
|
46
|
-
|
|
47
|
-
default:
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return {
|
|
52
|
-
transform,
|
|
53
|
-
opacity
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
class SideSheetTransition extends _react.default.PureComponent {
|
|
58
|
-
render() {
|
|
59
|
-
let {
|
|
60
|
-
motion = {}
|
|
61
|
-
} = this.props;
|
|
62
|
-
const {
|
|
63
|
-
children,
|
|
64
|
-
controlled = false,
|
|
65
|
-
visible
|
|
66
|
-
} = this.props;
|
|
67
|
-
|
|
68
|
-
if (typeof motion === 'function') {
|
|
69
|
-
motion = motion(this.props);
|
|
70
|
-
} else if (!motion || typeof motion !== 'object') {
|
|
71
|
-
motion = {};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
let extra = {};
|
|
75
|
-
|
|
76
|
-
if (controlled) {
|
|
77
|
-
extra = {
|
|
78
|
-
state: visible ? 'enter' : 'leave'
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return /*#__PURE__*/_react.default.createElement(_semiAnimationReact.Transition, Object.assign({
|
|
83
|
-
config: {
|
|
84
|
-
tension: 170,
|
|
85
|
-
friction: 14,
|
|
86
|
-
easing: 'linear',
|
|
87
|
-
duration: 200
|
|
88
|
-
},
|
|
89
|
-
from: {
|
|
90
|
-
translate: 100,
|
|
91
|
-
opacity: {
|
|
92
|
-
val: 0,
|
|
93
|
-
duration: 180
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
enter: {
|
|
97
|
-
translate: 0,
|
|
98
|
-
opacity: {
|
|
99
|
-
val: 1,
|
|
100
|
-
duration: 180
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
leave: {
|
|
104
|
-
translate: 100,
|
|
105
|
-
opacity: {
|
|
106
|
-
val: 0,
|
|
107
|
-
duration: 180
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}, extra, motion), typeof children === 'function' ? styles => children(formatStyles(styles, this.props)) : children);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
exports.default = SideSheetTransition;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _toInteger2 = _interopRequireDefault(require("lodash/toInteger"));
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _semiAnimationReact = require("@douyinfe/semi-animation-react");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
/* eslint-disable react/destructuring-assignment */
|
|
17
|
-
const TabPaneTransition = function () {
|
|
18
|
-
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
19
|
-
const direction = props.direction ? 1 : -1;
|
|
20
|
-
const {
|
|
21
|
-
mode
|
|
22
|
-
} = props;
|
|
23
|
-
let {
|
|
24
|
-
motion
|
|
25
|
-
} = props;
|
|
26
|
-
const ratio = 60;
|
|
27
|
-
|
|
28
|
-
if (typeof motion === 'function') {
|
|
29
|
-
motion = motion(props);
|
|
30
|
-
} else if (!motion || typeof motion !== 'object') {
|
|
31
|
-
motion = {};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (mode === 'vertical') {
|
|
35
|
-
return /*#__PURE__*/_react.default.createElement(_semiAnimationReact.Transition, Object.assign({}, props, {
|
|
36
|
-
config: {
|
|
37
|
-
tension: 612,
|
|
38
|
-
friction: 32
|
|
39
|
-
},
|
|
40
|
-
from: {
|
|
41
|
-
translateY: direction * ratio,
|
|
42
|
-
opacity: 0
|
|
43
|
-
},
|
|
44
|
-
enter: {
|
|
45
|
-
translateY: 0,
|
|
46
|
-
opacity: {
|
|
47
|
-
val: 1,
|
|
48
|
-
duration: 200
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
leave: {
|
|
52
|
-
translateY: -1 * direction * ratio,
|
|
53
|
-
opacity: {
|
|
54
|
-
val: 0,
|
|
55
|
-
duration: 200
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}, motion), typeof props.children === 'function' ? _ref => {
|
|
59
|
-
let {
|
|
60
|
-
translateY,
|
|
61
|
-
opacity
|
|
62
|
-
} = _ref;
|
|
63
|
-
// delete translateX in 0 in case of zIndex problems.
|
|
64
|
-
const finalState = (0, _toInteger2.default)(translateY) === 0 ? {
|
|
65
|
-
opacity
|
|
66
|
-
} : {
|
|
67
|
-
transform: "translateY(".concat((0, _toInteger2.default)(translateY), "px)"),
|
|
68
|
-
opacity
|
|
69
|
-
};
|
|
70
|
-
return props.children(finalState);
|
|
71
|
-
} : props.children);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return /*#__PURE__*/_react.default.createElement(_semiAnimationReact.Transition, Object.assign({}, props, {
|
|
75
|
-
config: {
|
|
76
|
-
tension: 612,
|
|
77
|
-
friction: 32
|
|
78
|
-
},
|
|
79
|
-
from: {
|
|
80
|
-
translateX: direction * ratio,
|
|
81
|
-
opacity: 0
|
|
82
|
-
},
|
|
83
|
-
enter: {
|
|
84
|
-
translateX: 0,
|
|
85
|
-
opacity: {
|
|
86
|
-
val: 1,
|
|
87
|
-
duration: 200
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
leave: {
|
|
91
|
-
translateX: -1 * direction * ratio,
|
|
92
|
-
opacity: {
|
|
93
|
-
val: 0,
|
|
94
|
-
duration: 200
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}, motion), typeof props.children === 'function' ? _ref2 => {
|
|
98
|
-
let {
|
|
99
|
-
translateX,
|
|
100
|
-
opacity
|
|
101
|
-
} = _ref2;
|
|
102
|
-
// delete translateX in 0 in case of zIndex problems.
|
|
103
|
-
const finalState = (0, _toInteger2.default)(translateX) === 0 ? {
|
|
104
|
-
opacity
|
|
105
|
-
} : {
|
|
106
|
-
transform: "translateX(".concat((0, _toInteger2.default)(translateX), "px)"),
|
|
107
|
-
opacity
|
|
108
|
-
};
|
|
109
|
-
return props.children(finalState);
|
|
110
|
-
} : props.children);
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
var _default = TabPaneTransition;
|
|
114
|
-
exports.default = _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Motion } from '../_base/base';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface ToastTransitionProps {
|
|
4
|
-
motion?: Motion<ToastTransitionProps>;
|
|
5
|
-
children?: React.ReactNode | ((TransitionProps: any) => any);
|
|
6
|
-
}
|
|
7
|
-
export default function ToastTransition(props?: ToastTransitionProps): JSX.Element;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = ToastTransition;
|
|
7
|
-
|
|
8
|
-
var _semiAnimationReact = require("@douyinfe/semi-animation-react");
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
// @ts-ignore Currently there is no types for semi-animation-react
|
|
15
|
-
function ToastTransition() {
|
|
16
|
-
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
17
|
-
let {
|
|
18
|
-
motion = {}
|
|
19
|
-
} = props;
|
|
20
|
-
|
|
21
|
-
if (typeof motion === 'function') {
|
|
22
|
-
motion = motion(props);
|
|
23
|
-
} else if (!motion || typeof motion !== 'object') {
|
|
24
|
-
motion = {};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return /*#__PURE__*/_react.default.createElement(_semiAnimationReact.Transition // onFrame={style => console.log(style)}
|
|
28
|
-
, Object.assign({
|
|
29
|
-
// onFrame={style => console.log(style)}
|
|
30
|
-
from: {
|
|
31
|
-
translateY: -100,
|
|
32
|
-
opacity: 0
|
|
33
|
-
},
|
|
34
|
-
enter: {
|
|
35
|
-
translateY: {
|
|
36
|
-
val: 0,
|
|
37
|
-
tension: 560,
|
|
38
|
-
friction: 32
|
|
39
|
-
},
|
|
40
|
-
opacity: {
|
|
41
|
-
val: 1,
|
|
42
|
-
duration: 300
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
leave: {
|
|
46
|
-
translateY: {
|
|
47
|
-
val: -100,
|
|
48
|
-
easing: 'easeOutCubic',
|
|
49
|
-
duration: 300
|
|
50
|
-
},
|
|
51
|
-
opacity: {
|
|
52
|
-
val: 0,
|
|
53
|
-
duration: 200
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}, motion), typeof props.children === 'function' ? _ref => {
|
|
57
|
-
let {
|
|
58
|
-
translateY,
|
|
59
|
-
opacity
|
|
60
|
-
} = _ref;
|
|
61
|
-
return props.children({
|
|
62
|
-
transform: "translateY(".concat(translateY, "%)"),
|
|
63
|
-
opacity
|
|
64
|
-
});
|
|
65
|
-
} : props.children);
|
|
66
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Motion } from '../_base/base';
|
|
3
|
-
export interface TooltipTransitionProps {
|
|
4
|
-
[key: string]: any;
|
|
5
|
-
children?: (arg: any) => React.ReactNode;
|
|
6
|
-
motion?: Motion<TooltipTransitionProps>;
|
|
7
|
-
}
|
|
8
|
-
declare const TooltipTransition: React.FC<TooltipTransitionProps>;
|
|
9
|
-
export default TooltipTransition;
|