@hero-design/rn 7.19.0 → 7.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +6 -1
- package/.turbo/turbo-build.log +2 -2
- package/es/index.js +572 -194
- package/lib/index.js +572 -193
- package/package.json +4 -4
- package/src/components/Alert/StyledAlert.tsx +5 -5
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +140 -19
- package/src/components/Alert/__tests__/index.spec.tsx +21 -0
- package/src/components/Alert/index.tsx +13 -6
- package/src/components/Avatar/StyledAvatar.tsx +2 -1
- package/src/components/Avatar/index.tsx +2 -1
- package/src/components/Box/StyledBox.tsx +54 -0
- package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +605 -0
- package/src/components/Box/__tests__/helpers.spec.ts +14 -0
- package/src/components/Box/__tests__/index.spec.tsx +155 -0
- package/src/components/Box/config.ts +201 -0
- package/src/components/Box/helpers.ts +10 -0
- package/src/components/Box/index.tsx +13 -0
- package/src/components/Box/types.ts +38 -0
- package/src/components/Calendar/__tests__/index.spec.tsx +13 -17
- package/src/components/Card/DataCard/StyledDataCard.tsx +8 -2
- package/src/components/Card/DataCard/__tests__/StyledDataCard.spec.tsx +1 -0
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +16 -0
- package/src/components/Card/DataCard/index.tsx +1 -1
- package/src/components/Card/StyledCard.tsx +12 -19
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +147 -0
- package/src/components/Card/__tests__/index.spec.tsx +18 -0
- package/src/components/Card/index.tsx +6 -1
- package/src/components/Drawer/DragableDrawer/helpers.ts +3 -4
- package/src/components/FAB/ActionGroup/index.tsx +6 -8
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +4 -8
- package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +1 -1
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +22 -20
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +22 -20
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/Spinner/AnimatedSpinner.tsx +7 -7
- package/src/components/Spinner/StyledSpinner.tsx +24 -19
- package/src/components/Spinner/__tests__/AnimatedSpinner.spec.tsx +1 -1
- package/src/components/Spinner/__tests__/StyledSpinner.spec.tsx +32 -16
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +14 -12
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +273 -31
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +14 -12
- package/src/components/Spinner/index.tsx +10 -2
- package/src/components/Tabs/ScrollableTabs.tsx +9 -4
- package/src/components/Tabs/StyledScrollableTabs.tsx +6 -5
- package/src/components/Tabs/StyledTabs.tsx +6 -0
- package/src/components/Tabs/TabWithBadge.tsx +68 -0
- package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +13 -0
- package/src/components/Tabs/__tests__/TabWithBadge.spec.tsx +48 -0
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +205 -43
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +165 -0
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +135 -34
- package/src/components/Tabs/__tests__/index.spec.tsx +12 -0
- package/src/components/Tabs/index.tsx +11 -4
- package/src/components/Tag/StyledTag.tsx +1 -11
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +4 -4
- package/src/components/Tag/index.tsx +2 -2
- package/src/components/TextInput/__tests__/index.spec.tsx +10 -14
- package/src/components/Toast/StyledToast.tsx +13 -7
- package/src/components/Toast/Toast.tsx +34 -9
- package/src/components/Toast/ToastProvider.tsx +15 -12
- package/src/components/Toast/__tests__/Toast.spec.tsx +17 -0
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +299 -19
- package/src/components/Toast/types.ts +15 -1
- package/src/components/Typography/Text/StyledText.tsx +7 -1
- package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +1 -0
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +22 -0
- package/src/components/Typography/Text/index.tsx +7 -1
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +76 -23
- package/src/theme/components/.eslintrc.json +10 -0
- package/src/theme/components/alert.ts +5 -1
- package/src/theme/components/avatar.ts +2 -0
- package/src/theme/components/card.ts +6 -7
- package/src/theme/components/sectionHeading.ts +1 -1
- package/src/theme/components/spinner.ts +19 -7
- package/src/theme/components/tabs.ts +3 -2
- package/src/theme/components/tag.ts +13 -13
- package/src/theme/components/toast.ts +17 -3
- package/src/theme/components/typography.ts +2 -0
- package/src/theme/global/colors/swag.ts +23 -0
- package/src/theme/global/colors/types.ts +23 -0
- package/src/theme/global/colors/work.ts +5 -0
- package/tsconfig.json +4 -15
- package/types/components/Accordion/StyledAccordion.d.ts +14 -14
- package/types/components/Alert/StyledAlert.d.ts +16 -16
- package/types/components/Alert/index.d.ts +1 -1
- package/types/components/Avatar/StyledAvatar.d.ts +16 -16
- package/types/components/Avatar/index.d.ts +2 -2
- package/types/components/Badge/StyledBadge.d.ts +7 -7
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +21 -21
- package/types/components/BottomSheet/Header.d.ts +1 -1
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +19 -19
- package/types/components/Box/StyledBox.d.ts +15 -0
- package/types/components/Box/__tests__/helpers.spec.d.ts +1 -0
- package/types/components/Box/__tests__/index.spec.d.ts +1 -0
- package/types/components/Box/config.d.ts +170 -0
- package/types/components/Box/helpers.d.ts +1 -0
- package/types/components/Box/index.d.ts +5 -0
- package/types/components/Box/types.d.ts +31 -0
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +7 -7
- package/types/components/Button/StyledButton.d.ts +16 -16
- package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +8 -8
- package/types/components/Calendar/StyledCalendar.d.ts +25 -25
- package/types/components/Calendar/helpers.d.ts +2 -2
- package/types/components/Card/DataCard/StyledDataCard.d.ts +7 -7
- package/types/components/Card/DataCard/index.d.ts +1 -1
- package/types/components/Card/StyledCard.d.ts +7 -6
- package/types/components/Card/index.d.ts +5 -1
- package/types/components/Checkbox/StyledCheckbox.d.ts +10 -10
- package/types/components/Collapse/StyledCollapse.d.ts +8 -8
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +5 -5
- package/types/components/DatePicker/StyledDatePicker.d.ts +3 -3
- package/types/components/Divider/StyledDivider.d.ts +5 -5
- package/types/components/Drawer/StyledDrawer.d.ts +19 -19
- package/types/components/Empty/StyledEmpty.d.ts +12 -12
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +11 -11
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +7 -7
- package/types/components/FAB/StyledFAB.d.ts +8 -8
- package/types/components/Icon/HeroIcon/index.d.ts +3 -3
- package/types/components/List/StyledBasicListItem.d.ts +14 -14
- package/types/components/List/StyledListItem.d.ts +23 -23
- package/types/components/PinInput/StyledPinInput.d.ts +30 -30
- package/types/components/Progress/StyledProgressBar.d.ts +5 -5
- package/types/components/Progress/StyledProgressCircle.d.ts +18 -18
- package/types/components/Radio/StyledRadio.d.ts +9 -9
- package/types/components/RichTextEditor/EditorToolbar.d.ts +1 -1
- package/types/components/RichTextEditor/MentionList.d.ts +1 -1
- package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +6 -6
- package/types/components/RichTextEditor/StyledToolbar.d.ts +9 -9
- package/types/components/RichTextEditor/index.d.ts +2 -2
- package/types/components/SectionHeading/StyledHeading.d.ts +9 -9
- package/types/components/Select/MultiSelect/Option.d.ts +1 -1
- package/types/components/Select/SingleSelect/Option.d.ts +1 -1
- package/types/components/Select/StyledSelect.d.ts +11 -11
- package/types/components/Select/helpers.d.ts +1 -1
- package/types/components/Spinner/AnimatedSpinner.d.ts +3 -1
- package/types/components/Spinner/StyledSpinner.d.ts +14 -12
- package/types/components/Spinner/index.d.ts +5 -1
- package/types/components/Switch/StyledSwitch.d.ts +5 -5
- package/types/components/Tabs/StyledScrollableTabs.d.ts +24 -22
- package/types/components/Tabs/StyledTabs.d.ts +26 -20
- package/types/components/Tabs/TabWithBadge.d.ts +17 -0
- package/types/components/Tabs/__tests__/TabWithBadge.spec.d.ts +1 -0
- package/types/components/Tabs/index.d.ts +3 -1
- package/types/components/Tag/StyledTag.d.ts +6 -6
- package/types/components/Tag/index.d.ts +1 -1
- package/types/components/TextInput/StyledTextInput.d.ts +44 -44
- package/types/components/TextInput/index.d.ts +5 -5
- package/types/components/TimePicker/StyledTimePicker.d.ts +3 -3
- package/types/components/Toast/StyledToast.d.ts +19 -18
- package/types/components/Toast/types.d.ts +2 -1
- package/types/components/Toolbar/StyledToolbar.d.ts +9 -9
- package/types/components/Typography/Text/StyledText.d.ts +4 -4
- package/types/components/Typography/Text/index.d.ts +1 -1
- package/types/index.d.ts +2 -1
- package/types/testHelpers/renderWithTheme.d.ts +1 -1
- package/types/theme/ThemeSwitcher.d.ts +1 -1
- package/types/theme/components/alert.d.ts +5 -1
- package/types/theme/components/avatar.d.ts +2 -0
- package/types/theme/components/card.d.ts +6 -7
- package/types/theme/components/spinner.d.ts +17 -5
- package/types/theme/components/tabs.d.ts +1 -0
- package/types/theme/components/tag.d.ts +2 -2
- package/types/theme/components/toast.d.ts +18 -2
- package/types/theme/components/typography.d.ts +2 -0
- package/types/theme/global/colors/types.d.ts +17 -0
- package/types/theme/global/index.d.ts +17 -0
- package/types/utils/hooks.d.ts +1 -1
package/es/index.js
CHANGED
|
@@ -990,11 +990,11 @@ var STEPS = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85,
|
|
|
990
990
|
|
|
991
991
|
var createColorScales = function createColorScales(base) {
|
|
992
992
|
var colorValues = new Values$1(base);
|
|
993
|
-
return
|
|
994
|
-
var
|
|
993
|
+
return Object.assign(Object.assign({}, STEPS.reduce(function (acc, step) {
|
|
994
|
+
var _Object$assign;
|
|
995
995
|
|
|
996
|
-
return
|
|
997
|
-
}, {})), {
|
|
996
|
+
return Object.assign(Object.assign({}, acc), (_Object$assign = {}, _defineProperty(_Object$assign, "lighten".concat(step), colorValues.tint(step).hexString()), _defineProperty(_Object$assign, "darken".concat(step), colorValues.shade(step).hexString()), _Object$assign));
|
|
997
|
+
}, {})), {
|
|
998
998
|
base: colorValues.hexString()
|
|
999
999
|
});
|
|
1000
1000
|
};
|
|
@@ -1036,7 +1036,7 @@ var BASE_COLORS = {
|
|
|
1036
1036
|
violet1: '#8505a2',
|
|
1037
1037
|
mauve: '#c38cee',
|
|
1038
1038
|
yellow: '#fadb14',
|
|
1039
|
-
seashell: '#
|
|
1039
|
+
seashell: '#fff6eb',
|
|
1040
1040
|
gold: '#ffd500'
|
|
1041
1041
|
};
|
|
1042
1042
|
var colorScales = Object.entries(BASE_COLORS).reduce(function (acc, _ref16) {
|
|
@@ -1044,7 +1044,7 @@ var colorScales = Object.entries(BASE_COLORS).reduce(function (acc, _ref16) {
|
|
|
1044
1044
|
key = _ref17[0],
|
|
1045
1045
|
value = _ref17[1];
|
|
1046
1046
|
|
|
1047
|
-
return
|
|
1047
|
+
return Object.assign(Object.assign({}, acc), _defineProperty({}, key, createColorScales(value)));
|
|
1048
1048
|
}, {});
|
|
1049
1049
|
var blue$1 = colorScales.blue,
|
|
1050
1050
|
ultramarineBlue$1 = colorScales.ultramarineBlue,
|
|
@@ -1200,9 +1200,8 @@ var emerald = colorScales.emerald,
|
|
|
1200
1200
|
peach = colorScales.peach,
|
|
1201
1201
|
vermilion = colorScales.vermilion,
|
|
1202
1202
|
pastelRed = colorScales.pastelRed,
|
|
1203
|
-
mauve = colorScales.mauve;
|
|
1204
|
-
|
|
1205
|
-
_objectSpread2(_objectSpread2({}, palette$5), {}, {
|
|
1203
|
+
mauve$1 = colorScales.mauve;
|
|
1204
|
+
Object.assign(Object.assign({}, palette$5), {
|
|
1206
1205
|
nightBlue: nightBlue.base,
|
|
1207
1206
|
blueLight60: blue1.lighten60,
|
|
1208
1207
|
blue: blue1.base,
|
|
@@ -1219,21 +1218,18 @@ _objectSpread2(_objectSpread2({}, palette$5), {}, {
|
|
|
1219
1218
|
peachLight75: peach.lighten75,
|
|
1220
1219
|
red: vermilion.base,
|
|
1221
1220
|
pastelRed: pastelRed.base,
|
|
1222
|
-
mauve: mauve.base
|
|
1221
|
+
mauve: mauve$1.base
|
|
1223
1222
|
});
|
|
1224
|
-
|
|
1225
1223
|
var apple = colorScales.apple,
|
|
1226
1224
|
currant = colorScales.currant;
|
|
1227
|
-
|
|
1228
|
-
_objectSpread2(_objectSpread2({}, palette$5), {}, {
|
|
1225
|
+
Object.assign(Object.assign({}, palette$5), {
|
|
1229
1226
|
apple: apple.base,
|
|
1230
1227
|
currant: currant.base
|
|
1231
1228
|
});
|
|
1232
|
-
|
|
1233
1229
|
var scarletGum = colorScales.scarletGum,
|
|
1234
|
-
violet1 = colorScales.violet1
|
|
1235
|
-
|
|
1236
|
-
var palette$2 =
|
|
1230
|
+
violet1 = colorScales.violet1,
|
|
1231
|
+
mauve = colorScales.mauve;
|
|
1232
|
+
var palette$2 = Object.assign(Object.assign({}, palette$5), {
|
|
1237
1233
|
scarletGumLight30: scarletGum.lighten30,
|
|
1238
1234
|
scarletGumLight50: scarletGum.lighten50,
|
|
1239
1235
|
scarletGumLight80: scarletGum.lighten80,
|
|
@@ -1243,14 +1239,13 @@ var palette$2 = _objectSpread2(_objectSpread2({}, palette$5), {}, {
|
|
|
1243
1239
|
violetLight50: violet1.lighten50,
|
|
1244
1240
|
violetLight80: violet1.lighten80,
|
|
1245
1241
|
violetLight90: violet1.lighten90,
|
|
1246
|
-
violet: violet1.base
|
|
1242
|
+
violet: violet1.base,
|
|
1243
|
+
mauve: mauve.base
|
|
1247
1244
|
});
|
|
1248
|
-
|
|
1249
1245
|
var jordyBlue = colorScales.jordyBlue,
|
|
1250
1246
|
cornflowerBlue = colorScales.cornflowerBlue,
|
|
1251
1247
|
paua = colorScales.paua;
|
|
1252
|
-
|
|
1253
|
-
_objectSpread2(_objectSpread2({}, palette$5), {}, {
|
|
1248
|
+
Object.assign(Object.assign({}, palette$5), {
|
|
1254
1249
|
jordyBlueLight30: jordyBlue.lighten30,
|
|
1255
1250
|
jordyBlueLight50: jordyBlue.lighten50,
|
|
1256
1251
|
jordyBlueLight70: jordyBlue.lighten70,
|
|
@@ -1259,10 +1254,8 @@ _objectSpread2(_objectSpread2({}, palette$5), {}, {
|
|
|
1259
1254
|
cornflowerBlue: cornflowerBlue.base,
|
|
1260
1255
|
paua: paua.base
|
|
1261
1256
|
});
|
|
1262
|
-
|
|
1263
1257
|
var gold$1 = colorScales.gold;
|
|
1264
|
-
|
|
1265
|
-
var palette = _objectSpread2(_objectSpread2({}, palette$5), {}, {
|
|
1258
|
+
var palette = Object.assign(Object.assign({}, palette$5), {
|
|
1266
1259
|
goldLight20: gold$1.lighten20,
|
|
1267
1260
|
goldLight50: gold$1.lighten50,
|
|
1268
1261
|
goldLight70: gold$1.lighten70,
|
|
@@ -1313,15 +1306,35 @@ var swagSystemPalette = {
|
|
|
1313
1306
|
archivedBackground: palette$5.greyLight90,
|
|
1314
1307
|
black: palette$5.black,
|
|
1315
1308
|
inactiveBackground: palette$5.maasstrichtBlueLight50,
|
|
1316
|
-
shadow: palette$5.greyLight45
|
|
1317
|
-
|
|
1309
|
+
shadow: palette$5.greyLight45,
|
|
1310
|
+
__alpha__globalPrimary: palette$5.maasstrichtBlue,
|
|
1311
|
+
__alpha__globalSecondary1: palette$5.maasstrichtBlueLight30,
|
|
1312
|
+
__alpha__globalNeutral3: palette$5.greyLight90,
|
|
1313
|
+
__alpha__globalLabel1: palette$5.vermilion,
|
|
1314
|
+
__alpha__globalLabel2: palette$5.deepSaffron,
|
|
1315
|
+
__alpha__globalLabel3: palette$5.pineGreen,
|
|
1316
|
+
__alpha__globalLabel4: palette$5.ultramarineBlue,
|
|
1317
|
+
__alpha__globalLabel5: palette$5.sonicSilver,
|
|
1318
|
+
__alpha__globalLabel6: palette$5.linen,
|
|
1319
|
+
__alpha__globalLabel7: palette$5.seashell,
|
|
1320
|
+
__alpha__globalLabel8: palette$5.honeydew,
|
|
1321
|
+
__alpha__globalLabel9: palette$5.aliceBlue,
|
|
1322
|
+
__alpha__primary2: palette$2.mauve,
|
|
1323
|
+
__alpha__secondary1: palette$2.scarletGumLight30,
|
|
1324
|
+
__alpha__secondary2: palette$2.scarletGumLight50,
|
|
1325
|
+
__alpha__secondary3: palette$2.scarletGumLight80,
|
|
1326
|
+
__alpha__secondary4: palette$2.scarletGumLight90
|
|
1318
1327
|
};
|
|
1319
1328
|
|
|
1320
1329
|
var workSystemPalette = _objectSpread2(_objectSpread2({}, swagSystemPalette), {}, {
|
|
1321
1330
|
primary: palette.gold,
|
|
1322
1331
|
primaryLight: palette.goldLight50,
|
|
1323
1332
|
primaryDark: palette.goldLight20,
|
|
1324
|
-
primaryBackground: palette.goldLight90
|
|
1333
|
+
primaryBackground: palette.goldLight90,
|
|
1334
|
+
__alpha__secondary1: palette.goldLight20,
|
|
1335
|
+
__alpha__secondary2: palette.goldLight50,
|
|
1336
|
+
__alpha__secondary3: palette.goldLight70,
|
|
1337
|
+
__alpha__secondary4: palette.goldLight90
|
|
1325
1338
|
});
|
|
1326
1339
|
|
|
1327
1340
|
var BASE_WIDTH = 390; // Based on iPhone 13's viewport size
|
|
@@ -1473,13 +1486,17 @@ var getAlertTheme = function getAlertTheme(theme) {
|
|
|
1473
1486
|
warning: theme.colors.warning,
|
|
1474
1487
|
error: theme.colors.dangerLight,
|
|
1475
1488
|
info: theme.colors.infoLight,
|
|
1489
|
+
notification: theme.colors.platformBackground,
|
|
1476
1490
|
divider: theme.colors.outline
|
|
1477
1491
|
};
|
|
1478
1492
|
var sizes = {
|
|
1479
1493
|
height: scale(48)
|
|
1480
1494
|
};
|
|
1481
1495
|
var space = {
|
|
1482
|
-
|
|
1496
|
+
contentPaddingHorizontal: theme.space.smallMedium,
|
|
1497
|
+
textPaddingHorizontal: theme.space.smallMedium,
|
|
1498
|
+
iconLeftPadding: theme.space.smallMedium,
|
|
1499
|
+
ctaPadding: theme.space.smallMedium
|
|
1483
1500
|
};
|
|
1484
1501
|
var radii = {
|
|
1485
1502
|
"default": theme.radii.xlarge
|
|
@@ -1511,7 +1528,8 @@ var getAvatarTheme = function getAvatarTheme(theme) {
|
|
|
1511
1528
|
xlarge: theme.space.xxxxlarge,
|
|
1512
1529
|
xxlarge: theme.space.xlarge * 2,
|
|
1513
1530
|
xxxlarge: theme.space.xxlarge * 2,
|
|
1514
|
-
xxxxlarge: theme.space.xxxlarge * 2
|
|
1531
|
+
xxxxlarge: theme.space.xxxlarge * 2,
|
|
1532
|
+
xxxxxlarge: theme.space.small * 17
|
|
1515
1533
|
};
|
|
1516
1534
|
var fontSizes = {
|
|
1517
1535
|
small: theme.fontSizes.large,
|
|
@@ -1520,7 +1538,8 @@ var getAvatarTheme = function getAvatarTheme(theme) {
|
|
|
1520
1538
|
xlarge: theme.fontSizes.xxxlarge,
|
|
1521
1539
|
xxlarge: theme.space.medium * 2,
|
|
1522
1540
|
xxxlarge: theme.space.large * 1.5,
|
|
1523
|
-
xxxxlarge: theme.space.xlarge * 1.5
|
|
1541
|
+
xxxxlarge: theme.space.xlarge * 1.5,
|
|
1542
|
+
xxxxxlarge: theme.space.xxlarge * 1.5
|
|
1524
1543
|
};
|
|
1525
1544
|
var radii = {
|
|
1526
1545
|
rounded: theme.radii.rounded
|
|
@@ -1738,13 +1757,12 @@ var getCalendarTheme = function getCalendarTheme(theme) {
|
|
|
1738
1757
|
var getCardTheme = function getCardTheme(theme) {
|
|
1739
1758
|
var colors = {
|
|
1740
1759
|
dataCardIndicator: theme.colors.primary,
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
}
|
|
1760
|
+
primary: theme.colors.__alpha__primary2,
|
|
1761
|
+
info: theme.colors.infoLight,
|
|
1762
|
+
success: theme.colors.success,
|
|
1763
|
+
warning: theme.colors.warning,
|
|
1764
|
+
danger: theme.colors.dangerMediumLight,
|
|
1765
|
+
archived: theme.colors.archivedLight
|
|
1748
1766
|
};
|
|
1749
1767
|
var sizes = {
|
|
1750
1768
|
indicatorWidth: theme.space.medium
|
|
@@ -2159,7 +2177,7 @@ var getRichTextEditorTheme = function getRichTextEditorTheme(theme) {
|
|
|
2159
2177
|
|
|
2160
2178
|
var getSectionHeadingTheme = function getSectionHeadingTheme(theme) {
|
|
2161
2179
|
var colors = {
|
|
2162
|
-
background: theme.colors.
|
|
2180
|
+
background: theme.colors.__alpha__globalNeutral3
|
|
2163
2181
|
};
|
|
2164
2182
|
var space = {
|
|
2165
2183
|
headingVerticalPadding: theme.space.small,
|
|
@@ -2197,19 +2215,31 @@ var getSelectTheme = function getSelectTheme(theme) {
|
|
|
2197
2215
|
};
|
|
2198
2216
|
|
|
2199
2217
|
var getSpinnerTheme = function getSpinnerTheme(theme) {
|
|
2200
|
-
var
|
|
2201
|
-
|
|
2218
|
+
var colors = {
|
|
2219
|
+
dot1: theme.colors.__alpha__secondary1,
|
|
2220
|
+
dot2: theme.colors.__alpha__secondary2,
|
|
2221
|
+
dot3: theme.colors.__alpha__secondary3,
|
|
2222
|
+
dot4: theme.colors.__alpha__secondary4
|
|
2202
2223
|
};
|
|
2203
2224
|
var space = {
|
|
2204
|
-
spinnerDot:
|
|
2205
|
-
|
|
2206
|
-
|
|
2225
|
+
spinnerDot: {
|
|
2226
|
+
small: theme.space.small,
|
|
2227
|
+
medium: theme.space.medium
|
|
2228
|
+
},
|
|
2229
|
+
spinnerDotPadding: {
|
|
2230
|
+
small: theme.space.xsmall,
|
|
2231
|
+
medium: theme.space.small
|
|
2232
|
+
},
|
|
2233
|
+
spinnerTextPaddingTop: {
|
|
2234
|
+
small: theme.space.xsmall,
|
|
2235
|
+
medium: theme.space.small
|
|
2236
|
+
}
|
|
2207
2237
|
};
|
|
2208
2238
|
var radii = {
|
|
2209
|
-
"default": theme.radii.
|
|
2239
|
+
"default": theme.radii.rounded
|
|
2210
2240
|
};
|
|
2211
2241
|
return {
|
|
2212
|
-
|
|
2242
|
+
colors: colors,
|
|
2213
2243
|
space: space,
|
|
2214
2244
|
radii: radii
|
|
2215
2245
|
};
|
|
@@ -2257,9 +2287,9 @@ var getSwitchTheme = function getSwitchTheme(theme) {
|
|
|
2257
2287
|
|
|
2258
2288
|
var getTabsTheme = function getTabsTheme(theme) {
|
|
2259
2289
|
var colors = {
|
|
2260
|
-
active: theme.colors.
|
|
2290
|
+
active: theme.colors.text,
|
|
2261
2291
|
inactive: theme.colors.text,
|
|
2262
|
-
activeBackground: theme.colors.
|
|
2292
|
+
activeBackground: theme.colors.__alpha__secondary4,
|
|
2263
2293
|
headerBottom: theme.colors.outline,
|
|
2264
2294
|
text: theme.colors.text
|
|
2265
2295
|
};
|
|
@@ -2267,6 +2297,7 @@ var getTabsTheme = function getTabsTheme(theme) {
|
|
|
2267
2297
|
flatListHorizontalPadding: theme.space.small,
|
|
2268
2298
|
itemHorizontalPadding: theme.space.small,
|
|
2269
2299
|
itemVerticalPadding: theme.space.small,
|
|
2300
|
+
itemMargin: theme.space.smallMedium,
|
|
2270
2301
|
outlineHorizontalPadding: theme.space.small,
|
|
2271
2302
|
outlineVerticalPadding: theme.space.xsmall
|
|
2272
2303
|
};
|
|
@@ -2293,20 +2324,20 @@ var getTagTheme = function getTagTheme(theme) {
|
|
|
2293
2324
|
"default": theme.borderWidths.base
|
|
2294
2325
|
};
|
|
2295
2326
|
var colors = {
|
|
2296
|
-
"default": theme.colors.
|
|
2327
|
+
"default": theme.colors.__alpha__globalPrimary,
|
|
2297
2328
|
defaultBackground: undefined,
|
|
2298
|
-
primary: theme.colors.
|
|
2299
|
-
primaryBackground:
|
|
2300
|
-
info: theme.colors.
|
|
2301
|
-
infoBackground: theme.colors.
|
|
2302
|
-
success: theme.colors.
|
|
2303
|
-
successBackground: theme.colors.
|
|
2304
|
-
warning: theme.colors.
|
|
2305
|
-
warningBackground: theme.colors.
|
|
2306
|
-
danger: theme.colors.
|
|
2307
|
-
dangerBackground: theme.colors.
|
|
2308
|
-
archived: theme.colors.
|
|
2309
|
-
archivedBackground: theme.colors.
|
|
2329
|
+
primary: theme.colors.__alpha__globalPrimary,
|
|
2330
|
+
primaryBackground: undefined,
|
|
2331
|
+
info: theme.colors.__alpha__globalLabel4,
|
|
2332
|
+
infoBackground: theme.colors.__alpha__globalLabel9,
|
|
2333
|
+
success: theme.colors.__alpha__globalLabel3,
|
|
2334
|
+
successBackground: theme.colors.__alpha__globalLabel8,
|
|
2335
|
+
warning: theme.colors.__alpha__globalLabel2,
|
|
2336
|
+
warningBackground: theme.colors.__alpha__globalLabel7,
|
|
2337
|
+
danger: theme.colors.__alpha__globalLabel1,
|
|
2338
|
+
dangerBackground: theme.colors.__alpha__globalLabel6,
|
|
2339
|
+
archived: theme.colors.__alpha__globalLabel5,
|
|
2340
|
+
archivedBackground: theme.colors.__alpha__globalNeutral3
|
|
2310
2341
|
};
|
|
2311
2342
|
var fonts = {
|
|
2312
2343
|
"default": theme.fonts.semiBold
|
|
@@ -2435,14 +2466,21 @@ var getToastTheme = function getToastTheme(theme) {
|
|
|
2435
2466
|
warning: theme.colors.warning,
|
|
2436
2467
|
error: theme.colors.dangerLight,
|
|
2437
2468
|
info: theme.colors.infoLight,
|
|
2438
|
-
|
|
2469
|
+
notification: theme.colors.platformBackground,
|
|
2470
|
+
snackbar: theme.colors.backgroundDark,
|
|
2471
|
+
divider: theme.colors.outline,
|
|
2472
|
+
shadow: theme.colors.backgroundDark
|
|
2439
2473
|
};
|
|
2440
2474
|
var sizes = {
|
|
2441
2475
|
height: scale(48)
|
|
2442
2476
|
};
|
|
2443
2477
|
var space = {
|
|
2444
|
-
|
|
2445
|
-
|
|
2478
|
+
wrapperVerticalPadding: theme.space.large,
|
|
2479
|
+
wrapperHorizontalPadding: theme.space.medium,
|
|
2480
|
+
contentVerticalPadding: theme.space.smallMedium,
|
|
2481
|
+
textHorizontalPadding: theme.space.smallMedium,
|
|
2482
|
+
iconLeftPadding: theme.space.smallMedium,
|
|
2483
|
+
ctaPadding: theme.space.smallMedium
|
|
2446
2484
|
};
|
|
2447
2485
|
var radii = {
|
|
2448
2486
|
"default": theme.radii.xlarge
|
|
@@ -2450,12 +2488,22 @@ var getToastTheme = function getToastTheme(theme) {
|
|
|
2450
2488
|
var borderWidths = {
|
|
2451
2489
|
base: theme.borderWidths.base
|
|
2452
2490
|
};
|
|
2491
|
+
var shadows = {
|
|
2492
|
+
offset: {
|
|
2493
|
+
width: 0,
|
|
2494
|
+
height: 2
|
|
2495
|
+
},
|
|
2496
|
+
opacity: 0.12,
|
|
2497
|
+
radius: 4,
|
|
2498
|
+
elevation: 4
|
|
2499
|
+
};
|
|
2453
2500
|
return {
|
|
2454
2501
|
colors: colors,
|
|
2455
2502
|
radii: radii,
|
|
2456
2503
|
sizes: sizes,
|
|
2457
2504
|
space: space,
|
|
2458
|
-
borderWidths: borderWidths
|
|
2505
|
+
borderWidths: borderWidths,
|
|
2506
|
+
shadows: shadows
|
|
2459
2507
|
};
|
|
2460
2508
|
};
|
|
2461
2509
|
|
|
@@ -2505,6 +2553,7 @@ var getTypographyTheme = function getTypographyTheme(theme) {
|
|
|
2505
2553
|
medium: theme.fontSizes.medium,
|
|
2506
2554
|
large: theme.fontSizes.large,
|
|
2507
2555
|
xlarge: theme.fontSizes.xlarge,
|
|
2556
|
+
xxxlarge: theme.fontSizes.xxxlarge,
|
|
2508
2557
|
xxxxxlarge: theme.fontSizes.xxxxxlarge
|
|
2509
2558
|
};
|
|
2510
2559
|
var lineHeights = {
|
|
@@ -2512,6 +2561,7 @@ var getTypographyTheme = function getTypographyTheme(theme) {
|
|
|
2512
2561
|
medium: theme.lineHeights.medium,
|
|
2513
2562
|
large: theme.lineHeights.large,
|
|
2514
2563
|
xlarge: theme.lineHeights.xlarge,
|
|
2564
|
+
xxxlarge: theme.lineHeights.xxxlarge,
|
|
2515
2565
|
xxxxxlarge: theme.lineHeights.xxxxxlarge
|
|
2516
2566
|
};
|
|
2517
2567
|
return {
|
|
@@ -5927,7 +5977,7 @@ var StyledText$3 = index$7(Text$1)(function (_ref) {
|
|
|
5927
5977
|
});
|
|
5928
5978
|
});
|
|
5929
5979
|
|
|
5930
|
-
var _excluded$
|
|
5980
|
+
var _excluded$h = ["children", "fontSize", "fontWeight", "intent"];
|
|
5931
5981
|
|
|
5932
5982
|
var Text = function Text(_ref) {
|
|
5933
5983
|
var children = _ref.children,
|
|
@@ -5937,7 +5987,7 @@ var Text = function Text(_ref) {
|
|
|
5937
5987
|
fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
|
|
5938
5988
|
_ref$intent = _ref.intent,
|
|
5939
5989
|
intent = _ref$intent === void 0 ? 'body' : _ref$intent,
|
|
5940
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
5990
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$h);
|
|
5941
5991
|
|
|
5942
5992
|
return /*#__PURE__*/React.createElement(StyledText$3, _extends$1({}, nativeProps, {
|
|
5943
5993
|
themeFontSize: fontSize,
|
|
@@ -14482,11 +14532,11 @@ var StyledHeroIcon = index$7(HeroIcon)(function (_ref) {
|
|
|
14482
14532
|
};
|
|
14483
14533
|
});
|
|
14484
14534
|
|
|
14485
|
-
var _excluded$
|
|
14535
|
+
var _excluded$g = ["style"];
|
|
14486
14536
|
|
|
14487
14537
|
var AnimatedIcon = function AnimatedIcon(_ref) {
|
|
14488
14538
|
var style = _ref.style,
|
|
14489
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
14539
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$g);
|
|
14490
14540
|
|
|
14491
14541
|
var rotateAnimation = useRef(new Animated.Value(0));
|
|
14492
14542
|
useEffect(function () {
|
|
@@ -14576,7 +14626,7 @@ function usePropsOrInternalState(initialState, state, setState) {
|
|
|
14576
14626
|
return [state || internalState, setState || setInternalState];
|
|
14577
14627
|
}
|
|
14578
14628
|
|
|
14579
|
-
var _excluded$
|
|
14629
|
+
var _excluded$f = ["key"];
|
|
14580
14630
|
|
|
14581
14631
|
var Accordion = function Accordion(_ref) {
|
|
14582
14632
|
var items = _ref.items,
|
|
@@ -14600,7 +14650,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
14600
14650
|
testID: testID
|
|
14601
14651
|
}, items.map(function (_ref2, index) {
|
|
14602
14652
|
var key = _ref2.key,
|
|
14603
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
14653
|
+
props = _objectWithoutProperties(_ref2, _excluded$f);
|
|
14604
14654
|
|
|
14605
14655
|
var open = _activeItemKey === key;
|
|
14606
14656
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
@@ -14633,13 +14683,13 @@ var IconContainer$1 = index$7(View)(function (_ref2) {
|
|
|
14633
14683
|
var theme = _ref2.theme;
|
|
14634
14684
|
return {
|
|
14635
14685
|
alignItems: 'center',
|
|
14636
|
-
paddingLeft: theme.__hd__.alert.space.
|
|
14686
|
+
paddingLeft: theme.__hd__.alert.space.iconLeftPadding
|
|
14637
14687
|
};
|
|
14638
14688
|
});
|
|
14639
14689
|
var TextContainer$1 = index$7(View)(function (_ref3) {
|
|
14640
14690
|
var theme = _ref3.theme;
|
|
14641
14691
|
return {
|
|
14642
|
-
paddingHorizontal: theme.__hd__.alert.space.
|
|
14692
|
+
paddingHorizontal: theme.__hd__.alert.space.textPaddingHorizontal,
|
|
14643
14693
|
flex: 1
|
|
14644
14694
|
};
|
|
14645
14695
|
});
|
|
@@ -14647,7 +14697,7 @@ var ContentContainer$1 = index$7(View)(function (_ref4) {
|
|
|
14647
14697
|
var theme = _ref4.theme,
|
|
14648
14698
|
showDivider = _ref4.showDivider;
|
|
14649
14699
|
return {
|
|
14650
|
-
paddingVertical: theme.__hd__.alert.space.
|
|
14700
|
+
paddingVertical: theme.__hd__.alert.space.contentPaddingHorizontal,
|
|
14651
14701
|
flex: 1,
|
|
14652
14702
|
borderRightWidth: showDivider ? theme.__hd__.alert.borderWidths.base : 0,
|
|
14653
14703
|
borderColor: theme.__hd__.alert.colors.divider,
|
|
@@ -14657,7 +14707,7 @@ var ContentContainer$1 = index$7(View)(function (_ref4) {
|
|
|
14657
14707
|
var CTAWrapper$1 = index$7(TouchableOpacity)(function (_ref5) {
|
|
14658
14708
|
var theme = _ref5.theme;
|
|
14659
14709
|
return {
|
|
14660
|
-
paddingHorizontal: theme.__hd__.alert.space.
|
|
14710
|
+
paddingHorizontal: theme.__hd__.alert.space.ctaPadding,
|
|
14661
14711
|
justifyContent: 'center'
|
|
14662
14712
|
};
|
|
14663
14713
|
});
|
|
@@ -14675,20 +14725,33 @@ var getIntentIcon$1 = function getIntentIcon(intent) {
|
|
|
14675
14725
|
|
|
14676
14726
|
case 'error':
|
|
14677
14727
|
return 'circle-warning';
|
|
14728
|
+
|
|
14729
|
+
default:
|
|
14730
|
+
return undefined;
|
|
14678
14731
|
}
|
|
14679
14732
|
};
|
|
14680
14733
|
|
|
14681
|
-
var
|
|
14682
|
-
var
|
|
14683
|
-
|
|
14684
|
-
|
|
14685
|
-
|
|
14686
|
-
|
|
14687
|
-
|
|
14688
|
-
|
|
14689
|
-
|
|
14690
|
-
|
|
14691
|
-
|
|
14734
|
+
var AlertIcon = function AlertIcon(_ref) {
|
|
14735
|
+
var icon = _ref.icon;
|
|
14736
|
+
return icon ? /*#__PURE__*/React.createElement(IconContainer$1, {
|
|
14737
|
+
testID: "alert-left-icon"
|
|
14738
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
14739
|
+
icon: icon,
|
|
14740
|
+
size: "small"
|
|
14741
|
+
})) : null;
|
|
14742
|
+
};
|
|
14743
|
+
|
|
14744
|
+
var Alert = function Alert(_ref2) {
|
|
14745
|
+
var content = _ref2.content,
|
|
14746
|
+
icon = _ref2.icon,
|
|
14747
|
+
title = _ref2.title,
|
|
14748
|
+
_ref2$intent = _ref2.intent,
|
|
14749
|
+
intent = _ref2$intent === void 0 ? 'info' : _ref2$intent,
|
|
14750
|
+
onClose = _ref2.onClose,
|
|
14751
|
+
_ref2$variant = _ref2.variant,
|
|
14752
|
+
variant = _ref2$variant === void 0 ? 'default' : _ref2$variant,
|
|
14753
|
+
style = _ref2.style,
|
|
14754
|
+
testID = _ref2.testID;
|
|
14692
14755
|
return /*#__PURE__*/React.createElement(Container$1, {
|
|
14693
14756
|
themeVariant: variant,
|
|
14694
14757
|
themeIntent: intent,
|
|
@@ -14696,12 +14759,9 @@ var Alert = function Alert(_ref) {
|
|
|
14696
14759
|
testID: testID
|
|
14697
14760
|
}, /*#__PURE__*/React.createElement(ContentContainer$1, {
|
|
14698
14761
|
showDivider: !!onClose
|
|
14699
|
-
}, icon !== null ? /*#__PURE__*/React.createElement(
|
|
14700
|
-
|
|
14701
|
-
}, /*#__PURE__*/React.createElement(
|
|
14702
|
-
icon: icon || getIntentIcon$1(intent),
|
|
14703
|
-
size: "small"
|
|
14704
|
-
})) : null, /*#__PURE__*/React.createElement(TextContainer$1, null, typeof title === 'string' ? /*#__PURE__*/React.createElement(Typography.Text, {
|
|
14762
|
+
}, icon !== null ? /*#__PURE__*/React.createElement(AlertIcon, {
|
|
14763
|
+
icon: icon || getIntentIcon$1(intent)
|
|
14764
|
+
}) : null, /*#__PURE__*/React.createElement(TextContainer$1, null, typeof title === 'string' ? /*#__PURE__*/React.createElement(Typography.Text, {
|
|
14705
14765
|
fontWeight: "semi-bold"
|
|
14706
14766
|
}, title) : title, typeof content === 'string' ? /*#__PURE__*/React.createElement(Typography.Text, null, content) : content)), onClose ? /*#__PURE__*/React.createElement(CTAWrapper$1, {
|
|
14707
14767
|
onPress: onClose,
|
|
@@ -14832,7 +14892,7 @@ var StyledStatus = index$7(Animated.View)(function (_ref3) {
|
|
|
14832
14892
|
};
|
|
14833
14893
|
});
|
|
14834
14894
|
|
|
14835
|
-
var _excluded$
|
|
14895
|
+
var _excluded$e = ["children", "visible", "intent", "style", "testID"];
|
|
14836
14896
|
|
|
14837
14897
|
var Status = function Status(_ref) {
|
|
14838
14898
|
var children = _ref.children,
|
|
@@ -14842,7 +14902,7 @@ var Status = function Status(_ref) {
|
|
|
14842
14902
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
14843
14903
|
style = _ref.style,
|
|
14844
14904
|
testID = _ref.testID,
|
|
14845
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
14905
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$e);
|
|
14846
14906
|
|
|
14847
14907
|
var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
14848
14908
|
opacity = _React$useRef.current;
|
|
@@ -14878,7 +14938,7 @@ var Status = function Status(_ref) {
|
|
|
14878
14938
|
}));
|
|
14879
14939
|
};
|
|
14880
14940
|
|
|
14881
|
-
var _excluded$
|
|
14941
|
+
var _excluded$d = ["content", "visible", "max", "intent", "style", "testID"];
|
|
14882
14942
|
var DEFAULT_MAX_NUMBER = 99;
|
|
14883
14943
|
|
|
14884
14944
|
var getPaddingState = function getPaddingState(content) {
|
|
@@ -14895,7 +14955,7 @@ var Badge = function Badge(_ref) {
|
|
|
14895
14955
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
14896
14956
|
style = _ref.style,
|
|
14897
14957
|
testID = _ref.testID,
|
|
14898
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
14958
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$d);
|
|
14899
14959
|
|
|
14900
14960
|
var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
14901
14961
|
opacity = _React$useRef.current;
|
|
@@ -14991,7 +15051,7 @@ var StyledBottomBarText = index$7(Typography.Text)(function (_ref3) {
|
|
|
14991
15051
|
var isIOS = Platform.OS === 'ios';
|
|
14992
15052
|
var isAndroid = Platform.OS === 'android';
|
|
14993
15053
|
|
|
14994
|
-
var _excluded$
|
|
15054
|
+
var _excluded$c = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
|
|
14995
15055
|
|
|
14996
15056
|
var getInactiveIcon = function getInactiveIcon(icon) {
|
|
14997
15057
|
var inactiveIcon = "".concat(icon, "-outlined");
|
|
@@ -15004,7 +15064,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
15004
15064
|
renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
|
|
15005
15065
|
selectedTabKey = _ref.selectedTabKey,
|
|
15006
15066
|
tabs = _ref.tabs,
|
|
15007
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
15067
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$c);
|
|
15008
15068
|
|
|
15009
15069
|
var insets = useSafeAreaInsets();
|
|
15010
15070
|
/**
|
|
@@ -15095,14 +15155,14 @@ var StyledDivider = index$7(View)(function (_ref) {
|
|
|
15095
15155
|
}, horizontalMargin), verticalMargin);
|
|
15096
15156
|
});
|
|
15097
15157
|
|
|
15098
|
-
var _excluded$
|
|
15158
|
+
var _excluded$b = ["marginHorizontal", "marginVertical", "style", "testID"];
|
|
15099
15159
|
|
|
15100
15160
|
var Divider = function Divider(_ref) {
|
|
15101
15161
|
var marginHorizontal = _ref.marginHorizontal,
|
|
15102
15162
|
marginVertical = _ref.marginVertical,
|
|
15103
15163
|
style = _ref.style,
|
|
15104
15164
|
testID = _ref.testID,
|
|
15105
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
15165
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$b);
|
|
15106
15166
|
|
|
15107
15167
|
return /*#__PURE__*/React.createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
15108
15168
|
themeMarginHorizontal: marginHorizontal,
|
|
@@ -15234,7 +15294,7 @@ var StyledLoadingDot = index$7(View)(function (_ref2) {
|
|
|
15234
15294
|
}, themeStyling());
|
|
15235
15295
|
});
|
|
15236
15296
|
|
|
15237
|
-
var _excluded$
|
|
15297
|
+
var _excluded$a = ["count", "size", "testID", "themeVariant"];
|
|
15238
15298
|
var AnimatedLoadingIndicatorWrapper = Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
|
|
15239
15299
|
var AnimatedLoadingDot = Animated.createAnimatedComponent(StyledLoadingDot);
|
|
15240
15300
|
|
|
@@ -15268,7 +15328,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
15268
15328
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
15269
15329
|
testID = _ref2.testID,
|
|
15270
15330
|
themeVariant = _ref2.themeVariant,
|
|
15271
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
15331
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$a);
|
|
15272
15332
|
|
|
15273
15333
|
var progressAnimation = useRef(new Animated.Value(0));
|
|
15274
15334
|
useEffect(function () {
|
|
@@ -15909,6 +15969,245 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
15909
15969
|
}, footer) : null)));
|
|
15910
15970
|
};
|
|
15911
15971
|
|
|
15972
|
+
var colors = {
|
|
15973
|
+
backgroundColor: {
|
|
15974
|
+
property: 'backgroundColor',
|
|
15975
|
+
scale: 'colors'
|
|
15976
|
+
},
|
|
15977
|
+
bgColor: {
|
|
15978
|
+
property: 'backgroundColor',
|
|
15979
|
+
scale: 'colors'
|
|
15980
|
+
},
|
|
15981
|
+
borderColor: {
|
|
15982
|
+
property: 'borderColor',
|
|
15983
|
+
scale: 'colors'
|
|
15984
|
+
},
|
|
15985
|
+
borderTopColor: {
|
|
15986
|
+
property: 'borderTopColor',
|
|
15987
|
+
scale: 'colors'
|
|
15988
|
+
},
|
|
15989
|
+
borderBottomColor: {
|
|
15990
|
+
property: 'borderBottomColor',
|
|
15991
|
+
scale: 'colors'
|
|
15992
|
+
},
|
|
15993
|
+
borderStartColor: {
|
|
15994
|
+
property: 'borderStartColor',
|
|
15995
|
+
scale: 'colors'
|
|
15996
|
+
},
|
|
15997
|
+
borderEndColor: {
|
|
15998
|
+
property: 'borderEndColor',
|
|
15999
|
+
scale: 'colors'
|
|
16000
|
+
},
|
|
16001
|
+
borderLeftColor: {
|
|
16002
|
+
property: 'borderLeftColor',
|
|
16003
|
+
scale: 'colors'
|
|
16004
|
+
},
|
|
16005
|
+
borderRightColor: {
|
|
16006
|
+
property: 'borderRightColor',
|
|
16007
|
+
scale: 'colors'
|
|
16008
|
+
}
|
|
16009
|
+
};
|
|
16010
|
+
var space = {
|
|
16011
|
+
margin: {
|
|
16012
|
+
property: 'margin',
|
|
16013
|
+
scale: 'space'
|
|
16014
|
+
},
|
|
16015
|
+
marginBottom: {
|
|
16016
|
+
property: 'marginBottom',
|
|
16017
|
+
scale: 'space'
|
|
16018
|
+
},
|
|
16019
|
+
marginEnd: {
|
|
16020
|
+
property: 'marginEnd',
|
|
16021
|
+
scale: 'space'
|
|
16022
|
+
},
|
|
16023
|
+
marginHorizontal: {
|
|
16024
|
+
property: 'marginHorizontal',
|
|
16025
|
+
scale: 'space'
|
|
16026
|
+
},
|
|
16027
|
+
marginLeft: {
|
|
16028
|
+
property: 'marginLeft',
|
|
16029
|
+
scale: 'space'
|
|
16030
|
+
},
|
|
16031
|
+
marginRight: {
|
|
16032
|
+
property: 'marginRight',
|
|
16033
|
+
scale: 'space'
|
|
16034
|
+
},
|
|
16035
|
+
marginStart: {
|
|
16036
|
+
property: 'marginStart',
|
|
16037
|
+
scale: 'space'
|
|
16038
|
+
},
|
|
16039
|
+
marginTop: {
|
|
16040
|
+
property: 'marginTop',
|
|
16041
|
+
scale: 'space'
|
|
16042
|
+
},
|
|
16043
|
+
marginVertical: {
|
|
16044
|
+
property: 'marginVertical',
|
|
16045
|
+
scale: 'space'
|
|
16046
|
+
},
|
|
16047
|
+
padding: {
|
|
16048
|
+
property: 'padding',
|
|
16049
|
+
scale: 'space'
|
|
16050
|
+
},
|
|
16051
|
+
paddingBottom: {
|
|
16052
|
+
property: 'paddingBottom',
|
|
16053
|
+
scale: 'space'
|
|
16054
|
+
},
|
|
16055
|
+
paddingEnd: {
|
|
16056
|
+
property: 'paddingEnd',
|
|
16057
|
+
scale: 'space'
|
|
16058
|
+
},
|
|
16059
|
+
paddingHorizontal: {
|
|
16060
|
+
property: 'paddingHorizontal',
|
|
16061
|
+
scale: 'space'
|
|
16062
|
+
},
|
|
16063
|
+
paddingLeft: {
|
|
16064
|
+
property: 'paddingLeft',
|
|
16065
|
+
scale: 'space'
|
|
16066
|
+
},
|
|
16067
|
+
paddingRight: {
|
|
16068
|
+
property: 'paddingRight',
|
|
16069
|
+
scale: 'space'
|
|
16070
|
+
},
|
|
16071
|
+
paddingStart: {
|
|
16072
|
+
property: 'paddingStart',
|
|
16073
|
+
scale: 'space'
|
|
16074
|
+
},
|
|
16075
|
+
paddingTop: {
|
|
16076
|
+
property: 'paddingTop',
|
|
16077
|
+
scale: 'space'
|
|
16078
|
+
},
|
|
16079
|
+
paddingVertical: {
|
|
16080
|
+
property: 'paddingVertical',
|
|
16081
|
+
scale: 'space'
|
|
16082
|
+
}
|
|
16083
|
+
};
|
|
16084
|
+
var radii = {
|
|
16085
|
+
borderBottomEndRadius: {
|
|
16086
|
+
property: 'borderBottomEndRadius',
|
|
16087
|
+
scale: 'radii'
|
|
16088
|
+
},
|
|
16089
|
+
borderBottomLeftRadius: {
|
|
16090
|
+
property: 'borderBottomLeftRadius',
|
|
16091
|
+
scale: 'radii'
|
|
16092
|
+
},
|
|
16093
|
+
borderBottomRightRadius: {
|
|
16094
|
+
property: 'borderBottomRightRadius',
|
|
16095
|
+
scale: 'radii'
|
|
16096
|
+
},
|
|
16097
|
+
borderBottomStartRadius: {
|
|
16098
|
+
property: 'borderBottomStartRadius',
|
|
16099
|
+
scale: 'radii'
|
|
16100
|
+
},
|
|
16101
|
+
borderTopEndRadius: {
|
|
16102
|
+
property: 'borderTopEndRadius',
|
|
16103
|
+
scale: 'radii'
|
|
16104
|
+
},
|
|
16105
|
+
borderTopLeftRadius: {
|
|
16106
|
+
property: 'borderTopLeftRadius',
|
|
16107
|
+
scale: 'radii'
|
|
16108
|
+
},
|
|
16109
|
+
borderTopRightRadius: {
|
|
16110
|
+
property: 'borderTopRightRadius',
|
|
16111
|
+
scale: 'radii'
|
|
16112
|
+
},
|
|
16113
|
+
borderTopStartRadius: {
|
|
16114
|
+
property: 'borderTopStartRadius',
|
|
16115
|
+
scale: 'radii'
|
|
16116
|
+
},
|
|
16117
|
+
borderRadius: {
|
|
16118
|
+
property: 'borderRadius',
|
|
16119
|
+
scale: 'radii'
|
|
16120
|
+
}
|
|
16121
|
+
};
|
|
16122
|
+
var borderWidths = {
|
|
16123
|
+
borderWidth: {
|
|
16124
|
+
property: 'borderWidth',
|
|
16125
|
+
scale: 'borderWidths'
|
|
16126
|
+
},
|
|
16127
|
+
borderBottomWidth: {
|
|
16128
|
+
property: 'borderBottomWidth',
|
|
16129
|
+
scale: 'borderWidths'
|
|
16130
|
+
},
|
|
16131
|
+
borderTopWidth: {
|
|
16132
|
+
property: 'borderTopWidth',
|
|
16133
|
+
scale: 'borderWidths'
|
|
16134
|
+
},
|
|
16135
|
+
borderLeftWidth: {
|
|
16136
|
+
property: 'borderLeftWidth',
|
|
16137
|
+
scale: 'borderWidths'
|
|
16138
|
+
},
|
|
16139
|
+
borderRightWidth: {
|
|
16140
|
+
property: 'borderRightWidth',
|
|
16141
|
+
scale: 'borderWidths'
|
|
16142
|
+
}
|
|
16143
|
+
};
|
|
16144
|
+
|
|
16145
|
+
var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
|
|
16146
|
+
|
|
16147
|
+
var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
|
|
16148
|
+
|
|
16149
|
+
var pick = function pick(keys, props) {
|
|
16150
|
+
return keys.filter(function (key) {
|
|
16151
|
+
return key in props;
|
|
16152
|
+
}).reduce(function (result, cur) {
|
|
16153
|
+
return _objectSpread2(_objectSpread2({}, result), {}, _defineProperty({}, cur, props[cur]));
|
|
16154
|
+
}, {});
|
|
16155
|
+
};
|
|
16156
|
+
|
|
16157
|
+
var _excluded$9 = ["theme"];
|
|
16158
|
+
var getThemeValue = function getThemeValue(theme, key, props) {
|
|
16159
|
+
var propConfig = config[key];
|
|
16160
|
+
var propValue = props[key];
|
|
16161
|
+
if (!propValue) return undefined;
|
|
16162
|
+
var scale = propConfig.scale,
|
|
16163
|
+
property = propConfig.property;
|
|
16164
|
+
|
|
16165
|
+
switch (scale) {
|
|
16166
|
+
case 'colors':
|
|
16167
|
+
return _defineProperty({}, property, theme.colors[propValue]);
|
|
16168
|
+
|
|
16169
|
+
case 'space':
|
|
16170
|
+
return _defineProperty({}, property, theme.space[propValue]);
|
|
16171
|
+
|
|
16172
|
+
case 'radii':
|
|
16173
|
+
return _defineProperty({}, property, theme.radii[propValue]);
|
|
16174
|
+
|
|
16175
|
+
case 'borderWidths':
|
|
16176
|
+
return _defineProperty({}, property, theme.borderWidths[propValue]);
|
|
16177
|
+
}
|
|
16178
|
+
};
|
|
16179
|
+
|
|
16180
|
+
var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
|
|
16181
|
+
var entries = Object.keys(props);
|
|
16182
|
+
return entries.reduce(function (result, key) {
|
|
16183
|
+
return _objectSpread2(_objectSpread2({}, result), getThemeValue(theme, key, props));
|
|
16184
|
+
}, {});
|
|
16185
|
+
};
|
|
16186
|
+
|
|
16187
|
+
var configKeys = Object.keys(config);
|
|
16188
|
+
var StyledBox = index$7(View)(function (_ref5) {
|
|
16189
|
+
var theme = _ref5.theme,
|
|
16190
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$9);
|
|
16191
|
+
|
|
16192
|
+
var styleProps = pick(configKeys, otherProps);
|
|
16193
|
+
var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
|
|
16194
|
+
return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
|
|
16195
|
+
});
|
|
16196
|
+
|
|
16197
|
+
var _excluded$8 = ["children", "style", "testID"];
|
|
16198
|
+
|
|
16199
|
+
var Box = function Box(_ref) {
|
|
16200
|
+
var children = _ref.children,
|
|
16201
|
+
style = _ref.style,
|
|
16202
|
+
testID = _ref.testID,
|
|
16203
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$8);
|
|
16204
|
+
|
|
16205
|
+
return /*#__PURE__*/React.createElement(StyledBox, _extends$1({}, otherProps, {
|
|
16206
|
+
style: style,
|
|
16207
|
+
testID: testID
|
|
16208
|
+
}), children);
|
|
16209
|
+
};
|
|
16210
|
+
|
|
15912
16211
|
function requiredArgs(required, args) {
|
|
15913
16212
|
if (args.length < required) {
|
|
15914
16213
|
throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
|
|
@@ -18610,7 +18909,7 @@ var Indicator = index$7(View)(function (_ref2) {
|
|
|
18610
18909
|
var theme = _ref2.theme,
|
|
18611
18910
|
themeIntent = _ref2.themeIntent;
|
|
18612
18911
|
return {
|
|
18613
|
-
backgroundColor: theme.__hd__.card.colors
|
|
18912
|
+
backgroundColor: theme.__hd__.card.colors[themeIntent],
|
|
18614
18913
|
width: theme.__hd__.card.sizes.indicatorWidth,
|
|
18615
18914
|
height: '100%'
|
|
18616
18915
|
};
|
|
@@ -18632,23 +18931,18 @@ var DataCard = function DataCard(_ref) {
|
|
|
18632
18931
|
|
|
18633
18932
|
var StyledCard = index$7(View)(function (_ref) {
|
|
18634
18933
|
var themeVariant = _ref.themeVariant,
|
|
18635
|
-
theme = _ref.theme
|
|
18636
|
-
|
|
18934
|
+
theme = _ref.theme,
|
|
18935
|
+
themeIntent = _ref.themeIntent;
|
|
18936
|
+
return _objectSpread2(_objectSpread2(_objectSpread2({}, themeVariant === 'data' && {
|
|
18937
|
+
flexDirection: 'row'
|
|
18938
|
+
}), themeIntent !== undefined && {
|
|
18939
|
+
backgroundColor: theme.__hd__.card.colors[themeIntent]
|
|
18940
|
+
}), {}, {
|
|
18637
18941
|
borderRadius: theme.__hd__.card.radii["default"],
|
|
18638
18942
|
overflow: 'hidden'
|
|
18639
|
-
};
|
|
18640
|
-
|
|
18641
|
-
flexDirection: 'row'
|
|
18642
|
-
};
|
|
18643
|
-
|
|
18644
|
-
switch (themeVariant) {
|
|
18645
|
-
case 'basic':
|
|
18646
|
-
return sharedStyles;
|
|
18943
|
+
});
|
|
18944
|
+
}); // DEPRECATED
|
|
18647
18945
|
|
|
18648
|
-
case 'data':
|
|
18649
|
-
return _objectSpread2(_objectSpread2({}, sharedStyles), dataStyles);
|
|
18650
|
-
}
|
|
18651
|
-
});
|
|
18652
18946
|
var LeftDataCard = index$7(View)(function (_ref2) {
|
|
18653
18947
|
var theme = _ref2.theme;
|
|
18654
18948
|
return {
|
|
@@ -18658,16 +18952,18 @@ var LeftDataCard = index$7(View)(function (_ref2) {
|
|
|
18658
18952
|
};
|
|
18659
18953
|
});
|
|
18660
18954
|
|
|
18661
|
-
var _excluded$6 = ["variant", "children"];
|
|
18955
|
+
var _excluded$6 = ["variant", "intent", "children"];
|
|
18662
18956
|
|
|
18663
18957
|
var Card = function Card(_ref) {
|
|
18664
18958
|
var _ref$variant = _ref.variant,
|
|
18665
18959
|
variant = _ref$variant === void 0 ? 'basic' : _ref$variant,
|
|
18960
|
+
intent = _ref.intent,
|
|
18666
18961
|
children = _ref.children,
|
|
18667
18962
|
nativeProps = _objectWithoutProperties(_ref, _excluded$6);
|
|
18668
18963
|
|
|
18669
18964
|
return /*#__PURE__*/React.createElement(StyledCard, _extends$1({}, nativeProps, {
|
|
18670
|
-
themeVariant: variant
|
|
18965
|
+
themeVariant: variant,
|
|
18966
|
+
themeIntent: intent
|
|
18671
18967
|
}), variant === 'data' && /*#__PURE__*/React.createElement(LeftDataCard, {
|
|
18672
18968
|
testID: "data-card-indicator"
|
|
18673
18969
|
}), children);
|
|
@@ -20544,54 +20840,59 @@ var StyledSpinnerContainer = index$7(View)({
|
|
|
20544
20840
|
});
|
|
20545
20841
|
var StyledSpinnerRow = index$7(View)(function (_ref) {
|
|
20546
20842
|
var themePosition = _ref.themePosition,
|
|
20843
|
+
_ref$themeSize = _ref.themeSize,
|
|
20844
|
+
themeSize = _ref$themeSize === void 0 ? 'medium' : _ref$themeSize,
|
|
20547
20845
|
theme = _ref.theme;
|
|
20548
20846
|
return {
|
|
20549
20847
|
flexDirection: 'row',
|
|
20550
|
-
marginBottom: themePosition === 'top' ? theme.__hd__.spinner.space.spinnerDotPadding : 0
|
|
20848
|
+
marginBottom: themePosition === 'top' ? theme.__hd__.spinner.space.spinnerDotPadding[themeSize] : 0
|
|
20551
20849
|
};
|
|
20552
20850
|
});
|
|
20553
20851
|
var StyledSpinnerDot = index$7(View)(function (_ref2) {
|
|
20554
20852
|
var themePosition = _ref2.themePosition,
|
|
20853
|
+
_ref2$themeSize = _ref2.themeSize,
|
|
20854
|
+
themeSize = _ref2$themeSize === void 0 ? 'medium' : _ref2$themeSize,
|
|
20555
20855
|
theme = _ref2.theme;
|
|
20556
20856
|
|
|
20557
20857
|
var themeStyling = function themeStyling() {
|
|
20558
20858
|
switch (themePosition) {
|
|
20559
20859
|
case 'topLeft':
|
|
20560
20860
|
return {
|
|
20561
|
-
|
|
20861
|
+
backgroundColor: theme.__hd__.spinner.colors.dot1
|
|
20562
20862
|
};
|
|
20563
20863
|
|
|
20564
20864
|
case 'topRight':
|
|
20565
20865
|
return {
|
|
20566
|
-
marginLeft: theme.__hd__.spinner.space.spinnerDotPadding,
|
|
20567
|
-
|
|
20866
|
+
marginLeft: theme.__hd__.spinner.space.spinnerDotPadding[themeSize],
|
|
20867
|
+
backgroundColor: theme.__hd__.spinner.colors.dot2
|
|
20568
20868
|
};
|
|
20569
20869
|
|
|
20570
20870
|
case 'bottomLeft':
|
|
20571
20871
|
return {
|
|
20572
|
-
|
|
20872
|
+
backgroundColor: theme.__hd__.spinner.colors.dot3
|
|
20573
20873
|
};
|
|
20574
20874
|
|
|
20575
20875
|
case 'bottomRight':
|
|
20576
20876
|
return {
|
|
20577
|
-
marginLeft: theme.__hd__.spinner.space.spinnerDotPadding,
|
|
20578
|
-
|
|
20877
|
+
marginLeft: theme.__hd__.spinner.space.spinnerDotPadding[themeSize],
|
|
20878
|
+
backgroundColor: theme.__hd__.spinner.colors.dot4
|
|
20579
20879
|
};
|
|
20580
20880
|
}
|
|
20581
20881
|
};
|
|
20582
20882
|
|
|
20583
20883
|
return _objectSpread2({
|
|
20584
|
-
height: scale(theme.__hd__.spinner.space.spinnerDot),
|
|
20585
|
-
width: scale(theme.__hd__.spinner.space.spinnerDot),
|
|
20586
|
-
borderRadius: theme.__hd__.spinner.radii["default"]
|
|
20587
|
-
backgroundColor: theme.__hd__.spinner.color["default"]
|
|
20884
|
+
height: scale(theme.__hd__.spinner.space.spinnerDot[themeSize]),
|
|
20885
|
+
width: scale(theme.__hd__.spinner.space.spinnerDot[themeSize]),
|
|
20886
|
+
borderRadius: theme.__hd__.spinner.radii["default"]
|
|
20588
20887
|
}, themeStyling());
|
|
20589
20888
|
});
|
|
20590
20889
|
|
|
20591
20890
|
var AnimatedRow = Animated.createAnimatedComponent(StyledSpinnerRow);
|
|
20592
20891
|
var AnimatedDot = Animated.createAnimatedComponent(StyledSpinnerDot);
|
|
20593
20892
|
|
|
20594
|
-
var AnimatedSpinner = function AnimatedSpinner() {
|
|
20893
|
+
var AnimatedSpinner = function AnimatedSpinner(_ref) {
|
|
20894
|
+
var _ref$size = _ref.size,
|
|
20895
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size;
|
|
20595
20896
|
var rotateAnimation = useRef(new Animated.Value(0));
|
|
20596
20897
|
useEffect(function () {
|
|
20597
20898
|
var animation = Animated.loop(Animated.timing(rotateAnimation.current, {
|
|
@@ -20616,29 +20917,39 @@ var AnimatedSpinner = function AnimatedSpinner() {
|
|
|
20616
20917
|
}]
|
|
20617
20918
|
}])
|
|
20618
20919
|
}, /*#__PURE__*/React.createElement(AnimatedRow, {
|
|
20619
|
-
themePosition: "top"
|
|
20920
|
+
themePosition: "top",
|
|
20921
|
+
themeSize: size
|
|
20620
20922
|
}, /*#__PURE__*/React.createElement(AnimatedDot, {
|
|
20621
|
-
themePosition: "topLeft"
|
|
20923
|
+
themePosition: "topLeft",
|
|
20924
|
+
themeSize: size
|
|
20622
20925
|
}), /*#__PURE__*/React.createElement(AnimatedDot, {
|
|
20623
|
-
themePosition: "topRight"
|
|
20926
|
+
themePosition: "topRight",
|
|
20927
|
+
themeSize: size
|
|
20624
20928
|
})), /*#__PURE__*/React.createElement(AnimatedRow, {
|
|
20625
|
-
themePosition: "bottom"
|
|
20929
|
+
themePosition: "bottom",
|
|
20930
|
+
themeSize: size
|
|
20626
20931
|
}, /*#__PURE__*/React.createElement(AnimatedDot, {
|
|
20627
|
-
themePosition: "bottomLeft"
|
|
20932
|
+
themePosition: "bottomLeft",
|
|
20933
|
+
themeSize: size
|
|
20628
20934
|
}), /*#__PURE__*/React.createElement(AnimatedDot, {
|
|
20629
|
-
themePosition: "bottomRight"
|
|
20935
|
+
themePosition: "bottomRight",
|
|
20936
|
+
themeSize: size
|
|
20630
20937
|
})));
|
|
20631
20938
|
};
|
|
20632
20939
|
|
|
20633
|
-
var _excluded$1 = ["testID"];
|
|
20940
|
+
var _excluded$1 = ["testID", "size"];
|
|
20634
20941
|
|
|
20635
20942
|
var Spinner = function Spinner(_ref) {
|
|
20636
20943
|
var testID = _ref.testID,
|
|
20944
|
+
_ref$size = _ref.size,
|
|
20945
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
20637
20946
|
nativeProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
20638
20947
|
|
|
20639
20948
|
return /*#__PURE__*/React.createElement(StyledView$1, nativeProps, /*#__PURE__*/React.createElement(StyledSpinnerContainer, {
|
|
20640
20949
|
testID: testID
|
|
20641
|
-
}, /*#__PURE__*/React.createElement(AnimatedSpinner,
|
|
20950
|
+
}, /*#__PURE__*/React.createElement(AnimatedSpinner, {
|
|
20951
|
+
size: size
|
|
20952
|
+
})));
|
|
20642
20953
|
};
|
|
20643
20954
|
|
|
20644
20955
|
var Circle = index$7(View)(function (_ref) {
|
|
@@ -21414,6 +21725,10 @@ var StyledIndicator = index$7(Animated.View)(function (_ref3) {
|
|
|
21414
21725
|
bottom: 0
|
|
21415
21726
|
};
|
|
21416
21727
|
});
|
|
21728
|
+
var StyledBadgeWrapper = index$7(View)({
|
|
21729
|
+
flexDirection: 'row',
|
|
21730
|
+
alignItems: 'center'
|
|
21731
|
+
});
|
|
21417
21732
|
|
|
21418
21733
|
var ActiveTabIndicator = function ActiveTabIndicator(_ref) {
|
|
21419
21734
|
var scrollOffsetAnimatedValue = _ref.scrollOffsetAnimatedValue,
|
|
@@ -21456,16 +21771,16 @@ var HeaderTabWrapper = index$7(View)(function (_ref) {
|
|
|
21456
21771
|
};
|
|
21457
21772
|
});
|
|
21458
21773
|
var HeaderTabItem = index$7(Animated.View)(function (_ref2) {
|
|
21459
|
-
var theme = _ref2.theme
|
|
21774
|
+
var theme = _ref2.theme,
|
|
21775
|
+
isFirstItem = _ref2.isFirstItem;
|
|
21460
21776
|
return {
|
|
21461
|
-
|
|
21777
|
+
marginLeft: isFirstItem ? 0 : theme.__hd__.tabs.space.itemMargin,
|
|
21462
21778
|
paddingVertical: theme.__hd__.tabs.space.itemVerticalPadding
|
|
21463
21779
|
};
|
|
21464
21780
|
});
|
|
21465
21781
|
var HeaderTabItemOutlineWrapper = index$7(View)(function (_ref3) {
|
|
21466
21782
|
var theme = _ref3.theme;
|
|
21467
21783
|
return _objectSpread2({
|
|
21468
|
-
paddingHorizontal: theme.__hd__.tabs.space.itemHorizontalPadding,
|
|
21469
21784
|
paddingVertical: theme.__hd__.tabs.space.itemVerticalPadding
|
|
21470
21785
|
}, StyleSheet$1.absoluteFillObject);
|
|
21471
21786
|
});
|
|
@@ -21496,6 +21811,47 @@ var useAnimatedValueArray = function useAnimatedValueArray(initialValues) {
|
|
|
21496
21811
|
return refs.current;
|
|
21497
21812
|
};
|
|
21498
21813
|
|
|
21814
|
+
var TabWithBadge = function TabWithBadge(_ref) {
|
|
21815
|
+
var showBadge = _ref.showBadge,
|
|
21816
|
+
config = _ref.config,
|
|
21817
|
+
tabItem = _ref.tabItem;
|
|
21818
|
+
var theme = useTheme$1(); // Deprecated. To be removed.
|
|
21819
|
+
|
|
21820
|
+
if (showBadge !== undefined) {
|
|
21821
|
+
return /*#__PURE__*/React.createElement(Badge$1.Status, {
|
|
21822
|
+
testID: "deprecated-badge",
|
|
21823
|
+
visible: showBadge,
|
|
21824
|
+
style: {
|
|
21825
|
+
paddingHorizontal: theme.space.small
|
|
21826
|
+
}
|
|
21827
|
+
}, tabItem);
|
|
21828
|
+
}
|
|
21829
|
+
|
|
21830
|
+
if (!config) return /*#__PURE__*/React.createElement(View, null, tabItem);
|
|
21831
|
+
|
|
21832
|
+
if (config.type === 'status') {
|
|
21833
|
+
return /*#__PURE__*/React.createElement(Badge$1.Status, {
|
|
21834
|
+
visible: true,
|
|
21835
|
+
style: {
|
|
21836
|
+
paddingHorizontal: theme.space.xsmall
|
|
21837
|
+
}
|
|
21838
|
+
}, tabItem);
|
|
21839
|
+
}
|
|
21840
|
+
|
|
21841
|
+
if (config.type === 'counter') {
|
|
21842
|
+
return /*#__PURE__*/React.createElement(StyledBadgeWrapper, null, tabItem, /*#__PURE__*/React.createElement(Badge$1, {
|
|
21843
|
+
content: config.value,
|
|
21844
|
+
max: config.max,
|
|
21845
|
+
intent: "info",
|
|
21846
|
+
style: {
|
|
21847
|
+
marginLeft: theme.space.xsmall
|
|
21848
|
+
}
|
|
21849
|
+
}));
|
|
21850
|
+
}
|
|
21851
|
+
|
|
21852
|
+
return /*#__PURE__*/React.createElement(View, null, tabItem);
|
|
21853
|
+
};
|
|
21854
|
+
|
|
21499
21855
|
var getTabItem$1 = function getTabItem(_ref) {
|
|
21500
21856
|
var item = _ref.item,
|
|
21501
21857
|
color = _ref.color,
|
|
@@ -21602,8 +21958,8 @@ var ScrollableTab = function ScrollableTab(_ref2) {
|
|
|
21602
21958
|
testID = tab.testID,
|
|
21603
21959
|
activeItem = tab.activeItem,
|
|
21604
21960
|
originalInactiveItem = tab.inactiveItem,
|
|
21605
|
-
|
|
21606
|
-
|
|
21961
|
+
showBadge = tab.showBadge,
|
|
21962
|
+
badge = tab.badge;
|
|
21607
21963
|
var active = selectedTabKey === key;
|
|
21608
21964
|
var activeAnimated = tabsAnims[index];
|
|
21609
21965
|
var outlineScale = active ? activeAnimated.interpolate({
|
|
@@ -21622,7 +21978,9 @@ var ScrollableTab = function ScrollableTab(_ref2) {
|
|
|
21622
21978
|
onTabPress(key);
|
|
21623
21979
|
},
|
|
21624
21980
|
testID: testID
|
|
21625
|
-
}, /*#__PURE__*/React.createElement(HeaderTabItem,
|
|
21981
|
+
}, /*#__PURE__*/React.createElement(HeaderTabItem, {
|
|
21982
|
+
isFirstItem: index === 0
|
|
21983
|
+
}, /*#__PURE__*/React.createElement(HeaderTabItemOutlineWrapper, null, /*#__PURE__*/React.createElement(HeaderTabItemOutline, {
|
|
21626
21984
|
themeActive: active,
|
|
21627
21985
|
style: {
|
|
21628
21986
|
flex: 1,
|
|
@@ -21630,9 +21988,11 @@ var ScrollableTab = function ScrollableTab(_ref2) {
|
|
|
21630
21988
|
scaleX: outlineScale
|
|
21631
21989
|
}]
|
|
21632
21990
|
}
|
|
21633
|
-
})), /*#__PURE__*/React.createElement(HeaderTabItemWrapper, null, /*#__PURE__*/React.createElement(
|
|
21634
|
-
|
|
21635
|
-
|
|
21991
|
+
})), /*#__PURE__*/React.createElement(HeaderTabItemWrapper, null, /*#__PURE__*/React.createElement(TabWithBadge, {
|
|
21992
|
+
showBadge: showBadge,
|
|
21993
|
+
config: badge,
|
|
21994
|
+
tabItem: tabItem
|
|
21995
|
+
}))));
|
|
21636
21996
|
}
|
|
21637
21997
|
})), /*#__PURE__*/React.createElement(ContentWrapper, {
|
|
21638
21998
|
initialPage: selectedTabIndex,
|
|
@@ -21731,8 +22091,8 @@ var Tabs = function Tabs(_ref2) {
|
|
|
21731
22091
|
testID = tab.testID,
|
|
21732
22092
|
activeItem = tab.activeItem,
|
|
21733
22093
|
originalInactiveItem = tab.inactiveItem,
|
|
21734
|
-
|
|
21735
|
-
|
|
22094
|
+
showBadge = tab.showBadge,
|
|
22095
|
+
badge = tab.badge;
|
|
21736
22096
|
var active = selectedTabKey === key;
|
|
21737
22097
|
var inactiveItem = originalInactiveItem !== null && originalInactiveItem !== void 0 ? originalInactiveItem : activeItem;
|
|
21738
22098
|
var tabItem = getTabItem({
|
|
@@ -21746,9 +22106,11 @@ var Tabs = function Tabs(_ref2) {
|
|
|
21746
22106
|
onTabPress(key);
|
|
21747
22107
|
},
|
|
21748
22108
|
testID: testID
|
|
21749
|
-
}, /*#__PURE__*/React.createElement(HeaderTabItem$1, null, /*#__PURE__*/React.createElement(
|
|
21750
|
-
|
|
21751
|
-
|
|
22109
|
+
}, /*#__PURE__*/React.createElement(HeaderTabItem$1, null, /*#__PURE__*/React.createElement(TabWithBadge, {
|
|
22110
|
+
showBadge: showBadge,
|
|
22111
|
+
config: badge,
|
|
22112
|
+
tabItem: tabItem
|
|
22113
|
+
})));
|
|
21752
22114
|
})), /*#__PURE__*/React.createElement(ActiveTabIndicator, {
|
|
21753
22115
|
positionAnimatedValue: positionAnimatedValue,
|
|
21754
22116
|
scrollOffsetAnimatedValue: scrollOffsetAnimatedValue,
|
|
@@ -21794,15 +22156,6 @@ var index$2 = Object.assign(Tabs, {
|
|
|
21794
22156
|
Scroll: ScrollableTab
|
|
21795
22157
|
});
|
|
21796
22158
|
|
|
21797
|
-
var BACKGROUND_INTENTS = {
|
|
21798
|
-
"default": 'defaultBackground',
|
|
21799
|
-
primary: 'primaryBackground',
|
|
21800
|
-
info: 'infoBackground',
|
|
21801
|
-
success: 'successBackground',
|
|
21802
|
-
warning: 'warningBackground',
|
|
21803
|
-
danger: 'dangerBackground',
|
|
21804
|
-
archived: 'archivedBackground'
|
|
21805
|
-
};
|
|
21806
22159
|
var StyledView = index$7(View)(function (_ref) {
|
|
21807
22160
|
var themeIntent = _ref.themeIntent,
|
|
21808
22161
|
theme = _ref.theme;
|
|
@@ -21812,7 +22165,7 @@ var StyledView = index$7(View)(function (_ref) {
|
|
|
21812
22165
|
paddingVertical: theme.__hd__.tag.space.verticalPadding,
|
|
21813
22166
|
paddingHorizontal: theme.__hd__.tag.space.horizontalPadding,
|
|
21814
22167
|
borderColor: theme.__hd__.tag.colors[themeIntent],
|
|
21815
|
-
backgroundColor: theme.__hd__.tag.colors[
|
|
22168
|
+
backgroundColor: theme.__hd__.tag.colors["".concat(themeIntent, "Background")]
|
|
21816
22169
|
};
|
|
21817
22170
|
});
|
|
21818
22171
|
var StyledText = index$7(Text$1)(function (_ref2) {
|
|
@@ -21833,7 +22186,7 @@ var _excluded = ["content", "intent", "style", "testID"];
|
|
|
21833
22186
|
var Tag = function Tag(_ref) {
|
|
21834
22187
|
var content = _ref.content,
|
|
21835
22188
|
_ref$intent = _ref.intent,
|
|
21836
|
-
intent = _ref$intent === void 0 ? '
|
|
22189
|
+
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
21837
22190
|
style = _ref.style,
|
|
21838
22191
|
testID = _ref.testID,
|
|
21839
22192
|
nativeProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -22009,8 +22362,8 @@ var ToastContainerWrapper = index$7(View)(function (_ref) {
|
|
|
22009
22362
|
var theme = _ref.theme,
|
|
22010
22363
|
position = _ref.position;
|
|
22011
22364
|
return _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
22012
|
-
paddingHorizontal: theme.__hd__.toast.space.
|
|
22013
|
-
paddingVertical: theme.__hd__.toast.space.
|
|
22365
|
+
paddingHorizontal: theme.__hd__.toast.space.wrapperVerticalPadding,
|
|
22366
|
+
paddingVertical: theme.__hd__.toast.space.wrapperHorizontalPadding,
|
|
22014
22367
|
flexDirection: position === 'bottom' ? 'column-reverse' : 'column',
|
|
22015
22368
|
elevation: 9999
|
|
22016
22369
|
});
|
|
@@ -22023,20 +22376,25 @@ var Container = index$7(Animated.View)(function (_ref2) {
|
|
|
22023
22376
|
borderRadius: themeVariant === 'round' ? theme.__hd__.toast.radii["default"] : 0,
|
|
22024
22377
|
backgroundColor: theme.__hd__.toast.colors[themeIntent],
|
|
22025
22378
|
minHeight: theme.__hd__.toast.sizes.height,
|
|
22026
|
-
flexDirection: 'row'
|
|
22379
|
+
flexDirection: 'row',
|
|
22380
|
+
shadowColor: theme.__hd__.toast.colors.shadow,
|
|
22381
|
+
shadowOffset: theme.__hd__.toast.shadows.offset,
|
|
22382
|
+
shadowRadius: theme.__hd__.toast.shadows.radius,
|
|
22383
|
+
shadowOpacity: theme.__hd__.toast.shadows.opacity,
|
|
22384
|
+
elevation: theme.__hd__.toast.shadows.elevation
|
|
22027
22385
|
};
|
|
22028
22386
|
});
|
|
22029
22387
|
var IconContainer = index$7(View)(function (_ref3) {
|
|
22030
22388
|
var theme = _ref3.theme;
|
|
22031
22389
|
return {
|
|
22032
22390
|
alignItems: 'center',
|
|
22033
|
-
paddingLeft: theme.__hd__.toast.space.
|
|
22391
|
+
paddingLeft: theme.__hd__.toast.space.iconLeftPadding
|
|
22034
22392
|
};
|
|
22035
22393
|
});
|
|
22036
22394
|
var TextContainer = index$7(View)(function (_ref4) {
|
|
22037
22395
|
var theme = _ref4.theme;
|
|
22038
22396
|
return {
|
|
22039
|
-
paddingHorizontal: theme.__hd__.toast.space.
|
|
22397
|
+
paddingHorizontal: theme.__hd__.toast.space.textHorizontalPadding,
|
|
22040
22398
|
flex: 1
|
|
22041
22399
|
};
|
|
22042
22400
|
});
|
|
@@ -22044,7 +22402,7 @@ var ContentContainer = index$7(View)(function (_ref5) {
|
|
|
22044
22402
|
var theme = _ref5.theme,
|
|
22045
22403
|
showDivider = _ref5.showDivider;
|
|
22046
22404
|
return {
|
|
22047
|
-
paddingVertical: theme.__hd__.toast.space.
|
|
22405
|
+
paddingVertical: theme.__hd__.toast.space.contentVerticalPadding,
|
|
22048
22406
|
flex: 1,
|
|
22049
22407
|
borderRightWidth: showDivider ? theme.__hd__.toast.borderWidths.base : 0,
|
|
22050
22408
|
borderColor: theme.__hd__.toast.colors.divider,
|
|
@@ -22054,7 +22412,7 @@ var ContentContainer = index$7(View)(function (_ref5) {
|
|
|
22054
22412
|
var CTAWrapper = index$7(TouchableOpacity)(function (_ref6) {
|
|
22055
22413
|
var theme = _ref6.theme;
|
|
22056
22414
|
return {
|
|
22057
|
-
paddingHorizontal: theme.__hd__.
|
|
22415
|
+
paddingHorizontal: theme.__hd__.toast.space.ctaPadding,
|
|
22058
22416
|
justifyContent: 'center'
|
|
22059
22417
|
};
|
|
22060
22418
|
});
|
|
@@ -22081,24 +22439,39 @@ var getIntentIcon = function getIntentIcon(intent) {
|
|
|
22081
22439
|
|
|
22082
22440
|
case 'error':
|
|
22083
22441
|
return 'circle-warning';
|
|
22442
|
+
|
|
22443
|
+
default:
|
|
22444
|
+
return undefined;
|
|
22084
22445
|
}
|
|
22085
22446
|
};
|
|
22086
22447
|
|
|
22087
|
-
var
|
|
22088
|
-
var
|
|
22089
|
-
icon = _ref.icon
|
|
22090
|
-
|
|
22091
|
-
|
|
22092
|
-
|
|
22093
|
-
|
|
22094
|
-
|
|
22095
|
-
|
|
22096
|
-
|
|
22097
|
-
|
|
22098
|
-
|
|
22099
|
-
|
|
22100
|
-
|
|
22101
|
-
|
|
22448
|
+
var ToastIcon = function ToastIcon(_ref) {
|
|
22449
|
+
var themeIntent = _ref.themeIntent,
|
|
22450
|
+
icon = _ref.icon;
|
|
22451
|
+
return icon ? /*#__PURE__*/React.createElement(IconContainer, {
|
|
22452
|
+
testID: "toast-left-icon"
|
|
22453
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
22454
|
+
icon: icon,
|
|
22455
|
+
size: "small",
|
|
22456
|
+
intent: themeIntent === 'snackbar' ? 'text-inverted' : 'text'
|
|
22457
|
+
})) : null;
|
|
22458
|
+
};
|
|
22459
|
+
|
|
22460
|
+
var Toast$1 = function Toast(_ref2) {
|
|
22461
|
+
var content = _ref2.content,
|
|
22462
|
+
icon = _ref2.icon,
|
|
22463
|
+
_ref2$variant = _ref2.variant,
|
|
22464
|
+
variant = _ref2$variant === void 0 ? 'default' : _ref2$variant,
|
|
22465
|
+
_ref2$intent = _ref2.intent,
|
|
22466
|
+
intent = _ref2$intent === void 0 ? 'info' : _ref2$intent,
|
|
22467
|
+
style = _ref2.style,
|
|
22468
|
+
_ref2$duration = _ref2.duration,
|
|
22469
|
+
duration = _ref2$duration === void 0 ? 2000 : _ref2$duration,
|
|
22470
|
+
_ref2$autoDismiss = _ref2.autoDismiss,
|
|
22471
|
+
autoDismiss = _ref2$autoDismiss === void 0 ? true : _ref2$autoDismiss,
|
|
22472
|
+
onAction = _ref2.onAction,
|
|
22473
|
+
actionLabel = _ref2.actionLabel,
|
|
22474
|
+
onDismiss = _ref2.onDismiss;
|
|
22102
22475
|
var animatedValue = useRef(new Animated.Value(0)).current;
|
|
22103
22476
|
var toastConfig = useToastConfig();
|
|
22104
22477
|
useEffect(function () {
|
|
@@ -22142,19 +22515,20 @@ var Toast$1 = function Toast(_ref) {
|
|
|
22142
22515
|
}]
|
|
22143
22516
|
}, /*#__PURE__*/React.createElement(ContentContainer, {
|
|
22144
22517
|
showDivider: !!actionLabel
|
|
22145
|
-
}, icon !== null ? /*#__PURE__*/React.createElement(
|
|
22146
|
-
|
|
22147
|
-
|
|
22148
|
-
|
|
22149
|
-
|
|
22150
|
-
}
|
|
22518
|
+
}, icon !== null ? /*#__PURE__*/React.createElement(ToastIcon, {
|
|
22519
|
+
themeIntent: intent,
|
|
22520
|
+
icon: icon || getIntentIcon(intent)
|
|
22521
|
+
}) : null, /*#__PURE__*/React.createElement(TextContainer, null, typeof content === 'string' ? /*#__PURE__*/React.createElement(Typography.Text, {
|
|
22522
|
+
intent: intent === 'snackbar' ? 'inverted' : 'body'
|
|
22523
|
+
}, content) : content)), actionLabel ? /*#__PURE__*/React.createElement(CTAWrapper, {
|
|
22151
22524
|
testID: "toast-action-button",
|
|
22152
22525
|
onPress: function onPress() {
|
|
22153
22526
|
onAction === null || onAction === void 0 ? void 0 : onAction();
|
|
22154
22527
|
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
22155
22528
|
}
|
|
22156
22529
|
}, typeof actionLabel === 'string' ? /*#__PURE__*/React.createElement(Typography.Text, {
|
|
22157
|
-
fontWeight: "semi-bold"
|
|
22530
|
+
fontWeight: "semi-bold",
|
|
22531
|
+
intent: intent === 'snackbar' ? 'inverted' : 'body'
|
|
22158
22532
|
}, actionLabel) : actionLabel) : null);
|
|
22159
22533
|
};
|
|
22160
22534
|
|
|
@@ -22277,13 +22651,17 @@ var ToastProvider = function ToastProvider(_ref) {
|
|
|
22277
22651
|
}, [displayType, position]);
|
|
22278
22652
|
return /*#__PURE__*/React.createElement(ToastContext.Provider, {
|
|
22279
22653
|
value: refState
|
|
22654
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
22655
|
+
style: {
|
|
22656
|
+
flex: 1
|
|
22657
|
+
}
|
|
22280
22658
|
}, children, /*#__PURE__*/React.createElement(ToastConfigContext.Provider, {
|
|
22281
22659
|
value: config
|
|
22282
22660
|
}, /*#__PURE__*/React.createElement(ToastContainer, {
|
|
22283
22661
|
ref: toastRef,
|
|
22284
22662
|
displayType: displayType,
|
|
22285
22663
|
position: position
|
|
22286
|
-
})));
|
|
22664
|
+
}))));
|
|
22287
22665
|
};
|
|
22288
22666
|
|
|
22289
22667
|
var Toast = {
|
|
@@ -40666,4 +41044,4 @@ var index = Object.assign(RichTextEditor$1, {
|
|
|
40666
41044
|
Toolbar: EditorToolbar
|
|
40667
41045
|
});
|
|
40668
41046
|
|
|
40669
|
-
export { Accordion, Alert, Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet, CompoundButton as Button, Calendar, index$6 as Card, Checkbox, Collapse, ContentNavigator, DatePicker, Divider, index$5 as Drawer, Empty, index$4 as FAB, Icon, List, PinInput, Progress, CompoundRadio as Radio, index as RichTextEditor, SectionHeading, index$3 as Select, Spinner, Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, TimePicker, Toast, index$1 as Toolbar, Typography, getTheme$1 as getTheme, scale, swagSystemPalette, defaultTheme as theme, useTheme, workSystemPalette };
|
|
41047
|
+
export { Accordion, Alert, Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet, Box, CompoundButton as Button, Calendar, index$6 as Card, Checkbox, Collapse, ContentNavigator, DatePicker, Divider, index$5 as Drawer, Empty, index$4 as FAB, Icon, List, PinInput, Progress, CompoundRadio as Radio, index as RichTextEditor, SectionHeading, index$3 as Select, Spinner, Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, TimePicker, Toast, index$1 as Toolbar, Typography, getTheme$1 as getTheme, scale, swagSystemPalette, defaultTheme as theme, useTheme, workSystemPalette };
|