@spies-ui/react 1.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 +3 -0
- package/.turbo/turbo-build.log +18 -0
- package/CHANGELOG.md +7 -0
- package/dist/index.d.mts +1790 -0
- package/dist/index.d.ts +1790 -0
- package/dist/index.js +777 -0
- package/dist/index.mjs +755 -0
- package/package.json +32 -0
- package/src/components/Avatar/index.tsx +19 -0
- package/src/components/Avatar/styles.ts +31 -0
- package/src/components/Box.tsx +32 -0
- package/src/components/Button.tsx +97 -0
- package/src/components/Checkbox/index.tsx +28 -0
- package/src/components/Checkbox/styles.ts +84 -0
- package/src/components/Dropdown/index.tsx +98 -0
- package/src/components/Dropdown/styles.ts +75 -0
- package/src/components/Heading.tsx +32 -0
- package/src/components/InputBox/index.tsx +24 -0
- package/src/components/InputBox/styles.ts +7 -0
- package/src/components/Text.tsx +45 -0
- package/src/components/TextArea/index.tsx +18 -0
- package/src/components/TextArea/styles.ts +42 -0
- package/src/components/TextInput/index.tsx +22 -0
- package/src/components/TextInput/styles.ts +61 -0
- package/src/index.tsx +9 -0
- package/src/styles/index.ts +36 -0
- package/tsconfig.json +4 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { styled } from '../../styles'
|
|
2
|
+
|
|
3
|
+
export const TextInputContainer = styled('div', {
|
|
4
|
+
backgroundColor: '$gray900',
|
|
5
|
+
padding: '$3 $4',
|
|
6
|
+
borderRadius: '$sm',
|
|
7
|
+
boxSizing: 'border-box',
|
|
8
|
+
border: '2px solid $gray900',
|
|
9
|
+
display: 'flex',
|
|
10
|
+
alignItems: 'baseline',
|
|
11
|
+
|
|
12
|
+
'&:has(input:focus)': {
|
|
13
|
+
borderColor: '$primary',
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
'&:has(input:disabled)': {
|
|
17
|
+
opacity: 0.5,
|
|
18
|
+
cursor: 'not-alowed',
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
variants: {
|
|
22
|
+
errored: {
|
|
23
|
+
true: {
|
|
24
|
+
borderColor: '$danger',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
errored: false,
|
|
31
|
+
},
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
export const Prefix = styled('span', {
|
|
35
|
+
fontFamily: '$default',
|
|
36
|
+
fontSize: '$sm',
|
|
37
|
+
color: '$gray400',
|
|
38
|
+
fontWeight: 'regular',
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
export const Input = styled('input', {
|
|
42
|
+
fontFamily: '$default',
|
|
43
|
+
fontSize: '$sm',
|
|
44
|
+
color: '$smokedWhite',
|
|
45
|
+
fontWeight: 'regular',
|
|
46
|
+
background: 'transparent',
|
|
47
|
+
border: 0,
|
|
48
|
+
width: '100%',
|
|
49
|
+
|
|
50
|
+
'&:focus': {
|
|
51
|
+
outline: 0,
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
'&:disabled': {
|
|
55
|
+
cursor: 'not-allowed',
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
'&:placeholder': {
|
|
59
|
+
color: '$gray400',
|
|
60
|
+
},
|
|
61
|
+
})
|
package/src/index.tsx
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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/Dropdown'
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colors,
|
|
3
|
+
fontSizes,
|
|
4
|
+
fontWeights,
|
|
5
|
+
fonts,
|
|
6
|
+
lineHeights,
|
|
7
|
+
radii,
|
|
8
|
+
space,
|
|
9
|
+
} from '@spies-ui/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,
|
|
34
|
+
space,
|
|
35
|
+
},
|
|
36
|
+
})
|
package/tsconfig.json
ADDED