next-helios-fe 1.8.8 → 1.8.10
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/package.json
CHANGED
@@ -69,25 +69,12 @@ export const MultipleSelect: React.FC<MultipleSelectProps> = ({
|
|
69
69
|
}, []);
|
70
70
|
|
71
71
|
useEffect(() => {
|
72
|
-
if (value) {
|
72
|
+
if (value?.length) {
|
73
73
|
setTempValue(value);
|
74
74
|
return;
|
75
75
|
}
|
76
76
|
}, [value]);
|
77
77
|
|
78
|
-
useEffect(() => {
|
79
|
-
onChange &&
|
80
|
-
onChange({
|
81
|
-
target: { value: tempValue },
|
82
|
-
});
|
83
|
-
}, [tempValue]);
|
84
|
-
|
85
|
-
useEffect(() => {
|
86
|
-
if (tempValue.length === 0) {
|
87
|
-
fakeInputRef.current;
|
88
|
-
}
|
89
|
-
}, [tempValue]);
|
90
|
-
|
91
78
|
useEffect(() => {
|
92
79
|
if (tempValue.length === 0) {
|
93
80
|
inputRef.current?.setCustomValidity(
|
@@ -168,12 +155,7 @@ export const MultipleSelect: React.FC<MultipleSelectProps> = ({
|
|
168
155
|
className="flex items-center gap-2 px-2 py-0.5 rounded-md bg-primary text-white cursor-default pointer-events-auto"
|
169
156
|
>
|
170
157
|
<span>{menus.find((i) => i.value === item)?.label}</span>
|
171
|
-
<div
|
172
|
-
className="cursor-pointer"
|
173
|
-
onClick={() => {
|
174
|
-
setTempValue(tempValue.filter((i) => i !== item));
|
175
|
-
}}
|
176
|
-
>
|
158
|
+
<div className="cursor-pointer">
|
177
159
|
<Icon icon="pajamas:close" />
|
178
160
|
</div>
|
179
161
|
</div>
|
@@ -210,6 +192,13 @@ export const MultipleSelect: React.FC<MultipleSelectProps> = ({
|
|
210
192
|
onClick={() => {
|
211
193
|
if (!disabled) {
|
212
194
|
setTempValue(tempValue.filter((i) => i !== item));
|
195
|
+
if (onChange) {
|
196
|
+
onChange({
|
197
|
+
target: {
|
198
|
+
value: tempValue.filter((i) => i !== item),
|
199
|
+
},
|
200
|
+
} as any);
|
201
|
+
}
|
213
202
|
}
|
214
203
|
}}
|
215
204
|
>
|
@@ -258,6 +247,11 @@ export const MultipleSelect: React.FC<MultipleSelectProps> = ({
|
|
258
247
|
}
|
259
248
|
onClick={() => {
|
260
249
|
setTempValue([...tempValue, item.value]);
|
250
|
+
if (onChange) {
|
251
|
+
onChange({
|
252
|
+
target: { value: [...tempValue, item.value] },
|
253
|
+
} as any);
|
254
|
+
}
|
261
255
|
}}
|
262
256
|
>
|
263
257
|
{item.label}
|
package/src/styles/calendar.scss
CHANGED
@@ -114,14 +114,14 @@
|
|
114
114
|
}
|
115
115
|
|
116
116
|
.react-calendar__tile:disabled {
|
117
|
-
background-color:
|
118
|
-
color:
|
117
|
+
background-color: var(--color-secondary-light);
|
118
|
+
color: var(--color-disabled);
|
119
119
|
}
|
120
120
|
|
121
121
|
.react-calendar__month-view__days__day--neighboringMonth:disabled,
|
122
122
|
.react-calendar__decade-view__years__year--neighboringDecade:disabled,
|
123
123
|
.react-calendar__century-view__decades__decade--neighboringCentury:disabled {
|
124
|
-
color:
|
124
|
+
color: var(--color-silent);
|
125
125
|
}
|
126
126
|
|
127
127
|
.react-calendar__tile:enabled:hover,
|