@douyinfe/semi-ui 2.1.0-alpha.1 → 2.1.0-beta.3
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 +204 -48
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +15235 -16088
- 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/es/_utils/index.js +5 -7
- package/lib/es/anchor/index.js +6 -8
- package/lib/es/autoComplete/index.d.ts +36 -12
- package/lib/es/autoComplete/index.js +9 -11
- package/lib/es/avatar/avatarGroup.js +4 -6
- package/lib/es/badge/index.js +3 -4
- package/lib/es/breadcrumb/index.js +4 -7
- package/lib/es/breadcrumb/item.js +3 -5
- package/lib/es/button/index.d.ts +0 -1
- package/lib/es/button/index.js +1 -2
- package/lib/es/calendar/dayCalendar.js +3 -3
- package/lib/es/calendar/monthCalendar.js +3 -3
- package/lib/es/calendar/rangeCalendar.js +3 -3
- package/lib/es/calendar/weekCalendar.js +3 -3
- package/lib/es/card/index.js +3 -5
- package/lib/es/cascader/index.d.ts +1 -0
- package/lib/es/cascader/index.js +34 -27
- package/lib/es/cascader/item.js +2 -2
- package/lib/es/checkbox/checkbox.js +6 -8
- package/lib/es/checkbox/checkboxGroup.js +2 -2
- package/lib/es/checkbox/checkboxInner.js +3 -4
- package/lib/es/collapse/index.js +3 -7
- package/lib/es/datePicker/datePicker.js +20 -26
- package/lib/es/datePicker/footer.js +3 -3
- package/lib/es/datePicker/month.js +7 -11
- package/lib/es/datePicker/monthsGrid.js +3 -4
- package/lib/es/datePicker/navigation.js +6 -6
- package/lib/es/datePicker/yearAndMonth.d.ts +2 -2
- package/lib/es/datePicker/yearAndMonth.js +4 -5
- package/lib/es/descriptions/index.js +2 -2
- package/lib/es/dropdown/dropdownItem.js +4 -4
- package/lib/es/dropdown/index.js +3 -4
- package/lib/es/form/arrayField.js +4 -7
- package/lib/es/form/baseForm.d.ts +5 -11
- package/lib/es/form/baseForm.js +7 -8
- package/lib/es/form/field.d.ts +5 -23
- package/lib/es/form/field.js +2 -18
- package/lib/es/form/group.js +2 -2
- package/lib/es/form/hoc/withField.d.ts +2 -2
- package/lib/es/form/hoc/withField.js +0 -3
- package/lib/es/form/interface.d.ts +2 -2
- package/lib/es/form/slot.js +5 -7
- package/lib/es/iconButton/index.d.ts +0 -1
- package/lib/es/iconButton/index.js +3 -4
- package/lib/es/input/index.js +15 -17
- package/lib/es/input/inputGroup.js +3 -3
- package/lib/es/input/textarea.js +11 -13
- package/lib/es/inputNumber/index.js +12 -13
- package/lib/es/list/index.js +3 -3
- package/lib/es/list/item.js +3 -3
- package/lib/es/locale/localeConsumer.d.ts +5 -5
- package/lib/es/locale/localeConsumer.js +3 -5
- package/lib/es/modal/Modal.js +5 -5
- package/lib/es/modal/ModalContent.js +3 -3
- package/lib/es/modal/confirm.js +2 -2
- package/lib/es/modal/useModal/HookModal.d.ts +3 -2
- package/lib/es/modal/useModal/HookModal.js +2 -3
- package/lib/es/modal/useModal/index.js +1 -1
- package/lib/es/navigation/CollapseButton.js +2 -2
- package/lib/es/navigation/Item.js +6 -7
- package/lib/es/navigation/SubNav.js +3 -4
- package/lib/es/navigation/index.d.ts +1 -1
- package/lib/es/navigation/index.js +10 -12
- package/lib/es/notification/index.d.ts +2 -2
- package/lib/es/notification/index.js +1 -1
- package/lib/es/notification/notice.js +5 -5
- package/lib/es/overflowList/index.js +8 -13
- package/lib/es/overflowList/intersectionObserver.js +3 -4
- package/lib/es/pagination/index.js +4 -4
- package/lib/es/popconfirm/index.d.ts +5 -1
- package/lib/es/popconfirm/index.js +15 -10
- package/lib/es/popover/Arrow.js +4 -7
- package/lib/es/popover/index.d.ts +3 -1
- package/lib/es/popover/index.js +4 -8
- package/lib/es/radio/context.d.ts +1 -1
- package/lib/es/radio/radio.d.ts +2 -2
- package/lib/es/radio/radio.js +3 -3
- package/lib/es/radio/radioGroup.d.ts +4 -4
- package/lib/es/radio/radioGroup.js +2 -2
- package/lib/es/radio/radioInner.js +2 -2
- package/lib/es/rating/index.d.ts +1 -1
- package/lib/es/resizeObserver/index.js +1 -0
- package/lib/es/scrollList/scrollItem.d.ts +12 -11
- package/lib/es/scrollList/scrollItem.js +19 -32
- package/lib/es/select/index.d.ts +0 -1
- package/lib/es/select/index.js +34 -30
- package/lib/es/select/option.js +6 -6
- package/lib/es/select/utils.d.ts +1 -1
- package/lib/es/select/utils.js +12 -8
- package/lib/es/sideSheet/SideSheetContent.d.ts +1 -1
- package/lib/es/sideSheet/SideSheetContent.js +2 -2
- package/lib/es/sideSheet/index.d.ts +3 -3
- package/lib/es/sideSheet/index.js +2 -2
- package/lib/es/slider/index.js +6 -7
- package/lib/es/space/index.js +8 -10
- package/lib/es/steps/basicStep.js +2 -2
- package/lib/es/steps/basicSteps.js +2 -2
- package/lib/es/steps/fillStep.js +2 -2
- package/lib/es/steps/fillSteps.js +3 -3
- package/lib/es/steps/index.js +2 -2
- package/lib/es/steps/navStep.js +2 -2
- package/lib/es/steps/navSteps.js +2 -2
- package/lib/es/switch/index.js +4 -4
- package/lib/es/table/Body/BaseRow.js +15 -25
- package/lib/es/table/Body/ExpandedRow.js +6 -9
- package/lib/es/table/Body/SectionRow.js +3 -4
- package/lib/es/table/Body/index.js +31 -58
- package/lib/es/table/ColGroup.js +3 -4
- package/lib/es/table/ColumnFilter.js +3 -3
- package/lib/es/table/ColumnSelection.js +2 -2
- package/lib/es/table/ColumnSorter.js +2 -2
- package/lib/es/table/CustomExpandIcon.js +7 -8
- package/lib/es/table/HeadTable.js +4 -7
- package/lib/es/table/ResizableTable.js +9 -17
- package/lib/es/table/Table.d.ts +1 -1
- package/lib/es/table/Table.js +44 -69
- package/lib/es/table/TableCell.js +17 -24
- package/lib/es/table/TableHeader.js +4 -5
- package/lib/es/table/TableHeaderRow.js +11 -24
- package/lib/es/table/TablePagination.js +4 -7
- package/lib/es/table/getColumns.js +4 -5
- package/lib/es/table/index.d.ts +1 -1
- package/lib/es/table/interface.d.ts +2 -1
- package/lib/es/table/table-context.js +3 -4
- package/lib/es/table/utils.js +2 -2
- package/lib/es/tabs/TabBar.d.ts +5 -3
- package/lib/es/tabs/TabBar.js +14 -6
- package/lib/es/tabs/TabPane.d.ts +2 -1
- package/lib/es/tabs/TabPane.js +3 -2
- package/lib/es/tabs/TabPaneTransition.js +5 -5
- package/lib/es/tabs/index.d.ts +3 -1
- package/lib/es/tabs/index.js +88 -21
- package/lib/es/tabs/interface.d.ts +6 -1
- package/lib/es/tagInput/index.d.ts +3 -0
- package/lib/es/tagInput/index.js +23 -23
- package/lib/es/timePicker/Combobox.d.ts +10 -4
- package/lib/es/timePicker/Combobox.js +6 -5
- package/lib/es/timePicker/TimeInput.js +8 -8
- package/lib/es/timePicker/TimePicker.d.ts +1 -1
- package/lib/es/timePicker/TimePicker.js +8 -9
- package/lib/es/timePicker/index.js +2 -2
- package/lib/es/toast/index.d.ts +2 -2
- package/lib/es/toast/toast.js +3 -3
- package/lib/es/tooltip/index.d.ts +3 -0
- package/lib/es/tooltip/index.js +19 -32
- package/lib/es/transfer/index.js +11 -16
- package/lib/es/tree/autoSizer.js +4 -4
- package/lib/es/tree/collapse.js +2 -2
- package/lib/es/tree/index.js +9 -12
- package/lib/es/tree/interface.d.ts +2 -2
- package/lib/es/tree/nodeList.js +2 -2
- package/lib/es/tree/treeNode.js +5 -7
- package/lib/es/tree/treeUtil.js +3 -4
- package/lib/es/treeSelect/index.d.ts +2 -11
- package/lib/es/treeSelect/index.js +21 -27
- package/lib/es/typography/base.d.ts +1 -1
- package/lib/es/typography/base.js +8 -17
- package/lib/es/typography/paragraph.d.ts +1 -1
- package/lib/es/typography/text.d.ts +1 -1
- package/lib/es/typography/title.d.ts +1 -1
- package/lib/es/upload/fileCard.d.ts +3 -18
- package/lib/es/upload/index.d.ts +4 -56
- package/lib/es/upload/index.js +14 -14
- package/lib/es/upload/interface.d.ts +56 -0
- package/lib/es/upload/interface.js +1 -0
- package/package.json +11 -12
- package/lib/cjs/_base/base.css +0 -510
- package/lib/cjs/_base/base.d.ts +0 -32
- package/lib/cjs/_base/base.js +0 -7
- package/lib/cjs/_base/base.scss +0 -3
- package/lib/cjs/_base/baseComponent.d.ts +0 -25
- package/lib/cjs/_base/baseComponent.js +0 -84
- package/lib/cjs/_base/reactUtils.d.ts +0 -8
- package/lib/cjs/_base/reactUtils.js +0 -55
- package/lib/cjs/_portal/index.d.ts +0 -36
- package/lib/cjs/_portal/index.js +0 -151
- package/lib/cjs/_utils/index.d.ts +0 -68
- package/lib/cjs/_utils/index.js +0 -193
- package/lib/cjs/anchor/anchor-context.d.ts +0 -7
- package/lib/cjs/anchor/anchor-context.js +0 -18
- package/lib/cjs/anchor/index.d.ts +0 -93
- package/lib/cjs/anchor/index.js +0 -338
- package/lib/cjs/anchor/link.d.ts +0 -37
- package/lib/cjs/anchor/link.js +0 -174
- package/lib/cjs/autoComplete/index.d.ts +0 -143
- package/lib/cjs/autoComplete/index.js +0 -431
- package/lib/cjs/avatar/avatarGroup.d.ts +0 -22
- package/lib/cjs/avatar/avatarGroup.js +0 -171
- package/lib/cjs/avatar/index.d.ts +0 -48
- package/lib/cjs/avatar/index.js +0 -259
- package/lib/cjs/avatar/interface.d.ts +0 -31
- package/lib/cjs/avatar/interface.js +0 -7
- package/lib/cjs/backtop/index.d.ts +0 -38
- package/lib/cjs/backtop/index.js +0 -144
- package/lib/cjs/badge/index.d.ts +0 -38
- package/lib/cjs/badge/index.js +0 -109
- package/lib/cjs/banner/index.d.ts +0 -50
- package/lib/cjs/banner/index.js +0 -209
- package/lib/cjs/breadcrumb/bread-context.d.ts +0 -11
- package/lib/cjs/breadcrumb/bread-context.js +0 -18
- package/lib/cjs/breadcrumb/index.d.ts +0 -81
- package/lib/cjs/breadcrumb/index.js +0 -286
- package/lib/cjs/breadcrumb/item.d.ts +0 -53
- package/lib/cjs/breadcrumb/item.js +0 -250
- package/lib/cjs/button/Button.d.ts +0 -61
- package/lib/cjs/button/Button.js +0 -145
- package/lib/cjs/button/buttonGroup.d.ts +0 -26
- package/lib/cjs/button/buttonGroup.js +0 -91
- package/lib/cjs/button/index.d.ts +0 -38
- package/lib/cjs/button/index.js +0 -45
- package/lib/cjs/button/splitButtonGroup.d.ts +0 -12
- package/lib/cjs/button/splitButtonGroup.js +0 -47
- package/lib/cjs/calendar/dayCalendar.d.ts +0 -50
- package/lib/cjs/calendar/dayCalendar.js +0 -234
- package/lib/cjs/calendar/dayCol.d.ts +0 -41
- package/lib/cjs/calendar/dayCol.js +0 -211
- package/lib/cjs/calendar/index.d.ts +0 -42
- package/lib/cjs/calendar/index.js +0 -119
- package/lib/cjs/calendar/interface.d.ts +0 -37
- package/lib/cjs/calendar/interface.js +0 -7
- package/lib/cjs/calendar/monthCalendar.d.ts +0 -59
- package/lib/cjs/calendar/monthCalendar.js +0 -474
- package/lib/cjs/calendar/rangeCalendar.d.ts +0 -51
- package/lib/cjs/calendar/rangeCalendar.js +0 -329
- package/lib/cjs/calendar/timeCol.d.ts +0 -15
- package/lib/cjs/calendar/timeCol.js +0 -101
- package/lib/cjs/calendar/weekCalendar.d.ts +0 -52
- package/lib/cjs/calendar/weekCalendar.js +0 -331
- package/lib/cjs/card/cardGroup.d.ts +0 -27
- package/lib/cjs/card/cardGroup.js +0 -87
- package/lib/cjs/card/index.d.ts +0 -75
- package/lib/cjs/card/index.js +0 -224
- package/lib/cjs/card/meta.d.ts +0 -26
- package/lib/cjs/card/meta.js +0 -93
- package/lib/cjs/cascader/index.d.ts +0 -178
- package/lib/cjs/cascader/index.js +0 -982
- package/lib/cjs/cascader/item.d.ts +0 -72
- package/lib/cjs/cascader/item.js +0 -351
- package/lib/cjs/checkbox/checkbox.d.ts +0 -61
- package/lib/cjs/checkbox/checkbox.js +0 -209
- package/lib/cjs/checkbox/checkboxGroup.d.ts +0 -49
- package/lib/cjs/checkbox/checkboxGroup.js +0 -183
- package/lib/cjs/checkbox/checkboxInner.d.ts +0 -40
- package/lib/cjs/checkbox/checkboxInner.js +0 -97
- package/lib/cjs/checkbox/context.d.ts +0 -14
- package/lib/cjs/checkbox/context.js +0 -17
- package/lib/cjs/checkbox/index.d.ts +0 -8
- package/lib/cjs/checkbox/index.js +0 -29
- package/lib/cjs/collapse/collapse-context.d.ts +0 -13
- package/lib/cjs/collapse/collapse-context.js +0 -18
- package/lib/cjs/collapse/index.d.ts +0 -43
- package/lib/cjs/collapse/index.js +0 -169
- package/lib/cjs/collapse/item.d.ts +0 -23
- package/lib/cjs/collapse/item.js +0 -151
- package/lib/cjs/collapsible/index.d.ts +0 -36
- package/lib/cjs/collapsible/index.js +0 -177
- package/lib/cjs/configProvider/context.d.ts +0 -11
- package/lib/cjs/configProvider/context.js +0 -18
- package/lib/cjs/configProvider/index.d.ts +0 -19
- package/lib/cjs/configProvider/index.js +0 -83
- package/lib/cjs/datePicker/dateInput.d.ts +0 -81
- package/lib/cjs/datePicker/dateInput.js +0 -408
- package/lib/cjs/datePicker/datePicker.d.ts +0 -180
- package/lib/cjs/datePicker/datePicker.js +0 -731
- package/lib/cjs/datePicker/footer.d.ts +0 -11
- package/lib/cjs/datePicker/footer.js +0 -39
- package/lib/cjs/datePicker/index.d.ts +0 -11
- package/lib/cjs/datePicker/index.js +0 -67
- package/lib/cjs/datePicker/month.d.ts +0 -203
- package/lib/cjs/datePicker/month.js +0 -507
- package/lib/cjs/datePicker/monthsGrid.d.ts +0 -88
- package/lib/cjs/datePicker/monthsGrid.js +0 -702
- package/lib/cjs/datePicker/navigation.d.ts +0 -44
- package/lib/cjs/datePicker/navigation.js +0 -117
- package/lib/cjs/datePicker/quickControl.d.ts +0 -22
- package/lib/cjs/datePicker/quickControl.js +0 -86
- package/lib/cjs/datePicker/yearAndMonth.d.ts +0 -48
- package/lib/cjs/datePicker/yearAndMonth.js +0 -281
- package/lib/cjs/descriptions/descriptions-context.d.ts +0 -7
- package/lib/cjs/descriptions/descriptions-context.js +0 -18
- package/lib/cjs/descriptions/index.d.ts +0 -47
- package/lib/cjs/descriptions/index.js +0 -102
- package/lib/cjs/descriptions/item.d.ts +0 -19
- package/lib/cjs/descriptions/item.js +0 -89
- package/lib/cjs/dropdown/context.d.ts +0 -5
- package/lib/cjs/dropdown/context.js +0 -20
- package/lib/cjs/dropdown/dropdownDivider.d.ts +0 -5
- package/lib/cjs/dropdown/dropdownDivider.js +0 -40
- package/lib/cjs/dropdown/dropdownItem.d.ts +0 -47
- package/lib/cjs/dropdown/dropdownItem.js +0 -134
- package/lib/cjs/dropdown/dropdownMenu.d.ts +0 -12
- package/lib/cjs/dropdown/dropdownMenu.js +0 -66
- package/lib/cjs/dropdown/dropdownTitle.d.ts +0 -16
- package/lib/cjs/dropdown/dropdownTitle.js +0 -62
- package/lib/cjs/dropdown/index.d.ts +0 -103
- package/lib/cjs/dropdown/index.js +0 -286
- package/lib/cjs/empty/index.d.ts +0 -38
- package/lib/cjs/empty/index.js +0 -141
- package/lib/cjs/form/arrayField.d.ts +0 -33
- package/lib/cjs/form/arrayField.js +0 -267
- package/lib/cjs/form/baseForm.d.ts +0 -148
- package/lib/cjs/form/baseForm.js +0 -326
- package/lib/cjs/form/context.d.ts +0 -9
- package/lib/cjs/form/context.js +0 -35
- package/lib/cjs/form/errorMessage.d.ts +0 -25
- package/lib/cjs/form/errorMessage.js +0 -108
- package/lib/cjs/form/field.d.ts +0 -96
- package/lib/cjs/form/field.js +0 -132
- package/lib/cjs/form/group.d.ts +0 -14
- package/lib/cjs/form/group.js +0 -147
- package/lib/cjs/form/hoc/withField.d.ts +0 -12
- package/lib/cjs/form/hoc/withField.js +0 -557
- package/lib/cjs/form/hoc/withFormApi.d.ts +0 -3
- package/lib/cjs/form/hoc/withFormApi.js +0 -25
- package/lib/cjs/form/hoc/withFormState.d.ts +0 -3
- package/lib/cjs/form/hoc/withFormState.js +0 -25
- package/lib/cjs/form/hooks/index.d.ts +0 -8
- package/lib/cjs/form/hooks/index.js +0 -72
- package/lib/cjs/form/hooks/useArrayFieldState.d.ts +0 -4
- package/lib/cjs/form/hooks/useArrayFieldState.js +0 -21
- package/lib/cjs/form/hooks/useFieldApi.d.ts +0 -10
- package/lib/cjs/form/hooks/useFieldApi.js +0 -31
- package/lib/cjs/form/hooks/useFieldState.d.ts +0 -6
- package/lib/cjs/form/hooks/useFieldState.js +0 -40
- package/lib/cjs/form/hooks/useFormApi.d.ts +0 -1
- package/lib/cjs/form/hooks/useFormApi.js +0 -17
- package/lib/cjs/form/hooks/useFormState.d.ts +0 -2
- package/lib/cjs/form/hooks/useFormState.js +0 -21
- package/lib/cjs/form/hooks/useFormUpdater.d.ts +0 -1
- package/lib/cjs/form/hooks/useFormUpdater.js +0 -17
- package/lib/cjs/form/hooks/useStateWithGetter.d.ts +0 -1
- package/lib/cjs/form/hooks/useStateWithGetter.js +0 -27
- package/lib/cjs/form/index.d.ts +0 -22
- package/lib/cjs/form/index.js +0 -117
- package/lib/cjs/form/interface.d.ts +0 -111
- package/lib/cjs/form/interface.js +0 -36
- package/lib/cjs/form/label.d.ts +0 -39
- package/lib/cjs/form/label.js +0 -91
- package/lib/cjs/form/section.d.ts +0 -17
- package/lib/cjs/form/section.js +0 -60
- package/lib/cjs/form/slot.d.ts +0 -14
- package/lib/cjs/form/slot.js +0 -204
- package/lib/cjs/grid/col.d.ts +0 -55
- package/lib/cjs/grid/col.js +0 -146
- package/lib/cjs/grid/index.d.ts +0 -5
- package/lib/cjs/grid/index.js +0 -27
- package/lib/cjs/grid/row.d.ts +0 -58
- package/lib/cjs/grid/row.js +0 -207
- package/lib/cjs/iconButton/index.d.ts +0 -47
- package/lib/cjs/iconButton/index.js +0 -154
- package/lib/cjs/icons/index.d.ts +0 -3
- package/lib/cjs/icons/index.js +0 -16
- package/lib/cjs/index.d.ts +0 -79
- package/lib/cjs/index.js +0 -782
- package/lib/cjs/input/index.d.ts +0 -170
- package/lib/cjs/input/index.js +0 -503
- package/lib/cjs/input/inputGroup.d.ts +0 -38
- package/lib/cjs/input/inputGroup.js +0 -163
- package/lib/cjs/input/textarea.d.ts +0 -44
- package/lib/cjs/input/textarea.js +0 -341
- package/lib/cjs/inputNumber/index.d.ts +0 -109
- package/lib/cjs/inputNumber/index.js +0 -530
- package/lib/cjs/layout/Sider.d.ts +0 -38
- package/lib/cjs/layout/Sider.js +0 -160
- package/lib/cjs/layout/index.d.ts +0 -43
- package/lib/cjs/layout/index.js +0 -174
- package/lib/cjs/layout/layout-context.d.ts +0 -9
- package/lib/cjs/layout/layout-context.js +0 -25
- package/lib/cjs/list/index.d.ts +0 -59
- package/lib/cjs/list/index.js +0 -189
- package/lib/cjs/list/item.d.ts +0 -36
- package/lib/cjs/list/item.js +0 -151
- package/lib/cjs/list/list-context.d.ts +0 -12
- package/lib/cjs/list/list-context.js +0 -18
- package/lib/cjs/locale/context.d.ts +0 -4
- package/lib/cjs/locale/context.js +0 -18
- package/lib/cjs/locale/interface.d.ts +0 -151
- package/lib/cjs/locale/interface.js +0 -7
- package/lib/cjs/locale/localeConsumer.d.ts +0 -21
- package/lib/cjs/locale/localeConsumer.js +0 -80
- package/lib/cjs/locale/localeProvider.d.ts +0 -18
- package/lib/cjs/locale/localeProvider.js +0 -54
- package/lib/cjs/locale/source/ar.d.ts +0 -3
- package/lib/cjs/locale/source/ar.js +0 -165
- package/lib/cjs/locale/source/en_GB.d.ts +0 -3
- package/lib/cjs/locale/source/en_GB.js +0 -165
- package/lib/cjs/locale/source/en_US.d.ts +0 -3
- package/lib/cjs/locale/source/en_US.js +0 -165
- package/lib/cjs/locale/source/id_ID.d.ts +0 -3
- package/lib/cjs/locale/source/id_ID.js +0 -165
- package/lib/cjs/locale/source/ja_JP.d.ts +0 -3
- package/lib/cjs/locale/source/ja_JP.js +0 -166
- package/lib/cjs/locale/source/ko_KR.d.ts +0 -3
- package/lib/cjs/locale/source/ko_KR.js +0 -166
- package/lib/cjs/locale/source/ms_MY.d.ts +0 -3
- package/lib/cjs/locale/source/ms_MY.js +0 -165
- package/lib/cjs/locale/source/pt_BR.d.ts +0 -3
- package/lib/cjs/locale/source/pt_BR.js +0 -173
- package/lib/cjs/locale/source/ru_RU.d.ts +0 -3
- package/lib/cjs/locale/source/ru_RU.js +0 -168
- package/lib/cjs/locale/source/th_TH.d.ts +0 -3
- package/lib/cjs/locale/source/th_TH.js +0 -169
- package/lib/cjs/locale/source/tr_TR.d.ts +0 -3
- package/lib/cjs/locale/source/tr_TR.js +0 -168
- package/lib/cjs/locale/source/vi_VN.d.ts +0 -3
- package/lib/cjs/locale/source/vi_VN.js +0 -168
- package/lib/cjs/locale/source/zh_CN.d.ts +0 -3
- package/lib/cjs/locale/source/zh_CN.js +0 -166
- package/lib/cjs/locale/source/zh_TW.d.ts +0 -3
- package/lib/cjs/locale/source/zh_TW.js +0 -166
- package/lib/cjs/modal/ConfirmModal.d.ts +0 -4
- package/lib/cjs/modal/ConfirmModal.js +0 -137
- package/lib/cjs/modal/Modal.d.ts +0 -133
- package/lib/cjs/modal/Modal.js +0 -437
- package/lib/cjs/modal/ModalContent.d.ts +0 -38
- package/lib/cjs/modal/ModalContent.js +0 -337
- package/lib/cjs/modal/confirm.d.ts +0 -215
- package/lib/cjs/modal/confirm.js +0 -132
- package/lib/cjs/modal/index.d.ts +0 -8
- package/lib/cjs/modal/index.js +0 -18
- package/lib/cjs/modal/useModal/HookModal.d.ts +0 -13
- package/lib/cjs/modal/useModal/HookModal.js +0 -79
- package/lib/cjs/modal/useModal/index.d.ts +0 -24
- package/lib/cjs/modal/useModal/index.js +0 -80
- package/lib/cjs/motions/Rotate.d.ts +0 -23
- package/lib/cjs/motions/Rotate.js +0 -87
- package/lib/cjs/navigation/CollapseButton.d.ts +0 -10
- package/lib/cjs/navigation/CollapseButton.js +0 -58
- package/lib/cjs/navigation/Footer.d.ts +0 -27
- package/lib/cjs/navigation/Footer.js +0 -107
- package/lib/cjs/navigation/Header.d.ts +0 -34
- package/lib/cjs/navigation/Header.js +0 -99
- package/lib/cjs/navigation/Item.d.ts +0 -70
- package/lib/cjs/navigation/Item.js +0 -296
- package/lib/cjs/navigation/OpenIconTransition.d.ts +0 -14
- package/lib/cjs/navigation/OpenIconTransition.js +0 -90
- package/lib/cjs/navigation/SubNav.d.ts +0 -103
- package/lib/cjs/navigation/SubNav.js +0 -440
- package/lib/cjs/navigation/SubNavTransition.d.ts +0 -17
- package/lib/cjs/navigation/SubNavTransition.js +0 -90
- package/lib/cjs/navigation/index.d.ts +0 -145
- package/lib/cjs/navigation/index.js +0 -446
- package/lib/cjs/navigation/nav-context.d.ts +0 -7
- package/lib/cjs/navigation/nav-context.js +0 -22
- package/lib/cjs/notification/NoticeTransition.d.ts +0 -10
- package/lib/cjs/notification/NoticeTransition.js +0 -90
- package/lib/cjs/notification/index.d.ts +0 -52
- package/lib/cjs/notification/index.js +0 -316
- package/lib/cjs/notification/notice.d.ts +0 -51
- package/lib/cjs/notification/notice.js +0 -240
- package/lib/cjs/notification/useNotification/HookNotice.d.ts +0 -7
- package/lib/cjs/notification/useNotification/HookNotice.js +0 -72
- package/lib/cjs/notification/useNotification/index.d.ts +0 -10
- package/lib/cjs/notification/useNotification/index.js +0 -161
- package/lib/cjs/overflowList/index.d.ts +0 -87
- package/lib/cjs/overflowList/index.js +0 -296
- package/lib/cjs/overflowList/intersectionObserver.d.ts +0 -34
- package/lib/cjs/overflowList/intersectionObserver.js +0 -121
- package/lib/cjs/pagination/index.d.ts +0 -99
- package/lib/cjs/pagination/index.js +0 -481
- package/lib/cjs/popconfirm/index.d.ts +0 -86
- package/lib/cjs/popconfirm/index.js +0 -256
- package/lib/cjs/popover/Arrow.d.ts +0 -9
- package/lib/cjs/popover/Arrow.js +0 -86
- package/lib/cjs/popover/index.d.ts +0 -87
- package/lib/cjs/popover/index.js +0 -158
- package/lib/cjs/progress/index.d.ts +0 -68
- package/lib/cjs/progress/index.js +0 -303
- package/lib/cjs/radio/context.d.ts +0 -22
- package/lib/cjs/radio/context.js +0 -18
- package/lib/cjs/radio/index.d.ts +0 -10
- package/lib/cjs/radio/index.js +0 -29
- package/lib/cjs/radio/radio.d.ts +0 -79
- package/lib/cjs/radio/radio.js +0 -225
- package/lib/cjs/radio/radioGroup.d.ts +0 -64
- package/lib/cjs/radio/radioGroup.js +0 -189
- package/lib/cjs/radio/radioInner.d.ts +0 -45
- package/lib/cjs/radio/radioInner.js +0 -140
- package/lib/cjs/rating/index.d.ts +0 -91
- package/lib/cjs/rating/index.js +0 -312
- package/lib/cjs/rating/item.d.ts +0 -38
- package/lib/cjs/rating/item.js +0 -143
- package/lib/cjs/resizeObserver/index.d.ts +0 -35
- package/lib/cjs/resizeObserver/index.js +0 -117
- package/lib/cjs/scrollList/index.d.ts +0 -26
- package/lib/cjs/scrollList/index.js +0 -82
- package/lib/cjs/scrollList/scrollItem.d.ts +0 -104
- package/lib/cjs/scrollList/scrollItem.js +0 -557
- package/lib/cjs/select/index.d.ts +0 -235
- package/lib/cjs/select/index.js +0 -1108
- package/lib/cjs/select/option.d.ts +0 -50
- package/lib/cjs/select/option.js +0 -211
- package/lib/cjs/select/optionGroup.d.ts +0 -20
- package/lib/cjs/select/optionGroup.js +0 -56
- package/lib/cjs/select/utils.d.ts +0 -9
- package/lib/cjs/select/utils.js +0 -116
- package/lib/cjs/select/virtualRow.d.ts +0 -8
- package/lib/cjs/select/virtualRow.js +0 -25
- package/lib/cjs/sideSheet/SideSheetContent.d.ts +0 -35
- package/lib/cjs/sideSheet/SideSheetContent.js +0 -195
- package/lib/cjs/sideSheet/SideSheetTransition.d.ts +0 -12
- package/lib/cjs/sideSheet/SideSheetTransition.js +0 -120
- package/lib/cjs/sideSheet/index.d.ts +0 -59
- package/lib/cjs/sideSheet/index.js +0 -303
- package/lib/cjs/skeleton/index.d.ts +0 -33
- package/lib/cjs/skeleton/index.js +0 -101
- package/lib/cjs/skeleton/item.d.ts +0 -34
- package/lib/cjs/skeleton/item.js +0 -134
- package/lib/cjs/slider/index.d.ts +0 -30
- package/lib/cjs/slider/index.js +0 -649
- package/lib/cjs/space/index.d.ts +0 -33
- package/lib/cjs/space/index.js +0 -120
- package/lib/cjs/space/utils.d.ts +0 -5
- package/lib/cjs/space/utils.js +0 -54
- package/lib/cjs/spin/icon.d.ts +0 -10
- package/lib/cjs/spin/icon.js +0 -103
- package/lib/cjs/spin/index.d.ts +0 -63
- package/lib/cjs/spin/index.js +0 -145
- package/lib/cjs/steps/basicStep.d.ts +0 -46
- package/lib/cjs/steps/basicStep.js +0 -180
- package/lib/cjs/steps/basicSteps.d.ts +0 -41
- package/lib/cjs/steps/basicSteps.js +0 -127
- package/lib/cjs/steps/context.d.ts +0 -6
- package/lib/cjs/steps/context.js +0 -17
- package/lib/cjs/steps/fillStep.d.ts +0 -34
- package/lib/cjs/steps/fillStep.js +0 -142
- package/lib/cjs/steps/fillSteps.d.ts +0 -35
- package/lib/cjs/steps/fillSteps.js +0 -127
- package/lib/cjs/steps/index.d.ts +0 -39
- package/lib/cjs/steps/index.js +0 -104
- package/lib/cjs/steps/navStep.d.ts +0 -30
- package/lib/cjs/steps/navStep.js +0 -99
- package/lib/cjs/steps/navSteps.d.ts +0 -33
- package/lib/cjs/steps/navSteps.js +0 -103
- package/lib/cjs/steps/step.d.ts +0 -13
- package/lib/cjs/steps/step.js +0 -58
- package/lib/cjs/switch/index.d.ts +0 -48
- package/lib/cjs/switch/index.js +0 -159
- package/lib/cjs/table/Body/BaseRow.d.ts +0 -125
- package/lib/cjs/table/Body/BaseRow.js +0 -359
- package/lib/cjs/table/Body/ExpandedRow.d.ts +0 -63
- package/lib/cjs/table/Body/ExpandedRow.js +0 -180
- package/lib/cjs/table/Body/SectionRow.d.ts +0 -67
- package/lib/cjs/table/Body/SectionRow.js +0 -250
- package/lib/cjs/table/Body/index.d.ts +0 -70
- package/lib/cjs/table/Body/index.js +0 -873
- package/lib/cjs/table/ColGroup.d.ts +0 -24
- package/lib/cjs/table/ColGroup.js +0 -78
- package/lib/cjs/table/Column.d.ts +0 -36
- package/lib/cjs/table/Column.js +0 -32
- package/lib/cjs/table/ColumnFilter.d.ts +0 -34
- package/lib/cjs/table/ColumnFilter.js +0 -192
- package/lib/cjs/table/ColumnSelection.d.ts +0 -40
- package/lib/cjs/table/ColumnSelection.js +0 -101
- package/lib/cjs/table/ColumnShape.d.ts +0 -32
- package/lib/cjs/table/ColumnShape.js +0 -47
- package/lib/cjs/table/ColumnSorter.d.ts +0 -25
- package/lib/cjs/table/ColumnSorter.js +0 -77
- package/lib/cjs/table/CustomExpandIcon.d.ts +0 -36
- package/lib/cjs/table/CustomExpandIcon.js +0 -102
- package/lib/cjs/table/HeadTable.d.ts +0 -20
- package/lib/cjs/table/HeadTable.js +0 -129
- package/lib/cjs/table/ResizableHeaderCell.d.ts +0 -13
- package/lib/cjs/table/ResizableHeaderCell.js +0 -75
- package/lib/cjs/table/ResizableTable.d.ts +0 -5
- package/lib/cjs/table/ResizableTable.js +0 -217
- package/lib/cjs/table/Table.d.ts +0 -305
- package/lib/cjs/table/Table.js +0 -1576
- package/lib/cjs/table/TableCell.d.ts +0 -124
- package/lib/cjs/table/TableCell.js +0 -404
- package/lib/cjs/table/TableContextProvider.d.ts +0 -3
- package/lib/cjs/table/TableContextProvider.js +0 -61
- package/lib/cjs/table/TableHeader.d.ts +0 -28
- package/lib/cjs/table/TableHeader.js +0 -192
- package/lib/cjs/table/TableHeaderRow.d.ts +0 -59
- package/lib/cjs/table/TableHeaderRow.js +0 -218
- package/lib/cjs/table/TablePagination.d.ts +0 -23
- package/lib/cjs/table/TablePagination.js +0 -69
- package/lib/cjs/table/getColumns.d.ts +0 -8
- package/lib/cjs/table/getColumns.js +0 -54
- package/lib/cjs/table/index.d.ts +0 -100
- package/lib/cjs/table/index.js +0 -85
- package/lib/cjs/table/interface.d.ts +0 -289
- package/lib/cjs/table/interface.js +0 -7
- package/lib/cjs/table/table-context.d.ts +0 -19
- package/lib/cjs/table/table-context.js +0 -25
- package/lib/cjs/table/utils.d.ts +0 -42
- package/lib/cjs/table/utils.js +0 -144
- package/lib/cjs/tabs/TabBar.d.ts +0 -41
- package/lib/cjs/tabs/TabBar.js +0 -309
- package/lib/cjs/tabs/TabPane.d.ts +0 -27
- package/lib/cjs/tabs/TabPane.js +0 -164
- package/lib/cjs/tabs/TabPaneTransition.d.ts +0 -4
- package/lib/cjs/tabs/TabPaneTransition.js +0 -119
- package/lib/cjs/tabs/index.d.ts +0 -50
- package/lib/cjs/tabs/index.js +0 -369
- package/lib/cjs/tabs/interface.d.ts +0 -72
- package/lib/cjs/tabs/interface.js +0 -7
- package/lib/cjs/tabs/tabs-context.d.ts +0 -4
- package/lib/cjs/tabs/tabs-context.js +0 -18
- package/lib/cjs/tag/group.d.ts +0 -40
- package/lib/cjs/tag/group.js +0 -165
- package/lib/cjs/tag/index.d.ts +0 -33
- package/lib/cjs/tag/index.js +0 -219
- package/lib/cjs/tag/interface.d.ts +0 -30
- package/lib/cjs/tag/interface.js +0 -7
- package/lib/cjs/tagInput/index.d.ts +0 -130
- package/lib/cjs/tagInput/index.js +0 -424
- package/lib/cjs/timePicker/Combobox.d.ts +0 -73
- package/lib/cjs/timePicker/Combobox.js +0 -344
- package/lib/cjs/timePicker/PanelShape.d.ts +0 -6
- package/lib/cjs/timePicker/PanelShape.js +0 -21
- package/lib/cjs/timePicker/TimeInput.d.ts +0 -66
- package/lib/cjs/timePicker/TimeInput.js +0 -226
- package/lib/cjs/timePicker/TimePicker.d.ts +0 -197
- package/lib/cjs/timePicker/TimePicker.js +0 -503
- package/lib/cjs/timePicker/TimeShape.d.ts +0 -10
- package/lib/cjs/timePicker/TimeShape.js +0 -26
- package/lib/cjs/timePicker/index.d.ts +0 -95
- package/lib/cjs/timePicker/index.js +0 -51
- package/lib/cjs/timeline/index.d.ts +0 -31
- package/lib/cjs/timeline/index.js +0 -145
- package/lib/cjs/timeline/item.d.ts +0 -30
- package/lib/cjs/timeline/item.js +0 -94
- package/lib/cjs/toast/ToastTransition.d.ts +0 -7
- package/lib/cjs/toast/ToastTransition.js +0 -71
- package/lib/cjs/toast/index.d.ts +0 -200
- package/lib/cjs/toast/index.js +0 -281
- package/lib/cjs/toast/toast.d.ts +0 -45
- package/lib/cjs/toast/toast.js +0 -185
- package/lib/cjs/toast/useToast/HookToast.d.ts +0 -7
- package/lib/cjs/toast/useToast/HookToast.js +0 -72
- package/lib/cjs/toast/useToast/index.d.ts +0 -9
- package/lib/cjs/toast/useToast/index.js +0 -107
- package/lib/cjs/tooltip/ArrowBoundingShape.d.ts +0 -8
- package/lib/cjs/tooltip/ArrowBoundingShape.js +0 -22
- package/lib/cjs/tooltip/TooltipStyledTransition.d.ts +0 -9
- package/lib/cjs/tooltip/TooltipStyledTransition.js +0 -54
- package/lib/cjs/tooltip/TriangleArrow.d.ts +0 -5
- package/lib/cjs/tooltip/TriangleArrow.js +0 -54
- package/lib/cjs/tooltip/TriangleArrowVertical.d.ts +0 -5
- package/lib/cjs/tooltip/TriangleArrowVertical.js +0 -53
- package/lib/cjs/tooltip/index.d.ts +0 -147
- package/lib/cjs/tooltip/index.js +0 -708
- package/lib/cjs/transfer/index.d.ts +0 -164
- package/lib/cjs/transfer/index.js +0 -668
- package/lib/cjs/tree/autoSizer.d.ts +0 -28
- package/lib/cjs/tree/autoSizer.js +0 -115
- package/lib/cjs/tree/collapse.d.ts +0 -29
- package/lib/cjs/tree/collapse.js +0 -164
- package/lib/cjs/tree/index.d.ts +0 -135
- package/lib/cjs/tree/index.js +0 -799
- package/lib/cjs/tree/interface.d.ts +0 -119
- package/lib/cjs/tree/interface.js +0 -7
- package/lib/cjs/tree/nodeList.d.ts +0 -9
- package/lib/cjs/tree/nodeList.js +0 -141
- package/lib/cjs/tree/treeContext.d.ts +0 -40
- package/lib/cjs/tree/treeContext.js +0 -18
- package/lib/cjs/tree/treeNode.d.ts +0 -54
- package/lib/cjs/tree/treeNode.js +0 -531
- package/lib/cjs/tree/treeUtil.d.ts +0 -1
- package/lib/cjs/tree/treeUtil.js +0 -30
- package/lib/cjs/treeSelect/index.d.ts +0 -232
- package/lib/cjs/treeSelect/index.js +0 -1284
- package/lib/cjs/trigger/index.d.ts +0 -36
- package/lib/cjs/trigger/index.js +0 -71
- package/lib/cjs/typography/base.d.ts +0 -176
- package/lib/cjs/typography/base.js +0 -720
- package/lib/cjs/typography/copyable.d.ts +0 -43
- package/lib/cjs/typography/copyable.js +0 -151
- package/lib/cjs/typography/index.d.ts +0 -17
- package/lib/cjs/typography/index.js +0 -48
- package/lib/cjs/typography/interface.d.ts +0 -25
- package/lib/cjs/typography/interface.js +0 -7
- package/lib/cjs/typography/paragraph.d.ts +0 -56
- package/lib/cjs/typography/paragraph.js +0 -83
- package/lib/cjs/typography/text.d.ts +0 -59
- package/lib/cjs/typography/text.js +0 -73
- package/lib/cjs/typography/title.d.ts +0 -61
- package/lib/cjs/typography/title.js +0 -97
- package/lib/cjs/typography/typography.d.ts +0 -22
- package/lib/cjs/typography/typography.js +0 -82
- package/lib/cjs/typography/util.d.ts +0 -2
- package/lib/cjs/typography/util.js +0 -155
- package/lib/cjs/upload/fileCard.d.ts +0 -62
- package/lib/cjs/upload/fileCard.js +0 -388
- package/lib/cjs/upload/index.d.ts +0 -213
- package/lib/cjs/upload/index.js +0 -552
|
@@ -1,440 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
exports.default = void 0;
|
|
12
|
-
|
|
13
|
-
var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
|
|
14
|
-
|
|
15
|
-
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
16
|
-
|
|
17
|
-
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
18
|
-
|
|
19
|
-
var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
20
|
-
|
|
21
|
-
var _times2 = _interopRequireDefault(require("lodash/times"));
|
|
22
|
-
|
|
23
|
-
var _baseComponent = _interopRequireDefault(require("../_base/baseComponent"));
|
|
24
|
-
|
|
25
|
-
var _react = _interopRequireDefault(require("react"));
|
|
26
|
-
|
|
27
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
28
|
-
|
|
29
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
30
|
-
|
|
31
|
-
require("@douyinfe/semi-foundation/lib/cjs/navigation/navigation.css");
|
|
32
|
-
|
|
33
|
-
var _isNullOrUndefined = _interopRequireDefault(require("@douyinfe/semi-foundation/lib/cjs/utils/isNullOrUndefined"));
|
|
34
|
-
|
|
35
|
-
var _subNavFoundation = _interopRequireDefault(require("@douyinfe/semi-foundation/lib/cjs/navigation/subNavFoundation"));
|
|
36
|
-
|
|
37
|
-
var _constants = require("@douyinfe/semi-foundation/lib/cjs/navigation/constants");
|
|
38
|
-
|
|
39
|
-
var _semiIcons = require("@douyinfe/semi-icons");
|
|
40
|
-
|
|
41
|
-
var _Item = _interopRequireDefault(require("./Item"));
|
|
42
|
-
|
|
43
|
-
var _dropdown = _interopRequireDefault(require("../dropdown"));
|
|
44
|
-
|
|
45
|
-
var _navContext = _interopRequireDefault(require("./nav-context"));
|
|
46
|
-
|
|
47
|
-
var _SubNavTransition = _interopRequireDefault(require("./SubNavTransition"));
|
|
48
|
-
|
|
49
|
-
var _OpenIconTransition = _interopRequireDefault(require("./OpenIconTransition"));
|
|
50
|
-
|
|
51
|
-
/* eslint-disable max-len */
|
|
52
|
-
|
|
53
|
-
/* eslint-disable no-nested-ternary */
|
|
54
|
-
class SubNav extends _baseComponent.default {
|
|
55
|
-
constructor(props) {
|
|
56
|
-
super(props);
|
|
57
|
-
|
|
58
|
-
this.setItemRef = ref => {
|
|
59
|
-
if (ref && ref.current) {
|
|
60
|
-
this.itemRef = ref;
|
|
61
|
-
} else {
|
|
62
|
-
this.itemRef = {
|
|
63
|
-
current: ref
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
this.setTitleRef = ref => {
|
|
69
|
-
if (ref && ref.current) {
|
|
70
|
-
this.titleRef = ref;
|
|
71
|
-
} else {
|
|
72
|
-
this.titleRef = {
|
|
73
|
-
current: ref
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
this.handleClick = e => {
|
|
79
|
-
this.foundation.handleClick(e && e.nativeEvent, this.titleRef && this.titleRef.current);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
this.handleDropdownVisible = visible => this.foundation.handleDropdownVisibleChange(visible);
|
|
83
|
-
|
|
84
|
-
this.state = {
|
|
85
|
-
isHovered: false
|
|
86
|
-
};
|
|
87
|
-
this.adapter.setCache('firstMounted', true);
|
|
88
|
-
this.titleRef = /*#__PURE__*/_react.default.createRef();
|
|
89
|
-
this.itemRef = /*#__PURE__*/_react.default.createRef();
|
|
90
|
-
this.foundation = new _subNavFoundation.default(this.adapter);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
_invokeContextFunc(funcName) {
|
|
94
|
-
if (funcName && this.context && typeof this.context[funcName] === 'function') {
|
|
95
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
96
|
-
args[_key - 1] = arguments[_key];
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return this.context[funcName](...args);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return null;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
get adapter() {
|
|
106
|
-
var _this = this;
|
|
107
|
-
|
|
108
|
-
return (0, _assign.default)((0, _assign.default)({}, super.adapter), {
|
|
109
|
-
updateIsHovered: isHovered => this.setState({
|
|
110
|
-
isHovered
|
|
111
|
-
}),
|
|
112
|
-
getOpenKeys: () => this.context && this.context.openKeys,
|
|
113
|
-
getOpenKeysIsControlled: () => this.context && this.context.openKeysIsControlled,
|
|
114
|
-
getCanUpdateOpenKeys: () => this.context && this.context.canUpdateOpenKeys,
|
|
115
|
-
updateOpen: isOpen => this._invokeContextFunc(isOpen ? 'addOpenKeys' : 'removeOpenKeys', this.props.itemKey),
|
|
116
|
-
notifyGlobalOpenChange: function () {
|
|
117
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
118
|
-
args[_key2] = arguments[_key2];
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
return _this._invokeContextFunc('onOpenChange', ...args);
|
|
122
|
-
},
|
|
123
|
-
notifyGlobalOnSelect: function () {
|
|
124
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
125
|
-
args[_key3] = arguments[_key3];
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
return _this._invokeContextFunc('onSelect', ...args);
|
|
129
|
-
},
|
|
130
|
-
notifyGlobalOnClick: function () {
|
|
131
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
132
|
-
args[_key4] = arguments[_key4];
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
return _this._invokeContextFunc('onClick', ...args);
|
|
136
|
-
},
|
|
137
|
-
getIsSelected: itemKey => {
|
|
138
|
-
var _context;
|
|
139
|
-
|
|
140
|
-
return Boolean(!(0, _isNullOrUndefined.default)(itemKey) && (0, _includes.default)(_context = (0, _get2.default)(this.context, 'selectedKeys', [])).call(_context, itemKey));
|
|
141
|
-
},
|
|
142
|
-
getIsOpen: () => {
|
|
143
|
-
var _context2;
|
|
144
|
-
|
|
145
|
-
return Boolean(this.context && this.context.openKeys && (0, _includes.default)(_context2 = this.context.openKeys).call(_context2, this.props.itemKey));
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
renderIcon(icon, pos, withTransition) {
|
|
151
|
-
var _context3;
|
|
152
|
-
|
|
153
|
-
let isToggleIcon = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
154
|
-
let key = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
155
|
-
const {
|
|
156
|
-
prefixCls
|
|
157
|
-
} = this.context;
|
|
158
|
-
let iconSize = 'large';
|
|
159
|
-
|
|
160
|
-
if (pos === _constants.strings.ICON_POS_RIGHT) {
|
|
161
|
-
iconSize = 'default';
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
const className = (0, _classnames.default)("".concat(prefixCls, "-item-icon"), {
|
|
165
|
-
[(0, _concat.default)(_context3 = "".concat(prefixCls, "-item-icon-toggle-")).call(_context3, this.context.toggleIconPosition)]: isToggleIcon,
|
|
166
|
-
["".concat(prefixCls, "-item-icon-info")]: !isToggleIcon
|
|
167
|
-
});
|
|
168
|
-
const isOpen = this.adapter.getIsOpen();
|
|
169
|
-
const iconElem = /*#__PURE__*/_react.default.isValidElement(icon) ? withTransition ? /*#__PURE__*/_react.default.createElement(_OpenIconTransition.default, {
|
|
170
|
-
isOpen: isOpen
|
|
171
|
-
}, /*#__PURE__*/_react.default.cloneElement(icon, {
|
|
172
|
-
size: iconSize
|
|
173
|
-
})) : /*#__PURE__*/_react.default.cloneElement(icon, {
|
|
174
|
-
size: iconSize
|
|
175
|
-
}) : null;
|
|
176
|
-
return /*#__PURE__*/_react.default.createElement("i", {
|
|
177
|
-
key: key,
|
|
178
|
-
className: className
|
|
179
|
-
}, iconElem);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
renderTitleDiv() {
|
|
183
|
-
const {
|
|
184
|
-
text,
|
|
185
|
-
icon,
|
|
186
|
-
itemKey,
|
|
187
|
-
indent,
|
|
188
|
-
disabled,
|
|
189
|
-
level
|
|
190
|
-
} = this.props;
|
|
191
|
-
const {
|
|
192
|
-
mode,
|
|
193
|
-
isInSubNav,
|
|
194
|
-
isCollapsed,
|
|
195
|
-
prefixCls,
|
|
196
|
-
subNavMotion,
|
|
197
|
-
limitIndent
|
|
198
|
-
} = this.context;
|
|
199
|
-
const titleCls = (0, _classnames.default)("".concat(prefixCls, "-sub-title"), {
|
|
200
|
-
["".concat(prefixCls, "-sub-title-selected")]: this.adapter.getIsSelected(itemKey),
|
|
201
|
-
["".concat(prefixCls, "-sub-title-disabled")]: disabled
|
|
202
|
-
});
|
|
203
|
-
let withTransition = false;
|
|
204
|
-
let toggleIconType = '';
|
|
205
|
-
|
|
206
|
-
if (isCollapsed) {
|
|
207
|
-
if (isInSubNav) {
|
|
208
|
-
toggleIconType = /*#__PURE__*/_react.default.createElement(_semiIcons.IconChevronRight, null);
|
|
209
|
-
} else {
|
|
210
|
-
toggleIconType = null;
|
|
211
|
-
}
|
|
212
|
-
} else if (mode === _constants.strings.MODE_HORIZONTAL) {
|
|
213
|
-
if (isInSubNav) {
|
|
214
|
-
toggleIconType = /*#__PURE__*/_react.default.createElement(_semiIcons.IconChevronRight, null);
|
|
215
|
-
} else {
|
|
216
|
-
toggleIconType = /*#__PURE__*/_react.default.createElement(_semiIcons.IconChevronDown, null); // Horizontal mode does not require animation fix#1198
|
|
217
|
-
// withTransition = true;
|
|
218
|
-
}
|
|
219
|
-
} else {
|
|
220
|
-
if (subNavMotion) {
|
|
221
|
-
withTransition = true;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
toggleIconType = /*#__PURE__*/_react.default.createElement(_semiIcons.IconChevronDown, null);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
let placeholderIcons = null;
|
|
228
|
-
|
|
229
|
-
if (mode === _constants.strings.MODE_VERTICAL && !limitIndent) {
|
|
230
|
-
/* Different icons' amount means different indents.*/
|
|
231
|
-
const iconAmount = icon && !indent ? level : level - 1;
|
|
232
|
-
placeholderIcons = (0, _times2.default)(iconAmount, index => this.renderIcon(null, _constants.strings.ICON_POS_RIGHT, false, undefined, index));
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
const titleDiv = /*#__PURE__*/_react.default.createElement("div", {
|
|
236
|
-
ref: this.setTitleRef,
|
|
237
|
-
className: titleCls,
|
|
238
|
-
onClick: this.handleClick
|
|
239
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
240
|
-
className: "".concat(prefixCls, "-item-inner")
|
|
241
|
-
}, placeholderIcons, this.context.toggleIconPosition === _constants.strings.TOGGLE_ICON_LEFT && this.renderIcon(toggleIconType, _constants.strings.ICON_POS_RIGHT, withTransition, true, 'key-toggle-position-left'), icon || indent || isInSubNav && mode !== _constants.strings.MODE_HORIZONTAL ? this.renderIcon(icon, _constants.strings.ICON_POS_LEFT, undefined, undefined, 'key-inSubNav-position-left') : null, /*#__PURE__*/_react.default.createElement("span", {
|
|
242
|
-
className: "".concat(prefixCls, "-item-text")
|
|
243
|
-
}, text), this.context.toggleIconPosition === _constants.strings.TOGGLE_ICON_RIGHT && this.renderIcon(toggleIconType, _constants.strings.ICON_POS_RIGHT, withTransition, true, 'key-toggle-position-right')));
|
|
244
|
-
|
|
245
|
-
return titleDiv;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
renderSubUl() {
|
|
249
|
-
const {
|
|
250
|
-
children,
|
|
251
|
-
maxHeight
|
|
252
|
-
} = this.props;
|
|
253
|
-
const {
|
|
254
|
-
isCollapsed,
|
|
255
|
-
mode,
|
|
256
|
-
subNavMotion,
|
|
257
|
-
prefixCls
|
|
258
|
-
} = this.context;
|
|
259
|
-
const isOpen = this.adapter.getIsOpen();
|
|
260
|
-
const isHorizontal = mode === _constants.strings.MODE_HORIZONTAL;
|
|
261
|
-
const subNavCls = (0, _classnames.default)("".concat(prefixCls, "-sub"), {
|
|
262
|
-
["".concat(prefixCls, "-sub-open")]: isOpen,
|
|
263
|
-
["".concat(prefixCls, "-sub-popover")]: isCollapsed || isHorizontal
|
|
264
|
-
});
|
|
265
|
-
|
|
266
|
-
const ulWithMotion = /*#__PURE__*/_react.default.createElement(_SubNavTransition.default, {
|
|
267
|
-
motion: subNavMotion,
|
|
268
|
-
isCollapsed: isCollapsed,
|
|
269
|
-
maxHeight: maxHeight
|
|
270
|
-
}, !isCollapsed && isOpen ? transitionStyle => /*#__PURE__*/_react.default.createElement("ul", {
|
|
271
|
-
style: (0, _assign.default)((0, _assign.default)({}, transitionStyle), {
|
|
272
|
-
visibility: isCollapsed ? 'hidden' : 'visible'
|
|
273
|
-
}),
|
|
274
|
-
className: subNavCls
|
|
275
|
-
}, children) : null);
|
|
276
|
-
|
|
277
|
-
const finalDom = isHorizontal ? null : subNavMotion ? ulWithMotion : isOpen && !isCollapsed ? /*#__PURE__*/_react.default.createElement("ul", {
|
|
278
|
-
className: subNavCls
|
|
279
|
-
}, children) : null;
|
|
280
|
-
return finalDom;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
wrapDropdown() {
|
|
284
|
-
let elem = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
285
|
-
let _elem = elem;
|
|
286
|
-
const {
|
|
287
|
-
children,
|
|
288
|
-
dropdownStyle,
|
|
289
|
-
disabled
|
|
290
|
-
} = this.props;
|
|
291
|
-
const {
|
|
292
|
-
mode,
|
|
293
|
-
isInSubNav,
|
|
294
|
-
isCollapsed,
|
|
295
|
-
subNavCloseDelay,
|
|
296
|
-
subNavOpenDelay,
|
|
297
|
-
prefixCls
|
|
298
|
-
} = this.context;
|
|
299
|
-
const isOpen = this.adapter.getIsOpen();
|
|
300
|
-
const openKeysIsControlled = this.adapter.getOpenKeysIsControlled();
|
|
301
|
-
const subNavCls = (0, _classnames.default)({
|
|
302
|
-
["".concat(prefixCls, "-popover")]: isCollapsed
|
|
303
|
-
});
|
|
304
|
-
const dropdownProps = {
|
|
305
|
-
trigger: 'hover',
|
|
306
|
-
style: dropdownStyle
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
if (openKeysIsControlled) {
|
|
310
|
-
dropdownProps.trigger = 'custom';
|
|
311
|
-
dropdownProps.visible = isOpen;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
if (isCollapsed || mode === _constants.strings.MODE_HORIZONTAL) {
|
|
315
|
-
// Do not show dropdown when disabled
|
|
316
|
-
_elem = !disabled ? /*#__PURE__*/_react.default.createElement(_dropdown.default, (0, _assign.default)({
|
|
317
|
-
className: subNavCls,
|
|
318
|
-
render: /*#__PURE__*/_react.default.createElement(_dropdown.default.Menu, null, /*#__PURE__*/_react.default.createElement("li", {
|
|
319
|
-
className: "".concat(prefixCls, "-popover-crumb")
|
|
320
|
-
}), children),
|
|
321
|
-
position: mode === _constants.strings.MODE_HORIZONTAL && !isInSubNav ? 'bottomLeft' : 'rightTop',
|
|
322
|
-
mouseEnterDelay: subNavOpenDelay,
|
|
323
|
-
mouseLeaveDelay: subNavCloseDelay,
|
|
324
|
-
onVisibleChange: this.handleDropdownVisible
|
|
325
|
-
}, dropdownProps), _elem) : _elem;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
return _elem;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
render() {
|
|
332
|
-
const {
|
|
333
|
-
itemKey,
|
|
334
|
-
style,
|
|
335
|
-
onMouseEnter,
|
|
336
|
-
onMouseLeave,
|
|
337
|
-
disabled,
|
|
338
|
-
text
|
|
339
|
-
} = this.props;
|
|
340
|
-
const {
|
|
341
|
-
mode,
|
|
342
|
-
isCollapsed,
|
|
343
|
-
prefixCls
|
|
344
|
-
} = this.context;
|
|
345
|
-
let titleDiv = this.renderTitleDiv();
|
|
346
|
-
const subUl = this.renderSubUl(); // When mode=horizontal, it is displayed in Dropdown
|
|
347
|
-
|
|
348
|
-
if (isCollapsed || mode === _constants.strings.MODE_HORIZONTAL) {
|
|
349
|
-
titleDiv = this.wrapDropdown(titleDiv);
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
return /*#__PURE__*/_react.default.createElement(_Item.default, {
|
|
353
|
-
style: style,
|
|
354
|
-
isSubNav: true,
|
|
355
|
-
itemKey: itemKey,
|
|
356
|
-
forwardRef: this.setItemRef,
|
|
357
|
-
isCollapsed: isCollapsed,
|
|
358
|
-
className: "".concat(prefixCls, "-sub-wrap"),
|
|
359
|
-
onMouseEnter: onMouseEnter,
|
|
360
|
-
onMouseLeave: onMouseLeave,
|
|
361
|
-
disabled: disabled,
|
|
362
|
-
text: text
|
|
363
|
-
}, /*#__PURE__*/_react.default.createElement(_navContext.default.Provider, {
|
|
364
|
-
value: (0, _assign.default)((0, _assign.default)({}, this.context), {
|
|
365
|
-
isInSubNav: true
|
|
366
|
-
})
|
|
367
|
-
}, titleDiv, subUl));
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
exports.default = SubNav;
|
|
373
|
-
SubNav.contextType = _navContext.default;
|
|
374
|
-
SubNav.propTypes = {
|
|
375
|
-
/**
|
|
376
|
-
* Unique identification
|
|
377
|
-
*/
|
|
378
|
-
itemKey: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* Copywriting
|
|
382
|
-
*/
|
|
383
|
-
text: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* Whether child navigation is expanded
|
|
387
|
-
*/
|
|
388
|
-
isOpen: _propTypes.default.bool,
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Whether it is in the state of being stowed to the sidebar
|
|
392
|
-
*/
|
|
393
|
-
isCollapsed: _propTypes.default.bool,
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Whether to keep the left Icon placeholder
|
|
397
|
-
*/
|
|
398
|
-
indent: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.number]),
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* Nested child elements
|
|
402
|
-
*/
|
|
403
|
-
children: _propTypes.default.node,
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* The icon name of the right control switch (on and off status)
|
|
407
|
-
*/
|
|
408
|
-
toggleIcon: _propTypes.default.oneOfType([_propTypes.default.any, _propTypes.default.shape({
|
|
409
|
-
open: _propTypes.default.string,
|
|
410
|
-
closed: _propTypes.default.string
|
|
411
|
-
})]),
|
|
412
|
-
style: _propTypes.default.object,
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* Icon name on the left
|
|
416
|
-
*/
|
|
417
|
-
icon: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* Maximum height (for animation)
|
|
421
|
-
*/
|
|
422
|
-
maxHeight: _propTypes.default.number,
|
|
423
|
-
onMouseEnter: _propTypes.default.func,
|
|
424
|
-
onMouseLeave: _propTypes.default.func,
|
|
425
|
-
// Is it disabled
|
|
426
|
-
disabled: _propTypes.default.bool,
|
|
427
|
-
level: _propTypes.default.number
|
|
428
|
-
};
|
|
429
|
-
SubNav.defaultProps = {
|
|
430
|
-
level: 0,
|
|
431
|
-
indent: false,
|
|
432
|
-
isCollapsed: false,
|
|
433
|
-
isOpen: false,
|
|
434
|
-
maxHeight: _constants.numbers.DEFAULT_SUBNAV_MAX_HEIGHT,
|
|
435
|
-
toggleIcon: {
|
|
436
|
-
open: /*#__PURE__*/_react.default.createElement(_semiIcons.IconChevronUp, null),
|
|
437
|
-
closed: /*#__PURE__*/_react.default.createElement(_semiIcons.IconChevronDown, null)
|
|
438
|
-
},
|
|
439
|
-
disabled: false
|
|
440
|
-
};
|
|
@@ -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;
|
|
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,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
4
|
-
|
|
5
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
6
|
-
|
|
7
|
-
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
8
|
-
|
|
9
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
10
|
-
|
|
11
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
12
|
-
value: true
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
exports.default = void 0;
|
|
16
|
-
|
|
17
|
-
var _semiAnimationReact = require("@douyinfe/semi-animation-react");
|
|
18
|
-
|
|
19
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
20
|
-
|
|
21
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
22
|
-
|
|
23
|
-
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); }
|
|
24
|
-
|
|
25
|
-
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; }
|
|
26
|
-
|
|
27
|
-
const ease = 'cubicBezier(.25,.1,.25,1)';
|
|
28
|
-
|
|
29
|
-
const formatStyle = function formatStyle(_ref) {
|
|
30
|
-
let {
|
|
31
|
-
maxHeight,
|
|
32
|
-
opacity
|
|
33
|
-
} = _ref;
|
|
34
|
-
return {
|
|
35
|
-
maxHeight,
|
|
36
|
-
opacity
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
function SubNavTransition() {
|
|
41
|
-
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
42
|
-
const {
|
|
43
|
-
children,
|
|
44
|
-
isCollapsed,
|
|
45
|
-
maxHeight = 999
|
|
46
|
-
} = props; // eslint-disable-next-line no-unused-vars
|
|
47
|
-
|
|
48
|
-
const [immediate, setImmediate] = (0, _react.useState)(false); // useEffect(() => {
|
|
49
|
-
// setImmediate(isCollapsed);
|
|
50
|
-
// }, [isCollapsed]);
|
|
51
|
-
|
|
52
|
-
return /*#__PURE__*/_react.default.createElement(_semiAnimationReact.Transition, {
|
|
53
|
-
from: {
|
|
54
|
-
maxHeight: 0,
|
|
55
|
-
opacity: 0
|
|
56
|
-
},
|
|
57
|
-
enter: {
|
|
58
|
-
maxHeight: {
|
|
59
|
-
val: maxHeight,
|
|
60
|
-
easing: 'easeInQuad',
|
|
61
|
-
duration: 250
|
|
62
|
-
},
|
|
63
|
-
opacity: {
|
|
64
|
-
val: 1,
|
|
65
|
-
duration: 200,
|
|
66
|
-
easing: 'cubic-bezier(0.5, -0.1, 1, 0.4)'
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
leave: {
|
|
70
|
-
maxHeight: {
|
|
71
|
-
val: 0,
|
|
72
|
-
easing: ease,
|
|
73
|
-
duration: 250
|
|
74
|
-
},
|
|
75
|
-
opacity: {
|
|
76
|
-
val: 0,
|
|
77
|
-
duration: isCollapsed ? 1 : 200,
|
|
78
|
-
easing: 'cubic-bezier(0.5, -0.1, 1, 0.4)'
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
immediate: immediate
|
|
82
|
-
}, typeof children === 'function' ? transitionStyle => children(formatStyle(transitionStyle)) : children);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
SubNavTransition.propTypes = {
|
|
86
|
-
children: _propTypes.default.any,
|
|
87
|
-
isCollapsed: _propTypes.default.bool
|
|
88
|
-
};
|
|
89
|
-
var _default = SubNavTransition;
|
|
90
|
-
exports.default = _default;
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import BaseComponent, { BaseProps } from '../_base/baseComponent';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { NavigationAdapter } from '@douyinfe/semi-foundation/lib/cjs/navigation/foundation';
|
|
5
|
-
import SubNav, { SubNavProps } from './SubNav';
|
|
6
|
-
import Item, { NavItemProps } from './Item';
|
|
7
|
-
import Footer, { NavFooterProps } from './Footer';
|
|
8
|
-
import Header, { NavHeaderProps } from './Header';
|
|
9
|
-
import '@douyinfe/semi-foundation/lib/cjs/navigation/navigation.css';
|
|
10
|
-
import { Motion } from '_base/base';
|
|
11
|
-
export { CollapseButtonProps } from './CollapseButton';
|
|
12
|
-
export { NavFooterProps } from './Footer';
|
|
13
|
-
export { NavHeaderProps } from './Header';
|
|
14
|
-
export { NavItemProps } from './Item';
|
|
15
|
-
export { OpenIconTransitionProps } from './OpenIconTransition';
|
|
16
|
-
export { ToggleIcon, SubNavProps } from './SubNav';
|
|
17
|
-
export { SubNavTransitionProps } from './SubNavTransition';
|
|
18
|
-
export declare type Mode = 'vertical' | 'horizontal';
|
|
19
|
-
export interface OnSelectedData {
|
|
20
|
-
itemKey: React.ReactText;
|
|
21
|
-
selectedKeys: React.ReactText[];
|
|
22
|
-
selectedItems: (NavItemProps | SubNavProps)[];
|
|
23
|
-
domEvent: React.MouseEvent;
|
|
24
|
-
isOpen: boolean;
|
|
25
|
-
}
|
|
26
|
-
export interface SubNavPropsWithItems extends SubNavProps {
|
|
27
|
-
items?: (SubNavPropsWithItems | string)[];
|
|
28
|
-
}
|
|
29
|
-
export interface NavItemPropsWithItems extends NavItemProps {
|
|
30
|
-
items?: (NavItemPropsWithItems | string)[];
|
|
31
|
-
}
|
|
32
|
-
export declare type NavItems = (string | SubNavPropsWithItems | NavItemPropsWithItems)[];
|
|
33
|
-
export interface NavProps extends BaseProps {
|
|
34
|
-
bodyStyle?: React.CSSProperties;
|
|
35
|
-
children?: React.ReactNode;
|
|
36
|
-
defaultIsCollapsed?: boolean;
|
|
37
|
-
defaultOpenKeys?: React.ReactText[];
|
|
38
|
-
defaultSelectedKeys?: React.ReactText[];
|
|
39
|
-
footer?: React.ReactNode | NavHeaderProps;
|
|
40
|
-
header?: React.ReactNode | NavFooterProps;
|
|
41
|
-
isCollapsed?: boolean;
|
|
42
|
-
items?: NavItems;
|
|
43
|
-
limitIndent?: boolean;
|
|
44
|
-
mode?: Mode;
|
|
45
|
-
multiple?: boolean;
|
|
46
|
-
openKeys?: React.ReactText[];
|
|
47
|
-
prefixCls?: string;
|
|
48
|
-
selectedKeys?: React.ReactText[];
|
|
49
|
-
subNavCloseDelay?: number;
|
|
50
|
-
subNavMotion?: Motion;
|
|
51
|
-
subNavOpenDelay?: number;
|
|
52
|
-
toggleIconPosition?: string;
|
|
53
|
-
tooltipHideDelay?: number;
|
|
54
|
-
tooltipShowDelay?: number;
|
|
55
|
-
onClick?: (data: {
|
|
56
|
-
itemKey: React.ReactText;
|
|
57
|
-
domEvent: MouseEvent;
|
|
58
|
-
isOpen: boolean;
|
|
59
|
-
}) => void;
|
|
60
|
-
onCollapseChange?: (isCollapse: boolean) => void;
|
|
61
|
-
onDeselect?: (data?: any) => void;
|
|
62
|
-
onOpenChange?: (data: {
|
|
63
|
-
itemKey: (string | number);
|
|
64
|
-
openKeys: (string | number)[];
|
|
65
|
-
domEvent: MouseEvent;
|
|
66
|
-
isOpen: boolean;
|
|
67
|
-
}) => void;
|
|
68
|
-
onSelect?: (data: OnSelectedData) => void;
|
|
69
|
-
}
|
|
70
|
-
export interface NavState {
|
|
71
|
-
isCollapsed: boolean;
|
|
72
|
-
openKeys: (string | number)[];
|
|
73
|
-
items: any[];
|
|
74
|
-
itemKeysMap: {
|
|
75
|
-
[itemKey: string]: (string | number)[];
|
|
76
|
-
};
|
|
77
|
-
selectedKeys: (string | number)[];
|
|
78
|
-
}
|
|
79
|
-
declare class Nav extends BaseComponent<NavProps, NavState> {
|
|
80
|
-
static Sub: typeof SubNav;
|
|
81
|
-
static Item: typeof Item;
|
|
82
|
-
static Header: typeof Header;
|
|
83
|
-
static Footer: typeof Footer;
|
|
84
|
-
static propTypes: {
|
|
85
|
-
defaultOpenKeys: PropTypes.Requireable<(string | number)[]>;
|
|
86
|
-
openKeys: PropTypes.Requireable<(string | number)[]>;
|
|
87
|
-
defaultSelectedKeys: PropTypes.Requireable<(string | number)[]>;
|
|
88
|
-
selectedKeys: PropTypes.Requireable<(string | number)[]>;
|
|
89
|
-
mode: PropTypes.Requireable<string>;
|
|
90
|
-
onSelect: PropTypes.Requireable<(...args: any[]) => any>;
|
|
91
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
92
|
-
onOpenChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
93
|
-
items: PropTypes.Requireable<any[]>;
|
|
94
|
-
isCollapsed: PropTypes.Requireable<boolean>;
|
|
95
|
-
defaultIsCollapsed: PropTypes.Requireable<boolean>;
|
|
96
|
-
onCollapseChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
97
|
-
multiple: PropTypes.Requireable<boolean>;
|
|
98
|
-
onDeselect: PropTypes.Requireable<(...args: any[]) => any>;
|
|
99
|
-
subNavMotion: PropTypes.Requireable<boolean | object>;
|
|
100
|
-
subNavCloseDelay: PropTypes.Requireable<number>;
|
|
101
|
-
subNavOpenDelay: PropTypes.Requireable<number>;
|
|
102
|
-
tooltipShowDelay: PropTypes.Requireable<number>;
|
|
103
|
-
tooltipHideDelay: PropTypes.Requireable<number>;
|
|
104
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
105
|
-
style: PropTypes.Requireable<object>;
|
|
106
|
-
bodyStyle: PropTypes.Requireable<object>;
|
|
107
|
-
className: PropTypes.Requireable<string>;
|
|
108
|
-
toggleIconPosition: PropTypes.Requireable<string>;
|
|
109
|
-
prefixCls: PropTypes.Requireable<string>;
|
|
110
|
-
header: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
111
|
-
footer: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
112
|
-
limitIndent: PropTypes.Requireable<boolean>;
|
|
113
|
-
};
|
|
114
|
-
static defaultProps: {
|
|
115
|
-
subNavCloseDelay: number;
|
|
116
|
-
subNavOpenDelay: number;
|
|
117
|
-
tooltipHideDelay: number;
|
|
118
|
-
tooltipShowDelay: number;
|
|
119
|
-
onCollapseChange: (...args: any[]) => void;
|
|
120
|
-
onSelect: (...args: any[]) => void;
|
|
121
|
-
onClick: (...args: any[]) => void;
|
|
122
|
-
onOpenChange: (...args: any[]) => void;
|
|
123
|
-
toggleIconPosition: string;
|
|
124
|
-
limitIndent: boolean;
|
|
125
|
-
prefixCls: string;
|
|
126
|
-
subNavMotion: boolean;
|
|
127
|
-
mode: string;
|
|
128
|
-
};
|
|
129
|
-
itemsChanged: boolean;
|
|
130
|
-
constructor(props: NavProps);
|
|
131
|
-
static getDerivedStateFromProps(props: NavProps, state: NavState): Partial<NavState>;
|
|
132
|
-
componentDidMount(): void;
|
|
133
|
-
componentDidUpdate(prevProps: NavProps, prevState: NavState): void;
|
|
134
|
-
get adapter(): NavigationAdapter<NavProps, NavState>;
|
|
135
|
-
/**
|
|
136
|
-
* Render navigation items recursively
|
|
137
|
-
*
|
|
138
|
-
* @param {NavItem[]} items
|
|
139
|
-
* @returns {JSX.Element}
|
|
140
|
-
*/
|
|
141
|
-
renderItems(items?: (SubNavPropsWithItems | NavItemPropsWithItems)[], level?: number): JSX.Element;
|
|
142
|
-
onCollapseChange: () => void;
|
|
143
|
-
render(): JSX.Element;
|
|
144
|
-
}
|
|
145
|
-
export default Nav;
|