allaw-ui 3.3.0 → 3.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.
|
@@ -12,6 +12,7 @@ export interface ActionButtonProps extends ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
12
12
|
isLoading?: boolean;
|
|
13
13
|
variant?: "default" | "warning";
|
|
14
14
|
size?: "medium" | "large";
|
|
15
|
+
dataTestId?: string;
|
|
15
16
|
}
|
|
16
17
|
declare const ActionButton: React.ForwardRefExoticComponent<ActionButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
17
18
|
export default ActionButton;
|
|
@@ -57,7 +57,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
57
57
|
}
|
|
58
58
|
return t;
|
|
59
59
|
};
|
|
60
|
-
import React, { forwardRef, useImperativeHandle, useState,
|
|
60
|
+
import React, { forwardRef, useEffect, useImperativeHandle, useState, } from "react";
|
|
61
61
|
import styles from "./ActionButton.module.css";
|
|
62
62
|
var ActionButton = forwardRef(function (_a, ref) {
|
|
63
63
|
var startIcon = _a.startIcon, endIcon = _a.endIcon, startIconName = _a.startIconName, endIconName = _a.endIconName, label = _a.label, _b = _a.disabled, disabled = _b === void 0 ? false : _b, onClick = _a.onClick, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _c, _d = _a.type, type = _d === void 0 ? "button" : _d, _e = _a.isLoading, isLoading = _e === void 0 ? false : _e, variant = _a.variant, _f = _a.size, size = _f === void 0 ? "medium" : _f, props = __rest(_a, ["startIcon", "endIcon", "startIconName", "endIconName", "label", "disabled", "onClick", "fullWidth", "type", "isLoading", "variant", "size"]);
|
|
@@ -107,7 +107,7 @@ var ActionButton = forwardRef(function (_a, ref) {
|
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
}); };
|
|
110
|
-
return (React.createElement("button", __assign({ ref: buttonRef, className: "".concat(styles.actionButton, " ").concat(disabled ? styles.actionButtonDisabled : styles.actionButtonEnabled, " ").concat(fullWidth ? styles.actionButtonFullWidth : "", " ").concat(isButtonLoading ? styles.actionButtonLoading : "", " ").concat(variant === "warning" ? styles.actionButtonWarning : "", " ").concat(size === "large" ? styles.actionButtonLarge : ""), disabled: disabled, onClick: handleClick, type: type }, props),
|
|
110
|
+
return (React.createElement("button", __assign({ ref: buttonRef, "data-testid": props.dataTestId, className: "".concat(styles.actionButton, " ").concat(disabled ? styles.actionButtonDisabled : styles.actionButtonEnabled, " ").concat(fullWidth ? styles.actionButtonFullWidth : "", " ").concat(isButtonLoading ? styles.actionButtonLoading : "", " ").concat(variant === "warning" ? styles.actionButtonWarning : "", " ").concat(size === "large" ? styles.actionButtonLarge : ""), disabled: disabled, onClick: handleClick, type: type }, props),
|
|
111
111
|
startIcon && (React.createElement("span", { className: "".concat(styles.actionButtonIcon, " ").concat(startIconName) })),
|
|
112
112
|
React.createElement("span", { className: styles.actionButtonLabel }, label),
|
|
113
113
|
isButtonLoading ? (React.createElement("span", { className: styles.actionButtonLoadingDots }, loadingDots)) : (endIcon && (React.createElement("span", { className: "".concat(styles.actionButtonIcon, " ").concat(endIconName) })))));
|
|
@@ -1,171 +1,174 @@
|
|
|
1
1
|
.backdrop {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
height: 100vh;
|
|
6
|
+
width: 100vw;
|
|
7
|
+
/* z-index: 4500; */
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.baseFilter {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
position: relative;
|
|
12
|
+
width: fit-content;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.smallOpenFilter{
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
.smallOpenFilter {
|
|
16
|
+
position: relative;
|
|
17
|
+
width: fit-content;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.options {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: 120%;
|
|
23
|
+
left: 0;
|
|
24
|
+
width: fit-content;
|
|
25
|
+
border: 0.5px solid #ddd;
|
|
26
|
+
border-radius: 4px;
|
|
27
|
+
background-color: #ffffff;
|
|
28
|
+
box-shadow: rgba(9, 30, 66, 0.15) 0px 8px 12px 0px;
|
|
29
|
+
z-index: 1000;
|
|
30
|
+
padding: 0.4rem 0rem;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.item {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
background: none;
|
|
35
|
+
border: none;
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: row;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 0.75rem;
|
|
40
|
+
padding: 0.5rem 1rem;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
border-left: 2px solid #fff;
|
|
43
|
+
width: 100%;
|
|
44
|
+
color: #0000;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.round {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
padding: 2px;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
border: 1px solid #d1dce7;
|
|
52
|
+
border-radius: 3rem;
|
|
53
|
+
padding: 2px;
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
.selected {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
background-color: #25beeb;
|
|
58
|
+
min-width: 0.6rem;
|
|
59
|
+
min-height: 0.6rem;
|
|
60
|
+
border-radius: 1rem;
|
|
61
|
+
display: block;
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
.notSelected {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
background-color: #fff;
|
|
66
|
+
min-width: 0.6rem;
|
|
67
|
+
min-height: 0.6rem;
|
|
68
|
+
border-radius: 1rem;
|
|
69
|
+
display: block;
|
|
71
70
|
}
|
|
72
71
|
|
|
73
72
|
.item > span {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
text-wrap: nowrap;
|
|
74
|
+
font-family: var(--font-open-sans);
|
|
75
|
+
font-size: 14px;
|
|
76
|
+
font-weight: 500;
|
|
77
|
+
color: #000;
|
|
79
78
|
}
|
|
80
79
|
|
|
81
80
|
.item:hover {
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
background-color: #eff2f5;
|
|
82
|
+
border-left: 2px solid #25beeb;
|
|
84
83
|
}
|
|
85
84
|
|
|
86
85
|
.optionsSmall {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
86
|
+
position: fixed;
|
|
87
|
+
right: 0;
|
|
88
|
+
transition: bottom 225ms cubic-bezier(0, 0, 0.2, 1);
|
|
89
|
+
max-height: 90dvh;
|
|
90
|
+
background-color: white;
|
|
91
|
+
width: 100vw;
|
|
92
|
+
display: none;
|
|
93
|
+
border-radius: 8px 8px 0 0;
|
|
94
|
+
padding: 1rem;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
gap: 2rem;
|
|
98
97
|
}
|
|
99
98
|
|
|
100
99
|
.smallItem {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
100
|
+
background: none;
|
|
101
|
+
border: none;
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-direction: row-reverse;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: space-between;
|
|
106
|
+
padding: 1.5rem 1rem;
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
border-left: 2px solid #fff;
|
|
109
|
+
width: 100%;
|
|
110
|
+
color: #0000;
|
|
111
|
+
border-top: 1px solid #e4edf6;
|
|
113
112
|
}
|
|
114
113
|
|
|
115
114
|
.smallItem:first-child {
|
|
116
|
-
|
|
115
|
+
border-top: none;
|
|
117
116
|
}
|
|
118
117
|
|
|
119
118
|
.smallItem > span {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
119
|
+
text-wrap: nowrap;
|
|
120
|
+
font-family: var(--font-open-sans);
|
|
121
|
+
font-size: 14px;
|
|
122
|
+
font-weight: 500;
|
|
123
|
+
color: #000;
|
|
125
124
|
}
|
|
126
125
|
|
|
127
126
|
.choices {
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
display: flex;
|
|
128
|
+
flex-direction: column;
|
|
130
129
|
}
|
|
131
130
|
|
|
132
131
|
.closeButton {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
132
|
+
height: fit-content;
|
|
133
|
+
border: none;
|
|
134
|
+
background: transparent;
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
width: 20px;
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
justify-content: center;
|
|
141
140
|
}
|
|
142
141
|
|
|
143
142
|
.closeButton > i {
|
|
144
|
-
|
|
143
|
+
font-size: 16px;
|
|
145
144
|
}
|
|
146
145
|
|
|
147
146
|
.row {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
147
|
+
width: 100%;
|
|
148
|
+
height: fit-content;
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-direction: row;
|
|
151
|
+
justify-content: space-between;
|
|
152
|
+
align-items: center;
|
|
153
|
+
gap: 1rem;
|
|
154
|
+
padding: 1rem 0.5rem;
|
|
156
155
|
}
|
|
157
156
|
|
|
158
157
|
@media screen and (max-width: 800px) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
158
|
+
.options {
|
|
159
|
+
display: none;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.optionsSmall {
|
|
163
|
+
z-index: 5000;
|
|
164
|
+
display: flex;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.backdrop {
|
|
168
|
+
background: linear-gradient(
|
|
169
|
+
180deg,
|
|
170
|
+
rgba(26, 50, 56, 0) 0%,
|
|
171
|
+
rgba(2, 9, 11, 0.45) 100%
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
}
|