@woosmap/ui 4.34.0-beta.9 → 4.35.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 +1 -1
- package/src/components/Button/Button.js +3 -6
- package/src/components/Button/Button.stories.js +3 -3
- package/src/components/Button/ButtonSwitch.js +1 -1
- package/src/components/Card/Card.js +1 -1
- package/src/components/Card/Card.styl +2 -2
- package/src/components/Card/SimpleCard.styl +1 -1
- package/src/components/Demo/skeletondemo.styl +1 -1
- package/src/components/Dropdown/Dropdown.js +1 -1
- package/src/components/Flash/Flash.js +1 -1
- package/src/components/Flash/Flash.stories.js +3 -3
- package/src/components/Flash/Flash.styl +7 -7
- package/src/components/Icon/Icon.js +92 -8
- package/src/components/Icon/Icon.stories.js +2 -2
- package/src/components/Icon/Icon.test.js +3 -3
- package/src/components/Icon/icon-story.styl +1 -13
- package/src/components/Input/Input.js +4 -4
- package/src/components/Label/Label.js +2 -3
- package/src/components/Label/Label.styl +5 -5
- package/src/components/Modal/Modal.styl +1 -1
- package/src/components/ServiceMessage/ServiceMessage.styl +2 -2
- package/src/components/SnackBar/SnackBar.styl +1 -1
- package/src/components/Stepper/Stepper.styl +1 -1
- package/src/components/Tab/Tab.stories.js +1 -1
- package/src/icons/access.svg +1 -0
- package/src/icons/add-circle.svg +1 -1
- package/src/icons/add.svg +1 -1
- package/src/icons/admin-key.svg +1 -1
- package/src/icons/admin-tool.svg +1 -1
- package/src/icons/administration-tool.svg +1 -1
- package/src/icons/administration.svg +1 -0
- package/src/icons/agenda.svg +1 -1
- package/src/icons/alphabetical-order-reversed.svg +1 -0
- package/src/icons/alphabetical-order.svg +1 -1
- package/src/icons/archive.svg +1 -0
- package/src/icons/arrow-bottom.svg +1 -1
- package/src/icons/arrow-left.svg +1 -1
- package/src/icons/arrow-link.svg +1 -0
- package/src/icons/arrow-right.svg +1 -1
- package/src/icons/arrow-top.svg +1 -1
- package/src/icons/asset-add-file.svg +1 -0
- package/src/icons/asset-add.svg +1 -0
- package/src/icons/asset.svg +1 -1
- package/src/icons/bank.svg +1 -0
- package/src/icons/beaker.svg +1 -0
- package/src/icons/bell.svg +1 -0
- package/src/icons/big-commerce.svg +1 -1
- package/src/icons/bookmark.svg +1 -0
- package/src/icons/bulb.svg +1 -1
- package/src/icons/caret-bottom.svg +1 -1
- package/src/icons/caret-left.svg +1 -1
- package/src/icons/caret-right.svg +1 -1
- package/src/icons/caret-top.svg +1 -1
- package/src/icons/charts.svg +1 -1
- package/src/icons/chat.svg +1 -0
- package/src/icons/check-circle.svg +1 -0
- package/src/icons/check-square.svg +1 -0
- package/src/icons/check.svg +1 -1
- package/src/icons/checked.svg +1 -0
- package/src/icons/clock-reversed.svg +1 -0
- package/src/icons/clock.svg +1 -1
- package/src/icons/close-thick.svg +1 -0
- package/src/icons/close.svg +1 -1
- package/src/icons/code.svg +1 -1
- package/src/icons/company.svg +1 -1
- package/src/icons/copy.svg +1 -1
- package/src/icons/credit-card.svg +1 -0
- package/src/icons/dashboard.svg +1 -1
- package/src/icons/delete.svg +1 -1
- package/src/icons/details.svg +1 -0
- package/src/icons/documentation.svg +1 -1
- package/src/icons/dollar.svg +1 -1
- package/src/icons/dot-fill.svg +1 -1
- package/src/icons/dot.svg +1 -1
- package/src/icons/download.svg +1 -0
- package/src/icons/edit.svg +1 -1
- package/src/icons/email.svg +1 -1
- package/src/icons/enter.svg +1 -0
- package/src/icons/exchange.svg +1 -0
- package/src/icons/expand.svg +1 -1
- package/src/icons/export.svg +1 -1
- package/src/icons/eye-crossed-out.svg +1 -1
- package/src/icons/eye.svg +1 -1
- package/src/icons/flag.svg +1 -1
- package/src/icons/forbidden.svg +1 -1
- package/src/icons/globe.svg +1 -1
- package/src/icons/home-user.svg +1 -0
- package/src/icons/hourglass.svg +1 -1
- package/src/icons/import.svg +1 -1
- package/src/icons/info.svg +1 -1
- package/src/icons/label.svg +1 -0
- package/src/icons/latitude.svg +1 -1
- package/src/icons/leave.svg +1 -0
- package/src/icons/location.svg +1 -0
- package/src/icons/longitude.svg +1 -1
- package/src/icons/manage.svg +1 -1
- package/src/icons/marker.svg +1 -1
- package/src/icons/member.svg +1 -1
- package/src/icons/members.svg +1 -1
- package/src/icons/menu-circle-horizontal.svg +1 -0
- package/src/icons/menu-circle-vertical.svg +1 -0
- package/src/icons/menu-horizontal.svg +1 -0
- package/src/icons/menu-vertical.svg +1 -1
- package/src/icons/metrics.svg +1 -0
- package/src/icons/more.svg +1 -0
- package/src/icons/organization.svg +1 -0
- package/src/icons/organizations.svg +1 -0
- package/src/icons/phone.svg +1 -1
- package/src/icons/platform.svg +1 -0
- package/src/icons/prize.svg +1 -0
- package/src/icons/product-activated.svg +1 -1
- package/src/icons/product-add.svg +1 -1
- package/src/icons/products.svg +1 -1
- package/src/icons/projects.svg +1 -1
- package/src/icons/puzzle.svg +1 -0
- package/src/icons/question.svg +1 -1
- package/src/icons/receipt.svg +1 -0
- package/src/icons/search.svg +1 -1
- package/src/icons/see-page.svg +1 -1
- package/src/icons/settings.svg +1 -1
- package/src/icons/shield.svg +1 -1
- package/src/icons/shortcut.svg +1 -1
- package/src/icons/social-facebook.svg +1 -1
- package/src/icons/social-github.svg +1 -1
- package/src/icons/social-google.svg +1 -1
- package/src/icons/social-linkedin.svg +1 -1
- package/src/icons/social-twitter.svg +1 -1
- package/src/icons/star-fiiled.svg +1 -0
- package/src/icons/star-filled.svg +1 -1
- package/src/icons/star.svg +1 -1
- package/src/icons/support.svg +1 -1
- package/src/icons/switch.svg +1 -1
- package/src/icons/time.svg +1 -0
- package/src/icons/tool.svg +1 -0
- package/src/icons/user.svg +1 -1
- package/src/icons/view-card.svg +1 -0
- package/src/icons/view-list.svg +1 -0
- package/src/icons/view-mini-card.svg +1 -0
- package/src/icons/warning.svg +1 -1
- package/src/icons/woosmap.svg +1 -1
- package/src/styles/console/button.styl +47 -50
- package/src/styles/console/icon.styl +1 -11
- package/src/styles/console/input.styl +1 -1
- package/src/styles/console/mixins.styl +1 -1
- package/.idea/encodings.xml +0 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -18
- package/.idea/inspectionProfiles/profiles_settings.xml +0 -6
- package/.idea/misc.xml +0 -4
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -6
- package/.idea/ui.iml +0 -15
- package/.idea/vcs.xml +0 -6
package/package.json
CHANGED
|
@@ -15,7 +15,6 @@ export default class Button extends Component {
|
|
|
15
15
|
size,
|
|
16
16
|
type,
|
|
17
17
|
icon,
|
|
18
|
-
isFillIcon,
|
|
19
18
|
iconSize,
|
|
20
19
|
isBtnIcon,
|
|
21
20
|
className,
|
|
@@ -41,10 +40,10 @@ export default class Button extends Component {
|
|
|
41
40
|
isNotification ? 'btn--notification' : null,
|
|
42
41
|
{ 'btn--loading': isLoading },
|
|
43
42
|
{ 'btn--no-label': !label },
|
|
44
|
-
{ 'btn--custom-icon-size': iconSize && iconSize !==
|
|
43
|
+
{ 'btn--custom-icon-size': iconSize && iconSize !== 24 },
|
|
45
44
|
className
|
|
46
45
|
);
|
|
47
|
-
let iconComponent = icon ? <Icon
|
|
46
|
+
let iconComponent = icon ? <Icon size={iconSize} icon={icon} /> : null;
|
|
48
47
|
if (isLoading) {
|
|
49
48
|
iconComponent = <Icon icon="load" />;
|
|
50
49
|
}
|
|
@@ -78,13 +77,12 @@ Button.defaultProps = {
|
|
|
78
77
|
className: '',
|
|
79
78
|
label: '',
|
|
80
79
|
icon: null,
|
|
81
|
-
iconSize:
|
|
80
|
+
iconSize: 24,
|
|
82
81
|
isLoading: false,
|
|
83
82
|
active: false,
|
|
84
83
|
onClick: null,
|
|
85
84
|
iconRight: false,
|
|
86
85
|
isNotification: false,
|
|
87
|
-
isFillIcon: false,
|
|
88
86
|
};
|
|
89
87
|
|
|
90
88
|
Button.propTypes = {
|
|
@@ -121,5 +119,4 @@ Button.propTypes = {
|
|
|
121
119
|
children: PropTypes.node,
|
|
122
120
|
iconRight: PropTypes.bool,
|
|
123
121
|
isNotification: PropTypes.bool,
|
|
124
|
-
isFillIcon: PropTypes.bool,
|
|
125
122
|
};
|
|
@@ -28,7 +28,7 @@ const Template = (args) => {
|
|
|
28
28
|
<Button label={label} disabled />
|
|
29
29
|
</div>
|
|
30
30
|
<div className="flex mbi">
|
|
31
|
-
<Button icon="
|
|
31
|
+
<Button icon="puzzle" isNotification label="4" type="secondary" />
|
|
32
32
|
<Button label={label} type="secondary" />
|
|
33
33
|
<Button label={label} type="secondary" icon="marker" />
|
|
34
34
|
<Button label={label} type="secondary" isLoading />
|
|
@@ -105,7 +105,7 @@ const Template = (args) => {
|
|
|
105
105
|
<div className="flex-column mbi">
|
|
106
106
|
<span>
|
|
107
107
|
There is a no-labeled flexed button link here :
|
|
108
|
-
<Button icon="
|
|
108
|
+
<Button icon="label" type="link-flex" />
|
|
109
109
|
</span>
|
|
110
110
|
<span>
|
|
111
111
|
There is a labeled flexed button link here :
|
|
@@ -115,7 +115,7 @@ const Template = (args) => {
|
|
|
115
115
|
<div className="flex-column mbi">
|
|
116
116
|
<span>
|
|
117
117
|
There is a no-labeled flexed-info button link here :
|
|
118
|
-
<Button icon="
|
|
118
|
+
<Button icon="label" type="link-flex-info" />
|
|
119
119
|
</span>
|
|
120
120
|
<span>
|
|
121
121
|
There is a labeled flexed-info button link here :
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
font-size $fontSizeSmall - .1
|
|
192
192
|
margin-top -.5rem
|
|
193
193
|
.icon
|
|
194
|
-
|
|
194
|
+
fill $logo5
|
|
195
195
|
&__footer
|
|
196
196
|
color $dark40
|
|
197
197
|
&--small
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
.card--traffic &
|
|
273
273
|
background $traffic
|
|
274
274
|
.icon
|
|
275
|
-
|
|
275
|
+
fill $light
|
|
276
276
|
&__image
|
|
277
277
|
flex-grow 1
|
|
278
278
|
flex-shrink 0
|
|
@@ -6,7 +6,7 @@ import Icon from '../Icon/Icon';
|
|
|
6
6
|
export default class Flash extends Component {
|
|
7
7
|
render() {
|
|
8
8
|
const { children, icon, inverse, fill, type, shadowed, testId, ...rest } = this.props;
|
|
9
|
-
const iconComponent = icon ? <Icon icon={icon} /> : null;
|
|
9
|
+
const iconComponent = icon ? <Icon size={24} icon={icon} /> : null;
|
|
10
10
|
return (
|
|
11
11
|
<div
|
|
12
12
|
className={cl(
|
|
@@ -51,7 +51,7 @@ const Template = () => (
|
|
|
51
51
|
<div className="flex mbib mbi--large">
|
|
52
52
|
<div className="flex mbi">
|
|
53
53
|
<Flash type="howto">Tip Howto</Flash>
|
|
54
|
-
<Flash type="howto" icon="
|
|
54
|
+
<Flash type="howto" icon="tool">
|
|
55
55
|
Howto flash iconed
|
|
56
56
|
</Flash>
|
|
57
57
|
</div>
|
|
@@ -68,7 +68,7 @@ const Template = () => (
|
|
|
68
68
|
<div className="flex mbib mbi--large">
|
|
69
69
|
<div className="flex mbi">
|
|
70
70
|
<Flash type="success">Success flash</Flash>
|
|
71
|
-
<Flash type="success" icon="
|
|
71
|
+
<Flash type="success" icon="enter">
|
|
72
72
|
Success flash iconed
|
|
73
73
|
</Flash>
|
|
74
74
|
</div>
|
|
@@ -76,7 +76,7 @@ const Template = () => (
|
|
|
76
76
|
<Flash type="success" inverse>
|
|
77
77
|
Success flash inverse
|
|
78
78
|
</Flash>
|
|
79
|
-
<Flash type="success" inverse icon="
|
|
79
|
+
<Flash type="success" inverse icon="enter">
|
|
80
80
|
Success flash inverse iconed
|
|
81
81
|
</Flash>
|
|
82
82
|
</div>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
min-height $buttonHeight
|
|
12
12
|
padding .9rem $padding
|
|
13
13
|
.icon
|
|
14
|
-
|
|
14
|
+
fill $secondary
|
|
15
15
|
flex-shrink 0
|
|
16
16
|
&--shadowed
|
|
17
17
|
box-shadow 0 0 1rem $dark8
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
&.flash--inverse
|
|
31
31
|
color $flashSuccess
|
|
32
32
|
.icon
|
|
33
|
-
|
|
33
|
+
fill $flashSuccess
|
|
34
34
|
|
|
35
35
|
&--tip
|
|
36
36
|
&:not(.flash--inverse)
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
&.flash--inverse
|
|
40
40
|
color $flashTipInverse
|
|
41
41
|
.icon
|
|
42
|
-
|
|
42
|
+
fill $flashTipInverse
|
|
43
43
|
|
|
44
44
|
&--howto
|
|
45
45
|
&:not(.flash--inverse)
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
&.flash--inverse
|
|
49
49
|
color $flashHowto
|
|
50
50
|
.icon
|
|
51
|
-
|
|
51
|
+
fill $flashHowto
|
|
52
52
|
|
|
53
53
|
&--warning
|
|
54
54
|
&:not(.flash--inverse)
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
&.flash--inverse
|
|
58
58
|
color $flashWarning
|
|
59
59
|
.icon
|
|
60
|
-
|
|
60
|
+
fill $flashWarning
|
|
61
61
|
|
|
62
62
|
&--error
|
|
63
63
|
&:not(.flash--inverse)
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
&.flash--inverse
|
|
67
67
|
color $flashError
|
|
68
68
|
.icon
|
|
69
|
-
|
|
69
|
+
fill $flashError
|
|
70
70
|
|
|
71
71
|
&--info
|
|
72
72
|
&:not(.flash--inverse)
|
|
@@ -75,4 +75,4 @@
|
|
|
75
75
|
&.flash--inverse
|
|
76
76
|
color $flashInfo
|
|
77
77
|
.icon
|
|
78
|
-
|
|
78
|
+
fill $flashInfo
|
|
@@ -113,65 +113,103 @@ import { ReactComponent as WorldTime } from '../../icons/world-time.svg';
|
|
|
113
113
|
import { ReactComponent as WinPrize } from '../../icons/win-prize.svg';
|
|
114
114
|
import { ReactComponent as Zoom } from '../../icons/zoom.svg';
|
|
115
115
|
|
|
116
|
+
import { ReactComponent as Access } from '../../icons/access.svg';
|
|
116
117
|
import { ReactComponent as Add } from '../../icons/add.svg';
|
|
117
118
|
import { ReactComponent as AddCircle } from '../../icons/add-circle.svg';
|
|
119
|
+
import { ReactComponent as Administration } from '../../icons/administration.svg';
|
|
118
120
|
import { ReactComponent as AdministrationTool } from '../../icons/administration-tool.svg';
|
|
119
121
|
import { ReactComponent as AdminKey } from '../../icons/admin-key.svg';
|
|
120
122
|
import { ReactComponent as AdminTool } from '../../icons/admin-tool.svg';
|
|
121
123
|
import { ReactComponent as Agenda } from '../../icons/agenda.svg';
|
|
122
124
|
import { ReactComponent as AlphabeticalOrder } from '../../icons/alphabetical-order.svg';
|
|
125
|
+
import { ReactComponent as AlphabeticalOrderReversed } from '../../icons/alphabetical-order-reversed.svg';
|
|
126
|
+
import { ReactComponent as Archive } from '../../icons/archive.svg';
|
|
123
127
|
import { ReactComponent as ArrowBotton } from '../../icons/arrow-bottom.svg';
|
|
124
128
|
import { ReactComponent as ArrowLeft } from '../../icons/arrow-left.svg';
|
|
125
129
|
import { ReactComponent as ArrowRight } from '../../icons/arrow-right.svg';
|
|
126
130
|
import { ReactComponent as ArrowTop } from '../../icons/arrow-top.svg';
|
|
131
|
+
import { ReactComponent as ArrowLink } from '../../icons/arrow-link.svg';
|
|
127
132
|
import { ReactComponent as Asset } from '../../icons/asset.svg';
|
|
133
|
+
import { ReactComponent as AssetAddFile } from '../../icons/asset-add-file.svg';
|
|
134
|
+
import { ReactComponent as AssetAdd } from '../../icons/asset-add.svg';
|
|
135
|
+
import { ReactComponent as Bank } from '../../icons/bank.svg';
|
|
136
|
+
import { ReactComponent as Beaker } from '../../icons/beaker.svg';
|
|
137
|
+
import { ReactComponent as Bell } from '../../icons/bell.svg';
|
|
128
138
|
import { ReactComponent as BigCommerce } from '../../icons/big-commerce.svg';
|
|
139
|
+
import { ReactComponent as Bookmark } from '../../icons/bookmark.svg';
|
|
129
140
|
import { ReactComponent as Bulb } from '../../icons/bulb.svg';
|
|
130
141
|
import { ReactComponent as CaretBotton } from '../../icons/caret-bottom.svg';
|
|
131
142
|
import { ReactComponent as CaretLeft } from '../../icons/caret-left.svg';
|
|
132
143
|
import { ReactComponent as CaretRight } from '../../icons/caret-right.svg';
|
|
133
144
|
import { ReactComponent as CaretTop } from '../../icons/caret-top.svg';
|
|
134
145
|
import { ReactComponent as Charts } from '../../icons/charts.svg';
|
|
146
|
+
import { ReactComponent as Chat } from '../../icons/chat.svg';
|
|
135
147
|
import { ReactComponent as Check } from '../../icons/check.svg';
|
|
148
|
+
import { ReactComponent as Checked } from '../../icons/checked.svg';
|
|
149
|
+
import { ReactComponent as CheckCircle } from '../../icons/check-circle.svg';
|
|
150
|
+
import { ReactComponent as CheckSquare } from '../../icons/check-square.svg';
|
|
136
151
|
import { ReactComponent as Clock } from '../../icons/clock.svg';
|
|
152
|
+
import { ReactComponent as ClockReversed } from '../../icons/clock-reversed.svg';
|
|
137
153
|
import { ReactComponent as Close } from '../../icons/close.svg';
|
|
154
|
+
import { ReactComponent as CloseThick } from '../../icons/close-thick.svg';
|
|
138
155
|
import { ReactComponent as Code } from '../../icons/code.svg';
|
|
139
156
|
import { ReactComponent as Company } from '../../icons/company.svg';
|
|
140
157
|
import { ReactComponent as Copy } from '../../icons/copy.svg';
|
|
158
|
+
import { ReactComponent as CreditCard } from '../../icons/credit-card.svg';
|
|
141
159
|
import { ReactComponent as Cube } from '../../icons/cube.svg';
|
|
142
160
|
import { ReactComponent as Dashboard } from '../../icons/dashboard.svg';
|
|
143
161
|
import { ReactComponent as Delete } from '../../icons/delete.svg';
|
|
162
|
+
import { ReactComponent as Details } from '../../icons/details.svg';
|
|
144
163
|
import { ReactComponent as Documentation } from '../../icons/documentation.svg';
|
|
145
164
|
import { ReactComponent as Dollar } from '../../icons/dollar.svg';
|
|
146
|
-
import { ReactComponent as Dot } from '../../icons/dot.svg';
|
|
147
165
|
import { ReactComponent as DotFill } from '../../icons/dot-fill.svg';
|
|
166
|
+
import { ReactComponent as Dot } from '../../icons/dot.svg';
|
|
167
|
+
import { ReactComponent as Download } from '../../icons/download.svg';
|
|
148
168
|
import { ReactComponent as Edit } from '../../icons/edit.svg';
|
|
149
169
|
import { ReactComponent as Email } from '../../icons/email.svg';
|
|
170
|
+
import { ReactComponent as Enter } from '../../icons/enter.svg';
|
|
150
171
|
import { ReactComponent as Eye } from '../../icons/eye.svg';
|
|
151
172
|
import { ReactComponent as EyeCrossedOut } from '../../icons/eye-crossed-out.svg';
|
|
173
|
+
import { ReactComponent as Exchange } from '../../icons/exchange.svg';
|
|
152
174
|
import { ReactComponent as Expand } from '../../icons/expand.svg';
|
|
153
175
|
import { ReactComponent as Export } from '../../icons/export.svg';
|
|
154
176
|
import { ReactComponent as Flag } from '../../icons/flag.svg';
|
|
155
177
|
import { ReactComponent as Forbidden } from '../../icons/forbidden.svg';
|
|
156
178
|
|
|
157
179
|
import { ReactComponent as Globe } from '../../icons/globe.svg';
|
|
180
|
+
import { ReactComponent as Home } from '../../icons/home.svg';
|
|
158
181
|
import { ReactComponent as Hourglass } from '../../icons/hourglass.svg';
|
|
182
|
+
import { ReactComponent as HomeUser } from '../../icons/home-user.svg';
|
|
159
183
|
import { ReactComponent as Import } from '../../icons/import.svg';
|
|
160
184
|
import { ReactComponent as Info } from '../../icons/info.svg';
|
|
185
|
+
import { ReactComponent as Label } from '../../icons/label.svg';
|
|
161
186
|
import { ReactComponent as Latitude } from '../../icons/latitude.svg';
|
|
162
187
|
import { ReactComponent as Load } from '../../icons/load.svg';
|
|
188
|
+
import { ReactComponent as Leave } from '../../icons/leave.svg';
|
|
189
|
+
import { ReactComponent as Location } from '../../icons/location.svg';
|
|
163
190
|
import { ReactComponent as Longitude } from '../../icons/longitude.svg';
|
|
164
191
|
import { ReactComponent as Manage } from '../../icons/manage.svg';
|
|
165
192
|
import { ReactComponent as Marker } from '../../icons/marker.svg';
|
|
166
193
|
import { ReactComponent as Members } from '../../icons/members.svg';
|
|
167
194
|
import { ReactComponent as Member } from '../../icons/member.svg';
|
|
168
195
|
import { ReactComponent as MenuVertical } from '../../icons/menu-vertical.svg';
|
|
196
|
+
import { ReactComponent as MenuCircleVertical } from '../../icons/menu-circle-vertical.svg';
|
|
197
|
+
import { ReactComponent as MenuHorizontal } from '../../icons/menu-horizontal.svg';
|
|
198
|
+
import { ReactComponent as MenuCircleHorizontal } from '../../icons/menu-circle-horizontal.svg';
|
|
199
|
+
import { ReactComponent as Metrics } from '../../icons/metrics.svg';
|
|
200
|
+
import { ReactComponent as More } from '../../icons/more.svg';
|
|
201
|
+
import { ReactComponent as Organization } from '../../icons/organization.svg';
|
|
202
|
+
import { ReactComponent as Organizations } from '../../icons/organizations.svg';
|
|
169
203
|
import { ReactComponent as Phone } from '../../icons/phone.svg';
|
|
204
|
+
import { ReactComponent as Platform } from '../../icons/platform.svg';
|
|
205
|
+
import { ReactComponent as Prize } from '../../icons/prize.svg';
|
|
170
206
|
import { ReactComponent as ProductActivated } from '../../icons/product-activated.svg';
|
|
171
207
|
import { ReactComponent as ProductAdd } from '../../icons/product-add.svg';
|
|
172
208
|
import { ReactComponent as Products } from '../../icons/products.svg';
|
|
173
209
|
import { ReactComponent as Projects } from '../../icons/projects.svg';
|
|
210
|
+
import { ReactComponent as Puzzle } from '../../icons/puzzle.svg';
|
|
174
211
|
import { ReactComponent as Question } from '../../icons/question.svg';
|
|
212
|
+
import { ReactComponent as Receipt } from '../../icons/receipt.svg';
|
|
175
213
|
import { ReactComponent as Search } from '../../icons/search.svg';
|
|
176
214
|
import { ReactComponent as SeePage } from '../../icons/see-page.svg';
|
|
177
215
|
import { ReactComponent as Settings } from '../../icons/settings.svg';
|
|
@@ -182,7 +220,12 @@ import { ReactComponent as StarFilled } from '../../icons/star-filled.svg';
|
|
|
182
220
|
import { ReactComponent as Support } from '../../icons/support.svg';
|
|
183
221
|
import { ReactComponent as Switch } from '../../icons/switch.svg';
|
|
184
222
|
import { ReactComponent as Team } from '../../icons/team.svg';
|
|
223
|
+
import { ReactComponent as Time } from '../../icons/time.svg';
|
|
224
|
+
import { ReactComponent as Tool } from '../../icons/tool.svg';
|
|
185
225
|
import { ReactComponent as User } from '../../icons/user.svg';
|
|
226
|
+
import { ReactComponent as ViewCard } from '../../icons/view-card.svg';
|
|
227
|
+
import { ReactComponent as ViewList } from '../../icons/view-list.svg';
|
|
228
|
+
import { ReactComponent as ViewMiniCard } from '../../icons/view-mini-card.svg';
|
|
186
229
|
import { ReactComponent as Warning } from '../../icons/warning.svg';
|
|
187
230
|
import { ReactComponent as Woosmap } from '../../icons/woosmap.svg';
|
|
188
231
|
import { ReactComponent as Address } from '../../icons/address.svg';
|
|
@@ -422,40 +465,62 @@ const WebsiteIcons = {
|
|
|
422
465
|
};
|
|
423
466
|
|
|
424
467
|
const ConsoleIcons = {
|
|
468
|
+
access: Access,
|
|
425
469
|
'add-circle': AddCircle,
|
|
426
470
|
add: Add,
|
|
427
471
|
'admin-key': AdminKey,
|
|
428
472
|
'admin-tool': AdminTool,
|
|
429
473
|
'administration-tool': AdministrationTool,
|
|
474
|
+
administration: Administration,
|
|
430
475
|
agenda: Agenda,
|
|
476
|
+
'alphabetical-order-reversed': AlphabeticalOrderReversed,
|
|
431
477
|
'alphabetical-order': AlphabeticalOrder,
|
|
478
|
+
archive: Archive,
|
|
432
479
|
'arrow-bottom': ArrowBotton,
|
|
433
480
|
'arrow-left': ArrowLeft,
|
|
481
|
+
'arrow-link': ArrowLink,
|
|
434
482
|
'arrow-right': ArrowRight,
|
|
435
483
|
'arrow-top': ArrowTop,
|
|
484
|
+
'asset-add-file': AssetAddFile,
|
|
485
|
+
'asset-add': AssetAdd,
|
|
436
486
|
asset: Asset,
|
|
487
|
+
bank: Bank,
|
|
488
|
+
beaker: Beaker,
|
|
489
|
+
bell: Bell,
|
|
437
490
|
'big-commerce': BigCommerce,
|
|
491
|
+
bookmark: Bookmark,
|
|
438
492
|
bulb: Bulb,
|
|
439
493
|
'caret-bottom': CaretBotton,
|
|
440
494
|
'caret-left': CaretLeft,
|
|
441
495
|
'caret-right': CaretRight,
|
|
442
496
|
'caret-top': CaretTop,
|
|
443
497
|
charts: Charts,
|
|
498
|
+
chat: Chat,
|
|
499
|
+
'check-circle': CheckCircle,
|
|
500
|
+
'check-square': CheckSquare,
|
|
444
501
|
check: Check,
|
|
502
|
+
checked: Checked,
|
|
503
|
+
'clock-reversed': ClockReversed,
|
|
445
504
|
clock: Clock,
|
|
505
|
+
'close-thick': CloseThick,
|
|
446
506
|
close: Close,
|
|
447
507
|
code: Code,
|
|
448
508
|
company: Company,
|
|
449
509
|
copy: Copy,
|
|
510
|
+
'credit-card': CreditCard,
|
|
450
511
|
cube: Cube,
|
|
451
512
|
dashboard: Dashboard,
|
|
452
513
|
delete: Delete,
|
|
514
|
+
details: Details,
|
|
453
515
|
documentation: Documentation,
|
|
454
516
|
dollar: Dollar,
|
|
455
|
-
dot: Dot,
|
|
456
517
|
'dot-fill': DotFill,
|
|
518
|
+
dot: Dot,
|
|
519
|
+
download: Download,
|
|
457
520
|
edit: Edit,
|
|
458
521
|
email: Email,
|
|
522
|
+
enter: Enter,
|
|
523
|
+
exchange: Exchange,
|
|
459
524
|
expand: Expand,
|
|
460
525
|
export: Export,
|
|
461
526
|
'eye-crossed-out': EyeCrossedOut,
|
|
@@ -463,23 +528,39 @@ const ConsoleIcons = {
|
|
|
463
528
|
flag: Flag,
|
|
464
529
|
forbidden: Forbidden,
|
|
465
530
|
globe: Globe,
|
|
531
|
+
'home-user': HomeUser,
|
|
532
|
+
home: Home,
|
|
466
533
|
hourglass: Hourglass,
|
|
467
534
|
import: Import,
|
|
468
535
|
info: Info,
|
|
536
|
+
label: Label,
|
|
469
537
|
latitude: Latitude,
|
|
538
|
+
leave: Leave,
|
|
470
539
|
load: Load,
|
|
540
|
+
location: Location,
|
|
471
541
|
longitude: Longitude,
|
|
472
542
|
manage: Manage,
|
|
473
543
|
marker: Marker,
|
|
474
544
|
member: Member,
|
|
475
545
|
members: Members,
|
|
546
|
+
'menu-circle-horizontal': MenuCircleHorizontal,
|
|
547
|
+
'menu-circle-vertical': MenuCircleVertical,
|
|
548
|
+
'menu-horizontal': MenuHorizontal,
|
|
476
549
|
'menu-vertical': MenuVertical,
|
|
550
|
+
metrics: Metrics,
|
|
551
|
+
more: More,
|
|
552
|
+
organization: Organization,
|
|
553
|
+
organizations: Organizations,
|
|
477
554
|
phone: Phone,
|
|
555
|
+
platform: Platform,
|
|
556
|
+
prize: Prize,
|
|
478
557
|
'product-activated': ProductActivated,
|
|
479
558
|
'product-add': ProductAdd,
|
|
480
559
|
products: Products,
|
|
481
560
|
projects: Projects,
|
|
561
|
+
puzzle: Puzzle,
|
|
482
562
|
question: Question,
|
|
563
|
+
receipt: Receipt,
|
|
483
564
|
search: Search,
|
|
484
565
|
'see-page': SeePage,
|
|
485
566
|
settings: Settings,
|
|
@@ -495,7 +576,12 @@ const ConsoleIcons = {
|
|
|
495
576
|
support: Support,
|
|
496
577
|
switch: Switch,
|
|
497
578
|
team: Team,
|
|
579
|
+
time: Time,
|
|
580
|
+
tool: Tool,
|
|
498
581
|
user: User,
|
|
582
|
+
'view-card': ViewCard,
|
|
583
|
+
'view-list': ViewList,
|
|
584
|
+
'view-mini-card': ViewMiniCard,
|
|
499
585
|
warning: Warning,
|
|
500
586
|
woosmap: Woosmap,
|
|
501
587
|
|
|
@@ -626,12 +712,12 @@ const Icons = {
|
|
|
626
712
|
|
|
627
713
|
class Icon extends Component {
|
|
628
714
|
render() {
|
|
629
|
-
const { icon, size, className,
|
|
715
|
+
const { icon, size, className, title, testId } = this.props;
|
|
630
716
|
const IconComponent = Object.keys(Icons).includes(icon) ? Icons[icon] : Woosmap;
|
|
631
|
-
|
|
717
|
+
|
|
632
718
|
return (
|
|
633
719
|
<IconComponent
|
|
634
|
-
className={
|
|
720
|
+
className={cl('icon', className)}
|
|
635
721
|
data-testid={`${testId}-${icon}`}
|
|
636
722
|
width={size}
|
|
637
723
|
height={size}
|
|
@@ -642,18 +728,16 @@ class Icon extends Component {
|
|
|
642
728
|
}
|
|
643
729
|
|
|
644
730
|
Icon.defaultProps = {
|
|
645
|
-
size:
|
|
731
|
+
size: 24,
|
|
646
732
|
className: null,
|
|
647
733
|
title: null,
|
|
648
734
|
testId: 'icon',
|
|
649
|
-
isFill: false,
|
|
650
735
|
};
|
|
651
736
|
|
|
652
737
|
Icon.propTypes = {
|
|
653
738
|
size: PropTypes.number,
|
|
654
739
|
className: PropTypes.string,
|
|
655
740
|
icon: PropTypes.string.isRequired,
|
|
656
|
-
isFill: PropTypes.bool,
|
|
657
741
|
title: PropTypes.string,
|
|
658
742
|
testId: PropTypes.string,
|
|
659
743
|
};
|
|
@@ -10,7 +10,7 @@ export default Story;
|
|
|
10
10
|
|
|
11
11
|
const Template = () => (
|
|
12
12
|
<div>
|
|
13
|
-
<Icon size={64} icon="
|
|
13
|
+
<Icon size={64} icon="home" />
|
|
14
14
|
</div>
|
|
15
15
|
);
|
|
16
16
|
|
|
@@ -30,6 +30,6 @@ const drawIcon = (icon) => (
|
|
|
30
30
|
|
|
31
31
|
export const All = () => <div className="flex-wrap">{Object.keys(Icons).map(drawIcon)}</div>;
|
|
32
32
|
export const Website = () => <div className="flex-wrap">{Object.keys(WebsiteIcons).map(drawIcon)}</div>;
|
|
33
|
-
export const Console = () => <div className="flex-wrap
|
|
33
|
+
export const Console = () => <div className="flex-wrap">{Object.keys(ConsoleIcons).map(drawIcon)}</div>;
|
|
34
34
|
export const Products = () => <div className="flex-wrap">{Object.keys(ProductsIcons).map(drawIcon)}</div>;
|
|
35
35
|
export const NotExisting = () => <div className="flex-wrap">{drawIcon('not-existing-icon')}</div>;
|
|
@@ -5,13 +5,13 @@ import '@testing-library/jest-dom/extend-expect';
|
|
|
5
5
|
import Icon from './Icon';
|
|
6
6
|
|
|
7
7
|
it('renders an icon component', () => {
|
|
8
|
-
const { getByTestId } = render(<Icon icon="
|
|
8
|
+
const { getByTestId } = render(<Icon icon="home" size={64} />);
|
|
9
9
|
|
|
10
|
-
const result = getByTestId('icon-
|
|
10
|
+
const result = getByTestId('icon-home');
|
|
11
11
|
|
|
12
12
|
expect(result).toHaveClass('icon');
|
|
13
13
|
expect(result).toHaveAttribute('width', '64');
|
|
14
|
-
expect(result).toHaveTextContent('
|
|
14
|
+
expect(result).toHaveTextContent('home');
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
const isIconRendered = (icon) => {
|
|
@@ -15,16 +15,4 @@
|
|
|
15
15
|
&__name
|
|
16
16
|
margin-top 1rem
|
|
17
17
|
&:hover
|
|
18
|
-
background-color $primary10
|
|
19
|
-
.icon-console
|
|
20
|
-
.icon
|
|
21
|
-
trans()
|
|
22
|
-
stroke $secondary
|
|
23
|
-
stroke-linecap round
|
|
24
|
-
stroke-linejoin round
|
|
25
|
-
&:not(.icon--fill)
|
|
26
|
-
fill none
|
|
27
|
-
&--fill
|
|
28
|
-
stroke-width: 0
|
|
29
|
-
stroke $secondary
|
|
30
|
-
|
|
18
|
+
background-color $primary10
|
|
@@ -52,16 +52,16 @@ export default class Input extends Component {
|
|
|
52
52
|
|
|
53
53
|
switch (iconSize) {
|
|
54
54
|
case 'normal':
|
|
55
|
-
iconSize =
|
|
55
|
+
iconSize = 24;
|
|
56
56
|
break;
|
|
57
57
|
case 'large':
|
|
58
|
-
iconSize =
|
|
58
|
+
iconSize = 26;
|
|
59
59
|
break;
|
|
60
60
|
case 'small':
|
|
61
|
-
iconSize =
|
|
61
|
+
iconSize = 22;
|
|
62
62
|
break;
|
|
63
63
|
default:
|
|
64
|
-
iconSize =
|
|
64
|
+
iconSize = 24;
|
|
65
65
|
}
|
|
66
66
|
return (
|
|
67
67
|
<div className="input__container">
|
|
@@ -43,9 +43,8 @@ export default class Label extends Component {
|
|
|
43
43
|
{closable && (
|
|
44
44
|
<Button
|
|
45
45
|
type="link-flex"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
icon="close"
|
|
46
|
+
iconSize={12}
|
|
47
|
+
icon="close-thick"
|
|
49
48
|
onClick={closeCb}
|
|
50
49
|
testId={`${testId}-button`}
|
|
51
50
|
/>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
margin .2rem 0
|
|
13
13
|
word-break break-all
|
|
14
14
|
.icon
|
|
15
|
-
|
|
15
|
+
fill $light
|
|
16
16
|
&--round
|
|
17
17
|
br(50)
|
|
18
18
|
sq($buttonHeight)
|
|
@@ -134,10 +134,10 @@
|
|
|
134
134
|
text-shadow none
|
|
135
135
|
.btn
|
|
136
136
|
.icon
|
|
137
|
-
|
|
137
|
+
fill $secondary70
|
|
138
138
|
&:hover
|
|
139
139
|
.icon
|
|
140
|
-
|
|
140
|
+
fill $secondary70 !important
|
|
141
141
|
&--white
|
|
142
142
|
background-color $light
|
|
143
143
|
color $secondary
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
border .1rem solid $borderColor
|
|
146
146
|
.btn
|
|
147
147
|
.icon
|
|
148
|
-
|
|
148
|
+
fill $secondary40
|
|
149
149
|
&:hover
|
|
150
150
|
.icon
|
|
151
|
-
|
|
151
|
+
fill $secondary40 !important
|