@giv-igniteui/react 2.0.0 → 2.0.1
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/.eslintrc.json +2 -2
- package/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +1718 -5
- package/dist/index.d.ts +1718 -5
- package/dist/index.js +54 -16
- package/dist/index.mjs +45 -15
- package/package.json +1 -1
- package/src/components/Avatar/index.tsx +18 -18
- package/src/components/Avatar/styles.ts +29 -29
- package/src/components/Box.tsx +12 -12
- package/src/components/Button.tsx +87 -84
- package/src/components/Checkbox/index.tsx +20 -20
- package/src/components/Checkbox/styles.ts +55 -55
- package/src/components/Heading.tsx +27 -27
- package/src/components/MultiStep/index.tsx +23 -23
- package/src/components/MultiStep/styles.ts +33 -33
- package/src/components/Text.tsx +32 -32
- package/src/components/TextArea.tsx +34 -34
- package/src/components/TextInput/index.tsx +19 -17
- package/src/components/TextInput/styles.ts +58 -43
- package/src/index.tsx +11 -9
- package/src/styles/index.ts +36 -36
- package/tsconfig.json +5 -5
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import * as Checkbox from '@radix-ui/react-checkbox'
|
|
2
|
-
import { keyframes, styled } from '../../styles'
|
|
3
|
-
|
|
4
|
-
export const CheckboxContainer = styled(Checkbox.Root, {
|
|
5
|
-
all: 'unset', // Como é um botão, all unset tirará borda, background, etc
|
|
6
|
-
width: '$6',
|
|
7
|
-
height: '$6',
|
|
8
|
-
backgroundColor: '$gray900',
|
|
9
|
-
borderRadius: '$xs',
|
|
10
|
-
cursor: 'pointer',
|
|
11
|
-
overflow: 'hidden',
|
|
12
|
-
boxSizing: 'border-box',
|
|
13
|
-
display: 'flex',
|
|
14
|
-
justifyContent: 'center',
|
|
15
|
-
alignItems: 'center',
|
|
16
|
-
border: '2px solid $gray900',
|
|
17
|
-
|
|
18
|
-
'&[data-state="checked"]': {
|
|
19
|
-
backgroundColor: '$ignite300',
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
'&:focus': {
|
|
23
|
-
border: '2px solid $ignite300',
|
|
24
|
-
},
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
const slideIn = keyframes({
|
|
28
|
-
from: {
|
|
29
|
-
transform: 'translateY(-100%)',
|
|
30
|
-
},
|
|
31
|
-
to: {
|
|
32
|
-
transform: 'translateY(0)',
|
|
33
|
-
},
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
const slideOut = keyframes({
|
|
37
|
-
from: {
|
|
38
|
-
transform: 'translateY(0)',
|
|
39
|
-
},
|
|
40
|
-
to: {
|
|
41
|
-
transform: 'translateY(-100%)',
|
|
42
|
-
},
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
export const CheckboxIndicator = styled(Checkbox.Indicator, {
|
|
46
|
-
color: 'white',
|
|
47
|
-
width: '$4',
|
|
48
|
-
height: '$4',
|
|
49
|
-
'&[data-state="checked"]': {
|
|
50
|
-
animation: `${slideIn} 200ms ease-out`,
|
|
51
|
-
},
|
|
52
|
-
'&[data-state="unchecked"]': {
|
|
53
|
-
animation: `${slideOut} 200ms ease-out`,
|
|
54
|
-
},
|
|
55
|
-
})
|
|
1
|
+
import * as Checkbox from '@radix-ui/react-checkbox'
|
|
2
|
+
import { keyframes, styled } from '../../styles'
|
|
3
|
+
|
|
4
|
+
export const CheckboxContainer = styled(Checkbox.Root, {
|
|
5
|
+
all: 'unset', // Como é um botão, all unset tirará borda, background, etc
|
|
6
|
+
width: '$6',
|
|
7
|
+
height: '$6',
|
|
8
|
+
backgroundColor: '$gray900',
|
|
9
|
+
borderRadius: '$xs',
|
|
10
|
+
cursor: 'pointer',
|
|
11
|
+
overflow: 'hidden',
|
|
12
|
+
boxSizing: 'border-box',
|
|
13
|
+
display: 'flex',
|
|
14
|
+
justifyContent: 'center',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
border: '2px solid $gray900',
|
|
17
|
+
|
|
18
|
+
'&[data-state="checked"]': {
|
|
19
|
+
backgroundColor: '$ignite300',
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
'&:focus, &[data-state="checked"]': {
|
|
23
|
+
border: '2px solid $ignite300',
|
|
24
|
+
},
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
const slideIn = keyframes({
|
|
28
|
+
from: {
|
|
29
|
+
transform: 'translateY(-100%)',
|
|
30
|
+
},
|
|
31
|
+
to: {
|
|
32
|
+
transform: 'translateY(0)',
|
|
33
|
+
},
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
const slideOut = keyframes({
|
|
37
|
+
from: {
|
|
38
|
+
transform: 'translateY(0)',
|
|
39
|
+
},
|
|
40
|
+
to: {
|
|
41
|
+
transform: 'translateY(-100%)',
|
|
42
|
+
},
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
export const CheckboxIndicator = styled(Checkbox.Indicator, {
|
|
46
|
+
color: 'white',
|
|
47
|
+
width: '$4',
|
|
48
|
+
height: '$4',
|
|
49
|
+
'&[data-state="checked"]': {
|
|
50
|
+
animation: `${slideIn} 200ms ease-out`,
|
|
51
|
+
},
|
|
52
|
+
'&[data-state="unchecked"]': {
|
|
53
|
+
animation: `${slideOut} 200ms ease-out`,
|
|
54
|
+
},
|
|
55
|
+
})
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { ComponentProps } from 'react'
|
|
2
|
-
import { styled } from '../styles'
|
|
3
|
-
|
|
4
|
-
export const Heading = styled('h2', {
|
|
5
|
-
fontFamily: '$default',
|
|
6
|
-
lineHeight: '$shorter',
|
|
7
|
-
margin: 0,
|
|
8
|
-
color: '$gray100',
|
|
9
|
-
variants: {
|
|
10
|
-
size: {
|
|
11
|
-
sm: { fontSize: '$xl' },
|
|
12
|
-
md: { fontSize: '$2xl' },
|
|
13
|
-
lg: { fontSize: '$4xl' },
|
|
14
|
-
'2xl': { fontSize: '$5xl' },
|
|
15
|
-
'3xl': { fontSize: '$6xl' },
|
|
16
|
-
'4xl': { fontSize: '$7xl' },
|
|
17
|
-
'5xl': { fontSize: '$8xl' },
|
|
18
|
-
'6xl': { fontSize: '$9xl' },
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
defaultVariants: {
|
|
22
|
-
size: 'md',
|
|
23
|
-
},
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
export interface HeadingProps extends ComponentProps<typeof Heading> {}
|
|
27
|
-
Heading.displayName = 'Heading'
|
|
1
|
+
import { ComponentProps } from 'react'
|
|
2
|
+
import { styled } from '../styles'
|
|
3
|
+
|
|
4
|
+
export const Heading = styled('h2', {
|
|
5
|
+
fontFamily: '$default',
|
|
6
|
+
lineHeight: '$shorter',
|
|
7
|
+
margin: 0,
|
|
8
|
+
color: '$gray100',
|
|
9
|
+
variants: {
|
|
10
|
+
size: {
|
|
11
|
+
sm: { fontSize: '$xl' },
|
|
12
|
+
md: { fontSize: '$2xl' },
|
|
13
|
+
lg: { fontSize: '$4xl' },
|
|
14
|
+
'2xl': { fontSize: '$5xl' },
|
|
15
|
+
'3xl': { fontSize: '$6xl' },
|
|
16
|
+
'4xl': { fontSize: '$7xl' },
|
|
17
|
+
'5xl': { fontSize: '$8xl' },
|
|
18
|
+
'6xl': { fontSize: '$9xl' },
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
size: 'md',
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
export interface HeadingProps extends ComponentProps<typeof Heading> {}
|
|
27
|
+
Heading.displayName = 'Heading'
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { Label, MultistepContainer, Step, Steps } from './styles'
|
|
2
|
-
|
|
3
|
-
export interface MultiStepProps {
|
|
4
|
-
size: number
|
|
5
|
-
currentStep?: number
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export function MultiStep({ size, currentStep = 1 }: MultiStepProps) {
|
|
9
|
-
return (
|
|
10
|
-
<MultistepContainer>
|
|
11
|
-
<Label>
|
|
12
|
-
Passo {currentStep} de {size}
|
|
13
|
-
</Label>
|
|
14
|
-
<Steps css={{ '--steps-size': size }}>
|
|
15
|
-
{Array.from({ length: size }, (_, i) => i + 1).map((step) => {
|
|
16
|
-
return <Step key={step} active={currentStep >= step} />
|
|
17
|
-
})}
|
|
18
|
-
</Steps>
|
|
19
|
-
</MultistepContainer>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
MultiStep.displayName = 'MultiStep'
|
|
1
|
+
import { Label, MultistepContainer, Step, Steps } from './styles'
|
|
2
|
+
|
|
3
|
+
export interface MultiStepProps {
|
|
4
|
+
size: number
|
|
5
|
+
currentStep?: number
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function MultiStep({ size, currentStep = 1 }: MultiStepProps) {
|
|
9
|
+
return (
|
|
10
|
+
<MultistepContainer>
|
|
11
|
+
<Label>
|
|
12
|
+
Passo {currentStep} de {size}
|
|
13
|
+
</Label>
|
|
14
|
+
<Steps css={{ '--steps-size': size }}>
|
|
15
|
+
{Array.from({ length: size }, (_, i) => i + 1).map((step) => {
|
|
16
|
+
return <Step key={step} active={currentStep >= step} />
|
|
17
|
+
})}
|
|
18
|
+
</Steps>
|
|
19
|
+
</MultistepContainer>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
MultiStep.displayName = 'MultiStep'
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { styled } from '../../styles'
|
|
2
|
-
import { Text } from '../Text'
|
|
3
|
-
|
|
4
|
-
export const MultistepContainer = styled('div', {})
|
|
5
|
-
export const Label = styled(Text, {
|
|
6
|
-
color: '$gray200',
|
|
7
|
-
|
|
8
|
-
defaultVariants: {
|
|
9
|
-
size: 'xs',
|
|
10
|
-
},
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
export const Steps = styled('div', {
|
|
14
|
-
display: 'grid',
|
|
15
|
-
gap: '$2',
|
|
16
|
-
marginTop: '$1',
|
|
17
|
-
gridTemplateColumns: 'repeat(var(--steps-size), 1fr)',
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
export const Step = styled('div', {
|
|
21
|
-
height: '$1',
|
|
22
|
-
borderRadius: '$px',
|
|
23
|
-
backgroundColor: '$gray600',
|
|
24
|
-
variants: {
|
|
25
|
-
active: {
|
|
26
|
-
true: {
|
|
27
|
-
backgroundColor: '$gray100',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
export const Full = styled('div', {})
|
|
1
|
+
import { styled } from '../../styles'
|
|
2
|
+
import { Text } from '../Text'
|
|
3
|
+
|
|
4
|
+
export const MultistepContainer = styled('div', {})
|
|
5
|
+
export const Label = styled(Text, {
|
|
6
|
+
color: '$gray200',
|
|
7
|
+
|
|
8
|
+
defaultVariants: {
|
|
9
|
+
size: 'xs',
|
|
10
|
+
},
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
export const Steps = styled('div', {
|
|
14
|
+
display: 'grid',
|
|
15
|
+
gap: '$2',
|
|
16
|
+
marginTop: '$1',
|
|
17
|
+
gridTemplateColumns: 'repeat(var(--steps-size), 1fr)',
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
export const Step = styled('div', {
|
|
21
|
+
height: '$1',
|
|
22
|
+
borderRadius: '$px',
|
|
23
|
+
backgroundColor: '$gray600',
|
|
24
|
+
variants: {
|
|
25
|
+
active: {
|
|
26
|
+
true: {
|
|
27
|
+
backgroundColor: '$gray100',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
export const Full = styled('div', {})
|
package/src/components/Text.tsx
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { ComponentProps } from 'react'
|
|
2
|
-
import { styled } from '../styles'
|
|
3
|
-
|
|
4
|
-
export const Text = styled('p', {
|
|
5
|
-
fontFamily: '$default',
|
|
6
|
-
lineHeight: '$base',
|
|
7
|
-
margin: 0,
|
|
8
|
-
color: '$gray100',
|
|
9
|
-
variants: {
|
|
10
|
-
size: {
|
|
11
|
-
xxs: { fontSize: '$xxs' },
|
|
12
|
-
xs: { fontSize: '$xs' },
|
|
13
|
-
sm: { fontSize: '$sm' },
|
|
14
|
-
md: { fontSize: '$md' },
|
|
15
|
-
lg: { fontSize: '$lg' },
|
|
16
|
-
xl: { fontSize: '$xl' },
|
|
17
|
-
'2xl': { fontSize: '$2xl' },
|
|
18
|
-
'4xl': { fontSize: '$4xl' },
|
|
19
|
-
'5xl': { fontSize: '$5xl' },
|
|
20
|
-
'6xl': { fontSize: '$6xl' },
|
|
21
|
-
'7xl': { fontSize: '$7xl' },
|
|
22
|
-
'8xl': { fontSize: '$8xl' },
|
|
23
|
-
'9xl': { fontSize: '$9xl' },
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
defaultVariants: {
|
|
27
|
-
size: 'md',
|
|
28
|
-
},
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
export interface TextProps extends ComponentProps<typeof Text> {}
|
|
32
|
-
Text.displayName = 'Text'
|
|
1
|
+
import { ComponentProps } from 'react'
|
|
2
|
+
import { styled } from '../styles'
|
|
3
|
+
|
|
4
|
+
export const Text = styled('p', {
|
|
5
|
+
fontFamily: '$default',
|
|
6
|
+
lineHeight: '$base',
|
|
7
|
+
margin: 0,
|
|
8
|
+
color: '$gray100',
|
|
9
|
+
variants: {
|
|
10
|
+
size: {
|
|
11
|
+
xxs: { fontSize: '$xxs' },
|
|
12
|
+
xs: { fontSize: '$xs' },
|
|
13
|
+
sm: { fontSize: '$sm' },
|
|
14
|
+
md: { fontSize: '$md' },
|
|
15
|
+
lg: { fontSize: '$lg' },
|
|
16
|
+
xl: { fontSize: '$xl' },
|
|
17
|
+
'2xl': { fontSize: '$2xl' },
|
|
18
|
+
'4xl': { fontSize: '$4xl' },
|
|
19
|
+
'5xl': { fontSize: '$5xl' },
|
|
20
|
+
'6xl': { fontSize: '$6xl' },
|
|
21
|
+
'7xl': { fontSize: '$7xl' },
|
|
22
|
+
'8xl': { fontSize: '$8xl' },
|
|
23
|
+
'9xl': { fontSize: '$9xl' },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
size: 'md',
|
|
28
|
+
},
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
export interface TextProps extends ComponentProps<typeof Text> {}
|
|
32
|
+
Text.displayName = 'Text'
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { ComponentProps } from 'react'
|
|
2
|
-
import { styled } from '../styles'
|
|
3
|
-
|
|
4
|
-
export const TextArea = styled('textarea', {
|
|
5
|
-
backgroundColor: '$gray900',
|
|
6
|
-
padding: '$4',
|
|
7
|
-
borderRadius: '$sm',
|
|
8
|
-
boxSizing: 'border-box',
|
|
9
|
-
border: '2px solid $gray900',
|
|
10
|
-
fontFamily: '$default',
|
|
11
|
-
fontSize: '$sm',
|
|
12
|
-
color: '$white',
|
|
13
|
-
fontWeight: '$regular',
|
|
14
|
-
resize: 'vertical',
|
|
15
|
-
minHeight: 80,
|
|
16
|
-
|
|
17
|
-
'&:focus': {
|
|
18
|
-
outline: 'none',
|
|
19
|
-
borderColor: '$ignite300',
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
'&:disabled': {
|
|
23
|
-
opacity: 0.5,
|
|
24
|
-
cursor: 'not-allowed',
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
'&:placeholder': {
|
|
28
|
-
color: '$gray400',
|
|
29
|
-
},
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
export interface TextAreaProps extends ComponentProps<typeof TextArea> {}
|
|
33
|
-
|
|
34
|
-
TextArea.displayName = 'TextArea'
|
|
1
|
+
import { ComponentProps } from 'react'
|
|
2
|
+
import { styled } from '../styles'
|
|
3
|
+
|
|
4
|
+
export const TextArea = styled('textarea', {
|
|
5
|
+
backgroundColor: '$gray900',
|
|
6
|
+
padding: '$4',
|
|
7
|
+
borderRadius: '$sm',
|
|
8
|
+
boxSizing: 'border-box',
|
|
9
|
+
border: '2px solid $gray900',
|
|
10
|
+
fontFamily: '$default',
|
|
11
|
+
fontSize: '$sm',
|
|
12
|
+
color: '$white',
|
|
13
|
+
fontWeight: '$regular',
|
|
14
|
+
resize: 'vertical',
|
|
15
|
+
minHeight: 80,
|
|
16
|
+
|
|
17
|
+
'&:focus': {
|
|
18
|
+
outline: 'none',
|
|
19
|
+
borderColor: '$ignite300',
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
'&:disabled': {
|
|
23
|
+
opacity: 0.5,
|
|
24
|
+
cursor: 'not-allowed',
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
'&:placeholder': {
|
|
28
|
+
color: '$gray400',
|
|
29
|
+
},
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
export interface TextAreaProps extends ComponentProps<typeof TextArea> {}
|
|
33
|
+
|
|
34
|
+
TextArea.displayName = 'TextArea'
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { ComponentProps } from 'react'
|
|
2
|
-
import { Input, Prefix, TextInputContainer } from './styles'
|
|
3
|
-
|
|
4
|
-
export interface TextInputProps extends ComponentProps<typeof Input> {
|
|
5
|
-
prefix?: string
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { ComponentProps, ElementRef, forwardRef } from 'react'
|
|
2
|
+
import { Input, Prefix, TextInputContainer } from './styles'
|
|
3
|
+
|
|
4
|
+
export interface TextInputProps extends ComponentProps<typeof Input> {
|
|
5
|
+
prefix?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const TextInput = forwardRef<ElementRef<typeof Input>, TextInputProps>(
|
|
9
|
+
({ prefix, ...props }: TextInputProps, ref) => {
|
|
10
|
+
return (
|
|
11
|
+
<TextInputContainer>
|
|
12
|
+
{!!prefix && <Prefix>{prefix}</Prefix>}
|
|
13
|
+
<Input ref={ref} {...props} />
|
|
14
|
+
</TextInputContainer>
|
|
15
|
+
)
|
|
16
|
+
},
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
TextInput.displayName = 'TextInput'
|
|
@@ -1,43 +1,58 @@
|
|
|
1
|
-
import { styled } from '../../styles'
|
|
2
|
-
|
|
3
|
-
export const TextInputContainer = styled('div', {
|
|
4
|
-
backgroundColor: '$gray900',
|
|
5
|
-
padding: '$4',
|
|
6
|
-
borderRadius: '$sm',
|
|
7
|
-
boxSizing: 'border-box',
|
|
8
|
-
border: '2px solid $gray900',
|
|
9
|
-
display: 'flex',
|
|
10
|
-
alignItems: '
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
'
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
import { styled } from '../../styles'
|
|
2
|
+
|
|
3
|
+
export const TextInputContainer = styled('div', {
|
|
4
|
+
backgroundColor: '$gray900',
|
|
5
|
+
padding: '$4',
|
|
6
|
+
borderRadius: '$sm',
|
|
7
|
+
boxSizing: 'border-box',
|
|
8
|
+
border: '2px solid $gray900',
|
|
9
|
+
display: 'flex',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
|
|
12
|
+
variants: {
|
|
13
|
+
size: {
|
|
14
|
+
sm: {
|
|
15
|
+
padding: '$3',
|
|
16
|
+
},
|
|
17
|
+
md: {
|
|
18
|
+
padding: '$4',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
'&:has(input:focus)': {
|
|
24
|
+
borderColor: '$ignite300',
|
|
25
|
+
},
|
|
26
|
+
'&:has(input:disabled)': {
|
|
27
|
+
opacity: 0.5,
|
|
28
|
+
cursor: 'not-allowed',
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
size: 'md',
|
|
32
|
+
},
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
export const Prefix = styled('span', {
|
|
36
|
+
fontFamily: '$default',
|
|
37
|
+
fontSize: '$sm',
|
|
38
|
+
color: '$gray400',
|
|
39
|
+
fontWeight: 'regular',
|
|
40
|
+
})
|
|
41
|
+
export const Input = styled('input', {
|
|
42
|
+
fontFamily: '$default',
|
|
43
|
+
fontSize: '$sm',
|
|
44
|
+
color: '$white',
|
|
45
|
+
fontWeight: 'regular',
|
|
46
|
+
background: 'transparent',
|
|
47
|
+
border: 0,
|
|
48
|
+
width: '100%',
|
|
49
|
+
'&:focus': {
|
|
50
|
+
outline: 0,
|
|
51
|
+
},
|
|
52
|
+
'&:disabled': {
|
|
53
|
+
cursor: 'not-allowed',
|
|
54
|
+
},
|
|
55
|
+
'&::placeholder': {
|
|
56
|
+
color: '$gray400',
|
|
57
|
+
},
|
|
58
|
+
})
|
package/src/index.tsx
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export * from './components/Box'
|
|
2
|
-
export * from './components/Text'
|
|
3
|
-
export * from './components/Heading'
|
|
4
|
-
export * from './components/Avatar'
|
|
5
|
-
export * from './components/Button'
|
|
6
|
-
export * from './components/TextInput'
|
|
7
|
-
export * from './components/TextArea'
|
|
8
|
-
export * from './components/Checkbox'
|
|
9
|
-
export * from './components/MultiStep'
|
|
1
|
+
export * from './components/Box'
|
|
2
|
+
export * from './components/Text'
|
|
3
|
+
export * from './components/Heading'
|
|
4
|
+
export * from './components/Avatar'
|
|
5
|
+
export * from './components/Button'
|
|
6
|
+
export * from './components/TextInput'
|
|
7
|
+
export * from './components/TextArea'
|
|
8
|
+
export * from './components/Checkbox'
|
|
9
|
+
export * from './components/MultiStep'
|
|
10
|
+
|
|
11
|
+
export * from './styles'
|
package/src/styles/index.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
colors,
|
|
3
|
-
fontSizes,
|
|
4
|
-
fontWeights,
|
|
5
|
-
fonts,
|
|
6
|
-
lineHeights,
|
|
7
|
-
radii,
|
|
8
|
-
space,
|
|
9
|
-
} from '@giv-igniteui/tokens'
|
|
10
|
-
import { createStitches, defaultThemeMap } from '@stitches/react'
|
|
11
|
-
|
|
12
|
-
export const {
|
|
13
|
-
styled,
|
|
14
|
-
css,
|
|
15
|
-
globalCss,
|
|
16
|
-
keyframes,
|
|
17
|
-
getCssText,
|
|
18
|
-
theme,
|
|
19
|
-
createTheme,
|
|
20
|
-
config,
|
|
21
|
-
} = createStitches({
|
|
22
|
-
themeMap: {
|
|
23
|
-
...defaultThemeMap,
|
|
24
|
-
height: 'space',
|
|
25
|
-
width: 'space',
|
|
26
|
-
},
|
|
27
|
-
theme: {
|
|
28
|
-
colors,
|
|
29
|
-
fontSizes,
|
|
30
|
-
fontWeights,
|
|
31
|
-
fonts,
|
|
32
|
-
lineHeights,
|
|
33
|
-
radii, // borderRadius
|
|
34
|
-
space,
|
|
35
|
-
},
|
|
36
|
-
})
|
|
1
|
+
import {
|
|
2
|
+
colors,
|
|
3
|
+
fontSizes,
|
|
4
|
+
fontWeights,
|
|
5
|
+
fonts,
|
|
6
|
+
lineHeights,
|
|
7
|
+
radii,
|
|
8
|
+
space,
|
|
9
|
+
} from '@giv-igniteui/tokens'
|
|
10
|
+
import { createStitches, defaultThemeMap } from '@stitches/react'
|
|
11
|
+
|
|
12
|
+
export const {
|
|
13
|
+
styled,
|
|
14
|
+
css,
|
|
15
|
+
globalCss,
|
|
16
|
+
keyframes,
|
|
17
|
+
getCssText,
|
|
18
|
+
theme,
|
|
19
|
+
createTheme,
|
|
20
|
+
config,
|
|
21
|
+
} = createStitches({
|
|
22
|
+
themeMap: {
|
|
23
|
+
...defaultThemeMap,
|
|
24
|
+
height: 'space',
|
|
25
|
+
width: 'space',
|
|
26
|
+
},
|
|
27
|
+
theme: {
|
|
28
|
+
colors,
|
|
29
|
+
fontSizes,
|
|
30
|
+
fontWeights,
|
|
31
|
+
fonts,
|
|
32
|
+
lineHeights,
|
|
33
|
+
radii, // borderRadius
|
|
34
|
+
space,
|
|
35
|
+
},
|
|
36
|
+
})
|
package/tsconfig.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@giv-igniteui/ts-config/react.json",
|
|
3
|
-
"include": [
|
|
4
|
-
"src"
|
|
5
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"extends": "@giv-igniteui/ts-config/react.json",
|
|
3
|
+
"include": [
|
|
4
|
+
"src"
|
|
5
|
+
]
|
|
6
6
|
}
|