@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.
Files changed (109) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +57 -0
  3. package/build/themes/cjs/default-dark.d.ts +3 -0
  4. package/build/themes/cjs/default-dark.js +8 -0
  5. package/build/themes/cjs/default.d.ts +3 -0
  6. package/build/themes/cjs/default.js +8 -0
  7. package/build/themes/cjs/index.d.ts +1 -0
  8. package/build/themes/cjs/index.js +16 -0
  9. package/build/themes/cjs/june-dark.d.ts +4 -0
  10. package/build/themes/cjs/june-dark.js +9 -0
  11. package/build/themes/cjs/june.d.ts +4 -0
  12. package/build/themes/cjs/june.js +9 -0
  13. package/build/themes/esm/default-dark.d.ts +3 -0
  14. package/build/themes/esm/default-dark.js +3 -0
  15. package/build/themes/esm/default.d.ts +3 -0
  16. package/build/themes/esm/default.js +3 -0
  17. package/build/themes/esm/index.d.ts +1 -0
  18. package/build/themes/esm/index.js +1 -0
  19. package/build/themes/esm/june-dark.d.ts +4 -0
  20. package/build/themes/esm/june-dark.js +4 -0
  21. package/build/themes/esm/june.d.ts +4 -0
  22. package/build/themes/esm/june.js +4 -0
  23. package/components/accordion/accordion.module.css.d.ts +19 -0
  24. package/components/avatar/avatar.module.css.d.ts +27 -0
  25. package/components/backdrop/backdrop.module.css +8 -0
  26. package/components/backdrop/backdrop.module.css.d.ts +5 -0
  27. package/components/badge/badge.module.css +121 -0
  28. package/components/badge/badge.module.css.d.ts +16 -0
  29. package/components/button/button.module.css +278 -0
  30. package/components/button/button.module.css.d.ts +23 -0
  31. package/components/buttonGroup/buttonGroup.module.css +24 -0
  32. package/components/buttonGroup/buttonGroup.module.css.d.ts +10 -0
  33. package/components/calendar/calendar.module.css +406 -0
  34. package/components/calendar/calendar.module.css.d.ts +47 -0
  35. package/components/checkbox/checkbox.module.css +182 -0
  36. package/components/checkbox/checkbox.module.css.d.ts +18 -0
  37. package/components/contextualHelp/contextualHelp.module.css +35 -0
  38. package/components/contextualHelp/contextualHelp.module.css.d.ts +7 -0
  39. package/components/dateField/dateField.module.css +239 -0
  40. package/components/dateField/dateField.module.css.d.ts +22 -0
  41. package/components/dialog/dialog.module.css +81 -0
  42. package/components/dialog/dialog.module.css.d.ts +15 -0
  43. package/components/feedbackMessage/feedbackMessage.module.css +42 -0
  44. package/components/feedbackMessage/feedbackMessage.module.css.d.ts +10 -0
  45. package/components/field/field.module.css.d.ts +17 -0
  46. package/components/fieldGroup/fieldGroup.module.css +64 -0
  47. package/components/fieldGroup/fieldGroup.module.css.d.ts +12 -0
  48. package/components/heading/heading.module.css +143 -0
  49. package/components/heading/heading.module.css.d.ts +12 -0
  50. package/components/icon/icon.module.css +14 -0
  51. package/components/icon/icon.module.css.d.ts +8 -0
  52. package/components/iconButton/iconButton.module.css +225 -0
  53. package/components/iconButton/iconButton.module.css.d.ts +19 -0
  54. package/components/label/label.module.css.d.ts +9 -0
  55. package/components/link/link.module.css +35 -0
  56. package/components/link/link.module.css.d.ts +10 -0
  57. package/components/list/list.module.css +160 -0
  58. package/components/list/list.module.css.d.ts +19 -0
  59. package/components/listbox/listbox.module.css +211 -0
  60. package/components/listbox/listbox.module.css.d.ts +21 -0
  61. package/components/notificationBadge/notificationBadge.module.css.d.ts +16 -0
  62. package/components/pagination/pagination.module.css +44 -0
  63. package/components/pagination/pagination.module.css.d.ts +8 -0
  64. package/components/panel/panel.module.css +87 -0
  65. package/components/panel/panel.module.css.d.ts +18 -0
  66. package/components/paragraph/paragraph.module.css +35 -0
  67. package/components/paragraph/paragraph.module.css.d.ts +8 -0
  68. package/components/popover/popover.module.css +39 -0
  69. package/components/popover/popover.module.css.d.ts +8 -0
  70. package/components/radio/radio.module.css +117 -0
  71. package/components/radio/radio.module.css.d.ts +14 -0
  72. package/components/searchField/searchField.module.css +148 -0
  73. package/components/searchField/searchField.module.css.d.ts +14 -0
  74. package/components/segmentedControl/segmentedControl.module.css +140 -0
  75. package/components/segmentedControl/segmentedControl.module.css.d.ts +16 -0
  76. package/components/select/select.module.css +166 -0
  77. package/components/select/select.module.css.d.ts +19 -0
  78. package/components/skeleton/skeleton.module.css +52 -0
  79. package/components/skeleton/skeleton.module.css.d.ts +9 -0
  80. package/components/spinner/spinner.module.css.d.ts +14 -0
  81. package/components/surface/surface.module.css +19 -0
  82. package/components/surface/surface.module.css.d.ts +5 -0
  83. package/components/switch/switch.module.css +170 -0
  84. package/components/switch/switch.module.css.d.ts +13 -0
  85. package/components/table/table.module.css +303 -0
  86. package/components/table/table.module.css.d.ts +37 -0
  87. package/components/tabs/tabs.module.css +83 -0
  88. package/components/tabs/tabs.module.css.d.ts +17 -0
  89. package/components/text/text.module.css.d.ts +21 -0
  90. package/components/textField/textField.module.css +208 -0
  91. package/components/textField/textField.module.css.d.ts +22 -0
  92. package/components/toast/toast.module.css.d.ts +12 -0
  93. package/components/tooltip/tooltip.module.css +41 -0
  94. package/components/tooltip/tooltip.module.css.d.ts +6 -0
  95. package/package.json +68 -0
  96. package/themes/default-dark.css +2 -0
  97. package/themes/default-dark.d.ts +3 -0
  98. package/themes/default-dark.js +8 -0
  99. package/themes/default.css +2 -0
  100. package/themes/default.d.ts +3 -0
  101. package/themes/default.js +8 -0
  102. package/themes/index.d.ts +1 -0
  103. package/themes/index.js +16 -0
  104. package/themes/june-dark.css +3 -0
  105. package/themes/june-dark.d.ts +4 -0
  106. package/themes/june-dark.js +9 -0
  107. package/themes/june.css +3 -0
  108. package/themes/june.d.ts +4 -0
  109. package/themes/june.js +9 -0
@@ -0,0 +1,406 @@
1
+ .sapphire-calendar {
2
+ font-family: var(--sapphire-calendar-font-name);
3
+ display: inline-flex;
4
+ background-color: var(--sapphire-calendar-color-background-calendar);
5
+ box-sizing: border-box;
6
+ }
7
+ .sapphire-calendar__table-container {
8
+ /*
9
+ min-width needed for months and years view. Otherwise the calendar's width changes as view is
10
+ switched
11
+ */
12
+ min-width: calc(7 * var(--sapphire-calendar-size-width-default));
13
+ /*
14
+ For now we have decided to not support flexible width for the calendar grid.
15
+ If we want that, we only need to add a `flex: 1` here. The width of Months/Years table is
16
+ also fixed now, which we would need to change, or at least add `margin: auto` to it.
17
+ */
18
+ }
19
+
20
+ .sapphire-calendar__header {
21
+ display: flex;
22
+ align-items: center;
23
+ justify-content: space-between;
24
+ padding-bottom: var(--sapphire-calendar-size-spacing-header-bottom);
25
+ }
26
+
27
+ .sapphire-calendar__header--left .sapphire-calendar__header-next-month {
28
+ visibility: hidden;
29
+ }
30
+
31
+ .sapphire-calendar__header--right .sapphire-calendar__header-prev-month {
32
+ visibility: hidden;
33
+ }
34
+
35
+ .sapphire-calendar__header-title {
36
+ margin: 0 auto;
37
+ }
38
+
39
+ .sapphire-calendar__tables-row {
40
+ display: flex;
41
+ gap: var(--sapphire-calendar-size-spacing-calendar-double-container-gap);
42
+ }
43
+
44
+ .sapphire-calendar__table {
45
+ width: 100%;
46
+ border-spacing: 0;
47
+ }
48
+
49
+ .sapphire-calendar__table--month-year {
50
+ width: calc(7 * var(--sapphire-calendar-size-width-default));
51
+ table-layout: fixed;
52
+ }
53
+
54
+ .sapphire-calendar__table
55
+ .sapphire-calendar__table-body-row:not(:last-child)
56
+ .sapphire-calendar__table-body-cell {
57
+ padding-bottom: var(
58
+ --sapphire-calendar-size-spacing-body-cell-bottom-default
59
+ );
60
+ }
61
+
62
+ .sapphire-calendar__table--month-year
63
+ .sapphire-calendar__table-body-row:not(:last-child)
64
+ .sapphire-calendar__table-body-cell {
65
+ padding-bottom: var(
66
+ --sapphire-calendar-size-spacing-body-cell-bottom-month-year
67
+ );
68
+ }
69
+
70
+ .sapphire-calendar__table--with-week-numbers th:first-child {
71
+ padding-right: var(--sapphire-calendar-size-spacing-week-numbers-gap);
72
+ border-right: var(--sapphire-calendar-size-width-border) solid
73
+ var(--sapphire-calendar-color-border);
74
+ }
75
+
76
+ .sapphire-calendar__table--with-week-numbers th:first-child + td {
77
+ padding-left: var(--sapphire-calendar-size-spacing-week-numbers-gap);
78
+ }
79
+
80
+ .sapphire-calendar__table-head-cell {
81
+ height: var(--sapphire-calendar-size-height-head-cell);
82
+ text-align: center;
83
+ padding: 0;
84
+ }
85
+
86
+ .sapphire-calendar__table-body-cell {
87
+ height: var(--sapphire-calendar-size-height-default);
88
+ text-align: center;
89
+ padding: 0;
90
+ }
91
+
92
+ .sapphire-calendar__custom-ranges {
93
+ position: relative;
94
+ display: flex;
95
+ flex-direction: column;
96
+ gap: var(--sapphire-calendar-size-spacing-custom-ranges-gap);
97
+ border-left: var(--sapphire-calendar-size-width-border) solid
98
+ var(--sapphire-calendar-color-border);
99
+ margin-left: var(--sapphire-calendar-size-spacing-custom-ranges-margin-left);
100
+ padding-left: var(
101
+ --sapphire-calendar-size-spacing-custom-ranges-padding-left
102
+ );
103
+ padding-right: var(
104
+ --sapphire-calendar-size-spacing-custom-ranges-padding-right
105
+ );
106
+ }
107
+
108
+ .sapphire-calendar__day-of-week {
109
+ text-decoration: none;
110
+ color: var(--sapphire-calendar-color-content-day-of-week);
111
+ font-weight: var(--sapphire-calendar-font-weight-day-of-week);
112
+ font-size: var(--sapphire-calendar-size-font-default);
113
+ }
114
+
115
+ .sapphire-calendar__week-number {
116
+ display: block;
117
+ text-decoration: none;
118
+ color: var(--sapphire-calendar-color-content-week-number);
119
+ font-weight: var(--sapphire-calendar-font-weight-week-number);
120
+ font-size: var(--sapphire-calendar-size-font-default);
121
+ width: var(--sapphire-calendar-size-width-default);
122
+ }
123
+
124
+ .sapphire-calendar__button {
125
+ all: unset;
126
+ display: flex;
127
+ height: var(--sapphire-calendar-size-height-default);
128
+ align-items: center;
129
+ justify-content: center;
130
+ cursor: pointer;
131
+ position: relative;
132
+ margin: auto;
133
+ box-sizing: border-box;
134
+
135
+ /* to prevent focus rings from overlapping with the neighbor button*/
136
+ padding: var(--sapphire-calendar-size-focus-ring-border);
137
+
138
+ width: 100%;
139
+ }
140
+
141
+ .sapphire-calendar__button .sapphire-calendar__button-text {
142
+ font-size: var(--sapphire-calendar-size-font-default);
143
+ color: var(--sapphire-calendar-color-content-default);
144
+ font-weight: var(--sapphire-calendar-font-weight-default);
145
+ background-color: var(--sapphire-calendar-color-background-button-default);
146
+ display: flex;
147
+ justify-content: center;
148
+ align-items: center;
149
+ width: 100%;
150
+ height: 100%;
151
+ border-radius: var(--sapphire-calendar-size-radius);
152
+ transition-property: opacity, background-color, color;
153
+ transition-duration: 0s;
154
+ transition-timing-function: ease-in-out;
155
+ padding: 0 var(--sapphire-calendar-size-spacing-title-horizontal);
156
+ }
157
+
158
+ .sapphire-calendar__header-title,
159
+ .sapphire-calendar__button--title .sapphire-calendar__button-text {
160
+ font-weight: var(--sapphire-calendar-font-weight-title);
161
+ font-size: var(--sapphire-calendar-size-font-title);
162
+ }
163
+
164
+ /* Customizations for day buttons */
165
+ .sapphire-calendar__button--day .sapphire-calendar__button-text {
166
+ width: calc(
167
+ var(--sapphire-calendar-size-width-default) - 2 *
168
+ var(--sapphire-calendar-size-focus-ring-border)
169
+ );
170
+ height: calc(
171
+ var(--sapphire-calendar-size-width-default) - 2 *
172
+ var(--sapphire-calendar-size-focus-ring-border)
173
+ );
174
+ padding: 0;
175
+ }
176
+
177
+ .sapphire-calendar__button:disabled,
178
+ .sapphire-calendar__button.is-disabled {
179
+ opacity: var(--sapphire-calendar-opacity-disabled);
180
+ cursor: not-allowed;
181
+ }
182
+
183
+ .sapphire-calendar__button.is-focus .sapphire-calendar__button-text,
184
+ .sapphire-calendar__button:not(.js-focus):focus-visible
185
+ .sapphire-calendar__button-text {
186
+ outline: var(--sapphire-calendar-size-focus-ring-border) solid
187
+ var(--sapphire-calendar-color-focus-ring);
188
+ outline-offset: var(--sapphire-calendar-size-focus-ring-offset);
189
+ z-index: 2;
190
+ background-color: var(--sapphire-calendar-color-background-button-focus);
191
+ transition-duration: var(--sapphire-calendar-time-transition);
192
+ }
193
+
194
+ .sapphire-calendar__button:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover
195
+ .sapphire-calendar__button-text,
196
+ .sapphire-calendar__button:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover
197
+ .sapphire-calendar__button-text {
198
+ background-color: var(--sapphire-calendar-color-background-button-hover);
199
+ transition-duration: var(--sapphire-calendar-time-transition);
200
+ }
201
+
202
+ .sapphire-calendar__button:not(:disabled):not(.is-disabled).is-active
203
+ .sapphire-calendar__button-text,
204
+ .sapphire-calendar__button:not(:disabled):not(.is-disabled):active
205
+ .sapphire-calendar__button-text,
206
+ .sapphire-calendar__button:not(:disabled):not(.is-disabled):focus-visible:active
207
+ .sapphire-calendar__button-text {
208
+ background-color: var(--sapphire-calendar-color-background-button-active);
209
+ transition-duration: var(--sapphire-calendar-time-transition);
210
+ }
211
+
212
+ .sapphire-calendar__table[aria-readonly='true'] .sapphire-calendar__button {
213
+ pointer-events: none;
214
+ }
215
+
216
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection
217
+ .sapphire-calendar__button-text {
218
+ color: var(--sapphire-calendar-color-content-range-selection);
219
+ background-color: var(
220
+ --sapphire-calendar-color-background-range-selection-default
221
+ );
222
+ }
223
+
224
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection {
225
+ background-color: var(
226
+ --sapphire-calendar-color-background-range-selection-default
227
+ );
228
+ }
229
+
230
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover
231
+ .sapphire-calendar__button-text,
232
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover
233
+ .sapphire-calendar__button-text {
234
+ background-color: var(
235
+ --sapphire-calendar-color-background-range-selection-hover
236
+ );
237
+ }
238
+
239
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection:not(:disabled):not(.is-disabled).is-active
240
+ .sapphire-calendar__button-text,
241
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection:not(:disabled):not(.is-disabled):active
242
+ .sapphire-calendar__button-text,
243
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection:not(:disabled):not(.is-disabled):focus-visible:active
244
+ .sapphire-calendar__button-text {
245
+ background-color: var(
246
+ --sapphire-calendar-color-background-range-selection-active
247
+ );
248
+ }
249
+
250
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.is-focus
251
+ .sapphire-calendar__button-text,
252
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection:not(.js-focus):focus-visible
253
+ .sapphire-calendar__button-text {
254
+ background-color: var(
255
+ --sapphire-calendar-color-background-range-selection-focus
256
+ );
257
+ }
258
+
259
+ .sapphire-calendar__button.sapphire-calendar__button--selected:not(.sapphire-calendar__button--range-selection)
260
+ .sapphire-calendar__button-text,
261
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-start
262
+ .sapphire-calendar__button-text,
263
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-end
264
+ .sapphire-calendar__button-text {
265
+ background-color: var(--sapphire-calendar-color-background-selected-default);
266
+ color: var(--sapphire-calendar-color-content-selected);
267
+ font-weight: var(--sapphire-calendar-font-weight-selected);
268
+ }
269
+
270
+ .sapphire-calendar__button:focus {
271
+ outline: none;
272
+ }
273
+
274
+ .sapphire-calendar__button.sapphire-calendar__button--selected:not(.sapphire-calendar__button--range-selection):not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover
275
+ .sapphire-calendar__button-text,
276
+ .sapphire-calendar__button.sapphire-calendar__button--selected:not(.sapphire-calendar__button--range-selection):not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover
277
+ .sapphire-calendar__button-text,
278
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-start:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover
279
+ .sapphire-calendar__button-text,
280
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-start:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover
281
+ .sapphire-calendar__button-text,
282
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-end:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover
283
+ .sapphire-calendar__button-text,
284
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-end:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover
285
+ .sapphire-calendar__button-text {
286
+ background-color: var(--sapphire-calendar-color-background-selected-hover);
287
+ }
288
+
289
+ .sapphire-calendar__button.sapphire-calendar__button--selected:not(.sapphire-calendar__button--range-selection):not(:disabled):not(.is-disabled).is-active
290
+ .sapphire-calendar__button-text,
291
+ .sapphire-calendar__button.sapphire-calendar__button--selected:not(.sapphire-calendar__button--range-selection):not(:disabled):not(.is-disabled):active
292
+ .sapphire-calendar__button-text,
293
+ .sapphire-calendar__button.sapphire-calendar__button--selected:not(.sapphire-calendar__button--range-selection):not(:disabled):not(.is-disabled):focus-visible:active
294
+ .sapphire-calendar__button-text,
295
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-start:not(:disabled):not(.is-disabled).is-active
296
+ .sapphire-calendar__button-text,
297
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-start:not(:disabled):not(.is-disabled):active
298
+ .sapphire-calendar__button-text,
299
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-start:not(:disabled):not(.is-disabled):focus-visible:active
300
+ .sapphire-calendar__button-text,
301
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-end:not(:disabled):not(.is-disabled).is-active
302
+ .sapphire-calendar__button-text,
303
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-end:not(:disabled):not(.is-disabled):active
304
+ .sapphire-calendar__button-text,
305
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-end:not(:disabled):not(.is-disabled):focus-visible:active
306
+ .sapphire-calendar__button-text {
307
+ background-color: var(--sapphire-calendar-color-background-selected-active);
308
+ }
309
+
310
+ .sapphire-calendar__button.sapphire-calendar__button--selected:not(.sapphire-calendar__button--range-selection).is-focus
311
+ .sapphire-calendar__button-text,
312
+ .sapphire-calendar__button.sapphire-calendar__button--selected:not(.sapphire-calendar__button--range-selection):not(.js-focus):focus-visible
313
+ .sapphire-calendar__button-text,
314
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-start.is-focus
315
+ .sapphire-calendar__button-text,
316
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-start:not(.js-focus):focus-visible
317
+ .sapphire-calendar__button-text,
318
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-end.is-focus
319
+ .sapphire-calendar__button-text,
320
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-end:not(.js-focus):focus-visible
321
+ .sapphire-calendar__button-text {
322
+ background-color: var(--sapphire-calendar-color-background-selected-focus);
323
+ }
324
+
325
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-start,
326
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--range-start {
327
+ border-bottom-left-radius: var(--sapphire-calendar-size-radius);
328
+ border-top-left-radius: var(--sapphire-calendar-size-radius);
329
+ }
330
+
331
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-end,
332
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--range-end {
333
+ border-bottom-right-radius: var(--sapphire-calendar-size-radius);
334
+ border-top-right-radius: var(--sapphire-calendar-size-radius);
335
+ }
336
+
337
+ .sapphire-calendar__button.sapphire-calendar__button--current::after {
338
+ content: '';
339
+ position: absolute;
340
+ z-index: 2;
341
+ height: var(--sapphire-calendar-size-height-current-indicator);
342
+ width: var(--sapphire-calendar-size-width-current-indicator);
343
+ border-radius: var(--sapphire-calendar-size-radius);
344
+ background-color: var(
345
+ --sapphire-calendar-color-background-current-indicator-default
346
+ );
347
+ bottom: var(--sapphire-calendar-size-spacing-current-indicator-bottom);
348
+ }
349
+
350
+ .sapphire-calendar__button.sapphire-calendar__button--selected:not(.sapphire-calendar__button--range-selection).sapphire-calendar__button--current::after,
351
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-start.sapphire-calendar__button--current::after,
352
+ .sapphire-calendar__button.sapphire-calendar__button--range-selection.sapphire-calendar__button--selection-end.sapphire-calendar__button--current::after {
353
+ background-color: var(
354
+ --sapphire-calendar-color-background-current-indicator-selected
355
+ );
356
+ }
357
+
358
+ .sapphire-calendar__button.sapphire-calendar__button--outside-month {
359
+ visibility: hidden;
360
+ }
361
+
362
+ /* Wrapper element for the grid(s) that animate */
363
+ .sapphire-calendar__grid-page-animation {
364
+ display: flex;
365
+ position: relative;
366
+ overflow: hidden;
367
+ }
368
+ .sapphire-calendar__grid-page-animation:not(:has(.enter, .exit)) {
369
+ /* Minor improvement for browsers that support :has selector, to let focus ring on calendar cells
370
+ be visible, while not animating */
371
+ overflow: initial;
372
+ }
373
+
374
+ /* Next page animation, applied on the wrapper, when next grid(s) are animating in */
375
+ .sapphire-calendar__grid-page-animation--next .enter {
376
+ transform: translateX(100%);
377
+ }
378
+ .sapphire-calendar__grid-page-animation--next .enter-active {
379
+ transform: translateX(0%);
380
+ transition: transform var(--sapphire-calendar-time-slide) ease-in-out;
381
+ }
382
+ .sapphire-calendar__grid-page-animation--next .exit {
383
+ transform: translateX(0%);
384
+ position: absolute;
385
+ }
386
+ .sapphire-calendar__grid-page-animation--next .exit-active {
387
+ transform: translateX(-100%);
388
+ transition: transform var(--sapphire-calendar-time-slide) ease-in-out;
389
+ }
390
+
391
+ /* Previous page animation, applied on the wrapper, when previous grid(s) are animating in */
392
+ .sapphire-calendar__grid-page-animation--prev .enter {
393
+ transform: translateX(-100%);
394
+ }
395
+ .sapphire-calendar__grid-page-animation--prev .enter-active {
396
+ transform: translateX(0%);
397
+ transition: transform var(--sapphire-calendar-time-slide) ease-in-out;
398
+ }
399
+ .sapphire-calendar__grid-page-animation--prev .exit {
400
+ transform: translateX(0%);
401
+ position: absolute;
402
+ }
403
+ .sapphire-calendar__grid-page-animation--prev .exit-active {
404
+ transform: translateX(100%);
405
+ transition: transform var(--sapphire-calendar-time-slide) ease-in-out;
406
+ }
@@ -0,0 +1,47 @@
1
+ declare const styles: {
2
+ readonly "sapphire-calendar": string;
3
+ readonly "sapphire-calendar__table-container": string;
4
+ readonly "sapphire-calendar__header": string;
5
+ readonly "sapphire-calendar__header--left": string;
6
+ readonly "sapphire-calendar__header-next-month": string;
7
+ readonly "sapphire-calendar__header--right": string;
8
+ readonly "sapphire-calendar__header-prev-month": string;
9
+ readonly "sapphire-calendar__header-title": string;
10
+ readonly "sapphire-calendar__tables-row": string;
11
+ readonly "sapphire-calendar__table": string;
12
+ readonly "sapphire-calendar__table--month-year": string;
13
+ readonly "sapphire-calendar__table-body-row": string;
14
+ readonly "sapphire-calendar__table-body-cell": string;
15
+ readonly "sapphire-calendar__table--with-week-numbers": string;
16
+ readonly "sapphire-calendar__table-head-cell": string;
17
+ readonly "sapphire-calendar__custom-ranges": string;
18
+ readonly "sapphire-calendar__day-of-week": string;
19
+ readonly "sapphire-calendar__week-number": string;
20
+ readonly "sapphire-calendar__button": string;
21
+ readonly "sapphire-calendar__button-text": string;
22
+ readonly "sapphire-calendar__button--title": string;
23
+ readonly "sapphire-calendar__button--day": string;
24
+ readonly "is-disabled": string;
25
+ readonly "is-focus": string;
26
+ readonly "js-focus": string;
27
+ readonly "is-active": string;
28
+ readonly "js-hover": string;
29
+ readonly "is-hover": string;
30
+ readonly "sapphire-calendar__button--range-selection": string;
31
+ readonly "sapphire-calendar__button--selected": string;
32
+ readonly "sapphire-calendar__button--selection-start": string;
33
+ readonly "sapphire-calendar__button--selection-end": string;
34
+ readonly "sapphire-calendar__button--range-start": string;
35
+ readonly "sapphire-calendar__button--range-end": string;
36
+ readonly "sapphire-calendar__button--current": string;
37
+ readonly "sapphire-calendar__button--outside-month": string;
38
+ readonly "sapphire-calendar__grid-page-animation": string;
39
+ readonly "enter": string;
40
+ readonly "exit": string;
41
+ readonly "sapphire-calendar__grid-page-animation--next": string;
42
+ readonly "enter-active": string;
43
+ readonly "exit-active": string;
44
+ readonly "sapphire-calendar__grid-page-animation--prev": string;
45
+ };
46
+ export = styles;
47
+
@@ -0,0 +1,182 @@
1
+ .sapphire-checkbox {
2
+ font-family: var(--sapphire-checkbox-font-label-name);
3
+ display: inline-flex;
4
+ align-items: center;
5
+ position: relative;
6
+ max-width: 100%;
7
+ }
8
+
9
+ .sapphire-checkbox__input {
10
+ margin: 0;
11
+ overflow: visible;
12
+ position: absolute;
13
+ top: 0;
14
+ left: 0;
15
+ height: 100%;
16
+ width: 100%;
17
+
18
+ /*
19
+ * Not setting opacity to 0 as it could be ignored by some screen readers
20
+ */
21
+ opacity: 0.0001;
22
+ z-index: 1;
23
+
24
+ cursor: pointer;
25
+ }
26
+
27
+ .sapphire-checkbox__label {
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
+ margin-left: var(--sapphire-checkbox-size-spacing-label);
43
+ font-size: var(--sapphire-checkbox-size-font-default);
44
+ color: var(--sapphire-checkbox-color-label);
45
+ line-height: var(--sapphire-checkbox-size-height-label);
46
+ }
47
+
48
+ .sapphire-checkbox__label:empty {
49
+ margin-left: 0;
50
+ }
51
+
52
+ .sapphire-checkbox__error-text {
53
+ display: block;
54
+ font-family: var(--sapphire-checkbox-font-error-text-name);
55
+ font-weight: var(--sapphire-checkbox-font-error-text-weight);
56
+ font-size: var(--sapphire-checkbox-size-font-error-text);
57
+ color: var(--sapphire-checkbox-color-error-text);
58
+ margin-top: var(--sapphire-checkbox-size-spacing-error-text-vertical);
59
+ margin-left: calc(
60
+ var(--sapphire-checkbox-size-spacing-label) +
61
+ var(--sapphire-checkbox-size-width-box)
62
+ );
63
+ }
64
+
65
+ /* The checkbox box */
66
+
67
+ .sapphire-checkbox__box {
68
+ box-sizing: border-box;
69
+ position: relative;
70
+ width: var(--sapphire-checkbox-size-width-box);
71
+ height: var(--sapphire-checkbox-size-height-box);
72
+ border-radius: var(--sapphire-checkbox-size-radius);
73
+ border: var(--sapphire-checkbox-size-width-border-unchecked) solid
74
+ var(--sapphire-checkbox-color-border-unchecked-default);
75
+ background-color: var(--sapphire-checkbox-color-background-unchecked);
76
+ transition: all var(--sapphire-checkbox-time-transition);
77
+ flex-shrink: 0;
78
+ display: inline-flex;
79
+ justify-content: center;
80
+ align-items: center;
81
+ }
82
+
83
+ .sapphire-checkbox__box-icon {
84
+ display: inherit;
85
+ line-height: 0;
86
+ color: var(--sapphire-checkbox-color-icon);
87
+ margin: calc(var(--sapphire-checkbox-size-width-border-unchecked) * -1);
88
+ height: var(--sapphire-checkbox-size-height-box);
89
+ width: var(--sapphire-checkbox-size-width-box);
90
+ }
91
+
92
+ .sapphire-checkbox--error .sapphire-checkbox__box {
93
+ border-color: var(--sapphire-checkbox-color-border-unchecked-error-default);
94
+ }
95
+
96
+ /* Checked (same UI as indeterminate) */
97
+
98
+ .sapphire-checkbox--checked .sapphire-checkbox__box,
99
+ .sapphire-checkbox--indeterminate .sapphire-checkbox__box {
100
+ border-width: var(--sapphire-checkbox-size-width-border-checked);
101
+ background-color: var(--sapphire-checkbox-color-background-checked-default);
102
+ }
103
+
104
+ .sapphire-checkbox--checked.sapphire-checkbox--error .sapphire-checkbox__box,
105
+ .sapphire-checkbox--indeterminate.sapphire-checkbox--error
106
+ .sapphire-checkbox__box {
107
+ background-color: var(
108
+ --sapphire-checkbox-color-background-checked-error-default
109
+ );
110
+ }
111
+
112
+ /* HOVER */
113
+
114
+ /* Hover when not checked */
115
+
116
+ .sapphire-checkbox:not(:active):not(.is-active):not(.sapphire-checkbox--checked).is-hover
117
+ .sapphire-checkbox__box,
118
+ .sapphire-checkbox:not(:active):not(.is-active):not(.sapphire-checkbox--checked):not(.js-hover):hover
119
+ .sapphire-checkbox__input:not(:disabled)
120
+ ~ .sapphire-checkbox__box {
121
+ border-color: var(--sapphire-checkbox-color-border-unchecked-hover);
122
+ }
123
+
124
+ .sapphire-checkbox--error:not(:active):not(.is-active):not(.sapphire-checkbox--checked).is-hover
125
+ .sapphire-checkbox__box,
126
+ .sapphire-checkbox--error:not(:active):not(.is-active):not(.sapphire-checkbox--checked):not(.js-hover):hover
127
+ .sapphire-checkbox__input:not(:disabled)
128
+ ~ .sapphire-checkbox__box {
129
+ border-color: var(--sapphire-checkbox-color-border-unchecked-error-hover);
130
+ }
131
+
132
+ /* Hover when checked (same UI as indeterminate) */
133
+
134
+ .sapphire-checkbox--checked:not(:active):not(.is-active).is-hover
135
+ .sapphire-checkbox__box,
136
+ .sapphire-checkbox--checked:not(:active):not(.is-active):not(.js-hover):hover
137
+ .sapphire-checkbox__input:not(:disabled)
138
+ ~ .sapphire-checkbox__box,
139
+ .sapphire-checkbox--indeterminate:not(:active):not(.is-active).is-hover
140
+ .sapphire-checkbox__box,
141
+ .sapphire-checkbox--indeterminate:not(:active):not(.is-active):not(.js-hover):hover
142
+ .sapphire-checkbox__input:not(:disabled)
143
+ ~ .sapphire-checkbox__box {
144
+ background-color: var(--sapphire-checkbox-color-background-checked-hover);
145
+ }
146
+
147
+ .sapphire-checkbox--checked.sapphire-checkbox--error:not(:active):not(.is-active).is-hover
148
+ .sapphire-checkbox__box,
149
+ .sapphire-checkbox--checked.sapphire-checkbox--error:not(:active):not(.is-active):not(.js-hover):hover
150
+ .sapphire-checkbox__input:not(:disabled)
151
+ ~ .sapphire-checkbox__box,
152
+ .sapphire-checkbox--indeterminate.sapphire-checkbox--error:not(:active):not(.is-active).is-hover
153
+ .sapphire-checkbox__box,
154
+ .sapphire-checkbox--indeterminate.sapphire-checkbox--error:not(:active):not(.is-active):not(.js-hover):hover
155
+ .sapphire-checkbox__input:not(:disabled)
156
+ ~ .sapphire-checkbox__box {
157
+ background-color: var(
158
+ --sapphire-checkbox-color-background-checked-error-hover
159
+ );
160
+ }
161
+
162
+ /* FOCUS */
163
+
164
+ .sapphire-checkbox.is-focus .sapphire-checkbox__box,
165
+ .sapphire-checkbox:not(.js-focus)
166
+ .sapphire-checkbox__input:focus-visible
167
+ ~ .sapphire-checkbox__box {
168
+ outline: var(--sapphire-checkbox-size-focus-ring-border) solid
169
+ var(--sapphire-checkbox-color-focus-ring);
170
+ outline-offset: var(--sapphire-checkbox-size-focus-ring-offset);
171
+ }
172
+
173
+ /* DISABLED */
174
+
175
+ .sapphire-checkbox__input:disabled {
176
+ cursor: not-allowed;
177
+ }
178
+
179
+ .sapphire-checkbox__input:disabled ~ .sapphire-checkbox__box,
180
+ .sapphire-checkbox__input:disabled ~ .sapphire-checkbox__label {
181
+ opacity: var(--sapphire-checkbox-opacity-disabled);
182
+ }
@@ -0,0 +1,18 @@
1
+ declare const styles: {
2
+ readonly "sapphire-checkbox": string;
3
+ readonly "sapphire-checkbox__input": string;
4
+ readonly "sapphire-checkbox__label": string;
5
+ readonly "sapphire-checkbox__error-text": string;
6
+ readonly "sapphire-checkbox__box": string;
7
+ readonly "sapphire-checkbox__box-icon": string;
8
+ readonly "sapphire-checkbox--error": string;
9
+ readonly "sapphire-checkbox--checked": string;
10
+ readonly "sapphire-checkbox--indeterminate": string;
11
+ readonly "is-active": string;
12
+ readonly "is-hover": string;
13
+ readonly "js-hover": string;
14
+ readonly "is-focus": string;
15
+ readonly "js-focus": string;
16
+ };
17
+ export = styles;
18
+
@@ -0,0 +1,35 @@
1
+ .sapphire-contextual-help {
2
+ color: var(--sapphire-contextual-help-color-content);
3
+ line-height: var(--sapphire-contextual-help-size-line-height);
4
+ max-width: var(--sapphire-contextual-help-size-width-max);
5
+ font-family: var(--sapphire-contextual-help-font-name);
6
+ font-weight: var(--sapphire-contextual-help-font-weight);
7
+ font-size: var(--sapphire-contextual-help-size-font);
8
+ padding: var(--sapphire-contextual-help-size-spacing-vertical)
9
+ var(--sapphire-contextual-help-size-spacing-horizontal);
10
+ /* if implemented as focusable, we don't want the outline because this is not
11
+ * an an interactive element in itself */
12
+ outline: none;
13
+
14
+ /* The below is meant to address a font rendering quirk in OSX where the text
15
+ * looks bolder than intended due to subpixel rendering. This quirk generally
16
+ * occurs for bold fonts on dark backgrounds but depending on the font, it
17
+ * can happen in other contexts as well.
18
+ *
19
+ * These do not do anything except in webkit browsers & firefox on OSX.
20
+ *
21
+ * For more details see:
22
+ * - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
23
+ * - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
24
+ */
25
+ -webkit-font-smoothing: antialiased;
26
+ -moz-osx-font-smoothing: grayscale;
27
+ }
28
+
29
+ .sapphire-contextual-help__header {
30
+ padding-bottom: var(--sapphire-contextual-help-size-spacing-header);
31
+ }
32
+
33
+ .sapphire-contextual-help__footer {
34
+ padding-top: var(--sapphire-contextual-help-size-spacing-footer);
35
+ }