@douyinfe/semi-foundation 2.22.0-beta.0 → 2.22.0-beta.2
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/anchor/foundation.ts +1 -1
- package/anchor/linkFoundation.ts +1 -1
- package/autoComplete/foundation.ts +4 -4
- package/autoComplete/optionFoundation.ts +2 -2
- package/avatar/foundation.ts +1 -1
- package/backtop/foundation.ts +1 -1
- package/banner/foundation.ts +1 -1
- package/base/foundation.ts +1 -1
- package/breadcrumb/foundation.ts +1 -1
- package/breadcrumb/itemFoundation.ts +3 -3
- package/calendar/eventUtil.ts +1 -1
- package/calendar/foundation.ts +8 -8
- package/card/variables.scss +1 -1
- package/cascader/foundation.ts +15 -32
- package/checkbox/checkboxFoundation.ts +4 -4
- package/checkbox/checkboxGroupFoundation.ts +1 -1
- package/collapse/foundation.ts +4 -4
- package/collapsible/animation.scss +10 -0
- package/collapsible/collapsible.scss +11 -0
- package/collapsible/foundation.ts +59 -0
- package/collapsible/variables.scss +0 -0
- package/datePicker/_utils/getDefaultPickerDate.ts +1 -1
- package/datePicker/_utils/getInsetInputFormatToken.ts +1 -1
- package/datePicker/_utils/getInsetInputValueFromInsetInputStr.ts +1 -1
- package/datePicker/_utils/parser.ts +1 -1
- package/datePicker/datePicker.scss +14 -0
- package/datePicker/foundation.ts +19 -28
- package/datePicker/inputFoundation.ts +10 -10
- package/datePicker/monthFoundation.ts +7 -7
- package/datePicker/monthsGridFoundation.ts +10 -11
- package/datePicker/yearAndMonthFoundation.ts +5 -4
- package/dropdown/foundation.ts +1 -1
- package/form/interface.ts +12 -12
- package/image/animation.scss +1 -1
- package/image/imageFoundation.ts +1 -1
- package/image/previewFooterFoundation.ts +1 -1
- package/image/previewImageFoundation.ts +6 -6
- package/image/previewInnerFoundation.ts +2 -2
- package/input/foundation.ts +2 -2
- package/input/textareaFoundation.ts +2 -2
- package/inputNumber/foundation.ts +2 -2
- package/keyframes/rotate.scss +0 -8
- package/lib/cjs/button/iconButton.css +0 -8
- package/lib/cjs/card/card.css +1 -1
- package/lib/cjs/card/variables.scss +1 -1
- package/lib/cjs/cascader/foundation.d.ts +2 -3
- package/lib/cjs/cascader/foundation.js +6 -30
- package/lib/cjs/collapse/foundation.d.ts +1 -2
- package/lib/cjs/collapsible/animation.scss +10 -0
- package/lib/cjs/collapsible/collapsible.css +6 -0
- package/lib/cjs/collapsible/collapsible.scss +11 -0
- package/lib/cjs/collapsible/foundation.d.ts +31 -0
- package/lib/cjs/collapsible/foundation.js +36 -0
- package/lib/cjs/collapsible/variables.scss +0 -0
- package/lib/cjs/datePicker/datePicker.css +9 -0
- package/lib/cjs/datePicker/datePicker.scss +14 -0
- package/lib/cjs/datePicker/foundation.d.ts +6 -5
- package/lib/cjs/datePicker/foundation.js +5 -13
- package/lib/cjs/datePicker/monthsGridFoundation.d.ts +0 -1
- package/lib/cjs/datePicker/yearAndMonthFoundation.d.ts +1 -0
- package/lib/cjs/image/animation.scss +1 -1
- package/lib/cjs/image/image.css +1 -1
- package/lib/cjs/keyframes/rotate.css +1 -9
- package/lib/cjs/keyframes/rotate.scss +0 -8
- package/lib/cjs/modal/animation.scss +26 -0
- package/lib/cjs/modal/modal.css +8 -8
- package/lib/cjs/modal/modal.scss +51 -47
- package/lib/cjs/modal/modalContentFoundation.d.ts +3 -1
- package/lib/cjs/modal/modalFoundation.d.ts +7 -6
- package/lib/cjs/modal/modalFoundation.js +9 -5
- package/lib/cjs/navigation/itemFoundation.js +11 -1
- package/lib/cjs/navigation/navigation.css +12 -0
- package/lib/cjs/navigation/navigation.scss +16 -0
- package/lib/cjs/navigation/variables.scss +3 -2
- package/lib/cjs/notification/animation.scss +12 -0
- package/lib/cjs/notification/notification.css +156 -0
- package/lib/cjs/notification/notification.scss +183 -1
- package/lib/cjs/notification/notificationFoundation.d.ts +1 -2
- package/lib/cjs/popover/animation.scss +7 -0
- package/lib/cjs/popover/popover.css +27 -0
- package/lib/cjs/popover/popover.scss +38 -2
- package/lib/cjs/scrollList/scrollList.css +1 -0
- package/lib/cjs/scrollList/scrollList.scss +1 -0
- package/lib/cjs/select/foundation.d.ts +1 -0
- package/lib/cjs/select/foundation.js +12 -0
- package/lib/cjs/sideSheet/animation.scss +14 -6
- package/lib/cjs/sideSheet/sideSheet.css +110 -2
- package/lib/cjs/sideSheet/sideSheet.scss +140 -5
- package/lib/cjs/sideSheet/sideSheetFoundation.d.ts +8 -6
- package/lib/cjs/sideSheet/sideSheetFoundation.js +10 -50
- package/lib/cjs/skeleton/animation.scss +3 -0
- package/lib/cjs/skeleton/skeleton.css +1 -1
- package/lib/cjs/skeleton/skeleton.scss +2 -1
- package/lib/cjs/spin/animation.scss +2 -0
- package/lib/cjs/spin/spin.css +9 -9
- package/lib/cjs/spin/spin.scss +14 -6
- package/lib/cjs/spin/variables.scss +1 -7
- package/lib/cjs/table/table.css +8 -0
- package/lib/cjs/table/table.scss +10 -0
- package/lib/cjs/tabs/animation.scss +28 -15
- package/lib/cjs/tabs/constants.d.ts +4 -0
- package/lib/cjs/tabs/constants.js +5 -1
- package/lib/cjs/tabs/tabs.css +52 -0
- package/lib/cjs/tabs/tabs.scss +60 -0
- package/lib/cjs/timePicker/timePicker.css +9 -0
- package/lib/cjs/timePicker/timePicker.scss +12 -0
- package/lib/cjs/toast/animation.scss +11 -0
- package/lib/cjs/toast/toast.css +24 -0
- package/lib/cjs/toast/toast.scss +30 -1
- package/lib/cjs/toast/toastFoundation.d.ts +1 -2
- package/lib/cjs/tooltip/animation.scss +7 -0
- package/lib/cjs/tooltip/foundation.d.ts +4 -7
- package/lib/cjs/tooltip/foundation.js +11 -30
- package/lib/cjs/tooltip/tooltip.css +6 -0
- package/lib/cjs/tooltip/tooltip.scss +13 -1
- package/lib/cjs/treeSelect/foundation.d.ts +2 -0
- package/lib/cjs/typography/constants.d.ts +2 -0
- package/lib/cjs/typography/constants.js +3 -1
- package/lib/cjs/typography/formatNumeral.d.ts +18 -0
- package/lib/cjs/typography/formatNumeral.js +114 -0
- package/lib/cjs/utils/uuid.js +4 -1
- package/lib/es/button/iconButton.css +0 -8
- package/lib/es/card/card.css +1 -1
- package/lib/es/card/variables.scss +1 -1
- package/lib/es/cascader/foundation.d.ts +2 -3
- package/lib/es/cascader/foundation.js +6 -30
- package/lib/es/collapse/foundation.d.ts +1 -2
- package/lib/es/collapsible/animation.scss +10 -0
- package/lib/es/collapsible/collapsible.css +6 -0
- package/lib/es/collapsible/collapsible.scss +11 -0
- package/lib/es/collapsible/foundation.d.ts +31 -0
- package/lib/es/collapsible/foundation.js +26 -0
- package/lib/es/collapsible/variables.scss +0 -0
- package/lib/es/datePicker/datePicker.css +9 -0
- package/lib/es/datePicker/datePicker.scss +14 -0
- package/lib/es/datePicker/foundation.d.ts +6 -5
- package/lib/es/datePicker/foundation.js +5 -13
- package/lib/es/datePicker/monthsGridFoundation.d.ts +0 -1
- package/lib/es/datePicker/yearAndMonthFoundation.d.ts +1 -0
- package/lib/es/image/animation.scss +1 -1
- package/lib/es/image/image.css +1 -1
- package/lib/es/keyframes/rotate.css +1 -9
- package/lib/es/keyframes/rotate.scss +0 -8
- package/lib/es/modal/animation.scss +26 -0
- package/lib/es/modal/modal.css +8 -8
- package/lib/es/modal/modal.scss +51 -47
- package/lib/es/modal/modalContentFoundation.d.ts +3 -1
- package/lib/es/modal/modalFoundation.d.ts +7 -6
- package/lib/es/modal/modalFoundation.js +9 -5
- package/lib/es/navigation/itemFoundation.js +12 -1
- package/lib/es/navigation/navigation.css +12 -0
- package/lib/es/navigation/navigation.scss +16 -0
- package/lib/es/navigation/variables.scss +3 -2
- package/lib/es/notification/animation.scss +12 -0
- package/lib/es/notification/notification.css +156 -0
- package/lib/es/notification/notification.scss +183 -1
- package/lib/es/notification/notificationFoundation.d.ts +1 -2
- package/lib/es/popover/animation.scss +7 -0
- package/lib/es/popover/popover.css +27 -0
- package/lib/es/popover/popover.scss +38 -2
- package/lib/es/scrollList/scrollList.css +1 -0
- package/lib/es/scrollList/scrollList.scss +1 -0
- package/lib/es/select/foundation.d.ts +1 -0
- package/lib/es/select/foundation.js +12 -0
- package/lib/es/sideSheet/animation.scss +14 -6
- package/lib/es/sideSheet/sideSheet.css +110 -2
- package/lib/es/sideSheet/sideSheet.scss +140 -5
- package/lib/es/sideSheet/sideSheetFoundation.d.ts +8 -6
- package/lib/es/sideSheet/sideSheetFoundation.js +10 -49
- package/lib/es/skeleton/animation.scss +3 -0
- package/lib/es/skeleton/skeleton.css +1 -1
- package/lib/es/skeleton/skeleton.scss +2 -1
- package/lib/es/spin/animation.scss +2 -0
- package/lib/es/spin/spin.css +9 -9
- package/lib/es/spin/spin.scss +14 -6
- package/lib/es/spin/variables.scss +1 -7
- package/lib/es/table/table.css +8 -0
- package/lib/es/table/table.scss +10 -0
- package/lib/es/tabs/animation.scss +28 -15
- package/lib/es/tabs/constants.d.ts +4 -0
- package/lib/es/tabs/constants.js +5 -1
- package/lib/es/tabs/tabs.css +52 -0
- package/lib/es/tabs/tabs.scss +60 -0
- package/lib/es/timePicker/timePicker.css +9 -0
- package/lib/es/timePicker/timePicker.scss +12 -0
- package/lib/es/toast/animation.scss +11 -0
- package/lib/es/toast/toast.css +24 -0
- package/lib/es/toast/toast.scss +30 -1
- package/lib/es/toast/toastFoundation.d.ts +1 -2
- package/lib/es/tooltip/animation.scss +7 -0
- package/lib/es/tooltip/foundation.d.ts +4 -7
- package/lib/es/tooltip/foundation.js +11 -30
- package/lib/es/tooltip/tooltip.css +6 -0
- package/lib/es/tooltip/tooltip.scss +13 -1
- package/lib/es/treeSelect/foundation.d.ts +2 -0
- package/lib/es/typography/constants.d.ts +2 -0
- package/lib/es/typography/constants.js +3 -1
- package/lib/es/typography/formatNumeral.d.ts +18 -0
- package/lib/es/typography/formatNumeral.js +104 -0
- package/lib/es/utils/uuid.js +4 -1
- package/modal/animation.scss +26 -0
- package/modal/modal.scss +51 -47
- package/modal/modalContentFoundation.ts +6 -4
- package/modal/modalFoundation.ts +16 -10
- package/navigation/foundation.ts +6 -6
- package/navigation/itemFoundation.ts +9 -3
- package/navigation/navigation.scss +16 -0
- package/navigation/subNavFoundation.ts +4 -4
- package/navigation/variables.scss +3 -2
- package/notification/animation.scss +12 -0
- package/notification/notification.scss +183 -1
- package/notification/notificationFoundation.ts +4 -5
- package/notification/notificationListFoundation.ts +3 -3
- package/overflowList/foundation.ts +1 -1
- package/package.json +2 -2
- package/pagination/foundation.ts +2 -2
- package/popconfirm/popconfirmFoundation.ts +1 -1
- package/popover/animation.scss +7 -0
- package/popover/popover.scss +38 -2
- package/progress/generates.ts +3 -3
- package/radio/radioFoundation.ts +1 -1
- package/radio/radioGroupFoundation.ts +1 -1
- package/radio/radioInnerFoundation.ts +3 -3
- package/rating/foundation.ts +2 -2
- package/scrollList/itemFoundation.ts +2 -2
- package/scrollList/scrollList.scss +1 -0
- package/select/foundation.ts +10 -2
- package/select/optionFoundation.ts +2 -2
- package/sideSheet/animation.scss +14 -6
- package/sideSheet/sideSheet.scss +140 -5
- package/sideSheet/sideSheetFoundation.ts +20 -44
- package/skeleton/animation.scss +3 -0
- package/skeleton/skeleton.scss +2 -1
- package/slider/foundation.ts +7 -7
- package/spin/animation.scss +2 -0
- package/spin/foundation.ts +1 -1
- package/spin/spin.scss +14 -6
- package/spin/variables.scss +1 -7
- package/switch/foundation.ts +1 -1
- package/table/bodyFoundation.ts +3 -3
- package/table/cellFoundation.ts +1 -1
- package/table/foundation.ts +11 -11
- package/table/table.scss +10 -0
- package/table/tableRowFoundation.ts +1 -1
- package/table/tableSelectionCellFoundation.ts +3 -3
- package/table/utils.ts +3 -3
- package/tabs/animation.scss +28 -15
- package/tabs/constants.ts +4 -0
- package/tabs/foundation.ts +1 -1
- package/tabs/tabs.scss +60 -0
- package/tagInput/foundation.ts +2 -2
- package/timePicker/foundation.ts +1 -1
- package/timePicker/inputFoundation.ts +1 -1
- package/timePicker/timePicker.scss +12 -0
- package/toast/animation.scss +11 -0
- package/toast/toast.scss +30 -1
- package/toast/toastFoundation.ts +4 -5
- package/toast/toastListFoundation.ts +2 -2
- package/tooltip/animation.scss +7 -0
- package/tooltip/foundation.ts +14 -26
- package/tooltip/tooltip.scss +13 -1
- package/transfer/foundation.ts +5 -5
- package/tree/foundation.ts +19 -19
- package/tree/treeUtil.ts +3 -3
- package/treeSelect/foundation.ts +8 -6
- package/typography/constants.ts +4 -5
- package/typography/formatNumeral.ts +125 -0
- package/upload/foundation.ts +6 -6
- package/utils/FocusHandle.ts +3 -3
- package/utils/getHighlight.ts +2 -2
- package/utils/getMotionObjFromProps.ts +1 -1
- package/utils/type.ts +4 -4
- package/utils/uuid.ts +6 -5
package/anchor/foundation.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface AnchorAdapter<P = Record<string, any>, S = Record<string, any>>
|
|
|
21
21
|
getContentNode: (selector: string) => HTMLElement;
|
|
22
22
|
notifyChange: (currentLink: string, previousLink: string) => void;
|
|
23
23
|
notifyClick: (e: any, link: string) => void;
|
|
24
|
-
canSmoothScroll: () => boolean
|
|
24
|
+
canSmoothScroll: () => boolean
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export default class AnchorFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<AnchorAdapter<P, S>, P, S> {
|
package/anchor/linkFoundation.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { AnchorAdapter } from './foundation';
|
|
|
3
3
|
|
|
4
4
|
export interface LinkAdapter extends DefaultAdapter {
|
|
5
5
|
addLink: AnchorAdapter['addLink'];
|
|
6
|
-
removeLink: AnchorAdapter['removeLink']
|
|
6
|
+
removeLink: AnchorAdapter['removeLink']
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export default class LinkFoundation extends BaseFoundation<LinkAdapter> {
|
|
@@ -8,18 +8,18 @@ interface KeyboardAdapter<P = Record<string, any>, S = Record<string, any>> exte
|
|
|
8
8
|
registerKeyDown: (callback: (event: any) => void) => void;
|
|
9
9
|
unregisterKeyDown: (callback: (event: any) => void) => void;
|
|
10
10
|
updateFocusIndex: (focusIndex: number) => void;
|
|
11
|
-
notifyKeyDown: (e: any) => void
|
|
11
|
+
notifyKeyDown: (e: any) => void
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export interface DataItem {
|
|
15
15
|
[x: string]: any;
|
|
16
16
|
value?: string | number;
|
|
17
|
-
label?: any
|
|
17
|
+
label?: any // reactNode
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export interface StateOptionItem extends DataItem {
|
|
21
21
|
show?: boolean;
|
|
22
|
-
key?: string | number
|
|
22
|
+
key?: string | number
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export type AutoCompleteData = Array<DataItem | string>;
|
|
@@ -39,7 +39,7 @@ export interface AutoCompleteAdapter<P = Record<string, any>, S = Record<string,
|
|
|
39
39
|
notifyFocus: (event?: any) => void;
|
|
40
40
|
notifyBlur: (event?: any) => void;
|
|
41
41
|
rePositionDropdown: () => void;
|
|
42
|
-
persistEvent: (event: any) => void
|
|
42
|
+
persistEvent: (event: any) => void
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
class AutoCompleteFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<AutoCompleteAdapter<P, S>, P, S> {
|
|
@@ -9,10 +9,10 @@ export interface BasicOptionProps {
|
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
showTick?: boolean;
|
|
11
11
|
className?: string;
|
|
12
|
-
style?: Record<string, any
|
|
12
|
+
style?: Record<string, any>
|
|
13
13
|
}
|
|
14
14
|
export interface OptionDefaultAdapter extends Partial<DefaultAdapter> {
|
|
15
|
-
notifyClick(option: BasicOptionProps): void
|
|
15
|
+
notifyClick(option: BasicOptionProps): void
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
|
package/avatar/foundation.ts
CHANGED
|
@@ -5,7 +5,7 @@ export interface AvatarAdapter<P = Record<string, any>, S = Record<string, any>>
|
|
|
5
5
|
notifyImgState(isImgExist: boolean): void;
|
|
6
6
|
notifyLeave(event: any): void;
|
|
7
7
|
notifyEnter(event: any): void;
|
|
8
|
-
setFocusVisible: (focusVisible: boolean) => void
|
|
8
|
+
setFocusVisible: (focusVisible: boolean) => void
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export default class AvatarFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<AvatarAdapter<P, S>, P, S> {
|
package/backtop/foundation.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface BackTopAdapter extends DefaultAdapter {
|
|
|
10
10
|
notifyClick: (e: BackTopClickEvent) => void;
|
|
11
11
|
targetIsWindow: (target: any) => boolean;
|
|
12
12
|
isWindowUndefined: () => boolean;
|
|
13
|
-
targetScrollToTop: (targetNode: any, scrollTop: number) => void
|
|
13
|
+
targetScrollToTop: (targetNode: any, scrollTop: number) => void
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export default class BackTopFoundation extends BaseFoundation<BackTopAdapter> {
|
package/banner/foundation.ts
CHANGED
|
@@ -2,7 +2,7 @@ import BaseFoundation, { DefaultAdapter } from '../base/foundation';
|
|
|
2
2
|
|
|
3
3
|
export interface BannerAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
|
|
4
4
|
setVisible: () => void;
|
|
5
|
-
notifyClose: (e: any) => void
|
|
5
|
+
notifyClose: (e: any) => void
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export default class BannerFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<BannerAdapter<P, S>, P, S> {
|
package/base/foundation.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface DefaultAdapter<P = Record<string, any>, S = Record<string, any>
|
|
|
21
21
|
getCaches(): any;
|
|
22
22
|
setCache(key: any, value: any): void;
|
|
23
23
|
stopPropagation(e: any): void;
|
|
24
|
-
persistEvent: (event: any) => void
|
|
24
|
+
persistEvent: (event: any) => void
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
class BaseFoundation<T extends Partial<DefaultAdapter<P, S>>, P = Record<string, any>, S = Record<string, any>> {
|
package/breadcrumb/foundation.ts
CHANGED
|
@@ -4,7 +4,7 @@ import isEnterPress from '../utils/isEnterPress';
|
|
|
4
4
|
import { BreadcrumbItemInfo, Route } from './itemFoundation';
|
|
5
5
|
export interface BreadcrumbAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
|
|
6
6
|
notifyClick: (itemInfo: BreadcrumbItemInfo, event: any) => void;
|
|
7
|
-
expandCollapsed: (clickEvent?: any) => void
|
|
7
|
+
expandCollapsed: (clickEvent?: any) => void
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export default class BreadcrumbFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<BreadcrumbAdapter<P, S>, P, S> {
|
|
@@ -4,7 +4,7 @@ export interface BreadcrumbItemInfo {
|
|
|
4
4
|
name?: any; // maybe reactNode, string, number
|
|
5
5
|
href?: string;
|
|
6
6
|
icon?: any;
|
|
7
|
-
path?: string
|
|
7
|
+
path?: string
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export interface Route {
|
|
@@ -12,12 +12,12 @@ export interface Route {
|
|
|
12
12
|
path?: string;
|
|
13
13
|
href?: string;
|
|
14
14
|
name?: string;
|
|
15
|
-
icon?: any
|
|
15
|
+
icon?: any
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export interface BreadcrumbItemAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
|
|
19
19
|
notifyClick: (item: BreadcrumbItemInfo, e: any) => void;
|
|
20
|
-
notifyParent: (item: BreadcrumbItemInfo, e: any) => void
|
|
20
|
+
notifyParent: (item: BreadcrumbItemInfo, e: any) => void
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export default class BreadcrumbItemFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<BreadcrumbItemAdapter<P, S>, P, S> {
|
package/calendar/eventUtil.ts
CHANGED
package/calendar/foundation.ts
CHANGED
|
@@ -43,38 +43,38 @@ export interface EventObject {
|
|
|
43
43
|
start?: Date;
|
|
44
44
|
end?: Date;
|
|
45
45
|
// children?: React.ReactNode;
|
|
46
|
-
children?: any
|
|
46
|
+
children?: any
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export interface ParsedEventsWithArray {
|
|
50
50
|
day: Array<any>;
|
|
51
|
-
allDay: Array<any
|
|
51
|
+
allDay: Array<any>
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export interface ParsedEvents {
|
|
55
55
|
day?: Map<string, Array<EventObject>>;
|
|
56
|
-
allDay?: Map<string, Array<EventObject
|
|
56
|
+
allDay?: Map<string, Array<EventObject>>
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
export interface ParsedRangeEvent extends EventObject {
|
|
60
60
|
leftPos?: number;
|
|
61
61
|
width?: number;
|
|
62
|
-
topInd?: number
|
|
62
|
+
topInd?: number
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
export interface MonthlyEvent {
|
|
66
66
|
day: ParsedRangeEvent[][];
|
|
67
|
-
display: ParsedRangeEvent[]
|
|
67
|
+
display: ParsedRangeEvent[]
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
export interface RangeData {
|
|
71
71
|
month: string;
|
|
72
|
-
week: any[]
|
|
72
|
+
week: any[]
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
export interface WeeklyData {
|
|
76
76
|
month: string;
|
|
77
|
-
week: DateObj[]
|
|
77
|
+
week: DateObj[]
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
export type MonthData = Record<number, DateObj[]>;
|
|
@@ -103,7 +103,7 @@ export interface CalendarAdapter<P = Record<string, any>, S = Record<string, any
|
|
|
103
103
|
getMonthlyData?: () => MonthData;
|
|
104
104
|
notifyClose?: (e: any, key: string) => void;
|
|
105
105
|
openCard?: (key: string, spacing: boolean) => void;
|
|
106
|
-
setItemLimit?: (itemLimit: number) => void
|
|
106
|
+
setItemLimit?: (itemLimit: number) => void
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
export default class CalendarFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<CalendarAdapter<P, S>, P, S> {
|
package/card/variables.scss
CHANGED
|
@@ -16,7 +16,7 @@ $font-card_title-fontSize: $font-size-header-6; // 卡片文字大小 - 标题
|
|
|
16
16
|
|
|
17
17
|
$radius-card: var(--semi-border-radius-medium); // 卡片圆角
|
|
18
18
|
|
|
19
|
-
$motion-card-transition_duration:
|
|
19
|
+
$motion-card-transition_duration: 300ms; // 卡片悬浮动画时长
|
|
20
20
|
|
|
21
21
|
$width-card-border: $border-thickness-control; // 卡片描边宽度
|
|
22
22
|
|
package/cascader/foundation.ts
CHANGED
|
@@ -24,11 +24,11 @@ export interface BasicData {
|
|
|
24
24
|
data: BasicCascaderData;
|
|
25
25
|
disabled: boolean;
|
|
26
26
|
key: string;
|
|
27
|
-
searchText: any[]
|
|
27
|
+
searchText: any[]
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export interface BasicEntities {
|
|
31
|
-
[idx: string]: BasicEntity
|
|
31
|
+
[idx: string]: BasicEntity
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export interface BasicEntity {
|
|
@@ -50,7 +50,7 @@ export interface BasicEntity {
|
|
|
50
50
|
/* key path */
|
|
51
51
|
path: Array<string>;
|
|
52
52
|
/* value path */
|
|
53
|
-
valuePath: Array<string
|
|
53
|
+
valuePath: Array<string>
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
export interface BasicCascaderData {
|
|
@@ -60,7 +60,7 @@ export interface BasicCascaderData {
|
|
|
60
60
|
disabled?: boolean;
|
|
61
61
|
isLeaf?: boolean;
|
|
62
62
|
loading?: boolean;
|
|
63
|
-
children?: BasicCascaderData[]
|
|
63
|
+
children?: BasicCascaderData[]
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
export type CascaderType = 'large' | 'small' | 'default';
|
|
@@ -92,12 +92,12 @@ export interface BasicTriggerRenderProps {
|
|
|
92
92
|
* with Cascader. */
|
|
93
93
|
onChange: (inputValue: string) => void;
|
|
94
94
|
/* Function to clear the value */
|
|
95
|
-
onClear: (e: any) => void
|
|
95
|
+
onClear: (e: any) => void
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
export interface BasicScrollPanelProps {
|
|
99
99
|
panelIndex: number;
|
|
100
|
-
activeNode: BasicCascaderData
|
|
100
|
+
activeNode: BasicCascaderData
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
export interface BasicCascaderProps {
|
|
@@ -114,7 +114,7 @@ export interface BasicCascaderProps {
|
|
|
114
114
|
dropdownStyle?: any;
|
|
115
115
|
emptyContent?: any;
|
|
116
116
|
filterLeafOnly?: boolean;
|
|
117
|
-
motion?:
|
|
117
|
+
motion?: boolean;
|
|
118
118
|
filterTreeNode?: ((inputValue: string, treeNodeString: string) => boolean) | boolean;
|
|
119
119
|
placeholder?: string;
|
|
120
120
|
searchPlaceholder?: string;
|
|
@@ -159,7 +159,7 @@ export interface BasicCascaderProps {
|
|
|
159
159
|
onExceed?: (checkedItem: BasicEntity[]) => void;
|
|
160
160
|
displayRender?: (selected: Array<string> | BasicEntity, idx?: number) => any;
|
|
161
161
|
onBlur?: (e: any) => void;
|
|
162
|
-
onFocus?: (e: any) => void
|
|
162
|
+
onFocus?: (e: any) => void
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
export interface BasicCascaderInnerData {
|
|
@@ -184,7 +184,7 @@ export interface BasicCascaderInnerData {
|
|
|
184
184
|
isFocus?: boolean;
|
|
185
185
|
isInput?: boolean;
|
|
186
186
|
disabledKeys?: Set<string>;
|
|
187
|
-
showInput?: boolean
|
|
187
|
+
showInput?: boolean
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
export interface CascaderAdapter extends DefaultAdapter<BasicCascaderProps, BasicCascaderInnerData> {
|
|
@@ -211,7 +211,7 @@ export interface CascaderAdapter extends DefaultAdapter<BasicCascaderProps, Basi
|
|
|
211
211
|
notifyListScroll: (e: any, panel: BasicScrollPanelProps) => void;
|
|
212
212
|
notifyOnExceed: (data: BasicEntity[]) => void;
|
|
213
213
|
toggleInputShow: (show: boolean, cb: () => void) => void;
|
|
214
|
-
updateFocusState: (focus: boolean) => void
|
|
214
|
+
updateFocusState: (focus: boolean) => void
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
// eslint-disable-next-line max-len
|
|
@@ -522,7 +522,7 @@ export default class CascaderFoundation extends BaseFoundation<CascaderAdapter,
|
|
|
522
522
|
this._adapter.notifyDropdownVisibleChange(false);
|
|
523
523
|
this._adapter.unregisterClickOutsideHandler();
|
|
524
524
|
if (this._isFilterable()) {
|
|
525
|
-
const { selectedKeys } = this.getStates();
|
|
525
|
+
const { selectedKeys, isSearching } = this.getStates();
|
|
526
526
|
let inputValue = '';
|
|
527
527
|
if (key && !multiple) {
|
|
528
528
|
inputValue = this.renderDisplayText(key);
|
|
@@ -549,27 +549,10 @@ export default class CascaderFoundation extends BaseFoundation<CascaderAdapter,
|
|
|
549
549
|
this._adapter.updateFocusState(true);
|
|
550
550
|
}
|
|
551
551
|
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
const mergedMotion =
|
|
557
|
-
typeof motion === 'undefined' || motion ?
|
|
558
|
-
{
|
|
559
|
-
...motion,
|
|
560
|
-
didLeave: (...args: any) => {
|
|
561
|
-
const didLeave = get(motion, 'didLeave');
|
|
562
|
-
if (typeof didLeave === 'function') {
|
|
563
|
-
didLeave(...args);
|
|
564
|
-
}
|
|
565
|
-
this._adapter.updateStates({ isSearching: false });
|
|
566
|
-
},
|
|
567
|
-
} :
|
|
568
|
-
false;
|
|
569
|
-
return mergedMotion;
|
|
570
|
-
}
|
|
571
|
-
return motion;
|
|
572
|
-
};
|
|
552
|
+
|
|
553
|
+
updateSearching = (isSearching:boolean)=>{
|
|
554
|
+
this._adapter.updateStates({ isSearching: false });
|
|
555
|
+
}
|
|
573
556
|
|
|
574
557
|
handleItemClick(e: any, item: BasicEntity | BasicData) {
|
|
575
558
|
const isDisabled = this._isDisabled();
|
|
@@ -4,13 +4,13 @@ import warning from '../utils/warning';
|
|
|
4
4
|
|
|
5
5
|
export interface BasicTargetObject {
|
|
6
6
|
[x: string]: any;
|
|
7
|
-
checked?: boolean
|
|
7
|
+
checked?: boolean
|
|
8
8
|
}
|
|
9
9
|
export interface BasicCheckboxEvent {
|
|
10
10
|
target: BasicTargetObject;
|
|
11
11
|
stopPropagation: () => void;
|
|
12
12
|
preventDefault: () => void;
|
|
13
|
-
[x: string]: any
|
|
13
|
+
[x: string]: any
|
|
14
14
|
// nativeEvent: {
|
|
15
15
|
// stopImmediatePropagation: () => void;
|
|
16
16
|
// }
|
|
@@ -27,7 +27,7 @@ export interface CheckboxAdapter<P = Record<string, any>, S = Record<string, any
|
|
|
27
27
|
setExtraId: () => void;
|
|
28
28
|
setFocusVisible: (focusVisible: boolean) => void;
|
|
29
29
|
focusCheckboxEntity: () => void;
|
|
30
|
-
generateEvent: (checked: boolean, e: any) => any
|
|
30
|
+
generateEvent: (checked: boolean, e: any) => any // 1.modify checked value 2.add nativeEvent on react adapter
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
class CheckboxFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<CheckboxAdapter<P, S>, P, S> {
|
|
@@ -148,7 +148,7 @@ export interface BaseCheckboxProps {
|
|
|
148
148
|
extra?: any;
|
|
149
149
|
addonId?: string;
|
|
150
150
|
extraId?: string;
|
|
151
|
-
preventScroll?: boolean
|
|
151
|
+
preventScroll?: boolean
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
export default CheckboxFoundation;
|
|
@@ -4,7 +4,7 @@ import { BasicCheckboxEvent } from './checkboxFoundation';
|
|
|
4
4
|
|
|
5
5
|
export interface CheckboxGroupAdapter extends DefaultAdapter{
|
|
6
6
|
updateGroupValue: (value: any[]) => void;
|
|
7
|
-
notifyChange: (value: any[]) => void
|
|
7
|
+
notifyChange: (value: any[]) => void
|
|
8
8
|
}
|
|
9
9
|
class CheckboxGroupFoundation extends BaseFoundation<CheckboxGroupAdapter> {
|
|
10
10
|
static get checkboxGroupDefaultAdapter() {
|
package/collapse/foundation.ts
CHANGED
|
@@ -13,20 +13,20 @@ export interface CollapseProps{
|
|
|
13
13
|
style?: any;
|
|
14
14
|
className?: string;
|
|
15
15
|
keepDOM?: boolean;
|
|
16
|
-
motion?:
|
|
17
|
-
expandIconPosition?: 'left' | 'right'
|
|
16
|
+
motion?: boolean;
|
|
17
|
+
expandIconPosition?: 'left' | 'right'
|
|
18
18
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export interface CollapseState{
|
|
22
|
-
activeSet: Set<string
|
|
22
|
+
activeSet: Set<string>
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export interface CollapseAdapter extends DefaultAdapter<CollapseProps, CollapseState>{
|
|
26
26
|
handleChange: (activeKey: CollapseProps['activeKey'], e: any) => void;
|
|
27
27
|
// getStates: () => CollapseState;
|
|
28
28
|
// getProps: () => CollapseProps;
|
|
29
|
-
addActiveKey: (newSet: CollapseState['activeSet']) => void
|
|
29
|
+
addActiveKey: (newSet: CollapseState['activeSet']) => void
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export default class CollapseFoundation extends BaseFoundation<CollapseAdapter> {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
$transition_duration-collapsible-height: 250ms;//折叠-高度-动画持续时间
|
|
2
|
+
$transition_function-collapsible-height: cubic-bezier(0.25,0.1,0.25,1);//折叠-高度-过渡曲线
|
|
3
|
+
$transition_delay-collapsible-height: var(--semi-transition_delay-fastest);//折叠-高度-延迟时间
|
|
4
|
+
|
|
5
|
+
$transition_duration-collapsible-opacity: 250ms;//折叠-透明度-动画持续时间
|
|
6
|
+
$transition_function-collapsible-opacity: var(--semi-transition_function-easeIn);//折叠-透明度-过渡曲线
|
|
7
|
+
$transition_delay-collapsible-opacity: var(--semi-transition_delay-fastest);//折叠-透明度-延迟时间
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@import "./animation.scss";
|
|
2
|
+
@import "./variables.scss";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
$module: #{$prefix}-collapsible;
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
.#{$module}-transition{
|
|
9
|
+
transition: height $transition_duration-collapsible-height $transition_function-collapsible-height $transition_delay-collapsible-height,
|
|
10
|
+
opacity $transition_duration-collapsible-opacity $transition_function-collapsible-opacity $transition_delay-collapsible-opacity,
|
|
11
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import BaseFoundation, { DefaultAdapter } from "../base/foundation";
|
|
2
|
+
|
|
3
|
+
export interface CollapsibleFoundationProps {
|
|
4
|
+
isOpen?: boolean;
|
|
5
|
+
duration?: number;
|
|
6
|
+
keepDOM?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
collapseHeight?: number;
|
|
9
|
+
reCalcKey?: number | string;
|
|
10
|
+
id?: string;
|
|
11
|
+
fade?: boolean
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface CollapsibleFoundationState {
|
|
15
|
+
domInRenderTree: boolean;
|
|
16
|
+
domHeight: number;
|
|
17
|
+
visible: boolean;
|
|
18
|
+
isTransitioning: boolean
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
export interface CollapsibleAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
|
|
24
|
+
setDOMInRenderTree: (isInRenderTree: boolean) => void;
|
|
25
|
+
setDOMHeight: (domHeight: number) => void;
|
|
26
|
+
setVisible: (visible: boolean) => void;
|
|
27
|
+
setIsTransitioning: (isTransitioning: boolean) => void
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
class CollapsibleFoundation extends BaseFoundation<CollapsibleAdapter<CollapsibleFoundationProps, CollapsibleFoundationState>, CollapsibleFoundationProps, CollapsibleFoundationState> {
|
|
31
|
+
|
|
32
|
+
constructor(adapter: CollapsibleAdapter<CollapsibleFoundationProps, CollapsibleFoundationState>) {
|
|
33
|
+
super({
|
|
34
|
+
...adapter
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
updateDOMInRenderTree = (isInRenderTree) => {
|
|
40
|
+
this._adapter.setDOMInRenderTree(isInRenderTree);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
updateDOMHeight = (domHeight: number) => {
|
|
44
|
+
this._adapter.setDOMHeight(domHeight);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
updateVisible = (visible: boolean) => {
|
|
48
|
+
this._adapter.setVisible(visible);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
updateIsTransitioning = (isTransitioning: boolean) => {
|
|
52
|
+
this._adapter.setIsTransitioning(isTransitioning);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
export default CollapsibleFoundation;
|
|
File without changes
|
|
@@ -16,7 +16,7 @@ import { getDefaultFormatTokenByType } from './getDefaultFormatToken';
|
|
|
16
16
|
* 'yyyy-MM-dd HH:mm' => 'yyyy-MM-dd HH:mm'
|
|
17
17
|
* 'Pp' => 'yyyy-MM-dd'
|
|
18
18
|
*/
|
|
19
|
-
export default function getInsetInputFormatToken(options: { format: string
|
|
19
|
+
export default function getInsetInputFormatToken(options: { format: string; type: typeof strings.TYPE_SET[number] }) {
|
|
20
20
|
const { format, type } = options;
|
|
21
21
|
const dateReg = /([yMd]{0,4}[^a-z\s]*[yMd]{0,4}[^a-z\s]*[yMd]{0,4})/i;
|
|
22
22
|
const dateTimeReg = /([yMd]{0,4}[^a-z\s]*[yMd]{0,4}[^a-z\s]*[yMd]{0,4}) (H{0,2}[^a-z\s]*m{0,2}[^a-z\s]*s{0,2})/i;
|
|
@@ -16,7 +16,7 @@ import { strings } from '../constants';
|
|
|
16
16
|
* ' ~ 2022-02-15 00:00:00' => { monthLeft: { dateInput: '', timeInput: '' }, monthRight: { dateInput: '2022-02-15', timeInput: '00:00:00' } }
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
export default function getInsetInputValueFromInsetInputStr(options: { inputValue: string; rangeSeparator: string
|
|
19
|
+
export default function getInsetInputValueFromInsetInputStr(options: { inputValue: string; rangeSeparator: string; type: typeof strings.TYPE_SET[number] }) {
|
|
20
20
|
const timeSeparator = ' ';
|
|
21
21
|
const { inputValue = '', rangeSeparator, type } = options;
|
|
22
22
|
let leftDateInput, leftTimeInput, rightDateInput, rightTimeInput;
|
|
@@ -2,12 +2,26 @@
|
|
|
2
2
|
@import "./variables.scss";
|
|
3
3
|
|
|
4
4
|
$module: #{$prefix}-datepicker;
|
|
5
|
+
$module-list: #{$prefix}-scrolllist;
|
|
5
6
|
|
|
6
7
|
.#{$module} {
|
|
7
8
|
box-sizing: border-box;
|
|
8
9
|
display: inline-block;
|
|
9
10
|
vertical-align: top;
|
|
10
11
|
|
|
12
|
+
.#{$module-list}-body {
|
|
13
|
+
.#{$module-list}-item {
|
|
14
|
+
-ms-overflow-style: none; /* Internet Explorer 10+ */
|
|
15
|
+
scrollbar-width: none; /* Firefox */
|
|
16
|
+
|
|
17
|
+
&::-webkit-scrollbar {
|
|
18
|
+
display: none;
|
|
19
|
+
width: 0;
|
|
20
|
+
height: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
11
25
|
// 双月网格
|
|
12
26
|
|
|
13
27
|
&-month-grid {
|