@rypen-dev/shared-components 8.1.14 → 8.2.1

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,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.1.14",
4
+ "version": "8.2.1",
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;
@@ -520,6 +520,14 @@ label {
520
520
  border-radius: 0 $global-form-input-radius $global-form-input-radius 0;
521
521
  }
522
522
 
523
+ &.small {
524
+ .input-group-field {
525
+ height: 35px;
526
+ padding: 5px;
527
+ font-size: 0.875rem;
528
+ }
529
+ }
530
+
523
531
  &.tiny {
524
532
  .input-group-field {
525
533
  height: 30px;
@@ -785,17 +793,32 @@ label {
785
793
  padding-right: 8px;
786
794
  }
787
795
 
796
+ [type='date'] {
797
+ min-width: 162px;
798
+ }
799
+
788
800
  ::-webkit-calendar-picker-indicator {
789
801
  //color: rgba(0, 0, 0, 0);
790
802
  opacity: 0;
791
803
  }
792
804
 
793
- &.small {
805
+ &.small,
806
+ &.tiny {
794
807
  &::after {
795
808
  width: 18px;
796
809
  height: 17px;
797
810
  background-size: 14px 17px;
798
811
  }
812
+
813
+ [type='date'] {
814
+ min-width: 135px;
815
+ }
816
+ }
817
+
818
+ &.tiny {
819
+ &::after {
820
+ top: 6px;
821
+ }
799
822
  }
800
823
  }
801
824
 
@@ -2231,6 +2254,8 @@ input:checked ~ .switch-paddle {
2231
2254
  border-radius: $global-form-input-radius;
2232
2255
  line-height: 1.5rem;
2233
2256
  height: 44px;
2257
+ cursor: pointer;
2258
+ transition: border-color 0.25s ease-in-out;
2234
2259
  }
2235
2260
 
2236
2261
  .options-list-container {
@@ -2243,6 +2268,7 @@ input:checked ~ .switch-paddle {
2243
2268
  border: solid 1px $input-border-color;
2244
2269
  border-radius: 0 0 $global-form-input-radius $global-form-input-radius;
2245
2270
  border-top: 0;
2271
+ transition: border-color 0.25s ease-in-out;
2246
2272
 
2247
2273
  .input-container.search {
2248
2274
  margin-bottom: 0.5rem;
@@ -2274,6 +2300,13 @@ input:checked ~ .switch-paddle {
2274
2300
  }
2275
2301
  }
2276
2302
 
2303
+ &.disabled {
2304
+ .value {
2305
+ background-color: $light-gray;
2306
+ cursor: not-allowed;
2307
+ }
2308
+ }
2309
+
2277
2310
  &.small {
2278
2311
  .value {
2279
2312
  height: 35px;
@@ -2330,6 +2363,11 @@ input:checked ~ .switch-paddle {
2330
2363
  }
2331
2364
 
2332
2365
  &.open {
2366
+ .value,
2367
+ .options-list-container {
2368
+ border-color: $input-border-focus-color;
2369
+ }
2370
+
2333
2371
  .value {
2334
2372
  border-radius: $global-form-input-radius $global-form-input-radius 0 0;
2335
2373
  border-bottom: 0 !important;
@@ -328,8 +328,8 @@
328
328
  .checkbox,
329
329
  .switch {
330
330
  label {
331
- width: auto;
332
- padding-top: 0;
331
+ width: auto !important;
332
+ padding-top: 0 !important;
333
333
  }
334
334
  }
335
335
 
@@ -1,9 +1,10 @@
1
1
  /// <reference path="../variables" />
2
2
  /// <reference path="../vendor/foundation-settings" />
3
3
 
4
- @import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700|Ubuntu:300,400,500,700');
4
+ //@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700|Ubuntu:300,400,500,700');
5
+ @import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
5
6
 
6
- // OpenSans: Light = 300, Regular = 400, Semi-Bold = 600, Bold = 700 (Extra-Bold = 800)
7
+ // OpenSans: Light = 300, Regular = 400, Semi-Bold = 600, Bold = 700, Extra-Bold = 800
7
8
  // Ubuntu: Light = 300, Regular = 400, Medium = 500, Bold = 700
8
9
 
9
10
  body {
@@ -631,6 +632,11 @@ small,
631
632
  }
632
633
  }
633
634
 
635
+ &.sale-price,
636
+ &.color-alert {
637
+ color: $alert !important;
638
+ }
639
+
634
640
  .plus {
635
641
  font-size: 1rem;
636
642
  vertical-align: middle;
@@ -659,7 +665,7 @@ small,
659
665
  .price {
660
666
  position: relative;
661
667
  font-size: 0.875rem;
662
- color: $text-gray;
668
+ color: $text-gray !important;
663
669
  font-weight: $body-weight-normal;
664
670
  letter-spacing: 0;
665
671
  text-decoration: line-through;
package/scss/styles.scss CHANGED
@@ -48,6 +48,7 @@
48
48
  @include foundation-visibility-classes;
49
49
  //@include foundation-float-classes;
50
50
 
51
+ @import './partials/typography';
51
52
  @import './partials/layout';
52
53
  @import './partials/navigation';
53
54
  @import './partials/badges';
@@ -59,7 +60,6 @@
59
60
  @import './partials/pills';
60
61
  @import './partials/tables';
61
62
  @import './partials/tooltips';
62
- @import './partials/typography';
63
63
  @import './partials/content';
64
64
  @import './partials/specsheet';
65
65
  @import './partials/notifications';
@@ -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
- focused.value = true;
111
+ if (!disabled.value) {
112
+ focused.value = true;
113
+ }
107
114
  }
108
115
 
109
116
  function focusSearchInput() {
110
- focused.value = true;
111
- if (inputref.value) {
112
- inputref.value.focus();
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
- focused.value = true;
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>