@hero-design/rn 8.139.3 → 8.141.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/CHANGELOG.md +12 -0
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +397 -125
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +395 -122
- package/package.json +1 -1
- package/src/components/Confetti/Confetti.tsx +239 -0
- package/src/components/Confetti/ConfettiProvider.tsx +61 -0
- package/src/components/Confetti/computeXKeyframes.ts +38 -0
- package/src/components/Confetti/index.tsx +12 -0
- package/src/components/Confetti/useConfetti.ts +13 -0
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +2 -0
- package/src/components/Icon/index.tsx +4 -0
- package/src/components/Illustration/assets/Confetti.tsx +2 -0
- package/src/index.ts +4 -0
- package/types/components/Confetti/Confetti.d.ts +22 -0
- package/types/components/Confetti/ConfettiProvider.d.ts +9 -0
- package/types/components/Confetti/computeXKeyframes.d.ts +9 -0
- package/types/components/Confetti/index.d.ts +8 -0
- package/types/components/Confetti/useConfetti.d.ts +4 -0
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/Illustration/assets/Confetti.d.ts +4 -1
- package/types/components/Illustration/illustrations.d.ts +4 -1
- package/types/components/TextInput/index.d.ts +1 -1
- package/types/index.d.ts +3 -1
package/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as reactNative from 'react-native';
|
|
2
|
-
import { StyleSheet as StyleSheet$1, Platform, Dimensions, Keyboard, Animated, View, UIManager, LayoutAnimation, TouchableOpacity, Text as Text$1, Easing, useWindowDimensions, TouchableWithoutFeedback, Modal as Modal$1, Image as Image$1, Pressable, KeyboardAvoidingView, TouchableHighlight, ScrollView, FlatList, TextInput as TextInput$1, PanResponder, BackHandler, InteractionManager, SectionList as SectionList$1, PixelRatio, RefreshControl as RefreshControl$1 } from 'react-native';
|
|
2
|
+
import { StyleSheet as StyleSheet$1, Platform, Dimensions, Keyboard, Animated, View, UIManager, LayoutAnimation, TouchableOpacity, Text as Text$1, Easing, useWindowDimensions, AccessibilityInfo, TouchableWithoutFeedback, Modal as Modal$1, Image as Image$1, Pressable, KeyboardAvoidingView, TouchableHighlight, ScrollView, FlatList, TextInput as TextInput$1, PanResponder, BackHandler, InteractionManager, SectionList as SectionList$1, PixelRatio, RefreshControl as RefreshControl$1 } from 'react-native';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import React__default, { useState, useEffect, useMemo, useCallback, useRef,
|
|
4
|
+
import React__default, { useState, useEffect, useMemo, useCallback, useRef, createContext, useContext, useLayoutEffect, forwardRef, memo, useReducer, isValidElement, useImperativeHandle } from 'react';
|
|
5
5
|
import MaskedView from '@react-native-masked-view/masked-view';
|
|
6
6
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
7
7
|
import { createIconSet } from 'react-native-vector-icons';
|
|
@@ -3324,7 +3324,7 @@ function interleave(vals) {
|
|
|
3324
3324
|
// this is done so we don't create a new
|
|
3325
3325
|
// handleInterpolation function on every css call
|
|
3326
3326
|
|
|
3327
|
-
var styles;
|
|
3327
|
+
var styles$1;
|
|
3328
3328
|
var generated = {};
|
|
3329
3329
|
var buffer = '';
|
|
3330
3330
|
var lastType;
|
|
@@ -3347,7 +3347,7 @@ function handleInterpolation(interpolation, i, arr) {
|
|
|
3347
3347
|
if (lastType === 'string' && (isRnStyle || isIrrelevant)) {
|
|
3348
3348
|
var converted = convertStyles(buffer);
|
|
3349
3349
|
if (converted !== undefined) {
|
|
3350
|
-
styles.push(converted);
|
|
3350
|
+
styles$1.push(converted);
|
|
3351
3351
|
}
|
|
3352
3352
|
buffer = '';
|
|
3353
3353
|
}
|
|
@@ -3359,13 +3359,13 @@ function handleInterpolation(interpolation, i, arr) {
|
|
|
3359
3359
|
if (arr.length - 1 === i) {
|
|
3360
3360
|
var _converted = convertStyles(buffer);
|
|
3361
3361
|
if (_converted !== undefined) {
|
|
3362
|
-
styles.push(_converted);
|
|
3362
|
+
styles$1.push(_converted);
|
|
3363
3363
|
}
|
|
3364
3364
|
buffer = '';
|
|
3365
3365
|
}
|
|
3366
3366
|
}
|
|
3367
3367
|
if (isRnStyle) {
|
|
3368
|
-
styles.push(interpolation);
|
|
3368
|
+
styles$1.push(interpolation);
|
|
3369
3369
|
}
|
|
3370
3370
|
if (Array.isArray(interpolation)) {
|
|
3371
3371
|
interpolation.forEach(handleInterpolation, this);
|
|
@@ -3381,7 +3381,7 @@ function createCss(StyleSheet) {
|
|
|
3381
3381
|
// this is done so we don't create a new
|
|
3382
3382
|
// handleInterpolation function on every css call
|
|
3383
3383
|
|
|
3384
|
-
styles = [];
|
|
3384
|
+
styles$1 = [];
|
|
3385
3385
|
buffer = '';
|
|
3386
3386
|
lastType = undefined;
|
|
3387
3387
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -3397,10 +3397,10 @@ function createCss(StyleSheet) {
|
|
|
3397
3397
|
} finally {
|
|
3398
3398
|
buffer = prevBuffer;
|
|
3399
3399
|
}
|
|
3400
|
-
var hash = JSON.stringify(styles);
|
|
3400
|
+
var hash = JSON.stringify(styles$1);
|
|
3401
3401
|
if (!generated[hash]) {
|
|
3402
3402
|
var styleSheet = StyleSheet.create({
|
|
3403
|
-
generated: StyleSheet.flatten(styles)
|
|
3403
|
+
generated: StyleSheet.flatten(styles$1)
|
|
3404
3404
|
});
|
|
3405
3405
|
generated[hash] = styleSheet.generated;
|
|
3406
3406
|
}
|
|
@@ -8549,7 +8549,7 @@ var Typography = {
|
|
|
8549
8549
|
};
|
|
8550
8550
|
|
|
8551
8551
|
// 🔴 DO NOT EDIT — This file is generated automatically.
|
|
8552
|
-
var IconList = ['activate', 'add-emoji', 'add-person', 'adjustment', 'alignment', 'antenna', 'archive', 'assignment-warning', 'bank', 'bell', 'billing', 'bolt', 'bookmark-added', 'bookmark-checked', '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', 'dot', 'double-buildings', 'edit-template', 'envelope', 'exclude', 'expand-content', 'expense', 'explore_nearby', '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', 'global-pound', 'globe', 'graduation-cap', 'graph', 'happy-sun', 'health-bag', 'heart', 'hero-points', 'home', 'image', 'import', 'incident-siren', 'instapay-daily', 'instapay-now', 'instapay', 'list', 'loading-2', 'loading', 'location-on', 'location', 'lock', 'looks-one', 'looks-two', 'media-content', 'menu', 'money-notes', 'moneybag', 'moon', 'multiple-stars', 'multiple-users', 'near-me', 'node', 'open-folder', 'paperclip-vertical', 'paperclip', 'payment-summary', 'pencil', 'phone', 'piggy-bank', 'plane-up', 'plane', 'play-arrow', 'play-circle', 'pound-coin-shine', 'pound-sign', 'print', 'raising-hands', 'reply-arrow', 'reply', 'reschedule', 'rocket-launch', 'rostering', 'salary-sacrifice', 'save', 'schedule-send', 'schedule', 'search-person', 'search', 'send', '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', 'swipe-right', 'switch', 'tag', 'target', 'teams', 'thumb-down', 'thumb-up', 'timesheet', 'touch-id', 'trash-bin', 'unlock', 'user', 'video-1', 'video-2', 'wallet', 'warning', 'academic-hat-outlined', 'accommodation-outlined', 'activate-outlined', 'add-credit-card-outlined', 'add-emoji-outlined', 'add-person-outlined', 'add-section-outlined', 'add-time-outlined', 'add', 'adjustment-outlined', 'afternoon-outlined', 'ai-outlined', 'alignment-2-outlined', 'alignment-outlined', 'all-caps', 'application-outlined', 'archive-outlined', 'arrow-down', 'arrow-downwards', 'arrow-left', 'arrow-leftwards', 'arrow-right', 'arrow-rightwards', 'arrow-up', 'arrow-upwards', 'article-outlined', 'assignment-warning-outlined', 'at-sign', 'auto-graph-outlined', 'automotive-outlined', 'bakery-outlined', 'bank-outlined', 'bar-outlined', 'beauty-outlined', 'beer-outlined', 'bell-outlined', 'bell-slash-outlined', 'bill-management-outlined', 'billing-outlined', 'body-outlined', 'bold', 'bolt-outlined', 'book-outlined', 'bookmark-added-outlined', 'bookmark-checked-outlined', 'bookmark-outlined', 'box-1-outlined', 'box-check-outlined', 'box-outlined', 'bullet-points', 'cake-outlined', 'calculator-outlined', 'calendar-clock-outlined', 'calendar-dates-outlined', 'calendar-edit-outlined', 'calendar-outlined', 'calendar-star-outlined', 'call-outlined', 'call-split-outlined', 'camera-outlined', 'cancel', 'car-forward-outlined', 'cashback-outlined', 'charging-station-outlined', 'chat-bubble-outlined', 'chat-unread-outlined', 'checkmark', 'circle-add-outlined', 'circle-cancel-outlined', 'circle-check-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-3-outlined', 'clock-in-outlined', 'clock-out-outlined', 'clock-outlined', 'cloud-download-outlined', 'cog-outlined', 'coin-outlined', 'coin-super-outlined', 'comment-outlined', 'contacts-outlined', 'contacts-user-outlined', 'credit-card-outlined', 'cultural-site-outlined', 'cup-outlined', 'dentistry-outlined', 'diamond-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', 'edit-user-outlined', 'electronics-outlined', 'email-outlined', 'end-break-outlined', 'enter-arrow', 'entertainment-outlined', 'envelope-outlined', 'evening-outlined', 'expense-approval-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', 'feedbacks-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-pound-outlined', 'file-search-outlined', 'file-secured-outlined', 'file-statutory-outlined', 'file-verified-outlined', 'filter-outlined', 'fitness-outlined', 'folder-outlined', 'folder-upload-outlined', 'folder-user-outlined', 'form-outlined', 'funnel-filter-outline', 'goal-outlined', 'graph-outlined', 'grocery-outlined', 'hand-holding-user-outlined', 'handshake-outlined', 'happy-sun-outlined', 'health-bag-outlined', 'heart-outlined', 'history-outlined', 'home-outlined', 'id-card-outlined', 'image-outlined', 'import-outlined', 'instapay-outlined', 'italic', 'job-search-outlined', 'leave-approval-outlined', 'lighting-outlined', 'link-1', 'link-2', 'list-outlined', 'live-help-outlined', 'local_mall_outlined', 'location-on-outlined', 'location-outlined', 'lock-outlined', 'locked-file-outlined', 'log-out', 'mail-outlined', 'map-outlined', 'media-content-outlined', 'menu-close', 'menu-expand', 'menu-fold-outlined', 'menu-unfold-outlined', 'mic-outlined', 'mic-slash-outlined', 'moneybag-outlined', 'moon-outlined', 'more-horizontal', 'more-vertical', 'morning-outlined', 'multiple-folders-outlined', 'multiple-users-outlined', 'near-me-outlined', 'node-outlined', 'number-points', 'number', 'overview-outlined', 'park-outlined', 'payment-summary-outlined', 'payslip-outlined', 'pencil-outlined', 'percentage', 'phone-outlined', 'piggy-bank-outlined', 'plane-outlined', 'play-circle-outlined', 'pound-box-outlined', 'pound-card-outlined', 'pound-coin-shine-outlined', 'pound-credit-card-outlined', 'print-outlined', 'profile-2user-outlined', 'propane-tank-outlined', 'qr-code-outlined', 'qualification-outlined', 'question-mark', 'raising-hands-outlined', 're-assign', 'redeem', 'refresh', 'remove', 'reply-outlined', 'restart', 'restaurant-outlined', 'resume-outlined', 'return-arrow', 'rocket-launch-outlined', 'rostering-outlined', 'safety-outlined', 'save-outlined', 'schedule-outlined', 'schedule-send-outlined', 'search-outlined', 'search-secured-outlined', 'send-outlined', 'share-1', 'share-2', 'share-outlined-2', 'share-outlined', 'shield-check-outlined', 'shop-outlined', 'shopping_basket_outlined', 'show-chart-outlined', 'single-down-arrow', 'single-left-arrow', 'single-right-arrow', 'single-up-arrow', 'smart-match-outlined', 'sparkle-2-outlined', 'sparkle-outlined', 'speaker-outlined', 'star-award-outlined', 'star-badge-outlined', 'star-circle-outlined', 'star-medal-outlined', 'star-outlined', 'start-break-outlined', 'stash-outlined', 'stop-outlined', 'stopwatch-outlined', 'strikethrough', 'styler-outlined', 'suitcase-clock-outlined', 'suitcase-outlined', 'survey-outlined', 'switch-outlined', 'sync', 'tag-outlined', 'target-outlined', 'teams-outlined', 'tennis-outlined', 'thumb-down-outlined', 'thumb-up-outlined', 'ticket-outlined', 'timesheet-outlined', 'timesheets-outlined', 'today-outlined', 'transfer', 'transportation-outlined', 'trash-bin-outlined', 'umbrela-outlined', 'unavailability-outlined', 'unavailable', 'underline', 'union-outlined', 'unlock-outlined', 'upload-outlined', 'user-add-outlined', 'user-circle-outlined', 'user-gear-outlined', 'user-out-outlined', 'user-outlined', 'user-rectangle-outlined', 'video-1-outlined', 'video-2-outlined', 'volunteer-outlined', 'wallet-outlined', 'warning-outlined', 'wellness-outlined'];
|
|
8552
|
+
var IconList = ['activate', 'add-emoji', 'add-person', 'adjustment', 'alignment', 'antenna', 'archive', 'assignment-warning', 'bank', 'bell', 'billing', 'bolt', 'bookmark-added', 'bookmark-checked', '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', 'dot', 'double-buildings', 'edit-template', 'envelope', 'exclude', 'expand-content', 'expense', 'explore_nearby', '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', 'global-pound', 'globe', 'graduation-cap', 'graph', 'happy-sun', 'health-bag', 'heart', 'hero-points', 'home', 'image', 'import', 'incident-siren', 'instapay-daily', 'instapay-now', 'instapay', 'list', 'loading-2', 'loading', 'location-on', 'location', 'lock', 'looks-one', 'looks-two', 'media-content', 'menu', 'money-notes', 'moneybag', 'moon', 'multiple-stars', 'multiple-users', 'near-me', 'node', 'open-folder', 'paperclip-vertical', 'paperclip', 'payment-summary', 'pencil', 'phone', 'piggy-bank', 'plane-up', 'plane', 'play-arrow', 'play-circle', 'pound-coin-shine', 'pound-sign', 'print', 'raising-hands', 'reply-arrow', 'reply', 'reschedule', 'rocket-launch', 'rostering', 'salary-sacrifice', 'save', 'schedule-send', 'schedule', 'search-person', 'search', 'send', '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', 'swipe-right', 'switch', 'tag', 'target', 'teams', 'thumb-down', 'thumb-up', 'timesheet', 'touch-id', 'trash-bin', 'unlock', 'user', 'video-1', 'video-2', 'wallet', 'warning', 'academic-hat-outlined', 'accommodation-outlined', 'activate-outlined', 'add-credit-card-outlined', 'add-emoji-outlined', 'add-person-outlined', 'add-section-outlined', 'add-time-outlined', 'add', 'adjustment-outlined', 'afternoon-outlined', 'ai-outlined', 'alignment-2-outlined', 'alignment-outlined', 'all-caps', 'application-outlined', 'archive-outlined', 'arrow-down', 'arrow-downwards', 'arrow-left', 'arrow-leftwards', 'arrow-right', 'arrow-rightwards', 'arrow-up', 'arrow-upwards', 'article-outlined', 'assignment-warning-outlined', 'at-sign', 'auto-graph-outlined', 'automotive-outlined', 'bakery-outlined', 'bank-outlined', 'bar-outlined', 'beauty-outlined', 'beer-outlined', 'bell-outlined', 'bell-slash-outlined', 'bill-management-outlined', 'billing-outlined', 'body-outlined', 'bold', 'bolt-outlined', 'book-outlined', 'bookmark-added-outlined', 'bookmark-checked-outlined', 'bookmark-outlined', 'box-1-outlined', 'box-check-outlined', 'box-outlined', 'bullet-points', 'cake-outlined', 'calculator-outlined', 'calendar-clock-outlined', 'calendar-dates-outlined', 'calendar-edit-outlined', 'calendar-outlined', 'calendar-star-outlined', 'call-outlined', 'call-split-outlined', 'camera-outlined', 'cancel', 'car-forward-outlined', 'cashback-outlined', 'charging-station-outlined', 'chat-bubble-outlined', 'chat-unread-outlined', 'checkmark', 'circle-add-outlined', 'circle-cancel-outlined', 'circle-check-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-3-outlined', 'clock-in-outlined', 'clock-out-outlined', 'clock-outlined', 'cloud-download-outlined', 'cog-outlined', 'coin-outlined', 'coin-super-outlined', 'comment-outlined', 'contacts-outlined', 'contacts-user-outlined', 'credit-card-outlined', 'cultural-site-outlined', 'cup-outlined', 'dentistry-outlined', 'diamond-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', 'edit-user-outlined', 'electronics-outlined', 'email-outlined', 'end-break-outlined', 'enter-arrow', 'entertainment-outlined', 'envelope-outlined', 'evening-outlined', 'expense-approval-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', 'feedbacks-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-pound-outlined', 'file-search-outlined', 'file-secured-outlined', 'file-statutory-outlined', 'file-verified-outlined', 'filter-outlined', 'fitness-outlined', 'folder-outlined', 'folder-upload-outlined', 'folder-user-outlined', 'form-outlined', 'funnel-filter-outline', 'goal-outlined', 'graph-outlined', 'grocery-outlined', 'hand-holding-user-outlined', 'handshake-outlined', 'happy-sun-outlined', 'health-bag-outlined', 'heart-outlined', 'history-outlined', 'home-outlined', 'id-card-outlined', 'image-outlined', 'import-outlined', 'instapay-outlined', 'italic', 'job-search-outlined', 'leave-approval-outlined', 'lighting-outlined', 'link-1', 'link-2', 'list-outlined', 'live-help-outlined', 'local_mall_outlined', 'location-on-outlined', 'location-outlined', 'lock-outlined', 'locked-file-outlined', 'log-out', 'mail-outlined', 'map-outlined', 'media-content-outlined', 'menu-close', 'menu-expand', 'menu-fold-outlined', 'menu-unfold-outlined', 'mic-outlined', 'mic-slash-outlined', 'mobile-outlined', 'moneybag-outlined', 'moon-outlined', 'more-horizontal', 'more-vertical', 'morning-outlined', 'multiple-folders-outlined', 'multiple-users-outlined', 'near-me-outlined', 'node-outlined', 'number-points', 'number', 'overview-outlined', 'park-outlined', 'payment-summary-outlined', 'payslip-outlined', 'pencil-outlined', 'percentage', 'phone-outlined', 'piggy-bank-outlined', 'plane-outlined', 'play-circle-outlined', 'pound-box-outlined', 'pound-card-outlined', 'pound-coin-shine-outlined', 'pound-credit-card-outlined', 'print-outlined', 'profile-2user-outlined', 'propane-tank-outlined', 'qr-code-outlined', 'qualification-outlined', 'question-mark', 'raising-hands-outlined', 're-assign', 'redeem', 'refresh', 'remove', 'reply-outlined', 'restart', 'restaurant-outlined', 'resume-outlined', 'return-arrow', 'rocket-launch-outlined', 'rostering-outlined', 'safety-outlined', 'save-outlined', 'schedule-outlined', 'schedule-send-outlined', 'search-outlined', 'search-secured-outlined', 'send-outlined', 'share-1', 'share-2', 'share-outlined-2', 'share-outlined', 'shield-check-outlined', 'shop-outlined', 'shopping_basket_outlined', 'show-chart-outlined', 'single-down-arrow', 'single-left-arrow', 'single-right-arrow', 'single-up-arrow', 'smart-match-outlined', 'sparkle-2-outlined', 'sparkle-outlined', 'speaker-outlined', 'star-award-outlined', 'star-badge-outlined', 'star-circle-outlined', 'star-medal-outlined', 'star-outlined', 'start-break-outlined', 'stash-outlined', 'stop-outlined', 'stopwatch-outlined', 'strikethrough', 'styler-outlined', 'suitcase-clock-outlined', 'suitcase-outlined', 'survey-outlined', 'switch-outlined', 'sync', 'tablet-outlined', 'tag-outlined', 'target-outlined', 'teams-outlined', 'tennis-outlined', 'thumb-down-outlined', 'thumb-up-outlined', 'ticket-outlined', 'timesheet-outlined', 'timesheets-outlined', 'today-outlined', 'transfer', 'transportation-outlined', 'trash-bin-outlined', 'umbrela-outlined', 'unavailability-outlined', 'unavailable', 'underline', 'union-outlined', 'unlock-outlined', 'upload-outlined', 'user-add-outlined', 'user-circle-outlined', 'user-gear-outlined', 'user-out-outlined', 'user-outlined', 'user-rectangle-outlined', 'video-1-outlined', 'video-2-outlined', 'volunteer-outlined', 'wallet-outlined', 'warning-outlined', 'wellness-outlined'];
|
|
8553
8553
|
|
|
8554
8554
|
var activate = 59000;
|
|
8555
8555
|
var adjustment = 59003;
|
|
@@ -8631,18 +8631,18 @@ var cancel = 59255;
|
|
|
8631
8631
|
var checkmark = 59261;
|
|
8632
8632
|
var italic = 59364;
|
|
8633
8633
|
var local_mall_outlined = 59372;
|
|
8634
|
-
var number$2 =
|
|
8635
|
-
var percentage =
|
|
8636
|
-
var redeem =
|
|
8637
|
-
var refresh =
|
|
8638
|
-
var remove$1 =
|
|
8639
|
-
var restart =
|
|
8640
|
-
var shopping_basket_outlined =
|
|
8641
|
-
var strikethrough =
|
|
8642
|
-
var sync =
|
|
8643
|
-
var transfer =
|
|
8644
|
-
var unavailable =
|
|
8645
|
-
var underline =
|
|
8634
|
+
var number$2 = 59398;
|
|
8635
|
+
var percentage = 59404;
|
|
8636
|
+
var redeem = 59421;
|
|
8637
|
+
var refresh = 59422;
|
|
8638
|
+
var remove$1 = 59423;
|
|
8639
|
+
var restart = 59425;
|
|
8640
|
+
var shopping_basket_outlined = 59444;
|
|
8641
|
+
var strikethrough = 59463;
|
|
8642
|
+
var sync = 59469;
|
|
8643
|
+
var transfer = 59481;
|
|
8644
|
+
var unavailable = 59486;
|
|
8645
|
+
var underline = 59487;
|
|
8646
8646
|
var glyphMap = {
|
|
8647
8647
|
activate: activate,
|
|
8648
8648
|
"add-emoji": 59001,
|
|
@@ -9031,120 +9031,122 @@ var glyphMap = {
|
|
|
9031
9031
|
"menu-unfold-outlined": 59384,
|
|
9032
9032
|
"mic-outlined": 59385,
|
|
9033
9033
|
"mic-slash-outlined": 59386,
|
|
9034
|
-
"
|
|
9035
|
-
"
|
|
9036
|
-
"
|
|
9037
|
-
"more-
|
|
9038
|
-
"
|
|
9039
|
-
"
|
|
9040
|
-
"multiple-
|
|
9041
|
-
"
|
|
9042
|
-
"
|
|
9043
|
-
"
|
|
9034
|
+
"mobile-outlined": 59387,
|
|
9035
|
+
"moneybag-outlined": 59388,
|
|
9036
|
+
"moon-outlined": 59389,
|
|
9037
|
+
"more-horizontal": 59390,
|
|
9038
|
+
"more-vertical": 59391,
|
|
9039
|
+
"morning-outlined": 59392,
|
|
9040
|
+
"multiple-folders-outlined": 59393,
|
|
9041
|
+
"multiple-users-outlined": 59394,
|
|
9042
|
+
"near-me-outlined": 59395,
|
|
9043
|
+
"node-outlined": 59396,
|
|
9044
|
+
"number-points": 59397,
|
|
9044
9045
|
number: number$2,
|
|
9045
|
-
"overview-outlined":
|
|
9046
|
-
"park-outlined":
|
|
9047
|
-
"payment-summary-outlined":
|
|
9048
|
-
"payslip-outlined":
|
|
9049
|
-
"pencil-outlined":
|
|
9046
|
+
"overview-outlined": 59399,
|
|
9047
|
+
"park-outlined": 59400,
|
|
9048
|
+
"payment-summary-outlined": 59401,
|
|
9049
|
+
"payslip-outlined": 59402,
|
|
9050
|
+
"pencil-outlined": 59403,
|
|
9050
9051
|
percentage: percentage,
|
|
9051
|
-
"phone-outlined":
|
|
9052
|
-
"piggy-bank-outlined":
|
|
9053
|
-
"plane-outlined":
|
|
9054
|
-
"play-circle-outlined":
|
|
9055
|
-
"pound-box-outlined":
|
|
9056
|
-
"pound-card-outlined":
|
|
9057
|
-
"pound-coin-shine-outlined":
|
|
9058
|
-
"pound-credit-card-outlined":
|
|
9059
|
-
"print-outlined":
|
|
9060
|
-
"profile-2user-outlined":
|
|
9061
|
-
"propane-tank-outlined":
|
|
9062
|
-
"qr-code-outlined":
|
|
9063
|
-
"qualification-outlined":
|
|
9064
|
-
"question-mark":
|
|
9065
|
-
"raising-hands-outlined":
|
|
9066
|
-
"re-assign":
|
|
9052
|
+
"phone-outlined": 59405,
|
|
9053
|
+
"piggy-bank-outlined": 59406,
|
|
9054
|
+
"plane-outlined": 59407,
|
|
9055
|
+
"play-circle-outlined": 59408,
|
|
9056
|
+
"pound-box-outlined": 59409,
|
|
9057
|
+
"pound-card-outlined": 59410,
|
|
9058
|
+
"pound-coin-shine-outlined": 59411,
|
|
9059
|
+
"pound-credit-card-outlined": 59412,
|
|
9060
|
+
"print-outlined": 59413,
|
|
9061
|
+
"profile-2user-outlined": 59414,
|
|
9062
|
+
"propane-tank-outlined": 59415,
|
|
9063
|
+
"qr-code-outlined": 59416,
|
|
9064
|
+
"qualification-outlined": 59417,
|
|
9065
|
+
"question-mark": 59418,
|
|
9066
|
+
"raising-hands-outlined": 59419,
|
|
9067
|
+
"re-assign": 59420,
|
|
9067
9068
|
redeem: redeem,
|
|
9068
9069
|
refresh: refresh,
|
|
9069
9070
|
remove: remove$1,
|
|
9070
|
-
"reply-outlined":
|
|
9071
|
+
"reply-outlined": 59424,
|
|
9071
9072
|
restart: restart,
|
|
9072
|
-
"restaurant-outlined":
|
|
9073
|
-
"resume-outlined":
|
|
9074
|
-
"return-arrow":
|
|
9075
|
-
"rocket-launch-outlined":
|
|
9076
|
-
"rostering-outlined":
|
|
9077
|
-
"safety-outlined":
|
|
9078
|
-
"save-outlined":
|
|
9079
|
-
"schedule-outlined":
|
|
9080
|
-
"schedule-send-outlined":
|
|
9081
|
-
"search-outlined":
|
|
9082
|
-
"search-secured-outlined":
|
|
9083
|
-
"send-outlined":
|
|
9084
|
-
"share-1":
|
|
9085
|
-
"share-2":
|
|
9086
|
-
"share-outlined-2":
|
|
9087
|
-
"share-outlined":
|
|
9088
|
-
"shield-check-outlined":
|
|
9089
|
-
"shop-outlined":
|
|
9073
|
+
"restaurant-outlined": 59426,
|
|
9074
|
+
"resume-outlined": 59427,
|
|
9075
|
+
"return-arrow": 59428,
|
|
9076
|
+
"rocket-launch-outlined": 59429,
|
|
9077
|
+
"rostering-outlined": 59430,
|
|
9078
|
+
"safety-outlined": 59431,
|
|
9079
|
+
"save-outlined": 59432,
|
|
9080
|
+
"schedule-outlined": 59433,
|
|
9081
|
+
"schedule-send-outlined": 59434,
|
|
9082
|
+
"search-outlined": 59435,
|
|
9083
|
+
"search-secured-outlined": 59436,
|
|
9084
|
+
"send-outlined": 59437,
|
|
9085
|
+
"share-1": 59438,
|
|
9086
|
+
"share-2": 59439,
|
|
9087
|
+
"share-outlined-2": 59440,
|
|
9088
|
+
"share-outlined": 59441,
|
|
9089
|
+
"shield-check-outlined": 59442,
|
|
9090
|
+
"shop-outlined": 59443,
|
|
9090
9091
|
shopping_basket_outlined: shopping_basket_outlined,
|
|
9091
|
-
"show-chart-outlined":
|
|
9092
|
-
"single-down-arrow":
|
|
9093
|
-
"single-left-arrow":
|
|
9094
|
-
"single-right-arrow":
|
|
9095
|
-
"single-up-arrow":
|
|
9096
|
-
"smart-match-outlined":
|
|
9097
|
-
"sparkle-2-outlined":
|
|
9098
|
-
"sparkle-outlined":
|
|
9099
|
-
"speaker-outlined":
|
|
9100
|
-
"star-award-outlined":
|
|
9101
|
-
"star-badge-outlined":
|
|
9102
|
-
"star-circle-outlined":
|
|
9103
|
-
"star-medal-outlined":
|
|
9104
|
-
"star-outlined":
|
|
9105
|
-
"start-break-outlined":
|
|
9106
|
-
"stash-outlined":
|
|
9107
|
-
"stop-outlined":
|
|
9108
|
-
"stopwatch-outlined":
|
|
9092
|
+
"show-chart-outlined": 59445,
|
|
9093
|
+
"single-down-arrow": 59446,
|
|
9094
|
+
"single-left-arrow": 59447,
|
|
9095
|
+
"single-right-arrow": 59448,
|
|
9096
|
+
"single-up-arrow": 59449,
|
|
9097
|
+
"smart-match-outlined": 59450,
|
|
9098
|
+
"sparkle-2-outlined": 59451,
|
|
9099
|
+
"sparkle-outlined": 59452,
|
|
9100
|
+
"speaker-outlined": 59453,
|
|
9101
|
+
"star-award-outlined": 59454,
|
|
9102
|
+
"star-badge-outlined": 59455,
|
|
9103
|
+
"star-circle-outlined": 59456,
|
|
9104
|
+
"star-medal-outlined": 59457,
|
|
9105
|
+
"star-outlined": 59458,
|
|
9106
|
+
"start-break-outlined": 59459,
|
|
9107
|
+
"stash-outlined": 59460,
|
|
9108
|
+
"stop-outlined": 59461,
|
|
9109
|
+
"stopwatch-outlined": 59462,
|
|
9109
9110
|
strikethrough: strikethrough,
|
|
9110
|
-
"styler-outlined":
|
|
9111
|
-
"suitcase-clock-outlined":
|
|
9112
|
-
"suitcase-outlined":
|
|
9113
|
-
"survey-outlined":
|
|
9114
|
-
"switch-outlined":
|
|
9111
|
+
"styler-outlined": 59464,
|
|
9112
|
+
"suitcase-clock-outlined": 59465,
|
|
9113
|
+
"suitcase-outlined": 59466,
|
|
9114
|
+
"survey-outlined": 59467,
|
|
9115
|
+
"switch-outlined": 59468,
|
|
9115
9116
|
sync: sync,
|
|
9116
|
-
"
|
|
9117
|
-
"
|
|
9118
|
-
"
|
|
9119
|
-
"
|
|
9120
|
-
"
|
|
9121
|
-
"thumb-
|
|
9122
|
-
"
|
|
9123
|
-
"
|
|
9124
|
-
"
|
|
9125
|
-
"
|
|
9117
|
+
"tablet-outlined": 59470,
|
|
9118
|
+
"tag-outlined": 59471,
|
|
9119
|
+
"target-outlined": 59472,
|
|
9120
|
+
"teams-outlined": 59473,
|
|
9121
|
+
"tennis-outlined": 59474,
|
|
9122
|
+
"thumb-down-outlined": 59475,
|
|
9123
|
+
"thumb-up-outlined": 59476,
|
|
9124
|
+
"ticket-outlined": 59477,
|
|
9125
|
+
"timesheet-outlined": 59478,
|
|
9126
|
+
"timesheets-outlined": 59479,
|
|
9127
|
+
"today-outlined": 59480,
|
|
9126
9128
|
transfer: transfer,
|
|
9127
|
-
"transportation-outlined":
|
|
9128
|
-
"trash-bin-outlined":
|
|
9129
|
-
"umbrela-outlined":
|
|
9130
|
-
"unavailability-outlined":
|
|
9129
|
+
"transportation-outlined": 59482,
|
|
9130
|
+
"trash-bin-outlined": 59483,
|
|
9131
|
+
"umbrela-outlined": 59484,
|
|
9132
|
+
"unavailability-outlined": 59485,
|
|
9131
9133
|
unavailable: unavailable,
|
|
9132
9134
|
underline: underline,
|
|
9133
|
-
"union-outlined":
|
|
9134
|
-
"unlock-outlined":
|
|
9135
|
-
"upload-outlined":
|
|
9136
|
-
"user-add-outlined":
|
|
9137
|
-
"user-circle-outlined":
|
|
9138
|
-
"user-gear-outlined":
|
|
9139
|
-
"user-out-outlined":
|
|
9140
|
-
"user-outlined":
|
|
9141
|
-
"user-rectangle-outlined":
|
|
9142
|
-
"video-1-outlined":
|
|
9143
|
-
"video-2-outlined":
|
|
9144
|
-
"volunteer-outlined":
|
|
9145
|
-
"wallet-outlined":
|
|
9146
|
-
"warning-outlined":
|
|
9147
|
-
"wellness-outlined":
|
|
9135
|
+
"union-outlined": 59488,
|
|
9136
|
+
"unlock-outlined": 59489,
|
|
9137
|
+
"upload-outlined": 59490,
|
|
9138
|
+
"user-add-outlined": 59491,
|
|
9139
|
+
"user-circle-outlined": 59492,
|
|
9140
|
+
"user-gear-outlined": 59493,
|
|
9141
|
+
"user-out-outlined": 59494,
|
|
9142
|
+
"user-outlined": 59495,
|
|
9143
|
+
"user-rectangle-outlined": 59496,
|
|
9144
|
+
"video-1-outlined": 59497,
|
|
9145
|
+
"video-2-outlined": 59498,
|
|
9146
|
+
"volunteer-outlined": 59499,
|
|
9147
|
+
"wallet-outlined": 59500,
|
|
9148
|
+
"warning-outlined": 59501,
|
|
9149
|
+
"wellness-outlined": 59502
|
|
9148
9150
|
};
|
|
9149
9151
|
|
|
9150
9152
|
var HeroIcon = createIconSet(glyphMap, 'hero-icons-mobile', 'hero-icons-mobile.ttf');
|
|
@@ -9275,6 +9277,7 @@ var Icon = function Icon(_ref) {
|
|
|
9275
9277
|
accessibilityViewIsModal = _ref.accessibilityViewIsModal,
|
|
9276
9278
|
accessibilityActions = _ref.accessibilityActions;
|
|
9277
9279
|
useDeprecation("".concat(icon, " icon is deprecated and will be removed in the next major release, please use ").concat(icon.replace('carat', 'caret'), " instead."), icon.startsWith('carat'));
|
|
9280
|
+
useDeprecation('charging-station-outlined icon is deprecated and will be removed in the next major release, please use mobile-outlined instead.', icon === 'charging-station-outlined');
|
|
9278
9281
|
var accessibilityProps = {
|
|
9279
9282
|
accessibilityLabel: accessibilityLabel,
|
|
9280
9283
|
accessibilityHint: accessibilityHint,
|
|
@@ -9384,6 +9387,274 @@ var Accordion = function Accordion(_ref) {
|
|
|
9384
9387
|
}));
|
|
9385
9388
|
};
|
|
9386
9389
|
|
|
9390
|
+
function reflectX(rawX, width) {
|
|
9391
|
+
var period = 2 * width;
|
|
9392
|
+
var modX = (rawX % period + period) % period;
|
|
9393
|
+
return modX < width ? modX : period - modX;
|
|
9394
|
+
}
|
|
9395
|
+
/**
|
|
9396
|
+
* Pre-computes the reflectX triangle-wave as interpolation keyframes.
|
|
9397
|
+
* Run once in JS before animation starts; native driver handles per-frame lerp.
|
|
9398
|
+
*/
|
|
9399
|
+
function computeXKeyframes(initialX, xVel, durationSeconds, width) {
|
|
9400
|
+
if (xVel === 0) {
|
|
9401
|
+
return {
|
|
9402
|
+
inputRange: [0, 1],
|
|
9403
|
+
outputRange: [initialX, initialX]
|
|
9404
|
+
};
|
|
9405
|
+
}
|
|
9406
|
+
var rawEnd = initialX + xVel * durationSeconds;
|
|
9407
|
+
var rawMin = Math.min(initialX, rawEnd);
|
|
9408
|
+
var rawMax = Math.max(initialX, rawEnd);
|
|
9409
|
+
var nMin = Math.ceil(rawMin / width);
|
|
9410
|
+
var nMax = Math.floor(rawMax / width);
|
|
9411
|
+
var times = [0];
|
|
9412
|
+
for (var n = nMin; n <= nMax; n += 1) {
|
|
9413
|
+
var t = (n * width - initialX) / xVel;
|
|
9414
|
+
if (t > 0 && t < durationSeconds) times.push(t);
|
|
9415
|
+
}
|
|
9416
|
+
times.push(durationSeconds);
|
|
9417
|
+
times.sort(function (a, b) {
|
|
9418
|
+
return a - b;
|
|
9419
|
+
});
|
|
9420
|
+
return {
|
|
9421
|
+
inputRange: times.map(function (t) {
|
|
9422
|
+
return t / durationSeconds;
|
|
9423
|
+
}),
|
|
9424
|
+
outputRange: times.map(function (t) {
|
|
9425
|
+
return reflectX(initialX + xVel * t, width);
|
|
9426
|
+
})
|
|
9427
|
+
};
|
|
9428
|
+
}
|
|
9429
|
+
|
|
9430
|
+
var CONFETTI_MIN_SIZE = 4;
|
|
9431
|
+
var CONFETTI_MAX_SIZE = 20;
|
|
9432
|
+
var BATCH_SIZE = 10;
|
|
9433
|
+
var BATCH_DELAY_MS = 300;
|
|
9434
|
+
var FADE_OUT_MS = 500;
|
|
9435
|
+
var Y_START_OFFSET = -60;
|
|
9436
|
+
var styles = StyleSheet$1.create({
|
|
9437
|
+
container: _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
9438
|
+
overflow: 'hidden'
|
|
9439
|
+
}),
|
|
9440
|
+
piece: {
|
|
9441
|
+
position: 'absolute',
|
|
9442
|
+
left: 0,
|
|
9443
|
+
top: 0
|
|
9444
|
+
}
|
|
9445
|
+
});
|
|
9446
|
+
function randomBetween(min, max) {
|
|
9447
|
+
return Math.random() * (max - min) + min;
|
|
9448
|
+
}
|
|
9449
|
+
var ConfettiPiece = function ConfettiPiece(_ref) {
|
|
9450
|
+
var angleVel = _ref.angleVel,
|
|
9451
|
+
color = _ref.color,
|
|
9452
|
+
containerWidth = _ref.containerWidth,
|
|
9453
|
+
delay = _ref.delay,
|
|
9454
|
+
duration = _ref.duration,
|
|
9455
|
+
initialX = _ref.initialX,
|
|
9456
|
+
onFinish = _ref.onFinish,
|
|
9457
|
+
size = _ref.size,
|
|
9458
|
+
xVel = _ref.xVel,
|
|
9459
|
+
yVel = _ref.yVel;
|
|
9460
|
+
var progress = useRef(new Animated.Value(0)).current;
|
|
9461
|
+
var durationSeconds = duration / 1000;
|
|
9462
|
+
var xKeyframes = useMemo(function () {
|
|
9463
|
+
return computeXKeyframes(initialX, xVel, durationSeconds, containerWidth);
|
|
9464
|
+
},
|
|
9465
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9466
|
+
[]);
|
|
9467
|
+
var translateX = progress.interpolate({
|
|
9468
|
+
inputRange: xKeyframes.inputRange,
|
|
9469
|
+
outputRange: xKeyframes.outputRange
|
|
9470
|
+
});
|
|
9471
|
+
var translateY = progress.interpolate({
|
|
9472
|
+
inputRange: [0, 1],
|
|
9473
|
+
outputRange: [Y_START_OFFSET, Y_START_OFFSET + yVel * durationSeconds]
|
|
9474
|
+
});
|
|
9475
|
+
var rotate = progress.interpolate({
|
|
9476
|
+
inputRange: [0, 1],
|
|
9477
|
+
outputRange: ['0rad', "".concat(angleVel * durationSeconds, "rad")]
|
|
9478
|
+
});
|
|
9479
|
+
useEffect(function () {
|
|
9480
|
+
Animated.sequence([Animated.delay(delay), Animated.timing(progress, {
|
|
9481
|
+
toValue: 1,
|
|
9482
|
+
duration: duration,
|
|
9483
|
+
useNativeDriver: true
|
|
9484
|
+
})]).start(function (_ref2) {
|
|
9485
|
+
var finished = _ref2.finished;
|
|
9486
|
+
if (finished) onFinish();
|
|
9487
|
+
});
|
|
9488
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9489
|
+
}, []);
|
|
9490
|
+
return /*#__PURE__*/React__default.createElement(Animated.View, {
|
|
9491
|
+
style: [styles.piece, {
|
|
9492
|
+
width: size,
|
|
9493
|
+
height: size / 2,
|
|
9494
|
+
backgroundColor: color
|
|
9495
|
+
}, {
|
|
9496
|
+
transform: [{
|
|
9497
|
+
translateX: translateX
|
|
9498
|
+
}, {
|
|
9499
|
+
translateY: translateY
|
|
9500
|
+
}, {
|
|
9501
|
+
rotate: rotate
|
|
9502
|
+
}]
|
|
9503
|
+
}]
|
|
9504
|
+
});
|
|
9505
|
+
};
|
|
9506
|
+
var Confetti$2 = function Confetti(_ref3) {
|
|
9507
|
+
var _pieces$current;
|
|
9508
|
+
var colorsProp = _ref3.colors,
|
|
9509
|
+
_ref3$numberOfPieces = _ref3.numberOfPieces,
|
|
9510
|
+
numberOfPieces = _ref3$numberOfPieces === void 0 ? 80 : _ref3$numberOfPieces,
|
|
9511
|
+
_ref3$duration = _ref3.duration,
|
|
9512
|
+
duration = _ref3$duration === void 0 ? 3000 : _ref3$duration,
|
|
9513
|
+
onFinish = _ref3.onFinish,
|
|
9514
|
+
run = _ref3.run,
|
|
9515
|
+
testID = _ref3.testID;
|
|
9516
|
+
var theme = useTheme();
|
|
9517
|
+
var _useWindowDimensions = useWindowDimensions(),
|
|
9518
|
+
screenHeight = _useWindowDimensions.height;
|
|
9519
|
+
var _useState = useState(false),
|
|
9520
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
9521
|
+
isReducedMotion = _useState2[0],
|
|
9522
|
+
setIsReducedMotion = _useState2[1];
|
|
9523
|
+
var _useState3 = useState(false),
|
|
9524
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
9525
|
+
isVisible = _useState4[0],
|
|
9526
|
+
setIsVisible = _useState4[1];
|
|
9527
|
+
var _useState5 = useState(0),
|
|
9528
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
9529
|
+
containerWidth = _useState6[0],
|
|
9530
|
+
setContainerWidth = _useState6[1];
|
|
9531
|
+
var containerOpacity = useRef(new Animated.Value(0)).current;
|
|
9532
|
+
var finishedCount = useRef(0);
|
|
9533
|
+
var pieces = useRef(null);
|
|
9534
|
+
useEffect(function () {
|
|
9535
|
+
AccessibilityInfo.isReduceMotionEnabled().then(setIsReducedMotion);
|
|
9536
|
+
var sub = AccessibilityInfo.addEventListener('reduceMotionChanged', setIsReducedMotion);
|
|
9537
|
+
return function () {
|
|
9538
|
+
return sub.remove();
|
|
9539
|
+
};
|
|
9540
|
+
}, []);
|
|
9541
|
+
useEffect(function () {
|
|
9542
|
+
if (run && !isReducedMotion && containerWidth > 0) {
|
|
9543
|
+
var durationSeconds = duration / 1000;
|
|
9544
|
+
var yVelMin = (screenHeight + 80) / durationSeconds;
|
|
9545
|
+
var yVelMax = yVelMin * 1.5;
|
|
9546
|
+
var colors = colorsProp !== null && colorsProp !== void 0 ? colorsProp : [theme.colors.primary, theme.colors.secondary];
|
|
9547
|
+
pieces.current = Array.from({
|
|
9548
|
+
length: numberOfPieces
|
|
9549
|
+
}, function (_, i) {
|
|
9550
|
+
return {
|
|
9551
|
+
color: colors[i % colors.length],
|
|
9552
|
+
size: Math.round(randomBetween(CONFETTI_MIN_SIZE, CONFETTI_MAX_SIZE)),
|
|
9553
|
+
initialX: randomBetween(containerWidth * 0.2, containerWidth * 0.8),
|
|
9554
|
+
xVel: randomBetween(-200, 200),
|
|
9555
|
+
yVel: randomBetween(yVelMin, yVelMax),
|
|
9556
|
+
angleVel: randomBetween(-Math.PI * 1.5, Math.PI * 1.5),
|
|
9557
|
+
delay: Math.floor(i / BATCH_SIZE) * BATCH_DELAY_MS
|
|
9558
|
+
};
|
|
9559
|
+
});
|
|
9560
|
+
finishedCount.current = 0;
|
|
9561
|
+
containerOpacity.setValue(1);
|
|
9562
|
+
setIsVisible(true);
|
|
9563
|
+
}
|
|
9564
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9565
|
+
}, [run, containerWidth]);
|
|
9566
|
+
var handlePieceFinish = useCallback(function () {
|
|
9567
|
+
finishedCount.current += 1;
|
|
9568
|
+
if (finishedCount.current >= numberOfPieces) {
|
|
9569
|
+
Animated.timing(containerOpacity, {
|
|
9570
|
+
toValue: 0,
|
|
9571
|
+
duration: FADE_OUT_MS,
|
|
9572
|
+
useNativeDriver: true
|
|
9573
|
+
}).start(function (_ref4) {
|
|
9574
|
+
var finished = _ref4.finished;
|
|
9575
|
+
if (finished) {
|
|
9576
|
+
setIsVisible(false);
|
|
9577
|
+
onFinish === null || onFinish === void 0 || onFinish();
|
|
9578
|
+
}
|
|
9579
|
+
});
|
|
9580
|
+
}
|
|
9581
|
+
}, [containerOpacity, numberOfPieces, onFinish]);
|
|
9582
|
+
var handleLayout = useCallback(function (_ref5) {
|
|
9583
|
+
var nativeEvent = _ref5.nativeEvent;
|
|
9584
|
+
var width = nativeEvent.layout.width;
|
|
9585
|
+
if (width > 0) setContainerWidth(width);
|
|
9586
|
+
}, []);
|
|
9587
|
+
if (isReducedMotion) {
|
|
9588
|
+
return null;
|
|
9589
|
+
}
|
|
9590
|
+
// Always render the container (when not in reduced motion) so onLayout fires and we know the real width.
|
|
9591
|
+
// Visibility is controlled via opacity to avoid losing the measurement.
|
|
9592
|
+
return /*#__PURE__*/React__default.createElement(Animated.View, {
|
|
9593
|
+
pointerEvents: "none",
|
|
9594
|
+
onLayout: handleLayout,
|
|
9595
|
+
style: [styles.container, {
|
|
9596
|
+
opacity: isVisible ? containerOpacity : 0
|
|
9597
|
+
}],
|
|
9598
|
+
testID: isVisible ? testID : undefined
|
|
9599
|
+
}, isVisible && ((_pieces$current = pieces.current) === null || _pieces$current === void 0 ? void 0 : _pieces$current.map(function (piece, id) {
|
|
9600
|
+
return /*#__PURE__*/React__default.createElement(ConfettiPiece, _extends$1({
|
|
9601
|
+
key: id
|
|
9602
|
+
}, piece, {
|
|
9603
|
+
containerWidth: containerWidth,
|
|
9604
|
+
duration: duration,
|
|
9605
|
+
onFinish: handlePieceFinish
|
|
9606
|
+
}));
|
|
9607
|
+
})));
|
|
9608
|
+
};
|
|
9609
|
+
|
|
9610
|
+
var ConfettiContext = /*#__PURE__*/createContext(null);
|
|
9611
|
+
var ConfettiProvider = function ConfettiProvider(_ref) {
|
|
9612
|
+
var children = _ref.children;
|
|
9613
|
+
var _useState = useState(false),
|
|
9614
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
9615
|
+
run = _useState2[0],
|
|
9616
|
+
setRun = _useState2[1];
|
|
9617
|
+
var _useState3 = useState(),
|
|
9618
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
9619
|
+
callConfig = _useState4[0],
|
|
9620
|
+
setCallConfig = _useState4[1];
|
|
9621
|
+
var onFinishedRef = useRef(undefined);
|
|
9622
|
+
var showConfetti = useCallback(function (config, onFinished) {
|
|
9623
|
+
setCallConfig(config);
|
|
9624
|
+
onFinishedRef.current = onFinished;
|
|
9625
|
+
setRun(true);
|
|
9626
|
+
}, []);
|
|
9627
|
+
var handleFinish = useCallback(function () {
|
|
9628
|
+
var _onFinishedRef$curren;
|
|
9629
|
+
setRun(false);
|
|
9630
|
+
(_onFinishedRef$curren = onFinishedRef.current) === null || _onFinishedRef$curren === void 0 || _onFinishedRef$curren.call(onFinishedRef, true);
|
|
9631
|
+
}, []);
|
|
9632
|
+
var contextValue = useMemo(function () {
|
|
9633
|
+
return {
|
|
9634
|
+
showConfetti: showConfetti
|
|
9635
|
+
};
|
|
9636
|
+
}, [showConfetti]);
|
|
9637
|
+
return /*#__PURE__*/React__default.createElement(ConfettiContext.Provider, {
|
|
9638
|
+
value: contextValue
|
|
9639
|
+
}, children, /*#__PURE__*/React__default.createElement(Confetti$2, _extends$1({
|
|
9640
|
+
run: run,
|
|
9641
|
+
onFinish: handleFinish
|
|
9642
|
+
}, callConfig)));
|
|
9643
|
+
};
|
|
9644
|
+
|
|
9645
|
+
var useConfetti = function useConfetti() {
|
|
9646
|
+
var context = useContext(ConfettiContext);
|
|
9647
|
+
if (!context) {
|
|
9648
|
+
throw new Error('useConfetti must be used within a Confetti.Provider');
|
|
9649
|
+
}
|
|
9650
|
+
return context;
|
|
9651
|
+
};
|
|
9652
|
+
|
|
9653
|
+
var Confetti$1 = Object.assign(Confetti$2, {
|
|
9654
|
+
Provider: ConfettiProvider,
|
|
9655
|
+
useConfetti: useConfetti
|
|
9656
|
+
});
|
|
9657
|
+
|
|
9387
9658
|
var Container$1 = index$c(View)(function (_ref) {
|
|
9388
9659
|
var theme = _ref.theme,
|
|
9389
9660
|
_ref$themeVariant = _ref.themeVariant,
|
|
@@ -23105,6 +23376,7 @@ var Confetti = function Confetti(_ref) {
|
|
|
23105
23376
|
strokeWidth: "0.4"
|
|
23106
23377
|
})));
|
|
23107
23378
|
};
|
|
23379
|
+
Confetti.displayName = 'ConfettiIllustration';
|
|
23108
23380
|
|
|
23109
23381
|
var Connections = function Connections(_ref) {
|
|
23110
23382
|
var stroke = _ref.stroke,
|
|
@@ -43574,4 +43846,4 @@ var InlineLoader = function InlineLoader(_ref) {
|
|
|
43574
43846
|
}, text));
|
|
43575
43847
|
};
|
|
43576
43848
|
|
|
43577
|
-
export { Accordion, Alert, AppCue, Attachment, index$b as Avatar, Badge, BottomNavigation, BottomSheet, Box, CompoundButton as Button, Calendar, Card, index$a as Carousel, Chart, index$9 as Checkbox, Chip, Collapse, ContentNavigator, index$8 as DatePicker, Divider, index$7 as Drawer, Empty, ErrorComponent as Error, FAB, FilterTrigger, FlatListWithFAB, FloatingIsland, HeroDesignProvider, Icon, Illustration, IllustrationList, Image, InlineLoader, List$1 as List, LocaleProvider, index$6 as MapPin, PageControl, PinInput, Portal, Progress, CompoundRadio as Radio, Rate, RefreshControl, index as RichTextEditor, ScrollViewWithFAB, Search, SectionHeading, SectionList, SectionListWithFAB, SegmentedControl, index$4 as Select, Skeleton, Slider, Spinner, Success, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, PublicTimePicker as TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, ehJobsShadowPalette, ehJobsSystemPalette, ehWorkDarkShadowPalette, ehWorkDarkSystemPalette, ehWorkShadowPalette, ehWorkSystemPalette, getTheme, jobsSystemPalette, scale, index$c as styled, swagDarkSystemPalette, swagLightJobsSystemPalette, swagSystemPalette$1 as swagLightSystemPalette, swagSystemPalette$2 as swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, withTheme, workSystemPalette };
|
|
43849
|
+
export { Accordion, Alert, AppCue, Attachment, index$b as Avatar, Badge, BottomNavigation, BottomSheet, Box, CompoundButton as Button, Calendar, Card, index$a as Carousel, Chart, index$9 as Checkbox, Chip, Collapse, Confetti$1 as Confetti, ContentNavigator, index$8 as DatePicker, Divider, index$7 as Drawer, Empty, ErrorComponent as Error, FAB, FilterTrigger, FlatListWithFAB, FloatingIsland, HeroDesignProvider, Icon, Illustration, IllustrationList, Image, InlineLoader, List$1 as List, LocaleProvider, index$6 as MapPin, PageControl, PinInput, Portal, Progress, CompoundRadio as Radio, Rate, RefreshControl, index as RichTextEditor, ScrollViewWithFAB, Search, SectionHeading, SectionList, SectionListWithFAB, SegmentedControl, index$4 as Select, Skeleton, Slider, Spinner, Success, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, PublicTimePicker as TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, ehJobsShadowPalette, ehJobsSystemPalette, ehWorkDarkShadowPalette, ehWorkDarkSystemPalette, ehWorkShadowPalette, ehWorkSystemPalette, getTheme, jobsSystemPalette, scale, index$c as styled, swagDarkSystemPalette, swagLightJobsSystemPalette, swagSystemPalette$1 as swagLightSystemPalette, swagSystemPalette$2 as swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, withTheme, workSystemPalette };
|