@sproutsocial/racine 11.7.0 → 11.9.0-typescript.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/CHANGELOG.md +25 -0
- package/__flow__/Button/{index.js → index.tsx} +20 -21
- package/__flow__/Button/{styles.js → styles.ts} +1 -1
- package/__flow__/Checkbox/index.stories.js +73 -56
- package/__flow__/Checkbox/styles.js +75 -75
- package/__flow__/Collapsible/index.js +3 -2
- package/__flow__/EnumIconNames.js +1 -1
- package/__flow__/Icon/index.stories.js +41 -36
- package/__flow__/IconViewBoxes.js +1 -1
- package/__flow__/Image/index.js +10 -2
- package/__flow__/Input/index.js +47 -23
- package/__flow__/Input/index.stories.js +59 -33
- package/__flow__/Input/index.test.js +20 -0
- package/__flow__/Input/styles.js +2 -2
- package/__flow__/Loader/index.stories.js +18 -14
- package/__flow__/Numeral/index.stories.js +109 -50
- package/__flow__/Radio/index.stories.js +41 -26
- package/__flow__/SegmentedControl/index.js +3 -2
- package/__flow__/Switch/index.stories.js +26 -18
- package/__flow__/TableCell/index.js +9 -2
- package/__flow__/ToggleHint/index.js +9 -2
- package/__flow__/systemProps/color.js +1 -2
- package/__flow__/utils/responsiveProps/index.test.js +10 -2
- package/commonjs/IconViewBoxes.js +2 -0
- package/commonjs/Input/index.js +42 -22
- package/commonjs/Input/styles.js +2 -2
- package/commonjs/include-icons.js +1 -1
- package/dist/iconList.js +1 -1
- package/dist/icons.svg +1 -1
- package/icons/help-alt.svg +3 -0
- package/icons/plug.svg +3 -0
- package/includeIcons.js +1 -1
- package/lib/IconViewBoxes.js +2 -0
- package/lib/Input/index.js +42 -22
- package/lib/Input/styles.js +2 -2
- package/lib/include-icons.js +1 -1
- package/package.json +6 -1
- package/commonjs/Button/index.js +0 -70
- package/commonjs/Button/styles.js +0 -66
- package/lib/Button/index.js +0 -57
- package/lib/Button/styles.js +0 -48
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 11.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1b66f38: Input.ClearButton no longer requires onClear prop
|
|
8
|
+
- Input has been updated to be able to clear itself for both controlled and uncontrolled Inputs
|
|
9
|
+
- The onChange function will be called upon clearing the input.
|
|
10
|
+
- Due to this change, Inputs with type "search" will now automatically include a ClearButton, whereas previously a ClearButton would not be rendered unless an onClear prop was provided.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 1b66f38: Adjust Input elemBefore and elemAfter positioning
|
|
15
|
+
- These elements were previously positioned 12px from the side of the Input
|
|
16
|
+
- They are now positioned 8px from the side of the Input, for better alignment with Input.ClearButton.
|
|
17
|
+
- 1b66f38: Expose Input.ClearButton for uncontrolled Inputs
|
|
18
|
+
- Previously, Input.ClearButton would not be usable for uncontrolled Inputs due to checking whether a value was in the input to clear only via the "value" prop.
|
|
19
|
+
- Now, Input.ClearButton is usable for uncontrolled Inputs because it is checking for updates to the value in its handleChange function.
|
|
20
|
+
|
|
21
|
+
## 11.7.1
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- d7b2b1f: - Plug icon
|
|
26
|
+
- Alternate help icon
|
|
27
|
+
|
|
3
28
|
## 11.7.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import React from "react";
|
|
3
2
|
import Container from "./styles";
|
|
4
3
|
|
|
5
|
-
export
|
|
4
|
+
export interface ButtonType {
|
|
6
5
|
/** If the button is being used as an anchor, this prop will cause the link to open in a new tab. */
|
|
7
|
-
external?: boolean
|
|
8
|
-
size?: "large" | "default"
|
|
6
|
+
external?: boolean;
|
|
7
|
+
size?: "large" | "default";
|
|
9
8
|
/** What the button looks like. "default" is deprecated in favor of "unstyled" */
|
|
10
|
-
appearance
|
|
9
|
+
appearance:
|
|
11
10
|
| "primary"
|
|
12
11
|
| "secondary"
|
|
13
12
|
| "pill"
|
|
14
13
|
| "destructive"
|
|
15
14
|
| "default"
|
|
16
15
|
| "unstyled"
|
|
17
|
-
| "placeholder"
|
|
16
|
+
| "placeholder";
|
|
18
17
|
/** Set the button to display in its active state */
|
|
19
|
-
active?: boolean
|
|
18
|
+
active?: boolean;
|
|
20
19
|
/** Disables user action and applies a disabled style on the button */
|
|
21
|
-
disabled?: boolean
|
|
22
|
-
children: React.
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
children: React.ReactNode;
|
|
23
22
|
/** Setting this prop will cause the component to be rendered as an anchor element instead of a button element */
|
|
24
|
-
href?: string
|
|
23
|
+
href?: string;
|
|
25
24
|
/** Used to get a reference to the underlying button */
|
|
26
|
-
innerRef?: React.Ref<"button"
|
|
25
|
+
innerRef?: React.Ref<"button">;
|
|
27
26
|
/** Action to perform when the button is clicked */
|
|
28
|
-
onClick?: (
|
|
29
|
-
title?: string
|
|
30
|
-
qa?: Object
|
|
31
|
-
as?: any
|
|
27
|
+
onClick?: () => void;
|
|
28
|
+
title?: string;
|
|
29
|
+
qa?: Object;
|
|
30
|
+
as?: any;
|
|
32
31
|
/** Label used to describe the button if the button does not have text within it */
|
|
33
|
-
ariaLabel?: string
|
|
34
|
-
}
|
|
32
|
+
ariaLabel?: string;
|
|
33
|
+
}
|
|
35
34
|
|
|
36
35
|
const Button = ({
|
|
37
36
|
href,
|
|
@@ -47,8 +46,9 @@ const Button = ({
|
|
|
47
46
|
qa = {},
|
|
48
47
|
as,
|
|
49
48
|
ariaLabel,
|
|
49
|
+
|
|
50
50
|
...rest
|
|
51
|
-
}:
|
|
51
|
+
}: ButtonType) => {
|
|
52
52
|
if (!href && external) {
|
|
53
53
|
console.warn(
|
|
54
54
|
"Warning: external prop cannot be set without a href declaration"
|
|
@@ -60,6 +60,7 @@ const Button = ({
|
|
|
60
60
|
|
|
61
61
|
return (
|
|
62
62
|
<Container
|
|
63
|
+
className="container"
|
|
63
64
|
title={title}
|
|
64
65
|
active={active}
|
|
65
66
|
href={href}
|
|
@@ -84,6 +85,4 @@ const Button = ({
|
|
|
84
85
|
);
|
|
85
86
|
};
|
|
86
87
|
|
|
87
|
-
Button.displayName = "Button";
|
|
88
|
-
|
|
89
88
|
export default Button;
|
|
@@ -6,7 +6,7 @@ import Icon from "../Icon/styles";
|
|
|
6
6
|
|
|
7
7
|
import type { TypeTheme } from "../types/theme.flow";
|
|
8
8
|
|
|
9
|
-
const Container
|
|
9
|
+
const Container = styled.button`
|
|
10
10
|
display: inline-block;
|
|
11
11
|
box-sizing: border-box;
|
|
12
12
|
text-align: center;
|
|
@@ -1,114 +1,131 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { boolean } from "@storybook/addon-knobs";
|
|
3
2
|
import { action } from "@storybook/addon-actions";
|
|
4
3
|
|
|
5
4
|
import Checkbox from "./";
|
|
6
5
|
|
|
7
6
|
export default {
|
|
8
7
|
title: "Checkbox",
|
|
8
|
+
component: Checkbox,
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
export const Checked = () => <Checkbox
|
|
12
|
-
export const Unchecked = () => <Checkbox checked={boolean("checked", false)} />;
|
|
11
|
+
export const Checked = (args) => <Checkbox {...args} />;
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
)
|
|
13
|
+
Checked.args = { checked: true };
|
|
14
|
+
|
|
15
|
+
export const Unchecked = (args) => <Checkbox {...args} />;
|
|
16
|
+
|
|
17
|
+
Unchecked.args = { checked: false };
|
|
18
|
+
|
|
19
|
+
export const PillChecked = (args) => <Checkbox {...args} />;
|
|
20
|
+
|
|
21
|
+
PillChecked.args = {
|
|
22
|
+
checked: true,
|
|
23
|
+
appearance: "pill",
|
|
24
|
+
};
|
|
17
25
|
|
|
18
26
|
PillChecked.story = {
|
|
19
27
|
name: "Pill/Checked",
|
|
20
28
|
};
|
|
21
29
|
|
|
22
|
-
export const PillUnchecked = () =>
|
|
23
|
-
|
|
24
|
-
|
|
30
|
+
export const PillUnchecked = (args) => <Checkbox {...args} />;
|
|
31
|
+
|
|
32
|
+
PillUnchecked.args = {
|
|
33
|
+
checked: false,
|
|
34
|
+
appearance: "pill",
|
|
35
|
+
};
|
|
25
36
|
|
|
26
37
|
PillUnchecked.story = {
|
|
27
38
|
name: "Pill/Unchecked",
|
|
28
39
|
};
|
|
29
40
|
|
|
30
|
-
export const DisabledChecked = () =>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
41
|
+
export const DisabledChecked = (args) => <Checkbox {...args} />;
|
|
42
|
+
|
|
43
|
+
DisabledChecked.args = {
|
|
44
|
+
checked: true,
|
|
45
|
+
disabled: true,
|
|
46
|
+
};
|
|
36
47
|
|
|
37
48
|
DisabledChecked.story = {
|
|
38
49
|
name: "Disabled/Checked",
|
|
39
50
|
};
|
|
40
51
|
|
|
41
|
-
export const DisabledUnchecked = () =>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
52
|
+
export const DisabledUnchecked = (args) => <Checkbox {...args} />;
|
|
53
|
+
|
|
54
|
+
DisabledUnchecked.args = {
|
|
55
|
+
checked: false,
|
|
56
|
+
disabled: true,
|
|
57
|
+
};
|
|
47
58
|
|
|
48
59
|
DisabledUnchecked.story = {
|
|
49
60
|
name: "Disabled/Unchecked",
|
|
50
61
|
};
|
|
51
62
|
|
|
52
|
-
export const IndeterminateChecked = () =>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
63
|
+
export const IndeterminateChecked = (args) => <Checkbox {...args} />;
|
|
64
|
+
|
|
65
|
+
IndeterminateChecked.args = {
|
|
66
|
+
checked: true,
|
|
67
|
+
indeterminate: true,
|
|
68
|
+
};
|
|
58
69
|
|
|
59
70
|
IndeterminateChecked.story = {
|
|
60
71
|
name: "Indeterminate/Checked",
|
|
61
72
|
};
|
|
62
73
|
|
|
63
|
-
export const IndeterminateUnchecked = () =>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
export const IndeterminateUnchecked = (args) => <Checkbox {...args} />;
|
|
75
|
+
|
|
76
|
+
IndeterminateUnchecked.args = {
|
|
77
|
+
checked: false,
|
|
78
|
+
indeterminate: true,
|
|
79
|
+
};
|
|
69
80
|
|
|
70
81
|
IndeterminateUnchecked.story = {
|
|
71
82
|
name: "Indeterminate/Unchecked",
|
|
72
83
|
};
|
|
73
84
|
|
|
74
|
-
export const LabelledChecked = () =>
|
|
75
|
-
|
|
76
|
-
|
|
85
|
+
export const LabelledChecked = (args) => <Checkbox {...args} />;
|
|
86
|
+
|
|
87
|
+
LabelledChecked.args = {
|
|
88
|
+
checked: true,
|
|
89
|
+
label: "Labelled checkbox",
|
|
90
|
+
};
|
|
77
91
|
|
|
78
92
|
LabelledChecked.story = {
|
|
79
93
|
name: "Labelled/Checked",
|
|
80
94
|
};
|
|
81
95
|
|
|
82
|
-
export const LabelledUnchecked = () =>
|
|
83
|
-
|
|
84
|
-
|
|
96
|
+
export const LabelledUnchecked = (args) => <Checkbox {...args} />;
|
|
97
|
+
|
|
98
|
+
LabelledUnchecked.args = {
|
|
99
|
+
checked: false,
|
|
100
|
+
label: "Labelled checkbox",
|
|
101
|
+
};
|
|
85
102
|
|
|
86
103
|
LabelledUnchecked.story = {
|
|
87
104
|
name: "Labelled/Unchecked",
|
|
88
105
|
};
|
|
89
106
|
|
|
90
|
-
export const LabelledDisabled = () =>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
107
|
+
export const LabelledDisabled = (args) => <Checkbox {...args} />;
|
|
108
|
+
|
|
109
|
+
LabelledDisabled.args = {
|
|
110
|
+
checked: true,
|
|
111
|
+
disabled: true,
|
|
112
|
+
label: "Labelled checkbox",
|
|
113
|
+
};
|
|
97
114
|
|
|
98
115
|
LabelledDisabled.story = {
|
|
99
116
|
name: "Labelled/Disabled",
|
|
100
117
|
};
|
|
101
118
|
|
|
102
|
-
export const InputPropsOnMouseOver = () =>
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
119
|
+
export const InputPropsOnMouseOver = (args) => <Checkbox {...args} />;
|
|
120
|
+
|
|
121
|
+
InputPropsOnMouseOver.args = {
|
|
122
|
+
checked: true,
|
|
123
|
+
label: "Labelled checkbox",
|
|
124
|
+
inputProps: {
|
|
125
|
+
onMouseOver: action("checkbox-mouseOver"),
|
|
126
|
+
onClick: action("checkbox-click"),
|
|
127
|
+
},
|
|
128
|
+
};
|
|
112
129
|
|
|
113
130
|
InputPropsOnMouseOver.story = {
|
|
114
131
|
name: "InputProps/OnMouseOver",
|
|
@@ -182,90 +182,90 @@ const getIcon = (type, color) => {
|
|
|
182
182
|
|
|
183
183
|
// eslint-disable-next-line prettier/prettier
|
|
184
184
|
export const CheckboxContainer: StyledComponent<any, TypeTheme, *> = styled.span(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
185
|
+
(props) => css`
|
|
186
|
+
display: inline-flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
box-sizing: border-box;
|
|
189
|
+
position: relative;
|
|
190
|
+
transition: all ${props.theme.duration.fast} ${props.theme.easing.ease_in};
|
|
191
|
+
|
|
192
|
+
@supports (-webkit-appearance: none) {
|
|
193
|
+
&:before {
|
|
194
|
+
/* stylelint-disable */
|
|
195
|
+
content: url("data:image/svg+xml;utf8,${getIcon(
|
|
196
|
+
props.indeterminate ? "indeterminate" : "check",
|
|
197
|
+
|
|
198
|
+
props.checked
|
|
199
|
+
? props.theme.colors.form.background.base
|
|
200
|
+
: props.theme.colors.form.border.base
|
|
201
|
+
)}");
|
|
202
|
+
opacity: ${props.checked ? 1 : 0};
|
|
203
|
+
position: absolute;
|
|
204
|
+
width: ${props.theme.space[400]};
|
|
205
|
+
height: ${props.theme.space[400]};
|
|
206
|
+
text-align: center;
|
|
207
|
+
transform: translateY(1px);
|
|
208
|
+
line-height: 1;
|
|
209
|
+
margin: auto;
|
|
210
|
+
pointer-events: none;
|
|
211
|
+
transition: ${props.theme.duration.fast}
|
|
212
|
+
${props.theme.easing.ease_inout};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&:hover:before {
|
|
216
|
+
opacity: ${props.disabled && !props.checked ? 0 : 1};
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
${props.disabled &&
|
|
220
|
+
css`
|
|
221
|
+
opacity: 0.4;
|
|
222
|
+
`}
|
|
223
|
+
|
|
224
|
+
input[type='checkbox'] {
|
|
225
|
+
box-sizing: border-box;
|
|
226
|
+
appearance: none;
|
|
227
|
+
margin: 0;
|
|
228
|
+
padding: 0;
|
|
229
|
+
width: ${props.theme.space[400]};
|
|
230
|
+
height: ${props.theme.space[400]};
|
|
231
|
+
border: 1px solid ${props.theme.colors.form.border.base};
|
|
232
|
+
border-radius: 4px;
|
|
233
|
+
background-color: ${props.theme.colors.form.background.base};
|
|
234
|
+
transition: all ${props.theme.duration.fast}
|
|
235
|
+
${props.theme.easing.ease_in};
|
|
236
|
+
cursor: ${props.disabled ? "not-allowed" : "pointer"};
|
|
237
|
+
flex-shrink: 0;
|
|
238
|
+
|
|
239
|
+
&:not(:checked) {
|
|
240
|
+
${!props.indeterminate &&
|
|
241
|
+
css`
|
|
242
|
+
border-color: ${props.theme.colors
|
|
243
|
+
.neutral[300]} !important; /* We don't want the focus ring to remove the border */
|
|
244
|
+
background-color: ${props.theme.colors.form.background.base};
|
|
245
|
+
`}
|
|
213
246
|
}
|
|
214
247
|
|
|
215
|
-
&:
|
|
216
|
-
|
|
248
|
+
&:checked {
|
|
249
|
+
border-color: ${props.theme.colors.form.border.selected};
|
|
250
|
+
background-color: ${props.theme.colors.form.background.selected};
|
|
217
251
|
}
|
|
218
252
|
|
|
219
|
-
${props.
|
|
253
|
+
${props.indeterminate &&
|
|
254
|
+
props.checked &&
|
|
220
255
|
css`
|
|
221
|
-
|
|
256
|
+
border-color: ${props.theme.colors.form.border.selected} !important;
|
|
257
|
+
background-color: ${props.theme.colors.form.background
|
|
258
|
+
.selected} !important;
|
|
222
259
|
`}
|
|
223
260
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
appearance: none;
|
|
227
|
-
margin: 0;
|
|
228
|
-
padding: 0;
|
|
229
|
-
width: ${props.theme.space[400]};
|
|
230
|
-
height: ${props.theme.space[400]};
|
|
231
|
-
border: 1px solid ${props.theme.colors.form.border.base};
|
|
232
|
-
border-radius: 4px;
|
|
233
|
-
background-color: ${props.theme.colors.form.background.base};
|
|
234
|
-
transition: all ${props.theme.duration.fast}
|
|
235
|
-
${props.theme.easing.ease_in};
|
|
236
|
-
cursor: ${props.disabled ? "not-allowed" : "pointer"};
|
|
237
|
-
flex-shrink: 0;
|
|
238
|
-
|
|
239
|
-
&:not(:checked) {
|
|
240
|
-
${!props.indeterminate &&
|
|
241
|
-
css`
|
|
242
|
-
border-color: ${props.theme.colors
|
|
243
|
-
.neutral[300]} !important; /* We don't want the focus ring to remove the border */
|
|
244
|
-
background-color: ${props.theme.colors.form.background.base};
|
|
245
|
-
`}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
&:checked {
|
|
249
|
-
border-color: ${props.theme.colors.form.border.selected};
|
|
250
|
-
background-color: ${props.theme.colors.form.background.selected};
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
${props.indeterminate &&
|
|
254
|
-
props.checked &&
|
|
255
|
-
css`
|
|
256
|
-
border-color: ${props.theme.colors.form.border.selected} !important;
|
|
257
|
-
background-color: ${props.theme.colors.form.background
|
|
258
|
-
.selected} !important;
|
|
259
|
-
`}
|
|
260
|
-
|
|
261
|
-
&:focus {
|
|
262
|
-
${focusRing}
|
|
263
|
-
}
|
|
261
|
+
&:focus {
|
|
262
|
+
${focusRing}
|
|
264
263
|
}
|
|
265
264
|
}
|
|
265
|
+
}
|
|
266
266
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
${COMMON}
|
|
268
|
+
`
|
|
269
|
+
);
|
|
270
270
|
|
|
271
271
|
export default Container;
|
|
@@ -73,8 +73,9 @@ const Trigger = ({ children, ...rest }) => {
|
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
const Panel = ({ children, ...rest }) => {
|
|
76
|
-
const { isOpen, id, offset, collapsedHeight, openHeight } =
|
|
77
|
-
|
|
76
|
+
const { isOpen, id, offset, collapsedHeight, openHeight } = useContext(
|
|
77
|
+
CollapsibleContext
|
|
78
|
+
);
|
|
78
79
|
const ref = useRef();
|
|
79
80
|
const measurement = useMeasure(ref);
|
|
80
81
|
const [isHidden, setIsHidden] = useState(undefined);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @flow
|
|
2
|
-
export type EnumIconNames = "active-listener" | "add-item" | "add-keyword" | "add-team-member" | "add-variable" | "address-card-outline" | "address-card-solid" | "adobe-experience-manager" | "ads" | "android" | "apple" | "approval-indicator-outline" | "approval-indicator" | "archive" | "arrow-down-line" | "arrow-down" | "arrow-left-line" | "arrow-left" | "arrow-right-line" | "arrow-right" | "arrow-up-line" | "arrow-up" | "arrows" | "asset-library-outline" | "asset-library" | "assign" | "atom" | "audio" | "back-to-top" | "bambu-icon-outline" | "bambu-icon" | "barcode" | "basketball" | "bell-outline" | "bigcommerce" | "bitly" | "bold" | "book" | "bot" | "browser" | "business" | "calendar-outline" | "calendar" | "camera-outline" | "camera-story" | "camera" | "campaign" | "canva" | "carousel" | "cart-plus-outline" | "cart-plus" | "check" | "chevron-down-filled" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up-down-filled" | "chevron-up-filled" | "chevron-up" | "circle-check-outline" | "circle-check" | "circle" | "circle+" | "circles" | "circlex" | "click-to-view" | "clicks" | "clipboard-outline" | "clipboard" | "clock" | "closed-captioning" | "cloud" | "code" | "columns" | "comment-alt-outline" | "comment-alt" | "comment-lines-alt-outline" | "comment" | "compact-density" | "compact-indicator" | "comparison" | "competitor" | "compose" | "content-suggestions" | "credit-card" | "crop" | "crown" | "dashboard" | "deconstructed-negative-sentiment" | "deconstructed-neutral-sentiment" | "deconstructed-positive-sentiment" | "discovery" | "dislike-outline" | "dislike" | "dm-link-outline" | "dm-link" | "dotdotdot" | "download" | "drafts-outline" | "drafts" | "dropbox" | "duplicate-outline" | "duplicate" | "emoji-outline" | "emoji" | "empty-image" | "engagement-per-post" | "engagements" | "error" | "exchange-alt" | "expanded-indicator" | "export" | "extended-circles" | "external-link-alt" | "external-link" | "extreme-negative-sentiment" | "eye-outline" | "eye-slash-outline" | "eye-slash" | "eye" | "facebook-audience-network" | "facebook-branded-content-outline" | "facebook-branded-content" | "facebook-groups" | "facebook" | "fb-reactions-angry" | "fb-reactions-haha" | "fb-reactions-like" | "fb-reactions-love" | "fb-reactions-sad" | "fb-reactions-wow" | "feedly" | "feeds" | "female" | "file-chart-line" | "file-edit" | "file-times-solid" | "filter" | "flag-outline" | "flag" | "flat-negative-sentiment-outline" | "flat-negative-sentiment" | "flat-neutral-sentiment-outline" | "flat-neutral-sentiment" | "flat-positive-sentiment-outline" | "flat-positive-sentiment" | "folder-open" | "folder" | "follow-outline" | "follow" | "follower-increase" | "following" | "font" | "full-access" | "gear" | "gears" | "glassdoor" | "glasses" | "globe" | "google-analytics-color" | "google-business-messages" | "google-drive" | "google-my-business" | "grip" | "h1" | "h2" | "hamburger" | "hashtag" | "headset" | "heart-outline" | "heart" | "heartbeat" | "help" | "hiking" | "history" | "home" | "hourglass" | "hubspot" | "image-caption" | "image" | "images" | "impressions-per-post" | "impressions" | "inactive-listener" | "inbox-action" | "inbox-views" | "inbox" | "indicator" | "industry" | "info" | "instagram" | "internal-activity-outline" | "internal-activity" | "italic" | "key" | "keyboard" | "laptop-phone" | "large-density" | "lift" | "like-outline" | "like" | "link" | "linkedin-audience-network" | "linkedin" | "list-ol" | "listening" | "lists" | "location-outline" | "location" | "lock" | "magic-wand" | "male" | "marketo" | "mention" | "message-preview-outline" | "message-preview" | "message" | "messages-outline" | "messages" | "messenger" | "metric-table" | "microsoft-dynamics" | "minus" | "mobile" | "monitor" | "moon" | "negative-sentiment" | "neutral-positive-sentiment" | "neutral-sentiment" | "new-trend" | "newspaper" | "no-access" | "notepad" | "notifications-publishing-outline" | "notifications-publishing" | "notifications" | "offline" | "online" | "paid-promotion-outline" | "paid-promotion" | "paid" | "paint" | "palette" | "paperclip" | "pause" | "pencil-outline" | "pencil" | "person" | "phone" | "pinterest-boards-outline" | "pinterest-boards" | "pinterest" | "play-circle" | "play" | "plus" | "positive-sentiment" | "power-up-outline" | "power-up" | "profile-connect" | "profile-disconnect" | "publishing-outline" | "publishing" | "puzzle-piece" | "qr-code" | "queue" | "recommendation" | "reddit-alien" | "reddit" | "referrals" | "refresh" | "rejected" | "reply-outline" | "reply" | "reporting-period" | "reporting" | "reports-home" | "reports" | "retweet" | "rss" | "sales" | "salesforce" | "save-assets" | "saved-messages" | "saved-reply-outline" | "saved-reply" | "search" | "sent-message-outline" | "sent-message" | "share" | "shopify" | "show-navigation" | "slack" | "small-density" | "smiley" | "some-access" | "sparkles" | "spike-alert" | "star-half-alt-solid" | "star-of-life" | "star-outline" | "star" | "sticky-note-outline" | "sticky-note" | "stories" | "story" | "suggestions" | "sun" | "tag-outline" | "tag" | "targeting-outline" | "targeting" | "tasks-outline" | "tasks" | "team-conversation-outline" | "team-conversation" | "team" | "text-asset" | "text" | "tiktok" | "times" | "trash-can-outline" | "trash-can" | "trend-down" | "trend-neutral" | "trend-up" | "trends" | "triangle-black" | "triangle" | "tripadvisor-circle-outline" | "tripadvisor-circle" | "tripadvisor" | "trophy-outline" | "tumblr" | "twitter-audience-network" | "twitter" | "unfollow-outline" | "unfollow" | "unlink" | "unlock" | "upload" | "user-circle" | "users" | "verified" | "video-camera-story" | "video-camera" | "vip" | "weight" | "whatsapp" | "window-maximize" | "window-minimize" | "window-regular" | "window-restore" | "woocommerce" | "x" | "yelp-full-star" | "yelp-half-star" | "yelp" | "youtube" | "zendesk";
|
|
2
|
+
export type EnumIconNames = "active-listener" | "add-item" | "add-keyword" | "add-team-member" | "add-variable" | "address-card-outline" | "address-card-solid" | "adobe-experience-manager" | "ads" | "android" | "apple" | "approval-indicator-outline" | "approval-indicator" | "archive" | "arrow-down-line" | "arrow-down" | "arrow-left-line" | "arrow-left" | "arrow-right-line" | "arrow-right" | "arrow-up-line" | "arrow-up" | "arrows" | "asset-library-outline" | "asset-library" | "assign" | "atom" | "audio" | "back-to-top" | "bambu-icon-outline" | "bambu-icon" | "barcode" | "basketball" | "bell-outline" | "bigcommerce" | "bitly" | "bold" | "book" | "bot" | "browser" | "business" | "calendar-outline" | "calendar" | "camera-outline" | "camera-story" | "camera" | "campaign" | "canva" | "carousel" | "cart-plus-outline" | "cart-plus" | "check" | "chevron-down-filled" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up-down-filled" | "chevron-up-filled" | "chevron-up" | "circle-check-outline" | "circle-check" | "circle" | "circle+" | "circles" | "circlex" | "click-to-view" | "clicks" | "clipboard-outline" | "clipboard" | "clock" | "closed-captioning" | "cloud" | "code" | "columns" | "comment-alt-outline" | "comment-alt" | "comment-lines-alt-outline" | "comment" | "compact-density" | "compact-indicator" | "comparison" | "competitor" | "compose" | "content-suggestions" | "credit-card" | "crop" | "crown" | "dashboard" | "deconstructed-negative-sentiment" | "deconstructed-neutral-sentiment" | "deconstructed-positive-sentiment" | "discovery" | "dislike-outline" | "dislike" | "dm-link-outline" | "dm-link" | "dotdotdot" | "download" | "drafts-outline" | "drafts" | "dropbox" | "duplicate-outline" | "duplicate" | "emoji-outline" | "emoji" | "empty-image" | "engagement-per-post" | "engagements" | "error" | "exchange-alt" | "expanded-indicator" | "export" | "extended-circles" | "external-link-alt" | "external-link" | "extreme-negative-sentiment" | "eye-outline" | "eye-slash-outline" | "eye-slash" | "eye" | "facebook-audience-network" | "facebook-branded-content-outline" | "facebook-branded-content" | "facebook-groups" | "facebook" | "fb-reactions-angry" | "fb-reactions-haha" | "fb-reactions-like" | "fb-reactions-love" | "fb-reactions-sad" | "fb-reactions-wow" | "feedly" | "feeds" | "female" | "file-chart-line" | "file-edit" | "file-times-solid" | "filter" | "flag-outline" | "flag" | "flat-negative-sentiment-outline" | "flat-negative-sentiment" | "flat-neutral-sentiment-outline" | "flat-neutral-sentiment" | "flat-positive-sentiment-outline" | "flat-positive-sentiment" | "folder-open" | "folder" | "follow-outline" | "follow" | "follower-increase" | "following" | "font" | "full-access" | "gear" | "gears" | "glassdoor" | "glasses" | "globe" | "google-analytics-color" | "google-business-messages" | "google-drive" | "google-my-business" | "grip" | "h1" | "h2" | "hamburger" | "hashtag" | "headset" | "heart-outline" | "heart" | "heartbeat" | "help-alt" | "help" | "hiking" | "history" | "home" | "hourglass" | "hubspot" | "image-caption" | "image" | "images" | "impressions-per-post" | "impressions" | "inactive-listener" | "inbox-action" | "inbox-views" | "inbox" | "indicator" | "industry" | "info" | "instagram" | "internal-activity-outline" | "internal-activity" | "italic" | "key" | "keyboard" | "laptop-phone" | "large-density" | "lift" | "like-outline" | "like" | "link" | "linkedin-audience-network" | "linkedin" | "list-ol" | "listening" | "lists" | "location-outline" | "location" | "lock" | "magic-wand" | "male" | "marketo" | "mention" | "message-preview-outline" | "message-preview" | "message" | "messages-outline" | "messages" | "messenger" | "metric-table" | "microsoft-dynamics" | "minus" | "mobile" | "monitor" | "moon" | "negative-sentiment" | "neutral-positive-sentiment" | "neutral-sentiment" | "new-trend" | "newspaper" | "no-access" | "notepad" | "notifications-publishing-outline" | "notifications-publishing" | "notifications" | "offline" | "online" | "paid-promotion-outline" | "paid-promotion" | "paid" | "paint" | "palette" | "paperclip" | "pause" | "pencil-outline" | "pencil" | "person" | "phone" | "pinterest-boards-outline" | "pinterest-boards" | "pinterest" | "play-circle" | "play" | "plug" | "plus" | "positive-sentiment" | "power-up-outline" | "power-up" | "profile-connect" | "profile-disconnect" | "publishing-outline" | "publishing" | "puzzle-piece" | "qr-code" | "queue" | "recommendation" | "reddit-alien" | "reddit" | "referrals" | "refresh" | "rejected" | "reply-outline" | "reply" | "reporting-period" | "reporting" | "reports-home" | "reports" | "retweet" | "rss" | "sales" | "salesforce" | "save-assets" | "saved-messages" | "saved-reply-outline" | "saved-reply" | "search" | "sent-message-outline" | "sent-message" | "share" | "shopify" | "show-navigation" | "slack" | "small-density" | "smiley" | "some-access" | "sparkles" | "spike-alert" | "star-half-alt-solid" | "star-of-life" | "star-outline" | "star" | "sticky-note-outline" | "sticky-note" | "stories" | "story" | "suggestions" | "sun" | "tag-outline" | "tag" | "targeting-outline" | "targeting" | "tasks-outline" | "tasks" | "team-conversation-outline" | "team-conversation" | "team" | "text-asset" | "text" | "tiktok" | "times" | "trash-can-outline" | "trash-can" | "trend-down" | "trend-neutral" | "trend-up" | "trends" | "triangle-black" | "triangle" | "tripadvisor-circle-outline" | "tripadvisor-circle" | "tripadvisor" | "trophy-outline" | "tumblr" | "twitter-audience-network" | "twitter" | "unfollow-outline" | "unfollow" | "unlink" | "unlock" | "upload" | "user-circle" | "users" | "verified" | "video-camera-story" | "video-camera" | "vip" | "weight" | "whatsapp" | "window-maximize" | "window-minimize" | "window-regular" | "window-restore" | "woocommerce" | "x" | "yelp-full-star" | "yelp-half-star" | "yelp" | "youtube" | "zendesk";
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import { text } from "@storybook/addon-knobs";
|
|
3
|
-
|
|
4
2
|
import Icon from "./";
|
|
5
3
|
import Button from "../Button";
|
|
6
4
|
import Box from "../Box";
|
|
@@ -10,65 +8,72 @@ export default {
|
|
|
10
8
|
title: "Icon",
|
|
11
9
|
};
|
|
12
10
|
|
|
13
|
-
export const mini12X12 = () =>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
export const mini12X12 = (args) => <Icon {...args} />;
|
|
12
|
+
|
|
13
|
+
mini12X12.args = {
|
|
14
|
+
color: "icon.base",
|
|
15
|
+
name: "dashboard",
|
|
16
|
+
size: "mini",
|
|
17
|
+
};
|
|
20
18
|
|
|
21
19
|
mini12X12.story = {
|
|
22
20
|
name: "Mini (12 x 12)",
|
|
23
21
|
};
|
|
24
22
|
|
|
25
|
-
export const default16X16 = () =>
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
export const default16X16 = (args) => <Icon {...args} />;
|
|
24
|
+
|
|
25
|
+
default16X16.args = {
|
|
26
|
+
color: "icon.base",
|
|
27
|
+
name: "dashboard",
|
|
28
|
+
};
|
|
28
29
|
|
|
29
30
|
default16X16.story = {
|
|
30
31
|
name: "Default (16 x 16)",
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
export const medium24X24 = () =>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
export const medium24X24 = (args) => <Icon {...args} />;
|
|
35
|
+
|
|
36
|
+
medium24X24.args = {
|
|
37
|
+
color: "icon.base",
|
|
38
|
+
name: "dashboard",
|
|
39
|
+
size: "medium",
|
|
40
|
+
};
|
|
40
41
|
|
|
41
42
|
medium24X24.story = {
|
|
42
43
|
name: "Medium (24 x 24)",
|
|
43
44
|
};
|
|
44
45
|
|
|
45
|
-
export const large32X32 = () =>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
export const large32X32 = (args) => <Icon {...args} />;
|
|
47
|
+
|
|
48
|
+
large32X32.args = {
|
|
49
|
+
color: "icon.base",
|
|
50
|
+
name: "dashboard",
|
|
51
|
+
size: "large",
|
|
52
|
+
};
|
|
52
53
|
|
|
53
54
|
large32X32.story = {
|
|
54
55
|
name: "Large (32 x 32)",
|
|
55
56
|
};
|
|
56
57
|
|
|
57
|
-
export const jumbo64X64 = () =>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
export const jumbo64X64 = (args) => <Icon {...args} />;
|
|
59
|
+
|
|
60
|
+
jumbo64X64.args = {
|
|
61
|
+
color: "icon.base",
|
|
62
|
+
name: "dashboard",
|
|
63
|
+
size: "jumbo",
|
|
64
|
+
};
|
|
64
65
|
|
|
65
66
|
jumbo64X64.story = {
|
|
66
67
|
name: "Jumbo (64 x 64)",
|
|
67
68
|
};
|
|
68
69
|
|
|
69
|
-
export const defaultFixedWidth = () =>
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
export const defaultFixedWidth = (args) => <Icon {...args} />;
|
|
71
|
+
|
|
72
|
+
defaultFixedWidth.args = {
|
|
73
|
+
color: "icon.success",
|
|
74
|
+
name: "dashboard",
|
|
75
|
+
fixedWidth: true,
|
|
76
|
+
};
|
|
72
77
|
|
|
73
78
|
defaultFixedWidth.story = {
|
|
74
79
|
name: "Fixed Width (16 x 16)",
|