@lumx/core 3.6.3-alpha.0 → 3.6.3-alpha.2
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/lumx.css +1 -1
- package/lumx.min.css +1 -1
- package/package.json +1 -1
- package/scss/components/popover/_index.scss +33 -17
- package/scss/components/popover/_variables.scss +1 -1
- package/scss/core/elevation/_mixins.scss +20 -0
- package/scss/core/elevation/_variables.scss +27 -6
- package/scss/core/typography/_mixins.scss +2 -2
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.6.3-alpha.
|
|
43
|
+
"version": "3.6.3-alpha.2",
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@babel/core": "^7.18.13",
|
|
46
46
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
@@ -22,34 +22,50 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
&__arrow {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
height: $lumx-popover-arrow-size;
|
|
31
|
-
}
|
|
25
|
+
position: absolute;
|
|
26
|
+
z-index: -1;
|
|
27
|
+
width: $lumx-popover-arrow-size;
|
|
28
|
+
height: $lumx-popover-arrow-size;
|
|
29
|
+
fill: lumx-color-variant("light", "N");
|
|
32
30
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
background: lumx-color-variant("light", "N");
|
|
36
|
-
transform: rotate(45deg);
|
|
31
|
+
svg {
|
|
32
|
+
display: block;
|
|
37
33
|
}
|
|
38
34
|
|
|
39
35
|
#{$self}[data-popper-placement^='top'] & {
|
|
40
|
-
bottom:
|
|
36
|
+
bottom: -$lumx-popover-arrow-size;
|
|
37
|
+
|
|
38
|
+
svg {
|
|
39
|
+
transform: rotate(180deg);
|
|
40
|
+
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
#{$self}[data-popper-placement^='bottom'] & {
|
|
44
|
-
top:
|
|
44
|
+
top: -$lumx-popover-arrow-size;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
#{$self}[data-popper-placement^='left'] & {
|
|
48
|
-
right:
|
|
48
|
+
right: -$lumx-popover-arrow-size;
|
|
49
|
+
|
|
50
|
+
svg {
|
|
51
|
+
transform: rotate(90deg);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
#{$self}[data-popper-placement^='right'] & {
|
|
56
|
+
left: -$lumx-popover-arrow-size;
|
|
57
|
+
|
|
58
|
+
svg {
|
|
59
|
+
transform: rotate(-90deg);
|
|
60
|
+
}
|
|
49
61
|
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&--theme-dark {
|
|
65
|
+
background: lumx-color-variant("dark", "N");
|
|
50
66
|
|
|
51
|
-
#{$self}
|
|
52
|
-
|
|
67
|
+
#{$self}__arrow {
|
|
68
|
+
fill: lumx-color-variant("dark", "N");
|
|
53
69
|
}
|
|
54
70
|
}
|
|
55
71
|
}
|
|
@@ -59,6 +75,6 @@
|
|
|
59
75
|
|
|
60
76
|
@each $depth, $shadow in $lumx-elevation-shadows {
|
|
61
77
|
.#{$lumx-base-prefix}-popover--elevation-#{$depth} {
|
|
62
|
-
@include lumx-elevation($depth);
|
|
78
|
+
@include lumx-elevation-drop-shadow($depth);
|
|
63
79
|
}
|
|
64
80
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
$lumx-popover-arrow-size:
|
|
1
|
+
$lumx-popover-arrow-size: 14px;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
@use "sass:map";
|
|
2
|
+
@use "sass:math";
|
|
2
3
|
@use "sass:string";
|
|
3
4
|
|
|
5
|
+
// Elevation using box-shadow
|
|
4
6
|
@mixin lumx-elevation($elevation, $variant: "L4") {
|
|
5
7
|
@if $elevation == 0 {
|
|
6
8
|
box-shadow: none;
|
|
@@ -8,3 +10,21 @@
|
|
|
8
10
|
box-shadow: string.unquote(map.get($lumx-elevation-shadows, $elevation)) lumx-color-variant("dark", $variant);
|
|
9
11
|
}
|
|
10
12
|
}
|
|
13
|
+
|
|
14
|
+
// Elevation using filter drop-shadow
|
|
15
|
+
@mixin lumx-elevation-drop-shadow($elevation, $variant: "L4") {
|
|
16
|
+
@if $elevation > 0 {
|
|
17
|
+
$offset-x: 0;
|
|
18
|
+
$offset-y: map.get($lumx-elevation-shadow-offset-y, $elevation);
|
|
19
|
+
// Adjust the blur value so it matches visually to the box-shadow blur
|
|
20
|
+
$blur: math.div(map.get($lumx-elevation-shadow-blur, $elevation), 2);
|
|
21
|
+
|
|
22
|
+
filter:
|
|
23
|
+
drop-shadow(
|
|
24
|
+
$offset-x
|
|
25
|
+
$offset-y
|
|
26
|
+
$blur
|
|
27
|
+
lumx-color-variant("dark", $variant)
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
$lumx-elevation-shadow-offset-y: (
|
|
4
|
+
1: 0,
|
|
5
|
+
2: 1px,
|
|
6
|
+
3: 2px,
|
|
7
|
+
4: 4px,
|
|
8
|
+
5: 8px,
|
|
7
9
|
);
|
|
10
|
+
$lumx-elevation-shadow-blur: (
|
|
11
|
+
1: 2px,
|
|
12
|
+
2: 4px,
|
|
13
|
+
3: 8px,
|
|
14
|
+
4: 16px,
|
|
15
|
+
5: 32px,
|
|
16
|
+
);
|
|
17
|
+
$lumx-elevation-shadows: ();
|
|
18
|
+
|
|
19
|
+
@each $depth in (1, 2, 3, 4, 5) {
|
|
20
|
+
$offset-y: map.get($lumx-elevation-shadow-offset-y, $depth);
|
|
21
|
+
$blur: map.get($lumx-elevation-shadow-blur, $depth);
|
|
22
|
+
$lumx-elevation-shadows: map.set(
|
|
23
|
+
$lumx-elevation-shadows,
|
|
24
|
+
$depth,
|
|
25
|
+
// box-shadow <offset-x> <offset-y> <blur-radius> <spread-radius>
|
|
26
|
+
"0 " + $offset-y + " " + $blur + " 0"
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
@mixin lumx-typography-base() {
|
|
4
4
|
font-family: var(--lumx-typography-font-family);
|
|
5
|
-
-moz-osx-font-smoothing:
|
|
6
|
-
-webkit-font-smoothing:
|
|
5
|
+
-moz-osx-font-smoothing: grayscale;
|
|
6
|
+
-webkit-font-smoothing: antialiased;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
@mixin lumx-typography($key, $type: "interface") {
|