@danske/sapphire-css 28.4.0 → 30.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.
|
@@ -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.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,
|
|
@@ -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": "2ff8412b24532d59317fba3af90c5e305bc6ee6b"
|
|
72
72
|
}
|