@jobber/components-native 0.99.0 → 0.99.1-scotttco-d3b1f77.4
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.props-mobile.json +136 -0
- package/dist/docs/ActionItem/ActionItem.stories.mdx +58 -0
- package/dist/docs/ActionItemGroup/ActionItemGroup.props-mobile.json +1 -0
- package/dist/docs/ActionItemGroup/ActionItemGroup.stories.mdx +37 -0
- package/dist/docs/ActionLabel/ActionLabel.props-mobile.json +84 -0
- package/dist/docs/ActionLabel/ActionLabel.stories.mdx +34 -0
- package/dist/docs/ActivityIndicator/ActivityIndicator.props-mobile.json +1220 -0
- package/dist/docs/ActivityIndicator/ActivityIndicator.stories.mdx +25 -0
- package/dist/docs/AtlantisThemeContext/AtlantisThemeContext.props-mobile.json +37 -0
- package/dist/docs/AtlantisThemeContext/AtlantisThemeContext.stories.mdx +254 -0
- package/dist/docs/AutoLink/AutoLink.props-mobile.json +95 -0
- package/dist/docs/AutoLink/AutoLink.stories.mdx +26 -0
- package/dist/docs/AutoLink/AutoLinkNotes.mdx +9 -0
- package/dist/docs/Banner/Banner.props-mobile.json +89 -0
- package/dist/docs/Banner/Banner.stories.mdx +308 -0
- package/dist/docs/Banner/BannerNotes.mdx +229 -0
- package/dist/docs/BottomSheet/BottomSheet.props-mobile.json +87 -0
- package/dist/docs/BottomSheet/BottomSheet.stories.mdx +48 -0
- package/dist/docs/BottomSheet/BottomSheetNotes.mdx +13 -0
- package/dist/docs/Button/Button.props-mobile.json +207 -0
- package/dist/docs/Button/Button.stories.mdx +545 -0
- package/dist/docs/Button/ButtonNotes.mdx +297 -0
- package/dist/docs/ButtonGroup/ButtonGroup.props-mobile.json +278 -0
- package/dist/docs/ButtonGroup/ButtonGroup.stories.mdx +60 -0
- package/dist/docs/Card/Card.props-mobile.json +93 -0
- package/dist/docs/Card/Card.stories.mdx +70 -0
- package/dist/docs/Card/CardNotes.mdx +188 -0
- package/dist/docs/Checkbox/Checkbox.props-mobile.json +128 -0
- package/dist/docs/Checkbox/Checkbox.stories.mdx +46 -0
- package/dist/docs/Checkbox/CheckboxNotes.mdx +17 -0
- package/dist/docs/Checkbox/exampleV1.ts +11 -0
- package/dist/docs/Checkbox/exampleV2.ts +12 -0
- package/dist/docs/Chip/Chip.props-mobile.json +132 -0
- package/dist/docs/Chip/Chip.stories.mdx +229 -0
- package/dist/docs/Chip/ChipNotes.mdx +70 -0
- package/dist/docs/Content/Content.props-mobile.json +82 -0
- package/dist/docs/Content/Content.stories.mdx +33 -0
- package/dist/docs/Content/ContentNotes.mdx +24 -0
- package/dist/docs/ContentOverlay/ContentOverlay.props-mobile.json +224 -0
- package/dist/docs/ContentOverlay/ContentOverlay.stories.mdx +45 -0
- package/dist/docs/ContentOverlay/ContentOverlayNotes.mdx +4 -0
- package/dist/docs/Disclosure/Disclosure.props-mobile.json +91 -0
- package/dist/docs/Disclosure/Disclosure.stories.mdx +79 -0
- package/dist/docs/Disclosure/DisclosureNotes.mdx +74 -0
- package/dist/docs/Divider/Divider.props-mobile.json +56 -0
- package/dist/docs/Divider/Divider.stories.mdx +23 -0
- package/dist/docs/Divider/DividerNotes.mdx +52 -0
- package/dist/docs/EmptyState/EmptyState.props-mobile.json +91 -0
- package/dist/docs/EmptyState/EmptyState.stories.mdx +68 -0
- package/dist/docs/Flex/Flex.props-mobile.json +56 -0
- package/dist/docs/Flex/Flex.stories.mdx +30 -0
- package/dist/docs/Form/Form.props-mobile.json +310 -0
- package/dist/docs/Form/Form.stories.mdx +52 -0
- package/dist/docs/Form/FormNotes.mdx +46 -0
- package/dist/docs/FormField/FormField.props-mobile.json +63 -0
- package/dist/docs/FormField/FormField.stories.mdx +14 -0
- package/dist/docs/FormField/FormFieldNotes.mdx +33 -0
- package/dist/docs/FormatFile/FormatFile.props-mobile.json +273 -0
- package/dist/docs/FormatFile/FormatFile.stories.mdx +27 -0
- package/dist/docs/Glimmer/Glimmer.props-mobile.json +69 -0
- package/dist/docs/Glimmer/Glimmer.stories.mdx +61 -0
- package/dist/docs/Heading/Heading.props-mobile.json +125 -0
- package/dist/docs/Heading/Heading.stories.mdx +72 -0
- package/dist/docs/Heading/HeadingNotes.mdx +57 -0
- package/dist/docs/Icon/Icon.props-mobile.json +78 -0
- package/dist/docs/Icon/Icon.stories.mdx +463 -0
- package/dist/docs/Icon/IconNotes.mdx +79 -0
- package/dist/docs/IconButton/IconButton.props-mobile.json +102 -0
- package/dist/docs/IconButton/IconButton.stories.mdx +25 -0
- package/dist/docs/InputCurrency/InputCurrency.props-mobile.json +520 -0
- package/dist/docs/InputCurrency/InputCurrency.stories.mdx +18 -0
- package/dist/docs/InputDate/InputDate.props-mobile.json +208 -0
- package/dist/docs/InputDate/InputDate.stories.mdx +76 -0
- package/dist/docs/InputDate/InputDateNotes.mdx +30 -0
- package/dist/docs/InputDate/exampleV1.ts +5 -0
- package/dist/docs/InputDate/exampleV2.ts +5 -0
- package/dist/docs/InputEmail/InputEmail.props-mobile.json +468 -0
- package/dist/docs/InputEmail/InputEmail.stories.mdx +33 -0
- package/dist/docs/InputEmail/exampleV1.ts +3 -0
- package/dist/docs/InputEmail/exampleV2.ts +7 -0
- package/dist/docs/InputFieldWrapper/InputFieldWrapper.props-mobile.json +261 -0
- package/dist/docs/InputFieldWrapper/InputFieldWrapper.stories.mdx +34 -0
- package/dist/docs/InputFieldWrapper/InputFieldWrapperNotes.mdx +12 -0
- package/dist/docs/InputNumber/InputNumber.props-mobile.json +481 -0
- package/dist/docs/InputNumber/InputNumber.stories.mdx +27 -0
- package/dist/docs/InputNumber/InputNumberNotes.mdx +9 -0
- package/dist/docs/InputNumber/exampleV1.ts +9 -0
- package/dist/docs/InputNumber/exampleV2.ts +10 -0
- package/dist/docs/InputPassword/InputPassword.props-mobile.json +444 -0
- package/dist/docs/InputPassword/InputPassword.stories.mdx +24 -0
- package/dist/docs/InputPressable/InputPressable.props-mobile.json +208 -0
- package/dist/docs/InputPressable/InputPressable.stories.mdx +33 -0
- package/dist/docs/InputPressable/InputPressableNotes.mdx +10 -0
- package/dist/docs/InputSearch/InputSearch.props-mobile.json +158 -0
- package/dist/docs/InputSearch/InputSearch.stories.mdx +40 -0
- package/dist/docs/InputText/ControlledExample.tsx +16 -0
- package/dist/docs/InputText/InputText.props-mobile.json +481 -0
- package/dist/docs/InputText/InputText.stories.mdx +171 -0
- package/dist/docs/InputText/InputTextNotes.mdx +33 -0
- package/dist/docs/InputText/exampleV1.ts +3 -0
- package/dist/docs/InputText/exampleV2.ts +7 -0
- package/dist/docs/InputTime/InputTime.props-mobile.json +173 -0
- package/dist/docs/InputTime/InputTime.stories.mdx +29 -0
- package/dist/docs/InputTime/InputTimeNotes.mdx +10 -0
- package/dist/docs/InputTime/exampleV1.ts +3 -0
- package/dist/docs/InputTime/exampleV2.ts +11 -0
- package/dist/docs/ProgressBar/ProgressBar.props-mobile.json +136 -0
- package/dist/docs/ProgressBar/ProgressBar.stories.mdx +26 -0
- package/dist/docs/Select/Select.props-mobile.json +228 -0
- package/dist/docs/Select/Select.stories.mdx +95 -0
- package/dist/docs/Select/SelectNotes.mdx +52 -0
- package/dist/docs/Select/exampleV1.ts +9 -0
- package/dist/docs/Select/exampleV2.ts +9 -0
- package/dist/docs/StatusLabel/StatusLabel.props-mobile.json +54 -0
- package/dist/docs/StatusLabel/StatusLabel.stories.mdx +99 -0
- package/dist/docs/Switch/Switch.props-mobile.json +115 -0
- package/dist/docs/Switch/Switch.stories.mdx +36 -0
- package/dist/docs/Text/Text.props-mobile.json +252 -0
- package/dist/docs/Text/Text.stories.mdx +201 -0
- package/dist/docs/Text/TextNotes.mdx +103 -0
- package/dist/docs/TextList/TextList.props-mobile.json +82 -0
- package/dist/docs/TextList/TextList.stories.mdx +20 -0
- package/dist/docs/ThumbnailList/ThumbnailList.props-mobile.json +65 -0
- package/dist/docs/ThumbnailList/ThumbnailList.stories.mdx +8 -0
- package/dist/docs/Toast/Toast.props-mobile.json +26 -0
- package/dist/docs/Toast/Toast.stories.mdx +68 -0
- package/dist/docs/Typography/Typography.props-mobile.json +299 -0
- package/dist/docs/Typography/Typography.stories.mdx +50 -0
- package/dist/docs/Typography/TypographyNotes.mdx +94 -0
- package/dist/docs/changelogs/breaking-changes.md +83 -0
- package/dist/docs/design/Animation.stories.mdx +75 -0
- package/dist/docs/design/Borders.stories.mdx +69 -0
- package/dist/docs/design/Colors.stories.mdx +405 -0
- package/dist/docs/design/Elevations.stories.mdx +108 -0
- package/dist/docs/design/Opacity.stories.mdx +26 -0
- package/dist/docs/design/Radii.stories.mdx +37 -0
- package/dist/docs/design/ResponsiveBreakpoint.stories.mdx +79 -0
- package/dist/docs/design/Spacing.stories.mdx +215 -0
- package/dist/docs/design/Typography.stories.mdx +266 -0
- package/dist/docs/editorial/formatting.stories.mdx +641 -0
- package/dist/docs/editorial/product-vocabulary.stories.mdx +613 -0
- package/dist/docs/editorial/voice-and-tone.stories.mdx +389 -0
- package/dist/docs/guides/adding-an-icon.stories.mdx +161 -0
- package/dist/docs/guides/atlantis-overview.mdx +56 -0
- package/dist/docs/guides/charter.md +47 -0
- package/dist/docs/guides/component-support-levels.stories.mdx +41 -0
- package/dist/docs/guides/contributing.mdx +219 -0
- package/dist/docs/guides/create-basic-component.stories.mdx +481 -0
- package/dist/docs/guides/customizing-components.stories.mdx +171 -0
- package/dist/docs/guides/documentation-style.stories.mdx +121 -0
- package/dist/docs/guides/figma-101.mdx +149 -0
- package/dist/docs/guides/frontend-style.stories.mdx +324 -0
- package/dist/docs/guides/getting-started-with-react/getGIF.tsx +42 -0
- package/dist/docs/guides/getting-started-with-react/getting-started-with-react.stories.mdx +201 -0
- package/dist/docs/guides/local-linking.mdx +138 -0
- package/dist/docs/guides/page-layouts.stories.mdx +473 -0
- package/dist/docs/guides/pull-request-title-generator.stories.mdx +5 -0
- package/dist/docs/guides/repository-contributing.md +217 -0
- package/dist/docs/guides/repository-contributing.stories.mdx +3 -0
- package/dist/docs/guides/scaffolding.stories.mdx +126 -0
- package/dist/docs/guides/welcome-guide.stories.mdx +3 -0
- package/dist/docs/hooks/UseBool.tsx +18 -0
- package/dist/docs/hooks/UseBreakpoints.tsx +26 -0
- package/dist/docs/hooks/UseCollectionQuery.tsx +77 -0
- package/dist/docs/hooks/UseDebounce.tsx +64 -0
- package/dist/docs/hooks/UseFocusTrap.tsx +25 -0
- package/dist/docs/hooks/UseFormState.tsx +48 -0
- package/dist/docs/hooks/UseInView.tsx +29 -0
- package/dist/docs/hooks/UseIsMounted.tsx +42 -0
- package/dist/docs/hooks/UseLiveAnnounce.tsx +19 -0
- package/dist/docs/hooks/UseOnKeyDown.tsx +46 -0
- package/dist/docs/hooks/UseOnMount.tsx +40 -0
- package/dist/docs/hooks/UseRefocusOnActivator.tsx +24 -0
- package/dist/docs/hooks/UseResizeObserver.tsx +35 -0
- package/dist/docs/hooks/UseStepper.tsx +43 -0
- package/dist/docs/hooks/UseWindowDimensions.tsx +7 -0
- package/dist/docs/hooks/useBool.stories.mdx +16 -0
- package/dist/docs/hooks/useBreakpoints.stories.mdx +56 -0
- package/dist/docs/hooks/useCallbackRef.stories.mdx +13 -0
- package/dist/docs/hooks/useCollectionQuery.stories.mdx +61 -0
- package/dist/docs/hooks/useDebounce.stories.mdx +26 -0
- package/dist/docs/hooks/useFocusTrap.stories.mdx +17 -0
- package/dist/docs/hooks/useFormState.stories.mdx +19 -0
- package/dist/docs/hooks/useInView.stories.mdx +14 -0
- package/dist/docs/hooks/useIsMounted.stories.mdx +19 -0
- package/dist/docs/hooks/useLiveAnnounce.stories.mdx +19 -0
- package/dist/docs/hooks/useOnKeyDown.stories.mdx +21 -0
- package/dist/docs/hooks/useOnMount.stories.mdx +16 -0
- package/dist/docs/hooks/useRefocusOnActivator.stories.mdx +15 -0
- package/dist/docs/hooks/useResizeObserver.stories.mdx +101 -0
- package/dist/docs/hooks/useStepper.stories.mdx +109 -0
- package/dist/docs/hooks/useWindowDimensions.stories.mdx +15 -0
- package/dist/docs/packages/components.stories.mdx +3 -0
- package/dist/docs/packages/design.stories.mdx +3 -0
- package/dist/docs/packages/eslint-config.stories.mdx +3 -0
- package/dist/docs/packages/hooks.stories.mdx +3 -0
- package/dist/docs/packages/stylelint-config.stories.mdx +3 -0
- package/dist/docs/patterns/disabled-states.stories.mdx +96 -0
- package/dist/docs/patterns/empty-states.stories.mdx +148 -0
- package/dist/docs/patterns/errors.stories.mdx +131 -0
- package/dist/docs/patterns/interaction.stories.mdx +126 -0
- package/dist/docs/patterns/settings.mdx +86 -0
- package/dist/package.json +6 -7
- package/dist/src/Button/Button.js +2 -2
- package/dist/src/ContentOverlay/BottomSheetKeyboardAwareScrollView.js +19 -0
- package/dist/src/ContentOverlay/ContentOverlay.js +144 -108
- package/dist/src/ContentOverlay/ContentOverlay.style.js +8 -12
- package/dist/src/ContentOverlay/computeContentOverlayBehavior.js +76 -0
- package/dist/src/ContentOverlay/constants.js +1 -0
- package/dist/src/ContentOverlay/hooks/useBottomSheetModalBackHandler.js +25 -0
- package/dist/src/ContentOverlay/index.js +1 -1
- package/dist/src/InputText/InputText.js +44 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/src/ActionLabel/ActionLabel.d.ts +1 -1
- package/dist/types/src/ContentOverlay/BottomSheetKeyboardAwareScrollView.d.ts +11 -0
- package/dist/types/src/ContentOverlay/ContentOverlay.d.ts +2 -5
- package/dist/types/src/ContentOverlay/ContentOverlay.style.d.ts +11 -10
- package/dist/types/src/ContentOverlay/computeContentOverlayBehavior.d.ts +32 -0
- package/dist/types/src/ContentOverlay/constants.d.ts +1 -0
- package/dist/types/src/ContentOverlay/hooks/useBottomSheetModalBackHandler.d.ts +7 -0
- package/dist/types/src/ContentOverlay/index.d.ts +1 -1
- package/dist/types/src/ContentOverlay/types.d.ts +6 -13
- package/jestSetup.js +2 -0
- package/package.json +6 -7
- package/src/ActionItem/ActionItem.stories.tsx +7 -6
- package/src/ActionItem/ActionItemGroup.stories.tsx +10 -9
- package/src/ActionLabel/ActionLabel.test.tsx +13 -1
- package/src/ActionLabel/ActionLabel.tsx +6 -1
- package/src/Banner/Banner.stories.tsx +2 -1
- package/src/BottomSheet/BottomSheet.stories.tsx +11 -10
- package/src/Button/Button.tsx +2 -2
- package/src/ButtonGroup/ButtonGroup.stories.tsx +9 -8
- package/src/Card/Card.stories.tsx +3 -2
- package/src/Chip/Chip.stories.tsx +9 -8
- package/src/ContentOverlay/BottomSheetKeyboardAwareScrollView.tsx +36 -0
- package/src/ContentOverlay/ContentOverlay.stories.tsx +33 -32
- package/src/ContentOverlay/ContentOverlay.style.ts +12 -12
- package/src/ContentOverlay/ContentOverlay.test.tsx +196 -81
- package/src/ContentOverlay/ContentOverlay.tsx +250 -208
- package/src/ContentOverlay/computeContentOverlayBehavior.test.ts +276 -0
- package/src/ContentOverlay/computeContentOverlayBehavior.ts +119 -0
- package/src/ContentOverlay/constants.ts +1 -0
- package/src/ContentOverlay/hooks/useBottomSheetModalBackHandler.test.ts +81 -0
- package/src/ContentOverlay/hooks/useBottomSheetModalBackHandler.ts +36 -0
- package/src/ContentOverlay/index.ts +4 -1
- package/src/ContentOverlay/types.ts +6 -14
- package/src/EmptyState/EmptyState.stories.tsx +3 -2
- package/src/Form/Form.stories.tsx +4 -3
- package/src/IconButton/IconButton.stories.tsx +2 -1
- package/src/InputPressable/InputPressable.stories.tsx +5 -4
- package/src/InputSearch/InputSearch.stories.tsx +2 -1
- package/src/InputText/InputText.test.tsx +122 -0
- package/src/InputText/InputText.tsx +62 -2
- package/src/InputTime/InputTime.stories.tsx +2 -1
- package/dist/src/ContentOverlay/UNSAFE_WrappedModalize.js +0 -23
- package/dist/types/src/ContentOverlay/UNSAFE_WrappedModalize.d.ts +0 -3
- package/src/ContentOverlay/UNSAFE_WrappedModalize.tsx +0 -41
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"tags": {},
|
|
4
|
+
"filePath": "../components-native/src/ActionItem/ActionItem.tsx",
|
|
5
|
+
"description": "",
|
|
6
|
+
"displayName": "ActionItem",
|
|
7
|
+
"methods": [],
|
|
8
|
+
"props": {
|
|
9
|
+
"title": {
|
|
10
|
+
"defaultValue": null,
|
|
11
|
+
"description": "Title of the Action Item",
|
|
12
|
+
"name": "title",
|
|
13
|
+
"parent": {
|
|
14
|
+
"fileName": "../components-native/src/ActionItem/ActionItem.tsx",
|
|
15
|
+
"name": "ActionItemProps"
|
|
16
|
+
},
|
|
17
|
+
"required": false,
|
|
18
|
+
"type": {
|
|
19
|
+
"name": "string"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"icon": {
|
|
23
|
+
"defaultValue": null,
|
|
24
|
+
"description": "Name of the icon to display before content",
|
|
25
|
+
"name": "icon",
|
|
26
|
+
"parent": {
|
|
27
|
+
"fileName": "../components-native/src/ActionItem/ActionItem.tsx",
|
|
28
|
+
"name": "ActionItemProps"
|
|
29
|
+
},
|
|
30
|
+
"required": false,
|
|
31
|
+
"type": {
|
|
32
|
+
"name": "IconNames"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"iconColor": {
|
|
36
|
+
"defaultValue": null,
|
|
37
|
+
"description": "Colour of the icon displayed before content",
|
|
38
|
+
"name": "iconColor",
|
|
39
|
+
"parent": {
|
|
40
|
+
"fileName": "../components-native/src/ActionItem/ActionItem.tsx",
|
|
41
|
+
"name": "ActionItemProps"
|
|
42
|
+
},
|
|
43
|
+
"required": false,
|
|
44
|
+
"type": {
|
|
45
|
+
"name": "\"task\" | \"text\" | \"warning\" | \"icon\" | \"white\" | \"grey\" | \"greyBlue\" | \"greyBlueDark\" | \"greyBlueLighter\" | \"blue\" | \"lightBlue\" | \"green\" | \"yellow\" | \"red\" | \"navy\" | \"orange\" | ... 33 more ... | \"brandHighlight\""
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"children": {
|
|
49
|
+
"defaultValue": null,
|
|
50
|
+
"description": "Content to display.",
|
|
51
|
+
"name": "children",
|
|
52
|
+
"parent": {
|
|
53
|
+
"fileName": "../components-native/src/ActionItem/ActionItem.tsx",
|
|
54
|
+
"name": "ActionItemProps"
|
|
55
|
+
},
|
|
56
|
+
"required": false,
|
|
57
|
+
"type": {
|
|
58
|
+
"name": "ReactNode"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"actionIcon": {
|
|
62
|
+
"defaultValue": {
|
|
63
|
+
"value": "edit"
|
|
64
|
+
},
|
|
65
|
+
"description": "Action icon to display",
|
|
66
|
+
"name": "actionIcon",
|
|
67
|
+
"parent": {
|
|
68
|
+
"fileName": "../components-native/src/ActionItem/ActionItem.tsx",
|
|
69
|
+
"name": "ActionItemProps"
|
|
70
|
+
},
|
|
71
|
+
"required": false,
|
|
72
|
+
"type": {
|
|
73
|
+
"name": "ActionIconNames"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"actionIconColour": {
|
|
77
|
+
"defaultValue": {
|
|
78
|
+
"value": "interactive"
|
|
79
|
+
},
|
|
80
|
+
"description": "Colour of the action icon",
|
|
81
|
+
"name": "actionIconColour",
|
|
82
|
+
"parent": {
|
|
83
|
+
"fileName": "../components-native/src/ActionItem/ActionItem.tsx",
|
|
84
|
+
"name": "ActionItemProps"
|
|
85
|
+
},
|
|
86
|
+
"required": false,
|
|
87
|
+
"type": {
|
|
88
|
+
"name": "ActionIconColour"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"actionIconAlignment": {
|
|
92
|
+
"defaultValue": {
|
|
93
|
+
"value": "center"
|
|
94
|
+
},
|
|
95
|
+
"description": "Alignment of action icon",
|
|
96
|
+
"name": "actionIconAlignment",
|
|
97
|
+
"parent": {
|
|
98
|
+
"fileName": "../components-native/src/ActionItem/ActionItem.tsx",
|
|
99
|
+
"name": "ActionItemProps"
|
|
100
|
+
},
|
|
101
|
+
"required": false,
|
|
102
|
+
"type": {
|
|
103
|
+
"name": "\"flex-start\" | \"flex-end\" | \"center\""
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"onPress": {
|
|
107
|
+
"defaultValue": null,
|
|
108
|
+
"description": "Press handler",
|
|
109
|
+
"name": "onPress",
|
|
110
|
+
"parent": {
|
|
111
|
+
"fileName": "../components-native/src/ActionItem/ActionItem.tsx",
|
|
112
|
+
"name": "ActionItemProps"
|
|
113
|
+
},
|
|
114
|
+
"required": false,
|
|
115
|
+
"type": {
|
|
116
|
+
"name": "() => void"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"testID": {
|
|
120
|
+
"defaultValue": {
|
|
121
|
+
"value": "actionItem"
|
|
122
|
+
},
|
|
123
|
+
"description": "",
|
|
124
|
+
"name": "testID",
|
|
125
|
+
"parent": {
|
|
126
|
+
"fileName": "../components-native/src/ActionItem/ActionItem.tsx",
|
|
127
|
+
"name": "ActionItemProps"
|
|
128
|
+
},
|
|
129
|
+
"required": false,
|
|
130
|
+
"type": {
|
|
131
|
+
"name": "string"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
]
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Meta } from "@storybook/addon-docs";
|
|
2
|
+
import { Figma } from "@storybook/addon-designs/blocks";
|
|
3
|
+
|
|
4
|
+
<Meta title="Components/Layouts and Structure/ActionItem" />
|
|
5
|
+
|
|
6
|
+
# Action Item
|
|
7
|
+
|
|
8
|
+
ActionItem allows for consistent presentation of text content that can be
|
|
9
|
+
actioned on. It can use icons to provide additional visual context about the
|
|
10
|
+
text content.
|
|
11
|
+
|
|
12
|
+
## Design & usage guidelines
|
|
13
|
+
|
|
14
|
+
The ActionItem will provide a familiar pattern for enhancing text content with
|
|
15
|
+
icons and providing actions.
|
|
16
|
+
|
|
17
|
+
ActionItem is commonly used [in a Card](/components/Card), where it can be
|
|
18
|
+
grouped with other ActionItems or other elements as needed.
|
|
19
|
+
|
|
20
|
+
If the action appears directly related to the title, or otherwise is not
|
|
21
|
+
well-suited to be centered in the ActionItem, you can
|
|
22
|
+
[align the action](/storybook/mobile/?path=/story/components-layouts-and-structure-actionitem--action-alignment)
|
|
23
|
+
as needed.
|
|
24
|
+
|
|
25
|
+
## Content guidelines
|
|
26
|
+
|
|
27
|
+
ActionItem provides a pre-styled `title`, which can be used to consistently
|
|
28
|
+
title the element. You can use the
|
|
29
|
+
[title](/storybook/mobile/?path=/story/components-layouts-and-structure-actionitem--title-only)
|
|
30
|
+
and not pass any children. This is useful when you have empty states that
|
|
31
|
+
require the user's attention.
|
|
32
|
+
|
|
33
|
+
When an `onPress` is provided, the entire ActionItem is tappable for easy
|
|
34
|
+
interactivity. If a child of the ActionItem has an `onPress`, tapping directly
|
|
35
|
+
on that child will trigger the child item's `onPress`.
|
|
36
|
+
|
|
37
|
+
Child content can be whatever you need but typically consists of
|
|
38
|
+
[Text](/components/Text).
|
|
39
|
+
|
|
40
|
+
## Related components
|
|
41
|
+
|
|
42
|
+
To group multiple ActionItems together with dividers between them, use
|
|
43
|
+
[ActionItemGroup](/components/ActionItemGroup).
|
|
44
|
+
|
|
45
|
+
ActionItem is commonly consumed by [Card](/components/Card). In most cases, it
|
|
46
|
+
will also render at least one [Icon](/components/Icon).
|
|
47
|
+
|
|
48
|
+
## Accessibility
|
|
49
|
+
|
|
50
|
+
The Icons in ActionItem should not be announced to assistive technology. The
|
|
51
|
+
entire contents of the ActionItem should be read as one element.
|
|
52
|
+
|
|
53
|
+
## Mockup
|
|
54
|
+
|
|
55
|
+
<Figma
|
|
56
|
+
collapsable
|
|
57
|
+
url="https://www.figma.com/file/avvgu5SkbBvS8lGVePBsqO/%F0%9F%92%99-Product%2FMobile?node-id=41947%3A224683"
|
|
58
|
+
/>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Meta } from "@storybook/addon-docs";
|
|
2
|
+
|
|
3
|
+
<Meta title="Components/Layouts and Structure/ActionItemGroup" />
|
|
4
|
+
|
|
5
|
+
# Action Item Group
|
|
6
|
+
|
|
7
|
+
ActionItemGroup is a layout wrapper allowing for quick and easy grouping of
|
|
8
|
+
[ActionItems](/components/ActionItem). It can also house other content alongside
|
|
9
|
+
an ActionItem if needed.
|
|
10
|
+
|
|
11
|
+
## Design & usage guidelines
|
|
12
|
+
|
|
13
|
+
The ActionItemGroup makes it easy to consistently display several ActionItems
|
|
14
|
+
alongside each other with dividers to segment each item.
|
|
15
|
+
|
|
16
|
+
## Content guidelines
|
|
17
|
+
|
|
18
|
+
You'll mostly be passing ActionItems into ActionItemGroup, but as shown it can
|
|
19
|
+
handle other content types if needed.
|
|
20
|
+
|
|
21
|
+
In forms in particular, you may find the need to add other elements into the
|
|
22
|
+
group. You may need to use [Content](/components/Content) or write some styling
|
|
23
|
+
to get things aligned. In the Mixed Components
|
|
24
|
+
[example](/storybook/mobile/?path=/story/components-layouts-and-structure-actionitemgroup--mixed-components)
|
|
25
|
+
you can see Content being used to layout [Text](/components/Text) and
|
|
26
|
+
[Typography](/components/Typography) alongside some
|
|
27
|
+
[ActionItems](/components/ActionItem).
|
|
28
|
+
|
|
29
|
+
## Related components
|
|
30
|
+
|
|
31
|
+
If you only need one [ActionItem](/components/ActionItem), you can use that on
|
|
32
|
+
its own without this wrapper.
|
|
33
|
+
|
|
34
|
+
## Accessibility
|
|
35
|
+
|
|
36
|
+
ActionItemGroup is just a layout wrapper and does not communicate anything to
|
|
37
|
+
screen-readers - that's the job of its children.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"tags": {},
|
|
4
|
+
"filePath": "../components-native/src/ActionLabel/ActionLabel.tsx",
|
|
5
|
+
"description": "",
|
|
6
|
+
"displayName": "ActionLabel",
|
|
7
|
+
"methods": [],
|
|
8
|
+
"props": {
|
|
9
|
+
"children": {
|
|
10
|
+
"defaultValue": null,
|
|
11
|
+
"description": "Text to display. Supports nesting text elements.",
|
|
12
|
+
"name": "children",
|
|
13
|
+
"parent": {
|
|
14
|
+
"fileName": "../components-native/src/ActionLabel/ActionLabel.tsx",
|
|
15
|
+
"name": "ActionLabelProps"
|
|
16
|
+
},
|
|
17
|
+
"required": false,
|
|
18
|
+
"type": {
|
|
19
|
+
"name": "ReactNode"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"disabled": {
|
|
23
|
+
"defaultValue": {
|
|
24
|
+
"value": false
|
|
25
|
+
},
|
|
26
|
+
"description": "Set the display text to disabled color",
|
|
27
|
+
"name": "disabled",
|
|
28
|
+
"parent": {
|
|
29
|
+
"fileName": "../components-native/src/ActionLabel/ActionLabel.tsx",
|
|
30
|
+
"name": "ActionLabelProps"
|
|
31
|
+
},
|
|
32
|
+
"required": false,
|
|
33
|
+
"type": {
|
|
34
|
+
"name": "boolean"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"variation": {
|
|
38
|
+
"defaultValue": {
|
|
39
|
+
"value": "interactive"
|
|
40
|
+
},
|
|
41
|
+
"description": "The text color",
|
|
42
|
+
"name": "variation",
|
|
43
|
+
"parent": {
|
|
44
|
+
"fileName": "../components-native/src/ActionLabel/ActionLabel.tsx",
|
|
45
|
+
"name": "ActionLabelProps"
|
|
46
|
+
},
|
|
47
|
+
"required": false,
|
|
48
|
+
"type": {
|
|
49
|
+
"name": "ActionLabelVariation"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"type": {
|
|
53
|
+
"defaultValue": {
|
|
54
|
+
"value": "default"
|
|
55
|
+
},
|
|
56
|
+
"description": "Changes the appearance to match the style of where it's getting used",
|
|
57
|
+
"name": "type",
|
|
58
|
+
"parent": {
|
|
59
|
+
"fileName": "../components-native/src/ActionLabel/ActionLabel.tsx",
|
|
60
|
+
"name": "ActionLabelProps"
|
|
61
|
+
},
|
|
62
|
+
"required": false,
|
|
63
|
+
"type": {
|
|
64
|
+
"name": "ActionLabelType"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"align": {
|
|
68
|
+
"defaultValue": {
|
|
69
|
+
"value": "center"
|
|
70
|
+
},
|
|
71
|
+
"description": "Alignment of action label",
|
|
72
|
+
"name": "align",
|
|
73
|
+
"parent": {
|
|
74
|
+
"fileName": "../components-native/src/ActionLabel/ActionLabel.tsx",
|
|
75
|
+
"name": "ActionLabelProps"
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"type": {
|
|
79
|
+
"name": "TextAlign"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Meta } from "@storybook/addon-docs";
|
|
2
|
+
|
|
3
|
+
<Meta title="Components/Actions/ActionLabel" />
|
|
4
|
+
|
|
5
|
+
# Action Label
|
|
6
|
+
|
|
7
|
+
The ActionLabel is a base component that is widely used in areas that have an
|
|
8
|
+
`onPress` action, like a button.
|
|
9
|
+
|
|
10
|
+
The aim is to reduce the number of inconsistencies when a designer or an
|
|
11
|
+
engineer decides to build a pressable component that has text on it. This makes
|
|
12
|
+
it easier to maintain consistency in how we visually present tappable actions.
|
|
13
|
+
|
|
14
|
+
## Design & usage guidelines
|
|
15
|
+
|
|
16
|
+
ActionLabel supports similar semantic variations as Button:
|
|
17
|
+
|
|
18
|
+
- default (equivalent to "work")
|
|
19
|
+
- learning
|
|
20
|
+
- destructive
|
|
21
|
+
- subtle
|
|
22
|
+
|
|
23
|
+
with an additional variation of `onPrimary` which should be used when the
|
|
24
|
+
ActionLabel is consumed by a primary Button or other dark surface.
|
|
25
|
+
|
|
26
|
+
#### Disable pattern
|
|
27
|
+
|
|
28
|
+
**As a best practice, do not design with disabled button states. **
|
|
29
|
+
|
|
30
|
+
This has negative impacts on accessibility as well as an increase in complexity
|
|
31
|
+
for users to understand why the interface is disabled and how to resolve it.
|
|
32
|
+
|
|
33
|
+
With that said, if you can't design a flow without a disabled state, you can add
|
|
34
|
+
a `disabled` prop to the ActionLabel component.
|