@charcoal-ui/react-sandbox 3.10.1 → 3.11.0
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/package.json +8 -17
- package/dist/components/Carousel/index.story.d.ts +0 -7
- package/dist/components/Carousel/index.story.d.ts.map +0 -1
- package/dist/components/CarouselButton/index.story.d.ts +0 -10
- package/dist/components/CarouselButton/index.story.d.ts.map +0 -1
- package/dist/components/Filter/index.story.d.ts +0 -9
- package/dist/components/Filter/index.story.d.ts.map +0 -1
- package/dist/components/HintText/index.story.d.ts +0 -12
- package/dist/components/HintText/index.story.d.ts.map +0 -1
- package/dist/components/Layout/index.story.d.ts +0 -14
- package/dist/components/Layout/index.story.d.ts.map +0 -1
- package/dist/components/MenuListItem/index.story.d.ts +0 -18
- package/dist/components/MenuListItem/index.story.d.ts.map +0 -1
- package/dist/components/Pager/index.story.d.ts +0 -39
- package/dist/components/Pager/index.story.d.ts.map +0 -1
- package/dist/components/SwitchCheckbox/index.story.d.ts +0 -10
- package/dist/components/SwitchCheckbox/index.story.d.ts.map +0 -1
- package/dist/components/TextEllipsis/index.story.d.ts +0 -9
- package/dist/components/TextEllipsis/index.story.d.ts.map +0 -1
- package/dist/components/WithIcon/index.story.d.ts +0 -15
- package/dist/components/WithIcon/index.story.d.ts.map +0 -1
- package/src/components/Carousel/__snapshots__/index.story.storyshot +0 -360
- package/src/components/Carousel/index.story.tsx +0 -85
- package/src/components/CarouselButton/__snapshots__/index.story.storyshot +0 -168
- package/src/components/CarouselButton/index.story.tsx +0 -43
- package/src/components/Filter/__snapshots__/index.story.storyshot +0 -239
- package/src/components/Filter/index.story.tsx +0 -82
- package/src/components/HintText/__snapshots__/index.story.storyshot +0 -119
- package/src/components/HintText/index.story.tsx +0 -18
- package/src/components/Layout/__snapshots__/index.story.storyshot +0 -1297
- package/src/components/Layout/index.story.tsx +0 -121
- package/src/components/MenuListItem/__snapshots__/index.story.storyshot +0 -1389
- package/src/components/MenuListItem/index.story.tsx +0 -142
- package/src/components/Pager/__snapshots__/index.story.storyshot +0 -1894
- package/src/components/Pager/index.story.tsx +0 -153
- package/src/components/SwitchCheckbox/__snapshots__/index.story.storyshot +0 -507
- package/src/components/SwitchCheckbox/index.story.tsx +0 -31
- package/src/components/TextEllipsis/__snapshots__/index.story.storyshot +0 -32
- package/src/components/TextEllipsis/index.story.tsx +0 -40
- package/src/components/WithIcon/__snapshots__/index.story.storyshot +0 -852
- package/src/components/WithIcon/index.story.tsx +0 -145
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import styled from 'styled-components'
|
|
3
|
-
import { dummyText } from '../../misc/storybook-helper'
|
|
4
|
-
import { theme } from '../../styled'
|
|
5
|
-
import LeftMenu from '../LeftMenu'
|
|
6
|
-
import Layout, { LayoutItem, LayoutItemBody, LayoutItemHeader } from '.'
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: 'Sandbox/Layout',
|
|
10
|
-
component: Layout,
|
|
11
|
-
parameters: {
|
|
12
|
-
layout: 'fullscreen',
|
|
13
|
-
},
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function Basic() {
|
|
17
|
-
const menu = <DummyMenu />
|
|
18
|
-
const header = <>Header</>
|
|
19
|
-
return (
|
|
20
|
-
<Layout menu={menu} header={header}>
|
|
21
|
-
<DummyCard span={3}>Span 3</DummyCard>
|
|
22
|
-
<DummyCard span={2}>Span 2</DummyCard>
|
|
23
|
-
<DummyCard span={1}>Span 1</DummyCard>
|
|
24
|
-
<DummyCard span={1}>Span 1</DummyCard>
|
|
25
|
-
<DummyCard span={1}>Span 1</DummyCard>
|
|
26
|
-
<DummyCard span={1}>Span 1</DummyCard>
|
|
27
|
-
</Layout>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function NoMenu() {
|
|
32
|
-
const header = <>Header</>
|
|
33
|
-
return (
|
|
34
|
-
<Layout header={header}>
|
|
35
|
-
<DummyCard span={3}>Span 3</DummyCard>
|
|
36
|
-
<DummyCard span={2}>Span 2</DummyCard>
|
|
37
|
-
<DummyCard span={1}>Span 1</DummyCard>
|
|
38
|
-
<DummyCard span={1}>Span 1</DummyCard>
|
|
39
|
-
<DummyCard span={1}>Span 1</DummyCard>
|
|
40
|
-
<DummyCard span={1}>Span 1</DummyCard>
|
|
41
|
-
</Layout>
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function Wide() {
|
|
46
|
-
const menu = <DummyMenu />
|
|
47
|
-
const header = <>Header</>
|
|
48
|
-
return (
|
|
49
|
-
<Layout menu={menu} header={header} wide>
|
|
50
|
-
<LayoutItem span={3}>
|
|
51
|
-
<LayoutItemHeader>Wide</LayoutItemHeader>
|
|
52
|
-
<LayoutItemBody>
|
|
53
|
-
<Dummy>Hello, Flexible Grid Layout!</Dummy>
|
|
54
|
-
</LayoutItemBody>
|
|
55
|
-
</LayoutItem>
|
|
56
|
-
</Layout>
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export function Center() {
|
|
61
|
-
const header = <>Header</>
|
|
62
|
-
return (
|
|
63
|
-
<Layout header={header} wide center>
|
|
64
|
-
<LayoutItem span={3}>
|
|
65
|
-
<LayoutItemHeader>Center</LayoutItemHeader>
|
|
66
|
-
<LayoutItemBody>
|
|
67
|
-
<Dummy>Hello, Flexible Grid Layout!</Dummy>
|
|
68
|
-
</LayoutItemBody>
|
|
69
|
-
</LayoutItem>
|
|
70
|
-
</Layout>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function DummyCard({
|
|
75
|
-
span,
|
|
76
|
-
children,
|
|
77
|
-
}: {
|
|
78
|
-
span: number
|
|
79
|
-
children: React.ReactNode
|
|
80
|
-
}) {
|
|
81
|
-
return (
|
|
82
|
-
<LayoutItem span={span}>
|
|
83
|
-
<LayoutItemHeader>Dummy</LayoutItemHeader>
|
|
84
|
-
<LayoutItemBody>
|
|
85
|
-
<Dummy>{children}</Dummy>
|
|
86
|
-
</LayoutItemBody>
|
|
87
|
-
</LayoutItem>
|
|
88
|
-
)
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const Dummy = styled.div`
|
|
92
|
-
${theme((o) => o.height.column(2))}
|
|
93
|
-
|
|
94
|
-
${dummyText}
|
|
95
|
-
`
|
|
96
|
-
|
|
97
|
-
function DummyMenu() {
|
|
98
|
-
const links = [
|
|
99
|
-
{
|
|
100
|
-
id: 'hello',
|
|
101
|
-
text: 'Hello',
|
|
102
|
-
to: '#hello',
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
id: 'world',
|
|
106
|
-
text: 'World',
|
|
107
|
-
to: '#world',
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
id: 'dummy',
|
|
111
|
-
text: 'Dummy',
|
|
112
|
-
to: '#dummy',
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
id: 'menu',
|
|
116
|
-
text: 'Menu',
|
|
117
|
-
to: '#menu',
|
|
118
|
-
},
|
|
119
|
-
] as const
|
|
120
|
-
return <LeftMenu links={links} active="hello" />
|
|
121
|
-
}
|