superdesk-ui-framework 7.0.0-dev-hg0 → 7.0.0-dev-hg2

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 (195) hide show
  1. package/app/fonts/sd_big-icons.eot +0 -0
  2. package/app/fonts/sd_big-icons.svg +69 -0
  3. package/app/fonts/sd_big-icons.ttf +0 -0
  4. package/app/fonts/sd_big-icons.woff +0 -0
  5. package/app/fonts/sd_icons.eot +0 -0
  6. package/app/fonts/sd_icons.svg +202 -0
  7. package/app/fonts/sd_icons.ttf +0 -0
  8. package/app/fonts/sd_icons.woff +0 -0
  9. package/app/img/AvatarDefaultImage.svg +6 -0
  10. package/app/img/DotsSmall-dark.svg +14 -0
  11. package/app/img/OneDot.svg +3 -0
  12. package/app/img/SD-logo.svg +52 -0
  13. package/app/img/dots.svg +3 -0
  14. package/app/img/empty_states/empty-state--large-1.svg +221 -0
  15. package/app/img/empty_states/empty-state--large-2.svg +207 -0
  16. package/app/img/empty_states/empty-state--large-3.svg +231 -0
  17. package/app/img/empty_states/empty-state--large-dashboard.svg +642 -0
  18. package/app/img/empty_states/empty-state--small-1.svg +112 -0
  19. package/app/img/empty_states/empty-state--small-2.svg +49 -0
  20. package/app/img/empty_states/empty-state--small-3.svg +47 -0
  21. package/app/img/icon_illustrations/IconIllustration__headlines.svg +25 -0
  22. package/app/img/icon_illustrations/IconIllustration__keywords.svg +46 -0
  23. package/app/img/icon_illustrations/IconIllustration__optimise.svg +38 -0
  24. package/app/img/icon_illustrations/IconIllustration__summary.svg +27 -0
  25. package/app/img/icon_illustrations/IconIllustration__translate.svg +12 -0
  26. package/app/img/icon_image_stack--white.svg +16 -0
  27. package/app/img/icon_image_stack.svg +16 -0
  28. package/app/img/spinner.svg +3 -0
  29. package/app/img/spinning-wheel.gif +0 -0
  30. package/app/img/theme-thumbnail.png +0 -0
  31. package/app/img/themes/theme-base.svg +1 -0
  32. package/app/img/themes/theme-contrast.svg +45 -0
  33. package/app/img/themes/theme-dark.svg +1 -0
  34. package/app/img/themes/theme-light.svg +1 -0
  35. package/app/img/three-dots.svg +33 -0
  36. package/app/styles/_accessibility.scss +358 -0
  37. package/app/styles/_alerts.scss +392 -0
  38. package/app/styles/_animations.scss +73 -0
  39. package/app/styles/_avatar.scss +526 -0
  40. package/app/styles/_badge.scss +106 -0
  41. package/app/styles/_big-icon-font.scss +182 -0
  42. package/app/styles/_boxed-list.scss +284 -0
  43. package/app/styles/_buttons.scss +874 -0
  44. package/app/styles/_carousel.scss +232 -0
  45. package/app/styles/_content-divider.scss +233 -0
  46. package/app/styles/_design-tokens.scss +6 -0
  47. package/app/styles/_drag-drop.scss +26 -0
  48. package/app/styles/_drag-handle.scss +48 -0
  49. package/app/styles/_empty-states.scss +81 -0
  50. package/app/styles/_expand-button.scss +31 -0
  51. package/app/styles/_hamburger.scss +160 -0
  52. package/app/styles/_helpers.scss +2220 -0
  53. package/app/styles/_icon-font.scss +488 -0
  54. package/app/styles/_icon-labels.scss +140 -0
  55. package/app/styles/_labels.scss +184 -0
  56. package/app/styles/_loaders.scss +29 -0
  57. package/app/styles/_master-desk.scss +323 -0
  58. package/app/styles/_mixins.scss +164 -0
  59. package/app/styles/_modals.scss +452 -0
  60. package/app/styles/_normalize.scss +466 -0
  61. package/app/styles/_panel-info.scss +48 -0
  62. package/app/styles/_popover.scss +29 -0
  63. package/app/styles/_pr-superdesk-theme.scss +4 -0
  64. package/app/styles/_publisher-styles.scss +195 -0
  65. package/app/styles/_reboot.scss +65 -0
  66. package/app/styles/_sd-tag-input.scss +715 -0
  67. package/app/styles/_simple-list.scss +158 -0
  68. package/app/styles/_spinner.scss +47 -0
  69. package/app/styles/_table-list.scss +385 -0
  70. package/app/styles/_tables.scss +150 -0
  71. package/app/styles/_tabs-vertical.scss +58 -0
  72. package/app/styles/_tabs.scss +232 -0
  73. package/app/styles/_tag-labels.scss +210 -0
  74. package/app/styles/_thumb-carousel.scss +247 -0
  75. package/app/styles/_time.scss +113 -0
  76. package/app/styles/_toggle-box.scss +175 -0
  77. package/app/styles/_toggle-button.scss +46 -0
  78. package/app/styles/_tooltips.scss +431 -0
  79. package/app/styles/_variables.scss +4 -0
  80. package/app/styles/app.scss +127 -0
  81. package/app/styles/components/_calendar-week-day.scss +99 -0
  82. package/app/styles/components/_card-item.scss +586 -0
  83. package/app/styles/components/_list-item.scss +694 -0
  84. package/app/styles/components/_load-more-indicator.scss +15 -0
  85. package/app/styles/components/_overflow-stack.scss +120 -0
  86. package/app/styles/components/_sd-circular-progress.scss +239 -0
  87. package/app/styles/components/_sd-collapse-box.scss +292 -0
  88. package/app/styles/components/_sd-comment-box.scss +42 -0
  89. package/app/styles/components/_sd-dropzone.scss +134 -0
  90. package/app/styles/components/_sd-editor-popup.scss +106 -0
  91. package/app/styles/components/_sd-grid-item.scss +865 -0
  92. package/app/styles/components/_sd-loader.scss +39 -0
  93. package/app/styles/components/_sd-media-carousel.scss +408 -0
  94. package/app/styles/components/_sd-notification-panel.scss +51 -0
  95. package/app/styles/components/_sd-pagination.scss +51 -0
  96. package/app/styles/components/_sd-photo-preview.scss +508 -0
  97. package/app/styles/components/_sd-searchbar.scss +276 -0
  98. package/app/styles/components/_sd-toaster.scss +226 -0
  99. package/app/styles/components/_subnav.scss +777 -0
  100. package/app/styles/components/_theme-selector.scss +221 -0
  101. package/app/styles/components/sd-slider.scss +125 -0
  102. package/app/styles/design-tokens/_brand-colors.scss +36 -0
  103. package/app/styles/design-tokens/_component-tokens.scss +11 -0
  104. package/app/styles/design-tokens/_design-tokens-general.scss +145 -0
  105. package/app/styles/design-tokens/_new-colors.scss +820 -0
  106. package/app/styles/design-tokens/_primitives.scss +161 -0
  107. package/app/styles/design-tokens/_semantic-colors.scss +161 -0
  108. package/app/styles/dropdowns/_basic-dropdown.scss +760 -0
  109. package/app/styles/dropdowns/_input-dropdown.scss +26 -0
  110. package/app/styles/dropdowns/_navigation_dropdown.scss +126 -0
  111. package/app/styles/dropdowns/_nested-dropdown.scss +95 -0
  112. package/app/styles/dropdowns/_other_dropdown.scss +59 -0
  113. package/app/styles/dropdowns/dropdown2.scss +4 -0
  114. package/app/styles/editor/_editor-buttons.scss +61 -0
  115. package/app/styles/editor/_editor-themes.scss +550 -0
  116. package/app/styles/form-elements/_autocomplete.scss +54 -0
  117. package/app/styles/form-elements/_checkbox.scss +770 -0
  118. package/app/styles/form-elements/_forms-general.scss +543 -0
  119. package/app/styles/form-elements/_input-preview.scss +80 -0
  120. package/app/styles/form-elements/_input-wrap.scss +147 -0
  121. package/app/styles/form-elements/_inputs.scss +1425 -0
  122. package/app/styles/form-elements/_radio.scss +65 -0
  123. package/app/styles/form-elements/_select-grid.scss +81 -0
  124. package/app/styles/form-elements/_switch.scss +109 -0
  125. package/app/styles/grids/_basic-grid.scss +206 -0
  126. package/app/styles/grids/_grid-layout.scss +1162 -0
  127. package/app/styles/grids/_layout-grid.scss +176 -0
  128. package/app/styles/grids/_sd-kanban-list.scss +92 -0
  129. package/app/styles/index.js +1 -0
  130. package/app/styles/interface-elements/_side-panel.scss +595 -0
  131. package/app/styles/layout/_basic-layout.scss +149 -0
  132. package/app/styles/layout/_container.scss +45 -0
  133. package/app/styles/layout/_editor.scss +464 -0
  134. package/app/styles/layout/_general.scss +92 -0
  135. package/app/styles/menus/_sd-bottom-tabs.scss +79 -0
  136. package/app/styles/menus/_sd-content-navigation.scss +50 -0
  137. package/app/styles/menus/_sd-left-navigation.scss +126 -0
  138. package/app/styles/menus/_sd-sidebar-menu.scss +465 -0
  139. package/app/styles/menus/_sd-top-menu.scss +105 -0
  140. package/app/styles/pr-superdesk-theme.scss +7 -0
  141. package/app/styles/primereact/_pr-autocomplete.scss +27 -0
  142. package/app/styles/primereact/_pr-datepicker.scss +288 -0
  143. package/app/styles/primereact/_pr-dialog.scss +399 -0
  144. package/app/styles/primereact/_pr-dropdown.scss +233 -0
  145. package/app/styles/primereact/_pr-general.scss +72 -0
  146. package/app/styles/primereact/_pr-menu.scss +60 -0
  147. package/app/styles/primereact/_pr-skeleton.scss +36 -0
  148. package/app/styles/primereact/_pr-tag-input.scss +66 -0
  149. package/app/styles/variables/_colors.scss +275 -0
  150. package/app/styles/variables/_dimensions.scss +89 -0
  151. package/app/styles/variables/_form-elements.scss +0 -0
  152. package/app/styles/variables/_typography.scss +20 -0
  153. package/dist/esm/components/EmptyState.d.ts.map +1 -1
  154. package/dist/esm/components/EmptyState.js +22 -1
  155. package/dist/esm/components/EmptyState.js.map +1 -1
  156. package/dist/fonts/sd_big-icons.eot +0 -0
  157. package/dist/fonts/sd_big-icons.svg +69 -0
  158. package/dist/fonts/sd_big-icons.ttf +0 -0
  159. package/dist/fonts/sd_big-icons.woff +0 -0
  160. package/dist/fonts/sd_icons.eot +0 -0
  161. package/dist/fonts/sd_icons.svg +202 -0
  162. package/dist/fonts/sd_icons.ttf +0 -0
  163. package/dist/fonts/sd_icons.woff +0 -0
  164. package/dist/img/AvatarDefaultImage.svg +6 -0
  165. package/dist/img/DotsSmall-dark.svg +14 -0
  166. package/dist/img/OneDot.svg +3 -0
  167. package/dist/img/SD-logo.svg +52 -0
  168. package/dist/img/dots.svg +3 -0
  169. package/dist/img/empty_states/empty-state--large-1.svg +221 -0
  170. package/dist/img/empty_states/empty-state--large-2.svg +207 -0
  171. package/dist/img/empty_states/empty-state--large-3.svg +231 -0
  172. package/dist/img/empty_states/empty-state--large-dashboard.svg +642 -0
  173. package/dist/img/empty_states/empty-state--small-1.svg +112 -0
  174. package/dist/img/empty_states/empty-state--small-2.svg +49 -0
  175. package/dist/img/empty_states/empty-state--small-3.svg +47 -0
  176. package/dist/img/icon_illustrations/IconIllustration__headlines.svg +25 -0
  177. package/dist/img/icon_illustrations/IconIllustration__keywords.svg +46 -0
  178. package/dist/img/icon_illustrations/IconIllustration__optimise.svg +38 -0
  179. package/dist/img/icon_illustrations/IconIllustration__summary.svg +27 -0
  180. package/dist/img/icon_illustrations/IconIllustration__translate.svg +12 -0
  181. package/dist/img/icon_image_stack--white.svg +16 -0
  182. package/dist/img/icon_image_stack.svg +16 -0
  183. package/dist/img/spinner.svg +3 -0
  184. package/dist/img/spinning-wheel.gif +0 -0
  185. package/dist/img/theme-thumbnail.png +0 -0
  186. package/dist/img/themes/theme-base.svg +1 -0
  187. package/dist/img/themes/theme-contrast.svg +45 -0
  188. package/dist/img/themes/theme-dark.svg +1 -0
  189. package/dist/img/themes/theme-light.svg +1 -0
  190. package/dist/img/three-dots.svg +33 -0
  191. package/dist/superdesk-ui.bundle.js +1 -1
  192. package/package.json +10 -3
  193. package/react/components/EmptyState.d.ts.map +1 -1
  194. package/react/components/EmptyState.js +22 -1
  195. package/react/components/EmptyState.js.map +1 -1
@@ -0,0 +1,770 @@
1
+ @use "sass:math";
2
+ @use "../mixins";
3
+ @use "../variables/colors";
4
+ @use "../variables/dimensions";
5
+ @use "../variables/typography";
6
+
7
+ // CHECKBOX & RADIO BUTTONS
8
+
9
+ $checkBoxBorderColor: var(--color-checkbox-border);
10
+ $checkBoxBorderColorHover: var(--color-checkbox-border-hover);
11
+ $checkButtonTextColor: var(--color-text-muted);
12
+ $checkButtonBorderColor: var(--sd-colour-line--light);
13
+ $checkButtonBorderColorHover: var(--sd-colour-line--strong);
14
+ $checkButtonBorderRadius: dimensions.$border-radius__base--small;
15
+
16
+ @mixin check-base {
17
+ --check-size: 1.6rem;
18
+ width: var(--check-size);
19
+ height: var(--check-size);
20
+ display: inline-block;
21
+ position: relative;
22
+ background: transparent;
23
+ border: 2px solid $checkBoxBorderColor;
24
+ vertical-align: middle;
25
+ font-family: typography.$baseFontFamily;
26
+ transition: all 0.2s ease-out;
27
+ flex: 0 0 var(--check-size);
28
+ }
29
+
30
+ .sd-checkbox {
31
+ @include check-base;
32
+ border-radius: dimensions.$border-radius__base--x-small;
33
+
34
+ &::after {
35
+ @include mixins.opacity(0);
36
+ @include mixins.transition(all, 0.2s, ease-in);
37
+ font-family: 'sd_icons';
38
+ content:'\e61d';
39
+ font-weight: 400;
40
+ font-size: 1.2rem;
41
+ line-height: 1.2rem;
42
+ height: 1.2rem;
43
+ width: 1.2rem;
44
+ -webkit-font-smoothing: antialiased;
45
+ -moz-osx-font-smoothing: grayscale;
46
+ color: #fff;
47
+ position: absolute;
48
+ inset-block-start: 0;
49
+ inset-inline-start: 0;
50
+ transform: scale(0.25, 0.25);
51
+ }
52
+
53
+ &:hover {
54
+ border-color: $checkBoxBorderColorHover;
55
+ cursor: pointer;
56
+ }
57
+
58
+ &.checked, &[checked="checked"] {
59
+ border-color: colors.$sd-colour-interactive;
60
+ background: colors.$sd-colour-interactive;
61
+
62
+ &::after {
63
+ opacity: 1;
64
+ transform: scale(1, 1);
65
+ }
66
+
67
+ &:hover {
68
+ border-color: var(--sd-colour-interactive--hover);
69
+ background-color: var(--sd-colour-interactive--hover);
70
+ }
71
+ }
72
+
73
+ }
74
+
75
+ // Modifier for .sd-checkbox to create a radio button
76
+ .sd-checkbox--radio {
77
+ border-radius: dimensions.$border-radius__base--full;
78
+
79
+ &::after {
80
+ height: 0.8rem;
81
+ width: 0.8rem;
82
+ border-radius: dimensions.$border-radius__base--full;
83
+ content:' ';
84
+ position: absolute;
85
+ background-color: colors.$sd-colour-interactive;
86
+ inset-block-start: 0.2rem;
87
+ inset-inline-start: 0.2rem;
88
+ opacity: 0;
89
+ transition: all 0.1s ease-in;
90
+ transform: scale(0.25, 0.25);
91
+ }
92
+
93
+ &.checked, &[checked="checked"] {
94
+ border-color: colors.$sd-colour-interactive;
95
+ background: transparent;
96
+
97
+ &::after {
98
+ opacity: 1;
99
+ transform: scale(1, 1);
100
+ }
101
+
102
+ &:hover {
103
+ background: transparent;
104
+ }
105
+ }
106
+ }
107
+
108
+ // This modifier creates button styled checkboxes or radio buttons
109
+ .sd-checkbox--button-style {
110
+ @include mixins.transition(all, 0.2s, ease-out);
111
+ @include mixins.text-overflow;
112
+ width: auto;
113
+ padding: 0 1.2rem;
114
+ line-height: 1;
115
+ color: $checkButtonTextColor;
116
+ border: 1px solid $checkButtonBorderColor;
117
+ border-radius: $checkButtonBorderRadius;
118
+ display: inline-flex;
119
+ align-items: center;
120
+ text-align: center;
121
+ height: dimensions.$sd-base-increment * 4;
122
+
123
+ label {
124
+ @include mixins.text-overflow;
125
+ margin:0;
126
+ display: inline;
127
+ cursor: pointer;
128
+ transition: none;
129
+ text-align: center;
130
+ line-height: 16px;
131
+ font-family: typography.$baseFontFamily;
132
+
133
+ [class^="icon-"], [class*=" icon-"] {
134
+ vertical-align: middle;
135
+ }
136
+ }
137
+
138
+ [class^="icon-"], [class*=" icon-"] {
139
+ color: currentColor;
140
+ }
141
+
142
+ i + label {
143
+ margin-inline-start: var(--space--1);
144
+ font-size: var(--text-size-small);
145
+ }
146
+
147
+ &::after {
148
+ content:'';
149
+ display: none;
150
+ }
151
+
152
+ &:hover {
153
+ color: var(--color-text);
154
+ border-color: $checkButtonBorderColorHover;
155
+ box-shadow: 0 1px 4px 0 hsla(0, 0%, 0%, 0.2);
156
+ }
157
+
158
+ &.checked, &[checked="checked"] {
159
+ background-color: var(--sd-colour-interactive--active);
160
+ border-color: var(--sd-colour-interactive--active);
161
+ border-top-color: var(--sd-colour-interactive--darken-20);
162
+ box-shadow: inset 0 2px 0 0 hsla(0, 0%, 0%, 0.2);
163
+ color: colors.$white;
164
+
165
+ &:hover {
166
+ color: colors.$white;
167
+ border-color: var(--sd-colour-interactive--hover);
168
+ background-color: var(--sd-colour-interactive--active);
169
+ box-shadow: inset 0 2px 0 0 hsla(0, 0%, 0%, 0.2);
170
+ }
171
+
172
+ label {
173
+ color: colors.$white;
174
+ }
175
+ }
176
+
177
+ .sd-label--disabled {
178
+ opacity: 1 !important;
179
+ cursor: not-allowed !important;
180
+ }
181
+ }
182
+
183
+ .sd-checkbox--disabled, .sd-checkbox[disabled="disabled"] {
184
+ opacity: 0.40;
185
+ cursor: not-allowed !important;
186
+
187
+ &:hover {
188
+ color: $checkButtonTextColor;
189
+ border-color: $checkButtonBorderColor;
190
+ box-shadow: none;
191
+ }
192
+ }
193
+
194
+ .sd-checkbox + label {
195
+ display: inline-block;
196
+ vertical-align: middle;
197
+ }
198
+
199
+ .sd-check__wrapper {
200
+ display: inline-block;
201
+
202
+ .sd-checkbox + label {
203
+ display: inline-block;
204
+ vertical-align: middle;
205
+ margin: 0;
206
+ margin-inline-start: 0.6rem;
207
+
208
+ i {
209
+ margin: 0;
210
+ margin-inline-end: 0.4rem;
211
+ margin-inline-start: 0.8rem;
212
+ }
213
+ }
214
+
215
+ .sd-label--disabled {
216
+ opacity: 0.40;
217
+ }
218
+ }
219
+
220
+ .sd-check__group {
221
+ padding: 0;
222
+ display: flex;
223
+ gap: dimensions.$sd-base-increment;
224
+ }
225
+
226
+ .sd-check__group--grid {
227
+ display: grid;
228
+ grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
229
+ grid-gap: dimensions.$sd-base-increment;
230
+
231
+ .sd-check__wrapper {
232
+ display: block;
233
+
234
+ .sd-checkbox.sd-checkbox--button-style {
235
+ display: flex;
236
+ align-items: center;
237
+ justify-content: center;
238
+ }
239
+ }
240
+
241
+ .sd-check-button__text-label-inner {
242
+ white-space: normal;
243
+ }
244
+ }
245
+
246
+ .sd-check-button__group--grid {
247
+ .sd-check-button--native {
248
+ .sd-check-button__text-label-inner {
249
+ white-space: normal;
250
+ text-align: center;
251
+ }
252
+ }
253
+ }
254
+
255
+
256
+ // ============================================================================
257
+ // NEW CHECKBOX & RADIO
258
+ // ============================================================================
259
+
260
+ .sd-check-new {
261
+ @include check-base;
262
+ border-radius: dimensions.$border-radius__base--x-small;
263
+
264
+ &::after {
265
+ font-family: 'sd_icons';
266
+ content:'\e61d';
267
+ font-weight: 400;
268
+ font-size: 1.2rem;
269
+ line-height: 1.2rem;
270
+ height: 1.2rem;
271
+ width: 1.2rem;
272
+ -webkit-font-smoothing: antialiased;
273
+ -moz-osx-font-smoothing: grayscale;
274
+ color: #fff;
275
+ position: absolute;
276
+ inset-block-start: 0;
277
+ inset-inline-start: 0;
278
+ opacity: 0;
279
+ transition: all 0.2s ease-in;
280
+ transform: scale(0.25, 0.25);
281
+ }
282
+
283
+ &:hover {
284
+ border-color: $checkBoxBorderColorHover;
285
+ cursor: pointer;
286
+ }
287
+
288
+ &.checked, &[checked="checked"] {
289
+ border-color: colors.$sd-colour-interactive;
290
+ background: colors.$sd-colour-interactive;
291
+
292
+ &::after {
293
+ opacity: 1;
294
+ transform: scale(1, 1);
295
+ }
296
+
297
+ &:hover {
298
+ border-color: var(--sd-colour-interactive--hover);
299
+ background-color: var(--sd-colour-interactive--hover);
300
+ }
301
+ }
302
+ }
303
+
304
+ .sd-check-new--disabled, .sd-check-new[disabled="disabled"] {
305
+ opacity: 0.40;
306
+ cursor: not-allowed !important;
307
+
308
+ &:hover {
309
+ color: $checkButtonTextColor;
310
+ border-color: $checkButtonBorderColor;
311
+ box-shadow: none;
312
+ }
313
+ }
314
+
315
+ .sd-radio-new {
316
+ @include check-base;
317
+ border-radius: dimensions.$border-radius__base--full;
318
+
319
+ &:hover {
320
+ border-color: $checkBoxBorderColorHover;
321
+ cursor: pointer;
322
+ }
323
+
324
+ &::after {
325
+ height: 0.8rem;
326
+ width: 0.8rem;
327
+ border-radius: dimensions.$border-radius__base--full;
328
+ content:' ';
329
+ position: absolute;
330
+ background-color: colors.$sd-colour-interactive;
331
+ inset-block-start: 0.2rem;
332
+ inset-inline-start: 0.2rem;
333
+ opacity: 0;
334
+ transition: all 0.1s ease-in;
335
+ transform: scale(0.25, 0.25);
336
+ }
337
+
338
+ &.checked, &[checked="checked"] {
339
+ border-color: colors.$sd-colour-interactive;
340
+ background: transparent;
341
+
342
+ &::after {
343
+ opacity: 1;
344
+ transform: scale(1, 1);
345
+ }
346
+
347
+ &:hover {
348
+ background: transparent;
349
+ cursor: default;
350
+ }
351
+ }
352
+ }
353
+
354
+ .sd-radio-new--disabled, .sd-radio-new[disabled="disabled"] {
355
+ opacity: 0.40;
356
+ cursor: not-allowed !important;
357
+
358
+ &:hover {
359
+ color: $checkButtonTextColor;
360
+ border-color: $checkButtonBorderColor;
361
+ box-shadow: none;
362
+ }
363
+ }
364
+
365
+ .sd-check-button {
366
+ padding-inline: var(--space--1-5);
367
+ line-height: 1;
368
+ border: 1px solid $checkButtonBorderColor;
369
+ border-radius: $checkButtonBorderRadius;
370
+ transition: all 0.2s ease-in-out;
371
+ display: flex;
372
+ align-items: center;
373
+ justify-content: center;
374
+ height: dimensions.$sd-base-increment * 4;
375
+ color: var(--color-text);
376
+ cursor: pointer;
377
+
378
+ .sd-check-button__text-label {
379
+ display: flex;
380
+ margin:0;
381
+ text-align: center;
382
+ cursor: pointer;
383
+ padding: 0;
384
+ padding-block-start: 2px;
385
+ padding-block-end: 2px;
386
+ opacity: 0.8;
387
+ transition: opacity 0.2s ease-in-out;
388
+ }
389
+
390
+ [class^="icon-"], [class*=" icon-"] {
391
+ color: currentColor;
392
+ }
393
+
394
+ i + .sd-check-button__text-label {
395
+ margin-inline-start: var(--space--1);
396
+ }
397
+
398
+ &:hover {
399
+ .sd-check-button__text-label {
400
+ opacity: 1;
401
+ border-color: $checkButtonBorderColorHover;
402
+ box-shadow: 0 1px 4px 0 hsla(0, 0%, 0%, 0.16);
403
+ color: var(--color-text);
404
+ }
405
+ }
406
+
407
+ &.checked, &[checked="checked"] {
408
+ background-color: var(--sd-colour-interactive--active);
409
+ border-color: var(--sd-colour-interactive--active);
410
+ border-top-color: var(--sd-colour-interactive--darken-20);
411
+ box-shadow: inset 0 2px 0 0 hsla(0, 0%, 0%, 0.2);
412
+ color: colors.$white;
413
+
414
+ .sd-check-button__text-label {
415
+ opacity: 1;
416
+ }
417
+
418
+ &:hover {
419
+ color: colors.$white;
420
+ border-color: var(--sd-colour-interactive--active);
421
+ background-color: var(--sd-colour-interactive--hover);
422
+ box-shadow: inset 0 2px 0 0 hsla(0, 0%, 0%, 0.2);
423
+ }
424
+ }
425
+
426
+ .sd-label--disabled {
427
+ opacity: 1 !important;
428
+ cursor: not-allowed !important;
429
+ }
430
+ }
431
+
432
+ .sd-check-button__group {
433
+ display: flex;
434
+ flex-direction: row;
435
+ flex-wrap: wrap;
436
+ align-items: center;
437
+ gap: dimensions.$sd-base-increment * 1;
438
+ flex: 1 0;
439
+
440
+ &.sd-check-button__group--padded {
441
+ margin-inline-start: dimensions.$sd-base-increment * 1.5;
442
+ margin-inline-end: dimensions.$sd-base-increment * 1.5;
443
+ }
444
+
445
+ &.sd-check-button__group--compact {
446
+ gap: dimensions.$sd-base-increment * 0.5;
447
+ }
448
+
449
+ &.sd-check-button__group--no-wrap {
450
+ flex-wrap: nowrap;
451
+ }
452
+ }
453
+
454
+ .sd-check-button__group--left, .sd-check-button__group--start {
455
+ margin-inline-end: auto;
456
+ justify-content: flex-start;
457
+ }
458
+
459
+ .sd-check-button__group--right, .sd-check-button__group--end {
460
+ margin-inline-start: auto;
461
+ justify-content: flex-end;
462
+ }
463
+
464
+ .sd-check-button__group--vertical {
465
+ flex-direction: column;
466
+ align-items: flex-start;
467
+ .sd-check-button.sd-check-button--native {
468
+ align-self: stretch;
469
+ .sd-check-button__text-label {
470
+ text-align: left;
471
+ justify-content: flex-start;
472
+ }
473
+ }
474
+ }
475
+
476
+ .sd-check-button__group--center {
477
+ margin-inline-start: auto;
478
+ margin-inline-end: auto;
479
+ justify-content: center;
480
+ }
481
+
482
+ .sd-check-button__group--inline {
483
+ margin-inline-start: 0;
484
+ margin-inline-end: 0;
485
+ }
486
+
487
+ .sd-check-button__group--grid {
488
+ flex: 1 1 0;
489
+ display: grid;
490
+ grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
491
+ grid-gap: dimensions.$sd-base-increment;
492
+ align-self: stretch;
493
+
494
+ &.sd-check-button__group--compact {
495
+ grid-gap: math.div(dimensions.$sd-base-increment, 2);
496
+ }
497
+ }
498
+
499
+ .sd-check-new__wrapper {
500
+ display: inline-flex;
501
+ flex-direction: row;
502
+ align-items: center;
503
+ user-select: none;
504
+ position: relative;
505
+
506
+ label {
507
+ line-height: 100%;
508
+ margin: 0;
509
+ }
510
+
511
+ .sd-check-new + label,
512
+ .sd-radio-new + label {
513
+ margin-inline-start: var(--space--1);
514
+ font-size: var(--text-size-small);
515
+ }
516
+
517
+ .sd-check-new + label:empty,
518
+ .sd-radio-new + label:empty {
519
+ margin: 0 !important;
520
+ }
521
+
522
+ .sd-label--disabled {
523
+ opacity: 0.40;
524
+ }
525
+
526
+ &[label-position="left"], &[label-position="start"] {
527
+ label {
528
+ margin-inline-end: dimensions.$sd-base-increment;
529
+ margin-inline-start: 0;
530
+
531
+ &:empty {
532
+ margin: 0 !important;
533
+ }
534
+ }
535
+
536
+ .sd-check-new__input {
537
+ inset-inline-start: auto;
538
+ inset-inline-end: 0;
539
+ }
540
+
541
+ .sd-check-new, .sd-radio-new {
542
+ order: 2;
543
+ }
544
+ }
545
+
546
+ input:hover {
547
+ & ~ .sd-check-new,
548
+ & ~ .sd-radio-new {
549
+ border-color: var(--color-checkbox-border-hover);
550
+ }
551
+ }
552
+
553
+ input:checked {
554
+ & ~ .sd-check-new,
555
+ & ~ .sd-radio-new {
556
+ border-color: colors.$sd-colour-interactive;
557
+ background: colors.$sd-colour-interactive;
558
+
559
+ &::after {
560
+ opacity: 1;
561
+ transform: scale(1, 1);
562
+ }
563
+ }
564
+
565
+ & ~ .sd-radio-new {
566
+ background: transparent;
567
+ }
568
+
569
+ & ~ label {
570
+ color: colors.$sd-colour-interactive;
571
+ }
572
+ }
573
+
574
+ input:focus {
575
+ & ~ .sd-check-new,
576
+ & ~ .sd-radio-new {
577
+ box-shadow: 0 0 0 3px colors.$sd-colour--focus-shadow;
578
+ }
579
+ }
580
+
581
+ input:disabled {
582
+ cursor: not-allowed;
583
+
584
+ & ~ label {
585
+ opacity: 0.6;
586
+ }
587
+
588
+ & ~ .sd-check-new,
589
+ & ~ .sd-radio-new {
590
+ opacity: 0.6;
591
+ }
592
+
593
+ &:hover {
594
+ & ~ .sd-check-new,
595
+ & ~ .sd-radio-new {
596
+ border-color: var(--color-checkbox-border);
597
+ }
598
+ }
599
+ }
600
+
601
+ .sd-check-new__input {
602
+ inset-block-start: 0;
603
+ inset-inline-start: 0;
604
+ width: 16px;
605
+ cursor: inherit;
606
+ height: 16px;
607
+ margin: 0;
608
+ opacity: 0;
609
+ padding: 0;
610
+ z-index: 1;
611
+ position: absolute;
612
+ cursor: pointer;
613
+ }
614
+ }
615
+ .sd-check-new, .sd-radio-new {
616
+ pointer-events: none;
617
+ z-index: 0;
618
+ }
619
+
620
+ .sd-check__group-new {
621
+ display: flex;
622
+ flex-direction: row;
623
+ align-items: center;
624
+ gap: dimensions.$sd-base-increment * 3;
625
+ }
626
+
627
+ .sd-check__group-new--vertical {
628
+ gap: dimensions.$sd-base-increment * 2;
629
+ flex-direction: column;
630
+ align-items: flex-start;
631
+ }
632
+
633
+ .sd-check-button {
634
+ &.sd-check-button--native {
635
+ position: relative;
636
+ padding: 0;
637
+ border: none;
638
+ box-shadow: none !important;
639
+ background: transparent;
640
+ overflow: visible;
641
+
642
+ .sd-check-button__text-label {
643
+ padding-inline-start: 1.2rem;
644
+ padding-inline-end: 1.2rem;
645
+ line-height: 1;
646
+ border: 1px solid rgba(140, 140, 140, 0.5);
647
+ border-radius: $checkButtonBorderRadius;
648
+ transition: all 0.2s ease-in-out;
649
+ display: flex;
650
+ align-items: center;
651
+ justify-content: center;
652
+ height: 3.2rem;
653
+ color: inherit;
654
+ cursor: pointer;
655
+ width: 100%;
656
+ white-space: nowrap;
657
+
658
+ .sd-check-button__text-label-inner {
659
+ user-select: none;
660
+ display: inline-block;
661
+ }
662
+
663
+ i + .sd-check-button__text-label-inner {
664
+ margin-inline-start: dimensions.$sd-base-increment;
665
+ }
666
+ }
667
+ }
668
+
669
+ .sd-check-button__input {
670
+ position: absolute;
671
+ inset-block-start: 0;
672
+ inset-inline-start: 0;
673
+ opacity: 0;
674
+ pointer-events: none;
675
+ height:100%;
676
+ width: 100%;
677
+ padding: 0;
678
+ border: 0;
679
+ overflow: hidden;
680
+ outline: none !important;
681
+ z-index: 1;
682
+ }
683
+
684
+ .sd-check-button__input:checked {
685
+ & ~ label {
686
+ opacity: 1;
687
+ color: colors.$white;
688
+ background-color: var(--sd-colour-interactive);
689
+ border-color: var(--sd-colour-interactive);
690
+ border-top-color: var(--sd-colour-interactive--darken-20);
691
+ box-shadow: inset 0 2px 0 0 rgba(0, 0, 0, 0.2);
692
+ }
693
+ }
694
+ .sd-check-button__input:disabled {
695
+ & ~ label {
696
+ opacity: 0.5;
697
+ cursor: not-allowed;
698
+ box-shadow: none !important;
699
+ }
700
+ }
701
+ &:focus-within {
702
+ .sd-check-button__text-label {
703
+ box-shadow: 0 0 0 3px colors.$sd-colour--focus-shadow;
704
+ }
705
+
706
+ .sd-check-button__input:checked {
707
+ & ~ label {
708
+ box-shadow: inset 0 2px 0 0 rgba(0, 0, 0, 0.2), 0 0 0 3px colors.$sd-colour--focus-shadow;
709
+ }
710
+ }
711
+
712
+ }
713
+ }
714
+
715
+ // ============================================================================
716
+ // END NEW CHECKBOX & RADIO
717
+ // ============================================================================
718
+
719
+ // TOGGLE BUTTON
720
+ // use of this will be discontinued. It is here just to support older components in
721
+ // Superdeks untill they are refactored
722
+
723
+ .toggle-button {
724
+ padding-inline: var(--space--1-5);
725
+ @include mixins.text-overflow;
726
+ line-height: 1;
727
+ border: 1px solid $checkButtonBorderColor;
728
+ border-radius: $checkButtonBorderRadius;
729
+ transition: all 0.2s ease-in-out;
730
+ display: inline-flex;
731
+ align-items: center;
732
+ justify-content: center;
733
+ gap: 8px;
734
+ height: dimensions.$sd-base-increment * 4;
735
+ color: var(--color-text);
736
+ cursor: pointer;
737
+ text-decoration: none;
738
+ font-size: 1.2rem;
739
+ background: transparent;
740
+ transition: all 0.2s ease-out;
741
+
742
+ [class^="icon-"],
743
+ [class*=" icon-"],
744
+ .toggle-button__icon {
745
+ color: currentColor;
746
+ }
747
+
748
+ &:hover {
749
+ border-color: $checkButtonBorderColorHover;
750
+ box-shadow: 0 1px 4px 0 hsla(0, 0%, 0%, 0.16);
751
+ color: var(--color-text);
752
+ text-decoration: none !important;
753
+ }
754
+
755
+ &.toggle-button--active {
756
+ background-color: var(--sd-colour-interactive--active);
757
+ border-color: var(--sd-colour-interactive--active);
758
+ border-top-color: var(--sd-colour-interactive--darken-20);
759
+ box-shadow: inset 0 2px 0 0 hsla(0, 0%, 0%, 0.2);
760
+ color: colors.$white;
761
+
762
+ &:hover {
763
+ color: colors.$white;
764
+ border-color: var(--sd-colour-interactive--active);
765
+ background-color: var(--sd-colour-interactive--hover);
766
+ box-shadow: inset 0 2px 0 0 hsla(0, 0%, 0%, 0.2);
767
+ }
768
+ }
769
+ }
770
+