@rescui/select 0.12.4 → 0.13.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/lib/_virtual/index.css.js +12 -12
- package/lib/index.css +219 -206
- package/lib/parts/common-select.p.module.css.js +12 -12
- package/lib/parts/form-trigger.p.module.css.js +10 -10
- package/lib/parts/native-select.p.module.css.js +6 -6
- package/lib/parts/trigger.d.ts +1 -1
- package/lib/parts/trigger.js +99 -108
- package/lib/parts/trigger.p.module.css.js +28 -27
- package/lib/public-api.p.css +18 -27
- package/lib/public-api.pcss +18 -27
- package/lib/utils.d.ts +0 -2
- package/lib/utils.js +1 -5
- package/package.json +8 -8
package/lib/public-api.pcss
CHANGED
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
--_rs-tag-uppercase-horizontal-padding:var(
|
|
188
188
|
--_rs-tag-base-horizontal-padding
|
|
189
189
|
);
|
|
190
|
-
--_rs-tag-icon-size:
|
|
190
|
+
--_rs-tag-icon-size:16px;
|
|
191
191
|
--_rs-tag-border-radius:4px;
|
|
192
192
|
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
193
193
|
--_rs-typography-text-transform:initial;
|
|
@@ -225,13 +225,12 @@
|
|
|
225
225
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html){
|
|
226
226
|
--_rs-tag-removable-vertical-padding:2px;
|
|
227
227
|
--_rs-tag-removable-left-padding:8px;
|
|
228
|
-
--_rs-tag-removable-right-padding:2px;
|
|
229
228
|
--_rs-tag-removable-border-radius:4px;
|
|
230
|
-
--_rs-tag-removable-close-
|
|
231
|
-
--_rs-tag-removable-custom-icon-size:
|
|
229
|
+
--_rs-tag-removable-close-part-size:24px;
|
|
230
|
+
--_rs-tag-removable-custom-icon-size:16px;
|
|
232
231
|
}
|
|
233
232
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html) [data-rs-internal="removable-tag__close-icon"]:not(html){
|
|
234
|
-
--_rs-icons-height:
|
|
233
|
+
--_rs-icons-height:16px;
|
|
235
234
|
}
|
|
236
235
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html){
|
|
237
236
|
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
@@ -509,9 +508,8 @@
|
|
|
509
508
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html){
|
|
510
509
|
--_rs-tag-removable-vertical-padding:4px;
|
|
511
510
|
--_rs-tag-removable-left-padding:8px;
|
|
512
|
-
--_rs-tag-removable-right-padding:2px;
|
|
513
511
|
--_rs-tag-removable-border-radius:4px;
|
|
514
|
-
--_rs-tag-removable-close-
|
|
512
|
+
--_rs-tag-removable-close-part-size:28px;
|
|
515
513
|
--_rs-tag-removable-custom-icon-size:20px;
|
|
516
514
|
}
|
|
517
515
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html) [data-rs-internal="removable-tag__close-icon"]:not(html){
|
|
@@ -811,9 +809,8 @@
|
|
|
811
809
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html){
|
|
812
810
|
--_rs-tag-removable-vertical-padding:6px;
|
|
813
811
|
--_rs-tag-removable-left-padding:12px;
|
|
814
|
-
--_rs-tag-removable-right-padding:2px;
|
|
815
812
|
--_rs-tag-removable-border-radius:6px;
|
|
816
|
-
--_rs-tag-removable-close-
|
|
813
|
+
--_rs-tag-removable-close-part-size:36px;
|
|
817
814
|
--_rs-tag-removable-custom-icon-size:24px;
|
|
818
815
|
}
|
|
819
816
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html) [data-rs-internal="removable-tag__close-icon"]:not(html){
|
|
@@ -1051,7 +1048,7 @@
|
|
|
1051
1048
|
--_rs-tag-uppercase-horizontal-padding:var(
|
|
1052
1049
|
--_rs-tag-base-horizontal-padding
|
|
1053
1050
|
);
|
|
1054
|
-
--_rs-tag-icon-size:
|
|
1051
|
+
--_rs-tag-icon-size:16px;
|
|
1055
1052
|
--_rs-tag-border-radius:4px;
|
|
1056
1053
|
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
1057
1054
|
--_rs-typography-text-transform:initial;
|
|
@@ -1089,13 +1086,12 @@
|
|
|
1089
1086
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html){
|
|
1090
1087
|
--_rs-tag-removable-vertical-padding:2px;
|
|
1091
1088
|
--_rs-tag-removable-left-padding:8px;
|
|
1092
|
-
--_rs-tag-removable-right-padding:2px;
|
|
1093
1089
|
--_rs-tag-removable-border-radius:4px;
|
|
1094
|
-
--_rs-tag-removable-close-
|
|
1095
|
-
--_rs-tag-removable-custom-icon-size:
|
|
1090
|
+
--_rs-tag-removable-close-part-size:24px;
|
|
1091
|
+
--_rs-tag-removable-custom-icon-size:16px;
|
|
1096
1092
|
}
|
|
1097
1093
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html) [data-rs-internal="removable-tag__close-icon"]:not(html){
|
|
1098
|
-
--_rs-icons-height:
|
|
1094
|
+
--_rs-icons-height:16px;
|
|
1099
1095
|
}
|
|
1100
1096
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html){
|
|
1101
1097
|
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
@@ -1373,9 +1369,8 @@
|
|
|
1373
1369
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html){
|
|
1374
1370
|
--_rs-tag-removable-vertical-padding:4px;
|
|
1375
1371
|
--_rs-tag-removable-left-padding:8px;
|
|
1376
|
-
--_rs-tag-removable-right-padding:2px;
|
|
1377
1372
|
--_rs-tag-removable-border-radius:4px;
|
|
1378
|
-
--_rs-tag-removable-close-
|
|
1373
|
+
--_rs-tag-removable-close-part-size:28px;
|
|
1379
1374
|
--_rs-tag-removable-custom-icon-size:20px;
|
|
1380
1375
|
}
|
|
1381
1376
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html) [data-rs-internal="removable-tag__close-icon"]:not(html){
|
|
@@ -1675,9 +1670,8 @@
|
|
|
1675
1670
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html){
|
|
1676
1671
|
--_rs-tag-removable-vertical-padding:6px;
|
|
1677
1672
|
--_rs-tag-removable-left-padding:12px;
|
|
1678
|
-
--_rs-tag-removable-right-padding:2px;
|
|
1679
1673
|
--_rs-tag-removable-border-radius:6px;
|
|
1680
|
-
--_rs-tag-removable-close-
|
|
1674
|
+
--_rs-tag-removable-close-part-size:36px;
|
|
1681
1675
|
--_rs-tag-removable-custom-icon-size:24px;
|
|
1682
1676
|
}
|
|
1683
1677
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html) [data-rs-internal="removable-tag__close-icon"]:not(html){
|
|
@@ -1945,7 +1939,7 @@
|
|
|
1945
1939
|
--_rs-tag-uppercase-horizontal-padding:var(
|
|
1946
1940
|
--_rs-tag-base-horizontal-padding
|
|
1947
1941
|
);
|
|
1948
|
-
--_rs-tag-icon-size:
|
|
1942
|
+
--_rs-tag-icon-size:16px;
|
|
1949
1943
|
--_rs-tag-border-radius:4px;
|
|
1950
1944
|
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
1951
1945
|
--_rs-typography-text-transform:initial;
|
|
@@ -1983,13 +1977,12 @@
|
|
|
1983
1977
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html){
|
|
1984
1978
|
--_rs-tag-removable-vertical-padding:2px;
|
|
1985
1979
|
--_rs-tag-removable-left-padding:8px;
|
|
1986
|
-
--_rs-tag-removable-right-padding:2px;
|
|
1987
1980
|
--_rs-tag-removable-border-radius:4px;
|
|
1988
|
-
--_rs-tag-removable-close-
|
|
1989
|
-
--_rs-tag-removable-custom-icon-size:
|
|
1981
|
+
--_rs-tag-removable-close-part-size:24px;
|
|
1982
|
+
--_rs-tag-removable-custom-icon-size:16px;
|
|
1990
1983
|
}
|
|
1991
1984
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html) [data-rs-internal="removable-tag__close-icon"]:not(html){
|
|
1992
|
-
--_rs-icons-height:
|
|
1985
|
+
--_rs-icons-height:16px;
|
|
1993
1986
|
}
|
|
1994
1987
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html){
|
|
1995
1988
|
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
@@ -2305,9 +2298,8 @@
|
|
|
2305
2298
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html){
|
|
2306
2299
|
--_rs-tag-removable-vertical-padding:4px;
|
|
2307
2300
|
--_rs-tag-removable-left-padding:8px;
|
|
2308
|
-
--_rs-tag-removable-right-padding:2px;
|
|
2309
2301
|
--_rs-tag-removable-border-radius:4px;
|
|
2310
|
-
--_rs-tag-removable-close-
|
|
2302
|
+
--_rs-tag-removable-close-part-size:28px;
|
|
2311
2303
|
--_rs-tag-removable-custom-icon-size:20px;
|
|
2312
2304
|
}
|
|
2313
2305
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html) [data-rs-internal="removable-tag__close-icon"]:not(html){
|
|
@@ -2645,9 +2637,8 @@
|
|
|
2645
2637
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html){
|
|
2646
2638
|
--_rs-tag-removable-vertical-padding:6px;
|
|
2647
2639
|
--_rs-tag-removable-left-padding:12px;
|
|
2648
|
-
--_rs-tag-removable-right-padding:2px;
|
|
2649
2640
|
--_rs-tag-removable-border-radius:6px;
|
|
2650
|
-
--_rs-tag-removable-close-
|
|
2641
|
+
--_rs-tag-removable-close-part-size:36px;
|
|
2651
2642
|
--_rs-tag-removable-custom-icon-size:24px;
|
|
2652
2643
|
}
|
|
2653
2644
|
& [data-rs-internal="select-trigger"] [data-rs-internal='select-trigger__removable-tag']:not(html) [data-rs-internal="removable-tag__close-icon"]:not(html){
|
package/lib/utils.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Theme } from '@rescui/ui-contexts';
|
|
2
1
|
import type { SelectOptionOrGroup, SelectOptionsGroup, NoOptionsMessage, SelectSize } from './types';
|
|
3
2
|
import { Groups, Index, SelectOption } from './types';
|
|
4
3
|
export declare function shouldOpenSelect(key: string, isTriggerTarget?: boolean): boolean;
|
|
@@ -6,7 +5,6 @@ export declare function getEmptyMessage(isLoading: boolean, isNothingFound: bool
|
|
|
6
5
|
export declare function escapeRegex(str: string): string;
|
|
7
6
|
export declare function convertToOptionGroupsIfNeeded(optionsOrGroups?: SelectOptionOrGroup[]): SelectOptionsGroup[];
|
|
8
7
|
export declare const calculateMaxHeight: (size: SelectSize) => number;
|
|
9
|
-
export declare const reverseTheme: (theme: Theme) => "light" | "dark";
|
|
10
8
|
export declare function getOptionValue(option: SelectOption): string;
|
|
11
9
|
export declare const OptionGroupTypes: {
|
|
12
10
|
HEADER: string;
|
package/lib/utils.js
CHANGED
|
@@ -82,10 +82,6 @@ const calculateMaxHeight = size => {
|
|
|
82
82
|
return (Math.ceil(MAX_VISIBLE_ITEMS) + 0.5) * itemHeight;
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
-
const reverseTheme = theme => {
|
|
86
|
-
return theme === 'dark' ? 'light' : 'dark';
|
|
87
|
-
};
|
|
88
|
-
|
|
89
85
|
function getOptionValue(option) {
|
|
90
86
|
return typeof option.value === 'string' ? option.value : option.label;
|
|
91
87
|
}
|
|
@@ -177,4 +173,4 @@ const isIndexMatchCursor = (cursorIndex, index) => {
|
|
|
177
173
|
|
|
178
174
|
const withoutGroupsLabel = groups => groups.every(g => !g.label);
|
|
179
175
|
|
|
180
|
-
export { OptionGroupTypes, calculateMaxHeight, convertToOptionGroupsIfNeeded, escapeRegex, getDefaultCursorIndex, getEmptyMessage, getMovedCursorIndex, getOptionValue, getPlainOptionsFromGroups, isGroupsEmpty, isIndexMatchCursor,
|
|
176
|
+
export { OptionGroupTypes, calculateMaxHeight, convertToOptionGroupsIfNeeded, escapeRegex, getDefaultCursorIndex, getEmptyMessage, getMovedCursorIndex, getOptionValue, getPlainOptionsFromGroups, isGroupsEmpty, isIndexMatchCursor, shouldOpenSelect, useStrongMemo, withoutGroupsLabel };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/select",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babel/runtime-corejs3": "^7.26.0",
|
|
19
|
-
"@rescui/dropdown": "^0.
|
|
20
|
-
"@rescui/menu": "^0.12.
|
|
21
|
-
"@rescui/tag": "^0.
|
|
19
|
+
"@rescui/dropdown": "^0.9.0",
|
|
20
|
+
"@rescui/menu": "^0.12.2",
|
|
21
|
+
"@rescui/tag": "^0.12.1",
|
|
22
22
|
"@rescui/use-resize-observer": "^0.3.0",
|
|
23
23
|
"classnames": "^2.2.6",
|
|
24
24
|
"scroll-into-view-if-needed": "2.2.20"
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"react": ">=16.8.0 <20"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@rescui/colors": "^0.2.
|
|
32
|
+
"@rescui/colors": "^0.2.12",
|
|
33
33
|
"@rescui/scripts": "^0.5.1",
|
|
34
|
-
"@rescui/typography": "^0.24.
|
|
35
|
-
"@rescui/visual-regression": "^0.1.
|
|
34
|
+
"@rescui/typography": "^0.24.2",
|
|
35
|
+
"@rescui/visual-regression": "^0.1.4",
|
|
36
36
|
"sniffr": "^1.2.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
|
|
41
41
|
},
|
|
42
42
|
"nx": {},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "4c9832a9e5fc1fe7a9a0c863f73f7f14088e3fd5"
|
|
44
44
|
}
|