@stackoverflow/stacks 1.8.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 (137) hide show
  1. package/README.md +161 -153
  2. package/dist/{controllers/s-banner.d.ts → components/banner/banner.d.ts} +1 -1
  3. package/dist/{controllers/s-expandable-control.d.ts → components/expandable/expandable.d.ts} +1 -1
  4. package/dist/{controllers/s-modal.d.ts → components/modal/modal.d.ts} +1 -1
  5. package/dist/{controllers/s-navigation-tablist.d.ts → components/navigation/navigation.d.ts} +1 -1
  6. package/dist/{controllers/s-popover.d.ts → components/popover/popover.d.ts} +1 -1
  7. package/dist/{controllers/s-tooltip.d.ts → components/popover/tooltip.d.ts} +1 -1
  8. package/dist/components/table/table.d.ts +30 -0
  9. package/dist/{controllers/s-toast.d.ts → components/toast/toast.d.ts} +1 -1
  10. package/dist/{controllers/s-uploader.d.ts → components/uploader/uploader.d.ts} +1 -1
  11. package/dist/controllers.d.ts +9 -0
  12. package/dist/css/stacks.css +2063 -1994
  13. package/dist/css/stacks.min.css +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/js/stacks.js +1465 -1436
  16. package/dist/js/stacks.min.js +1 -1
  17. package/lib/{css/atomic/borders.less → atomic/border.less} +397 -379
  18. package/lib/{css/atomic/colors.less → atomic/color.less} +210 -210
  19. package/lib/{css/atomic → atomic}/flex.less +426 -426
  20. package/lib/{css/atomic → atomic}/gap.less +44 -44
  21. package/lib/{css/atomic → atomic}/grid.less +139 -139
  22. package/lib/{css/atomic → atomic}/misc.less +343 -343
  23. package/lib/{css/atomic → atomic}/spacing.less +342 -342
  24. package/lib/{css/atomic → atomic}/typography.less +267 -267
  25. package/lib/{css/atomic → atomic}/width-height.less +194 -194
  26. package/lib/{css/base → base}/body.less +44 -44
  27. package/lib/{css/base → base}/configuration-static.less +61 -61
  28. package/lib/{css/base → base}/fieldset.less +5 -5
  29. package/lib/{css/base/icons.less → base/icon.less} +11 -20
  30. package/lib/{css/base/internals.less → base/internal.less} +220 -220
  31. package/lib/{css/base → base}/reset-meyer.less +64 -64
  32. package/lib/{css/base → base}/reset-normalize.less +449 -449
  33. package/lib/{css/base → base}/reset.less +20 -20
  34. package/lib/components/activity-indicator/activity-indicator.a11y.test.ts +21 -0
  35. package/lib/{css/components → components/activity-indicator}/activity-indicator.less +40 -40
  36. package/lib/components/activity-indicator/activity-indicator.visual.test.ts +23 -0
  37. package/lib/{css/components/anchors.less → components/anchor/anchor.less} +61 -61
  38. package/lib/components/avatar/avatar.a11y.test.ts +36 -0
  39. package/lib/{css/components/avatars.less → components/avatar/avatar.less} +108 -108
  40. package/lib/components/avatar/avatar.visual.test.ts +54 -0
  41. package/lib/components/award-bling/award-bling.a11y.test.ts +17 -0
  42. package/lib/{css/components → components/award-bling}/award-bling.less +31 -31
  43. package/lib/components/award-bling/award-bling.visual.test.ts +26 -0
  44. package/lib/{css/components/badges.less → components/badge/badge.less} +251 -251
  45. package/lib/components/banner/banner.a11y.test.ts +37 -0
  46. package/lib/components/banner/banner.less +51 -0
  47. package/lib/{test/s-banner.test.ts → components/banner/banner.test.ts} +73 -73
  48. package/lib/{ts/controllers/s-banner.ts → components/banner/banner.ts} +149 -149
  49. package/lib/components/banner/banner.visual.test.ts +37 -0
  50. package/lib/components/block-link/block-link.a11y.test.ts +68 -0
  51. package/lib/{css/components → components/block-link}/block-link.less +80 -80
  52. package/lib/components/block-link/block-link.visual.test.ts +61 -0
  53. package/lib/components/breadcrumbs/breadcrumbs.a11y.test.ts +37 -0
  54. package/lib/{css/components → components/breadcrumbs}/breadcrumbs.less +41 -41
  55. package/lib/components/breadcrumbs/breadcrumbs.visual.test.ts +37 -0
  56. package/lib/components/button/button.a11y.test.ts +32 -0
  57. package/lib/{css/components/buttons.less → components/button/button.less} +502 -501
  58. package/lib/components/button/button.visual.test.ts +52 -0
  59. package/lib/{css/components/button-groups.less → components/button-group/button-group.less} +83 -83
  60. package/lib/components/card/card.a11y.test.ts +13 -0
  61. package/lib/{css/components/cards.less → components/card/card.less} +29 -29
  62. package/lib/components/card/card.visual.test.ts +54 -0
  63. package/lib/components/check-control/check-control.less +17 -0
  64. package/lib/components/check-group/check-group.less +19 -0
  65. package/lib/{css/components/checkboxes-radios.less → components/checkbox_radio/checkbox_radio.less} +158 -158
  66. package/lib/{css/components/code-blocks.less → components/code-block/code-block.less} +116 -116
  67. package/lib/{css/components → components/description}/description.less +9 -9
  68. package/lib/{css/components/empty-states.less → components/empty-state/empty-state.less} +16 -16
  69. package/lib/{css/components → components/expandable}/expandable.less +118 -115
  70. package/lib/components/expandable/expandable.test.ts +51 -0
  71. package/lib/{ts/controllers/s-expandable-control.ts → components/expandable/expandable.ts} +238 -238
  72. package/lib/components/input-fill/input-fill.less +35 -0
  73. package/lib/components/input-icon/input-icon.less +45 -0
  74. package/lib/components/input-message/input-message.less +48 -0
  75. package/lib/{css/components/inputs.less → components/input_textarea/input_textarea.less} +166 -297
  76. package/lib/{css/components/labels.less → components/label/label.less} +111 -111
  77. package/lib/{css/components → components/link}/link.less +119 -119
  78. package/lib/{css/components/link-previews.less → components/link-preview/link-preview.less} +139 -139
  79. package/lib/{css/components → components/menu}/menu.less +41 -41
  80. package/lib/{css/components/modals.less → components/modal/modal.less} +113 -113
  81. package/lib/{ts/controllers/s-modal.ts → components/modal/modal.ts} +379 -379
  82. package/lib/{css/components → components/navigation}/navigation.less +134 -134
  83. package/lib/{ts/controllers/s-navigation-tablist.ts → components/navigation/navigation.ts} +128 -128
  84. package/lib/{css/components/notices.less → components/notice/notice.less} +203 -292
  85. package/lib/{css/components/page-titles.less → components/page-title/page-title.less} +51 -51
  86. package/lib/{css/components → components/pagination}/pagination.less +52 -52
  87. package/lib/{css/components/popovers.less → components/popover/popover.less} +148 -147
  88. package/lib/{ts/controllers/s-popover.ts → components/popover/popover.ts} +651 -651
  89. package/lib/{test/s-tooltip.test.ts → components/popover/tooltip.test.ts} +62 -62
  90. package/lib/{ts/controllers/s-tooltip.ts → components/popover/tooltip.ts} +343 -343
  91. package/lib/{test/s-tooltip.visual.test.ts → components/popover/tooltip.visual.test.ts} +31 -31
  92. package/lib/{css/components → components/post-summary}/post-summary.less +415 -415
  93. package/lib/{css/components/progress-bars.less → components/progress-bar/progress-bar.less} +291 -291
  94. package/lib/{css/components → components/prose}/prose.less +452 -452
  95. package/lib/{css/components → components/select}/select.less +148 -148
  96. package/lib/{css/components/sidebar-widgets.less → components/sidebar-widget/sidebar-widget.less} +257 -259
  97. package/lib/{css/components → components/spinner}/spinner.less +103 -103
  98. package/lib/{css/components → components/table}/table.less +307 -297
  99. package/lib/components/table/table.test.ts +366 -0
  100. package/lib/{ts/controllers/s-table.ts → components/table/table.ts} +296 -263
  101. package/lib/components/table-container/table-container.less +4 -0
  102. package/lib/{css/components/tags.less → components/tag/tag.less} +213 -213
  103. package/lib/components/toast/toast.less +35 -0
  104. package/lib/{test/s-toast.test.ts → components/toast/toast.test.ts} +63 -63
  105. package/lib/{ts/controllers/s-toast.ts → components/toast/toast.ts} +357 -357
  106. package/lib/components/toast/toast.visual.test.ts +27 -0
  107. package/lib/{css/components/toggle-switches.less → components/toggle-switch/toggle-switch.less} +110 -110
  108. package/lib/{css/components → components/topbar}/topbar.less +436 -435
  109. package/lib/{css/components → components/uploader}/uploader.less +195 -195
  110. package/lib/{ts/controllers/s-uploader.ts → components/uploader/uploader.ts} +205 -205
  111. package/lib/{css/components/user-cards.less → components/user-card/user-card.less} +129 -129
  112. package/lib/controllers.ts +33 -0
  113. package/lib/{css/exports → exports}/constants-colors.less +1112 -1111
  114. package/lib/{css/exports → exports}/constants-helpers.less +108 -108
  115. package/lib/{css/exports → exports}/constants-type.less +153 -153
  116. package/lib/{css/exports → exports}/exports.less +15 -15
  117. package/lib/{css/exports → exports}/mixins.less +299 -299
  118. package/lib/{ts/index.ts → index.ts} +32 -32
  119. package/lib/{css/input-utils.less → input-utils.less} +44 -44
  120. package/lib/{css/stacks-dynamic.less → stacks-dynamic.less} +24 -25
  121. package/lib/stacks-static.less +93 -0
  122. package/lib/{css/stacks.less → stacks.less} +13 -13
  123. package/lib/{ts/stacks.ts → stacks.ts} +113 -113
  124. package/lib/test/open-wc-testing-patch.d.ts +26 -0
  125. package/lib/test/test-utils.ts +466 -0
  126. package/lib/tsconfig.build.json +4 -0
  127. package/lib/tsconfig.json +16 -13
  128. package/package.json +106 -105
  129. package/dist/controllers/index.d.ts +0 -9
  130. package/dist/controllers/s-table.d.ts +0 -8
  131. package/lib/css/stacks-static.less +0 -87
  132. package/lib/test/s-avatar.a11y.test.ts +0 -77
  133. package/lib/test/s-banner.visual.test.ts +0 -61
  134. package/lib/test/s-btn.a11y.test.ts +0 -123
  135. package/lib/test/s-btn.visual.test.ts +0 -16
  136. package/lib/test/s-toast.visual.test.ts +0 -48
  137. package/lib/ts/controllers/index.ts +0 -17
@@ -1,297 +1,166 @@
1
- .s-input,
2
- .s-textarea {
3
- --_in-bc: var(--bc-darker);
4
- --_in-bc-focus: var(--theme-secondary-300);
5
- --_in-bg: var(--white);
6
- --_in-br: var(--br-sm);
7
- --_in-bs-focus: 0 0 0 var(--su-static4) var(--focus-ring);
8
- --_in-c: unset;
9
- --_in-fc: var(--fc-dark);
10
- --_in-fc-focus: var(--black);
11
- --_in-fs: var(--fs-body1);
12
- --_in-o: unset;
13
- --_in-px: 0.7em;
14
- --_in-py: 0.6em;
15
- --_in-placeholder-fc: var(--black-200);
16
-
17
- // CONTEXTUAL STYLES
18
- @supports (-webkit-overflow-scrolling: touch) {
19
- --_in-fs: var(--su-static16); // 16px — Increase font size for mobile safari. This keeps our inputs from zooming the page while focused.
20
- --_in-px: 0.55em;
21
- --_in-py: 0.36em;
22
-
23
- &::-webkit-input-placeholder {
24
- line-height: normal !important;
25
- }
26
- }
27
-
28
- .highcontrast-mode({
29
- --_in-bc: var(--black);
30
- --_in-placeholder-fc: var(--black-400);
31
- });
32
-
33
- // MODIFIERS
34
- fieldset[disabled] &,
35
- &[disabled],
36
- &[readonly],
37
- .is-readonly & {
38
- --_in-c: not-allowed;
39
- }
40
-
41
- fieldset[disabled] &,
42
- &[disabled] {
43
- --_in-o: var(--_o-disabled-static);
44
- }
45
-
46
- &[readonly],
47
- .is-readonly & {
48
- .highcontrast-mode({
49
- --_in-fc: var(--fc-light);
50
- });
51
-
52
- --_in-bg: var(--black-050);
53
- --_in-bc: var(--bc-light);
54
- --_in-fc: var(--black-200);
55
- --_in-fc-focus: var(--_in-fc);
56
- }
57
-
58
- .validation-states(
59
- in,
60
- { .highcontrast-mode({ --_in-bc: var(--red-400); }); },
61
- { .highcontrast-mode({ --_in-bc: var(--green-400); }); },
62
- { .highcontrast-mode({ --_in-bc: var(--yellow-600); }); }
63
- );
64
-
65
- // Sizes
66
- &&__sm {
67
- .size-styles(sm; in; @styles: fs);
68
- }
69
-
70
- &&__md {
71
- @supports (-webkit-overflow-scrolling: touch) {
72
- --_in-fs: 17px;
73
- --_in-py: 0.4em;
74
- }
75
-
76
- .size-styles(md; in; @styles: br, fs);
77
- }
78
-
79
- &&__lg {
80
- .size-styles(lg; in; @styles: br, fs);
81
- --_in-px: 0.6em;
82
- --_in-py: 0.45em;
83
- }
84
-
85
- &&__xl {
86
- .size-styles(xl; in; @styles: br, fs);
87
- --_in-px: 0.5em;
88
- --_in-py: 0.4em;
89
- }
90
-
91
- // CHILD ELEMENTS
92
- .webkit-autofill();
93
-
94
- &::placeholder,
95
- &::-webkit-input-placeholder {
96
- color: var(--_in-placeholder-fc);
97
- }
98
-
99
- &::placeholder {
100
- opacity: 1;
101
- }
102
-
103
- &&__creditcard,
104
- &&__search {
105
- --_in-pl: var(--su-static32);
106
- }
107
-
108
- // INTERACTION
109
- &:focus{
110
- border-color: var(--_in-bc-focus);
111
- box-shadow: var(--_in-bs-focus);
112
- color: var(--_in-fc-focus);
113
- outline: 0;
114
- }
115
-
116
- @scrollbar-styles();
117
- background-color: var(--_in-bg);
118
- border: var(--su-static1) solid var(--_in-bc);
119
- border-radius: var(--_in-br);
120
- color: var(--_in-fc);
121
- cursor: var(--_in-c);
122
- font-size: var(--_in-fs);
123
- opacity: var(--_in-o);
124
- padding: var(--_in-py) var(--_in-px) var(--_in-py) var(--_in-pl, var(--_in-px));
125
-
126
- -webkit-appearance: none; // Removes shadows we don't want in mobile Safari
127
- font-family: inherit;
128
- margin: 0; // A guard against Core's default margins
129
- width: 100%;
130
- }
131
-
132
- .s-input {
133
- .input-states({
134
- padding-right: var(--su32);
135
- });
136
-
137
- &:focus-within {
138
- .highcontrast-mode({
139
- --_in-bc-focus: var(--black);
140
- });
141
-
142
- border-color: var(--_in-bc-focus);
143
- box-shadow: var(--_in-bs-focus);
144
- color: var(--_in-fc-focus);
145
- outline: 0;
146
- }
147
-
148
- &&__md {
149
- --_in-py: 0.5em;
150
- }
151
- }
152
-
153
- .s-textarea {
154
- .input-states({
155
- padding-right: var(--su48);
156
- });
157
-
158
- &&__md {
159
- --_in-py: 0.72em;
160
- }
161
-
162
- ~ .s-input-icon {
163
- right: 1.5em;
164
- top: 1.5em;
165
- }
166
- }
167
-
168
- // Other input-related elements
169
- .s-input-fill {
170
- --_if-bc: var(--bc-darker);
171
- --_if-bg: var(--black-050);
172
- --_if-blw: 0;
173
- --_if-blr: 0;
174
- --_if-brr: 0;
175
- --_if-brw: 0;
176
-
177
- &&__clear {
178
- --_if-bc: transparent;
179
- --_if-bg: transparent;
180
- }
181
-
182
- &.order-first {
183
- --_if-blw: var(--su-static1);
184
- --_if-blr: var(--br-sm);
185
- }
186
-
187
- &.order-last {
188
- --_if-brw: var(--su-static1);
189
- --_if-brr: var(--br-sm);
190
- }
191
-
192
- background-color: var(--_if-bg);
193
- border: var(--su-static1) solid var(--_if-bc);
194
- border-left-width: var(--_if-blw);
195
- border-right-width: var(--_if-brw);
196
- border-radius: var(--_if-blr) var(--_if-brr) var(--_if-brr) var(--_if-blr);
197
-
198
- color: var(--fc-medium);
199
- font-family: inherit;
200
- line-height: var(--lh-sm);
201
- padding: 0.6em 0.7em;
202
- white-space: nowrap;
203
- }
204
-
205
- .s-input-icon {
206
- --_ii-fc: unset;
207
- --_ii-r: 0.7em;
208
-
209
- // MODIFIERS
210
- .has-error & {
211
- --_ii-fc: var(--red-400);
212
- }
213
-
214
- .has-success & {
215
- --_ii-fc: var(--green-400);
216
- }
217
-
218
- .has-warning & {
219
- --_ii-fc: var(--yellow-600);
220
- }
221
-
222
- .is-disabled & {
223
- --_ii-fc: var(--black-400);
224
- }
225
-
226
- .is-readonly & {
227
- --_ii-fc: var(--black-200);
228
-
229
- .highcontrast-mode({
230
- --_ii-fc: var(--fc-light);
231
- });
232
- }
233
-
234
- &&__creditcard,
235
- &&__search {
236
- --_ii-r: auto;
237
-
238
- color: var(--black-400);
239
- left: 0.7em;
240
- }
241
-
242
- color: var(--_ii-fc);
243
- right: var(--_ii-r);
244
-
245
- margin-top: -9px; // Half the icon's height at 18px for centering;
246
- pointer-events: none;
247
- position: absolute;
248
- top: 50%;
249
- }
250
- .s-input-message {
251
- --_im-fc: unset;
252
- --_im-a-fc: unset;
253
- --_im-a-fc-hover: unset;
254
-
255
- .input-states({
256
- a {
257
- text-decoration: underline;
258
- }
259
- });
260
-
261
- fieldset[disabled] & {
262
- cursor: not-allowed;
263
- opacity: var(--_o-disabled-static);
264
- }
265
-
266
- // MODIFIERS
267
- .has-error & {
268
- --_im-fc: var(--red-500);
269
- --_im-a-fc: var(--red-800);
270
- --_im-a-fc-hover: var(--red-900);
271
- }
272
-
273
- .has-success & {
274
- --_im-fc: var(--green-500);
275
- --_im-a-fc: var(--green-800);
276
- --_im-a-fc-hover: var(--green-900);
277
- }
278
-
279
- .has-warning & {
280
- --_im-fc: var(--yellow-800);
281
- --_im-a-fc: var(--yellow-900);
282
- }
283
-
284
- // CHILD ELEMENTS
285
- a {
286
- &:hover {
287
- color: var(--_im-a-fc-hover);
288
- }
289
-
290
- color: var(--_im-a-fc);
291
- }
292
-
293
- color: var(--_im-fc);
294
-
295
- font-size: var(--fs-caption);
296
- padding: var(--su2);
297
- }
1
+ .s-input,
2
+ .s-textarea {
3
+ --_in-bc: var(--bc-darker);
4
+ --_in-bc-focus: var(--theme-secondary-300);
5
+ --_in-bg: var(--white);
6
+ --_in-br: var(--br-sm);
7
+ --_in-bs-focus: 0 0 0 var(--su-static4) var(--focus-ring);
8
+ --_in-c: unset;
9
+ --_in-fc: var(--fc-dark);
10
+ --_in-fc-focus: var(--black);
11
+ --_in-fs: var(--fs-body1);
12
+ --_in-o: unset;
13
+ --_in-px: 0.7em;
14
+ --_in-py: 0.6em;
15
+ --_in-placeholder-fc: var(--black-200);
16
+
17
+ // CONTEXTUAL STYLES
18
+ @supports (-webkit-overflow-scrolling: touch) {
19
+ --_in-fs: var(--su-static16); // 16px — Increase font size for mobile safari. This keeps our inputs from zooming the page while focused.
20
+ --_in-px: 0.55em;
21
+ --_in-py: 0.36em;
22
+
23
+ &::-webkit-input-placeholder {
24
+ line-height: normal !important;
25
+ }
26
+ }
27
+
28
+ .highcontrast-mode({
29
+ --_in-bc: var(--black);
30
+ --_in-placeholder-fc: var(--black-400);
31
+ });
32
+
33
+ // MODIFIERS
34
+ fieldset[disabled] &,
35
+ &[disabled],
36
+ &[readonly],
37
+ .is-readonly & {
38
+ --_in-c: not-allowed;
39
+ }
40
+
41
+ fieldset[disabled] &,
42
+ &[disabled] {
43
+ --_in-o: var(--_o-disabled-static);
44
+ }
45
+
46
+ &[readonly],
47
+ .is-readonly & {
48
+ .highcontrast-mode({
49
+ --_in-fc: var(--fc-light);
50
+ });
51
+
52
+ --_in-bg: var(--black-050);
53
+ --_in-bc: var(--bc-light);
54
+ --_in-fc: var(--black-200);
55
+ --_in-fc-focus: var(--_in-fc);
56
+ }
57
+
58
+ .validation-states(
59
+ in,
60
+ { .highcontrast-mode({ --_in-bc: var(--red-400); }); },
61
+ { .highcontrast-mode({ --_in-bc: var(--green-400); }); },
62
+ { .highcontrast-mode({ --_in-bc: var(--yellow-600); }); }
63
+ );
64
+
65
+ // Sizes
66
+ &&__sm {
67
+ .size-styles(sm; in; @styles: fs);
68
+ }
69
+
70
+ &&__md {
71
+ @supports (-webkit-overflow-scrolling: touch) {
72
+ --_in-fs: 17px;
73
+ --_in-py: 0.4em;
74
+ }
75
+
76
+ .size-styles(md; in; @styles: br, fs);
77
+ }
78
+
79
+ &&__lg {
80
+ .size-styles(lg; in; @styles: br, fs);
81
+ --_in-px: 0.6em;
82
+ --_in-py: 0.45em;
83
+ }
84
+
85
+ &&__xl {
86
+ .size-styles(xl; in; @styles: br, fs);
87
+ --_in-px: 0.5em;
88
+ --_in-py: 0.4em;
89
+ }
90
+
91
+ // CHILD ELEMENTS
92
+ .webkit-autofill();
93
+
94
+ &::placeholder,
95
+ &::-webkit-input-placeholder {
96
+ color: var(--_in-placeholder-fc);
97
+ }
98
+
99
+ &::placeholder {
100
+ opacity: 1;
101
+ }
102
+
103
+ &&__creditcard,
104
+ &&__search {
105
+ --_in-pl: var(--su-static32);
106
+ }
107
+
108
+ // INTERACTION
109
+ &:focus{
110
+ border-color: var(--_in-bc-focus);
111
+ box-shadow: var(--_in-bs-focus);
112
+ color: var(--_in-fc-focus);
113
+ outline: 0;
114
+ }
115
+
116
+ @scrollbar-styles();
117
+ background-color: var(--_in-bg);
118
+ border: var(--su-static1) solid var(--_in-bc);
119
+ border-radius: var(--_in-br);
120
+ color: var(--_in-fc);
121
+ cursor: var(--_in-c);
122
+ font-size: var(--_in-fs);
123
+ opacity: var(--_in-o);
124
+ padding: var(--_in-py) var(--_in-px) var(--_in-py) var(--_in-pl, var(--_in-px));
125
+
126
+ -webkit-appearance: none; // Removes shadows we don't want in mobile Safari
127
+ font-family: inherit;
128
+ margin: 0; // A guard against Core's default margins
129
+ width: 100%;
130
+ }
131
+
132
+ .s-input {
133
+ .input-states({
134
+ padding-right: var(--su32);
135
+ });
136
+
137
+ &:focus-within {
138
+ .highcontrast-mode({
139
+ --_in-bc-focus: var(--black);
140
+ });
141
+
142
+ border-color: var(--_in-bc-focus);
143
+ box-shadow: var(--_in-bs-focus);
144
+ color: var(--_in-fc-focus);
145
+ outline: 0;
146
+ }
147
+
148
+ &&__md {
149
+ --_in-py: 0.5em;
150
+ }
151
+ }
152
+
153
+ .s-textarea {
154
+ .input-states({
155
+ padding-right: var(--su48);
156
+ });
157
+
158
+ &&__md {
159
+ --_in-py: 0.72em;
160
+ }
161
+
162
+ ~ .s-input-icon {
163
+ right: 1.5em;
164
+ top: 1.5em;
165
+ }
166
+ }
@@ -1,111 +1,111 @@
1
- .s-label {
2
- --_la-fs: var(--fs-body2);
3
-
4
- // CONTEXTUAL STYLES
5
- &[for] {
6
- cursor: pointer;
7
- }
8
-
9
- fieldset[disabled] &,
10
- .is-disabled & {
11
- .s-description {
12
- opacity: unset;
13
- }
14
-
15
- cursor: not-allowed;
16
- opacity: var(--_o-disabled-static);
17
- }
18
-
19
- .is-readonly & {
20
- cursor: not-allowed;
21
- }
22
-
23
- // MODIFIERS
24
- // Sizes
25
- &&__sm {
26
- .size-styles(sm; la; @styles: fs);
27
- }
28
-
29
- &&__md {
30
- .size-styles(md; la; @styles: fs);
31
- }
32
-
33
- &&__lg {
34
- .size-styles(lg; la; @styles: fs);
35
- }
36
-
37
- &&__xl {
38
- .size-styles(xl; la; @styles: fs);
39
- }
40
-
41
- // CHILD ELEMENTS
42
- // Label status flag
43
- // Is this form item required or optional? Flag the status for users.
44
- // Default styling is optional.
45
- &--status { // TODO convert to require parent class for styling [1]
46
- --_la-status-b: none;
47
- --_la-status-bg: var(--black-050);
48
- --_la-status-fc: var(--fc-medium);
49
-
50
- .highcontrast-mode({
51
- --_la-status-b: var(--su-static1) solid currentColor;
52
- });
53
-
54
- // TODO: include child component class (without variant) on selector
55
- &__beta {
56
- --_la-status-bg: var(--blue-100);
57
- --_la-status-fc: var(--blue-700);
58
- }
59
-
60
- &__new {
61
- --_la-status-bg: var(--green-100);
62
- --_la-status-fc: var(--green-700);
63
-
64
- .dark-mode({
65
- --_la-status-bg: var(--green-050);
66
- --_la-status-fc: var(--green-800);
67
- });
68
- }
69
-
70
- &__required {
71
- --_la-status-bg: var(--red-100);
72
- --_la-status-fc: var(--red-700);
73
-
74
- .dark-mode({
75
- --_la-status-bg: var(--red-050);
76
- --_la-status-fc: var(--red-800);
77
- });
78
- }
79
-
80
- background-color: var(--_la-status-bg);
81
- border: var(--_la-status-b);
82
- color: var(--_la-status-fc);
83
-
84
- border-radius: 1000px;
85
- font-size: var(--fs-caption);
86
- font-weight: 400;
87
- margin-left: var(--su4);
88
- padding: var(--su2) var(--su8);
89
- vertical-align: text-bottom;
90
- }
91
-
92
- .s-description,
93
- .s-input-message {
94
- font-weight: normal;
95
- margin-bottom: 0;
96
- margin-top: var(--su4);
97
- padding: 0;
98
- }
99
-
100
- font-size: var(--_la-fs);
101
-
102
- color: var(--fc-dark);
103
- font-family: inherit;
104
- font-weight: 600;
105
- padding: 0 var(--su2); // Helps the label visually line up with inputs
106
- }
107
-
108
- // [1] In Core, we have *many* instances of `.s-label--status` used without the `.s-label` parent.
109
- // While I'd prefer to enforce the requirement of the parent class, it's too much of a lift at this moment.
110
- // We'll come back to it, hopefully when we have a pill component to replace the current usage of `.s-label--status`
111
- // without the base label class.
1
+ .s-label {
2
+ --_la-fs: var(--fs-body2);
3
+
4
+ // CONTEXTUAL STYLES
5
+ &[for] {
6
+ cursor: pointer;
7
+ }
8
+
9
+ fieldset[disabled] &,
10
+ .is-disabled & {
11
+ .s-description {
12
+ opacity: unset;
13
+ }
14
+
15
+ cursor: not-allowed;
16
+ opacity: var(--_o-disabled-static);
17
+ }
18
+
19
+ .is-readonly & {
20
+ cursor: not-allowed;
21
+ }
22
+
23
+ // MODIFIERS
24
+ // Sizes
25
+ &&__sm {
26
+ .size-styles(sm; la; @styles: fs);
27
+ }
28
+
29
+ &&__md {
30
+ .size-styles(md; la; @styles: fs);
31
+ }
32
+
33
+ &&__lg {
34
+ .size-styles(lg; la; @styles: fs);
35
+ }
36
+
37
+ &&__xl {
38
+ .size-styles(xl; la; @styles: fs);
39
+ }
40
+
41
+ // CHILD ELEMENTS
42
+ // Label status flag
43
+ // Is this form item required or optional? Flag the status for users.
44
+ // Default styling is optional.
45
+ &--status { // TODO convert to require parent class for styling [1]
46
+ --_la-status-b: none;
47
+ --_la-status-bg: var(--black-050);
48
+ --_la-status-fc: var(--fc-medium);
49
+
50
+ .highcontrast-mode({
51
+ --_la-status-b: var(--su-static1) solid currentColor;
52
+ });
53
+
54
+ // TODO: include child component class (without variant) on selector
55
+ &__beta {
56
+ --_la-status-bg: var(--blue-100);
57
+ --_la-status-fc: var(--blue-700);
58
+ }
59
+
60
+ &__new {
61
+ --_la-status-bg: var(--green-100);
62
+ --_la-status-fc: var(--green-700);
63
+
64
+ .dark-mode({
65
+ --_la-status-bg: var(--green-050);
66
+ --_la-status-fc: var(--green-800);
67
+ });
68
+ }
69
+
70
+ &__required {
71
+ --_la-status-bg: var(--red-100);
72
+ --_la-status-fc: var(--red-700);
73
+
74
+ .dark-mode({
75
+ --_la-status-bg: var(--red-050);
76
+ --_la-status-fc: var(--red-800);
77
+ });
78
+ }
79
+
80
+ background-color: var(--_la-status-bg);
81
+ border: var(--_la-status-b);
82
+ color: var(--_la-status-fc);
83
+
84
+ border-radius: 1000px;
85
+ font-size: var(--fs-caption);
86
+ font-weight: 400;
87
+ margin-left: var(--su4);
88
+ padding: var(--su2) var(--su8);
89
+ vertical-align: text-bottom;
90
+ }
91
+
92
+ .s-description,
93
+ .s-input-message {
94
+ font-weight: normal;
95
+ margin-bottom: 0;
96
+ margin-top: var(--su4);
97
+ padding: 0;
98
+ }
99
+
100
+ font-size: var(--_la-fs);
101
+
102
+ color: var(--fc-dark);
103
+ font-family: inherit;
104
+ font-weight: 600;
105
+ padding: 0 var(--su2); // Helps the label visually line up with inputs
106
+ }
107
+
108
+ // [1] In Core, we have *many* instances of `.s-label--status` used without the `.s-label` parent.
109
+ // While I'd prefer to enforce the requirement of the parent class, it's too much of a lift at this moment.
110
+ // We'll come back to it, hopefully when we have a pill component to replace the current usage of `.s-label--status`
111
+ // without the base label class.