@akinon/ui-select 1.3.0 → 1.3.2
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 +31 -4
- package/dist/cjs/types.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +31 -4
- package/dist/esm/types.d.ts +5 -0
- package/package.json +3 -3
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":"AASA,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,sBA0GzD,CAAC;AAEF,mBAAmB,SAAS,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -36,12 +36,13 @@ const Select = (_a) => {
|
|
|
36
36
|
const selectPrefixCls = `${getPrefixCls()}-select`;
|
|
37
37
|
const dropdownPrefixCls = `${selectPrefixCls}-dropdown`;
|
|
38
38
|
const dropdownPrefixClsWithHash = `:where(.${hashId}).${dropdownPrefixCls}`;
|
|
39
|
-
|
|
39
|
+
(0, cssinjs_1.useStyleRegister)({
|
|
40
40
|
token: token,
|
|
41
41
|
path: ['Select'],
|
|
42
42
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
43
|
theme: theme
|
|
44
44
|
}, () => {
|
|
45
|
+
const customTheme = theme;
|
|
45
46
|
return {
|
|
46
47
|
[`.${selectPrefixCls}`]: {
|
|
47
48
|
'&-selection': {
|
|
@@ -65,14 +66,40 @@ const Select = (_a) => {
|
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
},
|
|
68
|
-
'&-
|
|
69
|
+
'&-multiple.akinon-select-lg': {
|
|
70
|
+
[`.${selectPrefixCls}`]: {
|
|
71
|
+
'&-selection': {
|
|
72
|
+
'&-wrap': {
|
|
73
|
+
[`--${getPrefixCls()}-select-multiple-item-height-lg`]: 20
|
|
74
|
+
},
|
|
75
|
+
'&-overflow': {
|
|
76
|
+
padding: '8.333px 12px',
|
|
77
|
+
gap: 12
|
|
78
|
+
},
|
|
79
|
+
'&-item': {
|
|
80
|
+
color: customTheme.colors.neutral['700'],
|
|
81
|
+
fontWeight: 500,
|
|
82
|
+
borderRadius: `3px!important`,
|
|
83
|
+
'&-remove': {
|
|
84
|
+
backgroundColor: customTheme.colors.azure['500'],
|
|
85
|
+
color: `${customTheme.colors.neutral['50']}!important`,
|
|
86
|
+
height: 12,
|
|
87
|
+
width: 12,
|
|
88
|
+
alignSelf: 'center',
|
|
89
|
+
justifyContent: 'center',
|
|
90
|
+
borderRadius: '100%'
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
69
96
|
},
|
|
70
97
|
[`${dropdownPrefixClsWithHash}`]: {
|
|
71
98
|
[`.${selectPrefixCls}-item`]: {
|
|
72
99
|
color: selectToken.selectItemColor,
|
|
73
100
|
'&-option:nth-child(odd):not(:hover):not(&-option-selected)': {
|
|
74
101
|
backgroundColor: selectToken.optionOddColor,
|
|
75
|
-
boxShadow:
|
|
102
|
+
boxShadow: `inset 0 -1px 0 0 ${customTheme.colors.gray['125']}, inset 0 1px 0 0 ${customTheme.colors.gray['125']}`
|
|
76
103
|
},
|
|
77
104
|
'&-option-active': {
|
|
78
105
|
color: selectToken.optionActiveColor
|
|
@@ -81,6 +108,6 @@ const Select = (_a) => {
|
|
|
81
108
|
}
|
|
82
109
|
};
|
|
83
110
|
});
|
|
84
|
-
return
|
|
111
|
+
return (React.createElement(antd_1.Select, Object.assign({ size: "large", popupMatchSelectWidth: true, suffixIcon: React.createElement(icons_1.Icon, { icon: "chevron_down", size: 10 }), removeIcon: React.createElement(icons_1.Icon, { icon: "close", size: 7 }) }, restSelectProps)));
|
|
85
112
|
};
|
|
86
113
|
exports.Select = Select;
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -90,6 +90,11 @@ export interface SelectProps<
|
|
|
90
90
|
*/
|
|
91
91
|
searchValue?: string;
|
|
92
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Enables built-in search behaviour.
|
|
95
|
+
*/
|
|
96
|
+
showSearch?: boolean;
|
|
97
|
+
|
|
93
98
|
/**
|
|
94
99
|
* Callback triggered when the search value changes.
|
|
95
100
|
* @param value - The current search value.
|
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":"AASA,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,sBA0GzD,CAAC;AAEF,mBAAmB,SAAS,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -33,12 +33,13 @@ export const Select = (_a) => {
|
|
|
33
33
|
const selectPrefixCls = `${getPrefixCls()}-select`;
|
|
34
34
|
const dropdownPrefixCls = `${selectPrefixCls}-dropdown`;
|
|
35
35
|
const dropdownPrefixClsWithHash = `:where(.${hashId}).${dropdownPrefixCls}`;
|
|
36
|
-
|
|
36
|
+
useStyleRegister({
|
|
37
37
|
token: token,
|
|
38
38
|
path: ['Select'],
|
|
39
39
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
40
|
theme: theme
|
|
41
41
|
}, () => {
|
|
42
|
+
const customTheme = theme;
|
|
42
43
|
return {
|
|
43
44
|
[`.${selectPrefixCls}`]: {
|
|
44
45
|
'&-selection': {
|
|
@@ -62,14 +63,40 @@ export const Select = (_a) => {
|
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
},
|
|
65
|
-
'&-
|
|
66
|
+
'&-multiple.akinon-select-lg': {
|
|
67
|
+
[`.${selectPrefixCls}`]: {
|
|
68
|
+
'&-selection': {
|
|
69
|
+
'&-wrap': {
|
|
70
|
+
[`--${getPrefixCls()}-select-multiple-item-height-lg`]: 20
|
|
71
|
+
},
|
|
72
|
+
'&-overflow': {
|
|
73
|
+
padding: '8.333px 12px',
|
|
74
|
+
gap: 12
|
|
75
|
+
},
|
|
76
|
+
'&-item': {
|
|
77
|
+
color: customTheme.colors.neutral['700'],
|
|
78
|
+
fontWeight: 500,
|
|
79
|
+
borderRadius: `3px!important`,
|
|
80
|
+
'&-remove': {
|
|
81
|
+
backgroundColor: customTheme.colors.azure['500'],
|
|
82
|
+
color: `${customTheme.colors.neutral['50']}!important`,
|
|
83
|
+
height: 12,
|
|
84
|
+
width: 12,
|
|
85
|
+
alignSelf: 'center',
|
|
86
|
+
justifyContent: 'center',
|
|
87
|
+
borderRadius: '100%'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
66
93
|
},
|
|
67
94
|
[`${dropdownPrefixClsWithHash}`]: {
|
|
68
95
|
[`.${selectPrefixCls}-item`]: {
|
|
69
96
|
color: selectToken.selectItemColor,
|
|
70
97
|
'&-option:nth-child(odd):not(:hover):not(&-option-selected)': {
|
|
71
98
|
backgroundColor: selectToken.optionOddColor,
|
|
72
|
-
boxShadow:
|
|
99
|
+
boxShadow: `inset 0 -1px 0 0 ${customTheme.colors.gray['125']}, inset 0 1px 0 0 ${customTheme.colors.gray['125']}`
|
|
73
100
|
},
|
|
74
101
|
'&-option-active': {
|
|
75
102
|
color: selectToken.optionActiveColor
|
|
@@ -78,5 +105,5 @@ export const Select = (_a) => {
|
|
|
78
105
|
}
|
|
79
106
|
};
|
|
80
107
|
});
|
|
81
|
-
return
|
|
108
|
+
return (React.createElement(AntSelect, Object.assign({ size: "large", popupMatchSelectWidth: true, suffixIcon: React.createElement(Icon, { icon: "chevron_down", size: 10 }), removeIcon: React.createElement(Icon, { icon: "close", size: 7 }) }, restSelectProps)));
|
|
82
109
|
};
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -90,6 +90,11 @@ export interface SelectProps<
|
|
|
90
90
|
*/
|
|
91
91
|
searchValue?: string;
|
|
92
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Enables built-in search behaviour.
|
|
95
|
+
*/
|
|
96
|
+
showSearch?: boolean;
|
|
97
|
+
|
|
93
98
|
/**
|
|
94
99
|
* Callback triggered when the search value changes.
|
|
95
100
|
* @param value - The current search value.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/ui-select",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@ant-design/cssinjs": "^1.24.0",
|
|
13
13
|
"antd": "^5.27.0",
|
|
14
|
-
"@akinon/
|
|
15
|
-
"@akinon/
|
|
14
|
+
"@akinon/icons": "1.1.0",
|
|
15
|
+
"@akinon/ui-theme": "1.1.1"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"clean-package": "2.2.0",
|