@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,211 @@
|
|
|
1
|
+
.sapphire-listbox {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: stretch;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
min-width: var(--sapphire-listbox-size-width-min);
|
|
7
|
+
margin: 0;
|
|
8
|
+
padding: 0;
|
|
9
|
+
position: relative;
|
|
10
|
+
list-style: none;
|
|
11
|
+
outline: none;
|
|
12
|
+
/**
|
|
13
|
+
* tldr; Please inspect the listbox without these adding props, it's easier
|
|
14
|
+
* to understand why these are here.
|
|
15
|
+
*
|
|
16
|
+
* Long version:
|
|
17
|
+
*
|
|
18
|
+
* Each item has a left/right padding which greater than the top/bottom one.
|
|
19
|
+
*
|
|
20
|
+
* This means that there will be a visual asymmetry for the padding around
|
|
21
|
+
* the first/last item in the listbox. We want to adjust that by adding a
|
|
22
|
+
* top/bottom padding to the whole listbox of a value that would guarantee
|
|
23
|
+
* the corners of the listbox are padded equally all around.
|
|
24
|
+
*
|
|
25
|
+
* To achieve that, we want to add a padding equal to the missing difference
|
|
26
|
+
* between the horizontal and vertical item paddings.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
padding-top: calc(
|
|
30
|
+
var(--sapphire-listbox-size-spacing-outer-horizontal) -
|
|
31
|
+
var(--sapphire-listbox-size-spacing-outer-vertical)
|
|
32
|
+
);
|
|
33
|
+
padding-bottom: calc(
|
|
34
|
+
var(--sapphire-listbox-size-spacing-outer-horizontal) -
|
|
35
|
+
var(--sapphire-listbox-size-spacing-outer-vertical)
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
39
|
+
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
40
|
+
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
41
|
+
* can happen in other contexts as well.
|
|
42
|
+
*
|
|
43
|
+
* These do not do anything except in webkit browsers & firefox on OSX.
|
|
44
|
+
*
|
|
45
|
+
* For more details see:
|
|
46
|
+
* - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
|
|
47
|
+
* - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
|
|
48
|
+
*/
|
|
49
|
+
-webkit-font-smoothing: antialiased;
|
|
50
|
+
-moz-osx-font-smoothing: grayscale;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Item in the list */
|
|
54
|
+
|
|
55
|
+
.sapphire-listbox__item {
|
|
56
|
+
display: flex;
|
|
57
|
+
justify-content: space-between;
|
|
58
|
+
align-items: center;
|
|
59
|
+
padding: var(--sapphire-listbox-size-spacing-outer-vertical)
|
|
60
|
+
var(--sapphire-listbox-size-spacing-outer-horizontal);
|
|
61
|
+
color: var(--sapphire-listbox-color-content-normal-primary-default);
|
|
62
|
+
outline: none;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.sapphire-listbox__item--danger {
|
|
67
|
+
color: var(--sapphire-listbox-color-content-danger-default);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.sapphire-listbox__item--selected {
|
|
71
|
+
color: var(--sapphire-listbox-color-content-selected-default);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.sapphire-listbox__item--selected .sapphire-listbox__content {
|
|
75
|
+
background-color: var(--sapphire-listbox-color-background-selected-default);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Content inside the item */
|
|
79
|
+
|
|
80
|
+
.sapphire-listbox__content {
|
|
81
|
+
width: 100%;
|
|
82
|
+
display: grid;
|
|
83
|
+
grid-auto-flow: column;
|
|
84
|
+
align-items: center;
|
|
85
|
+
gap: var(--sapphire-listbox-size-spacing-inner-horizontal);
|
|
86
|
+
/*
|
|
87
|
+
* We want the left-side icon column to not take space if it's empty. The
|
|
88
|
+
* right-side "checkmark" icon column should always take space even if the
|
|
89
|
+
* checkmark isn't there. This is to make sure the listbox doesn't jump when
|
|
90
|
+
* selecting items that add the checkmark in the last column.
|
|
91
|
+
*/
|
|
92
|
+
grid-template-columns: auto 1fr var(--sapphire-listbox-size-width-icon);
|
|
93
|
+
padding: var(--sapphire-listbox-size-spacing-inner-vertical)
|
|
94
|
+
var(--sapphire-listbox-size-spacing-inner-horizontal);
|
|
95
|
+
border-radius: var(--sapphire-listbox-size-radius-item);
|
|
96
|
+
transition-property: opacity, background-color, color;
|
|
97
|
+
transition-duration: var(--sapphire-listbox-time-transition);
|
|
98
|
+
transition-timing-function: ease-in-out;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Icon content */
|
|
102
|
+
|
|
103
|
+
.sapphire-listbox__icon {
|
|
104
|
+
line-height: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Text content */
|
|
108
|
+
.sapphire-listbox__text-container {
|
|
109
|
+
font-family: var(--sapphire-listbox-font-name);
|
|
110
|
+
line-height: var(--sapphire-listbox-size-line-height);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/*
|
|
114
|
+
* When there is no icon before the content we want the content
|
|
115
|
+
* to stretch 2 columns out of the 3.
|
|
116
|
+
*/
|
|
117
|
+
.sapphire-listbox__text-container:first-child {
|
|
118
|
+
grid-column: span 2;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.sapphire-listbox__primary-text {
|
|
122
|
+
font-weight: var(--sapphire-listbox-font-weight-primary);
|
|
123
|
+
font-size: var(--sapphire-listbox-size-font-primary);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.sapphire-listbox__secondary-text {
|
|
127
|
+
font-weight: var(--sapphire-listbox-font-weight-secondary);
|
|
128
|
+
font-size: var(--sapphire-listbox-size-font-secondary);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.sapphire-listbox__item:not(.sapphire-listbox__item--danger):not(.sapphire-listbox__item--selected)
|
|
132
|
+
.sapphire-listbox__secondary-text {
|
|
133
|
+
color: var(--sapphire-listbox-color-content-normal-secondary-default);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.sapphire-listbox__item.is-disabled {
|
|
137
|
+
opacity: var(--sapphire-listbox-opacity-disabled);
|
|
138
|
+
cursor: not-allowed;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.sapphire-listbox__section {
|
|
142
|
+
padding: 0;
|
|
143
|
+
list-style: none;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.sapphire-listbox__separator {
|
|
147
|
+
height: var(--sapphire-listbox-size-height-separator);
|
|
148
|
+
width: 100%;
|
|
149
|
+
background: var(--sapphire-listbox-color-separator);
|
|
150
|
+
margin-top: calc(
|
|
151
|
+
var(--sapphire-listbox-size-spacing-outer-horizontal) -
|
|
152
|
+
var(--sapphire-listbox-size-spacing-outer-vertical)
|
|
153
|
+
);
|
|
154
|
+
margin-bottom: calc(
|
|
155
|
+
var(--sapphire-listbox-size-spacing-outer-horizontal) -
|
|
156
|
+
var(--sapphire-listbox-size-spacing-outer-vertical)
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Focus */
|
|
161
|
+
|
|
162
|
+
.sapphire-listbox__item:not(.is-disabled).is-focus .sapphire-listbox__content,
|
|
163
|
+
.sapphire-listbox__item:not(.is-disabled):not(.js-focus):focus-visible
|
|
164
|
+
.sapphire-listbox__content {
|
|
165
|
+
box-shadow: 0px 0px 0px var(--sapphire-listbox-size-focus-ring)
|
|
166
|
+
var(--sapphire-listbox-color-focus-ring);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* Hover */
|
|
170
|
+
|
|
171
|
+
.sapphire-listbox__item:not(.is-disabled).is-hover .sapphire-listbox__content,
|
|
172
|
+
.sapphire-listbox__item:not(.is-disabled):not(.js-hover):hover
|
|
173
|
+
.sapphire-listbox__content {
|
|
174
|
+
color: var(--sapphire-listbox-color-content-normal-primary-hover);
|
|
175
|
+
background-color: var(--sapphire-listbox-color-background-normal-hover);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.sapphire-listbox__item--danger:not(.is-disabled).is-hover
|
|
179
|
+
.sapphire-listbox__content,
|
|
180
|
+
.sapphire-listbox__item--danger:not(.is-disabled):not(.js-hover):hover
|
|
181
|
+
.sapphire-listbox__content {
|
|
182
|
+
color: var(--sapphire-listbox-color-content-danger-hover);
|
|
183
|
+
background-color: var(--sapphire-listbox-color-background-danger-hover);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.sapphire-listbox__item--selected:not(.is-disabled).is-hover
|
|
187
|
+
.sapphire-listbox__content,
|
|
188
|
+
.sapphire-listbox__item--selected:not(.is-disabled):not(.js-hover):hover
|
|
189
|
+
.sapphire-listbox__content {
|
|
190
|
+
color: var(--sapphire-listbox-color-content-selected-hover);
|
|
191
|
+
background-color: var(--sapphire-listbox-color-background-selected-hover);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* Active */
|
|
195
|
+
|
|
196
|
+
.sapphire-listbox__item:not(.is-disabled).is-active .sapphire-listbox__content {
|
|
197
|
+
color: var(--sapphire-listbox-color-content-normal-primary-active);
|
|
198
|
+
background-color: var(--sapphire-listbox-color-background-normal-active);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.sapphire-listbox__item--danger:not(.is-disabled).is-active
|
|
202
|
+
.sapphire-listbox__content {
|
|
203
|
+
color: var(--sapphire-listbox-color-content-danger-active);
|
|
204
|
+
background-color: var(--sapphire-listbox-color-background-danger-active);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.sapphire-listbox__item--selected:not(.is-disabled).is-active
|
|
208
|
+
.sapphire-listbox__content {
|
|
209
|
+
color: var(--sapphire-listbox-color-content-selected-active);
|
|
210
|
+
background-color: var(--sapphire-listbox-color-background-selected-active);
|
|
211
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "sapphire-listbox": string;
|
|
3
|
+
readonly "sapphire-listbox__item": string;
|
|
4
|
+
readonly "sapphire-listbox__item--danger": string;
|
|
5
|
+
readonly "sapphire-listbox__item--selected": string;
|
|
6
|
+
readonly "sapphire-listbox__content": string;
|
|
7
|
+
readonly "sapphire-listbox__icon": string;
|
|
8
|
+
readonly "sapphire-listbox__text-container": string;
|
|
9
|
+
readonly "sapphire-listbox__primary-text": string;
|
|
10
|
+
readonly "sapphire-listbox__secondary-text": string;
|
|
11
|
+
readonly "is-disabled": string;
|
|
12
|
+
readonly "sapphire-listbox__section": string;
|
|
13
|
+
readonly "sapphire-listbox__separator": string;
|
|
14
|
+
readonly "is-focus": string;
|
|
15
|
+
readonly "js-focus": string;
|
|
16
|
+
readonly "is-hover": string;
|
|
17
|
+
readonly "js-hover": string;
|
|
18
|
+
readonly "is-active": string;
|
|
19
|
+
};
|
|
20
|
+
export = styles;
|
|
21
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "sapphire-notification-badge": string;
|
|
3
|
+
readonly "sapphire-notification-badge--pop-in": string;
|
|
4
|
+
readonly "pop-in": string;
|
|
5
|
+
readonly "sapphire-notification-badge--pop-out": string;
|
|
6
|
+
readonly "pop-out": string;
|
|
7
|
+
readonly "sapphire-notification-badge--large": string;
|
|
8
|
+
readonly "sapphire-notification-badge--medium": string;
|
|
9
|
+
readonly "sapphire-notification-badge--small": string;
|
|
10
|
+
readonly "sapphire-notification-badge--primary": string;
|
|
11
|
+
readonly "sapphire-notification-badge--secondary": string;
|
|
12
|
+
readonly "sapphire-notification-badge-container": string;
|
|
13
|
+
readonly "sapphire-notification-badge-container--rectangle": string;
|
|
14
|
+
};
|
|
15
|
+
export = styles;
|
|
16
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.sapphire-pagination {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: flex-end;
|
|
4
|
+
align-items: center;
|
|
5
|
+
padding: var(--sapphire-pagination-size-spacing-container-vertical)
|
|
6
|
+
var(--sapphire-pagination-size-spacing-container-horizontal);
|
|
7
|
+
background-color: var(--sapphire-pagination-color-background);
|
|
8
|
+
font-family: var(--sapphire-pagination-font-name);
|
|
9
|
+
font-size: var(--sapphire-pagination-size-font);
|
|
10
|
+
height: var(--sapphire-pagination-size-height);
|
|
11
|
+
|
|
12
|
+
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
13
|
+
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
14
|
+
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
15
|
+
* can happen in other contexts as well.
|
|
16
|
+
*
|
|
17
|
+
* These do not do anything except in webkit browsers & firefox on OSX.
|
|
18
|
+
*
|
|
19
|
+
* For more details see:
|
|
20
|
+
* - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
|
|
21
|
+
* - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
|
|
22
|
+
*/
|
|
23
|
+
-webkit-font-smoothing: antialiased;
|
|
24
|
+
-moz-osx-font-smoothing: grayscale;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.sapphire-pagination-controls {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: flex-end;
|
|
31
|
+
flex-grow: 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.sapphire-pagination-text {
|
|
35
|
+
font-weight: var(--sapphire-pagination-font-weight-numeric-text);
|
|
36
|
+
color: var(--sapphire-pagination-color-text);
|
|
37
|
+
padding-right: var(--sapphire-pagination-size-spacing-controls-horizontal);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.sapphire-pagination-text-alphabetic {
|
|
41
|
+
font-weight: var(--sapphire-pagination-font-weight-alphabetic-text);
|
|
42
|
+
padding-left: var(--sapphire-pagination-size-spacing-text-horizontal);
|
|
43
|
+
padding-right: var(--sapphire-pagination-size-spacing-text-horizontal);
|
|
44
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
.sapphire-panel {
|
|
2
|
+
background-color: var(--sapphire-panel-color-background);
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
height: 100%;
|
|
9
|
+
outline: 0;
|
|
10
|
+
transition: transform var(--sapphire-panel-time-transition) ease-in-out;
|
|
11
|
+
transform: translateX(100%);
|
|
12
|
+
width: var(--sapphire-panel-size-width-large);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.sapphire-panel--visible {
|
|
16
|
+
transform: translateX(0%);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.sapphire-panel--small {
|
|
20
|
+
width: var(--sapphire-panel-size-width-small);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.sapphire-panel-header {
|
|
24
|
+
/** invisible line wrap attached only for visual consistency, once we get attached border-bottom with scrolled content **/
|
|
25
|
+
border-bottom: var(--sapphire-panel-size-border) solid
|
|
26
|
+
var(--sapphire-panel-color-separator-transparent);
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.sapphire-panel-body {
|
|
31
|
+
overflow-y: auto;
|
|
32
|
+
flex-grow: 1;
|
|
33
|
+
padding: 0 var(--sapphire-panel-size-spacing-side);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.sapphire-panel-body.sapphire-panel-body--no-padding {
|
|
37
|
+
padding: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.sapphire-panel-footer {
|
|
41
|
+
/** invisible line wrap attached only for visual consistency, once we get attached border-bottom with scrolled content **/
|
|
42
|
+
border-top: var(--sapphire-panel-size-border) solid
|
|
43
|
+
var(--sapphire-panel-color-separator-transparent);
|
|
44
|
+
flex-shrink: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Container for heading and subheading **/
|
|
48
|
+
.sapphire-panel-panel-heading-container {
|
|
49
|
+
flex: 1;
|
|
50
|
+
padding: var(--sapphire-panel-size-spacing-heading-vertical) 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.sapphire-panel-panel-header {
|
|
54
|
+
flex-shrink: 0;
|
|
55
|
+
display: flex;
|
|
56
|
+
justify-content: space-between;
|
|
57
|
+
padding: var(--sapphire-panel-size-spacing-header-vertical)
|
|
58
|
+
var(--sapphire-panel-size-spacing-side);
|
|
59
|
+
gap: var(--sapphire-panel-size-spacing-header-gap);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.sapphire-panel-panel-header-subheading {
|
|
63
|
+
color: var(--sapphire-panel-color-subheading);
|
|
64
|
+
margin-top: var(--sapphire-panel-size-spacing-heading-gap);
|
|
65
|
+
font-family: var(--sapphire-panel-font-name);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.sapphire-panel-panel-footer {
|
|
69
|
+
padding: var(--sapphire-panel-size-spacing-footer-top)
|
|
70
|
+
var(--sapphire-panel-size-spacing-side)
|
|
71
|
+
var(--sapphire-panel-size-spacing-footer-bottom)
|
|
72
|
+
var(--sapphire-panel-size-spacing-side);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.sapphire-panel-panel-header-close-button-container {
|
|
76
|
+
margin-left: var(--sapphire-panel-size-spacing-close-icon-left);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.sapphire-panel--scrollable .sapphire-panel-footer {
|
|
80
|
+
border-top: var(--sapphire-panel-size-border) solid
|
|
81
|
+
var(--sapphire-panel-color-separator-default);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.sapphire-panel--scrolled .sapphire-panel-header {
|
|
85
|
+
border-bottom: var(--sapphire-panel-size-border) solid
|
|
86
|
+
var(--sapphire-panel-color-separator-default);
|
|
87
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "sapphire-panel": string;
|
|
3
|
+
readonly "sapphire-panel--visible": string;
|
|
4
|
+
readonly "sapphire-panel--small": string;
|
|
5
|
+
readonly "sapphire-panel-header": string;
|
|
6
|
+
readonly "sapphire-panel-body": string;
|
|
7
|
+
readonly "sapphire-panel-body--no-padding": string;
|
|
8
|
+
readonly "sapphire-panel-footer": string;
|
|
9
|
+
readonly "sapphire-panel-panel-heading-container": string;
|
|
10
|
+
readonly "sapphire-panel-panel-header": string;
|
|
11
|
+
readonly "sapphire-panel-panel-header-subheading": string;
|
|
12
|
+
readonly "sapphire-panel-panel-footer": string;
|
|
13
|
+
readonly "sapphire-panel-panel-header-close-button-container": string;
|
|
14
|
+
readonly "sapphire-panel--scrollable": string;
|
|
15
|
+
readonly "sapphire-panel--scrolled": string;
|
|
16
|
+
};
|
|
17
|
+
export = styles;
|
|
18
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.sapphire-paragraph {
|
|
2
|
+
font-family: var(--sapphire-paragraph-font-name);
|
|
3
|
+
color: var(--sapphire-paragraph-color-text);
|
|
4
|
+
line-height: var(--sapphire-paragraph-size-line-height);
|
|
5
|
+
/* not able to find specification in sketch docs for margin,
|
|
6
|
+
will update this once specifications are established */
|
|
7
|
+
margin-top: 0px;
|
|
8
|
+
margin-bottom: 0px;
|
|
9
|
+
|
|
10
|
+
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
11
|
+
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
12
|
+
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
13
|
+
* can happen in other contexts as well.
|
|
14
|
+
*
|
|
15
|
+
* These do not do anything except in webkit browsers & firefox on OSX.
|
|
16
|
+
*
|
|
17
|
+
* For more details see:
|
|
18
|
+
* - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
|
|
19
|
+
* - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
|
|
20
|
+
*/
|
|
21
|
+
-webkit-font-smoothing: antialiased;
|
|
22
|
+
-moz-osx-font-smoothing: grayscale;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.sapphire-paragraph--default {
|
|
26
|
+
font-size: var(--sapphire-paragraph-size-font-default);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.sapphire-paragraph--small {
|
|
30
|
+
font-size: var(--sapphire-paragraph-size-font-small);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.sapphire-paragraph--extraSmall {
|
|
34
|
+
font-size: var(--sapphire-paragraph-size-font-extra-small);
|
|
35
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@keyframes fade-in {
|
|
2
|
+
from {
|
|
3
|
+
opacity: 0;
|
|
4
|
+
}
|
|
5
|
+
to {
|
|
6
|
+
opacity: 1;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.sapphire-popover {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
background-color: var(--sapphire-popover-color-background);
|
|
13
|
+
box-shadow: var(--sapphire-popover-shadow);
|
|
14
|
+
animation: fade-in var(--sapphire-popover-time-transition) ease-in-out;
|
|
15
|
+
border-radius: var(--sapphire-popover-size-radius);
|
|
16
|
+
overflow: auto;
|
|
17
|
+
|
|
18
|
+
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
19
|
+
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
20
|
+
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
21
|
+
* can happen in other contexts as well.
|
|
22
|
+
*
|
|
23
|
+
* These do not do anything except in webkit browsers & firefox on OSX.
|
|
24
|
+
*
|
|
25
|
+
* For more details see:
|
|
26
|
+
* - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
|
|
27
|
+
* - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
|
|
28
|
+
*/
|
|
29
|
+
-webkit-font-smoothing: antialiased;
|
|
30
|
+
-moz-osx-font-smoothing: grayscale;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.sapphire-popover--padded {
|
|
34
|
+
padding: var(--sapphire-popover-size-spacing-padded);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.sapphire-popover--max-width {
|
|
38
|
+
max-width: var(--sapphire-popover-size-max-width);
|
|
39
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
.sapphire-radio {
|
|
2
|
+
align-items: center;
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
font-family: var(--sapphire-radio-font-label-name);
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
position: relative;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.sapphire-radio__input {
|
|
10
|
+
margin: 0;
|
|
11
|
+
overflow: visible;
|
|
12
|
+
position: absolute;
|
|
13
|
+
top: 0;
|
|
14
|
+
left: 0;
|
|
15
|
+
height: 100%;
|
|
16
|
+
width: 100%;
|
|
17
|
+
opacity: 0.0001; /** Some of the screen readers may ignore element with opacity:0 */
|
|
18
|
+
z-index: 1;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.sapphire-radio__label {
|
|
23
|
+
margin-left: var(--sapphire-radio-size-spacing-label);
|
|
24
|
+
font-size: var(--sapphire-radio-size-font);
|
|
25
|
+
line-height: var(--sapphire-radio-size-height-label);
|
|
26
|
+
color: var(--sapphire-radio-color-label);
|
|
27
|
+
|
|
28
|
+
/* The below is meant to address a font rendering quirk in OSX where the text
|
|
29
|
+
* looks bolder than intended due to subpixel rendering. This quirk generally
|
|
30
|
+
* occurs for bold fonts on dark backgrounds but depending on the font, it
|
|
31
|
+
* can happen in other contexts as well.
|
|
32
|
+
*
|
|
33
|
+
* These do not do anything except in webkit browsers & firefox on OSX.
|
|
34
|
+
*
|
|
35
|
+
* For more details see:
|
|
36
|
+
* - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
|
|
37
|
+
* - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
|
|
38
|
+
*/
|
|
39
|
+
-webkit-font-smoothing: antialiased;
|
|
40
|
+
-moz-osx-font-smoothing: grayscale;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* The radio box */
|
|
44
|
+
|
|
45
|
+
.sapphire-radio__box {
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
background-color: var(
|
|
48
|
+
--sapphire-radio-color-background-box-unchecked-default
|
|
49
|
+
);
|
|
50
|
+
width: var(--sapphire-radio-size-width-box);
|
|
51
|
+
height: var(--sapphire-radio-size-height-box);
|
|
52
|
+
flex-shrink: 0;
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
border: var(--sapphire-radio-size-width-border-unchecked) solid
|
|
55
|
+
var(--sapphire-radio-color-border-box-unchecked-default);
|
|
56
|
+
position: relative;
|
|
57
|
+
|
|
58
|
+
transition-property: background-color, border-color, border-width;
|
|
59
|
+
transition-duration: var(--sapphire-radio-time-transition);
|
|
60
|
+
transition-timing-function: ease-in-out;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.sapphire-radio--checked .sapphire-radio__box {
|
|
64
|
+
border-color: var(--sapphire-radio-color-background-box-checked-default);
|
|
65
|
+
border-width: calc(
|
|
66
|
+
(var(--sapphire-radio-size-height-box) - var(--sapphire-radio-size-circle)) /
|
|
67
|
+
2
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.sapphire-radio--checked .sapphire-radio__box::after {
|
|
72
|
+
display: block;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* HOVER */
|
|
76
|
+
|
|
77
|
+
/* Hover when not checked */
|
|
78
|
+
|
|
79
|
+
.sapphire-radio:not(:active):not(.is-active):not(.sapphire-radio--checked).is-hover
|
|
80
|
+
.sapphire-radio__box,
|
|
81
|
+
.sapphire-radio:not(:active):not(.is-active):not(.sapphire-radio--checked):not(.js-hover):hover
|
|
82
|
+
.sapphire-radio__input:not(:disabled)
|
|
83
|
+
~ .sapphire-radio__box {
|
|
84
|
+
border-color: var(--sapphire-radio-color-border-box-unchecked-hover);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Hover when checked */
|
|
88
|
+
|
|
89
|
+
.sapphire-radio--checked:not(:active):not(.is-active).is-hover
|
|
90
|
+
.sapphire-radio__box,
|
|
91
|
+
.sapphire-radio--checked:not(:active):not(.is-active):not(.js-hover):hover
|
|
92
|
+
.sapphire-radio__input:not(:disabled)
|
|
93
|
+
~ .sapphire-radio__box {
|
|
94
|
+
border-color: var(--sapphire-radio-color-background-box-checked-hover);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* FOCUS */
|
|
98
|
+
|
|
99
|
+
.sapphire-radio.is-focus .sapphire-radio__input ~ .sapphire-radio__box,
|
|
100
|
+
.sapphire-radio:not(.js-focus)
|
|
101
|
+
.sapphire-radio__input:focus-visible
|
|
102
|
+
~ .sapphire-radio__box {
|
|
103
|
+
outline: var(--sapphire-radio-size-focus-ring-border) solid
|
|
104
|
+
var(--sapphire-radio-color-focus-ring);
|
|
105
|
+
outline-offset: var(--sapphire-radio-size-focus-ring-offset);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* DISABLED */
|
|
109
|
+
|
|
110
|
+
.sapphire-radio__input:disabled {
|
|
111
|
+
cursor: not-allowed;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.sapphire-radio__input:disabled ~ .sapphire-radio__box,
|
|
115
|
+
.sapphire-radio__input:disabled ~ .sapphire-radio__label {
|
|
116
|
+
opacity: var(--sapphire-radio-opacity-disabled);
|
|
117
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "sapphire-radio": string;
|
|
3
|
+
readonly "sapphire-radio__input": string;
|
|
4
|
+
readonly "sapphire-radio__label": string;
|
|
5
|
+
readonly "sapphire-radio__box": string;
|
|
6
|
+
readonly "sapphire-radio--checked": string;
|
|
7
|
+
readonly "is-active": string;
|
|
8
|
+
readonly "is-hover": string;
|
|
9
|
+
readonly "js-hover": string;
|
|
10
|
+
readonly "is-focus": string;
|
|
11
|
+
readonly "js-focus": string;
|
|
12
|
+
};
|
|
13
|
+
export = styles;
|
|
14
|
+
|