@woosmap/ui 4.34.0-beta.1 → 4.34.0-beta.10
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 +6 -3
- package/src/components/Button/ButtonSwitch.js +1 -1
- package/src/components/Card/Card.js +1 -1
- package/src/components/Card/SimpleCard.js +2 -0
- package/src/components/Card/SimpleCard.styl +1 -1
- package/src/components/Dropdown/Dropdown.js +1 -1
- package/src/components/Flash/Flash.js +1 -1
- package/src/components/Icon/Icon.js +14 -2
- package/src/components/Icon/icon-story.styl +3 -2
- package/src/components/Input/Input.js +4 -4
- package/src/components/Label/Label.js +8 -1
- package/src/icons/alphabetical-order-reversed.svg +1 -0
- package/src/icons/clock-reversed.svg +1 -0
- package/src/icons/clock.svg +1 -1
- package/src/icons/dot.svg +1 -0
- package/src/icons/time.svg +1 -0
- package/src/icons/view-card.svg +1 -0
- package/src/icons/view-list.svg +1 -0
- package/src/styles/console/button.styl +8 -5
- package/src/styles/console/select.styl +3 -3
- 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,6 +15,7 @@ export default class Button extends Component {
|
|
|
15
15
|
size,
|
|
16
16
|
type,
|
|
17
17
|
icon,
|
|
18
|
+
isFillIcon,
|
|
18
19
|
iconSize,
|
|
19
20
|
isBtnIcon,
|
|
20
21
|
className,
|
|
@@ -40,10 +41,10 @@ export default class Button extends Component {
|
|
|
40
41
|
isNotification ? 'btn--notification' : null,
|
|
41
42
|
{ 'btn--loading': isLoading },
|
|
42
43
|
{ 'btn--no-label': !label },
|
|
43
|
-
{ 'btn--custom-icon-size': iconSize && iconSize !==
|
|
44
|
+
{ 'btn--custom-icon-size': iconSize && iconSize !== 22 },
|
|
44
45
|
className
|
|
45
46
|
);
|
|
46
|
-
let iconComponent = icon ? <Icon size={iconSize} icon={icon} /> : null;
|
|
47
|
+
let iconComponent = icon ? <Icon isFill={isFillIcon} size={iconSize} icon={icon} /> : null;
|
|
47
48
|
if (isLoading) {
|
|
48
49
|
iconComponent = <Icon icon="load" />;
|
|
49
50
|
}
|
|
@@ -77,12 +78,13 @@ Button.defaultProps = {
|
|
|
77
78
|
className: '',
|
|
78
79
|
label: '',
|
|
79
80
|
icon: null,
|
|
80
|
-
iconSize:
|
|
81
|
+
iconSize: 22,
|
|
81
82
|
isLoading: false,
|
|
82
83
|
active: false,
|
|
83
84
|
onClick: null,
|
|
84
85
|
iconRight: false,
|
|
85
86
|
isNotification: false,
|
|
87
|
+
isFillIcon: false,
|
|
86
88
|
};
|
|
87
89
|
|
|
88
90
|
Button.propTypes = {
|
|
@@ -119,4 +121,5 @@ Button.propTypes = {
|
|
|
119
121
|
children: PropTypes.node,
|
|
120
122
|
iconRight: PropTypes.bool,
|
|
121
123
|
isNotification: PropTypes.bool,
|
|
124
|
+
isFillIcon: PropTypes.bool,
|
|
122
125
|
};
|
|
@@ -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
|
|
9
|
+
const iconComponent = icon ? <Icon icon={icon} /> : null;
|
|
10
10
|
return (
|
|
11
11
|
<div
|
|
12
12
|
className={cl(
|
|
@@ -120,6 +120,7 @@ import { ReactComponent as AdminKey } from '../../icons/admin-key.svg';
|
|
|
120
120
|
import { ReactComponent as AdminTool } from '../../icons/admin-tool.svg';
|
|
121
121
|
import { ReactComponent as Agenda } from '../../icons/agenda.svg';
|
|
122
122
|
import { ReactComponent as AlphabeticalOrder } from '../../icons/alphabetical-order.svg';
|
|
123
|
+
import { ReactComponent as AlphabeticalOrderReversed } from '../../icons/alphabetical-order-reversed.svg';
|
|
123
124
|
import { ReactComponent as ArrowBotton } from '../../icons/arrow-bottom.svg';
|
|
124
125
|
import { ReactComponent as ArrowLeft } from '../../icons/arrow-left.svg';
|
|
125
126
|
import { ReactComponent as ArrowRight } from '../../icons/arrow-right.svg';
|
|
@@ -134,6 +135,7 @@ import { ReactComponent as CaretTop } from '../../icons/caret-top.svg';
|
|
|
134
135
|
import { ReactComponent as Charts } from '../../icons/charts.svg';
|
|
135
136
|
import { ReactComponent as Check } from '../../icons/check.svg';
|
|
136
137
|
import { ReactComponent as Clock } from '../../icons/clock.svg';
|
|
138
|
+
import { ReactComponent as ClockReversed } from '../../icons/clock-reversed.svg';
|
|
137
139
|
import { ReactComponent as Close } from '../../icons/close.svg';
|
|
138
140
|
import { ReactComponent as Code } from '../../icons/code.svg';
|
|
139
141
|
import { ReactComponent as Company } from '../../icons/company.svg';
|
|
@@ -143,6 +145,7 @@ import { ReactComponent as Dashboard } from '../../icons/dashboard.svg';
|
|
|
143
145
|
import { ReactComponent as Delete } from '../../icons/delete.svg';
|
|
144
146
|
import { ReactComponent as Documentation } from '../../icons/documentation.svg';
|
|
145
147
|
import { ReactComponent as Dollar } from '../../icons/dollar.svg';
|
|
148
|
+
import { ReactComponent as Dot } from '../../icons/dot.svg';
|
|
146
149
|
import { ReactComponent as DotFill } from '../../icons/dot-fill.svg';
|
|
147
150
|
import { ReactComponent as Edit } from '../../icons/edit.svg';
|
|
148
151
|
import { ReactComponent as Email } from '../../icons/email.svg';
|
|
@@ -152,7 +155,6 @@ import { ReactComponent as Expand } from '../../icons/expand.svg';
|
|
|
152
155
|
import { ReactComponent as Export } from '../../icons/export.svg';
|
|
153
156
|
import { ReactComponent as Flag } from '../../icons/flag.svg';
|
|
154
157
|
import { ReactComponent as Forbidden } from '../../icons/forbidden.svg';
|
|
155
|
-
|
|
156
158
|
import { ReactComponent as Globe } from '../../icons/globe.svg';
|
|
157
159
|
import { ReactComponent as Hourglass } from '../../icons/hourglass.svg';
|
|
158
160
|
import { ReactComponent as Import } from '../../icons/import.svg';
|
|
@@ -181,7 +183,10 @@ import { ReactComponent as StarFilled } from '../../icons/star-filled.svg';
|
|
|
181
183
|
import { ReactComponent as Support } from '../../icons/support.svg';
|
|
182
184
|
import { ReactComponent as Switch } from '../../icons/switch.svg';
|
|
183
185
|
import { ReactComponent as Team } from '../../icons/team.svg';
|
|
186
|
+
import { ReactComponent as Time } from '../../icons/time.svg';
|
|
184
187
|
import { ReactComponent as User } from '../../icons/user.svg';
|
|
188
|
+
import { ReactComponent as ViewCard } from '../../icons/view-card.svg';
|
|
189
|
+
import { ReactComponent as ViewList } from '../../icons/view-list.svg';
|
|
185
190
|
import { ReactComponent as Warning } from '../../icons/warning.svg';
|
|
186
191
|
import { ReactComponent as Woosmap } from '../../icons/woosmap.svg';
|
|
187
192
|
import { ReactComponent as Address } from '../../icons/address.svg';
|
|
@@ -189,6 +194,7 @@ import { ReactComponent as Distance } from '../../icons/distance.svg';
|
|
|
189
194
|
import { ReactComponent as Geolocation } from '../../icons/geolocation.svg';
|
|
190
195
|
import { ReactComponent as Localities } from '../../icons/localities.svg';
|
|
191
196
|
import { ReactComponent as Map } from '../../icons/map.svg';
|
|
197
|
+
|
|
192
198
|
import { ReactComponent as Merchant } from '../../icons/merchant.svg';
|
|
193
199
|
import { ReactComponent as Stores } from '../../icons/stores.svg';
|
|
194
200
|
import { ReactComponent as Traffic } from '../../icons/traffic.svg';
|
|
@@ -428,6 +434,7 @@ const ConsoleIcons = {
|
|
|
428
434
|
'administration-tool': AdministrationTool,
|
|
429
435
|
agenda: Agenda,
|
|
430
436
|
'alphabetical-order': AlphabeticalOrder,
|
|
437
|
+
'alphabetical-order-reversed': AlphabeticalOrdedReversef,
|
|
431
438
|
'arrow-bottom': ArrowBotton,
|
|
432
439
|
'arrow-left': ArrowLeft,
|
|
433
440
|
'arrow-right': ArrowRight,
|
|
@@ -442,6 +449,7 @@ const ConsoleIcons = {
|
|
|
442
449
|
charts: Charts,
|
|
443
450
|
check: Check,
|
|
444
451
|
clock: Clock,
|
|
452
|
+
'clock-reversed': ClockReversed,
|
|
445
453
|
close: Close,
|
|
446
454
|
code: Code,
|
|
447
455
|
company: Company,
|
|
@@ -451,6 +459,7 @@ const ConsoleIcons = {
|
|
|
451
459
|
delete: Delete,
|
|
452
460
|
documentation: Documentation,
|
|
453
461
|
dollar: Dollar,
|
|
462
|
+
dot: Dot,
|
|
454
463
|
'dot-fill': DotFill,
|
|
455
464
|
edit: Edit,
|
|
456
465
|
email: Email,
|
|
@@ -493,7 +502,10 @@ const ConsoleIcons = {
|
|
|
493
502
|
support: Support,
|
|
494
503
|
switch: Switch,
|
|
495
504
|
team: Team,
|
|
505
|
+
time: Time,
|
|
496
506
|
user: User,
|
|
507
|
+
'view-card': ViewCard,
|
|
508
|
+
'view-list': ViewList,
|
|
497
509
|
warning: Warning,
|
|
498
510
|
woosmap: Woosmap,
|
|
499
511
|
|
|
@@ -626,7 +638,7 @@ class Icon extends Component {
|
|
|
626
638
|
render() {
|
|
627
639
|
const { icon, size, className, isFill, title, testId } = this.props;
|
|
628
640
|
const IconComponent = Object.keys(Icons).includes(icon) ? Icons[icon] : Woosmap;
|
|
629
|
-
const classes = cl('icon', { '
|
|
641
|
+
const classes = cl('icon', { 'icon--fill': isFill }, className);
|
|
630
642
|
return (
|
|
631
643
|
<IconComponent
|
|
632
644
|
className={classes}
|
|
@@ -22,8 +22,9 @@
|
|
|
22
22
|
stroke $secondary
|
|
23
23
|
stroke-linecap round
|
|
24
24
|
stroke-linejoin round
|
|
25
|
+
&:not(.icon--fill)
|
|
26
|
+
fill none
|
|
25
27
|
&--fill
|
|
26
28
|
stroke-width: 0
|
|
27
29
|
stroke $secondary
|
|
28
|
-
|
|
29
|
-
fill: none
|
|
30
|
+
|
|
@@ -52,16 +52,16 @@ export default class Input extends Component {
|
|
|
52
52
|
|
|
53
53
|
switch (iconSize) {
|
|
54
54
|
case 'normal':
|
|
55
|
-
iconSize =
|
|
55
|
+
iconSize = 22;
|
|
56
56
|
break;
|
|
57
57
|
case 'large':
|
|
58
|
-
iconSize =
|
|
58
|
+
iconSize = 24;
|
|
59
59
|
break;
|
|
60
60
|
case 'small':
|
|
61
|
-
iconSize =
|
|
61
|
+
iconSize = 20;
|
|
62
62
|
break;
|
|
63
63
|
default:
|
|
64
|
-
iconSize =
|
|
64
|
+
iconSize = 22;
|
|
65
65
|
}
|
|
66
66
|
return (
|
|
67
67
|
<div className="input__container">
|
|
@@ -41,7 +41,14 @@ export default class Label extends Component {
|
|
|
41
41
|
</span>
|
|
42
42
|
)}
|
|
43
43
|
{closable && (
|
|
44
|
-
<Button
|
|
44
|
+
<Button
|
|
45
|
+
type="link-flex"
|
|
46
|
+
className="icon--thicker"
|
|
47
|
+
iconSize={10}
|
|
48
|
+
icon="close"
|
|
49
|
+
onClick={closeCb}
|
|
50
|
+
testId={`${testId}-button`}
|
|
51
|
+
/>
|
|
45
52
|
)}
|
|
46
53
|
</span>
|
|
47
54
|
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><line x1="16.744" y1="17.315" x2="16.744" y2="6.54"/><polyline points="20.382 14.949 16.781 18.55 13.17 14.94"/><polyline points="3.62 19.289 6.202 12.924 8.706 19.289"/><line x1="4.267" y1="17.694" x2="8.079" y2="17.694"/><polyline points="3.62 4.711 8.706 4.711 3.618 9.799 8.684 9.799"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><polyline points="16.137 10.357 12.037 13.103 7.54 8.557"/><polyline points="14.678 17.975 19.248 17.975 19.248 22.431"/><path d="m21.177,13.911c.128-.617.195-1.256.195-1.911,0-5.176-4.196-9.372-9.372-9.372S2.628,6.824,2.628,12s4.196,9.372,9.372,9.372c2.911,0,5.513-1.328,7.232-3.41"/></svg>
|
package/src/icons/clock.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><polyline points="16.137 10.357 12.037 13.103 7.54 8.557"/><
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><polyline points="9.322 17.975 4.752 17.975 4.752 22.431"/><polyline points="16.137 10.357 12.037 13.103 7.54 8.557"/><path d="m2.823,13.911c-.128-.617-.195-1.256-.195-1.911C2.628,6.824,6.824,2.628,12,2.628s9.372,4.196,9.372,9.372-4.196,9.372-9.372,9.372c-2.911,0-5.513-1.328-7.232-3.41"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12.174" cy="12" r="3.231"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><polyline points="16.137 10.357 12.037 13.103 7.54 8.557"/><circle cx="12" cy="12" r="9.372"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="2" y="4.841" width="20" height="14.318" rx="3.771" ry="3.771"/><line x1="5.914" y1="8.57" x2="18.449" y2="8.57"/><line x1="5.914" y1="11.64" x2="14.949" y2="11.64"/><circle cx="6.592" cy="15.049" r=".339"/><circle cx="9.192" cy="15.049" r=".339"/><circle cx="11.793" cy="15.049" r=".339"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="2" y="6.047" width="19.389" height="4.527" rx="2.263" ry="2.263"/><rect x="2" y="13.103" width="19.389" height="4.527" rx="2.263" ry="2.263"/><line x1="16.315" y1="8.31" x2="4.573" y2="8.31"/><line x1="4.573" y1="15.366" x2="10.056" y2="15.366"/></svg>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
&.btn--loading
|
|
22
22
|
padding 0
|
|
23
23
|
.icon
|
|
24
|
-
sq(2.
|
|
24
|
+
sq(2.2)
|
|
25
25
|
&.btn--small
|
|
26
26
|
buttonSmall()
|
|
27
27
|
width $buttonHeightSmall
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
disableHoverEffect()
|
|
73
73
|
.icon
|
|
74
74
|
margin-right .3rem
|
|
75
|
-
sq(2
|
|
75
|
+
sq(2)
|
|
76
76
|
&.btn--has-icon
|
|
77
77
|
&:not(.btn--mini):not(.btn--small):not(.btn--large)
|
|
78
78
|
mbi(.4)
|
|
@@ -373,7 +373,7 @@
|
|
|
373
373
|
&.btn--important
|
|
374
374
|
background-color $error
|
|
375
375
|
.icon
|
|
376
|
-
sq(2
|
|
376
|
+
sq(2)
|
|
377
377
|
&--switch
|
|
378
378
|
btn()
|
|
379
379
|
color $secondary-medium
|
|
@@ -665,7 +665,7 @@
|
|
|
665
665
|
buttonLarge()
|
|
666
666
|
&:not(.btn--custom-icon-size)
|
|
667
667
|
.icon
|
|
668
|
-
sq(3
|
|
668
|
+
sq(3)
|
|
669
669
|
&:not(.btn--icon)
|
|
670
670
|
.icon
|
|
671
671
|
margin-right .6rem
|
|
@@ -675,7 +675,10 @@
|
|
|
675
675
|
padding-left $padding
|
|
676
676
|
disableHoverEffect()
|
|
677
677
|
.icon
|
|
678
|
-
sq(3
|
|
678
|
+
sq(3)
|
|
679
|
+
.icon--thicker
|
|
680
|
+
.icon
|
|
681
|
+
stroke-width .16rem
|
|
679
682
|
@media screen and (max-width 720px)
|
|
680
683
|
.btn
|
|
681
684
|
&--tab
|
|
@@ -29,7 +29,7 @@ select
|
|
|
29
29
|
.select__indicator
|
|
30
30
|
.asyncselect__indicator
|
|
31
31
|
svg
|
|
32
|
-
|
|
32
|
+
fill $secondary
|
|
33
33
|
&__value-container
|
|
34
34
|
padding-left 1rem !important
|
|
35
35
|
&__single-value
|
|
@@ -40,7 +40,7 @@ select
|
|
|
40
40
|
&-separator
|
|
41
41
|
background-color $secondary-medium25
|
|
42
42
|
svg
|
|
43
|
-
|
|
43
|
+
fill $secondary-medium25
|
|
44
44
|
&__placeholder
|
|
45
45
|
white-space nowrap
|
|
46
46
|
color $secondary-medium60
|
|
@@ -97,7 +97,7 @@ select
|
|
|
97
97
|
&__remove
|
|
98
98
|
cursor pointer
|
|
99
99
|
svg
|
|
100
|
-
|
|
100
|
+
fill $light !important
|
|
101
101
|
&--small
|
|
102
102
|
.select
|
|
103
103
|
.asyncselect
|
package/.idea/encodings.xml
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<component name="InspectionProjectProfileManager">
|
|
2
|
-
<profile version="1.0">
|
|
3
|
-
<option name="myName" value="Project Default" />
|
|
4
|
-
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
5
|
-
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
|
6
|
-
<option name="ignoredPackages">
|
|
7
|
-
<value>
|
|
8
|
-
<list size="4">
|
|
9
|
-
<item index="0" class="java.lang.String" itemvalue="Fabric" />
|
|
10
|
-
<item index="1" class="java.lang.String" itemvalue="PyYAML" />
|
|
11
|
-
<item index="2" class="java.lang.String" itemvalue="Jinja2" />
|
|
12
|
-
<item index="3" class="java.lang.String" itemvalue="github3.py" />
|
|
13
|
-
</list>
|
|
14
|
-
</value>
|
|
15
|
-
</option>
|
|
16
|
-
</inspection_tool>
|
|
17
|
-
</profile>
|
|
18
|
-
</component>
|
package/.idea/misc.xml
DELETED
package/.idea/modules.xml
DELETED
package/.idea/prettier.xml
DELETED
package/.idea/ui.iml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="PYTHON_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager">
|
|
4
|
-
<content url="file://$MODULE_DIR$" />
|
|
5
|
-
<orderEntry type="inheritedJdk" />
|
|
6
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
7
|
-
</component>
|
|
8
|
-
<component name="TemplatesService">
|
|
9
|
-
<option name="TEMPLATE_FOLDERS">
|
|
10
|
-
<list>
|
|
11
|
-
<option value="$MODULE_DIR$/node_modules/@storybook/core/dist/server/templates" />
|
|
12
|
-
</list>
|
|
13
|
-
</option>
|
|
14
|
-
</component>
|
|
15
|
-
</module>
|