Skip to content

Commit fe9dc53

Browse files
committed
Init components package
1 parent 13f18af commit fe9dc53

File tree

13 files changed

+2295
-0
lines changed

13 files changed

+2295
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { Button } from '@devup-ui/react'
2+
export default function Page() {
3+
return <Button>Button</Button>
4+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { DevupUI } from '@devup-ui/vite-plugin'
2+
import { type StorybookConfig } from '@storybook/react-vite'
3+
import { dirname, join } from 'path'
4+
import { mergeConfig } from 'vite'
5+
6+
function getAbsolutePath(value: string) {
7+
return dirname(require.resolve(join(value, 'package.json')))
8+
}
9+
10+
const config: StorybookConfig = {
11+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
12+
13+
addons: [
14+
getAbsolutePath('@storybook/addon-onboarding'),
15+
getAbsolutePath('@storybook/addon-links'),
16+
getAbsolutePath('@storybook/addon-essentials'),
17+
getAbsolutePath('@chromatic-com/storybook'),
18+
getAbsolutePath('@storybook/addon-interactions'),
19+
'@chromatic-com/storybook'
20+
],
21+
22+
framework: {
23+
name: '@storybook/react-vite',
24+
options: {},
25+
},
26+
27+
viteFinal(config) {
28+
return mergeConfig(config, {
29+
plugins: [DevupUI()],
30+
})
31+
},
32+
33+
docs: {
34+
autodocs: true
35+
},
36+
37+
typescript: {
38+
reactDocgen: 'react-docgen-typescript'
39+
}
40+
}
41+
export default config
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import { setTheme } from '@devup-ui/react'
2+
import { Decorator } from '@storybook/react'
3+
import { useEffect } from 'react'
4+
const preview: import('@storybook/react').Preview = {
5+
parameters: {
6+
layout: 'fullscreen',
7+
controls: {
8+
matchers: {
9+
color: /(background|color)$/i,
10+
date: /Date$/i,
11+
},
12+
},
13+
},
14+
}
15+
16+
export default preview
17+
18+
export const globalTypes = {
19+
theme: {
20+
name: 'Theme',
21+
description: 'Global theme for components',
22+
defaultValue: 'light',
23+
toolbar: {
24+
// The icon for the toolbar item
25+
icon: 'circlehollow',
26+
// Array of options
27+
items: [
28+
{ value: 'default', icon: 'circlehollow', title: 'light' },
29+
{ value: 'dark', icon: 'circle', title: 'dark' },
30+
],
31+
// Property that specifies if the name of the item will be displayed
32+
showName: true,
33+
},
34+
},
35+
}
36+
37+
export const withHead: Decorator = (StoryFn) => {
38+
return (
39+
<>
40+
<StoryFn />
41+
</>
42+
)
43+
}
44+
export const withTheme: Decorator = (StoryFn, context) => {
45+
// Get values from story parameter first, else fallback to globals
46+
const theme = context.parameters.theme || context.globals.theme
47+
// eslint-disable-next-line react-hooks/rules-of-hooks
48+
useEffect(() => {
49+
setTheme(theme)
50+
}, [theme])
51+
return (
52+
<>
53+
<StoryFn />
54+
<style
55+
dangerouslySetInnerHTML={{
56+
__html: `:root[data-theme=default]{color-scheme: light;}:root[data-theme=dark]{color-scheme: dark;}`,
57+
}}
58+
></style>
59+
</>
60+
)
61+
}
62+
export const decorators = [withHead, withTheme]

packages/components/CHANGELOG.md

Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
# @devup-ui/react
2+
3+
## 1.0.4
4+
5+
### Patch Changes
6+
7+
- 9d45acb: Update wasm
8+
9+
## 1.0.3
10+
11+
### Patch Changes
12+
13+
- c5336c9: Add writingMode, textOrientation
14+
15+
## 1.0.2
16+
17+
### Patch Changes
18+
19+
- bb2f49f: Add vendor properties (moz, webkit, ms)
20+
21+
## 1.0.1
22+
23+
### Patch Changes
24+
25+
- 864c37b: Add info to package.json
26+
27+
## 1.0.0
28+
29+
### Major Changes
30+
31+
- 18b1bd7: Optimize Zero value
32+
33+
## 0.1.34
34+
35+
### Patch Changes
36+
37+
- c029a8d: Fix theme script
38+
39+
## 0.1.33
40+
41+
### Patch Changes
42+
43+
- 57db495: Add initTheme, Fix typing issue of ThemeScript
44+
45+
## 0.1.32
46+
47+
### Patch Changes
48+
49+
- 5f2ad1d: Add default theme
50+
51+
## 0.1.31
52+
53+
### Patch Changes
54+
55+
- e7fd185: Add textDecoration type
56+
57+
## 0.1.30
58+
59+
### Patch Changes
60+
61+
- 0e1ab6e: Support for conditional selector
62+
63+
## 0.1.29
64+
65+
### Patch Changes
66+
67+
- 7535643: Change default generic type of VStack
68+
69+
## 0.1.28
70+
71+
### Patch Changes
72+
73+
- 98c7b47: Add support conditional pattern
74+
75+
## 0.1.27
76+
77+
### Patch Changes
78+
79+
- 68f79d0: Add lineClamp, willChange
80+
- 456cb42: Add visiblity
81+
82+
## 0.1.26
83+
84+
### Patch Changes
85+
86+
- 27c414d: Implement style order
87+
88+
## 0.1.25
89+
90+
### Patch Changes
91+
92+
- a3684c5: Add selectors
93+
94+
## 0.1.24
95+
96+
### Patch Changes
97+
98+
- bf47284: Add borderTopRadius, borderBottomRadius, borderLeftRadius, borderRightRadius, \_print
99+
100+
## 0.1.23
101+
102+
### Patch Changes
103+
104+
- 2102fd7: Support theme typing to css
105+
106+
## 0.1.22
107+
108+
### Patch Changes
109+
110+
- e1d8d8b: Fix typing issue
111+
112+
## 0.1.21
113+
114+
### Patch Changes
115+
116+
- 96cd069: Fix theme typing issue
117+
118+
## 0.1.20
119+
120+
### Patch Changes
121+
122+
- 064476f: Fix TypographyKey type definition for better type checking
123+
124+
## 0.1.19
125+
126+
### Patch Changes
127+
128+
- 7e54c1f: Fix type checking issue
129+
130+
## 0.1.18
131+
132+
### Patch Changes
133+
134+
- 77afb9e: Support generic to as prop
135+
136+
## 0.1.17
137+
138+
### Patch Changes
139+
140+
- ea622ed: Add svg props
141+
142+
## 0.1.16
143+
144+
### Patch Changes
145+
146+
- e072762: convert css
147+
148+
## 0.1.15
149+
150+
### Patch Changes
151+
152+
- b40d274: Add typograhpy to props
153+
154+
## 0.1.14
155+
156+
### Patch Changes
157+
158+
- 7f19bd5: Implement ThemeScript, useTheme, getTheme, setTheme
159+
160+
## 0.1.13
161+
162+
### Patch Changes
163+
164+
- 00b14ca: Support optional args in css
165+
166+
## 0.1.12
167+
168+
### Patch Changes
169+
170+
- b84cbc1: Update css.ts
171+
172+
## 0.1.11
173+
174+
### Patch Changes
175+
176+
- 76e8fa1: Add grid, Support for selector in css
177+
178+
## 0.1.10
179+
180+
### Patch Changes
181+
182+
- 0da9456: Add content to style props
183+
184+
## 0.1.9
185+
186+
### Patch Changes
187+
188+
- 6f7c55d: Add group selector
189+
190+
## 0.1.8
191+
192+
### Patch Changes
193+
194+
- 8943bad: Add double selector
195+
196+
## 0.1.7
197+
198+
### Patch Changes
199+
200+
- 0040445: Fix selector type
201+
202+
## 0.1.6
203+
204+
### Patch Changes
205+
206+
- b25c769: Add placehoder to selector
207+
208+
## 0.1.5
209+
210+
### Patch Changes
211+
212+
- e9d655f: Add shorthand
213+
214+
## 0.1.4
215+
216+
### Patch Changes
217+
218+
- 7bde1f2: Add boxSizing prop
219+
220+
## 0.1.3
221+
222+
### Patch Changes
223+
224+
- 30443ae: Update readme
225+
226+
## 0.1.2
227+
228+
### Patch Changes
229+
230+
- 242a6c2: Update package
231+
232+
## 0.1.1
233+
234+
### Patch Changes
235+
236+
- 6100644: Add Image component
237+
238+
## 0.1.0
239+
240+
### Minor Changes
241+
242+
- c0ff96f: Deploy

0 commit comments

Comments
 (0)