funda-ui 4.7.101 → 4.7.105
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/Chatbox/index.js +6 -1
- package/Checkbox/index.js +10 -1
- package/Date/index.js +12 -2
- package/Input/index.js +6 -1
- package/LiveSearch/index.js +5 -0
- package/MultipleCheckboxes/index.js +27 -1
- package/NumberInput/index.js +6 -1
- package/Radio/index.js +22 -1
- package/RangeSlider/index.js +6 -1
- package/Stepper/index.css +109 -34
- package/Stepper/index.d.ts +1 -1
- package/Stepper/index.js +55 -2
- package/TagInput/index.js +10 -1
- package/Textarea/index.js +6 -1
- package/Toast/index.css +23 -75
- package/Toast/index.d.ts +3 -34
- package/Toast/index.js +652 -175
- package/lib/cjs/Chatbox/index.js +6 -1
- package/lib/cjs/Checkbox/index.js +10 -1
- package/lib/cjs/Date/index.js +12 -2
- package/lib/cjs/Input/index.js +6 -1
- package/lib/cjs/LiveSearch/index.js +5 -0
- package/lib/cjs/MultipleCheckboxes/index.js +27 -1
- package/lib/cjs/NumberInput/index.js +6 -1
- package/lib/cjs/Radio/index.js +22 -1
- package/lib/cjs/RangeSlider/index.js +6 -1
- package/lib/cjs/Stepper/index.d.ts +1 -1
- package/lib/cjs/Stepper/index.js +55 -2
- package/lib/cjs/TagInput/index.js +10 -1
- package/lib/cjs/Textarea/index.js +6 -1
- package/lib/cjs/Toast/index.d.ts +3 -34
- package/lib/cjs/Toast/index.js +652 -175
- package/lib/css/Stepper/index.css +109 -34
- package/lib/css/Toast/index.css +23 -75
- package/lib/esm/Checkbox/index.tsx +12 -1
- package/lib/esm/Date/index.tsx +8 -1
- package/lib/esm/Input/index.tsx +8 -1
- package/lib/esm/LiveSearch/index.tsx +7 -0
- package/lib/esm/MultipleCheckboxes/index.tsx +19 -1
- package/lib/esm/NumberInput/index.tsx +8 -1
- package/lib/esm/Radio/index.tsx +17 -1
- package/lib/esm/Stepper/index.scss +135 -36
- package/lib/esm/Stepper/index.tsx +51 -3
- package/lib/esm/TagInput/index.tsx +8 -1
- package/lib/esm/Textarea/index.tsx +8 -1
- package/lib/esm/Toast/Item.tsx +52 -11
- package/lib/esm/Toast/Toast.tsx +391 -0
- package/lib/esm/Toast/ToastContext.tsx +104 -0
- package/lib/esm/Toast/__toast.vanilla.js +422 -0
- package/lib/esm/Toast/index.scss +24 -96
- package/lib/esm/Toast/index.tsx +3 -374
- package/lib/esm/Toast/types.ts +60 -0
- package/lib/esm/Toast/useToast.tsx +72 -0
- package/package.json +1 -1
package/Textarea/index.js
CHANGED
|
@@ -1531,13 +1531,18 @@ var Textarea = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(fu
|
|
|
1531
1531
|
control: function control() {
|
|
1532
1532
|
return valRef.current;
|
|
1533
1533
|
},
|
|
1534
|
+
getLatestVal: function getLatestVal() {
|
|
1535
|
+
return changedVal || '';
|
|
1536
|
+
},
|
|
1534
1537
|
clear: function clear(cb) {
|
|
1535
1538
|
setChangedVal('');
|
|
1536
1539
|
cb === null || cb === void 0 ? void 0 : cb();
|
|
1540
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(null, valRef.current, '');
|
|
1537
1541
|
},
|
|
1538
1542
|
set: function set(value, cb) {
|
|
1539
1543
|
setChangedVal("".concat(value));
|
|
1540
1544
|
cb === null || cb === void 0 ? void 0 : cb();
|
|
1545
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(null, valRef.current, "".concat(value));
|
|
1541
1546
|
},
|
|
1542
1547
|
resetHeight: function resetHeight() {
|
|
1543
1548
|
reset();
|
|
@@ -1549,7 +1554,7 @@ var Textarea = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(fu
|
|
|
1549
1554
|
}, 0);
|
|
1550
1555
|
}
|
|
1551
1556
|
};
|
|
1552
|
-
}, [contentRef, reset]);
|
|
1557
|
+
}, [contentRef, reset, changedVal]);
|
|
1553
1558
|
var propExist = function propExist(p) {
|
|
1554
1559
|
return typeof p !== 'undefined' && p !== null && p !== '';
|
|
1555
1560
|
};
|
package/Toast/index.css
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
--toasts-offset-bothsides: 15px;
|
|
10
10
|
--toasts-container-gap: 0.5rem;
|
|
11
11
|
--toasts-container-width: 350px;
|
|
12
|
-
--toasts-progress-height:
|
|
13
|
-
--toasts-progress-bg: rgba(
|
|
12
|
+
--toasts-progress-height: 3px;
|
|
13
|
+
--toasts-progress-bg: rgba(228, 228, 228, 0.6);
|
|
14
14
|
width: var(--toasts-container-width);
|
|
15
15
|
position: fixed;
|
|
16
16
|
left: 50%;
|
|
@@ -72,34 +72,28 @@
|
|
|
72
72
|
}
|
|
73
73
|
.toasts__wrapper .toast-container {
|
|
74
74
|
margin-bottom: var(--toasts-container-gap);
|
|
75
|
+
/* Use clip-path instead of opacity to achieve a fade effect, avoiding the problem of transparency overlay */
|
|
76
|
+
clip-path: inset(0 0 0 0);
|
|
77
|
+
transform: translateY(0);
|
|
78
|
+
/* Rendering of 3D transformations */
|
|
79
|
+
backface-visibility: hidden;
|
|
80
|
+
transform-style: preserve-3d;
|
|
81
|
+
/* init animation */
|
|
82
|
+
/* enter animation */
|
|
83
|
+
/* exit animation */
|
|
84
|
+
}
|
|
85
|
+
.toasts__wrapper .toast-container.animate-ready {
|
|
86
|
+
pointer-events: none;
|
|
87
|
+
clip-path: inset(0 0 100% 0);
|
|
88
|
+
transform: translateY(10px);
|
|
75
89
|
}
|
|
76
|
-
.toasts__wrapper .toast-container.
|
|
77
|
-
|
|
78
|
-
|
|
90
|
+
.toasts__wrapper .toast-container.animate-in {
|
|
91
|
+
clip-path: inset(0 0 0 0);
|
|
92
|
+
transform: translateY(0);
|
|
79
93
|
}
|
|
80
|
-
.toasts__wrapper .toast-container.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
animation-timing-function: linear;
|
|
84
|
-
animation-delay: 0;
|
|
85
|
-
animation-iteration-count: 1;
|
|
86
|
-
animation-fill-mode: forwards;
|
|
87
|
-
}
|
|
88
|
-
.toasts__wrapper .toast-container.auto-anim-switch:not(.only-one) {
|
|
89
|
-
animation-name: toast-anim-hide;
|
|
90
|
-
animation-duration: 0.3s;
|
|
91
|
-
animation-timing-function: linear;
|
|
92
|
-
animation-delay: 0;
|
|
93
|
-
animation-iteration-count: 1;
|
|
94
|
-
animation-fill-mode: forwards;
|
|
95
|
-
}
|
|
96
|
-
.toasts__wrapper .toast-container.only-one.auto-anim-switch {
|
|
97
|
-
animation-name: toast-anim-hide--onlyone;
|
|
98
|
-
animation-duration: 0.3s;
|
|
99
|
-
animation-timing-function: linear;
|
|
100
|
-
animation-delay: 0;
|
|
101
|
-
animation-iteration-count: 1;
|
|
102
|
-
animation-fill-mode: forwards;
|
|
94
|
+
.toasts__wrapper .toast-container.hide-start {
|
|
95
|
+
clip-path: inset(0 0 100% 0);
|
|
96
|
+
transform: translateY(-10px);
|
|
103
97
|
}
|
|
104
98
|
.toasts__wrapper.toasts__wrapper--cascading .toast-container {
|
|
105
99
|
margin-bottom: 0;
|
|
@@ -120,6 +114,7 @@
|
|
|
120
114
|
.toasts__wrapper .toast-progress .progress-bar {
|
|
121
115
|
background: var(--toasts-progress-bg);
|
|
122
116
|
width: 100%;
|
|
117
|
+
height: 100%;
|
|
123
118
|
transition: all 0.1s;
|
|
124
119
|
}
|
|
125
120
|
|
|
@@ -152,50 +147,3 @@
|
|
|
152
147
|
.toast-container.hide-end {
|
|
153
148
|
display: none;
|
|
154
149
|
}
|
|
155
|
-
|
|
156
|
-
@keyframes toast-anim-initfirst {
|
|
157
|
-
0% {
|
|
158
|
-
transform: translateY(-20px);
|
|
159
|
-
opacity: 1;
|
|
160
|
-
}
|
|
161
|
-
100% {
|
|
162
|
-
transform: translateY(20px);
|
|
163
|
-
opacity: 0;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
@keyframes toast-anim-show-first {
|
|
167
|
-
0% {
|
|
168
|
-
transform: translateY(-20px);
|
|
169
|
-
opacity: 0;
|
|
170
|
-
}
|
|
171
|
-
100% {
|
|
172
|
-
transform: translateY(0);
|
|
173
|
-
opacity: 1;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
@keyframes toast-anim-hide {
|
|
177
|
-
0% {
|
|
178
|
-
transform: translateY(-100%);
|
|
179
|
-
opacity: 1;
|
|
180
|
-
}
|
|
181
|
-
100% {
|
|
182
|
-
transform: translateY(10px);
|
|
183
|
-
opacity: 0;
|
|
184
|
-
/* prevent auto-close's item */
|
|
185
|
-
display: block;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
@keyframes toast-anim-hide--onlyone {
|
|
189
|
-
0% {
|
|
190
|
-
transform: translateY(-100%);
|
|
191
|
-
opacity: 1;
|
|
192
|
-
/* prevent auto-close's item */
|
|
193
|
-
display: block;
|
|
194
|
-
}
|
|
195
|
-
100% {
|
|
196
|
-
transform: translateY(10px);
|
|
197
|
-
opacity: 0;
|
|
198
|
-
/* prevent auto-close's item */
|
|
199
|
-
display: block;
|
|
200
|
-
}
|
|
201
|
-
}
|
package/Toast/index.d.ts
CHANGED
|
@@ -1,34 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
wrapperClassName?: string;
|
|
5
|
-
/** Specify data of toasts as a JSON string format. */
|
|
6
|
-
data: any[any];
|
|
7
|
-
/** Automatically hide multiple items */
|
|
8
|
-
autoHideMultiple?: boolean;
|
|
9
|
-
/** The direction of the toast. */
|
|
10
|
-
direction?: string;
|
|
11
|
-
/** Set an automatic closing time, multiple items will be accumulated in order.
|
|
12
|
-
* Amount of time measured in milliseconds. If false or without this attribute, Auto-Close will be disabled.
|
|
13
|
-
*/
|
|
14
|
-
autoCloseTime?: boolean | number;
|
|
15
|
-
/** You can not close pop-win when it is enabled */
|
|
16
|
-
lock?: boolean;
|
|
17
|
-
/** Whether to use cascading styles */
|
|
18
|
-
cascading?: boolean;
|
|
19
|
-
/** Self-defined class name for body*/
|
|
20
|
-
schemeBody?: string;
|
|
21
|
-
/** Self-defined class name for header */
|
|
22
|
-
schemeHeader?: string;
|
|
23
|
-
/** Set the color of the close button */
|
|
24
|
-
closeBtnColor?: string;
|
|
25
|
-
/** Disable the close button. */
|
|
26
|
-
closeDisabled?: boolean;
|
|
27
|
-
/** */
|
|
28
|
-
async?: boolean;
|
|
29
|
-
/** -- */
|
|
30
|
-
id?: string;
|
|
31
|
-
onClose?: (e: HTMLDivElement, currentIndex: number, data: HTMLDivElement[]) => void;
|
|
32
|
-
};
|
|
33
|
-
declare const Toast: (props: ToastProps) => JSX.Element;
|
|
34
|
-
export default Toast;
|
|
1
|
+
export { useToast } from './useToast';
|
|
2
|
+
export { ToastProvider } from './ToastContext';
|
|
3
|
+
export type { ToastOptions } from './types';
|