@stackoverflow/stacks 1.9.0 → 1.9.1

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 (132) hide show
  1. package/README.md +161 -153
  2. package/dist/components/table/table.d.ts +26 -4
  3. package/dist/css/stacks.css +21 -6
  4. package/dist/css/stacks.min.css +1 -1
  5. package/dist/js/stacks.js +93 -64
  6. package/dist/js/stacks.min.js +1 -1
  7. package/lib/atomic/border.less +397 -397
  8. package/lib/atomic/color.less +210 -210
  9. package/lib/atomic/flex.less +426 -426
  10. package/lib/atomic/gap.less +44 -44
  11. package/lib/atomic/grid.less +139 -139
  12. package/lib/atomic/misc.less +343 -343
  13. package/lib/atomic/spacing.less +342 -342
  14. package/lib/atomic/typography.less +267 -267
  15. package/lib/atomic/width-height.less +194 -194
  16. package/lib/base/body.less +44 -44
  17. package/lib/base/configuration-static.less +61 -61
  18. package/lib/base/fieldset.less +5 -5
  19. package/lib/base/icon.less +11 -11
  20. package/lib/base/internal.less +220 -220
  21. package/lib/base/reset-meyer.less +64 -64
  22. package/lib/base/reset-normalize.less +449 -449
  23. package/lib/base/reset.less +20 -20
  24. package/lib/components/activity-indicator/activity-indicator.a11y.test.ts +21 -21
  25. package/lib/components/activity-indicator/activity-indicator.less +40 -40
  26. package/lib/components/activity-indicator/activity-indicator.visual.test.ts +23 -23
  27. package/lib/components/anchor/anchor.less +61 -61
  28. package/lib/components/avatar/avatar.a11y.test.ts +36 -36
  29. package/lib/components/avatar/avatar.less +108 -108
  30. package/lib/components/avatar/avatar.visual.test.ts +54 -54
  31. package/lib/components/award-bling/award-bling.a11y.test.ts +17 -0
  32. package/lib/components/award-bling/award-bling.less +31 -31
  33. package/lib/components/award-bling/award-bling.visual.test.ts +26 -0
  34. package/lib/components/badge/badge.less +251 -251
  35. package/lib/components/banner/banner.a11y.test.ts +37 -0
  36. package/lib/components/banner/banner.less +51 -51
  37. package/lib/components/banner/banner.test.ts +73 -77
  38. package/lib/components/banner/banner.ts +149 -149
  39. package/lib/components/banner/banner.visual.test.ts +37 -36
  40. package/lib/components/block-link/block-link.a11y.test.ts +68 -0
  41. package/lib/components/block-link/block-link.less +80 -80
  42. package/lib/components/block-link/block-link.visual.test.ts +61 -0
  43. package/lib/components/breadcrumbs/breadcrumbs.a11y.test.ts +37 -0
  44. package/lib/components/breadcrumbs/breadcrumbs.less +41 -41
  45. package/lib/components/breadcrumbs/breadcrumbs.visual.test.ts +37 -0
  46. package/lib/components/button/button.a11y.test.ts +32 -32
  47. package/lib/components/button/button.less +502 -502
  48. package/lib/components/button/button.visual.test.ts +52 -52
  49. package/lib/components/button-group/button-group.less +83 -83
  50. package/lib/components/card/card.a11y.test.ts +13 -0
  51. package/lib/components/card/card.less +29 -29
  52. package/lib/components/card/card.visual.test.ts +54 -0
  53. package/lib/components/check-control/check-control.less +17 -17
  54. package/lib/components/check-group/check-group.less +19 -19
  55. package/lib/components/checkbox_radio/checkbox_radio.less +158 -158
  56. package/lib/components/code-block/code-block.less +116 -116
  57. package/lib/components/description/description.less +9 -9
  58. package/lib/components/empty-state/empty-state.less +16 -16
  59. package/lib/components/expandable/expandable.less +118 -118
  60. package/lib/components/expandable/expandable.test.ts +51 -53
  61. package/lib/components/expandable/expandable.ts +238 -238
  62. package/lib/components/input-fill/input-fill.less +35 -35
  63. package/lib/components/input-icon/input-icon.less +45 -45
  64. package/lib/components/input-message/input-message.less +48 -48
  65. package/lib/components/input_textarea/input_textarea.less +166 -166
  66. package/lib/components/label/label.less +111 -111
  67. package/lib/components/link/link.less +119 -119
  68. package/lib/components/link-preview/link-preview.less +139 -139
  69. package/lib/components/menu/menu.less +41 -41
  70. package/lib/components/modal/modal.less +113 -113
  71. package/lib/components/modal/modal.ts +379 -379
  72. package/lib/components/navigation/navigation.less +134 -134
  73. package/lib/components/navigation/navigation.ts +128 -128
  74. package/lib/components/notice/notice.less +203 -203
  75. package/lib/components/page-title/page-title.less +51 -51
  76. package/lib/components/pagination/pagination.less +52 -52
  77. package/lib/components/popover/popover.less +148 -148
  78. package/lib/components/popover/popover.ts +651 -651
  79. package/lib/components/popover/tooltip.test.ts +62 -66
  80. package/lib/components/popover/tooltip.ts +343 -343
  81. package/lib/components/popover/tooltip.visual.test.ts +31 -31
  82. package/lib/components/post-summary/post-summary.less +415 -415
  83. package/lib/components/progress-bar/progress-bar.less +291 -291
  84. package/lib/components/prose/prose.less +452 -452
  85. package/lib/components/select/select.less +148 -148
  86. package/lib/components/sidebar-widget/sidebar-widget.less +257 -258
  87. package/lib/components/spinner/spinner.less +103 -103
  88. package/lib/components/table/table.less +307 -292
  89. package/lib/components/table/table.test.ts +366 -0
  90. package/lib/components/table/table.ts +296 -263
  91. package/lib/components/table-container/table-container.less +4 -4
  92. package/lib/components/tag/tag.less +213 -213
  93. package/lib/components/toast/toast.less +35 -35
  94. package/lib/components/toast/toast.test.ts +63 -67
  95. package/lib/components/toast/toast.ts +357 -357
  96. package/lib/components/toast/toast.visual.test.ts +27 -27
  97. package/lib/components/toggle-switch/toggle-switch.less +110 -110
  98. package/lib/components/topbar/topbar.less +436 -435
  99. package/lib/components/uploader/uploader.less +195 -195
  100. package/lib/components/uploader/uploader.ts +205 -205
  101. package/lib/components/user-card/user-card.less +129 -129
  102. package/lib/controllers.ts +33 -33
  103. package/lib/exports/constants-colors.less +1112 -1111
  104. package/lib/exports/constants-helpers.less +108 -108
  105. package/lib/exports/constants-type.less +153 -153
  106. package/lib/exports/exports.less +15 -15
  107. package/lib/exports/mixins.less +299 -299
  108. package/lib/index.ts +32 -32
  109. package/lib/input-utils.less +44 -44
  110. package/lib/stacks-dynamic.less +24 -24
  111. package/lib/stacks-static.less +93 -93
  112. package/lib/stacks.less +13 -13
  113. package/lib/stacks.ts +113 -113
  114. package/lib/test/open-wc-testing-patch.d.ts +26 -0
  115. package/lib/test/test-utils.ts +466 -444
  116. package/lib/tsconfig.build.json +4 -0
  117. package/lib/tsconfig.json +16 -13
  118. package/package.json +106 -105
  119. package/dist/components/activity-indicator/activity-indicator.a11y.test.d.ts +0 -1
  120. package/dist/components/activity-indicator/activity-indicator.visual.test.d.ts +0 -1
  121. package/dist/components/avatar/avatar.a11y.test.d.ts +0 -1
  122. package/dist/components/avatar/avatar.visual.test.d.ts +0 -1
  123. package/dist/components/banner/banner.test.d.ts +0 -1
  124. package/dist/components/banner/banner.visual.test.d.ts +0 -1
  125. package/dist/components/button/button.a11y.test.d.ts +0 -1
  126. package/dist/components/button/button.visual.test.d.ts +0 -1
  127. package/dist/components/expandable/expandable.test.d.ts +0 -1
  128. package/dist/components/popover/tooltip.test.d.ts +0 -1
  129. package/dist/components/popover/tooltip.visual.test.d.ts +0 -1
  130. package/dist/components/toast/toast.test.d.ts +0 -1
  131. package/dist/components/toast/toast.visual.test.d.ts +0 -1
  132. package/dist/test/test-utils.d.ts +0 -136
@@ -1,503 +1,503 @@
1
- .s-btn {
2
- // BASE COMPONENT-SPECIFIC CUSTOM PROPERTIES
3
- --_bu-baw: var(--su-static1);
4
- --_bu-bc: transparent;
5
- --_bu-bg: transparent;
6
- --_bu-br: var(--br-sm);
7
- --_bu-bs: none;
8
- --_bu-fc: var(--theme-button-color);
9
- --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring);
10
- --_bu-fs: var(--fs-body1);
11
- --_bu-p: 0.8em;
12
- // STATE AND INTERACTION CUSTOM PROPERTIES
13
- --_bu-bc-selected: transparent;
14
- --_bu-bg-active: var(--theme-button-active-background-color);
15
- --_bu-bg-hover: var(--theme-button-hover-background-color);
16
- --_bu-bg-selected: var(--theme-button-selected-background-color);
17
- --_bu-fc-active: var(--theme-button-hover-color); // Note: hover color used here intentionally
18
- --_bu-fc-hover: var(--theme-button-hover-color);
19
- --_bu-fc-selected: var(--theme-button-selected-color);
20
- // Filled
21
- --_bu-filled-bc: var(--theme-button-filled-border-color);
22
- --_bu-filled-bc-active: var(--theme-button-filled-active-border-color);
23
- --_bu-filled-bg-hover: var(--theme-button-filled-hover-background-color);
24
- --_bu-filled-bc-selected: var(--theme-button-filled-selected-border-color);
25
- --_bu-filled-bg: var(--theme-button-filled-background-color);
26
- --_bu-filled-bg-active: var(--theme-button-filled-active-background-color);
27
- --_bu-filled-bg-selected: var(--theme-button-filled-selected-background-color);
28
- --_bu-filled-bs: inset 0 var(--su-static1) 0 0 hsla(0, 0, 100%, 0.7);
29
- --_bu-filled-fc: var(--theme-button-filled-color);
30
- --_bu-filled-fc-active: var(--theme-button-filled-hover-color); // Note: hover color used here intentionally
31
- --_bu-filled-fc-hover: var(--theme-button-filled-hover-color);
32
- --_bu-filled-fc-selected: var(--theme-button-filled-selected-color);
33
- // Outlined
34
- --_bu-outlined-bc: var(--theme-button-outlined-border-color);
35
- --_bu-outlined-bg: var(--theme-button-outlined-background-color);
36
- --_bu-outlined-bc-selected: var(--theme-button-outlined-selected-border-color);
37
- --_bu-outlined-bg-selected: var(--theme-button-selected-background-color);
38
- --_bu-outlined-fc-selected: var(--theme-button-selected-color);
39
- // CHILD COMPONENT CUSTOM PROPERTIES
40
- --_bu-badge-o: 0.5;
41
- --_bu-dropdown-bw: var(--su-static4);
42
- --_bu-number-fc: var(--white);
43
- --_bu-number-fc-selected: var(--_bu-number-fc);
44
-
45
- // CONTEXTUAL STYLES
46
- .dark-mode({
47
- --_bu-bs: none;
48
- --_bu-filled-bs: var(--_bu-bs);
49
- });
50
-
51
- .highcontrast-mode({
52
- --_bu-bc: currentColor;
53
- --_bu-filled-bc: var(--_bu-bc);
54
- --_bu-outlined-bc: var(--_bu-bc);
55
- --_bu-bc-selected: var(--_bu-bc);
56
- --_bu-badge-o: 0.8;
57
- });
58
-
59
- // STATES
60
- fieldset[disabled] &,
61
- &[disabled],
62
- &[aria-disabled="true"] {
63
- --_bu-bs: none !important;
64
- --_bu-filled-bs: var(--_bu-bs);
65
- opacity: var(--_o-disabled-static);
66
- pointer-events: none;
67
- text-decoration: none;
68
- }
69
-
70
- button &,
71
- button[type="submit"] &,
72
- button[type="reset"] & {
73
- -webkit-appearance: button; // [1]
74
- }
75
-
76
- &.grid {
77
- display: flex; // Override &&__danger buttons having inline-block by default
78
- }
79
-
80
- &.is-loading {
81
- .svg-icon:first-child {
82
- margin-left: -23px;
83
- opacity: 0; // [2]
84
- }
85
-
86
- padding-left: 2.2em;
87
- }
88
-
89
- &.is-selected,
90
- .s-btn-group.s-btn-group--radio &--radio:checked + & {
91
- background-color: var(--_bu-bg-selected);
92
- border-color: var(--_bu-bc-selected);
93
- color: var(--_bu-fc-selected);
94
-
95
- .s-btn--number {
96
- color: var(--_bu-number-fc-selected);
97
- }
98
-
99
- &.s-btn__filled { // this needs to live here to adapt to radio button-group
100
- border-color: var(--_bu-filled-bc-selected);
101
- background-color: var(--_bu-filled-bg-selected);
102
- color: var(--_bu-filled-fc-selected);
103
- }
104
- &.s-btn__outlined { // this needs to live here to adapt to radio button-group
105
- border-color: var(--_bu-outlined-bc-selected);
106
- background-color: var(--_bu-outlined-bg-selected);
107
- color: var(--_bu-outlined-fc-selected);
108
-
109
- &.s-btn__muted {
110
- .highcontrast-mode({
111
- --_bu-outlined-bc-selected: var(--_bu-filled-bc-selected);
112
- --_bu-outlined-bg-selected: var(--_bu-filled-bg-selected);
113
- --_bu-outlined-fc-selected: var(--_bu-filled-fc-selected);
114
- --_bu-number-fc-selected: var(--_bu-filled-bg-selected);
115
- });
116
- }
117
- }
118
- }
119
-
120
- &.is-selected:not(:focus),
121
- .s-btn-group.s-btn-group--radio &--radio:checked:not(:focus) + & {
122
- box-shadow: none;
123
- }
124
-
125
- // MODIFIERS
126
- &&__filled {
127
- border-color: var(--_bu-filled-bc);
128
- background-color: var(--_bu-filled-bg);
129
- box-shadow: var(--_bu-filled-bs);
130
- color: var(--_bu-filled-fc);
131
- }
132
-
133
- &&__outlined {
134
- border-color: var(--_bu-outlined-bc);
135
- background-color: var(--_bu-outlined-bg);
136
- }
137
-
138
- // Resets
139
- &&__link,
140
- &&__unset {
141
- &:focus,
142
- &:focus-visible {
143
- outline-style: auto;
144
- }
145
- }
146
-
147
- &&__link {
148
- --_bu-baw: 0;
149
- --_bu-br: 0;
150
- --_bu-bs: none;
151
- --_bu-filled-bs: var(--_bu-bs);
152
- --_bu-focus-ring: none;
153
- --_bu-p: 0;
154
-
155
- &,
156
- &:hover,
157
- &:active,
158
- &:focus,
159
- &[disabled],
160
- &[aria-disabled="true"] {
161
- --_bu-bg: none;
162
- }
163
-
164
- &.s-btn__dropdown {
165
- padding-right: 0.9em;
166
- }
167
-
168
- .s-link();
169
- display: inline;
170
- font: inherit;
171
- outline: revert;
172
- text-align: inherit;
173
- }
174
-
175
- &&__unset {
176
- &,
177
- &:hover,
178
- &:active,
179
- &:focus {
180
- --_bu-baw: 0;
181
- --_bu-bg: none;
182
- --_bu-br: 0;
183
- --_bu-bs: none;
184
- --_bu-filled-bs: var(--_bu-bs);
185
- --_bu-fc: unset;
186
- --_bu-focus-ring: none;
187
- --_bu-p: 0;
188
-
189
- cursor: default;
190
- font: unset;
191
- user-select: auto;
192
- }
193
-
194
- outline: initial;
195
- }
196
-
197
- // Pseudo-elements and child-based modifiers
198
- &&__dropdown {
199
- &:after {
200
- border-color: currentColor transparent;
201
- border-style: solid;
202
- border-width: var(--_bu-dropdown-bw);
203
- border-bottom-width: 0;
204
- content: "";
205
- pointer-events: none;
206
- position: absolute;
207
- right: var(--_bu-p);
208
- top: calc(50% - var(--su-static2));
209
- z-index: var(--zi-active);
210
- }
211
-
212
- padding-right: calc(var(--_bu-p) * 2.5);
213
- }
214
-
215
- &&__icon {
216
- .svg-icon {
217
- vertical-align: baseline;
218
- margin-top: -0.3em; // [3]
219
- margin-bottom: -0.3em; // [3]
220
- transition: opacity 200ms var(--te-smooth); // Animate the transition to .is-loading
221
- }
222
- }
223
-
224
- // Size
225
- &&__xs {
226
- .size-styles(xs; bu; @styles: fs);
227
- --_bu-dropdown-bw: calc(var(--su-static4) - var(--su-static1));
228
- --_bu-p: 0.6em;
229
- }
230
-
231
- &&__sm {
232
- .size-styles(sm; bu; @styles: fs);
233
- }
234
-
235
- &&__md {
236
- .size-styles(md; bu; @styles: br, fs);
237
- --_bu-p: 0.7em;
238
- }
239
-
240
- // VARIANTS
241
- &&__danger,
242
- &&__muted {
243
- .highcontrast-mode({
244
- --_bu-filled-bc: transparent;
245
- });
246
- }
247
-
248
- &&__danger {
249
- --_bu-bg-active: var(--red-100);
250
- --_bu-bg-hover: var(--red-050);
251
- --_bu-bg-selected: var(--red-200);
252
- --_bu-fc: var(--red-600);
253
- --_bu-fc-active: var(--_bu-fc);
254
- --_bu-fc-hover: var(--red-700);
255
- --_bu-fc-selected: var(--red-900);
256
- --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-error);
257
- --_bu-filled-bc: transparent;
258
- --_bu-filled-bc-selected: var(--_bu-filled-bc);
259
- --_bu-filled-bg: var(--red-500);
260
- --_bu-filled-bg-active: var(--red-700);
261
- --_bu-filled-bg-hover: var(--red-600);
262
- --_bu-filled-bg-selected: var(--red-800);
263
- --_bu-filled-bs: inset 0 var(--su-static1) 0 0 hsla(0, 0%, 100%, 0.4);
264
- --_bu-filled-fc: var(--white);
265
- --_bu-filled-fc-active: var(--_bu-filled-fc);
266
- --_bu-filled-fc-hover: var(--_bu-filled-fc);
267
- --_bu-filled-fc-selected: var(--_bu-filled-fc);
268
- --_bu-outlined-bc: var(--red-500);
269
- --_bu-outlined-bc-selected: var(--red-700);
270
- --_bu-outlined-bg-selected: var(--_bu-bg-selected);
271
- --_bu-outlined-fc-selected: var(--_bu-fc-selected);
272
-
273
- &.s-btn__filled {
274
- --_bu-number-fc: var(--black);
275
-
276
- .dark-mode({
277
- --_bu-filled-fc: var(--black);
278
- --_bu-filled-fc-selected: var(--white);
279
- --_bu-number-fc: var(--white);
280
- --_bu-number-fc-selected: var(--black);
281
- });
282
-
283
- .highcontrast-dark-mode({
284
- --_bu-filled-fc: var(--white);
285
- --_bu-number-fc: var(--black);
286
- --_bu-number-fc-selected: var(--black);
287
- });
288
- }
289
- }
290
-
291
- &&__muted {
292
- --_bu-bg-active: var(--black-050);
293
- --_bu-bg-hover: var(--black-025);
294
- --_bu-bg-selected: var(--black-075);
295
- --_bu-fc: var(--black-500);
296
- --_bu-fc-active: var(--_bu-fc);
297
- --_bu-fc-hover: var(--black-600);
298
- --_bu-fc-selected: var(--black-700);
299
- --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-muted);
300
- --_bu-filled-bc: transparent;
301
- --_bu-filled-bc-selected: var(--_bu-filled-bc);
302
- --_bu-filled-bg: var(--black-100);
303
- --_bu-filled-bg-active: var(--black-200);
304
- --_bu-filled-bg-hover: var(--black-150);
305
- --_bu-filled-bg-selected: var(--black-350);
306
- --_bu-filled-bs: inset 0 var(--su-static1) 0 0 hsla(0, 0%, 100%, 0.4);
307
- --_bu-filled-fc: var(--black-700);
308
- --_bu-filled-fc-active: var(--_bu-filled-fc);
309
- --_bu-filled-fc-hover: var(--_bu-filled-fc);
310
- --_bu-filled-fc-selected: var(--black-800);
311
- --_bu-outlined-bc: var(--black-300);
312
- --_bu-outlined-bc-selected: var(--black-400);
313
- --_bu-outlined-bg-selected: var(--_bu-bg-selected);
314
- --_bu-outlined-fc-selected: var(--_bu-fc-selected);
315
-
316
- .highcontrast-mode({
317
- --_bu-filled-bg: var(--black-400);
318
- --_bu-filled-bg-active: var(--black-600);
319
- --_bu-filled-bg-hover: var(--black-500);
320
- --_bu-filled-bg-selected: var(--black-700);
321
- --_bu-filled-fc: var(--white);
322
- --_bu-filled-fc-selected: var(--_bu-filled-fc);
323
-
324
- &.s-btn__filled {
325
- --_bu-number-fc: var(--black);
326
- }
327
- });
328
- }
329
-
330
- &&__primary {
331
- --_bu-bg: var(--theme-button-primary-background-color);
332
- --_bu-bg-active: var(--theme-button-primary-active-background-color);
333
- --_bu-bg-hover: var(--theme-button-primary-hover-background-color);
334
- --_bu-bg-selected: var(--theme-button-primary-selected-background-color);
335
- --_bu-bs: inset 0 1px 0 0 hsla(0, 0%, 100%, 0.4);
336
- --_bu-fc: var(--theme-button-primary-color);
337
- --_bu-fc-active: var(--theme-button-primary-hover-color);
338
- --_bu-fc-hover: var(--theme-button-primary-hover-color);
339
- --_bu-fc-selected: var(--theme-button-primary-selected-color);
340
- --_bu-number-fc: var(--theme-button-primary-number-color);
341
-
342
- .dark-mode({
343
- --_bu-bg: var(--theme-secondary-300);
344
- --_bu-bg-active: var(--theme-secondary-400);
345
- --_bu-bg-hover: var(--theme-secondary-350);
346
- --_bu-fc: var(--black);
347
- --_bu-fc-active: var(--_bu-fc);
348
- --_bu-fc-hover: var(--_bu-fc);
349
- --_bu-fc-selected: var(--white);
350
- --_bu-number-fc: var(--white);
351
- --_bu-number-fc-selected: var(--black);
352
- });
353
-
354
- .highcontrast-mode({
355
- --_bu-bc: transparent;
356
- });
357
-
358
- .highcontrast-dark-mode({
359
- --_bu-bg: var(--theme-secondary-400);
360
- --_bu-bg-active: var(--theme-secondary-600);
361
- --_bu-bg-hover: var(--theme-secondary-500);
362
- --_bu-fc: var(--white);
363
- --_bu-number-fc: var(--black);
364
- });
365
- }
366
-
367
- // Social
368
- &&__facebook,
369
- &&__github {
370
- .highcontrast-mode({
371
- --_bu-bc: transparent;
372
- });
373
- }
374
-
375
- &&__facebook {
376
- @_fb-brand: #385499;
377
- --_bu-bc: transparent;
378
- --_bu-bg: @_fb-brand;
379
- --_bu-bg-active: darken(@_fb-brand, 10%);
380
- --_bu-bg-hover: darken(@_fb-brand, 5%);
381
- --_bu-fc: #fff;
382
- --_bu-fc-active: var(--_bu-fc);
383
- --_bu-fc-hover: var(--_bu-fc);
384
- --_bu-hc-bc: transparent;
385
- }
386
-
387
- &&__google {
388
- --_bu-bc: var(--bc-medium);
389
- --_bu-bg: var(--white);
390
- --_bu-bg-active: var(--black-050);
391
- --_bu-bg-hover: var(--black-025);
392
- --_bu-fc: var(--fc-medium);
393
- --_bu-fc-active: var(--fc-dark);
394
- --_bu-fc-hover: var(--black-800);
395
- --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-muted);
396
- }
397
-
398
- &&__github {
399
- --_bu-bg: var(--black-750);
400
- --_bu-bg-active: var(--black);
401
- --_bu-bg-hover: var(--black-800);
402
- --_bu-fc: var(--white);
403
- --_bu-fc-active: var(--white);
404
- --_bu-fc-hover: var(--white);
405
- --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-muted);
406
- --_bu-hc-bc: transparent;
407
- }
408
-
409
- // CHILD ELEMENTS
410
- & &--badge {
411
- opacity: var(--_bu-badge-o);
412
- display: inline-block;
413
- border-radius: var(--br-sm);
414
- padding: var(--su2) calc(var(--su4) - var(--su1));
415
- font-size: var(--fs-caption);
416
- line-height: var(--lh-xs);
417
- background-color: currentColor;
418
- }
419
-
420
- & &--number {
421
- color: var(--_bu-number-fc);
422
- }
423
-
424
- &--radio { // This lives alongside a .s-btn element. These styles are the equivelent of `.v-visible-sr`
425
- border: 0;
426
- clip-path: inset(50%);
427
- clip: rect(1px, 1px, 1px, 1px);
428
- height: 1px;
429
- margin: -1px;
430
- overflow-wrap: normal;
431
- overflow: hidden;
432
- padding: 0;
433
- position: absolute;
434
- width: 1px;
435
- }
436
-
437
- // INTERACTION
438
- &:not(.is-selected):not(&__link):not(&__unset) {
439
- &:hover, &:focus {
440
- &.s-btn__filled {
441
- background-color: var(--_bu-filled-bg-hover);
442
- color: var(--_bu-filled-fc-hover);
443
- }
444
-
445
- background-color: var(--_bu-bg-hover);
446
- color: var(--_bu-fc-hover);
447
- }
448
-
449
- &:active {
450
- &.s-btn__filled {
451
- background-color: var(--_bu-filled-bg-active);
452
- color: var(--_bu-filled-fc-active);
453
- }
454
-
455
- background-color: var(--_bu-bg-active);
456
- color: var(--_bu-fc-active);
457
- }
458
-
459
- &:visited:not(:hover):not(:focus) {
460
- &.s-btn__filled {
461
- background-color: var(--_bu-filled-bg);
462
- color: var(--_bu-filled-fc);
463
- }
464
-
465
- background-color: var(--_bu-bg);
466
- color: var(--_bu-fc);
467
- }
468
- }
469
-
470
- &:focus,
471
- &--radio:focus + & {
472
- box-shadow: var(--_bu-focus-ring);
473
- outline: none;
474
- }
475
-
476
- background-color: var(--_bu-bg);
477
- border: var(--_bu-baw) solid var(--_bu-bc);
478
- border-radius: var(--_bu-br);
479
- box-shadow: var(--_bu-bs);
480
- color: var(--_bu-fc);
481
- font-size: var(--_bu-fs);
482
- padding: var(--_bu-p);
483
-
484
- cursor: pointer;
485
- display: inline-block;
486
- font-family: inherit;
487
- font-weight: normal;
488
- line-height: var(--lh-sm);
489
- position: relative;
490
- outline: none;
491
- text-align: center;
492
- text-decoration: none;
493
- user-select: none;
494
- }
495
-
496
- // [1] Guard against the difference in configurable resets
497
- // Eric Meyer's reset does not include this, while normalize.css does
498
- // Correct the inability to style buttons in iOS and Safari.
499
- // [2] If the first thing in the button is an icon, let's hide it on loading
500
- // We only want to modify the visibility, since we still want it to have shape and keep the same layout.
501
- // [3] Most svg icons are 18px tall, but the button's line-height is 1 (13px).
502
- // This means we need to off set the margin y-axis so we don't add
1
+ .s-btn {
2
+ // BASE COMPONENT-SPECIFIC CUSTOM PROPERTIES
3
+ --_bu-baw: var(--su-static1);
4
+ --_bu-bc: transparent;
5
+ --_bu-bg: transparent;
6
+ --_bu-br: var(--br-sm);
7
+ --_bu-bs: none;
8
+ --_bu-fc: var(--theme-button-color);
9
+ --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring);
10
+ --_bu-fs: var(--fs-body1);
11
+ --_bu-p: 0.8em;
12
+ // STATE AND INTERACTION CUSTOM PROPERTIES
13
+ --_bu-bc-selected: transparent;
14
+ --_bu-bg-active: var(--theme-button-active-background-color);
15
+ --_bu-bg-hover: var(--theme-button-hover-background-color);
16
+ --_bu-bg-selected: var(--theme-button-selected-background-color);
17
+ --_bu-fc-active: var(--theme-button-hover-color); // Note: hover color used here intentionally
18
+ --_bu-fc-hover: var(--theme-button-hover-color);
19
+ --_bu-fc-selected: var(--theme-button-selected-color);
20
+ // Filled
21
+ --_bu-filled-bc: var(--theme-button-filled-border-color);
22
+ --_bu-filled-bc-active: var(--theme-button-filled-active-border-color);
23
+ --_bu-filled-bg-hover: var(--theme-button-filled-hover-background-color);
24
+ --_bu-filled-bc-selected: var(--theme-button-filled-selected-border-color);
25
+ --_bu-filled-bg: var(--theme-button-filled-background-color);
26
+ --_bu-filled-bg-active: var(--theme-button-filled-active-background-color);
27
+ --_bu-filled-bg-selected: var(--theme-button-filled-selected-background-color);
28
+ --_bu-filled-bs: inset 0 var(--su-static1) 0 0 hsla(0, 0, 100%, 0.7);
29
+ --_bu-filled-fc: var(--theme-button-filled-color);
30
+ --_bu-filled-fc-active: var(--theme-button-filled-hover-color); // Note: hover color used here intentionally
31
+ --_bu-filled-fc-hover: var(--theme-button-filled-hover-color);
32
+ --_bu-filled-fc-selected: var(--theme-button-filled-selected-color);
33
+ // Outlined
34
+ --_bu-outlined-bc: var(--theme-button-outlined-border-color);
35
+ --_bu-outlined-bg: var(--theme-button-outlined-background-color);
36
+ --_bu-outlined-bc-selected: var(--theme-button-outlined-selected-border-color);
37
+ --_bu-outlined-bg-selected: var(--theme-button-selected-background-color);
38
+ --_bu-outlined-fc-selected: var(--theme-button-selected-color);
39
+ // CHILD COMPONENT CUSTOM PROPERTIES
40
+ --_bu-badge-o: 0.5;
41
+ --_bu-dropdown-bw: var(--su-static4);
42
+ --_bu-number-fc: var(--white);
43
+ --_bu-number-fc-selected: var(--_bu-number-fc);
44
+
45
+ // CONTEXTUAL STYLES
46
+ .dark-mode({
47
+ --_bu-bs: none;
48
+ --_bu-filled-bs: var(--_bu-bs);
49
+ });
50
+
51
+ .highcontrast-mode({
52
+ --_bu-bc: currentColor;
53
+ --_bu-filled-bc: var(--_bu-bc);
54
+ --_bu-outlined-bc: var(--_bu-bc);
55
+ --_bu-bc-selected: var(--_bu-bc);
56
+ --_bu-badge-o: 0.8;
57
+ });
58
+
59
+ // STATES
60
+ fieldset[disabled] &,
61
+ &[disabled],
62
+ &[aria-disabled="true"] {
63
+ --_bu-bs: none !important;
64
+ --_bu-filled-bs: var(--_bu-bs);
65
+ opacity: var(--_o-disabled-static);
66
+ pointer-events: none;
67
+ text-decoration: none;
68
+ }
69
+
70
+ button &,
71
+ button[type="submit"] &,
72
+ button[type="reset"] & {
73
+ -webkit-appearance: button; // [1]
74
+ }
75
+
76
+ &.grid {
77
+ display: flex; // Override &&__danger buttons having inline-block by default
78
+ }
79
+
80
+ &.is-loading {
81
+ .svg-icon:first-child {
82
+ margin-left: -23px;
83
+ opacity: 0; // [2]
84
+ }
85
+
86
+ padding-left: 2.2em;
87
+ }
88
+
89
+ &.is-selected,
90
+ .s-btn-group.s-btn-group--radio &--radio:checked + & {
91
+ background-color: var(--_bu-bg-selected);
92
+ border-color: var(--_bu-bc-selected);
93
+ color: var(--_bu-fc-selected);
94
+
95
+ .s-btn--number {
96
+ color: var(--_bu-number-fc-selected);
97
+ }
98
+
99
+ &.s-btn__filled { // this needs to live here to adapt to radio button-group
100
+ border-color: var(--_bu-filled-bc-selected);
101
+ background-color: var(--_bu-filled-bg-selected);
102
+ color: var(--_bu-filled-fc-selected);
103
+ }
104
+ &.s-btn__outlined { // this needs to live here to adapt to radio button-group
105
+ border-color: var(--_bu-outlined-bc-selected);
106
+ background-color: var(--_bu-outlined-bg-selected);
107
+ color: var(--_bu-outlined-fc-selected);
108
+
109
+ &.s-btn__muted {
110
+ .highcontrast-mode({
111
+ --_bu-outlined-bc-selected: var(--_bu-filled-bc-selected);
112
+ --_bu-outlined-bg-selected: var(--_bu-filled-bg-selected);
113
+ --_bu-outlined-fc-selected: var(--_bu-filled-fc-selected);
114
+ --_bu-number-fc-selected: var(--_bu-filled-bg-selected);
115
+ });
116
+ }
117
+ }
118
+ }
119
+
120
+ &.is-selected:not(:focus),
121
+ .s-btn-group.s-btn-group--radio &--radio:checked:not(:focus) + & {
122
+ box-shadow: none;
123
+ }
124
+
125
+ // MODIFIERS
126
+ &&__filled {
127
+ border-color: var(--_bu-filled-bc);
128
+ background-color: var(--_bu-filled-bg);
129
+ box-shadow: var(--_bu-filled-bs);
130
+ color: var(--_bu-filled-fc);
131
+ }
132
+
133
+ &&__outlined {
134
+ border-color: var(--_bu-outlined-bc);
135
+ background-color: var(--_bu-outlined-bg);
136
+ }
137
+
138
+ // Resets
139
+ &&__link,
140
+ &&__unset {
141
+ &:focus,
142
+ &:focus-visible {
143
+ outline-style: auto;
144
+ }
145
+ }
146
+
147
+ &&__link {
148
+ --_bu-baw: 0;
149
+ --_bu-br: 0;
150
+ --_bu-bs: none;
151
+ --_bu-filled-bs: var(--_bu-bs);
152
+ --_bu-focus-ring: none;
153
+ --_bu-p: 0;
154
+
155
+ &,
156
+ &:hover,
157
+ &:active,
158
+ &:focus,
159
+ &[disabled],
160
+ &[aria-disabled="true"] {
161
+ --_bu-bg: none;
162
+ }
163
+
164
+ &.s-btn__dropdown {
165
+ padding-right: 0.9em;
166
+ }
167
+
168
+ .s-link();
169
+ display: inline;
170
+ font: inherit;
171
+ outline: revert;
172
+ text-align: inherit;
173
+ }
174
+
175
+ &&__unset {
176
+ &,
177
+ &:hover,
178
+ &:active,
179
+ &:focus {
180
+ --_bu-baw: 0;
181
+ --_bu-bg: none;
182
+ --_bu-br: 0;
183
+ --_bu-bs: none;
184
+ --_bu-filled-bs: var(--_bu-bs);
185
+ --_bu-fc: unset;
186
+ --_bu-focus-ring: none;
187
+ --_bu-p: 0;
188
+
189
+ cursor: default;
190
+ font: unset;
191
+ user-select: auto;
192
+ }
193
+
194
+ outline: initial;
195
+ }
196
+
197
+ // Pseudo-elements and child-based modifiers
198
+ &&__dropdown {
199
+ &:after {
200
+ border-color: currentColor transparent;
201
+ border-style: solid;
202
+ border-width: var(--_bu-dropdown-bw);
203
+ border-bottom-width: 0;
204
+ content: "";
205
+ pointer-events: none;
206
+ position: absolute;
207
+ right: var(--_bu-p);
208
+ top: calc(50% - var(--su-static2));
209
+ z-index: var(--zi-active);
210
+ }
211
+
212
+ padding-right: calc(var(--_bu-p) * 2.5);
213
+ }
214
+
215
+ &&__icon {
216
+ .svg-icon {
217
+ vertical-align: baseline;
218
+ margin-top: -0.3em; // [3]
219
+ margin-bottom: -0.3em; // [3]
220
+ transition: opacity 200ms var(--te-smooth); // Animate the transition to .is-loading
221
+ }
222
+ }
223
+
224
+ // Size
225
+ &&__xs {
226
+ .size-styles(xs; bu; @styles: fs);
227
+ --_bu-dropdown-bw: calc(var(--su-static4) - var(--su-static1));
228
+ --_bu-p: 0.6em;
229
+ }
230
+
231
+ &&__sm {
232
+ .size-styles(sm; bu; @styles: fs);
233
+ }
234
+
235
+ &&__md {
236
+ .size-styles(md; bu; @styles: br, fs);
237
+ --_bu-p: 0.7em;
238
+ }
239
+
240
+ // VARIANTS
241
+ &&__danger,
242
+ &&__muted {
243
+ .highcontrast-mode({
244
+ --_bu-filled-bc: transparent;
245
+ });
246
+ }
247
+
248
+ &&__danger {
249
+ --_bu-bg-active: var(--red-100);
250
+ --_bu-bg-hover: var(--red-050);
251
+ --_bu-bg-selected: var(--red-200);
252
+ --_bu-fc: var(--red-600);
253
+ --_bu-fc-active: var(--_bu-fc);
254
+ --_bu-fc-hover: var(--red-700);
255
+ --_bu-fc-selected: var(--red-900);
256
+ --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-error);
257
+ --_bu-filled-bc: transparent;
258
+ --_bu-filled-bc-selected: var(--_bu-filled-bc);
259
+ --_bu-filled-bg: var(--red-500);
260
+ --_bu-filled-bg-active: var(--red-700);
261
+ --_bu-filled-bg-hover: var(--red-600);
262
+ --_bu-filled-bg-selected: var(--red-800);
263
+ --_bu-filled-bs: inset 0 var(--su-static1) 0 0 hsla(0, 0%, 100%, 0.4);
264
+ --_bu-filled-fc: var(--white);
265
+ --_bu-filled-fc-active: var(--_bu-filled-fc);
266
+ --_bu-filled-fc-hover: var(--_bu-filled-fc);
267
+ --_bu-filled-fc-selected: var(--_bu-filled-fc);
268
+ --_bu-outlined-bc: var(--red-500);
269
+ --_bu-outlined-bc-selected: var(--red-700);
270
+ --_bu-outlined-bg-selected: var(--_bu-bg-selected);
271
+ --_bu-outlined-fc-selected: var(--_bu-fc-selected);
272
+
273
+ &.s-btn__filled {
274
+ --_bu-number-fc: var(--black);
275
+
276
+ .dark-mode({
277
+ --_bu-filled-fc: var(--black);
278
+ --_bu-filled-fc-selected: var(--white);
279
+ --_bu-number-fc: var(--white);
280
+ --_bu-number-fc-selected: var(--black);
281
+ });
282
+
283
+ .highcontrast-dark-mode({
284
+ --_bu-filled-fc: var(--white);
285
+ --_bu-number-fc: var(--black);
286
+ --_bu-number-fc-selected: var(--black);
287
+ });
288
+ }
289
+ }
290
+
291
+ &&__muted {
292
+ --_bu-bg-active: var(--black-050);
293
+ --_bu-bg-hover: var(--black-025);
294
+ --_bu-bg-selected: var(--black-075);
295
+ --_bu-fc: var(--black-500);
296
+ --_bu-fc-active: var(--_bu-fc);
297
+ --_bu-fc-hover: var(--black-600);
298
+ --_bu-fc-selected: var(--black-700);
299
+ --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-muted);
300
+ --_bu-filled-bc: transparent;
301
+ --_bu-filled-bc-selected: var(--_bu-filled-bc);
302
+ --_bu-filled-bg: var(--black-100);
303
+ --_bu-filled-bg-active: var(--black-200);
304
+ --_bu-filled-bg-hover: var(--black-150);
305
+ --_bu-filled-bg-selected: var(--black-350);
306
+ --_bu-filled-bs: inset 0 var(--su-static1) 0 0 hsla(0, 0%, 100%, 0.4);
307
+ --_bu-filled-fc: var(--black-700);
308
+ --_bu-filled-fc-active: var(--_bu-filled-fc);
309
+ --_bu-filled-fc-hover: var(--_bu-filled-fc);
310
+ --_bu-filled-fc-selected: var(--black-800);
311
+ --_bu-outlined-bc: var(--black-300);
312
+ --_bu-outlined-bc-selected: var(--black-400);
313
+ --_bu-outlined-bg-selected: var(--_bu-bg-selected);
314
+ --_bu-outlined-fc-selected: var(--_bu-fc-selected);
315
+
316
+ .highcontrast-mode({
317
+ --_bu-filled-bg: var(--black-400);
318
+ --_bu-filled-bg-active: var(--black-600);
319
+ --_bu-filled-bg-hover: var(--black-500);
320
+ --_bu-filled-bg-selected: var(--black-700);
321
+ --_bu-filled-fc: var(--white);
322
+ --_bu-filled-fc-selected: var(--_bu-filled-fc);
323
+
324
+ &.s-btn__filled {
325
+ --_bu-number-fc: var(--black);
326
+ }
327
+ });
328
+ }
329
+
330
+ &&__primary {
331
+ --_bu-bg: var(--theme-button-primary-background-color);
332
+ --_bu-bg-active: var(--theme-button-primary-active-background-color);
333
+ --_bu-bg-hover: var(--theme-button-primary-hover-background-color);
334
+ --_bu-bg-selected: var(--theme-button-primary-selected-background-color);
335
+ --_bu-bs: inset 0 1px 0 0 hsla(0, 0%, 100%, 0.4);
336
+ --_bu-fc: var(--theme-button-primary-color);
337
+ --_bu-fc-active: var(--theme-button-primary-hover-color);
338
+ --_bu-fc-hover: var(--theme-button-primary-hover-color);
339
+ --_bu-fc-selected: var(--theme-button-primary-selected-color);
340
+ --_bu-number-fc: var(--theme-button-primary-number-color);
341
+
342
+ .dark-mode({
343
+ --_bu-bg: var(--theme-secondary-300);
344
+ --_bu-bg-active: var(--theme-secondary-400);
345
+ --_bu-bg-hover: var(--theme-secondary-350);
346
+ --_bu-fc: var(--black);
347
+ --_bu-fc-active: var(--_bu-fc);
348
+ --_bu-fc-hover: var(--_bu-fc);
349
+ --_bu-fc-selected: var(--white);
350
+ --_bu-number-fc: var(--white);
351
+ --_bu-number-fc-selected: var(--black);
352
+ });
353
+
354
+ .highcontrast-mode({
355
+ --_bu-bc: transparent;
356
+ });
357
+
358
+ .highcontrast-dark-mode({
359
+ --_bu-bg: var(--theme-secondary-400);
360
+ --_bu-bg-active: var(--theme-secondary-600);
361
+ --_bu-bg-hover: var(--theme-secondary-500);
362
+ --_bu-fc: var(--white);
363
+ --_bu-number-fc: var(--black);
364
+ });
365
+ }
366
+
367
+ // Social
368
+ &&__facebook,
369
+ &&__github {
370
+ .highcontrast-mode({
371
+ --_bu-bc: transparent;
372
+ });
373
+ }
374
+
375
+ &&__facebook {
376
+ @_fb-brand: #385499;
377
+ --_bu-bc: transparent;
378
+ --_bu-bg: @_fb-brand;
379
+ --_bu-bg-active: darken(@_fb-brand, 10%);
380
+ --_bu-bg-hover: darken(@_fb-brand, 5%);
381
+ --_bu-fc: #fff;
382
+ --_bu-fc-active: var(--_bu-fc);
383
+ --_bu-fc-hover: var(--_bu-fc);
384
+ --_bu-hc-bc: transparent;
385
+ }
386
+
387
+ &&__google {
388
+ --_bu-bc: var(--bc-medium);
389
+ --_bu-bg: var(--white);
390
+ --_bu-bg-active: var(--black-050);
391
+ --_bu-bg-hover: var(--black-025);
392
+ --_bu-fc: var(--fc-medium);
393
+ --_bu-fc-active: var(--fc-dark);
394
+ --_bu-fc-hover: var(--black-800);
395
+ --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-muted);
396
+ }
397
+
398
+ &&__github {
399
+ --_bu-bg: var(--black-750);
400
+ --_bu-bg-active: var(--black);
401
+ --_bu-bg-hover: var(--black-800);
402
+ --_bu-fc: var(--white);
403
+ --_bu-fc-active: var(--white);
404
+ --_bu-fc-hover: var(--white);
405
+ --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring-muted);
406
+ --_bu-hc-bc: transparent;
407
+ }
408
+
409
+ // CHILD ELEMENTS
410
+ & &--badge {
411
+ opacity: var(--_bu-badge-o);
412
+ display: inline-block;
413
+ border-radius: var(--br-sm);
414
+ padding: var(--su2) calc(var(--su4) - var(--su1));
415
+ font-size: var(--fs-caption);
416
+ line-height: var(--lh-xs);
417
+ background-color: currentColor;
418
+ }
419
+
420
+ & &--number {
421
+ color: var(--_bu-number-fc);
422
+ }
423
+
424
+ &--radio { // This lives alongside a .s-btn element. These styles are the equivelent of `.v-visible-sr`
425
+ border: 0;
426
+ clip-path: inset(50%);
427
+ clip: rect(1px, 1px, 1px, 1px);
428
+ height: 1px;
429
+ margin: -1px;
430
+ overflow-wrap: normal;
431
+ overflow: hidden;
432
+ padding: 0;
433
+ position: absolute;
434
+ width: 1px;
435
+ }
436
+
437
+ // INTERACTION
438
+ &:not(.is-selected):not(&__link):not(&__unset) {
439
+ &:hover, &:focus {
440
+ &.s-btn__filled {
441
+ background-color: var(--_bu-filled-bg-hover);
442
+ color: var(--_bu-filled-fc-hover);
443
+ }
444
+
445
+ background-color: var(--_bu-bg-hover);
446
+ color: var(--_bu-fc-hover);
447
+ }
448
+
449
+ &:active {
450
+ &.s-btn__filled {
451
+ background-color: var(--_bu-filled-bg-active);
452
+ color: var(--_bu-filled-fc-active);
453
+ }
454
+
455
+ background-color: var(--_bu-bg-active);
456
+ color: var(--_bu-fc-active);
457
+ }
458
+
459
+ &:visited:not(:hover):not(:focus) {
460
+ &.s-btn__filled {
461
+ background-color: var(--_bu-filled-bg);
462
+ color: var(--_bu-filled-fc);
463
+ }
464
+
465
+ background-color: var(--_bu-bg);
466
+ color: var(--_bu-fc);
467
+ }
468
+ }
469
+
470
+ &:focus,
471
+ &--radio:focus + & {
472
+ box-shadow: var(--_bu-focus-ring);
473
+ outline: none;
474
+ }
475
+
476
+ background-color: var(--_bu-bg);
477
+ border: var(--_bu-baw) solid var(--_bu-bc);
478
+ border-radius: var(--_bu-br);
479
+ box-shadow: var(--_bu-bs);
480
+ color: var(--_bu-fc);
481
+ font-size: var(--_bu-fs);
482
+ padding: var(--_bu-p);
483
+
484
+ cursor: pointer;
485
+ display: inline-block;
486
+ font-family: inherit;
487
+ font-weight: normal;
488
+ line-height: var(--lh-sm);
489
+ position: relative;
490
+ outline: none;
491
+ text-align: center;
492
+ text-decoration: none;
493
+ user-select: none;
494
+ }
495
+
496
+ // [1] Guard against the difference in configurable resets
497
+ // Eric Meyer's reset does not include this, while normalize.css does
498
+ // Correct the inability to style buttons in iOS and Safari.
499
+ // [2] If the first thing in the button is an icon, let's hide it on loading
500
+ // We only want to modify the visibility, since we still want it to have shape and keep the same layout.
501
+ // [3] Most svg icons are 18px tall, but the button's line-height is 1 (13px).
502
+ // This means we need to off set the margin y-axis so we don't add
503
503
  // additional height to the button.