@ossy/design-system-extras 0.0.1-beta

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.
Files changed (64) hide show
  1. package/.storybook/main.js +19 -0
  2. package/.storybook/preview.jsx +35 -0
  3. package/build/cjs/index.js +1 -0
  4. package/build/esm/index.js +1 -0
  5. package/package.json +75 -0
  6. package/rollup.config.js +35 -0
  7. package/src/index.js +3 -0
  8. package/src/markdown-viewer/MarkdownViewer.jsx +86 -0
  9. package/src/markdown-viewer/MarkdownViewer.stories.jsx +34 -0
  10. package/src/markdown-viewer/index.js +1 -0
  11. package/src/markdown-viewer/styles/atom-one-light.js +114 -0
  12. package/src/router-layouts/Footer.jsx +38 -0
  13. package/src/router-layouts/StandardLayout.jsx +95 -0
  14. package/src/router-layouts/StandardLayout.stories.jsx +40 -0
  15. package/src/router-layouts/card/Card.layout.jsx +25 -0
  16. package/src/router-layouts/card/Card.layout.stories.jsx +15 -0
  17. package/src/router-layouts/card/index.js +1 -0
  18. package/src/router-layouts/card-sidebar/CardSidebar.jsx +48 -0
  19. package/src/router-layouts/card-sidebar/CardSidebar.stories.jsx +23 -0
  20. package/src/router-layouts/card-sidebar/index.js +1 -0
  21. package/src/router-layouts/card-tabs/CardTabs.jsx +35 -0
  22. package/src/router-layouts/card-tabs/CardTabs.stories.jsx +22 -0
  23. package/src/router-layouts/card-tabs/index.js +1 -0
  24. package/src/router-layouts/index.js +4 -0
  25. package/src/stories/Button.jsx +39 -0
  26. package/src/stories/Button.stories.js +49 -0
  27. package/src/stories/Configure.mdx +364 -0
  28. package/src/stories/Header.jsx +56 -0
  29. package/src/stories/Header.stories.js +29 -0
  30. package/src/stories/Page.jsx +69 -0
  31. package/src/stories/Page.stories.js +28 -0
  32. package/src/stories/assets/accessibility.png +0 -0
  33. package/src/stories/assets/accessibility.svg +1 -0
  34. package/src/stories/assets/addon-library.png +0 -0
  35. package/src/stories/assets/assets.png +0 -0
  36. package/src/stories/assets/avif-test-image.avif +0 -0
  37. package/src/stories/assets/context.png +0 -0
  38. package/src/stories/assets/discord.svg +1 -0
  39. package/src/stories/assets/docs.png +0 -0
  40. package/src/stories/assets/figma-plugin.png +0 -0
  41. package/src/stories/assets/github.svg +1 -0
  42. package/src/stories/assets/share.png +0 -0
  43. package/src/stories/assets/styling.png +0 -0
  44. package/src/stories/assets/testing.png +0 -0
  45. package/src/stories/assets/theming.png +0 -0
  46. package/src/stories/assets/tutorials.svg +1 -0
  47. package/src/stories/assets/youtube.svg +1 -0
  48. package/src/stories/button.css +30 -0
  49. package/src/stories/header.css +32 -0
  50. package/src/stories/page.css +68 -0
  51. package/src/templates/index.js +3 -0
  52. package/src/templates/landing-page/2020/Footer.jsx +59 -0
  53. package/src/templates/landing-page/2020/Hero.jsx +51 -0
  54. package/src/templates/landing-page/2020/LandingPage.jsx +180 -0
  55. package/src/templates/landing-page/2020/LandingPage.stories.jsx +190 -0
  56. package/src/templates/landing-page/2020/index.js +1 -0
  57. package/src/templates/landing-page/index.js +1 -0
  58. package/src/templates/resume/Resume.jsx +305 -0
  59. package/src/templates/resume/Resume.stories.jsx +237 -0
  60. package/src/templates/resume/index.js +2 -0
  61. package/src/templates/resume/useResume.js +85 -0
  62. package/src/templates/theme-display/ThemeDisplay.jsx +301 -0
  63. package/src/templates/theme-display/ThemeDisplay.stories.jsx +18 -0
  64. package/src/templates/theme-display/index.js +1 -0
@@ -0,0 +1,301 @@
1
+ import React from 'react'
2
+ import {
3
+ PageSection,
4
+ Title,
5
+ Text,
6
+ Button,
7
+ View
8
+ } from "@ossy/design-system"
9
+
10
+ const ThemeSection = ({
11
+ title,
12
+ titleVariant = 'secondary',
13
+ titleAs = 'h2',
14
+ text,
15
+ children,
16
+ maxWidth = 'l',
17
+ ...props
18
+ }) => (
19
+ <PageSection
20
+ maxWidth={maxWidth}
21
+ {...props}
22
+ style={{ padding: 'var(--space-xl) var(--space-m)', borderBottom: '1px solid var(--separator-primary)'}}
23
+ >
24
+ <Title as={titleAs} variant={titleVariant} style={{ marginBottom: 'var(--space-m)' }}>
25
+ {title}
26
+ </Title>
27
+ <Text style={{ maxWidth: '600px', marginBottom: 'var(--space-xl)' }}>
28
+ {text}
29
+ </Text>
30
+
31
+ {children}
32
+ </PageSection>
33
+ )
34
+
35
+ export const ThemeDisplay = ({
36
+ theme = {}
37
+ }) => {
38
+
39
+ return (
40
+ <>
41
+
42
+ <ThemeSection
43
+ title="Theme overview"
44
+ titleVariant="primary"
45
+ titleAs="h1"
46
+ text={`
47
+ Here you can find an overview of our patterns, colors, and components.
48
+ Keep in mind that this is only an overview, for usage examples and documentation go to
49
+ our Storybook page.
50
+ `}
51
+ />
52
+
53
+ <ThemeSection
54
+ title="Colors"
55
+ text={`
56
+ Here you can find an overview of our patterns, colors, and components.
57
+ Keep in mind that this is only an overview, for usage examples and documentation go to
58
+ our Storybook page.
59
+ `}
60
+ >
61
+
62
+ <View layout="row-wrap" gap="xl">
63
+ {
64
+ Object.entries(theme.color).map(([name]) => (
65
+ <div style={{
66
+ display: 'flex',
67
+ flexDirection: 'column',
68
+ alignItems: 'center',
69
+ justifyContent: 'flex-start',
70
+ flexWrap: 'wrap',
71
+ gap: 'var(--space-l)',
72
+ }}>
73
+ <div variant={name} style={{
74
+ width: '200px',
75
+ height: 'var(--space-xl)',
76
+ backgroundColor: `var(--color-${name})`,
77
+ boxShadow: '2px 2px 10px 0 hsla(0, 0%, 90%, .8)',
78
+ borderRadius: 'var(--space-xs)'
79
+ }}>
80
+ </div>
81
+ <Text>
82
+ {name}
83
+ </Text>
84
+ </div>
85
+ ))
86
+ }
87
+ </View>
88
+
89
+ </ThemeSection>
90
+
91
+ <ThemeSection
92
+ title="Spacing"
93
+ text={`
94
+ Here you can find an overview of our patterns, colors, and components.
95
+ Keep in mind that this is only an overview, for usage examples and documentation go to
96
+ our Storybook page.
97
+ `}
98
+ >
99
+
100
+ <View layout="row" gap="xl">
101
+ {
102
+ Object.entries(theme.space).map(([name, space]) => (
103
+ <div style={{
104
+ display: 'flex',
105
+ flexDirection: 'column',
106
+ justifyContent: 'flex-end',
107
+ alignItems: 'center',
108
+ }}>
109
+ <div style={{
110
+ background: `var(--button-cta-background)`,
111
+ width: '20px',
112
+ height: space,
113
+ borderRadius: 'var(--space-xxs)',
114
+ marginBottom: 'var(--space-m)'
115
+ }}/>
116
+ <Text>{name} - {space}</Text>
117
+ </div>
118
+ ))
119
+ }
120
+ </View>
121
+
122
+ </ThemeSection>
123
+
124
+ <ThemeSection
125
+ title="Content sizes (max width)"
126
+ text={`
127
+ Here you can find an overview of our patterns, colors, and components.
128
+ Keep in mind that this is only an overview, for usage examples and documentation go to
129
+ our Storybook page.
130
+ `}
131
+ >
132
+
133
+ <View gap="s">
134
+ {
135
+ Object.entries(theme['max-width']).map(([name, maxWidth]) => (
136
+ <View layout="row" gap="l">
137
+ <Text style={{ flexBasis: '90px'}}>{name} - {maxWidth}</Text>
138
+ <div style={{
139
+ background: `var(--color-accent)`,
140
+ width: '100%',
141
+ maxWidth: `calc(var(--max-width-${name}) / 2)`,
142
+ height: '20px',
143
+ borderRadius: 'var(--space-xxs)'
144
+ }}/>
145
+ </View>
146
+
147
+ ))
148
+ }
149
+ </View>
150
+
151
+ </ThemeSection>
152
+
153
+ <ThemeSection
154
+ title="Surfaces"
155
+ text={`
156
+ Here you can find an overview of our patterns, colors, and components.
157
+ Keep in mind that this is only an overview, for usage examples and documentation go to
158
+ our Storybook page.
159
+ `}
160
+ >
161
+
162
+ <View layout="row-wrap" gap="xl">
163
+ {
164
+ Object.entries(theme.surface).map(([name, surface]) => (
165
+ <div style={{
166
+ background: `var(--surface-${name})`,
167
+ width: '300px',
168
+ height: '300px',
169
+ display: 'flex',
170
+ justifyContent: 'center',
171
+ alignItems: 'center',
172
+ borderRadius: 'var(--space-s)',
173
+ border: '1px solid var(--separator-primary)',
174
+ // boxShadow: '2px 2px 10px 0 hsla(0, 0%, 90%, .8)'
175
+ }}>
176
+ <Text>{name}</Text>
177
+ </div>
178
+ ))
179
+ }
180
+ </View>
181
+ </ThemeSection>
182
+
183
+ <ThemeSection
184
+ title="Separators"
185
+ text={`
186
+ Here you can find an overview of our patterns, colors, and components.
187
+ Keep in mind that this is only an overview, for usage examples and documentation go to
188
+ our Storybook page.
189
+ `}
190
+ >
191
+
192
+ <View layout="row" gap="xl">
193
+ {
194
+ Object.entries(theme.separator).map(([name]) => (
195
+ <div style={{
196
+ display: 'flex',
197
+ flexDirection: 'column',
198
+ alignItems: 'center',
199
+ justifyContent: 'flex-start',
200
+ flexWrap: 'wrap',
201
+ gap: 'var(--space-l)',
202
+ marginBottom: 'var(--space-xl)'
203
+ }}>
204
+ <div variant={name} style={{ width: '300px', height: '1px', backgroundColor: `var(--separator-${name})` }}>
205
+ </div>
206
+ <Text>
207
+ {name}
208
+ </Text>
209
+ </div>
210
+ ))
211
+ }
212
+ </View>
213
+
214
+ </ThemeSection>
215
+
216
+ <ThemeSection
217
+ title="Typography"
218
+ text={`
219
+ Here you can find an overview of our patterns, colors, and components.
220
+ Keep in mind that this is only an overview, for usage examples and documentation go to
221
+ our Storybook page.
222
+ `}
223
+ >
224
+
225
+ <Title variant="tertiary" style={{ marginBottom: 'var(--space-m)'}}>
226
+ Titles
227
+ </Title>
228
+
229
+ <View
230
+ layout="row-wrap"
231
+ gap="xl"
232
+ placeItems="center"
233
+ style={{ marginBottom: 'var(--space-xl)' }}
234
+ >
235
+ {
236
+ Object.entries(theme.title)
237
+ .filter(([name]) => name !== 'default')
238
+ .map(([name]) => (
239
+ <div style={{
240
+ padding: 'var(--space-l)',
241
+ borderRadius: 'var(--space-s)',
242
+ border: '1px solid var(--separator-primary)',
243
+ display: 'flex',
244
+ justifyContent: 'center',
245
+ alignItems: 'center',
246
+ }}>
247
+ <Title variant={name}>
248
+ {name}
249
+ </Title>
250
+ </div>
251
+ ))
252
+ }
253
+ </View>
254
+
255
+ <Title variant="tertiary" style={{ marginBottom: 'var(--space-m)'}}>
256
+ Text
257
+ </Title>
258
+
259
+ <View layout="row" gap="xl" placeItems="center">
260
+ {
261
+ Object.entries(theme.text)
262
+ .map(([name]) => (
263
+ <div style={{
264
+ padding: 'var(--space-l)',
265
+ borderRadius: 'var(--space-s)',
266
+ border: '1px solid var(--separator-primary)'
267
+ }}>
268
+ <Text variant={name}>
269
+ {name}
270
+ </Text>
271
+ </div>
272
+ ))
273
+ }
274
+ </View>
275
+
276
+ </ThemeSection>
277
+
278
+ <ThemeSection
279
+ title="Buttons"
280
+ text={`
281
+ Here you can find an overview of our patterns, colors, and components.
282
+ Keep in mind that this is only an overview, for usage examples and documentation go to
283
+ our Storybook page.
284
+ `}
285
+ >
286
+
287
+ <View layout="row-wrap" gap="xl" alignItems="center" justifyContent="flex-start">
288
+ {
289
+ Object.entries(theme.button).map(([name]) => (
290
+ <Button variant={name} style={{ flexGrow: '0', flexShrink: '0' }}>
291
+ {name}
292
+ </Button>
293
+ ))
294
+ }
295
+ </View>
296
+
297
+ </ThemeSection>
298
+
299
+ </>
300
+ )
301
+ }
@@ -0,0 +1,18 @@
1
+ import React from 'react'
2
+ import { ThemeDisplay } from './ThemeDisplay.jsx'
3
+ import { Standard } from '@ossy/themes'
4
+
5
+ export default {
6
+ title: 'Design System Extras/Templates/Theme Display',
7
+ component: ThemeDisplay,
8
+ parameters: {
9
+ layout: 'fullscreen',
10
+ },
11
+ }
12
+
13
+ const Story = props => (
14
+ <ThemeDisplay {...props}/>
15
+ )
16
+
17
+ export const Default = Story.bind({})
18
+ Default.args = { theme: Standard }
@@ -0,0 +1 @@
1
+ export * from './ThemeDisplay.jsx'