@rypen-dev/shared-components 4.2.13 → 5.0.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/dist/index.js +1 -1
- package/package.json +12 -12
- package/scss/_variables.scss +1 -1
- package/scss/partials/_buttons.scss +35 -4
- package/scss/partials/_flyovers.scss +98 -0
- package/scss/partials/_typography.scss +1 -1
- package/scss/styles.scss +1 -0
- package/src/components/ModalWrapper.vue +15 -7
- package/src/components/ProductImageSelector.vue +4 -2
- package/src/components/icons/IconApprove.vue +4 -6
- package/src/components/icons/IconBase.vue +11 -5
- package/src/components/icons/IconCaret.vue +1 -3
- package/src/components/icons/IconClose.vue +4 -6
- package/src/components/icons/IconQrCode.vue +539 -541
- package/src/components/icons/IconSave.vue +12 -14
- package/src/components/icons/IconShare.vue +12 -14
- package/src/index.js +0 -3
- package/webpack.config.js +5 -5
- package/src/components/icons/IconSetup.vue +0 -33
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rypen-dev/shared-components",
|
|
3
3
|
"description": "Shared styles and Vuejs ui components for Rypen projects.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "5.0.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "webpack --config ./webpack.config.js",
|
|
8
8
|
"prepare": "webpack --config ./webpack.config.js"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@fortawesome/fontawesome-free": "6.
|
|
11
|
+
"@fortawesome/fontawesome-free": "6.5.2",
|
|
12
12
|
"@rypen-dev/helpers": "1.0.24",
|
|
13
13
|
"foundation-sites": "6.8.1",
|
|
14
14
|
"moment": "2.29.4"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@babel/cli": "7.
|
|
18
|
-
"@babel/core": "7.
|
|
19
|
-
"@babel/preset-env": "7.
|
|
20
|
-
"babel-loader": "
|
|
17
|
+
"@babel/cli": "7.2.3",
|
|
18
|
+
"@babel/core": "7.2.2",
|
|
19
|
+
"@babel/preset-env": "7.2.3",
|
|
20
|
+
"babel-loader": "8.0.5",
|
|
21
21
|
"babel-preset-vue": "2.0.2",
|
|
22
|
-
"url-loader": "
|
|
23
|
-
"vue-loader": "
|
|
24
|
-
"vue-template-compiler": "2.7.
|
|
25
|
-
"webpack": "
|
|
26
|
-
"webpack-cli": "
|
|
27
|
-
"vue": "
|
|
22
|
+
"url-loader": "1.1.2",
|
|
23
|
+
"vue-loader": "15.4.1",
|
|
24
|
+
"vue-template-compiler": "2.7.10",
|
|
25
|
+
"webpack": "4.46.0",
|
|
26
|
+
"webpack-cli": "3.3.12",
|
|
27
|
+
"vue": "2.7.10"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"/src",
|
package/scss/_variables.scss
CHANGED
|
@@ -59,7 +59,7 @@ $headline-accent-color: $tertiary-alt !default;
|
|
|
59
59
|
$headline-accent-color-alt: $warning !default;
|
|
60
60
|
$headline-accent-color-reversed: $white !default;
|
|
61
61
|
$headline-divider-border-color: $medium-gray !default;
|
|
62
|
-
$headline-small-color: $
|
|
62
|
+
$headline-small-color: $text-gray !default;
|
|
63
63
|
|
|
64
64
|
$navigation-link-color: $primary !default;
|
|
65
65
|
$navigation-link-highlight: $warning !default;
|
|
@@ -308,6 +308,22 @@ a.info {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
+
&.small {
|
|
312
|
+
font-size: 0.875rem;
|
|
313
|
+
letter-spacing: 1.5px;
|
|
314
|
+
|
|
315
|
+
&::before {
|
|
316
|
+
border-bottom-width: 1px;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
&::after {
|
|
320
|
+
border-top-width: 1px;
|
|
321
|
+
border-right-width: 1px;
|
|
322
|
+
width: 9px;
|
|
323
|
+
height: 9px;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
311
327
|
&.color-text-gray {
|
|
312
328
|
&::before {
|
|
313
329
|
border-bottom-color: $text-gray;
|
|
@@ -361,17 +377,26 @@ a.info {
|
|
|
361
377
|
}
|
|
362
378
|
}
|
|
363
379
|
|
|
364
|
-
&.
|
|
365
|
-
|
|
366
|
-
padding-right: 20px;
|
|
380
|
+
&.no-tail {
|
|
381
|
+
padding-right: 20px;
|
|
367
382
|
|
|
368
383
|
&::before {
|
|
369
384
|
display: none;
|
|
370
385
|
}
|
|
371
386
|
|
|
372
|
-
|
|
387
|
+
&.reversed {
|
|
388
|
+
padding-right: 0;
|
|
389
|
+
padding-left: 20px;
|
|
373
390
|
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
&.small-no-tail {
|
|
394
|
+
@media screen and (max-width: map-get($breakpoints, medium) - 1px) {
|
|
395
|
+
padding-right: 20px;
|
|
374
396
|
|
|
397
|
+
&::before {
|
|
398
|
+
display: none;
|
|
399
|
+
}
|
|
375
400
|
&.reversed {
|
|
376
401
|
padding-right: 0;
|
|
377
402
|
padding-left: 20px;
|
|
@@ -414,6 +439,12 @@ a.info {
|
|
|
414
439
|
padding-left: $short-arrow-width + 10px;
|
|
415
440
|
}
|
|
416
441
|
|
|
442
|
+
&.small {
|
|
443
|
+
&::after {
|
|
444
|
+
border-left-width: 1px;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
417
448
|
&.color-text-gray {
|
|
418
449
|
&::after {
|
|
419
450
|
border-left-color: $text-gray;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/// <reference path="../variables" />
|
|
2
|
+
/// <reference path="../vendor/foundation-settings" />
|
|
3
|
+
|
|
4
|
+
@media (min-width: map-get($breakpoints, medium)) {
|
|
5
|
+
body.flyover-open {
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* FLYOVER TRANSITION */
|
|
11
|
+
.flyover-screen {
|
|
12
|
+
position: fixed;
|
|
13
|
+
top: 0;
|
|
14
|
+
left: 0;
|
|
15
|
+
right: 0;
|
|
16
|
+
bottom: 0;
|
|
17
|
+
z-index: 100;
|
|
18
|
+
transition: opacity 350ms ease-out;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.flyover {
|
|
22
|
+
position: fixed;
|
|
23
|
+
right: 0;
|
|
24
|
+
top: 0;
|
|
25
|
+
height: 100vh;
|
|
26
|
+
width: 100vw;
|
|
27
|
+
background-color: $body-bg-color;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
transition: right 350ms ease-out;
|
|
30
|
+
|
|
31
|
+
@include modal-shadow;
|
|
32
|
+
|
|
33
|
+
header {
|
|
34
|
+
flex-grow: 0;
|
|
35
|
+
margin-bottom: 20px;
|
|
36
|
+
|
|
37
|
+
label {
|
|
38
|
+
margin-bottom: 0;
|
|
39
|
+
|
|
40
|
+
small {
|
|
41
|
+
text-transform: none;
|
|
42
|
+
letter-spacing: 0;
|
|
43
|
+
color: $text-gray;
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.body {
|
|
50
|
+
padding: 20px 20px 0;
|
|
51
|
+
height: 100%;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
|
|
56
|
+
&.scrollable-content {
|
|
57
|
+
.scrollable {
|
|
58
|
+
flex-grow: 1;
|
|
59
|
+
overflow-y: auto;
|
|
60
|
+
margin-right: -20px;
|
|
61
|
+
padding-right: 20px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@media print, screen and (min-width: map-get($breakpoints, large)) {
|
|
67
|
+
width: 50vw;
|
|
68
|
+
|
|
69
|
+
.body.restricted {
|
|
70
|
+
max-width: #{$true-max-width * 0.5};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* FLYOVER TRANSITION */
|
|
76
|
+
.flyover-enter .flyover {
|
|
77
|
+
right: -100vw !important;
|
|
78
|
+
|
|
79
|
+
@media (min-width: map-get($breakpoints, large)) {
|
|
80
|
+
right: -50vw !important;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.flyover-leave-to .flyover {
|
|
85
|
+
right: -100vw !important;
|
|
86
|
+
|
|
87
|
+
@media (min-width: map-get($breakpoints, large)) {
|
|
88
|
+
right: -50vw !important;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.flyover-leave-active {
|
|
93
|
+
transition: opacity 250ms;
|
|
94
|
+
|
|
95
|
+
.flyover {
|
|
96
|
+
transition: right 250ms;
|
|
97
|
+
}
|
|
98
|
+
}
|
package/scss/styles.scss
CHANGED
|
@@ -2,17 +2,20 @@
|
|
|
2
2
|
<transition name="modal">
|
|
3
3
|
<div class="modal-mask hide-for-print" :class="maskCssClass" @click="closeIfCloseable">
|
|
4
4
|
<div class="modal-container" :class="cssClass">
|
|
5
|
-
<a v-if="closeable" class="close" @click="$emit('close')"><
|
|
5
|
+
<a v-if="closeable" class="close" @click="$emit('close')"><icon-base icon-name="close" width="24" height="24" viewBox="0 0 24 24"><icon-close /></icon-base></a>
|
|
6
6
|
<div class="modal-wrapper">
|
|
7
|
-
<div class="modal-grid">
|
|
7
|
+
<div class="modal-grid" :class="{ 'with-footer': hasFooter }">
|
|
8
8
|
<div class="scrollable-content">
|
|
9
9
|
<div class="modal-header">
|
|
10
10
|
<h3 v-if="header || subheader">{{ header }} <small v-if="subheader">{{ subheader }}</small></h3>
|
|
11
11
|
</div>
|
|
12
12
|
<div class="modal-body">
|
|
13
|
-
<
|
|
13
|
+
<slot name="body"></slot>
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
16
|
+
<div class="modal-footer" v-if="hasFooter">
|
|
17
|
+
<slot name="footer"></slot>
|
|
18
|
+
</div>
|
|
16
19
|
</div>
|
|
17
20
|
</div>
|
|
18
21
|
</div>
|
|
@@ -21,8 +24,8 @@
|
|
|
21
24
|
</template>
|
|
22
25
|
|
|
23
26
|
<script>
|
|
24
|
-
import
|
|
25
|
-
import
|
|
27
|
+
import IconBase from "./icons/IconBase.vue";
|
|
28
|
+
import IconClose from "./icons/IconClose.vue";
|
|
26
29
|
|
|
27
30
|
export default {
|
|
28
31
|
name: 'ModalWrapper',
|
|
@@ -48,8 +51,8 @@
|
|
|
48
51
|
}
|
|
49
52
|
},
|
|
50
53
|
components: {
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
IconBase,
|
|
55
|
+
IconClose,
|
|
53
56
|
},
|
|
54
57
|
methods: {
|
|
55
58
|
closeIfCloseable(e) {
|
|
@@ -58,5 +61,10 @@
|
|
|
58
61
|
}
|
|
59
62
|
}
|
|
60
63
|
},
|
|
64
|
+
computed: {
|
|
65
|
+
hasFooter() {
|
|
66
|
+
return !!this.$slots.footer;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
61
69
|
}
|
|
62
70
|
</script>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</div>
|
|
9
9
|
</div>
|
|
10
10
|
<nav v-if="product || forceNav" class="image-nav">
|
|
11
|
-
<a v-if="showArrows" class="arrow rotate-90 show-for-medium" @click="previous" :disabled="carouselIndex === 0"><icon-
|
|
11
|
+
<a v-if="showArrows" class="arrow rotate-90 show-for-medium" @click="previous" :disabled="carouselIndex === 0"><icon-base width="32" height="32" viewbox="0 0 24 24" icon-name="caret"><icon-caret /></icon-base></a>
|
|
12
12
|
<div class="image-nav-list" :class="imageListClass">
|
|
13
13
|
<a class="variant-image" :class="{ current: variantImageSelected }" @click="selectVariantImage" :style="shiftStyle">
|
|
14
14
|
<img :src="variantImagePath" alt="" />
|
|
@@ -22,11 +22,12 @@
|
|
|
22
22
|
</a>
|
|
23
23
|
</template>
|
|
24
24
|
</div>
|
|
25
|
-
<a v-if="showArrows" class="arrow rotate-270 show-for-medium" @click="next" :disabled="carouselIndex === carouselSlideCount"><icon-
|
|
25
|
+
<a v-if="showArrows" class="arrow rotate-270 show-for-medium" @click="next" :disabled="carouselIndex === carouselSlideCount"><icon-base width="32" height="32" viewbox="0 0 24 24" icon-name="caret"><icon-caret /></icon-base></a>
|
|
26
26
|
</nav>
|
|
27
27
|
</div>
|
|
28
28
|
</template>
|
|
29
29
|
<script>
|
|
30
|
+
import IconBase from "./icons/IconBase.vue";
|
|
30
31
|
import IconCaret from "./icons/IconCaret.vue";
|
|
31
32
|
|
|
32
33
|
export default {
|
|
@@ -169,6 +170,7 @@
|
|
|
169
170
|
},
|
|
170
171
|
},
|
|
171
172
|
components: {
|
|
173
|
+
IconBase,
|
|
172
174
|
IconCaret,
|
|
173
175
|
}
|
|
174
176
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
</g>
|
|
7
|
-
</svg>
|
|
2
|
+
<g>
|
|
3
|
+
<path fill="none" class="stroke-target" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" d="M38.52,23.01c-0.18,8.84-6.87,16.41-15.9,17.45c-9.85,1.13-18.75-5.93-19.88-15.78 C1.62,14.83,8.69,5.93,18.54,4.8c3.87-0.45,7.78,0.38,11.14,2.36"/>
|
|
4
|
+
<path fill="none" class="stroke-target" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" d="M13.39,20.36l7.68,7.69L47.93,2.42"/>
|
|
5
|
+
</g>
|
|
8
6
|
</template>
|
|
9
7
|
|
|
10
8
|
<script>
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
<svg xmlns="http://www.w3.org/2000/svg"
|
|
3
3
|
:width="width"
|
|
4
4
|
:height="height"
|
|
5
|
-
:
|
|
5
|
+
:viewBox="viewbox"
|
|
6
|
+
:aria-labelledby="iconName"
|
|
6
7
|
role="presentation"
|
|
7
|
-
class="icon"
|
|
8
|
-
|
|
9
|
-
<
|
|
8
|
+
class="icon"
|
|
9
|
+
>
|
|
10
|
+
<title :id="iconName" lang="en">{{ title }}</title>
|
|
11
|
+
<slot></slot>
|
|
10
12
|
</svg>
|
|
11
13
|
</template>
|
|
12
14
|
|
|
@@ -16,7 +18,7 @@
|
|
|
16
18
|
title: String,
|
|
17
19
|
iconName: {
|
|
18
20
|
type: String,
|
|
19
|
-
default: '
|
|
21
|
+
default: 'box',
|
|
20
22
|
},
|
|
21
23
|
width: {
|
|
22
24
|
type: [Number, String],
|
|
@@ -26,6 +28,10 @@
|
|
|
26
28
|
type: [Number, String],
|
|
27
29
|
default: 64,
|
|
28
30
|
},
|
|
31
|
+
viewbox: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: '0 0 72 72',
|
|
34
|
+
},
|
|
29
35
|
},
|
|
30
36
|
}
|
|
31
37
|
</script>
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<path fill="none" fill-rule="evenodd" class="stroke-target" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 10l6.119 6L18 10" />
|
|
4
|
-
</svg>
|
|
2
|
+
<path fill="none" fill-rule="evenodd" class="stroke-target" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 10l6.119 6L18 10" />
|
|
5
3
|
</template>
|
|
6
4
|
|
|
7
5
|
<script>
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
</g>
|
|
7
|
-
</svg>
|
|
2
|
+
<g class="color-target" transform="translate(3 3.5)">
|
|
3
|
+
<rect width="20" height="3" x="-1" y="7" rx="1" transform="rotate(45 9 8.5)"/>
|
|
4
|
+
<rect width="20" height="3" x="-1" y="7" rx="1" transform="scale(-1 1) rotate(45 0 -13.228)"/>
|
|
5
|
+
</g>
|
|
8
6
|
</template>
|
|
9
7
|
|
|
10
8
|
<script>
|