@bloxwap/hig 0.2.0 → 0.5.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 (119) hide show
  1. package/README.md +1 -1
  2. package/chart/README.md +3 -3
  3. package/contracts/README.md +1 -1
  4. package/contracts/dist/messages.d.ts +138 -0
  5. package/contracts/dist/messages.js +48 -2
  6. package/css.d.ts +2 -0
  7. package/feedback/README.md +1 -1
  8. package/feedback/assets/error.wav +0 -0
  9. package/feedback/assets/manifest.json +29 -19
  10. package/feedback/assets/tick.wav +0 -0
  11. package/feedback/assets/toggle.wav +0 -0
  12. package/feedback/dist/contract.d.ts +1 -57
  13. package/feedback/dist/contract.js +2 -1
  14. package/feedback/dist/native.d.ts +2 -1
  15. package/feedback/dist/presets.d.ts +57 -0
  16. package/feedback/dist/presets.js +1 -0
  17. package/native/README.md +6 -1
  18. package/native/dist/animated-number.js +11 -7
  19. package/native/dist/brand.d.ts +1 -1
  20. package/native/dist/brand.js +4 -3
  21. package/native/dist/button.d.ts +3 -2
  22. package/native/dist/button.js +8 -6
  23. package/native/dist/data.d.ts +18 -1
  24. package/native/dist/data.js +22 -2
  25. package/native/dist/field.d.ts +1 -0
  26. package/native/dist/field.js +18 -5
  27. package/native/dist/gesture-sheet.js +5 -3
  28. package/native/dist/icons.d.ts +21 -0
  29. package/native/dist/icons.js +20 -0
  30. package/native/dist/navigation.d.ts +1 -0
  31. package/native/dist/navigation.js +49 -7
  32. package/native/dist/overlay.js +3 -3
  33. package/native/dist/pickers.d.ts +54 -0
  34. package/native/dist/pickers.js +60 -0
  35. package/native/dist/provider.d.ts +25 -6
  36. package/native/dist/provider.js +19 -4
  37. package/native/dist/radio-group.d.ts +17 -1
  38. package/native/dist/radio-group.js +45 -7
  39. package/native/dist/recipes.d.ts +3 -0
  40. package/native/dist/recipes.js +15 -2
  41. package/native/dist/selection.d.ts +1 -0
  42. package/native/dist/selection.js +1 -0
  43. package/native/dist/slider.js +3 -2
  44. package/native/dist/status.d.ts +16 -5
  45. package/native/dist/status.js +55 -15
  46. package/native/dist/surface.d.ts +2 -1
  47. package/native/dist/surface.js +4 -3
  48. package/native/dist/swap-panel.d.ts +125 -0
  49. package/native/dist/swap-panel.js +177 -0
  50. package/native/dist/swap-parts.d.ts +86 -0
  51. package/native/dist/swap-parts.js +66 -0
  52. package/native/dist/swap-shared.d.ts +65 -0
  53. package/native/dist/swap-shared.js +76 -0
  54. package/native/dist/swap-sheet.d.ts +14 -0
  55. package/native/dist/swap-sheet.js +26 -0
  56. package/native/dist/swap-views.d.ts +41 -0
  57. package/native/dist/swap-views.js +37 -0
  58. package/native/dist/switch.d.ts +1 -1
  59. package/native/dist/switch.js +20 -13
  60. package/native/dist/wallet-address.d.ts +37 -0
  61. package/native/dist/wallet-address.js +50 -0
  62. package/native-fonts/README.md +1 -1
  63. package/native-fonts/dist/index.d.ts +1 -1
  64. package/native-fonts/dist/index.js +1 -1
  65. package/native-fonts/fonts/manifest.json +1 -1
  66. package/og-fonts/README.md +2 -2
  67. package/og-fonts/dist/index.d.ts +1 -1
  68. package/og-fonts/dist/index.js +1 -1
  69. package/og-fonts/fonts/manifest.json +1 -1
  70. package/package.json +181 -63
  71. package/react/README.md +22 -1
  72. package/react/dist/animated-number.js +2 -1
  73. package/react/dist/brand.d.ts +1 -1
  74. package/react/dist/brand.js +3 -2
  75. package/react/dist/button.d.ts +2 -2
  76. package/react/dist/button.js +1 -1
  77. package/react/dist/data.d.ts +15 -0
  78. package/react/dist/data.js +13 -0
  79. package/react/dist/field.d.ts +1 -0
  80. package/react/dist/field.js +2 -1
  81. package/react/dist/navigation.js +1 -1
  82. package/react/dist/notify.d.ts +14 -0
  83. package/react/dist/notify.js +6 -0
  84. package/react/dist/recipes/install-command.d.ts +1 -0
  85. package/react/dist/recipes/install-command.js +8 -1
  86. package/react/dist/recipes/pickers.d.ts +57 -0
  87. package/react/dist/recipes/pickers.js +78 -0
  88. package/react/dist/recipes/swap/amount-card.d.ts +40 -0
  89. package/react/dist/recipes/swap/amount-card.js +7 -0
  90. package/react/dist/recipes/swap/picker.d.ts +26 -0
  91. package/react/dist/recipes/swap/picker.js +20 -0
  92. package/react/dist/recipes/swap/settings.d.ts +24 -0
  93. package/react/dist/recipes/swap/settings.js +25 -0
  94. package/react/dist/recipes/swap/shared.d.ts +98 -0
  95. package/react/dist/recipes/swap/shared.js +106 -0
  96. package/react/dist/recipes/swap-panel.d.ts +127 -0
  97. package/react/dist/recipes/swap-panel.js +170 -0
  98. package/react/dist/recipes/swap-sheet.d.ts +16 -0
  99. package/react/dist/recipes/swap-sheet.js +22 -0
  100. package/react/dist/recipes/trade-entry.js +1 -1
  101. package/react/dist/recipes.d.ts +3 -1
  102. package/react/dist/recipes.js +3 -1
  103. package/react/dist/select.js +2 -0
  104. package/react/dist/selection.d.ts +13 -0
  105. package/react/dist/selection.js +7 -0
  106. package/react/dist/status.d.ts +15 -5
  107. package/react/dist/status.js +8 -4
  108. package/react/dist/styles.css +406 -92
  109. package/react/dist/toast.d.ts +17 -0
  110. package/react/dist/toast.js +21 -0
  111. package/react/dist/wallet-address.d.ts +23 -0
  112. package/react/dist/wallet-address.js +24 -0
  113. package/tokens/README.md +9 -1
  114. package/tokens/dist/brand.d.ts +19 -0
  115. package/tokens/dist/brand.js +24 -0
  116. package/tokens/dist/index.d.ts +9 -1
  117. package/tokens/dist/index.js +8 -1
  118. package/tokens/dist/manifest.json +4 -1
  119. package/tokens/dist/tokens.css +1 -0
package/package.json CHANGED
@@ -1,42 +1,57 @@
1
1
  {
2
2
  "name": "@bloxwap/hig",
3
- "version": "0.2.0",
3
+ "version": "0.5.1",
4
4
  "description": "Bloxwap Human Interface Guidelines: tokens, contracts, React and React Native components, chart adapter, feedback and fonts in one package.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "exports": {
8
8
  "./tokens": {
9
9
  "types": "./tokens/dist/index.d.ts",
10
- "import": "./tokens/dist/index.js"
10
+ "import": "./tokens/dist/index.js",
11
+ "default": "./tokens/dist/index.js"
12
+ },
13
+ "./tokens/brand": {
14
+ "types": "./tokens/dist/brand.d.ts",
15
+ "import": "./tokens/dist/brand.js",
16
+ "default": "./tokens/dist/brand.js"
17
+ },
18
+ "./tokens/css": {
19
+ "types": "./css.d.ts",
20
+ "default": "./tokens/dist/tokens.css"
11
21
  },
12
- "./tokens/css": "./tokens/dist/tokens.css",
13
22
  "./tokens/manifest": "./tokens/dist/manifest.json",
14
23
  "./tokens/mark.svg": "./tokens/assets/bloxwap-icon.svg",
15
24
  "./contracts": {
16
25
  "types": "./contracts/dist/index.d.ts",
17
- "import": "./contracts/dist/index.js"
26
+ "import": "./contracts/dist/index.js",
27
+ "default": "./contracts/dist/index.js"
18
28
  },
19
29
  "./contracts/feedback": {
20
30
  "types": "./contracts/dist/feedback.d.ts",
21
- "import": "./contracts/dist/feedback.js"
31
+ "import": "./contracts/dist/feedback.js",
32
+ "default": "./contracts/dist/feedback.js"
22
33
  },
23
34
  "./contracts/announcements": {
24
35
  "types": "./contracts/dist/announcements.d.ts",
25
- "import": "./contracts/dist/announcements.js"
36
+ "import": "./contracts/dist/announcements.js",
37
+ "default": "./contracts/dist/announcements.js"
26
38
  },
27
39
  "./contracts/messages": {
28
40
  "types": "./contracts/dist/messages.d.ts",
29
- "import": "./contracts/dist/messages.js"
41
+ "import": "./contracts/dist/messages.js",
42
+ "default": "./contracts/dist/messages.js"
30
43
  },
31
44
  "./native-fonts": {
32
45
  "types": "./native-fonts/dist/index.d.ts",
33
- "import": "./native-fonts/dist/index.js"
46
+ "import": "./native-fonts/dist/index.js",
47
+ "default": "./native-fonts/dist/index.js"
34
48
  },
35
49
  "./native-fonts/manifest": "./native-fonts/fonts/manifest.json",
36
50
  "./native-fonts/fonts/*": "./native-fonts/fonts/*",
37
51
  "./og-fonts": {
38
52
  "types": "./og-fonts/dist/index.d.ts",
39
- "import": "./og-fonts/dist/index.js"
53
+ "import": "./og-fonts/dist/index.js",
54
+ "default": "./og-fonts/dist/index.js"
40
55
  },
41
56
  "./og-fonts/node": {
42
57
  "types": "./og-fonts/dist/node.d.ts",
@@ -46,204 +61,299 @@
46
61
  "./og-fonts/fonts/*": "./og-fonts/fonts/*",
47
62
  "./feedback": {
48
63
  "types": "./feedback/dist/contract.d.ts",
49
- "import": "./feedback/dist/contract.js"
64
+ "import": "./feedback/dist/contract.js",
65
+ "default": "./feedback/dist/contract.js"
50
66
  },
51
67
  "./feedback/web": {
52
68
  "types": "./feedback/dist/web.d.ts",
53
- "import": "./feedback/dist/web.js"
69
+ "import": "./feedback/dist/web.js",
70
+ "default": "./feedback/dist/web.js"
54
71
  },
55
72
  "./feedback/native": {
56
73
  "types": "./feedback/dist/native.d.ts",
57
- "import": "./feedback/dist/native.js"
74
+ "import": "./feedback/dist/native.js",
75
+ "default": "./feedback/dist/native.js"
58
76
  },
59
77
  "./feedback/react": {
60
78
  "types": "./feedback/dist/react.d.ts",
61
- "import": "./feedback/dist/react.js"
79
+ "import": "./feedback/dist/react.js",
80
+ "default": "./feedback/dist/react.js"
62
81
  },
63
82
  "./feedback/preferences": {
64
83
  "types": "./feedback/dist/preferences.d.ts",
65
- "import": "./feedback/dist/preferences.js"
84
+ "import": "./feedback/dist/preferences.js",
85
+ "default": "./feedback/dist/preferences.js"
66
86
  },
67
87
  "./feedback/assets/*": "./feedback/assets/*",
68
88
  "./feedback/web-sound": {
69
89
  "types": "./feedback/dist/web-sound.d.ts",
70
- "import": "./feedback/dist/web-sound.js"
90
+ "import": "./feedback/dist/web-sound.js",
91
+ "default": "./feedback/dist/web-sound.js"
71
92
  },
72
93
  "./feedback/browser-haptic": {
73
94
  "types": "./feedback/dist/browser-haptic.d.ts",
74
- "import": "./feedback/dist/browser-haptic.js"
95
+ "import": "./feedback/dist/browser-haptic.js",
96
+ "default": "./feedback/dist/browser-haptic.js"
75
97
  },
76
98
  "./feedback/web-haptic": {
77
99
  "types": "./feedback/dist/web-haptic.d.ts",
78
- "import": "./feedback/dist/web-haptic.js"
100
+ "import": "./feedback/dist/web-haptic.js",
101
+ "default": "./feedback/dist/web-haptic.js"
79
102
  },
80
103
  "./react/provider": {
81
104
  "types": "./react/dist/provider.d.ts",
82
- "import": "./react/dist/provider.js"
105
+ "import": "./react/dist/provider.js",
106
+ "default": "./react/dist/provider.js"
83
107
  },
84
108
  "./react/button": {
85
109
  "types": "./react/dist/button.d.ts",
86
- "import": "./react/dist/button.js"
110
+ "import": "./react/dist/button.js",
111
+ "default": "./react/dist/button.js"
87
112
  },
88
113
  "./react/surface": {
89
114
  "types": "./react/dist/surface.d.ts",
90
- "import": "./react/dist/surface.js"
115
+ "import": "./react/dist/surface.js",
116
+ "default": "./react/dist/surface.js"
91
117
  },
92
118
  "./react/field": {
93
119
  "types": "./react/dist/field.d.ts",
94
- "import": "./react/dist/field.js"
120
+ "import": "./react/dist/field.js",
121
+ "default": "./react/dist/field.js"
95
122
  },
96
123
  "./react/selection": {
97
124
  "types": "./react/dist/selection.d.ts",
98
- "import": "./react/dist/selection.js"
125
+ "import": "./react/dist/selection.js",
126
+ "default": "./react/dist/selection.js"
99
127
  },
100
128
  "./react/overlay": {
101
129
  "types": "./react/dist/overlay.d.ts",
102
- "import": "./react/dist/overlay.js"
130
+ "import": "./react/dist/overlay.js",
131
+ "default": "./react/dist/overlay.js"
103
132
  },
104
133
  "./react/navigation": {
105
134
  "types": "./react/dist/navigation.d.ts",
106
- "import": "./react/dist/navigation.js"
135
+ "import": "./react/dist/navigation.js",
136
+ "default": "./react/dist/navigation.js"
107
137
  },
108
138
  "./react/status": {
109
139
  "types": "./react/dist/status.d.ts",
110
- "import": "./react/dist/status.js"
140
+ "import": "./react/dist/status.js",
141
+ "default": "./react/dist/status.js"
142
+ },
143
+ "./react/toast": {
144
+ "types": "./react/dist/toast.d.ts",
145
+ "import": "./react/dist/toast.js",
146
+ "default": "./react/dist/toast.js"
111
147
  },
112
148
  "./react/data": {
113
149
  "types": "./react/dist/data.d.ts",
114
- "import": "./react/dist/data.js"
150
+ "import": "./react/dist/data.js",
151
+ "default": "./react/dist/data.js"
115
152
  },
116
153
  "./react/brand": {
117
154
  "types": "./react/dist/brand.d.ts",
118
- "import": "./react/dist/brand.js"
155
+ "import": "./react/dist/brand.js",
156
+ "default": "./react/dist/brand.js"
119
157
  },
120
158
  "./react/recipes": {
121
159
  "types": "./react/dist/recipes.d.ts",
122
- "import": "./react/dist/recipes.js"
160
+ "import": "./react/dist/recipes.js",
161
+ "default": "./react/dist/recipes.js"
123
162
  },
124
163
  "./react/recipes/market-row": {
125
164
  "types": "./react/dist/recipes/market-row.d.ts",
126
- "import": "./react/dist/recipes/market-row.js"
165
+ "import": "./react/dist/recipes/market-row.js",
166
+ "default": "./react/dist/recipes/market-row.js"
127
167
  },
128
168
  "./react/recipes/balance-card": {
129
169
  "types": "./react/dist/recipes/balance-card.d.ts",
130
- "import": "./react/dist/recipes/balance-card.js"
170
+ "import": "./react/dist/recipes/balance-card.js",
171
+ "default": "./react/dist/recipes/balance-card.js"
131
172
  },
132
173
  "./react/recipes/trade-entry": {
133
174
  "types": "./react/dist/recipes/trade-entry.d.ts",
134
- "import": "./react/dist/recipes/trade-entry.js"
175
+ "import": "./react/dist/recipes/trade-entry.js",
176
+ "default": "./react/dist/recipes/trade-entry.js"
177
+ },
178
+ "./react/recipes/swap-panel": {
179
+ "types": "./react/dist/recipes/swap-panel.d.ts",
180
+ "import": "./react/dist/recipes/swap-panel.js",
181
+ "default": "./react/dist/recipes/swap-panel.js"
182
+ },
183
+ "./react/recipes/pickers": {
184
+ "types": "./react/dist/recipes/pickers.d.ts",
185
+ "import": "./react/dist/recipes/pickers.js",
186
+ "default": "./react/dist/recipes/pickers.js"
187
+ },
188
+ "./react/recipes/swap-sheet": {
189
+ "types": "./react/dist/recipes/swap-sheet.d.ts",
190
+ "import": "./react/dist/recipes/swap-sheet.js",
191
+ "default": "./react/dist/recipes/swap-sheet.js"
135
192
  },
136
193
  "./react/recipes/install-command": {
137
194
  "types": "./react/dist/recipes/install-command.d.ts",
138
- "import": "./react/dist/recipes/install-command.js"
195
+ "import": "./react/dist/recipes/install-command.js",
196
+ "default": "./react/dist/recipes/install-command.js"
139
197
  },
140
198
  "./react/recipes/code-window": {
141
199
  "types": "./react/dist/recipes/code-window.d.ts",
142
- "import": "./react/dist/recipes/code-window.js"
200
+ "import": "./react/dist/recipes/code-window.js",
201
+ "default": "./react/dist/recipes/code-window.js"
143
202
  },
144
203
  "./react/recipes/marketing-hero": {
145
204
  "types": "./react/dist/recipes/marketing-hero.d.ts",
146
- "import": "./react/dist/recipes/marketing-hero.js"
205
+ "import": "./react/dist/recipes/marketing-hero.js",
206
+ "default": "./react/dist/recipes/marketing-hero.js"
147
207
  },
148
208
  "./react/recipes/activity-list": {
149
209
  "types": "./react/dist/recipes/activity-list.d.ts",
150
- "import": "./react/dist/recipes/activity-list.js"
210
+ "import": "./react/dist/recipes/activity-list.js",
211
+ "default": "./react/dist/recipes/activity-list.js"
212
+ },
213
+ "./react/css": {
214
+ "types": "./css.d.ts",
215
+ "default": "./react/dist/styles.css"
216
+ },
217
+ "./react/css/base": {
218
+ "types": "./css.d.ts",
219
+ "default": "./react/dist/base.css"
151
220
  },
152
- "./react/css": "./react/dist/styles.css",
153
- "./react/css/base": "./react/dist/base.css",
154
221
  "./react/animated-number": {
155
222
  "types": "./react/dist/animated-number.d.ts",
156
- "import": "./react/dist/animated-number.js"
223
+ "import": "./react/dist/animated-number.js",
224
+ "default": "./react/dist/animated-number.js"
225
+ },
226
+ "./react/wallet-address": {
227
+ "types": "./react/dist/wallet-address.d.ts",
228
+ "import": "./react/dist/wallet-address.js",
229
+ "default": "./react/dist/wallet-address.js"
157
230
  },
158
231
  "./react/gesture-sheet": {
159
232
  "types": "./react/dist/gesture-sheet.d.ts",
160
- "import": "./react/dist/gesture-sheet.js"
233
+ "import": "./react/dist/gesture-sheet.js",
234
+ "default": "./react/dist/gesture-sheet.js"
161
235
  },
162
236
  "./chart": {
163
237
  "types": "./chart/dist/index.d.ts",
164
- "import": "./chart/dist/index.js"
238
+ "import": "./chart/dist/index.js",
239
+ "default": "./chart/dist/index.js"
240
+ },
241
+ "./native/wallet-address": {
242
+ "types": "./native/dist/wallet-address.d.ts",
243
+ "import": "./native/dist/wallet-address.js",
244
+ "default": "./native/dist/wallet-address.js"
245
+ },
246
+ "./native/pickers": {
247
+ "types": "./native/dist/pickers.d.ts",
248
+ "import": "./native/dist/pickers.js",
249
+ "default": "./native/dist/pickers.js"
250
+ },
251
+ "./native/swap-sheet": {
252
+ "types": "./native/dist/swap-sheet.d.ts",
253
+ "import": "./native/dist/swap-sheet.js",
254
+ "default": "./native/dist/swap-sheet.js"
165
255
  },
166
256
  "./native/provider": {
167
257
  "types": "./native/dist/provider.d.ts",
168
- "import": "./native/dist/provider.js"
258
+ "import": "./native/dist/provider.js",
259
+ "default": "./native/dist/provider.js"
169
260
  },
170
261
  "./native/button": {
171
262
  "types": "./native/dist/button.d.ts",
172
- "import": "./native/dist/button.js"
263
+ "import": "./native/dist/button.js",
264
+ "default": "./native/dist/button.js"
173
265
  },
174
266
  "./native/surface": {
175
267
  "types": "./native/dist/surface.d.ts",
176
- "import": "./native/dist/surface.js"
268
+ "import": "./native/dist/surface.js",
269
+ "default": "./native/dist/surface.js"
177
270
  },
178
271
  "./native/field": {
179
272
  "types": "./native/dist/field.d.ts",
180
- "import": "./native/dist/field.js"
273
+ "import": "./native/dist/field.js",
274
+ "default": "./native/dist/field.js"
181
275
  },
182
276
  "./native/selection": {
183
277
  "types": "./native/dist/selection.d.ts",
184
- "import": "./native/dist/selection.js"
278
+ "import": "./native/dist/selection.js",
279
+ "default": "./native/dist/selection.js"
185
280
  },
186
281
  "./native/overlay": {
187
282
  "types": "./native/dist/overlay.d.ts",
188
- "import": "./native/dist/overlay.js"
283
+ "import": "./native/dist/overlay.js",
284
+ "default": "./native/dist/overlay.js"
189
285
  },
190
286
  "./native/navigation": {
191
287
  "types": "./native/dist/navigation.d.ts",
192
- "import": "./native/dist/navigation.js"
288
+ "import": "./native/dist/navigation.js",
289
+ "default": "./native/dist/navigation.js"
193
290
  },
194
291
  "./native/status": {
195
292
  "types": "./native/dist/status.d.ts",
196
- "import": "./native/dist/status.js"
293
+ "import": "./native/dist/status.js",
294
+ "default": "./native/dist/status.js"
197
295
  },
198
296
  "./native/data": {
199
297
  "types": "./native/dist/data.d.ts",
200
- "import": "./native/dist/data.js"
298
+ "import": "./native/dist/data.js",
299
+ "default": "./native/dist/data.js"
201
300
  },
202
301
  "./native/brand": {
203
302
  "types": "./native/dist/brand.d.ts",
204
- "import": "./native/dist/brand.js"
303
+ "import": "./native/dist/brand.js",
304
+ "default": "./native/dist/brand.js"
205
305
  },
206
306
  "./native/recipes": {
207
307
  "types": "./native/dist/recipes.d.ts",
208
- "import": "./native/dist/recipes.js"
308
+ "import": "./native/dist/recipes.js",
309
+ "default": "./native/dist/recipes.js"
209
310
  },
210
311
  "./native/switch": {
211
312
  "types": "./native/dist/switch.d.ts",
212
- "import": "./native/dist/switch.js"
313
+ "import": "./native/dist/switch.js",
314
+ "default": "./native/dist/switch.js"
213
315
  },
214
316
  "./native/checkbox": {
215
317
  "types": "./native/dist/checkbox.d.ts",
216
- "import": "./native/dist/checkbox.js"
318
+ "import": "./native/dist/checkbox.js",
319
+ "default": "./native/dist/checkbox.js"
217
320
  },
218
321
  "./native/radio-group": {
219
322
  "types": "./native/dist/radio-group.d.ts",
220
- "import": "./native/dist/radio-group.js"
323
+ "import": "./native/dist/radio-group.js",
324
+ "default": "./native/dist/radio-group.js"
221
325
  },
222
326
  "./native/select": {
223
327
  "types": "./native/dist/select.d.ts",
224
- "import": "./native/dist/select.js"
328
+ "import": "./native/dist/select.js",
329
+ "default": "./native/dist/select.js"
225
330
  },
226
331
  "./native/slider": {
227
332
  "types": "./native/dist/slider.d.ts",
228
- "import": "./native/dist/slider.js"
333
+ "import": "./native/dist/slider.js",
334
+ "default": "./native/dist/slider.js"
229
335
  },
230
336
  "./native/segmented-control": {
231
337
  "types": "./native/dist/radio-group.d.ts",
232
- "import": "./native/dist/radio-group.js"
338
+ "import": "./native/dist/radio-group.js",
339
+ "default": "./native/dist/radio-group.js"
233
340
  },
234
341
  "./native/gesture-sheet": {
235
342
  "types": "./native/dist/gesture-sheet.d.ts",
236
- "import": "./native/dist/gesture-sheet.js"
343
+ "import": "./native/dist/gesture-sheet.js",
344
+ "default": "./native/dist/gesture-sheet.js"
237
345
  },
238
346
  "./native/animated-number": {
239
347
  "types": "./native/dist/animated-number.d.ts",
240
- "import": "./native/dist/animated-number.js"
348
+ "import": "./native/dist/animated-number.js",
349
+ "default": "./native/dist/animated-number.js"
241
350
  },
242
351
  "./package.json": "./package.json"
243
352
  },
244
353
  "files": [
245
354
  "README.md",
246
355
  "LICENSE",
356
+ "css.d.ts",
247
357
  "tokens/dist",
248
358
  "tokens/assets",
249
359
  "tokens/README.md",
@@ -273,8 +383,8 @@
273
383
  ],
274
384
  "peerDependencies": {
275
385
  "react": "^19.1.0",
276
- "@bloxwap/sfx": "^0.2.0",
277
- "@bloxwap/haptic": "^0.2.0 || ^0.3.0",
386
+ "@bloxwap/sfx": "^0.2.0 || ^0.3.0",
387
+ "@bloxwap/haptic": "^0.2.0 || ^0.3.0 || ^0.4.0",
278
388
  "expo-audio": "~1.1.1 || ~55.0.18 || ~58.0.10",
279
389
  "expo-haptics": "~15.0.7 || ~55.0.18 || ~58.0.7",
280
390
  "react-dom": "^19.1.0",
@@ -283,11 +393,13 @@
283
393
  "@radix-ui/react-popover": "^1.1.15",
284
394
  "@radix-ui/react-tooltip": "^1.2.8",
285
395
  "vaul": "^1.1.2",
286
- "@bloxwap/chart": "^0.3.0",
396
+ "sonner": "^2.0.0",
397
+ "cuer": ">=0.0.3 <0.1.0",
398
+ "@bloxwap/chart": "^0.3.0 || ^0.4.0 || ^0.5.0",
287
399
  "react-native": "^0.81.5 || ^0.83.10 || ^0.88.0",
288
400
  "react-native-svg": "15.12.1 || 15.15.3 || 15.16.0",
289
401
  "@react-native-community/slider": "5.0.1 || 5.1.2 || 5.2.1",
290
- "react-native-safe-area-context": "~5.6.0 || ~5.10.1",
402
+ "react-native-safe-area-context": "~5.6.0 || ~5.10.1 || ~5.11.1",
291
403
  "@gorhom/bottom-sheet": "^5.2.14",
292
404
  "react-native-reanimated": "^4.1.1",
293
405
  "react-native-worklets": "^0.5.1 || ^0.7.4 || ^0.13.0",
@@ -327,6 +439,12 @@
327
439
  "vaul": {
328
440
  "optional": true
329
441
  },
442
+ "sonner": {
443
+ "optional": true
444
+ },
445
+ "cuer": {
446
+ "optional": true
447
+ },
330
448
  "react-native": {
331
449
  "optional": true
332
450
  },
package/react/README.md CHANGED
@@ -1,9 +1,30 @@
1
1
  # @bloxwap/hig/react
2
2
 
3
- Version 0.2.0, an entry of `@bloxwap/hig`. Import individual entries; see docs/components for platform and accessibility contracts.
3
+ Version 0.5.1, an entry of `@bloxwap/hig`. Import individual entries; see docs/components for platform and accessibility contracts.
4
4
 
5
5
  Set a brand accent with `<HIGProvider primaryColor='#ff0000'>` from
6
6
  `@bloxwap/hig/react/provider`. It accepts opaque sRGB hex (`#RGB` or `#RRGGBB`),
7
7
  sets action/focus colours, and selects black or white text on primary fills.
8
8
  Omit it to keep Bloxwap green. Nested providers inherit the accent.
9
9
  Status and buy/sell colours stay independent. See [the colour guide](../../../docs/foundations/platform.md#primary-brand-colour).
10
+
11
+ ## Mobile hosts
12
+
13
+ `@bloxwap/hig/react/css` handles the component layer on touch devices: hover styles apply only to a precise
14
+ pointer (`hover: hover` and `pointer: fine`), controls fire click without the double-tap-zoom wait and draw their
15
+ own press state instead of the browser's tap flash, control labels can't be selected by a long press, text
16
+ fields use at least 16px on touch so iOS doesn't zoom into them, and edge sheets and dialogs leave room for
17
+ `env(safe-area-inset-*)`. It never styles `html`, `body` or the viewport. Set those in the host:
18
+
19
+ ```html
20
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
21
+ <meta name="theme-color" content="#0a0a0a" />
22
+ ```
23
+
24
+ Hosts don't need their own sticky-hover overrides for HIG components, and should remove any they have. An
25
+ override keyed to HIG class names stops matching silently when a release renames a class or changes a rule's
26
+ specificity. HIG keeps every `:hover` rule behind `(hover: hover) and (pointer: fine)`, and `tests/touch-css.test.ts`
27
+ fails the build if one escapes.
28
+
29
+ `viewport-fit=cover` is what makes the safe-area insets non-zero. Don't add `maximum-scale` or `user-scalable=no`.
30
+ Add `overscroll-behavior: none` to `html, body` only if the app owns its own scrolling and you don't want pull-to-refresh.
@@ -3,6 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useEffect, useMemo, useRef, useState } from 'react';
4
4
  import { createAnimatedNumberModel, createAnimatedNumberTransitions } from './animated-number-model.js';
5
5
  import { useHIG } from './provider.js';
6
+ import { tokens as higTokens } from '@bloxwap/hig/tokens';
6
7
  import * as en from '@bloxwap/hig/contracts/messages';
7
8
  export function AnimatedNumberReadout({ duration = 180, trend, ...props }) {
8
9
  const { locale, direction, reducedMotion, messages } = useHIG();
@@ -43,7 +44,7 @@ export function AnimatedNumberReadout({ duration = 180, trend, ...props }) {
43
44
  }
44
45
  const created = [], changes = frame.tokens.filter(token => token.changed);
45
46
  for (const [index, place] of Array.from(places).entries()) {
46
- const token = changes[index], movement = frame.movement || (token?.value !== undefined && token.oldValue !== undefined ? token.value > token.oldValue ? 1 : token.value < token.oldValue ? -1 : 0 : 0), old = place.querySelector('.hig-animated-number-old'), next = place.querySelector('.hig-animated-number-new'), timing = { duration: Math.min(duration, 600), easing: 'ease-out', fill: 'forwards' };
47
+ const token = changes[index], movement = frame.movement || (token?.value !== undefined && token.oldValue !== undefined ? token.value > token.oldValue ? 1 : token.value < token.oldValue ? -1 : 0 : 0), old = place.querySelector('.hig-animated-number-old'), next = place.querySelector('.hig-animated-number-new'), timing = { duration: Math.min(duration, 600), easing: `cubic-bezier(${higTokens.easing.standard.join(',')})`, fill: 'forwards' };
47
48
  const oldFrames = movement === 0 ? [{ opacity: 1 }, { opacity: 0 }] : [{ opacity: 1, transform: 'translateY(0%)' }, { opacity: 0, transform: `translateY(${-movement * 100}%)` }];
48
49
  const newFrames = movement === 0 ? [{ opacity: 0 }, { opacity: 1 }] : [{ opacity: 0, transform: `translateY(${movement * 100}%)` }, { opacity: 1, transform: 'translateY(0%)' }];
49
50
  const oldAnimation = old?.animate?.(oldFrames, timing), newAnimation = next?.animate?.(newFrames, timing);
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- /** Exact approved geometry from pinned Font docs mark; metadata lives in SVG asset. */
2
+ /** The approved mark. Geometry and fills come from the pinned SVG through `@bloxwap/hig/tokens/brand`, so it does not follow `primaryColor` or the token palette. */
3
3
  export declare function BrandMark({ size, label }: {
4
4
  size?: number;
5
5
  label?: string;
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /** Exact approved geometry from pinned Font docs mark; metadata lives in SVG asset. */
3
- export function BrandMark({ size = 32, label }) { return _jsxs("svg", { width: size, height: size, viewBox: '0 0 100 100', role: label ? 'img' : undefined, "aria-label": label, "aria-hidden": label ? undefined : true, children: [_jsx("rect", { width: '100', height: '100', rx: '22.37', fill: '#00ff3f' }), _jsxs("g", { fill: 'none', stroke: '#0a0a0a', strokeWidth: '16', strokeLinecap: 'round', children: [_jsx("path", { d: 'M25 75L75 25' }), _jsx("path", { d: 'M24 24L35 35' }), _jsx("path", { d: 'M65 65L76 76' })] })] }); }
2
+ import { brandMark as mark } from '@bloxwap/hig/tokens/brand';
3
+ /** The approved mark. Geometry and fills come from the pinned SVG through `@bloxwap/hig/tokens/brand`, so it does not follow `primaryColor` or the token palette. */
4
+ export function BrandMark({ size = 32, label }) { return _jsxs("svg", { width: size, height: size, viewBox: mark.viewBox, role: label ? 'img' : undefined, "aria-label": label, "aria-hidden": label ? undefined : true, children: [_jsx("rect", { width: mark.size, height: mark.size, rx: mark.radius, fill: mark.fill.srgb }), _jsx("g", { fill: 'none', stroke: mark.stroke.srgb, strokeWidth: mark.strokeWidth, strokeLinecap: mark.strokeLinecap, children: mark.paths.map(d => _jsx("path", { d: d }, d)) })] }); }
4
5
  export function CheckIcon() { return _jsx("svg", { width: '20', height: '20', viewBox: '0 0 24 24', "aria-hidden": 'true', children: _jsx("path", { d: 'm5 12 4 4 10-10', fill: 'none', stroke: 'currentColor', strokeWidth: '2', strokeLinecap: 'round', strokeLinejoin: 'round' }) }); }
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { Intent } from '@bloxwap/hig/contracts';
3
3
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
- intent?: Intent;
5
- busy?: boolean; /** Busy suffix for this button; defaults to HIGProvider `messages.busy`. `''` hides it (busy state stays exposed). */
4
+ intent?: Intent; /** Shows a leading spinner and blocks activation. */
5
+ busy?: boolean; /** Busy text appended to the accessible name (not drawn; the spinner is the visible cue); defaults to HIGProvider `messages.busy`. `''` omits it (busy state stays exposed). */
6
6
  busyLabel?: string;
7
7
  fullWidth?: boolean;
8
8
  suppressFeedback?: boolean;
@@ -14,7 +14,7 @@ export const Button = forwardRef(function Button({ intent = 'primary', busy = fa
14
14
  context.feedback?.emit({ id: `${id}/${++sequence.current}`, source: id, intent: 'activate', origin: e.detail === 0 ? 'keyboard' : 'pointer' });
15
15
  }
16
16
  catch { /* Optional feedback cannot alter the action. */ }
17
- } }, children: [children, busy && busyText ? _jsxs("span", { role: 'status', className: 'hig-busy', children: [" \u00B7 ", busyText] }) : null] });
17
+ } }, children: [busy && _jsx("span", { className: 'hig-button-spinner', "aria-hidden": 'true' }), children, busy && busyText ? _jsxs("span", { role: 'status', className: 'hig-busy hig-sr-only', children: [" \u00B7 ", busyText] }) : null] });
18
18
  });
19
19
  export const IconButton = forwardRef(function IconButton({ label, children, className, ...props }, ref) { return _jsx(Button, { ...props, ref: ref, className: `hig-icon-button ${className ?? ''}`, "aria-label": label, children: _jsx("span", { "aria-hidden": 'true', children: children }) }); });
20
20
  export const Link = forwardRef(function Link(props, ref) { return _jsx("a", { ...props, ref: ref, className: `hig-link ${props.className ?? ''}` }); });
@@ -11,6 +11,21 @@ export declare function NumberReadout({ value, options, stale, label, prefix, su
11
11
  export declare function Usd(props: NumberProps): React.JSX.Element;
12
12
  /** Input is percent points: 5 means 5%, not 500%. */
13
13
  export declare function Percent(props: NumberProps): React.JSX.Element;
14
+ export type AddressKind = 'ethereum' | 'solana';
15
+ /** `0x…` is Ethereum-style (EVM); anything else lays out as Solana (base58). */
16
+ export declare const addressKind: (address: string) => AddressKind;
17
+ /** Fixed-width rows: 6 characters for Ethereum-style addresses (42 characters make 7 rows), 4 for Solana (44 make 11). */
18
+ export declare function addressRows(address: string, kind: AddressKind): string[];
19
+ /**
20
+ * A wallet address in HIG's vertical style: fixed-width monospace rows with the leading row and the trailing four characters
21
+ * emphasised, the characters people compare, and the middle dimmed. Always left to right. Selecting it copies the plain address.
22
+ */
23
+ export declare function VerticalAddress({ address, kind, rowHeight, className }: {
24
+ address: string; /** Row layout; inferred from the address when omitted. */
25
+ kind?: AddressKind; /** Row height in CSS pixels; the type size follows it. Defaults to the surrounding line height. */
26
+ rowHeight?: number;
27
+ className?: string;
28
+ }): React.JSX.Element;
14
29
  export declare function Metric({ label, value }: {
15
30
  label: string;
16
31
  value: React.ReactNode;
@@ -8,6 +8,19 @@ export function NumberReadout({ value, options, stale, label, prefix = '', suffi
8
8
  export function Usd(props) { return _jsx(NumberReadout, { ...props, options: { style: 'currency', currency: 'USD', ...props.options } }); }
9
9
  /** Input is percent points: 5 means 5%, not 500%. */
10
10
  export function Percent(props) { return _jsx(NumberReadout, { ...props, value: props.value == null ? props.value : props.value / 100, options: { maximumFractionDigits: Math.max(3, props.options?.minimumFractionDigits ?? 0), ...props.options, style: 'percent' } }); }
11
+ /** `0x…` is Ethereum-style (EVM); anything else lays out as Solana (base58). */
12
+ export const addressKind = (address) => address.startsWith('0x') ? 'ethereum' : 'solana';
13
+ /** Fixed-width rows: 6 characters for Ethereum-style addresses (42 characters make 7 rows), 4 for Solana (44 make 11). */
14
+ export function addressRows(address, kind) { const size = kind === 'ethereum' ? 6 : 4, rows = []; for (let index = 0; index < address.length; index += size)
15
+ rows.push(address.slice(index, index + size)); return rows; }
16
+ /**
17
+ * A wallet address in HIG's vertical style: fixed-width monospace rows with the leading row and the trailing four characters
18
+ * emphasised, the characters people compare, and the middle dimmed. Always left to right. Selecting it copies the plain address.
19
+ */
20
+ export function VerticalAddress({ address, kind, rowHeight, className }) {
21
+ const layout = kind ?? addressKind(address), rows = addressRows(address, layout), size = layout === 'ethereum' ? 6 : 4, tail = address.length - 4;
22
+ return _jsxs("span", { className: `hig-vertical-address${className ? ` ${className}` : ''}`, dir: 'ltr', translate: 'no', "data-kind": layout, style: rowHeight ? { '--hig-address-row': `${rowHeight}px` } : undefined, children: [_jsx("span", { className: 'hig-sr-only', children: address }), _jsx("span", { "aria-hidden": 'true', children: rows.map((row, rowIndex) => _jsx("span", { children: Array.from(row).map((character, index) => { const position = rowIndex * size + index; return _jsx("span", { "data-anchor": position < size || position >= tail || undefined, children: character }, index); }) }, rowIndex)) })] });
23
+ }
11
24
  export function Metric({ label, value }) { return _jsxs("dl", { className: 'hig-surface', children: [_jsx("dt", { children: label }), _jsx("dd", { children: value })] }); }
12
25
  export const Stat = Metric;
13
26
  export function List({ items, keyFor, render, empty, label, loading = false, error, onRetry, onLoadMore }) {
@@ -12,4 +12,5 @@ export declare const Input: React.ForwardRefExoticComponent<React.InputHTMLAttri
12
12
  export declare const TextArea: React.ForwardRefExoticComponent<React.TextareaHTMLAttributes<HTMLTextAreaElement> & React.RefAttributes<HTMLTextAreaElement>>;
13
13
  /** Raw string and selection stay untouched; host parses/validates precision on submit. */
14
14
  export declare const AmountInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> & React.RefAttributes<HTMLInputElement>>;
15
+ /** The magnifying glass sits inset on the leading edge; the input keeps the ref, class and every prop. Marked pure so a bundle that imports another field drops the icon. */
15
16
  export declare const SearchInput: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
@@ -16,4 +16,5 @@ export const Input = forwardRef(function Input(props, ref) { const field = useCo
16
16
  export const TextArea = forwardRef(function TextArea(props, ref) { const field = useContext(Context); return _jsx("textarea", { id: field.id || undefined, "aria-describedby": field.description, "aria-invalid": field.invalid || undefined, required: field.required, ...props, disabled: !!field.disabled || props.disabled, ref: ref, className: `hig-input ${props.className ?? ''}` }); });
17
17
  /** Raw string and selection stay untouched; host parses/validates precision on submit. */
18
18
  export const AmountInput = forwardRef(function AmountInput(props, ref) { return _jsx(Input, { ...props, ref: ref, type: 'text', inputMode: props.inputMode ?? 'decimal' }); });
19
- export const SearchInput = forwardRef(function SearchInput(props, ref) { return _jsx(Input, { ...props, ref: ref, type: 'search' }); });
19
+ /** The magnifying glass sits inset on the leading edge; the input keeps the ref, class and every prop. Marked pure so a bundle that imports another field drops the icon. */
20
+ export const SearchInput = /* @__PURE__ */ forwardRef(function SearchInput(props, ref) { return _jsxs("span", { className: 'hig-search-input', children: [_jsxs("svg", { className: 'hig-search-icon', "aria-hidden": 'true', focusable: 'false', viewBox: '0 0 20 20', children: [_jsx("circle", { cx: '9', cy: '9', r: '5.25' }), _jsx("path", { d: 'm13 13 3.5 3.5' })] }), _jsx(Input, { type: 'search', ...props, ref: ref })] }); });