@pagopa/io-app-design-system 5.3.8 → 5.4.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.
Files changed (171) hide show
  1. package/README.md +3 -2
  2. package/lib/commonjs/components/buttons/ButtonLink.js +5 -2
  3. package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
  4. package/lib/commonjs/components/buttons/ButtonOutline.js +20 -15
  5. package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
  6. package/lib/commonjs/components/buttons/ButtonSolid.js +4 -1
  7. package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
  8. package/lib/commonjs/components/buttons/IOButton/IOButton.js +230 -0
  9. package/lib/commonjs/components/buttons/IOButton/IOButton.js.map +1 -0
  10. package/lib/commonjs/components/buttons/IOButton/__test__/IOButton.test.js +43 -0
  11. package/lib/commonjs/components/buttons/IOButton/__test__/IOButton.test.js.map +1 -0
  12. package/lib/commonjs/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +391 -0
  13. package/lib/commonjs/components/buttons/IOButton/index.js +17 -0
  14. package/lib/commonjs/components/buttons/IOButton/index.js.map +1 -0
  15. package/lib/commonjs/components/buttons/IOButton/styles.js +166 -0
  16. package/lib/commonjs/components/buttons/IOButton/styles.js.map +1 -0
  17. package/lib/commonjs/components/buttons/IconButton.js +1 -2
  18. package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
  19. package/lib/commonjs/components/buttons/IconButtonContained.js +1 -2
  20. package/lib/commonjs/components/buttons/IconButtonContained.js.map +1 -1
  21. package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -395
  22. package/lib/commonjs/components/buttons/__test__/button.test.js +0 -24
  23. package/lib/commonjs/components/buttons/__test__/button.test.js.map +1 -1
  24. package/lib/commonjs/components/buttons/index.js +11 -0
  25. package/lib/commonjs/components/buttons/index.js.map +1 -1
  26. package/lib/commonjs/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +3 -12
  27. package/lib/commonjs/components/contentWrapper/ContentWrapper.js +6 -2
  28. package/lib/commonjs/components/contentWrapper/ContentWrapper.js.map +1 -1
  29. package/lib/commonjs/components/icons/Icon.js +11 -9
  30. package/lib/commonjs/components/icons/Icon.js.map +1 -1
  31. package/lib/commonjs/components/layout/FooterActions.js +10 -9
  32. package/lib/commonjs/components/layout/FooterActions.js.map +1 -1
  33. package/lib/commonjs/components/layout/FooterActionsInline.js +8 -8
  34. package/lib/commonjs/components/layout/FooterActionsInline.js.map +1 -1
  35. package/lib/commonjs/components/layout/GradientBottomActions.js +8 -8
  36. package/lib/commonjs/components/layout/GradientBottomActions.js.map +1 -1
  37. package/lib/commonjs/components/layout/GradientScrollView.js.map +1 -1
  38. package/lib/commonjs/components/listitems/ListItemNav.js +1 -1
  39. package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
  40. package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +10 -40
  41. package/lib/commonjs/components/loadingSpinner/LoadingSpinner.js +6 -6
  42. package/lib/commonjs/components/loadingSpinner/LoadingSpinner.js.map +1 -1
  43. package/lib/commonjs/components/numberpad/NumberButton.js +15 -2
  44. package/lib/commonjs/components/numberpad/NumberButton.js.map +1 -1
  45. package/lib/commonjs/components/numberpad/NumberPad.js +9 -6
  46. package/lib/commonjs/components/numberpad/NumberPad.js.map +1 -1
  47. package/lib/commonjs/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +36 -86
  48. package/lib/commonjs/components/typography/IOText.js +4 -1
  49. package/lib/commonjs/components/typography/IOText.js.map +1 -1
  50. package/lib/commonjs/core/IOStyles.js +2 -17
  51. package/lib/commonjs/core/IOStyles.js.map +1 -1
  52. package/lib/module/components/buttons/ButtonLink.js +6 -3
  53. package/lib/module/components/buttons/ButtonLink.js.map +1 -1
  54. package/lib/module/components/buttons/ButtonOutline.js +21 -16
  55. package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
  56. package/lib/module/components/buttons/ButtonSolid.js +4 -1
  57. package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
  58. package/lib/module/components/buttons/IOButton/IOButton.js +223 -0
  59. package/lib/module/components/buttons/IOButton/IOButton.js.map +1 -0
  60. package/lib/module/components/buttons/IOButton/__test__/IOButton.test.js +40 -0
  61. package/lib/module/components/buttons/IOButton/__test__/IOButton.test.js.map +1 -0
  62. package/lib/module/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +391 -0
  63. package/lib/module/components/buttons/IOButton/index.js +4 -0
  64. package/lib/module/components/buttons/IOButton/index.js.map +1 -0
  65. package/lib/module/components/buttons/IOButton/styles.js +160 -0
  66. package/lib/module/components/buttons/IOButton/styles.js.map +1 -0
  67. package/lib/module/components/buttons/IconButton.js +2 -3
  68. package/lib/module/components/buttons/IconButton.js.map +1 -1
  69. package/lib/module/components/buttons/IconButtonContained.js +2 -3
  70. package/lib/module/components/buttons/IconButtonContained.js.map +1 -1
  71. package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -395
  72. package/lib/module/components/buttons/__test__/button.test.js +0 -24
  73. package/lib/module/components/buttons/__test__/button.test.js.map +1 -1
  74. package/lib/module/components/buttons/index.js +1 -0
  75. package/lib/module/components/buttons/index.js.map +1 -1
  76. package/lib/module/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +3 -12
  77. package/lib/module/components/contentWrapper/ContentWrapper.js +6 -2
  78. package/lib/module/components/contentWrapper/ContentWrapper.js.map +1 -1
  79. package/lib/module/components/icons/Icon.js +10 -7
  80. package/lib/module/components/icons/Icon.js.map +1 -1
  81. package/lib/module/components/layout/FooterActions.js +11 -10
  82. package/lib/module/components/layout/FooterActions.js.map +1 -1
  83. package/lib/module/components/layout/FooterActionsInline.js +9 -9
  84. package/lib/module/components/layout/FooterActionsInline.js.map +1 -1
  85. package/lib/module/components/layout/GradientBottomActions.js +9 -9
  86. package/lib/module/components/layout/GradientBottomActions.js.map +1 -1
  87. package/lib/module/components/layout/GradientScrollView.js.map +1 -1
  88. package/lib/module/components/listitems/ListItemNav.js +2 -2
  89. package/lib/module/components/listitems/ListItemNav.js.map +1 -1
  90. package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +10 -40
  91. package/lib/module/components/loadingSpinner/LoadingSpinner.js +6 -6
  92. package/lib/module/components/loadingSpinner/LoadingSpinner.js.map +1 -1
  93. package/lib/module/components/numberpad/NumberButton.js +16 -3
  94. package/lib/module/components/numberpad/NumberButton.js.map +1 -1
  95. package/lib/module/components/numberpad/NumberPad.js +10 -7
  96. package/lib/module/components/numberpad/NumberPad.js.map +1 -1
  97. package/lib/module/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +36 -86
  98. package/lib/module/components/typography/IOText.js +2 -0
  99. package/lib/module/components/typography/IOText.js.map +1 -1
  100. package/lib/module/core/IOStyles.js +1 -16
  101. package/lib/module/core/IOStyles.js.map +1 -1
  102. package/lib/typescript/components/buttons/ButtonLink.d.ts +3 -0
  103. package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
  104. package/lib/typescript/components/buttons/ButtonOutline.d.ts +3 -0
  105. package/lib/typescript/components/buttons/ButtonOutline.d.ts.map +1 -1
  106. package/lib/typescript/components/buttons/ButtonSolid.d.ts +3 -0
  107. package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
  108. package/lib/typescript/components/buttons/IOButton/IOButton.d.ts +57 -0
  109. package/lib/typescript/components/buttons/IOButton/IOButton.d.ts.map +1 -0
  110. package/lib/typescript/components/buttons/IOButton/__test__/IOButton.test.d.ts +2 -0
  111. package/lib/typescript/components/buttons/IOButton/__test__/IOButton.test.d.ts.map +1 -0
  112. package/lib/typescript/components/buttons/IOButton/index.d.ts +2 -0
  113. package/lib/typescript/components/buttons/IOButton/index.d.ts.map +1 -0
  114. package/lib/typescript/components/buttons/IOButton/styles.d.ts +35 -0
  115. package/lib/typescript/components/buttons/IOButton/styles.d.ts.map +1 -0
  116. package/lib/typescript/components/buttons/IconButton.d.ts.map +1 -1
  117. package/lib/typescript/components/buttons/IconButtonContained.d.ts.map +1 -1
  118. package/lib/typescript/components/buttons/index.d.ts +1 -0
  119. package/lib/typescript/components/buttons/index.d.ts.map +1 -1
  120. package/lib/typescript/components/contentWrapper/ContentWrapper.d.ts +6 -4
  121. package/lib/typescript/components/contentWrapper/ContentWrapper.d.ts.map +1 -1
  122. package/lib/typescript/components/icons/Icon.d.ts +1 -4
  123. package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
  124. package/lib/typescript/components/icons/types.d.ts +3 -2
  125. package/lib/typescript/components/icons/types.d.ts.map +1 -1
  126. package/lib/typescript/components/layout/FooterActions.d.ts +10 -8
  127. package/lib/typescript/components/layout/FooterActions.d.ts.map +1 -1
  128. package/lib/typescript/components/layout/FooterActionsInline.d.ts +5 -4
  129. package/lib/typescript/components/layout/FooterActionsInline.d.ts.map +1 -1
  130. package/lib/typescript/components/layout/GradientBottomActions.d.ts +12 -6
  131. package/lib/typescript/components/layout/GradientBottomActions.d.ts.map +1 -1
  132. package/lib/typescript/components/layout/GradientScrollView.d.ts.map +1 -1
  133. package/lib/typescript/components/loadingSpinner/LoadingSpinner.d.ts +2 -2
  134. package/lib/typescript/components/loadingSpinner/LoadingSpinner.d.ts.map +1 -1
  135. package/lib/typescript/components/numberpad/NumberButton.d.ts +11 -0
  136. package/lib/typescript/components/numberpad/NumberButton.d.ts.map +1 -1
  137. package/lib/typescript/components/numberpad/NumberPad.d.ts.map +1 -1
  138. package/lib/typescript/components/typography/IOText.d.ts +1 -0
  139. package/lib/typescript/components/typography/IOText.d.ts.map +1 -1
  140. package/lib/typescript/core/IOStyles.d.ts +0 -14
  141. package/lib/typescript/core/IOStyles.d.ts.map +1 -1
  142. package/package.json +1 -1
  143. package/src/components/buttons/ButtonLink.tsx +6 -6
  144. package/src/components/buttons/ButtonOutline.tsx +21 -21
  145. package/src/components/buttons/ButtonSolid.tsx +4 -1
  146. package/src/components/buttons/IOButton/IOButton.tsx +363 -0
  147. package/src/components/buttons/IOButton/__test__/IOButton.test.tsx +46 -0
  148. package/src/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +391 -0
  149. package/src/components/buttons/IOButton/index.tsx +1 -0
  150. package/src/components/buttons/IOButton/styles.tsx +228 -0
  151. package/src/components/buttons/IconButton.tsx +3 -6
  152. package/src/components/buttons/IconButtonContained.tsx +3 -6
  153. package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -395
  154. package/src/components/buttons/__test__/button.test.tsx +1 -33
  155. package/src/components/buttons/index.tsx +1 -0
  156. package/src/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +3 -12
  157. package/src/components/contentWrapper/ContentWrapper.tsx +18 -8
  158. package/src/components/icons/Icon.tsx +12 -3
  159. package/src/components/icons/types.ts +3 -2
  160. package/src/components/layout/FooterActions.tsx +26 -14
  161. package/src/components/layout/FooterActionsInline.tsx +19 -12
  162. package/src/components/layout/GradientBottomActions.tsx +17 -18
  163. package/src/components/layout/GradientScrollView.tsx +2 -1
  164. package/src/components/listitems/ListItemNav.tsx +1 -1
  165. package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +10 -40
  166. package/src/components/loadingSpinner/LoadingSpinner.tsx +8 -8
  167. package/src/components/numberpad/NumberButton.tsx +18 -11
  168. package/src/components/numberpad/NumberPad.tsx +8 -10
  169. package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +36 -86
  170. package/src/components/typography/IOText.tsx +3 -0
  171. package/src/core/IOStyles.ts +1 -18
@@ -0,0 +1,391 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Test Buttons Components IOButton Snapshot · Link variant 1`] = `
4
+ <View
5
+ accessibilityLabel="accessibilityLabel"
6
+ accessibilityRole="button"
7
+ accessibilityState={
8
+ {
9
+ "busy": false,
10
+ "checked": undefined,
11
+ "disabled": false,
12
+ "expanded": undefined,
13
+ "selected": undefined,
14
+ }
15
+ }
16
+ accessibilityValue={
17
+ {
18
+ "max": undefined,
19
+ "min": undefined,
20
+ "now": undefined,
21
+ "text": undefined,
22
+ }
23
+ }
24
+ accessible={true}
25
+ collapsable={false}
26
+ focusable={true}
27
+ hitSlop={
28
+ {
29
+ "bottom": 14,
30
+ "left": 24,
31
+ "right": 24,
32
+ "top": 14,
33
+ }
34
+ }
35
+ onBlur={[Function]}
36
+ onClick={[Function]}
37
+ onFocus={[Function]}
38
+ onResponderGrant={[Function]}
39
+ onResponderMove={[Function]}
40
+ onResponderRelease={[Function]}
41
+ onResponderTerminate={[Function]}
42
+ onResponderTerminationRequest={[Function]}
43
+ onStartShouldSetResponder={[Function]}
44
+ style={
45
+ {
46
+ "alignSelf": "flex-start",
47
+ }
48
+ }
49
+ >
50
+ <View
51
+ style={
52
+ [
53
+ {
54
+ "alignItems": "center",
55
+ "borderCurve": "continuous",
56
+ "elevation": 0,
57
+ "flexDirection": "row",
58
+ "justifyContent": "center",
59
+ "overflow": "hidden",
60
+ "textAlignVertical": "center",
61
+ },
62
+ {
63
+ "paddingHorizontal": 0,
64
+ },
65
+ {
66
+ "backgroundColor": "transparent",
67
+ "borderColor": "#0B3EE3",
68
+ "borderRadius": 8,
69
+ "borderWidth": 0,
70
+ "height": undefined,
71
+ },
72
+ {},
73
+ {
74
+ "transform": [
75
+ {
76
+ "scale": undefined,
77
+ },
78
+ ],
79
+ },
80
+ {},
81
+ ]
82
+ }
83
+ >
84
+ <View
85
+ style={
86
+ [
87
+ {
88
+ "alignItems": "center",
89
+ "flexDirection": "row",
90
+ "justifyContent": "center",
91
+ },
92
+ {
93
+ "columnGap": 8,
94
+ },
95
+ false,
96
+ ]
97
+ }
98
+ >
99
+ <Text
100
+ accessibilityElementsHidden={true}
101
+ accessible={false}
102
+ allowFontScaling={true}
103
+ ellipsizeMode="tail"
104
+ importantForAccessibility="no-hide-descendants"
105
+ maxFontSizeMultiplier={1.5}
106
+ numberOfLines={1}
107
+ style={
108
+ [
109
+ {},
110
+ {
111
+ "color": "#0E0F13",
112
+ "fontFamily": "Titillio",
113
+ "fontSize": 16,
114
+ "fontStyle": "normal",
115
+ "fontWeight": "600",
116
+ "lineHeight": 20,
117
+ },
118
+ [
119
+ {
120
+ "textAlign": "auto",
121
+ },
122
+ {
123
+ "color": undefined,
124
+ },
125
+ ],
126
+ ]
127
+ }
128
+ >
129
+ label
130
+ </Text>
131
+ </View>
132
+ </View>
133
+ </View>
134
+ `;
135
+
136
+ exports[`Test Buttons Components IOButton Snapshot · Outline variant 1`] = `
137
+ <View
138
+ accessibilityLabel="accessibilityLabel"
139
+ accessibilityRole="button"
140
+ accessibilityState={
141
+ {
142
+ "busy": false,
143
+ "checked": undefined,
144
+ "disabled": false,
145
+ "expanded": undefined,
146
+ "selected": undefined,
147
+ }
148
+ }
149
+ accessibilityValue={
150
+ {
151
+ "max": undefined,
152
+ "min": undefined,
153
+ "now": undefined,
154
+ "text": undefined,
155
+ }
156
+ }
157
+ accessible={true}
158
+ collapsable={false}
159
+ focusable={true}
160
+ onBlur={[Function]}
161
+ onClick={[Function]}
162
+ onFocus={[Function]}
163
+ onResponderGrant={[Function]}
164
+ onResponderMove={[Function]}
165
+ onResponderRelease={[Function]}
166
+ onResponderTerminate={[Function]}
167
+ onResponderTerminationRequest={[Function]}
168
+ onStartShouldSetResponder={[Function]}
169
+ style={
170
+ {
171
+ "alignSelf": "auto",
172
+ "flexShrink": 1,
173
+ }
174
+ }
175
+ >
176
+ <View
177
+ style={
178
+ [
179
+ {
180
+ "alignItems": "center",
181
+ "borderCurve": "continuous",
182
+ "elevation": 0,
183
+ "flexDirection": "row",
184
+ "justifyContent": "center",
185
+ "overflow": "hidden",
186
+ "textAlignVertical": "center",
187
+ },
188
+ {
189
+ "paddingHorizontal": 24,
190
+ },
191
+ {
192
+ "backgroundColor": "rgba(9,50,182,0)",
193
+ "borderColor": "#0B3EE3",
194
+ "borderRadius": 8,
195
+ "borderWidth": 2,
196
+ "height": 48,
197
+ },
198
+ {},
199
+ {
200
+ "transform": [
201
+ {
202
+ "scale": undefined,
203
+ },
204
+ ],
205
+ },
206
+ {
207
+ "backgroundColor": undefined,
208
+ "borderColor": undefined,
209
+ },
210
+ ]
211
+ }
212
+ >
213
+ <View
214
+ style={
215
+ [
216
+ {
217
+ "alignItems": "center",
218
+ "flexDirection": "row",
219
+ "justifyContent": "center",
220
+ },
221
+ {
222
+ "columnGap": 8,
223
+ },
224
+ false,
225
+ ]
226
+ }
227
+ >
228
+ <Text
229
+ accessibilityElementsHidden={true}
230
+ accessible={false}
231
+ allowFontScaling={true}
232
+ ellipsizeMode="tail"
233
+ importantForAccessibility="no-hide-descendants"
234
+ maxFontSizeMultiplier={1.5}
235
+ numberOfLines={1}
236
+ style={
237
+ [
238
+ {},
239
+ {
240
+ "color": "#0E0F13",
241
+ "fontFamily": "Titillio",
242
+ "fontSize": 16,
243
+ "fontStyle": "normal",
244
+ "fontWeight": "600",
245
+ "lineHeight": undefined,
246
+ },
247
+ [
248
+ {
249
+ "textAlign": "auto",
250
+ },
251
+ {
252
+ "color": undefined,
253
+ },
254
+ ],
255
+ ]
256
+ }
257
+ >
258
+ label
259
+ </Text>
260
+ </View>
261
+ </View>
262
+ </View>
263
+ `;
264
+
265
+ exports[`Test Buttons Components IOButton Snapshot · Solid variant 1`] = `
266
+ <View
267
+ accessibilityLabel="accessibilityLabel"
268
+ accessibilityRole="button"
269
+ accessibilityState={
270
+ {
271
+ "busy": false,
272
+ "checked": undefined,
273
+ "disabled": false,
274
+ "expanded": undefined,
275
+ "selected": undefined,
276
+ }
277
+ }
278
+ accessibilityValue={
279
+ {
280
+ "max": undefined,
281
+ "min": undefined,
282
+ "now": undefined,
283
+ "text": undefined,
284
+ }
285
+ }
286
+ accessible={true}
287
+ collapsable={false}
288
+ focusable={true}
289
+ onBlur={[Function]}
290
+ onClick={[Function]}
291
+ onFocus={[Function]}
292
+ onResponderGrant={[Function]}
293
+ onResponderMove={[Function]}
294
+ onResponderRelease={[Function]}
295
+ onResponderTerminate={[Function]}
296
+ onResponderTerminationRequest={[Function]}
297
+ onStartShouldSetResponder={[Function]}
298
+ style={
299
+ {
300
+ "alignSelf": "auto",
301
+ "flexShrink": 1,
302
+ }
303
+ }
304
+ >
305
+ <View
306
+ style={
307
+ [
308
+ {
309
+ "alignItems": "center",
310
+ "borderCurve": "continuous",
311
+ "elevation": 0,
312
+ "flexDirection": "row",
313
+ "justifyContent": "center",
314
+ "overflow": "hidden",
315
+ "textAlignVertical": "center",
316
+ },
317
+ {
318
+ "paddingHorizontal": 24,
319
+ },
320
+ {
321
+ "backgroundColor": "#0B3EE3",
322
+ "borderColor": "#FFFFFF",
323
+ "borderRadius": 8,
324
+ "borderWidth": 0,
325
+ "height": 48,
326
+ },
327
+ {},
328
+ {
329
+ "transform": [
330
+ {
331
+ "scale": undefined,
332
+ },
333
+ ],
334
+ },
335
+ {
336
+ "backgroundColor": undefined,
337
+ },
338
+ ]
339
+ }
340
+ >
341
+ <View
342
+ style={
343
+ [
344
+ {
345
+ "alignItems": "center",
346
+ "flexDirection": "row",
347
+ "justifyContent": "center",
348
+ },
349
+ {
350
+ "columnGap": 8,
351
+ },
352
+ false,
353
+ ]
354
+ }
355
+ >
356
+ <Text
357
+ accessibilityElementsHidden={true}
358
+ accessible={false}
359
+ allowFontScaling={true}
360
+ ellipsizeMode="tail"
361
+ importantForAccessibility="no-hide-descendants"
362
+ maxFontSizeMultiplier={1.5}
363
+ numberOfLines={1}
364
+ style={
365
+ [
366
+ {},
367
+ {
368
+ "color": "#0E0F13",
369
+ "fontFamily": "Titillio",
370
+ "fontSize": 16,
371
+ "fontStyle": "normal",
372
+ "fontWeight": "600",
373
+ "lineHeight": undefined,
374
+ },
375
+ [
376
+ {
377
+ "textAlign": "auto",
378
+ },
379
+ {
380
+ "color": undefined,
381
+ },
382
+ ],
383
+ ]
384
+ }
385
+ >
386
+ label
387
+ </Text>
388
+ </View>
389
+ </View>
390
+ </View>
391
+ `;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _IOButton = require("./IOButton");
7
+ Object.keys(_IOButton).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _IOButton[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _IOButton[key];
14
+ }
15
+ });
16
+ });
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_IOButton","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../../src","sources":["components/buttons/IOButton/index.tsx"],"mappings":";;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,SAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,SAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,SAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,166 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useButtonColorMap = exports.useButtonAnimatedStyles = void 0;
7
+ var _reactNativeReanimated = require("react-native-reanimated");
8
+ var _core = require("../../../core");
9
+ const useButtonColorMap = variant => {
10
+ const theme = (0, _core.useIOTheme)();
11
+ const mapColorStatesVariantSolid = {
12
+ // Primary
13
+ primary: {
14
+ background: {
15
+ default: _core.IOColors[theme["interactiveElem-default"]],
16
+ pressed: _core.IOColors[theme["interactiveElem-pressed"]],
17
+ disabled: _core.IOColors[theme["interactiveElem-disabled"]]
18
+ },
19
+ foreground: {
20
+ default: _core.IOColors[theme["buttonText-default"]],
21
+ pressed: _core.IOColors[theme["buttonText-default"]],
22
+ disabled: _core.IOColors[theme["buttonText-disabled"]]
23
+ }
24
+ },
25
+ // Danger
26
+ danger: {
27
+ background: {
28
+ default: _core.IOColors["error-600"],
29
+ pressed: _core.IOColors["error-500"],
30
+ disabled: _core.IOColors[theme["interactiveElem-disabled"]]
31
+ },
32
+ foreground: {
33
+ default: _core.IOColors[theme["buttonText-danger"]],
34
+ pressed: _core.IOColors[theme["buttonText-danger"]],
35
+ disabled: _core.IOColors[theme["buttonText-disabled"]]
36
+ }
37
+ },
38
+ // Contrast
39
+ contrast: {
40
+ background: {
41
+ default: _core.IOColors.white,
42
+ pressed: _core.IOColors["blueIO-50"],
43
+ disabled: _core.IOColors["blueIO-50"]
44
+ },
45
+ foreground: {
46
+ default: _core.IOColors["blueIO-500"],
47
+ pressed: _core.IOColors["blueIO-500"],
48
+ disabled: _core.IOColors["blueIO-500"]
49
+ }
50
+ }
51
+ };
52
+ const mapColorStatesVariantOutline = {
53
+ // Primary
54
+ primary: {
55
+ background: {
56
+ default: (0, _core.hexToRgba)(_core.IOColors[theme["interactiveElem-pressed"]], 0),
57
+ pressed: (0, _core.hexToRgba)(_core.IOColors[theme["interactiveElem-pressed"]], 0.1),
58
+ disabled: "transparent"
59
+ },
60
+ foreground: {
61
+ default: _core.IOColors[theme["interactiveElem-default"]],
62
+ pressed: _core.IOColors[theme["interactiveElem-pressed"]],
63
+ disabled: _core.IOColors[theme["interactiveOutline-disabled"]]
64
+ }
65
+ },
66
+ // Danger
67
+ danger: {
68
+ background: {
69
+ default: (0, _core.hexToRgba)(_core.IOColors["error-600"], 0),
70
+ pressed: (0, _core.hexToRgba)(_core.IOColors["error-600"], 0.1),
71
+ disabled: "transparent"
72
+ },
73
+ foreground: {
74
+ default: _core.IOColors[theme.errorText],
75
+ pressed: _core.IOColors[theme.errorText],
76
+ disabled: _core.IOColors[theme["buttonText-disabled"]]
77
+ }
78
+ },
79
+ // Contrast
80
+ contrast: {
81
+ background: {
82
+ default: (0, _core.hexToRgba)(_core.IOColors["blueIO-600"], 0),
83
+ pressed: (0, _core.hexToRgba)(_core.IOColors["blueIO-600"], 0.5),
84
+ disabled: "transparent"
85
+ },
86
+ foreground: {
87
+ default: _core.IOColors.white,
88
+ pressed: _core.IOColors.white,
89
+ disabled: _core.IOColors["blueIO-200"]
90
+ }
91
+ }
92
+ };
93
+ const transparentLinkBackground = {
94
+ default: "transparent",
95
+ pressed: "transparent",
96
+ disabled: "transparent"
97
+ };
98
+ const mapColorStatesVariantLink = {
99
+ // Primary
100
+ primary: {
101
+ foreground: {
102
+ default: _core.IOColors[theme["interactiveElem-default"]],
103
+ pressed: _core.IOColors[theme["interactiveElem-pressed"]],
104
+ disabled: (0, _core.hexToRgba)(_core.IOColors[theme["interactiveElem-default"]], 0.85)
105
+ },
106
+ background: transparentLinkBackground
107
+ },
108
+ // Danger
109
+ danger: {
110
+ foreground: {
111
+ default: _core.IOColors[theme.errorText],
112
+ pressed: _core.IOColors[theme.errorText],
113
+ disabled: (0, _core.hexToRgba)(_core.IOColors[theme.errorText], 0.85)
114
+ },
115
+ background: transparentLinkBackground
116
+ },
117
+ // Contrast
118
+ contrast: {
119
+ foreground: {
120
+ default: _core.IOColors.white,
121
+ pressed: (0, _core.hexToRgba)(_core.IOColors.white, 0.85),
122
+ disabled: (0, _core.hexToRgba)(_core.IOColors.white, 0.5)
123
+ },
124
+ background: transparentLinkBackground
125
+ }
126
+ };
127
+ const colorMap = {
128
+ solid: mapColorStatesVariantSolid,
129
+ outline: mapColorStatesVariantOutline,
130
+ link: mapColorStatesVariantLink
131
+ };
132
+ return colorMap[variant];
133
+ };
134
+ exports.useButtonColorMap = useButtonColorMap;
135
+ const useButtonAnimatedStyles = (variant, color, progress) => {
136
+ const mapColorStates = useButtonColorMap(variant);
137
+
138
+ // Interpolate animation values from `isPressed` values
139
+ const pressedAnimationStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
140
+ // `link` variant doesn't need this animated style
141
+ if (variant === "link") {
142
+ return {};
143
+ }
144
+ const backgroundColor = (0, _reactNativeReanimated.interpolateColor)(progress.value, [0, 1], [mapColorStates[color].background.default, mapColorStates[color].background.pressed]);
145
+ const borderColor = (0, _reactNativeReanimated.interpolateColor)(progress.value, [0, 1], [mapColorStates[color].foreground.default, mapColorStates[color].foreground.pressed]);
146
+ return variant === "outline" ? {
147
+ backgroundColor,
148
+ borderColor
149
+ } : {
150
+ backgroundColor
151
+ };
152
+ });
153
+ const pressedColorLabelAnimationStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
154
+ color: (0, _reactNativeReanimated.interpolateColor)(progress.value, [0, 1], [mapColorStates[color].foreground.default, mapColorStates[color].foreground.pressed])
155
+ }));
156
+ const iconColorAnimatedStyle = (0, _reactNativeReanimated.useAnimatedProps)(() => ({
157
+ color: (0, _reactNativeReanimated.interpolateColor)(progress.value, [0, 1], [mapColorStates[color]?.foreground?.default, mapColorStates[color]?.foreground?.pressed])
158
+ }));
159
+ return {
160
+ buttonAnimatedStyle: pressedAnimationStyle,
161
+ labelAnimatedStyle: pressedColorLabelAnimationStyle,
162
+ iconColorAnimatedStyle
163
+ };
164
+ };
165
+ exports.useButtonAnimatedStyles = useButtonAnimatedStyles;
166
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeReanimated","require","_core","useButtonColorMap","variant","theme","useIOTheme","mapColorStatesVariantSolid","primary","background","default","IOColors","pressed","disabled","foreground","danger","contrast","white","mapColorStatesVariantOutline","hexToRgba","errorText","transparentLinkBackground","mapColorStatesVariantLink","colorMap","solid","outline","link","exports","useButtonAnimatedStyles","color","progress","mapColorStates","pressedAnimationStyle","useAnimatedStyle","backgroundColor","interpolateColor","value","borderColor","pressedColorLabelAnimationStyle","iconColorAnimatedStyle","useAnimatedProps","buttonAnimatedStyle","labelAnimatedStyle"],"source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AEH;IAAgB,CAAC;EACzB,CAAC,CAAC;EAEF,MAAMI,+BAA+B,GAAG,IAAAL,uCAAgB,EAAC,OAAO;IAC9DJ,KAAK,EAAE,IAAAM,uCAAgB,EACrBL,QAAQ,CAACM,KAAK,EACd,CAAC,CAAC,EAAE,CAAC,CAAC,EACN,CACEL,cAAc,CAACF,KAAK,CAAC,CAACf,UAAU,CAACJ,OAAO,EACxCqB,cAAc,CAACF,KAAK,CAAC,CAACf,UAAU,CAACF,OAAO,CAE5C;EACF,CAAC,CAAC,CAAC;EAEH,MAAM2B,sBAAsB,GAAG,IAAAC,uCAAgB,EAAC,OAAO;IACrDX,KAAK,EAAE,IAAAM,uCAAgB,EACrBL,QAAQ,CAACM,KAAK,EACd,CAAC,CAAC,EAAE,CAAC,CAAC,EACN,CACEL,cAAc,CAACF,KAAK,CAAC,EAAEf,UAAU,EAAEJ,OAAO,EAC1CqB,cAAc,CAACF,KAAK,CAAC,EAAEf,UAAU,EAAEF,OAAO,CAE9C;EACF,CAAC,CAAC,CAAC;EAEH,OAAO;IACL6B,mBAAmB,EAAET,qBAAqB;IAC1CU,kBAAkB,EAAEJ,+BAA+B;IACnDC;EACF,CAAC;AACH,CAAC;AAACZ,OAAA,CAAAC,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -14,7 +14,6 @@ var _jsxRuntime = require("react/jsx-runtime");
14
14
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
15
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
16
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
- const AnimatedIconClassComponent = _reactNativeReanimated.default.createAnimatedComponent(_icons.IconClassComponent);
18
17
  const IconButton = ({
19
18
  color = "primary",
20
19
  persistentColorMode = false,
@@ -93,7 +92,7 @@ const IconButton = ({
93
92
  testID: testID,
94
93
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
95
94
  style: [_core.IOIconButtonStyles.buttonSizeSmall, _core.IOStyles.alignCenter, _core.IOStyles.centerJustified, !disabled && !reducedMotion && scaleAnimatedStyle],
96
- children: !disabled ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedIconClassComponent, {
95
+ children: !disabled ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.AnimatedIconWithColorTransition, {
97
96
  allowFontScaling: true,
98
97
  name: icon,
99
98
  size: iconSize,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_core","_hooks","_icons","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","AnimatedIconClassComponent","Animated","createAnimatedComponent","IconClassComponent","IconButton","color","persistentColorMode","icon","iconSize","disabled","onPress","accessibilityLabel","accessibilityHint","testID","theme","useIOTheme","progress","onPressIn","onPressOut","scaleAnimatedStyle","useScaleAnimation","reducedMotion","useReducedMotion","mapColorStates","primary","IOColors","pressed","neutral","IOThemeLight","contrast","white","hexToRgba","animatedColor","useAnimatedProps","iconColor","interpolateColor","value","jsx","Pressable","accessible","accessibilityRole","accessibilityState","hitSlop","children","View","style","IOIconButtonStyles","buttonSizeSmall","IOStyles","alignCenter","centerJustified","allowFontScaling","name","size","animatedProps","AnimatedIcon","exports","_default"],"sourceRoot":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AAE;MAAEhC;IAAS;IAC/B;IACA;IAAA;IACAiC,OAAO,EAAE;IACT;IAAA;IACA7B,MAAM,EAAEA,MAAO;IAAA8B,QAAA,eAEf,IAAAhE,WAAA,CAAA0D,GAAA,EAAC/D,sBAAA,CAAAY,OAAQ,CAAC0D,IAAI;MACZC,KAAK,EAAE,CACLC,wBAAkB,CAACC,eAAe,EAClCC,cAAQ,CAACC,WAAW,EACpBD,cAAQ,CAACE,eAAe,EACxB,CAACzC,QAAQ,IAAI,CAACY,aAAa,IAAIF,kBAAkB,CACjD;MAAAwB,QAAA,EAED,CAAClC,QAAQ,gBACR,IAAA9B,WAAA,CAAA0D,GAAA,EAACrC,0BAA0B;QACzBmD,gBAAgB;QAChBC,IAAI,EAAE7C,IAAK;QACX8C,IAAI,EAAE7C,QAAS;QACf8C,aAAa,EAAEtB,aAAc;QAC7B3B,KAAK,EAAEkB,cAAc,CAAClB,KAAK,CAAC,EAAEE,IAAI,EAAErB;MAAQ,CAC7C,CAAC,gBAEF,IAAAP,WAAA,CAAA0D,GAAA,EAAC3D,MAAA,CAAA6E,YAAY;QACXJ,gBAAgB;QAChBC,IAAI,EAAE7C,IAAK;QACX8C,IAAI,EAAE7C,QAAS;QACfH,KAAK,EAAEkB,cAAc,CAAClB,KAAK,CAAC,EAAEE,IAAI,EAAEE;MAAS,CAC9C;IACF,CACY;EAAC,CACP,CAAC;AAEhB,CAAC;AAAC+C,OAAA,CAAApD,UAAA,GAAAA,UAAA;AAAA,IAAAqD,QAAA,GAAAD,OAAA,CAAAtE,OAAA,GAEakB,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_core","_hooks","_icons","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","IconButton","color","persistentColorMode","icon","iconSize","disabled","onPress","accessibilityLabel","accessibilityHint","testID","theme","useIOTheme","progress","onPressIn","onPressOut","scaleAnimatedStyle","useScaleAnimation","reducedMotion","useReducedMotion","mapColorStates","primary","IOColors","pressed","neutral","IOThemeLight","contrast","white","hexToRgba","animatedColor","useAnimatedProps","iconColor","interpolateColor","value","jsx","Pressable","accessible","accessibilityRole","accessibilityState","hitSlop","children","View","style","IOIconButtonStyles","buttonSizeSmall","IOStyles","alignCenter","centerJustified","AnimatedIconWithColorTransition","allowFontScaling","name","size","animatedProps","AnimatedIcon","exports","_default"],"sourceRoot":"../../../../src","sources":["components/buttons/IconButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,uBAAA,CAAAH,OAAA;AAKA,IAAAI,KAAA,GAAAJ,OAAA;AAQA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AAKkB,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,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AAA,GAEac,UAAU","ignoreList":[]}
@@ -54,7 +54,6 @@ const mapColorStates = {
54
54
  }
55
55
  }
56
56
  };
57
- const AnimatedIconClassComponent = _reactNativeReanimated.default.createAnimatedComponent(_icons.IconClassComponent);
58
57
  const IconButtonContained = ({
59
58
  icon,
60
59
  color = "primary",
@@ -97,7 +96,7 @@ const IconButtonContained = ({
97
96
  },
98
97
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
99
98
  style: [_core.IOIconButtonStyles.button, _core.IOIconButtonStyles.buttonSizeDefault, !disabled && !reducedMotion && scaleAnimatedStyle, !disabled && backgroundColorAnimationStyle],
100
- children: !disabled ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedIconClassComponent, {
99
+ children: !disabled ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.AnimatedIconWithColorTransition, {
101
100
  name: icon,
102
101
  animatedProps: iconColorAnimationStyle,
103
102
  color: mapColorStates[color]?.icon?.default