Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch #1917

Merged
merged 92 commits into from
Mar 12, 2024
Merged

Patch #1917

Changes from 4 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
d09245b
feat: added examples for with-gluestack-ui components
sra1kumar-NULL Feb 22, 2024
08a0740
Merge branch 'patch' into feat/examples-with-gluestack
sra1kumar-NULL Feb 29, 2024
f7a125a
feat: added nativewind pressable component examples
rajat693 Mar 1, 2024
96cc692
feat: adding nativewind progress component examples
rajat693 Mar 1, 2024
9738953
feat: added nativewind progress component examples
rajat693 Mar 1, 2024
f9b2a6f
feat: add icons example
DaminiPandey Mar 1, 2024
9b1f512
Merge branch 'patch' of https://github.com/gluestack/gluestack-ui int…
DaminiPandey Mar 1, 2024
c624650
feat: add HStack examples
DaminiPandey Mar 1, 2024
16260ed
Merge branch 'patch' of https://github.com/gluestack/gluestack-ui int…
DaminiPandey Mar 1, 2024
75b033a
chore: refact code
DaminiPandey Mar 1, 2024
f2be03a
fix: nativewind imports
DaminiPandey Mar 1, 2024
3a284a4
feat: pull from patch
DaminiPandey Mar 1, 2024
2bfb58d
fix: nativewind imports
DaminiPandey Mar 4, 2024
db10893
Merge branch 'patch' of https://github.com/gluestack/gluestack-ui int…
DaminiPandey Mar 4, 2024
4466a40
fix: icon base color
DaminiPandey Mar 4, 2024
30eb31d
fix: badge component nativewind
rajat693 Mar 4, 2024
8927fc9
feat: initial commit
DaminiPandey Mar 4, 2024
149d030
fix: card example breaking
DaminiPandey Mar 4, 2024
87c4442
fix: remove select and modal examples from form control story
DaminiPandey Mar 4, 2024
ed30c60
Merge branch 'patch' into feat/examples-with-gluestack
sra1kumar-NULL Mar 4, 2024
bda50f2
fix: button component nativewind
rajat693 Mar 4, 2024
87a9039
fix: checkbox component nativewind
rajat693 Mar 4, 2024
fec3ddb
feat: add radio examples
DaminiPandey Mar 4, 2024
958c873
Merge branch 'patch' of https://github.com/gluestack/gluestack-ui int…
DaminiPandey Mar 4, 2024
008a525
fix: input component nativewind
rajat693 Mar 4, 2024
e52abac
fix: fab component
DaminiPandey Mar 4, 2024
2c0baf6
fix: button focusVisible
rajat693 Mar 4, 2024
77a4d70
fix: fab focus issue
DaminiPandey Mar 5, 2024
f9c26c4
Merge branch 'patch' of https://github.com/gluestack/gluestack-ui int…
DaminiPandey Mar 5, 2024
d018938
fix: input focus
Mar 5, 2024
e14604b
Merge branch 'patch' of https://github.com/gluestack/gluestack-ui int…
DaminiPandey Mar 6, 2024
9e8476e
feat: pull from patch and remove unused components
DaminiPandey Mar 6, 2024
6e503d9
Merge branch 'patch' of https://github.com/gluestack/gluestack-ui int…
DaminiPandey Mar 6, 2024
137b0ae
Merge branch 'patch' of https://github.com/gluestack/gluestack-ui int…
DaminiPandey Mar 6, 2024
82b2c48
fix: card example breaking
DaminiPandey Mar 6, 2024
6224ea1
Merge branch 'patch' of https://github.com/gluestack/gluestack-ui int…
DaminiPandey Mar 6, 2024
1bc2a7e
fix: merge conflicts of progress
Mar 6, 2024
9db725a
Merge branch 'patch' of https://github.com/gluestack/gluestack-ui int…
DaminiPandey Mar 6, 2024
5b68226
fix: merge conflicts of pressable
Mar 6, 2024
81788f0
fix: merge conflicts of badge
Mar 6, 2024
5d7ef5b
Merge branch 'patch' of https://github.com/gluestack/gluestack-ui int…
DaminiPandey Mar 6, 2024
c291242
Merge branch 'patch' of github.com:gluestack/gluestack-ui into fix/bu…
Mar 6, 2024
e43d0b6
Merge branch 'patch' of github.com:gluestack/gluestack-ui into fix/ch…
Mar 6, 2024
4294425
fix: fab story breaking
DaminiPandey Mar 6, 2024
b73e151
fix: merge conflicts of input
Mar 6, 2024
b6aaa49
Merge pull request #1909 from gluestack/main
ankit-tailor Mar 6, 2024
55b56b9
Merge branch 'patch' into feat/examples-with-gluestack
sra1kumar-NULL Mar 6, 2024
6b2be83
feat: added examples for actionsheet & icon
sra1kumar-NULL Mar 6, 2024
c7789cf
Merge branch 'patch' into feat/examples-pending-themed
sra1kumar-NULL Mar 6, 2024
a8c779f
Merge pull request #1834 from gluestack/feat/examples-with-gluestack
Viraj-10 Mar 7, 2024
16f12f0
Merge pull request #1889 from gluestack/feat/examples-pending-themed
Viraj-10 Mar 7, 2024
d320e9e
fix: remove utility props
DaminiPandey Mar 7, 2024
06c6c17
fix: added fixes for issues in themed components
sra1kumar-NULL Mar 7, 2024
4de2275
fix: center, spinner, formcontrol, link, textarea
Mar 7, 2024
31d85bc
feat: add examples for nativewind card component
DaminiPandey Mar 7, 2024
27c0afa
Update index.nw.stories.mdx
surajahmed Mar 7, 2024
d3ce823
Update index.themed.stories.mdx
surajahmed Mar 7, 2024
c246af5
feat: added switch component with examples natiivewind
Mar 8, 2024
8236214
fix: remove spec docs
DaminiPandey Mar 8, 2024
2d3d9e1
Merge branch 'patch' of https://github.com/gluestack/gluestack-ui int…
DaminiPandey Mar 8, 2024
12a85be
fix: plugin sx prop issue
ankit-tailor Mar 11, 2024
aa069bf
fix: rsc issue
Mar 11, 2024
68f6786
v0.0.9
Mar 11, 2024
297a347
fix: rsc issue
Mar 11, 2024
421ef98
v0.0.10
Mar 11, 2024
714cc35
fix: merge conflicts
Mar 11, 2024
02d0d42
Merge pull request #1871 from gluestack/feat/eg-progress
surajahmed Mar 11, 2024
6f3c62d
Merge pull request #1876 from gluestack/feat/eg-pressable
surajahmed Mar 11, 2024
5b3c3c1
Merge pull request #1879 from gluestack/fix/badge
surajahmed Mar 11, 2024
3ed9dc3
Merge pull request #1880 from gluestack/fix/card-nativewind
surajahmed Mar 11, 2024
cf37b8b
Merge pull request #1881 from gluestack/fix/form-control
surajahmed Mar 11, 2024
a4a177d
Merge pull request #1885 from gluestack/fix/button-nativewind
surajahmed Mar 11, 2024
dfa0dc7
Merge pull request #1886 from gluestack/fix/checkbox-nativewind
surajahmed Mar 11, 2024
7c36bc5
Merge pull request #1888 from gluestack/fix/nativewind-input
surajahmed Mar 11, 2024
dd96d49
Merge pull request #1890 from gluestack/fix/fab
surajahmed Mar 11, 2024
0f668e7
Merge pull request #1911 from gluestack/fix/nativewind-compts
surajahmed Mar 11, 2024
b9d308b
Merge pull request #1916 from gluestack/feat/switch-nativewind
surajahmed Mar 11, 2024
5fb8a32
Merge pull request #1914 from gluestack/fix/themed-ui-issues
surajahmed Mar 11, 2024
b44781a
fix: app provider issue
Mar 11, 2024
08a63d8
fix: app provider issue
Mar 11, 2024
c51cc1d
Merge pull request #1921 from gluestack/fix/merged-patch
surajahmed Mar 11, 2024
4a49e9d
fix: modal for gluestack-style
Mar 11, 2024
0e44e99
Merge pull request #1923 from gluestack/fix/modal-gluestack-style
surajahmed Mar 11, 2024
a3bb473
fix: app provider issue
Mar 12, 2024
7079948
Merge pull request #1926 from gluestack/fix/merged-patch
surajahmed Mar 12, 2024
806082d
Merge pull request #1872 from gluestack/feat/icons-example
surajahmed Mar 12, 2024
c78ebed
Merge pull request #1874 from gluestack/feat/HStack-examples
surajahmed Mar 12, 2024
c312657
Merge pull request #1887 from gluestack/feat/radio-examples
surajahmed Mar 12, 2024
acd925b
fix: app provider issue
Mar 12, 2024
235942f
fix: ref typings
ankit-tailor Mar 12, 2024
13b7cbf
Merge pull request #1927 from gluestack/fix/ref-typings
ankit-tailor Mar 12, 2024
7955974
Merge pull request #1920 from gluestack/fix/plugin-sx-prop-issue
ankit-tailor Mar 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React from 'react';

import { VStack, Text, Box, Heading, Center } from '@gluestack-ui/themed';

import { Progress, ProgressFilledTrack } from '@/components/ui/progress';
import { VStack } from '@/components/ui/vstack';
import { Box } from '@/components/ui/box';
import { Heading } from '@/components/ui/heading';
import { Center } from '@/components/ui/center';

const ProgressBasic = ({ value = 50, ...props }: any) => {
return (
@@ -31,4 +32,4 @@ ProgressBasic.description =

export default ProgressBasic;

export { Progress, ProgressFilledTrack, VStack, Text, Box, Heading };
export { Progress, ProgressFilledTrack, VStack, Box, Heading };
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Progress | gluestack-ui | Installation, Usage, and API
title: gluestack-ui Progress Component | Installation, Usage, and API

description: The Progress component is designed to display the progress of a task that involves multiple steps and takes some time to complete. It helps users stay informed about the current status of a lengthy process.

@@ -165,17 +165,151 @@ We have outlined the various features that ensure the Fab component is accessibl

Progress component is created using View component from react-native. It extends all the props supported by [React Native View](https://reactnative.dev/docs/view#props).

<!--
## Spec Doc
#### Progress

Explore the comprehensive details of the Progress in this document, including its implementation details, checklist, and potential future additions. Dive into the thought process behind the component and gain insights into its development journey.
<AppProvider>
<TableContainer>
<Table>
<Table.THead>
<Table.TR>
<Table.TH>
<Table.TText>Name</Table.TText>
</Table.TH>
<Table.TH>
<Table.TText>Value</Table.TText>
</Table.TH>
<Table.TH>
<Table.TText>Default</Table.TText>
</Table.TH>
</Table.TR>
</Table.THead>
<Table.TBody>
<Table.TR>
<Table.TD>
<Table.TText>
<InlineCode>size</InlineCode>
</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>xs | sm | md | lg | xl | 2xl</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>md</Table.TText>
</Table.TD>
</Table.TR>
</Table.TBody>
</Table>
</TableContainer>
</AppProvider>

<iframe
style={{
borderRadius: '8px',
border: ' 1px solid rgba(0, 0, 0, 0.1)',
aspectRatio: 736 / 585,
}}
src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Fproto%2FNcXOxqKbdnGsLQNex3H76u%2F%25C2%25A0%25F0%259F%2593%259Agluestack-UI-handbook%3Ftype%3Ddesign%26node-id%3D6282-35554%26t%3DSqzrgr3fIhnmO5iO-1%26scaling%3Dscale-down%26page-id%3D6282%253A33652%26starting-point-node-id%3D6282%253A35554%26mode%3Ddesign"
allowFullScreen
/> -->
> Note: These props are exclusively applicable when utilizing the default configuration of gluestack-ui/config. If you are using a custom theme, these props may not be available.

### Examples

The Examples section provides visual representations of the different variants of the component, allowing you to quickly and easily determine which one best fits your needs. Simply copy the code and integrate it into your project.

#### Value

Progress component with value

<AppProvider>
<CodePreview
showComponentRenderer={true}
showArgsController={false}
metaData={{
code: `
<VStack space="lg">
<Text size="lg">Downloading 55%</Text>
<Progress value={55} className='w-80 h-1'>
<ProgressFilledTrack className='h-1' />
</Progress>
</VStack>
`,
transformCode: (code) => {
return transformedCode(code);
},
scope: {
Wrapper,
Progress,
ProgressFilledTrack,
VStack,
Text,
Box,
},
argsType: {},
}}
/>
</AppProvider>

#### Color

You can add track color to progress bar as per our needs.

<AppProvider>
<CodePreview
showComponentRenderer={true}
showArgsController={false}
metaData={{
code: `
<VStack space="3xl">
<Progress value={46} className='w-96 h-2' size="sm">
<ProgressFilledTrack className='bg-emerald-600'/>
</Progress>
<Progress value={46} className='w-96 h-2' size="sm">
<ProgressFilledTrack className='bg-amber-600'/>
</Progress>
<Progress value={46} className='w-96 h-2' size="sm">
<ProgressFilledTrack className='bg-fuchsia-600'/>
</Progress>
<Progress value={46} className='w-96 h-2' size="sm">
<ProgressFilledTrack className='bg-cyan-600'/>
</Progress>
</VStack>
`,
transformCode: (code) => {
return transformedCode(code);
},
scope: {
Wrapper,
Progress,
ProgressFilledTrack,
VStack,
},
argsType: {},
}}
/>
</AppProvider>

#### Custom

You can customize the progress bar. Below is the example where we have change the theme of progress bar.

<AppProvider>
<CodePreview
showComponentRenderer={true}
showArgsController={false}
metaData={{
code: `
<VStack space="lg">
<Heading>Internal Storage</Heading>
<Progress value={46} className='w-[410px] h-2 bg-lime-100'>
<ProgressFilledTrack className='h-2 bg-lime-500' />
</Progress>
<Text size="md">14GB</Text>
</VStack>
`,
transformCode: (code) => {
return transformedCode(code);
},
scope: {
Wrapper,
Progress,
ProgressFilledTrack,
VStack,
Heading,
Text,
},
argsType: {},
}}
/>
</AppProvider>
Original file line number Diff line number Diff line change
@@ -29,9 +29,6 @@ const progressStyle = tva({
'2xl': 'h-6',
},
},
defaultVariants: {
size: 'md',
},
});
const progressFilledTrackStyle = tva({
base: 'bg-primary-500 rounded-full',