@danske/sapphire-css 32.2.1 → 33.0.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/build/themes/cjs/default-dark.js +1 -1
- package/build/themes/cjs/default.js +2 -1
- package/build/themes/cjs/index.d.ts +2 -1
- package/build/themes/esm/default-dark.js +1 -1
- package/build/themes/esm/default.js +2 -1
- package/build/themes/esm/index.d.ts +2 -1
- package/components/accordion/accordion.module.css +38 -40
- package/components/avatar/avatar.module.css +61 -51
- package/components/avatar/avatar.module.css.d.ts +4 -4
- package/components/backdrop/backdrop.module.css +3 -3
- package/components/badge/badge.module.css +257 -135
- package/components/badge/badge.module.css.d.ts +3 -3
- package/components/button/button.module.css +200 -400
- package/components/button/button.module.css.d.ts +6 -7
- package/components/buttonGroup/buttonGroup.module.css +6 -6
- package/components/buttonGroup/buttonGroup.module.css.d.ts +2 -2
- package/components/calendar/calendar.module.css +90 -86
- package/components/checkbox/checkbox.module.css +59 -51
- package/components/checkbox/checkbox.module.css.d.ts +2 -2
- package/components/contextualHelp/contextualHelp.module.css +13 -10
- package/components/dateField/dateField.module.css +66 -64
- package/components/dateField/dateField.module.css.d.ts +1 -1
- package/components/dialog/dialog.module.css +13 -13
- package/components/dialog/dialog.module.css.d.ts +4 -4
- package/components/dropzone/dropzone.module.css +29 -23
- package/components/feedbackMessage/feedbackMessage.module.css +15 -15
- package/components/field/field.module.css +16 -16
- package/components/field/field.module.css.d.ts +1 -1
- package/components/fieldGroup/fieldGroup.module.css +4 -4
- package/components/fieldGroup/fieldGroup.module.css.d.ts +1 -1
- package/components/heading/heading.module.css +37 -85
- package/components/icon/icon.module.css +12 -12
- package/components/icon/icon.module.css.d.ts +4 -4
- package/components/iconButton/iconButton.module.css +130 -366
- package/components/iconButton/iconButton.module.css.d.ts +7 -8
- package/components/label/label.module.css +11 -11
- package/components/label/label.module.css.d.ts +1 -1
- package/components/labeledValue/labeledValue.module.css +7 -7
- package/components/labeledValue/labeledValue.module.css.d.ts +2 -2
- package/components/link/link.module.css +22 -22
- package/components/link/link.module.css.d.ts +2 -2
- package/components/list/list.module.css +41 -31
- package/components/listbox/listbox.module.css +80 -66
- package/components/listbox/listbox.module.css.d.ts +2 -2
- package/components/modalLayout/modalLayout.module.css +9 -11
- package/components/notificationBadge/notificationBadge.module.css +23 -25
- package/components/notificationBadge/notificationBadge.module.css.d.ts +3 -3
- package/components/pagination/pagination.module.css +16 -16
- package/components/panel/panel.module.css +4 -4
- package/components/panel/panel.module.css.d.ts +1 -1
- package/components/paragraph/paragraph.module.css +8 -8
- package/components/paragraph/paragraph.module.css.d.ts +2 -2
- package/components/popover/popover.module.css +6 -6
- package/components/radio/radio.module.css +32 -32
- package/components/radio/radio.module.css.d.ts +1 -1
- package/components/searchField/searchField.module.css +41 -45
- package/components/searchField/searchField.module.css.d.ts +1 -2
- package/components/segmentedControl/segmentedControl.module.css +33 -35
- package/components/segmentedControl/segmentedControl.module.css.d.ts +2 -2
- package/components/select/select.module.css +32 -32
- package/components/select/select.module.css.d.ts +1 -1
- package/components/skeleton/skeleton.module.css +6 -8
- package/components/spinner/spinner.module.css +22 -22
- package/components/spinner/spinner.module.css.d.ts +4 -4
- package/components/surface/surface.module.css +3 -7
- package/components/surface/surface.module.css.d.ts +0 -1
- package/components/switch/switch.module.css +45 -39
- package/components/switch/switch.module.css.d.ts +1 -1
- package/components/table/table.module.css +61 -50
- package/components/tabs/tabs.module.css +46 -45
- package/components/tabs/tabs.module.css.d.ts +2 -2
- package/components/tag/tag.module.css +32 -24
- package/components/text/text.module.css +48 -96
- package/components/textField/textField.module.css +78 -72
- package/components/textField/textField.module.css.d.ts +1 -1
- package/components/toast/toast.module.css +17 -19
- package/components/tooltip/tooltip.module.css +12 -12
- package/package.json +3 -3
- package/themes/default-dark.js +1 -1
- package/themes/default.js +2 -1
- package/themes/index.d.ts +2 -1
- package/build/themes/cjs/june-dark.d.ts +0 -5
- package/build/themes/cjs/june-dark.js +0 -13
- package/build/themes/cjs/june.d.ts +0 -5
- package/build/themes/cjs/june.js +0 -13
- package/build/themes/esm/june-dark.d.ts +0 -5
- package/build/themes/esm/june-dark.js +0 -8
- package/build/themes/esm/june.d.ts +0 -5
- package/build/themes/esm/june.js +0 -8
- package/themes/default-dark.css +0 -2
- package/themes/june-dark.css +0 -3
- package/themes/june-dark.d.ts +0 -5
- package/themes/june-dark.js +0 -13
- package/themes/june-dark.scss +0 -3
- package/themes/june.css +0 -3
- package/themes/june.d.ts +0 -5
- package/themes/june.js +0 -13
- package/themes/june.scss +0 -3
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
}
|
|
6
6
|
60%,
|
|
7
7
|
65% {
|
|
8
|
-
opacity: var(--sapphire-
|
|
8
|
+
opacity: var(--sapphire-global-opacity-35);
|
|
9
9
|
}
|
|
10
10
|
100% {
|
|
11
11
|
opacity: 1;
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
.sapphire-skeleton {
|
|
16
16
|
width: 100%;
|
|
17
17
|
|
|
18
|
-
background-color: var(--sapphire-
|
|
18
|
+
background-color: var(--sapphire-global-color-sapphire-100);
|
|
19
19
|
|
|
20
20
|
animation: skeletonPulse infinite cubic-bezier(0.25, 0, 0.25, 1);
|
|
21
|
-
animation-duration: var(--sapphire-
|
|
21
|
+
animation-duration: var(--sapphire-semantic-time-fade-slow);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.sapphire-skeleton--text {
|
|
@@ -26,19 +26,17 @@
|
|
|
26
26
|
* We thus calculate that ratio from 1em to cater for
|
|
27
27
|
* cases where context has other size than 16px.
|
|
28
28
|
*/
|
|
29
|
-
height: calc(var(--sapphire-
|
|
29
|
+
height: calc(var(--sapphire-global-size-ratio-height) * 1em);
|
|
30
30
|
/* We're translating on y-axis half of the remaining space from above ratio up to 1
|
|
31
31
|
* Thus in this case pushing bar 1/16 down to leave that space above and below.
|
|
32
32
|
* Ie. center it vertically, but still according to font-size in context.
|
|
33
33
|
*/
|
|
34
34
|
transform: translateY(
|
|
35
|
-
calc(
|
|
36
|
-
(1 - var(--sapphire-skeleton-size-text-height-context-ratio)) / 2 * 1em
|
|
37
|
-
)
|
|
35
|
+
calc((1 - var(--sapphire-global-size-ratio-height)) / 2 * 1em)
|
|
38
36
|
);
|
|
39
37
|
/* For responding to text-align on parent */
|
|
40
38
|
display: inline-block;
|
|
41
|
-
border-radius: var(--sapphire-
|
|
39
|
+
border-radius: var(--sapphire-semantic-size-radius-sm);
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
.sapphire-skeleton--circle {
|
|
@@ -13,25 +13,25 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.sapphire-spinner {
|
|
16
|
-
width: var(--sapphire-
|
|
17
|
-
height: var(--sapphire-
|
|
16
|
+
width: var(--sapphire-global-size-generic-100);
|
|
17
|
+
height: var(--sapphire-global-size-generic-100);
|
|
18
18
|
|
|
19
|
-
animation: rotate var(--sapphire-
|
|
19
|
+
animation: rotate var(--sapphire-semantic-time-motion-very-slow)
|
|
20
20
|
cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
21
21
|
animation-iteration-count: infinite;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.sapphire-spinner__track {
|
|
25
|
-
fill: var(--sapphire-
|
|
25
|
+
fill: var(--sapphire-semantic-color-content-default-primary);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.sapphire-spinner__accent {
|
|
29
|
-
fill: var(--sapphire-
|
|
29
|
+
fill: var(--sapphire-semantic-color-background-action-primary-default);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.sapphire-spinner--inherit .sapphire-spinner__track {
|
|
33
33
|
fill: currentColor;
|
|
34
|
-
opacity: var(--sapphire-
|
|
34
|
+
opacity: var(--sapphire-semantic-opacity-50);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.sapphire-spinner--inherit .sapphire-spinner__accent {
|
|
@@ -42,32 +42,32 @@
|
|
|
42
42
|
* Sizes
|
|
43
43
|
*/
|
|
44
44
|
|
|
45
|
-
.sapphire-spinner--
|
|
46
|
-
width: var(--sapphire-
|
|
47
|
-
height: var(--sapphire-
|
|
45
|
+
.sapphire-spinner--3xs {
|
|
46
|
+
width: var(--sapphire-global-size-generic-40);
|
|
47
|
+
height: var(--sapphire-global-size-generic-40);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.sapphire-spinner--
|
|
51
|
-
width: var(--sapphire-
|
|
52
|
-
height: var(--sapphire-
|
|
50
|
+
.sapphire-spinner--2xs {
|
|
51
|
+
width: var(--sapphire-global-size-generic-50);
|
|
52
|
+
height: var(--sapphire-global-size-generic-50);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.sapphire-spinner--xs {
|
|
56
|
-
width: var(--sapphire-
|
|
57
|
-
height: var(--sapphire-
|
|
56
|
+
width: var(--sapphire-global-size-generic-60);
|
|
57
|
+
height: var(--sapphire-global-size-generic-60);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
.sapphire-spinner--
|
|
61
|
-
width: var(--sapphire-
|
|
62
|
-
height: var(--sapphire-
|
|
60
|
+
.sapphire-spinner--sm {
|
|
61
|
+
width: var(--sapphire-global-size-generic-80);
|
|
62
|
+
height: var(--sapphire-global-size-generic-80);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.sapphire-spinner--
|
|
66
|
-
width: var(--sapphire-
|
|
67
|
-
height: var(--sapphire-
|
|
65
|
+
.sapphire-spinner--lg {
|
|
66
|
+
width: var(--sapphire-global-size-generic-120);
|
|
67
|
+
height: var(--sapphire-global-size-generic-120);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.sapphire-spinner--xl {
|
|
71
|
-
width: var(--sapphire-
|
|
72
|
-
height: var(--sapphire-
|
|
71
|
+
width: var(--sapphire-global-size-generic-160);
|
|
72
|
+
height: var(--sapphire-global-size-generic-160);
|
|
73
73
|
}
|
|
@@ -4,11 +4,11 @@ declare const styles: {
|
|
|
4
4
|
readonly "sapphire-spinner__track": string;
|
|
5
5
|
readonly "sapphire-spinner__accent": string;
|
|
6
6
|
readonly "sapphire-spinner--inherit": string;
|
|
7
|
-
readonly "sapphire-spinner--
|
|
8
|
-
readonly "sapphire-spinner--
|
|
7
|
+
readonly "sapphire-spinner--3xs": string;
|
|
8
|
+
readonly "sapphire-spinner--2xs": string;
|
|
9
9
|
readonly "sapphire-spinner--xs": string;
|
|
10
|
-
readonly "sapphire-spinner--
|
|
11
|
-
readonly "sapphire-spinner--
|
|
10
|
+
readonly "sapphire-spinner--sm": string;
|
|
11
|
+
readonly "sapphire-spinner--lg": string;
|
|
12
12
|
readonly "sapphire-spinner--xl": string;
|
|
13
13
|
};
|
|
14
14
|
export = styles;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.sapphire-surface {
|
|
2
|
-
font-family: var(--sapphire-
|
|
3
|
-
background-color: var(--sapphire-
|
|
4
|
-
color: var(--sapphire-
|
|
2
|
+
font-family: var(--sapphire-semantic-font-name-default);
|
|
3
|
+
background-color: var(--sapphire-semantic-color-background-surface);
|
|
4
|
+
color: var(--sapphire-semantic-color-content-default-primary);
|
|
5
5
|
|
|
6
6
|
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
7
7
|
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
@@ -17,7 +17,3 @@
|
|
|
17
17
|
-webkit-font-smoothing: antialiased;
|
|
18
18
|
-moz-osx-font-smoothing: grayscale;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
.sapphire-surface--secondary {
|
|
22
|
-
background-color: var(--sapphire-surface-color-background-secondary);
|
|
23
|
-
}
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
align-items: center;
|
|
8
8
|
position: relative;
|
|
9
9
|
max-width: 100%;
|
|
10
|
-
gap: var(--sapphire-
|
|
10
|
+
gap: var(--sapphire-semantic-size-spacing-30);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.sapphire-switch--
|
|
14
|
-
gap: var(--sapphire-
|
|
13
|
+
.sapphire-switch--md {
|
|
14
|
+
gap: var(--sapphire-semantic-size-spacing-20);
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* hidden html input
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
.sapphire-switch-label {
|
|
37
37
|
display: flex;
|
|
38
38
|
align-items: center;
|
|
39
|
-
gap: var(--sapphire-
|
|
40
|
-
font-family: var(--sapphire-
|
|
41
|
-
font-weight: var(--sapphire-
|
|
42
|
-
font-size: var(--sapphire-
|
|
43
|
-
line-height: var(--sapphire-
|
|
44
|
-
color: var(--sapphire-
|
|
39
|
+
gap: var(--sapphire-semantic-size-spacing-30);
|
|
40
|
+
font-family: var(--sapphire-semantic-font-name-default);
|
|
41
|
+
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
42
|
+
font-size: var(--sapphire-semantic-size-font-control-default);
|
|
43
|
+
line-height: var(--sapphire-semantic-size-height-control-xs);
|
|
44
|
+
color: var(--sapphire-semantic-color-content-default-primary);
|
|
45
45
|
|
|
46
46
|
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
47
47
|
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
@@ -58,33 +58,35 @@
|
|
|
58
58
|
-moz-osx-font-smoothing: grayscale;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.sapphire-switch--
|
|
62
|
-
gap: var(--sapphire-
|
|
63
|
-
font-size: var(--sapphire-
|
|
64
|
-
line-height: var(--sapphire-
|
|
61
|
+
.sapphire-switch--md .sapphire-switch-label {
|
|
62
|
+
gap: var(--sapphire-semantic-size-spacing-20);
|
|
63
|
+
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
64
|
+
line-height: var(--sapphire-semantic-size-height-control-2xs);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* knob track
|
|
69
69
|
*/
|
|
70
70
|
.sapphire-switch-track {
|
|
71
|
-
background: var(--sapphire-
|
|
71
|
+
background: var(--sapphire-semantic-color-border-control-default);
|
|
72
72
|
box-sizing: border-box;
|
|
73
73
|
position: relative;
|
|
74
|
-
width: var(--sapphire-
|
|
75
|
-
transition: background var(--sapphire-
|
|
76
|
-
height: var(--sapphire-
|
|
77
|
-
border-radius: calc(var(--sapphire-
|
|
74
|
+
width: var(--sapphire-global-size-generic-100);
|
|
75
|
+
transition: background var(--sapphire-semantic-time-motion-quick) ease-in-out;
|
|
76
|
+
height: var(--sapphire-semantic-size-height-control-xs);
|
|
77
|
+
border-radius: calc(var(--sapphire-semantic-size-height-control-xs) / 2);
|
|
78
78
|
}
|
|
79
79
|
.sapphire-switch-input:checked ~ .sapphire-switch-track {
|
|
80
|
-
background-color: var(
|
|
80
|
+
background-color: var(
|
|
81
|
+
--sapphire-semantic-color-background-action-primary-default
|
|
82
|
+
);
|
|
81
83
|
}
|
|
82
84
|
/* hover (unchecked) */
|
|
83
85
|
.sapphire-switch:not(:active):not(.is-active):not(.js-hover):hover
|
|
84
86
|
.sapphire-switch-input:not(:disabled)
|
|
85
87
|
~ .sapphire-switch-track,
|
|
86
88
|
.sapphire-switch:not(:active):not(.is-active).is-hover .sapphire-switch-track {
|
|
87
|
-
background-color: var(--sapphire-
|
|
89
|
+
background-color: var(--sapphire-semantic-color-border-control-hover);
|
|
88
90
|
}
|
|
89
91
|
/* hover (checked) */
|
|
90
92
|
.sapphire-switch:not(:active):not(.is-active):not(.js-hover):hover
|
|
@@ -93,16 +95,18 @@
|
|
|
93
95
|
.sapphire-switch:not(:active):not(.is-active).is-hover
|
|
94
96
|
.sapphire-switch-input:checked
|
|
95
97
|
~ .sapphire-switch-track {
|
|
96
|
-
background-color: var(
|
|
98
|
+
background-color: var(
|
|
99
|
+
--sapphire-semantic-color-background-action-primary-hover
|
|
100
|
+
);
|
|
97
101
|
}
|
|
98
102
|
/* focus */
|
|
99
103
|
.sapphire-switch:not(.js-focus)
|
|
100
104
|
.sapphire-switch-input:focus-visible
|
|
101
105
|
~ .sapphire-switch-track,
|
|
102
106
|
.sapphire-switch.is-focus .sapphire-switch-track {
|
|
103
|
-
outline: var(--sapphire-
|
|
104
|
-
var(--sapphire-
|
|
105
|
-
outline-offset: var(--sapphire-
|
|
107
|
+
outline: var(--sapphire-semantic-size-focus-ring) solid
|
|
108
|
+
var(--sapphire-semantic-color-focus-ring);
|
|
109
|
+
outline-offset: var(--sapphire-semantic-size-focus-ring);
|
|
106
110
|
}
|
|
107
111
|
/* active (checked) */
|
|
108
112
|
.sapphire-switch:active
|
|
@@ -111,7 +115,9 @@
|
|
|
111
115
|
.sapphire-switch.is-active
|
|
112
116
|
.sapphire-switch-input:not(:disabled):checked
|
|
113
117
|
~ .sapphire-switch-track {
|
|
114
|
-
background-color: var(
|
|
118
|
+
background-color: var(
|
|
119
|
+
--sapphire-semantic-color-background-action-primary-active
|
|
120
|
+
);
|
|
115
121
|
}
|
|
116
122
|
/* active (unchecked) */
|
|
117
123
|
.sapphire-switch:active
|
|
@@ -120,7 +126,7 @@
|
|
|
120
126
|
.sapphire-switch.is-active
|
|
121
127
|
.sapphire-switch-input:not(:disabled)
|
|
122
128
|
~ .sapphire-switch-track {
|
|
123
|
-
background-color: var(--sapphire-
|
|
129
|
+
background-color: var(--sapphire-semantic-color-border-control-active);
|
|
124
130
|
}
|
|
125
131
|
/* disabled */
|
|
126
132
|
.sapphire-switch-input:disabled {
|
|
@@ -129,7 +135,7 @@
|
|
|
129
135
|
|
|
130
136
|
.sapphire-switch-input:disabled ~ .sapphire-switch-track,
|
|
131
137
|
.sapphire-switch-input:disabled ~ .sapphire-switch-label {
|
|
132
|
-
opacity: var(--sapphire-
|
|
138
|
+
opacity: var(--sapphire-semantic-opacity-disabled);
|
|
133
139
|
}
|
|
134
140
|
|
|
135
141
|
/**
|
|
@@ -142,29 +148,29 @@
|
|
|
142
148
|
|
|
143
149
|
/* a padding would be simpler and achieve the same UI but we need a shadow
|
|
144
150
|
* around the edges of the knob */
|
|
145
|
-
height: calc(100% - (2 * var(--sapphire-
|
|
146
|
-
margin: var(--sapphire-
|
|
151
|
+
height: calc(100% - (2 * var(--sapphire-global-size-static-5)));
|
|
152
|
+
margin: var(--sapphire-global-size-static-5);
|
|
147
153
|
|
|
148
154
|
aspect-ratio: 1/1;
|
|
149
155
|
border-radius: 50%;
|
|
150
|
-
background-color: var(--sapphire-
|
|
156
|
+
background-color: var(--sapphire-semantic-color-background-control-default);
|
|
151
157
|
background-clip: content-box;
|
|
152
158
|
left: 0;
|
|
153
|
-
transition: left var(--sapphire-
|
|
154
|
-
box-shadow: var(--sapphire-
|
|
159
|
+
transition: left var(--sapphire-semantic-time-motion-quick) ease-in-out;
|
|
160
|
+
box-shadow: var(--sapphire-global-shadow-sm);
|
|
155
161
|
}
|
|
156
162
|
.sapphire-switch-input:checked ~ .sapphire-switch-track::after {
|
|
157
|
-
left: calc(100% - var(--sapphire-
|
|
163
|
+
left: calc(100% - var(--sapphire-semantic-size-height-control-xs));
|
|
158
164
|
}
|
|
159
165
|
|
|
160
|
-
.sapphire-switch--
|
|
161
|
-
width: var(--sapphire-
|
|
162
|
-
height: var(--sapphire-
|
|
163
|
-
border-radius: calc(var(--sapphire-
|
|
166
|
+
.sapphire-switch--md .sapphire-switch-track {
|
|
167
|
+
width: var(--sapphire-global-size-generic-80);
|
|
168
|
+
height: var(--sapphire-semantic-size-height-control-2xs);
|
|
169
|
+
border-radius: calc(var(--sapphire-semantic-size-height-control-2xs) / 2);
|
|
164
170
|
}
|
|
165
171
|
|
|
166
|
-
.sapphire-switch--
|
|
172
|
+
.sapphire-switch--md
|
|
167
173
|
.sapphire-switch-input:checked
|
|
168
174
|
~ .sapphire-switch-track::after {
|
|
169
|
-
left: calc(100% - var(--sapphire-
|
|
175
|
+
left: calc(100% - var(--sapphire-semantic-size-height-control-2xs));
|
|
170
176
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
2
|
readonly "sapphire-switch": string;
|
|
3
|
-
readonly "sapphire-switch--
|
|
3
|
+
readonly "sapphire-switch--md": string;
|
|
4
4
|
readonly "sapphire-switch-input": string;
|
|
5
5
|
readonly "sapphire-switch-label": string;
|
|
6
6
|
readonly "sapphire-switch-track": string;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
.sapphire-table__table {
|
|
29
29
|
border-collapse: collapse;
|
|
30
30
|
border-spacing: 0;
|
|
31
|
-
background-color: var(--sapphire-
|
|
31
|
+
background-color: var(--sapphire-semantic-color-background-surface);
|
|
32
32
|
width: 100%;
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
.sapphire-table__head {
|
|
48
48
|
top: 0;
|
|
49
49
|
z-index: 2; /* Setting to two because body rows are positioned relative */
|
|
50
|
-
line-height: var(--sapphire-
|
|
51
|
-
background-color: var(--sapphire-
|
|
50
|
+
line-height: var(--sapphire-semantic-size-line-height-md);
|
|
51
|
+
background-color: var(--sapphire-semantic-color-background-surface);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.sapphire-table__head--sticky {
|
|
@@ -73,20 +73,18 @@
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.sapphire-table__headCell {
|
|
76
|
-
color: var(--sapphire-
|
|
76
|
+
color: var(--sapphire-semantic-color-content-default-primary);
|
|
77
77
|
box-sizing: border-box;
|
|
78
|
-
font-size: var(--sapphire-
|
|
79
|
-
font-family: var(--sapphire-
|
|
80
|
-
font-weight: var(--sapphire-
|
|
81
|
-
line-height: var(--sapphire-
|
|
82
|
-
padding: var(--sapphire-table-size-spacing-head-cell-vertical-default)
|
|
83
|
-
var(--sapphire-table-size-spacing-head-cell-horizontal-default);
|
|
78
|
+
font-size: var(--sapphire-semantic-size-font-text-md);
|
|
79
|
+
font-family: var(--sapphire-semantic-font-name-default);
|
|
80
|
+
font-weight: var(--sapphire-semantic-font-weight-default-semibold);
|
|
81
|
+
line-height: var(--sapphire-semantic-size-line-height-md);
|
|
84
82
|
vertical-align: top;
|
|
85
83
|
}
|
|
86
84
|
|
|
87
85
|
.sapphire-table__headCell_container {
|
|
88
|
-
padding: var(--sapphire-
|
|
89
|
-
var(--sapphire-
|
|
86
|
+
padding: var(--sapphire-semantic-size-spacing-20)
|
|
87
|
+
var(--sapphire-semantic-size-spacing-30);
|
|
90
88
|
display: inline-flex;
|
|
91
89
|
align-items: center;
|
|
92
90
|
box-sizing: border-box;
|
|
@@ -125,16 +123,16 @@
|
|
|
125
123
|
.sapphire-table__row.is-focus,
|
|
126
124
|
.sapphire-table__row:not(.js-focus):focus-visible {
|
|
127
125
|
outline: none;
|
|
128
|
-
border-radius: var(--sapphire-
|
|
129
|
-
box-shadow: inset 0px 0px 0px var(--sapphire-
|
|
130
|
-
var(--sapphire-
|
|
126
|
+
border-radius: var(--sapphire-semantic-size-radius-sm);
|
|
127
|
+
box-shadow: inset 0px 0px 0px var(--sapphire-semantic-size-focus-ring)
|
|
128
|
+
var(--sapphire-semantic-color-focus-ring);
|
|
131
129
|
}
|
|
132
130
|
|
|
133
131
|
.sapphire-table__headCell.is-focus .sapphire-table__headCell_container,
|
|
134
132
|
.sapphire-table__headCell:not(.js-focus):focus-visible
|
|
135
133
|
.sapphire-table__headCell_container {
|
|
136
134
|
/* According to the designs, for header cells only, focus has a border radius. */
|
|
137
|
-
border-radius: var(--sapphire-
|
|
135
|
+
border-radius: var(--sapphire-semantic-size-radius-sm);
|
|
138
136
|
}
|
|
139
137
|
/* end of focus styles */
|
|
140
138
|
|
|
@@ -144,8 +142,10 @@
|
|
|
144
142
|
.js-hover
|
|
145
143
|
):hover
|
|
146
144
|
.sapphire-table__headCell_container {
|
|
147
|
-
background-color: var(
|
|
148
|
-
|
|
145
|
+
background-color: var(
|
|
146
|
+
--sapphire-semantic-color-background-action-secondary-default
|
|
147
|
+
);
|
|
148
|
+
border-radius: var(--sapphire-semantic-size-radius-sm);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
.sapphire-table__headCell.sapphire-table__headCell--sortable {
|
|
@@ -159,16 +159,16 @@
|
|
|
159
159
|
|
|
160
160
|
.sapphire-table__headCell--sorted .sapphire-table-sortedIcon {
|
|
161
161
|
visibility: visible;
|
|
162
|
-
padding-left: var(--sapphire-
|
|
162
|
+
padding-left: var(--sapphire-semantic-size-spacing-20);
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
.sapphire-table__headCell .sapphire-table-sortedIcon,
|
|
166
166
|
.sapphire-table__headCell .sapphire-table-sortableIcon {
|
|
167
|
-
padding-left: var(--sapphire-
|
|
167
|
+
padding-left: var(--sapphire-semantic-size-spacing-20);
|
|
168
168
|
}
|
|
169
169
|
.sapphire-table__cell--alignRight .sapphire-table-sortedIcon,
|
|
170
170
|
.sapphire-table__cell--alignRight .sapphire-table-sortableIcon {
|
|
171
|
-
padding-right: var(--sapphire-
|
|
171
|
+
padding-right: var(--sapphire-semantic-size-spacing-20);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
.sapphire-table__headCell__text,
|
|
@@ -184,9 +184,9 @@
|
|
|
184
184
|
|
|
185
185
|
.sapphire-table__cell {
|
|
186
186
|
box-sizing: border-box;
|
|
187
|
-
color: var(--sapphire-
|
|
188
|
-
font-family: var(--sapphire-
|
|
189
|
-
font-weight: var(--sapphire-
|
|
187
|
+
color: var(--sapphire-semantic-color-content-default-primary);
|
|
188
|
+
font-family: var(--sapphire-semantic-font-name-default);
|
|
189
|
+
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
/* Overflow behaviour */
|
|
@@ -199,51 +199,55 @@
|
|
|
199
199
|
|
|
200
200
|
.sapphire-table__cell,
|
|
201
201
|
.sapphire-table__selectionCell {
|
|
202
|
-
font-size: var(--sapphire-
|
|
203
|
-
line-height: var(--sapphire-
|
|
204
|
-
padding: var(--sapphire-
|
|
205
|
-
var(--sapphire-
|
|
202
|
+
font-size: var(--sapphire-semantic-size-font-text-lg);
|
|
203
|
+
line-height: var(--sapphire-semantic-size-line-height-md);
|
|
204
|
+
padding: var(--sapphire-semantic-size-spacing-30)
|
|
205
|
+
var(--sapphire-semantic-size-spacing-30);
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
/* Selection cells that are suppose to contain only a checkbox */
|
|
209
209
|
.sapphire-table__selectionCell {
|
|
210
210
|
line-height: 0;
|
|
211
|
-
padding-left: var(--sapphire-
|
|
212
|
-
width: var(--sapphire-
|
|
211
|
+
padding-left: var(--sapphire-semantic-size-spacing-50);
|
|
212
|
+
width: var(--sapphire-global-size-generic-50);
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
.sapphire-table__selectionCell:not(:first-child) {
|
|
216
|
-
padding-left: var(--sapphire-
|
|
216
|
+
padding-left: var(--sapphire-semantic-size-spacing-30);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
.sapphire-table__cell:first-child {
|
|
220
|
-
padding-left: var(--sapphire-
|
|
220
|
+
padding-left: var(--sapphire-semantic-size-spacing-50);
|
|
221
221
|
}
|
|
222
222
|
.sapphire-table__cell:last-child {
|
|
223
|
-
padding-right: var(--sapphire-
|
|
223
|
+
padding-right: var(--sapphire-semantic-size-spacing-50);
|
|
224
224
|
}
|
|
225
225
|
.sapphire-table__headCell:first-child {
|
|
226
|
-
padding-left: var(--sapphire-
|
|
226
|
+
padding-left: var(--sapphire-semantic-size-spacing-30);
|
|
227
227
|
}
|
|
228
228
|
.sapphire-table__headCell:last-child {
|
|
229
|
-
padding-right: var(--sapphire-
|
|
229
|
+
padding-right: var(--sapphire-semantic-size-spacing-30);
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
.sapphire-table__row {
|
|
233
233
|
position: relative;
|
|
234
|
-
border-bottom: var(--sapphire-semantic-size-border-
|
|
235
|
-
var(--sapphire-
|
|
234
|
+
border-bottom: var(--sapphire-semantic-size-border-sm) solid
|
|
235
|
+
var(--sapphire-semantic-color-border-separator-default);
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
.sapphire-table__row--active {
|
|
239
239
|
/* We want active to override, focus, hover or selected. Using css selectors or priority to
|
|
240
240
|
* to achieve that adds a lot complexity which seems to justify the use of "!important" here.
|
|
241
241
|
*/
|
|
242
|
-
background-color: var(
|
|
242
|
+
background-color: var(
|
|
243
|
+
--sapphire-semantic-color-background-action-tertiary-ghost-default
|
|
244
|
+
) !important;
|
|
243
245
|
}
|
|
244
246
|
|
|
245
247
|
.sapphire-table__row--selected {
|
|
246
|
-
background-color: var(
|
|
248
|
+
background-color: var(
|
|
249
|
+
--sapphire-semantic-color-background-action-secondary-default
|
|
250
|
+
);
|
|
247
251
|
}
|
|
248
252
|
|
|
249
253
|
/**
|
|
@@ -256,14 +260,14 @@
|
|
|
256
260
|
}
|
|
257
261
|
|
|
258
262
|
.sapphire-table__row-expanded-view {
|
|
259
|
-
border-bottom: var(--sapphire-semantic-size-border-
|
|
260
|
-
var(--sapphire-
|
|
263
|
+
border-bottom: var(--sapphire-semantic-size-border-sm) solid
|
|
264
|
+
var(--sapphire-semantic-color-border-separator-default);
|
|
261
265
|
}
|
|
262
266
|
|
|
263
267
|
.sapphire-table__row-expand-button {
|
|
264
268
|
display: inline-flex; /* for transform to take effect */
|
|
265
|
-
transition: transform ease-in-out var(--sapphire-
|
|
266
|
-
margin-left: var(--sapphire-
|
|
269
|
+
transition: transform ease-in-out var(--sapphire-semantic-time-motion-quick);
|
|
270
|
+
margin-left: var(--sapphire-semantic-size-spacing-20);
|
|
267
271
|
}
|
|
268
272
|
|
|
269
273
|
.sapphire-table td:has(.sapphire-table__row-expand-button) {
|
|
@@ -291,18 +295,22 @@
|
|
|
291
295
|
.sapphire-table__row--interactive.is-hover,
|
|
292
296
|
.sapphire-table--interactive .sapphire-table__row:not(.js-hover):hover,
|
|
293
297
|
.sapphire-table__row--interactive:not(.js-hover):hover {
|
|
294
|
-
background-color: var(
|
|
298
|
+
background-color: var(
|
|
299
|
+
--sapphire-semantic-color-background-action-secondary-default
|
|
300
|
+
);
|
|
295
301
|
cursor: pointer;
|
|
296
302
|
}
|
|
297
303
|
|
|
298
304
|
.sapphire-table__row--highlighted {
|
|
299
|
-
background-color: var(
|
|
305
|
+
background-color: var(
|
|
306
|
+
--sapphire-semantic-color-background-action-secondary-default
|
|
307
|
+
);
|
|
300
308
|
}
|
|
301
309
|
.sapphire-table__row--highlighted > *:first-child /* setting the highlight style on the first cell,
|
|
302
310
|
since box-shadow is used for separator on rows,
|
|
303
311
|
and to avoid the complications of merging the two shadows */ {
|
|
304
|
-
box-shadow: inset var(--sapphire-
|
|
305
|
-
var(--sapphire-
|
|
312
|
+
box-shadow: inset var(--sapphire-global-size-generic-5) 0px 0px 0px
|
|
313
|
+
var(--sapphire-semantic-color-background-informative-primary-default);
|
|
306
314
|
}
|
|
307
315
|
|
|
308
316
|
/**
|
|
@@ -312,9 +320,11 @@ and to avoid the complications of merging the two shadows */ {
|
|
|
312
320
|
display: flex;
|
|
313
321
|
align-items: center;
|
|
314
322
|
justify-content: space-between;
|
|
315
|
-
padding: var(--sapphire-
|
|
316
|
-
var(--sapphire-
|
|
317
|
-
background-color: var(
|
|
323
|
+
padding: var(--sapphire-semantic-size-spacing-30)
|
|
324
|
+
var(--sapphire-semantic-size-spacing-50);
|
|
325
|
+
background-color: var(
|
|
326
|
+
--sapphire-semantic-color-background-action-secondary-default
|
|
327
|
+
);
|
|
318
328
|
}
|
|
319
329
|
|
|
320
330
|
/**
|
|
@@ -324,6 +334,7 @@ and to avoid the complications of merging the two shadows */ {
|
|
|
324
334
|
.sapphire-table__footer {
|
|
325
335
|
position: relative;
|
|
326
336
|
z-index: 2; /* Setting to two because body rows are positioned relative */
|
|
337
|
+
margin-top: var(--sapphire-semantic-size-spacing-20);
|
|
327
338
|
}
|
|
328
339
|
|
|
329
340
|
.sapphire-table__footer--sticky {
|