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.
Files changed (165) hide show
  1. package/2x/bundle/antd-mobile.cjs.development.js +1778 -2992
  2. package/2x/bundle/antd-mobile.cjs.js +7 -15
  3. package/2x/bundle/antd-mobile.es.development.js +778 -1992
  4. package/2x/bundle/antd-mobile.es.js +9185 -9967
  5. package/2x/bundle/antd-mobile.umd.development.js +1778 -2992
  6. package/2x/bundle/antd-mobile.umd.js +7 -15
  7. package/2x/bundle/css-vars-patch.css +3 -3
  8. package/2x/bundle/style.css +8 -11
  9. package/2x/cjs/components/button/button.d.ts +1 -1
  10. package/2x/cjs/components/button/button.patch.css +3 -3
  11. package/2x/cjs/components/cascader-view/use-cascader-value-extend.js +10 -5
  12. package/2x/cjs/components/checkbox/native-input.js +1 -1
  13. package/2x/cjs/components/config-provider/config-provider.d.ts +3 -2
  14. package/2x/cjs/components/error-block/create-error-block.d.ts +1 -0
  15. package/2x/cjs/components/error-block/create-error-block.js +1 -0
  16. package/2x/cjs/components/error-block/index.d.ts +0 -1
  17. package/2x/cjs/components/error-block/index.js +2 -3
  18. package/2x/cjs/components/form/form-item.js +1 -0
  19. package/2x/cjs/components/form/form.js +2 -2
  20. package/2x/cjs/components/infinite-scroll/infinite-scroll.js +8 -4
  21. package/2x/cjs/components/picker-view/wheel.js +7 -4
  22. package/2x/cjs/components/popover/index.d.ts +1 -1
  23. package/2x/cjs/components/popover/popover.d.ts +1 -1
  24. package/2x/cjs/components/radio/radio.css +1 -1
  25. package/2x/cjs/components/radio/radio.d.ts +1 -1
  26. package/2x/cjs/components/radio/radio.js +5 -5
  27. package/2x/cjs/components/result-page/result-page.css +5 -5
  28. package/2x/cjs/components/stepper/stepper.js +2 -2
  29. package/2x/cjs/components/swipe-action/swipe-action.d.ts +1 -1
  30. package/2x/cjs/components/swiper/index.d.ts +3 -2
  31. package/2x/cjs/components/swiper/swiper.css +2 -1
  32. package/2x/cjs/components/swiper/swiper.d.ts +18 -4
  33. package/2x/cjs/components/swiper/swiper.js +98 -53
  34. package/2x/cjs/components/text-area/text-area.css +0 -4
  35. package/2x/cjs/global/css-vars-patch.css +3 -3
  36. package/2x/cjs/index.d.ts +1 -1
  37. package/2x/cjs/index.js +6 -0
  38. package/2x/cjs/locales/hu-HU.d.ts +139 -0
  39. package/2x/cjs/locales/hu-HU.js +148 -0
  40. package/2x/cjs/locales/th-TH.d.ts +139 -0
  41. package/2x/cjs/locales/th-TH.js +149 -0
  42. package/2x/cjs/utils/with-default-props.js +8 -9
  43. package/2x/cjs/utils/with-stop-propagation.d.ts +1 -1
  44. package/2x/cjs/utils/with-stop-propagation.js +2 -1
  45. package/2x/es/components/button/button.d.ts +1 -1
  46. package/2x/es/components/button/button.patch.css +3 -3
  47. package/2x/es/components/cascader-view/use-cascader-value-extend.js +8 -3
  48. package/2x/es/components/checkbox/native-input.js +1 -1
  49. package/2x/es/components/config-provider/config-provider.d.ts +3 -2
  50. package/2x/es/components/error-block/create-error-block.d.ts +1 -0
  51. package/2x/es/components/error-block/create-error-block.js +1 -0
  52. package/2x/es/components/error-block/index.d.ts +0 -1
  53. package/2x/es/components/error-block/index.js +0 -1
  54. package/2x/es/components/form/form-item.js +1 -0
  55. package/2x/es/components/form/form.js +2 -2
  56. package/2x/es/components/infinite-scroll/infinite-scroll.js +8 -4
  57. package/2x/es/components/picker-view/wheel.js +6 -3
  58. package/2x/es/components/popover/index.d.ts +1 -1
  59. package/2x/es/components/popover/popover.d.ts +1 -1
  60. package/2x/es/components/radio/radio.css +1 -1
  61. package/2x/es/components/radio/radio.d.ts +1 -1
  62. package/2x/es/components/radio/radio.js +4 -4
  63. package/2x/es/components/result-page/result-page.css +5 -5
  64. package/2x/es/components/stepper/stepper.js +1 -1
  65. package/2x/es/components/swipe-action/swipe-action.d.ts +1 -1
  66. package/2x/es/components/swiper/index.d.ts +3 -2
  67. package/2x/es/components/swiper/swiper.css +2 -1
  68. package/2x/es/components/swiper/swiper.d.ts +18 -4
  69. package/2x/es/components/swiper/swiper.js +98 -53
  70. package/2x/es/components/text-area/text-area.css +0 -4
  71. package/2x/es/global/css-vars-patch.css +3 -3
  72. package/2x/es/index.d.ts +1 -1
  73. package/2x/es/index.js +1 -1
  74. package/2x/es/locales/hu-HU.d.ts +139 -0
  75. package/2x/es/locales/hu-HU.js +140 -0
  76. package/2x/es/locales/th-TH.d.ts +139 -0
  77. package/2x/es/locales/th-TH.js +142 -0
  78. package/2x/es/utils/with-default-props.js +8 -8
  79. package/2x/es/utils/with-stop-propagation.d.ts +1 -1
  80. package/2x/es/utils/with-stop-propagation.js +2 -1
  81. package/2x/package.json +12 -4
  82. package/bundle/antd-mobile.cjs.development.js +1778 -2992
  83. package/bundle/antd-mobile.cjs.js +7 -15
  84. package/bundle/antd-mobile.compatible.umd.js +1 -1
  85. package/bundle/antd-mobile.es.development.js +778 -1992
  86. package/bundle/antd-mobile.es.js +9185 -9967
  87. package/bundle/antd-mobile.umd.development.js +1778 -2992
  88. package/bundle/antd-mobile.umd.js +7 -15
  89. package/bundle/css-vars-patch.css +3 -3
  90. package/bundle/style.css +1 -1
  91. package/cjs/components/button/button.d.ts +1 -1
  92. package/cjs/components/button/button.patch.css +3 -3
  93. package/cjs/components/cascader-view/use-cascader-value-extend.js +10 -5
  94. package/cjs/components/checkbox/native-input.js +1 -1
  95. package/cjs/components/config-provider/config-provider.d.ts +3 -2
  96. package/cjs/components/error-block/create-error-block.d.ts +1 -0
  97. package/cjs/components/error-block/create-error-block.js +1 -0
  98. package/cjs/components/error-block/index.d.ts +0 -1
  99. package/cjs/components/error-block/index.js +2 -3
  100. package/cjs/components/form/form-item.js +1 -0
  101. package/cjs/components/form/form.js +2 -2
  102. package/cjs/components/infinite-scroll/infinite-scroll.js +8 -4
  103. package/cjs/components/picker-view/wheel.js +7 -4
  104. package/cjs/components/popover/index.d.ts +1 -1
  105. package/cjs/components/popover/popover.d.ts +1 -1
  106. package/cjs/components/radio/radio.css +1 -1
  107. package/cjs/components/radio/radio.d.ts +1 -1
  108. package/cjs/components/radio/radio.js +5 -5
  109. package/cjs/components/result-page/result-page.css +5 -5
  110. package/cjs/components/stepper/stepper.js +2 -2
  111. package/cjs/components/swipe-action/swipe-action.d.ts +1 -1
  112. package/cjs/components/swiper/index.d.ts +3 -2
  113. package/cjs/components/swiper/swiper.css +2 -1
  114. package/cjs/components/swiper/swiper.d.ts +18 -4
  115. package/cjs/components/swiper/swiper.js +98 -53
  116. package/cjs/components/text-area/text-area.css +0 -3
  117. package/cjs/global/css-vars-patch.css +3 -3
  118. package/cjs/index.d.ts +1 -1
  119. package/cjs/index.js +6 -0
  120. package/cjs/locales/hu-HU.d.ts +139 -0
  121. package/cjs/locales/hu-HU.js +148 -0
  122. package/cjs/locales/th-TH.d.ts +139 -0
  123. package/cjs/locales/th-TH.js +149 -0
  124. package/cjs/utils/with-default-props.js +8 -9
  125. package/cjs/utils/with-stop-propagation.d.ts +1 -1
  126. package/cjs/utils/with-stop-propagation.js +2 -1
  127. package/es/components/button/button.d.ts +1 -1
  128. package/es/components/button/button.patch.css +3 -3
  129. package/es/components/cascader-view/use-cascader-value-extend.js +8 -3
  130. package/es/components/checkbox/native-input.js +1 -1
  131. package/es/components/config-provider/config-provider.d.ts +3 -2
  132. package/es/components/error-block/create-error-block.d.ts +1 -0
  133. package/es/components/error-block/create-error-block.js +1 -0
  134. package/es/components/error-block/index.d.ts +0 -1
  135. package/es/components/error-block/index.js +0 -1
  136. package/es/components/form/form-item.js +1 -0
  137. package/es/components/form/form.js +2 -2
  138. package/es/components/infinite-scroll/infinite-scroll.js +8 -4
  139. package/es/components/picker-view/wheel.js +6 -3
  140. package/es/components/popover/index.d.ts +1 -1
  141. package/es/components/popover/popover.d.ts +1 -1
  142. package/es/components/radio/radio.css +1 -1
  143. package/es/components/radio/radio.d.ts +1 -1
  144. package/es/components/radio/radio.js +4 -4
  145. package/es/components/result-page/result-page.css +5 -5
  146. package/es/components/stepper/stepper.js +1 -1
  147. package/es/components/swipe-action/swipe-action.d.ts +1 -1
  148. package/es/components/swiper/index.d.ts +3 -2
  149. package/es/components/swiper/swiper.css +2 -1
  150. package/es/components/swiper/swiper.d.ts +18 -4
  151. package/es/components/swiper/swiper.js +98 -53
  152. package/es/components/text-area/text-area.css +0 -3
  153. package/es/global/css-vars-patch.css +3 -3
  154. package/es/index.d.ts +1 -1
  155. package/es/index.js +1 -1
  156. package/es/locales/hu-HU.d.ts +139 -0
  157. package/es/locales/hu-HU.js +140 -0
  158. package/es/locales/th-TH.d.ts +139 -0
  159. package/es/locales/th-TH.js +142 -0
  160. package/es/utils/with-default-props.js +8 -8
  161. package/es/utils/with-stop-propagation.d.ts +1 -1
  162. package/es/utils/with-stop-propagation.js +2 -1
  163. package/package.json +12 -4
  164. package/umd/antd-mobile.js +1 -1
  165. package/umd/antd-mobile.js.LICENSE.txt +0 -9
@@ -35,7 +35,8 @@
35
35
  flex-wrap: nowrap;
36
36
  }
37
37
 
38
- .adm-swiper-slide {
38
+ .adm-swiper-slide,
39
+ .adm-swiper-slide-placeholder {
39
40
  width: 100%;
40
41
  height: 100%;
41
42
  display: block;
@@ -22,13 +22,20 @@ export declare type SwiperProps = {
22
22
  direction?: 'horizontal' | 'vertical';
23
23
  onIndexChange?: (index: number) => void;
24
24
  indicatorProps?: Pick<PageIndicatorProps, 'color' | 'style' | 'className'>;
25
- indicator?: (total: number, current: number) => ReactNode;
25
+ indicator?: false | ((total: number, current: number) => ReactNode);
26
26
  slideSize?: number;
27
27
  trackOffset?: number;
28
28
  stuckAtBoundary?: boolean;
29
29
  rubberband?: boolean;
30
30
  stopPropagation?: PropagationEvent[];
31
- children?: ReactElement | ReactElement[];
31
+ /**
32
+ * Virtual scroll usage. Should work with renderProps `children`
33
+ */
34
+ total?: number;
35
+ /**
36
+ * renderProps is only work when `total` used
37
+ */
38
+ children?: ReactElement | ReactElement[] | ((index: number) => ReactElement);
32
39
  } & NativeProps<'--height' | '--width' | '--border-radius' | '--track-padding'>;
33
40
  export declare const Swiper: React.ForwardRefExoticComponent<{
34
41
  defaultIndex?: number | undefined;
@@ -39,13 +46,20 @@ export declare const Swiper: React.ForwardRefExoticComponent<{
39
46
  direction?: "vertical" | "horizontal" | undefined;
40
47
  onIndexChange?: ((index: number) => void) | undefined;
41
48
  indicatorProps?: Pick<PageIndicatorProps, "style" | "className" | "color"> | undefined;
42
- indicator?: ((total: number, current: number) => ReactNode) | undefined;
49
+ indicator?: false | ((total: number, current: number) => ReactNode) | undefined;
43
50
  slideSize?: number | undefined;
44
51
  trackOffset?: number | undefined;
45
52
  stuckAtBoundary?: boolean | undefined;
46
53
  rubberband?: boolean | undefined;
47
54
  stopPropagation?: ("mousedown" | "mousemove" | "mouseup")[] | undefined;
48
- children?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
55
+ /**
56
+ * Virtual scroll usage. Should work with renderProps `children`
57
+ */
58
+ total?: number | undefined;
59
+ /**
60
+ * renderProps is only work when `total` used
61
+ */
62
+ children?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | ((index: number) => ReactElement) | undefined;
49
63
  } & {
50
64
  className?: string | undefined;
51
65
  style?: (React.CSSProperties & Partial<Record<"--width" | "--height" | "--border-radius" | "--track-padding", string>>) | undefined;
@@ -34,37 +34,52 @@ const defaultProps = {
34
34
  let currentUid;
35
35
  export const Swiper = forwardRef(staged((p, ref) => {
36
36
  const props = mergeProps(defaultProps, p);
37
+ const {
38
+ direction,
39
+ total,
40
+ children,
41
+ indicator
42
+ } = props;
37
43
  const [uid] = useState({});
38
44
  const timeoutRef = useRef(null);
39
- const isVertical = props.direction === 'vertical';
45
+ const isVertical = direction === 'vertical';
40
46
  const slideRatio = props.slideSize / 100;
41
47
  const offsetRatio = props.trackOffset / 100;
42
48
  const {
43
49
  validChildren,
44
- count
50
+ count,
51
+ renderChildren
45
52
  } = useMemo(() => {
46
53
  let count = 0;
47
- const validChildren = React.Children.map(props.children, child => {
48
- if (!React.isValidElement(child)) return null;
49
- if (child.type !== SwiperItem) {
50
- devWarning('Swiper', 'The children of `Swiper` must be `Swiper.Item` components.');
51
- return null;
52
- }
53
- count++;
54
- return child;
55
- });
54
+ let renderChildren = undefined;
55
+ let validChildren = undefined;
56
+ if (typeof children === 'function') {
57
+ renderChildren = children;
58
+ } else {
59
+ validChildren = React.Children.map(children, child => {
60
+ if (!React.isValidElement(child)) return null;
61
+ if (child.type !== SwiperItem) {
62
+ devWarning('Swiper', 'The children of `Swiper` must be `Swiper.Item` components.');
63
+ return null;
64
+ }
65
+ count++;
66
+ return child;
67
+ });
68
+ }
56
69
  return {
70
+ renderChildren,
57
71
  validChildren,
58
72
  count
59
73
  };
60
- }, [props.children]);
61
- if (count === 0 || !validChildren) {
74
+ }, [children]);
75
+ const mergedTotal = total !== null && total !== void 0 ? total : count;
76
+ if (mergedTotal === 0 || !validChildren && !renderChildren) {
62
77
  devWarning('Swiper', '`Swiper` needs at least one child.');
63
78
  return null;
64
79
  }
65
80
  return () => {
66
81
  let loop = props.loop;
67
- if (slideRatio * (count - 1) < 1) {
82
+ if (slideRatio * (mergedTotal - 1) < 1) {
68
83
  loop = false;
69
84
  }
70
85
  const trackRef = useRef(null);
@@ -78,7 +93,7 @@ export const Swiper = forwardRef(staged((p, ref) => {
78
93
  const [dragging, setDragging, draggingRef] = useRefState(false);
79
94
  function boundIndex(current) {
80
95
  let min = 0;
81
- let max = count - 1;
96
+ let max = mergedTotal - 1;
82
97
  if (props.stuckAtBoundary) {
83
98
  min += offsetRatio / slideRatio;
84
99
  max -= (1 - slideRatio - offsetRatio) / slideRatio;
@@ -97,7 +112,7 @@ export const Swiper = forwardRef(staged((p, ref) => {
97
112
  if (draggingRef.current) return;
98
113
  if (!loop) return;
99
114
  const rawX = position.get();
100
- const totalWidth = 100 * count;
115
+ const totalWidth = 100 * mergedTotal;
101
116
  const standardPosition = modulus(rawX, totalWidth);
102
117
  if (standardPosition === rawX) return;
103
118
  api.start({
@@ -105,7 +120,7 @@ export const Swiper = forwardRef(staged((p, ref) => {
105
120
  immediate: true
106
121
  });
107
122
  }
108
- }), [count]);
123
+ }), [mergedTotal]);
109
124
  const dragCancelRef = useRef(null);
110
125
  function forceCancelDrag() {
111
126
  var _a;
@@ -152,7 +167,7 @@ export const Swiper = forwardRef(staged((p, ref) => {
152
167
  if (loop) return {};
153
168
  const slidePixels = getSlidePixels();
154
169
  const lowerBound = boundIndex(0) * slidePixels;
155
- const upperBound = boundIndex(count - 1) * slidePixels;
170
+ const upperBound = boundIndex(mergedTotal - 1) * slidePixels;
156
171
  return isVertical ? {
157
172
  top: lowerBound,
158
173
  bottom: upperBound
@@ -171,7 +186,7 @@ export const Swiper = forwardRef(staged((p, ref) => {
171
186
  function swipeTo(index, immediate = false) {
172
187
  var _a;
173
188
  const roundedIndex = Math.round(index);
174
- const targetIndex = loop ? modulus(roundedIndex, count) : bound(roundedIndex, 0, count - 1);
189
+ const targetIndex = loop ? modulus(roundedIndex, mergedTotal) : bound(roundedIndex, 0, mergedTotal - 1);
175
190
  if (targetIndex !== getCurrent()) {
176
191
  (_a = props.onIndexChange) === null || _a === void 0 ? void 0 : _a.call(props, targetIndex);
177
192
  }
@@ -193,7 +208,7 @@ export const Swiper = forwardRef(staged((p, ref) => {
193
208
  swipePrev
194
209
  }));
195
210
  useIsomorphicLayoutEffect(() => {
196
- const maxIndex = validChildren.length - 1;
211
+ const maxIndex = mergedTotal - 1;
197
212
  if (current > maxIndex) {
198
213
  swipeTo(maxIndex, true);
199
214
  }
@@ -214,43 +229,67 @@ export const Swiper = forwardRef(staged((p, ref) => {
214
229
  return () => {
215
230
  if (timeoutRef.current) window.clearTimeout(timeoutRef.current);
216
231
  };
217
- }, [autoplay, autoplayInterval, dragging, count]);
232
+ }, [autoplay, autoplayInterval, dragging, mergedTotal]);
233
+ // ============================== Render ==============================
234
+ // Render Item
235
+ function renderItem(index, child) {
236
+ let itemStyle = {};
237
+ if (loop) {
238
+ itemStyle = {
239
+ [isVertical ? 'y' : 'x']: position.to(position => {
240
+ let finalPosition = -position + index * 100;
241
+ const totalWidth = mergedTotal * 100;
242
+ const flagWidth = totalWidth / 2;
243
+ finalPosition = modulus(finalPosition + flagWidth, totalWidth) - flagWidth;
244
+ return `${finalPosition}%`;
245
+ }),
246
+ [isVertical ? 'top' : 'left']: `-${index * 100}%`
247
+ };
248
+ }
249
+ return React.createElement(animated.div, {
250
+ className: classNames(`${classPrefix}-slide`, {
251
+ [`${classPrefix}-slide-active`]: current === index
252
+ }),
253
+ style: itemStyle,
254
+ key: index
255
+ }, child);
256
+ }
257
+ function renderItems() {
258
+ if (renderChildren && total) {
259
+ const offsetCount = 2;
260
+ const startIndex = Math.max(current - offsetCount, 0);
261
+ const endIndex = Math.min(current + offsetCount, total - 1);
262
+ const items = [];
263
+ for (let index = startIndex; index <= endIndex; index += 1) {
264
+ items.push(renderItem(index, renderChildren(index)));
265
+ }
266
+ return React.createElement(React.Fragment, null, React.createElement("div", {
267
+ className: `${classPrefix}-slide-placeholder`,
268
+ style: {
269
+ width: `${startIndex * 100}%`
270
+ }
271
+ }), items);
272
+ }
273
+ return React.Children.map(validChildren, (child, index) => {
274
+ return renderItem(index, child);
275
+ });
276
+ }
277
+ // Render Track Inner
218
278
  function renderTrackInner() {
219
279
  if (loop) {
220
280
  return React.createElement("div", {
221
281
  className: `${classPrefix}-track-inner`
222
- }, React.Children.map(validChildren, (child, index) => {
223
- return React.createElement(animated.div, {
224
- className: classNames(`${classPrefix}-slide`, {
225
- [`${classPrefix}-slide-active`]: current === index
226
- }),
227
- style: {
228
- [isVertical ? 'y' : 'x']: position.to(position => {
229
- let finalPosition = -position + index * 100;
230
- const totalWidth = count * 100;
231
- const flagWidth = totalWidth / 2;
232
- finalPosition = modulus(finalPosition + flagWidth, totalWidth) - flagWidth;
233
- return `${finalPosition}%`;
234
- }),
235
- [isVertical ? 'top' : 'left']: `-${index * 100}%`
236
- }
237
- }, child);
238
- }));
282
+ }, renderItems());
239
283
  } else {
240
284
  return React.createElement(animated.div, {
241
285
  className: `${classPrefix}-track-inner`,
242
286
  style: {
243
287
  [isVertical ? 'y' : 'x']: position.to(position => `${-position}%`)
244
288
  }
245
- }, React.Children.map(validChildren, (child, index) => {
246
- return React.createElement("div", {
247
- className: classNames(`${classPrefix}-slide`, {
248
- [`${classPrefix}-slide-active`]: current === index
249
- })
250
- }, child);
251
- }));
289
+ }, renderItems());
252
290
  }
253
291
  }
292
+ // Render
254
293
  const style = {
255
294
  '--slide-size': `${props.slideSize}%`,
256
295
  '--track-offset': `${props.trackOffset}%`
@@ -264,8 +303,20 @@ export const Swiper = forwardRef(staged((p, ref) => {
264
303
  };
265
304
  }
266
305
  const mergedProps = mergeFuncProps(dragProps, stopPropagationProps);
306
+ let indicatorNode = null;
307
+ if (typeof indicator === 'function') {
308
+ indicatorNode = indicator(mergedTotal, current);
309
+ } else if (indicator !== false) {
310
+ indicatorNode = React.createElement("div", {
311
+ className: `${classPrefix}-indicator`
312
+ }, React.createElement(PageIndicator, Object.assign({}, props.indicatorProps, {
313
+ total: mergedTotal,
314
+ current: current,
315
+ direction: direction
316
+ })));
317
+ }
267
318
  return withNativeProps(props, React.createElement("div", {
268
- className: classNames(classPrefix, `${classPrefix}-${props.direction}`),
319
+ className: classNames(classPrefix, `${classPrefix}-${direction}`),
269
320
  style: style
270
321
  }, React.createElement("div", Object.assign({
271
322
  ref: trackRef,
@@ -278,13 +329,7 @@ export const Swiper = forwardRef(staged((p, ref) => {
278
329
  }
279
330
  forceCancelDrag();
280
331
  }
281
- }, mergedProps), renderTrackInner()), props.indicator === undefined ? React.createElement("div", {
282
- className: `${classPrefix}-indicator`
283
- }, React.createElement(PageIndicator, Object.assign({}, props.indicatorProps, {
284
- total: count,
285
- current: current,
286
- direction: props.direction
287
- }))) : props.indicator(count, current)));
332
+ }, mergedProps), renderTrackInner()), indicatorNode));
288
333
  };
289
334
  }));
290
335
  function modulus(value, division) {
@@ -67,10 +67,6 @@
67
67
  display: none;
68
68
  }
69
69
 
70
- .adm-text-area-element[readonly] {
71
- pointer-events: none;
72
- }
73
-
74
70
  .adm-text-area-element-hidden {
75
71
  visibility: hidden;
76
72
  position: absolute;
@@ -59,13 +59,13 @@
59
59
  }
60
60
 
61
61
  .adm-button-danger {
62
- background-color: #00b578;
63
- border-color: #00b578;
62
+ background-color: #ff3141;
63
+ border-color: #ff3141;
64
64
  }
65
65
 
66
66
  .adm-button-danger.adm-button-fill-outline,
67
67
  .adm-button-danger.adm-button-fill-none {
68
- color: #00b578;
68
+ color: #ff3141;
69
69
  }
70
70
 
71
71
  .adm-button-warning {
package/2x/es/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/2x/es/index.js CHANGED
@@ -18,7 +18,7 @@ export { default as CenterPopup } from './components/center-popup';
18
18
  export { default as CheckList } from './components/check-list';
19
19
  export { default as Checkbox } from './components/checkbox';
20
20
  export { default as Collapse } from './components/collapse';
21
- export { default as ConfigProvider } from './components/config-provider';
21
+ export { default as ConfigProvider, useConfig } from './components/config-provider';
22
22
  export { default as DatePicker } from './components/date-picker';
23
23
  export { default as DatePickerView } from './components/date-picker-view';
24
24
  export { default as Dialog } from './components/dialog';
@@ -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,140 @@
1
+ import { mergeLocale } from '../utils/merge-locale';
2
+ import { base } from './base';
3
+ const typeTemplate = '${label} is not a valid ${type}';
4
+ export const huHU = mergeLocale(base, {
5
+ locale: 'hu',
6
+ common: {
7
+ confirm: 'Alkalmazás',
8
+ cancel: 'Visszavonás',
9
+ loading: 'Betöltés',
10
+ close: 'Bezárás'
11
+ },
12
+ Calendar: {
13
+ title: 'Dátum kiválasztása',
14
+ confirm: 'Alkalmazás',
15
+ today: 'ma',
16
+ markItems: ['Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo', 'Vas'],
17
+ yearAndMonth: '${year}-${month}'
18
+ },
19
+ Cascader: {
20
+ placeholder: 'Kiválasztás'
21
+ },
22
+ Dialog: {
23
+ ok: 'OK'
24
+ },
25
+ DatePicker: {
26
+ tillNow: 'Till Now'
27
+ },
28
+ ErrorBlock: {
29
+ default: {
30
+ title: 'Oopsz, valami hiba történt',
31
+ description: 'Kérjük, várjon egy percet, és próbálja újra'
32
+ },
33
+ busy: {
34
+ title: 'Oopsz, nem sikerült betölteni',
35
+ description: 'Próbálja meg frissíteni az oldalt'
36
+ },
37
+ disconnected: {
38
+ title: 'A hálózat elfoglalt',
39
+ description: 'Próbálja meg frissíteni az oldalt'
40
+ },
41
+ empty: {
42
+ title: "Hmm, nem találjuk amit keresel...",
43
+ description: 'Szeretnél új keresést indítani?'
44
+ }
45
+ },
46
+ Form: {
47
+ required: 'Kötelező',
48
+ optional: 'Opcionális',
49
+ defaultValidateMessages: {
50
+ default: 'Mező validációs hiba ${label}',
51
+ required: 'Mező kitöltése kötelező ${label}',
52
+ enum: '${label} tatroznia kell [${enum}]',
53
+ whitespace: '${label} nem lehet üres karakter',
54
+ date: {
55
+ format: '${label} dátum formátuma érvénytelen',
56
+ parse: '${label} nem alakítható dátummá',
57
+ invalid: '${label} nem érvényes dátum'
58
+ },
59
+ types: {
60
+ string: typeTemplate,
61
+ method: typeTemplate,
62
+ array: typeTemplate,
63
+ object: typeTemplate,
64
+ number: typeTemplate,
65
+ date: typeTemplate,
66
+ boolean: typeTemplate,
67
+ integer: typeTemplate,
68
+ float: typeTemplate,
69
+ regexp: typeTemplate,
70
+ email: typeTemplate,
71
+ url: typeTemplate,
72
+ hex: typeTemplate
73
+ },
74
+ string: {
75
+ len: '${label} muszáj hogy ${len} karakter hosszú legyen',
76
+ min: '${label} muszáj hogy legalább ${min} karakter hosszú legyen',
77
+ max: '${label} muszáj hogy maximum ${max} karakter hosszú legyen',
78
+ range: '${label} muszáj hogy ${min}-${max} karakter hosszú legyen'
79
+ },
80
+ number: {
81
+ len: '${label} muszáj hogy ${len} legyen',
82
+ min: '${label} legalább ${min} legyen',
83
+ max: '${label} maximum ${max} lehet',
84
+ range: '${label} muszáj hogy ${min}-${max} között legyen'
85
+ },
86
+ array: {
87
+ len: 'Muszáj ${len} legyen ${label}',
88
+ min: 'Legalább ${min} ${label}',
89
+ max: 'Maximum ${max} ${label}',
90
+ range: '${label} értéke ${min}-${max} között kell legyen'
91
+ },
92
+ pattern: {
93
+ mismatch: '${label} nem hasonlít ${pattern}'
94
+ }
95
+ }
96
+ },
97
+ ImageUploader: {
98
+ uploading: 'Feltöltés...',
99
+ upload: 'Feltöltés'
100
+ },
101
+ InfiniteScroll: {
102
+ noMore: 'Nincs több',
103
+ failedToLoad: 'Nem sikerült betölteni',
104
+ retry: 'Újra'
105
+ },
106
+ Input: {
107
+ clear: 'Törlés'
108
+ },
109
+ Mask: {
110
+ name: 'Maszk'
111
+ },
112
+ Modal: {
113
+ ok: 'OK'
114
+ },
115
+ PasscodeInput: {
116
+ name: 'PIN-kód'
117
+ },
118
+ PullToRefresh: {
119
+ pulling: 'Görgessen le a frissítéshez',
120
+ canRelease: 'Engedje el az azonnalli frissítéshez',
121
+ complete: 'Sikeresen frissítve'
122
+ },
123
+ SearchBar: {
124
+ name: 'Keresés'
125
+ },
126
+ Slider: {
127
+ name: 'Csúszka'
128
+ },
129
+ Stepper: {
130
+ decrease: 'csökkentés',
131
+ increase: 'növelés'
132
+ },
133
+ Switch: {
134
+ name: 'Kapcsoló'
135
+ },
136
+ Selector: {
137
+ name: 'Kiválasztás'
138
+ }
139
+ });
140
+ export default huHU;