@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.
Files changed (67) hide show
  1. package/dist/docs/ActionItem/ActionItem.md +65 -0
  2. package/dist/docs/ActionItemGroup/ActionItemGroup.md +33 -0
  3. package/dist/docs/ActionLabel/ActionLabel.md +43 -0
  4. package/dist/docs/ActivityIndicator/ActivityIndicator.md +116 -0
  5. package/dist/docs/Animation/Animation.md +71 -0
  6. package/dist/docs/AtlantisThemeContext/AtlantisThemeContext.md +256 -0
  7. package/dist/docs/AutoLink/AutoLink.md +47 -0
  8. package/dist/docs/Banner/Banner.md +390 -0
  9. package/dist/docs/Borders/Borders.md +45 -0
  10. package/dist/docs/BottomSheet/BottomSheet.md +67 -0
  11. package/dist/docs/Button/Button.md +918 -0
  12. package/dist/docs/ButtonGroup/ButtonGroup.md +89 -0
  13. package/dist/docs/Card/Card.md +270 -0
  14. package/dist/docs/Checkbox/Checkbox.md +69 -0
  15. package/dist/docs/Chip/Chip.md +371 -0
  16. package/dist/docs/Colors/Colors.md +217 -0
  17. package/dist/docs/Content/Content.md +67 -0
  18. package/dist/docs/ContentOverlay/ContentOverlay.md +64 -0
  19. package/dist/docs/Disclosure/Disclosure.md +161 -0
  20. package/dist/docs/Divider/Divider.md +84 -0
  21. package/dist/docs/Elevations/Elevations.md +76 -0
  22. package/dist/docs/EmptyState/EmptyState.md +72 -0
  23. package/dist/docs/Flex/Flex.md +37 -0
  24. package/dist/docs/Form/Form.md +126 -0
  25. package/dist/docs/FormField/FormField.md +57 -0
  26. package/dist/docs/FormatFile/FormatFile.md +56 -0
  27. package/dist/docs/Glimmer/Glimmer.md +143 -0
  28. package/dist/docs/Heading/Heading.md +132 -0
  29. package/dist/docs/Icon/Icon.md +585 -0
  30. package/dist/docs/IconButton/IconButton.md +25 -0
  31. package/dist/docs/InputCurrency/InputCurrency.md +61 -0
  32. package/dist/docs/InputDate/InputDate.md +133 -0
  33. package/dist/docs/InputEmail/InputEmail.md +69 -0
  34. package/dist/docs/InputFieldWrapper/InputFieldWrapper.md +70 -0
  35. package/dist/docs/InputNumber/InputNumber.md +72 -0
  36. package/dist/docs/InputPassword/InputPassword.md +61 -0
  37. package/dist/docs/InputPressable/InputPressable.md +64 -0
  38. package/dist/docs/InputSearch/InputSearch.md +49 -0
  39. package/dist/docs/InputText/InputText.md +324 -0
  40. package/dist/docs/InputTime/InputTime.md +54 -0
  41. package/dist/docs/Opacity/Opacity.md +12 -0
  42. package/dist/docs/ProgressBar/ProgressBar.md +39 -0
  43. package/dist/docs/Radii/Radii.md +23 -0
  44. package/dist/docs/ResponsiveBreakpoint/ResponsiveBreakpoint.md +74 -0
  45. package/dist/docs/Select/Select.md +213 -0
  46. package/dist/docs/Spacing/Spacing.md +103 -0
  47. package/dist/docs/StatusLabel/StatusLabel.md +119 -0
  48. package/dist/docs/Switch/Switch.md +54 -0
  49. package/dist/docs/Text/Text.md +368 -0
  50. package/dist/docs/TextList/TextList.md +29 -0
  51. package/dist/docs/ThumbnailList/ThumbnailList.md +16 -0
  52. package/dist/docs/Toast/Toast.md +71 -0
  53. package/dist/docs/Typography/Typography.md +170 -0
  54. package/dist/docs/choosing-components/choosing-components.md +76 -0
  55. package/dist/docs/customizing-components/customizing-components.md +167 -0
  56. package/dist/docs/disabled-states/disabled-states.md +86 -0
  57. package/dist/docs/empty-states/empty-states.md +126 -0
  58. package/dist/docs/errors/errors.md +114 -0
  59. package/dist/docs/index.md +64 -0
  60. package/dist/docs/interaction/interaction.md +109 -0
  61. package/dist/docs/page-layouts/page-layouts.md +323 -0
  62. package/dist/docs/scaffolding/scaffolding.md +109 -0
  63. package/dist/docs/settings/settings.md +58 -0
  64. package/dist/docs/usage-guidelines/usage-guidelines.md +177 -0
  65. package/dist/package.json +8 -4
  66. package/dist/tsconfig.build.tsbuildinfo +1 -1
  67. package/package.json +8 -4
@@ -0,0 +1,371 @@
1
+ # Chip
2
+
3
+ Chip is a flexible component that can be used for
4
+
5
+ * inline single- or multi-selection of items
6
+ * triggering filtering and selection components like
7
+ [Combobox](/components/Combobox)
8
+ * presenting grouped items that can be added or removed
9
+
10
+ ```tsx
11
+ import type { ComponentProps } from "react";
12
+ import React from "react";
13
+ import { Chip } from "@jobber/components/Chip";
14
+ import { Avatar } from "@jobber/components/Avatar";
15
+ import { Icon } from "@jobber/components/Icon";
16
+
17
+ export function ChipWithAvatarExample(
18
+ props: Partial<ComponentProps<typeof Chip>>,
19
+ ) {
20
+ return (
21
+ <Chip label="Gavin Messina" {...props}>
22
+ <Chip.Prefix>
23
+ <Avatar
24
+ size="small"
25
+ imageUrl="https://images.unsplash.com/photo-1669475535925-a011d7c31d45?q=80&w=1886&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
26
+ />
27
+ </Chip.Prefix>
28
+ <Chip.Suffix>
29
+ <Icon name="cross" size="small" />
30
+ </Chip.Suffix>
31
+ </Chip>
32
+ );
33
+ }
34
+ ```
35
+
36
+ ## Design & usage guidelines
37
+
38
+ See the
39
+ [Comparison story](/storybook/web/?path=/story/components-selections-chip-comparisons--all)
40
+ for a full overview of potential Chip variants.
41
+
42
+ ### Variations
43
+
44
+ The base variation of Chip should be used in most cases. When a lighter-weight
45
+ approach is desired, use the subtle variation.
46
+
47
+ ```tsx
48
+ import React from "react";
49
+ import { Chip } from "@jobber/components/Chip";
50
+ import { Flex } from "@jobber/components/Flex";
51
+
52
+ export function ChipVariationsExample() {
53
+ return (
54
+ <Flex template={["shrink", "shrink"]} direction="row" gap="small">
55
+ <Chip label="Base" />
56
+ <Chip label="Subtle" variation="subtle" />
57
+ </Flex>
58
+ );
59
+ }
60
+ ```
61
+
62
+ ### Selection
63
+
64
+ Chip allows users to make selections in scenarios where space is at a premium.
65
+ It has three high-level usages: single-select, multi-select, and add/dismiss
66
+ selection.
67
+
68
+ #### Single-select
69
+
70
+ If you need the user to make a selection of a single item from among several
71
+ items, and those items all have short (1–2 word) labels, single-select Chips
72
+ will allow the user to choose one of those items.
73
+
74
+ This preserves vertical space while allowing the user to clearly identify which
75
+ item they have selected.
76
+
77
+ Unlike [Radio](/components/RadioGroup), the selected single-select Chip can be
78
+ de-selected by the user, leaving all selections blank.
79
+
80
+ ```tsx
81
+ import React from "react";
82
+ import { Chip } from "@jobber/components/Chip";
83
+ import { Flex } from "@jobber/components/Flex";
84
+ import { Icon } from "@jobber/components/Icon";
85
+
86
+ export function ChipSingleSelectExample() {
87
+ return (
88
+ <Flex
89
+ template={["shrink", "shrink", "shrink", "shrink"]}
90
+ direction="row"
91
+ gap="small"
92
+ >
93
+ <Chip label="Option 1" variation="subtle" />
94
+ <Chip label="Option 2">
95
+ <Chip.Suffix>
96
+ <Icon name="checkmark" size="small" color="interactiveSubtle" />
97
+ </Chip.Suffix>
98
+ </Chip>
99
+ <Chip label="Option 3" variation="subtle" />
100
+ <Chip label="Option 4" variation="subtle" />
101
+ </Flex>
102
+ );
103
+ }
104
+ ```
105
+
106
+ #### Multi-select
107
+
108
+ If you need the user to make a selection of one *or more* items from amongst
109
+ several items, and those items all have short (1–2 word) labels, a multi-select
110
+ Chips will allow the user to choose as many items from the group as they wish.
111
+
112
+ This preserves vertical space while allowing the user to clearly identify which
113
+ items they have selected. To signify to the user that multiple selections are
114
+ possible, a checkmark icon is present to reinforce the conceptual similarity to
115
+ a [Checkbox](../Checkbox/Checkbox.md).
116
+
117
+ Similar to Checkbox, a selected multi-select Chip can be de-selected by the
118
+ user, leaving all selections blank.
119
+
120
+ ```tsx
121
+ import React from "react";
122
+ import { Chip } from "@jobber/components/Chip";
123
+ import { Flex } from "@jobber/components/Flex";
124
+ import { Icon } from "@jobber/components/Icon";
125
+
126
+ export function ChipMultiSelectExample() {
127
+ return (
128
+ <Flex
129
+ template={["shrink", "shrink", "shrink", "shrink"]}
130
+ direction="row"
131
+ gap="small"
132
+ >
133
+ <Chip label="Option 1">
134
+ <Chip.Suffix>
135
+ <Icon name="checkmark" size="small" color="interactiveSubtle" />
136
+ </Chip.Suffix>
137
+ </Chip>
138
+ <Chip label="Option 2">
139
+ <Chip.Suffix>
140
+ <Icon name="checkmark" size="small" color="interactiveSubtle" />
141
+ </Chip.Suffix>
142
+ </Chip>
143
+ <Chip label="Option 3" variation="subtle" />
144
+ <Chip label="Option 4">
145
+ <Chip.Suffix>
146
+ <Icon name="checkmark" size="small" color="interactiveSubtle" />
147
+ </Chip.Suffix>
148
+ </Chip>
149
+ </Flex>
150
+ );
151
+ }
152
+ ```
153
+
154
+ #### Add/dismiss selection
155
+
156
+ When the user will be selecting one or more items by inputting their own Chip
157
+ options, use a dismissible Chip. Think of a case like team assignment, where the
158
+ user can add multiple users represented as Chips, and click on the dismiss
159
+ suffix of the Chip to remove a user.
160
+
161
+ The dismissible Chip allows them to remove previous selections from the Chips.
162
+ Use this option when the full list of possible selections is too great to
163
+ reasonably display in one group of Chip. For example, "all of my phone contacts"
164
+ would be far too many Chip options to present in one group, and would be
165
+ overwhelming for the user to interpret.
166
+
167
+ ```tsx
168
+ import React from "react";
169
+ import { Chip } from "@jobber/components/Chip";
170
+ import { Flex } from "@jobber/components/Flex";
171
+ import { Icon } from "@jobber/components/Icon";
172
+
173
+ export function ChipAddDismissExample() {
174
+ return (
175
+ <Flex
176
+ template={["shrink", "shrink", "shrink", "shrink", "shrink"]}
177
+ direction="row"
178
+ gap="small"
179
+ >
180
+ <Chip label="Add" variation="subtle">
181
+ <Chip.Suffix>
182
+ <Icon name="add" size="small" color="interactiveSubtle" />
183
+ </Chip.Suffix>
184
+ </Chip>
185
+ <Chip label="Option 1">
186
+ <Chip.Suffix>
187
+ <Icon name="cross" size="small" color="interactiveSubtle" />
188
+ </Chip.Suffix>
189
+ </Chip>
190
+ <Chip label="Option 2">
191
+ <Chip.Suffix>
192
+ <Icon name="cross" size="small" color="interactiveSubtle" />
193
+ </Chip.Suffix>
194
+ </Chip>
195
+ <Chip label="Option 3">
196
+ <Chip.Suffix>
197
+ <Icon name="cross" size="small" color="interactiveSubtle" />
198
+ </Chip.Suffix>
199
+ </Chip>
200
+ <Chip label="Option 4">
201
+ <Chip.Suffix>
202
+ <Icon name="cross" size="small" color="interactiveSubtle" />
203
+ </Chip.Suffix>
204
+ </Chip>
205
+ </Flex>
206
+ );
207
+ }
208
+ ```
209
+
210
+ ### Invalid
211
+
212
+ If something goes awry with a selection or you otherwise need to convey to the
213
+ user that something's gone wrong in relation to the Chip, you can use the
214
+ invalid state.
215
+
216
+ ```tsx
217
+ import type { ComponentProps } from "react";
218
+ import React from "react";
219
+ import { Chip } from "@jobber/components/Chip";
220
+ import { Icon } from "@jobber/components/Icon";
221
+
222
+ export function ChipInvalidExample(
223
+ props: Partial<ComponentProps<typeof Chip>>,
224
+ ) {
225
+ return (
226
+ <Chip label="Select team" invalid {...props}>
227
+ <Chip.Prefix>
228
+ <Icon name="alert" size="small" />
229
+ </Chip.Prefix>
230
+ </Chip>
231
+ );
232
+ }
233
+ ```
234
+
235
+ ## Related components
236
+
237
+ * [Chips](/components/Chips) is a convenience wrapper that offers the
238
+ single-select, multi-select, and add/dismiss functionality "out of the box"
239
+ * [Combobox](/components/Combobox) is most commonly triggered by a Chip, but is
240
+ a separate component
241
+ * [Select](../Select/Select.md) is a simpler single-select "dropdown" that
242
+ presents as a form element and should be preferred in forms
243
+ * [RadioGroup](/components/RadioGroup) should be used to allow the user to
244
+ select "one-of-many" items (single-select) and the labels for the items are
245
+ longer than 1 or 2 words.
246
+ * [Checkbox](../Checkbox/Checkbox.md) should be used to allow the user to select
247
+ "one-or-more-of-many" items (multi-select) and the labels for the items are
248
+ longer than 1 or 2 words.
249
+ * [InlineLabel](/components/InlineLabel) should be used when you just need a
250
+ rounded-rectangular element that displays metadata about an element
251
+
252
+ ## Content guidelines
253
+
254
+ Chip headings and labels for single- or multi-select should be succinct -
255
+ ideally 1–2 words. If any of the options in the group may have longer labels,
256
+ consider Checkbox or Radio as necessary for your selection type.
257
+
258
+ In cases where a Chip displays name of its selections, such as when used to
259
+ trigger a Combobox or a date range selector, use the heading to identify the
260
+ "category" and the label to identify the selected items.
261
+
262
+ ## Accessibility
263
+
264
+ Chips should convey to the user whether it is a "checkbox" or "radio" element
265
+ based on single or multi-select. The Chips in this group have the appropriate
266
+ roles and keyboard operation to allow the user to interact as though they are
267
+ dealing with a checkbox or radio button.
268
+
269
+ If Chips is set for add/dismiss selections, the dismiss button should notify the
270
+ user that they will "dismiss {label name}" upon press.
271
+
272
+ ## Responsiveness
273
+
274
+ The Chips themselves will take up as much space as their container allows, and
275
+ the Chips will flow left to right. Chips may re-flow into new rows, or scroll
276
+ out of view in a single row, depending on your use case.
277
+
278
+ Chip can truncate if its' container is limited in space, but does not inherently
279
+ cap its own width and will default to "hug" its contents.
280
+
281
+
282
+ ## Configuration
283
+
284
+ ### Chip.Prefix
285
+
286
+ When `Chip.Prefix` is provided with an Icon or Avatar as its immediate child,
287
+ default markup and styles are automatically applied. If these styles and markup
288
+ are not desired, or if you would like to provide your own child, you should
289
+ provide your own wrapper element and layout.
290
+
291
+ ```tsx
292
+ import React from "react";
293
+ import { Chip } from "@jobber/components/Chip";
294
+ import { Box } from "@jobber/components/Box";
295
+ import { Icon } from "@jobber/components/Icon";
296
+ import { Text } from "@jobber/components/Text";
297
+ import { StatusLabel } from "@jobber/components/StatusLabel";
298
+
299
+ export function ChipPrefixConfigExample() {
300
+ return (
301
+ <Box direction="column" gap="base">
302
+ <Box direction="row" alignItems="center" gap="base">
303
+ <Chip label="Select team">
304
+ <Chip.Prefix>
305
+ <Icon name="person" size="small" />
306
+ </Chip.Prefix>
307
+ </Chip>
308
+ <Text>Default styling</Text>
309
+ </Box>
310
+ <Box direction="row" alignItems="center" gap="large">
311
+ <Chip label="Select team">
312
+ <Chip.Prefix>
313
+ <div style={{ display: "flex", marginRight: 20 }}>
314
+ <Icon name="person" size="small" />
315
+ </div>
316
+ </Chip.Prefix>
317
+ </Chip>
318
+ <Text>Custom wrapper around Icon to add larger margin</Text>
319
+ </Box>
320
+ <Box direction="row" alignItems="center" gap="base">
321
+ <Chip label="Select team">
322
+ <Chip.Prefix>
323
+ <div style={{ display: "flex", marginRight: 15 }}>
324
+ <StatusLabel status="success" label="Ready" />
325
+ </div>
326
+ </Chip.Prefix>
327
+ </Chip>
328
+ <Text>Custom wrapper around child</Text>
329
+ </Box>
330
+ </Box>
331
+ );
332
+ }
333
+ ```
334
+
335
+ ## Component customization
336
+
337
+ ### Base Chip Color Overrides
338
+
339
+ If you wish to modify the colors of the Base variant, you may do so with CSS
340
+ custom properties (variables).
341
+
342
+ For the resting background color: `--public-chip-base-bg-color`
343
+
344
+ For the hover/focused background color: `--public-chip-base-hover-bg-color`
345
+
346
+ For the text content and miscellaneous content such as the line separator
347
+ between the `label` and `heading`: `--public-chip-base-content-color`
348
+
349
+ ## Developer notes
350
+
351
+ Chip is in the process of being applied to the more opinionated Chips
352
+ convenience wrapper, but by design does not carry the same level of "out of the
353
+ box" functionality as it is a more "atomic" element that can be used outside of
354
+ those more complex selection flows.
355
+
356
+
357
+ ## Props
358
+
359
+ ### Mobile
360
+
361
+ | Prop | Type | Required | Default | Description |
362
+ |------|------|----------|---------|-------------|
363
+ | `isActive` | `boolean` | Yes | — | chip's active status |
364
+ | `accent` | `AccentType` | No | — | Background color to be used for Active chips |
365
+ | `accessibilityLabel` | `string` | No | — | Accessibility label for the component. It's also used for testing |
366
+ | `accessibilityRole` | `AccessibilityRole` | No | `radio` | Accessibility role for the component |
367
+ | `icon` | `IconNames` | No | — | Optional Icon |
368
+ | `inactiveBackgroundColor` | `"surface" | "background"` | No | `background` | Background color to be used for inactive chips |
369
+ | `isDismissible` | `boolean` | No | — | Boolean for chip's ability to be dismissed |
370
+ | `label` | `string` | No | — | label of the chip. |
371
+ | `onPress` | `() => void` | No | — | Press handler |
@@ -0,0 +1,217 @@
1
+ # Colors
2
+
3
+ Color can provide a visual cue for users to navigate and understand an
4
+ interface.
5
+
6
+ Atlantis is built with a
7
+ [semantic layer](https://dev.to/ynab/a-semantic-color-system-the-theory-hk7)
8
+ overtop of a base palette. Use the semantic color values defined in the usage
9
+ guidelines whenever possible to ensure you are using colors for their intended
10
+ purpose.
11
+
12
+ ## Accessibility
13
+
14
+ Color should never be the single means of conveying information in an interface.
15
+ Use labels, iconography, or hints for assistive technology alongside color to
16
+ ensure your content can be understood by everyone.
17
+
18
+ ## Color Token Search
19
+
20
+ ## Design & usage guidelines
21
+
22
+ ### Typography
23
+
24
+ Typographic elements in Jobber should use consistent colors to ensure
25
+ readability.
26
+
27
+ #### Heading
28
+
29
+ Headings have a bold, high-contrast color to cement their hierarchy.
30
+
31
+ #### Text
32
+
33
+ A slightly softer color is used for body text for greater readability.
34
+
35
+ Text that is relevant but less important ("secondary") can be lower-contrast to
36
+ suggest its' reduced importance. This color should only be used when there is
37
+ more important text content already present.
38
+
39
+ ##### Text--Reverse
40
+
41
+ When used against a [reversed surface](#surface--reverse), reversed text should
42
+ be used to maintain readability.
43
+
44
+ Reverse text also has a secondary value following the same rules outlined for
45
+ standard secondary text.
46
+
47
+ ### Interactions
48
+
49
+ Use these colors in buttons and form controls to communicate the presence and
50
+ meaning of interaction. In cases such as [Buttons](../Button/Button.md) where the
51
+ interactive color is functioning as a background color or the text color, the
52
+ alternative color should be `--color-surface` so that the label matches the
53
+ theme of the application's background.
54
+
55
+ #### Interactive
56
+
57
+ The default color used for interactive elements.
58
+
59
+ ##### Interactive--Subtle
60
+
61
+ Use for interactive elements that should be less visually pronounced, such as an
62
+ icon action in main navigation, or buttons to dismiss or cancel a workflow.
63
+
64
+ ##### Interactive--Background
65
+
66
+ Use for the background of interactive elements to ensure separation from the
67
+ surface they appear on.
68
+
69
+ #### Destructive
70
+
71
+ Use to signify that an interaction will destroy something in the users' account
72
+ or workflow.
73
+
74
+ #### Disabled
75
+
76
+ Use to signify that an interactive element is disabled.
77
+
78
+ Use `secondary` when a disabled element needs more than one color to be readable
79
+ in a disabled state; for example, a button's background and label colors must be
80
+ different.
81
+
82
+ #### Focus
83
+
84
+ Used by the `--shadow-focus` property to indicate that an element has received
85
+ focus. Avoid using `--color-focus` directly on UI elements.
86
+
87
+ ### Status
88
+
89
+ Use these colors in labels, icons, filters, alerts, and other elements where
90
+ color can add meaning to the state of the system or an item in the system.
91
+
92
+ All status colors have a main color, a surface color, and an on-surface color.
93
+ The on-surface color should be used for an element when it sits inside of an
94
+ element with the status' surface color to maintain a cohesive tone and ensure
95
+ sufficient color contrast.
96
+
97
+ #### Critical
98
+
99
+ Action required; user must see this status to be unblocked.
100
+
101
+ #### Warning
102
+
103
+ Action *may* be required as a consequence of current state.
104
+
105
+ #### Success
106
+
107
+ No action required; an action has completed successfully.
108
+
109
+ #### Informative
110
+
111
+ No action required; but helpful to know about.
112
+
113
+ #### Inactive
114
+
115
+ No action required; not part of an active workflow.
116
+
117
+ ### Surfaces
118
+
119
+ Surfaces are the background-colors of almost every element in Jobber. Overlays
120
+ act as supplementary surfaces that mask areas of the interface to adjust visual
121
+ focus.
122
+
123
+ #### Surface
124
+
125
+ Most elements in Jobber have a light surface to indicate their nearness to the
126
+ user; if interactive, they have a hover color and an active color to indicate
127
+ state.
128
+
129
+ #### Surface--Background
130
+
131
+ A slightly darker surface gives a receded appearance relative to main surfaces.
132
+
133
+ #### Surface--Background--Subtle
134
+
135
+ Use when you need a surface that's distinct from the main `surface` without
136
+ appearing *too* receded.
137
+
138
+ #### Surface--Reverse
139
+
140
+ Use a reversed surface when a strong contrast is needed with the rest of the
141
+ application.
142
+
143
+ #### Overlay
144
+
145
+ Use to mask an area of the interface to promote focus to a foreground action,
146
+ such as a [Modal](/components/Modal)'s appearance. Overlay includes built-in
147
+ opacity values.
148
+
149
+ #### Overlay--Dimmed
150
+
151
+ A transparent version of [Surface](#surface), this masks an area of the
152
+ interface to indicate inactivity (i.e. waiting for updates). Overlay--Dimmed
153
+ includes built-in opacity values.
154
+
155
+ ### Borders
156
+
157
+ Defining the edges of elements on the same elevation plane, border colors are
158
+ the subtle maintainers of layout structure. Learn more about borders in our
159
+ [Borders guide.](../Borders/Borders.md)
160
+
161
+ Most borders should use `--color-border` for subtle definition.
162
+
163
+ Use `--color-border--section` where other bordered content is being further
164
+ sectioned, such as table headers or list sections.
165
+
166
+ Use `--color-border--interactive` for interactive elements to ensure accessible
167
+ contrast.
168
+
169
+ ### Workflow
170
+
171
+ These colors are associated with steps of the home services workflow. These
172
+ should be used sparingly and only on elements that are directly related to the
173
+ workflow.
174
+
175
+ #### Requests and assessments
176
+
177
+ Requests and assessments use orange to convey a "warm handoff" from the service
178
+ consumer to the service provider.
179
+
180
+ #### Quotes
181
+
182
+ Quotes use pink to suggest the likelihood of the service provider winning the
183
+ work is getting warmer relative to a request.
184
+
185
+ #### Jobs and visits
186
+
187
+ Jobs are green because of their core association to Jobber, which has
188
+ historically used some shade of green for branding.
189
+
190
+ Visits inherit the job color as they are closely related to jobs.
191
+
192
+ #### Invoices and payments
193
+
194
+ Invoices are blue as this is a common color associated with banking and finance.
195
+
196
+ Payments inherit the invoice color as they are closely related to invoices.
197
+
198
+ #### Tasks
199
+
200
+ Tasks use a deeper shade of blue than invoices and the two rarely share
201
+ interfaces as tasks are generally isolated to scheduling.
202
+
203
+ ### Brand
204
+
205
+ Use these colors to represent the Jobber brand visual language.
206
+
207
+ #### Brand
208
+
209
+ The primary color associated with our brand, from website to ads to product; AKA
210
+ "Jobber Green".
211
+
212
+ #### Brand--Highlight
213
+
214
+ Use to highlight an element in a way that aligns with our website. Use with
215
+ caution, it's *bright!*
216
+
217
+ ## Base colors
@@ -0,0 +1,67 @@
1
+ # Content
2
+
3
+ Content is a container component that provides it's child elements with
4
+ consistent vertical or horizontal spacing and padding.
5
+
6
+ This is useful for when you want to include internal details like text within a
7
+ parent component, such as a [Card](../Card/Card.md), while maintaining
8
+ consistent spacing between the elements.
9
+
10
+ ## Design & usage guidelines
11
+
12
+ Content should be used whenever you have a container with children that requires
13
+ consistent spacing between the elements.
14
+
15
+ ## Related components
16
+
17
+ Use [Flex](../Flex/Flex.md) and [Grid](/components/Grid) to create more complex
18
+ layouts.
19
+
20
+ ## Accessibility
21
+
22
+ Content supports the use of semantic HTML5 region elements like `<main>`,
23
+ `<section>`, `<article>` etc. to further enhance accessibility when used
24
+ appropriately. Consider using these if the Content represents a meaningful
25
+ region or section of your content. The default tag is a `<div>`.
26
+
27
+ Children of the Content component should be presented in a logical order, and
28
+ follow a sensible hierarchy that can be followed by screen readers.
29
+
30
+
31
+ ## Component customization
32
+
33
+ ### UNSAFE\_style (mobile)
34
+
35
+ General information for using `UNSAFE_` props can be found
36
+ [here](../customizing-components/customizing-components.md).
37
+
38
+ **Note**: Use of `UNSAFE_` props is **at your own risk** and should be
39
+ considered a **last resort**. Future Content updates may lead to unintended
40
+ breakages.
41
+
42
+ The Content component has two elements that can be targeted to apply custom
43
+ styles. These are the container and child wrapper.
44
+
45
+ ```tsx
46
+ UNSAFE_style: {
47
+ container: {
48
+ paddingHorizontal: tokens["space-large"],
49
+ },
50
+ childWrapper: {
51
+ backgroundColor: tokens["color-surface--background"],
52
+ },
53
+ },
54
+ ```
55
+
56
+
57
+ ## Props
58
+
59
+ ### Mobile
60
+
61
+ | Prop | Type | Required | Default | Description |
62
+ |------|------|----------|---------|-------------|
63
+ | `children` | `ReactNode` | Yes | — | The child or children that will be given spacing. |
64
+ | `childSpacing` | `Spacing` | No | `base` | The amount of spacing that will be applied between children. |
65
+ | `direction` | `"horizontal" | "vertical"` | No | `vertical` | |
66
+ | `spacing` | `Spacing` | No | `base` | The amount of spacing that content will give. |
67
+ | `UNSAFE_style` | `ContentUnsafeStyle` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |