@hero-design/rn 8.42.3 → 8.43.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +11 -0
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +670 -499
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +1109 -937
- package/package.json +7 -7
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +197 -211
- package/src/components/BottomSheet/index.tsx +1 -1
- package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +6 -10
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +0 -20
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +0 -70
- package/src/components/Button/StyledButton.tsx +4 -0
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +16 -42
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +10 -0
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/Carousel/__tests__/index.spec.tsx +8 -10
- package/src/components/Chip/StyledChip.tsx +121 -0
- package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +943 -0
- package/src/components/Chip/__tests__/index.spec.tsx +136 -0
- package/src/components/Chip/index.tsx +82 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +12 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +417 -399
- package/src/components/Error/__tests__/index.spec.tsx +9 -6
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +1 -0
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +8 -10
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +367 -451
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +7 -10
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +357 -419
- package/src/components/Success/__tests__/index.spec.tsx +9 -6
- package/src/components/Tabs/__tests__/SceneView.spec.tsx +19 -23
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +417 -399
- package/src/index.ts +2 -0
- package/src/testHelpers/renderWithTheme.tsx +1 -7
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +38 -1
- package/src/theme/components/button.ts +0 -1
- package/src/theme/components/chip.ts +47 -0
- package/src/theme/getTheme.ts +3 -0
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +3 -3
- package/types/components/Chip/StyledChip.d.ts +31 -0
- package/types/components/Chip/index.d.ts +26 -0
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/Icon/utils.d.ts +1 -1
- package/types/index.d.ts +2 -1
- package/types/theme/components/button.d.ts +0 -1
- package/types/theme/components/chip.d.ts +40 -0
- package/types/theme/getTheme.d.ts +2 -0
- package/.turbo/turbo-publish:npm.log +0 -0
package/lib/index.js
CHANGED
|
@@ -2003,8 +2003,7 @@ var getButtonTheme = function getButtonTheme(theme) {
|
|
|
2003
2003
|
buttonPadding: theme.space.medium,
|
|
2004
2004
|
textButtonPadding: theme.space.smallMedium,
|
|
2005
2005
|
iconPadding: theme.space.smallMedium,
|
|
2006
|
-
utilityPadding: theme.space.small
|
|
2007
|
-
loadingIndicatorWrapperVerticalPadding: theme.space.xxsmall / 2
|
|
2006
|
+
utilityPadding: theme.space.small
|
|
2008
2007
|
};
|
|
2009
2008
|
var sizes = {
|
|
2010
2009
|
iconSize: theme.fontSizes.xxlarge
|
|
@@ -2197,6 +2196,44 @@ var getCheckboxTheme = function getCheckboxTheme(theme) {
|
|
|
2197
2196
|
};
|
|
2198
2197
|
};
|
|
2199
2198
|
|
|
2199
|
+
var getChipTheme = function getChipTheme(theme) {
|
|
2200
|
+
var colors = {
|
|
2201
|
+
primaryBackground: theme.colors.darkGlobalSurface,
|
|
2202
|
+
secondaryBackground: theme.colors.highlightedSurface,
|
|
2203
|
+
filledBackground: theme.colors.defaultGlobalSurface,
|
|
2204
|
+
outlinedBackground: 'transparent',
|
|
2205
|
+
wrapperBorder: theme.colors.primaryOutline,
|
|
2206
|
+
wrapperSelectedBorder: 'transparent',
|
|
2207
|
+
selectedPrimaryText: theme.colors.defaultGlobalSurface
|
|
2208
|
+
};
|
|
2209
|
+
var space = {
|
|
2210
|
+
wrapperHorizontalPadding: theme.space.smallMedium,
|
|
2211
|
+
wrapperVerticalPadding: theme.space.small,
|
|
2212
|
+
iconWrapperMarginRight: theme.space.small
|
|
2213
|
+
};
|
|
2214
|
+
var sizes = {
|
|
2215
|
+
wrapperBorder: theme.borderWidths.base
|
|
2216
|
+
};
|
|
2217
|
+
var radii = {
|
|
2218
|
+
wrapper: theme.radii.rounded
|
|
2219
|
+
};
|
|
2220
|
+
var borderWidths = {
|
|
2221
|
+
wrapper: theme.borderWidths.base,
|
|
2222
|
+
icon: theme.borderWidths.medium
|
|
2223
|
+
};
|
|
2224
|
+
var shadows = {
|
|
2225
|
+
filledWrapper: theme.shadows["default"]
|
|
2226
|
+
};
|
|
2227
|
+
return {
|
|
2228
|
+
colors: colors,
|
|
2229
|
+
space: space,
|
|
2230
|
+
sizes: sizes,
|
|
2231
|
+
radii: radii,
|
|
2232
|
+
borderWidths: borderWidths,
|
|
2233
|
+
shadows: shadows
|
|
2234
|
+
};
|
|
2235
|
+
};
|
|
2236
|
+
|
|
2200
2237
|
var getContentNavigatorTheme = function getContentNavigatorTheme(theme) {
|
|
2201
2238
|
var space = {
|
|
2202
2239
|
valueHorizontalPadding: theme.space.small
|
|
@@ -3349,6 +3386,7 @@ var getTheme$1 = function getTheme() {
|
|
|
3349
3386
|
carousel: getCarouselTheme(globalTheme),
|
|
3350
3387
|
cardCarousel: getCardCarouselTheme(globalTheme),
|
|
3351
3388
|
checkbox: getCheckboxTheme(globalTheme),
|
|
3389
|
+
chip: getChipTheme(globalTheme),
|
|
3352
3390
|
contentNavigator: getContentNavigatorTheme(globalTheme),
|
|
3353
3391
|
datePicker: getDatePickerTheme(globalTheme),
|
|
3354
3392
|
divider: getDividerTheme(globalTheme),
|
|
@@ -6402,7 +6440,7 @@ var StyledText$3 = index$a(reactNative.Text)(function (_ref) {
|
|
|
6402
6440
|
});
|
|
6403
6441
|
});
|
|
6404
6442
|
|
|
6405
|
-
var _excluded$
|
|
6443
|
+
var _excluded$A = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
|
|
6406
6444
|
var Text = function Text(_ref) {
|
|
6407
6445
|
var children = _ref.children,
|
|
6408
6446
|
_ref$fontSize = _ref.fontSize,
|
|
@@ -6415,7 +6453,7 @@ var Text = function Text(_ref) {
|
|
|
6415
6453
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
6416
6454
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
6417
6455
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
6418
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
6456
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$A);
|
|
6419
6457
|
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.');
|
|
6420
6458
|
return /*#__PURE__*/React__default["default"].createElement(StyledText$3, _extends$1({}, nativeProps, {
|
|
6421
6459
|
themeFontSize: fontSize,
|
|
@@ -6445,7 +6483,7 @@ var StyledCaption = index$a(reactNative.Text)(function (_ref) {
|
|
|
6445
6483
|
};
|
|
6446
6484
|
});
|
|
6447
6485
|
|
|
6448
|
-
var _excluded$
|
|
6486
|
+
var _excluded$z = ["children", "fontWeight", "intent", "allowFontScaling"];
|
|
6449
6487
|
var Caption = function Caption(_ref) {
|
|
6450
6488
|
var children = _ref.children,
|
|
6451
6489
|
_ref$fontWeight = _ref.fontWeight,
|
|
@@ -6454,7 +6492,7 @@ var Caption = function Caption(_ref) {
|
|
|
6454
6492
|
intent = _ref$intent === void 0 ? 'body' : _ref$intent,
|
|
6455
6493
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
6456
6494
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
6457
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
6495
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$z);
|
|
6458
6496
|
return /*#__PURE__*/React__default["default"].createElement(StyledCaption, _extends$1({}, nativeProps, {
|
|
6459
6497
|
themeFontWeight: fontWeight,
|
|
6460
6498
|
themeIntent: intent,
|
|
@@ -6462,7 +6500,7 @@ var Caption = function Caption(_ref) {
|
|
|
6462
6500
|
}), children);
|
|
6463
6501
|
};
|
|
6464
6502
|
|
|
6465
|
-
var StyledLabel$
|
|
6503
|
+
var StyledLabel$2 = index$a(reactNative.Text)(function (_ref) {
|
|
6466
6504
|
var themeIntent = _ref.themeIntent,
|
|
6467
6505
|
theme = _ref.theme;
|
|
6468
6506
|
return {
|
|
@@ -6473,15 +6511,15 @@ var StyledLabel$1 = index$a(reactNative.Text)(function (_ref) {
|
|
|
6473
6511
|
};
|
|
6474
6512
|
});
|
|
6475
6513
|
|
|
6476
|
-
var _excluded$
|
|
6514
|
+
var _excluded$y = ["children", "intent", "allowFontScaling"];
|
|
6477
6515
|
var Label = function Label(_ref) {
|
|
6478
6516
|
var children = _ref.children,
|
|
6479
6517
|
_ref$intent = _ref.intent,
|
|
6480
6518
|
intent = _ref$intent === void 0 ? 'body' : _ref$intent,
|
|
6481
6519
|
_ref$allowFontScaling = _ref.allowFontScaling,
|
|
6482
6520
|
allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
|
|
6483
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
6484
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledLabel$
|
|
6521
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$y);
|
|
6522
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledLabel$2, _extends$1({}, nativeProps, {
|
|
6485
6523
|
themeIntent: intent,
|
|
6486
6524
|
allowFontScaling: allowFontScaling
|
|
6487
6525
|
}), children);
|
|
@@ -6501,7 +6539,7 @@ var StyledTitle$1 = index$a(reactNative.Text)(function (_ref) {
|
|
|
6501
6539
|
};
|
|
6502
6540
|
});
|
|
6503
6541
|
|
|
6504
|
-
var _excluded$
|
|
6542
|
+
var _excluded$x = ["children", "intent", "allowFontScaling", "level", "typeface"];
|
|
6505
6543
|
var Title = function Title(_ref) {
|
|
6506
6544
|
var children = _ref.children,
|
|
6507
6545
|
_ref$intent = _ref.intent,
|
|
@@ -6512,7 +6550,7 @@ var Title = function Title(_ref) {
|
|
|
6512
6550
|
level = _ref$level === void 0 ? 'h1' : _ref$level,
|
|
6513
6551
|
_ref$typeface = _ref.typeface,
|
|
6514
6552
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
6515
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
6553
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$x);
|
|
6516
6554
|
return /*#__PURE__*/React__default["default"].createElement(StyledTitle$1, _extends$1({}, nativeProps, {
|
|
6517
6555
|
themeLevel: level,
|
|
6518
6556
|
themeTypeface: typeface,
|
|
@@ -6547,7 +6585,7 @@ var StyledBody = index$a(reactNative.Text)(function (_ref) {
|
|
|
6547
6585
|
};
|
|
6548
6586
|
});
|
|
6549
6587
|
|
|
6550
|
-
var _excluded$
|
|
6588
|
+
var _excluded$w = ["children", "intent", "allowFontScaling", "typeface", "variant"];
|
|
6551
6589
|
var Body = function Body(_ref) {
|
|
6552
6590
|
var children = _ref.children,
|
|
6553
6591
|
_ref$intent = _ref.intent,
|
|
@@ -6558,7 +6596,7 @@ var Body = function Body(_ref) {
|
|
|
6558
6596
|
typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
|
|
6559
6597
|
_ref$variant = _ref.variant,
|
|
6560
6598
|
variant = _ref$variant === void 0 ? 'regular' : _ref$variant,
|
|
6561
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
6599
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$w);
|
|
6562
6600
|
return /*#__PURE__*/React__default["default"].createElement(StyledBody, _extends$1({}, nativeProps, {
|
|
6563
6601
|
themeTypeface: typeface,
|
|
6564
6602
|
themeIntent: intent,
|
|
@@ -6576,7 +6614,7 @@ var Typography = {
|
|
|
6576
6614
|
};
|
|
6577
6615
|
|
|
6578
6616
|
// 🔴 DO NOT EDIT — This file is generated automatically.
|
|
6579
|
-
var IconList = ['activate', 'add-emoji', 'add-person', 'adjustment', 'alignment', 'antenna', 'archive', 'assignment-warning', 'bank', 'bell', 'billing', 'bolt', 'bookmark-added', 'bookmark', 'box-check', 'box', 'bpay', 'buildings', 'cake', 'calendar-clock', 'calendar', 'candy-box-menu', 'caret-down-small', 'caret-down', 'caret-left-small', 'caret-left', 'caret-right-small', 'caret-right', 'caret-up-small', 'caret-up', 'check-radio', 'circle-add', 'circle-cancel', 'circle-check', 'circle-down', 'circle-info', 'circle-left', 'circle-ok', 'circle-pencil', 'circle-question', 'circle-remove', 'circle-right', 'circle-up', 'circle-warning', 'clock-3', 'clock', 'cloud-download', 'cloud-upload', 'cog', 'coin', 'contacts', 'credit-card', 'diamond', 'direction-arrows', 'directory', 'document', 'dollar-coin-shine', 'double-buildings', 'edit-template', 'envelope', 'exclude', 'expense', 'eye-circle', 'eye-invisible', 'eye', 'face-meh', 'face-sad', 'face-smiley', 'feed', 'feedbacks', 'file-certified', 'file-clone', 'file-copy', 'file-csv', 'file-dispose', 'file-doc', 'file-excel', 'file-export', 'file-lock', 'file-pdf', 'file-powerpoint', 'file-search', 'file-secured', 'file-sheets', 'file-slide', 'file-verified', 'file-word', 'file', 'filter', 'folder-user', 'folder', 'format-bold', 'format-heading1', 'format-heading2', 'format-italic', 'format-list-bulleted', 'format-list-numbered', 'format-underlined', 'funnel-filter', 'global-dollar', 'globe', 'graduation-cap', 'graph', 'happy-sun', 'health-bag', 'heart', 'home', 'image', 'import', 'incident-siren', 'instapay', 'list', 'loading-2', 'loading', 'location', 'lock', 'looks-one', 'looks-two', 'media-content', 'menu', 'money-notes', 'moneybag', 'moon', 'multiple-stars', 'multiple-users', 'node', 'open-folder', 'paperclip', 'payment-summary', 'pencil', 'phone', 'piggy-bank', 'plane-up', 'plane', 'play-circle', 'print', 'raising-hands', 'reply-arrow', 'reply', 'reschedule', 'rostering', 'save', 'schedule-send', 'schedule', 'search-person', 'send', 'speaker-active', 'speaker', 'star-award', 'star-badge', 'star-circle', 'star-medal', 'star', 'steps-circle', 'stopwatch', 'suitcase', 'surfing', 'survey', 'swag-pillar-benefit', 'swag-pillar-career', 'swag-pillar-money', 'swag-pillar-work', 'swag', 'switch', 'tag', 'target', 'teams', 'timesheet', 'touch-id', 'trash-bin', 'unlock', 'user', 'video-1', 'video-2', 'wallet', 'warning', 'activate-outlined', 'add-credit-card-outlined', 'add-person-outlined', 'add-section-outlined', 'add-time-outlined', 'add', 'adjustment-outlined', 'ai-outlined', 'alignment-2-outlined', 'alignment-outlined', 'all-caps', 'arrow-down', 'arrow-downwards', 'arrow-left', 'arrow-leftwards', 'arrow-right', 'arrow-rightwards', 'arrow-up', 'arrow-upwards', 'article-outlined', 'at-sign', 'auto-graph-outlined', 'beer-outlined', 'bell-active-outlined', 'bell-outlined', 'bell-slash-outlined', 'billing-outlined', 'body-outlined', 'bold', 'bolt-outlined', 'book-outlined', 'bookmark-added-outlined', 'bookmark-outlined', 'box-check-outlined', 'box-outlined', 'bullet-points', 'cake-outlined', 'calendar-dates-outlined', 'calendar-star-outlined', 'call-outlined', 'call-split-outlined', 'camera-outlined', 'cancel', 'car-forward-outlined', 'charging-station-outlined', 'chat-bubble-outlined', 'chat-unread-outlined', 'checkmark', 'circle-add-outlined', 'circle-cancel-outlined', 'circle-down-outlined', 'circle-info-outlined', 'circle-left-outlined', 'circle-ok-outlined', 'circle-question-outlined', 'circle-remove-outlined', 'circle-right-outlined', 'circle-up-outlined', 'circle-warning-outlined', 'clock-2-outlined', 'clock-outlined', 'cog-outlined', 'coin-outlined', 'coin-super-outlined', 'comment-outlined', 'contacts-outlined', 'contacts-user-outlined', 'credit-card-outlined', 'cup-outlined', 'dentistry-outlined', 'direction-arrows-outlined', 'directory-outlined', 'document-outlined', 'dollar-box-outlined', 'dollar-card-outlined', 'dollar-coin-shine-outlined', 'dollar-credit-card-outlined', 'dollar-sign', 'double-buildings-outlined', 'double-left-arrows', 'double-right-arrows', 'download-box-outlined', 'download-outlined', 'edit-template-outlined', 'email-outlined', 'enter-arrow', 'envelope-outlined', 'expense-outlined', 'explore-outlined', 'extension-outlined', 'external-link', 'eye-invisible-outlined', 'eye-outlined', 'face-id', 'face-meh-outlined', 'face-open-smiley-outlined', 'face-sad-outlined', 'face-smiley-outlined', 'fastfood-outlined', 'feed-outlined', 'file-certified-outlined', 'file-clone-outlined', 'file-copy-outlined', 'file-dispose-outlined', 'file-dollar-certified-outlined', 'file-dollar-outlined', 'file-download-outlined', 'file-export-outlined', 'file-lock-outlined', 'file-outlined', 'file-search-outlined', 'file-secured-outlined', 'file-statutory-outlined', 'file-verified-outlined', 'filter-outlined', 'folder-outlined', 'folder-user-outlined', 'form-outlined', 'funnel-filter-outline', 'graph-outlined', 'hand-holding-user-outlined', 'happy-sun-outlined', 'health-bag-outlined', 'heart-outlined', 'home-active-outlined', 'home-outlined', 'id-card-outlined', 'image-outlined', 'import-outlined', 'instapay-outlined', 'italic', 'link-1', 'link-2', 'list-outlined', 'live-help-outlined', 'location-on-outlined', 'location-outlined', 'lock-outlined', 'locked-file-outlined', 'log-out', 'mail-outlined', 'media-content-outlined', 'menu-close', 'menu-expand', 'menu-fold-outlined', 'menu-unfold-outlined', 'moneybag-outlined', 'moon-outlined', 'more-horizontal', 'more-vertical', 'multiple-folders-outlined', 'multiple-users-outlined', 'near-me-outlined', 'node-outlined', 'number-points', 'number', 'overview-outlined', 'payment-summary-outlined', 'payslip-outlined', 'pencil-outlined', 'percentage', 'phone-outlined', 'piggy-bank-outlined', 'plane-outlined', 'play-circle-outlined', 'print-outlined', 'propane-tank-outlined', 'qr-code-outlined', 'qualification-outlined', 're-assign', 'redeem', 'refresh', 'remove', 'reply-outlined', 'restart', 'return-arrow', 'rostering-outlined', 'save-outlined', 'schedule-outlined', 'search-outlined', 'search-secured-outlined', 'send-outlined', 'share-1', 'share-2', 'share-outlined', 'show-chart-outlined', 'single-down-arrow', 'single-left-arrow', 'single-right-arrow', 'single-up-arrow', 'sparkle-outlined', 'speaker-active-outlined', 'speaker-outlined', 'star-circle-outlined', 'star-outlined', 'stopwatch-outlined', 'strikethrough', 'styler-outlined', 'suitcase-clock-outlined', 'suitcase-outlined', 'survey-outlined', 'switch-outlined', 'sync', 'tag-outlined', 'target-outlined', 'tennis-outlined', 'ticket-outlined', 'timesheet-outlined', 'today-outlined', 'transfer', 'trash-bin-outlined', 'umbrela-outlined', 'unavailable', 'underline', 'union-outlined', 'unlock-outlined', 'upload-outlined', 'user-circle-outlined', 'user-gear-outlined', 'user-outlined', 'user-rectangle-outlined', 'video-1-outlined', 'video-2-outlined', 'volunteer-outlined', 'wallet-outlined'];
|
|
6617
|
+
var IconList = ['activate', 'add-emoji', 'add-person', 'adjustment', 'alignment', 'antenna', 'archive', 'assignment-warning', 'bank', 'bell', 'billing', 'bolt', 'bookmark-added', 'bookmark', 'box-check', 'box', 'bpay', 'buildings', 'cake', 'calendar-clock', 'calendar', 'candy-box-menu', 'caret-down-small', 'caret-down', 'caret-left-small', 'caret-left', 'caret-right-small', 'caret-right', 'caret-up-small', 'caret-up', 'check-radio', 'circle-add', 'circle-cancel', 'circle-check', 'circle-down', 'circle-info', 'circle-left', 'circle-ok', 'circle-pencil', 'circle-question', 'circle-remove', 'circle-right', 'circle-up', 'circle-warning', 'clock-3', 'clock', 'cloud-download', 'cloud-upload', 'cog', 'coin', 'contacts', 'credit-card', 'diamond', 'direction-arrows', 'directory', 'document', 'dollar-coin-shine', 'double-buildings', 'edit-template', 'envelope', 'exclude', 'expense', 'eye-circle', 'eye-invisible', 'eye', 'face-meh', 'face-sad', 'face-smiley', 'feed', 'feedbacks', 'file-certified', 'file-clone', 'file-copy', 'file-csv', 'file-dispose', 'file-doc', 'file-excel', 'file-export', 'file-lock', 'file-pdf', 'file-powerpoint', 'file-search', 'file-secured', 'file-sheets', 'file-slide', 'file-verified', 'file-word', 'file', 'filter', 'folder-user', 'folder', 'format-bold', 'format-heading1', 'format-heading2', 'format-italic', 'format-list-bulleted', 'format-list-numbered', 'format-underlined', 'funnel-filter', 'global-dollar', 'globe', 'graduation-cap', 'graph', 'happy-sun', 'health-bag', 'heart', 'home', 'image', 'import', 'incident-siren', 'instapay', 'list', 'loading-2', 'loading', 'location', 'lock', 'looks-one', 'looks-two', 'media-content', 'menu', 'money-notes', 'moneybag', 'moon', 'multiple-stars', 'multiple-users', 'node', 'open-folder', 'paperclip', 'payment-summary', 'pencil', 'phone', 'piggy-bank', 'plane-up', 'plane', 'play-circle', 'print', 'raising-hands', 'reply-arrow', 'reply', 'reschedule', 'rostering', 'save', 'schedule-send', 'schedule', 'search-person', 'send', 'speaker-active', 'speaker', 'star-award', 'star-badge', 'star-circle', 'star-medal', 'star', 'steps-circle', 'stopwatch', 'suitcase', 'surfing', 'survey', 'swag-pillar-benefit', 'swag-pillar-career', 'swag-pillar-money', 'swag-pillar-work', 'swag', 'switch', 'tag', 'target', 'teams', 'timesheet', 'touch-id', 'trash-bin', 'unlock', 'user', 'video-1', 'video-2', 'wallet', 'warning', 'activate-outlined', 'add-credit-card-outlined', 'add-person-outlined', 'add-section-outlined', 'add-time-outlined', 'add', 'adjustment-outlined', 'ai-outlined', 'alignment-2-outlined', 'alignment-outlined', 'all-caps', 'arrow-down', 'arrow-downwards', 'arrow-left', 'arrow-leftwards', 'arrow-right', 'arrow-rightwards', 'arrow-up', 'arrow-upwards', 'article-outlined', 'at-sign', 'auto-graph-outlined', 'beer-outlined', 'bell-active-outlined', 'bell-outlined', 'bell-slash-outlined', 'billing-outlined', 'body-outlined', 'bold', 'bolt-outlined', 'book-outlined', 'bookmark-added-outlined', 'bookmark-outlined', 'box-check-outlined', 'box-outlined', 'bullet-points', 'cake-outlined', 'calendar-dates-outlined', 'calendar-star-outlined', 'call-outlined', 'call-split-outlined', 'camera-outlined', 'cancel', 'car-forward-outlined', 'charging-station-outlined', 'chat-bubble-outlined', 'chat-unread-outlined', 'checkmark', 'circle-add-outlined', 'circle-cancel-outlined', 'circle-down-outlined', 'circle-info-outlined', 'circle-left-outlined', 'circle-ok-outlined', 'circle-question-outlined', 'circle-remove-outlined', 'circle-right-outlined', 'circle-up-outlined', 'circle-warning-outlined', 'clock-2-outlined', 'clock-outlined', 'cog-outlined', 'coin-outlined', 'coin-super-outlined', 'comment-outlined', 'contacts-outlined', 'contacts-user-outlined', 'credit-card-outlined', 'cup-outlined', 'dentistry-outlined', 'direction-arrows-outlined', 'directory-outlined', 'document-outlined', 'dollar-box-outlined', 'dollar-card-outlined', 'dollar-coin-shine-outlined', 'dollar-credit-card-outlined', 'dollar-sign', 'double-buildings-outlined', 'double-left-arrows', 'double-right-arrows', 'download-box-outlined', 'download-outlined', 'edit-template-outlined', 'email-outlined', 'enter-arrow', 'envelope-outlined', 'expense-outlined', 'explore-outlined', 'extension-outlined', 'external-link', 'eye-invisible-outlined', 'eye-outlined', 'face-id', 'face-meh-outlined', 'face-open-smiley-outlined', 'face-sad-outlined', 'face-smiley-outlined', 'fastfood-outlined', 'feed-outlined', 'file-certified-outlined', 'file-clone-outlined', 'file-copy-outlined', 'file-dispose-outlined', 'file-dollar-certified-outlined', 'file-dollar-outlined', 'file-download-outlined', 'file-export-outlined', 'file-lock-outlined', 'file-outlined', 'file-search-outlined', 'file-secured-outlined', 'file-statutory-outlined', 'file-verified-outlined', 'filter-outlined', 'folder-outlined', 'folder-user-outlined', 'form-outlined', 'funnel-filter-outline', 'goal-outlined', 'graph-outlined', 'hand-holding-user-outlined', 'happy-sun-outlined', 'health-bag-outlined', 'heart-outlined', 'home-active-outlined', 'home-outlined', 'id-card-outlined', 'image-outlined', 'import-outlined', 'instapay-outlined', 'italic', 'link-1', 'link-2', 'list-outlined', 'live-help-outlined', 'location-on-outlined', 'location-outlined', 'lock-outlined', 'locked-file-outlined', 'log-out', 'mail-outlined', 'media-content-outlined', 'menu-close', 'menu-expand', 'menu-fold-outlined', 'menu-unfold-outlined', 'moneybag-outlined', 'moon-outlined', 'more-horizontal', 'more-vertical', 'multiple-folders-outlined', 'multiple-users-outlined', 'near-me-outlined', 'node-outlined', 'number-points', 'number', 'overview-outlined', 'payment-summary-outlined', 'payslip-outlined', 'pencil-outlined', 'percentage', 'phone-outlined', 'piggy-bank-outlined', 'plane-outlined', 'play-circle-outlined', 'print-outlined', 'propane-tank-outlined', 'qr-code-outlined', 'qualification-outlined', 're-assign', 'redeem', 'refresh', 'remove', 'reply-outlined', 'restart', 'return-arrow', 'rostering-outlined', 'save-outlined', 'schedule-outlined', 'search-outlined', 'search-secured-outlined', 'send-outlined', 'share-1', 'share-2', 'share-outlined', 'show-chart-outlined', 'single-down-arrow', 'single-left-arrow', 'single-right-arrow', 'single-up-arrow', 'sparkle-outlined', 'speaker-active-outlined', 'speaker-outlined', 'star-circle-outlined', 'star-outlined', 'stopwatch-outlined', 'strikethrough', 'styler-outlined', 'suitcase-clock-outlined', 'suitcase-outlined', 'survey-outlined', 'switch-outlined', 'sync', 'tag-outlined', 'target-outlined', 'tennis-outlined', 'ticket-outlined', 'timesheet-outlined', 'today-outlined', 'transfer', 'trash-bin-outlined', 'umbrela-outlined', 'unavailable', 'underline', 'union-outlined', 'unlock-outlined', 'upload-outlined', 'user-circle-outlined', 'user-gear-outlined', 'user-outlined', 'user-rectangle-outlined', 'video-1-outlined', 'video-2-outlined', 'volunteer-outlined', 'wallet-outlined'];
|
|
6580
6618
|
|
|
6581
6619
|
var activate = 59000;
|
|
6582
6620
|
var adjustment = 59003;
|
|
@@ -6653,18 +6691,18 @@ var add = 59181;
|
|
|
6653
6691
|
var bold = 59204;
|
|
6654
6692
|
var cancel = 59218;
|
|
6655
6693
|
var checkmark = 59223;
|
|
6656
|
-
var italic =
|
|
6657
|
-
var number =
|
|
6658
|
-
var percentage =
|
|
6659
|
-
var redeem =
|
|
6660
|
-
var refresh =
|
|
6661
|
-
var remove =
|
|
6662
|
-
var restart =
|
|
6663
|
-
var strikethrough =
|
|
6664
|
-
var sync =
|
|
6665
|
-
var transfer =
|
|
6666
|
-
var unavailable =
|
|
6667
|
-
var underline =
|
|
6694
|
+
var italic = 59307;
|
|
6695
|
+
var number = 59332;
|
|
6696
|
+
var percentage = 59337;
|
|
6697
|
+
var redeem = 59347;
|
|
6698
|
+
var refresh = 59348;
|
|
6699
|
+
var remove = 59349;
|
|
6700
|
+
var restart = 59351;
|
|
6701
|
+
var strikethrough = 59373;
|
|
6702
|
+
var sync = 59379;
|
|
6703
|
+
var transfer = 59386;
|
|
6704
|
+
var unavailable = 59389;
|
|
6705
|
+
var underline = 59390;
|
|
6668
6706
|
var glyphMap = {
|
|
6669
6707
|
activate: activate,
|
|
6670
6708
|
"add-emoji": 59001,
|
|
@@ -6961,112 +6999,113 @@ var glyphMap = {
|
|
|
6961
6999
|
"folder-user-outlined": 59292,
|
|
6962
7000
|
"form-outlined": 59293,
|
|
6963
7001
|
"funnel-filter-outline": 59294,
|
|
6964
|
-
"
|
|
6965
|
-
"
|
|
6966
|
-
"
|
|
6967
|
-
"
|
|
6968
|
-
"
|
|
6969
|
-
"
|
|
6970
|
-
"home-outlined": 59301,
|
|
6971
|
-
"
|
|
6972
|
-
"
|
|
6973
|
-
"
|
|
6974
|
-
"
|
|
7002
|
+
"goal-outlined": 59295,
|
|
7003
|
+
"graph-outlined": 59296,
|
|
7004
|
+
"hand-holding-user-outlined": 59297,
|
|
7005
|
+
"happy-sun-outlined": 59298,
|
|
7006
|
+
"health-bag-outlined": 59299,
|
|
7007
|
+
"heart-outlined": 59300,
|
|
7008
|
+
"home-active-outlined": 59301,
|
|
7009
|
+
"home-outlined": 59302,
|
|
7010
|
+
"id-card-outlined": 59303,
|
|
7011
|
+
"image-outlined": 59304,
|
|
7012
|
+
"import-outlined": 59305,
|
|
7013
|
+
"instapay-outlined": 59306,
|
|
6975
7014
|
italic: italic,
|
|
6976
|
-
"link-1":
|
|
6977
|
-
"link-2":
|
|
6978
|
-
"list-outlined":
|
|
6979
|
-
"live-help-outlined":
|
|
6980
|
-
"location-on-outlined":
|
|
6981
|
-
"location-outlined":
|
|
6982
|
-
"lock-outlined":
|
|
6983
|
-
"locked-file-outlined":
|
|
6984
|
-
"log-out":
|
|
6985
|
-
"mail-outlined":
|
|
6986
|
-
"media-content-outlined":
|
|
6987
|
-
"menu-close":
|
|
6988
|
-
"menu-expand":
|
|
6989
|
-
"menu-fold-outlined":
|
|
6990
|
-
"menu-unfold-outlined":
|
|
6991
|
-
"moneybag-outlined":
|
|
6992
|
-
"moon-outlined":
|
|
6993
|
-
"more-horizontal":
|
|
6994
|
-
"more-vertical":
|
|
6995
|
-
"multiple-folders-outlined":
|
|
6996
|
-
"multiple-users-outlined":
|
|
6997
|
-
"near-me-outlined":
|
|
6998
|
-
"node-outlined":
|
|
6999
|
-
"number-points":
|
|
7015
|
+
"link-1": 59308,
|
|
7016
|
+
"link-2": 59309,
|
|
7017
|
+
"list-outlined": 59310,
|
|
7018
|
+
"live-help-outlined": 59311,
|
|
7019
|
+
"location-on-outlined": 59312,
|
|
7020
|
+
"location-outlined": 59313,
|
|
7021
|
+
"lock-outlined": 59314,
|
|
7022
|
+
"locked-file-outlined": 59315,
|
|
7023
|
+
"log-out": 59316,
|
|
7024
|
+
"mail-outlined": 59317,
|
|
7025
|
+
"media-content-outlined": 59318,
|
|
7026
|
+
"menu-close": 59319,
|
|
7027
|
+
"menu-expand": 59320,
|
|
7028
|
+
"menu-fold-outlined": 59321,
|
|
7029
|
+
"menu-unfold-outlined": 59322,
|
|
7030
|
+
"moneybag-outlined": 59323,
|
|
7031
|
+
"moon-outlined": 59324,
|
|
7032
|
+
"more-horizontal": 59325,
|
|
7033
|
+
"more-vertical": 59326,
|
|
7034
|
+
"multiple-folders-outlined": 59327,
|
|
7035
|
+
"multiple-users-outlined": 59328,
|
|
7036
|
+
"near-me-outlined": 59329,
|
|
7037
|
+
"node-outlined": 59330,
|
|
7038
|
+
"number-points": 59331,
|
|
7000
7039
|
number: number,
|
|
7001
|
-
"overview-outlined":
|
|
7002
|
-
"payment-summary-outlined":
|
|
7003
|
-
"payslip-outlined":
|
|
7004
|
-
"pencil-outlined":
|
|
7040
|
+
"overview-outlined": 59333,
|
|
7041
|
+
"payment-summary-outlined": 59334,
|
|
7042
|
+
"payslip-outlined": 59335,
|
|
7043
|
+
"pencil-outlined": 59336,
|
|
7005
7044
|
percentage: percentage,
|
|
7006
|
-
"phone-outlined":
|
|
7007
|
-
"piggy-bank-outlined":
|
|
7008
|
-
"plane-outlined":
|
|
7009
|
-
"play-circle-outlined":
|
|
7010
|
-
"print-outlined":
|
|
7011
|
-
"propane-tank-outlined":
|
|
7012
|
-
"qr-code-outlined":
|
|
7013
|
-
"qualification-outlined":
|
|
7014
|
-
"re-assign":
|
|
7045
|
+
"phone-outlined": 59338,
|
|
7046
|
+
"piggy-bank-outlined": 59339,
|
|
7047
|
+
"plane-outlined": 59340,
|
|
7048
|
+
"play-circle-outlined": 59341,
|
|
7049
|
+
"print-outlined": 59342,
|
|
7050
|
+
"propane-tank-outlined": 59343,
|
|
7051
|
+
"qr-code-outlined": 59344,
|
|
7052
|
+
"qualification-outlined": 59345,
|
|
7053
|
+
"re-assign": 59346,
|
|
7015
7054
|
redeem: redeem,
|
|
7016
7055
|
refresh: refresh,
|
|
7017
7056
|
remove: remove,
|
|
7018
|
-
"reply-outlined":
|
|
7057
|
+
"reply-outlined": 59350,
|
|
7019
7058
|
restart: restart,
|
|
7020
|
-
"return-arrow":
|
|
7021
|
-
"rostering-outlined":
|
|
7022
|
-
"save-outlined":
|
|
7023
|
-
"schedule-outlined":
|
|
7024
|
-
"search-outlined":
|
|
7025
|
-
"search-secured-outlined":
|
|
7026
|
-
"send-outlined":
|
|
7027
|
-
"share-1":
|
|
7028
|
-
"share-2":
|
|
7029
|
-
"share-outlined":
|
|
7030
|
-
"show-chart-outlined":
|
|
7031
|
-
"single-down-arrow":
|
|
7032
|
-
"single-left-arrow":
|
|
7033
|
-
"single-right-arrow":
|
|
7034
|
-
"single-up-arrow":
|
|
7035
|
-
"sparkle-outlined":
|
|
7036
|
-
"speaker-active-outlined":
|
|
7037
|
-
"speaker-outlined":
|
|
7038
|
-
"star-circle-outlined":
|
|
7039
|
-
"star-outlined":
|
|
7040
|
-
"stopwatch-outlined":
|
|
7059
|
+
"return-arrow": 59352,
|
|
7060
|
+
"rostering-outlined": 59353,
|
|
7061
|
+
"save-outlined": 59354,
|
|
7062
|
+
"schedule-outlined": 59355,
|
|
7063
|
+
"search-outlined": 59356,
|
|
7064
|
+
"search-secured-outlined": 59357,
|
|
7065
|
+
"send-outlined": 59358,
|
|
7066
|
+
"share-1": 59359,
|
|
7067
|
+
"share-2": 59360,
|
|
7068
|
+
"share-outlined": 59361,
|
|
7069
|
+
"show-chart-outlined": 59362,
|
|
7070
|
+
"single-down-arrow": 59363,
|
|
7071
|
+
"single-left-arrow": 59364,
|
|
7072
|
+
"single-right-arrow": 59365,
|
|
7073
|
+
"single-up-arrow": 59366,
|
|
7074
|
+
"sparkle-outlined": 59367,
|
|
7075
|
+
"speaker-active-outlined": 59368,
|
|
7076
|
+
"speaker-outlined": 59369,
|
|
7077
|
+
"star-circle-outlined": 59370,
|
|
7078
|
+
"star-outlined": 59371,
|
|
7079
|
+
"stopwatch-outlined": 59372,
|
|
7041
7080
|
strikethrough: strikethrough,
|
|
7042
|
-
"styler-outlined":
|
|
7043
|
-
"suitcase-clock-outlined":
|
|
7044
|
-
"suitcase-outlined":
|
|
7045
|
-
"survey-outlined":
|
|
7046
|
-
"switch-outlined":
|
|
7081
|
+
"styler-outlined": 59374,
|
|
7082
|
+
"suitcase-clock-outlined": 59375,
|
|
7083
|
+
"suitcase-outlined": 59376,
|
|
7084
|
+
"survey-outlined": 59377,
|
|
7085
|
+
"switch-outlined": 59378,
|
|
7047
7086
|
sync: sync,
|
|
7048
|
-
"tag-outlined":
|
|
7049
|
-
"target-outlined":
|
|
7050
|
-
"tennis-outlined":
|
|
7051
|
-
"ticket-outlined":
|
|
7052
|
-
"timesheet-outlined":
|
|
7053
|
-
"today-outlined":
|
|
7087
|
+
"tag-outlined": 59380,
|
|
7088
|
+
"target-outlined": 59381,
|
|
7089
|
+
"tennis-outlined": 59382,
|
|
7090
|
+
"ticket-outlined": 59383,
|
|
7091
|
+
"timesheet-outlined": 59384,
|
|
7092
|
+
"today-outlined": 59385,
|
|
7054
7093
|
transfer: transfer,
|
|
7055
|
-
"trash-bin-outlined":
|
|
7056
|
-
"umbrela-outlined":
|
|
7094
|
+
"trash-bin-outlined": 59387,
|
|
7095
|
+
"umbrela-outlined": 59388,
|
|
7057
7096
|
unavailable: unavailable,
|
|
7058
7097
|
underline: underline,
|
|
7059
|
-
"union-outlined":
|
|
7060
|
-
"unlock-outlined":
|
|
7061
|
-
"upload-outlined":
|
|
7062
|
-
"user-circle-outlined":
|
|
7063
|
-
"user-gear-outlined":
|
|
7064
|
-
"user-outlined":
|
|
7065
|
-
"user-rectangle-outlined":
|
|
7066
|
-
"video-1-outlined":
|
|
7067
|
-
"video-2-outlined":
|
|
7068
|
-
"volunteer-outlined":
|
|
7069
|
-
"wallet-outlined":
|
|
7098
|
+
"union-outlined": 59391,
|
|
7099
|
+
"unlock-outlined": 59392,
|
|
7100
|
+
"upload-outlined": 59393,
|
|
7101
|
+
"user-circle-outlined": 59394,
|
|
7102
|
+
"user-gear-outlined": 59395,
|
|
7103
|
+
"user-outlined": 59396,
|
|
7104
|
+
"user-rectangle-outlined": 59397,
|
|
7105
|
+
"video-1-outlined": 59398,
|
|
7106
|
+
"video-2-outlined": 59399,
|
|
7107
|
+
"volunteer-outlined": 59400,
|
|
7108
|
+
"wallet-outlined": 59401
|
|
7070
7109
|
};
|
|
7071
7110
|
|
|
7072
7111
|
var HeroIcon = reactNativeVectorIcons.createIconSet(glyphMap, 'hero-icons-mobile', 'hero-icons-mobile.ttf');
|
|
@@ -7091,10 +7130,10 @@ var StyledHeroIcon = index$a(HeroIcon)(function (_ref) {
|
|
|
7091
7130
|
};
|
|
7092
7131
|
});
|
|
7093
7132
|
|
|
7094
|
-
var _excluded$
|
|
7133
|
+
var _excluded$v = ["style"];
|
|
7095
7134
|
var AnimatedIcon = function AnimatedIcon(_ref) {
|
|
7096
7135
|
var style = _ref.style,
|
|
7097
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
7136
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$v);
|
|
7098
7137
|
var rotateAnimation = React.useRef(new reactNative.Animated.Value(0));
|
|
7099
7138
|
React.useEffect(function () {
|
|
7100
7139
|
var animation = reactNative.Animated.loop(reactNative.Animated.timing(rotateAnimation.current, {
|
|
@@ -7199,7 +7238,7 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
7199
7238
|
}, content));
|
|
7200
7239
|
};
|
|
7201
7240
|
|
|
7202
|
-
var _excluded$
|
|
7241
|
+
var _excluded$u = ["key"];
|
|
7203
7242
|
var Accordion = function Accordion(_ref) {
|
|
7204
7243
|
var items = _ref.items,
|
|
7205
7244
|
activeItemKey = _ref.activeItemKey,
|
|
@@ -7220,7 +7259,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
7220
7259
|
testID: testID
|
|
7221
7260
|
}, items.map(function (_ref2, index) {
|
|
7222
7261
|
var key = _ref2.key,
|
|
7223
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
7262
|
+
props = _objectWithoutProperties(_ref2, _excluded$u);
|
|
7224
7263
|
var open = _activeItemKey === key;
|
|
7225
7264
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
7226
7265
|
key: key
|
|
@@ -7618,7 +7657,7 @@ var StyledStatus = index$a(reactNative.Animated.View)(function (_ref3) {
|
|
|
7618
7657
|
};
|
|
7619
7658
|
});
|
|
7620
7659
|
|
|
7621
|
-
var _excluded$
|
|
7660
|
+
var _excluded$t = ["children", "visible", "intent", "style", "testID"];
|
|
7622
7661
|
var Status = function Status(_ref) {
|
|
7623
7662
|
var children = _ref.children,
|
|
7624
7663
|
_ref$visible = _ref.visible,
|
|
@@ -7627,7 +7666,7 @@ var Status = function Status(_ref) {
|
|
|
7627
7666
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
7628
7667
|
style = _ref.style,
|
|
7629
7668
|
testID = _ref.testID,
|
|
7630
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7669
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$t);
|
|
7631
7670
|
var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
7632
7671
|
opacity = _React$useRef.current;
|
|
7633
7672
|
var isFirstRendering = React__default["default"].useRef(true);
|
|
@@ -7660,7 +7699,7 @@ var Status = function Status(_ref) {
|
|
|
7660
7699
|
}));
|
|
7661
7700
|
};
|
|
7662
7701
|
|
|
7663
|
-
var _excluded$
|
|
7702
|
+
var _excluded$s = ["content", "visible", "max", "intent", "style", "testID"];
|
|
7664
7703
|
var DEFAULT_MAX_NUMBER = 99;
|
|
7665
7704
|
var getPaddingState = function getPaddingState(content) {
|
|
7666
7705
|
return content.length > 1 ? 'wideContent' : 'narrowContent';
|
|
@@ -7675,7 +7714,7 @@ var Badge = function Badge(_ref) {
|
|
|
7675
7714
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
7676
7715
|
style = _ref.style,
|
|
7677
7716
|
testID = _ref.testID,
|
|
7678
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7717
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$s);
|
|
7679
7718
|
var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
|
|
7680
7719
|
opacity = _React$useRef.current;
|
|
7681
7720
|
var isFirstRendering = React__default["default"].useRef(true);
|
|
@@ -7779,7 +7818,7 @@ function omit(keys, obj) {
|
|
|
7779
7818
|
return result;
|
|
7780
7819
|
}
|
|
7781
7820
|
|
|
7782
|
-
var _excluded$
|
|
7821
|
+
var _excluded$r = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
|
|
7783
7822
|
var getInactiveIcon = function getInactiveIcon(icon) {
|
|
7784
7823
|
var inactiveIcon = "".concat(icon, "-outlined");
|
|
7785
7824
|
return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
|
|
@@ -7790,7 +7829,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
7790
7829
|
renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
|
|
7791
7830
|
selectedTabKey = _ref.selectedTabKey,
|
|
7792
7831
|
tabs = _ref.tabs,
|
|
7793
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7832
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
7794
7833
|
useDeprecation('BottomNavigation is deprecated and will be removed in the next major release. Please remove it.');
|
|
7795
7834
|
var insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
7796
7835
|
/**
|
|
@@ -7877,13 +7916,13 @@ var StyledDivider = index$a(reactNative.View)(function (_ref) {
|
|
|
7877
7916
|
}, horizontalMargin), verticalMargin);
|
|
7878
7917
|
});
|
|
7879
7918
|
|
|
7880
|
-
var _excluded$
|
|
7919
|
+
var _excluded$q = ["marginHorizontal", "marginVertical", "style", "testID"];
|
|
7881
7920
|
var Divider = function Divider(_ref) {
|
|
7882
7921
|
var marginHorizontal = _ref.marginHorizontal,
|
|
7883
7922
|
marginVertical = _ref.marginVertical,
|
|
7884
7923
|
style = _ref.style,
|
|
7885
7924
|
testID = _ref.testID,
|
|
7886
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
7925
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$q);
|
|
7887
7926
|
return /*#__PURE__*/React__default["default"].createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
7888
7927
|
themeMarginHorizontal: marginHorizontal,
|
|
7889
7928
|
themeMarginVertical: marginVertical,
|
|
@@ -7947,7 +7986,7 @@ var StyledFooter = index$a(reactNative.View)(function (_ref4) {
|
|
|
7947
7986
|
flexDirection: 'row'
|
|
7948
7987
|
};
|
|
7949
7988
|
});
|
|
7950
|
-
var StyledIconWrapper$
|
|
7989
|
+
var StyledIconWrapper$4 = index$a(reactNative.View)(function (_ref5) {
|
|
7951
7990
|
var theme = _ref5.theme;
|
|
7952
7991
|
return {
|
|
7953
7992
|
alignItems: 'center',
|
|
@@ -7969,20 +8008,16 @@ var genLoadingIndicatorStyles = function genLoadingIndicatorStyles(theme, intent
|
|
|
7969
8008
|
backgroundColor: theme.__hd__.button.colors[intent]
|
|
7970
8009
|
};
|
|
7971
8010
|
};
|
|
7972
|
-
var StyledLoadingIndicatorWrapper = index$a(reactNative.View)(
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
justifyContent: 'center',
|
|
7977
|
-
alignItems: 'center',
|
|
7978
|
-
paddingVertical: theme.__hd__.button.space.loadingIndicatorWrapperVerticalPadding
|
|
7979
|
-
};
|
|
8011
|
+
var StyledLoadingIndicatorWrapper = index$a(reactNative.View)({
|
|
8012
|
+
flexDirection: 'row',
|
|
8013
|
+
justifyContent: 'center',
|
|
8014
|
+
alignItems: 'center'
|
|
7980
8015
|
});
|
|
7981
|
-
var StyledLoadingDot = index$a(reactNative.View)(function (
|
|
7982
|
-
var
|
|
7983
|
-
size =
|
|
7984
|
-
themeVariant =
|
|
7985
|
-
theme =
|
|
8016
|
+
var StyledLoadingDot = index$a(reactNative.View)(function (_ref) {
|
|
8017
|
+
var _ref$size = _ref.size,
|
|
8018
|
+
size = _ref$size === void 0 ? 12 : _ref$size,
|
|
8019
|
+
themeVariant = _ref.themeVariant,
|
|
8020
|
+
theme = _ref.theme;
|
|
7986
8021
|
var themeStyling = function themeStyling() {
|
|
7987
8022
|
switch (themeVariant) {
|
|
7988
8023
|
case 'basic-transparent':
|
|
@@ -8006,14 +8041,12 @@ var StyledLoadingDot = index$a(reactNative.View)(function (_ref2) {
|
|
|
8006
8041
|
return _objectSpread2({
|
|
8007
8042
|
width: size,
|
|
8008
8043
|
height: size,
|
|
8009
|
-
marginTop: theme.space.xsmall,
|
|
8010
|
-
marginBottom: theme.space.xsmall,
|
|
8011
8044
|
marginHorizontal: theme.space.small,
|
|
8012
8045
|
borderRadius: theme.space.small
|
|
8013
8046
|
}, themeStyling());
|
|
8014
8047
|
});
|
|
8015
8048
|
|
|
8016
|
-
var _excluded$
|
|
8049
|
+
var _excluded$p = ["count", "size", "testID", "themeVariant"];
|
|
8017
8050
|
var AnimatedLoadingIndicatorWrapper = reactNative.Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
|
|
8018
8051
|
var AnimatedLoadingDot = reactNative.Animated.createAnimatedComponent(StyledLoadingDot);
|
|
8019
8052
|
var renderDotComponent = function renderDotComponent(_ref) {
|
|
@@ -8045,7 +8078,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
8045
8078
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
8046
8079
|
testID = _ref2.testID,
|
|
8047
8080
|
themeVariant = _ref2.themeVariant,
|
|
8048
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
8081
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$p);
|
|
8049
8082
|
var progressAnimation = React.useRef(new reactNative.Animated.Value(0));
|
|
8050
8083
|
React.useEffect(function () {
|
|
8051
8084
|
var animation = reactNative.Animated.loop(reactNative.Animated.timing(progressAnimation.current, {
|
|
@@ -8088,6 +8121,7 @@ var genFilledContainerStyles = function genFilledContainerStyles(theme, intent,
|
|
|
8088
8121
|
};
|
|
8089
8122
|
};
|
|
8090
8123
|
return _objectSpread2({
|
|
8124
|
+
height: scale(60),
|
|
8091
8125
|
flexDirection: 'row',
|
|
8092
8126
|
justifyContent: 'center',
|
|
8093
8127
|
alignItems: 'center',
|
|
@@ -8108,6 +8142,7 @@ var genOutlineContainerStyles = function genOutlineContainerStyles(theme, intent
|
|
|
8108
8142
|
};
|
|
8109
8143
|
};
|
|
8110
8144
|
return _objectSpread2({
|
|
8145
|
+
height: scale(60),
|
|
8111
8146
|
flexDirection: 'row',
|
|
8112
8147
|
justifyContent: 'center',
|
|
8113
8148
|
alignItems: 'center',
|
|
@@ -8162,6 +8197,7 @@ var StyledButtonContainer = index$a(reactNative.TouchableHighlight)(function (_r
|
|
|
8162
8197
|
case 'text-secondary':
|
|
8163
8198
|
case 'text-danger':
|
|
8164
8199
|
return {
|
|
8200
|
+
height: scale(60),
|
|
8165
8201
|
borderRadius: theme.__hd__.button.radii.text,
|
|
8166
8202
|
flexDirection: 'row',
|
|
8167
8203
|
justifyContent: 'center',
|
|
@@ -8475,7 +8511,7 @@ var Header = function Header(_ref) {
|
|
|
8475
8511
|
style: {
|
|
8476
8512
|
flex: 1
|
|
8477
8513
|
}
|
|
8478
|
-
}, content), showCloseButton ? /*#__PURE__*/React__default["default"].createElement(StyledIconWrapper$
|
|
8514
|
+
}, content), showCloseButton ? /*#__PURE__*/React__default["default"].createElement(StyledIconWrapper$4, null, /*#__PURE__*/React__default["default"].createElement(CompoundButton.Icon, {
|
|
8479
8515
|
icon: "cancel",
|
|
8480
8516
|
onPress: onRequestClose,
|
|
8481
8517
|
intent: "text",
|
|
@@ -8484,11 +8520,11 @@ var Header = function Header(_ref) {
|
|
|
8484
8520
|
})) : null), showDivider ? /*#__PURE__*/React__default["default"].createElement(Divider, null) : null);
|
|
8485
8521
|
};
|
|
8486
8522
|
|
|
8487
|
-
var _excluded$
|
|
8523
|
+
var _excluded$o = ["scrollEventThrottle"];
|
|
8488
8524
|
var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
|
|
8489
8525
|
var _ref$scrollEventThrot = _ref.scrollEventThrottle,
|
|
8490
8526
|
scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
|
|
8491
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8527
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
8492
8528
|
var _useContext = React.useContext(BottomSheetContext),
|
|
8493
8529
|
setInternalShowDivider = _useContext.setInternalShowDivider;
|
|
8494
8530
|
var onScrollBeginDrag = React.useCallback(function (e) {
|
|
@@ -8514,445 +8550,119 @@ var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
|
|
|
8514
8550
|
}));
|
|
8515
8551
|
};
|
|
8516
8552
|
|
|
8517
|
-
var
|
|
8518
|
-
var
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
|
|
8553
|
+
var BottomSheet = function BottomSheet(_ref) {
|
|
8554
|
+
var open = _ref.open,
|
|
8555
|
+
header = _ref.header,
|
|
8556
|
+
footer = _ref.footer,
|
|
8557
|
+
children = _ref.children,
|
|
8558
|
+
onAnimationEnd = _ref.onAnimationEnd,
|
|
8559
|
+
onOpen = _ref.onOpen,
|
|
8560
|
+
onRequestClose = _ref.onRequestClose,
|
|
8561
|
+
onDismiss = _ref.onDismiss,
|
|
8562
|
+
_ref$showCloseButton = _ref.showCloseButton,
|
|
8563
|
+
showCloseButton = _ref$showCloseButton === void 0 ? true : _ref$showCloseButton,
|
|
8564
|
+
_ref$hasBackdrop = _ref.hasBackdrop,
|
|
8565
|
+
hasBackdrop = _ref$hasBackdrop === void 0 ? true : _ref$hasBackdrop,
|
|
8566
|
+
_ref$showDivider = _ref.showDivider,
|
|
8567
|
+
showDivider = _ref$showDivider === void 0 ? false : _ref$showDivider,
|
|
8568
|
+
style = _ref.style,
|
|
8569
|
+
testID = _ref.testID,
|
|
8570
|
+
_ref$keyboardAvoiding = _ref.keyboardAvoidingViewProps,
|
|
8571
|
+
keyboardAvoidingViewProps = _ref$keyboardAvoiding === void 0 ? {} : _ref$keyboardAvoiding;
|
|
8572
|
+
var _Dimensions$get = reactNative.Dimensions.get('window'),
|
|
8573
|
+
height = _Dimensions$get.height;
|
|
8574
|
+
// Internal state to control modal open/close timing with animation
|
|
8575
|
+
var _useState = React.useState(open),
|
|
8576
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
8577
|
+
visible = _useState2[0],
|
|
8578
|
+
setVisibility = _useState2[1];
|
|
8579
|
+
var animatedValue = React.useRef(new reactNative.Animated.Value(open ? 0 : 1));
|
|
8580
|
+
var _useState3 = React.useState(showDivider),
|
|
8581
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
8582
|
+
internalShowDivider = _useState4[0],
|
|
8583
|
+
setInternalShowDivider = _useState4[1];
|
|
8584
|
+
React.useEffect(function () {
|
|
8585
|
+
// Show the modal before the open animation start
|
|
8586
|
+
if (open && !visible) {
|
|
8587
|
+
setVisibility(open);
|
|
8525
8588
|
}
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
var
|
|
8531
|
-
(
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
ACTIONS[ACTIONS["REMOVE_PORTAL"] = 3] = "REMOVE_PORTAL";
|
|
8536
|
-
})(ACTIONS || (ACTIONS = {}));
|
|
8537
|
-
var INITIAL_STATE = {};
|
|
8538
|
-
|
|
8539
|
-
var PortalStateContext = /*#__PURE__*/React.createContext(null);
|
|
8540
|
-
var PortalDispatchContext = /*#__PURE__*/React.createContext(null);
|
|
8541
|
-
|
|
8542
|
-
var usePortal = function usePortal() {
|
|
8543
|
-
var hostName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'root';
|
|
8544
|
-
var dispatch = React.useContext(PortalDispatchContext);
|
|
8545
|
-
if (dispatch === null) {
|
|
8546
|
-
throw new Error("You must add 'PortalProvider' to the root component.");
|
|
8547
|
-
}
|
|
8548
|
-
var registerHost = React.useCallback(function () {
|
|
8549
|
-
dispatch({
|
|
8550
|
-
type: ACTIONS.REGISTER_HOST,
|
|
8551
|
-
hostName: hostName
|
|
8552
|
-
});
|
|
8553
|
-
}, []);
|
|
8554
|
-
var deregisterHost = React.useCallback(function () {
|
|
8555
|
-
dispatch({
|
|
8556
|
-
type: ACTIONS.DEREGISTER_HOST,
|
|
8557
|
-
hostName: hostName
|
|
8558
|
-
});
|
|
8559
|
-
}, []);
|
|
8560
|
-
var addUpdatePortal = React.useCallback(function (name, node) {
|
|
8561
|
-
dispatch({
|
|
8562
|
-
type: ACTIONS.ADD_UPDATE_PORTAL,
|
|
8563
|
-
hostName: hostName,
|
|
8564
|
-
portalName: name,
|
|
8565
|
-
node: node
|
|
8566
|
-
});
|
|
8567
|
-
}, []);
|
|
8568
|
-
var removePortal = React.useCallback(function (name) {
|
|
8569
|
-
dispatch({
|
|
8570
|
-
type: ACTIONS.REMOVE_PORTAL,
|
|
8571
|
-
hostName: hostName,
|
|
8572
|
-
portalName: name
|
|
8589
|
+
// Delay closing the modal until after the closing animation end
|
|
8590
|
+
animatedValue.current.removeAllListeners();
|
|
8591
|
+
animatedValue.current.addListener(function (_ref2) {
|
|
8592
|
+
var value = _ref2.value;
|
|
8593
|
+
var endValueOfTransition = open ? 1 : 0;
|
|
8594
|
+
if (endValueOfTransition === 0 && value === endValueOfTransition) {
|
|
8595
|
+
setVisibility(false);
|
|
8596
|
+
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
8597
|
+
}
|
|
8573
8598
|
});
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
updatePortal: addUpdatePortal,
|
|
8580
|
-
removePortal: removePortal
|
|
8581
|
-
};
|
|
8582
|
-
};
|
|
8583
|
-
|
|
8584
|
-
var usePortalState = function usePortalState(hostName) {
|
|
8585
|
-
var state = React.useContext(PortalStateContext);
|
|
8586
|
-
if (state === null) {
|
|
8587
|
-
throw new Error("You must add 'PortalProvider' to the root component.");
|
|
8588
|
-
}
|
|
8589
|
-
return state[hostName] || [];
|
|
8590
|
-
};
|
|
8591
|
-
|
|
8592
|
-
var PortalHostComponent = function PortalHostComponent(_ref) {
|
|
8593
|
-
var name = _ref.name;
|
|
8594
|
-
var state = usePortalState(name);
|
|
8595
|
-
var _usePortal = usePortal(name),
|
|
8596
|
-
registerHost = _usePortal.registerHost,
|
|
8597
|
-
deregisterHost = _usePortal.deregisterHost;
|
|
8599
|
+
return function () {
|
|
8600
|
+
return animatedValue.current.removeAllListeners();
|
|
8601
|
+
};
|
|
8602
|
+
}, [open]);
|
|
8603
|
+
// Animation
|
|
8598
8604
|
React.useEffect(function () {
|
|
8599
|
-
|
|
8605
|
+
var animation = reactNative.Animated.timing(animatedValue.current, {
|
|
8606
|
+
toValue: open ? 1 : 0,
|
|
8607
|
+
easing: reactNative.Easing.inOut(reactNative.Easing.cubic),
|
|
8608
|
+
useNativeDriver: true
|
|
8609
|
+
});
|
|
8610
|
+
animation.start(onAnimationEnd);
|
|
8600
8611
|
return function () {
|
|
8601
|
-
|
|
8612
|
+
return animation.stop();
|
|
8602
8613
|
};
|
|
8603
|
-
}, []);
|
|
8604
|
-
|
|
8605
|
-
|
|
8606
|
-
|
|
8614
|
+
}, [open]);
|
|
8615
|
+
var interpolateY = animatedValue.current.interpolate({
|
|
8616
|
+
inputRange: [0, 1],
|
|
8617
|
+
outputRange: [height, 0]
|
|
8618
|
+
});
|
|
8619
|
+
// Backdrop opacity
|
|
8620
|
+
var interpolateOpacity = hasBackdrop ? animatedValue.current.interpolate({
|
|
8621
|
+
inputRange: [0, 1],
|
|
8622
|
+
outputRange: [0, 0.48]
|
|
8623
|
+
}) : 0;
|
|
8624
|
+
var BottomSheetContextValue = React.useMemo(function () {
|
|
8625
|
+
return {
|
|
8626
|
+
setInternalShowDivider: setInternalShowDivider
|
|
8627
|
+
};
|
|
8628
|
+
}, [setInternalShowDivider]);
|
|
8629
|
+
return /*#__PURE__*/React__default["default"].createElement(reactNative.Modal, {
|
|
8630
|
+
visible: visible,
|
|
8631
|
+
onRequestClose: onRequestClose,
|
|
8632
|
+
transparent: true,
|
|
8633
|
+
testID: testID,
|
|
8634
|
+
onShow: onOpen
|
|
8635
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledWrapper$9, {
|
|
8636
|
+
pointerEvents: "box-none"
|
|
8637
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledKeyboardAvoidingView, _extends$1({
|
|
8638
|
+
behavior: reactNative.Platform.OS === 'ios' ? 'padding' : 'height'
|
|
8639
|
+
}, keyboardAvoidingViewProps), /*#__PURE__*/React__default["default"].createElement(StyledBackdrop$2, {
|
|
8640
|
+
style: {
|
|
8641
|
+
opacity: interpolateOpacity
|
|
8642
|
+
},
|
|
8643
|
+
onPress: onRequestClose
|
|
8644
|
+
}), /*#__PURE__*/React__default["default"].createElement(StyledBottomSheet, {
|
|
8645
|
+
style: [style, {
|
|
8646
|
+
transform: [{
|
|
8647
|
+
scaleY: height > 0 ? 1 : 0
|
|
8648
|
+
}, {
|
|
8649
|
+
translateY: interpolateY
|
|
8650
|
+
}]
|
|
8651
|
+
}]
|
|
8652
|
+
}, header !== undefined ? /*#__PURE__*/React__default["default"].createElement(Header, {
|
|
8653
|
+
content: header,
|
|
8654
|
+
showDivider: internalShowDivider,
|
|
8655
|
+
onRequestClose: onRequestClose,
|
|
8656
|
+
showCloseButton: showCloseButton
|
|
8657
|
+
}) : null, /*#__PURE__*/React__default["default"].createElement(BottomSheetContext.Provider, {
|
|
8658
|
+
value: BottomSheetContextValue
|
|
8659
|
+
}, children), footer ? /*#__PURE__*/React__default["default"].createElement(Footer$1, {
|
|
8660
|
+
showDivider: showDivider
|
|
8661
|
+
}, footer) : null))));
|
|
8607
8662
|
};
|
|
8608
|
-
var
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
var registerHostIfNotExist = function registerHostIfNotExist(state, hostName) {
|
|
8612
|
-
if (!(hostName in state)) {
|
|
8613
|
-
return _objectSpread2(_objectSpread2({}, state), {}, _defineProperty({}, hostName, []));
|
|
8614
|
-
}
|
|
8615
|
-
return _objectSpread2({}, state);
|
|
8616
|
-
};
|
|
8617
|
-
var deregisterHost = function deregisterHost(state, hostName) {
|
|
8618
|
-
return _objectSpread2({}, omit([hostName], state));
|
|
8619
|
-
};
|
|
8620
|
-
var addUpdatePortal = function addUpdatePortal(state, hostName, portalName, node) {
|
|
8621
|
-
var newState = registerHostIfNotExist(state, hostName);
|
|
8622
|
-
var index = newState[hostName].findIndex(function (item) {
|
|
8623
|
-
return item.name === portalName;
|
|
8624
|
-
});
|
|
8625
|
-
if (index !== -1) {
|
|
8626
|
-
return _objectSpread2(_objectSpread2({}, newState), {}, _defineProperty({}, hostName, newState[hostName].map(function (item, i) {
|
|
8627
|
-
if (index === i) {
|
|
8628
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
8629
|
-
node: node
|
|
8630
|
-
});
|
|
8631
|
-
}
|
|
8632
|
-
return item;
|
|
8633
|
-
})));
|
|
8634
|
-
}
|
|
8635
|
-
return _objectSpread2(_objectSpread2({}, newState), {}, _defineProperty({}, hostName, [].concat(_toConsumableArray(newState[hostName]), [{
|
|
8636
|
-
name: portalName,
|
|
8637
|
-
node: node
|
|
8638
|
-
}])));
|
|
8639
|
-
};
|
|
8640
|
-
var removePortal = function removePortal(state, hostName, portalName) {
|
|
8641
|
-
if (!(hostName in state)) {
|
|
8642
|
-
return _objectSpread2({}, state);
|
|
8643
|
-
}
|
|
8644
|
-
return _objectSpread2(_objectSpread2({}, state), {}, _defineProperty({}, hostName, state[hostName].filter(function (item) {
|
|
8645
|
-
return item.name !== portalName;
|
|
8646
|
-
})));
|
|
8647
|
-
};
|
|
8648
|
-
var reducer = function reducer(state, action) {
|
|
8649
|
-
var type = action.type;
|
|
8650
|
-
switch (type) {
|
|
8651
|
-
case ACTIONS.REGISTER_HOST:
|
|
8652
|
-
return registerHostIfNotExist(state, action.hostName);
|
|
8653
|
-
case ACTIONS.DEREGISTER_HOST:
|
|
8654
|
-
return deregisterHost(state, action.hostName);
|
|
8655
|
-
case ACTIONS.ADD_UPDATE_PORTAL:
|
|
8656
|
-
return addUpdatePortal(state, action.hostName, action.portalName, action.node);
|
|
8657
|
-
case ACTIONS.REMOVE_PORTAL:
|
|
8658
|
-
return removePortal(state, action.hostName, action.portalName);
|
|
8659
|
-
default:
|
|
8660
|
-
return _objectSpread2({}, state);
|
|
8661
|
-
}
|
|
8662
|
-
};
|
|
8663
|
-
|
|
8664
|
-
var PortalProviderComponent = function PortalProviderComponent(_ref) {
|
|
8665
|
-
var _ref$rootHostName = _ref.rootHostName,
|
|
8666
|
-
rootHostName = _ref$rootHostName === void 0 ? 'root' : _ref$rootHostName,
|
|
8667
|
-
children = _ref.children;
|
|
8668
|
-
var _useReducer = React.useReducer(reducer, INITIAL_STATE),
|
|
8669
|
-
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
8670
|
-
state = _useReducer2[0],
|
|
8671
|
-
dispatch = _useReducer2[1];
|
|
8672
|
-
return /*#__PURE__*/React__default["default"].createElement(PortalDispatchContext.Provider, {
|
|
8673
|
-
value: dispatch
|
|
8674
|
-
}, /*#__PURE__*/React__default["default"].createElement(PortalStateContext.Provider, {
|
|
8675
|
-
value: state
|
|
8676
|
-
}, children, /*#__PURE__*/React__default["default"].createElement(PortalHost, {
|
|
8677
|
-
name: rootHostName
|
|
8678
|
-
})));
|
|
8679
|
-
};
|
|
8680
|
-
var PortalProvider = /*#__PURE__*/React.memo(PortalProviderComponent);
|
|
8681
|
-
PortalProvider.displayName = 'PortalProvider';
|
|
8682
|
-
|
|
8683
|
-
var nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz0123456789', 10);
|
|
8684
|
-
var PortalComponent = function PortalComponent(_ref) {
|
|
8685
|
-
var name = _ref.name,
|
|
8686
|
-
hostName = _ref.hostName,
|
|
8687
|
-
children = _ref.children,
|
|
8688
|
-
theme = _ref.theme;
|
|
8689
|
-
var defaultTheme = useTheme();
|
|
8690
|
-
var _usePortal = usePortal(hostName),
|
|
8691
|
-
addUpdatePortal = _usePortal.addPortal,
|
|
8692
|
-
removePortal = _usePortal.removePortal;
|
|
8693
|
-
var nameOrRandom = React.useMemo(function () {
|
|
8694
|
-
return name || nanoid();
|
|
8695
|
-
}, [name]);
|
|
8696
|
-
var ChildrenComponent = React.useMemo(function () {
|
|
8697
|
-
return /*#__PURE__*/React__default["default"].createElement(ThemeProvider, {
|
|
8698
|
-
theme: theme || defaultTheme
|
|
8699
|
-
}, children);
|
|
8700
|
-
}, [theme, children, defaultTheme]);
|
|
8701
|
-
React.useLayoutEffect(function () {
|
|
8702
|
-
addUpdatePortal(nameOrRandom, ChildrenComponent);
|
|
8703
|
-
return function () {
|
|
8704
|
-
removePortal(nameOrRandom);
|
|
8705
|
-
};
|
|
8706
|
-
}, [addUpdatePortal]);
|
|
8707
|
-
React.useLayoutEffect(function () {
|
|
8708
|
-
addUpdatePortal(nameOrRandom, ChildrenComponent);
|
|
8709
|
-
}, [ChildrenComponent]);
|
|
8710
|
-
return null;
|
|
8711
|
-
};
|
|
8712
|
-
var Portal = /*#__PURE__*/React.memo(PortalComponent);
|
|
8713
|
-
Portal.displayName = 'Portal';
|
|
8714
|
-
var Portal$1 = Object.assign(Portal, {
|
|
8715
|
-
Provider: PortalProvider,
|
|
8716
|
-
Host: PortalHost
|
|
8717
|
-
});
|
|
8718
|
-
|
|
8719
|
-
var _excluded$m = ["visible"];
|
|
8720
|
-
var DEFAULT_BACKDROP_OPACITY = 0.4;
|
|
8721
|
-
var DEFAULT_ANIMATION_CONFIG = {
|
|
8722
|
-
easing: reactNative.Easing.inOut(reactNative.Easing.cubic),
|
|
8723
|
-
useNativeDriver: reactNative.Platform.OS !== 'web',
|
|
8724
|
-
duration: 400
|
|
8725
|
-
};
|
|
8726
|
-
var Modal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
8727
|
-
var children = _ref.children,
|
|
8728
|
-
onShow = _ref.onShow,
|
|
8729
|
-
onRequestClose = _ref.onRequestClose,
|
|
8730
|
-
testID = _ref.testID,
|
|
8731
|
-
_ref$animationType = _ref.animationType,
|
|
8732
|
-
animationType = _ref$animationType === void 0 ? 'none' : _ref$animationType,
|
|
8733
|
-
_ref$transparent = _ref.transparent,
|
|
8734
|
-
transparent = _ref$transparent === void 0 ? false : _ref$transparent,
|
|
8735
|
-
onDismiss = _ref.onDismiss;
|
|
8736
|
-
var theme = useTheme();
|
|
8737
|
-
var animatedBackdropValue = React.useRef(new reactNative.Animated.Value(0)).current;
|
|
8738
|
-
var animatedModalValue = React.useRef(new reactNative.Animated.Value(0)).current;
|
|
8739
|
-
// Show or hide the backdrop and modal content
|
|
8740
|
-
var animateBackdropAndContent = React.useCallback(function (_ref2) {
|
|
8741
|
-
var toValue = _ref2.toValue,
|
|
8742
|
-
callback = _ref2.callback;
|
|
8743
|
-
if (animationType !== 'none') {
|
|
8744
|
-
// Backdrop animation
|
|
8745
|
-
if (!transparent) {
|
|
8746
|
-
reactNative.Animated.timing(animatedBackdropValue, _objectSpread2({
|
|
8747
|
-
toValue: toValue
|
|
8748
|
-
}, DEFAULT_ANIMATION_CONFIG)).start();
|
|
8749
|
-
}
|
|
8750
|
-
// Modal content animation
|
|
8751
|
-
reactNative.Animated.timing(animatedModalValue, _objectSpread2({
|
|
8752
|
-
toValue: toValue
|
|
8753
|
-
}, DEFAULT_ANIMATION_CONFIG)).start(callback);
|
|
8754
|
-
} else {
|
|
8755
|
-
callback === null || callback === void 0 ? void 0 : callback();
|
|
8756
|
-
}
|
|
8757
|
-
}, [animationType, onShow, transparent]);
|
|
8758
|
-
var backdropOpacityAnimation = animatedBackdropValue.interpolate({
|
|
8759
|
-
inputRange: [0, 1],
|
|
8760
|
-
outputRange: [0, DEFAULT_BACKDROP_OPACITY]
|
|
8761
|
-
});
|
|
8762
|
-
var modalAnimation = animatedModalValue.interpolate({
|
|
8763
|
-
inputRange: [0, 1],
|
|
8764
|
-
outputRange: animationType === 'slide' ? [reactNative.Dimensions.get('window').height, 0] : [0, 1]
|
|
8765
|
-
});
|
|
8766
|
-
React.useImperativeHandle(ref, function () {
|
|
8767
|
-
return {
|
|
8768
|
-
show: function show() {
|
|
8769
|
-
animateBackdropAndContent({
|
|
8770
|
-
toValue: 1,
|
|
8771
|
-
callback: onShow
|
|
8772
|
-
});
|
|
8773
|
-
},
|
|
8774
|
-
hide: function hide(wrapperCallback) {
|
|
8775
|
-
animateBackdropAndContent({
|
|
8776
|
-
toValue: 0,
|
|
8777
|
-
callback: function callback() {
|
|
8778
|
-
if (reactNative.Platform.OS === 'ios') {
|
|
8779
|
-
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
8780
|
-
}
|
|
8781
|
-
wrapperCallback();
|
|
8782
|
-
}
|
|
8783
|
-
});
|
|
8784
|
-
}
|
|
8785
|
-
};
|
|
8786
|
-
}, [onDismiss, onShow, animateBackdropAndContent]);
|
|
8787
|
-
// Back button handler
|
|
8788
|
-
React.useEffect(function () {
|
|
8789
|
-
var backHandler = reactNative.BackHandler.addEventListener('hardwareBackPress', function () {
|
|
8790
|
-
onRequestClose === null || onRequestClose === void 0 ? void 0 : onRequestClose();
|
|
8791
|
-
return true;
|
|
8792
|
-
});
|
|
8793
|
-
return function () {
|
|
8794
|
-
return backHandler.remove();
|
|
8795
|
-
};
|
|
8796
|
-
}, [onRequestClose]);
|
|
8797
|
-
return /*#__PURE__*/React__default["default"].createElement(Portal$1, null, /*#__PURE__*/React__default["default"].createElement(reactNative.Animated.View, {
|
|
8798
|
-
style: _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
8799
|
-
backgroundColor: transparent ? 'transparent' : theme.colors.overlayGlobalSurface,
|
|
8800
|
-
opacity: animationType !== 'none' ? backdropOpacityAnimation : DEFAULT_BACKDROP_OPACITY
|
|
8801
|
-
})
|
|
8802
|
-
}), /*#__PURE__*/React__default["default"].createElement(reactNative.Animated.View, {
|
|
8803
|
-
testID: testID,
|
|
8804
|
-
style: _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
8805
|
-
opacity: animationType === 'fade' ? modalAnimation : 1,
|
|
8806
|
-
transform: [{
|
|
8807
|
-
translateY: animationType === 'slide' ? modalAnimation : 0
|
|
8808
|
-
}]
|
|
8809
|
-
})
|
|
8810
|
-
}, children));
|
|
8811
|
-
});
|
|
8812
|
-
var ModalWrapper = function ModalWrapper(_ref3) {
|
|
8813
|
-
var _ref3$visible = _ref3.visible,
|
|
8814
|
-
visible = _ref3$visible === void 0 ? true : _ref3$visible,
|
|
8815
|
-
props = _objectWithoutProperties(_ref3, _excluded$m);
|
|
8816
|
-
var modalRef = React.useRef(null);
|
|
8817
|
-
var _useState = React.useState(visible),
|
|
8818
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
8819
|
-
internalVisible = _useState2[0],
|
|
8820
|
-
setInternalVisible = _useState2[1];
|
|
8821
|
-
React.useEffect(function () {
|
|
8822
|
-
if (visible) {
|
|
8823
|
-
setInternalVisible(true);
|
|
8824
|
-
} else {
|
|
8825
|
-
var _modalRef$current;
|
|
8826
|
-
// Wait for animation to finish before hiding the modal
|
|
8827
|
-
(_modalRef$current = modalRef.current) === null || _modalRef$current === void 0 ? void 0 : _modalRef$current.hide(function () {
|
|
8828
|
-
return setInternalVisible(false);
|
|
8829
|
-
});
|
|
8830
|
-
}
|
|
8831
|
-
}, [visible]);
|
|
8832
|
-
React.useEffect(function () {
|
|
8833
|
-
if (internalVisible) {
|
|
8834
|
-
var _modalRef$current2;
|
|
8835
|
-
(_modalRef$current2 = modalRef.current) === null || _modalRef$current2 === void 0 ? void 0 : _modalRef$current2.show();
|
|
8836
|
-
}
|
|
8837
|
-
}, [internalVisible]);
|
|
8838
|
-
return internalVisible ? /*#__PURE__*/React__default["default"].createElement(Modal, _extends$1({
|
|
8839
|
-
ref: modalRef
|
|
8840
|
-
}, props)) : null;
|
|
8841
|
-
};
|
|
8842
|
-
|
|
8843
|
-
var BottomSheet = function BottomSheet(_ref) {
|
|
8844
|
-
var open = _ref.open,
|
|
8845
|
-
header = _ref.header,
|
|
8846
|
-
footer = _ref.footer,
|
|
8847
|
-
children = _ref.children,
|
|
8848
|
-
onAnimationEnd = _ref.onAnimationEnd,
|
|
8849
|
-
onOpen = _ref.onOpen,
|
|
8850
|
-
onRequestClose = _ref.onRequestClose,
|
|
8851
|
-
onDismiss = _ref.onDismiss,
|
|
8852
|
-
_ref$showCloseButton = _ref.showCloseButton,
|
|
8853
|
-
showCloseButton = _ref$showCloseButton === void 0 ? true : _ref$showCloseButton,
|
|
8854
|
-
_ref$hasBackdrop = _ref.hasBackdrop,
|
|
8855
|
-
hasBackdrop = _ref$hasBackdrop === void 0 ? true : _ref$hasBackdrop,
|
|
8856
|
-
_ref$showDivider = _ref.showDivider,
|
|
8857
|
-
showDivider = _ref$showDivider === void 0 ? false : _ref$showDivider,
|
|
8858
|
-
style = _ref.style,
|
|
8859
|
-
testID = _ref.testID,
|
|
8860
|
-
_ref$keyboardAvoiding = _ref.keyboardAvoidingViewProps,
|
|
8861
|
-
keyboardAvoidingViewProps = _ref$keyboardAvoiding === void 0 ? {} : _ref$keyboardAvoiding;
|
|
8862
|
-
var _Dimensions$get = reactNative.Dimensions.get('window'),
|
|
8863
|
-
height = _Dimensions$get.height;
|
|
8864
|
-
// Internal state to control modal open/close timing with animation
|
|
8865
|
-
var _useState = React.useState(open),
|
|
8866
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
8867
|
-
visible = _useState2[0],
|
|
8868
|
-
setVisibility = _useState2[1];
|
|
8869
|
-
var animatedValue = React.useRef(new reactNative.Animated.Value(open ? 0 : 1));
|
|
8870
|
-
var _useState3 = React.useState(showDivider),
|
|
8871
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
8872
|
-
internalShowDivider = _useState4[0],
|
|
8873
|
-
setInternalShowDivider = _useState4[1];
|
|
8874
|
-
React.useEffect(function () {
|
|
8875
|
-
// Show the modal before the open animation start
|
|
8876
|
-
if (open && !visible) {
|
|
8877
|
-
setVisibility(open);
|
|
8878
|
-
}
|
|
8879
|
-
// Delay closing the modal until after the closing animation end
|
|
8880
|
-
animatedValue.current.removeAllListeners();
|
|
8881
|
-
animatedValue.current.addListener(function (_ref2) {
|
|
8882
|
-
var value = _ref2.value;
|
|
8883
|
-
var endValueOfTransition = open ? 1 : 0;
|
|
8884
|
-
if (endValueOfTransition === 0 && value === endValueOfTransition) {
|
|
8885
|
-
setVisibility(false);
|
|
8886
|
-
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
8887
|
-
}
|
|
8888
|
-
});
|
|
8889
|
-
return function () {
|
|
8890
|
-
return animatedValue.current.removeAllListeners();
|
|
8891
|
-
};
|
|
8892
|
-
}, [open]);
|
|
8893
|
-
// Animation
|
|
8894
|
-
React.useEffect(function () {
|
|
8895
|
-
var animation = reactNative.Animated.timing(animatedValue.current, {
|
|
8896
|
-
toValue: open ? 1 : 0,
|
|
8897
|
-
easing: reactNative.Easing.inOut(reactNative.Easing.cubic),
|
|
8898
|
-
useNativeDriver: true
|
|
8899
|
-
});
|
|
8900
|
-
animation.start(onAnimationEnd);
|
|
8901
|
-
return function () {
|
|
8902
|
-
return animation.stop();
|
|
8903
|
-
};
|
|
8904
|
-
}, [open]);
|
|
8905
|
-
var interpolateY = animatedValue.current.interpolate({
|
|
8906
|
-
inputRange: [0, 1],
|
|
8907
|
-
outputRange: [height, 0]
|
|
8908
|
-
});
|
|
8909
|
-
// Backdrop opacity
|
|
8910
|
-
var interpolateOpacity = hasBackdrop ? animatedValue.current.interpolate({
|
|
8911
|
-
inputRange: [0, 1],
|
|
8912
|
-
outputRange: [0, 0.48]
|
|
8913
|
-
}) : 0;
|
|
8914
|
-
var BottomSheetContextValue = React.useMemo(function () {
|
|
8915
|
-
return {
|
|
8916
|
-
setInternalShowDivider: setInternalShowDivider
|
|
8917
|
-
};
|
|
8918
|
-
}, [setInternalShowDivider]);
|
|
8919
|
-
return /*#__PURE__*/React__default["default"].createElement(ModalWrapper, {
|
|
8920
|
-
visible: visible,
|
|
8921
|
-
onRequestClose: onRequestClose,
|
|
8922
|
-
transparent: true,
|
|
8923
|
-
testID: testID,
|
|
8924
|
-
onShow: onOpen
|
|
8925
|
-
}, /*#__PURE__*/React__default["default"].createElement(StyledWrapper$9, {
|
|
8926
|
-
pointerEvents: "box-none"
|
|
8927
|
-
}, /*#__PURE__*/React__default["default"].createElement(StyledKeyboardAvoidingView, _extends$1({
|
|
8928
|
-
behavior: reactNative.Platform.OS === 'ios' ? 'padding' : 'height'
|
|
8929
|
-
}, keyboardAvoidingViewProps), /*#__PURE__*/React__default["default"].createElement(StyledBackdrop$2, {
|
|
8930
|
-
style: {
|
|
8931
|
-
opacity: interpolateOpacity
|
|
8932
|
-
},
|
|
8933
|
-
onPress: onRequestClose
|
|
8934
|
-
}), /*#__PURE__*/React__default["default"].createElement(StyledBottomSheet, {
|
|
8935
|
-
style: [style, {
|
|
8936
|
-
transform: [{
|
|
8937
|
-
scaleY: height > 0 ? 1 : 0
|
|
8938
|
-
}, {
|
|
8939
|
-
translateY: interpolateY
|
|
8940
|
-
}]
|
|
8941
|
-
}]
|
|
8942
|
-
}, header !== undefined ? /*#__PURE__*/React__default["default"].createElement(Header, {
|
|
8943
|
-
content: header,
|
|
8944
|
-
showDivider: internalShowDivider,
|
|
8945
|
-
onRequestClose: onRequestClose,
|
|
8946
|
-
showCloseButton: showCloseButton
|
|
8947
|
-
}) : null, /*#__PURE__*/React__default["default"].createElement(BottomSheetContext.Provider, {
|
|
8948
|
-
value: BottomSheetContextValue
|
|
8949
|
-
}, children), footer ? /*#__PURE__*/React__default["default"].createElement(Footer$1, {
|
|
8950
|
-
showDivider: showDivider
|
|
8951
|
-
}, footer) : null))));
|
|
8952
|
-
};
|
|
8953
|
-
var BottomSheet$1 = Object.assign(BottomSheet, {
|
|
8954
|
-
ScrollView: BottomSheetScrollView
|
|
8955
|
-
});
|
|
8663
|
+
var BottomSheet$1 = Object.assign(BottomSheet, {
|
|
8664
|
+
ScrollView: BottomSheetScrollView
|
|
8665
|
+
});
|
|
8956
8666
|
|
|
8957
8667
|
var colors = {
|
|
8958
8668
|
backgroundColor: {
|
|
@@ -9129,7 +8839,7 @@ var borderWidths = {
|
|
|
9129
8839
|
var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
|
|
9130
8840
|
var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
|
|
9131
8841
|
|
|
9132
|
-
var _excluded$
|
|
8842
|
+
var _excluded$n = ["theme"];
|
|
9133
8843
|
var getThemeValue = function getThemeValue(theme, key, props) {
|
|
9134
8844
|
var propConfig = config[key];
|
|
9135
8845
|
var propValue = props[key];
|
|
@@ -9156,18 +8866,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
|
|
|
9156
8866
|
var configKeys = Object.keys(config);
|
|
9157
8867
|
var StyledBox = index$a(reactNative.View)(function (_ref5) {
|
|
9158
8868
|
var theme = _ref5.theme,
|
|
9159
|
-
otherProps = _objectWithoutProperties(_ref5, _excluded$
|
|
8869
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded$n);
|
|
9160
8870
|
var styleProps = pick(configKeys, otherProps);
|
|
9161
8871
|
var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
|
|
9162
8872
|
return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
|
|
9163
8873
|
});
|
|
9164
8874
|
|
|
9165
|
-
var _excluded$
|
|
8875
|
+
var _excluded$m = ["children", "style", "testID"];
|
|
9166
8876
|
var Box = function Box(_ref) {
|
|
9167
8877
|
var children = _ref.children,
|
|
9168
8878
|
style = _ref.style,
|
|
9169
8879
|
testID = _ref.testID,
|
|
9170
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
8880
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$m);
|
|
9171
8881
|
return /*#__PURE__*/React__default["default"].createElement(StyledBox, _extends$1({}, otherProps, {
|
|
9172
8882
|
style: style,
|
|
9173
8883
|
testID: testID
|
|
@@ -11807,7 +11517,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
11807
11517
|
})));
|
|
11808
11518
|
};
|
|
11809
11519
|
|
|
11810
|
-
var _excluded$
|
|
11520
|
+
var _excluded$l = ["rounded", "size", "testID", "style"];
|
|
11811
11521
|
var Image = function Image(_ref) {
|
|
11812
11522
|
var _ref$rounded = _ref.rounded,
|
|
11813
11523
|
rounded = _ref$rounded === void 0 ? false : _ref$rounded,
|
|
@@ -11815,7 +11525,7 @@ var Image = function Image(_ref) {
|
|
|
11815
11525
|
size = _ref$size === void 0 ? '6xlarge' : _ref$size,
|
|
11816
11526
|
testID = _ref.testID,
|
|
11817
11527
|
style = _ref.style,
|
|
11818
|
-
imageNativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11528
|
+
imageNativeProps = _objectWithoutProperties(_ref, _excluded$l);
|
|
11819
11529
|
var theme = useTheme();
|
|
11820
11530
|
var imageSize = theme.__hd__.image.sizes[size];
|
|
11821
11531
|
return /*#__PURE__*/React__default["default"].createElement(reactNative.Image, _extends$1({
|
|
@@ -12020,12 +11730,12 @@ var Indicator = index$a(reactNative.View)(function (_ref2) {
|
|
|
12020
11730
|
};
|
|
12021
11731
|
});
|
|
12022
11732
|
|
|
12023
|
-
var _excluded$
|
|
11733
|
+
var _excluded$k = ["intent", "children"];
|
|
12024
11734
|
var DataCard = function DataCard(_ref) {
|
|
12025
11735
|
var _ref$intent = _ref.intent,
|
|
12026
11736
|
intent = _ref$intent === void 0 ? 'info' : _ref$intent,
|
|
12027
11737
|
children = _ref.children,
|
|
12028
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11738
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$k);
|
|
12029
11739
|
return /*#__PURE__*/React__default["default"].createElement(StyledDataCard, nativeProps, /*#__PURE__*/React__default["default"].createElement(Indicator, {
|
|
12030
11740
|
themeIntent: intent,
|
|
12031
11741
|
testID: "data-card-indicator"
|
|
@@ -12043,11 +11753,11 @@ var StyledCard$1 = index$a(reactNative.View)(function (_ref) {
|
|
|
12043
11753
|
});
|
|
12044
11754
|
});
|
|
12045
11755
|
|
|
12046
|
-
var _excluded$
|
|
11756
|
+
var _excluded$j = ["intent", "children"];
|
|
12047
11757
|
var Card = function Card(_ref) {
|
|
12048
11758
|
var intent = _ref.intent,
|
|
12049
11759
|
children = _ref.children,
|
|
12050
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11760
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$j);
|
|
12051
11761
|
return /*#__PURE__*/React__default["default"].createElement(StyledCard$1, _extends$1({}, nativeProps, {
|
|
12052
11762
|
themeIntent: intent
|
|
12053
11763
|
}), children);
|
|
@@ -12254,7 +11964,7 @@ var CardCarousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
12254
11964
|
});
|
|
12255
11965
|
CardCarousel.displayName = 'CardCarousel';
|
|
12256
11966
|
|
|
12257
|
-
var _excluded$
|
|
11967
|
+
var _excluded$i = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "testID", "pageControlPosition"];
|
|
12258
11968
|
function useStateFromProp(initialValue) {
|
|
12259
11969
|
var _useState = React.useState(initialValue),
|
|
12260
11970
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -12280,7 +11990,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
12280
11990
|
testID = _ref.testID,
|
|
12281
11991
|
_ref$pageControlPosit = _ref.pageControlPosition,
|
|
12282
11992
|
pageControlPosition = _ref$pageControlPosit === void 0 ? 'top' : _ref$pageControlPosit,
|
|
12283
|
-
nativeProps = _objectWithoutProperties(_ref, _excluded$
|
|
11993
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$i);
|
|
12284
11994
|
useDeprecation("shouldShowPagination prop has been deprecated", shouldShowPagination !== noop);
|
|
12285
11995
|
useDeprecation("The use of 'pageControlPosition == bottom' has been deprecated", pageControlPosition === 'bottom');
|
|
12286
11996
|
var carouselRef = React.useRef(null);
|
|
@@ -12365,15 +12075,150 @@ var Carousel = function Carousel(_ref) {
|
|
|
12365
12075
|
width: width
|
|
12366
12076
|
});
|
|
12367
12077
|
}
|
|
12368
|
-
}), /*#__PURE__*/React__default["default"].createElement(StyledCarouselFooterWrapper, null, renderActions && renderActions(currentSlideIndex), pageControlPosition === 'bottom' && shouldShowPagination(currentSlideIndex) && /*#__PURE__*/React__default["default"].createElement(StyledPageControl$1, {
|
|
12369
|
-
numberOfPages: items.length,
|
|
12370
|
-
currentPage: currentSlideIndex
|
|
12371
|
-
}))));
|
|
12372
|
-
};
|
|
12373
|
-
var index$8 = Object.assign(Carousel, {
|
|
12374
|
-
Card: CardCarousel
|
|
12078
|
+
}), /*#__PURE__*/React__default["default"].createElement(StyledCarouselFooterWrapper, null, renderActions && renderActions(currentSlideIndex), pageControlPosition === 'bottom' && shouldShowPagination(currentSlideIndex) && /*#__PURE__*/React__default["default"].createElement(StyledPageControl$1, {
|
|
12079
|
+
numberOfPages: items.length,
|
|
12080
|
+
currentPage: currentSlideIndex
|
|
12081
|
+
}))));
|
|
12082
|
+
};
|
|
12083
|
+
var index$8 = Object.assign(Carousel, {
|
|
12084
|
+
Card: CardCarousel
|
|
12085
|
+
});
|
|
12086
|
+
|
|
12087
|
+
var StyledChipWrapper = index$a(reactNative.TouchableOpacity)(function (_ref) {
|
|
12088
|
+
var themeVariant = _ref.themeVariant,
|
|
12089
|
+
themeSelected = _ref.themeSelected,
|
|
12090
|
+
theme = _ref.theme;
|
|
12091
|
+
var getShadowStyles = function getShadowStyles() {
|
|
12092
|
+
switch (themeVariant) {
|
|
12093
|
+
case 'filled':
|
|
12094
|
+
return _objectSpread2({}, theme.__hd__.chip.shadows.filledWrapper);
|
|
12095
|
+
case 'outlined':
|
|
12096
|
+
return undefined;
|
|
12097
|
+
}
|
|
12098
|
+
};
|
|
12099
|
+
var getBorderStyles = function getBorderStyles() {
|
|
12100
|
+
var commonStyle = {
|
|
12101
|
+
borderWidth: theme.__hd__.chip.sizes.wrapperBorder
|
|
12102
|
+
};
|
|
12103
|
+
if (themeSelected) {
|
|
12104
|
+
return _objectSpread2(_objectSpread2({}, commonStyle), {}, {
|
|
12105
|
+
borderColor: theme.__hd__.chip.colors.wrapperSelectedBorder
|
|
12106
|
+
});
|
|
12107
|
+
}
|
|
12108
|
+
switch (themeVariant) {
|
|
12109
|
+
case 'outlined':
|
|
12110
|
+
{
|
|
12111
|
+
return _objectSpread2(_objectSpread2({}, commonStyle), {}, {
|
|
12112
|
+
borderColor: theme.__hd__.chip.colors.wrapperBorder
|
|
12113
|
+
});
|
|
12114
|
+
}
|
|
12115
|
+
case 'filled':
|
|
12116
|
+
{
|
|
12117
|
+
return _objectSpread2(_objectSpread2({}, commonStyle), {}, {
|
|
12118
|
+
borderColor: theme.__hd__.chip.colors.wrapperSelectedBorder
|
|
12119
|
+
});
|
|
12120
|
+
}
|
|
12121
|
+
}
|
|
12122
|
+
};
|
|
12123
|
+
var getBackgroundStyles = function getBackgroundStyles() {
|
|
12124
|
+
if (themeSelected) {
|
|
12125
|
+
switch (themeVariant) {
|
|
12126
|
+
case 'outlined':
|
|
12127
|
+
{
|
|
12128
|
+
return {
|
|
12129
|
+
backgroundColor: theme.__hd__.chip.colors.primaryBackground
|
|
12130
|
+
};
|
|
12131
|
+
}
|
|
12132
|
+
case 'filled':
|
|
12133
|
+
return {
|
|
12134
|
+
backgroundColor: theme.__hd__.chip.colors.secondaryBackground
|
|
12135
|
+
};
|
|
12136
|
+
}
|
|
12137
|
+
} else {
|
|
12138
|
+
switch (themeVariant) {
|
|
12139
|
+
case 'outlined':
|
|
12140
|
+
{
|
|
12141
|
+
return {
|
|
12142
|
+
backgroundColor: theme.__hd__.chip.colors.outlinedBackground
|
|
12143
|
+
};
|
|
12144
|
+
}
|
|
12145
|
+
case 'filled':
|
|
12146
|
+
return {
|
|
12147
|
+
backgroundColor: theme.__hd__.chip.colors.filledBackground
|
|
12148
|
+
};
|
|
12149
|
+
}
|
|
12150
|
+
}
|
|
12151
|
+
};
|
|
12152
|
+
return _objectSpread2(_objectSpread2(_objectSpread2({
|
|
12153
|
+
alignSelf: 'flex-start',
|
|
12154
|
+
flexDirection: 'row',
|
|
12155
|
+
alignItems: 'center',
|
|
12156
|
+
justifyContent: 'center',
|
|
12157
|
+
borderRadius: theme.__hd__.chip.radii.wrapper,
|
|
12158
|
+
paddingVertical: theme.__hd__.chip.space.wrapperVerticalPadding,
|
|
12159
|
+
paddingHorizontal: theme.__hd__.chip.space.wrapperHorizontalPadding,
|
|
12160
|
+
borderWidth: theme.__hd__.chip.sizes.wrapperBorder
|
|
12161
|
+
}, getShadowStyles()), getBorderStyles()), getBackgroundStyles());
|
|
12162
|
+
});
|
|
12163
|
+
var StyledIconWrapper$3 = index$a(Box)(function (_ref2) {
|
|
12164
|
+
var theme = _ref2.theme;
|
|
12165
|
+
return {
|
|
12166
|
+
marginRight: theme.__hd__.chip.space.iconWrapperMarginRight
|
|
12167
|
+
};
|
|
12168
|
+
});
|
|
12169
|
+
var StyledLabel$1 = index$a(Typography.Body)(function (_ref3) {
|
|
12170
|
+
var themeSelected = _ref3.themeSelected,
|
|
12171
|
+
themeVariant = _ref3.themeVariant,
|
|
12172
|
+
theme = _ref3.theme;
|
|
12173
|
+
return {
|
|
12174
|
+
color: themeSelected && themeVariant === 'outlined' ? theme.__hd__.chip.colors.selectedPrimaryText : undefined
|
|
12175
|
+
};
|
|
12176
|
+
});
|
|
12177
|
+
var StyledIcon$1 = index$a(Icon)(function (_ref4) {
|
|
12178
|
+
var themeSelected = _ref4.themeSelected,
|
|
12179
|
+
themeVariant = _ref4.themeVariant,
|
|
12180
|
+
theme = _ref4.theme;
|
|
12181
|
+
return {
|
|
12182
|
+
color: themeSelected && themeVariant === 'outlined' ? theme.__hd__.chip.colors.selectedPrimaryText : undefined
|
|
12183
|
+
};
|
|
12375
12184
|
});
|
|
12376
12185
|
|
|
12186
|
+
var _excluded$h = ["label", "variant", "selected", "icon", "onPress"];
|
|
12187
|
+
var Chip = function Chip(_ref) {
|
|
12188
|
+
var label = _ref.label,
|
|
12189
|
+
_ref$variant = _ref.variant,
|
|
12190
|
+
variant = _ref$variant === void 0 ? 'outlined' : _ref$variant,
|
|
12191
|
+
_ref$selected = _ref.selected,
|
|
12192
|
+
selected = _ref$selected === void 0 ? false : _ref$selected,
|
|
12193
|
+
icon = _ref.icon,
|
|
12194
|
+
onPress = _ref.onPress,
|
|
12195
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$h);
|
|
12196
|
+
var internalIcon = React__default["default"].useMemo(function () {
|
|
12197
|
+
if (icon && variant === 'filled') {
|
|
12198
|
+
return icon;
|
|
12199
|
+
}
|
|
12200
|
+
if (selected) {
|
|
12201
|
+
return 'checkmark';
|
|
12202
|
+
}
|
|
12203
|
+
return undefined;
|
|
12204
|
+
}, [icon, selected, variant]);
|
|
12205
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledChipWrapper, _extends$1({
|
|
12206
|
+
onPress: onPress,
|
|
12207
|
+
themeVariant: variant,
|
|
12208
|
+
themeSelected: selected
|
|
12209
|
+
}, otherProps), internalIcon && /*#__PURE__*/React__default["default"].createElement(StyledIconWrapper$3, null, /*#__PURE__*/React__default["default"].createElement(StyledIcon$1, {
|
|
12210
|
+
size: "xsmall",
|
|
12211
|
+
icon: internalIcon,
|
|
12212
|
+
themeSelected: selected,
|
|
12213
|
+
themeVariant: variant,
|
|
12214
|
+
testID: "chip-icon-".concat(internalIcon)
|
|
12215
|
+
})), /*#__PURE__*/React__default["default"].createElement(StyledLabel$1, {
|
|
12216
|
+
variant: "small",
|
|
12217
|
+
themeVariant: variant,
|
|
12218
|
+
themeSelected: selected
|
|
12219
|
+
}, label));
|
|
12220
|
+
};
|
|
12221
|
+
|
|
12377
12222
|
var StyledWrapper$7 = index$a(reactNative.TouchableOpacity)(function (_ref) {
|
|
12378
12223
|
var theme = _ref.theme,
|
|
12379
12224
|
themeState = _ref.themeState;
|
|
@@ -12617,7 +12462,7 @@ var StyledErrorAndMaxLengthContainer = index$a(reactNative.View)(function () {
|
|
|
12617
12462
|
};
|
|
12618
12463
|
});
|
|
12619
12464
|
|
|
12620
|
-
var _excluded$
|
|
12465
|
+
var _excluded$g = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "hideCharacterCount", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling", "variant"];
|
|
12621
12466
|
var getState$1 = function getState(_ref) {
|
|
12622
12467
|
var disabled = _ref.disabled,
|
|
12623
12468
|
error = _ref.error,
|
|
@@ -12669,7 +12514,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
12669
12514
|
allowFontScaling = _ref2$allowFontScalin === void 0 ? false : _ref2$allowFontScalin,
|
|
12670
12515
|
_ref2$variant = _ref2.variant,
|
|
12671
12516
|
variant = _ref2$variant === void 0 ? 'text' : _ref2$variant,
|
|
12672
|
-
nativeProps = _objectWithoutProperties(_ref2, _excluded$
|
|
12517
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$g);
|
|
12673
12518
|
var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
|
|
12674
12519
|
var isEmptyValue = displayText.length === 0;
|
|
12675
12520
|
var actualSuffix = loading ? 'loading' : suffix;
|
|
@@ -13103,380 +12948,706 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
|
|
|
13103
12948
|
}
|
|
13104
12949
|
setOpen(false);
|
|
13105
12950
|
}
|
|
13106
|
-
})
|
|
13107
|
-
}, /*#__PURE__*/React__default["default"].createElement(StyledPickerWrapper$1, null, /*#__PURE__*/React__default["default"].createElement(DateTimePicker__default["default"], {
|
|
13108
|
-
testID: "datePickerIOS",
|
|
13109
|
-
value: selectingDate,
|
|
13110
|
-
minimumDate: minDate,
|
|
13111
|
-
maximumDate: maxDate,
|
|
13112
|
-
mode: "date",
|
|
13113
|
-
onChange: function onChange(_, date) {
|
|
13114
|
-
if (date) {
|
|
13115
|
-
setSelectingDate(date);
|
|
12951
|
+
})
|
|
12952
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledPickerWrapper$1, null, /*#__PURE__*/React__default["default"].createElement(DateTimePicker__default["default"], {
|
|
12953
|
+
testID: "datePickerIOS",
|
|
12954
|
+
value: selectingDate,
|
|
12955
|
+
minimumDate: minDate,
|
|
12956
|
+
maximumDate: maxDate,
|
|
12957
|
+
mode: "date",
|
|
12958
|
+
onChange: function onChange(_, date) {
|
|
12959
|
+
if (date) {
|
|
12960
|
+
setSelectingDate(date);
|
|
12961
|
+
}
|
|
12962
|
+
},
|
|
12963
|
+
display: "spinner",
|
|
12964
|
+
style: {
|
|
12965
|
+
flex: 1
|
|
12966
|
+
},
|
|
12967
|
+
textColor: theme.colors.onDefaultGlobalSurface
|
|
12968
|
+
}))));
|
|
12969
|
+
};
|
|
12970
|
+
|
|
12971
|
+
var _excluded$f = ["variant"];
|
|
12972
|
+
var DatePicker = function DatePicker(_ref) {
|
|
12973
|
+
var _ref$variant = _ref.variant,
|
|
12974
|
+
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
12975
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
12976
|
+
if (variant === 'calendar') {
|
|
12977
|
+
return /*#__PURE__*/React__default["default"].createElement(DatePickerCalendar, props);
|
|
12978
|
+
}
|
|
12979
|
+
if (reactNative.Platform.OS === 'ios') {
|
|
12980
|
+
return /*#__PURE__*/React__default["default"].createElement(DatePickerIOS, props);
|
|
12981
|
+
}
|
|
12982
|
+
return /*#__PURE__*/React__default["default"].createElement(DatePickerAndroid, props);
|
|
12983
|
+
};
|
|
12984
|
+
|
|
12985
|
+
var AnimatedPressable$1 = reactNative.Animated.createAnimatedComponent(reactNative.Pressable);
|
|
12986
|
+
var StyledContainer$3 = index$a(reactNative.View)(function (_ref) {
|
|
12987
|
+
var theme = _ref.theme,
|
|
12988
|
+
enableShadow = _ref.enableShadow;
|
|
12989
|
+
return _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
12990
|
+
shadowColor: enableShadow ? theme.__hd__.drawer.colors.shadow : 'transparent',
|
|
12991
|
+
shadowOffset: theme.__hd__.drawer.shadows.offset,
|
|
12992
|
+
shadowOpacity: theme.__hd__.drawer.shadows.opacity,
|
|
12993
|
+
shadowRadius: theme.__hd__.drawer.shadows.radius,
|
|
12994
|
+
overflow: 'hidden',
|
|
12995
|
+
zIndex: 9999,
|
|
12996
|
+
elevation: 9999
|
|
12997
|
+
});
|
|
12998
|
+
});
|
|
12999
|
+
var StyledDragableContainer = index$a(reactNative.View)(function (_ref2) {
|
|
13000
|
+
var theme = _ref2.theme,
|
|
13001
|
+
enableShadow = _ref2.enableShadow;
|
|
13002
|
+
return _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
13003
|
+
shadowColor: enableShadow ? theme.__hd__.drawer.colors.shadow : 'transparent',
|
|
13004
|
+
shadowOffset: theme.__hd__.drawer.shadows.offset,
|
|
13005
|
+
shadowOpacity: theme.__hd__.drawer.shadows.opacity,
|
|
13006
|
+
shadowRadius: theme.__hd__.drawer.shadows.radius,
|
|
13007
|
+
overflow: 'hidden',
|
|
13008
|
+
zIndex: 9999,
|
|
13009
|
+
elevation: 9999,
|
|
13010
|
+
flexDirection: 'column-reverse'
|
|
13011
|
+
});
|
|
13012
|
+
});
|
|
13013
|
+
var StyledBackdrop$1 = index$a(AnimatedPressable$1)(function (_ref3) {
|
|
13014
|
+
var theme = _ref3.theme;
|
|
13015
|
+
return _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
13016
|
+
backgroundColor: theme.__hd__.drawer.colors.backdrop
|
|
13017
|
+
});
|
|
13018
|
+
});
|
|
13019
|
+
var StyledDrawerContainer = index$a(reactNative.Animated.View)(function (_ref4) {
|
|
13020
|
+
var theme = _ref4.theme,
|
|
13021
|
+
enableShadow = _ref4.enableShadow;
|
|
13022
|
+
return {
|
|
13023
|
+
borderBottomLeftRadius: theme.__hd__.drawer.radii["default"],
|
|
13024
|
+
borderBottomRightRadius: theme.__hd__.drawer.radii["default"],
|
|
13025
|
+
backgroundColor: theme.__hd__.drawer.colors.background,
|
|
13026
|
+
elevation: enableShadow ? theme.__hd__.drawer.shadows.elevation : undefined,
|
|
13027
|
+
overflow: 'hidden'
|
|
13028
|
+
};
|
|
13029
|
+
});
|
|
13030
|
+
var StyledDragableDrawerContainer = index$a(reactNative.Animated.View)(function (_ref5) {
|
|
13031
|
+
var theme = _ref5.theme,
|
|
13032
|
+
enableShadow = _ref5.enableShadow;
|
|
13033
|
+
return {
|
|
13034
|
+
borderTopLeftRadius: theme.__hd__.drawer.radii["default"],
|
|
13035
|
+
borderTopRightRadius: theme.__hd__.drawer.radii["default"],
|
|
13036
|
+
backgroundColor: theme.__hd__.drawer.colors.background,
|
|
13037
|
+
elevation: enableShadow ? theme.__hd__.drawer.shadows.elevation : undefined,
|
|
13038
|
+
overflow: 'hidden',
|
|
13039
|
+
maxHeight: '100%'
|
|
13040
|
+
};
|
|
13041
|
+
});
|
|
13042
|
+
var StyledHandlerContainer = index$a(reactNative.View)(function (_ref6) {
|
|
13043
|
+
var theme = _ref6.theme;
|
|
13044
|
+
return {
|
|
13045
|
+
backgroundColor: theme.__hd__.drawer.colors.background,
|
|
13046
|
+
paddingVertical: theme.__hd__.drawer.space.handlerPaddingVertical,
|
|
13047
|
+
alignItems: 'center'
|
|
13048
|
+
};
|
|
13049
|
+
});
|
|
13050
|
+
var StyledHandler = index$a(reactNative.View)(function (_ref7) {
|
|
13051
|
+
var theme = _ref7.theme;
|
|
13052
|
+
return {
|
|
13053
|
+
width: theme.__hd__.drawer.sizes.handlerWidth,
|
|
13054
|
+
height: theme.__hd__.drawer.sizes.handlerHeight,
|
|
13055
|
+
backgroundColor: theme.__hd__.drawer.colors.handler,
|
|
13056
|
+
borderRadius: theme.__hd__.drawer.radii.handler
|
|
13057
|
+
};
|
|
13058
|
+
});
|
|
13059
|
+
|
|
13060
|
+
var getOffset = function getOffset(height, percentage) {
|
|
13061
|
+
if (percentage < 0) return height;
|
|
13062
|
+
if (percentage > 100) return 0;
|
|
13063
|
+
return height * ((100 - percentage) / 100);
|
|
13064
|
+
};
|
|
13065
|
+
var calculateSnapPointsData = function calculateSnapPointsData(minimumHeight, height, snapPoints) {
|
|
13066
|
+
var filteredSnapPoints = snapPoints.filter(function (value) {
|
|
13067
|
+
return value >= minimumHeight;
|
|
13068
|
+
});
|
|
13069
|
+
var snapPointsOffsetValues = [minimumHeight].concat(_toConsumableArray(filteredSnapPoints)).map(function (value) {
|
|
13070
|
+
return getOffset(height, value);
|
|
13071
|
+
});
|
|
13072
|
+
var uniqSnapPointOffsetValues = Array.from(new Set([].concat(_toConsumableArray(snapPointsOffsetValues), [0])));
|
|
13073
|
+
return {
|
|
13074
|
+
list: uniqSnapPointOffsetValues,
|
|
13075
|
+
minHeightOffset: Math.max.apply(Math, uniqSnapPointOffsetValues),
|
|
13076
|
+
maxHeightOffset: 0 // Max height
|
|
13077
|
+
};
|
|
13078
|
+
};
|
|
13079
|
+
|
|
13080
|
+
var calculateAnimatedToValue = function calculateAnimatedToValue(position, heightSnapPoints) {
|
|
13081
|
+
var distances = heightSnapPoints.map(function (height) {
|
|
13082
|
+
return Math.abs(position - height);
|
|
13083
|
+
});
|
|
13084
|
+
var minIndex = distances.indexOf(Math.min.apply(Math, _toConsumableArray(distances)));
|
|
13085
|
+
return heightSnapPoints[minIndex];
|
|
13086
|
+
};
|
|
13087
|
+
|
|
13088
|
+
var DragableDrawer = function DragableDrawer(_ref) {
|
|
13089
|
+
var children = _ref.children,
|
|
13090
|
+
initialHeightPercentage = _ref.initialHeightPercentage,
|
|
13091
|
+
_ref$minimumHeightPer = _ref.minimumHeightPercentage,
|
|
13092
|
+
minimumHeightPercentage = _ref$minimumHeightPer === void 0 ? 10 : _ref$minimumHeightPer,
|
|
13093
|
+
_ref$snapPoints = _ref.snapPoints,
|
|
13094
|
+
snapPoints = _ref$snapPoints === void 0 ? [] : _ref$snapPoints,
|
|
13095
|
+
onExpanded = _ref.onExpanded,
|
|
13096
|
+
onCollapsed = _ref.onCollapsed,
|
|
13097
|
+
testID = _ref.testID;
|
|
13098
|
+
var _useState = React.useState(0),
|
|
13099
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13100
|
+
height = _useState2[0],
|
|
13101
|
+
setHeight = _useState2[1];
|
|
13102
|
+
var baseHeightForMeasure = React.useRef(0);
|
|
13103
|
+
var snapPointsData = React.useRef({
|
|
13104
|
+
list: [],
|
|
13105
|
+
minHeightOffset: 0,
|
|
13106
|
+
maxHeightOffset: 0
|
|
13107
|
+
});
|
|
13108
|
+
// Track drag
|
|
13109
|
+
var pan = React.useRef(new reactNative.Animated.Value(0)).current;
|
|
13110
|
+
var offset = React.useRef(0);
|
|
13111
|
+
var offsetBeforePan = React.useRef(0);
|
|
13112
|
+
var _useState3 = React.useState(-1),
|
|
13113
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
13114
|
+
animatedToValue = _useState4[0],
|
|
13115
|
+
setAnimatedToValue = _useState4[1];
|
|
13116
|
+
React.useEffect(function () {
|
|
13117
|
+
var id = pan.addListener(function (_ref2) {
|
|
13118
|
+
var value = _ref2.value;
|
|
13119
|
+
offset.current = value;
|
|
13120
|
+
});
|
|
13121
|
+
return function () {
|
|
13122
|
+
return pan.removeListener(id);
|
|
13123
|
+
};
|
|
13124
|
+
}, []);
|
|
13125
|
+
React.useEffect(function () {
|
|
13126
|
+
if (height > 0) {
|
|
13127
|
+
var initialOffset = getOffset(height, initialHeightPercentage || minimumHeightPercentage);
|
|
13128
|
+
setAnimatedToValue(initialOffset);
|
|
13129
|
+
}
|
|
13130
|
+
}, [height]);
|
|
13131
|
+
React.useEffect(function () {
|
|
13132
|
+
if (height > 0) {
|
|
13133
|
+
pan.setValue(height);
|
|
13134
|
+
offset.current = height;
|
|
13135
|
+
baseHeightForMeasure.current = height;
|
|
13136
|
+
// Calculate snap points information
|
|
13137
|
+
snapPointsData.current = calculateSnapPointsData(minimumHeightPercentage, height, snapPoints);
|
|
13138
|
+
}
|
|
13139
|
+
}, [height, minimumHeightPercentage]);
|
|
13140
|
+
React.useEffect(function () {
|
|
13141
|
+
if (animatedToValue >= 0) {
|
|
13142
|
+
var animation = reactNative.Animated.timing(pan, {
|
|
13143
|
+
toValue: animatedToValue,
|
|
13144
|
+
useNativeDriver: true,
|
|
13145
|
+
easing: reactNative.Easing.inOut(reactNative.Easing.cubic)
|
|
13146
|
+
});
|
|
13147
|
+
animation.start(function () {
|
|
13148
|
+
if (animatedToValue === 0) {
|
|
13149
|
+
onExpanded === null || onExpanded === void 0 ? void 0 : onExpanded();
|
|
13150
|
+
} else if (animatedToValue === getOffset(height, minimumHeightPercentage)) {
|
|
13151
|
+
onCollapsed === null || onCollapsed === void 0 ? void 0 : onCollapsed();
|
|
13152
|
+
}
|
|
13153
|
+
setAnimatedToValue(-1);
|
|
13154
|
+
});
|
|
13155
|
+
return function () {
|
|
13156
|
+
return animation.stop();
|
|
13157
|
+
};
|
|
13158
|
+
}
|
|
13159
|
+
}, [animatedToValue]);
|
|
13160
|
+
var panResponder = React.useRef(reactNative.PanResponder.create({
|
|
13161
|
+
onMoveShouldSetPanResponder: function onMoveShouldSetPanResponder() {
|
|
13162
|
+
return true;
|
|
13163
|
+
},
|
|
13164
|
+
onPanResponderGrant: function onPanResponderGrant() {
|
|
13165
|
+
offsetBeforePan.current = offset.current;
|
|
13166
|
+
pan.setOffset(offset.current);
|
|
13167
|
+
pan.setValue(0);
|
|
13168
|
+
},
|
|
13169
|
+
onPanResponderMove: function onPanResponderMove(_, gesture) {
|
|
13170
|
+
var _snapPointsData$curre;
|
|
13171
|
+
var panDistance = gesture.dy;
|
|
13172
|
+
// Moving toward top, stop at highest snap point
|
|
13173
|
+
if (offsetBeforePan.current + panDistance < 0) {
|
|
13174
|
+
pan.setValue(-offsetBeforePan.current);
|
|
13175
|
+
return;
|
|
13176
|
+
}
|
|
13177
|
+
// Moving toward bottom, stop at lowest snap point
|
|
13178
|
+
if (offsetBeforePan.current + panDistance > ((_snapPointsData$curre = snapPointsData.current) === null || _snapPointsData$curre === void 0 ? void 0 : _snapPointsData$curre.minHeightOffset)) {
|
|
13179
|
+
pan.setValue(baseHeightForMeasure.current - baseHeightForMeasure.current * (minimumHeightPercentage / 100) - offsetBeforePan.current);
|
|
13180
|
+
return;
|
|
13116
13181
|
}
|
|
13182
|
+
pan.setValue(panDistance);
|
|
13117
13183
|
},
|
|
13118
|
-
|
|
13184
|
+
onPanResponderRelease: function onPanResponderRelease(_, gesture) {
|
|
13185
|
+
pan.flattenOffset();
|
|
13186
|
+
// Attach to nearest snappoint
|
|
13187
|
+
var panDistance = gesture.dy;
|
|
13188
|
+
var offsetAfterPan = offsetBeforePan.current + panDistance;
|
|
13189
|
+
var animatedValue = calculateAnimatedToValue(offsetAfterPan, snapPointsData.current.list);
|
|
13190
|
+
setAnimatedToValue(animatedValue);
|
|
13191
|
+
}
|
|
13192
|
+
})).current;
|
|
13193
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledDragableContainer, {
|
|
13194
|
+
testID: testID,
|
|
13195
|
+
enableShadow: true,
|
|
13196
|
+
pointerEvents: "box-none"
|
|
13197
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledDragableDrawerContainer, {
|
|
13198
|
+
enableShadow: true,
|
|
13119
13199
|
style: {
|
|
13120
|
-
|
|
13200
|
+
transform: [{
|
|
13201
|
+
scaleY: baseHeightForMeasure.current > 0 ? 1 : 0
|
|
13202
|
+
}, {
|
|
13203
|
+
translateY: pan
|
|
13204
|
+
}]
|
|
13121
13205
|
},
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
var DatePicker = function DatePicker(_ref) {
|
|
13128
|
-
var _ref$variant = _ref.variant,
|
|
13129
|
-
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
13130
|
-
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
13131
|
-
if (variant === 'calendar') {
|
|
13132
|
-
return /*#__PURE__*/React__default["default"].createElement(DatePickerCalendar, props);
|
|
13133
|
-
}
|
|
13134
|
-
if (reactNative.Platform.OS === 'ios') {
|
|
13135
|
-
return /*#__PURE__*/React__default["default"].createElement(DatePickerIOS, props);
|
|
13136
|
-
}
|
|
13137
|
-
return /*#__PURE__*/React__default["default"].createElement(DatePickerAndroid, props);
|
|
13206
|
+
onLayout: function onLayout(_ref3) {
|
|
13207
|
+
var nativeEvent = _ref3.nativeEvent;
|
|
13208
|
+
setHeight(nativeEvent.layout.height);
|
|
13209
|
+
}
|
|
13210
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledHandlerContainer, panResponder.panHandlers, /*#__PURE__*/React__default["default"].createElement(StyledHandler, null)), children));
|
|
13138
13211
|
};
|
|
13139
13212
|
|
|
13140
|
-
var
|
|
13141
|
-
var
|
|
13142
|
-
|
|
13143
|
-
|
|
13144
|
-
|
|
13145
|
-
|
|
13146
|
-
|
|
13147
|
-
|
|
13148
|
-
|
|
13149
|
-
|
|
13150
|
-
|
|
13151
|
-
|
|
13152
|
-
|
|
13153
|
-
|
|
13154
|
-
|
|
13155
|
-
|
|
13156
|
-
enableShadow = _ref2.enableShadow;
|
|
13157
|
-
return _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
13158
|
-
shadowColor: enableShadow ? theme.__hd__.drawer.colors.shadow : 'transparent',
|
|
13159
|
-
shadowOffset: theme.__hd__.drawer.shadows.offset,
|
|
13160
|
-
shadowOpacity: theme.__hd__.drawer.shadows.opacity,
|
|
13161
|
-
shadowRadius: theme.__hd__.drawer.shadows.radius,
|
|
13162
|
-
overflow: 'hidden',
|
|
13163
|
-
zIndex: 9999,
|
|
13164
|
-
elevation: 9999,
|
|
13165
|
-
flexDirection: 'column-reverse'
|
|
13166
|
-
});
|
|
13167
|
-
});
|
|
13168
|
-
var StyledBackdrop$1 = index$a(AnimatedPressable$1)(function (_ref3) {
|
|
13169
|
-
var theme = _ref3.theme;
|
|
13170
|
-
return _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
13171
|
-
backgroundColor: theme.__hd__.drawer.colors.backdrop
|
|
13213
|
+
var Drawer = function Drawer(_ref) {
|
|
13214
|
+
var visible = _ref.visible,
|
|
13215
|
+
children = _ref.children,
|
|
13216
|
+
_ref$hasBackdrop = _ref.hasBackdrop,
|
|
13217
|
+
hasBackdrop = _ref$hasBackdrop === void 0 ? true : _ref$hasBackdrop,
|
|
13218
|
+
onDismiss = _ref.onDismiss,
|
|
13219
|
+
testID = _ref.testID;
|
|
13220
|
+
var animatedValue = React.useRef(new reactNative.Animated.Value(visible ? 1 : 0)).current;
|
|
13221
|
+
var _useState = React.useState(reactNative.Dimensions.get('window').height),
|
|
13222
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13223
|
+
height = _useState2[0],
|
|
13224
|
+
setHeight = _useState2[1];
|
|
13225
|
+
var enableShadow = visible && !hasBackdrop;
|
|
13226
|
+
var interpolateTranslateY = animatedValue.interpolate({
|
|
13227
|
+
inputRange: [0, 1],
|
|
13228
|
+
outputRange: [-height, 0]
|
|
13172
13229
|
});
|
|
13230
|
+
var interpolateBackdropOpacity = hasBackdrop ? animatedValue.interpolate({
|
|
13231
|
+
inputRange: [0, 1],
|
|
13232
|
+
outputRange: [0, 0.35]
|
|
13233
|
+
}) : 0;
|
|
13234
|
+
React.useEffect(function () {
|
|
13235
|
+
var animation = reactNative.Animated.timing(animatedValue, {
|
|
13236
|
+
toValue: visible ? 1 : 0,
|
|
13237
|
+
easing: reactNative.Easing.inOut(reactNative.Easing.cubic),
|
|
13238
|
+
useNativeDriver: true
|
|
13239
|
+
});
|
|
13240
|
+
animation.start();
|
|
13241
|
+
return function () {
|
|
13242
|
+
return animation.stop();
|
|
13243
|
+
};
|
|
13244
|
+
}, [visible]);
|
|
13245
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$3, {
|
|
13246
|
+
testID: testID,
|
|
13247
|
+
enableShadow: enableShadow,
|
|
13248
|
+
pointerEvents: "box-none"
|
|
13249
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledBackdrop$1, {
|
|
13250
|
+
pointerEvents: visible ? 'auto' : 'box-none',
|
|
13251
|
+
onPress: onDismiss,
|
|
13252
|
+
style: {
|
|
13253
|
+
opacity: interpolateBackdropOpacity
|
|
13254
|
+
}
|
|
13255
|
+
}), /*#__PURE__*/React__default["default"].createElement(StyledDrawerContainer, {
|
|
13256
|
+
enableShadow: enableShadow,
|
|
13257
|
+
onLayout: function onLayout(_ref2) {
|
|
13258
|
+
var nativeEvent = _ref2.nativeEvent;
|
|
13259
|
+
return setHeight(nativeEvent.layout.height);
|
|
13260
|
+
},
|
|
13261
|
+
style: {
|
|
13262
|
+
transform: [{
|
|
13263
|
+
translateY: interpolateTranslateY
|
|
13264
|
+
}]
|
|
13265
|
+
}
|
|
13266
|
+
}, children));
|
|
13267
|
+
};
|
|
13268
|
+
var index$7 = Object.assign(Drawer, {
|
|
13269
|
+
Dragable: DragableDrawer
|
|
13173
13270
|
});
|
|
13174
|
-
|
|
13175
|
-
|
|
13176
|
-
|
|
13271
|
+
|
|
13272
|
+
var StyledWrapper$6 = index$a(reactNative.View)(function (_ref) {
|
|
13273
|
+
var theme = _ref.theme;
|
|
13177
13274
|
return {
|
|
13178
|
-
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
|
|
13182
|
-
|
|
13275
|
+
display: 'flex',
|
|
13276
|
+
flex: 1,
|
|
13277
|
+
flexDirection: 'column',
|
|
13278
|
+
alignItems: 'center',
|
|
13279
|
+
justifyContent: 'center',
|
|
13280
|
+
padding: theme.__hd__.empty.space.wrapperPadding
|
|
13183
13281
|
};
|
|
13184
13282
|
});
|
|
13185
|
-
var
|
|
13186
|
-
var theme =
|
|
13187
|
-
|
|
13283
|
+
var StyledTitle = index$a(Typography.Title)(function (_ref2) {
|
|
13284
|
+
var theme = _ref2.theme,
|
|
13285
|
+
themeVariant = _ref2.themeVariant;
|
|
13188
13286
|
return {
|
|
13189
|
-
|
|
13190
|
-
|
|
13191
|
-
|
|
13192
|
-
elevation: enableShadow ? theme.__hd__.drawer.shadows.elevation : undefined,
|
|
13193
|
-
overflow: 'hidden',
|
|
13194
|
-
maxHeight: '100%'
|
|
13287
|
+
textAlign: 'center',
|
|
13288
|
+
marginBottom: theme.__hd__.empty.space.titleMargin,
|
|
13289
|
+
color: themeVariant === 'dark' ? theme.__hd__.empty.colors.invertedText : theme.__hd__.empty.colors.text
|
|
13195
13290
|
};
|
|
13196
13291
|
});
|
|
13197
|
-
var
|
|
13198
|
-
var theme =
|
|
13292
|
+
var StyledDescription = index$a(Typography.Body)(function (_ref3) {
|
|
13293
|
+
var theme = _ref3.theme,
|
|
13294
|
+
themeVariant = _ref3.themeVariant;
|
|
13199
13295
|
return {
|
|
13200
|
-
|
|
13201
|
-
|
|
13202
|
-
alignItems: 'center'
|
|
13296
|
+
textAlign: 'center',
|
|
13297
|
+
color: themeVariant === 'dark' ? theme.__hd__.empty.colors.invertedSubduedText : theme.__hd__.empty.colors.subduedText
|
|
13203
13298
|
};
|
|
13204
13299
|
});
|
|
13205
|
-
|
|
13206
|
-
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
|
|
13210
|
-
|
|
13211
|
-
|
|
13300
|
+
|
|
13301
|
+
var Empty = function Empty(_ref) {
|
|
13302
|
+
var image = _ref.image,
|
|
13303
|
+
title = _ref.title,
|
|
13304
|
+
description = _ref.description,
|
|
13305
|
+
style = _ref.style,
|
|
13306
|
+
testID = _ref.testID,
|
|
13307
|
+
_ref$variant = _ref.variant,
|
|
13308
|
+
variant = _ref$variant === void 0 ? 'light' : _ref$variant;
|
|
13309
|
+
var theme = useTheme();
|
|
13310
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledWrapper$6, {
|
|
13311
|
+
style: style,
|
|
13312
|
+
testID: testID
|
|
13313
|
+
}, image !== undefined && /*#__PURE__*/React__default["default"].cloneElement(image, _objectSpread2(_objectSpread2({}, image.props), {}, {
|
|
13314
|
+
style: [{
|
|
13315
|
+
marginBottom: theme.__hd__.empty.space.imageMargin
|
|
13316
|
+
}, image.props.style]
|
|
13317
|
+
})), /*#__PURE__*/React__default["default"].createElement(StyledTitle, {
|
|
13318
|
+
themeVariant: variant,
|
|
13319
|
+
level: "h4",
|
|
13320
|
+
typeface: "playful"
|
|
13321
|
+
}, title), !!description && /*#__PURE__*/React__default["default"].createElement(StyledDescription, {
|
|
13322
|
+
themeVariant: variant,
|
|
13323
|
+
typeface: "playful"
|
|
13324
|
+
}, description));
|
|
13325
|
+
};
|
|
13326
|
+
|
|
13327
|
+
var customAlphabet = function customAlphabet(alphabet) {
|
|
13328
|
+
var defaultSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 21;
|
|
13329
|
+
return function () {
|
|
13330
|
+
var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultSize;
|
|
13331
|
+
var id = '';
|
|
13332
|
+
var i = size;
|
|
13333
|
+
while (i--) {
|
|
13334
|
+
id += alphabet[Math.random() * alphabet.length | 0];
|
|
13335
|
+
}
|
|
13336
|
+
return id;
|
|
13212
13337
|
};
|
|
13213
|
-
}
|
|
13338
|
+
};
|
|
13339
|
+
|
|
13340
|
+
var ACTIONS;
|
|
13341
|
+
(function (ACTIONS) {
|
|
13342
|
+
ACTIONS[ACTIONS["REGISTER_HOST"] = 0] = "REGISTER_HOST";
|
|
13343
|
+
ACTIONS[ACTIONS["DEREGISTER_HOST"] = 1] = "DEREGISTER_HOST";
|
|
13344
|
+
ACTIONS[ACTIONS["ADD_UPDATE_PORTAL"] = 2] = "ADD_UPDATE_PORTAL";
|
|
13345
|
+
ACTIONS[ACTIONS["REMOVE_PORTAL"] = 3] = "REMOVE_PORTAL";
|
|
13346
|
+
})(ACTIONS || (ACTIONS = {}));
|
|
13347
|
+
var INITIAL_STATE = {};
|
|
13348
|
+
|
|
13349
|
+
var PortalStateContext = /*#__PURE__*/React.createContext(null);
|
|
13350
|
+
var PortalDispatchContext = /*#__PURE__*/React.createContext(null);
|
|
13214
13351
|
|
|
13215
|
-
var
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
-
|
|
13219
|
-
|
|
13220
|
-
|
|
13221
|
-
var
|
|
13222
|
-
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
});
|
|
13227
|
-
var
|
|
13352
|
+
var usePortal = function usePortal() {
|
|
13353
|
+
var hostName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'root';
|
|
13354
|
+
var dispatch = React.useContext(PortalDispatchContext);
|
|
13355
|
+
if (dispatch === null) {
|
|
13356
|
+
throw new Error("You must add 'PortalProvider' to the root component.");
|
|
13357
|
+
}
|
|
13358
|
+
var registerHost = React.useCallback(function () {
|
|
13359
|
+
dispatch({
|
|
13360
|
+
type: ACTIONS.REGISTER_HOST,
|
|
13361
|
+
hostName: hostName
|
|
13362
|
+
});
|
|
13363
|
+
}, []);
|
|
13364
|
+
var deregisterHost = React.useCallback(function () {
|
|
13365
|
+
dispatch({
|
|
13366
|
+
type: ACTIONS.DEREGISTER_HOST,
|
|
13367
|
+
hostName: hostName
|
|
13368
|
+
});
|
|
13369
|
+
}, []);
|
|
13370
|
+
var addUpdatePortal = React.useCallback(function (name, node) {
|
|
13371
|
+
dispatch({
|
|
13372
|
+
type: ACTIONS.ADD_UPDATE_PORTAL,
|
|
13373
|
+
hostName: hostName,
|
|
13374
|
+
portalName: name,
|
|
13375
|
+
node: node
|
|
13376
|
+
});
|
|
13377
|
+
}, []);
|
|
13378
|
+
var removePortal = React.useCallback(function (name) {
|
|
13379
|
+
dispatch({
|
|
13380
|
+
type: ACTIONS.REMOVE_PORTAL,
|
|
13381
|
+
hostName: hostName,
|
|
13382
|
+
portalName: name
|
|
13383
|
+
});
|
|
13384
|
+
}, []);
|
|
13228
13385
|
return {
|
|
13229
|
-
|
|
13230
|
-
|
|
13231
|
-
|
|
13386
|
+
registerHost: registerHost,
|
|
13387
|
+
deregisterHost: deregisterHost,
|
|
13388
|
+
addPortal: addUpdatePortal,
|
|
13389
|
+
updatePortal: addUpdatePortal,
|
|
13390
|
+
removePortal: removePortal
|
|
13232
13391
|
};
|
|
13233
13392
|
};
|
|
13234
13393
|
|
|
13235
|
-
var
|
|
13236
|
-
var
|
|
13237
|
-
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
return
|
|
13394
|
+
var usePortalState = function usePortalState(hostName) {
|
|
13395
|
+
var state = React.useContext(PortalStateContext);
|
|
13396
|
+
if (state === null) {
|
|
13397
|
+
throw new Error("You must add 'PortalProvider' to the root component.");
|
|
13398
|
+
}
|
|
13399
|
+
return state[hostName] || [];
|
|
13241
13400
|
};
|
|
13242
13401
|
|
|
13243
|
-
var
|
|
13244
|
-
var
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
snapPoints = _ref$snapPoints === void 0 ? [] : _ref$snapPoints,
|
|
13250
|
-
onExpanded = _ref.onExpanded,
|
|
13251
|
-
onCollapsed = _ref.onCollapsed,
|
|
13252
|
-
testID = _ref.testID;
|
|
13253
|
-
var _useState = React.useState(0),
|
|
13254
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
13255
|
-
height = _useState2[0],
|
|
13256
|
-
setHeight = _useState2[1];
|
|
13257
|
-
var baseHeightForMeasure = React.useRef(0);
|
|
13258
|
-
var snapPointsData = React.useRef({
|
|
13259
|
-
list: [],
|
|
13260
|
-
minHeightOffset: 0,
|
|
13261
|
-
maxHeightOffset: 0
|
|
13262
|
-
});
|
|
13263
|
-
// Track drag
|
|
13264
|
-
var pan = React.useRef(new reactNative.Animated.Value(0)).current;
|
|
13265
|
-
var offset = React.useRef(0);
|
|
13266
|
-
var offsetBeforePan = React.useRef(0);
|
|
13267
|
-
var _useState3 = React.useState(-1),
|
|
13268
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
13269
|
-
animatedToValue = _useState4[0],
|
|
13270
|
-
setAnimatedToValue = _useState4[1];
|
|
13402
|
+
var PortalHostComponent = function PortalHostComponent(_ref) {
|
|
13403
|
+
var name = _ref.name;
|
|
13404
|
+
var state = usePortalState(name);
|
|
13405
|
+
var _usePortal = usePortal(name),
|
|
13406
|
+
registerHost = _usePortal.registerHost,
|
|
13407
|
+
deregisterHost = _usePortal.deregisterHost;
|
|
13271
13408
|
React.useEffect(function () {
|
|
13272
|
-
|
|
13273
|
-
var value = _ref2.value;
|
|
13274
|
-
offset.current = value;
|
|
13275
|
-
});
|
|
13409
|
+
registerHost();
|
|
13276
13410
|
return function () {
|
|
13277
|
-
|
|
13411
|
+
deregisterHost();
|
|
13278
13412
|
};
|
|
13279
13413
|
}, []);
|
|
13280
|
-
|
|
13281
|
-
|
|
13282
|
-
|
|
13283
|
-
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
|
|
13292
|
-
|
|
13293
|
-
|
|
13294
|
-
}, [
|
|
13295
|
-
|
|
13296
|
-
|
|
13297
|
-
|
|
13298
|
-
|
|
13299
|
-
|
|
13300
|
-
|
|
13301
|
-
|
|
13302
|
-
|
|
13303
|
-
|
|
13304
|
-
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
}
|
|
13308
|
-
setAnimatedToValue(-1);
|
|
13309
|
-
});
|
|
13310
|
-
return function () {
|
|
13311
|
-
return animation.stop();
|
|
13312
|
-
};
|
|
13313
|
-
}
|
|
13314
|
-
}, [animatedToValue]);
|
|
13315
|
-
var panResponder = React.useRef(reactNative.PanResponder.create({
|
|
13316
|
-
onMoveShouldSetPanResponder: function onMoveShouldSetPanResponder() {
|
|
13317
|
-
return true;
|
|
13318
|
-
},
|
|
13319
|
-
onPanResponderGrant: function onPanResponderGrant() {
|
|
13320
|
-
offsetBeforePan.current = offset.current;
|
|
13321
|
-
pan.setOffset(offset.current);
|
|
13322
|
-
pan.setValue(0);
|
|
13323
|
-
},
|
|
13324
|
-
onPanResponderMove: function onPanResponderMove(_, gesture) {
|
|
13325
|
-
var _snapPointsData$curre;
|
|
13326
|
-
var panDistance = gesture.dy;
|
|
13327
|
-
// Moving toward top, stop at highest snap point
|
|
13328
|
-
if (offsetBeforePan.current + panDistance < 0) {
|
|
13329
|
-
pan.setValue(-offsetBeforePan.current);
|
|
13330
|
-
return;
|
|
13331
|
-
}
|
|
13332
|
-
// Moving toward bottom, stop at lowest snap point
|
|
13333
|
-
if (offsetBeforePan.current + panDistance > ((_snapPointsData$curre = snapPointsData.current) === null || _snapPointsData$curre === void 0 ? void 0 : _snapPointsData$curre.minHeightOffset)) {
|
|
13334
|
-
pan.setValue(baseHeightForMeasure.current - baseHeightForMeasure.current * (minimumHeightPercentage / 100) - offsetBeforePan.current);
|
|
13335
|
-
return;
|
|
13414
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, state.map(function (item) {
|
|
13415
|
+
return item.node;
|
|
13416
|
+
}));
|
|
13417
|
+
};
|
|
13418
|
+
var PortalHost = /*#__PURE__*/React.memo(PortalHostComponent);
|
|
13419
|
+
PortalHost.displayName = 'PortalHost';
|
|
13420
|
+
|
|
13421
|
+
var registerHostIfNotExist = function registerHostIfNotExist(state, hostName) {
|
|
13422
|
+
if (!(hostName in state)) {
|
|
13423
|
+
return _objectSpread2(_objectSpread2({}, state), {}, _defineProperty({}, hostName, []));
|
|
13424
|
+
}
|
|
13425
|
+
return _objectSpread2({}, state);
|
|
13426
|
+
};
|
|
13427
|
+
var deregisterHost = function deregisterHost(state, hostName) {
|
|
13428
|
+
return _objectSpread2({}, omit([hostName], state));
|
|
13429
|
+
};
|
|
13430
|
+
var addUpdatePortal = function addUpdatePortal(state, hostName, portalName, node) {
|
|
13431
|
+
var newState = registerHostIfNotExist(state, hostName);
|
|
13432
|
+
var index = newState[hostName].findIndex(function (item) {
|
|
13433
|
+
return item.name === portalName;
|
|
13434
|
+
});
|
|
13435
|
+
if (index !== -1) {
|
|
13436
|
+
return _objectSpread2(_objectSpread2({}, newState), {}, _defineProperty({}, hostName, newState[hostName].map(function (item, i) {
|
|
13437
|
+
if (index === i) {
|
|
13438
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13439
|
+
node: node
|
|
13440
|
+
});
|
|
13336
13441
|
}
|
|
13337
|
-
|
|
13338
|
-
}
|
|
13339
|
-
|
|
13340
|
-
|
|
13341
|
-
|
|
13342
|
-
|
|
13343
|
-
|
|
13344
|
-
|
|
13345
|
-
|
|
13346
|
-
|
|
13347
|
-
|
|
13348
|
-
|
|
13349
|
-
|
|
13350
|
-
|
|
13351
|
-
|
|
13352
|
-
|
|
13353
|
-
|
|
13354
|
-
|
|
13355
|
-
|
|
13356
|
-
|
|
13357
|
-
|
|
13358
|
-
|
|
13359
|
-
|
|
13360
|
-
|
|
13361
|
-
|
|
13362
|
-
|
|
13363
|
-
|
|
13364
|
-
|
|
13365
|
-
|
|
13442
|
+
return item;
|
|
13443
|
+
})));
|
|
13444
|
+
}
|
|
13445
|
+
return _objectSpread2(_objectSpread2({}, newState), {}, _defineProperty({}, hostName, [].concat(_toConsumableArray(newState[hostName]), [{
|
|
13446
|
+
name: portalName,
|
|
13447
|
+
node: node
|
|
13448
|
+
}])));
|
|
13449
|
+
};
|
|
13450
|
+
var removePortal = function removePortal(state, hostName, portalName) {
|
|
13451
|
+
if (!(hostName in state)) {
|
|
13452
|
+
return _objectSpread2({}, state);
|
|
13453
|
+
}
|
|
13454
|
+
return _objectSpread2(_objectSpread2({}, state), {}, _defineProperty({}, hostName, state[hostName].filter(function (item) {
|
|
13455
|
+
return item.name !== portalName;
|
|
13456
|
+
})));
|
|
13457
|
+
};
|
|
13458
|
+
var reducer = function reducer(state, action) {
|
|
13459
|
+
var type = action.type;
|
|
13460
|
+
switch (type) {
|
|
13461
|
+
case ACTIONS.REGISTER_HOST:
|
|
13462
|
+
return registerHostIfNotExist(state, action.hostName);
|
|
13463
|
+
case ACTIONS.DEREGISTER_HOST:
|
|
13464
|
+
return deregisterHost(state, action.hostName);
|
|
13465
|
+
case ACTIONS.ADD_UPDATE_PORTAL:
|
|
13466
|
+
return addUpdatePortal(state, action.hostName, action.portalName, action.node);
|
|
13467
|
+
case ACTIONS.REMOVE_PORTAL:
|
|
13468
|
+
return removePortal(state, action.hostName, action.portalName);
|
|
13469
|
+
default:
|
|
13470
|
+
return _objectSpread2({}, state);
|
|
13471
|
+
}
|
|
13472
|
+
};
|
|
13473
|
+
|
|
13474
|
+
var PortalProviderComponent = function PortalProviderComponent(_ref) {
|
|
13475
|
+
var _ref$rootHostName = _ref.rootHostName,
|
|
13476
|
+
rootHostName = _ref$rootHostName === void 0 ? 'root' : _ref$rootHostName,
|
|
13477
|
+
children = _ref.children;
|
|
13478
|
+
var _useReducer = React.useReducer(reducer, INITIAL_STATE),
|
|
13479
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
13480
|
+
state = _useReducer2[0],
|
|
13481
|
+
dispatch = _useReducer2[1];
|
|
13482
|
+
return /*#__PURE__*/React__default["default"].createElement(PortalDispatchContext.Provider, {
|
|
13483
|
+
value: dispatch
|
|
13484
|
+
}, /*#__PURE__*/React__default["default"].createElement(PortalStateContext.Provider, {
|
|
13485
|
+
value: state
|
|
13486
|
+
}, children, /*#__PURE__*/React__default["default"].createElement(PortalHost, {
|
|
13487
|
+
name: rootHostName
|
|
13488
|
+
})));
|
|
13366
13489
|
};
|
|
13490
|
+
var PortalProvider = /*#__PURE__*/React.memo(PortalProviderComponent);
|
|
13491
|
+
PortalProvider.displayName = 'PortalProvider';
|
|
13367
13492
|
|
|
13368
|
-
var
|
|
13369
|
-
|
|
13493
|
+
var nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz0123456789', 10);
|
|
13494
|
+
var PortalComponent = function PortalComponent(_ref) {
|
|
13495
|
+
var name = _ref.name,
|
|
13496
|
+
hostName = _ref.hostName,
|
|
13370
13497
|
children = _ref.children,
|
|
13371
|
-
|
|
13372
|
-
|
|
13373
|
-
|
|
13374
|
-
|
|
13375
|
-
|
|
13376
|
-
var
|
|
13377
|
-
|
|
13378
|
-
|
|
13379
|
-
|
|
13380
|
-
|
|
13381
|
-
|
|
13498
|
+
theme = _ref.theme;
|
|
13499
|
+
var defaultTheme = useTheme();
|
|
13500
|
+
var _usePortal = usePortal(hostName),
|
|
13501
|
+
addUpdatePortal = _usePortal.addPortal,
|
|
13502
|
+
removePortal = _usePortal.removePortal;
|
|
13503
|
+
var nameOrRandom = React.useMemo(function () {
|
|
13504
|
+
return name || nanoid();
|
|
13505
|
+
}, [name]);
|
|
13506
|
+
var ChildrenComponent = React.useMemo(function () {
|
|
13507
|
+
return /*#__PURE__*/React__default["default"].createElement(ThemeProvider, {
|
|
13508
|
+
theme: theme || defaultTheme
|
|
13509
|
+
}, children);
|
|
13510
|
+
}, [theme, children, defaultTheme]);
|
|
13511
|
+
React.useLayoutEffect(function () {
|
|
13512
|
+
addUpdatePortal(nameOrRandom, ChildrenComponent);
|
|
13513
|
+
return function () {
|
|
13514
|
+
removePortal(nameOrRandom);
|
|
13515
|
+
};
|
|
13516
|
+
}, [addUpdatePortal]);
|
|
13517
|
+
React.useLayoutEffect(function () {
|
|
13518
|
+
addUpdatePortal(nameOrRandom, ChildrenComponent);
|
|
13519
|
+
}, [ChildrenComponent]);
|
|
13520
|
+
return null;
|
|
13521
|
+
};
|
|
13522
|
+
var Portal = /*#__PURE__*/React.memo(PortalComponent);
|
|
13523
|
+
Portal.displayName = 'Portal';
|
|
13524
|
+
var Portal$1 = Object.assign(Portal, {
|
|
13525
|
+
Provider: PortalProvider,
|
|
13526
|
+
Host: PortalHost
|
|
13527
|
+
});
|
|
13528
|
+
|
|
13529
|
+
var _excluded$e = ["visible"];
|
|
13530
|
+
var DEFAULT_BACKDROP_OPACITY = 0.4;
|
|
13531
|
+
var DEFAULT_ANIMATION_CONFIG = {
|
|
13532
|
+
easing: reactNative.Easing.inOut(reactNative.Easing.cubic),
|
|
13533
|
+
useNativeDriver: reactNative.Platform.OS !== 'web',
|
|
13534
|
+
duration: 400
|
|
13535
|
+
};
|
|
13536
|
+
var Modal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
13537
|
+
var children = _ref.children,
|
|
13538
|
+
onShow = _ref.onShow,
|
|
13539
|
+
onRequestClose = _ref.onRequestClose,
|
|
13540
|
+
testID = _ref.testID,
|
|
13541
|
+
_ref$animationType = _ref.animationType,
|
|
13542
|
+
animationType = _ref$animationType === void 0 ? 'none' : _ref$animationType,
|
|
13543
|
+
_ref$transparent = _ref.transparent,
|
|
13544
|
+
transparent = _ref$transparent === void 0 ? false : _ref$transparent,
|
|
13545
|
+
onDismiss = _ref.onDismiss;
|
|
13546
|
+
var theme = useTheme();
|
|
13547
|
+
var animatedBackdropValue = React.useRef(new reactNative.Animated.Value(0)).current;
|
|
13548
|
+
var animatedModalValue = React.useRef(new reactNative.Animated.Value(0)).current;
|
|
13549
|
+
// Show or hide the backdrop and modal content
|
|
13550
|
+
var animateBackdropAndContent = React.useCallback(function (_ref2) {
|
|
13551
|
+
var toValue = _ref2.toValue,
|
|
13552
|
+
callback = _ref2.callback;
|
|
13553
|
+
if (animationType !== 'none') {
|
|
13554
|
+
// Backdrop animation
|
|
13555
|
+
if (!transparent) {
|
|
13556
|
+
reactNative.Animated.timing(animatedBackdropValue, _objectSpread2({
|
|
13557
|
+
toValue: toValue
|
|
13558
|
+
}, DEFAULT_ANIMATION_CONFIG)).start();
|
|
13559
|
+
}
|
|
13560
|
+
// Modal content animation
|
|
13561
|
+
reactNative.Animated.timing(animatedModalValue, _objectSpread2({
|
|
13562
|
+
toValue: toValue
|
|
13563
|
+
}, DEFAULT_ANIMATION_CONFIG)).start(callback);
|
|
13564
|
+
} else {
|
|
13565
|
+
callback === null || callback === void 0 ? void 0 : callback();
|
|
13566
|
+
}
|
|
13567
|
+
}, [animationType, onShow, transparent]);
|
|
13568
|
+
var backdropOpacityAnimation = animatedBackdropValue.interpolate({
|
|
13382
13569
|
inputRange: [0, 1],
|
|
13383
|
-
outputRange: [
|
|
13570
|
+
outputRange: [0, DEFAULT_BACKDROP_OPACITY]
|
|
13384
13571
|
});
|
|
13385
|
-
var
|
|
13572
|
+
var modalAnimation = animatedModalValue.interpolate({
|
|
13386
13573
|
inputRange: [0, 1],
|
|
13387
|
-
outputRange: [
|
|
13388
|
-
})
|
|
13574
|
+
outputRange: animationType === 'slide' ? [reactNative.Dimensions.get('window').height, 0] : [0, 1]
|
|
13575
|
+
});
|
|
13576
|
+
React.useImperativeHandle(ref, function () {
|
|
13577
|
+
return {
|
|
13578
|
+
show: function show() {
|
|
13579
|
+
animateBackdropAndContent({
|
|
13580
|
+
toValue: 1,
|
|
13581
|
+
callback: onShow
|
|
13582
|
+
});
|
|
13583
|
+
},
|
|
13584
|
+
hide: function hide(wrapperCallback) {
|
|
13585
|
+
animateBackdropAndContent({
|
|
13586
|
+
toValue: 0,
|
|
13587
|
+
callback: function callback() {
|
|
13588
|
+
if (reactNative.Platform.OS === 'ios') {
|
|
13589
|
+
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
13590
|
+
}
|
|
13591
|
+
wrapperCallback();
|
|
13592
|
+
}
|
|
13593
|
+
});
|
|
13594
|
+
}
|
|
13595
|
+
};
|
|
13596
|
+
}, [onDismiss, onShow, animateBackdropAndContent]);
|
|
13597
|
+
// Back button handler
|
|
13389
13598
|
React.useEffect(function () {
|
|
13390
|
-
var
|
|
13391
|
-
|
|
13392
|
-
|
|
13393
|
-
useNativeDriver: true
|
|
13599
|
+
var backHandler = reactNative.BackHandler.addEventListener('hardwareBackPress', function () {
|
|
13600
|
+
onRequestClose === null || onRequestClose === void 0 ? void 0 : onRequestClose();
|
|
13601
|
+
return true;
|
|
13394
13602
|
});
|
|
13395
|
-
animation.start();
|
|
13396
13603
|
return function () {
|
|
13397
|
-
return
|
|
13604
|
+
return backHandler.remove();
|
|
13398
13605
|
};
|
|
13399
|
-
}, [
|
|
13400
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
13606
|
+
}, [onRequestClose]);
|
|
13607
|
+
return /*#__PURE__*/React__default["default"].createElement(Portal$1, null, /*#__PURE__*/React__default["default"].createElement(reactNative.Animated.View, {
|
|
13608
|
+
style: _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
13609
|
+
backgroundColor: transparent ? 'transparent' : theme.colors.overlayGlobalSurface,
|
|
13610
|
+
opacity: animationType !== 'none' ? backdropOpacityAnimation : DEFAULT_BACKDROP_OPACITY
|
|
13611
|
+
})
|
|
13612
|
+
}), /*#__PURE__*/React__default["default"].createElement(reactNative.Animated.View, {
|
|
13401
13613
|
testID: testID,
|
|
13402
|
-
|
|
13403
|
-
|
|
13404
|
-
}, /*#__PURE__*/React__default["default"].createElement(StyledBackdrop$1, {
|
|
13405
|
-
pointerEvents: visible ? 'auto' : 'box-none',
|
|
13406
|
-
onPress: onDismiss,
|
|
13407
|
-
style: {
|
|
13408
|
-
opacity: interpolateBackdropOpacity
|
|
13409
|
-
}
|
|
13410
|
-
}), /*#__PURE__*/React__default["default"].createElement(StyledDrawerContainer, {
|
|
13411
|
-
enableShadow: enableShadow,
|
|
13412
|
-
onLayout: function onLayout(_ref2) {
|
|
13413
|
-
var nativeEvent = _ref2.nativeEvent;
|
|
13414
|
-
return setHeight(nativeEvent.layout.height);
|
|
13415
|
-
},
|
|
13416
|
-
style: {
|
|
13614
|
+
style: _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
13615
|
+
opacity: animationType === 'fade' ? modalAnimation : 1,
|
|
13417
13616
|
transform: [{
|
|
13418
|
-
translateY:
|
|
13617
|
+
translateY: animationType === 'slide' ? modalAnimation : 0
|
|
13419
13618
|
}]
|
|
13420
|
-
}
|
|
13619
|
+
})
|
|
13421
13620
|
}, children));
|
|
13422
|
-
};
|
|
13423
|
-
var index$7 = Object.assign(Drawer, {
|
|
13424
|
-
Dragable: DragableDrawer
|
|
13425
|
-
});
|
|
13426
|
-
|
|
13427
|
-
var StyledWrapper$6 = index$a(reactNative.View)(function (_ref) {
|
|
13428
|
-
var theme = _ref.theme;
|
|
13429
|
-
return {
|
|
13430
|
-
display: 'flex',
|
|
13431
|
-
flex: 1,
|
|
13432
|
-
flexDirection: 'column',
|
|
13433
|
-
alignItems: 'center',
|
|
13434
|
-
justifyContent: 'center',
|
|
13435
|
-
padding: theme.__hd__.empty.space.wrapperPadding
|
|
13436
|
-
};
|
|
13437
|
-
});
|
|
13438
|
-
var StyledTitle = index$a(Typography.Title)(function (_ref2) {
|
|
13439
|
-
var theme = _ref2.theme,
|
|
13440
|
-
themeVariant = _ref2.themeVariant;
|
|
13441
|
-
return {
|
|
13442
|
-
textAlign: 'center',
|
|
13443
|
-
marginBottom: theme.__hd__.empty.space.titleMargin,
|
|
13444
|
-
color: themeVariant === 'dark' ? theme.__hd__.empty.colors.invertedText : theme.__hd__.empty.colors.text
|
|
13445
|
-
};
|
|
13446
|
-
});
|
|
13447
|
-
var StyledDescription = index$a(Typography.Body)(function (_ref3) {
|
|
13448
|
-
var theme = _ref3.theme,
|
|
13449
|
-
themeVariant = _ref3.themeVariant;
|
|
13450
|
-
return {
|
|
13451
|
-
textAlign: 'center',
|
|
13452
|
-
color: themeVariant === 'dark' ? theme.__hd__.empty.colors.invertedSubduedText : theme.__hd__.empty.colors.subduedText
|
|
13453
|
-
};
|
|
13454
13621
|
});
|
|
13455
|
-
|
|
13456
|
-
var
|
|
13457
|
-
|
|
13458
|
-
|
|
13459
|
-
|
|
13460
|
-
|
|
13461
|
-
|
|
13462
|
-
|
|
13463
|
-
|
|
13464
|
-
|
|
13465
|
-
|
|
13466
|
-
|
|
13467
|
-
|
|
13468
|
-
|
|
13469
|
-
|
|
13470
|
-
|
|
13471
|
-
|
|
13472
|
-
|
|
13473
|
-
|
|
13474
|
-
|
|
13475
|
-
|
|
13476
|
-
|
|
13477
|
-
|
|
13478
|
-
|
|
13479
|
-
|
|
13622
|
+
var ModalWrapper = function ModalWrapper(_ref3) {
|
|
13623
|
+
var _ref3$visible = _ref3.visible,
|
|
13624
|
+
visible = _ref3$visible === void 0 ? true : _ref3$visible,
|
|
13625
|
+
props = _objectWithoutProperties(_ref3, _excluded$e);
|
|
13626
|
+
var modalRef = React.useRef(null);
|
|
13627
|
+
var _useState = React.useState(visible),
|
|
13628
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13629
|
+
internalVisible = _useState2[0],
|
|
13630
|
+
setInternalVisible = _useState2[1];
|
|
13631
|
+
React.useEffect(function () {
|
|
13632
|
+
if (visible) {
|
|
13633
|
+
setInternalVisible(true);
|
|
13634
|
+
} else {
|
|
13635
|
+
var _modalRef$current;
|
|
13636
|
+
// Wait for animation to finish before hiding the modal
|
|
13637
|
+
(_modalRef$current = modalRef.current) === null || _modalRef$current === void 0 ? void 0 : _modalRef$current.hide(function () {
|
|
13638
|
+
return setInternalVisible(false);
|
|
13639
|
+
});
|
|
13640
|
+
}
|
|
13641
|
+
}, [visible]);
|
|
13642
|
+
React.useEffect(function () {
|
|
13643
|
+
if (internalVisible) {
|
|
13644
|
+
var _modalRef$current2;
|
|
13645
|
+
(_modalRef$current2 = modalRef.current) === null || _modalRef$current2 === void 0 ? void 0 : _modalRef$current2.show();
|
|
13646
|
+
}
|
|
13647
|
+
}, [internalVisible]);
|
|
13648
|
+
return internalVisible ? /*#__PURE__*/React__default["default"].createElement(Modal, _extends$1({
|
|
13649
|
+
ref: modalRef
|
|
13650
|
+
}, props)) : null;
|
|
13480
13651
|
};
|
|
13481
13652
|
|
|
13482
13653
|
var StyledErrorModal = index$a(ModalWrapper)({
|
|
@@ -33918,6 +34089,7 @@ exports.Calendar = Calendar;
|
|
|
33918
34089
|
exports.Card = Card$1;
|
|
33919
34090
|
exports.Carousel = index$8;
|
|
33920
34091
|
exports.Checkbox = Checkbox;
|
|
34092
|
+
exports.Chip = Chip;
|
|
33921
34093
|
exports.Collapse = Collapse;
|
|
33922
34094
|
exports.ContentNavigator = ContentNavigator;
|
|
33923
34095
|
exports.DatePicker = DatePicker;
|