@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,56 @@
1
+ # Format File
2
+
3
+ FormatFile will take a file object and display it in a number of lifecycle
4
+ states. It can be used to display a file that has been uploaded, or to display a
5
+ file that is about to be uploaded, as indicated by the progress indicator.
6
+
7
+ ## Design & usage guidelines
8
+
9
+ When contributing to, or consuming the FormatFile component, consider the
10
+ following:
11
+
12
+ * FormatFile components should take up the full width of the parent container (1
13
+ or 2 files per row)
14
+ * The delete button will only be displayed if the callback function is passed in
15
+
16
+ When using FormatFile for web, files can be displayed as either expanded or
17
+ compact. A compact FormatFile is used to display a cropped version of a file or
18
+ image, while expanded is used to display a file alongside its metadata.
19
+
20
+ ## Related components
21
+
22
+ * For a thumbnail representation of a user, use [Avatar](/components/Avatar).
23
+
24
+
25
+ ## Props
26
+
27
+ ### Mobile
28
+
29
+ #### FormatFileContent
30
+
31
+ | Prop | Type | Required | Default | Description |
32
+ |------|------|----------|---------|-------------|
33
+ | `file` | `FormattedFile` | Yes | — | |
34
+ | `isMedia` | `boolean` | Yes | — | |
35
+ | `onUploadComplete` | `() => void` | Yes | — | |
36
+ | `showOverlay` | `boolean` | Yes | — | |
37
+ | `styleInGrid` | `boolean` | Yes | — | |
38
+ | `accessibilityLabel` | `string` | No | — | |
39
+ | `onMediaLoadEnd` | `() => void` | No | — | * @internal A function to be called when the media has loaded. This is only used in FormatFileThumbnail. |
40
+ | `skipContainerStyles` | `boolean` | No | `false` | @internal When true, the component skips its container wrapper entirely (no border, background, or dimension styles).... |
41
+
42
+ #### FormatFile
43
+
44
+ | Prop | Type | Required | Default | Description |
45
+ |------|------|----------|---------|-------------|
46
+ | `file` | `File | FileUpload` | Yes | — | File upload details object. Can be a File or a FileUpload |
47
+ | `accessibilityHint` | `string` | No | — | Accessibility hint |
48
+ | `accessibilityLabel` | `string` | No | — | Accessibility label |
49
+ | `bottomSheetOptionsSuffix` | `BottomSheetOptionsSuffix` | No | — | A file type to show at Bottom Sheet options |
50
+ | `createThumbnail` | `CreateThumbnail` | No | — | |
51
+ | `onPreviewPress` | `(formattedFile: FormattedFile) => void` | No | — | Handler for the "Preview" Bottom Sheet Option press |
52
+ | `onRemove` | `() => void` | No | — | A function to be called on "Remove" Bottom Sheet Option press |
53
+ | `onTap` | `(file: T) => void` | No | — | A function which handles the onTap event. |
54
+ | `showFileTypeIndicator` | `boolean` | No | `true` | Set false to hide the filetype icon |
55
+ | `styleInGrid` | `boolean` | No | `false` | Uses a grid layout when multi-file upload is supported |
56
+ | `testID` | `string` | No | — | A reference to the element in the rendered output |
@@ -0,0 +1,143 @@
1
+ # Glimmer
2
+
3
+ Glimmer is a foundational component that is used to build Skeleton (*coming
4
+ soon*) or other components that invoke loading such as an image waiting to load
5
+ on [FormatFile](../FormatFile/FormatFile.md).
6
+
7
+ ## Colors
8
+
9
+ Glimmers adapts to the background you put it in. If you have a grey background,
10
+ the `Glimmer` will automatically darken itself so it's still noticeable.
11
+
12
+ ```tsx
13
+ import React from "react";
14
+ import { Glimmer } from "@jobber/components/Glimmer";
15
+ import { Text } from "@jobber/components/Text";
16
+
17
+ export function GlimmerBasicExample() {
18
+ return (
19
+ <div
20
+ style={{
21
+ display: "flex",
22
+ flexDirection: "column",
23
+ }}
24
+ >
25
+ <div
26
+ style={{
27
+ display: "flex",
28
+ flexDirection: "column",
29
+ gap: "var(--space-small)",
30
+ padding: "var(--space-base)",
31
+ backgroundColor: "var(--color-surface)",
32
+ }}
33
+ >
34
+ <Text size="small" variation="subdued">
35
+ On surface
36
+ </Text>
37
+ <Glimmer shape="rectangle" size="base" timing="base" />
38
+ </div>
39
+ <div
40
+ style={{
41
+ display: "flex",
42
+ flexDirection: "column",
43
+ gap: "var(--space-small)",
44
+ padding: "var(--space-base)",
45
+ backgroundColor: "var(--color-surface--background",
46
+ }}
47
+ >
48
+ <Text size="small" variation="subdued">
49
+ On surface--background
50
+ </Text>
51
+ <Glimmer shape="rectangle" size="base" timing="base" />
52
+ </div>
53
+ <div
54
+ style={{
55
+ display: "flex",
56
+ flexDirection: "column",
57
+ gap: "var(--space-small)",
58
+ padding: "var(--space-base)",
59
+ backgroundColor: "var(--color-surface--background--subtle)",
60
+ }}
61
+ >
62
+ <Text size="small" variation="subdued">
63
+ On surface--background--subtle
64
+ </Text>
65
+ <Glimmer shape="rectangle" size="base" timing="base" />
66
+ </div>
67
+ <div
68
+ style={{
69
+ display: "flex",
70
+ flexDirection: "column",
71
+ gap: "var(--space-small)",
72
+ padding: "var(--space-base)",
73
+ backgroundColor: "var(--color-surface--reverse)",
74
+ }}
75
+ >
76
+ <Text size="small" variation="subdued">
77
+ On surface--reverse (toggle reverseTheme prop)
78
+ </Text>
79
+ <Glimmer shape="rectangle" size="base" timing="base" />
80
+ </div>
81
+ </div>
82
+ );
83
+ }
84
+ ```
85
+
86
+ If the Glimmer sits on a `reverse` background (dark in light mode, light in dark
87
+ mode), you can toggle the `reverseTheme` prop to switch the colors so it's still
88
+ noticeable.
89
+
90
+ ```tsx
91
+ import React from "react";
92
+ import type { ComponentProps } from "react";
93
+ import { Glimmer } from "@jobber/components/Glimmer";
94
+ import { Box } from "@jobber/components/Box";
95
+
96
+ export function GlimmerReverseThemeExample(
97
+ props: Partial<ComponentProps<typeof Glimmer>>,
98
+ ) {
99
+ return (
100
+ <Box background="surface--reverse" padding="base">
101
+ <Glimmer reverseTheme {...props} />
102
+ </Box>
103
+ );
104
+ }
105
+ ```
106
+
107
+ ## Semantic blocks
108
+
109
+ A pre-made block can be used to indicate a certain component.
110
+
111
+ ```tsx
112
+ import React from "react";
113
+ import { Glimmer } from "@jobber/components/Glimmer";
114
+ import { Tab, Tabs } from "@jobber/components/Tabs";
115
+
116
+ export function GlimmerSemanticBlocksExample() {
117
+ return (
118
+ <Tabs>
119
+ <Tab label={"Glimmer.Header"}>
120
+ <Glimmer.Header />
121
+ </Tab>
122
+ <Tab label={"Glimmer.Text"}>
123
+ <Glimmer.Text />
124
+ </Tab>
125
+ <Tab label={"Glimmer.Button"}>
126
+ <Glimmer.Button />
127
+ </Tab>
128
+ </Tabs>
129
+ );
130
+ }
131
+ ```
132
+
133
+
134
+ ## Props
135
+
136
+ ### Mobile
137
+
138
+ | Prop | Type | Required | Default | Description |
139
+ |------|------|----------|---------|-------------|
140
+ | `shape` | `"rectangle" | "square" | "circle"` | No | `rectangle` | Sets the size of the glimmer. |
141
+ | `size` | `"small" | "base" | "large" | "larger" | "largest"` | No | `base` | Sets the shape of the glimmer. If you need a specific width, use the `width` prop. |
142
+ | `timing` | `GlimmerTimings` | No | `base` | Control how fast the shine moves from left to right. This is useful when the glimmer is used on smaller spaces. |
143
+ | `width` | `number | `${number}%`` | No | — | Adjust the width of the glimmer in px or % values. |
@@ -0,0 +1,132 @@
1
+ # Heading
2
+
3
+ Headings are used as the titles of each major section of a page in the
4
+ interface. Reserved for short and important text, Headings create a visual
5
+ hierarchy for the user.
6
+
7
+ ## Design & usage guidelines
8
+
9
+ ### Web
10
+
11
+ | Level | Use case |
12
+ | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
13
+ | `<Heading level={1} />` | Should explain the main subject of the page. There should only be one `level={1}` Heading on a page |
14
+ | `<Heading level={2} />` | Used to categorize large groups of content. For example, there are two main categories when creating a new client: client details and property details. This heading can be skipped if there are no large groups that need breaking up. |
15
+ | `<Heading level={3} />` | Used to group content and forms on a single topic. |
16
+ | `<Heading level={4} />` | Used to group contents after a `level={3}` Heading or inside a card component. |
17
+ | `<Heading level={5} />` | `level={5}` is used to group contents after a `level={4}` Heading. |
18
+ | `<Heading level={6} />` | Used to group contents after a `level={5}` Heading or to group small lists of content. |
19
+
20
+ ### Mobile
21
+
22
+ | Level | Use case |
23
+ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
24
+ | `<Heading level={"title"} />` | Should explain the main subject of the page. There should only be one `title` Heading on a page. |
25
+ | `<Heading level={"subtitle"} />` | Used to categorize large groups of content. |
26
+ | `<Heading level={"heading"} />` | Used to group content and forms on a single topic. Like `title` and `subtitle`, `heading` uses [Jobber Pro](../Typography/Typography.md#component-view-font-families). |
27
+ | `<Heading level={"subHeading"} />` | Used to group small lists of content, `subHeading` uses the [Inter](../Typography/Typography.md#component-view-font-families) font. |
28
+
29
+ ## Content guidelines
30
+
31
+ The only content that should be used in a Heading is text. Use sentence-case for
32
+ headings. The exception is `Heading 6` in the web Headings, which is capitalized
33
+ as a stylistic reference to the
34
+ [eyebrow typographic pattern.](https://app.uxcel.com/lessons/basics-ii-588#eyebrow-headline-8095)
35
+
36
+ | ✅ Do | ❌ Don't |
37
+ | --------------------------- | --------------------------- |
38
+ | Job #21 for Nathaniel Lewis | Job #21 For Nathaniel Lewis |
39
+ | Save job and... | Save Job And... |
40
+ | Push notification settings | Push Notification Settings |
41
+
42
+ ## Related components
43
+
44
+ For introductory text after a page title, or paragraph text for body copy, use
45
+ [Text](../Text/Text.md).
46
+
47
+ ## Accessibility
48
+
49
+ In the web, HTML heading levels (h1, h2, h3, etc) correspond with document
50
+ structure for assistive technology. Designers should strive to use the right
51
+ level of heading visually to create an appropriate hierarchy, but in cases where
52
+ this is not desired you can still specify the correct semantic level of Heading
53
+ using the `element` property.
54
+
55
+ In mobile, assistive technology only picks up on whether or not a typographic
56
+ element is a heading or not, so the `element` property is not exposed.
57
+
58
+ ## Platform considerations
59
+
60
+ There are a few caveats around copying text on Android and iOS that you can read
61
+ under the [Typography](../Typography/Typography.md) documentation.
62
+
63
+
64
+ ## Component customization
65
+
66
+ ### UNSAFE\_ props (advanced usage)
67
+
68
+ General information for using `UNSAFE_` props can be found
69
+ [here](../customizing-components/customizing-components.md).
70
+
71
+ **Note**: Use of `UNSAFE_` props is **at your own risk** and should be
72
+ considered a **last resort**. Future Icon updates may lead to unintended
73
+ breakages.
74
+
75
+ #### UNSAFE\_props (web)
76
+
77
+ ### UNSAFE\_className
78
+
79
+ Use `UNSAFE_className` to apply custom classes to the Heading component. This can be
80
+ useful for applying styles via CSS Modules.
81
+
82
+ ```tsx
83
+ <Heading level={1} UNSAFE_className={{ textStyle: styles.customHeading }}>
84
+ Test with custom class name
85
+ </Heading>
86
+
87
+ // YourComponent.module.css
88
+ .customHeading {
89
+ color: var(--color-red);
90
+ }
91
+ ```
92
+
93
+ ### UNSAFE\_style
94
+
95
+ Use `UNSAFE_style` to apply inline custom styles to the Heading component.
96
+
97
+ ```tsx
98
+ <Heading level={1} UNSAFE_style={{ textStyle: { color: "red" } }}>
99
+ Test with custom style
100
+ </Heading>
101
+ ```
102
+
103
+ ### Using the id prop
104
+
105
+ #### Do:
106
+
107
+ * ✅ Navigation anchors: Link directly to a specific section of the page (e.g.
108
+ /docs#getting-started).
109
+ * ✅ Accessible regions: Provide an `id` so page regions (like `<section>`,
110
+ `<fieldset>`, or form groups) can reference the heading via `aria-labelledby`,
111
+ ensuring clear announcements without duplication.
112
+
113
+ #### Don't:
114
+
115
+ * ❌ CSS styling: Use design system props or `UNSAFE_className`/`UNSAFE_style`
116
+ instead.
117
+
118
+
119
+ ## Props
120
+
121
+ ### Mobile
122
+
123
+ | Prop | Type | Required | Default | Description |
124
+ |------|------|----------|---------|-------------|
125
+ | `children` | `ReactNode` | Yes | — | Text to display. Supports nesting text elements. |
126
+ | `align` | `TextAlign` | No | — | Alignment of heading |
127
+ | `allowFontScaling` | `boolean` | No | `true` | Allow text to be resized based on user's device display scale |
128
+ | `level` | `HeadingLevel` | No | — | The type of heading, e.g., "Title" |
129
+ | `maxLines` | `TruncateLength` | No | `unlimited` | The maximum amount of lines the text can occupy before being truncated with "...". Uses predefined string values that... |
130
+ | `reverseTheme` | `boolean` | No | `false` | Uses the reverse variant of the text color for the heading |
131
+ | `selectable` | `boolean` | No | `true` | Lets the user select text, to use the native copy and paste functionality. WARNING: if true, this prevents ellipsis f... |
132
+ | `variation` | `HeadingColor` | No | `heading` | The text color of heading |