@danske/sapphire-css 51.0.0 → 52.2.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 +4 -1
- package/build/themes/cjs/default.js +4 -1
- package/build/themes/cjs/index.d.ts +3 -0
- package/build/themes/cjs/realkredit.js +4 -1
- package/build/themes/esm/default-dark.js +4 -1
- package/build/themes/esm/default.js +4 -1
- package/build/themes/esm/index.d.ts +3 -0
- package/build/themes/esm/realkredit.js +4 -1
- package/components/alert/alert.module.css +3 -2
- package/components/avatar/avatar.module.css +1 -0
- package/components/button/button.module.css +1 -1
- package/components/calendar/calendar.module.css +46 -4
- package/components/calendar/calendar.module.css.d.ts +1 -0
- package/components/checkbox/checkbox.module.css +48 -3
- package/components/checkbox/checkbox.module.css.d.ts +5 -0
- package/components/danskeProgressBar/danskeProgressBar.module.css +178 -0
- package/components/danskeProgressBar/danskeProgressBar.module.css.d.ts +9 -0
- package/components/dateField/dateField.module.css +30 -1
- package/components/dateField/dateField.module.css.d.ts +1 -0
- package/components/dropzone/dropzone.module.css +12 -49
- package/components/field/field.module.css +180 -15
- package/components/field/field.module.css.d.ts +9 -2
- package/components/fieldGroup/fieldGroup.module.css +4 -0
- package/components/fieldGroup/fieldGroup.module.css.d.ts +1 -0
- package/components/label/label.module.css +5 -0
- package/components/label/label.module.css.d.ts +1 -0
- package/components/listbox/listbox.module.css +6 -0
- package/components/modalLayout/modalLayout.module.css +2 -1
- package/components/radio/radio.module.css +79 -18
- package/components/radio/radio.module.css.d.ts +5 -0
- package/components/searchField/searchField.module.css +31 -6
- package/components/searchField/searchField.module.css.d.ts +1 -0
- package/components/select/select.module.css +52 -11
- package/components/select/select.module.css.d.ts +2 -0
- package/components/slider/slider.module.css +2 -3
- package/components/switch/switch.module.css +42 -8
- package/components/switch/switch.module.css.d.ts +2 -0
- package/components/table/table.module.css +45 -2
- package/components/table/table.module.css.d.ts +3 -2
- package/components/textField/textField.module.css +43 -10
- package/components/textField/textField.module.css.d.ts +1 -0
- package/components/toast/toast.module.css +1 -0
- package/package.json +19 -22
- package/themes/default-dark.js +4 -1
- package/themes/default.js +4 -1
- package/themes/index.d.ts +3 -0
- package/themes/realkredit.js +4 -1
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
color: var(--sapphire-semantic-color-foreground-primary);
|
|
24
24
|
font-size: var(--sapphire-semantic-size-font-control-lg);
|
|
25
25
|
height: var(--sapphire-semantic-size-height-control-lg);
|
|
26
|
+
position: relative;
|
|
26
27
|
background: var(
|
|
27
28
|
--sapphire-semantic-color-background-action-secondary-default
|
|
28
29
|
);
|
|
@@ -116,19 +117,17 @@
|
|
|
116
117
|
* Css only solution to:
|
|
117
118
|
* - hide the clear button when the input is empty.
|
|
118
119
|
* - Apply a gentle transition on appearance/disappearance
|
|
120
|
+
* The button's space is kept reserved (only opacity/scale animate) so the
|
|
121
|
+
* input's flex space doesn't shift when the button appears/disappears.
|
|
119
122
|
* IMPORTANT: there must be a placeholder provided for :placeholder-shown to
|
|
120
123
|
* work. " " can be set as placeholder as a fallback, or
|
|
121
124
|
* sapphire-search-field__input--empty class can be used instead.
|
|
122
125
|
*/
|
|
123
126
|
opacity: 0;
|
|
124
|
-
width: 0; /* To not cover the input when invisible. */
|
|
125
127
|
transform: scale(0.85);
|
|
128
|
+
cursor: text; /* cursor: text is used to avoid the button's hover effect when the input is empty */
|
|
126
129
|
transition: transform var(--sapphire-semantic-time-fade-quick),
|
|
127
|
-
opacity var(--sapphire-semantic-time-fade-quick)
|
|
128
|
-
width var(--sapphire-semantic-time-fade-quick)
|
|
129
|
-
/* Zero duration will kill the transition */
|
|
130
|
-
var(--sapphire-semantic-time-fade-quick)
|
|
131
|
-
/* Delaying to prevent width transition*/;
|
|
130
|
+
opacity var(--sapphire-semantic-time-fade-quick);
|
|
132
131
|
}
|
|
133
132
|
|
|
134
133
|
/*
|
|
@@ -166,3 +165,29 @@
|
|
|
166
165
|
.sapphire-search-field--md .sapphire-search-field__icon {
|
|
167
166
|
margin-left: var(--sapphire-semantic-size-spacing-sm);
|
|
168
167
|
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Small Size
|
|
171
|
+
*/
|
|
172
|
+
.sapphire-search-field--sm {
|
|
173
|
+
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
174
|
+
height: var(--sapphire-semantic-size-height-control-sm);
|
|
175
|
+
border-radius: var(--sapphire-semantic-size-height-control-sm);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.sapphire-search-field--sm .sapphire-search-field__input {
|
|
179
|
+
padding-left: var(--sapphire-semantic-size-height-control-sm);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.sapphire-search-field--sm .sapphire-search-field__button {
|
|
183
|
+
height: var(--sapphire-semantic-size-height-control-sm);
|
|
184
|
+
width: var(--sapphire-semantic-size-height-control-sm);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.sapphire-search-field--sm .sapphire-search-field__input:last-child {
|
|
188
|
+
padding-right: var(--sapphire-semantic-size-spacing-xs);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.sapphire-search-field--sm .sapphire-search-field__icon {
|
|
192
|
+
margin-left: var(--sapphire-semantic-size-spacing-xs);
|
|
193
|
+
}
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
height: var(--sapphire-semantic-size-height-control-lg);
|
|
25
25
|
box-sizing: border-box;
|
|
26
26
|
cursor: pointer;
|
|
27
|
-
padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-md)
|
|
28
|
-
var(--sapphire-semantic-size-spacing-control-horizontal-lg);
|
|
27
|
+
padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-md);
|
|
29
28
|
border: none;
|
|
30
29
|
background: var(--sapphire-semantic-color-background-field);
|
|
31
30
|
width: 100%;
|
|
@@ -46,6 +45,14 @@
|
|
|
46
45
|
gap: var(--sapphire-semantic-size-spacing-xs);
|
|
47
46
|
}
|
|
48
47
|
|
|
48
|
+
.sapphire-select--sm .sapphire-select__button {
|
|
49
|
+
border-radius: var(--sapphire-semantic-size-radius-sm);
|
|
50
|
+
height: var(--sapphire-semantic-size-height-control-sm);
|
|
51
|
+
padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-sm) 0
|
|
52
|
+
var(--sapphire-semantic-size-spacing-control-horizontal-md);
|
|
53
|
+
gap: var(--sapphire-semantic-size-spacing-2xs);
|
|
54
|
+
}
|
|
55
|
+
|
|
49
56
|
.sapphire-select__value {
|
|
50
57
|
flex: 1 0 0;
|
|
51
58
|
min-width: 0;
|
|
@@ -61,6 +68,10 @@
|
|
|
61
68
|
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
62
69
|
}
|
|
63
70
|
|
|
71
|
+
.sapphire-select--sm .sapphire-select__value {
|
|
72
|
+
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
73
|
+
}
|
|
74
|
+
|
|
64
75
|
.sapphire-select__placeholder {
|
|
65
76
|
overflow: hidden;
|
|
66
77
|
text-overflow: ellipsis;
|
|
@@ -81,6 +92,11 @@
|
|
|
81
92
|
height: var(--sapphire-semantic-size-icon-sm);
|
|
82
93
|
}
|
|
83
94
|
|
|
95
|
+
.sapphire-select--sm .sapphire-select__icon-container {
|
|
96
|
+
width: var(--sapphire-semantic-size-icon-sm);
|
|
97
|
+
height: var(--sapphire-semantic-size-icon-sm);
|
|
98
|
+
}
|
|
99
|
+
|
|
84
100
|
/**
|
|
85
101
|
* Prefix
|
|
86
102
|
*/
|
|
@@ -91,15 +107,18 @@
|
|
|
91
107
|
color: var(--sapphire-semantic-color-foreground-secondary);
|
|
92
108
|
}
|
|
93
109
|
|
|
94
|
-
.sapphire-select:
|
|
95
|
-
|
|
96
|
-
padding-left: var(--sapphire-semantic-size-spacing-control-horizontal-md);
|
|
110
|
+
.sapphire-select--sm .sapphire-select__button:has(.sapphire-select__prefix) {
|
|
111
|
+
padding-left: var(--sapphire-semantic-size-spacing-control-horizontal-sm);
|
|
97
112
|
}
|
|
98
113
|
|
|
99
114
|
.sapphire-select--md .sapphire-select__prefix {
|
|
100
115
|
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
101
116
|
}
|
|
102
117
|
|
|
118
|
+
.sapphire-select--sm .sapphire-select__prefix {
|
|
119
|
+
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
120
|
+
}
|
|
121
|
+
|
|
103
122
|
/*
|
|
104
123
|
* Search input. If visually-hidden styles are not inline,
|
|
105
124
|
* data-hidden="true" can be added when the input is visually hidden,
|
|
@@ -123,6 +142,34 @@
|
|
|
123
142
|
z-index: 1;
|
|
124
143
|
}
|
|
125
144
|
|
|
145
|
+
/*
|
|
146
|
+
* iOS keyboard trigger.
|
|
147
|
+
*
|
|
148
|
+
* An invisible <label htmlFor> overlay (a sibling of __button) that covers the
|
|
149
|
+
* trigger while the searchable select is closed. On touch devices, tapping it
|
|
150
|
+
* forwards a trusted focus to the search input, which is the only way to make
|
|
151
|
+
* iOS Safari open the software keyboard — the trigger button itself cannot,
|
|
152
|
+
* because React Aria's usePress defers onPress to the click event and Sapphire's
|
|
153
|
+
* useButton (usePreventTouchEnd) calls preventDefault() on the trigger touchend.
|
|
154
|
+
*
|
|
155
|
+
* pointer-events is disabled by default so mouse/keyboard users interact with the
|
|
156
|
+
* trigger button exactly as before (hover, press, toggle). It is only enabled on
|
|
157
|
+
* touch devices, where the keyboard problem exists.
|
|
158
|
+
*/
|
|
159
|
+
.sapphire-select__ios-keyboard-trigger {
|
|
160
|
+
position: absolute;
|
|
161
|
+
inset: 0;
|
|
162
|
+
z-index: 1;
|
|
163
|
+
cursor: pointer;
|
|
164
|
+
pointer-events: none;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@media (hover: none) and (pointer: coarse) {
|
|
168
|
+
.sapphire-select__ios-keyboard-trigger {
|
|
169
|
+
pointer-events: auto;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
126
173
|
/**
|
|
127
174
|
* Error
|
|
128
175
|
*/
|
|
@@ -163,12 +210,6 @@
|
|
|
163
210
|
outline-offset: calc(0px - var(--sapphire-semantic-size-focus-ring));
|
|
164
211
|
}
|
|
165
212
|
|
|
166
|
-
.sapphire-select--error:not(.is-disabled).is-focus .sapphire-select__button {
|
|
167
|
-
outline: solid var(--sapphire-semantic-size-focus-ring)
|
|
168
|
-
var(--sapphire-semantic-color-border-negative-default);
|
|
169
|
-
outline-offset: calc(-1 * var(--sapphire-semantic-size-focus-ring));
|
|
170
|
-
}
|
|
171
|
-
|
|
172
213
|
.sapphire-select.is-disabled .sapphire-select__button {
|
|
173
214
|
cursor: not-allowed;
|
|
174
215
|
opacity: var(--sapphire-semantic-opacity-disabled);
|
|
@@ -2,12 +2,14 @@ declare const styles: {
|
|
|
2
2
|
readonly "sapphire-select": string;
|
|
3
3
|
readonly "sapphire-select__button": string;
|
|
4
4
|
readonly "sapphire-select--md": string;
|
|
5
|
+
readonly "sapphire-select--sm": string;
|
|
5
6
|
readonly "sapphire-select__value": string;
|
|
6
7
|
readonly "sapphire-select__placeholder": string;
|
|
7
8
|
readonly "sapphire-select__icon-container": string;
|
|
8
9
|
readonly "sapphire-select__prefix": string;
|
|
9
10
|
readonly "sapphire-select__search-input": string;
|
|
10
11
|
readonly "sapphire-select__native-select": string;
|
|
12
|
+
readonly "sapphire-select__ios-keyboard-trigger": string;
|
|
11
13
|
readonly "sapphire-select--error": string;
|
|
12
14
|
readonly "is-disabled": string;
|
|
13
15
|
readonly "is-focus": string;
|
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
gap: var(--sapphire-semantic-size-spacing-xs);
|
|
6
6
|
justify-content: center;
|
|
7
|
-
width: fit-content;
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
.sapphire-slider__track {
|
|
11
10
|
position: relative;
|
|
12
|
-
width:
|
|
11
|
+
width: 100%;
|
|
13
12
|
height: var(--sapphire-semantic-size-height-control-2xs);
|
|
14
13
|
touch-action: none;
|
|
15
14
|
}
|
|
@@ -22,7 +21,7 @@
|
|
|
22
21
|
backdrop-filter: var(--sapphire-semantic-backdrop-filter-blur);
|
|
23
22
|
height: var(--sapphire-global-size-generic-10);
|
|
24
23
|
border-radius: var(--sapphire-semantic-size-radius-sm);
|
|
25
|
-
width:
|
|
24
|
+
width: 100%;
|
|
26
25
|
top: 50%;
|
|
27
26
|
transform: translateY(-50%);
|
|
28
27
|
}
|
|
@@ -66,6 +66,12 @@
|
|
|
66
66
|
line-height: var(--sapphire-semantic-size-height-control-2xs);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
.sapphire-switch--sm .sapphire-switch-label {
|
|
70
|
+
gap: var(--sapphire-semantic-size-spacing-2xs);
|
|
71
|
+
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
72
|
+
line-height: var(--sapphire-semantic-size-height-control-2xs);
|
|
73
|
+
}
|
|
74
|
+
|
|
69
75
|
/* focus */
|
|
70
76
|
.sapphire-switch:not(.js-focus)
|
|
71
77
|
.sapphire-switch-input:focus-visible
|
|
@@ -85,8 +91,9 @@
|
|
|
85
91
|
width: var(--sapphire-global-size-generic-110);
|
|
86
92
|
box-shadow: inset 0 0 0 var(--sapphire-semantic-size-border-sm)
|
|
87
93
|
var(--sapphire-semantic-color-border-field-default);
|
|
88
|
-
transition: box-shadow
|
|
89
|
-
|
|
94
|
+
transition-property: background, box-shadow;
|
|
95
|
+
transition-duration: var(--sapphire-semantic-time-motion-quick);
|
|
96
|
+
transition-timing-function: var(--sapphire-semantic-transitions-fade);
|
|
90
97
|
height: var(--sapphire-semantic-size-height-control-xs);
|
|
91
98
|
border-radius: calc(var(--sapphire-semantic-size-height-control-xs) / 2);
|
|
92
99
|
/* Prevents the component from shrinking */
|
|
@@ -162,7 +169,7 @@
|
|
|
162
169
|
padding: var(--sapphire-global-size-static-5);
|
|
163
170
|
|
|
164
171
|
height: 100%;
|
|
165
|
-
|
|
172
|
+
width: var(--sapphire-semantic-size-height-control-xs);
|
|
166
173
|
border-radius: 50%;
|
|
167
174
|
background-color: var(--sapphire-semantic-color-border-field-default);
|
|
168
175
|
background-clip: content-box;
|
|
@@ -202,17 +209,41 @@
|
|
|
202
209
|
}
|
|
203
210
|
|
|
204
211
|
.sapphire-switch--md .sapphire-switch-track {
|
|
205
|
-
width:
|
|
212
|
+
width: 2.25rem /* 36px - do we want a token for this? */;
|
|
206
213
|
height: var(--sapphire-semantic-size-height-control-2xs);
|
|
207
214
|
border-radius: calc(var(--sapphire-semantic-size-height-control-2xs) / 2);
|
|
208
215
|
}
|
|
209
216
|
|
|
217
|
+
.sapphire-switch--md .sapphire-switch-track::after {
|
|
218
|
+
width: var(--sapphire-semantic-size-height-control-2xs);
|
|
219
|
+
}
|
|
220
|
+
|
|
210
221
|
.sapphire-switch--md
|
|
211
222
|
.sapphire-switch-input:checked
|
|
212
223
|
~ .sapphire-switch-track::after {
|
|
213
224
|
left: calc(100% - var(--sapphire-semantic-size-height-control-2xs));
|
|
214
225
|
}
|
|
215
226
|
|
|
227
|
+
.sapphire-switch--sm .sapphire-switch-track {
|
|
228
|
+
width: 1.875rem; /* 30px - do we want a token for this? */
|
|
229
|
+
height: var(--sapphire-semantic-size-height-box-md);
|
|
230
|
+
border-radius: calc(var(--sapphire-semantic-size-height-box-md) / 2);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.sapphire-switch--sm .sapphire-switch-track::after {
|
|
234
|
+
width: var(--sapphire-semantic-size-height-box-md);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.sapphire-switch--sm
|
|
238
|
+
.sapphire-switch-input:checked
|
|
239
|
+
~ .sapphire-switch-track::after {
|
|
240
|
+
left: calc(100% - var(--sapphire-semantic-size-height-box-md));
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.sapphire-switch--sm {
|
|
244
|
+
gap: var(--sapphire-semantic-size-spacing-xs);
|
|
245
|
+
}
|
|
246
|
+
|
|
216
247
|
/* Note */
|
|
217
248
|
.sapphire-switch__note {
|
|
218
249
|
display: block;
|
|
@@ -231,8 +262,11 @@
|
|
|
231
262
|
.sapphire-switch__note--md {
|
|
232
263
|
font-size: var(--sapphire-semantic-size-font-label-sm);
|
|
233
264
|
line-height: var(--sapphire-semantic-size-line-height-sm);
|
|
234
|
-
margin-left: calc(
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
265
|
+
margin-left: calc(var(--sapphire-semantic-size-spacing-sm) + 2.25rem);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.sapphire-switch__note--sm {
|
|
269
|
+
font-size: var(--sapphire-semantic-size-font-label-sm);
|
|
270
|
+
line-height: var(--sapphire-semantic-size-line-height-sm);
|
|
271
|
+
margin-left: calc(var(--sapphire-semantic-size-spacing-xs) + 1.875rem);
|
|
238
272
|
}
|
|
@@ -4,6 +4,7 @@ declare const styles: {
|
|
|
4
4
|
readonly "sapphire-switch-input": string;
|
|
5
5
|
readonly "sapphire-switch-label": string;
|
|
6
6
|
readonly "sapphire-switch--md": string;
|
|
7
|
+
readonly "sapphire-switch--sm": string;
|
|
7
8
|
readonly "js-focus": string;
|
|
8
9
|
readonly "sapphire-switch-track": string;
|
|
9
10
|
readonly "is-focus": string;
|
|
@@ -12,6 +13,7 @@ declare const styles: {
|
|
|
12
13
|
readonly "is-hover": string;
|
|
13
14
|
readonly "sapphire-switch__note": string;
|
|
14
15
|
readonly "sapphire-switch__note--md": string;
|
|
16
|
+
readonly "sapphire-switch__note--sm": string;
|
|
15
17
|
};
|
|
16
18
|
export = styles;
|
|
17
19
|
|
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
background-color: var(--sapphire-semantic-color-background-surface);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
.sapphire-table--negative-margin-self {
|
|
23
|
+
margin-left: calc(var(--sapphire-semantic-size-spacing-sm) * -1);
|
|
24
|
+
width: calc(100% + (var(--sapphire-semantic-size-spacing-sm) * 2));
|
|
25
|
+
}
|
|
26
|
+
|
|
22
27
|
.sapphire-table--overflow {
|
|
23
28
|
/*
|
|
24
29
|
* If the "sapphire-table" has a set height the table needs to overflow.
|
|
@@ -31,6 +36,7 @@
|
|
|
31
36
|
border-spacing: 0;
|
|
32
37
|
width: 100%;
|
|
33
38
|
table-layout: auto;
|
|
39
|
+
--sapphire-table-side-padding: var(--sapphire-table-cell-spacing-h);
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
.sapphire-table__table--fixed-layout {
|
|
@@ -104,6 +110,14 @@
|
|
|
104
110
|
width: 100%;
|
|
105
111
|
}
|
|
106
112
|
|
|
113
|
+
.sapphire-table__headCell:first-child .sapphire-table__headCell_container {
|
|
114
|
+
padding-left: var(--sapphire-table-side-padding);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.sapphire-table__headCell:last-child .sapphire-table__headCell_container {
|
|
118
|
+
padding-right: var(--sapphire-table-side-padding);
|
|
119
|
+
}
|
|
120
|
+
|
|
107
121
|
.sapphire-table__cell--alignRight .sapphire-table__headCell_container {
|
|
108
122
|
justify-content: flex-end;
|
|
109
123
|
}
|
|
@@ -217,6 +231,14 @@
|
|
|
217
231
|
var(--sapphire-table-cell-spacing-h);
|
|
218
232
|
}
|
|
219
233
|
|
|
234
|
+
.sapphire-table__cell:not(.sapphire-table__cell--tree):first-child {
|
|
235
|
+
padding-left: var(--sapphire-table-side-padding);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.sapphire-table__cell:not(.sapphire-table__cell--tree):last-child {
|
|
239
|
+
padding-right: var(--sapphire-table-side-padding);
|
|
240
|
+
}
|
|
241
|
+
|
|
220
242
|
.sapphire-table__cell-contents {
|
|
221
243
|
display: block;
|
|
222
244
|
width: 100%;
|
|
@@ -265,11 +287,24 @@
|
|
|
265
287
|
box-sizing: content-box;
|
|
266
288
|
text-align: center;
|
|
267
289
|
}
|
|
290
|
+
|
|
291
|
+
.sapphire-table__selectionCell:first-child {
|
|
292
|
+
padding-left: var(--sapphire-table-side-padding);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.sapphire-table__selectionCell:last-child {
|
|
296
|
+
padding-right: var(--sapphire-table-side-padding);
|
|
297
|
+
}
|
|
298
|
+
|
|
268
299
|
.sapphire-table__head .sapphire-table__selectionCell {
|
|
269
300
|
padding: var(--sapphire-semantic-size-spacing-2xs)
|
|
270
301
|
var(--sapphire-table-cell-spacing-h);
|
|
271
302
|
}
|
|
272
303
|
|
|
304
|
+
.sapphire-table__head .sapphire-table__selectionCell:first-child {
|
|
305
|
+
padding-left: var(--sapphire-table-side-padding);
|
|
306
|
+
}
|
|
307
|
+
|
|
273
308
|
td.sapphire-table__selectionCell,
|
|
274
309
|
th.sapphire-table__selectionCell {
|
|
275
310
|
width: var(--sapphire-global-size-generic-50);
|
|
@@ -330,8 +365,8 @@ th.sapphire-table__selectionCell:first-child {
|
|
|
330
365
|
}
|
|
331
366
|
|
|
332
367
|
/* Applied only when the "action" on rows is disabled. If only selection is disabled, only the checkbox should be disabled */
|
|
333
|
-
.sapphire-table__row.is-disabled
|
|
334
|
-
|
|
368
|
+
.sapphire-table__row.is-disabled .sapphire-table__cell,
|
|
369
|
+
.sapphire-table__row.is-disabled .sapphire-table__selectionCell {
|
|
335
370
|
opacity: var(--sapphire-semantic-opacity-disabled);
|
|
336
371
|
}
|
|
337
372
|
|
|
@@ -402,6 +437,14 @@ th.sapphire-table__selectionCell:first-child {
|
|
|
402
437
|
--sapphire-table-row-level: 5;
|
|
403
438
|
}
|
|
404
439
|
|
|
440
|
+
.sapphire-table__headCell.sapphire-table__cell--tree {
|
|
441
|
+
--sapphire-table-row-level: 1;
|
|
442
|
+
}
|
|
443
|
+
.sapphire-table__headCell.sapphire-table__cell--tree
|
|
444
|
+
.sapphire-table__headCell_container {
|
|
445
|
+
padding-left: 0;
|
|
446
|
+
}
|
|
447
|
+
|
|
405
448
|
/* tree column renders expand/collapse icon and is indented based on row level */
|
|
406
449
|
.sapphire-table__cell--tree {
|
|
407
450
|
/* the unit of indentation for nested rows. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
2
|
readonly "sapphire-table": string;
|
|
3
|
+
readonly "sapphire-table--negative-margin-self": string;
|
|
3
4
|
readonly "sapphire-table--overflow": string;
|
|
4
5
|
readonly "sapphire-table__table": string;
|
|
5
6
|
readonly "sapphire-table__table--fixed-layout": string;
|
|
@@ -25,6 +26,7 @@ declare const styles: {
|
|
|
25
26
|
readonly "sapphire-table__headCell__text": string;
|
|
26
27
|
readonly "sapphire-table__headCell__icon": string;
|
|
27
28
|
readonly "sapphire-table__body": string;
|
|
29
|
+
readonly "sapphire-table__cell--tree": string;
|
|
28
30
|
readonly "sapphire-table__cell-contents": string;
|
|
29
31
|
readonly "sapphire-table__cell--ellipsed": string;
|
|
30
32
|
readonly "sapphire-table__headCell_content--ellipsed": string;
|
|
@@ -33,13 +35,12 @@ declare const styles: {
|
|
|
33
35
|
readonly "sapphire-table__table--spacing-xl": string;
|
|
34
36
|
readonly "sapphire-table__tfoot": string;
|
|
35
37
|
readonly "is-disabled": string;
|
|
36
|
-
readonly "sapphire-table__row--selected": string;
|
|
37
38
|
readonly "sapphire-table--interactive": string;
|
|
38
39
|
readonly "sapphire-table__row--active": string;
|
|
39
40
|
readonly "sapphire-table__row--interactive": string;
|
|
41
|
+
readonly "sapphire-table__row--selected": string;
|
|
40
42
|
readonly "sapphire-table__row--expanded": string;
|
|
41
43
|
readonly "sapphire-table__row-expand-button": string;
|
|
42
|
-
readonly "sapphire-table__cell--tree": string;
|
|
43
44
|
readonly "sapphire-table__row-expand-button--expanded": string;
|
|
44
45
|
readonly "sapphire-table--without-last-divider": string;
|
|
45
46
|
readonly "sapphire-table__row--highlighted": string;
|
|
@@ -34,12 +34,18 @@
|
|
|
34
34
|
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
.sapphire-text-field--sm {
|
|
38
|
+
border-radius: var(--sapphire-semantic-size-radius-sm);
|
|
39
|
+
height: var(--sapphire-semantic-size-height-control-sm);
|
|
40
|
+
font-size: var(--sapphire-semantic-size-font-control-md);
|
|
41
|
+
}
|
|
42
|
+
|
|
37
43
|
.sapphire-text-field__input {
|
|
38
44
|
box-sizing: border-box;
|
|
39
45
|
width: 100%;
|
|
40
46
|
height: 100%;
|
|
41
47
|
margin: 0;
|
|
42
|
-
padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-
|
|
48
|
+
padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-md);
|
|
43
49
|
line-height: var(--sapphire-semantic-size-line-height-md);
|
|
44
50
|
|
|
45
51
|
font-family: inherit;
|
|
@@ -53,10 +59,6 @@
|
|
|
53
59
|
outline: none;
|
|
54
60
|
}
|
|
55
61
|
|
|
56
|
-
.sapphire-text-field--md .sapphire-text-field__input {
|
|
57
|
-
padding: 0 var(--sapphire-semantic-size-spacing-control-horizontal-md);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
62
|
/**
|
|
61
63
|
* Placeholder
|
|
62
64
|
*/
|
|
@@ -82,6 +84,9 @@
|
|
|
82
84
|
.sapphire-text-field--md:not(.sapphire-text-field--multiline) {
|
|
83
85
|
gap: var(--sapphire-semantic-size-spacing-xs);
|
|
84
86
|
}
|
|
87
|
+
.sapphire-text-field--sm:not(.sapphire-text-field--multiline) {
|
|
88
|
+
gap: var(--sapphire-semantic-size-spacing-2xs);
|
|
89
|
+
}
|
|
85
90
|
|
|
86
91
|
/**
|
|
87
92
|
* Prefix/postfix
|
|
@@ -100,8 +105,8 @@
|
|
|
100
105
|
margin-left: var(--sapphire-semantic-size-spacing-control-horizontal-md);
|
|
101
106
|
}
|
|
102
107
|
|
|
103
|
-
.sapphire-text-field--
|
|
104
|
-
margin-left: var(--sapphire-semantic-size-spacing-control-horizontal-
|
|
108
|
+
.sapphire-text-field--sm .sapphire-text-field__prefix {
|
|
109
|
+
margin-left: var(--sapphire-semantic-size-spacing-control-horizontal-sm);
|
|
105
110
|
}
|
|
106
111
|
|
|
107
112
|
/**
|
|
@@ -121,8 +126,8 @@
|
|
|
121
126
|
margin-right: var(--sapphire-semantic-size-spacing-control-horizontal-md);
|
|
122
127
|
}
|
|
123
128
|
|
|
124
|
-
.sapphire-text-field--
|
|
125
|
-
margin-right: var(--sapphire-semantic-size-spacing-control-horizontal-
|
|
129
|
+
.sapphire-text-field--sm .sapphire-text-field__postfix {
|
|
130
|
+
margin-right: var(--sapphire-semantic-size-spacing-control-horizontal-sm);
|
|
126
131
|
}
|
|
127
132
|
|
|
128
133
|
/**
|
|
@@ -141,6 +146,12 @@
|
|
|
141
146
|
height: var(--sapphire-semantic-size-icon-sm);
|
|
142
147
|
}
|
|
143
148
|
|
|
149
|
+
.sapphire-text-field--sm .sapphire-text-field__prefix--icon,
|
|
150
|
+
.sapphire-text-field--sm .sapphire-text-field__postfix--icon {
|
|
151
|
+
width: var(--sapphire-semantic-size-icon-sm);
|
|
152
|
+
height: var(--sapphire-semantic-size-icon-sm);
|
|
153
|
+
}
|
|
154
|
+
|
|
144
155
|
/**
|
|
145
156
|
* Multiline
|
|
146
157
|
* (this does not support a prefix/postfix)
|
|
@@ -156,7 +167,7 @@
|
|
|
156
167
|
resize: none;
|
|
157
168
|
width: 100%;
|
|
158
169
|
padding: var(--sapphire-semantic-size-spacing-control-vertical-lg)
|
|
159
|
-
var(--sapphire-semantic-size-spacing-control-horizontal-
|
|
170
|
+
var(--sapphire-semantic-size-spacing-control-horizontal-md);
|
|
160
171
|
scroll-padding-bottom: var(
|
|
161
172
|
--sapphire-semantic-size-spacing-control-vertical-lg
|
|
162
173
|
);
|
|
@@ -171,6 +182,15 @@
|
|
|
171
182
|
);
|
|
172
183
|
}
|
|
173
184
|
|
|
185
|
+
.sapphire-text-field--sm.sapphire-text-field--multiline
|
|
186
|
+
.sapphire-text-field__input {
|
|
187
|
+
padding: var(--sapphire-semantic-size-spacing-control-vertical-sm)
|
|
188
|
+
var(--sapphire-semantic-size-spacing-control-horizontal-sm);
|
|
189
|
+
scroll-padding-bottom: var(
|
|
190
|
+
--sapphire-semantic-size-spacing-control-vertical-sm
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
174
194
|
/**
|
|
175
195
|
* Resizable
|
|
176
196
|
*/
|
|
@@ -276,6 +296,15 @@
|
|
|
276
296
|
gap: var(--sapphire-semantic-size-spacing-sm);
|
|
277
297
|
}
|
|
278
298
|
|
|
299
|
+
.sapphire-text-field--sm .sapphire-text-field__stepper {
|
|
300
|
+
padding: var(--sapphire-semantic-size-spacing-2xs)
|
|
301
|
+
calc(
|
|
302
|
+
var(--sapphire-semantic-size-spacing-2xs) +
|
|
303
|
+
var(--sapphire-semantic-size-border-sm)
|
|
304
|
+
);
|
|
305
|
+
gap: var(--sapphire-semantic-size-spacing-2xs);
|
|
306
|
+
}
|
|
307
|
+
|
|
279
308
|
.sapphire-text-field:has(.sapphire-text-field__stepper)
|
|
280
309
|
.sapphire-text-field__postfix {
|
|
281
310
|
margin-right: 0;
|
|
@@ -331,3 +360,7 @@
|
|
|
331
360
|
.sapphire-text-field--md.sapphire-text-field__stepper-button {
|
|
332
361
|
width: var(--sapphire-semantic-size-icon-sm);
|
|
333
362
|
}
|
|
363
|
+
|
|
364
|
+
.sapphire-text-field--sm.sapphire-text-field__stepper-button {
|
|
365
|
+
width: var(--sapphire-semantic-size-icon-sm);
|
|
366
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
2
|
readonly "sapphire-text-field": string;
|
|
3
3
|
readonly "sapphire-text-field--md": string;
|
|
4
|
+
readonly "sapphire-text-field--sm": string;
|
|
4
5
|
readonly "sapphire-text-field__input": string;
|
|
5
6
|
readonly "sapphire-text-field__input--align-right": string;
|
|
6
7
|
readonly "sapphire-text-field--multiline": string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danske/sapphire-css",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "52.2.0",
|
|
4
4
|
"description": "CSS implementation of the Sapphire Design System from Danske Bank A/S",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"test:stylelint": "stylelint components/**/*.module.css",
|
|
33
33
|
"test:findUnusedTokens": "stylelint components/**/*.module.css",
|
|
34
34
|
"watch:types": "yarn run types -- -w",
|
|
35
|
-
"storybook": "
|
|
36
|
-
"build:storybook": "
|
|
35
|
+
"storybook": "storybook dev -p 6007",
|
|
36
|
+
"build:storybook": "storybook build --docs -o dist",
|
|
37
37
|
"build:types": "tcm -p /**/*.module.css",
|
|
38
38
|
"build:themes": "yarn build:themes:esm && yarn build:themes:cjs",
|
|
39
39
|
"build:themes:esm": "tsc -p tsconfig.themes.json --module ES2020 --outDir build/themes/esm && tsc -p tsconfig.themes.json --module ES2020 --outDir themes",
|
|
@@ -42,33 +42,30 @@
|
|
|
42
42
|
"postpublish": "node ../../../scripts/append-release-notes.js"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@babel/core": "^7.20.12",
|
|
46
|
-
"@babel/preset-env": "^7.20.2",
|
|
47
|
-
"@babel/preset-react": "^7.18.6",
|
|
48
|
-
"@babel/preset-typescript": "^7.18.6",
|
|
49
45
|
"@danske/sapphire-icons": "^3.1.0",
|
|
50
|
-
"@danske/sapphire-react": "^5.17.
|
|
51
|
-
"@
|
|
52
|
-
"@storybook/addon-
|
|
53
|
-
"@storybook/addon-
|
|
54
|
-
"@storybook/
|
|
55
|
-
"@storybook/html": "
|
|
56
|
-
"@storybook/
|
|
57
|
-
"
|
|
46
|
+
"@danske/sapphire-react": "^5.17.3",
|
|
47
|
+
"@storybook/addon-docs": "8.6.14",
|
|
48
|
+
"@storybook/addon-links": "8.6.14",
|
|
49
|
+
"@storybook/addon-toolbars": "8.6.14",
|
|
50
|
+
"@storybook/blocks": "8.6.14",
|
|
51
|
+
"@storybook/html": "8.6.14",
|
|
52
|
+
"@storybook/html-vite": "8.6.14",
|
|
53
|
+
"@storybook/manager-api": "8.6.14",
|
|
54
|
+
"@storybook/theming": "8.6.14",
|
|
58
55
|
"cross-env": "^7.0.3",
|
|
59
|
-
"
|
|
56
|
+
"html-webpack-plugin": "^4.5.2",
|
|
60
57
|
"identity-obj-proxy": "^3.0.0",
|
|
61
58
|
"react": "^18.3.1",
|
|
62
|
-
"
|
|
63
|
-
"storybook
|
|
64
|
-
"style-loader": "^2.0.0",
|
|
59
|
+
"react-dom": "^18.3.1",
|
|
60
|
+
"storybook": "8.6.14",
|
|
65
61
|
"stylelint": "15.2.0",
|
|
66
62
|
"stylelint-value-no-unknown-custom-properties": "4.0.0",
|
|
67
63
|
"typed-css-modules": "0.6.5",
|
|
68
|
-
"typescript": "~4.6.4"
|
|
64
|
+
"typescript": "~4.6.4",
|
|
65
|
+
"vite": "^5.4.19"
|
|
69
66
|
},
|
|
70
67
|
"dependencies": {
|
|
71
|
-
"@danske/sapphire-design-tokens": "^
|
|
68
|
+
"@danske/sapphire-design-tokens": "^43.1.0"
|
|
72
69
|
},
|
|
73
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "c659e1463951455fb38f07b7b429083261776798"
|
|
74
71
|
}
|