@charcoal-ui/react-sandbox 4.0.0-beta.3 → 4.0.0-beta.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 (41) hide show
  1. package/package.json +8 -9
  2. package/dist/components/Carousel/index.story.d.ts +0 -7
  3. package/dist/components/Carousel/index.story.d.ts.map +0 -1
  4. package/dist/components/CarouselButton/index.story.d.ts +0 -10
  5. package/dist/components/CarouselButton/index.story.d.ts.map +0 -1
  6. package/dist/components/Filter/index.story.d.ts +0 -9
  7. package/dist/components/Filter/index.story.d.ts.map +0 -1
  8. package/dist/components/HintText/index.story.d.ts +0 -12
  9. package/dist/components/HintText/index.story.d.ts.map +0 -1
  10. package/dist/components/Layout/index.story.d.ts +0 -14
  11. package/dist/components/Layout/index.story.d.ts.map +0 -1
  12. package/dist/components/MenuListItem/index.story.d.ts +0 -18
  13. package/dist/components/MenuListItem/index.story.d.ts.map +0 -1
  14. package/dist/components/Pager/index.story.d.ts +0 -39
  15. package/dist/components/Pager/index.story.d.ts.map +0 -1
  16. package/dist/components/SwitchCheckbox/index.story.d.ts +0 -10
  17. package/dist/components/SwitchCheckbox/index.story.d.ts.map +0 -1
  18. package/dist/components/TextEllipsis/index.story.d.ts +0 -9
  19. package/dist/components/TextEllipsis/index.story.d.ts.map +0 -1
  20. package/dist/components/WithIcon/index.story.d.ts +0 -15
  21. package/dist/components/WithIcon/index.story.d.ts.map +0 -1
  22. package/src/components/Carousel/__snapshots__/index.story.storyshot +0 -360
  23. package/src/components/Carousel/index.story.tsx +0 -85
  24. package/src/components/CarouselButton/__snapshots__/index.story.storyshot +0 -168
  25. package/src/components/CarouselButton/index.story.tsx +0 -43
  26. package/src/components/Filter/__snapshots__/index.story.storyshot +0 -239
  27. package/src/components/Filter/index.story.tsx +0 -82
  28. package/src/components/HintText/__snapshots__/index.story.storyshot +0 -119
  29. package/src/components/HintText/index.story.tsx +0 -18
  30. package/src/components/Layout/__snapshots__/index.story.storyshot +0 -1297
  31. package/src/components/Layout/index.story.tsx +0 -121
  32. package/src/components/MenuListItem/__snapshots__/index.story.storyshot +0 -1389
  33. package/src/components/MenuListItem/index.story.tsx +0 -142
  34. package/src/components/Pager/__snapshots__/index.story.storyshot +0 -1894
  35. package/src/components/Pager/index.story.tsx +0 -153
  36. package/src/components/SwitchCheckbox/__snapshots__/index.story.storyshot +0 -507
  37. package/src/components/SwitchCheckbox/index.story.tsx +0 -31
  38. package/src/components/TextEllipsis/__snapshots__/index.story.storyshot +0 -32
  39. package/src/components/TextEllipsis/index.story.tsx +0 -40
  40. package/src/components/WithIcon/__snapshots__/index.story.storyshot +0 -852
  41. package/src/components/WithIcon/index.story.tsx +0 -145
@@ -1,142 +0,0 @@
1
- import { action } from '@storybook/addon-actions'
2
- import { boolean, select, text } from '@storybook/addon-knobs'
3
- import styled from 'styled-components'
4
- import SwitchCheckbox from '../SwitchCheckbox'
5
- import WithIcon from '../WithIcon'
6
- import MenuListItem, {
7
- MenuListItemContext,
8
- MenuListLabel,
9
- MenuListLinkItem,
10
- MenuListLinkItemWithIcon,
11
- MenuListSpacer,
12
- } from '.'
13
-
14
- export default {
15
- title: 'Sandbox/MenuListItem',
16
- component: MenuListItem,
17
- }
18
-
19
- export const Default = () => {
20
- const primary = text('primary', 'Knob to change')
21
- const secondary = text('secondary', '')
22
- const disabled = boolean('disabled', false)
23
- const padding = select('padding', { '16': 16, '24': 24 }, 24)
24
- const noHover = boolean('noHover', false)
25
- return (
26
- <MenuListItemContext.Provider value={{ padding }}>
27
- <MenuListItem
28
- primary={primary}
29
- secondary={secondary === '' ? undefined : secondary}
30
- disabled={disabled}
31
- onClick={action('click')}
32
- noHover={noHover}
33
- />
34
- </MenuListItemContext.Provider>
35
- )
36
- }
37
-
38
- export const Simple = () => (
39
- <MenuListItem
40
- primary="Simple item"
41
- secondary="with secondary"
42
- onClick={action('click')}
43
- />
44
- )
45
-
46
- export const Disabled = () => (
47
- <MenuListItem
48
- primary="Disabled item"
49
- disabled
50
- onClick={action('disabled click')}
51
- />
52
- )
53
-
54
- export const Link = () => (
55
- <MenuListLinkItem
56
- primary="This is link"
57
- onClick={action('link click')}
58
- link="#linkTo"
59
- />
60
- )
61
-
62
- export const HardLink = () => (
63
- <MenuListLinkItem
64
- primary='This is link with target "_blank"'
65
- onClick={action('link click')}
66
- link="#linkTo"
67
- target="_blank"
68
- rel="noopener noreferrer"
69
- />
70
- )
71
-
72
- export const InlineIcon = () => (
73
- <MenuListItem
74
- primary={
75
- <WithIcon icon={<TestInlineIcon />}>Label with inline icon</WithIcon>
76
- }
77
- onClick={action('toggle')}
78
- />
79
- )
80
-
81
- export const Icon = () => (
82
- <MenuListLinkItemWithIcon
83
- primary="Link with 24px icon"
84
- icon={<TestIcon />}
85
- link="#linkTo"
86
- />
87
- )
88
-
89
- export const NoHoverEffect = () => (
90
- <MenuListItem
91
- primary="With toggle (no hover effect)"
92
- onClick={action('toggle')}
93
- noHover
94
- >
95
- <SwitchCheckbox checked onChange={action('toggle')} />
96
- </MenuListItem>
97
- )
98
-
99
- export const Spacer = () => (
100
- <>
101
- <MenuListItem primary="↓ This is spacer" />
102
- <MenuListSpacer />
103
- <MenuListItem primary="↑ This is spacer" />
104
- </>
105
- )
106
-
107
- export const Label = () => (
108
- <>
109
- <MenuListLabel>Label</MenuListLabel>
110
- <MenuListItem primary="Label grouped items" />
111
- </>
112
- )
113
-
114
- export const TextEllipsis = () => (
115
- <div
116
- css={`
117
- width: 300px;
118
- `}
119
- >
120
- <MenuListItem primary="Loooooooooooooooooooooooooong texxxxxxxxxxxxxxxxxxxxxxxxxt" />
121
- </div>
122
- )
123
-
124
- const TestIcon = styled.div`
125
- display: inline-block;
126
- width: 24px;
127
- height: 24px;
128
- background-color: currentColor;
129
- `
130
-
131
- const TestInlineIcon = styled.div`
132
- display: inline-flex;
133
- vertical-align: top;
134
- align-items: center;
135
- &::before {
136
- content: '';
137
- display: inline-block;
138
- height: 16px;
139
- width: 16px;
140
- background-color: currentColor;
141
- }
142
- `