@ossy/design-system-extras 0.1.3 → 0.1.5

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/build/index.js +1 -0
  2. package/package.json +7 -3
  3. package/.storybook/main.js +0 -19
  4. package/.storybook/preview.jsx +0 -35
  5. package/CHANGELOG.md +0 -155
  6. package/rollup.config.js +0 -31
  7. package/src/index.js +0 -3
  8. package/src/markdown-viewer/MarkdownViewer.jsx +0 -86
  9. package/src/markdown-viewer/MarkdownViewer.stories.jsx +0 -34
  10. package/src/markdown-viewer/index.js +0 -1
  11. package/src/markdown-viewer/styles/atom-one-light.js +0 -114
  12. package/src/router-layouts/Footer.jsx +0 -38
  13. package/src/router-layouts/StandardLayout.jsx +0 -95
  14. package/src/router-layouts/StandardLayout.stories.jsx +0 -40
  15. package/src/router-layouts/card/Card.layout.jsx +0 -25
  16. package/src/router-layouts/card/Card.layout.stories.jsx +0 -15
  17. package/src/router-layouts/card/index.js +0 -1
  18. package/src/router-layouts/card-sidebar/CardSidebar.jsx +0 -48
  19. package/src/router-layouts/card-sidebar/CardSidebar.stories.jsx +0 -23
  20. package/src/router-layouts/card-sidebar/index.js +0 -1
  21. package/src/router-layouts/card-tabs/CardTabs.jsx +0 -35
  22. package/src/router-layouts/card-tabs/CardTabs.stories.jsx +0 -22
  23. package/src/router-layouts/card-tabs/index.js +0 -1
  24. package/src/router-layouts/index.js +0 -4
  25. package/src/stories/Button.jsx +0 -39
  26. package/src/stories/Button.stories.js +0 -49
  27. package/src/stories/Configure.mdx +0 -364
  28. package/src/stories/Header.jsx +0 -56
  29. package/src/stories/Header.stories.js +0 -29
  30. package/src/stories/Page.jsx +0 -69
  31. package/src/stories/Page.stories.js +0 -28
  32. package/src/stories/assets/accessibility.png +0 -0
  33. package/src/stories/assets/accessibility.svg +0 -1
  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 +0 -1
  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 +0 -1
  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 +0 -1
  47. package/src/stories/assets/youtube.svg +0 -1
  48. package/src/stories/button.css +0 -30
  49. package/src/stories/header.css +0 -32
  50. package/src/stories/page.css +0 -68
  51. package/src/templates/index.js +0 -3
  52. package/src/templates/landing-page/2020/Footer.jsx +0 -59
  53. package/src/templates/landing-page/2020/Hero.jsx +0 -51
  54. package/src/templates/landing-page/2020/LandingPage.jsx +0 -180
  55. package/src/templates/landing-page/2020/LandingPage.stories.jsx +0 -190
  56. package/src/templates/landing-page/2020/index.js +0 -1
  57. package/src/templates/landing-page/index.js +0 -1
  58. package/src/templates/resume/Resume.jsx +0 -305
  59. package/src/templates/resume/Resume.stories.jsx +0 -237
  60. package/src/templates/resume/index.js +0 -2
  61. package/src/templates/resume/useResume.js +0 -85
  62. package/src/templates/theme-display/ThemeDisplay.jsx +0 -301
  63. package/src/templates/theme-display/ThemeDisplay.stories.jsx +0 -18
  64. package/src/templates/theme-display/index.js +0 -1
@@ -1,95 +0,0 @@
1
- import React from 'react'
2
- import {
3
- Tabs,
4
- Header,
5
- Text,
6
- Page
7
- } from "@ossy/design-system"
8
- import { Footer } from './Footer.jsx'
9
-
10
- export const StandardLayout = ({
11
- logo,
12
- headerActions,
13
- headerAccentBorder = true,
14
- navigation,
15
- maxWidth = 'medium',
16
- copyright,
17
- footer,
18
- children,
19
- ...props
20
- }) => {
21
-
22
- const sections = [
23
-
24
- headerAccentBorder && {
25
- id: "accent-border",
26
- style: {
27
- height: '4px',
28
- position: 'sticky',
29
- zIndex: '10',
30
- top: '0',
31
- background: 'var(--separator-accent)'
32
- }
33
- },
34
-
35
- (logo || headerActions) && {
36
- id: "header",
37
- surface: "primary",
38
- style: {
39
- padding: 'var(--space-s) var(--space-l)',
40
- // borderBottom: '1px solid var(--separator-primary)',
41
- width: '100%',
42
- },
43
- render: () => <Header logo={logo} actions={headerActions} />
44
- },
45
-
46
- navigation && {
47
- id: "navigation",
48
- surface: "primary",
49
- style: {
50
- // borderBottom: '1px solid var(--separator-primary)',
51
- height: '55px',
52
- position: 'sticky',
53
- top: '4px',
54
- width: '100%',
55
- // boxShadow: '2px 2px 4px hsla(0, 0%, 0%, .1)',
56
- zIndex: '10'
57
- },
58
- render: () => <Tabs tabs={navigation} style={{ height: '100%'}}/>
59
- },
60
-
61
- {
62
- id: "outlet",
63
- as: "main",
64
- maxWidth: 'full',
65
- style: { gridArea: 'content' },
66
- render: () => children
67
- },
68
-
69
- footer && {
70
- id: "footer",
71
- surface: footer.surface,
72
- as: "footer",
73
- style: {
74
- padding: 'var(--space-xl) var(--space-m)'
75
- },
76
- render: () => <Footer columns={footer.columns} />
77
- },
78
-
79
- copyright && {
80
- id: "footer-section-copyright",
81
- surface: "alt-secondary",
82
- style: {
83
- padding: 'var(--space-m)',
84
- textAlign: 'center',
85
- },
86
- render: () => (
87
- <Text variant="small">
88
- {copyright}
89
- </Text>
90
- )
91
- }
92
- ].filter(x => !!x)
93
-
94
- return <Page maxWidth={maxWidth} sections={sections} {...props}/>
95
- }
@@ -1,40 +0,0 @@
1
- import React from 'react'
2
- import { StandardLayout } from './StandardLayout.jsx'
3
-
4
- export default {
5
- title: 'Design System Extras/Router Layouts/Standard',
6
- component: StandardLayout,
7
- parameters: {
8
- layout: 'fullscreen',
9
- },
10
- }
11
-
12
- const Story = props => (
13
- <StandardLayout {...props} />
14
- )
15
-
16
- export const Default = Story.bind({})
17
- Default.args = {
18
- logo: 'Logo',
19
- copyright: 'Copyright @ Company 2023',
20
- navigation: [
21
- { id: 'header-nav', label: 'Start', href: '#' },
22
- { id: 'testimonials-nav', label: 'Testimonials', href: '#testimonials' },
23
- { id: 'contact-nav', label: 'Contact', href: '#contact' },
24
- { id: 'services-nav', label: 'Services', href: '#services' },
25
- { id: 'about-nav', label: 'About', href: '#about' },
26
- ],
27
- headerActions: [
28
- {
29
- key: 'log-in',
30
- children: 'Login',
31
- href: '/sign-in'
32
- },
33
- {
34
- key: 'sign-up',
35
- children: 'Sign up',
36
- href: '/sign-up',
37
- variant: 'cta'
38
- }
39
- ]
40
- }
@@ -1,25 +0,0 @@
1
- import React from 'react'
2
- import { Card, View, PageSection } from "@ossy/design-system"
3
-
4
- export const CardLayout = ({
5
- surface = 'primary',
6
- maxWidth = 'full',
7
- layout = 'off-center',
8
- cardVariant,
9
- cardSurface,
10
- header,
11
- children,
12
- content,
13
- }) => (
14
- <PageSection surface={surface} maxWidth={maxWidth}>
15
- <View
16
- layout={layout}
17
- style={{ height: '100vh' }}
18
- >
19
- {header}
20
- <Card slot="content" variant={cardVariant} style={{ overflowY: 'auto' }} surface={cardSurface}>
21
- { content ?? children }
22
- </Card>
23
- </View>
24
- </PageSection>
25
- )
@@ -1,15 +0,0 @@
1
- import React from 'react'
2
- import { CardLayout } from './Card.layout.jsx'
3
-
4
- export default {
5
- title: 'Design System Extras/Router Layouts/Card',
6
- component: CardLayout,
7
- parameters: {
8
- layout: 'fullscreen',
9
- },
10
- }
11
-
12
- const Story = props => <CardLayout {...props} />
13
-
14
- export const Default = Story.bind({})
15
- Default.args = {}
@@ -1 +0,0 @@
1
- export * from './Card.layout.jsx'
@@ -1,48 +0,0 @@
1
- import React from 'react'
2
- import { Card, Button, PageSection } from "@ossy/design-system"
3
-
4
- export const CardSidebar = ({
5
- surface = 'primary',
6
- layout = 'off-center-m',
7
- navigation = [],
8
- cardVariant,
9
- cardSurface,
10
- header,
11
- children,
12
- content,
13
- ...props
14
- }) => {
15
- return (
16
- <PageSection
17
- layout={layout}
18
- surface={surface}
19
- {...props}
20
- >
21
- {header}
22
- <Card
23
- variant={cardVariant}
24
- surface={cardSurface}
25
- slot="content"
26
- style={{
27
- display: 'flex',
28
- flexDirection: 'row',
29
- padding: '0',
30
- }}
31
- >
32
- <div style={{
33
- display: 'flex',
34
- gap: 'var(--space-s)',
35
- padding: 'var(--space-l) var(--space-s)',
36
- flexDirection: 'column',
37
- width: '180px',
38
- borderRight: '1px solid var(--separator-primary)',
39
- }}>
40
- { navigation.map(action => ( <Button {...action} style={{ justifyContent: 'flex-start' }}/> )) }
41
- </div>
42
- <div style={{ flexGrow: '1', padding: 'var(--space-l)', overflowY: 'auto' }}>
43
- { content ?? children }
44
- </div>
45
- </Card>
46
- </PageSection>
47
- )
48
- }
@@ -1,23 +0,0 @@
1
- import React from 'react'
2
- import { CardSidebar } from './CardSidebar.jsx'
3
-
4
- export default {
5
- title: 'Design System Extras/Router Layouts/Card Sidebar',
6
- component: CardSidebar,
7
- parameters: {
8
- layout: 'fullscreen',
9
- },
10
- }
11
-
12
- const Story = props => (
13
- <CardSidebar {...props}/>
14
- )
15
-
16
- export const Default = Story.bind({})
17
- Default.args = {
18
- navigation: [
19
- { id: 'general-nav', label: 'General', href: 'general' },
20
- { id: 'users-nav', label: 'Users', href: 'users' },
21
- { id: 'api-tokens-nav', label: 'Api tokens', href: 'api-tokens' },
22
- ]
23
- }
@@ -1 +0,0 @@
1
- export * from './CardSidebar.jsx'
@@ -1,35 +0,0 @@
1
- import React from 'react'
2
- import { Card, Tabs, PageSection, View } from "@ossy/design-system"
3
-
4
- export const CardTabs = ({
5
- surface = 'primary',
6
- layout = 'off-center',
7
- cardVariant = 'decorated',
8
- tabs = [],
9
- content,
10
- children,
11
- ...props
12
- }) => {
13
- return (
14
- <PageSection
15
- layout={layout}
16
- surface={surface}
17
- {...props}
18
- >
19
- <View style={{ height: '100%', background: 'var(--surface-linear-gradient)' }}>
20
- <Card variant={cardVariant} slot="content" style={{ width: '100vw', padding: '0' }}>
21
- <Tabs
22
- tabs={tabs}
23
- style={{
24
- height: 'auto',
25
- borderBottom: '1px solid var(--separator-primary)'
26
- }}
27
- />
28
- <div style={{ padding: 'var(--space-m)' }}>
29
- { content || children }
30
- </div>
31
- </Card>
32
- </View>
33
- </PageSection >
34
- )
35
- }
@@ -1,22 +0,0 @@
1
- import React from 'react'
2
- import { CardTabs } from './CardTabs.jsx'
3
-
4
- export default {
5
- title: 'Design System Extras/Router Layouts/Card Tabs',
6
- component: CardTabs,
7
- parameters: {
8
- layout: 'fullscreen',
9
- },
10
- }
11
-
12
- const Story = props => (
13
- <CardTabs {...props}/>
14
- )
15
-
16
- export const Default = Story.bind({})
17
- Default.args = {
18
- tabs: [
19
- { id: 'general-nav', label: 'General', href: 'general' },
20
- { id: 'users-nav', label: 'Users', href: 'users' }
21
- ]
22
- }
@@ -1 +0,0 @@
1
- export * from './CardTabs.jsx'
@@ -1,4 +0,0 @@
1
- export * from './StandardLayout.jsx'
2
- export * from './card/index.js'
3
- export * from './card-sidebar/index.js'
4
- export * from './card-tabs/index.js'
@@ -1,39 +0,0 @@
1
- import React from 'react';
2
-
3
- import PropTypes from 'prop-types';
4
-
5
- import './button.css';
6
-
7
- /** Primary UI component for user interaction */
8
- export const Button = ({
9
- primary = false,
10
- backgroundColor = null,
11
- size = 'medium',
12
- label,
13
- ...props
14
- }) => {
15
- const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
16
- return (
17
- <button
18
- type="button"
19
- className={['storybook-button', `storybook-button--${size}`, mode].join(' ')}
20
- style={backgroundColor && { backgroundColor }}
21
- {...props}
22
- >
23
- {label}
24
- </button>
25
- );
26
- };
27
-
28
- Button.propTypes = {
29
- /** Is this the principal call to action on the page? */
30
- primary: PropTypes.bool,
31
- /** What background color to use */
32
- backgroundColor: PropTypes.string,
33
- /** How large should the button be? */
34
- size: PropTypes.oneOf(['small', 'medium', 'large']),
35
- /** Button contents */
36
- label: PropTypes.string.isRequired,
37
- /** Optional click handler */
38
- onClick: PropTypes.func,
39
- };
@@ -1,49 +0,0 @@
1
- import { fn } from '@storybook/test';
2
-
3
- import { Button } from './Button';
4
-
5
- // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
6
- export default {
7
- title: 'Example/Button',
8
- component: Button,
9
- parameters: {
10
- // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
11
- layout: 'centered',
12
- },
13
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
14
- tags: ['autodocs'],
15
- // More on argTypes: https://storybook.js.org/docs/api/argtypes
16
- argTypes: {
17
- backgroundColor: { control: 'color' },
18
- },
19
- // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
20
- args: { onClick: fn() },
21
- };
22
-
23
- // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
24
- export const Primary = {
25
- args: {
26
- primary: true,
27
- label: 'Button',
28
- },
29
- };
30
-
31
- export const Secondary = {
32
- args: {
33
- label: 'Button',
34
- },
35
- };
36
-
37
- export const Large = {
38
- args: {
39
- size: 'large',
40
- label: 'Button',
41
- },
42
- };
43
-
44
- export const Small = {
45
- args: {
46
- size: 'small',
47
- label: 'Button',
48
- },
49
- };