@douyinfe/semi-foundation 2.1.0-beta.2 → 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.
Files changed (38) hide show
  1. package/calendar/foundation.ts +3 -1
  2. package/cascader/foundation.ts +1 -1
  3. package/collapse/foundation.ts +1 -1
  4. package/lib/es/calendar/foundation.d.ts +2 -1
  5. package/lib/es/cascader/foundation.d.ts +1 -1
  6. package/lib/es/collapse/foundation.d.ts +1 -1
  7. package/lib/es/pagination/foundation.d.ts +2 -2
  8. package/lib/es/popconfirm/popconfirmFoundation.d.ts +2 -0
  9. package/lib/es/popconfirm/popconfirmFoundation.js +4 -0
  10. package/lib/es/scrollList/itemFoundation.d.ts +3 -3
  11. package/lib/es/select/foundation.d.ts +2 -1
  12. package/lib/es/select/foundation.js +10 -5
  13. package/lib/es/table/utils.d.ts +1 -1
  14. package/lib/es/tabs/foundation.d.ts +3 -0
  15. package/lib/es/tabs/foundation.js +4 -8
  16. package/lib/es/tabs/tabs.css +13 -1
  17. package/lib/es/tabs/tabs.scss +96 -76
  18. package/lib/es/tagInput/foundation.d.ts +1 -0
  19. package/lib/es/tagInput/foundation.js +2 -0
  20. package/lib/es/tooltip/foundation.js +5 -2
  21. package/lib/es/tree/foundation.d.ts +1 -1
  22. package/lib/es/tree/treeUtil.js +10 -7
  23. package/lib/es/treeSelect/foundation.d.ts +10 -12
  24. package/lib/es/utils/log.js +3 -1
  25. package/package.json +3 -3
  26. package/pagination/foundation.ts +2 -2
  27. package/popconfirm/popconfirmFoundation.ts +5 -0
  28. package/scrollList/itemFoundation.ts +3 -3
  29. package/select/foundation.ts +10 -8
  30. package/table/utils.ts +1 -1
  31. package/tabs/foundation.ts +7 -8
  32. package/tabs/tabs.scss +96 -76
  33. package/tagInput/foundation.ts +2 -0
  34. package/tooltip/foundation.ts +4 -2
  35. package/tree/foundation.ts +1 -1
  36. package/tree/treeUtil.ts +1 -1
  37. package/treeSelect/foundation.ts +11 -10
  38. package/utils/log.ts +3 -1
@@ -29,14 +29,15 @@ export type ValidateStatus = 'error' | 'warning' | 'default';
29
29
 
30
30
  export type Size = 'small' | 'large' | 'default';
31
31
 
32
- export interface BasicRenderSelectedItem {
33
- (treeNode: BasicTreeNodeData): any;
34
- (treeNode: BasicTreeNodeData, otherProps: { index: number | string; onClose: (tagContent: any, e: any) => void }):
35
- {
36
- isRenderInTag: boolean;
37
- content: any;
38
- };
39
- }
32
+ export type BasicRenderSelectedItemInMultiple = (
33
+ treeNode: BasicTreeNodeData,
34
+ otherProps: { index: number | string; onClose: (tagContent: any, e: any) => void }
35
+ )=> {
36
+ isRenderInTag: boolean;
37
+ content: any;
38
+ };
39
+ export type BasicRenderSelectedItemInSingle = (treeNode: BasicTreeNodeData) => any;
40
+ export type BasicRenderSelectedItem = BasicRenderSelectedItemInSingle | BasicRenderSelectedItemInMultiple;
40
41
 
41
42
  export interface BasicTriggerRenderProps {
42
43
  [x: string]: any;
@@ -127,7 +128,7 @@ export interface BasicTreeSelectProps extends Pick<BasicTreeProps,
127
128
  searchRender?: (inputProps: any) => any;
128
129
  renderSelectedItem?: BasicRenderSelectedItem;
129
130
  getPopupContainer?: () => HTMLElement;
130
- triggerRender?: (props: BasicTriggerRenderProps) => any;
131
+ // triggerRender?: (props: BasicTriggerRenderProps) => any;
131
132
  onBlur?: (e: any) => void;
132
133
  onChange?: BasicOnChange;
133
134
  onFocus?: (e: any) => void;
@@ -178,7 +179,7 @@ export interface TreeSelectAdapter<P = Record<string, any>, S = Record<string, a
178
179
  setOptionWrapperWidth: (width: null | number) => void;
179
180
  notifyChange: BasicOnChangeWithBasic;
180
181
  notifyChangeWithObject: BasicOnChangeWithObject;
181
- notifyExpand: (expandedKeys: Set<string>, expanedOtherProps: BasicExpandedOtherProps) => void;
182
+ notifyExpand: (expandedKeys: Set<string>, expandedOtherProps: BasicExpandedOtherProps) => void;
182
183
  notifyFocus: (e: any) => void;
183
184
  notifyBlur: (e: any) => void;
184
185
  toggleHovering: (bool: boolean) => void;
package/utils/log.ts CHANGED
@@ -1,5 +1,7 @@
1
+ import { get } from 'lodash-es';
2
+
1
3
  const log = (text: any, ...rest: any[]) => {
2
- if (process.env.NODE_ENV === 'development') {
4
+ if (get(process, 'env.NODE_ENV') === 'development') {
3
5
  console.log(text, ...rest);
4
6
  }
5
7
  };