@aloudata/aloudata-design 0.3.2 → 0.3.5

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 (205) hide show
  1. package/es/Breadcrumb/index.d.ts +1 -0
  2. package/es/Button/index.js +3 -2
  3. package/es/Button/style/index.less +135 -126
  4. package/es/Button/style/variables.less +53 -53
  5. package/es/Checkbox/index.d.ts +1 -0
  6. package/es/ConfigProvider/defaultRenderEmpty.d.ts +4 -0
  7. package/es/ConfigProvider/defaultRenderEmpty.js +37 -0
  8. package/es/ConfigProvider/sizeContext.d.ts +9 -0
  9. package/es/ConfigProvider/sizeContext.js +12 -0
  10. package/es/Dropdown/Button.js +3 -2
  11. package/es/Empty/image/Authority.d.ts +1 -0
  12. package/es/Empty/image/Dataspace.d.ts +1 -0
  13. package/es/Empty/image/Search.d.ts +1 -0
  14. package/es/Empty/image/Simple.d.ts +1 -0
  15. package/es/Empty/image/Worksheet.d.ts +1 -0
  16. package/es/Empty/image/empty.d.ts +1 -0
  17. package/es/Icon/icons.json +418 -0
  18. package/es/Input/components/Group/index.d.ts +3 -1
  19. package/es/Input/components/Group/index.js +6 -12
  20. package/es/Input/components/Input/index.d.ts +3 -2
  21. package/es/Input/components/Input/index.js +11 -23
  22. package/es/Input/components/Password/index.js +11 -16
  23. package/es/Input/components/TextArea/index.d.ts +8 -1
  24. package/es/Input/components/TextArea/index.js +8 -1
  25. package/es/Input/style/index.less +180 -102
  26. package/es/InputNumber/index.d.ts +1 -0
  27. package/es/InputNumber/style/index.less +69 -69
  28. package/es/Menu/Divider.d.ts +1 -0
  29. package/es/Modal/index.js +4 -7
  30. package/es/Modal/style/index.less +48 -45
  31. package/es/Navigator/components/Header/index.d.ts +1 -0
  32. package/es/Navigator/components/Menu/index.d.ts +1 -0
  33. package/es/PageHeader/index.d.ts +3 -0
  34. package/es/PageHeader/index.js +3 -0
  35. package/es/PageHeader/style/index.d.ts +2 -0
  36. package/es/PageHeader/style/index.js +2 -0
  37. package/es/PageHeader/style/index.less +1 -0
  38. package/es/Popover/index.d.ts +1 -0
  39. package/es/Radio/components/Group/index.d.ts +6 -0
  40. package/es/Radio/components/Group/index.js +74 -0
  41. package/es/Radio/components/Radio/index.d.ts +3 -0
  42. package/es/Radio/components/Radio/index.js +95 -0
  43. package/es/Radio/index.d.ts +9 -2
  44. package/es/Radio/index.js +5 -3
  45. package/es/Radio/interface/radio.d.ts +24 -0
  46. package/es/Radio/interface/radio.js +1 -0
  47. package/es/Radio/interface/radioGroup.d.ts +42 -0
  48. package/es/Radio/interface/radioGroup.js +1 -0
  49. package/es/Radio/style/index.less +348 -0
  50. package/es/Select/index.js +1 -1
  51. package/es/Select/rc-select/OptionList.js +3 -2
  52. package/es/Select/rc-select/hooks/useOptions.d.ts +1 -1
  53. package/es/Select/style/index.less +50 -49
  54. package/es/Select/style/variables.less +45 -45
  55. package/es/Select/utils/iconUtil.d.ts +2 -2
  56. package/es/Select/utils/iconUtil.js +6 -4
  57. package/es/Steps/components/ProcessIcon/index.d.ts +6 -0
  58. package/es/Steps/components/ProcessIcon/index.js +8 -0
  59. package/es/Steps/components/Step/index.d.ts +20 -0
  60. package/es/Steps/components/Step/index.js +45 -0
  61. package/es/Steps/index.d.ts +36 -2
  62. package/es/Steps/index.js +30 -1
  63. package/es/Steps/matchMedia.mock.d.ts +1 -0
  64. package/es/Steps/matchMedia.mock.js +17 -0
  65. package/es/Steps/style/index.less +251 -0
  66. package/es/Switch/index.d.ts +46 -2
  67. package/es/Switch/index.js +71 -1
  68. package/es/Switch/style/index.less +129 -0
  69. package/es/Table/Table.d.ts +2 -1
  70. package/es/Table/Table.js +223 -330
  71. package/es/Table/components/Empty/index.d.ts +3 -0
  72. package/es/Table/components/Empty/index.js +16 -0
  73. package/es/Table/components/Loading/index.d.ts +3 -0
  74. package/es/Table/components/Loading/index.js +18 -0
  75. package/es/Table/components/TableBodyRowList/index.d.ts +13 -0
  76. package/es/Table/components/TableBodyRowList/index.js +91 -0
  77. package/es/Table/components/TableHead/index.d.ts +23 -0
  78. package/es/Table/components/TableHead/index.js +262 -0
  79. package/es/Table/constant.d.ts +1 -0
  80. package/es/Table/constant.js +1 -0
  81. package/es/Table/hooks/useFrame.d.ts +7 -0
  82. package/es/Table/hooks/useFrame.js +90 -0
  83. package/es/Table/hooks/useTableColumn.d.ts +28 -0
  84. package/es/Table/hooks/useTableColumn.js +53 -0
  85. package/es/Table/interface.d.ts +3 -2
  86. package/es/Table/style/index.less +41 -37
  87. package/es/Table/style/index.less.d.ts +126 -0
  88. package/es/Table/style/variable.less +10 -0
  89. package/es/Table/style/variable.less.d.ts +7 -0
  90. package/es/Table/utils.d.ts +15 -0
  91. package/es/Table/utils.js +131 -0
  92. package/es/Tabs/index.js +3 -2
  93. package/es/Tabs/style/index.less +25 -25
  94. package/es/_utils/hooks/useId.d.ts +4 -0
  95. package/es/_utils/hooks/useId.js +23 -0
  96. package/es/index.d.ts +7 -5
  97. package/es/index.js +2 -1
  98. package/es/locale-provider/index.d.ts +5 -1
  99. package/es/style/index.d.ts +0 -1
  100. package/es/style/index.js +0 -1
  101. package/es/style/index.less +2 -2
  102. package/es/style/themes/default/index.less +30 -30
  103. package/lib/Breadcrumb/index.d.ts +1 -0
  104. package/lib/Button/index.js +5 -3
  105. package/lib/Button/style/index.less +135 -126
  106. package/lib/Button/style/variables.less +53 -53
  107. package/lib/Checkbox/index.d.ts +1 -0
  108. package/lib/ConfigProvider/defaultRenderEmpty.d.ts +4 -0
  109. package/lib/ConfigProvider/defaultRenderEmpty.js +55 -0
  110. package/lib/ConfigProvider/sizeContext.d.ts +9 -0
  111. package/lib/ConfigProvider/sizeContext.js +30 -0
  112. package/lib/Dropdown/Button.js +7 -5
  113. package/lib/Empty/image/Authority.d.ts +1 -0
  114. package/lib/Empty/image/Dataspace.d.ts +1 -0
  115. package/lib/Empty/image/Search.d.ts +1 -0
  116. package/lib/Empty/image/Simple.d.ts +1 -0
  117. package/lib/Empty/image/Worksheet.d.ts +1 -0
  118. package/lib/Empty/image/empty.d.ts +1 -0
  119. package/lib/Icon/icons.json +418 -0
  120. package/lib/Input/components/Group/index.d.ts +3 -1
  121. package/lib/Input/components/Group/index.js +7 -12
  122. package/lib/Input/components/Input/index.d.ts +3 -2
  123. package/lib/Input/components/Input/index.js +13 -23
  124. package/lib/Input/components/Password/index.js +13 -17
  125. package/lib/Input/components/TextArea/index.d.ts +8 -1
  126. package/lib/Input/components/TextArea/index.js +10 -1
  127. package/lib/Input/style/index.less +180 -102
  128. package/lib/InputNumber/index.d.ts +1 -0
  129. package/lib/InputNumber/style/index.less +69 -69
  130. package/lib/Menu/Divider.d.ts +1 -0
  131. package/lib/Modal/index.js +8 -10
  132. package/lib/Modal/style/index.less +48 -45
  133. package/lib/Navigator/components/Header/index.d.ts +1 -0
  134. package/lib/Navigator/components/Menu/index.d.ts +1 -0
  135. package/lib/PageHeader/index.d.ts +3 -0
  136. package/lib/PageHeader/index.js +15 -0
  137. package/lib/PageHeader/style/index.d.ts +2 -0
  138. package/lib/PageHeader/style/index.js +5 -0
  139. package/lib/PageHeader/style/index.less +1 -0
  140. package/lib/Popover/index.d.ts +1 -0
  141. package/lib/Radio/components/Group/index.d.ts +6 -0
  142. package/lib/Radio/components/Group/index.js +95 -0
  143. package/lib/Radio/components/Radio/index.d.ts +3 -0
  144. package/lib/Radio/components/Radio/index.js +115 -0
  145. package/lib/Radio/index.d.ts +9 -2
  146. package/lib/Radio/index.js +5 -3
  147. package/lib/Radio/interface/radio.d.ts +24 -0
  148. package/lib/Radio/interface/radio.js +5 -0
  149. package/lib/Radio/interface/radioGroup.d.ts +42 -0
  150. package/lib/Radio/interface/radioGroup.js +5 -0
  151. package/lib/Radio/style/index.less +348 -0
  152. package/lib/Select/index.js +1 -1
  153. package/lib/Select/rc-select/OptionList.js +7 -5
  154. package/lib/Select/rc-select/hooks/useOptions.d.ts +1 -1
  155. package/lib/Select/style/index.less +50 -49
  156. package/lib/Select/style/variables.less +45 -45
  157. package/lib/Select/utils/iconUtil.d.ts +2 -2
  158. package/lib/Select/utils/iconUtil.js +10 -8
  159. package/lib/Steps/components/ProcessIcon/index.d.ts +6 -0
  160. package/lib/Steps/components/ProcessIcon/index.js +19 -0
  161. package/lib/Steps/components/Step/index.d.ts +20 -0
  162. package/lib/Steps/components/Step/index.js +61 -0
  163. package/lib/Steps/index.d.ts +36 -2
  164. package/lib/Steps/index.js +34 -1
  165. package/lib/Steps/matchMedia.mock.d.ts +1 -0
  166. package/lib/Steps/matchMedia.mock.js +17 -0
  167. package/lib/Steps/style/index.less +251 -0
  168. package/lib/Switch/index.d.ts +46 -2
  169. package/lib/Switch/index.js +78 -1
  170. package/lib/Switch/style/index.less +129 -0
  171. package/lib/Table/Table.d.ts +2 -1
  172. package/lib/Table/Table.js +229 -332
  173. package/lib/Table/components/Empty/index.d.ts +3 -0
  174. package/lib/Table/components/Empty/index.js +28 -0
  175. package/lib/Table/components/Loading/index.d.ts +3 -0
  176. package/lib/Table/components/Loading/index.js +31 -0
  177. package/lib/Table/components/TableBodyRowList/index.d.ts +13 -0
  178. package/lib/Table/components/TableBodyRowList/index.js +110 -0
  179. package/lib/Table/components/TableHead/index.d.ts +23 -0
  180. package/lib/Table/components/TableHead/index.js +286 -0
  181. package/lib/Table/constant.d.ts +1 -0
  182. package/lib/Table/constant.js +1 -0
  183. package/lib/Table/hooks/useFrame.d.ts +7 -0
  184. package/lib/Table/hooks/useFrame.js +98 -0
  185. package/lib/Table/hooks/useTableColumn.d.ts +28 -0
  186. package/lib/Table/hooks/useTableColumn.js +66 -0
  187. package/lib/Table/interface.d.ts +3 -2
  188. package/lib/Table/style/index.less +41 -37
  189. package/lib/Table/style/index.less.d.ts +126 -0
  190. package/lib/Table/style/variable.less +10 -0
  191. package/lib/Table/style/variable.less.d.ts +7 -0
  192. package/lib/Table/utils.d.ts +15 -0
  193. package/lib/Table/utils.js +147 -0
  194. package/lib/Tabs/index.js +5 -3
  195. package/lib/Tabs/style/index.less +25 -25
  196. package/lib/_utils/hooks/useId.d.ts +4 -0
  197. package/lib/_utils/hooks/useId.js +36 -0
  198. package/lib/index.d.ts +7 -5
  199. package/lib/index.js +8 -0
  200. package/lib/locale-provider/index.d.ts +5 -1
  201. package/lib/style/index.d.ts +0 -1
  202. package/lib/style/index.js +0 -2
  203. package/lib/style/index.less +2 -2
  204. package/lib/style/themes/default/index.less +30 -30
  205. package/package.json +2 -1
@@ -0,0 +1,95 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+
5
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+
7
+ import classNames from 'classnames';
8
+ import React, { useContext, useEffect, useRef } from 'react';
9
+ import _ from 'lodash';
10
+ import { RadioGroupContext } from '../Group';
11
+ import { getUUID } from '../../../_utils/hooks/useId';
12
+ export default function Radio(props) {
13
+ var groupContext = useContext(RadioGroupContext);
14
+ var labelRef = useRef(null);
15
+ var id = getUUID().toString();
16
+
17
+ var radioProps = _objectSpread({}, props);
18
+
19
+ if (!_.isEmpty(groupContext)) {
20
+ radioProps.disabled = props.disabled;
21
+ radioProps.checked = !props.disabled && groupContext.value === props.value;
22
+ } else {
23
+ radioProps.checked = !('checked' in props) ? props.defaultChecked : radioProps.checked;
24
+ } // 设置input外层盒子的class
25
+
26
+
27
+ var aldRadioClass = classNames('ald-radio', {
28
+ 'ald-radio-checked': radioProps.checked,
29
+ 'ald-radio-disabled': radioProps.disabled
30
+ }); // 根据属性设置最外层的class
31
+
32
+ var getWrapperClass = function getWrapperClass() {
33
+ var otherClass = '';
34
+
35
+ if (groupContext.type === 'button') {
36
+ if (groupContext.radioGroupStyle === 'filled') {
37
+ otherClass = 'ald-radio-button-wrapper-filled';
38
+ } else {
39
+ otherClass = 'ald-radio-button-wrapper-border';
40
+ }
41
+ } else if (groupContext.type === 'iconButton') {
42
+ if (groupContext.radioGroupStyle === 'filled') {
43
+ otherClass = 'ald-radio-icon-button-wrapper-filled';
44
+ } else {
45
+ otherClass = 'ald-radio-icon-button-wrapper-border';
46
+ }
47
+ } else {
48
+ // 当type未设置或者是radio时
49
+ otherClass = 'ald-radio-wrapper';
50
+ }
51
+
52
+ return classNames('ald-radio-label', otherClass, {
53
+ 'ald-radio-wrapper-checked': radioProps.checked,
54
+ 'ald-radio-wrapper-disabled': radioProps.disabled
55
+ });
56
+ }; // filled button模式下,更改滑块的位置
57
+
58
+
59
+ useEffect(function () {
60
+ var _groupContext$sliderR;
61
+
62
+ if (radioProps.checked && (groupContext === null || groupContext === void 0 ? void 0 : (_groupContext$sliderR = groupContext.sliderRef) === null || _groupContext$sliderR === void 0 ? void 0 : _groupContext$sliderR.current) && (labelRef === null || labelRef === void 0 ? void 0 : labelRef.current)) {
63
+ groupContext.sliderRef.current.style.left = "".concat(labelRef.current.offsetLeft, "px");
64
+ groupContext.sliderRef.current.style.width = "".concat(labelRef.current.offsetWidth, "px");
65
+ }
66
+ }, [groupContext.sliderRef, radioProps.checked]);
67
+
68
+ var onChange = function onChange() {
69
+ if (groupContext === null || groupContext === void 0 ? void 0 : groupContext.onChange) {
70
+ // console.log(e);
71
+ // input事件的value会被toString,所以此处进行一个覆盖
72
+ groupContext.onChange(props.value);
73
+ }
74
+ };
75
+
76
+ return /*#__PURE__*/React.createElement("label", {
77
+ className: getWrapperClass(),
78
+ htmlFor: id,
79
+ ref: labelRef
80
+ }, /*#__PURE__*/React.createElement("span", {
81
+ className: aldRadioClass
82
+ }, /*#__PURE__*/React.createElement("input", {
83
+ id: id,
84
+ type: "radio",
85
+ className: "ald-radio-input",
86
+ checked: radioProps.checked,
87
+ disabled: radioProps.disabled,
88
+ value: props.value,
89
+ onChange: onChange
90
+ }), /*#__PURE__*/React.createElement("span", {
91
+ className: "ald-radio-inner"
92
+ })), /*#__PURE__*/React.createElement("span", {
93
+ className: "ald-radio-desc"
94
+ }, props.children));
95
+ }
@@ -1,3 +1,10 @@
1
- import { Radio } from 'antd';
2
- export { RadioGroupButtonStyle, RadioGroupOptionType, RadioGroupProps, RadioGroupContextProps, RadioProps, RadioChangeEventTarget, RadioChangeEvent, } from 'antd/lib/radio';
1
+ /// <reference types="react" />
2
+ import RadioGroup from './components/Group';
3
+ import { IRadioProps } from './interface/radio';
4
+ export type { IRadioProps as RadioProps } from './interface/radio';
5
+ export type { IRadioGroupProps as RadioGroupProps } from './interface/radioGroup';
6
+ interface IRadioType extends React.FC<IRadioProps> {
7
+ Group: typeof RadioGroup;
8
+ }
9
+ declare const Radio: IRadioType;
3
10
  export default Radio;
package/es/Radio/index.js CHANGED
@@ -1,3 +1,5 @@
1
- import "antd/es/radio/style";
2
- import _Radio from "antd/es/radio";
3
- export default _Radio;
1
+ import InternalRadio from './components/Radio';
2
+ import RadioGroup from './components/Group';
3
+ var Radio = InternalRadio;
4
+ Radio.Group = RadioGroup;
5
+ export default Radio;
@@ -0,0 +1,24 @@
1
+ import { ReactNode } from 'react';
2
+ export interface IRadioProps {
3
+ /**
4
+ * @description 当前元素是否选中
5
+ * @default false
6
+ */
7
+ checked?: boolean;
8
+ /**
9
+ * @description 当前元素是否默认选中
10
+ * @default false
11
+ */
12
+ defaultChecked?: boolean;
13
+ /**
14
+ * @description 当前元素是否禁用
15
+ * @default false
16
+ */
17
+ disabled?: boolean;
18
+ /**
19
+ * @description 当前元素的value值,与Group中的value匹配
20
+ * @default -
21
+ */
22
+ value?: any;
23
+ children?: ReactNode[] | ReactNode;
24
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,42 @@
1
+ import { ReactNode } from 'react';
2
+ export declare type TRadioGroupStyle = 'border' | 'filled';
3
+ export declare type TRadioSize = 'large' | 'middle' | 'small' | 'default';
4
+ export declare type TRadioType = 'radio' | 'button' | 'iconButton';
5
+ export interface IRadioGroupProps {
6
+ /**
7
+ * @description 按钮组的样式 'border' | 'filled'
8
+ * @default 'border'
9
+ */
10
+ radioGroupStyle?: TRadioGroupStyle;
11
+ /**
12
+ * @description 按钮组的默认选项,按钮组为非受控组件请勿使用value设置默认值
13
+ * @default -
14
+ */
15
+ defaultValue?: any;
16
+ /**
17
+ * @description 设置按钮组的大小,有'large' | 'middle'('default') | 'small
18
+ * @default 'middle'
19
+ */
20
+ size?: TRadioSize;
21
+ /**
22
+ * @description 当按钮组为受控组件时,设置按钮组的当前选中的值
23
+ * @default -
24
+ */
25
+ value?: any;
26
+ /**
27
+ * @description 当按钮组选中值变化时的回调函数
28
+ * @default -
29
+ */
30
+ onChange?: (selectedValue: any) => void;
31
+ /**
32
+ * @description 设置按钮组的类型 'radio' | 'button' | 'iconButton'
33
+ * @default 'radio'
34
+ */
35
+ type?: TRadioType;
36
+ /**
37
+ * @description 按钮组最外层盒子的类名
38
+ * @default -
39
+ */
40
+ className?: string;
41
+ children?: ReactNode[] | ReactNode;
42
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,349 @@
1
1
  @import '../../style/index.less';
2
+
3
+ @radio-icon-button-padding-large: 10px;
4
+ @radio-icon-button-padding-middle: 9px;
5
+ @radio-icon-button-padding-small: 8px;
6
+ @radio-group-height-large: 36px;
7
+ @radio-group-height-middle: 32px;
8
+ @radio-group-height-small: 28px;
9
+ @radio-button-padding: 12px;
10
+
11
+ // Radio组件基础样式
12
+ .ald-radio-wrapper {
13
+ display: inline-flex;
14
+ gap: 8px;
15
+ align-items: center;
16
+ justify-content: start;
17
+ height: 20px;
18
+ padding: 0;
19
+ cursor: pointer;
20
+ }
21
+
22
+ .ald-radio {
23
+ position: relative;
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: center;
27
+ width: 20px;
28
+ height: 20px;
29
+ }
30
+
31
+ .ald-radio-input {
32
+ position: absolute;
33
+ z-index: 1;
34
+ width: 1px;
35
+ height: 1px;
36
+ cursor: pointer;
37
+ opacity: 0;
38
+ inset: 0;
39
+ }
40
+
41
+ .ald-radio-inner {
42
+ position: relative;
43
+ display: inline-block;
44
+ width: 17px;
45
+ height: 17px;
46
+ border: 1px solid @NL90;
47
+ border-radius: 50%;
48
+ }
49
+
50
+ .ald-radio-desc {
51
+ z-index: 2;
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: center;
55
+ color: @NL0;
56
+ font-weight: 400;
57
+ }
58
+ // 绘制选中时的圆圈样式
59
+ .ald-radio-checked > .ald-radio-inner {
60
+ background-color: @B60;
61
+ border: 0;
62
+ transform: background 0.5s ease;
63
+
64
+ &::after {
65
+ position: absolute;
66
+ top: 50%;
67
+ left: 50%;
68
+ width: 6px;
69
+ height: 6px;
70
+ background-color: @ND0;
71
+ border-radius: 50%;
72
+ transform: translate(-50%, -50%);
73
+ content: '';
74
+ }
75
+ }
76
+ // 禁用状态下的样式
77
+ .ald-radio-disabled > .ald-radio-inner {
78
+ background-color: @NL90;
79
+ border: 0;
80
+ }
81
+
82
+ .ald-radio-disabled.ald-radio-checked > .ald-radio-inner::after {
83
+ position: absolute;
84
+ top: 50%;
85
+ left: 50%;
86
+ width: 6px;
87
+ height: 6px;
88
+ background: @NL90;
89
+ border-radius: 50%;
90
+ transform: translate(-50%, -50%);
91
+ content: '';
92
+ }
93
+ // 禁用的样式
94
+ .ald-radio-label.ald-radio-wrapper-disabled {
95
+ cursor: default;
96
+
97
+ .ald-radio-desc {
98
+ color: @NL60;
99
+ }
100
+ }
101
+ // RadioGroup基础样式
102
+ .ald-radio-group {
103
+ position: relative;
104
+
105
+ .ald-radio-label .ald-radio-desc {
106
+ color: @NL30;
107
+ font-weight: 500;
108
+ font-size: @font-size-middle;
109
+ font-style: normal;
110
+ }
111
+
112
+ &.ald-radio-group-radio {
113
+ .ald-radio-desc {
114
+ color: @NL0;
115
+ font-weight: 400;
116
+ }
117
+ }
118
+
119
+ .ald-radio-wrapper:not(:first-child) {
120
+ margin-left: 16px;
121
+ }
122
+ }
123
+
124
+ // filled填充样式下的滑块样式
125
+ .ald-radio-filled-slider {
126
+ position: absolute;
127
+ top: 0;
128
+ left: 0;
129
+ z-index: 1;
130
+ width: 0;
131
+ height: 100%;
132
+ background: @BG100;
133
+ border: 1px solid @NL90;
134
+ border-radius: @border-radius-middle;
135
+ transition: width, left, height 0.3s, 0.3s, 0.3s ease;
136
+ }
137
+
138
+ // button状态下的样式
139
+ .ald-radio-group-button,
140
+ .ald-radio-group-icon-button {
141
+ display: flex;
142
+ align-items: flex-start;
143
+ box-sizing: border-box;
144
+ width: min-content;
145
+ width: auto;
146
+ padding: 0;
147
+ overflow: hidden;
148
+
149
+ .ald-radio-label {
150
+ color: @NL30;
151
+ font-size: @font-size-middle;
152
+ }
153
+ // 按钮样式禁用的文字颜色
154
+ .ald-radio-wrapper-disabled {
155
+ .ald-radio-desc {
156
+ color: @NL80;
157
+ }
158
+ }
159
+ // border的样式
160
+ .ald-radio-button-wrapper-border {
161
+ padding: 0 @radio-button-padding - 1;
162
+ }
163
+
164
+ .ald-radio-button-wrapper-border,
165
+ .ald-radio-icon-button-wrapper-border {
166
+ position: relative;
167
+ display: flex;
168
+ align-items: center;
169
+ justify-content: center;
170
+ height: 100%;
171
+ background: @BG100;
172
+ border: 1px solid @NL90;
173
+ border-right: 1px solid transparent;
174
+ cursor: pointer;
175
+
176
+ &:first-child {
177
+ border-radius: 6px 0 0 6px;
178
+ }
179
+
180
+ &:last-child {
181
+ border-right: 1px solid @NL90;
182
+ border-radius: 0 6px 6px 0;
183
+ }
184
+
185
+ .ald-radio {
186
+ width: 0;
187
+
188
+ .ald-radio-input,
189
+ .ald-radio-inner {
190
+ width: 0;
191
+ border: 0;
192
+ }
193
+ }
194
+
195
+ .ald-radio-checked > .ald-radio-inner::after {
196
+ width: 0;
197
+ }
198
+ }
199
+
200
+ // button选中状态下的样式
201
+ .ald-radio-wrapper-checked.ald-radio-button-wrapper-border,
202
+ .ald-radio-wrapper-checked.ald-radio-icon-button-wrapper-border {
203
+ background: @B98;
204
+ transition: background 0.5s ease;
205
+
206
+ .ald-radio-desc {
207
+ position: relative;
208
+ color: @NL0;
209
+ transition: text-shadow 0.5s ease;
210
+ }
211
+ }
212
+
213
+ // filled样式的button
214
+ .ald-radio-button-wrapper-filled {
215
+ padding: 0 @radio-button-padding;
216
+ }
217
+
218
+ .ald-radio-button-wrapper-filled,
219
+ .ald-radio-icon-button-wrapper-filled {
220
+ position: relative;
221
+ display: flex;
222
+ align-items: center;
223
+ justify-content: center;
224
+ height: 100%;
225
+ background-color: @BG90;
226
+ cursor: pointer;
227
+
228
+ &:first-of-type {
229
+ border-radius: @border-radius-middle 0 0 @border-radius-middle;
230
+ }
231
+
232
+ &:last-of-type {
233
+ border-radius: 0 @border-radius-middle @border-radius-middle 0;
234
+ }
235
+
236
+ .ald-radio {
237
+ width: 0;
238
+
239
+ .ald-radio-input,
240
+ .ald-radio-inner {
241
+ width: 0;
242
+ border: 0;
243
+ }
244
+ }
245
+
246
+ .ald-radio-checked > .ald-radio-inner::after {
247
+ width: 0;
248
+ }
249
+ }
250
+
251
+ .ald-radio-wrapper-checked.ald-radio-button-wrapper-filled,
252
+ .ald-radio-wrapper-checked.ald-radio-icon-button-wrapper-filled {
253
+ position: relative;
254
+
255
+ .ald-radio-desc {
256
+ position: relative;
257
+ z-index: 2;
258
+ color: @NL0;
259
+ }
260
+ }
261
+ // 各种大小
262
+ &.ald-radio-group-middle {
263
+ height: @radio-group-height-middle;
264
+
265
+ .ald-radio-icon-button-wrapper-filled {
266
+ padding: 0 @radio-icon-button-padding-middle;
267
+ }
268
+
269
+ .ald-radio-icon-button-wrapper-border {
270
+ padding: 0 @radio-icon-button-padding-middle - 1;
271
+ }
272
+
273
+ .ald-radio-label {
274
+ .ald-radio-desc {
275
+ font-size: @font-size-middle;
276
+ }
277
+ }
278
+ }
279
+
280
+ &.ald-radio-group-small {
281
+ height: @radio-group-height-small;
282
+
283
+ .ald-radio-icon-button-wrapper-filled {
284
+ padding: 0 @radio-icon-button-padding-small;
285
+ }
286
+
287
+ .ald-radio-icon-button-wrapper-border {
288
+ padding: 0 @radio-icon-button-padding-small - 1;
289
+ }
290
+
291
+ .ald-radio-label {
292
+ .ald-radio-desc {
293
+ font-size: @font-size-small;
294
+ }
295
+ }
296
+
297
+ .ald-radio-button-wrapper-border,
298
+ .ald-radio-icon-button-wrapper-border,
299
+ .ald-radio-button-wrapper-filled,
300
+ .ald-radio-icon-button-wrapper-filled {
301
+ &:first-of-type {
302
+ border-radius: @border-radius-small 0 0 @border-radius-small;
303
+ }
304
+
305
+ &:last-of-type {
306
+ border-radius: 0 @border-radius-small 0 @border-radius-small 0;
307
+ }
308
+ }
309
+
310
+ .ald-radio-filled-slider {
311
+ border-radius: @border-radius-small;
312
+ }
313
+ }
314
+
315
+ &.ald-radio-group.ald-radio-group-large {
316
+ height: @radio-group-height-large;
317
+
318
+ .ald-radio-icon-button-wrapper-filled {
319
+ padding: 0 @radio-icon-button-padding-large;
320
+ }
321
+
322
+ .ald-radio-icon-button-wrapper-border {
323
+ padding: 0 @radio-icon-button-padding-large - 1;
324
+ }
325
+
326
+ .ald-radio-label {
327
+ .ald-radio-desc {
328
+ font-size: @font-size-large;
329
+ }
330
+ }
331
+
332
+ .ald-radio-button-wrapper-border,
333
+ .ald-radio-icon-button-wrapper-border,
334
+ .ald-radio-button-wrapper-filled,
335
+ .ald-radio-icon-button-wrapper-filled {
336
+ &:first-of-type {
337
+ border-radius: @border-radius-large 0 0 @border-radius-large;
338
+ }
339
+
340
+ &:last-of-type {
341
+ border-radius: 0 @border-radius-large @border-radius-large 0;
342
+ }
343
+ }
344
+
345
+ .ald-radio-filled-slider {
346
+ border-radius: @border-radius-large;
347
+ }
348
+ }
349
+ }
@@ -23,7 +23,7 @@ import DisabledContext from 'antd/lib/config-provider/DisabledContext';
23
23
  import { FormItemInputContext } from 'antd/lib/form/context';
24
24
  import { getTransitionDirection, getTransitionName } from 'antd/lib/_util/motion';
25
25
  import { getMergedStatus, getStatusClassNames } from 'antd/lib/_util/statusUtils';
26
- import defaultRenderEmpty from 'antd/lib/config-provider/defaultRenderEmpty';
26
+ import defaultRenderEmpty from '../ConfigProvider/defaultRenderEmpty';
27
27
  import getIcons from './utils/iconUtil';
28
28
  var SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';
29
29
 
@@ -1,3 +1,5 @@
1
+ import "@aloudata/icons-react/styles/index.less";
2
+ import _CheckLine from "@aloudata/icons-react/es/icons/CheckLine";
1
3
  var _excluded = ["disabled", "title", "children", "style", "className"];
2
4
 
3
5
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -39,7 +41,6 @@ import { isPlatformMac } from './utils/platformUtil';
39
41
  import useBaseProps from './hooks/useBaseProps';
40
42
  import SelectContext from './SelectContext';
41
43
  import Checkbox from '../../Checkbox';
42
- import CheckLine from '../../Icon/icons/CheckLine';
43
44
  import colors from '../../style/themes/default/themeColor.module.less';
44
45
 
45
46
  function isTitleType(content) {
@@ -382,7 +383,7 @@ var OptionList = function OptionList(_, ref) {
382
383
  style: style
383
384
  }), !multiple && /*#__PURE__*/React.createElement("div", {
384
385
  className: 'ald-select-single-check'
385
- }, selected && /*#__PURE__*/React.createElement(CheckLine, {
386
+ }, selected && /*#__PURE__*/React.createElement(_CheckLine, {
386
387
  color: colors.B60,
387
388
  size: '1em'
388
389
  })), multiple && /*#__PURE__*/React.createElement(Checkbox, {
@@ -6,6 +6,6 @@ import type { FieldNames } from '../Select';
6
6
  */
7
7
  export default function useOptions<OptionType>(options: OptionType[], children: React.ReactNode, fieldNames: FieldNames, optionFilterProp: string, optionLabelProp: string): {
8
8
  options: OptionType[];
9
- valueOptions: Map<string | number, OptionType>;
9
+ valueOptions: Map<React.Key, OptionType>;
10
10
  labelOptions: Map<React.ReactNode, OptionType>;
11
11
  };