@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/es/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as reactNative from 'react-native';
|
|
2
2
|
import { Platform, Dimensions, StyleSheet as StyleSheet$1, Animated, View, UIManager, LayoutAnimation, TouchableOpacity, Text as Text$1, Easing, Image as Image$1, TouchableWithoutFeedback, Pressable, SafeAreaView, KeyboardAvoidingView, TouchableHighlight, ScrollView, Modal as Modal$1, FlatList, TextInput as TextInput$1, PanResponder, BackHandler, InteractionManager, useWindowDimensions, Keyboard, SectionList, RefreshControl as RefreshControl$1 } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import React__default, { useMemo, useEffect, useCallback, useRef, useState, createContext, useContext, forwardRef, memo, useReducer, useLayoutEffect, useImperativeHandle, isValidElement } from 'react';
|
|
4
5
|
import { createIconSet } from 'react-native-vector-icons';
|
|
5
6
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
7
|
import { MonthYearPickerViewIOS, MonthYearPickerDialogueAndroid } from '@hero-design/react-native-month-year-picker';
|
|
@@ -3840,6 +3841,7 @@ var RULESET = 'rule';
|
|
|
3840
3841
|
var DECLARATION = 'decl';
|
|
3841
3842
|
var IMPORT = '@import';
|
|
3842
3843
|
var KEYFRAMES = '@keyframes';
|
|
3844
|
+
var LAYER = '@layer';
|
|
3843
3845
|
|
|
3844
3846
|
/**
|
|
3845
3847
|
* @param {number}
|
|
@@ -3865,7 +3867,7 @@ var assign = Object.assign;
|
|
|
3865
3867
|
* @return {number}
|
|
3866
3868
|
*/
|
|
3867
3869
|
function hash(value, length) {
|
|
3868
|
-
return (((length << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3);
|
|
3870
|
+
return charat(value, 0) ^ 45 ? (((length << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
|
|
3869
3871
|
}
|
|
3870
3872
|
|
|
3871
3873
|
/**
|
|
@@ -4219,7 +4221,7 @@ function parse$2(value, root, parent, rule, rules, rulesets, pseudo, points, dec
|
|
|
4219
4221
|
while (scanning) switch (previous = character, character = next()) {
|
|
4220
4222
|
// (
|
|
4221
4223
|
case 40:
|
|
4222
|
-
if (previous != 108 && characters
|
|
4224
|
+
if (previous != 108 && charat(characters, length - 1) == 58) {
|
|
4223
4225
|
if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f') != -1) ampersand = -1;
|
|
4224
4226
|
break;
|
|
4225
4227
|
}
|
|
@@ -4265,6 +4267,7 @@ function parse$2(value, root, parent, rule, rules, rulesets, pseudo, points, dec
|
|
|
4265
4267
|
scanning = 0;
|
|
4266
4268
|
// ;
|
|
4267
4269
|
case 59 + offset:
|
|
4270
|
+
if (ampersand == -1) characters = replace(characters, /\f/g, '');
|
|
4268
4271
|
if (property > 0 && strlen(characters) - length) append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations);
|
|
4269
4272
|
break;
|
|
4270
4273
|
// @ ;
|
|
@@ -4273,9 +4276,10 @@ function parse$2(value, root, parent, rule, rules, rulesets, pseudo, points, dec
|
|
|
4273
4276
|
// { rule/at-rule
|
|
4274
4277
|
default:
|
|
4275
4278
|
append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets);
|
|
4276
|
-
if (character === 123) if (offset === 0) parse$2(characters, root, reference, reference, props, rulesets, length, points, children);else switch (atrule) {
|
|
4277
|
-
// d m s
|
|
4279
|
+
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) {
|
|
4280
|
+
// d l m s
|
|
4278
4281
|
case 100:
|
|
4282
|
+
case 108:
|
|
4279
4283
|
case 109:
|
|
4280
4284
|
case 115:
|
|
4281
4285
|
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);
|
|
@@ -4357,157 +4361,6 @@ function declaration(value, root, parent, length) {
|
|
|
4357
4361
|
return node$1(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length);
|
|
4358
4362
|
}
|
|
4359
4363
|
|
|
4360
|
-
/**
|
|
4361
|
-
* @param {string} value
|
|
4362
|
-
* @param {number} length
|
|
4363
|
-
* @return {string}
|
|
4364
|
-
*/
|
|
4365
|
-
function prefix(value, length) {
|
|
4366
|
-
switch (hash(value, length)) {
|
|
4367
|
-
// color-adjust
|
|
4368
|
-
case 5103:
|
|
4369
|
-
return WEBKIT + 'print-' + value + value;
|
|
4370
|
-
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
4371
|
-
case 5737:
|
|
4372
|
-
case 4201:
|
|
4373
|
-
case 3177:
|
|
4374
|
-
case 3433:
|
|
4375
|
-
case 1641:
|
|
4376
|
-
case 4457:
|
|
4377
|
-
case 2921:
|
|
4378
|
-
// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
4379
|
-
case 5572:
|
|
4380
|
-
case 6356:
|
|
4381
|
-
case 5844:
|
|
4382
|
-
case 3191:
|
|
4383
|
-
case 6645:
|
|
4384
|
-
case 3005:
|
|
4385
|
-
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
4386
|
-
case 6391:
|
|
4387
|
-
case 5879:
|
|
4388
|
-
case 5623:
|
|
4389
|
-
case 6135:
|
|
4390
|
-
case 4599:
|
|
4391
|
-
case 4855:
|
|
4392
|
-
// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
4393
|
-
case 4215:
|
|
4394
|
-
case 6389:
|
|
4395
|
-
case 5109:
|
|
4396
|
-
case 5365:
|
|
4397
|
-
case 5621:
|
|
4398
|
-
case 3829:
|
|
4399
|
-
return WEBKIT + value + value;
|
|
4400
|
-
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
4401
|
-
case 5349:
|
|
4402
|
-
case 4246:
|
|
4403
|
-
case 4810:
|
|
4404
|
-
case 6968:
|
|
4405
|
-
case 2756:
|
|
4406
|
-
return WEBKIT + value + MOZ + value + MS + value + value;
|
|
4407
|
-
// flex, flex-direction
|
|
4408
|
-
case 6828:
|
|
4409
|
-
case 4268:
|
|
4410
|
-
return WEBKIT + value + MS + value + value;
|
|
4411
|
-
// order
|
|
4412
|
-
case 6165:
|
|
4413
|
-
return WEBKIT + value + MS + 'flex-' + value + value;
|
|
4414
|
-
// align-items
|
|
4415
|
-
case 5187:
|
|
4416
|
-
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;
|
|
4417
|
-
// align-self
|
|
4418
|
-
case 5443:
|
|
4419
|
-
return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;
|
|
4420
|
-
// align-content
|
|
4421
|
-
case 4675:
|
|
4422
|
-
return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;
|
|
4423
|
-
// flex-shrink
|
|
4424
|
-
case 5548:
|
|
4425
|
-
return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;
|
|
4426
|
-
// flex-basis
|
|
4427
|
-
case 5292:
|
|
4428
|
-
return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;
|
|
4429
|
-
// flex-grow
|
|
4430
|
-
case 6060:
|
|
4431
|
-
return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;
|
|
4432
|
-
// transition
|
|
4433
|
-
case 4554:
|
|
4434
|
-
return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;
|
|
4435
|
-
// cursor
|
|
4436
|
-
case 6187:
|
|
4437
|
-
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;
|
|
4438
|
-
// background, background-image
|
|
4439
|
-
case 5495:
|
|
4440
|
-
case 3959:
|
|
4441
|
-
return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1');
|
|
4442
|
-
// justify-content
|
|
4443
|
-
case 4968:
|
|
4444
|
-
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;
|
|
4445
|
-
// (margin|padding)-inline-(start|end)
|
|
4446
|
-
case 4095:
|
|
4447
|
-
case 3583:
|
|
4448
|
-
case 4068:
|
|
4449
|
-
case 2532:
|
|
4450
|
-
return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;
|
|
4451
|
-
// (min|max)?(width|height|inline-size|block-size)
|
|
4452
|
-
case 8116:
|
|
4453
|
-
case 7059:
|
|
4454
|
-
case 5753:
|
|
4455
|
-
case 5535:
|
|
4456
|
-
case 5445:
|
|
4457
|
-
case 5701:
|
|
4458
|
-
case 4933:
|
|
4459
|
-
case 4677:
|
|
4460
|
-
case 5533:
|
|
4461
|
-
case 5789:
|
|
4462
|
-
case 5021:
|
|
4463
|
-
case 4765:
|
|
4464
|
-
// stretch, max-content, min-content, fill-available
|
|
4465
|
-
if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {
|
|
4466
|
-
// (m)ax-content, (m)in-content
|
|
4467
|
-
case 109:
|
|
4468
|
-
// -
|
|
4469
|
-
if (charat(value, length + 4) !== 45) break;
|
|
4470
|
-
// (f)ill-available, (f)it-content
|
|
4471
|
-
case 102:
|
|
4472
|
-
return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
|
|
4473
|
-
// (s)tretch
|
|
4474
|
-
case 115:
|
|
4475
|
-
return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;
|
|
4476
|
-
}
|
|
4477
|
-
break;
|
|
4478
|
-
// position: sticky
|
|
4479
|
-
case 4949:
|
|
4480
|
-
// (s)ticky?
|
|
4481
|
-
if (charat(value, length + 1) !== 115) break;
|
|
4482
|
-
// display: (flex|inline-flex)
|
|
4483
|
-
case 6444:
|
|
4484
|
-
switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {
|
|
4485
|
-
// stic(k)y
|
|
4486
|
-
case 107:
|
|
4487
|
-
return replace(value, ':', ':' + WEBKIT) + value;
|
|
4488
|
-
// (inline-)?fl(e)x
|
|
4489
|
-
case 101:
|
|
4490
|
-
return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;
|
|
4491
|
-
}
|
|
4492
|
-
break;
|
|
4493
|
-
// writing-mode
|
|
4494
|
-
case 5936:
|
|
4495
|
-
switch (charat(value, length + 11)) {
|
|
4496
|
-
// vertical-l(r)
|
|
4497
|
-
case 114:
|
|
4498
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
|
|
4499
|
-
// vertical-r(l)
|
|
4500
|
-
case 108:
|
|
4501
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
|
|
4502
|
-
// horizontal(-)tb
|
|
4503
|
-
case 45:
|
|
4504
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
|
|
4505
|
-
}
|
|
4506
|
-
return WEBKIT + value + MS + value + value;
|
|
4507
|
-
}
|
|
4508
|
-
return value;
|
|
4509
|
-
}
|
|
4510
|
-
|
|
4511
4364
|
/**
|
|
4512
4365
|
* @param {object[]} children
|
|
4513
4366
|
* @param {function} callback
|
|
@@ -4529,6 +4382,8 @@ function serialize(children, callback) {
|
|
|
4529
4382
|
*/
|
|
4530
4383
|
function stringify$2(element, index, children, callback) {
|
|
4531
4384
|
switch (element.type) {
|
|
4385
|
+
case LAYER:
|
|
4386
|
+
if (element.children.length) break;
|
|
4532
4387
|
case IMPORT:
|
|
4533
4388
|
case DECLARATION:
|
|
4534
4389
|
return element["return"] = element["return"] || element.value;
|
|
@@ -4565,45 +4420,6 @@ function rulesheet(callback) {
|
|
|
4565
4420
|
};
|
|
4566
4421
|
}
|
|
4567
4422
|
|
|
4568
|
-
/**
|
|
4569
|
-
* @param {object} element
|
|
4570
|
-
* @param {number} index
|
|
4571
|
-
* @param {object[]} children
|
|
4572
|
-
* @param {function} callback
|
|
4573
|
-
*/
|
|
4574
|
-
function prefixer(element, index, children, callback) {
|
|
4575
|
-
if (element.length > -1) if (!element["return"]) switch (element.type) {
|
|
4576
|
-
case DECLARATION:
|
|
4577
|
-
element["return"] = prefix(element.value, element.length);
|
|
4578
|
-
break;
|
|
4579
|
-
case KEYFRAMES:
|
|
4580
|
-
return serialize([copy(element, {
|
|
4581
|
-
value: replace(element.value, '@', '@' + WEBKIT)
|
|
4582
|
-
})], callback);
|
|
4583
|
-
case RULESET:
|
|
4584
|
-
if (element.length) return combine(element.props, function (value) {
|
|
4585
|
-
switch (match$2(value, /(::plac\w+|:read-\w+)/)) {
|
|
4586
|
-
// :read-(only|write)
|
|
4587
|
-
case ':read-only':
|
|
4588
|
-
case ':read-write':
|
|
4589
|
-
return serialize([copy(element, {
|
|
4590
|
-
props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
|
|
4591
|
-
})], callback);
|
|
4592
|
-
// :placeholder
|
|
4593
|
-
case '::placeholder':
|
|
4594
|
-
return serialize([copy(element, {
|
|
4595
|
-
props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
|
|
4596
|
-
}), copy(element, {
|
|
4597
|
-
props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
|
|
4598
|
-
}), copy(element, {
|
|
4599
|
-
props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]
|
|
4600
|
-
})], callback);
|
|
4601
|
-
}
|
|
4602
|
-
return '';
|
|
4603
|
-
});
|
|
4604
|
-
}
|
|
4605
|
-
}
|
|
4606
|
-
|
|
4607
4423
|
var weakMemoize = function weakMemoize(func) {
|
|
4608
4424
|
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
|
|
4609
4425
|
var cache = new WeakMap();
|
|
@@ -4725,6 +4541,211 @@ var removeLabel = function removeLabel(element) {
|
|
|
4725
4541
|
}
|
|
4726
4542
|
}
|
|
4727
4543
|
};
|
|
4544
|
+
|
|
4545
|
+
/* eslint-disable no-fallthrough */
|
|
4546
|
+
|
|
4547
|
+
function prefix(value, length) {
|
|
4548
|
+
switch (hash(value, length)) {
|
|
4549
|
+
// color-adjust
|
|
4550
|
+
case 5103:
|
|
4551
|
+
return WEBKIT + 'print-' + value + value;
|
|
4552
|
+
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
4553
|
+
|
|
4554
|
+
case 5737:
|
|
4555
|
+
case 4201:
|
|
4556
|
+
case 3177:
|
|
4557
|
+
case 3433:
|
|
4558
|
+
case 1641:
|
|
4559
|
+
case 4457:
|
|
4560
|
+
case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
4561
|
+
|
|
4562
|
+
case 5572:
|
|
4563
|
+
case 6356:
|
|
4564
|
+
case 5844:
|
|
4565
|
+
case 3191:
|
|
4566
|
+
case 6645:
|
|
4567
|
+
case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
4568
|
+
|
|
4569
|
+
case 6391:
|
|
4570
|
+
case 5879:
|
|
4571
|
+
case 5623:
|
|
4572
|
+
case 6135:
|
|
4573
|
+
case 4599:
|
|
4574
|
+
case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
4575
|
+
|
|
4576
|
+
case 4215:
|
|
4577
|
+
case 6389:
|
|
4578
|
+
case 5109:
|
|
4579
|
+
case 5365:
|
|
4580
|
+
case 5621:
|
|
4581
|
+
case 3829:
|
|
4582
|
+
return WEBKIT + value + value;
|
|
4583
|
+
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
4584
|
+
|
|
4585
|
+
case 5349:
|
|
4586
|
+
case 4246:
|
|
4587
|
+
case 4810:
|
|
4588
|
+
case 6968:
|
|
4589
|
+
case 2756:
|
|
4590
|
+
return WEBKIT + value + MOZ + value + MS + value + value;
|
|
4591
|
+
// flex, flex-direction
|
|
4592
|
+
|
|
4593
|
+
case 6828:
|
|
4594
|
+
case 4268:
|
|
4595
|
+
return WEBKIT + value + MS + value + value;
|
|
4596
|
+
// order
|
|
4597
|
+
|
|
4598
|
+
case 6165:
|
|
4599
|
+
return WEBKIT + value + MS + 'flex-' + value + value;
|
|
4600
|
+
// align-items
|
|
4601
|
+
|
|
4602
|
+
case 5187:
|
|
4603
|
+
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;
|
|
4604
|
+
// align-self
|
|
4605
|
+
|
|
4606
|
+
case 5443:
|
|
4607
|
+
return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;
|
|
4608
|
+
// align-content
|
|
4609
|
+
|
|
4610
|
+
case 4675:
|
|
4611
|
+
return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;
|
|
4612
|
+
// flex-shrink
|
|
4613
|
+
|
|
4614
|
+
case 5548:
|
|
4615
|
+
return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;
|
|
4616
|
+
// flex-basis
|
|
4617
|
+
|
|
4618
|
+
case 5292:
|
|
4619
|
+
return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;
|
|
4620
|
+
// flex-grow
|
|
4621
|
+
|
|
4622
|
+
case 6060:
|
|
4623
|
+
return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;
|
|
4624
|
+
// transition
|
|
4625
|
+
|
|
4626
|
+
case 4554:
|
|
4627
|
+
return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;
|
|
4628
|
+
// cursor
|
|
4629
|
+
|
|
4630
|
+
case 6187:
|
|
4631
|
+
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;
|
|
4632
|
+
// background, background-image
|
|
4633
|
+
|
|
4634
|
+
case 5495:
|
|
4635
|
+
case 3959:
|
|
4636
|
+
return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1');
|
|
4637
|
+
// justify-content
|
|
4638
|
+
|
|
4639
|
+
case 4968:
|
|
4640
|
+
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;
|
|
4641
|
+
// (margin|padding)-inline-(start|end)
|
|
4642
|
+
|
|
4643
|
+
case 4095:
|
|
4644
|
+
case 3583:
|
|
4645
|
+
case 4068:
|
|
4646
|
+
case 2532:
|
|
4647
|
+
return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;
|
|
4648
|
+
// (min|max)?(width|height|inline-size|block-size)
|
|
4649
|
+
|
|
4650
|
+
case 8116:
|
|
4651
|
+
case 7059:
|
|
4652
|
+
case 5753:
|
|
4653
|
+
case 5535:
|
|
4654
|
+
case 5445:
|
|
4655
|
+
case 5701:
|
|
4656
|
+
case 4933:
|
|
4657
|
+
case 4677:
|
|
4658
|
+
case 5533:
|
|
4659
|
+
case 5789:
|
|
4660
|
+
case 5021:
|
|
4661
|
+
case 4765:
|
|
4662
|
+
// stretch, max-content, min-content, fill-available
|
|
4663
|
+
if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {
|
|
4664
|
+
// (m)ax-content, (m)in-content
|
|
4665
|
+
case 109:
|
|
4666
|
+
// -
|
|
4667
|
+
if (charat(value, length + 4) !== 45) break;
|
|
4668
|
+
// (f)ill-available, (f)it-content
|
|
4669
|
+
|
|
4670
|
+
case 102:
|
|
4671
|
+
return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
|
|
4672
|
+
// (s)tretch
|
|
4673
|
+
|
|
4674
|
+
case 115:
|
|
4675
|
+
return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;
|
|
4676
|
+
}
|
|
4677
|
+
break;
|
|
4678
|
+
// position: sticky
|
|
4679
|
+
|
|
4680
|
+
case 4949:
|
|
4681
|
+
// (s)ticky?
|
|
4682
|
+
if (charat(value, length + 1) !== 115) break;
|
|
4683
|
+
// display: (flex|inline-flex)
|
|
4684
|
+
|
|
4685
|
+
case 6444:
|
|
4686
|
+
switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {
|
|
4687
|
+
// stic(k)y
|
|
4688
|
+
case 107:
|
|
4689
|
+
return replace(value, ':', ':' + WEBKIT) + value;
|
|
4690
|
+
// (inline-)?fl(e)x
|
|
4691
|
+
|
|
4692
|
+
case 101:
|
|
4693
|
+
return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;
|
|
4694
|
+
}
|
|
4695
|
+
break;
|
|
4696
|
+
// writing-mode
|
|
4697
|
+
|
|
4698
|
+
case 5936:
|
|
4699
|
+
switch (charat(value, length + 11)) {
|
|
4700
|
+
// vertical-l(r)
|
|
4701
|
+
case 114:
|
|
4702
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
|
|
4703
|
+
// vertical-r(l)
|
|
4704
|
+
|
|
4705
|
+
case 108:
|
|
4706
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
|
|
4707
|
+
// horizontal(-)tb
|
|
4708
|
+
|
|
4709
|
+
case 45:
|
|
4710
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
|
|
4711
|
+
}
|
|
4712
|
+
return WEBKIT + value + MS + value + value;
|
|
4713
|
+
}
|
|
4714
|
+
return value;
|
|
4715
|
+
}
|
|
4716
|
+
var prefixer = function prefixer(element, index, children, callback) {
|
|
4717
|
+
if (element.length > -1) if (!element["return"]) switch (element.type) {
|
|
4718
|
+
case DECLARATION:
|
|
4719
|
+
element["return"] = prefix(element.value, element.length);
|
|
4720
|
+
break;
|
|
4721
|
+
case KEYFRAMES:
|
|
4722
|
+
return serialize([copy(element, {
|
|
4723
|
+
value: replace(element.value, '@', '@' + WEBKIT)
|
|
4724
|
+
})], callback);
|
|
4725
|
+
case RULESET:
|
|
4726
|
+
if (element.length) return combine(element.props, function (value) {
|
|
4727
|
+
switch (match$2(value, /(::plac\w+|:read-\w+)/)) {
|
|
4728
|
+
// :read-(only|write)
|
|
4729
|
+
case ':read-only':
|
|
4730
|
+
case ':read-write':
|
|
4731
|
+
return serialize([copy(element, {
|
|
4732
|
+
props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
|
|
4733
|
+
})], callback);
|
|
4734
|
+
// :placeholder
|
|
4735
|
+
|
|
4736
|
+
case '::placeholder':
|
|
4737
|
+
return serialize([copy(element, {
|
|
4738
|
+
props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
|
|
4739
|
+
}), copy(element, {
|
|
4740
|
+
props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
|
|
4741
|
+
}), copy(element, {
|
|
4742
|
+
props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]
|
|
4743
|
+
})], callback);
|
|
4744
|
+
}
|
|
4745
|
+
return '';
|
|
4746
|
+
});
|
|
4747
|
+
}
|
|
4748
|
+
};
|
|
4728
4749
|
var defaultStylisPlugins = [prefixer];
|
|
4729
4750
|
var createCache = function createCache(options) {
|
|
4730
4751
|
var key = options.key;
|
|
@@ -4820,7 +4841,7 @@ function _extends() {
|
|
|
4820
4841
|
return _extends.apply(this, arguments);
|
|
4821
4842
|
}
|
|
4822
4843
|
|
|
4823
|
-
var EmotionCacheContext = /* #__PURE__ */createContext(
|
|
4844
|
+
var EmotionCacheContext = /* #__PURE__ */React.createContext(
|
|
4824
4845
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
4825
4846
|
// because this module is primarily intended for the browser and node
|
|
4826
4847
|
// but it's also required in react native and similar environments sometimes
|
|
@@ -4831,9 +4852,9 @@ typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
|
|
|
4831
4852
|
key: 'css'
|
|
4832
4853
|
}) : null);
|
|
4833
4854
|
EmotionCacheContext.Provider;
|
|
4834
|
-
var ThemeContext = /* #__PURE__ */createContext({});
|
|
4855
|
+
var ThemeContext = /* #__PURE__ */React.createContext({});
|
|
4835
4856
|
var useTheme$1 = function useTheme() {
|
|
4836
|
-
return useContext(ThemeContext);
|
|
4857
|
+
return React.useContext(ThemeContext);
|
|
4837
4858
|
};
|
|
4838
4859
|
var getTheme = function getTheme(outerTheme, theme) {
|
|
4839
4860
|
if (typeof theme === 'function') {
|
|
@@ -4848,11 +4869,11 @@ var createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {
|
|
|
4848
4869
|
});
|
|
4849
4870
|
});
|
|
4850
4871
|
var ThemeProvider$1 = function ThemeProvider(props) {
|
|
4851
|
-
var theme = useContext(ThemeContext);
|
|
4872
|
+
var theme = React.useContext(ThemeContext);
|
|
4852
4873
|
if (props.theme !== theme) {
|
|
4853
4874
|
theme = createCacheWithTheme(theme)(props.theme);
|
|
4854
4875
|
}
|
|
4855
|
-
return /*#__PURE__*/createElement(ThemeContext.Provider, {
|
|
4876
|
+
return /*#__PURE__*/React.createElement(ThemeContext.Provider, {
|
|
4856
4877
|
value: theme
|
|
4857
4878
|
}, props.children);
|
|
4858
4879
|
};
|
|
@@ -4880,15 +4901,15 @@ var ThemeSwitcher = function ThemeSwitcher(_ref) {
|
|
|
4880
4901
|
return getTheme$1(scale$1, swagDarkSystemPalette);
|
|
4881
4902
|
}
|
|
4882
4903
|
}, [name]);
|
|
4883
|
-
return /*#__PURE__*/
|
|
4904
|
+
return /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
4884
4905
|
theme: theme
|
|
4885
4906
|
}, children);
|
|
4886
4907
|
};
|
|
4887
4908
|
var withTheme = function withTheme(C, themeName) {
|
|
4888
4909
|
return function (props) {
|
|
4889
|
-
return /*#__PURE__*/
|
|
4910
|
+
return /*#__PURE__*/React__default.createElement(ThemeSwitcher, {
|
|
4890
4911
|
name: themeName
|
|
4891
|
-
}, /*#__PURE__*/
|
|
4912
|
+
}, /*#__PURE__*/React__default.createElement(C, props));
|
|
4892
4913
|
};
|
|
4893
4914
|
};
|
|
4894
4915
|
|
|
@@ -6518,7 +6539,7 @@ function createStyled(StyleSheet, _temp) {
|
|
|
6518
6539
|
} // do we really want to use the same infra as the web since it only really uses theming?
|
|
6519
6540
|
// $FlowFixMe
|
|
6520
6541
|
|
|
6521
|
-
var Styled = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
6542
|
+
var Styled = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
6522
6543
|
var finalTag = shouldUseAs && props.as || component;
|
|
6523
6544
|
var mergedProps = props;
|
|
6524
6545
|
if (props.theme == null) {
|
|
@@ -6526,7 +6547,7 @@ function createStyled(StyleSheet, _temp) {
|
|
|
6526
6547
|
for (var key in props) {
|
|
6527
6548
|
mergedProps[key] = props[key];
|
|
6528
6549
|
}
|
|
6529
|
-
mergedProps.theme = useContext(ThemeContext);
|
|
6550
|
+
mergedProps.theme = React.useContext(ThemeContext);
|
|
6530
6551
|
}
|
|
6531
6552
|
var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getShouldForwardProp(finalTag) : defaultShouldForwardProp;
|
|
6532
6553
|
var newProps = {};
|
|
@@ -6539,7 +6560,7 @@ function createStyled(StyleSheet, _temp) {
|
|
|
6539
6560
|
newProps.style = [css.apply(mergedProps, styles), props.style];
|
|
6540
6561
|
newProps.ref = ref; // $FlowFixMe
|
|
6541
6562
|
|
|
6542
|
-
return /*#__PURE__*/createElement(finalTag, newProps);
|
|
6563
|
+
return /*#__PURE__*/React.createElement(finalTag, newProps);
|
|
6543
6564
|
}); // $FlowFixMe
|
|
6544
6565
|
|
|
6545
6566
|
Styled.withComponent = function (newComponent) {
|
|
@@ -6572,14 +6593,14 @@ var index$9 = components.reduce(function (acc, comp) {
|
|
|
6572
6593
|
|
|
6573
6594
|
// Get previous state value
|
|
6574
6595
|
var usePrevious = function usePrevious(value) {
|
|
6575
|
-
var ref =
|
|
6576
|
-
|
|
6596
|
+
var ref = React__default.useRef();
|
|
6597
|
+
React__default.useEffect(function () {
|
|
6577
6598
|
ref.current = value;
|
|
6578
6599
|
}, [value]);
|
|
6579
6600
|
return ref.current;
|
|
6580
6601
|
};
|
|
6581
6602
|
function usePropsOrInternalState(initialState, state, setState) {
|
|
6582
|
-
var _React$useState =
|
|
6603
|
+
var _React$useState = React__default.useState(initialState),
|
|
6583
6604
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
6584
6605
|
internalState = _React$useState2[0],
|
|
6585
6606
|
setInternalState = _React$useState2[1];
|
|
@@ -6627,11 +6648,11 @@ var Collapse = function Collapse(_ref) {
|
|
|
6627
6648
|
testID = _ref.testID,
|
|
6628
6649
|
style = _ref.style,
|
|
6629
6650
|
onLayout = _ref.onLayout;
|
|
6630
|
-
var _React$useState =
|
|
6651
|
+
var _React$useState = React__default.useState(0),
|
|
6631
6652
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
6632
6653
|
contentHeight = _React$useState2[0],
|
|
6633
6654
|
setContentHeight = _React$useState2[1];
|
|
6634
|
-
var _React$useState3 =
|
|
6655
|
+
var _React$useState3 = React__default.useState(false),
|
|
6635
6656
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
6636
6657
|
componentMounted = _React$useState4[0],
|
|
6637
6658
|
setComponentMounted = _React$useState4[1];
|
|
@@ -6649,13 +6670,13 @@ var Collapse = function Collapse(_ref) {
|
|
|
6649
6670
|
setComponentMounted(true);
|
|
6650
6671
|
onLayout === null || onLayout === void 0 || onLayout(e);
|
|
6651
6672
|
}, []);
|
|
6652
|
-
return /*#__PURE__*/
|
|
6673
|
+
return /*#__PURE__*/React__default.createElement(StyledWrapper$d, {
|
|
6653
6674
|
style: {
|
|
6654
6675
|
height: open ? contentHeight : 0
|
|
6655
6676
|
},
|
|
6656
6677
|
onLayout: onCollapseLayout,
|
|
6657
6678
|
testID: testID
|
|
6658
|
-
}, /*#__PURE__*/
|
|
6679
|
+
}, /*#__PURE__*/React__default.createElement(StyledHiddenWrapper, null, /*#__PURE__*/React__default.createElement(StyledChildWrapper, {
|
|
6659
6680
|
onLayout: function onLayout(event) {
|
|
6660
6681
|
return fetchMaxHeight(event.nativeEvent.layout);
|
|
6661
6682
|
},
|
|
@@ -6731,7 +6752,7 @@ var Text = function Text(_ref) {
|
|
|
6731
6752
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
6732
6753
|
nativeProps = _objectWithoutProperties(_ref, _excluded$D);
|
|
6733
6754
|
useDeprecation('Typography.Text is deprecated and will be removed in the next major release, please refer to https://design.employmenthero.com/mobile/Components/typography for the appropriate alternatives.');
|
|
6734
|
-
return /*#__PURE__*/
|
|
6755
|
+
return /*#__PURE__*/React__default.createElement(StyledText$3, _extends$1({}, nativeProps, {
|
|
6735
6756
|
themeFontSize: fontSize,
|
|
6736
6757
|
themeFontWeight: fontWeight,
|
|
6737
6758
|
themeIntent: intent,
|
|
@@ -6769,7 +6790,7 @@ var Caption = function Caption(_ref) {
|
|
|
6769
6790
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
6770
6791
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
6771
6792
|
nativeProps = _objectWithoutProperties(_ref, _excluded$C);
|
|
6772
|
-
return /*#__PURE__*/
|
|
6793
|
+
return /*#__PURE__*/React__default.createElement(StyledCaption, _extends$1({}, nativeProps, {
|
|
6773
6794
|
themeFontWeight: fontWeight,
|
|
6774
6795
|
themeIntent: intent,
|
|
6775
6796
|
allowFontScaling: allowFontScaling
|
|
@@ -6795,7 +6816,7 @@ var Label = function Label(_ref) {
|
|
|
6795
6816
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
6796
6817
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
6797
6818
|
nativeProps = _objectWithoutProperties(_ref, _excluded$B);
|
|
6798
|
-
return /*#__PURE__*/
|
|
6819
|
+
return /*#__PURE__*/React__default.createElement(StyledLabel$1, _extends$1({}, nativeProps, {
|
|
6799
6820
|
themeIntent: intent,
|
|
6800
6821
|
allowFontScaling: allowFontScaling
|
|
6801
6822
|
}), children);
|
|
@@ -6827,7 +6848,7 @@ var Title = function Title(_ref) {
|
|
|
6827
6848
|
_ref$typeface = _ref.typeface,
|
|
6828
6849
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
6829
6850
|
nativeProps = _objectWithoutProperties(_ref, _excluded$A);
|
|
6830
|
-
return /*#__PURE__*/
|
|
6851
|
+
return /*#__PURE__*/React__default.createElement(StyledTitle$1, _extends$1({}, nativeProps, {
|
|
6831
6852
|
themeLevel: level,
|
|
6832
6853
|
themeTypeface: typeface,
|
|
6833
6854
|
themeIntent: intent,
|
|
@@ -6873,7 +6894,7 @@ var Body = function Body(_ref) {
|
|
|
6873
6894
|
_ref$variant = _ref.variant,
|
|
6874
6895
|
variant = _ref$variant === void 0 ? 'regular' : _ref$variant,
|
|
6875
6896
|
nativeProps = _objectWithoutProperties(_ref, _excluded$z);
|
|
6876
|
-
return /*#__PURE__*/
|
|
6897
|
+
return /*#__PURE__*/React__default.createElement(StyledBody, _extends$1({}, nativeProps, {
|
|
6877
6898
|
themeTypeface: typeface,
|
|
6878
6899
|
themeIntent: intent,
|
|
6879
6900
|
themeVariant: variant,
|
|
@@ -7455,13 +7476,13 @@ var AnimatedIcon = function AnimatedIcon(_ref) {
|
|
|
7455
7476
|
inputRange: [0, 1],
|
|
7456
7477
|
outputRange: ['0deg', '360deg']
|
|
7457
7478
|
});
|
|
7458
|
-
return /*#__PURE__*/
|
|
7479
|
+
return /*#__PURE__*/React__default.createElement(Animated.View, {
|
|
7459
7480
|
style: [{
|
|
7460
7481
|
transform: [{
|
|
7461
7482
|
rotate: interpolatedRotateAnimation
|
|
7462
7483
|
}]
|
|
7463
7484
|
}, style]
|
|
7464
|
-
}, /*#__PURE__*/
|
|
7485
|
+
}, /*#__PURE__*/React__default.createElement(StyledHeroIcon, otherProps));
|
|
7465
7486
|
};
|
|
7466
7487
|
|
|
7467
7488
|
var Icon = function Icon(_ref) {
|
|
@@ -7499,13 +7520,13 @@ var Icon = function Icon(_ref) {
|
|
|
7499
7520
|
accessibilityViewIsModal: accessibilityViewIsModal,
|
|
7500
7521
|
accessibilityActions: accessibilityActions
|
|
7501
7522
|
};
|
|
7502
|
-
return spin ? /*#__PURE__*/
|
|
7523
|
+
return spin ? /*#__PURE__*/React__default.createElement(AnimatedIcon, _extends$1({
|
|
7503
7524
|
name: icon,
|
|
7504
7525
|
themeIntent: intent,
|
|
7505
7526
|
themeSize: size,
|
|
7506
7527
|
style: style,
|
|
7507
7528
|
testID: testID
|
|
7508
|
-
}, accessibilityProps)) : /*#__PURE__*/
|
|
7529
|
+
}, accessibilityProps)) : /*#__PURE__*/React__default.createElement(StyledHeroIcon, _extends$1({
|
|
7509
7530
|
name: icon,
|
|
7510
7531
|
themeIntent: intent,
|
|
7511
7532
|
themeSize: size,
|
|
@@ -7525,19 +7546,19 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
7525
7546
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
7526
7547
|
style = _ref.style,
|
|
7527
7548
|
testID = _ref.testID;
|
|
7528
|
-
return /*#__PURE__*/
|
|
7549
|
+
return /*#__PURE__*/React__default.createElement(StyledItemWrapper$1, {
|
|
7529
7550
|
themeVariant: variant,
|
|
7530
7551
|
style: style,
|
|
7531
7552
|
testID: testID
|
|
7532
|
-
}, /*#__PURE__*/
|
|
7553
|
+
}, /*#__PURE__*/React__default.createElement(StyledHeaderWrapper$1, {
|
|
7533
7554
|
onPress: onPress
|
|
7534
|
-
}, typeof header === 'string' ? /*#__PURE__*/
|
|
7555
|
+
}, typeof header === 'string' ? /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
7535
7556
|
variant: "regular-bold"
|
|
7536
|
-
}, header) : header, /*#__PURE__*/
|
|
7557
|
+
}, header) : header, /*#__PURE__*/React__default.createElement(Icon, {
|
|
7537
7558
|
icon: open ? 'arrow-up' : 'arrow-down',
|
|
7538
7559
|
intent: "secondary",
|
|
7539
7560
|
size: "small"
|
|
7540
|
-
})), /*#__PURE__*/
|
|
7561
|
+
})), /*#__PURE__*/React__default.createElement(StyledCollapse, {
|
|
7541
7562
|
open: open
|
|
7542
7563
|
}, content));
|
|
7543
7564
|
};
|
|
@@ -7558,18 +7579,18 @@ var Accordion = function Accordion(_ref) {
|
|
|
7558
7579
|
_usePropsOrInternalSt2 = _slicedToArray(_usePropsOrInternalSt, 2),
|
|
7559
7580
|
_activeItemKey = _usePropsOrInternalSt2[0],
|
|
7560
7581
|
_onItemPress = _usePropsOrInternalSt2[1];
|
|
7561
|
-
return /*#__PURE__*/
|
|
7582
|
+
return /*#__PURE__*/React__default.createElement(StyledWrapper$c, {
|
|
7562
7583
|
style: style,
|
|
7563
7584
|
testID: testID
|
|
7564
7585
|
}, items.map(function (_ref2, index) {
|
|
7565
7586
|
var key = _ref2.key,
|
|
7566
7587
|
props = _objectWithoutProperties(_ref2, _excluded$x);
|
|
7567
7588
|
var open = _activeItemKey === key;
|
|
7568
|
-
return /*#__PURE__*/
|
|
7589
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
7569
7590
|
key: key
|
|
7570
|
-
}, variant === 'card' && index !== 0 && /*#__PURE__*/
|
|
7591
|
+
}, variant === 'card' && index !== 0 && /*#__PURE__*/React__default.createElement(Spacer$1, {
|
|
7571
7592
|
testID: "accordion-spacer"
|
|
7572
|
-
}), /*#__PURE__*/
|
|
7593
|
+
}), /*#__PURE__*/React__default.createElement(AccordionItem, _extends$1({}, props, {
|
|
7573
7594
|
open: open,
|
|
7574
7595
|
onPress: function onPress() {
|
|
7575
7596
|
return _onItemPress(open ? defaultValue : key);
|
|
@@ -7640,9 +7661,9 @@ var getIntentIcon$1 = function getIntentIcon(intent) {
|
|
|
7640
7661
|
};
|
|
7641
7662
|
var AlertIcon = function AlertIcon(_ref) {
|
|
7642
7663
|
var icon = _ref.icon;
|
|
7643
|
-
return icon ? /*#__PURE__*/
|
|
7664
|
+
return icon ? /*#__PURE__*/React__default.createElement(IconContainer$1, {
|
|
7644
7665
|
testID: "alert-left-icon"
|
|
7645
|
-
}, /*#__PURE__*/
|
|
7666
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
7646
7667
|
icon: icon,
|
|
7647
7668
|
size: "small"
|
|
7648
7669
|
})) : null;
|
|
@@ -7659,23 +7680,23 @@ var Alert = function Alert(_ref2) {
|
|
|
7659
7680
|
style = _ref2.style,
|
|
7660
7681
|
testID = _ref2.testID;
|
|
7661
7682
|
useDeprecation("Alert's notification intent is deprecated and will be removed in the next major release. Please use other intents instead.", intent === 'notification');
|
|
7662
|
-
return /*#__PURE__*/
|
|
7683
|
+
return /*#__PURE__*/React__default.createElement(Container$1, {
|
|
7663
7684
|
themeVariant: variant,
|
|
7664
7685
|
themeIntent: intent,
|
|
7665
7686
|
style: style,
|
|
7666
7687
|
testID: testID
|
|
7667
|
-
}, /*#__PURE__*/
|
|
7688
|
+
}, /*#__PURE__*/React__default.createElement(ContentContainer$1, {
|
|
7668
7689
|
showDivider: !!onClose
|
|
7669
|
-
}, icon !== null ? /*#__PURE__*/
|
|
7690
|
+
}, icon !== null ? /*#__PURE__*/React__default.createElement(AlertIcon, {
|
|
7670
7691
|
icon: icon || getIntentIcon$1(intent)
|
|
7671
|
-
}) : null, /*#__PURE__*/
|
|
7692
|
+
}) : null, /*#__PURE__*/React__default.createElement(TextContainer$1, null, typeof title === 'string' ? /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
7672
7693
|
variant: "small-bold"
|
|
7673
|
-
}, title) : title, typeof content === 'string' ? /*#__PURE__*/
|
|
7694
|
+
}, title) : title, typeof content === 'string' ? /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
7674
7695
|
variant: "small"
|
|
7675
|
-
}, content) : content)), onClose ? /*#__PURE__*/
|
|
7696
|
+
}, content) : content)), onClose ? /*#__PURE__*/React__default.createElement(CTAWrapper$1, {
|
|
7676
7697
|
onPress: onClose,
|
|
7677
7698
|
testID: "alert-close-icon"
|
|
7678
|
-
}, /*#__PURE__*/
|
|
7699
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
7679
7700
|
icon: "cancel",
|
|
7680
7701
|
size: "small"
|
|
7681
7702
|
})) : null);
|
|
@@ -7723,26 +7744,26 @@ var Attachment = function Attachment(_ref) {
|
|
|
7723
7744
|
backgroundHighlighted = _ref$backgroundHighli === void 0 ? false : _ref$backgroundHighli,
|
|
7724
7745
|
style = _ref.style,
|
|
7725
7746
|
testID = _ref.testID;
|
|
7726
|
-
return /*#__PURE__*/
|
|
7747
|
+
return /*#__PURE__*/React__default.createElement(StyledContainer$6, {
|
|
7727
7748
|
testID: testID,
|
|
7728
7749
|
style: style
|
|
7729
|
-
}, /*#__PURE__*/
|
|
7750
|
+
}, /*#__PURE__*/React__default.createElement(StyledContentContainer$1, {
|
|
7730
7751
|
themeHighlighted: backgroundHighlighted
|
|
7731
|
-
}, previewElement, filename ? /*#__PURE__*/
|
|
7752
|
+
}, previewElement, filename ? /*#__PURE__*/React__default.createElement(StyledTextContainer, {
|
|
7732
7753
|
testID: "attachment-content"
|
|
7733
|
-
}, /*#__PURE__*/
|
|
7754
|
+
}, /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
7734
7755
|
variant: "small",
|
|
7735
7756
|
numberOfLines: 1
|
|
7736
|
-
}, filename)) : null), onDownload ? /*#__PURE__*/
|
|
7757
|
+
}, filename)) : null), onDownload ? /*#__PURE__*/React__default.createElement(StyledCTAWrapper, {
|
|
7737
7758
|
onPress: onDownload,
|
|
7738
7759
|
testID: "attachment-download-icon"
|
|
7739
|
-
}, /*#__PURE__*/
|
|
7760
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
7740
7761
|
icon: "download-outlined",
|
|
7741
7762
|
size: "small"
|
|
7742
|
-
})) : null, onRemove ? /*#__PURE__*/
|
|
7763
|
+
})) : null, onRemove ? /*#__PURE__*/React__default.createElement(StyledCTAWrapper, {
|
|
7743
7764
|
onPress: onRemove,
|
|
7744
7765
|
testID: "attachment-remove-icon"
|
|
7745
|
-
}, /*#__PURE__*/
|
|
7766
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
7746
7767
|
icon: "trash-bin-outlined",
|
|
7747
7768
|
size: "small",
|
|
7748
7769
|
intent: "danger"
|
|
@@ -7818,16 +7839,16 @@ var Avatar = function Avatar(_ref) {
|
|
|
7818
7839
|
hasImageError = _useState2[0],
|
|
7819
7840
|
setHasImageError = _useState2[1];
|
|
7820
7841
|
if (title === undefined && source === undefined) return null;
|
|
7821
|
-
return /*#__PURE__*/
|
|
7842
|
+
return /*#__PURE__*/React__default.createElement(StyledWrapper$b, {
|
|
7822
7843
|
testID: testID,
|
|
7823
7844
|
onPress: onPress,
|
|
7824
7845
|
disabled: onPress === undefined,
|
|
7825
7846
|
themeIntent: intent,
|
|
7826
7847
|
themeSize: size,
|
|
7827
7848
|
style: style
|
|
7828
|
-
}, (source === undefined || hasImageError) && /*#__PURE__*/
|
|
7849
|
+
}, (source === undefined || hasImageError) && /*#__PURE__*/React__default.createElement(StyledTextWrapper$1, null, /*#__PURE__*/React__default.createElement(StyledText$2, {
|
|
7829
7850
|
themeSize: size
|
|
7830
|
-
}, title)), source !== undefined && /*#__PURE__*/
|
|
7851
|
+
}, title)), source !== undefined && /*#__PURE__*/React__default.createElement(StyledImage, {
|
|
7831
7852
|
resizeMode: "cover",
|
|
7832
7853
|
source: source,
|
|
7833
7854
|
themeSize: size,
|
|
@@ -8072,7 +8093,7 @@ var Box = function Box(_ref) {
|
|
|
8072
8093
|
style = _ref.style,
|
|
8073
8094
|
testID = _ref.testID,
|
|
8074
8095
|
otherProps = _objectWithoutProperties(_ref, _excluded$v);
|
|
8075
|
-
return /*#__PURE__*/
|
|
8096
|
+
return /*#__PURE__*/React__default.createElement(StyledBox, _extends$1({}, otherProps, {
|
|
8076
8097
|
style: style,
|
|
8077
8098
|
testID: testID
|
|
8078
8099
|
}), children);
|
|
@@ -8171,7 +8192,7 @@ var Surplus = function Surplus(_ref) {
|
|
|
8171
8192
|
backgroundColor = _ref.backgroundColor;
|
|
8172
8193
|
if (value > 0) {
|
|
8173
8194
|
if (renderSurplus) {
|
|
8174
|
-
return /*#__PURE__*/
|
|
8195
|
+
return /*#__PURE__*/React__default.createElement(StyledSurplusContainer, {
|
|
8175
8196
|
testID: "surplus-container",
|
|
8176
8197
|
themeSize: size,
|
|
8177
8198
|
themeVariant: variant,
|
|
@@ -8181,7 +8202,7 @@ var Surplus = function Surplus(_ref) {
|
|
|
8181
8202
|
}
|
|
8182
8203
|
}, renderSurplus(value));
|
|
8183
8204
|
}
|
|
8184
|
-
return /*#__PURE__*/
|
|
8205
|
+
return /*#__PURE__*/React__default.createElement(StyledAvatar, {
|
|
8185
8206
|
testID: "surplus-container",
|
|
8186
8207
|
themeVariant: variant,
|
|
8187
8208
|
title: "+".concat(value),
|
|
@@ -8217,7 +8238,7 @@ var AvatarStack = function AvatarStack(_ref2) {
|
|
|
8217
8238
|
}
|
|
8218
8239
|
return remain;
|
|
8219
8240
|
}();
|
|
8220
|
-
return /*#__PURE__*/
|
|
8241
|
+
return /*#__PURE__*/React__default.createElement(StyledWrapper$a, {
|
|
8221
8242
|
themeSize: size,
|
|
8222
8243
|
themeAvatarCount: avatars.length,
|
|
8223
8244
|
themeHasSurplus: remainingAvatar > 0,
|
|
@@ -8225,7 +8246,7 @@ var AvatarStack = function AvatarStack(_ref2) {
|
|
|
8225
8246
|
testID: testID,
|
|
8226
8247
|
themeVariant: variant
|
|
8227
8248
|
}, avatars.map(function (avt, index) {
|
|
8228
|
-
return /*#__PURE__*/
|
|
8249
|
+
return /*#__PURE__*/React__default.createElement(StyledAvatar, _extends$1({
|
|
8229
8250
|
themeVariant: variant
|
|
8230
8251
|
}, avt.props, {
|
|
8231
8252
|
size: size,
|
|
@@ -8234,7 +8255,7 @@ var AvatarStack = function AvatarStack(_ref2) {
|
|
|
8234
8255
|
backgroundColor: colors[index % colors.length]
|
|
8235
8256
|
}
|
|
8236
8257
|
}));
|
|
8237
|
-
}), /*#__PURE__*/
|
|
8258
|
+
}), /*#__PURE__*/React__default.createElement(Surplus, {
|
|
8238
8259
|
value: remainingAvatar,
|
|
8239
8260
|
index: avatars.length,
|
|
8240
8261
|
size: size,
|
|
@@ -8295,10 +8316,10 @@ var Status = function Status(_ref) {
|
|
|
8295
8316
|
style = _ref.style,
|
|
8296
8317
|
testID = _ref.testID,
|
|
8297
8318
|
nativeProps = _objectWithoutProperties(_ref, _excluded$u);
|
|
8298
|
-
var _React$useRef =
|
|
8319
|
+
var _React$useRef = React__default.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
8299
8320
|
opacity = _React$useRef.current;
|
|
8300
|
-
var isFirstRendering =
|
|
8301
|
-
|
|
8321
|
+
var isFirstRendering = React__default.useRef(true);
|
|
8322
|
+
React__default.useEffect(function () {
|
|
8302
8323
|
// Do not run animation on very first rendering
|
|
8303
8324
|
if (isFirstRendering.current) {
|
|
8304
8325
|
isFirstRendering.current = false;
|
|
@@ -8310,10 +8331,10 @@ var Status = function Status(_ref) {
|
|
|
8310
8331
|
useNativeDriver: true
|
|
8311
8332
|
}).start();
|
|
8312
8333
|
}, [visible, opacity]);
|
|
8313
|
-
return /*#__PURE__*/
|
|
8334
|
+
return /*#__PURE__*/React__default.createElement(View, _extends$1({}, nativeProps, {
|
|
8314
8335
|
style: style,
|
|
8315
8336
|
testID: testID
|
|
8316
|
-
}), children, /*#__PURE__*/
|
|
8337
|
+
}), children, /*#__PURE__*/React__default.createElement(StyledStatus, {
|
|
8317
8338
|
style: {
|
|
8318
8339
|
opacity: opacity,
|
|
8319
8340
|
transform: [{
|
|
@@ -8343,10 +8364,10 @@ var Badge = function Badge(_ref) {
|
|
|
8343
8364
|
style = _ref.style,
|
|
8344
8365
|
testID = _ref.testID,
|
|
8345
8366
|
nativeProps = _objectWithoutProperties(_ref, _excluded$t);
|
|
8346
|
-
var _React$useRef =
|
|
8367
|
+
var _React$useRef = React__default.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
8347
8368
|
opacity = _React$useRef.current;
|
|
8348
|
-
var isFirstRendering =
|
|
8349
|
-
|
|
8369
|
+
var isFirstRendering = React__default.useRef(true);
|
|
8370
|
+
React__default.useEffect(function () {
|
|
8350
8371
|
// Do not run animation on very first rendering
|
|
8351
8372
|
if (isFirstRendering.current) {
|
|
8352
8373
|
isFirstRendering.current = false;
|
|
@@ -8359,7 +8380,7 @@ var Badge = function Badge(_ref) {
|
|
|
8359
8380
|
}).start();
|
|
8360
8381
|
}, [visible, opacity]);
|
|
8361
8382
|
var content = typeof originalContent === 'number' && originalContent > max ? "".concat(max, "+") : String(originalContent);
|
|
8362
|
-
return /*#__PURE__*/
|
|
8383
|
+
return /*#__PURE__*/React__default.createElement(StyledView$2, _extends$1({}, nativeProps, {
|
|
8363
8384
|
themeIntent: intent,
|
|
8364
8385
|
themePadding: getPaddingState(content),
|
|
8365
8386
|
style: [{
|
|
@@ -8372,7 +8393,7 @@ var Badge = function Badge(_ref) {
|
|
|
8372
8393
|
}]
|
|
8373
8394
|
}, style],
|
|
8374
8395
|
testID: testID
|
|
8375
|
-
}), /*#__PURE__*/
|
|
8396
|
+
}), /*#__PURE__*/React__default.createElement(StyledText$1, null, content));
|
|
8376
8397
|
};
|
|
8377
8398
|
var Badge$1 = Object.assign(Badge, {
|
|
8378
8399
|
Status: Status
|
|
@@ -8446,7 +8467,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
8446
8467
|
/**
|
|
8447
8468
|
* List of loaded tabs, tabs will be loaded when navigated to.
|
|
8448
8469
|
*/
|
|
8449
|
-
var _React$useState =
|
|
8470
|
+
var _React$useState = React__default.useState([selectedTabKey]),
|
|
8450
8471
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
8451
8472
|
loaded = _React$useState2[0],
|
|
8452
8473
|
setLoaded = _React$useState2[1];
|
|
@@ -8456,7 +8477,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
8456
8477
|
return [].concat(_toConsumableArray(loadedState), [selectedTabKey]);
|
|
8457
8478
|
});
|
|
8458
8479
|
}
|
|
8459
|
-
return /*#__PURE__*/
|
|
8480
|
+
return /*#__PURE__*/React__default.createElement(BottomNavigationContainer, nativeProps, /*#__PURE__*/React__default.createElement(ContentWrapper$2, null, tabs.map(function (tab) {
|
|
8460
8481
|
var key = tab.key,
|
|
8461
8482
|
component = tab.component,
|
|
8462
8483
|
testID = tab.testID;
|
|
@@ -8468,7 +8489,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
8468
8489
|
// Don't render a screen if we've never navigated to it
|
|
8469
8490
|
return null;
|
|
8470
8491
|
}
|
|
8471
|
-
return /*#__PURE__*/
|
|
8492
|
+
return /*#__PURE__*/React__default.createElement(BottomNavigationTab, {
|
|
8472
8493
|
key: key,
|
|
8473
8494
|
testID: testID ? "route-screen-".concat(testID) : undefined,
|
|
8474
8495
|
pointerEvents: active ? 'auto' : 'none',
|
|
@@ -8481,26 +8502,26 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
8481
8502
|
isIOS ? selectedTabKey !== key : true,
|
|
8482
8503
|
themeVisibility: active
|
|
8483
8504
|
}, component);
|
|
8484
|
-
})), /*#__PURE__*/
|
|
8505
|
+
})), /*#__PURE__*/React__default.createElement(BottomBarWrapper, {
|
|
8485
8506
|
themeInsets: insets
|
|
8486
|
-
}, /*#__PURE__*/
|
|
8507
|
+
}, /*#__PURE__*/React__default.createElement(BottomBar, null, tabs.map(function (tab) {
|
|
8487
8508
|
var key = tab.key,
|
|
8488
8509
|
icon = tab.icon,
|
|
8489
8510
|
title = tab.title,
|
|
8490
8511
|
testID = tab.testID;
|
|
8491
8512
|
var active = selectedTabKey === key;
|
|
8492
8513
|
var inactiveIcon = getInactiveIcon(icon);
|
|
8493
|
-
return /*#__PURE__*/
|
|
8514
|
+
return /*#__PURE__*/React__default.createElement(TouchableWithoutFeedback, {
|
|
8494
8515
|
key: key,
|
|
8495
8516
|
onPress: function onPress() {
|
|
8496
8517
|
return onTabPress(key);
|
|
8497
8518
|
},
|
|
8498
8519
|
testID: testID
|
|
8499
|
-
}, /*#__PURE__*/
|
|
8520
|
+
}, /*#__PURE__*/React__default.createElement(BottomBarItem, null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
8500
8521
|
icon: active ? icon : inactiveIcon,
|
|
8501
8522
|
intent: active ? 'primary' : 'text',
|
|
8502
8523
|
testID: "hero-icon-".concat(icon)
|
|
8503
|
-
}), !!title && /*#__PURE__*/
|
|
8524
|
+
}), !!title && /*#__PURE__*/React__default.createElement(StyledBottomBarText, {
|
|
8504
8525
|
fontWeight: "semi-bold",
|
|
8505
8526
|
intent: active ? 'primary' : 'body',
|
|
8506
8527
|
numberOfLines: 1
|
|
@@ -8534,7 +8555,7 @@ var Divider = function Divider(_ref) {
|
|
|
8534
8555
|
style = _ref.style,
|
|
8535
8556
|
testID = _ref.testID,
|
|
8536
8557
|
nativeProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
8537
|
-
return /*#__PURE__*/
|
|
8558
|
+
return /*#__PURE__*/React__default.createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
8538
8559
|
themeMarginHorizontal: marginHorizontal,
|
|
8539
8560
|
themeMarginVertical: marginVertical,
|
|
8540
8561
|
style: style,
|
|
@@ -8611,7 +8632,7 @@ var StyledIconWrapper$4 = index$9(View)(function (_ref5) {
|
|
|
8611
8632
|
var Footer$1 = function Footer(_ref) {
|
|
8612
8633
|
var children = _ref.children,
|
|
8613
8634
|
showDivider = _ref.showDivider;
|
|
8614
|
-
return /*#__PURE__*/
|
|
8635
|
+
return /*#__PURE__*/React__default.createElement(View, null, showDivider ? /*#__PURE__*/React__default.createElement(Divider, null) : null, /*#__PURE__*/React__default.createElement(StyledFooter, null, children));
|
|
8615
8636
|
};
|
|
8616
8637
|
|
|
8617
8638
|
var genLoadingIndicatorStyles = function genLoadingIndicatorStyles(theme, intent) {
|
|
@@ -8670,14 +8691,14 @@ var renderDotComponent = function renderDotComponent(_ref) {
|
|
|
8670
8691
|
inputRange: [0.0, (index + 0.5) / (count + 1), (index + 1.0) / (count + 1), (index + 1.5) / (count + 1), 1.0],
|
|
8671
8692
|
outputRange: [1.0, 1.36, 1.56, 1.06, 1.0]
|
|
8672
8693
|
});
|
|
8673
|
-
return /*#__PURE__*/
|
|
8694
|
+
return /*#__PURE__*/React__default.createElement(Animated.View, {
|
|
8674
8695
|
style: StyleSheet$1.flatten([{
|
|
8675
8696
|
transform: [{
|
|
8676
8697
|
scale: interpolatedProgressAnimation
|
|
8677
8698
|
}]
|
|
8678
8699
|
}]),
|
|
8679
8700
|
key: index
|
|
8680
|
-
}, /*#__PURE__*/
|
|
8701
|
+
}, /*#__PURE__*/React__default.createElement(AnimatedLoadingDot, {
|
|
8681
8702
|
size: size,
|
|
8682
8703
|
themeVariant: themeVariant
|
|
8683
8704
|
}));
|
|
@@ -8715,7 +8736,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
8715
8736
|
}
|
|
8716
8737
|
return null;
|
|
8717
8738
|
};
|
|
8718
|
-
return /*#__PURE__*/
|
|
8739
|
+
return /*#__PURE__*/React__default.createElement(AnimatedLoadingIndicatorWrapper, _extends$1({
|
|
8719
8740
|
testID: testID
|
|
8720
8741
|
}, nativeProps), Array.from(new Array(count), renderLoadingDot, themeVariant));
|
|
8721
8742
|
};
|
|
@@ -8982,7 +9003,7 @@ var Button = function Button(_ref) {
|
|
|
8982
9003
|
return getUnderlayColor(theme, themeVariant);
|
|
8983
9004
|
}, [theme, themeVariant]);
|
|
8984
9005
|
useDeprecation("Button variant ".concat(deprecatedVariants.join(', '), " are deprecated."), deprecatedVariants.includes(themeVariant));
|
|
8985
|
-
return /*#__PURE__*/
|
|
9006
|
+
return /*#__PURE__*/React__default.createElement(StyledButtonContainer, {
|
|
8986
9007
|
accessibilityHint: accessibilityHint,
|
|
8987
9008
|
accessibilityLabel: accessibilityLabel,
|
|
8988
9009
|
disabled: disabled || loading,
|
|
@@ -8992,31 +9013,31 @@ var Button = function Button(_ref) {
|
|
|
8992
9013
|
themeButtonVariant: themeVariant,
|
|
8993
9014
|
style: style,
|
|
8994
9015
|
underlayColor: underlayColor
|
|
8995
|
-
}, loading === true ? /*#__PURE__*/
|
|
9016
|
+
}, loading === true ? /*#__PURE__*/React__default.createElement(LoadingIndicator, {
|
|
8996
9017
|
testID: "".concat(testID, "-loading-indicator"),
|
|
8997
9018
|
themeVariant: themeVariant
|
|
8998
|
-
}) : /*#__PURE__*/
|
|
9019
|
+
}) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, icon !== undefined && /*#__PURE__*/React__default.createElement(StyledButtonIconWrapper, {
|
|
8999
9020
|
themePosition: "left"
|
|
9000
|
-
}, isIconName(icon) ? /*#__PURE__*/
|
|
9021
|
+
}, isIconName(icon) ? /*#__PURE__*/React__default.createElement(StyledButtonIcon, {
|
|
9001
9022
|
disabled: disabled,
|
|
9002
9023
|
icon: icon,
|
|
9003
9024
|
testID: "".concat(testID, "-left-icon"),
|
|
9004
9025
|
themeButtonVariant: themeVariant
|
|
9005
|
-
}) : icon), isTextVariant(themeVariant) ? /*#__PURE__*/
|
|
9026
|
+
}) : icon), isTextVariant(themeVariant) ? /*#__PURE__*/React__default.createElement(StyledButtonTitleOfVariantText, {
|
|
9006
9027
|
variant: "regular-bold",
|
|
9007
9028
|
ellipsizeMode: "tail",
|
|
9008
9029
|
numberOfLines: 1,
|
|
9009
9030
|
disabled: disabled,
|
|
9010
9031
|
themeButtonVariant: themeVariant
|
|
9011
|
-
}, text) : /*#__PURE__*/
|
|
9032
|
+
}, text) : /*#__PURE__*/React__default.createElement(StyledButtonText, {
|
|
9012
9033
|
level: "h5",
|
|
9013
9034
|
ellipsizeMode: "tail",
|
|
9014
9035
|
numberOfLines: 1,
|
|
9015
9036
|
disabled: disabled,
|
|
9016
9037
|
themeButtonVariant: themeVariant
|
|
9017
|
-
}, text), rightIcon !== undefined && /*#__PURE__*/
|
|
9038
|
+
}, text), rightIcon !== undefined && /*#__PURE__*/React__default.createElement(StyledButtonIconWrapper, {
|
|
9018
9039
|
themePosition: "right"
|
|
9019
|
-
}, isIconName(rightIcon) ? /*#__PURE__*/
|
|
9040
|
+
}, isIconName(rightIcon) ? /*#__PURE__*/React__default.createElement(StyledButtonIcon, {
|
|
9020
9041
|
disabled: disabled,
|
|
9021
9042
|
icon: rightIcon,
|
|
9022
9043
|
testID: "".concat(testID, "-right-icon"),
|
|
@@ -9033,13 +9054,13 @@ var IconButton = function IconButton(_ref) {
|
|
|
9033
9054
|
style = _ref.style,
|
|
9034
9055
|
size = _ref.size,
|
|
9035
9056
|
intent = _ref.intent;
|
|
9036
|
-
return /*#__PURE__*/
|
|
9057
|
+
return /*#__PURE__*/React__default.createElement(TouchableOpacity, {
|
|
9037
9058
|
style: style,
|
|
9038
9059
|
onPress: onPress,
|
|
9039
9060
|
testID: testID,
|
|
9040
9061
|
hitSlop: hitSlop,
|
|
9041
9062
|
disabled: disabled
|
|
9042
|
-
}, /*#__PURE__*/
|
|
9063
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
9043
9064
|
icon: icon,
|
|
9044
9065
|
size: size,
|
|
9045
9066
|
intent: disabled ? 'disabled-text' : intent
|
|
@@ -9082,16 +9103,16 @@ var UtilityButton = function UtilityButton(_ref) {
|
|
|
9082
9103
|
intent = _ref$intent === void 0 ? 'text' : _ref$intent,
|
|
9083
9104
|
style = _ref.style,
|
|
9084
9105
|
hitSlop = _ref.hitSlop;
|
|
9085
|
-
return /*#__PURE__*/
|
|
9106
|
+
return /*#__PURE__*/React__default.createElement(ButtonContainer, {
|
|
9086
9107
|
style: style,
|
|
9087
9108
|
onPress: onPress,
|
|
9088
9109
|
testID: testID,
|
|
9089
9110
|
hitSlop: hitSlop
|
|
9090
|
-
}, /*#__PURE__*/
|
|
9111
|
+
}, /*#__PURE__*/React__default.createElement(IconWrapper, null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
9091
9112
|
icon: icon,
|
|
9092
9113
|
intent: intent,
|
|
9093
9114
|
testID: "".concat(testID, "-icon")
|
|
9094
|
-
})), /*#__PURE__*/
|
|
9115
|
+
})), /*#__PURE__*/React__default.createElement(ButtonText, {
|
|
9095
9116
|
intent: TEXT_INTENTS[intent]
|
|
9096
9117
|
}, text));
|
|
9097
9118
|
};
|
|
@@ -9109,19 +9130,19 @@ var Header = function Header(_ref) {
|
|
|
9109
9130
|
_ref$onRequestClose = _ref.onRequestClose,
|
|
9110
9131
|
onRequestClose = _ref$onRequestClose === void 0 ? noop$1 : _ref$onRequestClose,
|
|
9111
9132
|
showCloseButton = _ref.showCloseButton;
|
|
9112
|
-
return /*#__PURE__*/
|
|
9133
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StyledHeaderWrapper, null, typeof content === 'string' ? /*#__PURE__*/React__default.createElement(StyledHeader, null, /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
9113
9134
|
variant: "regular-bold"
|
|
9114
|
-
}, content)) : /*#__PURE__*/
|
|
9135
|
+
}, content)) : /*#__PURE__*/React__default.createElement(View, {
|
|
9115
9136
|
style: {
|
|
9116
9137
|
flex: 1
|
|
9117
9138
|
}
|
|
9118
|
-
}, content), showCloseButton ? /*#__PURE__*/
|
|
9139
|
+
}, content), showCloseButton ? /*#__PURE__*/React__default.createElement(StyledIconWrapper$4, null, /*#__PURE__*/React__default.createElement(CompoundButton.Icon, {
|
|
9119
9140
|
icon: "cancel",
|
|
9120
9141
|
onPress: onRequestClose,
|
|
9121
9142
|
intent: "text",
|
|
9122
9143
|
testID: "bottom-sheet-close-icon",
|
|
9123
9144
|
size: "xsmall"
|
|
9124
|
-
})) : null), showDivider ? /*#__PURE__*/
|
|
9145
|
+
})) : null), showDivider ? /*#__PURE__*/React__default.createElement(Divider, null) : null);
|
|
9125
9146
|
};
|
|
9126
9147
|
|
|
9127
9148
|
var _excluded$p = ["scrollEventThrottle"];
|
|
@@ -9146,7 +9167,7 @@ var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
|
|
|
9146
9167
|
setInternalShowDivider(false);
|
|
9147
9168
|
props === null || props === void 0 || (_props$onMomentumScro2 = props.onMomentumScrollEnd) === null || _props$onMomentumScro2 === void 0 || _props$onMomentumScro2.call(props, e);
|
|
9148
9169
|
}, []);
|
|
9149
|
-
return /*#__PURE__*/
|
|
9170
|
+
return /*#__PURE__*/React__default.createElement(ScrollView, _extends$1({}, props, {
|
|
9150
9171
|
onScrollBeginDrag: onScrollBeginDrag,
|
|
9151
9172
|
onMomentumScrollBegin: onMomentumScrollBegin,
|
|
9152
9173
|
onMomentumScrollEnd: onMomentumScrollEnd,
|
|
@@ -9230,22 +9251,22 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
9230
9251
|
setInternalShowDivider: setInternalShowDivider
|
|
9231
9252
|
};
|
|
9232
9253
|
}, [setInternalShowDivider]);
|
|
9233
|
-
return /*#__PURE__*/
|
|
9254
|
+
return /*#__PURE__*/React__default.createElement(Modal$1, {
|
|
9234
9255
|
visible: visible,
|
|
9235
9256
|
onRequestClose: onRequestClose,
|
|
9236
9257
|
transparent: true,
|
|
9237
9258
|
testID: testID,
|
|
9238
9259
|
onShow: onOpen
|
|
9239
|
-
}, /*#__PURE__*/
|
|
9260
|
+
}, /*#__PURE__*/React__default.createElement(StyledWrapper$9, {
|
|
9240
9261
|
pointerEvents: "box-none"
|
|
9241
|
-
}, /*#__PURE__*/
|
|
9262
|
+
}, /*#__PURE__*/React__default.createElement(StyledKeyboardAvoidingView, _extends$1({
|
|
9242
9263
|
behavior: Platform.OS === 'ios' ? 'padding' : 'height'
|
|
9243
|
-
}, keyboardAvoidingViewProps), /*#__PURE__*/
|
|
9264
|
+
}, keyboardAvoidingViewProps), /*#__PURE__*/React__default.createElement(StyledBackdrop$2, {
|
|
9244
9265
|
style: {
|
|
9245
9266
|
opacity: interpolateOpacity
|
|
9246
9267
|
},
|
|
9247
9268
|
onPress: onRequestClose
|
|
9248
|
-
}), /*#__PURE__*/
|
|
9269
|
+
}), /*#__PURE__*/React__default.createElement(StyledBottomSheet, {
|
|
9249
9270
|
style: [style, {
|
|
9250
9271
|
transform: [{
|
|
9251
9272
|
scaleY: height > 0 ? 1 : 0
|
|
@@ -9253,14 +9274,14 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
9253
9274
|
translateY: interpolateY
|
|
9254
9275
|
}]
|
|
9255
9276
|
}]
|
|
9256
|
-
}, header !== undefined ? /*#__PURE__*/
|
|
9277
|
+
}, header !== undefined ? /*#__PURE__*/React__default.createElement(Header, {
|
|
9257
9278
|
content: header,
|
|
9258
9279
|
showDivider: internalShowDivider,
|
|
9259
9280
|
onRequestClose: onRequestClose,
|
|
9260
9281
|
showCloseButton: showCloseButton
|
|
9261
|
-
}) : null, /*#__PURE__*/
|
|
9282
|
+
}) : null, /*#__PURE__*/React__default.createElement(BottomSheetContext.Provider, {
|
|
9262
9283
|
value: BottomSheetContextValue
|
|
9263
|
-
}, children), footer ? /*#__PURE__*/
|
|
9284
|
+
}, children), footer ? /*#__PURE__*/React__default.createElement(Footer$1, {
|
|
9264
9285
|
showDivider: showDivider
|
|
9265
9286
|
}, footer) : null))));
|
|
9266
9287
|
};
|
|
@@ -11561,29 +11582,29 @@ function ContentNavigator(_ref) {
|
|
|
11561
11582
|
testID = _ref.testID,
|
|
11562
11583
|
style = _ref.style;
|
|
11563
11584
|
var theme = useTheme();
|
|
11564
|
-
return /*#__PURE__*/
|
|
11585
|
+
return /*#__PURE__*/React__default.createElement(Wrapper, {
|
|
11565
11586
|
testID: testID,
|
|
11566
11587
|
style: style
|
|
11567
|
-
}, /*#__PURE__*/
|
|
11588
|
+
}, /*#__PURE__*/React__default.createElement(CompoundButton.Icon, {
|
|
11568
11589
|
icon: "arrow-left",
|
|
11569
11590
|
onPress: onPreviousPress,
|
|
11570
11591
|
disabled: previousDisabled,
|
|
11571
11592
|
testID: "previous-icon-button"
|
|
11572
|
-
}), fontSize === 'medium' ? /*#__PURE__*/
|
|
11593
|
+
}), fontSize === 'medium' ? /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
11573
11594
|
style: {
|
|
11574
11595
|
paddingHorizontal: theme.__hd__.contentNavigator.space.valueHorizontalPadding
|
|
11575
11596
|
},
|
|
11576
11597
|
variant: "small-bold",
|
|
11577
11598
|
onPress: onPress,
|
|
11578
11599
|
testID: "content-navigator-value"
|
|
11579
|
-
}, value) : /*#__PURE__*/
|
|
11600
|
+
}, value) : /*#__PURE__*/React__default.createElement(Typography.Title, {
|
|
11580
11601
|
style: {
|
|
11581
11602
|
paddingHorizontal: theme.__hd__.contentNavigator.space.valueHorizontalPadding
|
|
11582
11603
|
},
|
|
11583
11604
|
level: "h5",
|
|
11584
11605
|
onPress: onPress,
|
|
11585
11606
|
testID: "content-navigator-value"
|
|
11586
|
-
}, value), /*#__PURE__*/
|
|
11607
|
+
}, value), /*#__PURE__*/React__default.createElement(CompoundButton.Icon, {
|
|
11587
11608
|
icon: "arrow-right",
|
|
11588
11609
|
onPress: onNextPress,
|
|
11589
11610
|
disabled: nextDisabled,
|
|
@@ -11640,7 +11661,7 @@ var StyledCalendarRow = index$9(View)(function (_ref5) {
|
|
|
11640
11661
|
var StyledCalendarRowItem = index$9(View)(function (_ref6) {
|
|
11641
11662
|
var theme = _ref6.theme;
|
|
11642
11663
|
return {
|
|
11643
|
-
flexBasis: "".concat(Math.floor(100.0 / 7.0)
|
|
11664
|
+
flexBasis: "".concat(Math.floor(100.0 / 7.0), "%"),
|
|
11644
11665
|
alignItems: 'center',
|
|
11645
11666
|
width: theme.__hd__.calendar.sizes.cellWidth,
|
|
11646
11667
|
height: theme.__hd__.calendar.sizes.cellHeight,
|
|
@@ -11650,7 +11671,7 @@ var StyledCalendarRowItem = index$9(View)(function (_ref6) {
|
|
|
11650
11671
|
var StyledDisabledCalendarRowItem = index$9(View)(function (_ref7) {
|
|
11651
11672
|
var theme = _ref7.theme;
|
|
11652
11673
|
return {
|
|
11653
|
-
flexBasis: "".concat(Math.floor(100.0 / 7.0)
|
|
11674
|
+
flexBasis: "".concat(Math.floor(100.0 / 7.0), "%"),
|
|
11654
11675
|
alignItems: 'center',
|
|
11655
11676
|
width: theme.__hd__.calendar.sizes.cellWidth,
|
|
11656
11677
|
height: theme.__hd__.calendar.sizes.cellHeight
|
|
@@ -11686,15 +11707,15 @@ var CalendarRowItem = function CalendarRowItem(_ref) {
|
|
|
11686
11707
|
textIntent = _ref$textIntent === void 0 ? 'body' : _ref$textIntent,
|
|
11687
11708
|
_ref$marked = _ref.marked,
|
|
11688
11709
|
marked = _ref$marked === void 0 ? false : _ref$marked;
|
|
11689
|
-
return /*#__PURE__*/
|
|
11710
|
+
return /*#__PURE__*/React__default.createElement(StyledCalendarRowItem, {
|
|
11690
11711
|
testID: "calendar-date-cell"
|
|
11691
|
-
}, /*#__PURE__*/
|
|
11712
|
+
}, /*#__PURE__*/React__default.createElement(StyledCalendarCell, {
|
|
11692
11713
|
variant: getCellVariant(isSelected, isCurrent),
|
|
11693
11714
|
onPress: onPress
|
|
11694
|
-
}, /*#__PURE__*/
|
|
11715
|
+
}, /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
11695
11716
|
variant: "small",
|
|
11696
11717
|
intent: isSelected ? 'inverted' : textIntent
|
|
11697
|
-
}, date ? date.getDate() : ''), marked ? /*#__PURE__*/
|
|
11718
|
+
}, date ? date.getDate() : ''), marked ? /*#__PURE__*/React__default.createElement(StyledMark, {
|
|
11698
11719
|
testID: "calendar-date-mark",
|
|
11699
11720
|
variant: isSelected ? 'inverted' : 'primary'
|
|
11700
11721
|
}) : null));
|
|
@@ -11759,11 +11780,11 @@ var Calendar = function Calendar(_ref) {
|
|
|
11759
11780
|
var parsedMaskedDate = markedDates.reduce(function (current, markedDate) {
|
|
11760
11781
|
return _objectSpread2(_objectSpread2({}, current), {}, _defineProperty({}, markedDate.toDateString(), true));
|
|
11761
11782
|
}, {});
|
|
11762
|
-
var _React$useState =
|
|
11783
|
+
var _React$useState = React__default.useState(false),
|
|
11763
11784
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
11764
11785
|
monthPickerVisible = _React$useState2[0],
|
|
11765
11786
|
setMonthPickerVisible = _React$useState2[1];
|
|
11766
|
-
var _React$useState3 =
|
|
11787
|
+
var _React$useState3 = React__default.useState(0),
|
|
11767
11788
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
11768
11789
|
contentHeight = _React$useState4[0],
|
|
11769
11790
|
setContentHeight = _React$useState4[1];
|
|
@@ -11792,26 +11813,26 @@ var Calendar = function Calendar(_ref) {
|
|
|
11792
11813
|
var disableNextButton = maxDate === undefined ? false : !daysOfNextMonth.some(function (date) {
|
|
11793
11814
|
return date !== undefined;
|
|
11794
11815
|
}) || maxDate <= lastDateOfMonth;
|
|
11795
|
-
return /*#__PURE__*/
|
|
11816
|
+
return /*#__PURE__*/React__default.createElement(StyledContainer$5, {
|
|
11796
11817
|
testID: testID
|
|
11797
|
-
}, /*#__PURE__*/
|
|
11798
|
-
value: !useMonthPicker ? formatTime('MMMM yyyy', visibleDate) : /*#__PURE__*/
|
|
11818
|
+
}, /*#__PURE__*/React__default.createElement(StyledCalendarHeader, null, /*#__PURE__*/React__default.createElement(ContentNavigator, {
|
|
11819
|
+
value: !useMonthPicker ? formatTime('MMMM yyyy', visibleDate) : /*#__PURE__*/React__default.createElement(TouchableOpacity, {
|
|
11799
11820
|
testID: "calendar-month-picker",
|
|
11800
11821
|
onPress: function onPress() {
|
|
11801
11822
|
onToggleMonthPicker === null || onToggleMonthPicker === void 0 || onToggleMonthPicker(!monthPickerVisible);
|
|
11802
11823
|
setMonthPickerVisible(!monthPickerVisible);
|
|
11803
11824
|
}
|
|
11804
|
-
}, /*#__PURE__*/
|
|
11825
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
11805
11826
|
flexDirection: "row",
|
|
11806
11827
|
justifyContent: "center",
|
|
11807
11828
|
alignItems: "center"
|
|
11808
|
-
}, /*#__PURE__*/
|
|
11829
|
+
}, /*#__PURE__*/React__default.createElement(Typography.Title, {
|
|
11809
11830
|
level: "h5",
|
|
11810
11831
|
style: {
|
|
11811
11832
|
textAlign: 'center',
|
|
11812
11833
|
marginRight: theme.__hd__.calendar.space.headerMarginRight
|
|
11813
11834
|
}
|
|
11814
|
-
}, formatTime('MMMM yyyy', visibleDate)), /*#__PURE__*/
|
|
11835
|
+
}, formatTime('MMMM yyyy', visibleDate)), /*#__PURE__*/React__default.createElement(Icon, {
|
|
11815
11836
|
icon: monthPickerVisible ? 'arrow-up' : 'arrow-down',
|
|
11816
11837
|
size: "small"
|
|
11817
11838
|
}))),
|
|
@@ -11821,11 +11842,11 @@ var Calendar = function Calendar(_ref) {
|
|
|
11821
11842
|
previousDisabled: disablePrevButton,
|
|
11822
11843
|
nextDisabled: disableNextButton,
|
|
11823
11844
|
fontSize: "large"
|
|
11824
|
-
})), Platform.OS === 'ios' && monthPickerVisible ? /*#__PURE__*/
|
|
11845
|
+
})), Platform.OS === 'ios' && monthPickerVisible ? /*#__PURE__*/React__default.createElement(Box, {
|
|
11825
11846
|
style: {
|
|
11826
11847
|
overflow: 'hidden'
|
|
11827
11848
|
}
|
|
11828
|
-
}, /*#__PURE__*/
|
|
11849
|
+
}, /*#__PURE__*/React__default.createElement(MonthYearPickerViewIOS, {
|
|
11829
11850
|
value: value,
|
|
11830
11851
|
minimumDate: minDate,
|
|
11831
11852
|
maximumDate: maxDate,
|
|
@@ -11834,18 +11855,18 @@ var Calendar = function Calendar(_ref) {
|
|
|
11834
11855
|
height: contentHeight + theme.__hd__.calendar.space.iosPickerMarginVertical * 2,
|
|
11835
11856
|
marginVertical: -theme.__hd__.calendar.space.iosPickerMarginVertical
|
|
11836
11857
|
}
|
|
11837
|
-
})) : /*#__PURE__*/
|
|
11858
|
+
})) : /*#__PURE__*/React__default.createElement(Box, {
|
|
11838
11859
|
onLayout: Platform.OS === 'ios' ? function (e) {
|
|
11839
11860
|
return setContentHeight(e.nativeEvent.layout.height);
|
|
11840
11861
|
} : undefined
|
|
11841
|
-
}, /*#__PURE__*/
|
|
11842
|
-
return /*#__PURE__*/
|
|
11862
|
+
}, /*#__PURE__*/React__default.createElement(StyledCalendarRow, null, DAYS_OF_WEEK.map(function (day) {
|
|
11863
|
+
return /*#__PURE__*/React__default.createElement(StyledCalendarRowItem, {
|
|
11843
11864
|
key: day
|
|
11844
|
-
}, /*#__PURE__*/
|
|
11865
|
+
}, /*#__PURE__*/React__default.createElement(StyledCalendarDayNameCell, null, /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
11845
11866
|
variant: "small"
|
|
11846
11867
|
}, day)));
|
|
11847
|
-
})), /*#__PURE__*/
|
|
11848
|
-
return date ? /*#__PURE__*/
|
|
11868
|
+
})), /*#__PURE__*/React__default.createElement(StyledCalendarRow, null, daysOfPreviousMonth.map(function (date) {
|
|
11869
|
+
return date ? /*#__PURE__*/React__default.createElement(CalendarRowItem, {
|
|
11849
11870
|
key: date.toDateString(),
|
|
11850
11871
|
date: date,
|
|
11851
11872
|
isCurrent: isEqDate(now, date),
|
|
@@ -11855,11 +11876,11 @@ var Calendar = function Calendar(_ref) {
|
|
|
11855
11876
|
},
|
|
11856
11877
|
textIntent: "subdued",
|
|
11857
11878
|
marked: parsedMaskedDate[date.toDateString()]
|
|
11858
|
-
}) : /*#__PURE__*/
|
|
11879
|
+
}) : /*#__PURE__*/React__default.createElement(StyledDisabledCalendarRowItem, {
|
|
11859
11880
|
testID: "calendar-disabled-cell"
|
|
11860
11881
|
});
|
|
11861
11882
|
}), daysOfCurrentMonth.map(function (date) {
|
|
11862
|
-
return date ? /*#__PURE__*/
|
|
11883
|
+
return date ? /*#__PURE__*/React__default.createElement(CalendarRowItem, {
|
|
11863
11884
|
key: date.toDateString(),
|
|
11864
11885
|
date: date,
|
|
11865
11886
|
isCurrent: isEqDate(now, date),
|
|
@@ -11868,11 +11889,11 @@ var Calendar = function Calendar(_ref) {
|
|
|
11868
11889
|
return onChange === null || onChange === void 0 ? void 0 : onChange(date);
|
|
11869
11890
|
},
|
|
11870
11891
|
marked: parsedMaskedDate[date.toDateString()]
|
|
11871
|
-
}) : /*#__PURE__*/
|
|
11892
|
+
}) : /*#__PURE__*/React__default.createElement(StyledDisabledCalendarRowItem, {
|
|
11872
11893
|
testID: "calendar-disabled-cell"
|
|
11873
11894
|
});
|
|
11874
11895
|
}), daysOfNextMonth.map(function (date) {
|
|
11875
|
-
return date ? /*#__PURE__*/
|
|
11896
|
+
return date ? /*#__PURE__*/React__default.createElement(CalendarRowItem, {
|
|
11876
11897
|
key: date.toDateString(),
|
|
11877
11898
|
date: date,
|
|
11878
11899
|
isCurrent: isEqDate(now, date),
|
|
@@ -11882,10 +11903,10 @@ var Calendar = function Calendar(_ref) {
|
|
|
11882
11903
|
},
|
|
11883
11904
|
textIntent: "subdued",
|
|
11884
11905
|
marked: parsedMaskedDate[date.toDateString()]
|
|
11885
|
-
}) : /*#__PURE__*/
|
|
11906
|
+
}) : /*#__PURE__*/React__default.createElement(StyledDisabledCalendarRowItem, {
|
|
11886
11907
|
testID: "calendar-disabled-cell"
|
|
11887
11908
|
});
|
|
11888
|
-
})), Platform.OS === 'android' && monthPickerVisible && /*#__PURE__*/
|
|
11909
|
+
})), Platform.OS === 'android' && monthPickerVisible && /*#__PURE__*/React__default.createElement(MonthYearPickerDialogueAndroid, {
|
|
11889
11910
|
doneButtonLabel: monthPickerConfirmLabel,
|
|
11890
11911
|
cancelButtonLabel: monthPickerCancelLabel,
|
|
11891
11912
|
value: value,
|
|
@@ -11925,7 +11946,7 @@ var DataCard = function DataCard(_ref) {
|
|
|
11925
11946
|
intent = _ref$intent === void 0 ? 'info' : _ref$intent,
|
|
11926
11947
|
children = _ref.children,
|
|
11927
11948
|
nativeProps = _objectWithoutProperties(_ref, _excluded$o);
|
|
11928
|
-
return /*#__PURE__*/
|
|
11949
|
+
return /*#__PURE__*/React__default.createElement(StyledDataCard, nativeProps, /*#__PURE__*/React__default.createElement(Indicator, {
|
|
11929
11950
|
themeIntent: intent,
|
|
11930
11951
|
testID: "data-card-indicator"
|
|
11931
11952
|
}), children);
|
|
@@ -11947,7 +11968,7 @@ var Card = function Card(_ref) {
|
|
|
11947
11968
|
var intent = _ref.intent,
|
|
11948
11969
|
children = _ref.children,
|
|
11949
11970
|
nativeProps = _objectWithoutProperties(_ref, _excluded$n);
|
|
11950
|
-
return /*#__PURE__*/
|
|
11971
|
+
return /*#__PURE__*/React__default.createElement(StyledCard$1, _extends$1({}, nativeProps, {
|
|
11951
11972
|
themeIntent: intent
|
|
11952
11973
|
}), children);
|
|
11953
11974
|
};
|
|
@@ -11979,14 +12000,14 @@ var PageControl = function PageControl(_ref) {
|
|
|
11979
12000
|
testID = _ref.testID,
|
|
11980
12001
|
style = _ref.style;
|
|
11981
12002
|
var theme = useTheme();
|
|
11982
|
-
var animatedValue =
|
|
11983
|
-
|
|
12003
|
+
var animatedValue = React__default.useRef(new Animated.Value(currentPage)).current;
|
|
12004
|
+
React__default.useEffect(function () {
|
|
11984
12005
|
Animated.spring(animatedValue, {
|
|
11985
12006
|
toValue: currentPage,
|
|
11986
12007
|
useNativeDriver: false // Native driver does not support animating width, it will cause the app to crash if set to true
|
|
11987
12008
|
}).start();
|
|
11988
12009
|
}, [currentPage]);
|
|
11989
|
-
return /*#__PURE__*/
|
|
12010
|
+
return /*#__PURE__*/React__default.createElement(StyledPageControl$2, {
|
|
11990
12011
|
testID: testID,
|
|
11991
12012
|
style: style
|
|
11992
12013
|
}, new Array(numberOfPages).fill('').map(function (_, index) {
|
|
@@ -12001,7 +12022,7 @@ var PageControl = function PageControl(_ref) {
|
|
|
12001
12022
|
outputRange: [0.5, 1, 0.5],
|
|
12002
12023
|
extrapolate: 'clamp'
|
|
12003
12024
|
});
|
|
12004
|
-
return /*#__PURE__*/
|
|
12025
|
+
return /*#__PURE__*/React__default.createElement(StyledPageControlAnimatedView, {
|
|
12005
12026
|
accessibilityState: {
|
|
12006
12027
|
selected: index === currentPage
|
|
12007
12028
|
},
|
|
@@ -12099,7 +12120,7 @@ var CardCarousel = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
12099
12120
|
viewPosition: viewPosition
|
|
12100
12121
|
});
|
|
12101
12122
|
}, [currentIndex, items.length, viewPosition]);
|
|
12102
|
-
|
|
12123
|
+
React__default.useImperativeHandle(ref, function () {
|
|
12103
12124
|
return {
|
|
12104
12125
|
snapToIndex: function snapToIndex(index) {
|
|
12105
12126
|
_snapToIndex(index);
|
|
@@ -12145,17 +12166,17 @@ var CardCarousel = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
12145
12166
|
}, [setFlatListWidth, onLayout]);
|
|
12146
12167
|
var renderItem = useCallback(function (_ref3) {
|
|
12147
12168
|
var item = _ref3.item;
|
|
12148
|
-
return /*#__PURE__*/
|
|
12169
|
+
return /*#__PURE__*/React__default.createElement(StyledItemWrapper, {
|
|
12149
12170
|
style: {
|
|
12150
12171
|
width: itemWidth
|
|
12151
12172
|
}
|
|
12152
|
-
}, /*#__PURE__*/
|
|
12173
|
+
}, /*#__PURE__*/React__default.createElement(StyledCard, null, item));
|
|
12153
12174
|
}, [itemWidth]);
|
|
12154
12175
|
var contentContainerPaddingHorizontal = theme.__hd__.cardCarousel.space.contentContainerPaddingHorizontal;
|
|
12155
|
-
return /*#__PURE__*/
|
|
12176
|
+
return /*#__PURE__*/React__default.createElement(StyledWrapper$8, {
|
|
12156
12177
|
style: style,
|
|
12157
12178
|
testID: testID
|
|
12158
|
-
}, /*#__PURE__*/
|
|
12179
|
+
}, /*#__PURE__*/React__default.createElement(FlatList, {
|
|
12159
12180
|
contentInset: {
|
|
12160
12181
|
top: 0,
|
|
12161
12182
|
left: contentContainerPaddingHorizontal,
|
|
@@ -12163,14 +12184,14 @@ var CardCarousel = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
12163
12184
|
right: contentContainerPaddingHorizontal
|
|
12164
12185
|
},
|
|
12165
12186
|
ListHeaderComponent: Platform.select({
|
|
12166
|
-
android: /*#__PURE__*/
|
|
12187
|
+
android: /*#__PURE__*/React__default.createElement(View, {
|
|
12167
12188
|
style: {
|
|
12168
12189
|
width: contentContainerPaddingHorizontal
|
|
12169
12190
|
}
|
|
12170
12191
|
})
|
|
12171
12192
|
}),
|
|
12172
12193
|
ListFooterComponent: Platform.select({
|
|
12173
|
-
android: /*#__PURE__*/
|
|
12194
|
+
android: /*#__PURE__*/React__default.createElement(View, {
|
|
12174
12195
|
style: {
|
|
12175
12196
|
width: contentContainerPaddingHorizontal
|
|
12176
12197
|
}
|
|
@@ -12199,7 +12220,7 @@ var CardCarousel = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
12199
12220
|
viewabilityConfig: {
|
|
12200
12221
|
itemVisiblePercentThreshold: 80
|
|
12201
12222
|
}
|
|
12202
|
-
}), !hidePageControl && /*#__PURE__*/
|
|
12223
|
+
}), !hidePageControl && /*#__PURE__*/React__default.createElement(StyledPageControl$1, {
|
|
12203
12224
|
testID: "pageControl",
|
|
12204
12225
|
currentPage: currentIndex,
|
|
12205
12226
|
numberOfPages: items.length
|
|
@@ -12218,7 +12239,7 @@ var Image = function Image(_ref) {
|
|
|
12218
12239
|
imageNativeProps = _objectWithoutProperties(_ref, _excluded$m);
|
|
12219
12240
|
var theme = useTheme();
|
|
12220
12241
|
var imageSize = theme.__hd__.image.sizes[size];
|
|
12221
|
-
return /*#__PURE__*/
|
|
12242
|
+
return /*#__PURE__*/React__default.createElement(Image$1, _extends$1({
|
|
12222
12243
|
testID: testID,
|
|
12223
12244
|
style: [{
|
|
12224
12245
|
width: imageSize,
|
|
@@ -12260,15 +12281,15 @@ var StyledCarouselImage = index$9(Image)(function () {
|
|
|
12260
12281
|
};
|
|
12261
12282
|
});
|
|
12262
12283
|
var StyledCustomSizeCarouselImage = index$9(Image)(function (_ref3) {
|
|
12263
|
-
var
|
|
12264
|
-
_ref3$
|
|
12265
|
-
|
|
12266
|
-
|
|
12284
|
+
var themeHeight = _ref3.themeHeight,
|
|
12285
|
+
_ref3$themeResizeMode = _ref3.themeResizeMode,
|
|
12286
|
+
themeResizeMode = _ref3$themeResizeMode === void 0 ? 'contain' : _ref3$themeResizeMode,
|
|
12287
|
+
themeWidth = _ref3.themeWidth;
|
|
12267
12288
|
return {
|
|
12268
12289
|
alignSelf: 'center',
|
|
12269
|
-
width:
|
|
12270
|
-
height:
|
|
12271
|
-
resizeMode:
|
|
12290
|
+
width: themeWidth,
|
|
12291
|
+
height: themeHeight,
|
|
12292
|
+
resizeMode: themeResizeMode
|
|
12272
12293
|
};
|
|
12273
12294
|
});
|
|
12274
12295
|
var StyledCarouselContentWrapper = index$9(Box)(function (_ref4) {
|
|
@@ -12312,20 +12333,20 @@ var CarouselItem = function CarouselItem(_ref) {
|
|
|
12312
12333
|
heading = _ref.heading,
|
|
12313
12334
|
body = _ref.body;
|
|
12314
12335
|
var theme = useTheme$1();
|
|
12315
|
-
var ImageComponent =
|
|
12336
|
+
var ImageComponent = React__default.useMemo(function () {
|
|
12316
12337
|
if (image) {
|
|
12317
12338
|
if (isCarouselImageProps(image)) {
|
|
12318
|
-
return /*#__PURE__*/
|
|
12339
|
+
return /*#__PURE__*/React__default.createElement(StyledCustomSizeCarouselImage, {
|
|
12319
12340
|
source: image,
|
|
12320
|
-
|
|
12321
|
-
|
|
12322
|
-
|
|
12341
|
+
themeHeight: image.height,
|
|
12342
|
+
themeWidth: image.width,
|
|
12343
|
+
themeResizeMode: image.resizeMode,
|
|
12323
12344
|
style: {
|
|
12324
12345
|
marginBottom: theme.space.medium
|
|
12325
12346
|
}
|
|
12326
12347
|
});
|
|
12327
12348
|
}
|
|
12328
|
-
return /*#__PURE__*/
|
|
12349
|
+
return /*#__PURE__*/React__default.createElement(StyledCarouselImage, {
|
|
12329
12350
|
source: typeof image === 'string' ? {
|
|
12330
12351
|
uri: image
|
|
12331
12352
|
} : image,
|
|
@@ -12336,17 +12357,17 @@ var CarouselItem = function CarouselItem(_ref) {
|
|
|
12336
12357
|
}
|
|
12337
12358
|
return null;
|
|
12338
12359
|
}, [image]);
|
|
12339
|
-
return /*#__PURE__*/
|
|
12360
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
12340
12361
|
style: {
|
|
12341
12362
|
width: width
|
|
12342
12363
|
}
|
|
12343
|
-
}, ImageComponent, /*#__PURE__*/
|
|
12364
|
+
}, ImageComponent, /*#__PURE__*/React__default.createElement(StyledCarouselContentWrapper, {
|
|
12344
12365
|
paddingHorizontal: "medium",
|
|
12345
12366
|
width: width
|
|
12346
|
-
}, content, !!heading && /*#__PURE__*/
|
|
12367
|
+
}, content, !!heading && /*#__PURE__*/React__default.createElement(StyledCarouselHeading, {
|
|
12347
12368
|
level: "h1",
|
|
12348
12369
|
typeface: "playful"
|
|
12349
|
-
}, heading), !!body && /*#__PURE__*/
|
|
12370
|
+
}, heading), !!body && /*#__PURE__*/React__default.createElement(Typography.Body, null, body)));
|
|
12350
12371
|
};
|
|
12351
12372
|
|
|
12352
12373
|
var _excluded$l = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "testID", "pageControlPosition"];
|
|
@@ -12427,15 +12448,15 @@ var Carousel = function Carousel(_ref) {
|
|
|
12427
12448
|
internalOnItemIndexChange(firstVisibleItem.index || 0);
|
|
12428
12449
|
}
|
|
12429
12450
|
});
|
|
12430
|
-
return /*#__PURE__*/
|
|
12451
|
+
return /*#__PURE__*/React__default.createElement(View, _extends$1({
|
|
12431
12452
|
style: style,
|
|
12432
12453
|
testID: testID
|
|
12433
|
-
}, nativeProps), /*#__PURE__*/
|
|
12454
|
+
}, nativeProps), /*#__PURE__*/React__default.createElement(StyledBackDrop, {
|
|
12434
12455
|
themeSlideBackground: ((_items$currentSlideIn = items[currentSlideIndex]) === null || _items$currentSlideIn === void 0 ? void 0 : _items$currentSlideIn.background) || theme.colors.defaultGlobalSurface
|
|
12435
|
-
}), /*#__PURE__*/
|
|
12456
|
+
}), /*#__PURE__*/React__default.createElement(StyledPageControlWrapper, null, pageControlPosition === 'top' && shouldRenderPagination && /*#__PURE__*/React__default.createElement(StyledPageControl, {
|
|
12436
12457
|
numberOfPages: items.length,
|
|
12437
12458
|
currentPage: currentSlideIndex
|
|
12438
|
-
})), /*#__PURE__*/
|
|
12459
|
+
})), /*#__PURE__*/React__default.createElement(StyledCarouselView, null, /*#__PURE__*/React__default.createElement(FlatList, {
|
|
12439
12460
|
onLayout: flatListOnLayout,
|
|
12440
12461
|
testID: testID ? "".concat(testID, "_flatlist") : undefined,
|
|
12441
12462
|
horizontal: true,
|
|
@@ -12463,7 +12484,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
12463
12484
|
heading = item.heading,
|
|
12464
12485
|
body = item.body,
|
|
12465
12486
|
content = item.content;
|
|
12466
|
-
return /*#__PURE__*/
|
|
12487
|
+
return /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
12467
12488
|
image: image,
|
|
12468
12489
|
heading: heading,
|
|
12469
12490
|
body: body,
|
|
@@ -12478,7 +12499,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
12478
12499
|
index: index
|
|
12479
12500
|
};
|
|
12480
12501
|
}
|
|
12481
|
-
}), /*#__PURE__*/
|
|
12502
|
+
}), /*#__PURE__*/React__default.createElement(StyledCarouselFooterWrapper, null, renderActions && renderActions(currentSlideIndex), pageControlPosition === 'bottom' && shouldRenderPagination && /*#__PURE__*/React__default.createElement(StyledPageControl, {
|
|
12482
12503
|
numberOfPages: items.length,
|
|
12483
12504
|
currentPage: currentSlideIndex
|
|
12484
12505
|
}))));
|
|
@@ -12596,7 +12617,7 @@ var Chip = function Chip(_ref) {
|
|
|
12596
12617
|
icon = _ref.icon,
|
|
12597
12618
|
onPress = _ref.onPress,
|
|
12598
12619
|
otherProps = _objectWithoutProperties(_ref, _excluded$k);
|
|
12599
|
-
var internalIcon =
|
|
12620
|
+
var internalIcon = React__default.useMemo(function () {
|
|
12600
12621
|
if (icon && variant === 'filled') {
|
|
12601
12622
|
return icon;
|
|
12602
12623
|
}
|
|
@@ -12605,17 +12626,17 @@ var Chip = function Chip(_ref) {
|
|
|
12605
12626
|
}
|
|
12606
12627
|
return undefined;
|
|
12607
12628
|
}, [icon, selected, variant]);
|
|
12608
|
-
return /*#__PURE__*/
|
|
12629
|
+
return /*#__PURE__*/React__default.createElement(StyledChipWrapper, _extends$1({
|
|
12609
12630
|
onPress: onPress,
|
|
12610
12631
|
themeVariant: variant,
|
|
12611
12632
|
themeSelected: selected
|
|
12612
|
-
}, otherProps), internalIcon && /*#__PURE__*/
|
|
12633
|
+
}, otherProps), internalIcon && /*#__PURE__*/React__default.createElement(StyledIconWrapper$3, null, /*#__PURE__*/React__default.createElement(StyledIcon$1, {
|
|
12613
12634
|
size: "xsmall",
|
|
12614
12635
|
icon: internalIcon,
|
|
12615
12636
|
themeSelected: selected,
|
|
12616
12637
|
themeVariant: variant,
|
|
12617
12638
|
testID: "chip-icon-".concat(internalIcon)
|
|
12618
|
-
})), /*#__PURE__*/
|
|
12639
|
+
})), /*#__PURE__*/React__default.createElement(StyledLabel, {
|
|
12619
12640
|
variant: "small",
|
|
12620
12641
|
themeVariant: variant,
|
|
12621
12642
|
themeSelected: selected
|
|
@@ -12696,20 +12717,20 @@ var Checkbox = function Checkbox(_ref2) {
|
|
|
12696
12717
|
disabled: disabled,
|
|
12697
12718
|
readonly: readonly
|
|
12698
12719
|
});
|
|
12699
|
-
return /*#__PURE__*/
|
|
12720
|
+
return /*#__PURE__*/React__default.createElement(StyledWrapper$7, {
|
|
12700
12721
|
onPress: onPress,
|
|
12701
12722
|
disabled: disabled || readonly,
|
|
12702
12723
|
themeState: themeState,
|
|
12703
12724
|
style: style,
|
|
12704
12725
|
testID: testID
|
|
12705
|
-
}, !!description && /*#__PURE__*/
|
|
12726
|
+
}, !!description && /*#__PURE__*/React__default.createElement(StyledDescription$1, {
|
|
12706
12727
|
intent: disabled ? 'subdued' : 'body',
|
|
12707
12728
|
variant: "small"
|
|
12708
|
-
}, description), /*#__PURE__*/
|
|
12729
|
+
}, description), /*#__PURE__*/React__default.createElement(StyledCheckboxContainer, null, checked && /*#__PURE__*/React__default.createElement(StyledCheckMark, {
|
|
12709
12730
|
icon: "box-check",
|
|
12710
12731
|
testID: "check-mark",
|
|
12711
12732
|
themeState: themeState
|
|
12712
|
-
}), /*#__PURE__*/
|
|
12733
|
+
}), /*#__PURE__*/React__default.createElement(StyledCheckbox, {
|
|
12713
12734
|
themeState: themeState
|
|
12714
12735
|
})));
|
|
12715
12736
|
};
|
|
@@ -12870,21 +12891,21 @@ var LABEL_ANIMATION_DURATION = 150;
|
|
|
12870
12891
|
var renderErrorOrHelpText = function renderErrorOrHelpText(_ref2) {
|
|
12871
12892
|
var error = _ref2.error,
|
|
12872
12893
|
helpText = _ref2.helpText;
|
|
12873
|
-
return error ? /*#__PURE__*/
|
|
12894
|
+
return error ? /*#__PURE__*/React__default.createElement(StyledErrorContainer$2, null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
12874
12895
|
testID: "input-error-icon",
|
|
12875
12896
|
icon: "circle-info",
|
|
12876
12897
|
size: "xsmall",
|
|
12877
12898
|
intent: "danger"
|
|
12878
|
-
}), /*#__PURE__*/
|
|
12899
|
+
}), /*#__PURE__*/React__default.createElement(StyledError, {
|
|
12879
12900
|
testID: "input-error-message"
|
|
12880
|
-
}, error)) : !!helpText && /*#__PURE__*/
|
|
12901
|
+
}, error)) : !!helpText && /*#__PURE__*/React__default.createElement(StyledHelperText, null, helpText);
|
|
12881
12902
|
};
|
|
12882
12903
|
var renderInput = function renderInput(_ref3) {
|
|
12883
12904
|
var variant = _ref3.variant,
|
|
12884
12905
|
nativeInputProps = _ref3.nativeInputProps,
|
|
12885
12906
|
renderInputValue = _ref3.renderInputValue,
|
|
12886
12907
|
ref = _ref3.ref;
|
|
12887
|
-
return renderInputValue ? renderInputValue(nativeInputProps) : /*#__PURE__*/
|
|
12908
|
+
return renderInputValue ? renderInputValue(nativeInputProps) : /*#__PURE__*/React__default.createElement(StyledTextInput, _extends$1({}, nativeInputProps, {
|
|
12888
12909
|
themeVariant: variant,
|
|
12889
12910
|
multiline: variant === 'textarea' || nativeInputProps.multiline,
|
|
12890
12911
|
ref: ref
|
|
@@ -12895,7 +12916,7 @@ var renderSuffix = function renderSuffix(_ref4) {
|
|
|
12895
12916
|
loading = _ref4.loading,
|
|
12896
12917
|
suffix = _ref4.suffix;
|
|
12897
12918
|
var actualSuffix = loading ? 'loading' : suffix;
|
|
12898
|
-
return typeof actualSuffix === 'string' ? /*#__PURE__*/
|
|
12919
|
+
return typeof actualSuffix === 'string' ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
12899
12920
|
intent: state === 'disabled' ? 'disabled-text' : 'text',
|
|
12900
12921
|
testID: "input-suffix",
|
|
12901
12922
|
icon: actualSuffix,
|
|
@@ -12906,7 +12927,7 @@ var renderSuffix = function renderSuffix(_ref4) {
|
|
|
12906
12927
|
var renderPrefix = function renderPrefix(_ref5) {
|
|
12907
12928
|
var state = _ref5.state,
|
|
12908
12929
|
prefix = _ref5.prefix;
|
|
12909
|
-
return typeof prefix === 'string' ? /*#__PURE__*/
|
|
12930
|
+
return typeof prefix === 'string' ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
12910
12931
|
intent: state === 'disabled' ? 'disabled-text' : 'text',
|
|
12911
12932
|
testID: "input-prefix",
|
|
12912
12933
|
icon: prefix,
|
|
@@ -12919,7 +12940,7 @@ var renderMaxLengthMessage = function renderMaxLengthMessage(_ref6) {
|
|
|
12919
12940
|
currentLength = _ref6.currentLength,
|
|
12920
12941
|
hideCharacterCount = _ref6.hideCharacterCount;
|
|
12921
12942
|
var shouldShowMaxLength = maxLength !== undefined && !hideCharacterCount;
|
|
12922
|
-
return shouldShowMaxLength && /*#__PURE__*/
|
|
12943
|
+
return shouldShowMaxLength && /*#__PURE__*/React__default.createElement(StyledMaxLengthMessage, {
|
|
12923
12944
|
themeState: state
|
|
12924
12945
|
}, currentLength, "/", maxLength);
|
|
12925
12946
|
};
|
|
@@ -12957,22 +12978,22 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
|
|
|
12957
12978
|
nativeProps = _objectWithoutProperties(_ref8, _excluded$j);
|
|
12958
12979
|
var displayText = getDisplayText(value, defaultValue);
|
|
12959
12980
|
var isEmptyValue = displayText.length === 0;
|
|
12960
|
-
var _React$useState =
|
|
12981
|
+
var _React$useState = React__default.useState({
|
|
12961
12982
|
height: 0,
|
|
12962
12983
|
width: 0
|
|
12963
12984
|
}),
|
|
12964
12985
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
12965
12986
|
inputSize = _React$useState2[0],
|
|
12966
12987
|
setInputSize = _React$useState2[1];
|
|
12967
|
-
var _React$useState3 =
|
|
12988
|
+
var _React$useState3 = React__default.useState(0),
|
|
12968
12989
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
12969
12990
|
labelWidth = _React$useState4[0],
|
|
12970
12991
|
setLabelWidth = _React$useState4[1];
|
|
12971
|
-
var _React$useState5 =
|
|
12992
|
+
var _React$useState5 = React__default.useState(0),
|
|
12972
12993
|
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
12973
12994
|
prefixWidth = _React$useState6[0],
|
|
12974
12995
|
setPrefixWidth = _React$useState6[1];
|
|
12975
|
-
var _React$useState7 =
|
|
12996
|
+
var _React$useState7 = React__default.useState(false),
|
|
12976
12997
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
12977
12998
|
isFocused = _React$useState8[0],
|
|
12978
12999
|
setIsFocused = _React$useState8[1];
|
|
@@ -13013,8 +13034,8 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
|
|
|
13013
13034
|
var width = event.nativeEvent.layout.width;
|
|
13014
13035
|
setLabelWidth(width);
|
|
13015
13036
|
}, []);
|
|
13016
|
-
var innerTextInput =
|
|
13017
|
-
|
|
13037
|
+
var innerTextInput = React__default.useRef();
|
|
13038
|
+
React__default.useImperativeHandle(ref, function () {
|
|
13018
13039
|
return {
|
|
13019
13040
|
// we don't expose this method, it's for testing https://medium.com/developer-rants/how-to-test-useref-without-mocking-useref-699165f4994e
|
|
13020
13041
|
getNativeTextInputRef: function getNativeTextInputRef() {
|
|
@@ -13106,25 +13127,25 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
|
|
|
13106
13127
|
defaultValue: defaultValue,
|
|
13107
13128
|
placeholder: isFocused || label === undefined ? nativeProps.placeholder : EMPTY_PLACEHOLDER_VALUE
|
|
13108
13129
|
});
|
|
13109
|
-
return /*#__PURE__*/
|
|
13130
|
+
return /*#__PURE__*/React__default.createElement(StyledContainer$4, {
|
|
13110
13131
|
style: styleWithoutBackgroundColor,
|
|
13111
13132
|
pointerEvents: state === 'disabled' || state === 'readonly' ? 'none' : 'auto',
|
|
13112
13133
|
testID: testID
|
|
13113
|
-
}, /*#__PURE__*/
|
|
13134
|
+
}, /*#__PURE__*/React__default.createElement(StyledTextInputContainer, {
|
|
13114
13135
|
onLayout: onLayout
|
|
13115
|
-
}, /*#__PURE__*/
|
|
13136
|
+
}, /*#__PURE__*/React__default.createElement(StyledBorderBackDrop, {
|
|
13116
13137
|
themeFocused: isFocused,
|
|
13117
13138
|
themeState: state,
|
|
13118
13139
|
testID: "text-input-border",
|
|
13119
13140
|
style: [{
|
|
13120
13141
|
backgroundColor: backgroundColor
|
|
13121
13142
|
}, borderStyle]
|
|
13122
|
-
}), /*#__PURE__*/
|
|
13143
|
+
}), /*#__PURE__*/React__default.createElement(View, {
|
|
13123
13144
|
onLayout: onPrefixLayout
|
|
13124
13145
|
}, renderPrefix({
|
|
13125
13146
|
state: state,
|
|
13126
13147
|
prefix: prefix
|
|
13127
|
-
})), /*#__PURE__*/
|
|
13148
|
+
})), /*#__PURE__*/React__default.createElement(StyledLabelContainerInsideTextInput, {
|
|
13128
13149
|
themeVariant: variant,
|
|
13129
13150
|
pointerEvents: "none",
|
|
13130
13151
|
style: [{
|
|
@@ -13147,13 +13168,13 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
|
|
|
13147
13168
|
})
|
|
13148
13169
|
}]
|
|
13149
13170
|
}]
|
|
13150
|
-
}, required && /*#__PURE__*/
|
|
13171
|
+
}, required && /*#__PURE__*/React__default.createElement(StyledAsteriskLabelInsideTextInput, {
|
|
13151
13172
|
style: {
|
|
13152
13173
|
backgroundColor: backgroundColor
|
|
13153
13174
|
},
|
|
13154
13175
|
themeState: state,
|
|
13155
13176
|
testID: "input-label-asterisk"
|
|
13156
|
-
}, "*"), !!label && /*#__PURE__*/
|
|
13177
|
+
}, "*"), !!label && /*#__PURE__*/React__default.createElement(StyledLabelInsideTextInput, {
|
|
13157
13178
|
style: {
|
|
13158
13179
|
backgroundColor: backgroundColor
|
|
13159
13180
|
},
|
|
@@ -13161,7 +13182,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
|
|
|
13161
13182
|
testID: "input-label",
|
|
13162
13183
|
themeState: state,
|
|
13163
13184
|
onLayout: onLabelLayout
|
|
13164
|
-
}, label)), /*#__PURE__*/
|
|
13185
|
+
}, label)), /*#__PURE__*/React__default.createElement(StyledTextInputAndLabelContainer, null, renderInput({
|
|
13165
13186
|
variant: variant,
|
|
13166
13187
|
nativeInputProps: nativeInputProps,
|
|
13167
13188
|
renderInputValue: renderInputValue,
|
|
@@ -13172,7 +13193,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
|
|
|
13172
13193
|
state: state,
|
|
13173
13194
|
loading: loading,
|
|
13174
13195
|
suffix: suffix
|
|
13175
|
-
})), /*#__PURE__*/
|
|
13196
|
+
})), /*#__PURE__*/React__default.createElement(StyledErrorAndHelpTextContainer, null, /*#__PURE__*/React__default.createElement(StyledErrorAndMaxLengthContainer, null, renderErrorOrHelpText({
|
|
13176
13197
|
error: error,
|
|
13177
13198
|
helpText: helpText
|
|
13178
13199
|
}), renderMaxLengthMessage({
|
|
@@ -13233,15 +13254,15 @@ var DatePickerAndroid = function DatePickerAndroid(_ref) {
|
|
|
13233
13254
|
onChange: _onChange,
|
|
13234
13255
|
value: value
|
|
13235
13256
|
});
|
|
13236
|
-
return /*#__PURE__*/
|
|
13257
|
+
return /*#__PURE__*/React__default.createElement(TouchableOpacity, {
|
|
13237
13258
|
onPress: function onPress() {
|
|
13238
13259
|
return setOpen(true);
|
|
13239
13260
|
},
|
|
13240
13261
|
disabled: disabled
|
|
13241
|
-
}, /*#__PURE__*/
|
|
13262
|
+
}, /*#__PURE__*/React__default.createElement(View, {
|
|
13242
13263
|
pointerEvents: "none",
|
|
13243
13264
|
testID: "datePickerInputAndroid"
|
|
13244
|
-
}, /*#__PURE__*/
|
|
13265
|
+
}, /*#__PURE__*/React__default.createElement(TextInput, {
|
|
13245
13266
|
label: label,
|
|
13246
13267
|
value: displayValue,
|
|
13247
13268
|
suffix: "calendar-dates-outlined",
|
|
@@ -13252,7 +13273,7 @@ var DatePickerAndroid = function DatePickerAndroid(_ref) {
|
|
|
13252
13273
|
helpText: helpText,
|
|
13253
13274
|
style: style,
|
|
13254
13275
|
testID: testID
|
|
13255
|
-
})), open ? /*#__PURE__*/
|
|
13276
|
+
})), open ? /*#__PURE__*/React__default.createElement(DateTimePicker, {
|
|
13256
13277
|
testID: "datePickerAndroid",
|
|
13257
13278
|
mode: "date",
|
|
13258
13279
|
value: pickerInitValue,
|
|
@@ -13284,7 +13305,7 @@ var InternalCalendar = function InternalCalendar(_ref) {
|
|
|
13284
13305
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
13285
13306
|
selectingDate = _useState4[0],
|
|
13286
13307
|
setSelectingDate = _useState4[1];
|
|
13287
|
-
return /*#__PURE__*/
|
|
13308
|
+
return /*#__PURE__*/React__default.createElement(Calendar, {
|
|
13288
13309
|
testID: "calendar",
|
|
13289
13310
|
value: selectingDate,
|
|
13290
13311
|
visibleDate: visibleDate,
|
|
@@ -13351,15 +13372,15 @@ var DatePickerCalendar = function DatePickerCalendar(_ref2) {
|
|
|
13351
13372
|
onChange: onChange,
|
|
13352
13373
|
value: value
|
|
13353
13374
|
});
|
|
13354
|
-
return /*#__PURE__*/
|
|
13375
|
+
return /*#__PURE__*/React__default.createElement(TouchableOpacity, {
|
|
13355
13376
|
onPress: function onPress() {
|
|
13356
13377
|
return setOpen(true);
|
|
13357
13378
|
},
|
|
13358
13379
|
disabled: disabled
|
|
13359
|
-
}, /*#__PURE__*/
|
|
13380
|
+
}, /*#__PURE__*/React__default.createElement(View, {
|
|
13360
13381
|
pointerEvents: "none",
|
|
13361
13382
|
testID: "datePickerCalendar"
|
|
13362
|
-
}, /*#__PURE__*/
|
|
13383
|
+
}, /*#__PURE__*/React__default.createElement(TextInput, {
|
|
13363
13384
|
label: label,
|
|
13364
13385
|
value: displayValue,
|
|
13365
13386
|
suffix: "calendar-dates-outlined",
|
|
@@ -13370,13 +13391,13 @@ var DatePickerCalendar = function DatePickerCalendar(_ref2) {
|
|
|
13370
13391
|
helpText: helpText,
|
|
13371
13392
|
testID: testID,
|
|
13372
13393
|
style: style
|
|
13373
|
-
})), /*#__PURE__*/
|
|
13394
|
+
})), /*#__PURE__*/React__default.createElement(BottomSheet$1, {
|
|
13374
13395
|
open: open,
|
|
13375
13396
|
onRequestClose: function onRequestClose() {
|
|
13376
13397
|
return setOpen(false);
|
|
13377
13398
|
},
|
|
13378
13399
|
header: label,
|
|
13379
|
-
footer: shouldHideToolbar ? undefined : /*#__PURE__*/
|
|
13400
|
+
footer: shouldHideToolbar ? undefined : /*#__PURE__*/React__default.createElement(CompoundButton, {
|
|
13380
13401
|
variant: "text",
|
|
13381
13402
|
text: confirmLabel,
|
|
13382
13403
|
onPress: function onPress() {
|
|
@@ -13386,7 +13407,7 @@ var DatePickerCalendar = function DatePickerCalendar(_ref2) {
|
|
|
13386
13407
|
setOpen(false);
|
|
13387
13408
|
}
|
|
13388
13409
|
})
|
|
13389
|
-
}, /*#__PURE__*/
|
|
13410
|
+
}, /*#__PURE__*/React__default.createElement(InternalCalendar, {
|
|
13390
13411
|
minDate: minDate,
|
|
13391
13412
|
maxDate: maxDate,
|
|
13392
13413
|
value: value,
|
|
@@ -13439,15 +13460,15 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
|
|
|
13439
13460
|
onChange: onChange,
|
|
13440
13461
|
value: value
|
|
13441
13462
|
});
|
|
13442
|
-
return /*#__PURE__*/
|
|
13463
|
+
return /*#__PURE__*/React__default.createElement(TouchableOpacity, {
|
|
13443
13464
|
onPress: function onPress() {
|
|
13444
13465
|
return setOpen(true);
|
|
13445
13466
|
},
|
|
13446
13467
|
disabled: disabled
|
|
13447
|
-
}, /*#__PURE__*/
|
|
13468
|
+
}, /*#__PURE__*/React__default.createElement(View, {
|
|
13448
13469
|
pointerEvents: "none",
|
|
13449
13470
|
testID: "datePickerInputIOS"
|
|
13450
|
-
}, /*#__PURE__*/
|
|
13471
|
+
}, /*#__PURE__*/React__default.createElement(TextInput, {
|
|
13451
13472
|
label: label,
|
|
13452
13473
|
value: displayValue,
|
|
13453
13474
|
suffix: "calendar-dates-outlined",
|
|
@@ -13458,13 +13479,13 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
|
|
|
13458
13479
|
helpText: helpText,
|
|
13459
13480
|
testID: testID,
|
|
13460
13481
|
style: style
|
|
13461
|
-
})), /*#__PURE__*/
|
|
13482
|
+
})), /*#__PURE__*/React__default.createElement(BottomSheet$1, {
|
|
13462
13483
|
open: open,
|
|
13463
13484
|
onRequestClose: function onRequestClose() {
|
|
13464
13485
|
return setOpen(false);
|
|
13465
13486
|
},
|
|
13466
13487
|
header: label,
|
|
13467
|
-
footer: /*#__PURE__*/
|
|
13488
|
+
footer: /*#__PURE__*/React__default.createElement(CompoundButton, {
|
|
13468
13489
|
variant: "text",
|
|
13469
13490
|
text: confirmLabel,
|
|
13470
13491
|
onPress: function onPress() {
|
|
@@ -13474,7 +13495,7 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
|
|
|
13474
13495
|
setOpen(false);
|
|
13475
13496
|
}
|
|
13476
13497
|
})
|
|
13477
|
-
}, /*#__PURE__*/
|
|
13498
|
+
}, /*#__PURE__*/React__default.createElement(StyledPickerWrapper$1, null, /*#__PURE__*/React__default.createElement(DateTimePicker, {
|
|
13478
13499
|
testID: "datePickerIOS",
|
|
13479
13500
|
value: selectingDate,
|
|
13480
13501
|
minimumDate: minDate,
|
|
@@ -13499,12 +13520,12 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
13499
13520
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
13500
13521
|
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
13501
13522
|
if (variant === 'calendar') {
|
|
13502
|
-
return /*#__PURE__*/
|
|
13523
|
+
return /*#__PURE__*/React__default.createElement(DatePickerCalendar, props);
|
|
13503
13524
|
}
|
|
13504
13525
|
if (Platform.OS === 'ios') {
|
|
13505
|
-
return /*#__PURE__*/
|
|
13526
|
+
return /*#__PURE__*/React__default.createElement(DatePickerIOS, props);
|
|
13506
13527
|
}
|
|
13507
|
-
return /*#__PURE__*/
|
|
13528
|
+
return /*#__PURE__*/React__default.createElement(DatePickerAndroid, props);
|
|
13508
13529
|
};
|
|
13509
13530
|
|
|
13510
13531
|
var AnimatedPressable$1 = Animated.createAnimatedComponent(Pressable);
|
|
@@ -13715,11 +13736,11 @@ var DragableDrawer = function DragableDrawer(_ref) {
|
|
|
13715
13736
|
setAnimatedToValue(animatedValue);
|
|
13716
13737
|
}
|
|
13717
13738
|
})).current;
|
|
13718
|
-
return /*#__PURE__*/
|
|
13739
|
+
return /*#__PURE__*/React__default.createElement(StyledDragableContainer, {
|
|
13719
13740
|
testID: testID,
|
|
13720
13741
|
enableShadow: true,
|
|
13721
13742
|
pointerEvents: "box-none"
|
|
13722
|
-
}, /*#__PURE__*/
|
|
13743
|
+
}, /*#__PURE__*/React__default.createElement(StyledDragableDrawerContainer, {
|
|
13723
13744
|
enableShadow: true,
|
|
13724
13745
|
style: {
|
|
13725
13746
|
transform: [{
|
|
@@ -13732,7 +13753,7 @@ var DragableDrawer = function DragableDrawer(_ref) {
|
|
|
13732
13753
|
var nativeEvent = _ref3.nativeEvent;
|
|
13733
13754
|
setHeight(nativeEvent.layout.height);
|
|
13734
13755
|
}
|
|
13735
|
-
}, /*#__PURE__*/
|
|
13756
|
+
}, /*#__PURE__*/React__default.createElement(StyledHandlerContainer, panResponder.panHandlers, /*#__PURE__*/React__default.createElement(StyledHandler, null)), children));
|
|
13736
13757
|
};
|
|
13737
13758
|
|
|
13738
13759
|
var Drawer = function Drawer(_ref) {
|
|
@@ -13767,17 +13788,17 @@ var Drawer = function Drawer(_ref) {
|
|
|
13767
13788
|
return animation.stop();
|
|
13768
13789
|
};
|
|
13769
13790
|
}, [visible]);
|
|
13770
|
-
return /*#__PURE__*/
|
|
13791
|
+
return /*#__PURE__*/React__default.createElement(StyledContainer$3, {
|
|
13771
13792
|
testID: testID,
|
|
13772
13793
|
enableShadow: enableShadow,
|
|
13773
13794
|
pointerEvents: "box-none"
|
|
13774
|
-
}, /*#__PURE__*/
|
|
13795
|
+
}, /*#__PURE__*/React__default.createElement(StyledBackdrop$1, {
|
|
13775
13796
|
pointerEvents: visible ? 'auto' : 'box-none',
|
|
13776
13797
|
onPress: onDismiss,
|
|
13777
13798
|
style: {
|
|
13778
13799
|
opacity: interpolateBackdropOpacity
|
|
13779
13800
|
}
|
|
13780
|
-
}), /*#__PURE__*/
|
|
13801
|
+
}), /*#__PURE__*/React__default.createElement(StyledDrawerContainer, {
|
|
13781
13802
|
enableShadow: enableShadow,
|
|
13782
13803
|
onLayout: function onLayout(_ref2) {
|
|
13783
13804
|
var nativeEvent = _ref2.nativeEvent;
|
|
@@ -13832,18 +13853,18 @@ var Empty = function Empty(_ref) {
|
|
|
13832
13853
|
_ref$variant = _ref.variant,
|
|
13833
13854
|
variant = _ref$variant === void 0 ? 'light' : _ref$variant;
|
|
13834
13855
|
var theme = useTheme();
|
|
13835
|
-
return /*#__PURE__*/
|
|
13856
|
+
return /*#__PURE__*/React__default.createElement(StyledWrapper$6, {
|
|
13836
13857
|
style: style,
|
|
13837
13858
|
testID: testID
|
|
13838
|
-
}, image !== undefined && /*#__PURE__*/
|
|
13859
|
+
}, image !== undefined && /*#__PURE__*/React__default.cloneElement(image, _objectSpread2(_objectSpread2({}, image.props), {}, {
|
|
13839
13860
|
style: [{
|
|
13840
13861
|
marginBottom: theme.__hd__.empty.space.imageMargin
|
|
13841
13862
|
}, image.props.style]
|
|
13842
|
-
})), /*#__PURE__*/
|
|
13863
|
+
})), /*#__PURE__*/React__default.createElement(StyledTitle, {
|
|
13843
13864
|
themeVariant: variant,
|
|
13844
13865
|
level: "h4",
|
|
13845
13866
|
typeface: "playful"
|
|
13846
|
-
}, title), !!description && /*#__PURE__*/
|
|
13867
|
+
}, title), !!description && /*#__PURE__*/React__default.createElement(StyledDescription, {
|
|
13847
13868
|
themeVariant: variant,
|
|
13848
13869
|
typeface: "playful"
|
|
13849
13870
|
}, description));
|
|
@@ -13936,7 +13957,7 @@ var PortalHostComponent = function PortalHostComponent(_ref) {
|
|
|
13936
13957
|
deregisterHost();
|
|
13937
13958
|
};
|
|
13938
13959
|
}, []);
|
|
13939
|
-
return /*#__PURE__*/
|
|
13960
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, state.map(function (item) {
|
|
13940
13961
|
return item.node;
|
|
13941
13962
|
}));
|
|
13942
13963
|
};
|
|
@@ -14004,11 +14025,11 @@ var PortalProviderComponent = function PortalProviderComponent(_ref) {
|
|
|
14004
14025
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
14005
14026
|
state = _useReducer2[0],
|
|
14006
14027
|
dispatch = _useReducer2[1];
|
|
14007
|
-
return /*#__PURE__*/
|
|
14028
|
+
return /*#__PURE__*/React__default.createElement(PortalDispatchContext.Provider, {
|
|
14008
14029
|
value: dispatch
|
|
14009
|
-
}, /*#__PURE__*/
|
|
14030
|
+
}, /*#__PURE__*/React__default.createElement(PortalStateContext.Provider, {
|
|
14010
14031
|
value: state
|
|
14011
|
-
}, children, /*#__PURE__*/
|
|
14032
|
+
}, children, /*#__PURE__*/React__default.createElement(PortalHost, {
|
|
14012
14033
|
name: rootHostName
|
|
14013
14034
|
})));
|
|
14014
14035
|
};
|
|
@@ -14029,7 +14050,7 @@ var PortalComponent = function PortalComponent(_ref) {
|
|
|
14029
14050
|
return name || nanoid();
|
|
14030
14051
|
}, [name]);
|
|
14031
14052
|
var ChildrenComponent = useMemo(function () {
|
|
14032
|
-
return /*#__PURE__*/
|
|
14053
|
+
return /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
14033
14054
|
theme: theme || defaultTheme
|
|
14034
14055
|
}, children);
|
|
14035
14056
|
}, [theme, children, defaultTheme]);
|
|
@@ -14129,12 +14150,12 @@ var Modal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
14129
14150
|
return backHandler.remove();
|
|
14130
14151
|
};
|
|
14131
14152
|
}, [onRequestClose]);
|
|
14132
|
-
return /*#__PURE__*/
|
|
14153
|
+
return /*#__PURE__*/React__default.createElement(Portal$1, null, /*#__PURE__*/React__default.createElement(Animated.View, {
|
|
14133
14154
|
style: _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
14134
14155
|
backgroundColor: transparent ? 'transparent' : theme.colors.overlayGlobalSurface,
|
|
14135
14156
|
opacity: animationType !== 'none' ? backdropOpacityAnimation : DEFAULT_BACKDROP_OPACITY
|
|
14136
14157
|
})
|
|
14137
|
-
}), /*#__PURE__*/
|
|
14158
|
+
}), /*#__PURE__*/React__default.createElement(Animated.View, {
|
|
14138
14159
|
testID: testID,
|
|
14139
14160
|
style: _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
14140
14161
|
opacity: animationType === 'fade' ? modalAnimation : 1,
|
|
@@ -14170,7 +14191,7 @@ var ModalWrapper = function ModalWrapper(_ref3) {
|
|
|
14170
14191
|
(_modalRef$current2 = modalRef.current) === null || _modalRef$current2 === void 0 || _modalRef$current2.show();
|
|
14171
14192
|
}
|
|
14172
14193
|
}, [internalVisible]);
|
|
14173
|
-
return internalVisible ? /*#__PURE__*/
|
|
14194
|
+
return internalVisible ? /*#__PURE__*/React__default.createElement(Modal, _extends$1({
|
|
14174
14195
|
ref: modalRef
|
|
14175
14196
|
}, props)) : null;
|
|
14176
14197
|
};
|
|
@@ -14261,11 +14282,11 @@ var _excluded$g = ["variant", "title", "description", "image", "testID", "ctaTex
|
|
|
14261
14282
|
_excluded2 = ["visible", "variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
|
|
14262
14283
|
var renderImage$1 = function renderImage(image) {
|
|
14263
14284
|
if ( /*#__PURE__*/isValidElement(image)) {
|
|
14264
|
-
return /*#__PURE__*/
|
|
14285
|
+
return /*#__PURE__*/React__default.cloneElement(image, {
|
|
14265
14286
|
testID: 'error-image'
|
|
14266
14287
|
});
|
|
14267
14288
|
}
|
|
14268
|
-
return /*#__PURE__*/
|
|
14289
|
+
return /*#__PURE__*/React__default.createElement(StyledErrorImage, {
|
|
14269
14290
|
source: typeof image === 'string' ? {
|
|
14270
14291
|
uri: image
|
|
14271
14292
|
} : image,
|
|
@@ -14287,19 +14308,19 @@ var ErrorPage = function ErrorPage(_ref) {
|
|
|
14287
14308
|
var showCta = ctaText && onCtaPress !== undefined;
|
|
14288
14309
|
var showSecondaryCta = secondaryCtaText && onSecondaryCtaPress !== undefined;
|
|
14289
14310
|
var showButtonContainer = showCta || showSecondaryCta;
|
|
14290
|
-
return /*#__PURE__*/
|
|
14311
|
+
return /*#__PURE__*/React__default.createElement(StyledErrorContainer$1, _extends$1({
|
|
14291
14312
|
testID: testID,
|
|
14292
14313
|
themeVariant: variant
|
|
14293
|
-
}, nativeProps), /*#__PURE__*/
|
|
14314
|
+
}, nativeProps), /*#__PURE__*/React__default.createElement(StyledErrorContent, null, image && /*#__PURE__*/React__default.createElement(StyledErrorImageContainer, null, renderImage$1(image)), /*#__PURE__*/React__default.createElement(StyledErrorTitle, {
|
|
14294
14315
|
level: "h4",
|
|
14295
14316
|
typeface: "playful"
|
|
14296
|
-
}, title), description && /*#__PURE__*/
|
|
14317
|
+
}, title), description && /*#__PURE__*/React__default.createElement(StyledErrorDescription, {
|
|
14297
14318
|
typeface: "playful"
|
|
14298
|
-
}, description)), showButtonContainer && /*#__PURE__*/
|
|
14319
|
+
}, description)), showButtonContainer && /*#__PURE__*/React__default.createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React__default.createElement(StyledErrorButtonPrimary, {
|
|
14299
14320
|
variant: "filled",
|
|
14300
14321
|
text: ctaText,
|
|
14301
14322
|
onPress: onCtaPress
|
|
14302
|
-
}), showSecondaryCta && /*#__PURE__*/
|
|
14323
|
+
}), showSecondaryCta && /*#__PURE__*/React__default.createElement(StyledErrorButtonSecondary, {
|
|
14303
14324
|
variant: "text",
|
|
14304
14325
|
text: secondaryCtaText,
|
|
14305
14326
|
onPress: onSecondaryCtaPress
|
|
@@ -14358,7 +14379,7 @@ var Error$1 = function Error(_ref2) {
|
|
|
14358
14379
|
}
|
|
14359
14380
|
}, [isVisible, onCloseModal]);
|
|
14360
14381
|
if (variant === 'full-screen') {
|
|
14361
|
-
return /*#__PURE__*/
|
|
14382
|
+
return /*#__PURE__*/React__default.createElement(StyledErrorModal, {
|
|
14362
14383
|
visible: isVisible,
|
|
14363
14384
|
onRequestClose: function onRequestClose() {
|
|
14364
14385
|
return setIsVisible(false);
|
|
@@ -14367,7 +14388,7 @@ var Error$1 = function Error(_ref2) {
|
|
|
14367
14388
|
return setIsVisible(false);
|
|
14368
14389
|
},
|
|
14369
14390
|
animationType: "slide"
|
|
14370
|
-
}, /*#__PURE__*/
|
|
14391
|
+
}, /*#__PURE__*/React__default.createElement(ErrorPage, _extends$1({
|
|
14371
14392
|
variant: variant,
|
|
14372
14393
|
title: title,
|
|
14373
14394
|
description: description,
|
|
@@ -14383,7 +14404,7 @@ var Error$1 = function Error(_ref2) {
|
|
|
14383
14404
|
}
|
|
14384
14405
|
}, nativeProps)));
|
|
14385
14406
|
}
|
|
14386
|
-
return /*#__PURE__*/
|
|
14407
|
+
return /*#__PURE__*/React__default.createElement(ErrorPage, _extends$1({
|
|
14387
14408
|
variant: variant,
|
|
14388
14409
|
title: title,
|
|
14389
14410
|
description: description,
|
|
@@ -14464,13 +14485,13 @@ var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
|
|
|
14464
14485
|
inputRange: [0, 1],
|
|
14465
14486
|
outputRange: ['0deg', '-45deg']
|
|
14466
14487
|
});
|
|
14467
|
-
return /*#__PURE__*/
|
|
14488
|
+
return /*#__PURE__*/React__default.createElement(Animated.View, {
|
|
14468
14489
|
style: StyleSheet$1.flatten([{
|
|
14469
14490
|
transform: [{
|
|
14470
14491
|
rotate: interpolatedRotateAnimation
|
|
14471
14492
|
}]
|
|
14472
14493
|
}])
|
|
14473
|
-
}, /*#__PURE__*/
|
|
14494
|
+
}, /*#__PURE__*/React__default.createElement(AnimatedIcons, _extends$1({
|
|
14474
14495
|
size: "xsmall"
|
|
14475
14496
|
}, iconProps)));
|
|
14476
14497
|
};
|
|
@@ -14485,13 +14506,13 @@ var IconOnlyContent = function IconOnlyContent(_ref) {
|
|
|
14485
14506
|
animated = _ref.animated,
|
|
14486
14507
|
active = _ref.active;
|
|
14487
14508
|
if (animated) {
|
|
14488
|
-
return /*#__PURE__*/
|
|
14509
|
+
return /*#__PURE__*/React__default.createElement(StyledIconContainer, null, /*#__PURE__*/React__default.createElement(AnimatedFABIcon, {
|
|
14489
14510
|
active: active,
|
|
14490
14511
|
icon: icon,
|
|
14491
14512
|
testID: "animated-fab-icon"
|
|
14492
14513
|
}));
|
|
14493
14514
|
}
|
|
14494
|
-
return /*#__PURE__*/
|
|
14515
|
+
return /*#__PURE__*/React__default.createElement(StyledFABIcon, {
|
|
14495
14516
|
icon: icon,
|
|
14496
14517
|
testID: "styled-fab-icon"
|
|
14497
14518
|
});
|
|
@@ -14499,11 +14520,11 @@ var IconOnlyContent = function IconOnlyContent(_ref) {
|
|
|
14499
14520
|
var IconWithTextContent = function IconWithTextContent(_ref2) {
|
|
14500
14521
|
var icon = _ref2.icon,
|
|
14501
14522
|
title = _ref2.title;
|
|
14502
|
-
return /*#__PURE__*/
|
|
14523
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StyledIconContainer, null, /*#__PURE__*/React__default.createElement(StyledFABIcon, {
|
|
14503
14524
|
size: "xsmall",
|
|
14504
14525
|
icon: icon,
|
|
14505
14526
|
testID: "styled-fab-icon"
|
|
14506
|
-
})), /*#__PURE__*/
|
|
14527
|
+
})), /*#__PURE__*/React__default.createElement(StyledFABText, null, title));
|
|
14507
14528
|
};
|
|
14508
14529
|
var animateWidth = function animateWidth() {
|
|
14509
14530
|
LayoutAnimation.configureNext({
|
|
@@ -14524,7 +14545,7 @@ var FAB$1 = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
14524
14545
|
active = _ref3.active,
|
|
14525
14546
|
style = _ref3.style;
|
|
14526
14547
|
var theme = useTheme();
|
|
14527
|
-
var _React$useState =
|
|
14548
|
+
var _React$useState = React__default.useState({
|
|
14528
14549
|
hideTitle: false,
|
|
14529
14550
|
hideButton: false
|
|
14530
14551
|
}),
|
|
@@ -14533,17 +14554,17 @@ var FAB$1 = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
14533
14554
|
setDisplayState = _React$useState2[1];
|
|
14534
14555
|
var isIconOnly = displayState.hideTitle || active || !title;
|
|
14535
14556
|
var animatedValues = {
|
|
14536
|
-
opacity:
|
|
14537
|
-
width:
|
|
14538
|
-
translateY:
|
|
14557
|
+
opacity: React__default.useRef(new Animated.Value(1)).current,
|
|
14558
|
+
width: React__default.useRef(new Animated.Value(1)).current,
|
|
14559
|
+
translateY: React__default.useRef(new Animated.Value(0)).current
|
|
14539
14560
|
};
|
|
14540
14561
|
var marginBottom = Number((_StyleSheet$flatten = StyleSheet$1.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.marginBottom) || 0;
|
|
14541
|
-
var _React$useState3 =
|
|
14562
|
+
var _React$useState3 = React__default.useState(0),
|
|
14542
14563
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
14543
14564
|
buttonWidth = _React$useState4[0],
|
|
14544
14565
|
setButtonWidth = _React$useState4[1];
|
|
14545
14566
|
var hasSetButtonWidth = buttonWidth > 0;
|
|
14546
|
-
|
|
14567
|
+
React__default.useImperativeHandle(ref, function () {
|
|
14547
14568
|
return {
|
|
14548
14569
|
show: function show() {
|
|
14549
14570
|
Animated.spring(animatedValues.translateY, {
|
|
@@ -14592,7 +14613,7 @@ var FAB$1 = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
14592
14613
|
}
|
|
14593
14614
|
};
|
|
14594
14615
|
}, []);
|
|
14595
|
-
return /*#__PURE__*/
|
|
14616
|
+
return /*#__PURE__*/React__default.createElement(StyledFAB$1, {
|
|
14596
14617
|
onLayout: function onLayout(event) {
|
|
14597
14618
|
return !hasSetButtonWidth && !active && setButtonWidth(event.nativeEvent.layout.width);
|
|
14598
14619
|
},
|
|
@@ -14609,7 +14630,7 @@ var FAB$1 = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
14609
14630
|
}],
|
|
14610
14631
|
testID: testID,
|
|
14611
14632
|
themeActive: active
|
|
14612
|
-
}, /*#__PURE__*/
|
|
14633
|
+
}, /*#__PURE__*/React__default.createElement(Animated.View, {
|
|
14613
14634
|
style: {
|
|
14614
14635
|
flexDirection: 'row',
|
|
14615
14636
|
opacity: animatedValues.opacity.interpolate({
|
|
@@ -14617,11 +14638,11 @@ var FAB$1 = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
14617
14638
|
outputRange: [0, 1]
|
|
14618
14639
|
})
|
|
14619
14640
|
}
|
|
14620
|
-
}, isIconOnly ? /*#__PURE__*/
|
|
14641
|
+
}, isIconOnly ? /*#__PURE__*/React__default.createElement(IconOnlyContent, {
|
|
14621
14642
|
animated: animated,
|
|
14622
14643
|
active: active,
|
|
14623
14644
|
icon: active ? 'add' : icon
|
|
14624
|
-
}) : /*#__PURE__*/
|
|
14645
|
+
}) : /*#__PURE__*/React__default.createElement(IconWithTextContent, {
|
|
14625
14646
|
icon: icon,
|
|
14626
14647
|
title: title
|
|
14627
14648
|
})));
|
|
@@ -14665,12 +14686,12 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
14665
14686
|
_ref$active = _ref.active,
|
|
14666
14687
|
active = _ref$active === void 0 ? false : _ref$active;
|
|
14667
14688
|
var theme = useTheme();
|
|
14668
|
-
var animatedValue =
|
|
14689
|
+
var animatedValue = React__default.useRef(new Animated.Value(0));
|
|
14669
14690
|
var translateY = animatedValue.current.interpolate({
|
|
14670
14691
|
inputRange: [0, 1],
|
|
14671
14692
|
outputRange: [50, 0]
|
|
14672
14693
|
});
|
|
14673
|
-
|
|
14694
|
+
React__default.useEffect(function () {
|
|
14674
14695
|
Animated.spring(animatedValue.current, {
|
|
14675
14696
|
toValue: active ? 1 : 0,
|
|
14676
14697
|
useNativeDriver: Platform.OS !== 'web',
|
|
@@ -14679,21 +14700,21 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
14679
14700
|
bounciness: 10
|
|
14680
14701
|
}).start();
|
|
14681
14702
|
}, [active, index]);
|
|
14682
|
-
return /*#__PURE__*/
|
|
14703
|
+
return /*#__PURE__*/React__default.createElement(Animated.View, {
|
|
14683
14704
|
style: {
|
|
14684
14705
|
transform: [{
|
|
14685
14706
|
translateY: translateY
|
|
14686
14707
|
}]
|
|
14687
14708
|
}
|
|
14688
|
-
}, /*#__PURE__*/
|
|
14709
|
+
}, /*#__PURE__*/React__default.createElement(StyledActionItem, {
|
|
14689
14710
|
underlayColor: theme.__hd__.fab.colors.actionItemPressedBackground,
|
|
14690
14711
|
style: style,
|
|
14691
14712
|
onPress: onPress,
|
|
14692
14713
|
testID: testID
|
|
14693
|
-
}, /*#__PURE__*/
|
|
14714
|
+
}, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StyledIconContainer, null, /*#__PURE__*/React__default.createElement(StyledIcon, {
|
|
14694
14715
|
size: "xsmall",
|
|
14695
14716
|
icon: icon
|
|
14696
|
-
})), /*#__PURE__*/
|
|
14717
|
+
})), /*#__PURE__*/React__default.createElement(StyledActionItemText, null, title))));
|
|
14697
14718
|
};
|
|
14698
14719
|
|
|
14699
14720
|
var StyledContainer$2 = index$9(View)({
|
|
@@ -14756,7 +14777,7 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
14756
14777
|
var theme = useTheme();
|
|
14757
14778
|
var fabRef = useRef(null);
|
|
14758
14779
|
var animatedValue = useRef(new Animated.Value(active ? 1 : 0));
|
|
14759
|
-
|
|
14780
|
+
React__default.useImperativeHandle(ref, function () {
|
|
14760
14781
|
return {
|
|
14761
14782
|
showFAB: function showFAB() {
|
|
14762
14783
|
var _fabRef$current;
|
|
@@ -14772,7 +14793,7 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
14772
14793
|
}
|
|
14773
14794
|
};
|
|
14774
14795
|
}, [fabRef]);
|
|
14775
|
-
|
|
14796
|
+
React__default.useEffect(function () {
|
|
14776
14797
|
Animated.spring(animatedValue.current, {
|
|
14777
14798
|
toValue: active ? 1 : 0,
|
|
14778
14799
|
delay: 100,
|
|
@@ -14790,11 +14811,11 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
14790
14811
|
inputRange: [0, 1],
|
|
14791
14812
|
outputRange: [0, 1]
|
|
14792
14813
|
});
|
|
14793
|
-
return /*#__PURE__*/
|
|
14814
|
+
return /*#__PURE__*/React__default.createElement(StyledContainer$2, {
|
|
14794
14815
|
testID: testID,
|
|
14795
14816
|
pointerEvents: "box-none",
|
|
14796
14817
|
style: style
|
|
14797
|
-
}, /*#__PURE__*/
|
|
14818
|
+
}, /*#__PURE__*/React__default.createElement(Animated.View, null, /*#__PURE__*/React__default.createElement(StyledFAB, {
|
|
14798
14819
|
key: "fab",
|
|
14799
14820
|
testID: "fab",
|
|
14800
14821
|
icon: fabIcon,
|
|
@@ -14803,35 +14824,35 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
14803
14824
|
active: active,
|
|
14804
14825
|
title: fabTitle,
|
|
14805
14826
|
ref: fabRef
|
|
14806
|
-
})), /*#__PURE__*/
|
|
14827
|
+
})), /*#__PURE__*/React__default.createElement(Modal$1, {
|
|
14807
14828
|
visible: active,
|
|
14808
14829
|
animationType: "fade",
|
|
14809
14830
|
transparent: true,
|
|
14810
14831
|
statusBarTranslucent: true
|
|
14811
|
-
}, /*#__PURE__*/
|
|
14832
|
+
}, /*#__PURE__*/React__default.createElement(StyledContainerInModal, {
|
|
14812
14833
|
testID: testID,
|
|
14813
14834
|
style: [style]
|
|
14814
|
-
}, /*#__PURE__*/
|
|
14835
|
+
}, /*#__PURE__*/React__default.createElement(StyledBackdrop, {
|
|
14815
14836
|
testID: "back-drop",
|
|
14816
14837
|
onPress: onBackdropPress
|
|
14817
|
-
}), /*#__PURE__*/
|
|
14838
|
+
}), /*#__PURE__*/React__default.createElement(StyledActionGroupContainer, {
|
|
14818
14839
|
testID: "action-group",
|
|
14819
14840
|
pointerEvents: "box-none",
|
|
14820
14841
|
style: {
|
|
14821
14842
|
opacity: actionGroupOpacity
|
|
14822
14843
|
}
|
|
14823
|
-
}, /*#__PURE__*/
|
|
14844
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
14824
14845
|
style: [style, {
|
|
14825
14846
|
paddingBottom: 0
|
|
14826
14847
|
}]
|
|
14827
14848
|
}, items === null || items === void 0 ? void 0 : items.map(function (itemProp, index) {
|
|
14828
|
-
return /*#__PURE__*/
|
|
14849
|
+
return /*#__PURE__*/React__default.createElement(ActionItem, _extends$1({
|
|
14829
14850
|
key: itemProp.key || "".concat(itemProp.icon, "_").concat(itemProp.title)
|
|
14830
14851
|
}, itemProp, {
|
|
14831
14852
|
index: active ? index : items.length - index,
|
|
14832
14853
|
active: active
|
|
14833
14854
|
}));
|
|
14834
|
-
}))), active && /*#__PURE__*/
|
|
14855
|
+
}))), active && /*#__PURE__*/React__default.createElement(StyledFAB
|
|
14835
14856
|
// This FAB is moved up a bit compared to the original FAB,
|
|
14836
14857
|
// set marginBottom to negative value to compensate for it
|
|
14837
14858
|
, {
|
|
@@ -14955,9 +14976,9 @@ var getIntentIcon = function getIntentIcon(intent) {
|
|
|
14955
14976
|
var ToastIcon = function ToastIcon(_ref) {
|
|
14956
14977
|
var themeIntent = _ref.themeIntent,
|
|
14957
14978
|
icon = _ref.icon;
|
|
14958
|
-
return icon ? /*#__PURE__*/
|
|
14979
|
+
return icon ? /*#__PURE__*/React__default.createElement(IconContainer, {
|
|
14959
14980
|
testID: "toast-left-icon"
|
|
14960
|
-
}, /*#__PURE__*/
|
|
14981
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
14961
14982
|
icon: icon,
|
|
14962
14983
|
size: "small",
|
|
14963
14984
|
intent: themeIntent === 'snackbar' ? 'text-inverted' : 'text'
|
|
@@ -15009,7 +15030,7 @@ var Toast$1 = function Toast(_ref2) {
|
|
|
15009
15030
|
inputRange: [0, 1],
|
|
15010
15031
|
outputRange: toastConfig.position === 'top' ? [-20, distance] : [20, -distance]
|
|
15011
15032
|
});
|
|
15012
|
-
return /*#__PURE__*/
|
|
15033
|
+
return /*#__PURE__*/React__default.createElement(Container, {
|
|
15013
15034
|
themeVariant: variant,
|
|
15014
15035
|
themeIntent: intent,
|
|
15015
15036
|
style: [style, {
|
|
@@ -15018,21 +15039,21 @@ var Toast$1 = function Toast(_ref2) {
|
|
|
15018
15039
|
translateY: interpolateY
|
|
15019
15040
|
}]
|
|
15020
15041
|
}]
|
|
15021
|
-
}, /*#__PURE__*/
|
|
15042
|
+
}, /*#__PURE__*/React__default.createElement(ContentContainer, {
|
|
15022
15043
|
showDivider: !!actionLabel
|
|
15023
|
-
}, icon !== null ? /*#__PURE__*/
|
|
15044
|
+
}, icon !== null ? /*#__PURE__*/React__default.createElement(ToastIcon, {
|
|
15024
15045
|
themeIntent: intent,
|
|
15025
15046
|
icon: icon || getIntentIcon(intent)
|
|
15026
|
-
}) : null, /*#__PURE__*/
|
|
15047
|
+
}) : null, /*#__PURE__*/React__default.createElement(TextContainer, null, typeof content === 'string' ? /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
15027
15048
|
variant: "small",
|
|
15028
15049
|
intent: intent === 'snackbar' ? 'inverted' : 'body'
|
|
15029
|
-
}, content) : content)), actionLabel ? /*#__PURE__*/
|
|
15050
|
+
}, content) : content)), actionLabel ? /*#__PURE__*/React__default.createElement(CTAWrapper, {
|
|
15030
15051
|
testID: "toast-action-button",
|
|
15031
15052
|
onPress: function onPress() {
|
|
15032
15053
|
onAction === null || onAction === void 0 || onAction();
|
|
15033
15054
|
onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
15034
15055
|
}
|
|
15035
|
-
}, typeof actionLabel === 'string' ? /*#__PURE__*/
|
|
15056
|
+
}, typeof actionLabel === 'string' ? /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
15036
15057
|
variant: "small-bold",
|
|
15037
15058
|
intent: intent === 'snackbar' ? 'inverted' : 'body'
|
|
15038
15059
|
}, actionLabel) : actionLabel) : null);
|
|
@@ -15046,7 +15067,7 @@ var SingleToastDisplay = function SingleToastDisplay(_ref) {
|
|
|
15046
15067
|
setToastList = _ref.setToastList;
|
|
15047
15068
|
var theme = useTheme$1();
|
|
15048
15069
|
var toast = toastList[toastList.length - 1];
|
|
15049
|
-
return toast ? /*#__PURE__*/
|
|
15070
|
+
return toast ? /*#__PURE__*/React__default.createElement(Toast$1, _extends$1({}, toast.props, {
|
|
15050
15071
|
key: toast.id,
|
|
15051
15072
|
style: {
|
|
15052
15073
|
marginBottom: theme.space.small
|
|
@@ -15062,7 +15083,7 @@ var SingleToastDisplay = function SingleToastDisplay(_ref) {
|
|
|
15062
15083
|
}
|
|
15063
15084
|
})) : null;
|
|
15064
15085
|
};
|
|
15065
|
-
var ToastContainer = /*#__PURE__*/
|
|
15086
|
+
var ToastContainer = /*#__PURE__*/React__default.forwardRef(function (_ref2, ref) {
|
|
15066
15087
|
var _ref2$displayType = _ref2.displayType,
|
|
15067
15088
|
displayType = _ref2$displayType === void 0 ? 'single' : _ref2$displayType,
|
|
15068
15089
|
_ref2$position = _ref2.position,
|
|
@@ -15097,17 +15118,17 @@ var ToastContainer = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
15097
15118
|
}
|
|
15098
15119
|
};
|
|
15099
15120
|
});
|
|
15100
|
-
return /*#__PURE__*/
|
|
15121
|
+
return /*#__PURE__*/React__default.createElement(ToastContainerWrapper, {
|
|
15101
15122
|
pointerEvents: "box-none",
|
|
15102
15123
|
position: position,
|
|
15103
15124
|
style: style
|
|
15104
|
-
}, displayType === 'single' ? /*#__PURE__*/
|
|
15125
|
+
}, displayType === 'single' ? /*#__PURE__*/React__default.createElement(SingleToastDisplay, {
|
|
15105
15126
|
toastList: toastList,
|
|
15106
15127
|
setToastList: setToastList
|
|
15107
15128
|
}) : toastList.map(function (_ref3) {
|
|
15108
15129
|
var id = _ref3.id,
|
|
15109
15130
|
props = _ref3.props;
|
|
15110
|
-
return /*#__PURE__*/
|
|
15131
|
+
return /*#__PURE__*/React__default.createElement(Toast$1, _extends$1({}, props, {
|
|
15111
15132
|
key: id,
|
|
15112
15133
|
style: {
|
|
15113
15134
|
marginBottom: theme.space.small
|
|
@@ -15149,15 +15170,15 @@ var ToastProvider = function ToastProvider(_ref) {
|
|
|
15149
15170
|
position: position
|
|
15150
15171
|
};
|
|
15151
15172
|
}, [displayType, position]);
|
|
15152
|
-
return /*#__PURE__*/
|
|
15173
|
+
return /*#__PURE__*/React__default.createElement(ToastContext.Provider, {
|
|
15153
15174
|
value: refState || fallbackToastControlContext
|
|
15154
|
-
}, /*#__PURE__*/
|
|
15175
|
+
}, /*#__PURE__*/React__default.createElement(View, {
|
|
15155
15176
|
style: {
|
|
15156
15177
|
flex: 1
|
|
15157
15178
|
}
|
|
15158
|
-
}, refState ? children : null, /*#__PURE__*/
|
|
15179
|
+
}, refState ? children : null, /*#__PURE__*/React__default.createElement(ToastConfigContext.Provider, {
|
|
15159
15180
|
value: config
|
|
15160
|
-
}, /*#__PURE__*/
|
|
15181
|
+
}, /*#__PURE__*/React__default.createElement(ToastContainer, {
|
|
15161
15182
|
ref: toastRef,
|
|
15162
15183
|
displayType: displayType,
|
|
15163
15184
|
position: position
|
|
@@ -15173,9 +15194,9 @@ var Toast = {
|
|
|
15173
15194
|
var HeroDesignProvider = function HeroDesignProvider(_ref) {
|
|
15174
15195
|
var theme = _ref.theme,
|
|
15175
15196
|
children = _ref.children;
|
|
15176
|
-
return /*#__PURE__*/
|
|
15197
|
+
return /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
15177
15198
|
theme: theme
|
|
15178
|
-
}, /*#__PURE__*/
|
|
15199
|
+
}, /*#__PURE__*/React__default.createElement(Toast.Provider, null, /*#__PURE__*/React__default.createElement(Portal$1.Provider, null, children)));
|
|
15179
15200
|
};
|
|
15180
15201
|
|
|
15181
15202
|
var StyledListItemContainer$1 = index$9(TouchableHighlight)(function (_ref) {
|
|
@@ -15265,7 +15286,7 @@ var ListItem = function ListItem(_ref) {
|
|
|
15265
15286
|
_ref$disabled = _ref.disabled,
|
|
15266
15287
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
|
15267
15288
|
var theme = useTheme();
|
|
15268
|
-
return /*#__PURE__*/
|
|
15289
|
+
return /*#__PURE__*/React__default.createElement(StyledListItemContainer$1, {
|
|
15269
15290
|
style: style,
|
|
15270
15291
|
testID: testID,
|
|
15271
15292
|
themeSelected: selected,
|
|
@@ -15273,26 +15294,26 @@ var ListItem = function ListItem(_ref) {
|
|
|
15273
15294
|
onPress: onPress,
|
|
15274
15295
|
disabled: disabled,
|
|
15275
15296
|
underlayColor: theme.__hd__.list.colors.checkedListItemContainerBackground
|
|
15276
|
-
}, /*#__PURE__*/
|
|
15297
|
+
}, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, leadingStatus && /*#__PURE__*/React__default.createElement(StyledLeadingStatus, {
|
|
15277
15298
|
themeLeadingStatusIntent: leadingStatus,
|
|
15278
15299
|
testID: "leadingStatus"
|
|
15279
|
-
}), /*#__PURE__*/
|
|
15300
|
+
}), /*#__PURE__*/React__default.createElement(StyledContentContainer, null, /*#__PURE__*/React__default.createElement(View, {
|
|
15280
15301
|
style: {
|
|
15281
15302
|
flexDirection: 'row',
|
|
15282
15303
|
alignItems: 'center'
|
|
15283
15304
|
}
|
|
15284
|
-
}, prefix && /*#__PURE__*/
|
|
15305
|
+
}, prefix && /*#__PURE__*/React__default.createElement(StyledPrefixContainer$1, null, typeof prefix === 'string' ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
15285
15306
|
icon: prefix,
|
|
15286
15307
|
intent: disabled ? 'disabled-text' : 'primary'
|
|
15287
|
-
}) : prefix), /*#__PURE__*/
|
|
15308
|
+
}) : prefix), /*#__PURE__*/React__default.createElement(StyledTitleContainer$1, null, typeof title === 'string' ? /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
15288
15309
|
intent: "body"
|
|
15289
|
-
}, title) : title, !!subtitle && /*#__PURE__*/
|
|
15310
|
+
}, title) : title, !!subtitle && /*#__PURE__*/React__default.createElement(Typography.Caption, {
|
|
15290
15311
|
intent: "subdued"
|
|
15291
|
-
}, subtitle)), suffix && /*#__PURE__*/
|
|
15312
|
+
}, subtitle)), suffix && /*#__PURE__*/React__default.createElement(StyledSuffixContainer$1, null, typeof suffix === 'string' ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
15292
15313
|
icon: suffix,
|
|
15293
15314
|
intent: disabled ? 'disabled-text' : 'primary',
|
|
15294
15315
|
size: "small"
|
|
15295
|
-
}) : suffix)), children && /*#__PURE__*/
|
|
15316
|
+
}) : suffix)), children && /*#__PURE__*/React__default.createElement(StyledChildrenContainer, null, children))));
|
|
15296
15317
|
};
|
|
15297
15318
|
|
|
15298
15319
|
var StyledPrefixContainer = index$9(View)(function (_ref) {
|
|
@@ -15339,7 +15360,7 @@ var BasicListItem = function BasicListItem(_ref) {
|
|
|
15339
15360
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
15340
15361
|
onPress = _ref.onPress;
|
|
15341
15362
|
var theme = useTheme();
|
|
15342
|
-
return /*#__PURE__*/
|
|
15363
|
+
return /*#__PURE__*/React__default.createElement(StyledListItemContainer, {
|
|
15343
15364
|
style: style,
|
|
15344
15365
|
testID: testID,
|
|
15345
15366
|
themeSelected: selected,
|
|
@@ -15347,14 +15368,14 @@ var BasicListItem = function BasicListItem(_ref) {
|
|
|
15347
15368
|
onPress: onPress,
|
|
15348
15369
|
disabled: disabled,
|
|
15349
15370
|
underlayColor: theme.__hd__.list.colors.checkedListItemContainerBackground
|
|
15350
|
-
}, /*#__PURE__*/
|
|
15371
|
+
}, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, prefix && /*#__PURE__*/React__default.createElement(StyledPrefixContainer, null, typeof prefix === 'string' ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
15351
15372
|
icon: prefix,
|
|
15352
15373
|
intent: disabled ? 'disabled-text' : 'primary'
|
|
15353
|
-
}) : prefix), /*#__PURE__*/
|
|
15374
|
+
}) : prefix), /*#__PURE__*/React__default.createElement(StyledTitleContainer, null, typeof title === 'string' ? /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
15354
15375
|
intent: "body"
|
|
15355
|
-
}, title) : title, subtitle && /*#__PURE__*/
|
|
15376
|
+
}, title) : title, subtitle && /*#__PURE__*/React__default.createElement(Typography.Caption, {
|
|
15356
15377
|
intent: "subdued"
|
|
15357
|
-
}, subtitle)), suffix && /*#__PURE__*/
|
|
15378
|
+
}, subtitle)), suffix && /*#__PURE__*/React__default.createElement(StyledSuffixContainer, null, typeof suffix === 'string' ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
15358
15379
|
icon: suffix,
|
|
15359
15380
|
size: "small",
|
|
15360
15381
|
intent: disabled ? 'disabled-text' : 'primary'
|
|
@@ -15464,16 +15485,16 @@ function PinCell(_ref) {
|
|
|
15464
15485
|
focused = _ref$focused === void 0 ? false : _ref$focused,
|
|
15465
15486
|
_ref$state = _ref.state,
|
|
15466
15487
|
state = _ref$state === void 0 ? 'default' : _ref$state;
|
|
15467
|
-
return /*#__PURE__*/
|
|
15488
|
+
return /*#__PURE__*/React__default.createElement(StyledCell, {
|
|
15468
15489
|
themeFocused: focused,
|
|
15469
15490
|
themeState: state
|
|
15470
|
-
}, value === '' && /*#__PURE__*/
|
|
15491
|
+
}, value === '' && /*#__PURE__*/React__default.createElement(StyledMask, {
|
|
15471
15492
|
themeState: state,
|
|
15472
15493
|
testID: "pin-cell-mask"
|
|
15473
|
-
}), value !== '' && secure && /*#__PURE__*/
|
|
15494
|
+
}), value !== '' && secure && /*#__PURE__*/React__default.createElement(StyledFilledMask, {
|
|
15474
15495
|
themeState: state,
|
|
15475
15496
|
testID: "pin-cell-filled-mask"
|
|
15476
|
-
}), value !== '' && !secure && /*#__PURE__*/
|
|
15497
|
+
}), value !== '' && !secure && /*#__PURE__*/React__default.createElement(StyledCellText, {
|
|
15477
15498
|
themeState: state,
|
|
15478
15499
|
level: "h3"
|
|
15479
15500
|
}, value));
|
|
@@ -15546,24 +15567,24 @@ var PinInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
15546
15567
|
blur: blur
|
|
15547
15568
|
};
|
|
15548
15569
|
});
|
|
15549
|
-
return /*#__PURE__*/
|
|
15570
|
+
return /*#__PURE__*/React__default.createElement(StyledWrapper$5, {
|
|
15550
15571
|
style: style,
|
|
15551
15572
|
testID: testID
|
|
15552
|
-
}, /*#__PURE__*/
|
|
15553
|
-
return /*#__PURE__*/
|
|
15573
|
+
}, /*#__PURE__*/React__default.createElement(StyledPinWrapper, null, _toConsumableArray(Array(length).keys()).map(function (index) {
|
|
15574
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
15554
15575
|
key: index
|
|
15555
|
-
}, index !== 0 && /*#__PURE__*/
|
|
15576
|
+
}, index !== 0 && /*#__PURE__*/React__default.createElement(StyledSpacer, null), /*#__PURE__*/React__default.createElement(PinCell, {
|
|
15556
15577
|
value: value.charAt(index),
|
|
15557
15578
|
secure: secure,
|
|
15558
15579
|
focused: focused && index === value.length,
|
|
15559
15580
|
state: state
|
|
15560
15581
|
}));
|
|
15561
|
-
})), state === 'error' && /*#__PURE__*/
|
|
15582
|
+
})), state === 'error' && /*#__PURE__*/React__default.createElement(StyledErrorContainer, null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
15562
15583
|
icon: "circle-info",
|
|
15563
15584
|
size: "xsmall",
|
|
15564
15585
|
intent: "danger",
|
|
15565
15586
|
testID: "pin-error-icon"
|
|
15566
|
-
}), /*#__PURE__*/
|
|
15587
|
+
}), /*#__PURE__*/React__default.createElement(StyledErrorMessage, null, error)), /*#__PURE__*/React__default.createElement(StyledHiddenInput, {
|
|
15567
15588
|
themePinLength: length,
|
|
15568
15589
|
ref: inputRef,
|
|
15569
15590
|
value: value,
|
|
@@ -15668,9 +15689,9 @@ var _excluded$e = ["value", "renderValue", "intent", "style", "testID"];
|
|
|
15668
15689
|
var HalfCircle = function HalfCircle(_ref) {
|
|
15669
15690
|
var type = _ref.type,
|
|
15670
15691
|
themeIntent = _ref.themeIntent;
|
|
15671
|
-
return /*#__PURE__*/
|
|
15692
|
+
return /*#__PURE__*/React__default.createElement(StyledHalfCircleWrapper, null, type === 'background' ? /*#__PURE__*/React__default.createElement(StyledHalfCircleInnerBG, {
|
|
15672
15693
|
themeIntent: themeIntent
|
|
15673
|
-
}) : /*#__PURE__*/
|
|
15694
|
+
}) : /*#__PURE__*/React__default.createElement(StyledHalfCircleInnerFG, {
|
|
15674
15695
|
themeIntent: themeIntent
|
|
15675
15696
|
}));
|
|
15676
15697
|
};
|
|
@@ -15722,13 +15743,13 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
15722
15743
|
outputRange: ['0deg', '360deg'],
|
|
15723
15744
|
extrapolate: 'clamp'
|
|
15724
15745
|
});
|
|
15725
|
-
return /*#__PURE__*/
|
|
15746
|
+
return /*#__PURE__*/React__default.createElement(View, _extends$1({}, nativeProps, {
|
|
15726
15747
|
testID: testID,
|
|
15727
15748
|
style: style
|
|
15728
|
-
}), /*#__PURE__*/
|
|
15749
|
+
}), /*#__PURE__*/React__default.createElement(StyledContainer$1, null, /*#__PURE__*/React__default.createElement(View, null, /*#__PURE__*/React__default.createElement(HalfCircle, {
|
|
15729
15750
|
type: "foreground",
|
|
15730
15751
|
themeIntent: intent
|
|
15731
|
-
}), /*#__PURE__*/
|
|
15752
|
+
}), /*#__PURE__*/React__default.createElement(Animated.View, {
|
|
15732
15753
|
style: _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
15733
15754
|
transform: [{
|
|
15734
15755
|
translateX: radius / 2
|
|
@@ -15738,10 +15759,10 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
15738
15759
|
translateX: -radius / 2
|
|
15739
15760
|
}]
|
|
15740
15761
|
})
|
|
15741
|
-
}, /*#__PURE__*/
|
|
15762
|
+
}, /*#__PURE__*/React__default.createElement(HalfCircle, {
|
|
15742
15763
|
type: "background",
|
|
15743
15764
|
themeIntent: intent
|
|
15744
|
-
}))), /*#__PURE__*/
|
|
15765
|
+
}))), /*#__PURE__*/React__default.createElement(View, {
|
|
15745
15766
|
style: {
|
|
15746
15767
|
transform: [{
|
|
15747
15768
|
rotate: '180deg'
|
|
@@ -15749,10 +15770,10 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
15749
15770
|
zIndex: 1,
|
|
15750
15771
|
marginLeft: -0.1
|
|
15751
15772
|
}
|
|
15752
|
-
}, /*#__PURE__*/
|
|
15773
|
+
}, /*#__PURE__*/React__default.createElement(HalfCircle, {
|
|
15753
15774
|
type: "foreground",
|
|
15754
15775
|
themeIntent: intent
|
|
15755
|
-
}), /*#__PURE__*/
|
|
15776
|
+
}), /*#__PURE__*/React__default.createElement(Animated.View, {
|
|
15756
15777
|
style: _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
15757
15778
|
transform: [{
|
|
15758
15779
|
translateX: radius / 2
|
|
@@ -15763,21 +15784,21 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
15763
15784
|
}],
|
|
15764
15785
|
opacity: interpolateOpacityRightHalf
|
|
15765
15786
|
})
|
|
15766
|
-
}, /*#__PURE__*/
|
|
15787
|
+
}, /*#__PURE__*/React__default.createElement(HalfCircle, {
|
|
15767
15788
|
type: "background",
|
|
15768
15789
|
themeIntent: intent
|
|
15769
|
-
}))), /*#__PURE__*/
|
|
15790
|
+
}))), /*#__PURE__*/React__default.createElement(StyledStrokeEnd, {
|
|
15770
15791
|
themeIntent: intent
|
|
15771
|
-
}), /*#__PURE__*/
|
|
15792
|
+
}), /*#__PURE__*/React__default.createElement(Animated.View, {
|
|
15772
15793
|
style: _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
15773
15794
|
zIndex: 2,
|
|
15774
15795
|
transform: [{
|
|
15775
15796
|
rotate: interpolateDotRotate
|
|
15776
15797
|
}]
|
|
15777
15798
|
})
|
|
15778
|
-
}, /*#__PURE__*/
|
|
15799
|
+
}, /*#__PURE__*/React__default.createElement(StyledStrokeEnd, {
|
|
15779
15800
|
themeIntent: intent
|
|
15780
|
-
})), /*#__PURE__*/
|
|
15801
|
+
})), /*#__PURE__*/React__default.createElement(StyledDonutCircle, null, /*#__PURE__*/React__default.createElement(Typography.Body, null, renderValue(value)))));
|
|
15781
15802
|
};
|
|
15782
15803
|
|
|
15783
15804
|
var StyledWrapper$4 = index$9(View)(function (_ref) {
|
|
@@ -15834,11 +15855,11 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
15834
15855
|
outputRange: [999, 0],
|
|
15835
15856
|
extrapolate: 'clamp'
|
|
15836
15857
|
});
|
|
15837
|
-
return /*#__PURE__*/
|
|
15858
|
+
return /*#__PURE__*/React__default.createElement(StyledWrapper$4, _extends$1({}, nativeProps, {
|
|
15838
15859
|
testID: testID,
|
|
15839
15860
|
style: style,
|
|
15840
15861
|
themeIntent: intent
|
|
15841
|
-
}), /*#__PURE__*/
|
|
15862
|
+
}), /*#__PURE__*/React__default.createElement(StyledInner, {
|
|
15842
15863
|
themeIntent: intent,
|
|
15843
15864
|
onLayout: function onLayout(_ref2) {
|
|
15844
15865
|
var nativeEvent = _ref2.nativeEvent;
|
|
@@ -15876,7 +15897,7 @@ var Slider = function Slider(_ref) {
|
|
|
15876
15897
|
style = _ref.style,
|
|
15877
15898
|
testID = _ref.testID;
|
|
15878
15899
|
var theme = useTheme();
|
|
15879
|
-
return /*#__PURE__*/
|
|
15900
|
+
return /*#__PURE__*/React__default.createElement(RnSlider, {
|
|
15880
15901
|
minimumValue: minimumValue,
|
|
15881
15902
|
maximumValue: maximumValue,
|
|
15882
15903
|
step: step,
|
|
@@ -15978,23 +15999,23 @@ var AnimatedSpinner = function AnimatedSpinner(_ref) {
|
|
|
15978
15999
|
themeSize: size,
|
|
15979
16000
|
themeIntent: intent
|
|
15980
16001
|
};
|
|
15981
|
-
return /*#__PURE__*/
|
|
16002
|
+
return /*#__PURE__*/React__default.createElement(Animated.View, {
|
|
15982
16003
|
style: StyleSheet$1.flatten([{
|
|
15983
16004
|
transform: [{
|
|
15984
16005
|
rotate: interpolatedRotateAnimation
|
|
15985
16006
|
}]
|
|
15986
16007
|
}])
|
|
15987
|
-
}, /*#__PURE__*/
|
|
16008
|
+
}, /*#__PURE__*/React__default.createElement(AnimatedRow, _extends$1({
|
|
15988
16009
|
themePosition: "top"
|
|
15989
|
-
}, rowProps), /*#__PURE__*/
|
|
16010
|
+
}, rowProps), /*#__PURE__*/React__default.createElement(AnimatedDot, _extends$1({
|
|
15990
16011
|
themePosition: "topLeft"
|
|
15991
|
-
}, dotProps)), /*#__PURE__*/
|
|
16012
|
+
}, dotProps)), /*#__PURE__*/React__default.createElement(AnimatedDot, _extends$1({
|
|
15992
16013
|
themePosition: "topRight"
|
|
15993
|
-
}, dotProps))), /*#__PURE__*/
|
|
16014
|
+
}, dotProps))), /*#__PURE__*/React__default.createElement(AnimatedRow, _extends$1({
|
|
15994
16015
|
themePosition: "bottom"
|
|
15995
|
-
}, rowProps), /*#__PURE__*/
|
|
16016
|
+
}, rowProps), /*#__PURE__*/React__default.createElement(AnimatedDot, _extends$1({
|
|
15996
16017
|
themePosition: "bottomLeft"
|
|
15997
|
-
}, dotProps)), /*#__PURE__*/
|
|
16018
|
+
}, dotProps)), /*#__PURE__*/React__default.createElement(AnimatedDot, _extends$1({
|
|
15998
16019
|
themePosition: "bottomRight"
|
|
15999
16020
|
}, dotProps))));
|
|
16000
16021
|
};
|
|
@@ -16007,9 +16028,9 @@ var Spinner = function Spinner(_ref) {
|
|
|
16007
16028
|
_ref$intent = _ref.intent,
|
|
16008
16029
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
16009
16030
|
nativeProps = _objectWithoutProperties(_ref, _excluded$c);
|
|
16010
|
-
return /*#__PURE__*/
|
|
16031
|
+
return /*#__PURE__*/React__default.createElement(StyledView$1, nativeProps, /*#__PURE__*/React__default.createElement(StyledSpinnerContainer, {
|
|
16011
16032
|
testID: testID
|
|
16012
|
-
}, /*#__PURE__*/
|
|
16033
|
+
}, /*#__PURE__*/React__default.createElement(AnimatedSpinner, {
|
|
16013
16034
|
size: size,
|
|
16014
16035
|
intent: intent
|
|
16015
16036
|
})));
|
|
@@ -16031,7 +16052,7 @@ var SwipeableAction = function SwipeableAction(_ref) {
|
|
|
16031
16052
|
style = _ref.style,
|
|
16032
16053
|
children = _ref.children,
|
|
16033
16054
|
testID = _ref.testID;
|
|
16034
|
-
return /*#__PURE__*/
|
|
16055
|
+
return /*#__PURE__*/React__default.createElement(StyledRectButton, {
|
|
16035
16056
|
onPress: onPress,
|
|
16036
16057
|
themeIntent: intent,
|
|
16037
16058
|
style: style,
|
|
@@ -16046,7 +16067,7 @@ var renderActions = function renderActions(actions, width, progress, direction)
|
|
|
16046
16067
|
outputRange: direction === 'left' ? [-width, 0] : [width, 0],
|
|
16047
16068
|
extrapolate: 'clamp'
|
|
16048
16069
|
});
|
|
16049
|
-
return /*#__PURE__*/
|
|
16070
|
+
return /*#__PURE__*/React__default.createElement(Animated.View, {
|
|
16050
16071
|
style: {
|
|
16051
16072
|
width: width,
|
|
16052
16073
|
flexDirection: 'row',
|
|
@@ -16073,7 +16094,7 @@ var Swipeable = function Swipeable(_ref) {
|
|
|
16073
16094
|
var _useWindowDimensions = useWindowDimensions(),
|
|
16074
16095
|
width = _useWindowDimensions.width;
|
|
16075
16096
|
var swipeableRef = useRef(null);
|
|
16076
|
-
var _React$useState =
|
|
16097
|
+
var _React$useState = React__default.useState(0),
|
|
16077
16098
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
16078
16099
|
containerWidth = _React$useState2[0],
|
|
16079
16100
|
setContainerWidth = _React$useState2[1];
|
|
@@ -16097,11 +16118,11 @@ var Swipeable = function Swipeable(_ref) {
|
|
|
16097
16118
|
break;
|
|
16098
16119
|
}
|
|
16099
16120
|
}, [state]);
|
|
16100
|
-
return /*#__PURE__*/
|
|
16121
|
+
return /*#__PURE__*/React__default.createElement(GestureHandlerRootView, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
16101
16122
|
onLayout: function onLayout(e) {
|
|
16102
16123
|
return setContainerWidth(e.nativeEvent.layout.width);
|
|
16103
16124
|
}
|
|
16104
|
-
}, /*#__PURE__*/
|
|
16125
|
+
}, /*#__PURE__*/React__default.createElement(Swipeable$1, _extends$1({}, swipeableProps, {
|
|
16105
16126
|
ref: swipeableRef
|
|
16106
16127
|
}, leftActions !== undefined && {
|
|
16107
16128
|
renderLeftActions: renderLeftActions
|
|
@@ -16173,7 +16194,7 @@ var StyledRadio = index$9(List.Item)(function (_ref4) {
|
|
|
16173
16194
|
var RadioCircle = function RadioCircle(_ref) {
|
|
16174
16195
|
var checked = _ref.checked,
|
|
16175
16196
|
text = _ref.text;
|
|
16176
|
-
return /*#__PURE__*/
|
|
16197
|
+
return /*#__PURE__*/React__default.createElement(Circle, null, checked && /*#__PURE__*/React__default.createElement(InnerCircle, {
|
|
16177
16198
|
testID: "".concat(text, "-selected-circle")
|
|
16178
16199
|
}));
|
|
16179
16200
|
};
|
|
@@ -16187,12 +16208,12 @@ var Radio = function Radio(_ref2) {
|
|
|
16187
16208
|
testID = _ref2.testID,
|
|
16188
16209
|
_ref2$inactiveIntent = _ref2.inactiveIntent,
|
|
16189
16210
|
inactiveIntent = _ref2$inactiveIntent === void 0 ? 'light' : _ref2$inactiveIntent;
|
|
16190
|
-
return /*#__PURE__*/
|
|
16211
|
+
return /*#__PURE__*/React__default.createElement(StyledRadio, {
|
|
16191
16212
|
onPress: onPress,
|
|
16192
16213
|
selected: checked,
|
|
16193
16214
|
title: text,
|
|
16194
16215
|
subtitle: subText,
|
|
16195
|
-
suffix: /*#__PURE__*/
|
|
16216
|
+
suffix: /*#__PURE__*/React__default.createElement(RadioCircle, {
|
|
16196
16217
|
checked: checked,
|
|
16197
16218
|
text: text
|
|
16198
16219
|
}),
|
|
@@ -16223,15 +16244,15 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
16223
16244
|
testID = _ref.testID,
|
|
16224
16245
|
_ref$inactiveIntent = _ref.inactiveIntent,
|
|
16225
16246
|
inactiveIntent = _ref$inactiveIntent === void 0 ? 'light' : _ref$inactiveIntent;
|
|
16226
|
-
return /*#__PURE__*/
|
|
16247
|
+
return /*#__PURE__*/React__default.createElement(View, {
|
|
16227
16248
|
style: style,
|
|
16228
16249
|
testID: testID
|
|
16229
16250
|
}, options.map(function (option, index) {
|
|
16230
|
-
return /*#__PURE__*/
|
|
16251
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
16231
16252
|
key: getKey(option, index, keyExtractor)
|
|
16232
|
-
}, index !== 0 && /*#__PURE__*/
|
|
16253
|
+
}, index !== 0 && /*#__PURE__*/React__default.createElement(Spacer, {
|
|
16233
16254
|
themeIntent: inactiveIntent
|
|
16234
|
-
}), /*#__PURE__*/
|
|
16255
|
+
}), /*#__PURE__*/React__default.createElement(Radio, {
|
|
16235
16256
|
text: option.text,
|
|
16236
16257
|
subText: option.subText,
|
|
16237
16258
|
checked: option.value === value,
|
|
@@ -16300,20 +16321,20 @@ var SectionHeading = function SectionHeading(_ref) {
|
|
|
16300
16321
|
testID = _ref.testID;
|
|
16301
16322
|
useDeprecation("SectionHeading's fontSize prop is deprecated and will be removed in the next major release, please remove it.", fontSize !== undefined);
|
|
16302
16323
|
useDeprecation("SectionHeading's fontWeight prop is deprecated and will be removed in the next major release, please remove it.", fontWeight !== undefined);
|
|
16303
|
-
return /*#__PURE__*/
|
|
16324
|
+
return /*#__PURE__*/React__default.createElement(StyledHeading, {
|
|
16304
16325
|
themeSize: size,
|
|
16305
16326
|
style: style,
|
|
16306
16327
|
testID: testID
|
|
16307
|
-
}, /*#__PURE__*/
|
|
16328
|
+
}, /*#__PURE__*/React__default.createElement(StyledWrapper$3, null, /*#__PURE__*/React__default.createElement(StyledIconWrapper$2, null, icon !== undefined && (typeof icon === 'string' ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
16308
16329
|
icon: icon,
|
|
16309
16330
|
size: ICON_SIZE_MAP[size],
|
|
16310
16331
|
intent: ICON_INTENT_MAP[intent]
|
|
16311
|
-
}) : /*#__PURE__*/
|
|
16332
|
+
}) : /*#__PURE__*/React__default.cloneElement(icon, _objectSpread2({
|
|
16312
16333
|
size: ICON_SIZE_MAP[size],
|
|
16313
16334
|
intent: ICON_INTENT_MAP[intent]
|
|
16314
|
-
}, icon.props)))), size === 'small' ? /*#__PURE__*/
|
|
16335
|
+
}, icon.props)))), size === 'small' ? /*#__PURE__*/React__default.createElement(Typography.Caption, {
|
|
16315
16336
|
intent: intent
|
|
16316
|
-
}, text) : /*#__PURE__*/
|
|
16337
|
+
}, text) : /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
16317
16338
|
variant: "small",
|
|
16318
16339
|
intent: intent
|
|
16319
16340
|
}, text)), rightChildren);
|
|
@@ -16322,7 +16343,7 @@ var SectionHeading = function SectionHeading(_ref) {
|
|
|
16322
16343
|
var Footer = function Footer(_ref) {
|
|
16323
16344
|
var label = _ref.label,
|
|
16324
16345
|
onPress = _ref.onPress;
|
|
16325
|
-
return /*#__PURE__*/
|
|
16346
|
+
return /*#__PURE__*/React__default.createElement(CompoundButton, {
|
|
16326
16347
|
variant: "text",
|
|
16327
16348
|
text: label,
|
|
16328
16349
|
onPress: onPress
|
|
@@ -16433,7 +16454,7 @@ var BaseOptionList = function BaseOptionList(_ref) {
|
|
|
16433
16454
|
_useState2 = _slicedToArray(_useState, 2),
|
|
16434
16455
|
onEndReachedCalled = _useState2[0],
|
|
16435
16456
|
setOnEndReachedCalled = _useState2[1];
|
|
16436
|
-
return /*#__PURE__*/
|
|
16457
|
+
return /*#__PURE__*/React__default.createElement(StyledSectionList, _extends$1({
|
|
16437
16458
|
ref: sectionListRef,
|
|
16438
16459
|
style: _objectSpread2({}, onQueryChange ? {
|
|
16439
16460
|
height: Dimensions.get('screen').height
|
|
@@ -16448,16 +16469,16 @@ var BaseOptionList = function BaseOptionList(_ref) {
|
|
|
16448
16469
|
if (onEndReached && onEndReachedCalled && !loading) onEndReached();
|
|
16449
16470
|
setOnEndReachedCalled(false);
|
|
16450
16471
|
},
|
|
16451
|
-
ListFooterComponent: loading ? /*#__PURE__*/
|
|
16472
|
+
ListFooterComponent: loading ? /*#__PURE__*/React__default.createElement(View, {
|
|
16452
16473
|
style: {
|
|
16453
16474
|
display: 'flex',
|
|
16454
16475
|
alignItems: 'center',
|
|
16455
16476
|
height: theme.space.xxxxlarge
|
|
16456
16477
|
}
|
|
16457
|
-
}, /*#__PURE__*/
|
|
16478
|
+
}, /*#__PURE__*/React__default.createElement(Spinner, null)) : null,
|
|
16458
16479
|
renderSectionHeader: function renderSectionHeader(_ref2) {
|
|
16459
16480
|
var category = _ref2.section.category;
|
|
16460
|
-
return category !== '' ? /*#__PURE__*/
|
|
16481
|
+
return category !== '' ? /*#__PURE__*/React__default.createElement(SectionHeading, {
|
|
16461
16482
|
text: category,
|
|
16462
16483
|
style: {
|
|
16463
16484
|
marginBottom: 0
|
|
@@ -16484,7 +16505,7 @@ var Option$2 = function Option(_ref) {
|
|
|
16484
16505
|
disabled: disabled,
|
|
16485
16506
|
onPress: onPress,
|
|
16486
16507
|
title: text,
|
|
16487
|
-
suffix: selected === true ? /*#__PURE__*/
|
|
16508
|
+
suffix: selected === true ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
16488
16509
|
testID: typeof text === 'string' ? "selected-icon-".concat(text) : undefined,
|
|
16489
16510
|
icon: "checkmark",
|
|
16490
16511
|
intent: disabled ? 'disabled-text' : 'primary',
|
|
@@ -16494,7 +16515,7 @@ var Option$2 = function Option(_ref) {
|
|
|
16494
16515
|
}
|
|
16495
16516
|
}) : undefined
|
|
16496
16517
|
};
|
|
16497
|
-
return highlighted === true ? /*#__PURE__*/
|
|
16518
|
+
return highlighted === true ? /*#__PURE__*/React__default.createElement(List.Item, props) : /*#__PURE__*/React__default.createElement(List.BasicItem, props);
|
|
16498
16519
|
};
|
|
16499
16520
|
|
|
16500
16521
|
var _excluded$9 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
|
|
@@ -16524,7 +16545,7 @@ var OptionList$1 = function OptionList(_ref) {
|
|
|
16524
16545
|
return renderOption ? renderOption(_objectSpread2(_objectSpread2({}, info), {}, {
|
|
16525
16546
|
selected: selected,
|
|
16526
16547
|
onPress: onItemPress
|
|
16527
|
-
})) : /*#__PURE__*/
|
|
16548
|
+
})) : /*#__PURE__*/React__default.createElement(Option$2, {
|
|
16528
16549
|
selected: selected,
|
|
16529
16550
|
text: item.text,
|
|
16530
16551
|
disabled: item.disabled,
|
|
@@ -16532,7 +16553,7 @@ var OptionList$1 = function OptionList(_ref) {
|
|
|
16532
16553
|
highlighted: item.highlighted
|
|
16533
16554
|
});
|
|
16534
16555
|
};
|
|
16535
|
-
return /*#__PURE__*/
|
|
16556
|
+
return /*#__PURE__*/React__default.createElement(BaseOptionList, _extends$1({
|
|
16536
16557
|
keyExtractor: keyExtractor,
|
|
16537
16558
|
loading: loading,
|
|
16538
16559
|
onEndReached: onEndReached,
|
|
@@ -16589,15 +16610,15 @@ function MultiSelect(_ref) {
|
|
|
16589
16610
|
useEffect(function () {
|
|
16590
16611
|
setSelectingValue(value);
|
|
16591
16612
|
}, [open, value]);
|
|
16592
|
-
return /*#__PURE__*/
|
|
16613
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(View, {
|
|
16593
16614
|
pointerEvents: !editable || disabled || inputProps !== null && inputProps !== void 0 && inputProps.loading ? 'none' : 'auto'
|
|
16594
|
-
}, /*#__PURE__*/
|
|
16615
|
+
}, /*#__PURE__*/React__default.createElement(TouchableOpacity, {
|
|
16595
16616
|
onPress: function onPress() {
|
|
16596
16617
|
return setOpen(true);
|
|
16597
16618
|
}
|
|
16598
|
-
}, /*#__PURE__*/
|
|
16619
|
+
}, /*#__PURE__*/React__default.createElement(View, {
|
|
16599
16620
|
pointerEvents: "none"
|
|
16600
|
-
}, /*#__PURE__*/
|
|
16621
|
+
}, /*#__PURE__*/React__default.createElement(TextInput, _extends$1({}, inputProps, {
|
|
16601
16622
|
label: label,
|
|
16602
16623
|
value: renderSelectedValue ? rawValue : displayedValue,
|
|
16603
16624
|
suffix: "arrow-down",
|
|
@@ -16612,7 +16633,7 @@ function MultiSelect(_ref) {
|
|
|
16612
16633
|
renderInputValue: renderSelectedValue !== undefined && (rawValue === null || rawValue === void 0 ? void 0 : rawValue.length) > 0 ? function (props) {
|
|
16613
16634
|
return renderSelectedValue(value, props);
|
|
16614
16635
|
} : undefined
|
|
16615
|
-
}))))), /*#__PURE__*/
|
|
16636
|
+
}))))), /*#__PURE__*/React__default.createElement(BottomSheet$1, {
|
|
16616
16637
|
open: open,
|
|
16617
16638
|
onRequestClose: function onRequestClose() {
|
|
16618
16639
|
onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
@@ -16622,13 +16643,13 @@ function MultiSelect(_ref) {
|
|
|
16622
16643
|
style: {
|
|
16623
16644
|
paddingBottom: isKeyboardVisible ? keyboardHeight : 0
|
|
16624
16645
|
},
|
|
16625
|
-
footer: typeof footerLabel === 'string' ? /*#__PURE__*/
|
|
16646
|
+
footer: typeof footerLabel === 'string' ? /*#__PURE__*/React__default.createElement(Footer, {
|
|
16626
16647
|
label: footerLabel,
|
|
16627
16648
|
onPress: function onPress() {
|
|
16628
16649
|
setOpen(false);
|
|
16629
16650
|
onConfirm(selectingValue);
|
|
16630
16651
|
}
|
|
16631
|
-
}) : /*#__PURE__*/
|
|
16652
|
+
}) : /*#__PURE__*/React__default.createElement(Box, {
|
|
16632
16653
|
flex: 1,
|
|
16633
16654
|
flexDirection: "row",
|
|
16634
16655
|
justifyContent: "flex-end"
|
|
@@ -16645,13 +16666,13 @@ function MultiSelect(_ref) {
|
|
|
16645
16666
|
(_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 || _sectionListRef$curre.scrollToLocation(scrollParams);
|
|
16646
16667
|
}
|
|
16647
16668
|
}
|
|
16648
|
-
}, onQueryChange && /*#__PURE__*/
|
|
16669
|
+
}, onQueryChange && /*#__PURE__*/React__default.createElement(StyledSearchBar, null, /*#__PURE__*/React__default.createElement(TextInput, {
|
|
16649
16670
|
editable: true,
|
|
16650
16671
|
placeholder: "Search",
|
|
16651
16672
|
suffix: "search-outlined",
|
|
16652
16673
|
onChangeText: onQueryChange,
|
|
16653
16674
|
value: query
|
|
16654
|
-
})), /*#__PURE__*/
|
|
16675
|
+
})), /*#__PURE__*/React__default.createElement(OptionList$1, {
|
|
16655
16676
|
onQueryChange: onQueryChange,
|
|
16656
16677
|
onEndReached: onEndReached,
|
|
16657
16678
|
loading: loading,
|
|
@@ -16686,7 +16707,7 @@ var Option$1 = function Option(_ref) {
|
|
|
16686
16707
|
onPress: onPress,
|
|
16687
16708
|
title: text
|
|
16688
16709
|
};
|
|
16689
|
-
return highlighted === true ? /*#__PURE__*/
|
|
16710
|
+
return highlighted === true ? /*#__PURE__*/React__default.createElement(List.Item, props) : /*#__PURE__*/React__default.createElement(List.BasicItem, props);
|
|
16690
16711
|
};
|
|
16691
16712
|
|
|
16692
16713
|
var StyledOptionList = index$9(BaseOptionList)(function (_ref) {
|
|
@@ -16721,7 +16742,7 @@ var OptionList = function OptionList(_ref) {
|
|
|
16721
16742
|
return renderOption ? renderOption(_objectSpread2(_objectSpread2({}, info), {}, {
|
|
16722
16743
|
selected: selected,
|
|
16723
16744
|
onPress: onItemPress
|
|
16724
|
-
})) : /*#__PURE__*/
|
|
16745
|
+
})) : /*#__PURE__*/React__default.createElement(Option$1, {
|
|
16725
16746
|
selected: selected,
|
|
16726
16747
|
text: item.text,
|
|
16727
16748
|
disabled: item.disabled,
|
|
@@ -16729,7 +16750,7 @@ var OptionList = function OptionList(_ref) {
|
|
|
16729
16750
|
highlighted: item.highlighted
|
|
16730
16751
|
});
|
|
16731
16752
|
};
|
|
16732
|
-
return /*#__PURE__*/
|
|
16753
|
+
return /*#__PURE__*/React__default.createElement(StyledOptionList, _extends$1({
|
|
16733
16754
|
keyExtractor: keyExtractor,
|
|
16734
16755
|
loading: loading,
|
|
16735
16756
|
onEndReached: onEndReached,
|
|
@@ -16780,15 +16801,15 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
16780
16801
|
return value === opt.value;
|
|
16781
16802
|
})) === null || _flatOptions$find === void 0 ? void 0 : _flatOptions$find.text;
|
|
16782
16803
|
var rawValue = value ? String(value) : undefined;
|
|
16783
|
-
return /*#__PURE__*/
|
|
16804
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(View, {
|
|
16784
16805
|
pointerEvents: !editable || disabled || inputProps !== null && inputProps !== void 0 && inputProps.loading ? 'none' : 'auto'
|
|
16785
|
-
}, /*#__PURE__*/
|
|
16806
|
+
}, /*#__PURE__*/React__default.createElement(TouchableOpacity, {
|
|
16786
16807
|
onPress: function onPress() {
|
|
16787
16808
|
return setOpen(true);
|
|
16788
16809
|
}
|
|
16789
|
-
}, /*#__PURE__*/
|
|
16810
|
+
}, /*#__PURE__*/React__default.createElement(View, {
|
|
16790
16811
|
pointerEvents: "none"
|
|
16791
|
-
}, /*#__PURE__*/
|
|
16812
|
+
}, /*#__PURE__*/React__default.createElement(TextInput, _extends$1({}, inputProps, {
|
|
16792
16813
|
label: label,
|
|
16793
16814
|
value: renderSelectedValue ? rawValue : displayedValue,
|
|
16794
16815
|
suffix: "arrow-down",
|
|
@@ -16803,7 +16824,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
16803
16824
|
renderInputValue: renderSelectedValue !== undefined && !!rawValue ? function (props) {
|
|
16804
16825
|
return renderSelectedValue(value, props);
|
|
16805
16826
|
} : undefined
|
|
16806
|
-
}))))), /*#__PURE__*/
|
|
16827
|
+
}))))), /*#__PURE__*/React__default.createElement(BottomSheet$1, {
|
|
16807
16828
|
open: open,
|
|
16808
16829
|
onRequestClose: function onRequestClose() {
|
|
16809
16830
|
onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
@@ -16820,13 +16841,13 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
16820
16841
|
(_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 || _sectionListRef$curre.scrollToLocation(scrollParams);
|
|
16821
16842
|
}
|
|
16822
16843
|
}
|
|
16823
|
-
}, onQueryChange && /*#__PURE__*/
|
|
16844
|
+
}, onQueryChange && /*#__PURE__*/React__default.createElement(StyledSearchBar, null, /*#__PURE__*/React__default.createElement(TextInput, {
|
|
16824
16845
|
editable: true,
|
|
16825
16846
|
placeholder: "Search",
|
|
16826
16847
|
suffix: "search-outlined",
|
|
16827
16848
|
onChangeText: onQueryChange,
|
|
16828
16849
|
value: query
|
|
16829
|
-
})), /*#__PURE__*/
|
|
16850
|
+
})), /*#__PURE__*/React__default.createElement(OptionList, {
|
|
16830
16851
|
onQueryChange: onQueryChange,
|
|
16831
16852
|
onEndReached: onEndReached,
|
|
16832
16853
|
loading: loading,
|
|
@@ -16940,14 +16961,14 @@ var Skeleton = function Skeleton(_ref) {
|
|
|
16940
16961
|
}
|
|
16941
16962
|
onLayout === null || onLayout === void 0 || onLayout(e);
|
|
16942
16963
|
}, []);
|
|
16943
|
-
return /*#__PURE__*/
|
|
16964
|
+
return /*#__PURE__*/React__default.createElement(StyledContainer, _extends$1({
|
|
16944
16965
|
style: style,
|
|
16945
16966
|
themeVariant: variant,
|
|
16946
16967
|
themeIntent: intent,
|
|
16947
16968
|
onLayout: onContainerLayout
|
|
16948
|
-
}, props), /*#__PURE__*/
|
|
16969
|
+
}, props), /*#__PURE__*/React__default.createElement(StyledGradientContainer, {
|
|
16949
16970
|
themeVariant: variant
|
|
16950
|
-
}, /*#__PURE__*/
|
|
16971
|
+
}, /*#__PURE__*/React__default.createElement(AnimatedLinearGradient, {
|
|
16951
16972
|
start: gradientPositions.start,
|
|
16952
16973
|
end: gradientPositions.end,
|
|
16953
16974
|
style: {
|
|
@@ -17039,11 +17060,11 @@ var StyledSuccessModal = index$9(ModalWrapper)({
|
|
|
17039
17060
|
var _excluded$6 = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
|
|
17040
17061
|
var renderImage = function renderImage(image) {
|
|
17041
17062
|
if ( /*#__PURE__*/isValidElement(image)) {
|
|
17042
|
-
return /*#__PURE__*/
|
|
17063
|
+
return /*#__PURE__*/React__default.cloneElement(image, {
|
|
17043
17064
|
testID: 'success-image'
|
|
17044
17065
|
});
|
|
17045
17066
|
}
|
|
17046
|
-
return /*#__PURE__*/
|
|
17067
|
+
return /*#__PURE__*/React__default.createElement(StyledSuccessImage, {
|
|
17047
17068
|
source: typeof image === 'string' ? {
|
|
17048
17069
|
uri: image
|
|
17049
17070
|
} : image,
|
|
@@ -17064,16 +17085,16 @@ var SuccessPage = function SuccessPage(_ref) {
|
|
|
17064
17085
|
onSecondaryCtaPress = _ref.onSecondaryCtaPress,
|
|
17065
17086
|
nativeProps = _objectWithoutProperties(_ref, _excluded$6);
|
|
17066
17087
|
var showSecondaryButton = secondaryCtaText && onSecondaryCtaPress;
|
|
17067
|
-
return /*#__PURE__*/
|
|
17088
|
+
return /*#__PURE__*/React__default.createElement(StyledSuccessContainer, _extends$1({
|
|
17068
17089
|
testID: testID,
|
|
17069
17090
|
themeVariant: variant
|
|
17070
|
-
}, nativeProps), /*#__PURE__*/
|
|
17091
|
+
}, nativeProps), /*#__PURE__*/React__default.createElement(StyledSuccessContent, null, !!image && /*#__PURE__*/React__default.createElement(StyledSuccessImageContainer, null, renderImage(image)), /*#__PURE__*/React__default.createElement(StyledSuccessTitle, {
|
|
17071
17092
|
level: "h4",
|
|
17072
17093
|
typeface: "playful"
|
|
17073
|
-
}, title), !!description && /*#__PURE__*/
|
|
17094
|
+
}, title), !!description && /*#__PURE__*/React__default.createElement(StyledSuccessDescription, null, description)), !!ctaText && /*#__PURE__*/React__default.createElement(StyledSuccessButtonContainer, null, /*#__PURE__*/React__default.createElement(StyledSuccessButtonPrimary, {
|
|
17074
17095
|
text: ctaText,
|
|
17075
17096
|
onPress: onCtaPress
|
|
17076
|
-
}), !!showSecondaryButton && /*#__PURE__*/
|
|
17097
|
+
}), !!showSecondaryButton && /*#__PURE__*/React__default.createElement(StyledSuccessButtonPrimary, {
|
|
17077
17098
|
variant: "text",
|
|
17078
17099
|
text: secondaryCtaText,
|
|
17079
17100
|
onPress: onSecondaryCtaPress
|
|
@@ -17088,11 +17109,11 @@ var SuccessPage = function SuccessPage(_ref) {
|
|
|
17088
17109
|
var Success = function Success(props) {
|
|
17089
17110
|
var variant = props.variant;
|
|
17090
17111
|
if (variant === 'full-screen') {
|
|
17091
|
-
return /*#__PURE__*/
|
|
17112
|
+
return /*#__PURE__*/React__default.createElement(StyledSuccessModal, {
|
|
17092
17113
|
animationType: "slide"
|
|
17093
|
-
}, /*#__PURE__*/
|
|
17114
|
+
}, /*#__PURE__*/React__default.createElement(SuccessPage, props));
|
|
17094
17115
|
}
|
|
17095
|
-
return /*#__PURE__*/
|
|
17116
|
+
return /*#__PURE__*/React__default.createElement(SuccessPage, props);
|
|
17096
17117
|
};
|
|
17097
17118
|
|
|
17098
17119
|
var AnimatedView = Animated.createAnimatedComponent(View);
|
|
@@ -17143,7 +17164,7 @@ var OptionContent = function OptionContent(_ref) {
|
|
|
17143
17164
|
return content;
|
|
17144
17165
|
}
|
|
17145
17166
|
if (badge.type === 'status') {
|
|
17146
|
-
return /*#__PURE__*/
|
|
17167
|
+
return /*#__PURE__*/React__default.createElement(Badge$1.Status, {
|
|
17147
17168
|
visible: true,
|
|
17148
17169
|
style: {
|
|
17149
17170
|
paddingHorizontal: theme.space.small
|
|
@@ -17175,27 +17196,27 @@ var Option = function Option(_ref2) {
|
|
|
17175
17196
|
}).start();
|
|
17176
17197
|
}, [selected]);
|
|
17177
17198
|
if (selected) {
|
|
17178
|
-
return /*#__PURE__*/
|
|
17199
|
+
return /*#__PURE__*/React__default.createElement(StyledTextWrapper, {
|
|
17179
17200
|
style: {
|
|
17180
17201
|
transform: [{
|
|
17181
17202
|
translateX: translateX
|
|
17182
17203
|
}]
|
|
17183
17204
|
},
|
|
17184
17205
|
onLayout: onLayout
|
|
17185
|
-
}, /*#__PURE__*/
|
|
17186
|
-
content: /*#__PURE__*/
|
|
17206
|
+
}, /*#__PURE__*/React__default.createElement(OptionContent, {
|
|
17207
|
+
content: /*#__PURE__*/React__default.createElement(Typography.Body, null, text),
|
|
17187
17208
|
badge: badge
|
|
17188
17209
|
}));
|
|
17189
17210
|
}
|
|
17190
|
-
return /*#__PURE__*/
|
|
17211
|
+
return /*#__PURE__*/React__default.createElement(StyledIconWrapper$1, {
|
|
17191
17212
|
style: {
|
|
17192
17213
|
transform: [{
|
|
17193
17214
|
translateX: translateX
|
|
17194
17215
|
}]
|
|
17195
17216
|
},
|
|
17196
17217
|
onLayout: onLayout
|
|
17197
|
-
}, /*#__PURE__*/
|
|
17198
|
-
content: /*#__PURE__*/
|
|
17218
|
+
}, /*#__PURE__*/React__default.createElement(OptionContent, {
|
|
17219
|
+
content: /*#__PURE__*/React__default.createElement(Icon, {
|
|
17199
17220
|
icon: icon
|
|
17200
17221
|
}),
|
|
17201
17222
|
badge: badge
|
|
@@ -17237,16 +17258,16 @@ var SelectorSwitch = function SelectorSwitch(_ref) {
|
|
|
17237
17258
|
setKnotWidth(e.nativeEvent.layout.width);
|
|
17238
17259
|
}
|
|
17239
17260
|
}, [value]);
|
|
17240
|
-
return /*#__PURE__*/
|
|
17261
|
+
return /*#__PURE__*/React__default.createElement(TouchableWithoutFeedback, {
|
|
17241
17262
|
onPress: function onPress() {
|
|
17242
17263
|
return _onPress === null || _onPress === void 0 ? void 0 : _onPress(value);
|
|
17243
17264
|
},
|
|
17244
17265
|
testID: testID
|
|
17245
|
-
}, /*#__PURE__*/
|
|
17266
|
+
}, /*#__PURE__*/React__default.createElement(StyledWrapper$2, {
|
|
17246
17267
|
onLayout: onContainerLayout,
|
|
17247
17268
|
style: style
|
|
17248
17269
|
}, options.map(function (opt, index) {
|
|
17249
|
-
return /*#__PURE__*/
|
|
17270
|
+
return /*#__PURE__*/React__default.createElement(Option, _extends$1({}, opt, {
|
|
17250
17271
|
selected: opt.value === value
|
|
17251
17272
|
// eslint-disable-next-line react/no-array-index-key
|
|
17252
17273
|
,
|
|
@@ -17256,7 +17277,7 @@ var SelectorSwitch = function SelectorSwitch(_ref) {
|
|
|
17256
17277
|
},
|
|
17257
17278
|
index: index
|
|
17258
17279
|
}));
|
|
17259
|
-
}), /*#__PURE__*/
|
|
17280
|
+
}), /*#__PURE__*/React__default.createElement(StyledKnot$1, {
|
|
17260
17281
|
style: {
|
|
17261
17282
|
width: knotWidth,
|
|
17262
17283
|
transform: [{
|
|
@@ -17324,14 +17345,14 @@ var Switch = function Switch(_ref2) {
|
|
|
17324
17345
|
useNativeDriver: false
|
|
17325
17346
|
}).start();
|
|
17326
17347
|
}, [checked]);
|
|
17327
|
-
return /*#__PURE__*/
|
|
17348
|
+
return /*#__PURE__*/React__default.createElement(TouchableWithoutFeedback, {
|
|
17328
17349
|
testID: testID,
|
|
17329
17350
|
onPress: onPress,
|
|
17330
17351
|
disabled: disabled
|
|
17331
|
-
}, /*#__PURE__*/
|
|
17352
|
+
}, /*#__PURE__*/React__default.createElement(StyledWrapper$1, {
|
|
17332
17353
|
themeVariant: variant,
|
|
17333
17354
|
style: style
|
|
17334
|
-
}, /*#__PURE__*/
|
|
17355
|
+
}, /*#__PURE__*/React__default.createElement(StyledKnot, {
|
|
17335
17356
|
style: {
|
|
17336
17357
|
left: animatedOffset
|
|
17337
17358
|
}
|
|
@@ -17399,7 +17420,7 @@ var ActiveTabIndicator = function ActiveTabIndicator(_ref) {
|
|
|
17399
17420
|
inputRange: inputRange,
|
|
17400
17421
|
outputRange: [0, tabsLength * indicatorWidth]
|
|
17401
17422
|
});
|
|
17402
|
-
return /*#__PURE__*/
|
|
17423
|
+
return /*#__PURE__*/React__default.createElement(StyledIndicator, {
|
|
17403
17424
|
themeWidth: indicatorWidth,
|
|
17404
17425
|
style: {
|
|
17405
17426
|
transform: [{
|
|
@@ -17478,18 +17499,18 @@ var SceneView = function SceneView(_ref) {
|
|
|
17478
17499
|
index = _ref.index,
|
|
17479
17500
|
selectedIndex = _ref.selectedIndex,
|
|
17480
17501
|
testID = _ref.testID;
|
|
17481
|
-
var _React$useState =
|
|
17502
|
+
var _React$useState = React__default.useState(Math.abs(selectedIndex - index) > lazyPreloadDistance),
|
|
17482
17503
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
17483
17504
|
isLoading = _React$useState2[0],
|
|
17484
17505
|
setIsLoading = _React$useState2[1];
|
|
17485
17506
|
var focused = index === selectedIndex;
|
|
17486
|
-
|
|
17507
|
+
React__default.useEffect(function () {
|
|
17487
17508
|
if (isLoading && Math.abs(selectedIndex - index) <= lazyPreloadDistance) {
|
|
17488
17509
|
// Always render the route when it becomes focused
|
|
17489
17510
|
setIsLoading(false);
|
|
17490
17511
|
}
|
|
17491
17512
|
}, [isLoading, index, selectedIndex, lazyPreloadDistance]);
|
|
17492
|
-
|
|
17513
|
+
React__default.useEffect(function () {
|
|
17493
17514
|
var timer;
|
|
17494
17515
|
if (!lazy && isLoading) {
|
|
17495
17516
|
// If lazy mode is not enabled, render the scene with a delay if not loaded already
|
|
@@ -17504,7 +17525,7 @@ var SceneView = function SceneView(_ref) {
|
|
|
17504
17525
|
}
|
|
17505
17526
|
};
|
|
17506
17527
|
}, [index, isLoading, lazy, focused]);
|
|
17507
|
-
return /*#__PURE__*/
|
|
17528
|
+
return /*#__PURE__*/React__default.createElement(TabScreen, {
|
|
17508
17529
|
accessibilityElementsHidden: !focused,
|
|
17509
17530
|
importantForAccessibility: focused ? 'auto' : 'no-hide-descendants',
|
|
17510
17531
|
style: [{
|
|
@@ -17519,9 +17540,9 @@ var TabWithBadge = function TabWithBadge(_ref) {
|
|
|
17519
17540
|
var config = _ref.config,
|
|
17520
17541
|
tabItem = _ref.tabItem;
|
|
17521
17542
|
var theme = useTheme$1();
|
|
17522
|
-
if (!config) return /*#__PURE__*/
|
|
17543
|
+
if (!config) return /*#__PURE__*/React__default.createElement(View, null, tabItem);
|
|
17523
17544
|
if (config.type === 'status') {
|
|
17524
|
-
return /*#__PURE__*/
|
|
17545
|
+
return /*#__PURE__*/React__default.createElement(Badge$1.Status, {
|
|
17525
17546
|
visible: true,
|
|
17526
17547
|
style: {
|
|
17527
17548
|
paddingHorizontal: theme.space.xsmall
|
|
@@ -17529,7 +17550,7 @@ var TabWithBadge = function TabWithBadge(_ref) {
|
|
|
17529
17550
|
}, tabItem);
|
|
17530
17551
|
}
|
|
17531
17552
|
if (config.type === 'counter') {
|
|
17532
|
-
return /*#__PURE__*/
|
|
17553
|
+
return /*#__PURE__*/React__default.createElement(StyledBadgeWrapper, null, tabItem, /*#__PURE__*/React__default.createElement(Badge$1, {
|
|
17533
17554
|
content: config.value,
|
|
17534
17555
|
max: config.max,
|
|
17535
17556
|
intent: "info",
|
|
@@ -17538,11 +17559,11 @@ var TabWithBadge = function TabWithBadge(_ref) {
|
|
|
17538
17559
|
}
|
|
17539
17560
|
}));
|
|
17540
17561
|
}
|
|
17541
|
-
return /*#__PURE__*/
|
|
17562
|
+
return /*#__PURE__*/React__default.createElement(View, null, tabItem);
|
|
17542
17563
|
};
|
|
17543
17564
|
|
|
17544
17565
|
var useAnimatedValueArray = function useAnimatedValueArray(initialValues) {
|
|
17545
|
-
var refs =
|
|
17566
|
+
var refs = React__default.useRef([]);
|
|
17546
17567
|
refs.current.length = initialValues.length;
|
|
17547
17568
|
initialValues.forEach(function (initialValue, i) {
|
|
17548
17569
|
var _refs$current$i;
|
|
@@ -17561,7 +17582,7 @@ var useInitHighlightedAnimation = function useInitHighlightedAnimation(_ref) {
|
|
|
17561
17582
|
}).map(function (_, i) {
|
|
17562
17583
|
return i === selectedIndex ? 1 : 0;
|
|
17563
17584
|
}));
|
|
17564
|
-
|
|
17585
|
+
React__default.useEffect(function () {
|
|
17565
17586
|
if (variant !== 'highlighted') {
|
|
17566
17587
|
return;
|
|
17567
17588
|
}
|
|
@@ -17604,7 +17625,7 @@ var useInitUnderlinedAnimation = function useInitUnderlinedAnimation(_ref) {
|
|
|
17604
17625
|
_ref$selectedIndex = _ref.selectedIndex,
|
|
17605
17626
|
selectedIndex = _ref$selectedIndex === void 0 ? 0 : _ref$selectedIndex,
|
|
17606
17627
|
variant = _ref.variant;
|
|
17607
|
-
var previousIndex =
|
|
17628
|
+
var previousIndex = React__default.useRef(0);
|
|
17608
17629
|
var translateXAnims = useAnimatedValueArray(Array.from({
|
|
17609
17630
|
length: tabsLength
|
|
17610
17631
|
}).map(function () {
|
|
@@ -17627,7 +17648,7 @@ var useInitUnderlinedAnimation = function useInitUnderlinedAnimation(_ref) {
|
|
|
17627
17648
|
outputRange: [0, 1]
|
|
17628
17649
|
});
|
|
17629
17650
|
});
|
|
17630
|
-
|
|
17651
|
+
React__default.useEffect(function () {
|
|
17631
17652
|
if (variant === 'underlined' && selectedIndex !== undefined && previousIndex.current !== selectedIndex) {
|
|
17632
17653
|
// Prepare for translateX into the right position.
|
|
17633
17654
|
if (selectedIndex > previousIndex.current) {
|
|
@@ -17652,7 +17673,7 @@ var getTabItem$1 = function getTabItem(_ref) {
|
|
|
17652
17673
|
color = _ref.color,
|
|
17653
17674
|
active = _ref.active;
|
|
17654
17675
|
if (isHeroIcon(item)) {
|
|
17655
|
-
return /*#__PURE__*/
|
|
17676
|
+
return /*#__PURE__*/React__default.createElement(Icon, {
|
|
17656
17677
|
icon: item,
|
|
17657
17678
|
testID: "hero-icon-".concat(item),
|
|
17658
17679
|
size: "small",
|
|
@@ -17662,7 +17683,7 @@ var getTabItem$1 = function getTabItem(_ref) {
|
|
|
17662
17683
|
});
|
|
17663
17684
|
}
|
|
17664
17685
|
if (typeof item === 'string') {
|
|
17665
|
-
return /*#__PURE__*/
|
|
17686
|
+
return /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
17666
17687
|
variant: active ? 'regular-bold' : 'regular',
|
|
17667
17688
|
numberOfLines: 1,
|
|
17668
17689
|
style: {
|
|
@@ -17690,7 +17711,7 @@ var ScrollableTabHeader = function ScrollableTabHeader(_ref2) {
|
|
|
17690
17711
|
_ref2$variant = _ref2.variant,
|
|
17691
17712
|
variant = _ref2$variant === void 0 ? 'highlighted' : _ref2$variant;
|
|
17692
17713
|
var theme = useTheme$1();
|
|
17693
|
-
var flatListRef =
|
|
17714
|
+
var flatListRef = React__default.useRef(null);
|
|
17694
17715
|
// Init underlined animation data
|
|
17695
17716
|
var _useInitUnderlinedAni = useInitUnderlinedAnimation({
|
|
17696
17717
|
tabsLength: tabs.length,
|
|
@@ -17706,7 +17727,7 @@ var ScrollableTabHeader = function ScrollableTabHeader(_ref2) {
|
|
|
17706
17727
|
variant: variant
|
|
17707
17728
|
}),
|
|
17708
17729
|
tabsAnims = _useInitHighlightedAn.tabsAnims;
|
|
17709
|
-
|
|
17730
|
+
React__default.useEffect(function () {
|
|
17710
17731
|
if (selectedIndex !== undefined && selectedIndex !== -1) {
|
|
17711
17732
|
var _flatListRef$current;
|
|
17712
17733
|
(_flatListRef$current = flatListRef.current) === null || _flatListRef$current === void 0 || _flatListRef$current.scrollToIndex({
|
|
@@ -17717,10 +17738,10 @@ var ScrollableTabHeader = function ScrollableTabHeader(_ref2) {
|
|
|
17717
17738
|
return function () {
|
|
17718
17739
|
};
|
|
17719
17740
|
}, [selectedIndex]);
|
|
17720
|
-
return /*#__PURE__*/
|
|
17741
|
+
return /*#__PURE__*/React__default.createElement(HeaderTabWrapper, {
|
|
17721
17742
|
themeInsets: insets,
|
|
17722
17743
|
style: barStyle
|
|
17723
|
-
}, /*#__PURE__*/
|
|
17744
|
+
}, /*#__PURE__*/React__default.createElement(FlatList, {
|
|
17724
17745
|
testID: testID,
|
|
17725
17746
|
ref: flatListRef,
|
|
17726
17747
|
horizontal: true,
|
|
@@ -17769,15 +17790,15 @@ var ScrollableTabHeader = function ScrollableTabHeader(_ref2) {
|
|
|
17769
17790
|
color: active ? theme.__hd__.tabs.colors.active : theme.__hd__.tabs.colors.inactive,
|
|
17770
17791
|
active: active
|
|
17771
17792
|
});
|
|
17772
|
-
return /*#__PURE__*/
|
|
17793
|
+
return /*#__PURE__*/React__default.createElement(TouchableWithoutFeedback, {
|
|
17773
17794
|
key: key,
|
|
17774
17795
|
onPress: function onPress() {
|
|
17775
17796
|
onTabPress(key);
|
|
17776
17797
|
},
|
|
17777
17798
|
testID: tabItemTestID
|
|
17778
|
-
}, /*#__PURE__*/
|
|
17799
|
+
}, /*#__PURE__*/React__default.createElement(HeaderTabItem, {
|
|
17779
17800
|
isFirstItem: index === 0
|
|
17780
|
-
}, variant === 'highlighted' && /*#__PURE__*/
|
|
17801
|
+
}, variant === 'highlighted' && /*#__PURE__*/React__default.createElement(HeaderTabItemOutlineWrapper, null, /*#__PURE__*/React__default.createElement(HeaderTabItemOutline, {
|
|
17781
17802
|
themeActive: active,
|
|
17782
17803
|
style: {
|
|
17783
17804
|
flex: 1,
|
|
@@ -17785,10 +17806,10 @@ var ScrollableTabHeader = function ScrollableTabHeader(_ref2) {
|
|
|
17785
17806
|
scaleX: outlineScale
|
|
17786
17807
|
}]
|
|
17787
17808
|
}
|
|
17788
|
-
})), /*#__PURE__*/
|
|
17809
|
+
})), /*#__PURE__*/React__default.createElement(HeaderTabItemWrapper, null, /*#__PURE__*/React__default.createElement(TabWithBadge, {
|
|
17789
17810
|
config: badge,
|
|
17790
17811
|
tabItem: tabItem
|
|
17791
|
-
})), variant === 'underlined' && /*#__PURE__*/
|
|
17812
|
+
})), variant === 'underlined' && /*#__PURE__*/React__default.createElement(HeaderTabItemIndicator, {
|
|
17792
17813
|
style: {
|
|
17793
17814
|
opacity: underlinedOpacity[index],
|
|
17794
17815
|
transform: [{
|
|
@@ -17800,11 +17821,11 @@ var ScrollableTabHeader = function ScrollableTabHeader(_ref2) {
|
|
|
17800
17821
|
}));
|
|
17801
17822
|
};
|
|
17802
17823
|
|
|
17803
|
-
var TabContext = /*#__PURE__*/
|
|
17804
|
-
var ScreenContext = /*#__PURE__*/
|
|
17824
|
+
var TabContext = /*#__PURE__*/React__default.createContext(null);
|
|
17825
|
+
var ScreenContext = /*#__PURE__*/React__default.createContext(null);
|
|
17805
17826
|
var useIsFocused = function useIsFocused() {
|
|
17806
|
-
var context =
|
|
17807
|
-
var key =
|
|
17827
|
+
var context = React__default.useContext(TabContext);
|
|
17828
|
+
var key = React__default.useContext(ScreenContext);
|
|
17808
17829
|
if (!context || !key) {
|
|
17809
17830
|
return;
|
|
17810
17831
|
}
|
|
@@ -17827,14 +17848,14 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
17827
17848
|
componentTestID = _ref.testID,
|
|
17828
17849
|
_ref$variant = _ref.variant,
|
|
17829
17850
|
variant = _ref$variant === void 0 ? 'highlighted' : _ref$variant;
|
|
17830
|
-
var pagerViewRef =
|
|
17851
|
+
var pagerViewRef = React__default.useRef(null);
|
|
17831
17852
|
var insets = useSafeAreaInsets();
|
|
17832
17853
|
var selectedTabIndex = tabs.findIndex(function (item) {
|
|
17833
17854
|
return item.key === selectedTabKey;
|
|
17834
17855
|
});
|
|
17835
17856
|
// Used as a flag to prevent calling onTabPress on initial render
|
|
17836
17857
|
var hasScrolled = useRef(false);
|
|
17837
|
-
|
|
17858
|
+
React__default.useEffect(function () {
|
|
17838
17859
|
var timeoutHandle;
|
|
17839
17860
|
if (selectedTabIndex !== -1) {
|
|
17840
17861
|
// If the selected tab is changed too quickly, the setPage is crashed and not work anymore
|
|
@@ -17851,17 +17872,17 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
17851
17872
|
}
|
|
17852
17873
|
};
|
|
17853
17874
|
}, [selectedTabIndex, pagerViewRef]);
|
|
17854
|
-
var tabContextProviderValue =
|
|
17875
|
+
var tabContextProviderValue = React__default.useMemo(function () {
|
|
17855
17876
|
return {
|
|
17856
17877
|
selectedTabKey: selectedTabKey
|
|
17857
17878
|
};
|
|
17858
17879
|
}, [selectedTabKey]);
|
|
17859
|
-
return /*#__PURE__*/
|
|
17880
|
+
return /*#__PURE__*/React__default.createElement(TabContext.Provider, {
|
|
17860
17881
|
value: tabContextProviderValue
|
|
17861
|
-
}, /*#__PURE__*/
|
|
17882
|
+
}, /*#__PURE__*/React__default.createElement(TabContainer, {
|
|
17862
17883
|
style: containerStyle,
|
|
17863
17884
|
testID: componentTestID
|
|
17864
|
-
}, /*#__PURE__*/
|
|
17885
|
+
}, /*#__PURE__*/React__default.createElement(ScrollableTabHeader, {
|
|
17865
17886
|
tabs: tabs,
|
|
17866
17887
|
selectedIndex: selectedTabIndex,
|
|
17867
17888
|
onTabPress: onTabPress,
|
|
@@ -17869,7 +17890,7 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
17869
17890
|
insets: insets,
|
|
17870
17891
|
testID: componentTestID ? "".concat(componentTestID, "-tab-bar") : undefined,
|
|
17871
17892
|
variant: variant
|
|
17872
|
-
}), /*#__PURE__*/
|
|
17893
|
+
}), /*#__PURE__*/React__default.createElement(ContentWrapper, {
|
|
17873
17894
|
initialPage: selectedTabIndex,
|
|
17874
17895
|
ref: pagerViewRef,
|
|
17875
17896
|
onPageScrollStateChanged: function onPageScrollStateChanged(e) {
|
|
@@ -17891,10 +17912,10 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
17891
17912
|
var key = tab.key,
|
|
17892
17913
|
component = tab.component,
|
|
17893
17914
|
testID = tab.testID;
|
|
17894
|
-
return /*#__PURE__*/
|
|
17915
|
+
return /*#__PURE__*/React__default.createElement(ScreenContext.Provider, {
|
|
17895
17916
|
value: key,
|
|
17896
17917
|
key: key
|
|
17897
|
-
}, /*#__PURE__*/
|
|
17918
|
+
}, /*#__PURE__*/React__default.createElement(SceneView, {
|
|
17898
17919
|
testID: testID,
|
|
17899
17920
|
index: index,
|
|
17900
17921
|
selectedIndex: selectedTabIndex,
|
|
@@ -17909,7 +17930,7 @@ var getTabItem = function getTabItem(_ref) {
|
|
|
17909
17930
|
color = _ref.color,
|
|
17910
17931
|
active = _ref.active;
|
|
17911
17932
|
if (typeof item === 'string') {
|
|
17912
|
-
return /*#__PURE__*/
|
|
17933
|
+
return /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
17913
17934
|
variant: active ? 'small-bold' : 'small',
|
|
17914
17935
|
numberOfLines: 1,
|
|
17915
17936
|
style: {
|
|
@@ -17936,13 +17957,13 @@ var Tabs = function Tabs(_ref2) {
|
|
|
17936
17957
|
componentTestID = _ref2.testID;
|
|
17937
17958
|
var theme = useTheme$1();
|
|
17938
17959
|
var insets = useSafeAreaInsets();
|
|
17939
|
-
var pagerViewRef =
|
|
17960
|
+
var pagerViewRef = React__default.useRef(null);
|
|
17940
17961
|
var selectedTabIndex = tabs.findIndex(function (item) {
|
|
17941
17962
|
return item.key === selectedTabKey;
|
|
17942
17963
|
});
|
|
17943
|
-
var scrollOffsetAnimatedValue =
|
|
17944
|
-
var positionAnimatedValue =
|
|
17945
|
-
var _React$useState =
|
|
17964
|
+
var scrollOffsetAnimatedValue = React__default.useRef(new Animated.Value(0)).current;
|
|
17965
|
+
var positionAnimatedValue = React__default.useRef(new Animated.Value(0)).current;
|
|
17966
|
+
var _React$useState = React__default.useState(0),
|
|
17946
17967
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
17947
17968
|
tabsWidth = _React$useState2[0],
|
|
17948
17969
|
setTabsWidth = _React$useState2[1];
|
|
@@ -17952,21 +17973,21 @@ var Tabs = function Tabs(_ref2) {
|
|
|
17952
17973
|
(_pagerViewRef$current = pagerViewRef.current) === null || _pagerViewRef$current === void 0 || _pagerViewRef$current.setPage(selectedTabIndex);
|
|
17953
17974
|
}
|
|
17954
17975
|
}, [selectedTabIndex]);
|
|
17955
|
-
var tabContextProviderValue =
|
|
17976
|
+
var tabContextProviderValue = React__default.useMemo(function () {
|
|
17956
17977
|
return {
|
|
17957
17978
|
selectedTabKey: selectedTabKey
|
|
17958
17979
|
};
|
|
17959
17980
|
}, [selectedTabKey]);
|
|
17960
|
-
return /*#__PURE__*/
|
|
17981
|
+
return /*#__PURE__*/React__default.createElement(TabContext.Provider, {
|
|
17961
17982
|
value: tabContextProviderValue
|
|
17962
|
-
}, /*#__PURE__*/
|
|
17983
|
+
}, /*#__PURE__*/React__default.createElement(TabContainer$1, {
|
|
17963
17984
|
style: containerStyle,
|
|
17964
17985
|
testID: componentTestID
|
|
17965
|
-
}, /*#__PURE__*/
|
|
17986
|
+
}, /*#__PURE__*/React__default.createElement(HeaderTabWrapper$1, {
|
|
17966
17987
|
themeInsets: insets,
|
|
17967
17988
|
style: barStyle,
|
|
17968
17989
|
testID: componentTestID ? "".concat(componentTestID, "-tab-bar") : undefined
|
|
17969
|
-
}, /*#__PURE__*/
|
|
17990
|
+
}, /*#__PURE__*/React__default.createElement(View, null, /*#__PURE__*/React__default.createElement(HeaderTab, {
|
|
17970
17991
|
onLayout: function onLayout(e) {
|
|
17971
17992
|
var width = e.nativeEvent.layout.width;
|
|
17972
17993
|
if (tabsWidth !== width) {
|
|
@@ -17986,22 +18007,22 @@ var Tabs = function Tabs(_ref2) {
|
|
|
17986
18007
|
color: theme.__hd__.tabs.colors.text,
|
|
17987
18008
|
active: active
|
|
17988
18009
|
});
|
|
17989
|
-
return /*#__PURE__*/
|
|
18010
|
+
return /*#__PURE__*/React__default.createElement(TouchableWithoutFeedback, {
|
|
17990
18011
|
key: key,
|
|
17991
18012
|
onPress: function onPress() {
|
|
17992
18013
|
onTabPress(key);
|
|
17993
18014
|
},
|
|
17994
18015
|
testID: testID
|
|
17995
|
-
}, /*#__PURE__*/
|
|
18016
|
+
}, /*#__PURE__*/React__default.createElement(HeaderTabItem$1, null, /*#__PURE__*/React__default.createElement(TabWithBadge, {
|
|
17996
18017
|
config: badge,
|
|
17997
18018
|
tabItem: tabItem
|
|
17998
18019
|
})));
|
|
17999
|
-
})), /*#__PURE__*/
|
|
18020
|
+
})), /*#__PURE__*/React__default.createElement(ActiveTabIndicator, {
|
|
18000
18021
|
positionAnimatedValue: positionAnimatedValue,
|
|
18001
18022
|
scrollOffsetAnimatedValue: scrollOffsetAnimatedValue,
|
|
18002
18023
|
tabsLength: tabs.length,
|
|
18003
18024
|
tabsWidth: tabsWidth
|
|
18004
|
-
}))), /*#__PURE__*/
|
|
18025
|
+
}))), /*#__PURE__*/React__default.createElement(ContentWrapper$1, {
|
|
18005
18026
|
initialPage: selectedTabIndex,
|
|
18006
18027
|
ref: pagerViewRef,
|
|
18007
18028
|
onPageSelected: function onPageSelected(e) {
|
|
@@ -18024,10 +18045,10 @@ var Tabs = function Tabs(_ref2) {
|
|
|
18024
18045
|
var key = tab.key,
|
|
18025
18046
|
component = tab.component,
|
|
18026
18047
|
testID = tab.testID;
|
|
18027
|
-
return /*#__PURE__*/
|
|
18048
|
+
return /*#__PURE__*/React__default.createElement(ScreenContext.Provider, {
|
|
18028
18049
|
value: key,
|
|
18029
18050
|
key: key
|
|
18030
|
-
}, /*#__PURE__*/
|
|
18051
|
+
}, /*#__PURE__*/React__default.createElement(SceneView, {
|
|
18031
18052
|
testID: testID,
|
|
18032
18053
|
key: key,
|
|
18033
18054
|
index: index,
|
|
@@ -18074,11 +18095,11 @@ var Tag = function Tag(_ref) {
|
|
|
18074
18095
|
testID = _ref.testID,
|
|
18075
18096
|
nativeProps = _objectWithoutProperties(_ref, _excluded$5);
|
|
18076
18097
|
useDeprecation("Tag's variant prop is deprecated and will be removed in the next major release. Please remove it.", variant !== undefined);
|
|
18077
|
-
return /*#__PURE__*/
|
|
18098
|
+
return /*#__PURE__*/React__default.createElement(StyledView, _extends$1({}, nativeProps, {
|
|
18078
18099
|
themeIntent: intent,
|
|
18079
18100
|
style: style,
|
|
18080
18101
|
testID: testID
|
|
18081
|
-
}), typeof content === 'string' ? /*#__PURE__*/
|
|
18102
|
+
}), typeof content === 'string' ? /*#__PURE__*/React__default.createElement(StyledText, {
|
|
18082
18103
|
themeIntent: intent,
|
|
18083
18104
|
fontWeight: "semi-bold"
|
|
18084
18105
|
}, content) : content);
|
|
@@ -18107,15 +18128,15 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
|
|
|
18107
18128
|
var is12Hour = displayFormat.includes('hh');
|
|
18108
18129
|
var displayValue = value ? formatTime(displayFormat, value) : '';
|
|
18109
18130
|
var pickerInitValue = value || new Date();
|
|
18110
|
-
return /*#__PURE__*/
|
|
18131
|
+
return /*#__PURE__*/React__default.createElement(TouchableOpacity, {
|
|
18111
18132
|
onPress: function onPress() {
|
|
18112
18133
|
return setOpen(true);
|
|
18113
18134
|
},
|
|
18114
18135
|
disabled: disabled
|
|
18115
|
-
}, /*#__PURE__*/
|
|
18136
|
+
}, /*#__PURE__*/React__default.createElement(View, {
|
|
18116
18137
|
pointerEvents: "none",
|
|
18117
18138
|
testID: "timePickerInputAndroid"
|
|
18118
|
-
}, /*#__PURE__*/
|
|
18139
|
+
}, /*#__PURE__*/React__default.createElement(TextInput, {
|
|
18119
18140
|
label: label,
|
|
18120
18141
|
value: displayValue,
|
|
18121
18142
|
suffix: showSuffix ? 'clock-3' : undefined,
|
|
@@ -18126,7 +18147,7 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
|
|
|
18126
18147
|
helpText: helpText,
|
|
18127
18148
|
style: style,
|
|
18128
18149
|
testID: testID
|
|
18129
|
-
})), open ? /*#__PURE__*/
|
|
18150
|
+
})), open ? /*#__PURE__*/React__default.createElement(DateTimePicker, {
|
|
18130
18151
|
testID: "timePickerAndroid",
|
|
18131
18152
|
mode: "time",
|
|
18132
18153
|
value: pickerInitValue,
|
|
@@ -18176,15 +18197,15 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
18176
18197
|
var is12Hour = displayFormat.includes('hh');
|
|
18177
18198
|
var displayValue = value ? formatTime(displayFormat, value) : '';
|
|
18178
18199
|
var theme = useTheme();
|
|
18179
|
-
return /*#__PURE__*/
|
|
18200
|
+
return /*#__PURE__*/React__default.createElement(TouchableOpacity, {
|
|
18180
18201
|
onPress: function onPress() {
|
|
18181
18202
|
return setOpen(true);
|
|
18182
18203
|
},
|
|
18183
18204
|
disabled: disabled
|
|
18184
|
-
}, /*#__PURE__*/
|
|
18205
|
+
}, /*#__PURE__*/React__default.createElement(View, {
|
|
18185
18206
|
pointerEvents: "none",
|
|
18186
18207
|
testID: "timePickerInputIOS"
|
|
18187
|
-
}, /*#__PURE__*/
|
|
18208
|
+
}, /*#__PURE__*/React__default.createElement(TextInput, {
|
|
18188
18209
|
label: label,
|
|
18189
18210
|
value: displayValue,
|
|
18190
18211
|
suffix: showSuffix ? 'clock-3' : undefined,
|
|
@@ -18195,13 +18216,13 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
18195
18216
|
helpText: helpText,
|
|
18196
18217
|
testID: testID,
|
|
18197
18218
|
style: style
|
|
18198
|
-
})), /*#__PURE__*/
|
|
18219
|
+
})), /*#__PURE__*/React__default.createElement(BottomSheet$1, {
|
|
18199
18220
|
open: open,
|
|
18200
18221
|
onRequestClose: function onRequestClose() {
|
|
18201
18222
|
return setOpen(false);
|
|
18202
18223
|
},
|
|
18203
18224
|
header: label,
|
|
18204
|
-
footer: /*#__PURE__*/
|
|
18225
|
+
footer: /*#__PURE__*/React__default.createElement(CompoundButton, {
|
|
18205
18226
|
variant: "text",
|
|
18206
18227
|
text: confirmLabel,
|
|
18207
18228
|
onPress: function onPress() {
|
|
@@ -18211,7 +18232,7 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
18211
18232
|
setOpen(false);
|
|
18212
18233
|
}
|
|
18213
18234
|
})
|
|
18214
|
-
}, /*#__PURE__*/
|
|
18235
|
+
}, /*#__PURE__*/React__default.createElement(StyledPickerWrapper, null, /*#__PURE__*/React__default.createElement(DateTimePicker, {
|
|
18215
18236
|
testID: "timePickerIOS",
|
|
18216
18237
|
value: selectingDate,
|
|
18217
18238
|
mode: "time"
|
|
@@ -18234,9 +18255,9 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
18234
18255
|
|
|
18235
18256
|
var TimePicker = function TimePicker(props) {
|
|
18236
18257
|
if (Platform.OS === 'ios') {
|
|
18237
|
-
return /*#__PURE__*/
|
|
18258
|
+
return /*#__PURE__*/React__default.createElement(TimePickerIOS, props);
|
|
18238
18259
|
}
|
|
18239
|
-
return /*#__PURE__*/
|
|
18260
|
+
return /*#__PURE__*/React__default.createElement(TimePickerAndroid, props);
|
|
18240
18261
|
};
|
|
18241
18262
|
|
|
18242
18263
|
var ToolbarWrapper = index$9(View)(function (_ref) {
|
|
@@ -18304,12 +18325,12 @@ var IconItem = function IconItem(_ref) {
|
|
|
18304
18325
|
intent = _ref.intent,
|
|
18305
18326
|
disabled = _ref.disabled,
|
|
18306
18327
|
label = _ref.label;
|
|
18307
|
-
return /*#__PURE__*/
|
|
18328
|
+
return /*#__PURE__*/React__default.createElement(IconButtonWrapper, null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
18308
18329
|
icon: icon,
|
|
18309
18330
|
size: "medium",
|
|
18310
18331
|
intent: disabled ? 'disabled-text' : intent,
|
|
18311
18332
|
testID: "toolbar-item-icon-".concat(icon)
|
|
18312
|
-
}), label ? /*#__PURE__*/
|
|
18333
|
+
}), label ? /*#__PURE__*/React__default.createElement(IconButtonLabel, {
|
|
18313
18334
|
variant: "regular-bold",
|
|
18314
18335
|
intent: disabled ? 'subdued' : intent,
|
|
18315
18336
|
allowFontScaling: false,
|
|
@@ -18324,7 +18345,7 @@ var ToolbarItemContent = function ToolbarItemContent(_ref2) {
|
|
|
18324
18345
|
_ref2$disabled = _ref2.disabled,
|
|
18325
18346
|
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled;
|
|
18326
18347
|
if (icon) {
|
|
18327
|
-
return /*#__PURE__*/
|
|
18348
|
+
return /*#__PURE__*/React__default.createElement(IconItem, {
|
|
18328
18349
|
icon: icon,
|
|
18329
18350
|
intent: intent,
|
|
18330
18351
|
disabled: disabled,
|
|
@@ -18332,7 +18353,7 @@ var ToolbarItemContent = function ToolbarItemContent(_ref2) {
|
|
|
18332
18353
|
});
|
|
18333
18354
|
}
|
|
18334
18355
|
if (label) {
|
|
18335
|
-
return /*#__PURE__*/
|
|
18356
|
+
return /*#__PURE__*/React__default.createElement(Typography.Body, {
|
|
18336
18357
|
variant: "regular-bold",
|
|
18337
18358
|
intent: disabled ? 'disabled' : intent,
|
|
18338
18359
|
allowFontScaling: false,
|
|
@@ -18350,11 +18371,11 @@ var ToolbarItem = function ToolbarItem(_ref3) {
|
|
|
18350
18371
|
_ref3$disabled = _ref3.disabled,
|
|
18351
18372
|
disabled = _ref3$disabled === void 0 ? false : _ref3$disabled,
|
|
18352
18373
|
style = _ref3.style;
|
|
18353
|
-
return /*#__PURE__*/
|
|
18374
|
+
return /*#__PURE__*/React__default.createElement(ToolbarItemWrapper, {
|
|
18354
18375
|
onPress: onPress,
|
|
18355
18376
|
disabled: disabled,
|
|
18356
18377
|
style: style
|
|
18357
|
-
}, /*#__PURE__*/
|
|
18378
|
+
}, /*#__PURE__*/React__default.createElement(ToolbarItemContent, {
|
|
18358
18379
|
icon: icon,
|
|
18359
18380
|
label: label,
|
|
18360
18381
|
intent: intent,
|
|
@@ -18368,7 +18389,7 @@ var ToolbarGroup = function ToolbarGroup(_ref) {
|
|
|
18368
18389
|
_ref$items = _ref.items,
|
|
18369
18390
|
items = _ref$items === void 0 ? [] : _ref$items;
|
|
18370
18391
|
useDeprecation("Toolbar's align prop is deprecated", align !== 'right');
|
|
18371
|
-
return /*#__PURE__*/
|
|
18392
|
+
return /*#__PURE__*/React__default.createElement(ToolbarGroupWrapper, {
|
|
18372
18393
|
align: align
|
|
18373
18394
|
}, items.map(function (_ref2) {
|
|
18374
18395
|
var label = _ref2.label,
|
|
@@ -18376,7 +18397,7 @@ var ToolbarGroup = function ToolbarGroup(_ref) {
|
|
|
18376
18397
|
onPress = _ref2.onPress,
|
|
18377
18398
|
disabled = _ref2.disabled,
|
|
18378
18399
|
intent = _ref2.intent;
|
|
18379
|
-
return /*#__PURE__*/
|
|
18400
|
+
return /*#__PURE__*/React__default.createElement(ToolbarItem, {
|
|
18380
18401
|
key: "".concat(label, "-").concat(icon),
|
|
18381
18402
|
label: label,
|
|
18382
18403
|
icon: icon,
|
|
@@ -18391,7 +18412,7 @@ var _excluded$4 = ["children"];
|
|
|
18391
18412
|
var Toolbar = function Toolbar(_ref) {
|
|
18392
18413
|
var children = _ref.children,
|
|
18393
18414
|
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
18394
|
-
return /*#__PURE__*/
|
|
18415
|
+
return /*#__PURE__*/React__default.createElement(ToolbarWrapper, rest, children);
|
|
18395
18416
|
};
|
|
18396
18417
|
var index$1 = Object.assign(Toolbar, {
|
|
18397
18418
|
Group: ToolbarGroup
|
|
@@ -18436,21 +18457,21 @@ var Rate = function Rate(_ref) {
|
|
|
18436
18457
|
useNativeDriver: Platform.OS !== 'web'
|
|
18437
18458
|
}).start();
|
|
18438
18459
|
}, [value, animatedValue]);
|
|
18439
|
-
return /*#__PURE__*/
|
|
18440
|
-
return /*#__PURE__*/
|
|
18460
|
+
return /*#__PURE__*/React__default.createElement(StyledWrapper, otherProps, options.length > 0 && options.map(function (item, index) {
|
|
18461
|
+
return /*#__PURE__*/React__default.createElement(Pressable, {
|
|
18441
18462
|
key: item.value,
|
|
18442
18463
|
disabled: disabled || readonly,
|
|
18443
18464
|
onPress: function onPress() {
|
|
18444
18465
|
return onChange === null || onChange === void 0 ? void 0 : onChange(item.value);
|
|
18445
18466
|
},
|
|
18446
18467
|
testID: item.value.toString()
|
|
18447
|
-
}, /*#__PURE__*/
|
|
18468
|
+
}, /*#__PURE__*/React__default.createElement(StyledIconWrapper, {
|
|
18448
18469
|
style: valueIndex === index && {
|
|
18449
18470
|
transform: [{
|
|
18450
18471
|
scale: scale
|
|
18451
18472
|
}]
|
|
18452
18473
|
}
|
|
18453
|
-
}, /*#__PURE__*/
|
|
18474
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
18454
18475
|
icon: index <= valueIndex ? 'star' : 'star-outlined',
|
|
18455
18476
|
intent: disabled ? 'disabled-text' : 'primary'
|
|
18456
18477
|
})));
|
|
@@ -18460,7 +18481,7 @@ var Rate = function Rate(_ref) {
|
|
|
18460
18481
|
var RefreshControl = function RefreshControl(_ref) {
|
|
18461
18482
|
var props = _extends$1({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
18462
18483
|
var theme = useTheme();
|
|
18463
|
-
return /*#__PURE__*/
|
|
18484
|
+
return /*#__PURE__*/React__default.createElement(RefreshControl$1, _extends$1({}, props, {
|
|
18464
18485
|
colors: [theme.__hd__.refreshControl.colors.indicator],
|
|
18465
18486
|
tintColor: theme.__hd__.refreshControl.colors.indicator
|
|
18466
18487
|
}));
|
|
@@ -18529,11 +18550,11 @@ var ToolbarButton = function ToolbarButton(_ref) {
|
|
|
18529
18550
|
onPress = _ref.onPress,
|
|
18530
18551
|
testID = _ref.testID,
|
|
18531
18552
|
selected = _ref.selected;
|
|
18532
|
-
return /*#__PURE__*/
|
|
18553
|
+
return /*#__PURE__*/React__default.createElement(StyledToolbarButton, {
|
|
18533
18554
|
selected: selected,
|
|
18534
18555
|
onPress: onPress,
|
|
18535
18556
|
testID: testID
|
|
18536
|
-
}, /*#__PURE__*/
|
|
18557
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
18537
18558
|
size: "small",
|
|
18538
18559
|
icon: icon
|
|
18539
18560
|
}));
|
|
@@ -18631,13 +18652,13 @@ var EditorToolbar = function EditorToolbar(_ref2) {
|
|
|
18631
18652
|
var toolbarButtons = useMemo(function () {
|
|
18632
18653
|
return toolbarButtonArray.map(function (button) {
|
|
18633
18654
|
if (button.buttonName === '|') {
|
|
18634
|
-
return /*#__PURE__*/
|
|
18655
|
+
return /*#__PURE__*/React__default.createElement(StyledSeparator, {
|
|
18635
18656
|
key: button.id
|
|
18636
18657
|
});
|
|
18637
18658
|
}
|
|
18638
18659
|
var config = buttonConfigs[button.buttonName];
|
|
18639
18660
|
if (config) {
|
|
18640
|
-
return /*#__PURE__*/
|
|
18661
|
+
return /*#__PURE__*/React__default.createElement(ToolbarButton, {
|
|
18641
18662
|
key: button.id,
|
|
18642
18663
|
testID: config.icon,
|
|
18643
18664
|
icon: config.icon,
|
|
@@ -18652,7 +18673,7 @@ var EditorToolbar = function EditorToolbar(_ref2) {
|
|
|
18652
18673
|
});
|
|
18653
18674
|
}, [toolbarButtonArray]);
|
|
18654
18675
|
if (show) {
|
|
18655
|
-
return /*#__PURE__*/
|
|
18676
|
+
return /*#__PURE__*/React__default.createElement(StyledToolbar, {
|
|
18656
18677
|
testID: testID
|
|
18657
18678
|
}, toolbarButtons);
|
|
18658
18679
|
}
|
|
@@ -18691,7 +18712,7 @@ var MentionList = function MentionList(_ref) {
|
|
|
18691
18712
|
if (isEmptyString(search)) {
|
|
18692
18713
|
return null;
|
|
18693
18714
|
}
|
|
18694
|
-
return /*#__PURE__*/
|
|
18715
|
+
return /*#__PURE__*/React__default.createElement(View, null, render(search, function (id, name) {
|
|
18695
18716
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
18696
18717
|
highlighted: false
|
|
18697
18718
|
};
|
|
@@ -18980,7 +19001,7 @@ var scheduler_production_min = {};
|
|
|
18980
19001
|
scheduler.exports = scheduler_production_min;
|
|
18981
19002
|
}
|
|
18982
19003
|
|
|
18983
|
-
var aa =
|
|
19004
|
+
var aa = React__default,
|
|
18984
19005
|
ca = scheduler.exports;
|
|
18985
19006
|
function p(a) {
|
|
18986
19007
|
for (var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c = 1; c < arguments.length; c++) b += "&args[]=" + encodeURIComponent(arguments[c]);
|
|
@@ -26123,7 +26144,7 @@ function checkDCE() {
|
|
|
26123
26144
|
|
|
26124
26145
|
(function (module, exports) {
|
|
26125
26146
|
!function (e, t) {
|
|
26126
|
-
module.exports = t(
|
|
26147
|
+
module.exports = t(React__default, reactDom.exports);
|
|
26127
26148
|
}(window, function (e, t) {
|
|
26128
26149
|
return function (e) {
|
|
26129
26150
|
var t = {};
|
|
@@ -35429,14 +35450,14 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
35429
35450
|
postMessage(webview.current, message);
|
|
35430
35451
|
}
|
|
35431
35452
|
};
|
|
35432
|
-
var _React$useState =
|
|
35453
|
+
var _React$useState = React__default.useState({
|
|
35433
35454
|
height: 0,
|
|
35434
35455
|
width: 0
|
|
35435
35456
|
}),
|
|
35436
35457
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
35437
35458
|
inputSize = _React$useState2[0],
|
|
35438
35459
|
setInputSize = _React$useState2[1];
|
|
35439
|
-
var _React$useState3 =
|
|
35460
|
+
var _React$useState3 = React__default.useState(0),
|
|
35440
35461
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
35441
35462
|
labelWidth = _React$useState4[0],
|
|
35442
35463
|
setLabelWidth = _React$useState4[1];
|
|
@@ -35551,9 +35572,9 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
35551
35572
|
break;
|
|
35552
35573
|
}
|
|
35553
35574
|
}, []);
|
|
35554
|
-
return /*#__PURE__*/
|
|
35575
|
+
return /*#__PURE__*/React__default.createElement(StyledContainer$4, {
|
|
35555
35576
|
testID: testID
|
|
35556
|
-
}, /*#__PURE__*/
|
|
35577
|
+
}, /*#__PURE__*/React__default.createElement(StyledLabelContainerInsideTextInput, {
|
|
35557
35578
|
themeVariant: "text",
|
|
35558
35579
|
pointerEvents: "none",
|
|
35559
35580
|
testID: "input-label-container",
|
|
@@ -35577,28 +35598,28 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
35577
35598
|
})
|
|
35578
35599
|
}]
|
|
35579
35600
|
}]
|
|
35580
|
-
}, required && /*#__PURE__*/
|
|
35601
|
+
}, required && /*#__PURE__*/React__default.createElement(StyledAsteriskLabelInsideTextInput, {
|
|
35581
35602
|
style: {
|
|
35582
35603
|
backgroundColor: theme.__hd__.textInput.colors.labelBackground
|
|
35583
35604
|
},
|
|
35584
35605
|
themeState: state
|
|
35585
|
-
}, "*"), !!label && /*#__PURE__*/
|
|
35606
|
+
}, "*"), !!label && /*#__PURE__*/React__default.createElement(StyledLabelInsideTextInput, {
|
|
35586
35607
|
style: {
|
|
35587
35608
|
backgroundColor: theme.__hd__.textInput.colors.labelBackground
|
|
35588
35609
|
},
|
|
35589
35610
|
testID: "input-label",
|
|
35590
35611
|
themeState: state,
|
|
35591
35612
|
onLayout: onLabelLayout
|
|
35592
|
-
}, label)), /*#__PURE__*/
|
|
35613
|
+
}, label)), /*#__PURE__*/React__default.createElement(StyledTextInputContainer, {
|
|
35593
35614
|
onLayout: onLayout
|
|
35594
|
-
}, /*#__PURE__*/
|
|
35615
|
+
}, /*#__PURE__*/React__default.createElement(StyledBorderBackDrop, {
|
|
35595
35616
|
themeState: state,
|
|
35596
35617
|
themeFocused: isFocused
|
|
35597
|
-
}), /*#__PURE__*/
|
|
35618
|
+
}), /*#__PURE__*/React__default.createElement(StyledTextInputAndLabelContainer, null, /*#__PURE__*/React__default.createElement(TouchableWithoutFeedback, {
|
|
35598
35619
|
onPress: function onPress(e) {
|
|
35599
35620
|
return e.stopPropagation();
|
|
35600
35621
|
}
|
|
35601
|
-
}, /*#__PURE__*/
|
|
35622
|
+
}, /*#__PURE__*/React__default.createElement(StyledWebView, {
|
|
35602
35623
|
ref: webview,
|
|
35603
35624
|
testID: "webview",
|
|
35604
35625
|
style: style,
|
|
@@ -35611,17 +35632,17 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
35611
35632
|
hideKeyboardAccessoryView: true,
|
|
35612
35633
|
keyboardDisplayRequiresUserAction: false,
|
|
35613
35634
|
height: webviewHeight
|
|
35614
|
-
})))), /*#__PURE__*/
|
|
35635
|
+
})))), /*#__PURE__*/React__default.createElement(StyledErrorAndHelpTextContainer, null, /*#__PURE__*/React__default.createElement(StyledErrorAndMaxLengthContainer, null, error ? /*#__PURE__*/React__default.createElement(StyledErrorContainer$2, null, /*#__PURE__*/React__default.createElement(Icon, {
|
|
35615
35636
|
testID: "input-error-icon",
|
|
35616
35637
|
icon: "circle-info",
|
|
35617
35638
|
size: "xsmall",
|
|
35618
35639
|
intent: "danger"
|
|
35619
|
-
}), /*#__PURE__*/
|
|
35640
|
+
}), /*#__PURE__*/React__default.createElement(StyledError, {
|
|
35620
35641
|
testID: "input-error-message"
|
|
35621
|
-
}, error)) : !!helpText && /*#__PURE__*/
|
|
35642
|
+
}, error)) : !!helpText && /*#__PURE__*/React__default.createElement(StyledHelperText, null, helpText))));
|
|
35622
35643
|
};
|
|
35623
35644
|
var RichTextEditorWithRef = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
35624
|
-
return /*#__PURE__*/
|
|
35645
|
+
return /*#__PURE__*/React__default.createElement(RichTextEditor, _extends$1({}, props, {
|
|
35625
35646
|
forwardedRef: ref
|
|
35626
35647
|
}));
|
|
35627
35648
|
});
|
|
@@ -35653,18 +35674,18 @@ var AnimatedFAB = function AnimatedFAB(_ref) {
|
|
|
35653
35674
|
contentHeight = _ref.contentHeight,
|
|
35654
35675
|
layoutHeight = _ref.layoutHeight;
|
|
35655
35676
|
var component = 'items' in fabProps ? 'ActionGroup' : 'FAB';
|
|
35656
|
-
var ref =
|
|
35657
|
-
var currentContentHeight =
|
|
35658
|
-
var currentLayoutHeight =
|
|
35677
|
+
var ref = React__default.useRef(null);
|
|
35678
|
+
var currentContentHeight = React__default.useRef(0);
|
|
35679
|
+
var currentLayoutHeight = React__default.useRef(0);
|
|
35659
35680
|
/** fabState is used to avoid calling duplicated animations. */
|
|
35660
|
-
var fabState =
|
|
35681
|
+
var fabState = React__default.useRef('show');
|
|
35661
35682
|
/** remainingScrollOffset determines whether to animate the FAB. */
|
|
35662
|
-
var remainingScrollOffset =
|
|
35683
|
+
var remainingScrollOffset = React__default.useRef(MAX_ANIMATABLE_SCROLL_DISTANCE);
|
|
35663
35684
|
/** currentScrollDirection is used to determine the scroll direction. */
|
|
35664
|
-
var currentScrollDirection =
|
|
35685
|
+
var currentScrollDirection = React__default.useRef('down');
|
|
35665
35686
|
/** lastScrollY is the scrollY from the preview scroll event. */
|
|
35666
|
-
var lastScrollY =
|
|
35667
|
-
var animateFab =
|
|
35687
|
+
var lastScrollY = React__default.useRef(0);
|
|
35688
|
+
var animateFab = React__default.useCallback(function (newState) {
|
|
35668
35689
|
if (fabState.current !== newState) {
|
|
35669
35690
|
if (newState === 'show') {
|
|
35670
35691
|
var _ref$current;
|
|
@@ -35679,7 +35700,7 @@ var AnimatedFAB = function AnimatedFAB(_ref) {
|
|
|
35679
35700
|
fabState.current = newState;
|
|
35680
35701
|
}
|
|
35681
35702
|
}, [component]);
|
|
35682
|
-
|
|
35703
|
+
React__default.useEffect(function () {
|
|
35683
35704
|
contentHeight.addListener(function (_ref2) {
|
|
35684
35705
|
var value = _ref2.value;
|
|
35685
35706
|
if (value > 0 && value !== currentContentHeight.current) {
|
|
@@ -35734,9 +35755,9 @@ var AnimatedFAB = function AnimatedFAB(_ref) {
|
|
|
35734
35755
|
layoutHeight.removeAllListeners();
|
|
35735
35756
|
};
|
|
35736
35757
|
}, [contentHeight, contentOffsetY, layoutHeight]);
|
|
35737
|
-
return component === 'FAB' ? /*#__PURE__*/
|
|
35758
|
+
return component === 'FAB' ? /*#__PURE__*/React__default.createElement(FAB, _extends$1({
|
|
35738
35759
|
ref: ref
|
|
35739
|
-
}, fabProps)) : /*#__PURE__*/
|
|
35760
|
+
}, fabProps)) : /*#__PURE__*/React__default.createElement(ActionGroup, _extends$1({
|
|
35740
35761
|
ref: ref
|
|
35741
35762
|
}, fabProps));
|
|
35742
35763
|
};
|
|
@@ -35744,14 +35765,14 @@ var AnimatedFAB = function AnimatedFAB(_ref) {
|
|
|
35744
35765
|
function AnimatedScroller(_ref) {
|
|
35745
35766
|
var ScrollComponent = _ref.ScrollComponent,
|
|
35746
35767
|
fabProps = _ref.fabProps;
|
|
35747
|
-
var contentOffsetY =
|
|
35748
|
-
var contentHeight =
|
|
35749
|
-
var layoutHeight =
|
|
35768
|
+
var contentOffsetY = React__default.useRef(new Animated.Value(0)).current;
|
|
35769
|
+
var contentHeight = React__default.useRef(new Animated.Value(0)).current;
|
|
35770
|
+
var layoutHeight = React__default.useRef(new Animated.Value(0)).current;
|
|
35750
35771
|
// Common props for all ScrollView, FlatList and SectionList.
|
|
35751
35772
|
var _ScrollComponent$prop = ScrollComponent.props,
|
|
35752
35773
|
onScroll = _ScrollComponent$prop.onScroll,
|
|
35753
35774
|
scrollEventThrottle = _ScrollComponent$prop.scrollEventThrottle;
|
|
35754
|
-
return /*#__PURE__*/
|
|
35775
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.cloneElement(ScrollComponent, _objectSpread2(_objectSpread2({}, ScrollComponent.props), {}, {
|
|
35755
35776
|
scrollEventThrottle: scrollEventThrottle || 100,
|
|
35756
35777
|
onScroll: Animated.event([{
|
|
35757
35778
|
nativeEvent: {
|
|
@@ -35769,7 +35790,7 @@ function AnimatedScroller(_ref) {
|
|
|
35769
35790
|
useNativeDriver: false,
|
|
35770
35791
|
listener: onScroll
|
|
35771
35792
|
})
|
|
35772
|
-
})), !!fabProps && /*#__PURE__*/
|
|
35793
|
+
})), !!fabProps && /*#__PURE__*/React__default.createElement(AnimatedFAB, {
|
|
35773
35794
|
fabProps: fabProps,
|
|
35774
35795
|
contentOffsetY: contentOffsetY,
|
|
35775
35796
|
contentHeight: contentHeight,
|
|
@@ -35781,8 +35802,8 @@ var _excluded$2 = ["fabProps"];
|
|
|
35781
35802
|
var ScrollViewWithFAB = function ScrollViewWithFAB(_ref) {
|
|
35782
35803
|
var fabProps = _ref.fabProps,
|
|
35783
35804
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
35784
|
-
return /*#__PURE__*/
|
|
35785
|
-
ScrollComponent: /*#__PURE__*/
|
|
35805
|
+
return /*#__PURE__*/React__default.createElement(AnimatedScroller, {
|
|
35806
|
+
ScrollComponent: /*#__PURE__*/React__default.createElement(ScrollView, props),
|
|
35786
35807
|
fabProps: fabProps
|
|
35787
35808
|
});
|
|
35788
35809
|
};
|
|
@@ -35791,8 +35812,8 @@ var _excluded$1 = ["fabProps"];
|
|
|
35791
35812
|
function FlatListWithFAB(_ref) {
|
|
35792
35813
|
var fabProps = _ref.fabProps,
|
|
35793
35814
|
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
35794
|
-
return /*#__PURE__*/
|
|
35795
|
-
ScrollComponent: /*#__PURE__*/
|
|
35815
|
+
return /*#__PURE__*/React__default.createElement(AnimatedScroller, {
|
|
35816
|
+
ScrollComponent: /*#__PURE__*/React__default.createElement(FlatList, props),
|
|
35796
35817
|
fabProps: fabProps
|
|
35797
35818
|
});
|
|
35798
35819
|
}
|
|
@@ -35801,8 +35822,8 @@ var _excluded = ["fabProps"];
|
|
|
35801
35822
|
function SectionListWithFAB(_ref) {
|
|
35802
35823
|
var fabProps = _ref.fabProps,
|
|
35803
35824
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
35804
|
-
return /*#__PURE__*/
|
|
35805
|
-
ScrollComponent: /*#__PURE__*/
|
|
35825
|
+
return /*#__PURE__*/React__default.createElement(AnimatedScroller, {
|
|
35826
|
+
ScrollComponent: /*#__PURE__*/React__default.createElement(SectionList, props),
|
|
35806
35827
|
fabProps: fabProps
|
|
35807
35828
|
});
|
|
35808
35829
|
}
|