@douyinfe/semi-ui 2.56.0-alpha.0 → 2.56.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.
Files changed (85) hide show
  1. package/dist/css/semi.css +41 -9
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +76 -47
  4. package/dist/umd/semi-ui.js.map +1 -1
  5. package/dist/umd/semi-ui.min.js +1 -1
  6. package/dist/umd/semi-ui.min.js.map +1 -1
  7. package/lib/cjs/_base/base.css +5 -7
  8. package/lib/cjs/anchor/index.d.ts +1 -1
  9. package/lib/cjs/autoComplete/index.d.ts +1 -1
  10. package/lib/cjs/autoComplete/index.js +2 -1
  11. package/lib/cjs/backtop/index.d.ts +1 -0
  12. package/lib/cjs/backtop/index.js +4 -1
  13. package/lib/cjs/button/Button.d.ts +1 -1
  14. package/lib/cjs/button/buttonGroup.d.ts +1 -1
  15. package/lib/cjs/button/index.d.ts +1 -1
  16. package/lib/cjs/calendar/monthCalendar.js +3 -1
  17. package/lib/cjs/cascader/index.js +8 -4
  18. package/lib/cjs/datePicker/datePicker.d.ts +1 -1
  19. package/lib/cjs/datePicker/datePicker.js +5 -9
  20. package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
  21. package/lib/cjs/form/baseForm.d.ts +2 -2
  22. package/lib/cjs/form/field.d.ts +2 -2
  23. package/lib/cjs/input/index.d.ts +1 -1
  24. package/lib/cjs/input/inputGroup.d.ts +1 -1
  25. package/lib/cjs/locale/source/ro.d.ts +3 -170
  26. package/lib/cjs/locale/source/ro.js +5 -5
  27. package/lib/cjs/modal/confirm.d.ts +16 -16
  28. package/lib/cjs/radio/radio.d.ts +1 -1
  29. package/lib/cjs/radio/radioGroup.d.ts +1 -1
  30. package/lib/cjs/rating/index.d.ts +1 -1
  31. package/lib/cjs/rating/item.d.ts +1 -1
  32. package/lib/cjs/select/index.js +3 -3
  33. package/lib/cjs/switch/index.d.ts +1 -1
  34. package/lib/cjs/table/Table.d.ts +2 -2
  35. package/lib/cjs/table/index.d.ts +1 -1
  36. package/lib/cjs/tagInput/index.d.ts +1 -1
  37. package/lib/cjs/tagInput/index.js +2 -1
  38. package/lib/cjs/timePicker/TimePicker.d.ts +2 -1
  39. package/lib/cjs/timePicker/TimePicker.js +8 -8
  40. package/lib/cjs/timePicker/index.d.ts +1 -1
  41. package/lib/cjs/tooltip/index.js +4 -1
  42. package/lib/cjs/treeSelect/index.js +4 -3
  43. package/lib/cjs/typography/base.d.ts +8 -0
  44. package/lib/cjs/typography/base.js +28 -4
  45. package/lib/cjs/typography/title.d.ts +2 -2
  46. package/lib/es/_base/base.css +5 -7
  47. package/lib/es/anchor/index.d.ts +1 -1
  48. package/lib/es/autoComplete/index.d.ts +1 -1
  49. package/lib/es/autoComplete/index.js +2 -1
  50. package/lib/es/backtop/index.d.ts +1 -0
  51. package/lib/es/backtop/index.js +4 -1
  52. package/lib/es/button/Button.d.ts +1 -1
  53. package/lib/es/button/buttonGroup.d.ts +1 -1
  54. package/lib/es/button/index.d.ts +1 -1
  55. package/lib/es/calendar/monthCalendar.js +3 -1
  56. package/lib/es/cascader/index.js +8 -4
  57. package/lib/es/datePicker/datePicker.d.ts +1 -1
  58. package/lib/es/datePicker/datePicker.js +5 -9
  59. package/lib/es/datePicker/monthsGrid.d.ts +1 -1
  60. package/lib/es/form/baseForm.d.ts +2 -2
  61. package/lib/es/form/field.d.ts +2 -2
  62. package/lib/es/input/index.d.ts +1 -1
  63. package/lib/es/input/inputGroup.d.ts +1 -1
  64. package/lib/es/locale/source/ro.d.ts +3 -170
  65. package/lib/es/locale/source/ro.js +6 -6
  66. package/lib/es/modal/confirm.d.ts +16 -16
  67. package/lib/es/radio/radio.d.ts +1 -1
  68. package/lib/es/radio/radioGroup.d.ts +1 -1
  69. package/lib/es/rating/index.d.ts +1 -1
  70. package/lib/es/rating/item.d.ts +1 -1
  71. package/lib/es/select/index.js +3 -3
  72. package/lib/es/switch/index.d.ts +1 -1
  73. package/lib/es/table/Table.d.ts +2 -2
  74. package/lib/es/table/index.d.ts +1 -1
  75. package/lib/es/tagInput/index.d.ts +1 -1
  76. package/lib/es/tagInput/index.js +2 -1
  77. package/lib/es/timePicker/TimePicker.d.ts +2 -1
  78. package/lib/es/timePicker/TimePicker.js +8 -8
  79. package/lib/es/timePicker/index.d.ts +1 -1
  80. package/lib/es/tooltip/index.js +4 -1
  81. package/lib/es/treeSelect/index.js +4 -3
  82. package/lib/es/typography/base.d.ts +8 -0
  83. package/lib/es/typography/base.js +28 -4
  84. package/lib/es/typography/title.d.ts +2 -2
  85. package/package.json +8 -8
@@ -1,7 +1,7 @@
1
1
  /* shadow */
2
2
  /* sizing */
3
3
  /* spacing */
4
- body {
4
+ body, :host {
5
5
  --semi-transition_duration-slowest:0ms;
6
6
  --semi-transition_duration-slower:0ms;
7
7
  --semi-transition_duration-slow:0ms;
@@ -38,8 +38,7 @@ body {
38
38
  --semi-transform_rotate-anticlockwise360deg:rotate(-360deg);
39
39
  }
40
40
 
41
- body,
42
- body .semi-always-light {
41
+ body, body .semi-always-light, :host, :host .semi-always-light {
43
42
  --semi-amber-0: 254,251,235;
44
43
  --semi-amber-1: 252,245,206;
45
44
  --semi-amber-2: 249,232,158;
@@ -204,8 +203,7 @@ body .semi-always-light {
204
203
  --semi-yellow-9: 83,72,0;
205
204
  }
206
205
 
207
- body[theme-mode=dark],
208
- body .semi-always-dark {
206
+ body[theme-mode=dark], body .semi-always-dark, :host-context(body[theme-mode=dark]), :host .semi-always-dark {
209
207
  --semi-red-0: 108,9,11;
210
208
  --semi-red-1: 144,17,16;
211
209
  --semi-red-2: 180,32,25;
@@ -370,7 +368,7 @@ body .semi-always-dark {
370
368
  --semi-black: 0, 0, 0;
371
369
  }
372
370
 
373
- body, body[theme-mode=dark] .semi-always-light {
371
+ body, body[theme-mode=dark] .semi-always-light, :host, :host .semi-always-light {
374
372
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
375
373
  -webkit-font-smoothing: antialiased;
376
374
  --semi-color-white: rgba(var(--semi-white), 1);
@@ -480,7 +478,7 @@ body, body[theme-mode=dark] .semi-always-light {
480
478
  --semi-color-data-19: rgba(188, 198, 255, 1);
481
479
  }
482
480
 
483
- body[theme-mode=dark], body .semi-always-dark {
481
+ body[theme-mode=dark], body .semi-always-dark, :host-context(body[theme-mode=dark]), :host .semi-always-dark {
484
482
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
485
483
  -webkit-font-smoothing: antialiased;
486
484
  --semi-color-white: rgba(228, 231, 245, 1);
@@ -40,7 +40,7 @@ declare class Anchor extends BaseComponent<AnchorProps, AnchorState> {
40
40
  static contextType: React.Context<ContextValue>;
41
41
  static Link: typeof Link;
42
42
  static PropTypes: {
43
- size: PropTypes.Requireable<"small" | "default">;
43
+ size: PropTypes.Requireable<"default" | "small">;
44
44
  railTheme: PropTypes.Requireable<"primary" | "tertiary" | "muted">;
45
45
  className: PropTypes.Requireable<string>;
46
46
  style: PropTypes.Requireable<object>;
@@ -125,7 +125,7 @@ declare class AutoComplete<T extends AutoCompleteItems> extends BaseComponent<Au
125
125
  renderSelectedItem: PropTypes.Requireable<(...args: any[]) => any>;
126
126
  suffix: PropTypes.Requireable<PropTypes.ReactNodeLike>;
127
127
  showClear: PropTypes.Requireable<boolean>;
128
- size: PropTypes.Requireable<"small" | "default" | "large">;
128
+ size: PropTypes.Requireable<"default" | "small" | "large">;
129
129
  style: PropTypes.Requireable<object>;
130
130
  stopPropagation: PropTypes.Requireable<NonNullable<string | boolean>>;
131
131
  maxHeight: PropTypes.Requireable<NonNullable<string | number>>;
@@ -154,7 +154,8 @@ class AutoComplete extends _baseComponent.default {
154
154
  const triggerDom = this.triggerRef && this.triggerRef.current;
155
155
  const optionsDom = _reactDom.default.findDOMNode(optionInstance);
156
156
  const target = e.target;
157
- if (optionsDom && (!optionsDom.contains(target) || !optionsDom.contains(target.parentNode)) && triggerDom && !triggerDom.contains(target)) {
157
+ const path = e.composedPath && e.composedPath() || [target];
158
+ if (optionsDom && (!optionsDom.contains(target) || !optionsDom.contains(target.parentNode)) && triggerDom && !triggerDom.contains(target) && !(path.includes(triggerDom) || path.includes(optionsDom))) {
158
159
  cb(e);
159
160
  }
160
161
  };
@@ -26,6 +26,7 @@ export default class BackTop extends BaseComponent<BackTopProps, BackTopState> {
26
26
  style: PropTypes.Requireable<object>;
27
27
  className: PropTypes.Requireable<string>;
28
28
  };
29
+ handler: (e: React.MouseEvent<HTMLDivElement>) => void;
29
30
  constructor(props: BackTopProps);
30
31
  componentDidMount(): void;
31
32
  componentWillUnmount(): void;
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
+ var _throttle2 = _interopRequireDefault(require("lodash/throttle"));
7
8
  var _react = _interopRequireDefault(require("react"));
8
9
  var _baseComponent = _interopRequireDefault(require("../_base/baseComponent"));
9
10
  var _classnames = _interopRequireDefault(require("classnames"));
@@ -34,7 +35,9 @@ class BackTop extends _baseComponent.default {
34
35
  this.foundation = new _foundation.default(this.adapter);
35
36
  }
36
37
  componentDidMount() {
38
+ var _a;
37
39
  this.foundation.init();
40
+ this.handler = (0, _throttle2.default)(this.handleClick, (_a = this.props.duration) !== null && _a !== void 0 ? _a : BackTop.defaultProps.duration);
38
41
  }
39
42
  componentWillUnmount() {
40
43
  this.foundation.destroy();
@@ -92,7 +95,7 @@ class BackTop extends _baseComponent.default {
92
95
  _react.default.createElement("div", Object.assign({}, others, {
93
96
  className: preCls,
94
97
  style: style,
95
- onClick: e => this.handleClick(e),
98
+ onClick: e => this.handler(e),
96
99
  "x-semi-prop": "children"
97
100
  }), backtopBtn) : null;
98
101
  return content;
@@ -47,7 +47,7 @@ export default class Button extends PureComponent<ButtonProps> {
47
47
  disabled: PropTypes.Requireable<boolean>;
48
48
  prefixCls: PropTypes.Requireable<string>;
49
49
  style: PropTypes.Requireable<object>;
50
- size: PropTypes.Requireable<"small" | "default" | "large">;
50
+ size: PropTypes.Requireable<"default" | "small" | "large">;
51
51
  type: PropTypes.Requireable<"warning" | "primary" | "secondary" | "danger" | "tertiary">;
52
52
  block: PropTypes.Requireable<boolean>;
53
53
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -18,7 +18,7 @@ export default class ButtonGroup extends BaseComponent<ButtonGroupProps> {
18
18
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
19
19
  disabled: PropTypes.Requireable<boolean>;
20
20
  type: PropTypes.Requireable<string>;
21
- size: PropTypes.Requireable<"small" | "default" | "large">;
21
+ size: PropTypes.Requireable<"default" | "small" | "large">;
22
22
  theme: PropTypes.Requireable<"solid" | "light" | "borderless">;
23
23
  'aria-label': PropTypes.Requireable<string>;
24
24
  };
@@ -23,7 +23,7 @@ declare class Button extends React.PureComponent<ButtonProps> {
23
23
  onMouseEnter: import("prop-types").Requireable<(...args: any[]) => any>;
24
24
  onMouseLeave: import("prop-types").Requireable<(...args: any[]) => any>;
25
25
  disabled: import("prop-types").Requireable<boolean>;
26
- size: import("prop-types").Requireable<"small" | "default" | "large">;
26
+ size: import("prop-types").Requireable<"default" | "small" | "large">;
27
27
  type: import("prop-types").Requireable<"warning" | "primary" | "secondary" | "danger" | "tertiary">;
28
28
  block: import("prop-types").Requireable<boolean>;
29
29
  onClick: import("prop-types").Requireable<(...args: any[]) => any>;
@@ -287,7 +287,9 @@ class monthCalendar extends _baseComponent.default {
287
287
  const clickOutsideHandler = e => {
288
288
  const cardInstance = this.cardRef && this.cardRef.get(key);
289
289
  const cardDom = _reactDom.default.findDOMNode(cardInstance);
290
- if (cardDom && !cardDom.contains(e.target)) {
290
+ const target = e.target;
291
+ const path = e.composedPath && e.composedPath() || [target];
292
+ if (cardDom && !cardDom.contains(target) && !path.includes(cardDom)) {
291
293
  cb();
292
294
  }
293
295
  };
@@ -570,7 +570,8 @@ class Cascader extends _baseComponent.default {
570
570
  const triggerDom = this.triggerRef && this.triggerRef.current;
571
571
  const optionsDom = _reactDom.default.findDOMNode(optionInstance);
572
572
  const target = e.target;
573
- if (optionsDom && (!optionsDom.contains(target) || !optionsDom.contains(target.parentNode)) && triggerDom && !triggerDom.contains(target)) {
573
+ const path = e.composedPath && e.composedPath() || [target];
574
+ if (optionsDom && (!optionsDom.contains(target) || !optionsDom.contains(target.parentNode)) && triggerDom && !triggerDom.contains(target) && !(path.includes(triggerDom) || path.includes(optionsDom))) {
574
575
  cb(e);
575
576
  }
576
577
  };
@@ -740,9 +741,9 @@ class Cascader extends _baseComponent.default {
740
741
  }, []);
741
742
  return formatKeys;
742
743
  };
743
- const needUpdateTreeData = needUpdate('treeData') || needUpdateData();
744
- const needUpdateValue = needUpdate('value') || (0, _isEmpty2.default)(prevProps) && defaultValue;
745
744
  if (multiple) {
745
+ const needUpdateTreeData = needUpdate('treeData') || needUpdateData();
746
+ const needUpdateValue = needUpdate('value') || (0, _isEmpty2.default)(prevProps) && defaultValue;
746
747
  // when value and treedata need updated
747
748
  if (needUpdateTreeData || needUpdateValue) {
748
749
  // update state.keyEntities
@@ -790,8 +791,11 @@ class Cascader extends _baseComponent.default {
790
791
  this.foundation.destroy();
791
792
  }
792
793
  componentDidUpdate(prevProps) {
794
+ if (this.props.multiple) {
795
+ return;
796
+ }
793
797
  let isOptionsChanged = false;
794
- if (!(0, _isEqual2.default)(prevProps.treeData, this.props.treeData) && !this.props.multiple) {
798
+ if (!(0, _isEqual2.default)(prevProps.treeData, this.props.treeData)) {
795
799
  isOptionsChanged = true;
796
800
  this.foundation.collectOptions();
797
801
  }
@@ -59,7 +59,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
59
59
  'aria-required': PropTypes.Requireable<boolean>;
60
60
  borderless: PropTypes.Requireable<boolean>;
61
61
  type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
62
- size: PropTypes.Requireable<"small" | "default" | "large">;
62
+ size: PropTypes.Requireable<"default" | "small" | "large">;
63
63
  clearIcon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
64
64
  density: PropTypes.Requireable<"default" | "compact">;
65
65
  defaultValue: PropTypes.Requireable<NonNullable<string | number | object>>;
@@ -274,15 +274,11 @@ class DatePicker extends _baseComponent.default {
274
274
  this.clickOutSideHandler = e => {
275
275
  const triggerEl = this.triggerElRef && this.triggerElRef.current;
276
276
  const panelEl = this.panelRef && this.panelRef.current;
277
- const isInTrigger = triggerEl && triggerEl.contains(e.target);
278
- const isInPanel = panelEl && panelEl.contains(e.target);
279
- const clickOutSide = !isInTrigger && !isInPanel && this._mounted;
280
- if (this.adapter.needConfirm()) {
281
- clickOutSide && this.props.onClickOutSide();
282
- return;
283
- } else {
284
- if (clickOutSide) {
285
- this.props.onClickOutSide();
277
+ const target = e.target;
278
+ const path = e.composedPath && e.composedPath() || [target];
279
+ if (!(triggerEl && triggerEl.contains(target)) && !(panelEl && panelEl.contains(target)) && !(path.includes(triggerEl) || path.includes(panelEl))) {
280
+ this.props.onClickOutSide();
281
+ if (!this.adapter.needConfirm()) {
286
282
  this.foundation.closePanel(e);
287
283
  }
288
284
  }
@@ -86,7 +86,7 @@ export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGri
86
86
  renderMonth(month: Date, panelType: PanelType): JSX.Element;
87
87
  handleWeeksRowNumChange: (weeksRowNum: number, panelType: PanelType) => void;
88
88
  reselect: () => void;
89
- getYAMOpenType: () => "none" | "left" | "right" | "both";
89
+ getYAMOpenType: () => "both" | "none" | "left" | "right";
90
90
  renderTimePicker(panelType: PanelType, panelDetail: MonthInfo): JSX.Element;
91
91
  renderYearAndMonth(panelType: PanelType, panelDetail: MonthInfo): JSX.Element;
92
92
  renderSwitch(panelType: PanelType): JSX.Element;
@@ -86,7 +86,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
86
86
  onDropdownVisibleChange?: (visible: boolean) => void;
87
87
  zIndex?: number;
88
88
  position?: "left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
89
- onSearch?: (value: string, event: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => void;
89
+ onSearch?: (value: string, event: React.KeyboardEvent<Element> | React.MouseEvent<Element, MouseEvent>) => void;
90
90
  dropdownClassName?: string;
91
91
  dropdownStyle?: React.CSSProperties;
92
92
  dropdownMargin?: number | {
@@ -140,7 +140,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
140
140
  preventScroll?: boolean;
141
141
  showRestTagsPopover?: boolean;
142
142
  restTagsPopoverProps?: import("../popover").PopoverProps;
143
- } & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
143
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
144
144
  static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
145
145
  static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
146
146
  static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
@@ -32,7 +32,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
32
32
  onDropdownVisibleChange?: (visible: boolean) => void;
33
33
  zIndex?: number;
34
34
  position?: "left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
35
- onSearch?: (value: string, event: import("react").MouseEvent<Element, MouseEvent> | import("react").KeyboardEvent<Element>) => void;
35
+ onSearch?: (value: string, event: import("react").KeyboardEvent<Element> | import("react").MouseEvent<Element, MouseEvent>) => void;
36
36
  dropdownClassName?: string;
37
37
  dropdownStyle?: import("react").CSSProperties;
38
38
  dropdownMargin?: number | {
@@ -86,7 +86,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
86
86
  preventScroll?: boolean;
87
87
  showRestTagsPopover?: boolean;
88
88
  restTagsPopoverProps?: import("../popover").PopoverProps;
89
- } & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
89
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
90
90
  declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
91
91
  declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
92
92
  declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
@@ -86,7 +86,7 @@ declare class Input extends BaseComponent<InputProps, InputState> {
86
86
  showClear: PropTypes.Requireable<boolean>;
87
87
  hideSuffix: PropTypes.Requireable<boolean>;
88
88
  placeholder: PropTypes.Requireable<any>;
89
- size: PropTypes.Requireable<"small" | "default" | "large">;
89
+ size: PropTypes.Requireable<"default" | "small" | "large">;
90
90
  className: PropTypes.Requireable<string>;
91
91
  style: PropTypes.Requireable<object>;
92
92
  validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
@@ -21,7 +21,7 @@ export default class inputGroup extends BaseComponent<InputGroupProps, InputGrou
21
21
  static propTypes: {
22
22
  className: PropTypes.Requireable<string>;
23
23
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
24
- size: PropTypes.Requireable<"small" | "default" | "large">;
24
+ size: PropTypes.Requireable<"default" | "small" | "large">;
25
25
  style: PropTypes.Requireable<object>;
26
26
  onBlur: PropTypes.Requireable<(...args: any[]) => any>;
27
27
  onFocus: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1,170 +1,3 @@
1
- /**
2
- * [i18n-Romanian]
3
- */
4
- declare const _default: {
5
- code: string;
6
- dateFnsLocale: Locale;
7
- Pagination: {
8
- pageSize: string;
9
- total: string;
10
- jumpTo: string;
11
- page: string;
12
- };
13
- Modal: {
14
- confirm: string;
15
- cancel: string;
16
- };
17
- TimePicker: {
18
- placeholder: {
19
- time: string;
20
- timeRange: string;
21
- };
22
- begin: string;
23
- end: string;
24
- hour: string;
25
- minute: string;
26
- second: string;
27
- AM: string;
28
- PM: string;
29
- };
30
- DatePicker: {
31
- placeholder: {
32
- date: string;
33
- dateTime: string;
34
- dateRange: string[];
35
- dateTimeRange: string[];
36
- monthRange: string[];
37
- };
38
- presets: string;
39
- footer: {
40
- confirm: string;
41
- cancel: string;
42
- };
43
- selectDate: string;
44
- selectTime: string;
45
- year: string;
46
- month: string;
47
- day: string;
48
- monthText: string;
49
- months: {
50
- 1: string;
51
- 2: string;
52
- 3: string;
53
- 4: string;
54
- 5: string;
55
- 6: string;
56
- 7: string;
57
- 8: string;
58
- 9: string;
59
- 10: string;
60
- 11: string;
61
- 12: string;
62
- };
63
- fullMonths: {
64
- 1: string;
65
- 2: string;
66
- 3: string;
67
- 4: string;
68
- 5: string;
69
- 6: string;
70
- 7: string;
71
- 8: string;
72
- 9: string;
73
- 10: string;
74
- 11: string;
75
- 12: string;
76
- };
77
- weeks: {
78
- Mon: string;
79
- Tue: string;
80
- Wed: string;
81
- Thu: string;
82
- Fri: string;
83
- Sat: string;
84
- Sun: string;
85
- };
86
- localeFormatToken: {
87
- FORMAT_SWITCH_DATE: string;
88
- };
89
- };
90
- Popconfirm: {
91
- confirm: string;
92
- cancel: string;
93
- };
94
- Navigation: {
95
- collapseText: string;
96
- expandText: string;
97
- };
98
- Table: {
99
- emptyText: string;
100
- pageText: string;
101
- };
102
- Select: {
103
- emptyText: string;
104
- createText: string;
105
- };
106
- Tree: {
107
- emptyText: string;
108
- };
109
- Cascader: {
110
- emptyText: string;
111
- };
112
- List: {
113
- emptyText: string;
114
- };
115
- Calendar: {
116
- allDay: string;
117
- AM: string;
118
- PM: string;
119
- datestring: string;
120
- remaining: string;
121
- };
122
- Upload: {
123
- mainText: string;
124
- illegalTips: string;
125
- legalTips: string;
126
- retry: string;
127
- replace: string;
128
- clear: string;
129
- selectedFiles: string;
130
- illegalSize: string;
131
- fail: string;
132
- };
133
- TreeSelect: {
134
- searchPlaceholder: string;
135
- };
136
- Typography: {
137
- copy: string;
138
- copied: string;
139
- expand: string;
140
- collapse: string;
141
- };
142
- Transfer: {
143
- emptyLeft: string;
144
- emptySearch: string;
145
- emptyRight: string;
146
- placeholder: string;
147
- clear: string;
148
- selectAll: string;
149
- clearSelectAll: string;
150
- total: string;
151
- selected: string;
152
- };
153
- Form: {
154
- optional: string;
155
- };
156
- Image: {
157
- preview: string;
158
- loading: string;
159
- loadError: string;
160
- prevTip: string;
161
- nextTip: string;
162
- zoomInTip: string;
163
- zoomOutTip: string;
164
- rotateTip: string;
165
- downloadTip: string;
166
- adaptiveTip: string;
167
- originTip: string;
168
- };
169
- };
170
- export default _default;
1
+ import { Locale } from '../interface';
2
+ declare const local: Locale;
3
+ export default local;
@@ -5,10 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _locale = require("date-fns/locale");
8
- /**
9
- * [i18n-Romanian]
10
- */
11
- var _default = {
8
+ const local = {
12
9
  code: 'ro',
13
10
  dateFnsLocale: _locale.ro,
14
11
  Pagination: {
@@ -111,7 +108,8 @@ var _default = {
111
108
  createText: 'Creează'
112
109
  },
113
110
  Tree: {
114
- emptyText: 'Nici un rezultat'
111
+ emptyText: 'Nici un rezultat',
112
+ searchPlaceholder: 'Căutare'
115
113
  },
116
114
  Cascader: {
117
115
  emptyText: 'Nici un rezultat'
@@ -174,4 +172,6 @@ var _default = {
174
172
  originTip: 'Afișaj implicit'
175
173
  }
176
174
  };
175
+ // [i18n-Romanian] 罗马尼亚语
176
+ var _default = local;
177
177
  exports.default = _default;
@@ -143,19 +143,19 @@ export declare function withWarning(props: ModalReactProps): {
143
143
  type: "warning";
144
144
  };
145
145
  export declare function withError(props: ModalReactProps): {
146
+ title?: React.ReactNode;
146
147
  children?: React.ReactNode;
148
+ size?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").Size;
149
+ style?: React.CSSProperties;
150
+ className?: string;
151
+ motion?: boolean;
152
+ getPopupContainer?: () => HTMLElement;
147
153
  footer?: React.ReactNode;
148
154
  header?: React.ReactNode;
149
- style?: React.CSSProperties;
150
- title?: React.ReactNode;
155
+ direction?: any;
151
156
  mask?: boolean;
152
157
  visible?: boolean;
153
- className?: string;
154
158
  zIndex?: number;
155
- getPopupContainer?: () => HTMLElement;
156
- direction?: any;
157
- size?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").Size;
158
- motion?: boolean;
159
159
  width?: string | number;
160
160
  height?: string | number;
161
161
  content?: React.ReactNode;
@@ -205,6 +205,13 @@ export declare function withError(props: ModalReactProps): {
205
205
  onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;
206
206
  onMouseLeave?: React.MouseEventHandler<HTMLButtonElement>;
207
207
  'aria-label'?: string;
208
+ title?: string;
209
+ name?: string;
210
+ value?: string | number | readonly string[];
211
+ onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
212
+ onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
213
+ form?: string;
214
+ slot?: string;
208
215
  prefix?: string;
209
216
  dangerouslySetInnerHTML?: {
210
217
  __html: string | TrustedHTML;
@@ -359,17 +366,12 @@ export declare function withError(props: ModalReactProps): {
359
366
  onScrollCapture?: React.UIEventHandler<HTMLButtonElement>;
360
367
  onWheel?: React.WheelEventHandler<HTMLButtonElement>;
361
368
  onWheelCapture?: React.WheelEventHandler<HTMLButtonElement>;
362
- onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
363
369
  onAnimationStartCapture?: React.AnimationEventHandler<HTMLButtonElement>;
364
- onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
365
370
  onAnimationEndCapture?: React.AnimationEventHandler<HTMLButtonElement>;
366
371
  onAnimationIteration?: React.AnimationEventHandler<HTMLButtonElement>;
367
372
  onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement>;
368
373
  onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement>;
369
374
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement>;
370
- form?: string;
371
- slot?: string;
372
- title?: string;
373
375
  hidden?: boolean;
374
376
  color?: string;
375
377
  defaultChecked?: boolean;
@@ -378,8 +380,6 @@ export declare function withError(props: ModalReactProps): {
378
380
  suppressHydrationWarning?: boolean;
379
381
  accessKey?: string;
380
382
  autoFocus?: boolean;
381
- value?: string | number | readonly string[];
382
- name?: string;
383
383
  contextMenu?: string;
384
384
  dir?: string;
385
385
  draggable?: boolean | "true" | "false";
@@ -387,7 +387,7 @@ export declare function withError(props: ModalReactProps): {
387
387
  translate?: "no" | "yes";
388
388
  role?: React.AriaRole;
389
389
  contentEditable?: "inherit" | (boolean | "true" | "false");
390
- inputMode?: "search" | "text" | "none" | "email" | "tel" | "url" | "numeric" | "decimal";
390
+ inputMode?: "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal";
391
391
  nonce?: string;
392
392
  tabIndex?: number;
393
393
  content?: string;
@@ -421,7 +421,7 @@ export declare function withError(props: ModalReactProps): {
421
421
  is?: string;
422
422
  'aria-activedescendant'?: string;
423
423
  'aria-atomic'?: boolean | "true" | "false";
424
- 'aria-autocomplete'?: "none" | "list" | "both" | "inline";
424
+ 'aria-autocomplete'?: "both" | "none" | "list" | "inline";
425
425
  'aria-busy'?: boolean | "true" | "false";
426
426
  'aria-checked'?: boolean | "true" | "false" | "mixed";
427
427
  'aria-colcount'?: number;
@@ -61,7 +61,7 @@ declare class Radio extends BaseComponent<RadioProps, RadioState> {
61
61
  extra: PropTypes.Requireable<PropTypes.ReactNodeLike>;
62
62
  addonStyle: PropTypes.Requireable<object>;
63
63
  addonClassName: PropTypes.Requireable<string>;
64
- type: PropTypes.Requireable<"button" | "default" | "card" | "pureCard">;
64
+ type: PropTypes.Requireable<"default" | "button" | "card" | "pureCard">;
65
65
  'aria-label': PropTypes.Requireable<string>;
66
66
  preventScroll: PropTypes.Requireable<boolean>;
67
67
  };
@@ -49,7 +49,7 @@ declare class RadioGroup extends BaseComponent<RadioGroupProps, RadioGroupState>
49
49
  name: PropTypes.Requireable<string>;
50
50
  options: PropTypes.Requireable<any[]>;
51
51
  buttonSize: PropTypes.Requireable<"small" | "middle" | "large">;
52
- type: PropTypes.Requireable<"button" | "default" | "card" | "pureCard">;
52
+ type: PropTypes.Requireable<"default" | "button" | "card" | "pureCard">;
53
53
  value: PropTypes.Requireable<any>;
54
54
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
55
55
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
@@ -69,7 +69,7 @@ export default class Rating extends BaseComponent<RatingProps, RatingState> {
69
69
  onBlur: PropTypes.Requireable<(...args: any[]) => any>;
70
70
  onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
71
71
  autoFocus: PropTypes.Requireable<boolean>;
72
- size: PropTypes.Requireable<NonNullable<number | "small" | "default">>;
72
+ size: PropTypes.Requireable<NonNullable<number | "default" | "small">>;
73
73
  tooltips: PropTypes.Requireable<string[]>;
74
74
  id: PropTypes.Requireable<string>;
75
75
  preventScroll: PropTypes.Requireable<boolean>;
@@ -40,7 +40,7 @@ export default class Item extends BaseComponent<RatingItemProps, RatingItemState
40
40
  disabled: PropTypes.Requireable<boolean>;
41
41
  count: PropTypes.Requireable<number>;
42
42
  ariaLabelPrefix: PropTypes.Requireable<string>;
43
- size: PropTypes.Requireable<NonNullable<number | "small" | "default">>;
43
+ size: PropTypes.Requireable<NonNullable<number | "default" | "small">>;
44
44
  'aria-describedby': PropTypes.Requireable<string>;
45
45
  onFocus: PropTypes.Requireable<(...args: any[]) => any>;
46
46
  onBlur: PropTypes.Requireable<(...args: any[]) => any>;
@@ -196,9 +196,9 @@ class Select extends _baseComponent.default {
196
196
  const optionInstance = this.optionsRef && this.optionsRef.current;
197
197
  const triggerDom = this.triggerRef && this.triggerRef.current;
198
198
  const optionsDom = _reactDom.default.findDOMNode(optionInstance);
199
- // let isInPanel = optionsDom && optionsDom.contains(e.target);
200
- // let isInTrigger = triggerDom && triggerDom.contains(e.target);
201
- if (optionsDom && !optionsDom.contains(e.target) && triggerDom && !triggerDom.contains(e.target)) {
199
+ const target = e.target;
200
+ const path = e.composedPath && e.composedPath() || [target];
201
+ if (!(optionsDom && optionsDom.contains(target)) && !(triggerDom && triggerDom.contains(target)) && !(path.includes(triggerDom) || path.includes(optionsDom))) {
202
202
  cb(e);
203
203
  }
204
204
  };