funda-ui 4.7.163 → 4.7.171
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/Select/index.css +32 -4
- package/Select/index.d.ts +6 -12
- package/Select/index.js +147 -277
- package/lib/cjs/Select/index.d.ts +6 -12
- package/lib/cjs/Select/index.js +147 -277
- package/lib/css/Select/index.css +32 -4
- package/lib/esm/Select/index.scss +41 -4
- package/lib/esm/Select/index.tsx +145 -112
- package/package.json +1 -1
package/Select/index.css
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
--cus-sel-control-wrapper-bg: #fff;
|
|
10
10
|
--cus-sel-control-wrapper-border-color: #dee2e6;
|
|
11
11
|
--cus-sel-control-list-bg: #efefef;
|
|
12
|
+
--cus-sel-clear-fill: #a5a5a5;
|
|
13
|
+
--cus-sel-clear-hover-fill: #000;
|
|
12
14
|
--cus-sel-arrow-fill: #a5a5a5;
|
|
13
15
|
--cus-sel-searchbtn-fill: #a5a5a5;
|
|
14
16
|
--cus-sel-searchbtn-hover-fill: #333;
|
|
@@ -17,7 +19,8 @@
|
|
|
17
19
|
position: relative; /* Required */
|
|
18
20
|
/*------ Placeholder for input ------*/
|
|
19
21
|
/*------ Arrow ------*/
|
|
20
|
-
/*------
|
|
22
|
+
/*------ Clear Icon ------*/
|
|
23
|
+
/*------ Clear Trigger ------*/
|
|
21
24
|
/*------ Input ------*/
|
|
22
25
|
/*------ Arrow ------*/
|
|
23
26
|
/*------ Blinking cursor ------*/
|
|
@@ -33,7 +36,32 @@
|
|
|
33
36
|
.custom-select__wrapper .arrow svg .arrow-fill-g {
|
|
34
37
|
fill: var(--cus-sel-arrow-fill);
|
|
35
38
|
}
|
|
36
|
-
.custom-select__wrapper .
|
|
39
|
+
.custom-select__wrapper .custom-select-clear-icon {
|
|
40
|
+
position: absolute;
|
|
41
|
+
top: 50%;
|
|
42
|
+
transform: rotate(0deg) translateY(-50%);
|
|
43
|
+
transform-origin: top;
|
|
44
|
+
right: 1.5rem;
|
|
45
|
+
z-index: 2;
|
|
46
|
+
pointer-events: all;
|
|
47
|
+
}
|
|
48
|
+
.custom-select__wrapper .custom-select-clear-icon button {
|
|
49
|
+
border: none;
|
|
50
|
+
box-shadow: none;
|
|
51
|
+
margin: 0;
|
|
52
|
+
padding: 0;
|
|
53
|
+
background: none;
|
|
54
|
+
}
|
|
55
|
+
.custom-select__wrapper .custom-select-clear-icon.pos-offset {
|
|
56
|
+
right: 2.25rem;
|
|
57
|
+
}
|
|
58
|
+
.custom-select__wrapper .custom-select-clear-icon svg path {
|
|
59
|
+
fill: var(--cus-sel-clear-fill);
|
|
60
|
+
}
|
|
61
|
+
.custom-select__wrapper .custom-select-clear-icon:hover svg path {
|
|
62
|
+
fill: var(--cus-sel-clear-hover-fill);
|
|
63
|
+
}
|
|
64
|
+
.custom-select__wrapper .clear svg .clear-fill-g {
|
|
37
65
|
fill: var(--cus-sel-arrow-fill);
|
|
38
66
|
}
|
|
39
67
|
.custom-select__wrapper [data-select]:focus {
|
|
@@ -392,10 +420,10 @@
|
|
|
392
420
|
font-size: 0.75rem;
|
|
393
421
|
padding: 0.1rem 0.5rem;
|
|
394
422
|
}
|
|
395
|
-
.custom-select__options-wrapper .custom-select-multi__control-option-item--
|
|
423
|
+
.custom-select__options-wrapper .custom-select-multi__control-option-item--clear.hide {
|
|
396
424
|
display: none !important;
|
|
397
425
|
}
|
|
398
|
-
.custom-select__options-wrapper .custom-select-multi__control-option-item--
|
|
426
|
+
.custom-select__options-wrapper .custom-select-multi__control-option-item--clear .btn {
|
|
399
427
|
font-size: 0.75rem;
|
|
400
428
|
padding: 0.1rem 0.5rem;
|
|
401
429
|
}
|
package/Select/index.d.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare type SelectOptionChangeFnType = (arg1: any, arg2: any, arg3: any) => void;
|
|
3
|
-
export interface MultiSelectDataConfig {
|
|
4
|
-
values: string[] | number[];
|
|
5
|
-
labels: string[] | number[];
|
|
6
|
-
queryStrings: string[] | number[];
|
|
7
|
-
}
|
|
8
3
|
export interface MultiSelectControlValConfig {
|
|
9
4
|
values: string[];
|
|
10
5
|
labels: string[];
|
|
@@ -24,16 +19,15 @@ export interface MultiSelectConfig {
|
|
|
24
19
|
selectAll: boolean;
|
|
25
20
|
selectAllLabel?: string;
|
|
26
21
|
deselectAllLabel?: string;
|
|
27
|
-
data: MultiSelectDataConfig | null;
|
|
28
22
|
}
|
|
29
23
|
export interface multiSelectSelectedItemOnlyStatusConfig {
|
|
30
24
|
itemsLabel?: string;
|
|
31
25
|
allItemsLabel?: string;
|
|
32
26
|
noneLabel?: string;
|
|
33
27
|
}
|
|
34
|
-
export interface
|
|
28
|
+
export interface ClearTriggerConfig {
|
|
35
29
|
valid: boolean;
|
|
36
|
-
|
|
30
|
+
clearValueLabel?: string;
|
|
37
31
|
}
|
|
38
32
|
export declare type SelectProps = {
|
|
39
33
|
contentRef?: React.ForwardedRef<any>;
|
|
@@ -43,13 +37,14 @@ export declare type SelectProps = {
|
|
|
43
37
|
controlExClassName?: string;
|
|
44
38
|
optionsExClassName?: string;
|
|
45
39
|
exceededSidePosOffset?: number;
|
|
40
|
+
clearIcon?: boolean;
|
|
46
41
|
multiSelect?: MultiSelectConfig;
|
|
47
42
|
multiSelectEntireAreaTrigger?: boolean;
|
|
48
43
|
multiSelectSelectedItemOnlyStatus?: multiSelectSelectedItemOnlyStatusConfig;
|
|
49
44
|
renderSelectedValue?: (selectedData: MultiSelectControlValConfig, removeFunc: (e: React.MouseEvent) => void) => React.ReactNode;
|
|
50
|
-
|
|
51
|
-
defaultValue?: string | OptionConfig;
|
|
52
|
-
value?: string | OptionConfig;
|
|
45
|
+
clearTrigger?: ClearTriggerConfig;
|
|
46
|
+
defaultValue?: string | OptionConfig | OptionConfig[];
|
|
47
|
+
value?: string | OptionConfig | OptionConfig[];
|
|
53
48
|
label?: React.ReactNode | string;
|
|
54
49
|
name?: string;
|
|
55
50
|
disabled?: any;
|
|
@@ -66,7 +61,6 @@ export declare type SelectProps = {
|
|
|
66
61
|
controlArrow?: React.ReactNode;
|
|
67
62
|
firstRequestAutoExec?: boolean;
|
|
68
63
|
fetchTrigger?: boolean;
|
|
69
|
-
fetchTriggerForDefaultData?: MultiSelectDataConfig | null;
|
|
70
64
|
/** Set the depth value of the control to control the display of the pop-up layer appear above.
|
|
71
65
|
* Please set it when multiple controls are used at the same time. */
|
|
72
66
|
depth?: number;
|