Skip to content

Commit ec6a0d2

Browse files
authored
Merge pull request #32 from GeekyAnts/releases/3.0.7
Releases/3.0.7
2 parents d106e46 + 3aa38d3 commit ec6a0d2

File tree

177 files changed

+11519
-21
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+11519
-21
lines changed

docs/form.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default function () {
125125

126126
Create a button to validate and submit the form.
127127

128-
```SnackPlayer name=Form%20Example(Validate and Submit)
128+
```SnackPlayer name=Form%20Example(Validate%20and%20Submit)
129129
import React from 'react';
130130
import {
131131
VStack,
@@ -196,4 +196,4 @@ export default function () {
196196

197197
## Community Integration
198198

199-
NativeBase can be used with other popular Form libraries like [`Formik`](nativebase-formik-ui.md) and [`React Hook Forms`](reactHooksForm.md) as well. For more details checkout Community Integration section of the docs.
199+
NativeBase can be used with other popular Form libraries like [`Formik`](nativebase-formik-ui.md) and [`React Hook Forms`](reactHooksForms.md) as well. For more details checkout Community Integration section of the docs.

docs/install-cra.mdx

+4-1
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,22 @@ cd my-app
5757
]}>
5858

5959
<TabItem value="yarn">
60+
<div style={{maxWidth:"750px"}}>
6061

6162
```bash
6263
yarn add react-native-web native-base react-native-svg styled-components styled-system react-native-safe-area-context
6364
```
64-
65+
</div>
6566
</TabItem>
6667

6768
<TabItem value="npm">
69+
<div style={{maxWidth:"750px"}}>
6870

6971
```bash
7072
npm install react-native-web native-base react-native-svg styled-components styled-system react-native-safe-area-context
7173
```
7274

75+
</div>
7376
</TabItem>
7477

7578
</Tabs>

docs/loginsignupforms.md

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export default function App() {
3131
return (
3232
<NativeBaseProvider>
3333
<Box
34+
safeArea
3435
flex={1}
3536
p={2}
3637
w="90%"
@@ -140,6 +141,7 @@ export default function App() {
140141
return (
141142
<NativeBaseProvider>
142143
<Box
144+
safeArea
143145
flex={1}
144146
p={2}
145147
w="90%"

nb-plugins/component-snackplayer/index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const processNode = (node, parent) => {
1818
return new Promise(async (resolve, reject) => {
1919
try {
2020
const params = parseParams(node.meta);
21-
const NBversion = '3.0.6';
21+
const NBversion = '3.0.7';
2222
// Gather necessary Params
2323
let name = params.name ? decodeURIComponent(params.name) : 'Example';
2424
const description = params.description
@@ -52,7 +52,6 @@ const processNode = (node, parent) => {
5252
data-snack-preview="${preview}"
5353
data-snack-loading="${loading}"
5454
data-snack-dependencies="${dependencies}"
55-
data-snack-sdkversion="40.0.0"
5655
></div>
5756
`,
5857
});

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docs-v-2",
3-
"version": "3.0.6",
3+
"version": "3.0.7",
44
"private": true,
55
"scripts": {
66
"docusaurus": "docusaurus",
@@ -35,7 +35,7 @@
3535
"clsx": "^1.1.1",
3636
"dedent": "^0.7.0",
3737
"docusaurus-tailwindcss-loader": "file:plugins/docusaurus-tailwindcss-loader",
38-
"native-base": "^3.0.6",
38+
"native-base": "^3.0.7",
3939
"object.fromentries": "^2.0.3",
4040
"patch-package": "^6.4.7",
4141
"postcss": "^7.0.34",

remark-snackplayer/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const processNode = (node, parent) => {
3232
try {
3333
const params = parseParams(node.meta);
3434
const simplifedMeta = simplifyMeta(node.meta);
35-
const NBversion = '3.0.6';
35+
const NBversion = '3.0.7';
3636
// Gather necessary Params
3737
let name = simplifedMeta.name
3838
? decodeURIComponent(simplifedMeta.name)
@@ -51,7 +51,7 @@ const processNode = (node, parent) => {
5151
// Generate Node for SnackPlayer
5252
let dependencies = `react-is,expo-font,native-base@${NBversion},styled-system,expo-constants,react-native-web,react-native-safe-area-context,react-native-svg,styled-components,@expo/vector-icons,expo-linear-gradient`;
5353
dependencies = `${dependencies},${
54-
simplifedMeta.dependencies ? simplifedMeta.dependencies : ''
54+
simplifedMeta.dependencies ? simplifedMeta.dependencies : null
5555
}`;
5656

5757
if (name.split(' ')[0] === 'Formik') {

docs/Kbd.md unreleased-docs/Kbd.md

File renamed without changes.
File renamed without changes.

docs/appBar.md unreleased-docs/appBar.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ export default function () {
7878

7979
### AppBar.Left
8080

81-
Implements [`HStack`](hStack.md), all the props of HStack can be passed.
81+
Implements [`HStack`](hStack.md) , all the props of HStack can be passed.
8282

8383
### AppBar.Content
8484

85-
Implements [`HStack`](hStack.md), all the props of HStack can be passed.
85+
Implements [`HStack`](hStack.md) , all the props of HStack can be passed.
8686

8787
### AppBar.Right
8888

89-
Implements [`HStack`](hStack.md), all the props of HStack can be passed.
89+
Implements [`HStack`](hStack.md) , all the props of HStack can be passed.

docs/aspectRatio.md unreleased-docs/aspectRatio.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function Component() {
4545
<Image
4646
resizeMode="cover"
4747
source={{
48-
uri: "https://nativebase.io/img/icon.png",
48+
uri: "https://alpha.nativebase.io/img/icon.png",
4949
}}
5050
/>
5151
</AspectRatio>

docs/breadCrumb.md unreleased-docs/breadCrumb.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function BreadcrumbComponent () {
3737
<Breadcrumb.Link>Home (This is currently active)</Breadcrumb.Link>
3838
</Breadcrumb.Item>
3939
<Breadcrumb.Item>
40-
<Breadcrumb.Link href="https://nativebase.io/" isExternal>
40+
<Breadcrumb.Link href="https://alpha.nativebase.io/" isExternal>
4141
Docs
4242
</Breadcrumb.Link>
4343
</Breadcrumb.Item>
@@ -90,7 +90,7 @@ function BreadcrumbComponent () {
9090
<Breadcrumb.Link>Home (This is currently active)</Breadcrumb.Link>
9191
</Breadcrumb.Item>
9292
<Breadcrumb.Item>
93-
<Breadcrumb.Link href="https://nativebase.io/" isExternal>
93+
<Breadcrumb.Link href="https://alpha.nativebase.io/" isExternal>
9494
Docs
9595
</Breadcrumb.Link>
9696
</Breadcrumb.Item>
@@ -138,7 +138,7 @@ function BreadcrumbComponent () {
138138
<Breadcrumb.Link>Home (This is currently active)</Breadcrumb.Link>
139139
</Breadcrumb.Item>
140140
<Breadcrumb.Item>
141-
<Breadcrumb.Link href="https://nativebase.io/" isExternal>
141+
<Breadcrumb.Link href="https://alpha.nativebase.io/" isExternal>
142142
Docs
143143
</Breadcrumb.Link>
144144
</Breadcrumb.Item>
@@ -186,7 +186,7 @@ function BreadcrumbComponent () {
186186
</Breadcrumb.Link>
187187
</Breadcrumb.Item>
188188
<Breadcrumb.Item>
189-
<Breadcrumb.Link href="https://nativebase.io/" isExternal>
189+
<Breadcrumb.Link href="https://alpha.nativebase.io/" isExternal>
190190
<HStack>
191191
<Icon name="file-document" type="MaterialCommunityIcons" mr={1} />
192192
<Text>Docs</Text>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

unreleased-docs/interaction-styles.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
id: interaction-styles
3+
title: Adding pressed, hover and focus styles
4+
---
File renamed without changes.
File renamed without changes.
File renamed without changes.

unreleased-docs/platform-styles.md

Whitespace-only changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/tag.md unreleased-docs/tag.md

File renamed without changes.
File renamed without changes.

unreleased-docs/view.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
id: view
3+
title: View
4+
---
5+
6+
A generic [`View`](https://reactnative.dev/docs/view) from [React Native](https://reactnative.dev/docs/view)
7+
8+
## Implements
9+
10+
- [`View`](https://reactnative.dev/docs/view) from [`React Native`](https://reactnative.dev)
11+
- [`color`](https://styled-system.com/api/#color), [`space`](https://styled-system.com/api/#space), [`layout`](https://styled-system.com/api/#layout), [`flexbox`](https://styled-system.com/api/#flexbox), [`position`](https://styled-system.com/api/#flexbox) & [`border`](https://styled-system.com/api/#border) from [`style-system`](https://styled-system.com/)
12+
13+
## Example
14+
15+
### Basic
16+
17+
```SnackPlayer name=View%20Example
18+
import React from "react";
19+
import { Text, VStack, NativeBaseProvider, View, Center } from "native-base";
20+
21+
function ViewComponent() {
22+
return (
23+
<View
24+
size={48}
25+
bg="emerald.400"
26+
justifyContent="center"
27+
alignItems="center"
28+
rounded="md"
29+
>
30+
<Text color="white">This is a View</Text>
31+
</View>
32+
);
33+
}
34+
35+
// Example template which wraps component with NativeBaseProvider
36+
export default function () {
37+
return (
38+
<NativeBaseProvider>
39+
<Center flex={1}>
40+
<ViewComponent />
41+
</Center>
42+
</NativeBaseProvider>
43+
);
44+
}
45+
```
46+
47+
## Props
48+
49+
| Name | Type | Description | Default |
50+
| ------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | ------- |
51+
| shadow | number | Applies box shadow and accepts a number from 0 to 9 | - |
52+
| style | stylesheet | Applies user-defined styles and accepts a stylesheet. | - |
53+
| children | JSX.Element | Renders components as Box children. Accepts a JSX.Element or an array of JSX.Element. | - |
54+
| SafeAreaProps | [SafeAreaProps](safe-area-view-props.md) | Renders components as Box children. Accepts a JSX.Element or an array of JSX.Element. | - |
File renamed without changes.

versioned_docs/version-3.0.7/FAB.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
id: FAB
3+
title: FAB
4+
---
5+
6+
import { ComponentTheme } from '../../src/components';
7+
8+
A floating action button is a circular icon button that hovers over content to promote a primary action in the application.
9+
10+
## Import
11+
12+
```jsx
13+
import { Fab } from 'native-base';
14+
```
15+
16+
## Example
17+
18+
### Basic
19+
20+
```ComponentSnackPlayer path=composites,Fab,Basic.tsx
21+
22+
```
23+
24+
### Placement
25+
26+
```ComponentSnackPlayer path=composites,Fab,Placement.tsx
27+
28+
```
29+
30+
### Custom Position
31+
32+
```ComponentSnackPlayer path=composites,Fab,CustomPosition.tsx
33+
34+
```
35+
36+
## Styling
37+
38+
<ComponentTheme name="fab" componentName="FAB" />
39+
40+
## Props
41+
42+
```ComponentPropTable path=composites,Fab,Fab.tsx
43+
44+
```
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
id: VStack
3+
title: VStack / Column
4+
---
5+
6+
`VStack` aligns items vertically.`Column` is also an alias for `VStack`.
7+
8+
## Import
9+
10+
```jsx
11+
import { VStack } from 'native-base';
12+
```
13+
14+
## Usage
15+
16+
```ComponentSnackPlayer path=primitives,VStack,basic.tsx
17+
18+
```
19+
20+
## Props
21+
22+
```ComponentPropTable path=primitives,Stack,VStack.tsx
23+
24+
```
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
`ZStack` aligns items absolutely in the z-axis.
2+
3+
## Examples
4+
5+
### Basic
6+
7+
```ComponentSnackPlayer path=primitives,ZStack,example.tsx
8+
9+
```
10+
11+
### Items Centered
12+
13+
You can pass `alignItems="center"` `justifyContent="center"` to vertically and horizontally center the children.
14+
15+
```ComponentSnackPlayer path=primitives,ZStack,CenterStack.tsx
16+
17+
```
18+
19+
## Props
20+
21+
```ComponentPropTable path=primitives,ZStack,index.tsx
22+
23+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
id: accessibility
3+
title: Accessibility
4+
---
5+
6+
NativeBase comes with the latest accessibility standards out of the box including aria and role attributes, focus management, and keyboard navigation.
7+
8+
## Accessible Roles
9+
10+
NativeBase uses [React Native ARIA](https://react-native-aria.geekyants.com/) to implements [WAI-ARIA](https://www.w3.org/TR/wai-aria-1.2/) standards to its components. This is designed to provide meaning for controls that aren't built using components provided by the platform.
11+
12+
## Accessible Labels
13+
14+
When a view is marked as accessible, it is a good practice to set an `accessibilityLabel` on the view, so that people who use voice-over know what element they have selected. Voice-over will read this string when a user selects the associated element. NativeBase with the use of [React Native ARIA](https://www.notion.so/Accessibility-83852d7c4b094e69a3e4f1047994bd1c) does this for you out of the box.
15+
16+
## Keyboard Navigation
17+
18+
Many complex components, like Tabs and Dialog, come with expectations from users on how to interact with their content using a keyboard or other non-mouse input modalities. NativeBase Primitives provide basic keyboard support in accordance with the [WAI-ARIA authoring practices](https://www.w3.org/TR/wai-aria-practices-1.2/).
19+
20+
## Focus Management
21+
22+
Proper keyboard navigation and good labelling often go hand-in-hand with managing focus. When a user interacts with a component and something changes as a result, it's often helpful to move focus with the interaction. And for screen reader users, moving focus often results in an announcement to convey the new context, which relies on proper labelling.
23+
24+
In many NativeBase Components, we move focus based on the interactions a user normally takes in a given component. For example, in `Modal`, when the modal is opened, the focus is programmatically moved to the `first focusable element` and trapped inside the modal to anticipate a response to the prompt.

0 commit comments

Comments
 (0)