@hero-design/rn 8.61.1 → 8.61.2
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +9 -0
- package/es/index.js +773 -752
- package/lib/index.js +235 -214
- package/package.json +6 -5
- package/src/components/Calendar/StyledCalendar.tsx +2 -2
- package/src/components/Carousel/CardCarousel.tsx +2 -2
- package/src/components/Carousel/CarouselItem.tsx +3 -3
- package/src/components/Carousel/StyledCarousel.tsx +7 -7
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +10 -10
- package/src/components/TextInput/__tests__/index.spec.tsx +1 -6
- package/tsconfig.json +12 -4
- package/types/components/Carousel/StyledCarousel.d.ts +3 -3
package/lib/index.js
CHANGED
|
@@ -36,6 +36,7 @@ function _interopNamespace(e) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
var reactNative__namespace = /*#__PURE__*/_interopNamespace(reactNative);
|
|
39
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
39
40
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
40
41
|
var DateTimePicker__default = /*#__PURE__*/_interopDefaultLegacy(DateTimePicker);
|
|
41
42
|
var RnSlider__default = /*#__PURE__*/_interopDefaultLegacy(RnSlider);
|
|
@@ -3870,6 +3871,7 @@ var RULESET = 'rule';
|
|
|
3870
3871
|
var DECLARATION = 'decl';
|
|
3871
3872
|
var IMPORT = '@import';
|
|
3872
3873
|
var KEYFRAMES = '@keyframes';
|
|
3874
|
+
var LAYER = '@layer';
|
|
3873
3875
|
|
|
3874
3876
|
/**
|
|
3875
3877
|
* @param {number}
|
|
@@ -3895,7 +3897,7 @@ var assign = Object.assign;
|
|
|
3895
3897
|
* @return {number}
|
|
3896
3898
|
*/
|
|
3897
3899
|
function hash(value, length) {
|
|
3898
|
-
return (((length << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3);
|
|
3900
|
+
return charat(value, 0) ^ 45 ? (((length << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
|
|
3899
3901
|
}
|
|
3900
3902
|
|
|
3901
3903
|
/**
|
|
@@ -4249,7 +4251,7 @@ function parse$2(value, root, parent, rule, rules, rulesets, pseudo, points, dec
|
|
|
4249
4251
|
while (scanning) switch (previous = character, character = next()) {
|
|
4250
4252
|
// (
|
|
4251
4253
|
case 40:
|
|
4252
|
-
if (previous != 108 && characters
|
|
4254
|
+
if (previous != 108 && charat(characters, length - 1) == 58) {
|
|
4253
4255
|
if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f') != -1) ampersand = -1;
|
|
4254
4256
|
break;
|
|
4255
4257
|
}
|
|
@@ -4295,6 +4297,7 @@ function parse$2(value, root, parent, rule, rules, rulesets, pseudo, points, dec
|
|
|
4295
4297
|
scanning = 0;
|
|
4296
4298
|
// ;
|
|
4297
4299
|
case 59 + offset:
|
|
4300
|
+
if (ampersand == -1) characters = replace(characters, /\f/g, '');
|
|
4298
4301
|
if (property > 0 && strlen(characters) - length) append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations);
|
|
4299
4302
|
break;
|
|
4300
4303
|
// @ ;
|
|
@@ -4303,9 +4306,10 @@ function parse$2(value, root, parent, rule, rules, rulesets, pseudo, points, dec
|
|
|
4303
4306
|
// { rule/at-rule
|
|
4304
4307
|
default:
|
|
4305
4308
|
append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets);
|
|
4306
|
-
if (character === 123) if (offset === 0) parse$2(characters, root, reference, reference, props, rulesets, length, points, children);else switch (atrule) {
|
|
4307
|
-
// d m s
|
|
4309
|
+
if (character === 123) if (offset === 0) parse$2(characters, root, reference, reference, props, rulesets, length, points, children);else switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
|
|
4310
|
+
// d l m s
|
|
4308
4311
|
case 100:
|
|
4312
|
+
case 108:
|
|
4309
4313
|
case 109:
|
|
4310
4314
|
case 115:
|
|
4311
4315
|
parse$2(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children);
|
|
@@ -4387,157 +4391,6 @@ function declaration(value, root, parent, length) {
|
|
|
4387
4391
|
return node$1(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length);
|
|
4388
4392
|
}
|
|
4389
4393
|
|
|
4390
|
-
/**
|
|
4391
|
-
* @param {string} value
|
|
4392
|
-
* @param {number} length
|
|
4393
|
-
* @return {string}
|
|
4394
|
-
*/
|
|
4395
|
-
function prefix(value, length) {
|
|
4396
|
-
switch (hash(value, length)) {
|
|
4397
|
-
// color-adjust
|
|
4398
|
-
case 5103:
|
|
4399
|
-
return WEBKIT + 'print-' + value + value;
|
|
4400
|
-
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
4401
|
-
case 5737:
|
|
4402
|
-
case 4201:
|
|
4403
|
-
case 3177:
|
|
4404
|
-
case 3433:
|
|
4405
|
-
case 1641:
|
|
4406
|
-
case 4457:
|
|
4407
|
-
case 2921:
|
|
4408
|
-
// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
4409
|
-
case 5572:
|
|
4410
|
-
case 6356:
|
|
4411
|
-
case 5844:
|
|
4412
|
-
case 3191:
|
|
4413
|
-
case 6645:
|
|
4414
|
-
case 3005:
|
|
4415
|
-
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
4416
|
-
case 6391:
|
|
4417
|
-
case 5879:
|
|
4418
|
-
case 5623:
|
|
4419
|
-
case 6135:
|
|
4420
|
-
case 4599:
|
|
4421
|
-
case 4855:
|
|
4422
|
-
// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
4423
|
-
case 4215:
|
|
4424
|
-
case 6389:
|
|
4425
|
-
case 5109:
|
|
4426
|
-
case 5365:
|
|
4427
|
-
case 5621:
|
|
4428
|
-
case 3829:
|
|
4429
|
-
return WEBKIT + value + value;
|
|
4430
|
-
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
4431
|
-
case 5349:
|
|
4432
|
-
case 4246:
|
|
4433
|
-
case 4810:
|
|
4434
|
-
case 6968:
|
|
4435
|
-
case 2756:
|
|
4436
|
-
return WEBKIT + value + MOZ + value + MS + value + value;
|
|
4437
|
-
// flex, flex-direction
|
|
4438
|
-
case 6828:
|
|
4439
|
-
case 4268:
|
|
4440
|
-
return WEBKIT + value + MS + value + value;
|
|
4441
|
-
// order
|
|
4442
|
-
case 6165:
|
|
4443
|
-
return WEBKIT + value + MS + 'flex-' + value + value;
|
|
4444
|
-
// align-items
|
|
4445
|
-
case 5187:
|
|
4446
|
-
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;
|
|
4447
|
-
// align-self
|
|
4448
|
-
case 5443:
|
|
4449
|
-
return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;
|
|
4450
|
-
// align-content
|
|
4451
|
-
case 4675:
|
|
4452
|
-
return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;
|
|
4453
|
-
// flex-shrink
|
|
4454
|
-
case 5548:
|
|
4455
|
-
return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;
|
|
4456
|
-
// flex-basis
|
|
4457
|
-
case 5292:
|
|
4458
|
-
return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;
|
|
4459
|
-
// flex-grow
|
|
4460
|
-
case 6060:
|
|
4461
|
-
return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;
|
|
4462
|
-
// transition
|
|
4463
|
-
case 4554:
|
|
4464
|
-
return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;
|
|
4465
|
-
// cursor
|
|
4466
|
-
case 6187:
|
|
4467
|
-
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;
|
|
4468
|
-
// background, background-image
|
|
4469
|
-
case 5495:
|
|
4470
|
-
case 3959:
|
|
4471
|
-
return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1');
|
|
4472
|
-
// justify-content
|
|
4473
|
-
case 4968:
|
|
4474
|
-
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;
|
|
4475
|
-
// (margin|padding)-inline-(start|end)
|
|
4476
|
-
case 4095:
|
|
4477
|
-
case 3583:
|
|
4478
|
-
case 4068:
|
|
4479
|
-
case 2532:
|
|
4480
|
-
return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;
|
|
4481
|
-
// (min|max)?(width|height|inline-size|block-size)
|
|
4482
|
-
case 8116:
|
|
4483
|
-
case 7059:
|
|
4484
|
-
case 5753:
|
|
4485
|
-
case 5535:
|
|
4486
|
-
case 5445:
|
|
4487
|
-
case 5701:
|
|
4488
|
-
case 4933:
|
|
4489
|
-
case 4677:
|
|
4490
|
-
case 5533:
|
|
4491
|
-
case 5789:
|
|
4492
|
-
case 5021:
|
|
4493
|
-
case 4765:
|
|
4494
|
-
// stretch, max-content, min-content, fill-available
|
|
4495
|
-
if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {
|
|
4496
|
-
// (m)ax-content, (m)in-content
|
|
4497
|
-
case 109:
|
|
4498
|
-
// -
|
|
4499
|
-
if (charat(value, length + 4) !== 45) break;
|
|
4500
|
-
// (f)ill-available, (f)it-content
|
|
4501
|
-
case 102:
|
|
4502
|
-
return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
|
|
4503
|
-
// (s)tretch
|
|
4504
|
-
case 115:
|
|
4505
|
-
return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;
|
|
4506
|
-
}
|
|
4507
|
-
break;
|
|
4508
|
-
// position: sticky
|
|
4509
|
-
case 4949:
|
|
4510
|
-
// (s)ticky?
|
|
4511
|
-
if (charat(value, length + 1) !== 115) break;
|
|
4512
|
-
// display: (flex|inline-flex)
|
|
4513
|
-
case 6444:
|
|
4514
|
-
switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {
|
|
4515
|
-
// stic(k)y
|
|
4516
|
-
case 107:
|
|
4517
|
-
return replace(value, ':', ':' + WEBKIT) + value;
|
|
4518
|
-
// (inline-)?fl(e)x
|
|
4519
|
-
case 101:
|
|
4520
|
-
return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;
|
|
4521
|
-
}
|
|
4522
|
-
break;
|
|
4523
|
-
// writing-mode
|
|
4524
|
-
case 5936:
|
|
4525
|
-
switch (charat(value, length + 11)) {
|
|
4526
|
-
// vertical-l(r)
|
|
4527
|
-
case 114:
|
|
4528
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
|
|
4529
|
-
// vertical-r(l)
|
|
4530
|
-
case 108:
|
|
4531
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
|
|
4532
|
-
// horizontal(-)tb
|
|
4533
|
-
case 45:
|
|
4534
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
|
|
4535
|
-
}
|
|
4536
|
-
return WEBKIT + value + MS + value + value;
|
|
4537
|
-
}
|
|
4538
|
-
return value;
|
|
4539
|
-
}
|
|
4540
|
-
|
|
4541
4394
|
/**
|
|
4542
4395
|
* @param {object[]} children
|
|
4543
4396
|
* @param {function} callback
|
|
@@ -4559,6 +4412,8 @@ function serialize(children, callback) {
|
|
|
4559
4412
|
*/
|
|
4560
4413
|
function stringify$2(element, index, children, callback) {
|
|
4561
4414
|
switch (element.type) {
|
|
4415
|
+
case LAYER:
|
|
4416
|
+
if (element.children.length) break;
|
|
4562
4417
|
case IMPORT:
|
|
4563
4418
|
case DECLARATION:
|
|
4564
4419
|
return element["return"] = element["return"] || element.value;
|
|
@@ -4595,45 +4450,6 @@ function rulesheet(callback) {
|
|
|
4595
4450
|
};
|
|
4596
4451
|
}
|
|
4597
4452
|
|
|
4598
|
-
/**
|
|
4599
|
-
* @param {object} element
|
|
4600
|
-
* @param {number} index
|
|
4601
|
-
* @param {object[]} children
|
|
4602
|
-
* @param {function} callback
|
|
4603
|
-
*/
|
|
4604
|
-
function prefixer(element, index, children, callback) {
|
|
4605
|
-
if (element.length > -1) if (!element["return"]) switch (element.type) {
|
|
4606
|
-
case DECLARATION:
|
|
4607
|
-
element["return"] = prefix(element.value, element.length);
|
|
4608
|
-
break;
|
|
4609
|
-
case KEYFRAMES:
|
|
4610
|
-
return serialize([copy(element, {
|
|
4611
|
-
value: replace(element.value, '@', '@' + WEBKIT)
|
|
4612
|
-
})], callback);
|
|
4613
|
-
case RULESET:
|
|
4614
|
-
if (element.length) return combine(element.props, function (value) {
|
|
4615
|
-
switch (match$2(value, /(::plac\w+|:read-\w+)/)) {
|
|
4616
|
-
// :read-(only|write)
|
|
4617
|
-
case ':read-only':
|
|
4618
|
-
case ':read-write':
|
|
4619
|
-
return serialize([copy(element, {
|
|
4620
|
-
props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
|
|
4621
|
-
})], callback);
|
|
4622
|
-
// :placeholder
|
|
4623
|
-
case '::placeholder':
|
|
4624
|
-
return serialize([copy(element, {
|
|
4625
|
-
props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
|
|
4626
|
-
}), copy(element, {
|
|
4627
|
-
props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
|
|
4628
|
-
}), copy(element, {
|
|
4629
|
-
props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]
|
|
4630
|
-
})], callback);
|
|
4631
|
-
}
|
|
4632
|
-
return '';
|
|
4633
|
-
});
|
|
4634
|
-
}
|
|
4635
|
-
}
|
|
4636
|
-
|
|
4637
4453
|
var weakMemoize = function weakMemoize(func) {
|
|
4638
4454
|
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
|
|
4639
4455
|
var cache = new WeakMap();
|
|
@@ -4755,6 +4571,211 @@ var removeLabel = function removeLabel(element) {
|
|
|
4755
4571
|
}
|
|
4756
4572
|
}
|
|
4757
4573
|
};
|
|
4574
|
+
|
|
4575
|
+
/* eslint-disable no-fallthrough */
|
|
4576
|
+
|
|
4577
|
+
function prefix(value, length) {
|
|
4578
|
+
switch (hash(value, length)) {
|
|
4579
|
+
// color-adjust
|
|
4580
|
+
case 5103:
|
|
4581
|
+
return WEBKIT + 'print-' + value + value;
|
|
4582
|
+
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
4583
|
+
|
|
4584
|
+
case 5737:
|
|
4585
|
+
case 4201:
|
|
4586
|
+
case 3177:
|
|
4587
|
+
case 3433:
|
|
4588
|
+
case 1641:
|
|
4589
|
+
case 4457:
|
|
4590
|
+
case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
4591
|
+
|
|
4592
|
+
case 5572:
|
|
4593
|
+
case 6356:
|
|
4594
|
+
case 5844:
|
|
4595
|
+
case 3191:
|
|
4596
|
+
case 6645:
|
|
4597
|
+
case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
4598
|
+
|
|
4599
|
+
case 6391:
|
|
4600
|
+
case 5879:
|
|
4601
|
+
case 5623:
|
|
4602
|
+
case 6135:
|
|
4603
|
+
case 4599:
|
|
4604
|
+
case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
4605
|
+
|
|
4606
|
+
case 4215:
|
|
4607
|
+
case 6389:
|
|
4608
|
+
case 5109:
|
|
4609
|
+
case 5365:
|
|
4610
|
+
case 5621:
|
|
4611
|
+
case 3829:
|
|
4612
|
+
return WEBKIT + value + value;
|
|
4613
|
+
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
4614
|
+
|
|
4615
|
+
case 5349:
|
|
4616
|
+
case 4246:
|
|
4617
|
+
case 4810:
|
|
4618
|
+
case 6968:
|
|
4619
|
+
case 2756:
|
|
4620
|
+
return WEBKIT + value + MOZ + value + MS + value + value;
|
|
4621
|
+
// flex, flex-direction
|
|
4622
|
+
|
|
4623
|
+
case 6828:
|
|
4624
|
+
case 4268:
|
|
4625
|
+
return WEBKIT + value + MS + value + value;
|
|
4626
|
+
// order
|
|
4627
|
+
|
|
4628
|
+
case 6165:
|
|
4629
|
+
return WEBKIT + value + MS + 'flex-' + value + value;
|
|
4630
|
+
// align-items
|
|
4631
|
+
|
|
4632
|
+
case 5187:
|
|
4633
|
+
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;
|
|
4634
|
+
// align-self
|
|
4635
|
+
|
|
4636
|
+
case 5443:
|
|
4637
|
+
return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;
|
|
4638
|
+
// align-content
|
|
4639
|
+
|
|
4640
|
+
case 4675:
|
|
4641
|
+
return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;
|
|
4642
|
+
// flex-shrink
|
|
4643
|
+
|
|
4644
|
+
case 5548:
|
|
4645
|
+
return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;
|
|
4646
|
+
// flex-basis
|
|
4647
|
+
|
|
4648
|
+
case 5292:
|
|
4649
|
+
return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;
|
|
4650
|
+
// flex-grow
|
|
4651
|
+
|
|
4652
|
+
case 6060:
|
|
4653
|
+
return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;
|
|
4654
|
+
// transition
|
|
4655
|
+
|
|
4656
|
+
case 4554:
|
|
4657
|
+
return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;
|
|
4658
|
+
// cursor
|
|
4659
|
+
|
|
4660
|
+
case 6187:
|
|
4661
|
+
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;
|
|
4662
|
+
// background, background-image
|
|
4663
|
+
|
|
4664
|
+
case 5495:
|
|
4665
|
+
case 3959:
|
|
4666
|
+
return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1');
|
|
4667
|
+
// justify-content
|
|
4668
|
+
|
|
4669
|
+
case 4968:
|
|
4670
|
+
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;
|
|
4671
|
+
// (margin|padding)-inline-(start|end)
|
|
4672
|
+
|
|
4673
|
+
case 4095:
|
|
4674
|
+
case 3583:
|
|
4675
|
+
case 4068:
|
|
4676
|
+
case 2532:
|
|
4677
|
+
return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;
|
|
4678
|
+
// (min|max)?(width|height|inline-size|block-size)
|
|
4679
|
+
|
|
4680
|
+
case 8116:
|
|
4681
|
+
case 7059:
|
|
4682
|
+
case 5753:
|
|
4683
|
+
case 5535:
|
|
4684
|
+
case 5445:
|
|
4685
|
+
case 5701:
|
|
4686
|
+
case 4933:
|
|
4687
|
+
case 4677:
|
|
4688
|
+
case 5533:
|
|
4689
|
+
case 5789:
|
|
4690
|
+
case 5021:
|
|
4691
|
+
case 4765:
|
|
4692
|
+
// stretch, max-content, min-content, fill-available
|
|
4693
|
+
if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {
|
|
4694
|
+
// (m)ax-content, (m)in-content
|
|
4695
|
+
case 109:
|
|
4696
|
+
// -
|
|
4697
|
+
if (charat(value, length + 4) !== 45) break;
|
|
4698
|
+
// (f)ill-available, (f)it-content
|
|
4699
|
+
|
|
4700
|
+
case 102:
|
|
4701
|
+
return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
|
|
4702
|
+
// (s)tretch
|
|
4703
|
+
|
|
4704
|
+
case 115:
|
|
4705
|
+
return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;
|
|
4706
|
+
}
|
|
4707
|
+
break;
|
|
4708
|
+
// position: sticky
|
|
4709
|
+
|
|
4710
|
+
case 4949:
|
|
4711
|
+
// (s)ticky?
|
|
4712
|
+
if (charat(value, length + 1) !== 115) break;
|
|
4713
|
+
// display: (flex|inline-flex)
|
|
4714
|
+
|
|
4715
|
+
case 6444:
|
|
4716
|
+
switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {
|
|
4717
|
+
// stic(k)y
|
|
4718
|
+
case 107:
|
|
4719
|
+
return replace(value, ':', ':' + WEBKIT) + value;
|
|
4720
|
+
// (inline-)?fl(e)x
|
|
4721
|
+
|
|
4722
|
+
case 101:
|
|
4723
|
+
return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;
|
|
4724
|
+
}
|
|
4725
|
+
break;
|
|
4726
|
+
// writing-mode
|
|
4727
|
+
|
|
4728
|
+
case 5936:
|
|
4729
|
+
switch (charat(value, length + 11)) {
|
|
4730
|
+
// vertical-l(r)
|
|
4731
|
+
case 114:
|
|
4732
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
|
|
4733
|
+
// vertical-r(l)
|
|
4734
|
+
|
|
4735
|
+
case 108:
|
|
4736
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
|
|
4737
|
+
// horizontal(-)tb
|
|
4738
|
+
|
|
4739
|
+
case 45:
|
|
4740
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
|
|
4741
|
+
}
|
|
4742
|
+
return WEBKIT + value + MS + value + value;
|
|
4743
|
+
}
|
|
4744
|
+
return value;
|
|
4745
|
+
}
|
|
4746
|
+
var prefixer = function prefixer(element, index, children, callback) {
|
|
4747
|
+
if (element.length > -1) if (!element["return"]) switch (element.type) {
|
|
4748
|
+
case DECLARATION:
|
|
4749
|
+
element["return"] = prefix(element.value, element.length);
|
|
4750
|
+
break;
|
|
4751
|
+
case KEYFRAMES:
|
|
4752
|
+
return serialize([copy(element, {
|
|
4753
|
+
value: replace(element.value, '@', '@' + WEBKIT)
|
|
4754
|
+
})], callback);
|
|
4755
|
+
case RULESET:
|
|
4756
|
+
if (element.length) return combine(element.props, function (value) {
|
|
4757
|
+
switch (match$2(value, /(::plac\w+|:read-\w+)/)) {
|
|
4758
|
+
// :read-(only|write)
|
|
4759
|
+
case ':read-only':
|
|
4760
|
+
case ':read-write':
|
|
4761
|
+
return serialize([copy(element, {
|
|
4762
|
+
props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
|
|
4763
|
+
})], callback);
|
|
4764
|
+
// :placeholder
|
|
4765
|
+
|
|
4766
|
+
case '::placeholder':
|
|
4767
|
+
return serialize([copy(element, {
|
|
4768
|
+
props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
|
|
4769
|
+
}), copy(element, {
|
|
4770
|
+
props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
|
|
4771
|
+
}), copy(element, {
|
|
4772
|
+
props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]
|
|
4773
|
+
})], callback);
|
|
4774
|
+
}
|
|
4775
|
+
return '';
|
|
4776
|
+
});
|
|
4777
|
+
}
|
|
4778
|
+
};
|
|
4758
4779
|
var defaultStylisPlugins = [prefixer];
|
|
4759
4780
|
var createCache = function createCache(options) {
|
|
4760
4781
|
var key = options.key;
|
|
@@ -4850,7 +4871,7 @@ function _extends() {
|
|
|
4850
4871
|
return _extends.apply(this, arguments);
|
|
4851
4872
|
}
|
|
4852
4873
|
|
|
4853
|
-
var EmotionCacheContext = /* #__PURE__ */
|
|
4874
|
+
var EmotionCacheContext = /* #__PURE__ */React__namespace.createContext(
|
|
4854
4875
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
4855
4876
|
// because this module is primarily intended for the browser and node
|
|
4856
4877
|
// but it's also required in react native and similar environments sometimes
|
|
@@ -4861,9 +4882,9 @@ typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
|
|
|
4861
4882
|
key: 'css'
|
|
4862
4883
|
}) : null);
|
|
4863
4884
|
EmotionCacheContext.Provider;
|
|
4864
|
-
var ThemeContext = /* #__PURE__ */
|
|
4885
|
+
var ThemeContext = /* #__PURE__ */React__namespace.createContext({});
|
|
4865
4886
|
var useTheme$1 = function useTheme() {
|
|
4866
|
-
return
|
|
4887
|
+
return React__namespace.useContext(ThemeContext);
|
|
4867
4888
|
};
|
|
4868
4889
|
var getTheme = function getTheme(outerTheme, theme) {
|
|
4869
4890
|
if (typeof theme === 'function') {
|
|
@@ -4878,11 +4899,11 @@ var createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {
|
|
|
4878
4899
|
});
|
|
4879
4900
|
});
|
|
4880
4901
|
var ThemeProvider$1 = function ThemeProvider(props) {
|
|
4881
|
-
var theme =
|
|
4902
|
+
var theme = React__namespace.useContext(ThemeContext);
|
|
4882
4903
|
if (props.theme !== theme) {
|
|
4883
4904
|
theme = createCacheWithTheme(theme)(props.theme);
|
|
4884
4905
|
}
|
|
4885
|
-
return /*#__PURE__*/
|
|
4906
|
+
return /*#__PURE__*/React__namespace.createElement(ThemeContext.Provider, {
|
|
4886
4907
|
value: theme
|
|
4887
4908
|
}, props.children);
|
|
4888
4909
|
};
|
|
@@ -6548,7 +6569,7 @@ function createStyled(StyleSheet, _temp) {
|
|
|
6548
6569
|
} // do we really want to use the same infra as the web since it only really uses theming?
|
|
6549
6570
|
// $FlowFixMe
|
|
6550
6571
|
|
|
6551
|
-
var Styled = /*#__PURE__*/
|
|
6572
|
+
var Styled = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
6552
6573
|
var finalTag = shouldUseAs && props.as || component;
|
|
6553
6574
|
var mergedProps = props;
|
|
6554
6575
|
if (props.theme == null) {
|
|
@@ -6556,7 +6577,7 @@ function createStyled(StyleSheet, _temp) {
|
|
|
6556
6577
|
for (var key in props) {
|
|
6557
6578
|
mergedProps[key] = props[key];
|
|
6558
6579
|
}
|
|
6559
|
-
mergedProps.theme =
|
|
6580
|
+
mergedProps.theme = React__namespace.useContext(ThemeContext);
|
|
6560
6581
|
}
|
|
6561
6582
|
var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getShouldForwardProp(finalTag) : defaultShouldForwardProp;
|
|
6562
6583
|
var newProps = {};
|
|
@@ -6569,7 +6590,7 @@ function createStyled(StyleSheet, _temp) {
|
|
|
6569
6590
|
newProps.style = [css.apply(mergedProps, styles), props.style];
|
|
6570
6591
|
newProps.ref = ref; // $FlowFixMe
|
|
6571
6592
|
|
|
6572
|
-
return /*#__PURE__*/
|
|
6593
|
+
return /*#__PURE__*/React__namespace.createElement(finalTag, newProps);
|
|
6573
6594
|
}); // $FlowFixMe
|
|
6574
6595
|
|
|
6575
6596
|
Styled.withComponent = function (newComponent) {
|
|
@@ -11670,7 +11691,7 @@ var StyledCalendarRow = index$9(reactNative.View)(function (_ref5) {
|
|
|
11670
11691
|
var StyledCalendarRowItem = index$9(reactNative.View)(function (_ref6) {
|
|
11671
11692
|
var theme = _ref6.theme;
|
|
11672
11693
|
return {
|
|
11673
|
-
flexBasis: "".concat(Math.floor(100.0 / 7.0)
|
|
11694
|
+
flexBasis: "".concat(Math.floor(100.0 / 7.0), "%"),
|
|
11674
11695
|
alignItems: 'center',
|
|
11675
11696
|
width: theme.__hd__.calendar.sizes.cellWidth,
|
|
11676
11697
|
height: theme.__hd__.calendar.sizes.cellHeight,
|
|
@@ -11680,7 +11701,7 @@ var StyledCalendarRowItem = index$9(reactNative.View)(function (_ref6) {
|
|
|
11680
11701
|
var StyledDisabledCalendarRowItem = index$9(reactNative.View)(function (_ref7) {
|
|
11681
11702
|
var theme = _ref7.theme;
|
|
11682
11703
|
return {
|
|
11683
|
-
flexBasis: "".concat(Math.floor(100.0 / 7.0)
|
|
11704
|
+
flexBasis: "".concat(Math.floor(100.0 / 7.0), "%"),
|
|
11684
11705
|
alignItems: 'center',
|
|
11685
11706
|
width: theme.__hd__.calendar.sizes.cellWidth,
|
|
11686
11707
|
height: theme.__hd__.calendar.sizes.cellHeight
|
|
@@ -12290,15 +12311,15 @@ var StyledCarouselImage = index$9(Image)(function () {
|
|
|
12290
12311
|
};
|
|
12291
12312
|
});
|
|
12292
12313
|
var StyledCustomSizeCarouselImage = index$9(Image)(function (_ref3) {
|
|
12293
|
-
var
|
|
12294
|
-
_ref3$
|
|
12295
|
-
|
|
12296
|
-
|
|
12314
|
+
var themeHeight = _ref3.themeHeight,
|
|
12315
|
+
_ref3$themeResizeMode = _ref3.themeResizeMode,
|
|
12316
|
+
themeResizeMode = _ref3$themeResizeMode === void 0 ? 'contain' : _ref3$themeResizeMode,
|
|
12317
|
+
themeWidth = _ref3.themeWidth;
|
|
12297
12318
|
return {
|
|
12298
12319
|
alignSelf: 'center',
|
|
12299
|
-
width:
|
|
12300
|
-
height:
|
|
12301
|
-
resizeMode:
|
|
12320
|
+
width: themeWidth,
|
|
12321
|
+
height: themeHeight,
|
|
12322
|
+
resizeMode: themeResizeMode
|
|
12302
12323
|
};
|
|
12303
12324
|
});
|
|
12304
12325
|
var StyledCarouselContentWrapper = index$9(Box)(function (_ref4) {
|
|
@@ -12347,9 +12368,9 @@ var CarouselItem = function CarouselItem(_ref) {
|
|
|
12347
12368
|
if (isCarouselImageProps(image)) {
|
|
12348
12369
|
return /*#__PURE__*/React__default["default"].createElement(StyledCustomSizeCarouselImage, {
|
|
12349
12370
|
source: image,
|
|
12350
|
-
|
|
12351
|
-
|
|
12352
|
-
|
|
12371
|
+
themeHeight: image.height,
|
|
12372
|
+
themeWidth: image.width,
|
|
12373
|
+
themeResizeMode: image.resizeMode,
|
|
12353
12374
|
style: {
|
|
12354
12375
|
marginBottom: theme.space.medium
|
|
12355
12376
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn",
|
|
3
|
-
"version": "8.61.
|
|
3
|
+
"version": "8.61.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"nanoid": "^4.0.2"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@hero-design/react-native-month-year-picker": "^8.42.
|
|
31
|
+
"@hero-design/react-native-month-year-picker": "^8.42.8",
|
|
32
32
|
"@react-native-community/datetimepicker": "^3.5.2 || ^7.2.0",
|
|
33
33
|
"@react-native-community/slider": "4.4.3",
|
|
34
34
|
"react": "18.2.0",
|
|
35
|
-
"react-native": "^0.
|
|
35
|
+
"react-native": "^0.72.11",
|
|
36
36
|
"react-native-gesture-handler": "^1.10.3 || ~2.5.0",
|
|
37
37
|
"react-native-linear-gradient": "^2.6.2",
|
|
38
38
|
"react-native-pager-view": "^5.4.25",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@babel/runtime": "^7.20.0",
|
|
49
49
|
"@emotion/jest": "^11.11.0",
|
|
50
50
|
"@hero-design/eslint-plugin": "9.0.0",
|
|
51
|
-
"@hero-design/react-native-month-year-picker": "^8.42.
|
|
51
|
+
"@hero-design/react-native-month-year-picker": "^8.42.8",
|
|
52
52
|
"@react-native-community/datetimepicker": "7.2.0",
|
|
53
53
|
"@react-native-community/slider": "4.4.3",
|
|
54
54
|
"@rollup/plugin-babel": "^5.3.1",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"@types/react": "^18.2.0",
|
|
65
65
|
"@types/react-native-vector-icons": "^6.4.10",
|
|
66
66
|
"babel-plugin-inline-import": "^3.0.0",
|
|
67
|
+
"babel-preset-expo": "9.5.2",
|
|
67
68
|
"core-js": "^3.33.0",
|
|
68
69
|
"eslint": "^8.56.0",
|
|
69
70
|
"eslint-config-hd": "8.42.4",
|
|
@@ -74,7 +75,7 @@
|
|
|
74
75
|
"prettier-config-hd": "8.42.4",
|
|
75
76
|
"react": "18.2.0",
|
|
76
77
|
"react-dom": "^18.2.0",
|
|
77
|
-
"react-native": "0.
|
|
78
|
+
"react-native": "0.72.11",
|
|
78
79
|
"react-native-gesture-handler": "~2.5.0",
|
|
79
80
|
"react-native-linear-gradient": "^2.6.2",
|
|
80
81
|
"react-native-pager-view": "^5.4.25",
|
|
@@ -40,7 +40,7 @@ const StyledCalendarRow = styled(View)<ViewProps>(({ theme }) => ({
|
|
|
40
40
|
}));
|
|
41
41
|
|
|
42
42
|
const StyledCalendarRowItem = styled(View)<ViewProps>(({ theme }) => ({
|
|
43
|
-
flexBasis: `${Math.floor(100.0 / 7.0)
|
|
43
|
+
flexBasis: `${Math.floor(100.0 / 7.0)}%`,
|
|
44
44
|
alignItems: 'center',
|
|
45
45
|
width: theme.__hd__.calendar.sizes.cellWidth,
|
|
46
46
|
height: theme.__hd__.calendar.sizes.cellHeight,
|
|
@@ -48,7 +48,7 @@ const StyledCalendarRowItem = styled(View)<ViewProps>(({ theme }) => ({
|
|
|
48
48
|
}));
|
|
49
49
|
|
|
50
50
|
const StyledDisabledCalendarRowItem = styled(View)<ViewProps>(({ theme }) => ({
|
|
51
|
-
flexBasis: `${Math.floor(100.0 / 7.0)
|
|
51
|
+
flexBasis: `${Math.floor(100.0 / 7.0)}%`,
|
|
52
52
|
alignItems: 'center',
|
|
53
53
|
width: theme.__hd__.calendar.sizes.cellWidth,
|
|
54
54
|
height: theme.__hd__.calendar.sizes.cellHeight,
|
|
@@ -160,7 +160,7 @@ export const CardCarousel = forwardRef<CardCarouselHandles, CardCarouselProps>(
|
|
|
160
160
|
);
|
|
161
161
|
|
|
162
162
|
const getItemLayout = useCallback(
|
|
163
|
-
(_: React.ReactNode, index: number) => ({
|
|
163
|
+
(_: ArrayLike<React.ReactNode> | null | undefined, index: number) => ({
|
|
164
164
|
length: itemWidth,
|
|
165
165
|
offset: itemWidth * index,
|
|
166
166
|
index,
|
|
@@ -193,7 +193,7 @@ export const CardCarousel = forwardRef<CardCarouselHandles, CardCarouselProps>(
|
|
|
193
193
|
theme.__hd__.cardCarousel.space;
|
|
194
194
|
return (
|
|
195
195
|
<StyledWrapper style={style} testID={testID}>
|
|
196
|
-
<FlatList
|
|
196
|
+
<FlatList<React.ReactNode>
|
|
197
197
|
contentInset={{
|
|
198
198
|
top: 0,
|
|
199
199
|
left: contentContainerPaddingHorizontal,
|
|
@@ -35,9 +35,9 @@ const CarouselItem = ({
|
|
|
35
35
|
return (
|
|
36
36
|
<StyledCustomSizeCarouselImage
|
|
37
37
|
source={image}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
themeHeight={image.height}
|
|
39
|
+
themeWidth={image.width}
|
|
40
|
+
themeResizeMode={image.resizeMode}
|
|
41
41
|
style={{ marginBottom: theme.space.medium }}
|
|
42
42
|
/>
|
|
43
43
|
);
|