@rypen-dev/shared-components 8.1.14 → 8.2.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 +416 -398
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scss/partials/_buttons.scss +125 -35
- package/scss/partials/_forms.scss +31 -1
- package/scss/partials/_modals.scss +2 -2
- package/scss/partials/_typography.scss +6 -1
- package/src/components/AddressDisplay.vue +8 -0
- package/src/components/SearchableDropdownInput.vue +24 -6
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rypen-dev/shared-components",
|
|
3
3
|
"description": "Shared styles and Vuejs ui components for Rypen projects. Starting with version 8, this package is built with Vite 7 and Vue 3.",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"scripts": {
|
|
@@ -249,7 +249,6 @@ a.info {
|
|
|
249
249
|
$short-arrow-width: 30px;
|
|
250
250
|
$arrow-width: 40px;
|
|
251
251
|
$arrow-width-medium: 50px;
|
|
252
|
-
$button-transition-time: 200ms;
|
|
253
252
|
|
|
254
253
|
.arrow-link {
|
|
255
254
|
display: inline-block;
|
|
@@ -345,40 +344,6 @@ $button-transition-time: 200ms;
|
|
|
345
344
|
font-size: 0.875rem;
|
|
346
345
|
}
|
|
347
346
|
|
|
348
|
-
&.secondary {
|
|
349
|
-
color: $secondary;
|
|
350
|
-
|
|
351
|
-
&::before,
|
|
352
|
-
&::after {
|
|
353
|
-
border-color: $secondary;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
&.success-alt {
|
|
358
|
-
color: $success-alt;
|
|
359
|
-
|
|
360
|
-
&::before,
|
|
361
|
-
&::after {
|
|
362
|
-
border-color: $success-alt;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
&.color-text-gray {
|
|
367
|
-
&::before {
|
|
368
|
-
border-bottom-color: $text-gray;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
&::after {
|
|
372
|
-
border-top-color: $text-gray;
|
|
373
|
-
border-right-color: $text-gray;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
&:hover,
|
|
377
|
-
&:focus {
|
|
378
|
-
color: $text-gray;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
|
|
382
347
|
&.no-arrow {
|
|
383
348
|
padding-right: 0;
|
|
384
349
|
|
|
@@ -436,6 +401,22 @@ $button-transition-time: 200ms;
|
|
|
436
401
|
&::before {
|
|
437
402
|
display: none;
|
|
438
403
|
}
|
|
404
|
+
|
|
405
|
+
&.reversed {
|
|
406
|
+
padding-right: 0;
|
|
407
|
+
padding-left: 20px;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
&.medium-no-tail {
|
|
413
|
+
@media screen and (max-width: map-get($breakpoints, large) - 1px) {
|
|
414
|
+
padding-right: 20px;
|
|
415
|
+
|
|
416
|
+
&::before {
|
|
417
|
+
display: none;
|
|
418
|
+
}
|
|
419
|
+
|
|
439
420
|
&.reversed {
|
|
440
421
|
padding-right: 0;
|
|
441
422
|
padding-left: 20px;
|
|
@@ -518,6 +499,18 @@ $button-transition-time: 200ms;
|
|
|
518
499
|
}
|
|
519
500
|
}
|
|
520
501
|
|
|
502
|
+
&.color-text-gray {
|
|
503
|
+
&::before,
|
|
504
|
+
&::after {
|
|
505
|
+
border-color: $text-gray;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
&:hover,
|
|
509
|
+
&:focus {
|
|
510
|
+
color: $text-gray;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
521
514
|
@media screen and (min-width: map-get($breakpoints, meidum)) and (max-width: map-get($breakpoints, large) - 1px) {
|
|
522
515
|
&.medium-only-small-text {
|
|
523
516
|
font-size: 0.875rem;
|
|
@@ -612,6 +605,101 @@ $button-transition-time: 200ms;
|
|
|
612
605
|
}
|
|
613
606
|
}
|
|
614
607
|
|
|
608
|
+
.arrow-static {
|
|
609
|
+
display: inline-block;
|
|
610
|
+
position: relative;
|
|
611
|
+
min-height: 1rem;
|
|
612
|
+
padding-right: $arrow-width;
|
|
613
|
+
line-height: 0.75rem;
|
|
614
|
+
white-space: nowrap;
|
|
615
|
+
|
|
616
|
+
&::before {
|
|
617
|
+
content: '';
|
|
618
|
+
width: $arrow-width;
|
|
619
|
+
height: 0;
|
|
620
|
+
border-bottom: solid 1px $call-to-action-color;
|
|
621
|
+
position: absolute;
|
|
622
|
+
right: 0;
|
|
623
|
+
bottom: 5px;
|
|
624
|
+
transition: border-color 300ms, width 300ms, right 300ms;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
&::after {
|
|
628
|
+
content: '';
|
|
629
|
+
border-top: solid 1px $call-to-action-color;
|
|
630
|
+
border-right: solid 1px $call-to-action-color;
|
|
631
|
+
width: 9px;
|
|
632
|
+
height: 9px;
|
|
633
|
+
transform: rotate(45deg);
|
|
634
|
+
position: absolute;
|
|
635
|
+
right: 1px;
|
|
636
|
+
bottom: 1px;
|
|
637
|
+
transition: border-color 300ms, right 300ms;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
&.short {
|
|
641
|
+
padding-right: $short-arrow-width;
|
|
642
|
+
|
|
643
|
+
&::before {
|
|
644
|
+
width: $short-arrow-width;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
&.secondary {
|
|
649
|
+
color: $secondary;
|
|
650
|
+
|
|
651
|
+
&::before,
|
|
652
|
+
&::after {
|
|
653
|
+
border-color: $secondary;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
&.success-alt {
|
|
658
|
+
color: $success-alt;
|
|
659
|
+
|
|
660
|
+
&::before,
|
|
661
|
+
&::after {
|
|
662
|
+
border-color: $success-alt;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
&.tertiary {
|
|
667
|
+
color: $tertiary;
|
|
668
|
+
|
|
669
|
+
&::before,
|
|
670
|
+
&::after {
|
|
671
|
+
border-color: $tertiary;
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
&.color-text-gray {
|
|
676
|
+
&::before,
|
|
677
|
+
&::after {
|
|
678
|
+
border-color: $text-gray;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
@media print, screen and (min-width: map-get($breakpoints, medium)) {
|
|
683
|
+
line-height: 1.125rem;
|
|
684
|
+
font-size: 1.0625rem;
|
|
685
|
+
padding-right: $arrow-width-medium;
|
|
686
|
+
|
|
687
|
+
&::before {
|
|
688
|
+
width: $arrow-width-medium;
|
|
689
|
+
border-bottom-width: 2px;
|
|
690
|
+
bottom: 8px;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
&::after {
|
|
694
|
+
border-top-width: 2px;
|
|
695
|
+
border-right-width: 2px;
|
|
696
|
+
width: 10px;
|
|
697
|
+
height: 10px;
|
|
698
|
+
bottom: 4px;
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
|
|
615
703
|
$button-multi-line-height: $button-multi-line-line-height * math.div($button-font-size, 1rem) * 16;
|
|
616
704
|
$button-multi-line-height-medium: $button-multi-line-line-height * math.div($button-font-size-medium, 1rem) * 16;
|
|
617
705
|
|
|
@@ -626,6 +714,8 @@ $button-small-multi-line-vertical-padding-medium: #{($button-small-height-medium
|
|
|
626
714
|
$button-large-multi-line-vertical-padding: #{($button-large-height - $button-multi-line-height) * 0.5};
|
|
627
715
|
$button-large-multi-line-vertical-padding-medium: #{($button-large-height-medium - $button-multi-line-height-medium) * 0.5};
|
|
628
716
|
|
|
717
|
+
$button-transition-time: 200ms;
|
|
718
|
+
|
|
629
719
|
button,
|
|
630
720
|
.button {
|
|
631
721
|
background-color: $default-button-bg-color;
|
|
@@ -785,17 +785,32 @@ label {
|
|
|
785
785
|
padding-right: 8px;
|
|
786
786
|
}
|
|
787
787
|
|
|
788
|
+
[type='date'] {
|
|
789
|
+
min-width: 162px;
|
|
790
|
+
}
|
|
791
|
+
|
|
788
792
|
::-webkit-calendar-picker-indicator {
|
|
789
793
|
//color: rgba(0, 0, 0, 0);
|
|
790
794
|
opacity: 0;
|
|
791
795
|
}
|
|
792
796
|
|
|
793
|
-
&.small
|
|
797
|
+
&.small,
|
|
798
|
+
&.tiny {
|
|
794
799
|
&::after {
|
|
795
800
|
width: 18px;
|
|
796
801
|
height: 17px;
|
|
797
802
|
background-size: 14px 17px;
|
|
798
803
|
}
|
|
804
|
+
|
|
805
|
+
[type='date'] {
|
|
806
|
+
min-width: 135px;
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
&.tiny {
|
|
811
|
+
&::after {
|
|
812
|
+
top: 6px;
|
|
813
|
+
}
|
|
799
814
|
}
|
|
800
815
|
}
|
|
801
816
|
|
|
@@ -2231,6 +2246,8 @@ input:checked ~ .switch-paddle {
|
|
|
2231
2246
|
border-radius: $global-form-input-radius;
|
|
2232
2247
|
line-height: 1.5rem;
|
|
2233
2248
|
height: 44px;
|
|
2249
|
+
cursor: pointer;
|
|
2250
|
+
transition: border-color 0.25s ease-in-out;
|
|
2234
2251
|
}
|
|
2235
2252
|
|
|
2236
2253
|
.options-list-container {
|
|
@@ -2243,6 +2260,7 @@ input:checked ~ .switch-paddle {
|
|
|
2243
2260
|
border: solid 1px $input-border-color;
|
|
2244
2261
|
border-radius: 0 0 $global-form-input-radius $global-form-input-radius;
|
|
2245
2262
|
border-top: 0;
|
|
2263
|
+
transition: border-color 0.25s ease-in-out;
|
|
2246
2264
|
|
|
2247
2265
|
.input-container.search {
|
|
2248
2266
|
margin-bottom: 0.5rem;
|
|
@@ -2274,6 +2292,13 @@ input:checked ~ .switch-paddle {
|
|
|
2274
2292
|
}
|
|
2275
2293
|
}
|
|
2276
2294
|
|
|
2295
|
+
&.disabled {
|
|
2296
|
+
.value {
|
|
2297
|
+
background-color: $light-gray;
|
|
2298
|
+
cursor: not-allowed;
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2277
2302
|
&.small {
|
|
2278
2303
|
.value {
|
|
2279
2304
|
height: 35px;
|
|
@@ -2330,6 +2355,11 @@ input:checked ~ .switch-paddle {
|
|
|
2330
2355
|
}
|
|
2331
2356
|
|
|
2332
2357
|
&.open {
|
|
2358
|
+
.value,
|
|
2359
|
+
.options-list-container {
|
|
2360
|
+
border-color: $input-border-focus-color;
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2333
2363
|
.value {
|
|
2334
2364
|
border-radius: $global-form-input-radius $global-form-input-radius 0 0;
|
|
2335
2365
|
border-bottom: 0 !important;
|
|
@@ -631,6 +631,11 @@ small,
|
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
|
|
634
|
+
&.sale-price,
|
|
635
|
+
&.color-alert {
|
|
636
|
+
color: $alert !important;
|
|
637
|
+
}
|
|
638
|
+
|
|
634
639
|
.plus {
|
|
635
640
|
font-size: 1rem;
|
|
636
641
|
vertical-align: middle;
|
|
@@ -659,7 +664,7 @@ small,
|
|
|
659
664
|
.price {
|
|
660
665
|
position: relative;
|
|
661
666
|
font-size: 0.875rem;
|
|
662
|
-
color: $text-gray;
|
|
667
|
+
color: $text-gray !important;
|
|
663
668
|
font-weight: $body-weight-normal;
|
|
664
669
|
letter-spacing: 0;
|
|
665
670
|
text-decoration: line-through;
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
{{ address.Company }}
|
|
6
6
|
<br />
|
|
7
7
|
</template>
|
|
8
|
+
<template v-if="address.CareOf && includeCareOf && !separateContactInfo">
|
|
9
|
+
Attn: {{ address.CareOf }}
|
|
10
|
+
<br />
|
|
11
|
+
</template>
|
|
8
12
|
{{ address.Street }}<br v-if="address.Street" />
|
|
9
13
|
<template v-if="address.Street2">
|
|
10
14
|
{{ address.Street2 }}
|
|
@@ -52,6 +56,10 @@
|
|
|
52
56
|
type: Boolean,
|
|
53
57
|
default: false,
|
|
54
58
|
},
|
|
59
|
+
includeCareOf: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false,
|
|
62
|
+
},
|
|
55
63
|
excludeName: {
|
|
56
64
|
type: Boolean,
|
|
57
65
|
default: false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :id="id + '-container'" ref="containerref" class="input-container searchable-dropdown-container" @focusin="focusOn" @focusout="focusOff" tabindex="0">
|
|
3
3
|
<div class="input-container select false-select" :class="computedClass">
|
|
4
|
-
<span class="value">{{ value ? value.Name : 'Select' }}</span>
|
|
4
|
+
<span class="value" @click="closeIfOpen">{{ value ? value.Name : 'Select' }}</span>
|
|
5
5
|
<div class="options-list-container">
|
|
6
6
|
<div class="input-container search small">
|
|
7
7
|
<input ref="inputref" type="text" autocomplete="off" role="combobox" :aria-controls="id + '-list'" aria-autocomplete="list" :aria-expanded="focused" v-model="searchValue" :maxlength="maxLength" :disabled="disabled" />
|
|
@@ -91,6 +91,11 @@
|
|
|
91
91
|
filteredOptions.push(...newResults);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
function setValueFromExternal(value) {
|
|
95
|
+
// trigger external value set
|
|
96
|
+
value.value = value;
|
|
97
|
+
}
|
|
98
|
+
|
|
94
99
|
function selectValue(value) {
|
|
95
100
|
value.value = value;
|
|
96
101
|
|
|
@@ -103,18 +108,24 @@
|
|
|
103
108
|
}
|
|
104
109
|
|
|
105
110
|
function focusInput() {
|
|
106
|
-
|
|
111
|
+
if (!disabled.value) {
|
|
112
|
+
focused.value = true;
|
|
113
|
+
}
|
|
107
114
|
}
|
|
108
115
|
|
|
109
116
|
function focusSearchInput() {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
inputref.value
|
|
117
|
+
if (!disabled.value) {
|
|
118
|
+
focused.value = true;
|
|
119
|
+
if (inputref.value) {
|
|
120
|
+
inputref.value.focus();
|
|
121
|
+
}
|
|
113
122
|
}
|
|
114
123
|
}
|
|
115
124
|
|
|
116
125
|
function focusOn(e) {
|
|
117
|
-
|
|
126
|
+
if (!disabled.value) {
|
|
127
|
+
focused.value = true;
|
|
128
|
+
}
|
|
118
129
|
}
|
|
119
130
|
|
|
120
131
|
function focusOff(e) {
|
|
@@ -126,6 +137,12 @@
|
|
|
126
137
|
}, 200);
|
|
127
138
|
}
|
|
128
139
|
|
|
140
|
+
function closeIfOpen() {
|
|
141
|
+
if (focused.value && containerref.value) {
|
|
142
|
+
containerref.value.blur();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
129
146
|
const computedClass = computed(() => {
|
|
130
147
|
return (props.cssClass || '') + (focused.value ? ' open' : '') + (props.invalid ? ' error' : '');
|
|
131
148
|
});
|
|
@@ -144,5 +161,6 @@
|
|
|
144
161
|
defineExpose({
|
|
145
162
|
focusInput,
|
|
146
163
|
focusSearchInput,
|
|
164
|
+
setValueFromExternal,
|
|
147
165
|
});
|
|
148
166
|
</script>
|