@broxus/react-uikit 0.20.0 → 0.21.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 (145) hide show
  1. package/LICENSE +21 -661
  2. package/dist/cjs/components/Alert/index.js +3 -3
  3. package/dist/cjs/components/Align/Align.js +1 -1
  4. package/dist/cjs/components/Button/Button.js +2 -2
  5. package/dist/cjs/components/Card/Badge.js +2 -2
  6. package/dist/cjs/components/Card/Card.js +2 -2
  7. package/dist/cjs/components/Card/index.d.ts +1 -1
  8. package/dist/cjs/components/Component/index.d.ts +4 -4
  9. package/dist/cjs/components/ConfigProvider/index.d.ts +38 -38
  10. package/dist/cjs/components/Container/index.js +1 -1
  11. package/dist/cjs/components/Control/Checkbox/Checkbox.d.ts +1 -1
  12. package/dist/cjs/components/Control/Checkbox/Checkbox.js +5 -6
  13. package/dist/cjs/components/Control/Checkbox/Group.d.ts +4 -4
  14. package/dist/cjs/components/Control/Checkbox/Group.js +1 -1
  15. package/dist/cjs/components/Control/Input/Input.js +1 -1
  16. package/dist/cjs/components/Control/Input/Number/index.js +3 -3
  17. package/dist/cjs/components/Control/Input/Password/index.js +3 -3
  18. package/dist/cjs/components/Control/Input/types.d.ts +1 -1
  19. package/dist/cjs/components/Control/Input/useInput.js +0 -1
  20. package/dist/cjs/components/Control/Radio/Group.js +3 -4
  21. package/dist/cjs/components/Control/Radio/Radio.d.ts +3 -3
  22. package/dist/cjs/components/Control/Radio/Radio.js +6 -6
  23. package/dist/cjs/components/Control/TextArea/index.js +1 -2
  24. package/dist/cjs/components/Cover/index.js +5 -7
  25. package/dist/cjs/components/DatePicker/generatePicker.d.ts +5 -5
  26. package/dist/cjs/components/DatePicker/generatePicker.js +1 -1
  27. package/dist/cjs/components/DatePicker/generatePurePicker.js +3 -3
  28. package/dist/cjs/components/DatePicker/generateSinglePicker.js +2 -3
  29. package/dist/cjs/components/DatePicker/types.d.ts +2 -2
  30. package/dist/cjs/components/Drawer/index.js +3 -3
  31. package/dist/cjs/components/Drop/index.js +2 -2
  32. package/dist/cjs/components/Flex/Flex.js +7 -7
  33. package/dist/cjs/components/Grid/index.js +2 -2
  34. package/dist/cjs/components/Heading/index.js +1 -1
  35. package/dist/cjs/components/Icon/Icon.js +1 -1
  36. package/dist/cjs/components/Inverse/index.js +2 -2
  37. package/dist/cjs/components/Modal/index.js +2 -2
  38. package/dist/cjs/components/Nav/Group/InternalNavItemGroup.d.ts +1 -1
  39. package/dist/cjs/components/Nav/Header.d.ts +1 -1
  40. package/dist/cjs/components/Nav/Item/InternalNavItem.js +2 -3
  41. package/dist/cjs/components/Nav/Nav.d.ts +17 -17
  42. package/dist/cjs/components/Nav/Nav.js +9 -9
  43. package/dist/cjs/components/Nav/Sub/InlineSubNavList.d.ts +2 -2
  44. package/dist/cjs/components/Nav/Sub/InlineSubNavList.js +2 -2
  45. package/dist/cjs/components/Nav/Sub/PopupTrigger.d.ts +1 -1
  46. package/dist/cjs/components/Nav/Sub/PopupTrigger.js +1 -1
  47. package/dist/cjs/components/Nav/Sub/SubNavList.js +3 -3
  48. package/dist/cjs/components/Nav/Sub/index.d.ts +3 -3
  49. package/dist/cjs/components/Nav/Sub/index.js +3 -3
  50. package/dist/cjs/components/Nav/context/NavContext.d.ts +1 -1
  51. package/dist/cjs/components/Nav/context/NavContext.js +2 -2
  52. package/dist/cjs/components/Nav/hooks/useAccessibility.js +4 -4
  53. package/dist/cjs/components/Nav/hooks/useDirectionStyle.js +1 -1
  54. package/dist/cjs/components/Nav/hooks/useKeyRecords.d.ts +4 -4
  55. package/dist/cjs/components/Nav/hooks/useMemoCallback.js +0 -1
  56. package/dist/cjs/components/Nav/types.d.ts +10 -10
  57. package/dist/cjs/components/Nav/utils/alignUtil.js +1 -1
  58. package/dist/cjs/components/Nav/utils/nodeUtil.js +1 -1
  59. package/dist/cjs/components/Navbar/Nav.js +1 -1
  60. package/dist/cjs/components/Overlay/index.js +1 -1
  61. package/dist/cjs/components/Section/index.js +2 -2
  62. package/dist/cjs/components/Segmented/index.d.ts +1 -1
  63. package/dist/cjs/components/Segmented/index.js +1 -1
  64. package/dist/cjs/components/Spinner/index.js +1 -1
  65. package/dist/cjs/components/Switch/index.js +2 -2
  66. package/dist/cjs/components/Tabs/index.js +2 -4
  67. package/dist/cjs/components/Text/index.js +20 -2
  68. package/dist/cjs/components/Tile/index.js +2 -2
  69. package/dist/cjs/components/Width/Width.js +1 -1
  70. package/dist/cjs/components/Width/index.d.ts +1 -1
  71. package/dist/cjs/components/Width/index.js +1 -1
  72. package/dist/cjs/index.js +1 -0
  73. package/dist/esm/components/Alert/index.js +3 -3
  74. package/dist/esm/components/Align/Align.js +1 -1
  75. package/dist/esm/components/Button/Button.js +2 -2
  76. package/dist/esm/components/Card/Badge.js +2 -2
  77. package/dist/esm/components/Card/Card.js +2 -2
  78. package/dist/esm/components/Card/index.d.ts +1 -1
  79. package/dist/esm/components/Component/index.d.ts +4 -4
  80. package/dist/esm/components/ConfigProvider/index.d.ts +38 -38
  81. package/dist/esm/components/Container/index.js +1 -1
  82. package/dist/esm/components/Control/Checkbox/Checkbox.d.ts +1 -1
  83. package/dist/esm/components/Control/Checkbox/Checkbox.js +5 -6
  84. package/dist/esm/components/Control/Checkbox/Group.d.ts +4 -4
  85. package/dist/esm/components/Control/Checkbox/Group.js +1 -1
  86. package/dist/esm/components/Control/Input/Input.js +1 -1
  87. package/dist/esm/components/Control/Input/Number/index.js +3 -3
  88. package/dist/esm/components/Control/Input/Password/index.js +3 -3
  89. package/dist/esm/components/Control/Input/types.d.ts +1 -1
  90. package/dist/esm/components/Control/Input/useInput.js +0 -1
  91. package/dist/esm/components/Control/Radio/Group.js +3 -4
  92. package/dist/esm/components/Control/Radio/Radio.d.ts +3 -3
  93. package/dist/esm/components/Control/Radio/Radio.js +6 -6
  94. package/dist/esm/components/Control/TextArea/index.js +1 -2
  95. package/dist/esm/components/Cover/index.js +6 -8
  96. package/dist/esm/components/DatePicker/generatePicker.d.ts +5 -5
  97. package/dist/esm/components/DatePicker/generatePicker.js +1 -1
  98. package/dist/esm/components/DatePicker/generatePurePicker.js +3 -3
  99. package/dist/esm/components/DatePicker/generateSinglePicker.js +2 -3
  100. package/dist/esm/components/DatePicker/types.d.ts +2 -2
  101. package/dist/esm/components/Drawer/index.js +3 -3
  102. package/dist/esm/components/Drop/index.js +2 -2
  103. package/dist/esm/components/Flex/Flex.js +7 -7
  104. package/dist/esm/components/Grid/index.js +2 -2
  105. package/dist/esm/components/Heading/index.js +1 -1
  106. package/dist/esm/components/Icon/Icon.js +1 -1
  107. package/dist/esm/components/Inverse/index.js +2 -2
  108. package/dist/esm/components/Modal/index.js +2 -2
  109. package/dist/esm/components/Nav/Group/InternalNavItemGroup.d.ts +1 -1
  110. package/dist/esm/components/Nav/Header.d.ts +1 -1
  111. package/dist/esm/components/Nav/Item/InternalNavItem.js +2 -3
  112. package/dist/esm/components/Nav/Nav.d.ts +17 -17
  113. package/dist/esm/components/Nav/Nav.js +10 -10
  114. package/dist/esm/components/Nav/Sub/InlineSubNavList.d.ts +2 -2
  115. package/dist/esm/components/Nav/Sub/InlineSubNavList.js +2 -2
  116. package/dist/esm/components/Nav/Sub/PopupTrigger.d.ts +1 -1
  117. package/dist/esm/components/Nav/Sub/PopupTrigger.js +1 -1
  118. package/dist/esm/components/Nav/Sub/SubNavList.js +3 -3
  119. package/dist/esm/components/Nav/Sub/index.d.ts +3 -3
  120. package/dist/esm/components/Nav/Sub/index.js +3 -3
  121. package/dist/esm/components/Nav/context/NavContext.d.ts +1 -1
  122. package/dist/esm/components/Nav/context/NavContext.js +2 -2
  123. package/dist/esm/components/Nav/hooks/useAccessibility.js +4 -4
  124. package/dist/esm/components/Nav/hooks/useDirectionStyle.js +1 -1
  125. package/dist/esm/components/Nav/hooks/useKeyRecords.d.ts +4 -4
  126. package/dist/esm/components/Nav/hooks/useMemoCallback.js +0 -1
  127. package/dist/esm/components/Nav/types.d.ts +10 -10
  128. package/dist/esm/components/Nav/utils/alignUtil.js +1 -1
  129. package/dist/esm/components/Nav/utils/nodeUtil.js +1 -1
  130. package/dist/esm/components/Navbar/Nav.js +1 -1
  131. package/dist/esm/components/Overlay/index.js +1 -1
  132. package/dist/esm/components/Section/index.js +2 -2
  133. package/dist/esm/components/Segmented/index.d.ts +1 -1
  134. package/dist/esm/components/Segmented/index.js +1 -1
  135. package/dist/esm/components/Spinner/index.js +1 -1
  136. package/dist/esm/components/Switch/index.js +2 -2
  137. package/dist/esm/components/Tabs/index.js +2 -4
  138. package/dist/esm/components/Text/index.js +20 -2
  139. package/dist/esm/components/Tile/index.js +2 -2
  140. package/dist/esm/components/Width/Width.js +1 -1
  141. package/dist/esm/components/Width/index.d.ts +1 -1
  142. package/dist/esm/components/Width/index.js +1 -1
  143. package/dist/esm/index.js +1 -0
  144. package/package.json +24 -26
  145. package/styles/text.scss +66 -0
@@ -54,9 +54,9 @@ export const Password = React.forwardRef((props, ref) => {
54
54
  };
55
55
  }, [removePasswordValueAttribute]);
56
56
  const suffix = React.useMemo(() => (React.createElement(React.Fragment, null,
57
- React.createElement(Icon, { key: "toggle_visibility_icon", icon: visible
57
+ React.createElement(Icon, { key: "toggle_visibility_icon", className: `${controlCls}-password-icon`, icon: visible
58
58
  ? restProps.iconVisibility ?? 'visibility'
59
- : restProps.iconVisibilityOff ?? 'visibility_off', className: `${controlCls}-password-icon`, onClick: toggleVisibility, onMouseDown: preventEvent, onMouseUp: preventEvent }),
59
+ : restProps.iconVisibilityOff ?? 'visibility_off', onClick: toggleVisibility, onMouseDown: preventEvent, onMouseUp: preventEvent }),
60
60
  restProps.suffix)), [
61
61
  controlCls,
62
62
  restProps.iconVisibility,
@@ -65,7 +65,7 @@ export const Password = React.forwardRef((props, ref) => {
65
65
  toggleVisibility,
66
66
  visible,
67
67
  ]);
68
- return (React.createElement(Input, { ...restProps, suffix: suffix, type: visible ? 'text' : 'password', ref: inputRef, onChange: onChange, onBlur: onBlur, onFocus: onFocus }));
68
+ return (React.createElement(Input, { ref: inputRef, ...restProps, suffix: suffix, type: visible ? 'text' : 'password', onBlur: onBlur, onChange: onChange, onFocus: onFocus }));
69
69
  });
70
70
  if (process.env.NODE_ENV !== 'production') {
71
71
  Password.displayName = 'Input.Password';
@@ -10,7 +10,7 @@ export interface InputRef {
10
10
  getInputRef(): React.RefObject<HTMLInputElement | null> | null;
11
11
  }
12
12
  export type OmittedNativeInput = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'defaultChecked' | 'size' | 'prefix' | 'type' | 'max' | 'min'>;
13
- export interface InputProps<T extends ValueType = ValueType> extends OmittedNativeInput, ControlProps<T> {
13
+ export interface InputProps<T extends ValueType = ValueType> extends ControlProps<T>, OmittedNativeInput {
14
14
  htmlSize?: number | undefined;
15
15
  useInternalValueState?: boolean;
16
16
  onClear?(event: React.MouseEvent<HTMLElement>): void;
@@ -49,7 +49,6 @@ export function useInput(props) {
49
49
  ...restProps,
50
50
  prefixCls,
51
51
  value: fixControlledValue(internalValue || restProps.value),
52
- // eslint-disable-next-line sort-keys
53
52
  onBlur,
54
53
  onChange,
55
54
  onClear,
@@ -25,7 +25,6 @@ export const Group = React.forwardRef((props, ref) => {
25
25
  disabled,
26
26
  name: restProps.name,
27
27
  value,
28
- // eslint-disable-next-line sort-keys
29
28
  onChange,
30
29
  }), [disabled, restProps.name, value, onChange]);
31
30
  const renderGroup = () => {
@@ -33,15 +32,15 @@ export const Group = React.forwardRef((props, ref) => {
33
32
  if (options && options.length > 0) {
34
33
  childrenToRender = options.map(option => {
35
34
  if (typeof option === 'string' || typeof option === 'number') {
36
- return (React.createElement(Radio, { key: option, block: block, className: `${rootCls}-item`, checked: value === option, direction: direction, disabled: disabled, size: size, value: option }, option));
35
+ return (React.createElement(Radio, { key: option, block: block, checked: value === option, className: `${rootCls}-item`, direction: direction, disabled: disabled, size: size, value: option }, option));
37
36
  }
38
37
  return (React.createElement(Radio, { key: `radio-group-value-options-${option.value}`, block: block, checked: value === option.value, className: `${rootCls}-item`, direction: direction, disabled: option.disabled || disabled, size: size, style: option.style, value: option.value }, option.label));
39
38
  });
40
39
  }
41
- return (React.createElement("div", { className: classNames(rootCls, {
40
+ return (React.createElement("div", { ref: ref, className: classNames(rootCls, {
42
41
  [`${rootCls}-rtl`]: direction === 'rtl',
43
42
  [`${rootCls}-stack`]: stack,
44
- }, className), id: id, style: style, ref: ref }, childrenToRender));
43
+ }, className), id: id, style: style }, childrenToRender));
45
44
  };
46
45
  return React.createElement(RadioGroupContext.Provider, { value: context }, renderGroup());
47
46
  });
@@ -8,9 +8,9 @@ export interface RadioChangeEventTarget extends RadioProps {
8
8
  checked: boolean;
9
9
  }
10
10
  export interface RadioChangeEvent {
11
- target: RadioChangeEventTarget;
12
- stopPropagation: VoidFunction;
13
- preventDefault: VoidFunction;
14
11
  nativeEvent: MouseEvent;
12
+ preventDefault: VoidFunction;
13
+ stopPropagation: VoidFunction;
14
+ target: RadioChangeEventTarget;
15
15
  }
16
16
  export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
@@ -6,7 +6,7 @@ import { useRadioGroup } from '../../../components/Control/Radio/RadioGroupConte
6
6
  export const Radio = React.forwardRef((props, ref) => {
7
7
  const config = useConfig();
8
8
  const radioGroup = useRadioGroup();
9
- const { block, size, className, children, direction = config.radio?.direction || config.direction, disabled, id, prefixCls = config.radio?.prefixCls || config.prefixCls, skipGroup, style, onChange: onChangeCallback, onMouseEnter, onMouseLeave, ...restProps } = props;
9
+ const { block, children, className, direction = config.radio?.direction || config.direction, disabled, id, prefixCls = config.radio?.prefixCls || config.prefixCls, size, skipGroup, style, onChange: onChangeCallback, onMouseEnter, onMouseLeave, ...restProps } = props;
10
10
  const [internalChecked, setInternalChecked] = React.useState(restProps.checked
11
11
  ?? restProps.defaultChecked
12
12
  ?? ('value' in restProps && restProps.value === radioGroup?.value));
@@ -41,13 +41,13 @@ export const Radio = React.forwardRef((props, ref) => {
41
41
  const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.radio?.prefixCls || config.prefixCls, 'radio'), [config, prefixCls]);
42
42
  const controlCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.radio?.prefixCls || config.prefixCls, 'control'), [config, prefixCls]);
43
43
  const wrapperClasses = React.useMemo(() => classNames({
44
- [controlCls]: block,
45
- [`${controlCls}-radio`]: block,
46
44
  [`${controlCls}-${size}`]: block && size,
47
- [`${rootCls}-wrapper`]: true,
48
- [`${rootCls}-rtl`]: direction === 'rtl',
45
+ [`${controlCls}-radio`]: block,
49
46
  [`${prefixCls || config.radio?.prefixCls || config.prefixCls}-checked`]: radioProps.checked,
50
47
  [`${prefixCls || config.radio?.prefixCls || config.prefixCls}-disabled`]: radioProps.disabled,
48
+ [`${rootCls}-rtl`]: direction === 'rtl',
49
+ [`${rootCls}-wrapper`]: true,
50
+ [controlCls]: block,
51
51
  }, className), [
52
52
  controlCls,
53
53
  block,
@@ -73,7 +73,7 @@ export const Radio = React.forwardRef((props, ref) => {
73
73
  }, [restProps.checked, restProps.defaultChecked, radioGroup?.value]);
74
74
  return (React.createElement("label", { className: wrapperClasses, htmlFor: id, style: style, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave },
75
75
  React.createElement("span", { className: classNames(radioClasses) },
76
- React.createElement("input", { className: `${rootCls}-input`, ref: ref, ...radioProps, type: "radio", ...globalAttributes }),
76
+ React.createElement("input", { ref: ref, className: `${rootCls}-input`, ...radioProps, type: "radio", ...globalAttributes }),
77
77
  React.createElement("span", { className: `${rootCls}-inner` })),
78
78
  children !== undefined && React.createElement("span", { className: `${rootCls}-label` }, children)));
79
79
  });
@@ -73,7 +73,6 @@ export const TextArea = React.forwardRef((props, ref) => {
73
73
  const inputProps = React.useMemo(() => ({
74
74
  ...omit(restProps, ['allowClear', 'size']),
75
75
  prefixCls: rootCls,
76
- // eslint-disable-next-line sort-keys
77
76
  onBlur,
78
77
  onChange,
79
78
  onCompositionEnd,
@@ -109,7 +108,7 @@ export const TextArea = React.forwardRef((props, ref) => {
109
108
  const dataCountAttribute = dataCount ? { 'data-count': dataCount } : {};
110
109
  return (React.createElement("label", { className: wrapperClasses, htmlFor: inputProps.id, ...dataCountAttribute },
111
110
  React.createElement("span", { className: `${controlCls}-input` },
112
- React.createElement(RcTextArea, { ...inputProps, value: value, ref: ref }))));
111
+ React.createElement(RcTextArea, { ...inputProps, ref: ref, value: value }))));
113
112
  });
114
113
  if (process.env.NODE_ENV !== 'production') {
115
114
  TextArea.displayName = 'TextArea';
@@ -1,10 +1,10 @@
1
- import { Dimensions, debounce, isBrowser } from '@broxus/js-utils';
1
+ import { debounce, Dimensions, isBrowser } from '@broxus/js-utils';
2
2
  import classNames from 'classnames';
3
3
  import * as React from 'react';
4
4
  import { useConfig } from '../../components/ConfigProvider';
5
5
  export function Cover(props) {
6
6
  const config = useConfig();
7
- const { automute = true, className, children, height, prefixCls = config.prefixCls, width, ...restProps } = props;
7
+ const { automute = true, children, className, height, prefixCls = config.prefixCls, width, ...restProps } = props;
8
8
  const container = React.useRef(null);
9
9
  const coveringElement = React.useRef(null);
10
10
  const resize = React.useCallback(() => {
@@ -37,13 +37,8 @@ export function Cover(props) {
37
37
  if (React.isValidElement(child)) {
38
38
  return React.cloneElement(child, {
39
39
  ...child.props,
40
- ref: idx === 0 ? coveringElement : null,
41
- // eslint-disable-next-line sort-keys
42
40
  className: classNames(rootCls, child.props.className),
43
- onLoadedMetadata: () => {
44
- resize();
45
- },
46
- // eslint-disable-next-line sort-keys
41
+ ref: idx === 0 ? coveringElement : null,
47
42
  onLoad: () => {
48
43
  if (automute) {
49
44
  try {
@@ -52,6 +47,9 @@ export function Cover(props) {
52
47
  catch (e) { }
53
48
  }
54
49
  },
50
+ onLoadedMetadata: () => {
51
+ resize();
52
+ },
55
53
  });
56
54
  }
57
55
  return child;
@@ -4,19 +4,19 @@ export declare const generatePicker: <DateType extends AnyObject = AnyObject>(ge
4
4
  displayName?: string;
5
5
  } & {
6
6
  displayName?: string;
7
- WeekPicker: (<ValueType = DateType>(props: import("./types").PickerPropsWithMultiple<DateType, Omit<import("./types").PickerProps<DateType>, "picker">, ValueType>) => React.ReactElement) & {
8
- displayName?: string;
9
- };
10
7
  MonthPicker: (<ValueType = DateType>(props: import("./types").PickerPropsWithMultiple<DateType, Omit<import("./types").PickerProps<DateType>, "picker">, ValueType>) => React.ReactElement) & {
11
8
  displayName?: string;
12
9
  };
13
- YearPicker: (<ValueType = DateType>(props: import("./types").PickerPropsWithMultiple<DateType, Omit<import("./types").PickerProps<DateType>, "picker">, ValueType>) => React.ReactElement) & {
10
+ QuarterPicker: (<ValueType = DateType>(props: import("./types").PickerPropsWithMultiple<DateType, Omit<import("./types").PickerProps<DateType>, "picker">, ValueType>) => React.ReactElement) & {
14
11
  displayName?: string;
15
12
  };
16
13
  TimePicker: (<ValueType = DateType>(props: import("./types").PickerPropsWithMultiple<DateType, Omit<import("./types").GenericTimePickerProps<DateType>, "picker">, ValueType>) => React.ReactElement) & {
17
14
  displayName?: string;
18
15
  };
19
- QuarterPicker: (<ValueType = DateType>(props: import("./types").PickerPropsWithMultiple<DateType, Omit<import("./types").PickerProps<DateType>, "picker">, ValueType>) => React.ReactElement) & {
16
+ WeekPicker: (<ValueType = DateType>(props: import("./types").PickerPropsWithMultiple<DateType, Omit<import("./types").PickerProps<DateType>, "picker">, ValueType>) => React.ReactElement) & {
17
+ displayName?: string;
18
+ };
19
+ YearPicker: (<ValueType = DateType>(props: import("./types").PickerPropsWithMultiple<DateType, Omit<import("./types").PickerProps<DateType>, "picker">, ValueType>) => React.ReactElement) & {
20
20
  displayName?: string;
21
21
  };
22
22
  };
@@ -1,5 +1,5 @@
1
1
  import { generateSinglePicker } from '../../components/DatePicker/generateSinglePicker';
2
- // eslint-disable-next-line @typescript-eslint/explicit-function-return-type,@typescript-eslint/explicit-module-boundary-types
2
+ /* eslint-disable @typescript-eslint/explicit-function-return-type,@typescript-eslint/explicit-module-boundary-types,@typescript-eslint/no-unused-vars */
3
3
  export const generatePicker = (generateConfig) => {
4
4
  const { DatePicker, MonthPicker, QuarterPicker, TimePicker, WeekPicker, YearPicker, } = generateSinglePicker(generateConfig);
5
5
  const MergedDatePicker = DatePicker;
@@ -6,7 +6,7 @@ import defaultPickerLocale from '../../components/DatePicker/locale/en_US';
6
6
  import { useComponents } from '../../components/DatePicker/useComponents';
7
7
  import { getMotionName } from '../../utils';
8
8
  export const generatePurePicker = (generateConfig) => {
9
- // eslint-disable-next-line @typescript-eslint/explicit-function-return-type,@typescript-eslint/explicit-module-boundary-types
9
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
10
10
  const getPanel = (picker, displayName) => {
11
11
  const consumerName = displayName === TIMEPICKER ? 'timePicker' : 'datePicker';
12
12
  const Picker = React.forwardRef((props, ref) => {
@@ -19,7 +19,7 @@ export const generatePurePicker = (generateConfig) => {
19
19
  React.useImperativeHandle(ref, () => pickerRef.current, []);
20
20
  return (
21
21
  // @ts-ignore
22
- React.createElement(PickerPanel, { ref: pickerRef, components: mergedComponents, direction: direction, generateConfig: generateConfig, locale: locale.lang, picker: mergedPicker, prefixCls: prefixCls, nextIcon: React.createElement("span", { className: `${prefixCls}-next-icon` }), prevIcon: React.createElement("span", { className: `${prefixCls}-prev-icon` }), superPrevIcon: React.createElement("span", { className: `${prefixCls}-super-prev-icon` }), superNextIcon: React.createElement("span", { className: `${prefixCls}-super-next-icon` }), transitionName: getMotionName(config.prefixCls, 'slide-bottom-small'), ...restProps }));
22
+ React.createElement(PickerPanel, { ref: pickerRef, components: mergedComponents, direction: direction, generateConfig: generateConfig, locale: locale.lang, nextIcon: React.createElement("span", { className: `${prefixCls}-next-icon` }), picker: mergedPicker, prefixCls: prefixCls, prevIcon: React.createElement("span", { className: `${prefixCls}-prev-icon` }), superNextIcon: React.createElement("span", { className: `${prefixCls}-super-next-icon` }), superPrevIcon: React.createElement("span", { className: `${prefixCls}-super-prev-icon` }), transitionName: getMotionName(config.prefixCls, 'slide-bottom-small'), ...restProps }));
23
23
  });
24
24
  if (process.env.NODE_ENV !== 'production' && displayName) {
25
25
  Picker.displayName = displayName;
@@ -29,7 +29,7 @@ export const generatePurePicker = (generateConfig) => {
29
29
  const DatePicker = getPanel();
30
30
  const MonthPicker = getPanel(MONTH, MONTHPICKER);
31
31
  const QuarterPicker = getPanel(QUARTER, QUARTERPICKER);
32
- // @ts-ignore
32
+ // @ts-expect-error Type Omit<TimePickerProps, 'picker'> does not satisfy the constraint ...
33
33
  const TimePicker = getPanel(TIME, TIMEPICKER);
34
34
  const WeekPicker = getPanel(WEEK, WEEKPICKER);
35
35
  const YearPicker = getPanel(YEAR, YEARPICKER);
@@ -10,8 +10,8 @@ import { useComponents } from '../../components/DatePicker/useComponents';
10
10
  import { getPlaceholder } from '../../components/DatePicker/utils';
11
11
  import { Icon } from '../../components/Icon';
12
12
  import { getMotionName } from '../../utils';
13
+ /* eslint-disable @typescript-eslint/explicit-function-return-type,@typescript-eslint/explicit-module-boundary-types */
13
14
  export const generateSinglePicker = (generateConfig) => {
14
- // eslint-disable-next-line @typescript-eslint/explicit-function-return-type,@typescript-eslint/explicit-module-boundary-types
15
15
  const getPicker = (picker, displayName) => {
16
16
  const consumerName = displayName === TIMEPICKER ? 'timePicker' : 'datePicker';
17
17
  const Picker = React.forwardRef((props, ref) => {
@@ -34,7 +34,6 @@ export const generateSinglePicker = (generateConfig) => {
34
34
  if (mergedPicker === TIME) {
35
35
  return React.createElement(Icon, { icon: "schedule" });
36
36
  }
37
- // @ts-ignore
38
37
  if (mergedPicker && ![WEEK, MONTH, QUARTER, YEAR].includes(mergedPicker)) {
39
38
  return React.createElement(Icon, { icon: "calendar_clock" });
40
39
  }
@@ -50,7 +49,7 @@ export const generateSinglePicker = (generateConfig) => {
50
49
  [`${prefixCls}-rtl`]: direction === 'rtl',
51
50
  }, className), classNames: {
52
51
  popup: classNames(popupClassName),
53
- }, components: mergedComponents, direction: direction, generateConfig: generateConfig, getPopupContainer: getPopupContainer, locale: locale.lang, picker: mergedPicker, placeholder: getPlaceholder(locale, mergedPicker, placeholder), placement: placement, prefixCls: prefixCls, suffixIcon: suffixIcon, nextIcon: React.createElement("span", { className: `${prefixCls}-next-icon` }), prevIcon: React.createElement("span", { className: `${prefixCls}-prev-icon` }), superPrevIcon: React.createElement("span", { className: `${prefixCls}-super-prev-icon` }), superNextIcon: React.createElement("span", { className: `${prefixCls}-super-next-icon` }), style: style, transitionName: getMotionName(config.prefixCls, 'slide-bottom-small'), onCalendarChange: onCalendarChange, ...restProps, allowClear: mergedAllowClear, styles: {
52
+ }, components: mergedComponents, direction: direction, generateConfig: generateConfig, getPopupContainer: getPopupContainer, locale: locale.lang, nextIcon: React.createElement("span", { className: `${prefixCls}-next-icon` }), picker: mergedPicker, placeholder: getPlaceholder(locale, mergedPicker, placeholder), placement: placement, prefixCls: prefixCls, prevIcon: React.createElement("span", { className: `${prefixCls}-prev-icon` }), style: style, suffixIcon: suffixIcon, superNextIcon: React.createElement("span", { className: `${prefixCls}-super-next-icon` }), superPrevIcon: React.createElement("span", { className: `${prefixCls}-super-prev-icon` }), transitionName: getMotionName(config.prefixCls, 'slide-bottom-small'), onCalendarChange: onCalendarChange, ...restProps, allowClear: mergedAllowClear, styles: {
54
53
  popup: { minWidth: 'fit-content', ...restProps.styles },
55
54
  } })));
56
55
  });
@@ -17,10 +17,10 @@ export interface AdditionalPickerLocaleLangProps {
17
17
  rangeMonthPlaceholder?: [string, string];
18
18
  rangePlaceholder?: [string, string];
19
19
  rangeQuarterPlaceholder?: [string, string];
20
- rangeYearPlaceholder?: [string, string];
21
20
  rangeWeekPlaceholder?: [string, string];
22
- yearPlaceholder?: string;
21
+ rangeYearPlaceholder?: [string, string];
23
22
  weekPlaceholder?: string;
23
+ yearPlaceholder?: string;
24
24
  }
25
25
  export interface PickerLocale extends AdditionalPickerLocaleProps {
26
26
  lang: RcPickerLocale & AdditionalPickerLocaleLangProps;
@@ -7,7 +7,7 @@ import { addModalMode, getMotionName, removeModalMode } from '../../utils';
7
7
  const defaultPushState = { distance: 180 };
8
8
  export const Drawer = React.forwardRef((props, ref) => {
9
9
  const config = useConfig();
10
- const { animation = 'slide', children, className, defaultOpen, destroyOnHidden, direction, getContainer = config.getPopupContainer, keyboard = true, mask = true, maskClosable = true, motion, open, placement = 'right', prefixCls = config.prefixCls, push = defaultPushState, size, rootClassName, rootStyle, trigger, onClose: onCloseCallback, ...restProps } = props;
10
+ const { animation = 'slide', children, className, defaultOpen, destroyOnHidden, direction, getContainer = config.getPopupContainer, keyboard = true, mask = true, maskClosable = true, motion, open, placement = 'right', prefixCls = config.prefixCls, push = defaultPushState, rootClassName, rootStyle, size, trigger, onClose: onCloseCallback, ...restProps } = props;
11
11
  const [isShown, setShown] = React.useState(defaultOpen);
12
12
  const [internalOpen, setOpen] = React.useState(defaultOpen);
13
13
  const mergedOpen = open === undefined ? internalOpen : open;
@@ -21,8 +21,8 @@ export const Drawer = React.forwardRef((props, ref) => {
21
21
  'no-mask': !mask,
22
22
  }, rootClassName), [rootCls, animation, mergedOpen, isShown, size, direction, mask, rootClassName]);
23
23
  const drawerContainerClassName = React.useMemo(() => classNames(`${rootCls}-container`, {
24
- [`${rootCls}-container-large`]: size === 'large',
25
24
  [`${rootCls}-container-${animation}-${placement}`]: placement !== undefined && ['push', 'reveal'].includes(animation),
25
+ [`${rootCls}-container-large`]: size === 'large',
26
26
  }), [rootCls, size, placement, animation]);
27
27
  const internalMotion = React.useMemo(() => ({
28
28
  onAppearPrepare: element => {
@@ -100,7 +100,7 @@ export const Drawer = React.forwardRef((props, ref) => {
100
100
  React.useEffect(() => cleanup, [cleanup]);
101
101
  return (React.createElement(React.Fragment, null,
102
102
  trigger?.({ collapse, expand, isOpen: !!mergedOpen }),
103
- React.createElement(RcDrawer, { className: className, destroyOnHidden: destroyOnHidden, keyboard: keyboard, getContainer: getContainer, mask: mask, maskClosable: maskClosable, maskMotion: {
103
+ React.createElement(RcDrawer, { className: className, destroyOnHidden: destroyOnHidden, getContainer: getContainer, keyboard: keyboard, mask: mask, maskClosable: maskClosable, maskMotion: {
104
104
  motionName: getMotionName(prefixCls || config.prefixCls, 'drawer-fade'),
105
105
  }, motion: mergedMotion, open: mergedOpen, placement: placement, prefixCls: rootCls, push: push, rootClassName: drawerRootClassName, rootStyle: { ...rootStyle, display: (mergedOpen || isShown) ? 'block' : '' }, onClose: onClose, ...restProps, classNames: {
106
106
  ...restProps.classNames,
@@ -6,7 +6,7 @@ import placements from '../../components/Drop/placements';
6
6
  import { getMotionName, mergeDropMaskMotion } from '../../utils';
7
7
  export const Drop = React.forwardRef((props, ref) => {
8
8
  const config = useConfig();
9
- const { action = ['hover'], align, alignPoint, arrow = false, autoDestroy, builtinPlacements = placements, children, defaultVisible, getPopupContainer = config.getPopupContainer, hideAction = action, maskMotion, motion, minOverlayWidthMatchTrigger, openClassName, overlay, overlayClassName, overlayStyle, prefixCls = config.prefixCls, placement = 'bottom-left', rootCls: externalRootCls, showAction = action, visible, onAlign, onOverlayClick, onVisibleChange, ...restProps } = props;
9
+ const { action = ['hover'], align, alignPoint, arrow = false, autoDestroy, builtinPlacements = placements, children, defaultVisible, getPopupContainer = config.getPopupContainer, hideAction = action, maskMotion, minOverlayWidthMatchTrigger, motion, openClassName, overlay, overlayClassName, overlayStyle, placement = 'bottom-left', prefixCls = config.prefixCls, rootCls: externalRootCls, showAction = action, visible, onAlign, onOverlayClick, onVisibleChange, ...restProps } = props;
10
10
  const triggerRef = React.useRef(null);
11
11
  const [triggerVisible, setTriggerVisible] = React.useState(defaultVisible);
12
12
  const mergedVisible = 'visible' in restProps ? visible : triggerVisible;
@@ -68,7 +68,7 @@ export const Drop = React.forwardRef((props, ref) => {
68
68
  motionDeadline: 300,
69
69
  motionName: getMotionName(prefixCls || config.prefixCls, 'slide-bottom-small'),
70
70
  ...motion,
71
- }, popupPlacement: placement, popupStyle: overlayStyle, popupVisible: mergedVisible, prefixCls: rootCls, showAction: Array.isArray(showAction) ? showAction : [showAction], stretch: getMinOverlayWidthMatchTrigger() ? 'minWidth' : '', ...restProps, onPopupAlign: onAlign, onOpenChange: onPopupVisibleChange }, renderChildren()));
71
+ }, popupPlacement: placement, popupStyle: overlayStyle, popupVisible: mergedVisible, prefixCls: rootCls, showAction: Array.isArray(showAction) ? showAction : [showAction], stretch: getMinOverlayWidthMatchTrigger() ? 'minWidth' : '', ...restProps, onOpenChange: onPopupVisibleChange, onPopupAlign: onAlign }, renderChildren()));
72
72
  });
73
73
  if (process.env.NODE_ENV !== 'production') {
74
74
  Drop.displayName = 'Drop';
@@ -8,30 +8,30 @@ const defaultElement = 'div';
8
8
  const alignContentMap = new Map([
9
9
  ['around', 'around'],
10
10
  ['between', 'between'],
11
- ['end', 'right'],
12
11
  ['center', 'middle'],
12
+ ['end', 'right'],
13
13
  ['start', 'left'],
14
14
  ['stretch', 'stretch'],
15
15
  ]);
16
16
  const alignItemsMap = new Map([
17
- ['end', 'bottom'],
18
17
  ['center', 'middle'],
18
+ ['end', 'bottom'],
19
19
  ['start', 'top'],
20
20
  ['stretch', 'stretch'],
21
21
  ]);
22
22
  const justifyContentMap = new Map([
23
23
  ['around', 'around'],
24
24
  ['between', 'between'],
25
- ['end', 'right'],
26
25
  ['center', 'center'],
26
+ ['end', 'right'],
27
27
  ['start', 'left'],
28
28
  ]);
29
29
  function mapJustifyContentBreakpoints(value) {
30
30
  const config = {};
31
31
  for (const key in value) {
32
- // @ts-ignore
32
+ // @ts-ignore its fine
33
33
  if (justifyContentMap.has(value[key])) {
34
- // @ts-ignore
34
+ // @ts-ignore its fine
35
35
  config[key] = justifyContentMap.get(value[key]);
36
36
  }
37
37
  }
@@ -53,11 +53,11 @@ export function Flex(props) {
53
53
  }), [rootCls]);
54
54
  return (React.createElement(FlexContext.Provider, { value: context },
55
55
  React.createElement(Component, { className: classNames({
56
- [rootCls]: !inline,
57
- [`${rootCls}-inline`]: inline,
58
56
  [`${rootCls}-${alignItemsMap.get(alignItems)}`]: alignItems && alignItemsMap.has(alignItems),
59
57
  [`${rootCls}-${flexDirection}`]: flexDirection !== undefined,
60
58
  [`${rootCls}-${flexWrap}`]: flexWrap !== undefined,
59
+ [`${rootCls}-inline`]: inline,
61
60
  [`${rootCls}-wrap-${alignContentMap.get(alignContent)}`]: alignContent && alignContentMap.has(alignContent),
61
+ [rootCls]: !inline,
62
62
  }, justifyContentCls, className), component: defaultElement, ...restProps })));
63
63
  }
@@ -11,10 +11,10 @@ export function Grid(props) {
11
11
  const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'grid'), [config, prefixCls]);
12
12
  return (React.createElement(Component, { className: classNames(rootCls, {
13
13
  [`${rootCls}-${gap}`]: gap !== undefined,
14
- [`${rootCls}-row-${rowGap}`]: rowGap !== undefined,
15
14
  [`${rootCls}-column-${columnGap}`]: columnGap !== undefined,
16
- [`${rootCls}-margin-${margin}`]: margin !== undefined,
17
15
  [`${rootCls}-divider`]: divider,
16
+ [`${rootCls}-margin-${margin}`]: margin !== undefined,
18
17
  [`${rootCls}-match`]: match,
18
+ [`${rootCls}-row-${rowGap}`]: rowGap !== undefined,
19
19
  }, childWithClassName, className), component: defaultElement, "data-uk-grid": "margin: ", ...restProps }));
20
20
  }
@@ -5,7 +5,7 @@ import { useConfig } from '../../components/ConfigProvider';
5
5
  const defaultElement = 'div';
6
6
  export function Heading(props) {
7
7
  const config = useConfig();
8
- const { children, className, prefixCls = config.prefixCls, size, decoration, ...restProps } = props;
8
+ const { children, className, decoration, prefixCls = config.prefixCls, size, ...restProps } = props;
9
9
  const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'heading'), [config, prefixCls]);
10
10
  return (React.createElement(Component, { className: classNames({
11
11
  [`${rootCls}-${decoration}`]: decoration !== undefined,
@@ -11,9 +11,9 @@ export function Icon(props) {
11
11
  return null;
12
12
  }
13
13
  return (React.createElement(Component, { className: classNames(rootCls, {
14
+ [`${rootCls}-${mode}`]: mode !== undefined,
14
15
  [`${rootCls}-button`]: type === 'button',
15
16
  [`${rootCls}-material`]: material,
16
17
  [`${rootCls}-round`]: material && round,
17
- [`${rootCls}-${mode}`]: mode !== undefined,
18
18
  }, className), component: defaultElement, ...restProps }, material ? React.createElement("i", null, icon) : children));
19
19
  }
@@ -9,9 +9,9 @@ export var ColorMode;
9
9
  })(ColorMode || (ColorMode = {}));
10
10
  /* eslint-disable react/no-multi-comp */
11
11
  export const lib = {
12
- [ColorMode.Dark]: () => (React.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
12
+ [ColorMode.Dark]: () => (React.createElement("svg", { fill: "none", height: "24", viewBox: "0 0 24 24", width: "24", xmlns: "http://www.w3.org/2000/svg" },
13
13
  React.createElement("path", { d: "M13.1029 7.74566C13.1908 7.74566 13.2468 7.68401 13.2627 7.59923C13.5105 6.31985 13.5025 6.28902 14.8931 6.03468C14.981 6.01156 15.045 5.96532 15.045 5.87283C15.045 5.77264 14.981 5.7264 14.8931 5.71098C13.5025 5.44123 13.5425 5.4104 13.2627 4.13873C13.2468 4.05395 13.1908 4 13.1029 4C13.007 4 12.951 4.05395 12.9351 4.13873C12.6553 5.4104 12.7033 5.44123 11.3047 5.71098C11.2168 5.7264 11.1608 5.77264 11.1608 5.87283C11.1608 5.96532 11.2168 6.01156 11.3047 6.03468C12.7033 6.30443 12.6793 6.31985 12.9351 7.59923C12.951 7.68401 13.007 7.74566 13.1029 7.74566ZM16.9231 12.9557C17.0669 12.9557 17.1708 12.8555 17.1948 12.7091C17.4505 10.6435 17.5624 10.5973 19.7283 10.2582C19.8961 10.2351 20 10.1503 20 9.99615C20 9.84971 19.8961 9.76493 19.7602 9.7341C17.5784 9.33333 17.4505 9.34875 17.1948 7.28324C17.1708 7.1368 17.0669 7.03661 16.9231 7.03661C16.7792 7.03661 16.6673 7.1368 16.6513 7.27553C16.3796 9.36416 16.2997 9.43353 14.0859 9.7341C13.95 9.75723 13.8462 9.84971 13.8462 9.99615C13.8462 10.1426 13.95 10.2351 14.0859 10.2582C16.2997 10.6667 16.3716 10.6667 16.6513 12.7245C16.6673 12.8555 16.7792 12.9557 16.9231 12.9557ZM10.9051 20C13.7902 20 16.1319 18.6127 17.2028 16.2158C17.3227 15.9383 17.3067 15.7071 17.1628 15.5607C17.043 15.4528 16.8272 15.4297 16.5794 15.5222C15.9241 15.7765 15.1648 15.8921 14.2937 15.8921C10.6813 15.8921 8.33966 13.711 8.33966 10.2813C8.33966 9.41041 8.50749 8.43931 8.77922 7.90751C8.92308 7.63006 8.91508 7.39884 8.7952 7.25241C8.65934 7.09827 8.41159 7.07514 8.09191 7.19846C5.63836 8.13873 4 10.6127 4 13.4412C4 17.1869 6.86114 20 10.9051 20Z", fill: "#6C86AD" }))),
14
- [ColorMode.Light]: () => (React.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
14
+ [ColorMode.Light]: () => (React.createElement("svg", { fill: "none", height: "24", viewBox: "0 0 24 24", width: "24", xmlns: "http://www.w3.org/2000/svg" },
15
15
  React.createElement("path", { d: "M12 9C13.65 9 15 10.35 15 12C15 13.65 13.65 15 12 15C10.35 15 9 13.65 9 12C9 10.35 10.35 9 12 9ZM12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C14.76 17 17 14.76 17 12C17 9.24 14.76 7 12 7ZM2 13H4C4.55 13 5 12.55 5 12C5 11.45 4.55 11 4 11H2C1.45 11 1 11.45 1 12C1 12.55 1.45 13 2 13ZM20 13H22C22.55 13 23 12.55 23 12C23 11.45 22.55 11 22 11H20C19.45 11 19 11.45 19 12C19 12.55 19.45 13 20 13ZM11 2V4C11 4.55 11.45 5 12 5C12.55 5 13 4.55 13 4V2C13 1.45 12.55 1 12 1C11.45 1 11 1.45 11 2ZM11 20V22C11 22.55 11.45 23 12 23C12.55 23 13 22.55 13 22V20C13 19.45 12.55 19 12 19C11.45 19 11 19.45 11 20ZM5.99 4.58C5.6 4.19 4.96 4.19 4.58 4.58C4.19 4.97 4.19 5.61 4.58 5.99L5.64 7.05C6.03 7.44 6.67 7.44 7.05 7.05C7.43 6.66 7.44 6.02 7.05 5.64L5.99 4.58ZM18.36 16.95C17.97 16.56 17.33 16.56 16.95 16.95C16.56 17.34 16.56 17.98 16.95 18.36L18.01 19.42C18.4 19.81 19.04 19.81 19.42 19.42C19.81 19.03 19.81 18.39 19.42 18.01L18.36 16.95ZM19.42 5.99C19.81 5.6 19.81 4.96 19.42 4.58C19.03 4.19 18.39 4.19 18.01 4.58L16.95 5.64C16.56 6.03 16.56 6.67 16.95 7.05C17.34 7.43 17.98 7.44 18.36 7.05L19.42 5.99ZM7.05 18.36C7.44 17.97 7.44 17.33 7.05 16.95C6.66 16.56 6.02 16.56 5.64 16.95L4.58 18.01C4.19 18.4 4.19 19.04 4.58 19.42C4.97 19.8 5.61 19.81 5.99 19.42L7.05 18.36Z", fill: "#6C86AD" }))),
16
16
  };
17
17
  export const InverseContext = React.createContext(null);
@@ -35,12 +35,12 @@ export function Modal(props) {
35
35
  }, [config.prefixCls, prefixCls, visible]);
36
36
  return (React.createElement(Dialog, { className: classNames(className, {
37
37
  [`${rootCls}-centered`]: centered && !full,
38
- }), focusTriggerAfterClose: focusTriggerAfterClose, maskTransitionName: defaultMaskTransitionName, mousePosition: mousePosition, prefixCls: rootCls, transitionName: defaultTransitionName, visible: visible, ...restProps, onClose: onClose, afterClose: afterClose, classNames: {
38
+ }), focusTriggerAfterClose: focusTriggerAfterClose, maskTransitionName: defaultMaskTransitionName, mousePosition: mousePosition, prefixCls: rootCls, transitionName: defaultTransitionName, visible: visible, ...restProps, afterClose: afterClose, classNames: {
39
39
  ...restProps.classNames,
40
40
  wrapper: classNames({
41
41
  [`${rootCls}-full`]: full && !centered,
42
42
  }),
43
- }, closable: false, closeIcon: null },
43
+ }, closable: false, closeIcon: null, onClose: onClose },
44
44
  closable && (closeIcon || (React.createElement(Close, { className: classNames({
45
45
  [`${rootCls}-close-default`]: !full,
46
46
  [`${rootCls}-close-full`]: full,
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { type NavItemGroupType } from '../../../components/Nav/types';
3
3
  export interface NavItemGroupProps extends Omit<NavItemGroupType, 'children' | 'type' | 'label'> {
4
- title?: React.ReactNode;
5
4
  children?: React.ReactNode;
6
5
  /** @private Internal filled key. Do not set it directly */
7
6
  eventKey?: string;
7
+ title?: React.ReactNode;
8
8
  /** @private Do not use. Private warning empty usage */
9
9
  warnKey?: boolean;
10
10
  }
@@ -2,9 +2,9 @@ import * as React from 'react';
2
2
  export interface HeaderProps {
3
3
  children: React.ReactNode;
4
4
  className?: string;
5
- style?: React.CSSProperties;
6
5
  /** @private Internal filled key. Do not set it directly */
7
6
  eventKey?: string;
7
+ style?: React.CSSProperties;
8
8
  /** @private Do not use. Private warning empty usage */
9
9
  warnKey?: boolean;
10
10
  }
@@ -70,11 +70,11 @@ export function InternalNavItem({ children, className, disabled, eventKey, itemI
70
70
  if (role === 'option') {
71
71
  optionRoleProps['aria-selected'] = selected || false;
72
72
  }
73
- let renderNode = (React.createElement(LegacyNavItem, { "aria-disabled": disabled, className: classNames({
73
+ let renderNode = (React.createElement(LegacyNavItem, { ref: legacyNavItemRef, "aria-disabled": disabled, className: classNames({
74
74
  [`${config.prefixCls}-active`]: selected,
75
75
  [`${config.prefixCls}-disabled`]: disabled,
76
76
  [`${config.prefixCls}-hover`]: active,
77
- }, className), component: "li", "data-nav-id": overflowDisabled && domDataId ? null : domDataId, elementRef: elementRef, ref: legacyNavItemRef, role: role === null ? 'none' : role || 'menuitem', style: {
77
+ }, className), component: "li", "data-nav-id": overflowDisabled && domDataId ? null : domDataId, elementRef: elementRef, role: role === null ? 'none' : role || 'menuitem', style: {
78
78
  ...directionStyle,
79
79
  ...style,
80
80
  }, tabIndex: disabled ? null : -1, ...optionRoleProps, ...restProps, ...activeProps, onClick: onInternalClick, onFocus: onInternalFocus, onKeyDown: onInternalKeyDown },
@@ -88,7 +88,6 @@ export function InternalNavItem({ children, className, disabled, eventKey, itemI
88
88
  itemIcon,
89
89
  role,
90
90
  style,
91
- // eslint-disable-next-line sort-keys
92
91
  onClick,
93
92
  onFocus,
94
93
  onKeyDown,
@@ -3,6 +3,23 @@ import * as React from 'react';
3
3
  import { type BuiltinPlacements, type ItemType, type NavClickEventHandler, type NavMode, type NavModifier, type NavRef, type RenderIconType, type SelectEventHandler, type TriggerSubNavAction } from '../../components/Nav/types';
4
4
  import { type Direction } from '../../types';
5
5
  export interface NavProps extends Omit<React.HTMLAttributes<HTMLUListElement>, 'onClick' | 'onSelect' | 'dir'> {
6
+ /**
7
+ * @private Only used for `pro-layout`. Do not use in your prod directly,
8
+ * and we do not promise any compatibility for this.
9
+ */
10
+ _internalRenderMenuItem?: (originNode: React.ReactElement, menuItemProps: any, stateProps: {
11
+ selected: boolean;
12
+ }) => React.ReactElement;
13
+ /**
14
+ * @private Only used for `pro-layout`. Do not use in your prod directly,
15
+ * and we do not promise any compatibility for this.
16
+ */
17
+ _internalRenderSubMenuItem?: (originNode: React.ReactElement, subMenuItemProps: any, stateProps: {
18
+ active: boolean;
19
+ disabled: boolean;
20
+ open: boolean;
21
+ selected: boolean;
22
+ }) => React.ReactElement;
6
23
  activeKey?: string;
7
24
  builtinPlacements?: BuiltinPlacements;
8
25
  children?: React.ReactNode;
@@ -39,22 +56,5 @@ export interface NavProps extends Omit<React.HTMLAttributes<HTMLUListElement>, '
39
56
  onDeselect?: SelectEventHandler;
40
57
  onOpenChange?: (openKeys: string[]) => void;
41
58
  onSelect?: SelectEventHandler;
42
- /**
43
- * @private Only used for `pro-layout`. Do not use in your prod directly,
44
- * and we do not promise any compatibility for this.
45
- */
46
- _internalRenderMenuItem?: (originNode: React.ReactElement, menuItemProps: any, stateProps: {
47
- selected: boolean;
48
- }) => React.ReactElement;
49
- /**
50
- * @private Only used for `pro-layout`. Do not use in your prod directly,
51
- * and we do not promise any compatibility for this.
52
- */
53
- _internalRenderSubMenuItem?: (originNode: React.ReactElement, subMenuItemProps: any, stateProps: {
54
- selected: boolean;
55
- open: boolean;
56
- active: boolean;
57
- disabled: boolean;
58
- }) => React.ReactElement;
59
59
  }
60
60
  export declare const Nav: React.ForwardRefExoticComponent<NavProps & React.RefAttributes<NavRef>>;