@akinon/ui-select 1.2.0 → 1.3.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.
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +32 -18
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +32 -18
- package/package.json +10 -8
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,MAAM,GAAI,wBAAwB,WAAW,sBA4EzD,CAAC;AAEF,mBAAmB,SAAS,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -12,6 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.Select = void 0;
|
|
15
|
+
const icons_1 = require("@akinon/icons");
|
|
15
16
|
const ui_theme_1 = require("@akinon/ui-theme");
|
|
16
17
|
const cssinjs_1 = require("@ant-design/cssinjs");
|
|
17
18
|
const antd_1 = require("antd");
|
|
@@ -42,31 +43,44 @@ const Select = (_a) => {
|
|
|
42
43
|
theme: theme
|
|
43
44
|
}, () => {
|
|
44
45
|
return {
|
|
45
|
-
[
|
|
46
|
-
'
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
[`.${selectPrefixCls}`]: {
|
|
47
|
+
'&-selection': {
|
|
48
|
+
'&-wrap': {
|
|
49
|
+
height: '100%'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
'&-filled': {
|
|
53
|
+
[`&.${selectPrefixCls}-css-var`]: {
|
|
54
|
+
[`--${getPrefixCls()}-select-selector-bg`]: selectToken.colorFillSecondary,
|
|
55
|
+
[`--${getPrefixCls()}-color-bg-container-disabled`]: selectToken.colorFillSecondary
|
|
56
|
+
},
|
|
57
|
+
[`.${selectPrefixCls}`]: {
|
|
58
|
+
'&-arrow': {
|
|
59
|
+
color: selectToken.colorTextPlaceholder
|
|
60
|
+
},
|
|
61
|
+
'&-selection': {
|
|
62
|
+
'&-item': {
|
|
63
|
+
color: selectToken.colorTextPlaceholder
|
|
56
64
|
}
|
|
57
65
|
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
'&-focused': {}
|
|
69
|
+
},
|
|
70
|
+
[`${dropdownPrefixClsWithHash}`]: {
|
|
71
|
+
[`.${selectPrefixCls}-item`]: {
|
|
72
|
+
color: selectToken.selectItemColor,
|
|
73
|
+
'&-option:nth-child(odd):not(:hover):not(&-option-selected)': {
|
|
74
|
+
backgroundColor: selectToken.optionOddColor,
|
|
75
|
+
boxShadow: 'inset 0 -1px 0 0 #eaeff0, inset 0 1px 0 0 #eaeff0'
|
|
58
76
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
color: selectToken.selectedOptionColor,
|
|
62
|
-
'&:hover': {
|
|
63
|
-
backgroundColor: selectToken === null || selectToken === void 0 ? void 0 : selectToken.optionActiveBg
|
|
64
|
-
}
|
|
77
|
+
'&-option-active': {
|
|
78
|
+
color: selectToken.optionActiveColor
|
|
65
79
|
}
|
|
66
80
|
}
|
|
67
81
|
}
|
|
68
82
|
};
|
|
69
83
|
});
|
|
70
|
-
return useStyle(React.createElement(antd_1.Select, Object.assign({ size: "large", popupMatchSelectWidth: true }, restSelectProps)));
|
|
84
|
+
return useStyle(React.createElement(antd_1.Select, Object.assign({ size: "large", popupMatchSelectWidth: true, suffixIcon: React.createElement(icons_1.Icon, { icon: "chevron_down", size: 10 }) }, restSelectProps)));
|
|
71
85
|
};
|
|
72
86
|
exports.Select = Select;
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,MAAM,GAAI,wBAAwB,WAAW,sBA4EzD,CAAC;AAEF,mBAAmB,SAAS,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -9,6 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
+
import { Icon } from '@akinon/icons';
|
|
12
13
|
import { useToken } from '@akinon/ui-theme';
|
|
13
14
|
import { useStyleRegister } from '@ant-design/cssinjs';
|
|
14
15
|
import { ConfigProvider, Select as AntSelect } from 'antd';
|
|
@@ -39,30 +40,43 @@ export const Select = (_a) => {
|
|
|
39
40
|
theme: theme
|
|
40
41
|
}, () => {
|
|
41
42
|
return {
|
|
42
|
-
[
|
|
43
|
-
'
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
[`.${selectPrefixCls}`]: {
|
|
44
|
+
'&-selection': {
|
|
45
|
+
'&-wrap': {
|
|
46
|
+
height: '100%'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
'&-filled': {
|
|
50
|
+
[`&.${selectPrefixCls}-css-var`]: {
|
|
51
|
+
[`--${getPrefixCls()}-select-selector-bg`]: selectToken.colorFillSecondary,
|
|
52
|
+
[`--${getPrefixCls()}-color-bg-container-disabled`]: selectToken.colorFillSecondary
|
|
53
|
+
},
|
|
54
|
+
[`.${selectPrefixCls}`]: {
|
|
55
|
+
'&-arrow': {
|
|
56
|
+
color: selectToken.colorTextPlaceholder
|
|
57
|
+
},
|
|
58
|
+
'&-selection': {
|
|
59
|
+
'&-item': {
|
|
60
|
+
color: selectToken.colorTextPlaceholder
|
|
53
61
|
}
|
|
54
62
|
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
'&-focused': {}
|
|
66
|
+
},
|
|
67
|
+
[`${dropdownPrefixClsWithHash}`]: {
|
|
68
|
+
[`.${selectPrefixCls}-item`]: {
|
|
69
|
+
color: selectToken.selectItemColor,
|
|
70
|
+
'&-option:nth-child(odd):not(:hover):not(&-option-selected)': {
|
|
71
|
+
backgroundColor: selectToken.optionOddColor,
|
|
72
|
+
boxShadow: 'inset 0 -1px 0 0 #eaeff0, inset 0 1px 0 0 #eaeff0'
|
|
55
73
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
color: selectToken.selectedOptionColor,
|
|
59
|
-
'&:hover': {
|
|
60
|
-
backgroundColor: selectToken === null || selectToken === void 0 ? void 0 : selectToken.optionActiveBg
|
|
61
|
-
}
|
|
74
|
+
'&-option-active': {
|
|
75
|
+
color: selectToken.optionActiveColor
|
|
62
76
|
}
|
|
63
77
|
}
|
|
64
78
|
}
|
|
65
79
|
};
|
|
66
80
|
});
|
|
67
|
-
return useStyle(React.createElement(AntSelect, Object.assign({ size: "large", popupMatchSelectWidth: true }, restSelectProps)));
|
|
81
|
+
return useStyle(React.createElement(AntSelect, Object.assign({ size: "large", popupMatchSelectWidth: true, suffixIcon: React.createElement(Icon, { icon: "chevron_down", size: 10 }) }, restSelectProps)));
|
|
68
82
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/ui-select",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -9,19 +9,21 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"
|
|
13
|
-
"
|
|
12
|
+
"@ant-design/cssinjs": "^1.24.0",
|
|
13
|
+
"antd": "^5.27.0",
|
|
14
|
+
"@akinon/ui-theme": "1.1.0",
|
|
15
|
+
"@akinon/icons": "1.1.0"
|
|
14
16
|
},
|
|
15
17
|
"devDependencies": {
|
|
16
18
|
"clean-package": "2.2.0",
|
|
17
19
|
"copyfiles": "^2.4.1",
|
|
18
20
|
"rimraf": "^5.0.5",
|
|
19
21
|
"typescript": "*",
|
|
20
|
-
"@akinon/typescript-config": "1.0
|
|
22
|
+
"@akinon/typescript-config": "1.1.0"
|
|
21
23
|
},
|
|
22
24
|
"peerDependencies": {
|
|
23
|
-
"react": "
|
|
24
|
-
"react-dom": "
|
|
25
|
+
"react": "^18 || ^19",
|
|
26
|
+
"react-dom": "^18 || ^19"
|
|
25
27
|
},
|
|
26
28
|
"clean-package": "../../../clean-package.config.json",
|
|
27
29
|
"types": "dist/esm/index.d.ts",
|
|
@@ -35,10 +37,10 @@
|
|
|
35
37
|
},
|
|
36
38
|
"scripts": {
|
|
37
39
|
"build": "pnpm run build:esm && pnpm run build:commonjs && pnpm run copy:files",
|
|
38
|
-
"build:esm": "tsc --outDir dist/esm",
|
|
39
40
|
"build:commonjs": "tsc --module commonjs --outDir dist/cjs",
|
|
40
|
-
"
|
|
41
|
+
"build:esm": "tsc --outDir dist/esm",
|
|
41
42
|
"clean": "rimraf dist/",
|
|
43
|
+
"copy:files": "copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/esm && copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/cjs",
|
|
42
44
|
"typecheck": "tsc --noEmit"
|
|
43
45
|
}
|
|
44
46
|
}
|