@danske/sapphire-css 28.4.0 → 30.0.2
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/components/dateField/dateField.module.css +13 -2
- package/components/dateField/dateField.module.css.d.ts +1 -1
- package/components/list/list.module.css +5 -0
- package/components/listbox/listbox.module.css +18 -12
- package/components/tag/tag.module.css +27 -32
- package/components/tag/tag.module.css.d.ts +5 -7
- package/package.json +3 -3
|
@@ -106,10 +106,16 @@
|
|
|
106
106
|
text-align: right;
|
|
107
107
|
text-transform: uppercase;
|
|
108
108
|
padding: 0 var(--sapphire-date-field-size-spacing-segment-horizontal);
|
|
109
|
+
caret-color: transparent;
|
|
109
110
|
}
|
|
110
111
|
|
|
111
|
-
.sapphire-date-field__segment:
|
|
112
|
-
.sapphire-date-field__segment.is-
|
|
112
|
+
.sapphire-date-field__segment:disabled,
|
|
113
|
+
.sapphire-date-field__segment.is-disabled {
|
|
114
|
+
cursor: not-allowed;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.sapphire-date-field__segment:not(:disabled):not(.is-disabled):focus,
|
|
118
|
+
.sapphire-date-field__segment:not(:disabled):not(.is-disabled).is-focus {
|
|
113
119
|
color: var(--sapphire-date-field-color-content-segment-selected);
|
|
114
120
|
background-color: var(--sapphire-date-field-color-background-segment);
|
|
115
121
|
outline: none;
|
|
@@ -190,6 +196,11 @@
|
|
|
190
196
|
width: var(--sapphire-date-field-size-width-button-m);
|
|
191
197
|
}
|
|
192
198
|
|
|
199
|
+
.sapphire-date-field__button:disabled,
|
|
200
|
+
.sapphire-date-field__button.is-disabled {
|
|
201
|
+
cursor: not-allowed;
|
|
202
|
+
}
|
|
203
|
+
|
|
193
204
|
/**
|
|
194
205
|
* Icon (button)
|
|
195
206
|
*/
|
|
@@ -4,12 +4,12 @@ declare const styles: {
|
|
|
4
4
|
readonly "sapphire-date-field--range": string;
|
|
5
5
|
readonly "sapphire-date-field__input": string;
|
|
6
6
|
readonly "sapphire-date-field__segment": string;
|
|
7
|
+
readonly "is-disabled": string;
|
|
7
8
|
readonly "is-focus": string;
|
|
8
9
|
readonly "sapphire-date-field__segment--filled": string;
|
|
9
10
|
readonly "sapphire-date-field--error": string;
|
|
10
11
|
readonly "sapphire-date-field__button": string;
|
|
11
12
|
readonly "sapphire-date-field__icon": string;
|
|
12
|
-
readonly "is-disabled": string;
|
|
13
13
|
readonly "is-active": string;
|
|
14
14
|
readonly "js-hover": string;
|
|
15
15
|
readonly "is-hover": string;
|
|
@@ -153,6 +153,8 @@
|
|
|
153
153
|
display: flex;
|
|
154
154
|
align-items: center;
|
|
155
155
|
margin-right: var(--sapphire-list-spacing-item-horizontal-content);
|
|
156
|
+
/* This was added to accommodate nowrap + hidden text overflow situations */
|
|
157
|
+
min-width: 0;
|
|
156
158
|
}
|
|
157
159
|
|
|
158
160
|
.sapphire-list__item-content-right {
|
|
@@ -167,6 +169,9 @@
|
|
|
167
169
|
display: flex;
|
|
168
170
|
flex-direction: column;
|
|
169
171
|
font-family: var(--sapphire-list-font-name);
|
|
172
|
+
/* This was added to accommodate nowrap + hidden text overflow situation */
|
|
173
|
+
min-width: 0;
|
|
174
|
+
overflow-wrap: break-word;
|
|
170
175
|
}
|
|
171
176
|
|
|
172
177
|
.sapphire-list__item-text--reversedOrder {
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
.sapphire-listbox {
|
|
2
2
|
box-sizing: border-box;
|
|
3
|
-
display: flex;
|
|
4
|
-
justify-content: stretch;
|
|
5
|
-
flex-direction: column;
|
|
6
3
|
min-width: var(--sapphire-listbox-size-width-min);
|
|
7
4
|
margin: 0;
|
|
8
|
-
padding: 0;
|
|
9
5
|
position: relative;
|
|
10
6
|
list-style: none;
|
|
11
7
|
outline: none;
|
|
@@ -26,14 +22,11 @@
|
|
|
26
22
|
* between the horizontal and vertical item paddings.
|
|
27
23
|
*/
|
|
28
24
|
|
|
29
|
-
padding
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var(--sapphire-listbox-size-spacing-outer-horizontal) -
|
|
35
|
-
var(--sapphire-listbox-size-spacing-outer-vertical)
|
|
36
|
-
);
|
|
25
|
+
padding: calc(
|
|
26
|
+
var(--sapphire-listbox-size-spacing-outer-horizontal) -
|
|
27
|
+
var(--sapphire-listbox-size-spacing-outer-vertical)
|
|
28
|
+
)
|
|
29
|
+
0;
|
|
37
30
|
|
|
38
31
|
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
39
32
|
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
@@ -61,6 +54,14 @@
|
|
|
61
54
|
color: var(--sapphire-listbox-color-content-normal-primary-default);
|
|
62
55
|
outline: none;
|
|
63
56
|
cursor: pointer;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Making sure listbox will grow to the maximum width needed by the content, which should
|
|
60
|
+
* practically disable text wrapping. Ideally we would want the text to wrap, if listbox width
|
|
61
|
+
* is limited by a container, but with the implementation of virtualization, we couldn't find
|
|
62
|
+
* a solution to both allow wrapping and not wrapping too eagerly.
|
|
63
|
+
*/
|
|
64
|
+
min-width: max-content;
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
.sapphire-listbox__item--danger {
|
|
@@ -79,6 +80,11 @@
|
|
|
79
80
|
|
|
80
81
|
.sapphire-listbox__content {
|
|
81
82
|
width: 100%;
|
|
83
|
+
/**
|
|
84
|
+
* max-width set to mitigate the issue of not being able to set a max-width on the popover the
|
|
85
|
+
* listbox is rendered in, in use cases like Select.
|
|
86
|
+
*/
|
|
87
|
+
max-width: calc(100vw - 2 * var(--sapphire-listbox-size-width-icon-l));
|
|
82
88
|
display: grid;
|
|
83
89
|
grid-auto-flow: column;
|
|
84
90
|
align-items: center;
|
|
@@ -5,19 +5,7 @@
|
|
|
5
5
|
outline: none;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.sapphire-tag-group__note {
|
|
9
|
-
font-size: var(--sapphire-tag-size-font-note);
|
|
10
|
-
color: var(--sapphire-tag-color-note);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.sapphire-tag__gridcell {
|
|
14
|
-
display: inline-flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
gap: var(--sapphire-tag-size-spacing-with-icon);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
8
|
.sapphire-tag {
|
|
20
|
-
/* sizing */
|
|
21
9
|
display: inline-flex;
|
|
22
10
|
flex-direction: row;
|
|
23
11
|
height: var(--sapphire-tag-size-height);
|
|
@@ -30,10 +18,11 @@
|
|
|
30
18
|
cursor: default;
|
|
31
19
|
|
|
32
20
|
/* typography */
|
|
33
|
-
font-size: var(--sapphire-tag-size-font
|
|
21
|
+
font-size: var(--sapphire-tag-size-font);
|
|
34
22
|
font-family: var(--sapphire-tag-font-name);
|
|
35
23
|
font-weight: var(--sapphire-tag-font-weight);
|
|
36
24
|
font-style: normal;
|
|
25
|
+
text-decoration: none;
|
|
37
26
|
|
|
38
27
|
/* color default */
|
|
39
28
|
background-color: var(--sapphire-tag-color-background-primary-default);
|
|
@@ -60,22 +49,32 @@
|
|
|
60
49
|
-moz-osx-font-smoothing: grayscale;
|
|
61
50
|
}
|
|
62
51
|
|
|
63
|
-
/* ## Tag states */
|
|
64
|
-
.sapphire-tag:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,
|
|
65
|
-
.sapphire-tag:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover {
|
|
66
|
-
background-color: var(--sapphire-tag-color-background-primary-hover);
|
|
67
|
-
cursor: pointer;
|
|
68
|
-
}
|
|
69
52
|
.sapphire-tag.is-focus,
|
|
70
53
|
.sapphire-tag:not(.js-focus):focus-visible {
|
|
71
54
|
background-color: var(--sapphire-tag-color-background-primary-focus);
|
|
72
55
|
outline: var(--sapphire-tag-size-focus-ring-border) solid
|
|
73
56
|
var(--sapphire-tag-color-focus-ring);
|
|
57
|
+
outline-offset: var(--sapphire-tag-size-focus-ring-offset);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.sapphire-tag__content {
|
|
61
|
+
display: inline-flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: var(--sapphire-tag-size-spacing-with-icon);
|
|
74
64
|
}
|
|
75
|
-
|
|
65
|
+
|
|
66
|
+
/* Actionable */
|
|
67
|
+
.sapphire-tag--actionable:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,
|
|
68
|
+
.sapphire-tag--actionable:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover {
|
|
69
|
+
background-color: var(--sapphire-tag-color-background-primary-hover);
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.sapphire-tag--actionable.is-active {
|
|
76
74
|
background-color: var(--sapphire-tag-color-background-primary-active);
|
|
77
75
|
cursor: pointer;
|
|
78
76
|
}
|
|
77
|
+
|
|
79
78
|
.sapphire-tag:disabled,
|
|
80
79
|
.sapphire-tag.is-disabled {
|
|
81
80
|
opacity: var(--sapphire-tag-opacity-disabled);
|
|
@@ -87,22 +86,17 @@
|
|
|
87
86
|
.sapphire-tag:has(.sapphire-tag__button) {
|
|
88
87
|
padding-right: var(--sapphire-tag-size-spacing-with-icon);
|
|
89
88
|
}
|
|
90
|
-
|
|
89
|
+
|
|
90
|
+
.sapphire-tag:has(.sapphire-tag__error-icon) {
|
|
91
91
|
padding-left: var(--sapphire-tag-size-spacing-with-icon);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
|
-
* Icon
|
|
95
|
+
* Error Icon
|
|
96
96
|
*/
|
|
97
|
-
.sapphire-
|
|
97
|
+
.sapphire-tag__error-icon {
|
|
98
98
|
display: flex;
|
|
99
|
-
flex-direction: column;
|
|
100
|
-
justify-content: center;
|
|
101
99
|
align-items: center;
|
|
102
|
-
height: var(--sapphire-tag-size-icon);
|
|
103
|
-
width: var(--sapphire-tag-size-icon);
|
|
104
|
-
}
|
|
105
|
-
.sapphire-tag--error .sapphire-tag__icon--error {
|
|
106
100
|
color: var(--sapphire-tag-color-error);
|
|
107
101
|
}
|
|
108
102
|
|
|
@@ -114,11 +108,11 @@
|
|
|
114
108
|
display: inline-flex;
|
|
115
109
|
align-items: center;
|
|
116
110
|
justify-content: center;
|
|
117
|
-
vertical-align: middle;
|
|
118
111
|
white-space: nowrap;
|
|
119
|
-
height: var(--sapphire-tag-size-icon);
|
|
120
|
-
width: var(--sapphire-tag-size-icon);
|
|
121
112
|
border: none;
|
|
113
|
+
margin: 0;
|
|
114
|
+
padding: 0;
|
|
115
|
+
background-color: transparent;
|
|
122
116
|
|
|
123
117
|
/* transition */
|
|
124
118
|
transition-property: color;
|
|
@@ -130,6 +124,7 @@
|
|
|
130
124
|
background-color: transparent;
|
|
131
125
|
color: var(--sapphire-tag-color-button);
|
|
132
126
|
}
|
|
127
|
+
|
|
133
128
|
.sapphire-tag__button:focus {
|
|
134
129
|
outline: none;
|
|
135
130
|
}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
2
|
readonly "sapphire-tag-group": string;
|
|
3
|
-
readonly "sapphire-tag-group__note": string;
|
|
4
|
-
readonly "sapphire-tag__gridcell": string;
|
|
5
3
|
readonly "sapphire-tag": string;
|
|
4
|
+
readonly "is-focus": string;
|
|
5
|
+
readonly "js-focus": string;
|
|
6
|
+
readonly "sapphire-tag__content": string;
|
|
7
|
+
readonly "sapphire-tag--actionable": string;
|
|
6
8
|
readonly "is-disabled": string;
|
|
7
9
|
readonly "is-active": string;
|
|
8
10
|
readonly "js-hover": string;
|
|
9
11
|
readonly "is-hover": string;
|
|
10
|
-
readonly "is-focus": string;
|
|
11
|
-
readonly "js-focus": string;
|
|
12
12
|
readonly "sapphire-tag__button": string;
|
|
13
|
-
readonly "sapphire-
|
|
14
|
-
readonly "sapphire-tag__icon": string;
|
|
15
|
-
readonly "sapphire-tag--error": string;
|
|
13
|
+
readonly "sapphire-tag__error-icon": string;
|
|
16
14
|
};
|
|
17
15
|
export = styles;
|
|
18
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danske/sapphire-css",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "30.0.2",
|
|
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,
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"typescript": "~4.6.4"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@danske/sapphire-design-tokens": "^
|
|
69
|
+
"@danske/sapphire-design-tokens": "^38.0.0"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "a79cc70d1fbf9428858ab9b1d43c38f602e39558"
|
|
72
72
|
}
|