@salesforcedevs/dx-components 1.2.19-lightdom → 1.2.20-lightdom-6
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 +1 -1
- package/src/modules/dx/banner/banner.css +32 -0
- package/src/modules/dx/banner/banner.html +2 -2
- package/src/modules/dx/banner/banner.ts +1 -3
- package/src/modules/dx/brandThemeProvider/brandThemeProvider.ts +1 -1
- package/src/modules/dx/button/button.html +7 -5
- package/src/modules/dx/button/{button.css → button.scoped.css} +1 -2
- package/src/modules/dx/button/button.ts +16 -8
- package/src/modules/dx/cardCallout/cardCallout.css +44 -4
- package/src/modules/dx/cardCallout/cardCallout.html +1 -1
- package/src/modules/dx/cardCallout/cardCallout.ts +0 -2
- package/src/modules/dx/cardPodcastEpisode/{cardPodcastEpisode.scoped.css → cardPodcastEpisode.css} +4 -0
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.html +1 -1
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.ts +0 -2
- package/src/modules/dx/cardTitle/cardTitle.css +24 -2
- package/src/modules/dx/cardTitle/cardTitle.html +3 -7
- package/src/modules/dx/cardTitle/cardTitle.ts +0 -1
- package/src/modules/dx/dropdown/dropdown.css +6 -11
- package/src/modules/dx/dropdown/dropdown.html +1 -0
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +8 -8
- package/src/modules/dx/header/header.css +0 -11
- package/src/modules/dx/header/header.scoped.css +5 -0
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.css +146 -1
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.html +4 -12
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.ts +5 -5
- package/src/modules/dx/headerNav/{headerNav.scoped.css → headerNav.css} +2 -0
- package/src/modules/dx/headerNav/headerNav.html +2 -5
- package/src/modules/dx/headerNav/headerNav.ts +0 -2
- package/src/modules/dx/headerSearch/headerSearch.css +60 -1
- package/src/modules/dx/headerSearch/headerSearch.html +1 -1
- package/src/modules/dx/headerSearch/headerSearch.ts +0 -2
- package/src/modules/dx/icon/icon.css +4 -2
- package/src/modules/dx/icon/icon.html +1 -1
- package/src/modules/dx/icon/icon.scoped.css +5 -0
- package/src/modules/dx/icon/icon.ts +0 -2
- package/src/modules/dx/logo/{logo.scoped.css → logo.css} +3 -0
- package/src/modules/dx/logo/logo.html +1 -1
- package/src/modules/dx/logo/logo.ts +0 -2
- package/src/modules/dx/popover/popover.html +2 -2
- package/src/modules/dx/popover/{popover.css → popover.scoped.css} +0 -2
- package/src/modules/dx/popover/popover.ts +33 -19
- package/src/modules/dx/relativeDateTime/relativeDateTime.html +1 -1
- package/src/modules/dx/relativeDateTime/relativeDateTime.ts +0 -1
- package/src/modules/dx/skipNavLink/{skipNavLink.scoped.css → skipNavLink.css} +2 -0
- package/src/modules/dx/skipNavLink/skipNavLink.html +1 -1
- package/src/modules/dx/skipNavLink/skipNavLink.ts +1 -3
- package/src/modules/dxHelpers/card/card.css +0 -10
- package/src/modules/dxHelpers/commonSidebar/commonSidebar.css +3 -3
- package/src/modules/dx/banner/banner.scoped.css +0 -28
- package/src/modules/dx/cardCallout/cardCallout.scoped.css +0 -45
- package/src/modules/dx/cardTitle/cardTitle.scoped.css +0 -25
- package/src/modules/dx/checkbox/checkbox.scoped.css +0 -169
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.scoped.css +0 -142
- package/src/modules/dx/headerSearch/headerSearch.scoped.css +0 -56
- package/src/modules/dx/relativeDateTime/relativeDateTime.scoped.css +0 -3
|
@@ -4,8 +4,6 @@ import { OptionWithNested } from "typings/custom";
|
|
|
4
4
|
import { deepmapOptions } from "dxUtils/options";
|
|
5
5
|
|
|
6
6
|
export default class HeaderMobileNavMenu extends LightningElement {
|
|
7
|
-
static renderMode = "light";
|
|
8
|
-
|
|
9
7
|
@api open: boolean = false;
|
|
10
8
|
@api value: string | null = null;
|
|
11
9
|
@api pathname: string | null = null;
|
|
@@ -64,7 +62,7 @@ export default class HeaderMobileNavMenu extends LightningElement {
|
|
|
64
62
|
|
|
65
63
|
renderedCallback() {
|
|
66
64
|
if (!this.navElement) {
|
|
67
|
-
this.navElement = this.querySelector("nav");
|
|
65
|
+
this.navElement = this.template.querySelector("nav");
|
|
68
66
|
}
|
|
69
67
|
if (this.open && !this.wasOpen && this.value) {
|
|
70
68
|
this.scrollToAccordianSection();
|
|
@@ -75,8 +73,10 @@ export default class HeaderMobileNavMenu extends LightningElement {
|
|
|
75
73
|
}
|
|
76
74
|
|
|
77
75
|
private scrollToAccordianSection() {
|
|
78
|
-
const element = this.querySelector(
|
|
79
|
-
|
|
76
|
+
const element = this.template.querySelector(
|
|
77
|
+
`li[data-id="${this.value}"]`
|
|
78
|
+
);
|
|
79
|
+
const container = this.template.querySelector(".nav-menu");
|
|
80
80
|
if (element && container) {
|
|
81
81
|
container.scrollTop = element.offsetTop - 8;
|
|
82
82
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
<template
|
|
1
|
+
<template>
|
|
2
2
|
<nav role="navigation" aria-label={ariaLabel}>
|
|
3
3
|
<ul class="nav-list">
|
|
4
|
-
<template
|
|
5
|
-
for:each={navItems}
|
|
6
|
-
for:item="navItem"
|
|
7
|
-
>
|
|
4
|
+
<template for:each={navItems} for:item="navItem">
|
|
8
5
|
<li key={navItem.id}>
|
|
9
6
|
<dx-tab
|
|
10
7
|
if:false={navItem.options}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
import { TabVariant, OptionWithNested } from "typings/custom";
|
|
3
3
|
export default class HeaderNav extends LightningElement {
|
|
4
|
-
static renderMode = "light";
|
|
5
|
-
|
|
6
4
|
@api pathname: string | null = null;
|
|
7
5
|
@api variant: TabVariant = "default";
|
|
8
6
|
@api ariaLabel: string = "Primary Navigation";
|
|
@@ -1,3 +1,62 @@
|
|
|
1
|
-
|
|
1
|
+
@import "dxHelpers/reset";
|
|
2
|
+
|
|
3
|
+
/* DESKTOP */
|
|
4
|
+
|
|
5
|
+
:host {
|
|
2
6
|
--toggle-width: var(--dx-g-spacing-5xl);
|
|
3
7
|
}
|
|
8
|
+
|
|
9
|
+
.desktop_search-container {
|
|
10
|
+
position: relative;
|
|
11
|
+
display: flex;
|
|
12
|
+
height: var(--dx-g-spacing-xl);
|
|
13
|
+
font-size: var(--dx-g-text-sm);
|
|
14
|
+
font-family: var(--dx-g-font-sans);
|
|
15
|
+
color: var(--dx-g-gray-50);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.desktop_search-container dx-input {
|
|
19
|
+
--dx-c-input-width: calc(
|
|
20
|
+
var(--dx-c-header-search-width) - var(--toggle-width)
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* MOBILE */
|
|
25
|
+
|
|
26
|
+
.mobile_search-button {
|
|
27
|
+
position: relative;
|
|
28
|
+
z-index: 3;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.mobile_search-dropdown {
|
|
32
|
+
--dx-c-popover-border-radius: 0;
|
|
33
|
+
--dx-c-popover-border: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.mobile_search-input {
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: 0;
|
|
39
|
+
left: 0;
|
|
40
|
+
height: 100%;
|
|
41
|
+
width: 100%;
|
|
42
|
+
transition: var(--dx-g-transition-hue-1x);
|
|
43
|
+
opacity: 0;
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
|
|
46
|
+
--dx-c-input-border: none;
|
|
47
|
+
--dx-c-input-border-radius: 0;
|
|
48
|
+
--dx-c-input-border-active: none;
|
|
49
|
+
--dx-c-input-icon-color: var(--dx-g-blue-vibrant-20);
|
|
50
|
+
--dx-c-input-padding: 0 var(--dx-g-spacing-4xl) 0 var(--dx-g-spacing-md);
|
|
51
|
+
--dx-c-input-background: var(--dx-g-brand-current-color-background-2);
|
|
52
|
+
--dx-c-input-background-active: var(
|
|
53
|
+
--dx-g-brand-current-color-background-2
|
|
54
|
+
);
|
|
55
|
+
--dx-c-input-height: 100% !important;
|
|
56
|
+
--dx-c-input-width: 100%;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.mobile_search-input.state-open {
|
|
60
|
+
opacity: 1;
|
|
61
|
+
pointer-events: auto;
|
|
62
|
+
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
|
-
import {
|
|
3
|
-
LightningSlotElement,
|
|
4
|
-
PopoverRequestCloseType,
|
|
5
|
-
PopperPlacement
|
|
6
|
-
} from "typings/custom";
|
|
2
|
+
import { PopoverRequestCloseType, PopperPlacement } from "typings/custom";
|
|
7
3
|
|
|
8
4
|
import { computePosition, flip, size, shift } from "@floating-ui/dom";
|
|
9
5
|
import cx from "classnames";
|
|
@@ -23,6 +19,8 @@ const isEventOutsideElements = (
|
|
|
23
19
|
);
|
|
24
20
|
|
|
25
21
|
export default class Popover extends LightningElement {
|
|
22
|
+
static renderMode = "light";
|
|
23
|
+
|
|
26
24
|
@api ariaLabel: string | null = null;
|
|
27
25
|
@api offset?: "small" | "medium";
|
|
28
26
|
@api pagePadding?: number = 16; // padding between dropdown and the edge of the page
|
|
@@ -118,8 +116,10 @@ export default class Popover extends LightningElement {
|
|
|
118
116
|
|
|
119
117
|
renderedCallback() {
|
|
120
118
|
if (!this.popover) {
|
|
121
|
-
this.popover = this.
|
|
119
|
+
this.popover = this.querySelector(".popover-container");
|
|
122
120
|
}
|
|
121
|
+
|
|
122
|
+
this.doWeirdControlStuff();
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
// GETTERS
|
|
@@ -127,6 +127,7 @@ export default class Popover extends LightningElement {
|
|
|
127
127
|
private get className() {
|
|
128
128
|
return cx(
|
|
129
129
|
"popover",
|
|
130
|
+
"popover-content",
|
|
130
131
|
this.offset && `popover-offset-${this.offset}`,
|
|
131
132
|
this.small && "popover-small",
|
|
132
133
|
this.width && "popover-overridewidth",
|
|
@@ -232,23 +233,36 @@ export default class Popover extends LightningElement {
|
|
|
232
233
|
this.openPopover();
|
|
233
234
|
};
|
|
234
235
|
|
|
235
|
-
private onSlotChange(e: LightningSlotElement) {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
236
|
+
// private onSlotChange(e: LightningSlotElement) {
|
|
237
|
+
// const slot = e.target;
|
|
238
|
+
// const elements = slot.assignedElements();
|
|
239
|
+
// const slotted = elements.length === 0 ? null : elements[0];
|
|
240
|
+
// // allows dropdown/select to compose popover
|
|
241
|
+
// const control =
|
|
242
|
+
// slotted.tagName === "SLOT" ? slotted.firstChild : slotted;
|
|
243
|
+
// const onboardControl =
|
|
244
|
+
// (!this.control || (control && !control.isSameNode(this.control))) &&
|
|
245
|
+
// control;
|
|
246
|
+
// if (onboardControl) {
|
|
247
|
+
// control.setAttribute("aria-haspopup", "true");
|
|
248
|
+
// control.style.cursor = this.openOnHover ? "default" : "cursor";
|
|
249
|
+
// this.control = control;
|
|
250
|
+
// this.addControlListeners();
|
|
251
|
+
// this.setPosition();
|
|
252
|
+
// }
|
|
253
|
+
// }
|
|
254
|
+
|
|
255
|
+
private doWeirdControlStuff() {
|
|
256
|
+
const control = this.querySelector('[slot="control"]');
|
|
257
|
+
|
|
258
|
+
if (control) {
|
|
246
259
|
control.setAttribute("aria-haspopup", "true");
|
|
247
260
|
control.style.cursor = this.openOnHover ? "default" : "cursor";
|
|
248
261
|
this.control = control;
|
|
249
|
-
this.addControlListeners();
|
|
250
|
-
this.setPosition();
|
|
251
262
|
}
|
|
263
|
+
|
|
264
|
+
this.addControlListeners();
|
|
265
|
+
this.setPosition();
|
|
252
266
|
}
|
|
253
267
|
|
|
254
268
|
private onKeyDown(e: KeyboardEvent): void {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
|
|
3
3
|
export default class RelativeDateTime extends LightningElement {
|
|
4
|
-
static renderMode = "light";
|
|
5
4
|
@api messageWhenHoursPast: String = "";
|
|
6
5
|
@api messageWhenDaysPast: String = "";
|
|
7
6
|
@api messageWhenWeeksPast: String = "";
|
|
@@ -12,16 +12,6 @@
|
|
|
12
12
|
--dx-c-body-max-lines: 6;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.base-card {
|
|
16
|
-
display: block;
|
|
17
|
-
|
|
18
|
-
--dx-g-card-border: 1px solid var(--dx-g-gray-90);
|
|
19
|
-
--dx-g-card-border-radius: 16px;
|
|
20
|
-
--dx-g-card-item-spacing: 12px;
|
|
21
|
-
--dx-g-card-img-spacing: 20px;
|
|
22
|
-
--dx-c-body-max-lines: 6;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
15
|
.dx-card-base {
|
|
26
16
|
height: 100%;
|
|
27
17
|
}
|
|
@@ -33,7 +33,7 @@ dx-tree:not(:last-child) {
|
|
|
33
33
|
line-height: inherit;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.header-toggle-button {
|
|
36
|
+
dx-button.header-toggle-button {
|
|
37
37
|
position: absolute;
|
|
38
38
|
right: calc((-1 * (var(--dx-g-spacing-xl) / 2)) - 1px);
|
|
39
39
|
|
|
@@ -53,7 +53,7 @@ dx-tree:not(:last-child) {
|
|
|
53
53
|
color: var(--dx-g-blue-vibrant-30);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.header-toggle-icon dx-icon
|
|
56
|
+
.header-toggle-icon dx-icon {
|
|
57
57
|
transition: var(--dx-g-transition-transform-2x);
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -122,7 +122,7 @@ dx-tree:not(:last-child) {
|
|
|
122
122
|
margin-bottom: 0;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.container.container-mobile.collapsed .header-toggle-icon dx-icon
|
|
125
|
+
.container.container-mobile.collapsed .header-toggle-icon dx-icon {
|
|
126
126
|
transform: rotateZ(-90deg);
|
|
127
127
|
}
|
|
128
128
|
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
--primary-color: var(--dx-g-cloud-blue-vibrant-50);
|
|
3
|
-
--secondary-color: var(--dx-g-cloud-blue-vibrant-40);
|
|
4
|
-
|
|
5
|
-
width: 100%;
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: row;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
min-height: 24px;
|
|
11
|
-
padding: 0 var(--dx-g-page-padding-horizontal);
|
|
12
|
-
background: repeating-linear-gradient(
|
|
13
|
-
45deg,
|
|
14
|
-
var(--primary-color),
|
|
15
|
-
var(--primary-color) 20px,
|
|
16
|
-
var(--secondary-color) 20px,
|
|
17
|
-
var(--secondary-color) 40px
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.container_inner {
|
|
22
|
-
height: 100%;
|
|
23
|
-
display: flex;
|
|
24
|
-
background: var(--primary-color);
|
|
25
|
-
padding: var(--dx-g-spacing-xs) var(--dx-g-spacing-sm);
|
|
26
|
-
color: white;
|
|
27
|
-
font-weight: bold;
|
|
28
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
|
|
4
|
-
--dx-g-card-border: 1px solid var(--dx-g-gray-90);
|
|
5
|
-
--dx-g-card-border-radius: 16px;
|
|
6
|
-
--dx-g-card-item-spacing: 12px;
|
|
7
|
-
--dx-g-card-img-spacing: 20px;
|
|
8
|
-
--dx-c-body-max-lines: 6;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.card-callout {
|
|
12
|
-
position: relative;
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* in the callout card's case it needs to be subservient to the other items in the grid */
|
|
18
|
-
.dx-card-base_override-width {
|
|
19
|
-
height: 100% !important;
|
|
20
|
-
min-height: unset !important;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/* title */
|
|
24
|
-
|
|
25
|
-
.dx-text-heading-3 {
|
|
26
|
-
color: inherit;
|
|
27
|
-
margin-bottom: var(--dx-g-spacing-3xl);
|
|
28
|
-
overflow-wrap: hyphenate-word;
|
|
29
|
-
hyphens: overflow;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/* label */
|
|
33
|
-
|
|
34
|
-
.dx-text-button-light {
|
|
35
|
-
color: inherit;
|
|
36
|
-
margin-top: auto;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* callout arrow */
|
|
40
|
-
|
|
41
|
-
@media screen and (max-width: 1024px) {
|
|
42
|
-
.dx-text-heading-3 {
|
|
43
|
-
margin-bottom: var(--dx-g-spacing-xl);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
h3.dx-text-heading-4 {
|
|
2
|
-
color: var(--dx-c-card-title-color);
|
|
3
|
-
transition: var(--dx-g-transition-hue-1x);
|
|
4
|
-
font-size: var(--dx-c-card-title-font-size);
|
|
5
|
-
line-height: var(--dx-c-card-title-line-height);
|
|
6
|
-
letter-spacing: var(--dx-c-card-title-letter-spacing);
|
|
7
|
-
word-break: break-word;
|
|
8
|
-
hyphens: auto;
|
|
9
|
-
font-family: var(--dx-g-font-display);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
a {
|
|
13
|
-
font-family: var(--dx-g-font-display);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.nowrap {
|
|
17
|
-
white-space: nowrap;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@media screen and (max-width: 1024px) {
|
|
21
|
-
.dx-text-heading-4 {
|
|
22
|
-
font-size: 20px;
|
|
23
|
-
line-height: 24px;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.container {
|
|
6
|
-
--error-color: var(--dx-g-red-vibrant-50);
|
|
7
|
-
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
align-items: flex-start;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.checkbox-label,
|
|
14
|
-
input {
|
|
15
|
-
cursor: pointer;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
label {
|
|
19
|
-
display: var(--dx-c-checkbox-display, flex);
|
|
20
|
-
align-items: var(--dx-c-checkbox-align-label, flex-start);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
input {
|
|
24
|
-
flex-shrink: 0;
|
|
25
|
-
margin: 0;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.checkbox-label {
|
|
29
|
-
line-height: var(--dx-c-checkbox-text-line-height, 20px);
|
|
30
|
-
font-size: var(--dx-c-checkbox-font-size, --dx-g-text-base);
|
|
31
|
-
transform: translateY(-2px);
|
|
32
|
-
padding-left: 12px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.checkbox-label::first-letter {
|
|
36
|
-
text-transform: uppercase;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.checkbox-error {
|
|
40
|
-
opacity: 0;
|
|
41
|
-
margin-top: var(--dx-g-spacing-xs);
|
|
42
|
-
user-select: none;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
input:disabled {
|
|
46
|
-
cursor: not-allowed;
|
|
47
|
-
opacity: 0.9;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
input:disabled + .checkbox-label {
|
|
51
|
-
cursor: not-allowed;
|
|
52
|
-
color: var(--sds-g-gray-9);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.container.show-error .checkbox-error {
|
|
56
|
-
opacity: 1;
|
|
57
|
-
user-select: auto;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/* adapted from https://css-tricks.com/custom-styling-form-inputs-with-modern-css-features/ */
|
|
61
|
-
@supports (-webkit-appearance: none) or (-moz-appearance: none) {
|
|
62
|
-
input {
|
|
63
|
-
--active-color: var(--dx-g-blue-vibrant-50);
|
|
64
|
-
--active-inner-color: #fff;
|
|
65
|
-
--focus-shadow: 1px var(--dx-g-blue-vibrant-80);
|
|
66
|
-
--border-color: var(--sds-g-gray-5);
|
|
67
|
-
--border-color-hover: var(--sds-g-gray-6);
|
|
68
|
-
--background: #fff;
|
|
69
|
-
--disabled-color: var(--sds-g-gray-4);
|
|
70
|
-
--disabled-inner-color: var(--dx-g-gray-60);
|
|
71
|
-
--size: var(--dx-g-spacing-md);
|
|
72
|
-
|
|
73
|
-
-webkit-appearance: none;
|
|
74
|
-
-moz-appearance: none;
|
|
75
|
-
height: var(--size);
|
|
76
|
-
width: var(--size);
|
|
77
|
-
outline: none;
|
|
78
|
-
display: inline-block;
|
|
79
|
-
vertical-align: top;
|
|
80
|
-
position: relative;
|
|
81
|
-
cursor: pointer;
|
|
82
|
-
border: 1px solid var(--border-color-override, var(--border-color));
|
|
83
|
-
background: var(--background-override, var(--background));
|
|
84
|
-
transition: var(--dx-g-transition-box-shadow-1x),
|
|
85
|
-
var(--dx-g-transition-hue-1x);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
input::after {
|
|
89
|
-
content: "";
|
|
90
|
-
display: block;
|
|
91
|
-
left: 0;
|
|
92
|
-
top: 0;
|
|
93
|
-
position: absolute;
|
|
94
|
-
opacity: var(--opacity, 0);
|
|
95
|
-
transition: transform var(--transition-duration-transform, 0.3s)
|
|
96
|
-
var(--transition-easing-transorm, ease),
|
|
97
|
-
opacity var(--transition-duration-opacity, 0.2s);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
input[type="checkbox"] {
|
|
101
|
-
border-radius: 2px;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
input[type="radio"] {
|
|
105
|
-
border-radius: 50%;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
input:disabled {
|
|
109
|
-
--background-override: var(--disabled-color);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
input:focus {
|
|
113
|
-
box-shadow: 0 0 0 var(--focus-shadow);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
input:checked {
|
|
117
|
-
--opacity: 1;
|
|
118
|
-
--transition-duration-opacity: 0.3s;
|
|
119
|
-
--transition-duration-transform: 0.6s;
|
|
120
|
-
--transition-easing-transorm: cubic-bezier(0.2, 0.85, 0.32, 1.2);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
input:disabled:checked {
|
|
124
|
-
--border-color-override: var(--border-color);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
input:hover:not(:disabled) {
|
|
128
|
-
--border-color-override: var(--border-color-hover);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
input[type="checkbox"]::after {
|
|
132
|
-
--checkbox-width: 4px;
|
|
133
|
-
--checkbox-height: 8px;
|
|
134
|
-
|
|
135
|
-
width: var(--checkbox-width);
|
|
136
|
-
height: var(--checkbox-height);
|
|
137
|
-
border: 2px solid var(--active-color);
|
|
138
|
-
border-top: 0;
|
|
139
|
-
border-left: 0;
|
|
140
|
-
left: calc(50% - var(--checkbox-width) / 2);
|
|
141
|
-
top: calc(50% - var(--checkbox-height) / 2);
|
|
142
|
-
transform: rotate(var(--checkbox-rotation, 20deg));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
input[type="checkbox"]:checked {
|
|
146
|
-
--checkbox-rotation: 43deg;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
input[type="radio"]::after {
|
|
150
|
-
--opacity: 0;
|
|
151
|
-
|
|
152
|
-
width: 8px;
|
|
153
|
-
height: 8px;
|
|
154
|
-
border-radius: 50%;
|
|
155
|
-
background: var(--active-color);
|
|
156
|
-
margin: 3px;
|
|
157
|
-
transition: var(--dx-g-transition-hue-1x);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
input:checked[type="radio"]::after {
|
|
161
|
-
--opacity: 1;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.container.show-error input {
|
|
165
|
-
--border-color-override: var(--error-color) !important;
|
|
166
|
-
|
|
167
|
-
box-shadow: 0 0 0 1px var(--error-color) !important;
|
|
168
|
-
}
|
|
169
|
-
}
|