@jobber/components-native 0.101.5 → 0.101.6
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/dist/docs/ActionItem/ActionItem.md +65 -0
- package/dist/docs/ActionItemGroup/ActionItemGroup.md +33 -0
- package/dist/docs/ActionLabel/ActionLabel.md +43 -0
- package/dist/docs/ActivityIndicator/ActivityIndicator.md +116 -0
- package/dist/docs/Animation/Animation.md +71 -0
- package/dist/docs/AtlantisThemeContext/AtlantisThemeContext.md +256 -0
- package/dist/docs/AutoLink/AutoLink.md +47 -0
- package/dist/docs/Banner/Banner.md +390 -0
- package/dist/docs/Borders/Borders.md +45 -0
- package/dist/docs/BottomSheet/BottomSheet.md +67 -0
- package/dist/docs/Button/Button.md +918 -0
- package/dist/docs/ButtonGroup/ButtonGroup.md +89 -0
- package/dist/docs/Card/Card.md +270 -0
- package/dist/docs/Checkbox/Checkbox.md +69 -0
- package/dist/docs/Chip/Chip.md +371 -0
- package/dist/docs/Colors/Colors.md +217 -0
- package/dist/docs/Content/Content.md +67 -0
- package/dist/docs/ContentOverlay/ContentOverlay.md +64 -0
- package/dist/docs/Disclosure/Disclosure.md +161 -0
- package/dist/docs/Divider/Divider.md +84 -0
- package/dist/docs/Elevations/Elevations.md +76 -0
- package/dist/docs/EmptyState/EmptyState.md +72 -0
- package/dist/docs/Flex/Flex.md +37 -0
- package/dist/docs/Form/Form.md +126 -0
- package/dist/docs/FormField/FormField.md +57 -0
- package/dist/docs/FormatFile/FormatFile.md +56 -0
- package/dist/docs/Glimmer/Glimmer.md +143 -0
- package/dist/docs/Heading/Heading.md +132 -0
- package/dist/docs/Icon/Icon.md +585 -0
- package/dist/docs/IconButton/IconButton.md +25 -0
- package/dist/docs/InputCurrency/InputCurrency.md +61 -0
- package/dist/docs/InputDate/InputDate.md +133 -0
- package/dist/docs/InputEmail/InputEmail.md +69 -0
- package/dist/docs/InputFieldWrapper/InputFieldWrapper.md +70 -0
- package/dist/docs/InputNumber/InputNumber.md +72 -0
- package/dist/docs/InputPassword/InputPassword.md +61 -0
- package/dist/docs/InputPressable/InputPressable.md +64 -0
- package/dist/docs/InputSearch/InputSearch.md +49 -0
- package/dist/docs/InputText/InputText.md +324 -0
- package/dist/docs/InputTime/InputTime.md +54 -0
- package/dist/docs/Opacity/Opacity.md +12 -0
- package/dist/docs/ProgressBar/ProgressBar.md +39 -0
- package/dist/docs/Radii/Radii.md +23 -0
- package/dist/docs/ResponsiveBreakpoint/ResponsiveBreakpoint.md +74 -0
- package/dist/docs/Select/Select.md +213 -0
- package/dist/docs/Spacing/Spacing.md +103 -0
- package/dist/docs/StatusLabel/StatusLabel.md +119 -0
- package/dist/docs/Switch/Switch.md +54 -0
- package/dist/docs/Text/Text.md +368 -0
- package/dist/docs/TextList/TextList.md +29 -0
- package/dist/docs/ThumbnailList/ThumbnailList.md +16 -0
- package/dist/docs/Toast/Toast.md +71 -0
- package/dist/docs/Typography/Typography.md +170 -0
- package/dist/docs/choosing-components/choosing-components.md +76 -0
- package/dist/docs/customizing-components/customizing-components.md +167 -0
- package/dist/docs/disabled-states/disabled-states.md +86 -0
- package/dist/docs/empty-states/empty-states.md +126 -0
- package/dist/docs/errors/errors.md +114 -0
- package/dist/docs/index.md +64 -0
- package/dist/docs/interaction/interaction.md +109 -0
- package/dist/docs/page-layouts/page-layouts.md +323 -0
- package/dist/docs/scaffolding/scaffolding.md +109 -0
- package/dist/docs/settings/settings.md +58 -0
- package/dist/docs/usage-guidelines/usage-guidelines.md +177 -0
- package/dist/package.json +8 -4
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -4
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
# Icon
|
|
2
|
+
|
|
3
|
+
Icons are used to visually represent an idea or action. They can act as
|
|
4
|
+
wayfinding tools to orient users in the product, and identify common
|
|
5
|
+
interactions.
|
|
6
|
+
|
|
7
|
+
> **NOTICE:** Looking to add a new Icon to Atlantis? Read the [Adding an
|
|
8
|
+
> icon](../guides/adding-an-icon) guide before you get started.
|
|
9
|
+
|
|
10
|
+
## Design & usage guidelines
|
|
11
|
+
|
|
12
|
+
Icons should generally be paired with a label to help users understand the
|
|
13
|
+
meaning. If you want to use an Icon without a label, test with users to ensure
|
|
14
|
+
it's clear what the Icon represents.
|
|
15
|
+
|
|
16
|
+
In cases where a label may not be feasible space-wise, use a Tooltip to provide
|
|
17
|
+
contextual support.
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
import React from "react";
|
|
21
|
+
import { Icon } from "@jobber/components/Icon";
|
|
22
|
+
import { Tooltip } from "@jobber/components/Tooltip";
|
|
23
|
+
|
|
24
|
+
export function IconTooltipExample() {
|
|
25
|
+
return (
|
|
26
|
+
<div
|
|
27
|
+
style={{
|
|
28
|
+
display: "flex",
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
gap: "var(--space-large)",
|
|
31
|
+
}}
|
|
32
|
+
>
|
|
33
|
+
<Tooltip message="Search">
|
|
34
|
+
<Icon name="search" />
|
|
35
|
+
</Tooltip>
|
|
36
|
+
<Tooltip message="Support">
|
|
37
|
+
<Icon name="help" />
|
|
38
|
+
</Tooltip>
|
|
39
|
+
<Tooltip message="Settings">
|
|
40
|
+
<Icon name="cog" />
|
|
41
|
+
</Tooltip>
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Status
|
|
48
|
+
|
|
49
|
+
Icons are commonly paired with status messages to help the user quickly
|
|
50
|
+
understand the state of the application.
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
import React from "react";
|
|
54
|
+
import { Icon } from "@jobber/components/Icon";
|
|
55
|
+
import { Content } from "@jobber/components/Content";
|
|
56
|
+
import { Text } from "@jobber/components/Text";
|
|
57
|
+
|
|
58
|
+
export function IconStatusExample() {
|
|
59
|
+
return (
|
|
60
|
+
<Content spacing="larger">
|
|
61
|
+
<div
|
|
62
|
+
style={{
|
|
63
|
+
display: "flex",
|
|
64
|
+
alignItems: "center",
|
|
65
|
+
gap: "var(--space-small)",
|
|
66
|
+
}}
|
|
67
|
+
>
|
|
68
|
+
<Icon name="alert" color="critical" />
|
|
69
|
+
<Content spacing="smallest">
|
|
70
|
+
<Text variation="error">Something has gone wrong</Text>
|
|
71
|
+
</Content>
|
|
72
|
+
</div>
|
|
73
|
+
<div
|
|
74
|
+
style={{
|
|
75
|
+
display: "flex",
|
|
76
|
+
alignItems: "center",
|
|
77
|
+
gap: "var(--space-small)",
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
<Icon name="warning" color="warning" />
|
|
81
|
+
<Content spacing="smallest">
|
|
82
|
+
<Text variation="warn">Something could go wrong</Text>
|
|
83
|
+
</Content>
|
|
84
|
+
</div>
|
|
85
|
+
<div
|
|
86
|
+
style={{
|
|
87
|
+
display: "flex",
|
|
88
|
+
alignItems: "center",
|
|
89
|
+
gap: "var(--space-small)",
|
|
90
|
+
}}
|
|
91
|
+
>
|
|
92
|
+
<Icon name="info" color="informative" />
|
|
93
|
+
<Content spacing="smallest">
|
|
94
|
+
<Text variation="info">Something is happening</Text>
|
|
95
|
+
</Content>
|
|
96
|
+
</div>
|
|
97
|
+
<div
|
|
98
|
+
style={{
|
|
99
|
+
display: "flex",
|
|
100
|
+
alignItems: "center",
|
|
101
|
+
gap: "var(--space-small)",
|
|
102
|
+
}}
|
|
103
|
+
>
|
|
104
|
+
<Icon name="checkmark" />
|
|
105
|
+
<Content spacing="smallest">
|
|
106
|
+
<Text variation="success">Something succeeded</Text>
|
|
107
|
+
</Content>
|
|
108
|
+
</div>
|
|
109
|
+
</Content>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Sizes
|
|
115
|
+
|
|
116
|
+
```tsx
|
|
117
|
+
import React from "react";
|
|
118
|
+
import { Icon } from "@jobber/components/Icon";
|
|
119
|
+
import { Content } from "@jobber/components/Content";
|
|
120
|
+
import { Text } from "@jobber/components/Text";
|
|
121
|
+
|
|
122
|
+
export function IconSizesExample() {
|
|
123
|
+
return (
|
|
124
|
+
<Content spacing="larger">
|
|
125
|
+
<div
|
|
126
|
+
style={{
|
|
127
|
+
display: "flex",
|
|
128
|
+
alignItems: "center",
|
|
129
|
+
gap: "var(--space-large)",
|
|
130
|
+
}}
|
|
131
|
+
>
|
|
132
|
+
<Icon name="search" size="small" />
|
|
133
|
+
<Content spacing="smallest">
|
|
134
|
+
<Text>Small</Text>
|
|
135
|
+
<Text size="small" variation="subdued">
|
|
136
|
+
When space is severely constrained
|
|
137
|
+
</Text>
|
|
138
|
+
</Content>
|
|
139
|
+
</div>
|
|
140
|
+
<div
|
|
141
|
+
style={{
|
|
142
|
+
display: "flex",
|
|
143
|
+
alignItems: "center",
|
|
144
|
+
gap: "var(--space-base)",
|
|
145
|
+
}}
|
|
146
|
+
>
|
|
147
|
+
<Icon name="search" />
|
|
148
|
+
<Content spacing="smallest">
|
|
149
|
+
<Text>Base</Text>
|
|
150
|
+
<Text size="small" variation="subdued">
|
|
151
|
+
For most icon usage
|
|
152
|
+
</Text>
|
|
153
|
+
</Content>
|
|
154
|
+
</div>
|
|
155
|
+
<div
|
|
156
|
+
style={{
|
|
157
|
+
display: "flex",
|
|
158
|
+
alignItems: "center",
|
|
159
|
+
gap: "var(--space-small)",
|
|
160
|
+
}}
|
|
161
|
+
>
|
|
162
|
+
<Icon name="search" size="large" />
|
|
163
|
+
<Content spacing="smallest">
|
|
164
|
+
<Text>Large</Text>
|
|
165
|
+
<Text size="small" variation="subdued">
|
|
166
|
+
When the icon is prominently featured in the interface
|
|
167
|
+
</Text>
|
|
168
|
+
</Content>
|
|
169
|
+
</div>
|
|
170
|
+
</Content>
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Related components
|
|
176
|
+
|
|
177
|
+
* [Button](../Button/Button.md)
|
|
178
|
+
* [IconButton](../IconButton/IconButton.md) (mobile-only)
|
|
179
|
+
* [Banner](../Banner/Banner.md)
|
|
180
|
+
|
|
181
|
+
## Accessibility
|
|
182
|
+
|
|
183
|
+
* Icons are a visual supplement, so they should not be used as the only means of
|
|
184
|
+
conveying information
|
|
185
|
+
* Ensure icons are paired with a label if they are used as a standalone
|
|
186
|
+
element
|
|
187
|
+
* When used in an icon-only Button, provide an aria-label and use a Tooltip
|
|
188
|
+
|
|
189
|
+
## Available icons
|
|
190
|
+
|
|
191
|
+
### Arrows
|
|
192
|
+
|
|
193
|
+
| Icon | `Name` |
|
|
194
|
+
| :--- | :----------------- |
|
|
195
|
+
| | `arrowDown` |
|
|
196
|
+
| | `arrowLeft` |
|
|
197
|
+
| | `arrowRight` |
|
|
198
|
+
| | `arrowUp` |
|
|
199
|
+
| | `longArrowDown` |
|
|
200
|
+
| | `longArrowLeft` |
|
|
201
|
+
| | `longArrowRight` |
|
|
202
|
+
| | `longArrowUp` |
|
|
203
|
+
| | `longArrowUpRight` |
|
|
204
|
+
|
|
205
|
+
### Calendar & scheduling
|
|
206
|
+
|
|
207
|
+
| Icon | `Name` |
|
|
208
|
+
| :--- | :---------------------- |
|
|
209
|
+
| | `afterDate` |
|
|
210
|
+
| | `availability` |
|
|
211
|
+
| | `beforeDate` |
|
|
212
|
+
| | `calendar` |
|
|
213
|
+
| | `clearFilters` |
|
|
214
|
+
| | `event` |
|
|
215
|
+
| | `onlineBooking` |
|
|
216
|
+
| | `orientationHorizontal` |
|
|
217
|
+
| | `orientationVertical` |
|
|
218
|
+
| | `schedule` |
|
|
219
|
+
| | `task` |
|
|
220
|
+
| | `timeline` |
|
|
221
|
+
| | `today` |
|
|
222
|
+
| | `userConfirmed` |
|
|
223
|
+
| | `recurring` |
|
|
224
|
+
| | `sliderStart` |
|
|
225
|
+
| | `sliderCenter` |
|
|
226
|
+
|
|
227
|
+
### Files
|
|
228
|
+
|
|
229
|
+
| Icon | `Name` |
|
|
230
|
+
| :--- | :---------- |
|
|
231
|
+
| | `addNote` |
|
|
232
|
+
| | `archive` |
|
|
233
|
+
| | `excel` |
|
|
234
|
+
| | `file` |
|
|
235
|
+
| | `note` |
|
|
236
|
+
| | `pdf` |
|
|
237
|
+
| | `video` |
|
|
238
|
+
| | `word` |
|
|
239
|
+
| | `upload` |
|
|
240
|
+
| | `image` |
|
|
241
|
+
| | `paperclip` |
|
|
242
|
+
|
|
243
|
+
### Forms
|
|
244
|
+
|
|
245
|
+
| Icon | `Name` |
|
|
246
|
+
| :--- | :------------- |
|
|
247
|
+
| | `checkbox` |
|
|
248
|
+
| | `checklist` |
|
|
249
|
+
| | `edit` |
|
|
250
|
+
| | `editDisabled` |
|
|
251
|
+
| | `radioButton` |
|
|
252
|
+
| | `star` |
|
|
253
|
+
| | `starHalf` |
|
|
254
|
+
| | `starFill` |
|
|
255
|
+
| | `text` |
|
|
256
|
+
| | `textBox` |
|
|
257
|
+
| | `textField` |
|
|
258
|
+
| | `toggle` |
|
|
259
|
+
| | `dropdown` |
|
|
260
|
+
| | `trash` |
|
|
261
|
+
|
|
262
|
+
### Status and support
|
|
263
|
+
|
|
264
|
+
| Icon | `Name` |
|
|
265
|
+
| :--- | :-------- |
|
|
266
|
+
| | `alert` |
|
|
267
|
+
| | `warning` |
|
|
268
|
+
| | `info` |
|
|
269
|
+
| | `help` |
|
|
270
|
+
| | `knot` |
|
|
271
|
+
|
|
272
|
+
### Map
|
|
273
|
+
|
|
274
|
+
| Icon | `Name` |
|
|
275
|
+
| :--- | :----------- |
|
|
276
|
+
| | `address` |
|
|
277
|
+
| | `moveMarker` |
|
|
278
|
+
| | `property` |
|
|
279
|
+
| | `directions` |
|
|
280
|
+
| | `map` |
|
|
281
|
+
|
|
282
|
+
### Messaging
|
|
283
|
+
|
|
284
|
+
| Icon | `Name` |
|
|
285
|
+
| :--- | :------------ |
|
|
286
|
+
| | `chat` |
|
|
287
|
+
| | `email` |
|
|
288
|
+
| | `markSent` |
|
|
289
|
+
| | `reminder` |
|
|
290
|
+
| | `sms` |
|
|
291
|
+
| | `sms2` |
|
|
292
|
+
| | `sendMessage` |
|
|
293
|
+
| | `compose` |
|
|
294
|
+
| | `marketing` |
|
|
295
|
+
|
|
296
|
+
### User
|
|
297
|
+
|
|
298
|
+
| Icon | `Name` |
|
|
299
|
+
| :--- | :-------------------- |
|
|
300
|
+
| | `clients` |
|
|
301
|
+
| | `person` |
|
|
302
|
+
| | `company` |
|
|
303
|
+
| | `franchiseIndividual` |
|
|
304
|
+
| | `franchiseGroup` |
|
|
305
|
+
| | `user` |
|
|
306
|
+
| | `userSwitch` |
|
|
307
|
+
| | `userUnassigned` |
|
|
308
|
+
| | `vcard` |
|
|
309
|
+
|
|
310
|
+
### Social media
|
|
311
|
+
|
|
312
|
+
| Icon | `Name` |
|
|
313
|
+
| :--- | :----------- |
|
|
314
|
+
| | `angieslist` |
|
|
315
|
+
| | `facebook` |
|
|
316
|
+
| | `googlePlay` |
|
|
317
|
+
| | `google` |
|
|
318
|
+
| | `instagram` |
|
|
319
|
+
| | `linkedIn` |
|
|
320
|
+
| | `twitter` |
|
|
321
|
+
| | `yelp` |
|
|
322
|
+
| | `youtube` |
|
|
323
|
+
| | `embed` |
|
|
324
|
+
|
|
325
|
+
### Transaction
|
|
326
|
+
|
|
327
|
+
| Icon | `Name` |
|
|
328
|
+
| :--- | :------------------- |
|
|
329
|
+
| | `bank` |
|
|
330
|
+
| | `payment` |
|
|
331
|
+
| | `percent` |
|
|
332
|
+
| | `wallet` |
|
|
333
|
+
| | `money` |
|
|
334
|
+
| | `transfer` |
|
|
335
|
+
| | `jobberCardReader` |
|
|
336
|
+
| | `contactlessPayment` |
|
|
337
|
+
| | `cheque` |
|
|
338
|
+
| | `cash` |
|
|
339
|
+
|
|
340
|
+
### Work
|
|
341
|
+
|
|
342
|
+
| Icon | `Name` |
|
|
343
|
+
| :--- | :------------- |
|
|
344
|
+
| | `break` |
|
|
345
|
+
| | `chemical` |
|
|
346
|
+
| | `clockIn` |
|
|
347
|
+
| | `clockOut` |
|
|
348
|
+
| | `expense` |
|
|
349
|
+
| | `office` |
|
|
350
|
+
| | `supplies` |
|
|
351
|
+
| | `timer` |
|
|
352
|
+
| | `work` |
|
|
353
|
+
| | `runningTimer` |
|
|
354
|
+
|
|
355
|
+
### Request
|
|
356
|
+
|
|
357
|
+
| Icon | `Name` |
|
|
358
|
+
| :--- | :-------- |
|
|
359
|
+
| | `request` |
|
|
360
|
+
|
|
361
|
+
### Quote
|
|
362
|
+
|
|
363
|
+
| Icon | `Name` |
|
|
364
|
+
| :--- | :------ |
|
|
365
|
+
| | `quote` |
|
|
366
|
+
|
|
367
|
+
### Job
|
|
368
|
+
|
|
369
|
+
| Icon | `Name` |
|
|
370
|
+
| :--- | :----------- |
|
|
371
|
+
| | `job` |
|
|
372
|
+
| | `jobOnHold` |
|
|
373
|
+
| | `moveVisits` |
|
|
374
|
+
| | `visit` |
|
|
375
|
+
|
|
376
|
+
### Invoice
|
|
377
|
+
|
|
378
|
+
| Icon | `Name` |
|
|
379
|
+
| :--- | :------------- |
|
|
380
|
+
| | `badInvoice` |
|
|
381
|
+
| | `invoice` |
|
|
382
|
+
| | `invoiceLater` |
|
|
383
|
+
| | `paidInvoice` |
|
|
384
|
+
| | `sendInvoice` |
|
|
385
|
+
|
|
386
|
+
### Fleet management
|
|
387
|
+
|
|
388
|
+
| Icon | `Name` |
|
|
389
|
+
| :--- | :-------- |
|
|
390
|
+
| | `truck` |
|
|
391
|
+
| | `speed` |
|
|
392
|
+
| | `wheel` |
|
|
393
|
+
| | `battery` |
|
|
394
|
+
| | `fuel` |
|
|
395
|
+
| | `engine` |
|
|
396
|
+
|
|
397
|
+
### System actions
|
|
398
|
+
|
|
399
|
+
| Icon | `Name` |
|
|
400
|
+
| :--- | :--------------- |
|
|
401
|
+
| | `add` |
|
|
402
|
+
| | `addTag` |
|
|
403
|
+
| | `automate` |
|
|
404
|
+
| | `batch` |
|
|
405
|
+
| | `condition` |
|
|
406
|
+
| | `copy` |
|
|
407
|
+
| | `customize` |
|
|
408
|
+
| | `download` |
|
|
409
|
+
| | `drag` |
|
|
410
|
+
| | `dragHorizontal` |
|
|
411
|
+
| | `embed` |
|
|
412
|
+
| | `export` |
|
|
413
|
+
| | `filter` |
|
|
414
|
+
| | `future` |
|
|
415
|
+
| | `import` |
|
|
416
|
+
| | `redo` |
|
|
417
|
+
| | `remove` |
|
|
418
|
+
| | `search` |
|
|
419
|
+
| | `sort` |
|
|
420
|
+
| | `sync` |
|
|
421
|
+
| | `syncAlert` |
|
|
422
|
+
| | `tag` |
|
|
423
|
+
| | `updateStatus` |
|
|
424
|
+
|
|
425
|
+
### Other
|
|
426
|
+
|
|
427
|
+
| Icon | `Name` |
|
|
428
|
+
| :--- | :---------------- |
|
|
429
|
+
| | `apps` |
|
|
430
|
+
| | `at` |
|
|
431
|
+
| | `camera` |
|
|
432
|
+
| | `checkmark` |
|
|
433
|
+
| | `checkmarkCircle` |
|
|
434
|
+
| | `circle` |
|
|
435
|
+
| | `cog` |
|
|
436
|
+
| | `dashboard` |
|
|
437
|
+
| | `desktop` |
|
|
438
|
+
| | `website` |
|
|
439
|
+
| | `eye` |
|
|
440
|
+
| | `eyeCrossed` |
|
|
441
|
+
| | `flash` |
|
|
442
|
+
| | `flashAuto` |
|
|
443
|
+
| | `flashOff` |
|
|
444
|
+
| | `gift` |
|
|
445
|
+
| | `grid` |
|
|
446
|
+
| | `happyFace` |
|
|
447
|
+
| | `headset` |
|
|
448
|
+
| | `home` |
|
|
449
|
+
| | `link` |
|
|
450
|
+
| | `loadingCheck` |
|
|
451
|
+
| | `lock` |
|
|
452
|
+
| | `logout` |
|
|
453
|
+
| | `measurement` |
|
|
454
|
+
| | `menu` |
|
|
455
|
+
| | `microphone` |
|
|
456
|
+
| | `microphoneMuted` |
|
|
457
|
+
| | `mobile` |
|
|
458
|
+
| | `more` |
|
|
459
|
+
| | `number` |
|
|
460
|
+
| | `offline` |
|
|
461
|
+
| | `phone` |
|
|
462
|
+
| | `pinned` |
|
|
463
|
+
| | `presentation` |
|
|
464
|
+
| | `priceTag` |
|
|
465
|
+
| | `quickbooks` |
|
|
466
|
+
| | `reports` |
|
|
467
|
+
| | `shape` |
|
|
468
|
+
| | `sidebar` |
|
|
469
|
+
| | `signature` |
|
|
470
|
+
| | `sneaker` |
|
|
471
|
+
| | `sparkles` |
|
|
472
|
+
| | `sprout` |
|
|
473
|
+
| | `starburst` |
|
|
474
|
+
| | `sun` |
|
|
475
|
+
| | `tableColumns` |
|
|
476
|
+
| | `thumbsDown` |
|
|
477
|
+
| | `thumbsUp` |
|
|
478
|
+
| | `unPinned` |
|
|
479
|
+
| | `xero` |
|
|
480
|
+
|
|
481
|
+
### Legacy
|
|
482
|
+
|
|
483
|
+
| Icon | `Name` |
|
|
484
|
+
| :--- | :------- |
|
|
485
|
+
| | `apple` |
|
|
486
|
+
| | `cross` |
|
|
487
|
+
| | `list` |
|
|
488
|
+
| | `minus` |
|
|
489
|
+
| | `minus2` |
|
|
490
|
+
| | `plus` |
|
|
491
|
+
| | `plus2` |
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
## Component customization
|
|
495
|
+
|
|
496
|
+
### UNSAFE\_ props (advanced usage)
|
|
497
|
+
|
|
498
|
+
General information for using `UNSAFE_` props can be found
|
|
499
|
+
[here](../customizing-components/customizing-components.md).
|
|
500
|
+
|
|
501
|
+
**Note**: Use of `UNSAFE_` props is **at your own risk** and should be
|
|
502
|
+
considered a **last resort**. Future Icon updates may lead to unintended
|
|
503
|
+
breakages.
|
|
504
|
+
|
|
505
|
+
Icon has two elements that can be targeted with classes or styles:
|
|
506
|
+
|
|
507
|
+
* `svg`: The container element of the icon
|
|
508
|
+
* `path`: The actual shape and color of the icon
|
|
509
|
+
|
|
510
|
+
#### UNSAFE\_className (web)
|
|
511
|
+
|
|
512
|
+
Use `UNSAFE_className` to apply custom classes to the Icon. This can be useful
|
|
513
|
+
for applying styles via CSS Modules.
|
|
514
|
+
|
|
515
|
+
```tsx
|
|
516
|
+
// Icon.tsx
|
|
517
|
+
UNSAFE_className={{
|
|
518
|
+
svg: styles.iconContainer,
|
|
519
|
+
path: styles.iconPath,
|
|
520
|
+
}}
|
|
521
|
+
|
|
522
|
+
// Icon.module.css
|
|
523
|
+
.iconContainer {
|
|
524
|
+
padding: var(--space-small);
|
|
525
|
+
border-radius: var(--radius-large);
|
|
526
|
+
background-color: var(--color-purple);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.iconPath {
|
|
530
|
+
fill: var(--color-orange);
|
|
531
|
+
}
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
Using `UNSAFE_className` for modifying the icon's dimensions (width, height) may
|
|
535
|
+
not work as expected. For size modifications, use `UNSAFE_style.svg` instead.
|
|
536
|
+
|
|
537
|
+
#### UNSAFE\_style (web)
|
|
538
|
+
|
|
539
|
+
The `UNSAFE_style` prop provides granular control over the icon's appearance
|
|
540
|
+
through inline styles, allowing you to modify the dimensions and colors
|
|
541
|
+
independently.
|
|
542
|
+
|
|
543
|
+
```tsx
|
|
544
|
+
<Icon
|
|
545
|
+
name="arrowDown"
|
|
546
|
+
UNSAFE_style={{
|
|
547
|
+
svg: {
|
|
548
|
+
width: "48px",
|
|
549
|
+
height: "48px",
|
|
550
|
+
backgroundColor: "var(--color-purple)",
|
|
551
|
+
padding: "var(--space-small)",
|
|
552
|
+
borderRadius: "var(--radius-large)",
|
|
553
|
+
},
|
|
554
|
+
path: {
|
|
555
|
+
fill: "orange",
|
|
556
|
+
},
|
|
557
|
+
}}
|
|
558
|
+
/>
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
##### Key styling notes:
|
|
562
|
+
|
|
563
|
+
* To modify icon dimensions, use `UNSAFE_style.svg` with both `width` and
|
|
564
|
+
`height`
|
|
565
|
+
* To override an icon's color, use `fill` in the `path` styles, instead of
|
|
566
|
+
`color`
|
|
567
|
+
* Container styling (background, padding, border) should be applied to the `svg`
|
|
568
|
+
styles
|
|
569
|
+
|
|
570
|
+
Remember that the standard `size` prop is the recommended way to control icon
|
|
571
|
+
dimensions. Only use `UNSAFE_style.svg` for custom sizing when absolutely
|
|
572
|
+
necessary.
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
## Props
|
|
576
|
+
|
|
577
|
+
### Mobile
|
|
578
|
+
|
|
579
|
+
| Prop | Type | Required | Default | Description |
|
|
580
|
+
|------|------|----------|---------|-------------|
|
|
581
|
+
| `name` | `IconNames` | Yes | — | The icon to show. |
|
|
582
|
+
| `color` | `"task" | "text" | "warning" | "icon" | "white" | "grey" | "greyBlue" | "greyBlueDark" | "greyBlueLighter" | "blue" | "lightBlue" | "green" | "yellow" | "red" | "navy" | "orange" | ... 33 more ... | "brandHighlight"` | No | — | Determines the color of the icon. If not specified, some icons have a default system colour like quotes, jobs, and in... |
|
|
583
|
+
| `customColor` | `string` | No | — | Sets a custom color for the icon. Can be a rgb() or hex value. |
|
|
584
|
+
| `size` | `"small" | "base" | "large"` | No | `base` | Changes the size to small or large. |
|
|
585
|
+
| `testID` | `string` | No | — | Used to locate this view in end-to-end tests |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Icon Button
|
|
2
|
+
|
|
3
|
+
IconButtons are used to create pressable components (buttons) that render an
|
|
4
|
+
Icon. IconButtons are used for navigation between different screens or
|
|
5
|
+
performing core actions.
|
|
6
|
+
|
|
7
|
+
Please read the [Icon](../Icon/Icon.md) documentation for more information
|
|
8
|
+
regarding which icons to use.
|
|
9
|
+
|
|
10
|
+
## Mockup
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
### Mobile
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Required | Default | Description |
|
|
18
|
+
|------|------|----------|---------|-------------|
|
|
19
|
+
| `accessibilityLabel` | `string` | Yes | — | Accessibilty label for the component. It's also used for testing |
|
|
20
|
+
| `name` | `IconNames` | Yes | — | The icon to show. |
|
|
21
|
+
| `badge` | `ReactNode` | No | — | a component that would render over the icon e.g. the number of notifications over the activity feed icon |
|
|
22
|
+
| `color` | `"task" | "text" | "warning" | "icon" | "white" | "grey" | "greyBlue" | "greyBlueDark" | "greyBlueLighter" | "blue" | "lightBlue" | "green" | "yellow" | "red" | "navy" | "orange" | ... 33 more ... | "brandHighlight"` | No | — | Determines the color of the icon. If not specified, some icons have a default system colour like quotes, jobs, and in... |
|
|
23
|
+
| `customColor` | `string` | No | — | Sets a custom color for the icon. Can be a rgb() or hex value. |
|
|
24
|
+
| `onPress` | `() => void` | No | — | Press handler |
|
|
25
|
+
| `testID` | `string` | No | — | Used to locate this button in tests |
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Input Currency
|
|
2
|
+
|
|
3
|
+
InputCurrency is a component that displays a currency input field with a
|
|
4
|
+
currency symbol.
|
|
5
|
+
|
|
6
|
+
## Design & usage guidelines
|
|
7
|
+
|
|
8
|
+
InputCurrency defaults to displaying a minimum of two decimal places and a
|
|
9
|
+
maximum of five decimal places. If a user continues to try and enter numbers
|
|
10
|
+
beyond the `maxDecimalPlaces` default or set number, the component will
|
|
11
|
+
automatically round the value to the nearest two decimal places.
|
|
12
|
+
|
|
13
|
+
By setting `showCurrencySymbol` to true, the users currency prefix will be
|
|
14
|
+
displayed to them.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Props
|
|
18
|
+
|
|
19
|
+
### Mobile
|
|
20
|
+
|
|
21
|
+
| Prop | Type | Required | Default | Description |
|
|
22
|
+
|------|------|----------|---------|-------------|
|
|
23
|
+
| `accessibilityHint` | `string` | No | — | An accessibility hint helps users understand what will happen when they perform an action on the accessibility elemen... |
|
|
24
|
+
| `accessibilityLabel` | `string` | No | — | VoiceOver will read this string when a user selects the associated element |
|
|
25
|
+
| `assistiveText` | `string` | No | — | Text that helps the user understand the input |
|
|
26
|
+
| `autoCapitalize` | `"characters" | "words" | "sentences" | "none"` | No | — | Determines where to autocapitalize |
|
|
27
|
+
| `autoComplete` | `"name" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | ... 45 more ... | "off"` | No | — | Determines which content to suggest on auto complete, e.g.`username`. Default is `off` which disables auto complete ... |
|
|
28
|
+
| `autoCorrect` | `boolean` | No | — | Turn off autocorrect |
|
|
29
|
+
| `autoFocus` | `boolean` | No | — | Automatically focus the input after it is rendered |
|
|
30
|
+
| `clearable` | `Clearable` | No | — | Add a clear action on the input that clears the value. You should always use `while-editing` if you want the input t... |
|
|
31
|
+
| `decimalPlaces` | `number` | No | — | The minimum decimal places for the currency number Default value is 2 |
|
|
32
|
+
| `defaultValue` | `number` | No | — | |
|
|
33
|
+
| `disabled` | `boolean` | No | — | Disable the input |
|
|
34
|
+
| `invalid` | `string | boolean` | No | — | Highlights the field red and shows message below (if string) to indicate an error |
|
|
35
|
+
| `keyboard` | `"decimal-pad" | "numbers-and-punctuation"` | No | — | |
|
|
36
|
+
| `loading` | `boolean` | No | — | Show loading indicator. |
|
|
37
|
+
| `loadingType` | `"spinner" | "glimmer"` | No | — | Change the type of loading indicator to spinner or glimmer. |
|
|
38
|
+
| `maxDecimalPlaces` | `number` | No | — | The maximum decimal places for the currency number Default value is 5 |
|
|
39
|
+
| `maxLength` | `number` | No | — | The maximum length of the input Default value is 10 |
|
|
40
|
+
| `multiline` | `boolean` | No | — | Determines if inputText will span multiple lines. Default is `false` https://reactnative.dev/docs/textinput#multiline |
|
|
41
|
+
| `name` | `string` | No | — | Name of the input. |
|
|
42
|
+
| `onBlur` | `(event?: FocusEvent) => void` | No | — | Callback that is called when the text input is blurred |
|
|
43
|
+
| `onChange` | `(newValue?: string | number) => void` | No | — | |
|
|
44
|
+
| `onFocus` | `(event?: FocusEvent) => void` | No | — | Callback that is called when the text input is focused @param event |
|
|
45
|
+
| `onSubmitEditing` | `(event?: SyntheticEvent<Element, Event>) => void` | No | — | Callback that is called when the text input's submit button is pressed @param event |
|
|
46
|
+
| `placeholder` | `string` | No | — | Hint text that goes above the value once the field is filled out |
|
|
47
|
+
| `prefix` | `{ icon?: IconNames; label?: string; }` | No | — | Symbol to display before the text input |
|
|
48
|
+
| `readonly` | `boolean` | No | — | Makes the input read-only |
|
|
49
|
+
| `secureTextEntry` | `boolean` | No | — | Use secure text entry |
|
|
50
|
+
| `showCurrencySymbol` | `boolean` | No | — | Whether to display the user's currency symbol or not Default value is true |
|
|
51
|
+
| `showMiniLabel` | `boolean` | No | `true` | Controls the visibility of the mini label that appears inside the input when a value is entered. By default, the plac... |
|
|
52
|
+
| `spellCheck` | `boolean` | No | — | Determines whether spell check is used. Turn it off to hide empty autoCorrect suggestions when autoCorrect is off. *... |
|
|
53
|
+
| `styleOverride` | `InputTextStyleOverride` | No | — | Custom styling to override default style of the input text |
|
|
54
|
+
| `suffix` | `{ icon?: IconNames; label?: string; onPress?: () => void; }` | No | — | Symbol to display after the text input |
|
|
55
|
+
| `testID` | `string` | No | — | Used to locate this view in end-to-end tests |
|
|
56
|
+
| `textContentType` | `"name" | "none" | "nickname" | "password" | "username" | "URL" | "addressCity" | "addressCityAndState" | "addressState" | "countryName" | "creditCardNumber" | "creditCardExpiration" | ... 33 more ... | "shipmentTrackingNumber"` | No | — | Determines which content to suggest on auto complete, e.g.`username`. Default is `none` which disables auto complete ... |
|
|
57
|
+
| `toolbar` | `ReactNode` | No | — | Add a toolbar below the input field for actions like rewriting the text. |
|
|
58
|
+
| `toolbarVisibility` | `"always" | "while-editing"` | No | — | Change the behaviour of when the toolbar becomes visible. |
|
|
59
|
+
| `transform` | `{ input?: (v: any) => string; output?: (v: string) => any; }` | No | — | transform object is used to transform the internal TextInput value It's useful for components like InputNumber where ... |
|
|
60
|
+
| `validations` | `RegisterOptions` | No | — | Shows an error message below the field and highlight the field red when value is invalid |
|
|
61
|
+
| `value` | `number` | No | — | |
|