@douyinfe/semi-foundation 2.36.0-alpha.0 → 2.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/calendar/calendar.scss +1 -1
- package/calendar/foundation.ts +2 -1
- package/datePicker/_utils/getYears.ts +8 -4
- package/datePicker/foundation.ts +1 -1
- package/datePicker/monthsGridFoundation.ts +2 -1
- package/datePicker/yearAndMonthFoundation.ts +3 -1
- package/lib/cjs/anchor/constants.js +0 -2
- package/lib/cjs/anchor/foundation.js +10 -73
- package/lib/cjs/anchor/linkFoundation.js +4 -16
- package/lib/cjs/autoComplete/constants.js +0 -3
- package/lib/cjs/autoComplete/foundation.d.ts +1 -1
- package/lib/cjs/autoComplete/foundation.js +25 -139
- package/lib/cjs/autoComplete/optionFoundation.js +4 -14
- package/lib/cjs/avatar/constants.js +0 -2
- package/lib/cjs/avatar/foundation.js +0 -17
- package/lib/cjs/backtop/constants.js +0 -2
- package/lib/cjs/backtop/foundation.d.ts +2 -2
- package/lib/cjs/backtop/foundation.js +0 -21
- package/lib/cjs/badge/constants.js +0 -2
- package/lib/cjs/banner/constants.js +0 -2
- package/lib/cjs/banner/foundation.js +0 -7
- package/lib/cjs/base/constants.js +2 -4
- package/lib/cjs/base/foundation.d.ts +1 -1
- package/lib/cjs/base/foundation.js +12 -46
- package/lib/cjs/base/index.js +0 -3
- package/lib/cjs/breadcrumb/constants.js +0 -2
- package/lib/cjs/breadcrumb/foundation.js +1 -12
- package/lib/cjs/breadcrumb/itemFoundation.js +0 -7
- package/lib/cjs/button/constants.js +0 -2
- package/lib/cjs/calendar/calendar.css +2 -2
- package/lib/cjs/calendar/calendar.scss +1 -1
- package/lib/cjs/calendar/constants.js +0 -2
- package/lib/cjs/calendar/eventUtil.d.ts +1 -1
- package/lib/cjs/calendar/eventUtil.js +2 -74
- package/lib/cjs/calendar/foundation.d.ts +2 -2
- package/lib/cjs/calendar/foundation.js +28 -123
- package/lib/cjs/card/constants.js +0 -2
- package/lib/cjs/carousel/constants.js +0 -2
- package/lib/cjs/carousel/foundation.js +2 -52
- package/lib/cjs/cascader/constants.js +0 -3
- package/lib/cjs/cascader/foundation.d.ts +4 -4
- package/lib/cjs/cascader/foundation.js +28 -242
- package/lib/cjs/cascader/util.js +6 -24
- package/lib/cjs/checkbox/checkboxFoundation.js +2 -38
- package/lib/cjs/checkbox/checkboxGroupFoundation.js +2 -23
- package/lib/cjs/checkbox/constants.js +0 -2
- package/lib/cjs/collapse/constants.js +0 -2
- package/lib/cjs/collapse/foundation.d.ts +1 -1
- package/lib/cjs/collapse/foundation.js +2 -13
- package/lib/cjs/collapsible/constants.js +0 -2
- package/lib/cjs/collapsible/foundation.js +0 -9
- package/lib/cjs/datePicker/_utils/formatter.js +4 -10
- package/lib/cjs/datePicker/_utils/getDayOfWeek.d.ts +1 -1
- package/lib/cjs/datePicker/_utils/getDayOfWeek.js +0 -4
- package/lib/cjs/datePicker/_utils/getDefaultFormatToken.js +0 -5
- package/lib/cjs/datePicker/_utils/getDefaultPickerDate.d.ts +1 -1
- package/lib/cjs/datePicker/_utils/getDefaultPickerDate.js +0 -15
- package/lib/cjs/datePicker/_utils/getFullDateOffset.js +0 -7
- package/lib/cjs/datePicker/_utils/getInsetInputFormatToken.js +0 -5
- package/lib/cjs/datePicker/_utils/getInsetInputValueFromInsetInputStr.js +0 -6
- package/lib/cjs/datePicker/_utils/getMonthTable.d.ts +1 -1
- package/lib/cjs/datePicker/_utils/getMonthTable.js +3 -14
- package/lib/cjs/datePicker/_utils/getMonthsInYear.js +0 -2
- package/lib/cjs/datePicker/_utils/getYears.d.ts +1 -1
- package/lib/cjs/datePicker/_utils/getYears.js +9 -7
- package/lib/cjs/datePicker/_utils/index.js +0 -13
- package/lib/cjs/datePicker/_utils/isAfter.js +0 -4
- package/lib/cjs/datePicker/_utils/isBefore.js +0 -4
- package/lib/cjs/datePicker/_utils/isBetween.js +0 -4
- package/lib/cjs/datePicker/_utils/isDate.js +0 -1
- package/lib/cjs/datePicker/_utils/isSameDay.js +0 -4
- package/lib/cjs/datePicker/_utils/isTimestamp.js +0 -4
- package/lib/cjs/datePicker/_utils/isUnixTimestamp.js +0 -4
- package/lib/cjs/datePicker/_utils/isValidDate.js +0 -1
- package/lib/cjs/datePicker/_utils/isValidTimeZone.js +0 -1
- package/lib/cjs/datePicker/_utils/isWithinInterval.js +0 -4
- package/lib/cjs/datePicker/_utils/parser.js +0 -10
- package/lib/cjs/datePicker/constants.js +0 -3
- package/lib/cjs/datePicker/foundation.d.ts +25 -25
- package/lib/cjs/datePicker/foundation.js +22 -333
- package/lib/cjs/datePicker/inputFoundation.d.ts +3 -3
- package/lib/cjs/datePicker/inputFoundation.js +5 -86
- package/lib/cjs/datePicker/monthFoundation.d.ts +1 -1
- package/lib/cjs/datePicker/monthFoundation.js +3 -28
- package/lib/cjs/datePicker/monthsGridFoundation.d.ts +5 -4
- package/lib/cjs/datePicker/monthsGridFoundation.js +43 -238
- package/lib/cjs/datePicker/yearAndMonthFoundation.d.ts +3 -1
- package/lib/cjs/datePicker/yearAndMonthFoundation.js +12 -38
- package/lib/cjs/descriptions/constants.js +0 -2
- package/lib/cjs/divider/constants.js +0 -2
- package/lib/cjs/dropdown/constants.js +0 -3
- package/lib/cjs/dropdown/foundation.js +4 -23
- package/lib/cjs/dropdown/menuFoundation.js +8 -27
- package/lib/cjs/empty/constants.js +0 -2
- package/lib/cjs/form/constants.js +0 -2
- package/lib/cjs/form/foundation.js +75 -206
- package/lib/cjs/form/interface.d.ts +5 -5
- package/lib/cjs/form/utils.js +47 -77
- package/lib/cjs/grid/constants.js +0 -2
- package/lib/cjs/highlight/constants.js +0 -2
- package/lib/cjs/icons/constants.js +0 -2
- package/lib/cjs/image/constants.js +0 -2
- package/lib/cjs/image/imageFoundation.js +4 -18
- package/lib/cjs/image/previewFooterFoundation.js +0 -13
- package/lib/cjs/image/previewFoundation.js +0 -11
- package/lib/cjs/image/previewImageFoundation.js +6 -80
- package/lib/cjs/image/previewInnerFoundation.js +12 -77
- package/lib/cjs/image/utils.js +0 -14
- package/lib/cjs/input/constants.js +0 -2
- package/lib/cjs/input/foundation.js +17 -101
- package/lib/cjs/input/textareaFoundation.js +20 -85
- package/lib/cjs/input/util/calculateNodeHeight.js +6 -18
- package/lib/cjs/input/util/getSizingData.js +7 -11
- package/lib/cjs/inputNumber/constants.js +0 -2
- package/lib/cjs/inputNumber/foundation.js +29 -192
- package/lib/cjs/layout/constants.js +0 -2
- package/lib/cjs/list/constants.js +0 -2
- package/lib/cjs/modal/constants.js +0 -2
- package/lib/cjs/modal/modalContentFoundation.js +0 -20
- package/lib/cjs/modal/modalFoundation.d.ts +2 -2
- package/lib/cjs/modal/modalFoundation.js +2 -22
- package/lib/cjs/navigation/NavItem.js +0 -10
- package/lib/cjs/navigation/constants.js +0 -3
- package/lib/cjs/navigation/foundation.js +3 -67
- package/lib/cjs/navigation/itemFoundation.d.ts +0 -2
- package/lib/cjs/navigation/itemFoundation.js +3 -21
- package/lib/cjs/navigation/navigation.css +7 -77
- package/lib/cjs/navigation/navigation.scss +7 -119
- package/lib/cjs/navigation/subNavFoundation.d.ts +0 -2
- package/lib/cjs/navigation/subNavFoundation.js +4 -40
- package/lib/cjs/notification/constants.js +0 -3
- package/lib/cjs/notification/notificationFoundation.d.ts +3 -3
- package/lib/cjs/notification/notificationFoundation.js +0 -16
- package/lib/cjs/notification/notificationListFoundation.js +7 -17
- package/lib/cjs/overflowList/constants.js +0 -2
- package/lib/cjs/overflowList/foundation.js +11 -41
- package/lib/cjs/pagination/constants.js +0 -2
- package/lib/cjs/pagination/foundation.d.ts +3 -3
- package/lib/cjs/pagination/foundation.js +21 -90
- package/lib/cjs/popconfirm/constants.js +0 -2
- package/lib/cjs/popconfirm/popconfirmFoundation.js +1 -21
- package/lib/cjs/popover/constants.js +0 -3
- package/lib/cjs/progress/constants.js +0 -2
- package/lib/cjs/progress/generates.d.ts +2 -2
- package/lib/cjs/progress/generates.js +19 -60
- package/lib/cjs/radio/constants.js +0 -2
- package/lib/cjs/radio/radioFoundation.js +0 -14
- package/lib/cjs/radio/radioGroupFoundation.js +4 -23
- package/lib/cjs/radio/radioInnerFoundation.js +2 -19
- package/lib/cjs/rating/constants.js +0 -2
- package/lib/cjs/rating/foundation.js +11 -61
- package/lib/cjs/scrollList/constants.js +0 -2
- package/lib/cjs/scrollList/foundation.js +0 -4
- package/lib/cjs/scrollList/itemFoundation.js +8 -61
- package/lib/cjs/scrollList/scrollTo.js +2 -5
- package/lib/cjs/select/constants.js +0 -3
- package/lib/cjs/select/foundation.d.ts +2 -2
- package/lib/cjs/select/foundation.js +122 -425
- package/lib/cjs/select/optionFoundation.js +4 -14
- package/lib/cjs/sideSheet/constants.js +0 -2
- package/lib/cjs/sideSheet/sideSheetFoundation.js +0 -18
- package/lib/cjs/skeleton/constants.js +0 -2
- package/lib/cjs/slider/constants.js +0 -2
- package/lib/cjs/slider/foundation.d.ts +1 -1
- package/lib/cjs/slider/foundation.js +25 -204
- package/lib/cjs/space/constants.js +0 -2
- package/lib/cjs/spin/constants.js +0 -2
- package/lib/cjs/spin/foundation.js +3 -13
- package/lib/cjs/steps/bacisSteps.scss +238 -287
- package/lib/cjs/steps/constants.js +0 -2
- package/lib/cjs/steps/fillSteps.scss +142 -153
- package/lib/cjs/steps/navSteps.scss +40 -61
- package/lib/cjs/steps/steps.css +17 -381
- package/lib/cjs/switch/constants.js +0 -2
- package/lib/cjs/switch/foundation.js +2 -18
- package/lib/cjs/table/bodyFoundation.js +2 -34
- package/lib/cjs/table/cellFoundation.js +0 -5
- package/lib/cjs/table/constants.js +7 -8
- package/lib/cjs/table/foundation.d.ts +17 -14
- package/lib/cjs/table/foundation.js +72 -302
- package/lib/cjs/table/table.css +6 -0
- package/lib/cjs/table/table.scss +12 -0
- package/lib/cjs/table/tableRowFoundation.js +0 -11
- package/lib/cjs/table/tableSelectionCellFoundation.js +0 -6
- package/lib/cjs/table/utils.d.ts +2 -2
- package/lib/cjs/table/utils.js +5 -118
- package/lib/cjs/tabs/constants.js +0 -2
- package/lib/cjs/tabs/foundation.js +2 -40
- package/lib/cjs/tabs/tabs.css +14 -14
- package/lib/cjs/tabs/tabs.scss +16 -14
- package/lib/cjs/tag/constants.js +1 -2
- package/lib/cjs/tagInput/constants.js +0 -2
- package/lib/cjs/tagInput/foundation.d.ts +4 -4
- package/lib/cjs/tagInput/foundation.js +4 -94
- package/lib/cjs/tagInput/utils/getSplitedArray.js +0 -11
- package/lib/cjs/timePicker/ComboxFoundation.js +4 -39
- package/lib/cjs/timePicker/constants.js +0 -3
- package/lib/cjs/timePicker/foundation.d.ts +2 -2
- package/lib/cjs/timePicker/foundation.js +6 -102
- package/lib/cjs/timePicker/inputFoundation.js +6 -25
- package/lib/cjs/timePicker/utils/index.js +6 -45
- package/lib/cjs/timePicker/utils/localeDate.js +0 -10
- package/lib/cjs/timeline/constants.js +0 -2
- package/lib/cjs/timeline/timeline.css +0 -36
- package/lib/cjs/timeline/timeline.scss +46 -96
- package/lib/cjs/toast/constants.js +0 -3
- package/lib/cjs/toast/toastFoundation.d.ts +3 -3
- package/lib/cjs/toast/toastFoundation.js +0 -14
- package/lib/cjs/toast/toastListFoundation.js +4 -22
- package/lib/cjs/tooltip/constants.js +0 -2
- package/lib/cjs/tooltip/foundation.d.ts +1 -1
- package/lib/cjs/tooltip/foundation.js +63 -291
- package/lib/cjs/transfer/constants.js +0 -2
- package/lib/cjs/transfer/foundation.d.ts +1 -1
- package/lib/cjs/transfer/foundation.js +4 -68
- package/lib/cjs/transfer/transferUtils.js +5 -27
- package/lib/cjs/tree/constants.js +0 -2
- package/lib/cjs/tree/foundation.d.ts +3 -3
- package/lib/cjs/tree/foundation.js +34 -150
- package/lib/cjs/tree/treeUtil.js +54 -173
- package/lib/cjs/treeSelect/constants.js +0 -2
- package/lib/cjs/treeSelect/foundation.d.ts +7 -7
- package/lib/cjs/treeSelect/foundation.js +18 -192
- package/lib/cjs/typography/constants.d.ts +1 -0
- package/lib/cjs/typography/constants.js +1 -2
- package/lib/cjs/typography/formatNumeral.d.ts +3 -3
- package/lib/cjs/typography/formatNumeral.js +16 -32
- package/lib/cjs/typography/typography.css +120 -0
- package/lib/cjs/typography/typography.scss +131 -6
- package/lib/cjs/typography/variables.scss +48 -0
- package/lib/cjs/upload/constants.js +0 -2
- package/lib/cjs/upload/foundation.d.ts +5 -5
- package/lib/cjs/upload/foundation.js +36 -245
- package/lib/cjs/upload/utils.js +10 -29
- package/lib/cjs/utils/Event.js +2 -21
- package/lib/cjs/utils/FocusHandle.d.ts +1 -1
- package/lib/cjs/utils/FocusHandle.js +6 -35
- package/lib/cjs/utils/Logger.js +0 -21
- package/lib/cjs/utils/Store.js +0 -10
- package/lib/cjs/utils/a11y.js +18 -43
- package/lib/cjs/utils/array.d.ts +1 -1
- package/lib/cjs/utils/array.js +0 -7
- package/lib/cjs/utils/arrayMove.js +0 -1
- package/lib/cjs/utils/classnames.js +0 -12
- package/lib/cjs/utils/date-fns-extra.js +0 -35
- package/lib/cjs/utils/dom.d.ts +1 -1
- package/lib/cjs/utils/dom.js +0 -13
- package/lib/cjs/utils/function.js +0 -1
- package/lib/cjs/utils/getDataAttr.js +0 -2
- package/lib/cjs/utils/getHighlight.js +5 -26
- package/lib/cjs/utils/getMotionObjFromProps.js +0 -12
- package/lib/cjs/utils/index.js +0 -4
- package/lib/cjs/utils/isBothNaN.js +0 -2
- package/lib/cjs/utils/isElement.js +0 -1
- package/lib/cjs/utils/isEnterPress.js +0 -5
- package/lib/cjs/utils/isEscPress.js +0 -5
- package/lib/cjs/utils/isNullOrUndefined.js +0 -1
- package/lib/cjs/utils/isNumber.js +0 -1
- package/lib/cjs/utils/isObject.js +0 -1
- package/lib/cjs/utils/isPromise.js +0 -3
- package/lib/cjs/utils/isString.js +0 -1
- package/lib/cjs/utils/keyCode.js +0 -105
- package/lib/cjs/utils/log.js +0 -5
- package/lib/cjs/utils/number.js +0 -2
- package/lib/cjs/utils/object.d.ts +4 -4
- package/lib/cjs/utils/object.js +12 -34
- package/lib/cjs/utils/set.js +0 -8
- package/lib/cjs/utils/shallowEqualObjects.js +0 -7
- package/lib/cjs/utils/touchPolyfill.js +0 -7
- package/lib/cjs/utils/type.d.ts +3 -3
- package/lib/cjs/utils/uuid.js +2 -9
- package/lib/cjs/utils/warning.js +0 -1
- package/lib/es/anchor/foundation.js +10 -66
- package/lib/es/anchor/linkFoundation.js +4 -12
- package/lib/es/autoComplete/foundation.d.ts +1 -1
- package/lib/es/autoComplete/foundation.js +24 -132
- package/lib/es/autoComplete/optionFoundation.js +4 -10
- package/lib/es/avatar/foundation.js +0 -12
- package/lib/es/backtop/foundation.d.ts +2 -2
- package/lib/es/backtop/foundation.js +0 -16
- package/lib/es/banner/foundation.js +0 -3
- package/lib/es/base/constants.js +2 -2
- package/lib/es/base/foundation.d.ts +1 -1
- package/lib/es/base/foundation.js +11 -44
- package/lib/es/breadcrumb/foundation.js +0 -7
- package/lib/es/breadcrumb/itemFoundation.js +0 -3
- package/lib/es/calendar/calendar.css +2 -2
- package/lib/es/calendar/calendar.scss +1 -1
- package/lib/es/calendar/eventUtil.d.ts +1 -1
- package/lib/es/calendar/eventUtil.js +2 -36
- package/lib/es/calendar/foundation.d.ts +2 -2
- package/lib/es/calendar/foundation.js +28 -117
- package/lib/es/carousel/foundation.js +2 -47
- package/lib/es/cascader/constants.js +0 -1
- package/lib/es/cascader/foundation.d.ts +4 -4
- package/lib/es/cascader/foundation.js +30 -226
- package/lib/es/cascader/util.js +6 -15
- package/lib/es/checkbox/checkboxFoundation.js +2 -34
- package/lib/es/checkbox/checkboxGroupFoundation.js +2 -20
- package/lib/es/collapse/foundation.d.ts +1 -1
- package/lib/es/collapse/foundation.js +2 -9
- package/lib/es/collapsible/foundation.js +0 -7
- package/lib/es/datePicker/_utils/formatter.js +4 -8
- package/lib/es/datePicker/_utils/getDayOfWeek.d.ts +1 -1
- package/lib/es/datePicker/_utils/getDayOfWeek.js +0 -3
- package/lib/es/datePicker/_utils/getDefaultFormatToken.js +0 -2
- package/lib/es/datePicker/_utils/getDefaultPickerDate.d.ts +1 -1
- package/lib/es/datePicker/_utils/getDefaultPickerDate.js +0 -10
- package/lib/es/datePicker/_utils/getFullDateOffset.js +0 -3
- package/lib/es/datePicker/_utils/getInsetInputFormatToken.js +0 -4
- package/lib/es/datePicker/_utils/getInsetInputValueFromInsetInputStr.js +0 -5
- package/lib/es/datePicker/_utils/getMonthTable.d.ts +1 -1
- package/lib/es/datePicker/_utils/getMonthTable.js +4 -14
- package/lib/es/datePicker/_utils/getMonthsInYear.js +0 -1
- package/lib/es/datePicker/_utils/getYears.d.ts +1 -1
- package/lib/es/datePicker/_utils/getYears.js +9 -6
- package/lib/es/datePicker/_utils/isBetween.js +0 -1
- package/lib/es/datePicker/_utils/parser.js +0 -8
- package/lib/es/datePicker/foundation.d.ts +25 -25
- package/lib/es/datePicker/foundation.js +22 -318
- package/lib/es/datePicker/inputFoundation.d.ts +3 -3
- package/lib/es/datePicker/inputFoundation.js +5 -74
- package/lib/es/datePicker/monthFoundation.d.ts +1 -1
- package/lib/es/datePicker/monthFoundation.js +4 -22
- package/lib/es/datePicker/monthsGridFoundation.d.ts +5 -4
- package/lib/es/datePicker/monthsGridFoundation.js +42 -222
- package/lib/es/datePicker/yearAndMonthFoundation.d.ts +3 -1
- package/lib/es/datePicker/yearAndMonthFoundation.js +12 -36
- package/lib/es/dropdown/foundation.js +4 -18
- package/lib/es/dropdown/menuFoundation.js +8 -22
- package/lib/es/form/foundation.js +74 -195
- package/lib/es/form/interface.d.ts +5 -5
- package/lib/es/form/utils.js +47 -70
- package/lib/es/image/imageFoundation.js +4 -13
- package/lib/es/image/previewFooterFoundation.js +0 -9
- package/lib/es/image/previewFoundation.js +0 -7
- package/lib/es/image/previewImageFoundation.js +6 -72
- package/lib/es/image/previewInnerFoundation.js +12 -70
- package/lib/es/image/utils.js +0 -6
- package/lib/es/input/foundation.js +17 -93
- package/lib/es/input/textareaFoundation.js +20 -75
- package/lib/es/input/util/calculateNodeHeight.js +6 -18
- package/lib/es/input/util/getSizingData.js +7 -11
- package/lib/es/inputNumber/foundation.js +28 -183
- package/lib/es/modal/modalContentFoundation.js +0 -15
- package/lib/es/modal/modalFoundation.d.ts +2 -2
- package/lib/es/modal/modalFoundation.js +2 -17
- package/lib/es/navigation/NavItem.js +0 -6
- package/lib/es/navigation/constants.js +1 -1
- package/lib/es/navigation/foundation.js +2 -60
- package/lib/es/navigation/itemFoundation.d.ts +0 -2
- package/lib/es/navigation/itemFoundation.js +3 -18
- package/lib/es/navigation/navigation.css +7 -77
- package/lib/es/navigation/navigation.scss +7 -119
- package/lib/es/navigation/subNavFoundation.d.ts +0 -2
- package/lib/es/navigation/subNavFoundation.js +4 -36
- package/lib/es/notification/constants.js +1 -1
- package/lib/es/notification/notificationFoundation.d.ts +3 -3
- package/lib/es/notification/notificationFoundation.js +0 -11
- package/lib/es/notification/notificationListFoundation.js +6 -13
- package/lib/es/overflowList/foundation.js +11 -37
- package/lib/es/pagination/foundation.d.ts +3 -3
- package/lib/es/pagination/foundation.js +20 -87
- package/lib/es/popconfirm/popconfirmFoundation.js +1 -16
- package/lib/es/progress/generates.d.ts +2 -2
- package/lib/es/progress/generates.js +19 -59
- package/lib/es/radio/radioFoundation.js +0 -9
- package/lib/es/radio/radioGroupFoundation.js +4 -19
- package/lib/es/radio/radioInnerFoundation.js +2 -15
- package/lib/es/rating/foundation.js +10 -54
- package/lib/es/scrollList/itemFoundation.js +8 -60
- package/lib/es/scrollList/scrollTo.js +2 -4
- package/lib/es/select/foundation.d.ts +2 -2
- package/lib/es/select/foundation.js +122 -411
- package/lib/es/select/optionFoundation.js +4 -10
- package/lib/es/sideSheet/sideSheetFoundation.js +0 -12
- package/lib/es/slider/foundation.d.ts +1 -1
- package/lib/es/slider/foundation.js +24 -197
- package/lib/es/spin/foundation.js +3 -11
- package/lib/es/steps/bacisSteps.scss +238 -287
- package/lib/es/steps/fillSteps.scss +142 -153
- package/lib/es/steps/navSteps.scss +40 -61
- package/lib/es/steps/steps.css +17 -381
- package/lib/es/switch/foundation.js +2 -13
- package/lib/es/table/bodyFoundation.js +2 -25
- package/lib/es/table/cellFoundation.js +0 -1
- package/lib/es/table/constants.js +6 -6
- package/lib/es/table/foundation.d.ts +17 -14
- package/lib/es/table/foundation.js +72 -309
- package/lib/es/table/table.css +6 -0
- package/lib/es/table/table.scss +12 -0
- package/lib/es/table/tableRowFoundation.js +2 -9
- package/lib/es/table/tableSelectionCellFoundation.js +0 -2
- package/lib/es/table/utils.d.ts +2 -2
- package/lib/es/table/utils.js +5 -81
- package/lib/es/tabs/foundation.js +2 -35
- package/lib/es/tabs/tabs.css +14 -14
- package/lib/es/tabs/tabs.scss +16 -14
- package/lib/es/tagInput/foundation.d.ts +4 -4
- package/lib/es/tagInput/foundation.js +4 -84
- package/lib/es/tagInput/utils/getSplitedArray.js +0 -7
- package/lib/es/timePicker/ComboxFoundation.js +4 -30
- package/lib/es/timePicker/foundation.d.ts +2 -2
- package/lib/es/timePicker/foundation.js +7 -95
- package/lib/es/timePicker/inputFoundation.js +6 -22
- package/lib/es/timePicker/utils/index.js +6 -25
- package/lib/es/timePicker/utils/localeDate.js +0 -8
- package/lib/es/timeline/timeline.css +0 -36
- package/lib/es/timeline/timeline.scss +46 -96
- package/lib/es/toast/constants.js +1 -1
- package/lib/es/toast/toastFoundation.d.ts +3 -3
- package/lib/es/toast/toastFoundation.js +0 -9
- package/lib/es/toast/toastListFoundation.js +4 -18
- package/lib/es/tooltip/foundation.d.ts +1 -1
- package/lib/es/tooltip/foundation.js +63 -288
- package/lib/es/transfer/foundation.d.ts +1 -1
- package/lib/es/transfer/foundation.js +6 -62
- package/lib/es/transfer/transferUtils.js +5 -21
- package/lib/es/tree/foundation.d.ts +3 -3
- package/lib/es/tree/foundation.js +34 -143
- package/lib/es/tree/treeUtil.js +54 -139
- package/lib/es/treeSelect/foundation.d.ts +7 -7
- package/lib/es/treeSelect/foundation.js +20 -179
- package/lib/es/typography/constants.d.ts +1 -0
- package/lib/es/typography/constants.js +1 -0
- package/lib/es/typography/formatNumeral.d.ts +3 -3
- package/lib/es/typography/formatNumeral.js +16 -29
- package/lib/es/typography/typography.css +120 -0
- package/lib/es/typography/typography.scss +131 -6
- package/lib/es/typography/variables.scss +48 -0
- package/lib/es/upload/foundation.d.ts +5 -5
- package/lib/es/upload/foundation.js +36 -238
- package/lib/es/upload/utils.js +10 -24
- package/lib/es/utils/Event.js +2 -17
- package/lib/es/utils/FocusHandle.d.ts +1 -1
- package/lib/es/utils/FocusHandle.js +6 -32
- package/lib/es/utils/Logger.js +0 -20
- package/lib/es/utils/Store.js +0 -9
- package/lib/es/utils/a11y.js +18 -31
- package/lib/es/utils/array.d.ts +1 -1
- package/lib/es/utils/array.js +0 -5
- package/lib/es/utils/classnames.js +0 -10
- package/lib/es/utils/date-fns-extra.js +0 -27
- package/lib/es/utils/dom.d.ts +1 -1
- package/lib/es/utils/dom.js +0 -9
- package/lib/es/utils/getDataAttr.js +0 -1
- package/lib/es/utils/getHighlight.js +5 -26
- package/lib/es/utils/getMotionObjFromProps.js +0 -8
- package/lib/es/utils/isBothNaN.js +0 -1
- package/lib/es/utils/isEnterPress.js +0 -2
- package/lib/es/utils/isEscPress.js +0 -2
- package/lib/es/utils/keyCode.js +0 -104
- package/lib/es/utils/log.js +0 -3
- package/lib/es/utils/object.d.ts +4 -4
- package/lib/es/utils/object.js +12 -28
- package/lib/es/utils/set.js +0 -5
- package/lib/es/utils/shallowEqualObjects.js +0 -6
- package/lib/es/utils/touchPolyfill.js +0 -5
- package/lib/es/utils/type.d.ts +3 -3
- package/lib/es/utils/uuid.js +2 -8
- package/navigation/itemFoundation.ts +1 -3
- package/navigation/navigation.scss +7 -119
- package/navigation/subNavFoundation.ts +1 -3
- package/overflowList/foundation.ts +4 -4
- package/package.json +2 -2
- package/steps/bacisSteps.scss +238 -287
- package/steps/fillSteps.scss +142 -153
- package/steps/navSteps.scss +40 -61
- package/table/foundation.ts +8 -10
- package/table/table.scss +12 -0
- package/tabs/tabs.scss +16 -14
- package/timePicker/foundation.ts +4 -6
- package/timeline/timeline.scss +46 -96
- package/typography/constants.ts +1 -0
- package/typography/typography.scss +131 -6
- package/typography/variables.scss +48 -0
- package/upload/foundation.ts +8 -8
|
@@ -9,7 +9,7 @@ export interface BasicDataItem {
|
|
|
9
9
|
style?: any;
|
|
10
10
|
className?: string;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type DataItemMap = Map<number | string, BasicDataItem>;
|
|
13
13
|
export interface OnSortEndProps {
|
|
14
14
|
oldIndex: number;
|
|
15
15
|
newIndex: number;
|
|
@@ -2,28 +2,24 @@ import _omit from "lodash/omit";
|
|
|
2
2
|
import BaseFoundation from '../base/foundation';
|
|
3
3
|
import { strings } from './constants';
|
|
4
4
|
import { _generateGroupedData, _generateTreeData } from './transferUtils';
|
|
5
|
-
import arrayMove from '../utils/arrayMove';
|
|
6
|
-
|
|
5
|
+
import arrayMove from '../utils/arrayMove';
|
|
6
|
+
// eslint-disable-next-line max-len
|
|
7
7
|
export default class TransferFoundation extends BaseFoundation {
|
|
8
8
|
constructor(adapter) {
|
|
9
9
|
super(Object.assign({}, adapter));
|
|
10
10
|
}
|
|
11
|
-
|
|
12
11
|
_generateGroupedData(dataSource) {
|
|
13
12
|
return _generateGroupedData(dataSource);
|
|
14
13
|
}
|
|
15
|
-
|
|
16
14
|
_generateTreeData(dataSource) {
|
|
17
15
|
return _generateTreeData(dataSource);
|
|
18
16
|
}
|
|
19
|
-
|
|
20
17
|
_generatePath(item) {
|
|
21
18
|
const {
|
|
22
19
|
path = []
|
|
23
20
|
} = item;
|
|
24
21
|
return path.map(p => p.label).join(' > ');
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
handleInputChange(inputVal, notify) {
|
|
28
24
|
const {
|
|
29
25
|
data
|
|
@@ -32,32 +28,22 @@ export default class TransferFoundation extends BaseFoundation {
|
|
|
32
28
|
filter,
|
|
33
29
|
type
|
|
34
30
|
} = this.getProps();
|
|
35
|
-
|
|
36
31
|
if (type === strings.TYPE_TREE_TO_LIST) {
|
|
37
32
|
const searchResult = new Set(data.map(item => item.key));
|
|
38
|
-
|
|
39
33
|
this._adapter.searchTree(inputVal);
|
|
40
|
-
|
|
41
34
|
notify && this._adapter.notifySearch(inputVal);
|
|
42
|
-
|
|
43
35
|
this._adapter.updateInput(inputVal);
|
|
44
|
-
|
|
45
36
|
this._adapter.updateSearchResult(searchResult);
|
|
46
|
-
|
|
47
37
|
return;
|
|
48
38
|
}
|
|
49
|
-
|
|
50
39
|
const filterFunc = typeof filter === 'function' ? item => filter(inputVal, item) : item => typeof item.label === 'string' && item.label.includes(inputVal);
|
|
51
40
|
const searchData = data.filter(filterFunc);
|
|
52
41
|
const searchResult = new Set(searchData.map(item => item.key));
|
|
53
42
|
notify && this._adapter.notifySearch(inputVal);
|
|
54
|
-
|
|
55
43
|
this._adapter.updateInput(inputVal);
|
|
56
|
-
|
|
57
44
|
this._adapter.updateSearchResult(searchResult);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
45
|
+
}
|
|
46
|
+
// Select or cancel all unhidden items
|
|
61
47
|
handleAll(wantAllChecked) {
|
|
62
48
|
const {
|
|
63
49
|
disabled,
|
|
@@ -69,17 +55,14 @@ export default class TransferFoundation extends BaseFoundation {
|
|
|
69
55
|
searchResult,
|
|
70
56
|
inputValue
|
|
71
57
|
} = this.getStates();
|
|
72
|
-
|
|
73
58
|
if (disabled) {
|
|
74
59
|
return;
|
|
75
60
|
}
|
|
76
|
-
|
|
77
61
|
const inSearchMode = inputValue !== '';
|
|
78
62
|
let operateData = [];
|
|
79
63
|
operateData = inSearchMode ? data.filter(item => searchResult.has(item.key)) : data;
|
|
80
64
|
operateData = type === strings.TYPE_TREE_TO_LIST ? data : operateData;
|
|
81
65
|
let newSelectedItems = new Map();
|
|
82
|
-
|
|
83
66
|
switch (true) {
|
|
84
67
|
case !wantAllChecked:
|
|
85
68
|
newSelectedItems = new Map(selectedItems);
|
|
@@ -90,7 +73,6 @@ export default class TransferFoundation extends BaseFoundation {
|
|
|
90
73
|
}
|
|
91
74
|
});
|
|
92
75
|
break;
|
|
93
|
-
|
|
94
76
|
case wantAllChecked:
|
|
95
77
|
newSelectedItems = new Map(selectedItems);
|
|
96
78
|
operateData.forEach(item => {
|
|
@@ -99,25 +81,19 @@ export default class TransferFoundation extends BaseFoundation {
|
|
|
99
81
|
if (selectedItems.has(item.key)) {
|
|
100
82
|
newSelectedItems.set(item.key, item);
|
|
101
83
|
}
|
|
102
|
-
|
|
103
84
|
return;
|
|
104
85
|
}
|
|
105
|
-
|
|
106
86
|
newSelectedItems.set(item.key, item);
|
|
107
87
|
});
|
|
108
88
|
break;
|
|
109
|
-
|
|
110
89
|
default:
|
|
111
90
|
break;
|
|
112
91
|
}
|
|
113
|
-
|
|
114
92
|
if (!this._isControlledComponent()) {
|
|
115
93
|
this._adapter.updateSelected(newSelectedItems);
|
|
116
94
|
}
|
|
117
|
-
|
|
118
95
|
this._notifyChange(newSelectedItems);
|
|
119
96
|
}
|
|
120
|
-
|
|
121
97
|
handleClear() {
|
|
122
98
|
const {
|
|
123
99
|
disabled
|
|
@@ -126,11 +102,9 @@ export default class TransferFoundation extends BaseFoundation {
|
|
|
126
102
|
selectedItems,
|
|
127
103
|
data
|
|
128
104
|
} = this.getStates();
|
|
129
|
-
|
|
130
105
|
if (disabled) {
|
|
131
106
|
return;
|
|
132
107
|
}
|
|
133
|
-
|
|
134
108
|
const newSelectedItems = new Map(selectedItems);
|
|
135
109
|
data.forEach(item => {
|
|
136
110
|
// If the item is disabled, keep it
|
|
@@ -138,129 +112,99 @@ export default class TransferFoundation extends BaseFoundation {
|
|
|
138
112
|
newSelectedItems.delete(item.key);
|
|
139
113
|
}
|
|
140
114
|
});
|
|
141
|
-
|
|
142
115
|
if (!this._isControlledComponent()) {
|
|
143
116
|
this._adapter.updateSelected(newSelectedItems);
|
|
144
117
|
}
|
|
145
|
-
|
|
146
118
|
this._notifyChange(newSelectedItems);
|
|
147
119
|
}
|
|
148
|
-
|
|
149
120
|
handleSelectOrRemove(item) {
|
|
150
121
|
const {
|
|
151
122
|
disabled
|
|
152
123
|
} = this.getProps();
|
|
153
|
-
|
|
154
124
|
const selectedItems = this._adapter.getSelected();
|
|
155
|
-
|
|
156
125
|
if (disabled || item.disabled) {
|
|
157
126
|
return;
|
|
158
127
|
}
|
|
159
|
-
|
|
160
128
|
if (selectedItems.has(item.key)) {
|
|
161
129
|
selectedItems.delete(item.key);
|
|
162
|
-
|
|
163
130
|
this._adapter.notifyDeselect(item);
|
|
164
131
|
} else {
|
|
165
132
|
selectedItems.set(item.key, item);
|
|
166
|
-
|
|
167
133
|
this._adapter.notifySelect(item);
|
|
168
134
|
}
|
|
169
|
-
|
|
170
135
|
if (!this._isControlledComponent()) {
|
|
171
136
|
this._adapter.updateSelected(selectedItems);
|
|
172
137
|
}
|
|
173
|
-
|
|
174
138
|
this._notifyChange(selectedItems);
|
|
175
139
|
}
|
|
176
|
-
|
|
177
140
|
handleSelect(values) {
|
|
178
141
|
const {
|
|
179
142
|
disabled
|
|
180
143
|
} = this.getProps();
|
|
181
|
-
|
|
182
144
|
const selectedItems = this._adapter.getSelected();
|
|
183
|
-
|
|
184
145
|
const {
|
|
185
146
|
data
|
|
186
147
|
} = this.getStates();
|
|
187
148
|
const dataItems = data.map(d => [d.value, d]);
|
|
188
149
|
const allItemsMap = new Map(dataItems);
|
|
189
150
|
const nextSelectedItemsMap = new Map();
|
|
190
|
-
|
|
191
151
|
if (disabled) {
|
|
192
152
|
return;
|
|
193
153
|
}
|
|
194
|
-
|
|
195
154
|
values.forEach(value => {
|
|
196
|
-
const node = allItemsMap.get(value);
|
|
197
|
-
|
|
155
|
+
const node = allItemsMap.get(value);
|
|
156
|
+
// The value passed in is an array of the value used, but the internal selectedItems stores a map of keys
|
|
198
157
|
if (selectedItems.has(node.key)) {
|
|
199
158
|
nextSelectedItemsMap.set(node.key, node);
|
|
200
159
|
return;
|
|
201
160
|
}
|
|
202
|
-
|
|
203
161
|
if (node.disabled) {
|
|
204
162
|
return;
|
|
205
163
|
}
|
|
206
|
-
|
|
207
164
|
nextSelectedItemsMap.set(node.key, node);
|
|
208
165
|
return;
|
|
209
166
|
});
|
|
210
|
-
|
|
211
167
|
if (!this._isControlledComponent()) {
|
|
212
168
|
this._adapter.updateSelected(nextSelectedItemsMap);
|
|
213
169
|
}
|
|
214
|
-
|
|
215
170
|
this._notifyChange(nextSelectedItemsMap);
|
|
216
171
|
}
|
|
217
|
-
|
|
218
172
|
getValuesAndItemsFromMap(selectedItems) {
|
|
219
173
|
const {
|
|
220
174
|
type
|
|
221
175
|
} = this.getProps();
|
|
222
176
|
const items = [];
|
|
223
177
|
const values = [];
|
|
224
|
-
|
|
225
178
|
for (const item of selectedItems) {
|
|
226
179
|
const obj = type === strings.TYPE_GROUP_LIST ? _omit(item[1], '_parent') : item[1];
|
|
227
180
|
items.push(obj);
|
|
228
181
|
values.push(obj.value);
|
|
229
182
|
}
|
|
230
|
-
|
|
231
183
|
return {
|
|
232
184
|
items,
|
|
233
185
|
values
|
|
234
186
|
};
|
|
235
187
|
}
|
|
236
|
-
|
|
237
188
|
_notifyChange(selectedItems) {
|
|
238
189
|
const {
|
|
239
190
|
items,
|
|
240
191
|
values
|
|
241
192
|
} = this.getValuesAndItemsFromMap(selectedItems);
|
|
242
|
-
|
|
243
193
|
this._adapter.notifyChange(values, items);
|
|
244
194
|
}
|
|
245
|
-
|
|
246
195
|
handleSortEnd(callbackProps) {
|
|
247
196
|
const {
|
|
248
197
|
oldIndex,
|
|
249
198
|
newIndex
|
|
250
199
|
} = callbackProps;
|
|
251
|
-
|
|
252
200
|
const selectedItems = this._adapter.getSelected();
|
|
253
|
-
|
|
254
201
|
let selectedArr = [...selectedItems.values()];
|
|
255
202
|
selectedArr = arrayMove(selectedArr, oldIndex, newIndex);
|
|
256
203
|
let newSelectedItems = new Map();
|
|
257
204
|
selectedArr.forEach(option => {
|
|
258
205
|
newSelectedItems = newSelectedItems.set(option.key, option);
|
|
259
206
|
});
|
|
260
|
-
|
|
261
207
|
this._adapter.updateSelected(newSelectedItems);
|
|
262
|
-
|
|
263
208
|
this._notifyChange(newSelectedItems);
|
|
264
209
|
}
|
|
265
|
-
|
|
266
210
|
}
|
|
@@ -1,47 +1,37 @@
|
|
|
1
1
|
import _omit from "lodash/omit";
|
|
2
|
-
|
|
3
2
|
var __rest = this && this.__rest || function (s, e) {
|
|
4
3
|
var t = {};
|
|
5
|
-
|
|
6
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
7
|
-
|
|
8
5
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
9
6
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
10
7
|
}
|
|
11
8
|
return t;
|
|
12
9
|
};
|
|
13
|
-
|
|
14
10
|
import { strings } from './constants';
|
|
15
11
|
export function _generateGroupedData(dataSource) {
|
|
16
12
|
const newData = [];
|
|
17
|
-
|
|
18
13
|
for (const group of dataSource) {
|
|
19
14
|
group.children.forEach(item => {
|
|
20
15
|
const {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
children
|
|
17
|
+
} = group,
|
|
18
|
+
rest = __rest(group, ["children"]);
|
|
25
19
|
newData.push(Object.assign(Object.assign({}, item), {
|
|
26
20
|
_parent: rest
|
|
27
21
|
}));
|
|
28
22
|
});
|
|
29
23
|
}
|
|
30
|
-
|
|
31
24
|
return newData;
|
|
32
|
-
}
|
|
33
|
-
|
|
25
|
+
}
|
|
26
|
+
// DFS
|
|
34
27
|
export function _generateTreeData(dataSource) {
|
|
35
28
|
const newData = [];
|
|
36
29
|
const stack = [...dataSource].reverse();
|
|
37
|
-
|
|
38
30
|
while (stack.length) {
|
|
39
31
|
const current = stack.pop();
|
|
40
32
|
current.path = current.path || [_omit(current, ['children'])];
|
|
41
|
-
|
|
42
33
|
if (current.children && Array.isArray(current.children)) {
|
|
43
34
|
const nodes = current.children;
|
|
44
|
-
|
|
45
35
|
for (let i = nodes.length - 1; i >= 0; i--) {
|
|
46
36
|
const child = Object.assign({}, nodes[i]);
|
|
47
37
|
child.path = [].concat(current.path).concat(_omit(child, ['children']));
|
|
@@ -50,30 +40,24 @@ export function _generateTreeData(dataSource) {
|
|
|
50
40
|
} else {
|
|
51
41
|
current.isLeaf = true;
|
|
52
42
|
}
|
|
53
|
-
|
|
54
43
|
newData.push(_omit(current, ['children']));
|
|
55
44
|
}
|
|
56
|
-
|
|
57
45
|
return newData;
|
|
58
46
|
}
|
|
59
47
|
export function _generateDataByType(dataSource, type) {
|
|
60
48
|
const newData = dataSource.slice() || [];
|
|
61
|
-
|
|
62
49
|
if (type === strings.TYPE_GROUP_LIST) {
|
|
63
50
|
return _generateGroupedData(newData);
|
|
64
51
|
}
|
|
65
|
-
|
|
66
52
|
if (type === strings.TYPE_TREE_TO_LIST) {
|
|
67
53
|
return _generateTreeData(newData);
|
|
68
54
|
}
|
|
69
|
-
|
|
70
55
|
return newData;
|
|
71
56
|
}
|
|
72
57
|
export function _generateSelectedItems(value, data) {
|
|
73
58
|
const selectedItems = new Map();
|
|
74
59
|
value.forEach(val => {
|
|
75
60
|
const index = data.findIndex(option => option.value === val);
|
|
76
|
-
|
|
77
61
|
if (index !== -1) {
|
|
78
62
|
const option = data[index];
|
|
79
63
|
selectedItems.set(option.key, option);
|
|
@@ -71,8 +71,8 @@ export interface BasicDragProps {
|
|
|
71
71
|
export interface BasicDragEnterProps extends BasicDragProps {
|
|
72
72
|
expandedKeys?: string[];
|
|
73
73
|
}
|
|
74
|
-
export
|
|
75
|
-
export
|
|
74
|
+
export type ExpandAction = false | 'click' | 'doubleClick';
|
|
75
|
+
export type BasicValue = string | number | BasicTreeNodeData | Array<BasicTreeNodeData | string | number>;
|
|
76
76
|
export interface BasicOnDragProps {
|
|
77
77
|
event: any;
|
|
78
78
|
node: BasicDragTreeNode;
|
|
@@ -128,7 +128,7 @@ export interface Virtualize {
|
|
|
128
128
|
height?: number | string;
|
|
129
129
|
width?: number | string;
|
|
130
130
|
}
|
|
131
|
-
export
|
|
131
|
+
export type CheckRelation = 'related' | 'unRelated';
|
|
132
132
|
export interface BasicTreeProps {
|
|
133
133
|
autoExpandParent?: boolean;
|
|
134
134
|
autoExpandWhenDragEnter?: boolean;
|