@hi-ui/hiui 4.4.0 → 4.4.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.
- package/CHANGELOG.md +75 -0
- package/lib/cjs/index.js +393 -65
- package/lib/cjs/ui/locale-context/lib/esm/LocaleContext.js +3 -0
- package/lib/cjs/ui/locale-context/lib/esm/LocaleProvider.js +13 -2
- package/lib/cjs/ui/locale-context/lib/esm/types.js +4 -0
- package/lib/cjs/utils/array-utils/lib/esm/index.js +3 -0
- package/lib/cjs/utils/env/lib/esm/index.js +4 -0
- package/lib/cjs/utils/object-utils/lib/esm/index.js +3 -0
- package/lib/cjs/utils/type-assertion/lib/esm/index.js +3 -0
- package/package.json +71 -71
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,80 @@
|
|
1
1
|
# @hi-ui/hiui
|
2
2
|
|
3
|
+
## 4.4.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- fix: 修复 rollup3 打包 cjs 模块问题
|
8
|
+
- Updated dependencies
|
9
|
+
- @hi-ui/core@4.0.7
|
10
|
+
- @hi-ui/alert@4.1.2
|
11
|
+
- @hi-ui/anchor@4.0.7
|
12
|
+
- @hi-ui/avatar@4.0.6
|
13
|
+
- @hi-ui/back-top@4.0.6
|
14
|
+
- @hi-ui/badge@4.0.8
|
15
|
+
- @hi-ui/breadcrumb@4.0.6
|
16
|
+
- @hi-ui/button@4.0.8
|
17
|
+
- @hi-ui/card@4.0.7
|
18
|
+
- @hi-ui/carousel@4.0.6
|
19
|
+
- @hi-ui/cascader@4.1.4
|
20
|
+
- @hi-ui/check-cascader@4.2.4
|
21
|
+
- @hi-ui/check-select@4.3.4
|
22
|
+
- @hi-ui/check-tree-select@4.3.2
|
23
|
+
- @hi-ui/checkbox@4.0.7
|
24
|
+
- @hi-ui/collapse@4.1.4
|
25
|
+
- @hi-ui/counter@4.1.7
|
26
|
+
- @hi-ui/date-picker@4.4.3
|
27
|
+
- @hi-ui/descriptions@4.2.3
|
28
|
+
- @hi-ui/drawer@4.1.2
|
29
|
+
- @hi-ui/dropdown@4.1.3
|
30
|
+
- @hi-ui/ellipsis-tooltip@4.1.4
|
31
|
+
- @hi-ui/empty-state@4.0.6
|
32
|
+
- @hi-ui/filter@4.1.3
|
33
|
+
- @hi-ui/form@4.1.4
|
34
|
+
- @hi-ui/grid@4.0.7
|
35
|
+
- @hi-ui/highlighter@4.0.7
|
36
|
+
- @hi-ui/input@4.0.12
|
37
|
+
- @hi-ui/input-group@4.0.5
|
38
|
+
- @hi-ui/list@4.0.11
|
39
|
+
- @hi-ui/loading@4.1.2
|
40
|
+
- @hi-ui/menu@4.1.5
|
41
|
+
- @hi-ui/message@4.0.6
|
42
|
+
- @hi-ui/modal@4.0.14
|
43
|
+
- @hi-ui/notification@4.1.2
|
44
|
+
- @hi-ui/number-input@4.1.6
|
45
|
+
- @hi-ui/pagination@4.0.13
|
46
|
+
- @hi-ui/picker@4.1.3
|
47
|
+
- @hi-ui/pop-confirm@4.2.2
|
48
|
+
- @hi-ui/popover@4.0.7
|
49
|
+
- @hi-ui/preview@4.0.7
|
50
|
+
- @hi-ui/progress@4.0.8
|
51
|
+
- @hi-ui/provider@4.0.7
|
52
|
+
- @hi-ui/radio@4.1.2
|
53
|
+
- @hi-ui/rating@4.0.7
|
54
|
+
- @hi-ui/result@4.0.6
|
55
|
+
- @hi-ui/scrollbar@4.0.5
|
56
|
+
- @hi-ui/search@4.0.10
|
57
|
+
- @hi-ui/select@4.2.4
|
58
|
+
- @hi-ui/slider@4.0.9
|
59
|
+
- @hi-ui/space@4.0.8
|
60
|
+
- @hi-ui/spinner@4.0.7
|
61
|
+
- @hi-ui/stepper@4.0.6
|
62
|
+
- @hi-ui/svg-icon@4.0.6
|
63
|
+
- @hi-ui/switch@4.0.9
|
64
|
+
- @hi-ui/table@4.3.3
|
65
|
+
- @hi-ui/tabs@4.1.3
|
66
|
+
- @hi-ui/tag@4.1.2
|
67
|
+
- @hi-ui/textarea@4.1.5
|
68
|
+
- @hi-ui/time-picker@4.0.12
|
69
|
+
- @hi-ui/timeline@4.0.6
|
70
|
+
- @hi-ui/tooltip@4.0.9
|
71
|
+
- @hi-ui/transfer@4.0.12
|
72
|
+
- @hi-ui/tree@4.5.7
|
73
|
+
- @hi-ui/tree-select@4.1.2
|
74
|
+
- @hi-ui/upload@4.1.8
|
75
|
+
- @hi-ui/watermark@4.0.6
|
76
|
+
- @hi-ui/zen-mode@4.0.6
|
77
|
+
|
3
78
|
## 4.4.0
|
4
79
|
|
5
80
|
### Minor Changes
|
package/lib/cjs/index.js
CHANGED
@@ -9,6 +9,9 @@
|
|
9
9
|
*/
|
10
10
|
'use strict';
|
11
11
|
|
12
|
+
Object.defineProperty(exports, '__esModule', {
|
13
|
+
value: true
|
14
|
+
});
|
12
15
|
var alert = require('@hi-ui/alert');
|
13
16
|
var avatar = require('@hi-ui/avatar');
|
14
17
|
var badge = require('@hi-ui/badge');
|
@@ -76,75 +79,400 @@ var scrollbar = require('@hi-ui/scrollbar');
|
|
76
79
|
var inputGroup = require('@hi-ui/input-group');
|
77
80
|
var anchor = require('@hi-ui/anchor');
|
78
81
|
var backTop = require('@hi-ui/back-top');
|
79
|
-
exports
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
exports
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
exports
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
exports
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
exports
|
104
|
-
|
105
|
-
|
82
|
+
Object.defineProperty(exports, 'Alert', {
|
83
|
+
enumerable: true,
|
84
|
+
get: function get() {
|
85
|
+
return alert__namespace["default"];
|
86
|
+
}
|
87
|
+
});
|
88
|
+
Object.defineProperty(exports, 'Avatar', {
|
89
|
+
enumerable: true,
|
90
|
+
get: function get() {
|
91
|
+
return avatar__namespace["default"];
|
92
|
+
}
|
93
|
+
});
|
94
|
+
Object.defineProperty(exports, 'Badge', {
|
95
|
+
enumerable: true,
|
96
|
+
get: function get() {
|
97
|
+
return badge__namespace["default"];
|
98
|
+
}
|
99
|
+
});
|
100
|
+
Object.defineProperty(exports, 'Breadcrumb', {
|
101
|
+
enumerable: true,
|
102
|
+
get: function get() {
|
103
|
+
return breadcrumb__namespace["default"];
|
104
|
+
}
|
105
|
+
});
|
106
|
+
Object.defineProperty(exports, 'Button', {
|
107
|
+
enumerable: true,
|
108
|
+
get: function get() {
|
109
|
+
return button__namespace["default"];
|
110
|
+
}
|
111
|
+
});
|
112
|
+
Object.defineProperty(exports, 'Card', {
|
113
|
+
enumerable: true,
|
114
|
+
get: function get() {
|
115
|
+
return card__namespace["default"];
|
116
|
+
}
|
117
|
+
});
|
118
|
+
Object.defineProperty(exports, 'Carousel', {
|
119
|
+
enumerable: true,
|
120
|
+
get: function get() {
|
121
|
+
return carousel__namespace["default"];
|
122
|
+
}
|
123
|
+
});
|
124
|
+
Object.defineProperty(exports, 'Cascader', {
|
125
|
+
enumerable: true,
|
126
|
+
get: function get() {
|
127
|
+
return cascader__namespace["default"];
|
128
|
+
}
|
129
|
+
});
|
130
|
+
Object.defineProperty(exports, 'CheckCascader', {
|
131
|
+
enumerable: true,
|
132
|
+
get: function get() {
|
133
|
+
return checkCascader__namespace["default"];
|
134
|
+
}
|
135
|
+
});
|
136
|
+
Object.defineProperty(exports, 'CheckSelect', {
|
137
|
+
enumerable: true,
|
138
|
+
get: function get() {
|
139
|
+
return checkSelect__namespace["default"];
|
140
|
+
}
|
141
|
+
});
|
142
|
+
Object.defineProperty(exports, 'CheckTreeSelect', {
|
143
|
+
enumerable: true,
|
144
|
+
get: function get() {
|
145
|
+
return checkTreeSelect__namespace["default"];
|
146
|
+
}
|
147
|
+
});
|
148
|
+
Object.defineProperty(exports, 'Checkbox', {
|
149
|
+
enumerable: true,
|
150
|
+
get: function get() {
|
151
|
+
return checkbox__namespace["default"];
|
152
|
+
}
|
153
|
+
});
|
154
|
+
Object.defineProperty(exports, 'Collapse', {
|
155
|
+
enumerable: true,
|
156
|
+
get: function get() {
|
157
|
+
return collapse__namespace["default"];
|
158
|
+
}
|
159
|
+
});
|
160
|
+
Object.defineProperty(exports, 'Counter', {
|
161
|
+
enumerable: true,
|
162
|
+
get: function get() {
|
163
|
+
return counter__namespace["default"];
|
164
|
+
}
|
165
|
+
});
|
166
|
+
Object.defineProperty(exports, 'DatePicker', {
|
167
|
+
enumerable: true,
|
168
|
+
get: function get() {
|
169
|
+
return datePicker__namespace["default"];
|
170
|
+
}
|
171
|
+
});
|
172
|
+
Object.defineProperty(exports, 'Descriptions', {
|
173
|
+
enumerable: true,
|
174
|
+
get: function get() {
|
175
|
+
return descriptions__namespace["default"];
|
176
|
+
}
|
177
|
+
});
|
178
|
+
Object.defineProperty(exports, 'Drawer', {
|
179
|
+
enumerable: true,
|
180
|
+
get: function get() {
|
181
|
+
return drawer__namespace["default"];
|
182
|
+
}
|
183
|
+
});
|
184
|
+
Object.defineProperty(exports, 'Dropdown', {
|
185
|
+
enumerable: true,
|
186
|
+
get: function get() {
|
187
|
+
return dropdown__namespace["default"];
|
188
|
+
}
|
189
|
+
});
|
190
|
+
Object.defineProperty(exports, 'EllipsisTooltip', {
|
191
|
+
enumerable: true,
|
192
|
+
get: function get() {
|
193
|
+
return ellipsisTooltip__namespace["default"];
|
194
|
+
}
|
195
|
+
});
|
196
|
+
Object.defineProperty(exports, 'EmptyState', {
|
197
|
+
enumerable: true,
|
198
|
+
get: function get() {
|
199
|
+
return emptyState__namespace["default"];
|
200
|
+
}
|
201
|
+
});
|
202
|
+
Object.defineProperty(exports, 'Filter', {
|
203
|
+
enumerable: true,
|
204
|
+
get: function get() {
|
205
|
+
return filter__namespace["default"];
|
206
|
+
}
|
207
|
+
});
|
208
|
+
Object.defineProperty(exports, 'Form', {
|
209
|
+
enumerable: true,
|
210
|
+
get: function get() {
|
211
|
+
return form__namespace["default"];
|
212
|
+
}
|
213
|
+
});
|
214
|
+
Object.defineProperty(exports, 'Grid', {
|
215
|
+
enumerable: true,
|
216
|
+
get: function get() {
|
217
|
+
return grid__namespace["default"];
|
218
|
+
}
|
219
|
+
});
|
220
|
+
Object.defineProperty(exports, 'Highlighter', {
|
221
|
+
enumerable: true,
|
222
|
+
get: function get() {
|
223
|
+
return highlighter__namespace["default"];
|
224
|
+
}
|
225
|
+
});
|
226
|
+
Object.defineProperty(exports, 'Input', {
|
227
|
+
enumerable: true,
|
228
|
+
get: function get() {
|
229
|
+
return input__namespace["default"];
|
230
|
+
}
|
231
|
+
});
|
232
|
+
Object.defineProperty(exports, 'List', {
|
233
|
+
enumerable: true,
|
234
|
+
get: function get() {
|
235
|
+
return list__namespace["default"];
|
236
|
+
}
|
237
|
+
});
|
238
|
+
Object.defineProperty(exports, 'Loading', {
|
239
|
+
enumerable: true,
|
240
|
+
get: function get() {
|
241
|
+
return loading__namespace["default"];
|
242
|
+
}
|
243
|
+
});
|
106
244
|
exports.getLanguage = LocaleContext.getLanguage;
|
107
245
|
exports.useLocaleContext = LocaleContext.useLocaleContext;
|
108
246
|
exports.LocaleContext = LocaleProvider.LocaleProvider;
|
109
247
|
exports.LocaleProvider = LocaleProvider.LocaleProvider;
|
110
|
-
exports
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
exports
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
exports
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
exports
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
exports
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
exports
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
exports
|
147
|
-
|
248
|
+
Object.defineProperty(exports, 'Menu', {
|
249
|
+
enumerable: true,
|
250
|
+
get: function get() {
|
251
|
+
return menu__namespace["default"];
|
252
|
+
}
|
253
|
+
});
|
254
|
+
Object.defineProperty(exports, 'Message', {
|
255
|
+
enumerable: true,
|
256
|
+
get: function get() {
|
257
|
+
return message__namespace["default"];
|
258
|
+
}
|
259
|
+
});
|
260
|
+
Object.defineProperty(exports, 'Modal', {
|
261
|
+
enumerable: true,
|
262
|
+
get: function get() {
|
263
|
+
return modal__namespace["default"];
|
264
|
+
}
|
265
|
+
});
|
266
|
+
Object.defineProperty(exports, 'Notification', {
|
267
|
+
enumerable: true,
|
268
|
+
get: function get() {
|
269
|
+
return notification__namespace["default"];
|
270
|
+
}
|
271
|
+
});
|
272
|
+
Object.defineProperty(exports, 'NumberInput', {
|
273
|
+
enumerable: true,
|
274
|
+
get: function get() {
|
275
|
+
return numberInput__namespace["default"];
|
276
|
+
}
|
277
|
+
});
|
278
|
+
Object.defineProperty(exports, 'Pagination', {
|
279
|
+
enumerable: true,
|
280
|
+
get: function get() {
|
281
|
+
return pagination__namespace["default"];
|
282
|
+
}
|
283
|
+
});
|
284
|
+
Object.defineProperty(exports, 'PopConfirm', {
|
285
|
+
enumerable: true,
|
286
|
+
get: function get() {
|
287
|
+
return popConfirm__namespace["default"];
|
288
|
+
}
|
289
|
+
});
|
290
|
+
Object.defineProperty(exports, 'Popover', {
|
291
|
+
enumerable: true,
|
292
|
+
get: function get() {
|
293
|
+
return popover__namespace["default"];
|
294
|
+
}
|
295
|
+
});
|
296
|
+
Object.defineProperty(exports, 'Preview', {
|
297
|
+
enumerable: true,
|
298
|
+
get: function get() {
|
299
|
+
return preview__namespace["default"];
|
300
|
+
}
|
301
|
+
});
|
302
|
+
Object.defineProperty(exports, 'Progress', {
|
303
|
+
enumerable: true,
|
304
|
+
get: function get() {
|
305
|
+
return progress__namespace["default"];
|
306
|
+
}
|
307
|
+
});
|
308
|
+
Object.defineProperty(exports, 'Provider', {
|
309
|
+
enumerable: true,
|
310
|
+
get: function get() {
|
311
|
+
return provider__namespace["default"];
|
312
|
+
}
|
313
|
+
});
|
314
|
+
Object.defineProperty(exports, 'Radio', {
|
315
|
+
enumerable: true,
|
316
|
+
get: function get() {
|
317
|
+
return radio__namespace["default"];
|
318
|
+
}
|
319
|
+
});
|
320
|
+
Object.defineProperty(exports, 'Rating', {
|
321
|
+
enumerable: true,
|
322
|
+
get: function get() {
|
323
|
+
return rating__namespace["default"];
|
324
|
+
}
|
325
|
+
});
|
326
|
+
Object.defineProperty(exports, 'Result', {
|
327
|
+
enumerable: true,
|
328
|
+
get: function get() {
|
329
|
+
return result__namespace["default"];
|
330
|
+
}
|
331
|
+
});
|
332
|
+
Object.defineProperty(exports, 'Search', {
|
333
|
+
enumerable: true,
|
334
|
+
get: function get() {
|
335
|
+
return search__namespace["default"];
|
336
|
+
}
|
337
|
+
});
|
338
|
+
Object.defineProperty(exports, 'Select', {
|
339
|
+
enumerable: true,
|
340
|
+
get: function get() {
|
341
|
+
return select__namespace["default"];
|
342
|
+
}
|
343
|
+
});
|
344
|
+
Object.defineProperty(exports, 'Slider', {
|
345
|
+
enumerable: true,
|
346
|
+
get: function get() {
|
347
|
+
return slider__namespace["default"];
|
348
|
+
}
|
349
|
+
});
|
350
|
+
Object.defineProperty(exports, 'Space', {
|
351
|
+
enumerable: true,
|
352
|
+
get: function get() {
|
353
|
+
return space__namespace["default"];
|
354
|
+
}
|
355
|
+
});
|
356
|
+
Object.defineProperty(exports, 'Stepper', {
|
357
|
+
enumerable: true,
|
358
|
+
get: function get() {
|
359
|
+
return stepper__namespace["default"];
|
360
|
+
}
|
361
|
+
});
|
362
|
+
Object.defineProperty(exports, 'SvgIcon', {
|
363
|
+
enumerable: true,
|
364
|
+
get: function get() {
|
365
|
+
return svgIcon__namespace["default"];
|
366
|
+
}
|
367
|
+
});
|
368
|
+
Object.defineProperty(exports, 'Switch', {
|
369
|
+
enumerable: true,
|
370
|
+
get: function get() {
|
371
|
+
return _switch__namespace["default"];
|
372
|
+
}
|
373
|
+
});
|
374
|
+
Object.defineProperty(exports, 'Table', {
|
375
|
+
enumerable: true,
|
376
|
+
get: function get() {
|
377
|
+
return table__namespace["default"];
|
378
|
+
}
|
379
|
+
});
|
380
|
+
Object.defineProperty(exports, 'Tabs', {
|
381
|
+
enumerable: true,
|
382
|
+
get: function get() {
|
383
|
+
return tabs__namespace["default"];
|
384
|
+
}
|
385
|
+
});
|
386
|
+
Object.defineProperty(exports, 'Tag', {
|
387
|
+
enumerable: true,
|
388
|
+
get: function get() {
|
389
|
+
return tag__namespace["default"];
|
390
|
+
}
|
391
|
+
});
|
392
|
+
Object.defineProperty(exports, 'Textarea', {
|
393
|
+
enumerable: true,
|
394
|
+
get: function get() {
|
395
|
+
return textarea__namespace["default"];
|
396
|
+
}
|
397
|
+
});
|
398
|
+
Object.defineProperty(exports, 'TimePicker', {
|
399
|
+
enumerable: true,
|
400
|
+
get: function get() {
|
401
|
+
return timePicker__namespace["default"];
|
402
|
+
}
|
403
|
+
});
|
404
|
+
Object.defineProperty(exports, 'Timeline', {
|
405
|
+
enumerable: true,
|
406
|
+
get: function get() {
|
407
|
+
return timeline__namespace["default"];
|
408
|
+
}
|
409
|
+
});
|
410
|
+
Object.defineProperty(exports, 'Tooltip', {
|
411
|
+
enumerable: true,
|
412
|
+
get: function get() {
|
413
|
+
return tooltip__namespace["default"];
|
414
|
+
}
|
415
|
+
});
|
416
|
+
Object.defineProperty(exports, 'Transfer', {
|
417
|
+
enumerable: true,
|
418
|
+
get: function get() {
|
419
|
+
return transfer__namespace["default"];
|
420
|
+
}
|
421
|
+
});
|
422
|
+
Object.defineProperty(exports, 'Tree', {
|
423
|
+
enumerable: true,
|
424
|
+
get: function get() {
|
425
|
+
return tree__namespace["default"];
|
426
|
+
}
|
427
|
+
});
|
428
|
+
Object.defineProperty(exports, 'TreeSelect', {
|
429
|
+
enumerable: true,
|
430
|
+
get: function get() {
|
431
|
+
return treeSelect__namespace["default"];
|
432
|
+
}
|
433
|
+
});
|
434
|
+
Object.defineProperty(exports, 'Upload', {
|
435
|
+
enumerable: true,
|
436
|
+
get: function get() {
|
437
|
+
return upload__namespace["default"];
|
438
|
+
}
|
439
|
+
});
|
440
|
+
Object.defineProperty(exports, 'Watermark', {
|
441
|
+
enumerable: true,
|
442
|
+
get: function get() {
|
443
|
+
return watermark__namespace["default"];
|
444
|
+
}
|
445
|
+
});
|
446
|
+
Object.defineProperty(exports, 'ZenMode', {
|
447
|
+
enumerable: true,
|
448
|
+
get: function get() {
|
449
|
+
return zenMode__namespace["default"];
|
450
|
+
}
|
451
|
+
});
|
452
|
+
Object.defineProperty(exports, 'Scrollbar', {
|
453
|
+
enumerable: true,
|
454
|
+
get: function get() {
|
455
|
+
return scrollbar__namespace["default"];
|
456
|
+
}
|
457
|
+
});
|
458
|
+
Object.defineProperty(exports, 'InputGroup', {
|
459
|
+
enumerable: true,
|
460
|
+
get: function get() {
|
461
|
+
return inputGroup__namespace["default"];
|
462
|
+
}
|
463
|
+
});
|
464
|
+
Object.defineProperty(exports, 'Anchor', {
|
465
|
+
enumerable: true,
|
466
|
+
get: function get() {
|
467
|
+
return anchor__namespace["default"];
|
468
|
+
}
|
469
|
+
});
|
470
|
+
Object.defineProperty(exports, 'BackTop', {
|
471
|
+
enumerable: true,
|
472
|
+
get: function get() {
|
473
|
+
return backTop__namespace["default"];
|
474
|
+
}
|
475
|
+
});
|
148
476
|
Object.keys(alert).forEach(function (k) {
|
149
477
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
150
478
|
enumerable: true,
|
@@ -9,11 +9,22 @@
|
|
9
9
|
*/
|
10
10
|
'use strict';
|
11
11
|
|
12
|
+
var _typeof2 = require("@babel/runtime/helpers/typeof");
|
13
|
+
Object.defineProperty(exports, '__esModule', {
|
14
|
+
value: true
|
15
|
+
});
|
12
16
|
var _typeof = require('@babel/runtime/helpers/esm/typeof');
|
13
17
|
var React = require('react');
|
14
18
|
var index$1 = require('../../../../utils/env/lib/esm/index.js');
|
15
19
|
var LocaleContext = require('./LocaleContext.js');
|
16
20
|
var index = require('./locale/index.js');
|
21
|
+
function _interopDefaultCompat(e) {
|
22
|
+
return e && _typeof2(e) === 'object' && 'default' in e ? e : {
|
23
|
+
'default': e
|
24
|
+
};
|
25
|
+
}
|
26
|
+
var _typeof__default = /*#__PURE__*/_interopDefaultCompat(_typeof);
|
27
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
17
28
|
var DEFAULT_LOCALE = 'zh-CN';
|
18
29
|
// 自定义语言包注册表
|
19
30
|
var USER_LANGUAGES_TABLES = {};
|
@@ -23,7 +34,7 @@ var LocaleProvider = function LocaleProvider(_ref) {
|
|
23
34
|
locale = _ref$locale === void 0 ? DEFAULT_LOCALE : _ref$locale,
|
24
35
|
languages = _ref.languages;
|
25
36
|
var get = React.useMemo(function () {
|
26
|
-
var languageData =
|
37
|
+
var languageData = _typeof__default["default"](languages) === 'object' ? languages : USER_LANGUAGES_TABLES[locale] || index["default"][locale];
|
27
38
|
if (!languageData) {
|
28
39
|
index$1.invariant(false, "Will use " + DEFAULT_LOCALE + " as default locale because of the " + locale + " language package is missing.");
|
29
40
|
languageData = index["default"][DEFAULT_LOCALE];
|
@@ -36,7 +47,7 @@ var LocaleProvider = function LocaleProvider(_ref) {
|
|
36
47
|
locale: locale
|
37
48
|
});
|
38
49
|
}, [locale, get]);
|
39
|
-
return /*#__PURE__*/
|
50
|
+
return /*#__PURE__*/React__default["default"].createElement(LocaleContext.LocaleContext.Provider, {
|
40
51
|
value: providedValue
|
41
52
|
}, children);
|
42
53
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@hi-ui/hiui",
|
3
|
-
"version": "4.4.
|
3
|
+
"version": "4.4.1",
|
4
4
|
"description": "The root-package for @hi-ui/hiui.",
|
5
5
|
"keywords": [],
|
6
6
|
"author": "HiUI <mi-hiui@xiaomi.com>",
|
@@ -43,82 +43,82 @@
|
|
43
43
|
"url": "https://github.com/XiaoMi/hiui/issues"
|
44
44
|
},
|
45
45
|
"dependencies": {
|
46
|
-
"@hi-ui/alert": "^4.1.
|
47
|
-
"@hi-ui/anchor": "^4.0.
|
48
|
-
"@hi-ui/avatar": "^4.0.
|
49
|
-
"@hi-ui/back-top": "^4.0.
|
50
|
-
"@hi-ui/badge": "^4.0.
|
51
|
-
"@hi-ui/breadcrumb": "^4.0.
|
52
|
-
"@hi-ui/button": "^4.0.
|
53
|
-
"@hi-ui/card": "^4.0.
|
54
|
-
"@hi-ui/carousel": "^4.0.
|
55
|
-
"@hi-ui/cascader": "^4.1.
|
56
|
-
"@hi-ui/check-cascader": "^4.2.
|
57
|
-
"@hi-ui/check-select": "^4.3.
|
58
|
-
"@hi-ui/check-tree-select": "^4.3.
|
59
|
-
"@hi-ui/checkbox": "^4.0.
|
60
|
-
"@hi-ui/collapse": "^4.1.
|
61
|
-
"@hi-ui/counter": "^4.1.
|
62
|
-
"@hi-ui/date-picker": "^4.4.
|
63
|
-
"@hi-ui/descriptions": "^4.2.
|
64
|
-
"@hi-ui/drawer": "^4.1.
|
65
|
-
"@hi-ui/dropdown": "^4.1.
|
66
|
-
"@hi-ui/ellipsis-tooltip": "^4.1.
|
67
|
-
"@hi-ui/empty-state": "^4.0.
|
68
|
-
"@hi-ui/filter": "^4.1.
|
69
|
-
"@hi-ui/form": "^4.1.
|
70
|
-
"@hi-ui/grid": "^4.0.
|
71
|
-
"@hi-ui/highlighter": "^4.0.
|
72
|
-
"@hi-ui/input": "^4.0.
|
73
|
-
"@hi-ui/input-group": "^4.0.
|
74
|
-
"@hi-ui/list": "^4.0.
|
75
|
-
"@hi-ui/loading": "^4.1.
|
76
|
-
"@hi-ui/menu": "^4.1.
|
77
|
-
"@hi-ui/message": "^4.0.
|
78
|
-
"@hi-ui/modal": "^4.0.
|
79
|
-
"@hi-ui/notification": "^4.1.
|
80
|
-
"@hi-ui/number-input": "^4.1.
|
81
|
-
"@hi-ui/pagination": "^4.0.
|
82
|
-
"@hi-ui/picker": "^4.1.
|
83
|
-
"@hi-ui/pop-confirm": "^4.2.
|
84
|
-
"@hi-ui/popover": "^4.0.
|
85
|
-
"@hi-ui/preview": "^4.0.
|
86
|
-
"@hi-ui/progress": "^4.0.
|
87
|
-
"@hi-ui/provider": "^4.0.
|
88
|
-
"@hi-ui/radio": "^4.1.
|
89
|
-
"@hi-ui/rating": "^4.0.
|
90
|
-
"@hi-ui/result": "^4.0.
|
91
|
-
"@hi-ui/scrollbar": "^4.0.
|
92
|
-
"@hi-ui/search": "^4.0.
|
93
|
-
"@hi-ui/select": "^4.2.
|
94
|
-
"@hi-ui/slider": "^4.0.
|
95
|
-
"@hi-ui/space": "^4.0.
|
96
|
-
"@hi-ui/spinner": "^4.0.
|
97
|
-
"@hi-ui/stepper": "^4.0.
|
98
|
-
"@hi-ui/svg-icon": "^4.0.
|
99
|
-
"@hi-ui/switch": "^4.0.
|
100
|
-
"@hi-ui/table": "^4.3.
|
101
|
-
"@hi-ui/tabs": "^4.1.
|
102
|
-
"@hi-ui/tag": "^4.1.
|
103
|
-
"@hi-ui/textarea": "^4.1.
|
104
|
-
"@hi-ui/time-picker": "^4.0.
|
105
|
-
"@hi-ui/timeline": "^4.0.
|
106
|
-
"@hi-ui/tooltip": "^4.0.
|
107
|
-
"@hi-ui/transfer": "^4.0.
|
108
|
-
"@hi-ui/tree": "^4.5.
|
109
|
-
"@hi-ui/tree-select": "^4.1.
|
110
|
-
"@hi-ui/upload": "^4.1.
|
111
|
-
"@hi-ui/watermark": "^4.0.
|
112
|
-
"@hi-ui/zen-mode": "^4.0.
|
46
|
+
"@hi-ui/alert": "^4.1.2",
|
47
|
+
"@hi-ui/anchor": "^4.0.7",
|
48
|
+
"@hi-ui/avatar": "^4.0.6",
|
49
|
+
"@hi-ui/back-top": "^4.0.6",
|
50
|
+
"@hi-ui/badge": "^4.0.8",
|
51
|
+
"@hi-ui/breadcrumb": "^4.0.6",
|
52
|
+
"@hi-ui/button": "^4.0.8",
|
53
|
+
"@hi-ui/card": "^4.0.7",
|
54
|
+
"@hi-ui/carousel": "^4.0.6",
|
55
|
+
"@hi-ui/cascader": "^4.1.4",
|
56
|
+
"@hi-ui/check-cascader": "^4.2.4",
|
57
|
+
"@hi-ui/check-select": "^4.3.4",
|
58
|
+
"@hi-ui/check-tree-select": "^4.3.2",
|
59
|
+
"@hi-ui/checkbox": "^4.0.7",
|
60
|
+
"@hi-ui/collapse": "^4.1.4",
|
61
|
+
"@hi-ui/counter": "^4.1.7",
|
62
|
+
"@hi-ui/date-picker": "^4.4.3",
|
63
|
+
"@hi-ui/descriptions": "^4.2.3",
|
64
|
+
"@hi-ui/drawer": "^4.1.2",
|
65
|
+
"@hi-ui/dropdown": "^4.1.3",
|
66
|
+
"@hi-ui/ellipsis-tooltip": "^4.1.4",
|
67
|
+
"@hi-ui/empty-state": "^4.0.6",
|
68
|
+
"@hi-ui/filter": "^4.1.3",
|
69
|
+
"@hi-ui/form": "^4.1.4",
|
70
|
+
"@hi-ui/grid": "^4.0.7",
|
71
|
+
"@hi-ui/highlighter": "^4.0.7",
|
72
|
+
"@hi-ui/input": "^4.0.12",
|
73
|
+
"@hi-ui/input-group": "^4.0.5",
|
74
|
+
"@hi-ui/list": "^4.0.11",
|
75
|
+
"@hi-ui/loading": "^4.1.2",
|
76
|
+
"@hi-ui/menu": "^4.1.5",
|
77
|
+
"@hi-ui/message": "^4.0.6",
|
78
|
+
"@hi-ui/modal": "^4.0.14",
|
79
|
+
"@hi-ui/notification": "^4.1.2",
|
80
|
+
"@hi-ui/number-input": "^4.1.6",
|
81
|
+
"@hi-ui/pagination": "^4.0.13",
|
82
|
+
"@hi-ui/picker": "^4.1.3",
|
83
|
+
"@hi-ui/pop-confirm": "^4.2.2",
|
84
|
+
"@hi-ui/popover": "^4.0.7",
|
85
|
+
"@hi-ui/preview": "^4.0.7",
|
86
|
+
"@hi-ui/progress": "^4.0.8",
|
87
|
+
"@hi-ui/provider": "^4.0.7",
|
88
|
+
"@hi-ui/radio": "^4.1.2",
|
89
|
+
"@hi-ui/rating": "^4.0.7",
|
90
|
+
"@hi-ui/result": "^4.0.6",
|
91
|
+
"@hi-ui/scrollbar": "^4.0.5",
|
92
|
+
"@hi-ui/search": "^4.0.10",
|
93
|
+
"@hi-ui/select": "^4.2.4",
|
94
|
+
"@hi-ui/slider": "^4.0.9",
|
95
|
+
"@hi-ui/space": "^4.0.8",
|
96
|
+
"@hi-ui/spinner": "^4.0.7",
|
97
|
+
"@hi-ui/stepper": "^4.0.6",
|
98
|
+
"@hi-ui/svg-icon": "^4.0.6",
|
99
|
+
"@hi-ui/switch": "^4.0.9",
|
100
|
+
"@hi-ui/table": "^4.3.3",
|
101
|
+
"@hi-ui/tabs": "^4.1.3",
|
102
|
+
"@hi-ui/tag": "^4.1.2",
|
103
|
+
"@hi-ui/textarea": "^4.1.5",
|
104
|
+
"@hi-ui/time-picker": "^4.0.12",
|
105
|
+
"@hi-ui/timeline": "^4.0.6",
|
106
|
+
"@hi-ui/tooltip": "^4.0.9",
|
107
|
+
"@hi-ui/transfer": "^4.0.12",
|
108
|
+
"@hi-ui/tree": "^4.5.7",
|
109
|
+
"@hi-ui/tree-select": "^4.1.2",
|
110
|
+
"@hi-ui/upload": "^4.1.8",
|
111
|
+
"@hi-ui/watermark": "^4.0.6",
|
112
|
+
"@hi-ui/zen-mode": "^4.0.6"
|
113
113
|
},
|
114
114
|
"peerDependencies": {
|
115
|
-
"@hi-ui/core": ">=4.0.
|
115
|
+
"@hi-ui/core": ">=4.0.7",
|
116
116
|
"react": ">=16.8.6",
|
117
117
|
"react-dom": ">=16.8.6"
|
118
118
|
},
|
119
119
|
"devDependencies": {
|
120
|
-
"@hi-ui/core": "^4.0.
|
121
|
-
"@hi-ui/core-css": "^4.1.
|
120
|
+
"@hi-ui/core": "^4.0.7",
|
121
|
+
"@hi-ui/core-css": "^4.1.4",
|
122
122
|
"react": "^17.0.1",
|
123
123
|
"react-dom": "^17.0.1"
|
124
124
|
}
|