@cashub/ui 0.19.14 → 0.20.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.
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Fix autocomplete style
3
+ */
4
+ input:-webkit-autofill,
5
+ input:-webkit-autofill:hover,
6
+ input:-webkit-autofill:focus,
7
+ textarea:-webkit-autofill,
8
+ textarea:-webkit-autofill:hover,
9
+ textarea:-webkit-autofill:focus,
10
+ select:-webkit-autofill,
11
+ select:-webkit-autofill:hover,
12
+ select:-webkit-autofill:focus {
13
+ transition: color 5000s ease-in-out 0s, background-color 5000s ease-in-out 0s;
14
+ box-shadow: 0 0 0px 100px var(--color-background2) inset;
15
+ -webkit-text-fill-color: var(--font-on-background);
16
+ }
@@ -0,0 +1,4 @@
1
+ @font-face {
2
+ font-family: 'Helvetica';
3
+ src: url('../font/helvetica/Helvetica.ttf');
4
+ }
@@ -0,0 +1,3 @@
1
+ @import './font.css';
2
+ @import './normalize.css';
3
+ @import './autocomplete.css';
@@ -0,0 +1,386 @@
1
+ /*! Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) */
2
+
3
+ /* Document */
4
+ *,
5
+ *::before,
6
+ *::after {
7
+ box-sizing: border-box;
8
+ }
9
+
10
+ /**
11
+ * 1. Correct the line height in all browsers.
12
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
13
+ */
14
+
15
+ html {
16
+ line-height: 1; /* 1 */
17
+ -webkit-text-size-adjust: 100%; /* 2 */
18
+ }
19
+
20
+ /* Sections */
21
+
22
+ /**
23
+ * Remove the margin in all browsers.
24
+ */
25
+
26
+ body {
27
+ margin: 0;
28
+ font-size: 16px;
29
+ font-family: Helvetica;
30
+ overflow-x: hidden;
31
+ }
32
+
33
+ /**
34
+ * Render the `main` element consistently in IE.
35
+ */
36
+
37
+ main {
38
+ display: block;
39
+ }
40
+
41
+ /**
42
+ * Correct the font size and margin on `h1` elements within `section` and
43
+ * `article` contexts in Chrome, Firefox, and Safari.
44
+ */
45
+
46
+ h1 {
47
+ font-size: 2em;
48
+ }
49
+
50
+ h1,
51
+ h2,
52
+ h3,
53
+ h4,
54
+ h5,
55
+ h6 {
56
+ margin: 0;
57
+ }
58
+
59
+ /* Grouping content */
60
+
61
+ /**
62
+ * 1. Add the correct box sizing in Firefox.
63
+ * 2. Show the overflow in Edge and IE.
64
+ */
65
+
66
+ hr {
67
+ box-sizing: content-box; /* 1 */
68
+ height: 0; /* 1 */
69
+ overflow: visible; /* 2 */
70
+ }
71
+
72
+ /**
73
+ * 1. Correct the inheritance and scaling of font size in all browsers.
74
+ * 2. Correct the odd `em` font sizing in all browsers.
75
+ */
76
+
77
+ pre {
78
+ font-family: Helvetica;
79
+ font-size: 1em; /* 2 */
80
+ }
81
+
82
+ /* Text-level semantics */
83
+
84
+ /**
85
+ * Remove the gray background on active links in IE 10.
86
+ */
87
+
88
+ a {
89
+ background-color: transparent;
90
+ text-decoration: none;
91
+ }
92
+
93
+ /**
94
+ * 1. Remove the bottom border in Chrome 57-
95
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
96
+ */
97
+
98
+ abbr[title] {
99
+ border-bottom: none; /* 1 */
100
+ text-decoration: underline; /* 2 */
101
+ text-decoration: underline dotted; /* 2 */
102
+ }
103
+
104
+ /**
105
+ * Add the correct font weight in Chrome, Edge, and Safari.
106
+ */
107
+
108
+ b,
109
+ strong {
110
+ font-weight: bolder;
111
+ }
112
+
113
+ /**
114
+ * 1. Correct the inheritance and scaling of font size in all browsers.
115
+ * 2. Correct the odd `em` font sizing in all browsers.
116
+ */
117
+
118
+ code,
119
+ kbd,
120
+ samp {
121
+ font-family: Helvetica;
122
+ font-size: 1em; /* 2 */
123
+ }
124
+
125
+ /**
126
+ * Add the correct font size in all browsers.
127
+ */
128
+
129
+ small {
130
+ font-size: 80%;
131
+ }
132
+
133
+ /**
134
+ * Prevent `sub` and `sup` elements from affecting the line height in
135
+ * all browsers.
136
+ */
137
+
138
+ sub,
139
+ sup {
140
+ font-size: 75%;
141
+ line-height: 0;
142
+ position: relative;
143
+ vertical-align: baseline;
144
+ }
145
+
146
+ sub {
147
+ bottom: -0.25em;
148
+ }
149
+
150
+ sup {
151
+ top: -0.5em;
152
+ }
153
+
154
+ /* Embedded content */
155
+
156
+ /**
157
+ * Remove the border on images inside links in IE 10.
158
+ */
159
+
160
+ img {
161
+ border-style: none;
162
+ }
163
+
164
+ /* Forms */
165
+
166
+ /**
167
+ * 1. Change the font styles in all browsers.
168
+ * 2. Remove the margin in Firefox and Safari.
169
+ */
170
+
171
+ button,
172
+ input,
173
+ optgroup,
174
+ select,
175
+ textarea {
176
+ font-family: Helvetica;
177
+ font-size: 100%; /* 1 */
178
+ line-height: 1; /* 1 */
179
+ margin: 0; /* 2 */
180
+ }
181
+
182
+ /**
183
+ * Show the overflow in IE.
184
+ * 1. Show the overflow in Edge.
185
+ */
186
+
187
+ button,
188
+ input {
189
+ /* 1 */
190
+ overflow: visible;
191
+ }
192
+
193
+ /**
194
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
195
+ * 1. Remove the inheritance of text transform in Firefox.
196
+ */
197
+
198
+ button,
199
+ select {
200
+ /* 1 */
201
+ text-transform: none;
202
+ }
203
+
204
+ /**
205
+ * Correct the inability to style clickable types in iOS and Safari.
206
+ */
207
+
208
+ button,
209
+ [type='button'],
210
+ [type='reset'],
211
+ [type='submit'] {
212
+ -webkit-appearance: button;
213
+ }
214
+
215
+ /**
216
+ * Remove the inner border and padding in Firefox.
217
+ */
218
+
219
+ button::-moz-focus-inner,
220
+ [type='button']::-moz-focus-inner,
221
+ [type='reset']::-moz-focus-inner,
222
+ [type='submit']::-moz-focus-inner {
223
+ border-style: none;
224
+ padding: 0;
225
+ }
226
+
227
+ /**
228
+ * Restore the focus styles unset by the previous rule.
229
+ */
230
+
231
+ button:-moz-focusring,
232
+ [type='button']:-moz-focusring,
233
+ [type='reset']:-moz-focusring,
234
+ [type='submit']:-moz-focusring {
235
+ outline: 1px dotted ButtonText;
236
+ }
237
+
238
+ /**
239
+ * Correct the padding in Firefox.
240
+ */
241
+
242
+ fieldset {
243
+ padding: 0.35em 0.75em 0.625em;
244
+ }
245
+
246
+ /**
247
+ * 1. Correct the text wrapping in Edge and IE.
248
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
249
+ * 3. Remove the padding so developers are not caught out when they zero out
250
+ * `fieldset` elements in all browsers.
251
+ */
252
+
253
+ legend {
254
+ box-sizing: border-box; /* 1 */
255
+ color: inherit; /* 2 */
256
+ display: table; /* 1 */
257
+ max-width: 100%; /* 1 */
258
+ padding: 0; /* 3 */
259
+ white-space: normal; /* 1 */
260
+ }
261
+
262
+ /**
263
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
264
+ */
265
+
266
+ progress {
267
+ vertical-align: baseline;
268
+ }
269
+
270
+ /**
271
+ * Remove the default vertical scrollbar in IE 10+.
272
+ */
273
+
274
+ textarea {
275
+ overflow: auto;
276
+ }
277
+
278
+ /**
279
+ * 1. Add the correct box sizing in IE 10.
280
+ * 2. Remove the padding in IE 10.
281
+ */
282
+
283
+ [type='checkbox'],
284
+ [type='radio'] {
285
+ box-sizing: border-box; /* 1 */
286
+ padding: 0; /* 2 */
287
+ }
288
+
289
+ /**
290
+ * Correct the cursor style of increment and decrement buttons in Chrome.
291
+ */
292
+
293
+ [type='number']::-webkit-inner-spin-button,
294
+ [type='number']::-webkit-outer-spin-button {
295
+ height: auto;
296
+ }
297
+
298
+ /**
299
+ * 1. Correct the odd appearance in Chrome and Safari.
300
+ * 2. Correct the outline style in Safari.
301
+ */
302
+
303
+ [type='search'] {
304
+ -webkit-appearance: textfield; /* 1 */
305
+ outline-offset: -2px; /* 2 */
306
+ }
307
+
308
+ /**
309
+ * Remove the inner padding in Chrome and Safari on macOS.
310
+ */
311
+
312
+ [type='search']::-webkit-search-decoration {
313
+ -webkit-appearance: none;
314
+ }
315
+
316
+ /**
317
+ * 1. Correct the inability to style clickable types in iOS and Safari.
318
+ * 2. Change font properties to `inherit` in Safari.
319
+ */
320
+
321
+ ::-webkit-file-upload-button {
322
+ -webkit-appearance: button; /* 1 */
323
+ font: inherit; /* 2 */
324
+ }
325
+
326
+ /* Interactive */
327
+
328
+ /*
329
+ * Add the correct display in Edge, IE 10+, and Firefox.
330
+ */
331
+
332
+ details {
333
+ display: block;
334
+ }
335
+
336
+ /*
337
+ * Add the correct display in all browsers.
338
+ */
339
+
340
+ summary {
341
+ display: list-item;
342
+ }
343
+
344
+ /* Misc */
345
+
346
+ /**
347
+ * Add the correct display in IE 10+.
348
+ */
349
+
350
+ template {
351
+ display: none;
352
+ }
353
+
354
+ /**
355
+ * Add the correct display in IE 10.
356
+ */
357
+
358
+ [hidden] {
359
+ display: none;
360
+ }
361
+
362
+ /* Custom reset */
363
+
364
+ ul {
365
+ padding: 0;
366
+ margin: 0;
367
+ }
368
+
369
+ li {
370
+ list-style: none;
371
+ }
372
+
373
+ figure {
374
+ margin: 0;
375
+ }
376
+
377
+ p,
378
+ h3 {
379
+ margin: 0;
380
+ }
381
+
382
+ dl,
383
+ dt,
384
+ dd {
385
+ margin: 0;
386
+ }
package/index.js CHANGED
@@ -470,6 +470,20 @@ Object.keys(_select).forEach(function (key) {
470
470
  });
471
471
  });
472
472
 
473
+ var _styles = require("./styles");
474
+
475
+ Object.keys(_styles).forEach(function (key) {
476
+ if (key === "default" || key === "__esModule") return;
477
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
478
+ if (key in exports && exports[key] === _styles[key]) return;
479
+ Object.defineProperty(exports, key, {
480
+ enumerable: true,
481
+ get: function get() {
482
+ return _styles[key];
483
+ }
484
+ });
485
+ });
486
+
473
487
  var _table = require("./table");
474
488
 
475
489
  Object.keys(_table).forEach(function (key) {
package/map/GoogleMap.js CHANGED
@@ -291,7 +291,6 @@ var Map = function Map(_ref2) {
291
291
  lat: latitude,
292
292
  lng: longitude
293
293
  };
294
- map.panTo(coordinate);
295
294
  popup.setMap(map);
296
295
  popup.setPosition(coordinate);
297
296
  popup.setContent((0, _server.renderToString)(customPopup(location)));
@@ -58,6 +58,8 @@ var GoogleMapPopup = /*#__PURE__*/_createClass(function GoogleMapPopup(options)
58
58
 
59
59
  _defineProperty(_assertThisInitialized(_this), "offset", 16);
60
60
 
61
+ _defineProperty(_assertThisInitialized(_this), "justRendered", false);
62
+
61
63
  _this.containerDiv = document.createElement('div');
62
64
 
63
65
  _this.containerDiv.classList.add('google-popup-content-wrapper');
@@ -81,6 +83,7 @@ var GoogleMapPopup = /*#__PURE__*/_createClass(function GoogleMapPopup(options)
81
83
  key: "onAdd",
82
84
  value: function onAdd() {
83
85
  this.getPanes().floatPane.appendChild(this.containerDiv);
86
+ this.justRendered = true;
84
87
  }
85
88
  /** Called when the popup is removed from the map. */
86
89
 
@@ -89,6 +92,7 @@ var GoogleMapPopup = /*#__PURE__*/_createClass(function GoogleMapPopup(options)
89
92
  value: function onRemove() {
90
93
  if (this.containerDiv.parentElement) {
91
94
  this.containerDiv.parentElement.removeChild(this.containerDiv);
95
+ this.justRendered = false;
92
96
  }
93
97
  }
94
98
  /** Called each frame when the popup needs to draw itself. */
@@ -97,7 +101,13 @@ var GoogleMapPopup = /*#__PURE__*/_createClass(function GoogleMapPopup(options)
97
101
  key: "draw",
98
102
  value: function draw() {
99
103
  if (this.position) {
100
- var divPosition = this.getProjection().fromLatLngToDivPixel(this.position);
104
+ var divPosition = this.getProjection().fromLatLngToDivPixel(this.position); // On the first render, if we go beyond the map, pan the map
105
+
106
+ if (this.justRendered) {
107
+ this.fitMap();
108
+ this.justRendered = false;
109
+ }
110
+
101
111
  this.containerDiv.style.left = "".concat(divPosition.x, "px");
102
112
  this.containerDiv.style.top = "".concat(divPosition.y - this.offset, "px");
103
113
  }
@@ -118,6 +128,35 @@ var GoogleMapPopup = /*#__PURE__*/_createClass(function GoogleMapPopup(options)
118
128
  this.containerDiv.innerHTML = content;
119
129
  }
120
130
  }
131
+ }, {
132
+ key: "fitMap",
133
+ value: function fitMap() {
134
+ var projection = this.getProjection();
135
+ var _this$containerDiv = this.containerDiv,
136
+ offsetWidth = _this$containerDiv.offsetWidth,
137
+ offsetHeight = _this$containerDiv.offsetHeight;
138
+ var halfWidth = offsetWidth / 2;
139
+ var _this$containerDiv2 = this.containerDiv,
140
+ offsetTop = _this$containerDiv2.offsetTop,
141
+ offsetLeft = _this$containerDiv2.offsetLeft; // Calculate the coordinates of the four corners of the container
142
+ // because container use transform for position(-50%, -100%), so we need to subtract them
143
+
144
+ var topLeft = new window.google.maps.Point(offsetLeft - halfWidth, offsetTop - offsetHeight);
145
+ var topRight = new window.google.maps.Point(offsetLeft + offsetWidth - halfWidth, offsetTop - offsetHeight);
146
+ var bottomLeft = new window.google.maps.Point(offsetLeft - halfWidth, offsetTop + offsetHeight - offsetHeight);
147
+ var bottomRight = new window.google.maps.Point(offsetLeft + offsetWidth - halfWidth, offsetTop + offsetHeight - offsetHeight);
148
+ var northWest = projection.fromDivPixelToLatLng(topLeft);
149
+ var northEast = projection.fromDivPixelToLatLng(topRight);
150
+ var southWest = projection.fromDivPixelToLatLng(bottomLeft);
151
+ var southEast = projection.fromDivPixelToLatLng(bottomRight);
152
+ var popupBound = new window.google.maps.LatLngBounds();
153
+ popupBound.extend(northWest);
154
+ popupBound.extend(northEast);
155
+ popupBound.extend(southWest);
156
+ popupBound.extend(southEast);
157
+ popupBound.extend(this.position);
158
+ this.map.fitBounds(popupBound);
159
+ }
121
160
  }]);
122
161
 
123
162
  return MapPopup;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cashub/ui",
3
- "version": "0.19.14",
3
+ "version": "0.20.0",
4
4
  "private": false,
5
5
  "author": "CASHUB Team",
6
6
  "description": "CASHUB UI components library",
@@ -9,7 +9,7 @@ exports.default = void 0;
9
9
 
10
10
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
11
 
12
- var _header = _interopRequireDefault(require("../styles/header.style"));
12
+ var _header = _interopRequireDefault(require("../styles/config/header.style"));
13
13
 
14
14
  var _templateObject, _templateObject2;
15
15
 
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _styledComponents = require("styled-components");
9
+
10
+ require("../assets/css/global.css");
11
+
12
+ var _templateObject;
13
+
14
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
15
+
16
+ var GlobalStyle = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n body {\n --color-white: ", ";\n --color-dark: ", ";\n --color-grey: ", ";\n --color-primary: ", ";\n --color-success: ", ";\n --color-warning: ", ";\n --color-danger: ", ";\n --color-hover: ", ";\n --color-active: ", ";\n --color-scroll-bar: ", ";\n --color-background1: ", ";\n --color-background2: ", ";\n --color-background3: ", ";\n --color-backdrop: ", ";\n\n --font-h1: ", ";\n --font-h2: ", ";\n --font-h3: ", ";\n --font-body1: ", ";\n --font-body2: ", ";\n --font-button: ", ";\n --font-caption: ", ";\n --font-family: ", ";\n --font-normal: ", ";\n --font-bold: ", ";\n --font-on-primary: ", ";\n --font-on-success: ", ";\n --font-on-warning: ", ";\n --font-on-danger: ", ";\n --font-on-background: ", ";\n --font-on-mute: ", ";\n\n --box-shadow: ", ";\n --border-color: ", ";\n --border-width: ", ";\n --border-radius-s: ", ";\n --border-radius: ", ";\n --border-radius-l: ", ";\n --border-radius-round: ", ";\n\n --spacing-xs: ", ";\n --spacing-s: ", ";\n --spacing: ", ";\n --spacing-l: ", ";\n\n background : ", ";\n }\n"])), function (_ref) {
17
+ var theme = _ref.theme;
18
+ return theme.colorWhite;
19
+ }, function (_ref2) {
20
+ var theme = _ref2.theme;
21
+ return theme.colorDark;
22
+ }, function (_ref3) {
23
+ var theme = _ref3.theme;
24
+ return theme.colorGrey;
25
+ }, function (_ref4) {
26
+ var theme = _ref4.theme;
27
+ return theme.colorPrimary;
28
+ }, function (_ref5) {
29
+ var theme = _ref5.theme;
30
+ return theme.colorSuccess;
31
+ }, function (_ref6) {
32
+ var theme = _ref6.theme;
33
+ return theme.colorWarning;
34
+ }, function (_ref7) {
35
+ var theme = _ref7.theme;
36
+ return theme.colorDanger;
37
+ }, function (_ref8) {
38
+ var theme = _ref8.theme;
39
+ return theme.colorHover;
40
+ }, function (_ref9) {
41
+ var theme = _ref9.theme;
42
+ return theme.colorActive;
43
+ }, function (_ref10) {
44
+ var theme = _ref10.theme;
45
+ return theme.scrollBarColor;
46
+ }, function (_ref11) {
47
+ var theme = _ref11.theme;
48
+ return theme.bgColor1;
49
+ }, function (_ref12) {
50
+ var theme = _ref12.theme;
51
+ return theme.bgColor2;
52
+ }, function (_ref13) {
53
+ var theme = _ref13.theme;
54
+ return theme.bgColor3;
55
+ }, function (_ref14) {
56
+ var theme = _ref14.theme;
57
+ return theme.backdropBg;
58
+ }, function (_ref15) {
59
+ var theme = _ref15.theme;
60
+ return theme.fontH1;
61
+ }, function (_ref16) {
62
+ var theme = _ref16.theme;
63
+ return theme.fontH2;
64
+ }, function (_ref17) {
65
+ var theme = _ref17.theme;
66
+ return theme.fontH3;
67
+ }, function (_ref18) {
68
+ var theme = _ref18.theme;
69
+ return theme.fontBody1;
70
+ }, function (_ref19) {
71
+ var theme = _ref19.theme;
72
+ return theme.fontBody2;
73
+ }, function (_ref20) {
74
+ var theme = _ref20.theme;
75
+ return theme.fontButton;
76
+ }, function (_ref21) {
77
+ var theme = _ref21.theme;
78
+ return theme.fontCaption;
79
+ }, function (_ref22) {
80
+ var theme = _ref22.theme;
81
+ return theme.fontFamily;
82
+ }, function (_ref23) {
83
+ var theme = _ref23.theme;
84
+ return theme.fontWeightNormal;
85
+ }, function (_ref24) {
86
+ var theme = _ref24.theme;
87
+ return theme.fontWeightBold;
88
+ }, function (_ref25) {
89
+ var theme = _ref25.theme;
90
+ return theme.fontOnPrimary;
91
+ }, function (_ref26) {
92
+ var theme = _ref26.theme;
93
+ return theme.fontOnSuccess;
94
+ }, function (_ref27) {
95
+ var theme = _ref27.theme;
96
+ return theme.fontOnWarning;
97
+ }, function (_ref28) {
98
+ var theme = _ref28.theme;
99
+ return theme.fontOnDanger;
100
+ }, function (_ref29) {
101
+ var theme = _ref29.theme;
102
+ return theme.fontOnBg;
103
+ }, function (_ref30) {
104
+ var theme = _ref30.theme;
105
+ return theme.fontMutedColor;
106
+ }, function (_ref31) {
107
+ var theme = _ref31.theme;
108
+ return theme.boxShadow;
109
+ }, function (_ref32) {
110
+ var theme = _ref32.theme;
111
+ return theme.borderColor;
112
+ }, function (_ref33) {
113
+ var theme = _ref33.theme;
114
+ return theme.borderWidth;
115
+ }, function (_ref34) {
116
+ var theme = _ref34.theme;
117
+ return theme.borderRadiusS;
118
+ }, function (_ref35) {
119
+ var theme = _ref35.theme;
120
+ return theme.borderRadius;
121
+ }, function (_ref36) {
122
+ var theme = _ref36.theme;
123
+ return theme.borderRadiusL;
124
+ }, function (_ref37) {
125
+ var theme = _ref37.theme;
126
+ return theme.borderRadiusRound;
127
+ }, function (_ref38) {
128
+ var theme = _ref38.theme;
129
+ return theme.spacerXS;
130
+ }, function (_ref39) {
131
+ var theme = _ref39.theme;
132
+ return theme.spacerS;
133
+ }, function (_ref40) {
134
+ var theme = _ref40.theme;
135
+ return theme.spacer;
136
+ }, function (_ref41) {
137
+ var theme = _ref41.theme;
138
+ return theme.spacerL;
139
+ }, function (_ref42) {
140
+ var theme = _ref42.theme;
141
+ return theme.bgColor1;
142
+ });
143
+ var _default = GlobalStyle;
144
+ exports.default = _default;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "GlobalStyle", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _GlobalStyle.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "themes", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _themes.default;
16
+ }
17
+ });
18
+
19
+ var _GlobalStyle = _interopRequireDefault(require("./GlobalStyle"));
20
+
21
+ var _themes = _interopRequireDefault(require("./themes"));
22
+
23
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -7,7 +7,7 @@ exports.default = void 0;
7
7
 
8
8
  var _styledComponents = require("styled-components");
9
9
 
10
- var _breakpoint = _interopRequireDefault(require("../breakpoint.style"));
10
+ var _breakpoint = _interopRequireDefault(require("../config/breakpoint.style"));
11
11
 
12
12
  var _templateObject;
13
13
 
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _white = _interopRequireDefault(require("./white.theme"));
8
+ var _white = _interopRequireDefault(require("./theme/white.theme"));
9
9
 
10
- var _light = _interopRequireDefault(require("./light.theme"));
10
+ var _light = _interopRequireDefault(require("./theme/light.theme"));
11
11
 
12
- var _dark = _interopRequireDefault(require("./dark.theme"));
12
+ var _dark = _interopRequireDefault(require("./theme/dark.theme"));
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
- var _BaseBackdrop = _interopRequireDefault(require("../backdrop/BaseBackdrop"));
11
-
12
- var _media = _interopRequireDefault(require("../styles/mixin/media"));
13
-
14
- var _templateObject, _templateObject2;
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
19
-
20
- var Backdrop = (0, _styledComponents.default)(_BaseBackdrop.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n visibility: hidden;\n\n ", "\n"])), _media.default.tablet(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n visibility: ", ";\n "])), function (_ref) {
21
- var $display = _ref.$display;
22
- return $display === true ? 'visible' : 'hidden';
23
- }));
24
- var _default = Backdrop;
25
- exports.default = _default;
@@ -1,34 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
-
12
- var _header = _interopRequireDefault(require("../styles/header.style"));
13
-
14
- var _sidebar = _interopRequireDefault(require("../styles/sidebar.style"));
15
-
16
- var _media = _interopRequireDefault(require("../styles/mixin/media"));
17
-
18
- var _templateObject, _templateObject2, _templateObject3;
19
-
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
22
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
-
24
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
-
26
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
27
-
28
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n transition: 0.3s;\n width: calc(100% - ", ");\n margin-left: ", ";\n padding: calc(", " + var(--spacing)) var(--spacing)\n var(--spacing);\n\n ", "\n\n ", "\n"])), _sidebar.default.close.width, _sidebar.default.close.width, _header.default.height, function (_ref) {
29
- var $display = _ref.$display;
30
- return $display === true && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: calc(100% - ", ");\n margin-left: ", ";\n "])), _sidebar.default.open.width, _sidebar.default.open.width);
31
- }, _media.default.tablet(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n margin-left: 0;\n "]))));
32
-
33
- var _default = Container;
34
- exports.default = _default;
package/layout/Footer.js DELETED
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
-
12
- var _sidebar = _interopRequireDefault(require("../styles/sidebar.style"));
13
-
14
- var _media = _interopRequireDefault(require("../styles/mixin/media"));
15
-
16
- var _templateObject, _templateObject2, _templateObject3;
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
-
22
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
-
24
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
25
-
26
- var Footer = _styledComponents.default.footer(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n transition: 0.3s;\n border-top: var(--border-width) solid var(--border-color);\n color: var(--font-on-mute);\n height: 64px;\n line-height: 64px;\n font-size: var(--font-body2);\n padding: 0 var(--spacing);\n margin: 0 var(--spacing) 0 calc(var(--spacing) + ", ");\n\n ", "\n\n ", "\n"])), _sidebar.default.close.width, function (_ref) {
27
- var $display = _ref.$display;
28
- return $display && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 0 var(--spacing) 0\n calc(var(--spacing) + ", ");\n "])), _sidebar.default.open.width);
29
- }, _media.default.tablet(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin:0 ;\n "]))));
30
-
31
- var _default = Footer;
32
- exports.default = _default;
package/layout/Logo.js DELETED
@@ -1,34 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
- var _ImageFluid = _interopRequireDefault(require("../image/ImageFluid"));
11
-
12
- var _logoCashub = _interopRequireDefault(require("../assets/images/logo-cashub.png"));
13
-
14
- var _jsxRuntime = require("react/jsx-runtime");
15
-
16
- var _templateObject;
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
21
-
22
- var Logo = function Logo() {
23
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Figure, {
24
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageFluid.default, {
25
- src: _logoCashub.default,
26
- alt: "Cashub logo"
27
- })
28
- });
29
- };
30
-
31
- var Figure = _styledComponents.default.figure(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n max-width: 220px;\n height: 40px;\n"])));
32
-
33
- var _default = Logo;
34
- exports.default = _default;
@@ -1,43 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
- var _IconButton = _interopRequireDefault(require("../button/IconButton"));
11
-
12
- var _IconFigure = _interopRequireDefault(require("../figure/IconFigure"));
13
-
14
- var _ImageFluid = _interopRequireDefault(require("../image/ImageFluid"));
15
-
16
- var _burger = _interopRequireDefault(require("../assets/icons/burger.png"));
17
-
18
- var _jsxRuntime = require("react/jsx-runtime");
19
-
20
- var _templateObject;
21
-
22
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
-
24
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
25
-
26
- var MenuIcon = function MenuIcon(_ref) {
27
- var toggleSidebar = _ref.toggleSidebar;
28
- console.log('toggleSidebar', toggleSidebar);
29
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapper, {
30
- onClick: toggleSidebar,
31
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconFigure.default, {
32
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageFluid.default, {
33
- crossOrigin: "anonymous",
34
- src: _burger.default,
35
- alt: "Sidebar toggler"
36
- })
37
- })
38
- });
39
- };
40
-
41
- var Wrapper = (0, _styledComponents.default)(_IconButton.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin: 0;\n margin-right: calc(var(--spacing) - 0.5rem);\n"])));
42
- var _default = MenuIcon;
43
- exports.default = _default;