@danske/sapphire-css 16.3.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/LICENSE +7 -0
- package/README.md +57 -0
- package/build/themes/cjs/default-dark.d.ts +3 -0
- package/build/themes/cjs/default-dark.js +8 -0
- package/build/themes/cjs/default.d.ts +3 -0
- package/build/themes/cjs/default.js +8 -0
- package/build/themes/cjs/index.d.ts +1 -0
- package/build/themes/cjs/index.js +16 -0
- package/build/themes/cjs/june-dark.d.ts +4 -0
- package/build/themes/cjs/june-dark.js +9 -0
- package/build/themes/cjs/june.d.ts +4 -0
- package/build/themes/cjs/june.js +9 -0
- package/build/themes/esm/default-dark.d.ts +3 -0
- package/build/themes/esm/default-dark.js +3 -0
- package/build/themes/esm/default.d.ts +3 -0
- package/build/themes/esm/default.js +3 -0
- package/build/themes/esm/index.d.ts +1 -0
- package/build/themes/esm/index.js +1 -0
- package/build/themes/esm/june-dark.d.ts +4 -0
- package/build/themes/esm/june-dark.js +4 -0
- package/build/themes/esm/june.d.ts +4 -0
- package/build/themes/esm/june.js +4 -0
- package/components/accordion/accordion.module.css.d.ts +19 -0
- package/components/avatar/avatar.module.css.d.ts +27 -0
- package/components/backdrop/backdrop.module.css +8 -0
- package/components/backdrop/backdrop.module.css.d.ts +5 -0
- package/components/badge/badge.module.css +121 -0
- package/components/badge/badge.module.css.d.ts +16 -0
- package/components/button/button.module.css +278 -0
- package/components/button/button.module.css.d.ts +23 -0
- package/components/buttonGroup/buttonGroup.module.css +24 -0
- package/components/buttonGroup/buttonGroup.module.css.d.ts +10 -0
- package/components/calendar/calendar.module.css +406 -0
- package/components/calendar/calendar.module.css.d.ts +47 -0
- package/components/checkbox/checkbox.module.css +182 -0
- package/components/checkbox/checkbox.module.css.d.ts +18 -0
- package/components/contextualHelp/contextualHelp.module.css +35 -0
- package/components/contextualHelp/contextualHelp.module.css.d.ts +7 -0
- package/components/dateField/dateField.module.css +239 -0
- package/components/dateField/dateField.module.css.d.ts +22 -0
- package/components/dialog/dialog.module.css +81 -0
- package/components/dialog/dialog.module.css.d.ts +15 -0
- package/components/feedbackMessage/feedbackMessage.module.css +42 -0
- package/components/feedbackMessage/feedbackMessage.module.css.d.ts +10 -0
- package/components/field/field.module.css.d.ts +17 -0
- package/components/fieldGroup/fieldGroup.module.css +64 -0
- package/components/fieldGroup/fieldGroup.module.css.d.ts +12 -0
- package/components/heading/heading.module.css +143 -0
- package/components/heading/heading.module.css.d.ts +12 -0
- package/components/icon/icon.module.css +14 -0
- package/components/icon/icon.module.css.d.ts +8 -0
- package/components/iconButton/iconButton.module.css +225 -0
- package/components/iconButton/iconButton.module.css.d.ts +19 -0
- package/components/label/label.module.css.d.ts +9 -0
- package/components/link/link.module.css +35 -0
- package/components/link/link.module.css.d.ts +10 -0
- package/components/list/list.module.css +160 -0
- package/components/list/list.module.css.d.ts +19 -0
- package/components/listbox/listbox.module.css +211 -0
- package/components/listbox/listbox.module.css.d.ts +21 -0
- package/components/notificationBadge/notificationBadge.module.css.d.ts +16 -0
- package/components/pagination/pagination.module.css +44 -0
- package/components/pagination/pagination.module.css.d.ts +8 -0
- package/components/panel/panel.module.css +87 -0
- package/components/panel/panel.module.css.d.ts +18 -0
- package/components/paragraph/paragraph.module.css +35 -0
- package/components/paragraph/paragraph.module.css.d.ts +8 -0
- package/components/popover/popover.module.css +39 -0
- package/components/popover/popover.module.css.d.ts +8 -0
- package/components/radio/radio.module.css +117 -0
- package/components/radio/radio.module.css.d.ts +14 -0
- package/components/searchField/searchField.module.css +148 -0
- package/components/searchField/searchField.module.css.d.ts +14 -0
- package/components/segmentedControl/segmentedControl.module.css +140 -0
- package/components/segmentedControl/segmentedControl.module.css.d.ts +16 -0
- package/components/select/select.module.css +166 -0
- package/components/select/select.module.css.d.ts +19 -0
- package/components/skeleton/skeleton.module.css +52 -0
- package/components/skeleton/skeleton.module.css.d.ts +9 -0
- package/components/spinner/spinner.module.css.d.ts +14 -0
- package/components/surface/surface.module.css +19 -0
- package/components/surface/surface.module.css.d.ts +5 -0
- package/components/switch/switch.module.css +170 -0
- package/components/switch/switch.module.css.d.ts +13 -0
- package/components/table/table.module.css +303 -0
- package/components/table/table.module.css.d.ts +37 -0
- package/components/tabs/tabs.module.css +83 -0
- package/components/tabs/tabs.module.css.d.ts +17 -0
- package/components/text/text.module.css.d.ts +21 -0
- package/components/textField/textField.module.css +208 -0
- package/components/textField/textField.module.css.d.ts +22 -0
- package/components/toast/toast.module.css.d.ts +12 -0
- package/components/tooltip/tooltip.module.css +41 -0
- package/components/tooltip/tooltip.module.css.d.ts +6 -0
- package/package.json +68 -0
- package/themes/default-dark.css +2 -0
- package/themes/default-dark.d.ts +3 -0
- package/themes/default-dark.js +8 -0
- package/themes/default.css +2 -0
- package/themes/default.d.ts +3 -0
- package/themes/default.js +8 -0
- package/themes/index.d.ts +1 -0
- package/themes/index.js +16 -0
- package/themes/june-dark.css +3 -0
- package/themes/june-dark.d.ts +4 -0
- package/themes/june-dark.js +9 -0
- package/themes/june.css +3 -0
- package/themes/june.d.ts +4 -0
- package/themes/june.js +9 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* wrapper
|
|
3
|
+
* Can be html label element to be able to drop "for" and "id" on label and input.
|
|
4
|
+
*/
|
|
5
|
+
.sapphire-switch {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
position: relative;
|
|
9
|
+
min-height: var(--sapphire-switch-size-height);
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
gap: var(--sapphire-switch-size-spacing-label);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* hidden html input
|
|
16
|
+
*/
|
|
17
|
+
.sapphire-switch-input {
|
|
18
|
+
margin: 0;
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
padding: 0;
|
|
21
|
+
position: absolute;
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
top: 0;
|
|
25
|
+
left: 0;
|
|
26
|
+
opacity: 0.0001;
|
|
27
|
+
z-index: 1;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* label
|
|
33
|
+
*/
|
|
34
|
+
.sapphire-switch-label {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: var(--sapphire-switch-size-spacing-label);
|
|
38
|
+
font-family: var(--sapphire-switch-font-label-name);
|
|
39
|
+
font-weight: var(--sapphire-switch-font-label-weight);
|
|
40
|
+
font-size: var(--sapphire-switch-size-font);
|
|
41
|
+
line-height: var(--sapphire-switch-size-line-height);
|
|
42
|
+
color: var(--sapphire-switch-color-label);
|
|
43
|
+
|
|
44
|
+
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
45
|
+
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
46
|
+
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
47
|
+
* can happen in other contexts as well.
|
|
48
|
+
*
|
|
49
|
+
* These do not do anything except in webkit browsers & firefox on OSX.
|
|
50
|
+
*
|
|
51
|
+
* For more details see:
|
|
52
|
+
* - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
|
|
53
|
+
* - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
|
|
54
|
+
*/
|
|
55
|
+
-webkit-font-smoothing: antialiased;
|
|
56
|
+
-moz-osx-font-smoothing: grayscale;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* knob track
|
|
61
|
+
*/
|
|
62
|
+
.sapphire-switch-track {
|
|
63
|
+
background: var(--sapphire-switch-color-background-off-default);
|
|
64
|
+
box-sizing: border-box;
|
|
65
|
+
position: relative;
|
|
66
|
+
width: var(--sapphire-switch-size-width);
|
|
67
|
+
transition: background var(--sapphire-switch-time-transition) ease-in-out;
|
|
68
|
+
height: var(--sapphire-switch-size-height);
|
|
69
|
+
border-radius: calc(var(--sapphire-switch-size-height) / 2);
|
|
70
|
+
}
|
|
71
|
+
.sapphire-switch-track::before {
|
|
72
|
+
content: '';
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: 50%;
|
|
75
|
+
left: 50%;
|
|
76
|
+
transform: translateY(-50%) translateX(-50%);
|
|
77
|
+
}
|
|
78
|
+
.sapphire-switch-input:checked ~ .sapphire-switch-track {
|
|
79
|
+
background-color: var(--sapphire-switch-color-background-on-default);
|
|
80
|
+
}
|
|
81
|
+
/* hover (unchecked) */
|
|
82
|
+
.sapphire-switch:not(:active):not(.is-active):not(.js-hover):hover
|
|
83
|
+
.sapphire-switch-input:not(:disabled)
|
|
84
|
+
~ .sapphire-switch-track,
|
|
85
|
+
.sapphire-switch:not(:active):not(.is-active).is-hover .sapphire-switch-track {
|
|
86
|
+
background-color: var(--sapphire-switch-color-background-off-hover);
|
|
87
|
+
}
|
|
88
|
+
/* hover (checked) */
|
|
89
|
+
.sapphire-switch:not(:active):not(.is-active):not(.js-hover):hover
|
|
90
|
+
.sapphire-switch-input:not(:disabled):checked
|
|
91
|
+
~ .sapphire-switch-track,
|
|
92
|
+
.sapphire-switch:not(:active):not(.is-active).is-hover
|
|
93
|
+
.sapphire-switch-input:checked
|
|
94
|
+
~ .sapphire-switch-track {
|
|
95
|
+
background-color: var(--sapphire-switch-color-background-on-hover);
|
|
96
|
+
}
|
|
97
|
+
/* focus */
|
|
98
|
+
.sapphire-switch:not(.js-focus)
|
|
99
|
+
.sapphire-switch-input:focus-visible
|
|
100
|
+
~ .sapphire-switch-track::before,
|
|
101
|
+
.sapphire-switch.is-focus .sapphire-switch-track::before {
|
|
102
|
+
width: calc(
|
|
103
|
+
var(--sapphire-switch-size-width) + 2 *
|
|
104
|
+
var(--sapphire-switch-size-focus-ring-outer-border) + 2 *
|
|
105
|
+
var(--sapphire-switch-size-focus-ring-inner-border)
|
|
106
|
+
);
|
|
107
|
+
height: calc(
|
|
108
|
+
var(--sapphire-switch-size-height) + 2 *
|
|
109
|
+
var(--sapphire-switch-size-focus-ring-outer-border) + 2 *
|
|
110
|
+
var(--sapphire-switch-size-focus-ring-inner-border)
|
|
111
|
+
);
|
|
112
|
+
border: var(--sapphire-switch-size-focus-ring-outer-border) solid
|
|
113
|
+
var(--sapphire-switch-color-focus-ring-outer-border);
|
|
114
|
+
border-radius: 1000px; /* percentage value does not work here */
|
|
115
|
+
box-sizing: border-box;
|
|
116
|
+
box-shadow: inset 0px 0px 0px
|
|
117
|
+
var(--sapphire-switch-size-focus-ring-inner-border)
|
|
118
|
+
var(--sapphire-switch-color-focus-ring-inner-border);
|
|
119
|
+
}
|
|
120
|
+
/* active (checked) */
|
|
121
|
+
.sapphire-switch:active
|
|
122
|
+
.sapphire-switch-input:not(:disabled):checked
|
|
123
|
+
~ .sapphire-switch-track,
|
|
124
|
+
.sapphire-switch.is-active
|
|
125
|
+
.sapphire-switch-input:not(:disabled):checked
|
|
126
|
+
~ .sapphire-switch-track {
|
|
127
|
+
background-color: var(--sapphire-switch-color-background-on-active);
|
|
128
|
+
}
|
|
129
|
+
/* active (unchecked) */
|
|
130
|
+
.sapphire-switch:active
|
|
131
|
+
.sapphire-switch-input:not(:disabled)
|
|
132
|
+
~ .sapphire-switch-track,
|
|
133
|
+
.sapphire-switch.is-active
|
|
134
|
+
.sapphire-switch-input:not(:disabled)
|
|
135
|
+
~ .sapphire-switch-track {
|
|
136
|
+
background-color: var(--sapphire-switch-color-background-off-active);
|
|
137
|
+
}
|
|
138
|
+
/* disabled */
|
|
139
|
+
.sapphire-switch-input:disabled {
|
|
140
|
+
cursor: default;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.sapphire-switch-input:disabled ~ .sapphire-switch-track,
|
|
144
|
+
.sapphire-switch-input:disabled ~ .sapphire-switch-label {
|
|
145
|
+
opacity: var(--sapphire-switch-opacity-disabled);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* knob handle
|
|
150
|
+
*/
|
|
151
|
+
.sapphire-switch-track::after {
|
|
152
|
+
content: '';
|
|
153
|
+
position: absolute;
|
|
154
|
+
width: var(--sapphire-switch-size-knob);
|
|
155
|
+
height: var(--sapphire-switch-size-knob);
|
|
156
|
+
border: solid
|
|
157
|
+
calc(
|
|
158
|
+
(var(--sapphire-switch-size-height) - var(--sapphire-switch-size-knob)) /
|
|
159
|
+
2
|
|
160
|
+
)
|
|
161
|
+
transparent;
|
|
162
|
+
border-radius: 50%;
|
|
163
|
+
background-color: var(--sapphire-switch-color-background-knob);
|
|
164
|
+
background-clip: content-box;
|
|
165
|
+
left: 0;
|
|
166
|
+
transition: left var(--sapphire-switch-time-transition) ease-in-out;
|
|
167
|
+
}
|
|
168
|
+
.sapphire-switch-input:checked ~ .sapphire-switch-track::after {
|
|
169
|
+
left: calc(100% - var(--sapphire-switch-size-height));
|
|
170
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "sapphire-switch": string;
|
|
3
|
+
readonly "sapphire-switch-input": string;
|
|
4
|
+
readonly "sapphire-switch-label": string;
|
|
5
|
+
readonly "sapphire-switch-track": string;
|
|
6
|
+
readonly "is-active": string;
|
|
7
|
+
readonly "js-hover": string;
|
|
8
|
+
readonly "is-hover": string;
|
|
9
|
+
readonly "js-focus": string;
|
|
10
|
+
readonly "is-focus": string;
|
|
11
|
+
};
|
|
12
|
+
export = styles;
|
|
13
|
+
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
.sapphire-table {
|
|
2
|
+
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
3
|
+
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
4
|
+
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
5
|
+
* can happen in other contexts as well.
|
|
6
|
+
*
|
|
7
|
+
* These do not do anything except in webkit browsers & firefox on OSX.
|
|
8
|
+
*
|
|
9
|
+
* For more details see:
|
|
10
|
+
* - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
|
|
11
|
+
* - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
|
|
12
|
+
*/
|
|
13
|
+
-webkit-font-smoothing: antialiased;
|
|
14
|
+
-moz-osx-font-smoothing: grayscale;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.sapphire-table--overflow {
|
|
18
|
+
/*
|
|
19
|
+
* If the "sapphire-table" has a set height the table needs to overflow.
|
|
20
|
+
*/
|
|
21
|
+
overflow: auto;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.sapphire-table__table {
|
|
25
|
+
border-collapse: collapse;
|
|
26
|
+
border-spacing: 0;
|
|
27
|
+
height: inherit;
|
|
28
|
+
background-color: var(--sapphire-table-color-background-table);
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.sapphire-table-sortedIcon {
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
visibility: hidden;
|
|
35
|
+
vertical-align: top;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.sapphire-table-sortableIcon {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
visibility: hidden;
|
|
41
|
+
vertical-align: top;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.sapphire-table__head {
|
|
45
|
+
top: 0;
|
|
46
|
+
z-index: 2; /* Setting to two because body rows are positioned relative */
|
|
47
|
+
line-height: var(--sapphire-table-size-line-height-cell-default);
|
|
48
|
+
background-color: var(--sapphire-table-color-background-head);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.sapphire-table__head--sticky {
|
|
52
|
+
/*
|
|
53
|
+
* If the "sapphire-table" needs the header to be sticky relative to some
|
|
54
|
+
* other ancestor which is not the table itself, then the table should not
|
|
55
|
+
* have the `--overflow` modifier.
|
|
56
|
+
*/
|
|
57
|
+
position: sticky;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.sapphire-table__cell--alignLeft {
|
|
61
|
+
text-align: left;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.sapphire-table__cell--alignCenter {
|
|
65
|
+
text-align: center;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.sapphire-table__cell--alignRight {
|
|
69
|
+
text-align: end;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.sapphire-table .sapphire-table__headCell {
|
|
73
|
+
color: var(--sapphire-table-color-content-cell);
|
|
74
|
+
box-sizing: border-box;
|
|
75
|
+
font-family: var(--sapphire-table-font-name);
|
|
76
|
+
font-weight: var(--sapphire-table-font-weight-head);
|
|
77
|
+
line-height: var(--sapphire-table-size-line-height-cell-default);
|
|
78
|
+
padding: var(--sapphire-table-size-spacing-head-cell-vertical-default)
|
|
79
|
+
var(--sapphire-table-size-spacing-head-cell-horizontal-default);
|
|
80
|
+
vertical-align: top;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.sapphire-table__headCell .sapphire-table__headCell_container {
|
|
84
|
+
padding: var(--sapphire-table-size-spacing-head-cell-container-vertical)
|
|
85
|
+
var(--sapphire-table-size-spacing-head-cell-container-horizontal);
|
|
86
|
+
display: inline-flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
box-sizing: border-box;
|
|
89
|
+
width: 100%;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.sapphire-table__cell--alignRight .sapphire-table__headCell_container {
|
|
93
|
+
justify-content: flex-end;
|
|
94
|
+
}
|
|
95
|
+
.sapphire-table__cell--alignLeft .sapphire-table__headCell_container {
|
|
96
|
+
justify-content: flex-start;
|
|
97
|
+
}
|
|
98
|
+
.sapphire-table__cell--alignCenter .sapphire-table__headCell_container {
|
|
99
|
+
justify-content: center;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* focus styles */
|
|
103
|
+
.sapphire-table__row,
|
|
104
|
+
.sapphire-table__cell,
|
|
105
|
+
.sapphire-table__headCell,
|
|
106
|
+
.sapphire-table__selectionCell {
|
|
107
|
+
outline: none;
|
|
108
|
+
|
|
109
|
+
/* In order to have the focus ring be displayed over the row divider */
|
|
110
|
+
position: relative;
|
|
111
|
+
z-index: 1;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.sapphire-table__headCell.is-focus .sapphire-table__headCell_container,
|
|
115
|
+
.sapphire-table__headCell:not(.js-focus):focus-visible
|
|
116
|
+
.sapphire-table__headCell_container,
|
|
117
|
+
.sapphire-table__cell.is-focus,
|
|
118
|
+
.sapphire-table__cell:not(.js-focus):focus-visible,
|
|
119
|
+
.sapphire-table__selectionCell.is-focus,
|
|
120
|
+
.sapphire-table__selectionCell:not(.js-focus):focus-visible,
|
|
121
|
+
.sapphire-table__row.is-focus,
|
|
122
|
+
.sapphire-table__row:not(.js-focus):focus-visible {
|
|
123
|
+
outline: none;
|
|
124
|
+
border-radius: var(--sapphire-table-size-radius-focus);
|
|
125
|
+
background-color: var(--sapphire-table-color-background-focus);
|
|
126
|
+
box-shadow: inset 0px 0px 0px var(--sapphire-table-size-width-border-focus)
|
|
127
|
+
var(--sapphire-table-color-border-focus);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.sapphire-table__headCell.is-focus .sapphire-table__headCell_container,
|
|
131
|
+
.sapphire-table__headCell:not(.js-focus):focus-visible
|
|
132
|
+
.sapphire-table__headCell_container {
|
|
133
|
+
/* According to the designs, for header cells only, focus has a border radius. */
|
|
134
|
+
border-radius: var(--sapphire-table-size-radius-focus);
|
|
135
|
+
}
|
|
136
|
+
/* end of focus styles */
|
|
137
|
+
|
|
138
|
+
.sapphire-table__headCell.sapphire-table__headCell--sortable.is-hover
|
|
139
|
+
.sapphire-table__headCell_container,
|
|
140
|
+
.sapphire-table__headCell.sapphire-table__headCell--sortable:not(.js-hover):hover
|
|
141
|
+
.sapphire-table__headCell_container {
|
|
142
|
+
background-color: var(--sapphire-table-color-background-hover);
|
|
143
|
+
border-radius: var(--sapphire-table-size-radius-hover);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.sapphire-table__headCell.sapphire-table__headCell--sortable {
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.sapphire-table__headCell.sapphire-table__headCell--sortable:not(sapphire-table__headCell--sorted):hover
|
|
151
|
+
.sapphire-table-sortableIcon {
|
|
152
|
+
visibility: visible;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.sapphire-table__headCell--sorted .sapphire-table-sortedIcon {
|
|
156
|
+
visibility: visible;
|
|
157
|
+
padding-left: var(--sapphire-table-size-spacing-icon-left-default);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.sapphire-table__headCell .sapphire-table-sortedIcon,
|
|
161
|
+
.sapphire-table__headCell .sapphire-table-sortableIcon {
|
|
162
|
+
padding-left: var(--sapphire-table-size-spacing-icon-left-default);
|
|
163
|
+
}
|
|
164
|
+
.sapphire-table__cell--alignRight .sapphire-table-sortedIcon,
|
|
165
|
+
.sapphire-table__cell--alignRight .sapphire-table-sortableIcon {
|
|
166
|
+
padding-right: var(--sapphire-table-size-spacing-icon-left-default);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.sapphire-table__headCell__text,
|
|
170
|
+
.sapphire-table__headCell__icon {
|
|
171
|
+
vertical-align: top;
|
|
172
|
+
display: inline-block;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.sapphire-table__body {
|
|
176
|
+
position: relative;
|
|
177
|
+
overflow: auto;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.sapphire-table__cell {
|
|
181
|
+
box-sizing: border-box;
|
|
182
|
+
color: var(--sapphire-table-color-content-cell);
|
|
183
|
+
font-family: var(--sapphire-table-font-name);
|
|
184
|
+
font-weight: var(--sapphire-table-font-weight-data);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Overflow behaviour */
|
|
188
|
+
.sapphire-table__cell--ellipsed,
|
|
189
|
+
.sapphire-table__headCell_content--ellipsed {
|
|
190
|
+
white-space: nowrap;
|
|
191
|
+
overflow: hidden;
|
|
192
|
+
text-overflow: ellipsis;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.sapphire-table .sapphire-table__cell,
|
|
196
|
+
.sapphire-table .sapphire-table__selectionCell {
|
|
197
|
+
font-size: var(--sapphire-table-size-font-data-default);
|
|
198
|
+
line-height: var(--sapphire-table-size-line-height-cell-default);
|
|
199
|
+
padding: var(--sapphire-table-size-spacing-cell-vertical-default)
|
|
200
|
+
var(--sapphire-table-size-spacing-cell-horizontal-default);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* Selection cells that are suppose to contain only a checkbox */
|
|
204
|
+
.sapphire-table .sapphire-table__selectionCell {
|
|
205
|
+
line-height: 0;
|
|
206
|
+
padding-left: var(--sapphire-table-size-spacing-cell-horizontal-end);
|
|
207
|
+
width: var(--sapphire-table-size-width-selection-cell);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.sapphire-table__headCell:first-child {
|
|
211
|
+
padding-left: var(--sapphire-table-size-spacing-head-cell-horizontal-end);
|
|
212
|
+
}
|
|
213
|
+
.sapphire-table__row .sapphire-table__cell:first-child {
|
|
214
|
+
padding-left: var(--sapphire-table-size-spacing-cell-horizontal-end);
|
|
215
|
+
}
|
|
216
|
+
.sapphire-table__headCell:last-child {
|
|
217
|
+
padding-right: var(--sapphire-table-size-spacing-head-cell-horizontal-end);
|
|
218
|
+
}
|
|
219
|
+
.sapphire-table__row .sapphire-table__cell:last-child {
|
|
220
|
+
padding-right: var(--sapphire-table-size-spacing-cell-horizontal-end);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.sapphire-table__row {
|
|
224
|
+
position: relative;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.sapphire-table__row--active {
|
|
228
|
+
/* We want active to override, focus, hover or selected. Using css selectors or priority to
|
|
229
|
+
* to achieve that adds a lot complexity which seems to justify the use of "!important" here.
|
|
230
|
+
*/
|
|
231
|
+
background-color: var(--sapphire-table-color-background-active) !important;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.sapphire-table__row--selected {
|
|
235
|
+
background-color: var(--sapphire-table-color-background-selected);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Row divider. Only shown when row is not focused, because of z-index issue with the focus ring
|
|
240
|
+
* which didn't seem to be solvable otherwise.
|
|
241
|
+
* NOTE: The reason we are using pseudo elements for row separator instead of a simple border is
|
|
242
|
+
* the distance of the separator to the edges. There is no such option on border.
|
|
243
|
+
* NOTE: If we use ::after on a tr with relative position, positioning won't work relative to tr,
|
|
244
|
+
* in Safari. So we are applying the ::after pseudo-element on cells, overriding left/right on
|
|
245
|
+
* first/last cell.
|
|
246
|
+
*/
|
|
247
|
+
.sapphire-table__row:not(.is-focus, :not(.js-focus):focus-visible) td::after {
|
|
248
|
+
content: '';
|
|
249
|
+
position: absolute;
|
|
250
|
+
height: 1px;
|
|
251
|
+
background: var(--sapphire-table-color-border-separator);
|
|
252
|
+
bottom: 0;
|
|
253
|
+
left: 0;
|
|
254
|
+
right: 0;
|
|
255
|
+
}
|
|
256
|
+
.sapphire-table--without-last-divider.sapphire-table__row:not(.is-focus, :not(.js-focus):focus-visible):last-child
|
|
257
|
+
td::after {
|
|
258
|
+
height: 0px;
|
|
259
|
+
}
|
|
260
|
+
.sapphire-table__row:not(.is-focus, :not(.js-focus):focus-visible)
|
|
261
|
+
td:first-child::after {
|
|
262
|
+
left: var(--sapphire-table-size-spacing-cell-horizontal-end);
|
|
263
|
+
}
|
|
264
|
+
.sapphire-table__row:not(.is-focus, :not(.js-focus):focus-visible)
|
|
265
|
+
td:last-child::after {
|
|
266
|
+
right: var(--sapphire-table-size-spacing-cell-horizontal-end);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.sapphire-table--interactive .sapphire-table__row {
|
|
270
|
+
cursor: default; /* by default cursor is text selection, which is unintuitive when rows are clickable */
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.sapphire-table--interactive .sapphire-table__row.is-hover,
|
|
274
|
+
.sapphire-table--interactive .sapphire-table__row:not(.js-hover):hover {
|
|
275
|
+
background-color: var(--sapphire-table-color-background-hover);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Selection actions. Optionally shown when a table uses multiple selection.
|
|
280
|
+
*/
|
|
281
|
+
.sapphire-table .sapphire-table__selection-action-bar {
|
|
282
|
+
display: flex;
|
|
283
|
+
align-items: center;
|
|
284
|
+
justify-content: space-between;
|
|
285
|
+
padding: var(--sapphire-table-size-spacing-selection-action-bar-vertical)
|
|
286
|
+
var(--sapphire-table-size-spacing-selection-action-bar-horizontal);
|
|
287
|
+
background-color: var(--sapphire-table-color-background-selection-action-bar);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Footer.
|
|
292
|
+
* Normally used as a container for the pagination.
|
|
293
|
+
*/
|
|
294
|
+
.sapphire-table__footer {
|
|
295
|
+
position: relative;
|
|
296
|
+
z-index: 2; /* Setting to two because body rows are positioned relative */
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.sapphire-table__footer--sticky {
|
|
300
|
+
position: sticky;
|
|
301
|
+
bottom: 0;
|
|
302
|
+
left: 0;
|
|
303
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "sapphire-table": string;
|
|
3
|
+
readonly "sapphire-table--overflow": string;
|
|
4
|
+
readonly "sapphire-table__table": string;
|
|
5
|
+
readonly "sapphire-table-sortedIcon": string;
|
|
6
|
+
readonly "sapphire-table-sortableIcon": string;
|
|
7
|
+
readonly "sapphire-table__head": string;
|
|
8
|
+
readonly "sapphire-table__head--sticky": string;
|
|
9
|
+
readonly "sapphire-table__cell--alignLeft": string;
|
|
10
|
+
readonly "sapphire-table__cell--alignCenter": string;
|
|
11
|
+
readonly "sapphire-table__cell--alignRight": string;
|
|
12
|
+
readonly "sapphire-table__headCell": string;
|
|
13
|
+
readonly "sapphire-table__headCell_container": string;
|
|
14
|
+
readonly "sapphire-table__row": string;
|
|
15
|
+
readonly "sapphire-table__cell": string;
|
|
16
|
+
readonly "sapphire-table__selectionCell": string;
|
|
17
|
+
readonly "is-focus": string;
|
|
18
|
+
readonly "js-focus": string;
|
|
19
|
+
readonly "sapphire-table__headCell--sortable": string;
|
|
20
|
+
readonly "is-hover": string;
|
|
21
|
+
readonly "js-hover": string;
|
|
22
|
+
readonly "sapphire-table__headCell--sorted": string;
|
|
23
|
+
readonly "sapphire-table__headCell__text": string;
|
|
24
|
+
readonly "sapphire-table__headCell__icon": string;
|
|
25
|
+
readonly "sapphire-table__body": string;
|
|
26
|
+
readonly "sapphire-table__cell--ellipsed": string;
|
|
27
|
+
readonly "sapphire-table__headCell_content--ellipsed": string;
|
|
28
|
+
readonly "sapphire-table__row--active": string;
|
|
29
|
+
readonly "sapphire-table__row--selected": string;
|
|
30
|
+
readonly "sapphire-table--without-last-divider": string;
|
|
31
|
+
readonly "sapphire-table--interactive": string;
|
|
32
|
+
readonly "sapphire-table__selection-action-bar": string;
|
|
33
|
+
readonly "sapphire-table__footer": string;
|
|
34
|
+
readonly "sapphire-table__footer--sticky": string;
|
|
35
|
+
};
|
|
36
|
+
export = styles;
|
|
37
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
.sapphire-tabs {
|
|
2
|
+
display: flex;
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
height: var(--sapphire-tabs-size-height);
|
|
5
|
+
box-shadow: inset 0px calc(-1 * var(--sapphire-tabs-size-border))
|
|
6
|
+
var(--sapphire-tabs-color-border-default);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.sapphire-tabs--inline {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* No underline modifier
|
|
15
|
+
*/
|
|
16
|
+
.sapphire-tabs--no-border {
|
|
17
|
+
box-shadow: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Single tab element
|
|
22
|
+
*/
|
|
23
|
+
.sapphire-tabs__tab {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
background: none;
|
|
28
|
+
color: var(--sapphire-tabs-color-content-inactive-default);
|
|
29
|
+
font-family: var(--sapphire-tabs-font-name);
|
|
30
|
+
font-weight: var(--sapphire-tabs-font-weight);
|
|
31
|
+
font-size: var(--sapphire-tabs-size-font);
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
border-width: 0;
|
|
35
|
+
padding: var(--sapphire-tabs-size-spacing-vertical)
|
|
36
|
+
var(--sapphire-tabs-size-spacing-horizontal);
|
|
37
|
+
outline: none;
|
|
38
|
+
/* Safari adds 2px padding to buttons (meaning gap between tabs when tab is a button) */
|
|
39
|
+
margin: 0;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.sapphire-tabs__tab:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,
|
|
44
|
+
.sapphire-tabs__tab:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover {
|
|
45
|
+
color: var(--sapphire-tabs-color-content-inactive-hover);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.sapphire-tabs__tab.is-focus,
|
|
49
|
+
.sapphire-tabs__tab:not(.js-focus):focus-visible {
|
|
50
|
+
outline: var(--sapphire-tabs-size-focus-ring) solid
|
|
51
|
+
var(--sapphire-tabs-color-focus-ring);
|
|
52
|
+
outline-offset: calc(-1 * var(--sapphire-tabs-size-focus-ring));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Disabled
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
.sapphire-tabs__tab:disabled,
|
|
60
|
+
.sapphire-tabs__tab.is-disabled {
|
|
61
|
+
cursor: not-allowed;
|
|
62
|
+
}
|
|
63
|
+
.sapphire-tabs__tab:disabled .sapphire-tabs__label,
|
|
64
|
+
.sapphire-tabs__tab.is-disabled .sapphire-tabs__label {
|
|
65
|
+
opacity: var(--sapphire-tabs-opacity-disabled);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Active tab
|
|
70
|
+
*/
|
|
71
|
+
.sapphire-tabs__tab--active {
|
|
72
|
+
color: var(--sapphire-tabs-color-content-active-default);
|
|
73
|
+
box-shadow: inset 0px calc(-1 * var(--sapphire-tabs-size-border))
|
|
74
|
+
var(--sapphire-tabs-color-border-active);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* tab panel focus styling */
|
|
78
|
+
.sapphire-tab-panel.js-focus.is-focus,
|
|
79
|
+
.sapphire-tab-panel:not(.js-focus):focus-visible {
|
|
80
|
+
outline: var(--sapphire-tabs-size-border) solid
|
|
81
|
+
var(--sapphire-tabs-color-focus-ring);
|
|
82
|
+
border-radius: var(--sapphire-tabs-size-focus-ring);
|
|
83
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "sapphire-tabs": string;
|
|
3
|
+
readonly "sapphire-tabs--inline": string;
|
|
4
|
+
readonly "sapphire-tabs--no-border": string;
|
|
5
|
+
readonly "sapphire-tabs__tab": string;
|
|
6
|
+
readonly "is-disabled": string;
|
|
7
|
+
readonly "is-active": string;
|
|
8
|
+
readonly "js-hover": string;
|
|
9
|
+
readonly "is-hover": string;
|
|
10
|
+
readonly "is-focus": string;
|
|
11
|
+
readonly "js-focus": string;
|
|
12
|
+
readonly "sapphire-tabs__label": string;
|
|
13
|
+
readonly "sapphire-tabs__tab--active": string;
|
|
14
|
+
readonly "sapphire-tab-panel": string;
|
|
15
|
+
};
|
|
16
|
+
export = styles;
|
|
17
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "sapphire-text": string;
|
|
3
|
+
readonly "sapphire-text--strong": string;
|
|
4
|
+
readonly "sapphire-text--underlined": string;
|
|
5
|
+
readonly "sapphire-text--heading-1": string;
|
|
6
|
+
readonly "sapphire-text--heading-2": string;
|
|
7
|
+
readonly "sapphire-text--heading-3": string;
|
|
8
|
+
readonly "sapphire-text--heading-4": string;
|
|
9
|
+
readonly "sapphire-text--heading-5": string;
|
|
10
|
+
readonly "sapphire-text--heading-6": string;
|
|
11
|
+
readonly "sapphire-text--heading-alternative": string;
|
|
12
|
+
readonly "sapphire-text--subheading-1": string;
|
|
13
|
+
readonly "sapphire-text--subheading-2": string;
|
|
14
|
+
readonly "sapphire-text--body-1": string;
|
|
15
|
+
readonly "sapphire-text--body-2": string;
|
|
16
|
+
readonly "sapphire-text--body-3": string;
|
|
17
|
+
readonly "sapphire-text--caption-1": string;
|
|
18
|
+
readonly "sapphire-text--caption-2": string;
|
|
19
|
+
};
|
|
20
|
+
export = styles;
|
|
21
|
+
|