antd-mobile 5.29.0 → 5.29.1

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 (68) hide show
  1. package/2x/bundle/antd-mobile.cjs.development.js +27 -25
  2. package/2x/bundle/antd-mobile.cjs.js +3 -3
  3. package/2x/bundle/antd-mobile.es.development.js +27 -25
  4. package/2x/bundle/antd-mobile.es.js +22 -8
  5. package/2x/bundle/antd-mobile.umd.development.js +27 -25
  6. package/2x/bundle/antd-mobile.umd.js +3 -3
  7. package/2x/cjs/components/calendar/calendar.js +1 -1
  8. package/2x/cjs/components/number-keyboard/number-keyboard.js +5 -3
  9. package/2x/cjs/components/popup/popup.js +13 -11
  10. package/2x/cjs/components/text-area/text-area.js +1 -0
  11. package/2x/cjs/components/virtual-input/virtual-input.js +1 -2
  12. package/2x/cjs/locales/da-DK.d.ts +134 -0
  13. package/2x/cjs/locales/da-DK.js +132 -0
  14. package/2x/cjs/locales/it-IT.d.ts +134 -0
  15. package/2x/cjs/locales/it-IT.js +144 -0
  16. package/2x/cjs/locales/nb-NO.d.ts +134 -0
  17. package/2x/cjs/locales/nb-NO.js +144 -0
  18. package/2x/cjs/locales/nl-NL.d.ts +134 -0
  19. package/2x/cjs/locales/nl-NL.js +144 -0
  20. package/2x/es/components/calendar/calendar.js +1 -1
  21. package/2x/es/components/number-keyboard/number-keyboard.js +5 -3
  22. package/2x/es/components/popup/popup.js +13 -11
  23. package/2x/es/components/text-area/text-area.js +1 -0
  24. package/2x/es/components/virtual-input/virtual-input.js +1 -2
  25. package/2x/es/locales/da-DK.d.ts +134 -0
  26. package/2x/es/locales/da-DK.js +125 -0
  27. package/2x/es/locales/it-IT.d.ts +134 -0
  28. package/2x/es/locales/it-IT.js +137 -0
  29. package/2x/es/locales/nb-NO.d.ts +134 -0
  30. package/2x/es/locales/nb-NO.js +137 -0
  31. package/2x/es/locales/nl-NL.d.ts +134 -0
  32. package/2x/es/locales/nl-NL.js +137 -0
  33. package/2x/package.json +1 -1
  34. package/bundle/antd-mobile.cjs.development.js +27 -25
  35. package/bundle/antd-mobile.cjs.js +3 -3
  36. package/bundle/antd-mobile.compatible.umd.js +1 -1
  37. package/bundle/antd-mobile.es.development.js +27 -25
  38. package/bundle/antd-mobile.es.js +22 -8
  39. package/bundle/antd-mobile.umd.development.js +27 -25
  40. package/bundle/antd-mobile.umd.js +3 -3
  41. package/cjs/components/calendar/calendar.js +1 -1
  42. package/cjs/components/number-keyboard/number-keyboard.js +5 -3
  43. package/cjs/components/popup/popup.js +13 -11
  44. package/cjs/components/text-area/text-area.js +1 -0
  45. package/cjs/components/virtual-input/virtual-input.js +1 -2
  46. package/cjs/locales/da-DK.d.ts +134 -0
  47. package/cjs/locales/da-DK.js +132 -0
  48. package/cjs/locales/it-IT.d.ts +134 -0
  49. package/cjs/locales/it-IT.js +144 -0
  50. package/cjs/locales/nb-NO.d.ts +134 -0
  51. package/cjs/locales/nb-NO.js +144 -0
  52. package/cjs/locales/nl-NL.d.ts +134 -0
  53. package/cjs/locales/nl-NL.js +144 -0
  54. package/es/components/calendar/calendar.js +1 -1
  55. package/es/components/number-keyboard/number-keyboard.js +5 -3
  56. package/es/components/popup/popup.js +13 -11
  57. package/es/components/text-area/text-area.js +1 -0
  58. package/es/components/virtual-input/virtual-input.js +1 -2
  59. package/es/locales/da-DK.d.ts +134 -0
  60. package/es/locales/da-DK.js +125 -0
  61. package/es/locales/it-IT.d.ts +134 -0
  62. package/es/locales/it-IT.js +137 -0
  63. package/es/locales/nb-NO.d.ts +134 -0
  64. package/es/locales/nb-NO.js +137 -0
  65. package/es/locales/nl-NL.d.ts +134 -0
  66. package/es/locales/nl-NL.js +137 -0
  67. package/package.json +1 -1
  68. package/umd/antd-mobile.js +1 -1
@@ -0,0 +1,137 @@
1
+ import { mergeLocale } from '../utils/merge-locale';
2
+ import { base } from './base';
3
+ const typeTemplate = '${label} er ikke gyldig som ${type}';
4
+ const nbNO = mergeLocale(base, {
5
+ locale: 'nb-NO',
6
+ common: {
7
+ confirm: 'Bekreft',
8
+ cancel: 'Avbryt',
9
+ loading: 'Laster',
10
+ close: 'Lukk'
11
+ },
12
+ Calendar: {
13
+ markItems: ['Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør', 'Søn'],
14
+ renderYearAndMonth: (year, month) => `${month}.${year}`
15
+ },
16
+ Cascader: {
17
+ placeholder: 'Velg'
18
+ },
19
+ Dialog: {
20
+ ok: 'OK'
21
+ },
22
+ DatePicker: {
23
+ tillNow: 'Til nå'
24
+ },
25
+ ErrorBlock: {
26
+ default: {
27
+ title: 'Oops, noe gikk galt',
28
+ description: 'Vent et minutt og prøv igjen'
29
+ },
30
+ busy: {
31
+ title: 'Oops, ikke laster',
32
+ description: 'Prøv å oppdatere siden'
33
+ },
34
+ disconnected: {
35
+ title: 'Nettverket er opptatt',
36
+ description: 'Prøv å oppdatere siden'
37
+ },
38
+ empty: {
39
+ title: 'Hmm, fant ikke det...',
40
+ description: 'Vil du prøve en ny søk?'
41
+ }
42
+ },
43
+ Form: {
44
+ required: 'Påkrevd',
45
+ optional: 'Valgfritt',
46
+ defaultValidateMessages: {
47
+ default: 'Feltvalideringsfeil for ${label}',
48
+ required: 'Vennligst skriv inn ${label}',
49
+ enum: '${label} må være en av [${enum}]',
50
+ whitespace: '${label} kan ikke være et blankt tegn',
51
+ date: {
52
+ format: 'Ugyldig datoformat for ${label}',
53
+ parse: '${label} kan ikke konverteres til en dato',
54
+ invalid: '${label} er en ugyldig dato'
55
+ },
56
+ types: {
57
+ string: typeTemplate,
58
+ method: typeTemplate,
59
+ array: typeTemplate,
60
+ object: typeTemplate,
61
+ number: typeTemplate,
62
+ date: typeTemplate,
63
+ boolean: typeTemplate,
64
+ integer: typeTemplate,
65
+ float: typeTemplate,
66
+ regexp: typeTemplate,
67
+ email: typeTemplate,
68
+ url: typeTemplate,
69
+ hex: typeTemplate
70
+ },
71
+ string: {
72
+ len: '${label} må være ${len} tegn',
73
+ min: '${label} må ha minst ${min} tegn',
74
+ max: '${label} må ha opptil ${max} tegn',
75
+ range: '${label} må ha mellom ${min}-${max} tegn'
76
+ },
77
+ number: {
78
+ len: '${label} må være lik ${len}',
79
+ min: '${label} må være minimum ${min}',
80
+ max: '${label} må være maksimum ${max}',
81
+ range: '${label} må være mellom ${min}-${max}'
82
+ },
83
+ array: {
84
+ len: 'Må ha ${len} ${label}',
85
+ min: 'Minst ${min} ${label}',
86
+ max: 'Maksimalt ${max} ${label}',
87
+ range: 'Antall ${label} må være mellom ${min}-${max}'
88
+ },
89
+ pattern: {
90
+ mismatch: '${label} samsvarer ikke med mønsteret ${pattern}'
91
+ }
92
+ }
93
+ },
94
+ ImageUploader: {
95
+ uploading: 'Laster opp...',
96
+ upload: 'Last opp'
97
+ },
98
+ InfiniteScroll: {
99
+ noMore: 'Ingen flere',
100
+ failedToLoad: 'Kunne ikke laste inn',
101
+ retry: 'Prøv igjen'
102
+ },
103
+ Input: {
104
+ clear: 'slett'
105
+ },
106
+ Mask: {
107
+ name: 'Maske'
108
+ },
109
+ Modal: {
110
+ ok: 'OK'
111
+ },
112
+ PasscodeInput: {
113
+ name: 'Inndata for adgangskode'
114
+ },
115
+ PullToRefresh: {
116
+ pulling: 'Dra ned for å oppdatere',
117
+ canRelease: 'Slipp for å oppdatere umiddelbart',
118
+ complete: 'Oppdatering fullført'
119
+ },
120
+ SearchBar: {
121
+ name: 'Søkefelt'
122
+ },
123
+ Slider: {
124
+ name: 'Glideregister'
125
+ },
126
+ Stepper: {
127
+ decrease: 'reduser',
128
+ increase: 'øk'
129
+ },
130
+ Switch: {
131
+ name: 'Bryter'
132
+ },
133
+ Selector: {
134
+ name: 'Velger'
135
+ }
136
+ });
137
+ export default nbNO;
@@ -0,0 +1,134 @@
1
+ declare const nlNL: {
2
+ locale: string;
3
+ common: {
4
+ confirm: string;
5
+ cancel: string;
6
+ loading: string;
7
+ close: string;
8
+ };
9
+ Calendar: {
10
+ markItems: string[];
11
+ renderYearAndMonth: (year: number, month: number) => string;
12
+ };
13
+ Cascader: {
14
+ placeholder: string;
15
+ };
16
+ Dialog: {
17
+ ok: string;
18
+ };
19
+ DatePicker: {
20
+ tillNow: string;
21
+ };
22
+ ErrorBlock: {
23
+ default: {
24
+ title: string;
25
+ description: string;
26
+ };
27
+ busy: {
28
+ title: string;
29
+ description: string;
30
+ };
31
+ disconnected: {
32
+ title: string;
33
+ description: string;
34
+ };
35
+ empty: {
36
+ title: string;
37
+ description: string;
38
+ };
39
+ };
40
+ Form: {
41
+ required: string;
42
+ optional: string;
43
+ defaultValidateMessages: {
44
+ default: string;
45
+ required: string;
46
+ enum: string;
47
+ whitespace: string;
48
+ date: {
49
+ format: string;
50
+ parse: string;
51
+ invalid: string;
52
+ };
53
+ types: {
54
+ string: string;
55
+ method: string;
56
+ array: string;
57
+ object: string;
58
+ number: string;
59
+ date: string;
60
+ boolean: string;
61
+ integer: string;
62
+ float: string;
63
+ regexp: string;
64
+ email: string;
65
+ url: string;
66
+ hex: string;
67
+ };
68
+ string: {
69
+ len: string;
70
+ min: string;
71
+ max: string;
72
+ range: string;
73
+ };
74
+ number: {
75
+ len: string;
76
+ min: string;
77
+ max: string;
78
+ range: string;
79
+ };
80
+ array: {
81
+ len: string;
82
+ min: string;
83
+ max: string;
84
+ range: string;
85
+ };
86
+ pattern: {
87
+ mismatch: string;
88
+ };
89
+ };
90
+ };
91
+ ImageUploader: {
92
+ uploading: string;
93
+ upload: string;
94
+ };
95
+ InfiniteScroll: {
96
+ noMore: string;
97
+ failedToLoad: string;
98
+ retry: string;
99
+ };
100
+ Input: {
101
+ clear: string;
102
+ };
103
+ Mask: {
104
+ name: string;
105
+ };
106
+ Modal: {
107
+ ok: string;
108
+ };
109
+ PasscodeInput: {
110
+ name: string;
111
+ };
112
+ PullToRefresh: {
113
+ pulling: string;
114
+ canRelease: string;
115
+ complete: string;
116
+ };
117
+ SearchBar: {
118
+ name: string;
119
+ };
120
+ Slider: {
121
+ name: string;
122
+ };
123
+ Stepper: {
124
+ decrease: string;
125
+ increase: string;
126
+ };
127
+ Switch: {
128
+ name: string;
129
+ };
130
+ Selector: {
131
+ name: string;
132
+ };
133
+ };
134
+ export default nlNL;
@@ -0,0 +1,137 @@
1
+ import { mergeLocale } from '../utils/merge-locale';
2
+ import { base } from './base';
3
+ const typeTemplate = '${label} is niet geldig als ${type}';
4
+ const nlNL = mergeLocale(base, {
5
+ locale: 'nl-NL',
6
+ common: {
7
+ confirm: 'Bevestigen',
8
+ cancel: 'Annuleren',
9
+ loading: 'Laden',
10
+ close: 'Sluiten'
11
+ },
12
+ Calendar: {
13
+ markItems: ['Ma', 'Di', 'Wo', 'Do', 'Vr', 'Za', 'Zo'],
14
+ renderYearAndMonth: (year, month) => `${month}-${year}`
15
+ },
16
+ Cascader: {
17
+ placeholder: 'Selecteren'
18
+ },
19
+ Dialog: {
20
+ ok: 'OK'
21
+ },
22
+ DatePicker: {
23
+ tillNow: 'Tot nu'
24
+ },
25
+ ErrorBlock: {
26
+ default: {
27
+ title: 'Oeps, er is iets fout gegaan',
28
+ description: 'Wacht een minuutje en probeer opnieuw'
29
+ },
30
+ busy: {
31
+ title: 'Oeps, niet aan het laden',
32
+ description: 'Probeer de pagina te vernieuwen'
33
+ },
34
+ disconnected: {
35
+ title: 'Netwerk is bezet',
36
+ description: 'Probeer de pagina te vernieuwen'
37
+ },
38
+ empty: {
39
+ title: 'Hmm, dat kon niet gevonden worden...',
40
+ description: 'Wil je een nieuwe zoekopdracht proberen?'
41
+ }
42
+ },
43
+ Form: {
44
+ required: 'Verplicht',
45
+ optional: 'Optioneel',
46
+ defaultValidateMessages: {
47
+ default: 'Veldvalidatiefout voor ${label}',
48
+ required: 'Vul ${label} in',
49
+ enum: '${label} moet een van de volgende zijn: [${enum}]',
50
+ whitespace: '${label} mag geen leeg karakter zijn',
51
+ date: {
52
+ format: 'Ongeldige datumnotatie voor ${label}',
53
+ parse: 'Kan ${label} niet converteren naar een datum',
54
+ invalid: 'Ongeldige datum voor ${label}'
55
+ },
56
+ types: {
57
+ string: typeTemplate,
58
+ method: typeTemplate,
59
+ array: typeTemplate,
60
+ object: typeTemplate,
61
+ number: typeTemplate,
62
+ date: typeTemplate,
63
+ boolean: typeTemplate,
64
+ integer: typeTemplate,
65
+ float: typeTemplate,
66
+ regexp: typeTemplate,
67
+ email: typeTemplate,
68
+ url: typeTemplate,
69
+ hex: typeTemplate
70
+ },
71
+ string: {
72
+ len: '${label} moet ${len} tekens zijn',
73
+ min: '${label} moet minimaal ${min} tekens zijn',
74
+ max: '${label} mag maximaal ${max} tekens zijn',
75
+ range: '${label} moet tussen ${min}-${max} tekens zijn'
76
+ },
77
+ number: {
78
+ len: '${label} moet gelijk zijn aan ${len}',
79
+ min: '${label} moet minimaal ${min} zijn',
80
+ max: '${label} mag maximaal ${max} zijn',
81
+ range: '${label} moet tussen ${min}-${max} zijn'
82
+ },
83
+ array: {
84
+ len: 'Moet ${len} ${label} zijn',
85
+ min: 'Moet minimaal ${min} ${label} zijn',
86
+ max: 'Mag maximaal ${max} ${label} zijn',
87
+ range: 'Aantal ${label} moet tussen ${min}-${max} zijn'
88
+ },
89
+ pattern: {
90
+ mismatch: '${label} komt niet overeen met het patroon ${pattern}'
91
+ }
92
+ }
93
+ },
94
+ ImageUploader: {
95
+ uploading: 'Uploaden...',
96
+ upload: 'Uploaden'
97
+ },
98
+ InfiniteScroll: {
99
+ noMore: 'Geen meer',
100
+ failedToLoad: 'Laden mislukt',
101
+ retry: 'Opnieuw proberen'
102
+ },
103
+ Input: {
104
+ clear: 'wissen'
105
+ },
106
+ Mask: {
107
+ name: 'Masker'
108
+ },
109
+ Modal: {
110
+ ok: 'Begrepen'
111
+ },
112
+ PasscodeInput: {
113
+ name: 'Invoer voor toegangscode'
114
+ },
115
+ PullToRefresh: {
116
+ pulling: 'Trek naar beneden om te vernieuwen',
117
+ canRelease: 'Los om onmiddellijk te vernieuwen',
118
+ complete: 'Vernieuwen voltooid'
119
+ },
120
+ SearchBar: {
121
+ name: 'Zoekbalk'
122
+ },
123
+ Slider: {
124
+ name: 'Schuifregelaar'
125
+ },
126
+ Stepper: {
127
+ decrease: 'afnemen',
128
+ increase: 'toenemen'
129
+ },
130
+ Switch: {
131
+ name: 'Schakelaar'
132
+ },
133
+ Selector: {
134
+ name: 'Selector'
135
+ }
136
+ });
137
+ export default nlNL;
package/2x/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-mobile",
3
- "version": "5.29.0",
3
+ "version": "5.29.1",
4
4
  "dependencies": {
5
5
  "@floating-ui/dom": "^1.0.6",
6
6
  "@rc-component/mini-decimal": "^1.0.1",
@@ -7580,17 +7580,19 @@ const Popup$1 = (p) => {
7580
7580
  className: bodyCls,
7581
7581
  style: Object.assign(Object.assign({}, props.bodyStyle), {
7582
7582
  transform: percent.to((v) => {
7583
- if (props.position === "bottom") {
7584
- return `translate(0, ${v}%)`;
7585
- }
7586
- if (props.position === "top") {
7587
- return `translate(0, -${v}%)`;
7588
- }
7589
- if (props.position === "left") {
7590
- return `translate(-${v}%, 0)`;
7591
- }
7592
- if (props.position === "right") {
7593
- return `translate(${v}%, 0)`;
7583
+ if (v) {
7584
+ if (props.position === "bottom") {
7585
+ return `translate(0, ${v}%)`;
7586
+ }
7587
+ if (props.position === "top") {
7588
+ return `translate(0, -${v}%)`;
7589
+ }
7590
+ if (props.position === "left") {
7591
+ return `translate(-${v}%, 0)`;
7592
+ }
7593
+ if (props.position === "right") {
7594
+ return `translate(${v}%, 0)`;
7595
+ }
7594
7596
  }
7595
7597
  return "none";
7596
7598
  })
@@ -8383,7 +8385,7 @@ const Calendar$1 = React$4.forwardRef((p, ref) => {
8383
8385
  return;
8384
8386
  }
8385
8387
  }
8386
- setCurrent(current[action](num, type4));
8388
+ setCurrent(nxtCurrent);
8387
8389
  };
8388
8390
  const header = React__default.default.createElement("div", {
8389
8391
  className: `${classPrefix$1b}-header`
@@ -20078,16 +20080,14 @@ function getClippingElementAncestors(element, cache) {
20078
20080
  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
20079
20081
  const computedStyle = getComputedStyle$1(currentNode);
20080
20082
  const containingBlock = isContainingBlock(currentNode);
20081
- const shouldIgnoreCurrentNode = computedStyle.position === "fixed";
20082
- if (shouldIgnoreCurrentNode) {
20083
+ if (computedStyle.position === "fixed") {
20083
20084
  currentContainingBlockComputedStyle = null;
20085
+ }
20086
+ const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position);
20087
+ if (shouldDropCurrentNode) {
20088
+ result2 = result2.filter((ancestor) => ancestor !== currentNode);
20084
20089
  } else {
20085
- const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position);
20086
- if (shouldDropCurrentNode) {
20087
- result2 = result2.filter((ancestor) => ancestor !== currentNode);
20088
- } else {
20089
- currentContainingBlockComputedStyle = computedStyle;
20090
- }
20090
+ currentContainingBlockComputedStyle = computedStyle;
20091
20091
  }
20092
20092
  currentNode = getParentNode(currentNode);
20093
20093
  }
@@ -22474,7 +22474,7 @@ const NumberKeyboard$1 = (p) => {
22474
22474
  var _a;
22475
22475
  (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
22476
22476
  },
22477
- role: "button",
22477
+ role: "grid",
22478
22478
  title: "CLOSE",
22479
22479
  tabIndex: -1
22480
22480
  }, React__default.default.createElement(DownOutline, null)));
@@ -22541,11 +22541,13 @@ const NumberKeyboard$1 = (p) => {
22541
22541
  onBackspacePressEnd();
22542
22542
  },
22543
22543
  title: "BACKSPACE",
22544
- role: "button"
22544
+ role: "grid",
22545
+ tabIndex: -1
22545
22546
  }, React__default.default.createElement(TextDeletionOutline, null)), React__default.default.createElement("div", {
22546
22547
  className: `${classPrefix$w}-key ${classPrefix$w}-key-extra ${classPrefix$w}-key-ok`,
22547
22548
  onTouchEnd: (e) => onKeyPress(e, "OK"),
22548
- role: "button",
22549
+ role: "grid",
22550
+ tabIndex: -1,
22549
22551
  "aria-label": confirmText
22550
22552
  }, confirmText))), props.safeArea && React__default.default.createElement("div", {
22551
22553
  className: `${classPrefix$w}-footer`
@@ -25495,6 +25497,7 @@ const TextArea$1 = React$4.forwardRef((p, ref) => {
25495
25497
  ref: hiddenTextAreaRef,
25496
25498
  className: `${classPrefix$6}-element ${classPrefix$6}-element-hidden`,
25497
25499
  value,
25500
+ rows: props.rows,
25498
25501
  "aria-hidden": true,
25499
25502
  readOnly: true
25500
25503
  })));
@@ -26048,14 +26051,13 @@ const VirtualInput$1 = React$4.forwardRef((p, ref) => {
26048
26051
  [`${classPrefix$2}-disabled`]: props.disabled
26049
26052
  }),
26050
26053
  tabIndex: props.disabled ? void 0 : 0,
26054
+ role: "option",
26051
26055
  onFocus,
26052
26056
  onBlur,
26053
26057
  onClick: props.onClick
26054
26058
  }, React__default.default.createElement("div", {
26055
26059
  className: `${classPrefix$2}-content`,
26056
26060
  ref: contentRef,
26057
- role: "option",
26058
- tabIndex: props.disabled ? void 0 : 0,
26059
26061
  "aria-disabled": props.disabled,
26060
26062
  "aria-label": props.placeholder
26061
26063
  }, value, React__default.default.createElement("div", {