@lumx/core 3.7.5-alpha-list-item-focus-ring.0 → 3.7.6-alpha.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/package.json CHANGED
@@ -40,7 +40,7 @@
40
40
  "update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
41
41
  },
42
42
  "sideEffects": false,
43
- "version": "3.7.5-alpha-list-item-focus-ring.0",
43
+ "version": "3.7.6-alpha.0",
44
44
  "devDependencies": {
45
45
  "@babel/core": "^7.18.13",
46
46
  "@babel/plugin-proposal-class-properties": "^7.18.6",
@@ -0,0 +1,49 @@
1
+ @use "sass:map";
2
+
3
+ /* ==========================================================================
4
+ Image Lightbox
5
+ ========================================================================== */
6
+
7
+ .#{$lumx-base-prefix}-image-lightbox {
8
+ .#{$lumx-base-prefix}-lightbox__wrapper {
9
+ inset: 0;
10
+ }
11
+
12
+ .lumx-slideshow-item-group,
13
+ .lumx-slideshow-item {
14
+ display: flex;
15
+ width: 100%;
16
+ height: 100%;
17
+ }
18
+
19
+ &__image-slide {
20
+ overflow: auto;
21
+ // Do not scroll parents when reaching the end of the current scroll area
22
+ overscroll-behavior: contain;
23
+ // Need to disable native touch actions to implement pinch to zoom
24
+ touch-action: none;
25
+ // Reserve space for scrollbar gutters
26
+ scrollbar-gutter: stable;
27
+ }
28
+
29
+ &__thumbnail {
30
+ margin: auto;
31
+ }
32
+
33
+ &__footer {
34
+ flex-shrink: 0;
35
+ padding: $lumx-spacing-unit-huge 0;
36
+ background: $lumx-color-dark-L1;
37
+ }
38
+ }
39
+
40
+ // Crop & scale transitioning pair of trigger image + opening image
41
+ //noinspection CssInvalidPseudoSelector
42
+ ::view-transition-image-pair(#{$lumx-base-prefix}-image-lightbox) {
43
+ overflow: hidden;
44
+ }
45
+ //noinspection CssInvalidPseudoSelector
46
+ ::view-transition-old(#{$lumx-base-prefix}-image-lightbox),
47
+ ::view-transition-new(#{$lumx-base-prefix}-image-lightbox) {
48
+ height: 100%;
49
+ }
@@ -35,6 +35,7 @@
35
35
  position: fixed;
36
36
  top: $lumx-spacing-unit * 3;
37
37
  right: $lumx-spacing-unit * 3;
38
+ z-index: 1;
38
39
  }
39
40
 
40
41
  &__wrapper {
@@ -9,7 +9,6 @@
9
9
 
10
10
  position: relative;
11
11
  padding-top: map.get($lumx-thumbnail-aspect-ratio, "horizontal");
12
- overflow: hidden;
13
12
 
14
13
  &__wrapper {
15
14
  position: absolute;
@@ -50,6 +49,10 @@
50
49
  flex-direction: column;
51
50
  margin: 1px;
52
51
 
52
+ &:has([data-focus-visible-added]) {
53
+ z-index: 1;
54
+ }
55
+
53
56
  #{$self}--has-1-thumbnail & {
54
57
  &:nth-child(1) {
55
58
  grid-area: b;
@@ -80,6 +80,10 @@
80
80
  ========================================================================== */
81
81
 
82
82
  .#{$lumx-base-prefix}-slideshow-controls {
83
+ $item-max-count: 6;
84
+ $item-size: $lumx-spacing-unit;
85
+ $item-margin-inline: 2px;
86
+ $item-focus-outline: 4px;
83
87
  $self: &;
84
88
 
85
89
  display: flex;
@@ -88,15 +92,15 @@
88
92
 
89
93
  &__pagination {
90
94
  align-items: center;
91
- max-width: 60px;
92
- margin: 0 math.div($lumx-spacing-unit, 2);
95
+ // Compute max width for N items based on their size, margin and focus outline
96
+ max-width: ($item-max-count * ($item-size + $item-margin-inline)) + $item-focus-outline * 2;
93
97
  overflow: hidden;
94
98
  }
95
99
 
96
100
  &__pagination-items {
97
101
  display: flex;
98
102
  align-items: center;
99
- padding: 4px 0;
103
+ padding: $item-focus-outline;
100
104
  transition: transform $lumx-slideshow-transition-duration;
101
105
 
102
106
  @media (prefers-reduced-motion: reduce) {
@@ -108,11 +112,10 @@
108
112
  $item: &;
109
113
 
110
114
  flex-shrink: 0;
111
- width: 8px;
112
- height: 8px;
115
+ width: $item-size;
116
+ height: $item-size;
113
117
  padding: 0;
114
- margin: 0;
115
- margin: 0 2px;
118
+ margin: 0 $item-margin-inline;
116
119
  text-decoration: none;
117
120
  cursor: pointer;
118
121
  user-select: none;
package/scss/lumx.scss CHANGED
@@ -36,6 +36,7 @@
36
36
  @import "./components/grid-column/index";
37
37
  @import "./components/icon/index";
38
38
  @import "./components/image-block/index";
39
+ @import "./components/image-lightbox/index";
39
40
  @import "./components/inline-list/index";
40
41
  @import "./components/input-helper/index";
41
42
  @import "./components/input-label/index";