@danske/sapphire-css 39.0.0 → 40.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 -0
- package/build/themes/cjs/default.js +1 -0
- package/build/themes/cjs/index.d.ts +1 -0
- package/build/themes/esm/default-dark.js +1 -0
- package/build/themes/esm/default.js +1 -0
- package/build/themes/esm/index.d.ts +1 -0
- package/components/accordion/accordion.module.css +26 -26
- package/components/avatar/avatar.module.css +55 -78
- package/components/avatar/avatar.module.css.d.ts +16 -21
- package/components/backdrop/backdrop.module.css +5 -5
- package/components/badge/badge.module.css +76 -324
- package/components/badge/badge.module.css.d.ts +16 -34
- package/components/button/button.module.css +180 -263
- package/components/button/button.module.css.d.ts +4 -8
- package/components/buttonGroup/buttonGroup.module.css +39 -13
- package/components/calendar/calendar.module.css +64 -125
- package/components/calendar/calendar.module.css.d.ts +0 -7
- package/components/checkbox/checkbox.module.css +102 -69
- package/components/checkbox/checkbox.module.css.d.ts +1 -1
- package/components/contextualHelp/contextualHelp.module.css +7 -7
- package/components/dateField/dateField.module.css +42 -29
- package/components/dateField/dateField.module.css.d.ts +3 -2
- package/components/dialog/dialog.module.css +3 -3
- package/components/dropzone/dropzone.module.css +19 -21
- package/components/feedbackMessage/feedbackMessage.module.css +2 -40
- package/components/feedbackMessage/feedbackMessage.module.css.d.ts +0 -6
- package/components/field/field.module.css +22 -13
- package/components/field/field.module.css.d.ts +2 -2
- package/components/fieldGroup/fieldGroup.module.css +3 -3
- package/components/filterDropdown/filterDropdown.module.css +1 -1
- package/components/flag/flag.module.css +6 -6
- package/components/icon/icon.module.css +31 -4
- package/components/icon/icon.module.css.d.ts +6 -0
- package/components/iconButton/iconButton.module.css +237 -189
- package/components/iconButton/iconButton.module.css.d.ts +2 -3
- package/components/label/label.module.css +4 -5
- package/components/link/link.module.css +24 -54
- package/components/link/link.module.css.d.ts +1 -4
- package/components/list/list.module.css +20 -33
- package/components/listbox/listbox.module.css +109 -131
- package/components/listbox/listbox.module.css.d.ts +2 -4
- package/components/modalLayout/modalLayout.module.css +11 -12
- package/components/notificationBadge/notificationBadge.module.css +18 -15
- package/components/pagination/pagination.module.css +9 -9
- package/components/panel/panel.module.css +3 -1
- package/components/popover/popover.module.css +3 -2
- package/components/radio/radio.module.css +32 -9
- package/components/searchField/searchField.module.css +24 -25
- package/components/segmentedControl/segmentedControl.module.css +15 -17
- package/components/select/select.module.css +34 -18
- package/components/select/select.module.css.d.ts +2 -0
- package/components/skeleton/skeleton.module.css +5 -2
- package/components/spinner/spinner.module.css +3 -3
- package/components/surface/surface.module.css +2 -2
- package/components/switch/switch.module.css +49 -46
- package/components/switch/switch.module.css.d.ts +2 -2
- package/components/table/table.module.css +165 -136
- package/components/table/table.module.css.d.ts +5 -6
- package/components/tabs/tabs.module.css +24 -20
- package/components/tag/tag.module.css +16 -30
- package/components/tag/tag.module.css.d.ts +1 -1
- package/components/text/text.module.css +69 -82
- package/components/text/text.module.css.d.ts +19 -14
- package/components/textField/textField.module.css +45 -35
- package/components/textField/textField.module.css.d.ts +2 -2
- package/components/toast/toast.module.css +33 -153
- package/components/toast/toast.module.css.d.ts +2 -6
- package/components/tooltip/tooltip.module.css +7 -6
- package/package.json +4 -4
- package/themes/default-dark.js +1 -0
- package/themes/default.js +1 -0
- package/themes/index.d.ts +1 -0
- package/components/heading/heading.module.css +0 -95
- package/components/heading/heading.module.css.d.ts +0 -12
- package/components/labeledValue/labeledValue.module.css +0 -10
- package/components/labeledValue/labeledValue.module.css.d.ts +0 -7
- package/components/paragraph/paragraph.module.css +0 -32
- package/components/paragraph/paragraph.module.css.d.ts +0 -7
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.sapphire-spinner__track {
|
|
25
|
-
fill: var(--sapphire-semantic-color-background-spinner-primary
|
|
25
|
+
fill: var(--sapphire-semantic-color-background-spinner-primary);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.sapphire-spinner__accent {
|
|
29
|
-
fill: var(--sapphire-semantic-color-background-spinner-secondary
|
|
29
|
+
fill: var(--sapphire-semantic-color-background-spinner-secondary);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.sapphire-spinner--inherit .sapphire-spinner__track {
|
|
33
33
|
fill: currentColor;
|
|
34
|
-
opacity: var(--sapphire-semantic-opacity-
|
|
34
|
+
opacity: var(--sapphire-semantic-opacity-disabled);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.sapphire-spinner--inherit .sapphire-spinner__accent {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.sapphire-surface {
|
|
2
2
|
font-family: var(--sapphire-semantic-font-name-default);
|
|
3
|
-
background
|
|
4
|
-
color: var(--sapphire-semantic-color-
|
|
3
|
+
background: var(--sapphire-semantic-color-background-surface);
|
|
4
|
+
color: var(--sapphire-semantic-color-foreground-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
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
align-items: center;
|
|
8
8
|
position: relative;
|
|
9
9
|
max-width: 100%;
|
|
10
|
-
gap: var(--sapphire-semantic-size-spacing-
|
|
10
|
+
gap: var(--sapphire-semantic-size-spacing-sm);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.sapphire-switch--md {
|
|
14
|
-
gap: var(--sapphire-semantic-size-spacing-
|
|
14
|
+
gap: var(--sapphire-semantic-size-spacing-2xs);
|
|
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-semantic-size-spacing-
|
|
39
|
+
gap: var(--sapphire-semantic-size-spacing-sm);
|
|
40
40
|
font-family: var(--sapphire-semantic-font-name-default);
|
|
41
41
|
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
42
|
-
font-size: var(--sapphire-semantic-size-font-control-
|
|
42
|
+
font-size: var(--sapphire-semantic-size-font-control-lg);
|
|
43
43
|
line-height: var(--sapphire-semantic-size-height-control-xs);
|
|
44
|
-
color: var(--sapphire-semantic-color-
|
|
44
|
+
color: var(--sapphire-semantic-color-foreground-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
|
|
@@ -59,37 +59,60 @@
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.sapphire-switch--md .sapphire-switch-label {
|
|
62
|
-
gap: var(--sapphire-semantic-size-spacing-
|
|
62
|
+
gap: var(--sapphire-semantic-size-spacing-2xs);
|
|
63
63
|
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
64
64
|
line-height: var(--sapphire-semantic-size-height-control-2xs);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
/* focus */
|
|
68
|
+
.sapphire-switch:not(.js-focus)
|
|
69
|
+
.sapphire-switch-input:focus-visible
|
|
70
|
+
~ .sapphire-switch-track,
|
|
71
|
+
.sapphire-switch.is-focus .sapphire-switch-track {
|
|
72
|
+
outline: var(--sapphire-semantic-size-focus-ring) solid
|
|
73
|
+
var(--sapphire-semantic-color-focus-ring);
|
|
74
|
+
outline-offset: var(--sapphire-semantic-size-focus-ring);
|
|
75
|
+
}
|
|
76
|
+
|
|
67
77
|
/**
|
|
68
78
|
* knob track
|
|
69
79
|
*/
|
|
70
80
|
.sapphire-switch-track {
|
|
71
|
-
background: var(--sapphire-semantic-color-
|
|
81
|
+
background: var(--sapphire-semantic-color-background-switch-default);
|
|
72
82
|
box-sizing: border-box;
|
|
73
83
|
position: relative;
|
|
74
|
-
width: var(--sapphire-global-size-generic-
|
|
75
|
-
transition: background var(--sapphire-semantic-time-motion-quick)
|
|
84
|
+
width: var(--sapphire-global-size-generic-110);
|
|
85
|
+
transition: background var(--sapphire-semantic-time-motion-quick)
|
|
86
|
+
var(--sapphire-semantic-transitions-fade);
|
|
76
87
|
height: var(--sapphire-semantic-size-height-control-xs);
|
|
77
88
|
border-radius: calc(var(--sapphire-semantic-size-height-control-xs) / 2);
|
|
78
89
|
/* Prevents the component from shrinking */
|
|
79
90
|
flex-shrink: 0;
|
|
80
91
|
}
|
|
81
|
-
|
|
82
|
-
background-color: var(
|
|
83
|
-
--sapphire-semantic-color-background-action-primary-default
|
|
84
|
-
);
|
|
85
|
-
}
|
|
92
|
+
|
|
86
93
|
/* hover (unchecked) */
|
|
87
94
|
.sapphire-switch:not(:active):not(.is-active):not(.js-hover):hover
|
|
88
95
|
.sapphire-switch-input:not(:disabled)
|
|
89
96
|
~ .sapphire-switch-track,
|
|
90
97
|
.sapphire-switch:not(:active):not(.is-active).is-hover .sapphire-switch-track {
|
|
91
|
-
background
|
|
98
|
+
background: var(--sapphire-semantic-color-background-switch-hover);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* active (unchecked) */
|
|
102
|
+
.sapphire-switch:active
|
|
103
|
+
.sapphire-switch-input:not(:disabled)
|
|
104
|
+
~ .sapphire-switch-track,
|
|
105
|
+
.sapphire-switch.is-active
|
|
106
|
+
.sapphire-switch-input:not(:disabled)
|
|
107
|
+
~ .sapphire-switch-track {
|
|
108
|
+
background: var(--sapphire-semantic-color-background-switch-active);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* default (unchecked) */
|
|
112
|
+
.sapphire-switch-input:checked ~ .sapphire-switch-track {
|
|
113
|
+
background: var(--sapphire-semantic-color-background-action-select-default);
|
|
92
114
|
}
|
|
115
|
+
|
|
93
116
|
/* hover (checked) */
|
|
94
117
|
.sapphire-switch:not(:active):not(.is-active):not(.js-hover):hover
|
|
95
118
|
.sapphire-switch-input:not(:disabled):checked
|
|
@@ -97,19 +120,9 @@
|
|
|
97
120
|
.sapphire-switch:not(:active):not(.is-active).is-hover
|
|
98
121
|
.sapphire-switch-input:checked
|
|
99
122
|
~ .sapphire-switch-track {
|
|
100
|
-
background
|
|
101
|
-
--sapphire-semantic-color-background-action-primary-hover
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
/* focus */
|
|
105
|
-
.sapphire-switch:not(.js-focus)
|
|
106
|
-
.sapphire-switch-input:focus-visible
|
|
107
|
-
~ .sapphire-switch-track,
|
|
108
|
-
.sapphire-switch.is-focus .sapphire-switch-track {
|
|
109
|
-
outline: var(--sapphire-semantic-size-focus-ring) solid
|
|
110
|
-
var(--sapphire-semantic-color-focus-ring);
|
|
111
|
-
outline-offset: var(--sapphire-semantic-size-focus-ring);
|
|
123
|
+
background: var(--sapphire-semantic-color-background-action-select-hover);
|
|
112
124
|
}
|
|
125
|
+
|
|
113
126
|
/* active (checked) */
|
|
114
127
|
.sapphire-switch:active
|
|
115
128
|
.sapphire-switch-input:not(:disabled):checked
|
|
@@ -117,19 +130,9 @@
|
|
|
117
130
|
.sapphire-switch.is-active
|
|
118
131
|
.sapphire-switch-input:not(:disabled):checked
|
|
119
132
|
~ .sapphire-switch-track {
|
|
120
|
-
background
|
|
121
|
-
--sapphire-semantic-color-background-action-primary-active
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
/* active (unchecked) */
|
|
125
|
-
.sapphire-switch:active
|
|
126
|
-
.sapphire-switch-input:not(:disabled)
|
|
127
|
-
~ .sapphire-switch-track,
|
|
128
|
-
.sapphire-switch.is-active
|
|
129
|
-
.sapphire-switch-input:not(:disabled)
|
|
130
|
-
~ .sapphire-switch-track {
|
|
131
|
-
background-color: var(--sapphire-semantic-color-border-control-active);
|
|
133
|
+
background: var(--sapphire-semantic-color-background-action-select-active);
|
|
132
134
|
}
|
|
135
|
+
|
|
133
136
|
/* disabled */
|
|
134
137
|
.sapphire-switch-input:disabled {
|
|
135
138
|
cursor: not-allowed;
|
|
@@ -148,18 +151,18 @@
|
|
|
148
151
|
position: absolute;
|
|
149
152
|
box-sizing: border-box;
|
|
150
153
|
|
|
151
|
-
|
|
152
|
-
* around the edges of the knob */
|
|
153
|
-
height: calc(100% - (2 * var(--sapphire-global-size-static-5)));
|
|
154
|
-
margin: var(--sapphire-global-size-static-5);
|
|
154
|
+
padding: var(--sapphire-global-size-static-5);
|
|
155
155
|
|
|
156
|
+
height: 100%;
|
|
156
157
|
aspect-ratio: 1/1;
|
|
157
158
|
border-radius: 50%;
|
|
158
|
-
background
|
|
159
|
+
background: var(
|
|
160
|
+
--sapphire-semantic-color-foreground-action-on-select-default
|
|
161
|
+
);
|
|
159
162
|
background-clip: content-box;
|
|
160
163
|
left: 0;
|
|
161
|
-
transition: left var(--sapphire-semantic-time-motion-quick)
|
|
162
|
-
|
|
164
|
+
transition: left var(--sapphire-semantic-time-motion-quick)
|
|
165
|
+
var(--sapphire-semantic-transitions-dynamic);
|
|
163
166
|
}
|
|
164
167
|
.sapphire-switch-input:checked ~ .sapphire-switch-track::after {
|
|
165
168
|
left: calc(100% - var(--sapphire-semantic-size-height-control-xs));
|
|
@@ -3,12 +3,12 @@ declare const styles: {
|
|
|
3
3
|
readonly "sapphire-switch--md": string;
|
|
4
4
|
readonly "sapphire-switch-input": string;
|
|
5
5
|
readonly "sapphire-switch-label": string;
|
|
6
|
+
readonly "js-focus": string;
|
|
6
7
|
readonly "sapphire-switch-track": string;
|
|
8
|
+
readonly "is-focus": string;
|
|
7
9
|
readonly "is-active": string;
|
|
8
10
|
readonly "js-hover": string;
|
|
9
11
|
readonly "is-hover": string;
|
|
10
|
-
readonly "js-focus": string;
|
|
11
|
-
readonly "is-focus": string;
|
|
12
12
|
};
|
|
13
13
|
export = styles;
|
|
14
14
|
|
|
@@ -53,7 +53,15 @@
|
|
|
53
53
|
top: 0;
|
|
54
54
|
z-index: 2; /* Setting to two because body rows are positioned relative */
|
|
55
55
|
line-height: var(--sapphire-semantic-size-line-height-md);
|
|
56
|
-
|
|
56
|
+
--sapphire-table-row-bg: var(--sapphire-semantic-color-background-surface);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.sapphire-table__cell,
|
|
60
|
+
.sapphire-table__headCell,
|
|
61
|
+
.sapphire-table__selectionCell {
|
|
62
|
+
box-sizing: border-box;
|
|
63
|
+
font-size: var(--sapphire-semantic-size-font-body-md);
|
|
64
|
+
line-height: var(--sapphire-semantic-size-line-height-md);
|
|
57
65
|
}
|
|
58
66
|
|
|
59
67
|
.sapphire-table__head--sticky {
|
|
@@ -77,31 +85,19 @@
|
|
|
77
85
|
text-align: end;
|
|
78
86
|
}
|
|
79
87
|
|
|
80
|
-
/* We added these to accommodate alignment in cells using flex */
|
|
81
|
-
.sapphire-table__cell-wrapper .sapphire-table__cell--alignLeft {
|
|
82
|
-
justify-content: flex-start;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.sapphire-table__cell-wrapper .sapphire-table__cell--alignCenter {
|
|
86
|
-
justify-content: center;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.sapphire-table__cell-wrapper .sapphire-table__cell--alignRight {
|
|
90
|
-
justify-content: flex-end;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
88
|
.sapphire-table__headCell {
|
|
94
|
-
color: var(--sapphire-semantic-color-
|
|
89
|
+
color: var(--sapphire-semantic-color-foreground-primary);
|
|
95
90
|
box-sizing: border-box;
|
|
96
|
-
font-size: var(--sapphire-semantic-size-font-
|
|
91
|
+
font-size: var(--sapphire-semantic-size-font-body-sm);
|
|
97
92
|
font-family: var(--sapphire-semantic-font-name-default);
|
|
98
|
-
font-weight: var(--sapphire-semantic-font-weight-default-
|
|
93
|
+
font-weight: var(--sapphire-semantic-font-weight-default-medium);
|
|
99
94
|
line-height: var(--sapphire-semantic-size-line-height-md);
|
|
100
95
|
vertical-align: top;
|
|
101
96
|
}
|
|
102
97
|
|
|
103
98
|
.sapphire-table__headCell_container {
|
|
104
|
-
padding: var(--sapphire-semantic-size-spacing-
|
|
99
|
+
padding: var(--sapphire-semantic-size-spacing-xs)
|
|
100
|
+
var(--sapphire-table-cell-spacing-h);
|
|
105
101
|
display: inline-flex;
|
|
106
102
|
align-items: center;
|
|
107
103
|
box-sizing: border-box;
|
|
@@ -130,19 +126,31 @@
|
|
|
130
126
|
z-index: 1;
|
|
131
127
|
}
|
|
132
128
|
|
|
133
|
-
|
|
129
|
+
/*
|
|
130
|
+
focus ring styles applied to an absolute pseudo element to be able to elevate it above
|
|
131
|
+
the cells with background color.
|
|
132
|
+
Cells having background color is for sticky columns to look good
|
|
133
|
+
*/
|
|
134
|
+
.sapphire-table__headCell.is-focus .sapphire-table__headCell_container::after,
|
|
134
135
|
.sapphire-table__headCell:not(.js-focus):focus-visible
|
|
135
|
-
.sapphire-table__headCell_container,
|
|
136
|
-
.sapphire-table__cell.is-focus,
|
|
137
|
-
.sapphire-table__cell:not(.js-focus):focus-visible,
|
|
138
|
-
.sapphire-table__selectionCell.is-focus,
|
|
139
|
-
.sapphire-table__selectionCell:not(.js-focus):focus-visible,
|
|
140
|
-
.sapphire-table__row.is-focus,
|
|
141
|
-
.sapphire-table__row:not(.js-focus):focus-visible
|
|
136
|
+
.sapphire-table__headCell_container::after,
|
|
137
|
+
.sapphire-table__cell.is-focus::after,
|
|
138
|
+
.sapphire-table__cell:not(.js-focus):focus-visible::after,
|
|
139
|
+
.sapphire-table__selectionCell.is-focus::after,
|
|
140
|
+
.sapphire-table__selectionCell:not(.js-focus):focus-visible::after,
|
|
141
|
+
.sapphire-table__row.is-focus::after,
|
|
142
|
+
.sapphire-table__row:not(.js-focus):focus-visible::after,
|
|
143
|
+
.sapphire-table__row-expanded-view.is-focus::after,
|
|
144
|
+
.sapphire-table__row-expanded-view:not(.js-focus):focus-visible::after {
|
|
145
|
+
content: '';
|
|
142
146
|
outline: none;
|
|
143
147
|
border-radius: var(--sapphire-semantic-size-radius-sm);
|
|
144
148
|
box-shadow: inset 0px 0px 0px var(--sapphire-semantic-size-focus-ring)
|
|
145
149
|
var(--sapphire-semantic-color-focus-ring);
|
|
150
|
+
|
|
151
|
+
position: absolute;
|
|
152
|
+
inset: 0;
|
|
153
|
+
z-index: 3;
|
|
146
154
|
}
|
|
147
155
|
|
|
148
156
|
.sapphire-table__headCell.is-focus .sapphire-table__headCell_container,
|
|
@@ -159,9 +167,10 @@
|
|
|
159
167
|
.js-hover
|
|
160
168
|
):hover
|
|
161
169
|
.sapphire-table__headCell_container {
|
|
162
|
-
|
|
163
|
-
--sapphire-semantic-color-background-action-
|
|
170
|
+
--sapphire-table-row-bg: var(
|
|
171
|
+
--sapphire-semantic-color-background-action-tertiary-hover
|
|
164
172
|
);
|
|
173
|
+
color: var(--sapphire-semantic-color-foreground-action-on-tertiary-hover);
|
|
165
174
|
border-radius: var(--sapphire-semantic-size-radius-sm);
|
|
166
175
|
}
|
|
167
176
|
|
|
@@ -176,16 +185,16 @@
|
|
|
176
185
|
|
|
177
186
|
.sapphire-table__headCell--sorted .sapphire-table-sortedIcon {
|
|
178
187
|
visibility: visible;
|
|
179
|
-
padding-left: var(--sapphire-semantic-size-spacing-
|
|
188
|
+
padding-left: var(--sapphire-semantic-size-spacing-2xs);
|
|
180
189
|
}
|
|
181
190
|
|
|
182
191
|
.sapphire-table__headCell .sapphire-table-sortedIcon,
|
|
183
192
|
.sapphire-table__headCell .sapphire-table-sortableIcon {
|
|
184
|
-
padding-left: var(--sapphire-semantic-size-spacing-
|
|
193
|
+
padding-left: var(--sapphire-semantic-size-spacing-2xs);
|
|
185
194
|
}
|
|
186
195
|
.sapphire-table__cell--alignRight .sapphire-table-sortedIcon,
|
|
187
196
|
.sapphire-table__cell--alignRight .sapphire-table-sortableIcon {
|
|
188
|
-
padding-right: var(--sapphire-semantic-size-spacing-
|
|
197
|
+
padding-right: var(--sapphire-semantic-size-spacing-2xs);
|
|
189
198
|
}
|
|
190
199
|
|
|
191
200
|
.sapphire-table__headCell__text,
|
|
@@ -201,10 +210,13 @@
|
|
|
201
210
|
|
|
202
211
|
.sapphire-table__cell {
|
|
203
212
|
box-sizing: border-box;
|
|
204
|
-
color: var(--sapphire-semantic-color-
|
|
213
|
+
color: var(--sapphire-semantic-color-foreground-primary);
|
|
205
214
|
font-family: var(--sapphire-semantic-font-name-default);
|
|
206
215
|
font-weight: var(--sapphire-semantic-font-weight-default-regular);
|
|
207
216
|
overflow-wrap: break-word;
|
|
217
|
+
align-content: center;
|
|
218
|
+
padding: var(--sapphire-table-cell-spacing-v)
|
|
219
|
+
var(--sapphire-table-cell-spacing-h);
|
|
208
220
|
}
|
|
209
221
|
|
|
210
222
|
.sapphire-table__cell-contents {
|
|
@@ -222,122 +234,118 @@
|
|
|
222
234
|
text-overflow: ellipsis;
|
|
223
235
|
}
|
|
224
236
|
|
|
237
|
+
/* Cell spacing MD (default) */
|
|
238
|
+
.sapphire-table {
|
|
239
|
+
--sapphire-table-cell-spacing-h: var(--sapphire-semantic-size-spacing-sm);
|
|
240
|
+
--sapphire-table-cell-spacing-v: var(--sapphire-semantic-size-spacing-sm);
|
|
241
|
+
}
|
|
242
|
+
|
|
225
243
|
/* Cell spacing SM */
|
|
226
|
-
.sapphire-table__table--spacing-sm
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
padding-top: var(--sapphire-semantic-size-spacing-20);
|
|
230
|
-
padding-bottom: var(--sapphire-semantic-size-spacing-20);
|
|
244
|
+
.sapphire-table__table--spacing-sm {
|
|
245
|
+
--sapphire-table-cell-spacing-h: var(--sapphire-semantic-size-spacing-sm);
|
|
246
|
+
--sapphire-table-cell-spacing-v: var(--sapphire-semantic-size-spacing-xs);
|
|
231
247
|
}
|
|
232
248
|
|
|
233
249
|
/* Cell spacing LG */
|
|
234
|
-
.sapphire-table__table--spacing-lg
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
padding-top: var(--sapphire-semantic-size-spacing-40);
|
|
238
|
-
padding-bottom: var(--sapphire-semantic-size-spacing-40);
|
|
250
|
+
.sapphire-table__table--spacing-lg {
|
|
251
|
+
--sapphire-table-cell-spacing-h: var(--sapphire-semantic-size-spacing-md);
|
|
252
|
+
--sapphire-table-cell-spacing-v: var(--sapphire-semantic-size-spacing-md);
|
|
239
253
|
}
|
|
240
254
|
|
|
241
255
|
/* Cell spacing XL */
|
|
242
|
-
.sapphire-table__table--spacing-xl
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
padding-top: var(--sapphire-global-size-generic-50);
|
|
246
|
-
padding-bottom: var(--sapphire-global-size-generic-50);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/* Cell spacing MD (default) */
|
|
250
|
-
.sapphire-table__cell,
|
|
251
|
-
.sapphire-table__selectionCell {
|
|
252
|
-
font-size: var(--sapphire-semantic-size-font-text-lg);
|
|
253
|
-
line-height: var(--sapphire-semantic-size-line-height-md);
|
|
254
|
-
padding: var(--sapphire-semantic-size-spacing-30)
|
|
255
|
-
var(--sapphire-semantic-size-spacing-20);
|
|
256
|
+
.sapphire-table__table--spacing-xl {
|
|
257
|
+
--sapphire-table-cell-spacing-h: var(--sapphire-semantic-size-spacing-lg);
|
|
258
|
+
--sapphire-table-cell-spacing-v: var(--sapphire-semantic-size-spacing-lg);
|
|
256
259
|
}
|
|
257
260
|
|
|
258
261
|
/* Selection cells that are supposes to contain only a checkbox */
|
|
259
262
|
.sapphire-table__selectionCell {
|
|
260
263
|
line-height: 0;
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
.sapphire-table__cell-wrapper .sapphire-table__selectionCell {
|
|
265
|
-
width: unset;
|
|
266
|
-
min-width: var(--sapphire-global-size-generic-50);
|
|
264
|
+
padding: var(--sapphire-table-cell-spacing-v)
|
|
265
|
+
var(--sapphire-table-cell-spacing-h);
|
|
266
|
+
box-sizing: content-box;
|
|
267
267
|
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
.sapphire-table__cell-wrapper:first-child > .sapphire-table__cell,
|
|
272
|
-
.sapphire-table__cell-wrapper:first-child > .sapphire-table__selectionCell {
|
|
273
|
-
padding-left: var(--sapphire-semantic-size-spacing-50);
|
|
274
|
-
}
|
|
275
|
-
.sapphire-table__cell:last-child,
|
|
276
|
-
.sapphire-table__cell-wrapper:last-child > .sapphire-table__cell {
|
|
277
|
-
padding-right: var(--sapphire-semantic-size-spacing-50);
|
|
278
|
-
}
|
|
279
|
-
.sapphire-table__headCell:first-child,
|
|
280
|
-
.sapphire-table__cell-wrapper:first-child .sapphire-table__headCell {
|
|
281
|
-
padding-left: var(--sapphire-semantic-size-spacing-40);
|
|
268
|
+
.sapphire-table__head .sapphire-table__selectionCell {
|
|
269
|
+
padding: var(--sapphire-semantic-size-spacing-2xs)
|
|
270
|
+
var(--sapphire-table-cell-spacing-h);
|
|
282
271
|
}
|
|
283
272
|
|
|
284
|
-
.sapphire-table__selectionCell
|
|
285
|
-
.sapphire-
|
|
286
|
-
|
|
273
|
+
td.sapphire-table__selectionCell,
|
|
274
|
+
th.sapphire-table__selectionCell {
|
|
275
|
+
width: var(--sapphire-global-size-generic-50);
|
|
287
276
|
}
|
|
288
277
|
|
|
289
|
-
|
|
290
|
-
.sapphire-
|
|
291
|
-
|
|
278
|
+
/* sticky selection column for non-virtualized table */
|
|
279
|
+
td.sapphire-table__selectionCell:first-child,
|
|
280
|
+
th.sapphire-table__selectionCell:first-child {
|
|
281
|
+
position: sticky;
|
|
282
|
+
left: 0;
|
|
283
|
+
z-index: 2;
|
|
292
284
|
}
|
|
293
285
|
|
|
294
286
|
.sapphire-table__tfoot .sapphire-table__cell {
|
|
295
|
-
font-weight: var(--sapphire-semantic-font-weight-default-
|
|
287
|
+
font-weight: var(--sapphire-semantic-font-weight-default-medium);
|
|
296
288
|
}
|
|
297
289
|
|
|
298
|
-
.sapphire-table__cell
|
|
299
|
-
.sapphire-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
290
|
+
.sapphire-table__cell:before,
|
|
291
|
+
.sapphire-table__headCell_container:before,
|
|
292
|
+
.sapphire-table__selectionCell::before {
|
|
293
|
+
content: '';
|
|
294
|
+
position: absolute;
|
|
295
|
+
inset: 0;
|
|
296
|
+
/* setting row background on cells for sticky cells to look good. Sticky cells need to have a set
|
|
297
|
+
* background for the content below them to not be visible through the cell.
|
|
298
|
+
* Note: using a separate prioritized variable for active background not to need to fight with specificity complications
|
|
299
|
+
*/
|
|
300
|
+
background-color: var(
|
|
301
|
+
--sapphire-table-row-bg-active,
|
|
302
|
+
var(--sapphire-table-row-bg)
|
|
303
|
+
);
|
|
304
|
+
z-index: -1;
|
|
305
|
+
pointer-events: none;
|
|
312
306
|
}
|
|
313
307
|
|
|
314
|
-
.sapphire-table__cell
|
|
315
|
-
.sapphire-
|
|
316
|
-
.sapphire-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
308
|
+
.sapphire-table__cell,
|
|
309
|
+
.sapphire-table__headCell_container,
|
|
310
|
+
.sapphire-table__selectionCell {
|
|
311
|
+
/* setting the actual background in a ::before pseudo element,
|
|
312
|
+
and a solid surface background here below it
|
|
313
|
+
because the hover/active state colors are semi-transparent (aka alpha colors)
|
|
314
|
+
*/
|
|
315
|
+
background-color: var(--sapphire-semantic-color-background-surface);
|
|
321
316
|
}
|
|
322
317
|
|
|
323
318
|
.sapphire-table__row {
|
|
319
|
+
box-sizing: border-box;
|
|
324
320
|
position: relative;
|
|
325
321
|
border-bottom: var(--sapphire-semantic-size-border-sm) solid
|
|
326
|
-
var(--sapphire-semantic-color-border-
|
|
322
|
+
var(--sapphire-semantic-color-border-secondary);
|
|
323
|
+
/* background is set in a variable to be used in cells. That's because sticky cells need to have a background color.
|
|
324
|
+
`background: inherit` would be an alternative solution but it's fragile with respect to the dom tree that can
|
|
325
|
+
change with presence of virtualization wrappers. */
|
|
326
|
+
--sapphire-table-row-bg: var(
|
|
327
|
+
--sapphire-table-rowgroup-bg,
|
|
328
|
+
var(--sapphire-semantic-color-background-surface)
|
|
329
|
+
);
|
|
327
330
|
}
|
|
328
331
|
|
|
329
|
-
.sapphire-table__row--active {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
332
|
+
.sapphire-table--interactive .sapphire-table__row--active {
|
|
333
|
+
--sapphire-table-row-bg-active: var(
|
|
334
|
+
--sapphire-semantic-color-background-action-tertiary-active
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.sapphire-table--interactive
|
|
339
|
+
.sapphire-table__row--selected.sapphire-table__row--active {
|
|
340
|
+
--sapphire-table-row-bg-active: var(
|
|
341
|
+
/* using hover color for active here is intentional, and to avoid too many color changes when selecting rows */
|
|
342
|
+
--sapphire-semantic-color-background-action-select-secondary-hover
|
|
343
|
+
);
|
|
336
344
|
}
|
|
337
345
|
|
|
338
346
|
.sapphire-table__row--selected {
|
|
339
|
-
|
|
340
|
-
--sapphire-semantic-color-background-action-secondary-default
|
|
347
|
+
--sapphire-table-row-bg: var(
|
|
348
|
+
--sapphire-semantic-color-background-action-select-secondary-default
|
|
341
349
|
);
|
|
342
350
|
}
|
|
343
351
|
|
|
@@ -352,13 +360,13 @@
|
|
|
352
360
|
|
|
353
361
|
.sapphire-table__row-expanded-view {
|
|
354
362
|
border-bottom: var(--sapphire-semantic-size-border-sm) solid
|
|
355
|
-
var(--sapphire-semantic-color-border-
|
|
363
|
+
var(--sapphire-semantic-color-border-secondary);
|
|
356
364
|
}
|
|
357
365
|
|
|
358
366
|
.sapphire-table__row-expand-button {
|
|
359
367
|
display: inline-flex; /* for transform to take effect */
|
|
360
|
-
transition: transform
|
|
361
|
-
|
|
368
|
+
transition: transform var(--sapphire-semantic-transitions-dynamic)
|
|
369
|
+
var(--sapphire-semantic-time-motion-quick);
|
|
362
370
|
}
|
|
363
371
|
|
|
364
372
|
.sapphire-table td:has(.sapphire-table__row-expand-button) {
|
|
@@ -370,10 +378,14 @@
|
|
|
370
378
|
}
|
|
371
379
|
|
|
372
380
|
.sapphire-table--without-last-divider
|
|
373
|
-
|
|
381
|
+
:not([role='presentation'])
|
|
382
|
+
> .sapphire-table__row:not(
|
|
374
383
|
.is-focus,
|
|
375
384
|
:not(.js-focus):focus-visible
|
|
376
|
-
):last-child
|
|
385
|
+
):last-child,
|
|
386
|
+
.sapphire-table--without-last-divider
|
|
387
|
+
[role='presentation']:last-child
|
|
388
|
+
> .sapphire-table__row:not(.is-focus, :not(.js-focus):focus-visible) {
|
|
377
389
|
border-bottom-color: transparent;
|
|
378
390
|
}
|
|
379
391
|
|
|
@@ -386,29 +398,47 @@
|
|
|
386
398
|
.sapphire-table__row--interactive.is-hover,
|
|
387
399
|
.sapphire-table--interactive .sapphire-table__row:not(.js-hover):hover,
|
|
388
400
|
.sapphire-table__row--interactive:not(.js-hover):hover {
|
|
389
|
-
|
|
390
|
-
--sapphire-semantic-color-background-action-
|
|
401
|
+
--sapphire-table-row-bg: var(
|
|
402
|
+
--sapphire-semantic-color-background-action-tertiary-hover
|
|
391
403
|
);
|
|
404
|
+
color: var(--sapphire-semantic-color-foreground-action-on-tertiary-hover);
|
|
392
405
|
cursor: pointer;
|
|
393
406
|
}
|
|
394
407
|
|
|
408
|
+
.sapphire-table--interactive
|
|
409
|
+
.sapphire-table__row.sapphire-table__row--selected.is-hover,
|
|
410
|
+
.sapphire-table__row--interactive.sapphire-table__row--selected.is-hover,
|
|
411
|
+
.sapphire-table--interactive
|
|
412
|
+
.sapphire-table__row.sapphire-table__row--selected:not(.js-hover):hover,
|
|
413
|
+
.sapphire-table__row--interactive.sapphire-table__row--selected:not(
|
|
414
|
+
.js-hover
|
|
415
|
+
):hover {
|
|
416
|
+
--sapphire-table-row-bg: var(
|
|
417
|
+
--sapphire-semantic-color-background-action-select-secondary-hover
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
|
|
395
421
|
.sapphire-table__row--highlighted {
|
|
396
|
-
|
|
397
|
-
--sapphire-semantic-color-background-action-
|
|
422
|
+
--sapphire-table-row-bg: var(
|
|
423
|
+
--sapphire-semantic-color-background-action-highlight
|
|
398
424
|
);
|
|
399
425
|
}
|
|
400
|
-
.sapphire-table__row--highlighted
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
426
|
+
.sapphire-table__row--highlighted::after {
|
|
427
|
+
content: '';
|
|
428
|
+
position: absolute;
|
|
429
|
+
z-index: 2;
|
|
430
|
+
left: 0;
|
|
431
|
+
height: 100%;
|
|
432
|
+
width: var(--sapphire-semantic-size-border-md);
|
|
433
|
+
background: var(--sapphire-semantic-color-border-accent);
|
|
434
|
+
pointer-events: none;
|
|
405
435
|
}
|
|
406
436
|
|
|
407
437
|
.sapphire-table__tfoot {
|
|
408
438
|
position: relative;
|
|
409
439
|
z-index: 2;
|
|
410
|
-
|
|
411
|
-
--sapphire-semantic-color-background-
|
|
440
|
+
--sapphire-table-rowgroup-bg: var(
|
|
441
|
+
--sapphire-semantic-color-background-neutral-subtle
|
|
412
442
|
);
|
|
413
443
|
}
|
|
414
444
|
|
|
@@ -419,11 +449,10 @@ and to avoid the complications of merging the two shadows */ {
|
|
|
419
449
|
display: flex;
|
|
420
450
|
align-items: center;
|
|
421
451
|
justify-content: space-between;
|
|
422
|
-
padding: var(--sapphire-semantic-size-spacing-
|
|
423
|
-
var(--sapphire-semantic-size-spacing-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
);
|
|
452
|
+
padding: var(--sapphire-semantic-size-spacing-sm)
|
|
453
|
+
var(--sapphire-semantic-size-spacing-lg);
|
|
454
|
+
/* the bg color here is a hack until the design of this changes */
|
|
455
|
+
background: var(--sapphire-semantic-color-background-neutral-subtle);
|
|
427
456
|
position: sticky;
|
|
428
457
|
top: 0;
|
|
429
458
|
left: 0;
|
|
@@ -437,7 +466,7 @@ and to avoid the complications of merging the two shadows */ {
|
|
|
437
466
|
.sapphire-table__footer {
|
|
438
467
|
position: relative;
|
|
439
468
|
z-index: 2; /* Setting to two because body rows are positioned relative */
|
|
440
|
-
margin-top: var(--sapphire-semantic-size-spacing-
|
|
469
|
+
margin-top: var(--sapphire-semantic-size-spacing-2xs);
|
|
441
470
|
}
|
|
442
471
|
|
|
443
472
|
.sapphire-table__footer--sticky {
|