antd-mobile 5.33.2 → 5.35.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/2x/bundle/antd-mobile.cjs.development.js +1778 -2992
- package/2x/bundle/antd-mobile.cjs.js +7 -15
- package/2x/bundle/antd-mobile.es.development.js +778 -1992
- package/2x/bundle/antd-mobile.es.js +9185 -9967
- package/2x/bundle/antd-mobile.umd.development.js +1778 -2992
- package/2x/bundle/antd-mobile.umd.js +7 -15
- package/2x/bundle/css-vars-patch.css +3 -3
- package/2x/bundle/style.css +8 -11
- package/2x/cjs/components/button/button.d.ts +1 -1
- package/2x/cjs/components/button/button.patch.css +3 -3
- package/2x/cjs/components/cascader-view/use-cascader-value-extend.js +10 -5
- package/2x/cjs/components/checkbox/native-input.js +1 -1
- package/2x/cjs/components/config-provider/config-provider.d.ts +3 -2
- package/2x/cjs/components/error-block/create-error-block.d.ts +1 -0
- package/2x/cjs/components/error-block/create-error-block.js +1 -0
- package/2x/cjs/components/error-block/index.d.ts +0 -1
- package/2x/cjs/components/error-block/index.js +2 -3
- package/2x/cjs/components/form/form-item.js +1 -0
- package/2x/cjs/components/form/form.js +2 -2
- package/2x/cjs/components/infinite-scroll/infinite-scroll.js +8 -4
- package/2x/cjs/components/picker-view/wheel.js +7 -4
- package/2x/cjs/components/popover/index.d.ts +1 -1
- package/2x/cjs/components/popover/popover.d.ts +1 -1
- package/2x/cjs/components/radio/radio.css +1 -1
- package/2x/cjs/components/radio/radio.d.ts +1 -1
- package/2x/cjs/components/radio/radio.js +5 -5
- package/2x/cjs/components/result-page/result-page.css +5 -5
- package/2x/cjs/components/stepper/stepper.js +2 -2
- package/2x/cjs/components/swipe-action/swipe-action.d.ts +1 -1
- package/2x/cjs/components/swiper/index.d.ts +3 -2
- package/2x/cjs/components/swiper/swiper.css +2 -1
- package/2x/cjs/components/swiper/swiper.d.ts +18 -4
- package/2x/cjs/components/swiper/swiper.js +98 -53
- package/2x/cjs/components/text-area/text-area.css +0 -4
- package/2x/cjs/global/css-vars-patch.css +3 -3
- package/2x/cjs/index.d.ts +1 -1
- package/2x/cjs/index.js +6 -0
- package/2x/cjs/locales/hu-HU.d.ts +139 -0
- package/2x/cjs/locales/hu-HU.js +148 -0
- package/2x/cjs/locales/th-TH.d.ts +139 -0
- package/2x/cjs/locales/th-TH.js +149 -0
- package/2x/cjs/utils/with-default-props.js +8 -9
- package/2x/cjs/utils/with-stop-propagation.d.ts +1 -1
- package/2x/cjs/utils/with-stop-propagation.js +2 -1
- package/2x/es/components/button/button.d.ts +1 -1
- package/2x/es/components/button/button.patch.css +3 -3
- package/2x/es/components/cascader-view/use-cascader-value-extend.js +8 -3
- package/2x/es/components/checkbox/native-input.js +1 -1
- package/2x/es/components/config-provider/config-provider.d.ts +3 -2
- package/2x/es/components/error-block/create-error-block.d.ts +1 -0
- package/2x/es/components/error-block/create-error-block.js +1 -0
- package/2x/es/components/error-block/index.d.ts +0 -1
- package/2x/es/components/error-block/index.js +0 -1
- package/2x/es/components/form/form-item.js +1 -0
- package/2x/es/components/form/form.js +2 -2
- package/2x/es/components/infinite-scroll/infinite-scroll.js +8 -4
- package/2x/es/components/picker-view/wheel.js +6 -3
- package/2x/es/components/popover/index.d.ts +1 -1
- package/2x/es/components/popover/popover.d.ts +1 -1
- package/2x/es/components/radio/radio.css +1 -1
- package/2x/es/components/radio/radio.d.ts +1 -1
- package/2x/es/components/radio/radio.js +4 -4
- package/2x/es/components/result-page/result-page.css +5 -5
- package/2x/es/components/stepper/stepper.js +1 -1
- package/2x/es/components/swipe-action/swipe-action.d.ts +1 -1
- package/2x/es/components/swiper/index.d.ts +3 -2
- package/2x/es/components/swiper/swiper.css +2 -1
- package/2x/es/components/swiper/swiper.d.ts +18 -4
- package/2x/es/components/swiper/swiper.js +98 -53
- package/2x/es/components/text-area/text-area.css +0 -4
- package/2x/es/global/css-vars-patch.css +3 -3
- package/2x/es/index.d.ts +1 -1
- package/2x/es/index.js +1 -1
- package/2x/es/locales/hu-HU.d.ts +139 -0
- package/2x/es/locales/hu-HU.js +140 -0
- package/2x/es/locales/th-TH.d.ts +139 -0
- package/2x/es/locales/th-TH.js +142 -0
- package/2x/es/utils/with-default-props.js +8 -8
- package/2x/es/utils/with-stop-propagation.d.ts +1 -1
- package/2x/es/utils/with-stop-propagation.js +2 -1
- package/2x/package.json +12 -4
- package/bundle/antd-mobile.cjs.development.js +1778 -2992
- package/bundle/antd-mobile.cjs.js +7 -15
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +778 -1992
- package/bundle/antd-mobile.es.js +9185 -9967
- package/bundle/antd-mobile.umd.development.js +1778 -2992
- package/bundle/antd-mobile.umd.js +7 -15
- package/bundle/css-vars-patch.css +3 -3
- package/bundle/style.css +1 -1
- package/cjs/components/button/button.d.ts +1 -1
- package/cjs/components/button/button.patch.css +3 -3
- package/cjs/components/cascader-view/use-cascader-value-extend.js +10 -5
- package/cjs/components/checkbox/native-input.js +1 -1
- package/cjs/components/config-provider/config-provider.d.ts +3 -2
- package/cjs/components/error-block/create-error-block.d.ts +1 -0
- package/cjs/components/error-block/create-error-block.js +1 -0
- package/cjs/components/error-block/index.d.ts +0 -1
- package/cjs/components/error-block/index.js +2 -3
- package/cjs/components/form/form-item.js +1 -0
- package/cjs/components/form/form.js +2 -2
- package/cjs/components/infinite-scroll/infinite-scroll.js +8 -4
- package/cjs/components/picker-view/wheel.js +7 -4
- package/cjs/components/popover/index.d.ts +1 -1
- package/cjs/components/popover/popover.d.ts +1 -1
- package/cjs/components/radio/radio.css +1 -1
- package/cjs/components/radio/radio.d.ts +1 -1
- package/cjs/components/radio/radio.js +5 -5
- package/cjs/components/result-page/result-page.css +5 -5
- package/cjs/components/stepper/stepper.js +2 -2
- package/cjs/components/swipe-action/swipe-action.d.ts +1 -1
- package/cjs/components/swiper/index.d.ts +3 -2
- package/cjs/components/swiper/swiper.css +2 -1
- package/cjs/components/swiper/swiper.d.ts +18 -4
- package/cjs/components/swiper/swiper.js +98 -53
- package/cjs/components/text-area/text-area.css +0 -3
- package/cjs/global/css-vars-patch.css +3 -3
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +6 -0
- package/cjs/locales/hu-HU.d.ts +139 -0
- package/cjs/locales/hu-HU.js +148 -0
- package/cjs/locales/th-TH.d.ts +139 -0
- package/cjs/locales/th-TH.js +149 -0
- package/cjs/utils/with-default-props.js +8 -9
- package/cjs/utils/with-stop-propagation.d.ts +1 -1
- package/cjs/utils/with-stop-propagation.js +2 -1
- package/es/components/button/button.d.ts +1 -1
- package/es/components/button/button.patch.css +3 -3
- package/es/components/cascader-view/use-cascader-value-extend.js +8 -3
- package/es/components/checkbox/native-input.js +1 -1
- package/es/components/config-provider/config-provider.d.ts +3 -2
- package/es/components/error-block/create-error-block.d.ts +1 -0
- package/es/components/error-block/create-error-block.js +1 -0
- package/es/components/error-block/index.d.ts +0 -1
- package/es/components/error-block/index.js +0 -1
- package/es/components/form/form-item.js +1 -0
- package/es/components/form/form.js +2 -2
- package/es/components/infinite-scroll/infinite-scroll.js +8 -4
- package/es/components/picker-view/wheel.js +6 -3
- package/es/components/popover/index.d.ts +1 -1
- package/es/components/popover/popover.d.ts +1 -1
- package/es/components/radio/radio.css +1 -1
- package/es/components/radio/radio.d.ts +1 -1
- package/es/components/radio/radio.js +4 -4
- package/es/components/result-page/result-page.css +5 -5
- package/es/components/stepper/stepper.js +1 -1
- package/es/components/swipe-action/swipe-action.d.ts +1 -1
- package/es/components/swiper/index.d.ts +3 -2
- package/es/components/swiper/swiper.css +2 -1
- package/es/components/swiper/swiper.d.ts +18 -4
- package/es/components/swiper/swiper.js +98 -53
- package/es/components/text-area/text-area.css +0 -3
- package/es/global/css-vars-patch.css +3 -3
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/locales/hu-HU.d.ts +139 -0
- package/es/locales/hu-HU.js +140 -0
- package/es/locales/th-TH.d.ts +139 -0
- package/es/locales/th-TH.js +142 -0
- package/es/utils/with-default-props.js +8 -8
- package/es/utils/with-stop-propagation.d.ts +1 -1
- package/es/utils/with-stop-propagation.js +2 -1
- package/package.json +12 -4
- package/umd/antd-mobile.js +1 -1
- package/umd/antd-mobile.js.LICENSE.txt +0 -9
|
@@ -43,37 +43,52 @@ const defaultProps = {
|
|
|
43
43
|
let currentUid;
|
|
44
44
|
const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) => {
|
|
45
45
|
const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
|
|
46
|
+
const {
|
|
47
|
+
direction,
|
|
48
|
+
total,
|
|
49
|
+
children,
|
|
50
|
+
indicator
|
|
51
|
+
} = props;
|
|
46
52
|
const [uid] = (0, _react.useState)({});
|
|
47
53
|
const timeoutRef = (0, _react.useRef)(null);
|
|
48
|
-
const isVertical =
|
|
54
|
+
const isVertical = direction === 'vertical';
|
|
49
55
|
const slideRatio = props.slideSize / 100;
|
|
50
56
|
const offsetRatio = props.trackOffset / 100;
|
|
51
57
|
const {
|
|
52
58
|
validChildren,
|
|
53
|
-
count
|
|
59
|
+
count,
|
|
60
|
+
renderChildren
|
|
54
61
|
} = (0, _react.useMemo)(() => {
|
|
55
62
|
let count = 0;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
let renderChildren = undefined;
|
|
64
|
+
let validChildren = undefined;
|
|
65
|
+
if (typeof children === 'function') {
|
|
66
|
+
renderChildren = children;
|
|
67
|
+
} else {
|
|
68
|
+
validChildren = _react.default.Children.map(children, child => {
|
|
69
|
+
if (!_react.default.isValidElement(child)) return null;
|
|
70
|
+
if (child.type !== _swiperItem.SwiperItem) {
|
|
71
|
+
(0, _devLog.devWarning)('Swiper', 'The children of `Swiper` must be `Swiper.Item` components.');
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
count++;
|
|
75
|
+
return child;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
65
78
|
return {
|
|
79
|
+
renderChildren,
|
|
66
80
|
validChildren,
|
|
67
81
|
count
|
|
68
82
|
};
|
|
69
|
-
}, [
|
|
70
|
-
|
|
83
|
+
}, [children]);
|
|
84
|
+
const mergedTotal = total !== null && total !== void 0 ? total : count;
|
|
85
|
+
if (mergedTotal === 0 || !validChildren && !renderChildren) {
|
|
71
86
|
(0, _devLog.devWarning)('Swiper', '`Swiper` needs at least one child.');
|
|
72
87
|
return null;
|
|
73
88
|
}
|
|
74
89
|
return () => {
|
|
75
90
|
let loop = props.loop;
|
|
76
|
-
if (slideRatio * (
|
|
91
|
+
if (slideRatio * (mergedTotal - 1) < 1) {
|
|
77
92
|
loop = false;
|
|
78
93
|
}
|
|
79
94
|
const trackRef = (0, _react.useRef)(null);
|
|
@@ -87,7 +102,7 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
87
102
|
const [dragging, setDragging, draggingRef] = (0, _useRefState.useRefState)(false);
|
|
88
103
|
function boundIndex(current) {
|
|
89
104
|
let min = 0;
|
|
90
|
-
let max =
|
|
105
|
+
let max = mergedTotal - 1;
|
|
91
106
|
if (props.stuckAtBoundary) {
|
|
92
107
|
min += offsetRatio / slideRatio;
|
|
93
108
|
max -= (1 - slideRatio - offsetRatio) / slideRatio;
|
|
@@ -106,7 +121,7 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
106
121
|
if (draggingRef.current) return;
|
|
107
122
|
if (!loop) return;
|
|
108
123
|
const rawX = position.get();
|
|
109
|
-
const totalWidth = 100 *
|
|
124
|
+
const totalWidth = 100 * mergedTotal;
|
|
110
125
|
const standardPosition = modulus(rawX, totalWidth);
|
|
111
126
|
if (standardPosition === rawX) return;
|
|
112
127
|
api.start({
|
|
@@ -114,7 +129,7 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
114
129
|
immediate: true
|
|
115
130
|
});
|
|
116
131
|
}
|
|
117
|
-
}), [
|
|
132
|
+
}), [mergedTotal]);
|
|
118
133
|
const dragCancelRef = (0, _react.useRef)(null);
|
|
119
134
|
function forceCancelDrag() {
|
|
120
135
|
var _a;
|
|
@@ -161,7 +176,7 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
161
176
|
if (loop) return {};
|
|
162
177
|
const slidePixels = getSlidePixels();
|
|
163
178
|
const lowerBound = boundIndex(0) * slidePixels;
|
|
164
|
-
const upperBound = boundIndex(
|
|
179
|
+
const upperBound = boundIndex(mergedTotal - 1) * slidePixels;
|
|
165
180
|
return isVertical ? {
|
|
166
181
|
top: lowerBound,
|
|
167
182
|
bottom: upperBound
|
|
@@ -180,7 +195,7 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
180
195
|
function swipeTo(index, immediate = false) {
|
|
181
196
|
var _a;
|
|
182
197
|
const roundedIndex = Math.round(index);
|
|
183
|
-
const targetIndex = loop ? modulus(roundedIndex,
|
|
198
|
+
const targetIndex = loop ? modulus(roundedIndex, mergedTotal) : (0, _bound.bound)(roundedIndex, 0, mergedTotal - 1);
|
|
184
199
|
if (targetIndex !== getCurrent()) {
|
|
185
200
|
(_a = props.onIndexChange) === null || _a === void 0 ? void 0 : _a.call(props, targetIndex);
|
|
186
201
|
}
|
|
@@ -202,7 +217,7 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
202
217
|
swipePrev
|
|
203
218
|
}));
|
|
204
219
|
(0, _ahooks.useIsomorphicLayoutEffect)(() => {
|
|
205
|
-
const maxIndex =
|
|
220
|
+
const maxIndex = mergedTotal - 1;
|
|
206
221
|
if (current > maxIndex) {
|
|
207
222
|
swipeTo(maxIndex, true);
|
|
208
223
|
}
|
|
@@ -223,43 +238,67 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
223
238
|
return () => {
|
|
224
239
|
if (timeoutRef.current) window.clearTimeout(timeoutRef.current);
|
|
225
240
|
};
|
|
226
|
-
}, [autoplay, autoplayInterval, dragging,
|
|
241
|
+
}, [autoplay, autoplayInterval, dragging, mergedTotal]);
|
|
242
|
+
// ============================== Render ==============================
|
|
243
|
+
// Render Item
|
|
244
|
+
function renderItem(index, child) {
|
|
245
|
+
let itemStyle = {};
|
|
246
|
+
if (loop) {
|
|
247
|
+
itemStyle = {
|
|
248
|
+
[isVertical ? 'y' : 'x']: position.to(position => {
|
|
249
|
+
let finalPosition = -position + index * 100;
|
|
250
|
+
const totalWidth = mergedTotal * 100;
|
|
251
|
+
const flagWidth = totalWidth / 2;
|
|
252
|
+
finalPosition = modulus(finalPosition + flagWidth, totalWidth) - flagWidth;
|
|
253
|
+
return `${finalPosition}%`;
|
|
254
|
+
}),
|
|
255
|
+
[isVertical ? 'top' : 'left']: `-${index * 100}%`
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
return _react.default.createElement(_web.animated.div, {
|
|
259
|
+
className: (0, _classnames.default)(`${classPrefix}-slide`, {
|
|
260
|
+
[`${classPrefix}-slide-active`]: current === index
|
|
261
|
+
}),
|
|
262
|
+
style: itemStyle,
|
|
263
|
+
key: index
|
|
264
|
+
}, child);
|
|
265
|
+
}
|
|
266
|
+
function renderItems() {
|
|
267
|
+
if (renderChildren && total) {
|
|
268
|
+
const offsetCount = 2;
|
|
269
|
+
const startIndex = Math.max(current - offsetCount, 0);
|
|
270
|
+
const endIndex = Math.min(current + offsetCount, total - 1);
|
|
271
|
+
const items = [];
|
|
272
|
+
for (let index = startIndex; index <= endIndex; index += 1) {
|
|
273
|
+
items.push(renderItem(index, renderChildren(index)));
|
|
274
|
+
}
|
|
275
|
+
return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement("div", {
|
|
276
|
+
className: `${classPrefix}-slide-placeholder`,
|
|
277
|
+
style: {
|
|
278
|
+
width: `${startIndex * 100}%`
|
|
279
|
+
}
|
|
280
|
+
}), items);
|
|
281
|
+
}
|
|
282
|
+
return _react.default.Children.map(validChildren, (child, index) => {
|
|
283
|
+
return renderItem(index, child);
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
// Render Track Inner
|
|
227
287
|
function renderTrackInner() {
|
|
228
288
|
if (loop) {
|
|
229
289
|
return _react.default.createElement("div", {
|
|
230
290
|
className: `${classPrefix}-track-inner`
|
|
231
|
-
},
|
|
232
|
-
return _react.default.createElement(_web.animated.div, {
|
|
233
|
-
className: (0, _classnames.default)(`${classPrefix}-slide`, {
|
|
234
|
-
[`${classPrefix}-slide-active`]: current === index
|
|
235
|
-
}),
|
|
236
|
-
style: {
|
|
237
|
-
[isVertical ? 'y' : 'x']: position.to(position => {
|
|
238
|
-
let finalPosition = -position + index * 100;
|
|
239
|
-
const totalWidth = count * 100;
|
|
240
|
-
const flagWidth = totalWidth / 2;
|
|
241
|
-
finalPosition = modulus(finalPosition + flagWidth, totalWidth) - flagWidth;
|
|
242
|
-
return `${finalPosition}%`;
|
|
243
|
-
}),
|
|
244
|
-
[isVertical ? 'top' : 'left']: `-${index * 100}%`
|
|
245
|
-
}
|
|
246
|
-
}, child);
|
|
247
|
-
}));
|
|
291
|
+
}, renderItems());
|
|
248
292
|
} else {
|
|
249
293
|
return _react.default.createElement(_web.animated.div, {
|
|
250
294
|
className: `${classPrefix}-track-inner`,
|
|
251
295
|
style: {
|
|
252
296
|
[isVertical ? 'y' : 'x']: position.to(position => `${-position}%`)
|
|
253
297
|
}
|
|
254
|
-
},
|
|
255
|
-
return _react.default.createElement("div", {
|
|
256
|
-
className: (0, _classnames.default)(`${classPrefix}-slide`, {
|
|
257
|
-
[`${classPrefix}-slide-active`]: current === index
|
|
258
|
-
})
|
|
259
|
-
}, child);
|
|
260
|
-
}));
|
|
298
|
+
}, renderItems());
|
|
261
299
|
}
|
|
262
300
|
}
|
|
301
|
+
// Render
|
|
263
302
|
const style = {
|
|
264
303
|
'--slide-size': `${props.slideSize}%`,
|
|
265
304
|
'--track-offset': `${props.trackOffset}%`
|
|
@@ -273,8 +312,20 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
273
312
|
};
|
|
274
313
|
}
|
|
275
314
|
const mergedProps = (0, _withFuncProps.mergeFuncProps)(dragProps, stopPropagationProps);
|
|
315
|
+
let indicatorNode = null;
|
|
316
|
+
if (typeof indicator === 'function') {
|
|
317
|
+
indicatorNode = indicator(mergedTotal, current);
|
|
318
|
+
} else if (indicator !== false) {
|
|
319
|
+
indicatorNode = _react.default.createElement("div", {
|
|
320
|
+
className: `${classPrefix}-indicator`
|
|
321
|
+
}, _react.default.createElement(_pageIndicator.default, Object.assign({}, props.indicatorProps, {
|
|
322
|
+
total: mergedTotal,
|
|
323
|
+
current: current,
|
|
324
|
+
direction: direction
|
|
325
|
+
})));
|
|
326
|
+
}
|
|
276
327
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
277
|
-
className: (0, _classnames.default)(classPrefix, `${classPrefix}-${
|
|
328
|
+
className: (0, _classnames.default)(classPrefix, `${classPrefix}-${direction}`),
|
|
278
329
|
style: style
|
|
279
330
|
}, _react.default.createElement("div", Object.assign({
|
|
280
331
|
ref: trackRef,
|
|
@@ -287,13 +338,7 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
287
338
|
}
|
|
288
339
|
forceCancelDrag();
|
|
289
340
|
}
|
|
290
|
-
}, mergedProps), renderTrackInner()),
|
|
291
|
-
className: `${classPrefix}-indicator`
|
|
292
|
-
}, _react.default.createElement(_pageIndicator.default, Object.assign({}, props.indicatorProps, {
|
|
293
|
-
total: count,
|
|
294
|
-
current: current,
|
|
295
|
-
direction: props.direction
|
|
296
|
-
}))) : props.indicator(count, current)));
|
|
341
|
+
}, mergedProps), renderTrackInner()), indicatorNode));
|
|
297
342
|
};
|
|
298
343
|
}));
|
|
299
344
|
exports.Swiper = Swiper;
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
color: #00b578;
|
|
49
49
|
}
|
|
50
50
|
.adm-button-danger {
|
|
51
|
-
background-color: #
|
|
52
|
-
border-color: #
|
|
51
|
+
background-color: #ff3141;
|
|
52
|
+
border-color: #ff3141;
|
|
53
53
|
}
|
|
54
54
|
.adm-button-danger.adm-button-fill-outline,
|
|
55
55
|
.adm-button-danger.adm-button-fill-none {
|
|
56
|
-
color: #
|
|
56
|
+
color: #ff3141;
|
|
57
57
|
}
|
|
58
58
|
.adm-button-warning {
|
|
59
59
|
background-color: #ff8f1f;
|
package/cjs/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export { default as Checkbox } from './components/checkbox';
|
|
|
36
36
|
export type { CheckboxProps, CheckboxGroupProps, CheckboxRef, } from './components/checkbox';
|
|
37
37
|
export { default as Collapse } from './components/collapse';
|
|
38
38
|
export type { CollapseProps, CollapsePanelProps } from './components/collapse';
|
|
39
|
-
export { default as ConfigProvider } from './components/config-provider';
|
|
39
|
+
export { default as ConfigProvider, useConfig } from './components/config-provider';
|
|
40
40
|
export type { ConfigProviderProps } from './components/config-provider';
|
|
41
41
|
export { default as DatePicker } from './components/date-picker';
|
|
42
42
|
export type { DatePickerProps, DatePickerRef } from './components/date-picker';
|
package/cjs/index.js
CHANGED
|
@@ -519,6 +519,12 @@ Object.defineProperty(exports, "setDefaultConfig", {
|
|
|
519
519
|
return _configProvider.setDefaultConfig;
|
|
520
520
|
}
|
|
521
521
|
});
|
|
522
|
+
Object.defineProperty(exports, "useConfig", {
|
|
523
|
+
enumerable: true,
|
|
524
|
+
get: function () {
|
|
525
|
+
return _configProvider.useConfig;
|
|
526
|
+
}
|
|
527
|
+
});
|
|
522
528
|
require("./global");
|
|
523
529
|
var _configProvider = _interopRequireWildcard(require("./components/config-provider"));
|
|
524
530
|
var _actionSheet = _interopRequireDefault(require("./components/action-sheet"));
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
export declare const huHU: {
|
|
2
|
+
locale: string;
|
|
3
|
+
common: {
|
|
4
|
+
confirm: string;
|
|
5
|
+
cancel: string;
|
|
6
|
+
loading: string;
|
|
7
|
+
close: string;
|
|
8
|
+
};
|
|
9
|
+
Calendar: {
|
|
10
|
+
title: string;
|
|
11
|
+
confirm: string;
|
|
12
|
+
start: string;
|
|
13
|
+
end: string;
|
|
14
|
+
today: string;
|
|
15
|
+
markItems: string[];
|
|
16
|
+
yearAndMonth: string;
|
|
17
|
+
};
|
|
18
|
+
Cascader: {
|
|
19
|
+
placeholder: string;
|
|
20
|
+
};
|
|
21
|
+
Dialog: {
|
|
22
|
+
ok: string;
|
|
23
|
+
};
|
|
24
|
+
DatePicker: {
|
|
25
|
+
tillNow: string;
|
|
26
|
+
};
|
|
27
|
+
ErrorBlock: {
|
|
28
|
+
default: {
|
|
29
|
+
title: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
busy: {
|
|
33
|
+
title: string;
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
disconnected: {
|
|
37
|
+
title: string;
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
empty: {
|
|
41
|
+
title: string;
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
Form: {
|
|
46
|
+
required: string;
|
|
47
|
+
optional: string;
|
|
48
|
+
defaultValidateMessages: {
|
|
49
|
+
default: string;
|
|
50
|
+
required: string;
|
|
51
|
+
enum: string;
|
|
52
|
+
whitespace: string;
|
|
53
|
+
date: {
|
|
54
|
+
format: string;
|
|
55
|
+
parse: string;
|
|
56
|
+
invalid: string;
|
|
57
|
+
};
|
|
58
|
+
types: {
|
|
59
|
+
string: string;
|
|
60
|
+
method: string;
|
|
61
|
+
array: string;
|
|
62
|
+
object: string;
|
|
63
|
+
number: string;
|
|
64
|
+
date: string;
|
|
65
|
+
boolean: string;
|
|
66
|
+
integer: string;
|
|
67
|
+
float: string;
|
|
68
|
+
regexp: string;
|
|
69
|
+
email: string;
|
|
70
|
+
url: string;
|
|
71
|
+
hex: string;
|
|
72
|
+
};
|
|
73
|
+
string: {
|
|
74
|
+
len: string;
|
|
75
|
+
min: string;
|
|
76
|
+
max: string;
|
|
77
|
+
range: string;
|
|
78
|
+
};
|
|
79
|
+
number: {
|
|
80
|
+
len: string;
|
|
81
|
+
min: string;
|
|
82
|
+
max: string;
|
|
83
|
+
range: string;
|
|
84
|
+
};
|
|
85
|
+
array: {
|
|
86
|
+
len: string;
|
|
87
|
+
min: string;
|
|
88
|
+
max: string;
|
|
89
|
+
range: string;
|
|
90
|
+
};
|
|
91
|
+
pattern: {
|
|
92
|
+
mismatch: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
ImageUploader: {
|
|
97
|
+
uploading: string;
|
|
98
|
+
upload: string;
|
|
99
|
+
};
|
|
100
|
+
InfiniteScroll: {
|
|
101
|
+
noMore: string;
|
|
102
|
+
failedToLoad: string;
|
|
103
|
+
retry: string;
|
|
104
|
+
};
|
|
105
|
+
Input: {
|
|
106
|
+
clear: string;
|
|
107
|
+
};
|
|
108
|
+
Mask: {
|
|
109
|
+
name: string;
|
|
110
|
+
};
|
|
111
|
+
Modal: {
|
|
112
|
+
ok: string;
|
|
113
|
+
};
|
|
114
|
+
PasscodeInput: {
|
|
115
|
+
name: string;
|
|
116
|
+
};
|
|
117
|
+
PullToRefresh: {
|
|
118
|
+
pulling: string;
|
|
119
|
+
canRelease: string;
|
|
120
|
+
complete: string;
|
|
121
|
+
};
|
|
122
|
+
SearchBar: {
|
|
123
|
+
name: string;
|
|
124
|
+
};
|
|
125
|
+
Slider: {
|
|
126
|
+
name: string;
|
|
127
|
+
};
|
|
128
|
+
Stepper: {
|
|
129
|
+
decrease: string;
|
|
130
|
+
increase: string;
|
|
131
|
+
};
|
|
132
|
+
Switch: {
|
|
133
|
+
name: string;
|
|
134
|
+
};
|
|
135
|
+
Selector: {
|
|
136
|
+
name: string;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
export default huHU;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.huHU = exports.default = void 0;
|
|
7
|
+
var _mergeLocale = require("../utils/merge-locale");
|
|
8
|
+
var _base = require("./base");
|
|
9
|
+
const typeTemplate = '${label} is not a valid ${type}';
|
|
10
|
+
const huHU = (0, _mergeLocale.mergeLocale)(_base.base, {
|
|
11
|
+
locale: 'hu',
|
|
12
|
+
common: {
|
|
13
|
+
confirm: 'Alkalmazás',
|
|
14
|
+
cancel: 'Visszavonás',
|
|
15
|
+
loading: 'Betöltés',
|
|
16
|
+
close: 'Bezárás'
|
|
17
|
+
},
|
|
18
|
+
Calendar: {
|
|
19
|
+
title: 'Dátum kiválasztása',
|
|
20
|
+
confirm: 'Alkalmazás',
|
|
21
|
+
today: 'ma',
|
|
22
|
+
markItems: ['Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo', 'Vas'],
|
|
23
|
+
yearAndMonth: '${year}-${month}'
|
|
24
|
+
},
|
|
25
|
+
Cascader: {
|
|
26
|
+
placeholder: 'Kiválasztás'
|
|
27
|
+
},
|
|
28
|
+
Dialog: {
|
|
29
|
+
ok: 'OK'
|
|
30
|
+
},
|
|
31
|
+
DatePicker: {
|
|
32
|
+
tillNow: 'Till Now'
|
|
33
|
+
},
|
|
34
|
+
ErrorBlock: {
|
|
35
|
+
default: {
|
|
36
|
+
title: 'Oopsz, valami hiba történt',
|
|
37
|
+
description: 'Kérjük, várjon egy percet, és próbálja újra'
|
|
38
|
+
},
|
|
39
|
+
busy: {
|
|
40
|
+
title: 'Oopsz, nem sikerült betölteni',
|
|
41
|
+
description: 'Próbálja meg frissíteni az oldalt'
|
|
42
|
+
},
|
|
43
|
+
disconnected: {
|
|
44
|
+
title: 'A hálózat elfoglalt',
|
|
45
|
+
description: 'Próbálja meg frissíteni az oldalt'
|
|
46
|
+
},
|
|
47
|
+
empty: {
|
|
48
|
+
title: "Hmm, nem találjuk amit keresel...",
|
|
49
|
+
description: 'Szeretnél új keresést indítani?'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
Form: {
|
|
53
|
+
required: 'Kötelező',
|
|
54
|
+
optional: 'Opcionális',
|
|
55
|
+
defaultValidateMessages: {
|
|
56
|
+
default: 'Mező validációs hiba ${label}',
|
|
57
|
+
required: 'Mező kitöltése kötelező ${label}',
|
|
58
|
+
enum: '${label} tatroznia kell [${enum}]',
|
|
59
|
+
whitespace: '${label} nem lehet üres karakter',
|
|
60
|
+
date: {
|
|
61
|
+
format: '${label} dátum formátuma érvénytelen',
|
|
62
|
+
parse: '${label} nem alakítható dátummá',
|
|
63
|
+
invalid: '${label} nem érvényes dátum'
|
|
64
|
+
},
|
|
65
|
+
types: {
|
|
66
|
+
string: typeTemplate,
|
|
67
|
+
method: typeTemplate,
|
|
68
|
+
array: typeTemplate,
|
|
69
|
+
object: typeTemplate,
|
|
70
|
+
number: typeTemplate,
|
|
71
|
+
date: typeTemplate,
|
|
72
|
+
boolean: typeTemplate,
|
|
73
|
+
integer: typeTemplate,
|
|
74
|
+
float: typeTemplate,
|
|
75
|
+
regexp: typeTemplate,
|
|
76
|
+
email: typeTemplate,
|
|
77
|
+
url: typeTemplate,
|
|
78
|
+
hex: typeTemplate
|
|
79
|
+
},
|
|
80
|
+
string: {
|
|
81
|
+
len: '${label} muszáj hogy ${len} karakter hosszú legyen',
|
|
82
|
+
min: '${label} muszáj hogy legalább ${min} karakter hosszú legyen',
|
|
83
|
+
max: '${label} muszáj hogy maximum ${max} karakter hosszú legyen',
|
|
84
|
+
range: '${label} muszáj hogy ${min}-${max} karakter hosszú legyen'
|
|
85
|
+
},
|
|
86
|
+
number: {
|
|
87
|
+
len: '${label} muszáj hogy ${len} legyen',
|
|
88
|
+
min: '${label} legalább ${min} legyen',
|
|
89
|
+
max: '${label} maximum ${max} lehet',
|
|
90
|
+
range: '${label} muszáj hogy ${min}-${max} között legyen'
|
|
91
|
+
},
|
|
92
|
+
array: {
|
|
93
|
+
len: 'Muszáj ${len} legyen ${label}',
|
|
94
|
+
min: 'Legalább ${min} ${label}',
|
|
95
|
+
max: 'Maximum ${max} ${label}',
|
|
96
|
+
range: '${label} értéke ${min}-${max} között kell legyen'
|
|
97
|
+
},
|
|
98
|
+
pattern: {
|
|
99
|
+
mismatch: '${label} nem hasonlít ${pattern}'
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
ImageUploader: {
|
|
104
|
+
uploading: 'Feltöltés...',
|
|
105
|
+
upload: 'Feltöltés'
|
|
106
|
+
},
|
|
107
|
+
InfiniteScroll: {
|
|
108
|
+
noMore: 'Nincs több',
|
|
109
|
+
failedToLoad: 'Nem sikerült betölteni',
|
|
110
|
+
retry: 'Újra'
|
|
111
|
+
},
|
|
112
|
+
Input: {
|
|
113
|
+
clear: 'Törlés'
|
|
114
|
+
},
|
|
115
|
+
Mask: {
|
|
116
|
+
name: 'Maszk'
|
|
117
|
+
},
|
|
118
|
+
Modal: {
|
|
119
|
+
ok: 'OK'
|
|
120
|
+
},
|
|
121
|
+
PasscodeInput: {
|
|
122
|
+
name: 'PIN-kód'
|
|
123
|
+
},
|
|
124
|
+
PullToRefresh: {
|
|
125
|
+
pulling: 'Görgessen le a frissítéshez',
|
|
126
|
+
canRelease: 'Engedje el az azonnalli frissítéshez',
|
|
127
|
+
complete: 'Sikeresen frissítve'
|
|
128
|
+
},
|
|
129
|
+
SearchBar: {
|
|
130
|
+
name: 'Keresés'
|
|
131
|
+
},
|
|
132
|
+
Slider: {
|
|
133
|
+
name: 'Csúszka'
|
|
134
|
+
},
|
|
135
|
+
Stepper: {
|
|
136
|
+
decrease: 'csökkentés',
|
|
137
|
+
increase: 'növelés'
|
|
138
|
+
},
|
|
139
|
+
Switch: {
|
|
140
|
+
name: 'Kapcsoló'
|
|
141
|
+
},
|
|
142
|
+
Selector: {
|
|
143
|
+
name: 'Kiválasztás'
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
exports.huHU = huHU;
|
|
147
|
+
var _default = huHU;
|
|
148
|
+
exports.default = _default;
|