@hero-design/rn 8.25.3 → 8.26.1

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.
Files changed (39) hide show
  1. package/.eslintrc.js +2 -1
  2. package/.turbo/turbo-build.log +8 -9
  3. package/assets/fonts/hero-icons-mobile.ttf +0 -0
  4. package/es/index.js +350 -198
  5. package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
  6. package/lib/index.js +350 -198
  7. package/package.json +6 -5
  8. package/src/components/FAB/ActionGroup/ActionItem.tsx +6 -1
  9. package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +17 -3
  10. package/src/components/FAB/ActionGroup/StyledActionItem.tsx +1 -4
  11. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +704 -1040
  12. package/src/components/FAB/ActionGroup/__tests__/index.spec.tsx +9 -15
  13. package/src/components/FAB/ActionGroup/index.tsx +111 -43
  14. package/src/components/FAB/AnimatedFABIcon.tsx +5 -3
  15. package/src/components/FAB/FAB.tsx +16 -3
  16. package/src/components/FAB/StyledFAB.tsx +10 -3
  17. package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +4 -4
  18. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +1 -2
  19. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +74 -43
  20. package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
  21. package/src/components/Icon/IconList.ts +1 -0
  22. package/src/components/Switch/SelectorSwitch/Option.tsx +31 -5
  23. package/src/components/Switch/SelectorSwitch/StyledSelectorSwitch.tsx +18 -4
  24. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +25 -18
  25. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +49 -18
  26. package/src/components/Switch/SelectorSwitch/index.tsx +81 -17
  27. package/src/components/Switch/index.tsx +1 -0
  28. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +8 -9
  29. package/src/theme/components/fab.ts +8 -9
  30. package/types/components/FAB/ActionGroup/ActionItem.d.ts +1 -0
  31. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +7 -1
  32. package/types/components/FAB/StyledFAB.d.ts +5 -1
  33. package/types/components/Icon/IconList.d.ts +1 -1
  34. package/types/components/Icon/index.d.ts +1 -1
  35. package/types/components/Icon/utils.d.ts +1 -1
  36. package/types/components/Switch/SelectorSwitch/Option.d.ts +4 -1
  37. package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +15 -9
  38. package/types/components/Switch/SelectorSwitch/index.d.ts +1 -1
  39. package/types/theme/components/fab.d.ts +5 -6
package/es/index.js CHANGED
@@ -2279,7 +2279,7 @@ var getFABTheme = function getFABTheme(theme) {
2279
2279
  buttonPressedBackground: theme.colors.pressedSurface,
2280
2280
  icon: theme.colors.onPrimary,
2281
2281
  headerText: theme.colors.onDefaultGlobalSurface,
2282
- actionItemBackground: theme.colors.primary,
2282
+ actionItemBackground: theme.colors.secondary,
2283
2283
  actionItemPressedBackground: theme.colors.pressedSurface,
2284
2284
  backdropBackground: theme.colors.overlayGlobalSurface,
2285
2285
  titleText: theme.colors.onPrimary,
@@ -2288,7 +2288,9 @@ var getFABTheme = function getFABTheme(theme) {
2288
2288
  };
2289
2289
  var sizes = {
2290
2290
  width: theme.sizes.xxxxxlarge,
2291
- height: theme.sizes.xxxxxlarge
2291
+ height: theme.sizes.xxxxxlarge,
2292
+ iconContainerWidth: theme.sizes.large,
2293
+ iconContainerHeight: theme.sizes.large
2292
2294
  };
2293
2295
  var fonts = {
2294
2296
  header: theme.fonts.neutral.semiBold,
@@ -2297,7 +2299,7 @@ var getFABTheme = function getFABTheme(theme) {
2297
2299
  };
2298
2300
  var fontSizes = {
2299
2301
  header: theme.fontSizes.xxxlarge,
2300
- actionItemText: theme.fontSizes.medium,
2302
+ actionItemText: theme.fontSizes.large,
2301
2303
  title: theme.fontSizes.large
2302
2304
  };
2303
2305
  var lineHeights = {
@@ -2316,20 +2318,17 @@ var getFABTheme = function getFABTheme(theme) {
2316
2318
  elevation: 2
2317
2319
  };
2318
2320
  var space = {
2319
- actionItemPaddingLeft: theme.space.medium,
2320
- actionItemPaddingRight: theme.space.medium,
2321
- actionItemPaddingTop: theme.space.small,
2322
- actionItemPaddingBottom: theme.space.small,
2321
+ actionItemPadding: theme.space.smallMedium,
2323
2322
  actionItemMargin: theme.space.small,
2324
2323
  actionItemMarginRight: theme.space.large,
2325
- actionItemTextPaddingLeft: theme.space.small,
2324
+ actionItemTextPaddingLeft: theme.space.xsmall,
2326
2325
  buttonMarginTop: theme.space.large,
2327
2326
  buttonMarginRight: theme.space.large,
2328
2327
  headerTextMarginRight: theme.space.large,
2329
2328
  headerTextMarginBottom: theme.space.large,
2330
- containerPaddingHorizontal: theme.space.medium,
2331
- containerPaddingVertical: theme.space.medium,
2332
- titleMarginHorizontal: theme.space.small
2329
+ containerPadding: theme.space.large - theme.space.xsmall,
2330
+ titleMarginHorizontal: theme.space.small,
2331
+ internalFABMarginBottom: theme.space.large
2333
2332
  };
2334
2333
  var radii = {
2335
2334
  actionItem: theme.radii.rounded
@@ -6198,7 +6197,7 @@ var Typography = {
6198
6197
  };
6199
6198
 
6200
6199
  // 🔴 DO NOT EDIT — This file is generated automatically.
6201
- 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', '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', 'book-outlined', 'bookmark-added-outlined', 'bookmark-outlined', 'box-check-outlined', 'box-outlined', 'bullet-points', 'cake-outlined', 'calendar-dates-outlined', 'calendar-star-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-outlined', 'edit-template-outlined', 'email-outlined', 'enter-arrow', 'envelope-outlined', 'expense-outlined', 'explore-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', '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', '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', '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'];
6200
+ 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', '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', 'book-outlined', 'bookmark-added-outlined', 'bookmark-outlined', 'box-check-outlined', 'box-outlined', 'bullet-points', 'cake-outlined', 'calendar-dates-outlined', 'calendar-star-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', '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', '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', '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', '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'];
6202
6201
 
6203
6202
  var activate = 59000;
6204
6203
  var adjustment = 59003;
@@ -6275,18 +6274,18 @@ var add = 59181;
6275
6274
  var bold = 59203;
6276
6275
  var cancel = 59215;
6277
6276
  var checkmark = 59220;
6278
- var italic = 59301;
6279
- var number = 59325;
6280
- var percentage = 59330;
6281
- var redeem = 59339;
6282
- var refresh = 59340;
6283
- var remove = 59341;
6284
- var restart = 59343;
6285
- var strikethrough = 59364;
6286
- var sync = 59370;
6287
- var transfer = 59377;
6288
- var unavailable = 59380;
6289
- var underline = 59381;
6277
+ var italic = 59302;
6278
+ var number = 59326;
6279
+ var percentage = 59331;
6280
+ var redeem = 59340;
6281
+ var refresh = 59341;
6282
+ var remove = 59342;
6283
+ var restart = 59344;
6284
+ var strikethrough = 59365;
6285
+ var sync = 59371;
6286
+ var transfer = 59378;
6287
+ var unavailable = 59381;
6288
+ var underline = 59382;
6290
6289
  var glyphMap = {
6291
6290
  activate: activate,
6292
6291
  "add-emoji": 59001,
@@ -6542,145 +6541,146 @@ var glyphMap = {
6542
6541
  "double-buildings-outlined": 59251,
6543
6542
  "double-left-arrows": 59252,
6544
6543
  "double-right-arrows": 59253,
6545
- "download-outlined": 59254,
6546
- "edit-template-outlined": 59255,
6547
- "email-outlined": 59256,
6548
- "enter-arrow": 59257,
6549
- "envelope-outlined": 59258,
6550
- "expense-outlined": 59259,
6551
- "explore-outlined": 59260,
6552
- "external-link": 59261,
6553
- "eye-invisible-outlined": 59262,
6554
- "eye-outlined": 59263,
6555
- "face-id": 59264,
6556
- "face-meh-outlined": 59265,
6557
- "face-open-smiley-outlined": 59266,
6558
- "face-sad-outlined": 59267,
6559
- "face-smiley-outlined": 59268,
6560
- "fastfood-outlined": 59269,
6561
- "feed-outlined": 59270,
6562
- "file-certified-outlined": 59271,
6563
- "file-clone-outlined": 59272,
6564
- "file-copy-outlined": 59273,
6565
- "file-dispose-outlined": 59274,
6566
- "file-dollar-certified-outlined": 59275,
6567
- "file-dollar-outlined": 59276,
6568
- "file-download-outlined": 59277,
6569
- "file-export-outlined": 59278,
6570
- "file-lock-outlined": 59279,
6571
- "file-outlined": 59280,
6572
- "file-search-outlined": 59281,
6573
- "file-secured-outlined": 59282,
6574
- "file-statutory-outlined": 59283,
6575
- "file-verified-outlined": 59284,
6576
- "filter-outlined": 59285,
6577
- "folder-outlined": 59286,
6578
- "folder-user-outlined": 59287,
6579
- "form-outlined": 59288,
6580
- "funnel-filter-outline": 59289,
6581
- "graph-outlined": 59290,
6582
- "hand-holding-user-outlined": 59291,
6583
- "happy-sun-outlined": 59292,
6584
- "health-bag-outlined": 59293,
6585
- "heart-outlined": 59294,
6586
- "home-active-outlined": 59295,
6587
- "home-outlined": 59296,
6588
- "id-card-outlined": 59297,
6589
- "image-outlined": 59298,
6590
- "import-outlined": 59299,
6591
- "instapay-outlined": 59300,
6544
+ "download-box-outlined": 59254,
6545
+ "download-outlined": 59255,
6546
+ "edit-template-outlined": 59256,
6547
+ "email-outlined": 59257,
6548
+ "enter-arrow": 59258,
6549
+ "envelope-outlined": 59259,
6550
+ "expense-outlined": 59260,
6551
+ "explore-outlined": 59261,
6552
+ "external-link": 59262,
6553
+ "eye-invisible-outlined": 59263,
6554
+ "eye-outlined": 59264,
6555
+ "face-id": 59265,
6556
+ "face-meh-outlined": 59266,
6557
+ "face-open-smiley-outlined": 59267,
6558
+ "face-sad-outlined": 59268,
6559
+ "face-smiley-outlined": 59269,
6560
+ "fastfood-outlined": 59270,
6561
+ "feed-outlined": 59271,
6562
+ "file-certified-outlined": 59272,
6563
+ "file-clone-outlined": 59273,
6564
+ "file-copy-outlined": 59274,
6565
+ "file-dispose-outlined": 59275,
6566
+ "file-dollar-certified-outlined": 59276,
6567
+ "file-dollar-outlined": 59277,
6568
+ "file-download-outlined": 59278,
6569
+ "file-export-outlined": 59279,
6570
+ "file-lock-outlined": 59280,
6571
+ "file-outlined": 59281,
6572
+ "file-search-outlined": 59282,
6573
+ "file-secured-outlined": 59283,
6574
+ "file-statutory-outlined": 59284,
6575
+ "file-verified-outlined": 59285,
6576
+ "filter-outlined": 59286,
6577
+ "folder-outlined": 59287,
6578
+ "folder-user-outlined": 59288,
6579
+ "form-outlined": 59289,
6580
+ "funnel-filter-outline": 59290,
6581
+ "graph-outlined": 59291,
6582
+ "hand-holding-user-outlined": 59292,
6583
+ "happy-sun-outlined": 59293,
6584
+ "health-bag-outlined": 59294,
6585
+ "heart-outlined": 59295,
6586
+ "home-active-outlined": 59296,
6587
+ "home-outlined": 59297,
6588
+ "id-card-outlined": 59298,
6589
+ "image-outlined": 59299,
6590
+ "import-outlined": 59300,
6591
+ "instapay-outlined": 59301,
6592
6592
  italic: italic,
6593
- "link-1": 59302,
6594
- "link-2": 59303,
6595
- "list-outlined": 59304,
6596
- "live-help-outlined": 59305,
6597
- "location-on-outlined": 59306,
6598
- "location-outlined": 59307,
6599
- "lock-outlined": 59308,
6600
- "locked-file-outlined": 59309,
6601
- "log-out": 59310,
6602
- "media-content-outlined": 59311,
6603
- "menu-close": 59312,
6604
- "menu-expand": 59313,
6605
- "menu-fold-outlined": 59314,
6606
- "menu-unfold-outlined": 59315,
6607
- "moneybag-outlined": 59316,
6608
- "moon-outlined": 59317,
6609
- "more-horizontal": 59318,
6610
- "more-vertical": 59319,
6611
- "multiple-folders-outlined": 59320,
6612
- "multiple-users-outlined": 59321,
6613
- "near-me-outlined": 59322,
6614
- "node-outlined": 59323,
6615
- "number-points": 59324,
6593
+ "link-1": 59303,
6594
+ "link-2": 59304,
6595
+ "list-outlined": 59305,
6596
+ "live-help-outlined": 59306,
6597
+ "location-on-outlined": 59307,
6598
+ "location-outlined": 59308,
6599
+ "lock-outlined": 59309,
6600
+ "locked-file-outlined": 59310,
6601
+ "log-out": 59311,
6602
+ "media-content-outlined": 59312,
6603
+ "menu-close": 59313,
6604
+ "menu-expand": 59314,
6605
+ "menu-fold-outlined": 59315,
6606
+ "menu-unfold-outlined": 59316,
6607
+ "moneybag-outlined": 59317,
6608
+ "moon-outlined": 59318,
6609
+ "more-horizontal": 59319,
6610
+ "more-vertical": 59320,
6611
+ "multiple-folders-outlined": 59321,
6612
+ "multiple-users-outlined": 59322,
6613
+ "near-me-outlined": 59323,
6614
+ "node-outlined": 59324,
6615
+ "number-points": 59325,
6616
6616
  number: number,
6617
- "overview-outlined": 59326,
6618
- "payment-summary-outlined": 59327,
6619
- "payslip-outlined": 59328,
6620
- "pencil-outlined": 59329,
6617
+ "overview-outlined": 59327,
6618
+ "payment-summary-outlined": 59328,
6619
+ "payslip-outlined": 59329,
6620
+ "pencil-outlined": 59330,
6621
6621
  percentage: percentage,
6622
- "phone-outlined": 59331,
6623
- "piggy-bank-outlined": 59332,
6624
- "plane-outlined": 59333,
6625
- "play-circle-outlined": 59334,
6626
- "print-outlined": 59335,
6627
- "qr-code-outlined": 59336,
6628
- "qualification-outlined": 59337,
6629
- "re-assign": 59338,
6622
+ "phone-outlined": 59332,
6623
+ "piggy-bank-outlined": 59333,
6624
+ "plane-outlined": 59334,
6625
+ "play-circle-outlined": 59335,
6626
+ "print-outlined": 59336,
6627
+ "qr-code-outlined": 59337,
6628
+ "qualification-outlined": 59338,
6629
+ "re-assign": 59339,
6630
6630
  redeem: redeem,
6631
6631
  refresh: refresh,
6632
6632
  remove: remove,
6633
- "reply-outlined": 59342,
6633
+ "reply-outlined": 59343,
6634
6634
  restart: restart,
6635
- "return-arrow": 59344,
6636
- "rostering-outlined": 59345,
6637
- "save-outlined": 59346,
6638
- "schedule-outlined": 59347,
6639
- "search-outlined": 59348,
6640
- "search-secured-outlined": 59349,
6641
- "send-outlined": 59350,
6642
- "share-1": 59351,
6643
- "share-2": 59352,
6644
- "share-outlined": 59353,
6645
- "show-chart-outlined": 59354,
6646
- "single-down-arrow": 59355,
6647
- "single-left-arrow": 59356,
6648
- "single-right-arrow": 59357,
6649
- "single-up-arrow": 59358,
6650
- "speaker-active-outlined": 59359,
6651
- "speaker-outlined": 59360,
6652
- "star-circle-outlined": 59361,
6653
- "star-outlined": 59362,
6654
- "stopwatch-outlined": 59363,
6635
+ "return-arrow": 59345,
6636
+ "rostering-outlined": 59346,
6637
+ "save-outlined": 59347,
6638
+ "schedule-outlined": 59348,
6639
+ "search-outlined": 59349,
6640
+ "search-secured-outlined": 59350,
6641
+ "send-outlined": 59351,
6642
+ "share-1": 59352,
6643
+ "share-2": 59353,
6644
+ "share-outlined": 59354,
6645
+ "show-chart-outlined": 59355,
6646
+ "single-down-arrow": 59356,
6647
+ "single-left-arrow": 59357,
6648
+ "single-right-arrow": 59358,
6649
+ "single-up-arrow": 59359,
6650
+ "speaker-active-outlined": 59360,
6651
+ "speaker-outlined": 59361,
6652
+ "star-circle-outlined": 59362,
6653
+ "star-outlined": 59363,
6654
+ "stopwatch-outlined": 59364,
6655
6655
  strikethrough: strikethrough,
6656
- "styler-outlined": 59365,
6657
- "suitcase-clock-outlined": 59366,
6658
- "suitcase-outlined": 59367,
6659
- "survey-outlined": 59368,
6660
- "switch-outlined": 59369,
6656
+ "styler-outlined": 59366,
6657
+ "suitcase-clock-outlined": 59367,
6658
+ "suitcase-outlined": 59368,
6659
+ "survey-outlined": 59369,
6660
+ "switch-outlined": 59370,
6661
6661
  sync: sync,
6662
- "tag-outlined": 59371,
6663
- "target-outlined": 59372,
6664
- "tennis-outlined": 59373,
6665
- "ticket-outlined": 59374,
6666
- "timesheet-outlined": 59375,
6667
- "today-outlined": 59376,
6662
+ "tag-outlined": 59372,
6663
+ "target-outlined": 59373,
6664
+ "tennis-outlined": 59374,
6665
+ "ticket-outlined": 59375,
6666
+ "timesheet-outlined": 59376,
6667
+ "today-outlined": 59377,
6668
6668
  transfer: transfer,
6669
- "trash-bin-outlined": 59378,
6670
- "umbrela-outlined": 59379,
6669
+ "trash-bin-outlined": 59379,
6670
+ "umbrela-outlined": 59380,
6671
6671
  unavailable: unavailable,
6672
6672
  underline: underline,
6673
- "union-outlined": 59382,
6674
- "unlock-outlined": 59383,
6675
- "upload-outlined": 59384,
6676
- "user-circle-outlined": 59385,
6677
- "user-gear-outlined": 59386,
6678
- "user-outlined": 59387,
6679
- "user-rectangle-outlined": 59388,
6680
- "video-1-outlined": 59389,
6681
- "video-2-outlined": 59390,
6682
- "volunteer-outlined": 59391,
6683
- "wallet-outlined": 59392
6673
+ "union-outlined": 59383,
6674
+ "unlock-outlined": 59384,
6675
+ "upload-outlined": 59385,
6676
+ "user-circle-outlined": 59386,
6677
+ "user-gear-outlined": 59387,
6678
+ "user-outlined": 59388,
6679
+ "user-rectangle-outlined": 59389,
6680
+ "video-1-outlined": 59390,
6681
+ "video-2-outlined": 59391,
6682
+ "volunteer-outlined": 59392,
6683
+ "wallet-outlined": 59393
6684
6684
  };
6685
6685
 
6686
6686
  var HeroIcon = createIconSet(glyphMap, 'hero-icons-mobile', 'hero-icons-mobile.ttf');
@@ -12873,8 +12873,7 @@ var StyledFAB$1 = index$a(TouchableHighlight)(function (_ref) {
12873
12873
  alignItems: 'center',
12874
12874
  justifyContent: 'center',
12875
12875
  alignSelf: 'flex-start',
12876
- paddingHorizontal: theme.__hd__.fab.space.containerPaddingHorizontal,
12877
- paddingVertical: theme.__hd__.fab.space.containerPaddingVertical,
12876
+ padding: theme.__hd__.fab.space.containerPadding,
12878
12877
  flexDirection: 'row',
12879
12878
  elevation: theme.__hd__.fab.shadows.elevation,
12880
12879
  shadowColor: theme.__hd__.fab.colors.shadow,
@@ -12904,6 +12903,15 @@ var StyledFABText = index$a(Typography.Text)(function (_ref3) {
12904
12903
  marginHorizontal: theme.__hd__.fab.space.titleMarginHorizontal
12905
12904
  };
12906
12905
  });
12906
+ var StyledIconContainer = index$a(Box)(function (_ref4) {
12907
+ var theme = _ref4.theme;
12908
+ return {
12909
+ width: theme.__hd__.fab.sizes.iconContainerWidth,
12910
+ height: theme.__hd__.fab.sizes.iconContainerHeight,
12911
+ justifyContent: 'center',
12912
+ alignItems: 'center'
12913
+ };
12914
+ });
12907
12915
 
12908
12916
  var _excluded$b = ["active"];
12909
12917
  var AnimatedIcons = Animated.createAnimatedComponent(StyledFABIcon);
@@ -12914,7 +12922,9 @@ var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
12914
12922
  useEffect(function () {
12915
12923
  var animation = Animated.timing(rotateAnimation.current, {
12916
12924
  toValue: active ? 1 : 0,
12917
- useNativeDriver: true
12925
+ useNativeDriver: Platform.OS === 'ios' || Platform.OS === 'android',
12926
+ easing: Easing.inOut(Easing.ease),
12927
+ duration: 300
12918
12928
  });
12919
12929
  animation.start();
12920
12930
  return function () {
@@ -12931,7 +12941,9 @@ var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
12931
12941
  rotate: interpolatedRotateAnimation
12932
12942
  }]
12933
12943
  }])
12934
- }, /*#__PURE__*/React.createElement(AnimatedIcons, iconProps));
12944
+ }, /*#__PURE__*/React.createElement(AnimatedIcons, _extends$1({
12945
+ size: "xsmall"
12946
+ }, iconProps)));
12935
12947
  };
12936
12948
 
12937
12949
  var IconOnlyContent = function IconOnlyContent(_ref) {
@@ -12939,11 +12951,11 @@ var IconOnlyContent = function IconOnlyContent(_ref) {
12939
12951
  animated = _ref.animated,
12940
12952
  active = _ref.active;
12941
12953
  if (animated) {
12942
- return /*#__PURE__*/React.createElement(AnimatedFABIcon, {
12954
+ return /*#__PURE__*/React.createElement(StyledIconContainer, null, /*#__PURE__*/React.createElement(AnimatedFABIcon, {
12943
12955
  active: active,
12944
12956
  icon: icon,
12945
12957
  testID: "animated-fab-icon"
12946
- });
12958
+ }));
12947
12959
  }
12948
12960
  return /*#__PURE__*/React.createElement(StyledFABIcon, {
12949
12961
  icon: icon,
@@ -12953,11 +12965,11 @@ var IconOnlyContent = function IconOnlyContent(_ref) {
12953
12965
  var IconWithTextContent = function IconWithTextContent(_ref2) {
12954
12966
  var icon = _ref2.icon,
12955
12967
  title = _ref2.title;
12956
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledFABIcon, {
12968
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledIconContainer, null, /*#__PURE__*/React.createElement(StyledFABIcon, {
12957
12969
  size: "xsmall",
12958
12970
  icon: icon,
12959
12971
  testID: "styled-fab-icon"
12960
- }), /*#__PURE__*/React.createElement(StyledFABText, null, title));
12972
+ })), /*#__PURE__*/React.createElement(StyledFABText, null, title));
12961
12973
  };
12962
12974
  var FAB = function FAB(_ref3) {
12963
12975
  var onPress = _ref3.onPress,
@@ -12987,10 +12999,7 @@ var FAB = function FAB(_ref3) {
12987
12999
  var StyledActionItem = index$a(TouchableHighlight)(function (_ref) {
12988
13000
  var theme = _ref.theme;
12989
13001
  return {
12990
- paddingLeft: theme.__hd__.fab.space.actionItemPaddingLeft,
12991
- paddingRight: theme.__hd__.fab.space.actionItemPaddingRight,
12992
- paddingTop: theme.__hd__.fab.space.actionItemPaddingTop,
12993
- paddingBottom: theme.__hd__.fab.space.actionItemPaddingBottom,
13002
+ padding: theme.__hd__.fab.space.actionItemPadding,
12994
13003
  margin: theme.__hd__.fab.space.actionItemMargin,
12995
13004
  marginRight: theme.__hd__.fab.space.actionItemMarginRight,
12996
13005
  backgroundColor: theme.__hd__.fab.colors.actionItemBackground,
@@ -13030,9 +13039,10 @@ var ActionItem = function ActionItem(_ref) {
13030
13039
  style: style,
13031
13040
  onPress: onPress,
13032
13041
  testID: testID
13033
- }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledIcon, {
13042
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledIconContainer, null, /*#__PURE__*/React.createElement(StyledIcon, {
13043
+ size: "xsmall",
13034
13044
  icon: icon
13035
- }), /*#__PURE__*/React.createElement(StyledActionItemText, null, title)));
13045
+ })), /*#__PURE__*/React.createElement(StyledActionItemText, null, title)));
13036
13046
  };
13037
13047
 
13038
13048
  var StyledContainer$2 = index$a(View)({
@@ -13061,10 +13071,11 @@ var StyledBackdrop = index$a(Animated.View)(function (_ref2) {
13061
13071
  var theme = _ref2.theme;
13062
13072
  return {
13063
13073
  position: 'absolute',
13064
- left: 0,
13065
- right: 0,
13066
- top: 0,
13074
+ flex: 1,
13075
+ height: '100%',
13076
+ width: '100%',
13067
13077
  bottom: 0,
13078
+ right: 0,
13068
13079
  backgroundColor: theme.__hd__.fab.colors.backdropBackground
13069
13080
  };
13070
13081
  });
@@ -13080,6 +13091,17 @@ var StyledHeaderText = index$a(Typography.Text)(function (_ref3) {
13080
13091
  textAlign: 'right'
13081
13092
  };
13082
13093
  });
13094
+ var StyledModalView = index$a(View)({
13095
+ position: 'absolute',
13096
+ flex: 1,
13097
+ height: '100%',
13098
+ width: '100%',
13099
+ bottom: 0,
13100
+ right: 0,
13101
+ justifyContent: 'flex-end',
13102
+ alignItems: 'flex-end',
13103
+ backgroundColor: 'transparent'
13104
+ });
13083
13105
 
13084
13106
  var ActionItemsListComponent = function ActionItemsListComponent(_ref) {
13085
13107
  var style = _ref.style,
@@ -13088,7 +13110,7 @@ var ActionItemsListComponent = function ActionItemsListComponent(_ref) {
13088
13110
  style: style
13089
13111
  }, items === null || items === void 0 ? void 0 : items.map(function (itemProp) {
13090
13112
  return /*#__PURE__*/React.createElement(ActionItem, _extends$1({
13091
- key: itemProp.icon
13113
+ key: itemProp.key || "".concat(itemProp.icon, "_").concat(itemProp.title)
13092
13114
  }, itemProp));
13093
13115
  }));
13094
13116
  };
@@ -13102,14 +13124,43 @@ var ActionGroup = function ActionGroup(_ref2) {
13102
13124
  fabTitle = _ref2.fabTitle,
13103
13125
  _ref2$fabIcon = _ref2.fabIcon,
13104
13126
  fabIcon = _ref2$fabIcon === void 0 ? 'add' : _ref2$fabIcon;
13127
+ var theme = useTheme();
13128
+ // Internal state to control the animation of the action group
13129
+ var _useState = useState(active),
13130
+ _useState2 = _slicedToArray(_useState, 2),
13131
+ visible = _useState2[0],
13132
+ setVisibility = _useState2[1];
13105
13133
  var tranlateXAnimation = useRef(new Animated.Value(active ? 1 : 0));
13106
13134
  useEffect(function () {
13135
+ if (active && !visible) {
13136
+ setVisibility(true);
13137
+ }
13138
+ }, [active]);
13139
+ useEffect(function () {
13140
+ if (active) {
13141
+ var animation = Animated.timing(tranlateXAnimation.current, {
13142
+ toValue: 1,
13143
+ useNativeDriver: Platform.OS === 'ios' || Platform.OS === 'android',
13144
+ easing: Easing.inOut(Easing.cubic)
13145
+ });
13146
+ animation.start();
13147
+ }
13148
+ }, [active]);
13149
+ // Make sure the animation finishes running before closing the modal
13150
+ var onInternalFABPress = useCallback(function () {
13151
+ if (!onPress) {
13152
+ return;
13153
+ }
13107
13154
  var animation = Animated.timing(tranlateXAnimation.current, {
13108
- toValue: active ? 1 : 0,
13109
- useNativeDriver: true
13155
+ toValue: 0,
13156
+ useNativeDriver: Platform.OS === 'ios' || Platform.OS === 'android',
13157
+ easing: Easing.inOut(Easing.cubic)
13110
13158
  });
13111
- animation.start();
13112
- }, [active]);
13159
+ animation.start(function () {
13160
+ setVisibility(false);
13161
+ onPress();
13162
+ });
13163
+ }, [visible]);
13113
13164
  var interpolatedTranlateXAnimation = tranlateXAnimation.current.interpolate({
13114
13165
  inputRange: [0, 1],
13115
13166
  outputRange: [400, 0]
@@ -13126,13 +13177,18 @@ var ActionGroup = function ActionGroup(_ref2) {
13126
13177
  testID: testID,
13127
13178
  pointerEvents: "box-none",
13128
13179
  style: style
13180
+ }, /*#__PURE__*/React.createElement(Modal, {
13181
+ visible: visible,
13182
+ transparent: true,
13183
+ statusBarTranslucent: true,
13184
+ animationType: "none"
13129
13185
  }, /*#__PURE__*/React.createElement(StyledBackdrop, {
13130
- pointerEvents: active ? 'auto' : 'box-none',
13131
- testID: "back-drop",
13132
13186
  style: {
13133
13187
  opacity: interpolatedBackdropOpacityAnimation
13134
- }
13135
- }), /*#__PURE__*/React.createElement(StyledActionGroupContainer, {
13188
+ },
13189
+ testID: "back-drop",
13190
+ pointerEvents: active ? 'auto' : 'box-none'
13191
+ }), /*#__PURE__*/React.createElement(StyledModalView, null, /*#__PURE__*/React.createElement(StyledActionGroupContainer, {
13136
13192
  pointerEvents: active ? 'auto' : 'none',
13137
13193
  testID: "action-group",
13138
13194
  style: {
@@ -13145,7 +13201,17 @@ var ActionGroup = function ActionGroup(_ref2) {
13145
13201
  testID: "header-text"
13146
13202
  }, headerTitle), /*#__PURE__*/React.createElement(ActionItemsListComponent, {
13147
13203
  items: items
13148
- })), /*#__PURE__*/React.createElement(StyledFAB, {
13204
+ })), active && /*#__PURE__*/React.createElement(StyledFAB, {
13205
+ testID: "fab",
13206
+ icon: fabIcon,
13207
+ onPress: onInternalFABPress,
13208
+ animated: true,
13209
+ active: active,
13210
+ title: fabTitle,
13211
+ style: {
13212
+ marginBottom: theme.__hd__.fab.space.internalFABMarginBottom
13213
+ }
13214
+ }))), !active && /*#__PURE__*/React.createElement(StyledFAB, {
13149
13215
  testID: "fab",
13150
13216
  icon: fabIcon,
13151
13217
  onPress: onPress,
@@ -15042,6 +15108,7 @@ var Success = function Success(props) {
15042
15108
  return /*#__PURE__*/React.createElement(SuccessPage, props);
15043
15109
  };
15044
15110
 
15111
+ var AnimatedView = Animated.createAnimatedComponent(View);
15045
15112
  var StyledWrapper$1 = index$a(View)(function (_ref) {
15046
15113
  var theme = _ref.theme;
15047
15114
  return {
@@ -15050,25 +15117,39 @@ var StyledWrapper$1 = index$a(View)(function (_ref) {
15050
15117
  height: theme.__hd__["switch"].sizes.selector.height,
15051
15118
  borderRadius: theme.__hd__["switch"].radii.selector["default"],
15052
15119
  backgroundColor: theme.__hd__["switch"].colors.selector.background,
15053
- padding: theme.__hd__["switch"].spaces.selector.wrapperPadding
15120
+ padding: theme.__hd__["switch"].spaces.selector.wrapperPadding,
15121
+ position: 'relative'
15054
15122
  };
15055
15123
  });
15056
- var StyledTextWrapper = index$a(View)(function (_ref2) {
15124
+ var StyledTextWrapper = index$a(AnimatedView)(function (_ref2) {
15057
15125
  var theme = _ref2.theme;
15058
15126
  return {
15059
15127
  flex: 1,
15060
15128
  borderRadius: theme.__hd__["switch"].radii.selector["default"],
15061
- backgroundColor: theme.__hd__["switch"].colors.selector.textBackground,
15062
15129
  justifyContent: 'center',
15063
- alignItems: 'center'
15130
+ alignItems: 'center',
15131
+ zIndex: 1
15064
15132
  };
15065
15133
  });
15066
- var StyledIconWrapper = index$a(View)(function (_ref3) {
15134
+ var StyledIconWrapper = index$a(AnimatedView)(function (_ref3) {
15067
15135
  var theme = _ref3.theme;
15068
15136
  return {
15069
15137
  paddingHorizontal: theme.__hd__["switch"].spaces.selector.iconPadding,
15070
15138
  justifyContent: 'center',
15071
- alignItems: 'center'
15139
+ alignItems: 'center',
15140
+ zIndex: 1
15141
+ };
15142
+ });
15143
+ var StyledKnot$1 = index$a(AnimatedView)(function (_ref4) {
15144
+ var theme = _ref4.theme;
15145
+ return {
15146
+ borderRadius: theme.__hd__["switch"].radii.selector["default"],
15147
+ backgroundColor: theme.__hd__["switch"].colors.selector.textBackground,
15148
+ position: 'absolute',
15149
+ top: theme.__hd__["switch"].spaces.selector.wrapperPadding,
15150
+ bottom: theme.__hd__["switch"].spaces.selector.wrapperPadding,
15151
+ left: theme.__hd__["switch"].spaces.selector.wrapperPadding,
15152
+ right: theme.__hd__["switch"].spaces.selector.wrapperPadding
15072
15153
  };
15073
15154
  });
15074
15155
 
@@ -15094,16 +15175,46 @@ var Option = function Option(_ref2) {
15094
15175
  var text = _ref2.text,
15095
15176
  icon = _ref2.icon,
15096
15177
  badge = _ref2.badge,
15097
- selected = _ref2.selected;
15178
+ selected = _ref2.selected,
15179
+ onLayout = _ref2.onLayout,
15180
+ _ref2$index = _ref2.index,
15181
+ index = _ref2$index === void 0 ? 0 : _ref2$index;
15182
+ var animatedValue = useRef(new Animated.Value(1)).current;
15183
+ var translateX = animatedValue.interpolate({
15184
+ inputRange: [0, 1],
15185
+ outputRange: index === 1 ? [-5, 0] : [5, 0]
15186
+ });
15187
+ useEffect(function () {
15188
+ Animated.timing(animatedValue, {
15189
+ toValue: selected ? 1 : 0,
15190
+ duration: 200,
15191
+ easing: Easing.linear,
15192
+ useNativeDriver: Platform.OS === 'ios' || Platform.OS === 'android'
15193
+ }).start();
15194
+ }, [selected]);
15098
15195
  if (selected) {
15099
- return /*#__PURE__*/React.createElement(StyledTextWrapper, null, /*#__PURE__*/React.createElement(OptionContent, {
15196
+ return /*#__PURE__*/React.createElement(StyledTextWrapper, {
15197
+ style: {
15198
+ transform: [{
15199
+ translateX: translateX
15200
+ }]
15201
+ },
15202
+ onLayout: onLayout
15203
+ }, /*#__PURE__*/React.createElement(OptionContent, {
15100
15204
  content: /*#__PURE__*/React.createElement(Typography.Text, {
15101
15205
  fontSize: "large"
15102
15206
  }, text),
15103
15207
  badge: badge
15104
15208
  }));
15105
15209
  }
15106
- return /*#__PURE__*/React.createElement(StyledIconWrapper, null, /*#__PURE__*/React.createElement(OptionContent, {
15210
+ return /*#__PURE__*/React.createElement(StyledIconWrapper, {
15211
+ style: {
15212
+ transform: [{
15213
+ translateX: translateX
15214
+ }]
15215
+ },
15216
+ onLayout: onLayout
15217
+ }, /*#__PURE__*/React.createElement(OptionContent, {
15107
15218
  content: /*#__PURE__*/React.createElement(Icon, {
15108
15219
  icon: icon
15109
15220
  }),
@@ -15114,25 +15225,65 @@ var Option = function Option(_ref2) {
15114
15225
  var SelectorSwitch = function SelectorSwitch(_ref) {
15115
15226
  var options = _ref.options,
15116
15227
  value = _ref.value,
15117
- onPress = _ref.onPress,
15228
+ _onPress = _ref.onPress,
15118
15229
  style = _ref.style,
15119
15230
  testID = _ref.testID;
15231
+ var theme = useTheme$1();
15232
+ var _useState = useState(0),
15233
+ _useState2 = _slicedToArray(_useState, 2),
15234
+ knotWidth = _useState2[0],
15235
+ setKnotWidth = _useState2[1];
15236
+ var _useState3 = useState(0),
15237
+ _useState4 = _slicedToArray(_useState3, 2),
15238
+ containerWidth = _useState4[0],
15239
+ setContainerWidth = _useState4[1];
15240
+ var animatedValue = useRef(new Animated.Value(0)).current;
15241
+ var translateX = animatedValue.interpolate({
15242
+ inputRange: [0, 1],
15243
+ outputRange: [0, Math.floor(containerWidth - knotWidth - theme.space.small)]
15244
+ });
15245
+ useEffect(function () {
15246
+ Animated.timing(animatedValue, {
15247
+ toValue: value === options[0].value ? 0 : 1,
15248
+ duration: 200,
15249
+ easing: Easing.inOut(Easing.ease),
15250
+ useNativeDriver: Platform.OS === 'ios' || Platform.OS === 'android'
15251
+ }).start();
15252
+ }, [value]);
15253
+ var onContainerLayout = useCallback(function (e) {
15254
+ setContainerWidth(e.nativeEvent.layout.width);
15255
+ }, [options]);
15256
+ var onItemLayout = useCallback(function (e, optionValue) {
15257
+ if (optionValue === value) {
15258
+ setKnotWidth(e.nativeEvent.layout.width);
15259
+ }
15260
+ }, [value]);
15120
15261
  return /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
15121
- onPress: onPress !== undefined ? function () {
15122
- return onPress(value);
15123
- } : undefined,
15262
+ onPress: function onPress() {
15263
+ return _onPress === null || _onPress === void 0 ? void 0 : _onPress(value);
15264
+ },
15124
15265
  testID: testID
15125
15266
  }, /*#__PURE__*/React.createElement(StyledWrapper$1, {
15267
+ onLayout: onContainerLayout,
15126
15268
  style: style
15127
15269
  }, options.map(function (opt, index) {
15128
- return (
15129
- /*#__PURE__*/
15270
+ return /*#__PURE__*/React.createElement(Option, _extends$1({}, opt, {
15271
+ selected: opt.value === value
15130
15272
  // eslint-disable-next-line react/no-array-index-key
15131
- React.createElement(Option, _extends$1({}, opt, {
15132
- selected: opt.value === value,
15133
- key: index
15134
- }))
15135
- );
15273
+ ,
15274
+ key: index,
15275
+ onLayout: function onLayout(e) {
15276
+ return onItemLayout(e, opt.value);
15277
+ },
15278
+ index: index
15279
+ }));
15280
+ }), /*#__PURE__*/React.createElement(StyledKnot$1, {
15281
+ style: {
15282
+ width: knotWidth,
15283
+ transform: [{
15284
+ translateX: translateX
15285
+ }]
15286
+ }
15136
15287
  })));
15137
15288
  };
15138
15289
 
@@ -15190,6 +15341,7 @@ var Switch = function Switch(_ref2) {
15190
15341
  Animated.timing(animatedOffset, {
15191
15342
  toValue: offset,
15192
15343
  easing: Easing.inOut(Easing.cubic),
15344
+ duration: 200,
15193
15345
  useNativeDriver: false
15194
15346
  }).start();
15195
15347
  }, [checked]);