@hero-design/rn 8.5.0 → 8.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.5.0",
3
+ "version": "8.6.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@emotion/native": "^11.9.3",
23
23
  "@emotion/react": "^11.9.3",
24
- "@hero-design/colors": "8.5.0",
24
+ "@hero-design/colors": "8.6.0",
25
25
  "date-fns": "^2.16.1",
26
26
  "events": "^3.2.0",
27
27
  "hero-editor": "^1.9.21"
@@ -44,7 +44,7 @@
44
44
  "@babel/preset-typescript": "^7.17.12",
45
45
  "@babel/runtime": "^7.18.9",
46
46
  "@emotion/jest": "^11.9.3",
47
- "@hero-design/eslint-plugin": "8.5.0",
47
+ "@hero-design/eslint-plugin": "8.6.0",
48
48
  "@react-native-community/datetimepicker": "^3.5.2",
49
49
  "@react-native-community/slider": "4.1.12",
50
50
  "@rollup/plugin-babel": "^5.3.1",
@@ -60,9 +60,9 @@
60
60
  "@types/react-native": "^0.67.7",
61
61
  "@types/react-native-vector-icons": "^6.4.10",
62
62
  "babel-plugin-inline-import": "^3.0.0",
63
- "eslint-config-hd": "8.5.0",
63
+ "eslint-config-hd": "8.6.0",
64
64
  "jest": "^27.3.1",
65
- "prettier-config-hd": "8.5.0",
65
+ "prettier-config-hd": "8.6.0",
66
66
  "react": "18.0.0",
67
67
  "react-native": "0.69.7",
68
68
  "react-native-gesture-handler": "~2.1.0",
@@ -1 +1 @@
1
- {"activate":59000,"add-emoji":59001,"add-person":59002,"adjustment":59003,"alignment":59004,"antenna":59005,"archive":59006,"assignment-warning":59007,"bank":59008,"bell":59009,"billing":59010,"bookmark-added":59011,"bookmark":59012,"box-check":59013,"box":59014,"buildings":59015,"cake":59016,"calendar-clock":59017,"calendar":59018,"candy-box-menu":59019,"caret-down-small":59020,"caret-down":59021,"caret-left-small":59022,"caret-left":59023,"caret-right-small":59024,"caret-right":59025,"caret-up-small":59026,"caret-up":59027,"check-radio":59028,"circle-add":59029,"circle-cancel":59030,"circle-check":59031,"circle-down":59032,"circle-info":59033,"circle-left":59034,"circle-ok":59035,"circle-pencil":59036,"circle-question":59037,"circle-remove":59038,"circle-right":59039,"circle-up":59040,"circle-warning":59041,"clock-3":59042,"clock":59043,"cloud-download":59044,"cloud-upload":59045,"cog":59046,"coin":59047,"contacts":59048,"credit-card":59049,"diamond":59050,"direction-arrows":59051,"directory":59052,"document":59053,"dollar-coin-shine":59054,"double-buildings":59055,"edit-template":59056,"envelope":59057,"expense":59058,"eye-circle":59059,"eye-invisible":59060,"eye":59061,"face-meh":59062,"face-sad":59063,"face-smiley":59064,"feed":59065,"feedbacks":59066,"file-certified":59067,"file-clone":59068,"file-copy":59069,"file-csv":59070,"file-dispose":59071,"file-doc":59072,"file-excel":59073,"file-export":59074,"file-lock":59075,"file-pdf":59076,"file-powerpoint":59077,"file-search":59078,"file-secured":59079,"file-sheets":59080,"file-slide":59081,"file-verified":59082,"file-word":59083,"file":59084,"filter":59085,"folder-user":59086,"folder":59087,"format-bold":59088,"format-heading1":59089,"format-heading2":59090,"format-italic":59091,"format-list-bulleted":59092,"format-list-numbered":59093,"format-underlined":59094,"funnel-filter":59095,"global-dollar":59096,"globe":59097,"graduation-cap":59098,"graph":59099,"happy-sun":59100,"health-bag":59101,"heart":59102,"home":59103,"image":59104,"import":59105,"incident-siren":59106,"instapay":59107,"list":59108,"loading-2":59109,"loading":59110,"location":59111,"lock":59112,"looks-one":59113,"looks-two":59114,"media-content":59115,"menu":59116,"money-notes":59117,"moneybag":59118,"moon":59119,"multiple-stars":59120,"multiple-users":59121,"node":59122,"open-folder":59123,"paperclip":59124,"payment-summary":59125,"pencil":59126,"phone":59127,"piggy-bank":59128,"plane":59129,"play-circle":59130,"print":59131,"raising-hands":59132,"reply-arrow":59133,"reply":59134,"reschedule":59135,"rostering":59136,"save":59137,"schedule-send":59138,"schedule":59139,"search-person":59140,"send":59141,"speaker-active":59142,"speaker":59143,"star-award":59144,"star-badge":59145,"star-circle":59146,"star-medal":59147,"star":59148,"steps-circle":59149,"stopwatch":59150,"suitcase":59151,"survey":59152,"swag":59153,"switch":59154,"tag":59155,"target":59156,"teams":59157,"timesheet":59158,"touch-id":59159,"trash-bin":59160,"unlock":59161,"user":59162,"video-1":59163,"video-2":59164,"wallet":59165,"warning":59166,"activate-outlined":59167,"add-credit-card-outlined":59168,"add-person-outlined":59169,"add-section-outlined":59170,"add-time-outlined":59171,"add":59172,"adjustment-outlined":59173,"alignment-2-outlined":59174,"alignment-outlined":59175,"all-caps":59176,"arrow-down":59177,"arrow-downwards":59178,"arrow-left":59179,"arrow-leftwards":59180,"arrow-right":59181,"arrow-rightwards":59182,"arrow-up":59183,"arrow-upwards":59184,"article-outlined":59185,"at-sign":59186,"auto-graph-outlined":59187,"bell-active-outlined":59188,"bell-outlined":59189,"bell-slash-outlined":59190,"billing-outlined":59191,"body-outlined":59192,"bold":59193,"bookmark-added-outlined":59194,"bookmark-outlined":59195,"box-check-outlined":59196,"box-outlined":59197,"bullet-points":59198,"cake-outlined":59199,"calendar-dates-outlined":59200,"calendar-star-outlined":59201,"camera-outlined":59202,"cancel":59203,"chat-bubble-outlined":59204,"chat-unread-outlined":59205,"checkmark":59206,"circle-add-outlined":59207,"circle-cancel-outlined":59208,"circle-down-outlined":59209,"circle-info-outlined":59210,"circle-left-outlined":59211,"circle-ok-outlined":59212,"circle-question-outlined":59213,"circle-remove-outlined":59214,"circle-right-outlined":59215,"circle-up-outlined":59216,"circle-warning-outlined":59217,"clock-2-outlined":59218,"clock-outlined":59219,"cog-outlined":59220,"coin-outlined":59221,"comment-outlined":59222,"contacts-outlined":59223,"credit-card-outlined":59224,"cup-outlined":59225,"direction-arrows-outlined":59226,"directory-outlined":59227,"document-outlined":59228,"dollar-card-outlined":59229,"dollar-coin-shine-outlined":59230,"dollar-sign":59231,"double-buildings-outlined":59232,"double-left-arrows":59233,"double-right-arrows":59234,"download-outlined":59235,"edit-template-outlined":59236,"email-outlined":59237,"enter-arrow":59238,"envelope-outlined":59239,"expense-outlined":59240,"explore-outlined":59241,"external-link":59242,"eye-invisible-outlined":59243,"eye-outlined":59244,"face-id":59245,"face-meh-outlined":59246,"face-open-smiley-outlined":59247,"face-sad-outlined":59248,"face-smiley-outlined":59249,"feed-outlined":59250,"file-certified-outlined":59251,"file-clone-outlined":59252,"file-copy-outlined":59253,"file-dispose-outlined":59254,"file-dollar-outlined":59255,"file-download-outlined":59256,"file-export-outlined":59257,"file-lock-outlined":59258,"file-outlined":59259,"file-search-outlined":59260,"file-secured-outlined":59261,"file-verified-outlined":59262,"filter-outlined":59263,"folder-outlined":59264,"folder-user-outlined":59265,"funnel-filter-outline":59266,"graph-outlined":59267,"hand-holding-user-outlined":59268,"happy-sun-outlined":59269,"health-bag-outlined":59270,"heart-outlined":59271,"home-active-outlined":59272,"home-outlined":59273,"id-card-outlined":59274,"image-outlined":59275,"import-outlined":59276,"instapay-outlined":59277,"italic":59278,"link-1":59279,"link-2":59280,"list-outlined":59281,"live-help-outlined":59282,"location-outlined":59283,"lock-outlined":59284,"locked-file-outlined":59285,"log-out":59286,"media-content-outlined":59287,"menu-close":59288,"menu-expand":59289,"menu-fold-outlined":59290,"menu-unfold-outlined":59291,"moneybag-outlined":59292,"moon-outlined":59293,"more-horizontal":59294,"more-vertical":59295,"multiple-folders-outlined":59296,"multiple-users-outlined":59297,"near-me-outlined":59298,"node-outlined":59299,"number-points":59300,"number":59301,"overview-outlined":59302,"payment-summary-outlined":59303,"payslip-outlined":59304,"pencil-outlined":59305,"percentage":59306,"phone-outlined":59307,"piggy-bank-outlined":59308,"plane-outlined":59309,"play-circle-outlined":59310,"print-outlined":59311,"qr-code-outlined":59312,"qualification-outlined":59313,"re-assign":59314,"redeem":59315,"refresh":59316,"remove":59317,"reply-outlined":59318,"restart":59319,"return-arrow":59320,"rostering-outlined":59321,"save-outlined":59322,"schedule-outlined":59323,"search-outlined":59324,"search-secured-outlined":59325,"send-outlined":59326,"share-1":59327,"share-2":59328,"share-outlined":59329,"show-chart-outlined":59330,"single-down-arrow":59331,"single-left-arrow":59332,"single-right-arrow":59333,"single-up-arrow":59334,"speaker-active-outlined":59335,"speaker-outlined":59336,"star-circle-outlined":59337,"star-outlined":59338,"stopwatch-outlined":59339,"strikethrough":59340,"suitcase-clock-outlined":59341,"suitcase-outlined":59342,"survey-outlined":59343,"switch-outlined":59344,"sync":59345,"target-outlined":59346,"timesheet-outlined":59347,"today-outlined":59348,"transfer":59349,"trash-bin-outlined":59350,"umbrela-outlined":59351,"unavailable":59352,"underline":59353,"unlock-outlined":59354,"upload-outlined":59355,"user-circle-outlined":59356,"user-gear-outlined":59357,"user-outlined":59358,"user-rectangle-outlined":59359,"video-1-outlined":59360,"video-2-outlined":59361,"wallet-outlined":59362}
1
+ {"activate":59000,"add-emoji":59001,"add-person":59002,"adjustment":59003,"alignment":59004,"antenna":59005,"archive":59006,"assignment-warning":59007,"bank":59008,"bell":59009,"billing":59010,"bookmark-added":59011,"bookmark":59012,"box-check":59013,"box":59014,"buildings":59015,"cake":59016,"calendar-clock":59017,"calendar":59018,"candy-box-menu":59019,"caret-down-small":59020,"caret-down":59021,"caret-left-small":59022,"caret-left":59023,"caret-right-small":59024,"caret-right":59025,"caret-up-small":59026,"caret-up":59027,"check-radio":59028,"circle-add":59029,"circle-cancel":59030,"circle-check":59031,"circle-down":59032,"circle-info":59033,"circle-left":59034,"circle-ok":59035,"circle-pencil":59036,"circle-question":59037,"circle-remove":59038,"circle-right":59039,"circle-up":59040,"circle-warning":59041,"clock-3":59042,"clock":59043,"cloud-download":59044,"cloud-upload":59045,"cog":59046,"coin":59047,"contacts":59048,"credit-card":59049,"diamond":59050,"direction-arrows":59051,"directory":59052,"document":59053,"dollar-coin-shine":59054,"double-buildings":59055,"edit-template":59056,"envelope":59057,"expense":59058,"eye-circle":59059,"eye-invisible":59060,"eye":59061,"face-meh":59062,"face-sad":59063,"face-smiley":59064,"feed":59065,"feedbacks":59066,"file-certified":59067,"file-clone":59068,"file-copy":59069,"file-csv":59070,"file-dispose":59071,"file-doc":59072,"file-excel":59073,"file-export":59074,"file-lock":59075,"file-pdf":59076,"file-powerpoint":59077,"file-search":59078,"file-secured":59079,"file-sheets":59080,"file-slide":59081,"file-verified":59082,"file-word":59083,"file":59084,"filter":59085,"folder-user":59086,"folder":59087,"format-bold":59088,"format-heading1":59089,"format-heading2":59090,"format-italic":59091,"format-list-bulleted":59092,"format-list-numbered":59093,"format-underlined":59094,"funnel-filter":59095,"global-dollar":59096,"globe":59097,"graduation-cap":59098,"graph":59099,"happy-sun":59100,"health-bag":59101,"heart":59102,"home":59103,"image":59104,"import":59105,"incident-siren":59106,"instapay":59107,"list":59108,"loading-2":59109,"loading":59110,"location":59111,"lock":59112,"looks-one":59113,"looks-two":59114,"media-content":59115,"menu":59116,"money-notes":59117,"moneybag":59118,"moon":59119,"multiple-stars":59120,"multiple-users":59121,"node":59122,"open-folder":59123,"paperclip":59124,"payment-summary":59125,"pencil":59126,"phone":59127,"piggy-bank":59128,"plane":59129,"play-circle":59130,"print":59131,"raising-hands":59132,"reply-arrow":59133,"reply":59134,"reschedule":59135,"rostering":59136,"save":59137,"schedule-send":59138,"schedule":59139,"search-person":59140,"send":59141,"speaker-active":59142,"speaker":59143,"star-award":59144,"star-badge":59145,"star-circle":59146,"star-medal":59147,"star":59148,"steps-circle":59149,"stopwatch":59150,"suitcase":59151,"survey":59152,"swag":59153,"switch":59154,"tag":59155,"target":59156,"teams":59157,"timesheet":59158,"touch-id":59159,"trash-bin":59160,"unlock":59161,"user":59162,"video-1":59163,"video-2":59164,"wallet":59165,"warning":59166,"activate-outlined":59167,"add-credit-card-outlined":59168,"add-person-outlined":59169,"add-section-outlined":59170,"add-time-outlined":59171,"add":59172,"adjustment-outlined":59173,"alignment-2-outlined":59174,"alignment-outlined":59175,"all-caps":59176,"arrow-down":59177,"arrow-downwards":59178,"arrow-left":59179,"arrow-leftwards":59180,"arrow-right":59181,"arrow-rightwards":59182,"arrow-up":59183,"arrow-upwards":59184,"article-outlined":59185,"at-sign":59186,"auto-graph-outlined":59187,"bell-active-outlined":59188,"bell-outlined":59189,"bell-slash-outlined":59190,"billing-outlined":59191,"body-outlined":59192,"bold":59193,"bookmark-added-outlined":59194,"bookmark-outlined":59195,"box-check-outlined":59196,"box-outlined":59197,"bullet-points":59198,"cake-outlined":59199,"calendar-dates-outlined":59200,"calendar-star-outlined":59201,"camera-outlined":59202,"cancel":59203,"chat-bubble-outlined":59204,"chat-unread-outlined":59205,"checkmark":59206,"circle-add-outlined":59207,"circle-cancel-outlined":59208,"circle-down-outlined":59209,"circle-info-outlined":59210,"circle-left-outlined":59211,"circle-ok-outlined":59212,"circle-question-outlined":59213,"circle-remove-outlined":59214,"circle-right-outlined":59215,"circle-up-outlined":59216,"circle-warning-outlined":59217,"clock-2-outlined":59218,"clock-outlined":59219,"cog-outlined":59220,"coin-outlined":59221,"comment-outlined":59222,"contacts-outlined":59223,"credit-card-outlined":59224,"cup-outlined":59225,"direction-arrows-outlined":59226,"directory-outlined":59227,"document-outlined":59228,"dollar-card-outlined":59229,"dollar-coin-shine-outlined":59230,"dollar-credit-card-outlined":59231,"dollar-sign":59232,"double-buildings-outlined":59233,"double-left-arrows":59234,"double-right-arrows":59235,"download-outlined":59236,"edit-template-outlined":59237,"email-outlined":59238,"enter-arrow":59239,"envelope-outlined":59240,"expense-outlined":59241,"explore-outlined":59242,"external-link":59243,"eye-invisible-outlined":59244,"eye-outlined":59245,"face-id":59246,"face-meh-outlined":59247,"face-open-smiley-outlined":59248,"face-sad-outlined":59249,"face-smiley-outlined":59250,"feed-outlined":59251,"file-certified-outlined":59252,"file-clone-outlined":59253,"file-copy-outlined":59254,"file-dispose-outlined":59255,"file-dollar-outlined":59256,"file-download-outlined":59257,"file-export-outlined":59258,"file-lock-outlined":59259,"file-outlined":59260,"file-search-outlined":59261,"file-secured-outlined":59262,"file-statutory-outlined":59263,"file-verified-outlined":59264,"filter-outlined":59265,"folder-outlined":59266,"folder-user-outlined":59267,"funnel-filter-outline":59268,"graph-outlined":59269,"hand-holding-user-outlined":59270,"happy-sun-outlined":59271,"health-bag-outlined":59272,"heart-outlined":59273,"home-active-outlined":59274,"home-outlined":59275,"id-card-outlined":59276,"image-outlined":59277,"import-outlined":59278,"instapay-outlined":59279,"italic":59280,"link-1":59281,"link-2":59282,"list-outlined":59283,"live-help-outlined":59284,"location-outlined":59285,"lock-outlined":59286,"locked-file-outlined":59287,"log-out":59288,"media-content-outlined":59289,"menu-close":59290,"menu-expand":59291,"menu-fold-outlined":59292,"menu-unfold-outlined":59293,"moneybag-outlined":59294,"moon-outlined":59295,"more-horizontal":59296,"more-vertical":59297,"multiple-folders-outlined":59298,"multiple-users-outlined":59299,"near-me-outlined":59300,"node-outlined":59301,"number-points":59302,"number":59303,"overview-outlined":59304,"payment-summary-outlined":59305,"payslip-outlined":59306,"pencil-outlined":59307,"percentage":59308,"phone-outlined":59309,"piggy-bank-outlined":59310,"plane-outlined":59311,"play-circle-outlined":59312,"print-outlined":59313,"qr-code-outlined":59314,"qualification-outlined":59315,"re-assign":59316,"redeem":59317,"refresh":59318,"remove":59319,"reply-outlined":59320,"restart":59321,"return-arrow":59322,"rostering-outlined":59323,"save-outlined":59324,"schedule-outlined":59325,"search-outlined":59326,"search-secured-outlined":59327,"send-outlined":59328,"share-1":59329,"share-2":59330,"share-outlined":59331,"show-chart-outlined":59332,"single-down-arrow":59333,"single-left-arrow":59334,"single-right-arrow":59335,"single-up-arrow":59336,"speaker-active-outlined":59337,"speaker-outlined":59338,"star-circle-outlined":59339,"star-outlined":59340,"stopwatch-outlined":59341,"strikethrough":59342,"suitcase-clock-outlined":59343,"suitcase-outlined":59344,"survey-outlined":59345,"switch-outlined":59346,"sync":59347,"target-outlined":59348,"timesheet-outlined":59349,"today-outlined":59350,"transfer":59351,"trash-bin-outlined":59352,"umbrela-outlined":59353,"unavailable":59354,"underline":59355,"unlock-outlined":59356,"upload-outlined":59357,"user-circle-outlined":59358,"user-gear-outlined":59359,"user-outlined":59360,"user-rectangle-outlined":59361,"video-1-outlined":59362,"video-2-outlined":59363,"wallet-outlined":59364}
@@ -231,6 +231,7 @@ const IconList = [
231
231
  'document-outlined',
232
232
  'dollar-card-outlined',
233
233
  'dollar-coin-shine-outlined',
234
+ 'dollar-credit-card-outlined',
234
235
  'dollar-sign',
235
236
  'double-buildings-outlined',
236
237
  'double-left-arrows',
@@ -262,6 +263,7 @@ const IconList = [
262
263
  'file-outlined',
263
264
  'file-search-outlined',
264
265
  'file-secured-outlined',
266
+ 'file-statutory-outlined',
265
267
  'file-verified-outlined',
266
268
  'filter-outlined',
267
269
  'folder-outlined',
@@ -117,11 +117,7 @@ const ListItem = ({
117
117
  </StyledPrefixContainer>
118
118
  )}
119
119
  <StyledTitleContainer>
120
- <Typography.Text
121
- intent="body"
122
- fontSize="large"
123
- fontWeight="semi-bold"
124
- >
120
+ <Typography.Text intent="body" fontSize="large">
125
121
  {title}
126
122
  </Typography.Text>
127
123
  {!!subtitle && (
@@ -131,7 +131,7 @@ exports[`ListItem renders correctly ListItem with children 1`] = `
131
131
  Array [
132
132
  Object {
133
133
  "color": "#001f23",
134
- "fontFamily": "BeVietnamPro-SemiBold",
134
+ "fontFamily": "BeVietnamPro-Regular",
135
135
  "fontSize": 16,
136
136
  "letterSpacing": 0.48,
137
137
  "lineHeight": 24,
@@ -140,7 +140,7 @@ exports[`ListItem renders correctly ListItem with children 1`] = `
140
140
  ]
141
141
  }
142
142
  themeFontSize="large"
143
- themeFontWeight="semi-bold"
143
+ themeFontWeight="regular"
144
144
  themeIntent="body"
145
145
  themeTypeface="neutral"
146
146
  >
@@ -372,7 +372,7 @@ exports[`ListItem renders correctly ListItem with icon 1`] = `
372
372
  Array [
373
373
  Object {
374
374
  "color": "#001f23",
375
- "fontFamily": "BeVietnamPro-SemiBold",
375
+ "fontFamily": "BeVietnamPro-Regular",
376
376
  "fontSize": 16,
377
377
  "letterSpacing": 0.48,
378
378
  "lineHeight": 24,
@@ -381,7 +381,7 @@ exports[`ListItem renders correctly ListItem with icon 1`] = `
381
381
  ]
382
382
  }
383
383
  themeFontSize="large"
384
- themeFontWeight="semi-bold"
384
+ themeFontWeight="regular"
385
385
  themeIntent="body"
386
386
  themeTypeface="neutral"
387
387
  >
@@ -514,7 +514,7 @@ exports[`ListItem renders correctly ListItem with leading status 1`] = `
514
514
  Array [
515
515
  Object {
516
516
  "color": "#001f23",
517
- "fontFamily": "BeVietnamPro-SemiBold",
517
+ "fontFamily": "BeVietnamPro-Regular",
518
518
  "fontSize": 16,
519
519
  "letterSpacing": 0.48,
520
520
  "lineHeight": 24,
@@ -523,7 +523,7 @@ exports[`ListItem renders correctly ListItem with leading status 1`] = `
523
523
  ]
524
524
  }
525
525
  themeFontSize="large"
526
- themeFontWeight="semi-bold"
526
+ themeFontWeight="regular"
527
527
  themeIntent="body"
528
528
  themeTypeface="neutral"
529
529
  >
@@ -692,7 +692,7 @@ exports[`ListItem renders correctly ListItem with prefix suffix is React.Element
692
692
  Array [
693
693
  Object {
694
694
  "color": "#001f23",
695
- "fontFamily": "BeVietnamPro-SemiBold",
695
+ "fontFamily": "BeVietnamPro-Regular",
696
696
  "fontSize": 16,
697
697
  "letterSpacing": 0.48,
698
698
  "lineHeight": 24,
@@ -701,7 +701,7 @@ exports[`ListItem renders correctly ListItem with prefix suffix is React.Element
701
701
  ]
702
702
  }
703
703
  themeFontSize="large"
704
- themeFontWeight="semi-bold"
704
+ themeFontWeight="regular"
705
705
  themeIntent="body"
706
706
  themeTypeface="neutral"
707
707
  >
@@ -0,0 +1,14 @@
1
+ import styled from '@emotion/native';
2
+ import { Animated, View } from 'react-native';
3
+
4
+ export type ActionIntent = 'primary' | 'success' | 'danger';
5
+
6
+ const StyledWrapper = styled(View)(() => ({
7
+ flexDirection: 'row',
8
+ }));
9
+
10
+ const StyledContent = styled(Animated.View)(() => ({
11
+ flex: 1,
12
+ }));
13
+
14
+ export { StyledWrapper, StyledContent };
@@ -0,0 +1,161 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Swipeable renders correctly 1`] = `
4
+ <View
5
+ onLayout={[Function]}
6
+ onMoveShouldSetResponder={[Function]}
7
+ onMoveShouldSetResponderCapture={[Function]}
8
+ onResponderEnd={[Function]}
9
+ onResponderGrant={[Function]}
10
+ onResponderMove={[Function]}
11
+ onResponderReject={[Function]}
12
+ onResponderRelease={[Function]}
13
+ onResponderStart={[Function]}
14
+ onResponderTerminate={[Function]}
15
+ onResponderTerminationRequest={[Function]}
16
+ onStartShouldSetResponder={[Function]}
17
+ onStartShouldSetResponderCapture={[Function]}
18
+ style={
19
+ Array [
20
+ Object {
21
+ "flexDirection": "row",
22
+ },
23
+ Array [
24
+ Object {
25
+ "flexDirection": "row",
26
+ },
27
+ undefined,
28
+ ],
29
+ ]
30
+ }
31
+ >
32
+ <View
33
+ collapsable={false}
34
+ style={
35
+ Object {
36
+ "marginLeft": -0,
37
+ "transform": Array [
38
+ Object {
39
+ "translateX": 0.5,
40
+ },
41
+ ],
42
+ "width": 0,
43
+ }
44
+ }
45
+ >
46
+ <View
47
+ style={
48
+ Array [
49
+ Object {
50
+ "alignItems": "flex-end",
51
+ "flex": 1,
52
+ "justifyContent": "center",
53
+ },
54
+ ]
55
+ }
56
+ >
57
+ <Text
58
+ style={
59
+ Array [
60
+ Object {
61
+ "color": "#001f23",
62
+ "fontFamily": "BeVietnamPro-Regular",
63
+ "fontSize": 14,
64
+ "letterSpacing": 0.42,
65
+ "lineHeight": 22,
66
+ },
67
+ undefined,
68
+ ]
69
+ }
70
+ themeFontSize="medium"
71
+ themeFontWeight="regular"
72
+ themeIntent="body"
73
+ themeTypeface="neutral"
74
+ >
75
+ Archive
76
+ </Text>
77
+ </View>
78
+ </View>
79
+ <View
80
+ collapsable={false}
81
+ style={
82
+ Object {
83
+ "flex": 1,
84
+ "transform": Array [
85
+ Object {
86
+ "translateX": 0.5,
87
+ },
88
+ ],
89
+ }
90
+ }
91
+ >
92
+ <Text
93
+ style={
94
+ Array [
95
+ Object {
96
+ "color": "#001f23",
97
+ "fontFamily": "BeVietnamPro-Regular",
98
+ "fontSize": 14,
99
+ "letterSpacing": 0.42,
100
+ "lineHeight": 22,
101
+ },
102
+ undefined,
103
+ ]
104
+ }
105
+ themeFontSize="medium"
106
+ themeFontWeight="regular"
107
+ themeIntent="body"
108
+ themeTypeface="neutral"
109
+ >
110
+ Swipeable Item
111
+ </Text>
112
+ </View>
113
+ <View
114
+ collapsable={false}
115
+ style={
116
+ Object {
117
+ "marginRight": -0,
118
+ "transform": Array [
119
+ Object {
120
+ "translateX": 0.5,
121
+ },
122
+ ],
123
+ "width": 0,
124
+ }
125
+ }
126
+ >
127
+ <View
128
+ style={
129
+ Array [
130
+ Object {
131
+ "alignItems": "flex-start",
132
+ "flex": 1,
133
+ "justifyContent": "center",
134
+ },
135
+ ]
136
+ }
137
+ >
138
+ <Text
139
+ style={
140
+ Array [
141
+ Object {
142
+ "color": "#001f23",
143
+ "fontFamily": "BeVietnamPro-Regular",
144
+ "fontSize": 14,
145
+ "letterSpacing": 0.42,
146
+ "lineHeight": 22,
147
+ },
148
+ undefined,
149
+ ]
150
+ }
151
+ themeFontSize="medium"
152
+ themeFontWeight="regular"
153
+ themeIntent="body"
154
+ themeTypeface="neutral"
155
+ >
156
+ Approve
157
+ </Text>
158
+ </View>
159
+ </View>
160
+ </View>
161
+ `;
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import { View } from 'react-native';
3
+ import renderWithTheme from '../../../testHelpers/renderWithTheme';
4
+ import Typography from '../../Typography';
5
+ import SwipeableV2 from '..';
6
+
7
+ describe('Swipeable', () => {
8
+ it('renders correctly', () => {
9
+ const { toJSON, getByText } = renderWithTheme(
10
+ <SwipeableV2
11
+ leftContent={
12
+ <View
13
+ style={[
14
+ {
15
+ flex: 1,
16
+ alignItems: 'flex-end',
17
+ justifyContent: 'center',
18
+ },
19
+ ]}
20
+ >
21
+ <Typography.Text>Archive</Typography.Text>
22
+ </View>
23
+ }
24
+ rightContent={
25
+ <View
26
+ style={[
27
+ {
28
+ flex: 1,
29
+ alignItems: 'flex-start',
30
+ justifyContent: 'center',
31
+ },
32
+ ]}
33
+ >
34
+ <Typography.Text>Approve</Typography.Text>
35
+ </View>
36
+ }
37
+ rightActionsWidth={168}
38
+ >
39
+ <Typography.Text>Swipeable Item</Typography.Text>
40
+ </SwipeableV2>
41
+ );
42
+
43
+ expect(getByText('Swipeable Item')).toBeDefined();
44
+ expect(getByText('Archive')).toBeDefined();
45
+ expect(getByText('Approve')).toBeDefined();
46
+ expect(toJSON()).toMatchSnapshot();
47
+ });
48
+ });