@madj2k/fe-frontend-kit 2.0.13 → 2.0.16
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
|
@@ -30,21 +30,38 @@
|
|
|
30
30
|
///
|
|
31
31
|
@mixin accessibility-outline($color: var(--bs-primary), $width: 3px, $selector: null) {
|
|
32
32
|
|
|
33
|
+
// remove outline
|
|
33
34
|
&:focus,
|
|
34
35
|
&:focus-within {
|
|
35
36
|
outline: 0;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
// default behavior
|
|
40
|
+
@if $selector == null {
|
|
41
|
+
|
|
42
|
+
&:has(input:focus-visible),
|
|
43
|
+
&:focus-visible {
|
|
41
44
|
outline: rem-calc($width) solid $color;
|
|
42
|
-
}
|
|
43
|
-
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
@else {
|
|
48
|
+
|
|
49
|
+
// if we have a pseudo-element selector
|
|
50
|
+
// we need to add a space before the pseudo-element
|
|
51
|
+
// to prevent the pseudo-element from being removed
|
|
52
|
+
// when the selector is parsed
|
|
53
|
+
@if str-slice($selector, 1, 2) == '::' {
|
|
54
|
+
&:has(input:focus-visible)#{$selector},
|
|
55
|
+
&:focus-visible#{$selector} {
|
|
44
56
|
outline: rem-calc($width) solid $color;
|
|
45
57
|
}
|
|
46
|
-
}
|
|
47
|
-
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// if we have normal selector
|
|
61
|
+
// we can just add the selector
|
|
62
|
+
@else {
|
|
63
|
+
&:has(input:focus-visible) #{$selector},
|
|
64
|
+
&:focus-visible #{$selector} {
|
|
48
65
|
outline: rem-calc($width) solid $color;
|
|
49
66
|
}
|
|
50
67
|
}
|
|
@@ -22,7 +22,11 @@
|
|
|
22
22
|
* @see https://www.gnu.org/licenses/gpl-3.0.en.html
|
|
23
23
|
*
|
|
24
24
|
* @example:
|
|
25
|
-
*
|
|
25
|
+
* $('.js-highlight-slider-container').each(function () {
|
|
26
|
+
* const owlThumbnail = new Madj2kOwlThumbnail(
|
|
27
|
+
* '.js-main-carousel',
|
|
28
|
+
* '.js-thumbs-carousel',
|
|
29
|
+
* {
|
|
26
30
|
* main: {
|
|
27
31
|
* items: 1,
|
|
28
32
|
* margin: 20,
|
|
@@ -40,7 +44,9 @@
|
|
|
40
44
|
* resizeEvent: 'custom.resize',
|
|
41
45
|
* equalizeThumbHeights: true,
|
|
42
46
|
* noStageOffset: true
|
|
43
|
-
* }
|
|
47
|
+
* },
|
|
48
|
+
* false,
|
|
49
|
+
* this
|
|
44
50
|
* });
|
|
45
51
|
* HTML example without data attributes:
|
|
46
52
|
* <div class="js-main-carousel owl-carousel">
|
|
@@ -68,10 +74,20 @@
|
|
|
68
74
|
*
|
|
69
75
|
*/
|
|
70
76
|
class Madj2kOwlThumbnail {
|
|
71
|
-
|
|
77
|
+
/**
|
|
78
|
+
* Creates a new OwlThumbnail instance
|
|
79
|
+
* @param {string} mainSelector - CSS selector for main carousel element
|
|
80
|
+
* @param {string} thumbSelector - CSS selector for thumbnail carousel element
|
|
81
|
+
* @param {Object} options - Configuration options
|
|
82
|
+
* @param {boolean} debug - Enables debug logging
|
|
83
|
+
* @param {Document} container - DOM container to use for event listeners
|
|
84
|
+
*/
|
|
85
|
+
constructor(mainSelector, thumbSelector, options = {}, debug = false, container = document) {
|
|
72
86
|
this.debug = debug;
|
|
73
|
-
|
|
74
|
-
this.$
|
|
87
|
+
|
|
88
|
+
this.$context = $(container);
|
|
89
|
+
this.$main = this.$context.find(mainSelector);
|
|
90
|
+
this.$thumbs = this.$context.find(thumbSelector);
|
|
75
91
|
this.options = options;
|
|
76
92
|
this.syncing = false;
|
|
77
93
|
|