@aloudata/aloudata-design 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/es/Button/index.js +3 -2
  2. package/es/Button/style/index.less +135 -126
  3. package/es/Button/style/variables.less +53 -53
  4. package/es/Dropdown/Button.js +3 -2
  5. package/es/Icon/icons.json +410 -0
  6. package/es/Input/components/Group/index.d.ts +2 -1
  7. package/es/Input/components/Group/index.js +6 -12
  8. package/es/Input/components/Input/index.d.ts +3 -2
  9. package/es/Input/components/Input/index.js +11 -22
  10. package/es/Input/components/Password/index.js +11 -16
  11. package/es/Input/style/index.less +102 -102
  12. package/es/InputNumber/style/index.less +69 -69
  13. package/es/Modal/index.js +4 -7
  14. package/es/Modal/style/index.less +45 -45
  15. package/es/PageHeader/index.d.ts +3 -0
  16. package/es/PageHeader/index.js +3 -0
  17. package/es/PageHeader/style/index.d.ts +2 -0
  18. package/es/PageHeader/style/index.js +2 -0
  19. package/es/PageHeader/style/index.less +1 -0
  20. package/es/Select/rc-select/OptionList.js +3 -2
  21. package/es/Select/rc-select/hooks/useOptions.d.ts +1 -1
  22. package/es/Select/style/index.less +49 -49
  23. package/es/Select/style/variables.less +45 -45
  24. package/es/Select/utils/iconUtil.d.ts +2 -2
  25. package/es/Select/utils/iconUtil.js +6 -4
  26. package/es/Steps/components/ProcessIcon/index.d.ts +5 -0
  27. package/es/Steps/components/ProcessIcon/index.js +8 -0
  28. package/es/Steps/components/Step/index.d.ts +20 -0
  29. package/es/Steps/components/Step/index.js +45 -0
  30. package/es/Steps/index.d.ts +36 -2
  31. package/es/Steps/index.js +30 -1
  32. package/es/Steps/matchMedia.mock.d.ts +1 -0
  33. package/es/Steps/matchMedia.mock.js +17 -0
  34. package/es/Steps/style/index.less +251 -0
  35. package/es/Switch/index.d.ts +46 -2
  36. package/es/Switch/index.js +71 -1
  37. package/es/Switch/style/index.less +129 -0
  38. package/es/Table/style/index.less +1 -1
  39. package/es/Tabs/index.js +3 -2
  40. package/es/Tabs/style/index.less +25 -25
  41. package/es/index.d.ts +6 -4
  42. package/es/index.js +2 -1
  43. package/es/style/index.less +1 -1
  44. package/es/style/themes/default/index.less +30 -30
  45. package/lib/Button/index.js +5 -3
  46. package/lib/Button/style/index.less +135 -126
  47. package/lib/Button/style/variables.less +53 -53
  48. package/lib/Dropdown/Button.js +7 -5
  49. package/lib/Icon/icons.json +410 -0
  50. package/lib/Input/components/Group/index.d.ts +2 -1
  51. package/lib/Input/components/Group/index.js +7 -12
  52. package/lib/Input/components/Input/index.d.ts +3 -2
  53. package/lib/Input/components/Input/index.js +13 -22
  54. package/lib/Input/components/Password/index.js +13 -17
  55. package/lib/Input/style/index.less +102 -102
  56. package/lib/InputNumber/style/index.less +69 -69
  57. package/lib/Modal/index.js +8 -10
  58. package/lib/Modal/style/index.less +45 -45
  59. package/lib/PageHeader/index.d.ts +3 -0
  60. package/lib/PageHeader/index.js +15 -0
  61. package/lib/PageHeader/style/index.d.ts +2 -0
  62. package/lib/PageHeader/style/index.js +5 -0
  63. package/lib/PageHeader/style/index.less +1 -0
  64. package/lib/Select/rc-select/OptionList.js +7 -5
  65. package/lib/Select/rc-select/hooks/useOptions.d.ts +1 -1
  66. package/lib/Select/style/index.less +49 -49
  67. package/lib/Select/style/variables.less +45 -45
  68. package/lib/Select/utils/iconUtil.d.ts +2 -2
  69. package/lib/Select/utils/iconUtil.js +10 -8
  70. package/lib/Steps/components/ProcessIcon/index.d.ts +5 -0
  71. package/lib/Steps/components/ProcessIcon/index.js +19 -0
  72. package/lib/Steps/components/Step/index.d.ts +20 -0
  73. package/lib/Steps/components/Step/index.js +61 -0
  74. package/lib/Steps/index.d.ts +36 -2
  75. package/lib/Steps/index.js +34 -1
  76. package/lib/Steps/matchMedia.mock.d.ts +1 -0
  77. package/lib/Steps/matchMedia.mock.js +17 -0
  78. package/lib/Steps/style/index.less +251 -0
  79. package/lib/Switch/index.d.ts +46 -2
  80. package/lib/Switch/index.js +78 -1
  81. package/lib/Switch/style/index.less +129 -0
  82. package/lib/Table/style/index.less +1 -1
  83. package/lib/Tabs/index.js +5 -3
  84. package/lib/Tabs/style/index.less +25 -25
  85. package/lib/index.d.ts +6 -4
  86. package/lib/index.js +8 -0
  87. package/lib/style/index.less +1 -1
  88. package/lib/style/themes/default/index.less +30 -30
  89. package/package.json +2 -1
@@ -1 +1,130 @@
1
1
  @import '../../style/index.less';
2
+
3
+ @switch-handle-middle: @font-size-middle;
4
+ @switch-handle-height-middle: @line-height-middle;
5
+ @switch-handle-small: @font-size-small;
6
+ @switch-handle-height-small: @line-height-small;
7
+ @switch-handle-gap-middle: 3px;
8
+ @switch-handle-gap-small: 2px;
9
+ @switch-text-margin-left: 8px;
10
+ @switch-aspect-ratio: 2; //宽高比
11
+ @switch-height-radius-ratio: 2; //高度和边框圆角比
12
+
13
+ .ald-switch {
14
+ display: inline-block;
15
+ font-size: 0;
16
+
17
+ .ald-switch-btn {
18
+ background: @NL90;
19
+
20
+ &:focus {
21
+ box-shadow: none;
22
+ }
23
+ }
24
+
25
+ .ald-switch-text {
26
+ display: inline-flex;
27
+ align-items: center;
28
+ margin-left: @switch-text-margin-left;
29
+ color: @NL0;
30
+ vertical-align: middle;
31
+ }
32
+
33
+ &.ald-switch-checked {
34
+ .ald-switch-btn {
35
+ background-color: @B60;
36
+ }
37
+ }
38
+
39
+ &.ald-switch-disabled {
40
+ cursor: initial;
41
+
42
+ .ald-switch-btn {
43
+ cursor: initial;
44
+ opacity: 0.5;
45
+
46
+ * {
47
+ cursor: initial;
48
+ }
49
+ }
50
+
51
+ .ald-switch-text {
52
+ color: @NL60;
53
+ }
54
+ }
55
+
56
+ &.ald-switch-middle {
57
+ .ald-switch-btn {
58
+ width: @switch-handle-height-middle * @switch-aspect-ratio;
59
+ min-width: @switch-handle-height-middle * @switch-aspect-ratio;
60
+ height: @switch-handle-height-middle;
61
+ line-height: @switch-handle-height-middle;
62
+ border-radius: @switch-handle-height-middle / @switch-height-radius-ratio;
63
+
64
+ .ant-switch-handle {
65
+ top: @switch-handle-gap-middle;
66
+ left: @switch-handle-gap-middle;
67
+ width: @switch-handle-middle;
68
+ height: @switch-handle-middle;
69
+
70
+ .ant-switch-loading-icon {
71
+ width: @switch-handle-middle - 4px;
72
+ height: @switch-handle-middle - 4px;
73
+ font-size: @switch-handle-middle - 4px;
74
+ }
75
+ }
76
+ }
77
+
78
+ .ald-switch-text {
79
+ height: @switch-handle-height-middle;
80
+ font-size: @font-size-middle;
81
+ line-height: @switch-handle-height-middle;
82
+ }
83
+
84
+ &.ald-switch-checked {
85
+ .ant-switch-handle {
86
+ top: 3px;
87
+ left: calc(100% - @switch-handle-middle - @switch-handle-gap-middle);
88
+ width: @switch-handle-middle;
89
+ height: @switch-handle-middle;
90
+ }
91
+ }
92
+ }
93
+
94
+ &.ald-switch-small {
95
+ .ald-switch-btn {
96
+ width: @switch-handle-height-small * @switch-aspect-ratio;
97
+ min-width: @switch-handle-height-small * @switch-aspect-ratio;
98
+ height: @switch-handle-height-small;
99
+ line-height: @switch-handle-height-small;
100
+ border-radius: @switch-handle-height-small / @switch-height-radius-ratio;
101
+
102
+ .ant-switch-handle {
103
+ top: @switch-handle-gap-small;
104
+ left: @switch-handle-gap-small;
105
+ width: @switch-handle-small;
106
+ height: @switch-handle-small;
107
+
108
+ .ant-switch-loading-icon {
109
+ width: @switch-handle-small - 4px;
110
+ height: @switch-handle-small - 4px;
111
+ font-size: @switch-handle-small - 4px;
112
+ }
113
+ }
114
+ }
115
+
116
+ .ald-switch-text {
117
+ height: @switch-handle-height-small;
118
+ font-size: @font-size-small;
119
+ line-height: @switch-handle-height-small;
120
+ }
121
+
122
+ &.ald-switch-checked {
123
+ .ant-switch-handle {
124
+ left: calc(100% - @switch-handle-small - @switch-handle-gap-small);
125
+ width: @switch-handle-small;
126
+ height: @switch-handle-small;
127
+ }
128
+ }
129
+ }
130
+ }
@@ -1,5 +1,5 @@
1
1
  @import '../../style/index.less';
2
-
2
+ @import '../../Empty/style/index.less';
3
3
  @ald-iconfont-css-prefix: anticon;
4
4
  @table-row-height: 48px;
5
5
 
package/lib/Tabs/index.js CHANGED
@@ -5,14 +5,16 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = Tabs;
7
7
 
8
+ require("@aloudata/icons-react/styles/index.less");
9
+
10
+ var _More2 = _interopRequireDefault(require("@aloudata/icons-react/es/icons/More"));
11
+
8
12
  require("antd/es/tabs/style");
9
13
 
10
14
  var _tabs = _interopRequireDefault(require("antd/es/tabs"));
11
15
 
12
16
  var _react = _interopRequireDefault(require("react"));
13
17
 
14
- var _More = _interopRequireDefault(require("../Icon/icons/More"));
15
-
16
18
  var _TabPane = _interopRequireDefault(require("./TabPane"));
17
19
 
18
20
  var _classnames = _interopRequireDefault(require("classnames"));
@@ -47,7 +49,7 @@ function Tabs(props) {
47
49
  return /*#__PURE__*/_react.default.createElement(_tabs.default, Object.assign({
48
50
  moreIcon: /*#__PURE__*/_react.default.createElement("div", {
49
51
  className: "ald-tabs-moreIcon"
50
- }, /*#__PURE__*/_react.default.createElement(_More.default, {
52
+ }, /*#__PURE__*/_react.default.createElement(_More2.default, {
51
53
  color: "currentColor"
52
54
  })),
53
55
  tabBarGutter: 24,
@@ -2,21 +2,21 @@
2
2
  @import '../../style/index.less';
3
3
  @import '../../Button/style/index.less';
4
4
  //status- default
5
- @Tabs-color: @NL30;
6
- @Tabs-fontWeight: 400;
5
+ @tabs-color: @NL30;
6
+ @tabs-fontWeight: 400;
7
7
  //active
8
- @Tabs-color-active: @B60;
9
- @Tabs-fontWeight-active: 600;
8
+ @tabs-color-active: @B60;
9
+ @tabs-fontWeight-active: 600;
10
10
 
11
11
  //middle - default
12
- @Tabs-fontSize: 14px;
13
- @Tabs-lineHeight: 20px;
14
- @Tabs-ink-link-bar-height: 2px;
12
+ @tabs-font-size: 14px;
13
+ @tabs-line-height: 20px;
14
+ @tabs-ink-link-bar-height: 2px;
15
15
  //large
16
- @Tabs-fontSize-large: 16px;
17
- @Tabs-lineHeight-large: 24px;
18
- @Tabs-ink-link-bar-height-large: 3px;
19
- // @Tabs-
16
+ @tabs-font-size-large: 16px;
17
+ @tabs-line-height-large: 24px;
18
+ @tabs-ink-link-bar-height-large: 3px;
19
+ // @tabs-
20
20
  .ant-tabs.ald-tabs {
21
21
  &.ant-tabs {
22
22
  color: @NL30;
@@ -24,29 +24,29 @@
24
24
 
25
25
  .ant-tabs-tab {
26
26
  padding: 8px 0;
27
- color: @Tabs-color;
28
- font-weight: @Tabs-fontWeight;
29
- font-size: @Tabs-fontSize;
30
- line-height: @Tabs-lineHeight;
27
+ color: @tabs-color;
28
+ font-weight: @tabs-fontWeight;
29
+ font-size: @tabs-font-size;
30
+ line-height: @tabs-line-height;
31
31
 
32
32
  &:hover {
33
33
  color: inherit;
34
34
  }
35
35
 
36
36
  &.ant-tabs-tab-active {
37
- font-weight: @Tabs-fontWeight-active;
37
+ font-weight: @tabs-fontWeight-active;
38
38
  }
39
39
  }
40
40
 
41
41
  .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
42
- color: @Tabs-color-active;
43
- font-weight: @Tabs-fontWeight-active;
42
+ color: @tabs-color-active;
43
+ font-weight: @tabs-fontWeight-active;
44
44
  text-shadow: none;
45
45
  }
46
46
 
47
47
  .ant-tabs-ink-bar {
48
- height: @Tabs-ink-link-bar-height;
49
- background: @Tabs-color-active;
48
+ height: @tabs-ink-link-bar-height;
49
+ background: @tabs-color-active;
50
50
  border-top-left-radius: 2px;
51
51
  border-top-right-radius: 2px;
52
52
  }
@@ -54,12 +54,12 @@
54
54
  /* large size */
55
55
  &.ant-tabs-large {
56
56
  .ant-tabs-tab {
57
- font-size: @Tabs-fontSize-large;
58
- line-height: @Tabs-lineHeight-large;
57
+ font-size: @tabs-font-size-large;
58
+ line-height: @tabs-line-height-large;
59
59
  }
60
60
 
61
61
  .ant-tabs-ink-bar {
62
- height: @Tabs-ink-link-bar-height-large;
62
+ height: @tabs-ink-link-bar-height-large;
63
63
  }
64
64
 
65
65
  .ald-tabs-moreIcon {
@@ -71,8 +71,8 @@
71
71
 
72
72
  &.ald-tabs-default {
73
73
  .ant-tabs-tab {
74
- font-size: @Tabs-fontSize;
75
- line-height: @Tabs-lineHeight;
74
+ font-size: @tabs-font-size;
75
+ line-height: @tabs-line-height;
76
76
  }
77
77
 
78
78
  .ald-tabs-moreIcon {
package/lib/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  /// <reference path="../typings.d.ts" />
2
2
  export { default as Button } from './Button';
3
- export type { IButtonProps as ButtonProps, Size, ButtonType } from './Button';
3
+ export type { IButtonProps as ButtonProps, ButtonType } from './Button';
4
4
  export { default as Dropdown } from './Dropdown';
5
5
  export type { ActionType, IDropdownProps as DropdownProps, PlacementType } from './Dropdown';
6
6
  export { MenuClickEventHandler } from 'rc-menu/lib/interface';
7
7
  export { default as Menu } from './Menu';
8
8
  export type { IMenuProps as MenuProps } from './Menu';
9
9
  export { default as Input } from './Input';
10
- export type { IInputProps as InputProps, TSize, InputRef, TextAreaRef } from './Input';
10
+ export type { IInputProps as InputProps, InputRef, TextAreaRef } from './Input';
11
11
  export { default as Tabs } from './Tabs';
12
12
  export type { ITabsProps as TabsProps, TabsSize } from './Tabs';
13
13
  export { default as Tooltip } from './Tooltip';
@@ -46,9 +46,9 @@ export type { SpaceProps } from './Space';
46
46
  export { default as Space } from './Space';
47
47
  export type { SpinProps } from './Spin';
48
48
  export { default as Spin } from './Spin';
49
- export type { SwitchProps } from './Switch';
49
+ export type { ISwitchProps as SwitchProps } from './Switch';
50
50
  export { default as Switch } from './Switch';
51
- export type { StepProps, StepsProps } from './Steps';
51
+ export type { IStepProps as StepProps, IStepsProps as StepsProps } from './Steps';
52
52
  export { default as Steps } from './Steps';
53
53
  export { default as Form } from './Form';
54
54
  export type { FormInstance, FormProps, FormItemProps } from './Form';
@@ -73,3 +73,5 @@ export type { IEmptyProps as EmptyProps } from './Empty';
73
73
  export { default as Avatar } from './Avatar';
74
74
  export type { IAvatarProps as AvatarProps } from './Avatar';
75
75
  export { default as Icon } from './Icon';
76
+ export type { PageHeaderProps } from './PageHeader';
77
+ export { default as PageHeader } from './PageHeader';
package/lib/index.js CHANGED
@@ -129,6 +129,12 @@ Object.defineProperty(exports, "Navigator", {
129
129
  return _Navigator.default;
130
130
  }
131
131
  });
132
+ Object.defineProperty(exports, "PageHeader", {
133
+ enumerable: true,
134
+ get: function get() {
135
+ return _PageHeader.default;
136
+ }
137
+ });
132
138
  Object.defineProperty(exports, "Popover", {
133
139
  enumerable: true,
134
140
  get: function get() {
@@ -308,4 +314,6 @@ var _Avatar = _interopRequireDefault(require("./Avatar"));
308
314
 
309
315
  var _Icon = _interopRequireDefault(require("./Icon"));
310
316
 
317
+ var _PageHeader = _interopRequireDefault(require("./PageHeader"));
318
+
311
319
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -2,4 +2,4 @@
2
2
  @import './mixins/index.less';
3
3
  @import './themes/default/scrollBar.less';
4
4
  @import './themes/default/index.less';
5
- @import './mixins/index.less';
5
+ @import './mixins/index.less';
@@ -3,34 +3,34 @@
3
3
  @ald-prefix: ant;
4
4
 
5
5
 
6
- // height rules
7
- @height-base: 28px;
8
- @height-lg: 32px;
9
- @height-sm: 22px;
10
-
11
-
6
+ // base 不分大小写情况
12
7
  @border-radius-base: 8px;
13
- @border-radius-sm: 6px;
14
- @border-color-base: #e7e8e9; // 边框的基础色
15
-
16
- // color
17
- @primary-color: @B40; // 主色调
18
- @error-color: @SC40; // 错误色
19
- @success-color: @SA40; // 成功色
20
- @warning-color: @SB40; // 警告色
21
- @init-color: rgba(39, 40, 46, 0.5); // 默认颜色
22
- @adapt-table-border-color: rgba(39, 40, 46, 0.1); // 可拉伸表格的颜色
23
- @common-text-color: #27282e;
24
- @tableheader-bg: #f9f9f9; // 表头背景
25
- @primary-bg: #fff; // 主要背景色
26
- @btn-shadow: unset; // 取消btn的阴影,
27
- @text-shadow:unset; // 取消文字阴影
28
-
29
-
30
- @menu-item-font-size: 14px;
31
-
32
-
33
- //Select
34
-
35
- @select-placeholder-color: @NL50;
36
- @select-label-margin-right:4px;
8
+ @line-height-base:20px;
9
+ @font-size-base:14px;
10
+
11
+ // large
12
+ @font-size-large:16px;
13
+ @line-height-large:24px;
14
+ @padding-top-large:6px;
15
+ @padding-bottom-large:6px;
16
+ @padding-left-large:12px;
17
+ @padding-right-large:12px;
18
+ @border-radius-large:8px;
19
+
20
+ // middle
21
+ @font-size-middle:14px;
22
+ @line-height-middle:20px;
23
+ @padding-top-middle:6px;
24
+ @padding-bottom-middle:6px;
25
+ @padding-left-middle:12px;
26
+ @padding-right-middle:12px;
27
+ @border-radius-middle:6px;
28
+
29
+ // small
30
+ @font-size-small:12px;
31
+ @line-height-small:16px;
32
+ @padding-top-small:6px;
33
+ @padding-bottom-small:6px;
34
+ @padding-left-small:8px;
35
+ @padding-right-small:8px;
36
+ @border-radius-small:4px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aloudata/aloudata-design",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -52,6 +52,7 @@
52
52
  ]
53
53
  },
54
54
  "dependencies": {
55
+ "@aloudata/icons-react": "^0.0.7",
55
56
  "@ant-design/icons": "^4.7.0",
56
57
  "antd": "^4.21.5",
57
58
  "babel-preset-react-app": "^10.0.1",