@woosmap/ui 3.14.0 → 3.18.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@woosmap/ui",
3
- "version": "3.14.0",
3
+ "version": "3.18.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -4,17 +4,15 @@ import PropTypes from 'prop-types';
4
4
 
5
5
  export default class ButtonGroup extends Component {
6
6
  render() {
7
- const { children, isLight, isTooltipBtn, testId, ...rest } = this.props;
7
+ const { children, isLight, isTooltipBtn, testId, className, ...rest } = this.props;
8
+ const classes = cl(
9
+ 'btn--group-container',
10
+ { 'btn--group-container--light': isLight },
11
+ { 'btn--group-container--btn-tooltip': isTooltipBtn },
12
+ className
13
+ );
8
14
  return (
9
- <div
10
- className={cl(
11
- 'btn--group-container',
12
- { 'btn--group-container--light': isLight },
13
- { 'btn--group-container--btn-tooltip': isTooltipBtn }
14
- )}
15
- {...rest}
16
- data-testid={testId}
17
- >
15
+ <div className={classes} {...rest} data-testid={testId}>
18
16
  {children}
19
17
  </div>
20
18
  );
@@ -26,6 +24,7 @@ ButtonGroup.defaultProps = {
26
24
  children: null,
27
25
  isLight: false,
28
26
  isTooltipBtn: false,
27
+ className: '',
29
28
  };
30
29
 
31
30
  ButtonGroup.propTypes = {
@@ -33,4 +32,5 @@ ButtonGroup.propTypes = {
33
32
  children: PropTypes.array,
34
33
  isLight: PropTypes.bool,
35
34
  isTooltipBtn: PropTypes.bool,
35
+ className: PropTypes.string,
36
36
  };
@@ -259,9 +259,10 @@ export default class AddressDemo extends Component {
259
259
  ),
260
260
  };
261
261
  const filterGeometry = {
262
- label: tr('Geometry only'),
262
+ label: false,
263
263
  component: (
264
264
  <Input
265
+ label={tr('Geometry only')}
265
266
  type="checkbox"
266
267
  key="geometry"
267
268
  checked={geometry}
@@ -275,7 +276,7 @@ export default class AddressDemo extends Component {
275
276
  const filterCountries = {
276
277
  label: tr('Language'),
277
278
  component: (
278
- <ButtonGroup isLight key="language">
279
+ <ButtonGroup className="language" isLight key="language">
279
280
  {languages.map((item) => (
280
281
  <Button
281
282
  type="group"
@@ -262,7 +262,7 @@ export default class DistanceDemo extends Component {
262
262
  const filterTravelMode = {
263
263
  key: 'travelmode',
264
264
  component: (
265
- <ButtonGroup isLight>
265
+ <ButtonGroup className="transportation" isLight>
266
266
  {travelModes.map((item) => (
267
267
  <Button
268
268
  type="group"
@@ -300,7 +300,7 @@ export default class DistanceDemo extends Component {
300
300
  const filterLanguage = {
301
301
  label: tr('Language'),
302
302
  component: (
303
- <ButtonGroup isLight>
303
+ <ButtonGroup className="language" isLight>
304
304
  {languages.map((item) => (
305
305
  <Button
306
306
  type="group"
@@ -319,9 +319,10 @@ export default class DistanceDemo extends Component {
319
319
  };
320
320
 
321
321
  const filterAlternatives = {
322
- label: tr('Alternative routes'),
322
+ label: '',
323
323
  component: (
324
324
  <Input
325
+ label={tr('Alternative routes')}
325
326
  type="checkbox"
326
327
  checked={alternatives}
327
328
  onChange={(e) => {
@@ -331,7 +332,7 @@ export default class DistanceDemo extends Component {
331
332
  ),
332
333
  };
333
334
 
334
- return [filterTravelMode, filterUnit, filterLanguage, filterAlternatives];
335
+ return [filterAlternatives, filterTravelMode, filterUnit, filterLanguage];
335
336
  };
336
337
 
337
338
  render() {
@@ -116,9 +116,10 @@ export default class GeolocationDemo extends Component {
116
116
  }
117
117
 
118
118
  const filterStores = {
119
- label: tr('Display Geolocation POIs'),
119
+ label: '',
120
120
  component: (
121
121
  <Input
122
+ label={tr('Display Geolocation POIs')}
122
123
  type="checkbox"
123
124
  key="stores"
124
125
  checked={showStores}
@@ -208,9 +208,10 @@ export default class LocalitiesAddressDemo extends Component {
208
208
  ),
209
209
  };
210
210
  const filterGeometry = {
211
- label: tr('Geometry only'),
211
+ label: '',
212
212
  component: (
213
213
  <Input
214
+ label={tr('Geometry only')}
214
215
  type="checkbox"
215
216
  key="geometry"
216
217
  checked={geometry}
@@ -224,28 +224,26 @@ export default class LocalitiesDemo extends Component {
224
224
  const filterTypes = {
225
225
  label: tr('Filter by'),
226
226
  component: (
227
- <div className="demo__input-container--inline">
227
+ <>
228
228
  <CountrySelect
229
229
  isMulti
230
- size="small"
231
230
  placeholder={tr('Country')}
232
231
  filter={['fr', 'gb', 'sp', 'it', 'de', 'nl']}
233
232
  onChange={(items) => this.setState({ countries: items }, this.requestLocalities)}
234
233
  />
235
234
  <Select
236
- size="small"
237
235
  placeholder={tr('Point of interest')}
238
236
  options={this.types}
239
237
  isMulti
240
238
  onChange={(items) => this.setState({ localitiesTypes: items }, this.requestLocalities)}
241
239
  />
242
- </div>
240
+ </>
243
241
  ),
244
242
  };
245
243
  const filterCountries = {
246
244
  label: tr('Language'),
247
245
  component: (
248
- <ButtonGroup isLight>
246
+ <ButtonGroup className="language" isLight>
249
247
  {languages.map((item) => (
250
248
  <Button
251
249
  size="small"
@@ -145,9 +145,10 @@ storesOverlay.setMap(map);
145
145
  renderFooterFilters = () => {
146
146
  const { hasStores, hasPois } = this.state;
147
147
  const filterPois = {
148
- label: tr('Display Map POIs'),
148
+ label: '',
149
149
  component: (
150
150
  <Input
151
+ label={tr('Display Map POIs')}
151
152
  type="checkbox"
152
153
  key="pois"
153
154
  checked={hasPois}
@@ -159,9 +160,10 @@ storesOverlay.setMap(map);
159
160
  };
160
161
 
161
162
  const filterStores = {
162
- label: tr('Display Woosmap Stores overlay'),
163
+ label: '',
163
164
  component: (
164
165
  <Input
166
+ label={tr('Display Woosmap Stores overlay')}
165
167
  type="checkbox"
166
168
  key="stores"
167
169
  checked={hasStores}
@@ -7,7 +7,6 @@ import Marker from '../Map/Marker';
7
7
  import Button from '../Button/Button';
8
8
  import { viewport, boundsFromViewport } from '../Map/drawOnMap';
9
9
  import Constants from '../../Constants';
10
- import geolocationSuccessImg from '../../images/geolocation-success.png';
11
10
  import { tr } from '../utils/locale';
12
11
  import IphoneTime from '../../images/iphone-time.png';
13
12
  import IphoneIcons from '../../images/iphone-right-icons.png';
@@ -576,7 +575,7 @@ export default class MerchantDemo extends Component {
576
575
  renderResult = () => {
577
576
  const { transaction } = this.state;
578
577
  return (
579
- <div className="demo__results">
578
+ <div className="merchant__wrapper">
580
579
  <div className="merchant__mobilewrapper">
581
580
  <div className="merchant__mobilecontainer__title">Transactions</div>
582
581
  <div className="merchant__mobilecontainer" style={{ zIndex: 2 }}>
@@ -599,12 +598,6 @@ export default class MerchantDemo extends Component {
599
598
 
600
599
  render() {
601
600
  const { noheader } = this.props;
602
- const headerTagline = (
603
- <>
604
- <img alt="Success" src={geolocationSuccessImg} />
605
- <span>{tr("Look at some transactions we've cleaned for you!")}</span>
606
- </>
607
- );
608
601
  const headerLabels = {
609
602
  title: tr('Merchant API'),
610
603
  desc: tr(
@@ -617,14 +610,13 @@ export default class MerchantDemo extends Component {
617
610
  className="demo--merchant"
618
611
  id="merchant-demo"
619
612
  docLink="https://developers.woosmap.com/products/merchant-api/get-started/"
620
- headerTagline={headerTagline}
621
613
  header={headerLabels}
622
614
  request={this.getRequestUrl()}
623
615
  params={this.getRequestparams()}
624
616
  body={this.getRequestBody()}
625
617
  method="POST"
626
618
  response={this.getResponse()}
627
- leftContent={this.renderResult()}
619
+ mainContent={this.renderResult()}
628
620
  />
629
621
  );
630
622
  }
@@ -148,37 +148,46 @@ export default class SkeletonDemo extends Component {
148
148
  return null;
149
149
  }
150
150
  return (
151
- <div className="demo__content-footer">
151
+ <>
152
152
  {footerFilters.map((filter) => (
153
153
  <div className="demo__input-container" key={filter.label || filter.key}>
154
- {filter.label ? <p className="demo__label--filter">{filter.label}</p> : false}
154
+ {filter.label ? <p className="demo__label demo__label--filter">{filter.label}</p> : false}
155
155
  {filter.component}
156
156
  </div>
157
157
  ))}
158
- </div>
158
+ </>
159
159
  );
160
160
  };
161
161
 
162
162
  render() {
163
- const { result, request, response, renderCode } = this.props;
163
+ const { result, request, response, renderCode, withMap, mainContent } = this.props;
164
164
  const { copied } = this.state;
165
+ const filters = this.renderHeaderFilters();
166
+ const filters2 = this.renderFooterFilters();
167
+ const tagLine = this.renderHeaderTagline();
165
168
  return (
166
169
  <article className="demo">
167
170
  <div className="demo__content">
168
171
  <div className="demo__showcase">
169
- <div className="demo__filters">
170
- {this.renderHeaderFilters()}
171
- {this.renderFooterFilters()}
172
- </div>
172
+ {(tagLine || filters || filters2) && (
173
+ <div className="demo__filters">
174
+ {tagLine}
175
+ {filters}
176
+ {filters2}
177
+ </div>
178
+ )}
173
179
  <div className="demo__map">
174
- <div className="map" ref={this.mapDivRef} />
180
+ {withMap && <div className="map" ref={this.mapDivRef} />}
181
+ {mainContent}
175
182
  </div>
176
183
  </div>
177
184
  <div className="demo__data">
178
- <div className="demo__results">
179
- <div className="demo__results__header">{tr('Results')}</div>
180
- <div className="demo__results__content">{result}</div>
181
- </div>
185
+ {result && (
186
+ <div className="demo__results">
187
+ <div className="demo__results__header">{tr('Results')}</div>
188
+ <div className="demo__results__content">{result}</div>
189
+ </div>
190
+ )}
182
191
  <div className="demo__code">
183
192
  <Tab
184
193
  actions={[
@@ -229,6 +238,7 @@ SkeletonDemo.contextType = TrackEventContext;
229
238
  SkeletonDemo.defaultProps = {
230
239
  renderCode: null,
231
240
  headerFilters: null,
241
+ mainContent: null,
232
242
  headerTagline: null,
233
243
  footerFilters: null,
234
244
  result: null,
@@ -238,6 +248,7 @@ SkeletonDemo.defaultProps = {
238
248
  referer: '',
239
249
  body: '',
240
250
  method: '',
251
+ withMap: false,
241
252
  };
242
253
  SkeletonDemo.propTypes = {
243
254
  renderCode: PropTypes.func,
@@ -246,8 +257,10 @@ SkeletonDemo.propTypes = {
246
257
  headerFilters: PropTypes.array,
247
258
  footerFilters: PropTypes.array,
248
259
  result: PropTypes.node,
260
+ mainContent: PropTypes.node,
249
261
  request: PropTypes.string,
250
262
  referer: PropTypes.string,
263
+ withMap: PropTypes.bool,
251
264
  body: PropTypes.string,
252
265
  method: PropTypes.string,
253
266
  response: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
@@ -52,6 +52,7 @@ import { ReactComponent as CaretTop } from '../../icons/caret-top.svg';
52
52
  import { ReactComponent as Charts } from '../../icons/charts.svg';
53
53
  import { ReactComponent as Chat } from '../../icons/chat.svg';
54
54
  import { ReactComponent as Check } from '../../icons/check.svg';
55
+ import { ReactComponent as Checked } from '../../icons/checked.svg';
55
56
  import { ReactComponent as CheckCircle } from '../../icons/check-circle.svg';
56
57
  import { ReactComponent as Clock } from '../../icons/clock.svg';
57
58
  import { ReactComponent as ClockReversed } from '../../icons/clock-reversed.svg';
@@ -197,6 +198,7 @@ const Icons = {
197
198
  charts: Charts,
198
199
  chat: Chat,
199
200
  check: Check,
201
+ checked: Checked,
200
202
  'check-circle': CheckCircle,
201
203
  clock: Clock,
202
204
  'clock-reversed': ClockReversed,
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10.972 15.447a.789.789 0 0 1-.559-.231L7.156 11.96a.791.791 0 0 1 1.117-1.119l2.7 2.7 4.755-4.753A.79.79 0 1 1 16.844 9.9l-5.314 5.315a.784.784 0 0 1-.558.232Z"/><path d="M12 21.487A9.487 9.487 0 1 1 21.487 12 9.5 9.5 0 0 1 12 21.487ZM12 4.1a7.905 7.905 0 1 0 7.905 7.9A7.914 7.914 0 0 0 12 4.1Z"/></svg>
@@ -1,24 +1,66 @@
1
- $fontFamily = "Lato", arial, sans-serif
2
- $fontSize = 1.4rem
1
+ $fontFamily = "Poppins", arial, sans-serif
2
+ $fontSize = 1.8rem
3
+ $lineHeight = $fontSize * 2 - .8
3
4
  $fontSizeSmall = $fontSize - .2
4
5
  $fontSizeMini = $fontSize - .4
6
+ $fontSizeNano = $fontSize - .6
5
7
  $fontWeight = 400
8
+ $fontSizeHeader = 1.3rem
9
+ $fontSizeFooter = 1.6rem
6
10
 
7
11
 
8
- $title = $fontSize + .6
9
- $title2 = $fontSize + .4
10
- $title3 = $fontSize + .3
11
- $title4 = $fontSize + .2
12
- $title5 = $fontSize + .1
13
- $title6 = $fontSize
12
+ $title = 4.6rem
13
+ $title2 = 4rem
14
+ $title3 = 3.6rem
15
+ $title4 = 3rem
16
+ $title5 = 2.6rem
17
+ $title6 = 2rem
14
18
 
15
19
  $borderRadius = .6rem
16
20
 
21
+
22
+ // Layout
23
+ $wrapperWidth = 125rem
24
+ $wrapperReducedWidth = 96rem
25
+ $headerHeight = 6.7rem
26
+ $headerBannerHeight = 5.2rem
27
+ $sectionPadding = 18.5rem
28
+ $topRainbowHeight = 3.8rem
29
+ $gutter2c = 3rem
30
+ $quoteIcon = 44rem
31
+ $quoteIconPosition = ( - $quoteIcon / 2 - $sectionPadding + 1 )
32
+
33
+ $col2 = 58rem
34
+ $col3 = 31.5rem
35
+ $col4 = 22rem
36
+
37
+ // card articles
38
+ $cardHeaderHeight = 21rem
39
+ $cardFontSize = 1.6rem
40
+ $cardTitle = 1.8rem
41
+ $cardTitleLineHeight = 2.6rem
42
+ $cardLineHeight = $cardFontSize * 2 - 1
43
+ $cardPadding = 2rem
44
+
45
+ // card pricing
46
+ $pricingCardWidth = 30.2rem
47
+ $pricingCardpadding = 3.4rem
48
+ $pricingCardHeaderHeight = 6.2rem
49
+ $pricingCardCtaHeight = 5.2rem
50
+ $pricingCardTitleSize = $title6
51
+ $pricingCardAmountSize = $title2 * 2
52
+ $pricingCardUnitSize = $title6
53
+ $pricingCardPeriodSize = $fontSizeSmall
54
+ $pricingCardPriceSize = $title2
55
+ $pricingCardPriceUnitSize = $fontSizeSmall
56
+
17
57
  // Buttons & Inputs
18
58
 
19
- $padding = 1.2rem
59
+ $padding = 2rem
20
60
  $contentPadding = 2.8rem
21
61
 
62
+
63
+
22
64
  $sidebarButtonSize = 5rem
23
65
 
24
66
  $buttonHeight = 3.8rem
@@ -41,9 +83,9 @@ $buttonPaddingNano = 0 $padding - .4 0 $padding - .4
41
83
  $buttonFontSizeNano = $fontSize - .3
42
84
  $buttonLineHeightNano = $buttonFontSizeNano * 2
43
85
 
44
- $buttonHeightLarge = $buttonHeight + .8
45
- $buttonPaddingLarge = 0 $padding + .4 0 $padding + .4
46
- $buttonFontSizeLarge = $fontSize + .1
86
+ $buttonHeightLarge = $buttonHeight + 1.2
87
+ $buttonPaddingLarge = 0 $padding + .6 0 $padding + .6
88
+ $buttonFontSizeLarge = $fontSize - .2
47
89
  $buttonLineHeightLarge = $buttonFontSizeLarge * 2
48
90
 
49
91
 
@@ -0,0 +1,221 @@
1
+ .merchant
2
+ &__wrapper
3
+ trans()
4
+ display flex
5
+ justify-content center
6
+ width 100%
7
+ zoom .9
8
+ padding 2rem
9
+ background-color #d5eaff
10
+ &__mobilewrapper
11
+ trans()
12
+ position relative
13
+ height 100%
14
+ margin 3rem
15
+ &__mobilecontainer
16
+ position relative
17
+ height 51.9rem
18
+ width 28rem
19
+ margin auto
20
+ box-shadow 0 0 .4rem .1rem rgba($secondary, .1)
21
+ br(1)
22
+ &__title
23
+ text-align center
24
+ font-size 1.2rem
25
+ font-weight 600
26
+ margin 0 0 1rem 0
27
+ &__mobile
28
+ br(1)
29
+ font-size 1.3rem
30
+ width 100%
31
+ background-color $light
32
+ overflow hidden
33
+ &--dirty
34
+ &--details--dirty
35
+ .merchant__mobile__header
36
+ background #666767
37
+ &--clean
38
+ &--details
39
+ .merchant__mobile__header
40
+ background #4F70FF
41
+ &--details
42
+ position relative
43
+ &__header
44
+ padding 1.1rem
45
+ color #fff
46
+ text-transform uppercase
47
+ font-weight 600
48
+ &__nav
49
+ &__icons
50
+ flexSpread()
51
+ &__icons
52
+ img
53
+ max-height .8rem
54
+ &__nav
55
+ font-weight 700
56
+ margin-top 1.4rem
57
+ position relative
58
+ .merchant__mobile--details &
59
+ .merchant__mobile--details--dirty &
60
+ flexAxis()
61
+ &__avatar
62
+ max-width 2.4rem
63
+ &__back
64
+ max-width 1rem
65
+ opacity 0
66
+ .merchant__mobile--details &
67
+ .merchant__mobile--details--dirty &
68
+ opacity 1
69
+ &__button
70
+ sq(3)
71
+ position absolute
72
+ background-color transparent
73
+ left -.6rem
74
+ padding 0
75
+ display flex
76
+ align-items center
77
+ justify-content center
78
+ flex-shrink 0
79
+ &:hover
80
+ background-color $dark30
81
+
82
+ &__section
83
+ padding 1.4rem 2rem
84
+ background-color #f5f5f5
85
+ border-radius 0 0 1rem 1rem
86
+ height 45rem
87
+ .merchant__mobile--clean &
88
+ background-color #f3f7ff
89
+ .merchant__mobile--details &
90
+ background-color $light
91
+ padding 0
92
+ .merchant__mobile--details--dirty &
93
+ background-color $light
94
+ padding 2rem
95
+ &__map
96
+ overflow hidden
97
+ height 20rem
98
+ &__no-map
99
+ height 6rem
100
+ &__date
101
+ color #b7b7b7
102
+ margin-bottom .6rem
103
+ .merchant__mobile--clean &
104
+ color #8697b1
105
+ .merchant__mobile--details &
106
+ .merchant__mobile--details--dirty &
107
+ text-align center
108
+ margin .4rem 0 0 0
109
+ .merchant__mobile--details--dirty &
110
+ margin 0 0 2rem 0
111
+ &__transaction
112
+ flexSpread()
113
+ br(.6)
114
+ trans()
115
+ background-color $light
116
+ font-size 1.3rem
117
+ cursor pointer
118
+ height 4.8rem
119
+ padding 0 .8rem
120
+ box-shadow 0 0 .3rem .1rem $dark10
121
+ width 100%
122
+ margin-bottom .8rem
123
+ &:hover
124
+ background-color #666767
125
+ transform translateX(.5rem)
126
+ .merchant__mobile--clean &
127
+ background-color #4F70FF
128
+ .merchant__mobile__section__transaction
129
+ &__link
130
+ color $light
131
+ &__info
132
+ &__name
133
+ color $light
134
+ &__date
135
+ color $light50
136
+ &__price
137
+ color $light
138
+ &__link
139
+ color #999
140
+ margin 0 .6rem 0 1.4rem
141
+ img
142
+ max-width .7rem
143
+ &__info
144
+ width 100%
145
+ min-width 0
146
+ margin-right 1.2rem
147
+ .merchant__mobile--clean &
148
+ flexMiddle()
149
+ .merchant__mobile--details &
150
+ margin 0
151
+ &__address
152
+ padding 1rem 2rem
153
+ color#999
154
+ text-align center
155
+ &__logo
156
+ sq(3)
157
+ br(50)
158
+ position relative
159
+ margin-right 1.2rem
160
+ flex-shrink 0
161
+ .merchant__mobile--details &
162
+ width 100%
163
+ height 5rem
164
+ img
165
+ ellipsis()
166
+ br(50)
167
+ sq(3)
168
+ background #fff
169
+ border .1rem solid #f1f1f1
170
+ box-shadow 0 0 .6rem $dark10
171
+
172
+ .merchant__mobile--details &
173
+ sq(8)
174
+ position absolute
175
+ left calc(50% - 4rem)
176
+ top -4rem
177
+ box-shadow 0 0 1rem $dark25
178
+ border .3rem solid #fff
179
+ &__name
180
+ ellipsis()
181
+ font-weight 500
182
+ line-height 1.6rem
183
+ margin-bottom .3rem
184
+ .merchant__mobile--details &
185
+ .merchant__mobile--details--dirty &
186
+ text-align center
187
+ font-size 2rem
188
+ &__date
189
+ color #a1a1a1
190
+ font-size 1.2rem
191
+ line-height 1.4rem
192
+ &__price
193
+ font-weight 700
194
+ font-size 1.5rem
195
+ .merchant__mobile--details &
196
+ .merchant__mobile--details--dirty &
197
+ margin-top 1rem
198
+ font-size 5rem
199
+ line-height 1
200
+ text-align center
201
+ font-weight 400
202
+ .merchant__mobile--details--dirty &
203
+ font-size 3.5rem
204
+
205
+ @media screen and (max-width 760px)
206
+ .merchant
207
+ &__mobilewrapper
208
+ margin 0 1rem
209
+ @media screen and (max-width 660px)
210
+ .merchant
211
+ &__wrapper
212
+ zoom .7
213
+ @media screen and (max-width 469px)
214
+ .merchant
215
+ &__wrapper
216
+ zoom .6
217
+ @media screen and (max-width 400px)
218
+ .merchant
219
+ &__wrapper
220
+ zoom .45
221
+
@@ -340,4 +340,77 @@
340
340
  padding-left $padding
341
341
  disableHoverEffect()
342
342
  .icon
343
- sq(3.2)
343
+ sq(3.2)
344
+ &--group
345
+ btn()
346
+ color $secondary-medium40
347
+ background-color $light
348
+ border .1rem solid $inputBorderColor
349
+ &.btn--has-icon
350
+ &:not(.btn--mini):not(.btn--small):not(.btn--large)
351
+ mbi(.4)
352
+ &.btn--icon
353
+ flex-shrink 0
354
+ .icon
355
+ flex-shrink 0
356
+ &:hover
357
+ color $secondary
358
+ background-color $primary10
359
+ &.active
360
+ color $light
361
+ border-color $secondary
362
+ background-color $secondary
363
+ .icon
364
+ fill $light
365
+ &:hover
366
+ background-color $secondary
367
+ &:disabled
368
+ background-color $secondary60
369
+ border-color $secondary-medium15
370
+ color $light70
371
+ .icon
372
+ fill $light70
373
+ &:disabled:not(.active)
374
+ color $secondary30
375
+ cursor default
376
+ .icon
377
+ fill $secondary30
378
+ &:hover
379
+ border-color $inputBorderColor
380
+ color $secondary30
381
+ background-color transparent
382
+ .icon
383
+ fill $secondary30
384
+ &-container
385
+ flexMiddle()
386
+ .btn
387
+ &:first-child
388
+ border-radius $borderRadius 0 0 $borderRadius
389
+ border-width .1rem 0 .1rem .1rem
390
+ &:not(:first-child):not(:last-child)
391
+ border-width .1rem 0 .1rem .1rem
392
+ border-radius 0
393
+ &:last-child
394
+ border-radius 0 $borderRadius $borderRadius 0
395
+ border-width .1rem
396
+ &--light
397
+ .btn
398
+ &.active
399
+ border-color $inputBorderColor
400
+ background-color $primary20
401
+ color $secondary
402
+ &:hover
403
+ background-color $primary20
404
+ &--btn-tooltip
405
+ .tooltip
406
+ &:first-child
407
+ .btn
408
+ border-radius $borderRadius 0 0 $borderRadius
409
+ &:not(:first-child):not(:last-child)
410
+ .btn
411
+ border-width .1rem .1rem .1rem 0
412
+ border-radius 0
413
+ &:last-child
414
+ .btn
415
+ border-radius 0 $borderRadius $borderRadius 0
416
+ border-width .1rem .1rem .1rem 0
@@ -71,6 +71,14 @@ $favorite = #ffc200
71
71
 
72
72
  $modalBg = rgba(0, 11, 31, .85)
73
73
 
74
+ //new version of demos
75
+ $inputBgColor = #f6f7f8
76
+ $inputBorderColor = #bcc4d7
77
+ $inputPlaceholderColor = #818ca5
78
+
79
+ $activeColor = #7f98b3
80
+ $activeColorDark = #4c657e
81
+
74
82
  // Labels
75
83
  $labelBlue = #52a6e2
76
84
  $labelMauve = #7d74c7
@@ -1,56 +1,73 @@
1
- $demoResultHeaders = 6rem
2
- $demofilterWidth = 27.4rem
1
+
3
2
  .demo
4
3
  fullwh()
5
4
  margin 6rem auto
6
5
  .title
7
6
  font-size $title3
7
+ pre
8
+ code
9
+ font-size $fontSizeDemo - .1
8
10
  &__header
9
11
  fullw()
10
12
  position relative
11
13
  &__content
12
14
  fullw()
13
15
  br()
16
+ font-size $fontSizeDemo
14
17
  overflow hidden
15
18
  position relative
16
- box-shadow 0 0 3rem rgba($logo2, .15)
17
- color #fff
19
+ // box-shadow 0 0 3rem rgba($logo2, .15)
20
+ box-shadow 0 .3rem 1rem rgba($secondary, .15)
18
21
  &__showcase
19
22
  &__data
20
23
  display flex
21
24
  &__filters
22
- font-size 1.5rem
23
- font-weight 700
24
- padding 3.2rem 2.6rem
25
+ border-right .1rem solid rgba($secondary, .1)
26
+ padding $demoPadding + .4 $demoPadding
25
27
  width $demofilterWidth
26
- min-height 71rem
27
- background-color rgba($logo2, .82)
28
+ background-color $light// rgba($logo2, .82)
29
+ padding-bottom 2.6rem
30
+ mbib(1.6)
31
+ &__data
32
+ max-height 45rem
33
+ border-top .1rem solid rgba($secondary, .1)
34
+ &__showcase
35
+ min-height 50rem
36
+ max-height 71rem
28
37
  &__map
38
+ display flex
39
+ align-items center
40
+ justify-content center
29
41
  flex-grow 1
30
- background-color $logo2
42
+ background-color $light
43
+ .map
44
+ width 100%
45
+ height 100%
31
46
  &__results
32
- font-size 1.5rem
33
- font-weight 700
34
47
  width $demofilterWidth
35
48
  display flex
36
49
  flex-direction column
50
+ border-right .1rem solid rgba($secondary, .1)
51
+ flex-shrink 0
37
52
  &__header
38
53
  display flex
39
54
  align-items center
40
55
  flex-shrink 0
41
- padding 0 2.6rem
42
- height $demoResultHeaders
43
- background-color $logo2
56
+ font-size $fontSizeDemo - .1
57
+ padding 0 $demoPadding
58
+ height $footerDemoHeight
59
+ background-color $inputBgColor
60
+ font-weight 600
44
61
  &__content
45
62
  font-weight 400
46
63
  color $textColor
47
- padding 3.2rem 2.6rem
48
- min-height $demofilterWidth
49
- background-color #eff3ff
64
+ padding $demoPadding
65
+
66
+ background-color $light
67
+ overflow-y auto
50
68
  &__code
51
- flex-grow 1
52
- display flex
53
- flex-direction column
69
+ font()
70
+ width 100%
54
71
  &__header
55
72
  display flex
56
73
  align-items center
@@ -62,4 +79,165 @@ $demofilterWidth = 27.4rem
62
79
  padding 2.6rem
63
80
  background-color #fff
64
81
  height 100%
82
+
83
+ &__input-container
84
+ mbib(.6)
85
+ &__label
86
+ font-weight 500
87
+ margin-bottom .6rem
65
88
 
89
+ input
90
+ &:not([type=button]):not([type=checkbox]):not([type=radio]):not([type=textarea])
91
+ inputFont()
92
+ br($demoBr)
93
+ background-color $inputBgColor !important
94
+ border-color $inputBorderColor
95
+ font-size $inputFontSizeDemo
96
+ height $inputDemoHeight
97
+ padding 0 1rem 0 1rem
98
+ .mbi
99
+ mbi(.6)
100
+ .input
101
+ &__label
102
+ inputFont()
103
+ font-size $inputFontSizeDemo
104
+ .select
105
+ .asyncselect
106
+ inputFont()
107
+ font-size $inputFontSizeDemo
108
+ &__control
109
+ border-radius $demoBr !important
110
+ background-color $inputBgColor !important
111
+ min-height 2.4rem !important
112
+ height auto !important
113
+ &:not(.select__control--is-focused):not(.asyncselect__control--is-focused)
114
+ border-color $inputBorderColor !important
115
+ .css-g1d714-ValueContainer
116
+ .css-tlfecz-indicatorContainer
117
+ padding 0
118
+ .css-g1d714-ValueContainer
119
+ height 100%
120
+ .css-tlfecz-indicatorContainer
121
+ cursor pointer
122
+ &__input
123
+ input
124
+ height auto !important
125
+ &__placeholder
126
+ color $inputPlaceholderColor
127
+ &__dropdown-indicator
128
+ &__clear-indicator
129
+ padding 0
130
+ &__value-container
131
+ padding-left .6rem !important
132
+ &__indicator
133
+ padding-left .5rem !important
134
+ padding-right .5rem !important
135
+ svg
136
+ fill $activeColor
137
+ &__indicator-separator
138
+ background-color $activeColor
139
+ &__multi-value
140
+ background-color $activeColorDark !important
141
+ &__label
142
+ inputFont() !important
143
+ height 2.1rem
144
+ line-height 1.1rem
145
+ font-size $inputFontSizeDemo - .1 !important
146
+ &__remove
147
+ padding .2rem !important
148
+
149
+ .flag
150
+ width 1.6rem
151
+ height 1.1rem
152
+ &__option
153
+ padding .6rem
154
+ .flag
155
+ margin 0 .6rem 0 0
156
+ &__filters
157
+ .btn
158
+ br(.2)
159
+ font-size $inputFontSizeDemo
160
+ line-height 2.2rem
161
+ padding 0 .8rem
162
+ height $inputDemoHeight
163
+ inputFont()
164
+ border-color $inputBorderColor
165
+ .active
166
+ &--primary
167
+ background-color $activeColor
168
+ border-color $activeColor
169
+ &--group
170
+ height 2.8rem
171
+ &-container
172
+ color $inputBgColor
173
+ .btn
174
+ &:first-child
175
+ border-radius 2rem 0 0 2rem
176
+ &:last-child
177
+ border-radius 0 2rem 2rem 0
178
+ &--light
179
+ .btn.active
180
+ background-color $activeColorDark
181
+ border-color $activeColorDark
182
+ color $inputBgColor
183
+ &.language
184
+ &.transportation
185
+ mbi(.4)
186
+ .btn
187
+ br(.3)
188
+ border 0
189
+ height 1.9rem
190
+ padding .2rem
191
+ &.active
192
+ background-color $light
193
+ box-shadow 0 0 .1rem .1rem $activeColorDark
194
+ .flag
195
+ width 2.2rem
196
+ height 1.5rem
197
+ &.transportation
198
+ .btn
199
+ height 2.8rem
200
+ img
201
+ max-width 2.4rem
202
+ &__code
203
+ .tab
204
+ &__header
205
+ height $footerDemoHeight
206
+ background-color $inputBgColor
207
+ &__content
208
+ padding $demoPadding
209
+ overflow auto
210
+ max-height 40rem
211
+ .btn
212
+ font-size $fontSizeDemo
213
+ &--tab
214
+ position relative
215
+ font-size $fontSizeDemo - .1
216
+ color rgba($secondary, .4)
217
+ &.active
218
+ font-weight 600
219
+ color $secondary
220
+ &--action
221
+ br(2)
222
+ inputFont()
223
+ padding 0 1rem
224
+ font-size $inputFontSizeDemo
225
+ border .1rem solid $activeColor
226
+ color darken($activeColor, 20%)
227
+ @media screen and (max-width 769px)
228
+ .demo__showcase
229
+ max-height 100%
230
+ min-height auto
231
+ @media screen and (max-width 696px)
232
+ .demo
233
+ &__data
234
+ &__showcase
235
+ flex-direction column
236
+ max-height 100%
237
+ &__results
238
+ &__filters
239
+ width auto
240
+ border-bottom .1rem solid rgba($secondary, .1)
241
+ border-right 0
242
+ &__map
243
+ height 32rem
@@ -1 +1 @@
1
- @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;0,900;1,400;0,500;1,600;1,700;1,900&display=swap');
1
+ @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;0,900;1,400;0,500;1,600;1,700;1,900&family=Roboto+Mono&display=swap');
@@ -46,6 +46,8 @@ focus()
46
46
  trans()
47
47
  transition all .3s
48
48
 
49
+ inputFont()
50
+ font-family 'Roboto Mono', monospace
49
51
  btn()
50
52
  br()
51
53
  flexBtn()
@@ -8,6 +8,15 @@ $fontWeight = 400
8
8
  $fontSizeHeader = 1.3rem
9
9
  $fontSizeFooter = 1.6rem
10
10
 
11
+ //new version of demos
12
+ $demofilterWidth = 27.4rem
13
+ $fontSizeDemo = 1.3rem
14
+ $demoPadding = 1.6rem
15
+ $demoBr = .3rem
16
+ $inputFontSizeDemo = 1.1rem
17
+ $inputDemoHeight = 3rem
18
+ $footerDemoHeight = 4rem
19
+
11
20
 
12
21
  $title = 4.6rem
13
22
  $title2 = 4rem
@@ -21,5 +21,6 @@
21
21
  @import "../components/**/*.styl"
22
22
 
23
23
  // Additional style for UI components
24
+ @import "./next-website/MerchantDemo.styl"
24
25
  @import "./next-website/demo.styl"
25
26
  @import "./next-website/dropdown.styl"